568 lines
1.7 MiB
568 lines
1.7 MiB
var cH=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var ASt=cH(gi=>{(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 vS(r,e){const t=Object.create(null),n=r.split(",");for(let i=0;i<n.length;i++)t[n[i]]=!0;return e?i=>!!t[i.toLowerCase()]:i=>!!t[i]}function gS(r){if(tr(r)){const e={};for(let t=0;t<r.length;t++){const n=r[t],i=Ki(n)?vH(n):gS(n);if(i)for(const a in i)e[a]=i[a]}return e}else{if(Ki(r))return r;if(ri(r))return r}}const fH=/;(?![^(]*\))/g,pH=/:([^]+)/,dH=/\/\*.*?\*\//gs;function vH(r){const e={};return r.replace(dH,"").split(fH).forEach(t=>{if(t){const n=t.split(pH);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function yS(r){let e="";if(Ki(r))e=r;else if(tr(r))for(let t=0;t<r.length;t++){const n=yS(r[t]);n&&(e+=n+" ")}else if(ri(r))for(const t in r)r[t]&&(e+=t+" ");return e.trim()}const gH="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",yH=vS(gH);function v5(r){return!!r||r===""}const xn={},Bf=[],ms=()=>{},mH=()=>!1,_H=/^on[^a-z]/,y_=r=>_H.test(r),mS=r=>r.startsWith("onUpdate:"),_a=Object.assign,_S=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},wH=Object.prototype.hasOwnProperty,br=(r,e)=>wH.call(r,e),tr=Array.isArray,Kd=r=>m_(r)==="[object Map]",EH=r=>m_(r)==="[object Set]",hr=r=>typeof r=="function",Ki=r=>typeof r=="string",wS=r=>typeof r=="symbol",ri=r=>r!==null&&typeof r=="object",g5=r=>ri(r)&&hr(r.then)&&hr(r.catch),CH=Object.prototype.toString,m_=r=>CH.call(r),BH=r=>m_(r).slice(8,-1),TH=r=>m_(r)==="[object Object]",ES=r=>Ki(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,L0=vS(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),__=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},xH=/-(\w)/g,rA=__(r=>r.replace(xH,(e,t)=>t?t.toUpperCase():"")),SH=/\B([A-Z])/g,np=__(r=>r.replace(SH,"-$1").toLowerCase()),w_=__(r=>r.charAt(0).toUpperCase()+r.slice(1)),Dw=__(r=>r?`on${w_(r)}`:""),pv=(r,e)=>!Object.is(r,e),Qw=(r,e)=>{for(let t=0;t<r.length;t++)r[t](e)},nm=(r,e,t)=>{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value:t})},y5=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let zF;const bH=()=>zF||(zF=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let Qs;class LH{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=Qs,!e&&Qs&&(this.index=(Qs.scopes||(Qs.scopes=[])).push(this)-1)}run(e){if(this.active){const t=Qs;try{return Qs=this,e()}finally{Qs=t}}}on(){Qs=this}off(){Qs=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].stop();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0,this.active=!1}}}function FH(r,e=Qs){e&&e.active&&e.effects.push(r)}const CS=r=>{const e=new Set(r);return e.w=0,e.n=0,e},m5=r=>(r.w&du)>0,_5=r=>(r.n&du)>0,IH=({deps:r})=>{if(r.length)for(let e=0;e<r.length;e++)r[e].w|=du},RH=r=>{const{deps:e}=r;if(e.length){let t=0;for(let n=0;n<e.length;n++){const i=e[n];m5(i)&&!_5(i)?i.delete(r):e[t++]=i,i.w&=~du,i.n&=~du}e.length=t}},WC=new WeakMap;let Sd=0,du=1;const qC=30;let ds;const Eh=Symbol(""),ZC=Symbol("");class BS{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,FH(this,n)}run(){if(!this.active)return this.fn();let e=ds,t=su;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=ds,ds=this,su=!0,du=1<<++Sd,Sd<=qC?IH(this):XF(this),this.fn()}finally{Sd<=qC&&RH(this),du=1<<--Sd,ds=this.parent,su=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){ds===this?this.deferStop=!0:this.active&&(XF(this),this.onStop&&this.onStop(),this.active=!1)}}function XF(r){const{deps:e}=r;if(e.length){for(let t=0;t<e.length;t++)e[t].delete(r);e.length=0}}let su=!0;const w5=[];function ip(){w5.push(su),su=!1}function ap(){const r=w5.pop();su=r===void 0?!0:r}function To(r,e,t){if(su&&ds){let n=WC.get(r);n||WC.set(r,n=new Map);let i=n.get(t);i||n.set(t,i=CS()),E5(i)}}function E5(r,e){let t=!1;Sd<=qC?_5(r)||(r.n|=du,t=!m5(r)):t=!r.has(ds),t&&(r.add(ds),ds.deps.push(r))}function JA(r,e,t,n,i,a){const o=WC.get(r);if(!o)return;let s=[];if(e==="clear")s=[...o.values()];else if(t==="length"&&tr(r)){const A=y5(n);o.forEach((l,u)=>{(u==="length"||u>=A)&&s.push(l)})}else switch(t!==void 0&&s.push(o.get(t)),e){case"add":tr(r)?ES(t)&&s.push(o.get("length")):(s.push(o.get(Eh)),Kd(r)&&s.push(o.get(ZC)));break;case"delete":tr(r)||(s.push(o.get(Eh)),Kd(r)&&s.push(o.get(ZC)));break;case"set":Kd(r)&&s.push(o.get(Eh));break}if(s.length===1)s[0]&&JC(s[0]);else{const A=[];for(const l of s)l&&A.push(...l);JC(CS(A))}}function JC(r,e){const t=tr(r)?r:[...r];for(const n of t)n.computed&&WF(n);for(const n of t)n.computed||WF(n)}function WF(r,e){(r!==ds||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const OH=vS("__proto__,__v_isRef,__isVue"),C5=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(wS)),MH=TS(),PH=TS(!1,!0),NH=TS(!0),qF=UH();function UH(){const r={};return["includes","indexOf","lastIndexOf"].forEach(e=>{r[e]=function(...t){const n=Hr(this);for(let a=0,o=this.length;a<o;a++)To(n,"get",a+"");const i=n[e](...t);return i===-1||i===!1?n[e](...t.map(Hr)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{r[e]=function(...t){ip();const n=Hr(this)[e].apply(this,t);return ap(),n}}),r}function TS(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?JH:b5:e?S5:x5).get(n))return n;const o=tr(n);if(!r&&o&&br(qF,i))return Reflect.get(qF,i,a);const s=Reflect.get(n,i,a);return(wS(i)?C5.has(i):OH(i))||(r||To(n,"get",i),e)?s:Zi(s)?o&&ES(i)?s:s.value:ri(s)?r?L5(s):C_(s):s}}const DH=B5(),QH=B5(!0);function B5(r=!1){return function(t,n,i,a){let o=t[n];if(Hf(o)&&Zi(o)&&!Zi(i))return!1;if(!r&&(!im(i)&&!Hf(i)&&(o=Hr(o),i=Hr(i)),!tr(t)&&Zi(o)&&!Zi(i)))return o.value=i,!0;const s=tr(t)&&ES(n)?Number(n)<t.length:br(t,n),A=Reflect.set(t,n,i,a);return t===Hr(a)&&(s?pv(i,o)&&JA(t,"set",n,i):JA(t,"add",n,i)),A}}function HH(r,e){const t=br(r,e);r[e];const n=Reflect.deleteProperty(r,e);return n&&t&&JA(r,"delete",e,void 0),n}function GH(r,e){const t=Reflect.has(r,e);return(!wS(e)||!C5.has(e))&&To(r,"has",e),t}function kH(r){return To(r,"iterate",tr(r)?"length":Eh),Reflect.ownKeys(r)}const T5={get:MH,set:DH,deleteProperty:HH,has:GH,ownKeys:kH},$H={get:NH,set(r,e){return!0},deleteProperty(r,e){return!0}},VH=_a({},T5,{get:PH,set:QH}),xS=r=>r,E_=r=>Reflect.getPrototypeOf(r);function cy(r,e,t=!1,n=!1){r=r.__v_raw;const i=Hr(r),a=Hr(e);t||(e!==a&&To(i,"get",e),To(i,"get",a));const{has:o}=E_(i),s=n?xS:t?LS:dv;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 fy(r,e=!1){const t=this.__v_raw,n=Hr(t),i=Hr(r);return e||(r!==i&&To(n,"has",r),To(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function py(r,e=!1){return r=r.__v_raw,!e&&To(Hr(r),"iterate",Eh),Reflect.get(r,"size",r)}function ZF(r){r=Hr(r);const e=Hr(this);return E_(e).has.call(e,r)||(e.add(r),JA(e,"add",r,r)),this}function JF(r,e){e=Hr(e);const t=Hr(this),{has:n,get:i}=E_(t);let a=n.call(t,r);a||(r=Hr(r),a=n.call(t,r));const o=i.call(t,r);return t.set(r,e),a?pv(e,o)&&JA(t,"set",r,e):JA(t,"add",r,e),this}function tI(r){const e=Hr(this),{has:t,get:n}=E_(e);let i=t.call(e,r);i||(r=Hr(r),i=t.call(e,r)),n&&n.call(e,r);const a=e.delete(r);return i&&JA(e,"delete",r,void 0),a}function eI(){const r=Hr(this),e=r.size!==0,t=r.clear();return e&&JA(r,"clear",void 0,void 0),t}function dy(r,e){return function(n,i){const a=this,o=a.__v_raw,s=Hr(o),A=e?xS:r?LS:dv;return!r&&To(s,"iterate",Eh),o.forEach((l,u)=>n.call(i,A(l),A(u),a))}}function vy(r,e,t){return function(...n){const i=this.__v_raw,a=Hr(i),o=Kd(a),s=r==="entries"||r===Symbol.iterator&&o,A=r==="keys"&&o,l=i[r](...n),u=t?xS:e?LS:dv;return!e&&To(a,"iterate",A?ZC:Eh),{next(){const{value:h,done:c}=l.next();return c?{value:h,done:c}:{value:s?[u(h[0]),u(h[1])]:u(h),done:c}},[Symbol.iterator](){return this}}}}function Ml(r){return function(...e){return r==="delete"?!1:this}}function jH(){const r={get(a){return cy(this,a)},get size(){return py(this)},has:fy,add:ZF,set:JF,delete:tI,clear:eI,forEach:dy(!1,!1)},e={get(a){return cy(this,a,!1,!0)},get size(){return py(this)},has:fy,add:ZF,set:JF,delete:tI,clear:eI,forEach:dy(!1,!0)},t={get(a){return cy(this,a,!0)},get size(){return py(this,!0)},has(a){return fy.call(this,a,!0)},add:Ml("add"),set:Ml("set"),delete:Ml("delete"),clear:Ml("clear"),forEach:dy(!0,!1)},n={get(a){return cy(this,a,!0,!0)},get size(){return py(this,!0)},has(a){return fy.call(this,a,!0)},add:Ml("add"),set:Ml("set"),delete:Ml("delete"),clear:Ml("clear"),forEach:dy(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=vy(a,!1,!1),t[a]=vy(a,!0,!1),e[a]=vy(a,!1,!0),n[a]=vy(a,!0,!0)}),[r,t,e,n]}const[KH,YH,zH,XH]=jH();function SS(r,e){const t=e?r?XH:zH:r?YH:KH;return(n,i,a)=>i==="__v_isReactive"?!r:i==="__v_isReadonly"?r:i==="__v_raw"?n:Reflect.get(br(t,i)&&i in n?t:n,i,a)}const WH={get:SS(!1,!1)},qH={get:SS(!1,!0)},ZH={get:SS(!0,!1)},x5=new WeakMap,S5=new WeakMap,b5=new WeakMap,JH=new WeakMap;function tG(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function eG(r){return r.__v_skip||!Object.isExtensible(r)?0:tG(BH(r))}function C_(r){return Hf(r)?r:bS(r,!1,T5,WH,x5)}function rG(r){return bS(r,!1,VH,qH,S5)}function L5(r){return bS(r,!0,$H,ZH,b5)}function bS(r,e,t,n,i){if(!ri(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const a=i.get(r);if(a)return a;const o=eG(r);if(o===0)return r;const s=new Proxy(r,o===2?n:t);return i.set(r,s),s}function Tf(r){return Hf(r)?Tf(r.__v_raw):!!(r&&r.__v_isReactive)}function Hf(r){return!!(r&&r.__v_isReadonly)}function im(r){return!!(r&&r.__v_isShallow)}function F5(r){return Tf(r)||Hf(r)}function Hr(r){const e=r&&r.__v_raw;return e?Hr(e):r}function I5(r){return nm(r,"__v_skip",!0),r}const dv=r=>ri(r)?C_(r):r,LS=r=>ri(r)?L5(r):r;function R5(r){su&&ds&&(r=Hr(r),E5(r.dep||(r.dep=CS())))}function O5(r,e){r=Hr(r),r.dep&&JC(r.dep)}function Zi(r){return!!(r&&r.__v_isRef===!0)}function Gi(r){return nG(r,!1)}function nG(r,e){return Zi(r)?r:new iG(r,e)}class iG{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Hr(e),this._value=t?e:dv(e)}get value(){return R5(this),this._value}set value(e){const t=this.__v_isShallow||im(e)||Hf(e);e=t?e:Hr(e),pv(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:dv(e),O5(this))}}function aG(r){return Zi(r)?r.value:r}const oG={get:(r,e,t)=>aG(Reflect.get(r,e,t)),set:(r,e,t,n)=>{const i=r[e];return Zi(i)&&!Zi(t)?(i.value=t,!0):Reflect.set(r,e,t,n)}};function M5(r){return Tf(r)?r:new Proxy(r,oG)}function Ph(r){const e=tr(r)?new Array(r.length):{};for(const t in r)e[t]=AG(r,t);return e}class sG{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 AG(r,e,t){const n=r[e];return Zi(n)?n:new sG(r,e,t)}var P5;class lG{constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[P5]=!1,this._dirty=!0,this.effect=new BS(e,()=>{this._dirty||(this._dirty=!0,O5(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Hr(this);return R5(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}P5="__v_isReadonly";function uG(r,e,t=!1){let n,i;const a=hr(r);return a?(n=r,i=ms):(n=r.get,i=r.set),new lG(n,i,a||!i,t)}function Au(r,e,t,n){let i;try{i=n?r(...n):r()}catch(a){B_(a,e,t)}return i}function Vo(r,e,t,n){if(hr(r)){const a=Au(r,e,t,n);return a&&g5(a)&&a.catch(o=>{B_(o,e,t)}),a}const i=[];for(let a=0;a<r.length;a++)i.push(Vo(r[a],e,t,n));return i}function B_(r,e,t,n=!0){const i=e?e.vnode:null;if(e){let a=e.parent;const o=e.proxy,s=t;for(;a;){const l=a.ec;if(l){for(let u=0;u<l.length;u++)if(l[u](r,o,s)===!1)return}a=a.parent}const A=e.appContext.config.errorHandler;if(A){Au(A,null,10,[r,o,s]);return}}hG(r,t,i,n)}function hG(r,e,t,n=!0){console.error(r)}let vv=!1,tB=!1;const va=[];let $s=0;const xf=[];let QA=null,uh=0;const N5=Promise.resolve();let FS=null;function cG(r){const e=FS||N5;return r?e.then(this?r.bind(this):r):e}function fG(r){let e=$s+1,t=va.length;for(;e<t;){const n=e+t>>>1;gv(va[n])<r?e=n+1:t=n}return e}function IS(r){(!va.length||!va.includes(r,vv&&r.allowRecurse?$s+1:$s))&&(r.id==null?va.push(r):va.splice(fG(r.id),0,r),U5())}function U5(){!vv&&!tB&&(tB=!0,FS=N5.then(Q5))}function pG(r){const e=va.indexOf(r);e>$s&&va.splice(e,1)}function dG(r){tr(r)?xf.push(...r):(!QA||!QA.includes(r,r.allowRecurse?uh+1:uh))&&xf.push(r),U5()}function rI(r,e=vv?$s+1:0){for(;e<va.length;e++){const t=va[e];t&&t.pre&&(va.splice(e,1),e--,t())}}function D5(r){if(xf.length){const e=[...new Set(xf)];if(xf.length=0,QA){QA.push(...e);return}for(QA=e,QA.sort((t,n)=>gv(t)-gv(n)),uh=0;uh<QA.length;uh++)QA[uh]();QA=null,uh=0}}const gv=r=>r.id==null?1/0:r.id,vG=(r,e)=>{const t=gv(r)-gv(e);if(t===0){if(r.pre&&!e.pre)return-1;if(e.pre&&!r.pre)return 1}return t};function Q5(r){tB=!1,vv=!0,va.sort(vG);const e=ms;try{for($s=0;$s<va.length;$s++){const t=va[$s];t&&t.active!==!1&&Au(t,null,14)}}finally{$s=0,va.length=0,D5(),vv=!1,FS=null,(va.length||xf.length)&&Q5()}}function gG(r,e,...t){if(r.isUnmounted)return;const n=r.vnode.props||xn;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:h,trim:c}=n[u]||xn;c&&(i=t.map(f=>Ki(f)?f.trim():f)),h&&(i=t.map(y5))}let s,A=n[s=Dw(e)]||n[s=Dw(rA(e))];!A&&a&&(A=n[s=Dw(np(e))]),A&&Vo(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,Vo(l,r,6,i)}}function H5(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(!hr(r)){const A=l=>{const u=H5(l,e,!0);u&&(s=!0,_a(o,u))};!t&&e.mixins.length&&e.mixins.forEach(A),r.extends&&A(r.extends),r.mixins&&r.mixins.forEach(A)}return!a&&!s?(ri(r)&&n.set(r,null),null):(tr(a)?a.forEach(A=>o[A]=null):_a(o,a),ri(r)&&n.set(r,o),o)}function T_(r,e){return!r||!y_(e)?!1:(e=e.slice(2).replace(/Once$/,""),br(r,e[0].toLowerCase()+e.slice(1))||br(r,np(e))||br(r,e))}let ya=null,G5=null;function am(r){const e=ya;return ya=r,G5=r&&r.type.__scopeId||null,e}function $l(r,e=ya,t){if(!e||r._n)return r;const n=(...i)=>{n._d&&cI(-1);const a=am(e);let o;try{o=r(...i)}finally{am(a),n._d&&cI(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Hw(r){const{type:e,vnode:t,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:A,emit:l,render:u,renderCache:h,data:c,setupState:f,ctx:d,inheritAttrs:v}=r;let y,m;const w=am(r);try{if(t.shapeFlag&4){const B=i||n;y=ks(u.call(B,B,h,a,f,c,d)),m=A}else{const B=e;y=ks(B.length>1?B(a,{attrs:A,slots:s,emit:l}):B(a,null)),m=e.props?A:yG(A)}}catch(B){Xd.length=0,B_(B,r,1),y=ci(jo)}let C=y;if(m&&v!==!1){const B=Object.keys(m),{shapeFlag:R}=C;B.length&&R&7&&(o&&B.some(mS)&&(m=mG(m,o)),C=vu(C,m))}return t.dirs&&(C=vu(C),C.dirs=C.dirs?C.dirs.concat(t.dirs):t.dirs),t.transition&&(C.transition=t.transition),y=C,am(w),y}const yG=r=>{let e;for(const t in r)(t==="class"||t==="style"||y_(t))&&((e||(e={}))[t]=r[t]);return e},mG=(r,e)=>{const t={};for(const n in r)(!mS(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function _G(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?nI(n,o,l):!!o;if(A&8){const u=e.dynamicProps;for(let h=0;h<u.length;h++){const c=u[h];if(o[c]!==n[c]&&!T_(l,c))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:n===o?!1:n?o?nI(n,o,l):!0:!!o;return!1}function nI(r,e,t){const n=Object.keys(e);if(n.length!==Object.keys(r).length)return!0;for(let i=0;i<n.length;i++){const a=n[i];if(e[a]!==r[a]&&!T_(t,a))return!0}return!1}function wG({vnode:r,parent:e},t){for(;e&&e.subTree===r;)(r=e.vnode).el=t,e=e.parent}const EG=r=>r.__isSuspense;function CG(r,e){e&&e.pendingBranch?tr(r)?e.effects.push(...r):e.effects.push(r):dG(r)}function Gr(r,e){if(Vi){let t=Vi.provides;const n=Vi.parent&&Vi.parent.provides;n===t&&(t=Vi.provides=Object.create(n)),t[r]=e}}function Ce(r,e,t=!1){const n=Vi||ya;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&&hr(e)?e.call(n.proxy):e}}function BG(r,e){return RS(r,null,e)}const gy={};function ce(r,e,t){return RS(r,e,t)}function RS(r,e,{immediate:t,deep:n,flush:i,onTrack:a,onTrigger:o}=xn){const s=Vi;let A,l=!1,u=!1;if(Zi(r)?(A=()=>r.value,l=im(r)):Tf(r)?(A=()=>r,n=!0):tr(r)?(u=!0,l=r.some(C=>Tf(C)||im(C)),A=()=>r.map(C=>{if(Zi(C))return C.value;if(Tf(C))return hf(C);if(hr(C))return Au(C,s,2)})):hr(r)?e?A=()=>Au(r,s,2):A=()=>{if(!(s&&s.isUnmounted))return h&&h(),Vo(r,s,3,[c])}:A=ms,e&&n){const C=A;A=()=>hf(C())}let h,c=C=>{h=m.onStop=()=>{Au(C,s,4)}},f;if(_v)if(c=ms,e?t&&Vo(e,s,3,[A(),u?[]:void 0,c]):A(),i==="sync"){const C=wk();f=C.__watcherHandles||(C.__watcherHandles=[])}else return ms;let d=u?new Array(r.length).fill(gy):gy;const v=()=>{if(m.active)if(e){const C=m.run();(n||l||(u?C.some((B,R)=>pv(B,d[R])):pv(C,d)))&&(h&&h(),Vo(e,s,3,[C,d===gy?void 0:u&&d[0]===gy?[]:d,c]),d=C)}else m.run()};v.allowRecurse=!!e;let y;i==="sync"?y=v:i==="post"?y=()=>qa(v,s&&s.suspense):(v.pre=!0,s&&(v.id=s.uid),y=()=>IS(v));const m=new BS(A,y);e?t?v():d=m.run():i==="post"?qa(m.run.bind(m),s&&s.suspense):m.run();const w=()=>{m.stop(),s&&s.scope&&_S(s.scope.effects,m)};return f&&f.push(w),w}function TG(r,e,t){const n=this.proxy,i=Ki(r)?r.includes(".")?k5(n,r):()=>n[r]:r.bind(n,n);let a;hr(e)?a=e:(a=e.handler,t=e);const o=Vi;Gf(this);const s=RS(i,a.bind(n),t);return o?Gf(o):Ch(),s}function k5(r,e){const t=e.split(".");return()=>{let n=r;for(let i=0;i<t.length&&n;i++)n=n[t[i]];return n}}function hf(r,e){if(!ri(r)||r.__v_skip||(e=e||new Set,e.has(r)))return r;if(e.add(r),Zi(r))hf(r.value,e);else if(tr(r))for(let t=0;t<r.length;t++)hf(r[t],e);else if(EH(r)||Kd(r))r.forEach(t=>{hf(t,e)});else if(TH(r))for(const t in r)hf(r[t],e);return r}function xG(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return ir(()=>{r.isMounted=!0}),K5(()=>{r.isUnmounting=!0}),r}const Po=[Function,Array],SG={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Po,onEnter:Po,onAfterEnter:Po,onEnterCancelled:Po,onBeforeLeave:Po,onLeave:Po,onAfterLeave:Po,onLeaveCancelled:Po,onBeforeAppear:Po,onAppear:Po,onAfterAppear:Po,onAppearCancelled:Po},setup(r,{slots:e}){const t=fk(),n=xG();let i;return()=>{const a=e.default&&V5(e.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const v of a)if(v.type!==jo){o=v;break}}const s=Hr(r),{mode:A}=s;if(n.isLeaving)return Gw(o);const l=iI(o);if(!l)return Gw(o);const u=eB(l,s,n,t);rB(l,u);const h=t.subTree,c=h&&iI(h);let f=!1;const{getTransitionKey:d}=l.type;if(d){const v=d();i===void 0?i=v:v!==i&&(i=v,f=!0)}if(c&&c.type!==jo&&(!hh(l,c)||f)){const v=eB(c,s,n,t);if(rB(c,v),A==="out-in")return n.isLeaving=!0,v.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},Gw(o);A==="in-out"&&l.type!==jo&&(v.delayLeave=(y,m,w)=>{const C=$5(n,c);C[String(c.key)]=c,y._leaveCb=()=>{m(),y._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=w})}return o}}},bG=SG;function $5(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 eB(r,e,t,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:A,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:h,onLeave:c,onAfterLeave:f,onLeaveCancelled:d,onBeforeAppear:v,onAppear:y,onAfterAppear:m,onAppearCancelled:w}=e,C=String(r.key),B=$5(t,r),R=(T,L)=>{T&&Vo(T,n,9,L)},O=(T,L)=>{const P=L[1];R(T,L),tr(T)?T.every(S=>S.length<=1)&&P():T.length<=1&&P()},I={mode:a,persisted:o,beforeEnter(T){let L=s;if(!t.isMounted)if(i)L=v||s;else return;T._leaveCb&&T._leaveCb(!0);const P=B[C];P&&hh(r,P)&&P.el._leaveCb&&P.el._leaveCb(),R(L,[T])},enter(T){let L=A,P=l,S=u;if(!t.isMounted)if(i)L=y||A,P=m||l,S=w||u;else return;let x=!1;const M=T._enterCb=D=>{x||(x=!0,D?R(S,[T]):R(P,[T]),I.delayedLeave&&I.delayedLeave(),T._enterCb=void 0)};L?O(L,[T,M]):M()},leave(T,L){const P=String(r.key);if(T._enterCb&&T._enterCb(!0),t.isUnmounting)return L();R(h,[T]);let S=!1;const x=T._leaveCb=M=>{S||(S=!0,L(),M?R(d,[T]):R(f,[T]),T._leaveCb=void 0,B[P]===r&&delete B[P])};B[P]=r,c?O(c,[T,x]):x()},clone(T){return eB(T,e,t,n)}};return I}function Gw(r){if(x_(r))return r=vu(r),r.children=null,r}function iI(r){return x_(r)?r.children?r.children[0]:void 0:r}function rB(r,e){r.shapeFlag&6&&r.component?rB(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 V5(r,e=!1,t){let n=[],i=0;for(let a=0;a<r.length;a++){let o=r[a];const s=t==null?o.key:String(t)+String(o.key!=null?o.key:a);o.type===_o?(o.patchFlag&128&&i++,n=n.concat(V5(o.children,e,s))):(e||o.type!==jo)&&n.push(s!=null?vu(o,{key:s}):o)}if(i>1)for(let a=0;a<n.length;a++)n[a].patchFlag=-2;return n}const Yd=r=>!!r.type.__asyncLoader,x_=r=>r.type.__isKeepAlive;function LG(r,e){j5(r,"a",e)}function FG(r,e){j5(r,"da",e)}function j5(r,e,t=Vi){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if(S_(e,n,t),t){let i=t.parent;for(;i&&i.parent;)x_(i.parent.vnode)&&IG(n,e,t,i),i=i.parent}}function IG(r,e,t,n){const i=S_(e,r,n,!0);Ar(()=>{_S(n[e],i)},t)}function S_(r,e,t=Vi,n=!1){if(t){const i=t[r]||(t[r]=[]),a=e.__weh||(e.__weh=(...o)=>{if(t.isUnmounted)return;ip(),Gf(t);const s=Vo(e,t,r,o);return Ch(),ap(),s});return n?i.unshift(a):i.push(a),a}}const Al=r=>(e,t=Vi)=>(!_v||r==="sp")&&S_(r,(...n)=>e(...n),t),RG=Al("bm"),ir=Al("m"),OG=Al("bu"),MG=Al("u"),K5=Al("bum"),Ar=Al("um"),PG=Al("sp"),NG=Al("rtg"),UG=Al("rtc");function DG(r,e=Vi){S_("ec",r,e)}function Yu(r,e,t,n){const i=r.dirs,a=e&&e.dirs;for(let o=0;o<i.length;o++){const s=i[o];a&&(s.oldValue=a[o].value);let A=s.dir[n];A&&(ip(),Vo(A,t,8,[r.el,s,r,e]),ap())}}const Y5="components";function No(r,e){return HG(Y5,r,!0,e)||r}const QG=Symbol();function HG(r,e,t=!0,n=!1){const i=ya||Vi;if(i){const a=i.type;if(r===Y5){const s=yk(a,!1);if(s&&(s===e||s===rA(e)||s===w_(rA(e))))return a}const o=aI(i[r]||a[r],e)||aI(i.appContext[r],e);return!o&&n?a:o}}function aI(r,e){return r&&(r[e]||r[rA(e)]||r[w_(rA(e))])}function GG(r,e,t,n){let i;const a=t&&t[n];if(tr(r)||Ki(r)){i=new Array(r.length);for(let o=0,s=r.length;o<s;o++)i[o]=e(r[o],o,void 0,a&&a[o])}else if(typeof r=="number"){i=new Array(r);for(let o=0;o<r;o++)i[o]=e(o+1,o,void 0,a&&a[o])}else if(ri(r))if(r[Symbol.iterator])i=Array.from(r,(o,s)=>e(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<A;s++){const l=o[s];i[s]=e(r[l],l,s,a&&a[s])}}else i=[];return t&&(t[n]=i),i}function wr(r,e,t={},n,i){if(ya.isCE||ya.parent&&Yd(ya.parent)&&ya.parent.isCE)return e!=="default"&&(t.name=e),ci("slot",t,n&&n());let a=r[e];a&&a._c&&(a._d=!1),Sn();const o=a&&z5(a(t)),s=mv(_o,{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 z5(r){return r.some(e=>i2(e)?!(e.type===jo||e.type===_o&&!z5(e.children)):!0)?r:null}const nB=r=>r?s2(r)?NS(r)||r.proxy:nB(r.parent):null,zd=_a(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=>nB(r.parent),$root:r=>nB(r.root),$emit:r=>r.emit,$options:r=>OS(r),$forceUpdate:r=>r.f||(r.f=()=>IS(r.update)),$nextTick:r=>r.n||(r.n=cG.bind(r.proxy)),$watch:r=>TG.bind(r)}),kw=(r,e)=>r!==xn&&!r.__isScriptSetup&&br(r,e),kG={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(kw(n,e))return o[e]=1,n[e];if(i!==xn&&br(i,e))return o[e]=2,i[e];if((l=r.propsOptions[0])&&br(l,e))return o[e]=3,a[e];if(t!==xn&&br(t,e))return o[e]=4,t[e];iB&&(o[e]=0)}}const u=zd[e];let h,c;if(u)return e==="$attrs"&&To(r,"get",e),u(r);if((h=s.__cssModules)&&(h=h[e]))return h;if(t!==xn&&br(t,e))return o[e]=4,t[e];if(c=A.config.globalProperties,br(c,e))return c[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:a}=r;return kw(i,e)?(i[e]=t,!0):n!==xn&&br(n,e)?(n[e]=t,!0):br(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!==xn&&br(r,o)||kw(e,o)||(s=a[0])&&br(s,o)||br(n,o)||br(zd,o)||br(i.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:br(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}};let iB=!0;function $G(r){const e=OS(r),t=r.proxy,n=r.ctx;iB=!1,e.beforeCreate&&oI(e.beforeCreate,r,"bc");const{data:i,computed:a,methods:o,watch:s,provide:A,inject:l,created:u,beforeMount:h,mounted:c,beforeUpdate:f,updated:d,activated:v,deactivated:y,beforeDestroy:m,beforeUnmount:w,destroyed:C,unmounted:B,render:R,renderTracked:O,renderTriggered:I,errorCaptured:T,serverPrefetch:L,expose:P,inheritAttrs:S,components:x,directives:M,filters:D}=e;if(l&&VG(l,n,null,r.appContext.config.unwrapInjectedRef),o)for(const tt in o){const q=o[tt];hr(q)&&(n[tt]=q.bind(t))}if(i){const tt=i.call(t,t);ri(tt)&&(r.data=C_(tt))}if(iB=!0,a)for(const tt in a){const q=a[tt],rt=hr(q)?q.bind(t,t):hr(q.get)?q.get.bind(t,t):ms,nt=!hr(q)&&hr(q.set)?q.set.bind(t):ms,_t=pr({get:rt,set:nt});Object.defineProperty(n,tt,{enumerable:!0,configurable:!0,get:()=>_t.value,set:F=>_t.value=F})}if(s)for(const tt in s)X5(s[tt],n,t,tt);if(A){const tt=hr(A)?A.call(t):A;Reflect.ownKeys(tt).forEach(q=>{Gr(q,tt[q])})}u&&oI(u,r,"c");function z(tt,q){tr(q)?q.forEach(rt=>tt(rt.bind(t))):q&&tt(q.bind(t))}if(z(RG,h),z(ir,c),z(OG,f),z(MG,d),z(LG,v),z(FG,y),z(DG,T),z(UG,O),z(NG,I),z(K5,w),z(Ar,B),z(PG,L),tr(P))if(P.length){const tt=r.exposed||(r.exposed={});P.forEach(q=>{Object.defineProperty(tt,q,{get:()=>t[q],set:rt=>t[q]=rt})})}else r.exposed||(r.exposed={});R&&r.render===ms&&(r.render=R),S!=null&&(r.inheritAttrs=S),x&&(r.components=x),M&&(r.directives=M)}function VG(r,e,t=ms,n=!1){tr(r)&&(r=aB(r));for(const i in r){const a=r[i];let o;ri(a)?"default"in a?o=Ce(a.from||i,a.default,!0):o=Ce(a.from||i):o=Ce(a),Zi(o)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):e[i]=o}}function oI(r,e,t){Vo(tr(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function X5(r,e,t,n){const i=n.includes(".")?k5(t,n):()=>t[n];if(Ki(r)){const a=e[r];hr(a)&&ce(i,a)}else if(hr(r))ce(i,r.bind(t));else if(ri(r))if(tr(r))r.forEach(a=>X5(a,e,t,n));else{const a=hr(r.handler)?r.handler.bind(t):e[r.handler];hr(a)&&ce(i,a,r)}}function OS(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=>om(A,l,o,!0)),om(A,e,o)),ri(e)&&a.set(e,A),A}function om(r,e,t,n=!1){const{mixins:i,extends:a}=e;a&&om(r,a,t,!0),i&&i.forEach(o=>om(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const s=jG[o]||t&&t[o];r[o]=s?s(r[o],e[o]):e[o]}return r}const jG={data:sI,props:oh,emits:oh,methods:oh,computed:oh,beforeCreate:ba,created:ba,beforeMount:ba,mounted:ba,beforeUpdate:ba,updated:ba,beforeDestroy:ba,beforeUnmount:ba,destroyed:ba,unmounted:ba,activated:ba,deactivated:ba,errorCaptured:ba,serverPrefetch:ba,components:oh,directives:oh,watch:YG,provide:sI,inject:KG};function sI(r,e){return e?r?function(){return _a(hr(r)?r.call(this,this):r,hr(e)?e.call(this,this):e)}:e:r}function KG(r,e){return oh(aB(r),aB(e))}function aB(r){if(tr(r)){const e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return r}function ba(r,e){return r?[...new Set([].concat(r,e))]:e}function oh(r,e){return r?_a(_a(Object.create(null),r),e):e}function YG(r,e){if(!r)return e;if(!e)return r;const t=_a(Object.create(null),r);for(const n in e)t[n]=ba(r[n],e[n]);return t}function zG(r,e,t,n=!1){const i={},a={};nm(a,L_,1),r.propsDefaults=Object.create(null),W5(r,e,i,a);for(const o in r.propsOptions[0])o in i||(i[o]=void 0);t?r.props=n?i:rG(i):r.type.props?r.props=i:r.props=a,r.attrs=a}function XG(r,e,t,n){const{props:i,attrs:a,vnode:{patchFlag:o}}=r,s=Hr(i),[A]=r.propsOptions;let l=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=r.vnode.dynamicProps;for(let h=0;h<u.length;h++){let c=u[h];if(T_(r.emitsOptions,c))continue;const f=e[c];if(A)if(br(a,c))f!==a[c]&&(a[c]=f,l=!0);else{const d=rA(c);i[d]=oB(A,s,d,f,r,!1)}else f!==a[c]&&(a[c]=f,l=!0)}}}else{W5(r,e,i,a)&&(l=!0);let u;for(const h in s)(!e||!br(e,h)&&((u=np(h))===h||!br(e,u)))&&(A?t&&(t[h]!==void 0||t[u]!==void 0)&&(i[h]=oB(A,s,h,void 0,r,!0)):delete i[h]);if(a!==s)for(const h in a)(!e||!br(e,h))&&(delete a[h],l=!0)}l&&JA(r,"set","$attrs")}function W5(r,e,t,n){const[i,a]=r.propsOptions;let o=!1,s;if(e)for(let A in e){if(L0(A))continue;const l=e[A];let u;i&&br(i,u=rA(A))?!a||!a.includes(u)?t[u]=l:(s||(s={}))[u]=l:T_(r.emitsOptions,A)||(!(A in n)||l!==n[A])&&(n[A]=l,o=!0)}if(a){const A=Hr(t),l=s||xn;for(let u=0;u<a.length;u++){const h=a[u];t[h]=oB(i,A,h,l[h],r,!br(l,h))}}return o}function oB(r,e,t,n,i,a){const o=r[t];if(o!=null){const s=br(o,"default");if(s&&n===void 0){const A=o.default;if(o.type!==Function&&hr(A)){const{propsDefaults:l}=i;t in l?n=l[t]:(Gf(i),n=l[t]=A.call(null,e),Ch())}else n=A}o[0]&&(a&&!s?n=!1:o[1]&&(n===""||n===np(t))&&(n=!0))}return n}function q5(r,e,t=!1){const n=e.propsCache,i=n.get(r);if(i)return i;const a=r.props,o={},s=[];let A=!1;if(!hr(r)){const u=h=>{A=!0;const[c,f]=q5(h,e,!0);_a(o,c),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 ri(r)&&n.set(r,Bf),Bf;if(tr(a))for(let u=0;u<a.length;u++){const h=rA(a[u]);AI(h)&&(o[h]=xn)}else if(a)for(const u in a){const h=rA(u);if(AI(h)){const c=a[u],f=o[h]=tr(c)||hr(c)?{type:c}:Object.assign({},c);if(f){const d=hI(Boolean,f.type),v=hI(String,f.type);f[0]=d>-1,f[1]=v<0||d<v,(d>-1||br(f,"default"))&&s.push(h)}}}const l=[o,s];return ri(r)&&n.set(r,l),l}function AI(r){return r[0]!=="$"}function lI(r){const e=r&&r.toString().match(/^\s*function (\w+)/);return e?e[1]:r===null?"null":""}function uI(r,e){return lI(r)===lI(e)}function hI(r,e){return tr(e)?e.findIndex(t=>uI(t,r)):hr(e)&&uI(e,r)?0:-1}const Z5=r=>r[0]==="_"||r==="$stable",MS=r=>tr(r)?r.map(ks):[ks(r)],WG=(r,e,t)=>{if(e._n)return e;const n=$l((...i)=>MS(e(...i)),t);return n._c=!1,n},J5=(r,e,t)=>{const n=r._ctx;for(const i in r){if(Z5(i))continue;const a=r[i];if(hr(a))e[i]=WG(i,a,n);else if(a!=null){const o=MS(a);e[i]=()=>o}}},t2=(r,e)=>{const t=MS(e);r.slots.default=()=>t},qG=(r,e)=>{if(r.vnode.shapeFlag&32){const t=e._;t?(r.slots=Hr(e),nm(e,"_",t)):J5(e,r.slots={})}else r.slots={},e&&t2(r,e);nm(r.slots,L_,1)},ZG=(r,e,t)=>{const{vnode:n,slots:i}=r;let a=!0,o=xn;if(n.shapeFlag&32){const s=e._;s?t&&s===1?a=!1:(_a(i,e),!t&&s===1&&delete i._):(a=!e.$stable,J5(e,i)),o=e}else e&&(t2(r,e),o={default:1});if(a)for(const s in i)!Z5(s)&&!(s in o)&&delete i[s]};function e2(){return{app:null,config:{isNativeTag:mH,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 JG=0;function tk(r,e){return function(n,i=null){hr(n)||(n=Object.assign({},n)),i!=null&&!ri(i)&&(i=null);const a=e2(),o=new Set;let s=!1;const A=a.app={_uid:JG++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:Ek,get config(){return a.config},set config(l){},use(l,...u){return o.has(l)||(l&&hr(l.install)?(o.add(l),l.install(A,...u)):hr(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,h){if(!s){const c=ci(n,i);return c.appContext=a,u&&e?e(c,l):r(c,l,h),s=!0,A._container=l,l.__vue_app__=A,NS(c.component)||c.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 sB(r,e,t,n,i=!1){if(tr(r)){r.forEach((c,f)=>sB(c,e&&(tr(e)?e[f]:e),t,n,i));return}if(Yd(n)&&!i)return;const a=n.shapeFlag&4?NS(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:A}=r,l=e&&e.r,u=s.refs===xn?s.refs={}:s.refs,h=s.setupState;if(l!=null&&l!==A&&(Ki(l)?(u[l]=null,br(h,l)&&(h[l]=null)):Zi(l)&&(l.value=null)),hr(A))Au(A,s,12,[o,u]);else{const c=Ki(A),f=Zi(A);if(c||f){const d=()=>{if(r.f){const v=c?br(h,A)?h[A]:u[A]:A.value;i?tr(v)&&_S(v,a):tr(v)?v.includes(a)||v.push(a):c?(u[A]=[a],br(h,A)&&(h[A]=u[A])):(A.value=[a],r.k&&(u[r.k]=A.value))}else c?(u[A]=o,br(h,A)&&(h[A]=o)):f&&(A.value=o,r.k&&(u[r.k]=o))};o?(d.id=-1,qa(d,t)):d()}}}const qa=CG;function ek(r){return rk(r)}function rk(r,e){const t=bH();t.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:s,createComment:A,setText:l,setElementText:u,parentNode:h,nextSibling:c,setScopeId:f=ms,insertStaticContent:d}=r,v=(K,Z,pt,et=null,G=null,bt=null,St=!1,dt=null,Et=!!Z.dynamicChildren)=>{if(K===Z)return;K&&!hh(K,Z)&&(et=gt(K),F(K,G,bt,!0),K=null),Z.patchFlag===-2&&(Et=!1,Z.dynamicChildren=null);const{type:yt,ref:xt,shapeFlag:Lt}=Z;switch(yt){case b_:y(K,Z,pt,et);break;case jo:m(K,Z,pt,et);break;case $w:K==null&&w(Z,pt,et,St);break;case _o:x(K,Z,pt,et,G,bt,St,dt,Et);break;default:Lt&1?R(K,Z,pt,et,G,bt,St,dt,Et):Lt&6?M(K,Z,pt,et,G,bt,St,dt,Et):(Lt&64||Lt&128)&&yt.process(K,Z,pt,et,G,bt,St,dt,Et,at)}xt!=null&&G&&sB(xt,K&&K.ref,bt,Z||K,!Z)},y=(K,Z,pt,et)=>{if(K==null)n(Z.el=s(Z.children),pt,et);else{const G=Z.el=K.el;Z.children!==K.children&&l(G,Z.children)}},m=(K,Z,pt,et)=>{K==null?n(Z.el=A(Z.children||""),pt,et):Z.el=K.el},w=(K,Z,pt,et)=>{[K.el,K.anchor]=d(K.children,Z,pt,et,K.el,K.anchor)},C=({el:K,anchor:Z},pt,et)=>{let G;for(;K&&K!==Z;)G=c(K),n(K,pt,et),K=G;n(Z,pt,et)},B=({el:K,anchor:Z})=>{let pt;for(;K&&K!==Z;)pt=c(K),i(K),K=pt;i(Z)},R=(K,Z,pt,et,G,bt,St,dt,Et)=>{St=St||Z.type==="svg",K==null?O(Z,pt,et,G,bt,St,dt,Et):L(K,Z,G,bt,St,dt,Et)},O=(K,Z,pt,et,G,bt,St,dt)=>{let Et,yt;const{type:xt,props:Lt,shapeFlag:Rt,transition:Vt,dirs:zt}=K;if(Et=K.el=o(K.type,bt,Lt&&Lt.is,Lt),Rt&8?u(Et,K.children):Rt&16&&T(K.children,Et,null,et,G,bt&&xt!=="foreignObject",St,dt),zt&&Yu(K,null,et,"created"),Lt){for(const ee in Lt)ee!=="value"&&!L0(ee)&&a(Et,ee,null,Lt[ee],bt,K.children,et,G,it);"value"in Lt&&a(Et,"value",null,Lt.value),(yt=Lt.onVnodeBeforeMount)&&Ps(yt,et,K)}I(Et,K,K.scopeId,St,et),zt&&Yu(K,null,et,"beforeMount");const ie=(!G||G&&!G.pendingBranch)&&Vt&&!Vt.persisted;ie&&Vt.beforeEnter(Et),n(Et,Z,pt),((yt=Lt&&Lt.onVnodeMounted)||ie||zt)&&qa(()=>{yt&&Ps(yt,et,K),ie&&Vt.enter(Et),zt&&Yu(K,null,et,"mounted")},G)},I=(K,Z,pt,et,G)=>{if(pt&&f(K,pt),et)for(let bt=0;bt<et.length;bt++)f(K,et[bt]);if(G){let bt=G.subTree;if(Z===bt){const St=G.vnode;I(K,St,St.scopeId,St.slotScopeIds,G.parent)}}},T=(K,Z,pt,et,G,bt,St,dt,Et=0)=>{for(let yt=Et;yt<K.length;yt++){const xt=K[yt]=dt?Yl(K[yt]):ks(K[yt]);v(null,xt,Z,pt,et,G,bt,St,dt)}},L=(K,Z,pt,et,G,bt,St)=>{const dt=Z.el=K.el;let{patchFlag:Et,dynamicChildren:yt,dirs:xt}=Z;Et|=K.patchFlag&16;const Lt=K.props||xn,Rt=Z.props||xn;let Vt;pt&&zu(pt,!1),(Vt=Rt.onVnodeBeforeUpdate)&&Ps(Vt,pt,Z,K),xt&&Yu(Z,K,pt,"beforeUpdate"),pt&&zu(pt,!0);const zt=G&&Z.type!=="foreignObject";if(yt?P(K.dynamicChildren,yt,dt,pt,et,zt,bt):St||q(K,Z,dt,null,pt,et,zt,bt,!1),Et>0){if(Et&16)S(dt,Z,Lt,Rt,pt,et,G);else if(Et&2&&Lt.class!==Rt.class&&a(dt,"class",null,Rt.class,G),Et&4&&a(dt,"style",Lt.style,Rt.style,G),Et&8){const ie=Z.dynamicProps;for(let ee=0;ee<ie.length;ee++){const Xt=ie[ee],oe=Lt[Xt],Kt=Rt[Xt];(Kt!==oe||Xt==="value")&&a(dt,Xt,oe,Kt,G,K.children,pt,et,it)}}Et&1&&K.children!==Z.children&&u(dt,Z.children)}else!St&&yt==null&&S(dt,Z,Lt,Rt,pt,et,G);((Vt=Rt.onVnodeUpdated)||xt)&&qa(()=>{Vt&&Ps(Vt,pt,Z,K),xt&&Yu(Z,K,pt,"updated")},et)},P=(K,Z,pt,et,G,bt,St)=>{for(let dt=0;dt<Z.length;dt++){const Et=K[dt],yt=Z[dt],xt=Et.el&&(Et.type===_o||!hh(Et,yt)||Et.shapeFlag&70)?h(Et.el):pt;v(Et,yt,xt,null,et,G,bt,St,!0)}},S=(K,Z,pt,et,G,bt,St)=>{if(pt!==et){if(pt!==xn)for(const dt in pt)!L0(dt)&&!(dt in et)&&a(K,dt,pt[dt],null,St,Z.children,G,bt,it);for(const dt in et){if(L0(dt))continue;const Et=et[dt],yt=pt[dt];Et!==yt&&dt!=="value"&&a(K,dt,yt,Et,St,Z.children,G,bt,it)}"value"in et&&a(K,"value",pt.value,et.value)}},x=(K,Z,pt,et,G,bt,St,dt,Et)=>{const yt=Z.el=K?K.el:s(""),xt=Z.anchor=K?K.anchor:s("");let{patchFlag:Lt,dynamicChildren:Rt,slotScopeIds:Vt}=Z;Vt&&(dt=dt?dt.concat(Vt):Vt),K==null?(n(yt,pt,et),n(xt,pt,et),T(Z.children,pt,xt,G,bt,St,dt,Et)):Lt>0&&Lt&64&&Rt&&K.dynamicChildren?(P(K.dynamicChildren,Rt,pt,G,bt,St,dt),(Z.key!=null||G&&Z===G.subTree)&&r2(K,Z,!0)):q(K,Z,pt,xt,G,bt,St,dt,Et)},M=(K,Z,pt,et,G,bt,St,dt,Et)=>{Z.slotScopeIds=dt,K==null?Z.shapeFlag&512?G.ctx.activate(Z,pt,et,St,Et):D(Z,pt,et,G,bt,St,Et):W(K,Z,Et)},D=(K,Z,pt,et,G,bt,St)=>{const dt=K.component=ck(K,et,G);if(x_(K)&&(dt.ctx.renderer=at),pk(dt),dt.asyncDep){if(G&&G.registerDep(dt,z),!K.el){const Et=dt.subTree=ci(jo);m(null,Et,Z,pt)}return}z(dt,K,Z,pt,G,bt,St)},W=(K,Z,pt)=>{const et=Z.component=K.component;if(_G(K,Z,pt))if(et.asyncDep&&!et.asyncResolved){tt(et,Z,pt);return}else et.next=Z,pG(et.update),et.update();else Z.el=K.el,et.vnode=Z},z=(K,Z,pt,et,G,bt,St)=>{const dt=()=>{if(K.isMounted){let{next:xt,bu:Lt,u:Rt,parent:Vt,vnode:zt}=K,ie=xt,ee;zu(K,!1),xt?(xt.el=zt.el,tt(K,xt,St)):xt=zt,Lt&&Qw(Lt),(ee=xt.props&&xt.props.onVnodeBeforeUpdate)&&Ps(ee,Vt,xt,zt),zu(K,!0);const Xt=Hw(K),oe=K.subTree;K.subTree=Xt,v(oe,Xt,h(oe.el),gt(oe),K,G,bt),xt.el=Xt.el,ie===null&&wG(K,Xt.el),Rt&&qa(Rt,G),(ee=xt.props&&xt.props.onVnodeUpdated)&&qa(()=>Ps(ee,Vt,xt,zt),G)}else{let xt;const{el:Lt,props:Rt}=Z,{bm:Vt,m:zt,parent:ie}=K,ee=Yd(Z);if(zu(K,!1),Vt&&Qw(Vt),!ee&&(xt=Rt&&Rt.onVnodeBeforeMount)&&Ps(xt,ie,Z),zu(K,!0),Lt&&Ot){const Xt=()=>{K.subTree=Hw(K),Ot(Lt,K.subTree,K,G,null)};ee?Z.type.__asyncLoader().then(()=>!K.isUnmounted&&Xt()):Xt()}else{const Xt=K.subTree=Hw(K);v(null,Xt,pt,et,K,G,bt),Z.el=Xt.el}if(zt&&qa(zt,G),!ee&&(xt=Rt&&Rt.onVnodeMounted)){const Xt=Z;qa(()=>Ps(xt,ie,Xt),G)}(Z.shapeFlag&256||ie&&Yd(ie.vnode)&&ie.vnode.shapeFlag&256)&&K.a&&qa(K.a,G),K.isMounted=!0,Z=pt=et=null}},Et=K.effect=new BS(dt,()=>IS(yt),K.scope),yt=K.update=()=>Et.run();yt.id=K.uid,zu(K,!0),yt()},tt=(K,Z,pt)=>{Z.component=K;const et=K.vnode.props;K.vnode=Z,K.next=null,XG(K,Z.props,et,pt),ZG(K,Z.children,pt),ip(),rI(),ap()},q=(K,Z,pt,et,G,bt,St,dt,Et=!1)=>{const yt=K&&K.children,xt=K?K.shapeFlag:0,Lt=Z.children,{patchFlag:Rt,shapeFlag:Vt}=Z;if(Rt>0){if(Rt&128){nt(yt,Lt,pt,et,G,bt,St,dt,Et);return}else if(Rt&256){rt(yt,Lt,pt,et,G,bt,St,dt,Et);return}}Vt&8?(xt&16&&it(yt,G,bt),Lt!==yt&&u(pt,Lt)):xt&16?Vt&16?nt(yt,Lt,pt,et,G,bt,St,dt,Et):it(yt,G,bt,!0):(xt&8&&u(pt,""),Vt&16&&T(Lt,pt,et,G,bt,St,dt,Et))},rt=(K,Z,pt,et,G,bt,St,dt,Et)=>{K=K||Bf,Z=Z||Bf;const yt=K.length,xt=Z.length,Lt=Math.min(yt,xt);let Rt;for(Rt=0;Rt<Lt;Rt++){const Vt=Z[Rt]=Et?Yl(Z[Rt]):ks(Z[Rt]);v(K[Rt],Vt,pt,null,G,bt,St,dt,Et)}yt>xt?it(K,G,bt,!0,!1,Lt):T(Z,pt,et,G,bt,St,dt,Et,Lt)},nt=(K,Z,pt,et,G,bt,St,dt,Et)=>{let yt=0;const xt=Z.length;let Lt=K.length-1,Rt=xt-1;for(;yt<=Lt&&yt<=Rt;){const Vt=K[yt],zt=Z[yt]=Et?Yl(Z[yt]):ks(Z[yt]);if(hh(Vt,zt))v(Vt,zt,pt,null,G,bt,St,dt,Et);else break;yt++}for(;yt<=Lt&&yt<=Rt;){const Vt=K[Lt],zt=Z[Rt]=Et?Yl(Z[Rt]):ks(Z[Rt]);if(hh(Vt,zt))v(Vt,zt,pt,null,G,bt,St,dt,Et);else break;Lt--,Rt--}if(yt>Lt){if(yt<=Rt){const Vt=Rt+1,zt=Vt<xt?Z[Vt].el:et;for(;yt<=Rt;)v(null,Z[yt]=Et?Yl(Z[yt]):ks(Z[yt]),pt,zt,G,bt,St,dt,Et),yt++}}else if(yt>Rt)for(;yt<=Lt;)F(K[yt],G,bt,!0),yt++;else{const Vt=yt,zt=yt,ie=new Map;for(yt=zt;yt<=Rt;yt++){const be=Z[yt]=Et?Yl(Z[yt]):ks(Z[yt]);be.key!=null&&ie.set(be.key,yt)}let ee,Xt=0;const oe=Rt-zt+1;let Kt=!1,Ye=0;const Re=new Array(oe);for(yt=0;yt<oe;yt++)Re[yt]=0;for(yt=Vt;yt<=Lt;yt++){const be=K[yt];if(Xt>=oe){F(be,G,bt,!0);continue}let xe;if(be.key!=null)xe=ie.get(be.key);else for(ee=zt;ee<=Rt;ee++)if(Re[ee-zt]===0&&hh(be,Z[ee])){xe=ee;break}xe===void 0?F(be,G,bt,!0):(Re[xe-zt]=yt+1,xe>=Ye?Ye=xe:Kt=!0,v(be,Z[xe],pt,null,G,bt,St,dt,Et),Xt++)}const fr=Kt?nk(Re):Bf;for(ee=fr.length-1,yt=oe-1;yt>=0;yt--){const be=zt+yt,xe=Z[be],nn=be+1<xt?Z[be+1].el:et;Re[yt]===0?v(null,xe,pt,nn,G,bt,St,dt,Et):Kt&&(ee<0||yt!==fr[ee]?_t(xe,pt,nn,2):ee--)}}},_t=(K,Z,pt,et,G=null)=>{const{el:bt,type:St,transition:dt,children:Et,shapeFlag:yt}=K;if(yt&6){_t(K.component.subTree,Z,pt,et);return}if(yt&128){K.suspense.move(Z,pt,et);return}if(yt&64){St.move(K,Z,pt,at);return}if(St===_o){n(bt,Z,pt);for(let Lt=0;Lt<Et.length;Lt++)_t(Et[Lt],Z,pt,et);n(K.anchor,Z,pt);return}if(St===$w){C(K,Z,pt);return}if(et!==2&&yt&1&&dt)if(et===0)dt.beforeEnter(bt),n(bt,Z,pt),qa(()=>dt.enter(bt),G);else{const{leave:Lt,delayLeave:Rt,afterLeave:Vt}=dt,zt=()=>n(bt,Z,pt),ie=()=>{Lt(bt,()=>{zt(),Vt&&Vt()})};Rt?Rt(bt,zt,ie):ie()}else n(bt,Z,pt)},F=(K,Z,pt,et=!1,G=!1)=>{const{type:bt,props:St,ref:dt,children:Et,dynamicChildren:yt,shapeFlag:xt,patchFlag:Lt,dirs:Rt}=K;if(dt!=null&&sB(dt,null,pt,K,!0),xt&256){Z.ctx.deactivate(K);return}const Vt=xt&1&&Rt,zt=!Yd(K);let ie;if(zt&&(ie=St&&St.onVnodeBeforeUnmount)&&Ps(ie,Z,K),xt&6)X(K.component,pt,et);else{if(xt&128){K.suspense.unmount(pt,et);return}Vt&&Yu(K,null,Z,"beforeUnmount"),xt&64?K.type.remove(K,Z,pt,G,at,et):yt&&(bt!==_o||Lt>0&&Lt&64)?it(yt,Z,pt,!1,!0):(bt===_o&&Lt&384||!G&&xt&16)&&it(Et,Z,pt),et&&$(K)}(zt&&(ie=St&&St.onVnodeUnmounted)||Vt)&&qa(()=>{ie&&Ps(ie,Z,K),Vt&&Yu(K,null,Z,"unmounted")},pt)},$=K=>{const{type:Z,el:pt,anchor:et,transition:G}=K;if(Z===_o){j(pt,et);return}if(Z===$w){B(K);return}const bt=()=>{i(pt),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(K.shapeFlag&1&&G&&!G.persisted){const{leave:St,delayLeave:dt}=G,Et=()=>St(pt,bt);dt?dt(K.el,bt,Et):Et()}else bt()},j=(K,Z)=>{let pt;for(;K!==Z;)pt=c(K),i(K),K=pt;i(Z)},X=(K,Z,pt)=>{const{bum:et,scope:G,update:bt,subTree:St,um:dt}=K;et&&Qw(et),G.stop(),bt&&(bt.active=!1,F(St,K,Z,pt)),dt&&qa(dt,Z),qa(()=>{K.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&K.asyncDep&&!K.asyncResolved&&K.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},it=(K,Z,pt,et=!1,G=!1,bt=0)=>{for(let St=bt;St<K.length;St++)F(K[St],Z,pt,et,G)},gt=K=>K.shapeFlag&6?gt(K.component.subTree):K.shapeFlag&128?K.suspense.next():c(K.anchor||K.el),wt=(K,Z,pt)=>{K==null?Z._vnode&&F(Z._vnode,null,null,!0):v(Z._vnode||null,K,Z,null,null,null,pt),rI(),D5(),Z._vnode=K},at={p:v,um:F,m:_t,r:$,mt:D,mc:T,pc:q,pbc:P,n:gt,o:r};let Pt,Ot;return e&&([Pt,Ot]=e(at)),{render:wt,hydrate:Pt,createApp:tk(wt,Pt)}}function zu({effect:r,update:e},t){r.allowRecurse=e.allowRecurse=t}function r2(r,e,t=!1){const n=r.children,i=e.children;if(tr(n)&&tr(i))for(let a=0;a<n.length;a++){const o=n[a];let s=i[a];s.shapeFlag&1&&!s.dynamicChildren&&((s.patchFlag<=0||s.patchFlag===32)&&(s=i[a]=Yl(i[a]),s.el=o.el),t||r2(o,s)),s.type===b_&&(s.el=o.el)}}function nk(r){const e=r.slice(),t=[0];let n,i,a,o,s;const A=r.length;for(n=0;n<A;n++){const l=r[n];if(l!==0){if(i=t[t.length-1],r[i]<l){e[n]=i,t.push(n);continue}for(a=0,o=t.length-1;a<o;)s=a+o>>1,r[t[s]]<l?a=s+1:o=s;l<r[t[a]]&&(a>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 ik=r=>r.__isTeleport,_o=Symbol(void 0),b_=Symbol(void 0),jo=Symbol(void 0),$w=Symbol(void 0),Xd=[];let ys=null;function Sn(r=!1){Xd.push(ys=r?null:[])}function ak(){Xd.pop(),ys=Xd[Xd.length-1]||null}let yv=1;function cI(r){yv+=r}function n2(r){return r.dynamicChildren=yv>0?ys||Bf:null,ak(),yv>0&&ys&&ys.push(r),r}function Ii(r,e,t,n,i,a){return n2(o2(r,e,t,n,i,a,!0))}function mv(r,e,t,n,i){return n2(ci(r,e,t,n,i,!0))}function i2(r){return r?r.__v_isVNode===!0:!1}function hh(r,e){return r.type===e.type&&r.key===e.key}const L_="__vInternal",a2=({key:r})=>r??null,F0=({ref:r,ref_key:e,ref_for:t})=>r!=null?Ki(r)||Zi(r)||hr(r)?{i:ya,r,k:e,f:!!t}:r:null;function o2(r,e=null,t=null,n=0,i=null,a=r===_o?0:1,o=!1,s=!1){const A={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&a2(e),ref:e&&F0(e),scopeId:G5,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:ya};return s?(PS(A,t),a&128&&r.normalize(A)):t&&(A.shapeFlag|=Ki(t)?8:16),yv>0&&!o&&ys&&(A.patchFlag>0||a&6)&&A.patchFlag!==32&&ys.push(A),A}const ci=ok;function ok(r,e=null,t=null,n=0,i=null,a=!1){if((!r||r===QG)&&(r=jo),i2(r)){const s=vu(r,e,!0);return t&&PS(s,t),yv>0&&!a&&ys&&(s.shapeFlag&6?ys[ys.indexOf(r)]=s:ys.push(s)),s.patchFlag|=-2,s}if(mk(r)&&(r=r.__vccOpts),e){e=sk(e);let{class:s,style:A}=e;s&&!Ki(s)&&(e.class=yS(s)),ri(A)&&(F5(A)&&!tr(A)&&(A=_a({},A)),e.style=gS(A))}const o=Ki(r)?1:EG(r)?128:ik(r)?64:ri(r)?4:hr(r)?2:0;return o2(r,e,t,n,i,o,a,!0)}function sk(r){return r?F5(r)||L_ in r?_a({},r):r:null}function vu(r,e,t=!1){const{props:n,ref:i,patchFlag:a,children:o}=r,s=e?lk(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:s,key:s&&a2(s),ref:e&&e.ref?t&&i?tr(i)?i.concat(F0(e)):[i,F0(e)]:F0(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!==_o?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&&vu(r.ssContent),ssFallback:r.ssFallback&&vu(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx}}function Ak(r=" ",e=0){return ci(b_,null,r,e)}function Er(r="",e=!1){return e?(Sn(),mv(jo,null,r)):ci(jo,null,r)}function ks(r){return r==null||typeof r=="boolean"?ci(jo):tr(r)?ci(_o,null,r.slice()):typeof r=="object"?Yl(r):ci(b_,null,String(r))}function Yl(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:vu(r)}function PS(r,e){let t=0;const{shapeFlag:n}=r;if(e==null)e=null;else if(tr(e))t=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),PS(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!(L_ in e)?e._ctx=ya:i===3&&ya&&(ya.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else hr(e)?(e={default:e,_ctx:ya},t=32):(e=String(e),n&64?(t=16,e=[Ak(e)]):t=8);r.children=e,r.shapeFlag|=t}function lk(...r){const e={};for(let t=0;t<r.length;t++){const n=r[t];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=yS([e.class,n.class]));else if(i==="style")e.style=gS([e.style,n.style]);else if(y_(i)){const a=e[i],o=n[i];o&&a!==o&&!(tr(a)&&a.includes(o))&&(e[i]=a?[].concat(a,o):o)}else i!==""&&(e[i]=n[i])}return e}function Ps(r,e,t,n=null){Vo(r,e,7,[t,n])}const uk=e2();let hk=0;function ck(r,e,t){const n=r.type,i=(e?e.appContext:r.appContext)||uk,a={uid:hk++,vnode:r,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new LH(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:q5(n,i),emitsOptions:H5(n,i),emit:null,emitted:null,propsDefaults:xn,inheritAttrs:n.inheritAttrs,ctx:xn,data:xn,props:xn,attrs:xn,slots:xn,refs:xn,setupState:xn,setupContext:null,suspense:t,suspenseId:t?t.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return a.ctx={_:a},a.root=e?e.root:a,a.emit=gG.bind(null,a),r.ce&&r.ce(a),a}let Vi=null;const fk=()=>Vi||ya,Gf=r=>{Vi=r,r.scope.on()},Ch=()=>{Vi&&Vi.scope.off(),Vi=null};function s2(r){return r.vnode.shapeFlag&4}let _v=!1;function pk(r,e=!1){_v=e;const{props:t,children:n}=r.vnode,i=s2(r);zG(r,t,i,e),qG(r,n);const a=i?dk(r,e):void 0;return _v=!1,a}function dk(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=I5(new Proxy(r.ctx,kG));const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?gk(r):null;Gf(r),ip();const a=Au(n,r,0,[r.props,i]);if(ap(),Ch(),g5(a)){if(a.then(Ch,Ch),e)return a.then(o=>{fI(r,o,e)}).catch(o=>{B_(o,r,0)});r.asyncDep=a}else fI(r,a,e)}else A2(r,e)}function fI(r,e,t){hr(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:ri(e)&&(r.setupState=M5(e)),A2(r,t)}let pI;function A2(r,e,t){const n=r.type;if(!r.render){if(!e&&pI&&!n.render){const i=n.template||OS(r).template;if(i){const{isCustomElement:a,compilerOptions:o}=r.appContext.config,{delimiters:s,compilerOptions:A}=n,l=_a(_a({isCustomElement:a,delimiters:s},o),A);n.render=pI(i,l)}}r.render=n.render||ms}Gf(r),ip(),$G(r),ap(),Ch()}function vk(r){return new Proxy(r.attrs,{get(e,t){return To(r,"get","$attrs"),e[t]}})}function gk(r){const e=n=>{r.exposed=n||{}};let t;return{get attrs(){return t||(t=vk(r))},slots:r.slots,emit:r.emit,expose:e}}function NS(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(M5(I5(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in zd)return zd[t](r)},has(e,t){return t in e||t in zd}}))}function yk(r,e=!0){return hr(r)?r.displayName||r.name:r.name||e&&r.__name}function mk(r){return hr(r)&&"__vccOpts"in r}const pr=(r,e)=>uG(r,e,_v),_k=Symbol(""),wk=()=>Ce(_k),Ek="3.2.45",Ck="http://www.w3.org/2000/svg",ch=typeof document<"u"?document:null,dI=ch&&ch.createElement("template"),Bk={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?ch.createElementNS(Ck,r):ch.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>ch.createTextNode(r),createComment:r=>ch.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>ch.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{dI.innerHTML=n?`<svg>${r}</svg>`:r;const s=dI.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 Tk(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 xk(r,e,t){const n=r.style,i=Ki(t);if(t&&!i){for(const a in t)AB(n,a,t[a]);if(e&&!Ki(e))for(const a in e)t[a]==null&&AB(n,a,"")}else{const a=n.display;i?e!==t&&(n.cssText=t):e&&r.removeAttribute("style"),"_vod"in r&&(n.display=a)}}const vI=/\s*!important$/;function AB(r,e,t){if(tr(t))t.forEach(n=>AB(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=Sk(r,e);vI.test(t)?r.setProperty(np(n),t.replace(vI,""),"important"):r[n]=t}}const gI=["Webkit","Moz","ms"],Vw={};function Sk(r,e){const t=Vw[e];if(t)return t;let n=rA(e);if(n!=="filter"&&n in r)return Vw[e]=n;n=w_(n);for(let i=0;i<gI.length;i++){const a=gI[i]+n;if(a in r)return Vw[e]=a}return e}const yI="http://www.w3.org/1999/xlink";function bk(r,e,t,n,i){if(n&&e.startsWith("xlink:"))t==null?r.removeAttributeNS(yI,e.slice(6,e.length)):r.setAttributeNS(yI,e,t);else{const a=yH(e);t==null||a&&!v5(t)?r.removeAttribute(e):r.setAttribute(e,a?"":t)}}function Lk(r,e,t,n,i,a,o){if(e==="innerHTML"||e==="textContent"){n&&o(n,i,a),r[e]=t??"";return}if(e==="value"&&r.tagName!=="PROGRESS"&&!r.tagName.includes("-")){r._value=t;const A=t??"";(r.value!==A||r.tagName==="OPTION")&&(r.value=A),t==null&&r.removeAttribute(e);return}let s=!1;if(t===""||t==null){const A=typeof r[e];A==="boolean"?t=v5(t):t==null&&A==="string"?(t="",s=!0):A==="number"&&(t=0,s=!0)}try{r[e]=t}catch{}s&&r.removeAttribute(e)}function Fk(r,e,t,n){r.addEventListener(e,t,n)}function Ik(r,e,t,n){r.removeEventListener(e,t,n)}function Rk(r,e,t,n,i=null){const a=r._vei||(r._vei={}),o=a[e];if(n&&o)o.value=n;else{const[s,A]=Ok(e);if(n){const l=a[e]=Nk(n,i);Fk(r,s,l,A)}else o&&(Ik(r,s,o,A),a[e]=void 0)}}const mI=/(?:Once|Passive|Capture)$/;function Ok(r){let e;if(mI.test(r)){e={};let n;for(;n=r.match(mI);)r=r.slice(0,r.length-n[0].length),e[n[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):np(r.slice(2)),e]}let jw=0;const Mk=Promise.resolve(),Pk=()=>jw||(Mk.then(()=>jw=0),jw=Date.now());function Nk(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;Vo(Uk(n,t.value),e,5,[n])};return t.value=r,t.attached=Pk(),t}function Uk(r,e){if(tr(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 _I=/^on[a-z]/,Dk=(r,e,t,n,i=!1,a,o,s,A)=>{e==="class"?Tk(r,n,i):e==="style"?xk(r,t,n):y_(e)?mS(e)||Rk(r,e,t,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Qk(r,e,n,i))?Lk(r,e,n,a,o,s,A):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),bk(r,e,n,i))};function Qk(r,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in r&&_I.test(e)&&hr(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA"||_I.test(e)&&Ki(t)?!1:e in r}const Hk={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};bG.props;const Gk=_a({patchProp:Dk},Bk);let wI;function kk(){return wI||(wI=ek(Gk))}const $k=(...r)=>{const e=kk().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=Vk(n);if(!i)return;const a=e._component;!hr(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};function Vk(r){return Ki(r)?document.querySelector(r):r}var op={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},sp={};sp[op.RADIANS]=6370997/(2*Math.PI);sp[op.DEGREES]=2*Math.PI*6370997/360;sp[op.FEET]=.3048;sp[op.METERS]=1;sp[op.USFEET]=1200/3937;const l2=op;var jk=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_||sp[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}();const u2=jk;var Kk=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),Yk=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)}}(),Yv=6378137,cf=Math.PI*Yv,zk=[-cf,-cf,cf,cf],Xk=[-180,-85,180,85],yy=Yv*Math.log(Math.tan(Math.PI/2)),Mc=function(r){Yk(e,r);function e(t){return r.call(this,{code:t,units:l2.METERS,extent:zk,global:!0,worldExtent:Xk,getPointResolution:function(n,i){return n/Kk(i[1]/Yv)}})||this}return e}(u2),EI=[new Mc("EPSG:3857"),new Mc("EPSG:102100"),new Mc("EPSG:102113"),new Mc("EPSG:900913"),new Mc("http://www.opengis.net/def/crs/EPSG/0/3857"),new Mc("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Wk(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<n;o+=i){a[o]=cf*r[o]/180;var s=Yv*Math.log(Math.tan(Math.PI*(+r[o+1]+90)/360));s>yy?s=yy:s<-yy&&(s=-yy),a[o+1]=s}return a}function qk(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<n;o+=i)a[o]=180*r[o]/cf,a[o+1]=360*Math.atan(Math.exp(r[o+1]/Yv))/Math.PI-90;return a}var Zk=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)}}(),Jk=6378137,CI=[-180,-90,180,90],t9=Math.PI*Jk/180,Xu=function(r){Zk(e,r);function e(t,n){return r.call(this,{code:t,units:l2.DEGREES,extent:CI,axisOrientation:n,global:!0,metersPerUnit:t9,worldExtent:CI})||this}return e}(u2),BI=[new Xu("CRS:84"),new Xu("EPSG:4326","neu"),new Xu("urn:ogc:def:crs:OGC:1.3:CRS84"),new Xu("urn:ogc:def:crs:OGC:2:84"),new Xu("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Xu("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Xu("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],lB={};function e9(r){return lB[r]||lB[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function r9(r,e){lB[r]=e}var Sf={};function sm(r,e,t){var n=r.getCode(),i=e.getCode();n in Sf||(Sf[n]={}),Sf[n][i]=t}function n9(r,e){var t;return r in Sf&&e in Sf[r]&&(t=Sf[r][e]),t}function h2(r,e,t){var n;if(e!==void 0){for(var i=0,a=r.length;i<a;++i)e[i]=r[i];n=e}else n=r.slice();return n}function i9(r,e,t){if(e!==void 0&&r!==e){for(var n=0,i=r.length;n<i;++n)e[n]=r[n];r=e}return r}function a9(r){r9(r.getCode(),r),sm(r,r,h2)}function o9(r){r.forEach(a9)}function TI(r){return typeof r=="string"?e9(r):r||null}function xI(r){o9(r),r.forEach(function(e){r.forEach(function(t){e!==t&&sm(e,t,h2)})})}function s9(r,e,t,n){r.forEach(function(i){e.forEach(function(a){sm(i,a,t),sm(a,i,n)})})}function SI(r,e){return u9(r,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function A9(r,e){var t=r.getCode(),n=e.getCode(),i=n9(t,n);return i||(i=i9),i}function l9(r,e){var t=TI(r),n=TI(e);return A9(t,n)}function u9(r,e,t){var n=l9(e,t);return n(r,void 0,r.length)}function h9(){xI(EI),xI(BI),s9(BI,EI,Wk,qk)}h9();const c9=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},f9={name:"Map",data(){const r=Gi(SI([-7.5029786,53.4494762])),e=Gi("EPSG:3857"),t=Gi(7),n=Gi(0),i=Gi(10),a=Gi(1),o=Gi("black"),s=Gi("red");let u=JSON.parse('{"ArrayOfObjTrainPositions":{"$":{"xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:xsd":"http://www.w3.org/2001/XMLSchema","xmlns":"http://api.irishrail.ie/realtime/"},"objTrainPositions":[{"TrainStatus":["N"],"TrainLatitude":["51.9018"],"TrainLongitude":["-8.4582"],"TrainCode":["A209"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A209\\nCork to Dublin Heuston\\nExpected Departure 09:25"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["N"],"TrainLatitude":["51.9018"],"TrainLongitude":["-8.4582"],"TrainCode":["D557"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D557\\nCork to Midleton\\nExpected Departure 09:15"],"Direction":["To Midleton"]},{"TrainStatus":["N"],"TrainLatitude":["51.9212"],"TrainLongitude":["-8.17579"],"TrainCode":["P556"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P556\\nMidleton to Cork\\nExpected Departure 09:15"],"Direction":["To Cork"]},{"TrainStatus":["N"],"TrainLatitude":["52.6587"],"TrainLongitude":["-8.62397"],"TrainCode":["A782"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A782\\nLimerick to Galway\\nExpected Departure 09:20"],"Direction":["To Galway"]},{"TrainStatus":["N"],"TrainLatitude":["53.1855"],"TrainLongitude":["-6.80807"],"TrainCode":["P406"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P406\\nNewbridge to Grand Canal Dock\\nExpected Departure 09:09"],"Direction":["Northbound"]},{"TrainStatus":["N"],"TrainLatitude":["53.2043"],"TrainLongitude":["-6.10046"],"TrainCode":["E811"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E811\\nBray to Malahide\\nExpected Departure 09:25"],"Direction":["Northbound"]},{"TrainStatus":["N"],"TrainLatitude":["53.2043"],"TrainLongitude":["-6.10046"],"TrainCode":["E912"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E912\\nBray to Howth\\nExpected Departure 09:15"],"Direction":["Northbound"]},{"TrainStatus":["N"],"TrainLatitude":["53.3464"],"TrainLongitude":["-6.29461"],"TrainCode":["A702"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A702\\nDublin Heuston to Galway\\nExpected Departure 09:25"],"Direction":["To Galway"]},{"TrainStatus":["N"],"TrainLatitude":["53.3891"],"TrainLongitude":["-6.07401"],"TrainCode":["E215"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E215\\nHowth to Bray\\nExpected Departure 09:20"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["0"],"TrainLongitude":["0"],"TrainCode":["A202"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A202\\n07:00 - Dublin Heuston to Cork (0 mins late)\\nDeparted Killarney Junction next stop Cork"],"Direction":["To Cork"]},{"TrainStatus":["R"],"TrainLatitude":["0"],"TrainLongitude":["0"],"TrainCode":["A700"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A700\\n07:35 - Dublin Heuston to Galway (3 mins late)\\nDeparted Athlone Midland Yard next stop Ballinasloe"],"Direction":["To Galway"]},{"TrainStatus":["R"],"TrainLatitude":["0"],"TrainLongitude":["0"],"TrainCode":["A802"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A802\\n09:08 - Athlone to Westport (3 mins late)\\nDeparted Athlone Midland Yard next stop Roscommon"],"Direction":["To Westport"]},{"TrainStatus":["R"],"TrainLatitude":["0"],"TrainLongitude":["0"],"TrainCode":["D204"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D204\\n09:20 - Dublin Heuston to Portlaoise (-10 mins late)\\nArrived Inchicore Advance Starter next stop Park West and Cherry Orchard"],"Direction":["To Portlaoise"]},{"TrainStatus":["R"],"TrainLatitude":["0"],"TrainLongitude":["0"],"TrainCode":["D512"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D512\\n08:50 - Mallow to Cork (0 mins late)\\nDeparted Killarney Junction next stop Cork"],"Direction":["To Cork"]},{"TrainStatus":["R"],"TrainLatitude":["52.5009"],"TrainLongitude":["-8.20003"],"TrainCode":["A303"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A303\\n07:05 - Tralee to Dublin Heuston (-2 mins late)\\nArrived Limerick Junction next stop Dublin Heuston"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["52.5828"],"TrainLongitude":["-8.38682"],"TrainCode":["A407"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A407\\n08:55 - Limerick to Dublin Heuston (1 mins late)\\nDeparted Drumkeen next stop Limerick Junction"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["52.6404"],"TrainLongitude":["-8.52719"],"TrainCode":["A425"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A425\\n09:03 - Limerick to Limerick Junction (1 mins late)\\nDeparted Killonan next stop Limerick Junction"],"Direction":["To Limerick Junction"]},{"TrainStatus":["R"],"TrainLatitude":["52.7878"],"TrainLongitude":["-7.82293"],"TrainCode":["A204"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A204\\n08:00 - Dublin Heuston to Cork (3 mins late)\\nDeparted Templemore next stop Thurles"],"Direction":["To Cork"]},{"TrainStatus":["R"],"TrainLatitude":["52.992"],"TrainLongitude":["-6.9762"],"TrainCode":["A500"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A500\\n07:20 - Dublin Heuston to Waterford (0 mins late)\\nDeparted Athy next stop Carlow"],"Direction":["To Waterford"]},{"TrainStatus":["R"],"TrainLatitude":["52.992"],"TrainLongitude":["-6.9762"],"TrainCode":["A502"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A502\\n08:26 - Dublin Heuston to Carlow (0 mins late)\\nDeparted Athy next stop Carlow"],"Direction":["To Carlow"]},{"TrainStatus":["R"],"TrainLatitude":["52.992"],"TrainLongitude":["-6.9762"],"TrainCode":["A507"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A507\\n07:50 - Waterford to Dublin Heuston (2 mins late)\\nDeparted Athy next stop Kildare"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["53.0371"],"TrainLongitude":["-7.30086"],"TrainCode":["P209"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P209\\n09:13 - Portlaoise to Dublin Heuston (0 mins late)\\nDeparted Portlaoise next stop Portarlington"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["53.1454"],"TrainLongitude":["-7.06361"],"TrainCode":["A707"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A707\\n07:30 - Galway to Dublin Heuston (0 mins late)\\nArrived Monasterevin next stop Sallins"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["53.1454"],"TrainLongitude":["-7.06361"],"TrainCode":["D203"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D203\\n08:22 - Dublin Heuston to Portlaoise (-3 mins late)\\nArrived Monasterevin next stop Portarlington"],"Direction":["To Portlaoise"]},{"TrainStatus":["R"],"TrainLatitude":["53.146"],"TrainLongitude":["-7.18055"],"TrainCode":["A405"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A405\\n07:40 - Limerick to Dublin Heuston (2 mins late)\\nDeparted Portarlington next stop Newbridge"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["53.2043"],"TrainLongitude":["-6.10046"],"TrainCode":["E105"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E105\\n07:52 - Malahide to Greystones (8 mins late)\\nDeparted Bray next stop Greystones"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.2364"],"TrainLongitude":["-6.11691"],"TrainCode":["E209"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E209\\n08:00 - Howth to Bray (6 mins late)\\nArrived Shankill next stop Bray"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.2756"],"TrainLongitude":["-6.10333"],"TrainCode":["E210"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E210\\n08:10 - Malahide to Bray (1 mins late)\\nDeparted Dalkey next stop Killiney"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.2756"],"TrainLongitude":["-6.10333"],"TrainCode":["E810"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E810\\n08:54 - Greystones to Malahide (-1 mins late)\\nArrived Dalkey next stop Glenageary"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.2878"],"TrainLongitude":["-6.12712"],"TrainCode":["P653"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P653\\n07:54 - Maynooth to Bray (0 mins late)\\nArrived Sandycove next stop Bray"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.2878"],"TrainLongitude":["-6.12712"],"TrainCode":["P775"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P775\\n09:00 - Bray to Dublin Connolly (-1 mins late)\\nDeparted Sandycove next stop Dun Laoghaire"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.2954"],"TrainLongitude":["-6.15206"],"TrainCode":["E211"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E211\\n08:20 - Howth to Bray (0 mins late)\\nArrived Salthill and Monkstown next stop Dun Laoghaire"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.2954"],"TrainLongitude":["-6.15206"],"TrainCode":["E911"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E911\\n08:55 - Bray to Howth (0 mins late)\\nArrived Salthill and Monkstown next stop Seapoint"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3099"],"TrainLongitude":["-6.19498"],"TrainCode":["E106"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E106\\n08:30 - Malahide to Greystones (1 mins late)\\nDeparted Booterstown next stop Blackrock"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3099"],"TrainLongitude":["-6.19498"],"TrainCode":["E809"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E809\\n08:45 - Bray to Malahide (2 mins late)\\nArrived Booterstown next stop Sydney Parade"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3223"],"TrainLongitude":["-6.52356"],"TrainCode":["A206"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A206\\n09:00 - Dublin Heuston to Cork (0 mins late)\\nDeparted Hazelhatch next stop Portlaoise"],"Direction":["To Cork"]},{"TrainStatus":["R"],"TrainLatitude":["53.334"],"TrainLongitude":["-6.37868"],"TrainCode":["P207"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P207\\n08:12 - Portlaoise to Dublin Heuston (1 mins late)\\nDeparted Park West and Cherry Orchard next stop Dublin Heuston"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["53.3345"],"TrainLongitude":["-6.43038"],"TrainCode":["A205"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A205\\n07:00 - Cork to Dublin Heuston (-4 mins late)\\nDeparted Kishogue next stop Dublin Heuston"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["53.3347"],"TrainLongitude":["-6.22979"],"TrainCode":["P606"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P606\\n07:58 - Drogheda to Bray (2 mins late)\\nArrived Lansdowne Road next stop Sydney Parade"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3353"],"TrainLongitude":["-6.45233"],"TrainCode":["D404"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D404\\n08:31 - Grand Canal Dock to Hazelhatch (0 mins late)\\nDeparted Adamstown next stop Hazelhatch"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3397"],"TrainLongitude":["-6.23773"],"TrainCode":["E910"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E910\\n08:24 - Greystones to Howth (0 mins late)\\nArrived Grand Canal Dock next stop Dublin Pearse"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.347"],"TrainLongitude":["-6.25425"],"TrainCode":["D405"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D405\\n09:11 - Grand Canal Dock to Hazelhatch (0 mins late)\\nArrived Tara Street next stop Dublin Connolly"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3531"],"TrainLongitude":["-6.24591"],"TrainCode":["D803"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D803\\n09:10 - Dublin Connolly to Drogheda (4 mins late)\\nDeparted Dublin Connolly next stop Malahide"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3531"],"TrainLongitude":["-6.24591"],"TrainCode":["D908"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D908\\n09:10 - Dublin Pearse to Maynooth (0 mins late)\\nArrived Dublin Connolly next stop Drumcondra"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3531"],"TrainLongitude":["-6.24591"],"TrainCode":["E212"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E212\\n08:41 - Howth to Bray (4 mins late)\\nDeparted Dublin Connolly next stop Tara Street"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3602"],"TrainLongitude":["-7.79847"],"TrainCode":["A803"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A803\\n07:15 - Westport to Dublin Heuston (0 mins late)\\nDeparted Clonydonnin next stop Clara"],"Direction":["To Dublin Heuston"]},{"TrainStatus":["R"],"TrainLatitude":["53.3629"],"TrainLongitude":["-6.22753"],"TrainCode":["E213"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E213\\n08:50 - Malahide to Bray (2 mins late)\\nDeparted Clontarf Road next stop Dublin Connolly"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3632"],"TrainLongitude":["-6.25908"],"TrainCode":["A902"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A902\\n09:05 - Dublin Connolly to Sligo (4 mins late)\\nArrived Drumcondra next stop Maynooth"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3704"],"TrainLongitude":["-6.50598"],"TrainCode":["A903"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A903\\n06:40 - Sligo to Dublin Connolly (5 mins late)\\nArrived Leixlip (Louisa Bridge) next stop Broombridge"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3752"],"TrainLongitude":["-6.31388"],"TrainCode":["P735"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P735\\n08:40 - Maynooth to Dublin Connolly (5 mins late)\\nDeparted Pelletstown next stop Broombridge"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3776"],"TrainLongitude":["-6.39072"],"TrainCode":["D304"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D304\\n09:00 - Docklands to M3 Parkway (0 mins late)\\nDeparted Coolmine next stop Clonsilla"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.378"],"TrainLongitude":["-6.58993"],"TrainCode":["P655"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P655\\n09:10 - Maynooth to Dublin Pearse (5 mins late)\\nDeparted Maynooth next stop Leixlip (Louisa Bridge)"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3786"],"TrainLongitude":["-6.19131"],"TrainCode":["E107"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E107\\n09:00 - Howth to Greystones (0 mins late)\\nArrived Harmonstown next stop Killester"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3786"],"TrainLongitude":["-6.19131"],"TrainCode":["E908"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E908\\n08:15 - Bray to Howth (2 mins late)\\nArrived Harmonstown next stop Raheny"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3853"],"TrainLongitude":["-6.44205"],"TrainCode":["P306"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P306\\n09:08 - M3 Parkway to Docklands (0 mins late)\\nArrived Hansfield next stop Clonsilla"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.3909"],"TrainLongitude":["-6.15672"],"TrainCode":["E807"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E807\\n07:54 - Greystones to Malahide (7 mins late)\\nArrived Howth Junction next stop Clongriffin"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.4032"],"TrainLongitude":["-6.14839"],"TrainCode":["P607"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P607\\n08:30 - Drogheda to Dublin Pearse (1 mins late)\\nDeparted Clongriffin next stop Dublin Connolly"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.4509"],"TrainLongitude":["-6.15649"],"TrainCode":["A605"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A605\\n05:35 - Rosslare Europort to Dundalk (1 mins late)\\nArrived Malahide next stop Donabate"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.4509"],"TrainLongitude":["-6.15649"],"TrainCode":["E214"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E214\\n09:12 - Malahide to Bray (1 mins late)\\nDeparted Malahide next stop Portmarnock"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.6118"],"TrainLongitude":["-6.18226"],"TrainCode":["P701"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P701\\n09:00 - Drogheda to Dublin Connolly (0 mins late)\\nArrived Balbriggan next stop Skerries"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.712"],"TrainLongitude":["-6.33538"],"TrainCode":["D802"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D802\\n07:54 - Dublin Pearse to Dundalk (1 mins late)\\nDeparted Drogheda next stop Dundalk"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["53.8591"],"TrainLongitude":["-7.9164"],"TrainCode":["A900"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A900\\n06:55 - Dublin Connolly to Sligo (0 mins late)\\nDeparted Dromod next stop Carrick on Shannon"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["54.0007"],"TrainLongitude":["-6.41291"],"TrainCode":["A122"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A122\\n07:35 - Dublin Connolly to Belfast (7 mins late)\\nDeparted Dundalk next stop Newry"],"Direction":["Northbound"]},{"TrainStatus":["R"],"TrainLatitude":["54.0007"],"TrainLongitude":["-6.41291"],"TrainCode":["A123"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A123\\n08:00 - Belfast to Dublin Connolly (0 mins late)\\nArrived Dundalk next stop Dublin Connolly"],"Direction":["Southbound"]},{"TrainStatus":["R"],"TrainLatitude":["54.2723"],"TrainLongitude":["-8.48249"],"TrainCode":["A905"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A905\\n09:05 - Sligo to Dublin Connolly (1 mins late)\\nDeparted Sligo next stop Collooney"],"Direction":["Southbound"]},{"TrainStatus":["T"],"TrainLatitude":["53.1855"],"TrainLongitude":["-6.80807"],"TrainCode":["D403"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D403\\n08:10 - Grand Canal Dock to Newbridge(3 mins late)\\nTERMINATED Newbridge at 09:07"],"Direction":["Southbound"]},{"TrainStatus":["T"],"TrainLatitude":["53.3433"],"TrainLongitude":["-6.24829"],"TrainCode":["P654"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P654\\n08:15 - Maynooth to Dublin Pearse(0 mins late)\\nTERMINATED Dublin Pearse at 09:12"],"Direction":["Southbound"]},{"TrainStatus":["T"],"TrainLatitude":["53.3509"],"TrainLongitude":["-6.23929"],"TrainCode":["P305"],"TrainDate":["12 Jan 2023"],"PublicMessage":["P305\\n08:35 - M3 Parkway to Docklands(0 mins late)\\nTERMINATED Docklands at 09:12"],"Direction":["Southbound"]},{"TrainStatus":["T"],"TrainLatitude":["53.3531"],"TrainLongitude":["-6.24591"],"TrainCode":["A121"],"TrainDate":["12 Jan 2023"],"PublicMessage":["A121\\n06:50 - Belfast to Dublin Connolly(6 mins late)\\nTERMINATED Dublin Connolly at 09:06"],"Direction":["Southbound"]},{"TrainStatus":["T"],"TrainLatitude":["53.378"],"TrainLongitude":["-6.58993"],"TrainCode":["D907"],"TrainDate":["12 Jan 2023"],"PublicMessage":["D907\\n08:23 - Dublin Pearse to Maynooth(0 mins late)\\nTERMINATED Maynooth at 09:14"],"Direction":["Northbound"]},{"TrainStatus":["T"],"TrainLatitude":["53.3891"],"TrainLongitude":["-6.07401"],"TrainCode":["E907"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E907\\n07:55 - Bray to Howth(2 mins late)\\nTERMINATED Howth at 09:11"],"Direction":["Northbound"]},{"TrainStatus":["T"],"TrainLatitude":["53.4509"],"TrainLongitude":["-6.15649"],"TrainCode":["E806"],"TrainDate":["12 Jan 2023"],"PublicMessage":["E806\\n07:45 - Bray to Malahide(3 mins late)\\nTERMINATED Malahide at 09:07"],"Direction":["Northbound"]}]}}').ArrayOfObjTrainPositions.objTrainPositions;const h=[];for(let c=0;c<u.length;c++)h[c]=Gi(SI([u[c].TrainLongitude,u[c].TrainLatitude]));return{center:r,projection:e,zoom:t,rotation:n,radius:i,strokeWidth:a,strokeColor:o,fillColor:s,coordinates:h}}};function p9(r,e,t,n,i,a){const o=No("ol-view"),s=No("ol-source-osm"),A=No("ol-tile-layer"),l=No("ol-geom-point"),u=No("ol-style-fill"),h=No("ol-style-stroke"),c=No("ol-style-circle"),f=No("ol-style"),d=No("ol-feature"),v=No("ol-source-vector"),y=No("ol-vector-layer"),m=No("ol-map");return Sn(),mv(m,{loadTilesWhileAnimating:!0,loadTilesWhileInteracting:!0,style:{height:"1000px"}},{default:$l(()=>[ci(o,{ref:"view",center:i.center,rotation:i.rotation,zoom:i.zoom,projection:i.projection},null,8,["center","rotation","zoom","projection"]),ci(A,null,{default:$l(()=>[ci(s)]),_:1}),(Sn(!0),Ii(_o,null,GG(i.coordinates,w=>(Sn(),mv(y,null,{default:$l(()=>[ci(v,null,{default:$l(()=>[ci(d,null,{default:$l(()=>[ci(l,{coordinates:w},null,8,["coordinates"]),ci(f,null,{default:$l(()=>[ci(c,{radius:i.radius},{default:$l(()=>[ci(u,{color:i.fillColor},null,8,["color"]),ci(h,{color:i.strokeColor,width:i.strokeWidth},null,8,["color","width"])]),_:1},8,["radius"])]),_:1})]),_:2},1024)]),_:2},1024)]),_:2},1024))),256))]),_:1})}const d9=c9(f9,[["render",p9]]),v9={__name:"App",setup(r){return(e,t)=>(Sn(),mv(d9))}};var g9=Object.defineProperty,y9=Object.defineProperties,m9=Object.getOwnPropertyDescriptors,bI=Object.getOwnPropertySymbols,_9=Object.prototype.hasOwnProperty,w9=Object.prototype.propertyIsEnumerable,LI=(r,e,t)=>e in r?g9(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,On=(r,e)=>{for(var t in e||(e={}))_9.call(e,t)&&LI(r,t,e[t]);if(bI)for(var t of bI(e))w9.call(e,t)&&LI(r,t,e[t]);return r},xs=(r,e)=>y9(r,m9(e)),E9=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}(),F_=E9;function C9(r,e,t){for(var n,i,a=t||gu,o=0,s=r.length,A=!1;o<s;)n=o+(s-o>>1),i=+a(r[n],e),i<0?o=n+1:(s=n,A=!i);return A?o:~o}function gu(r,e){return r>e?1:r<e?-1:0}function fi(r,e){return r.indexOf(e)>=0}function I_(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;i<n;++i)if(r[i]<e)return i-1}else if(t<0){for(i=1;i<n;++i)if(r[i]<=e)return i}else for(i=1;i<n;++i){if(r[i]==e)return i;if(r[i]<e)return typeof t=="function"?t(e,r[i-1],r[i])>0?i-1:i:r[i-1]-e<e-r[i]?i-1:i}return n-1}function B9(r,e,t){for(;e<t;){var n=r[e];r[e]=r[t],r[t]=n,++e,--t}}function Ur(r,e){for(var t=Array.isArray(e)?e:[e],n=t.length,i=0;i<n;i++)r[r.length]=t[i]}function ll(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function T9(r,e,t){var n=e||gu;return r.every(function(i,a){if(a===0)return!0;var o=n(r[a-1],i);return!(o>0||t&&o===0)})}function Js(){return!0}function zh(){return!1}function Nh(){}function x9(r){var e=!1,t,n,i;return function(){var a=Array.prototype.slice.call(arguments);return(!e||this!==i||!ll(a,n))&&(e=!0,i=this,n=a,t=r.apply(this,arguments)),t}}function Ee(){return function(){throw new Error("Unimplemented abstract method.")}()}var S9=0;function pe(r){return r.ol_uid||(r.ol_uid=String(++S9))}var c2="6.14.1",yu=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",b9=yu.indexOf("firefox")!==-1,L9=yu.indexOf("safari")!==-1&&yu.indexOf("chrom")==-1,F9=L9&&!!(yu.indexOf("version/15.4")>=0||yu.match(/cpu (os|iphone os) 15_4 like mac os x/)),I9=yu.indexOf("webkit")!==-1&&yu.indexOf("edge")==-1,f2=yu.indexOf("macintosh")!==-1,Uh=typeof devicePixelRatio<"u"?devicePixelRatio:1,R_=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,R9=typeof Image<"u"&&Image.prototype.decode,p2=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}(),O9=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)}}(),M9=function(r){O9(e,r);function e(t){var n=this,i="v"+c2.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),d2=M9;function _e(r,e){if(!r)throw new d2(e)}var US=new Array(6);function Jn(){return[1,0,0,1,0,0]}function Wd(r){return zv(r,1,0,0,1,0,0)}function Ap(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],h=e[3],c=e[4],f=e[5];return r[0]=t*A+i*l,r[1]=n*A+a*l,r[2]=t*u+i*h,r[3]=n*u+a*h,r[4]=t*c+i*f+o,r[5]=n*c+a*f+s,r}function zv(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 P9(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 An(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 N9(r,e){var t=Math.cos(e),n=Math.sin(e);return Ap(r,zv(US,t,n,-n,t,0,0))}function qd(r,e,t){return Ap(r,zv(US,e,0,0,t,0,0))}function U9(r,e,t){return zv(r,e,0,0,t,0,0)}function D9(r,e,t){return Ap(r,zv(US,1,0,0,1,e,t))}function Da(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 Xv(r,e){var t=Q9(e);_e(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 Q9(r){return r[0]*r[3]-r[1]*r[2]}var FI;function DS(r){var e="matrix("+r.join(", ")+")";if(R_)return e;var t=FI||(FI=document.createElement("div"));return t.style.transform=e,t.style.transform}var bd={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},Hi={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function ki(r){for(var e=di(),t=0,n=r.length;t<n;++t)Th(e,r[t]);return e}function H9(r,e,t){var n=Math.min.apply(null,r),i=Math.min.apply(null,e),a=Math.max.apply(null,r),o=Math.max.apply(null,e);return no(n,i,a,o,t)}function Qa(r,e,t){return t?(t[0]=r[0]-e,t[1]=r[1]-e,t[2]=r[2]+e,t[3]=r[3]+e,t):[r[0]-e,r[1]-e,r[2]+e,r[3]+e]}function QS(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r.slice()}function Fu(r,e,t){var n,i;return e<r[0]?n=r[0]-e:r[2]<e?n=e-r[2]:n=0,t<r[1]?i=r[1]-t:r[3]<t?i=t-r[3]:i=0,n*n+i*i}function ws(r,e){return O_(r,e[0],e[1])}function Eo(r,e){return r[0]<=e[0]&&e[2]<=r[2]&&r[1]<=e[1]&&e[3]<=r[3]}function O_(r,e,t){return r[0]<=e&&e<=r[2]&&r[1]<=t&&t<=r[3]}function Am(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=e[0],s=e[1],A=Hi.UNKNOWN;return o<t?A=A|Hi.LEFT:o>i&&(A=A|Hi.RIGHT),s<n?A=A|Hi.BELOW:s>a&&(A=A|Hi.ABOVE),A===Hi.UNKNOWN&&(A=Hi.INTERSECTING),A}function di(){return[1/0,1/0,-1/0,-1/0]}function no(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 Iu(r){return no(1/0,1/0,-1/0,-1/0,r)}function Bh(r,e){var t=r[0],n=r[1];return no(t,n,t,n,e)}function G9(r,e){var t=Iu(e);return HS(t,r)}function M_(r,e,t,n,i){var a=Iu(i);return GS(a,r,e,t,n)}function k9(r,e){var t=Iu(e);return v2(t,r)}function nA(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function $9(r,e,t){return Math.abs(r[0]-e[0])<t&&Math.abs(r[2]-e[2])<t&&Math.abs(r[1]-e[1])<t&&Math.abs(r[3]-e[3])<t}function mu(r,e){return e[0]<r[0]&&(r[0]=e[0]),e[2]>r[2]&&(r[2]=e[2]),e[1]<r[1]&&(r[1]=e[1]),e[3]>r[3]&&(r[3]=e[3]),r}function Th(r,e){e[0]<r[0]&&(r[0]=e[0]),e[0]>r[2]&&(r[2]=e[0]),e[1]<r[1]&&(r[1]=e[1]),e[1]>r[3]&&(r[3]=e[1])}function HS(r,e){for(var t=0,n=e.length;t<n;++t)Th(r,e[t]);return r}function GS(r,e,t,n,i){for(;t<n;t+=i)g2(r,e[t],e[t+1]);return r}function v2(r,e){for(var t=0,n=e.length;t<n;++t)HS(r,e[t]);return r}function g2(r,e,t){r[0]=Math.min(r[0],e),r[1]=Math.min(r[1],t),r[2]=Math.max(r[2],e),r[3]=Math.max(r[3],t)}function P_(r,e){var t;return t=e(Wv(r)),t||(t=e(lp(r)),t)||(t=e(qv(r)),t)||(t=e(Ss(r)),t)?t:!1}function wv(r){var e=0;return up(r)||(e=Fr(r)*ei(r)),e}function Wv(r){return[r[0],r[1]]}function lp(r){return[r[2],r[1]]}function wa(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function y2(r,e){var t;return e===bd.BOTTOM_LEFT?t=Wv(r):e===bd.BOTTOM_RIGHT?t=lp(r):e===bd.TOP_LEFT?t=Ss(r):e===bd.TOP_RIGHT?t=qv(r):_e(!1,13),t}function V9(r,e){var t=Math.min(r[0],e[0]),n=Math.min(r[1],e[1]),i=Math.max(r[2],e[2]),a=Math.max(r[3],e[3]);return(i-t)*(a-n)}function xh(r,e,t,n,i){var a=e*n[0]/2,o=e*n[1]/2,s=Math.cos(t),A=Math.sin(t),l=a*s,u=a*A,h=o*s,c=o*A,f=r[0],d=r[1],v=f-l+c,y=f-l-c,m=f+l-c,w=f+l+c,C=d-u-h,B=d-u+h,R=d+u+h,O=d+u-h;return no(Math.min(v,y,m,w),Math.min(C,B,R,O),Math.max(v,y,m,w),Math.max(C,B,R,O),i)}function ei(r){return r[3]-r[1]}function j9(r,e){var t=Ko(r,e);return wv(t)}function Ko(r,e,t){var n=t||di();return In(r,e)?(r[0]>e[0]?n[0]=r[0]:n[0]=e[0],r[1]>e[1]?n[1]=r[1]:n[1]=e[1],r[2]<e[2]?n[2]=r[2]:n[2]=e[2],r[3]<e[3]?n[3]=r[3]:n[3]=e[3]):Iu(n),n}function K9(r){return Fr(r)+ei(r)}function Y9(r){return[r[2]-r[0],r[3]-r[1]]}function Ss(r){return[r[0],r[3]]}function qv(r){return[r[2],r[3]]}function Fr(r){return r[2]-r[0]}function In(r,e){return r[0]<=e[2]&&r[2]>=e[0]&&r[1]<=e[3]&&r[3]>=e[1]}function up(r){return r[2]<r[0]||r[3]<r[1]}function m2(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r}function _2(r,e){var t=(r[2]-r[0])/2*(e-1),n=(r[3]-r[1])/2*(e-1);r[0]-=t,r[2]+=t,r[1]-=n,r[3]+=n}function w2(r,e,t){var n=!1,i=Am(r,e),a=Am(r,t);if(i===Hi.INTERSECTING||a===Hi.INTERSECTING)n=!0;else{var o=r[0],s=r[1],A=r[2],l=r[3],u=e[0],h=e[1],c=t[0],f=t[1],d=(f-h)/(c-u),v=void 0,y=void 0;a&Hi.ABOVE&&!(i&Hi.ABOVE)&&(v=c-(f-l)/d,n=v>=o&&v<=A),!n&&a&Hi.RIGHT&&!(i&Hi.RIGHT)&&(y=f-(c-A)*d,n=y>=s&&y<=l),!n&&a&Hi.BELOW&&!(i&Hi.BELOW)&&(v=c-(f-s)/d,n=v>=o&&v<=A),!n&&a&Hi.LEFT&&!(i&Hi.LEFT)&&(y=f-(c-o)*d,n=y>=s&&y<=l)}return n}function kS(r,e,t,n){var i=[];if(n>1)for(var a=r[2]-r[0],o=r[3]-r[1],s=0;s<n;++s)i.push(r[0]+a*s/n,r[1],r[2],r[1]+o*s/n,r[2]-a*s/n,r[3],r[0],r[3]-o*s/n);else i=[r[0],r[1],r[2],r[1],r[2],r[3],r[0],r[3]];e(i,i,2);for(var A=[],l=[],s=0,u=i.length;s<u;s+=2)A.push(i[s]),l.push(i[s+1]);return H9(A,l,t)}function E2(r,e){var t=e.getExtent(),n=wa(r);if(e.canWrapX()&&(n[0]<t[0]||n[0]>=t[2])){var i=Fr(t),a=Math.floor((n[0]-t[0])/i),o=a*i;r[0]-=o,r[2]-=o}return r}var z9=Object.freeze(Object.defineProperty({__proto__:null,boundingExtent:ki,buffer:Qa,clone:QS,closestSquaredDistanceXY:Fu,containsCoordinate:ws,containsExtent:Eo,containsXY:O_,coordinateRelationship:Am,createEmpty:di,createOrUpdate:no,createOrUpdateEmpty:Iu,createOrUpdateFromCoordinate:Bh,createOrUpdateFromCoordinates:G9,createOrUpdateFromFlatCoordinates:M_,createOrUpdateFromRings:k9,equals:nA,approximatelyEquals:$9,extend:mu,extendCoordinate:Th,extendCoordinates:HS,extendFlatCoordinates:GS,extendRings:v2,extendXY:g2,forEachCorner:P_,getArea:wv,getBottomLeft:Wv,getBottomRight:lp,getCenter:wa,getCorner:y2,getEnlargedArea:V9,getForViewAndSize:xh,getHeight:ei,getIntersectionArea:j9,getIntersection:Ko,getMargin:K9,getSize:Y9,getTopLeft:Ss,getTopRight:qv,getWidth:Fr,intersects:In,isEmpty:up,returnOrUpdate:m2,scaleFromCenter:_2,intersectsSegment:w2,applyTransform:kS,wrapX:E2},Symbol.toStringTag,{value:"Module"}));function En(r,e,t){return Math.min(Math.max(r,e),t)}var X9=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),C2=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function W9(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 Sh(r,e,t,n)}function Sh(r,e,t,n){var i=t-r,a=n-e;return i*i+a*a}function q9(r){for(var e=r.length,t=0;t<e;t++){for(var n=t,i=Math.abs(r[t][t]),a=t+1;a<e;a++){var o=Math.abs(r[a][t]);o>i&&(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<e;A++)for(var l=-r[A][t]/r[t][t],u=t;u<e+1;u++)t==u?r[A][u]=0:r[A][u]+=l*r[t][u]}for(var h=new Array(e),c=e-1;c>=0;c--){h[c]=r[c][e]/r[c][c];for(var f=c-1;f>=0;f--)r[f][e]-=r[f][c]*h[c]}return h}function II(r){return r*180/Math.PI}function lu(r){return r*Math.PI/180}function uu(r,e){var t=r%e;return t*e<0?t+e:t}function kA(r,e,t){return r+t*(e-r)}function $S(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}function RI(r,e){return Math.round($S(r,e))}function ff(r,e){return Math.floor($S(r,e))}function ql(r,e){return Math.ceil($S(r,e))}var B2=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,T2=/^([a-z]*)$|^hsla?\(.*\)$/i;function KA(r){return typeof r=="string"?r:b2(r)}function x2(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 S2=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=Z9(n),e[n]=i,++t}return i}}();function _u(r){return Array.isArray(r)?r:S2(r)}function Z9(r){var e,t,n,i,a;if(T2.exec(r)&&(r=x2(r)),B2.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),OI(a)):r.indexOf("rgb(")==0?(a=r.slice(4,-1).split(",").map(Number),a.push(1),OI(a)):_e(!1,14);return a}function OI(r){return r[0]=En(r[0]+.5|0,0,255),r[1]=En(r[1]+.5|0,0,255),r[2]=En(r[2]+.5|0,0,255),r[3]=En(r[3],0,1),r}function b2(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 J9(r){return T2.test(r)&&(r=x2(r)),B2.test(r)||r.indexOf("rgba(")===0||r.indexOf("rgb(")===0}var t$=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=MI(e,t,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(e,t,n,i){var a=MI(e,t,n);this.cache_[a]=i,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function MI(r,e,t){var n=t?KA(t):"null";return e+":"+r+":"+n}var lm=new t$,e$=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 r$(r){r.stopPropagation()}var oo=e$,Dh={PROPERTYCHANGE:"propertychange"},de=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;n<i;++n){var a=arguments[n];if(a!=null)for(var o in a)a.hasOwnProperty(o)&&(t[o]=a[o])}return t};function Xh(r){for(var e in r)delete r[e]}var VS=typeof Object.values=="function"?Object.values:function(r){var e=[];for(var t in r)e.push(r[t]);return e};function Qh(r){var e;for(e in r)return!1;return!e}var n$=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)}}(),i$=function(r){n$(e,r);function e(t){var n=r.call(this)||this;return n.eventTarget_=t,n.pendingRemovals_=null,n.dispatching_=null,n.listeners_=null,n}return e.prototype.addEventListener=function(t,n){if(!(!t||!n)){var i=this.listeners_||(this.listeners_={}),a=i[t]||(i[t]=[]);a.indexOf(n)===-1&&a.push(n)}},e.prototype.dispatchEvent=function(t){var n=typeof t=="string",i=n?t:t.type,a=this.listeners_&&this.listeners_[i];if(a){var o=n?new oo(t):t;o.target||(o.target=this.eventTarget_||this);var s=this.dispatching_||(this.dispatching_={}),A=this.pendingRemovals_||(this.pendingRemovals_={});i in s||(s[i]=0,A[i]=0),++s[i];for(var l,u=0,h=a.length;u<h;++u)if("handleEvent"in a[u]?l=a[u].handleEvent(o):l=a[u].call(this,o),l===!1||o.propagationStopped){l=!1;break}if(--s[i]===0){var c=A[i];for(delete A[i];c--;)this.removeEventListener(i,Nh);delete s[i]}return l}},e.prototype.disposeInternal=function(){this.listeners_&&Xh(this.listeners_)},e.prototype.getListeners=function(t){return this.listeners_&&this.listeners_[t]||void 0},e.prototype.hasListener=function(t){return this.listeners_?t?t in this.listeners_:Object.keys(this.listeners_).length>0:!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]=Nh,++this.pendingRemovals_[t]):(i.splice(a,1),i.length===0&&delete this.listeners_[t]))}},e}(F_),Wh=i$,ye={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 Pe(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 Ev(r,e,t,n){return Pe(r,e,t,n,!0)}function Rr(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Xh(r))}var a$=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)}}(),Zv=function(r){a$(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(ye.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<i;++o)a[o]=Pe(this,t[o],n);return a}else return Pe(this,t,n)},e.prototype.onceInternal=function(t,n){var i;if(Array.isArray(t)){var a=t.length;i=new Array(a);for(var o=0;o<a;++o)i[o]=Ev(this,t[o],n)}else i=Ev(this,t,n);return n.ol_key=i,i},e.prototype.unInternal=function(t,n){var i=n.ol_key;if(i)xo(i);else if(Array.isArray(t))for(var a=0,o=t.length;a<o;++a)this.removeEventListener(t[a],n);else this.removeEventListener(t,n)},e}(Wh);Zv.prototype.on;Zv.prototype.once;Zv.prototype.un;function xo(r){if(Array.isArray(r))for(var e=0,t=r.length;e<t;++e)Rr(r[e]);else Rr(r)}var L2=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)}}(),PI=function(r){L2(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.key=n,a.oldValue=i,a}return e}(oo),o$=function(r){L2(e,r);function e(t){var n=r.call(this)||this;return n.on,n.once,n.un,pe(n),n.values_=null,t!==void 0&&n.setProperties(t),n}return e.prototype.get=function(t){var n;return this.values_&&this.values_.hasOwnProperty(t)&&(n=this.values_[t]),n},e.prototype.getKeys=function(){return this.values_&&Object.keys(this.values_)||[]},e.prototype.getProperties=function(){return this.values_&&de({},this.values_)||{}},e.prototype.hasProperties=function(){return!!this.values_},e.prototype.notify=function(t,n){var i;i="change:".concat(t),this.hasListener(i)&&this.dispatchEvent(new PI(i,t,n)),i=Dh.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new PI(i,t,n))},e.prototype.addChangeListener=function(t,n){this.addEventListener("change:".concat(t),n)},e.prototype.removeChangeListener=function(t,n){this.removeEventListener("change:".concat(t),n)},e.prototype.set=function(t,n,i){var a=this.values_||(this.values_={});if(i)a[t]=n;else{var o=a[t];a[t]=n,o!==n&&this.notify(t,o)}},e.prototype.setProperties=function(t,n){for(var i in t)this.set(i,t[i],n)},e.prototype.applyProperties=function(t){t.values_&&de(this.values_||(this.values_={}),t.values_)},e.prototype.unset=function(t,n){if(this.values_&&t in this.values_){var i=this.values_[t];delete this.values_[t],Qh(this.values_)&&(this.values_=null),n||this.notify(t,i)}},e}(Zv),ni=o$,Nr={OPACITY:"opacity",VISIBLE:"visible",EXTENT:"extent",Z_INDEX:"zIndex",MAX_RESOLUTION:"maxResolution",MIN_RESOLUTION:"minResolution",MAX_ZOOM:"maxZoom",MIN_ZOOM:"minZoom",SOURCE:"source",MAP:"map"},s$=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)}}(),A$=function(r){s$(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un,n.background_=t.background;var i=de({},t);return typeof t.properties=="object"&&(delete i.properties,de(i,t.properties)),i[Nr.OPACITY]=t.opacity!==void 0?t.opacity:1,_e(typeof i[Nr.OPACITY]=="number",64),i[Nr.VISIBLE]=t.visible!==void 0?t.visible:!0,i[Nr.Z_INDEX]=t.zIndex,i[Nr.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,i[Nr.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,i[Nr.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,i[Nr.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,n.className_=i.className!==void 0?i.className:"ol-layer",delete i.className,n.setProperties(i),n.state_=null,n}return e.prototype.getBackground=function(){return this.background_},e.prototype.getClassName=function(){return this.className_},e.prototype.getLayerState=function(t){var n=this.state_||{layer:this,managed:t===void 0?!0:t},i=this.getZIndex();return n.opacity=En(Math.round(this.getOpacity()*100)/100,0,1),n.visible=this.getVisible(),n.extent=this.getExtent(),n.zIndex=i===void 0&&!n.managed?1/0:i,n.maxResolution=this.getMaxResolution(),n.minResolution=Math.max(this.getMinResolution(),0),n.minZoom=this.getMinZoom(),n.maxZoom=this.getMaxZoom(),this.state_=n,n},e.prototype.getLayersArray=function(t){return Ee()},e.prototype.getLayerStatesArray=function(t){return Ee()},e.prototype.getExtent=function(){return this.get(Nr.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(Nr.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(Nr.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(Nr.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(Nr.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(Nr.OPACITY)},e.prototype.getSourceState=function(){return Ee()},e.prototype.getVisible=function(){return this.get(Nr.VISIBLE)},e.prototype.getZIndex=function(){return this.get(Nr.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Nr.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(Nr.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(Nr.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(Nr.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(Nr.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){_e(typeof t=="number",64),this.set(Nr.OPACITY,t)},e.prototype.setVisible=function(t){this.set(Nr.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(Nr.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),r.prototype.disposeInternal.call(this)},e}(ni),jS=A$,to={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Oa={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},l$=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)}}(),u$=function(r){l$(e,r);function e(t){var n=this,i=de({},t);delete i.source,n=r.call(this,i)||this,n.on,n.once,n.un,n.mapPrecomposeKey_=null,n.mapRenderKey_=null,n.sourceChangeKey_=null,n.renderer_=null,n.rendered=!1,t.render&&(n.render=t.render),t.map&&n.setMap(t.map),n.addChangeListener(Nr.SOURCE,n.handleSourcePropertyChange_);var a=t.source?t.source:null;return n.setSource(a),n}return e.prototype.getLayersArray=function(t){var n=t||[];return n.push(this),n},e.prototype.getLayerStatesArray=function(t){var n=t||[];return n.push(this.getLayerState()),n},e.prototype.getSource=function(){return this.get(Nr.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Oa.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Rr(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=Pe(t,ye.CHANGE,this.handleSourceChange_,this)),this.changed()},e.prototype.getFeatures=function(t){return this.renderer_?this.renderer_.getFeatures(t):new Promise(function(n){return n([])})},e.prototype.getData=function(t){return!this.renderer_||!this.rendered?null:this.renderer_.getData(t)},e.prototype.render=function(t,n){var i=this.getRenderer();if(i.prepareFrame(t))return this.rendered=!0,i.renderFrame(t,n)},e.prototype.unrender=function(){this.rendered=!1},e.prototype.setMapInternal=function(t){t||this.unrender(),this.set(Nr.MAP,t)},e.prototype.getMapInternal=function(){return this.get(Nr.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Rr(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Rr(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=Pe(t,to.PRECOMPOSE,function(n){var i=n,a=i.frameState.layerStatesArray,o=this.getLayerState(!1);_e(!a.some(function(s){return s.layer===o.layer}),67),a.push(o)},this),this.mapRenderKey_=Pe(this,ye.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Nr.SOURCE,t)},e.prototype.getRenderer=function(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_},e.prototype.hasRenderer=function(){return!!this.renderer_},e.prototype.createRenderer=function(){return null},e.prototype.disposeInternal=function(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_),this.setSource(null),r.prototype.disposeInternal.call(this)},e}(jS);function um(r,e){if(!r.visible)return!1;var t=e.resolution;if(t<r.minResolution||t>=r.maxResolution)return!1;var n=e.zoom;return n>r.minZoom&&n<=r.maxZoom}var qh=u$;function ad(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 F2(r,e){for(var t=(""+r).split("."),n=(""+e).split("."),i=0;i<Math.max(t.length,n.length);i++){var a=parseInt(t[i]||"0",10),o=parseInt(n[i]||"0",10);if(a>o)return 1;if(o>a)return-1}return 0}function I2(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function h$(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),h=i+t*A/u,c=a+t*l/u;return[h,c]}function KS(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,h=l-s,c=u===0&&h===0?0:(u*(t-o)+h*(n-s))/(u*u+h*h||0),f,d;return c<=0?(f=o,d=s):c>=1?(f=A,d=l):(f=o+c*u,d=s+c*h),[f,d]}function fs(r,e){for(var t=!0,n=r.length-1;n>=0;--n)if(r[n]!=e[n]){t=!1;break}return t}function YS(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 R2(r,e){return r[0]*=e,r[1]*=e,r}function YA(r,e){var t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function NI(r,e){return Math.sqrt(YA(r,e))}function c$(r,e){return YA(r,KS(r,e))}function zS(r,e){if(e.canWrapX()){var t=Fr(e.getExtent()),n=O2(r,e,t);n&&(r[0]-=n*t)}return r}function O2(r,e,t){var n=e.getExtent(),i=0;if(e.canWrapX()&&(r[0]<n[0]||r[0]>n[2])){var a=t||Fr(n);i=Math.floor((r[0]-n[0])/a)}return i}var f$=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)}}(),p$=function(r){f$(e,r);function e(t){var n=r.call(this)||this;return n.map_=t,n}return e.prototype.dispatchRenderEvent=function(t,n){Ee()},e.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,a=t.pixelToCoordinateTransform;Da(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),Xv(a,i)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o,s,A,l){var u,h=n.viewState;function c(W,z,tt,q){return o.call(s,z,W?tt:null,q)}var f=h.projection,d=zS(t.slice(),f),v=[[0,0]];if(f.canWrapX()&&a){var y=f.getExtent(),m=Fr(y);v.push([-m,0],[m,0])}for(var w=n.layerStatesArray,C=w.length,B=[],R=[],O=0;O<v.length;O++)for(var I=C-1;I>=0;--I){var T=w[I],L=T.layer;if(L.hasRenderer()&&um(T,h)&&A.call(l,L)){var P=L.getRenderer(),S=L.getSource();if(P&&S){var x=S.getWrapX()?d:t,M=c.bind(null,T.managed);R[0]=x[0]+v[O][0],R[1]=x[1]+v[O][1],u=P.forEachFeatureAtCoordinate(R,n,i,M,B)}if(u)return u}}if(B.length!==0){var D=1/B.length;return B.forEach(function(W,z){return W.distanceSq+=z*D}),B.sort(function(W,z){return W.distanceSq-z.distanceSq}),B.some(function(W){return u=W.callback(W.feature,W.layer,W.geometry)}),u}},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){return Ee()},e.prototype.hasFeatureAtCoordinate=function(t,n,i,a,o,s){var A=this.forEachFeatureAtCoordinate(t,n,i,a,Js,this,o,s);return A!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Ee()},e.prototype.scheduleExpireIconCache=function(t){lm.canExpireCache()&&t.postRenderFunctions.push(d$)},e}(F_);function d$(r,e){lm.expire()}var v$=p$,g$=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)}}(),y$=function(r){g$(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}(oo),Zd=y$,my="ol-hidden",m$="ol-selectable",iA="ol-unselectable",UI="ol-unsupported",Zh="ol-control",hm="ol-collapsed",_$=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"),DI=["style","variant","weight","size","lineHeight","family"],M2=function(r){var e=r.match(_$);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=DI.length;n<i;++n){var a=e[n+1];a!==void 0&&(t[DI[n]]=a)}return t.families=t.family.split(/,\s?/),t};function P2(r){return r===1?"":String(Math.round(r*100)/100)}function Ha(r,e,t,n){var i;return t&&t.length?i=t.shift():R_?i=new OffscreenCanvas(r||300,e||300):i=document.createElement("canvas"),r&&(i.width=r),e&&(i.height=e),i.getContext("2d",n)}function w$(r){var e=r.offsetWidth,t=getComputedStyle(r);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function E$(r){var e=r.offsetHeight,t=getComputedStyle(r);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function kf(r,e){var t=e.parentNode;t&&t.replaceChild(r,e)}function cm(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function N2(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function C$(r,e){for(var t=r.childNodes,n=0;;++n){var i=t[n],a=e[n];if(!i&&!a)break;if(i!==a){if(!i){r.appendChild(a);continue}if(!a){r.removeChild(i),--n;continue}r.insertBefore(a,i)}}}var U2="10px sans-serif",zA="#000",fm="round",Cv=[],Bv=0,$f="round",Tv=10,xv="#000",Sv="center",pm="middle",vh=[0,0,0,0],bv=1,DA=new ni,B$=new Wh;B$.setSize=function(){console.warn("labelCache is deprecated.")};var tf=null,uB,hB={},T$=function(){var r=100,e="32px ",t=["monospace","serif"],n=t.length,i="wmytzilWMYTZIL@#/&?$%10",a,o;function s(l,u,h){for(var c=!0,f=0;f<n;++f){var d=t[f];if(o=dm(l+" "+u+" "+e+d,i),h!=d){var v=dm(l+" "+u+" "+e+h+","+d,i);c=c&&v!=o}}return!!c}function A(){for(var l=!0,u=DA.getKeys(),h=0,c=u.length;h<c;++h){var f=u[h];DA.get(f)<r&&(s.apply(this,f.split(`
|
||
`))?(Xh(hB),tf=null,uB=void 0,DA.set(f,r)):(DA.set(f,DA.get(f)+1,!0),l=!1))}l&&(clearInterval(a),a=void 0)}return function(l){var u=M2(l);if(u)for(var h=u.families,c=0,f=h.length;c<f;++c){var d=h[c],v=u.style+`
|
||
`+u.weight+`
|
||
`+d;DA.get(v)===void 0&&(DA.set(v,r,!0),s(u.style,u.weight,d)||(DA.set(v,0,!0),a===void 0&&(a=setInterval(A,32))))}}}(),x$=function(){var r;return function(e){var t=hB[e];if(t==null){if(R_){var n=M2(e),i=D2(e,"Žg"),a=isNaN(Number(n.lineHeight))?1.2:Number(n.lineHeight);t=a*(i.actualBoundingBoxAscent+i.actualBoundingBoxDescent)}else r||(r=document.createElement("div"),r.innerHTML="M",r.style.minHeight="0",r.style.maxHeight="none",r.style.height="auto",r.style.padding="0",r.style.border="none",r.style.position="absolute",r.style.display="block",r.style.left="-99999px"),r.style.font=e,document.body.appendChild(r),t=r.offsetHeight,document.body.removeChild(r);hB[e]=t}return t}}();function D2(r,e){return tf||(tf=Ha(1,1)),r!=uB&&(tf.font=r,uB=tf.font),tf.measureText(e)}function dm(r,e){return D2(r,e).width}function QI(r,e,t){if(e in t)return t[e];var n=dm(r,e);return t[e]=n,n}function S$(r,e){for(var t=[],n=[],i=[],a=0,o=0,s=0,A=0,l=0,u=e.length;l<=u;l+=2){var h=e[l];if(h===`
|
||
`||l===u){a=Math.max(a,o),i.push(o),o=0,s+=A;continue}var c=e[l+1]||r.font,f=dm(c,h);t.push(f),o+=f;var d=x$(c);n.push(d),A=Math.max(A,d)}return{width:a,height:s,widths:t,heights:n,lineWidths:i}}function b$(r,e,t,n,i,a,o,s,A,l,u){r.save(),t!==1&&(r.globalAlpha*=t),e&&r.setTransform.apply(r,e),n.contextInstructions?(r.translate(A,l),r.scale(u[0],u[1]),L$(n,r)):u[0]<0||u[1]<0?(r.translate(A,l),r.scale(u[0],u[1]),r.drawImage(n,i,a,o,s,0,0,o,s)):r.drawImage(n,i,a,o,s,A,l,o*u[0],s*u[1]),r.restore()}function L$(r,e){for(var t=r.contextInstructions,n=0,i=t.length;n<i;n+=2)Array.isArray(t[n+1])?e[t[n]].apply(e,t[n+1]):e[t[n]]=t[n+1]}var F$=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)}}(),I$=function(r){F$(e,r);function e(t){var n=r.call(this,t)||this;n.fontChangeListenerKey_=Pe(DA,Dh.PROPERTYCHANGE,t.redrawText.bind(t)),n.element_=document.createElement("div");var i=n.element_.style;i.position="absolute",i.width="100%",i.height="100%",i.zIndex="0",n.element_.className=iA+" ol-layers";var a=t.getViewport();return a.insertBefore(n.element_,a.firstChild||null),n.children_=[],n.renderedVisible_=!0,n}return e.prototype.dispatchRenderEvent=function(t,n){var i=this.getMap();if(i.hasListener(t)){var a=new Zd(t,void 0,n);i.dispatchEvent(a)}},e.prototype.disposeInternal=function(){Rr(this.fontChangeListenerKey_),this.element_.parentNode.removeChild(this.element_),r.prototype.disposeInternal.call(this)},e.prototype.renderFrame=function(t){if(!t){this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1);return}this.calculateMatrices2D(t),this.dispatchRenderEvent(to.PRECOMPOSE,t);var n=t.layerStatesArray.sort(function(f,d){return f.zIndex-d.zIndex}),i=t.viewState;this.children_.length=0;for(var a=[],o=null,s=0,A=n.length;s<A;++s){var l=n[s];t.layerIndex=s;var u=l.layer,h=u.getSourceState();if(!um(l,i)||h!=Oa.READY&&h!=Oa.UNDEFINED){u.unrender();continue}var c=u.render(t,o);c&&(c!==o&&(this.children_.push(c),o=c),"getDeclutter"in u&&a.push(u))}for(var s=a.length-1;s>=0;--s)a[s].renderDeclutter(t);C$(this.element_,this.children_),this.dispatchRenderEvent(to.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 h=A[u],c=h.layer;if(c.hasRenderer()&&um(h,s)&&o(c)){var f=c.getRenderer(),d=f.getDataAtPixel(t,n,i);if(d){var v=a(c,d);if(v)return v}}}},e}(v$),Q2=I$,Un={ADD:"add",REMOVE:"remove"},H2=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)}}(),HI={LENGTH:"length"},_y=function(r){H2(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.element=n,a.index=i,a}return e}(oo),R$=function(r){H2(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;o<s;++o)i.assertUnique_(i.array_[o],o);return i.updateLength_(),i}return e.prototype.clear=function(){for(;this.getLength()>0;)this.pop()},e.prototype.extend=function(t){for(var n=0,i=t.length;n<i;++n)this.push(t[n]);return this},e.prototype.forEach=function(t){for(var n=this.array_,i=0,a=n.length;i<a;++i)t(n[i],i,n)},e.prototype.getArray=function(){return this.array_},e.prototype.item=function(t){return this.array_[t]},e.prototype.getLength=function(){return this.get(HI.LENGTH)},e.prototype.insertAt=function(t,n){this.unique_&&this.assertUnique_(n),this.array_.splice(t,0,n),this.updateLength_(),this.dispatchEvent(new _y(Un.ADD,n,t))},e.prototype.pop=function(){return this.removeAt(this.getLength()-1)},e.prototype.push=function(t){this.unique_&&this.assertUnique_(t);var n=this.getLength();return this.insertAt(n,t),this.getLength()},e.prototype.remove=function(t){for(var n=this.array_,i=0,a=n.length;i<a;++i)if(n[i]===t)return this.removeAt(i)},e.prototype.removeAt=function(t){var n=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new _y(Un.REMOVE,n,t)),n},e.prototype.setAt=function(t,n){var i=this.getLength();if(t<i){this.unique_&&this.assertUnique_(n,t);var a=this.array_[t];this.array_[t]=n,this.dispatchEvent(new _y(Un.REMOVE,a,t)),this.dispatchEvent(new _y(Un.ADD,n,t))}else{for(var o=i;o<t;++o)this.insertAt(o,void 0);this.insertAt(t,n)}},e.prototype.updateLength_=function(){this.set(HI.LENGTH,this.array_.length)},e.prototype.assertUnique_=function(t,n){for(var i=0,a=this.array_.length;i<a;++i)if(this.array_[i]===t&&i!==n)throw new d2(58)},e}(ni),ti=R$,G2=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)}}(),zl=function(r){G2(e,r);function e(t,n){var i=r.call(this,t)||this;return i.layer=n,i}return e}(oo),Kw={LAYERS:"layers"},O$=function(r){G2(e,r);function e(t){var n=this,i=t||{},a=de({},i);delete a.layers;var o=i.layers;return n=r.call(this,a)||this,n.on,n.once,n.un,n.layersListenerKeys_=[],n.listenerKeys_={},n.addChangeListener(Kw.LAYERS,n.handleLayersChanged_),o?Array.isArray(o)?o=new ti(o.slice(),{unique:!0}):_e(typeof o.getArray=="function",43):o=new ti(void 0,{unique:!0}),n.setLayers(o),n}return e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(Rr),this.layersListenerKeys_.length=0;var t=this.getLayers();this.layersListenerKeys_.push(Pe(t,Un.ADD,this.handleLayersAdd_,this),Pe(t,Un.REMOVE,this.handleLayersRemove_,this));for(var n in this.listenerKeys_)this.listenerKeys_[n].forEach(Rr);Xh(this.listenerKeys_);for(var i=t.getArray(),a=0,o=i.length;a<o;a++){var s=i[a];this.registerLayerListeners_(s),this.dispatchEvent(new zl("addlayer",s))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[Pe(t,Dh.PROPERTYCHANGE,this.handleLayerChange_,this),Pe(t,ye.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push(Pe(t,"addlayer",this.handleLayerGroupAdd_,this),Pe(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[pe(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new zl("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new zl("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var n=t.element;this.registerLayerListeners_(n),this.dispatchEvent(new zl("addlayer",n)),this.changed()},e.prototype.handleLayersRemove_=function(t){var n=t.element,i=pe(n);this.listenerKeys_[i].forEach(Rr),delete this.listenerKeys_[i],this.dispatchEvent(new zl("removelayer",n)),this.changed()},e.prototype.getLayers=function(){return this.get(Kw.LAYERS)},e.prototype.setLayers=function(t){var n=this.getLayers();if(n)for(var i=n.getArray(),a=0,o=i.length;a<o;++a)this.dispatchEvent(new zl("removelayer",i[a]));this.set(Kw.LAYERS,t)},e.prototype.getLayersArray=function(t){var n=t!==void 0?t:[];return this.getLayers().forEach(function(i){i.getLayersArray(n)}),n},e.prototype.getLayerStatesArray=function(t){var n=t!==void 0?t:[],i=n.length;this.getLayers().forEach(function(u){u.getLayerStatesArray(n)});var a=this.getLayerState(),o=a.zIndex;!t&&a.zIndex===void 0&&(o=0);for(var s=i,A=n.length;s<A;s++){var l=n[s];l.opacity*=a.opacity,l.visible=l.visible&&a.visible,l.maxResolution=Math.min(l.maxResolution,a.maxResolution),l.minResolution=Math.max(l.minResolution,a.minResolution),l.minZoom=Math.max(l.minZoom,a.minZoom),l.maxZoom=Math.min(l.maxZoom,a.maxZoom),a.extent!==void 0&&(l.extent!==void 0?l.extent=Ko(l.extent,a.extent):l.extent=a.extent),l.zIndex===void 0&&(l.zIndex=o)}return n},e.prototype.getSourceState=function(){return Oa.READY},e}(jS),Jv=O$,M$=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)}}(),P$=function(r){M$(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.map=n,a.frameState=i!==void 0?i:null,a}return e}(oo),ef=P$,N$=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)}}(),U$=function(r){N$(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,o)||this;return s.originalEvent=i,s.pixel_=null,s.coordinate_=null,s.dragging=a!==void 0?a:!1,s}return Object.defineProperty(e.prototype,"pixel",{get:function(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_},set:function(t){this.pixel_=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"coordinate",{get:function(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_},set:function(t){this.coordinate_=t},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){r.prototype.preventDefault.call(this),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()},e.prototype.stopPropagation=function(){r.prototype.stopPropagation.call(this),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()},e}(ef),HA=U$,rr={SINGLECLICK:"singleclick",CLICK:ye.CLICK,DBLCLICK:ye.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},Vs={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},D$=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)}}(),Q$=function(r){D$(e,r);function e(t,n){var i=r.call(this,t)||this;i.map_=t,i.clickTimeoutId_,i.emulateClicks_=!1,i.dragging_=!1,i.dragListenerKeys_=[],i.moveTolerance_=n===void 0?1:n,i.down_=null;var a=i.map_.getViewport();return i.activePointers_=0,i.trackedTouches_={},i.element_=a,i.pointerdownListenerKey_=Pe(a,Vs.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=Pe(a,Vs.POINTERMOVE,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(ye.TOUCHMOVE,i.boundHandleTouchMove_,p2?{passive:!1}:!1),i}return e.prototype.emulateClick_=function(t){var n=new HA(rr.CLICK,this.map_,t);this.dispatchEvent(n),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new HA(rr.DBLCLICK,this.map_,t),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var i=new HA(rr.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var n=t;n.type==rr.POINTERUP||n.type==rr.POINTERCANCEL?delete this.trackedTouches_[n.pointerId]:n.type==rr.POINTERDOWN&&(this.trackedTouches_[n.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var n=new HA(rr.POINTERUP,this.map_,t);this.dispatchEvent(n),this.emulateClicks_&&!n.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),this.activePointers_===0&&(this.dragListenerKeys_.forEach(Rr),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)},e.prototype.isMouseActionButton_=function(t){return t.button===0},e.prototype.handlePointerDown_=function(t){this.emulateClicks_=this.activePointers_===0,this.updateActivePointers_(t);var n=new HA(rr.POINTERDOWN,this.map_,t);this.dispatchEvent(n),this.down_={};for(var i in t){var a=t[i];this.down_[i]=typeof a=="function"?Nh:a}if(this.dragListenerKeys_.length===0){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Pe(o,rr.POINTERMOVE,this.handlePointerMove_,this),Pe(o,rr.POINTERUP,this.handlePointerUp_,this),Pe(this.element_,rr.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(Pe(this.element_.getRootNode(),rr.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var n=new HA(rr.POINTERDRAG,this.map_,t,this.dragging_);this.dispatchEvent(n)}},e.prototype.relayEvent_=function(t){this.originalPointerMoveEvent_=t;var n=!!(this.down_&&this.isMoving_(t));this.dispatchEvent(new HA(t.type,this.map_,t,n))},e.prototype.handleTouchMove_=function(t){var n=this.originalPointerMoveEvent_;(!n||n.defaultPrevented)&&(typeof t.cancelable!="boolean"||t.cancelable===!0)&&t.preventDefault()},e.prototype.isMoving_=function(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_},e.prototype.disposeInternal=function(){this.relayedListenerKey_&&(Rr(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(ye.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Rr(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Rr),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},e}(Wh),H$=Q$,Gs={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Kn={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},vm=1/0,G$=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,Xh(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){_e(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=vm?(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<i>>1;){var A=this.getLeftChildIndex_(e),l=this.getRightChildIndex_(e),u=l<i&&n[l]<n[A]?l:A;t[e]=t[u],n[e]=n[u],e=u}t[e]=a,n[e]=o,this.siftDown_(s,e)},r.prototype.siftDown_=function(e,t){for(var n=this.elements_,i=this.priorities_,a=n[t],o=i[t];t>e;){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;s<a;++s)o=t[s],A=e(o),A==vm?delete this.queuedElements_[this.keyFunction_(o)]:(n[i]=A,t[i++]=o);t.length=i,n.length=i,this.heapify_()},r}(),k$=G$,ge={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},$$=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),V$=function(r){$$(e,r);function e(t,n){var i=r.call(this,function(a){return t.apply(null,a)},function(a){return a[0].getKey()})||this;return i.boundHandleTileChange_=i.handleTileChange.bind(i),i.tileChangeCallback_=n,i.tilesLoading_=0,i.tilesLoadingKeys_={},i}return e.prototype.enqueue=function(t){var n=r.prototype.enqueue.call(this,t);if(n){var i=t[0];i.addEventListener(ye.CHANGE,this.boundHandleTileChange_)}return n},e.prototype.getTilesLoading=function(){return this.tilesLoading_},e.prototype.handleTileChange=function(t){var n=t.target,i=n.getState();if(i===ge.LOADED||i===ge.ERROR||i===ge.EMPTY){n.removeEventListener(ye.CHANGE,this.boundHandleTileChange_);var a=n.getKey();a in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[a],--this.tilesLoading_),this.tileChangeCallback_()}},e.prototype.loadMoreTiles=function(t,n){for(var i=0,a,o,s;this.tilesLoading_<t&&i<n&&this.getCount()>0;)o=this.dequeue()[0],s=o.getKey(),a=o.getState(),a===ge.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++i,o.load())},e}(k$),j$=V$;function K$(r,e,t,n,i){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return vm;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 st={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"},hp={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},Es={};Es[hp.RADIANS]=6370997/(2*Math.PI);Es[hp.DEGREES]=2*Math.PI*6370997/360;Es[hp.FEET]=.3048;Es[hp.METERS]=1;Es[hp.USFEET]=1200/3937;var Ma=hp,fn={ANIMATING:0,INTERACTING:1},mo={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},Y$=42,XS=256,z$=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_||Es[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}(),ul=z$,X$=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)}}(),tg=6378137,pf=Math.PI*tg,W$=[-pf,-pf,pf,pf],q$=[-180,-85,180,85],wy=tg*Math.log(Math.tan(Math.PI/2)),Pc=function(r){X$(e,r);function e(t){return r.call(this,{code:t,units:Ma.METERS,extent:W$,global:!0,worldExtent:q$,getPointResolution:function(n,i){return n/X9(i[1]/tg)}})||this}return e}(ul),GI=[new Pc("EPSG:3857"),new Pc("EPSG:102100"),new Pc("EPSG:102113"),new Pc("EPSG:900913"),new Pc("http://www.opengis.net/def/crs/EPSG/0/3857"),new Pc("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Z$(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<n;o+=i){a[o]=pf*r[o]/180;var s=tg*Math.log(Math.tan(Math.PI*(+r[o+1]+90)/360));s>wy?s=wy:s<-wy&&(s=-wy),a[o+1]=s}return a}function J$(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<n;o+=i)a[o]=180*r[o]/pf,a[o+1]=360*Math.atan(Math.exp(r[o+1]/tg))/Math.PI-90;return a}var tV=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)}}(),eV=6378137,kI=[-180,-90,180,90],rV=Math.PI*eV/180,Wu=function(r){tV(e,r);function e(t,n){return r.call(this,{code:t,units:Ma.DEGREES,extent:kI,axisOrientation:n,global:!0,metersPerUnit:rV,worldExtent:kI})||this}return e}(ul),$I=[new Wu("CRS:84"),new Wu("EPSG:4326","neu"),new Wu("urn:ogc:def:crs:OGC:1.3:CRS84"),new Wu("urn:ogc:def:crs:OGC:2:84"),new Wu("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Wu("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Wu("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],cB={};function nV(r){return cB[r]||cB[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function iV(r,e){cB[r]=e}var bf={};function Vf(r,e,t){var n=r.getCode(),i=e.getCode();n in bf||(bf[n]={}),bf[n][i]=t}function k2(r,e){var t;return r in bf&&e in bf[r]&&(t=bf[r][e]),t}var $2=63710088e-1;function gm(r,e,t){var n=t||$2,i=lu(r[1]),a=lu(e[1]),o=(a-i)/2,s=lu(e[0]-r[0])/2,A=Math.sin(o)*Math.sin(o)+Math.sin(s)*Math.sin(s)*Math.cos(i)*Math.cos(a);return 2*n*Math.atan2(Math.sqrt(A),Math.sqrt(1-A))}function aV(r,e,t,n){var i=n||$2,a=lu(r[1]),o=lu(r[0]),s=e/i,A=Math.asin(Math.sin(a)*Math.cos(s)+Math.cos(a)*Math.sin(s)*Math.cos(t)),l=o+Math.atan2(Math.sin(t)*Math.sin(s)*Math.cos(a),Math.cos(s)-Math.sin(a)*Math.sin(A));return[II(l),II(A)]}var fB=!0;function oV(r){var e=r===void 0?!0:r;fB=!e}function WS(r,e,t){var n;if(e!==void 0){for(var i=0,a=r.length;i<a;++i)e[i]=r[i];n=e}else n=r.slice();return n}function N_(r,e,t){if(e!==void 0&&r!==e){for(var n=0,i=r.length;n<i;++n)e[n]=r[n];r=e}return r}function V2(r){iV(r.getCode(),r),Vf(r,r,WS)}function sV(r){r.forEach(V2)}function Ie(r){return typeof r=="string"?nV(r):r||null}function ym(r,e,t,n){r=Ie(r);var i,a=r.getPointResolutionFunc();if(a){if(i=a(e,t),n&&n!==r.getUnits()){var o=r.getMetersPerUnit();o&&(i=i*o/Es[n])}}else{var s=r.getUnits();if(s==Ma.DEGREES&&!n||n==Ma.DEGREES)i=e;else{var A=Hh(r,Ie("EPSG:4326"));if(A===N_&&s!==Ma.DEGREES)i=e*r.getMetersPerUnit();else{var l=[t[0]-e/2,t[1],t[0]+e/2,t[1],t[0],t[1]-e/2,t[0],t[1]+e/2];l=A(l,l,2);var u=gm(l.slice(0,2),l.slice(2,4)),h=gm(l.slice(4,6),l.slice(6,8));i=(u+h)/2}var o=n?Es[n]:r.getMetersPerUnit();o!==void 0&&(i/=o)}}return i}function pB(r){sV(r),r.forEach(function(e){r.forEach(function(t){e!==t&&Vf(e,t,WS)})})}function AV(r,e,t,n){r.forEach(function(i){e.forEach(function(a){Vf(i,a,t),Vf(a,i,n)})})}function qS(r,e){return r?typeof r=="string"?Ie(r):r:Ie(e)}function VI(r){return function(e,t,n){for(var i=e.length,a=n!==void 0?n:2,o=t!==void 0?t:new Array(i),s=0;s<i;s+=a){var A=r([e[s],e[s+1]]);o[s]=A[0],o[s+1]=A[1];for(var l=a-1;l>=2;--l)o[s+l]=e[s+l]}return o}}function lV(r,e,t,n){var i=Ie(r),a=Ie(e);Vf(i,a,VI(t)),Vf(a,i,VI(n))}function js(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var n=Hh(r,e);return n===WS&&t}function Hh(r,e){var t=r.getCode(),n=e.getCode(),i=k2(t,n);return i||(i=N_),i}function Lv(r,e){var t=Ie(r),n=Ie(e);return Hh(t,n)}function wu(r,e,t){var n=Lv(e,t);return n(r,void 0,r.length)}function mm(r,e,t,n){var i=Lv(e,t);return kS(r,i,void 0,n)}var uV=null;function Gh(){return uV}function jf(r,e){return r}function _n(r,e){return fB&&!fs(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(fB=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function U_(r,e){return r}function Co(r,e){return r}function hV(r,e){return r}function jI(r,e,t){return function(n){var i=n[0],a=n[1],o,s;if(r.canWrapX()){var A=r.getExtent(),l=Fr(A);s=O2(n,r,l),s&&(i=i-s*l),i=En(i,A[0],A[2]),a=En(a,A[1],A[3]),o=t([i,a])}else o=t(n);return s&&e.canWrapX()&&(o[0]+=s*Fr(e.getExtent())),o}}function cV(){pB(GI),pB($I),AV($I,GI,Z$,J$)}cV();function KI(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,h=s?s[1]:0,c=r[0]+A/2+u,f=r[2]-A/2+u,d=r[1]+l/2+h,v=r[3]-l/2+h;c>f&&(c=(f+c)/2,f=c),d>v&&(d=(v+d)/2,v=d);var y=En(n[0],c,f),m=En(n[1],d,v);if(o&&t&&i){var w=30*i;y+=-w*Math.log(1+Math.max(0,c-n[0])/w)+w*Math.log(1+Math.max(0,n[0]-f)/w),m+=-w*Math.log(1+Math.max(0,d-n[1])/w)+w*Math.log(1+Math.max(0,n[1]-v)/w)}return[y,m]}}}function fV(r){return r}function ZS(r,e,t,n){var i=Fr(e)/t[0],a=ei(e)/t[1];return n?Math.min(r,Math.max(i,a)):Math.min(r,Math.min(i,a))}function JS(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),En(n,t/2,e*2)}function pV(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?ZS(A,t,o,n):A;if(s){var h=e!==void 0?e:!0;return h?JS(i,u,l):En(i,l,u)}var c=Math.min(u,i),f=Math.floor(I_(r,c,a));return r[f]>u&&f<r.length-1?r[f+1]:r[f]}else return}}function dV(r,e,t,n,i,a){return function(o,s,A,l){if(o!==void 0){var u=i?ZS(e,i,A,a):e,h=t!==void 0?t:0;if(l){var c=n!==void 0?n:!0;return c?JS(o,u,h):En(o,h,u)}var f=1e-9,d=Math.ceil(Math.log(e/u)/Math.log(r)-f),v=-s*(.5-f)+.5,y=Math.min(u,o),m=Math.floor(Math.log(e/y)/Math.log(r)+v),w=Math.max(d,m),C=e/Math.pow(r,w);return En(C,h,u)}else return}}function YI(r,e,t,n,i){return function(a,o,s,A){if(a!==void 0){var l=n?ZS(r,n,s,i):r,u=t!==void 0?t:!0;return!u||!A?En(a,e,l):JS(a,l,e)}else return}}function tb(r){if(r!==void 0)return 0}function zI(r){if(r!==void 0)return r}function vV(r){var e=2*Math.PI/r;return function(t,n){if(n)return t;if(t!==void 0)return t=Math.floor(t/e+.5)*e,t}}function gV(r){var e=r||lu(5);return function(t,n){if(n)return t;if(t!==void 0)return Math.abs(t)<=e?0:t}}function eb(r){return Math.pow(r,3)}function Yo(r){return 1-eb(1-r)}function _m(r){return 3*r*r-2*r*r*r}function rb(r){return r}function yV(r){return r<.5?_m(2*r):1-_m(2*(r-.5))}var mV=Object.freeze(Object.defineProperty({__proto__:null,easeIn:eb,easeOut:Yo,inAndOut:_m,linear:rb,upAndDown:yV},Symbol.toStringTag,{value:"Module"})),Wt={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function hu(r,e,t,n,i,a){for(var o=a||[],s=0,A=e;A<t;A+=n){var l=r[A],u=r[A+1];o[s++]=i[0]*l+i[2]*u+i[4],o[s++]=i[1]*l+i[3]*u+i[5]}return a&&o.length!=s&&(o.length=s),o}function nb(r,e,t,n,i,a,o){for(var s=o||[],A=Math.cos(i),l=Math.sin(i),u=a[0],h=a[1],c=0,f=e;f<t;f+=n){var d=r[f]-u,v=r[f+1]-h;s[c++]=u+d*A-v*l,s[c++]=h+d*l+v*A;for(var y=f+2;y<f+n;++y)s[c++]=r[y]}return o&&s.length!=c&&(s.length=c),s}function _V(r,e,t,n,i,a,o,s){for(var A=s||[],l=o[0],u=o[1],h=0,c=e;c<t;c+=n){var f=r[c]-l,d=r[c+1]-u;A[h++]=l+i*f,A[h++]=u+a*d;for(var v=c+2;v<c+n;++v)A[h++]=r[v]}return s&&A.length!=h&&(A.length=h),A}function j2(r,e,t,n,i,a,o){for(var s=o||[],A=0,l=e;l<t;l+=n){s[A++]=r[l]+i,s[A++]=r[l+1]+a;for(var u=l+2;u<l+n;++u)s[A++]=r[u]}return o&&s.length!=A&&(s.length=A),s}var wV=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)}}(),XI=Jn(),EV=function(r){wV(e,r);function e(){var t=r.call(this)||this;return t.extent_=di(),t.extentRevision_=-1,t.simplifiedGeometryMaxMinSquaredTolerance=0,t.simplifiedGeometryRevision=0,t.simplifyTransformedInternal=x9(function(n,i,a){if(!a)return this.getSimplifiedGeometry(i);var o=this.clone();return o.applyTransform(a),o.getSimplifiedGeometry(i)}),t}return e.prototype.simplifyTransformed=function(t,n){return this.simplifyTransformedInternal(this.getRevision(),t,n)},e.prototype.clone=function(){return Ee()},e.prototype.closestPointXY=function(t,n,i,a){return Ee()},e.prototype.containsXY=function(t,n){var i=this.getClosestPoint([t,n]);return i[0]===t&&i[1]===n},e.prototype.getClosestPoint=function(t,n){var i=n||[NaN,NaN];return this.closestPointXY(t[0],t[1],i,1/0),i},e.prototype.intersectsCoordinate=function(t){return this.containsXY(t[0],t[1])},e.prototype.computeExtent=function(t){return Ee()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Iu(n),this.extentRevision_=this.getRevision()}return m2(this.extent_,t)},e.prototype.rotate=function(t,n){Ee()},e.prototype.scale=function(t,n,i){Ee()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Ee()},e.prototype.getType=function(){return Ee()},e.prototype.applyTransform=function(t){Ee()},e.prototype.intersectsExtent=function(t){return Ee()},e.prototype.translate=function(t,n){Ee()},e.prototype.transform=function(t,n){var i=Ie(t),a=i.getUnits()==Ma.TILE_PIXELS?function(o,s,A){var l=i.getExtent(),u=i.getWorldExtent(),h=ei(u)/ei(l);return Da(XI,u[0],u[3],h,-h,0,0,0),hu(o,0,o.length,A,XI,s),Lv(i,n)(o,s,A)}:Lv(i,n);return this.applyTransform(a),this},e}(ni),D_=EV,CV=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)}}(),BV=function(r){CV(e,r);function e(){var t=r.call(this)||this;return t.layout=Wt.XY,t.stride=2,t.flatCoordinates=null,t}return e.prototype.computeExtent=function(t){return M_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Ee()},e.prototype.getFirstCoordinate=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.getFlatCoordinates=function(){return this.flatCoordinates},e.prototype.getLastCoordinate=function(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)},e.prototype.getLayout=function(){return this.layout},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;var n=this.getSimplifiedGeometryInternal(t),i=n.getFlatCoordinates();return i.length<this.flatCoordinates.length?n:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)},e.prototype.getSimplifiedGeometryInternal=function(t){return this},e.prototype.getStride=function(){return this.stride},e.prototype.setFlatCoordinates=function(t,n){this.stride=dB(t),this.layout=t,this.flatCoordinates=n},e.prototype.setCoordinates=function(t,n){Ee()},e.prototype.setLayout=function(t,n,i){var a;if(t)a=dB(t);else{for(var o=0;o<i;++o)if(n.length===0){this.layout=Wt.XY,this.stride=2;return}else n=n[0];a=n.length,t=TV(a)}this.layout=t,this.stride=a},e.prototype.applyTransform=function(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())},e.prototype.rotate=function(t,n){var i=this.getFlatCoordinates();if(i){var a=this.getStride();nb(i,0,i.length,a,t,n,i),this.changed()}},e.prototype.scale=function(t,n,i){var a=n;a===void 0&&(a=t);var o=i;o||(o=wa(this.getExtent()));var s=this.getFlatCoordinates();if(s){var A=this.getStride();_V(s,0,s.length,A,t,a,o,s),this.changed()}},e.prototype.translate=function(t,n){var i=this.getFlatCoordinates();if(i){var a=this.getStride();j2(i,0,i.length,a,t,n,i),this.changed()}},e}(D_);function TV(r){var e;return r==2?e=Wt.XY:r==3?e=Wt.XYZ:r==4&&(e=Wt.XYZM),e}function dB(r){var e;return r==Wt.XY?e=2:r==Wt.XYZ||r==Wt.XYM?e=3:r==Wt.XYZM&&(e=4),e}function xV(r,e,t){var n=r.getFlatCoordinates();if(n){var i=r.getStride();return hu(n,0,n.length,i,e,t)}else return null}var Cs=BV;function WI(r,e,t,n,i,a,o){var s=r[e],A=r[e+1],l=r[t]-s,u=r[t+1]-A,h;if(l===0&&u===0)h=e;else{var c=((i-s)*l+(a-A)*u)/(l*l+u*u);if(c>1)h=t;else if(c>0){for(var f=0;f<n;++f)o[f]=kA(r[e+f],r[t+f],c);o.length=n;return}else h=e}for(var f=0;f<n;++f)o[f]=r[h+f];o.length=n}function ib(r,e,t,n,i){var a=r[e],o=r[e+1];for(e+=n;e<t;e+=n){var s=r[e],A=r[e+1],l=Sh(a,o,s,A);l>i&&(i=l),a=s,o=A}return i}function ab(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=ib(r,e,s,n,i),e=s}return i}function SV(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=ab(r,e,s,n,i),e=s[s.length-1]}return i}function ob(r,e,t,n,i,a,o,s,A,l,u){if(e==t)return l;var h,c;if(i===0)if(c=Sh(o,s,r[e],r[e+1]),c<l){for(h=0;h<n;++h)A[h]=r[e+h];return A.length=n,c}else return l;for(var f=u||[NaN,NaN],d=e+n;d<t;)if(WI(r,d-n,d,n,o,s,f),c=Sh(o,s,f[0],f[1]),c<l){for(l=c,h=0;h<n;++h)A[h]=f[h];A.length=n,d+=n}else d+=n*Math.max((Math.sqrt(c)-Math.sqrt(l))/i|0,1);if(a&&(WI(r,t-n,e,n,o,s,f),c=Sh(o,s,f[0],f[1]),c<l)){for(l=c,h=0;h<n;++h)A[h]=f[h];A.length=n}return l}function sb(r,e,t,n,i,a,o,s,A,l,u){for(var h=u||[NaN,NaN],c=0,f=t.length;c<f;++c){var d=t[c];l=ob(r,e,d,n,i,a,o,s,A,l,h),e=d}return l}function bV(r,e,t,n,i,a,o,s,A,l,u){for(var h=u||[NaN,NaN],c=0,f=t.length;c<f;++c){var d=t[c];l=sb(r,e,d,n,i,a,o,s,A,l,h),e=d[d.length-1]}return l}function K2(r,e,t,n){for(var i=0,a=t.length;i<a;++i)r[e++]=t[i];return e}function eg(r,e,t,n){for(var i=0,a=t.length;i<a;++i)for(var o=t[i],s=0;s<n;++s)r[e++]=o[s];return e}function Ab(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=eg(r,e,t[s],n);a[o++]=l,e=l}return a.length=o,a}function LV(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=Ab(r,e,t[s],n,a[o]);a[o++]=l,e=l[l.length-1]}return a.length=o,a}function lb(r,e,t,n,i,a,o){var s=(t-e)/n;if(s<3){for(;e<t;e+=n)a[o++]=r[e],a[o++]=r[e+1];return o}var A=new Array(s);A[0]=1,A[s-1]=1;for(var l=[e,t-n],u=0;l.length>0;){for(var h=l.pop(),c=l.pop(),f=0,d=r[c],v=r[c+1],y=r[h],m=r[h+1],w=c+n;w<h;w+=n){var C=r[w],B=r[w+1],R=W9(C,B,d,v,y,m);R>f&&(u=w,f=R)}f>i&&(A[(u-e)/n]=1,c+n<u&&l.push(c,u),u+n<h&&l.push(u,h))}for(var w=0;w<s;++w)A[w]&&(a[o++]=r[e+w*n],a[o++]=r[e+w*n+1]);return o}function FV(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=lb(r,e,u,n,i,a,o),s.push(o),e=u}return o}function sh(r,e){return e*Math.round(r/e)}function IV(r,e,t,n,i,a,o){if(e==t)return o;var s=sh(r[e],i),A=sh(r[e+1],i);e+=n,a[o++]=s,a[o++]=A;var l,u;do if(l=sh(r[e],i),u=sh(r[e+1],i),e+=n,e==t)return a[o++]=l,a[o++]=u,o;while(l==s&&u==A);for(;e<t;){var h=sh(r[e],i),c=sh(r[e+1],i);if(e+=n,!(h==l&&c==u)){var f=l-s,d=u-A,v=h-s,y=c-A;if(f*y==d*v&&(f<0&&v<f||f==v||f>0&&v>f)&&(d<0&&y<d||d==y||d>0&&y>d)){l=h,u=c;continue}a[o++]=l,a[o++]=u,s=l,A=u,l=h,u=c}}return a[o++]=l,a[o++]=u,o}function Y2(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=IV(r,e,u,n,i,a,o),s.push(o),e=u}return o}function RV(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A],h=[];o=Y2(r,e,u,n,i,a,o,h),s.push(h),e=u[u.length-1]}return o}function VA(r,e,t,n,i){for(var a=i!==void 0?i:[],o=0,s=e;s<t;s+=n)a[o++]=r.slice(s,s+n);return a.length=o,a}function Fv(r,e,t,n,i){for(var a=i!==void 0?i:[],o=0,s=0,A=t.length;s<A;++s){var l=t[s];a[o++]=VA(r,e,l,n,a[o]),e=l}return a.length=o,a}function vB(r,e,t,n,i){for(var a=i!==void 0?i:[],o=0,s=0,A=t.length;s<A;++s){var l=t[s];a[o++]=Fv(r,e,l,n,a[o]),e=l[l.length-1]}return a.length=o,a}function z2(r,e,t,n){for(var i=0,a=r[t-n],o=r[t-n+1];e<t;e+=n){var s=r[e],A=r[e+1];i+=o*s-a*A,a=s,o=A}return i/2}function X2(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=z2(r,e,s,n),e=s}return i}function OV(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=X2(r,e,s,n),e=s[s.length-1]}return i}var MV=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)}}(),PV=function(r){MV(e,r);function e(t,n){var i=r.call(this)||this;return i.maxDelta_=-1,i.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(t[0])?i.setFlatCoordinates(n,t):i.setCoordinates(t,n),i}return e.prototype.clone=function(){return new e(this.flatCoordinates.slice(),this.layout)},e.prototype.closestPointXY=function(t,n,i,a){return a<Fu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ib(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ob(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.getArea=function(){return z2(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return VA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=lb(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,Wt.XY)},e.prototype.getType=function(){return st.LINEAR_RING},e.prototype.intersectsExtent=function(t){return!1},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=eg(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Cs),Kf=PV,NV=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)}}(),UV=function(r){NV(e,r);function e(t,n){var i=r.call(this)||this;return i.setCoordinates(t,n),i}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){var o=this.flatCoordinates,s=Sh(t,n,o[0],o[1]);if(s<a){for(var A=this.stride,l=0;l<A;++l)i[l]=o[l];return i.length=A,s}else return a},e.prototype.getCoordinates=function(){return this.flatCoordinates?this.flatCoordinates.slice():[]},e.prototype.computeExtent=function(t){return Bh(this.flatCoordinates,t)},e.prototype.getType=function(){return st.POINT},e.prototype.intersectsExtent=function(t){return O_(t,this.flatCoordinates[0],this.flatCoordinates[1])},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=K2(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Cs),cr=UV;function DV(r,e,t,n,i){var a=P_(i,function(o){return!gh(r,e,t,n,o[0],o[1])});return!a}function gh(r,e,t,n,i,a){for(var o=0,s=r[t-n],A=r[t-n+1];e<t;e+=n){var l=r[e],u=r[e+1];A<=a?u>a&&(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 ub(r,e,t,n,i,a){if(t.length===0||!gh(r,e,t[0],n,i,a))return!1;for(var o=1,s=t.length;o<s;++o)if(gh(r,t[o-1],t[o],n,i,a))return!1;return!0}function QV(r,e,t,n,i,a){if(t.length===0)return!1;for(var o=0,s=t.length;o<s;++o){var A=t[o];if(ub(r,e,A,n,i,a))return!0;e=A[A.length-1]}return!1}function hb(r,e,t,n,i,a,o){for(var s,A,l,u,h,c,f,d=i[a+1],v=[],y=0,m=t.length;y<m;++y){var w=t[y];for(u=r[w-n],c=r[w-n+1],s=e;s<w;s+=n)h=r[s],f=r[s+1],(d<=c&&f<=d||c<=d&&d<=f)&&(l=(d-c)/(f-c)*(h-u)+u,v.push(l)),u=h,c=f}var C=NaN,B=-1/0;for(v.sort(gu),u=v[0],s=1,A=v.length;s<A;++s){h=v[s];var R=Math.abs(h-u);R>B&&(l=(u+h)/2,ub(r,e,t,n,l,d)&&(C=l,B=R)),u=h}return isNaN(C)&&(C=i[a]),o?(o.push(C,d,B),o):[C,d,B]}function W2(r,e,t,n,i){for(var a=[],o=0,s=t.length;o<s;++o){var A=t[o];a=hb(r,e,A,n,i,2*o,a),e=A[A.length-1]}return a}function q2(r,e,t,n,i){var a;for(e+=n;e<t;e+=n)if(a=i(r.slice(e-n,e),r.slice(e,e+n)),a)return a;return!1}function Q_(r,e,t,n,i){var a=GS(di(),r,e,t,n);return In(i,a)?Eo(i,a)||a[0]>=i[0]&&a[2]<=i[2]||a[1]>=i[1]&&a[3]<=i[3]?!0:q2(r,e,t,n,function(o,s){return w2(i,o,s)}):!1}function HV(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){if(Q_(r,e,t[a],n,i))return!0;e=t[a]}return!1}function GV(r,e,t,n,i){return!!(Q_(r,e,t,n,i)||gh(r,e,t,n,i[0],i[1])||gh(r,e,t,n,i[0],i[3])||gh(r,e,t,n,i[2],i[1])||gh(r,e,t,n,i[2],i[3]))}function Z2(r,e,t,n,i){if(!GV(r,e,t[0],n,i))return!1;if(t.length===1)return!0;for(var a=1,o=t.length;a<o;++a)if(DV(r,t[a-1],t[a],n,i)&&!Q_(r,t[a-1],t[a],n,i))return!1;return!0}function kV(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(Z2(r,e,s,n,i))return!0;e=s[s.length-1]}return!1}function $V(r,e,t,n){for(;e<t-n;){for(var i=0;i<n;++i){var a=r[e+i];r[e+i]=r[t-n+i],r[t-n+i]=a}e+=n,t-=n}}function H_(r,e,t,n){for(var i=0,a=r[t-n],o=r[t-n+1];e<t;e+=n){var s=r[e],A=r[e+1];i+=(s-a)*(A+o),a=s,o=A}return i===0?void 0:i>0}function J2(r,e,t,n,i){for(var a=i!==void 0?i:!1,o=0,s=t.length;o<s;++o){var A=t[o],l=H_(r,e,A,n);if(o===0){if(a&&l||!a&&!l)return!1}else if(a&&!l||!a&&l)return!1;e=A}return!0}function VV(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(!J2(r,e,s,n,i))return!1;s.length&&(e=s[s.length-1])}return!0}function gB(r,e,t,n,i){for(var a=i!==void 0?i:!1,o=0,s=t.length;o<s;++o){var A=t[o],l=H_(r,e,A,n),u=o===0?a&&l||!a&&!l:a&&!l||!a&&l;u&&$V(r,e,A,n),e=A}return e}function qI(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a)e=gB(r,e,t[a],n,i);return e}function jV(r,e){for(var t=[],n=0,i=0,a=0,o=e.length;a<o;++a){var s=e[a];if(!H_(r,n,s,2))t.push(e.slice(i,a+1));else{if(t.length===0)continue;t[t.length-1].push(e[i])}i=a+1,n=s}return t}var KV=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)}}(),G_=function(r){KV(e,r);function e(t,n,i){var a=r.call(this)||this;return a.ends_=[],a.flatInteriorPointRevision_=-1,a.flatInteriorPoint_=null,a.maxDelta_=-1,a.maxDeltaRevision_=-1,a.orientedRevision_=-1,a.orientedFlatCoordinates_=null,n!==void 0&&i?(a.setFlatCoordinates(n,t),a.ends_=i):a.setCoordinates(t,n),a}return e.prototype.appendLinearRing=function(t){this.flatCoordinates?Ur(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){return a<Fu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ab(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sb(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return ub(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,n)},e.prototype.getArea=function(){return X2(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),gB(n,0,this.ends_,this.stride,t)):n=this.flatCoordinates,Fv(n,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=wa(this.getExtent());this.flatInteriorPoint_=hb(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new cr(this.getFlatInteriorPoint(),Wt.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new Kf(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLinearRings=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.ends_,a=[],o=0,s=0,A=i.length;s<A;++s){var l=i[s],u=new Kf(n.slice(o,l),t);a.push(u),o=l}return a},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;J2(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=gB(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=Y2(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,Wt.XY,i)},e.prototype.getType=function(){return st.POLYGON},e.prototype.intersectsExtent=function(t){return Z2(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=Ab(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(Cs),Cn=G_;function YV(r,e,t,n){for(var i=t||32,a=[],o=0;o<i;++o)Ur(a,aV(r,e,2*Math.PI*o/i,n));return a.push(a[0],a[1]),new G_(a,Wt.XY,[a.length])}function Eu(r){var e=r[0],t=r[1],n=r[2],i=r[3],a=[e,t,e,i,n,i,n,t,e,t];return new G_(a,Wt.XY,[a.length])}function tU(r,e,t){for(var n=e||32,i=r.getStride(),a=r.getLayout(),o=r.getCenter(),s=i*(n+1),A=new Array(s),l=0;l<s;l+=i){A[l]=0,A[l+1]=0;for(var u=2;u<i;u++)A[l+u]=o[u]}var h=[A.length],c=new G_(A,a,h);return zV(c,o,r.getRadius(),t),c}function zV(r,e,t,n){for(var i=r.getFlatCoordinates(),a=r.getStride(),o=i.length/a-1,s=n||0,A=0;A<=o;++A){var l=A*a,u=s+uu(A,o)*2*Math.PI/o;i[l]=e[0]+t*Math.cos(u),i[l+1]=e[1]+t*Math.sin(u)}r.changed()}var XV=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)}}(),Yw=0,WV=function(r){XV(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=de({},t);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=qS(i.projection,"EPSG:3857"),n.viewportSize_=[100,100],n.targetCenter_=null,n.targetResolution_,n.targetRotation_,n.nextCenter_=null,n.nextResolution_,n.nextRotation_,n.cancelAnchor_=void 0,i.projection&&oV(),i.center&&(i.center=_n(i.center,n.projection_)),i.extent&&(i.extent=Co(i.extent,n.projection_)),n.applyOptions_(i),n}return e.prototype.applyOptions_=function(t){var n=de({},t);for(var i in mo)delete n[i];this.setProperties(n,!0);var a=ZV(t);this.maxResolution_=a.maxResolution,this.minResolution_=a.minResolution,this.zoomFactor_=a.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=a.minZoom;var o=qV(t),s=a.constraint,A=JV(t);this.constraints_={center:o,resolution:s,rotation:A},this.setRotation(t.rotation!==void 0?t.rotation:0),this.setCenterInternal(t.center!==void 0?t.center:null),t.resolution!==void 0?this.setResolution(t.resolution):t.zoom!==void 0&&this.setZoom(t.zoom)},Object.defineProperty(e.prototype,"padding",{get:function(){return this.padding_},set:function(t){var n=this.padding_;this.padding_=t;var i=this.getCenter();if(i){var a=t||[0,0,0,0];n=n||[0,0,0,0];var o=this.getResolution(),s=o/2*(a[3]-n[3]+n[1]-a[1]),A=o/2*(a[0]-n[0]+n[2]-a[2]);this.setCenterInternal([i[0]+s,i[1]-A])}},enumerable:!1,configurable:!0}),e.prototype.getUpdatedOptions_=function(t){var n=this.getProperties();return n.resolution!==void 0?n.resolution=this.getResolution():n.zoom=this.getZoom(),n.center=this.getCenterInternal(),n.rotation=this.getRotation(),de({},n,t)},e.prototype.animate=function(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);for(var n=new Array(arguments.length),i=0;i<n.length;++i){var a=arguments[i];a.center&&(a=de({},a),a.center=_n(a.center,this.getProjection())),a.anchor&&(a=de({},a),a.anchor=_n(a.anchor,this.getProjection())),n[i]=a}this.animateInternal.apply(this,n)},e.prototype.animateInternal=function(t){var n=arguments.length,i;n>1&&typeof arguments[n-1]=="function"&&(i=arguments[n-1],--n);for(var a=0;a<n&&!this.isDef();++a){var o=arguments[a];o.center&&this.setCenterInternal(o.center),o.zoom!==void 0?this.setZoom(o.zoom):o.resolution&&this.setResolution(o.resolution),o.rotation!==void 0&&this.setRotation(o.rotation)}if(a===n){i&&Ey(i,!0);return}for(var s=Date.now(),A=this.targetCenter_.slice(),l=this.targetResolution_,u=this.targetRotation_,h=[];a<n;++a){var c=arguments[a],f={start:s,complete:!1,anchor:c.anchor,duration:c.duration!==void 0?c.duration:1e3,easing:c.easing||_m,callback:i};if(c.center&&(f.sourceCenter=A,f.targetCenter=c.center.slice(),A=f.targetCenter),c.zoom!==void 0?(f.sourceResolution=l,f.targetResolution=this.getResolutionForZoom(c.zoom),l=f.targetResolution):c.resolution&&(f.sourceResolution=l,f.targetResolution=c.resolution,l=f.targetResolution),c.rotation!==void 0){f.sourceRotation=u;var d=uu(c.rotation-u+Math.PI,2*Math.PI)-Math.PI;f.targetRotation=u+d,u=f.targetRotation}tj(f)?f.complete=!0:s+=f.duration,h.push(f)}this.animations_.push(h),this.setHint(fn.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[fn.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[fn.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(fn.ANIMATING,-this.hints_[fn.ANIMATING]);for(var t,n=0,i=this.animations_.length;n<i;++n){var a=this.animations_[n];if(a[0].callback&&Ey(a[0].callback,!1),!t)for(var o=0,s=a.length;o<s;++o){var A=a[o];if(!A.complete){t=A.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN},e.prototype.updateAnimations_=function(){if(this.updateAnimationKey_!==void 0&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!!this.getAnimating()){for(var t=Date.now(),n=!1,i=this.animations_.length-1;i>=0;--i){for(var a=this.animations_[i],o=!0,s=0,A=a.length;s<A;++s){var l=a[s];if(!l.complete){var u=t-l.start,h=l.duration>0?u/l.duration:1;h>=1?(l.complete=!0,h=1):o=!1;var c=l.easing(h);if(l.sourceCenter){var f=l.sourceCenter[0],d=l.sourceCenter[1],v=l.targetCenter[0],y=l.targetCenter[1];this.nextCenter_=l.targetCenter;var m=f+c*(v-f),w=d+c*(y-d);this.targetCenter_=[m,w]}if(l.sourceResolution&&l.targetResolution){var C=c===1?l.targetResolution:l.sourceResolution+c*(l.targetResolution-l.sourceResolution);if(l.anchor){var B=this.getViewportSize_(this.getRotation()),R=this.constraints_.resolution(C,0,B,!0);this.targetCenter_=this.calculateCenterZoom(R,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=C,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){var O=c===1?uu(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+c*(l.targetRotation-l.sourceRotation);if(l.anchor){var I=this.constraints_.rotation(O,!0);this.targetCenter_=this.calculateCenterRotate(I,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=O}if(this.applyTargetState_(!0),n=!0,!l.complete)break}}if(o){this.animations_[i]=null,this.setHint(fn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var T=a[0].callback;T&&Ey(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]],YS(i,t-this.getRotation()),I2(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&&jf(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(mo.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 U_(n,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var n=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();_e(i,1);var a=this.getResolution();_e(a!==void 0,2);var o=this.getRotation();return _e(o!==void 0,3),xh(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(mo.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Co(t,this.getProjection()),n)},e.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.getViewportSizeMinusPadding_(),a=Fr(t)/i[0],o=ei(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(mo.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=zw(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=I_(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=En(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,En(t-n,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,n){var i;if(_e(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){_e(!up(t),25);var a=Co(t,this.getProjection());i=Eu(a)}else if(t.getType()===st.CIRCLE){var a=Co(t.getExtent(),this.getProjection());i=Eu(a),i.rotate(this.getRotation(),wa(a))}else{var o=Gh();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,h=-1/0,c=0,f=o.length;c<f;c+=s){var d=o[c]*i-o[c+1]*a,v=o[c]*a+o[c+1]*i;A=Math.min(A,d),l=Math.min(l,v),u=Math.max(u,d),h=Math.max(h,v)}return[A,l,u,h]},e.prototype.fitInternal=function(t,n){var i=n||{},a=i.size;a||(a=this.getViewportSizeMinusPadding_());var o=i.padding!==void 0?i.padding:[0,0,0,0],s=i.nearest!==void 0?i.nearest:!1,A;i.minResolution!==void 0?A=i.minResolution:i.maxZoom!==void 0?A=this.getResolutionForZoom(i.maxZoom):A=0;var l=this.rotatedExtentForGeometry(t),u=this.getResolutionForExtentInternal(l,[a[0]-o[1]-o[3],a[1]-o[0]-o[2]]);u=isNaN(u)?A:Math.max(u,A),u=this.getConstrainedResolution(u,s?0:1);var h=this.getRotation(),c=Math.sin(h),f=Math.cos(h),d=wa(l);d[0]+=(o[1]-o[3])/2*u,d[1]+=(o[0]-o[2])/2*u;var v=d[0]*f-d[1]*c,y=d[1]*f+d[0]*c,m=this.getConstrainedCenter([v,y],u),w=i.callback?i.callback:Nh;i.duration!==void 0?this.animateInternal({resolution:u,center:m,duration:i.duration,easing:i.easing},w):(this.targetResolution_=u,this.targetCenter_=m,this.applyTargetState_(!1,!0),Ey(w,!0))},e.prototype.centerOn=function(t,n,i){this.centerOnInternal(_n(t,this.getProjection()),n,i)},e.prototype.centerOnInternal=function(t,n,i){this.setCenterInternal(zw(t,n,i,this.getResolution(),this.getRotation()))},e.prototype.calculateCenterShift=function(t,n,i,a){var o,s=this.padding_;if(s&&t){var A=this.getViewportSizeMinusPadding_(-i),l=zw(t,a,[A[0]/2+s[3],A[1]/2+s[0]],n,i);o=[t[0]-l[0],t[1]-l[1]]}return o},e.prototype.isDef=function(){return!!this.getCenterInternal()&&this.getResolution()!==void 0},e.prototype.adjustCenter=function(t){var n=jf(this.targetCenter_,this.getProjection());this.setCenter([n[0]+t[0],n[1]+t[1]])},e.prototype.adjustCenterInternal=function(t){var n=this.targetCenter_;this.setCenterInternal([n[0]+t[0],n[1]+t[1]])},e.prototype.adjustResolution=function(t,n){var i=n&&_n(n,this.getProjection());this.adjustResolutionInternal(t,i)},e.prototype.adjustResolutionInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),a=this.getViewportSize_(this.getRotation()),o=this.constraints_.resolution(this.targetResolution_*t,0,a,i);n&&(this.targetCenter_=this.calculateCenterZoom(o,n)),this.targetResolution_*=t,this.applyTargetState_()},e.prototype.adjustZoom=function(t,n){this.adjustResolution(Math.pow(this.zoomFactor_,-t),n)},e.prototype.adjustRotation=function(t,n){n&&(n=_n(n,this.getProjection())),this.adjustRotationInternal(t,n)},e.prototype.adjustRotationInternal=function(t,n){var i=this.getAnimating()||this.getInteracting(),a=this.constraints_.rotation(this.targetRotation_+t,i);n&&(this.targetCenter_=this.calculateCenterRotate(a,n)),this.targetRotation_+=t,this.applyTargetState_()},e.prototype.setCenter=function(t){this.setCenterInternal(t&&_n(t,this.getProjection()))},e.prototype.setCenterInternal=function(t){this.targetCenter_=t,this.applyTargetState_()},e.prototype.setHint=function(t,n){return this.hints_[t]+=n,this.changed(),this.hints_[t]},e.prototype.setResolution=function(t){this.targetResolution_=t,this.applyTargetState_()},e.prototype.setRotation=function(t){this.targetRotation_=t,this.applyTargetState_()},e.prototype.setZoom=function(t){this.setResolution(this.getResolutionForZoom(t))},e.prototype.applyTargetState_=function(t,n){var i=this.getAnimating()||this.getInteracting()||n,a=this.constraints_.rotation(this.targetRotation_,i),o=this.getViewportSize_(a),s=this.constraints_.resolution(this.targetResolution_,0,o,i),A=this.constraints_.center(this.targetCenter_,s,o,i,this.calculateCenterShift(this.targetCenter_,s,a,o));this.get(mo.ROTATION)!==a&&this.set(mo.ROTATION,a),this.get(mo.RESOLUTION)!==s&&(this.set(mo.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!A||!this.get(mo.CENTER)||!fs(this.get(mo.CENTER),A))&&this.set(mo.CENTER,A),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0},e.prototype.resolveConstraints=function(t,n,i){var a=t!==void 0?t:200,o=n||0,s=this.constraints_.rotation(this.targetRotation_),A=this.getViewportSize_(s),l=this.constraints_.resolution(this.targetResolution_,o,A),u=this.constraints_.center(this.targetCenter_,l,A,!1,this.calculateCenterShift(this.targetCenter_,l,s,A));if(a===0&&!this.cancelAnchor_){this.targetResolution_=l,this.targetRotation_=s,this.targetCenter_=u,this.applyTargetState_();return}var h=i||(a===0?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,(this.getResolution()!==l||this.getRotation()!==s||!this.getCenterInternal()||!fs(this.getCenterInternal(),u))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:u,resolution:l,duration:a,easing:Yo,anchor:h}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(fn.INTERACTING,1)},e.prototype.endInteraction=function(t,n,i){var a=i&&_n(i,this.getProjection());this.endInteractionInternal(t,n,a)},e.prototype.endInteractionInternal=function(t,n,i){this.setHint(fn.INTERACTING,-1),this.resolveConstraints(t,n,i)},e.prototype.getConstrainedCenter=function(t,n){var i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,n||this.getResolution(),i)},e.prototype.getConstrainedZoom=function(t,n){var i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,n))},e.prototype.getConstrainedResolution=function(t,n){var i=n||0,a=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,i,a)},e}(ni);function Ey(r,e){setTimeout(function(){r(e)},0)}function qV(r){if(r.extent!==void 0){var e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return KI(r.extent,r.constrainOnlyCenter,e)}var t=qS(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){var n=t.getExtent().slice();return n[0]=-1/0,n[2]=1/0,KI(n,!1,!1)}return fV}function ZV(r){var e,t,n,i=28,a=2,o=r.minZoom!==void 0?r.minZoom:Yw,s=r.maxZoom!==void 0?r.maxZoom:i,A=r.zoomFactor!==void 0?r.zoomFactor:a,l=r.multiWorld!==void 0?r.multiWorld:!1,u=r.smoothResolutionConstraint!==void 0?r.smoothResolutionConstraint:!0,h=r.showFullExtent!==void 0?r.showFullExtent:!1,c=qS(r.projection,"EPSG:3857"),f=c.getExtent(),d=r.constrainOnlyCenter,v=r.extent;if(!l&&!v&&c.isGlobal()&&(d=!1,v=f),r.resolutions!==void 0){var y=r.resolutions;t=y[o],n=y[s]!==void 0?y[s]:y[y.length-1],r.constrainResolution?e=pV(y,u,!d&&v,h):e=YI(t,n,u,!d&&v,h)}else{var m=f?Math.max(Fr(f),ei(f)):360*Es[Ma.DEGREES]/c.getMetersPerUnit(),w=m/XS/Math.pow(a,Yw),C=w/Math.pow(a,i-Yw);t=r.maxResolution,t!==void 0?o=0:t=w/Math.pow(A,o),n=r.minResolution,n===void 0&&(r.maxZoom!==void 0?r.maxResolution!==void 0?n=t/Math.pow(A,s):n=w/Math.pow(A,s):n=C),s=o+Math.floor(Math.log(t/n)/Math.log(A)),n=t/Math.pow(A,s-o),r.constrainResolution?e=dV(A,t,n,u,!d&&v,h):e=YI(t,n,u,!d&&v,h)}return{constraint:e,maxResolution:t,minResolution:n,minZoom:o,zoomFactor:A}}function JV(r){var e=r.enableRotation!==void 0?r.enableRotation:!0;if(e){var t=r.constrainRotation;return t===void 0||t===!0?gV():t===!1?zI:typeof t=="number"?vV(t):zI}else return tb}function tj(r){return!(r.sourceCenter&&r.targetCenter&&!fs(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function zw(r,e,t,n,i){var a=Math.cos(-i),o=Math.sin(-i),s=r[0]*a-r[1]*o,A=r[1]*a+r[0]*o;s+=(e[0]/2-t[0])*n,A+=(t[1]-e[1]/2)*n,o=-o;var l=s*a-A*o,u=A*a+s*o;return[l,u]}var Ks=WV;function ZI(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]+2*e,t[1]=r[1]+2*e,t}function JI(r){return r[0]>0&&r[1]>0}function eU(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 Li(r,e){return Array.isArray(r)?r:(e===void 0?e=[r,r]:(e[0]=r,e[1]=r),e)}var 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)}}();function rU(r){if(r instanceof qh){r.setMapInternal(null);return}r instanceof Jv&&r.getLayers().forEach(rU)}function nU(r,e){if(r instanceof qh){r.setMapInternal(e);return}if(r instanceof Jv)for(var t=r.getLayers().getArray(),n=0,i=t.length;n<i;++n)nU(t[n],e)}var rj=function(r){ej(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=nj(t);n.renderComplete_,n.loaded_=!0,n.boundHandleBrowserEvent_=n.handleBrowserEvent.bind(n),n.maxTilesLoading_=t.maxTilesLoading!==void 0?t.maxTilesLoading:16,n.pixelRatio_=t.pixelRatio!==void 0?t.pixelRatio:Uh,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=Jn(),n.pixelToCoordinateTransform_=Jn(),n.frameIndex_=0,n.frameState_=null,n.previousExtent_=null,n.viewPropertyListenerKey_=null,n.viewChangeListenerKey_=null,n.layerGroupPropertyListenerKeys_=null,n.viewport_=document.createElement("div"),n.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),n.viewport_.style.position="relative",n.viewport_.style.overflow="hidden",n.viewport_.style.width="100%",n.viewport_.style.height="100%",n.overlayContainer_=document.createElement("div"),n.overlayContainer_.style.position="absolute",n.overlayContainer_.style.zIndex="0",n.overlayContainer_.style.width="100%",n.overlayContainer_.style.height="100%",n.overlayContainer_.style.pointerEvents="none",n.overlayContainer_.className="ol-overlaycontainer",n.viewport_.appendChild(n.overlayContainer_),n.overlayContainerStopEvent_=document.createElement("div"),n.overlayContainerStopEvent_.style.position="absolute",n.overlayContainerStopEvent_.style.zIndex="0",n.overlayContainerStopEvent_.style.width="100%",n.overlayContainerStopEvent_.style.height="100%",n.overlayContainerStopEvent_.style.pointerEvents="none",n.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",n.viewport_.appendChild(n.overlayContainerStopEvent_),n.mapBrowserEventHandler_=null,n.moveTolerance_=t.moveTolerance,n.keyboardEventTarget_=i.keyboardEventTarget,n.targetChangeHandlerKeys_=null,n.controls=i.controls||new ti,n.interactions=i.interactions||new ti,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new j$(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(Kn.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(Kn.VIEW,n.handleViewChanged_),n.addChangeListener(Kn.SIZE,n.handleSizeChanged_),n.addChangeListener(Kn.TARGET,n.handleTargetChanged_),n.setProperties(i.values);var a=n;return t.view&&!(t.view instanceof Ks)&&t.view.then(function(o){a.setView(new Ks(o))}),n.controls.addEventListener(Un.ADD,function(o){o.element.setMap(this)}.bind(n)),n.controls.addEventListener(Un.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.interactions.addEventListener(Un.ADD,function(o){o.element.setMap(this)}.bind(n)),n.interactions.addEventListener(Un.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(Un.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(n)),n.overlays_.addEventListener(Un.REMOVE,function(o){var s=o.element,A=s.getId();A!==void 0&&delete this.overlayIdIndex_[A.toString()],o.element.setMap(null)}.bind(n)),n.controls.forEach(function(o){o.setMap(this)}.bind(n)),n.interactions.forEach(function(o){o.setMap(this)}.bind(n)),n.overlays_.forEach(n.addOverlayInternal_.bind(n)),n}return e.prototype.createRenderer=function(){throw new Error("Use a map type that has a createRenderer method")},e.prototype.addControl=function(t){this.getControls().push(t)},e.prototype.addInteraction=function(t){this.getInteractions().push(t)},e.prototype.addLayer=function(t){var n=this.getLayerGroup().getLayers();n.push(t)},e.prototype.handleLayerAdd_=function(t){nU(t.layer,this)},e.prototype.addOverlay=function(t){this.getOverlays().push(t)},e.prototype.addOverlayInternal_=function(t){var n=t.getId();n!==void 0&&(this.overlayIdIndex_[n.toString()]=t),t.setMap(this)},e.prototype.disposeInternal=function(){this.setTarget(null),r.prototype.disposeInternal.call(this)},e.prototype.forEachFeatureAtPixel=function(t,n,i){if(!(!this.frameState_||!this.renderer_)){var a=this.getCoordinateFromPixelInternal(t);i=i!==void 0?i:{};var o=i.hitTolerance!==void 0?i.hitTolerance:0,s=i.layerFilter!==void 0?i.layerFilter:Js,A=i.checkWrapped!==!1;return this.renderer_.forEachFeatureAtCoordinate(a,this.frameState_,o,A,n,null,s,null)}},e.prototype.getFeaturesAtPixel=function(t,n){var i=[];return this.forEachFeatureAtPixel(t,function(a){i.push(a)},n),i},e.prototype.getAllLayers=function(){var t=[];function n(i){i.forEach(function(a){a instanceof Jv?n(a.getLayers()):t.push(a)})}return n(this.getLayers()),t},e.prototype.forEachLayerAtPixel=function(t,n,i){if(!(!this.frameState_||!this.renderer_)){var a=i||{},o=a.hitTolerance!==void 0?a.hitTolerance:0,s=a.layerFilter||Js;return this.renderer_.forEachLayerAtPixel(t,this.frameState_,o,n,s)}},e.prototype.hasFeatureAtPixel=function(t,n){if(!this.frameState_||!this.renderer_)return!1;var i=this.getCoordinateFromPixelInternal(t);n=n!==void 0?n:{};var a=n.layerFilter!==void 0?n.layerFilter:Js,o=n.hitTolerance!==void 0?n.hitTolerance:0,s=n.checkWrapped!==!1;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,o,s,a,null)},e.prototype.getEventCoordinate=function(t){return this.getCoordinateFromPixel(this.getEventPixel(t))},e.prototype.getEventCoordinateInternal=function(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))},e.prototype.getEventPixel=function(t){var n=this.viewport_.getBoundingClientRect(),i="changedTouches"in t?t.changedTouches[0]:t;return[i.clientX-n.left,i.clientY-n.top]},e.prototype.getTarget=function(){return this.get(Kn.TARGET)},e.prototype.getTargetElement=function(){var t=this.getTarget();return t!==void 0?typeof t=="string"?document.getElementById(t):t:null},e.prototype.getCoordinateFromPixel=function(t){return jf(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var n=this.frameState_;return n?An(n.pixelToCoordinateTransform,t.slice()):null},e.prototype.getControls=function(){return this.controls},e.prototype.getOverlays=function(){return this.overlays_},e.prototype.getOverlayById=function(t){var n=this.overlayIdIndex_[t.toString()];return n!==void 0?n:null},e.prototype.getInteractions=function(){return this.interactions},e.prototype.getLayerGroup=function(){return this.get(Kn.LAYERGROUP)},e.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof ti){n.setLayers(t);return}var i=n.getLayers();i.clear(),i.extend(t)},e.prototype.getLayers=function(){var t=this.getLayerGroup().getLayers();return t},e.prototype.getLoadingOrNotReady=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var a=t[n];if(a.visible){var o=a.layer.getRenderer();if(o&&!o.ready)return!0;var s=a.layer.getSource();if(s&&s.loading)return!0}}return!1},e.prototype.getPixelFromCoordinate=function(t){var n=_n(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},e.prototype.getPixelFromCoordinateInternal=function(t){var n=this.frameState_;return n?An(n.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Kn.SIZE)},e.prototype.getView=function(){return this.get(Kn.VIEW)},e.prototype.getViewport=function(){return this.viewport_},e.prototype.getOverlayContainer=function(){return this.overlayContainer_},e.prototype.getOverlayContainerStopEvent=function(){return this.overlayContainerStopEvent_},e.prototype.getOwnerDocument=function(){var t=this.getTargetElement();return t?t.ownerDocument:document},e.prototype.getTilePriority=function(t,n,i,a){return K$(this.frameState_,t,n,i,a)},e.prototype.handleBrowserEvent=function(t,n){var i=n||t.type,a=new HA(i,this,t);this.handleMapBrowserEvent(a)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var n=t.originalEvent,i=n.type;if(i===Vs.POINTERDOWN||i===ye.WHEEL||i===ye.KEYDOWN){var a=this.getOwnerDocument(),o=this.viewport_.getRootNode?this.viewport_.getRootNode():a,s=n.target;if(this.overlayContainerStopEvent_.contains(s)||!(o===a?a.documentElement:o).contains(s))return}if(t.frameState=this.frameState_,this.dispatchEvent(t)!==!1)for(var A=this.getInteractions().getArray().slice(),l=A.length-1;l>=0;l--){var u=A[l];if(!(u.getMap()!==this||!u.getActive()||!this.getTargetElement())){var h=u.handleEvent(t);if(!h||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[fn.ANIMATING]||o[fn.INTERACTING]){var s=Date.now()-t.time>8;i=s?0:8,a=s?0:2}}n.getTilesLoading()<i&&(n.reprioritize(),n.loadMoreTiles(i,a))}t&&this.renderer_&&!t.animate&&(this.renderComplete_===!0?(this.hasListener(to.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(to.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new ef(Gs.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new ef(Gs.LOADSTART,this,t))));for(var A=this.postRenderFunctions_,l=0,u=A.length;l<u;++l)A[l](this,t);A.length=0},e.prototype.handleSizeChanged_=function(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()},e.prototype.handleTargetChanged_=function(){if(this.mapBrowserEventHandler_){for(var t=0,n=this.targetChangeHandlerKeys_.length;t<n;++t)Rr(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(ye.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(ye.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,cm(this.viewport_)}var i=this.getTargetElement();if(!i)this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0);else{i.appendChild(this.viewport_),this.renderer_||(this.renderer_=this.createRenderer()),this.mapBrowserEventHandler_=new H$(this,this.moveTolerance_);for(var a in rr)this.mapBrowserEventHandler_.addEventListener(rr[a],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(ye.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(ye.WHEEL,this.boundHandleBrowserEvent_,p2?{passive:!1}:!1);var o=this.getOwnerDocument().defaultView,s=this.keyboardEventTarget_?this.keyboardEventTarget_:i;this.targetChangeHandlerKeys_=[Pe(s,ye.KEYDOWN,this.handleBrowserEvent,this),Pe(s,ye.KEYPRESS,this.handleBrowserEvent,this),Pe(o,ye.RESIZE,this.updateSize,this)]}this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(Rr(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Rr(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=Pe(t,Dh.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=Pe(t,ye.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Rr),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new zl("addlayer",t)),this.layerGroupPropertyListenerKeys_=[Pe(t,Dh.PROPERTYCHANGE,this.render,this),Pe(t,ye.CHANGE,this.render,this),Pe(t,"addlayer",this.handleLayerAdd_,this),Pe(t,"removelayer",this.handleLayerRemove_,this)]),this.render()},e.prototype.isRendered=function(){return!!this.frameState_},e.prototype.renderSync=function(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()},e.prototype.redrawText=function(){for(var t=this.getLayerGroup().getLayerStatesArray(),n=0,i=t.length;n<i;++n){var a=t[n].layer;a.hasRenderer()&&a.getRenderer().handleFontsChanged()}},e.prototype.render=function(){this.renderer_&&this.animationDelayKey_===void 0&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))},e.prototype.removeControl=function(t){return this.getControls().remove(t)},e.prototype.removeInteraction=function(t){return this.getInteractions().remove(t)},e.prototype.removeLayer=function(t){var n=this.getLayerGroup().getLayers();return n.remove(t)},e.prototype.handleLayerRemove_=function(t){rU(t.layer)},e.prototype.removeOverlay=function(t){return this.getOverlays().remove(t)},e.prototype.renderFrame_=function(t){var n=this,i=this.getSize(),a=this.getView(),o=this.frameState_,s=null;if(i!==void 0&&JI(i)&&a&&a.isDef()){var A=a.getHints(this.frameState_?this.frameState_.viewHints:void 0),l=a.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutterTree:null,extent:xh(l.center,l.resolution,l.rotation,i),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:i,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:l,viewHints:A,wantedTiles:{},mapId:pe(this),renderTargets:{}},l.nextCenter&&l.nextResolution){var u=isNaN(l.nextRotation)?l.rotation:l.nextRotation;s.nextExtent=xh(l.nextCenter,l.nextResolution,u,i)}}if(this.frameState_=s,this.renderer_.renderFrame(s),s){if(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),o){var h=!this.previousExtent_||!up(this.previousExtent_)&&!nA(s.extent,this.previousExtent_);h&&(this.dispatchEvent(new ef(Gs.MOVESTART,this,o)),this.previousExtent_=Iu(this.previousExtent_))}var c=this.previousExtent_&&!s.viewHints[fn.ANIMATING]&&!s.viewHints[fn.INTERACTING]&&!nA(s.extent,this.previousExtent_);c&&(this.dispatchEvent(new ef(Gs.MOVEEND,this,s)),QS(s.extent,this.previousExtent_))}this.dispatchEvent(new ef(Gs.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(Gs.LOADSTART)||this.hasListener(Gs.LOADEND)||this.hasListener(to.RENDERCOMPLETE)?!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady():void 0,this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(function(){n.postRenderTimeoutHandle_=void 0,n.handlePostRender()},0))},e.prototype.setLayerGroup=function(t){var n=this.getLayerGroup();n&&this.handleLayerRemove_(new zl("removelayer",n)),this.set(Kn.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(Kn.SIZE,t)},e.prototype.setTarget=function(t){this.set(Kn.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof Ks){this.set(Kn.VIEW,t);return}this.set(Kn.VIEW,new Ks);var n=this;t.then(function(i){n.setView(new Ks(i))})},e.prototype.updateSize=function(){var t=this.getTargetElement(),n=void 0;if(t){var i=getComputedStyle(t),a=t.offsetWidth-parseFloat(i.borderLeftWidth)-parseFloat(i.paddingLeft)-parseFloat(i.paddingRight)-parseFloat(i.borderRightWidth),o=t.offsetHeight-parseFloat(i.borderTopWidth)-parseFloat(i.paddingTop)-parseFloat(i.paddingBottom)-parseFloat(i.borderBottomWidth);!isNaN(a)&&!isNaN(o)&&(n=[a,o],!JI(n)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&console.warn("No map visible because the map container's width or height are 0."))}this.setSize(n),this.updateViewportSize_()},e.prototype.updateViewportSize_=function(){var t=this.getView();if(t){var n=void 0,i=getComputedStyle(this.viewport_);i.width&&i.height&&(n=[parseInt(i.width,10),parseInt(i.height,10)]),t.setViewportSize(n)}},e}(ni);function nj(r){var e=null;r.keyboardEventTarget!==void 0&&(e=typeof r.keyboardEventTarget=="string"?document.getElementById(r.keyboardEventTarget):r.keyboardEventTarget);var t={},n=r.layers&&typeof r.layers.getLayers=="function"?r.layers:new Jv({layers:r.layers});t[Kn.LAYERGROUP]=n,t[Kn.TARGET]=r.target,t[Kn.VIEW]=r.view instanceof Ks?r.view:new Ks;var i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new ti(r.controls.slice()):(_e(typeof r.controls.getArray=="function",47),i=r.controls));var a;r.interactions!==void 0&&(Array.isArray(r.interactions)?a=new ti(r.interactions.slice()):(_e(typeof r.interactions.getArray=="function",48),a=r.interactions));var o;return r.overlays!==void 0?Array.isArray(r.overlays)?o=new ti(r.overlays.slice()):(_e(typeof r.overlays.getArray=="function",49),o=r.overlays):o=new ti,{controls:i,interactions:a,keyboardEventTarget:e,overlays:o,values:t}}var iU=rj,ij=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),aj=function(r){ij(e,r);function e(t){var n=r.call(this)||this,i=t.element;return i&&!t.target&&!i.style.pointerEvents&&(i.style.pointerEvents="auto"),n.element=i||null,n.target_=null,n.map_=null,n.listenerKeys=[],t.render&&(n.render=t.render),t.target&&n.setTarget(t.target),n}return e.prototype.disposeInternal=function(){cm(this.element),r.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&cm(this.element);for(var n=0,i=this.listenerKeys.length;n<i;++n)Rr(this.listenerKeys[n]);if(this.listenerKeys.length=0,this.map_=t,t){var a=this.target_?this.target_:t.getOverlayContainerStopEvent();a.appendChild(this.element),this.render!==Nh&&this.listenerKeys.push(Pe(t,Gs.POSTRENDER,this.render,this)),t.render()}},e.prototype.render=function(t){},e.prototype.setTarget=function(t){this.target_=typeof t=="string"?document.getElementById(t):t},e}(ni),yr=aj,oj=Object.freeze(Object.defineProperty({__proto__:null,default:yr},Symbol.toStringTag,{value:"Module"})),sj=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Aj=function(r){sj(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.ulElement_=document.createElement("ul"),n.collapsed_=i.collapsed!==void 0?i.collapsed:!0,n.userCollapsed_=n.collapsed_,n.overrideCollapsible_=i.collapsible!==void 0,n.collapsible_=i.collapsible!==void 0?i.collapsible:!0,n.collapsible_||(n.collapsed_=!1);var a=i.className!==void 0?i.className:"ol-attribution",o=i.tipLabel!==void 0?i.tipLabel:"Attributions",s=i.expandClassName!==void 0?i.expandClassName:a+"-expand",A=i.collapseLabel!==void 0?i.collapseLabel:"›",l=i.collapseClassName!==void 0?i.collapseClassName:a+"-collapse";typeof A=="string"?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=A,n.collapseLabel_.className=l):n.collapseLabel_=A;var u=i.label!==void 0?i.label:"i";typeof u=="string"?(n.label_=document.createElement("span"),n.label_.textContent=u,n.label_.className=s):n.label_=u;var h=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_;n.toggleButton_=document.createElement("button"),n.toggleButton_.setAttribute("type","button"),n.toggleButton_.setAttribute("aria-expanded",String(!n.collapsed_)),n.toggleButton_.title=o,n.toggleButton_.appendChild(h),n.toggleButton_.addEventListener(ye.CLICK,n.handleClick_.bind(n),!1);var c=a+" "+iA+" "+Zh+(n.collapsed_&&n.collapsible_?" "+hm:"")+(n.collapsible_?"":" ol-uncollapsible"),f=n.element;return f.className=c,f.appendChild(n.toggleButton_),f.appendChild(n.ulElement_),n.renderedAttributions_=[],n.renderedVisible_=!0,n}return e.prototype.collectSourceAttributions_=function(t){for(var n={},i=[],a=!0,o=t.layerStatesArray,s=0,A=o.length;s<A;++s){var l=o[s];if(um(l,t.viewState)){var u=l.layer.getSource();if(u){var h=u.getAttributions();if(h){var c=h(t);if(c)if(a=a&&u.getAttributionsCollapsible()!==!1,Array.isArray(c))for(var f=0,d=c.length;f<d;++f)c[f]in n||(i.push(c[f]),n[c[f]]=!0);else c in n||(i.push(c),n[c]=!0)}}}}return this.overrideCollapsible_||this.setCollapsible(a),i},e.prototype.updateElement_=function(t){if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var n=this.collectSourceAttributions_(t),i=n.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!ll(n,this.renderedAttributions_)){N2(this.ulElement_);for(var a=0,o=n.length;a<o;++a){var s=document.createElement("li");s.innerHTML=n[a],this.ulElement_.appendChild(s)}this.renderedAttributions_=n}},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_},e.prototype.handleToggle_=function(){this.element.classList.toggle(hm),this.collapsed_?kf(this.collapseLabel_,this.label_):kf(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){this.userCollapsed_=t,!(!this.collapsible_||this.collapsed_===t)&&this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.render=function(t){this.updateElement_(t.frameState)},e}(yr),aU=Aj,lj=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)}}(),uj=function(r){lj(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this;var a=i.className!==void 0?i.className:"ol-rotate",o=i.label!==void 0?i.label:"⇧",s=i.compassClassName!==void 0?i.compassClassName:"ol-compass";n.label_=null,typeof o=="string"?(n.label_=document.createElement("span"),n.label_.className=s,n.label_.textContent=o):(n.label_=o,n.label_.classList.add(s));var A=i.tipLabel?i.tipLabel:"Reset rotation",l=document.createElement("button");l.className=a+"-reset",l.setAttribute("type","button"),l.title=A,l.appendChild(n.label_),l.addEventListener(ye.CLICK,n.handleClick_.bind(n),!1);var u=a+" "+iA+" "+Zh,h=n.element;return h.className=u,h.appendChild(l),n.callResetNorth_=i.resetNorth?i.resetNorth:void 0,n.duration_=i.duration!==void 0?i.duration:250,n.autoHide_=i.autoHide!==void 0?i.autoHide:!0,n.rotation_=void 0,n.autoHide_&&n.element.classList.add(my),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.callResetNorth_!==void 0?this.callResetNorth_():this.resetNorth_()},e.prototype.resetNorth_=function(){var t=this.getMap(),n=t.getView();if(n){var i=n.getRotation();i!==void 0&&(this.duration_>0&&i%(2*Math.PI)!==0?n.animate({rotation:0,duration:this.duration_,easing:Yo}):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(my);!o&&i===0?this.element.classList.add(my):o&&i!==0&&this.element.classList.remove(my)}this.label_.style.transform=a}this.rotation_=i}},e}(yr),oU=uj,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)}}(),cj=function(r){hj(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:"–",h=i.zoomInTipLabel!==void 0?i.zoomInTipLabel:"Zoom in",c=i.zoomOutTipLabel!==void 0?i.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=h,f.appendChild(typeof l=="string"?document.createTextNode(l):l),f.addEventListener(ye.CLICK,n.handleClick_.bind(n,o),!1);var d=document.createElement("button");d.className=A,d.setAttribute("type","button"),d.title=c,d.appendChild(typeof u=="string"?document.createTextNode(u):u),d.addEventListener(ye.CLICK,n.handleClick_.bind(n,-o),!1);var v=a+" "+iA+" "+Zh,y=n.element;return y.className=v,y.appendChild(f),y.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:Yo})):i.setZoom(o)}}},e}(yr),sU=cj,fj=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),tR=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],eR={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},pj=function(r){fj(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(ye.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat(iA," ").concat(Zh),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(rR(n))if(nR(n))vj(n);else{var i=void 0;this.source_?i=typeof this.source_=="string"?n.getElementById(this.source_):this.source_:i=t.getTargetElement(),this.keys_?dj(i):AU(i)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var n=this.isInFullscreen_;this.isInFullscreen_=nR(t.getOwnerDocument()),n!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(kf(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(eR.ENTERFULLSCREEN)):(kf(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(eR.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(Kn.TARGET,this.boundHandleMapTargetChange_),r.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(Kn.TARGET,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,n=0,i=t.length;n<i;++n)Rr(t[n]);t.length=0;var a=this.getMap();if(a){var o=a.getOwnerDocument();rR(o)?this.element.classList.remove(UI):this.element.classList.add(UI);for(var n=0,i=tR.length;n<i;++n)t.push(Pe(o,tR[n],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(yr);function rR(r){var e=r.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&r.msFullscreenEnabled||e.requestFullscreen&&r.fullscreenEnabled)}function nR(r){return!!(r.webkitIsFullScreen||r.msFullscreenElement||r.fullscreenElement)}function AU(r){r.requestFullscreen?r.requestFullscreen():r.msRequestFullscreen?r.msRequestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}function dj(r){r.webkitRequestFullscreen?r.webkitRequestFullscreen():AU(r)}function vj(r){r.exitFullscreen?r.exitFullscreen():r.msExitFullscreen?r.msExitFullscreen():r.webkitExitFullscreen&&r.webkitExitFullscreen()}var gj=pj,yj=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)}}(),Xw="projection",iR="coordinateFormat",mj=function(r){yj(e,r);function e(t){var n=this,i=t||{},a=document.createElement("div");a.className=i.className!==void 0?i.className:"ol-mouse-position",n=r.call(this,{element:a,render:i.render,target:i.target})||this,n.on,n.once,n.un,n.addChangeListener(Xw,n.handleProjectionChanged_),i.coordinateFormat&&n.setCoordinateFormat(i.coordinateFormat),i.projection&&n.setProjection(i.projection);var o=!0,s=" ";return"undefinedHTML"in i?(i.undefinedHTML!==void 0&&(s=i.undefinedHTML),o=!!s):"placeholder"in i&&(i.placeholder===!1?o=!1:s=String(i.placeholder)),n.placeholder_=s,n.renderOnMouseOut_=o,n.renderedHTML_=a.innerHTML,n.mapProjection_=null,n.transform_=null,n}return e.prototype.handleProjectionChanged_=function(){this.transform_=null},e.prototype.getCoordinateFormat=function(){return this.get(iR)},e.prototype.getProjection=function(){return this.get(Xw)},e.prototype.handleMouseMove=function(t){var n=this.getMap();this.updateHTML_(n.getEventPixel(t))},e.prototype.handleMouseOut=function(t){this.updateHTML_(null)},e.prototype.setMap=function(t){if(r.prototype.setMap.call(this,t),t){var n=t.getViewport();this.listenerKeys.push(Pe(n,Vs.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(Pe(n,Vs.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},e.prototype.setCoordinateFormat=function(t){this.set(iR,t)},e.prototype.setProjection=function(t){this.set(Xw,Ie(t))},e.prototype.updateHTML_=function(t){var n=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var i=this.getProjection();i?this.transform_=Hh(this.mapProjection_,i):this.transform_=N_}var a=this.getMap(),o=a.getCoordinateFromPixelInternal(t);if(o){var s=Gh();s&&(this.transform_=Hh(this.mapProjection_,s)),this.transform_(o,o);var A=this.getCoordinateFormat();A?n=A(o):n=o.toString()}}(!this.renderedHTML_||n!==this.renderedHTML_)&&(this.element.innerHTML=n,this.renderedHTML_=n)},e.prototype.render=function(t){var n=t.frameState;n?this.mapProjection_!=n.viewState.projection&&(this.mapProjection_=n.viewState.projection,this.transform_=null):this.mapProjection_=null},e}(yr),_j=mj,Xa={BOTTOM_LEFT:"bottom-left",BOTTOM_CENTER:"bottom-center",BOTTOM_RIGHT:"bottom-right",CENTER_LEFT:"center-left",CENTER_CENTER:"center-center",CENTER_RIGHT:"center-right",TOP_LEFT:"top-left",TOP_CENTER:"top-center",TOP_RIGHT:"top-right"},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)}}(),sa={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},Ej=function(r){wj(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un,n.options=t,n.id=t.id,n.insertFirst=t.insertFirst!==void 0?t.insertFirst:!0,n.stopEvent=t.stopEvent!==void 0?t.stopEvent:!0,n.element=document.createElement("div"),n.element.className=t.className!==void 0?t.className:"ol-overlay-container "+m$,n.element.style.position="absolute",n.element.style.pointerEvents="auto";var i=t.autoPan;return i&&typeof i!="object"&&(i={animation:t.autoPanAnimation,margin:t.autoPanMargin}),n.autoPan=i||!1,n.rendered={transform_:"",visible:!0},n.mapPostrenderListenerKey=null,n.addChangeListener(sa.ELEMENT,n.handleElementChanged),n.addChangeListener(sa.MAP,n.handleMapChanged),n.addChangeListener(sa.OFFSET,n.handleOffsetChanged),n.addChangeListener(sa.POSITION,n.handlePositionChanged),n.addChangeListener(sa.POSITIONING,n.handlePositioningChanged),t.element!==void 0&&n.setElement(t.element),n.setOffset(t.offset!==void 0?t.offset:[0,0]),n.setPositioning(t.positioning!==void 0?t.positioning:Xa.TOP_LEFT),t.position!==void 0&&n.setPosition(t.position),n}return e.prototype.getElement=function(){return this.get(sa.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(sa.MAP)||null},e.prototype.getOffset=function(){return this.get(sa.OFFSET)},e.prototype.getPosition=function(){return this.get(sa.POSITION)},e.prototype.getPositioning=function(){return this.get(sa.POSITIONING)},e.prototype.handleElementChanged=function(){N2(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(cm(this.element),Rr(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Pe(t,Gs.POSTRENDER,this.render,this),this.updatePixelPosition();var n=this.stopEvent?t.getOverlayContainerStopEvent():t.getOverlayContainer();this.insertFirst?n.insertBefore(this.element,n.childNodes[0]||null):n.appendChild(this.element),this.performAutoPan()}},e.prototype.render=function(){this.updatePixelPosition()},e.prototype.handleOffsetChanged=function(){this.updatePixelPosition()},e.prototype.handlePositionChanged=function(){this.updatePixelPosition(),this.performAutoPan()},e.prototype.handlePositioningChanged=function(){this.updatePixelPosition()},e.prototype.setElement=function(t){this.set(sa.ELEMENT,t)},e.prototype.setMap=function(t){this.set(sa.MAP,t)},e.prototype.setOffset=function(t){this.set(sa.OFFSET,t)},e.prototype.setPosition=function(t){this.set(sa.POSITION,t)},e.prototype.performAutoPan=function(){this.autoPan&&this.panIntoView(this.autoPan)},e.prototype.panIntoView=function(t){var n=this.getMap();if(!(!n||!n.getTargetElement()||!this.get(sa.POSITION))){var i=this.getRect(n.getTargetElement(),n.getSize()),a=this.getElement(),o=this.getRect(a,[w$(a),E$(a)]),s=t||{},A=s.margin===void 0?20:s.margin;if(!Eo(i,o)){var l=o[0]-i[0],u=i[2]-o[2],h=o[1]-i[1],c=i[3]-o[3],f=[0,0];if(l<0?f[0]=l-A:u<0&&(f[0]=Math.abs(u)+A),h<0?f[1]=h-A:c<0&&(f[1]=Math.abs(c)+A),f[0]!==0||f[1]!==0){var d=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(d);if(!v)return;var y=[v[0]+f[0],v[1]+f[1]],m=s.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(y),duration:m.duration,easing:m.easing})}}}},e.prototype.getRect=function(t,n){var i=t.getBoundingClientRect(),a=i.left+window.pageXOffset,o=i.top+window.pageYOffset;return[a,o,a+n[0],o+n[1]]},e.prototype.setPositioning=function(t){this.set(sa.POSITIONING,t)},e.prototype.setVisible=function(t){this.rendered.visible!==t&&(this.element.style.display=t?"":"none",this.rendered.visible=t)},e.prototype.updatePixelPosition=function(){var t=this.getMap(),n=this.getPosition();if(!t||!t.isRendered()||!n){this.setVisible(!1);return}var i=t.getPixelFromCoordinate(n),a=t.getSize();this.updateRenderedPosition(i,a)},e.prototype.updateRenderedPosition=function(t,n){var i=this.element.style,a=this.getOffset(),o=this.getPositioning();this.setVisible(!0);var s=Math.round(t[0]+a[0])+"px",A=Math.round(t[1]+a[1])+"px",l="0%",u="0%";o==Xa.BOTTOM_RIGHT||o==Xa.CENTER_RIGHT||o==Xa.TOP_RIGHT?l="-100%":(o==Xa.BOTTOM_CENTER||o==Xa.CENTER_CENTER||o==Xa.TOP_CENTER)&&(l="-50%"),o==Xa.BOTTOM_LEFT||o==Xa.BOTTOM_CENTER||o==Xa.BOTTOM_RIGHT?u="-100%":(o==Xa.CENTER_LEFT||o==Xa.CENTER_CENTER||o==Xa.CENTER_RIGHT)&&(u="-50%");var h="translate(".concat(l,", ").concat(u,") translate(").concat(s,", ").concat(A,")");this.rendered.transform_!=h&&(this.rendered.transform_=h,i.transform=h,i.msTransform=h)},e.prototype.getOptions=function(){return this.options},e}(ni),lU=Ej,uU=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)}}(),Ww=.75,Cy=.1,Cj=function(r){uU(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createRenderer=function(){return new Q2(this)},e}(iU),Bj=function(r){uU(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.boundHandleRotationChanged_=n.handleRotationChanged_.bind(n),n.collapsed_=i.collapsed!==void 0?i.collapsed:!0,n.collapsible_=i.collapsible!==void 0?i.collapsible:!0,n.collapsible_||(n.collapsed_=!1),n.rotateWithView_=i.rotateWithView!==void 0?i.rotateWithView:!1,n.viewExtent_=void 0;var a=i.className!==void 0?i.className:"ol-overviewmap",o=i.tipLabel!==void 0?i.tipLabel:"Overview map",s=i.collapseLabel!==void 0?i.collapseLabel:"‹";typeof s=="string"?(n.collapseLabel_=document.createElement("span"),n.collapseLabel_.textContent=s):n.collapseLabel_=s;var A=i.label!==void 0?i.label:"›";typeof A=="string"?(n.label_=document.createElement("span"),n.label_.textContent=A):n.label_=A;var l=n.collapsible_&&!n.collapsed_?n.collapseLabel_:n.label_,u=document.createElement("button");u.setAttribute("type","button"),u.title=o,u.appendChild(l),u.addEventListener(ye.CLICK,n.handleClick_.bind(n),!1),n.ovmapDiv_=document.createElement("div"),n.ovmapDiv_.className="ol-overviewmap-map",n.view_=i.view,n.ovmap_=new Cj({view:i.view});var h=n.ovmap_;i.layers&&i.layers.forEach(function(R){h.addLayer(R)});var c=document.createElement("div");c.className="ol-overviewmap-box",c.style.boxSizing="border-box",n.boxOverlay_=new lU({position:[0,0],positioning:Xa.CENTER_CENTER,element:c}),n.ovmap_.addOverlay(n.boxOverlay_);var f=a+" "+iA+" "+Zh+(n.collapsed_&&n.collapsible_?" "+hm:"")+(n.collapsible_?"":" ol-uncollapsible"),d=n.element;d.className=f,d.appendChild(n.ovmapDiv_),d.appendChild(u);var v=n,y=n.boxOverlay_,m=n.boxOverlay_.getElement(),w=function(R){return{clientX:R.clientX,clientY:R.clientY}},C=function(R){var O=w(R),I=h.getEventCoordinateInternal(O);y.setPosition(I)},B=function(R){var O=h.getEventCoordinateInternal(R);v.getMap().getView().setCenterInternal(O),window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",B)};return m.addEventListener("mousedown",function(){window.addEventListener("mousemove",C),window.addEventListener("mouseup",B)}),n}return e.prototype.setMap=function(t){var n=this.getMap();if(t!==n){if(n){var i=n.getView();i&&this.unbindView_(i),this.ovmap_.setTarget(null)}if(r.prototype.setMap.call(this,t),t){this.ovmap_.setTarget(this.ovmapDiv_),this.listenerKeys.push(Pe(t,Dh.PROPERTYCHANGE,this.handleMapPropertyChange_,this));var a=t.getView();a&&(this.bindView_(a),a.isDef()&&(this.ovmap_.updateSize(),this.resetExtent_())),this.ovmap_.isRendered()||this.updateBoxAfterOvmapIsRendered_()}}},e.prototype.handleMapPropertyChange_=function(t){if(t.key===Kn.VIEW){var n=t.oldValue;n&&this.unbindView_(n);var i=this.getMap().getView();this.bindView_(i)}else!this.ovmap_.isRendered()&&(t.key===Kn.TARGET||t.key===Kn.SIZE)&&this.ovmap_.updateSize()},e.prototype.bindView_=function(t){if(!this.view_){var n=new Ks({projection:t.getProjection()});this.ovmap_.setView(n)}t.addChangeListener(mo.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeChangeListener(mo.ROTATION,this.boundHandleRotationChanged_)},e.prototype.handleRotationChanged_=function(){this.rotateWithView_&&this.ovmap_.getView().setRotation(this.getMap().getView().getRotation())},e.prototype.validateExtent_=function(){var t=this.getMap(),n=this.ovmap_;if(!(!t.isRendered()||!n.isRendered())){var i=t.getSize(),a=t.getView(),o=a.calculateExtentInternal(i);if(!(this.viewExtent_&&nA(o,this.viewExtent_))){this.viewExtent_=o;var s=n.getSize(),A=n.getView(),l=A.calculateExtentInternal(s),u=n.getPixelFromCoordinateInternal(Ss(o)),h=n.getPixelFromCoordinateInternal(lp(o)),c=Math.abs(u[0]-h[0]),f=Math.abs(u[1]-h[1]),d=s[0],v=s[1];c<d*Cy||f<v*Cy||c>d*Ww||f>v*Ww?this.resetExtent_():Eo(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(Ww/Cy)/Math.LN2,l=1/(Math.pow(2,A/2)*Cy);_2(o,l),s.fitInternal(Eu(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(),h=a.getResolution(),c=o.getResolution(),f=i[0]*h/c,d=i[1]*h/c;if(A.setPosition(u),l){l.style.width=f+"px",l.style.height=d+"px";var v="rotate("+s+"rad)";l.style.transform=v}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Ev(this.ovmap_,Gs.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(hm),this.collapsed_?kf(this.collapseLabel_,this.label_):kf(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}(yr),Tj=Bj,xj=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),qw="units",qu={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},Sj=[1,2,5],Zw=25.4/.28,bj=function(r){xj(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+" "+iA,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(qw,n.handleUnitsChanged_),n.setUnits(i.units||qu.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(qw)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(qw,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==qu.DEGREES?Ma.DEGREES:Ma.METERS,s=ym(i,t.resolution,n,o),A=this.minWidth_*(this.dpi_||Zw)/Zw,l=A*s,u="";if(a==qu.DEGREES){var h=Es[Ma.DEGREES];l*=h,l<h/60?(u="″",s*=3600):l<h?(u="′",s*=60):u="°"}else a==qu.IMPERIAL?l<.9144?(u="in",s/=.0254):l<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):a==qu.NAUTICAL?(s/=1852,u="nm"):a==qu.METRIC?l<.001?(u="μm",s*=1e6):l<1?(u="mm",s*=1e3):l<1e3?u="m":(u="km",s/=1e3):a==qu.US?l<.9144?(u="in",s*=39.37):l<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):_e(!1,33);for(var c=3*Math.floor(Math.log(A*s)/Math.log(10)),f,d,v;;){v=Math.floor(c/3);var y=Math.pow(10,v);if(f=Sj[(c%3+3)%3]*y,d=Math.round(f/s),isNaN(d)){this.element.style.display="none",this.renderedVisible_=!1;return}else if(d>=A)break;++c}var m;this.scaleBar_?m=this.createScaleBar(d,f,u):m=f.toFixed(v<0?-v:0)+" "+u,this.renderedHTML_!=m&&(this.innerElement_.innerHTML=m,this.renderedHTML_=m),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.scaleBarSteps_;l++)l===0&&o.push(this.createMarker("absolute",l)),o.push('<div><div class="ol-scale-singlebar" style="width: '+s+"px;background-color: "+A+';"></div>'+this.createMarker("relative",l)+(l%2===0||this.scaleBarSteps_===2?this.createStepText(l,t,!1,n,i):"")+"</div>"),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='<div class="ol-scale-text" style="width: '+t+'px;">'+a+"</div>":u="";var h='<div style="display: flex;">'+u+o.join("")+"</div>";return h},e.prototype.createMarker=function(t,n){var i=t==="absolute"?3:-10;return'<div class="ol-scale-step-marker" style="position: '+t+";top: "+i+'px;"></div>'},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'<div class="ol-scale-step-text" style="margin-left: '+l+"px;text-align: "+(t===0?"left":"center")+"; min-width: "+u+"px;left: "+(i?n+"px":"unset")+';">'+A+"</div>"},e.prototype.getScaleForResolution=function(){var t=ym(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,Ma.METERS),n=this.dpi_||Zw,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}(yr),Lj=bj,Fj=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),od={VERTICAL:0,HORIZONTAL:1},Ij=function(r){Fj(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_=od.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 "+iA;var s=n.element;return s.className=a+" "+iA+" "+Zh,s.appendChild(o),s.addEventListener(Vs.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),s.addEventListener(Vs.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),s.addEventListener(Vs.POINTERUP,n.handleDraggerEnd_.bind(n),!1),s.addEventListener(ye.CLICK,n.handleContainerClick_.bind(n),!1),o.addEventListener(ye.CLICK,r$,!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_=od.HORIZONTAL,this.widthLimit_=n-A):(this.direction_=od.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:Yo})},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(Pe(o,Vs.POINTERMOVE,i,this),Pe(o,Vs.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(Rr),this.dragListenerKeys_.length=0}},e.prototype.setThumbPosition_=function(t){var n=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==od.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_===od.HORIZONTAL?i=t/this.widthLimit_:i=n/this.heightLimit_,En(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 En(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}(yr),Rj=Ij,Oj=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)}}(),Mj=function(r){Oj(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(ye.CLICK,n.handleClick_.bind(n),!1);var l=a+" "+iA+" "+Zh,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(Eu(i))},e}(yr),Pj=Mj;function Nj(r){var e=r||{},t=new ti,n=e.zoom!==void 0?e.zoom:!0;n&&t.push(new sU(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new oU(e.rotateOptions));var a=e.attribution!==void 0?e.attribution:!0;return a&&t.push(new aU(e.attributionOptions)),t}var yB={ACTIVE:"active"},Uj=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Dj=function(r){Uj(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(yB.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(yB.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(ni);function Qj(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:rb,center:r.getConstrainedCenter(i)})}}function cb(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:Yo})}}var cp=Dj,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){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==rr.DBLCLICK){var i=t.originalEvent,a=t.map,o=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_,A=a.getView();cb(A,s,o,this.duration_),i.preventDefault(),n=!0}return!n},e}(cp),kj=Gj,$j=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)}}(),Vj=function(r){$j(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==rr.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==rr.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==rr.POINTERDOWN){var a=this.handleDownEvent(t);this.handlingDownUpSequence=a,n=this.stopDown(a)}else t.type==rr.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(jj(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==rr.POINTERUP?delete this.trackedPointers_[i]:t.type==rr.POINTERDOWN?this.trackedPointers_[i]=n:i in this.trackedPointers_&&(this.trackedPointers_[i]=n),this.targetPointers=VS(this.trackedPointers_)}},e}(cp);function fb(r){for(var e=r.length,t=0,n=0,i=0;i<e;i++)t+=r[i].clientX,n+=r[i].clientY;return[t/e,n/e]}function jj(r){var e=r.type;return e===rr.POINTERDOWN||e===rr.POINTERDRAG||e===rr.POINTERUP}var So=Vj;function wm(r){var e=arguments;return function(t){for(var n=!0,i=0,a=e.length;i<a&&(n=n&&e[i](t),!!n);++i);return n}}var hU=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},cU=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},fU=function(r){var e=r.map.getTargetElement(),t=r.map.getOwnerDocument().activeElement;return e.contains(t)},pb=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?fU(r):!0},k_=Js,Kj=function(r){return r.type==rr.CLICK},db=function(r){var e=r.originalEvent;return e.button==0&&!(I9&&f2&&e.ctrlKey)},mB=zh,Yj=function(r){return r.type=="pointermove"},$_=function(r){return r.type==rr.SINGLECLICK},zj=function(r){return r.type==rr.DBLCLICK},V_=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Xj=function(r){var e=r.originalEvent;return!e.altKey&&(f2?e.metaKey:e.ctrlKey)&&!e.shiftKey},rg=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},vb=function(r){var e=r.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"},bh=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.pointerType=="mouse"},Wj=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.pointerType==="touch"},qj=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.pointerType==="pen"},gb=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.isPrimary&&e.button===0},Zj=Object.freeze(Object.defineProperty({__proto__:null,all:wm,altKeyOnly:hU,altShiftKeysOnly:cU,focus:fU,focusWithTabindex:pb,always:k_,click:Kj,mouseActionButton:db,never:mB,pointerMove:Yj,singleClick:$_,doubleClick:zj,noModifierKeys:V_,platformModifierKeyOnly:Xj,shiftKeyOnly:rg,targetNotEditable:vb,mouseOnly:bh,touchOnly:Wj,penOnly:qj,primaryAction:gb},Symbol.toStringTag,{value:"Module"})),Jj=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)}}(),tK=function(r){Jj(e,r);function e(t){var n=r.call(this,{stopDown:zh})||this,i=t||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var a=i.condition?i.condition:wm(V_,gb);return n.condition_=i.onFocusOnly?wm(pb,a):a,n.noKinetic_=!1,n}return e.prototype.handleDragEvent=function(t){this.panning_||(this.panning_=!0,this.getMap().getView().beginInteraction());var n=this.targetPointers,i=fb(n);if(n.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(i[0],i[1]),this.lastCentroid){var a=[this.lastCentroid[0]-i[0],i[1]-this.lastCentroid[1]],o=t.map,s=o.getView();R2(a,s.getResolution()),YS(a,s.getRotation()),s.adjustCenterInternal(a)}}else this.kinetic_&&this.kinetic_.begin();this.lastCentroid=i,this.lastPointersCount_=n.length,t.originalEvent.preventDefault()},e.prototype.handleUpEvent=function(t){var n=t.map,i=n.getView();if(this.targetPointers.length===0){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){var a=this.kinetic_.getDistance(),o=this.kinetic_.getAngle(),s=i.getCenterInternal(),A=n.getPixelFromCoordinateInternal(s),l=n.getCoordinateFromPixelInternal([A[0]-a*Math.cos(o),A[1]-a*Math.sin(o)]);i.animateInternal({center:i.getConstrainedCenter(l),duration:500,easing:Yo})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}else return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>0&&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}(So),eK=tK,rK=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)}}(),nK=function(r){rK(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,{stopDown:zh})||this,n.condition_=i.condition?i.condition:cU,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){if(bh(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==tb){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(!bh(t))return!0;var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!bh(t))return!1;if(db(t)&&this.condition_(t)){var n=t.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(So),iK=nK,aK=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)}}(),oK=function(r){aK(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 Cn([a])},e.prototype.getGeometry=function(){return this.geometry_},e}(F_),sK=oK,pU=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)}}(),By={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},Jw=function(r){pU(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.coordinate=n,a.mapBrowserEvent=i,a}return e}(oo),AK=function(r){pU(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.box_=new sK(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:db,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 Jw(By.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 Jw(n?By.BOXEND:By.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 Jw(By.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(So),lK=AK,uK=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)}}(),hK=function(r){uK(e,r);function e(t){var n=this,i=t||{},a=i.condition?i.condition:rg;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:Yo})},e}(lK),cK=hK,Zu={LEFT:37,UP:38,RIGHT:39,DOWN:40},fK=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)}}(),pK=function(r){fK(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.defaultCondition_=function(a){return V_(a)&&vb(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==ye.KEYDOWN){var i=t.originalEvent,a=i.keyCode;if(this.condition_(t)&&(a==Zu.DOWN||a==Zu.LEFT||a==Zu.RIGHT||a==Zu.UP)){var o=t.map,s=o.getView(),A=s.getResolution()*this.pixelDelta_,l=0,u=0;a==Zu.DOWN?u=-A:a==Zu.LEFT?l=-A:a==Zu.RIGHT?l=A:u=A;var h=[l,u];YS(h,s.getRotation()),Qj(s,h,this.duration_),i.preventDefault(),n=!0}}return!n},e}(cp),dK=pK,vK=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)}}(),gK=function(r){vK(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.condition_=i.condition?i.condition:vb,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==ye.KEYDOWN||t.type==ye.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();cb(A,s,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},e}(cp),yK=gK,mK=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]<e)return!1;for(var n=t-3;n>0&&this.points_[n+2]>e;)n-=3;var i=this.points_[t+2]-this.points_[n+2];if(i<1e3/60)return!1;var 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}(),_K=mK,wK=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),tE={TRACKPAD:"trackpad",WHEEL:"wheel"},EK=function(r){wK(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:k_;return n.condition_=i.onFocusOnly?wm(pb,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!==ye.WHEEL)return!0;var i=t.map,a=t.originalEvent;a.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);var o;if(t.type==ye.WHEEL&&(o=a.deltaY,b9&&a.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=Uh),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?tE.TRACKPAD:tE.WHEEL);var A=i.getView();if(this.mode_===tE.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=-En(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),cb(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}(cp),CK=EK,BK=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)}}(),TK=function(r){BK(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=zh),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!==tb){var u=A.getViewport().getBoundingClientRect(),h=fb(this.targetPointers);h[0]-=u.left,h[1]-=u.top,this.anchor_=A.getCoordinateFromPixelInternal(h),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}(So),xK=TK,SK=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)}}(),bK=function(r){SK(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=zh),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 h=l.getViewport().getBoundingClientRect(),c=fb(this.targetPointers);c[0]-=h.left,c[1]-=h.top,this.anchor_=l.getCoordinateFromPixelInternal(c),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}(So),LK=bK,vs={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"},FK=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)}}(),IK=function(r){FK(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.condition_=i.condition?i.condition:rg,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(bh(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 h=this.lastAngle_-A;u.adjustRotationInternal(h)}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(!bh(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 bh(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0):!1},e}(So),RK=IK,OK=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)}}(),dU=function(r){OK(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<a){if(l===0)for(var u=0;u<this.stride;++u)i[u]=o[u];else{var h=this.getRadius()/Math.sqrt(l);i[0]=o[0]+h*s,i[1]=o[1]+h*A;for(var u=2;u<this.stride;++u)i[u]=o[u]}return i.length=this.stride,l}else return a},e.prototype.containsXY=function(t,n){var i=this.flatCoordinates,a=t-i[0],o=n-i[1];return a*a+o*o<=this.getRadiusSquared_()},e.prototype.getCenter=function(){return this.flatCoordinates.slice(0,this.stride)},e.prototype.computeExtent=function(t){var n=this.flatCoordinates,i=n[this.stride]-n[0];return no(n[0]-i,n[1]-i,n[0]+i,n[1]+i,t)},e.prototype.getRadius=function(){return Math.sqrt(this.getRadiusSquared_())},e.prototype.getRadiusSquared_=function(){var t=this.flatCoordinates[this.stride]-this.flatCoordinates[0],n=this.flatCoordinates[this.stride+1]-this.flatCoordinates[1];return t*t+n*n},e.prototype.getType=function(){return st.CIRCLE},e.prototype.intersectsExtent=function(t){var n=this.getExtent();if(In(t,n)){var i=this.getCenter();return t[0]<=i[0]&&t[2]>=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:P_(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;o<n;++o)a[n+o]=t[o];this.setFlatCoordinates(this.layout,a),this.changed()},e.prototype.setCenterAndRadius=function(t,n,i){this.setLayout(i,t,0),this.flatCoordinates||(this.flatCoordinates=[]);var a=this.flatCoordinates,o=K2(a,0,t,this.stride);a[o++]=a[0]+n;for(var s=1,A=this.stride;s<A;++s)a[o++]=a[s];a.length=o,this.changed()},e.prototype.getCoordinates=function(){return null},e.prototype.setCoordinates=function(t,n){},e.prototype.setRadius=function(t){this.flatCoordinates[this.stride]=this.flatCoordinates[0]+t,this.changed()},e.prototype.rotate=function(t,n){var i=this.getCenter(),a=this.getStride();this.setCenter(nb(i,0,i.length,a,t,n,i)),this.changed()},e.prototype.translate=function(t,n){var i=this.getCenter(),a=this.getStride();this.setCenter(j2(i,0,i.length,a,t,n,i)),this.changed()},e}(Cs);dU.prototype.transform;var yb=dU,MK=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)}}(),PK=function(r){MK(e,r);function e(t){var n=r.call(this)||this;if(n.on,n.once,n.un,n.id_=void 0,n.geometryName_="geometry",n.style_=null,n.styleFunction_=void 0,n.geometryChangeKey_=null,n.addChangeListener(n.geometryName_,n.handleGeometryChanged_),t)if(typeof t.getSimplifiedGeometry=="function"){var i=t;n.setGeometry(i)}else{var a=t;n.setProperties(a)}return n}return e.prototype.clone=function(){var t=new e(this.hasProperties()?this.getProperties():null);t.setGeometryName(this.getGeometryName());var n=this.getGeometry();n&&t.setGeometry(n.clone());var i=this.getStyle();return i&&t.setStyle(i),t},e.prototype.getGeometry=function(){return this.get(this.geometryName_)},e.prototype.getId=function(){return this.id_},e.prototype.getGeometryName=function(){return this.geometryName_},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.handleGeometryChange_=function(){this.changed()},e.prototype.handleGeometryChanged_=function(){this.geometryChangeKey_&&(Rr(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=Pe(t,ye.CHANGE,this.handleGeometryChange_,this)),this.changed()},e.prototype.setGeometry=function(t){this.set(this.geometryName_,t)},e.prototype.setStyle=function(t){this.style_=t,this.styleFunction_=t?NK(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(ni);function NK(r){if(typeof r=="function")return r;var e;if(Array.isArray(r))e=r;else{_e(typeof r.getZIndex=="function",41);var t=r;e=[t]}return function(){return e}}var nr=PK;function Em(r,e,t,n,i,a,o){var s,A,l=(t-e)/n;if(l===1)s=e;else if(l===2)s=e,A=i;else if(l!==0){for(var u=r[e],h=r[e+1],c=0,f=[0],d=e+n;d<t;d+=n){var v=r[d],y=r[d+1];c+=Math.sqrt((v-u)*(v-u)+(y-h)*(y-h)),f.push(c),u=v,h=y}var m=i*c,w=C9(f,m);w<0?(A=(m-f[-w-2])/(f[-w-1]-f[-w-2]),s=e+(-w-2)*n):s=e+w*n}for(var C=o>1?o:2,B=a||new Array(C),d=0;d<C;++d)B[d]=s===void 0?NaN:A===void 0?r[s+d]:kA(r[s+d],r[s+n+d],A);return B}function _B(r,e,t,n,i,a){if(t==e)return null;var o;if(i<r[e+n-1])return a?(o=r.slice(e,e+n),o[n-1]=i,o):null;if(r[t-1]<i)return a?(o=r.slice(t-n,t),o[n-1]=i,o):null;if(i==r[e+n-1])return r.slice(e,e+n);for(var s=e/n,A=t/n;s<A;){var l=s+A>>1;i<r[(l+1)*n-1]?A=l:s=l+1}var u=r[s*n-1];if(i==u)return r.slice((s-1)*n,(s-1)*n+n);var h=r[(s+1)*n-1],c=(i-u)/(h-u);o=[];for(var f=0;f<n-1;++f)o.push(kA(r[(s-1)*n+f],r[s*n+f],c));return o.push(i),o}function UK(r,e,t,n,i,a,o){if(o)return _B(r,e,t[t.length-1],n,i,a);var s;if(i<r[n-1])return a?(s=r.slice(0,n),s[n-1]=i,s):null;if(r[r.length-1]<i)return a?(s=r.slice(r.length-n),s[n-1]=i,s):null;for(var A=0,l=t.length;A<l;++A){var u=t[A];if(e!=u){if(i<r[e+n-1])return null;if(i<=r[u-1])return _B(r,e,u,n,i,!1);e=u}}return null}function vU(r,e,t,n){for(var i=r[e],a=r[e+1],o=0,s=e+n;s<t;s+=n){var A=r[s],l=r[s+1];o+=Math.sqrt((A-i)*(A-i)+(l-a)*(l-a)),i=A,a=l}return o}var DK=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)}}(),QK=function(r){DK(e,r);function e(t,n){var i=r.call(this)||this;return i.flatMidpoint_=null,i.flatMidpointRevision_=-1,i.maxDelta_=-1,i.maxDeltaRevision_=-1,n!==void 0&&!Array.isArray(t[0])?i.setFlatCoordinates(n,t):i.setCoordinates(t,n),i}return e.prototype.appendCoordinate=function(t){this.flatCoordinates?Ur(this.flatCoordinates,t):this.flatCoordinates=t.slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){return a<Fu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ib(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ob(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.forEachSegment=function(t){return q2(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,n){if(this.layout!=Wt.XYM&&this.layout!=Wt.XYZM)return null;var i=n!==void 0?n:!1;return _B(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return VA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,n){return Em(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},e.prototype.getLength=function(){return vU(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getFlatMidpoint=function(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=lb(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,Wt.XY)},e.prototype.getType=function(){return st.LINE_STRING},e.prototype.intersectsExtent=function(t){return Q_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=eg(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Cs),Dr=QK,HK=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)}}(),GK=function(r){HK(e,r);function e(t,n,i){var a=r.call(this)||this;if(a.ends_=[],a.maxDelta_=-1,a.maxDeltaRevision_=-1,Array.isArray(t[0]))a.setCoordinates(t,n);else if(n!==void 0&&i)a.setFlatCoordinates(n,t),a.ends_=i;else{for(var o=a.getLayout(),s=t,A=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];u===0&&(o=c.getLayout()),Ur(A,c.getFlatCoordinates()),l.push(A.length)}a.setFlatCoordinates(o,A),a.ends_=l}return a}return e.prototype.appendLineString=function(t){this.flatCoordinates?Ur(this.flatCoordinates,t.getFlatCoordinates().slice()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){return a<Fu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(ab(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),sb(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.getCoordinateAtM=function(t,n,i){if(this.layout!=Wt.XYM&&this.layout!=Wt.XYZM||this.flatCoordinates.length===0)return null;var a=n!==void 0?n:!1,o=i!==void 0?i:!1;return UK(this.flatCoordinates,0,this.ends_,this.stride,t,a,o)},e.prototype.getCoordinates=function(){return Fv(this.flatCoordinates,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getLineString=function(t){return t<0||this.ends_.length<=t?null:new Dr(this.flatCoordinates.slice(t===0?0:this.ends_[t-1],this.ends_[t]),this.layout)},e.prototype.getLineStrings=function(){for(var t=this.flatCoordinates,n=this.ends_,i=this.layout,a=[],o=0,s=0,A=n.length;s<A;++s){var l=n[s],u=new Dr(t.slice(o,l),i);a.push(u),o=l}return a},e.prototype.getFlatMidpoints=function(){for(var t=[],n=this.flatCoordinates,i=0,a=this.ends_,o=this.stride,s=0,A=a.length;s<A;++s){var l=a[s],u=Em(n,i,l,o,.5);Ur(t,u),i=l}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=FV(this.flatCoordinates,0,this.ends_,this.stride,t,n,0,i),new e(n,Wt.XY,i)},e.prototype.getType=function(){return st.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return HV(this.flatCoordinates,0,this.ends_,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,2),this.flatCoordinates||(this.flatCoordinates=[]);var i=Ab(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(Cs),Ea=GK,kK=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)}}(),$K=function(r){kK(e,r);function e(t,n){var i=r.call(this)||this;return n&&!Array.isArray(t[0])?i.setFlatCoordinates(n,t):i.setCoordinates(t,n),i}return e.prototype.appendPoint=function(t){this.flatCoordinates?Ur(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.changed()},e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){if(a<Fu(this.getExtent(),t,n))return a;for(var o=this.flatCoordinates,s=this.stride,A=0,l=o.length;A<l;A+=s){var u=Sh(t,n,o[A],o[A+1]);if(u<a){a=u;for(var h=0;h<s;++h)i[h]=o[A+h];i.length=s}}return a},e.prototype.getCoordinates=function(){return VA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getPoint=function(t){var n=this.flatCoordinates?this.flatCoordinates.length/this.stride:0;return t<0||n<=t?null:new cr(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)},e.prototype.getPoints=function(){for(var t=this.flatCoordinates,n=this.layout,i=this.stride,a=[],o=0,s=t.length;o<s;o+=i){var A=new cr(t.slice(o,o+i),n);a.push(A)}return a},e.prototype.getType=function(){return st.MULTI_POINT},e.prototype.intersectsExtent=function(t){for(var n=this.flatCoordinates,i=this.stride,a=0,o=n.length;a<o;a+=i){var s=n[a],A=n[a+1];if(O_(t,s,A))return!0}return!1},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=eg(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Cs),zo=$K;function gU(r,e,t,n){for(var i=[],a=di(),o=0,s=t.length;o<s;++o){var A=t[o];a=M_(r,e,A[0],n),i.push((a[0]+a[2])/2,(a[1]+a[3])/2),e=A[A.length-1]}return i}var VK=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)}}(),jK=function(r){VK(e,r);function e(t,n,i){var a=r.call(this)||this;if(a.endss_=[],a.flatInteriorPointsRevision_=-1,a.flatInteriorPoints_=null,a.maxDelta_=-1,a.maxDeltaRevision_=-1,a.orientedRevision_=-1,a.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){for(var o=a.getLayout(),s=t,A=[],l=[],u=0,h=s.length;u<h;++u){var c=s[u];u===0&&(o=c.getLayout());for(var f=A.length,d=c.getEnds(),v=0,y=d.length;v<y;++v)d[v]+=f;Ur(A,c.getFlatCoordinates()),l.push(d)}n=o,t=A,i=l}return n!==void 0&&i?(a.setFlatCoordinates(n,t),a.endss_=i):a.setCoordinates(t,n),a}return e.prototype.appendPolygon=function(t){var n;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),n=t.getEnds().slice(),this.endss_.push();else{var i=this.flatCoordinates.length;Ur(this.flatCoordinates,t.getFlatCoordinates()),n=t.getEnds().slice();for(var a=0,o=n.length;a<o;++a)n[a]+=i}this.endss_.push(n),this.changed()},e.prototype.clone=function(){for(var t=this.endss_.length,n=new Array(t),i=0;i<t;++i)n[i]=this.endss_[i].slice();var a=new e(this.flatCoordinates.slice(),this.layout,n);return a.applyProperties(this),a},e.prototype.closestPointXY=function(t,n,i,a){return a<Fu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(SV(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),bV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return QV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,n)},e.prototype.getArea=function(){return OV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),qI(n,0,this.endss_,this.stride,t)):n=this.flatCoordinates,vB(n,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=gU(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=W2(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new zo(this.getFlatInteriorPoints().slice(),Wt.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;VV(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=qI(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=RV(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),n,0,i),new e(n,Wt.XY,i)},e.prototype.getPolygon=function(t){if(t<0||this.endss_.length<=t)return null;var n;if(t===0)n=0;else{var i=this.endss_[t-1];n=i[i.length-1]}var a=this.endss_[t].slice(),o=a[a.length-1];if(n!==0)for(var s=0,A=a.length;s<A;++s)a[s]-=n;return new Cn(this.flatCoordinates.slice(n,o),this.layout,a)},e.prototype.getPolygons=function(){for(var t=this.layout,n=this.flatCoordinates,i=this.endss_,a=[],o=0,s=0,A=i.length;s<A;++s){var l=i[s].slice(),u=l[l.length-1];if(o!==0)for(var h=0,c=l.length;h<c;++h)l[h]-=o;var f=new Cn(n.slice(o,u),t,l);a.push(f),o=u}return a},e.prototype.getType=function(){return st.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return kV(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)},e.prototype.setCoordinates=function(t,n){this.setLayout(n,t,3),this.flatCoordinates||(this.flatCoordinates=[]);var i=LV(this.flatCoordinates,0,t,this.stride,this.endss_);if(i.length===0)this.flatCoordinates.length=0;else{var a=i[i.length-1];this.flatCoordinates.length=a.length===0?0:a[a.length-1]}this.changed()},e}(Cs),Ca=jK;function KK(r,e,t,n,i){yU(r,e,t||0,n||r.length-1,i||YK)}function yU(r,e,t,n,i){for(;n>t;){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)),h=Math.min(n,Math.floor(e+(a-o)*A/a+l));yU(r,e,u,h,i)}var c=r[e],f=t,d=n;for(sd(r,t,e),i(r[n],c)>0&&sd(r,t,n);f<d;){for(sd(r,f,d),f++,d--;i(r[f],c)<0;)f++;for(;i(r[d],c)>0;)d--}i(r[t],c)===0?sd(r,t,d):(d++,sd(r,d,n)),d<=e&&(t=d+1),e<=d&&(n=d-1)}}function sd(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function YK(r,e){return r<e?-1:r>e?1:0}class mU{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(!xy(e,t))return n;const i=this.toBBox,a=[];for(;t;){for(let o=0;o<t.children.length;o++){const s=t.children[o],A=t.leaf?i(s):s;xy(e,A)&&(t.leaf?n.push(s):rE(e,A)?this._all(s,n):a.push(s))}t=a.pop()}return n}collides(e){let t=this.data;if(!xy(e,t))return!1;const n=[];for(;t;){for(let i=0;i<t.children.length;i++){const a=t.children[i],o=t.leaf?this.toBBox(a):a;if(xy(e,o)){if(t.leaf||rE(e,o))return!0;n.push(a)}}t=n.pop()}return!1}load(e){if(!(e&&e.length))return this;if(e.length<this._minEntries){for(let n=0;n<e.length;n++)this.insert(e[n]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(!this.data.children.length)this.data=t;else if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const n=this.data;this.data=t,t=n}this._insert(t,this.data.height-t.height-1,!0)}return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=rf([]),this}remove(e,t){if(!e)return this;let n=this.data;const i=this.toBBox(e),a=[],o=[];let s,A,l;for(;n||a.length;){if(n||(n=a.pop(),A=a[a.length-1],s=o.pop(),l=!0),n.leaf){const u=zK(e,n.children,t);if(u!==-1)return n.children.splice(u,1),a.push(n),this._condense(a),this}!l&&!n.leaf&&rE(n,i)?(a.push(n),o.push(s),s=0,A=n,n=n.children[0]):A?(s++,n=A.children[s],l=!1):n=null}return this}toBBox(e){return e}compareMinX(e,t){return e.minX-t.minX}compareMinY(e,t){return e.minY-t.minY}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){const n=[];for(;e;)e.leaf?t.push(...e.children):n.push(...e.children),e=n.pop();return t}_build(e,t,n,i){const a=n-t+1;let o=this._maxEntries,s;if(a<=o)return s=rf(e.slice(t,n+1)),Nc(s,this.toBBox),s;i||(i=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,i-1))),s=rf([]),s.leaf=!1,s.height=i;const A=Math.ceil(a/o),l=A*Math.ceil(Math.sqrt(o));aR(e,t,n,l,this.compareMinX);for(let u=t;u<=n;u+=l){const h=Math.min(u+l-1,n);aR(e,u,h,A,this.compareMinY);for(let c=u;c<=h;c+=A){const f=Math.min(c+A-1,h);s.children.push(this._build(e,c,f,i-1))}}return Nc(s,this.toBBox),s}_chooseSubtree(e,t,n,i){for(;i.push(t),!(t.leaf||i.length-1===n);){let a=1/0,o=1/0,s;for(let A=0;A<t.children.length;A++){const l=t.children[A],u=eE(l),h=qK(e,l)-u;h<o?(o=h,a=u<a?u:a,s=l):h===o&&u<a&&(a=u,s=l)}t=s||t.children[0]}return t}_insert(e,t,n){const i=n?e:this.toBBox(e),a=[],o=this._chooseSubtree(i,this.data,t,a);for(o.children.push(e),Fd(o,i);t>=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=rf(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,Nc(n,this.toBBox),Nc(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=rf([e,t]),this.data.height=e.height+1,this.data.leaf=!1,Nc(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=Ld(e,0,s,this.toBBox),l=Ld(e,s,n,this.toBBox),u=ZK(A,l),h=eE(A)+eE(l);u<a?(a=u,i=s,o=h<o?h:o):u===a&&h<o&&(o=h,i=s)}return i||n-t}_chooseSplitAxis(e,t,n){const i=e.leaf?this.compareMinX:XK,a=e.leaf?this.compareMinY:WK,o=this._allDistMargin(e,t,n,i),s=this._allDistMargin(e,t,n,a);o<s&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const a=this.toBBox,o=Ld(e,0,t,a),s=Ld(e,n-t,n,a);let A=Ty(o)+Ty(s);for(let l=t;l<n-t;l++){const u=e.children[l];Fd(o,e.leaf?a(u):u),A+=Ty(o)}for(let l=n-t-1;l>=t;l--){const u=e.children[l];Fd(s,e.leaf?a(u):u),A+=Ty(s)}return A}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)Fd(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():Nc(e[t],this.toBBox)}}function zK(r,e,t){if(!t)return e.indexOf(r);for(let n=0;n<e.length;n++)if(t(r,e[n]))return n;return-1}function Nc(r,e){Ld(r,0,r.children.length,e,r)}function Ld(r,e,t,n,i){i||(i=rf(null)),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let a=e;a<t;a++){const o=r.children[a];Fd(i,r.leaf?n(o):o)}return i}function Fd(r,e){return r.minX=Math.min(r.minX,e.minX),r.minY=Math.min(r.minY,e.minY),r.maxX=Math.max(r.maxX,e.maxX),r.maxY=Math.max(r.maxY,e.maxY),r}function XK(r,e){return r.minX-e.minX}function WK(r,e){return r.minY-e.minY}function eE(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function Ty(r){return r.maxX-r.minX+(r.maxY-r.minY)}function qK(r,e){return(Math.max(e.maxX,r.maxX)-Math.min(e.minX,r.minX))*(Math.max(e.maxY,r.maxY)-Math.min(e.minY,r.minY))}function ZK(r,e){const t=Math.max(r.minX,e.minX),n=Math.max(r.minY,e.minY),i=Math.min(r.maxX,e.maxX),a=Math.min(r.maxY,e.maxY);return Math.max(0,i-t)*Math.max(0,a-n)}function rE(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function xy(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function rf(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function aR(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;KK(r,o,e,t,i),a.push(e,o,o,t)}}var ke={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},JK=function(){function r(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Li(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 Ee()},r.prototype.getImage=function(e){return Ee()},r.prototype.getHitDetectionImage=function(){return Ee()},r.prototype.getPixelRatio=function(e){return 1},r.prototype.getImageState=function(){return Ee()},r.prototype.getImageSize=function(){return Ee()},r.prototype.getOrigin=function(){return Ee()},r.prototype.getSize=function(){return Ee()},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_=Li(e)},r.prototype.listenImageChange=function(e){Ee()},r.prototype.load=function(){Ee()},r.prototype.unlistenImageChange=function(e){Ee()},r}(),_U=JK;function zs(r){return Array.isArray(r)?b2(r):r}var tY=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)}}(),eY=function(r){tY(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=Ha(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 ke.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(a<o){var s=a;a=o,o=s}var A=this.radius2_===void 0?this.points_:this.points_*2,l=2*Math.PI/A,u=o*Math.sin(l),h=Math.sqrt(o*o-u*u),c=a-h,f=Math.sqrt(u*u+c*c),d=f/u;if(t==="miter"&&d<=i)return d*n;var v=n/2/d,y=n/2*(c/f),m=Math.sqrt((a+v)*(a+v)+y*y),w=m-a;if(this.radius2_===void 0||t==="bevel")return w*2;var C=a*Math.sin(l),B=Math.sqrt(a*a-C*C),R=o-B,O=Math.sqrt(C*C+R*R),I=O/C;if(I<=i){var T=I*n/2-o-a;return 2*Math.max(w,T)}return w*2},e.prototype.createRenderOptions=function(){var t=$f,n=0,i=null,a=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=xv),o=zs(o),s=this.stroke_.getWidth(),s===void 0&&(s=bv),i=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=$f),n=this.stroke_.getMiterLimit(),n===void 0&&(n=Tv));var A=this.calculateLineJoinSize_(t,s,n),l=Math.max(this.radius_,this.radius2_||0),u=Math.ceil(2*l+A);return{strokeStyle:o,strokeWidth:s,size:u,lineDash:i,lineDashOffset:a,lineJoin:t,miterLimit:n}},e.prototype.render=function(){this.renderOptions_=this.createRenderOptions();var t=this.renderOptions_.size;this.canvas_={},this.size_=[t,t]},e.prototype.draw_=function(t,n,i){if(n.scale(i,i),n.translate(t.size/2,t.size/2),this.createPath_(n),this.fill_){var a=this.fill_.getColor();a===null&&(a=zA),n.fillStyle=zs(a),n.fill()}this.stroke_&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,n.setLineDash&&t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},e.prototype.createHitDetectionCanvas_=function(t){if(this.fill_){var n=this.fill_.getColor(),i=0;if(typeof n=="string"&&(n=_u(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0){var a=Ha(t.size,t.size);this.hitDetectionCanvas_=a.canvas,this.drawHitDetectionCanvas_(t,a)}}this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.getImage(1))},e.prototype.createPath_=function(t){var n=this.points_,i=this.radius_;if(n===1/0)t.arc(0,0,i,0,2*Math.PI);else{var a=this.radius2_===void 0?i:this.radius2_;this.radius2_!==void 0&&(n*=2);for(var o=this.angle_-Math.PI/2,s=2*Math.PI/n,A=0;A<n;A++){var l=o+A*s,u=A%2===0?i:a;t.lineTo(u*Math.cos(l),u*Math.sin(l))}t.closePath()}},e.prototype.drawHitDetectionCanvas_=function(t,n){n.translate(t.size/2,t.size/2),this.createPath_(n),n.fillStyle=zA,n.fill(),this.stroke_&&(n.strokeStyle=t.strokeStyle,n.lineWidth=t.strokeWidth,t.lineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.miterLimit=t.miterLimit,n.stroke())},e}(_U),I0=eY,rY=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)}}(),nY=function(r){rY(e,r);function e(t){var n=t||{};return r.call(this,{points:1/0,fill:n.fill,radius:n.radius,stroke:n.stroke,scale:n.scale!==void 0?n.scale:1,rotation:n.rotation!==void 0?n.rotation:0,rotateWithView:n.rotateWithView!==void 0?n.rotateWithView:!1,displacement:n.displacement!==void 0?n.displacement:[0,0]})||this}return e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.setRadius=function(t){this.radius_=t,this.render()},e}(I0),ng=nY,iY=function(){function r(e){var t=e||{};this.color_=t.color!==void 0?t.color:null}return r.prototype.clone=function(){var e=this.getColor();return new r({color:Array.isArray(e)?e.slice():e||void 0})},r.prototype.getColor=function(){return this.color_},r.prototype.setColor=function(e){this.color_=e},r}(),ra=iY,aY=function(){function r(e){var t=e||{};this.color_=t.color!==void 0?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=t.lineDash!==void 0?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.width_=t.width}return r.prototype.clone=function(){var e=this.getColor();return new r({color:Array.isArray(e)?e.slice():e||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),width:this.getWidth()})},r.prototype.getColor=function(){return this.color_},r.prototype.getLineCap=function(){return this.lineCap_},r.prototype.getLineDash=function(){return this.lineDash_},r.prototype.getLineDashOffset=function(){return this.lineDashOffset_},r.prototype.getLineJoin=function(){return this.lineJoin_},r.prototype.getMiterLimit=function(){return this.miterLimit_},r.prototype.getWidth=function(){return this.width_},r.prototype.setColor=function(e){this.color_=e},r.prototype.setLineCap=function(e){this.lineCap_=e},r.prototype.setLineDash=function(e){this.lineDash_=e},r.prototype.setLineDashOffset=function(e){this.lineDashOffset_=e},r.prototype.setLineJoin=function(e){this.lineJoin_=e},r.prototype.setMiterLimit=function(e){this.miterLimit_=e},r.prototype.setWidth=function(e){this.width_=e},r}(),Fi=aY,df=function(){function r(e){var t=e||{};this.geometry_=null,this.geometryFunction_=oR,t.geometry!==void 0&&this.setGeometry(t.geometry),this.fill_=t.fill!==void 0?t.fill:null,this.image_=t.image!==void 0?t.image:null,this.renderer_=t.renderer!==void 0?t.renderer:null,this.hitDetectionRenderer_=t.hitDetectionRenderer!==void 0?t.hitDetectionRenderer:null,this.stroke_=t.stroke!==void 0?t.stroke:null,this.text_=t.text!==void 0?t.text:null,this.zIndex_=t.zIndex}return r.prototype.clone=function(){var e=this.getGeometry();return e&&typeof e=="object"&&(e=e.clone()),new r({geometry:e,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer(),stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})},r.prototype.getRenderer=function(){return this.renderer_},r.prototype.setRenderer=function(e){this.renderer_=e},r.prototype.setHitDetectionRenderer=function(e){this.hitDetectionRenderer_=e},r.prototype.getHitDetectionRenderer=function(){return this.hitDetectionRenderer_},r.prototype.getGeometry=function(){return this.geometry_},r.prototype.getGeometryFunction=function(){return this.geometryFunction_},r.prototype.getFill=function(){return this.fill_},r.prototype.setFill=function(e){this.fill_=e},r.prototype.getImage=function(){return this.image_},r.prototype.setImage=function(e){this.image_=e},r.prototype.getStroke=function(){return this.stroke_},r.prototype.setStroke=function(e){this.stroke_=e},r.prototype.getText=function(){return this.text_},r.prototype.setText=function(e){this.text_=e},r.prototype.getZIndex=function(){return this.zIndex_},r.prototype.setGeometry=function(e){typeof e=="function"?this.geometryFunction_=e:typeof e=="string"?this.geometryFunction_=function(t){return t.get(e)}:e?e!==void 0&&(this.geometryFunction_=function(){return e}):this.geometryFunction_=oR,this.geometry_=e},r.prototype.setZIndex=function(e){this.zIndex_=e},r}();function oY(r){var e;if(typeof r=="function")e=r;else{var t;if(Array.isArray(r))t=r;else{_e(typeof r.getZIndex=="function",41);var n=r;t=[n]}e=function(){return t}}return e}var nE=null;function sY(r,e){if(!nE){var t=new ra({color:"rgba(255,255,255,0.4)"}),n=new Fi({color:"#3399CC",width:1.25});nE=[new df({image:new ng({fill:t,stroke:n,radius:5}),fill:t,stroke:n})]}return nE}function mb(){var r={},e=[255,255,255,1],t=[0,153,255,1],n=3;return r[st.POLYGON]=[new df({fill:new ra({color:[255,255,255,.5]})})],r[st.MULTI_POLYGON]=r[st.POLYGON],r[st.LINE_STRING]=[new df({stroke:new Fi({color:e,width:n+2})}),new df({stroke:new Fi({color:t,width:n})})],r[st.MULTI_LINE_STRING]=r[st.LINE_STRING],r[st.CIRCLE]=r[st.POLYGON].concat(r[st.LINE_STRING]),r[st.POINT]=[new df({image:new ng({radius:n*2,fill:new ra({color:t}),stroke:new Fi({color:e,width:n/2})}),zIndex:1/0})],r[st.MULTI_POINT]=r[st.POINT],r[st.GEOMETRY_COLLECTION]=r[st.POLYGON].concat(r[st.LINE_STRING],r[st.POINT]),r}function oR(r){return r.getGeometry()}var ta=df,AY=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)}}(),sR={RENDER_ORDER:"renderOrder"},lY=function(r){AY(e,r);function e(t){var n=this,i=t||{},a=de({},i);return delete a.style,delete a.renderBuffer,delete a.updateWhileAnimating,delete a.updateWhileInteracting,n=r.call(this,a)||this,n.declutter_=i.declutter!==void 0?i.declutter:!1,n.renderBuffer_=i.renderBuffer!==void 0?i.renderBuffer:100,n.style_=null,n.styleFunction_=void 0,n.setStyle(i.style),n.updateWhileAnimating_=i.updateWhileAnimating!==void 0?i.updateWhileAnimating:!1,n.updateWhileInteracting_=i.updateWhileInteracting!==void 0?i.updateWhileInteracting:!1,n}return e.prototype.getDeclutter=function(){return this.declutter_},e.prototype.getFeatures=function(t){return r.prototype.getFeatures.call(this,t)},e.prototype.getRenderBuffer=function(){return this.renderBuffer_},e.prototype.getRenderOrder=function(){return this.get(sR.RENDER_ORDER)},e.prototype.getStyle=function(){return this.style_},e.prototype.getStyleFunction=function(){return this.styleFunction_},e.prototype.getUpdateWhileAnimating=function(){return this.updateWhileAnimating_},e.prototype.getUpdateWhileInteracting=function(){return this.updateWhileInteracting_},e.prototype.renderDeclutter=function(t){t.declutterTree||(t.declutterTree=new mU(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(sR.RENDER_ORDER,t)},e.prototype.setStyle=function(t){this.style_=t!==void 0?t:sY,this.styleFunction_=t===null?void 0:oY(this.style_),this.changed()},e}(qh),j_=lY,ig={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},Sy=[ig.FILL],Zl=[ig.STROKE],yh=[ig.BEGIN_PATH],AR=[ig.CLOSE_PATH],De=ig,uY=function(){function r(){}return r.prototype.drawCustom=function(e,t,n,i){},r.prototype.drawGeometry=function(e){},r.prototype.setStyle=function(e){},r.prototype.drawCircle=function(e,t){},r.prototype.drawFeature=function(e,t){},r.prototype.drawGeometryCollection=function(e,t){},r.prototype.drawLineString=function(e,t){},r.prototype.drawMultiLineString=function(e,t){},r.prototype.drawMultiPoint=function(e,t){},r.prototype.drawMultiPolygon=function(e,t){},r.prototype.drawPoint=function(e,t){},r.prototype.drawPolygon=function(e,t){},r.prototype.drawText=function(e,t){},r.prototype.setFillStrokeStyle=function(e,t){},r.prototype.setImageStyle=function(e,t){},r.prototype.setTextStyle=function(e,t){},r}(),wU=uY,hY=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)}}(),cY=function(r){hY(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.tolerance=t,o.maxExtent=n,o.pixelRatio=a,o.maxLineWidth=0,o.resolution=i,o.beginGeometryInstruction1_=null,o.beginGeometryInstruction2_=null,o.bufferedMaxExtent_=null,o.instructions=[],o.coordinates=[],o.tmpCoordinate_=[],o.hitDetectionInstructions=[],o.state={},o}return e.prototype.applyPixelRatio=function(t){var n=this.pixelRatio;return n==1?t:t.map(function(i){return i*n})},e.prototype.appendFlatPointCoordinates=function(t,n){for(var i=this.getBufferedMaxExtent(),a=this.tmpCoordinate_,o=this.coordinates,s=o.length,A=0,l=t.length;A<l;A+=n)a[0]=t[A],a[1]=t[A+1],ws(i,a)&&(o[s++]=a[0],o[s++]=a[1]);return s},e.prototype.appendFlatLineCoordinates=function(t,n,i,a,o,s){var A=this.coordinates,l=A.length,u=this.getBufferedMaxExtent();s&&(n+=a);var h=t[n],c=t[n+1],f=this.tmpCoordinate_,d=!0,v,y,m;for(v=n+a;v<i;v+=a)f[0]=t[v],f[1]=t[v+1],m=Am(u,f),m!==y?(d&&(A[l++]=h,A[l++]=c,d=!1),A[l++]=f[0],A[l++]=f[1]):m===Hi.INTERSECTING?(A[l++]=f[0],A[l++]=f[1],d=!1):d=!0,h=f[0],c=f[1],y=m;return(o&&d||v===n+a)&&(A[l++]=h,A[l++]=c),l},e.prototype.drawCustomCoordinates_=function(t,n,i,a,o){for(var s=0,A=i.length;s<A;++s){var l=i[s],u=this.appendFlatLineCoordinates(t,n,l,a,!1,!1);o.push(u),n=l}return n},e.prototype.drawCustom=function(t,n,i,a){this.beginGeometry(t,n);var o=t.getType(),s=t.getStride(),A=this.coordinates.length,l,u,h,c,f;switch(o){case st.MULTI_POLYGON:l=t.getOrientedFlatCoordinates(),c=[];var d=t.getEndss();f=0;for(var v=0,y=d.length;v<y;++v){var m=[];f=this.drawCustomCoordinates_(l,f,d[v],s,m),c.push(m)}this.instructions.push([De.CUSTOM,A,c,t,i,vB]),this.hitDetectionInstructions.push([De.CUSTOM,A,c,t,a||i,vB]);break;case st.POLYGON:case st.MULTI_LINE_STRING:h=[],l=o==st.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),f=this.drawCustomCoordinates_(l,0,t.getEnds(),s,h),this.instructions.push([De.CUSTOM,A,h,t,i,Fv]),this.hitDetectionInstructions.push([De.CUSTOM,A,h,t,a||i,Fv]);break;case st.LINE_STRING:case st.CIRCLE:l=t.getFlatCoordinates(),u=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([De.CUSTOM,A,u,t,i,VA]),this.hitDetectionInstructions.push([De.CUSTOM,A,u,t,a||i,VA]);break;case st.MULTI_POINT:l=t.getFlatCoordinates(),u=this.appendFlatPointCoordinates(l,s),u>A&&(this.instructions.push([De.CUSTOM,A,u,t,i,VA]),this.hitDetectionInstructions.push([De.CUSTOM,A,u,t,a||i,VA]));break;case st.POINT:l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([De.CUSTOM,A,u,t,i]),this.hitDetectionInstructions.push([De.CUSTOM,A,u,t,a||i]);break}this.endGeometry(n)},e.prototype.beginGeometry=function(t,n){this.beginGeometryInstruction1_=[De.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[De.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;n<i;++n)a=t[n],o=a[0],o==De.END_GEOMETRY?s=n:o==De.BEGIN_GEOMETRY&&(a[2]=n,B9(this.hitDetectionInstructions,s,n),s=-1)},e.prototype.setFillStrokeStyle=function(t,n){var i=this.state;if(t){var a=t.getColor();i.fillStyle=zs(a||zA)}else i.fillStyle=void 0;if(n){var o=n.getColor();i.strokeStyle=zs(o||xv);var s=n.getLineCap();i.lineCap=s!==void 0?s:fm;var A=n.getLineDash();i.lineDash=A?A.slice():Cv;var l=n.getLineDashOffset();i.lineDashOffset=l||Bv;var u=n.getLineJoin();i.lineJoin=u!==void 0?u:$f;var h=n.getWidth();i.lineWidth=h!==void 0?h:bv;var c=n.getMiterLimit();i.miterLimit=c!==void 0?c:Tv,i.lineWidth>this.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=[De.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[De.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&&!ll(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=[De.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=QS(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Qa(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(wU),ag=cY,fY=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)}}(),pY=function(r){fY(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([De.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([De.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([De.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([De.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}(ag),dY=pY,vY=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)}}(),gY=function(r){vY(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=[De.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([De.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Cv,Bv],yh);var s=t.getFlatCoordinates(),A=t.getStride();this.drawFlatCoordinates_(s,0,s.length,A),this.hitDetectionInstructions.push(Zl),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([De.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],yh);for(var s=t.getEnds(),A=t.getFlatCoordinates(),l=t.getStride(),u=0,h=0,c=s.length;h<c;++h)u=this.drawFlatCoordinates_(A,u,s[h],l);this.hitDetectionInstructions.push(Zl),this.endGeometry(n)}},e.prototype.finish=function(){var t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Zl),this.reverseHitDetectionInstructions(),this.state=null,r.prototype.finish.call(this)},e.prototype.applyStroke=function(t){t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Zl),t.lastStroke=this.coordinates.length),t.lastStroke=0,r.prototype.applyStroke.call(this,t),this.instructions.push(yh)},e}(ag),yY=gY,mY=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)}}(),_Y=function(r){mY(e,r);function e(t,n,i,a){return r.call(this,t,n,i,a)||this}return e.prototype.drawFlatCoordinatess_=function(t,n,i,a){var o=this.state,s=o.fillStyle!==void 0,A=o.strokeStyle!==void 0,l=i.length;this.instructions.push(yh),this.hitDetectionInstructions.push(yh);for(var u=0;u<l;++u){var h=i[u],c=this.coordinates.length,f=this.appendFlatLineCoordinates(t,n,h,a,!0,!A),d=[De.MOVE_TO_LINE_TO,c,f];this.instructions.push(d),this.hitDetectionInstructions.push(d),A&&(this.instructions.push(AR),this.hitDetectionInstructions.push(AR)),n=h}return s&&(this.instructions.push(Sy),this.hitDetectionInstructions.push(Sy)),A&&(this.instructions.push(Zl),this.hitDetectionInstructions.push(Zl)),n},e.prototype.drawCircle=function(t,n){var i=this.state,a=i.fillStyle,o=i.strokeStyle;if(!(a===void 0&&o===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([De.SET_FILL_STYLE,zA]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([De.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var s=t.getFlatCoordinates(),A=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(s,0,s.length,A,!1,!1);var u=[De.CIRCLE,l];this.instructions.push(yh,u),this.hitDetectionInstructions.push(yh,u),i.fillStyle!==void 0&&(this.instructions.push(Sy),this.hitDetectionInstructions.push(Sy)),i.strokeStyle!==void 0&&(this.instructions.push(Zl),this.hitDetectionInstructions.push(Zl)),this.endGeometry(n)}},e.prototype.drawPolygon=function(t,n){var i=this.state,a=i.fillStyle,o=i.strokeStyle;if(!(a===void 0&&o===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([De.SET_FILL_STYLE,zA]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([De.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);var s=t.getEnds(),A=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(A,0,s,l),this.endGeometry(n)}},e.prototype.drawMultiPolygon=function(t,n){var i=this.state,a=i.fillStyle,o=i.strokeStyle;if(!(a===void 0&&o===void 0)){this.setFillStrokeStyles_(),this.beginGeometry(t,n),i.fillStyle!==void 0&&this.hitDetectionInstructions.push([De.SET_FILL_STYLE,zA]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([De.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset]);for(var s=t.getEndss(),A=t.getOrientedFlatCoordinates(),l=t.getStride(),u=0,h=0,c=s.length;h<c;++h)u=this.drawFlatCoordinatess_(A,u,s[h],l);this.endGeometry(n)}},e.prototype.finish=function(){this.reverseHitDetectionInstructions(),this.state=null;var t=this.tolerance;if(t!==0)for(var n=this.coordinates,i=0,a=n.length;i<a;++i)n[i]=sh(n[i],t);return r.prototype.finish.call(this)},e.prototype.setFillStrokeStyles_=function(){var t=this.state,n=t.fillStyle;n!==void 0&&this.updateFillStyle(t,this.createFill),t.strokeStyle!==void 0&&this.updateStrokeStyle(t,this.applyStroke)},e}(ag),lR=_Y,EU={POINT:"point",LINE:"line"};function wY(r,e,t,n,i){var a=t,o=t,s=0,A=0,l=t,u,h,c,f,d,v,y,m,w,C;for(h=t;h<n;h+=i){var B=e[h],R=e[h+1];d!==void 0&&(w=B-d,C=R-v,f=Math.sqrt(w*w+C*C),y!==void 0&&(A+=c,u=Math.acos((y*w+m*C)/(c*f)),u>r&&(A>s&&(s=A,a=l,o=h),A=0,l=h-i)),c=f,y=w,m=C),d=B,v=R}return A+=f,A>s?[l,h]:[a,o]}var EY=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)}}(),Cm={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},CY=function(r){EY(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,h=t.getStride();if(o.placement===EU.LINE&&(l==st.LINE_STRING||l==st.MULTI_LINE_STRING||l==st.POLYGON||l==st.MULTI_POLYGON)){if(!In(this.getBufferedMaxExtent(),t.getExtent()))return;var c=void 0;if(u=t.getFlatCoordinates(),l==st.LINE_STRING)c=[u.length];else if(l==st.MULTI_LINE_STRING)c=t.getEnds();else if(l==st.POLYGON)c=t.getEnds().slice(0,1);else if(l==st.MULTI_POLYGON){var f=t.getEndss();c=[];for(var d=0,v=f.length;d<v;++d)c.push(f[d][0])}this.beginGeometry(t,n);for(var y=o.textAlign,m=0,w=void 0,C=0,B=c.length;C<B;++C){if(y==null){var R=wY(o.maxAngle,u,m,c[C],h);m=R[0],w=R[1]}else w=c[C];for(var d=m;d<w;d+=h)s.push(u[d],u[d+1]);var O=s.length;m=c[C],this.drawChars_(A,O),A=O}this.endGeometry(n)}else{var I=o.overflow?null:[];switch(l){case st.POINT:case st.MULTI_POINT:u=t.getFlatCoordinates();break;case st.LINE_STRING:u=t.getFlatMidpoint();break;case st.CIRCLE:u=t.getCenter();break;case st.MULTI_LINE_STRING:u=t.getFlatMidpoints(),h=2;break;case st.POLYGON:u=t.getFlatInteriorPoint(),o.overflow||I.push(u[2]/this.resolution),h=3;break;case st.MULTI_POLYGON:var T=t.getFlatInteriorPoints();u=[];for(var d=0,v=T.length;d<v;d+=3)o.overflow||I.push(T[d+2]/this.resolution),u.push(T[d],T[d+1]);if(u.length===0)return;h=2;break}var O=this.appendFlatPointCoordinates(u,h);if(O===A)return;if(I&&(O-A)/2!==u.length/h){var L=A/2;I=I.filter(function(q,rt){var nt=s[(L+rt)*2]===u[rt*h]&&s[(L+rt)*2+1]===u[rt*h+1];return nt||--L,nt})}this.saveTextStates_(),(o.backgroundFill||o.backgroundStroke)&&(this.setFillStrokeStyle(o.backgroundFill,o.backgroundStroke),o.backgroundFill&&(this.updateFillStyle(this.state,this.createFill),this.hitDetectionInstructions.push(this.createFill(this.state))),o.backgroundStroke&&(this.updateStrokeStyle(this.state,this.applyStroke),this.hitDetectionInstructions.push(this.createStroke(this.state)))),this.beginGeometry(t,n);var P=o.padding;if(P!=vh&&(o.scale[0]<0||o.scale[1]<0)){var S=o.padding[0],x=o.padding[1],M=o.padding[2],D=o.padding[3];o.scale[0]<0&&(x=-x,D=-D),o.scale[1]<0&&(S=-S,M=-M),P=[S,x,M,D]}var W=this.pixelRatio;this.instructions.push([De.DRAW_IMAGE,A,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,P==vh?vh:P.map(function(q){return q*W}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,I]);var z=1/W;this.hitDetectionInstructions.push([De.DRAW_IMAGE,A,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[z,z],NaN,this.declutterImageWithText_,P,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,I]),this.endGeometry(n)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,n=this.textState_,i=this.textFillState_,a=this.strokeKey_;t&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var o=this.textKey_;o in this.textStates||(this.textStates[o]={font:n.font,textAlign:n.textAlign||Sv,textBaseline:n.textBaseline||pm,scale:n.scale});var s=this.fillKey_;i&&(s in this.fillStates||(this.fillStates[s]={fillStyle:i.fillStyle}))},e.prototype.drawChars_=function(t,n){var i=this.textStrokeState_,a=this.textState_,o=this.strokeKey_,s=this.textKey_,A=this.fillKey_;this.saveTextStates_();var l=this.pixelRatio,u=Cm[a.textBaseline],h=this.textOffsetY_*l,c=this.text_,f=i?i.lineWidth*Math.abs(a.scale[0])/2:0;this.instructions.push([De.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,l,h,o,f*l,c,s,1]),this.hitDetectionInstructions.push([De.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,1,h,o,f,c,s,1/l])},e.prototype.setTextStyle=function(t,n){var i,a,o;if(!t)this.text_="";else{var s=t.getFill();s?(a=this.textFillState_,a||(a={},this.textFillState_=a),a.fillStyle=zs(s.getColor()||zA)):(a=null,this.textFillState_=a);var A=t.getStroke();if(!A)o=null,this.textStrokeState_=o;else{o=this.textStrokeState_,o||(o={},this.textStrokeState_=o);var l=A.getLineDash(),u=A.getLineDashOffset(),h=A.getWidth(),c=A.getMiterLimit();o.lineCap=A.getLineCap()||fm,o.lineDash=l?l.slice():Cv,o.lineDashOffset=u===void 0?Bv:u,o.lineJoin=A.getLineJoin()||$f,o.lineWidth=h===void 0?bv:h,o.miterLimit=c===void 0?Tv:c,o.strokeStyle=zs(A.getColor()||xv)}i=this.textState_;var f=t.getFont()||U2;T$(f);var d=t.getScaleArray();i.overflow=t.getOverflow(),i.font=f,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||pm,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||vh,i.scale=d===void 0?[1,1]:d;var v=t.getOffsetX(),y=t.getOffsetY(),m=t.getRotateWithView(),w=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=v===void 0?0:v,this.textOffsetY_=y===void 0?0:y,this.textRotateWithView_=m===void 0?!1:m,this.textRotation_=w===void 0?0:w,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:pe(o.strokeStyle))+o.lineCap+o.lineDashOffset+"|"+o.lineWidth+o.lineJoin+o.miterLimit+"["+o.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.textBaseline||"?"),this.fillKey_=a?typeof a.fillStyle=="string"?a.fillStyle:"|"+pe(a.fillStyle):""}this.declutterImageWithText_=n},e}(ag),BY=CY,TY={Circle:lR,Default:ag,Image:dY,LineString:yY,Polygon:lR,Text:BY},xY=function(){function r(e,t,n,i){this.tolerance_=e,this.maxExtent_=t,this.pixelRatio_=i,this.resolution_=n,this.buildersByZIndex_={}}return r.prototype.finish=function(){var e={};for(var t in this.buildersByZIndex_){e[t]=e[t]||{};var n=this.buildersByZIndex_[t];for(var i in n){var a=n[i].finish();e[t][i]=a}}return e},r.prototype.getBuilder=function(e,t){var n=e!==void 0?e.toString():"0",i=this.buildersByZIndex_[n];i===void 0&&(i={},this.buildersByZIndex_[n]=i);var a=i[t];if(a===void 0){var o=TY[t];a=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=a}return a},r}(),Bm=xY,SY=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)}}(),bY=function(r){SY(e,r);function e(t){var n=r.call(this)||this;return n.ready=!0,n.boundHandleImageChange_=n.handleImageChange_.bind(n),n.layer_=t,n.declutterExecutorGroup=null,n}return e.prototype.getFeatures=function(t){return Ee()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return Ee()},e.prototype.renderFrame=function(t,n){return Ee()},e.prototype.loadedTileCallback=function(t,n,i){t[n]||(t[n]={}),t[n][i.tileCoord.toString()]=i},e.prototype.createLoadedTileFinder=function(t,n,i){return function(a,o){var s=this.loadedTileCallback.bind(this,i,a);return t.forEachLoadedTile(n,a,o,s)}.bind(this)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){},e.prototype.getDataAtPixel=function(t,n,i){return null},e.prototype.getLayer=function(){return this.layer_},e.prototype.handleFontsChanged=function(){},e.prototype.handleImageChange_=function(t){var n=t.target;n.getState()===ke.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var n=t.getState();return n!=ke.LOADED&&n!=ke.ERROR&&t.addEventListener(ye.CHANGE,this.boundHandleImageChange_),n==ke.IDLE&&(t.load(),n=t.getState()),n==ke.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Oa.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,r.prototype.disposeInternal.call(this)},e}(Zv),CU=bY,LY=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)}}(),Id=null;function FY(){var r=document.createElement("canvas");r.width=1,r.height=1,Id=r.getContext("2d")}var IY=function(r){LY(e,r);function e(t){var n=r.call(this,t)||this;return n.container=null,n.renderedResolution,n.tempTransform=Jn(),n.pixelTransform=Jn(),n.inversePixelTransform=Jn(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return e.prototype.getImageData=function(t,n,i){Id||FY(),Id.clearRect(0,0,1,1);var a;try{Id.drawImage(t,n,i,1,1,0,0,1,1),a=Id.getImageData(0,0,1,1).data}catch{return null}return a},e.prototype.getBackground=function(t){var n=this.getLayer(),i=n.getBackground();return typeof i=="function"&&(i=i(t.viewState.resolution)),i||void 0},e.prototype.useContainer=function(t,n,i,a){var o=this.getLayer().getClassName(),s,A;if(t&&t.className===o&&t.style.opacity===""&&i===1&&(!a||t.style.backgroundColor&&ll(_u(t.style.backgroundColor),_u(a)))){var l=t.firstElementChild;l instanceof HTMLCanvasElement&&(A=l.getContext("2d"))}if(A&&A.canvas.style.transform===n?(this.container=t,this.context=A,this.containerReused=!0):this.containerReused&&(this.container=null,this.context=null,this.containerReused=!1),!this.container){s=document.createElement("div"),s.className=o;var u=s.style;u.position="absolute",u.width="100%",u.height="100%",a&&(u.backgroundColor=a),A=Ha();var l=A.canvas;s.appendChild(l),u=l.style,u.position="absolute",u.left="0",u.transformOrigin="top left",this.container=s,this.context=A}},e.prototype.clipUnrotated=function(t,n,i){var a=Ss(i),o=qv(i),s=lp(i),A=Wv(i);An(n.coordinateToPixelTransform,a),An(n.coordinateToPixelTransform,o),An(n.coordinateToPixelTransform,s),An(n.coordinateToPixelTransform,A);var l=this.inversePixelTransform;An(l,a),An(l,o),An(l,s),An(l,A),t.save(),t.beginPath(),t.moveTo(Math.round(a[0]),Math.round(a[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(A[0]),Math.round(A[1])),t.clip()},e.prototype.dispatchRenderEvent_=function(t,n,i){var a=this.getLayer();if(a.hasListener(t)){var o=new Zd(t,this.inversePixelTransform,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.frameState=n,this.dispatchRenderEvent_(to.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(to.POSTRENDER,t,n)},e.prototype.getRenderTransform=function(t,n,i,a,o,s,A){var l=o/2,u=s/2,h=a/n,c=-h,f=-t[0]+A,d=-t[1];return Da(this.tempTransform,l,u,h,c,-i,f,d)},e.prototype.getDataAtPixel=function(t,n,i){var a=An(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer(),A=s.getExtent();if(A){var l=An(n.pixelToCoordinateTransform,t.slice());if(!ws(A,l))return null}var u=Math.round(a[0]),h=Math.round(a[1]),c=this.pixelContext_;if(!c){var f=document.createElement("canvas");f.width=1,f.height=1,c=f.getContext("2d"),this.pixelContext_=c}c.clearRect(0,0,1,1);var d;try{c.drawImage(o.canvas,u,h,1,1,0,0,1,1),d=c.getImageData(0,0,1,1).data}catch(v){return v.name==="SecurityError"?(this.pixelContext_=null,new Uint8Array):d}return d[3]===0?null:d},e.prototype.disposeInternal=function(){delete this.frameState,r.prototype.disposeInternal.call(this)},e}(CU),_b=IY,or={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function RY(r,e,t,n,i,a,o,s,A,l,u,h){var c=r[e],f=r[e+1],d=0,v=0,y=0,m=0;function w(){d=c,v=f,e+=n,c=r[e],f=r[e+1],m+=y,y=Math.sqrt((c-d)*(c-d)+(f-v)*(f-v))}do w();while(e<t-n&&m+y<a);for(var C=y===0?0:(a-m)/y,B=kA(d,c,C),R=kA(v,f,C),O=e-n,I=m,T=a+s*A(l,i,u);e<t-n&&m+y<T;)w();C=y===0?0:(T-m)/y;var L=kA(d,c,C),P=kA(v,f,C),S;if(h){var x=[B,R,L,P];nb(x,0,4,2,h,x,x),S=x[0]>x[2]}else S=B>L;var M=Math.PI,D=[],W=O+n===e;e=O,y=0,m=I,c=r[e],f=r[e+1];var z;if(W){w(),z=Math.atan2(f-v,c-d),S&&(z+=z>0?-M:M);var tt=(L+B)/2,q=(P+R)/2;return D[0]=[tt,q,(T-a)/2,z,i],D}for(var rt=0,nt=i.length;rt<nt;){w();var _t=Math.atan2(f-v,c-d);if(S&&(_t+=_t>0?-M:M),z!==void 0){var F=_t-z;if(F+=F>M?-2*M:F<-M?2*M:0,Math.abs(F)>o)return null}z=_t;for(var $=rt,j=0;rt<nt;++rt){var X=S?nt-rt-1:rt,it=s*A(l,i[X],u);if(e+n<t&&m+y<a+j+it/2)break;j+=it}if(rt!==$){var gt=S?i.substring(nt-$,nt-rt):i.substring($,rt);C=y===0?0:(a+j/2-m)/y;var tt=kA(d,c,C),q=kA(v,f,C);D.push([tt,q,j/2,_t,gt]),a+=j}}return D}var Uc=di(),Pl=[],bA=[],LA=[],Nl=[];function uR(r){return r[3].declutterBox}var OY=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function hR(r,e){return(e==="start"||e==="end")&&!OY.test(r)&&(e=e==="start"?"left":"right"),Cm[e]}function MY(r,e,t){return t>0&&r.push(`
|
||
`,""),r.push(e,""),r}var PY=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_=Jn(),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],h=Array.isArray(e),c=hR(h?e[0]:e,A.textAlign||Sv),f=i&&o.lineWidth?o.lineWidth:0,d=h?e:e.split(`
|
||
`).reduce(MY,[]),v=S$(A,d),y=v.width,m=v.height,w=v.widths,C=v.heights,B=v.lineWidths,R=y+f,O=[],I=(R+2)*u[0],T=(m+f)*u[1],L={width:I<0?Math.floor(I):Math.ceil(I),height:T<0?Math.floor(T):Math.ceil(T),contextInstructions:O};if((u[0]!=1||u[1]!=1)&&O.push("scale",u),i){O.push("strokeStyle",o.strokeStyle),O.push("lineWidth",f),O.push("lineCap",o.lineCap),O.push("lineJoin",o.lineJoin),O.push("miterLimit",o.miterLimit);var P=R_?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;P.prototype.setLineDash&&(O.push("setLineDash",[o.lineDash]),O.push("lineDashOffset",o.lineDashOffset))}n&&O.push("fillStyle",s.fillStyle),O.push("textBaseline","middle"),O.push("textAlign","center");for(var S=.5-c,x=c*R+S*f,M=[],D=[],W=0,z=0,tt=0,q=0,rt,nt=0,_t=d.length;nt<_t;nt+=2){var F=d[nt];if(F===`
|
||
`){z+=W,W=0,x=c*R+S*f,++q;continue}var $=d[nt+1]||A.font;$!==rt&&(i&&M.push("font",$),n&&D.push("font",$),rt=$),W=Math.max(W,C[tt]);var j=[F,x+S*w[tt]+c*(w[tt]-B[q]),.5*(f+W)+z];x+=w[tt],i&&M.push("strokeText",j),n&&D.push("fillText",j),++tt}return Array.prototype.push.apply(O,M),Array.prototype.push.apply(O,D),this.labels_[a]=L,L},r.prototype.replayTextBackground_=function(e,t,n,i,a,o,s){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,i),e.lineTo.apply(e,a),e.lineTo.apply(e,t),o&&(this.alignFill_=o[2],this.fill_(e)),s&&(this.setStrokeStyle_(e,s),e.stroke())},r.prototype.calculateImageOrLabelDimensions_=function(e,t,n,i,a,o,s,A,l,u,h,c,f,d,v,y){s*=c[0],A*=c[1];var m=n-s,w=i-A,C=a+l>e?e-l:a,B=o+u>t?t-u:o,R=d[3]+C*c[0]+d[1],O=d[0]+B*c[1]+d[2],I=m-d[3],T=w-d[0];(v||h!==0)&&(Pl[0]=I,Nl[0]=I,Pl[1]=T,bA[1]=T,bA[0]=I+R,LA[0]=bA[0],LA[1]=T+O,Nl[1]=LA[1]);var L;return h!==0?(L=Da(Jn(),n,i,1,1,h,-n,-i),An(L,Pl),An(L,bA),An(L,LA),An(L,Nl),no(Math.min(Pl[0],bA[0],LA[0],Nl[0]),Math.min(Pl[1],bA[1],LA[1],Nl[1]),Math.max(Pl[0],bA[0],LA[0],Nl[0]),Math.max(Pl[1],bA[1],LA[1],Nl[1]),Uc)):no(Math.min(I,I+R),Math.min(T,T+O),Math.max(I,I+R),Math.max(T,T+O),Uc),f&&(m=Math.round(m),w=Math.round(w)),{drawImageX:m,drawImageY:w,drawImageW:C,drawImageH:B,originX:l,originY:u,declutterBox:{minX:Uc[0],minY:Uc[1],maxX:Uc[2],maxY:Uc[3],value:y},canvasTransform:L,scale:c}},r.prototype.replayImageOrLabel_=function(e,t,n,i,a,o,s){var A=!!(o||s),l=i.declutterBox,u=e.canvas,h=s?s[2]*i.scale[0]/2:0,c=l.minX-h<=u.width/t&&l.maxX+h>=0&&l.minY-h<=u.height/t&&l.maxY+h>=0;return c&&(A&&this.replayTextBackground_(e,Pl,bA,LA,Nl,o,s),b$(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=An(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=hR(Array.isArray(e)?e[0]:e,a.textAlign||Sv),u=Cm[a.textBaseline||pm],h=s&&s.lineWidth?s.lineWidth:0,c=o.width/A-2*a.scale[0],f=l*c+2*(.5-l)*h,d=u*o.height/A+2*(.5-u)*h;return{label:o,anchorX:f,anchorY:d}},r.prototype.execute_=function(e,t,n,i,a,o,s,A){var l;this.pixelCoordinates_&&ll(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=hu(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),P9(this.renderedTransform_,n));for(var u=0,h=i.length,c=0,f,d,v,y,m,w,C,B,R,O,I,T,L=0,P=0,S=null,x=null,M=this.coordinateCache_,D=this.viewRotation_,W=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,z={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:D},tt=this.instructions!=i||this.overlaps?0:200,q,rt,nt,_t;u<h;){var F=i[u],$=F[0];switch($){case De.BEGIN_GEOMETRY:q=F[1],_t=F[3],q.getGeometry()?s!==void 0&&!In(s,_t.getExtent())?u=F[2]+1:++u:u=F[2];break;case De.BEGIN_PATH:L>tt&&(this.fill_(e),L=0),P>tt&&(e.stroke(),P=0),!L&&!P&&(e.beginPath(),y=NaN,m=NaN),++u;break;case De.CIRCLE:c=F[1];var j=l[c],X=l[c+1],it=l[c+2],gt=l[c+3],wt=it-j,at=gt-X,Pt=Math.sqrt(wt*wt+at*at);e.moveTo(j+Pt,X),e.arc(j,X,Pt,0,2*Math.PI,!0),++u;break;case De.CLOSE_PATH:e.closePath(),++u;break;case De.CUSTOM:c=F[1],f=F[2];var Ot=F[3],K=F[4],Z=F.length==6?F[5]:void 0;z.geometry=Ot,z.feature=q,u in M||(M[u]=[]);var pt=M[u];Z?Z(l,c,f,2,pt):(pt[0]=l[c],pt[1]=l[c+1],pt.length=2),K(pt,z),++u;break;case De.DRAW_IMAGE:c=F[1],f=F[2],B=F[3],d=F[4],v=F[5];var et=F[6],G=F[7],bt=F[8],St=F[9],dt=F[10],Et=F[11],yt=F[12],xt=F[13],Lt=F[14];if(!B&&F.length>=19){R=F[18],O=F[19],I=F[20],T=F[21];var Rt=this.drawLabelWithPointPlacement_(R,O,I,T);B=Rt.label,F[3]=B;var Vt=F[22];d=(Rt.anchorX-Vt)*this.pixelRatio,F[4]=d;var zt=F[23];v=(Rt.anchorY-zt)*this.pixelRatio,F[5]=v,et=B.height,F[6]=et,xt=B.width,F[13]=xt}var ie=void 0;F.length>24&&(ie=F[24]);var ee=void 0,Xt=void 0,oe=void 0;F.length>16?(ee=F[15],Xt=F[16],oe=F[17]):(ee=vh,Xt=!1,oe=!1),dt&&W?Et+=D:!dt&&!W&&(Et-=D);for(var Kt=0;c<f;c+=2)if(!(ie&&ie[Kt++]<xt/this.pixelRatio)){var Ye=this.calculateImageOrLabelDimensions_(B.width,B.height,l[c],l[c+1],xt,et,d,v,bt,St,Et,yt,a,ee,Xt||oe,q),Re=[e,t,B,Ye,G,Xt?S:null,oe?x:null],fr=void 0,be=void 0;if(A&&Lt){var xe=f-c;if(!Lt[xe]){Lt[xe]=Re;continue}if(fr=Lt[xe],delete Lt[xe],be=uR(fr),A.collides(be))continue}A&&A.collides(Ye.declutterBox)||(fr&&(A&&A.insert(be),this.replayImageOrLabel_.apply(this,fr)),A&&A.insert(Ye.declutterBox),this.replayImageOrLabel_.apply(this,Re))}++u;break;case De.DRAW_CHARS:var nn=F[1],ar=F[2],_i=F[3],Br=F[4];T=F[5];var ai=F[6],$r=F[7],Vr=F[8];I=F[9];var Oe=F[10];R=F[11],O=F[12];var mr=[F[13],F[13]],Gn=this.textStates[O],ln=Gn.font,wi=[Gn.scale[0]*$r,Gn.scale[1]*$r],Ei=void 0;ln in this.widths_?Ei=this.widths_[ln]:(Ei={},this.widths_[ln]=Ei);var Se=vU(l,nn,ar,2),oi=Math.abs(wi[0])*QI(ln,R,Ei);if(Br||oi<=Se){var Mn=this.textStates[O].textAlign,Ci=(Se-oi)*Cm[Mn],tn=RY(l,nn,ar,2,R,Ci,ai,Math.abs(wi[0]),QI,ln,Ei,W?0:this.viewRotation_);t:if(tn){var Wr=[],yn=void 0,ho=void 0,se=void 0,ht=void 0,Qt=void 0;if(I)for(yn=0,ho=tn.length;yn<ho;++yn){Qt=tn[yn],se=Qt[4],ht=this.createLabel(se,O,"",I),d=Qt[2]+(wi[0]<0?-Oe:Oe),v=_i*ht.height+(.5-_i)*2*Oe*wi[1]/wi[0]-Vr;var Ye=this.calculateImageOrLabelDimensions_(ht.width,ht.height,Qt[0],Qt[1],ht.width,ht.height,d,v,0,0,Qt[3],mr,!1,vh,!1,q);if(A&&A.collides(Ye.declutterBox))break t;Wr.push([e,t,ht,Ye,1,null,null])}if(T)for(yn=0,ho=tn.length;yn<ho;++yn){Qt=tn[yn],se=Qt[4],ht=this.createLabel(se,O,T,""),d=Qt[2],v=_i*ht.height-Vr;var Ye=this.calculateImageOrLabelDimensions_(ht.width,ht.height,Qt[0],Qt[1],ht.width,ht.height,d,v,0,0,Qt[3],mr,!1,vh,!1,q);if(A&&A.collides(Ye.declutterBox))break t;Wr.push([e,t,ht,Ye,1,null,null])}A&&A.load(Wr.map(uR));for(var qt=0,Ze=Wr.length;qt<Ze;++qt)this.replayImageOrLabel_.apply(this,Wr[qt])}}++u;break;case De.END_GEOMETRY:if(o!==void 0){q=F[1];var Ir=o(q,_t);if(Ir)return Ir}++u;break;case De.FILL:tt?L++:this.fill_(e),++u;break;case De.MOVE_TO_LINE_TO:for(c=F[1],f=F[2],rt=l[c],nt=l[c+1],w=rt+.5|0,C=nt+.5|0,(w!==y||C!==m)&&(e.moveTo(rt,nt),y=w,m=C),c+=2;c<f;c+=2)rt=l[c],nt=l[c+1],w=rt+.5|0,C=nt+.5|0,(c==f-2||w!==y||C!==m)&&(e.lineTo(rt,nt),y=w,m=C);++u;break;case De.SET_FILL_STYLE:S=F,this.alignFill_=F[2],L&&(this.fill_(e),L=0,P&&(e.stroke(),P=0)),e.fillStyle=F[1],++u;break;case De.SET_STROKE_STYLE:x=F,P&&(e.stroke(),P=0),this.setStrokeStyle_(e,F),++u;break;case De.STROKE:tt?P++:e.stroke(),++u;break;default:++u;break}}L&&this.fill_(e),P&&e.stroke()},r.prototype.execute=function(e,t,n,i,a,o){this.viewRotation_=i,this.execute_(e,t,n,this.instructions,a,void 0,void 0,o)},r.prototype.executeHitDetection=function(e,t,n,i,a){return this.viewRotation_=n,this.execute_(e,1,t,this.hitDetectionInstructions,!0,i,a)},r}(),NY=PY,iE=[or.POLYGON,or.CIRCLE,or.LINE_STRING,or.IMAGE,or.TEXT,or.DEFAULT],UY=function(){function r(e,t,n,i,a,o){this.maxExtent_=e,this.overlaps_=i,this.pixelRatio_=n,this.resolution_=t,this.renderBuffer_=o,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Jn(),this.createExecutors_(a)}return r.prototype.clip=function(e,t){var n=this.getClipCoords(t);e.beginPath(),e.moveTo(n[0],n[1]),e.lineTo(n[2],n[3]),e.lineTo(n[4],n[5]),e.lineTo(n[6],n[7]),e.clip()},r.prototype.createExecutors_=function(e){for(var t in e){var n=this.executorsByZIndex_[t];n===void 0&&(n={},this.executorsByZIndex_[t]=n);var i=e[t];for(var a in i){var o=i[a];n[a]=new NY(this.resolution_,this.pixelRatio_,this.overlaps_,o)}}},r.prototype.hasExecutors=function(e){for(var t in this.executorsByZIndex_)for(var n=this.executorsByZIndex_[t],i=0,a=e.length;i<a;++i)if(e[i]in n)return!0;return!1},r.prototype.forEachFeatureAtCoordinate=function(e,t,n,i,a,o){i=Math.round(i);var s=i*2+1,A=Da(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=Ha(s,s));var u=this.hitDetectionContext_;u.canvas.width!==s||u.canvas.height!==s?(u.canvas.width=s,u.canvas.height=s):l||u.clearRect(0,0,s,s);var h;this.renderBuffer_!==void 0&&(h=di(),Th(h,e),Qa(h,t*(this.renderBuffer_+i),h));var c=DY(i),f;function d(O,I){for(var T=u.getImageData(0,0,s,s).data,L=0,P=c.length;L<P;L++)if(T[c[L]]>0){if(!o||f!==or.IMAGE&&f!==or.TEXT||o.indexOf(O)!==-1){var S=(c[L]-3)/4,x=i-S%s,M=i-(S/s|0),D=a(O,I,x*x+M*M);if(D)return D}u.clearRect(0,0,s,s);break}}var v=Object.keys(this.executorsByZIndex_).map(Number);v.sort(gu);var y,m,w,C,B;for(y=v.length-1;y>=0;--y){var R=v[y].toString();for(w=this.executorsByZIndex_[R],m=iE.length-1;m>=0;--m)if(f=iE[m],C=w[f],C!==void 0&&(B=C.executeHitDetection(u,A,n,d,h),B))return B}},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 hu(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return Qh(this.executorsByZIndex_)},r.prototype.execute=function(e,t,n,i,a,o,s){var A=Object.keys(this.executorsByZIndex_).map(Number);A.sort(gu),this.maxExtent_&&(e.save(),this.clip(e,n));var l=o||iE,u,h,c,f,d,v;for(s&&A.reverse(),u=0,h=A.length;u<h;++u){var y=A[u].toString();for(d=this.executorsByZIndex_[y],c=0,f=l.length;c<f;++c){var m=l[c];v=d[m],v!==void 0&&v.execute(e,t,n,i,a,s)}}this.maxExtent_&&e.restore()},r}(),aE={};function DY(r){if(aE[r]!==void 0)return aE[r];for(var e=r*2+1,t=r*r,n=new Array(t+1),i=0;i<=r;++i)for(var a=0;a<=r;++a){var o=i*i+a*a;if(o>t)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;i<l;++i)n[i]&&A.push.apply(A,n[i]);return aE[r]=A,A}var Tm=UY,QY=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)}}(),HY=function(r){QY(e,r);function e(t,n,i,a,o,s,A){var l=r.call(this)||this;return l.context_=t,l.pixelRatio_=n,l.extent_=i,l.transform_=a,l.viewRotation_=o,l.squaredTolerance_=s,l.userTransform_=A,l.contextFillState_=null,l.contextStrokeState_=null,l.contextTextState_=null,l.fillState_=null,l.strokeState_=null,l.image_=null,l.imageAnchorX_=0,l.imageAnchorY_=0,l.imageHeight_=0,l.imageOpacity_=0,l.imageOriginX_=0,l.imageOriginY_=0,l.imageRotateWithView_=!1,l.imageRotation_=0,l.imageScale_=[0,0],l.imageWidth_=0,l.text_="",l.textOffsetX_=0,l.textOffsetY_=0,l.textRotateWithView_=!1,l.textRotation_=0,l.textScale_=[0,0],l.textFillState_=null,l.textStrokeState_=null,l.textState_=null,l.pixelCoordinates_=[],l.tmpLocalTransform_=Jn(),l}return e.prototype.drawImages_=function(t,n,i,a){if(this.image_){var o=hu(t,n,i,a,this.transform_,this.pixelCoordinates_),s=this.context_,A=this.tmpLocalTransform_,l=s.globalAlpha;this.imageOpacity_!=1&&(s.globalAlpha=l*this.imageOpacity_);var u=this.imageRotation_;this.imageRotateWithView_&&(u+=this.viewRotation_);for(var h=0,c=o.length;h<c;h+=2){var f=o[h]-this.imageAnchorX_,d=o[h+1]-this.imageAnchorY_;if(u!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var v=f+this.imageAnchorX_,y=d+this.imageAnchorY_;Da(A,v,y,1,1,u,-v,-y),s.setTransform.apply(s,A),s.translate(v,y),s.scale(this.imageScale_[0],this.imageScale_[1]),s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),s.setTransform(1,0,0,1,0,0)}else s.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,f,d,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}},e.prototype.drawText_=function(t,n,i,a){if(!(!this.textState_||this.text_==="")){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var o=hu(t,n,i,a,this.transform_,this.pixelCoordinates_),s=this.context_,A=this.textRotation_;for(this.textRotateWithView_&&(A+=this.viewRotation_);n<i;n+=a){var l=o[n]+this.textOffsetX_,u=o[n+1]+this.textOffsetY_;if(A!==0||this.textScale_[0]!=1||this.textScale_[1]!=1){var h=Da(this.tmpLocalTransform_,l,u,1,1,A,-l,-u);s.setTransform.apply(s,h),s.translate(l,u),s.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&s.strokeText(this.text_,0,0),this.textFillState_&&s.fillText(this.text_,0,0),s.setTransform(1,0,0,1,0,0)}else this.textStrokeState_&&s.strokeText(this.text_,l,u),this.textFillState_&&s.fillText(this.text_,l,u)}}},e.prototype.moveToLineTo_=function(t,n,i,a,o){var s=this.context_,A=hu(t,n,i,a,this.transform_,this.pixelCoordinates_);s.moveTo(A[0],A[1]);var l=A.length;o&&(l-=2);for(var u=2;u<l;u+=2)s.lineTo(A[u],A[u+1]);return o&&s.closePath(),i},e.prototype.drawRings_=function(t,n,i,a){for(var o=0,s=i.length;o<s;++o)n=this.moveToLineTo_(t,n,i[o],a,!0);return n},e.prototype.drawCircle=function(t){if(In(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=xV(t,this.transform_,this.pixelCoordinates_),i=n[2]-n[0],a=n[3]-n[1],o=Math.sqrt(i*i+a*a),s=this.context_;s.beginPath(),s.arc(n[0],n[1],o,0,2*Math.PI),this.fillState_&&s.fill(),this.strokeState_&&s.stroke()}this.text_!==""&&this.drawText_(t.getCenter(),0,2,2)}},e.prototype.setStyle=function(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())},e.prototype.setTransform=function(t){this.transform_=t},e.prototype.drawGeometry=function(t){var n=t.getType();switch(n){case st.POINT:this.drawPoint(t);break;case st.LINE_STRING:this.drawLineString(t);break;case st.POLYGON:this.drawPolygon(t);break;case st.MULTI_POINT:this.drawMultiPoint(t);break;case st.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case st.MULTI_POLYGON:this.drawMultiPolygon(t);break;case st.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case st.CIRCLE:this.drawCircle(t);break}},e.prototype.drawFeature=function(t,n){var i=n.getGeometryFunction()(t);!i||!In(this.extent_,i.getExtent())||(this.setStyle(n),this.drawGeometry(i))},e.prototype.drawGeometryCollection=function(t){for(var n=t.getGeometriesArray(),i=0,a=n.length;i<a;++i)this.drawGeometry(n[i])},e.prototype.drawPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(n,0,n.length,i),this.text_!==""&&this.drawText_(n,0,n.length,i)},e.prototype.drawMultiPoint=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(n,0,n.length,i),this.text_!==""&&this.drawText_(n,0,n.length,i)},e.prototype.drawLineString=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!In(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getFlatCoordinates();n.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1),n.stroke()}if(this.text_!==""){var a=t.getFlatMidpoint();this.drawText_(a,0,2,2)}}},e.prototype.drawMultiLineString=function(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));var n=t.getExtent();if(In(this.extent_,n)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);var i=this.context_,a=t.getFlatCoordinates(),o=0,s=t.getEnds(),A=t.getStride();i.beginPath();for(var l=0,u=s.length;l<u;++l)o=this.moveToLineTo_(a,o,s[l],A,!1);i.stroke()}if(this.text_!==""){var h=t.getFlatMidpoints();this.drawText_(h,0,h.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!In(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=this.context_;n.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride()),this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){var i=t.getFlatInteriorPoint();this.drawText_(i,0,2,2)}}},e.prototype.drawMultiPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!In(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=this.context_,i=t.getOrientedFlatCoordinates(),a=0,o=t.getEndss(),s=t.getStride();n.beginPath();for(var A=0,l=o.length;A<l;++A){var u=o[A];a=this.drawRings_(i,a,u,s)}this.fillState_&&n.fill(),this.strokeState_&&n.stroke()}if(this.text_!==""){var h=t.getFlatInteriorPoints();this.drawText_(h,0,h.length,2)}}},e.prototype.setContextFillState_=function(t){var n=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,n.fillStyle=t.fillStyle):(n.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})},e.prototype.setContextStrokeState_=function(t){var n=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,n.lineCap=t.lineCap),n.setLineDash&&(ll(i.lineDash,t.lineDash)||n.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,n.lineDashOffset=t.lineDashOffset)),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,n.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,n.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,n.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,n.strokeStyle=t.strokeStyle)):(n.lineCap=t.lineCap,n.setLineDash&&(n.setLineDash(t.lineDash),n.lineDashOffset=t.lineDashOffset),n.lineJoin=t.lineJoin,n.lineWidth=t.lineWidth,n.miterLimit=t.miterLimit,n.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})},e.prototype.setContextTextState_=function(t){var n=this.context_,i=this.contextTextState_,a=t.textAlign?t.textAlign:Sv;i?(i.font!=t.font&&(i.font=t.font,n.font=t.font),i.textAlign!=a&&(i.textAlign=a,n.textAlign=a),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,n.textBaseline=t.textBaseline)):(n.font=t.font,n.textAlign=a,n.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:a,textBaseline:t.textBaseline})},e.prototype.setFillStrokeStyle=function(t,n){var i=this;if(!t)this.fillState_=null;else{var a=t.getColor();this.fillState_={fillStyle:zs(a||zA)}}if(!n)this.strokeState_=null;else{var o=n.getColor(),s=n.getLineCap(),A=n.getLineDash(),l=n.getLineDashOffset(),u=n.getLineJoin(),h=n.getWidth(),c=n.getMiterLimit(),f=A||Cv;this.strokeState_={lineCap:s!==void 0?s:fm,lineDash:this.pixelRatio_===1?f:f.map(function(d){return d*i.pixelRatio_}),lineDashOffset:(l||Bv)*this.pixelRatio_,lineJoin:u!==void 0?u:$f,lineWidth:(h!==void 0?h:bv)*this.pixelRatio_,miterLimit:c!==void 0?c:Tv,strokeStyle:zs(o||xv)}}},e.prototype.setImageStyle=function(t){var n;if(!t||!(n=t.getSize())){this.image_=null;return}var i=t.getAnchor(),a=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=i[0]*this.pixelRatio_,this.imageAnchorY_=i[1]*this.pixelRatio_,this.imageHeight_=n[1]*this.pixelRatio_,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=a[0],this.imageOriginY_=a[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation(),this.imageScale_=t.getScaleArray(),this.imageWidth_=n[0]*this.pixelRatio_},e.prototype.setTextStyle=function(t){if(!t)this.text_="";else{var n=t.getFill();if(!n)this.textFillState_=null;else{var i=n.getColor();this.textFillState_={fillStyle:zs(i||zA)}}var a=t.getStroke();if(!a)this.textStrokeState_=null;else{var o=a.getColor(),s=a.getLineCap(),A=a.getLineDash(),l=a.getLineDashOffset(),u=a.getLineJoin(),h=a.getWidth(),c=a.getMiterLimit();this.textStrokeState_={lineCap:s!==void 0?s:fm,lineDash:A||Cv,lineDashOffset:l||Bv,lineJoin:u!==void 0?u:$f,lineWidth:h!==void 0?h:bv,miterLimit:c!==void 0?c:Tv,strokeStyle:zs(o||xv)}}var f=t.getFont(),d=t.getOffsetX(),v=t.getOffsetY(),y=t.getRotateWithView(),m=t.getRotation(),w=t.getScaleArray(),C=t.getText(),B=t.getTextAlign(),R=t.getTextBaseline();this.textState_={font:f!==void 0?f:U2,textAlign:B!==void 0?B:Sv,textBaseline:R!==void 0?R:pm},this.text_=C!==void 0?Array.isArray(C)?C.reduce(function(O,I,T){return O+=T%2?" ":I},""):C:"",this.textOffsetX_=d!==void 0?this.pixelRatio_*d:0,this.textOffsetY_=v!==void 0?this.pixelRatio_*v:0,this.textRotateWithView_=y!==void 0?y:!1,this.textRotation_=m!==void 0?m:0,this.textScale_=[this.pixelRatio_*w[0],this.pixelRatio_*w[1]]}},e}(wU),wb=HY,Ra={FRACTION:"fraction",PIXELS:"pixels"},xi={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},GY=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)}}(),kY=function(r){GY(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.extent=t,o.pixelRatio_=i,o.resolution=n,o.state=a,o}return e.prototype.changed=function(){this.dispatchEvent(ye.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Ee()},e.prototype.getPixelRatio=function(){return this.pixelRatio_},e.prototype.getResolution=function(){return this.resolution},e.prototype.getState=function(){return this.state},e.prototype.load=function(){Ee()},e}(Wh),BU=kY,$Y=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)}}(),VY=function(r){$Y(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,i,ke.IDLE)||this;return A.src_=a,A.image_=new Image,o!==null&&(A.image_.crossOrigin=o),A.unlisten_=null,A.state=ke.IDLE,A.imageLoadFunction_=s,A}return e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=ke.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=ei(this.extent)/this.image_.height),this.state=ke.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){(this.state==ke.IDLE||this.state==ke.ERROR)&&(this.state=ke.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=Eb(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=ei(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(BU);function Eb(r,e,t){var n=r,i=!0,a=!1,o=!1,s=[Ev(n,ye.LOAD,function(){o=!0,a||e()})];return n.src&&R9?(a=!0,n.decode().then(function(){i&&e()}).catch(function(A){i&&(o?e():t())})):s.push(Ev(n,ye.ERROR,t)),function(){i=!1,s.forEach(Rr)}}var TU=VY,jY=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)}}(),Ad=null,KY=function(r){jY(e,r);function e(t,n,i,a,o,s){var A=r.call(this)||this;return A.hitDetectionImage_=null,A.image_=t||new Image,a!==null&&(A.image_.crossOrigin=a),A.canvas_={},A.color_=s,A.unlisten_=null,A.imageState_=o,A.size_=i,A.src_=n,A.tainted_,A}return e.prototype.isTainted_=function(){if(this.tainted_===void 0&&this.imageState_===ke.LOADED){Ad||(Ad=Ha(1,1)),Ad.drawImage(this.image_,0,0);try{Ad.getImageData(0,0,1,1),this.tainted_=!1}catch{Ad=null,this.tainted_=!0}}return this.tainted_===!0},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(ye.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=ke.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=ke.LOADED,this.size_?(this.image_.width=this.size_[0],this.image_.height=this.size_[1]):this.size_=[this.image_.width,this.image_.height],this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.getImage=function(t){return this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_},e.prototype.getPixelRatio=function(t){return this.replaceColor_(t),this.canvas_[t]?t:1},e.prototype.getImageState=function(){return this.imageState_},e.prototype.getHitDetectionImage=function(){if(!this.hitDetectionImage_)if(this.isTainted_()){var t=this.size_[0],n=this.size_[1],i=Ha(t,n);i.fillRect(0,0,t,n),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_},e.prototype.getSize=function(){return this.size_},e.prototype.getSrc=function(){return this.src_},e.prototype.load=function(){if(this.imageState_==ke.IDLE){this.imageState_=ke.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=Eb(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(!(!this.color_||this.canvas_[t]||this.imageState_!==ke.LOADED)){var n=document.createElement("canvas");this.canvas_[t]=n,n.width=Math.ceil(this.image_.width*t),n.height=Math.ceil(this.image_.height*t);var i=n.getContext("2d");if(i.scale(t,t),i.drawImage(this.image_,0,0),i.globalCompositeOperation="multiply",i.globalCompositeOperation==="multiply"||this.isTainted_())i.fillStyle=KA(this.color_),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(this.image_,0,0);else{for(var a=i.getImageData(0,0,n.width,n.height),o=a.data,s=this.color_[0]/255,A=this.color_[1]/255,l=this.color_[2]/255,u=this.color_[3],h=0,c=o.length;h<c;h+=4)o[h]*=s,o[h+1]*=A,o[h+2]*=l,o[h+3]*=u;i.putImageData(a,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Wh);function YY(r,e,t,n,i,a){var o=lm.get(e,n,a);return o||(o=new KY(r,e,t,n,i,a),lm.set(e,n,a,o)),o}var zY=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)}}(),XY=function(r){zY(e,r);function e(t){var n=this,i=t||{},a=i.opacity!==void 0?i.opacity:1,o=i.rotation!==void 0?i.rotation:0,s=i.scale!==void 0?i.scale:1,A=i.rotateWithView!==void 0?i.rotateWithView:!1;n=r.call(this,{opacity:a,rotation:o,scale:s,displacement:i.displacement!==void 0?i.displacement:[0,0],rotateWithView:A})||this,n.anchor_=i.anchor!==void 0?i.anchor:[.5,.5],n.normalizedAnchor_=null,n.anchorOrigin_=i.anchorOrigin!==void 0?i.anchorOrigin:xi.TOP_LEFT,n.anchorXUnits_=i.anchorXUnits!==void 0?i.anchorXUnits:Ra.FRACTION,n.anchorYUnits_=i.anchorYUnits!==void 0?i.anchorYUnits:Ra.FRACTION,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:null;var l=i.img!==void 0?i.img:null;n.imgSize_=i.imgSize;var u=i.src;_e(!(u!==void 0&&l),4),_e(!l||l&&n.imgSize_,5),(u===void 0||u.length===0)&&l&&(u=l.src||pe(l)),_e(u!==void 0&&u.length>0,6);var h=i.src!==void 0?ke.IDLE:ke.LOADED;return n.color_=i.color!==void 0?_u(i.color):null,n.iconImage_=YY(l,u,n.imgSize_!==void 0?n.imgSize_:null,n.crossOrigin_,h,n.color_),n.offset_=i.offset!==void 0?i.offset:[0,0],n.offsetOrigin_=i.offsetOrigin!==void 0?i.offsetOrigin:xi.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_==Ra.FRACTION||this.anchorYUnits_==Ra.FRACTION){if(!n)return null;t=this.anchor_.slice(),this.anchorXUnits_==Ra.FRACTION&&(t[0]*=n[0]),this.anchorYUnits_==Ra.FRACTION&&(t[1]*=n[1])}if(this.anchorOrigin_!=xi.TOP_LEFT){if(!n)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==xi.TOP_RIGHT||this.anchorOrigin_==xi.BOTTOM_RIGHT)&&(t[0]=-t[0]+n[0]),(this.anchorOrigin_==xi.BOTTOM_LEFT||this.anchorOrigin_==xi.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_!=xi.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;t=t.slice(),(this.offsetOrigin_==xi.TOP_RIGHT||this.offsetOrigin_==xi.BOTTOM_RIGHT)&&(t[0]=i[0]-n[0]-t[0]),(this.offsetOrigin_==xi.BOTTOM_LEFT||this.offsetOrigin_==xi.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(ye.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(ye.CHANGE,t)},e}(_U),og=XY,WY="#333",qY=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_=Li(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 ra({color:WY}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:EU.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_=Li(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}(),Jh=qY,wo=.5;function xU(r,e,t,n,i,a,o){var s=r[0]*wo,A=r[1]*wo,l=Ha(s,A);l.imageSmoothingEnabled=!1;for(var u=l.canvas,h=new wb(l,wo,i,null,o),c=t.length,f=Math.floor((256*256*256-1)/c),d={},v=1;v<=c;++v){var y=t[v-1],m=y.getStyleFunction()||n;if(n){var w=m(y,a);if(w){Array.isArray(w)||(w=[w]);for(var C=v*f,B="#"+("000000"+C.toString(16)).slice(-6),R=0,O=w.length;R<O;++R){var I=w[R],T=I.getGeometryFunction()(y);if(!(!T||!In(i,T.getExtent()))){var L=I.clone(),P=L.getFill();P&&P.setColor(B);var S=L.getStroke();S&&(S.setColor(B),S.setLineDash(null)),L.setText(void 0);var x=I.getImage();if(x&&x.getOpacity()!==0){var M=x.getImageSize();if(!M)continue;var D=Ha(M[0],M[1],void 0,{alpha:!1}),W=D.canvas;D.fillStyle=B,D.fillRect(0,0,W.width,W.height),L.setImage(new og({img:W,imgSize:M,anchor:x.getAnchor(),anchorXUnits:Ra.PIXELS,anchorYUnits:Ra.PIXELS,offset:x.getOrigin(),opacity:1,size:x.getSize(),scale:x.getScale(),rotation:x.getRotation(),rotateWithView:x.getRotateWithView()}))}var z=L.getZIndex()||0,tt=d[z];tt||(tt={},d[z]=tt,tt[st.POLYGON]=[],tt[st.CIRCLE]=[],tt[st.LINE_STRING]=[],tt[st.POINT]=[]),tt[T.getType().replace("Multi","")].push(T,L)}}}}}for(var q=Object.keys(d).map(Number).sort(gu),v=0,rt=q.length;v<rt;++v){var tt=d[q[v]];for(var nt in tt)for(var _t=tt[nt],R=0,O=_t.length;R<O;R+=2){h.setStyle(_t[R+1]);for(var F=0,$=e.length;F<$;++F)h.setTransform(e[F]),h.drawGeometry(_t[R])}}return l.getImageData(0,0,u.width,u.height)}function SU(r,e,t){var n=[];if(t){var i=Math.floor(Math.round(r[0])*wo),a=Math.floor(Math.round(r[1])*wo),o=(En(i,0,t.width-1)+En(a,0,t.height-1)*t.width)*4,s=t.data[o],A=t.data[o+1],l=t.data[o+2],u=l+256*(A+256*s),h=Math.floor((256*256*256-1)/e.length);u&&u%h===0&&n.push(e[u/h-1])}return n}var ZY=.5,bU={Point:oz,LineString:nz,Polygon:Az,MultiPoint:sz,MultiLineString:iz,MultiPolygon:az,GeometryCollection:rz,Circle:tz};function JY(r,e){return parseInt(pe(r),10)-parseInt(pe(e),10)}function LU(r,e){var t=wB(r,e);return t*t}function wB(r,e){return ZY*r/e}function tz(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),or.CIRCLE);s.setFillStrokeStyle(a,o),s.drawCircle(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),or.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function xm(r,e,t,n,i,a,o){var s=!1,A=t.getImage();if(A){var l=A.getImageState();l==ke.LOADED||l==ke.ERROR?A.unlistenImageChange(i):(l==ke.IDLE&&A.load(),l=A.getImageState(),A.listenImageChange(i),s=!0)}return ez(r,e,t,n,a,o),s}function ez(r,e,t,n,i,a){var o=t.getGeometryFunction()(e);if(o){var s=o.simplifyTransformed(n,i),A=t.getRenderer();if(A)FU(r,s,t,e);else{var l=bU[s.getType()];l(r,s,t,e,a)}}}function FU(r,e,t,n){if(e.getType()==st.GEOMETRY_COLLECTION){for(var i=e.getGeometries(),a=0,o=i.length;a<o;++a)FU(r,i[a],t,n);return}var s=r.getBuilder(t.getZIndex(),or.DEFAULT);s.drawCustom(e,n,t.getRenderer(),t.getHitDetectionRenderer())}function rz(r,e,t,n,i){var a=e.getGeometriesArray(),o,s;for(o=0,s=a.length;o<s;++o){var A=bU[a[o].getType()];A(r,a[o],t,n,i)}}function nz(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),or.LINE_STRING);o.setFillStrokeStyle(null,a),o.drawLineString(e,n)}var s=t.getText();if(s&&s.getText()){var A=(i||r).getBuilder(t.getZIndex(),or.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function iz(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),or.LINE_STRING);o.setFillStrokeStyle(null,a),o.drawMultiLineString(e,n)}var s=t.getText();if(s&&s.getText()){var A=(i||r).getBuilder(t.getZIndex(),or.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function az(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(o||a){var s=r.getBuilder(t.getZIndex(),or.POLYGON);s.setFillStrokeStyle(a,o),s.drawMultiPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),or.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function oz(r,e,t,n,i){var a=t.getImage(),o=t.getText(),s;if(i&&(r=i,s=a&&o&&o.getText()?{}:void 0),a){if(a.getImageState()!=ke.LOADED)return;var A=r.getBuilder(t.getZIndex(),or.IMAGE);A.setImageStyle(a,s),A.drawPoint(e,n)}if(o&&o.getText()){var l=r.getBuilder(t.getZIndex(),or.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function sz(r,e,t,n,i){var a=t.getImage(),o=t.getText(),s;if(i&&(r=i,s=a&&o&&o.getText()?{}:void 0),a){if(a.getImageState()!=ke.LOADED)return;var A=r.getBuilder(t.getZIndex(),or.IMAGE);A.setImageStyle(a,s),A.drawMultiPoint(e,n)}if(o&&o.getText()){var l=(i||r).getBuilder(t.getZIndex(),or.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function Az(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),or.POLYGON);s.setFillStrokeStyle(a,o),s.drawPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),or.TEXT);l.setTextStyle(A),l.drawText(e,n)}}var 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)}}(),uz=function(r){lz(e,r);function e(t){var n=r.call(this,t)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.animatingOrInteracting_,n.dirty_=!1,n.hitDetectionImageData_=null,n.renderedFeatures_=null,n.renderedRevision_=-1,n.renderedResolution_=NaN,n.renderedExtent_=di(),n.wrappedRenderedExtent_=di(),n.renderedRotation_,n.renderedCenter_=null,n.renderedProjection_=null,n.renderedRenderOrder_=null,n.replayGroup_=null,n.replayGroupChanged=!0,n.declutterExecutorGroup=null,n.clipping=!0,n}return e.prototype.renderWorlds=function(t,n,i){var a=n.extent,o=n.viewState,s=o.center,A=o.resolution,l=o.projection,u=o.rotation,h=l.getExtent(),c=this.getLayer().getSource(),f=n.pixelRatio,d=n.viewHints,v=!(d[fn.ANIMATING]||d[fn.INTERACTING]),y=this.context,m=Math.round(n.size[0]*f),w=Math.round(n.size[1]*f),C=c.getWrapX()&&l.canWrapX(),B=C?Fr(h):null,R=C?Math.ceil((a[2]-h[2])/B)+1:1,O=C?Math.floor((a[0]-h[0])/B):0;do{var I=this.getRenderTransform(s,A,u,f,m,w,O*B);t.execute(y,1,I,u,v,void 0,i)}while(++O<R)},e.prototype.renderDeclutter=function(t){this.declutterExecutorGroup&&this.renderWorlds(this.declutterExecutorGroup,t,t.declutterTree)},e.prototype.renderFrame=function(t,n){var i=t.pixelRatio,a=t.layerStatesArray[t.layerIndex];U9(this.pixelTransform,1/i,1/i),Xv(this.inversePixelTransform,this.pixelTransform);var o=DS(this.pixelTransform);this.useContainer(n,o,a.opacity,this.getBackground(t));var s=this.context,A=s.canvas,l=this.replayGroup_,u=this.declutterExecutorGroup;if((!l||l.isEmpty())&&(!u||u.isEmpty()))return null;var h=Math.round(t.size[0]*i),c=Math.round(t.size[1]*i);A.width!=h||A.height!=c?(A.width=h,A.height=c,A.style.transform!==o&&(A.style.transform=o)):this.containerReused||s.clearRect(0,0,h,c),this.preRender(s,t);var f=t.viewState;f.projection;var d=!1,v=!0;if(a.extent&&this.clipping){var y=Co(a.extent);v=In(y,t.extent),d=v&&!Eo(y,t.extent),d&&this.clipUnrotated(s,t,y)}v&&this.renderWorlds(l,t),d&&s.restore(),this.postRender(s,t);var m=P2(a.opacity),w=this.container;return m!==w.style.opacity&&(w.style.opacity=m),this.renderedRotation_!==f.rotation&&(this.renderedRotation_=f.rotation,this.hitDetectionImageData_=null),this.container},e.prototype.getFeatures=function(t){return new Promise(function(n){if(!this.hitDetectionImageData_&&!this.animatingOrInteracting_){var i=[this.context.canvas.width,this.context.canvas.height];An(this.pixelTransform,i);var a=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,A=this.renderedProjection_,l=this.wrappedRenderedExtent_,u=this.getLayer(),h=[],c=i[0]*wo,f=i[1]*wo;h.push(this.getRenderTransform(a,o,s,wo,c,f,0).slice());var d=u.getSource(),v=A.getExtent();if(d.getWrapX()&&A.canWrapX()&&!Eo(v,l)){for(var y=l[0],m=Fr(v),w=0,C=void 0;y<v[0];)--w,C=m*w,h.push(this.getRenderTransform(a,o,s,wo,c,f,C).slice()),y+=m;for(w=0,y=l[2];y>v[2];)++w,C=m*w,h.push(this.getRenderTransform(a,o,s,wo,c,f,C).slice()),y-=m}this.hitDetectionImageData_=xU(i,h,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}n(SU(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(),h={},c=function(v,y,m){var w=pe(v),C=h[w];if(C){if(C!==!0&&m<C.distanceSq){if(m===0)return h[w]=!0,o.splice(o.lastIndexOf(C),1),a(v,u,y);C.geometry=y,C.distanceSq=m}}else{if(m===0)return h[w]=!0,a(v,u,y);o.push(h[w]={feature:v,layer:u,geometry:y,distanceSq:m,callback:a})}},f,d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(function(v){return f=v.forEachFeatureAtCoordinate(t,A,l,i,c,v===s.declutterExecutorGroup&&n.declutterTree?n.declutterTree.all().map(function(y){return y.value}):null)}),f}},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.prepareFrame=function(t){var n=this.getLayer(),i=n.getSource();if(!i)return!1;var a=t.viewHints[fn.ANIMATING],o=t.viewHints[fn.INTERACTING],s=n.getUpdateWhileAnimating(),A=n.getUpdateWhileInteracting();if(!this.dirty_&&!s&&a||!A&&o)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;var l=t.extent,u=t.viewState,h=u.projection,c=u.resolution,f=t.pixelRatio,d=n.getRevision(),v=n.getRenderBuffer(),y=n.getRenderOrder();y===void 0&&(y=JY);var m=u.center.slice(),w=Qa(l,v*c),C=w.slice(),B=[w.slice()],R=h.getExtent();if(i.getWrapX()&&h.canWrapX()&&!Eo(R,t.extent)){var O=Fr(R),I=Math.max(Fr(w)/2,O);w[0]=R[0]-I,w[2]=R[2]+I,zS(m,h);var T=E2(B[0],h);T[0]<R[0]&&T[2]<R[2]?B.push([T[0]+O,T[1],T[2]+O,T[3]]):T[0]>R[0]&&T[2]>R[2]&&B.push([T[0]-O,T[1],T[2]-O,T[3]])}if(!this.dirty_&&this.renderedResolution_==c&&this.renderedRevision_==d&&this.renderedRenderOrder_==y&&Eo(this.wrappedRenderedExtent_,w))return ll(this.renderedExtent_,C)||(this.hitDetectionImageData_=null,this.renderedExtent_=C),this.renderedCenter_=m,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var L=new Bm(wB(c,f),w,c,f),P;this.getLayer().getDeclutter()&&(P=new Bm(wB(c,f),w,c,f));for(var S,x,M,x=0,M=B.length;x<M;++x)i.loadFeatures(B[x],c,h);var D=LU(c,f),W=function(nt){var _t,F=nt.getStyleFunction()||n.getStyleFunction();if(F&&(_t=F(nt,c)),_t){var $=this.renderFeature(nt,D,_t,L,S,P);this.dirty_=this.dirty_||$}}.bind(this),z=U_(w),tt=i.getFeaturesInExtent(z);y&&tt.sort(y);for(var x=0,M=tt.length;x<M;++x)W(tt[x]);this.renderedFeatures_=tt;var q=L.finish(),rt=new Tm(w,c,f,i.getOverlaps(),q,n.getRenderBuffer());return P&&(this.declutterExecutorGroup=new Tm(w,c,f,i.getOverlaps(),P.finish(),n.getRenderBuffer())),this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=y,this.renderedExtent_=C,this.wrappedRenderedExtent_=w,this.renderedCenter_=m,this.renderedProjection_=h,this.replayGroup_=rt,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0},e.prototype.renderFeature=function(t,n,i,a,o,s){if(!i)return!1;var A=!1;if(Array.isArray(i))for(var l=0,u=i.length;l<u;++l)A=xm(a,t,i[l],n,this.boundHandleStyleImageChange_,o,s)||A;else A=xm(a,t,i,n,this.boundHandleStyleImageChange_,o,s);return A},e}(_b),hz=uz,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)}}(),fz=function(r){cz(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new hz(this)},e}(j_),sA=fz,pz=function(){function r(e){this.rbush_=new mU(e),this.items_={}}return r.prototype.insert=function(e,t){var n={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3],value:t};this.rbush_.insert(n),this.items_[pe(t)]=n},r.prototype.load=function(e,t){for(var n=new Array(t.length),i=0,a=t.length;i<a;i++){var o=e[i],s=t[i],A={minX:o[0],minY:o[1],maxX:o[2],maxY:o[3],value:s};n[i]=A,this.items_[pe(s)]=A}this.rbush_.load(n)},r.prototype.remove=function(e){var t=pe(e),n=this.items_[t];return delete this.items_[t],this.rbush_.remove(n)!==null},r.prototype.update=function(e,t){var n=this.items_[pe(t)],i=[n.minX,n.minY,n.maxX,n.maxY];nA(i,e)||(this.remove(t),this.insert(e,t))},r.prototype.getAll=function(){var e=this.rbush_.all();return e.map(function(t){return t.value})},r.prototype.getInExtent=function(e){var t={minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]},n=this.rbush_.search(t);return n.map(function(i){return i.value})},r.prototype.forEach=function(e){return this.forEach_(this.getAll(),e)},r.prototype.forEachInExtent=function(e,t){return this.forEach_(this.getInExtent(e),t)},r.prototype.forEach_=function(e,t){for(var n,i=0,a=e.length;i<a;i++)if(n=t(e[i]),n)return n;return n},r.prototype.isEmpty=function(){return Qh(this.items_)},r.prototype.clear=function(){this.rbush_.clear(),this.items_={}},r.prototype.getExtent=function(e){var t=this.rbush_.toJSON();return no(t.minX,t.minY,t.maxX,t.maxY,e)},r.prototype.concat=function(e){this.rbush_.load(e.rbush_.all());for(var t in e.items_)this.items_[t]=e.items_[t]},r}(),Sm=pz,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)}}(),vz=function(r){dz(e,r);function e(t){var n=r.call(this)||this;n.projection=Ie(t.projection),n.attributions_=cR(t.attributions),n.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,n.loading=!1,n.state_=t.state!==void 0?t.state:Oa.READY,n.wrapX_=t.wrapX!==void 0?t.wrapX:!1,n.interpolate_=!!t.interpolate,n.viewResolver=null,n.viewRejector=null;var i=n;return n.viewPromise_=new Promise(function(a,o){i.viewResolver=a,i.viewRejector=o}),n}return e.prototype.getAttributions=function(){return this.attributions_},e.prototype.getAttributionsCollapsible=function(){return this.attributionsCollapsible_},e.prototype.getProjection=function(){return this.projection},e.prototype.getResolutions=function(){return Ee()},e.prototype.getView=function(){return this.viewPromise_},e.prototype.getState=function(){return this.state_},e.prototype.getWrapX=function(){return this.wrapX_},e.prototype.getInterpolate=function(){return this.interpolate_},e.prototype.refresh=function(){this.changed()},e.prototype.setAttributions=function(t){this.attributions_=cR(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(ni);function cR(r){return r?Array.isArray(r)?function(e){return r}:typeof r=="function"?r:function(e){return[r]}:null}var K_=vz,Si={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function IU(r,e){return[[-1/0,-1/0,1/0,1/0]]}function gz(r,e){return[r]}function yz(r){return function(e,t,n){var i=r.getZForResolution(hV(t)),a=r.getTileRangeForExtentAndZ(Co(e),i),o=[],s=[i,0,0];for(s[1]=a.minX;s[1]<=a.maxX;++s[1])for(s[2]=a.minY;s[2]<=a.maxY;++s[2])o.push(U_(r.getTileCoordExtent(s)));return o}}var mz=Object.freeze(Object.defineProperty({__proto__:null,all:IU,bbox:gz,tile:yz},Symbol.toStringTag,{value:"Module"})),_z=!1;function wz(r,e,t,n,i,a,o){var s=new XMLHttpRequest;s.open("GET",typeof r=="function"?r(t,n,i):r,!0),e.getType()==vs.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.withCredentials=_z,s.onload=function(A){if(!s.status||s.status>=200&&s.status<300){var l=e.getType(),u=void 0;l==vs.JSON||l==vs.TEXT?u=s.responseText:l==vs.XML?(u=s.responseXML,u||(u=new DOMParser().parseFromString(s.responseText,"application/xml"))):l==vs.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 fR(r,e){return function(t,n,i,a,o){var s=this;wz(r,e,t,n,i,function(A,l){s.addFeatures(A),a!==void 0&&a(A)},o||Nh)}}var RU=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)}}(),Ul=function(r){RU(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.feature=n,a.features=i,a}return e}(oo),Ez=function(r){RU(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:Oa.READY,wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,n.on,n.once,n.un,n.loader_=Nh,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&&(_e(n.format_,7),n.loader_=fR(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:IU;var a=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=a?new Sm:null,n.loadedExtentsRtree_=new Sm,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 ti(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=pe(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 Ul(Si.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,n){this.featureChangeKeys_[t]=[Pe(n,ye.CHANGE,this.handleFeatureChange_,this),Pe(n,Dh.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&&(_e(!(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;o<s;o++){var A=t[o],l=pe(A);this.addToIndex_(l,A)&&i.push(A)}for(var o=0,u=i.length;o<u;o++){var A=i[o],l=pe(A);this.setupChangeEvents_(l,A);var h=A.getGeometry();if(h){var c=h.getExtent();n.push(c),a.push(A)}else this.nullGeometryFeatures_[l]=A}if(this.featuresRtree_&&this.featuresRtree_.load(n,a),this.hasListener(Si.ADDFEATURE))for(var o=0,f=i.length;o<f;o++)this.dispatchEvent(new Ul(Si.ADDFEATURE,i[o]))},e.prototype.bindFeaturesCollection_=function(t){var n=!1;this.addEventListener(Si.ADDFEATURE,function(i){n||(n=!0,t.push(i.feature),n=!1)}),this.addEventListener(Si.REMOVEFEATURE,function(i){n||(n=!0,t.remove(i.feature),n=!1)}),t.addEventListener(Un.ADD,function(i){n||(n=!0,this.addFeature(i.element),n=!1)}.bind(this)),t.addEventListener(Un.REMOVE,function(i){n||(n=!0,this.removeFeature(i.element),n=!1)}.bind(this)),this.featuresCollection_=t},e.prototype.clear=function(t){if(t){for(var n in this.featureChangeKeys_){var i=this.featureChangeKeys_[n];i.forEach(Rr)}this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){var a=function(A){this.removeFeatureInternal(A)}.bind(this);this.featuresRtree_.forEach(a);for(var o in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[o])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};var s=new Ul(Si.CLEAR);this.dispatchEvent(s),this.changed()},e.prototype.forEachFeature=function(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)},e.prototype.forEachFeatureAtCoordinateDirect=function(t,n){var i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(a){var o=a.getGeometry();if(o.intersectsCoordinate(t))return n(a)})},e.prototype.forEachFeatureInExtent=function(t,n){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,n);this.featuresCollection_&&this.featuresCollection_.forEach(n)},e.prototype.forEachFeatureIntersectingExtent=function(t,n){return this.forEachFeatureInExtent(t,function(i){var a=i.getGeometry();if(a.intersectsExtent(t)){var o=n(i);if(o)return o}})},e.prototype.getFeaturesCollection=function(){return this.featuresCollection_},e.prototype.getFeatures=function(){var t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),Qh(this.nullGeometryFeatures_)||Ur(t,VS(this.nullGeometryFeatures_))),t},e.prototype.getFeaturesAtCoordinate=function(t){var n=[];return this.forEachFeatureAtCoordinateDirect(t,function(i){n.push(i)}),n},e.prototype.getFeaturesInExtent=function(t){return this.featuresRtree_?this.featuresRtree_.getInExtent(t):this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]},e.prototype.getClosestFeatureToCoordinate=function(t,n){var i=t[0],a=t[1],o=null,s=[NaN,NaN],A=1/0,l=[-1/0,-1/0,1/0,1/0],u=n||Js;return this.featuresRtree_.forEachInExtent(l,function(h){if(u(h)){var c=h.getGeometry(),f=A;if(A=c.closestPointXY(i,a,s,A),A<f){o=h;var d=Math.sqrt(A);l[0]=i-d,l[1]=a-d,l[2]=i+d,l[3]=a+d}}}),o},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var n=this.idIndex_[t.toString()];return n!==void 0?n:null},e.prototype.getFeatureByUid=function(t){var n=this.uidIndex_[t];return n!==void 0?n:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var n=t.target,i=pe(n),a=n.getGeometry();if(!a)i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(n),this.nullGeometryFeatures_[i]=n);else{var o=a.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(o,n)):this.featuresRtree_&&this.featuresRtree_.update(o,n)}var s=n.getId();if(s!==void 0){var A=s.toString();this.idIndex_[A]!==n&&(this.removeFromIdIndex_(n),this.idIndex_[A]=n)}else this.removeFromIdIndex_(n),this.uidIndex_[i]=n;this.changed(),this.dispatchEvent(new Ul(Si.CHANGEFEATURE,n))},e.prototype.hasFeature=function(t){var n=t.getId();return n!==void 0?n in this.idIndex_:pe(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&Qh(this.nullGeometryFeatures_):this.featuresCollection_?this.featuresCollection_.getLength()===0:!0},e.prototype.loadFeatures=function(t,n,i){for(var a=this.loadedExtentsRtree_,o=this.strategy_(t,n,i),s=function(h,c){var f=o[h],d=a.forEachInExtent(f,function(v){return Eo(v.extent,f)});d||(++A.loadingExtentsCount_,A.dispatchEvent(new Ul(Si.FEATURESLOADSTART)),A.loader_.call(A,f,n,i,function(v){--this.loadingExtentsCount_,this.dispatchEvent(new Ul(Si.FEATURESLOADEND,void 0,v))}.bind(A),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Ul(Si.FEATURESLOADERROR))}.bind(A)),a.insert(f,{extent:f.slice()}))},A=this,l=0,u=o.length;l<u;++l)s(l);this.loading=this.loader_.length<4?!1:this.loadingExtentsCount_>0},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(nA(a.extent,t))return i=a,!0}),i&&n.remove(i)},e.prototype.removeFeature=function(t){if(t){var n=pe(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=pe(t),i=this.featureChangeKeys_[n];if(i){i.forEach(Rr),delete this.featureChangeKeys_[n];var a=t.getId();return a!==void 0&&delete this.idIndex_[a.toString()],delete this.uidIndex_[n],this.dispatchEvent(new Ul(Si.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){_e(this.format_,7),this.url_=t,this.setLoader(fR(t,this.format_))},e}(K_),hl=Ez,OU=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)}}(),Sr={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},by={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},Ly=function(r){OU(e,r);function e(t,n){var i=r.call(this,t)||this;return i.feature=n,i}return e}(oo),Cz=function(r){OU(e,r);function e(t){var n=this,i=t;i.stopDown||(i.stopDown=zh),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_=Tz(n.type_),n.stopClick_=!!t.stopClick,n.minPoints_=t.minPoints?t.minPoints:n.mode_===Sr.POLYGON?3:2,n.maxPoints_=n.mode_===Sr.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,n.finishCondition_=t.finishCondition?t.finishCondition:Js;var a=t.geometryFunction;if(!a){var o=n.mode_;if(o===Sr.CIRCLE)a=function(A,l,u){var h=l||new yb([NaN,NaN]),c=_n(A[0]),f=YA(c,_n(A[A.length-1]));return h.setCenterAndRadius(c,Math.sqrt(f)),h};else{var s;o===Sr.POINT?s=cr:o===Sr.LINE_STRING?s=Dr:o===Sr.POLYGON&&(s=Cn),a=function(A,l,u){return l?o===Sr.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 sA({source:new hl({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Bz(),updateWhileInteracting:!0}),n.geometryName_=t.geometryName,n.condition_=t.condition?t.condition:V_,n.freehandCondition_,t.freehand?n.freehandCondition_=k_:n.freehandCondition_=t.freehandCondition?t.freehandCondition:rg,n.addChangeListener(yB.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===ye.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!==Sr.POINT&&this.freehandCondition_(t);var n=t.type===rr.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===rr.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===rr.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===rr.POINTERDOWN?i=!1:n&&this.getPointerCount()<2?(i=t.type===rr.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===rr.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===rr.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 HA(rr.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_===Sr.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===Sr.POINT)n=!0;else if(o===Sr.CIRCLE)n=this.sketchCoords_.length===2;else if(o===Sr.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(o===Sr.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<u;l++){var h=a[l],c=A.getPixelFromCoordinate(h),f=t[0]-c[0],d=t[1]-c[1],v=this.freehand_?1:this.snapTolerance_;if(n=Math.sqrt(f*f+d*d)<=v,n){this.finishCoordinate_=h;break}}}return n},e.prototype.createOrUpdateSketchPoint_=function(t){if(!this.sketchPoint_)this.sketchPoint_=new nr(new cr(t)),this.updateSketchFeatures_();else{var n=this.sketchPoint_.getGeometry();n.setCoordinates(t)}},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new nr);var n=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),i.changed()):(i=new Dr(n.getFlatCoordinates(),n.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var n=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===Sr.POINT?this.sketchCoords_=t.slice():this.mode_===Sr.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new nr(new Dr(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,n);this.sketchFeature_=new nr,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Ly(by.DRAWSTART,this.sketchFeature_))},e.prototype.modifyDrawing_=function(t){var n=this.getMap(),i=this.sketchFeature_.getGeometry(),a=n.getView().getProjection(),o,s;if(this.mode_===Sr.POINT?s=this.sketchCoords_:this.mode_===Sr.POLYGON?(o=this.sketchCoords_[0],s=o[o.length-1],this.atFinish_(n.getPixelFromCoordinate(t))&&(t=this.finishCoordinate_.slice())):(o=this.sketchCoords_,s=o[o.length-1]),s[0]=t[0],s[1]=t[1],this.geometryFunction_(this.sketchCoords_,i,a),this.sketchPoint_){var A=this.sketchPoint_.getGeometry();A.setCoordinates(t)}if(i.getType()===st.POLYGON&&this.mode_!==Sr.POLYGON)this.createOrUpdateCustomSketchLine_(i);else if(this.sketchLineCoords_){var l=this.sketchLine_.getGeometry();l.setCoordinates(this.sketchLineCoords_)}this.updateSketchFeatures_()},e.prototype.addToDrawing_=function(t){var n=this.sketchFeature_.getGeometry(),i=this.getMap().getView().getProjection(),a,o,s=this.mode_;s===Sr.LINE_STRING||s===Sr.CIRCLE?(this.finishCoordinate_=t.slice(),o=this.sketchCoords_,o.length>=this.maxPoints_&&(this.freehand_?o.pop():a=!0),o.push(t.slice()),this.geometryFunction_(o,n,i)):s===Sr.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===Sr.LINE_STRING||a===Sr.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()===st.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(a===Sr.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_===Sr.LINE_STRING?(n.pop(),this.geometryFunction_(n,i,a)):this.mode_===Sr.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i,a),n=i.getCoordinates()),this.type_===st.MULTI_POINT?t.setGeometry(new zo([n])):this.type_===st.MULTI_LINE_STRING?t.setGeometry(new Ea([n])):this.type_===st.MULTI_POLYGON&&t.setGeometry(new Ca([n])),this.dispatchEvent(new Ly(by.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 Ly(by.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var n=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(t[0]);var a;if(n===Sr.LINE_STRING||n===Sr.CIRCLE)a=this.sketchCoords_;else if(n===Sr.POLYGON)a=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&a.shift(),a.pop();for(var o=0;o<t.length;o++)this.addToDrawing_(t[o]);var s=t[t.length-1];this.addToDrawing_(s),this.modifyDrawing_(s)},e.prototype.extend=function(t){var n=t.getGeometry(),i=n;this.sketchFeature_=t,this.sketchCoords_=i.getCoordinates();var a=this.sketchCoords_[this.sketchCoords_.length-1];this.finishCoordinate_=a.slice(),this.sketchCoords_.push(a.slice()),this.sketchPoint_=new nr(new cr(a)),this.updateSketchFeatures_(),this.dispatchEvent(new Ly(by.DRAWSTART,this.sketchFeature_))},e.prototype.updateSketchFeatures_=function(){var t=[];this.sketchFeature_&&t.push(this.sketchFeature_),this.sketchLine_&&t.push(this.sketchLine_),this.sketchPoint_&&t.push(this.sketchPoint_);var n=this.overlay_.getSource();n.clear(!0),n.addFeatures(t)},e.prototype.updateState_=function(){var t=this.getMap(),n=this.getActive();(!t||!n)&&this.abortDrawing(),this.overlay_.setMap(n?t:null)},e}(So);function Bz(){var r=mb();return function(e,t){return r[e.getGeometry().getType()]}}function Tz(r){switch(r){case st.POINT:case st.MULTI_POINT:return Sr.POINT;case st.LINE_STRING:case st.MULTI_LINE_STRING:return Sr.LINE_STRING;case st.POLYGON:case st.MULTI_POLYGON:return Sr.POLYGON;case st.CIRCLE:return Sr.CIRCLE;default:throw new Error("Invalid type: "+r)}}var Cb=Cz,MU=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)}}(),pR=0,Jd=1,dR=[0,0,0,0],Lf=[],oE={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},sE=function(r){MU(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.features=n,a.mapBrowserEvent=i,a}return e}(oo),xz=function(r){MU(e,r);function e(t){var n=r.call(this,t)||this;n.on,n.once,n.un,n.boundHandleFeatureChange_=n.handleFeatureChange_.bind(n),n.condition_=t.condition?t.condition:gb,n.defaultDeleteCondition_=function(a){return hU(a)&&$_(a)},n.deleteCondition_=t.deleteCondition?t.deleteCondition:n.defaultDeleteCondition_,n.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:k_,n.vertexFeature_=null,n.vertexSegments_=null,n.lastPixel_=[0,0],n.ignoreNextSingleClick_=!1,n.featuresBeingModified_=null,n.rBush_=new Sm,n.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,n.snappedToVertex_=!1,n.changingFeature_=!1,n.dragSegments_=[],n.overlay_=new sA({source:new hl({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:bz(),updateWhileAnimating:!0,updateWhileInteracting:!0}),n.SEGMENT_WRITERS_={Point:n.writePointGeometry_.bind(n),LineString:n.writeLineStringGeometry_.bind(n),LinearRing:n.writeLineStringGeometry_.bind(n),Polygon:n.writePolygonGeometry_.bind(n),MultiPoint:n.writeMultiPointGeometry_.bind(n),MultiLineString:n.writeMultiLineStringGeometry_.bind(n),MultiPolygon:n.writeMultiPolygonGeometry_.bind(n),Circle:n.writeCircleGeometry_.bind(n),GeometryCollection:n.writeGeometryCollectionGeometry_.bind(n)},n.source_=null,n.hitDetection_=null;var i;if(t.features?i=t.features:t.source&&(n.source_=t.source,i=new ti(n.source_.getFeatures()),n.source_.addEventListener(Si.ADDFEATURE,n.handleSourceAdd_.bind(n)),n.source_.addEventListener(Si.REMOVEFEATURE,n.handleSourceRemove_.bind(n))),!i)throw new Error("The modify interaction requires features, a source or a layer");return t.hitDetection&&(n.hitDetection_=t.hitDetection),n.features_=i,n.features_.forEach(n.addFeature_.bind(n)),n.features_.addEventListener(Un.ADD,n.handleFeatureAdd_.bind(n)),n.features_.addEventListener(Un.REMOVE,n.handleFeatureRemove_.bind(n)),n.lastPointerEvent_=null,n.delta_=[0,0],n.snapToPointer_=t.snapToPointer===void 0?!n.hitDetection_:t.snapToPointer,n}return e.prototype.addFeature_=function(t){var n=t.getGeometry();if(n){var i=this.SEGMENT_WRITERS_[n.getType()];i&&i(t,n)}var a=this.getMap();a&&a.isRendered()&&this.getActive()&&this.handlePointerAtPixel_(this.lastPixel_,a),t.addEventListener(ye.CHANGE,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,n){if(!this.featuresBeingModified_){this.featuresBeingModified_=new ti;for(var i=this.featuresBeingModified_.getArray(),a=0,o=n.length;a<o;++a)for(var s=n[a],A=0,l=s.length;A<l;++A){var u=s[A].feature;u&&i.indexOf(u)===-1&&this.featuresBeingModified_.push(u)}this.featuresBeingModified_.getLength()===0?this.featuresBeingModified_=null:this.dispatchEvent(new sE(oE.MODIFYSTART,this.featuresBeingModified_,t))}},e.prototype.removeFeature_=function(t){this.removeFeatureSegmentData_(t),this.vertexFeature_&&this.features_.getLength()===0&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.removeEventListener(ye.CHANGE,this.boundHandleFeatureChange_)},e.prototype.removeFeatureSegmentData_=function(t){var n=this.rBush_,i=[];n.forEach(function(A){t===A.feature&&i.push(A)});for(var a=i.length-1;a>=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<o;++a){var s=i[a],A={feature:t,geometry:n,depth:[a],index:a,segment:[s,s]};this.rBush_.insert(n.getExtent(),A)}},e.prototype.writeLineStringGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length-1;a<o;++a){var s=i.slice(a,a+2),A={feature:t,geometry:n,index:a,segment:s};this.rBush_.insert(ki(s),A)}},e.prototype.writeMultiLineStringGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A){var u=s.slice(A,A+2),h={feature:t,geometry:n,depth:[a],index:A,segment:u};this.rBush_.insert(ki(u),h)}},e.prototype.writePolygonGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A){var u=s.slice(A,A+2),h={feature:t,geometry:n,depth:[a],index:A,segment:u};this.rBush_.insert(ki(u),h)}},e.prototype.writeMultiPolygonGeometry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length;A<l;++A)for(var u=s[A],h=0,c=u.length-1;h<c;++h){var f=u.slice(h,h+2),d={feature:t,geometry:n,depth:[A,a],index:h,segment:f};this.rBush_.insert(ki(f),d)}},e.prototype.writeCircleGeometry_=function(t,n){var i=n.getCenter(),a={feature:t,geometry:n,index:pR,segment:[i,i]},o={feature:t,geometry:n,index:Jd,segment:[i,i]},s=[a,o];a.featureSegments=s,o.featureSegments=s,this.rBush_.insert(Bh(i),a);var A=n;this.rBush_.insert(A.getExtent(),o)},e.prototype.writeGeometryCollectionGeometry_=function(t,n){for(var i=n.getGeometriesArray(),a=0;a<i.length;++a){var o=i[a],s=this.SEGMENT_WRITERS_[o.getType()];s(t,o)}},e.prototype.createOrUpdateVertexFeature_=function(t,n,i){var a=this.vertexFeature_;if(!a)a=new nr(new cr(t)),this.vertexFeature_=a,this.overlay_.getSource().addFeature(a);else{var o=a.getGeometry();o.setCoordinates(t)}return a.set("features",n),a.set("geometries",i),a},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;this.lastPointerEvent_=t;var n;return!t.map.getView().getInteracting()&&t.type==rr.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=rr.SINGLECLICK||!this.ignoreNextSingleClick_?n=this.removePoint():n=!0),t.type==rr.SINGLECLICK&&(this.ignoreNextSingleClick_=!1),r.prototype.handleEvent.call(this,t)&&!n},e.prototype.handleDragEvent=function(t){this.ignoreNextSingleClick_=!1,this.willModifyFeatures_(t,this.dragSegments_);for(var n=[t.coordinate[0]+this.delta_[0],t.coordinate[1]+this.delta_[1]],i=[],a=[],o=0,s=this.dragSegments_.length;o<s;++o){var A=this.dragSegments_[o],l=A[0],u=l.feature;i.indexOf(u)===-1&&i.push(u);var h=l.geometry;a.indexOf(h)===-1&&a.push(h);for(var c=l.depth,f=void 0,d=l.segment,v=A[1];n.length<h.getStride();)n.push(d[v][n.length]);switch(h.getType()){case st.POINT:f=n,d[0]=n,d[1]=n;break;case st.MULTI_POINT:f=h.getCoordinates(),f[l.index]=n,d[0]=n,d[1]=n;break;case st.LINE_STRING:f=h.getCoordinates(),f[l.index+v]=n,d[v]=n;break;case st.MULTI_LINE_STRING:f=h.getCoordinates(),f[c[0]][l.index+v]=n,d[v]=n;break;case st.POLYGON:f=h.getCoordinates(),f[c[0]][l.index+v]=n,d[v]=n;break;case st.MULTI_POLYGON:f=h.getCoordinates(),f[c[1]][c[0]][l.index+v]=n,d[v]=n;break;case st.CIRCLE:if(d[0]=n,d[1]=n,l.index===pR)this.changingFeature_=!0,h.setCenter(n),this.changingFeature_=!1;else{this.changingFeature_=!0;var y=t.map.getView().getProjection(),m=NI(_n(h.getCenter()),_n(n)),w=Gh();if(w){var C=h.clone().transform(w,y);C.setRadius(m),m=C.transform(y,w).getRadius()}h.setRadius(m),this.changingFeature_=!1}break}f&&this.setGeometryCoordinates_(h,f)}this.createOrUpdateVertexFeature_(n,i,a)},e.prototype.handleDownEvent=function(t){if(!this.condition_(t))return!1;var n=t.coordinate;this.handlePointerAtPixel_(t.pixel,t.map,n),this.dragSegments_.length=0,this.featuresBeingModified_=null;var i=this.vertexFeature_;if(i){var a=t.map.getView().getProjection(),o=[],s=i.getGeometry().getCoordinates(),A=ki([s]),l=this.rBush_.getInExtent(A),u={};l.sort(Sz);for(var h=0,c=l.length;h<c;++h){var f=l[h],d=f.segment,v=pe(f.geometry),y=f.depth;if(y&&(v+="-"+y.join("-")),u[v]||(u[v]=new Array(2)),f.geometry.getType()===st.CIRCLE&&f.index===Jd){var m=gR(n,f,a);fs(m,s)&&!u[v][0]&&(this.dragSegments_.push([f,0]),u[v][0]=f);continue}if(fs(d[0],s)&&!u[v][0]){this.dragSegments_.push([f,0]),u[v][0]=f;continue}if(fs(d[1],s)&&!u[v][1]){if((f.geometry.getType()===st.LINE_STRING||f.geometry.getType()===st.MULTI_LINE_STRING)&&u[v][0]&&u[v][0].index===0)continue;this.dragSegments_.push([f,1]),u[v][1]=f;continue}pe(d)in this.vertexSegments_&&!u[v][0]&&!u[v][1]&&this.insertVertexCondition_(t)&&o.push(f)}o.length&&this.willModifyFeatures_(t,[o]);for(var w=o.length-1;w>=0;--w)this.insertVertex_(o[w],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()===st.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(Bh(o),s);var l=a,u=Gh();if(u){var h=t.map.getView().getProjection();l=l.clone().transform(u,h),l=tU(l).transform(h,u)}this.rBush_.update(l.getExtent(),A)}else this.rBush_.update(ki(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new sE(oE.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(D,W){return vR(o,D,s)-vR(o,W,s)},l,u;if(this.hitDetection_){var h=typeof this.hitDetection_=="object"?function(D){return D===a.hitDetection_}:void 0;n.forEachFeatureAtPixel(t,function(D,W,z){if(z=z||D.getGeometry(),z.getType()===st.POINT&&fi(a.features_.getArray(),D)){u=z;var tt=z.getFlatCoordinates().slice(0,2);l=[{feature:D,geometry:z,segment:[tt,tt]}]}return!0},{layerFilter:h})}if(!l){var c=Co(Bh(o,dR)),f=n.getView().getResolution()*this.pixelTolerance_,d=U_(Qa(c,f,dR));l=this.rBush_.getInExtent(d)}if(l&&l.length>0){var v=l.sort(A)[0],y=v.segment,m=gR(o,v,s),w=n.getPixelFromCoordinate(m),C=NI(t,w);if(u||C<=this.pixelTolerance_){var B={};if(B[pe(y)]=!0,this.snapToPointer_||(this.delta_[0]=m[0]-o[0],this.delta_[1]=m[1]-o[1]),v.geometry.getType()===st.CIRCLE&&v.index===Jd)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(m,[v.feature],[v.geometry]);else{var R=n.getPixelFromCoordinate(y[0]),O=n.getPixelFromCoordinate(y[1]),I=YA(w,R),T=YA(w,O);C=Math.sqrt(Math.min(I,T)),this.snappedToVertex_=C<=this.pixelTolerance_,this.snappedToVertex_&&(m=I>T?y[1]:y[0]),this.createOrUpdateVertexFeature_(m,[v.feature],[v.geometry]);var L={};L[pe(v.geometry)]=!0;for(var P=1,S=l.length;P<S;++P){var x=l[P].segment;if(fs(y[0],x[0])&&fs(y[1],x[1])||fs(y[0],x[1])&&fs(y[1],x[0])){var M=pe(l[P].geometry);M in L||(L[M]=!0,B[pe(x)]=!0)}else break}}this.vertexSegments_=B;return}}this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null)},e.prototype.insertVertex_=function(t,n){for(var i=t.segment,a=t.feature,o=t.geometry,s=t.depth,A=t.index,l;n.length<o.getStride();)n.push(0);switch(o.getType()){case st.MULTI_LINE_STRING:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case st.POLYGON:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case st.MULTI_POLYGON:l=o.getCoordinates(),l[s[1]][s[0]].splice(A+1,0,n);break;case st.LINE_STRING:l=o.getCoordinates(),l.splice(A+1,0,n);break;default:return}this.setGeometryCoordinates_(o,l);var u=this.rBush_;u.remove(t),this.updateSegmentIndices_(o,A,s,1);var h={segment:[i[0],n],feature:a,geometry:o,depth:s,index:A};u.insert(ki(h.segment),h),this.dragSegments_.push([h,1]);var c={segment:[n,i[1]],feature:a,geometry:o,depth:s,index:A+1};u.insert(ki(c.segment),c),this.dragSegments_.push([c,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=rr.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var n=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new sE(oE.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null,n}return!1},e.prototype.removeVertex_=function(){var t=this.dragSegments_,n={},i=!1,a,o,s,A,l,u,h,c,f,d,v;for(l=t.length-1;l>=0;--l)s=t[l],d=s[0],v=pe(d.feature),d.depth&&(v+="-"+d.depth.join("-")),v in n||(n[v]={}),s[1]===0?(n[v].right=d,n[v].index=d.index):s[1]==1&&(n[v].left=d,n[v].index=d.index+1);for(v in n){switch(f=n[v].right,h=n[v].left,u=n[v].index,c=u-1,h!==void 0?d=h:d=f,c<0&&(c=0),A=d.geometry,o=A.getCoordinates(),a=o,i=!1,A.getType()){case st.MULTI_LINE_STRING:o[d.depth[0]].length>2&&(o[d.depth[0]].splice(u,1),i=!0);break;case st.LINE_STRING:o.length>2&&(o.splice(u,1),i=!0);break;case st.MULTI_POLYGON:a=a[d.depth[1]];case st.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]),c=a.length-1));break}if(i){this.setGeometryCoordinates_(A,o);var y=[];if(h!==void 0&&(this.rBush_.remove(h),y.push(h.segment[0])),f!==void 0&&(this.rBush_.remove(f),y.push(f.segment[1])),h!==void 0&&f!==void 0){var m={depth:d.depth,feature:d.feature,geometry:d.geometry,index:c,segment:y};this.rBush_.insert(ki(m.segment),m)}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||ll(o.depth,i))&&o.index>n&&(o.index+=a)})},e}(So);function Sz(r,e){return r.index-e.index}function vR(r,e,t){var n=e.geometry;if(n.getType()===st.CIRCLE){var i=n;if(e.index===Jd){var a=Gh();a&&(i=i.clone().transform(a,t));var o=YA(i.getCenter(),_n(r)),s=Math.sqrt(o)-i.getRadius();return s*s}}var A=_n(r);return Lf[0]=_n(e.segment[0]),Lf[1]=_n(e.segment[1]),c$(A,Lf)}function gR(r,e,t){var n=e.geometry;if(n.getType()===st.CIRCLE&&e.index===Jd){var i=n,a=Gh();return a&&(i=i.clone().transform(a,t)),jf(i.getClosestPoint(_n(r)))}var o=_n(r);return Lf[0]=_n(e.segment[0]),Lf[1]=_n(e.segment[1]),jf(KS(o,Lf))}function bz(){var r=mb();return function(e,t){return r[st.POINT]}}var Bb=xz,PU=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={SELECT:"select"},Fz=function(r){PU(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}(oo),Fy={},Iz=function(r){PU(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:$_,n.addCondition_=i.addCondition?i.addCondition:mB,n.removeCondition_=i.removeCondition?i.removeCondition:mB,n.toggleCondition_=i.toggleCondition?i.toggleCondition:rg,n.multi_=i.multi?i.multi:!1,n.filter_=i.filter?i.filter:Js,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.style_=i.style!==void 0?i.style:Rz(),n.features_=i.features||new ti;var a;if(i.layers)if(typeof i.layers=="function")a=i.layers;else{var o=i.layers;a=function(s){return fi(o,s)}}else a=Js;return n.layerFilter_=a,n.featureLayerAssociation_={},n}return e.prototype.addFeatureLayerAssociation_=function(t,n){this.featureLayerAssociation_[pe(t)]=n},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[pe(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(Un.ADD,this.boundAddFeature_),this.features_.addEventListener(Un.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(Un.ADD,this.boundAddFeature_),this.features_.removeEventListener(Un.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 sA&&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=pe(t);n in Fy||(Fy[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=pe(t);t.setStyle(Fy[o]),delete Fy[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[pe(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){Xh(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,function(v,y){if(this.filter_(v,y))return this.addFeatureLayerAssociation_(v,y),u.push(v),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var h=A.getLength()-1;h>=0;--h){var c=A.item(h),f=u.indexOf(c);f>-1?u.splice(f,1):(A.remove(c),l.push(c))}u.length!==0&&A.extend(u)}else{s.forEachFeatureAtPixel(t.pixel,function(v,y){if(this.filter_(v,y))return(n||a)&&!fi(A.getArray(),v)?(this.addFeatureLayerAssociation_(v,y),u.push(v)):(i||a)&&fi(A.getArray(),v)&&(l.push(v),this.removeFeatureLayerAssociation_(v)),!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 Fz(Lz.SELECT,u,l,t)),!0},e}(cp);function Rz(){var r=mb();return Ur(r[st.POLYGON],r[st.LINE_STRING]),Ur(r[st.GEOMETRY_COLLECTION],r[st.LINE_STRING]),function(e){return e.getGeometry()?r[e.getGeometry().getType()]:null}}var Y_=Iz,Oz=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function yR(r){if(r.feature)return r.feature;if(r.element)return r.element}var AE=[],Mz=function(r){Oz(e,r);function e(t){var n=this,i=t||{},a=i;return a.handleDownEvent||(a.handleDownEvent=Js),a.stopDown||(a.stopDown=zh),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 Sm,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=pe(t),o=t.getGeometry();if(o){var s=this.GEOMETRY_SEGMENTERS_[o.getType()];if(s){this.indexedFeaturesExtents_[a]=o.getExtent(di());var A=[];if(s(A,o),A.length===1)this.rBush_.insert(ki(A[0]),{feature:t,segment:A[0]});else if(A.length>1){var l=A.map(function(h){return ki(h)}),u=A.map(function(h){return{feature:t,segment:h}});this.rBush_.load(l,u)}}}i&&(this.featureChangeListenerKeys_[a]=Pe(t,ye.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=yR(t);this.addFeature(n)},e.prototype.handleFeatureRemove_=function(t){var n=yR(t);this.removeFeature(n)},e.prototype.handleFeatureChange_=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=pe(n);i in this.pendingFeatures_||(this.pendingFeatures_[i]=n)}else this.updateFeature_(n)},e.prototype.handleUpEvent=function(t){var n=VS(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=pe(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&&(Rr(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(Rr),i.length=0,a.forEach(this.forEachFeatureRemove_.bind(this))),r.prototype.setMap.call(this,t),t&&(this.features_?i.push(Pe(this.features_,Un.ADD,this.handleFeatureAdd_,this),Pe(this.features_,Un.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(Pe(this.source_,Si.ADDFEATURE,this.handleFeatureAdd_,this),Pe(this.source_,Si.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=ki([a,o]),A=this.rBush_.getInExtent(s),l=A.length;if(l===0)return null;var u=i.getView().getProjection(),h=_n(n),c,f=1/0,d=this.pixelTolerance_*this.pixelTolerance_,v=function(){if(c){var P=i.getPixelFromCoordinate(c),S=YA(t,P);if(S<=d)return{vertex:c,vertexPixel:[Math.round(P[0]),Math.round(P[1])]}}return null};if(this.vertex_){for(var y=0;y<l;++y){var m=A[y];m.feature.getGeometry().getType()!==st.CIRCLE&&m.segment.forEach(function(P){var S=_n(P),x=YA(h,S);x<f&&(c=P,f=x)})}var w=v();if(w)return w}if(this.edge_){for(var y=0;y<l;++y){var C=null,m=A[y];if(m.feature.getGeometry().getType()===st.CIRCLE){var B=m.feature.getGeometry(),R=Gh();R&&(B=B.clone().transform(R,u)),C=jf(h$(h,B))}else{var O=m.segment,I=O[0],T=O[1];T&&(AE[0]=_n(I),AE[1]=_n(T),C=KS(h,AE))}if(C){var L=YA(h,C);L<f&&(c=C,f=L)}}var w=v();if(w)return w}return null},e.prototype.updateFeature_=function(t){this.removeFeature(t,!1),this.addFeature(t,!1)},e.prototype.segmentCircleGemetry_=function(t,n){this.getMap().getView().getProjection();for(var i=n,a=tU(i),o=a.getCoordinates()[0],s=0,A=o.length-1;s<A;++s)t.push(o.slice(s,s+2))},e.prototype.segmentGeometryCollectionGemetry_=function(t,n){for(var i=n.getGeometriesArray(),a=0;a<i.length;++a){var o=this.GEOMETRY_SEGMENTERS_[i[a].getType()];o&&o(t,i[a])}},e.prototype.segmentLineStringGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length-1;a<o;++a)t.push(i.slice(a,a+2))},e.prototype.segmentMultiLineStringGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A)t.push(s.slice(A,A+2))},e.prototype.segmentMultiPointGemetry_=function(t,n){n.getCoordinates().forEach(function(i){t.push([i])})},e.prototype.segmentMultiPolygonGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length;A<l;++A)for(var u=s[A],h=0,c=u.length-1;h<c;++h)t.push(u.slice(h,h+2))},e.prototype.segmentPointGemetry_=function(t,n){t.push([n.getCoordinates()])},e.prototype.segmentPolygonGemetry_=function(t,n){for(var i=n.getCoordinates(),a=0,o=i.length;a<o;++a)for(var s=i[a],A=0,l=s.length-1;A<l;++A)t.push(s.slice(A,A+2))},e}(So),Pz=Mz;function Nz(r){var e=r||{},t=new ti,n=new _K(-.005,.05,100),i=e.altShiftDragRotate!==void 0?e.altShiftDragRotate:!0;i&&t.push(new iK);var a=e.doubleClickZoom!==void 0?e.doubleClickZoom:!0;a&&t.push(new kj({delta:e.zoomDelta,duration:e.zoomDuration}));var o=e.dragPan!==void 0?e.dragPan:!0;o&&t.push(new eK({onFocusOnly:e.onFocusOnly,kinetic:n}));var s=e.pinchRotate!==void 0?e.pinchRotate:!0;s&&t.push(new xK);var A=e.pinchZoom!==void 0?e.pinchZoom:!0;A&&t.push(new LK({duration:e.zoomDuration}));var l=e.keyboard!==void 0?e.keyboard:!0;l&&(t.push(new dK),t.push(new yK({delta:e.zoomDelta,duration:e.zoomDuration})));var u=e.mouseWheelZoom!==void 0?e.mouseWheelZoom:!0;u&&t.push(new CK({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var h=e.shiftDragZoom!==void 0?e.shiftDragZoom:!0;return h&&t.push(new cK({duration:e.zoomDuration})),t}var Uz=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Dz=function(r){Uz(e,r);function e(t){return t=de({},t),t.controls||(t.controls=Nj()),t.interactions||(t.interactions=Nz({onFocusOnly:!0})),r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Q2(this)},e}(iU),z_=Dz;function dr(r,e=[]){let t=Ph(r);Object.keys(t).forEach(i=>{t[i]=t[i].value});const n=C_(On({},t));return ce(r,()=>{t=Ph(r),Object.keys(t).forEach(i=>{n[i]!=t[i].value&&!e.includes(i)&&(n[i]=t[i].value)})}),{properties:n}}var le=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t};const Qz={name:"ol-map",setup(r,{emit:e}){const{properties:t}=dr(r),n=Gi(null);let i=new z_(t);ce(t,()=>{i.setProperties(t)}),ir(()=>{i.setTarget(n.value)}),Ar(()=>{i.setTarget(null),i=null}),Gr("map",i);const a=()=>i.focus(),o=(c,f,d={})=>i.forEachFeatureAtPixel(c,f,d),s=(c,f,d)=>i.forEachLayerAtPixel(c,f,d),A=c=>i.getCoordinateFromPixel(c),l=()=>i.refresh(),u=()=>i.render(),h=()=>i.updateSize();return i.on("click",c=>e("click",c)),i.on("dblclick",c=>e("dblclick",c)),i.on("singleclick",c=>e("singleclick",c)),i.on("pointerdrag",c=>e("pointerdrag",c)),i.on("pointermove",c=>e("pointermove",c)),i.on("movestart",c=>e("movestart",c)),i.on("moveend",c=>e("moveend",c)),i.on("postrender",c=>e("postrender",c)),i.on("precompose",c=>e("precompose",c)),i.on("postcompose",c=>e("postcompose",c)),{map:i,mapRef:n,focus:a,forEachFeatureAtPixel:o,forEachLayerAtPixel:s,getCoordinateFromPixel:A,refresh:l,render:u,updateSize:h}},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 Hz(r,e,t,n,i,a){return Sn(),Ii("div",{ref:o=>n.mapRef=o},[wr(r.$slots,"default")],512)}var EB=le(Qz,[["render",Hz]]);function Gz(r,e){const t=Ce("map"),{properties:n}=dr(r),i=()=>xs(On({},n),{projection:typeof n.projection=="string"?n.projection:new ul(On({},n.projection))});let a=new Ks(i());ir(()=>{t.setView(a)}),a.on("change:center",()=>{e("centerChanged",R()),e("zoomChanged",nt())}),a.on("change:resolution",()=>e("resolutionChanged",D())),a.on("change:rotation",()=>e("rotationChanged",rt())),ce(n,()=>{let at=i();a.setProperties(at),a.applyOptions_(at)});const o=at=>a.adjustCenter(at),s=(at,Pt)=>a.adjustResolution(at,Pt),A=(at,Pt)=>a.adjustRotation(at,Pt),l=(at,Pt)=>a.adjustZoom(at,Pt),u=at=>a.animate(at),h=()=>a.beginInteraction(),c=at=>a.calculateExtent(at),f=()=>a.cancelAnimations(),d=(at,Pt,Ot)=>a.centerOn(at,Pt,Ot),v=()=>a.changed(),y=at=>a.dispatchEvent(at),m=(at,Pt,Ot)=>a.endInteraction(at,Pt,Ot),w=(at,Pt)=>a.fit(at,Pt),C=at=>a.get(at),B=()=>a.getAnimating(),R=()=>a.getCenter(),O=()=>a.getInteracting(),I=()=>a.getKeys(),T=()=>a.getMaxResolution(),L=()=>a.getMaxZoom(),P=()=>a.getMinResolution(),S=()=>a.getMinZoom(),x=()=>a.getProjection(),M=()=>a.getProperties(),D=()=>a.getResolution(),W=(at,Pt)=>a.getResolutionForExtent(at,Pt),z=at=>a.getResolutionForZoom(at),tt=()=>a.getResolutions(),q=()=>a.getRevision(),rt=()=>a.getRotation(),nt=()=>a.getZoom();return{view:a,adjustCenter:o,adjustResolution:s,adjustRotation:A,adjustZoom:l,animate:u,beginInteraction:h,calculateExtent:c,cancelAnimations:f,centerOn:d,changed:v,dispatchEvent:y,endInteraction:m,fit:w,get:C,getAnimating:B,getCenter:R,getInteracting:O,getKeys:I,getMaxResolution:T,getMaxZoom:L,getMinResolution:P,getMinZoom:S,getProjection:x,getProperties:M,getResolution:D,getResolutionForExtent:W,getResolutionForZoom:z,getResolutions:tt,getRevision:q,getRotation:rt,getZoom:nt,getZoomForResolution:at=>a.getZoomForResolution(at),setCenter:at=>a.setCenter(at),setConstrainResolution:at=>a.setConstrainResolution(at),setMaxZoom:at=>a.setMaxZoom(at),setMinZoom:at=>a.setMinZoom(at),setResolution:at=>a.setResolution(at),setRotation:at=>a.setRotation(at),setZoom:at=>a.setZoom(at)}}const kz={name:"ol-view",setup(r,{emit:e}){const t=Gz(r,e);return On({},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 $z(r,e,t,n,i,a){return Er("",!0)}var CB=le(kz,[["render",$z]]);const Vz={name:"ol-feature",setup(r){const e=Ce("vectorSource"),t=Ce("vectorLayer"),n=Ce("animation",null),{properties:i}=dr(r);let a=pr(()=>new nr(On({},i.properties)));return ce(a,(o,s)=>{e.value.removeFeature(s),e.value.addFeature(o),e.value.changed()}),ce(e,(o,s)=>{s.removeFeature(a.value),o.addFeature(a.value),o.changed()}),ir(()=>{e.value.addFeature(a.value),n!=null&&t.value.animateFeature(a.value,n.value)}),Ar(()=>{e.value.removeFeature(a.value)}),Gr("feature",a),Gr("stylable",a),{feature:a}},props:{properties:{type:[D_,Object,Array]}}};function jz(r,e,t,n,i,a){return wr(r.$slots,"default")}var BB=le(Vz,[["render",jz]]);function Kz(r,e){const t=Ce("map"),n=Gi(null),{properties:i}=dr(r);let a=pr(()=>new lU(i));ir(()=>{t.addOverlay(a.value)}),Ar(()=>{t.removeOverlay(a.value)}),ce(a,(v,y)=>{t.removeOverlay(y),t.addOverlay(v)}),BG(()=>{h(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=v=>a.value.panIntoView(v),h=v=>a.value.setElement(v);return{overlay:a,htmlContent:n,getOffset:s,getPosition:A,getPositioning:l,panIntoView:u,setElement:h,setOffset:v=>a.value.setOffset(v),setPosition:v=>a.value.setPosition(v),setPositioning:v=>a.value.setPositioning(v)}}const Yz={name:"ol-overlay",setup(r,{emit:e}){const t=new Kz(r,e);return On({},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}}},zz={ref:"htmlContent"};function Xz(r,e,t,n,i,a){return Sn(),Ii("div",zz,[wr(r.$slots,"default",{position:t.position})],512)}var TB=le(Yz,[["render",Xz]]),NU=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)}}(),Ln={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},Wz=function(r){NU(e,r);function e(t){var n=r.call(this,ye.ERROR)||this;return n.code=t.code,n.message=t.message,n}return e}(oo),qz=function(r){NU(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_=N_,n.watchId_=void 0,n.addChangeListener(Ln.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(Ln.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_=Hh(Ie("EPSG:4326"),t),this.position_&&this.set(Ln.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(Ln.ACCURACY,n.accuracy),this.set(Ln.ALTITUDE,n.altitude===null?void 0:n.altitude),this.set(Ln.ALTITUDE_ACCURACY,n.altitudeAccuracy===null?void 0:n.altitudeAccuracy),this.set(Ln.HEADING,n.heading===null?void 0:lu(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(Ln.POSITION,i),this.set(Ln.SPEED,n.speed===null?void 0:n.speed);var a=YV(this.position_,n.accuracy);a.applyTransform(this.transform_),this.set(Ln.ACCURACY_GEOMETRY,a),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Wz(t))},e.prototype.getAccuracy=function(){return this.get(Ln.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(Ln.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(Ln.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(Ln.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(Ln.HEADING)},e.prototype.getPosition=function(){return this.get(Ln.POSITION)},e.prototype.getProjection=function(){return this.get(Ln.PROJECTION)},e.prototype.getSpeed=function(){return this.get(Ln.SPEED)},e.prototype.getTracking=function(){return this.get(Ln.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(Ln.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(Ln.PROJECTION,Ie(t))},e.prototype.setTracking=function(t){this.set(Ln.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(Ln.TRACKING_OPTIONS,t)},e}(ni),Zz=qz;const Jz={name:"ol-geolocation",emits:["positionChanged","speedChanged","headingChanged","altitudeChanged","altitudeAccuracyChanged","accuracyGeometryChanged"],setup(r,{emit:e}){const{properties:t}=dr(r);let n=pr(()=>{let c=new Zz(t);return c.on("change",h),c});const i=Gi([]),a=Gi(0),o=Gi(0),s=Gi(0),A=Gi(0),l=Gi(0),u=Gi({});ce(i,()=>{e("positionChanged",i.value)}),ce(A,()=>{e("speedChanged",A.value)}),ce(l,()=>{e("headingChanged",l.value)}),ce(o,()=>{e("altitudeChanged",o.value)}),ce(s,()=>{e("altitudeAccuracyChanged",s.value)}),ce(u,()=>{e("accuracyGeometryChanged",u.value)});const h=()=>{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 ce(n,(c,f)=>{f.un("change",h),c.on("change",h)}),{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 tX(r,e,t,n,i,a){return wr(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 xB=le(Jz,[["render",tX]]);function eX(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 kh=1,$h=2,R0=3,rX=4,SB=5,mR=6378137,nX=6356752314e-3,_R=.0066943799901413165,tv=484813681109536e-20,Yt=Math.PI/2,iX=.16666666666666666,aX=.04722222222222222,oX=.022156084656084655,ne=1e-10,Wi=.017453292519943295,Xs=57.29577951308232,Yr=Math.PI/4,Iv=Math.PI*2,zn=3.14159265359,so={};so.greenwich=0;so.lisbon=-9.131906111111;so.paris=2.337229166667;so.bogota=-74.080916666667;so.madrid=-3.687938888889;so.rome=12.452333333333;so.bern=7.439583333333;so.jakarta=106.807719444444;so.ferro=-17.666666666667;so.brussels=4.367975;so.stockholm=18.058277777778;so.athens=23.7163375;so.oslo=10.722916666667;var sX={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},wR=/[\s_\-\/\(\)]/g;function Cu(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace(wR,""),i=-1,a,o;++i<t.length;)if(a=t[i],o=a.toLowerCase().replace(wR,""),o===n)return r[a]}function bB(r){var e={},t=r.split("+").map(function(s){return s.trim()}).filter(function(s){return s}).reduce(function(s,A){var l=A.split("=");return l.push(!0),s[l[0].toLowerCase()]=l[1],s},{}),n,i,a,o={proj:"projName",datum:"datumCode",rf:function(s){e.rf=parseFloat(s)},lat_0:function(s){e.lat0=s*Wi},lat_1:function(s){e.lat1=s*Wi},lat_2:function(s){e.lat2=s*Wi},lat_ts:function(s){e.lat_ts=s*Wi},lon_0:function(s){e.long0=s*Wi},lon_1:function(s){e.long1=s*Wi},lon_2:function(s){e.long2=s*Wi},alpha:function(s){e.alpha=parseFloat(s)*Wi},gamma:function(s){e.rectified_grid_angle=parseFloat(s)},lonc:function(s){e.longc=s*Wi},x_0:function(s){e.x0=parseFloat(s)},y_0:function(s){e.y0=parseFloat(s)},k_0:function(s){e.k0=parseFloat(s)},k:function(s){e.k0=parseFloat(s)},a:function(s){e.a=parseFloat(s)},b:function(s){e.b=parseFloat(s)},r_a:function(){e.R_A=!0},zone:function(s){e.zone=parseInt(s,10)},south:function(){e.utmSouth=!0},towgs84:function(s){e.datum_params=s.split(",").map(function(A){return parseFloat(A)})},to_meter:function(s){e.to_meter=parseFloat(s)},units:function(s){e.units=s;var A=Cu(sX,s);A&&(e.to_meter=A.to_meter)},from_greenwich:function(s){e.from_greenwich=s*Wi},pm:function(s){var A=Cu(so,s);e.from_greenwich=(A||parseFloat(s))*Wi},nadgrids:function(s){s==="@null"?e.datumCode="none":e.nadgrids=s},axis:function(s){var A="ewnsud";s.length===3&&A.indexOf(s.substr(0,1))!==-1&&A.indexOf(s.substr(1,1))!==-1&&A.indexOf(s.substr(2,1))!==-1&&(e.axis=s)},approx:function(){e.approx=!0}};for(n in t)i=t[n],n in o?(a=o[n],typeof a=="function"?a(i):e[a]=i):e[n]=i;return typeof e.datumCode=="string"&&e.datumCode!=="WGS84"&&(e.datumCode=e.datumCode.toLowerCase()),e}var Rv=1,UU=2,DU=3,bm=4,QU=5,Tb=-1,AX=/\s/,lX=/[A-Za-z]/,uX=/[A-Za-z84_]/,X_=/[,\]]/,HU=/[\d\.E\-\+]/;function cl(r){if(typeof r!="string")throw new Error("not a string");this.text=r.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Rv}cl.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==bm)for(;AX.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case Rv:return this.neutral(r);case UU:return this.keyword(r);case bm:return this.quoted(r);case QU:return this.afterquote(r);case DU:return this.number(r);case Tb:return}};cl.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=bm;return}if(X_.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)};cl.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Rv;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Rv,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Tb);return}};cl.prototype.number=function(r){if(HU.test(r)){this.word+=r;return}if(X_.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)};cl.prototype.quoted=function(r){if(r==='"'){this.state=QU;return}this.word+=r};cl.prototype.keyword=function(r){if(uX.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=Rv;return}if(X_.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)};cl.prototype.neutral=function(r){if(lX.test(r)){this.word=r,this.state=UU;return}if(r==='"'){this.word="",this.state=bm;return}if(HU.test(r)){this.word=r,this.state=DU;return}if(X_.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)};cl.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Tb)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function hX(r){var e=new cl(r);return e.output()}function ER(r,e,t){Array.isArray(e)&&(t.unshift(e),e=null);var n=e?{}:r,i=t.reduce(function(a,o){return vf(o,a),a},n);e&&(r[e]=i)}function vf(r,e){if(!Array.isArray(r)){e[r]=!0;return}var t=r.shift();if(t==="PARAMETER"&&(t=r.shift()),r.length===1){if(Array.isArray(r[0])){e[t]={},vf(r[0],e[t]);return}e[t]=r[0];return}if(!r.length){e[t]=!0;return}if(t==="TOWGS84"){e[t]=r;return}if(t==="AXIS"){t in e||(e[t]=[]),e[t].push(r);return}Array.isArray(t)||(e[t]={});var n;switch(t){case"UNIT":case"PRIMEM":case"VERT_DATUM":e[t]={name:r[0].toLowerCase(),convert:r[1]},r.length===3&&vf(r[2],e[t]);return;case"SPHEROID":case"ELLIPSOID":e[t]={name:r[0],a:r[1],rf:r[2]},r.length===4&&vf(r[3],e[t]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":r[0]=["name",r[0]],ER(e,t,r);return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return vf(r,e[t]);return ER(e,t,r)}}var cX=.017453292519943295;function fX(r,e){var t=e[0],n=e[1];!(t in r)&&n in r&&(r[t]=r[n],e.length===3&&(r[t]=e[2](r[t])))}function FA(r){return r*cX}function pX(r){if(r.type==="GEOGCS"?r.projName="longlat":r.type==="LOCAL_CS"?(r.projName="identity",r.local=!0):typeof r.PROJECTION=="object"?r.projName=Object.keys(r.PROJECTION)[0]:r.projName=r.PROJECTION,r.AXIS){for(var e="",t=0,n=r.AXIS.length;t<n;++t){var i=[r.AXIS[t][0].toLowerCase(),r.AXIS[t][1].toLowerCase()];i[0].indexOf("north")!==-1||(i[0]==="y"||i[0]==="lat")&&i[1]==="north"?e+="n":i[0].indexOf("south")!==-1||(i[0]==="y"||i[0]==="lat")&&i[1]==="south"?e+="s":i[0].indexOf("east")!==-1||(i[0]==="x"||i[0]==="lon")&&i[1]==="east"?e+="e":(i[0].indexOf("west")!==-1||(i[0]==="x"||i[0]==="lon")&&i[1]==="west")&&(e+="w")}e.length===2&&(e+="u"),e.length===3&&(r.axis=e)}r.UNIT&&(r.units=r.UNIT.name.toLowerCase(),r.units==="metre"&&(r.units="meter"),r.UNIT.convert&&(r.type==="GEOGCS"?r.DATUM&&r.DATUM.SPHEROID&&(r.to_meter=r.UNIT.convert*r.DATUM.SPHEROID.a):r.to_meter=r.UNIT.convert));var a=r.GEOGCS;r.type==="GEOGCS"&&(a=r),a&&(a.DATUM?r.datumCode=a.DATUM.name.toLowerCase():r.datumCode=a.name.toLowerCase(),r.datumCode.slice(0,2)==="d_"&&(r.datumCode=r.datumCode.slice(2)),(r.datumCode==="new_zealand_geodetic_datum_1949"||r.datumCode==="new_zealand_1949")&&(r.datumCode="nzgd49"),(r.datumCode==="wgs_1984"||r.datumCode==="world_geodetic_system_1984")&&(r.PROJECTION==="Mercator_Auxiliary_Sphere"&&(r.sphere=!0),r.datumCode="wgs84"),r.datumCode.slice(-6)==="_ferro"&&(r.datumCode=r.datumCode.slice(0,-6)),r.datumCode.slice(-8)==="_jakarta"&&(r.datumCode=r.datumCode.slice(0,-8)),~r.datumCode.indexOf("belge")&&(r.datumCode="rnb72"),a.DATUM&&a.DATUM.SPHEROID&&(r.ellps=a.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),r.ellps.toLowerCase().slice(0,13)==="international"&&(r.ellps="intl"),r.a=a.DATUM.SPHEROID.a,r.rf=parseFloat(a.DATUM.SPHEROID.rf,10)),a.DATUM&&a.DATUM.TOWGS84&&(r.datum_params=a.DATUM.TOWGS84),~r.datumCode.indexOf("osgb_1936")&&(r.datumCode="osgb36"),~r.datumCode.indexOf("osni_1952")&&(r.datumCode="osni52"),(~r.datumCode.indexOf("tm65")||~r.datumCode.indexOf("geodetic_datum_of_1965"))&&(r.datumCode="ire65"),r.datumCode==="ch1903+"&&(r.datumCode="ch1903"),~r.datumCode.indexOf("israel")&&(r.datumCode="isr93")),r.b&&!isFinite(r.b)&&(r.b=r.a);function o(l){var u=r.to_meter||1;return l*u}var s=function(l){return fX(r,l)},A=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",FA],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",FA],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",FA],["lat0","latitude_of_origin",FA],["lat0","standard_parallel_1",FA],["lat1","standard_parallel_1",FA],["lat2","standard_parallel_2",FA],["azimuth","Azimuth"],["alpha","azimuth",FA],["srsCode","name"]];A.forEach(s),!r.long0&&r.longc&&(r.projName==="Albers_Conic_Equal_Area"||r.projName==="Lambert_Azimuthal_Equal_Area")&&(r.long0=r.longc),!r.lat_ts&&r.lat1&&(r.projName==="Stereographic_South_Pole"||r.projName==="Polar Stereographic (variant B)")&&(r.lat0=FA(r.lat1>0?90:-90),r.lat_ts=r.lat1)}function GU(r){var e=hX(r),t=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",t]);var i={};return vf(e,i),pX(i),i}function Fa(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Fa[r]=bB(arguments[1]):Fa[r]=GU(arguments[1]):Fa[r]=t}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Fa.apply(e,n):Fa(n)});if(typeof r=="string"){if(r in Fa)return Fa[r]}else"EPSG"in r?Fa["EPSG:"+r.EPSG]=r:"ESRI"in r?Fa["ESRI:"+r.ESRI]=r:"IAU2000"in r?Fa["IAU2000:"+r.IAU2000]=r:console.log(r);return}}eX(Fa);function dX(r){return typeof r=="string"}function vX(r){return r in Fa}var gX=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function yX(r){return gX.some(function(e){return r.indexOf(e)>-1})}var mX=["3857","900913","3785","102113"];function _X(r){var e=Cu(r,"authority");if(e){var t=Cu(e,"epsg");return t&&mX.indexOf(t)>-1}}function wX(r){var e=Cu(r,"extension");if(e)return Cu(e,"proj4")}function EX(r){return r[0]==="+"}function CX(r){if(dX(r)){if(vX(r))return Fa[r];if(yX(r)){var e=GU(r);if(_X(e))return Fa["EPSG:3857"];var t=wX(e);return t?bB(t):e}if(EX(r))return bB(r)}else return r}function CR(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 aA(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function sg(r){return r<0?-1:1}function fe(r){return Math.abs(r)<=zn?r:r-sg(r)*Iv}function _s(r,e,t){var n=r*t,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(Yt-e))/n}function Ov(r,e){for(var t=.5*r,n,i,a=Yt-2*Math.atan(e),o=0;o<=15;o++)if(n=r*Math.sin(a),i=Yt-2*Math.atan(e*Math.pow((1-n)/(1+n),t))-a,a+=i,Math.abs(i)<=1e-10)return a;return-9999}function BX(){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=aA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function TX(r){var e=r.x,t=r.y;if(t*Xs>90&&t*Xs<-90&&e*Xs>180&&e*Xs<-180)return null;var n,i;if(Math.abs(Math.abs(t)-Yt)<=ne)return null;if(this.sphere)n=this.x0+this.a*this.k0*fe(e-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(Yr+.5*t));else{var a=Math.sin(t),o=_s(this.e,t,a);n=this.x0+this.a*this.k0*fe(e-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return r.x=n,r.y=i,r}function xX(r){var e=r.x-this.x0,t=r.y-this.y0,n,i;if(this.sphere)i=Yt-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(i=Ov(this.e,a),i===-9999)return null}return n=fe(this.long0+e/(this.a*this.k0)),r.x=n,r.y=i,r}var SX=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],bX={init:BX,forward:TX,inverse:xX,names:SX};function LX(){}function BR(r){return r}var FX=["longlat","identity"],IX={init:LX,forward:BR,inverse:BR,names:FX},RX=[bX,IX],O0={},Lm=[];function kU(r,e){var t=Lm.length;return r.names?(Lm[t]=r,r.names.forEach(function(n){O0[n.toLowerCase()]=t}),this):(console.log(e),!0)}function OX(r){if(!r)return!1;var e=r.toLowerCase();if(typeof O0[e]<"u"&&Lm[O0[e]])return Lm[O0[e]]}function MX(){RX.forEach(kU)}var PX={start:MX,add:kU,get:OX},Ke={};Ke.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Ke.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Ke.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Ke.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Ke.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Ke.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Ke.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Ke.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Ke.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Ke.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Ke.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Ke.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Ke.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Ke.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Ke.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Ke.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Ke.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Ke.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Ke.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Ke.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Ke.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Ke.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Ke.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Ke.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Ke.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Ke.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Ke.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Ke.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Ke.hough={a:6378270,rf:297,ellipseName:"Hough"};Ke.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Ke.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Ke.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Ke.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Ke.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Ke.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Ke.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Ke.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Ke.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Ke.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Ke.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Ke.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var NX=Ke.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ke.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function UX(r,e,t,n){var i=r*r,a=e*e,o=(i-a)/i,s=0;n?(r*=1-o*(iX+o*(aX+o*oX)),i=r*r,o=0):s=Math.sqrt(o);var A=(i-a)/a;return{es:o,e:s,ep2:A}}function DX(r,e,t,n,i){if(!r){var a=Cu(Ke,n);a||(a=NX),r=a.a,e=a.b,t=a.rf}return t&&!e&&(e=(1-1/t)*r),(t===0||Math.abs(r-e)<ne)&&(i=!0,e=r),{a:r,b:e,rf:t,sphere:i}}var gi={};gi.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};gi.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};gi.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};gi.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};gi.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};gi.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};gi.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};gi.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};gi.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};gi.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};gi.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};gi.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};gi.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};gi.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};gi.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};gi.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};gi.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function QX(r,e,t,n,i,a,o){var s={};return r===void 0||r==="none"?s.datum_type=SB:s.datum_type=rX,e&&(s.datum_params=e.map(parseFloat),(s.datum_params[0]!==0||s.datum_params[1]!==0||s.datum_params[2]!==0)&&(s.datum_type=kh),s.datum_params.length>3&&(s.datum_params[3]!==0||s.datum_params[4]!==0||s.datum_params[5]!==0||s.datum_params[6]!==0)&&(s.datum_type=$h,s.datum_params[3]*=tv,s.datum_params[4]*=tv,s.datum_params[5]*=tv,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=R0,s.grids=o),s.a=t,s.b=n,s.es=i,s.ep2=a,s}var $U={};function HX(r,e){var t=new DataView(e),n=$X(t),i=VX(t,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=jX(t,i,n),o={header:i,subgrids:a};return $U[r]=o,o}function GX(r){if(r===void 0)return null;var e=r.split(",");return e.map(kX)}function kX(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:$U[r]||null,isNull:!1}}function gf(r){return r/3600*Math.PI/180}function $X(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 VX(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:LB(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 LB(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function jX(r,e,t){for(var n=176,i=[],a=0;a<e.nSubgrids;a++){var o=YX(r,n,t),s=zX(r,n,o,t),A=Math.round(1+(o.upperLongitude-o.lowerLongitude)/o.longitudeInterval),l=Math.round(1+(o.upperLatitude-o.lowerLatitude)/o.latitudeInterval);i.push({ll:[gf(o.lowerLongitude),gf(o.lowerLatitude)],del:[gf(o.longitudeInterval),gf(o.latitudeInterval)],lim:[A,l],count:o.gridNodeCount,cvs:KX(s)})}return i}function KX(r){return r.map(function(e){return[gf(e.longitudeShift),gf(e.latitudeShift)]})}function YX(r,e,t){return{name:LB(r,e+8,e+16).trim(),parent:LB(r,e+24,e+24+8).trim(),lowerLatitude:r.getFloat64(e+72,t),upperLatitude:r.getFloat64(e+88,t),lowerLongitude:r.getFloat64(e+104,t),upperLongitude:r.getFloat64(e+120,t),latitudeInterval:r.getFloat64(e+136,t),longitudeInterval:r.getFloat64(e+152,t),gridNodeCount:r.getInt32(e+168,t)}}function zX(r,e,t,n){for(var i=e+176,a=16,o=[],s=0;s<t.gridNodeCount;s++){var A={latitudeShift:r.getFloat32(i+s*a,n),longitudeShift:r.getFloat32(i+s*a+4,n),latitudeAccuracy:r.getFloat32(i+s*a+8,n),longitudeAccuracy:r.getFloat32(i+s*a+12,n)};o.push(A)}return o}function tA(r,e){if(!(this instanceof tA))return new tA(r);e=e||function(l){if(l)throw l};var t=CX(r);if(typeof t!="object"){e(r);return}var n=tA.projections.get(t.projName);if(!n){e(r);return}if(t.datumCode&&t.datumCode!=="none"){var i=Cu(gi,t.datumCode);i&&(t.datum_params=t.datum_params||(i.towgs84?i.towgs84.split(","):null),t.ellps=i.ellipse,t.datumName=i.datumName?i.datumName:t.datumCode)}t.k0=t.k0||1,t.axis=t.axis||"enu",t.ellps=t.ellps||"wgs84",t.lat1=t.lat1||t.lat0;var a=DX(t.a,t.b,t.rf,t.ellps,t.sphere),o=UX(a.a,a.b,a.rf,t.R_A),s=GX(t.nadgrids),A=t.datum||QX(t.datumCode,t.datum_params,a.a,a.b,o.es,o.ep2,s);CR(this,t),CR(this,n),this.a=a.a,this.b=a.b,this.rf=a.rf,this.sphere=a.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=A,this.init(),e(null,this)}tA.projections=PX;tA.projections.start();function XX(r,e){return r.datum_type!==e.datum_type||r.a!==e.a||Math.abs(r.es-e.es)>5e-11?!1:r.datum_type===kh?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===$h?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 VU(r,e,t){var n=r.x,i=r.y,a=r.z?r.z:0,o,s,A,l;if(i<-Yt&&i>-1.001*Yt)i=-Yt;else if(i>Yt&&i<1.001*Yt)i=Yt;else{if(i<-Yt)return{x:-1/0,y:-1/0,z:r.z};if(i>Yt)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 jU(r,e,t,n){var i=1e-12,a=i*i,o=30,s,A,l,u,h,c,f,d,v,y,m,w,C,B=r.x,R=r.y,O=r.z?r.z:0,I,T,L;if(s=Math.sqrt(B*B+R*R),A=Math.sqrt(B*B+R*R+O*O),s/t<i){if(I=0,A/t<i)return T=Yt,L=-n,{x:r.x,y:r.y,z:r.z}}else I=Math.atan2(R,B);l=O/A,u=s/A,h=1/Math.sqrt(1-e*(2-e)*u*u),d=u*(1-e)*h,v=l*h,C=0;do C++,f=t/Math.sqrt(1-e*v*v),L=s*d+O*v-f*(1-e*v*v),c=e*f/(f+L),h=1/Math.sqrt(1-c*(2-c)*u*u),y=u*(1-c)*h,m=l*h,w=m*d-y*v,d=y,v=m;while(w*w>a&&C<o);return T=Math.atan(m/Math.abs(y)),{x:I,y:T,z:L}}function WX(r,e,t){if(e===kh)return{x:r.x+t[0],y:r.y+t[1],z:r.z+t[2]};if(e===$h){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],A=t[5],l=t[6];return{x:l*(r.x-A*r.y+s*r.z)+n,y:l*(A*r.x+r.y-o*r.z)+i,z:l*(-s*r.x+o*r.y+r.z)+a}}}function qX(r,e,t){if(e===kh)return{x:r.x-t[0],y:r.y-t[1],z:r.z-t[2]};if(e===$h){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],A=t[5],l=t[6],u=(r.x-n)/l,h=(r.y-i)/l,c=(r.z-a)/l;return{x:u+A*h-s*c,y:-A*u+h+o*c,z:s*u-o*h+c}}}function Iy(r){return r===kh||r===$h}function ZX(r,e,t){if(XX(r,e)||r.datum_type===SB||e.datum_type===SB)return t;var n=r.a,i=r.es;if(r.datum_type===R0){var a=TR(r,!1,t);if(a!==0)return;n=mR,i=_R}var o=e.a,s=e.b,A=e.es;if(e.datum_type===R0&&(o=mR,s=nX,A=_R),i===A&&n===o&&!Iy(r.datum_type)&&!Iy(e.datum_type))return t;if(t=VU(t,i,n),Iy(r.datum_type)&&(t=WX(t,r.datum_type,r.datum_params)),Iy(e.datum_type)&&(t=qX(t,e.datum_type,e.datum_params)),t=jU(t,A,o,s),e.datum_type===R0){var l=TR(e,!0,t);if(l!==0)return}return t}function TR(r,e,t){if(r.grids===null||r.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var n={x:-t.x,y:t.y},i={x:Number.NaN,y:Number.NaN},a=[],o=0;o<r.grids.length;o++){var s=r.grids[o];if(a.push(s.name),s.isNull){i=n;break}if(s.grid===null){if(s.mandatory)return console.log("Unable to find mandatory grid '"+s.name+"'"),-1;continue}var A=s.grid.subgrids[0],l=(Math.abs(A.del[1])+Math.abs(A.del[0]))/1e4,u=A.ll[0]-l,h=A.ll[1]-l,c=A.ll[0]+(A.lim[0]-1)*A.del[0]+l,f=A.ll[1]+(A.lim[1]-1)*A.del[1]+l;if(!(h>n.y||u>n.x||f<n.y||c<n.x)&&(i=JX(n,e,A),!isNaN(i.x)))break}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*Xs+" "+n.y*Xs+" tried: '"+a+"'"),-1):(t.x=-i.x,t.y=i.y,0)}function JX(r,e,t){var n={x:Number.NaN,y:Number.NaN};if(isNaN(r.x))return n;var i={x:r.x,y:r.y};i.x-=t.ll[0],i.y-=t.ll[1],i.x=fe(i.x-Math.PI)+Math.PI;var a=xR(i,t);if(e){if(isNaN(a.x))return n;a.x=i.x-a.x,a.y=i.y-a.y;var o=9,s=1e-12,A,l;do{if(l=xR(a,t),isNaN(l.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}A={x:i.x-(l.x+a.x),y:i.y-(l.y+a.y)},a.x+=A.x,a.y+=A.y}while(o--&&Math.abs(A.x)>s&&Math.abs(A.y)>s);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=fe(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 xR(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]},h=i.x*i.y,c=i.x*(1-i.y),f=(1-i.x)*(1-i.y),d=(1-i.x)*i.y;return a.x=f*s.x+c*A.x+d*u.x+h*l.x,a.y=f*s.y+c*A.y+d*u.y+h*l.y,a}function SR(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 KU(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 tW(r){bR(r.x),bR(r.y)}function bR(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 eW(r,e){return(r.datum.datum_type===kh||r.datum.datum_type===$h)&&e.datumCode!=="WGS84"||(e.datum.datum_type===kh||e.datum.datum_type===$h)&&r.datumCode!=="WGS84"}function Fm(r,e,t,n){var i;if(Array.isArray(t)&&(t=KU(t)),tW(t),r.datum&&e.datum&&eW(r,e)&&(i=new tA("WGS84"),t=Fm(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=SR(r,!1,t)),r.projName==="longlat")t={x:t.x*Wi,y:t.y*Wi,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=ZX(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*Xs,y:t.y*Xs,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"?SR(e,!0,t):t}var LR=tA("WGS84");function lE(r,e,t,n){var i,a,o;return Array.isArray(t)?(i=Fm(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=Fm(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 FR(r){return r instanceof tA?r:r.oProj?r.oProj:tA(r)}function io(r,e,t){r=FR(r);var n=!1,i;return typeof e>"u"?(e=r,r=LR,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=LR,n=!0),e=FR(e),t?lE(r,e,t):(i={forward:function(a,o){return lE(r,e,a,o)},inverse:function(a,o){return lE(e,r,a,o)}},n&&(i.oProj=e),i)}var IR=6,YU="AJSAJS",zU="AFAFAF",yf=65,Wa=73,Do=79,Rd=86,Od=90,rW={forward:XU,inverse:nW,toPoint:WU};function XU(r,e){return e=e||5,oW(iW({lat:r[1],lon:r[0]}),e)}function nW(r){var e=xb(ZU(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function WU(r){var e=xb(ZU(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function uE(r){return r*(Math.PI/180)}function RR(r){return 180*(r/Math.PI)}function iW(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,a=.9996,o,s,A,l,u,h,c,f=uE(e),d=uE(t),v,y;y=Math.floor((t+180)/6)+1,t===180&&(y=60),e>=56&&e<64&&t>=3&&t<12&&(y=32),e>=72&&e<84&&(t>=0&&t<9?y=31:t>=9&&t<21?y=33:t>=21&&t<33?y=35:t>=33&&t<42&&(y=37)),o=(y-1)*6-180+3,v=uE(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),h=Math.cos(f)*(d-v),c=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 m=a*A*(h+(1-l+u)*h*h*h/6+(5-18*l+l*l+72*u-58*s)*h*h*h*h*h/120)+5e5,w=a*(c+A*Math.tan(f)*(h*h/2+(5-l+9*u+4*u*u)*h*h*h*h/24+(61-58*l+l*l+600*u-330*s)*h*h*h*h*h*h/720));return e<0&&(w+=1e7),{northing:Math.round(w),easting:Math.round(m),zoneNumber:y,zoneLetter:aW(e)}}function xb(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,h,c,f,d,v,y,m,w,C=t-5e5,B=e;n<"N"&&(B-=1e7),y=(i-1)*6-180+3,A=s/(1-s),v=B/a,m=v/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),w=m+(3*l/2-27*l*l*l/32)*Math.sin(2*m)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*m)+151*l*l*l/96*Math.sin(6*m),u=o/Math.sqrt(1-s*Math.sin(w)*Math.sin(w)),h=Math.tan(w)*Math.tan(w),c=A*Math.cos(w)*Math.cos(w),f=o*(1-s)/Math.pow(1-s*Math.sin(w)*Math.sin(w),1.5),d=C/(u*a);var R=w-u*Math.tan(w)/f*(d*d/2-(5+3*h+10*c-4*c*c-9*A)*d*d*d*d/24+(61+90*h+298*c+45*h*h-252*A-3*c*c)*d*d*d*d*d*d/720);R=RR(R);var O=(d-(1+2*h+c)*d*d*d/6+(5-2*c+28*h-3*c*c+8*A+24*h*h)*d*d*d*d*d/120)/Math.cos(w);O=y+RR(O);var I;if(r.accuracy){var T=xb({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});I={top:T.lat,right:T.lon,bottom:R,left:O}}else I={lat:R,lon:O};return I}function aW(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 oW(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+sW(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function sW(r,e,t){var n=qU(t),i=Math.floor(r/1e5),a=Math.floor(e/1e5)%20;return AW(i,a,n)}function qU(r){var e=r%IR;return e===0&&(e=IR),e}function AW(r,e,t){var n=t-1,i=YU.charCodeAt(n),a=zU.charCodeAt(n),o=i+r-1,s=a+e,A=!1;o>Od&&(o=o-Od+yf-1,A=!0),(o===Wa||i<Wa&&o>Wa||(o>Wa||i<Wa)&&A)&&o++,(o===Do||i<Do&&o>Do||(o>Do||i<Do)&&A)&&(o++,o===Wa&&o++),o>Od&&(o=o-Od+yf-1),s>Rd?(s=s-Rd+yf-1,A=!0):A=!1,(s===Wa||a<Wa&&s>Wa||(s>Wa||a<Wa)&&A)&&s++,(s===Do||a<Do&&s>Do||(s>Do||a<Do)&&A)&&(s++,s===Wa&&s++),s>Rd&&(s=s-Rd+yf-1);var l=String.fromCharCode(o)+String.fromCharCode(s);return l}function ZU(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=qU(o),l=lW(t.charAt(0),A),u=uW(t.charAt(1),A);u<hW(s);)u+=2e6;var h=e-a;if(h%2!==0)throw`MGRSPoint has to have an even number
|
||
of digits after the zone letter and two 100km letters - front
|
||
half for easting meters, second half for
|
||
northing meters`+r;var c=h/2,f=0,d=0,v,y,m,w,C;return c>0&&(v=1e5/Math.pow(10,c),y=r.substring(a,a+c),f=parseFloat(y)*v,m=r.substring(a+c),d=parseFloat(m)*v),w=f+l,C=d+u,{easting:w,northing:C,zoneLetter:s,zoneNumber:o,accuracy:v}}function lW(r,e){for(var t=YU.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===Wa&&t++,t===Do&&t++,t>Od){if(i)throw"Bad character: "+r;t=yf,i=!0}n+=1e5}return n}function uW(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=zU.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===Wa&&t++,t===Do&&t++,t>Rd){if(i)throw"Bad character: "+r;t=yf,i=!0}n+=1e5}return n}function hW(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 Yf(r,e,t){if(!(this instanceof Yf))return new Yf(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")}Yf.fromMGRS=function(r){return new Yf(WU(r))};Yf.prototype.toMGRS=function(r){return XU([this.x,this.y],r)};var cW=1,fW=.25,OR=.046875,MR=.01953125,PR=.01068115234375,pW=.75,dW=.46875,vW=.013020833333333334,gW=.007120768229166667,yW=.3645833333333333,mW=.005696614583333333,_W=.3076171875;function JU(r){var e=[];e[0]=cW-r*(fW+r*(OR+r*(MR+r*PR))),e[1]=r*(pW-r*(OR+r*(MR+r*PR)));var t=r*r;return e[2]=t*(dW-r*(vW+r*gW)),t*=r,e[3]=t*(yW-r*mW),e[4]=t*r*_W,e}function W_(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 wW=20;function tD(r,e,t){for(var n=1/(1-e),i=r,a=wW;a;--a){var o=Math.sin(i),s=1-e*o*o;if(s=(W_(i,o,Math.cos(i),t)-r)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)<ne)return i}return i}function EW(){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.es&&(this.en=JU(this.es),this.ml0=W_(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function CW(r){var e=r.x,t=r.y,n=fe(e-this.long0),i,a,o,s=Math.sin(t),A=Math.cos(t);if(this.es){var u=A*n,h=Math.pow(u,2),c=this.ep2*Math.pow(A,2),f=Math.pow(c,2),d=Math.abs(A)>ne?Math.tan(t):0,v=Math.pow(d,2),y=Math.pow(v,2);i=1-this.es*Math.pow(s,2),u=u/Math.sqrt(i);var m=W_(t,s,A,this.en);a=this.a*(this.k0*u*(1+h/6*(1-v+c+h/20*(5-18*v+y+14*c-58*v*c+h/42*(61+179*y-y*v-479*v)))))+this.x0,o=this.a*(this.k0*(m-this.ml0+s*n*u/2*(1+h/12*(5-v+9*c+4*f+h/30*(61+y-58*v+270*c-330*v*c+h/56*(1385+543*y-y*v-3111*v))))))+this.y0}else{var l=A*Math.sin(n);if(Math.abs(Math.abs(l)-1)<ne)return 93;if(a=.5*this.a*this.k0*Math.log((1+l)/(1-l))+this.x0,o=A*Math.cos(n)/Math.sqrt(1-Math.pow(l,2)),l=Math.abs(o),l>=1){if(l-1>ne)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 BW(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=tD(e,this.es,this.en),Math.abs(t)<Yt){var h=Math.sin(t),c=Math.cos(t),f=Math.abs(c)>ne?Math.tan(t):0,d=this.ep2*Math.pow(c,2),v=Math.pow(d,2),y=Math.pow(f,2),m=Math.pow(y,2);e=1-this.es*Math.pow(h,2);var w=a*Math.sqrt(e)/this.k0,C=Math.pow(w,2);e=e*f,n=t-e*C/(1-this.es)*.5*(1-C/12*(5+3*y-9*d*y+d-4*v-C/30*(61+90*y-252*d*y+45*m+46*d-C/56*(1385+3633*y+4095*m+1574*m*y)))),i=fe(this.long0+w*(1-C/6*(1+2*y+d-C/20*(5+28*y+24*m+8*d*y+6*d-C/42*(61+662*y+1320*m+720*m*y))))/c)}else n=Yt*sg(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=fe(Math.atan2(A,u)+this.long0)}return r.x=i,r.y=n,r}var TW=["Fast_Transverse_Mercator","Fast Transverse Mercator"],M0={init:EW,forward:CW,inverse:BW,names:TW};function eD(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function q_(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 xW(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function SW(r){var e=Math.abs(r);return e=xW(e*(1+e/(q_(1,e)+1))),r<0?-e:e}function Sb(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 bW(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 LW(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function rD(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),a=eD(t),o=LW(t),s=2*i*o,A=-2*n*a,l=r.length-1,u=r[l],h=0,c=0,f=0,d,v;--l>=0;)d=c,v=h,c=u,h=f,u=-d+s*c-A*h+r[l],f=-v+A*c+s*h;return s=n*o,A=i*a,[s*u-A*f,s*f+A*u]}function FW(){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&&(M0.init.apply(this),this.forward=M0.forward,this.inverse=M0.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=Sb(this.cbg,this.lat0);this.Zb=-this.Qn*(n+bW(this.gtu,2*n))}function IW(r){var e=fe(r.x-this.long0),t=r.y;t=Sb(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,q_(n,i*o)),e=SW(Math.tan(e));var s=rD(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 RW(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=rD(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(eD(e));var o=Math.sin(t),s=Math.cos(t),A=Math.sin(e),l=Math.cos(e);t=Math.atan2(o*l,q_(A,l*s)),e=Math.atan2(A,l*s),n=fe(e+this.long0),i=Sb(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var OW=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],P0={init:FW,forward:IW,inverse:RW,names:OW};function MW(r,e){if(r===void 0){if(r=Math.floor((fe(e)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var PW="etmerc";function NW(){var r=MW(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*Wi,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,P0.init.apply(this),this.forward=P0.forward,this.inverse=P0.inverse}var UW=["Universal Transverse Mercator System","utm"],DW={init:NW,names:UW,dependsOn:PW};function bb(r,e){return Math.pow((1-r)/(1+r),e)}var QW=20;function HW(){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+Yr)/(Math.pow(Math.tan(.5*this.lat0+Yr),this.C)*bb(this.e*r,this.ratexp))}function GW(r){var e=r.x,t=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+Yr),this.C)*bb(this.e*Math.sin(t),this.ratexp))-Yt,r.x=this.C*e,r}function kW(r){for(var e=1e-14,t=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+Yr)/this.K,1/this.C),a=QW;a>0&&(n=2*Math.atan(i*bb(this.e*Math.sin(r.y),-.5*this.e))-Yt,!(Math.abs(n-r.y)<e));--a)r.y=n;return a?(r.x=t,r.y=n,r):null}var $W=["gauss"],Lb={init:HW,forward:GW,inverse:kW,names:$W};function VW(){Lb.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function jW(r){var e,t,n,i;return r.x=fe(r.x-this.long0),Lb.forward.apply(this,[r]),e=Math.sin(r.y),t=Math.cos(r.y),n=Math.cos(r.x),i=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*t*n),r.x=i*t*Math.sin(r.x),r.y=i*(this.cosc0*e-this.sinc0*t*n),r.x=this.a*r.x+this.x0,r.y=this.a*r.y+this.y0,r}function KW(r){var e,t,n,i,a;if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,a=Math.sqrt(r.x*r.x+r.y*r.y)){var o=2*Math.atan2(a,this.R2);e=Math.sin(o),t=Math.cos(o),i=Math.asin(t*this.sinc0+r.y*e*this.cosc0/a),n=Math.atan2(r.x*e,a*this.cosc0*t-r.y*this.sinc0*e)}else i=this.phic0,n=0;return r.x=n,r.y=i,Lb.inverse.apply(this,[r]),r.x=fe(r.x+this.long0),r}var YW=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],zW={init:VW,forward:jW,inverse:KW,names:YW};function XW(r,e,t){return e*=t,Math.tan(.5*(Yt+r))*Math.pow((1-e)/(1+e),.5*t)}function WW(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=ne&&(this.k0=.5*(1+sg(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=ne&&(this.lat0>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)<=ne&&(this.k0=.5*this.cons*aA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/_s(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=aA(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-Yt,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function qW(r){var e=r.x,t=r.y,n=Math.sin(t),i=Math.cos(t),a,o,s,A,l,u,h=fe(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=ne&&Math.abs(t+this.lat0)<=ne?(r.x=NaN,r.y=NaN,r):this.sphere?(a=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(h)),r.x=this.a*a*i*Math.sin(h)+this.x0,r.y=this.a*a*(this.coslat0*n-this.sinlat0*i*Math.cos(h))+this.y0,r):(o=2*Math.atan(this.ssfn_(t,n,this.e))-Yt,A=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=ne?(l=_s(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)<ne?(a=2*this.a*this.k0/(1+A*Math.cos(h)),r.y=a*s):(a=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*A*Math.cos(h))),r.y=a*(this.cosX0*s-this.sinX0*A*Math.cos(h))+this.y0),r.x=a*A*Math.sin(h)+this.x0,r))}function ZW(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,a,o=Math.sqrt(r.x*r.x+r.y*r.y);if(this.sphere){var s=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,t=this.lat0,o<=ne?(r.x=e,r.y=t,r):(t=Math.asin(Math.cos(s)*this.sinlat0+r.y*Math.sin(s)*this.coslat0/o),Math.abs(this.coslat0)<ne?this.lat0>0?e=fe(this.long0+Math.atan2(r.x,-1*r.y)):e=fe(this.long0+Math.atan2(r.x,r.y)):e=fe(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)<=ne){if(o<=ne)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*Ov(this.e,n),e=this.con*fe(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<=ne?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/o),e=fe(this.long0+Math.atan2(r.x*Math.sin(i),o*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),t=-1*Ov(this.e,Math.tan(.5*(Yt+a)));return r.x=e,r.y=t,r}var JW=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],t3={init:WW,forward:qW,inverse:ZW,names:JW,ssfn_:XW};function e3(){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 r3(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 n3(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,h=0;Math.abs(l-u)>1e-7;){if(++h>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 i3=["somerc"],a3={init:e3,forward:r3,inverse:n3,names:i3},nf=1e-7;function o3(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 s3(){var r,e,t,n,i,a,o,s,A,l,u=0,h,c=0,f=0,d=0,v=0,y=0,m=0;this.no_off=o3(this),this.no_rot="no_rot"in this;var w=!1;"alpha"in this&&(w=!0);var C=!1;if("rectified_grid_angle"in this&&(C=!0),w&&(m=this.alpha),C&&(u=this.rectified_grid_angle*Wi),w||C)c=this.longc;else if(f=this.long1,v=this.lat1,d=this.long2,y=this.lat2,Math.abs(v-y)<=nf||(r=Math.abs(v))<=nf||Math.abs(r-Yt)<=nf||Math.abs(Math.abs(this.lat0)-Yt)<=nf||Math.abs(Math.abs(y)-Yt)<=nf)throw new Error;var B=1-this.es;e=Math.sqrt(B),Math.abs(this.lat0)>ne?(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/B),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(_s(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),w||C?(w?(h=Math.asin(Math.sin(m)/n),C||(u=m)):(h=u,m=Math.asin(n*Math.sin(h))),this.lam0=c-Math.asin(.5*(i-1/i)*Math.tan(h))/this.B):(a=Math.pow(_s(this.e,v,Math.sin(v)),this.B),o=Math.pow(_s(this.e,y,Math.sin(y)),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-=Iv:r>Math.pi&&(d+=Iv),this.lam0=fe(.5*(f+d)-Math.atan(l*Math.tan(.5*this.B*(f-d))/A)/this.B),h=Math.atan(2*Math.sin(this.B*fe(f-this.lam0))/(i-1/i)),u=m=Math.asin(n*Math.sin(h))),this.singam=Math.sin(h),this.cosgam=Math.cos(h),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(m))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*h,this.v_pole_n=this.ArB*Math.log(Math.tan(Yr-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(Yr+i))}function A3(r){var e={},t,n,i,a,o,s,A,l;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-Yt)>ne){if(o=this.E/Math.pow(_s(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)<ne)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*r.x),Math.abs(s)<nf?A=this.A*r.x:A=this.ArB*Math.atan2(t*this.cosgam+a*this.singam,s)}else l=r.y>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 l3(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)<ne)A.x=0,A.y=s<0?-Yt:Yt;else{if(A.y=this.E/Math.sqrt((1+s)/(1-s)),A.y=Ov(this.e,Math.pow(A.y,1/this.B)),A.y===1/0)throw new Error;A.x=-this.rB*Math.atan2(i*this.cosgam-o*this.singam,Math.cos(this.BrA*e))}return A.x+=this.lam0,A}var u3=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"],h3={init:s3,forward:A3,inverse:l3,names:u3};function c3(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<ne)){var r=this.b/this.a;this.e=Math.sqrt(1-r*r);var e=Math.sin(this.lat1),t=Math.cos(this.lat1),n=aA(this.e,e,t),i=_s(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=aA(this.e,a,o),A=_s(this.e,this.lat2,a),l=_s(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>ne?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 f3(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=ne&&(t=sg(t)*(Yt-2*ne));var n=Math.abs(Math.abs(t)-Yt),i,a;if(n>ne)i=_s(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*fe(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 p3(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=Ov(this.e,n),i===-9999)return null}else i=-Yt;return a=fe(A/this.ns+this.long0),r.x=a,r.y=i,r}var d3=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],v3={init:c3,forward:f3,inverse:p3,names:d3};function g3(){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 y3(r){var e,t,n,i,a,o,s,A=r.x,l=r.y,u=fe(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 m3(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 _3=["Krovak","krovak"],w3={init:g3,forward:y3,inverse:m3,names:_3};function Pa(r,e,t,n,i){return r*i-e*Math.sin(2*i)+t*Math.sin(4*i)-n*Math.sin(6*i)}function Ag(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function lg(r){return .375*r*(1+.25*r*(1+.46875*r))}function ug(r){return .05859375*r*r*(1+.75*r)}function hg(r){return r*r*r*(35/3072)}function zf(r,e,t){var n=e*t;return r/Math.sqrt(1-n*n)}function fp(r){return Math.abs(r)<Yt?r:r-sg(r)*Math.PI}function Im(r,e,t,n,i){var a,o;a=r/e;for(var s=0;s<15;s++)if(o=(r-(e*a-t*Math.sin(2*a)+n*Math.sin(4*a)-i*Math.sin(6*a)))/(e-2*t*Math.cos(2*a)+4*n*Math.cos(4*a)-6*i*Math.cos(6*a)),a+=o,Math.abs(o)<=1e-10)return a;return NaN}function E3(){this.sphere||(this.e0=Ag(this.es),this.e1=lg(this.es),this.e2=ug(this.es),this.e3=hg(this.es),this.ml0=this.a*Pa(this.e0,this.e1,this.e2,this.e3,this.lat0))}function C3(r){var e,t,n=r.x,i=r.y;if(n=fe(n-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(n)),t=this.a*(Math.atan2(Math.tan(i),Math.cos(n))-this.lat0);else{var a=Math.sin(i),o=Math.cos(i),s=zf(this.a,this.e,a),A=Math.tan(i)*Math.tan(i),l=n*Math.cos(i),u=l*l,h=this.es*o*o/(1-this.es),c=this.a*Pa(this.e0,this.e1,this.e2,this.e3,i);e=s*l*(1-u*A*(1/6-(8-A+8*h)*u/120)),t=c-this.ml0+s*a/o*u*(.5+(5-A+6*h)*u/24)}return r.x=e+this.x0,r.y=t+this.y0,r}function B3(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i;if(this.sphere){var a=t+this.lat0;n=Math.asin(Math.sin(a)*Math.cos(e)),i=Math.atan2(Math.tan(e),Math.cos(a))}else{var o=this.ml0/this.a+t,s=Im(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-Yt)<=ne)return r.x=this.long0,r.y=Yt,t<0&&(r.y*=-1),r;var A=zf(this.a,this.e,Math.sin(s)),l=A*A*A/this.a/this.a*(1-this.es),u=Math.pow(Math.tan(s),2),h=e*this.a/A,c=h*h;n=s-A*Math.tan(s)/l*h*h*(.5-(1+3*u)*h*h/24),i=h*(1-c*(u/3+(1+3*u)*u*c/15))/Math.cos(s)}return r.x=fe(i+this.long0),r.y=fp(n),r}var T3=["Cassini","Cassini_Soldner","cass"],x3={init:E3,forward:C3,inverse:B3,names:T3};function cu(r,e){var t;return r>1e-7?(t=r*e,(1-r*r)*(e/(1-t*t)-.5/r*Math.log((1-t)/(1+t)))):2*e}var S3=1,b3=2,L3=3,F3=4;function I3(){var r=Math.abs(this.lat0);if(Math.abs(r-Yt)<ne?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<ne?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=cu(this.e,1),this.mmf=.5/(1-this.es),this.apa=H3(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=cu(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 R3(r){var e,t,n,i,a,o,s,A,l,u,h=r.x,c=r.y;if(h=fe(h-this.long0),this.sphere){if(a=Math.sin(c),u=Math.cos(c),n=Math.cos(h),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<=ne)return null;t=Math.sqrt(2/t),e=t*u*Math.sin(h),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(c+this.lat0)<ne)return null;t=Yr-c*.5,t=2*(this.mode===this.S_POLE?Math.cos(t):Math.sin(t)),e=t*Math.sin(h),t*=n}}else{switch(s=0,A=0,l=0,n=Math.cos(h),i=Math.sin(h),a=Math.sin(c),o=cu(this.e,a),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(s=o/this.qp,A=Math.sqrt(1-s*s)),this.mode){case this.OBLIQ:l=1+this.sinb1*s+this.cosb1*A*n;break;case this.EQUIT:l=1+A*n;break;case this.N_POLE:l=Yt+c,o=this.qp-o;break;case this.S_POLE:l=c-Yt,o=this.qp+o;break}if(Math.abs(l)<ne)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),this.mode===this.OBLIQ?t=this.ymf*l*(this.cosb1*s-this.sinb1*A*n):t=(l=Math.sqrt(2/(1+A*n)))*s*this.ymf,e=this.xmf*l*A*i;break;case this.N_POLE:case this.S_POLE:o>=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 O3(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,h,c=0;if(h=Math.sqrt(e*e+t*t),i=h*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(c=Math.sin(i),u=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(h)<=ne?0:Math.asin(t*c/h),e*=c,t=u*h;break;case this.OBLIQ:i=Math.abs(h)<=ne?this.lat0:Math.asin(u*this.sinph0+t*c*this.cosph0/h),e*=c*this.cosph0,t=(u-Math.sin(i)*this.sinph0)*h;break;case this.N_POLE:t=-t,i=Yt-i;break;case this.S_POLE:i-=Yt;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),A<ne)return r.x=this.long0,r.y=this.lat0,r;o=2*Math.asin(.5*A/this.rq),a=Math.cos(o),e*=o=Math.sin(o),this.mode===this.OBLIQ?(l=a*this.sinb1+t*o*this.cosb1/A,s=this.qp*l,t=A*this.cosb1*a-t*this.sinb1*o):(l=t*o/A,s=this.qp*l,t=A*a)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(t=-t),s=e*e+t*t,!s)return r.x=this.long0,r.y=this.lat0,r;l=1-s/this.qp,this.mode===this.S_POLE&&(l=-l)}n=Math.atan2(e,t),i=G3(Math.asin(l),this.apa)}return r.x=fe(this.long0+n),r.y=i,r}var M3=.3333333333333333,P3=.17222222222222222,N3=.10257936507936508,U3=.06388888888888888,D3=.0664021164021164,Q3=.016415012942191543;function H3(r){var e,t=[];return t[0]=r*M3,e=r*r,t[0]+=e*P3,t[1]=e*U3,e*=r,t[0]+=e*N3,t[1]+=e*D3,t[2]=e*Q3,t}function G3(r,e){var t=r+r;return r+e[0]*Math.sin(t)+e[1]*Math.sin(t+t)+e[2]*Math.sin(t+t+t)}var k3=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],$3={init:I3,forward:R3,inverse:O3,names:k3,S_POLE:S3,N_POLE:b3,EQUIT:L3,OBLIQ:F3};function Bu(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function V3(){Math.abs(this.lat1+this.lat2)<ne||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=aA(this.e3,this.sin_po,this.cos_po),this.qs1=cu(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=aA(this.e3,this.sin_po,this.cos_po),this.qs2=cu(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=cu(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>ne?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 j3(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=cu(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*fe(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 K3(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=fe(i/this.ns0+this.long0),r.x=a,r.y=o,r}function Y3(r,e){var t,n,i,a,o,s=Bu(.5*e);if(r<ne)return s;for(var A=r*r,l=1;l<=25;l++)if(t=Math.sin(s),n=Math.cos(s),i=r*t,a=1-i*i,o=.5*a*a/n*(e/(1-A)-t/a+.5/r*Math.log((1-i)/(1+i))),s=s+o,Math.abs(o)<=1e-7)return s;return null}var z3=["Albers_Conic_Equal_Area","Albers","aea"],X3={init:V3,forward:j3,inverse:K3,names:z3,phi1z:Y3};function W3(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function q3(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=fe(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)<=ne?(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 Z3(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=Bu(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=fe(this.long0+a)):(o=this.phic0,a=0),r.x=a,r.y=o,r}var J3=["gnom"],tq={init:W3,forward:q3,inverse:Z3,names:J3};function eq(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*Yt:Yt;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 rq(){this.sphere||(this.k0=aA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function nq(r){var e=r.x,t=r.y,n,i,a=fe(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=cu(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 iq(r){r.x-=this.x0,r.y-=this.y0;var e,t;return this.sphere?(e=fe(this.long0+r.x/this.a/Math.cos(this.lat_ts)),t=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(t=eq(this.e,2*r.y*this.k0/this.a),e=fe(this.long0+r.x/(this.a*this.k0))),r.x=e,r.y=t,r}var aq=["cea"],oq={init:rq,forward:nq,inverse:iq,names:aq};function sq(){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 Aq(r){var e=r.x,t=r.y,n=fe(e-this.long0),i=fp(t-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function lq(r){var e=r.x,t=r.y;return r.x=fe(this.long0+(e-this.x0)/(this.a*this.rc)),r.y=fp(this.lat0+(t-this.y0)/this.a),r}var uq=["Equirectangular","Equidistant_Cylindrical","eqc"],hq={init:sq,forward:Aq,inverse:lq,names:uq},NR=20;function cq(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ag(this.es),this.e1=lg(this.es),this.e2=ug(this.es),this.e3=hg(this.es),this.ml0=this.a*Pa(this.e0,this.e1,this.e2,this.e3,this.lat0)}function fq(r){var e=r.x,t=r.y,n,i,a,o=fe(e-this.long0);if(a=o*Math.sin(t),this.sphere)Math.abs(t)<=ne?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(a)/Math.tan(t),i=this.a*(fp(t-this.lat0)+(1-Math.cos(a))/Math.tan(t)));else if(Math.abs(t)<=ne)n=this.a*o,i=-1*this.ml0;else{var s=zf(this.a,this.e,Math.sin(t))/Math.tan(t);n=s*Math.sin(a),i=this.a*Pa(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 pq(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)<=ne)e=fe(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=NR;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)<=ne){t=A;break}e=fe(this.long0+Math.asin(n*Math.tan(A)/this.a)/Math.sin(t))}else if(Math.abs(i+this.ml0)<=ne)t=0,e=fe(this.long0+n/this.a);else{o=(this.ml0+i)/this.a,s=n*n/this.a/this.a+o*o,A=o;var h,c,f,d,v;for(a=NR;a;--a)if(v=this.e*Math.sin(A),h=Math.sqrt(1-v*v)*Math.tan(A),c=this.a*Pa(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=c/this.a,l=(o*(h*d+1)-d-.5*h*(d*d+s))/(this.es*Math.sin(2*A)*(d*d+s-2*o*d)/(4*h)+(o-d)*(h*f-2/Math.sin(2*A))-f),A-=l,Math.abs(l)<=ne){t=A;break}h=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=fe(this.long0+Math.asin(n*h/this.a)/Math.sin(t))}return r.x=e,r.y=t,r}var dq=["Polyconic","poly"],vq={init:cq,forward:fq,inverse:pq,names:dq};function gq(){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 yq(r){var e,t=r.x,n=r.y,i=n-this.lat0,a=t-this.long0,o=i/tv*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,h=s,c=1,f=0,d,v,y=0,m=0;for(e=1;e<=6;e++)d=c*u-f*h,v=f*u+c*h,c=d,f=v,y=y+this.B_re[e]*c-this.B_im[e]*f,m=m+this.B_im[e]*c+this.B_re[e]*f;return r.x=m*this.a+this.x0,r.y=y*this.a+this.y0,r}function mq(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,h,c=0,f=0;for(e=1;e<=6;e++)u=A*o-l*s,h=l*o+A*s,A=u,l=h,c=c+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<this.iterations;d++){var v=c,y=f,m,w,C=o,B=s;for(e=2;e<=6;e++)m=v*c-y*f,w=y*c+v*f,v=m,y=w,C=C+(e-1)*(this.B_re[e]*v-this.B_im[e]*y),B=B+(e-1)*(this.B_im[e]*v+this.B_re[e]*y);v=1,y=0;var R=this.B_re[1],O=this.B_im[1];for(e=2;e<=6;e++)m=v*c-y*f,w=y*c+v*f,v=m,y=w,R=R+e*(this.B_re[e]*v-this.B_im[e]*y),O=O+e*(this.B_im[e]*v+this.B_re[e]*y);var I=R*R+O*O;c=(C*R+B*O)/I,f=(B*R-C*O)/I}var T=c,L=f,P=1,S=0;for(e=1;e<=9;e++)P=P*T,S=S+this.D[e]*P;var x=this.lat0+S*tv*1e5,M=this.long0+L;return r.x=M,r.y=x,r}var _q=["New_Zealand_Map_Grid","nzmg"],wq={init:gq,forward:yq,inverse:mq,names:_q};function Eq(){}function Cq(r){var e=r.x,t=r.y,n=fe(e-this.long0),i=this.x0+this.a*n,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+t/2.5))*1.25;return r.x=i,r.y=a,r}function Bq(r){r.x-=this.x0,r.y-=this.y0;var e=fe(this.long0+r.x/this.a),t=2.5*(Math.atan(Math.exp(.8*r.y/this.a))-Math.PI/4);return r.x=e,r.y=t,r}var Tq=["Miller_Cylindrical","mill"],xq={init:Eq,forward:Cq,inverse:Bq,names:Tq},Sq=20;function bq(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=JU(this.es)}function Lq(r){var e,t,n=r.x,i=r.y;if(n=fe(n-this.long0),this.sphere){if(!this.m)i=this.n!==1?Math.asin(this.n*Math.sin(i)):i;else for(var a=this.n*Math.sin(i),o=Sq;o;--o){var s=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=s,Math.abs(s)<ne)break}e=this.a*this.C_x*n*(this.m+Math.cos(i)),t=this.a*this.C_y*i}else{var A=Math.sin(i),l=Math.cos(i);t=this.a*W_(i,A,l,this.en),e=this.a*n*l/Math.sqrt(1-this.es*A*A)}return r.x=e,r.y=t,r}function Fq(r){var e,t,n,i;return r.x-=this.x0,n=r.x/this.a,r.y-=this.y0,e=r.y/this.a,this.sphere?(e/=this.C_y,n=n/(this.C_x*(this.m+Math.cos(e))),this.m?e=Bu((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=Bu(Math.sin(e)/this.n)),n=fe(n+this.long0),e=fp(e)):(e=tD(r.y/this.a,this.es,this.en),i=Math.abs(e),i<Yt?(i=Math.sin(e),t=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)),n=fe(t)):i-ne<Yt&&(n=this.long0)),r.x=n,r.y=e,r}var Iq=["Sinusoidal","sinu"],Rq={init:bq,forward:Lq,inverse:Fq,names:Iq};function Oq(){}function Mq(r){for(var e=r.x,t=r.y,n=fe(e-this.long0),i=t,a=Math.PI*Math.sin(t);;){var o=-(i+Math.sin(i)-a)/(1+Math.cos(i));if(i+=o,Math.abs(o)<ne)break}i/=2,Math.PI/2-Math.abs(t)<ne&&(n=0);var s=.900316316158*this.a*n*Math.cos(i)+this.x0,A=1.4142135623731*this.a*Math.sin(i)+this.y0;return r.x=s,r.y=A,r}function Pq(r){var e,t;r.x-=this.x0,r.y-=this.y0,t=r.y/(1.4142135623731*this.a),Math.abs(t)>.999999999999&&(t=.999999999999),e=Math.asin(t);var n=fe(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 Nq=["Mollweide","moll"],Uq={init:Oq,forward:Mq,inverse:Pq,names:Nq};function Dq(){Math.abs(this.lat1+this.lat2)<ne||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=Ag(this.es),this.e1=lg(this.es),this.e2=ug(this.es),this.e3=hg(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=aA(this.e,this.sinphi,this.cosphi),this.ml1=Pa(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<ne?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=aA(this.e,this.sinphi,this.cosphi),this.ml2=Pa(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=Pa(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Qq(r){var e=r.x,t=r.y,n;if(this.sphere)n=this.a*(this.g-t);else{var i=Pa(this.e0,this.e1,this.e2,this.e3,t);n=this.a*(this.g-i)}var a=this.ns*fe(e-this.long0),o=this.x0+n*Math.sin(a),s=this.y0+this.rh-n*Math.cos(a);return r.x=o,r.y=s,r}function Hq(r){r.x-=this.x0,r.y=this.rh-r.y+this.y0;var e,t,n,i;this.ns>=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=fe(this.long0+a/this.ns),n=fp(this.g-t/this.a),r.x=i,r.y=n,r;var o=this.g-t/this.a;return n=Im(o,this.e0,this.e1,this.e2,this.e3),i=fe(this.long0+a/this.ns),r.x=i,r.y=n,r}var Gq=["Equidistant_Conic","eqdc"],kq={init:Dq,forward:Qq,inverse:Hq,names:Gq};function $q(){this.R=this.a}function Vq(r){var e=r.x,t=r.y,n=fe(e-this.long0),i,a;Math.abs(t)<=ne&&(i=this.x0+this.R*n,a=this.y0);var o=Bu(2*Math.abs(t/Math.PI));(Math.abs(n)<=ne||Math.abs(Math.abs(t)-Yt)<=ne)&&(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),h=u/(l+u-1),c=h*h,f=h*(2/l-1),d=f*f,v=Math.PI*this.R*(s*(h-d)+Math.sqrt(A*(h-d)*(h-d)-(d+A)*(c-d)))/(d+A);n<0&&(v=-v),i=this.x0+v;var y=A+h;return v=Math.PI*this.R*(f*y-s*Math.sqrt((d+A)*(A+1)-y*y))/(d+A),t>=0?a=this.y0+v:a=this.y0-v,r.x=i,r.y=a,r}function jq(r){var e,t,n,i,a,o,s,A,l,u,h,c,f;return r.x-=this.x0,r.y-=this.y0,h=Math.PI*this.R,n=r.x/h,i=r.y/h,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),h=3*f/l/u,Math.abs(h)>1&&(h>=0?h=1:h=-1),c=Math.acos(h)/3,r.y>=0?t=(-u*Math.cos(c+Math.PI/3)-s/3/A)*Math.PI:t=-(-u*Math.cos(c+Math.PI/3)-s/3/A)*Math.PI,Math.abs(n)<ne?e=this.long0:e=fe(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(n*n-i*i)+a*a))/2/n),r.x=e,r.y=t,r}var Kq=["Van_der_Grinten_I","VanDerGrinten","vandg"],Yq={init:$q,forward:Vq,inverse:jq,names:Kq};function zq(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function Xq(r){var e=r.x,t=r.y,n=Math.sin(r.y),i=Math.cos(r.y),a=fe(e-this.long0),o,s,A,l,u,h,c,f,d,v,y,m,w,C,B,R,O,I,T,L,P,S,x;return this.sphere?Math.abs(this.sin_p12-1)<=ne?(r.x=this.x0+this.a*(Yt-t)*Math.sin(a),r.y=this.y0-this.a*(Yt-t)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=ne?(r.x=this.x0+this.a*(Yt+t)*Math.sin(a),r.y=this.y0+this.a*(Yt+t)*Math.cos(a),r):(I=this.sin_p12*n+this.cos_p12*i*Math.cos(a),R=Math.acos(I),O=R?R/Math.sin(R):1,r.x=this.x0+this.a*O*i*Math.sin(a),r.y=this.y0+this.a*O*(this.cos_p12*n-this.sin_p12*i*Math.cos(a)),r):(o=Ag(this.es),s=lg(this.es),A=ug(this.es),l=hg(this.es),Math.abs(this.sin_p12-1)<=ne?(u=this.a*Pa(o,s,A,l,Yt),h=this.a*Pa(o,s,A,l,t),r.x=this.x0+(u-h)*Math.sin(a),r.y=this.y0-(u-h)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=ne?(u=this.a*Pa(o,s,A,l,Yt),h=this.a*Pa(o,s,A,l,t),r.x=this.x0+(u+h)*Math.sin(a),r.y=this.y0+(u+h)*Math.cos(a),r):(c=n/i,f=zf(this.a,this.e,this.sin_p12),d=zf(this.a,this.e,n),v=Math.atan((1-this.es)*c+this.es*f*this.sin_p12/(d*i)),y=Math.atan2(Math.sin(a),this.cos_p12*Math.tan(v)-this.sin_p12*Math.cos(a)),y===0?T=Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):Math.abs(Math.abs(y)-Math.PI)<=ne?T=-Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):T=Math.asin(Math.sin(a)*Math.cos(v)/Math.sin(y)),m=this.e*this.sin_p12/Math.sqrt(1-this.es),w=this.e*this.cos_p12*Math.cos(y)/Math.sqrt(1-this.es),C=m*w,B=w*w,L=T*T,P=L*T,S=P*T,x=S*T,R=f*T*(1-L*B*(1-B)/6+P/8*C*(1-2*B)+S/120*(B*(4-7*B)-3*m*m*(1-7*B))-x/48*C),r.x=this.x0+R*Math.sin(y),r.y=this.y0+R*Math.cos(y),r))}function Wq(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,a,o,s,A,l,u,h,c,f,d,v,y,m,w,C,B,R,O,I,T;return this.sphere?(e=Math.sqrt(r.x*r.x+r.y*r.y),e>2*Yt*this.a?void 0:(t=e/this.a,n=Math.sin(t),i=Math.cos(t),a=this.long0,Math.abs(e)<=ne?o=this.lat0:(o=Bu(i*this.sin_p12+r.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-Yt,Math.abs(s)<=ne?this.lat0>=0?a=fe(this.long0+Math.atan2(r.x,-r.y)):a=fe(this.long0-Math.atan2(-r.x,r.y)):a=fe(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=Ag(this.es),l=lg(this.es),u=ug(this.es),h=hg(this.es),Math.abs(this.sin_p12-1)<=ne?(c=this.a*Pa(A,l,u,h,Yt),e=Math.sqrt(r.x*r.x+r.y*r.y),f=c-e,o=Im(f/this.a,A,l,u,h),a=fe(this.long0+Math.atan2(r.x,-1*r.y)),r.x=a,r.y=o,r):Math.abs(this.sin_p12+1)<=ne?(c=this.a*Pa(A,l,u,h,Yt),e=Math.sqrt(r.x*r.x+r.y*r.y),f=e-c,o=Im(f/this.a,A,l,u,h),a=fe(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),y=Math.atan2(r.x,r.y),d=zf(this.a,this.e,this.sin_p12),m=Math.cos(y),w=this.e*this.cos_p12*m,C=-w*w/(1-this.es),B=3*this.es*(1-C)*this.sin_p12*this.cos_p12*m/(1-this.es),R=e/d,O=R-C*(1+C)*Math.pow(R,3)/6-B*(1+3*C)*Math.pow(R,4)/24,I=1-C*O*O/2-R*O*O*O/6,v=Math.asin(this.sin_p12*Math.cos(O)+this.cos_p12*Math.sin(O)*m),a=fe(this.long0+Math.asin(Math.sin(y)*Math.sin(O)/Math.cos(v))),T=Math.sin(v),o=Math.atan2((T-this.es*I*this.sin_p12)*Math.tan(v),T*(1-this.es)),r.x=a,r.y=o,r))}var qq=["Azimuthal_Equidistant","aeqd"],Zq={init:zq,forward:Xq,inverse:Wq,names:qq};function Jq(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function tZ(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=fe(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)<=ne)&&(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 eZ(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=Bu(e/this.a),n=Math.sin(t),i=Math.cos(t),o=this.long0,Math.abs(e)<=ne?(s=this.lat0,r.x=o,r.y=s,r):(s=Bu(i*this.sin_p14+r.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-Yt,Math.abs(a)<=ne?(this.lat0>=0?o=fe(this.long0+Math.atan2(r.x,-r.y)):o=fe(this.long0-Math.atan2(-r.x,r.y)),r.x=o,r.y=s,r):(o=fe(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 rZ=["ortho"],nZ={init:Jq,forward:tZ,inverse:eZ,names:rZ},Fn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},zr={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function iZ(){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>=Yt-Yr/2?this.face=Fn.TOP:this.lat0<=-(Yt-Yr/2)?this.face=Fn.BOTTOM:Math.abs(this.long0)<=Yr?this.face=Fn.FRONT:Math.abs(this.long0)<=Yt+Yr?this.face=this.long0>0?Fn.RIGHT:Fn.LEFT:this.face=Fn.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 aZ(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===Fn.TOP)a=Yt-t,n>=Yr&&n<=Yt+Yr?(A.value=zr.AREA_0,i=n-Yt):n>Yt+Yr||n<=-(Yt+Yr)?(A.value=zr.AREA_1,i=n>0?n-zn:n+zn):n>-(Yt+Yr)&&n<=-Yr?(A.value=zr.AREA_2,i=n+Yt):(A.value=zr.AREA_3,i=n);else if(this.face===Fn.BOTTOM)a=Yt+t,n>=Yr&&n<=Yt+Yr?(A.value=zr.AREA_0,i=-n+Yt):n<Yr&&n>=-Yr?(A.value=zr.AREA_1,i=-n):n<-Yr&&n>=-(Yt+Yr)?(A.value=zr.AREA_2,i=-n-Yt):(A.value=zr.AREA_3,i=n>0?-n+zn:-n-zn);else{var l,u,h,c,f,d,v;this.face===Fn.RIGHT?n=Ff(n,+Yt):this.face===Fn.BACK?n=Ff(n,+zn):this.face===Fn.LEFT&&(n=Ff(n,-Yt)),c=Math.sin(t),f=Math.cos(t),d=Math.sin(n),v=Math.cos(n),l=f*v,u=f*d,h=c,this.face===Fn.FRONT?(a=Math.acos(l),i=Ry(a,h,u,A)):this.face===Fn.RIGHT?(a=Math.acos(u),i=Ry(a,h,-l,A)):this.face===Fn.BACK?(a=Math.acos(-l),i=Ry(a,h,-u,A)):this.face===Fn.LEFT?(a=Math.acos(-u),i=Ry(a,h,l,A)):(a=i=0,A.value=zr.AREA_0)}return s=Math.atan(12/zn*(i+Math.acos(Math.sin(i)*Math.cos(Yr))-Yt)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),A.value===zr.AREA_1?s+=Yt:A.value===zr.AREA_2?s+=zn:A.value===zr.AREA_3&&(s+=1.5*zn),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 oZ(r){var e={lam:0,phi:0},t,n,i,a,o,s,A,l,u,h={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)?h.value=zr.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(h.value=zr.AREA_1,t-=Yt):r.x<0&&-r.x>=Math.abs(r.y)?(h.value=zr.AREA_2,t=t<0?t+zn:t-zn):(h.value=zr.AREA_3,t+=Yt),u=zn/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===Fn.TOP)l=Math.acos(A),e.phi=Yt-l,h.value===zr.AREA_0?e.lam=s+Yt:h.value===zr.AREA_1?e.lam=s<0?s+zn:s-zn:h.value===zr.AREA_2?e.lam=s-Yt:e.lam=s;else if(this.face===Fn.BOTTOM)l=Math.acos(A),e.phi=l-Yt,h.value===zr.AREA_0?e.lam=-s+Yt:h.value===zr.AREA_1?e.lam=-s:h.value===zr.AREA_2?e.lam=-s-Yt:e.lam=s<0?-s-zn:-s+zn;else{var c,f,d;c=A,u=c*c,u>=1?d=0:d=Math.sqrt(1-u)*Math.sin(s),u+=d*d,u>=1?f=0:f=Math.sqrt(1-u),h.value===zr.AREA_1?(u=f,f=-d,d=u):h.value===zr.AREA_2?(f=-f,d=-d):h.value===zr.AREA_3&&(u=f,f=d,d=-u),this.face===Fn.RIGHT?(u=c,c=-f,f=u):this.face===Fn.BACK?(c=-c,f=-f):this.face===Fn.LEFT&&(u=c,c=f,f=-u),e.phi=Math.acos(-d)-Yt,e.lam=Math.atan2(f,c),this.face===Fn.RIGHT?e.lam=Ff(e.lam,-Yt):this.face===Fn.BACK?e.lam=Ff(e.lam,-zn):this.face===Fn.LEFT&&(e.lam=Ff(e.lam,+Yt))}if(this.es!==0){var v,y,m;v=e.phi<0?1:0,y=Math.tan(e.phi),m=this.b/Math.sqrt(y*y+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-m*m)/(this.one_minus_f*m)),v&&(e.phi=-e.phi)}return e.lam+=this.long0,r.x=e.lam,r.y=e.phi,r}function Ry(r,e,t,n){var i;return r<ne?(n.value=zr.AREA_0,i=0):(i=Math.atan2(e,t),Math.abs(i)<=Yr?n.value=zr.AREA_0:i>Yr&&i<=Yt+Yr?(n.value=zr.AREA_1,i-=Yt):i>Yt+Yr||i<=-(Yt+Yr)?(n.value=zr.AREA_2,i=i>=0?i-zn:i+zn):(n.value=zr.AREA_3,i+=Yt)),i}function Ff(r,e){var t=r+e;return t<-zn?t+=Iv:t>+zn&&(t-=Iv),t}var sZ=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],AZ={init:iZ,forward:aZ,inverse:oZ,names:sZ},FB=[[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]],Md=[[-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]],nD=.8487,iD=1.3523,aD=Xs/5,lZ=1/aD,mf=18,Rm=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},uZ=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function hZ(r,e,t,n){for(var i=e;n;--n){var a=r(i);if(i-=a,Math.abs(a)<t)break}return i}function cZ(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function fZ(r){var e=fe(r.x-this.long0),t=Math.abs(r.y),n=Math.floor(t*aD);n<0?n=0:n>=mf&&(n=mf-1),t=Xs*(t-lZ*n);var i={x:Rm(FB[n],t)*e,y:Rm(Md[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*nD+this.x0,i.y=i.y*this.a*iD+this.y0,i}function pZ(r){var e={x:(r.x-this.x0)/(this.a*nD),y:Math.abs(r.y-this.y0)/(this.a*iD)};if(e.y>=1)e.x/=FB[mf][0],e.y=r.y<0?-Yt:Yt;else{var t=Math.floor(e.y*mf);for(t<0?t=0:t>=mf&&(t=mf-1);;)if(Md[t][0]>e.y)--t;else if(Md[t+1][0]<=e.y)++t;else break;var n=Md[t],i=5*(e.y-n[0])/(Md[t+1][0]-n[0]);i=hZ(function(a){return(Rm(n,a)-e.y)/uZ(n,a)},i,ne,100),e.x/=Rm(FB[t],i),e.y=(5*t+i)*Wi,r.y<0&&(e.y=-e.y)}return e.x=fe(e.x+this.long0),e}var dZ=["Robinson","robin"],vZ={init:cZ,forward:fZ,inverse:pZ,names:dZ};function gZ(){this.name="geocent"}function yZ(r){var e=VU(r,this.es,this.a);return e}function mZ(r){var e=jU(r,this.es,this.a,this.b);return e}var _Z=["Geocentric","geocentric","geocent","Geocent"],wZ={init:gZ,forward:yZ,inverse:mZ,names:_Z},fa={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},ld={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 EZ(){if(Object.keys(ld).forEach(function(t){if(typeof this[t]>"u")this[t]=ld[t].def;else{if(ld[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);ld[t].num&&(this[t]=parseFloat(this[t]))}ld[t].degrees&&(this[t]=this[t]*Wi)}.bind(this)),Math.abs(Math.abs(this.lat0)-Yt)<ne?this.mode=this.lat0<0?fa.S_POLE:fa.N_POLE:Math.abs(this.lat0)<ne?this.mode=fa.EQUIT:(this.mode=fa.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>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 CZ(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 fa.OBLIQ:a=this.sinph0*e+this.cosph0*t*n;break;case fa.EQUIT:a=t*n;break;case fa.S_POLE:a=-e;break;case fa.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),i=a*t*Math.sin(r.x),this.mode){case fa.OBLIQ:a*=this.cosph0*e-this.sinph0*t*n;break;case fa.EQUIT:a*=e;break;case fa.N_POLE:a*=-(t*n);break;case fa.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 BZ(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=q_(r.x,r.y);if(Math.abs(a)<ne)e.x=0,e.y=r.y;else{var o,s;switch(s=1-a*a*this.pfact,s=(this.p-Math.sqrt(s))/(this.pn1/a+a/this.pn1),o=Math.sqrt(1-s*s),this.mode){case fa.OBLIQ:e.y=Math.asin(o*this.sinph0+r.y*s*this.cosph0/a),r.y=(o-this.sinph0*Math.sin(e.y))*a,r.x*=s*this.cosph0;break;case fa.EQUIT:e.y=Math.asin(r.y*s/a),r.y=o*a,r.x*=s;break;case fa.N_POLE:e.y=Math.asin(o),r.y=-r.y;break;case fa.S_POLE:e.y=-Math.asin(o);break}e.x=Math.atan2(r.x,r.y)}return r.x=e.x+this.long0,r.y=e.y,r}var TZ=["Tilted_Perspective","tpers"],xZ={init:EZ,forward:CZ,inverse:BZ,names:TZ};function SZ(r){r.Proj.projections.add(M0),r.Proj.projections.add(P0),r.Proj.projections.add(DW),r.Proj.projections.add(zW),r.Proj.projections.add(t3),r.Proj.projections.add(a3),r.Proj.projections.add(h3),r.Proj.projections.add(v3),r.Proj.projections.add(w3),r.Proj.projections.add(x3),r.Proj.projections.add($3),r.Proj.projections.add(X3),r.Proj.projections.add(tq),r.Proj.projections.add(oq),r.Proj.projections.add(hq),r.Proj.projections.add(vq),r.Proj.projections.add(wq),r.Proj.projections.add(xq),r.Proj.projections.add(Rq),r.Proj.projections.add(Uq),r.Proj.projections.add(kq),r.Proj.projections.add(Yq),r.Proj.projections.add(Zq),r.Proj.projections.add(nZ),r.Proj.projections.add(AZ),r.Proj.projections.add(vZ),r.Proj.projections.add(wZ),r.Proj.projections.add(xZ)}io.defaultDatum="WGS84";io.Proj=tA;io.WGS84=new io.Proj("WGS84");io.Point=Yf;io.toPoint=KU;io.defs=Fa;io.nadgrid=HX;io.transform=Fm;io.mgrs=rW;io.version="__VERSION__";SZ(io);function bZ(r){var e=Object.keys(r.defs),t=e.length,n,i;for(n=0;n<t;++n){var a=e[n];if(!Ie(a)){var o=r.defs(a),s=o.units;!s&&o.projName==="longlat"&&(s=Ma.DEGREES),V2(new ul({code:a,axisOrientation:o.axis,metersPerUnit:o.to_meter,units:s}))}}for(n=0;n<t;++n){var A=e[n],l=Ie(A);for(i=0;i<t;++i){var u=e[i],h=Ie(u);if(!k2(A,u))if(r.defs[A]===r.defs[u])pB([l,h]);else{var c=r(A,u);lV(l,h,jI(l,h,c.forward),jI(h,l,c.inverse))}}}}const LZ={name:"ol-projection-register",setup(r){const{projectionName:e,projectionDef:t,projectionExtent:n}=Ph(r);return io.defs(e.value,t.value),bZ(io),{projection:new ul({code:e.value,extent:n.value})}},props:{projectionName:{type:String},projectionDef:{type:String},projectionExtent:{type:Array}}};function FZ(r,e,t,n,i,a){return Er("",!0)}var IB=le(LZ,[["render",FZ]]);function Om(r){Om.installed||(Om.installed=!0,r.component(EB.name,EB),r.component(CB.name,CB),r.component(BB.name,BB),r.component(TB.name,TB),r.component(xB.name,xB),r.component(IB.name,IB))}var IZ=Object.freeze(Object.defineProperty({__proto__:null,default:Om,install:Om,Map:EB,View:CB,Feature:BB,Overlay:TB,GeoLocation:xB,Projection:IB},Symbol.toStringTag,{value:"Module"})),Jl={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"},RZ=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){RZ(e,r);function e(t){var n=this,i=t||{},a=de({},i);return delete a.preload,delete a.useInterimTilesOnError,n=r.call(this,a)||this,n.on,n.once,n.un,n.setPreload(i.preload!==void 0?i.preload:0),n.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),n}return e.prototype.getPreload=function(){return this.get(Jl.PRELOAD)},e.prototype.setPreload=function(t){this.set(Jl.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Jl.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Jl.USE_INTERIM_TILES_ON_ERROR,t)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(qh),oD=OZ,MZ=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){MZ(e,r);function e(t,n,i){var a=r.call(this)||this,o=i||{};return a.tileCoord=t,a.state=n,a.interimTile=null,a.key="",a.transition_=o.transition===void 0?250:o.transition,a.transitionStarts_={},a.interpolate=!!o.interpolate,a}return e.prototype.changed=function(){this.dispatchEvent(ye.CHANGE)},e.prototype.release=function(){},e.prototype.getKey=function(){return this.key+"/"+this.tileCoord},e.prototype.getInterimTile=function(){if(!this.interimTile)return this;var t=this.interimTile;do{if(t.getState()==ge.LOADED)return this.transition_=0,t;t=t.interimTile}while(t);return this},e.prototype.refreshInterimChain=function(){if(this.interimTile){var t=this.interimTile,n=this;do{if(t.getState()==ge.LOADED){t.interimTile=null;break}else t.getState()==ge.LOADING?n=t:t.getState()==ge.IDLE?n.interimTile=t.interimTile:n=t;t=n.interimTile}while(t)}},e.prototype.getTileCoord=function(){return this.tileCoord},e.prototype.getState=function(){return this.state},e.prototype.setState=function(t){if(this.state!==ge.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Ee()},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:eb(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}(Wh),Fb=PZ,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)}}(),UZ=function(r){NZ(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=ge.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){this.state=ge.ERROR,this.unlistenImage_(),this.image_=DZ(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=ge.LOADED:this.state=ge.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==ge.ERROR&&(this.state=ge.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==ge.IDLE&&(this.state=ge.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=Eb(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Fb);function DZ(){var r=Ha(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var Mm=UZ,sD=.5,QZ=10,UR=.25,HZ=function(){function r(e,t,n,i,a,o){this.sourceProj_=e,this.targetProj_=t;var s={},A=Lv(this.targetProj_,this.sourceProj_);this.transformInv_=function(C){var B=C[0]+"/"+C[1];return s[B]||(s[B]=A(C)),s[B]},this.maxSourceExtent_=i,this.errorThresholdSquared_=a*a,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&Fr(i)==Fr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Fr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Fr(this.targetProj_.getExtent()):null;var l=Ss(n),u=qv(n),h=lp(n),c=Wv(n),f=this.transformInv_(l),d=this.transformInv_(u),v=this.transformInv_(h),y=this.transformInv_(c),m=QZ+(o?Math.max(0,Math.ceil(C2(wv(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,h,c,f,d,v,y,m),this.wrapsXInSource_){var w=1/0;this.triangles_.forEach(function(C,B,R){w=Math.min(w,C.source[0][0],C.source[1][0],C.source[2][0])}),this.triangles_.forEach(function(C){if(Math.max(C.source[0][0],C.source[1][0],C.source[2][0])-w>this.sourceWorldWidth_/2){var B=[[C.source[0][0],C.source[0][1]],[C.source[1][0],C.source[1][1]],[C.source[2][0],C.source[2][1]]];B[0][0]-w>this.sourceWorldWidth_/2&&(B[0][0]-=this.sourceWorldWidth_),B[1][0]-w>this.sourceWorldWidth_/2&&(B[1][0]-=this.sourceWorldWidth_),B[2][0]-w>this.sourceWorldWidth_/2&&(B[2][0]-=this.sourceWorldWidth_);var R=Math.min(B[0][0],B[1][0],B[2][0]),O=Math.max(B[0][0],B[1][0],B[2][0]);O-R<this.sourceWorldWidth_/2&&(C.source=B)}}.bind(this))}s={}}return r.prototype.addTriangle_=function(e,t,n,i,a,o){this.triangles_.push({source:[i,a,o],target:[e,t,n]})},r.prototype.addQuad_=function(e,t,n,i,a,o,s,A,l){var u=ki([a,o,s,A]),h=this.sourceWorldWidth_?Fr(u)/this.sourceWorldWidth_:null,c=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&h>.5&&h<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var v=ki([e,t,n,i]),y=Fr(v)/this.targetWorldWidth_;d=y>UR||d}!f&&this.sourceProj_.isGlobal()&&h&&(d=h>UR||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!In(u,this.maxSourceExtent_))){var m=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(m=(!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),m!=1&&m!=2&&m!=4&&m!=8)return}if(l>0){if(!d){var w=[(e[0]+n[0])/2,(e[1]+n[1])/2],C=this.transformInv_(w),B=void 0;if(f){var R=(uu(a[0],c)+uu(s[0],c))/2;B=R-uu(C[0],c)}else B=(a[0]+s[0])/2-C[0];var O=(a[1]+s[1])/2-C[1],I=B*B+O*O;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),P=[(i[0]+e[0])/2,(i[1]+e[1])/2],S=this.transformInv_(P);this.addQuad_(e,t,T,P,a,o,L,S,l-1),this.addQuad_(P,T,n,i,S,L,s,A,l-1)}else{var x=[(e[0]+t[0])/2,(e[1]+t[1])/2],M=this.transformInv_(x),D=[(n[0]+i[0])/2,(n[1]+i[1])/2],W=this.transformInv_(D);this.addQuad_(e,x,D,i,a,M,W,A,l-1),this.addQuad_(x,t,n,D,M,o,s,W,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}m&11||this.addTriangle_(e,n,i,a,s,A),m&14||this.addTriangle_(e,n,t,a,s,o),m&&(m&13||this.addTriangle_(t,i,e,o,A,a),m&7||this.addTriangle_(t,i,n,o,A,s))}},r.prototype.calculateSourceExtent=function(){var e=di();return this.triangles_.forEach(function(t,n,i){var a=t.source;Th(e,a[0]),Th(e,a[1]),Th(e,a[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}(),AD=HZ,Xf={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},lD={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},hE;function DR(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 cE(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function GZ(){if(hE===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",DR(r,4,5,4,0),DR(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;hE=cE(e,0)||cE(e,4)||cE(e,8)}return hE}function Mv(r,e,t,n){var i=wu(t,e,r),a=ym(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||ws(A,i)){var l=ym(r,a,i)/a;isFinite(l)&&l>0&&(a/=l)}return a}function kZ(r,e,t,n){var i=wa(t),a=Mv(r,e,i,n);return(!isFinite(a)||a<=0)&&P_(t,function(o){return a=Mv(r,e,o,n),isFinite(a)&&a>0}),a}function uD(r,e,t,n,i,a,o,s,A,l,u,h){var c=Ha(Math.round(t*r),Math.round(t*e));if(h||de(c,Xf),A.length===0)return c.canvas;c.scale(t,t);function f(B){return Math.round(B*t)/t}c.globalCompositeOperation="lighter";var d=di();A.forEach(function(B,R,O){mu(d,B.extent)});var v=Fr(d),y=ei(d),m=Ha(Math.round(t*v/n),Math.round(t*y/n));h||de(m,Xf);var w=t/n;A.forEach(function(B,R,O){var I=B.extent[0]-d[0],T=-(B.extent[3]-d[3]),L=Fr(B.extent),P=ei(B.extent);B.image.width>0&&B.image.height>0&&m.drawImage(B.image,l,l,B.image.width-2*l,B.image.height-2*l,I*w,T*w,L*w,P*w)});var C=Ss(o);return s.getTriangles().forEach(function(B,R,O){var I=B.source,T=B.target,L=I[0][0],P=I[0][1],S=I[1][0],x=I[1][1],M=I[2][0],D=I[2][1],W=f((T[0][0]-C[0])/a),z=f(-(T[0][1]-C[1])/a),tt=f((T[1][0]-C[0])/a),q=f(-(T[1][1]-C[1])/a),rt=f((T[2][0]-C[0])/a),nt=f(-(T[2][1]-C[1])/a),_t=L,F=P;L=0,P=0,S-=_t,x-=F,M-=_t,D-=F;var $=[[S,x,0,0,tt-W],[M,D,0,0,rt-W],[0,0,S,x,q-z],[0,0,M,D,nt-z]],j=q9($);if(j){if(c.save(),c.beginPath(),GZ()||!h){c.moveTo(tt,q);for(var X=4,it=W-tt,gt=z-q,wt=0;wt<X;wt++)c.lineTo(tt+f((wt+1)*it/X),q+f(wt*gt/(X-1))),wt!=X-1&&c.lineTo(tt+f((wt+1)*it/X),q+f((wt+1)*gt/(X-1)));c.lineTo(rt,nt)}else c.moveTo(tt,q),c.lineTo(W,z),c.lineTo(rt,nt);c.clip(),c.transform(j[0],j[2],j[1],j[3],W,z),c.translate(d[0]-_t,d[3]-F),c.scale(n/t,-n/t),c.drawImage(m.canvas,0,0),c.restore()}}),u&&(c.save(),c.globalCompositeOperation="source-over",c.strokeStyle="black",c.lineWidth=1,s.getTriangles().forEach(function(B,R,O){var I=B.target,T=(I[0][0]-C[0])/a,L=-(I[0][1]-C[1])/a,P=(I[1][0]-C[0])/a,S=-(I[1][1]-C[1])/a,x=(I[2][0]-C[0])/a,M=-(I[2][1]-C[1])/a;c.beginPath(),c.moveTo(P,S),c.lineTo(T,L),c.lineTo(x,M),c.closePath(),c.stroke()}),c.restore()),c.canvas}var $Z=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),VZ=function(r){$Z(e,r);function e(t,n,i,a,o,s,A,l,u,h,c,f){var d=r.call(this,o,ge.IDLE,{interpolate:!!f})||this;d.renderEdges_=c!==void 0?c:!1,d.pixelRatio_=A,d.gutter_=l,d.canvas_=null,d.sourceTileGrid_=n,d.targetTileGrid_=a,d.wrappedTileCoord_=s||o,d.sourceTiles_=[],d.sourcesListenerKeys_=null,d.sourceZ_=0;var v=a.getTileCoordExtent(d.wrappedTileCoord_),y=d.targetTileGrid_.getExtent(),m=d.sourceTileGrid_.getExtent(),w=y?Ko(v,y):v;if(wv(w)===0)return d.state=ge.EMPTY,d;var C=t.getExtent();C&&(m?m=Ko(m,C):m=C);var B=a.getResolution(d.wrappedTileCoord_[0]),R=kZ(t,i,w,B);if(!isFinite(R)||R<=0)return d.state=ge.EMPTY,d;var O=h!==void 0?h:sD;if(d.triangulation_=new AD(t,i,w,m,R*O,B),d.triangulation_.getTriangles().length===0)return d.state=ge.EMPTY,d;d.sourceZ_=n.getZForResolution(R);var I=d.triangulation_.calculateSourceExtent();if(m&&(t.canWrapX()?(I[1]=En(I[1],m[1],m[3]),I[3]=En(I[3],m[1],m[3])):I=Ko(I,m)),!wv(I))d.state=ge.EMPTY;else{for(var T=n.getTileRangeForExtentAndZ(I,d.sourceZ_),L=T.minX;L<=T.maxX;L++)for(var P=T.minY;P<=T.maxY;P++){var S=u(d.sourceZ_,L,P,A);S&&d.sourceTiles_.push(S)}d.sourceTiles_.length===0&&(d.state=ge.EMPTY)}return d}return e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(u,h,c){u&&u.getState()==ge.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(u.tileCoord),image:u.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=ge.ERROR;else{var n=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(n),a=typeof i=="number"?i:i[0],o=typeof i=="number"?i:i[1],s=this.targetTileGrid_.getResolution(n),A=this.sourceTileGrid_.getResolution(this.sourceZ_),l=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=uD(a,o,this.pixelRatio_,A,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=ge.LOADED}this.changed()},e.prototype.load=function(){if(this.state==ge.IDLE){this.state=ge.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(n,i,a){var o=n.getState();if(o==ge.IDLE||o==ge.LOADING){t++;var s=Pe(n,ye.CHANGE,function(A){var l=n.getState();(l==ge.LOADED||l==ge.ERROR||l==ge.EMPTY)&&(Rr(s),t--,t===0&&(this.unlistenSources_(),this.reproject_()))},this);this.sourcesListenerKeys_.push(s)}}.bind(this)),t===0?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function(n,i,a){var o=n.getState();o==ge.IDLE&&n.load()})}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(Rr),this.sourcesListenerKeys_=null},e}(Fb),Ib=VZ,hD=function(){function r(e,t,n,i){this.minX=e,this.maxX=t,this.minY=n,this.maxY=i}return r.prototype.contains=function(e){return this.containsXY(e[1],e[2])},r.prototype.containsTileRange=function(e){return this.minX<=e.minX&&e.maxX<=this.maxX&&this.minY<=e.minY&&e.maxY<=this.maxY},r.prototype.containsXY=function(e,t){return this.minX<=e&&e<=this.maxX&&this.minY<=t&&t<=this.maxY},r.prototype.equals=function(e){return this.minX==e.minX&&this.minY==e.minY&&this.maxX==e.maxX&&this.maxY==e.maxY},r.prototype.extend=function(e){e.minX<this.minX&&(this.minX=e.minX),e.maxX>this.maxX&&(this.maxX=e.maxX),e.minY<this.minY&&(this.minY=e.minY),e.maxY>this.maxY&&(this.maxY=e.maxY)},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 Dc(r,e,t,n,i){return i!==void 0?(i.minX=r,i.maxX=e,i.minY=t,i.maxY=n,i):new hD(r,e,t,n)}var Rb=hD,jZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),KZ=function(r){jZ(e,r);function e(t){var n=r.call(this,t)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=di(),n.tmpTileRange_=new Rb(0,0,0,0),n}return e.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==ge.LOADED||i==ge.EMPTY||i==ge.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()==ge.ERROR&&(A.getUseInterimTilesOnError()?A.getPreload()>0&&(this.newTiles_=!0):u.setState(ge.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=An(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!ws(o,a))return null;for(var s=n.pixelRatio,A=n.viewState.projection,l=n.viewState,u=i.getRenderSource(),h=u.getTileGridForProjection(l.projection),c=u.getTilePixelRatio(n.pixelRatio),f=h.getZForResolution(l.resolution);f>=h.getMinZoom();--f){var d=h.getTileCoordForCoordAndZ(a,f),v=u.getTile(f,d[1],d[2],s,A);if(!(v instanceof Mm||v instanceof Ib))return null;if(v.getState()===ge.LOADED){var y=h.getOrigin(f),m=Li(h.getTileSize(f)),w=h.getResolution(f),C=Math.floor(c*((a[0]-y[0])/w-d[1]*m[0])),B=Math.floor(c*((y[1]-a[1])/w-d[2]*m[1]));return this.getImageData(v.getImage(),C,B)}}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,h=this.getLayer(),c=h.getSource(),f=c.getRevision(),d=c.getTileGridForProjection(o),v=d.getZForResolution(s,c.zDirection),y=d.getResolution(v),m=t.extent,w=i.extent&&Co(i.extent);w&&(m=Ko(m,Co(i.extent)));var C=c.getTilePixelRatio(u),B=Math.round(t.size[0]*C),R=Math.round(t.size[1]*C);if(l){var O=Math.round(Math.sqrt(B*B+R*R));B=O,R=O}var I=y*B/2/C,T=y*R/2/C,L=[A[0]-I,A[1]-T,A[0]+I,A[1]+T],P=d.getTileRangeForExtentAndZ(m,v),S={};S[v]={};var x=this.createLoadedTileFinder(c,o,S),M=this.tmpExtent,D=this.tmpTileRange_;this.newTiles_=!1;for(var W=P.minX;W<=P.maxX;++W)for(var z=P.minY;z<=P.maxY;++z){var tt=this.getTile(v,W,z,t);if(this.isDrawableTile(tt)){var q=pe(this);if(tt.getState()==ge.LOADED){S[v][tt.tileCoord.toString()]=tt;var rt=tt.inTransition(q);!this.newTiles_&&(rt||this.renderedTiles.indexOf(tt)===-1)&&(this.newTiles_=!0)}if(tt.getAlpha(q,t.time)===1)continue}var nt=d.getTileCoordChildTileRange(tt.tileCoord,D,M),_t=!1;nt&&(_t=x(v+1,nt)),_t||d.forEachTileCoordParentTileRange(tt.tileCoord,x,D,M)}var F=y/s;Da(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/C,1/C,l,-B/2,-R/2);var $=DS(this.pixelTransform);this.useContainer(n,$,i.opacity,this.getBackground(t));var j=this.context,X=j.canvas;Xv(this.inversePixelTransform,this.pixelTransform),Da(this.tempTransform,B/2,R/2,F,F,0,-B/2,-R/2),X.width!=B||X.height!=R?(X.width=B,X.height=R):this.containerReused||j.clearRect(0,0,B,R),w&&this.clipUnrotated(j,t,w),c.getInterpolate()||de(j,Xf),this.preRender(j,t),this.renderedTiles.length=0;var it=Object.keys(S).map(Number);it.sort(gu);var gt,wt,at;i.opacity===1&&(!this.containerReused||c.getOpaque(t.viewState.projection))?it=it.reverse():(gt=[],wt=[]);for(var Pt=it.length-1;Pt>=0;--Pt){var Ot=it[Pt],K=c.getTilePixelSize(Ot,u,o),Z=d.getResolution(Ot),pt=Z/y,et=K[0]*pt*F,G=K[1]*pt*F,bt=d.getTileCoordForCoordAndZ(Ss(L),Ot),St=d.getTileCoordExtent(bt),dt=An(this.tempTransform,[C*(St[0]-L[0])/y,C*(L[3]-St[3])/y]),Et=C*c.getGutterForProjection(o),yt=S[Ot];for(var xt in yt){var tt=yt[xt],Lt=tt.tileCoord,Rt=bt[1]-Lt[1],Vt=Math.round(dt[0]-(Rt-1)*et),zt=bt[2]-Lt[2],ie=Math.round(dt[1]-(zt-1)*G),W=Math.round(dt[0]-Rt*et),z=Math.round(dt[1]-zt*G),ee=Vt-W,Xt=ie-z,oe=v===Ot,rt=oe&&tt.getAlpha(pe(this),t.time)!==1,Kt=!1;if(!rt)if(gt){at=[W,z,W+ee,z,W+ee,z+Xt,W,z+Xt];for(var Ye=0,Re=gt.length;Ye<Re;++Ye)if(v!==Ot&&Ot<wt[Ye]){var fr=gt[Ye];In([W,z,W+ee,z+Xt],[fr[0],fr[3],fr[4],fr[7]])&&(Kt||(j.save(),Kt=!0),j.beginPath(),j.moveTo(at[0],at[1]),j.lineTo(at[2],at[3]),j.lineTo(at[4],at[5]),j.lineTo(at[6],at[7]),j.moveTo(fr[6],fr[7]),j.lineTo(fr[4],fr[5]),j.lineTo(fr[2],fr[3]),j.lineTo(fr[0],fr[1]),j.clip())}gt.push(at),wt.push(Ot)}else j.clearRect(W,z,ee,Xt);this.drawTileImage(tt,t,W,z,ee,Xt,Et,oe),gt&&!rt?(Kt&&j.restore(),this.renderedTiles.unshift(tt)):this.renderedTiles.push(tt),this.updateUsedTiles(t.usedTiles,c,tt)}}this.renderedRevision=f,this.renderedResolution=y,this.extentChanged=!this.renderedExtent_||!nA(this.renderedExtent_,L),this.renderedExtent_=L,this.renderedPixelRatio=u,this.renderedProjection=o,this.manageTilePyramid(t,c,d,u,o,m,v,h.getPreload()),this.scheduleExpireCache(t,c),this.postRender(j,t),i.extent&&j.restore(),de(j,lD),$!==X.style.transform&&(X.style.transform=$);var be=P2(i.opacity),xe=this.container;return be!==xe.style.opacity&&(xe.style.opacity=be),this.container},e.prototype.drawTileImage=function(t,n,i,a,o,s,A,l){var u=this.getTileImage(t);if(u){var h=pe(this),c=l?t.getAlpha(h,n.time):1,f=c!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=c),this.context.drawImage(u,A,A,u.width-2*A,u.height-2*A,i,a,o,s),f&&this.context.restore(),c!==1?n.animate=!0:l&&t.endTransition(h)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,n){if(n.canExpireCache()){var i=function(a,o,s){var A=pe(a);A in s.usedTiles&&a.expireCache(s.viewState.projection,s.usedTiles[A])}.bind(null,n);t.postRenderFunctions.push(i)}},e.prototype.updateUsedTiles=function(t,n,i){var a=pe(n);a in t||(t[a]={}),t[a][i.getKey()]=!0},e.prototype.manageTilePyramid=function(t,n,i,a,o,s,A,l,u){var h=pe(n);h in t.wantedTiles||(t.wantedTiles[h]={});var c=t.wantedTiles[h],f=t.tileQueue,d=i.getMinZoom(),v=0,y,m,w,C,B,R;for(R=d;R<=A;++R)for(m=i.getTileRangeForExtentAndZ(s,R,m),w=i.getResolution(R),C=m.minX;C<=m.maxX;++C)for(B=m.minY;B<=m.maxY;++B)A-R<=l?(++v,y=n.getTile(R,C,B,a,o),y.getState()==ge.IDLE&&(c[y.getKey()]=!0,f.isKeyQueued(y.getKey())||f.enqueue([y,h,i.getTileCoordCenter(y.tileCoord),w])),u!==void 0&&u(y)):n.useTile(R,C,B,o);n.updateCacheSize(v,o)},e}(_b),cD=KZ,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)}}(),zZ=function(r){YZ(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new cD(this)},e}(oD),Ob=zZ;const XZ={props:{className:{type:String,default:"ol-layer"},opacity:{type:Number,default:1},visible:{type:Boolean,default:!0},extent:{type:Array},zIndex:{type:Number},minResolution:{type:Number},maxResolution:{type:Number},minZoom:{type:Number},maxZoom:{type:Number},title:{type:String},name:{type:String},preview:{type:String},baseLayer:{type:Boolean},properties:{type:Object,default:()=>{}}}};function WZ(r,e,t,n,i,a){return Sn(),Ii("div")}var tc=le(XZ,[["render",WZ]]);const qZ={extends:tc,name:"ol-tile-layer",setup(r){const e=Ce("map"),t=Ce("overviewMap",null),{properties:n}=dr(r),i=pr(()=>new Ob(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&&ce(t,()=>{o(),a()}),ir(()=>{a()}),Ar(()=>{o()}),Gr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function ZZ(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var RB=le(qZ,[["render",ZZ]]),JZ=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 _e(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 _e(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){_e(!(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}(),fD=JZ,tJ=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)}}(),eJ=function(r){tJ(e,r);function e(t){var n=this,i=ge.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=ge.LOADING,this.changed();var t=this;this.loader_().then(function(n){t.data_=n,t.state=ge.LOADED,t.changed()}).catch(function(n){t.error_=n,t.state=ge.ERROR,t.changed()})},e}(Fb),rJ=eJ,Pv=34962,Z_=34963,nJ=35040,Mb=35044,N0=35048,iJ=5121,aJ=5123,oJ=5125,pD=5126,QR=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function dD(r,e){for(var t=de({preserveDrawingBuffer:!0,antialias:!F9},e),n=QR.length,i=0;i<n;++i)try{var a=r.getContext(QR[i],t);if(a)return a}catch{}return null}var sJ={STATIC_DRAW:Mb,STREAM_DRAW:nJ,DYNAMIC_DRAW:N0},AJ=function(){function r(e,t){this.array=null,this.type=e,_e(e===Pv||e===Z_,62),this.usage=t!==void 0?t:sJ.STATIC_DRAW}return r.prototype.ofSize=function(e){this.array=new(fE(this.type))(e)},r.prototype.fromArray=function(e){var t=fE(this.type);this.array=t.from?t.from(e):new t(e)},r.prototype.fromArrayBuffer=function(e){this.array=new(fE(this.type))(e)},r.prototype.getType=function(){return this.type},r.prototype.getArray=function(){return this.array},r.prototype.getUsage=function(){return this.usage},r.prototype.getSize=function(){return this.array?this.array.length:0},r}();function fE(r){switch(r){case Pv:return Float32Array;case Z_:return Uint32Array;default:return Float32Array}}var ev=AJ,lJ=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 vD(r,e,t){var n=t?r.LINEAR:r.NEAREST;r.bindTexture(r.TEXTURE_2D,e),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MIN_FILTER,n),r.texParameteri(r.TEXTURE_2D,r.TEXTURE_MAG_FILTER,n)}function uJ(r,e,t,n){vD(r,e,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t)}function HR(r,e,t,n,i,a){var o=r.getGL(),s,A;if(t instanceof Float32Array){s=o.FLOAT,r.getExtension("OES_texture_float");var l=r.getExtension("OES_texture_float_linear");A=l!==null}else s=o.UNSIGNED_BYTE,A=!0;vD(o,e,a&&A);var u=t.byteLength/n[1],h=1;u%8===0?h=8:u%4===0?h=4:u%2===0&&(h=2);var c;switch(i){case 1:{c=o.LUMINANCE;break}case 2:{c=o.LUMINANCE_ALPHA;break}case 3:{c=o.RGB;break}case 4:{c=o.RGBA;break}default:throw new Error("Unsupported number of bands: ".concat(i))}var f=o.getParameter(o.UNPACK_ALIGNMENT);o.pixelStorei(o.UNPACK_ALIGNMENT,h),o.texImage2D(o.TEXTURE_2D,0,c,n[0],n[1],0,c,s,t),o.pixelStorei(o.UNPACK_ALIGNMENT,f)}var Pd=null;function hJ(){var r=document.createElement("canvas");r.width=1,r.height=1,Pd=r.getContext("2d")}var cJ=function(r){lJ(e,r);function e(t){var n=r.call(this)||this;n.tile,n.textures=[],n.handleTileChange_=n.handleTileChange_.bind(n),n.size=Li(t.grid.getTileSize(t.tile.tileCoord[0])),n.tilePixelRatio_=t.tilePixelRatio||1,n.gutter_=t.gutter||0,n.bandCount=NaN,n.helper_=t.helper;var i=new ev(Pv,Mb);return i.fromArray([0,1,1,1,1,0,0,0]),n.helper_.flushBufferData(i),n.coords=i,n.setTile(t.tile),n}return e.prototype.setTile=function(t){if(t!==this.tile)if(this.tile&&this.tile.removeEventListener(ye.CHANGE,this.handleTileChange_),this.tile=t,this.textures.length=0,this.loaded=t.getState()===ge.LOADED,this.loaded)this.uploadTile_();else{if(t instanceof Mm){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(ye.CHANGE,this.handleTileChange_)}},e.prototype.uploadTile_=function(){var t=this.helper_,n=t.getGL(),i=this.tile;if(i instanceof Mm||i instanceof Ib){var a=i.getImage();if(this.gutter_!==0){var o=this.tilePixelRatio_*this.gutter_,s=Math.round(a.width-2*o),A=Math.round(a.height-2*o),l=Ha(s,A);i.interpolate||de(l,Xf),l.drawImage(a,o,o,s,A,0,0,s,A),a=l.canvas}var u=n.createTexture();this.textures.push(u),this.bandCount=4,uJ(n,u,a,i.interpolate);return}var h=[this.size[0]*this.tilePixelRatio_,this.size[1]*this.tilePixelRatio_],c=i.getData(),f=c instanceof Float32Array,d=h[0]*h[1],v=f?Float32Array:Uint8Array,y=v.BYTES_PER_ELEMENT,m=c.byteLength/h[1];this.bandCount=Math.floor(m/y/h[0]);var w=Math.ceil(this.bandCount/4);if(w===1){var u=n.createTexture();this.textures.push(u),HR(t,u,c,h,this.bandCount,i.interpolate);return}for(var C=new Array(w),B=0;B<w;++B){var u=n.createTexture();this.textures.push(u);var R=B<w-1?4:this.bandCount%4;C[B]=new v(d*R)}for(var O=0,I=0,T=h[0]*this.bandCount,L=0;L<h[1];++L){for(var P=0;P<T;++P){var S=c[I+P],x=Math.floor(O/this.bandCount),M=P%this.bandCount,B=Math.floor(M/4),D=C[B],R=D.length/d,W=M%4;D[x*R+W]=S,++O}I+=m/y}for(var B=0;B<w;++B){var u=this.textures[B],D=C[B],R=D.length/d;HR(t,u,D,h,R,i.interpolate)}},e.prototype.handleTileChange_=function(){this.tile.getState()===ge.LOADED&&(this.loaded=!0,this.uploadTile_(),this.dispatchEvent(ye.CHANGE))},e.prototype.disposeInternal=function(){var t=this.helper_.getGL();this.helper_.deleteBuffer(this.coords);for(var n=0;n<this.textures.length;++n)t.deleteTexture(this.textures[n]);this.tile.removeEventListener(ye.CHANGE,this.handleTileChange_)},e.prototype.getPixelData=function(t,n){if(!this.loaded)return null;if(t=Math.floor(this.tilePixelRatio_*t),n=Math.floor(this.tilePixelRatio_*n),this.tile instanceof rJ){var i=this.tile.getData(),a=Math.floor(this.tilePixelRatio_*this.size[0]);if(i instanceof DataView){var o=i.byteLength/(this.size[0]*this.size[1]),s=n*a*o+t*o,A=i.buffer.slice(s,s+o);return new DataView(A)}var l=n*a*this.bandCount+t*this.bandCount;return i.slice(l,l+this.bandCount)}Pd||hJ(),Pd.clearRect(0,0,1,1);var u,h=this.tile.getImage();try{Pd.drawImage(h,t,n,1,1,0,0,1,1),u=Pd.getImageData(0,0,1,1).data}catch{return null}return u},e}(Wh),fJ=cJ,Oy={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},pJ=`
|
||
precision mediump float;
|
||
|
||
attribute vec2 a_position;
|
||
varying vec2 v_texCoord;
|
||
varying vec2 v_screenCoord;
|
||
|
||
uniform vec2 u_screenSize;
|
||
|
||
void main() {
|
||
v_texCoord = a_position * 0.5 + 0.5;
|
||
v_screenCoord = v_texCoord * u_screenSize;
|
||
gl_Position = vec4(a_position, 0.0, 1.0);
|
||
}
|
||
`,dJ=`
|
||
precision mediump float;
|
||
|
||
uniform sampler2D u_image;
|
||
uniform float u_opacity;
|
||
|
||
varying vec2 v_texCoord;
|
||
|
||
void main() {
|
||
gl_FragColor = texture2D(u_image, v_texCoord) * u_opacity;
|
||
}
|
||
`,vJ=function(){function r(e){this.gl_=e.webGlContext;var t=this.gl_;this.scaleRatio_=e.scaleRatio||1,this.renderTargetTexture_=t.createTexture(),this.renderTargetTextureSize_=null,this.frameBuffer_=t.createFramebuffer();var n=t.createShader(t.VERTEX_SHADER);t.shaderSource(n,e.vertexShader||pJ),t.compileShader(n);var i=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,e.fragmentShader||dJ),t.compileShader(i),this.renderTargetProgram_=t.createProgram(),t.attachShader(this.renderTargetProgram_,n),t.attachShader(this.renderTargetProgram_,i),t.linkProgram(this.renderTargetProgram_),this.renderTargetVerticesBuffer_=t.createBuffer();var a=[-1,-1,1,-1,-1,1,1,-1,1,1,-1,1];t.bindBuffer(t.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),t.bufferData(t.ARRAY_BUFFER,new Float32Array(a),t.STATIC_DRAW),this.renderTargetAttribLocation_=t.getAttribLocation(this.renderTargetProgram_,"a_position"),this.renderTargetUniformLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_screenSize"),this.renderTargetOpacityLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_opacity"),this.renderTargetTextureLocation_=t.getUniformLocation(this.renderTargetProgram_,"u_image"),this.uniforms_=[],e.uniforms&&Object.keys(e.uniforms).forEach(function(o){this.uniforms_.push({value:e.uniforms[o],location:t.getUniformLocation(this.renderTargetProgram_,o)})}.bind(this))}return r.prototype.getGL=function(){return this.gl_},r.prototype.init=function(e){var t=this.getGL(),n=[t.drawingBufferWidth*this.scaleRatio_,t.drawingBufferHeight*this.scaleRatio_];if(t.bindFramebuffer(t.FRAMEBUFFER,this.getFrameBuffer()),t.viewport(0,0,n[0],n[1]),!this.renderTargetTextureSize_||this.renderTargetTextureSize_[0]!==n[0]||this.renderTargetTextureSize_[1]!==n[1]){this.renderTargetTextureSize_=n;var i=0,a=t.RGBA,o=0,s=t.RGBA,A=t.UNSIGNED_BYTE,l=null;t.bindTexture(t.TEXTURE_2D,this.renderTargetTexture_),t.texImage2D(t.TEXTURE_2D,i,a,n[0],n[1],o,s,A,l),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.renderTargetTexture_,0)}},r.prototype.apply=function(e,t,n,i){var a=this.getGL(),o=e.size;if(a.bindFramebuffer(a.FRAMEBUFFER,t?t.getFrameBuffer():null),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.renderTargetTexture_),!t){var s=pe(a.canvas);if(!e.renderTargets[s]){var A=a.getContextAttributes();A&&A.preserveDrawingBuffer&&(a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT)),e.renderTargets[s]=!0}}a.enable(a.BLEND),a.blendFunc(a.ONE,a.ONE_MINUS_SRC_ALPHA),a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight),a.bindBuffer(a.ARRAY_BUFFER,this.renderTargetVerticesBuffer_),a.useProgram(this.renderTargetProgram_),a.enableVertexAttribArray(this.renderTargetAttribLocation_),a.vertexAttribPointer(this.renderTargetAttribLocation_,2,a.FLOAT,!1,0,0),a.uniform2f(this.renderTargetUniformLocation_,o[0],o[1]),a.uniform1i(this.renderTargetTextureLocation_,0);var l=e.layerStatesArray[e.layerIndex].opacity;a.uniform1f(this.renderTargetOpacityLocation_,l),this.applyUniforms(e),n&&n(a,e),a.drawArrays(a.TRIANGLES,0,6),i&&i(a,e)},r.prototype.getFrameBuffer=function(){return this.frameBuffer_},r.prototype.applyUniforms=function(e){var t=this.getGL(),n,i=1;this.uniforms_.forEach(function(a){if(n=typeof a.value=="function"?a.value(e):a.value,n instanceof HTMLCanvasElement||n instanceof ImageData)a.texture||(a.texture=t.createTexture()),t.activeTexture(t["TEXTURE".concat(i)]),t.bindTexture(t.TEXTURE_2D,a.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),n instanceof ImageData?t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,n.width,n.height,0,t.UNSIGNED_BYTE,new Uint8Array(n.data)):t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n),t.uniform1i(a.location,i++);else if(Array.isArray(n))switch(n.length){case 2:t.uniform2f(a.location,n[0],n[1]);return;case 3:t.uniform3f(a.location,n[0],n[1],n[2]);return;case 4:t.uniform4f(a.location,n[0],n[1],n[2],n[3]);return;default:return}else typeof n=="number"&&t.uniform1f(a.location,n)})},r}(),GR=vJ;function gD(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function U0(r,e){return r[0]=e[0],r[1]=e[1],r[4]=e[2],r[5]=e[3],r[12]=e[4],r[13]=e[5],r}var gJ=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)}}(),af={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"},Ho={UNSIGNED_BYTE:iJ,UNSIGNED_SHORT:aJ,UNSIGNED_INT:oJ,FLOAT:pD},Pm={};function kR(r){return"shared/"+r}var $R=0;function yJ(){var r="unique/"+$R;return $R+=1,r}function mJ(r){var e=Pm[r];if(!e){var t=document.createElement("canvas");t.style.position="absolute",t.style.left="0",e={users:0,canvas:t},Pm[r]=e}return e.users+=1,e.canvas}function _J(r){var e=Pm[r];if(e&&(e.users-=1,!(e.users>0))){var t=e.canvas,n=dD(t),i=n.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete Pm[r]}}var wJ=function(r){gJ(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?kR(i.canvasCacheKey):yJ(),n.canvas_=mJ(n.canvasCacheKey_),n.gl_=dD(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(Oy.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(Oy.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=Jn(),n.offsetScaleMatrix_=Jn(),n.tmpMat4_=gD(),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 GR({webGlContext:a,scaleRatio:o.scaleRatio,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,uniforms:o.uniforms})}):[new GR({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_===kR(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=pe(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=pe(t),a=this.bufferCache_[i];a&&!n.isContextLost()&&n.deleteBuffer(a.webGlBuffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(Oy.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(Oy.RESTORED,this.boundHandleWebGLContextRestored_),_J(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;a<o;a++)a===o-1?this.postProcessPasses_[a].apply(t,null,n,i):this.postProcessPasses_[a].apply(t,this.postProcessPasses_[a+1])},e.prototype.getCanvas=function(){return this.canvas_},e.prototype.getGL=function(){return this.gl_},e.prototype.applyFrameState=function(t){var n=t.size,i=t.viewState.rotation,a=Wd(this.offsetScaleMatrix_);qd(a,2/n[0],2/n[1]);var o=Wd(this.offsetRotateMatrix_);i!==0&&N9(o,-i),this.setUniformMatrixValue(af.OFFSET_SCALE_MATRIX,U0(this.tmpMat4_,a)),this.setUniformMatrixValue(af.OFFSET_ROTATION_MATRIX,U0(this.tmpMat4_,o)),this.setUniformFloatValue(af.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(af.ZOOM,t.viewState.zoom),this.setUniformFloatValue(af.RESOLUTION,t.viewState.resolution)},e.prototype.applyUniforms=function(t){var n=this.getGL(),i,a=0;this.uniforms_.forEach(function(o){if(i=typeof o.value=="function"?o.value(t):o.value,i instanceof HTMLCanvasElement||i instanceof HTMLImageElement||i instanceof ImageData){o.texture||(o.prevValue=void 0,o.texture=n.createTexture()),n.activeTexture(n["TEXTURE".concat(a)]),n.bindTexture(n.TEXTURE_2D,o.texture),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE);var s=!(i instanceof HTMLImageElement)||i.complete;s&&o.prevValue!==i&&(o.prevValue=i,n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,i)),n.uniform1i(this.getUniformLocation(o.name),a++)}else if(Array.isArray(i)&&i.length===6)this.setUniformMatrixValue(o.name,U0(this.tmpMat4_,i));else if(Array.isArray(i)&&i.length<=4)switch(i.length){case 2:n.uniform2f(this.getUniformLocation(o.name),i[0],i[1]);return;case 3:n.uniform3f(this.getUniformLocation(o.name),i[0],i[1],i[2]);return;case 4:n.uniform4f(this.getUniformLocation(o.name),i[0],i[1],i[2],i[3]);return;default:return}else typeof i=="number"&&n.uniform1f(this.getUniformLocation(o.name),i)}.bind(this))},e.prototype.useProgram=function(t){if(t==this.currentProgram_)return!1;var n=this.getGL();return n.useProgram(t),this.currentProgram_=t,this.uniformLocations_={},this.attribLocations_={},!0},e.prototype.compileShader=function(t,n){var i=this.getGL(),a=i.createShader(n);return i.shaderSource(a,t),i.compileShader(a),a},e.prototype.getProgram=function(t,n){var i=this.getGL(),a=this.compileShader(t,i.FRAGMENT_SHADER),o=this.compileShader(n,i.VERTEX_SHADER),s=i.createProgram();if(i.attachShader(s,a),i.attachShader(s,o),i.linkProgram(s),!i.getShaderParameter(a,i.COMPILE_STATUS)){var A="Fragment shader compliation failed: ".concat(i.getShaderInfoLog(a));throw new Error(A)}if(i.deleteShader(a),!i.getShaderParameter(o,i.COMPILE_STATUS)){var A="Vertex shader compilation failed: ".concat(i.getShaderInfoLog(o));throw new Error(A)}if(i.deleteShader(o),!i.getProgramParameter(s,i.LINK_STATUS)){var A="GL program linking failed: ".concat(i.getShaderInfoLog(o));throw new Error(A)}return s},e.prototype.getUniformLocation=function(t){return this.uniformLocations_[t]===void 0&&(this.uniformLocations_[t]=this.getGL().getUniformLocation(this.currentProgram_,t)),this.uniformLocations_[t]},e.prototype.getAttributeLocation=function(t){return this.attribLocations_[t]===void 0&&(this.attribLocations_[t]=this.getGL().getAttribLocation(this.currentProgram_,t)),this.attribLocations_[t]},e.prototype.makeProjectionTransform=function(t,n){var i=t.size,a=t.viewState.rotation,o=t.viewState.resolution,s=t.viewState.center;return Wd(n),Da(n,0,0,2/(o*i[0]),2/(o*i[1]),-a,-s[0],-s[1]),n},e.prototype.setUniformFloatValue=function(t,n){this.getGL().uniform1f(this.getUniformLocation(t),n)},e.prototype.setUniformFloatVec4=function(t,n){this.getGL().uniform4fv(this.getUniformLocation(t),n)},e.prototype.setUniformMatrixValue=function(t,n){this.getGL().uniformMatrix4fv(this.getUniformLocation(t),!1,n)},e.prototype.enableAttributeArray_=function(t,n,i,a,o){var s=this.getAttributeLocation(t);s<0||(this.getGL().enableVertexAttribArray(s),this.getGL().vertexAttribPointer(s,n,i,!1,a,o))},e.prototype.enableAttributes=function(t){for(var n=EJ(t),i=0,a=0;a<t.length;a++){var o=t[a];this.enableAttributeArray_(o.name,o.size,o.type||pD,n,i),i+=o.size*yD(o.type)}},e.prototype.handleWebGLContextLost=function(){Xh(this.bufferCache_),this.currentProgram_=null},e.prototype.handleWebGLContextRestored=function(){},e.prototype.createTexture=function(t,n,i){var a=this.getGL(),o=i||a.createTexture(),s=0,A=a.RGBA,l=0,u=a.RGBA,h=a.UNSIGNED_BYTE;return a.bindTexture(a.TEXTURE_2D,o),n?a.texImage2D(a.TEXTURE_2D,s,A,u,h,n):a.texImage2D(a.TEXTURE_2D,s,A,t[0],t[1],l,u,h,null),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),o},e}(F_);function EJ(r){for(var e=0,t=0;t<r.length;t++){var n=r[t];e+=n.size*yD(n.type)}return e}function yD(r){switch(r){case Ho.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Ho.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Ho.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Ho.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var CJ=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)}}(),pE={GENERATE_BUFFERS:"GENERATE_BUFFERS"},BJ=function(r){CJ(e,r);function e(t,n){var i=r.call(this,t)||this,a=n||{};return i.inversePixelTransform_=Jn(),i.pixelContext_=null,i.postProcesses_=a.postProcesses,i.uniforms_=a.uniforms,i.helper,t.addChangeListener(Nr.MAP,i.removeHelper.bind(i)),i.dispatchPreComposeEvent=i.dispatchPreComposeEvent.bind(i),i.dispatchPostComposeEvent=i.dispatchPostComposeEvent.bind(i),i}return e.prototype.dispatchPreComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(to.PRECOMPOSE)){var a=new Zd(to.PRECOMPOSE,void 0,n,t);i.dispatchEvent(a)}},e.prototype.dispatchPostComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(to.POSTCOMPOSE)){var a=new Zd(to.POSTCOMPOSE,void 0,n,t);i.dispatchEvent(a)}},e.prototype.reset=function(t){this.uniforms_=t.uniforms,this.helper&&this.helper.setUniforms(this.uniforms_)},e.prototype.removeHelper=function(){this.helper&&(this.helper.dispose(),delete this.helper)},e.prototype.prepareFrame=function(t){if(this.getLayer().getRenderSource()){for(var n=!0,i=-1,a=void 0,o=0,s=t.layerStatesArray.length;o<s;o++){var A=t.layerStatesArray[o].layer,l=A.getRenderer();if(!(l instanceof e)){n=!0;continue}var u=A.getClassName();if((n||u!==a)&&(i+=1,n=!1),a=u,l===this)break}var h="map/"+t.mapId+"/group/"+i;(!this.helper||!this.helper.canvasCacheKeyMatches(h))&&(this.removeHelper(),this.helper=new wJ({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:h}),a&&(this.helper.getCanvas().className=a),this.afterHelperCreated())}return this.prepareFrameInternal(t)},e.prototype.afterHelperCreated=function(){},e.prototype.prepareFrameInternal=function(t){return!0},e.prototype.disposeInternal=function(){this.removeHelper(),r.prototype.disposeInternal.call(this)},e.prototype.dispatchRenderEvent_=function(t,n,i){var a=this.getLayer();if(a.hasListener(t)){Da(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var o=new Zd(t,this.inversePixelTransform_,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.dispatchRenderEvent_(to.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(to.POSTRENDER,t,n)},e.prototype.getDataAtPixel=function(t,n,i){var a=An([n.pixelRatio,0,0,n.pixelRatio,0,0],t.slice()),o=this.helper.getGL();if(!o)return null;var s=this.getLayer(),A=s.getExtent();if(A){var l=An(n.pixelToCoordinateTransform,t.slice());if(!ws(A,l))return null}var u=o.getContextAttributes();if(!u||!u.preserveDrawingBuffer)return new Uint8Array;var h=Math.round(a[0]),c=Math.round(a[1]),f=this.pixelContext_;if(!f){var d=document.createElement("canvas");d.width=1,d.height=1,f=d.getContext("2d"),this.pixelContext_=f}f.clearRect(0,0,1,1);var v;try{f.drawImage(o.canvas,h,c,1,1,0,0,1,1),v=f.getImageData(0,0,1,1).data}catch{return v}return v[3]===0?null:v},e}(CU);function TJ(r,e){var t=e||[],n=256,i=n-1;return t[0]=Math.floor(r/n/n/n)/i,t[1]=Math.floor(r/n/n)%n/i,t[2]=Math.floor(r/n)%n/i,t[3]=r%n/i,t}function xJ(r){var e=0,t=256,n=t-1;return e+=Math.round(r[0]*t*t*t*n),e+=Math.round(r[1]*t*t*n),e+=Math.round(r[2]*t*n),e+=Math.round(r[3]*n),e}var mD=BJ;function Nv(r,e,t,n){return n!==void 0?(n[0]=r,n[1]=e,n[2]=t,n):[r,e,t]}function J_(r,e,t){return r+"/"+e+"/"+t}function Uv(r){return J_(r[0],r[1],r[2])}function SJ(r){return r.split("/").map(Number)}function _D(r){return(r[1]<<r[0])+r[2]}function bJ(r,e){var t=r[0],n=r[1],i=r[2];if(e.getMinZoom()>t||t>e.getMaxZoom())return!1;var a=e.getFullTileRange(t);return a?a.containsXY(n,i):!0}var LJ=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)}}(),Xe={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"},D0={TEXTURE_COORD:"a_textureCoord"},FJ=[{name:D0.TEXTURE_COORD,size:2,type:Ho.FLOAT}],IJ={};function RJ(r){return 2*(1-1/(r+1))-1}function VR(r,e,t){t in r||(r[t]=[]),r[t].push(e)}function dE(r,e){var t=r.layerStatesArray[r.layerIndex];t.extent&&(e=Ko(e,Co(t.extent,r.viewState.projection)));var n=t.layer.getRenderSource();if(!n.getWrapX()){var i=n.getTileGridForProjection(r.viewState.projection).getExtent();i&&(e=Ko(e,i))}return e}function vE(r,e){return"".concat(r.getKey(),",").concat(Uv(e))}var OJ=function(r){LJ(e,r);function e(t,n){var i=r.call(this,t,{uniforms:n.uniforms})||this;i.renderComplete=!1,i.tileTransform_=Jn(),i.tempMat4_=gD(),i.tempTileRange_=new Rb(0,0,0,0),i.tempTileCoord_=Nv(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.indices_=new ev(Z_,Mb),i.indices_.fromArray([0,1,3,1,2,3]);var a=n.cacheSize!==void 0?n.cacheSize:512;return i.tileTextureCache_=new fD(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==ge.LOADED||i==ge.EMPTY||i==ge.ERROR&&!a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getRenderSource();return!i||up(dE(t,t.extent))?!1:i.getState()===Oa.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),h=A.getGutterForProjection(o.projection),c=pe(A);c in t.wantedTiles||(t.wantedTiles[c]={});for(var f=t.wantedTiles[c],d=this.tileTextureCache_,v=Math.max(i-s.getPreload(),l.getMinZoom(),s.getMinZoom()),y=i;y>=v;--y)for(var m=l.getTileRangeForExtentAndZ(n,y,this.tempTileRange_),w=l.getResolution(y),C=m.minX;C<=m.maxX;++C)for(var B=m.minY;B<=m.maxY;++B){var R=Nv(y,C,B,this.tempTileCoord_),O=vE(A,R),I=void 0,T=void 0;if(d.containsKey(O)&&(I=d.get(O),T=I.tile),!I||I.tile.key!==A.getKey())if(T=A.getTile(y,C,B,t.pixelRatio,o.projection),!I)I=new fJ({tile:T,grid:l,helper:this.helper,tilePixelRatio:u,gutter:h}),d.set(O,I);else if(this.isDrawableTile_(T))I.setTile(T);else{var L=T.getInterimTile();I.setTile(L)}VR(a,I,y);var P=T.getKey();f[P]=!0,T.getState()===ge.IDLE&&(t.tileQueue.isKeyQueued(P)||t.tileQueue.enqueue([T,c,l.getTileCoordCenter(R),w]))}},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=dE(t,t.extent),l=s.getZForResolution(i.resolution,o.zDirection),u={};if(t.nextExtent){var h=s.getZForResolution(i.nextResolution,o.zDirection),c=dE(t,t.nextExtent);this.enqueueTiles(t,c,h,u)}this.enqueueTiles(t,A,l,u);for(var f={},d=pe(this),v=t.time,y=!1,m=u[l],w=0,C=m.length;w<C;++w){var B=m[w],R=B.tile,O=R.tileCoord;if(B.loaded){var I=R.getAlpha(d,v);if(I===1){R.endTransition(d);continue}y=!0;var T=Uv(O);f[T]=I}this.renderComplete=!1;var L=this.findAltTiles_(s,O,l+1,u);if(!L)for(var P=s.getMinZoom(),S=l-1;S>=P;--S){var x=this.findAltTiles_(s,O,S,u);if(x)break}}this.helper.useProgram(this.program_),this.helper.prepareDraw(t,!y);for(var M=Object.keys(u).map(Number).sort(gu),D=i.center[0],W=i.center[1],z=0,tt=M.length;z<tt;++z)for(var q=M[z],rt=s.getResolution(q),nt=Li(s.getTileSize(q),this.tempSize_),_t=s.getOrigin(q),F=(D-_t[0])/(nt[0]*rt),$=(_t[1]-W)/(nt[1]*rt),j=i.resolution/rt,X=RJ(q),it=u[q],w=0,C=it.length;w<C;++w){var B=it[w];if(B.loaded){var R=B.tile,O=R.tileCoord,T=Uv(O),gt=O[1],wt=O[2];Da(this.tileTransform_,0,0,2/(t.size[0]*j/nt[0]),-2/(t.size[1]*j/nt[1]),i.rotation,-(F-gt),-($-wt)),this.helper.setUniformMatrixValue(Xe.TILE_TRANSFORM,U0(this.tempMat4_,this.tileTransform_)),this.helper.bindBuffer(B.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(FJ);for(var at=0;at<B.textures.length;){var Pt="TEXTURE"+at,Ot="".concat(Xe.TILE_TEXTURE_ARRAY,"[").concat(at,"]");n.activeTexture(n[Pt]),n.bindTexture(n.TEXTURE_2D,B.textures[at]),n.uniform1i(this.helper.getUniformLocation(Ot),at),++at}for(var K=0;K<this.paletteTextures_.length;++K){var Z=this.paletteTextures_[K];n.activeTexture(n["TEXTURE"+at]);var pt=Z.getTexture(n);n.bindTexture(n.TEXTURE_2D,pt),n.uniform1i(this.helper.getUniformLocation(Z.name),at),++at}var I=T in f?f[T]:1;I<1&&(t.animate=!0),this.helper.setUniformFloatValue(Xe.TRANSITION_ALPHA,I),this.helper.setUniformFloatValue(Xe.DEPTH,X),this.helper.setUniformFloatValue(Xe.TEXTURE_PIXEL_WIDTH,nt[0]),this.helper.setUniformFloatValue(Xe.TEXTURE_PIXEL_HEIGHT,nt[1]),this.helper.setUniformFloatValue(Xe.TEXTURE_RESOLUTION,rt),this.helper.setUniformFloatValue(Xe.TEXTURE_ORIGIN_X,_t[0]+gt*nt[0]*rt),this.helper.setUniformFloatValue(Xe.TEXTURE_ORIGIN_Y,_t[1]-wt*nt[1]*rt),this.helper.setUniformFloatVec4(Xe.RENDER_EXTENT,A),this.helper.setUniformFloatValue(Xe.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(Xe.ZOOM,i.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var et=this.helper.getCanvas(),G=this.tileTextureCache_;G.canExpireCache();){var B=G.pop();B.dispose()}var bt=function(St,dt){o.expireCache(dt.viewState.projection,IJ)};return t.postRenderFunctions.push(bt),this.postRender(n,t),et},e.prototype.getData=function(t){var n=this.helper.getGL();if(!n)return null;var i=this.frameState_;if(!i)return null;var a=this.getLayer(),o=An(i.pixelToCoordinateTransform,t.slice()),s=i.viewState,A=a.getExtent();if(A&&!ws(Co(A,s.projection),o))return null;var l=a.getRenderSource(),u=l.getTileGridForProjection(s.projection);if(!l.getWrapX()){var h=u.getExtent();if(h&&!ws(h,o))return null}for(var c=this.tileTextureCache_,f=u.getZForResolution(s.resolution);f>=u.getMinZoom();--f){var d=u.getTileCoordForCoordAndZ(o,f),v=vE(l,d);if(c.containsKey(v)){var y=c.get(v);if(y.loaded){var m=u.getOrigin(f),w=Li(u.getTileSize(f)),C=u.getResolution(f),B=(o[0]-m[0])/C-d[1]*w[0],R=(m[1]-o[1])/C-d[2]*w[1];return y.getPixelData(B,R)}}}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 h=o.minY;h<=o.maxY;++h){var c=vE(l,[i,u,h]),f=!1;if(A.containsKey(c)){var d=A.get(c);d.loaded&&(VR(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}(mD),MJ=OJ,PJ=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}(),NJ=PJ,Jt={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},er={};function oA(r){if(typeof r=="number")return Jt.NUMBER;if(typeof r=="boolean")return Jt.BOOLEAN;if(typeof r=="string")return J9(r)?Jt.COLOR|Jt.STRING:Jt.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?Jt.COLOR|Jt.NUMBER_ARRAY:Jt.NUMBER_ARRAY;if(typeof e[0]!="string")throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(e)));var n=er[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.getReturnType(e.slice(1))}function UJ(r){return C2(r)%1===0}function t1(r){var e=r.toString();return e.indexOf(".")===-1?e+".0":e}function wD(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(t1).join(", "),")")}function DJ(r){var e=_u(r).slice();return e.length<4&&e.push(1),wD(e.map(function(t,n){return n<3?t/255:t}))}function Nm(r,e){return r.stringLiteralsMap[e]===void 0&&(r.stringLiteralsMap[e]=Object.keys(r.stringLiteralsMap).length),r.stringLiteralsMap[e]}function QJ(r,e){return t1(Nm(r,e))}function Ae(r,e,t){if(Array.isArray(e)&&typeof e[0]=="string"){var n=er[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=oA(e);if((i&Jt.NUMBER)>0)return t1(e);if((i&Jt.BOOLEAN)>0)return e.toString();if((i&Jt.STRING)>0&&(t===void 0||t==Jt.STRING))return QJ(r,e.toString());if((i&Jt.COLOR)>0&&(t===void 0||t==Jt.COLOR))return DJ(e);if((i&Jt.NUMBER_ARRAY)>0)return wD(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(t,")"))}function ED(r){if(!(oA(r)&Jt.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(r)," instead"))}function ii(r){for(var e=0;e<r.length;e++)ED(r[e])}function CD(r){if(!(oA(r)&Jt.STRING))throw new Error("A string value was expected, got ".concat(JSON.stringify(r)," instead"))}function Pb(r){if(!(oA(r)&Jt.BOOLEAN))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(r)," instead"))}function vn(r,e){if(r.length!==e)throw new Error("Exactly ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function Ru(r,e){if(r.length<e)throw new Error("At least ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function e1(r,e){if(r.length>e)throw new Error("At most ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function BD(r){if(r.length%2!==0)throw new Error("An even amount of arguments was expected, got ".concat(r," instead"))}function HJ(r){if(r.length%2===0)throw new Error("An odd amount of arguments was expected, got ".concat(r," instead"))}function Nb(r,e){if(!UJ(e))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(r)))}er.get={getReturnType:function(r){return Jt.ANY},toGlsl:function(r,e){vn(e,1),CD(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 Ub(r){return"u_var_"+r}er.var={getReturnType:function(r){return Jt.ANY},toGlsl:function(r,e){vn(e,1),CD(e[0]);var t=e[0].toString();return r.variables.indexOf(t)===-1&&r.variables.push(t),Ub(t)}};var TD="u_paletteTextures";er.palette={getReturnType:function(r){return Jt.COLOR},toGlsl:function(r,e){vn(e,2),ED(e[0]);var t=Ae(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<i;o++){var s=n[o],A=void 0;if(typeof s=="string")A=S2(s);else{if(!Array.isArray(s))throw new Error("The second argument of palette must be an array of strings or colors");var l=s.length;if(l===4)A=s;else{if(l!==3)throw new Error("Expected palette color to have 3 or 4 values, got ".concat(l));A=[s[0],s[1],s[2],1]}}var u=o*4;a[u]=A[0],a[u+1]=A[1],a[u+2]=A[2],a[u+3]=A[3]*255}r.paletteTextures||(r.paletteTextures=[]);var h="".concat(TD,"[").concat(r.paletteTextures.length,"]"),c=new NJ(h,a);return r.paletteTextures.push(c),"texture2D(".concat(h,", vec2((").concat(t," + 0.5) / ").concat(i,".0, 0.5))")}};var gE="getBandValue";er.band={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){Ru(e,1),e1(e,3);var t=e[0];if(!(gE in r.functions)){for(var n="",i=r.bandCount||1,a=0;a<i;a++){var o=Math.floor(a/4),s=a%4;s===i-1&&s===1&&(s=3);var A="".concat(Xe.TILE_TEXTURE_ARRAY,"[").concat(o,"]");n+=`
|
||
if (band == `.concat(a+1,`.0) {
|
||
return texture2D(`).concat(A,", v_textureCoord + vec2(dx, dy))[").concat(s,`];
|
||
}
|
||
`)}r.functions[gE]=`
|
||
float getBandValue(float band, float xOffset, float yOffset) {
|
||
float dx = xOffset / `.concat(Xe.TEXTURE_PIXEL_WIDTH,`;
|
||
float dy = yOffset / `).concat(Xe.TEXTURE_PIXEL_HEIGHT,`;
|
||
`).concat(n,`
|
||
}
|
||
`)}var l=Ae(r,t),u=Ae(r,e[1]||0),h=Ae(r,e[2]||0);return"".concat(gE,"(").concat(l,", ").concat(u,", ").concat(h,")")}};er.time={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,0),"u_time"}};er.zoom={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,0),"u_zoom"}};er.resolution={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,0),"u_resolution"}};er["*"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," * ").concat(Ae(r,e[1]),")")}};er["/"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," / ").concat(Ae(r,e[1]),")")}};er["+"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," + ").concat(Ae(r,e[1]),")")}};er["-"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," - ").concat(Ae(r,e[1]),")")}};er.clamp={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){vn(e,3),ii(e);var t=Ae(r,e[1]),n=Ae(r,e[2]);return"clamp(".concat(Ae(r,e[0]),", ").concat(t,", ").concat(n,")")}};er["%"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,2),ii(e),"mod(".concat(Ae(r,e[0]),", ").concat(Ae(r,e[1]),")")}};er["^"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,2),ii(e),"pow(".concat(Ae(r,e[0]),", ").concat(Ae(r,e[1]),")")}};er.abs={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,1),ii(e),"abs(".concat(Ae(r,e[0]),")")}};er.floor={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,1),ii(e),"floor(".concat(Ae(r,e[0]),")")}};er.round={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,1),ii(e),"floor(".concat(Ae(r,e[0])," + 0.5)")}};er.ceil={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,1),ii(e),"ceil(".concat(Ae(r,e[0]),")")}};er.sin={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,1),ii(e),"sin(".concat(Ae(r,e[0]),")")}};er.cos={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return vn(e,1),ii(e),"cos(".concat(Ae(r,e[0]),")")}};er.atan={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return Ru(e,1),e1(e,2),ii(e),e.length===2?"atan(".concat(Ae(r,e[0]),", ").concat(Ae(r,e[1]),")"):"atan(".concat(Ae(r,e[0]),")")}};er[">"]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," > ").concat(Ae(r,e[1]),")")}};er[">="]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," >= ").concat(Ae(r,e[1]),")")}};er["<"]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," < ").concat(Ae(r,e[1]),")")}};er["<="]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return vn(e,2),ii(e),"(".concat(Ae(r,e[0])," <= ").concat(Ae(r,e[1]),")")}};function xD(r){return{getReturnType:function(e){return Jt.BOOLEAN},toGlsl:function(e,t){vn(t,2);for(var n=Jt.ANY,i=0;i<t.length;i++)n&=oA(t[i]);if(n===Jt.NONE)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(t)," instead"));return n&=~Jt.COLOR,"(".concat(Ae(e,t[0],n)," ").concat(r," ").concat(Ae(e,t[1],n),")")}}}er["=="]=xD("==");er["!="]=xD("!=");er["!"]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return vn(e,1),Pb(e[0]),"(!".concat(Ae(r,e[0]),")")}};function SD(r){return{getReturnType:function(e){return Jt.BOOLEAN},toGlsl:function(e,t){Ru(t,2);for(var n=0;n<t.length;n++)Pb(t[n]);var i="";return i=t.map(function(a){return Ae(e,a)}).join(" ".concat(r," ")),i="(".concat(i,")"),i}}}er.all=SD("&&");er.any=SD("||");er.between={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){vn(e,3),ii(e);var t=Ae(r,e[1]),n=Ae(r,e[2]),i=Ae(r,e[0]);return"(".concat(i," >= ").concat(t," && ").concat(i," <= ").concat(n,")")}};er.array={getReturnType:function(r){return Jt.NUMBER_ARRAY},toGlsl:function(r,e){Ru(e,2),e1(e,4),ii(e);var t=e.map(function(n){return Ae(r,n,Jt.NUMBER)});return"vec".concat(e.length,"(").concat(t.join(", "),")")}};er.color={getReturnType:function(r){return Jt.COLOR},toGlsl:function(r,e){Ru(e,3),e1(e,4),ii(e);var t=e;e.length===3&&t.push(1);var n=e.map(function(i,a){return Ae(r,i,Jt.NUMBER)+(a<3?" / 255.0":"")});return"vec".concat(e.length,"(").concat(n.join(", "),")")}};er.interpolate={getReturnType:function(r){for(var e=Jt.COLOR|Jt.NUMBER,t=3;t<r.length;t+=2)e=e&oA(r[t]);return e},toGlsl:function(r,e,t){BD(e),Ru(e,6);var n=e[0],i;switch(n[0]){case"linear":i=1;break;case"exponential":i=n[1];break;default:i=null}if(!i)throw new Error('Invalid interpolation type for "interpolate" operator, received: '.concat(JSON.stringify(n)));var a=t!==void 0?t:Jt.ANY,o=er.interpolate.getReturnType(e)&a;Nb(e,o);for(var s=Ae(r,e[1]),A=t1(i),l="",u=2;u<e.length-2;u+=2){var h=Ae(r,e[u]),c=l||Ae(r,e[u+1],o),f=Ae(r,e[u+2]),d=Ae(r,e[u+3],o);l="mix(".concat(c,", ").concat(d,", pow(clamp((").concat(s," - ").concat(h,") / (").concat(f," - ").concat(h,"), 0.0, 1.0), ").concat(A,"))")}return l}};er.match={getReturnType:function(r){for(var e=Jt.ANY,t=2;t<r.length;t+=2)e=e&oA(r[t]);return e=e&oA(r[r.length-1]),e},toGlsl:function(r,e,t){BD(e),Ru(e,4);var n=t!==void 0?t:Jt.ANY,i=er.match.getReturnType(e)&n;Nb(e,i);for(var a=Ae(r,e[0]),o=Ae(r,e[e.length-1],i),s=null,A=e.length-3;A>=1;A-=2){var l=Ae(r,e[A]),u=Ae(r,e[A+1],i);s="(".concat(a," == ").concat(l," ? ").concat(u," : ").concat(s||o,")")}return s}};er.case={getReturnType:function(r){for(var e=Jt.ANY,t=1;t<r.length;t+=2)e=e&oA(r[t]);return e=e&oA(r[r.length-1]),e},toGlsl:function(r,e,t){HJ(e),Ru(e,3);var n=t!==void 0?t:Jt.ANY,i=er.case.getReturnType(e)&n;Nb(e,i);for(var a=0;a<e.length-1;a+=2)Pb(e[a]);for(var o=Ae(r,e[e.length-1],i),s=null,a=e.length-3;a>=0;a-=2){var A=Ae(r,e[a]),l=Ae(r,e[a+1],i);s="(".concat(A," ? ").concat(l," : ").concat(s||o,")")}return s}};var GJ=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 jR(r,e){var t=`
|
||
attribute vec2 `.concat(D0.TEXTURE_COORD,`;
|
||
uniform mat4 `).concat(Xe.TILE_TRANSFORM,`;
|
||
uniform float `).concat(Xe.TEXTURE_PIXEL_WIDTH,`;
|
||
uniform float `).concat(Xe.TEXTURE_PIXEL_HEIGHT,`;
|
||
uniform float `).concat(Xe.TEXTURE_RESOLUTION,`;
|
||
uniform float `).concat(Xe.TEXTURE_ORIGIN_X,`;
|
||
uniform float `).concat(Xe.TEXTURE_ORIGIN_Y,`;
|
||
uniform float `).concat(Xe.DEPTH,`;
|
||
|
||
varying vec2 v_textureCoord;
|
||
varying vec2 v_mapCoord;
|
||
|
||
void main() {
|
||
v_textureCoord = `).concat(D0.TEXTURE_COORD,`;
|
||
v_mapCoord = vec2(
|
||
`).concat(Xe.TEXTURE_ORIGIN_X," + ").concat(Xe.TEXTURE_RESOLUTION," * ").concat(Xe.TEXTURE_PIXEL_WIDTH,` * v_textureCoord[0],
|
||
`).concat(Xe.TEXTURE_ORIGIN_Y," - ").concat(Xe.TEXTURE_RESOLUTION," * ").concat(Xe.TEXTURE_PIXEL_HEIGHT,` * v_textureCoord[1]
|
||
);
|
||
gl_Position = `).concat(Xe.TILE_TRANSFORM," * vec4(").concat(D0.TEXTURE_COORD,", ").concat(Xe.DEPTH,`, 1.0);
|
||
}
|
||
`),n={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e},i=[];if(r.color!==void 0){var a=Ae(n,r.color,Jt.COLOR);i.push("color = ".concat(a,";"))}if(r.contrast!==void 0){var o=Ae(n,r.contrast,Jt.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=Ae(n,r.exposure,Jt.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=Ae(n,r.saturation,Jt.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=Ae(n,r.gamma,Jt.NUMBER);i.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(l,"));"))}if(r.brightness!==void 0){var u=Ae(n,r.brightness,Jt.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 h={},c=n.variables.length;if(c>1&&!r.variables)throw new Error("Missing variables in style (expected ".concat(n.variables,")"));for(var f=function(C){var B=n.variables[C];if(!(B in r.variables))throw new Error("Missing '".concat(B,"' in style variables"));var R=Ub(B);h[R]=function(){var O=r.variables[B];return typeof O=="string"&&(O=Nm(n,O)),O!==void 0?O:-9999999}},d=0;d<c;++d)f(d);var v=Object.keys(h).map(function(C){return"uniform float ".concat(C,";")}),y=Math.ceil(e/4);v.push("uniform sampler2D ".concat(Xe.TILE_TEXTURE_ARRAY,"[").concat(y,"];")),n.paletteTextures&&v.push("uniform sampler2D ".concat(TD,"[").concat(n.paletteTextures.length,"];"));var m=Object.keys(n.functions).map(function(C){return n.functions[C]}),w=`
|
||
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
||
precision highp float;
|
||
#else
|
||
precision mediump float;
|
||
#endif
|
||
|
||
varying vec2 v_textureCoord;
|
||
varying vec2 v_mapCoord;
|
||
uniform vec4 `.concat(Xe.RENDER_EXTENT,`;
|
||
uniform float `).concat(Xe.TRANSITION_ALPHA,`;
|
||
uniform float `).concat(Xe.TEXTURE_PIXEL_WIDTH,`;
|
||
uniform float `).concat(Xe.TEXTURE_PIXEL_HEIGHT,`;
|
||
uniform float `).concat(Xe.RESOLUTION,`;
|
||
uniform float `).concat(Xe.ZOOM,`;
|
||
|
||
`).concat(v.join(`
|
||
`),`
|
||
|
||
`).concat(m.join(`
|
||
`),`
|
||
|
||
void main() {
|
||
if (
|
||
v_mapCoord[0] < `).concat(Xe.RENDER_EXTENT,`[0] ||
|
||
v_mapCoord[1] < `).concat(Xe.RENDER_EXTENT,`[1] ||
|
||
v_mapCoord[0] > `).concat(Xe.RENDER_EXTENT,`[2] ||
|
||
v_mapCoord[1] > `).concat(Xe.RENDER_EXTENT,`[3]
|
||
) {
|
||
discard;
|
||
}
|
||
|
||
vec4 color = texture2D(`).concat(Xe.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(Xe.TRANSITION_ALPHA,`;
|
||
}`);return{vertexShader:t,fragmentShader:w,uniforms:h,paletteTextures:n.paletteTextures}}var bD=function(r){GJ(e,r);function e(t){var n=this,i=t?de({},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(Nr.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():Oa.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=jR(this.style_,this.getSourceBandCount_());return new MJ(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<s;++o)this.renderedSource_=n[o],i.prepareFrame(t)&&(a=i.renderFrame(t));return a},e.prototype.render=function(t,n){var i=this;this.rendered=!0;for(var a=t.viewState,o=this.getSources(t.extent,a.resolution),s=!0,A=function(f,d){var v=o[f],y=v.getState();if(y==Oa.LOADING){var m=function(){v.getState()==Oa.READY&&(v.removeEventListener("change",m),i.changed())};v.addEventListener("change",m)}s=s&&y==Oa.READY},l=0,u=o.length;l<u;++l)A(l);var h=this.renderSources(t,o);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=a.resolution,h;if(this.renderedResolution_>.5*a.resolution){var c=this.getSources(t.extent,this.renderedResolution_).filter(function(f){return!o.includes(f)});if(c.length>0)return this.renderSources(t,c)}return h},e.prototype.setStyle=function(t){this.styleVariables_=t.variables||{},this.style_=t;var n=jR(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){de(this.styleVariables_,t),this.changed()},e}(oD);bD.prototype.dispose;var kJ=bD;const $J={extends:tc,name:"ol-webgl-tile-layer",setup(r){const e=Ce("map"),t=Ce("overviewMap",null),{properties:n}=dr(r),i=pr(()=>new kJ(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&&ce(t,()=>{o(),a()}),ir(()=>{a()}),Ar(()=>{o()}),Gr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function VJ(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var OB=le($J,[["render",VJ]]),jJ=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)}}(),KJ=function(r){jJ(e,r);function e(t){var n=t||{};return r.call(this,n)||this}return e}(qh),YJ=KJ,zJ=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)}}(),XJ=function(r){zJ(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=Ko(l,Co(n.extent,a.projection))),!A[fn.ANIMATING]&&!A[fn.INTERACTING]&&!up(l))if(s){var u=a.projection,h=s.getImage(l,o,i,u);h&&(this.loadImage(h)?this.image_=h:h.getState()===ke.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=An(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!ws(o,a))return null;var s=this.image_.getExtent(),A=this.image_.getImage(),l=Fr(s),u=Math.floor(A.width*((a[0]-s[0])/l));if(u<0||u>=A.width)return null;var h=ei(s),c=Math.floor(A.height*((s[3]-a[1])/h));return c<0||c>=A.height?null:this.getImageData(A,u,c)},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,h=u.center,c=u.resolution,f=t.size,d=l*o/(c*s),v=Math.round(f[0]*l),y=Math.round(f[1]*l),m=u.rotation;if(m){var w=Math.round(Math.sqrt(v*v+y*y));v=w,y=w}Da(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,m,-v/2,-y/2),Xv(this.inversePixelTransform,this.pixelTransform);var C=DS(this.pixelTransform);this.useContainer(n,C,A.opacity,this.getBackground(t));var B=this.context,R=B.canvas;R.width!=v||R.height!=y?(R.width=v,R.height=y):this.containerReused||B.clearRect(0,0,v,y);var O=!1,I=!0;if(A.extent){var T=Co(A.extent,u.projection);I=In(T,t.extent),O=I&&!Eo(T,t.extent),O&&this.clipUnrotated(B,t,T)}var L=i.getImage(),P=Da(this.tempTransform,v/2,y/2,d,d,0,s*(a[0]-h[0])/o,s*(h[1]-a[3])/o);this.renderedResolution=o*l/s;var S=L.width*P[0],x=L.height*P[3];if(this.getLayer().getSource().getInterpolate()||de(B,Xf),this.preRender(B,t),I&&S>=.5&&x>=.5){var M=P[4],D=P[5],W=A.opacity,z=void 0;W!==1&&(z=B.globalAlpha,B.globalAlpha=W),B.drawImage(L,0,0,+L.width,+L.height,Math.round(M),Math.round(D),Math.round(S),Math.round(x)),W!==1&&(B.globalAlpha=z)}return this.postRender(B,t),O&&B.restore(),de(B,lD),C!==R.style.transform&&(R.style.transform=C),this.container},e}(_b),WJ=XJ,qJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ZJ=function(r){qJ(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new WJ(this)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(YJ),LD=ZJ;const JJ={extends:tc,name:"ol-image-layer",setup(r){const e=Ce("map"),{properties:t}=dr(r),n=new LD(t);return ce(t,()=>{n.setProperties(t)}),ir(()=>{e.addLayer(n)}),Ar(()=>{e.removeLayer(n)}),Gr("imageLayer",n),{imageLayer:n}}};function ttt(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var MB=le(JJ,[["render",ttt]]);const ett={extends:tc,name:"ol-vector-layer",setup(r){const e=Ce("map"),{properties:t}=dr(r),n=pr(()=>new sA(t));return ce(t,()=>{n.value.setProperties(t)}),ir(()=>{e.addLayer(n.value)}),Ar(()=>{e.removeLayer(n.value)}),Gr("vectorLayer",n),Gr("stylable",n),{vectorLayer:n}},props:{renderBuffer:{type:Number,default:100},updateWhileAnimating:{type:Boolean,default:!1},style:{type:Function},updateWhileInteracting:{type:Boolean,default:!1}}};function rtt(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var PB=le(ett,[["render",rtt]]),ntt=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)}}(),itt=function(r){ntt(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=SJ(t),i=n[0];this.forEach(function(a){a.tileCoord[0]!==i&&(this.remove(Uv(a.tileCoord)),a.release())}.bind(this))}},e}(fD),FD=itt,yE={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},att=[0,0,0],Dl=5,ott=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,_e(T9(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<i;++n)if(!t)t=this.resolutions_[n]/this.resolutions_[n+1];else if(this.resolutions_[n]/this.resolutions_[n+1]!==t){t=void 0;break}}this.zoomFactor_=t,this.maxZoom=this.resolutions_.length-1,this.origin_=e.origin!==void 0?e.origin:null,this.origins_=null,e.origins!==void 0&&(this.origins_=e.origins,_e(this.origins_.length==this.resolutions_.length,20));var a=e.extent;a!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=Ss(a)),_e(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,_e(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:XS,_e(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,22),this.extent_=a!==void 0?a:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],e.sizes!==void 0?this.fullTileRanges_=e.sizes.map(function(o,s){var A=new Rb(Math.min(0,o[0]),Math.max(o[0]-1,-1),Math.min(0,o[1]),Math.max(o[1]-1,-1));if(a){var l=this.getTileRangeForExtentAndZ(a,s);A.minX=Math.max(l.minX,A.minX),A.maxX=Math.min(l.maxX,A.maxX),A.minY=Math.max(l.minY,A.minY),A.maxY=Math.min(l.maxY,A.maxY)}return A},this):a&&this.calculateTileRanges_(a)}return r.prototype.forEachTileCoord=function(e,t,n){for(var i=this.getTileRangeForExtentAndZ(e,t),a=i.minX,o=i.maxX;a<=o;++a)for(var s=i.minY,A=i.maxY;s<=A;++s)n([t,a,s])},r.prototype.forEachTileCoordParentTileRange=function(e,t,n,i){var a,o,s,A=null,l=e[0]-1;for(this.zoomFactor_===2?(o=e[1],s=e[2]):A=this.getTileCoordExtent(e,i);l>=this.minZoom;){if(this.zoomFactor_===2?(o=Math.floor(o/2),s=Math.floor(s/2),a=Dc(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){if(this.zoomFactor_===2){var i=e[1]*2,a=e[2]*2;return Dc(i,i+1,a,a+1,t)}var o=this.getTileCoordExtent(e,n||this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,e[0]+1,t)}return null},r.prototype.getTileRangeForTileCoordAndZ=function(e,t,n){if(t>this.maxZoom||t<this.minZoom)return null;var i=e[0],a=e[1],o=e[2];if(t===i)return Dc(a,o,a,o,n);if(this.zoomFactor_){var s=Math.pow(this.zoomFactor_,t-i),A=Math.floor(a*s),l=Math.floor(o*s);if(t<i)return Dc(A,A,l,l,n);var u=Math.floor(s*(a+1))-1,h=Math.floor(s*(o+1))-1;return Dc(A,u,l,h,n)}var c=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(c,t,n)},r.prototype.getTileRangeExtent=function(e,t,n){var i=this.getOrigin(e),a=this.getResolution(e),o=Li(this.getTileSize(e),this.tmpSize_),s=i[0]+t.minX*o[0]*a,A=i[0]+(t.maxX+1)*o[0]*a,l=i[1]+t.minY*o[1]*a,u=i[1]+(t.maxY+1)*o[1]*a;return no(s,l,A,u,n)},r.prototype.getTileRangeForExtentAndZ=function(e,t,n){var i=att;this.getTileCoordForXYAndZ_(e[0],e[3],t,!1,i);var a=i[1],o=i[2];return this.getTileCoordForXYAndZ_(e[2],e[1],t,!0,i),Dc(a,i[1],o,i[2],n)},r.prototype.getTileCoordCenter=function(e){var t=this.getOrigin(e[0]),n=this.getResolution(e[0]),i=Li(this.getTileSize(e[0]),this.tmpSize_);return[t[0]+(e[1]+.5)*i[0]*n,t[1]-(e[2]+.5)*i[1]*n]},r.prototype.getTileCoordExtent=function(e,t){var n=this.getOrigin(e[0]),i=this.getResolution(e[0]),a=Li(this.getTileSize(e[0]),this.tmpSize_),o=n[0]+e[1]*a[0]*i,s=n[1]-(e[2]+1)*a[1]*i,A=o+a[0]*i,l=s+a[1]*i;return no(o,s,A,l,t)},r.prototype.getTileCoordForCoordAndResolution=function(e,t,n){return this.getTileCoordForXYAndResolution_(e[0],e[1],t,!1,n)},r.prototype.getTileCoordForXYAndResolution_=function(e,t,n,i,a){var o=this.getZForResolution(n),s=n/this.getResolution(o),A=this.getOrigin(o),l=Li(this.getTileSize(o),this.tmpSize_),u=s*(e-A[0])/n/l[0],h=s*(A[1]-t)/n/l[1];return i?(u=ql(u,Dl)-1,h=ql(h,Dl)-1):(u=ff(u,Dl),h=ff(h,Dl)),Nv(o,u,h,a)},r.prototype.getTileCoordForXYAndZ_=function(e,t,n,i,a){var o=this.getOrigin(n),s=this.getResolution(n),A=Li(this.getTileSize(n),this.tmpSize_),l=(e-o[0])/s/A[0],u=(o[1]-t)/s/A[1];return i?(l=ql(l,Dl)-1,u=ql(u,Dl)-1):(l=ff(l,Dl),u=ff(u,Dl)),Nv(n,l,u,a)},r.prototype.getTileCoordForCoordAndZ=function(e,t,n){return this.getTileCoordForXYAndZ_(e[0],e[1],t,!1,n)},r.prototype.getTileCoordResolution=function(e){return this.resolutions_[e[0]]},r.prototype.getTileSize=function(e){return this.tileSize_?this.tileSize_:this.tileSizes_[e]},r.prototype.getFullTileRange=function(e){return this.fullTileRanges_?this.fullTileRanges_[e]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,e):null},r.prototype.getZForResolution=function(e,t){var n=I_(this.resolutions_,e,t||0);return En(n,this.minZoom,this.maxZoom)},r.prototype.calculateTileRanges_=function(e){for(var t=this.resolutions_.length,n=new Array(t),i=this.minZoom;i<t;++i)n[i]=this.getTileRangeForExtentAndZ(e,i);this.fullTileRanges_=n},r}(),Db=ott;function ID(r){var e=r.getDefaultTileGrid();return e||(e=ltt(r),r.setDefaultTileGrid(e)),e}function stt(r,e,t){var n=e[0],i=r.getTileCoordCenter(e),a=r1(t);if(ws(a,i))return e;var o=Fr(a),s=Math.ceil((a[0]-i[0])/o);return i[0]+=o*s,r.getTileCoordForCoordAndZ(i,n)}function Att(r,e,t,n){var i=n!==void 0?n:bd.TOP_LEFT,a=OD(r,e,t);return new Db({extent:r,origin:y2(r,i),resolutions:a,tileSize:t})}function RD(r){var e=r||{},t=e.extent||Ie("EPSG:3857").getExtent(),n={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:OD(t,e.maxZoom,e.tileSize,e.maxResolution)};return new Db(n)}function OD(r,e,t,n){for(var i=e!==void 0?e:Y$,a=ei(r),o=Fr(r),s=Li(t!==void 0?t:XS),A=n>0?n:Math.max(o/s[0],a/s[1]),l=i+1,u=new Array(l),h=0;h<l;++h)u[h]=A/Math.pow(2,h);return u}function ltt(r,e,t,n){var i=r1(r);return Att(i,e,t,n)}function r1(r){r=Ie(r);var e=r.getExtent();if(!e){var t=180*Es[Ma.DEGREES]/r.getMetersPerUnit();e=no(-t,-t,t,t)}return e}var MD=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)}}(),utt=function(r){MD(e,r);function e(t){var n=r.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate})||this;n.on,n.once,n.un,n.opaque_=t.opaque!==void 0?t.opaque:!1,n.tilePixelRatio_=t.tilePixelRatio!==void 0?t.tilePixelRatio:1,n.tileGrid=t.tileGrid!==void 0?t.tileGrid:null;var i=[256,256];return n.tileGrid&&Li(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),i),n.tileCache=new FD(t.cacheSize||0),n.tmpSize=[0,0],n.key_=t.key||"",n.tileOptions={transition:t.transition,interpolate:t.interpolate},n.zDirection=t.zDirection?t.zDirection:0,n}return e.prototype.canExpireCache=function(){return this.tileCache.canExpireCache()},e.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);i&&i.expireCache(n)},e.prototype.forEachLoadedTile=function(t,n,i,a){var o=this.getTileCacheForProjection(t);if(!o)return!1;for(var s=!0,A,l,u,h=i.minX;h<=i.maxX;++h)for(var c=i.minY;c<=i.maxY;++c)l=J_(n,h,c),u=!1,o.containsKey(l)&&(A=o.get(l),u=A.getState()===ge.LOADED,u&&(u=a(A)!==!1)),u||(s=!1);return s},e.prototype.getGutterForProjection=function(t){return 0},e.prototype.getKey=function(){return this.key_},e.prototype.setKey=function(t){this.key_!==t&&(this.key_=t,this.changed())},e.prototype.getOpaque=function(t){return this.opaque_},e.prototype.getResolutions=function(){return this.tileGrid?this.tileGrid.getResolutions():null},e.prototype.getTile=function(t,n,i,a,o){return Ee()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:ID(t)},e.prototype.getTileCacheForProjection=function(t){return _e(js(this.getProjection(),t),68),this.tileCache},e.prototype.getTilePixelRatio=function(t){return this.tilePixelRatio_},e.prototype.getTilePixelSize=function(t,n,i){var a=this.getTileGridForProjection(i),o=this.getTilePixelRatio(n),s=Li(a.getTileSize(t),this.tmpSize);return o==1?s:eU(s,o,this.tmpSize)},e.prototype.getTileCoordForTileUrlFunction=function(t,n){var i=n!==void 0?n:this.getProjection(),a=this.getTileGridForProjection(i);return this.getWrapX()&&i.isGlobal()&&(t=stt(a,t,i)),bJ(t,a)?t:null},e.prototype.clear=function(){this.tileCache.clear()},e.prototype.refresh=function(){this.clear(),r.prototype.refresh.call(this)},e.prototype.updateCacheSize=function(t,n){var i=this.getTileCacheForProjection(n);t>i.highWaterMark&&(i.highWaterMark=t)},e.prototype.useTile=function(t,n,i,a){},e}(K_),htt=function(r){MD(e,r);function e(t,n){var i=r.call(this,t)||this;return i.tile=n,i}return e}(oo),PD=utt;function ctt(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);_e(u,55);var h=u.getHeight()-o[2]-1;return h.toString()})}}function ftt(r,e){for(var t=r.length,n=new Array(t),i=0;i<t;++i)n[i]=ctt(r[i],e);return Um(n)}function Um(r){return r.length===1?r[0]:function(e,t,n){if(e){var i=_D(e),a=uu(i,r.length);return r[a](e,t,n)}else return}}function ND(r){var e=[],t=/\{([a-z])-([a-z])\}/.exec(r);if(t){var n=t[1].charCodeAt(0),i=t[2].charCodeAt(0),a=void 0;for(a=n;a<=i;++a)e.push(r.replace(t[0],String.fromCharCode(a)));return e}if(t=/\{(\d+)-(\d+)\}/.exec(r),t){for(var o=parseInt(t[2],10),s=parseInt(t[1],10);s<=o;s++)e.push(r.replace(t[0],s.toString()));return e}return e.push(r),e}var ptt=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)}}(),dtt=function(r){ptt(e,r);function e(t){var n=r.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this;return n.generateTileUrlFunction_=n.tileUrlFunction===e.prototype.tileUrlFunction,n.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(n.tileUrlFunction=t.tileUrlFunction),n.urls=null,t.urls?n.setUrls(t.urls):t.url&&n.setUrl(t.url),n.tileLoadingKeys_={},n}return e.prototype.getTileLoadFunction=function(){return this.tileLoadFunction},e.prototype.getTileUrlFunction=function(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction},e.prototype.getUrls=function(){return this.urls},e.prototype.handleTileChange=function(t){var n=t.target,i=pe(n),a=n.getState(),o;a==ge.LOADING?(this.tileLoadingKeys_[i]=!0,o=yE.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],o=a==ge.ERROR?yE.TILELOADERROR:a==ge.LOADED?yE.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new htt(o,n))},e.prototype.setTileLoadFunction=function(t){this.tileCache.clear(),this.tileLoadFunction=t,this.changed()},e.prototype.setTileUrlFunction=function(t,n){this.tileUrlFunction=t,this.tileCache.pruneExceptNewestZ(),typeof n<"u"?this.setKey(n):this.changed()},e.prototype.setUrl=function(t){var n=ND(t);this.urls=n,this.setUrls(n)},e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
|
||
`);this.generateTileUrlFunction_?this.setTileUrlFunction(ftt(t,this.tileGrid),n):this.setKey(n)},e.prototype.tileUrlFunction=function(t,n,i){},e.prototype.useTile=function(t,n,i){var a=J_(t,n,i);this.tileCache.containsKey(a)&&this.tileCache.get(a)},e}(PD),vtt=dtt,gtt=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)}}(),ytt=function(r){gtt(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,cacheSize:t.cacheSize,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:mtt,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:i,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection})||this,n.crossOrigin=t.crossOrigin!==void 0?t.crossOrigin:null,n.tileClass=t.tileClass!==void 0?t.tileClass:Mm,n.tileCacheForProjection={},n.tileGridForProjection={},n.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,n.renderReprojectionEdges_=!1,n}return e.prototype.canExpireCache=function(){if(this.tileCache.canExpireCache())return!0;for(var t in this.tileCacheForProjection)if(this.tileCacheForProjection[t].canExpireCache())return!0;return!1},e.prototype.expireCache=function(t,n){var i=this.getTileCacheForProjection(t);this.tileCache.expireCache(this.tileCache==i?n:{});for(var a in this.tileCacheForProjection){var o=this.tileCacheForProjection[a];o.expireCache(o==i?n:{})}},e.prototype.getGutterForProjection=function(t){return this.getProjection()&&t&&!js(this.getProjection(),t)?0:this.getGutter()},e.prototype.getGutter=function(){return 0},e.prototype.getKey=function(){var t=r.prototype.getKey.call(this);return this.getInterpolate()||(t+=":disable-interpolation"),t},e.prototype.getOpaque=function(t){return this.getProjection()&&t&&!js(this.getProjection(),t)?!1:r.prototype.getOpaque.call(this,t)},e.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(this.tileGrid&&(!n||js(n,t)))return this.tileGrid;var i=pe(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=ID(t)),this.tileGridForProjection[i]},e.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||js(n,t))return this.tileCache;var i=pe(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new FD(this.tileCache.highWaterMark)),this.tileCacheForProjection[i]},e.prototype.createTile_=function(t,n,i,a,o,s){var A=[t,n,i],l=this.getTileCoordForTileUrlFunction(A,o),u=l?this.tileUrlFunction(l,a,o):void 0,h=new this.tileClass(A,u!==void 0?ge.IDLE:ge.EMPTY,u!==void 0?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return h.key=s,h.addEventListener(ye.CHANGE,this.handleTileChange.bind(this)),h},e.prototype.getTile=function(t,n,i,a,o){var s=this.getProjection();if(!s||!o||js(s,o))return this.getTileInternal(t,n,i,a,s||o);var A=this.getTileCacheForProjection(o),l=[t,n,i],u=void 0,h=Uv(l);A.containsKey(h)&&(u=A.get(h));var c=this.getKey();if(u&&u.key==c)return u;var f=this.getTileGridForProjection(s),d=this.getTileGridForProjection(o),v=this.getTileCoordForTileUrlFunction(l,o),y=new Ib(s,f,o,d,l,v,this.getTilePixelRatio(a),this.getGutter(),function(m,w,C,B){return this.getTileInternal(m,w,C,B,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return y.key=c,u?(y.interimTile=u,y.refreshInterimChain(),A.replace(h,y)):A.set(h,y),y},e.prototype.getTileInternal=function(t,n,i,a,o){var s=null,A=J_(t,n,i),l=this.getKey();if(!this.tileCache.containsKey(A))s=this.createTile_(t,n,i,a,o,l),this.tileCache.set(A,s);else if(s=this.tileCache.get(A),s.key!=l){var u=s;s=this.createTile_(t,n,i,a,o,l),u.getState()==ge.IDLE?s.interimTile=u.interimTile:s.interimTile=u,s.refreshInterimChain(),this.tileCache.replace(A,s)}return s},e.prototype.setRenderReprojectionEdges=function(t){if(this.renderReprojectionEdges_!=t){this.renderReprojectionEdges_=t;for(var n in this.tileCacheForProjection)this.tileCacheForProjection[n].clear();this.changed()}},e.prototype.setTileGridForProjection=function(t,n){{var i=Ie(t);if(i){var a=pe(i);a in this.tileGridForProjection||(this.tileGridForProjection[a]=n)}}},e}(vtt);function mtt(r,e){r.getImage().src=e}var n1=ytt,UD=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 _tt(r,e,t,n){var i=document.createElement("script"),a="olc_"+pe(e);function o(){delete window[a],i.parentNode.removeChild(i)}i.async=!0,i.src=r+(r.indexOf("?")==-1?"?":"&")+(n||"callback")+"="+a;var s=setTimeout(function(){o(),t&&t()},1e4);window[a]=function(A){clearTimeout(s),o(),e(A)},document.getElementsByTagName("head")[0].appendChild(i)}(function(r){UD(e,r);function e(t){var n=this,i="Unexpected response status: "+t.status;return n=r.call(this,i)||this,n.name="ResponseError",n.response=t,n}return e})(Error);(function(r){UD(e,r);function e(t){var n=r.call(this,"Failed to issue request")||this;return n.name="ClientError",n.client=t,n}return e})(Error);var wtt=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 Ett(r){var e=r[0],t=new Array(e),n=1<<e-1,i,a;for(i=0;i<e;++i)a=48,r[1]&n&&(a+=1),r[2]&n&&(a+=2),t[i]=String.fromCharCode(a),n>>=1;return t.join("")}var Ctt='<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>',Btt=function(r){wtt(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:Ie("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:Oa.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 _tt(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(Oa.ERROR);return}var n=t.resourceSets[0].resources[0],i=this.maxZoom_==-1?n.zoomMax:this.maxZoom_,a=this.getProjection(),o=r1(a),s=this.hidpi_?2:1,A=n.imageWidth==n.imageHeight?n.imageWidth/s:[n.imageWidth/s,n.imageHeight/s],l=RD({extent:o,minZoom:n.zoomMin,maxZoom:i,tileSize:A});this.tileGrid=l;var u=this.culture_,h=this.hidpi_;if(this.tileUrlFunction=Um(n.imageUrlSubdomains.map(function(f){var d=[0,0,0],v=n.imageUrl.replace("{subdomain}",f).replace("{culture}",u);return function(y,m,w){if(y){Nv(y[0],y[1],y[2],d);var C=v;return h&&(C+="&dpi=d1&device=mobile"),C.replace("{quadkey}",Ett(d))}else return}})),n.imageryProviders){var c=Hh(Ie("EPSG:4326"),this.getProjection());this.setAttributions(function(f){var d=[],v=f.viewState,y=this.getTileGrid(),m=y.getZForResolution(v.resolution,this.zDirection),w=y.getTileCoordForCoordAndZ(v.center,m),C=w[0];return n.imageryProviders.map(function(B){for(var R=!1,O=B.coverageAreas,I=0,T=O.length;I<T;++I){var L=O[I];if(C>=L.zoomMin&&C<=L.zoomMax){var P=L.bbox,S=[P[1],P[0],P[3],P[2]],x=kS(S,c);if(In(x,f.extent)){R=!0;break}}}R&&d.push(B.attribution)}),d.push(Ctt),d}.bind(this))}this.setState(Oa.READY)},e}(n1),Ttt=Btt,xtt=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)}}(),Stt=function(r){xtt(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:RD({extent:r1(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}(n1),DD=Stt,btt=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)}}(),Ltt=function(r){btt(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 _e(a.getType()==st.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(ye.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(ye.CHANGE,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,n){var i=t===0?0:Math.min(n,t)/t,a=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=n,this.interpolationRatio=i,a&&this.refresh()},e.prototype.cluster=function(){if(!(this.resolution===void 0||!this.source))for(var t=di(),n=this.distance*this.resolution,i=this.source.getFeatures(),a={},o=0,s=i.length;o<s;o++){var A=i[o];if(!(pe(A)in a)){var l=this.geometryFunction(A);if(l){var u=l.getCoordinates();Bh(u,t),Qa(t,n,t);var h=this.source.getFeaturesInExtent(t).filter(function(c){var f=pe(c);return f in a?!1:(a[f]=!0,!0)});this.features.push(this.createCluster(h,t))}}}},e.prototype.createCluster=function(t,n){for(var i=[0,0],a=t.length-1;a>=0;--a){var o=this.geometryFunction(t[a]);o?I2(i,o.getCoordinates()):t.splice(a,1)}R2(i,1/t.length);var s=wa(n),A=this.interpolationRatio,l=new cr([i[0]*(1-A)+s[0]*A,i[1]*(1-A)+s[1]*A]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new nr({geometry:l,features:t})},e}(hl),QD=Ltt,Ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ftt(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 da=globalThis&&globalThis.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||Array.prototype.slice.call(e))},Ia={VERSION1:"version1",VERSION2:"version2",VERSION3:"version3"},Vh={};Vh[Ia.VERSION1]={level0:{supports:[],formats:[],qualities:["native"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["native"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["native","color","grey","bitonal"]}};Vh[Ia.VERSION2]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","sizeByW","sizeByH","sizeByPct"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByDistortedWh","sizeByWh"],formats:["jpg","png"],qualities:["default","bitonal"]}};Vh[Ia.VERSION3]={level0:{supports:[],formats:["jpg"],qualities:["default"]},level1:{supports:["regionByPx","regionSquare","sizeByW","sizeByH","sizeByWh"],formats:["jpg"],qualities:["default"]},level2:{supports:["regionByPx","regionSquare","regionByPct","sizeByW","sizeByH","sizeByPct","sizeByConfinedWh","sizeByWh"],formats:["jpg","png"],qualities:["default"]}};Vh.none={none:{supports:[],formats:[],qualities:[]}};var Itt=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,KR=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Rtt=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;function Ott(r){var e=r.getComplianceLevelSupportedFeatures();return e===void 0&&(e=Vh[Ia.VERSION1].level0),{url:r.imageInfo["@id"]===void 0?void 0:r.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:da(da([],e.formats,!0),[r.imageInfo.formats===void 0?[]:r.imageInfo.formats],!1),qualities:da(da([],e.qualities,!0),[r.imageInfo.qualities===void 0?[]:r.imageInfo.qualities],!1),resolutions:r.imageInfo.scale_factors,tileSize:r.imageInfo.tile_width!==void 0?r.imageInfo.tile_height!==void 0?[r.imageInfo.tile_width,r.imageInfo.tile_height]:[r.imageInfo.tile_width,r.imageInfo.tile_width]:r.imageInfo.tile_height!=null?[r.imageInfo.tile_height,r.imageInfo.tile_height]:void 0}}function Mtt(r){var e=r.getComplianceLevelSupportedFeatures(),t=Array.isArray(r.imageInfo.profile)&&r.imageInfo.profile.length>1,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:da(da([],e.supports,!0),n,!0),formats:da(da([],e.formats,!0),i,!0),qualities:da(da([],e.qualities,!0),a,!0)}}function Ptt(r){var e=r.getComplianceLevelSupportedFeatures(),t=r.imageInfo.extraFormats===void 0?e.formats:da(da([],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 fi(["jpg","png","gif"],i)}).reduce(function(i,a){return i===void 0&&fi(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:da(da([],e.supports,!0),r.imageInfo.extraFeatures,!0),formats:t,qualities:r.imageInfo.extraQualities===void 0?e.qualities:da(da([],e.qualities,!0),r.imageInfo.extraQualities,!0),preferredFormat:n}}var i1={};i1[Ia.VERSION1]=Ott;i1[Ia.VERSION2]=Mtt;i1[Ia.VERSION3]=Ptt;var Ntt=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;t<e.length;t++)switch(e[t]){case"http://library.stanford.edu/iiif/image-api/1.1/context.json":case"http://iiif.io/api/image/1/context.json":return Ia.VERSION1;case"http://iiif.io/api/image/2/context.json":return Ia.VERSION2;case"http://iiif.io/api/image/3/context.json":return Ia.VERSION3;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(Ia.VERSION1)&&this.imageInfo.identifier)return Ia.VERSION1;break}_e(!1,61)}},r.prototype.getComplianceLevelEntryFromProfile=function(e){if(!(this.imageInfo===void 0||this.imageInfo.profile===void 0))switch(e===void 0&&(e=this.getImageApiVersion()),e){case Ia.VERSION1:if(Itt.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Ia.VERSION3:if(Rtt.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Ia.VERSION2:if(typeof this.imageInfo.profile=="string"&&KR.test(this.imageInfo.profile))return this.imageInfo.profile;if(Array.isArray(this.imageInfo.profile)&&this.imageInfo.profile.length>0&&typeof this.imageInfo.profile[0]=="string"&&KR.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?Vh.none.none:Vh[e][t]}},r.prototype.getTileSourceOptions=function(e){var t=e||{},n=this.getImageApiVersion();if(n!==void 0){var i=n===void 0?void 0:i1[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&&fi(i.formats,t.format)?t.format:i.preferredFormat!==void 0?i.preferredFormat:"jpg",supports:i.supports,quality:t.quality&&fi(i.qualities,t.quality)?t.quality:fi(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}(),Utt=Ntt,Dtt=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)}}(),Qtt=function(r){Dtt(e,r);function e(t,n,i,a,o,s,A){var l=this,u=t.getExtent(),h=n.getExtent(),c=h?Ko(i,h):i,f=wa(c),d=Mv(t,n,f,a),v=sD,y=new AD(t,n,c,u,d*v,a),m=y.calculateSourceExtent(),w=s(m,d,o),C=w?ke.IDLE:ke.EMPTY,B=w?w.getPixelRatio():1;return l=r.call(this,i,a,B,C)||this,l.targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=y,l.targetResolution_=a,l.targetExtent_=i,l.sourceImage_=w,l.sourcePixelRatio_=B,l.interpolate_=A,l.canvas_=null,l.sourceListenerKey_=null,l}return e.prototype.disposeInternal=function(){this.state==ke.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==ke.LOADED){var n=Fr(this.targetExtent_)/this.targetResolution_,i=ei(this.targetExtent_)/this.targetResolution_;this.canvas_=uD(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==ke.IDLE){this.state=ke.LOADING,this.changed();var t=this.sourceImage_.getState();t==ke.LOADED||t==ke.ERROR?this.reproject_():(this.sourceListenerKey_=Pe(this.sourceImage_,ye.CHANGE,function(n){var i=this.sourceImage_.getState();(i==ke.LOADED||i==ke.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){Rr(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(BU),Htt=Qtt,HD=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)}}(),mE={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},Gtt=function(r){HD(e,r);function e(t,n){var i=r.call(this,t)||this;return i.image=n,i}return e}(oo),ktt=function(r){HD(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=I_(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||js(o,a))return o&&(a=o),this.getImageInternal(t,n,i,a);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&js(this.reprojectedImage_.getProjection(),a)&&this.reprojectedImage_.getResolution()==n&&nA(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Htt(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 Ee()},e.prototype.handleImageChange=function(t){var n=t.target,i;switch(n.getState()){case ke.LOADING:this.loading=!0,i=mE.IMAGELOADSTART;break;case ke.LOADED:this.loading=!1,i=mE.IMAGELOADEND;break;case ke.ERROR:this.loading=!1,i=mE.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new Gtt(i,n))},e}(K_);function GD(r,e){r.getImage().src=e}var kD=ktt;function Wf(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 $tt=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)}}(),Vtt=function(r){$tt(e,r);function e(t){var n=this,i=t.crossOrigin!==void 0?t.crossOrigin:null,a=t.imageLoadFunction!==void 0?t.imageLoadFunction:GD,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:Ie(t.projection)})||this,n.url_=t.url,n.imageExtent_=t.imageExtent,n.image_=new TU(n.imageExtent_,void 0,1,n.url_,i,a),n.imageSize_=t.imageSize?t.imageSize:null,n.image_.addEventListener(ye.CHANGE,n.handleImageChange.bind(n)),n}return e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,n,i,a){return In(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(t){if(this.image_.getState()==ke.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=Fr(n),A=ei(n),l=s/a,u=A/o,h=a,c=o;if(l>u?h=Math.round(s/u):c=Math.round(A/l),h!==a||c!==o){var f=Ha(h,c);this.getInterpolate()||de(f,Xf);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}(kD),jtt=Vtt,tu="1.3.0",eu={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"},Ktt=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)}}(),Ql=4,YR=[101,101],Ytt=function(r){Ktt(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:GD,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=Ie(i),s=this.getProjection();s&&s!==o&&(n=Mv(s,o,t,n),t=wu(t,o,s));var A=xh(t,n,0,YR),l={SERVICE:"WMS",VERSION:tu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};de(l,this.params_,a);var u=ff((t[0]-A[0])/n,Ql),h=ff((A[3]-t[1])/n,Ql);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=h,this.getRequestUrl_(A,YR,1,s||o,l)}},e.prototype.getLegendUrl=function(t,n){if(this.url_!==void 0){var i={SERVICE:"WMS",VERSION:tu,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 de(i,n),Wf(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=wa(t),A=ql(Fr(t)/o,Ql),l=ql(ei(t)/o,Ql),u=xh(s,o,0,[A,l]),h=ql(this.ratio_*Fr(t)/o,Ql),c=ql(this.ratio_*ei(t)/o,Ql),f=xh(s,o,0,[h,c]),d=this.image_;if(d&&this.renderedRevision_==this.getRevision()&&d.getResolution()==n&&d.getPixelRatio()==i&&Eo(d.getExtent(),u))return d;var v={SERVICE:"WMS",VERSION:tu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};de(v,this.params_),this.imageSize_[0]=RI(Fr(f)/o,Ql),this.imageSize_[1]=RI(ei(f)/o,Ql);var y=this.getRequestUrl_(f,this.imageSize_,i,a,v);return this.image_=new TU(f,n,i,y,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(ye.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,n,i,a,o){if(_e(this.url_!==void 0,9),o[this.v13_?"CRS":"SRS"]=a.getCode(),"STYLES"in this.params_||(o.STYLES=""),i!=1)switch(this.serverType_){case eu.GEOSERVER:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case eu.MAPSERVER:o.MAP_RESOLUTION=90*i;break;case eu.CARMENTA_SERVER:case eu.QGIS:o.DPI=90*i;break;default:_e(!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(","),Wf(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){de(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||tu;this.v13_=F2(t,"1.3")>=0},e}(kD),ztt=Ytt,Xtt=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)}}(),Wtt='© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',qtt=function(r){Xtt(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=[Wtt];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}(DD),Ztt=qtt,Jtt=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=function(r){Jtt(e,r);function e(t){var n=this,i=t||{},a=i.imageSmoothing!==void 0?i.imageSmoothing:!0;i.interpolate!==void 0&&(a=i.interpolate);var o=i.params||{},s="TRANSPARENT"in o?o.TRANSPARENT:!0;return n=r.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:a,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:i.wrapX!==void 0?i.wrapX:!0,transition:i.transition,zDirection:i.zDirection})||this,n.gutter_=i.gutter!==void 0?i.gutter:0,n.params_=o,n.v13_=!0,n.serverType_=i.serverType,n.hidpi_=i.hidpi!==void 0?i.hidpi:!0,n.tmpExtent_=di(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){var o=Ie(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 h=A.getResolution(u[0]),c=A.getTileCoordExtent(u,this.tmpExtent_),f=Li(A.getTileSize(u[0]),this.tmpSize),d=this.gutter_;d!==0&&(f=ZI(f,d,this.tmpSize),c=Qa(c,h*d,c)),s&&s!==o&&(h=Mv(s,o,t,h),c=mm(c,o,s),t=wu(t,o,s));var v={SERVICE:"WMS",VERSION:tu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};de(v,this.params_,a);var y=Math.floor((t[0]-c[0])/h),m=Math.floor((c[3]-t[1])/h);return v[this.v13_?"I":"X"]=y,v[this.v13_?"J":"Y"]=m,this.getRequestUrl_(u,f,c,1,s||o,v)}},e.prototype.getLegendUrl=function(t,n){if(this.urls[0]!==void 0){var i={SERVICE:"WMS",VERSION:tu,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 de(i,n),Wf(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 eu.GEOSERVER:var l=90*a+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+l:s.FORMAT_OPTIONS="dpi:"+l;break;case eu.MAPSERVER:s.MAP_RESOLUTION=90*a;break;case eu.CARMENTA_SERVER:case eu.QGIS:s.DPI=90*a;break;default:_e(!1,52);break}var u=o.getAxisOrientation(),h=i;if(this.v13_&&u.substr(0,2)=="ne"){var c=void 0;c=i[0],h[0]=i[1],h[1]=c,c=i[2],h[2]=i[3],h[3]=c}s.BBOX=h.join(",");var f;if(A.length==1)f=A[0];else{var d=uu(_D(t),A.length);f=A[d]}return Wf(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){de(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||tu;this.v13_=F2(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=Li(a.getTileSize(t[0]),this.tmpSize),l=this.gutter_;l!==0&&(A=ZI(A,l,this.tmpSize),s=Qa(s,o*l,s)),n!=1&&(A=eU(A,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:tu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return de(u,this.params_),this.getRequestUrl_(t,A,s,n,i,u)}},e}(n1),eet=tet,My={KVP:"KVP",REST:"REST"},ret=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)}}(),net=function(r){ret(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}(Db),NB=net,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)}}(),aet=function(r){iet(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:My.KVP,o=t.tileGrid,s=t.urls;return s===void 0&&t.url!==void 0&&(s=ND(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=Um(s.map(n.createFromWMTSTemplate.bind(n)))),n}return e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
|
||
`);this.setTileUrlFunction(Um(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){de(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==My.KVP&&de(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=n==My.KVP?Wf(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]};de(u,o);var h=t;return n==My.KVP?h=Wf(h,u):h=h.replace(/\{(\w+?)\}/g,function(c,f){return u[f]}),h}else return}},e}(n1),$D=aet;window.ol&&!ol.ext&&(ol.ext={});var Cr=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r};window.ol&&(ol.inherits||(ol.inherits=Cr));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 a1(r){const e=r.frameState,t=Ap(r.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new wb(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 Q0=c2.split(".");Q0=parseInt(Q0[0])*100+parseInt(Q0[1]);var UB=function(r,e){var t=r.frameState.pixelRatio;if(Q0>605&&t!==1&&e.getImage()instanceof og){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},ec=function(r){var e=r||{};sA.call(this,e),this.oldcluster=new hl,this.clusters=[],this.animation={start:!1},this.set("animationDuration",typeof e.animationDuration=="number"?e.animationDuration:700),this.set("animationMethod",e.animationMethod||Yo),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};Cr(ec,sA);ec.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)}};ec.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};ec.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]};ec.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.resolution<t?(s=Qa(s,100*t),a.cA=this.oldcluster.getFeaturesInExtent(s),a.cB=this.getSource().getFeaturesInExtent(s),a.revers=!1):(s=Qa(s,100*t),a.cA=this.getSource().getFeaturesInExtent(s),a.cB=this.oldcluster.getFeaturesInExtent(s),a.revers=!0),a.clusters=[],n=0,i;i=a.cA[n];n++){var A=i.get("features");if(A&&A.length){var l=this.getClusterForFeature(A[0],a.cB);l&&a.clusters.push({f:i,pt:l.getGeometry().getCoordinates()})}}if(a.resolution=t,this.sourceChanged=!1,!a.clusters.length||a.clusters.length>1e3){this.stopAnimation();return}o=a.start=new Date().getTime()}if(a.start){var u=r.vectorContext||a1(r),h=(o-a.start)/e;h>1&&(this.stopAnimation(),h=1),h=this.get("animationMethod")(h);var c=this.getStyle(),f=typeof c=="function"?c:c.length?function(){return c}:function(){return[c]};for(r.context.save(),r.context.globalAlpha=this.getOpacity(),n=0,l;l=a.clusters[n];n++){var d=l.f.getGeometry().getCoordinates(),v=d[0]-l.pt[0],y=d[1]-l.pt[1];a.revers?(d[0]=l.pt[0]+h*v,d[1]=l.pt[1]+h*y):(d[0]=d[0]-h*v,d[1]=d[1]-h*y);var m=f(l.f,t,!0);if(m.length||(m=[m]),l.f.get("features").length===1&&!v&&!y)A=l.f.get("features")[0];else{var w=new cr(d);A=new nr(w)}for(var C=0,B;B=m[C];C++)if(B.getText()&&/\n/.test(B.getText().getText())){var R=B.getText().getOffsetX(),O=B.getText().getOffsetY(),I=B.getText().getRotation()||0,T=Number((B.getText().getFont()||"10px").match(/\d+/))*1.2,L=B.getText().getText().split(`
|
||
`),P,S=L.length-1,x=B.clone();L.forEach(function(M,D){switch(D==1&&(x.setImage(),x.setFill(),x.setStroke()),B.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":{P=S;break}case"hanging":case"top":{P=0;break}default:{P=S/2;break}}x.getText().setOffsetX(R-Math.sin(I)*T*(D-P)),x.getText().setOffsetY(O+Math.cos(I)*T*(D-P)),x.getText().setText(M),u.drawFeature(A,UB(r,x))})}else u.drawFeature(A,UB(r,B))}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}}};ec.prototype.postanimate=function(r){this.clip_&&(r.context.restore(),this.clip_=!1)};const oet={extends:tc,name:"ol-animated-clusterlayer",setup(r){const e=Ce("map"),{properties:t}=dr(r),n=pr(()=>new ec(xs(On({},t),{source:new QD({distance:t.distance,geometryFunction:o=>o.getGeometry()})}))),i=pr(()=>n.value.getSource());return ce(t,()=>{n.value.setProperties(t),n.value.changed()}),ir(()=>{e.addLayer(n.value),n.value.changed(),e.changed()}),Ar(()=>{e.removeLayer(n.value)}),Gr("vectorLayer",i),Gr("stylable",n),{vectorLayer:n,map:e}},props:{animationDuration:{type:Number,default:700},distance:{type:Number,default:20},animationMethod:{type:Function,default:Yo},updateWhileAnimating:{type:Boolean,default:!1},updateWhileInteracting:{type:Boolean,default:!1}}};function set(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var DB=le(oet,[["render",set]]),Ns=new Uint8Array(4),Aet=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){ll(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 Ns[0]=0,Ns[1]=0,Ns[2]=0,Ns[3]=0,Ns;this.readAll();var n=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return Ns[0]=this.data_[n*4],Ns[1]=this.data_[n*4+1],Ns[2]=this.data_[n*4+2],Ns[3]=this.data_[n*4+3],Ns},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}(),uet=Aet;function het(){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<o;++r){var i=arguments[r];if(null!=i)for(var f in i)i.hasOwnProperty(f)&&(t[f]=i[f])}return t},n="GENERATE_BUFFERS",t=[],r={vertexPosition:0,indexPosition:0};function o(e,n,t,r,o){e[n+0]=t,e[n+1]=r,e[n+2]=o}function i(e,n,i,f,s,a){var u=3+s,l=e[n+0],v=e[n+1],c=t;c.length=s;for(var g=0;g<c.length;g++)c[g]=e[n+2+g];var b=a?a.vertexPosition:0,h=a?a.indexPosition:0,d=b/u;return o(i,b,l,v,0),c.length&&i.set(c,b+3),o(i,b+=u,l,v,1),c.length&&i.set(c,b+3),o(i,b+=u,l,v,2),c.length&&i.set(c,b+3),o(i,b+=u,l,v,3),c.length&&i.set(c,b+3),b+=u,f[h++]=d,f[h++]=d+1,f[h++]=d+3,f[h++]=d+1,f[h++]=d+2,f[h++]=d+3,r.vertexPosition=b,r.indexPosition=h,r}var f=self;f.onmessage=function(t){var r=t.data;if(r.type===n){for(var o,s=r.customAttributesCount,a=2+s,u=new Float32Array(r.renderInstructions),l=u.length/a,v=4*l*(s+3),c=new Uint32Array(6*l),g=new Float32Array(v),b=0;b<u.length;b+=a)o=i(u,b,g,c,s,o);var h=e({vertexBuffer:g.buffer,indexBuffer:c.buffer,renderInstructions:u.buffer},r);f.postMessage(h,[g.buffer,c.buffer,u.buffer])}};';return new Worker(typeof Blob>"u"?"data:application/javascript;base64,"+Buffer.from(r,"binary").toString("base64"):URL.createObjectURL(new Blob([r],{type:"application/javascript"})))}var cet=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)}}(),fet=function(r){cet(e,r);function e(t,n){var i=this,a=n.uniforms||{},o=Jn();a[af.PROJECTION_MATRIX]=o,i=r.call(this,t,{uniforms:a,postProcesses:n.postProcesses})||this,i.ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new ev(Pv,N0),i.hitVerticesBuffer_=new ev(Pv,N0),i.indicesBuffer_=new ev(Z_,N0),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:Ho.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:Ho.FLOAT},{name:"a_index",size:1,type:Ho.FLOAT}].concat(s),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Ho.FLOAT},{name:"a_index",size:1,type:Ho.FLOAT},{name:"a_hitColor",size:4,type:Ho.FLOAT},{name:"a_featureUid",size:1,type:Ho.FLOAT}].concat(s),i.customAttributes=n.attributes?n.attributes:[],i.previousExtent_=di(),i.currentTransform_=o,i.renderTransform_=Jn(),i.invertRenderTransform_=Jn(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=het(),i.worker_.addEventListener("message",function(l){var u=l.data;if(u.type===pE.GENERATE_BUFFERS){var h=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_=h,Xv(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_=[Pe(A,Si.ADDFEATURE,i.handleSourceFeatureAdded_,i),Pe(A,Si.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),Pe(A,Si.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),Pe(A,Si.CLEAR,i.handleSourceFeatureClear_,i)],A.forEachFeature(function(l){this.featureCache_[pe(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 uet(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var n=t.feature;this.featureCache_[pe(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var n=t.feature;this.featureCache_[pe(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var n=t.feature;delete this.featureCache_[pe(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[fn.ANIMATING]&&!t.viewHints[fn.INTERACTING],s=!nA(this.previousExtent_,t.extent),A=this.sourceRevision_<i.getRevision();if(A&&(this.sourceRevision_=i.getRevision()),o&&(s||A)){var l=a.projection,u=a.resolution,h=n instanceof j_?n.getRenderBuffer():0,c=Qa(t.extent,h*u);i.loadFeatures(c,u,l),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),Ap(this.currentTransform_,this.invertRenderTransform_),this.helper.useProgram(this.program_),this.helper.prepareDraw(t),this.helper.bindBuffer(this.verticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.attributes),!0},e.prototype.rebuildBuffers_=function(t){var n=Jn();this.helper.makeProjectionTransform(t,n);var i=(2+this.customAttributes.length)*this.featureCount_;if((!this.renderInstructions_||this.renderInstructions_.length!==i)&&(this.renderInstructions_=new Float32Array(i)),this.hitDetectionEnabled_){var a=(7+this.customAttributes.length)*this.featureCount_;(!this.hitRenderInstructions_||this.hitRenderInstructions_.length!==a)&&(this.hitRenderInstructions_=new Float32Array(a))}var o,s,A=[],l=[],u=0,h=0,c;for(var f in this.featureCache_)if(o=this.featureCache_[f],s=o.geometry,!(!s||s.getType()!==st.POINT)){A[0]=s.getFlatCoordinates()[0],A[1]=s.getFlatCoordinates()[1],An(n,A),c=TJ(h+6,l),this.renderInstructions_[u++]=A[0],this.renderInstructions_[u++]=A[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[h++]=A[0],this.hitRenderInstructions_[h++]=A[1],this.hitRenderInstructions_[h++]=c[0],this.hitRenderInstructions_[h++]=c[1],this.hitRenderInstructions_[h++]=c[2],this.hitRenderInstructions_[h++]=c[3],this.hitRenderInstructions_[h++]=Number(f));for(var d=void 0,v=0;v<this.customAttributes.length;v++)d=this.customAttributes[v].callback(o.feature,o.properties),this.renderInstructions_[u++]=d,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[h++]=d)}var y={type:pE.GENERATE_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(y.projectionTransform=n,y.generateBuffersRun=++this.generateBuffersRun_,this.ready=!1,this.worker_.postMessage(y,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var m={type:pE.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};m.projectionTransform=n,m.hitDetection=!0,this.worker_.postMessage(m,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){if(_e(this.hitDetectionEnabled_,66),!!this.hitRenderInstructions_){var s=An(n.coordinateToPixelTransform,t.slice()),A=this.hitRenderTarget_.readPixel(s[0]/2,s[1]/2),l=[A[0]/255,A[1]/255,A[2]/255,A[3]/255],u=xJ(l),h=this.hitRenderInstructions_[u],c=Math.floor(h).toString(),f=this.getLayer().getSource(),d=f.getFeatureByUid(c);if(d)return a(d,this.getLayer(),null)}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var n=this.indicesBuffer_.getSize();this.helper.drawElements(0,n)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){Rr(t)}),this.sourceListenKeys_=null,r.prototype.disposeInternal.call(this)},e}(mD),VD=fet,pet=function(){function r(){this.uniforms=[],this.attributes=[],this.varyings=[],this.sizeExpression="vec2(1.0)",this.rotationExpression="0.0",this.offsetExpression="vec2(0.0)",this.colorExpression="vec4(1.0)",this.texCoordExpression="vec4(0.0, 0.0, 1.0, 1.0)",this.discardExpression="false",this.rotateWithView=!1}return r.prototype.addUniform=function(e){return this.uniforms.push(e),this},r.prototype.addAttribute=function(e){return this.attributes.push(e),this},r.prototype.addVarying=function(e,t,n){return this.varyings.push({name:e,type:t,expression:n}),this},r.prototype.setSizeExpression=function(e){return this.sizeExpression=e,this},r.prototype.setRotationExpression=function(e){return this.rotationExpression=e,this},r.prototype.setSymbolOffsetExpression=function(e){return this.offsetExpression=e,this},r.prototype.setColorExpression=function(e){return this.colorExpression=e,this},r.prototype.setTextureCoordinateExpression=function(e){return this.texCoordExpression=e,this},r.prototype.setFragmentDiscardExpression=function(e){return this.discardExpression=e,this},r.prototype.setSymbolRotateWithView=function(e){return this.rotateWithView=e,this},r.prototype.getSizeExpression=function(){return this.sizeExpression},r.prototype.getOffsetExpression=function(){return this.offsetExpression},r.prototype.getColorExpression=function(){return this.colorExpression},r.prototype.getTextureCoordinateExpression=function(){return this.texCoordExpression},r.prototype.getFragmentDiscardExpression=function(){return this.discardExpression},r.prototype.getSymbolVertexShader=function(e){var t=this.rotateWithView?"u_offsetScaleMatrix * u_offsetRotateMatrix":"u_offsetScaleMatrix",n=this.attributes,i=this.varyings;return e&&(n=n.concat("vec4 a_hitColor"),i=i.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;
|
||
uniform mat4 u_projectionMatrix;
|
||
uniform mat4 u_offsetScaleMatrix;
|
||
uniform mat4 u_offsetRotateMatrix;
|
||
uniform float u_time;
|
||
uniform float u_zoom;
|
||
uniform float u_resolution;
|
||
`.concat(this.uniforms.map(function(a){return"uniform "+a+";"}).join(`
|
||
`),`
|
||
attribute vec2 a_position;
|
||
attribute float a_index;
|
||
`).concat(n.map(function(a){return"attribute "+a+";"}).join(`
|
||
`),`
|
||
varying vec2 v_texCoord;
|
||
varying vec2 v_quadCoord;
|
||
`).concat(i.map(function(a){return"varying "+a.type+" "+a.name+";"}).join(`
|
||
`),`
|
||
void main(void) {
|
||
mat4 offsetMatrix = `).concat(t,`;
|
||
vec2 halfSize = `).concat(this.sizeExpression,` * 0.5;
|
||
vec2 offset = `).concat(this.offsetExpression,`;
|
||
float angle = `).concat(this.rotationExpression,`;
|
||
float offsetX;
|
||
float offsetY;
|
||
if (a_index == 0.0) {
|
||
offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);
|
||
offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);
|
||
} else if (a_index == 1.0) {
|
||
offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y - halfSize.y) * sin(angle);
|
||
offsetY = (offset.y - halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);
|
||
} else if (a_index == 2.0) {
|
||
offsetX = (offset.x + halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);
|
||
offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x + halfSize.x) * sin(angle);
|
||
} else {
|
||
offsetX = (offset.x - halfSize.x) * cos(angle) + (offset.y + halfSize.y) * sin(angle);
|
||
offsetY = (offset.y + halfSize.y) * cos(angle) - (offset.x - halfSize.x) * sin(angle);
|
||
}
|
||
vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);
|
||
gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;
|
||
vec4 texCoord = `).concat(this.texCoordExpression,`;
|
||
float u = a_index == 0.0 || a_index == 3.0 ? texCoord.s : texCoord.p;
|
||
float v = a_index == 2.0 || a_index == 3.0 ? texCoord.t : texCoord.q;
|
||
v_texCoord = vec2(u, v);
|
||
u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;
|
||
v = a_index == 2.0 || a_index == 3.0 ? 0.0 : 1.0;
|
||
v_quadCoord = vec2(u, v);
|
||
`).concat(i.map(function(a){return" "+a.name+" = "+a.expression+";"}).join(`
|
||
`),`
|
||
}`)},r.prototype.getSymbolFragmentShader=function(e){var t=e?" if (gl_FragColor.a < 0.1) { discard; } gl_FragColor = v_hitColor;":"",n=this.varyings;return e&&(n=n.concat({name:"v_hitColor",type:"vec4",expression:"a_hitColor"})),`precision mediump float;
|
||
uniform float u_time;
|
||
uniform float u_zoom;
|
||
uniform float u_resolution;
|
||
`.concat(this.uniforms.map(function(i){return"uniform "+i+";"}).join(`
|
||
`),`
|
||
varying vec2 v_texCoord;
|
||
varying vec2 v_quadCoord;
|
||
`).concat(n.map(function(i){return"varying "+i.type+" "+i.name+";"}).join(`
|
||
`),`
|
||
void main(void) {
|
||
if (`).concat(this.discardExpression,`) { discard; }
|
||
gl_FragColor = `).concat(this.colorExpression,`;
|
||
gl_FragColor.rgb *= gl_FragColor.a;
|
||
`).concat(t,`
|
||
}`)},r}();function det(r){var e=r.symbol,t=e.size!==void 0?e.size:1,n=e.color||"white",i=e.textureCoord||[0,0,1,1],a=e.offset||[0,0],o=e.opacity!==void 0?e.opacity:1,s=e.rotation!==void 0?e.rotation:0,A={inFragmentShader:!1,variables:[],attributes:[],stringLiteralsMap:{},functions:{}},l=Ae(A,t,Jt.NUMBER_ARRAY|Jt.NUMBER),u=Ae(A,a,Jt.NUMBER_ARRAY),h=Ae(A,i,Jt.NUMBER_ARRAY),c=Ae(A,s,Jt.NUMBER),f={inFragmentShader:!0,variables:A.variables,attributes:[],stringLiteralsMap:A.stringLiteralsMap,functions:{}},d=Ae(f,n,Jt.COLOR),v=Ae(f,o,Jt.NUMBER),y="1.0",m="vec2(".concat(Ae(f,t,Jt.NUMBER_ARRAY|Jt.NUMBER),").x");switch(e.symbolType){case"square":break;case"image":break;case"circle":y="(1.0-smoothstep(1.-4./".concat(m,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var w="(v_quadCoord*2.-1.)",C="(atan(".concat(w,".x,").concat(w,".y))");y="(1.0-smoothstep(.5-3./".concat(m,",.5,cos(floor(.5+").concat(C,"/2.094395102)*2.094395102-").concat(C,")*length(").concat(w,")))");break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var B=new pet().setSizeExpression("vec2(".concat(l,")")).setRotationExpression(c).setSymbolOffsetExpression(u).setTextureCoordinateExpression(h).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4(".concat(d,".rgb, ").concat(d,".a * ").concat(v," * ").concat(y,")"));if(r.filter){var R=Ae(f,r.filter,Jt.BOOLEAN);B.setFragmentDiscardExpression("!".concat(R))}var O={};if(f.variables.forEach(function(T){var L=Ub(T);B.addUniform("float ".concat(L)),O[L]=function(){if(!r.variables||r.variables[T]===void 0)throw new Error("The following variable is missing from the style: ".concat(T));var P=r.variables[T];return typeof P=="string"&&(P=Nm(A,P)),P!==void 0?P:-9999999}}),e.symbolType==="image"&&e.src){var I=new Image;I.crossOrigin=e.crossOrigin===void 0?"anonymous":e.crossOrigin,I.src=e.src,B.addUniform("sampler2D u_texture").setColorExpression(B.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),O.u_texture=I}return f.attributes.forEach(function(T){A.attributes.indexOf(T)===-1&&A.attributes.push(T),B.addVarying("v_".concat(T),"float","a_".concat(T))}),A.attributes.forEach(function(T){B.addAttribute("float a_".concat(T))}),{builder:B,attributes:A.attributes.map(function(T){return{name:T,callback:function(L,P){var S=P[T];return typeof S=="string"&&(S=Nm(A,S)),S!==void 0?S:-9999999}}}),uniforms:O}}var vet=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)}}(),get=function(r){vet(e,r);function e(t){var n=this,i=de({},t);return n=r.call(this,i)||this,n.parseResult_=det(t.style),n.styleVariables_=t.style.variables||{},n.hitDetectionDisabled_=!!t.disableHitDetection,n}return e.prototype.createRenderer=function(){return new VD(this,{vertexShader:this.parseResult_.builder.getSymbolVertexShader(),fragmentShader:this.parseResult_.builder.getSymbolFragmentShader(),hitVertexShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolVertexShader(!0),hitFragmentShader:!this.hitDetectionDisabled_&&this.parseResult_.builder.getSymbolFragmentShader(!0),uniforms:this.parseResult_.uniforms,attributes:this.parseResult_.attributes})},e.prototype.updateStyleVariables=function(t){de(this.styleVariables_,t),this.changed()},e}(qh),yet=get;const met={extends:tc,name:"ol-webglpoints-layer",setup(r){const e=Ce("map"),{properties:t}=dr(r),n=pr(()=>new yet(t));return ce(t,()=>{n.value.setProperties(t)}),ir(()=>{e.addLayer(n.value)}),Ar(()=>{e.removeLayer(n.value)}),Gr("webglPointsLayer",n),{webglPointsLayer:n}},props:{disableHitDetection:{type:Boolean,default:!1},style:{type:Object,default:()=>({symbol:{symbolType:"circle",size:8,color:"#33AAFF",opacity:.9}})}}};function _et(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var QB=le(met,[["render",_et]]),wet=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)}}(),ss={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},Eet=["#00f","#0ff","#0f0","#ff0","#f00"],Cet=function(r){wet(e,r);function e(t){var n=this,i=t||{},a=de({},i);delete a.gradient,delete a.radius,delete a.blur,delete a.weight,n=r.call(this,a)||this,n.gradient_=null,n.addChangeListener(ss.GRADIENT,n.handleGradientChanged_),n.setGradient(i.gradient?i.gradient:Eet),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(ss.BLUR)},e.prototype.getGradient=function(){return this.get(ss.GRADIENT)},e.prototype.getRadius=function(){return this.get(ss.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=Bet(this.getGradient())},e.prototype.setBlur=function(t){this.set(ss.BLUR,t)},e.prototype.setGradient=function(t){this.set(ss.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(ss.RADIUS,t)},e.prototype.createRenderer=function(){return new VD(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.weightFunction_(t);return n!==void 0?En(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(ss.RADIUS)+this.get(ss.BLUR))*2}.bind(this),u_blurSlope:function(){return this.get(ss.RADIUS)/Math.max(1,this.get(ss.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}(j_);function Bet(r){for(var e=1,t=256,n=Ha(e,t),i=n.createLinearGradient(0,0,e,t),a=1/(r.length-1),o=0,s=r.length;o<s;++o)i.addColorStop(o*a,r[o]);return n.fillStyle=i,n.fillRect(0,0,e,t),n.canvas}var jD=Cet;const Tet={extends:tc,name:"ol-heatmap-layer",setup(r){const e=Ce("map"),{properties:t}=dr(r),n=pr(()=>new jD(t));return ce(t,()=>{n.value.setProperties(t)}),ir(()=>{e.addLayer(n.value)}),Ar(()=>{e.removeLayer(n.value)}),Gr("heatmapLayer",n),Gr("stylable",n),{heatmapLayer:n}},props:{weight:{type:Function},extent:{type:Array},blur:{type:Number},radius:{type:Number}}};function xet(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var HB=le(Tet,[["render",xet]]);function Dm(r){Dm.installed||(Dm.installed=!0,r.component(RB.name,RB),r.component(OB.name,OB),r.component(MB.name,MB),r.component(PB.name,PB),r.component(DB.name,DB),r.component(QB.name,QB),r.component(HB.name,HB))}var bet=Object.freeze(Object.defineProperty({__proto__:null,default:Dm,install:Dm,TileLayer:RB,WebGLTileLayer:OB,ImageLayer:MB,VectorLayer:PB,AnimatedClusterLayer:DB,WebglPointsLayer:QB,HeatmapLayer:HB},Symbol.toStringTag,{value:"Module"}));const Let={name:"ol-source-xyz",setup(r){const e=Ce("tileLayer"),{properties:t}=dr(r);let n=pr(()=>new DD(t));return ce(n,()=>{e.value.setSource(n.value)}),ce(e,()=>{e.value.setSource(n.value)}),ir(()=>{e.value.setSource(n.value)}),Ar(()=>{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 Fet(r,e,t,n,i,a){return Er("",!0)}var GB=le(Let,[["render",Fet]]);const Iet={name:"ol-source-osm",setup(r){const e=Ce("tileLayer"),{properties:t}=dr(r);let n=pr(()=>new Ztt(t));return ce(n,()=>{e.value.setSource(n.value)}),ce(e,()=>{e.value.setSource(n.value)}),ir(()=>{e.value.setSource(n.value)}),Ar(()=>{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 Ret(r,e,t,n,i,a){return Er("",!0)}var kB=le(Iet,[["render",Ret]]);const Oet={name:"ol-source-image-static",setup(r){const e=Ce("imageLayer"),{properties:t}=dr(r),n=()=>new jtt(xs(On({},t),{projection:typeof t.projection=="string"?t.projection:new ul(On({},t.projection))}));let i=n();return ce(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),ir(()=>{e.setSource(i)}),Ar(()=>{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 Met(r,e,t,n,i,a){return Er("",!0)}var $B=le(Oet,[["render",Met]]);const Pet={name:"ol-source-wmts",setup(r){const e=Ce("tileLayer"),{properties:t}=dr(r),n=pr(()=>Ie(t.projection).getExtent()),i=pr(()=>Ss(n.value)),a=pr(()=>Fr(n.value)/256),o=pr(()=>{const A=new Array(t.tileZoomLevel),l=new Array(t.tileZoomLevel);for(var u=0;u<t.tileZoomLevel;++u)A[u]=a.value/Math.pow(2,u),l[u]=u;return new NB({origin:i.value,resolutions:A,matrixIds:l})}),s=pr(()=>new $D(xs(On({},t),{projection:typeof t.projection=="string"?t.projection:new ul(On({},t.projection)),tileGrid:o.value})));return ce(s,()=>{e.value.setSource(s.value)}),ce(e,()=>{e.value.setSource(s.value)}),ir(()=>{e.value.setSource(s.value)}),Ar(()=>{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 Net(r,e,t,n,i,a){return Er("",!0)}var VB=le(Pet,[["render",Net]]);const Uet={name:"ol-source-vector",setup(r){const e=Ce("vectorLayer")||Ce("heatmapLayer"),{properties:t}=dr(r);let n=pr(()=>new hl(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ce(t,()=>{i()}),ce(e,()=>{i()}),ir(()=>{e.value.setSource(n.value)}),Ar(()=>{e.value.setSource(null)}),Gr("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 Det(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var jB=le(Uet,[["render",Det]]);const Qet={name:"ol-source-cluster",setup(r){const e=Ce("vectorLayer"),{properties:t}=dr(r);let n=pr(()=>new QD(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ce(t,()=>{i()}),ce(e,()=>{i()}),ir(()=>{e.value.setSource(n.value),e.value.changed()}),Ar(()=>{e.value.setSource(null)}),Gr("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 Het(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var KB=le(Qet,[["render",Het]]);const Get={name:"ol-source-bingmaps",setup(r){const e=Ce("tileLayer"),{properties:t}=dr(r);let n=pr(()=>new Ttt(xs(On({},t),{key:t.apiKey})));return ce(n,()=>{e.value.setSource(n.value)}),ce(e,()=>{e.value.setSource(n.value)}),ir(()=>{e.value.setSource(n.value)}),Ar(()=>{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 ket(r,e,t,n,i,a){return Er("",!0)}var YB=le(Get,[["render",ket]]);class GA extends $D{constructor(e){GA.layerLabelMap={vec:"cva",ter:"cta",img:"cia"},GA.layerZoomMap={vec:18,ter:14,img:18};let t=e||{};t.layerType=t.layerType||"vec",t.layerType=t.isLabel?GA.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||GA.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:GA.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"?GA.default4326TileGrid():GA.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 NB({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 NB({extent:[-200375083427892e-7,-200375083427892e-7,200375083427892e-7,200375083427892e-7],resolutions:e,matrixIds:t,origin:[-200375083427892e-7,200375083427892e-7],minZoom:1})}}const $et={name:"ol-source-tianditu",setup(r){const e=Ce("tileLayer"),{properties:t}=dr(r);let n=pr(()=>new GA(t));return ce(n,()=>{e.value.setSource(n.value)}),ce(e,()=>{e.value.setSource(n.value)}),ir(()=>{e.value.setSource(n.value)}),Ar(()=>{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 Vet(r,e,t,n,i,a){return Er("",!0)}var zB=le($et,[["render",Vet]]);const jet={name:"ol-source-image-wms",setup(r){const e=Ce("imageLayer"),{properties:t}=dr(r),n=()=>new ztt(xs(On({},t),{params:{LAYERS:r.layers,STYLES:r.styles,TIME:r.time},projection:typeof t.projection=="string"?t.projection:new ul(On({},t.projection))}));let i=n();return ce(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),ir(()=>{e.setSource(i)}),Ar(()=>{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 Ket(r,e,t,n,i,a){return Er("",!0)}var XB=le(jet,[["render",Ket]]);const Yet={name:"ol-source-webglpoints",setup(r){const e=Ce("webglPointsLayer"),{properties:t}=dr(r);let n=pr(()=>new hl(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ce(t,()=>{i()}),ce(e,()=>{i()}),ir(()=>{e.value.setSource(n.value)}),Ar(()=>{e.value.setSource(null)}),Gr("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 zet(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var WB=le(Yet,[["render",zet]]);function Qm(r){Qm.installed||(Qm.installed=!0,r.component(GB.name,GB),r.component(kB.name,kB),r.component($B.name,$B),r.component(VB.name,VB),r.component(jB.name,jB),r.component(KB.name,KB),r.component(YB.name,YB),r.component(zB.name,zB),r.component(XB.name,XB),r.component(WB.name,WB))}var Xet=Object.freeze(Object.defineProperty({__proto__:null,default:Qm,install:Qm,SourceXYZ:GB,SourceOSM:kB,SourceImageStatic:$B,SourceWMTS:VB,SourceVector:jB,SourceCluster:KB,SourceTianDiTu:zB,SourceImageWMS:XB,SourceWebglPoints:WB,SourceBingMaps:YB},Symbol.toStringTag,{value:"Module"}));function Ri(r,e,t){const n=Ce("map"),i=Ce("controlBar",null),a=i!=null?i.value:n,{properties:o}=dr(e);let s=pr(()=>new r(On({},o)));return s.value.set("order",t.attrs.order==null?0:t.attrs.order),ce(s,(A,l)=>{a.removeControl&&(a.removeControl(l),a.addControl(A),n.changed())}),ir(()=>{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()}),Ar(()=>{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 Wet={name:"ol-fullscreen-control",setup(r,e){const{control:t}=Ri(gj,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 qet(r,e,t,n,i,a){return Er("",!0)}var qB=le(Wet,[["render",qet]]);const Zet={name:"ol-mouseposition-control",setup(r,e){const{control:t}=Ri(_j,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 Jet(r,e,t,n,i,a){return Er("",!0)}var ZB=le(Zet,[["render",Jet]]);const trt={name:"ol-attribution-control",setup(r,e){const{control:t}=Ri(aU,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 ert(r,e,t,n,i,a){return Er("",!0)}var JB=le(trt,[["render",ert]]);const rrt={name:"ol-overviewmap-control",setup(r,e){const t=Ce("map"),{control:n}=Ri(Tj,r,e);return ir(()=>{n.value.setMap(t)}),Ar(()=>{n.value.setMap(null)}),Gr("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 nrt(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var tT=le(rrt,[["render",nrt]]);const irt={name:"ol-scaleline-control",setup(r,e){const{control:t}=Ri(Lj,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 art(r,e,t,n,i,a){return Er("",!0)}var eT=le(irt,[["render",art]]);const ort={name:"ol-zoom-control",setup(r,e){const{control:t}=Ri(sU,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 srt(r,e,t,n,i,a){return Er("",!0)}var rT=le(ort,[["render",srt]]);const Art={name:"ol-zoomslider-control",setup(r,e){const{control:t}=Ri(Rj,r,e);return{control:t}},props:{duration:{type:Number,default:200},className:{type:String,default:"ol-zoomslider"},render:{type:Function}}};function lrt(r,e,t,n,i,a){return Er("",!0)}var nT=le(Art,[["render",lrt]]);const urt={name:"ol-zoomtoextent-control",setup(r,e){const{control:t}=Ri(Pj,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 hrt(r,e,t,n,i,a){return Er("",!0)}var iT=le(urt,[["render",hrt]]);const crt={name:"ol-rotate-control",setup(r,e){const{control:t}=Ri(oU,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 frt(r,e,t,n,i,a){return Er("",!0)}var zR=le(crt,[["render",frt]]),KD={exports:{}},prt=Ftt(oj);/*!
|
||
* 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(prt)})(Ys,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",h="contextmenu",c={width:150,scrollAt:4,eventType:h,defaultItems:!0},f=[{text:"Zoom In",classname:o.zoomIn+" "+o.icon,callback:function(L,P){var S=P.getView();S.animate({zoom:+S.getZoom()+1,duration:700,center:L.coordinate})}},{text:"Zoom Out",classname:o.zoomOut+" "+o.icon,callback:function(L,P){var S=P.getView();S.animate({zoom:+S.getZoom()-1,duration:700,center:L.coordinate})}}];function d(L,P){if(P===void 0&&(P="Assertion failed"),!L)throw typeof Error<"u"?new Error(P):P}function v(L){return/^\d+$/.test(L)}function y(L,P){return L.classList?L.classList.contains(P):B(P).test(L.className)}function m(L,P,S){P===void 0&&(P=window.document);var x=Array.prototype.slice,M=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(L))switch(L[0]){case"#":M=[w(L.substr(1))];break;case".":M=x.call(P.getElementsByClassName(L.substr(1).replace(/\./g," ")));break;default:M=x.call(P.getElementsByTagName(L))}else M=x.call(P.querySelectorAll(L));return S?M:M[0]}function w(L){return L=L[0]==="#"?L.substr(1,L.length):L,document.getElementById(L)}function C(L){var P=document.createDocumentFragment(),S=document.createElement("div");for(S.innerHTML=L;S.firstChild;)P.appendChild(S.firstChild);return P}function B(L){return new RegExp("(^|\\s+) "+L+" (\\s+|$)")}function R(L,P,S){L.classList?L.classList.add(P):L.className=(L.className+" "+P).trim(),S&&v(S)&&window.setTimeout(function(){return O(L,P)},S)}function O(L,P,S){L.classList?L.classList.remove(P):L.className=L.className.replace(B(P)," ").trim(),S&&v(S)&&window.setTimeout(function(){return R(L,P)},S)}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,P=0;return Object.keys(this.items).forEach(function(S){L.items[S].submenu||L.items[S].separator||P++}),P},I.prototype.getPixelClicked=function(){return this.pixelClicked},I.prototype.getCoordinateClicked=function(){return this.coordinateClicked},I.prototype.positionContainer=function(L){var P=this,S=this.Base.container,x=this.map.getSize(),M=x[1]-L[1],D=x[0]-L[0],W=S.offsetWidth,z=Math.round(this.lineHeight*this.getItemsLength()),tt=m("li."+s.submenu+">div",S,!0);D>=W?(S.style.right="auto",S.style.left=L[0]+5+"px"):(S.style.left="auto",S.style.right="15px"),M>=z?(S.style.bottom="auto",S.style.top=L[1]-10+"px"):(S.style.top="auto",S.style.bottom=0),function q(rt,nt,_t){if(Array.isArray(rt))rt.forEach(function(j){return q(j,nt,_t)});else for(var F=Array.isArray(nt)?nt:nt.split(/\s+/),$=F.length;$--;)y(rt,F[$])&&O(rt,F[$],_t)}(S,s.hidden),tt.length&&(this.submenu.lastLeft=D<2*W?"-"+W+"px":this.submenu.left,tt.forEach(function(q){var rt,nt,_t,F={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},$=(nt=(rt=q).getBoundingClientRect(),_t=document.documentElement,{left:nt.left+window.pageXOffset-_t.clientLeft,top:nt.top+window.pageYOffset-_t.clientTop,width:rt.offsetWidth,height:rt.offsetHeight}),j=$.height,X=M-j;X<0&&(X=j-(F.h-$.top),q.style.top="-"+X+"px"),q.style.left=P.submenu.lastLeft}))},I.prototype.openMenu=function(L,P){this.Base.dispatchEvent({type:l,pixel:L,coordinate:P}),this.opened=!0,this.positionContainer(L)},I.prototype.closeMenu=function(){this.opened=!1,function L(P,S,x){if(Array.isArray(P))P.forEach(function(W){return L(W,S)});else for(var M=Array.isArray(S)?S:S.split(/\s+/),D=M.length;D--;)y(P,M[D])||R(P,M[D],x)}(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 P=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===h&&(L.stopPropagation(),L.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),L.target.addEventListener("pointerdown",{handleEvent:function(S){P.opened&&(P.closeMenu(),S.stopPropagation(),L.target.removeEventListener(S.type,this,!1))}},!1))},I.prototype.handleMapMoveEvent=function(L){this.closeMenu()},I.prototype.setItemListener=function(L,P){var S,x=this;L&&typeof this.items[P].callback=="function"&&(S=this.items[P].callback,L.addEventListener("click",function(M){M.preventDefault();var D={coordinate:x.getCoordinateClicked(),data:x.items[P].data||null};x.closeMenu(),S(D,x.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 P=document.createElement("div"),S=document.createElement("ul"),x=[s.container,s.unselectable];return L&&x.push(s.hidden),P.className=x.join(" "),P.style.width=parseInt(this.Base.options.width,10)+"px",P.appendChild(S),P},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 P,S=this;if(L.items&&Array.isArray(L.items)){L.classname=L.classname||"",P=s.submenu,~L.classname.indexOf(P)||(L.classname=L.classname.length?" "+s.submenu:s.submenu);var x=this.generateHtmlAndPublish(this.container,L),M=this.createContainer();M.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,x.appendChild(M),L.items.forEach(function(D){S.generateHtmlAndPublish(M,D,!0)})}else this.generateHtmlAndPublish(this.container,L)},T.prototype.generateHtmlAndPublish=function(L,P,S){var x,M,D="_"+Math.random().toString(36).substr(2,9),W=!1;return typeof P=="string"&&P.trim()==="-"?(x=C('<li id="'+D+'" class="'+s.separator+'"><hr></li>'),M=[].slice.call(x.childNodes,0)[0],L.firstChild.appendChild(x),W=!0):(P.classname=P.classname||"",x=C("<span>"+P.text+"</span>"),M=document.createElement("li"),P.icon&&(P.classname===""?P.classname=s.icon:P.classname.indexOf(s.icon)===-1&&(P.classname+=" "+s.icon),M.setAttribute("style","background-image:url("+P.icon+")")),M.id=D,M.className=P.classname,M.appendChild(x),L.firstChild.appendChild(M)),this.Base.Internal.items[D]={id:D,submenu:S||0,separator:W,callback:P.callback,data:P.data||null},this.Base.Internal.setItemListener(M,D),M},T.prototype.removeMenuEntry=function(L){var P=m("#"+L,this.container.firstChild);P&&this.container.firstChild.removeChild(P),delete this.Base.Internal.items[L]},T.prototype.cloneAndGetLineHeight=function(){var L=this.container.cloneNode(),P=C("<span>Foo</span>"),S=C("<span>Foo</span>"),x=document.createElement("li"),M=document.createElement("li");x.appendChild(P),M.appendChild(S),L.appendChild(x),L.appendChild(M),this.container.parentNode.appendChild(L);var D=L.offsetHeight/2;return this.container.parentNode.removeChild(L),D},function(L){function P(S){S===void 0&&(S={}),d(typeof S=="object","@param `opt_options` should be object type!"),this.options=function(x,M){var D={};for(var W in x)D[W]=x[W];for(var z in M)D[z]=M[z];return D}(c,S),this.disabled=!1,this.Internal=new I(this),this.Html=new T(this),L.call(this,{element:this.container})}return L&&(P.__proto__=L),P.prototype=Object.create(L&&L.prototype),P.prototype.constructor=P,P.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},P.prototype.close=function(){this.Internal.closeMenu()},P.prototype.enable=function(){this.disabled=!1},P.prototype.disable=function(){this.disabled=!0},P.prototype.getDefaultItems=function(){return f},P.prototype.countItems=function(){return Object.keys(this.Internal.items).length},P.prototype.extend=function(S){d(Array.isArray(S),"@param `arr` should be an Array."),S.forEach(this.push,this)},P.prototype.isOpen=function(){return this.Internal.opened},P.prototype.updatePosition=function(S){d(Array.isArray(S),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(S)},P.prototype.pop=function(){var S=Object.keys(this.Internal.items);this.Html.removeMenuEntry(S[S.length-1])},P.prototype.push=function(S){d(S!=null,"@param `item` must be informed."),this.Html.addMenuEntry(S)},P.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},P.prototype.setMap=function(S){L.prototype.setMap.call(this,S),S?this.Internal.init(S,this):this.Internal.removeListeners()},P}(i.default)})})(KD);var drt=KD.exports;const vrt={name:"ol-context-menu",setup(r,e){const{control:t}=Ri(drt,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 grt(r,e,t,n,i,a){return Er("",!0)}var aT=le(vrt,[["render",grt]]),Ao=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)),yr.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")};Cr(Ao,yr);Ao.prototype.setMap=function(r){var e,t;if(this.getMap()){for(e=0;e<this.layers.length;e++)t=this.layers[e],t.right?t.layer.un(["precompose","prerender"],this.precomposeRight_):t.layer.un(["precompose","prerender"],this.precomposeLeft_),t.layer.un(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch{}}if(yr.prototype.setMap.call(this,r),r){for(this._listener=[],e=0;e<this.layers.length;e++)t=this.layers[e],t.right?t.layer.on(["precompose","prerender"],this.precomposeRight_):t.layer.on(["precompose","prerender"],this.precomposeLeft_),t.layer.on(["postcompose","postrender"],this.postcompose_);try{r.renderSync()}catch{}}};Ao.prototype.isLayer_=function(r){for(var e=0;e<this.layers.length;e++)if(this.layers[e].layer===r)return e;return-1};Ao.prototype.addLayer=function(r,e){r instanceof Array||(r=[r]);for(var t=0;t<r.length;t++){var n=r[t];if(this.isLayer_(n)<0&&(this.layers.push({layer:n,right:e}),this.getMap())){e?n.on(["precompose","prerender"],this.precomposeRight_):n.on(["precompose","prerender"],this.precomposeLeft_),n.on(["postcompose","postrender"],this.postcompose_);try{this.getMap().renderSync()}catch{}}}};Ao.prototype.removeLayers=function(){var r=[];this.layers.forEach(function(e){r.push(e.layer)}),this.removeLayer(r)};Ao.prototype.removeLayer=function(r){r instanceof Array||(r=[r]);for(var e=0;e<r.length;e++){var t=this.isLayer_(r[e]);t>=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{}};Ao.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")])};Ao.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}}};Ao.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};Ao.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)}};Ao.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()}};Ao.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()}};Ao.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 yrt={name:"ol-swipe-control",setup(r,e){const{control:t}=Ri(Ao,r,e),{layerList:n}=Ph(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 mrt(r,e,t,n,i,a){return Er("",!0)}var oT=le(yrt,[["render",mrt]]),bo=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"),yr.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;n<r.controls.length;n++)this.addControl(r.controls[n])};Cr(bo,yr);bo.prototype.setVisible=function(r){r?this.element.style.display="":this.element.style.display="none"};bo.prototype.getVisible=function(){return this.element.style.display!="none"};bo.prototype.setMap=function(r){yr.prototype.setMap.call(this,r);for(var e=0;e<this.controls_.length;e++){var t=this.controls_[e];t.setMap(r)}};bo.prototype.getControls=function(){return this.controls_};bo.prototype.setPosition=function(r){this.element.classList.remove("ol-left","ol-top","ol-bottom","ol-right"),r=r.split("-");for(var e=0;e<r.length;e++)switch(r[e]){case"top":case"left":case"bottom":case"right":this.element.classList.add("ol-"+r[e]);break}};bo.prototype.addControl=function(r){this.controls_.push(r),r.setTarget(this.element),this.getMap()&&this.getMap().addControl(r),r.on("change:active",function(e){this.onActivateControl_(e,r)}.bind(this)),r.getActive&&this.onActivateControl_({target:r,active:r.getActive()},r)};bo.prototype.deactivateControls=function(r){for(var e=0;e<this.controls_.length;e++)this.controls_[e]!==r&&this.controls_[e].setActive&&this.controls_[e].setActive(!1)};bo.prototype.getActiveControls=function(){for(var r=[],e=0,t;t=this.controls_[e];e++)t.getActive&&t.getActive()&&r.push(t);return r};bo.prototype.setActive=function(r){if(!r&&this.get("autoDeactivate")&&this.deactivateControls(),r)for(var e=this.getControls(),t=0,n;n=e[t];t++)n.get("autoActivate")&&n.setActive(!0)};bo.prototype.onActivateControl_=function(r,e){if(this.get("toggleOne")){if(r.active){var t;for(t=0;t<this.controls_.length&&this.controls_[t]!==e;t++);if(t==this.controls_.length)return;this.deactivateControls(this.controls_[t])}else if(!this.getActiveControls().length){for(var n=0,i;i=this.controls_[n];n++)if(i.get("autoActivate")){i.setActive(!0);break}}}};bo.prototype.getControlsByName=function(r){var e=this.getControls();return e.filter(function(t){return t.get("name")===r})};const _rt={name:"ol-control-bar",setup(r,e){const{control:t}=Ri(bo,r,e);return Gr("controlBar",t),{control:t}},props:{toggleOne:{type:Boolean,default:!0},group:{type:Boolean,default:!0}}};function wrt(r,e,t,n,i,a){return wr(r.$slots,"default")}var sT=le(_rt,[["render",wrt]]);window.ol&&(ol.ext.input={});var rc=function(r){r=r||{},ni.call(this);var e=this.input=r.input;e||(e=this.input=document.createElement("INPUT"),r.type&&e.setAttribute("type",r.type),r.min!==void 0&&e.setAttribute("min",r.min),r.max!==void 0&&e.setAttribute("max",r.max),r.step!==void 0&&e.setAttribute("step",r.step),r.parent&&r.parent.appendChild(e)),r.disabled&&(e.disabled=!0),r.checked!==void 0&&(e.checked=!!r.checked),r.val!==void 0&&(e.value=r.val),r.hidden&&(e.style.display="none"),e.addEventListener("focus",function(){this.element&&this.element.classList.add("ol-focus")}.bind(this));var t;e.addEventListener("focusout",function(){this.element&&(t&&clearTimeout(t),t=setTimeout(function(){this.element.classList.remove("ol-focus")}.bind(this),0))}.bind(this))};Cr(rc,ni);rc.prototype._listenDrag=function(r,e){var t=function(n){this.moving=!0;var i=function(a){a.type==="pointerup"&&(document.removeEventListener("pointermove",i),document.removeEventListener("pointerup",i),document.removeEventListener("pointercancel",i),setTimeout(function(){this.moving=!1}.bind(this))),a.target===r&&e(a),a.stopPropagation(),a.preventDefault()}.bind(this);document.addEventListener("pointermove",i,!1),document.addEventListener("pointerup",i,!1),document.addEventListener("pointercancel",i,!1),n.stopPropagation(),n.preventDefault()}.bind(this);r.addEventListener("mousedown",t,!1),r.addEventListener("touchstart",t,!1)};rc.prototype.setValue=function(r){r!==void 0&&(this.input.value=r),this.input.dispatchEvent(new Event("change"))};rc.prototype.getValue=function(){return this.input.value};rc.prototype.getInputElement=function(){return this.input};var nc=function(r){r=r||{},rc.call(this,r);var e=this.element=document.createElement("LABEL");r.html instanceof Element?e.appendChild(r.html):r.html!==void 0&&(e.innerHTML=r.html),e.className=("ol-ext-check ol-ext-checkbox "+(r.className||"")).trim(),this.input.parentNode&&this.input.parentNode.insertBefore(e,this.input),e.appendChild(this.input),e.appendChild(document.createElement("SPAN")),r.after&&e.appendChild(document.createTextNode(r.after)),this.input.addEventListener("change",function(){this.dispatchEvent({type:"check",checked:this.input.checked,value:this.input.value})}.bind(this))};Cr(nc,rc);nc.prototype.isChecked=function(){return this.input.checked};var YD=function(r){r=r||{},nc.call(this,r),this.element.className=("ol-ext-toggle-switch "+(r.className||"")).trim()};Cr(YD,nc);var zD=function(r){r=r||{},nc.call(this,r),this.element.className=("ol-ext-check ol-ext-radio "+(r.className||"")).trim()};Cr(zD,nc);var ut={};ut.create=function(r,e){e=e||{};var t;if(r==="TEXT")t=document.createTextNode(e.html||""),e.parent&&e.parent.appendChild(t);else{t=document.createElement(r),/button/i.test(r)&&t.setAttribute("type","button");for(var n in e)switch(n){case"className":{e.className&&e.className.trim&&t.setAttribute("class",e.className.trim());break}case"text":{t.innerText=e.text;break}case"html":{e.html instanceof Element?t.appendChild(e.html):e.html!==void 0&&(t.innerHTML=e.html);break}case"parent":{e.parent&&e.parent.appendChild(t);break}case"options":{if(/select/i.test(r))for(var i in e.options)ut.create("OPTION",{html:i,value:e.options[i],parent:t});break}case"style":{this.setStyle(t,e.style);break}case"change":case"click":{ut.addListener(t,n,e[n]);break}case"on":{for(var a in e.on)ut.addListener(t,a,e.on[a]);break}case"checked":{t.checked=!!e.checked;break}default:{t.setAttribute(n,e[n]);break}}}return t};ut.createSwitch=function(r){var e=ut.create("INPUT",{type:"checkbox",on:r.on,click:r.click,change:r.change,parent:r.parent}),t=Object.assign({input:e},r||{});return new YD(t),e};ut.createCheck=function(r){var e=ut.create("INPUT",{name:r.name,type:r.type==="radio"?"radio":"checkbox",on:r.on,parent:r.parent});console.log(e);var t=Object.assign({input:e},r||{});return r.type==="radio"?new zD(t):new nc(t),e};ut.setHTML=function(r,e){e instanceof Element?r.appendChild(e):e!==void 0&&(r.innerHTML=e)};ut.appendText=function(r,e){r.appendChild(document.createTextNode(e||""))};ut.addListener=function(r,e,t,n){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(i){r.addEventListener(i,t,n)})};ut.removeListener=function(r,e,t){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(n){r.removeEventListener(n,t)})};ut.show=function(r){r.style.display=""};ut.hide=function(r){r.style.display="none"};ut.hidden=function(r){return ut.getStyle(r,"display")==="none"};ut.toggle=function(r){r.style.display=r.style.display==="none"?"":"none"};ut.setStyle=function(r,e){for(var t in e)switch(t){case"top":case"left":case"bottom":case"right":case"minWidth":case"maxWidth":case"width":case"height":{typeof e[t]=="number"?r.style[t]=e[t]+"px":r.style[t]=e[t];break}default:r.style[t]=e[t]}};ut.getStyle=function(r,e){var t,n=(r.ownerDocument||document).defaultView;if(n&&n.getComputedStyle)e=e.replace(/([A-Z])/g,"-$1").toLowerCase(),t=n.getComputedStyle(r,null).getPropertyValue(e);else if(r.currentStyle&&(e=e.replace(/-(\w)/g,function(i,a){return a.toUpperCase()}),t=r.currentStyle[e],/^\d+(em|pt|%|ex)?$/i.test(t)))return function(i){var a=r.style.left,o=r.runtimeStyle.left;return r.runtimeStyle.left=r.currentStyle.left,r.style.left=i||0,i=r.style.pixelLeft+"px",r.style.left=a,r.runtimeStyle.left=o,i}(t);return/px$/.test(t)?parseInt(t):t};ut.outerHeight=function(r){return r.offsetHeight+ut.getStyle(r,"marginBottom")};ut.outerWidth=function(r){return r.offsetWidth+ut.getStyle(r,"marginLeft")};ut.offsetRect=function(r){var e=r.getBoundingClientRect();return{top:e.top+(window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0),left:e.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),height:e.height||e.bottom-e.top,width:e.width||e.right-e.left}};ut.getFixedOffset=function(r){var e={left:0,top:0},t=function(n){if(!n)return e;if(ut.getStyle(n,"position")==="absolute"&&ut.getStyle(n,"transform")!=="none"){var i=n.getBoundingClientRect();return e.left+=i.left,e.top+=i.top,e}return t(n.offsetParent)};return t(r.offsetParent)};ut.positionRect=function(r,e){var t=0,n=0,i=function(a){if(a)return t+=a.offsetLeft,n+=a.offsetTop,i(a.offsetParent);var o={top:r.offsetTop+n,left:r.offsetLeft+t};return e&&(o.top-=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,o.left-=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0),o.bottom=o.top+r.offsetHeight,o.right=o.top+r.offsetWidth,o};return i(r.offsetParent)};ut.scrollDiv=function(r,e){e=e||{};var t=!1,n=0,i,a=0,o=typeof e.onmove=="function"?e.onmove:function(){},s=e.vertical?"screenY":"screenX",A=e.vertical?"scrollTop":"scrollLeft",l=!1,u,h,c=0,f=function(){C&&(c++,setTimeout(d))},d=function(){if(C){if(c--,c)return;var I=r.clientHeight,T=r.scrollHeight;u=I/T,C.style.height=u*100+"%",C.style.top=r.scrollTop/T*100+"%",w.style.height=I+"px",I>T-.5?w.classList.add("ol-100pc"):w.classList.remove("ol-100pc")}},v=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",y),ut.addListener(window,["pointerup","pointercancel"],R))},y=function(I){if(l=!0,t!==!1){var T=(h?-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)}},m=function(I){var T=I>0?Math.min(100,I/2):Math.max(-100,I/2);I-=T,r[A]+=T,-1<I&&I<1?(l?setTimeout(function(){r.classList.remove("ol-move")}):r.classList.remove("ol-move"),l=!1,o(!1)):setTimeout(function(){m(I)},40)},w,C;if(e.vertical&&e.minibar){var B=function(I){r.removeEventListener("pointermove",B),r.parentNode.classList.add("ol-miniscroll"),C=ut.create("DIV"),w=ut.create("DIV",{className:"ol-scroll",html:C}),r.parentNode.insertBefore(w,r),C.addEventListener("pointerdown",function(T){h=!0,v(T)}),e.mousewheel&&(ut.addListener(w,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){O(T)}),ut.addListener(C,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){O(T)})),r.parentNode.addEventListener("pointerenter",f),window.addEventListener("resize",f),I!==!1&&f()};r.parentNode?B(!1):r.addEventListener("pointermove",B),r.addEventListener("scroll",function(){f()})}r.style["touch-action"]="none",r.style.overflow="hidden",r.classList.add("ol-scrolldiv"),ut.addListener(r,["pointerdown"],function(I){h=!1,v(I)}),r.addEventListener("click",function(I){r.classList.contains("ol-move")&&(I.preventDefault(),I.stopPropagation())},!0);var R=function(I){a=new Date-a,a>100||h?n=0:a>0&&(n=((n||0)+(t-I[s])/a)/2),m(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)),h=!1,window.removeEventListener("pointermove",y),ut.removeListener(window,["pointerup","pointercancel"],R)},O=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&&ut.addListener(r,["mousewheel","DOMMouseScroll","onmousewheel"],O),{refresh:f}};ut.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 fl=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),yr.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)};Cr(fl,yr);fl.prototype.setVisible=function(r){r?ut.show(this.element):ut.hide(this.element)};fl.prototype.setTitle=function(r){this.button_.setAttribute("title",r)};fl.prototype.setHtml=function(r){ut.setHTML(this.button_,r)};fl.prototype.getButtonElement=function(){return this.button_};var Xo=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",fl.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)};Cr(Xo,fl);Xo.prototype.setMap=function(r){!r&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),fl.prototype.setMap.call(this,r),r&&(this.interaction_&&r.addInteraction(this.interaction_),this.subbar_&&r.addControl(this.subbar_))};Xo.prototype.getSubBar=function(){return this.subbar_};Xo.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_))};Xo.prototype.getDisable=function(){var r=this.element.querySelector("button");return r&&r.disabled};Xo.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}))};Xo.prototype.getActive=function(){return this.element.classList.contains("ol-active")};Xo.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)};Xo.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}))};Xo.prototype.setInteraction=function(r){this.interaction_=r};Xo.prototype.getInteraction=function(){return this.interaction_};const Ert={name:"ol-control-toggle",setup(r,e){const{control:t}=Ri(Xo,r,e);return{control:t}},props:{html:{type:String},interaction:{type:Object},className:{type:String},title:{type:String},onToggle:{type:Function}}};function Crt(r,e,t,n,i,a){return Er("",!0)}var AT=le(Ert,[["render",Crt]]);const Brt={name:"ol-control-button",setup(r,e){const{control:t}=Ri(fl,r,e);return{control:t}},props:{html:{type:String},name:{type:String},className:{type:String},title:{type:String},handleClick:{type:Function}}};function Trt(r,e,t,n,i,a){return Er("",!0)}var lT=le(Brt,[["render",Trt]]),Ba=function(r){r=r||{},r.fullscreen&&(r.target=document.body);var e=ut.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=ut.create("FORM",{on:{submit:this._onButton("submit")},parent:e});ut.create("H2",{parent:t}),ut.create("DIV",{className:"ol-closebox",click:this._onButton("cancel"),parent:t}),ut.create("DIV",{className:"ol-content",parent:t}),this._progress=ut.create("DIV",{style:{display:"none"},parent:t});var n=ut.create("DIV",{className:"ol-progress-bar",parent:this._progress});this._progressbar=ut.create("DIV",{parent:n}),this._progressMessage=ut.create("DIV",{className:"ol-progress-message",parent:this._progress}),ut.create("DIV",{className:"ol-buttons",parent:t}),yr.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)};Cr(Ba,yr);Ba.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))}}};Ba.prototype.open=function(){this.show()};Ba.prototype.setContentMessage=function(r){if(r!==void 0){var e=this.getContentElement();r instanceof Element&&ut.setHTML(e,""),ut.setHTML(e,r||"")}};Ba.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")};Ba.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&&ut.setHTML(e.querySelector(".ol-content"),""),ut.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)ut.create("INPUT",{type:i==="submit"?"submit":"button",value:n[i],click:this._onButton(i,r.onButton),parent:t})}else e.classList.remove("ol-button")}};Ba.prototype.getContentElement=function(){return this.element.querySelector("form .ol-content")};Ba.prototype.setProgress=function(r,e,t){if(r===!1){ut.setStyle(this._progress,{display:"none"});return}if(e>0?this.set("max",Number(e)):e=this.get("max"),!e)ut.setStyle(this._progress,{display:"none"});else{var n=Math.round(r/e*100);ut.setStyle(this._progress,{display:""}),this._progressbar.className=n?"":"notransition",ut.setStyle(this._progressbar,{width:n+"%"})}this._progressMessage.innerHTML="",ut.setHTML(this._progressMessage,t||"")};Ba.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};Ba.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};Ba.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})};Ba.prototype.close=Ba.prototype.hide;Ba.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")};var xrt=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},Oi=function(r){r||(r={}),this.setStyle(r.style),yr.call(this,r)};Cr(Oi,yr);Oi.prototype.setMap=function(r){this.getCanvas(r);var e=this.getMap();if(this._listener&&(xo(this._listener),this._listener=null),yr.prototype.setMap.call(this,r),e)try{e.renderSync()}catch{}r&&(this._listener=r.on("postcompose",this._draw.bind(this)))};Oi.prototype.getCanvas=function(r){return xrt(r)};Oi.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};Oi.prototype.setStyle=function(r){this._style=r||new ta({})};Oi.prototype.getStyle=function(){return this._style};Oi.prototype.getStroke=function(){var r=this._style.getStroke();return r||this._style.setStroke(new Fi({color:"#000",width:1.25})),this._style.getStroke()};Oi.prototype.getFill=function(){var r=this._style.getFill();return r||this._style.setFill(new ra({color:"#fff"})),this._style.getFill()};Oi.prototype.getTextStroke=function(){var r=this._style.getText();return r||(r=new Jh({})),r.getStroke()||r.setStroke(new Fi({color:"#fff",width:3})),r.getStroke()};Oi.prototype.getTextFill=function(){var r=this._style.getText();return r||(r=new Jh({})),r.getFill()||r.setFill(new ra({color:"#fff"})),r.getFill()};Oi.prototype.getTextFont=function(){var r=this._style.getText();return r||(r=new Jh({})),r.getFont()||r.setFont("12px sans-serif"),r.getFont()};Oi.prototype._draw=function(){console.warn("[CanvasBase] draw function not implemented.")};function Srt(r,e){var t=r.canvas,n=e||{},i=n.pixelRatio||Uh,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=qd(Jn(),i,i);return new wb(r,i,o,s,0)}var qf=function(r){r=r||{},ni.call(this,r),r.feature&&this.set("feature",r.feature.clone())};Cr(qf,ni);qf.prototype.setTitle=function(r){this.set("title",r||""),this.changed()};qf.prototype.getElement=function(r,e){var t=ut.create("LI",{className:this.get("className"),click:function(n){e(!1),n.stopPropagation()},style:{height:r[1]+"px"},"aria-label":this.get("title")});return ut.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 na=function(r){r=r||{},ni.call(this),this._items=new ti;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<e;i++)if(n.element===e[i].item){xo(e[i].on),e.splice(i,1);break}t&&(clearTimeout(t),t=null),t=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._listElement=ut.create("UL",{className:"ol-legend"}),this._canvas=document.createElement("canvas"),this.set("size",r.size||[40,25],!0),this.set("margin",r.margin===0?0:r.margin||10,!0),this._textStyle=r.textStyle||new Jh({font:"16px sans-serif",fill:new ra({color:"#333"}),backgroundFill:new ra({color:"rgba(255,255,255,.8)"})}),this._title=new qf({title:r.title||"",className:"ol-title"}),r.titleStyle?this._titleStyle=r.titleStyle:(this._titleStyle=this._textStyle.clone(),this._titleStyle.setFont("bold "+this._titleStyle.getFont())),this.setStyle(r.style),r.items instanceof Array&&r.items.forEach(function(n){this.addItem(n)}.bind(this)),this.refresh()};Cr(na,ni);na.prototype.setTitle=function(r){this._title.setTitle(r),this.refresh()};na.prototype.getTitle=function(){return this._title.get("title")};na.prototype.getTextStyle=function(){return this._textStyle};na.prototype.set=function(r,e,t){ni.prototype.set.call(this,r,e,t),t||this.refresh()};na.prototype.getListElement=function(){return this._listElement};na.prototype.getCanvas=function(){return this._canvas};na.prototype.setStyle=function(r){this._style=r,this.refresh()};na.prototype.addItem=function(r){r instanceof qf?this._items.push(r):this._items.push(new qf(r))};na.prototype.getItems=function(){return this._items};na.prototype._drawText=function(r,e,t,n){r.save(),r.scale(Uh,Uh),e=e||"";var i=e.split(`
|
||
`);i.length===1?r.fillText(e,t,n):(r.textBaseline="bottom",r.fillText(i[0],t,n),r.textBaseline="top",r.fillText(i[1],t,n)),r.restore()};na.prototype._measureText=function(r,e){var t=(e||"").split(`
|
||
`);if(t.length===1)return r.measureText(e);var n=r.measureText(t[0]),i=r.measureText(t[1]);return{width:Math.max(n.width,i.width),height:n.height+i.height}};na.prototype.refresh=function(){var r=this._listElement;r.innerHTML="";var e=this.get("margin"),t=this.get("size")[0]+2*e,n=this.get("lineHeight")||this.get("size")[1]+2*e,i=this.getCanvas(),a=i.getContext("2d");a.textAlign="left",a.textBaseline="middle";var o=Uh;a.font=this._titleStyle.getFont();var s=this._measureText(a,this.getTitle("title")).width;this._items.forEach(function(A){A.get("feature")||A.get("typeGeom")?(a.font=A.get("textStyle")?A.get("textStyle").getFont():this._textStyle.getFont(),s=Math.max(s,this._measureText(a,A.get("title")).width+t)):(a.font=A.get("textStyle")?A.get("textStyle").getFont():this._titleStyle.getFont(),s=Math.max(s,this._measureText(a,A.get("title")).width))}.bind(this)),i.width=(s+2*e)*o,i.height=(this._items.getLength()+1)*n*o,i.style.height=(this._items.getLength()+1)*n+"px",a.textBaseline="middle",a.fillStyle=KA(this._textStyle.getFill().getColor()),this.getTitle()&&(r.appendChild(this._title.getElement([t,n],function(A){this.dispatchEvent({type:"select",index:-1,symbol:A,item:this._title})}.bind(this))),a.font=this._titleStyle.getFont(),a.textAlign="center",this._drawText(a,this.getTitle(),i.width/o/2,n/2)),this._items.forEach(function(A,l){var u=l+(this.getTitle()?1:0);r.appendChild(A.getElement([t,n],function(c){this.dispatchEvent({type:"select",index:l,symbol:c,item:A})}.bind(this)));var h=A.getProperties();a.textAlign="left",h.feature||h.typeGeom?(i=this.getLegendImage(h,i,u),a.font=A.get("textStyle")?A.get("textStyle").getFont():this._textStyle.getFont(),this._drawText(a,A.get("title"),t+e,(l+1.5)*n)):(a.font=A.get("textStyle")?A.get("textStyle").getFont():this._titleStyle.getFont(),/\bcenter\b/.test(h.className)?(a.textAlign="center",this._drawText(a,A.get("title"),i.width/o/2,(l+1.5)*n)):this._drawText(a,A.get("title"),e,(l+1.5)*n))}.bind(this)),this.dispatchEvent({type:"refresh",width:t,height:(this._items.length+1)*n})};na.prototype.getLegendImage=function(r,e,t){return r=r||{},na.getLegendImage({className:r.className,feature:r.feature,typeGeom:r.typeGeom,style:r.style||this._style,properties:r.properties,margin:r.margin||this.get("margin"),size:r.size||this.get("size"),lineHeight:r.lineHeight||this.get("lineHeight"),onload:function(){this.refresh()}.bind(this)},e,t)};na.getLegendImage=function(r,e,t){r=r||{},typeof r.margin>"u"&&(r.margin=10);var n=r.size||[40,25];r.onload=r.onload||function(){setTimeout(function(){na.getLegendImage(r,e,t)},100)};var i=n[0]+2*r.margin,a=r.lineHeight||n[1]+2*r.margin,o=Uh;e||(t=0,e=document.createElement("canvas"),e.width=i*o,e.height=a*o);var s=e.getContext("2d");s.save();var A=Srt(s,{pixelRatio:o}),l=r.typeGeom,u,h=r.feature;!h&&l&&(/Point/.test(l)?h=new nr(new cr([0,0])):/LineString/.test(l)?h=new nr(new Dr([0,0])):h=new nr(new Cn([[0,0]])),r.properties&&h.setProperties(r.properties)),h?(u=h.getStyle(),typeof u=="function"&&(u=u(h)),u||(u=typeof r.style=="function"?r.style(h):r.style||[]),l=h.getGeometry().getType()):u=[],u instanceof Array||(u=[u]);var c=i/2,f=a/2,d=n[0]/2,v=n[1]/2,y,m;if(l==="Point"){var w=null;for(y=0;m=u[y];y++){var C=m.getImage();if(C){var B=C.getImage();if(B&&B.complete&&!B.naturalWidth&&(typeof r.onload=="function"&&B.addEventListener("load",function(){setTimeout(function(){r.onload()},100)}),C.load()),C.getAnchor){var R=C.getAnchor();if(R){var O=C.getSize(),I=R[0]-O[0],T=R[1]-O[1];w?mu(w,[I,T,I+O[0],T+O[1]]):w=[I,T,I+O[0],T+O[1]]}}}}w&&(c=c+(w[2]+w[0])/2,f=f+(w[3]+w[1])/2)}for(f+=t*a||0,y=0;m=u[y];y++)switch(A.setStyle(m),l){case cr:case"Point":case"MultiPoint":A.drawGeometry(new cr([c,f]));break;case Dr:case"LineString":case"MultiLineString":s.save(),s.rect(r.margin*o,0,n[0]*o,e.height),s.clip(),A.drawGeometry(new Dr([[c-d,f],[c+d,f]])),s.restore();break;case Cn:case"Polygon":case"MultiPolygon":A.drawGeometry(new Cn([[[c-d,f-v],[c+d,f-v],[c+d,f+v],[c-d,f+v],[c-d,f-v]]]));break}return s.restore(),e};var bs=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)}Oi.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))};Cr(bs,Oi);bs.prototype.getLegend=function(){return this._legend};bs.prototype.setCanvas=function(r){if(this._onCanvas=r,this.element.style.visibility=r?"hidden":"visible",this.getMap())try{this.getMap().renderSync()}catch{}};bs.prototype.onCanvas=function(){return!!this._onCanvas};bs.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=KA(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()}};bs.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{}};bs.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{}};bs.prototype.collapse=function(r){r===!1?this.show():this.hide()};bs.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")};bs.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 Ou=function(r){r||(r={});var e=ut.create("DIV",{className:r.className||"ol-print"});r.target||(e.classList.add("ol-unselectable","ol-control"),ut.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e})),yr.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)};Cr(Ou,yr);Ou.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)}};Ou.prototype.copyMap=function(r,e){this.once("print",function(t){this.toClipboard(t,e)}.bind(this)),this.print(r)};Ou.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,ut.getStyle(a.parentNode,"mix-blend-mode")==="multiply"&&(n.globalCompositeOperation="multiply");var o=ut.getStyle(a,"transform")||ut.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,ut.getStyle(a,"width"),ut.getStyle(a,"height")),n.restore()}}.bind(this))}return t};Ou.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())};Ou.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"),h=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 c=Math.min((a[0]-2*h)/i.width,(a[1]-2*h)/i.height);s=c*i.width,A=c*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 Mu=function(r){r||(r={});var e=ut.create("DIV",{className:(r.className||"")+" ol-control-title ol-unselectable",style:{display:"block",visibility:"hidden"}});Oi.call(this,{element:e,style:r.style}),this.setTitle(r.title||""),this.setVisible(r.visible),this.element.style.font=this.getTextFont()};Cr(Mu,Oi);Mu.prototype.setStyle=function(r){Oi.prototype.setStyle.call(this,r),this.element&&(this.element.style.font=this.getTextFont()),this.getMap()&&this.getMap().render()};Mu.prototype.setTitle=function(r){if(this.element.textContent=r,this.set("title",r),this.getMap())try{this.getMap().renderSync()}catch{}};Mu.prototype.getTitle=function(){return this.get("title")};Mu.prototype.setVisible=function(r){if(this.element.style.display=r?"block":"none",this.getMap())try{this.getMap().renderSync()}catch{}};Mu.prototype.getVisible=function(){return this.element.style.display!=="none"};Mu.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=KA(this.getFill().getColor()),e.rect(0,0,s,o),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=KA(this.getTextFill().getColor()),e.strokeStyle=KA(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 uT=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=gm(wu(i,n,"EPSG:4326"),wu(o,n,"EPSG:4326"));return s*=(e||96)/.0254,s},brt=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=gm(wu(o,a,"EPSG:4326"),wu(A,a,"EPSG:4326"));return l*=(t||96)/.0254,i.setResolution(i.getResolution()*n/l),n}},tl=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 Fi?new ta({stroke:r.style}):r.style;r.style||(t=new ta({stroke:new Fi({width:0})})),Oi.call(this,{element:e,style:t}),this.set("rotateVithView",r.rotateWithView!==!1),this.setVisible(r.visible!==!1),this.setImage(r.image||r.src)};Cr(tl,Oi);tl.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())};tl.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};tl.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};tl.prototype.getVisible=function(){return ut.getStyle(this.element,"display")==="block"};tl.prototype.setVisible=function(r){r?this.element.classList.add("ol-visible"):this.element.classList.remove("ol-visible"),this.getMap()&&this.getMap().render()};tl.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 h=Math.max(t.width,t.height);for(n=0;n<8;n++)e.moveTo(-i[n][0]*h,-i[n][1]*h),e.lineTo(i[n][0]*h,i[n][1]*h);e.stroke()}l.width&&e.drawImage(l,-o/2,-s/2,o,s),e.closePath(),e.restore()}};var Bn=function(r){r||(r={}),this._lang=r.lang||"en";var e=ut.create("DIV",{className:(r.className||"ol-print")+" ol-unselectable ol-control"});ut.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e}),yr.call(this,{element:e}),r.openWindow&&this.on("print",function(x){x.canvas&&window.open().document.write('<img src="'+x.canvas.toDataURL()+'"/>')}),r.target=ut.create("DIV");var t=this._printCtrl=new Ou(r);t.on(["print","error","printing"],function(x){i.setAttribute("data-status",x.type),x.clipboard||this.dispatchEvent(x)}.bind(this)),this._compass=new tl({src:r.northImage||"compact",visible:!1,className:"olext-print-compass",style:new Fi({color:"#333",width:0})});var n=this._printDialog=new Ba({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),i=n.getContentElement();this._input={};var a=ut.create("DIV",{className:"ol-print-param",parent:i});this._pages=[ut.create("DIV",{className:"ol-page"})];var o=ut.create("DIV",{className:"ol-map",parent:this._pages[0]});ut.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:i}),ut.create("H2",{html:this.i18n("title"),parent:a});var s=ut.create("UL",{parent:a}),A=ut.create("LI",{className:"ol-orientation",parent:s});this._input.orientation={list:A};var l=ut.create("LABEL",{className:"portrait",parent:A});this._input.orientation.portrait=ut.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(x){this.setOrientation(x.target.value)}.bind(this)},parent:l}),ut.create("SPAN",{html:this.i18n("portrait"),parent:l}),l=ut.create("LABEL",{className:"landscape",parent:A}),this._input.orientation.landscape=ut.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(x){this.setOrientation(x.target.value)}.bind(this)},parent:l}),ut.create("SPAN",{html:this.i18n("landscape"),parent:l});var u;A=ut.create("LI",{html:ut.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:s});var h=this._input.size=ut.create("SELECT",{on:{change:function(){this.setSize(h.value||L)}.bind(this)},parent:A});for(u in this.paperSize)ut.create("OPTION",{html:u+(this.paperSize[u]?" - "+this.paperSize[u][0]+"x"+this.paperSize[u][1]+" mm":this.i18n("custom")),value:u,parent:h});A=ut.create("LI",{html:ut.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:s});var c=this._input.margin=ut.create("SELECT",{on:{change:function(){this.setMargin(c.value)}.bind(this)},parent:A});for(u in this.marginSize)ut.create("OPTION",{html:this.i18n(u)+" - "+this.marginSize[u]+" mm",value:this.marginSize[u],parent:c});A=ut.create("LI",{html:ut.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:s});var f=this._input.scale=ut.create("SELECT",{on:{change:function(){this.setScale(parseInt(f.value))}.bind(this)},parent:A});Object.keys(this.scales).forEach(function(x){ut.create("OPTION",{html:this.scales[x],value:x,parent:f})}.bind(this)),A=ut.create("LI",{className:"ol-legend",parent:s});var d=ut.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){S.legend.control.setCanvas(d.checked)}.bind(this)},parent:A});A=ut.create("LI",{className:"ol-print-north",parent:s});var v=this._input.north=ut.createSwitch({html:this.i18n("north"),checked:"checked",on:{change:function(){v.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=ut.create("LI",{className:"ol-print-title",parent:s});var y=ut.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(x){S.title.control.setVisible(x.target.checked)}.bind(this)},parent:A}),m=ut.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(x){x.keyCode===13&&x.preventDefault()},keyup:function(){S.title.control.setTitle(m.value)},change:function(){S.title.control.setTitle(m.value)}.bind(this)},parent:A}),w=ut.create("DIV",{className:"ol-user-param",parent:a});A=ut.create("LI",{className:"ol-saveas",parent:s});var C=ut.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),B=ut.create("SELECT",{on:{change:function(){if(this.formats[B.value].clipboard)t.copyMap(this.formats[B.value],function(D){D&&(C.classList.add("visible"),setTimeout(function(){C.classList.remove("visible")},1e3))});else{var x=typeof this.getSize()=="string"?this.getSize():null,M=Object.assign({format:x,size:x?this.paperSize[x]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[B.value]);t.print(M)}B.value=""}.bind(this)},parent:A});ut.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:B}),this.formats.forEach(function(x,M){if(x.pdf){if(r.pdf===!1)return}else if(x.clipboard){if(r.copy===!1)return}else if(r.save===!1)return;ut.create("OPTION",{html:this.i18n(x.title),value:M,parent:B})}.bind(this)),A=ut.create("LI",{className:"ol-savelegend",parent:s});var R=ut.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),O=ut.create("SELECT",{on:{change:function(){var x=S.legend.control.getLegend().getCanvas(),M=document.createElement("CANVAS");M.width=x.width,M.height=x.height;var D=M.getContext("2d");if(D.fillStyle="#fff",D.fillRect(0,0,M.width,M.height),D.drawImage(x,0,0),this.formats[O.value].clipboard)M.toBlob(function(_t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},_t.type,{value:_t,enumerable:!0}))]),R.classList.add("visible"),setTimeout(function(){R.classList.remove("visible")},1e3)}catch{}},"image/png");else{var W;try{W=M.toDataURL(this.formats[O.value].imageType,this.formats[O.value].quality);var z=typeof this.getSize()=="string"?this.getSize():"A4",tt=M.width/96*25.4,q=M.height/96*25.4,rt=this.paperSize[z];this.getOrientation()==="landscape"&&(rt=[rt[1],rt[0]]);var nt=[(rt[0]-tt)/2,(rt[1]-q)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:z,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[z],position:nt,imageWidth:tt,imageHeight:q},image:W,imageType:this.formats[O.value].imageType,pdf:this.formats[O.value].pdf,quality:this.formats[O.value].quality,canvas:M})}catch{}}O.value=""}.bind(this)},parent:A});ut.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:O}),this.formats.forEach(function(x,M){ut.create("OPTION",{html:this.i18n(x.title),value:M,parent:O})}.bind(this));var I=ut.create("DIV",{className:"ol-ext-buttons",parent:a});ut.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(x){x.preventDefault(),window.print()},parent:I}),ut.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){n.hide()},parent:I}),ut.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:a});var T,L,P,S={};n.on("show",function(){this.dispatchEvent({type:"show",userElement:w,dialog:this._printDialog,page:this.getPage()});var x=this.getMap();x&&(document.body.classList.add("ol-print-document"),T=x.getTargetElement(),L=x.getSize(),typeof this.getSize()=="string"?this.setSize(this.getSize()):this.setSize(L),x.setTarget(o),P&&xo(P),P=x.on("moveend",function(){this.setScale(uT(x))}.bind(this)),this.setScale(uT(x)),S={},this.getMap().getControls().forEach(function(M){M instanceof bs&&(S.legend={control:M}),M instanceof Mu&&(S.title={control:M}),M instanceof tl&&(S.compass?M.element.classList.remove("ol-print-compass"):(this._input.north.checked?M.element.classList.add("ol-print-compass"):M.element.classList.remove("ol-print-compass"),this._compass=M,S.compass={control:M}))}.bind(this)),S.title?(y.checked=S.title.isVisible=S.title.control.getVisible(),m.value=S.title.control.getTitle(),y.parentNode.parentNode.classList.remove("hidden")):y.parentNode.parentNode.classList.add("hidden"),S.legend?(S.legend.ison=S.legend.control.onCanvas(),S.legend.collapsed=S.legend.control.isCollapsed(),S.legend.control.collapse(!1),O.parentNode.classList.remove("hidden"),d.parentNode.parentNode.classList.remove("hidden"),d.checked=!S.legend.collapsed,S.legend.control.setCanvas(!S.legend.collapsed)):(O.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,P&&xo(P),S.title&&S.title.control.setVisible(S.title.isVisible),S.legend&&(S.legend.control.setCanvas(S.legend.ison),S.legend.control.collapse(S.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),r.saveAs&&this.on("print",function(x){x.pdf||x.canvas.toBlob(function(M){var D=(x.print.legend?"legend.":"map.")+x.imageType.replace("image/","");r.saveAs(M,D)},x.imageType,x.quality)}),r.jsPDF&&this.on("print",function(x){if(x.pdf){var M=new r.jsPDF({orientation:x.print.orientation,unit:x.print.unit,format:x.print.size});M.addImage(x.image,"JPEG",x.print.position[0],x.print.position[0],x.print.imageWidth,x.print.imageHeight),M.save(x.print.legend?"legend.pdf":"map.pdf")}})};Cr(Bn,yr);Bn.prototype.isOpen=function(){return this._printDialog.isOpen()};Bn.addLang=function(r,e){Bn.prototype._labels[r]=e};Bn.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};Bn.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:"取消"}};Bn.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]};Bn.prototype.marginSize={none:0,small:5,large:10};Bn.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}];Bn.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"};Bn.prototype.getOrientation=function(){return this._orientation||"portrait"};Bn.prototype.setOrientation=function(r){this._orientation=r==="landscape"?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()};Bn.prototype.getMargin=function(){return this._margin||0};Bn.prototype.setMargin=function(r){this._margin=r,this._input.margin.value=r,this.setSize()};Bn.prototype.getSize=function(){return this._size};Bn.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"})}};Bn.prototype.getContentElement=function(){return this._printDialog.getContentElement()};Bn.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")};Bn.prototype.getPage=function(){return this._pages[0]};Bn.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),yr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))};Bn.prototype.setScale=function(r){brt(this.getMap(),r),this._input.scale.value=" "+Math.round(r/100)*100};Bn.prototype.getScale=function(){return uT(this.getMap())};Bn.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()};Bn.prototype.getrintControl=function(){return this._printCtrl};var Qb={exports:{}};(function(r,e){(function(t,n){n()})(Ys,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,h){var c=new XMLHttpRequest;c.open("GET",l),c.responseType="blob",c.onload=function(){A(c.response,u,h)},c.onerror=function(){console.error("could not download file")},c.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 Ys=="object"&&Ys.global===Ys?Ys: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,h){var c=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,h):a(f,f.target="_blank")):(f.href=c.createObjectURL(l),setTimeout(function(){c.revokeObjectURL(f.href)},4e4),setTimeout(function(){a(f)},0))}:"msSaveOrOpenBlob"in navigator?function(l,u,h){if(u=u||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(t(l,h),u);else if(i(l))n(l,u,h);else{var c=document.createElement("a");c.href=l,c.target="_blank",setTimeout(function(){a(c)})}}:function(l,u,h,c){if(c=c||open("","_blank"),c&&(c.document.title=c.document.body.innerText="downloading..."),typeof l=="string")return n(l,u,h);var f=l.type==="application/octet-stream",d=/constructor/i.test(o.HTMLElement)||o.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||f&&d||s)&&typeof FileReader<"u"){var y=new FileReader;y.onloadend=function(){var C=y.result;C=v?C:C.replace(/^data:[^;]*;/,"data:attachment/file;"),c?c.location.href=C:location=C,c=null},y.readAsDataURL(l)}else{var m=o.URL||o.webkitURL,w=m.createObjectURL(l);c?c.location=w:location.href=w,c=null,setTimeout(function(){m.revokeObjectURL(w)},4e4)}});o.saveAs=A.saveAs=A,r.exports=A})})(Qb);function Jr(r){return Jr=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},Jr(r)}var Na=Uint8Array,Ua=Uint16Array,Dv=Uint32Array,o1=new Na([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]),s1=new Na([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]),hT=new Na([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),XD=function(r,e){for(var t=new Ua(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var i=new Dv(t[30]),n=1;n<30;++n)for(var a=t[n];a<t[n+1];++a)i[a]=a-t[n]<<5|n;return[t,i]},WD=XD(o1,2),qD=WD[0],cT=WD[1];qD[28]=258,cT[258]=28;var ZD=XD(s1,0),Lrt=ZD[0],XR=ZD[1],fT=new Ua(32768);for(var wn=0;wn<32768;++wn){var Hl=(wn&43690)>>>1|(wn&21845)<<1;Hl=(Hl&52428)>>>2|(Hl&13107)<<2,Hl=(Hl&61680)>>>4|(Hl&3855)<<4,fT[wn]=((Hl&65280)>>>8|(Hl&255)<<8)>>>1}var eA=function(r,e,t){for(var n=r.length,i=0,a=new Ua(e);i<n;++i)++a[r[i]-1];var o=new Ua(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(t){s=new Ua(1<<e);var A=15-e;for(i=0;i<n;++i)if(r[i])for(var l=i<<4|r[i],u=e-r[i],h=o[r[i]-1]++<<u,c=h|(1<<u)-1;h<=c;++h)s[fT[h]>>>A]=l}else for(s=new Ua(n),i=0;i<n;++i)s[i]=fT[o[r[i]-1]++]>>>15-r[i];return s},Tu=new Na(288);for(var wn=0;wn<144;++wn)Tu[wn]=8;for(var wn=144;wn<256;++wn)Tu[wn]=9;for(var wn=256;wn<280;++wn)Tu[wn]=7;for(var wn=280;wn<288;++wn)Tu[wn]=8;var Qv=new Na(32);for(var wn=0;wn<32;++wn)Qv[wn]=5;var Frt=eA(Tu,9,0),Irt=eA(Tu,9,1),Rrt=eA(Qv,5,0),Ort=eA(Qv,5,1),_E=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},As=function(r,e,t){var n=e/8>>0;return(r[n]|r[n+1]<<8)>>>(e&7)&t},wE=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},Hb=function(r){return(r/8>>0)+(r&7&&1)},JD=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof Ua?Ua:r instanceof Dv?Dv:Na)(t-e);return n.set(r.subarray(e,t)),n},Mrt=function(r,e,t){var n=r.length,i=!e||t,a=!t||t.i;t||(t={}),e||(e=new Na(n*3));var o=function(it){var gt=e.length;if(it>gt){var wt=new Na(Math.max(gt*2,it));wt.set(e),e=wt}},s=t.f||0,A=t.p||0,l=t.b||0,u=t.l,h=t.d,c=t.m,f=t.n,d=n*8;do{if(!u){t.f=s=As(r,A,1);var v=As(r,A+1,3);if(A+=3,v)if(v==1)u=Irt,h=Ort,c=9,f=5;else if(v==2){var C=As(r,A,31)+257,B=As(r,A+10,15)+4,R=C+As(r,A+5,31)+1;A+=14;for(var O=new Na(R),I=new Na(19),T=0;T<B;++T)I[hT[T]]=As(r,A+T*3,7);A+=B*3;var L=_E(I),P=(1<<L)-1;if(!a&&A+R*(L+7)>d)break;for(var S=eA(I,L,1),T=0;T<R;){var x=S[As(r,A,P)];A+=x&15;var y=x>>>4;if(y<16)O[T++]=y;else{var M=0,D=0;for(y==16?(D=3+As(r,A,3),A+=2,M=O[T-1]):y==17?(D=3+As(r,A,7),A+=3):y==18&&(D=11+As(r,A,127),A+=7);D--;)O[T++]=M}}var W=O.subarray(0,C),z=O.subarray(C);c=_E(W),f=_E(z),u=eA(W,c,1),h=eA(z,f,1)}else throw"invalid block type";else{var y=Hb(A)+4,m=r[y-4]|r[y-3]<<8,w=y+m;if(w>n){if(a)throw"unexpected EOF";break}i&&o(l+m),e.set(r.subarray(y,w),l),t.b=l+=m,t.p=A=w*8;continue}if(A>d)throw"unexpected EOF"}i&&o(l+131072);for(var tt=(1<<c)-1,q=(1<<f)-1,rt=c+f+18;a||A+rt<d;){var M=u[wE(r,A)&tt],nt=M>>>4;if(A+=M&15,A>d)throw"unexpected EOF";if(!M)throw"invalid length/literal";if(nt<256)e[l++]=nt;else if(nt==256){u=null;break}else{var _t=nt-254;if(nt>264){var T=nt-257,F=o1[T];_t=As(r,A,(1<<F)-1)+qD[T],A+=F}var $=h[wE(r,A)&q],j=$>>>4;if(!$)throw"invalid distance";A+=$&15;var z=Lrt[j];if(j>3){var F=s1[j];z+=wE(r,A)&(1<<F)-1,A+=F}if(A>d)throw"unexpected EOF";i&&o(l+131072);for(var X=l+_t;l<X;l+=4)e[l]=e[l-z],e[l+1]=e[l+1-z],e[l+2]=e[l+2-z],e[l+3]=e[l+3-z];l=X}}t.l=u,t.p=A,t.b=l,u&&(s=1,t.m=c,t.d=h,t.n=f)}while(!s);return l==e.length?e:JD(e,0,l)},IA=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8},ud=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},EE=function(r,e){for(var t=[],n=0;n<r.length;++n)r[n]&&t.push({s:n,f:r[n]});var i=t.length,a=t.slice();if(!i)return[new Na(0),0];if(i==1){var o=new Na(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(R,O){return R.f-O.f}),t.push({s:-1,f:25001});var s=t[0],A=t[1],l=0,u=1,h=2;for(t[0]={s:-1,f:s.f+A.f,l:s,r:A};u!=i-1;)s=t[t[l].f<t[h].f?l++:h++],A=t[l!=u&&t[l].f<t[h].f?l++:h++],t[u++]={s:-1,f:s.f+A.f,l:s,r:A};for(var c=a[0].s,n=1;n<i;++n)a[n].s>c&&(c=a[n].s);var f=new Ua(c+1),d=pT(t[u-1],f,0);if(d>e){var n=0,v=0,y=d-e,m=1<<y;for(a.sort(function(O,I){return f[I.s]-f[O.s]||O.f-I.f});n<i;++n){var w=a[n].s;if(f[w]>e)v+=m-(1<<d-f[w]),f[w]=e;else break}for(v>>>=y;v>0;){var C=a[n].s;f[C]<e?v-=1<<e-f[C]++-1:++n}for(;n>=0&&v;--n){var B=a[n].s;f[B]==e&&(--f[B],++v)}d=e}return[new Na(f),d]},pT=function(r,e,t){return r.s==-1?Math.max(pT(r.l,e,t+1),pT(r.r,e,t+1)):e[r.s]=t},WR=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new Ua(++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]},hd=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},H0=function(r,e,t){var n=t.length,i=Hb(e+2);r[i]=n&255,r[i+1]=n>>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var a=0;a<n;++a)r[i+a+4]=t[a];return(i+4+n)*8},qR=function(r,e,t,n,i,a,o,s,A,l,u){IA(e,u++,t),++i[256];for(var h=EE(i,15),c=h[0],f=h[1],d=EE(a,15),v=d[0],y=d[1],m=WR(c),w=m[0],C=m[1],B=WR(v),R=B[0],O=B[1],I=new Ua(19),T=0;T<w.length;++T)I[w[T]&31]++;for(var T=0;T<R.length;++T)I[R[T]&31]++;for(var L=EE(I,7),P=L[0],S=L[1],x=19;x>4&&!P[hT[x-1]];--x);var M=l+5<<3,D=hd(i,Tu)+hd(a,Qv)+o,W=hd(i,c)+hd(a,v)+o+14+3*x+hd(I,P)+(2*I[16]+3*I[17]+7*I[18]);if(M<=D&&M<=W)return H0(e,u,r.subarray(A,A+l));var z,tt,q,rt;if(IA(e,u,1+(W<D)),u+=2,W<D){z=eA(c,f,0),tt=c,q=eA(v,y,0),rt=v;var nt=eA(P,S,0);IA(e,u,C-257),IA(e,u+5,O-1),IA(e,u+10,x-4),u+=14;for(var T=0;T<x;++T)IA(e,u+3*T,P[hT[T]]);u+=3*x;for(var _t=[w,R],F=0;F<2;++F)for(var $=_t[F],T=0;T<$.length;++T){var j=$[T]&31;IA(e,u,nt[j]),u+=P[j],j>15&&(IA(e,u,$[T]>>>5&127),u+=$[T]>>>12)}}else z=Frt,tt=Tu,q=Rrt,rt=Qv;for(var T=0;T<s;++T)if(n[T]>255){var j=n[T]>>>18&31;ud(e,u,z[j+257]),u+=tt[j+257],j>7&&(IA(e,u,n[T]>>>23&31),u+=o1[j]);var X=n[T]&31;ud(e,u,q[X]),u+=rt[X],X>3&&(ud(e,u,n[T]>>>5&8191),u+=s1[X])}else ud(e,u,z[n[T]]),u+=tt[n[T]];return ud(e,u,z[256]),u+tt[256]},Prt=new Dv([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Nrt=new Na(0),Urt=function(r,e,t,n,i,a){var o=r.length,s=new Na(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 h=u+65535;h<o?l=H0(A,l,r.subarray(u,h)):(A[u]=a,l=H0(A,l,r.subarray(u,o)))}else{for(var c=Prt[e-1],f=c>>>13,d=c&8191,v=(1<<t)-1,y=new Ua(32768),m=new Ua(v+1),w=Math.ceil(t/3),C=2*w,B=function(pt){return(r[pt]^r[pt+1]<<w^r[pt+2]<<C)&v},R=new Dv(25e3),O=new Ua(288),I=new Ua(32),T=0,L=0,u=0,P=0,S=0,x=0;u<o;++u){var M=B(u),D=u&32767,W=m[M];if(y[D]=W,m[M]=D,S<=u){var z=o-u;if((T>7e3||P>24576)&&z>423){l=qR(r,A,0,R,O,I,L,P,x,u-x,l),P=T=L=0,x=u;for(var tt=0;tt<286;++tt)O[tt]=0;for(var tt=0;tt<30;++tt)I[tt]=0}var q=2,rt=0,nt=d,_t=D-W&32767;if(z>2&&M==B(u-_t))for(var F=Math.min(f,z)-1,$=Math.min(32767,u),j=Math.min(258,z);_t<=$&&--nt&&D!=W;){if(r[u+q]==r[u+q-_t]){for(var X=0;X<j&&r[u+X]==r[u+X-_t];++X);if(X>q){if(q=X,rt=_t,X>F)break;for(var it=Math.min(_t,X-2),gt=0,tt=0;tt<it;++tt){var wt=u-_t+tt+32768&32767,at=y[wt],Pt=wt-at+32768&32767;Pt>gt&&(gt=Pt,W=wt)}}}D=W,W=y[D],_t+=D-W+32768&32767}if(rt){R[P++]=268435456|cT[q]<<18|XR[rt];var Ot=cT[q]&31,K=XR[rt]&31;L+=o1[Ot]+s1[K],++O[257+Ot],++I[K],S=u+q,++T}else R[P++]=r[u],++O[r[u]]}}l=qR(r,A,a,R,O,I,L,P,x,u-x,l),a||(l=H0(A,l,Nrt))}return JD(s,0,n+Hb(l)+i)},Drt=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<s;++o)n+=t[o],i+=n;n%=65521,i%=65521}r=n,e=i},d:function(){return(r>>>8<<16|(e&255)<<8|e>>>8)+((r&255)<<23)*2}}},Qrt=function(r,e,t,n,i){return Urt(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)},Hrt=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},Grt=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)},krt=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 dT(r,e){e===void 0&&(e={});var t=Drt();t.p(r);var n=Qrt(r,e,2,4);return Grt(n,e),Hrt(n,n.length-4,t.d()),n}function $rt(r,e){return Mrt((krt(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 <james@parall.ax>, https://github.com/MrRio/jsPDF
|
||
* 2015-2021 yWorks GmbH, http://www.yworks.com
|
||
* 2015-2021 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
|
||
* 2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
|
||
* 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 Qe=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function CE(){Qe.console&&typeof Qe.console.log=="function"&&Qe.console.log.apply(Qe.console,arguments)}var sn={log:CE,warn:function(r){Qe.console&&(typeof Qe.console.warn=="function"?Qe.console.warn.apply(Qe.console,arguments):CE.call(null,arguments))},error:function(r){Qe.console&&(typeof Qe.console.error=="function"?Qe.console.error.apply(Qe.console,arguments):CE(r))}};function BE(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){Ah(n.response,e,t)},n.onerror=function(){sn.error("could not download file")},n.send()}function ZR(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Py(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 rv,vT,Ah=Qe.saveAs||((typeof window>"u"?"undefined":Jr(window))!=="object"||window!==Qe?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=Qe.URL||Qe.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?ZR(i.href)?BE(r,e,t):Py(i,i.target="_blank"):Py(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){Py(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(ZR(r))BE(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Py(n)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:Jr(a)!=="object"&&(sn.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 BE(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(Qe.HTMLElement)||Qe.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":Jr(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=Qe.URL||Qe.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 <sstoo@gmail.com>
|
||
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
|
||
* @license Use it if you like it
|
||
*/function t6(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;n<t.length;n++){var i=t[n].re,a=t[n].process,o=i.exec(r);o&&(e=a(o),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?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 TE(r,e){var t=r[0],n=r[1],i=r[2],a=r[3];t=Aa(t,n,i,a,e[0],7,-680876936),a=Aa(a,t,n,i,e[1],12,-389564586),i=Aa(i,a,t,n,e[2],17,606105819),n=Aa(n,i,a,t,e[3],22,-1044525330),t=Aa(t,n,i,a,e[4],7,-176418897),a=Aa(a,t,n,i,e[5],12,1200080426),i=Aa(i,a,t,n,e[6],17,-1473231341),n=Aa(n,i,a,t,e[7],22,-45705983),t=Aa(t,n,i,a,e[8],7,1770035416),a=Aa(a,t,n,i,e[9],12,-1958414417),i=Aa(i,a,t,n,e[10],17,-42063),n=Aa(n,i,a,t,e[11],22,-1990404162),t=Aa(t,n,i,a,e[12],7,1804603682),a=Aa(a,t,n,i,e[13],12,-40341101),i=Aa(i,a,t,n,e[14],17,-1502002290),t=la(t,n=Aa(n,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=la(a,t,n,i,e[6],9,-1069501632),i=la(i,a,t,n,e[11],14,643717713),n=la(n,i,a,t,e[0],20,-373897302),t=la(t,n,i,a,e[5],5,-701558691),a=la(a,t,n,i,e[10],9,38016083),i=la(i,a,t,n,e[15],14,-660478335),n=la(n,i,a,t,e[4],20,-405537848),t=la(t,n,i,a,e[9],5,568446438),a=la(a,t,n,i,e[14],9,-1019803690),i=la(i,a,t,n,e[3],14,-187363961),n=la(n,i,a,t,e[8],20,1163531501),t=la(t,n,i,a,e[13],5,-1444681467),a=la(a,t,n,i,e[2],9,-51403784),i=la(i,a,t,n,e[7],14,1735328473),t=ua(t,n=la(n,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=ua(a,t,n,i,e[8],11,-2022574463),i=ua(i,a,t,n,e[11],16,1839030562),n=ua(n,i,a,t,e[14],23,-35309556),t=ua(t,n,i,a,e[1],4,-1530992060),a=ua(a,t,n,i,e[4],11,1272893353),i=ua(i,a,t,n,e[7],16,-155497632),n=ua(n,i,a,t,e[10],23,-1094730640),t=ua(t,n,i,a,e[13],4,681279174),a=ua(a,t,n,i,e[0],11,-358537222),i=ua(i,a,t,n,e[3],16,-722521979),n=ua(n,i,a,t,e[6],23,76029189),t=ua(t,n,i,a,e[9],4,-640364487),a=ua(a,t,n,i,e[12],11,-421815835),i=ua(i,a,t,n,e[15],16,530742520),t=ha(t,n=ua(n,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=ha(a,t,n,i,e[7],10,1126891415),i=ha(i,a,t,n,e[14],15,-1416354905),n=ha(n,i,a,t,e[5],21,-57434055),t=ha(t,n,i,a,e[12],6,1700485571),a=ha(a,t,n,i,e[3],10,-1894986606),i=ha(i,a,t,n,e[10],15,-1051523),n=ha(n,i,a,t,e[1],21,-2054922799),t=ha(t,n,i,a,e[8],6,1873313359),a=ha(a,t,n,i,e[15],10,-30611744),i=ha(i,a,t,n,e[6],15,-1560198380),n=ha(n,i,a,t,e[13],21,1309151649),t=ha(t,n,i,a,e[4],6,-145523070),a=ha(a,t,n,i,e[11],10,-1120210379),i=ha(i,a,t,n,e[2],15,718787259),n=ha(n,i,a,t,e[9],21,-343485551),r[0]=ru(t,r[0]),r[1]=ru(n,r[1]),r[2]=ru(i,r[2]),r[3]=ru(a,r[3])}function A1(r,e,t,n,i,a){return e=ru(ru(e,r),ru(n,a)),ru(e<<i|e>>>32-i,t)}function Aa(r,e,t,n,i,a,o){return A1(e&t|~e&n,r,e,i,a,o)}function la(r,e,t,n,i,a,o){return A1(e&n|t&~n,r,e,i,a,o)}function ua(r,e,t,n,i,a,o){return A1(e^t^n,r,e,i,a,o)}function ha(r,e,t,n,i,a,o){return A1(t^(e|~n),r,e,i,a,o)}function e6(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)TE(n,Vrt(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<r.length;e++)i[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(TE(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,TE(n,i),n}function Vrt(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}rv=Qe.atob.bind(Qe),vT=Qe.btoa.bind(Qe);var JR="0123456789abcdef".split("");function jrt(r){for(var e="",t=0;t<4;t++)e+=JR[r>>8*t+4&15]+JR[r>>8*t&15];return e}function Krt(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function gT(r){return e6(r).map(Krt).join("")}var Yrt=function(r){for(var e=0;e<r.length;e++)r[e]=jrt(r[e]);return r.join("")}(e6("hello"))!="5d41402abc4b2a76b9719d911017c592";function ru(r,e){if(Yrt){var t=(65535&r)+(65535&e);return(r>>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 yT(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 h=e.length,c=0,f=0,d="";for(A=0;A<h;A++)f=(f+(u=s[c=(c+1)%256]))%256,s[c]=s[f],s[f]=u,o=s[(s[c]+s[f])%256],d+=String.fromCharCode(e.charCodeAt(A)^o);return d}/**
|
||
* @license
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
* Author: Owen Leong (@owenl131)
|
||
* Date: 15 Oct 2020
|
||
* References:
|
||
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
|
||
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
|
||
* http://www.fpdf.org/en/script/script37.php
|
||
*/var tO={print:4,modify:8,copy:16,"annot-forms":32};function of(r,e,t,n){this.v=1,this.r=2;var i=192;r.forEach(function(s){if(tO.perm!==void 0)throw new Error("Invalid permission: "+s);i+=tO[s]}),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\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=gT(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=yT(this.encryptionKey,this.padding)}function sf(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;n<t;n++){var i=r.charCodeAt(n);i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?e+="#"+("0"+i.toString(16)).slice(-2):e+=r[n]}return e}function eO(r){if(Jr(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){Qe.console&&sn.error("jsPDF PubSub Error",s.message,s)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function Hm(r){if(!(this instanceof Hm))return new Hm(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 r6(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function fh(r,e,t,n,i){if(!(this instanceof fh))return new fh(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,r6.call(this,n,i)}function _f(r,e,t,n,i){if(!(this instanceof _f))return new _f(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,r6.call(this,n,i)}function Ne(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;Jr(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 h=r.putOnlyUsedFonts||!1,c={},f={internal:{},__private__:{}};f.__private__.PubSub=eO;var d="1.3",v=f.__private__.getPdfVersion=function(){return d};f.__private__.setPdfVersion=function(_){d=_};var y={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 y};var m=f.__private__.getPageFormat=function(_){return y[_]};i=i||"a4";var w={COMPAT:"compat",ADVANCED:"advanced"},C=w.COMPAT;function B(){this.saveGraphicsState(),G(new Se(Kt,0,0,-Kt,0,wl()*Kt).toString()+" cm"),this.setFontSize(this.getFontSize()/Kt),l="n",C=w.ADVANCED}function R(){this.restoreGraphicsState(),l="S",C=w.COMPAT}var O=f.__private__.combineFontStyleAndFontWeight=function(_,U){if(_=="bold"&&U=="normal"||_=="bold"&&U==400||_=="normal"&&U=="italic"||_=="bold"&&U=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return U&&(_=U==400||U==="normal"?_==="italic"?"italic":"normal":U!=700&&U!=="bold"||_!=="normal"?(U==700?"bold":U)+""+_:"bold"),_};f.advancedAPI=function(_){var U=C===w.COMPAT;return U&&B.call(this),typeof _!="function"||(_(this),U&&R.call(this)),this},f.compatAPI=function(_){var U=C===w.ADVANCED;return U&&R.call(this),typeof _!="function"||(_(this),U&&B.call(this)),this},f.isAdvancedAPI=function(){return C===w.ADVANCED};var I,T=function(_){if(C!==w.ADVANCED)throw new Error(_+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},L=f.roundToPrecision=f.__private__.roundToPrecision=function(_,U){var J=e||U;if(isNaN(_)||isNaN(J))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return _.toFixed(J).replace(/0+$/,"")};I=f.hpf=f.__private__.hpf=typeof A=="number"?function(_){if(isNaN(_))throw new Error("Invalid argument passed to jsPDF.hpf");return L(_,A)}:A==="smart"?function(_){if(isNaN(_))throw new Error("Invalid argument passed to jsPDF.hpf");return L(_,_>-1&&_<1?16:5)}:function(_){if(isNaN(_))throw new Error("Invalid argument passed to jsPDF.hpf");return L(_,16)};var P=f.f2=f.__private__.f2=function(_){if(isNaN(_))throw new Error("Invalid argument passed to jsPDF.f2");return L(_,2)},S=f.__private__.f3=function(_){if(isNaN(_))throw new Error("Invalid argument passed to jsPDF.f3");return L(_,3)},x=f.scale=f.__private__.scale=function(_){if(isNaN(_))throw new Error("Invalid argument passed to jsPDF.scale");return C===w.COMPAT?_*Kt:C===w.ADVANCED?_:void 0},M=function(_){return C===w.COMPAT?wl()-_:C===w.ADVANCED?_:void 0},D=function(_){return x(M(_))};f.__private__.setPrecision=f.setPrecision=function(_){typeof parseInt(_,10)=="number"&&(e=parseInt(_,10))};var W,z="00000000000000000000000000000000",tt=f.__private__.getFileId=function(){return z},q=f.__private__.setFileId=function(_){return z=_!==void 0&&/^[a-fA-F0-9]{32}$/.test(_)?_.toUpperCase():z.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(aa=new of(u.userPermissions,u.userPassword,u.ownerPassword,z)),z};f.setFileId=function(_){return q(_),this},f.getFileId=function(){return tt()};var rt=f.__private__.convertDateToPDFDate=function(_){var U=_.getTimezoneOffset(),J=U<0?"+":"-",lt=Math.floor(Math.abs(U/60)),Ct=Math.abs(U%60),It=[J,j(lt),"'",j(Ct),"'"].join("");return["D:",_.getFullYear(),j(_.getMonth()+1),j(_.getDate()),j(_.getHours()),j(_.getMinutes()),j(_.getSeconds()),It].join("")},nt=f.__private__.convertPDFDateToDate=function(_){var U=parseInt(_.substr(2,4),10),J=parseInt(_.substr(6,2),10)-1,lt=parseInt(_.substr(8,2),10),Ct=parseInt(_.substr(10,2),10),It=parseInt(_.substr(12,2),10),jt=parseInt(_.substr(14,2),10);return new Date(U,J,lt,Ct,It,jt,0)},_t=f.__private__.setCreationDate=function(_){var U;if(_===void 0&&(_=new Date),_ instanceof Date)U=rt(_);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(_))throw new Error("Invalid argument passed to jsPDF.setCreationDate");U=_}return W=U},F=f.__private__.getCreationDate=function(_){var U=W;return _==="jsDate"&&(U=nt(W)),U};f.setCreationDate=function(_){return _t(_),this},f.getCreationDate=function(_){return F(_)};var $,j=f.__private__.padd2=function(_){return("0"+parseInt(_)).slice(-2)},X=f.__private__.padd2Hex=function(_){return("00"+(_=_.toString())).substr(_.length)},it=0,gt=[],wt=[],at=0,Pt=[],Ot=[],K=!1,Z=wt,pt=function(){it=0,at=0,wt=[],gt=[],Pt=[],se=Wr(),ht=Wr()};f.__private__.setCustomOutputDestination=function(_){K=!0,Z=_};var et=function(_){K||(Z=_)};f.__private__.resetCustomOutputDestination=function(){K=!1,Z=wt};var G=f.__private__.out=function(_){return _=_.toString(),at+=_.length+1,Z.push(_),Z},bt=f.__private__.write=function(_){return G(arguments.length===1?_.toString():Array.prototype.join.call(arguments," "))},St=f.__private__.getArrayBuffer=function(_){for(var U=_.length,J=new ArrayBuffer(U),lt=new Uint8Array(J);U--;)lt[U]=_.charCodeAt(U);return J},dt=[["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 dt};var Et=r.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(_){return Et=C===w.ADVANCED?_/Kt:_,this};var yt,xt=f.__private__.getFontSize=f.getFontSize=function(){return C===w.COMPAT?Et:Et*Kt},Lt=r.R2L||!1;f.__private__.setR2L=f.setR2L=function(_){return Lt=_,this},f.__private__.getR2L=f.getR2L=function(){return Lt};var Rt,Vt=f.__private__.setZoomMode=function(_){var U=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(_))yt=_;else if(isNaN(_)){if(U.indexOf(_)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+_+'" is not recognized.');yt=_}else yt=parseInt(_,10)};f.__private__.getZoomMode=function(){return yt};var zt,ie=f.__private__.setPageMode=function(_){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(_)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+_+'" is not recognized.');Rt=_};f.__private__.getPageMode=function(){return Rt};var ee=f.__private__.setLayoutMode=function(_){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(_)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+_+'" is not recognized.');zt=_};f.__private__.getLayoutMode=function(){return zt},f.__private__.setDisplayMode=f.setDisplayMode=function(_,U,J){return Vt(_),ee(U),ie(J),this};var Xt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(_){if(Object.keys(Xt).indexOf(_)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Xt[_]},f.__private__.getDocumentProperties=function(){return Xt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(_){for(var U in Xt)Xt.hasOwnProperty(U)&&_[U]&&(Xt[U]=_[U]);return this},f.__private__.setDocumentProperty=function(_,U){if(Object.keys(Xt).indexOf(_)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Xt[_]=U};var oe,Kt,Ye,Re,fr,be={},xe={},nn=[],ar={},_i={},Br={},ai={},$r=null,Vr=0,Oe=[],mr=new eO(f),Gn=r.hotfixes||[],ln={},wi={},Ei=[],Se=function _(U,J,lt,Ct,It,jt){if(!(this instanceof _))return new _(U,J,lt,Ct,It,jt);isNaN(U)&&(U=1),isNaN(J)&&(J=0),isNaN(lt)&&(lt=0),isNaN(Ct)&&(Ct=1),isNaN(It)&&(It=0),isNaN(jt)&&(jt=0),this._matrix=[U,J,lt,Ct,It,jt]};Object.defineProperty(Se.prototype,"sx",{get:function(){return this._matrix[0]},set:function(_){this._matrix[0]=_}}),Object.defineProperty(Se.prototype,"shy",{get:function(){return this._matrix[1]},set:function(_){this._matrix[1]=_}}),Object.defineProperty(Se.prototype,"shx",{get:function(){return this._matrix[2]},set:function(_){this._matrix[2]=_}}),Object.defineProperty(Se.prototype,"sy",{get:function(){return this._matrix[3]},set:function(_){this._matrix[3]=_}}),Object.defineProperty(Se.prototype,"tx",{get:function(){return this._matrix[4]},set:function(_){this._matrix[4]=_}}),Object.defineProperty(Se.prototype,"ty",{get:function(){return this._matrix[5]},set:function(_){this._matrix[5]=_}}),Object.defineProperty(Se.prototype,"a",{get:function(){return this._matrix[0]},set:function(_){this._matrix[0]=_}}),Object.defineProperty(Se.prototype,"b",{get:function(){return this._matrix[1]},set:function(_){this._matrix[1]=_}}),Object.defineProperty(Se.prototype,"c",{get:function(){return this._matrix[2]},set:function(_){this._matrix[2]=_}}),Object.defineProperty(Se.prototype,"d",{get:function(){return this._matrix[3]},set:function(_){this._matrix[3]=_}}),Object.defineProperty(Se.prototype,"e",{get:function(){return this._matrix[4]},set:function(_){this._matrix[4]=_}}),Object.defineProperty(Se.prototype,"f",{get:function(){return this._matrix[5]},set:function(_){this._matrix[5]=_}}),Object.defineProperty(Se.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Se.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Se.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Se.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Se.prototype.join=function(_){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(I).join(_)},Se.prototype.multiply=function(_){var U=_.sx*this.sx+_.shy*this.shx,J=_.sx*this.shy+_.shy*this.sy,lt=_.shx*this.sx+_.sy*this.shx,Ct=_.shx*this.shy+_.sy*this.sy,It=_.tx*this.sx+_.ty*this.shx+this.tx,jt=_.tx*this.shy+_.ty*this.sy+this.ty;return new Se(U,J,lt,Ct,It,jt)},Se.prototype.decompose=function(){var _=this.sx,U=this.shy,J=this.shx,lt=this.sy,Ct=this.tx,It=this.ty,jt=Math.sqrt(_*_+U*U),re=(_/=jt)*J+(U/=jt)*lt;J-=_*re,lt-=U*re;var Le=Math.sqrt(J*J+lt*lt);return re/=Le,_*(lt/=Le)<U*(J/=Le)&&(_=-_,U=-U,re=-re,jt=-jt),{scale:new Se(jt,0,0,Le,0,0),translate:new Se(1,0,0,1,Ct,It),rotate:new Se(_,U,-U,_,0,0),skew:new Se(1,0,re,1,0,0)}},Se.prototype.toString=function(_){return this.join(" ")},Se.prototype.inversed=function(){var _=this.sx,U=this.shy,J=this.shx,lt=this.sy,Ct=this.tx,It=this.ty,jt=1/(_*lt-U*J),re=lt*jt,Le=-U*jt,lr=-J*jt,Ve=_*jt;return new Se(re,Le,lr,Ve,-re*Ct-lr*It,-Le*Ct-Ve*It)},Se.prototype.applyToPoint=function(_){var U=_.x*this.sx+_.y*this.shx+this.tx,J=_.x*this.shy+_.y*this.sy+this.ty;return new mc(U,J)},Se.prototype.applyToRectangle=function(_){var U=this.applyToPoint(_),J=this.applyToPoint(new mc(_.x+_.w,_.y+_.h));return new Hp(U.x,U.y,J.x-U.x,J.y-U.y)},Se.prototype.clone=function(){var _=this.sx,U=this.shy,J=this.shx,lt=this.sy,Ct=this.tx,It=this.ty;return new Se(_,U,J,lt,Ct,It)},f.Matrix=Se;var oi=f.matrixMult=function(_,U){return U.multiply(_)},Mn=new Se(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Mn;var Ci=function(_,U){if(!_i[_]){var J=(U instanceof fh?"Sh":"P")+(Object.keys(ar).length+1).toString(10);U.id=J,_i[_]=J,ar[J]=U,mr.publish("addPattern",U)}};f.ShadingPattern=fh,f.TilingPattern=_f,f.addShadingPattern=function(_,U){return T("addShadingPattern()"),Ci(_,U),this},f.beginTilingPattern=function(_){T("beginTilingPattern()"),$g(_.boundingBox[0],_.boundingBox[1],_.boundingBox[2]-_.boundingBox[0],_.boundingBox[3]-_.boundingBox[1],_.matrix)},f.endTilingPattern=function(_,U){T("endTilingPattern()"),U.stream=Ot[$].join(`
|
||
`),Ci(_,U),mr.publish("endTilingPattern",U),Ei.pop().restore()};var tn=f.__private__.newObject=function(){var _=Wr();return yn(_,!0),_},Wr=f.__private__.newObjectDeferred=function(){return it++,gt[it]=function(){return at},it},yn=function(_,U){return U=typeof U=="boolean"&&U,gt[_]=at,U&&G(_+" 0 obj"),_},ho=f.__private__.newAdditionalObject=function(){var _={objId:Wr(),content:""};return Pt.push(_),_},se=Wr(),ht=Wr(),Qt=f.__private__.decodeColorString=function(_){var U=_.split(" ");if(U.length!==2||U[1]!=="g"&&U[1]!=="G")U.length===5&&(U[4]==="k"||U[4]==="K")&&(U=[(1-U[0])*(1-U[3]),(1-U[1])*(1-U[3]),(1-U[2])*(1-U[3]),"r"]);else{var J=parseFloat(U[0]);U=[J,J,J,"r"]}for(var lt="#",Ct=0;Ct<3;Ct++)lt+=("0"+Math.floor(255*parseFloat(U[Ct])).toString(16)).slice(-2);return lt},qt=f.__private__.encodeColorString=function(_){var U;typeof _=="string"&&(_={ch1:_});var J=_.ch1,lt=_.ch2,Ct=_.ch3,It=_.ch4,jt=_.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof J=="string"&&J.charAt(0)!=="#"){var re=new t6(J);if(re.ok)J=re.toHex();else if(!/^\d*\.?\d*$/.test(J))throw new Error('Invalid color "'+J+'" passed to jsPDF.encodeColorString.')}if(typeof J=="string"&&/^#[0-9A-Fa-f]{3}$/.test(J)&&(J="#"+J[1]+J[1]+J[2]+J[2]+J[3]+J[3]),typeof J=="string"&&/^#[0-9A-Fa-f]{6}$/.test(J)){var Le=parseInt(J.substr(1),16);J=Le>>16&255,lt=Le>>8&255,Ct=255&Le}if(lt===void 0||It===void 0&&J===lt&<===Ct)if(typeof J=="string")U=J+" "+jt[0];else switch(_.precision){case 2:U=P(J/255)+" "+jt[0];break;case 3:default:U=S(J/255)+" "+jt[0]}else if(It===void 0||Jr(It)==="object"){if(It&&!isNaN(It.a)&&It.a===0)return U=["1.","1.","1.",jt[1]].join(" ");if(typeof J=="string")U=[J,lt,Ct,jt[1]].join(" ");else switch(_.precision){case 2:U=[P(J/255),P(lt/255),P(Ct/255),jt[1]].join(" ");break;default:case 3:U=[S(J/255),S(lt/255),S(Ct/255),jt[1]].join(" ")}}else if(typeof J=="string")U=[J,lt,Ct,It,jt[2]].join(" ");else switch(_.precision){case 2:U=[P(J),P(lt),P(Ct),P(It),jt[2]].join(" ");break;case 3:default:U=[S(J),S(lt),S(Ct),S(It),jt[2]].join(" ")}return U},Ze=f.__private__.getFilters=function(){return o},Ir=f.__private__.putStream=function(_){var U=(_=_||{}).data||"",J=_.filters||Ze(),lt=_.alreadyAppliedFilters||[],Ct=_.addLength1||!1,It=U.length,jt=_.objectId,re=function(oa){return oa};if(u!==null&&jt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(re=aa.encryptor(jt,0));var Le={};J===!0&&(J=["FlateEncode"]);var lr=_.additionalKeyValues||[],Ve=(Le=Ne.API.processDataByFilters!==void 0?Ne.API.processDataByFilters(U,J):{data:U,reverseChain:[]}).reverseChain+(Array.isArray(lt)?lt.join(" "):lt.toString());if(Le.data.length!==0&&(lr.push({key:"Length",value:Le.data.length}),Ct===!0&&lr.push({key:"Length1",value:It})),Ve.length!=0)if(Ve.split("/").length-1==1)lr.push({key:"Filter",value:Ve});else{lr.push({key:"Filter",value:"["+Ve+"]"});for(var Tr=0;Tr<lr.length;Tr+=1)if(lr[Tr].key==="DecodeParms"){for(var zi=[],$n=0;$n<Le.reverseChain.split("/").length-1;$n+=1)zi.push("null");zi.push(lr[Tr].value),lr[Tr].value="["+zi.join(" ")+"]"}}G("<<");for(var si=0;si<lr.length;si++)G("/"+lr[si].key+" "+lr[si].value);G(">>"),Le.data.length!==0&&(G("stream"),G(re(Le.data)),G("endstream"))},an=f.__private__.putPage=function(_){var U=_.number,J=_.data,lt=_.objId,Ct=_.contentsObjId;yn(lt,!0),G("<</Type /Page"),G("/Parent "+_.rootDictionaryObjId+" 0 R"),G("/Resources "+_.resourceDictionaryObjId+" 0 R"),G("/MediaBox ["+parseFloat(I(_.mediaBox.bottomLeftX))+" "+parseFloat(I(_.mediaBox.bottomLeftY))+" "+I(_.mediaBox.topRightX)+" "+I(_.mediaBox.topRightY)+"]"),_.cropBox!==null&&G("/CropBox ["+I(_.cropBox.bottomLeftX)+" "+I(_.cropBox.bottomLeftY)+" "+I(_.cropBox.topRightX)+" "+I(_.cropBox.topRightY)+"]"),_.bleedBox!==null&&G("/BleedBox ["+I(_.bleedBox.bottomLeftX)+" "+I(_.bleedBox.bottomLeftY)+" "+I(_.bleedBox.topRightX)+" "+I(_.bleedBox.topRightY)+"]"),_.trimBox!==null&&G("/TrimBox ["+I(_.trimBox.bottomLeftX)+" "+I(_.trimBox.bottomLeftY)+" "+I(_.trimBox.topRightX)+" "+I(_.trimBox.topRightY)+"]"),_.artBox!==null&&G("/ArtBox ["+I(_.artBox.bottomLeftX)+" "+I(_.artBox.bottomLeftY)+" "+I(_.artBox.topRightX)+" "+I(_.artBox.topRightY)+"]"),typeof _.userUnit=="number"&&_.userUnit!==1&&G("/UserUnit "+_.userUnit),mr.publish("putPage",{objId:lt,pageContext:Oe[U],pageNumber:U,page:J}),G("/Contents "+Ct+" 0 R"),G(">>"),G("endobj");var It=J.join(`
|
||
`);return C===w.ADVANCED&&(It+=`
|
||
Q`),yn(Ct,!0),Ir({data:It,filters:Ze(),objectId:Ct}),G("endobj"),lt},mn=f.__private__.putPages=function(){var _,U,J=[];for(_=1;_<=Vr;_++)Oe[_].objId=Wr(),Oe[_].contentsObjId=Wr();for(_=1;_<=Vr;_++)J.push(an({number:_,data:Ot[_],objId:Oe[_].objId,contentsObjId:Oe[_].contentsObjId,mediaBox:Oe[_].mediaBox,cropBox:Oe[_].cropBox,bleedBox:Oe[_].bleedBox,trimBox:Oe[_].trimBox,artBox:Oe[_].artBox,userUnit:Oe[_].userUnit,rootDictionaryObjId:se,resourceDictionaryObjId:ht}));yn(se,!0),G("<</Type /Pages");var lt="/Kids [";for(U=0;U<Vr;U++)lt+=J[U]+" 0 R ";G(lt+"]"),G("/Count "+Vr),G(">>"),G("endobj"),mr.publish("postPutPages")},qo=function(_){mr.publish("putFont",{font:_,out:G,newObject:tn,putStream:Ir}),_.isAlreadyPutted!==!0&&(_.objectNumber=tn(),G("<<"),G("/Type /Font"),G("/BaseFont /"+sf(_.postScriptName)),G("/Subtype /Type1"),typeof _.encoding=="string"&&G("/Encoding /"+_.encoding),G("/FirstChar 32"),G("/LastChar 255"),G(">>"),G("endobj"))},Bi=function(){for(var _ in be)be.hasOwnProperty(_)&&(h===!1||h===!0&&c.hasOwnProperty(_))&&qo(be[_])},gA=function(_){_.objectNumber=tn();var U=[];U.push({key:"Type",value:"/XObject"}),U.push({key:"Subtype",value:"/Form"}),U.push({key:"BBox",value:"["+[I(_.x),I(_.y),I(_.x+_.width),I(_.y+_.height)].join(" ")+"]"}),U.push({key:"Matrix",value:"["+_.matrix.toString()+"]"});var J=_.pages[1].join(`
|
||
`);Ir({data:J,additionalKeyValues:U,objectId:_.objectNumber}),G("endobj")},gl=function(){for(var _ in ln)ln.hasOwnProperty(_)&&gA(ln[_])},Lp=function(_,U){var J,lt=[],Ct=1/(U-1);for(J=0;J<1;J+=Ct)lt.push(J);if(lt.push(1),_[0].offset!=0){var It={offset:0,color:_[0].color};_.unshift(It)}if(_[_.length-1].offset!=1){var jt={offset:1,color:_[_.length-1].color};_.push(jt)}for(var re="",Le=0,lr=0;lr<lt.length;lr++){for(J=lt[lr];J>_[Le+1].offset;)Le++;var Ve=_[Le].offset,Tr=(J-Ve)/(_[Le+1].offset-Ve),zi=_[Le].color,$n=_[Le+1].color;re+=X(Math.round((1-Tr)*zi[0]+Tr*$n[0]).toString(16))+X(Math.round((1-Tr)*zi[1]+Tr*$n[1]).toString(16))+X(Math.round((1-Tr)*zi[2]+Tr*$n[2]).toString(16))}return re.trim()},z1=function(_,U){U||(U=21);var J=tn(),lt=Lp(_.colors,U),Ct=[];Ct.push({key:"FunctionType",value:"0"}),Ct.push({key:"Domain",value:"[0.0 1.0]"}),Ct.push({key:"Size",value:"["+U+"]"}),Ct.push({key:"BitsPerSample",value:"8"}),Ct.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ct.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ir({data:lt,additionalKeyValues:Ct,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:J}),G("endobj"),_.objectNumber=tn(),G("<< /ShadingType "+_.type),G("/ColorSpace /DeviceRGB");var It="/Coords ["+I(parseFloat(_.coords[0]))+" "+I(parseFloat(_.coords[1]))+" ";_.type===2?It+=I(parseFloat(_.coords[2]))+" "+I(parseFloat(_.coords[3])):It+=I(parseFloat(_.coords[2]))+" "+I(parseFloat(_.coords[3]))+" "+I(parseFloat(_.coords[4]))+" "+I(parseFloat(_.coords[5])),G(It+="]"),_.matrix&&G("/Matrix ["+_.matrix.toString()+"]"),G("/Function "+J+" 0 R"),G("/Extend [true true]"),G(">>"),G("endobj")},X1=function(_,U){var J=Wr(),lt=tn();U.push({resourcesOid:J,objectOid:lt}),_.objectNumber=lt;var Ct=[];Ct.push({key:"Type",value:"/Pattern"}),Ct.push({key:"PatternType",value:"1"}),Ct.push({key:"PaintType",value:"1"}),Ct.push({key:"TilingType",value:"1"}),Ct.push({key:"BBox",value:"["+_.boundingBox.map(I).join(" ")+"]"}),Ct.push({key:"XStep",value:I(_.xStep)}),Ct.push({key:"YStep",value:I(_.yStep)}),Ct.push({key:"Resources",value:J+" 0 R"}),_.matrix&&Ct.push({key:"Matrix",value:"["+_.matrix.toString()+"]"}),Ir({data:_.stream,additionalKeyValues:Ct,objectId:_.objectNumber}),G("endobj")},hc=function(_){var U;for(U in ar)ar.hasOwnProperty(U)&&(ar[U]instanceof fh?z1(ar[U]):ar[U]instanceof _f&&X1(ar[U],_))},xg=function(_){for(var U in _.objectNumber=tn(),G("<<"),_)switch(U){case"opacity":G("/ca "+P(_[U]));break;case"stroke-opacity":G("/CA "+P(_[U]))}G(">>"),G("endobj")},W1=function(){var _;for(_ in Br)Br.hasOwnProperty(_)&&xg(Br[_])},Fp=function(){for(var _ in G("/XObject <<"),ln)ln.hasOwnProperty(_)&&ln[_].objectNumber>=0&&G("/"+_+" "+ln[_].objectNumber+" 0 R");mr.publish("putXobjectDict"),G(">>")},q1=function(){aa.oid=tn(),G("<<"),G("/Filter /Standard"),G("/V "+aa.v),G("/R "+aa.r),G("/U <"+aa.toHexString(aa.U)+">"),G("/O <"+aa.toHexString(aa.O)+">"),G("/P "+aa.P),G(">>"),G("endobj")},Sg=function(){for(var _ in G("/Font <<"),be)be.hasOwnProperty(_)&&(h===!1||h===!0&&c.hasOwnProperty(_))&&G("/"+_+" "+be[_].objectNumber+" 0 R");G(">>")},Z1=function(){if(Object.keys(ar).length>0){for(var _ in G("/Shading <<"),ar)ar.hasOwnProperty(_)&&ar[_]instanceof fh&&ar[_].objectNumber>=0&&G("/"+_+" "+ar[_].objectNumber+" 0 R");mr.publish("putShadingPatternDict"),G(">>")}},cc=function(_){if(Object.keys(ar).length>0){for(var U in G("/Pattern <<"),ar)ar.hasOwnProperty(U)&&ar[U]instanceof f.TilingPattern&&ar[U].objectNumber>=0&&ar[U].objectNumber<_&&G("/"+U+" "+ar[U].objectNumber+" 0 R");mr.publish("putTilingPatternDict"),G(">>")}},J1=function(){if(Object.keys(Br).length>0){var _;for(_ in G("/ExtGState <<"),Br)Br.hasOwnProperty(_)&&Br[_].objectNumber>=0&&G("/"+_+" "+Br[_].objectNumber+" 0 R");mr.publish("putGStateDict"),G(">>")}},kn=function(_){yn(_.resourcesOid,!0),G("<<"),G("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Sg(),Z1(),cc(_.objectOid),J1(),Fp(),G(">>"),G("endobj")},bg=function(){var _=[];Bi(),W1(),gl(),hc(_),mr.publish("putResources"),_.forEach(kn),kn({resourcesOid:ht,objectOid:Number.MAX_SAFE_INTEGER}),mr.publish("postPutResources")},Lg=function(){mr.publish("putAdditionalObjects");for(var _=0;_<Pt.length;_++){var U=Pt[_];yn(U.objId,!0),G(U.content),G("endobj")}mr.publish("postPutAdditionalObjects")},Fg=function(_){xe[_.fontName]=xe[_.fontName]||{},xe[_.fontName][_.fontStyle]=_.id},Ip=function(_,U,J,lt,Ct){var It={id:"F"+(Object.keys(be).length+1).toString(10),postScriptName:_,fontName:U,fontStyle:J,encoding:lt,isStandardFont:Ct||!1,metadata:{}};return mr.publish("addFont",{font:It,instance:this}),be[It.id]=It,Fg(It),It.id},tw=function(_){for(var U=0,J=dt.length;U<J;U++){var lt=Ip.call(this,_[U][0],_[U][1],_[U][2],dt[U][3],!0);h===!1&&(c[lt]=!0);var Ct=_[U][0].split("-");Fg({id:lt,fontName:Ct[0],fontStyle:Ct[1]||""})}mr.publish("addFonts",{fonts:be,dictionary:xe})},Zo=function(_){return _.foo=function(){try{return _.apply(this,arguments)}catch(lt){var U=lt.stack||"";~U.indexOf(" at ")&&(U=U.split(" at ")[1]);var J="Error in function "+U.split(`
|
||
`)[0].split("<")[0]+": "+lt.message;if(!Qe.console)throw new Error(J);Qe.console.error(J,lt),Qe.alert&&alert(J)}},_.foo.bar=_,_.foo},fc=function(_,U){var J,lt,Ct,It,jt,re,Le,lr,Ve;if(Ct=(U=U||{}).sourceEncoding||"Unicode",jt=U.outputEncoding,(U.autoencode||jt)&&be[oe].metadata&&be[oe].metadata[Ct]&&be[oe].metadata[Ct].encoding&&(It=be[oe].metadata[Ct].encoding,!jt&&be[oe].encoding&&(jt=be[oe].encoding),!jt&&It.codePages&&(jt=It.codePages[0]),typeof jt=="string"&&(jt=It[jt]),jt)){for(Le=!1,re=[],J=0,lt=_.length;J<lt;J++)(lr=jt[_.charCodeAt(J)])?re.push(String.fromCharCode(lr)):re.push(_[J]),re[J].charCodeAt(0)>>8&&(Le=!0);_=re.join("")}for(J=_.length;Le===void 0&&J!==0;)_.charCodeAt(J-1)>>8&&(Le=!0),J--;if(!Le)return _;for(re=U.noBOM?[]:[254,255],J=0,lt=_.length;J<lt;J++){if((Ve=(lr=_.charCodeAt(J))>>8)>>8)throw new Error("Character at position "+J+" of string '"+_+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");re.push(Ve),re.push(lr-(Ve<<8))}return String.fromCharCode.apply(void 0,re)},$a=f.__private__.pdfEscape=f.pdfEscape=function(_,U){return fc(_,U).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Rp=f.__private__.beginPage=function(_){Ot[++Vr]=[],Oe[Vr]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(_[0]),topRightY:Number(_[1])}},Rg(Vr),et(Ot[$])},Ig=function(_,U){var J,lt,Ct;switch(t=U||t,typeof _=="string"&&(J=m(_.toLowerCase()),Array.isArray(J)&&(lt=J[0],Ct=J[1])),Array.isArray(_)&&(lt=_[0]*Kt,Ct=_[1]*Kt),isNaN(lt)&&(lt=i[0],Ct=i[1]),(lt>14400||Ct>14400)&&(sn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),lt=Math.min(14400,lt),Ct=Math.min(14400,Ct)),i=[lt,Ct],t.substr(0,1)){case"l":Ct>lt&&(i=[Ct,lt]);break;case"p":lt>Ct&&(i=[Ct,lt])}Rp(i),Dg(Np),G(Jo),Dp!==0&&G(Dp+" J"),Qp!==0&&G(Qp+" j"),mr.publish("addPage",{pageNumber:Vr})},ew=function(_){_>0&&_<=Vr&&(Ot.splice(_,1),Oe.splice(_,1),Vr--,$>Vr&&($=Vr),this.setPage($))},Rg=function(_){_>0&&_<=Vr&&($=_)},rw=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return Ot.length-1},Og=function(_,U,J){var lt,Ct=void 0;return J=J||{},_=_!==void 0?_:be[oe].fontName,U=U!==void 0?U:be[oe].fontStyle,lt=_.toLowerCase(),xe[lt]!==void 0&&xe[lt][U]!==void 0?Ct=xe[lt][U]:xe[_]!==void 0&&xe[_][U]!==void 0?Ct=xe[_][U]:J.disableWarning===!1&&sn.warn("Unable to look up font label for font '"+_+"', '"+U+"'. Refer to getFontList() for available fonts."),Ct||J.noFallback||(Ct=xe.times[U])==null&&(Ct=xe.times.normal),Ct},nw=f.__private__.putInfo=function(){var _=tn(),U=function(lt){return lt};for(var J in u!==null&&(U=aa.encryptor(_,0)),G("<<"),G("/Producer ("+$a(U("jsPDF "+Ne.version))+")"),Xt)Xt.hasOwnProperty(J)&&Xt[J]&&G("/"+J.substr(0,1).toUpperCase()+J.substr(1)+" ("+$a(U(Xt[J]))+")");G("/CreationDate ("+$a(U(W))+")"),G(">>"),G("endobj")},Op=f.__private__.putCatalog=function(_){var U=(_=_||{}).rootDictionaryObjId||se;switch(tn(),G("<<"),G("/Type /Catalog"),G("/Pages "+U+" 0 R"),yt||(yt="fullwidth"),yt){case"fullwidth":G("/OpenAction [3 0 R /FitH null]");break;case"fullheight":G("/OpenAction [3 0 R /FitV null]");break;case"fullpage":G("/OpenAction [3 0 R /Fit]");break;case"original":G("/OpenAction [3 0 R /XYZ null null 1]");break;default:var J=""+yt;J.substr(J.length-1)==="%"&&(yt=parseInt(yt)/100),typeof yt=="number"&&G("/OpenAction [3 0 R /XYZ null null "+P(yt)+"]")}switch(zt||(zt="continuous"),zt){case"continuous":G("/PageLayout /OneColumn");break;case"single":G("/PageLayout /SinglePage");break;case"two":case"twoleft":G("/PageLayout /TwoColumnLeft");break;case"tworight":G("/PageLayout /TwoColumnRight")}Rt&&G("/PageMode /"+Rt),mr.publish("putCatalog"),G(">>"),G("endobj")},iw=f.__private__.putTrailer=function(){G("trailer"),G("<<"),G("/Size "+(it+1)),G("/Root "+it+" 0 R"),G("/Info "+(it-1)+" 0 R"),u!==null&&G("/Encrypt "+aa.oid+" 0 R"),G("/ID [ <"+z+"> <"+z+"> ]"),G(">>")},aw=f.__private__.putHeader=function(){G("%PDF-"+d),G("%ºß¬à")},ow=f.__private__.putXRef=function(){var _="0000000000";G("xref"),G("0 "+(it+1)),G("0000000000 65535 f ");for(var U=1;U<=it;U++)typeof gt[U]=="function"?G((_+gt[U]()).slice(-10)+" 00000 n "):gt[U]!==void 0?G((_+gt[U]).slice(-10)+" 00000 n "):G("0000000000 00000 n ")},yA=f.__private__.buildDocument=function(){pt(),et(wt),mr.publish("buildDocument"),aw(),mn(),Lg(),bg(),u!==null&&q1(),nw(),Op();var _=at;return ow(),iw(),G("startxref"),G(""+_),G("%%EOF"),et(Ot[$]),wt.join(`
|
||
`)},pc=f.__private__.getBlob=function(_){return new Blob([St(_)],{type:"application/pdf"})},dc=f.output=f.__private__.output=Zo(function(_,U){switch(typeof(U=U||{})=="string"?U={filename:U}:U.filename=U.filename||"generated.pdf",_){case void 0:return yA();case"save":f.save(U.filename);break;case"arraybuffer":return St(yA());case"blob":return pc(yA());case"bloburi":case"bloburl":if(Qe.URL!==void 0&&typeof Qe.URL.createObjectURL=="function")return Qe.URL&&Qe.URL.createObjectURL(pc(yA()))||void 0;sn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var J="",lt=yA();try{J=vT(lt)}catch{J=vT(unescape(encodeURIComponent(lt)))}return"data:application/pdf;filename="+U.filename+";base64,"+J;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Qe)==="[object Window]"){var Ct='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+(U.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(U)+");<\/script></body></html>",It=Qe.open();return It!==null&&It.document.write(Ct),It}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Qe)==="[object Window]"){var jt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(U.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+U.filename+'" width="500px" height="400px" /></body></html>',re=Qe.open();if(re!==null){re.document.write(jt);var Le=this;re.document.documentElement.querySelector("#pdfViewer").onload=function(){re.document.title=U.filename,re.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Le.output("bloburl"))}}return re}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Qe)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var lr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",U)+'"></iframe></body></html>',Ve=Qe.open();if(Ve!==null&&(Ve.document.write(lr),Ve.document.title=U.filename),Ve||typeof safari>"u")return Ve;break;case"datauri":case"dataurl":return Qe.document.location.href=this.output("datauristring",U);default:return null}}),Mg=function(_){return Array.isArray(Gn)===!0&&Gn.indexOf(_)>-1};switch(n){case"pt":Kt=1;break;case"mm":Kt=72/25.4;break;case"cm":Kt=72/2.54;break;case"in":Kt=72;break;case"px":Kt=Mg("px_scaling")==1?.75:96/72;break;case"pc":case"em":Kt=12;break;case"ex":Kt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);Kt=n}var aa=null;_t(),q();var sw=function(_){return u!==null?aa.encryptor(_,0):function(U){return U}},Pg=f.__private__.getPageInfo=f.getPageInfo=function(_){if(isNaN(_)||_%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Oe[_].objId,pageNumber:_,pageContext:Oe[_]}},$e=f.__private__.getPageInfoByObjId=function(_){if(isNaN(_)||_%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var U in Oe)if(Oe[U].objId===_)break;return Pg(U)},Aw=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:Oe[$].objId,pageNumber:$,pageContext:Oe[$]}};f.addPage=function(){return Ig.apply(this,arguments),this},f.setPage=function(){return Rg.apply(this,arguments),et.call(this,Ot[$]),this},f.insertPage=function(_){return this.addPage(),this.movePage($,_),this},f.movePage=function(_,U){var J,lt;if(_>U){J=Ot[_],lt=Oe[_];for(var Ct=_;Ct>U;Ct--)Ot[Ct]=Ot[Ct-1],Oe[Ct]=Oe[Ct-1];Ot[U]=J,Oe[U]=lt,this.setPage(U)}else if(_<U){J=Ot[_],lt=Oe[_];for(var It=_;It<U;It++)Ot[It]=Ot[It+1],Oe[It]=Oe[It+1];Ot[U]=J,Oe[U]=lt,this.setPage(U)}return this},f.deletePage=function(){return ew.apply(this,arguments),this},f.__private__.text=f.text=function(_,U,J,lt,Ct){var It,jt,re,Le,lr,Ve,Tr,zi,$n,si=(lt=lt||{}).scope||this;if(typeof _=="number"&&typeof U=="number"&&(typeof J=="string"||Array.isArray(J))){var oa=J;J=U,U=_,_=oa}if(arguments[3]instanceof Se?(T("The transform parameter of text() with a Matrix value"),$n=Ct):(re=arguments[4],Le=arguments[5],Jr(Tr=arguments[3])==="object"&&Tr!==null||(typeof re=="string"&&(Le=re,re=null),typeof Tr=="string"&&(Le=Tr,Tr=null),typeof Tr=="number"&&(re=Tr,Tr=null),lt={flags:Tr,angle:re,align:Le})),isNaN(U)||isNaN(J)||_==null)throw new Error("Invalid arguments passed to jsPDF.text");if(_.length===0)return si;var Ni="",ts=!1,co=typeof lt.lineHeightFactor=="number"?lt.lineHeightFactor:Gu,_A=si.internal.scaleFactor;function Vg(un){return un=un.split(" ").join(Array(lt.TabLen||9).join(" ")),$a(un,Tr)}function Vp(un){for(var hn,Vn=un.concat(),Ti=[],BA=Vn.length;BA--;)typeof(hn=Vn.shift())=="string"?Ti.push(hn):Array.isArray(un)&&(hn.length===1||hn[1]===void 0&&hn[2]===void 0)?Ti.push(hn[0]):Ti.push([hn[0],hn[1],hn[2]]);return Ti}function jp(un,hn){var Vn;if(typeof un=="string")Vn=hn(un)[0];else if(Array.isArray(un)){for(var Ti,BA,xl=un.concat(),Lc=[],Kg=xl.length;Kg--;)typeof(Ti=xl.shift())=="string"?Lc.push(hn(Ti)[0]):Array.isArray(Ti)&&typeof Ti[0]=="string"&&(BA=hn(Ti[0],Ti[1],Ti[2]),Lc.push([BA[0],BA[1],BA[2]]));Vn=Lc}return Vn}var wc=!1,Kp=!0;if(typeof _=="string")wc=!0;else if(Array.isArray(_)){var Yp=_.concat();jt=[];for(var Ec,Va=Yp.length;Va--;)(typeof(Ec=Yp.shift())!="string"||Array.isArray(Ec)&&typeof Ec[0]!="string")&&(Kp=!1);wc=Kp}if(wc===!1)throw new Error('Type of text must be string or Array. "'+_+'" is not recognized.');typeof _=="string"&&(_=_.match(/[\r?\n]/)?_.split(/\r\n|\r|\n/g):[_]);var Cc=Et/si.internal.scaleFactor,Bc=Cc*(co-1);switch(lt.baseline){case"bottom":J-=Bc;break;case"top":J+=Cc-Bc;break;case"hanging":J+=Cc-2*Bc;break;case"middle":J+=Cc/2-Bc}if((Ve=lt.maxWidth||0)>0&&(typeof _=="string"?_=si.splitTextToSize(_,Ve):Object.prototype.toString.call(_)==="[object Array]"&&(_=_.reduce(function(un,hn){return un.concat(si.splitTextToSize(hn,Ve))},[]))),It={text:_,x:U,y:J,options:lt,mutex:{pdfEscape:$a,activeFontKey:oe,fonts:be,activeFontSize:Et}},mr.publish("preProcessText",It),_=It.text,re=(lt=It.options).angle,!($n instanceof Se)&&re&&typeof re=="number"){re*=Math.PI/180,lt.rotationDirection===0&&(re=-re),C===w.ADVANCED&&(re=-re);var Tc=Math.cos(re),zp=Math.sin(re);$n=new Se(Tc,zp,-zp,Tc,0,0)}else re&&re instanceof Se&&($n=re);C!==w.ADVANCED||$n||($n=Mn),(lr=lt.charSpace||yc)!==void 0&&(Ni+=I(x(lr))+` Tc
|
||
`,this.setCharSpace(this.getCharSpace()||0)),(zi=lt.horizontalScale)!==void 0&&(Ni+=I(100*zi)+` Tz
|
||
`),lt.lang;var ja=-1,yw=lt.renderingMode!==void 0?lt.renderingMode:lt.stroke,Xp=si.internal.getCurrentPageInfo().pageContext;switch(yw){case 0:case!1:case"fill":ja=0;break;case 1:case!0:case"stroke":ja=1;break;case 2:case"fillThenStroke":ja=2;break;case 3:case"invisible":ja=3;break;case 4:case"fillAndAddForClipping":ja=4;break;case 5:case"strokeAndAddPathForClipping":ja=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":ja=6;break;case 7:case"addToPathForClipping":ja=7}var jg=Xp.usedRenderingMode!==void 0?Xp.usedRenderingMode:-1;ja!==-1?Ni+=ja+` Tr
|
||
`:jg!==-1&&(Ni+=`0 Tr
|
||
`),ja!==-1&&(Xp.usedRenderingMode=ja),Le=lt.align||"left";var es,Wp=Et*co,mw=si.internal.pageSize.getWidth(),_w=be[oe];lr=lt.charSpace||yc,Ve=lt.maxWidth||0,Tr=Object.assign({autoencode:!0,noBOM:!0},lt.flags);var El=[];if(Object.prototype.toString.call(_)==="[object Array]"){var Fo;jt=Vp(_),Le!=="left"&&(es=jt.map(function(un){return si.getStringUnitWidth(un,{font:_w,charSpace:lr,fontSize:Et,doKerning:!1})*Et/_A}));var rs,Cl=0;if(Le==="right"){U-=es[0],_=[],Va=jt.length;for(var Os=0;Os<Va;Os++)Os===0?(rs=mA(U),Fo=ml(J)):(rs=x(Cl-es[Os]),Fo=-Wp),_.push([jt[Os],rs,Fo]),Cl=es[Os]}else if(Le==="center"){U-=es[0]/2,_=[],Va=jt.length;for(var wA=0;wA<Va;wA++)wA===0?(rs=mA(U),Fo=ml(J)):(rs=x((Cl-es[wA])/2),Fo=-Wp),_.push([jt[wA],rs,Fo]),Cl=es[wA]}else if(Le==="left"){_=[],Va=jt.length;for(var xc=0;xc<Va;xc++)_.push(jt[xc])}else{if(Le!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');_=[],Va=jt.length,Ve=Ve!==0?Ve:mw;for(var ns=0;ns<Va;ns++)Fo=ns===0?ml(J):-Wp,rs=ns===0?mA(U):0,ns<Va-1?El.push(I(x((Ve-es[ns])/(jt[ns].split(" ").length-1)))):El.push(0),_.push([jt[ns],rs,Fo])}}var Sc=typeof lt.R2L=="boolean"?lt.R2L:Lt;Sc===!0&&(_=jp(_,function(un,hn,Vn){return[un.split("").reverse().join(""),hn,Vn]})),It={text:_,x:U,y:J,options:lt,mutex:{pdfEscape:$a,activeFontKey:oe,fonts:be,activeFontSize:Et}},mr.publish("postProcessText",It),_=It.text,ts=It.mutex.isHex||!1;var qp=be[oe].encoding;qp!=="WinAnsiEncoding"&&qp!=="StandardEncoding"||(_=jp(_,function(un,hn,Vn){return[Vg(un),hn,Vn]})),jt=Vp(_),_=[];for(var Bl,is,EA,Vu=0,bc=1,ju=Array.isArray(jt[0])?bc:Vu,Tl="",Zp=function(un,hn,Vn){var Ti="";return Vn instanceof Se?(Vn=typeof lt.angle=="number"?oi(Vn,new Se(1,0,0,1,un,hn)):oi(new Se(1,0,0,1,un,hn),Vn),C===w.ADVANCED&&(Vn=oi(new Se(1,0,0,-1,0,0),Vn)),Ti=Vn.join(" ")+` Tm
|
||
`):Ti=I(un)+" "+I(hn)+` Td
|
||
`,Ti},Io=0;Io<jt.length;Io++){switch(Tl="",ju){case bc:EA=(ts?"<":"(")+jt[Io][0]+(ts?">":")"),Bl=parseFloat(jt[Io][1]),is=parseFloat(jt[Io][2]);break;case Vu:EA=(ts?"<":"(")+jt[Io]+(ts?">":")"),Bl=mA(U),is=ml(J)}El!==void 0&&El[Io]!==void 0&&(Tl=El[Io]+` Tw
|
||
`),Io===0?_.push(Tl+Zp(Bl,is,$n)+EA):ju===Vu?_.push(Tl+EA):ju===bc&&_.push(Tl+Zp(Bl,is,$n)+EA)}_=ju===Vu?_.join(` Tj
|
||
T* `):_.join(` Tj
|
||
`),_+=` Tj
|
||
`;var CA=`BT
|
||
/`;return CA+=oe+" "+Et+` Tf
|
||
`,CA+=I(Et*co)+` TL
|
||
`,CA+=ku+`
|
||
`,CA+=Ni,CA+=_,G(CA+="ET"),c[oe]=!0,si};var lw=f.__private__.clip=f.clip=function(_){return G(_==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return lw("evenodd")},f.__private__.discardPath=f.discardPath=function(){return G("n"),this};var Rs=f.__private__.isValidStyle=function(_){var U=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(_)!==-1&&(U=!0),U};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(_){return Rs(_)&&(l=_),this};var Ng=f.__private__.getStyle=f.getStyle=function(_){var U=l;switch(_){case"D":case"S":U="S";break;case"F":U="f";break;case"FD":case"DF":U="B";break;case"f":case"f*":case"B":case"B*":U=_}return U},Ug=f.close=function(){return G("h"),this};f.stroke=function(){return G("S"),this},f.fill=function(_){return vc("f",_),this},f.fillEvenOdd=function(_){return vc("f*",_),this},f.fillStroke=function(_){return vc("B",_),this},f.fillStrokeEvenOdd=function(_){return vc("B*",_),this};var vc=function(_,U){Jr(U)==="object"?hw(U,_):G(_)},Mp=function(_){_===null||C===w.ADVANCED&&_===void 0||(_=Ng(_),G(_))};function uw(_,U,J,lt,Ct){var It=new _f(U||this.boundingBox,J||this.xStep,lt||this.yStep,this.gState,Ct||this.matrix);It.stream=this.stream;var jt=_+"$$"+this.cloneIndex+++"$$";return Ci(jt,It),It}var hw=function(_,U){var J=_i[_.key],lt=ar[J];if(lt instanceof fh)G("q"),G(cw(U)),lt.gState&&f.setGState(lt.gState),G(_.matrix.toString()+" cm"),G("/"+J+" sh"),G("Q");else if(lt instanceof _f){var Ct=new Se(1,0,0,-1,0,wl());_.matrix&&(Ct=Ct.multiply(_.matrix||Mn),J=uw.call(lt,_.key,_.boundingBox,_.xStep,_.yStep,Ct).id),G("q"),G("/Pattern cs"),G("/"+J+" scn"),lt.gState&&f.setGState(lt.gState),G(U),G("Q")}},cw=function(_){switch(_){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Pp=f.moveTo=function(_,U){return G(I(x(_))+" "+I(D(U))+" m"),this},Hu=f.lineTo=function(_,U){return G(I(x(_))+" "+I(D(U))+" l"),this},yl=f.curveTo=function(_,U,J,lt,Ct,It){return G([I(x(_)),I(D(U)),I(x(J)),I(D(lt)),I(x(Ct)),I(D(It)),"c"].join(" ")),this};f.__private__.line=f.line=function(_,U,J,lt,Ct){if(isNaN(_)||isNaN(U)||isNaN(J)||isNaN(lt)||!Rs(Ct))throw new Error("Invalid arguments passed to jsPDF.line");return C===w.COMPAT?this.lines([[J-_,lt-U]],_,U,[1,1],Ct||"S"):this.lines([[J-_,lt-U]],_,U,[1,1]).stroke()},f.__private__.lines=f.lines=function(_,U,J,lt,Ct,It){var jt,re,Le,lr,Ve,Tr,zi,$n,si,oa,Ni,ts;if(typeof _=="number"&&(ts=J,J=U,U=_,_=ts),lt=lt||[1,1],It=It||!1,isNaN(U)||isNaN(J)||!Array.isArray(_)||!Array.isArray(lt)||!Rs(Ct)||typeof It!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Pp(U,J),jt=lt[0],re=lt[1],lr=_.length,oa=U,Ni=J,Le=0;Le<lr;Le++)(Ve=_[Le]).length===2?(oa=Ve[0]*jt+oa,Ni=Ve[1]*re+Ni,Hu(oa,Ni)):(Tr=Ve[0]*jt+oa,zi=Ve[1]*re+Ni,$n=Ve[2]*jt+oa,si=Ve[3]*re+Ni,oa=Ve[4]*jt+oa,Ni=Ve[5]*re+Ni,yl(Tr,zi,$n,si,oa,Ni));return It&&Ug(),Mp(Ct),this},f.path=function(_){for(var U=0;U<_.length;U++){var J=_[U],lt=J.c;switch(J.op){case"m":Pp(lt[0],lt[1]);break;case"l":Hu(lt[0],lt[1]);break;case"c":yl.apply(this,lt);break;case"h":Ug()}}return this},f.__private__.rect=f.rect=function(_,U,J,lt,Ct){if(isNaN(_)||isNaN(U)||isNaN(J)||isNaN(lt)||!Rs(Ct))throw new Error("Invalid arguments passed to jsPDF.rect");return C===w.COMPAT&&(lt=-lt),G([I(x(_)),I(D(U)),I(x(J)),I(x(lt)),"re"].join(" ")),Mp(Ct),this},f.__private__.triangle=f.triangle=function(_,U,J,lt,Ct,It,jt){if(isNaN(_)||isNaN(U)||isNaN(J)||isNaN(lt)||isNaN(Ct)||isNaN(It)||!Rs(jt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[J-_,lt-U],[Ct-J,It-lt],[_-Ct,U-It]],_,U,[1,1],jt,!0),this},f.__private__.roundedRect=f.roundedRect=function(_,U,J,lt,Ct,It,jt){if(isNaN(_)||isNaN(U)||isNaN(J)||isNaN(lt)||isNaN(Ct)||isNaN(It)||!Rs(jt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var re=4/3*(Math.SQRT2-1);return Ct=Math.min(Ct,.5*J),It=Math.min(It,.5*lt),this.lines([[J-2*Ct,0],[Ct*re,0,Ct,It-It*re,Ct,It],[0,lt-2*It],[0,It*re,-Ct*re,It,-Ct,It],[2*Ct-J,0],[-Ct*re,0,-Ct,-It*re,-Ct,-It],[0,2*It-lt],[0,-It*re,Ct*re,-It,Ct,-It]],_+Ct,U,[1,1],jt,!0),this},f.__private__.ellipse=f.ellipse=function(_,U,J,lt,Ct){if(isNaN(_)||isNaN(U)||isNaN(J)||isNaN(lt)||!Rs(Ct))throw new Error("Invalid arguments passed to jsPDF.ellipse");var It=4/3*(Math.SQRT2-1)*J,jt=4/3*(Math.SQRT2-1)*lt;return Pp(_+J,U),yl(_+J,U-jt,_+It,U-lt,_,U-lt),yl(_-It,U-lt,_-J,U-jt,_-J,U),yl(_-J,U+jt,_-It,U+lt,_,U+lt),yl(_+It,U+lt,_+J,U+jt,_+J,U),Mp(Ct),this},f.__private__.circle=f.circle=function(_,U,J,lt){if(isNaN(_)||isNaN(U)||isNaN(J)||!Rs(lt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(_,U,J,J,lt)},f.setFont=function(_,U,J){return J&&(U=O(U,J)),oe=Og(_,U,{disableWarning:!1}),this};var fw=f.__private__.getFont=f.getFont=function(){return be[Og.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var _,U,J={};for(_ in xe)if(xe.hasOwnProperty(_))for(U in J[_]=[],xe[_])xe[_].hasOwnProperty(U)&&J[_].push(U);return J},f.addFont=function(_,U,J,lt,Ct){var It=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&It.indexOf(arguments[3])!==-1?Ct=arguments[3]:arguments[3]&&It.indexOf(arguments[3])==-1&&(J=O(J,lt)),Ct=Ct||"Identity-H",Ip.call(this,_,U,J,Ct)};var Gu,Np=r.lineWidth||.200025,gc=f.__private__.getLineWidth=f.getLineWidth=function(){return Np},Dg=f.__private__.setLineWidth=f.setLineWidth=function(_){return Np=_,G(I(x(_))+" w"),this};f.__private__.setLineDash=Ne.API.setLineDash=Ne.API.setLineDashPattern=function(_,U){if(_=_||[],U=U||0,isNaN(U)||!Array.isArray(_))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return _=_.map(function(J){return I(x(J))}).join(" "),U=I(x(U)),G("["+_+"] "+U+" d"),this};var Qg=f.__private__.getLineHeight=f.getLineHeight=function(){return Et*Gu};f.__private__.getLineHeight=f.getLineHeight=function(){return Et*Gu};var Hg=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(_){return typeof(_=_||1.15)=="number"&&(Gu=_),this},Gg=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return Gu};Hg(r.lineHeight);var mA=f.__private__.getHorizontalCoordinate=function(_){return x(_)},ml=f.__private__.getVerticalCoordinate=function(_){return C===w.ADVANCED?_:Oe[$].mediaBox.topRightY-Oe[$].mediaBox.bottomLeftY-x(_)},pw=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(_){return I(mA(_))},_l=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(_){return I(ml(_))},Jo=r.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return Qt(Jo)},f.__private__.setStrokeColor=f.setDrawColor=function(_,U,J,lt){return Jo=qt({ch1:_,ch2:U,ch3:J,ch4:lt,pdfColorType:"draw",precision:2}),G(Jo),this};var Up=r.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return Qt(Up)},f.__private__.setFillColor=f.setFillColor=function(_,U,J,lt){return Up=qt({ch1:_,ch2:U,ch3:J,ch4:lt,pdfColorType:"fill",precision:2}),G(Up),this};var ku=r.textColor||"0 g",dw=f.__private__.getTextColor=f.getTextColor=function(){return Qt(ku)};f.__private__.setTextColor=f.setTextColor=function(_,U,J,lt){return ku=qt({ch1:_,ch2:U,ch3:J,ch4:lt,pdfColorType:"text",precision:3}),this};var yc=r.charSpace,vw=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(yc||0)};f.__private__.setCharSpace=f.setCharSpace=function(_){if(isNaN(_))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return yc=_,this};var Dp=0;f.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},f.__private__.setLineCap=f.setLineCap=function(_){var U=f.CapJoinStyles[_];if(U===void 0)throw new Error("Line cap style of '"+_+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Dp=U,G(U+" J"),this};var Qp=0;f.__private__.setLineJoin=f.setLineJoin=function(_){var U=f.CapJoinStyles[_];if(U===void 0)throw new Error("Line join style of '"+_+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qp=U,G(U+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(_){if(_=_||0,isNaN(_))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return G(I(x(_))+" M"),this},f.GState=Hm,f.setGState=function(_){(_=typeof _=="string"?Br[ai[_]]:kg(null,_)).equals($r)||(G("/"+_.id+" gs"),$r=_)};var kg=function(_,U){if(!_||!ai[_]){var J=!1;for(var lt in Br)if(Br.hasOwnProperty(lt)&&Br[lt].equals(U)){J=!0;break}if(J)U=Br[lt];else{var Ct="GS"+(Object.keys(Br).length+1).toString(10);Br[Ct]=U,U.id=Ct}return _&&(ai[_]=U.id),mr.publish("addGState",U),U}};f.addGState=function(_,U){return kg(_,U),this},f.saveGraphicsState=function(){return G("q"),nn.push({key:oe,size:Et,color:ku}),this},f.restoreGraphicsState=function(){G("Q");var _=nn.pop();return oe=_.key,Et=_.size,ku=_.color,$r=null,this},f.setCurrentTransformationMatrix=function(_){return G(_.toString()+" cm"),this},f.comment=function(_){return G("#"+_),this};var mc=function(_,U){var J=_||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return J},set:function(It){isNaN(It)||(J=parseFloat(It))}});var lt=U||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return lt},set:function(It){isNaN(It)||(lt=parseFloat(It))}});var Ct="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Ct},set:function(It){Ct=It.toString()}}),this},Hp=function(_,U,J,lt){mc.call(this,_,U),this.type="rect";var Ct=J||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Ct},set:function(jt){isNaN(jt)||(Ct=parseFloat(jt))}});var It=lt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return It},set:function(jt){isNaN(jt)||(It=parseFloat(jt))}}),this},Gp=function(){this.page=Vr,this.currentPage=$,this.pages=Ot.slice(0),this.pagesContext=Oe.slice(0),this.x=Ye,this.y=Re,this.matrix=fr,this.width=$u($),this.height=wl($),this.outputDestination=Z,this.id="",this.objectNumber=-1};Gp.prototype.restore=function(){Vr=this.page,$=this.currentPage,Oe=this.pagesContext,Ot=this.pages,Ye=this.x,Re=this.y,fr=this.matrix,kp($,this.width),$p($,this.height),Z=this.outputDestination};var $g=function(_,U,J,lt,Ct){Ei.push(new Gp),Vr=$=0,Ot=[],Ye=_,Re=U,fr=Ct,Rp([J,lt])},gw=function(_){if(wi[_])Ei.pop().restore();else{var U=new Gp,J="Xo"+(Object.keys(ln).length+1).toString(10);U.id=J,wi[_]=J,ln[J]=U,mr.publish("addFormObject",U),Ei.pop().restore()}};for(var _c in f.beginFormObject=function(_,U,J,lt,Ct){return $g(_,U,J,lt,Ct),this},f.endFormObject=function(_){return gw(_),this},f.doFormObject=function(_,U){var J=ln[wi[_]];return G("q"),G(U.toString()+" cm"),G("/"+J.id+" Do"),G("Q"),this},f.getFormObject=function(_){var U=ln[wi[_]];return{x:U.x,y:U.y,width:U.width,height:U.height,matrix:U.matrix}},f.save=function(_,U){return _=_||"generated.pdf",(U=U||{}).returnPromise=U.returnPromise||!1,U.returnPromise===!1?(Ah(pc(yA()),_),typeof Ah.unload=="function"&&Qe.setTimeout&&setTimeout(Ah.unload,911),this):new Promise(function(J,lt){try{var Ct=Ah(pc(yA()),_);typeof Ah.unload=="function"&&Qe.setTimeout&&setTimeout(Ah.unload,911),J(Ct)}catch(It){lt(It.message)}})},Ne.API)Ne.API.hasOwnProperty(_c)&&(_c==="events"&&Ne.API.events.length?function(_,U){var J,lt,Ct;for(Ct=U.length-1;Ct!==-1;Ct--)J=U[Ct][0],lt=U[Ct][1],_.subscribe.apply(_,[J].concat(typeof lt=="function"?[lt]:lt))}(mr,Ne.API.events):f[_c]=Ne.API[_c]);var $u=f.getPageWidth=function(_){return(Oe[_=_||$].mediaBox.topRightX-Oe[_].mediaBox.bottomLeftX)/Kt},kp=f.setPageWidth=function(_,U){Oe[_].mediaBox.topRightX=U*Kt+Oe[_].mediaBox.bottomLeftX},wl=f.getPageHeight=function(_){return(Oe[_=_||$].mediaBox.topRightY-Oe[_].mediaBox.bottomLeftY)/Kt},$p=f.setPageHeight=function(_,U){Oe[_].mediaBox.topRightY=U*Kt+Oe[_].mediaBox.bottomLeftY};return f.internal={pdfEscape:$a,getStyle:Ng,getFont:fw,getFontSize:xt,getCharSpace:vw,getTextColor:dw,getLineHeight:Qg,getLineHeightFactor:Gg,getLineWidth:gc,write:bt,getHorizontalCoordinate:mA,getVerticalCoordinate:ml,getCoordinateString:pw,getVerticalCoordinateString:_l,collections:{},newObject:tn,newAdditionalObject:ho,newObjectDeferred:Wr,newObjectDeferredBegin:yn,getFilters:Ze,putStream:Ir,events:mr,scaleFactor:Kt,pageSize:{getWidth:function(){return $u($)},setWidth:function(_){kp($,_)},getHeight:function(){return wl($)},setHeight:function(_){$p($,_)}},encryptionOptions:u,encryption:aa,getEncryptor:sw,output:dc,getNumberOfPages:rw,pages:Ot,out:G,f2:P,f3:S,getPageInfo:Pg,getPageInfoByObjId:$e,getCurrentPageInfo:Aw,getPDFVersion:v,Point:mc,Rectangle:Hp,Matrix:Se,hasHotfix:Mg},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return $u($)},set:function(_){kp($,_)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return wl($)},set:function(_){$p($,_)},enumerable:!0,configurable:!0}),tw.call(f,dt),oe="F1",Ig(i,t),mr.publish("initialized"),f}of.prototype.lsbFirstWord=function(r){return String.fromCharCode(r>>0&255,r>>8&255,r>>16&255,r>>24&255)},of.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},of.prototype.hexToBytes=function(r){for(var e=[],t=0;t<r.length;t+=2)e.push(String.fromCharCode(parseInt(r.substr(t,2),16)));return e.join("")},of.prototype.processOwnerPassword=function(r,e){return yT(gT(e).substr(0,5),r)},of.prototype.encryptor=function(r,e){var t=gT(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return yT(t,n)}},Hm.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||Jr(r)!==Jr(this))return!1;var n=0;for(e in this)if(!(t.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!r.hasOwnProperty(e)||this[e]!==r[e])return!1;n++}for(e in r)r.hasOwnProperty(e)&&t.indexOf(e)<0&&n--;return n===0},Ne.API={events:[]},Ne.version="2.5.0";var Nn=Ne.API,Gb=1,ic=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Qc=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},je=function(r){return r.toFixed(2)},Gl=function(r){return r.toFixed(5)};Nn.__acroform__={};var lo=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},rO=function(r){return r*Gb},Hs=function(r){var e=new i6,t=ve.internal.getHeight(r)||0,n=ve.internal.getWidth(r)||0;return e.BBox=[0,0,Number(je(n)),Number(je(t))],e},zrt=Nn.__acroform__.setBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return r|=1<<e},Xrt=Nn.__acroform__.clearBit=function(r,e){if(r=r||0,e=e||0,isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return r&=~(1<<e)},Wrt=Nn.__acroform__.getBit=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return r&1<<e?1:0},Xn=Nn.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Wrt(r,e-1)},Wn=Nn.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return zrt(r,e-1)},qn=Nn.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Xrt(r,e-1)},qrt=Nn.__acroform__.calculateCoordinates=function(r,e){var t=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,i=r[0],a=r[1],o=r[2],s=r[3],A={};return A.lowerLeft_X=t(i)||0,A.lowerLeft_Y=n(a+s)||0,A.upperRight_X=t(i+o)||0,A.upperRight_Y=n(a)||0,[Number(je(A.lowerLeft_X)),Number(je(A.lowerLeft_Y)),Number(je(A.upperRight_X)),Number(je(A.upperRight_Y))]},Zrt=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,n=mT(r,t),i=r.scope.internal.getFont(r.fontName,r.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(r.scope.__private__.encodeColorString(r.color)),e.push("/"+i+" "+je(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var a=Hs(r);return a.scope=r.scope,a.stream=e.join(`
|
||
`),a}},mT=function(r,e){var t=r.fontSize===0?r.maxFontSize:r.fontSize,n={text:"",fontSize:""},i=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");i=r.multiline?i.map(function(S){return S.split(`
|
||
`)}):i.map(function(S){return[S]});var a=t,o=ve.internal.getHeight(r)||0;o=o<0?-o:o;var s=ve.internal.getWidth(r)||0;s=s<0?-s:s;var A=function(S,x,M){if(S+1<i.length){var D=x+" "+i[S+1][0];return Ny(D,r,M).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var l,u,h=Ny("3",r,a).height,c=r.multiline?o-a:(o-h)/2,f=c+=2,d=0,v=0,y=0;if(a<=0){e=`(...) Tj
|
||
`,e+="% Width of Text: "+Ny(e,r,a=12).width+", FieldWidth:"+s+`
|
||
`;break}for(var m="",w=0,C=0;C<i.length;C++)if(i.hasOwnProperty(C)){var B=!1;if(i[C].length!==1&&y!==i[C].length-1){if((h+2)*(w+2)+2>o)continue t;m+=i[C][y],B=!0,v=C,C--}else{m=(m+=i[C][y]+" ").substr(m.length-1)==" "?m.substr(0,m.length-1):m;var R=parseInt(C),O=A(R,m,a),I=C>=i.length-1;if(O&&!I){m+=" ",y=0;continue}if(O||I){if(I)v=R;else if(r.multiline&&(h+2)*(w+2)+2>o)continue t}else{if(!r.multiline||(h+2)*(w+2)+2>o)continue t;v=R}}for(var T="",L=d;L<=v;L++){var P=i[L];if(r.multiline){if(L===v){T+=P[y]+" ",y=(y+1)%P.length;continue}if(L===d){T+=P[P.length-1]+" ";continue}}T+=P[0]+" "}switch(T=T.substr(T.length-1)==" "?T.substr(0,T.length-1):T,u=Ny(T,r,a).width,r.textAlign){case"right":l=s-u-2;break;case"center":l=(s-u)/2;break;case"left":default:l=2}e+=je(l)+" "+je(f)+` Td
|
||
`,e+="("+ic(T)+`) Tj
|
||
`,e+=-je(l)+` 0 Td
|
||
`,f=-(a+2),u=0,d=B?v:v+1,w++,m=""}break}return n.text=e,n.fontSize=a,n},Ny=function(r,e,t){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(r,{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(t),charSpace:0})*parseFloat(t)*1.5,width:i}},Jrt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},tnt=function(r,e){var t={type:"reference",object:r};e.internal.getPageInfo(r.page).pageContext.annotations.find(function(n){return n.type===t.type&&n.object===t.object})===void 0&&e.internal.getPageInfo(r.page).pageContext.annotations.push(t)},ent=function(r,e){for(var t in r)if(r.hasOwnProperty(t)){var n=t,i=r[t];e.internal.newObjectDeferredBegin(i.objId,!0),Jr(i)==="object"&&typeof i.putStream=="function"&&i.putStream(),delete r[n]}},rnt=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Ls.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(Jrt)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");Gb=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new a6,r.internal.acroformPlugin.acroFormDictionaryRoot.scope=r,r.internal.acroformPlugin.acroFormDictionaryRoot._eventID=r.internal.events.subscribe("postPutResources",function(){(function(t){t.internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})(r)}),r.internal.events.subscribe("buildDocument",function(){(function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i];a.objId=void 0,a.hasAnnotation&&tnt(a,t)}})(r)}),r.internal.events.subscribe("putCatalog",function(){(function(t){if(t.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(r)}),r.internal.events.subscribe("postPutPages",function(t){(function(n,i){var a=!n;for(var o in n||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),n=n||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(n.hasOwnProperty(o)){var s=n[o],A=[],l=s.Rect;if(s.Rect&&(s.Rect=qrt(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=ve.createDefaultAppearanceStream(s),Jr(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(A=s.getKeyValueListForStream()),s.Rect=l,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=Zrt(s);A.push({key:"AP",value:"<</N "+u+">>"}),i.internal.acroformPlugin.xForms.push(u)}if(s.appearanceStreamContent){var h="";for(var c in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(c)){var f=s.appearanceStreamContent[c];if(h+="/"+c+" ",h+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var o in f)if(f.hasOwnProperty(o)){var d=f[o];typeof d=="function"&&(d=d.call(i,s)),h+="/"+o+" "+d+" ",i.internal.acroformPlugin.xForms.indexOf(d)>=0||i.internal.acroformPlugin.xForms.push(d)}}else typeof(d=f)=="function"&&(d=d.call(i,s)),h+="/"+o+" "+d,i.internal.acroformPlugin.xForms.indexOf(d)>=0||i.internal.acroformPlugin.xForms.push(d);h+=">>"}A.push({key:"AP",value:`<<
|
||
`+h+">>"})}i.internal.putStream({additionalKeyValues:A,objectId:s.objId}),i.internal.out("endobj")}a&&ent(i.internal.acroformPlugin.xForms,i)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},n6=Nn.__acroform__.arrayToPdfArray=function(r,e,t){var n=function(o){return o};if(Array.isArray(r)){for(var i="[",a=0;a<r.length;a++)switch(a!==0&&(i+=" "),Jr(r[a])){case"boolean":case"number":case"object":i+=r[a].toString();break;case"string":r[a].substr(0,1)!=="/"?(e!==void 0&&t&&(n=t.internal.getEncryptor(e)),i+="("+ic(n(r[a].toString()))+")"):i+=r[a].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},xE=function(r,e,t){var n=function(i){return i};return e!==void 0&&t&&(n=t.internal.getEncryptor(e)),(r=r||"").toString(),r="("+ic(n(r))+")"},Ws=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(r){this._objId=r}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Ws.prototype.toString=function(){return this.objId+" 0 R"},Ws.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},Ws.prototype.getKeyValueListForStream=function(){var r=[],e=Object.getOwnPropertyNames(this).filter(function(a){return a!="content"&&a!="appearanceStreamContent"&&a!="scope"&&a!="objId"&&a.substring(0,1)!="_"});for(var t in e)if(Object.getOwnPropertyDescriptor(this,e[t]).configurable===!1){var n=e[t],i=this[n];i&&(Array.isArray(i)?r.push({key:n,value:n6(i,this.objId,this.scope)}):i instanceof Ws?(i.scope=this.scope,r.push({key:n,value:i.objId+" 0 R"})):typeof i!="function"&&r.push({key:n,value:i}))}return r};var i6=function(){Ws.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var r,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){r=t.trim()},get:function(){return r||null}})};lo(i6,Ws);var a6=function(){Ws.call(this);var r,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(r){var t=function(n){return n};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+ic(t(r))+")"}},set:function(t){r=t}})};lo(a6,Ws);var Ls=function r(){Ws.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute F supplied.');e=m}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(e,3))},set:function(m){Boolean(m)===!0?this.F=Wn(e,3):this.F=qn(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(m){if(isNaN(m))throw new Error('Invalid value "'+m+'" for attribute Ff supplied.');t=m}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(m){n=m!==void 0?m:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(m){n[0]=m}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(m){n[1]=m}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(m){n[2]=m}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(m){n[3]=m}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(m){switch(m){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=m;break;default:throw new Error('Invalid value "'+m+'" for attribute FT supplied.')}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof Gm)return;a="FieldObject"+r.FieldNum++}var m=function(w){return w};return this.scope&&(m=this.scope.internal.getEncryptor(this.objId)),"("+ic(m(a))+")"},set:function(m){a=m.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(m){a=m}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(m){o=m}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(m){s=m}});var A=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return A},set:function(m){A=m}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/Gb:l},set:function(m){l=m}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(m){u=m}});var h="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!h||this instanceof Gm||this instanceof Lh))return xE(h,this.objId,this.scope)},set:function(m){m=m.toString(),h=m}});var c=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(c)return this instanceof $i?c:xE(c,this.objId,this.scope)},set:function(m){m=m.toString(),c=this instanceof $i?m:m.substr(0,1)==="("?Qc(m.substr(1,m.length-2)):Qc(m)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof $i?Qc(c.substr(1,c.length-1)):c},set:function(m){m=m.toString(),c=this instanceof $i?"/"+m:m}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(m){this.V=m}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof $i?f:xE(f,this.objId,this.scope)},set:function(m){m=m.toString(),f=this instanceof $i?m:m.substr(0,1)==="("?Qc(m.substr(1,m.length-2)):Qc(m)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof $i?Qc(f.substr(1,f.length-1)):f},set:function(m){m=m.toString(),f=this instanceof $i?"/"+m:m}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var d,v=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return v},set:function(m){m=Boolean(m),v=m}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(d)return d},set:function(m){d=m}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,1))},set:function(m){Boolean(m)===!0?this.Ff=Wn(this.Ff,1):this.Ff=qn(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,2))},set:function(m){Boolean(m)===!0?this.Ff=Wn(this.Ff,2):this.Ff=qn(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,3))},set:function(m){Boolean(m)===!0?this.Ff=Wn(this.Ff,3):this.Ff=qn(this.Ff,3)}});var y=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(y!==null)return y},set:function(m){if([0,1,2].indexOf(m)===-1)throw new Error('Invalid value "'+m+'" for attribute Q supplied.');y=m}}),Object.defineProperty(this,"textAlign",{get:function(){var m;switch(y){case 0:default:m="left";break;case 1:m="center";break;case 2:m="right"}return m},configurable:!0,enumerable:!0,set:function(m){switch(m){case"right":case 2:y=2;break;case"center":case 1:y=1;break;case"left":case 0:default:y=0}}})};lo(Ls,Ws);var If=function(){Ls.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var r=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return r},set:function(t){r=t}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return n6(e,this.objId,this.scope)},set:function(t){var n,i;i=[],typeof(n=t)=="string"&&(i=function(a,o,s){s||(s=1);for(var A,l=[];A=o.exec(a);)l.push(A[s]);return l}(n,/\((.*?)\)/g)),e=i}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,n){for(n=n||!1,t=(t=t||"").toString();e.indexOf(t)!==-1&&(e.splice(e.indexOf(t),1),n!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,18))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,18):this.Ff=qn(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,19))},set:function(t){this.combo===!0&&(Boolean(t)===!0?this.Ff=Wn(this.Ff,19):this.Ff=qn(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,20))},set:function(t){Boolean(t)===!0?(this.Ff=Wn(this.Ff,20),e.sort()):this.Ff=qn(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,22))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,22):this.Ff=qn(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,23))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,23):this.Ff=qn(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,27))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,27):this.Ff=qn(this.Ff,27)}}),this.hasAppearanceStream=!1};lo(If,Ls);var Rf=function(){If.call(this),this.fontName="helvetica",this.combo=!1};lo(Rf,If);var Of=function(){Rf.call(this),this.combo=!0};lo(Of,Rf);var G0=function(){Of.call(this),this.edit=!0};lo(G0,Of);var $i=function(){Ls.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,15))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,15):this.Ff=qn(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,16))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,16):this.Ff=qn(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,17))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,17):this.Ff=qn(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,26))},set:function(t){Boolean(t)===!0?this.Ff=Wn(this.Ff,26):this.Ff=qn(this.Ff,26)}});var r,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(a){return a};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var n,i=[];for(n in i.push("<<"),e)i.push("/"+n+" ("+ic(t(e[n]))+")");return i.push(">>"),i.join(`
|
||
`)}},set:function(t){Jr(t)==="object"&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){typeof t=="string"&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return r},set:function(t){r=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return r.substr(1,r.length-1)},set:function(t){r="/"+t}})};lo($i,Ls);var k0=function(){$i.call(this),this.pushButton=!0};lo(k0,$i);var Mf=function(){$i.call(this),this.radio=!0,this.pushButton=!1;var r=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e!==void 0?e:[]}})};lo(Mf,$i);var Gm=function(){var r,e;Ls.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return r},set:function(i){r=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(i){e=i}});var t,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(s){return s};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var a,o=[];for(a in o.push("<<"),n)o.push("/"+a+" ("+ic(i(n[a]))+")");return o.push(">>"),o.join(`
|
||
`)},set:function(i){Jr(i)==="object"&&(n=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(i){typeof i=="string"&&(n.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){t=i}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(i){t="/"+i}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=ve.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};lo(Gm,Ls),Mf.prototype.setAppearance=function(r){if(!("createAppearanceStream"in r)||!("getCA"in r))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var t=this.Kids[e];t.appearanceStreamContent=r.createAppearanceStream(t.optionName),t.caption=r.getCA()}},Mf.prototype.createOption=function(r){var e=new Gm;return e.Parent=this,e.optionName=r,this.Kids.push(e),nnt.call(this.scope,e),e};var $0=function(){$i.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=ve.CheckBox.createAppearanceStream()};lo($0,$i);var Lh=function(){Ls.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,13))},set:function(e){Boolean(e)===!0?this.Ff=Wn(this.Ff,13):this.Ff=qn(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,21))},set:function(e){Boolean(e)===!0?this.Ff=Wn(this.Ff,21):this.Ff=qn(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,23))},set:function(e){Boolean(e)===!0?this.Ff=Wn(this.Ff,23):this.Ff=qn(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,24))},set:function(e){Boolean(e)===!0?this.Ff=Wn(this.Ff,24):this.Ff=qn(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,25))},set:function(e){Boolean(e)===!0?this.Ff=Wn(this.Ff,25):this.Ff=qn(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,26))},set:function(e){Boolean(e)===!0?this.Ff=Wn(this.Ff,26):this.Ff=qn(this.Ff,26)}});var r=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){r=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return r},set:function(e){Number.isInteger(e)&&(r=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};lo(Lh,Ls);var V0=function(){Lh.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(Xn(this.Ff,14))},set:function(r){Boolean(r)===!0?this.Ff=Wn(this.Ff,14):this.Ff=qn(this.Ff,14)}}),this.password=!0};lo(V0,Lh);var ve={CheckBox:{createAppearanceStream:function(){return{N:{On:ve.CheckBox.YesNormal},D:{On:ve.CheckBox.YesPushDown,Off:ve.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=Hs(r);e.scope=r.scope;var t=[],n=r.scope.internal.getFont(r.fontName,r.fontStyle).id,i=r.scope.__private__.encodeColorString(r.color),a=mT(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+je(ve.internal.getWidth(r))+" "+je(ve.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+je(a.fontSize)+" Tf "+i),t.push("BT"),t.push(a.text),t.push("ET"),t.push("Q"),t.push("EMC"),e.stream=t.join(`
|
||
`),e},YesNormal:function(r){var e=Hs(r);e.scope=r.scope;var t=r.scope.internal.getFont(r.fontName,r.fontStyle).id,n=r.scope.__private__.encodeColorString(r.color),i=[],a=ve.internal.getHeight(r),o=ve.internal.getWidth(r),s=mT(r,r.caption);return i.push("1 g"),i.push("0 0 "+je(o)+" "+je(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+je(o-1)+" "+je(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+je(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
|
||
`),e},OffPushDown:function(r){var e=Hs(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+je(ve.internal.getWidth(r))+" "+je(ve.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
|
||
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:ve.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=ve.RadioButton.Circle.YesNormal,e.D[r]=ve.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=Hs(r);e.scope=r.scope;var t=[],n=ve.internal.getWidth(r)<=ve.internal.getHeight(r)?ve.internal.getWidth(r)/4:ve.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=ve.internal.Bezier_C,a=Number((n*i).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+Gl(ve.internal.getWidth(r)/2)+" "+Gl(ve.internal.getHeight(r)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+a+" "+a+" "+n+" 0 "+n+" c"),t.push("-"+a+" "+n+" -"+n+" "+a+" -"+n+" 0 c"),t.push("-"+n+" -"+a+" -"+a+" -"+n+" 0 -"+n+" c"),t.push(a+" -"+n+" "+n+" -"+a+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
||
`),e},YesPushDown:function(r){var e=Hs(r);e.scope=r.scope;var t=[],n=ve.internal.getWidth(r)<=ve.internal.getHeight(r)?ve.internal.getWidth(r)/4:ve.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*ve.internal.Bezier_C).toFixed(5)),o=Number((n*ve.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Gl(ve.internal.getWidth(r)/2)+" "+Gl(ve.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),t.push("0 g"),t.push("q"),t.push("1 0 0 1 "+Gl(ve.internal.getWidth(r)/2)+" "+Gl(ve.internal.getHeight(r)/2)+" cm"),t.push(n+" 0 m"),t.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),t.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),t.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),t.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
||
`),e},OffPushDown:function(r){var e=Hs(r);e.scope=r.scope;var t=[],n=ve.internal.getWidth(r)<=ve.internal.getHeight(r)?ve.internal.getWidth(r)/4:ve.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*ve.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+Gl(ve.internal.getWidth(r)/2)+" "+Gl(ve.internal.getHeight(r)/2)+" cm"),t.push(i+" 0 m"),t.push(i+" "+a+" "+a+" "+i+" 0 "+i+" c"),t.push("-"+a+" "+i+" -"+i+" "+a+" -"+i+" 0 c"),t.push("-"+i+" -"+a+" -"+a+" -"+i+" 0 -"+i+" c"),t.push(a+" -"+i+" "+i+" -"+a+" "+i+" 0 c"),t.push("f"),t.push("Q"),e.stream=t.join(`
|
||
`),e}},Cross:{createAppearanceStream:function(r){var e={D:{Off:ve.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=ve.RadioButton.Cross.YesNormal,e.D[r]=ve.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=Hs(r);e.scope=r.scope;var t=[],n=ve.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+je(ve.internal.getWidth(r)-2)+" "+je(ve.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(je(n.x1.x)+" "+je(n.x1.y)+" m"),t.push(je(n.x2.x)+" "+je(n.x2.y)+" l"),t.push(je(n.x4.x)+" "+je(n.x4.y)+" m"),t.push(je(n.x3.x)+" "+je(n.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
|
||
`),e},YesPushDown:function(r){var e=Hs(r);e.scope=r.scope;var t=ve.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+je(ve.internal.getWidth(r))+" "+je(ve.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+je(ve.internal.getWidth(r)-2)+" "+je(ve.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(je(t.x1.x)+" "+je(t.x1.y)+" m"),n.push(je(t.x2.x)+" "+je(t.x2.y)+" l"),n.push(je(t.x4.x)+" "+je(t.x4.y)+" m"),n.push(je(t.x3.x)+" "+je(t.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
|
||
`),e},OffPushDown:function(r){var e=Hs(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+je(ve.internal.getWidth(r))+" "+je(ve.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
|
||
`),e}}},createDefaultAppearanceStream:function(r){var e=r.scope.internal.getFont(r.fontName,r.fontStyle).id,t=r.scope.__private__.encodeColorString(r.color);return"/"+e+" "+r.fontSize+" Tf "+t}};ve.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=ve.internal.getWidth(r),t=ve.internal.getHeight(r),n=Math.min(e,t);return{x1:{x:(e-n)/2,y:(t-n)/2+n},x2:{x:(e-n)/2+n,y:(t-n)/2},x3:{x:(e-n)/2,y:(t-n)/2},x4:{x:(e-n)/2+n,y:(t-n)/2+n}}}},ve.internal.getWidth=function(r){var e=0;return Jr(r)==="object"&&(e=rO(r.Rect[2])),e},ve.internal.getHeight=function(r){var e=0;return Jr(r)==="object"&&(e=rO(r.Rect[3])),e};var nnt=Nn.addField=function(r){if(rnt(this,r),!(r instanceof Ls))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=r).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),r.page=r.scope.internal.getCurrentPageInfo().pageNumber,this};Nn.AcroFormChoiceField=If,Nn.AcroFormListBox=Rf,Nn.AcroFormComboBox=Of,Nn.AcroFormEditBox=G0,Nn.AcroFormButton=$i,Nn.AcroFormPushButton=k0,Nn.AcroFormRadioButton=Mf,Nn.AcroFormCheckBox=$0,Nn.AcroFormTextField=Lh,Nn.AcroFormPasswordField=V0,Nn.AcroFormAppearance=ve,Nn.AcroForm={ChoiceField:If,ListBox:Rf,ComboBox:Of,EditBox:G0,Button:$i,PushButton:k0,RadioButton:Mf,CheckBox:$0,TextField:Lh,PasswordField:V0,Appearance:ve},Ne.AcroForm={ChoiceField:If,ListBox:Rf,ComboBox:Of,EditBox:G0,Button:$i,PushButton:k0,RadioButton:Mf,CheckBox:$0,TextField:Lh,PasswordField:V0,Appearance:ve};Ne.AcroForm;function o6(r){return r.reduce(function(e,t,n){return e[t]=n,e},{})}(function(r){r.__addimage__={};var e="UNKNOWN",t={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},n=r.__addimage__.getImageFileTypeByImageData=function(S,x){var M,D,W,z,tt,q=e;if((x=x||e)==="RGBA"||S.data!==void 0&&S.data instanceof Uint8ClampedArray&&"height"in S&&"width"in S)return"RGBA";if(O(S))for(tt in t)for(W=t[tt],M=0;M<W.length;M+=1){for(z=!0,D=0;D<W[M].length;D+=1)if(W[M][D]!==void 0&&W[M][D]!==S[D]){z=!1;break}if(z===!0){q=tt;break}}else for(tt in t)for(W=t[tt],M=0;M<W.length;M+=1){for(z=!0,D=0;D<W[M].length;D+=1)if(W[M][D]!==void 0&&W[M][D]!==S.charCodeAt(D)){z=!1;break}if(z===!0){q=tt;break}}return q===e&&x!==e&&(q=x),q},i=function S(x){for(var M=this.internal.write,D=this.internal.putStream,W=(0,this.internal.getFilters)();W.indexOf("FlateEncode")!==-1;)W.splice(W.indexOf("FlateEncode"),1);x.objectId=this.internal.newObject();var z=[];if(z.push({key:"Type",value:"/XObject"}),z.push({key:"Subtype",value:"/Image"}),z.push({key:"Width",value:x.width}),z.push({key:"Height",value:x.height}),x.colorSpace===y.INDEXED?z.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(x.palette.length/3-1)+" "+("sMask"in x&&x.sMask!==void 0?x.objectId+2:x.objectId+1)+" 0 R]"}):(z.push({key:"ColorSpace",value:"/"+x.colorSpace}),x.colorSpace===y.DEVICE_CMYK&&z.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),z.push({key:"BitsPerComponent",value:x.bitsPerComponent}),"decodeParameters"in x&&x.decodeParameters!==void 0&&z.push({key:"DecodeParms",value:"<<"+x.decodeParameters+">>"}),"transparency"in x&&Array.isArray(x.transparency)){for(var tt="",q=0,rt=x.transparency.length;q<rt;q++)tt+=x.transparency[q]+" "+x.transparency[q]+" ";z.push({key:"Mask",value:"["+tt+"]"})}x.sMask!==void 0&&z.push({key:"SMask",value:x.objectId+1+" 0 R"});var nt=x.filter!==void 0?["/"+x.filter]:void 0;if(D({data:x.data,additionalKeyValues:z,alreadyAppliedFilters:nt,objectId:x.objectId}),M("endobj"),"sMask"in x&&x.sMask!==void 0){var _t="/Predictor "+x.predictor+" /Colors 1 /BitsPerComponent "+x.bitsPerComponent+" /Columns "+x.width,F={width:x.width,height:x.height,colorSpace:"DeviceGray",bitsPerComponent:x.bitsPerComponent,decodeParameters:_t,data:x.sMask};"filter"in x&&(F.filter=x.filter),S.call(this,F)}if(x.colorSpace===y.INDEXED){var $=this.internal.newObject();D({data:T(new Uint8Array(x.palette)),objectId:$}),M("endobj")}},a=function(){var S=this.internal.collections.addImage_images;for(var x in S)i.call(this,S[x])},o=function(){var S,x=this.internal.collections.addImage_images,M=this.internal.write;for(var D in x)M("/I"+(S=x[D]).index,S.objectId,"0","R")},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",o))},A=function(){var S=this.internal.collections.addImage_images;return s.call(this),S},l=function(){return Object.keys(this.internal.collections.addImage_images).length},u=function(S){return typeof r["process"+S.toUpperCase()]=="function"},h=function(S){return Jr(S)==="object"&&S.nodeType===1},c=function(S,x){if(S.nodeName==="IMG"&&S.hasAttribute("src")){var M=""+S.getAttribute("src");if(M.indexOf("data:image/")===0)return rv(unescape(M).split("base64,").pop());var D=r.loadFile(M,!0);if(D!==void 0)return D}if(S.nodeName==="CANVAS"){if(S.width===0||S.height===0)throw new Error("Given canvas must have data. Canvas width: "+S.width+", height: "+S.height);var W;switch(x){case"PNG":W="image/png";break;case"WEBP":W="image/webp";break;case"JPEG":case"JPG":default:W="image/jpeg"}return rv(S.toDataURL(W,1).split("base64,").pop())}},f=function(S){var x=this.internal.collections.addImage_images;if(x){for(var M in x)if(S===x[M].alias)return x[M]}},d=function(S,x,M){return S||x||(S=-96,x=-96),S<0&&(S=-1*M.width*72/S/this.internal.scaleFactor),x<0&&(x=-1*M.height*72/x/this.internal.scaleFactor),S===0&&(S=x*M.width/M.height),x===0&&(x=S*M.height/M.width),[S,x]},v=function(S,x,M,D,W,z){var tt=d.call(this,M,D,W),q=this.internal.getCoordinateString,rt=this.internal.getVerticalCoordinateString,nt=A.call(this);if(M=tt[0],D=tt[1],nt[W.index]=W,z){z*=Math.PI/180;var _t=Math.cos(z),F=Math.sin(z),$=function(X){return X.toFixed(4)},j=[$(_t),$(F),$(-1*F),$(_t),0,0,"cm"]}this.internal.write("q"),z?(this.internal.write([1,"0","0",1,q(S),rt(x+D),"cm"].join(" ")),this.internal.write(j.join(" ")),this.internal.write([q(M),"0","0",q(D),"0","0","cm"].join(" "))):this.internal.write([q(M),"0","0",q(D),q(S),rt(x+D),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+W.index+" Do"),this.internal.write("Q")},y=r.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};r.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var m=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},w=r.__addimage__.sHashCode=function(S){var x,M,D=0;if(typeof S=="string")for(M=S.length,x=0;x<M;x++)D=(D<<5)-D+S.charCodeAt(x),D|=0;else if(O(S))for(M=S.byteLength/2,x=0;x<M;x++)D=(D<<5)-D+S[x],D|=0;return D},C=r.__addimage__.validateStringAsBase64=function(S){(S=S||"").toString().trim();var x=!0;return S.length===0&&(x=!1),S.length%4!=0&&(x=!1),/^[A-Za-z0-9+/]+$/.test(S.substr(0,S.length-2))===!1&&(x=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(S.substr(-2))===!1&&(x=!1),x},B=r.__addimage__.extractImageFromDataUrl=function(S){var x=(S=S||"").split("base64,"),M=null;if(x.length===2){var D=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(x[0]);Array.isArray(D)&&(M={mimeType:D[1],charset:D[2],data:x[1]})}return M},R=r.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};r.__addimage__.isArrayBuffer=function(S){return R()&&S instanceof ArrayBuffer};var O=r.__addimage__.isArrayBufferView=function(S){return R()&&typeof Uint32Array<"u"&&(S instanceof Int8Array||S instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&S instanceof Uint8ClampedArray||S instanceof Int16Array||S instanceof Uint16Array||S instanceof Int32Array||S instanceof Uint32Array||S instanceof Float32Array||S instanceof Float64Array)},I=r.__addimage__.binaryStringToUint8Array=function(S){for(var x=S.length,M=new Uint8Array(x),D=0;D<x;D++)M[D]=S.charCodeAt(D);return M},T=r.__addimage__.arrayBufferToBinaryString=function(S){for(var x="",M=O(S)?S:new Uint8Array(S),D=0;D<M.length;D+=8192)x+=String.fromCharCode.apply(null,M.subarray(D,D+8192));return x};r.addImage=function(){var S,x,M,D,W,z,tt,q,rt;if(typeof arguments[1]=="number"?(x=e,M=arguments[1],D=arguments[2],W=arguments[3],z=arguments[4],tt=arguments[5],q=arguments[6],rt=arguments[7]):(x=arguments[1],M=arguments[2],D=arguments[3],W=arguments[4],z=arguments[5],tt=arguments[6],q=arguments[7],rt=arguments[8]),Jr(S=arguments[0])==="object"&&!h(S)&&"imageData"in S){var nt=S;S=nt.imageData,x=nt.format||x||e,M=nt.x||M||0,D=nt.y||D||0,W=nt.w||nt.width||W,z=nt.h||nt.height||z,tt=nt.alias||tt,q=nt.compression||q,rt=nt.rotation||nt.angle||rt}var _t=this.internal.getFilters();if(q===void 0&&_t.indexOf("FlateEncode")!==-1&&(q="SLOW"),isNaN(M)||isNaN(D))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var F=L.call(this,S,x,tt,q);return v.call(this,M,D,W,z,F,rt),this};var L=function(S,x,M,D){var W,z,tt;if(typeof S=="string"&&n(S)===e){S=unescape(S);var q=P(S,!1);(q!==""||(q=r.loadFile(S,!0))!==void 0)&&(S=q)}if(h(S)&&(S=c(S,x)),x=n(S,x),!u(x))throw new Error("addImage does not support files of type '"+x+"', please ensure that a plugin for '"+x+"' support is added.");if(((tt=M)==null||tt.length===0)&&(M=function(rt){return typeof rt=="string"||O(rt)?w(rt):O(rt.data)?w(rt.data):null}(S)),(W=f.call(this,M))||(R()&&(S instanceof Uint8Array||x==="RGBA"||(z=S,S=I(S))),W=this["process"+x.toUpperCase()](S,l.call(this),M,function(rt){return rt&&typeof rt=="string"&&(rt=rt.toUpperCase()),rt in r.image_compression?rt:m.NONE}(D),z)),!W)throw new Error("An unknown error occurred whilst processing the image.");return W},P=r.__addimage__.convertBase64ToBinaryString=function(S,x){var M;x=typeof x!="boolean"||x;var D,W="";if(typeof S=="string"){D=(M=B(S))!==null?M.data:S;try{W=rv(D)}catch(z){if(x)throw C(D)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+z.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return W};r.getImageProperties=function(S){var x,M,D="";if(h(S)&&(S=c(S)),typeof S=="string"&&n(S)===e&&((D=P(S,!1))===""&&(D=r.loadFile(S)||""),S=D),M=n(S),!u(M))throw new Error("addImage does not support files of type '"+M+"', please ensure that a plugin for '"+M+"' support is added.");if(!R()||S instanceof Uint8Array||(S=I(S)),!(x=this["process"+M.toUpperCase()](S)))throw new Error("An unknown error occurred whilst processing the image");return x.fileType=M,x}})(Ne.API),function(r){var e=function(t){if(t!==void 0&&t!="")return!0};Ne.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),r.events.push(["putPage",function(t){for(var n,i,a,o=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString,A=this.internal.getPageInfoByObjId(t.objId),l=t.pageContext.annotations,u=!1,h=0;h<l.length&&!u;h++)switch((n=l[h]).type){case"link":(e(n.options.url)||e(n.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(u!=0){this.internal.write("/Annots [");for(var c=0;c<l.length;c++){n=l[c];var f=this.internal.pdfEscape,d=this.internal.getEncryptor(t.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var v=this.internal.newAdditionalObject(),y=this.internal.newAdditionalObject(),m=this.internal.getEncryptor(v.objId),w=n.title||"Note";a="<</Type /Annot /Subtype /Text "+(i="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y)+"] ")+"/Contents ("+f(m(n.contents))+")",a+=" /Popup "+y.objId+" 0 R",a+=" /P "+A.objId+" 0 R",a+=" /T ("+f(m(w))+") >>",v.content=a;var C=v.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+o(n.bounds.x+30)+" "+s(n.bounds.y+n.bounds.h)+" "+o(n.bounds.x+n.bounds.w+30)+" "+s(n.bounds.y)+"] ")+" /Parent "+C,n.open&&(a+=" /Open true"),a+=" >>",y.content=a,this.internal.write(v.objId,"0 R",y.objId,"0 R");break;case"freetext":i="/Rect ["+o(n.bounds.x)+" "+s(n.bounds.y)+" "+o(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y+n.bounds.h)+"] ";var B=n.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+f(d(n.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+B+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var R=this.annotations._nameMap[n.options.name];n.options.pageNumber=R.page,n.options.top=R.y}else n.options.top||(n.options.top=0);if(i="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",a="",n.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+f(d(n.options.url))+") >>";else if(n.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,a+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var O=s(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),a+=" /XYZ "+n.options.left+" "+O+" "+n.options.zoom+"]"}a!=""&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),r.createAnnotation=function(t){var n=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":n.pageContext.annotations.push(t)}},r.link=function(t,n,i,a,o){var s=this.internal.getCurrentPageInfo(),A=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString;s.pageContext.annotations.push({finalBounds:{x:A(t),y:l(n),w:A(t+i),h:l(n+a)},options:o,type:"link"})},r.textWithLink=function(t,n,i,a){var o,s,A=this.getTextWidth(t),l=this.internal.getLineHeight()/this.internal.scaleFactor;if(a.maxWidth!==void 0){s=a.maxWidth;var u=this.splitTextToSize(t,s).length;o=Math.ceil(l*u)}else s=A,o=l;return this.text(t,n,i,a),i+=.2*l,a.align==="center"&&(n-=A/2),a.align==="right"&&(n-=A),this.link(n,i-l,s,o,a),A},r.getTextWidth=function(t){var n=this.internal.getFontSize();return this.getStringUnitWidth(t)*n/this.internal.scaleFactor}}(Ne.API),function(r){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},t={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];r.__arabicParser__={};var a=r.__arabicParser__.isInArabicSubstitutionA=function(v){return e[v.charCodeAt(0)]!==void 0},o=r.__arabicParser__.isArabicLetter=function(v){return typeof v=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(v)},s=r.__arabicParser__.isArabicEndLetter=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length<=2},A=r.__arabicParser__.isArabicAlfLetter=function(v){return o(v)&&i.indexOf(v.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length>=1};var l=r.__arabicParser__.arabicLetterHasFinalForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length>=3};var u=r.__arabicParser__.arabicLetterHasMedialForm=function(v){return o(v)&&a(v)&&e[v.charCodeAt(0)].length==4},h=r.__arabicParser__.resolveLigatures=function(v){var y=0,m=t,w="",C=0;for(y=0;y<v.length;y+=1)m[v.charCodeAt(y)]!==void 0?(C++,typeof(m=m[v.charCodeAt(y)])=="number"&&(w+=String.fromCharCode(m),m=t,C=0),y===v.length-1&&(m=t,w+=v.charAt(y-(C-1)),y-=C-1,C=0)):(m=t,w+=v.charAt(y-C),y-=C,C=0);return w};r.__arabicParser__.isArabicDiacritic=function(v){return v!==void 0&&n[v.charCodeAt(0)]!==void 0};var c=r.__arabicParser__.getCorrectForm=function(v,y,m){return o(v)?a(v)===!1?-1:!l(v)||!o(y)&&!o(m)||!o(m)&&s(y)||s(v)&&!o(y)||s(v)&&A(y)||s(v)&&s(y)?0:u(v)&&o(y)&&!s(y)&&o(m)&&l(m)?3:s(v)||!o(m)?1:2:-1},f=function(v){var y=0,m=0,w=0,C="",B="",R="",O=(v=v||"").split("\\s+"),I=[];for(y=0;y<O.length;y+=1){for(I.push(""),m=0;m<O[y].length;m+=1)C=O[y][m],B=O[y][m-1],R=O[y][m+1],o(C)?(w=c(C,B,R),I[y]+=w!==-1?String.fromCharCode(e[C.charCodeAt(0)][w]):C):I[y]+=C;I[y]=h(I[y])}return I.join(" ")},d=r.__arabicParser__.processArabic=r.processArabic=function(){var v,y=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,m=[];if(Array.isArray(y)){var w=0;for(m=[],w=0;w<y.length;w+=1)Array.isArray(y[w])?m.push([f(y[w][0]),y[w][1],y[w][2]]):m.push([f(y[w])]);v=m}else v=f(y);return typeof arguments[0]=="string"?v:(arguments[0].text=v,arguments[0])};r.events.push(["preProcessText",d])}(Ne.API),Ne.API.autoPrint=function(r){var e;switch((r=r||{}).variant=r.variant||"non-conform",r.variant){case"javascript":this.addJS("print({});");break;case"non-conform":default:this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})}return this},function(r){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(s){t=s}});var n=150;Object.defineProperty(this,"width",{get:function(){return n},set:function(s){n=isNaN(s)||Number.isInteger(s)===!1||s<0?150:s,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=n+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(s){i=isNaN(s)||Number.isInteger(s)===!1||s<0?300:s,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var a=[];Object.defineProperty(this,"childNodes",{get:function(){return a},set:function(s){a=s}});var o={};Object.defineProperty(this,"style",{get:function(){return o},set:function(s){o=s}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,n){var i;if((t=t||"2d")!=="2d")return null;for(i in n)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=n[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},r.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(Ne.API),function(r){var e={left:0,top:0,bottom:0,right:0},t=!1,n=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var A=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return A},set:function(v){A=v}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(v){l=v}});var u=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return u},set:function(v){u=v}});var h=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return h},set:function(v){h=v}});var c=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return c},set:function(v){c=v}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(v){f=v}});var d=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return d},set:function(v){d=v}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},r.setHeaderFunction=function(A){return n.call(this),this.internal.__cell__.headerFunction=typeof A=="function"?A:void 0,this},r.getTextDimensions=function(A,l){n.call(this);var u=(l=l||{}).fontSize||this.getFontSize(),h=l.font||this.getFont(),c=l.scaleFactor||this.internal.scaleFactor,f=0,d=0,v=0,y=this;if(!Array.isArray(A)&&typeof A!="string"){if(typeof A!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");A=String(A)}var m=l.maxWidth;m>0?typeof A=="string"?A=this.splitTextToSize(A,m):Object.prototype.toString.call(A)==="[object Array]"&&(A=A.reduce(function(C,B){return C.concat(y.splitTextToSize(B,m))},[])):A=Array.isArray(A)?A:[A];for(var w=0;w<A.length;w++)f<(v=this.getStringUnitWidth(A[w],{font:h})*u)&&(f=v);return f!==0&&(d=A.length),{w:f/=c,h:Math.max((d*u*this.getLineHeightFactor()-u*(this.getLineHeightFactor()-1))/c,0)}},r.cellAddPage=function(){n.call(this),this.addPage();var A=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new a(A.left,A.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=r.cell=function(){var A;A=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),n.call(this);var l=this.internal.__cell__.lastCell,u=this.internal.__cell__.padding,h=this.internal.__cell__.margins||e,c=this.internal.__cell__.tableHeaderRow,f=this.internal.__cell__.printHeaders;return l.lineNumber!==void 0&&(l.lineNumber===A.lineNumber?(A.x=(l.x||0)+(l.width||0),A.y=l.y||0):l.y+l.height+A.height+h.bottom>this.getPageHeight()?(this.cellAddPage(),A.y=h.top,f&&c&&(this.printHeaderRow(A.lineNumber,!0),A.y+=c[0].height)):A.y=l.y+l.height||A.y),A.text[0]!==void 0&&(this.rect(A.x,A.y,A.width,A.height,t===!0?"FD":void 0),A.align==="right"?this.text(A.text,A.x+A.width-u,A.y+u,{align:"right",baseline:"top"}):A.align==="center"?this.text(A.text,A.x+A.width/2,A.y+u,{align:"center",baseline:"top",maxWidth:A.width-u-u}):this.text(A.text,A.x+u,A.y+u,{align:"left",baseline:"top",maxWidth:A.width-u-u})),this.internal.__cell__.lastCell=A,this};r.table=function(A,l,u,h,c){if(n.call(this),!u)throw new Error("No data for PDF table.");var f,d,v,y,m=[],w=[],C=[],B={},R={},O=[],I=[],T=(c=c||{}).autoSize||!1,L=c.printHeaders!==!1,P=c.css&&c.css["font-size"]!==void 0?16*c.css["font-size"]:c.fontSize||12,S=c.margins||Object.assign({width:this.getPageWidth()},e),x=typeof c.padding=="number"?c.padding:3,M=c.headerBackgroundColor||"#c8c8c8",D=c.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=L,this.internal.__cell__.margins=S,this.internal.__cell__.table_font_size=P,this.internal.__cell__.padding=x,this.internal.__cell__.headerBackgroundColor=M,this.internal.__cell__.headerTextColor=D,this.setFontSize(P),h==null)w=m=Object.keys(u[0]),C=m.map(function(){return"left"});else if(Array.isArray(h)&&Jr(h[0])==="object")for(m=h.map(function(nt){return nt.name}),w=h.map(function(nt){return nt.prompt||nt.name||""}),C=h.map(function(nt){return nt.align||"left"}),f=0;f<h.length;f+=1)R[h[f].name]=h[f].width*(19.049976/25.4);else Array.isArray(h)&&typeof h[0]=="string"&&(w=m=h,C=m.map(function(){return"left"}));if(T||Array.isArray(h)&&typeof h[0]=="string")for(f=0;f<m.length;f+=1){for(B[y=m[f]]=u.map(function(nt){return nt[y]}),this.setFont(void 0,"bold"),O.push(this.getTextDimensions(w[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),d=B[y],this.setFont(void 0,"normal"),v=0;v<d.length;v+=1)O.push(this.getTextDimensions(d[v],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);R[y]=Math.max.apply(null,O)+x+x,O=[]}if(L){var W={};for(f=0;f<m.length;f+=1)W[m[f]]={},W[m[f]].text=w[f],W[m[f]].align=C[f];var z=s.call(this,W,R);I=m.map(function(nt){return new a(A,l,R[nt],z,W[nt].text,void 0,W[nt].align)}),this.setTableHeaderRow(I),this.printHeaderRow(1,!1)}var tt=h.reduce(function(nt,_t){return nt[_t.name]=_t.align,nt},{});for(f=0;f<u.length;f+=1){"rowStart"in c&&c.rowStart instanceof Function&&c.rowStart({row:f,data:u[f]},this);var q=s.call(this,u[f],R);for(v=0;v<m.length;v+=1){var rt=u[f][m[v]];"cellStart"in c&&c.cellStart instanceof Function&&c.cellStart({row:f,col:v,data:rt},this),o.call(this,new a(A,l,R[m[v]],q,rt,f+2,tt[m[v]]))}}return this.internal.__cell__.table_x=A,this.internal.__cell__.table_y=l,this};var s=function(A,l){var u=this.internal.__cell__.padding,h=this.internal.__cell__.table_font_size,c=this.internal.scaleFactor;return Object.keys(A).map(function(f){var d=A[f];return this.splitTextToSize(d.hasOwnProperty("text")?d.text:d,l[f]-u-u)},this).map(function(f){return this.getLineHeightFactor()*f.length*h/c+u+u},this).reduce(function(f,d){return Math.max(f,d)},0)};r.setTableHeaderRow=function(A){n.call(this),this.internal.__cell__.tableHeaderRow=A},r.printHeaderRow=function(A,l){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var u;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var h=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(h[0],h[1],h[2],h[3],void 0,-1)}this.setFont(void 0,"bold");for(var c=[],f=0;f<this.internal.__cell__.tableHeaderRow.length;f+=1){u=this.internal.__cell__.tableHeaderRow[f].clone(),l&&(u.y=this.internal.__cell__.margins.top||0,c.push(u)),u.lineNumber=A;var d=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,u),this.setTextColor(d)}c.length>0&&this.setTableHeaderRow(c),this.setFont(void 0,"normal"),t=!1}}(Ne.API);var s6={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},A6=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],_T=o6(A6),l6=[100,200,300,400,500,600,700,800,900],int=o6(l6);function wT(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=function(a){return s6[a=a||"normal"]?a:"normal"}(r.style),n=function(a){if(!a)return 400;if(typeof a=="number")return a>=100&&a<=900&&a%100==0?a:400;if(/^\d00$/.test(a))return parseInt(a);switch(a){case"bold":return 700;case"normal":default:return 400}}(r.weight),i=function(a){return typeof _T[a=a||"normal"]=="number"?a:"normal"}(r.stretch);return{family:e,style:t,weight:n,stretch:i,src:r.src||[],ref:r.ref||{name:e,style:[i,t,n].join(" ")}}}function nO(r,e,t,n){var i;for(i=t;i>=0&&i<e.length;i+=n)if(r[e[i]])return r[e[i]];for(i=t;i>=0&&i<e.length;i-=n)if(r[e[i]])return r[e[i]]}var ant={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},iO={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function aO(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function ont(r,e,t){for(var n=(t=t||{}).defaultFontFamily||"times",i=Object.assign({},ant,t.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=wT(e[s])).family]&&(a.family=i[a.family]),r.hasOwnProperty(a.family)){o=r[a.family];break}if(!(o=o||r[n]))throw new Error("Could not find a font-family for the rule '"+aO(a)+"' and default family '"+n+"'.");if(o=function(A,l){if(l[A])return l[A];var u=_T[A],h=u<=_T.normal?-1:1,c=nO(l,A6,u,h);if(!c)throw new Error("Could not find a matching font-stretch value for "+A);return c}(a.stretch,o),o=function(A,l){if(l[A])return l[A];for(var u=s6[A],h=0;h<u.length;++h)if(l[u[h]])return l[u[h]];throw new Error("Could not find a matching font-style for "+A)}(a.style,o),!(o=function(A,l){if(l[A])return l[A];if(A===400&&l[500])return l[500];if(A===500&&l[400])return l[400];var u=int[A],h=nO(l,l6,u,A<400?-1:1);if(!h)throw new Error("Could not find a matching font-weight for value "+A);return h}(a.weight,o)))throw new Error("Failed to resolve a font for the rule '"+aO(a)+"'.");return o}function oO(r){return r.trimLeft()}function snt(r,e){for(var t=0;t<r.length;){if(r.charAt(t)===e)return[r.substring(0,t),r.substring(t+1)];t+=1}return null}function Ant(r){var e=r.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],r.substring(e[0].length)]}var Uy,sO,AO,SE=["times"];(function(r){var e,t,n,i,a,o,s,A,l,u=function(F){return F=F||{},this.isStrokeTransparent=F.isStrokeTransparent||!1,this.strokeOpacity=F.strokeOpacity||1,this.strokeStyle=F.strokeStyle||"#000000",this.fillStyle=F.fillStyle||"#000000",this.isFillTransparent=F.isFillTransparent||!1,this.fillOpacity=F.fillOpacity||1,this.font=F.font||"10px sans-serif",this.textBaseline=F.textBaseline||"alphabetic",this.textAlign=F.textAlign||"left",this.lineWidth=F.lineWidth||1,this.lineJoin=F.lineJoin||"miter",this.lineCap=F.lineCap||"butt",this.path=F.path||[],this.transform=F.transform!==void 0?F.transform.clone():new A,this.globalCompositeOperation=F.globalCompositeOperation||"normal",this.globalAlpha=F.globalAlpha||1,this.clip_path=F.clip_path||[],this.currentPoint=F.currentPoint||new o,this.miterLimit=F.miterLimit||10,this.lastPoint=F.lastPoint||new o,this.lineDashOffset=F.lineDashOffset||0,this.lineDash=F.lineDash||[],this.margin=F.margin||[0,0,0,0],this.prevPageLastElemOffset=F.prevPageLastElemOffset||0,this.ignoreClearRect=typeof F.ignoreClearRect!="boolean"||F.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new h(this),e=this.internal.f2,t=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,A=this.internal.Matrix,l=new u}]);var h=function(F){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var $=F;Object.defineProperty(this,"pdf",{get:function(){return $}});var j=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return j},set:function(et){j=Boolean(et)}});var X=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return X},set:function(et){X=Boolean(et)}});var it=0;Object.defineProperty(this,"posX",{get:function(){return it},set:function(et){isNaN(et)||(it=et)}});var gt=0;Object.defineProperty(this,"posY",{get:function(){return gt},set:function(et){isNaN(et)||(gt=et)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(et){var G;typeof et=="number"?G=[et,et,et,et]:((G=new Array(4))[0]=et[0],G[1]=et.length>=2?et[1]:G[0],G[2]=et.length>=3?et[2]:G[0],G[3]=et.length>=4?et[3]:G[1]),l.margin=G}});var wt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return wt},set:function(et){wt=et}});var at=0;Object.defineProperty(this,"lastBreak",{get:function(){return at},set:function(et){at=et}});var Pt=[];Object.defineProperty(this,"pageBreaks",{get:function(){return Pt},set:function(et){Pt=et}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(et){et instanceof u&&(l=et)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(et){l.path=et}});var Ot=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ot},set:function(et){Ot=et}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(et){var G;G=c(et),this.ctx.fillStyle=G.style,this.ctx.isFillTransparent=G.a===0,this.ctx.fillOpacity=G.a,this.pdf.setFillColor(G.r,G.g,G.b,{a:G.a}),this.pdf.setTextColor(G.r,G.g,G.b,{a:G.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(et){var G=c(et);this.ctx.strokeStyle=G.style,this.ctx.isStrokeTransparent=G.a===0,this.ctx.strokeOpacity=G.a,G.a===0?this.pdf.setDrawColor(255,255,255):(G.a,this.pdf.setDrawColor(G.r,G.g,G.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(et){["butt","round","square"].indexOf(et)!==-1&&(this.ctx.lineCap=et,this.pdf.setLineCap(et))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(et){isNaN(et)||(this.ctx.lineWidth=et,this.pdf.setLineWidth(et))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(et){["bevel","round","miter"].indexOf(et)!==-1&&(this.ctx.lineJoin=et,this.pdf.setLineJoin(et))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(et){isNaN(et)||(this.ctx.miterLimit=et,this.pdf.setMiterLimit(et))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(et){this.ctx.textBaseline=et}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(et){["right","end","center","left","start"].indexOf(et)!==-1&&(this.ctx.textAlign=et)}});var K=null;function Z(et,G){if(K===null){var bt=function(St){var dt=[];return Object.keys(St).forEach(function(Et){St[Et].forEach(function(yt){var xt=null;switch(yt){case"bold":xt={family:Et,weight:"bold"};break;case"italic":xt={family:Et,style:"italic"};break;case"bolditalic":xt={family:Et,weight:"bold",style:"italic"};break;case"":case"normal":xt={family:Et}}xt!==null&&(xt.ref={name:Et,style:yt},dt.push(xt))})}),dt}(et.getFontList());K=function(St){for(var dt={},Et=0;Et<St.length;++Et){var yt=wT(St[Et]),xt=yt.family,Lt=yt.stretch,Rt=yt.style,Vt=yt.weight;dt[xt]=dt[xt]||{},dt[xt][Lt]=dt[xt][Lt]||{},dt[xt][Lt][Rt]=dt[xt][Lt][Rt]||{},dt[xt][Lt][Rt][Vt]=yt}return dt}(bt.concat(G))}return K}var pt=null;Object.defineProperty(this,"fontFaces",{get:function(){return pt},set:function(et){K=null,pt=et}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(et){var G;if(this.ctx.font=et,(G=/^\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*$/i.exec(et))!==null){var bt=G[1],St=(G[2],G[3]),dt=G[4],Et=(G[5],G[6]),yt=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(dt)[2];dt=Math.floor(yt==="px"?parseFloat(dt)*this.pdf.internal.scaleFactor:yt==="em"?parseFloat(dt)*this.pdf.getFontSize():parseFloat(dt)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(dt);var xt=function(Xt){var oe,Kt,Ye=[],Re=Xt.trim();if(Re==="")return SE;if(Re in iO)return[iO[Re]];for(;Re!=="";){switch(Kt=null,oe=(Re=oO(Re)).charAt(0)){case'"':case"'":Kt=snt(Re.substring(1),oe);break;default:Kt=Ant(Re)}if(Kt===null||(Ye.push(Kt[0]),(Re=oO(Kt[1]))!==""&&Re.charAt(0)!==","))return SE;Re=Re.replace(/^,/,"")}return Ye}(Et);if(this.fontFaces){var Lt=ont(Z(this.pdf,this.fontFaces),xt.map(function(Xt){return{family:Xt,stretch:"normal",weight:St,style:bt}}));this.pdf.setFont(Lt.ref.name,Lt.ref.style)}else{var Rt="";(St==="bold"||parseInt(St,10)>=700||bt==="bold")&&(Rt="bold"),bt==="italic"&&(Rt+="italic"),Rt.length===0&&(Rt="normal");for(var Vt="",zt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},ie=0;ie<xt.length;ie++){if(this.pdf.internal.getFont(xt[ie],Rt,{noFallback:!0,disableWarning:!0})!==void 0){Vt=xt[ie];break}if(Rt==="bolditalic"&&this.pdf.internal.getFont(xt[ie],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Vt=xt[ie],Rt="bold";else if(this.pdf.internal.getFont(xt[ie],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Vt=xt[ie],Rt="normal";break}}if(Vt===""){for(var ee=0;ee<xt.length;ee++)if(zt[xt[ee]]){Vt=zt[xt[ee]];break}}Vt=Vt===""?"Times":Vt,this.pdf.setFont(Vt,Rt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(et){this.ctx.globalCompositeOperation=et}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(et){this.ctx.globalAlpha=et}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(et){this.ctx.lineDashOffset=et,_t.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(et){this.ctx.lineDash=et,_t.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(et){this.ctx.ignoreClearRect=Boolean(et)}})};h.prototype.setLineDash=function(F){this.lineDash=F},h.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},h.prototype.fill=function(){B.call(this,"fill",!1)},h.prototype.stroke=function(){B.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function(F,$){if(isNaN(F)||isNaN($))throw sn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var j=this.ctx.transform.applyToPoint(new o(F,$));this.path.push({type:"mt",x:j.x,y:j.y}),this.ctx.lastPoint=new o(F,$)},h.prototype.closePath=function(){var F=new o(0,0),$=0;for($=this.path.length-1;$!==-1;$--)if(this.path[$].type==="begin"&&Jr(this.path[$+1])==="object"&&typeof this.path[$+1].x=="number"){F=new o(this.path[$+1].x,this.path[$+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(F.x,F.y)},h.prototype.lineTo=function(F,$){if(isNaN(F)||isNaN($))throw sn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var j=this.ctx.transform.applyToPoint(new o(F,$));this.path.push({type:"lt",x:j.x,y:j.y}),this.ctx.lastPoint=new o(j.x,j.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),B.call(this,null,!0)},h.prototype.quadraticCurveTo=function(F,$,j,X){if(isNaN(j)||isNaN(X)||isNaN(F)||isNaN($))throw sn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var it=this.ctx.transform.applyToPoint(new o(j,X)),gt=this.ctx.transform.applyToPoint(new o(F,$));this.path.push({type:"qct",x1:gt.x,y1:gt.y,x:it.x,y:it.y}),this.ctx.lastPoint=new o(it.x,it.y)},h.prototype.bezierCurveTo=function(F,$,j,X,it,gt){if(isNaN(it)||isNaN(gt)||isNaN(F)||isNaN($)||isNaN(j)||isNaN(X))throw sn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var wt=this.ctx.transform.applyToPoint(new o(it,gt)),at=this.ctx.transform.applyToPoint(new o(F,$)),Pt=this.ctx.transform.applyToPoint(new o(j,X));this.path.push({type:"bct",x1:at.x,y1:at.y,x2:Pt.x,y2:Pt.y,x:wt.x,y:wt.y}),this.ctx.lastPoint=new o(wt.x,wt.y)},h.prototype.arc=function(F,$,j,X,it,gt){if(isNaN(F)||isNaN($)||isNaN(j)||isNaN(X)||isNaN(it))throw sn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(gt=Boolean(gt),!this.ctx.transform.isIdentity){var wt=this.ctx.transform.applyToPoint(new o(F,$));F=wt.x,$=wt.y;var at=this.ctx.transform.applyToPoint(new o(0,j)),Pt=this.ctx.transform.applyToPoint(new o(0,0));j=Math.sqrt(Math.pow(at.x-Pt.x,2)+Math.pow(at.y-Pt.y,2))}Math.abs(it-X)>=2*Math.PI&&(X=0,it=2*Math.PI),this.path.push({type:"arc",x:F,y:$,radius:j,startAngle:X,endAngle:it,counterclockwise:gt})},h.prototype.arcTo=function(F,$,j,X,it){throw new Error("arcTo not implemented.")},h.prototype.rect=function(F,$,j,X){if(isNaN(F)||isNaN($)||isNaN(j)||isNaN(X))throw sn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(F,$),this.lineTo(F+j,$),this.lineTo(F+j,$+X),this.lineTo(F,$+X),this.lineTo(F,$),this.lineTo(F+j,$),this.lineTo(F,$)},h.prototype.fillRect=function(F,$,j,X){if(isNaN(F)||isNaN($)||isNaN(j)||isNaN(X))throw sn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var it={};this.lineCap!=="butt"&&(it.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(it.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(F,$,j,X),this.fill(),it.hasOwnProperty("lineCap")&&(this.lineCap=it.lineCap),it.hasOwnProperty("lineJoin")&&(this.lineJoin=it.lineJoin)}},h.prototype.strokeRect=function(F,$,j,X){if(isNaN(F)||isNaN($)||isNaN(j)||isNaN(X))throw sn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");d.call(this)||(this.beginPath(),this.rect(F,$,j,X),this.stroke())},h.prototype.clearRect=function(F,$,j,X){if(isNaN(F)||isNaN($)||isNaN(j)||isNaN(X))throw sn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(F,$,j,X))},h.prototype.save=function(F){F=typeof F!="boolean"||F;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,j=0;j<this.pdf.internal.getNumberOfPages();j++)this.pdf.setPage(j+1),this.pdf.internal.out("q");if(this.pdf.setPage($),F){this.ctx.fontSize=this.pdf.internal.getFontSize();var X=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=X}},h.prototype.restore=function(F){F=typeof F!="boolean"||F;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,j=0;j<this.pdf.internal.getNumberOfPages();j++)this.pdf.setPage(j+1),this.pdf.internal.out("Q");this.pdf.setPage($),F&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var c=function(F){var $,j,X,it;if(F.isCanvasGradient===!0&&(F=F.getColor()),!F)return{r:0,g:0,b:0,a:0,style:F};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(F))$=0,j=0,X=0,it=0;else{var gt=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(F);if(gt!==null)$=parseInt(gt[1]),j=parseInt(gt[2]),X=parseInt(gt[3]),it=1;else if((gt=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(F))!==null)$=parseInt(gt[1]),j=parseInt(gt[2]),X=parseInt(gt[3]),it=parseFloat(gt[4]);else{if(it=1,typeof F=="string"&&F.charAt(0)!=="#"){var wt=new t6(F);F=wt.ok?wt.toHex():"#000000"}F.length===4?($=F.substring(1,2),$+=$,j=F.substring(2,3),j+=j,X=F.substring(3,4),X+=X):($=F.substring(1,3),j=F.substring(3,5),X=F.substring(5,7)),$=parseInt($,16),j=parseInt(j,16),X=parseInt(X,16)}}return{r:$,g:j,b:X,a:it,style:F}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},d=function(){return Boolean(this.ctx.isStrokeTransparent||this.globalAlpha==0)};h.prototype.fillText=function(F,$,j,X){if(isNaN($)||isNaN(j)||typeof F!="string")throw sn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(X=isNaN(X)?void 0:X,!f.call(this)){var it=q(this.ctx.transform.rotation),gt=this.ctx.transform.scaleX;x.call(this,{text:F,x:$,y:j,scale:gt,angle:it,align:this.textAlign,maxWidth:X})}},h.prototype.strokeText=function(F,$,j,X){if(isNaN($)||isNaN(j)||typeof F!="string")throw sn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!d.call(this)){X=isNaN(X)?void 0:X;var it=q(this.ctx.transform.rotation),gt=this.ctx.transform.scaleX;x.call(this,{text:F,x:$,y:j,scale:gt,renderingMode:"stroke",angle:it,align:this.textAlign,maxWidth:X})}},h.prototype.measureText=function(F){if(typeof F!="string")throw sn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var $=this.pdf,j=this.pdf.internal.scaleFactor,X=$.internal.getFontSize(),it=$.getStringUnitWidth(F)*X/$.internal.scaleFactor,gt=function(wt){var at=(wt=wt||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return at}}),this};return new gt({width:it*=Math.round(96*j/72*1e4)/1e4})},h.prototype.scale=function(F,$){if(isNaN(F)||isNaN($))throw sn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var j=new A(F,0,0,$,0,0);this.ctx.transform=this.ctx.transform.multiply(j)},h.prototype.rotate=function(F){if(isNaN(F))throw sn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var $=new A(Math.cos(F),Math.sin(F),-Math.sin(F),Math.cos(F),0,0);this.ctx.transform=this.ctx.transform.multiply($)},h.prototype.translate=function(F,$){if(isNaN(F)||isNaN($))throw sn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var j=new A(1,0,0,1,F,$);this.ctx.transform=this.ctx.transform.multiply(j)},h.prototype.transform=function(F,$,j,X,it,gt){if(isNaN(F)||isNaN($)||isNaN(j)||isNaN(X)||isNaN(it)||isNaN(gt))throw sn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var wt=new A(F,$,j,X,it,gt);this.ctx.transform=this.ctx.transform.multiply(wt)},h.prototype.setTransform=function(F,$,j,X,it,gt){F=isNaN(F)?1:F,$=isNaN($)?0:$,j=isNaN(j)?0:j,X=isNaN(X)?1:X,it=isNaN(it)?0:it,gt=isNaN(gt)?0:gt,this.ctx.transform=new A(F,$,j,X,it,gt)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};h.prototype.drawImage=function(F,$,j,X,it,gt,wt,at,Pt){var Ot=this.pdf.getImageProperties(F),K=1,Z=1,pt=1,et=1;X!==void 0&&at!==void 0&&(pt=at/X,et=Pt/it,K=Ot.width/X*at/X,Z=Ot.height/it*Pt/it),gt===void 0&&(gt=$,wt=j,$=0,j=0),X!==void 0&&at===void 0&&(at=X,Pt=it),X===void 0&&at===void 0&&(at=Ot.width,Pt=Ot.height);for(var G,bt=this.ctx.transform.decompose(),St=q(bt.rotate.shx),dt=new A,Et=(dt=(dt=(dt=dt.multiply(bt.translate)).multiply(bt.skew)).multiply(bt.scale)).applyToRectangle(new s(gt-$*pt,wt-j*et,X*K,it*Z)),yt=y.call(this,Et),xt=[],Lt=0;Lt<yt.length;Lt+=1)xt.indexOf(yt[Lt])===-1&&xt.push(yt[Lt]);if(C(xt),this.autoPaging)for(var Rt=xt[0],Vt=xt[xt.length-1],zt=Rt;zt<Vt+1;zt++){this.pdf.setPage(zt);var ie=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ee=zt===1?this.posY+this.margin[0]:this.margin[0],Xt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],oe=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Kt=zt===1?0:Xt+(zt-2)*oe;if(this.ctx.clip_path.length!==0){var Ye=this.path;G=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(G,this.posX+this.margin[3],-Kt+ee+this.ctx.prevPageLastElemOffset),R.call(this,"fill",!0),this.path=Ye}var Re=JSON.parse(JSON.stringify(Et));Re=w([Re],this.posX+this.margin[3],-Kt+ee+this.ctx.prevPageLastElemOffset)[0];var fr=(zt>Rt||zt<Vt)&&v.call(this);fr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ie,oe,null).clip().discardPath()),this.pdf.addImage(F,"JPEG",Re.x,Re.y,Re.w,Re.h,null,null,St),fr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(F,"JPEG",Et.x,Et.y,Et.w,Et.h,null,null,St)};var y=function(F,$,j){var X=[];$=$||this.pdf.internal.pageSize.width,j=j||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var it=this.posY+this.ctx.prevPageLastElemOffset;switch(F.type){default:case"mt":case"lt":X.push(Math.floor((F.y+it)/j)+1);break;case"arc":X.push(Math.floor((F.y+it-F.radius)/j)+1),X.push(Math.floor((F.y+it+F.radius)/j)+1);break;case"qct":var gt=rt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,F.x1,F.y1,F.x,F.y);X.push(Math.floor((gt.y+it)/j)+1),X.push(Math.floor((gt.y+gt.h+it)/j)+1);break;case"bct":var wt=nt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,F.x1,F.y1,F.x2,F.y2,F.x,F.y);X.push(Math.floor((wt.y+it)/j)+1),X.push(Math.floor((wt.y+wt.h+it)/j)+1);break;case"rect":X.push(Math.floor((F.y+it)/j)+1),X.push(Math.floor((F.y+F.h+it)/j)+1)}for(var at=0;at<X.length;at+=1)for(;this.pdf.internal.getNumberOfPages()<X[at];)m.call(this);return X},m=function(){var F=this.fillStyle,$=this.strokeStyle,j=this.font,X=this.lineCap,it=this.lineWidth,gt=this.lineJoin;this.pdf.addPage(),this.fillStyle=F,this.strokeStyle=$,this.font=j,this.lineCap=X,this.lineWidth=it,this.lineJoin=gt},w=function(F,$,j){for(var X=0;X<F.length;X++)switch(F[X].type){case"bct":F[X].x2+=$,F[X].y2+=j;case"qct":F[X].x1+=$,F[X].y1+=j;case"mt":case"lt":case"arc":default:F[X].x+=$,F[X].y+=j}return F},C=function(F){return F.sort(function($,j){return $-j})},B=function(F,$){for(var j,X,it=this.fillStyle,gt=this.strokeStyle,wt=this.lineCap,at=this.lineWidth,Pt=Math.abs(at*this.ctx.transform.scaleX),Ot=this.lineJoin,K=JSON.parse(JSON.stringify(this.path)),Z=JSON.parse(JSON.stringify(this.path)),pt=[],et=0;et<Z.length;et++)if(Z[et].x!==void 0)for(var G=y.call(this,Z[et]),bt=0;bt<G.length;bt+=1)pt.indexOf(G[bt])===-1&&pt.push(G[bt]);for(var St=0;St<pt.length;St++)for(;this.pdf.internal.getNumberOfPages()<pt[St];)m.call(this);if(C(pt),this.autoPaging)for(var dt=pt[0],Et=pt[pt.length-1],yt=dt;yt<Et+1;yt++){this.pdf.setPage(yt),this.fillStyle=it,this.strokeStyle=gt,this.lineCap=wt,this.lineWidth=Pt,this.lineJoin=Ot;var xt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Lt=yt===1?this.posY+this.margin[0]:this.margin[0],Rt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Vt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],zt=yt===1?0:Rt+(yt-2)*Vt;if(this.ctx.clip_path.length!==0){var ie=this.path;j=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(j,this.posX+this.margin[3],-zt+Lt+this.ctx.prevPageLastElemOffset),R.call(this,F,!0),this.path=ie}if(X=JSON.parse(JSON.stringify(K)),this.path=w(X,this.posX+this.margin[3],-zt+Lt+this.ctx.prevPageLastElemOffset),$===!1||yt===0){var ee=(yt>dt||yt<Et)&&v.call(this);ee&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],xt,Vt,null).clip().discardPath()),R.call(this,F,$),ee&&this.pdf.restoreGraphicsState()}this.lineWidth=at}else this.lineWidth=Pt,R.call(this,F,$),this.lineWidth=at;this.path=K},R=function(F,$){if((F!=="stroke"||$||!d.call(this))&&(F==="stroke"||$||!f.call(this))){for(var j,X,it=[],gt=this.path,wt=0;wt<gt.length;wt++){var at=gt[wt];switch(at.type){case"begin":it.push({begin:!0});break;case"close":it.push({close:!0});break;case"mt":it.push({start:at,deltas:[],abs:[]});break;case"lt":var Pt=it.length;if(gt[wt-1]&&!isNaN(gt[wt-1].x)&&(j=[at.x-gt[wt-1].x,at.y-gt[wt-1].y],Pt>0)){for(;Pt>=0;Pt--)if(it[Pt-1].close!==!0&&it[Pt-1].begin!==!0){it[Pt-1].deltas.push(j),it[Pt-1].abs.push(at);break}}break;case"bct":j=[at.x1-gt[wt-1].x,at.y1-gt[wt-1].y,at.x2-gt[wt-1].x,at.y2-gt[wt-1].y,at.x-gt[wt-1].x,at.y-gt[wt-1].y],it[it.length-1].deltas.push(j);break;case"qct":var Ot=gt[wt-1].x+2/3*(at.x1-gt[wt-1].x),K=gt[wt-1].y+2/3*(at.y1-gt[wt-1].y),Z=at.x+2/3*(at.x1-at.x),pt=at.y+2/3*(at.y1-at.y),et=at.x,G=at.y;j=[Ot-gt[wt-1].x,K-gt[wt-1].y,Z-gt[wt-1].x,pt-gt[wt-1].y,et-gt[wt-1].x,G-gt[wt-1].y],it[it.length-1].deltas.push(j);break;case"arc":it.push({deltas:[],abs:[],arc:!0}),Array.isArray(it[it.length-1].abs)&&it[it.length-1].abs.push(at)}}X=$?null:F==="stroke"?"stroke":"fill";for(var bt=!1,St=0;St<it.length;St++)if(it[St].arc)for(var dt=it[St].abs,Et=0;Et<dt.length;Et++){var yt=dt[Et];yt.type==="arc"?T.call(this,yt.x,yt.y,yt.radius,yt.startAngle,yt.endAngle,yt.counterclockwise,void 0,$,!bt):M.call(this,yt.x,yt.y),bt=!0}else if(it[St].close===!0)this.pdf.internal.out("h"),bt=!1;else if(it[St].begin!==!0){var xt=it[St].start.x,Lt=it[St].start.y;D.call(this,it[St].deltas,xt,Lt),bt=!0}X&&L.call(this,X),$&&P.call(this)}},O=function(F){var $=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,j=$*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return F-j;case"top":return F+$-j;case"hanging":return F+$-2*j;case"middle":return F+$/2-j;case"ideographic":return F;case"alphabetic":default:return F}},I=function(F){return F+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};h.prototype.createLinearGradient=function(){var F=function(){};return F.colorStops=[],F.addColorStop=function($,j){this.colorStops.push([$,j])},F.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},F.isCanvasGradient=!0,F},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(F,$,j,X,it,gt,wt,at,Pt){for(var Ot=z.call(this,j,X,it,gt),K=0;K<Ot.length;K++){var Z=Ot[K];K===0&&(Pt?S.call(this,Z.x1+F,Z.y1+$):M.call(this,Z.x1+F,Z.y1+$)),W.call(this,F,$,Z.x2,Z.y2,Z.x3,Z.y3,Z.x4,Z.y4)}at?P.call(this):L.call(this,wt)},L=function(F){switch(F){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},P=function(){this.pdf.clip(),this.pdf.discardPath()},S=function(F,$){this.pdf.internal.out(t(F)+" "+n($)+" m")},x=function(F){var $;switch(F.align){case"right":case"end":$="right";break;case"center":$="center";break;case"left":case"start":default:$="left"}var j=this.pdf.getTextDimensions(F.text),X=O.call(this,F.y),it=I.call(this,X)-j.h,gt=this.ctx.transform.applyToPoint(new o(F.x,X)),wt=this.ctx.transform.decompose(),at=new A;at=(at=(at=at.multiply(wt.translate)).multiply(wt.skew)).multiply(wt.scale);for(var Pt,Ot,K,Z=this.ctx.transform.applyToRectangle(new s(F.x,X,j.w,j.h)),pt=at.applyToRectangle(new s(F.x,it,j.w,j.h)),et=y.call(this,pt),G=[],bt=0;bt<et.length;bt+=1)G.indexOf(et[bt])===-1&&G.push(et[bt]);if(C(G),this.autoPaging)for(var St=G[0],dt=G[G.length-1],Et=St;Et<dt+1;Et++){this.pdf.setPage(Et);var yt=Et===1?this.posY+this.margin[0]:this.margin[0],xt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Lt=this.pdf.internal.pageSize.height-this.margin[2],Rt=Lt-this.margin[0],Vt=this.pdf.internal.pageSize.width-this.margin[1],zt=Vt-this.margin[3],ie=Et===1?0:xt+(Et-2)*Rt;if(this.ctx.clip_path.length!==0){var ee=this.path;Pt=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=w(Pt,this.posX+this.margin[3],-1*ie+yt),R.call(this,"fill",!0),this.path=ee}var Xt=w([JSON.parse(JSON.stringify(pt))],this.posX+this.margin[3],-ie+yt+this.ctx.prevPageLastElemOffset)[0];F.scale>=.01&&(Ot=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ot*F.scale),K=this.lineWidth,this.lineWidth=K*F.scale);var oe=this.autoPaging!=="text";if(oe||Xt.y+Xt.h<=Lt){if(oe||Xt.y>=yt&&Xt.x<=Vt){var Kt=oe?F.text:this.pdf.splitTextToSize(F.text,F.maxWidth||Vt-Xt.x)[0],Ye=w([JSON.parse(JSON.stringify(Z))],this.posX+this.margin[3],-ie+yt+this.ctx.prevPageLastElemOffset)[0],Re=oe&&(Et>St||Et<dt)&&v.call(this);Re&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],zt,Rt,null).clip().discardPath()),this.pdf.text(Kt,Ye.x,Ye.y,{angle:F.angle,align:$,renderingMode:F.renderingMode}),Re&&this.pdf.restoreGraphicsState()}}else Xt.y<Lt&&(this.ctx.prevPageLastElemOffset+=Lt-Xt.y);F.scale>=.01&&(this.pdf.setFontSize(Ot),this.lineWidth=K)}else F.scale>=.01&&(Ot=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ot*F.scale),K=this.lineWidth,this.lineWidth=K*F.scale),this.pdf.text(F.text,gt.x+this.posX,gt.y+this.posY,{angle:F.angle,align:$,renderingMode:F.renderingMode,maxWidth:F.maxWidth}),F.scale>=.01&&(this.pdf.setFontSize(Ot),this.lineWidth=K)},M=function(F,$,j,X){j=j||0,X=X||0,this.pdf.internal.out(t(F+j)+" "+n($+X)+" l")},D=function(F,$,j){return this.pdf.lines(F,$,j,null,null)},W=function(F,$,j,X,it,gt,wt,at){this.pdf.internal.out([e(i(j+F)),e(a(X+$)),e(i(it+F)),e(a(gt+$)),e(i(wt+F)),e(a(at+$)),"c"].join(" "))},z=function(F,$,j,X){for(var it=2*Math.PI,gt=Math.PI/2;$>j;)$-=it;var wt=Math.abs(j-$);wt<it&&X&&(wt=it-wt);for(var at=[],Pt=X?-1:1,Ot=$;wt>1e-5;){var K=Ot+Pt*Math.min(wt,gt);at.push(tt.call(this,F,Ot,K)),wt-=Math.abs(K-Ot),Ot=K}return at},tt=function(F,$,j){var X=(j-$)/2,it=F*Math.cos(X),gt=F*Math.sin(X),wt=it,at=-gt,Pt=wt*wt+at*at,Ot=Pt+wt*it+at*gt,K=4/3*(Math.sqrt(2*Pt*Ot)-Ot)/(wt*gt-at*it),Z=wt-K*at,pt=at+K*wt,et=Z,G=-pt,bt=X+$,St=Math.cos(bt),dt=Math.sin(bt);return{x1:F*Math.cos($),y1:F*Math.sin($),x2:Z*St-pt*dt,y2:Z*dt+pt*St,x3:et*St-G*dt,y3:et*dt+G*St,x4:F*Math.cos(j),y4:F*Math.sin(j)}},q=function(F){return 180*F/Math.PI},rt=function(F,$,j,X,it,gt){var wt=F+.5*(j-F),at=$+.5*(X-$),Pt=it+.5*(j-it),Ot=gt+.5*(X-gt),K=Math.min(F,it,wt,Pt),Z=Math.max(F,it,wt,Pt),pt=Math.min($,gt,at,Ot),et=Math.max($,gt,at,Ot);return new s(K,pt,Z-K,et-pt)},nt=function(F,$,j,X,it,gt,wt,at){var Pt,Ot,K,Z,pt,et,G,bt,St,dt,Et,yt,xt,Lt,Rt=j-F,Vt=X-$,zt=it-j,ie=gt-X,ee=wt-it,Xt=at-gt;for(Ot=0;Ot<41;Ot++)St=(G=(K=F+(Pt=Ot/40)*Rt)+Pt*((pt=j+Pt*zt)-K))+Pt*(pt+Pt*(it+Pt*ee-pt)-G),dt=(bt=(Z=$+Pt*Vt)+Pt*((et=X+Pt*ie)-Z))+Pt*(et+Pt*(gt+Pt*Xt-et)-bt),Ot==0?(Et=St,yt=dt,xt=St,Lt=dt):(Et=Math.min(Et,St),yt=Math.min(yt,dt),xt=Math.max(xt,St),Lt=Math.max(Lt,dt));return new s(Math.round(Et),Math.round(yt),Math.round(xt-Et),Math.round(Lt-yt))},_t=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var F,$,j=(F=this.ctx.lineDash,$=this.ctx.lineDashOffset,JSON.stringify({lineDash:F,lineDashOffset:$}));this.prevLineDash!==j&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=j)}}})(Ne.API),function(r){var e=function(a){var o,s,A,l,u,h,c,f,d,v;for(s=[],A=0,l=(a+=o="\0\0\0\0".slice(a.length%4||4)).length;l>A;A+=4)(u=(a.charCodeAt(A)<<24)+(a.charCodeAt(A+1)<<16)+(a.charCodeAt(A+2)<<8)+a.charCodeAt(A+3))!==0?(h=(u=((u=((u=((u=(u-(v=u%85))/85)-(d=u%85))/85)-(f=u%85))/85)-(c=u%85))/85)%85,s.push(h+33,c+33,f+33,d+33,v+33)):s.push(122);return function(y,m){for(var w=m;w>0;w--)y.pop()}(s,o.length),String.fromCharCode.apply(String,s)+"~>"},t=function(a){var o,s,A,l,u,h=String,c="length",f=255,d="charCodeAt",v="slice",y="replace";for(a[v](-2),a=a[v](0,-2)[y](/\s/g,"")[y]("z","!!!!!"),A=[],l=0,u=(a+=o="uuuuu"[v](a[c]%5||5))[c];u>l;l+=5)s=52200625*(a[d](l)-33)+614125*(a[d](l+1)-33)+7225*(a[d](l+2)-33)+85*(a[d](l+3)-33)+(a[d](l+4)-33),A.push(f&s>>24,f&s>>16,f&s>>8,f&s);return function(m,w){for(var C=w;C>0;C--)m.pop()}(A,o[c]),h.fromCharCode.apply(h,A)},n=function(a){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),o.test(a)===!1)return"";for(var s="",A=0;A<a.length;A+=2)s+=String.fromCharCode("0x"+(a[A]+a[A+1]));return s},i=function(a){for(var o=new Uint8Array(a.length),s=a.length;s--;)o[s]=a.charCodeAt(s);return a=(o=dT(o)).reduce(function(A,l){return A+String.fromCharCode(l)},"")};r.processDataByFilters=function(a,o){var s=0,A=a||"",l=[];for(typeof(o=o||[])=="string"&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case"ASCII85Decode":case"/ASCII85Decode":A=t(A),l.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":A=e(A),l.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":A=n(A),l.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":A=A.split("").map(function(u){return("0"+u.charCodeAt().toString(16)).slice(-2)}).join("")+">",l.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":A=i(A),l.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[s]+'" is not implemented')}return{data:A,reverseChain:l.reverse().join(" ")}}}(Ne.API),function(r){r.loadFile=function(e,t,n){return function(i,a,o){a=a!==!1,o=typeof o=="function"?o:function(){};var s=void 0;try{s=function(A,l,u){var h=new XMLHttpRequest,c=0,f=function(d){var v=d.length,y=[],m=String.fromCharCode;for(c=0;c<v;c+=1)y.push(m(255&d.charCodeAt(c)));return y.join("")};if(h.open("GET",A,!l),h.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(h.onload=function(){h.status===200?u(f(this.responseText)):u(void 0)}),h.send(null),l&&h.status===200)return f(h.responseText)}(i,a,o)}catch{}return s}(e,t,n)},r.loadImageFile=r.loadFile}(Ne.API),function(r){function e(){return(Qe.html2canvas?Promise.resolve(Qe.html2canvas):Promise.resolve().then(function(){return Fgt})).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function t(){return(Qe.DOMPurify?Promise.resolve(Qe.DOMPurify):Promise.resolve().then(function(){return Jgt})).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var n=function(o){var s=Jr(o);return s==="undefined"?"undefined":s==="string"||o instanceof String?"string":s==="number"||o instanceof Number?"number":s==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":s==="object"?"object":"unknown"},i=function(o,s){var A=document.createElement(o);for(var l in s.className&&(A.className=s.className),s.innerHTML&&s.dompurify&&(A.innerHTML=s.dompurify.sanitize(s.innerHTML)),s.style)A.style[l]=s.style[l];return A},a=function o(s){var A=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),l=o.convert(Promise.resolve(),A);return l=(l=l.setProgress(1,o,1,[o])).set(s)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(o,s){return o.__proto__=s||a.prototype,o},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(o,s){return this.then(function(){switch(s=s||function(A){switch(n(A)){case"string":return"string";case"element":return A.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o)){case"string":return this.then(t).then(function(A){return this.set({src:i("div",{innerHTML:o,dompurify:A})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},a.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},s=function A(l,u){for(var h=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),c=l.firstChild;c;c=c.nextSibling)u!==!0&&c.nodeType===1&&c.nodeName==="SCRIPT"||h.appendChild(A(c,u));return l.nodeType===1&&(l.nodeName==="CANVAS"?(h.width=l.width,h.height=l.height,h.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(h.value=l.value),h.addEventListener("load",function(){h.scrollTop=l.scrollTop,h.scrollLeft=l.scrollLeft},!0)),h}(this.prop.src,this.opt.html2canvas.javascriptEnabled);s.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(s),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(s){var A=Object.assign({},this.opt.html2canvas);return delete A.onrendered,s(this.prop.container,A)}).then(function(s){(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(s){var A=this.opt.jsPDF,l=this.opt.fontFaces,u=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,h=Object.assign({async:!0,allowTaint:!0,scale:u,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete h.onrendered,A.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,A.context2d.posX=this.opt.x,A.context2d.posY=this.opt.y,A.context2d.margin=this.opt.margin,A.context2d.fontFaces=l,l)for(var c=0;c<l.length;++c){var f=l[c],d=f.src.find(function(v){return v.format==="truetype"});d&&A.addFont(d.url,f.ref.name,f.ref.style)}return h.windowHeight=h.windowHeight||0,h.windowHeight=h.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):h.windowHeight,A.context2d.save(!0),s(this.prop.container,h)}).then(function(s){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(s),this.prop.canvas=s,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(o,s,A){return(A=A||"pdf").toLowerCase()==="img"||A.toLowerCase()==="image"?this.outputImg(o,s):this.outputPdf(o,s)},a.prototype.outputPdf=function(o,s){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,s)})},a.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},a.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(o){if(n(o)!=="object")return this;var s=Object.keys(o||{}).map(function(A){if(A in a.template.prop)return function(){this.prop[A]=o[A]};switch(A){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[A]=o[A]}}},this);return this.then(function(){return this.thenList(s)})},a.prototype.get=function(o,s){return this.then(function(){var A=o in a.template.prop?this.prop[o]:this.opt[o];return s?s(A):A})},a.prototype.setMargin=function(o){return this.then(function(){switch(n(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},a.prototype.setPageSize=function(o){function s(A,l){return Math.floor(A*l/72*96)}return this.then(function(){(o=o||Ne.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:s(o.inner.width,o.k),height:s(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},a.prototype.setProgress=function(o,s,A,l){return o!=null&&(this.progress.val=o),s!=null&&(this.progress.state=s),A!=null&&(this.progress.n=A),l!=null&&(this.progress.stack=l),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(o,s,A,l){return this.setProgress(o?this.progress.val+o:null,s||null,A?this.progress.n+A:null,l?this.progress.stack.concat(l):null)},a.prototype.then=function(o,s){var A=this;return this.thenCore(o,s,function(l,u){return A.updateProgress(null,null,1,[l]),Promise.prototype.then.call(this,function(h){return A.updateProgress(null,l),h}).then(l,u).then(function(h){return A.updateProgress(1),h})})},a.prototype.thenCore=function(o,s,A){A=A||Promise.prototype.then,o&&(o=o.bind(this)),s&&(s=s.bind(this));var l=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?this:a.convert(Object.assign({},this),Promise.prototype),u=A.call(l,o,s);return a.convert(u,this.__proto__)},a.prototype.thenExternal=function(o,s){return Promise.prototype.then.call(this,o,s)},a.prototype.thenList=function(o){var s=this;return o.forEach(function(A){s=s.thenCore(A)}),s},a.prototype.catch=function(o){o&&(o=o.bind(this));var s=Promise.prototype.catch.call(this,o);return a.convert(s,this)},a.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},a.prototype.error=function(o){return this.then(function(){throw new Error(o)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,Ne.getPageSize=function(o,s,A){if(Jr(o)==="object"){var l=o;o=l.orientation,s=l.unit||s,A=l.format||A}s=s||"mm",A=A||"a4",o=(""+(o||"P")).toLowerCase();var u,h=(""+A).toLowerCase(),c={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]};switch(s){case"pt":u=1;break;case"mm":u=72/25.4;break;case"cm":u=72/2.54;break;case"in":u=72;break;case"px":u=.75;break;case"pc":case"em":u=12;break;case"ex":u=6;break;default:throw"Invalid unit: "+s}var f,d=0,v=0;if(c.hasOwnProperty(h))d=c[h][1]/u,v=c[h][0]/u;else try{d=A[1],v=A[0]}catch{throw new Error("Invalid format: "+A)}if(o==="p"||o==="portrait")o="p",v>d&&(f=v,v=d,d=f);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",d>v&&(f=v,v=d,d=f)}return{width:v,height:d,unit:s,k:u,orientation:o}},r.html=function(o,s){(s=s||{}).callback=s.callback||function(){},s.html2canvas=s.html2canvas||{},s.html2canvas.canvas=s.html2canvas.canvas||this.canvas,s.jsPDF=s.jsPDF||this,s.fontFaces=s.fontFaces?s.fontFaces.map(wT):null;var A=new a(s);return s.worker?A:A.from(o).doCallback()}}(Ne.API),Ne.API.addJS=function(r){return AO=r,this.internal.events.subscribe("postPutResources",function(){Uy=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Uy+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),sO=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+AO+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Uy!==void 0&&sO!==void 0&&this.internal.out("/Names <</JavaScript "+Uy+" 0 R>>")}),this},function(r){var e;r.events.push(["postPutResources",function(){var t=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=t.outline.render().split(/\r\n/),a=0;a<i.length;a++){var o=i[a],s=n.exec(o);if(s!=null){var A=s[1];t.internal.newObjectDeferredBegin(A,!1)}t.internal.write(o)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,u=[];for(a=0;a<l;a++){var h=t.internal.newObject();u.push(h);var c=t.internal.getPageInfo(a+1);t.internal.write("<< /D["+c.objId+" 0 R /XYZ null null null]>> endobj")}var f=t.internal.newObject();for(t.internal.write("<< /Names [ "),a=0;a<u.length;a++)t.internal.write("(page_"+(a+1)+")"+u[a]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+f+" 0 R"),t.internal.write(">>","endobj")}}]),r.events.push(["putCatalog",function(){this.outline.root.children.length>0&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+e+" 0 R"))}]),r.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(n,i,a){var o={title:i,options:a,children:[]};return n==null&&(n=this.root),n.children.push(o),o},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(n){n.id=t.internal.newObjectDeferred();for(var i=0;i<n.children.length;i++)this.genIds_r(n.children[i])},t.outline.renderRoot=function(n){this.objStart(n),this.line("/Type /Outlines"),n.children.length>0&&(this.line("/First "+this.makeRef(n.children[0])),this.line("/Last "+this.makeRef(n.children[n.children.length-1]))),this.line("/Count "+this.count_r({count:0},n)),this.objEnd()},t.outline.renderItems=function(n){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,a=0;a<n.children.length;a++){var o=n.children[a];this.objStart(o),this.line("/Title "+this.makeString(o.title)),this.line("/Parent "+this.makeRef(n)),a>0&&this.line("/Prev "+this.makeRef(n.children[a-1])),a<n.children.length-1&&this.line("/Next "+this.makeRef(n.children[a+1])),o.children.length>0&&(this.line("/First "+this.makeRef(o.children[0])),this.line("/Last "+this.makeRef(o.children[o.children.length-1])));var s=this.count=this.count_r({count:0},o);if(s>0&&this.line("/Count "+s),o.options&&o.options.pageNumber){var A=t.internal.getPageInfo(o.options.pageNumber);this.line("/Dest ["+A.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var l=0;l<n.children.length;l++)this.renderItems(n.children[l])},t.outline.line=function(n){this.ctx.val+=n+`\r
|
||
`},t.outline.makeRef=function(n){return n.id+" 0 R"},t.outline.makeString=function(n){return"("+t.internal.pdfEscape(n)+")"},t.outline.objStart=function(n){this.ctx.val+=`\r
|
||
`+n.id+` 0 obj\r
|
||
<<\r
|
||
`},t.outline.objEnd=function(){this.ctx.val+=`>> \r
|
||
endobj\r
|
||
`},t.outline.count_r=function(n,i){for(var a=0;a<i.children.length;a++)n.count++,this.count_r(n,i.children[a]);return n.count}}])}(Ne.API),function(r){var e=[192,193,194,195,196,197,198,199];r.processJPEG=function(t,n,i,a,o,s){var A,l=this.decode.DCT_DECODE,u=null;if(typeof t=="string"||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=o||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,(A=function(h){for(var c,f=256*h.charCodeAt(4)+h.charCodeAt(5),d=h.length,v={width:0,height:0,numcomponents:1},y=4;y<d;y+=2){if(y+=f,e.indexOf(h.charCodeAt(y+1))!==-1){c=256*h.charCodeAt(y+5)+h.charCodeAt(y+6),v={width:256*h.charCodeAt(y+7)+h.charCodeAt(y+8),height:c,numcomponents:h.charCodeAt(y+9)};break}f=256*h.charCodeAt(y+2)+h.charCodeAt(y+3)}return v}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t)).numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}u={data:t,width:A.width,height:A.height,colorSpace:s,bitsPerComponent:8,filter:l,index:n,alias:i}}return u}}(Ne.API);var Hc,Dy,lO,uO,hO,lnt=function(){var r,e,t;function n(a){var o,s,A,l,u,h,c,f,d,v,y,m,w,C;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},h=null;;){switch(o=this.readUInt32(),d=function(){var B,R;for(R=[],B=0;B<4;++B)R.push(String.fromCharCode(this.data[this.pos++]));return R}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(o);break;case"fcTL":h&&this.animation.frames.push(h),this.pos+=4,h={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},u=this.readUInt16(),l=this.readUInt16()||100,h.delay=1e3*u/l,h.disposeOp=this.data[this.pos++],h.blendOp=this.data[this.pos++],h.data=[];break;case"IDAT":case"fdAT":for(d==="fdAT"&&(this.pos+=4,o-=4),a=(h!=null?h.data:void 0)||this.imgData,m=0;0<=o?m<o:m>o;0<=o?++m:--m)a.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(A=this.palette.length/3,this.transparency.indexed=this.read(o),this.transparency.indexed.length>A)throw new Error("More transparent colors than palette size");if((v=A-this.transparency.indexed.length)>0)for(w=0;0<=v?w<v:w>v;0<=v?++w:--w)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(o)[0];break;case 2:this.transparency.rgb=this.read(o)}break;case"tEXt":c=(y=this.read(o)).indexOf(0),f=String.fromCharCode.apply(String,y.slice(0,c)),this.text[f]=String.fromCharCode.apply(String,y.slice(c+1));break;case"IEND":return h&&this.animation.frames.push(h),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=(C=this.colorType)===4||C===6,s=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*s,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=o}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}n.prototype.read=function(a){var o,s;for(s=[],o=0;0<=a?o<a:o>a;0<=a?++o:--o)s.push(this.data[this.pos++]);return s},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(a){var o=this.pixelBitlength/8,s=new Uint8Array(this.width*this.height*o),A=0,l=this;if(a==null&&(a=this.imgData),a.length===0)return new Uint8Array(0);function u(h,c,f,d){var v,y,m,w,C,B,R,O,I,T,L,P,S,x,M,D,W,z,tt,q,rt,nt=Math.ceil((l.width-h)/f),_t=Math.ceil((l.height-c)/d),F=l.width==nt&&l.height==_t;for(x=o*nt,P=F?s:new Uint8Array(x*_t),B=a.length,S=0,y=0;S<_t&&A<B;){switch(a[A++]){case 0:for(w=W=0;W<x;w=W+=1)P[y++]=a[A++];break;case 1:for(w=z=0;z<x;w=z+=1)v=a[A++],C=w<o?0:P[y-o],P[y++]=(v+C)%256;break;case 2:for(w=tt=0;tt<x;w=tt+=1)v=a[A++],m=(w-w%o)/o,M=S&&P[(S-1)*x+m*o+w%o],P[y++]=(M+v)%256;break;case 3:for(w=q=0;q<x;w=q+=1)v=a[A++],m=(w-w%o)/o,C=w<o?0:P[y-o],M=S&&P[(S-1)*x+m*o+w%o],P[y++]=(v+Math.floor((C+M)/2))%256;break;case 4:for(w=rt=0;rt<x;w=rt+=1)v=a[A++],m=(w-w%o)/o,C=w<o?0:P[y-o],S===0?M=D=0:(M=P[(S-1)*x+m*o+w%o],D=m&&P[(S-1)*x+(m-1)*o+w%o]),R=C+M-D,O=Math.abs(R-C),T=Math.abs(R-M),L=Math.abs(R-D),I=O<=T&&O<=L?C:T<=L?M:D,P[y++]=(v+I)%256;break;default:throw new Error("Invalid filter algorithm: "+a[A-1])}if(!F){var $=((c+S*d)*l.width+h)*o,j=S*x;for(w=0;w<nt;w+=1){for(var X=0;X<o;X+=1)s[$++]=P[j++];$+=(f-1)*o}}S++}}return a=$rt(a),l.interlaceMethod==1?(u(0,0,8,8),u(4,0,8,8),u(0,4,4,8),u(2,0,4,4),u(0,2,2,4),u(1,0,2,2),u(0,1,1,2)):u(0,0,1,1),s},n.prototype.decodePalette=function(){var a,o,s,A,l,u,h,c,f;for(s=this.palette,u=this.transparency.indexed||[],l=new Uint8Array((u.length||0)+s.length),A=0,a=0,o=h=0,c=s.length;h<c;o=h+=3)l[A++]=s[o],l[A++]=s[o+1],l[A++]=s[o+2],l[A++]=(f=u[a++])!=null?f:255;return l},n.prototype.copyToImageData=function(a,o){var s,A,l,u,h,c,f,d,v,y,m;if(A=this.colors,v=null,s=this.hasAlphaChannel,this.palette.length&&(v=(m=this._decodedPalette)!=null?m:this._decodedPalette=this.decodePalette(),A=4,s=!0),d=(l=a.data||a).length,h=v||o,u=c=0,A===1)for(;u<d;)f=v?4*o[u/4]:c,y=h[f++],l[u++]=y,l[u++]=y,l[u++]=y,l[u++]=s?h[f++]:255,c=f;else for(;u<d;)f=v?4*o[u/4]:c,l[u++]=h[f++],l[u++]=h[f++],l[u++]=h[f++],l[u++]=s?h[f++]:255,c=f},n.prototype.decode=function(){var a;return a=new Uint8Array(this.width*this.height*4),this.copyToImageData(a,this.decodePixels()),a};var i=function(){if(Object.prototype.toString.call(Qe)==="[object Window]"){try{e=Qe.document.createElement("canvas"),t=e.getContext("2d")}catch{return!1}return!0}return!1};return i(),r=function(a){var o;if(i()===!0)return t.width=a.width,t.height=a.height,t.clearRect(0,0,a.width,a.height),t.putImageData(a,0,0),(o=new Image).src=e.toDataURL(),o;throw new Error("This method requires a Browser with Canvas-capability.")},n.prototype.decodeFrames=function(a){var o,s,A,l,u,h,c,f;if(this.animation){for(f=[],s=u=0,h=(c=this.animation.frames).length;u<h;s=++u)o=c[s],A=a.createImageData(o.width,o.height),l=this.decodePixels(new Uint8Array(o.data)),this.copyToImageData(A,l),o.imageData=A,f.push(o.image=r(A));return f}},n.prototype.renderFrame=function(a,o){var s,A,l;return s=(A=this.animation.frames)[o],l=A[o-1],o===0&&a.clearRect(0,0,this.width,this.height),(l!=null?l.disposeOp:void 0)===1?a.clearRect(l.xOffset,l.yOffset,l.width,l.height):(l!=null?l.disposeOp:void 0)===2&&a.putImageData(l.imageData,l.xOffset,l.yOffset),s.blendOp===0&&a.clearRect(s.xOffset,s.yOffset,s.width,s.height),a.drawImage(s.image,s.xOffset,s.yOffset)},n.prototype.animate=function(a){var o,s,A,l,u,h,c=this;return s=0,h=this.animation,l=h.numFrames,A=h.frames,u=h.numPlays,(o=function(){var f,d;if(f=s++%l,d=A[f],c.renderFrame(a,f),l>1&&s/l<u)return c.animation._timeout=setTimeout(o,d.delay)})()},n.prototype.stopAnimation=function(){var a;return clearTimeout((a=this.animation)!=null?a._timeout:void 0)},n.prototype.render=function(a){var o,s;return a._png&&a._png.stopAnimation(),a._png=this,a.width=this.width,a.height=this.height,o=a.getContext("2d"),this.animation?(this.decodeFrames(o),this.animate(o)):(s=o.createImageData(this.width,this.height),this.copyToImageData(s,this.decodePixels()),o.putImageData(s,0,0))},n}();/**
|
||
* @license
|
||
*
|
||
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
|
||
*
|
||
* 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.
|
||
* ====================================================================
|
||
*//**
|
||
* @license
|
||
* (c) Dean McNamee <dean@gmail.com>, 2013.
|
||
*
|
||
* https://github.com/deanm/omggif
|
||
*
|
||
* 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.
|
||
*
|
||
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
|
||
* including animation and compression. It does not rely on any specific
|
||
* underlying system, so should run in the browser, Node, or Plask.
|
||
*/function unt(r){var e=0;if(r[e++]!==71||r[e++]!==73||r[e++]!==70||r[e++]!==56||(r[e++]+1&253)!=56||r[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var t=r[e++]|r[e++]<<8,n=r[e++]|r[e++]<<8,i=r[e++],a=i>>7,o=1<<(7&i)+1;r[e++],r[e++];var s=null,A=null;a&&(s=e,A=o,e+=3*o);var l=!0,u=[],h=0,c=null,f=0,d=null;for(this.width=t,this.height=n;l&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,d=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((S=r[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var v=r[e++];h=r[e++]|r[e++]<<8,c=r[e++],!(1&v)&&(c=null),f=v>>2&7,e++;break;case 254:for(;;){if(!((S=r[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var y=r[e++]|r[e++]<<8,m=r[e++]|r[e++]<<8,w=r[e++]|r[e++]<<8,C=r[e++]|r[e++]<<8,B=r[e++],R=B>>6&1,O=1<<(7&B)+1,I=s,T=A,L=!1;B>>7&&(L=!0,I=e,T=O,e+=3*O);var P=e;for(e++;;){var S;if(!((S=r[e++])>=0))throw Error("Invalid block size");if(S===0)break;e+=S}u.push({x:y,y:m,width:w,height:C,has_local_palette:L,palette_offset:I,palette_size:T,data_offset:P,data_length:e-P,transparent_index:c,interlaced:!!R,delay:h,disposal:f});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+r[e-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return d},this.frameInfo=function(x){if(x<0||x>=u.length)throw new Error("Frame index out of range.");return u[x]},this.decodeAndBlitFrameBGRA=function(x,M){var D=this.frameInfo(x),W=D.width*D.height,z=new Uint8Array(W);cO(r,D.data_offset,z,W);var tt=D.palette_offset,q=D.transparent_index;q===null&&(q=256);var rt=D.width,nt=t-rt,_t=rt,F=4*(D.y*t+D.x),$=4*((D.y+D.height)*t+D.x),j=F,X=4*nt;D.interlaced===!0&&(X+=4*t*7);for(var it=8,gt=0,wt=z.length;gt<wt;++gt){var at=z[gt];if(_t===0&&(_t=rt,(j+=X)>=$&&(X=4*nt+4*t*(it-1),j=F+(rt+nt)*(it<<1),it>>=1)),at===q)j+=4;else{var Pt=r[tt+3*at],Ot=r[tt+3*at+1],K=r[tt+3*at+2];M[j++]=K,M[j++]=Ot,M[j++]=Pt,M[j++]=255}--_t}},this.decodeAndBlitFrameRGBA=function(x,M){var D=this.frameInfo(x),W=D.width*D.height,z=new Uint8Array(W);cO(r,D.data_offset,z,W);var tt=D.palette_offset,q=D.transparent_index;q===null&&(q=256);var rt=D.width,nt=t-rt,_t=rt,F=4*(D.y*t+D.x),$=4*((D.y+D.height)*t+D.x),j=F,X=4*nt;D.interlaced===!0&&(X+=4*t*7);for(var it=8,gt=0,wt=z.length;gt<wt;++gt){var at=z[gt];if(_t===0&&(_t=rt,(j+=X)>=$&&(X=4*nt+4*t*(it-1),j=F+(rt+nt)*(it<<1),it>>=1)),at===q)j+=4;else{var Pt=r[tt+3*at],Ot=r[tt+3*at+1],K=r[tt+3*at+2];M[j++]=Pt,M[j++]=Ot,M[j++]=K,M[j++]=255}--_t}}}function cO(r,e,t,n){for(var i=r[e++],a=1<<i,o=a+1,s=o+1,A=i+1,l=(1<<A)-1,u=0,h=0,c=0,f=r[e++],d=new Int32Array(4096),v=null;;){for(;u<16&&f!==0;)h|=r[e++]<<u,u+=8,f===1?f=r[e++]:--f;if(u<A)break;var y=h&l;if(h>>=A,u-=A,y!==a){if(y===o)break;for(var m=y<s?y:v,w=0,C=m;C>a;)C=d[C]>>8,++w;var B=C;if(c+w+(m!==y?1:0)>n)return void sn.log("Warning, gif stream longer than expected.");t[c++]=B;var R=c+=w;for(m!==y&&(t[c++]=B),C=m;w--;)C=d[C],t[--R]=255&C,C>>=8;v!==null&&s<4096&&(d[s++]=v<<8|B,s>=l+1&&A<12&&(++A,l=l<<1|1)),v=y}else s=o+1,l=(1<<(A=i+1))-1,v=null}return c!==n&&sn.log("Warning, gif stream shorter than expected."),t}/**
|
||
* @license
|
||
Copyright (c) 2008, Adobe Systems Incorporated
|
||
All rights reserved.
|
||
|
||
Redistribution and use in source and binary forms, with or without
|
||
modification, are permitted provided that the following conditions are
|
||
met:
|
||
|
||
* Redistributions of source code must retain the above copyright notice,
|
||
this list of conditions and the following disclaimer.
|
||
|
||
* Redistributions in binary form must reproduce the above copyright
|
||
notice, this list of conditions and the following disclaimer in the
|
||
documentation and/or other materials provided with the distribution.
|
||
|
||
* Neither the name of Adobe Systems Incorporated nor the names of its
|
||
contributors may be used to endorse or promote products derived from
|
||
this software without specific prior written permission.
|
||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
*/function bE(r){var e,t,n,i,a,o=Math.floor,s=new Array(64),A=new Array(64),l=new Array(64),u=new Array(64),h=new Array(65535),c=new Array(65535),f=new Array(64),d=new Array(64),v=[],y=0,m=7,w=new Array(64),C=new Array(64),B=new Array(64),R=new Array(256),O=new Array(2048),I=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],S=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],x=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],M=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],W=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function z(F,$){for(var j=0,X=0,it=new Array,gt=1;gt<=16;gt++){for(var wt=1;wt<=F[gt];wt++)it[$[X]]=[],it[$[X]][0]=j,it[$[X]][1]=gt,X++,j++;j*=2}return it}function tt(F){for(var $=F[0],j=F[1]-1;j>=0;)$&1<<j&&(y|=1<<m),j--,--m<0&&(y==255?(q(255),q(0)):q(y),m=7,y=0)}function q(F){v.push(F)}function rt(F){q(F>>8&255),q(255&F)}function nt(F,$,j,X,it){for(var gt,wt=it[0],at=it[240],Pt=function(dt,Et){var yt,xt,Lt,Rt,Vt,zt,ie,ee,Xt,oe,Kt=0;for(Xt=0;Xt<8;++Xt){yt=dt[Kt],xt=dt[Kt+1],Lt=dt[Kt+2],Rt=dt[Kt+3],Vt=dt[Kt+4],zt=dt[Kt+5],ie=dt[Kt+6];var Ye=yt+(ee=dt[Kt+7]),Re=yt-ee,fr=xt+ie,be=xt-ie,xe=Lt+zt,nn=Lt-zt,ar=Rt+Vt,_i=Rt-Vt,Br=Ye+ar,ai=Ye-ar,$r=fr+xe,Vr=fr-xe;dt[Kt]=Br+$r,dt[Kt+4]=Br-$r;var Oe=.707106781*(Vr+ai);dt[Kt+2]=ai+Oe,dt[Kt+6]=ai-Oe;var mr=.382683433*((Br=_i+nn)-(Vr=be+Re)),Gn=.5411961*Br+mr,ln=1.306562965*Vr+mr,wi=.707106781*($r=nn+be),Ei=Re+wi,Se=Re-wi;dt[Kt+5]=Se+Gn,dt[Kt+3]=Se-Gn,dt[Kt+1]=Ei+ln,dt[Kt+7]=Ei-ln,Kt+=8}for(Kt=0,Xt=0;Xt<8;++Xt){yt=dt[Kt],xt=dt[Kt+8],Lt=dt[Kt+16],Rt=dt[Kt+24],Vt=dt[Kt+32],zt=dt[Kt+40],ie=dt[Kt+48];var oi=yt+(ee=dt[Kt+56]),Mn=yt-ee,Ci=xt+ie,tn=xt-ie,Wr=Lt+zt,yn=Lt-zt,ho=Rt+Vt,se=Rt-Vt,ht=oi+ho,Qt=oi-ho,qt=Ci+Wr,Ze=Ci-Wr;dt[Kt]=ht+qt,dt[Kt+32]=ht-qt;var Ir=.707106781*(Ze+Qt);dt[Kt+16]=Qt+Ir,dt[Kt+48]=Qt-Ir;var an=.382683433*((ht=se+yn)-(Ze=tn+Mn)),mn=.5411961*ht+an,qo=1.306562965*Ze+an,Bi=.707106781*(qt=yn+tn),gA=Mn+Bi,gl=Mn-Bi;dt[Kt+40]=gl+mn,dt[Kt+24]=gl-mn,dt[Kt+8]=gA+qo,dt[Kt+56]=gA-qo,Kt++}for(Xt=0;Xt<64;++Xt)oe=dt[Xt]*Et[Xt],f[Xt]=oe>0?oe+.5|0:oe-.5|0;return f}(F,$),Ot=0;Ot<64;++Ot)d[I[Ot]]=Pt[Ot];var K=d[0]-j;j=d[0],K==0?tt(X[0]):(tt(X[c[gt=32767+K]]),tt(h[gt]));for(var Z=63;Z>0&&d[Z]==0;)Z--;if(Z==0)return tt(wt),j;for(var pt,et=1;et<=Z;){for(var G=et;d[et]==0&&et<=Z;)++et;var bt=et-G;if(bt>=16){pt=bt>>4;for(var St=1;St<=pt;++St)tt(at);bt&=15}gt=32767+d[et],tt(it[(bt<<4)+c[gt]]),tt(h[gt]),et++}return Z!=63&&tt(wt),j}function _t(F){F=Math.min(Math.max(F,1),100),a!=F&&(function($){for(var j=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],X=0;X<64;X++){var it=o((j[X]*$+50)/100);it=Math.min(Math.max(it,1),255),s[I[X]]=it}for(var gt=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],wt=0;wt<64;wt++){var at=o((gt[wt]*$+50)/100);at=Math.min(Math.max(at,1),255),A[I[wt]]=at}for(var Pt=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ot=0,K=0;K<8;K++)for(var Z=0;Z<8;Z++)l[Ot]=1/(s[I[Ot]]*Pt[K]*Pt[Z]*8),u[Ot]=1/(A[I[Ot]]*Pt[K]*Pt[Z]*8),Ot++}(F<50?Math.floor(5e3/F):Math.floor(200-2*F)),a=F)}this.encode=function(F,$){$&&_t($),v=new Array,y=0,m=7,rt(65496),rt(65504),rt(16),q(74),q(70),q(73),q(70),q(0),q(1),q(1),q(0),rt(1),rt(1),q(0),q(0),function(){rt(65499),rt(132),q(0);for(var xt=0;xt<64;xt++)q(s[xt]);q(1);for(var Lt=0;Lt<64;Lt++)q(A[Lt])}(),function(xt,Lt){rt(65472),rt(17),q(8),rt(Lt),rt(xt),q(3),q(1),q(17),q(0),q(2),q(17),q(1),q(3),q(17),q(1)}(F.width,F.height),function(){rt(65476),rt(418),q(0);for(var xt=0;xt<16;xt++)q(T[xt+1]);for(var Lt=0;Lt<=11;Lt++)q(L[Lt]);q(16);for(var Rt=0;Rt<16;Rt++)q(P[Rt+1]);for(var Vt=0;Vt<=161;Vt++)q(S[Vt]);q(1);for(var zt=0;zt<16;zt++)q(x[zt+1]);for(var ie=0;ie<=11;ie++)q(M[ie]);q(17);for(var ee=0;ee<16;ee++)q(D[ee+1]);for(var Xt=0;Xt<=161;Xt++)q(W[Xt])}(),rt(65498),rt(12),q(3),q(1),q(0),q(2),q(17),q(3),q(17),q(0),q(63),q(0);var j=0,X=0,it=0;y=0,m=7,this.encode.displayName="_encode_";for(var gt,wt,at,Pt,Ot,K,Z,pt,et,G=F.data,bt=F.width,St=F.height,dt=4*bt,Et=0;Et<St;){for(gt=0;gt<dt;){for(Ot=dt*Et+gt,Z=-1,pt=0,et=0;et<64;et++)K=Ot+(pt=et>>3)*dt+(Z=4*(7&et)),Et+pt>=St&&(K-=dt*(Et+1+pt-St)),gt+Z>=dt&&(K-=gt+Z-dt+4),wt=G[K++],at=G[K++],Pt=G[K++],w[et]=(O[wt]+O[at+256>>0]+O[Pt+512>>0]>>16)-128,C[et]=(O[wt+768>>0]+O[at+1024>>0]+O[Pt+1280>>0]>>16)-128,B[et]=(O[wt+1280>>0]+O[at+1536>>0]+O[Pt+1792>>0]>>16)-128;j=nt(w,l,j,e,n),X=nt(C,u,X,t,i),it=nt(B,u,it,t,i),gt+=32}Et+=8}if(m>=0){var yt=[];yt[1]=m+1,yt[0]=(1<<m+1)-1,tt(yt)}return rt(65497),new Uint8Array(v)},r=r||50,function(){for(var F=String.fromCharCode,$=0;$<256;$++)R[$]=F($)}(),e=z(T,L),t=z(x,M),n=z(P,S),i=z(D,W),function(){for(var F=1,$=2,j=1;j<=15;j++){for(var X=F;X<$;X++)c[32767+X]=j,h[32767+X]=[],h[32767+X][1]=j,h[32767+X][0]=X;for(var it=-($-1);it<=-F;it++)c[32767+it]=j,h[32767+it]=[],h[32767+it][1]=j,h[32767+it][0]=$-1+it;F<<=1,$<<=1}}(),function(){for(var F=0;F<256;F++)O[F]=19595*F,O[F+256>>0]=38470*F,O[F+512>>0]=7471*F+32768,O[F+768>>0]=-11059*F,O[F+1024>>0]=-21709*F,O[F+1280>>0]=32768*F+8421375,O[F+1536>>0]=-27439*F,O[F+1792>>0]=-5329*F}(),_t(r)}/**
|
||
* @license
|
||
* Copyright (c) 2017 Aras Abbasi
|
||
*
|
||
* Licensed under the MIT License.
|
||
* http://opensource.org/licenses/mit-license
|
||
*/function ls(r,e){if(this.pos=0,this.buffer=r,this.datav=new DataView(r.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function fO(r){function e(T){if(!T)throw Error("assert :P")}function t(T,L,P){for(var S=0;4>S;S++)if(T[L+S]!=P.charCodeAt(S))return!0;return!1}function n(T,L,P,S,x){for(var M=0;M<x;M++)T[L+M]=P[S+M]}function i(T,L,P,S){for(var x=0;x<S;x++)T[L+x]=P}function a(T){return new Int32Array(T)}function o(T,L){for(var P=[],S=0;S<T;S++)P.push(new L);return P}function s(T,L){var P=[];return function S(x,M,D){for(var W=D[M],z=0;z<W&&(x.push(D.length>M+1?[]:new L),!(D.length<M+1));z++)S(x[z],M+1,D)}(P,0,T),P}var A=function(){var T=this;function L(p,g){for(var E=1<<g-1>>>0;p&E;)E>>>=1;return E?(p&E-1)+E:p}function P(p,g,E,b,N){e(!(b%E));do p[g+(b-=E)]=N;while(0<b)}function S(p,g,E,b,N){if(e(2328>=N),512>=N)var Q=a(512);else if((Q=a(N))==null)return 0;return function(H,k,V,Y,ct,Bt){var Tt,mt,Dt=k,Ft=1<<V,ft=a(16),vt=a(16);for(e(ct!=0),e(Y!=null),e(H!=null),e(0<V),mt=0;mt<ct;++mt){if(15<Y[mt])return 0;++ft[Y[mt]]}if(ft[0]==ct)return 0;for(vt[1]=0,Tt=1;15>Tt;++Tt){if(ft[Tt]>1<<Tt)return 0;vt[Tt+1]=vt[Tt]+ft[Tt]}for(mt=0;mt<ct;++mt)Tt=Y[mt],0<Y[mt]&&(Bt[vt[Tt]++]=mt);if(vt[15]==1)return(Y=new x).g=0,Y.value=Bt[0],P(H,Dt,1,Ft,Y),Ft;var Nt,Ht=-1,Ut=Ft-1,ue=0,Zt=1,Me=1,te=1<<V;for(mt=0,Tt=1,ct=2;Tt<=V;++Tt,ct<<=1){if(Zt+=Me<<=1,0>(Me-=ft[Tt]))return 0;for(;0<ft[Tt];--ft[Tt])(Y=new x).g=Tt,Y.value=Bt[mt++],P(H,Dt+ue,ct,te,Y),ue=L(ue,Tt)}for(Tt=V+1,ct=2;15>=Tt;++Tt,ct<<=1){if(Zt+=Me<<=1,0>(Me-=ft[Tt]))return 0;for(;0<ft[Tt];--ft[Tt]){if(Y=new x,(ue&Ut)!=Ht){for(Dt+=te,Nt=1<<(Ht=Tt)-V;15>Ht&&!(0>=(Nt-=ft[Ht]));)++Ht,Nt<<=1;Ft+=te=1<<(Nt=Ht-V),H[k+(Ht=ue&Ut)].g=Nt+V,H[k+Ht].value=Dt-k-Ht}Y.g=Tt-V,Y.value=Bt[mt++],P(H,Dt+(ue>>V),ct,te,Y),ue=L(ue,Tt)}}return Zt!=2*vt[15]-1?0:Ft}(p,g,E,b,N,Q)}function x(){this.value=this.g=0}function M(){this.value=this.g=0}function D(){this.G=o(5,x),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Va,M)}function W(p,g,E,b){e(p!=null),e(g!=null),e(2147483648>b),p.Ca=254,p.I=0,p.b=-8,p.Ka=0,p.oa=g,p.pa=E,p.Jd=g,p.Yc=E+b,p.Zc=4<=b?E+b-4+1:E,gt(p)}function z(p,g){for(var E=0;0<g--;)E|=at(p,128)<<g;return E}function tt(p,g){var E=z(p,g);return wt(p)?-E:E}function q(p,g,E,b){var N,Q=0;for(e(p!=null),e(g!=null),e(4294967288>b),p.Sb=b,p.Ra=0,p.u=0,p.h=0,4<b&&(b=4),N=0;N<b;++N)Q+=g[E+N]<<8*N;p.Ra=Q,p.bb=b,p.oa=g,p.pa=E}function rt(p){for(;8<=p.u&&p.bb<p.Sb;)p.Ra>>>=8,p.Ra+=p.oa[p.pa+p.bb]<<Tc-8>>>0,++p.bb,p.u-=8;j(p)&&(p.h=1,p.u=0)}function nt(p,g){if(e(0<=g),!p.h&&g<=Bc){var E=$(p)&Cc[g];return p.u+=g,rt(p),E}return p.h=1,p.u=0}function _t(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function F(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function $(p){return p.Ra>>>(p.u&Tc-1)>>>0}function j(p){return e(p.bb<=p.Sb),p.h||p.bb==p.Sb&&p.u>Tc}function X(p,g){p.u=g,p.h=j(p)}function it(p){p.u>=zp&&(e(p.u>=zp),rt(p))}function gt(p){e(p!=null&&p.oa!=null),p.pa<p.Zc?(p.I=(p.oa[p.pa++]|p.I<<8)>>>0,p.b+=8):(e(p!=null&&p.oa!=null),p.pa<p.Yc?(p.b+=8,p.I=p.oa[p.pa++]|p.I<<8):p.Ka?p.b=0:(p.I<<=8,p.b+=8,p.Ka=1))}function wt(p){return z(p,1)}function at(p,g){var E=p.Ca;0>p.b&>(p);var b=p.b,N=E*g>>>8,Q=(p.I>>>b>N)+0;for(Q?(E-=N,p.I-=N+1<<b>>>0):E=N+1,b=E,N=0;256<=b;)N+=8,b>>=8;return b=7^N+ja[b],p.b-=b,p.Ca=(E<<b)-1,Q}function Pt(p,g,E){p[g+0]=E>>24&255,p[g+1]=E>>16&255,p[g+2]=E>>8&255,p[g+3]=E>>0&255}function Ot(p,g){return p[g+0]<<0|p[g+1]<<8}function K(p,g){return Ot(p,g)|p[g+2]<<16}function Z(p,g){return Ot(p,g)|Ot(p,g+2)<<16}function pt(p,g){var E=1<<g;return e(p!=null),e(0<g),p.X=a(E),p.X==null?0:(p.Mb=32-g,p.Xa=g,1)}function et(p,g){e(p!=null),e(g!=null),e(p.Xa==g.Xa),n(g.X,0,p.X,0,1<<g.Xa)}function G(){this.X=[],this.Xa=this.Mb=0}function bt(p,g,E,b){e(E!=null),e(b!=null);var N=E[0],Q=b[0];return N==0&&(N=(p*Q+g/2)/g),Q==0&&(Q=(g*N+p/2)/p),0>=N||0>=Q?0:(E[0]=N,b[0]=Q,1)}function St(p,g){return p+(1<<g)-1>>>g}function dt(p,g){return((4278255360&p)+(4278255360&g)>>>0&4278255360)+((16711935&p)+(16711935&g)>>>0&16711935)>>>0}function Et(p,g){T[g]=function(E,b,N,Q,H,k,V){var Y;for(Y=0;Y<H;++Y){var ct=T[p](k[V+Y-1],N,Q+Y);k[V+Y]=dt(E[b+Y],ct)}}}function yt(){this.ud=this.hd=this.jd=0}function xt(p,g){return((4278124286&(p^g))>>>1)+(p&g)>>>0}function Lt(p){return 0<=p&&256>p?p:0>p?0:255<p?255:void 0}function Rt(p,g){return Lt(p+(p-g+.5>>1))}function Vt(p,g,E){return Math.abs(g-E)-Math.abs(p-E)}function zt(p,g,E,b,N,Q,H){for(b=Q[H-1],E=0;E<N;++E)Q[H+E]=b=dt(p[g+E],b)}function ie(p,g,E,b,N){var Q;for(Q=0;Q<E;++Q){var H=p[g+Q],k=H>>8&255,V=16711935&(V=(V=16711935&H)+((k<<16)+k));b[N+Q]=(4278255360&H)+V>>>0}}function ee(p,g){g.jd=p>>0&255,g.hd=p>>8&255,g.ud=p>>16&255}function Xt(p,g,E,b,N,Q){var H;for(H=0;H<b;++H){var k=g[E+H],V=k>>>8,Y=k,ct=255&(ct=(ct=k>>>16)+((p.jd<<24>>24)*(V<<24>>24)>>>5));Y=255&(Y=(Y=Y+((p.hd<<24>>24)*(V<<24>>24)>>>5))+((p.ud<<24>>24)*(ct<<24>>24)>>>5)),N[Q+H]=(4278255360&k)+(ct<<16)+Y}}function oe(p,g,E,b,N){T[g]=function(Q,H,k,V,Y,ct,Bt,Tt,mt){for(V=Bt;V<Tt;++V)for(Bt=0;Bt<mt;++Bt)Y[ct++]=N(k[b(Q[H++])])},T[p]=function(Q,H,k,V,Y,ct,Bt){var Tt=8>>Q.b,mt=Q.Ea,Dt=Q.K[0],Ft=Q.w;if(8>Tt)for(Q=(1<<Q.b)-1,Ft=(1<<Tt)-1;H<k;++H){var ft,vt=0;for(ft=0;ft<mt;++ft)ft&Q||(vt=b(V[Y++])),ct[Bt++]=N(Dt[vt&Ft]),vt>>=Tt}else T["VP8LMapColor"+E](V,Y,Dt,Ft,ct,Bt,H,k,mt)}}function Kt(p,g,E,b,N){for(E=g+E;g<E;){var Q=p[g++];b[N++]=Q>>16&255,b[N++]=Q>>8&255,b[N++]=Q>>0&255}}function Ye(p,g,E,b,N){for(E=g+E;g<E;){var Q=p[g++];b[N++]=Q>>16&255,b[N++]=Q>>8&255,b[N++]=Q>>0&255,b[N++]=Q>>24&255}}function Re(p,g,E,b,N){for(E=g+E;g<E;){var Q=(H=p[g++])>>16&240|H>>12&15,H=H>>0&240|H>>28&15;b[N++]=Q,b[N++]=H}}function fr(p,g,E,b,N){for(E=g+E;g<E;){var Q=(H=p[g++])>>16&248|H>>13&7,H=H>>5&224|H>>3&31;b[N++]=Q,b[N++]=H}}function be(p,g,E,b,N){for(E=g+E;g<E;){var Q=p[g++];b[N++]=Q>>0&255,b[N++]=Q>>8&255,b[N++]=Q>>16&255}}function xe(p,g,E,b,N,Q){if(Q==0)for(E=g+E;g<E;)Pt(b,((Q=p[g++])[0]>>24|Q[1]>>8&65280|Q[2]<<8&16711680|Q[3]<<24)>>>0),N+=32;else n(b,N,p,g,E)}function nn(p,g){T[g][0]=T[p+"0"],T[g][1]=T[p+"1"],T[g][2]=T[p+"2"],T[g][3]=T[p+"3"],T[g][4]=T[p+"4"],T[g][5]=T[p+"5"],T[g][6]=T[p+"6"],T[g][7]=T[p+"7"],T[g][8]=T[p+"8"],T[g][9]=T[p+"9"],T[g][10]=T[p+"10"],T[g][11]=T[p+"11"],T[g][12]=T[p+"12"],T[g][13]=T[p+"13"],T[g][14]=T[p+"0"],T[g][15]=T[p+"0"]}function ar(p){return p==Cw||p==Bw||p==Zg||p==Tw}function _i(){this.eb=[],this.size=this.A=this.fb=0}function Br(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ai(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new _i,this.f.kb=new Br,this.sd=null}function $r(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Vr(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Oe(p){return alert("todo:WebPSamplerProcessPlane"),p.T}function mr(p,g){var E=p.T,b=g.ba.f.RGBA,N=b.eb,Q=b.fb+p.ka*b.A,H=Oo[g.ba.S],k=p.y,V=p.O,Y=p.f,ct=p.N,Bt=p.ea,Tt=p.W,mt=g.cc,Dt=g.dc,Ft=g.Mc,ft=g.Nc,vt=p.ka,Nt=p.ka+p.T,Ht=p.U,Ut=Ht+1>>1;for(vt==0?H(k,V,null,null,Y,ct,Bt,Tt,Y,ct,Bt,Tt,N,Q,null,null,Ht):(H(g.ec,g.fc,k,V,mt,Dt,Ft,ft,Y,ct,Bt,Tt,N,Q-b.A,N,Q,Ht),++E);vt+2<Nt;vt+=2)mt=Y,Dt=ct,Ft=Bt,ft=Tt,ct+=p.Rc,Tt+=p.Rc,Q+=2*b.A,H(k,(V+=2*p.fa)-p.fa,k,V,mt,Dt,Ft,ft,Y,ct,Bt,Tt,N,Q-b.A,N,Q,Ht);return V+=p.fa,p.j+Nt<p.o?(n(g.ec,g.fc,k,V,Ht),n(g.cc,g.dc,Y,ct,Ut),n(g.Mc,g.Nc,Bt,Tt,Ut),E--):1&Nt||H(k,V,null,null,Y,ct,Bt,Tt,Y,ct,Bt,Tt,N,Q+b.A,null,null,Ht),E}function Gn(p,g,E){var b=p.F,N=[p.J];if(b!=null){var Q=p.U,H=g.ba.S,k=H==qg||H==Zg;g=g.ba.f.RGBA;var V=[0],Y=p.ka;V[0]=p.T,p.Kb&&(Y==0?--V[0]:(--Y,N[0]-=p.width),p.j+p.ka+p.T==p.o&&(V[0]=p.o-p.j-Y));var ct=g.eb;Y=g.fb+Y*g.A,p=Kg(b,N[0],p.width,Q,V,ct,Y+(k?0:3),g.A),e(E==V),p&&ar(H)&&xl(ct,Y,k,Q,V,g.A)}return 0}function ln(p){var g=p.ma,E=g.ba.S,b=11>E,N=E==Xg||E==Wg||E==qg||E==Ew||E==12||ar(E);if(g.memory=null,g.Ib=null,g.Jb=null,g.Nd=null,!Kp(g.Oa,p,N?11:12))return 0;if(N&&ar(E)&&jt(),p.da)alert("todo:use_scaling");else{if(b){if(g.Ib=Oe,p.Kb){if(E=p.U+1>>1,g.memory=a(p.U+2*E),g.memory==null)return 0;g.ec=g.memory,g.fc=0,g.cc=g.ec,g.dc=g.fc+p.U,g.Mc=g.cc,g.Nc=g.dc+E,g.Ib=mr,jt()}}else alert("todo:EmitYUV");N&&(g.Jb=Gn,b&&Ct())}if(b&&!FF){for(p=0;256>p;++p)Y7[p]=89858*(p-128)+ty>>Jg,W7[p]=-22014*(p-128)+ty,X7[p]=-45773*(p-128),z7[p]=113618*(p-128)+ty>>Jg;for(p=td;p<bw;++p)g=76283*(p-16)+ty>>Jg,q7[p-td]=co(g,255),Z7[p-td]=co(g+8>>4,15);FF=1}return 1}function wi(p){var g=p.ma,E=p.U,b=p.T;return e(!(1&p.ka)),0>=E||0>=b?0:(E=g.Ib(p,g),g.Jb!=null&&g.Jb(p,g,E),g.Dc+=E,1)}function Ei(p){p.ma.memory=null}function Se(p,g,E,b){return nt(p,8)!=47?0:(g[0]=nt(p,14)+1,E[0]=nt(p,14)+1,b[0]=nt(p,1),nt(p,3)!=0?0:!p.h)}function oi(p,g){if(4>p)return p+1;var E=p-2>>1;return(2+(1&p)<<E)+nt(g,E)+1}function Mn(p,g){return 120<g?g-120:1<=(E=((E=O7[g-1])>>4)*p+(8-(15&E)))?E:1;var E}function Ci(p,g,E){var b=$(E),N=p[g+=255&b].g-8;return 0<N&&(X(E,E.u+8),b=$(E),g+=p[g].value,g+=b&(1<<N)-1),X(E,E.u+p[g].g),p[g].value}function tn(p,g,E){return E.g+=p.g,E.value+=p.value<<g>>>0,e(8>=E.g),p.g}function Wr(p,g,E){var b=p.xc;return e((g=b==0?0:p.vc[p.md*(E>>b)+(g>>b)])<p.Wb),p.Ya[g]}function yn(p,g,E,b){var N=p.ab,Q=p.c*g,H=p.C;g=H+g;var k=E,V=b;for(b=p.Ta,E=p.Ua;0<N--;){var Y=p.gc[N],ct=H,Bt=g,Tt=k,mt=V,Dt=(V=b,k=E,Y.Ea);switch(e(ct<Bt),e(Bt<=Y.nc),Y.hc){case 2:jg(Tt,mt,(Bt-ct)*Dt,V,k);break;case 0:var Ft=ct,ft=Bt,vt=V,Nt=k,Ht=(te=Y).Ea;Ft==0&&(yw(Tt,mt,null,null,1,vt,Nt),zt(Tt,mt+1,0,0,Ht-1,vt,Nt+1),mt+=Ht,Nt+=Ht,++Ft);for(var Ut=1<<te.b,ue=Ut-1,Zt=St(Ht,te.b),Me=te.K,te=te.w+(Ft>>te.b)*Zt;Ft<ft;){var Or=Me,qr=te,xr=1;for(Xp(Tt,mt,vt,Nt-Ht,1,vt,Nt);xr<Ht;){var vr=(xr&~ue)+Ut;vr>Ht&&(vr=Ht),(0,El[Or[qr++]>>8&15])(Tt,mt+ +xr,vt,Nt+xr-Ht,vr-xr,vt,Nt+xr),xr=vr}mt+=Ht,Nt+=Ht,++Ft&ue||(te+=Zt)}Bt!=Y.nc&&n(V,k-Dt,V,k+(Bt-ct-1)*Dt,Dt);break;case 1:for(Dt=Tt,ft=mt,Ht=(Tt=Y.Ea)-(Nt=Tt&~(vt=(mt=1<<Y.b)-1)),Ft=St(Tt,Y.b),Ut=Y.K,Y=Y.w+(ct>>Y.b)*Ft;ct<Bt;){for(ue=Ut,Zt=Y,Me=new yt,te=ft+Nt,Or=ft+Tt;ft<te;)ee(ue[Zt++],Me),Fo(Me,Dt,ft,mt,V,k),ft+=mt,k+=mt;ft<Or&&(ee(ue[Zt++],Me),Fo(Me,Dt,ft,Ht,V,k),ft+=Ht,k+=Ht),++ct&vt||(Y+=Ft)}break;case 3:if(Tt==V&&mt==k&&0<Y.b){for(ft=V,Tt=Dt=k+(Bt-ct)*Dt-(Nt=(Bt-ct)*St(Y.Ea,Y.b)),mt=V,vt=k,Ft=[],Nt=(Ht=Nt)-1;0<=Nt;--Nt)Ft[Nt]=mt[vt+Nt];for(Nt=Ht-1;0<=Nt;--Nt)ft[Tt+Nt]=Ft[Nt];es(Y,ct,Bt,V,Dt,V,k)}else es(Y,ct,Bt,Tt,mt,V,k)}k=b,V=E}V!=E&&n(b,E,k,V,Q)}function ho(p,g){var E=p.V,b=p.Ba+p.c*p.C,N=g-p.C;if(e(g<=p.l.o),e(16>=N),0<N){var Q=p.l,H=p.Ta,k=p.Ua,V=Q.width;if(yn(p,N,E,b),N=k=[k],e((E=p.C)<(b=g)),e(Q.v<Q.va),b>Q.o&&(b=Q.o),E<Q.j){var Y=Q.j-E;E=Q.j,N[0]+=Y*V}if(E>=b?E=0:(N[0]+=4*Q.v,Q.ka=E-Q.j,Q.U=Q.va-Q.v,Q.T=b-E,E=1),E){if(k=k[0],11>(E=p.ca).S){var ct=E.f.RGBA,Bt=(b=E.S,N=Q.U,Q=Q.T,Y=ct.eb,ct.A),Tt=Q;for(ct=ct.fb+p.Ma*ct.A;0<Tt--;){var mt=H,Dt=k,Ft=N,ft=Y,vt=ct;switch(b){case zg:rs(mt,Dt,Ft,ft,vt);break;case Xg:Cl(mt,Dt,Ft,ft,vt);break;case Cw:Cl(mt,Dt,Ft,ft,vt),xl(ft,vt,0,Ft,1,0);break;case _F:xc(mt,Dt,Ft,ft,vt);break;case Wg:xe(mt,Dt,Ft,ft,vt,1);break;case Bw:xe(mt,Dt,Ft,ft,vt,1),xl(ft,vt,0,Ft,1,0);break;case qg:xe(mt,Dt,Ft,ft,vt,0);break;case Zg:xe(mt,Dt,Ft,ft,vt,0),xl(ft,vt,1,Ft,1,0);break;case Ew:Os(mt,Dt,Ft,ft,vt);break;case Tw:Os(mt,Dt,Ft,ft,vt),Lc(ft,vt,Ft,1,0);break;case wF:wA(mt,Dt,Ft,ft,vt);break;default:e(0)}k+=V,ct+=Bt}p.Ma+=Q}else alert("todo:EmitRescaledRowsYUVA");e(p.Ma<=E.height)}}p.C=g,e(p.C<=p.i)}function se(p){var g;if(0<p.ua)return 0;for(g=0;g<p.Wb;++g){var E=p.Ya[g].G,b=p.Ya[g].H;if(0<E[1][b[1]+0].g||0<E[2][b[2]+0].g||0<E[3][b[3]+0].g)return 0}return 1}function ht(p,g,E,b,N,Q){if(p.Z!=0){var H=p.qd,k=p.rd;for(e(bl[p.Z]!=null);g<E;++g)bl[p.Z](H,k,b,N,b,N,Q),H=b,k=N,N+=Q;p.qd=H,p.rd=k}}function Qt(p,g){var E=p.l.ma,b=E.Z==0||E.Z==1?p.l.j:p.C;if(b=p.C<b?b:p.C,e(g<=p.l.o),g>b){var N=p.l.width,Q=E.ca,H=E.tb+N*b,k=p.V,V=p.Ba+p.c*b,Y=p.gc;e(p.ab==1),e(Y[0].hc==3),mw(Y[0],b,g,k,V,Q,H),ht(E,b,g,Q,H,N)}p.C=p.Ma=g}function qt(p,g,E,b,N,Q,H){var k=p.$/b,V=p.$%b,Y=p.m,ct=p.s,Bt=E+p.$,Tt=Bt;N=E+b*N;var mt=E+b*Q,Dt=280+ct.ua,Ft=p.Pb?k:16777216,ft=0<ct.ua?ct.Wa:null,vt=ct.wc,Nt=Bt<mt?Wr(ct,V,k):null;e(p.C<Q),e(mt<=N);var Ht=!1;t:for(;;){for(;Ht||Bt<mt;){var Ut=0;if(k>=Ft){var ue=Bt-E;e((Ft=p).Pb),Ft.wd=Ft.m,Ft.xd=ue,0<Ft.s.ua&&et(Ft.s.Wa,Ft.s.vb),Ft=k+P7}if(V&vt||(Nt=Wr(ct,V,k)),e(Nt!=null),Nt.Qb&&(g[Bt]=Nt.qb,Ht=!0),!Ht)if(it(Y),Nt.jc){Ut=Y,ue=g;var Zt=Bt,Me=Nt.pd[$(Ut)&Va-1];e(Nt.jc),256>Me.g?(X(Ut,Ut.u+Me.g),ue[Zt]=Me.value,Ut=0):(X(Ut,Ut.u+Me.g-256),e(256<=Me.value),Ut=Me.value),Ut==0&&(Ht=!0)}else Ut=Ci(Nt.G[0],Nt.H[0],Y);if(Y.h)break;if(Ht||256>Ut){if(!Ht)if(Nt.nd)g[Bt]=(Nt.qb|Ut<<8)>>>0;else{if(it(Y),Ht=Ci(Nt.G[1],Nt.H[1],Y),it(Y),ue=Ci(Nt.G[2],Nt.H[2],Y),Zt=Ci(Nt.G[3],Nt.H[3],Y),Y.h)break;g[Bt]=(Zt<<24|Ht<<16|Ut<<8|ue)>>>0}if(Ht=!1,++Bt,++V>=b&&(V=0,++k,H!=null&&k<=Q&&!(k%16)&&H(p,k),ft!=null))for(;Tt<Bt;)Ut=g[Tt++],ft.X[(506832829*Ut&4294967295)>>>ft.Mb]=Ut}else if(280>Ut){if(Ut=oi(Ut-256,Y),ue=Ci(Nt.G[4],Nt.H[4],Y),it(Y),ue=Mn(b,ue=oi(ue,Y)),Y.h)break;if(Bt-E<ue||N-Bt<Ut)break t;for(Zt=0;Zt<Ut;++Zt)g[Bt+Zt]=g[Bt+Zt-ue];for(Bt+=Ut,V+=Ut;V>=b;)V-=b,++k,H!=null&&k<=Q&&!(k%16)&&H(p,k);if(e(Bt<=N),V&vt&&(Nt=Wr(ct,V,k)),ft!=null)for(;Tt<Bt;)Ut=g[Tt++],ft.X[(506832829*Ut&4294967295)>>>ft.Mb]=Ut}else{if(!(Ut<Dt))break t;for(Ht=Ut-280,e(ft!=null);Tt<Bt;)Ut=g[Tt++],ft.X[(506832829*Ut&4294967295)>>>ft.Mb]=Ut;Ut=Bt,e(!(Ht>>>(ue=ft).Xa)),g[Ut]=ue.X[Ht],Ht=!0}Ht||e(Y.h==j(Y))}if(p.Pb&&Y.h&&Bt<N)e(p.m.h),p.a=5,p.m=p.wd,p.$=p.xd,0<p.s.ua&&et(p.s.vb,p.s.Wa);else{if(Y.h)break t;H!=null&&H(p,k>Q?Q:k),p.a=0,p.$=Bt-E}return 1}return p.a=3,0}function Ze(p){e(p!=null),p.vc=null,p.yc=null,p.Ya=null;var g=p.Wa;g!=null&&(g.X=null),p.vb=null,e(p!=null)}function Ir(){var p=new gw;return p==null?null:(p.a=0,p.xb=BF,nn("Predictor","VP8LPredictors"),nn("Predictor","VP8LPredictors_C"),nn("PredictorAdd","VP8LPredictorsAdd"),nn("PredictorAdd","VP8LPredictorsAdd_C"),jg=ie,Fo=Xt,rs=Kt,Cl=Ye,Os=Re,wA=fr,xc=be,T.VP8LMapColor32b=Wp,T.VP8LMapColor8b=_w,p)}function an(p,g,E,b,N){var Q=1,H=[p],k=[g],V=b.m,Y=b.s,ct=null,Bt=0;t:for(;;){if(E)for(;Q&&nt(V,1);){var Tt=H,mt=k,Dt=b,Ft=1,ft=Dt.m,vt=Dt.gc[Dt.ab],Nt=nt(ft,2);if(Dt.Oc&1<<Nt)Q=0;else{switch(Dt.Oc|=1<<Nt,vt.hc=Nt,vt.Ea=Tt[0],vt.nc=mt[0],vt.K=[null],++Dt.ab,e(4>=Dt.ab),Nt){case 0:case 1:vt.b=nt(ft,3)+2,Ft=an(St(vt.Ea,vt.b),St(vt.nc,vt.b),0,Dt,vt.K),vt.K=vt.K[0];break;case 3:var Ht,Ut=nt(ft,8)+1,ue=16<Ut?0:4<Ut?1:2<Ut?2:3;if(Tt[0]=St(vt.Ea,ue),vt.b=ue,Ht=Ft=an(Ut,1,0,Dt,vt.K)){var Zt,Me=Ut,te=vt,Or=1<<(8>>te.b),qr=a(Or);if(qr==null)Ht=0;else{var xr=te.K[0],vr=te.w;for(qr[0]=te.K[0][0],Zt=1;Zt<1*Me;++Zt)qr[Zt]=dt(xr[vr+Zt],qr[Zt-1]);for(;Zt<4*Or;++Zt)qr[Zt]=0;te.K[0]=null,te.K[0]=qr,Ht=1}}Ft=Ht;break;case 2:break;default:e(0)}Q=Ft}}if(H=H[0],k=k[0],Q&&nt(V,1)&&!(Q=1<=(Bt=nt(V,4))&&11>=Bt)){b.a=3;break t}var on;if(on=Q)e:{var en,qe,Ai,Ka=b,li=H,Ya=k,Zr=Bt,po=E,vo=Ka.m,Ui=Ka.s,Xi=[null],xa=1,Mo=0,Ms=M7[Zr];r:for(;;){if(po&&nt(vo,1)){var Di=nt(vo,3)+2,xA=St(li,Di),Ku=St(Ya,Di),Fc=xA*Ku;if(!an(xA,Ku,0,Ka,Xi))break r;for(Xi=Xi[0],Ui.xc=Di,en=0;en<Fc;++en){var Ll=Xi[en]>>8&65535;Xi[en]=Ll,Ll>=xa&&(xa=Ll+1)}}if(vo.h)break r;for(qe=0;5>qe;++qe){var Pn=EF[qe];!qe&&0<Zr&&(Pn+=1<<Zr),Mo<Pn&&(Mo=Pn)}var Lw=o(xa*Ms,x),OF=xa,MF=o(OF,D);if(MF==null)var ry=null;else e(65536>=OF),ry=MF;var ed=a(Mo);if(ry==null||ed==null||Lw==null){Ka.a=1;break r}var ny=Lw;for(en=Ai=0;en<xa;++en){var os=ry[en],Ic=os.G,Rc=os.H,PF=0,iy=1,NF=0;for(qe=0;5>qe;++qe){Pn=EF[qe],Ic[qe]=ny,Rc[qe]=Ai,!qe&&0<Zr&&(Pn+=1<<Zr);i:{var ay,Fw=Pn,oy=Ka,rd=ed,eH=ny,rH=Ai,Iw=0,Fl=oy.m,nH=nt(Fl,1);if(i(rd,0,0,Fw),nH){var iH=nt(Fl,1)+1,aH=nt(Fl,1),UF=nt(Fl,aH==0?1:8);rd[UF]=1,iH==2&&(rd[UF=nt(Fl,8)]=1);var sy=1}else{var DF=a(19),QF=nt(Fl,4)+4;if(19<QF){oy.a=3;var Ay=0;break i}for(ay=0;ay<QF;++ay)DF[R7[ay]]=nt(Fl,3);var Rw=void 0,nd=void 0,HF=oy,oH=DF,ly=Fw,GF=rd,Ow=0,Il=HF.m,kF=8,$F=o(128,x);n:for(;S($F,0,7,oH,19);){if(nt(Il,1)){var sH=2+2*nt(Il,3);if((Rw=2+nt(Il,sH))>ly)break n}else Rw=ly;for(nd=0;nd<ly&&Rw--;){it(Il);var VF=$F[0+(127&$(Il))];X(Il,Il.u+VF.g);var Oc=VF.value;if(16>Oc)GF[nd++]=Oc,Oc!=0&&(kF=Oc);else{var AH=Oc==16,jF=Oc-16,lH=F7[jF],KF=nt(Il,L7[jF])+lH;if(nd+KF>ly)break n;for(var uH=AH?kF:0;0<KF--;)GF[nd++]=uH}}Ow=1;break n}Ow||(HF.a=3),sy=Ow}(sy=sy&&!Fl.h)&&(Iw=S(eH,rH,8,rd,Fw)),sy&&Iw!=0?Ay=Iw:(oy.a=3,Ay=0)}if(Ay==0)break r;if(iy&&I7[qe]==1&&(iy=ny[Ai].g==0),PF+=ny[Ai].g,Ai+=Ay,3>=qe){var id,Mw=ed[0];for(id=1;id<Pn;++id)ed[id]>Mw&&(Mw=ed[id]);NF+=Mw}}if(os.nd=iy,os.Qb=0,iy&&(os.qb=(Ic[3][Rc[3]+0].value<<24|Ic[1][Rc[1]+0].value<<16|Ic[2][Rc[2]+0].value)>>>0,PF==0&&256>Ic[0][Rc[0]+0].value&&(os.Qb=1,os.qb+=Ic[0][Rc[0]+0].value<<8)),os.jc=!os.Qb&&6>NF,os.jc){var uy,SA=os;for(uy=0;uy<Va;++uy){var Rl=uy,Ol=SA.pd[Rl],hy=SA.G[0][SA.H[0]+Rl];256<=hy.value?(Ol.g=hy.g+256,Ol.value=hy.value):(Ol.g=0,Ol.value=0,Rl>>=tn(hy,8,Ol),Rl>>=tn(SA.G[1][SA.H[1]+Rl],16,Ol),Rl>>=tn(SA.G[2][SA.H[2]+Rl],0,Ol),tn(SA.G[3][SA.H[3]+Rl],24,Ol))}}}Ui.vc=Xi,Ui.Wb=xa,Ui.Ya=ry,Ui.yc=Lw,on=1;break e}on=0}if(!(Q=on)){b.a=3;break t}if(0<Bt){if(Y.ua=1<<Bt,!pt(Y.Wa,Bt)){b.a=1,Q=0;break t}}else Y.ua=0;var Pw=b,YF=H,hH=k,Nw=Pw.s,Uw=Nw.xc;if(Pw.c=YF,Pw.i=hH,Nw.md=St(YF,Uw),Nw.wc=Uw==0?-1:(1<<Uw)-1,E){b.xb=k7;break t}if((ct=a(H*k))==null){b.a=1,Q=0;break t}Q=(Q=qt(b,ct,0,H,k,k,null))&&!V.h;break t}return Q?(N!=null?N[0]=ct:(e(ct==null),e(E)),b.$=0,E||Ze(Y)):Ze(Y),Q}function mn(p,g){var E=p.c*p.i,b=E+g+16*g;return e(p.c<=g),p.V=a(b),p.V==null?(p.Ta=null,p.Ua=0,p.a=1,0):(p.Ta=p.V,p.Ua=p.Ba+E+g,1)}function qo(p,g){var E=p.C,b=g-E,N=p.V,Q=p.Ba+p.c*E;for(e(g<=p.l.o);0<b;){var H=16<b?16:b,k=p.l.ma,V=p.l.width,Y=V*H,ct=k.ca,Bt=k.tb+V*E,Tt=p.Ta,mt=p.Ua;yn(p,H,N,Q),pF(Tt,mt,ct,Bt,Y),ht(k,E,E+H,ct,Bt,V),b-=H,N+=H*p.c,E+=H}e(E==g),p.C=p.Ma=g}function Bi(){this.ub=this.yd=this.td=this.Rb=0}function gA(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function gl(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Lp(){this.Yb=function(){var p=[];return function g(E,b,N){for(var Q=N[b],H=0;H<Q&&(E.push(N.length>b+1?[]:0),!(N.length<b+1));H++)g(E[H],b+1,N)}(p,0,[3,11]),p}()}function z1(){this.jb=a(3),this.Wc=s([4,8],Lp),this.Xc=s([4,17],Lp)}function X1(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function hc(){this.ld=this.La=this.dd=this.tc=0}function xg(){this.Na=this.la=0}function W1(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Fp(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function q1(){this.uc=this.M=this.Nb=0,this.wa=Array(new hc),this.Y=0,this.ya=Array(new Fp),this.aa=0,this.l=new cc}function Sg(){this.y=a(16),this.f=a(8),this.ea=a(8)}function Z1(){this.cb=this.a=0,this.sc="",this.m=new _t,this.Od=new Bi,this.Kc=new gA,this.ed=new X1,this.Qa=new gl,this.Ic=this.$c=this.Aa=0,this.D=new q1,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,_t),this.ia=0,this.pb=o(4,W1),this.Pa=new z1,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Sg),this.Hd=0,this.rb=Array(new xg),this.sb=0,this.wa=Array(new hc),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Fp),this.L=this.aa=0,this.gd=s([4,2],hc),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function cc(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function J1(){var p=new Z1;return p!=null&&(p.a=0,p.sc="OK",p.cb=0,p.Xb=0,Jp||(Jp=Fg)),p}function kn(p,g,E){return p.a==0&&(p.a=g,p.sc=E,p.cb=0),0}function bg(p,g,E){return 3<=E&&p[g+0]==157&&p[g+1]==1&&p[g+2]==42}function Lg(p,g){if(p==null)return 0;if(p.a=0,p.sc="OK",g==null)return kn(p,2,"null VP8Io passed to VP8GetHeaders()");var E=g.data,b=g.w,N=g.ha;if(4>N)return kn(p,7,"Truncated header.");var Q=E[b+0]|E[b+1]<<8|E[b+2]<<16,H=p.Od;if(H.Rb=!(1&Q),H.td=Q>>1&7,H.yd=Q>>4&1,H.ub=Q>>5,3<H.td)return kn(p,3,"Incorrect keyframe parameters.");if(!H.yd)return kn(p,4,"Frame not displayable.");b+=3,N-=3;var k=p.Kc;if(H.Rb){if(7>N)return kn(p,7,"cannot parse picture header");if(!bg(E,b,N))return kn(p,3,"Bad code word");k.c=16383&(E[b+4]<<8|E[b+3]),k.Td=E[b+4]>>6,k.i=16383&(E[b+6]<<8|E[b+5]),k.Ud=E[b+6]>>6,b+=7,N-=7,p.za=k.c+15>>4,p.Ub=k.i+15>>4,g.width=k.c,g.height=k.i,g.Da=0,g.j=0,g.v=0,g.va=g.width,g.o=g.height,g.da=0,g.ib=g.width,g.hb=g.height,g.U=g.width,g.T=g.height,i((Q=p.Pa).jb,0,255,Q.jb.length),e((Q=p.Qa)!=null),Q.Cb=0,Q.Bb=0,Q.Fb=1,i(Q.Zb,0,0,Q.Zb.length),i(Q.Lb,0,0,Q.Lb)}if(H.ub>N)return kn(p,7,"bad partition length");W(Q=p.m,E,b,H.ub),b+=H.ub,N-=H.ub,H.Rb&&(k.Ld=wt(Q),k.Kd=wt(Q)),k=p.Qa;var V,Y=p.Pa;if(e(Q!=null),e(k!=null),k.Cb=wt(Q),k.Cb){if(k.Bb=wt(Q),wt(Q)){for(k.Fb=wt(Q),V=0;4>V;++V)k.Zb[V]=wt(Q)?tt(Q,7):0;for(V=0;4>V;++V)k.Lb[V]=wt(Q)?tt(Q,6):0}if(k.Bb)for(V=0;3>V;++V)Y.jb[V]=wt(Q)?z(Q,8):255}else k.Bb=0;if(Q.Ka)return kn(p,3,"cannot parse segment header");if((k=p.ed).zd=wt(Q),k.Tb=z(Q,6),k.wb=z(Q,3),k.Pc=wt(Q),k.Pc&&wt(Q)){for(Y=0;4>Y;++Y)wt(Q)&&(k.vd[Y]=tt(Q,6));for(Y=0;4>Y;++Y)wt(Q)&&(k.od[Y]=tt(Q,6))}if(p.L=k.Tb==0?0:k.zd?1:2,Q.Ka)return kn(p,3,"cannot parse filter header");var ct=N;if(N=V=b,b=V+ct,k=ct,p.Xb=(1<<z(p.m,2))-1,ct<3*(Y=p.Xb))E=7;else{for(V+=3*Y,k-=3*Y,ct=0;ct<Y;++ct){var Bt=E[N+0]|E[N+1]<<8|E[N+2]<<16;Bt>k&&(Bt=k),W(p.Jc[+ct],E,V,Bt),V+=Bt,k-=Bt,N+=3}W(p.Jc[+Y],E,V,k),E=V<b?0:5}if(E!=0)return kn(p,E,"cannot parse partitions");for(E=z(V=p.m,7),N=wt(V)?tt(V,4):0,b=wt(V)?tt(V,4):0,k=wt(V)?tt(V,4):0,Y=wt(V)?tt(V,4):0,V=wt(V)?tt(V,4):0,ct=p.Qa,Bt=0;4>Bt;++Bt){if(ct.Cb){var Tt=ct.Zb[Bt];ct.Fb||(Tt+=E)}else{if(0<Bt){p.pb[Bt]=p.pb[0];continue}Tt=E}var mt=p.pb[Bt];mt.Sc[0]=xw[co(Tt+N,127)],mt.Sc[1]=Sw[co(Tt+0,127)],mt.Eb[0]=2*xw[co(Tt+b,127)],mt.Eb[1]=101581*Sw[co(Tt+k,127)]>>16,8>mt.Eb[1]&&(mt.Eb[1]=8),mt.Qc[0]=xw[co(Tt+Y,117)],mt.Qc[1]=Sw[co(Tt+V,127)],mt.lc=Tt+V}if(!H.Rb)return kn(p,4,"Not a key frame.");for(wt(Q),H=p.Pa,E=0;4>E;++E){for(N=0;8>N;++N)for(b=0;3>b;++b)for(k=0;11>k;++k)Y=at(Q,H7[E][N][b][k])?z(Q,8):D7[E][N][b][k],H.Wc[E][N].Yb[b][k]=Y;for(N=0;17>N;++N)H.Xc[E][N]=H.Wc[E][G7[N]]}return p.kc=wt(Q),p.kc&&(p.Bd=z(Q,8)),p.cb=1}function Fg(p,g,E,b,N,Q,H){var k=g[N].Yb[E];for(E=0;16>N;++N){if(!at(p,k[E+0]))return N;for(;!at(p,k[E+1]);)if(k=g[++N].Yb[0],E=0,N==16)return 16;var V=g[N+1].Yb;if(at(p,k[E+2])){var Y=p,ct=0;if(at(Y,(Tt=k)[(Bt=E)+3]))if(at(Y,Tt[Bt+6])){for(k=0,Bt=2*(ct=at(Y,Tt[Bt+8]))+(Tt=at(Y,Tt[Bt+9+ct])),ct=0,Tt=N7[Bt];Tt[k];++k)ct+=ct+at(Y,Tt[k]);ct+=3+(8<<Bt)}else at(Y,Tt[Bt+7])?(ct=7+2*at(Y,165),ct+=at(Y,145)):ct=5+at(Y,159);else ct=at(Y,Tt[Bt+4])?3+at(Y,Tt[Bt+5]):2;k=V[2]}else ct=1,k=V[1];V=H+U7[N],0>(Y=p).b&>(Y);var Bt,Tt=Y.b,mt=(Bt=Y.Ca>>1)-(Y.I>>Tt)>>31;--Y.b,Y.Ca+=mt,Y.Ca|=1,Y.I-=(Bt+1&mt)<<Tt,Q[V]=((ct^mt)-mt)*b[(0<N)+0]}return 16}function Ip(p){var g=p.rb[p.sb-1];g.la=0,g.Na=0,i(p.zc,0,0,p.zc.length),p.ja=0}function tw(p,g){if(p==null)return 0;if(g==null)return kn(p,2,"NULL VP8Io parameter in VP8Decode().");if(!p.cb&&!Lg(p,g))return 0;if(e(p.cb),g.ac==null||g.ac(g)){g.ob&&(p.L=0);var E=ey[p.L];if(p.L==2?(p.yb=0,p.zb=0):(p.yb=g.v-E>>4,p.zb=g.j-E>>4,0>p.yb&&(p.yb=0),0>p.zb&&(p.zb=0)),p.Va=g.o+15+E>>4,p.Hb=g.va+15+E>>4,p.Hb>p.za&&(p.Hb=p.za),p.Va>p.Ub&&(p.Va=p.Ub),0<p.L){var b=p.ed;for(E=0;4>E;++E){var N;if(p.Qa.Cb){var Q=p.Qa.Lb[E];p.Qa.Fb||(Q+=b.Tb)}else Q=b.Tb;for(N=0;1>=N;++N){var H=p.gd[E][N],k=Q;if(b.Pc&&(k+=b.vd[0],N&&(k+=b.od[0])),0<(k=0>k?0:63<k?63:k)){var V=k;0<b.wb&&(V=4<b.wb?V>>2:V>>1)>9-b.wb&&(V=9-b.wb),1>V&&(V=1),H.dd=V,H.tc=2*k+V,H.ld=40<=k?2:15<=k?1:0}else H.tc=0;H.La=N}}}E=0}else kn(p,6,"Frame setup failed"),E=p.a;if(E=E==0){if(E){p.$c=0,0<p.Aa||(p.Ic=tH);t:{E=p.Ic,b=4*(V=p.za);var Y=32*V,ct=V+1,Bt=0<p.L?V*(0<p.Aa?2:1):0,Tt=(p.Aa==2?2:1)*V;if((H=b+832+(N=3*(16*E+ey[p.L])/2*Y)+(Q=p.Fa!=null&&0<p.Fa.length?p.Kc.c*p.Kc.i:0))!=H)E=0;else{if(H>p.Vb){if(p.Vb=0,p.Ec=a(H),p.Fc=0,p.Ec==null){E=kn(p,1,"no memory during frame initialization.");break t}p.Vb=H}H=p.Ec,k=p.Fc,p.Ac=H,p.Bc=k,k+=b,p.Gd=o(Y,Sg),p.Hd=0,p.rb=o(ct+1,xg),p.sb=1,p.wa=Bt?o(Bt,hc):null,p.Y=0,p.D.Nb=0,p.D.wa=p.wa,p.D.Y=p.Y,0<p.Aa&&(p.D.Y+=V),e(!0),p.oc=H,p.pc=k,k+=832,p.ya=o(Tt,Fp),p.aa=0,p.D.ya=p.ya,p.D.aa=p.aa,p.Aa==2&&(p.D.aa+=V),p.R=16*V,p.B=8*V,V=(Y=ey[p.L])*p.R,Y=Y/2*p.B,p.sa=H,p.ta=k+V,p.qa=p.sa,p.ra=p.ta+16*E*p.R+Y,p.Ha=p.qa,p.Ia=p.ra+8*E*p.B+Y,p.$c=0,k+=N,p.mb=Q?H:null,p.nb=Q?k:null,e(k+Q<=p.Fc+p.Vb),Ip(p),i(p.Ac,p.Bc,0,b),E=1}}if(E){if(g.ka=0,g.y=p.sa,g.O=p.ta,g.f=p.qa,g.N=p.ra,g.ea=p.Ha,g.Vd=p.Ia,g.fa=p.R,g.Rc=p.B,g.F=null,g.J=0,!mF){for(E=-255;255>=E;++E)dF[255+E]=0>E?-E:E;for(E=-1020;1020>=E;++E)vF[1020+E]=-128>E?-128:127<E?127:E;for(E=-112;112>=E;++E)gF[112+E]=-16>E?-16:15<E?15:E;for(E=-255;510>=E;++E)yF[255+E]=0>E?0:255<E?255:E;mF=1}ns=nw,Sc=ew,Bl=Rg,is=rw,EA=Og,qp=Ig,Vu=Up,bc=ku,ju=vw,Tl=Dp,Zp=dw,Io=yc,CA=Qp,un=kg,hn=Gg,Vn=mA,Ti=ml,BA=pw,as[0]=Rs,as[1]=iw,as[2]=Aw,as[3]=lw,as[4]=Ng,as[5]=vc,as[6]=Ug,as[7]=Mp,as[8]=hw,as[9]=uw,Sl[0]=Mg,Sl[1]=ow,Sl[2]=yA,Sl[3]=pc,Sl[4]=aa,Sl[5]=sw,Sl[6]=Pg,TA[0]=yl,TA[1]=aw,TA[2]=cw,TA[3]=Pp,TA[4]=Gu,TA[5]=fw,TA[6]=Np,E=1}else E=0}E&&(E=function(mt,Dt){for(mt.M=0;mt.M<mt.Va;++mt.M){var Ft,ft=mt.Jc[mt.M&mt.Xb],vt=mt.m,Nt=mt;for(Ft=0;Ft<Nt.za;++Ft){var Ht=vt,Ut=Nt,ue=Ut.Ac,Zt=Ut.Bc+4*Ft,Me=Ut.zc,te=Ut.ya[Ut.aa+Ft];if(Ut.Qa.Bb?te.$b=at(Ht,Ut.Pa.jb[0])?2+at(Ht,Ut.Pa.jb[2]):at(Ht,Ut.Pa.jb[1]):te.$b=0,Ut.kc&&(te.Ad=at(Ht,Ut.Bd)),te.Za=!at(Ht,145)+0,te.Za){var Or=te.Ob,qr=0;for(Ut=0;4>Ut;++Ut){var xr,vr=Me[0+Ut];for(xr=0;4>xr;++xr){vr=Q7[ue[Zt+xr]][vr];for(var on=CF[at(Ht,vr[0])];0<on;)on=CF[2*on+at(Ht,vr[on])];vr=-on,ue[Zt+xr]=vr}n(Or,qr,ue,Zt,4),qr+=4,Me[0+Ut]=vr}}else vr=at(Ht,156)?at(Ht,128)?1:3:at(Ht,163)?2:0,te.Ob[0]=vr,i(ue,Zt,vr,4),i(Me,0,vr,4);te.Dd=at(Ht,142)?at(Ht,114)?at(Ht,183)?1:3:2:0}if(Nt.m.Ka)return kn(mt,7,"Premature end-of-partition0 encountered.");for(;mt.ja<mt.za;++mt.ja){if(Nt=ft,Ht=(vt=mt).rb[vt.sb-1],ue=vt.rb[vt.sb+vt.ja],Ft=vt.ya[vt.aa+vt.ja],Zt=vt.kc?Ft.Ad:0)Ht.la=ue.la=0,Ft.Za||(Ht.Na=ue.Na=0),Ft.Hc=0,Ft.Gc=0,Ft.ia=0;else{var en,qe;if(Ht=ue,ue=Nt,Zt=vt.Pa.Xc,Me=vt.ya[vt.aa+vt.ja],te=vt.pb[Me.$b],Ut=Me.ad,Or=0,qr=vt.rb[vt.sb-1],vr=xr=0,i(Ut,Or,0,384),Me.Za)var Ai=0,Ka=Zt[3];else{on=a(16);var li=Ht.Na+qr.Na;if(li=Jp(ue,Zt[1],li,te.Eb,0,on,0),Ht.Na=qr.Na=(0<li)+0,1<li)ns(on,0,Ut,Or);else{var Ya=on[0]+3>>3;for(on=0;256>on;on+=16)Ut[Or+on]=Ya}Ai=1,Ka=Zt[0]}var Zr=15&Ht.la,po=15&qr.la;for(on=0;4>on;++on){var vo=1&po;for(Ya=qe=0;4>Ya;++Ya)Zr=Zr>>1|(vo=(li=Jp(ue,Ka,li=vo+(1&Zr),te.Sc,Ai,Ut,Or))>Ai)<<7,qe=qe<<2|(3<li?3:1<li?2:Ut[Or+0]!=0),Or+=16;Zr>>=4,po=po>>1|vo<<7,xr=(xr<<8|qe)>>>0}for(Ka=Zr,Ai=po>>4,en=0;4>en;en+=2){for(qe=0,Zr=Ht.la>>4+en,po=qr.la>>4+en,on=0;2>on;++on){for(vo=1&po,Ya=0;2>Ya;++Ya)li=vo+(1&Zr),Zr=Zr>>1|(vo=0<(li=Jp(ue,Zt[2],li,te.Qc,0,Ut,Or)))<<3,qe=qe<<2|(3<li?3:1<li?2:Ut[Or+0]!=0),Or+=16;Zr>>=2,po=po>>1|vo<<5}vr|=qe<<4*en,Ka|=Zr<<4<<en,Ai|=(240&po)<<en}Ht.la=Ka,qr.la=Ai,Me.Hc=xr,Me.Gc=vr,Me.ia=43690&vr?0:te.ia,Zt=!(xr|vr)}if(0<vt.L&&(vt.wa[vt.Y+vt.ja]=vt.gd[Ft.$b][Ft.Za],vt.wa[vt.Y+vt.ja].La|=!Zt),Nt.Ka)return kn(mt,7,"Premature end-of-file encountered.")}if(Ip(mt),vt=Dt,Nt=1,Ft=(ft=mt).D,Ht=0<ft.L&&ft.M>=ft.zb&&ft.M<=ft.Va,ft.Aa==0)t:{if(Ft.M=ft.M,Ft.uc=Ht,jp(ft,Ft),Nt=1,Ft=(qe=ft.D).Nb,Ht=(vr=ey[ft.L])*ft.R,ue=vr/2*ft.B,on=16*Ft*ft.R,Ya=8*Ft*ft.B,Zt=ft.sa,Me=ft.ta-Ht+on,te=ft.qa,Ut=ft.ra-ue+Ya,Or=ft.Ha,qr=ft.Ia-ue+Ya,po=(Zr=qe.M)==0,xr=Zr>=ft.Va-1,ft.Aa==2&&jp(ft,qe),qe.uc)for(vo=(li=ft).D.M,e(li.D.uc),qe=li.yb;qe<li.Hb;++qe){Ai=qe,Ka=vo;var Ui=(Xi=(Pn=li).D).Nb;en=Pn.R;var Xi=Xi.wa[Xi.Y+Ai],xa=Pn.sa,Mo=Pn.ta+16*Ui*en+16*Ai,Ms=Xi.dd,Di=Xi.tc;if(Di!=0)if(e(3<=Di),Pn.L==1)0<Ai&&Vn(xa,Mo,en,Di+4),Xi.La&&BA(xa,Mo,en,Di),0<Ka&&hn(xa,Mo,en,Di+4),Xi.La&&Ti(xa,Mo,en,Di);else{var xA=Pn.B,Ku=Pn.qa,Fc=Pn.ra+8*Ui*xA+8*Ai,Ll=Pn.Ha,Pn=Pn.Ia+8*Ui*xA+8*Ai;Ui=Xi.ld,0<Ai&&(bc(xa,Mo,en,Di+4,Ms,Ui),Tl(Ku,Fc,Ll,Pn,xA,Di+4,Ms,Ui)),Xi.La&&(Io(xa,Mo,en,Di,Ms,Ui),un(Ku,Fc,Ll,Pn,xA,Di,Ms,Ui)),0<Ka&&(Vu(xa,Mo,en,Di+4,Ms,Ui),ju(Ku,Fc,Ll,Pn,xA,Di+4,Ms,Ui)),Xi.La&&(Zp(xa,Mo,en,Di,Ms,Ui),CA(Ku,Fc,Ll,Pn,xA,Di,Ms,Ui))}}if(ft.ia&&alert("todo:DitherRow"),vt.put!=null){if(qe=16*Zr,Zr=16*(Zr+1),po?(vt.y=ft.sa,vt.O=ft.ta+on,vt.f=ft.qa,vt.N=ft.ra+Ya,vt.ea=ft.Ha,vt.W=ft.Ia+Ya):(qe-=vr,vt.y=Zt,vt.O=Me,vt.f=te,vt.N=Ut,vt.ea=Or,vt.W=qr),xr||(Zr-=vr),Zr>vt.o&&(Zr=vt.o),vt.F=null,vt.J=null,ft.Fa!=null&&0<ft.Fa.length&&qe<Zr&&(vt.J=$p(ft,vt,qe,Zr-qe),vt.F=ft.mb,vt.F==null&&vt.F.length==0)){Nt=kn(ft,3,"Could not decode alpha data.");break t}qe<vt.j&&(vr=vt.j-qe,qe=vt.j,e(!(1&vr)),vt.O+=ft.R*vr,vt.N+=ft.B*(vr>>1),vt.W+=ft.B*(vr>>1),vt.F!=null&&(vt.J+=vt.width*vr)),qe<Zr&&(vt.O+=vt.v,vt.N+=vt.v>>1,vt.W+=vt.v>>1,vt.F!=null&&(vt.J+=vt.v),vt.ka=qe-vt.j,vt.U=vt.va-vt.v,vt.T=Zr-qe,Nt=vt.put(vt))}Ft+1!=ft.Ic||xr||(n(ft.sa,ft.ta-Ht,Zt,Me+16*ft.R,Ht),n(ft.qa,ft.ra-ue,te,Ut+8*ft.B,ue),n(ft.Ha,ft.Ia-ue,Or,qr+8*ft.B,ue))}if(!Nt)return kn(mt,6,"Output aborted.")}return 1}(p,g)),g.bc!=null&&g.bc(g),E&=1}return E?(p.cb=0,E):0}function Zo(p,g,E,b,N){N=p[g+E+32*b]+(N>>3),p[g+E+32*b]=-256&N?0>N?0:255:N}function fc(p,g,E,b,N,Q){Zo(p,g,0,E,b+N),Zo(p,g,1,E,b+Q),Zo(p,g,2,E,b-Q),Zo(p,g,3,E,b-N)}function $a(p){return(20091*p>>16)+p}function Rp(p,g,E,b){var N,Q=0,H=a(16);for(N=0;4>N;++N){var k=p[g+0]+p[g+8],V=p[g+0]-p[g+8],Y=(35468*p[g+4]>>16)-$a(p[g+12]),ct=$a(p[g+4])+(35468*p[g+12]>>16);H[Q+0]=k+ct,H[Q+1]=V+Y,H[Q+2]=V-Y,H[Q+3]=k-ct,Q+=4,g++}for(N=Q=0;4>N;++N)k=(p=H[Q+0]+4)+H[Q+8],V=p-H[Q+8],Y=(35468*H[Q+4]>>16)-$a(H[Q+12]),Zo(E,b,0,0,k+(ct=$a(H[Q+4])+(35468*H[Q+12]>>16))),Zo(E,b,1,0,V+Y),Zo(E,b,2,0,V-Y),Zo(E,b,3,0,k-ct),Q++,b+=32}function Ig(p,g,E,b){var N=p[g+0]+4,Q=35468*p[g+4]>>16,H=$a(p[g+4]),k=35468*p[g+1]>>16;fc(E,b,0,N+H,p=$a(p[g+1]),k),fc(E,b,1,N+Q,p,k),fc(E,b,2,N-Q,p,k),fc(E,b,3,N-H,p,k)}function ew(p,g,E,b,N){Rp(p,g,E,b),N&&Rp(p,g+16,E,b+4)}function Rg(p,g,E,b){Sc(p,g+0,E,b,1),Sc(p,g+32,E,b+128,1)}function rw(p,g,E,b){var N;for(p=p[g+0]+4,N=0;4>N;++N)for(g=0;4>g;++g)Zo(E,b,g,N,p)}function Og(p,g,E,b){p[g+0]&&is(p,g+0,E,b),p[g+16]&&is(p,g+16,E,b+4),p[g+32]&&is(p,g+32,E,b+128),p[g+48]&&is(p,g+48,E,b+128+4)}function nw(p,g,E,b){var N,Q=a(16);for(N=0;4>N;++N){var H=p[g+0+N]+p[g+12+N],k=p[g+4+N]+p[g+8+N],V=p[g+4+N]-p[g+8+N],Y=p[g+0+N]-p[g+12+N];Q[0+N]=H+k,Q[8+N]=H-k,Q[4+N]=Y+V,Q[12+N]=Y-V}for(N=0;4>N;++N)H=(p=Q[0+4*N]+3)+Q[3+4*N],k=Q[1+4*N]+Q[2+4*N],V=Q[1+4*N]-Q[2+4*N],Y=p-Q[3+4*N],E[b+0]=H+k>>3,E[b+16]=Y+V>>3,E[b+32]=H-k>>3,E[b+48]=Y-V>>3,b+=64}function Op(p,g,E){var b,N=g-32,Q=fo,H=255-p[N-1];for(b=0;b<E;++b){var k,V=Q,Y=H+p[g-1];for(k=0;k<E;++k)p[g+k]=V[Y+p[N+k]];g+=32}}function iw(p,g){Op(p,g,4)}function aw(p,g){Op(p,g,8)}function ow(p,g){Op(p,g,16)}function yA(p,g){var E;for(E=0;16>E;++E)n(p,g+32*E,p,g-32,16)}function pc(p,g){var E;for(E=16;0<E;--E)i(p,g,p[g-1],16),g+=32}function dc(p,g,E){var b;for(b=0;16>b;++b)i(g,E+32*b,p,16)}function Mg(p,g){var E,b=16;for(E=0;16>E;++E)b+=p[g-1+32*E]+p[g+E-32];dc(b>>5,p,g)}function aa(p,g){var E,b=8;for(E=0;16>E;++E)b+=p[g-1+32*E];dc(b>>4,p,g)}function sw(p,g){var E,b=8;for(E=0;16>E;++E)b+=p[g+E-32];dc(b>>4,p,g)}function Pg(p,g){dc(128,p,g)}function $e(p,g,E){return p+2*g+E+2>>2}function Aw(p,g){var E,b=g-32;for(b=new Uint8Array([$e(p[b-1],p[b+0],p[b+1]),$e(p[b+0],p[b+1],p[b+2]),$e(p[b+1],p[b+2],p[b+3]),$e(p[b+2],p[b+3],p[b+4])]),E=0;4>E;++E)n(p,g+32*E,b,0,b.length)}function lw(p,g){var E=p[g-1],b=p[g-1+32],N=p[g-1+64],Q=p[g-1+96];Pt(p,g+0,16843009*$e(p[g-1-32],E,b)),Pt(p,g+32,16843009*$e(E,b,N)),Pt(p,g+64,16843009*$e(b,N,Q)),Pt(p,g+96,16843009*$e(N,Q,Q))}function Rs(p,g){var E,b=4;for(E=0;4>E;++E)b+=p[g+E-32]+p[g-1+32*E];for(b>>=3,E=0;4>E;++E)i(p,g+32*E,b,4)}function Ng(p,g){var E=p[g-1+0],b=p[g-1+32],N=p[g-1+64],Q=p[g-1-32],H=p[g+0-32],k=p[g+1-32],V=p[g+2-32],Y=p[g+3-32];p[g+0+96]=$e(b,N,p[g-1+96]),p[g+1+96]=p[g+0+64]=$e(E,b,N),p[g+2+96]=p[g+1+64]=p[g+0+32]=$e(Q,E,b),p[g+3+96]=p[g+2+64]=p[g+1+32]=p[g+0+0]=$e(H,Q,E),p[g+3+64]=p[g+2+32]=p[g+1+0]=$e(k,H,Q),p[g+3+32]=p[g+2+0]=$e(V,k,H),p[g+3+0]=$e(Y,V,k)}function Ug(p,g){var E=p[g+1-32],b=p[g+2-32],N=p[g+3-32],Q=p[g+4-32],H=p[g+5-32],k=p[g+6-32],V=p[g+7-32];p[g+0+0]=$e(p[g+0-32],E,b),p[g+1+0]=p[g+0+32]=$e(E,b,N),p[g+2+0]=p[g+1+32]=p[g+0+64]=$e(b,N,Q),p[g+3+0]=p[g+2+32]=p[g+1+64]=p[g+0+96]=$e(N,Q,H),p[g+3+32]=p[g+2+64]=p[g+1+96]=$e(Q,H,k),p[g+3+64]=p[g+2+96]=$e(H,k,V),p[g+3+96]=$e(k,V,V)}function vc(p,g){var E=p[g-1+0],b=p[g-1+32],N=p[g-1+64],Q=p[g-1-32],H=p[g+0-32],k=p[g+1-32],V=p[g+2-32],Y=p[g+3-32];p[g+0+0]=p[g+1+64]=Q+H+1>>1,p[g+1+0]=p[g+2+64]=H+k+1>>1,p[g+2+0]=p[g+3+64]=k+V+1>>1,p[g+3+0]=V+Y+1>>1,p[g+0+96]=$e(N,b,E),p[g+0+64]=$e(b,E,Q),p[g+0+32]=p[g+1+96]=$e(E,Q,H),p[g+1+32]=p[g+2+96]=$e(Q,H,k),p[g+2+32]=p[g+3+96]=$e(H,k,V),p[g+3+32]=$e(k,V,Y)}function Mp(p,g){var E=p[g+0-32],b=p[g+1-32],N=p[g+2-32],Q=p[g+3-32],H=p[g+4-32],k=p[g+5-32],V=p[g+6-32],Y=p[g+7-32];p[g+0+0]=E+b+1>>1,p[g+1+0]=p[g+0+64]=b+N+1>>1,p[g+2+0]=p[g+1+64]=N+Q+1>>1,p[g+3+0]=p[g+2+64]=Q+H+1>>1,p[g+0+32]=$e(E,b,N),p[g+1+32]=p[g+0+96]=$e(b,N,Q),p[g+2+32]=p[g+1+96]=$e(N,Q,H),p[g+3+32]=p[g+2+96]=$e(Q,H,k),p[g+3+64]=$e(H,k,V),p[g+3+96]=$e(k,V,Y)}function uw(p,g){var E=p[g-1+0],b=p[g-1+32],N=p[g-1+64],Q=p[g-1+96];p[g+0+0]=E+b+1>>1,p[g+2+0]=p[g+0+32]=b+N+1>>1,p[g+2+32]=p[g+0+64]=N+Q+1>>1,p[g+1+0]=$e(E,b,N),p[g+3+0]=p[g+1+32]=$e(b,N,Q),p[g+3+32]=p[g+1+64]=$e(N,Q,Q),p[g+3+64]=p[g+2+64]=p[g+0+96]=p[g+1+96]=p[g+2+96]=p[g+3+96]=Q}function hw(p,g){var E=p[g-1+0],b=p[g-1+32],N=p[g-1+64],Q=p[g-1+96],H=p[g-1-32],k=p[g+0-32],V=p[g+1-32],Y=p[g+2-32];p[g+0+0]=p[g+2+32]=E+H+1>>1,p[g+0+32]=p[g+2+64]=b+E+1>>1,p[g+0+64]=p[g+2+96]=N+b+1>>1,p[g+0+96]=Q+N+1>>1,p[g+3+0]=$e(k,V,Y),p[g+2+0]=$e(H,k,V),p[g+1+0]=p[g+3+32]=$e(E,H,k),p[g+1+32]=p[g+3+64]=$e(b,E,H),p[g+1+64]=p[g+3+96]=$e(N,b,E),p[g+1+96]=$e(Q,N,b)}function cw(p,g){var E;for(E=0;8>E;++E)n(p,g+32*E,p,g-32,8)}function Pp(p,g){var E;for(E=0;8>E;++E)i(p,g,p[g-1],8),g+=32}function Hu(p,g,E){var b;for(b=0;8>b;++b)i(g,E+32*b,p,8)}function yl(p,g){var E,b=8;for(E=0;8>E;++E)b+=p[g+E-32]+p[g-1+32*E];Hu(b>>4,p,g)}function fw(p,g){var E,b=4;for(E=0;8>E;++E)b+=p[g+E-32];Hu(b>>3,p,g)}function Gu(p,g){var E,b=4;for(E=0;8>E;++E)b+=p[g-1+32*E];Hu(b>>3,p,g)}function Np(p,g){Hu(128,p,g)}function gc(p,g,E){var b=p[g-E],N=p[g+0],Q=3*(N-b)+ww[1020+p[g-2*E]-p[g+E]],H=Yg[112+(Q+4>>3)];p[g-E]=fo[255+b+Yg[112+(Q+3>>3)]],p[g+0]=fo[255+N-H]}function Dg(p,g,E,b){var N=p[g+0],Q=p[g+E];return Ro[255+p[g-2*E]-p[g-E]]>b||Ro[255+Q-N]>b}function Qg(p,g,E,b){return 4*Ro[255+p[g-E]-p[g+0]]+Ro[255+p[g-2*E]-p[g+E]]<=b}function Hg(p,g,E,b,N){var Q=p[g-3*E],H=p[g-2*E],k=p[g-E],V=p[g+0],Y=p[g+E],ct=p[g+2*E],Bt=p[g+3*E];return 4*Ro[255+k-V]+Ro[255+H-Y]>b?0:Ro[255+p[g-4*E]-Q]<=N&&Ro[255+Q-H]<=N&&Ro[255+H-k]<=N&&Ro[255+Bt-ct]<=N&&Ro[255+ct-Y]<=N&&Ro[255+Y-V]<=N}function Gg(p,g,E,b){var N=2*b+1;for(b=0;16>b;++b)Qg(p,g+b,E,N)&&gc(p,g+b,E)}function mA(p,g,E,b){var N=2*b+1;for(b=0;16>b;++b)Qg(p,g+b*E,1,N)&&gc(p,g+b*E,1)}function ml(p,g,E,b){var N;for(N=3;0<N;--N)Gg(p,g+=4*E,E,b)}function pw(p,g,E,b){var N;for(N=3;0<N;--N)mA(p,g+=4,E,b)}function _l(p,g,E,b,N,Q,H,k){for(Q=2*Q+1;0<N--;){if(Hg(p,g,E,Q,H))if(Dg(p,g,E,k))gc(p,g,E);else{var V=p,Y=g,ct=E,Bt=V[Y-2*ct],Tt=V[Y-ct],mt=V[Y+0],Dt=V[Y+ct],Ft=V[Y+2*ct],ft=27*(Nt=ww[1020+3*(mt-Tt)+ww[1020+Bt-Dt]])+63>>7,vt=18*Nt+63>>7,Nt=9*Nt+63>>7;V[Y-3*ct]=fo[255+V[Y-3*ct]+Nt],V[Y-2*ct]=fo[255+Bt+vt],V[Y-ct]=fo[255+Tt+ft],V[Y+0]=fo[255+mt-ft],V[Y+ct]=fo[255+Dt-vt],V[Y+2*ct]=fo[255+Ft-Nt]}g+=b}}function Jo(p,g,E,b,N,Q,H,k){for(Q=2*Q+1;0<N--;){if(Hg(p,g,E,Q,H))if(Dg(p,g,E,k))gc(p,g,E);else{var V=p,Y=g,ct=E,Bt=V[Y-ct],Tt=V[Y+0],mt=V[Y+ct],Dt=Yg[112+((Ft=3*(Tt-Bt))+4>>3)],Ft=Yg[112+(Ft+3>>3)],ft=Dt+1>>1;V[Y-2*ct]=fo[255+V[Y-2*ct]+ft],V[Y-ct]=fo[255+Bt+Ft],V[Y+0]=fo[255+Tt-Dt],V[Y+ct]=fo[255+mt-ft]}g+=b}}function Up(p,g,E,b,N,Q){_l(p,g,E,1,16,b,N,Q)}function ku(p,g,E,b,N,Q){_l(p,g,1,E,16,b,N,Q)}function dw(p,g,E,b,N,Q){var H;for(H=3;0<H;--H)Jo(p,g+=4*E,E,1,16,b,N,Q)}function yc(p,g,E,b,N,Q){var H;for(H=3;0<H;--H)Jo(p,g+=4,1,E,16,b,N,Q)}function vw(p,g,E,b,N,Q,H,k){_l(p,g,N,1,8,Q,H,k),_l(E,b,N,1,8,Q,H,k)}function Dp(p,g,E,b,N,Q,H,k){_l(p,g,1,N,8,Q,H,k),_l(E,b,1,N,8,Q,H,k)}function Qp(p,g,E,b,N,Q,H,k){Jo(p,g+4*N,N,1,8,Q,H,k),Jo(E,b+4*N,N,1,8,Q,H,k)}function kg(p,g,E,b,N,Q,H,k){Jo(p,g+4,1,N,8,Q,H,k),Jo(E,b+4,1,N,8,Q,H,k)}function mc(){this.ba=new ai,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Vr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Hp(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Gp(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function $g(){this.ua=0,this.Wa=new G,this.vb=new G,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new D,this.yc=new x}function gw(){this.xb=this.a=0,this.l=new cc,this.ca=new ai,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new F,this.Pb=0,this.wd=new F,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new $g,this.ab=0,this.gc=o(4,Gp),this.Oc=0}function _c(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new cc,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function $u(p,g,E,b,N,Q,H){for(p=p==null?0:p[g+0],g=0;g<H;++g)N[Q+g]=p+E[b+g]&255,p=N[Q+g]}function kp(p,g,E,b,N,Q,H){var k;if(p==null)$u(null,null,E,b,N,Q,H);else for(k=0;k<H;++k)N[Q+k]=p[g+k]+E[b+k]&255}function wl(p,g,E,b,N,Q,H){if(p==null)$u(null,null,E,b,N,Q,H);else{var k,V=p[g+0],Y=V,ct=V;for(k=0;k<H;++k)Y=ct+(V=p[g+k])-Y,ct=E[b+k]+(-256&Y?0>Y?0:255:Y)&255,Y=V,N[Q+k]=ct}}function $p(p,g,E,b){var N=g.width,Q=g.o;if(e(p!=null&&g!=null),0>E||0>=b||E+b>Q)return null;if(!p.Cc){if(p.ga==null){var H;if(p.ga=new _c,(H=p.ga==null)||(H=g.width*g.o,e(p.Gb.length==0),p.Gb=a(H),p.Uc=0,p.Gb==null?H=0:(p.mb=p.Gb,p.nb=p.Uc,p.rc=null,H=1),H=!H),!H){H=p.ga;var k=p.Fa,V=p.P,Y=p.qc,ct=p.mb,Bt=p.nb,Tt=V+1,mt=Y-1,Dt=H.l;if(e(k!=null&&ct!=null&&g!=null),bl[0]=null,bl[1]=$u,bl[2]=kp,bl[3]=wl,H.ca=ct,H.tb=Bt,H.c=g.width,H.i=g.height,e(0<H.c&&0<H.i),1>=Y)g=0;else if(H.$a=k[V+0]>>0&3,H.Z=k[V+0]>>2&3,H.Lc=k[V+0]>>4&3,V=k[V+0]>>6&3,0>H.$a||1<H.$a||4<=H.Z||1<H.Lc||V)g=0;else if(Dt.put=wi,Dt.ac=ln,Dt.bc=Ei,Dt.ma=H,Dt.width=g.width,Dt.height=g.height,Dt.Da=g.Da,Dt.v=g.v,Dt.va=g.va,Dt.j=g.j,Dt.o=g.o,H.$a)t:{e(H.$a==1),g=Ir();e:for(;;){if(g==null){g=0;break t}if(e(H!=null),H.mc=g,g.c=H.c,g.i=H.i,g.l=H.l,g.l.ma=H,g.l.width=H.c,g.l.height=H.i,g.a=0,q(g.m,k,Tt,mt),!an(H.c,H.i,1,g,null)||(g.ab==1&&g.gc[0].hc==3&&se(g.s)?(H.ic=1,k=g.c*g.i,g.Ta=null,g.Ua=0,g.V=a(k),g.Ba=0,g.V==null?(g.a=1,g=0):g=1):(H.ic=0,g=mn(g,H.c)),!g))break e;g=1;break t}H.mc=null,g=0}else g=mt>=H.c*H.i;H=!g}if(H)return null;p.ga.Lc!=1?p.Ga=0:b=Q-E}e(p.ga!=null),e(E+b<=Q);t:{if(g=(k=p.ga).c,Q=k.l.o,k.$a==0){if(Tt=p.rc,mt=p.Vc,Dt=p.Fa,V=p.P+1+E*g,Y=p.mb,ct=p.nb+E*g,e(V<=p.P+p.qc),k.Z!=0)for(e(bl[k.Z]!=null),H=0;H<b;++H)bl[k.Z](Tt,mt,Dt,V,Y,ct,g),Tt=Y,mt=ct,ct+=g,V+=g;else for(H=0;H<b;++H)n(Y,ct,Dt,V,g),Tt=Y,mt=ct,ct+=g,V+=g;p.rc=Tt,p.Vc=mt}else{if(e(k.mc!=null),g=E+b,e((H=k.mc)!=null),e(g<=H.i),H.C>=g)g=1;else if(k.ic||Ct(),k.ic){k=H.V,Tt=H.Ba,mt=H.c;var Ft=H.i,ft=(Dt=1,V=H.$/mt,Y=H.$%mt,ct=H.m,Bt=H.s,H.$),vt=mt*Ft,Nt=mt*g,Ht=Bt.wc,Ut=ft<Nt?Wr(Bt,Y,V):null;e(ft<=vt),e(g<=Ft),e(se(Bt));e:for(;;){for(;!ct.h&&ft<Nt;){if(Y&Ht||(Ut=Wr(Bt,Y,V)),e(Ut!=null),it(ct),256>(Ft=Ci(Ut.G[0],Ut.H[0],ct)))k[Tt+ft]=Ft,++ft,++Y>=mt&&(Y=0,++V<=g&&!(V%16)&&Qt(H,V));else{if(!(280>Ft)){Dt=0;break e}Ft=oi(Ft-256,ct);var ue,Zt=Ci(Ut.G[4],Ut.H[4],ct);if(it(ct),!(ft>=(Zt=Mn(mt,Zt=oi(Zt,ct)))&&vt-ft>=Ft)){Dt=0;break e}for(ue=0;ue<Ft;++ue)k[Tt+ft+ue]=k[Tt+ft+ue-Zt];for(ft+=Ft,Y+=Ft;Y>=mt;)Y-=mt,++V<=g&&!(V%16)&&Qt(H,V);ft<Nt&&Y&Ht&&(Ut=Wr(Bt,Y,V))}e(ct.h==j(ct))}Qt(H,V>g?g:V);break e}!Dt||ct.h&&ft<vt?(Dt=0,H.a=ct.h?5:3):H.$=ft,g=Dt}else g=qt(H,H.V,H.Ba,H.c,H.i,g,qo);if(!g){b=0;break t}}E+b>=Q&&(p.Cc=1),b=1}if(!b)return null;if(p.Cc&&((b=p.ga)!=null&&(b.mc=null),p.ga=null,0<p.Ga))return alert("todo:WebPDequantizeLevels"),null}return p.nb+E*N}function _(p,g,E,b,N,Q){for(;0<N--;){var H,k=p,V=g+(E?1:0),Y=p,ct=g+(E?0:3);for(H=0;H<b;++H){var Bt=Y[ct+4*H];Bt!=255&&(Bt*=32897,k[V+4*H+0]=k[V+4*H+0]*Bt>>23,k[V+4*H+1]=k[V+4*H+1]*Bt>>23,k[V+4*H+2]=k[V+4*H+2]*Bt>>23)}g+=Q}}function U(p,g,E,b,N){for(;0<b--;){var Q;for(Q=0;Q<E;++Q){var H=p[g+2*Q+0],k=15&(Y=p[g+2*Q+1]),V=4369*k,Y=(240&Y|Y>>4)*V>>16;p[g+2*Q+0]=(240&H|H>>4)*V>>16&240|(15&H|H<<4)*V>>16>>4&15,p[g+2*Q+1]=240&Y|k}g+=N}}function J(p,g,E,b,N,Q,H,k){var V,Y,ct=255;for(Y=0;Y<N;++Y){for(V=0;V<b;++V){var Bt=p[g+V];Q[H+4*V]=Bt,ct&=Bt}g+=E,H+=k}return ct!=255}function lt(p,g,E,b,N){var Q;for(Q=0;Q<N;++Q)E[b+Q]=p[g+Q]>>8}function Ct(){xl=_,Lc=U,Kg=J,pF=lt}function It(p,g,E){T[p]=function(b,N,Q,H,k,V,Y,ct,Bt,Tt,mt,Dt,Ft,ft,vt,Nt,Ht){var Ut,ue=Ht-1>>1,Zt=k[V+0]|Y[ct+0]<<16,Me=Bt[Tt+0]|mt[Dt+0]<<16;e(b!=null);var te=3*Zt+Me+131074>>2;for(g(b[N+0],255&te,te>>16,Ft,ft),Q!=null&&(te=3*Me+Zt+131074>>2,g(Q[H+0],255&te,te>>16,vt,Nt)),Ut=1;Ut<=ue;++Ut){var Or=k[V+Ut]|Y[ct+Ut]<<16,qr=Bt[Tt+Ut]|mt[Dt+Ut]<<16,xr=Zt+Or+Me+qr+524296,vr=xr+2*(Or+Me)>>3;te=vr+Zt>>1,Zt=(xr=xr+2*(Zt+qr)>>3)+Or>>1,g(b[N+2*Ut-1],255&te,te>>16,Ft,ft+(2*Ut-1)*E),g(b[N+2*Ut-0],255&Zt,Zt>>16,Ft,ft+(2*Ut-0)*E),Q!=null&&(te=xr+Me>>1,Zt=vr+qr>>1,g(Q[H+2*Ut-1],255&te,te>>16,vt,Nt+(2*Ut-1)*E),g(Q[H+2*Ut+0],255&Zt,Zt>>16,vt,Nt+(2*Ut+0)*E)),Zt=Or,Me=qr}1&Ht||(te=3*Zt+Me+131074>>2,g(b[N+Ht-1],255&te,te>>16,Ft,ft+(Ht-1)*E),Q!=null&&(te=3*Me+Zt+131074>>2,g(Q[H+Ht-1],255&te,te>>16,vt,Nt+(Ht-1)*E)))}}function jt(){Oo[zg]=$7,Oo[Xg]=TF,Oo[_F]=V7,Oo[Wg]=xF,Oo[qg]=SF,Oo[Ew]=bF,Oo[wF]=j7,Oo[Cw]=TF,Oo[Bw]=xF,Oo[Zg]=SF,Oo[Tw]=bF}function re(p){return p&~K7?0>p?0:255:p>>LF}function Le(p,g){return re((19077*p>>8)+(26149*g>>8)-14234)}function lr(p,g,E){return re((19077*p>>8)-(6419*g>>8)-(13320*E>>8)+8708)}function Ve(p,g){return re((19077*p>>8)+(33050*g>>8)-17685)}function Tr(p,g,E,b,N){b[N+0]=Le(p,E),b[N+1]=lr(p,g,E),b[N+2]=Ve(p,g)}function zi(p,g,E,b,N){b[N+0]=Ve(p,g),b[N+1]=lr(p,g,E),b[N+2]=Le(p,E)}function $n(p,g,E,b,N){var Q=lr(p,g,E);g=Q<<3&224|Ve(p,g)>>3,b[N+0]=248&Le(p,E)|Q>>5,b[N+1]=g}function si(p,g,E,b,N){var Q=240&Ve(p,g)|15;b[N+0]=240&Le(p,E)|lr(p,g,E)>>4,b[N+1]=Q}function oa(p,g,E,b,N){b[N+0]=255,Tr(p,g,E,b,N+1)}function Ni(p,g,E,b,N){zi(p,g,E,b,N),b[N+3]=255}function ts(p,g,E,b,N){Tr(p,g,E,b,N),b[N+3]=255}function co(p,g){return 0>p?0:p>g?g:p}function _A(p,g,E){T[p]=function(b,N,Q,H,k,V,Y,ct,Bt){for(var Tt=ct+(-2&Bt)*E;ct!=Tt;)g(b[N+0],Q[H+0],k[V+0],Y,ct),g(b[N+1],Q[H+0],k[V+0],Y,ct+E),N+=2,++H,++V,ct+=2*E;1&Bt&&g(b[N+0],Q[H+0],k[V+0],Y,ct)}}function Vg(p,g,E){return E==0?p==0?g==0?6:5:g==0?4:0:E}function Vp(p,g,E,b,N){switch(p>>>30){case 3:Sc(g,E,b,N,0);break;case 2:qp(g,E,b,N);break;case 1:is(g,E,b,N)}}function jp(p,g){var E,b,N=g.M,Q=g.Nb,H=p.oc,k=p.pc+40,V=p.oc,Y=p.pc+584,ct=p.oc,Bt=p.pc+600;for(E=0;16>E;++E)H[k+32*E-1]=129;for(E=0;8>E;++E)V[Y+32*E-1]=129,ct[Bt+32*E-1]=129;for(0<N?H[k-1-32]=V[Y-1-32]=ct[Bt-1-32]=129:(i(H,k-32-1,127,21),i(V,Y-32-1,127,9),i(ct,Bt-32-1,127,9)),b=0;b<p.za;++b){var Tt=g.ya[g.aa+b];if(0<b){for(E=-1;16>E;++E)n(H,k+32*E-4,H,k+32*E+12,4);for(E=-1;8>E;++E)n(V,Y+32*E-4,V,Y+32*E+4,4),n(ct,Bt+32*E-4,ct,Bt+32*E+4,4)}var mt=p.Gd,Dt=p.Hd+b,Ft=Tt.ad,ft=Tt.Hc;if(0<N&&(n(H,k-32,mt[Dt].y,0,16),n(V,Y-32,mt[Dt].f,0,8),n(ct,Bt-32,mt[Dt].ea,0,8)),Tt.Za){var vt=H,Nt=k-32+16;for(0<N&&(b>=p.za-1?i(vt,Nt,mt[Dt].y[15],4):n(vt,Nt,mt[Dt+1].y,0,4)),E=0;4>E;E++)vt[Nt+128+E]=vt[Nt+256+E]=vt[Nt+384+E]=vt[Nt+0+E];for(E=0;16>E;++E,ft<<=2)vt=H,Nt=k+IF[E],as[Tt.Ob[E]](vt,Nt),Vp(ft,Ft,16*+E,vt,Nt)}else if(vt=Vg(b,N,Tt.Ob[0]),Sl[vt](H,k),ft!=0)for(E=0;16>E;++E,ft<<=2)Vp(ft,Ft,16*+E,H,k+IF[E]);for(E=Tt.Gc,vt=Vg(b,N,Tt.Dd),TA[vt](V,Y),TA[vt](ct,Bt),ft=Ft,vt=V,Nt=Y,255&(Tt=E>>0)&&(170&Tt?Bl(ft,256,vt,Nt):EA(ft,256,vt,Nt)),Tt=ct,ft=Bt,255&(E>>=8)&&(170&E?Bl(Ft,320,Tt,ft):EA(Ft,320,Tt,ft)),N<p.Ub-1&&(n(mt[Dt].y,0,H,k+480,16),n(mt[Dt].f,0,V,Y+224,8),n(mt[Dt].ea,0,ct,Bt+224,8)),E=8*Q*p.B,mt=p.sa,Dt=p.ta+16*b+16*Q*p.R,Ft=p.qa,Tt=p.ra+8*b+E,ft=p.Ha,vt=p.Ia+8*b+E,E=0;16>E;++E)n(mt,Dt+E*p.R,H,k+32*E,16);for(E=0;8>E;++E)n(Ft,Tt+E*p.B,V,Y+32*E,8),n(ft,vt+E*p.B,ct,Bt+32*E,8)}}function wc(p,g,E,b,N,Q,H,k,V){var Y=[0],ct=[0],Bt=0,Tt=V!=null?V.kd:0,mt=V??new Hp;if(p==null||12>E)return 7;mt.data=p,mt.w=g,mt.ha=E,g=[g],E=[E],mt.gb=[mt.gb];t:{var Dt=g,Ft=E,ft=mt.gb;if(e(p!=null),e(Ft!=null),e(ft!=null),ft[0]=0,12<=Ft[0]&&!t(p,Dt[0],"RIFF")){if(t(p,Dt[0]+8,"WEBP")){ft=3;break t}var vt=Z(p,Dt[0]+4);if(12>vt||4294967286<vt){ft=3;break t}if(Tt&&vt>Ft[0]-8){ft=7;break t}ft[0]=vt,Dt[0]+=12,Ft[0]-=12}ft=0}if(ft!=0)return ft;for(vt=0<mt.gb[0],E=E[0];;){t:{var Nt=p;Ft=g,ft=E;var Ht=Y,Ut=ct,ue=Dt=[0];if((te=Bt=[Bt])[0]=0,8>ft[0])ft=7;else{if(!t(Nt,Ft[0],"VP8X")){if(Z(Nt,Ft[0]+4)!=10){ft=3;break t}if(18>ft[0]){ft=7;break t}var Zt=Z(Nt,Ft[0]+8),Me=1+K(Nt,Ft[0]+12);if(2147483648<=Me*(Nt=1+K(Nt,Ft[0]+15))){ft=3;break t}ue!=null&&(ue[0]=Zt),Ht!=null&&(Ht[0]=Me),Ut!=null&&(Ut[0]=Nt),Ft[0]+=18,ft[0]-=18,te[0]=1}ft=0}}if(Bt=Bt[0],Dt=Dt[0],ft!=0)return ft;if(Ft=!!(2&Dt),!vt&&Bt)return 3;if(Q!=null&&(Q[0]=!!(16&Dt)),H!=null&&(H[0]=Ft),k!=null&&(k[0]=0),H=Y[0],Dt=ct[0],Bt&&Ft&&V==null){ft=0;break}if(4>E){ft=7;break}if(vt&&Bt||!vt&&!Bt&&!t(p,g[0],"ALPH")){E=[E],mt.na=[mt.na],mt.P=[mt.P],mt.Sa=[mt.Sa];t:{Zt=p,ft=g,vt=E;var te=mt.gb;Ht=mt.na,Ut=mt.P,ue=mt.Sa,Me=22,e(Zt!=null),e(vt!=null),Nt=ft[0];var Or=vt[0];for(e(Ht!=null),e(ue!=null),Ht[0]=null,Ut[0]=null,ue[0]=0;;){if(ft[0]=Nt,vt[0]=Or,8>Or){ft=7;break t}var qr=Z(Zt,Nt+4);if(4294967286<qr){ft=3;break t}var xr=8+qr+1&-2;if(Me+=xr,0<te&&Me>te){ft=3;break t}if(!t(Zt,Nt,"VP8 ")||!t(Zt,Nt,"VP8L")){ft=0;break t}if(Or[0]<xr){ft=7;break t}t(Zt,Nt,"ALPH")||(Ht[0]=Zt,Ut[0]=Nt+8,ue[0]=qr),Nt+=xr,Or-=xr}}if(E=E[0],mt.na=mt.na[0],mt.P=mt.P[0],mt.Sa=mt.Sa[0],ft!=0)break}E=[E],mt.Ja=[mt.Ja],mt.xa=[mt.xa];t:if(te=p,ft=g,vt=E,Ht=mt.gb[0],Ut=mt.Ja,ue=mt.xa,Zt=ft[0],Nt=!t(te,Zt,"VP8 "),Me=!t(te,Zt,"VP8L"),e(te!=null),e(vt!=null),e(Ut!=null),e(ue!=null),8>vt[0])ft=7;else{if(Nt||Me){if(te=Z(te,Zt+4),12<=Ht&&te>Ht-12){ft=3;break t}if(Tt&&te>vt[0]-8){ft=7;break t}Ut[0]=te,ft[0]+=8,vt[0]-=8,ue[0]=Me}else ue[0]=5<=vt[0]&&te[Zt+0]==47&&!(te[Zt+4]>>5),Ut[0]=vt[0];ft=0}if(E=E[0],mt.Ja=mt.Ja[0],mt.xa=mt.xa[0],g=g[0],ft!=0)break;if(4294967286<mt.Ja)return 3;if(k==null||Ft||(k[0]=mt.xa?2:1),H=[H],Dt=[Dt],mt.xa){if(5>E){ft=7;break}k=H,Tt=Dt,Ft=Q,p==null||5>E?p=0:5<=E&&p[g+0]==47&&!(p[g+4]>>5)?(vt=[0],te=[0],Ht=[0],q(Ut=new F,p,g,E),Se(Ut,vt,te,Ht)?(k!=null&&(k[0]=vt[0]),Tt!=null&&(Tt[0]=te[0]),Ft!=null&&(Ft[0]=Ht[0]),p=1):p=0):p=0}else{if(10>E){ft=7;break}k=Dt,p==null||10>E||!bg(p,g+3,E-3)?p=0:(Tt=p[g+0]|p[g+1]<<8|p[g+2]<<16,Ft=16383&(p[g+7]<<8|p[g+6]),p=16383&(p[g+9]<<8|p[g+8]),1&Tt||3<(Tt>>1&7)||!(Tt>>4&1)||Tt>>5>=mt.Ja||!Ft||!p?p=0:(H&&(H[0]=Ft),k&&(k[0]=p),p=1))}if(!p||(H=H[0],Dt=Dt[0],Bt&&(Y[0]!=H||ct[0]!=Dt)))return 3;V!=null&&(V[0]=mt,V.offset=g-V.w,e(4294967286>g-V.w),e(V.offset==V.ha-E));break}return ft==0||ft==7&&Bt&&V==null?(Q!=null&&(Q[0]|=mt.na!=null&&0<mt.na.length),b!=null&&(b[0]=H),N!=null&&(N[0]=Dt),0):ft}function Kp(p,g,E){var b=g.width,N=g.height,Q=0,H=0,k=b,V=N;if(g.Da=p!=null&&0<p.Da,g.Da&&(k=p.cd,V=p.bd,Q=p.v,H=p.j,11>E||(Q&=-2,H&=-2),0>Q||0>H||0>=k||0>=V||Q+k>b||H+V>N))return 0;if(g.v=Q,g.j=H,g.va=Q+k,g.o=H+V,g.U=k,g.T=V,g.da=p!=null&&0<p.da,g.da){if(!bt(k,V,E=[p.ib],Q=[p.hb]))return 0;g.ib=E[0],g.hb=Q[0]}return g.ob=p!=null&&p.ob,g.Kb=p==null||!p.Sd,g.da&&(g.ob=g.ib<3*b/4&&g.hb<3*N/4,g.Kb=0),1}function Yp(p){if(p==null)return 2;if(11>p.S){var g=p.f.RGBA;g.fb+=(p.height-1)*g.A,g.A=-g.A}else g=p.f.kb,p=p.height,g.O+=(p-1)*g.fa,g.fa=-g.fa,g.N+=(p-1>>1)*g.Ab,g.Ab=-g.Ab,g.W+=(p-1>>1)*g.Db,g.Db=-g.Db,g.F!=null&&(g.J+=(p-1)*g.lb,g.lb=-g.lb);return 0}function Ec(p,g,E,b){if(b==null||0>=p||0>=g)return 2;if(E!=null){if(E.Da){var N=E.cd,Q=E.bd,H=-2&E.v,k=-2&E.j;if(0>H||0>k||0>=N||0>=Q||H+N>p||k+Q>g)return 2;p=N,g=Q}if(E.da){if(!bt(p,g,N=[E.ib],Q=[E.hb]))return 2;p=N[0],g=Q[0]}}b.width=p,b.height=g;t:{var V=b.width,Y=b.height;if(p=b.S,0>=V||0>=Y||!(p>=zg&&13>p))p=2;else{if(0>=b.Rd&&b.sd==null){H=Q=N=g=0;var ct=(k=V*RF[p])*Y;if(11>p||(Q=(Y+1)/2*(g=(V+1)/2),p==12&&(H=(N=V)*Y)),(Y=a(ct+2*Q+H))==null){p=1;break t}b.sd=Y,11>p?((V=b.f.RGBA).eb=Y,V.fb=0,V.A=k,V.size=ct):((V=b.f.kb).y=Y,V.O=0,V.fa=k,V.Fd=ct,V.f=Y,V.N=0+ct,V.Ab=g,V.Cd=Q,V.ea=Y,V.W=0+ct+Q,V.Db=g,V.Ed=Q,p==12&&(V.F=Y,V.J=0+ct+2*Q),V.Tc=H,V.lb=N)}if(g=1,N=b.S,Q=b.width,H=b.height,N>=zg&&13>N)if(11>N)p=b.f.RGBA,g&=(k=Math.abs(p.A))*(H-1)+Q<=p.size,g&=k>=Q*RF[N],g&=p.eb!=null;else{p=b.f.kb,k=(Q+1)/2,ct=(H+1)/2,V=Math.abs(p.fa),Y=Math.abs(p.Ab);var Bt=Math.abs(p.Db),Tt=Math.abs(p.lb),mt=Tt*(H-1)+Q;g&=V*(H-1)+Q<=p.Fd,g&=Y*(ct-1)+k<=p.Cd,g=(g&=Bt*(ct-1)+k<=p.Ed)&V>=Q&Y>=k&Bt>=k,g&=p.y!=null,g&=p.f!=null,g&=p.ea!=null,N==12&&(g&=Tt>=Q,g&=mt<=p.Tc,g&=p.F!=null)}else g=0;p=g?0:2}}return p!=0||E!=null&&E.fd&&(p=Yp(b)),p}var Va=64,Cc=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Bc=24,Tc=32,zp=8,ja=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Et("Predictor0","PredictorAdd0"),T.Predictor0=function(){return 4278190080},T.Predictor1=function(p){return p},T.Predictor2=function(p,g,E){return g[E+0]},T.Predictor3=function(p,g,E){return g[E+1]},T.Predictor4=function(p,g,E){return g[E-1]},T.Predictor5=function(p,g,E){return xt(xt(p,g[E+1]),g[E+0])},T.Predictor6=function(p,g,E){return xt(p,g[E-1])},T.Predictor7=function(p,g,E){return xt(p,g[E+0])},T.Predictor8=function(p,g,E){return xt(g[E-1],g[E+0])},T.Predictor9=function(p,g,E){return xt(g[E+0],g[E+1])},T.Predictor10=function(p,g,E){return xt(xt(p,g[E-1]),xt(g[E+0],g[E+1]))},T.Predictor11=function(p,g,E){var b=g[E+0];return 0>=Vt(b>>24&255,p>>24&255,(g=g[E-1])>>24&255)+Vt(b>>16&255,p>>16&255,g>>16&255)+Vt(b>>8&255,p>>8&255,g>>8&255)+Vt(255&b,255&p,255&g)?b:p},T.Predictor12=function(p,g,E){var b=g[E+0];return(Lt((p>>24&255)+(b>>24&255)-((g=g[E-1])>>24&255))<<24|Lt((p>>16&255)+(b>>16&255)-(g>>16&255))<<16|Lt((p>>8&255)+(b>>8&255)-(g>>8&255))<<8|Lt((255&p)+(255&b)-(255&g)))>>>0},T.Predictor13=function(p,g,E){var b=g[E-1];return(Rt((p=xt(p,g[E+0]))>>24&255,b>>24&255)<<24|Rt(p>>16&255,b>>16&255)<<16|Rt(p>>8&255,b>>8&255)<<8|Rt(p>>0&255,b>>0&255))>>>0};var yw=T.PredictorAdd0;T.PredictorAdd1=zt,Et("Predictor2","PredictorAdd2"),Et("Predictor3","PredictorAdd3"),Et("Predictor4","PredictorAdd4"),Et("Predictor5","PredictorAdd5"),Et("Predictor6","PredictorAdd6"),Et("Predictor7","PredictorAdd7"),Et("Predictor8","PredictorAdd8"),Et("Predictor9","PredictorAdd9"),Et("Predictor10","PredictorAdd10"),Et("Predictor11","PredictorAdd11"),Et("Predictor12","PredictorAdd12"),Et("Predictor13","PredictorAdd13");var Xp=T.PredictorAdd2;oe("ColorIndexInverseTransform","MapARGB","32b",function(p){return p>>8&255},function(p){return p}),oe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(p){return p},function(p){return p>>8&255});var jg,es=T.ColorIndexInverseTransform,Wp=T.MapARGB,mw=T.VP8LColorIndexInverseTransformAlpha,_w=T.MapAlpha,El=T.VP8LPredictorsAdd=[];El.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var Fo,rs,Cl,Os,wA,xc,ns,Sc,qp,Bl,is,EA,Vu,bc,ju,Tl,Zp,Io,CA,un,hn,Vn,Ti,BA,xl,Lc,Kg,pF,dF=a(511),vF=a(2041),gF=a(225),yF=a(767),mF=0,ww=vF,Yg=gF,fo=yF,Ro=dF,zg=0,Xg=1,_F=2,Wg=3,qg=4,Ew=5,wF=6,Cw=7,Bw=8,Zg=9,Tw=10,L7=[2,3,7],F7=[3,3,11],EF=[280,256,256,256,40],I7=[0,1,1,1,0],R7=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],O7=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],M7=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],P7=8,xw=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Sw=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],Jp=null,N7=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],U7=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],CF=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],D7=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Q7=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],H7=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],G7=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Sl=[],as=[],TA=[],k7=1,BF=2,bl=[],Oo=[];It("UpsampleRgbLinePair",Tr,3),It("UpsampleBgrLinePair",zi,3),It("UpsampleRgbaLinePair",ts,4),It("UpsampleBgraLinePair",Ni,4),It("UpsampleArgbLinePair",oa,4),It("UpsampleRgba4444LinePair",si,2),It("UpsampleRgb565LinePair",$n,2);var $7=T.UpsampleRgbLinePair,V7=T.UpsampleBgrLinePair,TF=T.UpsampleRgbaLinePair,xF=T.UpsampleBgraLinePair,SF=T.UpsampleArgbLinePair,bF=T.UpsampleRgba4444LinePair,j7=T.UpsampleRgb565LinePair,Jg=16,ty=1<<Jg-1,td=-227,bw=482,LF=6,K7=(256<<LF)-1,FF=0,Y7=a(256),z7=a(256),X7=a(256),W7=a(256),q7=a(bw-td),Z7=a(bw-td);_A("YuvToRgbRow",Tr,3),_A("YuvToBgrRow",zi,3),_A("YuvToRgbaRow",ts,4),_A("YuvToBgraRow",Ni,4),_A("YuvToArgbRow",oa,4),_A("YuvToRgba4444Row",si,2),_A("YuvToRgb565Row",$n,2);var IF=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],ey=[0,2,8],J7=[8,7,6,4,4,2,2,2,1,1,1,1],tH=1;this.WebPDecodeRGBA=function(p,g,E,b,N){var Q=Xg,H=new mc,k=new ai;H.ba=k,k.S=Q,k.width=[k.width],k.height=[k.height];var V=k.width,Y=k.height,ct=new $r;if(ct==null||p==null)var Bt=2;else e(ct!=null),Bt=wc(p,g,E,ct.width,ct.height,ct.Pd,ct.Qd,ct.format,null);if(Bt!=0?V=0:(V!=null&&(V[0]=ct.width[0]),Y!=null&&(Y[0]=ct.height[0]),V=1),V){k.width=k.width[0],k.height=k.height[0],b!=null&&(b[0]=k.width),N!=null&&(N[0]=k.height);t:{if(b=new cc,(N=new Hp).data=p,N.w=g,N.ha=E,N.kd=1,g=[0],e(N!=null),((p=wc(N.data,N.w,N.ha,null,null,null,g,null,N))==0||p==7)&&g[0]&&(p=4),(g=p)==0){if(e(H!=null),b.data=N.data,b.w=N.w+N.offset,b.ha=N.ha-N.offset,b.put=wi,b.ac=ln,b.bc=Ei,b.ma=H,N.xa){if((p=Ir())==null){H=1;break t}if(function(Tt,mt){var Dt=[0],Ft=[0],ft=[0];e:for(;;){if(Tt==null)return 0;if(mt==null)return Tt.a=2,0;if(Tt.l=mt,Tt.a=0,q(Tt.m,mt.data,mt.w,mt.ha),!Se(Tt.m,Dt,Ft,ft)){Tt.a=3;break e}if(Tt.xb=BF,mt.width=Dt[0],mt.height=Ft[0],!an(Dt[0],Ft[0],1,Tt,null))break e;return 1}return e(Tt.a!=0),0}(p,b)){if(b=(g=Ec(b.width,b.height,H.Oa,H.ba))==0){e:{b=p;r:for(;;){if(b==null){b=0;break e}if(e(b.s.yc!=null),e(b.s.Ya!=null),e(0<b.s.Wb),e((E=b.l)!=null),e((N=E.ma)!=null),b.xb!=0){if(b.ca=N.ba,b.tb=N.tb,e(b.ca!=null),!Kp(N.Oa,E,Wg)){b.a=2;break r}if(!mn(b,E.width)||E.da)break r;if((E.da||ar(b.ca.S))&&Ct(),11>b.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),b.ca.f.kb.F!=null&&Ct()),b.Pb&&0<b.s.ua&&b.s.vb.X==null&&!pt(b.s.vb,b.s.Wa.Xa)){b.a=1;break r}b.xb=0}if(!qt(b,b.V,b.Ba,b.c,b.i,E.o,ho))break r;N.Dc=b.Ma,b=1;break e}e(b.a!=0),b=0}b=!b}b&&(g=p.a)}else g=p.a}else{if((p=new J1)==null){H=1;break t}if(p.Fa=N.na,p.P=N.P,p.qc=N.Sa,Lg(p,b)){if((g=Ec(b.width,b.height,H.Oa,H.ba))==0){if(p.Aa=0,E=H.Oa,e((N=p)!=null),E!=null){if(0<(V=0>(V=E.Md)?0:100<V?255:255*V/100)){for(Y=ct=0;4>Y;++Y)12>(Bt=N.pb[Y]).lc&&(Bt.ia=V*J7[0>Bt.lc?0:Bt.lc]>>3),ct|=Bt.ia;ct&&(alert("todo:VP8InitRandom"),N.ia=1)}N.Ga=E.Id,100<N.Ga?N.Ga=100:0>N.Ga&&(N.Ga=0)}tw(p,b)||(g=p.a)}}else g=p.a}g==0&&H.Oa!=null&&H.Oa.fd&&(g=Yp(H.ba))}H=g}Q=H!=0?null:11>Q?k.f.RGBA.eb:k.f.kb.y}else Q=null;return Q};var RF=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(T,L){for(var P="",S=0;S<4;S++)P+=String.fromCharCode(T[L++]);return P}function u(T,L){return(T[L+0]<<0|T[L+1]<<8|T[L+2]<<16)>>>0}function h(T,L){return(T[L+0]<<0|T[L+1]<<8|T[L+2]<<16|T[L+3]<<24)>>>0}new A;var c=[0],f=[0],d=[],v=new A,y=r,m=function(T,L){var P={},S=0,x=!1,M=0,D=0;if(P.frames=[],!function($,j,X,it){for(var gt=0;gt<it;gt++)if($[j+gt]!=X.charCodeAt(gt))return!0;return!1}(T,L,"RIFF",4)){var W,z;for(h(T,L+=4),L+=8;L<T.length;){var tt=l(T,L),q=h(T,L+=4);L+=4;var rt=q+(1&q);switch(tt){case"VP8 ":case"VP8L":P.frames[S]===void 0&&(P.frames[S]={}),(F=P.frames[S]).src_off=x?D:L-8,F.src_size=M+q+8,S++,x&&(x=!1,M=0,D=0);break;case"VP8X":(F=P.header={}).feature_flags=T[L];var nt=L+4;F.canvas_width=1+u(T,nt),nt+=3,F.canvas_height=1+u(T,nt),nt+=3;break;case"ALPH":x=!0,M=rt+8,D=L-8;break;case"ANIM":(F=P.header).bgcolor=h(T,L),nt=L+4,F.loop_count=(W=T)[(z=nt)+0]<<0|W[z+1]<<8,nt+=2;break;case"ANMF":var _t,F;(F=P.frames[S]={}).offset_x=2*u(T,L),L+=3,F.offset_y=2*u(T,L),L+=3,F.width=1+u(T,L),L+=3,F.height=1+u(T,L),L+=3,F.duration=u(T,L),L+=3,_t=T[L++],F.dispose=1&_t,F.blend=_t>>1&1}tt!="ANMF"&&(L+=rt)}return P}}(y,0);m.response=y,m.rgbaoutput=!0,m.dataurl=!1;var w=m.header?m.header:null,C=m.frames?m.frames:null;if(w){w.loop_counter=w.loop_count,c=[w.canvas_height],f=[w.canvas_width];for(var B=0;B<C.length&&C[B].blend!=0;B++);}var R=C[0],O=v.WebPDecodeRGBA(y,R.src_off,R.src_size,f,c);R.rgba=O,R.imgwidth=f[0],R.imgheight=c[0];for(var I=0;I<f[0]*c[0]*4;I++)d[I]=O[I];return this.width=f,this.height=c,this.data=d,this}(function(r){var e=function(){return typeof dT=="function"},t=function(c,f,d,v){var y=4,m=o;switch(v){case r.image_compression.FAST:y=1,m=a;break;case r.image_compression.MEDIUM:y=6,m=s;break;case r.image_compression.SLOW:y=9,m=A}c=n(c,f,d,m);var w=dT(c,{level:y});return r.__addimage__.arrayBufferToBinaryString(w)},n=function(c,f,d,v){for(var y,m,w,C=c.length/f,B=new Uint8Array(c.length+C),R=u(),O=0;O<C;O+=1){if(w=O*f,y=c.subarray(w,w+f),v)B.set(v(y,d,m),w+O);else{for(var I,T=R.length,L=[];I<T;I+=1)L[I]=R[I](y,d,m);var P=h(L.concat());B.set(L[P],w+O)}m=y}return B},i=function(c){var f=Array.apply([],c);return f.unshift(0),f},a=function(c,f){var d,v=[],y=c.length;v[0]=1;for(var m=0;m<y;m+=1)d=c[m-f]||0,v[m+1]=c[m]-d+256&255;return v},o=function(c,f,d){var v,y=[],m=c.length;y[0]=2;for(var w=0;w<m;w+=1)v=d&&d[w]||0,y[w+1]=c[w]-v+256&255;return y},s=function(c,f,d){var v,y,m=[],w=c.length;m[0]=3;for(var C=0;C<w;C+=1)v=c[C-f]||0,y=d&&d[C]||0,m[C+1]=c[C]+256-(v+y>>>1)&255;return m},A=function(c,f,d){var v,y,m,w,C=[],B=c.length;C[0]=4;for(var R=0;R<B;R+=1)v=c[R-f]||0,y=d&&d[R]||0,m=d&&d[R-f]||0,w=l(v,y,m),C[R+1]=c[R]-w+256&255;return C},l=function(c,f,d){if(c===f&&f===d)return c;var v=Math.abs(f-d),y=Math.abs(c-d),m=Math.abs(c+f-d-d);return v<=y&&v<=m?c:y<=m?f:d},u=function(){return[i,a,o,s,A]},h=function(c){var f=c.map(function(d){return d.reduce(function(v,y){return v+Math.abs(y)},0)});return f.indexOf(Math.min.apply(null,f))};r.processPNG=function(c,f,d,v){var y,m,w,C,B,R,O,I,T,L,P,S,x,M,D,W=this.decode.FLATE_DECODE,z="";if(this.__addimage__.isArrayBuffer(c)&&(c=new Uint8Array(c)),this.__addimage__.isArrayBufferView(c)){if(c=(w=new lnt(c)).imgData,m=w.bits,y=w.colorSpace,B=w.colors,[4,6].indexOf(w.colorType)!==-1){if(w.bits===8){T=(I=w.pixelBitlength==32?new Uint32Array(w.decodePixels().buffer):w.pixelBitlength==16?new Uint16Array(w.decodePixels().buffer):new Uint8Array(w.decodePixels().buffer)).length,P=new Uint8Array(T*w.colors),L=new Uint8Array(T);var tt,q=w.pixelBitlength-w.bits;for(M=0,D=0;M<T;M++){for(x=I[M],tt=0;tt<q;)P[D++]=x>>>tt&255,tt+=w.bits;L[M]=x>>>tt&255}}if(w.bits===16){T=(I=new Uint32Array(w.decodePixels().buffer)).length,P=new Uint8Array(T*(32/w.pixelBitlength)*w.colors),L=new Uint8Array(T*(32/w.pixelBitlength)),S=w.colors>1,M=0,D=0;for(var rt=0;M<T;)x=I[M++],P[D++]=x>>>0&255,S&&(P[D++]=x>>>16&255,x=I[M++],P[D++]=x>>>0&255),L[rt++]=x>>>16&255;m=8}v!==r.image_compression.NONE&&e()?(c=t(P,w.width*w.colors,w.colors,v),O=t(L,w.width,1,v)):(c=P,O=L,W=void 0)}if(w.colorType===3&&(y=this.color_spaces.INDEXED,R=w.palette,w.transparency.indexed)){var nt=w.transparency.indexed,_t=0;for(M=0,T=nt.length;M<T;++M)_t+=nt[M];if((_t/=255)===T-1&&nt.indexOf(0)!==-1)C=[nt.indexOf(0)];else if(_t!==T){for(I=w.decodePixels(),L=new Uint8Array(I.length),M=0,T=I.length;M<T;M++)L[M]=nt[I[M]];O=t(L,w.width,1)}}var F=function($){var j;switch($){case r.image_compression.FAST:j=11;break;case r.image_compression.MEDIUM:j=13;break;case r.image_compression.SLOW:j=14;break;default:j=12}return j}(v);return W===this.decode.FLATE_DECODE&&(z="/Predictor "+F+" "),z+="/Colors "+B+" /BitsPerComponent "+m+" /Columns "+w.width,(this.__addimage__.isArrayBuffer(c)||this.__addimage__.isArrayBufferView(c))&&(c=this.__addimage__.arrayBufferToBinaryString(c)),(O&&this.__addimage__.isArrayBuffer(O)||this.__addimage__.isArrayBufferView(O))&&(O=this.__addimage__.arrayBufferToBinaryString(O)),{alias:d,data:c,index:f,filter:W,decodeParameters:z,transparency:C,palette:R,sMask:O,predictor:F,width:w.width,height:w.height,bitsPerComponent:m,colorSpace:y}}}})(Ne.API),function(r){r.processGIF89A=function(e,t,n,i){var a=new unt(e),o=a.width,s=a.height,A=[];a.decodeAndBlitFrameRGBA(0,A);var l={data:A,width:o,height:s},u=new bE(100).encode(l,100);return r.processJPEG.call(this,u,t,n,i)},r.processGIF87A=r.processGIF89A}(Ne.API),ls.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var r=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(r);for(var e=0;e<r;e++){var t=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:n,blue:t,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},ls.prototype.parseBGR=function(){this.pos=this.offset;try{var r="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[r]()}catch(t){sn.log("bit decode error:"+t)}},ls.prototype.bit1=function(){var r,e=Math.ceil(this.width/8),t=e%4;for(r=this.height-1;r>=0;r--){for(var n=this.bottom_up?r:this.height-1-r,i=0;i<e;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var A=this.palette[a>>7-s&1];this.data[o+4*s]=A.blue,this.data[o+4*s+1]=A.green,this.data[o+4*s+2]=A.red,this.data[o+4*s+3]=255}t!==0&&(this.pos+=4-t)}},ls.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<r;i++){var a=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*i*4,s=a>>4,A=15&a,l=this.palette[s];if(this.data[o]=l.blue,this.data[o+1]=l.green,this.data[o+2]=l.red,this.data[o+3]=255,2*i+1>=this.width)break;l=this.palette[A],this.data[o+4]=l.blue,this.data[o+4+1]=l.green,this.data[o+4+2]=l.red,this.data[o+4+3]=255}e!==0&&(this.pos+=4-e)}},ls.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var i=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*n;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}r!==0&&(this.pos+=4-r)}},ls.prototype.bit15=function(){for(var r=this.width%3,e=parseInt("11111",2),t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&e)/e*255|0,s=(a>>5&e)/e*255|0,A=(a>>10&e)/e*255|0,l=a>>15?255:0,u=n*this.width*4+4*i;this.data[u]=A,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=l}this.pos+=r}},ls.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var i=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&e)/e*255|0,A=(o>>5&t)/t*255|0,l=(o>>11)/e*255|0,u=i*this.width*4+4*a;this.data[u]=l,this.data[u+1]=A,this.data[u+2]=s,this.data[u+3]=255}this.pos+=r}},ls.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*t;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},ls.prototype.bit32=function(){for(var r=this.height-1;r>=0;r--)for(var e=this.bottom_up?r:this.height-1-r,t=0;t<this.width;t++){var n=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=e*this.width*4+4*t;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=n,this.data[s+3]=o}},ls.prototype.getData=function(){return this.data},function(r){r.processBMP=function(e,t,n,i){var a=new ls(e,!1),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new bE(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(Ne.API),fO.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(e,t,n,i){var a=new fO(e),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new bE(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(Ne.API),Ne.API.processRGBA=function(r,e,t){for(var n=r.data,i=n.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,A=0,l=0;l<i;l+=4){var u=n[l],h=n[l+1],c=n[l+2],f=n[l+3];a[s++]=u,a[s++]=h,a[s++]=c,o[A++]=f}var d=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:d,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Ne.API.setLanguage=function(r){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[r]!==void 0&&(this.internal.languageSettings.languageCode=r,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},Hc=Ne.API,Dy=Hc.getCharWidthsArray=function(r,e){var t,n,i=(e=e||{}).font||this.internal.getFont(),a=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),s=e.widths?e.widths:i.metadata.Unicode.widths,A=s.fof?s.fof:1,l=e.kerning?e.kerning:i.metadata.Unicode.kerning,u=l.fof?l.fof:1,h=e.doKerning!==!1,c=0,f=r.length,d=0,v=s[0]||A,y=[];for(t=0;t<f;t++)n=r.charCodeAt(t),typeof i.metadata.widthOfString=="function"?y.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+o*(1e3/a)||0)/1e3):(c=h&&Jr(l[n])==="object"&&!isNaN(parseInt(l[n][d],10))?l[n][d]/u:0,y.push((s[n]||v)/A+c)),d=n;return y},lO=Hc.getStringUnitWidth=function(r,e){var t=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return Hc.processArabic&&(r=Hc.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,t,i)/t:Dy.apply(this,arguments).reduce(function(a,o){return a+o},0)},uO=function(r,e,t,n){for(var i=[],a=0,o=r.length,s=0;a!==o&&s+e[a]<t;)s+=e[a],a++;i.push(r.slice(0,a));var A=a;for(s=0;a!==o;)s+e[a]>n&&(i.push(r.slice(A,a)),s=0,A=a),s+=e[a],a++;return A!==a&&i.push(r.slice(A,a)),i},hO=function(r,e,t){t||(t={});var n,i,a,o,s,A,l,u=[],h=[u],c=t.textIndent||0,f=0,d=0,v=r.split(" "),y=Dy.apply(this,[" ",t])[0];if(A=t.lineIndent===-1?v[0].length+2:t.lineIndent||0){var m=Array(A).join(" "),w=[];v.map(function(B){(B=B.split(/\s*\n/)).length>1?w=w.concat(B.map(function(R,O){return(O&&R.length?`
|
||
`:"")+R})):w.push(B[0])}),v=w,A=lO.apply(this,[m,t])}for(a=0,o=v.length;a<o;a++){var C=0;if(n=v[a],A&&n[0]==`
|
||
`&&(n=n.substr(1),C=1),c+f+(d=(i=Dy.apply(this,[n,t])).reduce(function(B,R){return B+R},0))>e||C){if(d>e){for(s=uO.apply(this,[n,i,e-(c+f),e]),u.push(s.shift()),u=[s.pop()];s.length;)h.push([s.shift()]);d=i.slice(n.length-(u[0]?u[0].length:0)).reduce(function(B,R){return B+R},0)}else u=[n];h.push(u),c=d+A,f=y}else u.push(n),c+=f+d,f=y}return l=A?function(B,R){return(R?m:"")+B.join(" ")}:function(B){return B.join(" ")},h.map(l)},Hc.splitTextToSize=function(r,e,t){var n,i=(t=t||{}).fontSize||this.internal.getFontSize(),a=function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var h=this.internal.getFont(u.fontName,u.fontStyle);return h.metadata.Unicode?{widths:h.metadata.Unicode.widths||{0:1},kerning:h.metadata.Unicode.kerning||{}}:{font:h.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,t);n=Array.isArray(r)?r:String(r).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/i;a.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=t.lineIndent;var s,A,l=[];for(s=0,A=n.length;s<A;s++)l=l.concat(hO.apply(this,[n[s],o,a]));return l},function(r){r.__fontmetrics__=r.__fontmetrics__||{};for(var e="klmnopqrstuvwxyz",t={},n={},i=0;i<e.length;i++)t[e[i]]="0123456789abcdef"[i],n["0123456789abcdef"[i]]=e[i];var a=function(h){return"0x"+parseInt(h,10).toString(16)},o=r.__fontmetrics__.compress=function(h){var c,f,d,v,y=["{"];for(var m in h){if(c=h[m],isNaN(parseInt(m,10))?f="'"+m+"'":(m=parseInt(m,10),f=(f=a(m).slice(2)).slice(0,-1)+n[f.slice(-1)]),typeof c=="number")c<0?(d=a(c).slice(3),v="-"):(d=a(c).slice(2),v=""),d=v+d.slice(0,-1)+n[d.slice(-1)];else{if(Jr(c)!=="object")throw new Error("Don't know what to do with value type "+Jr(c)+".");d=o(c)}y.push(f+d)}return y.push("}"),y.join("")},s=r.__fontmetrics__.uncompress=function(h){if(typeof h!="string")throw new Error("Invalid argument passed to uncompress.");for(var c,f,d,v,y={},m=1,w=y,C=[],B="",R="",O=h.length-1,I=1;I<O;I+=1)(v=h[I])=="'"?c?(d=c.join(""),c=void 0):c=[]:c?c.push(v):v=="{"?(C.push([w,d]),w={},d=void 0):v=="}"?((f=C.pop())[0][f[1]]=w,d=void 0,w=f[0]):v=="-"?m=-1:d===void 0?t.hasOwnProperty(v)?(B+=t[v],d=parseInt(B,16)*m,m=1,B=""):B+=v:t.hasOwnProperty(v)?(R+=t[v],w[d]=parseInt(R,16)*m,m=1,d=void 0,R=""):R+=v;return y},A={codePages:["WinAnsiEncoding"],WinAnsiEncoding:s("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},l={Unicode:{Courier:A,"Courier-Bold":A,"Courier-BoldOblique":A,"Courier-Oblique":A,Helvetica:A,"Helvetica-Bold":A,"Helvetica-BoldOblique":A,"Helvetica-Oblique":A,"Times-Roman":A,"Times-Bold":A,"Times-BoldItalic":A,"Times-Italic":A}},u={Unicode:{"Courier-Oblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":s("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":s("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:s("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":s("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:s("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":s("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":s("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":s("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":s("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};r.events.push(["addFont",function(h){var c=h.font,f=u.Unicode[c.postScriptName];f&&(c.metadata.Unicode={},c.metadata.Unicode.widths=f.widths,c.metadata.Unicode.kerning=f.kerning);var d=l.Unicode[c.postScriptName];d&&(c.metadata.Unicode.encoding=d,c.encoding=d.codePages[0])}])}(Ne.API),function(r){var e=function(t){for(var n=t.length,i=new Uint8Array(n),a=0;a<n;a++)i[a]=t.charCodeAt(a);return i};r.API.events.push(["addFont",function(t){var n=void 0,i=t.font,a=t.instance;if(!i.isStandardFont){if(a===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(n=a.existsFileInVFS(i.postScriptName)===!1?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(o,s){s=/^\x00\x01\x00\x00/.test(s)?e(s):e(rv(s)),o.metadata=r.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,n)}}])}(Ne),function(r){function e(){return(Qe.canvg?Promise.resolve(Qe.canvg):Promise.resolve().then(function(){return sSt})).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}Ne.API.addSvgAsImage=function(t,n,i,a,o,s,A,l){if(isNaN(n)||isNaN(i))throw sn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(o))throw sn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=a,u.height=o;var h=u.getContext("2d");h.fillStyle="#fff",h.fillRect(0,0,u.width,u.height);var c={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return e().then(function(d){return d.fromString(h,t,c)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(d){return d.render(c)}).then(function(){f.addImage(u.toDataURL("image/jpeg",1),n,i,a,o,A,l)})}}(),Ne.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var i=0;i<this.internal.pages[n].length;i++)this.internal.pages[n][i]=this.internal.pages[n][i].replace(e,t);return this},Ne.API.viewerPreferences=function(r,e){var t;r=r||{},e=e||!1;var n,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),A=[],l=0,u=0,h=0;function c(d,v){var y,m=!1;for(y=0;y<d.length;y+=1)d[y]===v&&(m=!0);return m}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),t=this.internal.viewerpreferences.configuration,r==="reset"||e===!0){var f=s.length;for(h=0;h<f;h+=1)t[s[h]].value=t[s[h]].defaultValue,t[s[h]].explicitSet=!1}if(Jr(r)==="object"){for(i in r)if(a=r[i],c(s,i)&&a!==void 0){if(t[i].type==="boolean"&&typeof a=="boolean")t[i].value=a;else if(t[i].type==="name"&&c(t[i].valueSet,a))t[i].value=a;else if(t[i].type==="integer"&&Number.isInteger(a))t[i].value=a;else if(t[i].type==="array"){for(l=0;l<a.length;l+=1)if(n=!0,a[l].length===1&&typeof a[l][0]=="number")A.push(String(a[l]-1));else if(a[l].length>1){for(u=0;u<a[l].length;u+=1)typeof a[l][u]!="number"&&(n=!1);n===!0&&A.push([a[l][0]-1,a[l][1]-1].join(" "))}t[i].value="["+A.join(" ")+"]"}else t[i].value=t[i].defaultValue;t[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var d,v=[];for(d in t)t[d].explicitSet===!0&&(t[d].type==="name"?v.push("/"+d+" /"+t[d].value):v.push("/"+d+" "+t[d].value));v.length!==0&&this.internal.write(`/ViewerPreferences
|
||
<<
|
||
`+v.join(`
|
||
`)+`
|
||
>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=t,this},function(r){var e=function(){var n='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',i=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),a=unescape(encodeURIComponent(n)),o=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),s=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),A=unescape(encodeURIComponent("</x:xmpmeta>")),l=a.length+o.length+s.length+i.length+A.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+l+" >>"),this.internal.write("stream"),this.internal.write(i+a+o+s+A),this.internal.write("endstream"),this.internal.write("endobj")},t=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};r.addMetadata=function(n,i){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:n,namespaceuri:i||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",t),this.internal.events.subscribe("postPutResources",e)),this}}(Ne.API),function(r){var e=r.API,t=e.pdfEscape16=function(a,o){for(var s,A=o.metadata.Unicode.widths,l=["","0","00","000","0000"],u=[""],h=0,c=a.length;h<c;++h){if(s=o.metadata.characterToGlyph(a.charCodeAt(h)),o.metadata.glyIdsUsed.push(s),o.metadata.toUnicode[s]=a.charCodeAt(h),A.indexOf(s)==-1&&(A.push(s),A.push([parseInt(o.metadata.widthOfGlyph(s),10)])),s=="0")return u.join("");s=s.toString(16),u.push(l[4-s.length],s)}return u.join("")},n=function(a){var o,s,A,l,u,h,c;for(u=`/CIDInit /ProcSet findresource begin
|
||
12 dict begin
|
||
begincmap
|
||
/CIDSystemInfo <<
|
||
/Registry (Adobe)
|
||
/Ordering (UCS)
|
||
/Supplement 0
|
||
>> def
|
||
/CMapName /Adobe-Identity-UCS def
|
||
/CMapType 2 def
|
||
1 begincodespacerange
|
||
<0000><ffff>
|
||
endcodespacerange`,A=[],h=0,c=(s=Object.keys(a).sort(function(f,d){return f-d})).length;h<c;h++)o=s[h],A.length>=100&&(u+=`
|
||
`+A.length+` beginbfchar
|
||
`+A.join(`
|
||
`)+`
|
||
endbfchar`,A=[]),a[o]!==void 0&&a[o]!==null&&typeof a[o].toString=="function"&&(l=("0000"+a[o].toString(16)).slice(-4),o=("0000"+(+o).toString(16)).slice(-4),A.push("<"+o+"><"+l+">"));return A.length&&(u+=`
|
||
`+A.length+` beginbfchar
|
||
`+A.join(`
|
||
`)+`
|
||
endbfchar
|
||
`),u+=`endcmap
|
||
CMapName currentdict /CMap defineresource pop
|
||
end
|
||
end`};e.events.push(["putFont",function(a){(function(o){var s=o.font,A=o.out,l=o.newObject,u=o.putStream;if(s.metadata instanceof r.API.TTFFont&&s.encoding==="Identity-H"){for(var h=s.metadata.Unicode.widths,c=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),f="",d=0;d<c.length;d++)f+=String.fromCharCode(c[d]);var v=l();u({data:f,addLength1:!0,objectId:v}),A("endobj");var y=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:y}),A("endobj");var m=l();A("<<"),A("/Type /FontDescriptor"),A("/FontName /"+sf(s.fontName)),A("/FontFile2 "+v+" 0 R"),A("/FontBBox "+r.API.PDFObject.convert(s.metadata.bbox)),A("/Flags "+s.metadata.flags),A("/StemV "+s.metadata.stemV),A("/ItalicAngle "+s.metadata.italicAngle),A("/Ascent "+s.metadata.ascender),A("/Descent "+s.metadata.decender),A("/CapHeight "+s.metadata.capHeight),A(">>"),A("endobj");var w=l();A("<<"),A("/Type /Font"),A("/BaseFont /"+sf(s.fontName)),A("/FontDescriptor "+m+" 0 R"),A("/W "+r.API.PDFObject.convert(h)),A("/CIDToGIDMap /Identity"),A("/DW 1000"),A("/Subtype /CIDFontType2"),A("/CIDSystemInfo"),A("<<"),A("/Supplement 0"),A("/Registry (Adobe)"),A("/Ordering ("+s.encoding+")"),A(">>"),A(">>"),A("endobj"),s.objectNumber=l(),A("<<"),A("/Type /Font"),A("/Subtype /Type0"),A("/ToUnicode "+y+" 0 R"),A("/BaseFont /"+sf(s.fontName)),A("/Encoding /"+s.encoding),A("/DescendantFonts ["+w+" 0 R]"),A(">>"),A("endobj"),s.isAlreadyPutted=!0}})(a)}]),e.events.push(["putFont",function(a){(function(o){var s=o.font,A=o.out,l=o.newObject,u=o.putStream;if(s.metadata instanceof r.API.TTFFont&&s.encoding==="WinAnsiEncoding"){for(var h=s.metadata.rawData,c="",f=0;f<h.length;f++)c+=String.fromCharCode(h[f]);var d=l();u({data:c,addLength1:!0,objectId:d}),A("endobj");var v=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:v}),A("endobj");var y=l();A("<<"),A("/Descent "+s.metadata.decender),A("/CapHeight "+s.metadata.capHeight),A("/StemV "+s.metadata.stemV),A("/Type /FontDescriptor"),A("/FontFile2 "+d+" 0 R"),A("/Flags 96"),A("/FontBBox "+r.API.PDFObject.convert(s.metadata.bbox)),A("/FontName /"+sf(s.fontName)),A("/ItalicAngle "+s.metadata.italicAngle),A("/Ascent "+s.metadata.ascender),A(">>"),A("endobj"),s.objectNumber=l();for(var m=0;m<s.metadata.hmtx.widths.length;m++)s.metadata.hmtx.widths[m]=parseInt(s.metadata.hmtx.widths[m]*(1e3/s.metadata.head.unitsPerEm));A("<</Subtype/TrueType/Type/Font/ToUnicode "+v+" 0 R/BaseFont/"+sf(s.fontName)+"/FontDescriptor "+y+" 0 R/Encoding/"+s.encoding+" /FirstChar 29 /LastChar 255 /Widths "+r.API.PDFObject.convert(s.metadata.hmtx.widths)+">>"),A("endobj"),s.isAlreadyPutted=!0}})(a)}]);var i=function(a){var o,s=a.text||"",A=a.x,l=a.y,u=a.options||{},h=a.mutex||{},c=h.pdfEscape,f=h.activeFontKey,d=h.fonts,v=f,y="",m=0,w="",C=d[v].encoding;if(d[v].encoding!=="Identity-H")return{text:s,x:A,y:l,options:u,mutex:h};for(w=s,v=f,Array.isArray(s)&&(w=s[0]),m=0;m<w.length;m+=1)d[v].metadata.hasOwnProperty("cmap")&&(o=d[v].metadata.cmap.unicode.codeMap[w[m].charCodeAt(0)]),o||w[m].charCodeAt(0)<256&&d[v].metadata.hasOwnProperty("Unicode")?y+=w[m]:y+="";var B="";return parseInt(v.slice(1))<14||C==="WinAnsiEncoding"?B=c(y,v).split("").map(function(R){return R.charCodeAt(0).toString(16)}).join(""):C==="Identity-H"&&(B=t(y,d[v])),h.isHex=!0,{text:B,x:A,y:l,options:u,mutex:h}};e.events.push(["postProcessText",function(a){var o=a.text||"",s=[],A={text:o,x:a.x,y:a.y,options:a.options,mutex:a.mutex};if(Array.isArray(o)){var l=0;for(l=0;l<o.length;l+=1)Array.isArray(o[l])&&o[l].length===3?s.push([i(Object.assign({},A,{text:o[l][0]})).text,o[l][1],o[l][2]]):s.push(i(Object.assign({},A,{text:o[l]})).text);a.text=s}else a.text=i(Object.assign({},A,{text:o})).text}])}(Ne),function(r){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};r.existsFileInVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0},r.addFileToVFS=function(t,n){return e.call(this),this.internal.vFS[t]=n,this},r.getFileFromVFS=function(t){return e.call(this),this.internal.vFS[t]!==void 0?this.internal.vFS[t]:null}}(Ne.API),function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var i,a,o,s,A,l,u,h=e,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],f=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},y=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],m=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),w=!1,C=0;this.__bidiEngine__={};var B=function(S){var x=S.charCodeAt(),M=x>>8,D=v[M];return D!==void 0?h[256*D+(255&x)]:M===252||M===253?"AL":m.test(M)?"L":M===8?"R":"N"},R=function(S){for(var x,M=0;M<S.length;M++){if((x=B(S.charAt(M)))==="L")return!1;if(x==="R")return!0}return!1},O=function(S,x,M,D){var W,z,tt,q,rt=x[D];switch(rt){case"L":case"R":w=!1;break;case"N":case"AN":break;case"EN":w&&(rt="AN");break;case"AL":w=!0,rt="R";break;case"WS":rt="N";break;case"CS":D<1||D+1>=x.length||(W=M[D-1])!=="EN"&&W!=="AN"||(z=x[D+1])!=="EN"&&z!=="AN"?rt="N":w&&(z="AN"),rt=z===W?z:"N";break;case"ES":rt=(W=D>0?M[D-1]:"B")==="EN"&&D+1<x.length&&x[D+1]==="EN"?"EN":"N";break;case"ET":if(D>0&&M[D-1]==="EN"){rt="EN";break}if(w){rt="N";break}for(tt=D+1,q=x.length;tt<q&&x[tt]==="ET";)tt++;rt=tt<q&&x[tt]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(q=x.length,tt=D+1;tt<q&&x[tt]==="NSM";)tt++;if(tt<q){var nt=S[D],_t=nt>=1425&&nt<=2303||nt===64286;if(W=x[tt],_t&&(W==="R"||W==="AL")){rt="R";break}}}rt=D<1||(W=x[D-1])==="B"?"N":M[D-1];break;case"B":w=!1,i=!0,rt=C;break;case"S":a=!0,rt="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":w=!1;break;case"BN":rt="N"}return rt},I=function(S,x,M){var D=S.split("");return M&&T(D,M,{hiLevel:C}),D.reverse(),x&&x.reverse(),D.join("")},T=function(S,x,M){var D,W,z,tt,q,rt=-1,nt=S.length,_t=0,F=[],$=C?f:c,j=[];for(w=!1,i=!1,a=!1,W=0;W<nt;W++)j[W]=B(S[W]);for(z=0;z<nt;z++){if(q=_t,F[z]=O(S,j,F,z),D=240&(_t=$[q][d[F[z]]]),_t&=15,x[z]=tt=$[_t][5],D>0)if(D===16){for(W=rt;W<z;W++)x[W]=1;rt=-1}else rt=-1;if($[_t][6])rt===-1&&(rt=z);else if(rt>-1){for(W=rt;W<z;W++)x[W]=tt;rt=-1}j[z]==="B"&&(x[z]=0),M.hiLevel|=tt}a&&function(X,it,gt){for(var wt=0;wt<gt;wt++)if(X[wt]==="S"){it[wt]=C;for(var at=wt-1;at>=0&&X[at]==="WS";at--)it[at]=C}}(j,x,nt)},L=function(S,x,M,D,W){if(!(W.hiLevel<S)){if(S===1&&C===1&&!i)return x.reverse(),void(M&&M.reverse());for(var z,tt,q,rt,nt=x.length,_t=0;_t<nt;){if(D[_t]>=S){for(q=_t+1;q<nt&&D[q]>=S;)q++;for(rt=_t,tt=q-1;rt<tt;rt++,tt--)z=x[rt],x[rt]=x[tt],x[tt]=z,M&&(z=M[rt],M[rt]=M[tt],M[tt]=z);_t=q}_t++}}},P=function(S,x,M){var D=S.split(""),W={hiLevel:C};return M||(M=[]),T(D,M,W),function(z,tt,q){if(q.hiLevel!==0&&u)for(var rt,nt=0;nt<z.length;nt++)tt[nt]===1&&(rt=y.indexOf(z[nt]))>=0&&(z[nt]=y[rt+1])}(D,M,W),L(2,D,x,M,W),L(1,D,x,M,W),D.join("")};return this.__bidiEngine__.doBidiReorder=function(S,x,M){if(function(W,z){if(z)for(var tt=0;tt<W.length;tt++)z[tt]=tt;s===void 0&&(s=R(W)),l===void 0&&(l=R(W))}(S,x),o||!A||l)if(o&&A&&s^l)C=s?1:0,S=I(S,x,M);else if(!o&&A&&l)C=s?1:0,S=P(S,x,M),S=I(S,x);else if(!o||s||A||l){if(o&&!A&&s^l)S=I(S,x),s?(C=0,S=P(S,x,M)):(C=1,S=P(S,x,M),S=I(S,x));else if(o&&s&&!A&&l)C=1,S=P(S,x,M),S=I(S,x);else if(!o&&!A&&s^l){var D=u;s?(C=1,S=P(S,x,M),C=0,u=!1,S=P(S,x,M),u=D):(C=0,S=P(S,x,M),S=I(S,x),C=1,u=!1,S=P(S,x,M),u=D,S=I(S,x))}}else C=0,S=P(S,x,M);else C=s?1:0,S=P(S,x,M);return S},this.__bidiEngine__.setOptions=function(S){S&&(o=S.isInputVisual,A=S.isOutputVisual,s=S.isInputRtl,l=S.isOutputRtl,u=S.isSymmetricSwapping)},this.__bidiEngine__.setOptions(n),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],t=new r.__bidiEngine__({isInputVisual:!0});r.API.events.push(["postProcessText",function(n){var i=n.text,a=(n.x,n.y,n.options||{}),o=(n.mutex,a.lang,[]);if(a.isInputVisual=typeof a.isInputVisual!="boolean"||a.isInputVisual,t.setOptions(a),Object.prototype.toString.call(i)==="[object Array]"){var s=0;for(o=[],s=0;s<i.length;s+=1)Object.prototype.toString.call(i[s])==="[object Array]"?o.push([t.doBidiReorder(i[s][0]),i[s][1],i[s][2]]):o.push([t.doBidiReorder(i[s])]);n.text=o}else n.text=t.doBidiReorder(i);t.setOptions({isInputVisual:!0})}])}(Ne),Ne.API.TTFFont=function(){function r(e){var t;if(this.rawData=e,t=this.contents=new xu(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new Tnt(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new hnt(this.contents),this.head=new fnt(this),this.name=new ynt(this),this.cmap=new u6(this),this.toUnicode={},this.hhea=new pnt(this),this.maxp=new mnt(this),this.hmtx=new _nt(this),this.post=new vnt(this),this.os2=new dnt(this),this.loca=new Bnt(this),this.glyf=new wnt(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},r.prototype.registerTTF=function(){var e,t,n,i,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var o,s,A,l;for(l=[],o=0,s=(A=this.bbox).length;o<s;o++)e=A[o],l.push(Math.round(e*this.scaleFactor));return l}.call(this),this.stemV=0,this.post.exists?(n=255&(i=this.post.italic_angle),32768&(t=i>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(a=this.familyClass)===1||a===2||a===3||a===4||a===5||a===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},r.prototype.characterToGlyph=function(e){var t;return((t=this.cmap.unicode)!=null?t.codeMap[e]:void 0)||0},r.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},r.prototype.widthOfString=function(e,t,n){var i,a,o,s;for(o=0,a=0,s=(e=""+e).length;0<=s?a<s:a>s;a=0<=s?++a:--a)i=e.charCodeAt(a),o+=this.widthOfGlyph(this.characterToGlyph(i))+n*(1e3/t)||0;return o*(t/1e3)},r.prototype.lineHeight=function(e,t){var n;return t==null&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},r}();var Fs,xu=function(){function r(e){this.data=e??[],this.pos=0,this.length=this.data.length}return r.prototype.readByte=function(){return this.data[this.pos++]},r.prototype.writeByte=function(e){return this.data[this.pos++]=e},r.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},r.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},r.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},r.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},r.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},r.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},r.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},r.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},r.prototype.writeString=function(e){var t,n,i;for(i=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)i.push(this.writeByte(e.charCodeAt(t)));return i},r.prototype.readShort=function(){return this.readInt16()},r.prototype.writeShort=function(e){return this.writeInt16(e)},r.prototype.readLongLong=function(){var e,t,n,i,a,o,s,A;return e=this.readByte(),t=this.readByte(),n=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),A=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^i)+16777216*(255^a)+65536*(255^o)+256*(255^s)+(255^A)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*i+16777216*a+65536*o+256*s+A},r.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},r.prototype.readInt=function(){return this.readInt32()},r.prototype.writeInt=function(e){return this.writeInt32(e)},r.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},r.prototype.write=function(e){var t,n,i,a;for(a=[],n=0,i=e.length;n<i;n++)t=e[n],a.push(this.writeByte(t));return a},r}(),hnt=function(){var r;function e(t){var n,i,a;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,a=this.tableCount;0<=a?i<a:i>a;i=0<=a?++i:--i)n={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[n.tag]=n}return e.prototype.encode=function(t){var n,i,a,o,s,A,l,u,h,c,f,d,v;for(v in f=Object.keys(t).length,A=Math.log(2),h=16*Math.floor(Math.log(f)/A),o=Math.floor(h/A),u=16*f-h,(i=new xu).writeInt(this.scalarType),i.writeShort(f),i.writeShort(h),i.writeShort(o),i.writeShort(u),a=16*f,l=i.pos+a,s=null,d=[],t)for(c=t[v],i.writeString(v),i.writeInt(r(c)),i.writeInt(l),i.writeInt(c.length),d=d.concat(c),v==="head"&&(s=l),l+=c.length;l%4;)d.push(0),l++;return i.write(d),n=2981146554-r(i.data),i.pos=s+8,i.writeUInt32(n),i.data},r=function(t){var n,i,a,o;for(t=h6.call(t);t.length%4;)t.push(0);for(a=new xu(t),i=0,n=0,o=t.length;n<o;n=n+=4)i+=a.readUInt32();return 4294967295&i},e}(),cnt={}.hasOwnProperty,AA=function(r,e){for(var t in e)cnt.call(e,t)&&(r[t]=e[t]);function n(){this.constructor=r}return n.prototype=e.prototype,r.prototype=new n,r.__super__=e.prototype,r};Fs=function(){function r(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return r.prototype.parse=function(){},r.prototype.encode=function(){},r.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},r}();var fnt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="head",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},e.prototype.encode=function(t){var n;return(n=new xu).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(t),n.writeShort(this.glyphDataFormat),n.data},e}(),pO=function(){function r(e,t){var n,i,a,o,s,A,l,u,h,c,f,d,v,y,m,w,C;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),h=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(A=0;A<256;++A)this.codeMap[A]=e.readByte();break;case 4:for(f=e.readUInt16(),c=f/2,e.pos+=6,a=function(){var B,R;for(R=[],A=B=0;0<=c?B<c:B>c;A=0<=c?++B:--B)R.push(e.readUInt16());return R}(),e.pos+=2,v=function(){var B,R;for(R=[],A=B=0;0<=c?B<c:B>c;A=0<=c?++B:--B)R.push(e.readUInt16());return R}(),l=function(){var B,R;for(R=[],A=B=0;0<=c?B<c:B>c;A=0<=c?++B:--B)R.push(e.readUInt16());return R}(),u=function(){var B,R;for(R=[],A=B=0;0<=c?B<c:B>c;A=0<=c?++B:--B)R.push(e.readUInt16());return R}(),i=(this.length-e.pos+this.offset)/2,s=function(){var B,R;for(R=[],A=B=0;0<=i?B<i:B>i;A=0<=i?++B:--B)R.push(e.readUInt16());return R}(),A=m=0,C=a.length;m<C;A=++m)for(y=a[A],n=w=d=v[A];d<=y?w<=y:w>=y;n=d<=y?++w:--w)u[A]===0?o=n+l[A]:(o=s[u[A]/2+(n-d)-(c-A)]||0)!==0&&(o+=l[A]),this.codeMap[n]=65535&o}e.pos=h}return r.encode=function(e,t){var n,i,a,o,s,A,l,u,h,c,f,d,v,y,m,w,C,B,R,O,I,T,L,P,S,x,M,D,W,z,tt,q,rt,nt,_t,F,$,j,X,it,gt,wt,at,Pt,Ot,K;switch(D=new xu,o=Object.keys(e).sort(function(Z,pt){return Z-pt}),t){case"macroman":for(v=0,y=function(){var Z=[];for(d=0;d<256;++d)Z.push(0);return Z}(),w={0:0},a={},W=0,rt=o.length;W<rt;W++)w[at=e[i=o[W]]]==null&&(w[at]=++v),a[i]={old:e[i],new:w[e[i]]},y[i]=w[e[i]];return D.writeUInt16(1),D.writeUInt16(0),D.writeUInt32(12),D.writeUInt16(0),D.writeUInt16(262),D.writeUInt16(0),D.write(y),{charMap:a,subtable:D.data,maxGlyphID:v+1};case"unicode":for(x=[],h=[],C=0,w={},n={},m=l=null,z=0,nt=o.length;z<nt;z++)w[R=e[i=o[z]]]==null&&(w[R]=++C),n[i]={old:R,new:w[R]},s=w[R]-i,m!=null&&s===l||(m&&h.push(m),x.push(i),l=s),m=i;for(m&&h.push(m),h.push(65535),x.push(65535),P=2*(L=x.length),T=2*Math.pow(Math.log(L)/Math.LN2,2),c=Math.log(T/2)/Math.LN2,I=2*L-T,A=[],O=[],f=[],d=tt=0,_t=x.length;tt<_t;d=++tt){if(S=x[d],u=h[d],S===65535){A.push(0),O.push(0);break}if(S-(M=n[S].new)>=32768)for(A.push(0),O.push(2*(f.length+L-d)),i=q=S;S<=u?q<=u:q>=u;i=S<=u?++q:--q)f.push(n[i].new);else A.push(M-S),O.push(0)}for(D.writeUInt16(3),D.writeUInt16(1),D.writeUInt32(12),D.writeUInt16(4),D.writeUInt16(16+8*L+2*f.length),D.writeUInt16(0),D.writeUInt16(P),D.writeUInt16(T),D.writeUInt16(c),D.writeUInt16(I),gt=0,F=h.length;gt<F;gt++)i=h[gt],D.writeUInt16(i);for(D.writeUInt16(0),wt=0,$=x.length;wt<$;wt++)i=x[wt],D.writeUInt16(i);for(Pt=0,j=A.length;Pt<j;Pt++)s=A[Pt],D.writeUInt16(s);for(Ot=0,X=O.length;Ot<X;Ot++)B=O[Ot],D.writeUInt16(B);for(K=0,it=f.length;K<it;K++)v=f[K],D.writeUInt16(v);return{charMap:n,subtable:D.data,maxGlyphID:C+1}}},r}(),u6=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="cmap",e.prototype.parse=function(t){var n,i,a;for(t.pos=this.offset,this.version=t.readUInt16(),a=t.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=a?i<a:i>a;i=0<=a?++i:--i)n=new pO(t,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},e.encode=function(t,n){var i,a;return n==null&&(n="macroman"),i=pO.encode(t,n),(a=new xu).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},e}(),pnt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="hhea",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},e}(),dnt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="OS/2",e.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var n,i;for(i=[],n=0;n<10;++n)i.push(t.readByte());return i}(),this.charRange=function(){var n,i;for(i=[],n=0;n<4;++n)i.push(t.readInt());return i}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var n,i;for(i=[],n=0;n<2;n=++n)i.push(t.readInt());return i}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},e}(),vnt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="post",e.prototype.parse=function(t){var n,i,a;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:break;case 131072:var o;for(i=t.readUInt16(),this.glyphNameIndex=[],o=0;0<=i?o<i:o>i;o=0<=i?++o:--o)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],a=[];t.pos<this.offset+this.length;)n=t.readByte(),a.push(this.names.push(t.readString(n)));return a;case 151552:return i=t.readUInt16(),this.offsets=t.read(i);case 196608:break;case 262144:return this.map=function(){var s,A,l;for(l=[],o=s=0,A=this.file.maxp.numGlyphs;0<=A?s<A:s>A;o=0<=A?++s:--s)l.push(t.readUInt32());return l}.call(this)}},e}(),gnt=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},ynt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="name",e.prototype.parse=function(t){var n,i,a,o,s,A,l,u,h,c,f;for(t.pos=this.offset,t.readShort(),n=t.readShort(),A=t.readShort(),i=[],o=0;0<=n?o<n:o>n;o=0<=n?++o:--o)i.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+A+t.readShort()});for(l={},o=h=0,c=i.length;h<c;o=++h)a=i[o],t.pos=a.offset,u=t.readString(a.length),s=new gnt(u,a),l[f=a.nameID]==null&&(l[f]=[]),l[a.nameID].push(s);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},e}(),mnt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="maxp",e.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},e}(),_nt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="hmtx",e.prototype.parse=function(t){var n,i,a,o,s,A,l;for(t.pos=this.offset,this.metrics=[],n=0,A=this.file.hhea.numberOfMetrics;0<=A?n<A:n>A;n=0<=A?++n:--n)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(a=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var u,h;for(h=[],n=u=0;0<=a?u<a:u>a;n=0<=a?++u:--u)h.push(t.readInt16());return h}(),this.widths=function(){var u,h,c,f;for(f=[],u=0,h=(c=this.metrics).length;u<h;u++)o=c[u],f.push(o.advance);return f}.call(this),i=this.widths[this.widths.length-1],l=[],n=s=0;0<=a?s<a:s>a;n=0<=a?++s:--s)l.push(this.widths.push(i));return l},e.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},e}(),h6=[].slice,wnt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(t){var n,i,a,o,s,A,l,u,h,c;return t in this.cache?this.cache[t]:(o=this.file.loca,n=this.file.contents,i=o.indexOf(t),(a=o.lengthOf(t))===0?this.cache[t]=null:(n.pos=this.offset+i,s=(A=new xu(n.read(a))).readShort(),u=A.readShort(),c=A.readShort(),l=A.readShort(),h=A.readShort(),this.cache[t]=s===-1?new Cnt(A,u,c,l,h):new Ent(A,s,u,c,l,h),this.cache[t]))},e.prototype.encode=function(t,n,i){var a,o,s,A,l;for(s=[],o=[],A=0,l=n.length;A<l;A++)a=t[n[A]],o.push(s.length),a&&(s=s.concat(a.encode(i)));return o.push(s.length),{table:s,offsets:o}},e}(),Ent=function(){function r(e,t,n,i,a,o){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=i,this.xMax=a,this.yMax=o,this.compound=!1}return r.prototype.encode=function(){return this.raw.data},r}(),Cnt=function(){function r(e,t,n,i,a){var o,s;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=i,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;s=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&s;)o.pos+=1&s?4:2,128&s?o.pos+=8:64&s?o.pos+=4:8&s&&(o.pos+=2)}return r.prototype.encode=function(){var e,t,n;for(t=new xu(h6.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},r}(),Bnt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return AA(e,Fs),e.prototype.tag="loca",e.prototype.parse=function(t){var n,i;return t.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=2)o.push(2*t.readUInt16());return o}.call(this):function(){var a,o;for(o=[],i=0,a=this.length;i<a;i+=4)o.push(t.readUInt32());return o}.call(this)},e.prototype.indexOf=function(t){return this.offsets[t]},e.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},e.prototype.encode=function(t,n){for(var i=new Uint32Array(this.offsets.length),a=0,o=0,s=0;s<i.length;++s)if(i[s]=a,o<n.length&&n[o]==s){++o,i[s]=a;var A=this.offsets[s],l=this.offsets[s+1]-A;l>0&&(a+=l)}for(var u=new Array(4*i.length),h=0;h<i.length;++h)u[4*h+3]=255&i[h],u[4*h+2]=(65280&i[h])>>8,u[4*h+1]=(16711680&i[h])>>16,u[4*h]=(4278190080&i[h])>>24;return u},e}(),Tnt=function(){function r(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return r.prototype.generateCmap=function(){var e,t,n,i,a;for(t in i=this.font.cmap.tables[0].codeMap,e={},a=this.subset)n=a[t],e[t]=i[n];return e},r.prototype.glyphsFor=function(e){var t,n,i,a,o,s,A;for(i={},o=0,s=e.length;o<s;o++)i[a=e[o]]=this.font.glyf.glyphFor(a);for(a in t=[],i)(n=i[a])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(a in A=this.glyphsFor(t))n=A[a],i[a]=n;return i},r.prototype.encode=function(e,t){var n,i,a,o,s,A,l,u,h,c,f,d,v,y,m;for(i in n=u6.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),f={0:0},m=n.charMap)f[(A=m[i]).old]=A.new;for(d in c=n.maxGlyphID,o)d in f||(f[d]=c++);return u=function(w){var C,B;for(C in B={},w)B[w[C]]=C;return B}(f),h=Object.keys(u).sort(function(w,C){return w-C}),v=function(){var w,C,B;for(B=[],w=0,C=h.length;w<C;w++)s=h[w],B.push(u[s]);return B}(),a=this.font.glyf.encode(o,v,f),l=this.font.loca.encode(a.offsets,v),y={cmap:this.font.cmap.raw(),glyf:a.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(y["OS/2"]=this.font.os2.raw()),this.font.directory.encode(y)},r}();Ne.API.PDFObject=function(){var r;function e(){}return r=function(t,n){return(Array(n+1).join("0")+t).slice(-n)},e.convert=function(t){var n,i,a,o;if(Array.isArray(t))return"["+function(){var s,A,l;for(l=[],s=0,A=t.length;s<A;s++)n=t[s],l.push(e.convert(n));return l}().join(" ")+"]";if(typeof t=="string")return"/"+t;if(t!=null&&t.isString)return"("+t+")";if(t instanceof Date)return"(D:"+r(t.getUTCFullYear(),4)+r(t.getUTCMonth(),2)+r(t.getUTCDate(),2)+r(t.getUTCHours(),2)+r(t.getUTCMinutes(),2)+r(t.getUTCSeconds(),2)+"Z)";if({}.toString.call(t)==="[object Object]"){for(i in a=["<<"],t)o=t[i],a.push("/"+i+" "+e.convert(o));return a.push(">>"),a.join(`
|
||
`)}return""+t},e}();const xnt={name:"ol-control-printdialog",setup(r,e){const{control:t}=Ri(Bn,r,e);return t.value.on(["print","error"],function(n){if(n.image)if(n.pdf){var i=new Ne({orientation:n.print.orientation,unit:n.print.unit,format:n.print.size});i.addImage(n.image,"JPEG",n.print.position[0],n.print.position[0],n.print.imageWidth,n.print.imageHeight),i.save(n.print.legend?"legend.pdf":"map.pdf")}else n.canvas.toBlob(function(a){var o=(n.print.legend?"legend.":"map.")+n.imageType.replace("image/","");Qb.exports.saveAs(a,o)},n.imageType,n.quality);else console.warn("No canvas to export")}),{control:t}},props:{lang:{type:String}}};function Snt(r,e,t,n,i,a){return Er("",!0)}var ET=le(xnt,[["render",Snt]]),ac=function(r){r||(r={});var e=ut.create("DIV",{className:(r.className||"ol-videorec")+" ol-unselectable ol-control"});ut.create("BUTTON",{type:"button",className:"ol-start",title:"start",click:function(){this.start()}.bind(this),parent:e}),ut.create("BUTTON",{type:"button",className:"ol-stop",title:"stop",click:function(){this.stop()}.bind(this),parent:e}),ut.create("BUTTON",{type:"button",className:"ol-pause",title:"pause",click:function(){this.pause()}.bind(this),parent:e}),ut.create("BUTTON",{type:"button",className:"ol-resume",title:"resume",click:function(){this.resume()}.bind(this),parent:e}),yr.call(this,{element:e,target:r.target}),this.set("framerate",30),this.set("videoBitsPerSecond",5e6),r.videoTarget==="DIALOG"?(this._dialog=new Ba({className:"ol-fullscreen-dialog",target:document.body,closeBox:!0}),this._videoTarget=this._dialog.getContentElement()):this._videoTarget=r.videoTarget,this._printCtrl=new Ou({target:ut.create("DIV")})};Cr(ac,yr);ac.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._printCtrl),this._dialog&&this.getMap().removeControl(this._dialog)),yr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._printCtrl),this._dialog&&this.getMap().addControl(this._dialog))};ac.prototype.start=function(){var r=this._printCtrl,e=!1;function t(n){e||r.fastPrint({canvas:n},t)}r.fastPrint({},function(n){var i;try{i=n.captureStream(this.get("framerate")||30)}catch(o){this.dispatchEvent({type:"error",error:o});return}this._mediaRecorder=new MediaRecorder(i,{videoBitsPerSecond:this.get("videoBitsPerSecond")||5e6});var a=[];this._mediaRecorder.ondataavailable=function(o){a.push(o.data)},this._mediaRecorder.onstop=function(){e=!0;var o=new Blob(a,{type:"video/mp4"});if(a=[],this._videoTarget instanceof Element){var s;this._videoTarget.tagName==="VIDEO"?s=this._videoTarget:(s=this._videoTarget.querySelector("video"),s||(s=ut.create("VIDEO",{controls:"",parent:this._videoTarget}))),this._dialog&&this._dialog.show(),s.src=URL.createObjectURL(o),this.dispatchEvent({type:"stop",videoURL:s.src})}else this.dispatchEvent({type:"stop",videoURL:URL.createObjectURL(o)})}.bind(this),this._mediaRecorder.onpause=function(){e=!0,this.dispatchEvent({type:"pause"})}.bind(this),this._mediaRecorder.onresume=function(){e=!1,t(n),this.dispatchEvent({type:"resume"})}.bind(this),this._mediaRecorder.onerror=function(o){this.dispatchEvent({type:"error",error:o})}.bind(this),e=!1,t(n),this._mediaRecorder.start(),this.dispatchEvent({type:"start",canvas:n}),this.element.setAttribute("data-state","rec")}.bind(this))};ac.prototype.stop=function(){this._mediaRecorder&&(this._mediaRecorder.stop(),this._mediaRecorder=null,this.element.setAttribute("data-state","inactive"))};ac.prototype.pause=function(){this._mediaRecorder&&(this._mediaRecorder.pause(),this.element.setAttribute("data-state","pause"))};ac.prototype.resume=function(){this._mediaRecorder&&(this._mediaRecorder.resume(),this.element.setAttribute("data-state","rec"))};const bnt={name:"ol-control-videorecorder",emits:["start","stop"],setup(r,e){const{control:t}=Ri(ac,r,e),{downloadName:n}=Ph(r);return t.value.on("start",i=>{e.emit("start",i)}),t.value.on("stop",i=>{e.emit("stop",i),Qb.exports.saveAs(i.videoURL,n.value)}),{control:t}},props:{className:{type:String},framerate:{type:Number,default:30},videoBitsPerSecond:{type:Number,default:5e6},videoTarget:{type:String},downloadName:{type:String,default:"mapVideo.mp4"}}};function Lnt(r,e,t,n,i,a){return Er("",!0)}var CT=le(bnt,[["render",Lnt]]),nu={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},Fnt=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)}}(),Int={image:[or.POLYGON,or.CIRCLE,or.LINE_STRING,or.IMAGE,or.TEXT],hybrid:[or.POLYGON,or.LINE_STRING],vector:[]},Rnt={hybrid:[or.IMAGE,or.TEXT,or.DEFAULT],vector:[or.POLYGON,or.CIRCLE,or.LINE_STRING,or.IMAGE,or.TEXT,or.DEFAULT]},Ont=function(r){Fnt(e,r);function e(t){var n=r.call(this,t)||this;return n.boundHandleStyleImageChange_=n.handleStyleImageChange_.bind(n),n.dirty_=!1,n.renderedLayerRevision_,n.renderedPixelToCoordinateTransform_=null,n.renderedRotation_,n.tmpTransform_=Jn(),n}return e.prototype.prepareTile=function(t,n,i){var a,o=t.getState();return(o===ge.LOADED||o===ge.ERROR)&&(this.updateExecutorGroup_(t,n,i),this.tileImageNeedsRender_(t)&&(a=!0)),a},e.prototype.getTile=function(t,n,i,a){var o=a.pixelRatio,s=a.viewState,A=s.resolution,l=s.projection,u=this.getLayer(),h=u.getSource().getTile(t,n,i,o,l),c=a.viewHints,f=!(c[fn.ANIMATING]||c[fn.INTERACTING]);(f||!h.wantedResolution)&&(h.wantedResolution=A);var d=this.prepareTile(h,o,l);return d&&(f||Date.now()-a.time<8)&&u.getRenderMode()!==nu.VECTOR&&this.renderTileImage_(h,a),r.prototype.getTile.call(this,t,n,i,a)},e.prototype.isDrawableTile=function(t){var n=this.getLayer();return r.prototype.isDrawableTile.call(this,t)&&(n.getRenderMode()===nu.VECTOR?pe(n)in t.executorGroups:t.hasContext(n))},e.prototype.getTileImage=function(t){return t.getImage(this.getLayer())},e.prototype.prepareFrame=function(t){var n=this.getLayer().getRevision();return this.renderedLayerRevision_!=n&&(this.renderedTiles.length=0),this.renderedLayerRevision_=n,r.prototype.prepareFrame.call(this,t)},e.prototype.updateExecutorGroup_=function(t,n,i){var a=this.getLayer(),o=a.getRevision(),s=a.getRenderOrder()||null,A=t.wantedResolution,l=t.getReplayState(a);if(!(!l.dirty&&l.renderedResolution===A&&l.renderedRevision==o&&l.renderedRenderOrder==s)){var u=a.getSource(),h=a.getDeclutter(),c=u.getTileGrid(),f=u.getTileGridForProjection(i),d=f.getTileCoordExtent(t.wrappedTileCoord),v=u.getSourceTiles(n,i,t),y=pe(a);delete t.hitDetectionImageData[y],t.executorGroups[y]=[],h&&(t.declutterExecutorGroups[y]=[]);for(var m=function(R,O){var I=v[R];if(I.getState()!=ge.LOADED)return"continue";var T=I.tileCoord,L=c.getTileCoordExtent(T),P=Ko(d,L),S=Qa(P,a.getRenderBuffer()*A,w.tmpExtent),x=nA(L,P)?null:S;l.dirty=!1;var M=new Bm(0,S,A,n),D=h?new Bm(0,P,A,n):void 0,W=LU(A,n),z=function(X){var it,gt=X.getStyleFunction()||a.getStyleFunction();if(gt&&(it=gt(X,A)),it){var wt=this.renderFeature(X,W,it,M,D);this.dirty_=this.dirty_||wt,l.dirty=l.dirty||wt}},tt=I.getFeatures();s&&s!==l.renderedRenderOrder&&tt.sort(s);for(var q=0,rt=tt.length;q<rt;++q){var nt=tt[q];(!x||In(x,nt.getGeometry().getExtent()))&&z.call(w,nt)}var _t=M.finish(),F=a.getRenderMode()!==nu.VECTOR&&h&&v.length===1?null:P,$=new Tm(F,A,n,u.getOverlaps(),_t,a.getRenderBuffer());if(t.executorGroups[y].push($),D){var j=new Tm(null,A,n,u.getOverlaps(),D.finish(),a.getRenderBuffer());t.declutterExecutorGroups[y].push(j)}},w=this,C=0,B=v.length;C<B;++C)m(C);l.renderedRevision=o,l.renderedRenderOrder=s,l.renderedResolution=A}},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){var s=n.viewState.resolution,A=n.viewState.rotation;i=i??0;var l=this.getLayer(),u=l.getSource(),h=u.getTileGridForProjection(n.viewState.projection),c=ki([t]);Qa(c,s*i,c);for(var f={},d=function(B,R,O){var I=B.getId();I===void 0&&(I=pe(B));var T=f[I];if(T){if(T!==!0&&O<T.distanceSq){if(O===0)return f[I]=!0,o.splice(o.lastIndexOf(T),1),a(B,l,R);T.geometry=R,T.distanceSq=O}}else{if(O===0)return f[I]=!0,a(B,l,R);o.push(f[I]={feature:B,layer:l,geometry:R,distanceSq:O,callback:a})}},v=this.renderedTiles,y,m=function(B,R){var O=v[B],I=h.getTileCoordExtent(O.wrappedTileCoord);if(!In(I,c))return"continue";var T=pe(l),L=[O.executorGroups[T]],P=O.declutterExecutorGroups[T];P&&L.push(P),L.some(function(S){for(var x=S===P?n.declutterTree.all().map(function(z){return z.value}):null,M=0,D=S.length;M<D;++M){var W=S[M];if(y=W.forEachFeatureAtCoordinate(t,s,A,i,d,x),y)return!0}})},w=0,C=v.length;!y&&w<C;++w)m(w);return y},e.prototype.getFeatures=function(t){return new Promise(function(n,i){for(var a=this.getLayer(),o=pe(a),s=a.getSource(),A=this.renderedProjection,l=A.getExtent(),u=this.renderedResolution,h=s.getTileGridForProjection(A),c=An(this.renderedPixelToCoordinateTransform_,t.slice()),f=h.getTileCoordForCoordAndResolution(c,u),d,v=0,y=this.renderedTiles.length;v<y;++v)if(f.toString()===this.renderedTiles[v].tileCoord.toString()){if(d=this.renderedTiles[v],d.getState()===ge.LOADED){var m=h.getTileCoordExtent(d.tileCoord);s.getWrapX()&&A.canWrapX()&&!Eo(l,m)&&zS(c,A);break}d=void 0}if(!d||d.loadingSourceTiles>0){n([]);return}var w=h.getTileCoordExtent(d.wrappedTileCoord),C=Ss(w),B=[(c[0]-C[0])/u,(C[1]-c[1])/u],R=d.getSourceTiles().reduce(function(P,S){return P.concat(S.getFeatures())},[]),O=d.hitDetectionImageData[o];if(!O&&!this.animatingOrInteracting_){var I=Li(h.getTileSize(h.getZForResolution(u))),T=this.renderedRotation_,L=[this.getRenderTransform(h.getTileCoordCenter(d.wrappedTileCoord),u,0,wo,I[0]*wo,I[1]*wo,0)];O=xU(I,L,R,a.getStyleFunction(),h.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(a).renderedResolution,T),d.hitDetectionImageData[o]=O}n(SU(B,R,O))}.bind(this))},e.prototype.handleFontsChanged=function(){var t=this.getLayer();t.getVisible()&&this.renderedLayerRevision_!==void 0&&t.changed()},e.prototype.handleStyleImageChange_=function(t){this.renderIfReadyAndVisible()},e.prototype.renderDeclutter=function(t){var n=this.context,i=n.globalAlpha;n.globalAlpha=this.getLayer().getOpacity();for(var a=t.viewHints,o=!(a[fn.ANIMATING]||a[fn.INTERACTING]),s=this.renderedTiles,A=0,l=s.length;A<l;++A){var u=s[A],h=u.declutterExecutorGroups[pe(this.getLayer())];if(h)for(var c=h.length-1;c>=0;--c)h[c].execute(this.context,1,this.getTileRenderTransform(u,t),t.viewState.rotation,o,void 0,t.declutterTree)}n.globalAlpha=i},e.prototype.getTileRenderTransform=function(t,n){var i=n.pixelRatio,a=n.viewState,o=a.center,s=a.resolution,A=a.rotation,l=n.size,u=Math.round(l[0]*i),h=Math.round(l[1]*i),c=this.getLayer().getSource(),f=c.getTileGridForProjection(n.viewState.projection),d=t.tileCoord,v=f.getTileCoordExtent(t.wrappedTileCoord),y=f.getTileCoordExtent(d,this.tmpExtent)[0]-v[0],m=Ap(qd(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(o,s,A,i,u,h,y));return m},e.prototype.renderFrame=function(t,n){var i=t.viewHints,a=!(i[fn.ANIMATING]||i[fn.INTERACTING]);r.prototype.renderFrame.call(this,t,n),this.renderedPixelToCoordinateTransform_=t.pixelToCoordinateTransform.slice(),this.renderedRotation_=t.viewState.rotation;var o=this.getLayer(),s=o.getRenderMode(),A=this.context,l=A.globalAlpha;A.globalAlpha=o.getOpacity();for(var u=Rnt[s],h=t.viewState,c=h.rotation,f=o.getSource(),d=f.getTileGridForProjection(h.projection),v=d.getZForResolution(h.resolution,f.zDirection),y=this.renderedTiles,m=[],w=[],C=y.length-1;C>=0;--C){var B=y[C],R=B.executorGroups[pe(o)].filter(function(z){return z.hasExecutors(u)});if(R.length!==0){for(var O=this.getTileRenderTransform(B,t),I=B.tileCoord[0],T=!1,L=R[0].getClipCoords(O),P=0,S=m.length;P<S;++P)if(v!==I&&I<w[P]){var x=m[P];In([L[0],L[3],L[4],L[7]],[x[0],x[3],x[4],x[7]])&&(T||(A.save(),T=!0),A.beginPath(),A.moveTo(L[0],L[1]),A.lineTo(L[2],L[3]),A.lineTo(L[4],L[5]),A.lineTo(L[6],L[7]),A.moveTo(x[6],x[7]),A.lineTo(x[4],x[5]),A.lineTo(x[2],x[3]),A.lineTo(x[0],x[1]),A.clip())}m.push(L),w.push(I);for(var M=0,D=R.length;M<D;++M){var W=R[M];W.execute(A,1,O,c,a,u)}T&&A.restore()}}return A.globalAlpha=l,this.container},e.prototype.renderFeature=function(t,n,i,a,o){if(!i)return!1;var s=!1;if(Array.isArray(i))for(var A=0,l=i.length;A<l;++A)s=xm(a,t,i[A],n,this.boundHandleStyleImageChange_,void 0,o)||s;else s=xm(a,t,i,n,this.boundHandleStyleImageChange_,void 0,o);return s},e.prototype.tileImageNeedsRender_=function(t){var n=this.getLayer();if(n.getRenderMode()===nu.VECTOR)return!1;var i=t.getReplayState(n),a=n.getRevision(),o=t.wantedResolution;return i.renderedTileResolution!==o||i.renderedTileRevision!==a},e.prototype.renderTileImage_=function(t,n){var i=this.getLayer(),a=t.getReplayState(i),o=i.getRevision(),s=t.executorGroups[pe(i)];a.renderedTileRevision=o;var A=t.wrappedTileCoord,l=A[0],u=i.getSource(),h=n.pixelRatio,c=n.viewState,f=c.projection,d=u.getTileGridForProjection(f),v=d.getResolution(t.tileCoord[0]),y=n.pixelRatio/t.wantedResolution*v,m=d.getResolution(l),w=t.getContext(i);h=Math.round(Math.max(h,y/h));var C=u.getTilePixelSize(l,h,f);w.canvas.width=C[0],w.canvas.height=C[1];var B=h/y;if(B!==1){var R=Wd(this.tmpTransform_);qd(R,B,B),w.setTransform.apply(w,R)}var O=d.getTileCoordExtent(A,this.tmpExtent),I=y/m,T=Wd(this.tmpTransform_);qd(T,I,-I),D9(T,-O[0],-O[3]);for(var L=0,P=s.length;L<P;++L){var S=s[L];S.execute(w,B,T,0,!0,Int[i.getRenderMode()])}a.renderedTileResolution=t.wantedResolution},e}(cD),Mnt=Ont,Pnt=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)}}(),Nnt=function(r){Pnt(e,r);function e(t){var n=this,i=t||{},a=de({},i);delete a.preload,delete a.useInterimTilesOnError,n=r.call(this,a)||this,n.on,n.once,n.un,i.renderMode===nu.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var o=i.renderMode||nu.HYBRID;return _e(o==nu.HYBRID||o==nu.VECTOR,28),n.renderMode_=o,n.setPreload(i.preload?i.preload:0),n.setUseInterimTilesOnError(i.useInterimTilesOnError!==void 0?i.useInterimTilesOnError:!0),n.getBackground,n.setBackground,n}return e.prototype.createRenderer=function(){return new Mnt(this)},e.prototype.getFeatures=function(t){return r.prototype.getFeatures.call(this,t)},e.prototype.getRenderMode=function(){return this.renderMode_},e.prototype.getPreload=function(){return this.get(Jl.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Jl.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(Jl.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Jl.USE_INTERIM_TILES_ON_ERROR,t)},e}(j_),Unt=Nnt,kr=function(r){r=r||{};var e=this;this.dcount=0,this.show_progress=r.show_progress,this.oninfo=typeof r.oninfo=="function"?r.oninfo:null,this.onextent=typeof r.onextent=="function"?r.onextent:null,this.hasextent=r.extent||r.onextent,this.hastrash=r.trash,this.reordering=r.reordering!==!1,this._layers=[],this._layerGroup=r.layerGroup&&r.layerGroup.getLayers?r.layerGroup:null,this.onchangeCheck=typeof r.onchangeCheck=="function"?r.onchangeCheck:null,typeof r.displayInLayerSwitcher=="function"&&(this.displayInLayerSwitcher=r.displayInLayerSwitcher);var t;r.target?t=ut.create("DIV",{className:r.switcherClass||"ol-layerswitcher"}):(t=ut.create("DIV",{className:(r.switcherClass||"ol-layerswitcher")+" ol-unselectable ol-control"}),r.collapsed!==!1?t.classList.add("ol-collapsed"):t.classList.add("ol-forceopen"),this.button=ut.create("BUTTON",{type:"button",parent:t}),this.button.addEventListener("touchstart",function(n){t.classList.toggle("ol-forceopen"),t.classList.add("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:t.classList.contains("ol-collapsed")}),n.preventDefault(),e.overflow()}),this.button.addEventListener("click",function(){t.classList.toggle("ol-forceopen"),t.classList.add("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:!t.classList.contains("ol-forceopen")}),e.overflow()}),r.mouseover&&(t.addEventListener("mouseleave",function(){t.classList.add("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:!0})}),t.addEventListener("mouseover",function(){t.classList.remove("ol-collapsed"),e.dispatchEvent({type:"toggle",collapsed:!1})})),r.minibar&&(r.noScroll=!0),r.noScroll||(this.topv=ut.create("DIV",{className:"ol-switchertopdiv",parent:t,click:function(){e.overflow("+50%")}}),this.botv=ut.create("DIV",{className:"ol-switcherbottomdiv",parent:t,click:function(){e.overflow("-50%")}})),this._noScroll=r.noScroll),this.panel_=ut.create("UL",{className:"panel"}),this.panelContainer_=ut.create("DIV",{className:"panel-container",html:this.panel_,parent:t}),!r.target&&!r.noScroll&&ut.addListener(this.panel_,"mousewheel DOMMouseScroll onmousewheel",function(n){e.overflow(Math.max(-1,Math.min(1,n.wheelDelta||-n.detail)))&&(n.stopPropagation(),n.preventDefault())}),this.header_=ut.create("LI",{className:"ol-header",parent:this.panel_}),yr.call(this,{element:t,target:r.target}),this.set("drawDelay",r.drawDelay||0),this.set("selection",r.selection),r.minibar&&setTimeout(function(){var n=ut.scrollDiv(this.panelContainer_,{mousewheel:!0,vertical:!0,minibar:!0});this.on(["drawlist","toggle"],function(){n.refresh()})}.bind(this))};Cr(kr,yr);kr.prototype.tip={up:"up/down",down:"down",info:"informations...",extent:"zoom to extent",trash:"remove layer",plus:"expand/shrink"};kr.prototype.displayInLayerSwitcher=function(r){return r.get("displayInLayerSwitcher")!==!1};kr.prototype.setMap=function(r){if(yr.prototype.setMap.call(this,r),this.drawPanel(),this._listener)for(var e in this._listener)xo(this._listener[e]);this._listener=null,r&&(this._listener={moveend:r.on("moveend",this.viewChange.bind(this)),size:r.on("change:size",this.overflow.bind(this))},this._layerGroup?this._listener.change=this._layerGroup.getLayers().on("change:length",this.drawPanel.bind(this)):this._listener.change=r.getLayerGroup().getLayers().on("change:length",this.drawPanel.bind(this)))};kr.prototype.show=function(){this.element.classList.add("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!1})};kr.prototype.hide=function(){this.element.classList.remove("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!0})};kr.prototype.toggle=function(){this.element.classList.toggle("ol-forceopen"),this.overflow()};kr.prototype.isOpen=function(){return this.element.classList.contains("ol-forceopen")};kr.prototype.setHeader=function(r){ut.setHTML(this.header_,r)};kr.prototype.overflow=function(r){if(this.button&&!this._noScroll){if(ut.hidden(this.panel_)){ut.setStyle(this.element,{height:"auto"});return}var e=ut.outerHeight(this.element),t=ut.outerHeight(this.panel_),n=this.button.offsetTop+ut.outerHeight(this.button),i=this.panel_.offsetTop-n;if(t>e-n){ut.setStyle(this.element,{height:"100%"});var a=this.panel_.querySelectorAll("li.visible .li-content")[0],o=a?2*ut.getStyle(a,"height"):0;switch(r){case 1:i+=o;break;case-1:i-=o;break;case"+50%":i+=Math.round(e/2);break;case"-50%":i-=Math.round(e/2);break}return i+t<=e-3*n/2?(i=e-3*n/2-t,ut.hide(this.botv)):ut.show(this.botv),i>=0?(i=0,ut.hide(this.topv)):ut.show(this.topv),ut.setStyle(this.panel_,{top:i+"px"}),!0}else return ut.setStyle(this.element,{height:"auto"}),ut.setStyle(this.panel_,{top:0}),ut.hide(this.botv),ut.hide(this.topv),!1}else return!1};kr.prototype._setLayerForLI=function(r,e){var t=[];e.getLayers&&t.push(e.getLayers().on("change:length",this.drawPanel.bind(this))),r&&(t.push(e.on("change:opacity",function(){this.setLayerOpacity(e,r)}.bind(this))),t.push(e.on("change:visible",function(){this.setLayerVisibility(e,r)}.bind(this)))),t.push(e.on("propertychange",function(n){(n.key==="displayInLayerSwitcher"||n.key==="openInLayerSwitcher")&&this.drawPanel(n)}.bind(this))),this._layers.push({li:r,layer:e,listeners:t})};kr.prototype.setLayerOpacity=function(r,e){var t=e.querySelector(".layerswitcher-opacity-cursor");t&&(t.style.left=r.getOpacity()*100+"%"),this.dispatchEvent({type:"layer:opacity",layer:r})};kr.prototype.setLayerVisibility=function(r,e){var t=e.querySelector(".ol-visibility");t&&(t.checked=r.getVisible()),r.getVisible()?e.classList.add("ol-visible"):e.classList.remove("ol-visible"),this.dispatchEvent({type:"layer:visible",layer:r})};kr.prototype._clearLayerForLI=function(){this._layers.forEach(function(r){r.listeners.forEach(function(e){xo(e)})}),this._layers=[]};kr.prototype._getLayerForLI=function(r){for(var e=0,t;t=this._layers[e];e++)if(t.li===r)return t.layer;return null};kr.prototype.viewChange=function(){this.panel_.querySelectorAll("li").forEach(function(r){var e=this._getLayerForLI(r);e&&(this.testLayerVisibility(e)?r.classList.remove("ol-layer-hidden"):r.classList.add("ol-layer-hidden"))}.bind(this))};kr.prototype.getPanel=function(){return this.panelContainer_};kr.prototype.drawPanel=function(){if(this.getMap()){var r=this;this.dcount++,setTimeout(function(){r.drawPanel_()},this.get("drawDelay")||0)}};kr.prototype.drawPanel_=function(){if(!(--this.dcount||this.dragging_)){var r=this.panelContainer_.scrollTop;this._clearLayerForLI(),this.panel_.querySelectorAll("li").forEach(function(e){e.classList.contains("ol-header")||e.remove()}.bind(this)),this._layerGroup?this.drawList(this.panel_,this._layerGroup.getLayers()):this.getMap()&&this.drawList(this.panel_,this.getMap().getLayers()),this.panelContainer_.scrollTop=r}};kr.prototype.switchLayerVisibility=function(r,e){r.get("baseLayer")?(r.getVisible()||r.setVisible(!0),e.forEach(function(t){r!==t&&t.get("baseLayer")&&t.getVisible()&&t.setVisible(!1)})):r.setVisible(!r.getVisible())};kr.prototype.testLayerVisibility=function(r){if(!this.getMap())return!0;var e=this.getMap().getView().getResolution(),t=this.getMap().getView().getZoom();if(r.getMaxResolution()<=e||r.getMinResolution()>=e)return!1;if(r.getMinZoom&&(r.getMinZoom()>=t||r.getMaxZoom()<t))return!1;var n=r.getExtent();if(n){var i=this.getMap().getView().calculateExtent(this.getMap().getSize());return In(i,n)}return!0};kr.prototype.dragOrdering_=function(r){r.stopPropagation(),r.preventDefault();var e=this,t=r.currentTarget.parentNode.parentNode,n=!0,i=this.panel_,a,o=r.pageY||r.touches&&r.touches.length&&r.touches[0].pageY||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageY,s,A,l,u;t.parentNode.classList.add("drag");function h(){if(s){var f=l,d=e.getSelection()===f;if(f&&s){var v;u?v=u.getLayers():v=e._layerGroup?e._layerGroup.getLayers():e.getMap().getLayers();for(var y=v.getArray(),m=0;m<y.length;m++)if(y[m]==f){v.removeAt(m);break}for(var w=0;w<y.length;w++)if(y[w]===s){m>w?v.insertAt(w,f):v.insertAt(w+1,f);break}}d&&e.selectLayer(f),e.dispatchEvent({type:"reorder-end",layer:f,group:u})}t.parentNode.querySelectorAll("li").forEach(function(C){C.classList.remove("dropover"),C.classList.remove("dropover-after"),C.classList.remove("dropover-before")}),t.classList.remove("drag"),t.parentNode.classList.remove("drag"),e.element.classList.remove("drag"),A&&A.remove(),ut.removeListener(document,"mousemove touchmove",c),ut.removeListener(document,"mouseup touchend touchcancel",h)}function c(f){if(a=f.pageY||f.touches&&f.touches.length&&f.touches[0].pageY||f.changedTouches&&f.changedTouches.length&&f.changedTouches[0].pageY,n&&Math.abs(o-a)>2&&(n=!1,t.classList.add("drag"),l=e._getLayerForLI(t),s=!1,u=e._getLayerForLI(t.parentNode.parentNode),A=ut.create("LI",{className:"ol-dragover",html:t.innerHTML,style:{position:"absolute","z-index":1e4,left:t.offsetLeft,opacity:.5,width:ut.outerWidth(t),height:ut.getStyle(t,"height")},parent:i}),e.element.classList.add("drag"),e.dispatchEvent({type:"reorder-start",layer:l,group:u})),!n){f.preventDefault(),f.stopPropagation(),ut.setStyle(A,{top:a-ut.offsetRect(i).top+i.scrollTop+5});var d;for(f.touches?d=document.elementFromPoint(f.touches[0].clientX,f.touches[0].clientY):d=f.target,d.classList.contains("ol-switcherbottomdiv")?e.overflow(-1):d.classList.contains("ol-switchertopdiv")&&e.overflow(1);d&&d.tagName!=="LI";)d=d.parentNode;(!d||!d.classList.contains("dropover"))&&t.parentNode.querySelectorAll("li").forEach(function(v){v.classList.remove("dropover"),v.classList.remove("dropover-after"),v.classList.remove("dropover-before")}),d&&d.parentNode.classList.contains("drag")&&d!==t?(s=e._getLayerForLI(d),s&&!s.get("allwaysOnTop")==!l.get("allwaysOnTop")?(d.classList.add("dropover"),d.classList.add(t.offsetTop<d.offsetTop?"dropover-after":"dropover-before")):s=!1,ut.show(A)):(s=!1,d===t?ut.hide(A):ut.show(A)),s?A.classList.remove("forbidden"):A.classList.add("forbidden")}}ut.addListener(document,"mousemove touchmove",c),ut.addListener(document,"mouseup touchend touchcancel",h)};kr.prototype.dragOpacity_=function(r){r.stopPropagation(),r.preventDefault();var e=this,t=r.target,n=this._getLayerForLI(t.parentNode.parentNode.parentNode);if(!n)return;var i=r.pageX||r.touches&&r.touches.length&&r.touches[0].pageX||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageX,a=ut.getStyle(t,"left")-i;e.dragging_=!0;function o(){ut.removeListener(document,"mouseup touchend touchcancel",o),ut.removeListener(document,"mousemove touchmove",s),e.dragging_=!1}function s(A){var l=A.pageX||A.touches&&A.touches.length&&A.touches[0].pageX||A.changedTouches&&A.changedTouches.length&&A.changedTouches[0].pageX,u=(a+l)/ut.getStyle(t.parentNode,"width"),h=Math.max(0,Math.min(1,u));ut.setStyle(t,{left:h*100+"%"}),t.parentNode.nextElementSibling.innerHTML=Math.round(h*100),n.setOpacity(h)}ut.addListener(document,"mouseup touchend touchcancel",o),ut.addListener(document,"mousemove touchmove",s)};kr.prototype.drawList=function(r,e){var t=this,n=e.getArray(),i=function(u){u.stopPropagation(),u.preventDefault();var h=t._getLayerForLI(this.parentNode.parentNode);t.switchLayerVisibility(h,e),t.get("selection")&&h.getVisible()&&t.selectLayer(h),t.onchangeCheck&&t.onchangeCheck(h)};function a(u){u.stopPropagation(),u.preventDefault();var h=t._getLayerForLI(this.parentNode.parentNode);t.oninfo(h),t.dispatchEvent({type:"info",layer:h})}function o(u){u.stopPropagation(),u.preventDefault();var h=t._getLayerForLI(this.parentNode.parentNode);t.onextent?t.onextent(h):t.getMap().getView().fit(h.getExtent(),t.getMap().getSize()),t.dispatchEvent({type:"extent",layer:h})}function s(u){u.stopPropagation(),u.preventDefault();var h=this.parentNode.parentNode.parentNode.parentNode,c,f=t._getLayerForLI(h);f?(c=t._getLayerForLI(this.parentNode.parentNode),f.getLayers().remove(c),f.getLayers().getLength()==0&&!f.get("noSwitcherDelete")&&s.call(h.querySelectorAll(".layerTrash")[0],u)):(h=this.parentNode.parentNode,t.getMap().removeLayer(t._getLayerForLI(h)))}function A(u){if(!this.displayInLayerSwitcher(u)){this._setLayerForLI(null,u);return}var h=ut.create("LI",{className:(u.getVisible()?"visible ":" ")+(u.get("baseLayer")?"baselayer":""),parent:r});this._setLayerForLI(h,u),this._selectedLayer===u&&h.classList.add("ol-layer-select");var c=ut.create("DIV",{className:"ol-layerswitcher-buttons",parent:h}),f=ut.create("DIV",{className:"li-content",parent:h});ut.create("INPUT",{type:u.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:u.getVisible(),click:i,parent:f});var d=ut.create("LABEL",{title:u.get("title")||u.get("name"),click:i,unselectable:"on",style:{userSelect:"none"},parent:f});if(d.addEventListener("selectstart",function(){return!1}),ut.create("SPAN",{html:u.get("title")||u.get("name"),click:function(B){this.get("selection")&&(B.stopPropagation(),this.selectLayer(u))}.bind(this),parent:d}),this.reordering&&(l<n.length-1&&(u.get("allwaysOnTop")||!n[l+1].get("allwaysOnTop"))||l>0&&(!u.get("allwaysOnTop")||n[l-1].get("allwaysOnTop")))&&ut.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(B){t.dragOrdering_(B)}},parent:c}),u.getLayers){var v=0;u.getLayers().forEach(function(B){t.displayInLayerSwitcher(B)&&v++}),v&&ut.create("DIV",{className:u.get("openInLayerSwitcher")?"collapse-layers":"expend-layers",title:this.tip.plus,click:function(){var B=t._getLayerForLI(this.parentNode.parentNode);B.set("openInLayerSwitcher",!B.get("openInLayerSwitcher"))},parent:c})}if(this.oninfo&&ut.create("DIV",{className:"layerInfo",title:this.tip.info,click:a,parent:c}),this.hastrash&&!u.get("noSwitcherDelete")&&ut.create("DIV",{className:"layerTrash",title:this.tip.trash,click:s,parent:c}),this.hasextent&&n[l].getExtent()){var y=n[l].getExtent();y.length==4&&y[0]<y[2]&&y[1]<y[3]&&ut.create("DIV",{className:"layerExtent",title:this.tip.extent,click:o,parent:c})}if(this.show_progress&&u instanceof Ob){var m=ut.create("DIV",{className:"layerswitcher-progress",parent:f});this.setprogress_(u),u.layerswitcher_progress=ut.create("DIV",{parent:m})}var w=ut.create("DIV",{className:"layerswitcher-opacity",click:function(B){if(B.target===this){B.stopPropagation(),B.preventDefault();var R=Math.max(0,Math.min(1,B.offsetX/ut.getStyle(this,"width")));t._getLayerForLI(this.parentNode.parentNode).setOpacity(R)}},parent:f});if(ut.create("DIV",{className:"layerswitcher-opacity-cursor ol-noscroll",style:{left:u.getOpacity()*100+"%"},on:{"mousedown touchstart":function(B){t.dragOpacity_(B)}},parent:w}),ut.create("DIV",{className:"layerswitcher-opacity-label",html:Math.round(u.getOpacity()*100),parent:f}),u.getLayers&&(h.classList.add("ol-layer-group"),u.get("openInLayerSwitcher")===!0)){var C=ut.create("UL",{parent:h});this.drawList(C,u.getLayers())}h.classList.add(this.getLayerClass(u)),this.dispatchEvent({type:"drawlist",layer:u,li:h})}for(var l=n.length-1;l>=0;l--)A.call(this,n[l]);this.viewChange(),r===this.panel_&&this.overflow()};kr.prototype.getLayerClass=function(r){return r?r.getLayers?"ol-layer-group":r instanceof sA?"ol-layer-vector":r instanceof Unt?"ol-layer-vectortile":r instanceof Ob?"ol-layer-tile":r instanceof LD?"ol-layer-image":r instanceof jD?"ol-layer-heatmap":r.getFeatures?"ol-layer-vectorimage":"unknown":"none"};kr.prototype.selectLayer=function(r,e){if(!r){if(!this.getMap())return;r=this.getMap().getLayers().item(this.getMap().getLayers().getLength()-1)}this._selectedLayer=r,this.drawPanel(),e||this.dispatchEvent({type:"select",layer:r})};kr.prototype.getSelection=function(){return this._selectedLayer};kr.prototype.setprogress_=function(r){if(!r.layerswitcher_progress){var e=0,t=0,n=function(){t===e?(t=e=0,ut.setStyle(r.layerswitcher_progress,{width:0})):ut.setStyle(r.layerswitcher_progress,{width:(e/t*100).toFixed(1)+"%"})};r.getSource().on("tileloadstart",function(){t++,n()}),r.getSource().on("tileloadend",function(){e++,n()}),r.getSource().on("tileloaderror",function(){e++,n()})}};const Dnt={name:"ol-layerswitcher-control",setup(r,e){const{control:t}=Ri(kr,r,e);return{control:t}},props:{selection:{type:Boolean},displayInLayerSwitcher:{type:Function},show_progress:{type:Boolean,default:!1},mouseover:{type:Boolean,default:!1},reordering:{type:Boolean,default:!0},trash:{type:Boolean,default:!1},oninfo:{type:Function},extent:{type:Boolean},onextent:{type:Function},drawDelay:{type:Number},collapsed:{type:Boolean,default:!0},layerGroup:{type:Object},noScroll:{type:Boolean,default:!1}}};function Qnt(r,e,t,n,i,a){return Er("",!0)}var km=le(Dnt,[["render",Qnt]]);K_.prototype.getPreview=function(){return"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAk6QAAJOkBUCTn+AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAANeSURBVHic7ZpPiE1RHMc/780MBhkik79JSUlIUbOxI+wkI2yRhYSUlJLNpJF/xcpiJBmZGBZsNM1CkmhKITGkGbH0/BuPmXnP4rxbb/TOn3fvOffeec6nfqvb/b7f93fveeec37ng8Xg8Ho/nf6Uu4d+fDswFssCvhHOJhaXAMeApMAQUyyIPPAdOAiuTStAVy4EHjDWsix5gdRLJ2mY34ulWYz6IEeA4kIk9awtkgTOEM/5vdAKT4k0/Ou3YMR/ELcbRm9AKFLBbgCJwNE4TYZkJfMG++SIwDCyLz0o4bI17WdyJz0r1TAZ+oDcxCBwAFgIzEIuhvcBbg3sLwOK4DFXLFvQGniCGSSUagS4DjUPOHESkA3XiOWCORqMR6Nfo9DjI3QqPUSd+ylBnv0Zn0GrWFvmIOvGNhjqrNDp/EAutyFgRKUM2tgO+Gur81FxvAKYZaimxXYBvmuuLDHWWaK4X0RfJCNsF6NdcbzXU2a65PohYFKWOc+jn8PUajbWIXaBKp9NB7lZYh34OzwFbFfd/NtDYYSth27urLGIm0M31AL3APWAAmIooymaDnPIl/Vz4NN1yHrd7gcvxWQnHAuA3bsyPop8hUsE13BSgK04TUViBeFo2zedJ8S6wElexW4D2eNOPTjNi6WvD/DtEr8E6tk6GGoAmxFY2iFHE9NZiQf8gogiB9gTEH23izAZuE77vHyU+ANucO1QwD3hD/MbLowAcdm20EmkwXx4n3NodS9rMB2HabYpEWs0HcRqHp0fNwAvJD+eBTZr7p6BvmQVxUaEzEbiruNfJekH15L8jtrEm7JJolEcOmKXRqQOuKDQuY7HZY8s8iNfzkSLxIuI43FTrkkLnOlBfRW4VsWk+oAX5weknxFAxJQNckGgVgZuIRVoomoGXEmGTMa+iQ6K7M4SW7k24QYgiuDQPYinbhugiF4H3RGtzZYCzyIvQXfpNI1ybLyeLpf5+iTbkRbiP2EcocTHm4+YI8iI8RFHwWjAfsA95Q+YZFU6wasl8wB7kReijtNbIILa0vcg/PRlGfPQwHmlCviDqAzaA+OREtzqr1ejOIDorxlNEjTGUBV4nnUWCvAJxGDlA8q9j3DEArAn2zvXAfOwfl6eVAmJrPpJ0Ih6Px+PxeJLjLwPul3vj5d0eAAAAAElFTkSuQmCC"};PD.prototype.getPreview=function(r,e){r||(r=[21020,6355964]),e||(e=150);var t=this.getTileGrid().getTileCoordForCoordAndResolution(r,e),n=this.getTileUrlFunction();return n.call(this,t,this.getProjection())};eet.prototype.getPreview=function(r,e){r||(r=[21020,6355964]),e||(e=150);var t=this.getTileUrlFunction();if(t){var n=this.getTileGrid()||this.getTileGridForProjection(this.getProjection()),i=n.getTileCoordForCoordAndResolution(r,e);return t.call(this,i,1,this.getProjection())}var a=this.getGetFeatureInfoUrl?this.getGetFeatureInfoUrl(r,e,this.getProjection()||"EPSG:3857",{}):this.getFeatureInfoUrl(r,e,this.getProjection()||"EPSG:3857",{});return a=a.replace(/getfeatureinfo/i,"GetMap"),a};qh.prototype.getPreview=function(r,e,t){if(this.get("preview"))return[this.get("preview")];if(e||(e=150),e<this.getMinResolution()||e>this.getMaxResolution()){var n=this.getMinResolution(),i=this.getMaxResolution();for(i>1e5&&(i=156543),n<.15&&(n=.15),e=i;i>n;)n*=2,i/=2,e=n}var a=this.getExtent();return r||(r=[21020,6355964]),a&&!ws(a,r)&&(r=[(a[0]+a[2])/2,(a[1]+a[3])/2]),t&&(r=wu(r,t,this.getSource().getProjection())),this.getSource&&this.getSource()?[this.getSource().getPreview(r,e)]:[]};Jv.prototype.getPreview=function(r,e){if(this.get("preview"))return[this.get("preview")];var t=[];if(this.getLayers)for(var n=this.getLayers().getArray(),i=0;i<n.length;i++)t=t.concat(n[i].getPreview(r,e));return t};var l1=function(r){r=r||{},r.switcherClass="ol-layerswitcher-image",r.mouseover!==!1&&(r.mouseover=!0),kr.call(this,r)};Cr(l1,kr);l1.prototype.drawList=function(r,e){var t=this,n=function(i){i.preventDefault();var a=t._getLayerForLI(this);t.switchLayerVisibility(a,e),i.type=="touchstart"&&t.element.classList.add("ol-collapsed")};ut.setStyle(r,{height:"auto"}),e.forEach(function(i){if(t.displayInLayerSwitcher(i)){var a=i.getPreview?i.getPreview():["none"],o=ut.create("LI",{className:"ol-imgcontainer"+(i.getVisible()?" ol-visible":""),on:{"touchstart click":n},parent:r});t._setLayerForLI(o,i),a.forEach(function(s){ut.create("IMG",{src:s,parent:o})}),ut.create("p",{html:i.get("title")||i.get("name"),parent:o}),t.testLayerVisibility(i)&&o.classList.add("ol-layer-hidden")}})};l1.prototype.overflow=function(){};const Hnt={name:"ol-layerswitcherimage-control",extends:km,setup(r,e){const{control:t}=Ri(l1,r,e);return{control:t}}};function Gnt(r,e,t,n,i,a){return Er("",!0)}var BT=le(Hnt,[["render",Gnt]]),ma=function(r){r||(r={});var e=document.createElement("div");if(r.target)e=ut.create("DIV",{className:r.className||"ol-mapzone"});else{e=ut.create("DIV",{className:(r.className||"ol-mapzone")+" ol-unselectable ol-control ol-collapsed"});var t=ut.create("BUTTON",{type:"button",on:{click:function(){e.classList.toggle("ol-collapsed"),n.forEach(function(i){i.updateSize()})}.bind(this)},parent:e});ut.create("I",{parent:t})}yr.call(this,{element:e,target:r.target}),this.set("centerOnClick",r.centerOnClick);var n=this._maps=[];this._projection=r.projection,this._layer=r.layer,r.zones.forEach(this.addZone.bind(this)),setTimeout(function(){n.forEach(function(i){i.updateSize()})})};Cr(ma,yr);ma.prototype.setCollapsed=function(r){r?(this.element.classList.remove("ol-collapsed"),this.getMaps().forEach(function(e){e.updateSize()})):this.element.classList.add("ol-collapsed")};ma.prototype.getCollapsed=function(){return this.element.classList.contains("ol-collapsed")};ma.prototype.setVisible=ma.prototype.setCollapsed;ma.prototype.getMaps=function(){return this._maps};ma.prototype.getLength=function(){return this._maps.length};ma.prototype.addZone=function(r){var e=new Ks({zoom:6,center:[0,0],projection:this._projection}),t;r.map?t=mm(r.map.getView().calculateExtent(),r.map.getView().getProjection(),e.getProjection()):t=mm(r.extent,"EPSG:4326",e.getProjection());var n=ut.create("DIV",{className:"ol-mapzonezone",parent:this.element,click:function(){var o=-1;this._maps.forEach(function(s,A){s.get("zone")===r&&(o=A)}),this.dispatchEvent({type:"select",zone:r,index:o,coordinate:wa(t),extent:t}),this.get("centerOnClick")!==!1&&this.getMap().getView().fit(t),this.setVisible(!1)}.bind(this)}),i;r.layer?i=r.layer:typeof this._layer=="function"?i=this._layer(r):i=new this._layer.constructor({source:this._layer.getSource()});var a=new z_({target:n,view:e,controls:[],interactions:[],layers:[i]});a.set("zone",r),this._maps.push(a),e.fit(t),ut.create("P",{html:r.title,parent:n})};ma.prototype.removeZone=function(r){var e=this.element.querySelectorAll(".ol-mapzonezone")[r];e&&(e.remove(),this._maps.splice(r,1))};ma.zones={};ma.zones.DOM=[{title:"Guadeloupe",extent:[-61.898594315312444,15.75623038647845,-60.957887532935324,16.575317670979473]},{title:"Guyane",extent:[-54.72525931072715,2.1603763430019,-51.528236062921344,5.7984307809552575]},{title:"Martinique",extent:[-61.257556528564756,14.387506317407514,-60.76934912110432,14.895067461729951]},{title:"Mayotte",extent:[44.959844536967815,-13.01674138212816,45.35328866510648,-12.65521942207829]},{title:"La réunion",extent:[55.17059012967656,-21.407680069231688,55.88195702001797,-20.85560221637526]}];ma.zones.TOM=[{title:"Polynésie Française",extent:[206.23664226630862,-22.189040615809787,221.85920743981987,-10.835039595040698]},{title:"Nouvelle Calédonie",extent:[163.76420580160925,-22.581641092751838,167.66984709498706,-19.816411635668445]},{title:"St-Pierre et Miquelon",extent:[-56.453698765748676,46.74449858188555,-56.0980198121544,47.14669874229787]},{title:"Wallis et Futuna",extent:[181.7588623143665,-14.7341169873267,183.95612353301715,-13.134720799175085]},{title:"St-Martin St-Barthélemy",extent:[-63.1726389501678,17.806097291313506,-62.7606535945649,18.13267688837938]}];ma.zones.DOMTOM=[{title:"Métropole",extent:[-5.318421740712579,41.16082274292913,9.73284186155716,51.21957336557702]}].concat(ma.zones.DOM,ma.zones.TOM);const knt={name:"ol-zone-control",setup(r,e){const{control:t}=Ri(ma,r,e);return{control:t}},props:{className:{type:String},zones:{type:Array},layer:{type:[Object,Function]},projection:{type:String,default:"EPSG:3857"},centerOnClick:{type:Boolean,default:!0}}};function $nt(r,e,t,n,i,a){return Er("",!0)}var TT=le(knt,[["render",$nt]]);function $m(r){$m.installed||($m.installed=!0,r.component(qB.name,qB),r.component(ZB.name,ZB),r.component(JB.name,JB),r.component(tT.name,tT),r.component(eT.name,eT),r.component(rT.name,rT),r.component(nT.name,nT),r.component(iT.name,iT),r.component(zR.name,zR),r.component(aT.name,aT),r.component(oT.name,oT),r.component(sT.name,sT),r.component(AT.name,AT),r.component(lT.name,lT),r.component(ET.name,ET),r.component(CT.name,CT),r.component(km.name,km),r.component(BT.name,BT),r.component(TT.name,TT))}var Vnt=Object.freeze(Object.defineProperty({__proto__:null,default:$m,install:$m,FullScreenControl:qB,MousePositionControl:ZB,AttributionControl:JB,OverviewMapControl:tT,ScaleLineControl:eT,ZoomControl:rT,ZoomSliderControl:nT,ZoomToExtentControl:iT,ContextMenuControl:aT,SwipeControl:oT,ControlBar:sT,ToggleControl:AT,ButtonControl:lT,PrintDialog:ET,VideoRecorderControl:CT,LayerSwitcherControl:km,LayerSwitcherImageControl:BT,ZoneControl:TT},Symbol.toStringTag,{value:"Module"}));function pp(r,e){const t=Ce("feature"),{properties:n}=dr(e);let i=pr(()=>new r(...Object.values(n)));return ce(n,()=>{t.value.setGeometry(i.value),t.value.changed()}),ce(t,()=>{t.value.setGeometry(i.value)}),ir(()=>{t.value.setGeometry(i.value)}),Ar(()=>{t.value.setGeometry(null)}),{geometry:i}}const jnt={name:"ol-geom-point",setup(r){const{geometry:e}=pp(cr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Knt(r,e,t,n,i,a){return Er("",!0)}var xT=le(jnt,[["render",Knt]]);const Ynt={name:"ol-geom-line-string",setup(r){const{geometry:e}=pp(Dr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function znt(r,e,t,n,i,a){return Er("",!0)}var ST=le(Ynt,[["render",znt]]);const Xnt={name:"ol-geom-polygon",setup(r){const{geometry:e}=pp(Cn,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Wnt(r,e,t,n,i,a){return Er("",!0)}var bT=le(Xnt,[["render",Wnt]]);const qnt={name:"ol-geom-multi-point",setup(r){const{geometry:e}=pp(zo,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Znt(r,e,t,n,i,a){return Er("",!0)}var LT=le(qnt,[["render",Znt]]);const Jnt={name:"ol-geom-multi-line-string",setup(r){const{geometry:e}=pp(Ea,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function tit(r,e,t,n,i,a){return Er("",!0)}var FT=le(Jnt,[["render",tit]]);const eit={name:"ol-geom-multi-polygon",setup(r){const{geometry:e}=pp(Ca,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function rit(r,e,t,n,i,a){return Er("",!0)}var IT=le(eit,[["render",rit]]);function Vm(r){Vm.installed||(Vm.installed=!0,r.component(xT.name,xT),r.component(ST.name,ST),r.component(bT.name,bT),r.component(LT.name,LT),r.component(FT.name,FT),r.component(IT.name,IT))}var nit=Object.freeze(Object.defineProperty({__proto__:null,default:Vm,install:Vm,Point:xT,LineString:ST,Polygon:bT,MultiPoint:LT,MultiLineString:FT,MultiPolygon:IT},Symbol.toStringTag,{value:"Module"}));const iit={name:"ol-style",setup(r){const e=Ce("stylable",null),{properties:t}=dr(r);let n=pr(()=>new ta(t));const i=o=>{if(e instanceof Cb||e instanceof Bb){e.getOverlay().setStyle(o),e.value.dispatchEvent("styleChanged");return}try{e.value.setStyle(o),e.value.changed(),e.value.dispatchEvent("styleChanged")}catch{e.value.style_=o,e.value.values_.style=o,e.value.changed(),e.value.dispatchEvent("styleChanged")}},a=pr(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return ce(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),ir(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),Ar(()=>{i(null)}),Gr("style",n),Gr("styledObj",e),{style:n}},props:{zIndex:{type:Number},overrideStyleFunction:{type:Function}}};function ait(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var RT=le(iit,[["render",ait]]);const oit={name:"ol-style-circle",setup(r){const e=Ce("style",null),t=Ce("styledObj",null),{properties:n}=dr(r),i=s=>new ng(xs(On({},s),{fill:new ra,stroke:new Fi}));let a=pr(()=>i(n));const o=()=>{e.value.setImage(null),e.value.setImage(a.value),t.value.changed()};ce(n,()=>{o()}),ce(e,()=>{o()}),ir(()=>{e.value.setImage(a.value)}),Ar(()=>{e.value.setImage(null)}),Gr("circle",a),Gr("styledObj",t)},props:{radius:{type:Number},scale:{type:Number}}};function sit(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var OT=le(oit,[["render",sit]]);const Ait={name:"ol-style-stroke",setup(r){const e=Ce("style",null),t=Ce("circle",null),n=Ce("styledObj",null),{properties:i}=dr(r);if(e!=null&&t==null){let a=new Fi(i);e.value.setStroke(a);const o=()=>{e.value.setStroke(null),a=new Fi(i),e.value.setStroke(a)};ce(i,()=>{o()}),ce(e,()=>{o()}),ir(()=>{e.value.setStroke(a)}),Ar(()=>{e.value.setStroke(null)})}else if(t!=null){const a=o=>{t.value.getStroke().setColor(o.color),t.value.getStroke().setLineCap(o.lineCap),t.value.getStroke().setLineDash(o.lineDash),t.value.getStroke().setLineDashOffset(o.lineDashOffset),t.value.getStroke().setLineJoin(o.lineJoin),t.value.getStroke().setMiterLimit(o.miterLimit),t.value.getStroke().setWidth(o.width),t.value.setRadius(t.value.getRadius());try{n.value.changed()}catch{n.changed()}};a(i),ce(i,o=>{a(o)}),ce(t,()=>{a(i)})}},props:{color:{type:String},lineCap:{type:String,default:"round"},lineJoin:{type:String,default:"round"},lineDash:{type:Array},lineDashOffset:{type:Number,default:0},miterLimit:{type:Number,default:10},width:{type:Number,default:1}}};function lit(r,e,t,n,i,a){return Er("",!0)}var MT=le(Ait,[["render",lit]]);const uit={name:"ol-style-fill",setup(r){const e=Ce("style",null),t=Ce("circle",null),n=Ce("styledObj",null),{properties:i}=dr(r);if(e!=null&&t==null){let a=new ra(i);e.value.setFill(a);const o=()=>{e.value.setFill(null),a=new ra(i),e.value.setFill(a)};ce(i,()=>{o()}),ce(e,()=>{o()}),ir(()=>{e.value.setFill(a)}),Ar(()=>{e.value.setFill(null)})}else if(t!=null){const a=o=>{t.value.getFill().setColor(o),t.value.setRadius(t.value.getRadius());try{n.value.changed()}catch{n.changed()}};a(i.color),ce(i,()=>{a(i.color)}),ce(t,()=>{a(i.color)})}},props:{color:{type:String}}};function hit(r,e,t,n,i,a){return Er("",!0)}var PT=le(uit,[["render",hit]]);const cit={name:"ol-style-icon",setup(r){const e=Ce("style",null),t=Ce("styledObj",null),{properties:n}=dr(r);let i=pr(()=>{let o=new og(n);return o.load(),o});const a=()=>{e.value.setImage(null),e.value.setImage(i.value),t.value.changed()};ce(n,()=>{a()}),ce(e,()=>{a()}),ir(()=>{e.value.setImage(i.value)}),Ar(()=>{e.value.setImage(null)})},props:{anchor:{type:Array},anchorOrigin:{type:String,default:"top-left"},anchorXUnits:{type:String,default:"fraction"},color:{type:String},crossOrigin:{type:String},img:{type:[HTMLImageElement,HTMLCanvasElement]},offset:{type:Array,default:()=>[0,0]},displacement:{type:Array,default:()=>[0,0]},offsetOrigin:{type:String,default:"top-left"},opacity:{type:Number,default:1},scale:{type:Number,default:1},rotateWithView:{type:Boolean,default:!1},rotation:{type:Number,default:0},size:{type:Array},imgSize:{type:Array},src:{type:String}}};function fit(r,e,t,n,i,a){return Er("",!0)}var NT=le(cit,[["render",fit]]);const pit={name:"ol-style-text",setup(r){const e=Ce("style",null),t=Ce("styledObj",null),{properties:n}=dr(r),i=s=>new Jh(xs(On({},s),{fill:new ra,stroke:new Fi}));let a=pr(()=>i(n));const o=()=>{e.value.setText(null),e.value.setText(a.value),t.value.changed()};ce(n,()=>{o()}),ce(e,()=>{o()}),ir(()=>{e.value.setText(a.value)}),Ar(()=>{e.value.setText(null)}),Gr("style",a),Gr("styledObj",t)},props:{font:{type:String},maxAngle:{type:Number,default:Math.PI/4},offsetX:{type:Number,default:0},offsetY:{type:Number,default:0},overflow:{type:Boolean,default:!1},placement:{type:String,default:"point"},scale:{type:Number},rotateWithView:{type:Boolean,default:!1},rotation:{type:Number,default:0},text:{type:String},textAlign:{type:String},textBaseline:{type:String,default:"middle"},padding:{type:Array,default:()=>[0,0,0,0]}}};function dit(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var UT=le(pit,[["render",dit]]),Zf=function(r,e){var t=r[0]-e[0],n=r[1]-e[1];return Math.sqrt(t*t+n*n)},cd=function(r,e){return r[0]==e[0]&&r[1]==e[1]},c6;(function(){function r(t,n){var i;for(let a=t.length-1;a>0;a--)(t[a][0]>n&&t[a-1][0]<n||t[a][0]<n&&t[a-1][0]>n)&&(i=[n,(n-t[a][0])/(t[a-1][0]-t[a][0])*(t[a-1][1]-t[a][1])+t[a][1]],t.splice(a,0,i))}function e(t,n){var i;for(let a=t.length-1;a>0;a--)(t[a][1]>n&&t[a-1][1]<n||t[a][1]<n&&t[a-1][1]>n)&&(i=[(n-t[a][1])/(t[a-1][1]-t[a][1])*(t[a-1][0]-t[a][0])+t[a][0],n],t.splice(a,0,i))}c6=function(t,n){var i=n.getType()==="Polygon";if(!i&&n.getType()!=="MultiPolygon")return null;var a=n.getCoordinates();return i&&(a=[a]),a.forEach(function(o){o.forEach(function(s){r(s,t[0]),r(s,t[2]),e(s,t[1]),e(s,t[3])})}),a.forEach(function(o){o.forEach(function(s){s.forEach(function(A){A[0]<t[0]?A[0]=t[0]:A[0]>t[2]&&(A[0]=t[2]),A[1]<t[1]?A[1]=t[1]:A[1]>t[3]&&(A[1]=t[3])})})}),i?new Cn(a[0]):new Ca(a)}})();var u1=function(r,e,t,n){var i=[];n!==!1&&i.push(r);var a=Zf(r,e);if(a){var o=Math.round(a/t);if(o>1)for(var s=(e[0]-r[0])/o,A=(e[1]-r[1])/o,l=1;l<o;l++)i.push([r[0]+s*l,r[1]+A*l])}return i.push(e),i};Dr.prototype.sampleAt=function(r){for(var e=this.getCoordinates(),t=[],n=1;n<e.length;n++)t=t.concat(u1(e[n-1],e[n],r,n===1));return new Dr(t)};Ea.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(n){for(var i=[],a=1;a<n.length;a++)i=i.concat(u1(n[a-1],n[a],r,a===1));t.push(i)}),new Ea(t)};Cn.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(n){for(var i=[],a=1;a<n.length;a++)i=i.concat(u1(n[a-1],n[a],r,a===1));t.push(i)}),new Cn(t)};Ca.prototype.sampleAt=function(r){var e=this.getCoordinates(),t=[];return e.forEach(function(n){var i=[];t.push(i),n.forEach(function(a){for(var o=[],s=1;s<a.length;s++)o=o.concat(u1(a[s-1],a[s],r,s===1));i.push(o)})}),new Ca(t)};yb.prototype.intersection=function(r,e){if(r.sampleAt){var t=Qa(this.getCenter().concat(this.getCenter()),this.getRadius());r=c6(t,r),r=r.simplify(e);var n=this.getCenter(),i=this.getRadius(),a=r.sampleAt(e).getCoordinates();switch(r.getType()){case"Polygon":a=[a];case"MultiPolygon":{var o=!1,s=[];return a.forEach(function(A){var l=[];s.push(l),A.forEach(function(u){var h=[];l.push(h),u.forEach(function(c){var f=Zf(n,c);f>i?(o=!0,h.push([n[0]+i/f*(c[0]-n[0]),n[1]+i/f*(c[1]-n[1])])):h.push(c)})})}),o?r.getType()==="Polygon"?new Cn(s[0]):new Ca(s):r}}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+r.getType());return r};Dr.prototype.splitAt=function(r,e){var t;if(!r)return[this];if(e||(e=1e-10),r.length&&r[0].length){var n=[this];for(t=0;t<r.length;t++){for(var i=[],a=0;a<n.length;a++){var o=n[a].splitAt(r[t],e);i=i.concat(o)}n=i}return n}if(cd(r,this.getFirstCoordinate())||cd(r,this.getLastCoordinate()))return[this];var s=this.getCoordinates(),A=[s[0]],l=[];for(t=0;t<s.length-1;t++)if(!cd(s[t],s[t+1])){if(cd(r,s[t+1]))A.push(s[t+1]),l.push(new Dr(A)),A=[];else if(!cd(r,s[t])){var u,h,c=!1;s[t][0]==s[t+1][0]?(u=(s[t][1]-r[1])/(s[t][1]-s[t+1][1]),c=s[t][0]==r[0]&&0<u&&u<=1):s[t][1]==s[t+1][1]?(u=(s[t][0]-r[0])/(s[t][0]-s[t+1][0]),c=s[t][1]==r[1]&&0<u&&u<=1):(u=(s[t][0]-r[0])/(s[t][0]-s[t+1][0]),h=(s[t][1]-r[1])/(s[t][1]-s[t+1][1]),c=Math.abs(u-h)<=e&&0<u&&u<=1),c&&(A.push(r),l.push(new Dr(A)),A=[r])}A.push(s[t+1])}return A.length>1&&l.push(new Dr(A)),l.length?l:[this]};var yi=function(r){r||(r={}),ta.call(this,{renderer:this._render.bind(this),stroke:r.stroke,text:r.text,zIndex:r.zIndex,geometry:r.geometry}),this._visible=r.visible!==!1,typeof r.width=="function"?this._widthFn=r.width:this.setWidth(r.width),this.setWidth2(r.width2),typeof r.color=="function"?this._colorFn=r.color:this.setColor(r.color),this.setColor2(r.color2),this.setLineCap(r.lineCap),this.setArrow(r.arrow),this.setArrowSize(r.arrowSize),this.setArrowColor(r.arrowColor),this._offset=[0,0],this.setOffset(r.offset0,0),this.setOffset(r.offset1,1),this._noOverlap=r.noOverlap};Cr(yi,ta);yi.prototype.setWidth=function(r){this._width=r||0};yi.prototype.setWidth2=function(r){this._width2=r};yi.prototype.getOffset=function(r){return this._offset[r]};yi.prototype.setOffset=function(r,e){switch(r=Math.max(0,parseFloat(r)),e){case 0:{this._offset[0]=r;break}case 1:{this._offset[1]=r;break}}};yi.prototype.setLineCap=function(r){this._lineCap=r==="round"?"round":"butt"};yi.prototype.getWidth=function(r,e){if(this._widthFn)return this._widthFn(r,e);var t=typeof this._width2=="number"?this._width2:this._width;return this._width+(t-this._width)*e};yi.prototype.setColor=function(r){try{this._color=_u(r)}catch{this._color=[0,0,0,1]}};yi.prototype.setColor2=function(r){try{this._color2=_u(r)}catch{this._color2=null}};yi.prototype.setArrowColor=function(r){try{this._acolor=KA(r)}catch{this._acolor=null}};yi.prototype.getColor=function(r,e){if(this._colorFn)return KA(this._colorFn(r,e));var t=this._color,n=this._color2||this._color;return"rgba("+ +Math.round(t[0]+(n[0]-t[0])*e)+","+Math.round(t[1]+(n[1]-t[1])*e)+","+Math.round(t[2]+(n[2]-t[2])*e)+","+(t[3]+(n[3]-t[3])*e)+")"};yi.prototype.getArrow=function(){return this._arrow};yi.prototype.setArrow=function(r){this._arrow=parseInt(r),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)};yi.prototype.getArrowSize=function(){return this._arrowSize||[16,16]};yi.prototype.setArrowSize=function(r){Array.isArray(r)?this._arrowSize=r:typeof r=="number"&&(this._arrowSize=[r,r])};yi.prototype.drawArrow=function(r,e,t,n,i){var a=this.getArrowSize()[0]*i,o=Zf(e,t),s=(e[0]-t[0])/o,A=(e[1]-t[1])/o;n=Math.max(this.getArrowSize()[1]/2,n/2)*i,r.beginPath(),r.moveTo(e[0],e[1]),r.lineTo(e[0]-a*s+n*A,e[1]-a*A-n*s),r.lineTo(e[0]-a*s-n*A,e[1]-a*A+n*s),r.lineTo(e[0],e[1]),r.fill()};yi.prototype._render=function(r,e){if(e.geometry.getType()==="LineString"){var t,n,i,a=e.context;if(!this._visible){var o=e.pixelRatio/e.resolution,s=Math.cos(e.rotation),A=Math.sin(e.rotation);n=e.geometry.getCoordinates();var l=r[0][0]-n[0][0]*o*s-n[0][1]*o*A,u=r[0][1]-n[0][0]*o*A+n[0][1]*o*s;for(r=[],t=0;i=n[t];t++)r[t]=[l+i[0]*o*s+i[1]*o*A,u+i[0]*o*A-i[1]*o*s,i[2]]}var h=this.getArrowSize()[0]*e.pixelRatio;a.save(),this.getOffset(0)&&this._splitAsize(r,this.getOffset(0)*e.pixelRatio),this.getOffset(1)&&this._splitAsize(r,this.getOffset(1)*e.pixelRatio,!0),r.length>1&&(this.getArrow()===-1||this.getArrow()===2)&&(i=this._splitAsize(r,h),this._acolor?a.fillStyle=this._acolor:a.fillStyle=this.getColor(e.feature,0),this.drawArrow(a,i[0],i[1],this.getWidth(e.feature,0),e.pixelRatio)),r.length>1&&this.getArrow()>0&&(i=this._splitAsize(r,h,!0),this._acolor?a.fillStyle=this._acolor:a.fillStyle=this.getColor(e.feature,1),this.drawArrow(a,i[0],i[1],this.getWidth(e.feature,1),e.pixelRatio));var c=this._splitInto(r,255,2),f=0,d=c.length;if(a.lineJoin="round",a.lineCap=this._lineCap||"butt",c.length>1)for(f=0;f<c.length;f++){var v=f/d;for(n=c[f],a.lineWidth=this.getWidth(e.feature,v)*e.pixelRatio,a.strokeStyle=this.getColor(e.feature,v),a.beginPath(),a.moveTo(n[0][0],n[0][1]),t=1;i=n[t];t++)a.lineTo(i[0],i[1]);a.stroke()}a.restore()}};yi.prototype._splitAsize=function(r,e,t){var n,i,a,o,s=0;for(t?a=r.pop():a=r.shift(),n=a;r.length;){if(t?i=r.pop():i=r.shift(),o=Zf(n,i),s+o>e){n=[n[0]+(i[0]-n[0])*(e-s)/o,n[1]+(i[1]-n[1])*(e-s)/o],o=Zf(n,a),t?(r.push(i),r.push(n),r.push([n[0]+(a[0]-n[0])/o,n[1]+(a[1]-n[1])/o])):(r.unshift(i),r.unshift(n),r.unshift([n[0]+(a[0]-n[0])/o,n[1]+(a[1]-n[1])/o]));break}s+=o,n=i}return[a,n]};yi.prototype._splitInto=function(r,e,t){var n,i,a=this._noOverlap?1:.9,o=[],s,A=0;for(n=1;i=r[n];n++)A+=Zf(r[n-1],i);var l=Math.max(t||2,A/(e||255)),u=r[0];A=0;var h=[u];for(n=1,i=r[1];n<r.length;){var c=i[0]-u[0],f=i[1]-u[1];if(s=Math.sqrt(c*c+f*f),A+s>l){var d=(l-A)/s;h.push([u[0]+c*d,u[1]+f*d]),o.push(h),u=[u[0]+c*d*a,u[1]+f*d*a],h=[u],A=0}else A+=s,u=i,h.push(u),n++,i=r[n]}return o.push(h),o};const vit={name:"ol-style-flowline",setup(r){const e=Ce("stylable",null),{properties:t}=dr(r);let n=pr(()=>new yi(t));const i=o=>{if(e instanceof Cb||e instanceof Bb){e.getOverlay().setStyle(o),e.value.dispatchEvent("styleChanged");return}try{e.value.setStyle(o),e.value.changed(),e.value.dispatchEvent("styleChanged")}catch{e.value.style_=o,e.value.values_.style=o,e.value.changed(),e.value.dispatchEvent("styleChanged")}},a=pr(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return ce(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),ir(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),Ar(()=>{i(null)}),{style:n}},props:{color:{type:[String,Function]},color2:{type:String},width:{type:[Number,Function]},width2:{type:Number},arrow:{type:Number},arrowColor:{type:String}}};function git(r,e,t,n,i,a){return Sn(),Ii("div",null,[wr(r.$slots,"default")])}var DT=le(vit,[["render",git]]);function jm(r){jm.installed||(jm.installed=!0,r.component(RT.name,RT),r.component(OT.name,OT),r.component(MT.name,MT),r.component(PT.name,PT),r.component(NT.name,NT),r.component(UT.name,UT),r.component(DT.name,DT))}var yit=Object.freeze(Object.defineProperty({__proto__:null,default:jm,install:jm,Style:RT,Stroke:MT,Fill:PT,Icon:NT,Text:UT,FlowLine:DT,Circle:OT},Symbol.toStringTag,{value:"Module"}));const mit={name:"ol-interaction-select",emits:["select"],setup(r,{emit:e}){const t=Ce("map"),{properties:n}=dr(r);let i=pr(()=>{let a=new Y_(xs(On({},n),{style:new ta}));return a.on("select",o=>{e("select",o)}),a});return ce(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),ir(()=>{t.addInteraction(i.value)}),Ar(()=>{t.removeInteraction(i.value)}),Gr("stylable",i),{select:i}},props:{multi:{type:Boolean,default:!1},condition:{type:Function},filter:{type:Function},features:{type:[ti,Object]},hitTolerance:{type:Number,default:0,validator:r=>r>=0}}};function _it(r,e,t,n,i,a){return wr(r.$slots,"default")}var QT=le(mit,[["render",_it]]),Pu=function(r){r=r||{},this.pointRadius=r.pointRadius||12,this.circleMaxObjects=r.circleMaxObjects||10,this.maxObjects=r.maxObjects||60,this.spiral=r.spiral!==!1,this.animate=r.animate,this.animationDuration=r.animationDuration||500,this.selectCluster_=r.selectCluster!==!1,this._autoClose=r.autoClose!==!1;var e=this.overlayLayer_=new sA({source:new hl({features:new ti,wrapX:r.wrapX,useSpatialIndex:!0}),name:"Cluster overlay",updateWhileAnimating:!0,updateWhileInteracting:!0,displayInLayerSwitcher:!1,style:r.featureStyle});if(r.layers)if(typeof r.layers=="function"){var t=r.layers;r.layers=function(i){return i===e||t(i)}}else r.layers.push&&r.layers.push(this.overlayLayer_);if(r.filter){var n=r.filter;r.filter=function(i,a){return!a&&i.get("selectclusterlink")?!1:n(i,a)}}else r.filter=function(i,a){return!(!a&&i.get("selectclusterlink"))};this.filter_=r.filter,!this._autoClose&&!r.toggleCondition&&(r.toggleCondition=$_),Y_.call(this,r),this.on("select",this.selectCluster.bind(this))};Cr(Pu,Y_);Pu.prototype.setMap=function(r){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&xo(this._listener),this._listener=null,Y_.prototype.setMap.call(this,r),this.overlayLayer_.setMap(r),r&&r.getView()&&(this._listener=r.getView().on("change:resolution",this.clear.bind(this)))};Pu.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()};Pu.prototype.getLayer=function(){return this.overlayLayer_};Pu.prototype.selectCluster=function(r){if(r instanceof nr&&(r={selected:[r]}),!r.selected.length){this._autoClose?this.clear():r.deselected.forEach(w=>{w.get("selectcluserfeatures").forEach(B=>{this.overlayLayer_.getSource().removeFeature(B)})});return}var e=r.selected[0];if(!e.get("selectclusterfeature")){var t=this.overlayLayer_.getSource();this._autoClose&&t.clear();var n=e.get("features");if(!(!n||n.length==1)){this.selectCluster_||this.getFeatures().clear();var i=e.getGeometry().getCoordinates(),a=this.getMap().getView().getResolution(),o,s,A,l,u,h,c,f=[];if(!this.spiral||n.length<=this.circleMaxObjects)for(l=Math.min(n.length,this.circleMaxObjects),o=a*this.pointRadius*(.5+l/4),A=0;A<l;A++)s=2*Math.PI*A/l,(l==2||l==4)&&(s+=Math.PI/4),u=[i[0]+o*Math.sin(s),i[1]+o*Math.cos(s)],h=new nr({selectclusterfeature:!0,features:[n[A]],geometry:new cr(u)}),h.setStyle(n[A].getStyle()),f.push(h),c=new nr({selectclusterlink:!0,geometry:new Dr([i,u])}),f.push(c);else{s=0;var d=2*this.pointRadius;for(l=Math.min(this.maxObjects,n.length),A=0;A<l;A++){o=d/2+d*s/(2*Math.PI),s=s+(d+.1)/o;var v=a*o*Math.sin(s),y=a*o*Math.cos(s);u=[i[0]+v,i[1]+y],h=new nr({selectclusterfeature:!0,features:[n[A]],geometry:new cr(u)}),h.setStyle(n[A].getStyle()),f.push(h),c=new nr({selectclusterlink:!0,geometry:new Dr([i,u])}),f.push(c)}}e.set("selectcluserfeatures",f),this.animate?this.animateCluster_(i,f):t.addFeatures(f)}}};Pu.prototype.animateCluster_=function(r,e){if(this.listenerKey_&&xo(this.listenerKey_),!e.length)return;var t=this.overlayLayer_.getStyle(),n=typeof t=="function"?t:t.length?function(){return t}:function(){return[t]},i=this.animationDuration||500,a=new Date().getTime();function o(A){for(var l=A.vectorContext||a1(A),u=A.frameState.pixelRatio,h=this.getMap().getView().getResolution(),c=Yo((A.frameState.time-a)/i),f=0,d;d=e[f];f++)if(d.get("features")){var v=d.getGeometry().getCoordinates();v[0]=r[0]+c*(v[0]-r[0]),v[1]=r[1]+c*(v[1]-r[1]);for(var y=new cr(v),m=n(d,h),w=0;w<m.length;w++){var C,B=z_.prototype.getFeaturesAtPixel?!1:m[w].getImage();B&&(C=B.getScale(),B.setScale(u)),l.setStyle?(l.setStyle(m[w]),l.drawGeometry(y)):(l.setImageStyle(B),l.drawPointGeometry(y)),B&&B.setScale(C)}}if(c>1){xo(this.listenerKey_),this.overlayLayer_.getSource().addFeatures(e),this.overlayLayer_.changed();return}A.frameState.animate=!0}this.listenerKey_=this.overlayLayer_.on(["postcompose","postrender"],o.bind(this));var s=new nr(new cr(this.getMap().getView().getCenter()));s.setStyle(new ta({image:new ng({})})),this.overlayLayer_.getSource().addFeature(s)};Pu.prototype.getClusterExtent=function(r){if(!r.get("features"))return null;var e=di();return r.get("features").forEach(function(t){e=mu(e,t.getGeometry().getExtent())}),e[0]===e[2]&&e[1]===e[3]?null:e};const wit={name:"ol-interaction-clusterselect",emits:["select"],setup(r,{emit:e}){const t=Ce("map"),{properties:n}=dr(r);let i=pr(()=>{let a=new Pu(xs(On({},n),{style:new ta}));return a.on("select",o=>{e("select",o)}),a});ce(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),ir(()=>{t.addInteraction(i.value)}),Ar(()=>{t.removeInteraction(i.value)}),Gr("stylable",i)},props:{multi:{type:Boolean,default:!1},condition:{type:Function},filter:{type:Function},pointRadius:{type:Number,default:7},animate:{type:Boolean,default:!0},featureStyle:{type:Function},style:{type:Function}}};function Eit(r,e,t,n,i,a){return wr(r.$slots,"default")}var HT=le(wit,[["render",Eit]]);const Cit={name:"ol-interaction-draw",emits:["drawstart","drawend"],setup(r,{emit:e}){const t=Ce("map"),n=Ce("vectorSource"),{type:i,clickTolerance:a,dragVertexDelay:o,snapTolerance:s,stopClick:A,maxPoints:l,minPoints:u,finishCondition:h,geometryFunction:c,geometryName:f,condition:d,freehand:v,freehandCondition:y,wrapX:m}=Ph(r);let w=()=>{let B=new Cb({source:n.value,type:i.value,clickTolerance:a.value,dragVertexDelay:o.value,snapTolerance:s.value,stopClick:A.value,maxPoints:l.value,minPoints:u.value,finishCondition:h.value,geometryFunction:c.value,geometryName:f.value,condition:d.value,freehand:v.value,freehandCondition:y.value,wrapX:m.value});return B.on("drawstart",R=>{e("drawstart",R)}),B.on("drawend",R=>{e("drawend",R)}),B},C=w();ce([i,a,o,s,A,l,u,h,c,f,d,v,y,m],()=>{t.removeInteraction(C),C=w(),t.addInteraction(C),C.changed(),t.changed()}),ir(()=>{t.addInteraction(C)}),Ar(()=>{t.removeInteraction(C)}),Gr("stylable",C)},props:{type:{type:String,required:!0},clickTolerance:{type:Number,default:6},dragVertexDelay:{type:Number,default:500},snapTolerance:{type:Number,default:12},stopClick:{type:Boolean,default:!1},maxPoints:{type:Number},minPoints:{type:Number},finishCondition:{type:Function},geometryFunction:{type:Function},geometryName:{type:String},condition:{type:Function},freehand:{type:Boolean,default:!1},freehandCondition:{type:Function},wrapX:{type:Boolean,default:!1}}};function Bit(r,e,t,n,i,a){return wr(r.$slots,"default")}var GT=le(Cit,[["render",Bit]]);const Tit={name:"ol-interaction-snap",setup(r){const e=Ce("map"),t=Ce("vectorSource"),{properties:n}=dr(r);let i=()=>new Pz(xs(On({},n),{source:t.value})),a=i();ce(n,()=>{e.removeInteraction(a),a=i(),e.addInteraction(a),e.changed()}),ir(()=>{e.addInteraction(a)}),Ar(()=>{e.removeInteraction(a)})},props:{vertex:{type:Boolean,default:!0},edge:{type:Boolean,default:!0},pixelTolerance:{type:Number,default:10}}};function xit(r,e,t,n,i,a){return wr(r.$slots,"default")}var kT=le(Tit,[["render",xit]]);const Sit={name:"ol-interaction-modify",emits:["modifystart","modifyend"],setup(r,{emit:e}){const t=Ce("map"),n=Ce("vectorSource"),{features:i,condition:a,deleteCondition:o,insertVertexCondition:s,pixelTolerance:A,wrapX:l,hitDetection:u}=Ph(r);let h=()=>{let f=new Bb({source:n.value,features:i.value,condition:a.value,deleteCondition:o.value,insertVertexCondition:s.value,pixelTolerance:A.value,wrapX:l.value,hitDetection:u.value});return f.on("modifystart",d=>{e("modifystart",d)}),f.on("modifyend",d=>{e("modifyend",d)}),f},c=h();ce([a,o,s,A,l,u],()=>{t.removeInteraction(c),c=h(),t.addInteraction(c),c.changed(),t.changed()}),ir(()=>{t.addInteraction(c)}),Ar(()=>{t.removeInteraction(c)}),Gr("stylable",c)},props:{condition:{type:Function},deleteCondition:{type:Function},insertVertexCondition:{type:Function},pixelTolerance:{type:Number,default:10},wrapX:{type:Boolean,default:!1},hitDetection:{type:Boolean},features:{type:[ti,Object]}}};function bit(r,e,t,n,i,a){return wr(r.$slots,"default")}var $T=le(Sit,[["render",bit]]),Hn=function(r){r||(r={});var e=this;this.selection_=new ti,this.handles_=new ti,this.overlayLayer_=new sA({source:new hl({features:this.handles_,useSpatialIndex:!1,wrapX:!1}),name:"Transform overlay",displayInLayerSwitcher:!1,style:function(t){return e.style[(t.get("handle")||"default")+(t.get("constraint")||"")+(t.get("option")||"")]}}),So.call(this,{handleDownEvent:this.handleDownEvent_,handleDragEvent:this.handleDragEvent_,handleMoveEvent:this.handleMoveEvent_,handleUpEvent:this.handleUpEvent_}),this.features_=r.features,typeof r.filter=="function"&&(this._filter=r.filter),this.layers_=r.layers?r.layers instanceof Array?r.layers:[r.layers]:null,this._handleEvent=r.condition||function(){return!0},this.addFn_=r.addCondition||function(){return!1},this.set("translateFeature",r.translateFeature!==!1),this.set("translate",r.translate!==!1),this.set("translateBBox",r.translateBBox===!0),this.set("stretch",r.stretch!==!1),this.set("scale",r.scale!==!1),this.set("rotate",r.rotate!==!1),this.set("keepAspectRatio",r.keepAspectRatio||function(t){return t.originalEvent.shiftKey}),this.set("modifyCenter",r.modifyCenter||function(t){return t.originalEvent.metaKey||t.originalEvent.ctrlKey}),this.set("noFlip",r.noFlip||!1),this.set("selection",r.selection!==!1),this.set("hitTolerance",r.hitTolerance||0),this.set("enableRotatedTransform",r.enableRotatedTransform||!1),this.set("keepRectangle",r.keepRectangle||!1),this.on("propertychange",function(){this.drawSketch_()}),this.setDefaultStyle()};Cr(Hn,So);Hn.prototype.Cursors={default:"auto",select:"pointer",translate:"move",rotate:"move",rotate0:"move",scale:"nesw-resize",scale1:"nwse-resize",scale2:"nesw-resize",scale3:"nwse-resize",scalev:"ew-resize",scaleh1:"ns-resize",scalev2:"ew-resize",scaleh3:"ns-resize"};Hn.prototype.setMap=function(r){var e=this.getMap();if(e){var t=e.getTargetElement();e.removeLayer(this.overlayLayer_),this.previousCursor_&&t&&(t.style.cursor=this.previousCursor_),this.previousCursor_=void 0}So.prototype.setMap.call(this,r),this.overlayLayer_.setMap(r),r===null&&this.select(null),r!==null&&(this.isTouch=/touch/.test(r.getViewport().className),this.setDefaultStyle())};Hn.prototype.setActive=function(r){this.select(null),this.overlayLayer_.setVisible(r),So.prototype.setActive.call(this,r)};Hn.prototype.setDefaultStyle=function(r){r=r||{};var e=r.pointStroke||new Fi({color:[255,0,0,1],width:1}),t=r.stroke||new Fi({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=r.fill||new ra({color:[255,0,0,.01]}),i=r.pointFill||new ra({color:[255,255,255,.8]}),a=new I0({fill:i,stroke:e,radius:this.isTouch?12:6,displacement:this.isTouch?[24,-24]:[12,-12],points:15});a.setDisplacement||(a.getAnchor()[0]=this.isTouch?-10:-5);var o=new I0({fill:i,stroke:e,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),s=new I0({fill:i,stroke:e,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function A(l,u,h){return[new ta({image:l,stroke:u,fill:h})]}this.style={default:A(o,t,n),translate:A(o,e,i),rotate:A(a,e,i),rotate0:A(o,e,i),scale:A(o,e,i),scale1:A(o,e,i),scale2:A(o,e,i),scale3:A(o,e,i),scalev:A(s,e,i),scaleh1:A(s,e,i),scalev2:A(s,e,i),scaleh3:A(s,e,i)},this.drawSketch_()};Hn.prototype.setStyle=function(r,e){if(e){e instanceof Array?this.style[r]=e:this.style[r]=[e];for(var t=0;t<this.style[r].length;t++){var n=this.style[r][t].getImage();n&&(r=="rotate"&&(n.getAnchor()[0]=-5),this.isTouch&&n.setScale(1.8));var i=this.style[r][t].getText();i&&(r=="rotate"&&i.setOffsetX(this.isTouch?14:7),this.isTouch&&i.setScale(1.8))}this.drawSketch_()}};Hn.prototype.getFeatureAtPixel_=function(r){var e=this;return this.getMap().forEachFeatureAtPixel(r,function(t,n){var i=!1;if(!n){if(t===e.bbox_)return e.get("translateBBox")?{feature:t,handle:"translate",constraint:"",option:""}:!1;if(e.handles_.forEach(function(o){o===t&&(i=!0)}),i)return{feature:t,handle:t.get("handle"),constraint:t.get("constraint"),option:t.get("option")}}if(!e.get("selection"))return e.selection_.getArray().some(function(o){return t===o})?{feature:t}:null;if(e._filter)return e._filter(t,n)?{feature:t}:null;if(e.layers_){for(var a=0;a<e.layers_.length;a++)if(e.layers_[a]===n)return{feature:t};return null}else return e.features_?(e.features_.forEach(function(o){o===t&&(i=!0)}),i?{feature:t}:null):{feature:t}},{hitTolerance:this.get("hitTolerance")})||{}};Hn.prototype.getGeometryRotateToZero_=function(r,e){var t=r.getGeometry(),n=this.getMap().getView().getRotation();if(n===0||!this.get("enableRotatedTransform"))return e?t.clone():t;var i=t.clone();return i.rotate(n*-1,this.getMap().getView().getCenter()),i};Hn.prototype._isRectangle=function(r){if(this.get("keepRectangle")&&r.getType()==="Polygon"){var e=r.getCoordinates()[0];return e.length===5}return!1};Hn.prototype.drawSketch_=function(r){var e,t,n,i=this.selection_.item(0)&&this._isRectangle(this.selection_.item(0).getGeometry());if(this.overlayLayer_.getSource().clear(),!!this.selection_.getLength()){var a=this.getMap().getView().getRotation(),o=this.getGeometryRotateToZero_(this.selection_.item(0)).getExtent(),s;if(i&&(s=this.getGeometryRotateToZero_(this.selection_.item(0)).getCoordinates()[0].slice(0,4),s.unshift(s[3])),o=Qa(o,0),this.selection_.forEach(function(h){var c=this.getGeometryRotateToZero_(h).getExtent();mu(o,c)}.bind(this)),r===!0)this.ispt_||(this.overlayLayer_.getSource().addFeature(new nr({geometry:new cr(this.center_),handle:"rotate0"})),n=Eu(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new nr(n),this.overlayLayer_.getSource().addFeature(t));else{if(this.ispt_){var A=this.getMap().getPixelFromCoordinate([o[0],o[1]]);A&&(o=ki([this.getMap().getCoordinateFromPixel([A[0]-10,A[1]-10]),this.getMap().getCoordinateFromPixel([A[0]+10,A[1]+10])]))}n=i?new Cn([s]):Eu(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new nr(n);var l=[],u=n.getCoordinates()[0];if(!this.ispt_){if(l.push(t),!this.iscircle_&&this.get("stretch")&&this.get("scale"))for(e=0;e<u.length-1;e++)t=new nr({geometry:new cr([(u[e][0]+u[e+1][0])/2,(u[e][1]+u[e+1][1])/2]),handle:"scale",constraint:e%2?"h":"v",option:e}),l.push(t);if(this.get("scale"))for(e=0;e<u.length-1;e++)t=new nr({geometry:new cr(u[e]),handle:"scale",option:e}),l.push(t);this.get("translate")&&!this.get("translateFeature")&&(t=new nr({geometry:new cr([(u[0][0]+u[2][0])/2,(u[0][1]+u[2][1])/2]),handle:"translate"}),l.push(t))}!this.iscircle_&&this.get("rotate")&&(t=new nr({geometry:new cr(u[3]),handle:"rotate"}),l.push(t)),this.overlayLayer_.getSource().addFeatures(l)}}};Hn.prototype.select=function(r,e){if(!r){this.selection_.clear(),this.drawSketch_();return}if(!(!r.getGeometry||!r.getGeometry())){if(e)this.selection_.push(r);else{var t=this.selection_.getArray().indexOf(r);this.selection_.removeAt(t)}this.ispt_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Point":!1,this.iscircle_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Circle":!1,this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:r,features:this.selection_})}};Hn.prototype.setSelection=function(r){this.selection_.clear(),r.forEach(function(e){this.selection_.push(e)}.bind(this)),this.ispt_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Point":!1,this.iscircle_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Circle":!1,this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",features:this.selection_})};Hn.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach(function(r){xo(r)}),this._featureListeners=[],this.selection_.forEach(function(r){this._featureListeners.push(r.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))};Hn.prototype.handleDownEvent_=function(r){if(this._handleEvent(r,this.selection_)){var e=this.getFeatureAtPixel_(r.pixel),t=e.feature;if(this.selection_.getLength()&&this.selection_.getArray().indexOf(t)>=0&&(this.ispt_&&this.get("translate")||this.get("translateFeature"))&&(e.handle="translate"),e.handle){this.mode_=e.handle,this.opt_=e.option,this.constraint_=e.constraint;var n=this.getMap().getView().getRotation();this.coordinate_=r.coordinate,this.pixel_=r.pixel,this.geoms_=[],this.rotatedGeoms_=[];for(var i=di(),a=di(),o=0,s;s=this.selection_.item(o);o++)if(this.geoms_.push(s.getGeometry().clone()),i=mu(i,s.getGeometry().getExtent()),this.get("enableRotatedTransform")&&n!==0){var A=this.getGeometryRotateToZero_(s,!0);this.rotatedGeoms_.push(A),a=mu(a,A.getExtent())}if(this.extent_=Eu(i).getCoordinates()[0],this.get("enableRotatedTransform")&&n!==0&&(this.rotatedExtent_=Eu(a).getCoordinates()[0]),this.mode_==="rotate"){this.center_=this.getCenter()||wa(i);var l=r.map.getTargetElement();l.style.cursor=this.Cursors.rotate0,this.previousCursor_=l.style.cursor}else this.center_=wa(i);return this.angle_=Math.atan2(this.center_[1]-r.coordinate[1],this.center_[0]-r.coordinate[0]),this.dispatchEvent({type:this.mode_+"start",feature:this.selection_.item(0),features:this.selection_,pixel:r.pixel,coordinate:r.coordinate}),!0}else if(this.get("selection")){if(t){this.addFn_(r)||this.selection_.clear();var u=this.selection_.getArray().indexOf(t);u<0?this.selection_.push(t):this.selection_.removeAt(u)}else this.selection_.clear();return this.ispt_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Point":!1,this.iscircle_=this.selection_.getLength()===1?this.selection_.item(0).getGeometry().getType()=="Circle":!1,this.drawSketch_(),this.watchFeatures_(),this.dispatchEvent({type:"select",feature:t,features:this.selection_,pixel:r.pixel,coordinate:r.coordinate}),!1}}};Hn.prototype.getFeatures=function(){return this.selection_};Hn.prototype.getCenter=function(){return this.get("center")};Hn.prototype.setCenter=function(r){return this.set("center",r)};function RA(r,e){var t=(r[0]*e[0]+r[1]*e[1])/(e[0]*e[0]+e[1]*e[1]);return[e[0]*t,e[1]*t]}function za(r,e){return[e[0]-r[0],e[1]-r[1]]}function Sa(r,e){return[r[0]+e[0],r[1]+e[1]]}Hn.prototype.handleDragEvent_=function(r){if(this._handleEvent(r,this.features_)){var e=this.getMap().getView().getRotation(),t,n,i,a,o=[this.coordinate_[0],this.coordinate_[1]],s=[r.coordinate[0],r.coordinate[1]];switch(this.isUpdating_=!0,this.mode_){case"rotate":{var A=Math.atan2(this.center_[1]-s[1],this.center_[0]-s[0]);if(!this.ispt)for(t=0,i;i=this.selection_.item(t);t++)a=this.geoms_[t].clone(),a.rotate(A-this.angle_,this.center_),a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),i.setGeometry(a);this.drawSketch_(!0),this.dispatchEvent({type:"rotating",feature:this.selection_.item(0),features:this.selection_,angle:A-this.angle_,pixel:r.pixel,coordinate:r.coordinate});break}case"translate":{var l=s[0]-o[0],u=s[1]-o[1];for(t=0,i;i=this.selection_.item(t);t++)i.getGeometry().translate(l,u);this.handles_.forEach(function(T){T.getGeometry().translate(l,u)}),this.coordinate_=r.coordinate,this.dispatchEvent({type:"translating",feature:this.selection_.item(0),features:this.selection_,delta:[l,u],pixel:r.pixel,coordinate:r.coordinate});break}case"scale":{var h=this.center_;if(this.get("modifyCenter")(r)){var c=this.extent_;this.get("enableRotatedTransform")&&e!==0&&(c=this.rotatedExtent_),h=c[(Number(this.opt_)+2)%4]}var f=this.geoms_.length==1&&this._isRectangle(this.geoms_[0]),d=this.constraint_,v=this.opt_,y=this.coordinate_,m=r.coordinate;if(this.get("enableRotatedTransform")&&e!==0){var w=new cr(this.coordinate_);w.rotate(e*-1,h),y=w.getCoordinates();var C=new cr(r.coordinate);C.rotate(e*-1,h),m=C.getCoordinates()}var B=(m[0]-h[0])/(y[0]-h[0]),R=(m[1]-h[1])/(y[1]-h[1]),O=[m[0]-y[0],m[1]-y[1]];if(this.get("enableRotatedTransform")&&e!==0){var I=new cr(h);I.rotate(e*-1,this.getMap().getView().getCenter()),h=I.getCoordinates()}for(this.get("noFlip")&&(B<0&&(B=-B),R<0&&(R=-R)),this.constraint_?this.constraint_=="h"?B=1:R=1:this.get("keepAspectRatio")(r)&&(B=R=Math.min(B,R)),t=0,i;i=this.selection_.item(t);t++)a=e===0||!this.get("enableRotatedTransform")?this.geoms_[t].clone():this.rotatedGeoms_[t].clone(),a.applyTransform(function(T,L,P){if(P<2)return L;if(f){var S=[[6],[0,8],[2],[4]],x=[T[0],T[1]],M=[T[2],T[3]],D=[T[4],T[5]],W=[T[6],T[7]],z=[T[8],T[9]];if(d){var tt=v%2===0?za(x,M):za(W,x),q=RA(O,tt),rt=v+1<S.length?v+1:0,nt=[...S[v],...S[rt]];for(n=0;n<T.length;n+=P)L[n]=nt.includes(n)?T[n]+q[0]:T[n],L[n+1]=nt.includes(n)?T[n+1]+q[1]:T[n+1]}else{var _t,F;switch(v){case 0:O=za(W,m),_t=RA(O,za(D,W)),F=RA(O,za(x,W)),[L[0],L[1]]=Sa(x,_t),[L[4],L[5]]=Sa(D,F),[L[6],L[7]]=Sa(W,O),[L[8],L[9]]=Sa(z,_t);break;case 1:O=za(x,m),_t=RA(O,za(W,x)),F=RA(O,za(M,x)),[L[0],L[1]]=Sa(x,O),[L[2],L[3]]=Sa(M,_t),[L[6],L[7]]=Sa(W,F),[L[8],L[9]]=Sa(z,O);break;case 2:O=za(M,m),_t=RA(O,za(x,M)),F=RA(O,za(D,M)),[L[0],L[1]]=Sa(x,F),[L[2],L[3]]=Sa(M,O),[L[4],L[5]]=Sa(D,_t),[L[8],L[9]]=Sa(z,F);break;case 3:O=za(D,m),_t=RA(O,za(M,D)),F=RA(O,za(W,D)),[L[2],L[3]]=Sa(M,F),[L[4],L[5]]=Sa(D,O),[L[6],L[7]]=Sa(W,_t);break}}}else for(n=0;n<T.length;n+=P)B!=1&&(L[n]=h[0]+(T[n]-h[0])*B),R!=1&&(L[n+1]=h[1]+(T[n+1]-h[1])*R);return a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),L}),this.get("enableRotatedTransform")&&e!==0&&a.rotate(e,this.getMap().getView().getCenter()),i.setGeometry(a);this.drawSketch_(),this.dispatchEvent({type:"scaling",feature:this.selection_.item(0),features:this.selection_,scale:[B,R],pixel:r.pixel,coordinate:r.coordinate});break}}this.isUpdating_=!1}};Hn.prototype.handleMoveEvent_=function(r){if(this._handleEvent(r,this.features_)&&!this.mode_){var e=this.getFeatureAtPixel_(r.pixel),t=r.map.getTargetElement();if(e.feature){var n=e.handle?this.Cursors[(e.handle||"default")+(e.constraint||"")+(e.option||"")]:this.Cursors.select;this.previousCursor_===void 0&&(this.previousCursor_=t.style.cursor),t.style.cursor=n}else this.previousCursor_!==void 0&&(t.style.cursor=this.previousCursor_),this.previousCursor_=void 0}};Hn.prototype.handleUpEvent_=function(r){if(this.mode_==="rotate"){var e=r.map.getTargetElement();e.style.cursor=this.Cursors.default,this.previousCursor_=void 0}return this.dispatchEvent({type:this.mode_+"end",feature:this.selection_.item(0),features:this.selection_,oldgeom:this.geoms_[0],oldgeoms:this.geoms_}),this.drawSketch_(),this.mode_=null,!1};Hn.prototype.getFeatures=function(){return this.selection_};const Lit={name:"ol-interaction-transform",setup(r){const e=Ce("map"),{properties:t}=dr(r);let n=pr(()=>new Hn(On({},t)));ce(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),ir(()=>{e.addInteraction(n.value)}),Ar(()=>{e.removeInteraction(n.value)}),Gr("stylable",n)},props:{enableRotatedTransform:{type:Boolean,default:!1},condition:{type:Function},addCondition:{type:Function},filter:{type:Function},layers:{type:Array},hitTolerance:{type:Number,default:2},translateFeature:{type:Boolean,default:!0},scale:{type:Boolean,default:!0},rotate:{type:Boolean,default:!0},keepAspectRatio:{type:Boolean,default:!1},translate:{type:Boolean,default:!0},stretch:{type:Boolean,default:!0}}};function Fit(r,e,t,n,i,a){return wr(r.$slots,"default")}var VT=le(Lit,[["render",Fit]]);const Iit={name:"ol-interaction-dragrotatezoom",setup(r){const e=Ce("map"),{properties:t}=dr(r);let n=pr(()=>new RK(On({},t)));ce(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),ir(()=>{e.addInteraction(n.value)}),Ar(()=>{e.removeInteraction(n.value)})},props:{condition:{type:Function},duration:{type:Number,default:400}}};function Rit(r,e,t,n,i,a){return wr(r.$slots,"default")}var jT=le(Iit,[["render",Rit]]);function Km(r){Km.installed||(Km.installed=!0,r.component(QT.name,QT),r.component(HT.name,HT),r.component(GT.name,GT),r.component(kT.name,kT),r.component($T.name,$T),r.component(VT.name,VT),r.component(jT.name,jT))}var Oit=Object.freeze(Object.defineProperty({__proto__:null,default:Km,install:Km,SelectInteraction:QT,ClusterSelectInteraction:HT,DrawInteraction:GT,SnapInteraction:kT,ModifyInteraction:$T,TransformInteraction:VT,DragRotateAndZoomInteraction:jT},Symbol.toStringTag,{value:"Module"}));const Mit={setup(){const r=Ce("map"),e=Ce("vectorLayer");return{map:r,vectorLayer:e}},props:{duration:{type:Number,default:1e3},revers:{type:Boolean,default:!1},repeat:{type:Number,default:0},fade:{type:Function},easing:{type:Function,default:Yo}}};function Pit(r,e,t,n,i,a){return wr(r.$slots,"default")}var Bs=le(Mit,[["render",Pit]]),Mi=function(r){r=r||{},this.duration_=typeof r.duration=="number"?r.duration>=0?r.duration:0:1e3,this.fade_=typeof r.fade=="function"?r.fade:null,this.repeat_=Number(r.repeat);var e=typeof r.easing=="function"?r.easing:rb;r.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=r.hiddenStyle,ni.call(this)};Cr(Mi,ni);Mi.hiddenStyle=new ta({image:new ng({}),stroke:new Fi({color:"transparent"})});Mi.prototype.drawGeom_=function(r,e,t){this.fade_&&(r.context.globalAlpha=this.fade_(1-r.elapsed));for(var n=r.style,i=0;i<n.length;i++)try{var a=r.vectorContext||a1(r),o=UB(r,n[i]);a.setStyle(o),o.getZIndex()<0?a.drawGeometry(t||e):a.drawGeometry(e)}catch{}};Mi.prototype.animate=function(){return!1};z_.prototype.animateFeature=function(r,e){var t=this._featureAnimationLayer;t||(t=this._featureAnimationLayer=new sA({source:new hl}),t.setMap(this)),t.getSource().addFeature(r);var n=e.on("animationend",function(i){i.feature===r&&(t.getSource().removeFeature(r),xo(n))});t.animateFeature(r,e)};jS.prototype.animateFeature=function(r,e,t){var n=this,i,a=r.getStyle(),o=a||(this.getStyleFunction?this.getStyleFunction()(r):null);o||(o=[]),o instanceof Array||(o=[o]);var s={vectorContext:null,frameState:null,start:0,time:0,elapsed:0,extent:!1,feature:r,geom:r.getGeometry(),typeGeom:r.getGeometry().getType(),bbox:r.getGeometry().getExtent(),coord:wa(r.getGeometry().getExtent()),style:o};e instanceof Array||(e=[e]);for(var A=e.length-1;A>=0;A--)e[A].duration_===0&&e.splice(A,1);var l=0,u=0,h=t&&this.getFilters?this.getFilters():[];function c(v){s.type=v.type;try{s.vectorContext=v.vectorContext||a1(v)}catch{}if(s.frameState=v.frameState,s.inversePixelTransform=v.inversePixelTransform,s.extent||(s.extent=v.frameState.extent,s.start=v.frameState.time,s.context=v.context),s.time=v.frameState.time-s.start,s.elapsed=s.time/e[u].duration_,s.elapsed>1&&(s.elapsed=1),v.context.save(),h.forEach(function(m){m.get("active")&&m.precompose(v)}),this.getOpacity&&(v.context.globalAlpha=this.getOpacity()),!e[u].animate(s))l++,l<e[u].repeat_?s.extent=!1:u<e.length-1?(e[u].dispatchEvent({type:"animationend",feature:r}),u++,l=0,s.extent=!1):f();else{var y={type:"animating",step:u,start:s.start,time:s.time,elapsed:s.elapsed,rotation:s.rotation||0,geom:s.geom,coordinate:s.coord,feature:r};e[u].dispatchEvent(y),n.dispatchEvent(y)}h.forEach(function(m){m.get("active")&&m.postcompose(v)}),v.context.restore(),v.frameState.animate=!0}function f(v){xo(i),i=null,r.setStyle(a);var y={type:"animationend",feature:r};if(v)for(var m in v)v.hasOwnProperty(m)&&(y[m]=v[m]);e[u].dispatchEvent(y),n.dispatchEvent(y)}function d(v){if(e.length&&!i){if(i=n.on(["postcompose","postrender"],c.bind(n)),n.renderSync)try{n.renderSync()}catch{}else n.changed();r.setStyle(e[u].hiddenStyle||Mi.hiddenStyle);var y={type:"animationstart",feature:r};if(v)for(var m in v)v.hasOwnProperty(m)&&(y[m]=v[m]);e[u].dispatchEvent(y),n.dispatchEvent(y)}}return d(),{start:d,stop:f,isPlaying:function(){return!!i}}};var kb=function(r){r=r||{},this.speed_=r.speed||0,Mi.call(this,r),this.side_=r.side||"top"};Cr(kb,Mi);kb.prototype.animate=function(r){if(!r.time){var e=r.frameState.viewState.rotation,t=r.frameState.size[1]*r.frameState.viewState.resolution;this.side_!="top"&&(t*=-1),this.dx=-Math.sin(e)*t,this.dy=Math.cos(e)*t,this.speed_&&(this.duration_=t/this.speed_/r.frameState.viewState.resolution)}var n=r.geom.clone();return n.translate(this.dx*(1-this.easing_(r.elapsed)),this.dy*(1-this.easing_(r.elapsed))),this.drawGeom_(r,n,r.geom),r.time<=this.duration_};function oc(r,e){const{map:t,vectorLayer:n}=Bs.setup(),{properties:i}=dr(e),a=pr(()=>new r(On({},i)));return Gr("animation",a),{map:t,vectorLayer:n,animation:a,properties:i}}const Nit={name:"ol-animation-drop",extends:Bs,setup(r){const{map:e,vectorLayer:t,properties:n}=oc(kb,r);return{map:e,vectorLayer:t,properties:n}},props:{side:{type:Number,default:0},speed:{type:Number,default:0}}};function Uit(r,e,t,n,i,a){return wr(r.$slots,"default")}var KT=le(Nit,[["render",Uit]]),$b=function(r){r=r||{},Mi.call(this,r),this.amplitude_=r.amplitude||40,this.bounce_=-Math.PI*(r.bounce||6),this.horizontal_=r.horizontal};Cr($b,Mi);$b.prototype.animate=function(r){var e=r.geom.clone(),t=r.geom.clone(),n=this.easing_(r.elapsed);return n=Math.sin(this.bounce_*n)*this.amplitude_*(1-n)*r.frameState.viewState.resolution,this.horizontal_?(e.translate(n,0),t.translate(n,0)):e.translate(0,n),this.drawGeom_(r,e,t),r.time<=this.duration_};const Dit={name:"ol-animation-shake",extends:Bs,setup(r){const{map:e,vectorLayer:t,properties:n,animation:i}=oc($b,r);return{map:e,vectorLayer:t,properties:n,animation:i}},props:{bounce:{type:Number,default:6},amplitude:{type:Number,default:40},horizontal:{type:Boolean,default:!1}}};function Qit(r,e,t,n,i,a){return wr(r.$slots,"default")}var YT=le(Dit,[["render",Qit]]),cg=function(r){r=r||{},Mi.call(this,r),this.set("zoomout",r.zoomOut)};Cr(cg,Mi);var Hit=function(r){r=r||{},r.zoomOut=!0,cg.call(this,r)};Cr(Hit,cg);cg.prototype.animate=function(r){var e=this.easing_(r.elapsed);if(e){this.get("zoomout")&&(e=1/e);var t=r.style,n,i,a=[];for(n=0;n<t.length;n++)i=t[n].getImage(),i&&(a[n]=i.getScale(),r.type==="postrender"?i.setScale(a[n]*e/r.frameState.pixelRatio):i.setScale(a[n]*e));for(this.drawGeom_(r,r.geom),n=0;n<t.length;n++)i=t[n].getImage(),i&&i.setScale(a[n])}return r.time<=this.duration_};const Git={name:"ol-animation-zoom",extends:Bs,setup(r){const{map:e,vectorLayer:t,properties:n}=oc(cg,r);return{map:e,vectorLayer:t,properties:n}},props:{zoomOut:{type:Boolean,default:!1}}};function kit(r,e,t,n,i,a){return wr(r.$slots,"default")}var zT=le(Git,[["render",kit]]),Vb=function(r){Mi.call(this,r)};Cr(Vb,Mi);Vb.prototype.animate=function(r){var e=this.easing_(r.elapsed);if(e){r.context.save();var t=r.frameState.pixelRatio;r.context.globalAlpha=e,r.context.scale(e,1/e);var n=r.frameState.coordinateToPixelTransform,i=(1/e-1)*t*(n[0]*r.coord[0]+n[1]*r.coord[1]+n[4]),a=(e-1)*t*(n[2]*r.coord[0]+n[3]*r.coord[1]+n[5]);r.context.translate(i,a),this.drawGeom_(r,r.geom),r.context.restore()}return r.time<=this.duration_};const $it={name:"ol-animation-teleport",extends:Bs,setup(r){const{map:e,vectorLayer:t,properties:n}=oc(Vb,r);return{map:e,vectorLayer:t,properties:n}},props:{}};function Vit(r,e,t,n,i,a){return wr(r.$slots,"default")}var XT=le($it,[["render",Vit]]),jb=function(r){r=r||{},this.speed_=r.speed||0,Mi.call(this,r)};Cr(jb,Mi);jb.prototype.animate=function(r){return r.context.globalAlpha=this.easing_(r.elapsed),this.drawGeom_(r,r.geom),r.time<=this.duration_};const jit={name:"ol-animation-fade",extends:Bs,setup(r){const{map:e,vectorLayer:t,properties:n}=oc(jb,r);return{map:e,vectorLayer:t,properties:n}}};function Kit(r,e,t,n,i,a){return wr(r.$slots,"default")}var WT=le(jit,[["render",Kit]]),Kb=function(r){r=r||{},this.speed_=r.speed||0,Mi.call(this,r),this.side_=r.side||"left"};Cr(Kb,Mi);Kb.prototype.animate=function(r){r.time||(this.side_=="left"?this.dx=r.extent[0]-r.bbox[2]:this.dx=r.extent[2]-r.bbox[0],this.speed_&&(this.duration_=Math.abs(this.dx)/this.speed_/r.frameState.viewState.resolution));var e=r.geom.clone();return e.translate(this.dx*(1-this.easing_(r.elapsed)),0),this.drawGeom_(r,e),r.time<=this.duration_};const Yit={name:"ol-animation-slide",extends:Bs,setup(r){const{map:e,vectorLayer:t,properties:n}=oc(Kb,r);return{map:e,vectorLayer:t,properties:n}},props:{speed:{type:Number,default:0}}};function zit(r,e,t,n,i,a){return wr(r.$slots,"default")}var qT=le(Yit,[["render",zit]]),Yb=function(r){switch(r=r||{},Mi.call(this,r),this.speed_=r.speed||0,this.path_=r.path,r.rotate){case!0:case 0:this.rotate_=0;break;default:this.rotate_=r.rotate||!1;break}this.path_&&this.path_.getGeometry&&(this.path_=this.path_.getGeometry()),this.path_&&this.path_.getLineString&&(this.path_=this.path_.getLineString()),this.path_.getLength?(this.dist_=this.path_.getLength(),this.path_&&this.path_.getCoordinates&&(this.path_=this.path_.getCoordinates())):this.dist_=0,this.speed_>0&&(this.duration_=this.dist_/this.speed_)};Cr(Yb,Mi);Yb.prototype.animate=function(r){if(!r.time&&!this.dist_)return!1;var e=this.dist_*this.easing_(r.elapsed),t,n,i,a,o,s,A=0;n=this.path_[0];for(var l=1;l<this.path_.length;l++){if(t=n,n=this.path_[l],a=n[0]-t[0],o=n[1]-t[1],s=Math.sqrt(a*a+o*o),s&&A+s>=e){i=(e-A)/s,n=[t[0]+(n[0]-t[0])*i,t[1]+(n[1]-t[1])*i];break}A+=s}var u=r.style;if(r.rotation=Math.PI/2+Math.atan2(t[1]-n[1],t[0]-n[0]),this.rotate_!==!1){var h=[],c=this.rotate_-r.rotation+r.frameState.viewState.rotation;r.rotation=Math.PI/2+Math.atan2(t[1]-n[1],t[0]-n[0]);for(var f=0;i=r.style[f];f++)i.getImage()&&i.getImage().setRotation(c),h.push(i);r.style=h}return r.geom.setCoordinates(n),this.drawGeom_(r,r.geom),r.style=u,r.time<=this.duration_};const Xit={name:"ol-animation-path",extends:Bs,setup(r){const{map:e,vectorLayer:t,properties:n}=oc(Yb,r);return{map:e,vectorLayer:t,properties:n}},props:{rotate:{type:Boolean,default:!1},speed:{type:Number,default:0},path:{type:Object}}};function Wit(r,e,t,n,i,a){return wr(r.$slots,"default")}var ZT=le(Xit,[["render",Wit]]);function Ym(r){Ym.installed||(Ym.installed=!0,r.component(Bs.name,Bs),r.component(KT.name,KT),r.component(YT.name,YT),r.component(zT.name,zT),r.component(XT.name,XT),r.component(WT.name,WT),r.component(qT.name,qT),r.component(ZT.name,ZT))}var qit=Object.freeze(Object.defineProperty({__proto__:null,default:Ym,install:Ym,FeatureAnimation:Bs,DropAnimation:KT,ShakeAnimation:YT,ZoomAnimation:zT,TeleportAnimation:XT,FadeAnimation:WT,PathAnimation:ZT,SlideAnimation:qT},Symbol.toStringTag,{value:"Module"})),Zit=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)}}(),Jit=function(r){Zit(e,r);function e(t){var n=r.call(this)||this;return n.geometries_=t||null,n.changeEventsKeys_=[],n.listenGeometriesChange_(),n}return e.prototype.unlistenGeometriesChange_=function(){this.changeEventsKeys_.forEach(Rr),this.changeEventsKeys_.length=0},e.prototype.listenGeometriesChange_=function(){if(this.geometries_)for(var t=0,n=this.geometries_.length;t<n;++t)this.changeEventsKeys_.push(Pe(this.geometries_[t],ye.CHANGE,this.changed,this))},e.prototype.clone=function(){var t=new e(null);return t.setGeometries(this.geometries_),t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){if(a<Fu(this.getExtent(),t,n))return a;for(var o=this.geometries_,s=0,A=o.length;s<A;++s)a=o[s].closestPointXY(t,n,i,a);return a},e.prototype.containsXY=function(t,n){for(var i=this.geometries_,a=0,o=i.length;a<o;++a)if(i[a].containsXY(t,n))return!0;return!1},e.prototype.computeExtent=function(t){Iu(t);for(var n=this.geometries_,i=0,a=n.length;i<a;++i)mu(t,n[i].getExtent());return t},e.prototype.getGeometries=function(){return dO(this.geometries_)},e.prototype.getGeometriesArray=function(){return this.geometries_},e.prototype.getGeometriesArrayRecursive=function(){for(var t=[],n=this.geometries_,i=0,a=n.length;i<a;++i)n[i].getType()===this.getType()?t=t.concat(n[i].getGeometriesArrayRecursive()):t.push(n[i]);return t},e.prototype.getSimplifiedGeometry=function(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;for(var n=[],i=this.geometries_,a=!1,o=0,s=i.length;o<s;++o){var A=i[o],l=A.getSimplifiedGeometry(t);n.push(l),l!==A&&(a=!0)}if(a){var u=new e(null);return u.setGeometriesArray(n),u}else return this.simplifiedGeometryMaxMinSquaredTolerance=t,this},e.prototype.getType=function(){return st.GEOMETRY_COLLECTION},e.prototype.intersectsExtent=function(t){for(var n=this.geometries_,i=0,a=n.length;i<a;++i)if(n[i].intersectsExtent(t))return!0;return!1},e.prototype.isEmpty=function(){return this.geometries_.length===0},e.prototype.rotate=function(t,n){for(var i=this.geometries_,a=0,o=i.length;a<o;++a)i[a].rotate(t,n);this.changed()},e.prototype.scale=function(t,n,i){var a=i;a||(a=wa(this.getExtent()));for(var o=this.geometries_,s=0,A=o.length;s<A;++s)o[s].scale(t,n,a);this.changed()},e.prototype.setGeometries=function(t){this.setGeometriesArray(dO(t))},e.prototype.setGeometriesArray=function(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()},e.prototype.applyTransform=function(t){for(var n=this.geometries_,i=0,a=n.length;i<a;++i)n[i].applyTransform(t);this.changed()},e.prototype.translate=function(t,n){for(var i=this.geometries_,a=0,o=i.length;a<o;++a)i[a].translate(t,n);this.changed()},e.prototype.disposeInternal=function(){this.unlistenGeometriesChange_(),r.prototype.disposeInternal.call(this)},e}(D_);function dO(r){for(var e=[],t=0,n=r.length;t<n;++t)e.push(r[t].clone());return e}var ea=Jit,tat=Object.freeze(Object.defineProperty({__proto__:null,Circle:yb,Geometry:D_,GeometryCollection:ea,LinearRing:Kf,LineString:Dr,MultiLineString:Ea,MultiPoint:zo,MultiPolygon:Ca,Point:cr,Polygon:Cn,SimpleGeometry:Cs},Symbol.toStringTag,{value:"Module"})),eat=function(){function r(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.supportedMediaTypes=null}return r.prototype.getReadOptions=function(e,t){var n;if(t){var i=t.dataProjection?Ie(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()===Ma.TILE_PIXELS&&(i=Ie(i),i.setWorldExtent(t.extent)),n={dataProjection:i,featureProjection:t.featureProjection}}return this.adaptOptions(n)},r.prototype.adaptOptions=function(e){return de({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)},r.prototype.getType=function(){return Ee()},r.prototype.readFeature=function(e,t){return Ee()},r.prototype.readFeatures=function(e,t){return Ee()},r.prototype.readGeometry=function(e,t){return Ee()},r.prototype.readProjection=function(e){return Ee()},r.prototype.writeFeature=function(e,t){return Ee()},r.prototype.writeFeatures=function(e,t){return Ee()},r.prototype.writeGeometry=function(e,t){return Ee()},r}(),fg=eat;function bn(r,e,t){var n=t?Ie(t.featureProjection):null,i=t?Ie(t.dataProjection):null,a;if(n&&i&&!js(n,i)?a=(e?r.clone():r).transform(e?n:i,e?i:n):a=r,e&&t&&t.decimals!==void 0){var o=Math.pow(10,t.decimals),s=function(A){for(var l=0,u=A.length;l<u;++l)A[l]=Math.round(A[l]*o)/o;return A};a===r&&(a=r.clone()),a.applyTransform(s)}return a}function zb(r,e){var t=e?Ie(e.featureProjection):null,n=e?Ie(e.dataProjection):null;return t&&n&&!js(t,n)?mm(r,n,t):r}var rat=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)}}(),nat=function(r){rat(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return vs.JSON},e.prototype.readFeature=function(t,n){return this.readFeatureFromObject(Qy(t),this.getReadOptions(t,n))},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(Qy(t),this.getReadOptions(t,n))},e.prototype.readFeatureFromObject=function(t,n){return Ee()},e.prototype.readFeaturesFromObject=function(t,n){return Ee()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(Qy(t),this.getReadOptions(t,n))},e.prototype.readGeometryFromObject=function(t,n){return Ee()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(Qy(t))},e.prototype.readProjectionFromObject=function(t){return Ee()},e.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},e.prototype.writeFeatureObject=function(t,n){return Ee()},e.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},e.prototype.writeFeaturesObject=function(t,n){return Ee()},e.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},e.prototype.writeGeometryObject=function(t,n){return Ee()},e}(fg);function Qy(r){if(typeof r=="string"){var e=JSON.parse(r);return e||null}else return r!==null?r:null}var Xb=nat,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)}}(),sc={};sc[st.POINT]=sat;sc[st.LINE_STRING]=Aat;sc[st.POLYGON]=cat;sc[st.MULTI_POINT]=uat;sc[st.MULTI_LINE_STRING]=lat;sc[st.MULTI_POLYGON]=hat;var Ac={};Ac[st.POINT]=fat;Ac[st.LINE_STRING]=pat;Ac[st.POLYGON]=dat;Ac[st.MULTI_POINT]=gat;Ac[st.MULTI_LINE_STRING]=vat;Ac[st.MULTI_POLYGON]=yat;var aat=function(r){iat(e,r);function e(t){var n=this,i=t||{};return n=r.call(this)||this,n.geometryName_=i.geometryName,n}return e.prototype.readFeatureFromObject=function(t,n,i){var a=t,o=vO(a.geometry,n),s=new nr;if(this.geometryName_&&s.setGeometryName(this.geometryName_),s.setGeometry(o),a.attributes){s.setProperties(a.attributes,!0);var A=a.attributes[i];A!==void 0&&s.setId(A)}return s},e.prototype.readFeaturesFromObject=function(t,n){var i=n||{};if(t.features){for(var a=t,o=[],s=a.features,A=0,l=s.length;A<l;++A)o.push(this.readFeatureFromObject(s[A],i,t.objectIdFieldName));return o}else return[this.readFeatureFromObject(t,i)]},e.prototype.readGeometryFromObject=function(t,n){return vO(t,n)},e.prototype.readProjectionFromObject=function(t){if(t.spatialReference&&t.spatialReference.wkid!==void 0){var n=t.spatialReference,i=n.wkid;return Ie("EPSG:"+i)}else return null},e.prototype.writeGeometryObject=function(t,n){return gO(t,this.adaptOptions(n))},e.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={};if(!t.hasProperties())return i.attributes={},i;var a=t.getProperties(),o=t.getGeometry();if(o){i.geometry=gO(o,n);var s=n&&(n.dataProjection||n.featureProjection);s&&(i.geometry.spatialReference={wkid:Number(Ie(s).getCode().split(":").pop())}),delete a[t.getGeometryName()]}return Qh(a)?i.attributes={}:i.attributes=a,i},e.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],a=0,o=t.length;a<o;++a)i.push(this.writeFeatureObject(t[a],n));return{features:i}},e}(Xb);function vO(r,e){var t,n;if(!r)return null;var i;if(typeof r.x=="number"&&typeof r.y=="number")i=st.POINT;else if(r.points)i=st.MULTI_POINT;else if(r.paths){var a=r;a.paths.length===1?i=st.LINE_STRING:i=st.MULTI_LINE_STRING}else if(r.rings){var o=r,s=dp(o),A=oat(o.rings,s);A.length===1?(i=st.POLYGON,r=de({},r,(t={},t.rings=A[0],t))):(i=st.MULTI_POLYGON,r=de({},r,(n={},n.rings=A,n)))}var l=sc[i];return bn(l(r),!1,e)}function oat(r,e){var t=[],n=[],i=[],a,o;for(a=0,o=r.length;a<o;++a){t.length=0,eg(t,0,r[a],e.length);var s=H_(t,0,t.length,e.length);s?n.push([r[a]]):i.push(r[a])}for(;i.length;){var A=i.shift(),l=!1;for(a=n.length-1;a>=0;a--){var u=n[a][0],h=Eo(new Kf(u).getExtent(),new Kf(A).getExtent());if(h){n[a].push(A),l=!0;break}}l||n.push([A.reverse()])}return n}function sat(r){var e;return r.m!==void 0&&r.z!==void 0?e=new cr([r.x,r.y,r.z,r.m],Wt.XYZM):r.z!==void 0?e=new cr([r.x,r.y,r.z],Wt.XYZ):r.m!==void 0?e=new cr([r.x,r.y,r.m],Wt.XYM):e=new cr([r.x,r.y]),e}function Aat(r){var e=dp(r);return new Dr(r.paths[0],e)}function lat(r){var e=dp(r);return new Ea(r.paths,e)}function dp(r){var e=Wt.XY;return r.hasZ===!0&&r.hasM===!0?e=Wt.XYZM:r.hasZ===!0?e=Wt.XYZ:r.hasM===!0&&(e=Wt.XYM),e}function uat(r){var e=dp(r);return new zo(r.points,e)}function hat(r){var e=dp(r);return new Ca(r.rings,e)}function cat(r){var e=dp(r);return new Cn(r.rings,e)}function fat(r,e){var t=r.getCoordinates(),n,i=r.getLayout();return i===Wt.XYZ?n={x:t[0],y:t[1],z:t[2]}:i===Wt.XYM?n={x:t[0],y:t[1],m:t[2]}:i===Wt.XYZM?n={x:t[0],y:t[1],z:t[2],m:t[3]}:i===Wt.XY?n={x:t[0],y:t[1]}:_e(!1,34),n}function pg(r){var e=r.getLayout();return{hasZ:e===Wt.XYZ||e===Wt.XYZM,hasM:e===Wt.XYM||e===Wt.XYZM}}function pat(r,e){var t=pg(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:[r.getCoordinates()]}}function dat(r,e){var t=pg(r);return{hasZ:t.hasZ,hasM:t.hasM,rings:r.getCoordinates(!1)}}function vat(r,e){var t=pg(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:r.getCoordinates()}}function gat(r,e){var t=pg(r);return{hasZ:t.hasZ,hasM:t.hasM,points:r.getCoordinates()}}function yat(r,e){for(var t=pg(r),n=r.getCoordinates(!1),i=[],a=0;a<n.length;a++)for(var o=n[a].length-1;o>=0;o--)i.push(n[a][o]);return{hasZ:t.hasZ,hasM:t.hasM,rings:i}}function gO(r,e){var t=Ac[r.getType()];return t(bn(r,!0,e),e)}var mat=aat,_at=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),wat=function(r){_at(e,r);function e(t){var n=this,i=t||{};return n=r.call(this)||this,n.dataProjection=Ie(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(n.defaultFeatureProjection=Ie(i.featureProjection)),n.geometryName_=i.geometryName,n.extractGeometryName_=i.extractGeometryName,n.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"],n}return e.prototype.readFeatureFromObject=function(t,n){var i=null;t.type==="Feature"?i=t:i={type:"Feature",geometry:t,properties:null};var a=JT(i.geometry,n),o=new nr;return this.geometryName_?o.setGeometryName(this.geometryName_):this.extractGeometryName_&&"geometry_name"in i!==void 0&&o.setGeometryName(i.geometry_name),o.setGeometry(a),"id"in i&&o.setId(i.id),i.properties&&o.setProperties(i.properties,!0),o},e.prototype.readFeaturesFromObject=function(t,n){var i=t,a=null;if(i.type==="FeatureCollection"){var o=t;a=[];for(var s=o.features,A=0,l=s.length;A<l;++A)a.push(this.readFeatureFromObject(s[A],n))}else a=[this.readFeatureFromObject(t,n)];return a},e.prototype.readGeometryFromObject=function(t,n){return JT(t,n)},e.prototype.readProjectionFromObject=function(t){var n=t.crs,i;return n?n.type=="name"?i=Ie(n.properties.name):n.type==="EPSG"?i=Ie("EPSG:"+n.properties.code):_e(!1,36):i=this.dataProjection,i},e.prototype.writeFeatureObject=function(t,n){n=this.adaptOptions(n);var i={type:"Feature",geometry:null,properties:null},a=t.getId();if(a!==void 0&&(i.id=a),!t.hasProperties())return i;var o=t.getProperties(),s=t.getGeometry();return s&&(i.geometry=tx(s,n),delete o[t.getGeometryName()]),Qh(o)||(i.properties=o),i},e.prototype.writeFeaturesObject=function(t,n){n=this.adaptOptions(n);for(var i=[],a=0,o=t.length;a<o;++a)i.push(this.writeFeatureObject(t[a],n));return{type:"FeatureCollection",features:i}},e.prototype.writeGeometryObject=function(t,n){return tx(t,this.adaptOptions(n))},e}(Xb);function JT(r,e){if(!r)return null;var t;switch(r.type){case st.POINT:{t=Cat(r);break}case st.LINE_STRING:{t=Bat(r);break}case st.POLYGON:{t=bat(r);break}case st.MULTI_POINT:{t=xat(r);break}case st.MULTI_LINE_STRING:{t=Tat(r);break}case st.MULTI_POLYGON:{t=Sat(r);break}case st.GEOMETRY_COLLECTION:{t=Eat(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return bn(t,!1,e)}function Eat(r,e){var t=r.geometries.map(function(n){return JT(n,e)});return new ea(t)}function Cat(r){return new cr(r.coordinates)}function Bat(r){return new Dr(r.coordinates)}function Tat(r){return new Ea(r.coordinates)}function xat(r){return new zo(r.coordinates)}function Sat(r){return new Ca(r.coordinates)}function bat(r){return new Cn(r.coordinates)}function tx(r,e){r=bn(r,!0,e);var t=r.getType(),n;switch(t){case st.POINT:{n=Mat(r);break}case st.LINE_STRING:{n=Fat(r);break}case st.POLYGON:{n=Pat(r,e);break}case st.MULTI_POINT:{n=Rat(r);break}case st.MULTI_LINE_STRING:{n=Iat(r);break}case st.MULTI_POLYGON:{n=Oat(r,e);break}case st.GEOMETRY_COLLECTION:{n=Lat(r,e);break}case st.CIRCLE:{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return n}function Lat(r,e){var t=r.getGeometriesArray().map(function(n){var i=de({},e);return delete i.featureProjection,tx(n,i)});return{type:"GeometryCollection",geometries:t}}function Fat(r,e){return{type:"LineString",coordinates:r.getCoordinates()}}function Iat(r,e){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function Rat(r,e){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function Oat(r,e){var t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(t)}}function Mat(r,e){return{type:"Point",coordinates:r.getCoordinates()}}function Pat(r,e){var t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(t)}}var Nat=wat,jh="http://www.w3.org/2001/XMLSchema-instance";function Ge(r,e){return vp().createElementNS(r,e)}function Ga(r,e){return f6(r,e,[]).join("")}function f6(r,e,t){if(r.nodeType==Node.CDATA_SECTION_NODE||r.nodeType==Node.TEXT_NODE)e?t.push(String(r.nodeValue).replace(/(\r\n|\r|\n)/g,"")):t.push(r.nodeValue);else{var n=void 0;for(n=r.firstChild;n;n=n.nextSibling)f6(n,e,t)}return t}function qs(r){return"documentElement"in r}function Uat(r,e,t){return r.getAttributeNS(e,t)||""}function Zs(r){return new DOMParser().parseFromString(r,"application/xml")}function yO(r,e){return function(t,n){var i=r.call(e!==void 0?e:this,t,n);if(i!==void 0){var a=n[n.length-1];Ur(a,i)}}}function me(r,e){return function(t,n){var i=r.call(e!==void 0?e:this,t,n);if(i!==void 0){var a=n[n.length-1];a.push(i)}}}function Fe(r,e){return function(t,n){var i=r.call(e!==void 0?e:this,t,n);i!==void 0&&(n[n.length-1]=i)}}function cn(r,e,t){return function(n,i){var a=r.call(t!==void 0?t:this,n,i);if(a!==void 0){var o=i[i.length-1],s=e!==void 0?e:n.localName,A=void 0;s in o?A=o[s]:(A=[],o[s]=A),A.push(a)}}}function ot(r,e,t){return function(n,i){var a=r.call(t!==void 0?t:this,n,i);if(a!==void 0){var o=i[i.length-1],s=e!==void 0?e:n.localName;o[s]=a}}}function At(r,e){return function(t,n,i){r.call(e!==void 0?e:this,t,n,i);var a=i[i.length-1],o=a.node;o.appendChild(t)}}function p6(r,e){var t,n;return function(i,a,o){if(t===void 0){t={};var s={};s[i.localName]=r,t[i.namespaceURI]=s,n=Rn(i.localName)}d6(t,n,a,o)}}function Rn(r,e){var t=r;return function(n,i,a){var o=i[i.length-1],s=o.node,A=t;A===void 0&&(A=a);var l=e!==void 0?e:s.namespaceURI;return Ge(l,A)}}var ji=Rn();function ao(r,e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=r[e[i]];return n}function Mt(r,e,t){var n=t!==void 0?t:{},i,a;for(i=0,a=r.length;i<a;++i)n[r[i]]=e;return n}function eo(r,e,t,n){var i;for(i=e.firstElementChild;i;i=i.nextElementSibling){var a=r[i.namespaceURI];if(a!==void 0){var o=a[i.localName];o!==void 0&&o.call(n,i,t)}}}function Gt(r,e,t,n,i){return n.push(r),eo(e,t,n,i),n.pop()}function d6(r,e,t,n,i,a){for(var o=(i!==void 0?i:t).length,s,A,l=0;l<o;++l)s=t[l],s!==void 0&&(A=e.call(a!==void 0?a:this,s,n,i!==void 0?i[l]:void 0),A!==void 0&&r[A.namespaceURI][A.localName].call(a,A,s,n))}function He(r,e,t,n,i,a,o){return i.push(r),d6(e,t,n,i,a,o),i.pop()}var LE=void 0;function Dat(){return LE===void 0&&typeof XMLSerializer<"u"&&(LE=new XMLSerializer),LE}var FE=void 0;function vp(){return FE===void 0&&typeof document<"u"&&(FE=document.implementation.createDocument("","",null)),FE}var Qat=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){Qat(e,r);function e(){var t=r.call(this)||this;return t.xmlSerializer_=Dat(),t}return e.prototype.getType=function(){return vs.XML},e.prototype.readFeature=function(t,n){if(t)if(typeof t=="string"){var i=Zs(t);return this.readFeatureFromDocument(i,n)}else return qs(t)?this.readFeatureFromDocument(t,n):this.readFeatureFromNode(t,n);else return null},e.prototype.readFeatureFromDocument=function(t,n){var i=this.readFeaturesFromDocument(t,n);return i.length>0?i[0]:null},e.prototype.readFeatureFromNode=function(t,n){return null},e.prototype.readFeatures=function(t,n){if(t)if(typeof t=="string"){var i=Zs(t);return this.readFeaturesFromDocument(i,n)}else return qs(t)?this.readFeaturesFromDocument(t,n):this.readFeaturesFromNode(t,n);else return[]},e.prototype.readFeaturesFromDocument=function(t,n){for(var i=[],a=t.firstChild;a;a=a.nextSibling)a.nodeType==Node.ELEMENT_NODE&&Ur(i,this.readFeaturesFromNode(a,n));return i},e.prototype.readFeaturesFromNode=function(t,n){return Ee()},e.prototype.readGeometry=function(t,n){if(t)if(typeof t=="string"){var i=Zs(t);return this.readGeometryFromDocument(i,n)}else return qs(t)?this.readGeometryFromDocument(t,n):this.readGeometryFromNode(t,n);else return null},e.prototype.readGeometryFromDocument=function(t,n){return null},e.prototype.readGeometryFromNode=function(t,n){return null},e.prototype.readProjection=function(t){if(t)if(typeof t=="string"){var n=Zs(t);return this.readProjectionFromDocument(n)}else return qs(t)?this.readProjectionFromDocument(t):this.readProjectionFromNode(t);else return null},e.prototype.readProjectionFromDocument=function(t){return this.dataProjection},e.prototype.readProjectionFromNode=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,n){var i=this.writeFeatureNode(t,n);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeatureNode=function(t,n){return null},e.prototype.writeFeatures=function(t,n){var i=this.writeFeaturesNode(t,n);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeFeaturesNode=function(t,n){return null},e.prototype.writeGeometry=function(t,n){var i=this.writeGeometryNode(t,n);return this.xmlSerializer_.serializeToString(i)},e.prototype.writeGeometryNode=function(t,n){return null},e}(fg),dg=Hat,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)}}(),XA="http://www.opengis.net/gml",kat=/^[\s\xa0]*$/,Qn=function(r){Gat(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.featureType=i.featureType,n.featureNS=i.featureNS,n.srsName=i.srsName,n.schemaLocation="",n.FEATURE_COLLECTION_PARSERS={},n.FEATURE_COLLECTION_PARSERS[n.namespace]={featureMember:me(n.readFeaturesInternal),featureMembers:Fe(n.readFeaturesInternal)},n.supportedMediaTypes=["application/gml+xml"],n}return e.prototype.readFeaturesInternal=function(t,n){var i=t.localName,a=null;if(i=="FeatureCollection")a=Gt([],this.FEATURE_COLLECTION_PARSERS,t,n,this);else if(i=="featureMembers"||i=="featureMember"||i=="member"){var o=n[0],s=o.featureType,A=o.featureNS,l="p",u="p0";if(!s&&t.childNodes){s=[],A={};for(var h=0,c=t.childNodes.length;h<c;++h){var f=t.childNodes[h];if(f.nodeType===1){var d=f.nodeName.split(":").pop();if(s.indexOf(d)===-1){var v="",y=0,m=f.namespaceURI;for(var w in A){if(A[w]===m){v=w;break}++y}v||(v=l+y,A[v]=m),s.push(v+":"+d)}}}i!="featureMember"&&(o.featureType=s,o.featureNS=A)}if(typeof A=="string"){var C=A;A={},A[u]=C}var B={},R=Array.isArray(s)?s:[s];for(var O in A){for(var I={},h=0,c=R.length;h<c;++h){var T=R[h].indexOf(":")===-1?u:R[h].split(":")[0];T===O&&(I[R[h].split(":").pop()]=i=="featureMembers"?me(this.readFeatureElement,this):Fe(this.readFeatureElement,this))}B[A[O]]=I}i=="featureMember"||i=="member"?a=Gt(void 0,B,t,n):a=Gt([],B,t,n)}return a===null&&(a=[]),a},e.prototype.readGeometryOrExtent=function(t,n){var i=n[0];return i.srsName=t.firstElementChild.getAttribute("srsName"),i.srsDimension=t.firstElementChild.getAttribute("srsDimension"),Gt(null,this.GEOMETRY_PARSERS,t,n,this)},e.prototype.readExtentElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?zb(a,i):void 0},e.prototype.readGeometryElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?bn(a,!1,i):void 0},e.prototype.readFeatureElementInternal=function(t,n,i){for(var a,o={},s=t.firstElementChild;s;s=s.nextElementSibling){var A=void 0,l=s.localName;s.childNodes.length===0||s.childNodes.length===1&&(s.firstChild.nodeType===3||s.firstChild.nodeType===4)?(A=Ga(s,!1),kat.test(A)&&(A=void 0)):(i&&(A=l==="boundedBy"?this.readExtentElement(s,n):this.readGeometryElement(s,n)),A?l!=="boundedBy"&&(a=l):A=this.readFeatureElementInternal(s,n,!1)),o[l]?(o[l]instanceof Array||(o[l]=[o[l]]),o[l].push(A)):o[l]=A;var u=s.attributes.length;if(u>0){o[l]={_content_:o[l]};for(var h=0;h<u;h++){var c=s.attributes[h].name;o[l][c]=s.attributes[h].value}}}if(i){var f=new nr(o);a&&f.setGeometryName(a);var d=t.getAttribute("fid")||Uat(t,this.namespace,"id");return d&&f.setId(d),f}else return o},e.prototype.readFeatureElement=function(t,n){return this.readFeatureElementInternal(t,n,!0)},e.prototype.readPoint=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new cr(i,Wt.XYZ)},e.prototype.readMultiPoint=function(t,n){var i=Gt([],this.MULTIPOINT_PARSERS,t,n,this);if(i)return new zo(i)},e.prototype.readMultiLineString=function(t,n){var i=Gt([],this.MULTILINESTRING_PARSERS,t,n,this);if(i)return new Ea(i)},e.prototype.readMultiPolygon=function(t,n){var i=Gt([],this.MULTIPOLYGON_PARSERS,t,n,this);if(i)return new Ca(i)},e.prototype.pointMemberParser=function(t,n){eo(this.POINTMEMBER_PARSERS,t,n,this)},e.prototype.lineStringMemberParser=function(t,n){eo(this.LINESTRINGMEMBER_PARSERS,t,n,this)},e.prototype.polygonMemberParser=function(t,n){eo(this.POLYGONMEMBER_PARSERS,t,n,this)},e.prototype.readLineString=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i){var a=new Dr(i,Wt.XYZ);return a}else return},e.prototype.readFlatLinearRing=function(t,n){var i=Gt(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this);if(i)return i},e.prototype.readLinearRing=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new Kf(i,Wt.XYZ)},e.prototype.readPolygon=function(t,n){var i=Gt([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this);if(i&&i[0]){var a=i[0],o=[a.length],s=void 0,A=void 0;for(s=1,A=i.length;s<A;++s)Ur(a,i[s]),o.push(a.length);return new Cn(a,Wt.XYZ,o)}else return},e.prototype.readFlatCoordinatesFromNode=function(t,n){return Gt(null,this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},e.prototype.readGeometryFromNode=function(t,n){var i=this.readGeometryElement(t,[this.getReadOptions(t,n||{})]);return i||null},e.prototype.readFeaturesFromNode=function(t,n){var i={featureType:this.featureType,featureNS:this.featureNS};n&&de(i,this.getReadOptions(t,n));var a=this.readFeaturesInternal(t,[i]);return a||[]},e.prototype.readProjectionFromNode=function(t){return Ie(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(dg);Qn.prototype.namespace=XA;Qn.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}};Qn.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}};Qn.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}};Qn.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:me(Qn.prototype.pointMemberParser),pointMembers:me(Qn.prototype.pointMemberParser)}};Qn.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:me(Qn.prototype.lineStringMemberParser),lineStringMembers:me(Qn.prototype.lineStringMemberParser)}};Qn.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:me(Qn.prototype.polygonMemberParser),polygonMembers:me(Qn.prototype.polygonMemberParser)}};Qn.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:me(Qn.prototype.readFlatCoordinatesFromNode)}};Qn.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:me(Qn.prototype.readLineString)}};Qn.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:me(Qn.prototype.readPolygon)}};Qn.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Fe(Qn.prototype.readFlatLinearRing)}};var sr=Qn;function Su(r){var e=Ga(r,!1);return Fh(e)}function Fh(r){var e=/^\s*(true|1)|(false|0)\s*$/.exec(r);if(e)return e[1]!==void 0||!1}function Wb(r){var e=Ga(r,!1),t=Date.parse(e);return isNaN(t)?void 0:t/1e3}function Lr(r){var e=Ga(r,!1);return $A(e)}function $A(r){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(r);if(e)return parseFloat(e[1])}function Zn(r){var e=Ga(r,!1);return jA(e)}function jA(r){var e=/^\s*(\d+)\s*$/.exec(r);if(e)return parseInt(e[1],10)}function $t(r){return Ga(r,!1).trim()}function Jf(r,e){Ue(r,e?"1":"0")}function $at(r,e){r.appendChild(vp().createCDATASection(e))}function Vat(r,e){var t=new Date(e*1e3),n=t.getUTCFullYear()+"-"+ad(t.getUTCMonth()+1,2)+"-"+ad(t.getUTCDate(),2)+"T"+ad(t.getUTCHours(),2)+":"+ad(t.getUTCMinutes(),2)+":"+ad(t.getUTCSeconds(),2)+"Z";r.appendChild(vp().createTextNode(n))}function Za(r,e){var t=e.toPrecision();r.appendChild(vp().createTextNode(t))}function zm(r,e){var t=e.toString();r.appendChild(vp().createTextNode(t))}function Ue(r,e){r.appendChild(vp().createTextNode(e))}var jat=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)}}(),Kat=XA+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",Yat={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},_r=function(r){jat(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.FEATURE_COLLECTION_PARSERS[XA].featureMember=me(n.readFeaturesInternal),n.schemaLocation=i.schemaLocation?i.schemaLocation:Kat,n}return e.prototype.readFlatCoordinates=function(t,n){var i=Ga(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s="enu";if(o){var A=Ie(o);A&&(s=A.getAxisOrientation())}for(var l=i.trim().split(/\s+/),u=[],h=0,c=l.length;h<c;h++){var f=l[h].split(/,+/),d=parseFloat(f[0]),v=parseFloat(f[1]),y=f.length===3?parseFloat(f[2]):0;s.substr(0,2)==="en"?u.push(d,v,y):u.push(v,d,y)}return u},e.prototype.readBox=function(t,n){var i=Gt([null],this.BOX_PARSERS_,t,n,this);return no(i[1][0],i[1][1],i[1][3],i[1][4])},e.prototype.innerBoundaryIsParser=function(t,n){var i=Gt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a.push(i)}},e.prototype.outerBoundaryIsParser=function(t,n){var i=Gt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a[0]=i}},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.multiSurface,s=a.surface,A=a.multiCurve,l;return Array.isArray(t)?l="Envelope":(l=t.getType(),l==="MultiPolygon"&&o===!0?l="MultiSurface":l==="Polygon"&&s===!0?l="Surface":l==="MultiLineString"&&A===!0&&(l="MultiCurve")),Ge("http://www.opengis.net/gml",l)},e.prototype.writeFeatureElement=function(t,n,i){var a=n.getId();a&&t.setAttribute("fid",a);var o=i[i.length-1],s=o.featureNS,A=n.getGeometryName();o.serializers||(o.serializers={},o.serializers[s]={});var l=[],u=[];if(n.hasProperties()){var h=n.getProperties();for(var c in h){var f=h[c];f!==null&&(l.push(c),u.push(f),c==A||typeof f.getSimplifiedGeometry=="function"?c in o.serializers[s]||(o.serializers[s][c]=At(this.writeGeometryElement,this)):c in o.serializers[s]||(o.serializers[s][c]=At(Ue)))}}var d=de({},o);d.node=t,He(d,o.serializers,Rn(void 0,s),u,i,l)},e.prototype.writeCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.srsName;if(t.nodeName!=="LineStringSegment"&&o&&t.setAttribute("srsName",o),t.nodeName==="LineString"||t.nodeName==="LineStringSegment"){var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s),this.writeCoordinates_(s,n,i)}else if(t.nodeName==="Curve"){var A=Ge(t.namespaceURI,"segments");t.appendChild(A),this.writeCurveSegments_(A,n,i)}},e.prototype.writeLineStringOrCurveMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeCurveOrLineString(a,n,i))},e.prototype.writeMultiCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.curve;s&&t.setAttribute("srsName",s);var l=n.getLineStrings();He({node:t,hasZ:o,srsName:s,curve:A},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeGeometryElement=function(t,n,i){var a=i[i.length-1],o=de({},a);o.node=t;var s;Array.isArray(n)?s=zb(n,a):s=bn(n,!0,a),He(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var n=Ge(t,"coordinates");return n.setAttribute("decimal","."),n.setAttribute("cs",","),n.setAttribute("ts"," "),n},e.prototype.writeCoordinates_=function(t,n,i){for(var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=n.getCoordinates(),l=A.length,u=new Array(l),h=0;h<l;++h){var c=A[h];u[h]=this.getCoords_(c,s,o)}Ue(t,u.join(" "))},e.prototype.writeCurveSegments_=function(t,n,i){var a=Ge(t.namespaceURI,"LineStringSegment");t.appendChild(a),this.writeCurveOrLineString(a,n,i)},e.prototype.writeSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;if(t.nodeName!=="PolygonPatch"&&s&&t.setAttribute("srsName",s),t.nodeName==="Polygon"||t.nodeName==="PolygonPatch"){var A=n.getLinearRings();He({node:t,hasZ:o,srsName:s},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,A,i,void 0,this)}else if(t.nodeName==="Surface"){var l=Ge(t.namespaceURI,"patches");t.appendChild(l),this.writeSurfacePatches_(l,n,i)}},e.prototype.RING_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.node,s=a.exteriorWritten;return s===void 0&&(a.exteriorWritten=!0),Ge(o.namespaceURI,s!==void 0?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,n,i){var a=Ge(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeRing=function(t,n,i){var a=Ge(t.namespaceURI,"LinearRing");t.appendChild(a),this.writeLinearRing(a,n,i)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Ie(n).getAxisOrientation());var o=a.substr(0,2)==="en"?t[0]+","+t[1]:t[1]+","+t[0];if(i){var s=t[2]||0;o+=","+s}return o},e.prototype.writePoint=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;s&&t.setAttribute("srsName",s);var A=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(A);var l=n.getCoordinates(),u=this.getCoords_(l,s,o);Ue(A,u)},e.prototype.writeMultiPoint=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;s&&t.setAttribute("srsName",s);var A=n.getPoints();He({node:t,hasZ:o,srsName:s},this.POINTMEMBER_SERIALIZERS,Rn("pointMember"),A,i,void 0,this)},e.prototype.writePointMember=function(t,n,i){var a=Ge(t.namespaceURI,"Point");t.appendChild(a),this.writePoint(a,n,i)},e.prototype.writeLinearRing=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=this.createCoordinatesNode_(t.namespaceURI);t.appendChild(s),this.writeCoordinates_(s,n,i)},e.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.surface;s&&t.setAttribute("srsName",s);var l=n.getPolygons();He({node:t,hasZ:o,srsName:s,surface:A},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i))},e.prototype.writeEnvelope=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=["lowerCorner","upperCorner"],A=[n[0]+" "+n[1],n[2]+" "+n[3]];He({node:t},this.ENVELOPE_SERIALIZERS,ji,A,i,s,this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return Ge("http://www.opengis.net/gml",Yat[a.nodeName])},e}(sr);_r.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Fe(_r.prototype.readFlatCoordinates)}};_r.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:_r.prototype.innerBoundaryIsParser,outerBoundaryIs:_r.prototype.outerBoundaryIsParser}};_r.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:me(_r.prototype.readFlatCoordinates)}};_r.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Fe(sr.prototype.readPoint),MultiPoint:Fe(sr.prototype.readMultiPoint),LineString:Fe(sr.prototype.readLineString),MultiLineString:Fe(sr.prototype.readMultiLineString),LinearRing:Fe(sr.prototype.readLinearRing),Polygon:Fe(sr.prototype.readPolygon),MultiPolygon:Fe(sr.prototype.readMultiPolygon),Box:Fe(_r.prototype.readBox)}};_r.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:At(_r.prototype.writeCurveOrLineString),MultiCurve:At(_r.prototype.writeMultiCurveOrLineString),Point:At(_r.prototype.writePoint),MultiPoint:At(_r.prototype.writeMultiPoint),LineString:At(_r.prototype.writeCurveOrLineString),MultiLineString:At(_r.prototype.writeMultiCurveOrLineString),LinearRing:At(_r.prototype.writeLinearRing),Polygon:At(_r.prototype.writeSurfaceOrPolygon),MultiPolygon:At(_r.prototype.writeMultiSurfaceOrPolygon),Surface:At(_r.prototype.writeSurfaceOrPolygon),MultiSurface:At(_r.prototype.writeMultiSurfaceOrPolygon),Envelope:At(_r.prototype.writeEnvelope)}};_r.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:At(_r.prototype.writeLineStringOrCurveMember),curveMember:At(_r.prototype.writeLineStringOrCurveMember)}};_r.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:At(_r.prototype.writeRing),innerBoundaryIs:At(_r.prototype.writeRing)}};_r.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:At(_r.prototype.writePointMember)}};_r.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:At(_r.prototype.writeSurfaceOrPolygonMember),polygonMember:At(_r.prototype.writeSurfaceOrPolygonMember)}};_r.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:At(Ue),upperCorner:At(Ue)}};var gp=_r,zat=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)}}(),Xat=XA+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",Wat={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},we=function(r){zat(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.surface_=i.surface!==void 0?i.surface:!1,n.curve_=i.curve!==void 0?i.curve:!1,n.multiCurve_=i.multiCurve!==void 0?i.multiCurve:!0,n.multiSurface_=i.multiSurface!==void 0?i.multiSurface:!0,n.schemaLocation=i.schemaLocation?i.schemaLocation:Xat,n.hasZ=i.hasZ!==void 0?i.hasZ:!1,n}return e.prototype.readMultiCurve=function(t,n){var i=Gt([],this.MULTICURVE_PARSERS,t,n,this);if(i){var a=new Ea(i);return a}else return},e.prototype.readMultiSurface=function(t,n){var i=Gt([],this.MULTISURFACE_PARSERS,t,n,this);if(i)return new Ca(i)},e.prototype.curveMemberParser=function(t,n){eo(this.CURVEMEMBER_PARSERS,t,n,this)},e.prototype.surfaceMemberParser=function(t,n){eo(this.SURFACEMEMBER_PARSERS,t,n,this)},e.prototype.readPatch=function(t,n){return Gt([null],this.PATCHES_PARSERS,t,n,this)},e.prototype.readSegment=function(t,n){return Gt([null],this.SEGMENTS_PARSERS,t,n,this)},e.prototype.readPolygonPatch=function(t,n){return Gt([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this)},e.prototype.readLineStringSegment=function(t,n){return Gt([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},e.prototype.interiorParser=function(t,n){var i=Gt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a.push(i)}},e.prototype.exteriorParser=function(t,n){var i=Gt(void 0,this.RING_PARSERS,t,n,this);if(i){var a=n[n.length-1];a[0]=i}},e.prototype.readSurface=function(t,n){var i=Gt([null],this.SURFACE_PARSERS,t,n,this);if(i&&i[0]){var a=i[0],o=[a.length],s=void 0,A=void 0;for(s=1,A=i.length;s<A;++s)Ur(a,i[s]),o.push(a.length);return new Cn(a,Wt.XYZ,o)}else return},e.prototype.readCurve=function(t,n){var i=Gt([null],this.CURVE_PARSERS,t,n,this);if(i){var a=new Dr(i,Wt.XYZ);return a}else return},e.prototype.readEnvelope=function(t,n){var i=Gt([null],this.ENVELOPE_PARSERS,t,n,this);return no(i[1][0],i[1][1],i[2][0],i[2][1])},e.prototype.readFlatPos=function(t,n){for(var i=Ga(t,!1),a=/^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/,o=[],s;s=a.exec(i);)o.push(parseFloat(s[1])),i=i.substr(s[0].length);if(i===""){var A=n[0],l=A.srsName,u="enu";if(l){var h=Ie(l);u=h.getAxisOrientation()}if(u==="neu"){var c=void 0,f=void 0;for(c=0,f=o.length;c<f;c+=3){var d=o[c],v=o[c+1];o[c]=v,o[c+1]=d}}var y=o.length;if(y==2&&o.push(0),y!==0)return o}},e.prototype.readFlatPosList=function(t,n){var i=Ga(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s=a.srsDimension,A="enu";if(o){var l=Ie(o);A=l.getAxisOrientation()}var u=i.split(/\s+/),h=2;t.getAttribute("srsDimension")?h=jA(t.getAttribute("srsDimension")):t.getAttribute("dimension")?h=jA(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?h=jA(t.parentNode.getAttribute("srsDimension")):s&&(h=jA(s));for(var c,f,d,v=[],y=0,m=u.length;y<m;y+=h)c=parseFloat(u[y]),f=parseFloat(u[y+1]),d=h===3?parseFloat(u[y+2]):0,A.substr(0,2)==="en"?v.push(c,f,d):v.push(f,c,d);return v},e.prototype.writePos_=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=o?"3":"2";t.setAttribute("srsDimension",s);var A=a.srsName,l="enu";A&&(l=Ie(A).getAxisOrientation());var u=n.getCoordinates(),h;if(l.substr(0,2)==="en"?h=u[0]+" "+u[1]:h=u[1]+" "+u[0],o){var c=u[2]||0;h+=" "+c}Ue(t,h)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Ie(n).getAxisOrientation());var o=a.substr(0,2)==="en"?t[0]+" "+t[1]:t[1]+" "+t[0];if(i){var s=t[2]||0;o+=" "+s}return o},e.prototype.writePosList_=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=o?"3":"2";t.setAttribute("srsDimension",s);for(var A=a.srsName,l=n.getCoordinates(),u=l.length,h=new Array(u),c,f=0;f<u;++f)c=l[f],h[f]=this.getCoords_(c,A,o);Ue(t,h.join(" "))},e.prototype.writePoint=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=Ge(t.namespaceURI,"pos");t.appendChild(s),this.writePos_(s,n,i)},e.prototype.writeEnvelope=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=["lowerCorner","upperCorner"],A=[n[0]+" "+n[1],n[2]+" "+n[3]];He({node:t},this.ENVELOPE_SERIALIZERS,ji,A,i,s,this)},e.prototype.writeLinearRing=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=Ge(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,n,i)},e.prototype.RING_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.node,s=a.exteriorWritten;return s===void 0&&(a.exteriorWritten=!0),Ge(o.namespaceURI,s!==void 0?"interior":"exterior")},e.prototype.writeSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName;if(t.nodeName!=="PolygonPatch"&&s&&t.setAttribute("srsName",s),t.nodeName==="Polygon"||t.nodeName==="PolygonPatch"){var A=n.getLinearRings();He({node:t,hasZ:o,srsName:s},this.RING_SERIALIZERS,this.RING_NODE_FACTORY_,A,i,void 0,this)}else if(t.nodeName==="Surface"){var l=Ge(t.namespaceURI,"patches");t.appendChild(l),this.writeSurfacePatches_(l,n,i)}},e.prototype.writeCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.srsName;if(t.nodeName!=="LineStringSegment"&&o&&t.setAttribute("srsName",o),t.nodeName==="LineString"||t.nodeName==="LineStringSegment"){var s=Ge(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,n,i)}else if(t.nodeName==="Curve"){var A=Ge(t.namespaceURI,"segments");t.appendChild(A),this.writeCurveSegments_(A,n,i)}},e.prototype.writeMultiSurfaceOrPolygon=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.surface;s&&t.setAttribute("srsName",s);var l=n.getPolygons();He({node:t,hasZ:o,srsName:s,surface:A},this.SURFACEORPOLYGONMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeMultiPoint=function(t,n,i){var a=i[i.length-1],o=a.srsName,s=a.hasZ;o&&t.setAttribute("srsName",o);var A=n.getPoints();He({node:t,hasZ:s,srsName:o},this.POINTMEMBER_SERIALIZERS,Rn("pointMember"),A,i,void 0,this)},e.prototype.writeMultiCurveOrLineString=function(t,n,i){var a=i[i.length-1],o=a.hasZ,s=a.srsName,A=a.curve;s&&t.setAttribute("srsName",s);var l=n.getLineStrings();He({node:t,hasZ:o,srsName:s,curve:A},this.LINESTRINGORCURVEMEMBER_SERIALIZERS,this.MULTIGEOMETRY_MEMBER_NODE_FACTORY_,l,i,void 0,this)},e.prototype.writeRing=function(t,n,i){var a=Ge(t.namespaceURI,"LinearRing");t.appendChild(a),this.writeLinearRing(a,n,i)},e.prototype.writeSurfaceOrPolygonMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i))},e.prototype.writePointMember=function(t,n,i){var a=Ge(t.namespaceURI,"Point");t.appendChild(a),this.writePoint(a,n,i)},e.prototype.writeLineStringOrCurveMember=function(t,n,i){var a=this.GEOMETRY_NODE_FACTORY_(n,i);a&&(t.appendChild(a),this.writeCurveOrLineString(a,n,i))},e.prototype.writeSurfacePatches_=function(t,n,i){var a=Ge(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeCurveSegments_=function(t,n,i){var a=Ge(t.namespaceURI,"LineStringSegment");t.appendChild(a),this.writeCurveOrLineString(a,n,i)},e.prototype.writeGeometryElement=function(t,n,i){var a=i[i.length-1],o=de({},a);o.node=t;var s;Array.isArray(n)?s=zb(n,a):s=bn(n,!0,a),He(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)},e.prototype.writeFeatureElement=function(t,n,i){var a=n.getId();a&&t.setAttribute("fid",a);var o=i[i.length-1],s=o.featureNS,A=n.getGeometryName();o.serializers||(o.serializers={},o.serializers[s]={});var l=[],u=[];if(n.hasProperties()){var h=n.getProperties();for(var c in h){var f=h[c];f!==null&&(l.push(c),u.push(f),c==A||typeof f.getSimplifiedGeometry=="function"?c in o.serializers[s]||(o.serializers[s][c]=At(this.writeGeometryElement,this)):c in o.serializers[s]||(o.serializers[s][c]=At(Ue)))}}var d=de({},o);d.node=t,He(d,o.serializers,Rn(void 0,s),u,i,l)},e.prototype.writeFeatureMembers_=function(t,n,i){var a=i[i.length-1],o=a.featureType,s=a.featureNS,A={};A[s]={},A[s][o]=At(this.writeFeatureElement,this);var l=de({},a);l.node=t,He(l,A,Rn(o,s),n,i)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return Ge(this.namespace,Wat[a.nodeName])},e.prototype.GEOMETRY_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1],o=a.multiSurface,s=a.surface,A=a.curve,l=a.multiCurve,u;return Array.isArray(t)?u="Envelope":(u=t.getType(),u==="MultiPolygon"&&o===!0?u="MultiSurface":u==="Polygon"&&s===!0?u="Surface":u==="LineString"&&A===!0?u="Curve":u==="MultiLineString"&&l===!0&&(u="MultiCurve")),Ge(this.namespace,u)},e.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var i=Ge(this.namespace,"geom"),a={node:i,hasZ:this.hasZ,srsName:this.srsName,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_};return n&&de(a,n),this.writeGeometryElement(i,t,[a]),i},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Ge(this.namespace,"featureMembers");i.setAttributeNS(jh,"xsi:schemaLocation",this.schemaLocation);var a={srsName:this.srsName,hasZ:this.hasZ,curve:this.curve_,surface:this.surface_,multiSurface:this.multiSurface_,multiCurve:this.multiCurve_,featureNS:this.featureNS,featureType:this.featureType};return n&&de(a,n),this.writeFeatureMembers_(i,t,[a]),i},e}(sr);we.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Fe(we.prototype.readFlatPos),posList:Fe(we.prototype.readFlatPosList),coordinates:Fe(gp.prototype.readFlatCoordinates)}};we.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:we.prototype.interiorParser,exterior:we.prototype.exteriorParser}};we.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Fe(sr.prototype.readPoint),MultiPoint:Fe(sr.prototype.readMultiPoint),LineString:Fe(sr.prototype.readLineString),MultiLineString:Fe(sr.prototype.readMultiLineString),LinearRing:Fe(sr.prototype.readLinearRing),Polygon:Fe(sr.prototype.readPolygon),MultiPolygon:Fe(sr.prototype.readMultiPolygon),Surface:Fe(we.prototype.readSurface),MultiSurface:Fe(we.prototype.readMultiSurface),Curve:Fe(we.prototype.readCurve),MultiCurve:Fe(we.prototype.readMultiCurve),Envelope:Fe(we.prototype.readEnvelope)}};we.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:me(we.prototype.curveMemberParser),curveMembers:me(we.prototype.curveMemberParser)}};we.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:me(we.prototype.surfaceMemberParser),surfaceMembers:me(we.prototype.surfaceMemberParser)}};we.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:me(sr.prototype.readLineString),Curve:me(we.prototype.readCurve)}};we.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:me(sr.prototype.readPolygon),Surface:me(we.prototype.readSurface)}};we.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Fe(we.prototype.readPatch)}};we.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Fe(we.prototype.readSegment)}};we.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:me(we.prototype.readFlatPosList),upperCorner:me(we.prototype.readFlatPosList)}};we.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Fe(we.prototype.readPolygonPatch)}};we.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Fe(we.prototype.readLineStringSegment)}};we.prototype.writeFeatures;we.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:At(we.prototype.writeRing),interior:At(we.prototype.writeRing)}};we.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:At(Ue),upperCorner:At(Ue)}};we.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:At(we.prototype.writeSurfaceOrPolygonMember),polygonMember:At(we.prototype.writeSurfaceOrPolygonMember)}};we.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:At(we.prototype.writePointMember)}};we.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:At(we.prototype.writeLineStringOrCurveMember),curveMember:At(we.prototype.writeLineStringOrCurveMember)}};we.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:At(we.prototype.writeCurveOrLineString),MultiCurve:At(we.prototype.writeMultiCurveOrLineString),Point:At(we.prototype.writePoint),MultiPoint:At(we.prototype.writeMultiPoint),LineString:At(we.prototype.writeCurveOrLineString),MultiLineString:At(we.prototype.writeMultiCurveOrLineString),LinearRing:At(we.prototype.writeLinearRing),Polygon:At(we.prototype.writeSurfaceOrPolygon),MultiPolygon:At(we.prototype.writeMultiSurfaceOrPolygon),Surface:At(we.prototype.writeSurfaceOrPolygon),MultiSurface:At(we.prototype.writeMultiSurfaceOrPolygon),Envelope:At(we.prototype.writeEnvelope)}};var Je=we,qb=Je;qb.prototype.writeFeatures;qb.prototype.writeFeaturesNode;var qat=qb,Zat=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)}}(),vi=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Jat="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd",tot={rte:v6,trk:g6,wpt:y6},eot=Mt(vi,{rte:me(v6),trk:me(g6),wpt:me(y6)}),rot=Mt(vi,{text:ot($t,"linkText"),type:ot($t,"linkType")}),not=Mt(vi,{rte:At(Sot),trk:At(bot),wpt:At(Fot)}),iot=function(r){Zat(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ie("EPSG:4326"),n.readExtensions_=i.readExtensions,n}return e.prototype.handleReadExtensions_=function(t){t||(t=[]);for(var n=0,i=t.length;n<i;++n){var a=t[n];if(this.readExtensions_){var o=a.get("extensionsNode_")||null;this.readExtensions_(a,o)}a.set("extensionsNode_",void 0)}},e.prototype.readFeatureFromNode=function(t,n){if(!fi(vi,t.namespaceURI))return null;var i=tot[t.localName];if(!i)return null;var a=i(t,[this.getReadOptions(t,n)]);return a?(this.handleReadExtensions_([a]),a):null},e.prototype.readFeaturesFromNode=function(t,n){if(!fi(vi,t.namespaceURI))return[];if(t.localName=="gpx"){var i=Gt([],eot,t,[this.getReadOptions(t,n)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Ge("http://www.topografix.com/GPX/1/1","gpx"),a="http://www.w3.org/2000/xmlns/";return i.setAttributeNS(a,"xmlns:xsi",jh),i.setAttributeNS(jh,"xsi:schemaLocation",Jat),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),He({node:i},not,Cot,t,[n]),i},e}(dg),aot=Mt(vi,{name:ot($t),cmt:ot($t),desc:ot($t),src:ot($t),link:tL,number:ot(Zn),extensions:eL,type:ot($t),rtept:Bot}),oot=Mt(vi,{ele:ot(Lr),time:ot(Wb)}),sot=Mt(vi,{name:ot($t),cmt:ot($t),desc:ot($t),src:ot($t),link:tL,number:ot(Zn),type:ot($t),extensions:eL,trkseg:xot}),Aot=Mt(vi,{trkpt:Tot}),lot=Mt(vi,{ele:ot(Lr),time:ot(Wb)}),uot=Mt(vi,{ele:ot(Lr),time:ot(Wb),magvar:ot(Lr),geoidheight:ot(Lr),name:ot($t),cmt:ot($t),desc:ot($t),src:ot($t),link:tL,sym:ot($t),type:ot($t),fix:ot($t),sat:ot(Zn),hdop:ot(Lr),vdop:ot(Lr),pdop:ot(Lr),ageofdgpsdata:ot(Lr),dgpsid:ot(Zn),extensions:eL}),hot=["text","type"],cot=Mt(vi,{text:At(Ue),type:At(Ue)}),fot=Mt(vi,["name","cmt","desc","src","link","number","type","rtept"]),pot=Mt(vi,{name:At(Ue),cmt:At(Ue),desc:At(Ue),src:At(Ue),link:At(rL),number:At(zm),type:At(Ue),rtept:p6(At(nL))}),dot=Mt(vi,["ele","time"]),vot=Mt(vi,["name","cmt","desc","src","link","number","type","trkseg"]),got=Mt(vi,{name:At(Ue),cmt:At(Ue),desc:At(Ue),src:At(Ue),link:At(rL),number:At(zm),type:At(Ue),trkseg:p6(At(Lot))}),yot=Rn("trkpt"),mot=Mt(vi,{trkpt:At(nL)}),_ot=Mt(vi,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),wot=Mt(vi,{ele:At(Za),time:At(Vat),magvar:At(Za),geoidheight:At(Za),name:At(Ue),cmt:At(Ue),desc:At(Ue),src:At(Ue),link:At(rL),sym:At(Ue),type:At(Ue),fix:At(Ue),sat:At(zm),hdop:At(Za),vdop:At(Za),pdop:At(Za),ageofdgpsdata:At(Za),dgpsid:At(zm)}),Eot={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function Cot(r,e,t){var n=r.getGeometry();if(n){var i=Eot[n.getType()];if(i){var a=e[e.length-1].node;return Ge(a.namespaceURI,i)}}}function Zb(r,e,t,n){return r.push(parseFloat(t.getAttribute("lon")),parseFloat(t.getAttribute("lat"))),"ele"in n?(r.push(n.ele),delete n.ele,e.hasZ=!0):r.push(0),"time"in n?(r.push(n.time),delete n.time,e.hasM=!0):r.push(0),r}function Jb(r,e,t){var n=Wt.XY,i=2;if(r.hasZ&&r.hasM?(n=Wt.XYZM,i=4):r.hasZ?(n=Wt.XYZ,i=3):r.hasM&&(n=Wt.XYM,i=3),i!==4){for(var a=0,o=e.length/4;a<o;a++)e[a*i]=e[a*4],e[a*i+1]=e[a*4+1],r.hasZ&&(e[a*i+2]=e[a*4+2]),r.hasM&&(e[a*i+2]=e[a*4+3]);if(e.length=e.length/4*i,t)for(var a=0,o=t.length;a<o;a++)t[a]=t[a]/4*i}return n}function tL(r,e){var t=e[e.length-1],n=r.getAttribute("href");n!==null&&(t.link=n),eo(rot,r,e)}function eL(r,e){var t=e[e.length-1];t.extensionsNode_=r}function Bot(r,e){var t=Gt({},oot,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;Zb(i,a,r,t)}}function Tot(r,e){var t=Gt({},lot,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;Zb(i,a,r,t)}}function xot(r,e){var t=e[e.length-1];eo(Aot,r,e);var n=t.flatCoordinates,i=t.ends;i.push(n.length)}function v6(r,e){var t=e[0],n=Gt({flatCoordinates:[],layoutOptions:{}},aot,r,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var a=n.layoutOptions;delete n.layoutOptions;var o=Jb(a,i),s=new Dr(i,o);bn(s,!1,t);var A=new nr(s);return A.setProperties(n,!0),A}}function g6(r,e){var t=e[0],n=Gt({flatCoordinates:[],ends:[],layoutOptions:{}},sot,r,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var a=n.ends;delete n.ends;var o=n.layoutOptions;delete n.layoutOptions;var s=Jb(o,i,a),A=new Ea(i,s,a);bn(A,!1,t);var l=new nr(A);return l.setProperties(n,!0),l}}function y6(r,e){var t=e[0],n=Gt({},uot,r,e);if(n){var i={},a=Zb([],i,r,n),o=Jb(i,a),s=new cr(a,o);bn(s,!1,t);var A=new nr(s);return A.setProperties(n,!0),A}}function rL(r,e,t){r.setAttribute("href",e);var n=t[t.length-1],i=n.properties,a=[i.linkText,i.linkType];He({node:r},cot,ji,a,t,hot)}function nL(r,e,t){var n=t[t.length-1],i=n.node,a=i.namespaceURI,o=n.properties;r.setAttributeNS(null,"lat",String(e[1])),r.setAttributeNS(null,"lon",String(e[0]));var s=n.geometryLayout;switch(s){case Wt.XYZM:e[3]!==0&&(o.time=e[3]);case Wt.XYZ:e[2]!==0&&(o.ele=e[2]);break;case Wt.XYM:e[2]!==0&&(o.time=e[2]);break}var A=r.nodeName=="rtept"?dot[a]:_ot[a],l=ao(o,A);He({node:r,properties:o},wot,ji,l,t,A)}function Sot(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==st.LINE_STRING){var s=bn(o,!0,n);a.geometryLayout=s.getLayout(),i.rtept=s.getCoordinates()}var A=t[t.length-1].node,l=fot[A.namespaceURI],u=ao(i,l);He(a,pot,ji,u,t,l)}function bot(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==st.MULTI_LINE_STRING){var s=bn(o,!0,n);i.trkseg=s.getLineStrings()}var A=t[t.length-1].node,l=vot[A.namespaceURI],u=ao(i,l);He(a,got,ji,u,t,l)}function Lot(r,e,t){var n={node:r};n.geometryLayout=e.getLayout(),n.properties={},He(n,mot,yot,e.getCoordinates(),t)}function Fot(r,e,t){var n=t[0],i=t[t.length-1];i.properties=e.getProperties();var a=e.getGeometry();if(a.getType()==st.POINT){var o=bn(a,!0,n);i.geometryLayout=o.getLayout(),nL(r,o.getCoordinates(),t)}}var Iot=iot,Rot=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)}}(),Oot=function(r){Rot(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return vs.TEXT},e.prototype.readFeature=function(t,n){return this.readFeatureFromText(Hy(t),this.adaptOptions(n))},e.prototype.readFeatureFromText=function(t,n){return Ee()},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(Hy(t),this.adaptOptions(n))},e.prototype.readFeaturesFromText=function(t,n){return Ee()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromText(Hy(t),this.adaptOptions(n))},e.prototype.readGeometryFromText=function(t,n){return Ee()},e.prototype.readProjection=function(t){return this.readProjectionFromText(Hy(t))},e.prototype.readProjectionFromText=function(t){return this.dataProjection},e.prototype.writeFeature=function(t,n){return this.writeFeatureText(t,this.adaptOptions(n))},e.prototype.writeFeatureText=function(t,n){return Ee()},e.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},e.prototype.writeFeaturesText=function(t,n){return Ee()},e.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},e.prototype.writeGeometryText=function(t,n){return Ee()},e}(fg);function Hy(r){return typeof r=="string"?r:""}var iL=Oot,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)}}(),fd={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},Pot=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Not=/^H.([A-Z]{3}).*?:(.*)/,Uot=/^HFDTE(\d{2})(\d{2})(\d{2})/,Dot=/\r\n|\r|\n/,Qot=function(r){Mot(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ie("EPSG:4326"),n.altitudeMode_=i.altitudeMode?i.altitudeMode:fd.NONE,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.altitudeMode_,a=t.split(Dot),o={},s=[],A=2e3,l=0,u=1,h=-1,c,f;for(c=0,f=a.length;c<f;++c){var d=a[c],v=void 0;if(d.charAt(0)=="B"){if(v=Pot.exec(d),v){var y=parseInt(v[1],10),m=parseInt(v[2],10),w=parseInt(v[3],10),C=parseInt(v[4],10)+parseInt(v[5],10)/6e4;v[6]=="S"&&(C=-C);var B=parseInt(v[7],10)+parseInt(v[8],10)/6e4;if(v[9]=="W"&&(B=-B),s.push(B,C),i!=fd.NONE){var R=void 0;i==fd.GPS?R=parseInt(v[11],10):i==fd.BAROMETRIC?R=parseInt(v[12],10):R=0,s.push(R)}var O=Date.UTC(A,l,u,y,m,w);O<h&&(O=Date.UTC(A,l,u+1,y,m,w)),s.push(O/1e3),h=O}}else d.charAt(0)=="H"&&(v=Uot.exec(d),v?(u=parseInt(v[1],10),l=parseInt(v[2],10)-1,A=2e3+parseInt(v[3],10)):(v=Not.exec(d),v&&(o[v[1]]=v[2].trim())))}if(s.length===0)return null;var I=i==fd.NONE?Wt.XYM:Wt.XYZM,T=new Dr(s,I),L=new nr(bn(T,!1,n));return L.setProperties(o,!0),L},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return i?[i]:[]},e}(iL),Hot=Qot,Got=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)}}(),pl=["http://www.google.com/kml/ext/2.2"],Be=[null,"http://earth.google.com/kml/2.0","http://earth.google.com/kml/2.1","http://earth.google.com/kml/2.2","http://www.opengis.net/kml/2.2"],kot="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",mO={fraction:Ra.FRACTION,pixels:Ra.PIXELS,insetPixels:Ra.PIXELS},$ot=Mt(Be,{ExtendedData:O6,Region:M6,MultiGeometry:ot(F6,"geometry"),LineString:ot(b6,"geometry"),LinearRing:ot(L6,"geometry"),Point:ot(I6,"geometry"),Polygon:ot(R6,"geometry"),Style:ot(sL),StyleMap:Tst,address:ot($t),description:ot($t),name:ot($t),open:ot(Su),phoneNumber:ot($t),styleUrl:ot(C6),visibility:ot(Su)},Mt(pl,{MultiTrack:ot(cst,"geometry"),Track:ot(S6,"geometry")})),Vot=Mt(Be,{ExtendedData:O6,Region:M6,Link:Ust,address:ot($t),description:ot($t),name:ot($t),open:ot(Su),phoneNumber:ot($t),visibility:ot(Su)}),jot=Mt(Be,{href:ot(E6)}),m6=Mt(Be,{LatLonAltBox:Fst,Lod:Rst}),Kot=Mt(Be,["Document","Placemark"]),Yot=Mt(Be,{Document:At(jst),Placemark:At(U6)}),Pf,j0=null,ex,nv,iv,av,Xm,rx=null,aL,nx=null,ix,mh=null,_O=null,ax=null;function Wm(r){return 32/Math.min(r[0],r[1])}function zot(){Pf=[255,255,255,1],j0=new ra({color:Pf}),ex=[20,2],nv=Ra.PIXELS,iv=Ra.PIXELS,av=[64,64],Xm="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",rx=new og({anchor:ex,anchorOrigin:xi.BOTTOM_LEFT,anchorXUnits:nv,anchorYUnits:iv,crossOrigin:"anonymous",rotation:0,scale:Wm(av),size:av,src:Xm}),aL="NO_IMAGE",nx=new Fi({color:Pf,width:1}),ix=new Fi({color:[51,51,51,1],width:2}),mh=new Jh({font:"bold 16px Helvetica",fill:j0,stroke:ix,scale:.8}),_O=new ta({fill:j0,image:rx,text:mh,stroke:nx,zIndex:0}),ax=[_O]}var Gy;function Xot(r){return r}var Wot=function(r){Got(e,r);function e(t){var n=r.call(this)||this,i=t||{};return ax||zot(),n.dataProjection=Ie("EPSG:4326"),n.defaultStyle_=i.defaultStyle?i.defaultStyle:ax,n.extractStyles_=i.extractStyles!==void 0?i.extractStyles:!0,n.writeStyles_=i.writeStyles!==void 0?i.writeStyles:!0,n.sharedStyles_={},n.showPointNames_=i.showPointNames!==void 0?i.showPointNames:!0,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:"anonymous",n.iconUrlFunction_=i.iconUrlFunction?i.iconUrlFunction:Xot,n.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],n}return e.prototype.readDocumentOrFolder_=function(t,n){var i=Mt(Be,{Document:yO(this.readDocumentOrFolder_,this),Folder:yO(this.readDocumentOrFolder_,this),Placemark:me(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),a=Gt([],i,t,n,this);if(a)return a},e.prototype.readPlacemark_=function(t,n){var i=Gt({geometry:null},$ot,t,n,this);if(i){var a=new nr,o=t.getAttribute("id");o!==null&&a.setId(o);var s=n[0],A=i.geometry;if(A&&bn(A,!1,s),a.setGeometry(A),delete i.geometry,this.extractStyles_){var l=i.Style,u=i.styleUrl,h=Zot(l,u,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);a.setStyle(h)}return delete i.Style,a.setProperties(i,!0),a}},e.prototype.readSharedStyle_=function(t,n){var i=t.getAttribute("id");if(i!==null){var a=sL.call(this,t,n);if(a){var o=void 0,s=t.baseURI;if((!s||s=="about:blank")&&(s=window.location.href),s){var A=new URL("#"+i,s);o=A.href}else o="#"+i;this.sharedStyles_[o]=a}}},e.prototype.readSharedStyleMap_=function(t,n){var i=t.getAttribute("id");if(i!==null){var a=T6.call(this,t,n);if(a){var o,s=t.baseURI;if((!s||s=="about:blank")&&(s=window.location.href),s){var A=new URL("#"+i,s);o=A.href}else o="#"+i;this.sharedStyles_[o]=a}}},e.prototype.readFeatureFromNode=function(t,n){if(!fi(Be,t.namespaceURI))return null;var i=this.readPlacemark_(t,[this.getReadOptions(t,n)]);return i||null},e.prototype.readFeaturesFromNode=function(t,n){if(!fi(Be,t.namespaceURI))return[];var i,a=t.localName;if(a=="Document"||a=="Folder")return i=this.readDocumentOrFolder_(t,[this.getReadOptions(t,n)]),i||[];if(a=="Placemark"){var o=this.readPlacemark_(t,[this.getReadOptions(t,n)]);return o?[o]:[]}else if(a=="kml"){i=[];for(var s=t.firstElementChild;s;s=s.nextElementSibling){var A=this.readFeaturesFromNode(s,n);A&&Ur(i,A)}return i}else return[]},e.prototype.readName=function(t){if(t)if(typeof t=="string"){var n=Zs(t);return this.readNameFromDocument(n)}else return qs(t)?this.readNameFromDocument(t):this.readNameFromNode(t);else return},e.prototype.readNameFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE){var i=this.readNameFromNode(n);if(i)return i}},e.prototype.readNameFromNode=function(t){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(fi(Be,n.namespaceURI)&&n.localName=="name")return $t(n);for(var n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(fi(Be,n.namespaceURI)&&(i=="Document"||i=="Folder"||i=="Placemark"||i=="kml")){var a=this.readNameFromNode(n);if(a)return a}}},e.prototype.readNetworkLinks=function(t){var n=[];if(typeof t=="string"){var i=Zs(t);Ur(n,this.readNetworkLinksFromDocument(i))}else qs(t)?Ur(n,this.readNetworkLinksFromDocument(t)):Ur(n,this.readNetworkLinksFromNode(t));return n},e.prototype.readNetworkLinksFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&Ur(n,this.readNetworkLinksFromNode(i));return n},e.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(fi(Be,i.namespaceURI)&&i.localName=="NetworkLink"){var a=Gt({},Vot,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;fi(Be,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&Ur(n,this.readNetworkLinksFromNode(i))}return n},e.prototype.readRegion=function(t){var n=[];if(typeof t=="string"){var i=Zs(t);Ur(n,this.readRegionFromDocument(i))}else qs(t)?Ur(n,this.readRegionFromDocument(t)):Ur(n,this.readRegionFromNode(t));return n},e.prototype.readRegionFromDocument=function(t){for(var n=[],i=t.firstChild;i;i=i.nextSibling)i.nodeType==Node.ELEMENT_NODE&&Ur(n,this.readRegionFromNode(i));return n},e.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(fi(Be,i.namespaceURI)&&i.localName=="Region"){var a=Gt({},m6,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;fi(Be,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&Ur(n,this.readRegionFromNode(i))}return n},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Ge(Be[4],"kml"),a="http://www.w3.org/2000/xmlns/";i.setAttributeNS(a,"xmlns:gx",pl[0]),i.setAttributeNS(a,"xmlns:xsi",jh),i.setAttributeNS(jh,"xsi:schemaLocation",kot);var o={node:i},s={};t.length>1?s.Document=t:t.length==1&&(s.Placemark=t[0]);var A=Kot[i.namespaceURI],l=ao(s,A);return He(o,Yot,ji,l,[n],A,this),i},e}(dg);function qot(r,e){var t=[0,0],n="start",i=r.getImage();if(i){var a=i.getSize();if(a&&a.length==2){var o=i.getScaleArray(),s=i.getAnchor();t[0]=o[0]*(a[0]-s[0]),t[1]=o[1]*(a[1]/2-s[1]),n="left"}}var A=r.getText();A?(A=A.clone(),A.setFont(A.getFont()||mh.getFont()),A.setScale(A.getScale()||mh.getScale()),A.setFill(A.getFill()||mh.getFill()),A.setStroke(A.getStroke()||ix)):A=mh.clone(),A.setText(e),A.setOffsetX(t[0]),A.setOffsetY(t[1]),A.setTextAlign(n);var l=new ta({image:i,text:A});return l}function Zot(r,e,t,n,i){return function(a,o){var s=i,A="",l=[];if(s){var u=a.getGeometry();if(u)if(u instanceof ea)l=u.getGeometriesArrayRecursive().filter(function(v){var y=v.getType();return y===st.POINT||y===st.MULTI_POINT}),s=l.length>0;else{var h=u.getType();s=h===st.POINT||h===st.MULTI_POINT}}s&&(A=a.get("name"),s=s&&!!A,s&&A.search(/&[^&]+;/)>-1&&(Gy||(Gy=document.createElement("textarea")),Gy.innerHTML=A,A=Gy.value));var c=t;if(r?c=r:e&&(c=_6(e,t,n)),s){var f=qot(c[0],A);if(l.length>0){f.setGeometry(new ea(l));var d=new ta({geometry:c[0].getGeometry(),image:null,fill:c[0].getFill(),stroke:c[0].getStroke(),text:null});return[f,d].concat(c.slice(1))}return f}return c}}function _6(r,e,t){return Array.isArray(r)?r:typeof r=="string"?_6(t[r],e,t):e}function h1(r){var e=Ga(r,!1),t=/^\s*#?\s*([0-9A-Fa-f]{8})\s*$/.exec(e);if(t){var n=t[1];return[parseInt(n.substr(6,2),16),parseInt(n.substr(4,2),16),parseInt(n.substr(2,2),16),parseInt(n.substr(0,2),16)/255]}else return}function w6(r){var e=Ga(r,!1),t=[];e=e.replace(/\s*,\s*/g,",");for(var n=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?),([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|,|$)(?:([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)(?:\s+|$))?\s*/i,i;i=n.exec(e);){var a=parseFloat(i[1]),o=parseFloat(i[2]),s=i[3]?parseFloat(i[3]):0;t.push(a,o,s),e=e.substr(i[0].length)}if(e==="")return t}function E6(r){var e=Ga(r,!1).trim(),t=r.baseURI;if((!t||t=="about:blank")&&(t=window.location.href),t){var n=new URL(e,t);return n.href}else return e}function C6(r){var e=Ga(r,!1).trim().replace(/^(?!.*#)/,"#"),t=r.baseURI;if((!t||t=="about:blank")&&(t=window.location.href),t){var n=new URL(e,t);return n.href}else return e}function Jot(r){var e=r.getAttribute("xunits"),t=r.getAttribute("yunits"),n;return e!=="insetPixels"?t!=="insetPixels"?n=xi.BOTTOM_LEFT:n=xi.TOP_LEFT:t!=="insetPixels"?n=xi.BOTTOM_RIGHT:n=xi.TOP_RIGHT,{x:parseFloat(r.getAttribute("x")),xunits:mO[e],y:parseFloat(r.getAttribute("y")),yunits:mO[t],origin:n}}function B6(r){return Lr(r)}var tst=Mt(Be,{Pair:Bst});function T6(r,e){return Gt(void 0,tst,r,e,this)}var est=Mt(Be,{Icon:ot(dst),color:ot(h1),heading:ot(Lr),hotSpot:ot(Jot),scale:ot(B6)});function rst(r,e){var t=Gt({},est,r,e);if(t){var n=e[e.length-1],i="Icon"in t?t.Icon:{},a=!("Icon"in t)||Object.keys(i).length>0,o,s=i.href;s?o=s:a&&(o=Xm);var A,l,u,h=xi.BOTTOM_LEFT,c=t.hotSpot;c?(A=[c.x,c.y],l=c.xunits,u=c.yunits,h=c.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(o)&&(/pushpin/.test(o)?(A=ex,l=nv,u=iv):/arrow-reverse/.test(o)?(A=[54,42],l=nv,u=iv):/paddle/.test(o)&&(A=[32,1],l=nv,u=iv));var f,d=i.x,v=i.y;d!==void 0&&v!==void 0&&(f=[d,v]);var y,m=i.w,w=i.h;m!==void 0&&w!==void 0&&(y=[m,w]);var C,B=t.heading;B!==void 0&&(C=lu(B));var R=t.scale,O=t.color;if(a){o==Xm&&(y=av);var I=new og({anchor:A,anchorOrigin:h,anchorXUnits:l,anchorYUnits:u,crossOrigin:this.crossOrigin_,offset:f,offsetOrigin:xi.BOTTOM_LEFT,rotation:C,scale:R,size:y,src:this.iconUrlFunction_(o),color:O}),T=I.getScaleArray()[0],L=I.getSize();if(L===null){var P=I.getImageState();if(P===ke.IDLE||P===ke.LOADING){var S=function(){var M=I.getImageState();if(!(M===ke.IDLE||M===ke.LOADING)){var D=I.getSize();if(D&&D.length==2){var W=Wm(D);I.setScale(T*W)}I.unlistenImageChange(S)}};I.listenImageChange(S),P===ke.IDLE&&I.load()}}else if(L.length==2){var x=Wm(L);I.setScale(T*x)}n.imageStyle=I}else n.imageStyle=aL}}var nst=Mt(Be,{color:ot(h1),scale:ot(B6)});function ist(r,e){var t=Gt({},nst,r,e);if(t){var n=e[e.length-1],i=new Jh({fill:new ra({color:"color"in t?t.color:Pf}),scale:t.scale});n.textStyle=i}}var ast=Mt(Be,{color:ot(h1),width:ot(Lr)});function ost(r,e){var t=Gt({},ast,r,e);if(t){var n=e[e.length-1],i=new Fi({color:"color"in t?t.color:Pf,width:"width"in t?t.width:1});n.strokeStyle=i}}var sst=Mt(Be,{color:ot(h1),fill:ot(Su),outline:ot(Su)});function Ast(r,e){var t=Gt({},sst,r,e);if(t){var n=e[e.length-1],i=new ra({color:"color"in t?t.color:Pf});n.fillStyle=i;var a=t.fill;a!==void 0&&(n.fill=a);var o=t.outline;o!==void 0&&(n.outline=o)}}var lst=Mt(Be,{coordinates:Fe(w6)});function x6(r,e){return Gt(null,lst,r,e)}function ust(r,e){var t=e[e.length-1],n=t.coordinates,i=Ga(r,!1),a=/^\s*([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s+([+\-]?\d+(?:\.\d*)?(?:e[+\-]?\d*)?)\s*$/i,o=a.exec(i);if(o){var s=parseFloat(o[1]),A=parseFloat(o[2]),l=parseFloat(o[3]);n.push([s,A,l])}else n.push([])}var hst=Mt(pl,{Track:me(S6)});function cst(r,e){var t=Gt([],hst,r,e);if(t)return new Ea(t)}var fst=Mt(Be,{when:Dst},Mt(pl,{coord:ust}));function S6(r,e){var t=Gt({coordinates:[],whens:[]},fst,r,e);if(t){for(var n=[],i=t.coordinates,a=t.whens,o=0,s=Math.min(i.length,a.length);o<s;++o)i[o].length==3&&n.push(i[o][0],i[o][1],i[o][2],a[o]);return new Dr(n,Wt.XYZM)}}var pst=Mt(Be,{href:ot(E6)},Mt(pl,{x:ot(Lr),y:ot(Lr),w:ot(Lr),h:ot(Lr)}));function dst(r,e){var t=Gt({},pst,r,e);return t||null}var vst=Mt(Be,{coordinates:Fe(w6)});function oL(r,e){return Gt(null,vst,r,e)}var c1=Mt(Be,{extrude:ot(Su),tessellate:ot(Su),altitudeMode:ot($t)});function b6(r,e){var t=Gt({},c1,r,e),n=oL(r,e);if(n){var i=new Dr(n,Wt.XYZ);return i.setProperties(t,!0),i}else return}function L6(r,e){var t=Gt({},c1,r,e),n=oL(r,e);if(n){var i=new Cn(n,Wt.XYZ,[n.length]);return i.setProperties(t,!0),i}else return}var gst=Mt(Be,{LineString:me(b6),LinearRing:me(L6),MultiGeometry:me(F6),Point:me(I6),Polygon:me(R6)});function F6(r,e){var t=Gt([],gst,r,e);if(!t)return null;if(t.length===0)return new ea(t);for(var n,i=!0,a=t[0].getType(),o,s=1,A=t.length;s<A;++s)if(o=t[s],o.getType()!=a){i=!1;break}if(i){var l=void 0,u=void 0;if(a==st.POINT){var h=t[0];l=h.getLayout(),u=h.getFlatCoordinates();for(var s=1,A=t.length;s<A;++s)o=t[s],Ur(u,o.getFlatCoordinates());n=new zo(u,l),IE(n,t)}else a==st.LINE_STRING?(n=new Ea(t),IE(n,t)):a==st.POLYGON?(n=new Ca(t),IE(n,t)):a==st.GEOMETRY_COLLECTION?n=new ea(t):_e(!1,37)}else n=new ea(t);return n}function I6(r,e){var t=Gt({},c1,r,e),n=oL(r,e);if(n){var i=new cr(n,Wt.XYZ);return i.setProperties(t,!0),i}else return}var yst=Mt(Be,{innerBoundaryIs:Mst,outerBoundaryIs:Nst});function R6(r,e){var t=Gt({},c1,r,e),n=Gt([null],yst,r,e);if(n&&n[0]){for(var i=n[0],a=[i.length],o=1,s=n.length;o<s;++o)Ur(i,n[o]),a.push(i.length);var A=new Cn(i,Wt.XYZ,a);return A.setProperties(t,!0),A}else return}var mst=Mt(Be,{IconStyle:rst,LabelStyle:ist,LineStyle:ost,PolyStyle:Ast});function sL(r,e){var t=Gt({},mst,r,e,this);if(!t)return null;var n="fillStyle"in t?t.fillStyle:j0,i=t.fill;i!==void 0&&!i&&(n=null);var a;"imageStyle"in t?t.imageStyle!=aL&&(a=t.imageStyle):a=rx;var o="textStyle"in t?t.textStyle:mh,s="strokeStyle"in t?t.strokeStyle:nx,A=t.outline;return A!==void 0&&!A?[new ta({geometry:function(l){var u=l.getGeometry(),h=u.getType();if(h===st.GEOMETRY_COLLECTION){var c=u;return new ea(c.getGeometriesArrayRecursive().filter(function(f){var d=f.getType();return d!==st.POLYGON&&d!==st.MULTI_POLYGON}))}else if(h!==st.POLYGON&&h!==st.MULTI_POLYGON)return u},fill:n,image:a,stroke:s,text:o,zIndex:void 0}),new ta({geometry:function(l){var u=l.getGeometry(),h=u.getType();if(h===st.GEOMETRY_COLLECTION){var c=u;return new ea(c.getGeometriesArrayRecursive().filter(function(f){var d=f.getType();return d===st.POLYGON||d===st.MULTI_POLYGON}))}else if(h===st.POLYGON||h===st.MULTI_POLYGON)return u},fill:n,stroke:null,zIndex:void 0})]:[new ta({fill:n,image:a,stroke:s,text:o,zIndex:void 0})]}function IE(r,e){var t=e.length,n=new Array(e.length),i=new Array(e.length),a=new Array(e.length),o,s,A;o=!1,s=!1,A=!1;for(var l=0;l<t;++l){var u=e[l];n[l]=u.get("extrude"),i[l]=u.get("tessellate"),a[l]=u.get("altitudeMode"),o=o||n[l]!==void 0,s=s||i[l]!==void 0,A=A||a[l]}o&&r.set("extrude",n),s&&r.set("tessellate",i),A&&r.set("altitudeMode",a)}var _st=Mt(Be,{displayName:ot($t),value:ot($t)});function wst(r,e){var t=r.getAttribute("name");eo(_st,r,e);var n=e[e.length-1];t&&n.displayName?n[t]={value:n.value,displayName:n.displayName,toString:function(){return n.value}}:t!==null?n[t]=n.value:n.displayName!==null&&(n[n.displayName]=n.value),delete n.value}var Est=Mt(Be,{Data:wst,SchemaData:Sst});function O6(r,e){eo(Est,r,e)}function M6(r,e){eo(m6,r,e)}var Cst=Mt(Be,{Style:ot(sL),key:ot($t),styleUrl:ot(C6)});function Bst(r,e){var t=Gt({},Cst,r,e,this);if(t){var n=t.key;if(n&&n=="normal"){var i=t.styleUrl;i&&(e[e.length-1]=i);var a=t.Style;a&&(e[e.length-1]=a)}}}function Tst(r,e){var t=T6.call(this,r,e);if(t){var n=e[e.length-1];Array.isArray(t)?n.Style=t:typeof t=="string"?n.styleUrl=t:_e(!1,38)}}var xst=Mt(Be,{SimpleData:bst});function Sst(r,e){eo(xst,r,e)}function bst(r,e){var t=r.getAttribute("name");if(t!==null){var n=$t(r),i=e[e.length-1];i[t]=n}}var Lst=Mt(Be,{altitudeMode:ot($t),minAltitude:ot(Lr),maxAltitude:ot(Lr),north:ot(Lr),south:ot(Lr),east:ot(Lr),west:ot(Lr)});function Fst(r,e){var t=Gt({},Lst,r,e);if(t){var n=e[e.length-1],i=[parseFloat(t.west),parseFloat(t.south),parseFloat(t.east),parseFloat(t.north)];n.extent=i,n.altitudeMode=t.altitudeMode,n.minAltitude=parseFloat(t.minAltitude),n.maxAltitude=parseFloat(t.maxAltitude)}}var Ist=Mt(Be,{minLodPixels:ot(Lr),maxLodPixels:ot(Lr),minFadeExtent:ot(Lr),maxFadeExtent:ot(Lr)});function Rst(r,e){var t=Gt({},Ist,r,e);if(t){var n=e[e.length-1];n.minLodPixels=parseFloat(t.minLodPixels),n.maxLodPixels=parseFloat(t.maxLodPixels),n.minFadeExtent=parseFloat(t.minFadeExtent),n.maxFadeExtent=parseFloat(t.maxFadeExtent)}}var Ost=Mt(Be,{LinearRing:me(x6)});function Mst(r,e){var t=Gt([],Ost,r,e);if(t.length>0){var n=e[e.length-1];n.push.apply(n,t)}}var Pst=Mt(Be,{LinearRing:Fe(x6)});function Nst(r,e){var t=Gt(void 0,Pst,r,e);if(t){var n=e[e.length-1];n[0]=t}}function Ust(r,e){eo(jot,r,e)}function Dst(r,e){var t=e[e.length-1],n=t.whens,i=Ga(r,!1),a=Date.parse(i);n.push(isNaN(a)?0:a)}function f1(r,e){for(var t=_u(e),n=t.length==4?t[3]:1,i=[n*255,t[2],t[1],t[0]],a=0;a<4;++a){var o=Math.floor(i[a]).toString(16);i[a]=o.length==1?"0"+o:o}Ue(r,i.join(""))}function Qst(r,e,t){var n=t[t.length-1],i=n.layout,a=n.stride,o;i==Wt.XY||i==Wt.XYM?o=2:i==Wt.XYZ||i==Wt.XYZM?o=3:_e(!1,34);var s=e.length,A="";if(s>0){A+=e[0];for(var l=1;l<o;++l)A+=","+e[l];for(var u=a;u<s;u+=a){A+=" "+e[u];for(var l=1;l<o;++l)A+=","+e[u+l]}}Ue(r,A)}var K0=Mt(Be,{Data:At(Hst),value:At(kst),displayName:At(Gst)});function Hst(r,e,t){r.setAttribute("name",e.name);var n={node:r},i=e.value;typeof i=="object"?(i!==null&&i.displayName&&He(n,K0,ji,[i.displayName],t,["displayName"]),i!==null&&i.value&&He(n,K0,ji,[i.value],t,["value"])):He(n,K0,ji,[i],t,["value"])}function Gst(r,e){$at(r,e)}function kst(r,e){Ue(r,e)}var $st=Mt(Be,{Placemark:At(U6)}),Vst=function(r,e,t){var n=e[e.length-1].node;return Ge(n.namespaceURI,"Placemark")};function jst(r,e,t){var n={node:r};He(n,$st,Vst,e,t,void 0,this)}var Kst=Rn("Data");function Yst(r,e,t){for(var n={node:r},i=e.names,a=e.values,o=i.length,s=0;s<o;s++)He(n,K0,Kst,[{name:i[s],value:a[s]}],t)}var wO=Mt(Be,["href"],Mt(pl,["x","y","w","h"])),EO=Mt(Be,{href:At(Ue)},Mt(pl,{x:At(Za),y:At(Za),w:At(Za),h:At(Za)})),zst=function(r,e,t){return Ge(pl[0],"gx:"+t)};function Xst(r,e,t){var n={node:r},i=t[t.length-1].node,a=wO[i.namespaceURI],o=ao(e,a);He(n,EO,ji,o,t,a),a=wO[pl[0]],o=ao(e,a),He(n,EO,zst,o,t,a)}var Wst=Mt(Be,["scale","heading","Icon","color","hotSpot"]),qst=Mt(Be,{Icon:At(Xst),color:At(f1),heading:At(Za),hotSpot:At(BAt),scale:At(Q6)});function Zst(r,e,t){var n={node:r},i={},a=e.getSrc(),o=e.getSize(),s=e.getImageSize(),A={href:a};if(o){A.w=o[0],A.h=o[1];var l=e.getAnchor(),u=e.getOrigin();if(u&&s&&u[0]!==0&&u[1]!==o[1]&&(A.x=u[0],A.y=s[1]-(u[1]+o[1])),l&&(l[0]!==o[0]/2||l[1]!==o[1]/2)){var h={x:l[0],xunits:Ra.PIXELS,y:o[1]-l[1],yunits:Ra.PIXELS};i.hotSpot=h}}i.Icon=A;var c=e.getScaleArray()[0],f=o;if(f===null&&(f=av),f.length==2){var d=Wm(f);c=c/d}c!==1&&(i.scale=c);var v=e.getRotation();v!==0&&(i.heading=v);var y=e.getColor();y&&(i.color=y);var m=t[t.length-1].node,w=Wst[m.namespaceURI],C=ao(i,w);He(n,qst,ji,C,t,w)}var Jst=Mt(Be,["color","scale"]),tAt=Mt(Be,{color:At(f1),scale:At(Q6)});function eAt(r,e,t){var n={node:r},i={},a=e.getFill();a&&(i.color=a.getColor());var o=e.getScale();o&&o!==1&&(i.scale=o);var s=t[t.length-1].node,A=Jst[s.namespaceURI],l=ao(i,A);He(n,tAt,ji,l,t,A)}var rAt=Mt(Be,["color","width"]),nAt=Mt(Be,{color:At(f1),width:At(Za)});function iAt(r,e,t){var n={node:r},i={color:e.getColor(),width:Number(e.getWidth())||1},a=t[t.length-1].node,o=rAt[a.namespaceURI],s=ao(i,o);He(n,nAt,ji,s,t,o)}var aAt={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},P6=function(r,e,t){if(r){var n=e[e.length-1].node;return Ge(n.namespaceURI,aAt[r.getType()])}},oAt=Rn("Point"),sAt=Rn("LineString"),AAt=Rn("LinearRing"),lAt=Rn("Polygon"),uAt=Mt(Be,{LineString:At(Nf),Point:At(Nf),Polygon:At(D6),GeometryCollection:At(N6)});function N6(r,e,t){var n={node:r},i=e.getType(),a=[],o;i===st.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach(function(s){var A=s.getType();A===st.MULTI_POINT?a=a.concat(s.getPoints()):A===st.MULTI_LINE_STRING?a=a.concat(s.getLineStrings()):A===st.MULTI_POLYGON?a=a.concat(s.getPolygons()):A===st.POINT||A===st.LINE_STRING||A===st.POLYGON?a.push(s):_e(!1,39)}),o=P6):i===st.MULTI_POINT?(a=e.getPoints(),o=oAt):i===st.MULTI_LINE_STRING?(a=e.getLineStrings(),o=sAt):i===st.MULTI_POLYGON?(a=e.getPolygons(),o=lAt):_e(!1,39),He(n,uAt,o,a,t)}var hAt=Mt(Be,{LinearRing:At(Nf)});function CO(r,e,t){var n={node:r};He(n,hAt,AAt,[e],t)}var RE=Mt(Be,{ExtendedData:At(Yst),MultiGeometry:At(N6),LineString:At(Nf),LinearRing:At(Nf),Point:At(Nf),Polygon:At(D6),Style:At(CAt),address:At(Ue),description:At(Ue),name:At(Ue),open:At(Jf),phoneNumber:At(Ue),styleUrl:At(Ue),visibility:At(Jf)}),cAt=Mt(Be,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),fAt=Rn("ExtendedData");function U6(r,e,t){var n={node:r};e.getId()&&r.setAttribute("id",e.getId());var i=e.getProperties(),a={address:1,description:1,name:1,open:1,phoneNumber:1,styleUrl:1,visibility:1};a[e.getGeometryName()]=1;var o=Object.keys(i||{}).sort().filter(function(R){return!a[R]}),s=e.getStyleFunction();if(s){var A=s(e,0);if(A){var l=Array.isArray(A)?A:[A],u=l;if(e.getGeometry()&&(u=l.filter(function(R){var O=R.getGeometryFunction()(e);if(O){var I=O.getType();return I===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===st.POINT||L===st.MULTI_POINT}).length:I===st.POINT||I===st.MULTI_POINT}})),this.writeStyles_){var h=l,c=l;e.getGeometry()&&(h=l.filter(function(R){var O=R.getGeometryFunction()(e);if(O){var I=O.getType();return I===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===st.LINE_STRING||L===st.MULTI_LINE_STRING}).length:I===st.LINE_STRING||I===st.MULTI_LINE_STRING}}),c=l.filter(function(R){var O=R.getGeometryFunction()(e);if(O){var I=O.getType();return I===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===st.POLYGON||L===st.MULTI_POLYGON}).length:I===st.POLYGON||I===st.MULTI_POLYGON}})),i.Style={pointStyles:u,lineStyles:h,polyStyles:c}}if(u.length&&i.name===void 0){var f=u[0].getText();f&&(i.name=f.getText())}}}var d=t[t.length-1].node,v=cAt[d.namespaceURI],y=ao(i,v);if(He(n,RE,ji,y,t,v),o.length>0){var m=ao(i,o),w={names:o,values:m};He(n,RE,fAt,[w],t)}var C=t[0],B=e.getGeometry();B&&(B=bn(B,!0,C)),He(n,RE,P6,[B],t)}var pAt=Mt(Be,["extrude","tessellate","altitudeMode","coordinates"]),dAt=Mt(Be,{extrude:At(Jf),tessellate:At(Jf),altitudeMode:At(Ue),coordinates:At(Qst)});function Nf(r,e,t){var n=e.getFlatCoordinates(),i={node:r};i.layout=e.getLayout(),i.stride=e.getStride();var a=e.getProperties();a.coordinates=n;var o=t[t.length-1].node,s=pAt[o.namespaceURI],A=ao(a,s);He(i,dAt,ji,A,t,s)}var vAt=Mt(Be,["color","fill","outline"]),BO=Mt(Be,{outerBoundaryIs:At(CO),innerBoundaryIs:At(CO)}),gAt=Rn("innerBoundaryIs"),yAt=Rn("outerBoundaryIs");function D6(r,e,t){var n=e.getLinearRings(),i=n.shift(),a={node:r};He(a,BO,gAt,n,t),He(a,BO,yAt,[i],t)}var mAt=Mt(Be,{color:At(f1),fill:At(Jf),outline:At(Jf)});function _At(r,e,t){var n={node:r},i=e.getFill(),a=e.getStroke(),o={color:i?i.getColor():void 0,fill:i?void 0:!1,outline:a?void 0:!1},s=t[t.length-1].node,A=vAt[s.namespaceURI],l=ao(o,A);He(n,mAt,ji,l,t,A)}function Q6(r,e){Za(r,Math.round(e*1e6)/1e6)}var wAt=Mt(Be,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),EAt=Mt(Be,{IconStyle:At(Zst),LabelStyle:At(eAt),LineStyle:At(iAt),PolyStyle:At(_At)});function CAt(r,e,t){var n={node:r},i={};if(e.pointStyles.length){var a=e.pointStyles[0].getText();a&&(i.LabelStyle=a);var o=e.pointStyles[0].getImage();o&&typeof o.getSrc=="function"&&(i.IconStyle=o)}if(e.lineStyles.length){var s=e.lineStyles[0].getStroke();s&&(i.LineStyle=s)}if(e.polyStyles.length){var s=e.polyStyles[0].getStroke();s&&!i.LineStyle&&(i.LineStyle=s),i.PolyStyle=e.polyStyles[0]}var A=t[t.length-1].node,l=wAt[A.namespaceURI],u=ao(i,l);He(n,EAt,ji,u,t,l)}function BAt(r,e){r.setAttribute("x",String(e.x)),r.setAttribute("y",String(e.y)),r.setAttribute("xunits",e.xunits),r.setAttribute("yunits",e.yunits)}var TAt=Wot,AL={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */AL.read=function(r,e,t,n,i){var a,o,s=i*8-n-1,A=(1<<s)-1,l=A>>1,u=-7,h=t?i-1:0,c=t?-1:1,f=r[e+h];for(h+=c,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=a*256+r[e+h],h+=c,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=o*256+r[e+h],h+=c,u-=8);if(a===0)a=1-l;else{if(a===A)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-l}return(f?-1:1)*o*Math.pow(2,a-n)};AL.write=function(r,e,t,n,i,a){var o,s,A,l=a*8-i-1,u=(1<<l)-1,h=u>>1,c=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,d=n?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(A=Math.pow(2,-o))<1&&(o--,A*=2),o+h>=1?e+=c/A:e+=c*Math.pow(2,1-h),e*A>=2&&(o++,A/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(e*A-1)*Math.pow(2,i),o=o+h):(s=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;r[t+f]=s&255,f+=d,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;r[t+f]=o&255,f+=d,o/=256,l-=8);r[t+f-d]|=v*128};var xAt=Mr,ky=AL;function Mr(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}Mr.Varint=0;Mr.Fixed64=1;Mr.Bytes=2;Mr.Fixed32=5;var ox=(1<<16)*(1<<16),TO=1/ox,SAt=12,H6=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Mr.prototype={destroy:function(){this.buf=null},readFields:function(r,e,t){for(t=t||this.length;this.pos<t;){var n=this.readVarint(),i=n>>3,a=this.pos;this.type=n&7,r(i,e,this),this.pos===a&&this.skip(n)}return e},readMessage:function(r,e){return this.readFields(r,e,this.readVarint()+this.pos)},readFixed32:function(){var r=$y(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=SO(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=$y(this.buf,this.pos)+$y(this.buf,this.pos+4)*ox;return this.pos+=8,r},readSFixed64:function(){var r=$y(this.buf,this.pos)+SO(this.buf,this.pos+4)*ox;return this.pos+=8,r},readFloat:function(){var r=ky.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=ky.read(this.buf,this.pos,!0,52,8);return this.pos+=8,r},readVarint:function(r){var e=this.buf,t,n;return n=e[this.pos++],t=n&127,n<128||(n=e[this.pos++],t|=(n&127)<<7,n<128)||(n=e[this.pos++],t|=(n&127)<<14,n<128)||(n=e[this.pos++],t|=(n&127)<<21,n<128)?t:(n=e[this.pos],t|=(n&15)<<28,bAt(t,r,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var r=this.readVarint();return r%2===1?(r+1)/-2:r/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var r=this.readVarint()+this.pos,e=this.pos;return this.pos=r,r-e>=SAt&&H6?kAt(this.buf,e,r):GAt(this.buf,e,r)},readBytes:function(){var r=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,r);return this.pos=r,e},readPackedVarint:function(r,e){if(this.type!==Mr.Bytes)return r.push(this.readVarint(e));var t=OA(this);for(r=r||[];this.pos<t;)r.push(this.readVarint(e));return r},readPackedSVarint:function(r){if(this.type!==Mr.Bytes)return r.push(this.readSVarint());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readSVarint());return r},readPackedBoolean:function(r){if(this.type!==Mr.Bytes)return r.push(this.readBoolean());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readBoolean());return r},readPackedFloat:function(r){if(this.type!==Mr.Bytes)return r.push(this.readFloat());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readFloat());return r},readPackedDouble:function(r){if(this.type!==Mr.Bytes)return r.push(this.readDouble());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readDouble());return r},readPackedFixed32:function(r){if(this.type!==Mr.Bytes)return r.push(this.readFixed32());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readFixed32());return r},readPackedSFixed32:function(r){if(this.type!==Mr.Bytes)return r.push(this.readSFixed32());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed32());return r},readPackedFixed64:function(r){if(this.type!==Mr.Bytes)return r.push(this.readFixed64());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readFixed64());return r},readPackedSFixed64:function(r){if(this.type!==Mr.Bytes)return r.push(this.readSFixed64());var e=OA(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed64());return r},skip:function(r){var e=r&7;if(e===Mr.Varint)for(;this.buf[this.pos++]>127;);else if(e===Mr.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Mr.Fixed32)this.pos+=4;else if(e===Mr.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+e)},writeTag:function(r,e){this.writeVarint(r<<3|e)},realloc:function(r){for(var e=this.length||16;e<this.pos+r;)e*=2;if(e!==this.length){var t=new Uint8Array(e);t.set(this.buf),this.buf=t,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(r){this.realloc(4),kc(this.buf,r,this.pos),this.pos+=4},writeSFixed32:function(r){this.realloc(4),kc(this.buf,r,this.pos),this.pos+=4},writeFixed64:function(r){this.realloc(8),kc(this.buf,r&-1,this.pos),kc(this.buf,Math.floor(r*TO),this.pos+4),this.pos+=8},writeSFixed64:function(r){this.realloc(8),kc(this.buf,r&-1,this.pos),kc(this.buf,Math.floor(r*TO),this.pos+4),this.pos+=8},writeVarint:function(r){if(r=+r||0,r>268435455||r<0){LAt(r,this);return}this.realloc(4),this.buf[this.pos++]=r&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=(r>>>=7)&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=(r>>>=7)&127|(r>127?128:0),!(r<=127)&&(this.buf[this.pos++]=r>>>7&127)))},writeSVarint:function(r){this.writeVarint(r<0?-r*2-1:r*2)},writeBoolean:function(r){this.writeVarint(Boolean(r))},writeString:function(r){r=String(r),this.realloc(r.length*4),this.pos++;var e=this.pos;this.pos=$At(this.buf,r,this.pos);var t=this.pos-e;t>=128&&xO(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(r){this.realloc(4),ky.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),ky.write(this.buf,r,this.pos,!0,52,8),this.pos+=8},writeBytes:function(r){var e=r.length;this.writeVarint(e),this.realloc(e);for(var t=0;t<e;t++)this.buf[this.pos++]=r[t]},writeRawMessage:function(r,e){this.pos++;var t=this.pos;r(e,this);var n=this.pos-t;n>=128&&xO(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeMessage:function(r,e,t){this.writeTag(r,Mr.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,RAt,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,OAt,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,NAt,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,MAt,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,PAt,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,UAt,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,DAt,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,QAt,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,HAt,e)},writeBytesField:function(r,e){this.writeTag(r,Mr.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,Mr.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,Mr.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,Mr.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,Mr.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,Mr.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,Mr.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,Mr.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,Mr.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,Mr.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};function bAt(r,e,t){var n=t.buf,i,a;if(a=n[t.pos++],i=(a&112)>>4,a<128||(a=n[t.pos++],i|=(a&127)<<3,a<128)||(a=n[t.pos++],i|=(a&127)<<10,a<128)||(a=n[t.pos++],i|=(a&127)<<17,a<128)||(a=n[t.pos++],i|=(a&127)<<24,a<128)||(a=n[t.pos++],i|=(a&1)<<31,a<128))return Gc(r,i,e);throw new Error("Expected varint not more than 10 bytes")}function OA(r){return r.type===Mr.Bytes?r.readVarint()+r.pos:r.pos+1}function Gc(r,e,t){return t?e*4294967296+(r>>>0):(e>>>0)*4294967296+(r>>>0)}function LAt(r,e){var t,n;if(r>=0?(t=r%4294967296|0,n=r/4294967296|0):(t=~(-r%4294967296),n=~(-r/4294967296),t^4294967295?t=t+1|0:(t=0,n=n+1|0)),r>=18446744073709552e3||r<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),FAt(t,n,e),IAt(n,e)}function FAt(r,e,t){t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos++]=r&127|128,r>>>=7,t.buf[t.pos]=r&127}function IAt(r,e){var t=(r&7)<<4;e.buf[e.pos++]|=t|((r>>>=3)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127|((r>>>=7)?128:0),r&&(e.buf[e.pos++]=r&127)))))}function xO(r,e,t){var n=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(Math.LN2*7));t.realloc(n);for(var i=t.pos-1;i>=r;i--)t.buf[i+n]=t.buf[i]}function RAt(r,e){for(var t=0;t<r.length;t++)e.writeVarint(r[t])}function OAt(r,e){for(var t=0;t<r.length;t++)e.writeSVarint(r[t])}function MAt(r,e){for(var t=0;t<r.length;t++)e.writeFloat(r[t])}function PAt(r,e){for(var t=0;t<r.length;t++)e.writeDouble(r[t])}function NAt(r,e){for(var t=0;t<r.length;t++)e.writeBoolean(r[t])}function UAt(r,e){for(var t=0;t<r.length;t++)e.writeFixed32(r[t])}function DAt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed32(r[t])}function QAt(r,e){for(var t=0;t<r.length;t++)e.writeFixed64(r[t])}function HAt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed64(r[t])}function $y(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+r[e+3]*16777216}function kc(r,e,t){r[t]=e,r[t+1]=e>>>8,r[t+2]=e>>>16,r[t+3]=e>>>24}function SO(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function GAt(r,e,t){for(var n="",i=e;i<t;){var a=r[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s>t)break;var A,l,u;s===1?a<128&&(o=a):s===2?(A=r[i+1],(A&192)===128&&(o=(a&31)<<6|A&63,o<=127&&(o=null))):s===3?(A=r[i+1],l=r[i+2],(A&192)===128&&(l&192)===128&&(o=(a&15)<<12|(A&63)<<6|l&63,(o<=2047||o>=55296&&o<=57343)&&(o=null))):s===4&&(A=r[i+1],l=r[i+2],u=r[i+3],(A&192)===128&&(l&192)===128&&(u&192)===128&&(o=(a&15)<<18|(A&63)<<12|(l&63)<<6|u&63,(o<=65535||o>=1114112)&&(o=null))),o===null?(o=65533,s=1):o>65535&&(o-=65536,n+=String.fromCharCode(o>>>10&1023|55296),o=56320|o&1023),n+=String.fromCharCode(o),i+=s}return n}function kAt(r,e,t){return H6.decode(r.subarray(e,t))}function $At(r,e,t){for(var n=0,i,a;n<e.length;n++){if(i=e.charCodeAt(n),i>55295&&i<57344)if(a)if(i<56320){r[t++]=239,r[t++]=191,r[t++]=189,a=i;continue}else i=a-55296<<10|i-56320|65536,a=null;else{i>56319||n+1===e.length?(r[t++]=239,r[t++]=191,r[t++]=189):a=i;continue}else a&&(r[t++]=239,r[t++]=191,r[t++]=189,a=null);i<128?r[t++]=i:(i<2048?r[t++]=i>>6|192:(i<65536?r[t++]=i>>12|224:(r[t++]=i>>18|240,r[t++]=i>>12&63|128),r[t++]=i>>6&63|128),r[t++]=i&63|128)}return t}var bO=Jn(),Hv=function(){function r(e,t,n,i,a){this.styleFunction,this.extent_,this.id_=a,this.type_=e,this.flatCoordinates_=t,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=n,this.properties_=i}return r.prototype.get=function(e){return this.properties_[e]},r.prototype.getExtent=function(){return this.extent_||(this.extent_=this.type_===st.POINT?Bh(this.flatCoordinates_):M_(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},r.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var e=wa(this.getExtent());this.flatInteriorPoints_=hb(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_},r.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var e=gU(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=W2(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_},r.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=Em(this.flatCoordinates_,0,this.flatCoordinates_.length,2,.5)),this.flatMidpoints_},r.prototype.getFlatMidpoints=function(){if(!this.flatMidpoints_){this.flatMidpoints_=[];for(var e=this.flatCoordinates_,t=0,n=this.ends_,i=0,a=n.length;i<a;++i){var o=n[i],s=Em(e,t,o,2,.5);Ur(this.flatMidpoints_,s),t=o}}return this.flatMidpoints_},r.prototype.getId=function(){return this.id_},r.prototype.getOrientedFlatCoordinates=function(){return this.flatCoordinates_},r.prototype.getGeometry=function(){return this},r.prototype.getSimplifiedGeometry=function(e){return this},r.prototype.simplifyTransformed=function(e,t){return this},r.prototype.getProperties=function(){return this.properties_},r.prototype.getStride=function(){return 2},r.prototype.getStyleFunction=function(){return this.styleFunction},r.prototype.getType=function(){return this.type_},r.prototype.transform=function(e){e=Ie(e);var t=e.getExtent(),n=e.getWorldExtent();if(t&&n){var i=ei(n)/ei(t);Da(bO,n[0],n[3],i,-i,0,0,0),hu(this.flatCoordinates_,0,this.flatCoordinates_.length,2,bO,this.flatCoordinates_)}},r.prototype.getEnds=function(){return this.ends_},r}();Hv.prototype.getEndss=Hv.prototype.getEnds;Hv.prototype.getFlatCoordinates=Hv.prototype.getOrientedFlatCoordinates;var LO=Hv,VAt=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)}}(),jAt=function(r){VAt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=new ul({code:"",units:Ma.TILE_PIXELS}),n.featureClass_=i.featureClass?i.featureClass:LO,n.geometryName_=i.geometryName,n.layerName_=i.layerName?i.layerName:"layer",n.layers_=i.layers?i.layers:null,n.idProperty_=i.idProperty,n.supportedMediaTypes=["application/vnd.mapbox-vector-tile","application/x-protobuf"],n}return e.prototype.readRawGeometry_=function(t,n,i,a){t.pos=n.geometry;for(var o=t.readVarint()+t.pos,s=1,A=0,l=0,u=0,h=0,c=0;t.pos<o;){if(!A){var f=t.readVarint();s=f&7,A=f>>3}A--,s===1||s===2?(l+=t.readSVarint(),u+=t.readSVarint(),s===1&&h>c&&(a.push(h),c=h),i.push(l,u),h+=2):s===7?h>c&&(i.push(i[c],i[c+1]),h+=2):_e(!1,59)}h>c&&(a.push(h),c=h)},e.prototype.createFeature_=function(t,n,i){var a=n.type;if(a===0)return null;var o,s=n.properties,A;this.idProperty_?(A=s[this.idProperty_],delete s[this.idProperty_]):A=n.id,s[this.layerName_]=n.layer.name;var l=[],u=[];this.readRawGeometry_(t,n,l,u);var h=WAt(a,u.length);if(this.featureClass_===LO)o=new this.featureClass_(h,l,u,s,A),o.transform(i.dataProjection);else{var c=void 0;if(h==st.POLYGON){var f=jV(l,u);c=f.length>1?new Ca(l,Wt.XY,f):new Cn(l,Wt.XY,u)}else c=h===st.POINT?new cr(l,Wt.XY):h===st.LINE_STRING?new Dr(l,Wt.XY):h===st.POLYGON?new Cn(l,Wt.XY,u):h===st.MULTI_POINT?new zo(l,Wt.XY):h===st.MULTI_LINE_STRING?new Ea(l,Wt.XY,u):null;var d=this.featureClass_;o=new d,this.geometryName_&&o.setGeometryName(this.geometryName_);var v=bn(c,!1,i);o.setGeometry(v),A!==void 0&&o.setId(A),o.setProperties(s,!0)}return o},e.prototype.getType=function(){return vs.ARRAY_BUFFER},e.prototype.readFeatures=function(t,n){var i=this.layers_,a=this.adaptOptions(n),o=Ie(a.dataProjection);o.setWorldExtent(a.extent),a.dataProjection=o;var s=new xAt(t),A=s.readFields(KAt,{}),l=[];for(var u in A)if(!(i&&i.indexOf(u)==-1)){var h=A[u],c=h?[0,0,h.extent,h.extent]:null;o.setExtent(c);for(var f=0,d=h.length;f<d;++f){var v=XAt(s,h,f),y=this.createFeature_(s,v,a);y!==null&&l.push(y)}}return l},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(fg);function KAt(r,e,t){if(r===3){var n={keys:[],values:[],features:[]},i=t.readVarint()+t.pos;t.readFields(YAt,n,i),n.length=n.features.length,n.length&&(e[n.name]=n)}}function YAt(r,e,t){if(r===15)e.version=t.readVarint();else if(r===1)e.name=t.readString();else if(r===5)e.extent=t.readVarint();else if(r===2)e.features.push(t.pos);else if(r===3)e.keys.push(t.readString());else if(r===4){for(var n=null,i=t.readVarint()+t.pos;t.pos<i;)r=t.readVarint()>>3,n=r===1?t.readString():r===2?t.readFloat():r===3?t.readDouble():r===4?t.readVarint64():r===5?t.readVarint():r===6?t.readSVarint():r===7?t.readBoolean():null;e.values.push(n)}}function zAt(r,e,t){if(r==1)e.id=t.readVarint();else if(r==2)for(var n=t.readVarint()+t.pos;t.pos<n;){var i=e.layer.keys[t.readVarint()],a=e.layer.values[t.readVarint()];e.properties[i]=a}else r==3?e.type=t.readVarint():r==4&&(e.geometry=t.pos)}function XAt(r,e,t){r.pos=e.features[t];var n=r.readVarint()+r.pos,i={layer:e,type:0,properties:{}};return r.readFields(zAt,i,n),i}function WAt(r,e){var t;return r===1?t=e===1?st.POINT:st.MULTI_POINT:r===2?t=e===1?st.LINE_STRING:st.MULTI_LINE_STRING:r===3&&(t=st.POLYGON),t}var qAt=jAt,ZAt=function(){function r(){}return r.prototype.read=function(e){if(e)if(typeof e=="string"){var t=Zs(e);return this.readFromDocument(t)}else return qs(e)?this.readFromDocument(e):this.readFromNode(e);else return null},r.prototype.readFromDocument=function(e){for(var t=e.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readFromNode(t);return null},r.prototype.readFromNode=function(e){},r}(),lL=ZAt,JAt="http://www.w3.org/1999/xlink";function yp(r){return r.getAttributeNS(JAt,"href")}var tlt=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)}}(),uo=[null,"http://www.opengis.net/ows/1.1"],elt=Mt(uo,{ServiceIdentification:ot(xlt),ServiceProvider:ot(blt),OperationsMetadata:ot(Blt)}),rlt=function(r){tlt(e,r);function e(){return r.call(this)||this}return e.prototype.readFromNode=function(t){var n=Gt({},elt,t,[]);return n||null},e}(lL),nlt=Mt(uo,{DeliveryPoint:ot($t),City:ot($t),AdministrativeArea:ot($t),PostalCode:ot($t),Country:ot($t),ElectronicMailAddress:ot($t)}),ilt=Mt(uo,{Value:cn(Llt)}),alt=Mt(uo,{AllowedValues:ot(glt)}),olt=Mt(uo,{Phone:ot(Tlt),Address:ot(vlt)}),slt=Mt(uo,{HTTP:ot(Elt)}),Alt=Mt(uo,{Get:cn(wlt),Post:void 0}),llt=Mt(uo,{DCP:ot(_lt)}),ult=Mt(uo,{Operation:Clt}),hlt=Mt(uo,{Voice:ot($t),Facsimile:ot($t)}),clt=Mt(uo,{Constraint:cn(ylt)}),flt=Mt(uo,{IndividualName:ot($t),PositionName:ot($t),ContactInfo:ot(mlt)}),plt=Mt(uo,{Abstract:ot($t),AccessConstraints:ot($t),Fees:ot($t),Title:ot($t),ServiceTypeVersion:ot($t),ServiceType:ot($t)}),dlt=Mt(uo,{ProviderName:ot($t),ProviderSite:ot(yp),ServiceContact:ot(Slt)});function vlt(r,e){return Gt({},nlt,r,e)}function glt(r,e){return Gt({},ilt,r,e)}function ylt(r,e){var t=r.getAttribute("name");if(t)return Gt({name:t},alt,r,e)}function mlt(r,e){return Gt({},olt,r,e)}function _lt(r,e){return Gt({},slt,r,e)}function wlt(r,e){var t=yp(r);if(t)return Gt({href:t},clt,r,e)}function Elt(r,e){return Gt({},Alt,r,e)}function Clt(r,e){var t=r.getAttribute("name"),n=Gt({},llt,r,e);if(n){var i=e[e.length-1];i[t]=n}}function Blt(r,e){return Gt({},ult,r,e)}function Tlt(r,e){return Gt({},hlt,r,e)}function xlt(r,e){return Gt({},plt,r,e)}function Slt(r,e){return Gt({},flt,r,e)}function blt(r,e){return Gt({},dlt,r,e)}function Llt(r,e){return $t(r)}var G6=rlt;function FO(r,e,t,n,i,a){var o,s;i!==void 0?(o=i,s=a!==void 0?a:0):(o=[],s=0);for(var A=e;A<t;){var l=r[A++];o[s++]=r[A++],o[s++]=l;for(var u=2;u<n;++u)o[s++]=r[A++]}return o.length=s,o}var Flt=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)}}(),Ilt=function(r){Flt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ie("EPSG:4326"),n.factor_=i.factor?i.factor:1e5,n.geometryLayout_=i.geometryLayout?i.geometryLayout:Wt.XY,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new nr(i)},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return[i]},e.prototype.readGeometryFromText=function(t,n){var i=dB(this.geometryLayout_),a=Olt(t,i,this.factor_);FO(a,0,a.length,i,a);var o=VA(a,0,a.length,i),s=new Dr(o,this.geometryLayout_);return bn(s,!1,this.adaptOptions(n))},e.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(_e(!1,40),"")},e.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},e.prototype.writeGeometryText=function(t,n){t=bn(t,!0,this.adaptOptions(n));var i=t.getFlatCoordinates(),a=t.getStride();return FO(i,0,i.length,a,i),Rlt(i,a,this.factor_)},e}(iL);function Rlt(r,e,t){var n=t||1e5,i,a=new Array(e);for(i=0;i<e;++i)a[i]=0;for(var o=0,s=r.length;o<s;)for(i=0;i<e;++i,++o){var A=r[o],l=A-a[i];a[i]=A,r[o]=l}return Mlt(r,n)}function Olt(r,e,t){var n=t||1e5,i,a=new Array(e);for(i=0;i<e;++i)a[i]=0;for(var o=Plt(r,n),s=0,A=o.length;s<A;)for(i=0;i<e;++i,++s)a[i]+=o[s],o[s]=a[i];return o}function Mlt(r,e){for(var t=e||1e5,n=0,i=r.length;n<i;++n)r[n]=Math.round(r[n]*t);return Nlt(r)}function Plt(r,e){for(var t=e||1e5,n=Ult(r),i=0,a=n.length;i<a;++i)n[i]/=t;return n}function Nlt(r){for(var e=0,t=r.length;e<t;++e){var n=r[e];r[e]=n<0?~(n<<1):n<<1}return Dlt(r)}function Ult(r){for(var e=Qlt(r),t=0,n=e.length;t<n;++t){var i=e[t];e[t]=i&1?~(i>>1):i>>1}return e}function Dlt(r){for(var e="",t=0,n=r.length;t<n;++t)e+=Hlt(r[t]);return e}function Qlt(r){for(var e=[],t=0,n=0,i=0,a=r.length;i<a;++i){var o=r.charCodeAt(i)-63;t|=(o&31)<<n,o<32?(e.push(t),t=0,n=0):n+=5}return e}function Hlt(r){for(var e,t="";r>=32;)e=(32|r&31)+63,t+=String.fromCharCode(e),r>>=5;return e=r+63,t+=String.fromCharCode(e),t}var Glt=Ilt,klt=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)}}(),$lt=function(r){klt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.layerName_=i.layerName,n.layers_=i.layers?i.layers:null,n.dataProjection=Ie(i.dataProjection?i.dataProjection:"EPSG:4326"),n}return e.prototype.readFeaturesFromObject=function(t,n){if(t.type=="Topology"){var i=t,a=void 0,o=null,s=null;i.transform&&(a=i.transform,o=a.scale,s=a.translate);var A=i.arcs;a&&Zlt(A,o,s);var l=[],u=i.objects,h=this.layerName_,c=void 0;for(var f in u)this.layers_&&this.layers_.indexOf(f)==-1||(u[f].type==="GeometryCollection"?(c=u[f],l.push.apply(l,qlt(c,A,o,s,h,f,n))):(c=u[f],l.push(k6(c,A,o,s,h,f,n))));return l}else return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(Xb),Vlt={Point:jlt,LineString:Ylt,Polygon:Xlt,MultiPoint:Klt,MultiLineString:zlt,MultiPolygon:Wlt};function p1(r,e){for(var t=[],n,i=0,a=r.length;i<a;++i)if(n=r[i],i>0&&t.pop(),n>=0)for(var o=e[n],s=0,A=o.length;s<A;++s)t.push(o[s].slice(0));else for(var o=e[~n],s=o.length-1;s>=0;--s)t.push(o[s].slice(0));return t}function jlt(r,e,t){var n=r.coordinates;return e&&t&&uL(n,e,t),new cr(n)}function Klt(r,e,t){var n=r.coordinates;if(e&&t)for(var i=0,a=n.length;i<a;++i)uL(n[i],e,t);return new zo(n)}function Ylt(r,e){var t=p1(r.arcs,e);return new Dr(t)}function zlt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=p1(r.arcs[n],e);return new Ea(t)}function Xlt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=p1(r.arcs[n],e);return new Cn(t)}function Wlt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n){for(var a=r.arcs[n],o=[],s=0,A=a.length;s<A;++s)o[s]=p1(a[s],e);t[n]=o}return new Ca(t)}function qlt(r,e,t,n,i,a,o){for(var s=r.geometries,A=[],l=0,u=s.length;l<u;++l)A[l]=k6(s[l],e,t,n,i,a,o);return A}function k6(r,e,t,n,i,a,o){var s=null,A=r.type;if(A){var l=Vlt[A];A==="Point"||A==="MultiPoint"?s=l(r,t,n):s=l(r,e),s=bn(s,!1,o)}var u=new nr({geometry:s});r.id!==void 0&&u.setId(r.id);var h=r.properties;return i&&(h||(h={}),h[i]=a),h&&u.setProperties(h,!0),u}function Zlt(r,e,t){for(var n=0,i=r.length;n<i;++n)Jlt(r[n],e,t)}function Jlt(r,e,t){for(var n=0,i=0,a=0,o=r.length;a<o;++a){var s=r[a];n+=s[0],i+=s[1],s[0]=n,s[1]=i,uL(s,e,t)}}function uL(r,e,t){r[0]=r[0]*e[0]+t[0],r[1]=r[1]*e[1]+t[1]}var tut=$lt,eut=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)}}(),Qr=function(r){eut(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.schemaLocation=i.schemaLocation?i.schemaLocation:n.namespace+" http://schemas.opengis.net/gml/3.2.1/gml.xsd",n}return e}(Je);Qr.prototype.namespace="http://www.opengis.net/gml/3.2";Qr.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Fe(Je.prototype.readFlatPos),posList:Fe(Je.prototype.readFlatPosList),coordinates:Fe(gp.prototype.readFlatCoordinates)}};Qr.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:Je.prototype.interiorParser,exterior:Je.prototype.exteriorParser}};Qr.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Fe(sr.prototype.readPoint),MultiPoint:Fe(sr.prototype.readMultiPoint),LineString:Fe(sr.prototype.readLineString),MultiLineString:Fe(sr.prototype.readMultiLineString),LinearRing:Fe(sr.prototype.readLinearRing),Polygon:Fe(sr.prototype.readPolygon),MultiPolygon:Fe(sr.prototype.readMultiPolygon),Surface:Fe(Qr.prototype.readSurface),MultiSurface:Fe(Je.prototype.readMultiSurface),Curve:Fe(Qr.prototype.readCurve),MultiCurve:Fe(Je.prototype.readMultiCurve),Envelope:Fe(Qr.prototype.readEnvelope)}};Qr.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:me(Je.prototype.curveMemberParser),curveMembers:me(Je.prototype.curveMemberParser)}};Qr.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:me(Je.prototype.surfaceMemberParser),surfaceMembers:me(Je.prototype.surfaceMemberParser)}};Qr.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:me(sr.prototype.readLineString),Curve:me(Je.prototype.readCurve)}};Qr.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:me(sr.prototype.readPolygon),Surface:me(Je.prototype.readSurface)}};Qr.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Fe(Je.prototype.readPatch)}};Qr.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:Fe(Je.prototype.readSegment)}};Qr.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:me(Je.prototype.readFlatPosList),upperCorner:me(Je.prototype.readFlatPosList)}};Qr.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Fe(Je.prototype.readPolygonPatch)}};Qr.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Fe(Je.prototype.readLineStringSegment)}};Qr.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:me(sr.prototype.pointMemberParser),pointMembers:me(sr.prototype.pointMemberParser)}};Qr.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:me(sr.prototype.lineStringMemberParser),lineStringMembers:me(sr.prototype.lineStringMemberParser)}};Qr.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:me(sr.prototype.polygonMemberParser),polygonMembers:me(sr.prototype.polygonMemberParser)}};Qr.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:me(sr.prototype.readFlatCoordinatesFromNode)}};Qr.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:me(sr.prototype.readLineString)}};Qr.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:me(sr.prototype.readPolygon)}};Qr.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Fe(sr.prototype.readFlatLinearRing)}};Qr.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:At(Je.prototype.writeRing),interior:At(Je.prototype.writeRing)}};Qr.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:At(Ue),upperCorner:At(Ue)}};Qr.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:At(Je.prototype.writeSurfaceOrPolygonMember),polygonMember:At(Je.prototype.writeSurfaceOrPolygonMember)}};Qr.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:At(Je.prototype.writePointMember)}};Qr.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:At(Je.prototype.writeLineStringOrCurveMember),curveMember:At(Je.prototype.writeLineStringOrCurveMember)}};Qr.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:At(Je.prototype.writeCurveOrLineString),MultiCurve:At(Je.prototype.writeMultiCurveOrLineString),Point:At(Qr.prototype.writePoint),MultiPoint:At(Je.prototype.writeMultiPoint),LineString:At(Je.prototype.writeCurveOrLineString),MultiLineString:At(Je.prototype.writeMultiCurveOrLineString),LinearRing:At(Je.prototype.writeLinearRing),Polygon:At(Je.prototype.writeSurfaceOrPolygon),MultiPolygon:At(Je.prototype.writeMultiSurfaceOrPolygon),Surface:At(Je.prototype.writeSurfaceOrPolygon),MultiSurface:At(Je.prototype.writeMultiSurfaceOrPolygon),Envelope:At(Je.prototype.writeEnvelope)}};var hL=Qr,rut=function(){function r(e){this.tagName_=e}return r.prototype.getTagName=function(){return this.tagName_},r}(),$6=rut,nut=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)}}(),iut=function(r){nut(e,r);function e(t,n){var i=r.call(this,t)||this;return i.conditions=n,_e(i.conditions.length>=2,57),i}return e}($6),aut=iut,out=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)}}(),sut=function(r){out(e,r);function e(t){return r.call(this,"And",Array.prototype.slice.call(arguments))||this}return e}(aut),Aut=sut,lut=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)}}(),uut=function(r){lut(e,r);function e(t,n,i){var a=r.call(this,"BBOX")||this;if(a.geometryName=t,a.extent=n,n.length!==4)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");return a.srsName=i,a}return e}($6),hut=uut;function cut(r){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Aut,e))}function fut(r,e,t){return new hut(r,e,t)}var put=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)}}(),IO={"http://www.opengis.net/gml":{boundedBy:ot(sr.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:me(sr.prototype.readFeaturesInternal)}},dut={"http://www.opengis.net/wfs":{totalInserted:ot(Zn),totalUpdated:ot(Zn),totalDeleted:ot(Zn)},"http://www.opengis.net/wfs/2.0":{totalInserted:ot(Zn),totalUpdated:ot(Zn),totalDeleted:ot(Zn)}},vut={"http://www.opengis.net/wfs":{TransactionSummary:ot(OO,"transactionSummary"),InsertResults:ot(PO,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:ot(OO,"transactionSummary"),InsertResults:ot(PO,"insertIds")}},gut={"http://www.opengis.net/wfs":{PropertyName:At(Ue)},"http://www.opengis.net/wfs/2.0":{PropertyName:At(Ue)}},V6={"http://www.opengis.net/wfs":{Insert:At(NO),Update:At(DO),Delete:At(UO),Property:At(QO),Native:At(HO)},"http://www.opengis.net/wfs/2.0":{Insert:At(NO),Update:At(DO),Delete:At(UO),Property:At(QO),Native:At(HO)}},j6="feature",cL="http://www.w3.org/2000/xmlns/",fL={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},sx={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},pL={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},RO={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},dL={"2.0.0":hL,"1.1.0":Je,"1.0.0":gp},yut="1.1.0",mut=function(r){put(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.version_=i.version?i.version:yut,n.featureType_=i.featureType,n.featureNS_=i.featureNS,n.gmlFormat_=i.gmlFormat?i.gmlFormat:new dL[n.version_],n.schemaLocation_=i.schemaLocation?i.schemaLocation:RO[n.version_],n}return e.prototype.getFeatureType=function(){return this.featureType_},e.prototype.setFeatureType=function(t){this.featureType_=t},e.prototype.readFeaturesFromNode=function(t,n){var i={node:t};de(i,{featureType:this.featureType_,featureNS:this.featureNS_}),de(i,this.getReadOptions(t,n||{}));var a=[i],o;this.version_==="2.0.0"?o=IO:o=this.gmlFormat_.FEATURE_COLLECTION_PARSERS;var s=Gt([],o,t,a,this.gmlFormat_);return s||(s=[]),s},e.prototype.readTransactionResponse=function(t){if(t)if(typeof t=="string"){var n=Zs(t);return this.readTransactionResponseFromDocument(n)}else return qs(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t);else return},e.prototype.readFeatureCollectionMetadata=function(t){if(t)if(typeof t=="string"){var n=Zs(t);return this.readFeatureCollectionMetadataFromDocument(n)}else return qs(t)?this.readFeatureCollectionMetadataFromDocument(t):this.readFeatureCollectionMetadataFromNode(t);else return},e.prototype.readFeatureCollectionMetadataFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(n)},e.prototype.readFeatureCollectionMetadataFromNode=function(t){var n={},i=jA(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,Gt(n,IO,t,[],this.gmlFormat_)},e.prototype.readTransactionResponseFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(n)},e.prototype.readTransactionResponseFromNode=function(t){return Gt({},vut,t,[])},e.prototype.writeGetFeature=function(t){var n=this,i=Ge(sx[this.version_],"GetFeature");i.setAttribute("service","WFS"),i.setAttribute("version",this.version_),t.handle&&i.setAttribute("handle",t.handle),t.outputFormat&&i.setAttribute("outputFormat",t.outputFormat),t.maxFeatures!==void 0&&i.setAttribute("maxFeatures",String(t.maxFeatures)),t.resultType&&i.setAttribute("resultType",t.resultType),t.startIndex!==void 0&&i.setAttribute("startIndex",String(t.startIndex)),t.count!==void 0&&i.setAttribute("count",String(t.count)),t.viewParams!==void 0&&i.setAttribute("viewParams",t.viewParams),i.setAttributeNS(jh,"xsi:schemaLocation",this.schemaLocation_);var a={node:i};if(de(a,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),_e(Array.isArray(t.featureTypes),11),typeof t.featureTypes[0]=="string"){var o=t.filter;t.bbox&&(_e(t.geometryName,12),o=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,o)),de(a,{geometryName:t.geometryName,filter:o}),WO(i,t.featureTypes,[a])}else t.featureTypes.forEach(function(s){var A=n.combineBboxAndFilter(s.geometryName,s.bbox,t.srsName,t.filter);de(a,{geometryName:s.geometryName,filter:A}),WO(i,[s.name],[a])});return i},e.prototype.combineBboxAndFilter=function(t,n,i,a){var o=fut(t,n,i);return a?cut(a,o):o},e.prototype.writeTransaction=function(t,n,i,a){var o=[],s=a.version?a.version:this.version_,A=Ge(sx[s],"Transaction");A.setAttribute("service","WFS"),A.setAttribute("version",s);var l;a&&(l=a.gmlOptions?a.gmlOptions:{},a.handle&&A.setAttribute("handle",a.handle)),A.setAttributeNS(jh,"xsi:schemaLocation",RO[s]);var u=_ut(A,l,s,a);return t&&Vy("Insert",t,o,u),n&&Vy("Update",n,o,u),i&&Vy("Delete",i,o,u),a.nativeElements&&Vy("Native",a.nativeElements,o,u),A},e.prototype.readProjectionFromDocument=function(t){for(var n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(n);return null},e.prototype.readProjectionFromNode=function(t){if(t.firstElementChild&&t.firstElementChild.firstElementChild){t=t.firstElementChild.firstElementChild;for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(!(n.childNodes.length===0||n.childNodes.length===1&&n.firstChild.nodeType===3)){var i=[{}];return this.gmlFormat_.readGeometryElement(n,i),Ie(i.pop().srsName)}}return null},e}(dg);function _ut(r,e,t,n){var i=n.featurePrefix?n.featurePrefix:j6,a;t==="1.0.0"?a=2:t==="1.1.0"?a=3:t==="2.0.0"&&(a=3.2);var o=de({node:r},{version:t,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:i,gmlVersion:a,hasZ:n.hasZ,srsName:n.srsName},e);return o}function Vy(r,e,t,n){He(n,V6,Rn(r),e,t)}function OO(r,e){return Gt({},dut,r,e)}var wut={"http://www.opengis.net/ogc":{FeatureId:me(function(r,e){return r.getAttribute("fid")})},"http://www.opengis.net/ogc/1.1":{FeatureId:me(function(r,e){return r.getAttribute("fid")})}};function MO(r,e){eo(wut,r,e)}var Eut={"http://www.opengis.net/wfs":{Feature:MO},"http://www.opengis.net/wfs/2.0":{Feature:MO}};function PO(r,e){return Gt([],Eut,r,e)}function NO(r,e,t){var n=t[t.length-1],i=n.featureType,a=n.featureNS,o=n.gmlVersion,s=Ge(a,i);r.appendChild(s),o===2?gp.prototype.writeFeatureElement(s,e,t):o===3?Je.prototype.writeFeatureElement(s,e,t):hL.prototype.writeFeatureElement(s,e,t)}function K6(r,e,t){var n=t[t.length-1],i=n.version,a=fL[i],o=Ge(a,"Filter"),s=Ge(a,"FeatureId");o.appendChild(s),s.setAttribute("fid",e),r.appendChild(o)}function vL(r,e){r=r||j6;var t=r+":";return e.indexOf(t)===0?e:t+e}function UO(r,e,t){var n=t[t.length-1];_e(e.getId()!==void 0,26);var i=n.featureType,a=n.featurePrefix,o=n.featureNS,s=vL(a,i);r.setAttribute("typeName",s),r.setAttributeNS(cL,"xmlns:"+a,o);var A=e.getId();A!==void 0&&K6(r,A,t)}function DO(r,e,t){var n=t[t.length-1];_e(e.getId()!==void 0,27);var i=n.version,a=n.featureType,o=n.featurePrefix,s=n.featureNS,A=vL(o,a),l=e.getGeometryName();r.setAttribute("typeName",A),r.setAttributeNS(cL,"xmlns:"+o,s);var u=e.getId();if(u!==void 0){for(var h=e.getKeys(),c=[],f=0,d=h.length;f<d;f++){var v=e.get(h[f]);if(v!==void 0){var y=h[f];v&&typeof v.getSimplifiedGeometry=="function"&&(y=l),c.push({name:y,value:v})}}He({version:i,gmlVersion:n.gmlVersion,node:r,hasZ:n.hasZ,srsName:n.srsName},V6,Rn("Property"),c,t),K6(r,u,t)}}function QO(r,e,t){var n=t[t.length-1],i=n.version,a=sx[i],o=Ge(a,"Name"),s=n.gmlVersion;if(r.appendChild(o),Ue(o,e.name),e.value!==void 0&&e.value!==null){var A=Ge(a,"Value");r.appendChild(A),e.value&&typeof e.value.getSimplifiedGeometry=="function"?s===2?gp.prototype.writeGeometryElement(A,e.value,t):s===3?Je.prototype.writeGeometryElement(A,e.value,t):hL.prototype.writeGeometryElement(A,e.value,t):Ue(A,e.value)}}function HO(r,e,t){e.vendorId&&r.setAttribute("vendorId",e.vendorId),e.safeToIgnore!==void 0&&r.setAttribute("safeToIgnore",String(e.safeToIgnore)),e.value!==void 0&&Ue(r,e.value)}var d1={"http://www.opengis.net/wfs":{Query:At(GO)},"http://www.opengis.net/wfs/2.0":{Query:At(GO)},"http://www.opengis.net/ogc":{During:At(VO),And:At(jy),Or:At(jy),Not:At(jO),BBOX:At(kO),Contains:At(Vl),Intersects:At(Vl),Within:At(Vl),DWithin:At($O),PropertyIsEqualTo:At(Uo),PropertyIsNotEqualTo:At(Uo),PropertyIsLessThan:At(Uo),PropertyIsLessThanOrEqualTo:At(Uo),PropertyIsGreaterThan:At(Uo),PropertyIsGreaterThanOrEqualTo:At(Uo),PropertyIsNull:At(KO),PropertyIsBetween:At(YO),PropertyIsLike:At(zO)},"http://www.opengis.net/fes/2.0":{During:At(VO),And:At(jy),Or:At(jy),Not:At(jO),BBOX:At(kO),Contains:At(Vl),Disjoint:At(Vl),Intersects:At(Vl),ResourceId:At(But),Within:At(Vl),DWithin:At($O),PropertyIsEqualTo:At(Uo),PropertyIsNotEqualTo:At(Uo),PropertyIsLessThan:At(Uo),PropertyIsLessThanOrEqualTo:At(Uo),PropertyIsGreaterThan:At(Uo),PropertyIsGreaterThanOrEqualTo:At(Uo),PropertyIsNull:At(KO),PropertyIsBetween:At(YO),PropertyIsLike:At(zO)}};function GO(r,e,t){var n=t[t.length-1],i=n.version,a=n.featurePrefix,o=n.featureNS,s=n.propertyNames,A=n.srsName,l;a?l=vL(a,e):l=e;var u;i==="2.0.0"?u="typeNames":u="typeName",r.setAttribute(u,l),A&&r.setAttribute("srsName",A),o&&r.setAttributeNS(cL,"xmlns:"+a,o);var h=de({},n);h.node=r,He(h,gut,Rn("PropertyName"),s,t);var c=n.filter;if(c){var f=Ge(v1(i),"Filter");r.appendChild(f),Cut(f,c,t)}}function Cut(r,e,t){var n=t[t.length-1],i={node:r};de(i,{context:n}),He(i,d1,Rn(e.getTagName()),[e],t)}function kO(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=dL[a];mp(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.extent,t)}function But(r,e,t){r.setAttribute("rid",e.rid)}function Vl(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=dL[a];mp(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.geometry,t)}function $O(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;Vl(r,e,t);var o=Ge(v1(a),"Distance");Ue(o,e.distance.toString()),a==="2.0.0"?o.setAttribute("uom",e.unit):o.setAttribute("units",e.unit),r.appendChild(o)}function VO(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;qm(pL[a],"ValueReference",r,e.propertyName);var o=Ge(XA,"TimePeriod");r.appendChild(o);var s=Ge(XA,"begin");o.appendChild(s),XO(s,e.begin);var A=Ge(XA,"end");o.appendChild(A),XO(A,e.end)}function jy(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};de(a,{context:i});for(var o=e.conditions,s=0,A=o.length;s<A;++s){var l=o[s];He(a,d1,Rn(l.getTagName()),[l],t)}}function jO(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};de(a,{context:i});var o=e.condition;He(a,d1,Rn(o.getTagName()),[o],t)}function Uo(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;e.matchCase!==void 0&&r.setAttribute("matchCase",e.matchCase.toString()),mp(a,r,e.propertyName),Zm(a,r,""+e.expression)}function KO(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;mp(a,r,e.propertyName)}function YO(r,e,t){var n=t[t.length-1],i=n.context,a=i.version,o=v1(a);mp(a,r,e.propertyName);var s=Ge(o,"LowerBoundary");r.appendChild(s),Zm(a,s,""+e.lowerBoundary);var A=Ge(o,"UpperBoundary");r.appendChild(A),Zm(a,A,""+e.upperBoundary)}function zO(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;r.setAttribute("wildCard",e.wildCard),r.setAttribute("singleChar",e.singleChar),r.setAttribute("escapeChar",e.escapeChar),e.matchCase!==void 0&&r.setAttribute("matchCase",e.matchCase.toString()),mp(a,r,e.propertyName),Zm(a,r,""+e.pattern)}function qm(r,e,t,n){var i=Ge(r,e);Ue(i,n),t.appendChild(i)}function Zm(r,e,t){qm(v1(r),"Literal",e,t)}function mp(r,e,t){r==="2.0.0"?qm(pL[r],"ValueReference",e,t):qm(fL[r],"PropertyName",e,t)}function XO(r,e){var t=Ge(XA,"TimeInstant");r.appendChild(t);var n=Ge(XA,"timePosition");t.appendChild(n),Ue(n,e)}function WO(r,e,t){var n=t[t.length-1],i=de({},n);i.node=r,He(i,d1,Rn("Query"),e,t)}function v1(r){var e;return r==="2.0.0"?e=pL[r]:e=fL[r],e}var Tut=mut,xut=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)}}(),Kr={POINT:1,LINE_STRING:2,POLYGON:3,MULTI_POINT:4,MULTI_LINE_STRING:5,MULTI_POLYGON:6,GEOMETRY_COLLECTION:7,POLYHEDRAL_SURFACE:15,TIN:16,TRIANGLE:17},qO=function(){function r(e){this.view_=e,this.pos_=0,this.initialized_=!1,this.isLittleEndian_=!1,this.hasZ_=!1,this.hasM_=!1,this.srid_=null,this.layout_=Wt.XY}return r.prototype.readUint8=function(){return this.view_.getUint8(this.pos_++)},r.prototype.readUint32=function(e){return this.view_.getUint32((this.pos_+=4)-4,e!==void 0?e:this.isLittleEndian_)},r.prototype.readDouble=function(e){return this.view_.getFloat64((this.pos_+=8)-8,e!==void 0?e:this.isLittleEndian_)},r.prototype.readPoint=function(){var e=[];return e.push(this.readDouble()),e.push(this.readDouble()),this.hasZ_&&e.push(this.readDouble()),this.hasM_&&e.push(this.readDouble()),e},r.prototype.readLineString=function(){for(var e=this.readUint32(),t=[],n=0;n<e;n++)t.push(this.readPoint());return t},r.prototype.readPolygon=function(){for(var e=this.readUint32(),t=[],n=0;n<e;n++)t.push(this.readLineString());return t},r.prototype.readWkbHeader=function(e){var t=this.readUint8(),n=t>0,i=this.readUint32(n),a=Math.floor((i&268435455)/1e3),o=Boolean(i&2147483648)||a===1||a===3,s=Boolean(i&1073741824)||a===2||a===3,A=Boolean(i&536870912),l=(i&268435455)%1e3,u=["XY",o?"Z":"",s?"M":""].join(""),h=A?this.readUint32(n):null;if(e!==void 0&&e!==l)throw new Error("Unexpected WKB geometry type "+l);if(this.initialized_){if(this.isLittleEndian_!==n)throw new Error("Inconsistent endian");if(this.layout_!==u)throw new Error("Inconsistent geometry layout");if(h&&this.srid_!==h)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=n,this.hasZ_=o,this.hasM_=s,this.layout_=u,this.srid_=h,this.initialized_=!0;return l},r.prototype.readWkbPayload=function(e){switch(e){case Kr.POINT:return this.readPoint();case Kr.LINE_STRING:return this.readLineString();case Kr.POLYGON:case Kr.TRIANGLE:return this.readPolygon();case Kr.MULTI_POINT:return this.readMultiPoint();case Kr.MULTI_LINE_STRING:return this.readMultiLineString();case Kr.MULTI_POLYGON:case Kr.POLYHEDRAL_SURFACE:case Kr.TIN:return this.readMultiPolygon();case Kr.GEOMETRY_COLLECTION:return this.readGeometryCollection();default:throw new Error("Unsupported WKB geometry type "+e+" is found")}},r.prototype.readWkbBlock=function(e){return this.readWkbPayload(this.readWkbHeader(e))},r.prototype.readWkbCollection=function(e,t){for(var n=this.readUint32(),i=[],a=0;a<n;a++){var o=e.call(this,t);o&&i.push(o)}return i},r.prototype.readMultiPoint=function(){return this.readWkbCollection(this.readWkbBlock,Kr.POINT)},r.prototype.readMultiLineString=function(){return this.readWkbCollection(this.readWkbBlock,Kr.LINE_STRING)},r.prototype.readMultiPolygon=function(){return this.readWkbCollection(this.readWkbBlock,Kr.POLYGON)},r.prototype.readGeometryCollection=function(){return this.readWkbCollection(this.readGeometry)},r.prototype.readGeometry=function(){var e=this.readWkbHeader(),t=this.readWkbPayload(e);switch(e){case Kr.POINT:return new cr(t,this.layout_);case Kr.LINE_STRING:return new Dr(t,this.layout_);case Kr.POLYGON:case Kr.TRIANGLE:return new Cn(t,this.layout_);case Kr.MULTI_POINT:return new zo(t,this.layout_);case Kr.MULTI_LINE_STRING:return new Ea(t,this.layout_);case Kr.MULTI_POLYGON:case Kr.POLYHEDRAL_SURFACE:case Kr.TIN:return new Ca(t,this.layout_);case Kr.GEOMETRY_COLLECTION:return new ea(t);default:return null}},r.prototype.getSrid=function(){return this.srid_},r}(),Sut=function(){function r(e){e=e||{},this.layout_=e.layout,this.isLittleEndian_=e.littleEndian!==!1,this.isEWKB_=e.ewkb!==!1,this.writeQueue_=[],this.nodata_=de({X:0,Y:0,Z:0,M:0},e.nodata)}return r.prototype.writeUint8=function(e){this.writeQueue_.push([1,e])},r.prototype.writeUint32=function(e){this.writeQueue_.push([4,e])},r.prototype.writeDouble=function(e){this.writeQueue_.push([8,e])},r.prototype.writePoint=function(e,t){for(var n=de.apply(null,t.split("").map(function(s,A){var l;return l={},l[s]=e[A],l})),i=0,a=this.layout_;i<a.length;i++){var o=a[i];this.writeDouble(o in n?n[o]:this.nodata_[o])}},r.prototype.writeLineString=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writePoint(e[n],t)},r.prototype.writePolygon=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeLineString(e[n],t)},r.prototype.writeWkbHeader=function(e,t){e%=1e3,this.layout_.indexOf("Z")>=0&&(e+=this.isEWKB_?2147483648:1e3),this.layout_.indexOf("M")>=0&&(e+=this.isEWKB_?1073741824:2e3),this.isEWKB_&&Number.isInteger(t)&&(e|=536870912),this.writeUint8(this.isLittleEndian_?1:0),this.writeUint32(e),this.isEWKB_&&Number.isInteger(t)&&this.writeUint32(t)},r.prototype.writeMultiPoint=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeWkbHeader(1),this.writePoint(e[n],t)},r.prototype.writeMultiLineString=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeWkbHeader(2),this.writeLineString(e[n],t)},r.prototype.writeMultiPolygon=function(e,t){this.writeUint32(e.length);for(var n=0;n<e.length;n++)this.writeWkbHeader(3),this.writePolygon(e[n],t)},r.prototype.writeGeometryCollection=function(e){this.writeUint32(e.length);for(var t=0;t<e.length;t++)this.writeGeometry(e[t])},r.prototype.findMinimumLayout=function(e,t){t===void 0&&(t=Wt.XYZM);var n=function(o,s){return o===s?o:o===Wt.XYZM?s:s===Wt.XYZM?o:Wt.XY};if(e instanceof Cs)return n(e.getLayout(),t);if(e instanceof ea)for(var i=e.getGeometriesArray(),a=0;a<i.length&&t!==Wt.XY;a++)t=this.findMinimumLayout(i[a],t);return t},r.prototype.writeGeometry=function(e,t){var n,i,a=(n={},n[st.POINT]=Kr.POINT,n[st.LINE_STRING]=Kr.LINE_STRING,n[st.POLYGON]=Kr.POLYGON,n[st.MULTI_POINT]=Kr.MULTI_POINT,n[st.MULTI_LINE_STRING]=Kr.MULTI_LINE_STRING,n[st.MULTI_POLYGON]=Kr.MULTI_POLYGON,n[st.GEOMETRY_COLLECTION]=Kr.GEOMETRY_COLLECTION,n),o=e.getType(),s=a[o];if(!s)throw new Error("GeometryType "+o+" is not supported");if(this.layout_||(this.layout_=this.findMinimumLayout(e)),this.writeWkbHeader(s,t),e instanceof Cs){var A=(i={},i[st.POINT]=this.writePoint,i[st.LINE_STRING]=this.writeLineString,i[st.POLYGON]=this.writePolygon,i[st.MULTI_POINT]=this.writeMultiPoint,i[st.MULTI_LINE_STRING]=this.writeMultiLineString,i[st.MULTI_POLYGON]=this.writeMultiPolygon,i);A[o].call(this,e.getCoordinates(),e.getLayout())}else e instanceof ea&&this.writeGeometryCollection(e.getGeometriesArray())},r.prototype.getBuffer=function(){var e=this,t=this.writeQueue_.reduce(function(o,s){return o+s[0]},0),n=new ArrayBuffer(t),i=new DataView(n),a=0;return this.writeQueue_.forEach(function(o){switch(o[0]){case 1:i.setUint8(a,o[1]);break;case 4:i.setUint32(a,o[1],e.isLittleEndian_);break;case 8:i.setFloat64(a,o[1],e.isLittleEndian_);break}a+=o[0]}),n},r}(),but=function(r){xut(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.splitCollection=Boolean(i.splitCollection),n.viewCache_=null,n.hex_=i.hex!==!1,n.littleEndian_=i.littleEndian!==!1,n.ewkb_=i.ewkb!==!1,n.layout_=i.geometryLayout,n.nodataZ_=i.nodataZ||0,n.nodataM_=i.nodataM||0,n.srid_=i.srid,n}return e.prototype.getType=function(){return this.hex_?vs.TEXT:vs.ARRAY_BUFFER},e.prototype.readFeature=function(t,n){return new nr({geometry:this.readGeometry(t,n)})},e.prototype.readFeatures=function(t,n){var i=[],a=this.readGeometry(t,n);return this.splitCollection&&a instanceof ea?i=a.getGeometriesArray():i=[a],i.map(function(o){return new nr({geometry:o})})},e.prototype.readGeometry=function(t,n){var i=ZO(t);if(!i)return null;var a=new qO(i),o=a.readGeometry();this.viewCache_=i;var s=this.getReadOptions(t,n);return this.viewCache_=null,bn(o,!1,s)},e.prototype.readProjection=function(t){var n=this.viewCache_||ZO(t);if(n){var i=new qO(n);return i.readWkbHeader(),i.getSrid()&&Ie("EPSG:"+i.getSrid())||void 0}},e.prototype.writeFeature=function(t,n){return this.writeGeometry(t.getGeometry(),n)},e.prototype.writeFeatures=function(t,n){return this.writeGeometry(new ea(t.map(function(i){return i.getGeometry()})),n)},e.prototype.writeGeometry=function(t,n){var i=this.adaptOptions(n),a=new Sut({layout:this.layout_,littleEndian:this.littleEndian_,ewkb:this.ewkb_,nodata:{Z:this.nodataZ_,M:this.nodataM_}}),o=Number.isInteger(this.srid_)?Number(this.srid_):null;if(this.srid_!==!1&&!Number.isInteger(this.srid_)){var s=i.dataProjection&&Ie(i.dataProjection);if(s){var A=s.getCode();A.indexOf("EPSG:")===0&&(o=Number(A.substring(5)))}}a.writeGeometry(bn(t,!0,i),o);var l=a.getBuffer();return this.hex_?Lut(l):l},e}(fg);function Lut(r){var e=new Uint8Array(r);return Array.from(e.values()).map(function(t){return(t<16?"0":"")+Number(t).toString(16).toUpperCase()}).join("")}function Fut(r){for(var e=new Uint8Array(r.length/2),t=0;t<r.length/2;t++)e[t]=parseInt(r.substr(t*2,2),16);return new DataView(e.buffer)}function ZO(r){return typeof r=="string"?Fut(r):ArrayBuffer.isView(r)?r instanceof DataView?r:new DataView(r.buffer,r.byteOffset,r.byteLength):r instanceof ArrayBuffer?new DataView(r):null}var Iut=but,Rut=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)}}(),Out={POINT:cr,LINESTRING:Dr,POLYGON:Cn,MULTIPOINT:zo,MULTILINESTRING:Ea,MULTIPOLYGON:Ca},Y6="EMPTY",z6="Z",X6="M",Mut="ZM",Pr={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6};for(var Put in st)st[Put].toUpperCase();var Nut=function(){function r(e){this.wkt=e,this.index_=-1}return r.prototype.isAlpha_=function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"},r.prototype.isNumeric_=function(e,t){var n=t!==void 0?t:!1;return e>="0"&&e<="9"||e=="."&&!n},r.prototype.isWhiteSpace_=function(e){return e==" "||e==" "||e=="\r"||e==`
|
||
`},r.prototype.nextChar_=function(){return this.wkt.charAt(++this.index_)},r.prototype.nextToken=function(){var e=this.nextChar_(),t=this.index_,n=e,i;if(e=="(")i=Pr.LEFT_PAREN;else if(e==",")i=Pr.COMMA;else if(e==")")i=Pr.RIGHT_PAREN;else if(this.isNumeric_(e)||e=="-")i=Pr.NUMBER,n=this.readNumber_();else if(this.isAlpha_(e))i=Pr.TEXT,n=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(e==="")i=Pr.EOF;else throw new Error("Unexpected character: "+e)}return{position:t,value:n,type:i}},r.prototype.readNumber_=function(){var e,t=this.index_,n=!1,i=!1;do e=="."?n=!0:(e=="e"||e=="E")&&(i=!0),e=this.nextChar_();while(this.isNumeric_(e,n)||!i&&(e=="e"||e=="E")||i&&(e=="-"||e=="+"));return parseFloat(this.wkt.substring(t,this.index_--))},r.prototype.readText_=function(){var e,t=this.index_;do e=this.nextChar_();while(this.isAlpha_(e));return this.wkt.substring(t,this.index_--).toUpperCase()},r}(),Uut=function(){function r(e){this.lexer_=e,this.token_={position:0,type:Pr.START},this.layout_=Wt.XY}return r.prototype.consume_=function(){this.token_=this.lexer_.nextToken()},r.prototype.isTokenType=function(e){return this.token_.type==e},r.prototype.match=function(e){var t=this.isTokenType(e);return t&&this.consume_(),t},r.prototype.parse=function(){return this.consume_(),this.parseGeometry_()},r.prototype.parseGeometryLayout_=function(){var e=Wt.XY,t=this.token_;if(this.isTokenType(Pr.TEXT)){var n=t.value;n===z6?e=Wt.XYZ:n===X6?e=Wt.XYM:n===Mut&&(e=Wt.XYZM),e!==Wt.XY&&this.consume_()}return e},r.prototype.parseGeometryCollectionText_=function(){if(this.match(Pr.LEFT_PAREN)){var e=[];do e.push(this.parseGeometry_());while(this.match(Pr.COMMA));if(this.match(Pr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePointText_=function(){if(this.match(Pr.LEFT_PAREN)){var e=this.parsePoint_();if(this.match(Pr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseLineStringText_=function(){if(this.match(Pr.LEFT_PAREN)){var e=this.parsePointList_();if(this.match(Pr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePolygonText_=function(){if(this.match(Pr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Pr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPointText_=function(){if(this.match(Pr.LEFT_PAREN)){var e=void 0;if(this.token_.type==Pr.LEFT_PAREN?e=this.parsePointTextList_():e=this.parsePointList_(),this.match(Pr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiLineStringText_=function(){if(this.match(Pr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Pr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPolygonText_=function(){if(this.match(Pr.LEFT_PAREN)){var e=this.parsePolygonTextList_();if(this.match(Pr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePoint_=function(){for(var e=[],t=this.layout_.length,n=0;n<t;++n){var i=this.token_;if(this.match(Pr.NUMBER))e.push(i.value);else break}if(e.length==t)return e;throw new Error(this.formatErrorMessage_())},r.prototype.parsePointList_=function(){for(var e=[this.parsePoint_()];this.match(Pr.COMMA);)e.push(this.parsePoint_());return e},r.prototype.parsePointTextList_=function(){for(var e=[this.parsePointText_()];this.match(Pr.COMMA);)e.push(this.parsePointText_());return e},r.prototype.parseLineStringTextList_=function(){for(var e=[this.parseLineStringText_()];this.match(Pr.COMMA);)e.push(this.parseLineStringText_());return e},r.prototype.parsePolygonTextList_=function(){for(var e=[this.parsePolygonText_()];this.match(Pr.COMMA);)e.push(this.parsePolygonText_());return e},r.prototype.isEmptyGeometry_=function(){var e=this.isTokenType(Pr.TEXT)&&this.token_.value==Y6;return e&&this.consume_(),e},r.prototype.formatErrorMessage_=function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"},r.prototype.parseGeometry_=function(){var e=this.token_;if(this.match(Pr.TEXT)){var t=e.value;this.layout_=this.parseGeometryLayout_();var n=this.isEmptyGeometry_();if(t=="GEOMETRYCOLLECTION"){if(n)return new ea([]);var i=this.parseGeometryCollectionText_();return new ea(i)}else{var a=Out[t];if(!a)throw new Error("Invalid geometry type: "+t);var o=void 0;if(n)t=="POINT"?o=[NaN,NaN]:o=[];else switch(t){case"POINT":{o=this.parsePointText_();break}case"LINESTRING":{o=this.parseLineStringText_();break}case"POLYGON":{o=this.parsePolygonText_();break}case"MULTIPOINT":{o=this.parseMultiPointText_();break}case"MULTILINESTRING":{o=this.parseMultiLineStringText_();break}case"MULTIPOLYGON":{o=this.parseMultiPolygonText_();break}}return new a(o,this.layout_)}}throw new Error(this.formatErrorMessage_())},r}(),Dut=function(r){Rut(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.splitCollection_=i.splitCollection!==void 0?i.splitCollection:!1,n}return e.prototype.parse_=function(t){var n=new Nut(t),i=new Uut(n);return i.parse()},e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n),a=new nr;return a.setGeometry(i),a},e.prototype.readFeaturesFromText=function(t,n){var i=[],a=this.readGeometryFromText(t,n);this.splitCollection_&&a.getType()==st.GEOMETRY_COLLECTION?i=a.getGeometriesArray():i=[a];for(var o=[],s=0,A=i.length;s<A;++s){var l=new nr;l.setGeometry(i[s]),o.push(l)}return o},e.prototype.readGeometryFromText=function(t,n){var i=this.parse_(t);return bn(i,!1,n)},e.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):""},e.prototype.writeFeaturesText=function(t,n){if(t.length==1)return this.writeFeatureText(t[0],n);for(var i=[],a=0,o=t.length;a<o;++a)i.push(t[a].getGeometry());var s=new ea(i);return this.writeGeometryText(s,n)},e.prototype.writeGeometryText=function(t,n){return Z6(bn(t,!0,n))},e}(iL);function W6(r){var e=r.getCoordinates();return e.length===0?"":e.join(" ")}function Qut(r){for(var e=[],t=r.getPoints(),n=0,i=t.length;n<i;++n)e.push("("+W6(t[n])+")");return e.join(",")}function Hut(r){for(var e=[],t=r.getGeometries(),n=0,i=t.length;n<i;++n)e.push(Z6(t[n]));return e.join(",")}function gL(r){for(var e=r.getCoordinates(),t=[],n=0,i=e.length;n<i;++n)t.push(e[n].join(" "));return t.join(",")}function Gut(r){for(var e=[],t=r.getLineStrings(),n=0,i=t.length;n<i;++n)e.push("("+gL(t[n])+")");return e.join(",")}function q6(r){for(var e=[],t=r.getLinearRings(),n=0,i=t.length;n<i;++n)e.push("("+gL(t[n])+")");return e.join(",")}function kut(r){for(var e=[],t=r.getPolygons(),n=0,i=t.length;n<i;++n)e.push("("+q6(t[n])+")");return e.join(",")}function $ut(r){var e=r.getLayout(),t="";return(e===Wt.XYZ||e===Wt.XYZM)&&(t+=z6),(e===Wt.XYM||e===Wt.XYZM)&&(t+=X6),t}var Vut={Point:W6,LineString:gL,Polygon:q6,MultiPoint:Qut,MultiLineString:Gut,MultiPolygon:kut,GeometryCollection:Hut};function Z6(r){var e=r.getType(),t=Vut[e],n=t(r);if(e=e.toUpperCase(),typeof r.getFlatCoordinates=="function"){var i=$ut(r);i.length>0&&(e+=" "+i)}return n.length===0?e+" "+Y6:e+"("+n+")"}var jut=Dut,Kut=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ia=[null,"http://www.opengis.net/wms"],Yut=Mt(ia,{Service:ot(pht),Capability:ot(fht)}),zut=Mt(ia,{Request:ot(wht),Exception:ot(yht),Layer:ot(mht)}),Xut=function(r){Kut(e,r);function e(){var t=r.call(this)||this;return t.version=void 0,t}return e.prototype.readFromNode=function(t){this.version=t.getAttribute("version").trim();var n=Gt({version:this.version},Yut,t,[]);return n||null},e}(lL),Wut=Mt(ia,{Name:ot($t),Title:ot($t),Abstract:ot($t),KeywordList:ot(rQ),OnlineResource:ot(yp),ContactInformation:ot(dht),Fees:ot($t),AccessConstraints:ot($t),LayerLimit:ot(Zn),MaxWidth:ot(Zn),MaxHeight:ot(Zn)}),qut=Mt(ia,{ContactPersonPrimary:ot(vht),ContactPosition:ot($t),ContactAddress:ot(ght),ContactVoiceTelephone:ot($t),ContactFacsimileTelephone:ot($t),ContactElectronicMailAddress:ot($t)}),Zut=Mt(ia,{ContactPerson:ot($t),ContactOrganization:ot($t)}),Jut=Mt(ia,{AddressType:ot($t),Address:ot($t),City:ot($t),StateOrProvince:ot($t),PostCode:ot($t),Country:ot($t)}),tht=Mt(ia,{Format:me($t)}),J6=Mt(ia,{Name:ot($t),Title:ot($t),Abstract:ot($t),KeywordList:ot(rQ),CRS:cn($t),EX_GeographicBoundingBox:ot(cht),BoundingBox:cn(hht),Dimension:cn(_ht),Attribution:ot(uht),AuthorityURL:cn(Bht),Identifier:cn($t),MetadataURL:cn(Tht),DataURL:cn(el),FeatureListURL:cn(el),Style:cn(xht),MinScaleDenominator:ot(Lr),MaxScaleDenominator:ot(Lr),Layer:cn(tQ)}),eht=Mt(ia,{Title:ot($t),OnlineResource:ot(yp),LogoURL:ot(eQ)}),rht=Mt(ia,{westBoundLongitude:ot(Lr),eastBoundLongitude:ot(Lr),southBoundLatitude:ot(Lr),northBoundLatitude:ot(Lr)}),nht=Mt(ia,{GetCapabilities:ot(OE),GetMap:ot(OE),GetFeatureInfo:ot(OE)}),iht=Mt(ia,{Format:cn($t),DCPType:cn(Eht)}),aht=Mt(ia,{HTTP:ot(Cht)}),oht=Mt(ia,{Get:ot(el),Post:ot(el)}),sht=Mt(ia,{Name:ot($t),Title:ot($t),Abstract:ot($t),LegendURL:cn(eQ),StyleSheetURL:ot(el),StyleURL:ot(el)}),Aht=Mt(ia,{Format:ot($t),OnlineResource:ot(yp)}),lht=Mt(ia,{Keyword:me($t)});function uht(r,e){return Gt({},eht,r,e)}function hht(r,e){var t=[$A(r.getAttribute("minx")),$A(r.getAttribute("miny")),$A(r.getAttribute("maxx")),$A(r.getAttribute("maxy"))],n=[$A(r.getAttribute("resx")),$A(r.getAttribute("resy"))];return{crs:r.getAttribute("CRS"),extent:t,res:n}}function cht(r,e){var t=Gt({},rht,r,e);if(t){var n=t.westBoundLongitude,i=t.southBoundLatitude,a=t.eastBoundLongitude,o=t.northBoundLatitude;if(!(n===void 0||i===void 0||a===void 0||o===void 0))return[n,i,a,o]}}function fht(r,e){return Gt({},zut,r,e)}function pht(r,e){return Gt({},Wut,r,e)}function dht(r,e){return Gt({},qut,r,e)}function vht(r,e){return Gt({},Zut,r,e)}function ght(r,e){return Gt({},Jut,r,e)}function yht(r,e){return Gt([],tht,r,e)}function mht(r,e){var t=Gt({},J6,r,e);return t.Layer===void 0?Object.assign(t,tQ(r,e)):t}function tQ(r,e){var t=e[e.length-1],n=Gt({},J6,r,e);if(n){var i=Fh(r.getAttribute("queryable"));i===void 0&&(i=t.queryable),n.queryable=i!==void 0?i:!1;var a=jA(r.getAttribute("cascaded"));a===void 0&&(a=t.cascaded),n.cascaded=a;var o=Fh(r.getAttribute("opaque"));o===void 0&&(o=t.opaque),n.opaque=o!==void 0?o:!1;var s=Fh(r.getAttribute("noSubsets"));s===void 0&&(s=t.noSubsets),n.noSubsets=s!==void 0?s:!1;var A=$A(r.getAttribute("fixedWidth"));A||(A=t.fixedWidth),n.fixedWidth=A;var l=$A(r.getAttribute("fixedHeight"));l||(l=t.fixedHeight),n.fixedHeight=l;var u=["Style","CRS","AuthorityURL"];u.forEach(function(c){if(c in t){var f=n[c]||[];n[c]=f.concat(t[c])}});var h=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];return h.forEach(function(c){if(!(c in n)){var f=t[c];n[c]=f}}),n}}function _ht(r,e){var t={name:r.getAttribute("name"),units:r.getAttribute("units"),unitSymbol:r.getAttribute("unitSymbol"),default:r.getAttribute("default"),multipleValues:Fh(r.getAttribute("multipleValues")),nearestValue:Fh(r.getAttribute("nearestValue")),current:Fh(r.getAttribute("current")),values:$t(r)};return t}function el(r,e){return Gt({},Aht,r,e)}function wht(r,e){return Gt({},nht,r,e)}function Eht(r,e){return Gt({},aht,r,e)}function Cht(r,e){return Gt({},oht,r,e)}function OE(r,e){return Gt({},iht,r,e)}function eQ(r,e){var t=el(r,e);if(t){var n=[jA(r.getAttribute("width")),jA(r.getAttribute("height"))];return t.size=n,t}}function Bht(r,e){var t=el(r,e);if(t)return t.name=r.getAttribute("name"),t}function Tht(r,e){var t=el(r,e);if(t)return t.type=r.getAttribute("type"),t}function xht(r,e){return Gt({},sht,r,e)}function rQ(r,e){return Gt([],lht,r,e)}var Sht=Xut,bht=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)}}(),Lht="_feature",Fht="_layer",Iht=function(r){bht(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.featureNS_="http://mapserver.gis.umn.edu/mapserver",n.gmlFormat_=new gp,n.layers_=i.layers?i.layers:null,n}return e.prototype.getLayers=function(){return this.layers_},e.prototype.setLayers=function(t){this.layers_=t},e.prototype.readFeatures_=function(t,n){t.setAttribute("namespaceURI",this.featureNS_);var i=t.localName,a=[];if(t.childNodes.length===0)return a;if(i=="msGMLOutput")for(var o=0,s=t.childNodes.length;o<s;o++){var A=t.childNodes[o];if(A.nodeType===Node.ELEMENT_NODE){var l=A,u=n[0],h=Fht,c=l.localName.replace(h,"");if(!(this.layers_&&!fi(this.layers_,c))){var f=c+Lht;u.featureType=f,u.featureNS=this.featureNS_;var d={};d[f]=me(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var v=Mt([u.featureNS,null],d);l.setAttribute("namespaceURI",this.featureNS_);var y=Gt([],v,l,n,this.gmlFormat_);y&&Ur(a,y)}}}if(i=="FeatureCollection"){var m=Gt([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);m&&(a=m)}return a},e.prototype.readFeaturesFromNode=function(t,n){var i={};return n&&de(i,this.getReadOptions(t,n)),this.readFeatures_(t,[i])},e}(dg),Rht=Iht,Oht=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)}}(),lA=[null,"http://www.opengis.net/wmts/1.0"],_p=[null,"http://www.opengis.net/ows/1.1"],Mht=Mt(lA,{Contents:ot(Kht)}),Pht=function(r){Oht(e,r);function e(){var t=r.call(this)||this;return t.owsParser_=new G6,t}return e.prototype.readFromNode=function(t){var n=t.getAttribute("version");n&&(n=n.trim());var i=this.owsParser_.readFromNode(t);return i?(i.version=n,i=Gt(i,Mht,t,[]),i||null):null},e}(lL),Nht=Mt(lA,{Layer:cn(Yht),TileMatrixSet:cn(zht)}),Uht=Mt(lA,{Style:cn(Xht),Format:cn($t),TileMatrixSetLink:cn(Wht),Dimension:cn(qht),ResourceURL:cn(Zht)},Mt(_p,{Title:ot($t),Abstract:ot($t),WGS84BoundingBox:ot(nQ),Identifier:ot($t)})),Dht=Mt(lA,{LegendURL:cn(Jht)},Mt(_p,{Title:ot($t),Identifier:ot($t)})),Qht=Mt(lA,{TileMatrixSet:ot($t),TileMatrixSetLimits:ot(ect)}),Hht=Mt(lA,{TileMatrixLimits:me(rct)}),Ght=Mt(lA,{TileMatrix:ot($t),MinTileRow:ot(Zn),MaxTileRow:ot(Zn),MinTileCol:ot(Zn),MaxTileCol:ot(Zn)}),kht=Mt(lA,{Default:ot($t),Value:cn($t)},Mt(_p,{Identifier:ot($t)})),$ht=Mt(_p,{LowerCorner:me(Ax),UpperCorner:me(Ax)}),Vht=Mt(lA,{WellKnownScaleSet:ot($t),TileMatrix:cn(tct)},Mt(_p,{SupportedCRS:ot($t),Identifier:ot($t),BoundingBox:ot(nQ)})),jht=Mt(lA,{TopLeftCorner:ot(Ax),ScaleDenominator:ot(Lr),TileWidth:ot(Zn),TileHeight:ot(Zn),MatrixWidth:ot(Zn),MatrixHeight:ot(Zn)},Mt(_p,{Identifier:ot($t)}));function Kht(r,e){return Gt({},Nht,r,e)}function Yht(r,e){return Gt({},Uht,r,e)}function zht(r,e){return Gt({},Vht,r,e)}function Xht(r,e){var t=Gt({},Dht,r,e);if(t){var n=r.getAttribute("isDefault")==="true";return t.isDefault=n,t}}function Wht(r,e){return Gt({},Qht,r,e)}function qht(r,e){return Gt({},kht,r,e)}function Zht(r,e){var t=r.getAttribute("format"),n=r.getAttribute("template"),i=r.getAttribute("resourceType"),a={};return t&&(a.format=t),n&&(a.template=n),i&&(a.resourceType=i),a}function nQ(r,e){var t=Gt([],$ht,r,e);if(t.length==2)return ki(t)}function Jht(r,e){var t={};return t.format=r.getAttribute("format"),t.href=yp(r),t}function Ax(r,e){var t=$t(r).split(/\s+/);if(!(!t||t.length!=2)){var n=+t[0],i=+t[1];if(!(isNaN(n)||isNaN(i)))return[n,i]}}function tct(r,e){return Gt({},jht,r,e)}function ect(r,e){return Gt([],Hht,r,e)}function rct(r,e){return Gt({},Ght,r,e)}var nct=Pht,ict=Object.freeze(Object.defineProperty({__proto__:null,EsriJSON:mat,GeoJSON:Nat,GML:qat,GPX:Iot,IGC:Hot,IIIFInfo:Utt,KML:TAt,MVT:qAt,OWS:G6,Polyline:Glt,TopoJSON:tut,WFS:Tut,WKB:Iut,WKT:jut,WMSCapabilities:Sht,WMSGetFeatureInfo:Rht,WMTSCapabilities:nct},Symbol.toStringTag,{value:"Module"}));function lx(r){if(lx.installed){console.error("OPENLAYERS MAP ALREADY INSTALLED");return}lx.installed=!0,r.use(IZ),r.use(bet),r.use(Xet),r.use(Vnt),r.use(nit),r.use(yit),r.use(Oit),r.use(qit),r.provide("ol-feature",nr),r.provide("ol-geom",tat),r.provide("ol-animations",mV),r.provide("ol-format",ict),r.provide("ol-loadingstrategy",mz),r.provide("ol-selectconditions",Zj),r.provide("ol-extent",z9)}/*!
|
||
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
||
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
||
* Released under MIT License
|
||
*//*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var ux=function(r,e){return ux=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},ux(r,e)};function Is(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ux(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var hx=function(){return hx=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++){t=arguments[n];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},hx.apply(this,arguments)};function La(r,e,t,n){function i(a){return a instanceof t?a:new t(function(o){o(a)})}return new(t||(t=Promise))(function(a,o){function s(u){try{l(n.next(u))}catch(h){o(h)}}function A(u){try{l(n.throw(u))}catch(h){o(h)}}function l(u){u.done?a(u.value):i(u.value).then(s,A)}l((n=n.apply(r,e||[])).next())})}function ca(r,e){var t={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(u){return A([l,u])}}function A(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(a=t.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){t.label=l[1];break}if(l[0]===6&&t.label<a[1]){t.label=a[1],a=l;break}if(a&&t.label<a[2]){t.label=a[2],t.ops.push(l);break}a[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function Ky(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;n<i;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return r.concat(a||e)}var rl=function(){function r(e,t,n,i){this.left=e,this.top=t,this.width=n,this.height=i}return r.prototype.add=function(e,t,n,i){return new r(this.left+e,this.top+t,this.width+n,this.height+i)},r.fromClientRect=function(e,t){return new r(t.left+e.windowBounds.left,t.top+e.windowBounds.top,t.width,t.height)},r.fromDOMRectList=function(e,t){var n=Array.from(t).find(function(i){return i.width!==0});return n?new r(n.left+e.windowBounds.left,n.top+e.windowBounds.top,n.width,n.height):r.EMPTY},r.EMPTY=new r(0,0,0,0),r}(),g1=function(r,e){return rl.fromClientRect(r,e.getBoundingClientRect())},act=function(r){var e=r.body,t=r.documentElement;if(!e||!t)throw new Error("Unable to get document size");var n=Math.max(Math.max(e.scrollWidth,t.scrollWidth),Math.max(e.offsetWidth,t.offsetWidth),Math.max(e.clientWidth,t.clientWidth)),i=Math.max(Math.max(e.scrollHeight,t.scrollHeight),Math.max(e.offsetHeight,t.offsetHeight),Math.max(e.clientHeight,t.clientHeight));return new rl(0,0,n,i)},y1=function(r){for(var e=[],t=0,n=r.length;t<n;){var i=r.charCodeAt(t++);if(i>=55296&&i<=56319&&t<n){var a=r.charCodeAt(t++);(a&64512)===56320?e.push(((i&1023)<<10)+(a&1023)+65536):(e.push(i),t--)}else e.push(i)}return e},Yn=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var t=r.length;if(!t)return"";for(var n=[],i=-1,a="";++i<t;){var o=r[i];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(i+1===t||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},JO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oct=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Yy=0;Yy<JO.length;Yy++)oct[JO.charCodeAt(Yy)]=Yy;var tM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Nd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var zy=0;zy<tM.length;zy++)Nd[tM.charCodeAt(zy)]=zy;var sct=function(r){var e=r.length*.75,t=r.length,n,i=0,a,o,s,A;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)a=Nd[r.charCodeAt(n)],o=Nd[r.charCodeAt(n+1)],s=Nd[r.charCodeAt(n+2)],A=Nd[r.charCodeAt(n+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|A&63;return l},Act=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},lct=function(r){for(var e=r.length,t=[],n=0;n<e;n+=4)t.push(r[n+3]<<24|r[n+2]<<16|r[n+1]<<8|r[n]);return t},Ih=5,yL=6+5,ME=2,uct=yL-Ih,iQ=65536>>Ih,hct=1<<Ih,PE=hct-1,cct=1024>>Ih,fct=iQ+cct,pct=fct,dct=32,vct=pct+dct,gct=65536>>yL,yct=1<<uct,mct=yct-1,eM=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},_ct=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},wct=function(r,e){var t=sct(r),n=Array.isArray(t)?lct(t):new Uint32Array(t),i=Array.isArray(t)?Act(t):new Uint16Array(t),a=24,o=eM(i,a/2,n[4]/2),s=n[5]===2?eM(i,(a+n[4])/2):_ct(n,Math.ceil((a+n[4])/4));return new Ect(n[0],n[1],n[2],n[3],o,s)},Ect=function(){function r(e,t,n,i,a,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=i,this.index=a,this.data=o}return r.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Ih],t=(t<<ME)+(e&PE),this.data[t];if(e<=65535)return t=this.index[iQ+(e-55296>>Ih)],t=(t<<ME)+(e&PE),this.data[t];if(e<this.highStart)return t=vct-gct+(e>>yL),t=this.index[t],t+=e>>Ih&mct,t=this.index[t],t=(t<<ME)+(e&PE),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),rM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cct=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Xy=0;Xy<rM.length;Xy++)Cct[rM.charCodeAt(Xy)]=Xy;var Bct="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",nM=50,Tct=1,aQ=2,oQ=3,xct=4,Sct=5,iM=7,sQ=8,aM=9,iu=10,cx=11,oM=12,fx=13,bct=14,Ud=15,px=16,Wy=17,pd=18,Lct=19,sM=20,dx=21,dd=22,NE=23,$c=24,yo=25,Dd=26,Qd=27,Vc=28,Fct=29,ph=30,Ict=31,qy=32,Zy=33,vx=34,gx=35,yx=36,Gv=37,mx=38,Y0=39,z0=40,UE=41,AQ=42,Rct=43,Oct=[9001,65288],lQ="!",gr="×",Jy="÷",_x=wct(Bct),MA=[ph,yx],wx=[Tct,aQ,oQ,Sct],uQ=[iu,sQ],AM=[Qd,Dd],Mct=wx.concat(uQ),lM=[mx,Y0,z0,vx,gx],Pct=[Ud,fx],Nct=function(r,e){e===void 0&&(e="strict");var t=[],n=[],i=[];return r.forEach(function(a,o){var s=_x.get(a);if(s>nM?(i.push(!0),s-=nM):i.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(a)!==-1)return n.push(o),t.push(px);if(s===xct||s===cx){if(o===0)return n.push(o),t.push(ph);var A=t[o-1];return Mct.indexOf(A)===-1?(n.push(n[o-1]),t.push(A)):(n.push(o),t.push(ph))}if(n.push(o),s===Ict)return t.push(e==="strict"?dx:Gv);if(s===AQ||s===Fct)return t.push(ph);if(s===Rct)return a>=131072&&a<=196605||a>=196608&&a<=262141?t.push(Gv):t.push(ph);t.push(s)}),[n,t,i]},DE=function(r,e,t,n){var i=n[t];if(Array.isArray(r)?r.indexOf(i)!==-1:r===i)for(var a=t;a<=n.length;){a++;var o=n[a];if(o===e)return!0;if(o!==iu)break}if(i===iu)for(var a=t;a>0;){a--;var s=n[a];if(Array.isArray(r)?r.indexOf(s)!==-1:r===s)for(var A=t;A<=n.length;){A++;var o=n[A];if(o===e)return!0;if(o!==iu)break}if(s!==iu)break}return!1},uM=function(r,e){for(var t=r;t>=0;){var n=e[t];if(n===iu)t--;else return n}return 0},Uct=function(r,e,t,n,i){if(t[n]===0)return gr;var a=n-1;if(Array.isArray(i)&&i[a]===!0)return gr;var o=a-1,s=a+1,A=e[a],l=o>=0?e[o]:0,u=e[s];if(A===aQ&&u===oQ)return gr;if(wx.indexOf(A)!==-1)return lQ;if(wx.indexOf(u)!==-1||uQ.indexOf(u)!==-1)return gr;if(uM(a,e)===sQ)return Jy;if(_x.get(r[a])===cx||(A===qy||A===Zy)&&_x.get(r[s])===cx||A===iM||u===iM||A===aM||[iu,fx,Ud].indexOf(A)===-1&&u===aM||[Wy,pd,Lct,$c,Vc].indexOf(u)!==-1||uM(a,e)===dd||DE(NE,dd,a,e)||DE([Wy,pd],dx,a,e)||DE(oM,oM,a,e))return gr;if(A===iu)return Jy;if(A===NE||u===NE)return gr;if(u===px||A===px)return Jy;if([fx,Ud,dx].indexOf(u)!==-1||A===bct||l===yx&&Pct.indexOf(A)!==-1||A===Vc&&u===yx||u===sM||MA.indexOf(u)!==-1&&A===yo||MA.indexOf(A)!==-1&&u===yo||A===Qd&&[Gv,qy,Zy].indexOf(u)!==-1||[Gv,qy,Zy].indexOf(A)!==-1&&u===Dd||MA.indexOf(A)!==-1&&AM.indexOf(u)!==-1||AM.indexOf(A)!==-1&&MA.indexOf(u)!==-1||[Qd,Dd].indexOf(A)!==-1&&(u===yo||[dd,Ud].indexOf(u)!==-1&&e[s+1]===yo)||[dd,Ud].indexOf(A)!==-1&&u===yo||A===yo&&[yo,Vc,$c].indexOf(u)!==-1)return gr;if([yo,Vc,$c,Wy,pd].indexOf(u)!==-1)for(var h=a;h>=0;){var c=e[h];if(c===yo)return gr;if([Vc,$c].indexOf(c)!==-1)h--;else break}if([Qd,Dd].indexOf(u)!==-1)for(var h=[Wy,pd].indexOf(A)!==-1?o:a;h>=0;){var c=e[h];if(c===yo)return gr;if([Vc,$c].indexOf(c)!==-1)h--;else break}if(mx===A&&[mx,Y0,vx,gx].indexOf(u)!==-1||[Y0,vx].indexOf(A)!==-1&&[Y0,z0].indexOf(u)!==-1||[z0,gx].indexOf(A)!==-1&&u===z0||lM.indexOf(A)!==-1&&[sM,Dd].indexOf(u)!==-1||lM.indexOf(u)!==-1&&A===Qd||MA.indexOf(A)!==-1&&MA.indexOf(u)!==-1||A===$c&&MA.indexOf(u)!==-1||MA.concat(yo).indexOf(A)!==-1&&u===dd&&Oct.indexOf(r[s])===-1||MA.concat(yo).indexOf(u)!==-1&&A===pd)return gr;if(A===UE&&u===UE){for(var f=t[a],d=1;f>0&&(f--,e[f]===UE);)d++;if(d%2!==0)return gr}return A===qy&&u===Zy?gr:Jy},Dct=function(r,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=Nct(r,e.lineBreak),n=t[0],i=t[1],a=t[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(i=i.map(function(s){return[yo,ph,AQ].indexOf(s)!==-1?Gv:s}));var o=e.wordBreak==="keep-all"?a.map(function(s,A){return s&&r[A]>=19968&&r[A]<=40959}):void 0;return[n,i,o]},Qct=function(){function r(e,t,n,i){this.codePoints=e,this.required=t===lQ,this.start=n,this.end=i}return r.prototype.slice=function(){return Yn.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),Hct=function(r,e){var t=y1(r),n=Dct(t,e),i=n[0],a=n[1],o=n[2],s=t.length,A=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var u=gr;l<s&&(u=Uct(t,a,i,++l,o))===gr;);if(u!==gr||l===s){var h=new Qct(t,u,A,l);return A=l,{value:h,done:!1}}return{done:!0,value:null}}}},Gct=1<<0,kct=1<<1,vg=1<<2,hM=1<<3,Jm=10,cM=47,ov=92,$ct=9,Vct=32,t0=34,vd=61,jct=35,Kct=36,Yct=37,e0=39,r0=40,gd=41,zct=95,Ja=45,Xct=33,Wct=60,qct=62,Zct=64,Jct=91,tft=93,eft=61,rft=123,n0=63,nft=125,fM=124,ift=126,aft=128,pM=65533,QE=42,_h=43,oft=44,sft=58,Aft=59,kv=46,lft=0,uft=8,hft=11,cft=14,fft=31,pft=127,Us=-1,hQ=48,cQ=97,fQ=101,dft=102,vft=117,gft=122,pQ=65,dQ=69,vQ=70,yft=85,mft=90,pa=function(r){return r>=hQ&&r<=57},_ft=function(r){return r>=55296&&r<=57343},jc=function(r){return pa(r)||r>=pQ&&r<=vQ||r>=cQ&&r<=dft},wft=function(r){return r>=cQ&&r<=gft},Eft=function(r){return r>=pQ&&r<=mft},Cft=function(r){return wft(r)||Eft(r)},Bft=function(r){return r>=aft},i0=function(r){return r===Jm||r===$ct||r===Vct},t_=function(r){return Cft(r)||Bft(r)||r===zct},dM=function(r){return t_(r)||pa(r)||r===Ja},Tft=function(r){return r>=lft&&r<=uft||r===hft||r>=cft&&r<=fft||r===pft},Xl=function(r,e){return r!==ov?!1:e!==Jm},a0=function(r,e,t){return r===Ja?t_(e)||Xl(e,t):t_(r)?!0:!!(r===ov&&Xl(r,e))},HE=function(r,e,t){return r===_h||r===Ja?pa(e)?!0:e===kv&&pa(t):pa(r===kv?e:r)},xft=function(r){var e=0,t=1;(r[e]===_h||r[e]===Ja)&&(r[e]===Ja&&(t=-1),e++);for(var n=[];pa(r[e]);)n.push(r[e++]);var i=n.length?parseInt(Yn.apply(void 0,n),10):0;r[e]===kv&&e++;for(var a=[];pa(r[e]);)a.push(r[e++]);var o=a.length,s=o?parseInt(Yn.apply(void 0,a),10):0;(r[e]===dQ||r[e]===fQ)&&e++;var A=1;(r[e]===_h||r[e]===Ja)&&(r[e]===Ja&&(A=-1),e++);for(var l=[];pa(r[e]);)l.push(r[e++]);var u=l.length?parseInt(Yn.apply(void 0,l),10):0;return t*(i+s*Math.pow(10,-o))*Math.pow(10,A*u)},Sft={type:2},bft={type:3},Lft={type:4},Fft={type:13},Ift={type:8},Rft={type:21},Oft={type:9},Mft={type:10},Pft={type:11},Nft={type:12},Uft={type:14},o0={type:23},Dft={type:1},Qft={type:25},Hft={type:24},Gft={type:26},kft={type:27},$ft={type:28},Vft={type:29},jft={type:31},Ex={type:32},gQ=function(){function r(){this._value=[]}return r.prototype.write=function(e){this._value=this._value.concat(y1(e))},r.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==Ex;)e.push(t),t=this.consumeToken();return e},r.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case t0:return this.consumeStringToken(t0);case jct:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),i=this.peekCodePoint(2);if(dM(t)||Xl(n,i)){var a=a0(t,n,i)?kct:Gct,o=this.consumeName();return{type:5,value:o,flags:a}}break;case Kct:if(this.peekCodePoint(0)===vd)return this.consumeCodePoint(),Fft;break;case e0:return this.consumeStringToken(e0);case r0:return Sft;case gd:return bft;case QE:if(this.peekCodePoint(0)===vd)return this.consumeCodePoint(),Uft;break;case _h:if(HE(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case oft:return Lft;case Ja:var s=e,A=this.peekCodePoint(0),l=this.peekCodePoint(1);if(HE(s,A,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(a0(s,A,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(A===Ja&&l===qct)return this.consumeCodePoint(),this.consumeCodePoint(),Hft;break;case kv:if(HE(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case cM:if(this.peekCodePoint(0)===QE)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===QE&&(u=this.consumeCodePoint(),u===cM))return this.consumeToken();if(u===Us)return this.consumeToken()}break;case sft:return Gft;case Aft:return kft;case Wct:if(this.peekCodePoint(0)===Xct&&this.peekCodePoint(1)===Ja&&this.peekCodePoint(2)===Ja)return this.consumeCodePoint(),this.consumeCodePoint(),Qft;break;case Zct:var h=this.peekCodePoint(0),c=this.peekCodePoint(1),f=this.peekCodePoint(2);if(a0(h,c,f)){var o=this.consumeName();return{type:7,value:o}}break;case Jct:return $ft;case ov:if(Xl(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case tft:return Vft;case eft:if(this.peekCodePoint(0)===vd)return this.consumeCodePoint(),Ift;break;case rft:return Pft;case nft:return Nft;case vft:case yft:var d=this.peekCodePoint(0),v=this.peekCodePoint(1);return d===_h&&(jc(v)||v===n0)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case fM:if(this.peekCodePoint(0)===vd)return this.consumeCodePoint(),Oft;if(this.peekCodePoint(0)===fM)return this.consumeCodePoint(),Rft;break;case ift:if(this.peekCodePoint(0)===vd)return this.consumeCodePoint(),Mft;break;case Us:return Ex}return i0(e)?(this.consumeWhiteSpace(),jft):pa(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):t_(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:Yn(e)}},r.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},r.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},r.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},r.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();jc(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===n0&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var i=parseInt(Yn.apply(void 0,e.map(function(A){return A===n0?hQ:A})),16),a=parseInt(Yn.apply(void 0,e.map(function(A){return A===n0?vQ:A})),16);return{type:30,start:i,end:a}}var o=parseInt(Yn.apply(void 0,e),16);if(this.peekCodePoint(0)===Ja&&jc(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];jc(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();var a=parseInt(Yn.apply(void 0,s),16);return{type:30,start:o,end:a}}else return{type:30,start:o,end:o}},r.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===r0?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===r0?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},r.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Us)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===e0||t===t0){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Us||this.peekCodePoint(0)===gd)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),o0)}for(;;){var i=this.consumeCodePoint();if(i===Us||i===gd)return{type:22,value:Yn.apply(void 0,e)};if(i0(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Us||this.peekCodePoint(0)===gd?(this.consumeCodePoint(),{type:22,value:Yn.apply(void 0,e)}):(this.consumeBadUrlRemnants(),o0);if(i===t0||i===e0||i===r0||Tft(i))return this.consumeBadUrlRemnants(),o0;if(i===ov)if(Xl(i,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),o0;else e.push(i)}},r.prototype.consumeWhiteSpace=function(){for(;i0(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===gd||e===Us)return;Xl(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},r.prototype.consumeStringSlice=function(e){for(var t=5e4,n="";e>0;){var i=Math.min(t,e);n+=Yn.apply(void 0,this._value.splice(0,i)),e-=i}return this._value.shift(),n},r.prototype.consumeStringToken=function(e){var t="",n=0;do{var i=this._value[n];if(i===Us||i===void 0||i===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(i===Jm)return this._value.splice(0,n),Dft;if(i===ov){var a=this._value[n+1];a!==Us&&a!==void 0&&(a===Jm?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):Xl(i,a)&&(t+=this.consumeStringSlice(n),t+=Yn(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var e=[],t=vg,n=this.peekCodePoint(0);for((n===_h||n===Ja)&&e.push(this.consumeCodePoint());pa(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(n===kv&&pa(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=hM;pa(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),i=this.peekCodePoint(1);var a=this.peekCodePoint(2);if((n===dQ||n===fQ)&&((i===_h||i===Ja)&&pa(a)||pa(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=hM;pa(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[xft(e),t]},r.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],i=this.peekCodePoint(0),a=this.peekCodePoint(1),o=this.peekCodePoint(2);if(a0(i,a,o)){var s=this.consumeName();return{type:15,number:t,flags:n,unit:s}}return i===Yct?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(jc(e)){for(var t=Yn(e);jc(this.peekCodePoint(0))&&t.length<6;)t+=Yn(this.consumeCodePoint());i0(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||_ft(n)||n>1114111?pM:n}return e===Us?pM:e},r.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(dM(t))e+=Yn(t);else if(Xl(t,this.peekCodePoint(0)))e+=Yn(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},r}(),yQ=function(){function r(e){this._tokens=e}return r.create=function(e){var t=new gQ;return t.write(e),new r(t.read())},r.parseValue=function(e){return r.create(e).parseComponentValue()},r.parseValues=function(e){return r.create(e).parseComponentValues()},r.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},r.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},r.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},r.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||Yft(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},r.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},r.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?Ex:e},r.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},r}(),gg=function(r){return r.type===15},wp=function(r){return r.type===17},rn=function(r){return r.type===20},Kft=function(r){return r.type===0},Cx=function(r,e){return rn(r)&&r.value===e},mQ=function(r){return r.type!==31},tp=function(r){return r.type!==31&&r.type!==4},uA=function(r){var e=[],t=[];return r.forEach(function(n){if(n.type===4){if(t.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(t),t=[];return}n.type!==31&&t.push(n)}),t.length&&e.push(t),e},Yft=function(r,e){return e===11&&r.type===12||e===28&&r.type===29?!0:e===2&&r.type===3},bu=function(r){return r.type===17||r.type===15},pi=function(r){return r.type===16||bu(r)},_Q=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},Ji={type:17,number:0,flags:vg},mL={type:16,number:50,flags:vg},au={type:16,number:100,flags:vg},Hd=function(r,e,t){var n=r[0],i=r[1];return[pn(n,e),pn(typeof i<"u"?i:n,t)]},pn=function(r,e){if(r.type===16)return r.number/100*e;if(gg(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},wQ="deg",EQ="grad",CQ="rad",BQ="turn",m1={name:"angle",parse:function(r,e){if(e.type===15)switch(e.unit){case wQ:return Math.PI*e.number/180;case EQ:return Math.PI/200*e.number;case CQ:return e.number;case BQ:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},TQ=function(r){return r.type===15&&(r.unit===wQ||r.unit===EQ||r.unit===CQ||r.unit===BQ)},xQ=function(r){var e=r.filter(rn).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ji,Ji];case"to top":case"bottom":return ko(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ji,au];case"to right":case"left":return ko(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[au,au];case"to bottom":case"top":return ko(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[au,Ji];case"to left":case"right":return ko(270)}return 0},ko=function(r){return Math.PI*r/180},fu={name:"color",parse:function(r,e){if(e.type===18){var t=zft[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return t(r,e.values)}if(e.type===5){if(e.value.length===3){var n=e.value.substring(0,1),i=e.value.substring(1,2),a=e.value.substring(2,3);return ou(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(e.value.length===4){var n=e.value.substring(0,1),i=e.value.substring(1,2),a=e.value.substring(2,3),o=e.value.substring(3,4);return ou(parseInt(n+n,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(e.value.length===6){var n=e.value.substring(0,2),i=e.value.substring(2,4),a=e.value.substring(4,6);return ou(parseInt(n,16),parseInt(i,16),parseInt(a,16),1)}if(e.value.length===8){var n=e.value.substring(0,2),i=e.value.substring(2,4),a=e.value.substring(4,6),o=e.value.substring(6,8);return ou(parseInt(n,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(e.type===20){var s=WA[e.value.toUpperCase()];if(typeof s<"u")return s}return WA.TRANSPARENT}},pu=function(r){return(255&r)===0},Qi=function(r){var e=255&r,t=255&r>>8,n=255&r>>16,i=255&r>>24;return e<255?"rgba("+i+","+n+","+t+","+e/255+")":"rgb("+i+","+n+","+t+")"},ou=function(r,e,t,n){return(r<<24|e<<16|t<<8|Math.round(n*255)<<0)>>>0},vM=function(r,e){if(r.type===17)return r.number;if(r.type===16){var t=e===3?1:255;return e===3?r.number/100*t:Math.round(r.number/100*t)}return 0},gM=function(r,e){var t=e.filter(tp);if(t.length===3){var n=t.map(vM),i=n[0],a=n[1],o=n[2];return ou(i,a,o,1)}if(t.length===4){var s=t.map(vM),i=s[0],a=s[1],o=s[2],A=s[3];return ou(i,a,o,A)}return 0};function GE(r,e,t){return t<0&&(t+=1),t>=1&&(t-=1),t<1/6?(e-r)*t*6+r:t<1/2?e:t<2/3?(e-r)*6*(2/3-t)+r:r}var yM=function(r,e){var t=e.filter(tp),n=t[0],i=t[1],a=t[2],o=t[3],s=(n.type===17?ko(n.number):m1.parse(r,n))/(Math.PI*2),A=pi(i)?i.number/100:0,l=pi(a)?a.number/100:0,u=typeof o<"u"&&pi(o)?pn(o,1):1;if(A===0)return ou(l*255,l*255,l*255,1);var h=l<=.5?l*(A+1):l+A-l*A,c=l*2-h,f=GE(c,h,s+1/3),d=GE(c,h,s),v=GE(c,h,s-1/3);return ou(f*255,d*255,v*255,u)},zft={hsl:yM,hsla:yM,rgb:gM,rgba:gM},sv=function(r,e){return fu.parse(r,yQ.create(e).parseComponentValue())},WA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Xft={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(rn(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Wft={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},_1=function(r,e){var t=fu.parse(r,e[0]),n=e[1];return n&&pi(n)?{color:t,stop:n}:{color:t,stop:null}},mM=function(r,e){var t=r[0],n=r[r.length-1];t.stop===null&&(t.stop=Ji),n.stop===null&&(n.stop=au);for(var i=[],a=0,o=0;o<r.length;o++){var s=r[o].stop;if(s!==null){var A=pn(s,e);A>a?i.push(A):i.push(a),a=A}else i.push(null)}for(var l=null,o=0;o<i.length;o++){var u=i[o];if(u===null)l===null&&(l=o);else if(l!==null){for(var h=o-l,c=i[l-1],f=(u-c)/(h+1),d=1;d<=h;d++)i[l+d-1]=f*d;l=null}}return r.map(function(v,y){var m=v.color;return{color:m,stop:Math.max(Math.min(1,i[y]/e),0)}})},qft=function(r,e,t){var n=e/2,i=t/2,a=pn(r[0],e)-n,o=i-pn(r[1],t);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},Zft=function(r,e,t){var n=typeof r=="number"?r:qft(r,e,t),i=Math.abs(e*Math.sin(n))+Math.abs(t*Math.cos(n)),a=e/2,o=t/2,s=i/2,A=Math.sin(n-Math.PI/2)*s,l=Math.cos(n-Math.PI/2)*s;return[i,a-l,a+l,o-A,o+A]},hs=function(r,e){return Math.sqrt(r*r+e*e)},_M=function(r,e,t,n,i){var a=[[0,0],[0,e],[r,0],[r,e]];return a.reduce(function(o,s){var A=s[0],l=s[1],u=hs(t-A,n-l);return(i?u<o.optimumDistance:u>o.optimumDistance)?{optimumCorner:s,optimumDistance:u}:o},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},Jft=function(r,e,t,n,i){var a=0,o=0;switch(r.size){case 0:r.shape===0?a=o=Math.min(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-i)):r.shape===1&&(a=Math.min(Math.abs(e),Math.abs(e-n)),o=Math.min(Math.abs(t),Math.abs(t-i)));break;case 2:if(r.shape===0)a=o=Math.min(hs(e,t),hs(e,t-i),hs(e-n,t),hs(e-n,t-i));else if(r.shape===1){var s=Math.min(Math.abs(t),Math.abs(t-i))/Math.min(Math.abs(e),Math.abs(e-n)),A=_M(n,i,e,t,!0),l=A[0],u=A[1];a=hs(l-e,(u-t)/s),o=s*a}break;case 1:r.shape===0?a=o=Math.max(Math.abs(e),Math.abs(e-n),Math.abs(t),Math.abs(t-i)):r.shape===1&&(a=Math.max(Math.abs(e),Math.abs(e-n)),o=Math.max(Math.abs(t),Math.abs(t-i)));break;case 3:if(r.shape===0)a=o=Math.max(hs(e,t),hs(e,t-i),hs(e-n,t),hs(e-n,t-i));else if(r.shape===1){var s=Math.max(Math.abs(t),Math.abs(t-i))/Math.max(Math.abs(e),Math.abs(e-n)),h=_M(n,i,e,t,!1),l=h[0],u=h[1];a=hs(l-e,(u-t)/s),o=s*a}break}return Array.isArray(r.size)&&(a=pn(r.size[0],n),o=r.size.length===2?pn(r.size[1],i):a),[a,o]},tpt=function(r,e){var t=ko(180),n=[];return uA(e).forEach(function(i,a){if(a===0){var o=i[0];if(o.type===20&&o.value==="to"){t=xQ(i);return}else if(TQ(o)){t=m1.parse(r,o);return}}var s=_1(r,i);n.push(s)}),{angle:t,stops:n,type:1}},s0=function(r,e){var t=ko(180),n=[];return uA(e).forEach(function(i,a){if(a===0){var o=i[0];if(o.type===20&&["top","left","right","bottom"].indexOf(o.value)!==-1){t=xQ(i);return}else if(TQ(o)){t=(m1.parse(r,o)+ko(270))%ko(360);return}}var s=_1(r,i);n.push(s)}),{angle:t,stops:n,type:1}},ept=function(r,e){var t=ko(180),n=[],i=1,a=0,o=3,s=[];return uA(e).forEach(function(A,l){var u=A[0];if(l===0){if(rn(u)&&u.value==="linear"){i=1;return}else if(rn(u)&&u.value==="radial"){i=2;return}}if(u.type===18){if(u.name==="from"){var h=fu.parse(r,u.values[0]);n.push({stop:Ji,color:h})}else if(u.name==="to"){var h=fu.parse(r,u.values[0]);n.push({stop:au,color:h})}else if(u.name==="color-stop"){var c=u.values.filter(tp);if(c.length===2){var h=fu.parse(r,c[1]),f=c[0];wp(f)&&n.push({stop:{type:16,number:f.number*100,flags:f.flags},color:h})}}}}),i===1?{angle:(t+ko(180))%ko(360),stops:n,type:i}:{size:o,shape:a,stops:n,position:s,type:i}},SQ="closest-side",bQ="farthest-side",LQ="closest-corner",FQ="farthest-corner",IQ="circle",RQ="ellipse",OQ="cover",MQ="contain",rpt=function(r,e){var t=0,n=3,i=[],a=[];return uA(e).forEach(function(o,s){var A=!0;if(s===0){var l=!1;A=o.reduce(function(h,c){if(l)if(rn(c))switch(c.value){case"center":return a.push(mL),h;case"top":case"left":return a.push(Ji),h;case"right":case"bottom":return a.push(au),h}else(pi(c)||bu(c))&&a.push(c);else if(rn(c))switch(c.value){case IQ:return t=0,!1;case RQ:return t=1,!1;case"at":return l=!0,!1;case SQ:return n=0,!1;case OQ:case bQ:return n=1,!1;case MQ:case LQ:return n=2,!1;case FQ:return n=3,!1}else if(bu(c)||pi(c))return Array.isArray(n)||(n=[]),n.push(c),!1;return h},A)}if(A){var u=_1(r,o);i.push(u)}}),{size:n,shape:t,stops:i,position:a,type:2}},A0=function(r,e){var t=0,n=3,i=[],a=[];return uA(e).forEach(function(o,s){var A=!0;if(s===0?A=o.reduce(function(u,h){if(rn(h))switch(h.value){case"center":return a.push(mL),!1;case"top":case"left":return a.push(Ji),!1;case"right":case"bottom":return a.push(au),!1}else if(pi(h)||bu(h))return a.push(h),!1;return u},A):s===1&&(A=o.reduce(function(u,h){if(rn(h))switch(h.value){case IQ:return t=0,!1;case RQ:return t=1,!1;case MQ:case SQ:return n=0,!1;case bQ:return n=1,!1;case LQ:return n=2,!1;case OQ:case FQ:return n=3,!1}else if(bu(h)||pi(h))return Array.isArray(n)||(n=[]),n.push(h),!1;return u},A)),A){var l=_1(r,o);i.push(l)}}),{size:n,shape:t,stops:i,position:a,type:2}},npt=function(r){return r.type===1},ipt=function(r){return r.type===2},_L={name:"image",parse:function(r,e){if(e.type===22){var t={url:e.value,type:0};return r.cache.addImage(e.value),t}if(e.type===18){var n=PQ[e.name];if(typeof n>"u")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return n(r,e.values)}throw new Error("Unsupported image type "+e.type)}};function apt(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!PQ[r.name])}var PQ={"linear-gradient":tpt,"-moz-linear-gradient":s0,"-ms-linear-gradient":s0,"-o-linear-gradient":s0,"-webkit-linear-gradient":s0,"radial-gradient":rpt,"-moz-radial-gradient":A0,"-ms-radial-gradient":A0,"-o-radial-gradient":A0,"-webkit-radial-gradient":A0,"-webkit-gradient":ept},opt={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(r,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e.filter(function(n){return tp(n)&&apt(n)}).map(function(n){return _L.parse(r,n)})}},spt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(rn(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Apt={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,e){return uA(e).map(function(t){return t.filter(pi)}).map(_Q)}},lpt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,e){return uA(e).map(function(t){return t.filter(rn).map(function(n){return n.value}).join(" ")}).map(upt)}},upt=function(r){switch(r){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Uf;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(Uf||(Uf={}));var hpt={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,e){return uA(e).map(function(t){return t.filter(cpt)})}},cpt=function(r){return rn(r)||pi(r)},w1=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},fpt=w1("top"),ppt=w1("right"),dpt=w1("bottom"),vpt=w1("left"),E1=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return _Q(t.filter(pi))}}},gpt=E1("top-left"),ypt=E1("top-right"),mpt=E1("bottom-right"),_pt=E1("bottom-left"),C1=function(r){return{name:"border-"+r+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},wpt=C1("top"),Ept=C1("right"),Cpt=C1("bottom"),Bpt=C1("left"),B1=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return gg(t)?t.number:0}}},Tpt=B1("top"),xpt=B1("right"),Spt=B1("bottom"),bpt=B1("left"),Lpt={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Fpt={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},Ipt={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,e){return e.filter(rn).reduce(function(t,n){return t|Rpt(n.value)},0)}},Rpt=function(r){switch(r){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},Opt={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Mpt={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(r,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},e_;(function(r){r.NORMAL="normal",r.STRICT="strict"})(e_||(e_={}));var Ppt={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"strict":return e_.STRICT;case"normal":default:return e_.NORMAL}}},Npt={name:"line-height",initialValue:"normal",prefix:!1,type:4},wM=function(r,e){return rn(r)&&r.value==="normal"?1.2*e:r.type===17?e*r.number:pi(r)?pn(r,e):e},Upt={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,e){return e.type===20&&e.value==="none"?null:_L.parse(r,e)}},Dpt={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(r,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},Bx={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},T1=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},Qpt=T1("top"),Hpt=T1("right"),Gpt=T1("bottom"),kpt=T1("left"),$pt={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,e){return e.filter(rn).map(function(t){switch(t.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Vpt={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},x1=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},jpt=x1("top"),Kpt=x1("right"),Ypt=x1("bottom"),zpt=x1("left"),Xpt={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(r,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Wpt={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(r,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},qpt={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&Cx(e[0],"none")?[]:uA(e).map(function(t){for(var n={color:WA.TRANSPARENT,offsetX:Ji,offsetY:Ji,blur:Ji},i=0,a=0;a<t.length;a++){var o=t[a];bu(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:n.blur=o,i++):n.color=fu.parse(r,o)}return n})}},Zpt={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Jpt={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(r,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var t=rdt[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},tdt=function(r){var e=r.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},edt=function(r){var e=r.filter(function(A){return A.type===17}).map(function(A){return A.number}),t=e[0],n=e[1];e[2],e[3];var i=e[4],a=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var o=e[12],s=e[13];return e[14],e[15],e.length===16?[t,n,i,a,o,s]:null},rdt={matrix:tdt,matrix3d:edt},EM={type:16,number:50,flags:vg},ndt=[EM,EM],idt={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,e){var t=e.filter(pi);return t.length!==2?ndt:[t[0],t[1]]}},adt={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(r,e){switch(e){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Av;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(Av||(Av={}));var odt={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-all":return Av.BREAK_ALL;case"keep-all":return Av.KEEP_ALL;case"normal":default:return Av.NORMAL}}},sdt={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,e){if(e.type===20)return{auto:!0,order:0};if(wp(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},NQ={name:"time",parse:function(r,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},Adt={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,e){return wp(e)?e.number:1}},ldt={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},udt={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,e){return e.filter(rn).map(function(t){switch(t.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(t){return t!==0})}},hdt={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(r,e){var t=[],n=[];return e.forEach(function(i){switch(i.type){case 20:case 0:t.push(i.value);break;case 17:t.push(i.number.toString());break;case 4:n.push(t.join(" ")),t.length=0;break}}),t.length&&n.push(t.join(" ")),n.map(function(i){return i.indexOf(" ")===-1?i:"'"+i+"'"})}},cdt={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},fdt={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,e){if(wp(e))return e.number;if(rn(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},pdt={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.filter(rn).map(function(t){return t.value})}},ddt={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},bi=function(r,e){return(r&e)!==0},vdt={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(r,e){if(e.length===0)return[];var t=e[0];return t.type===20&&t.value==="none"?[]:e}},gdt={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;for(var n=[],i=e.filter(mQ),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(o.type===20){var A=s&&wp(s)?s.number:1;n.push({counter:o.value,increment:A})}}return n}},ydt={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return[];for(var t=[],n=e.filter(mQ),i=0;i<n.length;i++){var a=n[i],o=n[i+1];if(rn(a)&&a.value!=="none"){var s=o&&wp(o)?o.number:0;t.push({counter:a.value,reset:s})}}return t}},mdt={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(r,e){return e.filter(gg).map(function(t){return NQ.parse(r,t)})}},_dt={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return null;var t=e[0];if(t.type===20&&t.value==="none")return null;var n=[],i=e.filter(Kft);if(i.length%2!==0)return null;for(var a=0;a<i.length;a+=2){var o=i[a].value,s=i[a+1].value;n.push({open:o,close:s})}return n}},CM=function(r,e,t){if(!r)return"";var n=r[Math.min(e,r.length-1)];return n?t?n.open:n.close:""},wdt={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&Cx(e[0],"none")?[]:uA(e).map(function(t){for(var n={color:255,offsetX:Ji,offsetY:Ji,blur:Ji,spread:Ji,inset:!1},i=0,a=0;a<t.length;a++){var o=t[a];Cx(o,"inset")?n.inset=!0:bu(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:i===2?n.blur=o:n.spread=o,i++):n.color=fu.parse(r,o)}return n})}},Edt={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(r,e){var t=[0,1,2],n=[];return e.filter(rn).forEach(function(i){switch(i.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2);break}}),t.forEach(function(i){n.indexOf(i)===-1&&n.push(i)}),n}},Cdt={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Bdt={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(r,e){return gg(e)?e.number:0}},Tdt=function(){function r(e,t){var n,i;this.animationDuration=he(e,mdt,t.animationDuration),this.backgroundClip=he(e,Xft,t.backgroundClip),this.backgroundColor=he(e,Wft,t.backgroundColor),this.backgroundImage=he(e,opt,t.backgroundImage),this.backgroundOrigin=he(e,spt,t.backgroundOrigin),this.backgroundPosition=he(e,Apt,t.backgroundPosition),this.backgroundRepeat=he(e,lpt,t.backgroundRepeat),this.backgroundSize=he(e,hpt,t.backgroundSize),this.borderTopColor=he(e,fpt,t.borderTopColor),this.borderRightColor=he(e,ppt,t.borderRightColor),this.borderBottomColor=he(e,dpt,t.borderBottomColor),this.borderLeftColor=he(e,vpt,t.borderLeftColor),this.borderTopLeftRadius=he(e,gpt,t.borderTopLeftRadius),this.borderTopRightRadius=he(e,ypt,t.borderTopRightRadius),this.borderBottomRightRadius=he(e,mpt,t.borderBottomRightRadius),this.borderBottomLeftRadius=he(e,_pt,t.borderBottomLeftRadius),this.borderTopStyle=he(e,wpt,t.borderTopStyle),this.borderRightStyle=he(e,Ept,t.borderRightStyle),this.borderBottomStyle=he(e,Cpt,t.borderBottomStyle),this.borderLeftStyle=he(e,Bpt,t.borderLeftStyle),this.borderTopWidth=he(e,Tpt,t.borderTopWidth),this.borderRightWidth=he(e,xpt,t.borderRightWidth),this.borderBottomWidth=he(e,Spt,t.borderBottomWidth),this.borderLeftWidth=he(e,bpt,t.borderLeftWidth),this.boxShadow=he(e,wdt,t.boxShadow),this.color=he(e,Lpt,t.color),this.direction=he(e,Fpt,t.direction),this.display=he(e,Ipt,t.display),this.float=he(e,Opt,t.cssFloat),this.fontFamily=he(e,hdt,t.fontFamily),this.fontSize=he(e,cdt,t.fontSize),this.fontStyle=he(e,ddt,t.fontStyle),this.fontVariant=he(e,pdt,t.fontVariant),this.fontWeight=he(e,fdt,t.fontWeight),this.letterSpacing=he(e,Mpt,t.letterSpacing),this.lineBreak=he(e,Ppt,t.lineBreak),this.lineHeight=he(e,Npt,t.lineHeight),this.listStyleImage=he(e,Upt,t.listStyleImage),this.listStylePosition=he(e,Dpt,t.listStylePosition),this.listStyleType=he(e,Bx,t.listStyleType),this.marginTop=he(e,Qpt,t.marginTop),this.marginRight=he(e,Hpt,t.marginRight),this.marginBottom=he(e,Gpt,t.marginBottom),this.marginLeft=he(e,kpt,t.marginLeft),this.opacity=he(e,Adt,t.opacity);var a=he(e,$pt,t.overflow);this.overflowX=a[0],this.overflowY=a[a.length>1?1:0],this.overflowWrap=he(e,Vpt,t.overflowWrap),this.paddingTop=he(e,jpt,t.paddingTop),this.paddingRight=he(e,Kpt,t.paddingRight),this.paddingBottom=he(e,Ypt,t.paddingBottom),this.paddingLeft=he(e,zpt,t.paddingLeft),this.paintOrder=he(e,Edt,t.paintOrder),this.position=he(e,Wpt,t.position),this.textAlign=he(e,Xpt,t.textAlign),this.textDecorationColor=he(e,ldt,(n=t.textDecorationColor)!==null&&n!==void 0?n:t.color),this.textDecorationLine=he(e,udt,(i=t.textDecorationLine)!==null&&i!==void 0?i:t.textDecoration),this.textShadow=he(e,qpt,t.textShadow),this.textTransform=he(e,Zpt,t.textTransform),this.transform=he(e,Jpt,t.transform),this.transformOrigin=he(e,idt,t.transformOrigin),this.visibility=he(e,adt,t.visibility),this.webkitTextStrokeColor=he(e,Cdt,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=he(e,Bdt,t.webkitTextStrokeWidth),this.wordBreak=he(e,odt,t.wordBreak),this.zIndex=he(e,sdt,t.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return pu(this.backgroundColor)},r.prototype.isTransformed=function(){return this.transform!==null},r.prototype.isPositioned=function(){return this.position!==0},r.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},r.prototype.isFloating=function(){return this.float!==0},r.prototype.isInlineLevel=function(){return bi(this.display,4)||bi(this.display,33554432)||bi(this.display,268435456)||bi(this.display,536870912)||bi(this.display,67108864)||bi(this.display,134217728)},r}(),xdt=function(){function r(e,t){this.content=he(e,vdt,t.content),this.quotes=he(e,_dt,t.quotes)}return r}(),BM=function(){function r(e,t){this.counterIncrement=he(e,gdt,t.counterIncrement),this.counterReset=he(e,ydt,t.counterReset)}return r}(),he=function(r,e,t){var n=new gQ,i=t!==null&&typeof t<"u"?t.toString():e.initialValue;n.write(i);var a=new yQ(n.read());switch(e.type){case 2:var o=a.parseComponentValue();return e.parse(r,rn(o)?o.value:e.initialValue);case 0:return e.parse(r,a.parseComponentValue());case 1:return e.parse(r,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(e.format){case"angle":return m1.parse(r,a.parseComponentValue());case"color":return fu.parse(r,a.parseComponentValue());case"image":return _L.parse(r,a.parseComponentValue());case"length":var s=a.parseComponentValue();return bu(s)?s:Ji;case"length-percentage":var A=a.parseComponentValue();return pi(A)?A:Ji;case"time":return NQ.parse(r,a.parseComponentValue())}break}},Sdt="data-html2canvas-debug",bdt=function(r){var e=r.getAttribute(Sdt);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Tx=function(r,e){var t=bdt(r);return t===1||e===t},hA=function(){function r(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Tx(t,3))debugger;this.styles=new Tdt(e,window.getComputedStyle(t,null)),bx(t)&&(this.styles.animationDuration.some(function(n){return n>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=g1(this.context,t),Tx(t,4)&&(this.flags|=16)}return r}(),Ldt="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",TM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gd=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var l0=0;l0<TM.length;l0++)Gd[TM.charCodeAt(l0)]=l0;var Fdt=function(r){var e=r.length*.75,t=r.length,n,i=0,a,o,s,A;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(n=0;n<t;n+=4)a=Gd[r.charCodeAt(n)],o=Gd[r.charCodeAt(n+1)],s=Gd[r.charCodeAt(n+2)],A=Gd[r.charCodeAt(n+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|A&63;return l},Idt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},Rdt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=4)t.push(r[n+3]<<24|r[n+2]<<16|r[n+1]<<8|r[n]);return t},Rh=5,wL=6+5,kE=2,Odt=wL-Rh,UQ=65536>>Rh,Mdt=1<<Rh,$E=Mdt-1,Pdt=1024>>Rh,Ndt=UQ+Pdt,Udt=Ndt,Ddt=32,Qdt=Udt+Ddt,Hdt=65536>>wL,Gdt=1<<Odt,kdt=Gdt-1,xM=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},$dt=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},Vdt=function(r,e){var t=Fdt(r),n=Array.isArray(t)?Rdt(t):new Uint32Array(t),i=Array.isArray(t)?Idt(t):new Uint16Array(t),a=24,o=xM(i,a/2,n[4]/2),s=n[5]===2?xM(i,(a+n[4])/2):$dt(n,Math.ceil((a+n[4])/4));return new jdt(n[0],n[1],n[2],n[3],o,s)},jdt=function(){function r(e,t,n,i,a,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=i,this.index=a,this.data=o}return r.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Rh],t=(t<<kE)+(e&$E),this.data[t];if(e<=65535)return t=this.index[UQ+(e-55296>>Rh)],t=(t<<kE)+(e&$E),this.data[t];if(e<this.highStart)return t=Qdt-Hdt+(e>>wL),t=this.index[t],t+=e>>Rh&kdt,t=this.index[t],t=(t<<kE)+(e&$E),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),SM="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Kdt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var u0=0;u0<SM.length;u0++)Kdt[SM.charCodeAt(u0)]=u0;var Ydt=1,VE=2,jE=3,bM=4,LM=5,zdt=7,FM=8,KE=9,YE=10,IM=11,RM=12,OM=13,MM=14,zE=15,Xdt=function(r){for(var e=[],t=0,n=r.length;t<n;){var i=r.charCodeAt(t++);if(i>=55296&&i<=56319&&t<n){var a=r.charCodeAt(t++);(a&64512)===56320?e.push(((i&1023)<<10)+(a&1023)+65536):(e.push(i),t--)}else e.push(i)}return e},Wdt=function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,r);var t=r.length;if(!t)return"";for(var n=[],i=-1,a="";++i<t;){var o=r[i];o<=65535?n.push(o):(o-=65536,n.push((o>>10)+55296,o%1024+56320)),(i+1===t||n.length>16384)&&(a+=String.fromCharCode.apply(String,n),n.length=0)}return a},qdt=Vdt(Ldt),Qo="×",XE="÷",Zdt=function(r){return qdt.get(r)},Jdt=function(r,e,t){var n=t-2,i=e[n],a=e[t-1],o=e[t];if(a===VE&&o===jE)return Qo;if(a===VE||a===jE||a===bM||o===VE||o===jE||o===bM)return XE;if(a===FM&&[FM,KE,IM,RM].indexOf(o)!==-1||(a===IM||a===KE)&&(o===KE||o===YE)||(a===RM||a===YE)&&o===YE||o===OM||o===LM||o===zdt||a===Ydt)return Qo;if(a===OM&&o===MM){for(;i===LM;)i=e[--n];if(i===MM)return Qo}if(a===zE&&o===zE){for(var s=0;i===zE;)s++,i=e[--n];if(s%2===0)return Qo}return XE},tvt=function(r){var e=Xdt(r),t=e.length,n=0,i=0,a=e.map(Zdt);return{next:function(){if(n>=t)return{done:!0,value:null};for(var o=Qo;n<t&&(o=Jdt(e,a,++n))===Qo;);if(o!==Qo||n===t){var s=Wdt.apply(null,e.slice(i,n));return i=n,{value:s,done:!1}}return{done:!0,value:null}}}},evt=function(r){for(var e=tvt(r),t=[],n;!(n=e.next()).done;)n.value&&t.push(n.value.slice());return t},rvt=function(r){var e=123;if(r.createRange){var t=r.createRange();if(t.getBoundingClientRect){var n=r.createElement("boundtest");n.style.height=e+"px",n.style.display="block",r.body.appendChild(n),t.selectNode(n);var i=t.getBoundingClientRect(),a=Math.round(i.height);if(r.body.removeChild(n),a===e)return!0}}return!1},nvt=function(r){var e=r.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",r.body.appendChild(e);var t=r.createRange();e.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var n=e.firstChild,i=y1(n.data).map(function(A){return Yn(A)}),a=0,o={},s=i.every(function(A,l){t.setStart(n,a),t.setEnd(n,a+A.length);var u=t.getBoundingClientRect();a+=A.length;var h=u.x>o.x||u.y>o.y;return o=u,l===0?!0:h});return r.body.removeChild(e),s},ivt=function(){return typeof new Image().crossOrigin<"u"},avt=function(){return typeof new XMLHttpRequest().responseType=="string"},ovt=function(r){var e=new Image,t=r.createElement("canvas"),n=t.getContext("2d");if(!n)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(e,0,0),t.toDataURL()}catch{return!1}return!0},PM=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},svt=function(r){var e=r.createElement("canvas"),t=100;e.width=t,e.height=t;var n=e.getContext("2d");if(!n)return Promise.reject(!1);n.fillStyle="rgb(0, 255, 0)",n.fillRect(0,0,t,t);var i=new Image,a=e.toDataURL();i.src=a;var o=xx(t,t,0,0,i);return n.fillStyle="red",n.fillRect(0,0,t,t),NM(o).then(function(s){n.drawImage(s,0,0);var A=n.getImageData(0,0,t,t).data;n.fillStyle="red",n.fillRect(0,0,t,t);var l=r.createElement("div");return l.style.backgroundImage="url("+a+")",l.style.height=t+"px",PM(A)?NM(xx(t,t,0,0,l)):Promise.reject(!1)}).then(function(s){return n.drawImage(s,0,0),PM(n.getImageData(0,0,t,t).data)}).catch(function(){return!1})},xx=function(r,e,t,n,i){var a="http://www.w3.org/2000/svg",o=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return o.setAttributeNS(null,"width",r.toString()),o.setAttributeNS(null,"height",e.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",t.toString()),s.setAttributeNS(null,"y",n.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),o.appendChild(s),s.appendChild(i),o},NM=function(r){return new Promise(function(e,t){var n=new Image;n.onload=function(){return e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},qi={get SUPPORT_RANGE_BOUNDS(){var r=rvt(document);return Object.defineProperty(qi,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=qi.SUPPORT_RANGE_BOUNDS&&nvt(document);return Object.defineProperty(qi,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=ovt(document);return Object.defineProperty(qi,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?svt(document):Promise.resolve(!1);return Object.defineProperty(qi,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=ivt();return Object.defineProperty(qi,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=avt();return Object.defineProperty(qi,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(qi,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(qi,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},lv=function(){function r(e,t){this.text=e,this.bounds=t}return r}(),Avt=function(r,e,t,n){var i=hvt(e,t),a=[],o=0;return i.forEach(function(s){if(t.textDecorationLine.length||s.trim().length>0)if(qi.SUPPORT_RANGE_BOUNDS){var A=UM(n,o,s.length).getClientRects();if(A.length>1){var l=EL(s),u=0;l.forEach(function(c){a.push(new lv(c,rl.fromDOMRectList(r,UM(n,u+o,c.length).getClientRects()))),u+=c.length})}else a.push(new lv(s,rl.fromDOMRectList(r,A)))}else{var h=n.splitText(s.length);a.push(new lv(s,lvt(r,n))),n=h}else qi.SUPPORT_RANGE_BOUNDS||(n=n.splitText(s.length));o+=s.length}),a},lvt=function(r,e){var t=e.ownerDocument;if(t){var n=t.createElement("html2canvaswrapper");n.appendChild(e.cloneNode(!0));var i=e.parentNode;if(i){i.replaceChild(n,e);var a=g1(r,n);return n.firstChild&&i.replaceChild(n.firstChild,n),a}}return rl.EMPTY},UM=function(r,e,t){var n=r.ownerDocument;if(!n)throw new Error("Node has no owner document");var i=n.createRange();return i.setStart(r,e),i.setEnd(r,e+t),i},EL=function(r){if(qi.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(r)).map(function(t){return t.segment})}return evt(r)},uvt=function(r,e){if(qi.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(t.segment(r)).map(function(n){return n.segment})}return fvt(r,e)},hvt=function(r,e){return e.letterSpacing!==0?EL(r):uvt(r,e)},cvt=[32,160,4961,65792,65793,4153,4241],fvt=function(r,e){for(var t=Hct(r,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),n=[],i,a=function(){if(i.value){var o=i.value.slice(),s=y1(o),A="";s.forEach(function(l){cvt.indexOf(l)===-1?A+=Yn(l):(A.length&&n.push(A),n.push(Yn(l)),A="")}),A.length&&n.push(A)}};!(i=t.next()).done;)a();return n},pvt=function(){function r(e,t,n){this.text=dvt(t.data,n.textTransform),this.textBounds=Avt(e,this.text,n,t)}return r}(),dvt=function(r,e){switch(e){case 1:return r.toLowerCase();case 3:return r.replace(vvt,gvt);case 2:return r.toUpperCase();default:return r}},vvt=/(^|\s|:|-|\(|\))([a-z])/g,gvt=function(r,e,t){return r.length>0?e+t.toUpperCase():r},DQ=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.src=n.currentSrc||n.src,i.intrinsicWidth=n.naturalWidth,i.intrinsicHeight=n.naturalHeight,i.context.cache.addImage(i.src),i}return e}(hA),QQ=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.canvas=n,i.intrinsicWidth=n.width,i.intrinsicHeight=n.height,i}return e}(hA),HQ=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this,a=new XMLSerializer,o=g1(t,n);return n.setAttribute("width",o.width+"px"),n.setAttribute("height",o.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(a.serializeToString(n)),i.intrinsicWidth=n.width.baseVal.value,i.intrinsicHeight=n.height.baseVal.value,i.context.cache.addImage(i.svg),i}return e}(hA),GQ=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(hA),Sx=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.start=n.start,i.reversed=typeof n.reversed=="boolean"&&n.reversed===!0,i}return e}(hA),yvt=[{type:15,flags:0,unit:"px",number:3}],mvt=[{type:16,flags:0,number:50}],_vt=function(r){return r.width>r.height?new rl(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new rl(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r},wvt=function(r){var e=r.type===Evt?new Array(r.value.length+1).join("•"):r.value;return e.length===0?r.placeholder||"":e},r_="checkbox",n_="radio",Evt="password",DM=707406591,CL=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;switch(i.type=n.type.toLowerCase(),i.checked=n.checked,i.value=wvt(n),(i.type===r_||i.type===n_)&&(i.styles.backgroundColor=3739148031,i.styles.borderTopColor=i.styles.borderRightColor=i.styles.borderBottomColor=i.styles.borderLeftColor=2779096575,i.styles.borderTopWidth=i.styles.borderRightWidth=i.styles.borderBottomWidth=i.styles.borderLeftWidth=1,i.styles.borderTopStyle=i.styles.borderRightStyle=i.styles.borderBottomStyle=i.styles.borderLeftStyle=1,i.styles.backgroundClip=[0],i.styles.backgroundOrigin=[0],i.bounds=_vt(i.bounds)),i.type){case r_:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=yvt;break;case n_:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=mvt;break}return i}return e}(hA),kQ=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this,a=n.options[n.selectedIndex||0];return i.value=a&&a.text||"",i}return e}(hA),$Q=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(hA),VQ=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;i.src=n.src,i.width=parseInt(n.width,10)||0,i.height=parseInt(n.height,10)||0,i.backgroundColor=i.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){i.tree=KQ(t,n.contentWindow.document.documentElement);var a=n.contentWindow.document.documentElement?sv(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):WA.TRANSPARENT,o=n.contentWindow.document.body?sv(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):WA.TRANSPARENT;i.backgroundColor=pu(a)?pu(o)?i.styles.backgroundColor:o:a}}catch{}return i}return e}(hA),Cvt=["OL","UL","MENU"],X0=function(r,e,t,n){for(var i=e.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,YQ(i)&&i.data.trim().length>0)t.textNodes.push(new pvt(r,i,t.styles));else if(wf(i))if(qQ(i)&&i.assignedNodes)i.assignedNodes().forEach(function(s){return X0(r,s,t,n)});else{var o=jQ(r,i);o.styles.isVisible()&&(Bvt(i,o,n)?o.flags|=4:Tvt(o.styles)&&(o.flags|=2),Cvt.indexOf(i.tagName)!==-1&&(o.flags|=8),t.elements.push(o),i.slot,i.shadowRoot?X0(r,i.shadowRoot,o,n):!i_(i)&&!zQ(i)&&!a_(i)&&X0(r,i,o,n))}},jQ=function(r,e){return Lx(e)?new DQ(r,e):XQ(e)?new QQ(r,e):zQ(e)?new HQ(r,e):xvt(e)?new GQ(r,e):Svt(e)?new Sx(r,e):bvt(e)?new CL(r,e):a_(e)?new kQ(r,e):i_(e)?new $Q(r,e):WQ(e)?new VQ(r,e):new hA(r,e)},KQ=function(r,e){var t=jQ(r,e);return t.flags|=4,X0(r,e,t,t),t},Bvt=function(r,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||BL(r)&&t.styles.isTransparent()},Tvt=function(r){return r.isPositioned()||r.isFloating()},YQ=function(r){return r.nodeType===Node.TEXT_NODE},wf=function(r){return r.nodeType===Node.ELEMENT_NODE},bx=function(r){return wf(r)&&typeof r.style<"u"&&!W0(r)},W0=function(r){return typeof r.className=="object"},xvt=function(r){return r.tagName==="LI"},Svt=function(r){return r.tagName==="OL"},bvt=function(r){return r.tagName==="INPUT"},Lvt=function(r){return r.tagName==="HTML"},zQ=function(r){return r.tagName==="svg"},BL=function(r){return r.tagName==="BODY"},XQ=function(r){return r.tagName==="CANVAS"},QM=function(r){return r.tagName==="VIDEO"},Lx=function(r){return r.tagName==="IMG"},WQ=function(r){return r.tagName==="IFRAME"},HM=function(r){return r.tagName==="STYLE"},Fvt=function(r){return r.tagName==="SCRIPT"},i_=function(r){return r.tagName==="TEXTAREA"},a_=function(r){return r.tagName==="SELECT"},qQ=function(r){return r.tagName==="SLOT"},GM=function(r){return r.tagName.indexOf("-")>0},Ivt=function(){function r(){this.counters={}}return r.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},r.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},r.prototype.pop=function(e){var t=this;e.forEach(function(n){return t.counters[n].pop()})},r.prototype.parse=function(e){var t=this,n=e.counterIncrement,i=e.counterReset,a=!0;n!==null&&n.forEach(function(s){var A=t.counters[s.counter];A&&s.increment!==0&&(a=!1,A.length||A.push(1),A[Math.max(0,A.length-1)]+=s.increment)});var o=[];return a&&i.forEach(function(s){var A=t.counters[s.counter];o.push(s.counter),A||(A=t.counters[s.counter]=[]),A.push(s.reset)}),o},r}(),kM={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},$M={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Rvt={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Ovt={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Kc=function(r,e,t,n,i,a){return r<e||r>t?$v(r,i,a.length>0):n.integers.reduce(function(o,s,A){for(;r>=s;)r-=s,o+=n.values[A];return o},"")+a},ZQ=function(r,e,t,n){var i="";do t||r--,i=n(r)+i,r/=e;while(r*e>=e);return i},jn=function(r,e,t,n,i){var a=t-e+1;return(r<0?"-":"")+(ZQ(Math.abs(r),a,n,function(o){return Yn(Math.floor(o%a)+e)})+i)},Ju=function(r,e,t){t===void 0&&(t=". ");var n=e.length;return ZQ(Math.abs(r),n,!1,function(i){return e[Math.floor(i%n)]})+t},Af=1<<0,jl=1<<1,Kl=1<<2,kd=1<<3,PA=function(r,e,t,n,i,a){if(r<-9999||r>9999)return $v(r,4,i.length>0);var o=Math.abs(r),s=i;if(o===0)return e[0]+s;for(var A=0;o>0&&A<=4;A++){var l=o%10;l===0&&bi(a,Af)&&s!==""?s=e[l]+s:l>1||l===1&&A===0||l===1&&A===1&&bi(a,jl)||l===1&&A===1&&bi(a,Kl)&&r>100||l===1&&A>1&&bi(a,kd)?s=e[l]+(A>0?t[A-1]:"")+s:l===1&&A>0&&(s=t[A-1]+s),o=Math.floor(o/10)}return(r<0?n:"")+s},VM="十百千萬",jM="拾佰仟萬",KM="マイナス",WE="마이너스",$v=function(r,e,t){var n=t?". ":"",i=t?"、":"",a=t?", ":"",o=t?" ":"";switch(e){case 0:return"•"+o;case 1:return"◦"+o;case 2:return"◾"+o;case 5:var s=jn(r,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return Ju(r,"〇一二三四五六七八九",i);case 6:return Kc(r,1,3999,kM,3,n).toLowerCase();case 7:return Kc(r,1,3999,kM,3,n);case 8:return jn(r,945,969,!1,n);case 9:return jn(r,97,122,!1,n);case 10:return jn(r,65,90,!1,n);case 11:return jn(r,1632,1641,!0,n);case 12:case 49:return Kc(r,1,9999,$M,3,n);case 35:return Kc(r,1,9999,$M,3,n).toLowerCase();case 13:return jn(r,2534,2543,!0,n);case 14:case 30:return jn(r,6112,6121,!0,n);case 15:return Ju(r,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Ju(r,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return PA(r,"零一二三四五六七八九",VM,"負",i,jl|Kl|kd);case 47:return PA(r,"零壹貳參肆伍陸柒捌玖",jM,"負",i,Af|jl|Kl|kd);case 42:return PA(r,"零一二三四五六七八九",VM,"负",i,jl|Kl|kd);case 41:return PA(r,"零壹贰叁肆伍陆柒捌玖",jM,"负",i,Af|jl|Kl|kd);case 26:return PA(r,"〇一二三四五六七八九","十百千万",KM,i,0);case 25:return PA(r,"零壱弐参四伍六七八九","拾百千万",KM,i,Af|jl|Kl);case 31:return PA(r,"영일이삼사오육칠팔구","십백천만",WE,a,Af|jl|Kl);case 33:return PA(r,"零一二三四五六七八九","十百千萬",WE,a,0);case 32:return PA(r,"零壹貳參四五六七八九","拾百千",WE,a,Af|jl|Kl);case 18:return jn(r,2406,2415,!0,n);case 20:return Kc(r,1,19999,Ovt,3,n);case 21:return jn(r,2790,2799,!0,n);case 22:return jn(r,2662,2671,!0,n);case 22:return Kc(r,1,10999,Rvt,3,n);case 23:return Ju(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Ju(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return jn(r,3302,3311,!0,n);case 28:return Ju(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Ju(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return jn(r,3792,3801,!0,n);case 37:return jn(r,6160,6169,!0,n);case 38:return jn(r,4160,4169,!0,n);case 39:return jn(r,2918,2927,!0,n);case 40:return jn(r,1776,1785,!0,n);case 43:return jn(r,3046,3055,!0,n);case 44:return jn(r,3174,3183,!0,n);case 45:return jn(r,3664,3673,!0,n);case 46:return jn(r,3872,3881,!0,n);case 3:default:return jn(r,48,57,!0,n)}},JQ="data-html2canvas-ignore",YM=function(){function r(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Ivt,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return r.prototype.toIFrame=function(e,t){var n=this,i=Mvt(e,t);if(!i.contentWindow)return Promise.reject("Unable to find iframe window");var a=e.defaultView.pageXOffset,o=e.defaultView.pageYOffset,s=i.contentWindow,A=s.document,l=Uvt(i).then(function(){return La(n,void 0,void 0,function(){var u,h;return ca(this,function(c){switch(c.label){case 0:return this.scrolledElements.forEach(Gvt),s&&(s.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(s.scrollY!==t.top||s.scrollX!==t.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(s.scrollX-t.left,s.scrollY-t.top,0,0))),u=this.options.onclone,h=this.clonedReferenceElement,typeof h>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:A.fonts&&A.fonts.ready?[4,A.fonts.ready]:[3,2];case 1:c.sent(),c.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Nvt(A)]:[3,4];case 3:c.sent(),c.label=4;case 4:return typeof u=="function"?[2,Promise.resolve().then(function(){return u(A,h)}).then(function(){return i})]:[2,i]}})})});return A.open(),A.write(Qvt(document.doctype)+"<html></html>"),Hvt(this.referenceElement.ownerDocument,a,o),A.replaceChild(A.adoptNode(this.documentElement),A.documentElement),A.close(),l},r.prototype.createElementClone=function(e){if(Tx(e,2))debugger;if(XQ(e))return this.createCanvasClone(e);if(QM(e))return this.createVideoClone(e);if(HM(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Lx(t)&&(Lx(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),GM(t)?this.createCustomElementClone(t):t},r.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return qE(e.style,t),t},r.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(a,o){return o&&typeof o.cssText=="string"?a+o.cssText:a},""),i=e.cloneNode(!1);return i.textContent=n,i}}catch(a){if(this.context.logger.error("Unable to access cssRules property",a),a.name!=="SecurityError")throw a}return e.cloneNode(!1)},r.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var a=e.getContext("2d"),o=i.getContext("2d");if(o)if(!this.options.allowTaint&&a)o.putImageData(a.getImageData(0,0,e.width,e.height),0,0);else{var s=(t=e.getContext("webgl2"))!==null&&t!==void 0?t:e.getContext("webgl");if(s){var A=s.getContextAttributes();(A==null?void 0:A.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return i}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},r.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},r.prototype.appendChildNode=function(e,t,n){(!wf(t)||!Fvt(t)&&!t.hasAttribute(JQ)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!wf(t)||!HM(t))&&e.appendChild(this.cloneNode(t,n))},r.prototype.cloneChildNodes=function(e,t,n){for(var i=this,a=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;a;a=a.nextSibling)if(wf(a)&&qQ(a)&&typeof a.assignedNodes=="function"){var o=a.assignedNodes();o.length&&o.forEach(function(s){return i.appendChildNode(t,s,n)})}else this.appendChildNode(t,a,n)},r.prototype.cloneNode=function(e,t){if(YQ(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&wf(e)&&(bx(e)||W0(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var a=n.getComputedStyle(e),o=n.getComputedStyle(e,":before"),s=n.getComputedStyle(e,":after");this.referenceElement===e&&bx(i)&&(this.clonedReferenceElement=i),BL(i)&&Vvt(i);var A=this.counters.parse(new BM(this.context,a)),l=this.resolvePseudoContent(e,i,o,uv.BEFORE);GM(e)&&(t=!0),QM(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var u=this.resolvePseudoContent(e,i,s,uv.AFTER);return u&&i.appendChild(u),this.counters.pop(A),(a&&(this.options.copyStyles||W0(e))&&!WQ(e)||t)&&qE(a,i),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(i_(e)||a_(e))&&(i_(i)||a_(i))&&(i.value=e.value),i}return e.cloneNode(!1)},r.prototype.resolvePseudoContent=function(e,t,n,i){var a=this;if(n){var o=n.content,s=t.ownerDocument;if(!(!s||!o||o==="none"||o==="-moz-alt-content"||n.display==="none")){this.counters.parse(new BM(this.context,n));var A=new xdt(this.context,n),l=s.createElement("html2canvaspseudoelement");qE(n,l),A.content.forEach(function(h){if(h.type===0)l.appendChild(s.createTextNode(h.value));else if(h.type===22){var c=s.createElement("img");c.src=h.value,c.style.opacity="1",l.appendChild(c)}else if(h.type===18){if(h.name==="attr"){var f=h.values.filter(rn);f.length&&l.appendChild(s.createTextNode(e.getAttribute(f[0].value)||""))}else if(h.name==="counter"){var d=h.values.filter(tp),v=d[0],y=d[1];if(v&&rn(v)){var m=a.counters.getCounterValue(v.value),w=y&&rn(y)?Bx.parse(a.context,y.value):3;l.appendChild(s.createTextNode($v(m,w,!1)))}}else if(h.name==="counters"){var C=h.values.filter(tp),v=C[0],B=C[1],y=C[2];if(v&&rn(v)){var R=a.counters.getCounterValues(v.value),O=y&&rn(y)?Bx.parse(a.context,y.value):3,I=B&&B.type===0?B.value:"",T=R.map(function(S){return $v(S,O,!1)}).join(I);l.appendChild(s.createTextNode(T))}}}else if(h.type===20)switch(h.value){case"open-quote":l.appendChild(s.createTextNode(CM(A.quotes,a.quoteDepth++,!0)));break;case"close-quote":l.appendChild(s.createTextNode(CM(A.quotes,--a.quoteDepth,!1)));break;default:l.appendChild(s.createTextNode(h.value))}}),l.className=Fx+" "+Ix;var u=i===uv.BEFORE?" "+Fx:" "+Ix;return W0(t)?t.className.baseValue+=u:t.className+=u,l}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r}(),uv;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(uv||(uv={}));var Mvt=function(r,e){var t=r.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(JQ,"true"),r.body.appendChild(t),t},Pvt=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},Nvt=function(r){return Promise.all([].slice.call(r.images,0).map(Pvt))},Uvt=function(r){return new Promise(function(e,t){var n=r.contentWindow;if(!n)return t("No window assigned for iframe");var i=n.document;n.onload=r.onload=function(){n.onload=r.onload=null;var a=setInterval(function(){i.body.childNodes.length>0&&i.readyState==="complete"&&(clearInterval(a),e(r))},50)}})},Dvt=["all","d","content"],qE=function(r,e){for(var t=r.length-1;t>=0;t--){var n=r.item(t);Dvt.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},Qvt=function(r){var e="";return r&&(e+="<!DOCTYPE ",r.name&&(e+=r.name),r.internalSubset&&(e+=r.internalSubset),r.publicId&&(e+='"'+r.publicId+'"'),r.systemId&&(e+='"'+r.systemId+'"'),e+=">"),e},Hvt=function(r,e,t){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||t!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,t)},Gvt=function(r){var e=r[0],t=r[1],n=r[2];e.scrollLeft=t,e.scrollTop=n},kvt=":before",$vt=":after",Fx="___html2canvas___pseudoelement_before",Ix="___html2canvas___pseudoelement_after",zM=`{
|
||
content: "" !important;
|
||
display: none !important;
|
||
}`,Vvt=function(r){jvt(r,"."+Fx+kvt+zM+`
|
||
.`+Ix+$vt+zM)},jvt=function(r,e){var t=r.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,r.appendChild(n)}},t4=function(){function r(){}return r.getOrigin=function(e){var t=r._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},r.isSameOrigin=function(e){return r.getOrigin(e)===r._origin},r.setContext=function(e){r._link=e.document.createElement("a"),r._origin=r.getOrigin(e.location.href)},r._origin="about:blank",r}(),Kvt=function(){function r(e,t){this.context=e,this._options=t,this._cache={}}return r.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(JE(e)||Wvt(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},r.prototype.match=function(e){return this._cache[e]},r.prototype.loadImage=function(e){return La(this,void 0,void 0,function(){var t,n,i,a,o=this;return ca(this,function(s){switch(s.label){case 0:return t=t4.isSameOrigin(e),n=!ZE(e)&&this._options.useCORS===!0&&qi.SUPPORT_CORS_IMAGES&&!t,i=!ZE(e)&&!t&&!JE(e)&&typeof this._options.proxy=="string"&&qi.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!ZE(e)&&!JE(e)&&!i&&!n?[2]:(a=e,i?[4,this.proxy(a)]:[3,2]);case 1:a=s.sent(),s.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(A,l){var u=new Image;u.onload=function(){return A(u)},u.onerror=l,(qvt(a)||n)&&(u.crossOrigin="anonymous"),u.src=a,u.complete===!0&&setTimeout(function(){return A(u)},500),o._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,s.sent()]}})})},r.prototype.has=function(e){return typeof this._cache[e]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise(function(a,o){var s=qi.SUPPORT_RESPONSE_TYPE?"blob":"text",A=new XMLHttpRequest;A.onload=function(){if(A.status===200)if(s==="text")a(A.response);else{var h=new FileReader;h.addEventListener("load",function(){return a(h.result)},!1),h.addEventListener("error",function(c){return o(c)},!1),h.readAsDataURL(A.response)}else o("Failed to proxy resource "+i+" with status code "+A.status)},A.onerror=o;var l=n.indexOf("?")>-1?"&":"?";if(A.open("GET",""+n+l+"url="+encodeURIComponent(e)+"&responseType="+s),s!=="text"&&A instanceof XMLHttpRequest&&(A.responseType=s),t._options.imageTimeout){var u=t._options.imageTimeout;A.timeout=u,A.ontimeout=function(){return o("Timed out ("+u+"ms) proxying "+i)}}A.send()})},r}(),Yvt=/^data:image\/svg\+xml/i,zvt=/^data:image\/.*;base64,/i,Xvt=/^data:image\/.*/i,Wvt=function(r){return qi.SUPPORT_SVG_DRAWING||!Zvt(r)},ZE=function(r){return Xvt.test(r)},qvt=function(r){return zvt.test(r)},JE=function(r){return r.substr(0,4)==="blob"},Zvt=function(r){return r.substr(-3).toLowerCase()==="svg"||Yvt.test(r)},ae=function(){function r(e,t){this.type=0,this.x=e,this.y=t}return r.prototype.add=function(e,t){return new r(this.x+e,this.y+t)},r}(),Yc=function(r,e,t){return new ae(r.x+(e.x-r.x)*t,r.y+(e.y-r.y)*t)},h0=function(){function r(e,t,n,i){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=i}return r.prototype.subdivide=function(e,t){var n=Yc(this.start,this.startControl,e),i=Yc(this.startControl,this.endControl,e),a=Yc(this.endControl,this.end,e),o=Yc(n,i,e),s=Yc(i,a,e),A=Yc(o,s,e);return t?new r(this.start,n,o,A):new r(A,s,a,this.end)},r.prototype.add=function(e,t){return new r(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r}(),Go=function(r){return r.type===1},Jvt=function(){function r(e){var t=e.styles,n=e.bounds,i=Hd(t.borderTopLeftRadius,n.width,n.height),a=i[0],o=i[1],s=Hd(t.borderTopRightRadius,n.width,n.height),A=s[0],l=s[1],u=Hd(t.borderBottomRightRadius,n.width,n.height),h=u[0],c=u[1],f=Hd(t.borderBottomLeftRadius,n.width,n.height),d=f[0],v=f[1],y=[];y.push((a+A)/n.width),y.push((d+h)/n.width),y.push((o+v)/n.height),y.push((l+c)/n.height);var m=Math.max.apply(Math,y);m>1&&(a/=m,o/=m,A/=m,l/=m,h/=m,c/=m,d/=m,v/=m);var w=n.width-A,C=n.height-c,B=n.width-h,R=n.height-v,O=t.borderTopWidth,I=t.borderRightWidth,T=t.borderBottomWidth,L=t.borderLeftWidth,P=pn(t.paddingTop,e.bounds.width),S=pn(t.paddingRight,e.bounds.width),x=pn(t.paddingBottom,e.bounds.width),M=pn(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?Tn(n.left+L/3,n.top+O/3,a-L/3,o-O/3,jr.TOP_LEFT):new ae(n.left+L/3,n.top+O/3),this.topRightBorderDoubleOuterBox=a>0||o>0?Tn(n.left+w,n.top+O/3,A-I/3,l-O/3,jr.TOP_RIGHT):new ae(n.left+n.width-I/3,n.top+O/3),this.bottomRightBorderDoubleOuterBox=h>0||c>0?Tn(n.left+B,n.top+C,h-I/3,c-T/3,jr.BOTTOM_RIGHT):new ae(n.left+n.width-I/3,n.top+n.height-T/3),this.bottomLeftBorderDoubleOuterBox=d>0||v>0?Tn(n.left+L/3,n.top+R,d-L/3,v-T/3,jr.BOTTOM_LEFT):new ae(n.left+L/3,n.top+n.height-T/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?Tn(n.left+L*2/3,n.top+O*2/3,a-L*2/3,o-O*2/3,jr.TOP_LEFT):new ae(n.left+L*2/3,n.top+O*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?Tn(n.left+w,n.top+O*2/3,A-I*2/3,l-O*2/3,jr.TOP_RIGHT):new ae(n.left+n.width-I*2/3,n.top+O*2/3),this.bottomRightBorderDoubleInnerBox=h>0||c>0?Tn(n.left+B,n.top+C,h-I*2/3,c-T*2/3,jr.BOTTOM_RIGHT):new ae(n.left+n.width-I*2/3,n.top+n.height-T*2/3),this.bottomLeftBorderDoubleInnerBox=d>0||v>0?Tn(n.left+L*2/3,n.top+R,d-L*2/3,v-T*2/3,jr.BOTTOM_LEFT):new ae(n.left+L*2/3,n.top+n.height-T*2/3),this.topLeftBorderStroke=a>0||o>0?Tn(n.left+L/2,n.top+O/2,a-L/2,o-O/2,jr.TOP_LEFT):new ae(n.left+L/2,n.top+O/2),this.topRightBorderStroke=a>0||o>0?Tn(n.left+w,n.top+O/2,A-I/2,l-O/2,jr.TOP_RIGHT):new ae(n.left+n.width-I/2,n.top+O/2),this.bottomRightBorderStroke=h>0||c>0?Tn(n.left+B,n.top+C,h-I/2,c-T/2,jr.BOTTOM_RIGHT):new ae(n.left+n.width-I/2,n.top+n.height-T/2),this.bottomLeftBorderStroke=d>0||v>0?Tn(n.left+L/2,n.top+R,d-L/2,v-T/2,jr.BOTTOM_LEFT):new ae(n.left+L/2,n.top+n.height-T/2),this.topLeftBorderBox=a>0||o>0?Tn(n.left,n.top,a,o,jr.TOP_LEFT):new ae(n.left,n.top),this.topRightBorderBox=A>0||l>0?Tn(n.left+w,n.top,A,l,jr.TOP_RIGHT):new ae(n.left+n.width,n.top),this.bottomRightBorderBox=h>0||c>0?Tn(n.left+B,n.top+C,h,c,jr.BOTTOM_RIGHT):new ae(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=d>0||v>0?Tn(n.left,n.top+R,d,v,jr.BOTTOM_LEFT):new ae(n.left,n.top+n.height),this.topLeftPaddingBox=a>0||o>0?Tn(n.left+L,n.top+O,Math.max(0,a-L),Math.max(0,o-O),jr.TOP_LEFT):new ae(n.left+L,n.top+O),this.topRightPaddingBox=A>0||l>0?Tn(n.left+Math.min(w,n.width-I),n.top+O,w>n.width+I?0:Math.max(0,A-I),Math.max(0,l-O),jr.TOP_RIGHT):new ae(n.left+n.width-I,n.top+O),this.bottomRightPaddingBox=h>0||c>0?Tn(n.left+Math.min(B,n.width-L),n.top+Math.min(C,n.height-T),Math.max(0,h-I),Math.max(0,c-T),jr.BOTTOM_RIGHT):new ae(n.left+n.width-I,n.top+n.height-T),this.bottomLeftPaddingBox=d>0||v>0?Tn(n.left+L,n.top+Math.min(R,n.height-T),Math.max(0,d-L),Math.max(0,v-T),jr.BOTTOM_LEFT):new ae(n.left+L,n.top+n.height-T),this.topLeftContentBox=a>0||o>0?Tn(n.left+L+M,n.top+O+P,Math.max(0,a-(L+M)),Math.max(0,o-(O+P)),jr.TOP_LEFT):new ae(n.left+L+M,n.top+O+P),this.topRightContentBox=A>0||l>0?Tn(n.left+Math.min(w,n.width+L+M),n.top+O+P,w>n.width+L+M?0:A-L+M,l-(O+P),jr.TOP_RIGHT):new ae(n.left+n.width-(I+S),n.top+O+P),this.bottomRightContentBox=h>0||c>0?Tn(n.left+Math.min(B,n.width-(L+M)),n.top+Math.min(C,n.height+O+P),Math.max(0,h-(I+S)),c-(T+x),jr.BOTTOM_RIGHT):new ae(n.left+n.width-(I+S),n.top+n.height-(T+x)),this.bottomLeftContentBox=d>0||v>0?Tn(n.left+L+M,n.top+R,Math.max(0,d-(L+M)),v-(T+x),jr.BOTTOM_LEFT):new ae(n.left+L+M,n.top+n.height-(T+x))}return r}(),jr;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(jr||(jr={}));var Tn=function(r,e,t,n,i){var a=4*((Math.sqrt(2)-1)/3),o=t*a,s=n*a,A=r+t,l=e+n;switch(i){case jr.TOP_LEFT:return new h0(new ae(r,l),new ae(r,l-s),new ae(A-o,e),new ae(A,e));case jr.TOP_RIGHT:return new h0(new ae(r,e),new ae(r+o,e),new ae(A,l-s),new ae(A,l));case jr.BOTTOM_RIGHT:return new h0(new ae(A,e),new ae(A,e+s),new ae(r+o,l),new ae(r,l));case jr.BOTTOM_LEFT:default:return new h0(new ae(A,l),new ae(A-o,l),new ae(r,e+s),new ae(r,e))}},o_=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},tgt=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},s_=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},egt=function(){function r(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return r}(),c0=function(){function r(e,t){this.path=e,this.target=t,this.type=1}return r}(),rgt=function(){function r(e){this.opacity=e,this.type=2,this.target=6}return r}(),ngt=function(r){return r.type===0},e4=function(r){return r.type===1},igt=function(r){return r.type===2},XM=function(r,e){return r.length===e.length?r.some(function(t,n){return t===e[n]}):!1},agt=function(r,e,t,n,i){return r.map(function(a,o){switch(o){case 0:return a.add(e,t);case 1:return a.add(e+n,t);case 2:return a.add(e+n,t+i);case 3:return a.add(e,t+i)}return a})},r4=function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),n4=function(){function r(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Jvt(this.container),this.container.styles.opacity<1&&this.effects.push(new rgt(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,a=this.container.styles.transform;this.effects.push(new egt(n,i,a))}if(this.container.styles.overflowX!==0){var o=o_(this.curves),s=s_(this.curves);XM(o,s)?this.effects.push(new c0(o,6)):(this.effects.push(new c0(o,2)),this.effects.push(new c0(s,4)))}}return r.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,i=this.effects.slice(0);n;){var a=n.effects.filter(function(A){return!e4(A)});if(t||n.container.styles.position!==0||!n.parent){if(i.unshift.apply(i,a),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var o=o_(n.curves),s=s_(n.curves);XM(o,s)||i.unshift(new c0(s,6))}}else i.unshift.apply(i,a);n=n.parent}return i.filter(function(A){return bi(A.target,e)})},r}(),Rx=function(r,e,t,n){r.container.elements.forEach(function(i){var a=bi(i.flags,4),o=bi(i.flags,2),s=new n4(i,r);bi(i.styles.display,2048)&&n.push(s);var A=bi(i.flags,8)?[]:n;if(a||o){var l=a||i.styles.isPositioned()?t:e,u=new r4(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var h=i.styles.zIndex.order;if(h<0){var c=0;l.negativeZIndex.some(function(d,v){return h>d.element.container.styles.zIndex.order?(c=v,!1):c>0}),l.negativeZIndex.splice(c,0,u)}else if(h>0){var f=0;l.positiveZIndex.some(function(d,v){return h>=d.element.container.styles.zIndex.order?(f=v+1,!1):f>0}),l.positiveZIndex.splice(f,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Rx(s,u,a?u:t,A)}else i.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),Rx(s,e,t,A);bi(i.flags,8)&&i4(i,A)})},i4=function(r,e){for(var t=r instanceof Sx?r.start:1,n=r instanceof Sx?r.reversed:!1,i=0;i<e.length;i++){var a=e[i];a.container instanceof GQ&&typeof a.container.value=="number"&&a.container.value!==0&&(t=a.container.value),a.listValue=$v(t,a.container.styles.listStyleType,!0),t+=n?-1:1}},ogt=function(r){var e=new n4(r,null),t=new r4(e),n=[];return Rx(e,t,t,n),i4(e.container,n),t},WM=function(r,e){switch(e){case 0:return $o(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return $o(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return $o(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return $o(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},sgt=function(r,e){switch(e){case 0:return $o(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return $o(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return $o(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return $o(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},Agt=function(r,e){switch(e){case 0:return $o(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return $o(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return $o(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return $o(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},lgt=function(r,e){switch(e){case 0:return f0(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return f0(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return f0(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return f0(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},f0=function(r,e){var t=[];return Go(r)?t.push(r.subdivide(.5,!1)):t.push(r),Go(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},$o=function(r,e,t,n){var i=[];return Go(r)?i.push(r.subdivide(.5,!1)):i.push(r),Go(t)?i.push(t.subdivide(.5,!0)):i.push(t),Go(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),Go(e)?i.push(e.subdivide(.5,!1).reverse()):i.push(e),i},a4=function(r){var e=r.bounds,t=r.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},A_=function(r){var e=r.styles,t=r.bounds,n=pn(e.paddingLeft,t.width),i=pn(e.paddingRight,t.width),a=pn(e.paddingTop,t.width),o=pn(e.paddingBottom,t.width);return t.add(n+e.borderLeftWidth,a+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+i),-(e.borderTopWidth+e.borderBottomWidth+a+o))},ugt=function(r,e){return r===0?e.bounds:r===2?A_(e):a4(e)},hgt=function(r,e){return r===0?e.bounds:r===2?A_(e):a4(e)},tC=function(r,e,t){var n=ugt(lf(r.styles.backgroundOrigin,e),r),i=hgt(lf(r.styles.backgroundClip,e),r),a=cgt(lf(r.styles.backgroundSize,e),t,n),o=a[0],s=a[1],A=Hd(lf(r.styles.backgroundPosition,e),n.width-o,n.height-s),l=fgt(lf(r.styles.backgroundRepeat,e),A,a,n,i),u=Math.round(n.left+A[0]),h=Math.round(n.top+A[1]);return[l,u,h,o,s]},zc=function(r){return rn(r)&&r.value===Uf.AUTO},p0=function(r){return typeof r=="number"},cgt=function(r,e,t){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1];if(!o)return[0,0];if(pi(o)&&s&&pi(s))return[pn(o,t.width),pn(s,t.height)];var A=p0(a);if(rn(o)&&(o.value===Uf.CONTAIN||o.value===Uf.COVER)){if(p0(a)){var l=t.width/t.height;return l<a!=(o.value===Uf.COVER)?[t.width,t.width/a]:[t.height*a,t.height]}return[t.width,t.height]}var u=p0(n),h=p0(i),c=u||h;if(zc(o)&&(!s||zc(s))){if(u&&h)return[n,i];if(!A&&!c)return[t.width,t.height];if(c&&A){var f=u?n:i*a,d=h?i:n/a;return[f,d]}var v=u?n:t.width,y=h?i:t.height;return[v,y]}if(A){var m=0,w=0;return pi(o)?m=pn(o,t.width):pi(s)&&(w=pn(s,t.height)),zc(o)?m=w*a:(!s||zc(s))&&(w=m/a),[m,w]}var C=null,B=null;if(pi(o)?C=pn(o,t.width):s&&pi(s)&&(B=pn(s,t.height)),C!==null&&(!s||zc(s))&&(B=u&&h?C/n*i:t.height),B!==null&&zc(o)&&(C=u&&h?B/i*n:t.width),C!==null&&B!==null)return[C,B];throw new Error("Unable to calculate background-size for element")},lf=function(r,e){var t=r[e];return typeof t>"u"?r[0]:t},fgt=function(r,e,t,n,i){var a=e[0],o=e[1],s=t[0],A=t[1];switch(r){case 2:return[new ae(Math.round(n.left),Math.round(n.top+o)),new ae(Math.round(n.left+n.width),Math.round(n.top+o)),new ae(Math.round(n.left+n.width),Math.round(A+n.top+o)),new ae(Math.round(n.left),Math.round(A+n.top+o))];case 3:return[new ae(Math.round(n.left+a),Math.round(n.top)),new ae(Math.round(n.left+a+s),Math.round(n.top)),new ae(Math.round(n.left+a+s),Math.round(n.height+n.top)),new ae(Math.round(n.left+a),Math.round(n.height+n.top))];case 1:return[new ae(Math.round(n.left+a),Math.round(n.top+o)),new ae(Math.round(n.left+a+s),Math.round(n.top+o)),new ae(Math.round(n.left+a+s),Math.round(n.top+o+A)),new ae(Math.round(n.left+a),Math.round(n.top+o+A))];default:return[new ae(Math.round(i.left),Math.round(i.top)),new ae(Math.round(i.left+i.width),Math.round(i.top)),new ae(Math.round(i.left+i.width),Math.round(i.height+i.top)),new ae(Math.round(i.left),Math.round(i.height+i.top))]}},pgt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",qM="Hidden Text",dgt=function(){function r(e){this._data={},this._document=e}return r.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),i=this._document.createElement("img"),a=this._document.createElement("span"),o=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",o.appendChild(n),i.src=pgt,i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",a.style.fontFamily=e,a.style.fontSize=t,a.style.margin="0",a.style.padding="0",a.appendChild(this._document.createTextNode(qM)),n.appendChild(a),n.appendChild(i);var s=i.offsetTop-a.offsetTop+2;n.removeChild(a),n.appendChild(this._document.createTextNode(qM)),n.style.lineHeight="normal",i.style.verticalAlign="super";var A=i.offsetTop-n.offsetTop+2;return o.removeChild(n),{baseline:s,middle:A}},r.prototype.getMetrics=function(e,t){var n=e+" "+t;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},r}(),o4=function(){function r(e,t){this.context=e,this.options=t}return r}(),vgt=1e4,ggt=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i._activeEffects=[],i.canvas=n.canvas?n.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),n.canvas||(i.canvas.width=Math.floor(n.width*n.scale),i.canvas.height=Math.floor(n.height*n.scale),i.canvas.style.width=n.width+"px",i.canvas.style.height=n.height+"px"),i.fontMetrics=new dgt(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-n.x,-n.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),i}return e.prototype.applyEffects=function(t){for(var n=this;this._activeEffects.length;)this.popEffect();t.forEach(function(i){return n.applyEffect(i)})},e.prototype.applyEffect=function(t){this.ctx.save(),igt(t)&&(this.ctx.globalAlpha=t.opacity),ngt(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),e4(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return La(this,void 0,void 0,function(){var n;return ca(this,function(i){switch(i.label){case 0:return n=t.element.container.styles,n.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return La(this,void 0,void 0,function(){return ca(this,function(n){switch(n.label){case 0:if(bi(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(t)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,n,i){var a=this;if(n===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+i);else{var o=EL(t.text);o.reduce(function(s,A){return a.ctx.fillText(A,s,t.bounds.top+i),s+a.ctx.measureText(A).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var n=t.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),i=Egt(t.fontFamily).join(", "),a=gg(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,n,t.fontWeight,a,i].join(" "),i,a]},e.prototype.renderTextNode=function(t,n){return La(this,void 0,void 0,function(){var i,a,o,s,A,l,u,h,c=this;return ca(this,function(f){return i=this.createFontStyle(n),a=i[0],o=i[1],s=i[2],this.ctx.font=a,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",A=this.fontMetrics.getMetrics(o,s),l=A.baseline,u=A.middle,h=n.paintOrder,t.textBounds.forEach(function(d){h.forEach(function(v){switch(v){case 0:c.ctx.fillStyle=Qi(n.color),c.renderTextWithLetterSpacing(d,n.letterSpacing,l);var y=n.textShadow;y.length&&d.text.trim().length&&(y.slice(0).reverse().forEach(function(m){c.ctx.shadowColor=Qi(m.color),c.ctx.shadowOffsetX=m.offsetX.number*c.options.scale,c.ctx.shadowOffsetY=m.offsetY.number*c.options.scale,c.ctx.shadowBlur=m.blur.number,c.renderTextWithLetterSpacing(d,n.letterSpacing,l)}),c.ctx.shadowColor="",c.ctx.shadowOffsetX=0,c.ctx.shadowOffsetY=0,c.ctx.shadowBlur=0),n.textDecorationLine.length&&(c.ctx.fillStyle=Qi(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(m){switch(m){case 1:c.ctx.fillRect(d.bounds.left,Math.round(d.bounds.top+l),d.bounds.width,1);break;case 2:c.ctx.fillRect(d.bounds.left,Math.round(d.bounds.top),d.bounds.width,1);break;case 3:c.ctx.fillRect(d.bounds.left,Math.ceil(d.bounds.top+u),d.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&d.text.trim().length&&(c.ctx.strokeStyle=Qi(n.webkitTextStrokeColor),c.ctx.lineWidth=n.webkitTextStrokeWidth,c.ctx.lineJoin=window.chrome?"miter":"round",c.ctx.strokeText(d.text,d.bounds.left,d.bounds.top+l)),c.ctx.strokeStyle="",c.ctx.lineWidth=0,c.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,n,i){if(i&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var a=A_(t),o=s_(n);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,t.intrinsicWidth,t.intrinsicHeight,a.left,a.top,a.width,a.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return La(this,void 0,void 0,function(){var n,i,a,o,s,A,w,w,l,u,h,c,B,f,d,R,v,y,m,w,C,B,R;return ca(this,function(O){switch(O.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,i=t.curves,a=n.styles,o=0,s=n.textNodes,O.label=1;case 1:return o<s.length?(A=s[o],[4,this.renderTextNode(A,a)]):[3,4];case 2:O.sent(),O.label=3;case 3:return o++,[3,1];case 4:if(!(n instanceof DQ))return[3,8];O.label=5;case 5:return O.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return w=O.sent(),this.renderReplacedElement(n,i,w),[3,8];case 7:return O.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof QQ&&this.renderReplacedElement(n,i,n.canvas),!(n instanceof HQ))return[3,12];O.label=9;case 9:return O.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return w=O.sent(),this.renderReplacedElement(n,i,w),[3,12];case 11:return O.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof VQ&&n.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,l.render(n.tree)]):[3,14];case 13:u=O.sent(),n.width&&n.height&&this.ctx.drawImage(u,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),O.label=14;case 14:if(n instanceof CL&&(h=Math.min(n.bounds.width,n.bounds.height),n.type===r_?n.checked&&(this.ctx.save(),this.path([new ae(n.bounds.left+h*.39363,n.bounds.top+h*.79),new ae(n.bounds.left+h*.16,n.bounds.top+h*.5549),new ae(n.bounds.left+h*.27347,n.bounds.top+h*.44071),new ae(n.bounds.left+h*.39694,n.bounds.top+h*.5649),new ae(n.bounds.left+h*.72983,n.bounds.top+h*.23),new ae(n.bounds.left+h*.84,n.bounds.top+h*.34085),new ae(n.bounds.left+h*.39363,n.bounds.top+h*.79)]),this.ctx.fillStyle=Qi(DM),this.ctx.fill(),this.ctx.restore()):n.type===n_&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+h/2,n.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=Qi(DM),this.ctx.fill(),this.ctx.restore())),ygt(n)&&n.value.length){switch(c=this.createFontStyle(a),B=c[0],f=c[1],d=this.fontMetrics.getMetrics(B,f).baseline,this.ctx.font=B,this.ctx.fillStyle=Qi(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=_gt(n.styles.textAlign),R=A_(n),v=0,n.styles.textAlign){case 1:v+=R.width/2;break;case 2:v+=R.width;break}y=R.add(v,0,0,-R.height/2+1),this.ctx.save(),this.path([new ae(R.left,R.top),new ae(R.left+R.width,R.top),new ae(R.left+R.width,R.top+R.height),new ae(R.left,R.top+R.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new lv(n.value,y),a.letterSpacing,d),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!bi(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(m=n.styles.listStyleImage,m.type!==0)return[3,18];w=void 0,C=m.url,O.label=15;case 15:return O.trys.push([15,17,,18]),[4,this.context.cache.match(C)];case 16:return w=O.sent(),this.ctx.drawImage(w,n.bounds.left-(w.width+10),n.bounds.top),[3,18];case 17:return O.sent(),this.context.logger.error("Error loading list-style-image "+C),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==-1&&(B=this.createFontStyle(a)[0],this.ctx.font=B,this.ctx.fillStyle=Qi(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",R=new rl(n.bounds.left,n.bounds.top+pn(n.styles.paddingTop,n.bounds.width),n.bounds.width,wM(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new lv(t.listValue,R),a.letterSpacing,wM(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),O.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return La(this,void 0,void 0,function(){var n,i,m,a,o,m,s,A,m,l,u,m,h,c,m,f,d,m,v,y,m;return ca(this,function(w){switch(w.label){case 0:if(bi(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:w.sent(),n=0,i=t.negativeZIndex,w.label=2;case 2:return n<i.length?(m=i[n],[4,this.renderStack(m)]):[3,5];case 3:w.sent(),w.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:w.sent(),a=0,o=t.nonInlineLevel,w.label=7;case 7:return a<o.length?(m=o[a],[4,this.renderNode(m)]):[3,10];case 8:w.sent(),w.label=9;case 9:return a++,[3,7];case 10:s=0,A=t.nonPositionedFloats,w.label=11;case 11:return s<A.length?(m=A[s],[4,this.renderStack(m)]):[3,14];case 12:w.sent(),w.label=13;case 13:return s++,[3,11];case 14:l=0,u=t.nonPositionedInlineLevel,w.label=15;case 15:return l<u.length?(m=u[l],[4,this.renderStack(m)]):[3,18];case 16:w.sent(),w.label=17;case 17:return l++,[3,15];case 18:h=0,c=t.inlineLevel,w.label=19;case 19:return h<c.length?(m=c[h],[4,this.renderNode(m)]):[3,22];case 20:w.sent(),w.label=21;case 21:return h++,[3,19];case 22:f=0,d=t.zeroOrAutoZIndexOrTransformedOrOpacity,w.label=23;case 23:return f<d.length?(m=d[f],[4,this.renderStack(m)]):[3,26];case 24:w.sent(),w.label=25;case 25:return f++,[3,23];case 26:v=0,y=t.positiveZIndex,w.label=27;case 27:return v<y.length?(m=y[v],[4,this.renderStack(m)]):[3,30];case 28:w.sent(),w.label=29;case 29:return v++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(t){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(t.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(t){this.ctx.beginPath(),this.formatPath(t),this.ctx.closePath()},e.prototype.formatPath=function(t){var n=this;t.forEach(function(i,a){var o=Go(i)?i.start:i;a===0?n.ctx.moveTo(o.x,o.y):n.ctx.lineTo(o.x,o.y),Go(i)&&n.ctx.bezierCurveTo(i.startControl.x,i.startControl.y,i.endControl.x,i.endControl.y,i.end.x,i.end.y)})},e.prototype.renderRepeat=function(t,n,i,a){this.path(t),this.ctx.fillStyle=n,this.ctx.translate(i,a),this.ctx.fill(),this.ctx.translate(-i,-a)},e.prototype.resizeImage=function(t,n,i){var a;if(t.width===n&&t.height===i)return t;var o=(a=this.canvas.ownerDocument)!==null&&a!==void 0?a:document,s=o.createElement("canvas");s.width=Math.max(1,n),s.height=Math.max(1,i);var A=s.getContext("2d");return A.drawImage(t,0,0,t.width,t.height,0,0,n,i),s},e.prototype.renderBackgroundImage=function(t){return La(this,void 0,void 0,function(){var n,i,a,o,s,A;return ca(this,function(l){switch(l.label){case 0:n=t.styles.backgroundImage.length-1,i=function(u){var h,c,f,P,z,tt,M,D,T,d,P,z,tt,M,D,v,y,m,w,C,B,R,O,I,T,L,P,S,x,M,D,W,z,tt,q,rt,nt,_t,F,$,j,X;return ca(this,function(it){switch(it.label){case 0:if(u.type!==0)return[3,5];h=void 0,c=u.url,it.label=1;case 1:return it.trys.push([1,3,,4]),[4,a.context.cache.match(c)];case 2:return h=it.sent(),[3,4];case 3:return it.sent(),a.context.logger.error("Error loading background-image "+c),[3,4];case 4:return h&&(f=tC(t,n,[h.width,h.height,h.width/h.height]),P=f[0],z=f[1],tt=f[2],M=f[3],D=f[4],T=a.ctx.createPattern(a.resizeImage(h,M,D),"repeat"),a.renderRepeat(P,T,z,tt)),[3,6];case 5:npt(u)?(d=tC(t,n,[null,null,null]),P=d[0],z=d[1],tt=d[2],M=d[3],D=d[4],v=Zft(u.angle,M,D),y=v[0],m=v[1],w=v[2],C=v[3],B=v[4],R=document.createElement("canvas"),R.width=M,R.height=D,O=R.getContext("2d"),I=O.createLinearGradient(m,C,w,B),mM(u.stops,y).forEach(function(gt){return I.addColorStop(gt.stop,Qi(gt.color))}),O.fillStyle=I,O.fillRect(0,0,M,D),M>0&&D>0&&(T=a.ctx.createPattern(R,"repeat"),a.renderRepeat(P,T,z,tt))):ipt(u)&&(L=tC(t,n,[null,null,null]),P=L[0],S=L[1],x=L[2],M=L[3],D=L[4],W=u.position.length===0?[mL]:u.position,z=pn(W[0],M),tt=pn(W[W.length-1],D),q=Jft(u,z,tt,M,D),rt=q[0],nt=q[1],rt>0&&nt>0&&(_t=a.ctx.createRadialGradient(S+z,x+tt,0,S+z,x+tt,rt),mM(u.stops,rt*2).forEach(function(gt){return _t.addColorStop(gt.stop,Qi(gt.color))}),a.path(P),a.ctx.fillStyle=_t,rt!==nt?(F=t.bounds.left+.5*t.bounds.width,$=t.bounds.top+.5*t.bounds.height,j=nt/rt,X=1/j,a.ctx.save(),a.ctx.translate(F,$),a.ctx.transform(1,0,0,j,0,0),a.ctx.translate(-F,-$),a.ctx.fillRect(S,X*(x-$)+$,M,D*X),a.ctx.restore()):a.ctx.fill())),it.label=6;case 6:return n--,[2]}})},a=this,o=0,s=t.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return o<s.length?(A=s[o],[5,i(A)]):[3,4];case 2:l.sent(),l.label=3;case 3:return o++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(t,n,i){return La(this,void 0,void 0,function(){return ca(this,function(a){return this.path(WM(i,n)),this.ctx.fillStyle=Qi(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,i,a){return La(this,void 0,void 0,function(){var o,s;return ca(this,function(A){switch(A.label){case 0:return n<3?[4,this.renderSolidBorder(t,i,a)]:[3,2];case 1:return A.sent(),[2];case 2:return o=sgt(a,i),this.path(o),this.ctx.fillStyle=Qi(t),this.ctx.fill(),s=Agt(a,i),this.path(s),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return La(this,void 0,void 0,function(){var n,i,a,o,s,A,l,u,h=this;return ca(this,function(c){switch(c.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,i=!pu(n.backgroundColor)||n.backgroundImage.length,a=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],o=mgt(lf(n.backgroundClip,0),t.curves),i||n.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),pu(n.backgroundColor)||(this.ctx.fillStyle=Qi(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:c.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(f){h.ctx.save();var d=o_(t.curves),v=f.inset?0:vgt,y=agt(d,-v+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(h.path(d),h.ctx.clip(),h.mask(y)):(h.mask(d),h.ctx.clip(),h.path(y)),h.ctx.shadowOffsetX=f.offsetX.number+v,h.ctx.shadowOffsetY=f.offsetY.number,h.ctx.shadowColor=Qi(f.color),h.ctx.shadowBlur=f.blur.number,h.ctx.fillStyle=f.inset?Qi(f.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),c.label=2;case 2:s=0,A=0,l=a,c.label=3;case 3:return A<l.length?(u=l[A],u.style!==0&&!pu(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,s,t.curves,2)]:[3,11]):[3,13];case 4:return c.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,s,t.curves,3)];case 6:return c.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,s,t.curves)];case 8:return c.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,s,t.curves)];case 10:c.sent(),c.label=11;case 11:s++,c.label=12;case 12:return A++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,n,i,a,o){return La(this,void 0,void 0,function(){var s,A,l,u,h,c,f,d,v,y,m,w,C,B,R,O,R,O;return ca(this,function(I){return this.ctx.save(),s=lgt(a,i),A=WM(a,i),o===2&&(this.path(A),this.ctx.clip()),Go(A[0])?(l=A[0].start.x,u=A[0].start.y):(l=A[0].x,u=A[0].y),Go(A[1])?(h=A[1].end.x,c=A[1].end.y):(h=A[1].x,c=A[1].y),i===0||i===2?f=Math.abs(l-h):f=Math.abs(u-c),this.ctx.beginPath(),o===3?this.formatPath(s):this.formatPath(A.slice(0,2)),d=n<3?n*3:n*2,v=n<3?n*2:n,o===3&&(d=n,v=n),y=!0,f<=d*2?y=!1:f<=d*2+v?(m=f/(2*d+v),d*=m,v*=m):(w=Math.floor((f+v)/(d+v)),C=(f-w*d)/(w-1),B=(f-(w+1)*d)/w,v=B<=0||Math.abs(v-C)<Math.abs(v-B)?C:B),y&&(o===3?this.ctx.setLineDash([0,d+v]):this.ctx.setLineDash([d,v])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=Qi(t),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(Go(A[0])&&(R=A[3],O=A[0],this.ctx.beginPath(),this.formatPath([new ae(R.end.x,R.end.y),new ae(O.start.x,O.start.y)]),this.ctx.stroke()),Go(A[1])&&(R=A[1],O=A[2],this.ctx.beginPath(),this.formatPath([new ae(R.end.x,R.end.y),new ae(O.start.x,O.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return La(this,void 0,void 0,function(){var n;return ca(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Qi(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=ogt(t),[4,this.renderStack(n)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(o4),ygt=function(r){return r instanceof $Q||r instanceof kQ?!0:r instanceof CL&&r.type!==n_&&r.type!==r_},mgt=function(r,e){switch(r){case 0:return o_(e);case 2:return tgt(e);case 1:default:return s_(e)}},_gt=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},wgt=["-apple-system","system-ui"],Egt=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(e){return wgt.indexOf(e)===-1}):r},Cgt=function(r){Is(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.canvas=n.canvas?n.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.options=n,i.canvas.width=Math.floor(n.width*n.scale),i.canvas.height=Math.floor(n.height*n.scale),i.canvas.style.width=n.width+"px",i.canvas.style.height=n.height+"px",i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-n.x,-n.y),i.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),i}return e.prototype.render=function(t){return La(this,void 0,void 0,function(){var n,i;return ca(this,function(a){switch(a.label){case 0:return n=xx(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,Bgt(n)];case 1:return i=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Qi(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(i,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e}(o4),Bgt=function(r){return new Promise(function(e,t){var n=new Image;n.onload=function(){e(n)},n.onerror=t,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(r))})},Tgt=function(){function r(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return r.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ky([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.prototype.getTime=function(){return Date.now()-this.start},r.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ky([this.id,this.getTime()+"ms"],e))},r.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ky([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ky([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.instances={},r}(),xgt=function(){function r(e,t){var n;this.windowBounds=t,this.instanceName="#"+r.instanceCount++,this.logger=new Tgt({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new Kvt(this,e)}return r.instanceCount=1,r}(),Sgt=function(r,e){return e===void 0&&(e={}),bgt(r,e)};typeof window<"u"&&t4.setContext(window);var bgt=function(r,e){return La(void 0,void 0,void 0,function(){var t,n,i,a,o,s,A,l,u,h,c,f,d,v,y,m,w,C,B,R,I,O,I,T,L,P,S,x,M,D,W,z,tt,q,rt,nt,_t,F,$,j;return ca(this,function(X){switch(X.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=r.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(n=t.defaultView,!n)throw new Error("Document is not attached to a Window");return i={allowTaint:(T=e.allowTaint)!==null&&T!==void 0?T:!1,imageTimeout:(L=e.imageTimeout)!==null&&L!==void 0?L:15e3,proxy:e.proxy,useCORS:(P=e.useCORS)!==null&&P!==void 0?P:!1},a=hx({logging:(S=e.logging)!==null&&S!==void 0?S:!0,cache:e.cache},i),o={windowWidth:(x=e.windowWidth)!==null&&x!==void 0?x:n.innerWidth,windowHeight:(M=e.windowHeight)!==null&&M!==void 0?M:n.innerHeight,scrollX:(D=e.scrollX)!==null&&D!==void 0?D:n.pageXOffset,scrollY:(W=e.scrollY)!==null&&W!==void 0?W:n.pageYOffset},s=new rl(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),A=new xgt(a,s),l=(z=e.foreignObjectRendering)!==null&&z!==void 0?z:!1,u={allowTaint:(tt=e.allowTaint)!==null&&tt!==void 0?tt:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},A.logger.debug("Starting document clone with size "+s.width+"x"+s.height+" scrolled to "+-s.left+","+-s.top),h=new YM(A,r,u),c=h.clonedReferenceElement,c?[4,h.toIFrame(t,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=X.sent(),d=BL(c)||Lvt(c)?act(c.ownerDocument):g1(A,c),v=d.width,y=d.height,m=d.left,w=d.top,C=Lgt(A,c,e.backgroundColor),B={canvas:e.canvas,backgroundColor:C,scale:(rt=(q=e.scale)!==null&&q!==void 0?q:n.devicePixelRatio)!==null&&rt!==void 0?rt:1,x:((nt=e.x)!==null&&nt!==void 0?nt:0)+m,y:((_t=e.y)!==null&&_t!==void 0?_t:0)+w,width:(F=e.width)!==null&&F!==void 0?F:Math.ceil(v),height:($=e.height)!==null&&$!==void 0?$:Math.ceil(y)},l?(A.logger.debug("Document cloned, using foreign object rendering"),I=new Cgt(A,B),[4,I.render(c)]):[3,3];case 2:return R=X.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+m+","+w+" with size "+v+"x"+y+" using computed rendering"),A.logger.debug("Starting DOM parsing"),O=KQ(A,c),C===O.styles.backgroundColor&&(O.styles.backgroundColor=WA.TRANSPARENT),A.logger.debug("Starting renderer for element at "+B.x+","+B.y+" with size "+B.width+"x"+B.height),I=new ggt(A,B),[4,I.render(O)];case 4:R=X.sent(),X.label=5;case 5:return(!((j=e.removeContainer)!==null&&j!==void 0)||j)&&(YM.destroy(f)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,R]}})})},Lgt=function(r,e,t){var n=e.ownerDocument,i=n.documentElement?sv(r,getComputedStyle(n.documentElement).backgroundColor):WA.TRANSPARENT,a=n.body?sv(r,getComputedStyle(n.body).backgroundColor):WA.TRANSPARENT,o=typeof t=="string"?sv(r,t):t===null?WA.TRANSPARENT:4294967295;return e===n.documentElement?pu(i)?pu(a)?o:a:i:o},Fgt=Object.freeze(Object.defineProperty({__proto__:null,default:Sgt},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.3.5 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.5/LICENSE */function Igt(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var Rgt=Object.hasOwnProperty,ZM=Object.setPrototypeOf,Ogt=Object.isFrozen,Mgt=Object.getPrototypeOf,Pgt=Object.getOwnPropertyDescriptor,ka=Object.freeze,nl=Object.seal,Ngt=Object.create,s4=typeof Reflect<"u"&&Reflect,l_=s4.apply,Ox=s4.construct;l_||(l_=function(e,t,n){return e.apply(t,n)});ka||(ka=function(e){return e});nl||(nl=function(e){return e});Ox||(Ox=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(Igt(t))))});var Ugt=Ts(Array.prototype.forEach),JM=Ts(Array.prototype.pop),yd=Ts(Array.prototype.push),q0=Ts(String.prototype.toLowerCase),tP=Ts(String.prototype.match),kl=Ts(String.prototype.replace),Dgt=Ts(String.prototype.indexOf),Qgt=Ts(String.prototype.trim),go=Ts(RegExp.prototype.test),eC=Hgt(TypeError);function Ts(r){return function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return l_(r,e,n)}}function Hgt(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ox(r,t)}}function ur(r,e){ZM&&ZM(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=q0(n);i!==n&&(Ogt(e)||(e[t]=i),n=i)}r[n]=!0}return r}function th(r){var e=Ngt(null),t=void 0;for(t in r)l_(Rgt,r,[t])&&(e[t]=r[t]);return e}function d0(r,e){for(;r!==null;){var t=Pgt(r,e);if(t){if(t.get)return Ts(t.get);if(typeof t.value=="function")return Ts(t.value)}r=Mgt(r)}function n(i){return console.warn("fallback value for",i),null}return n}var eP=ka(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),rC=ka(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),nC=ka(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Ggt=ka(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),iC=ka(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),kgt=ka(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rP=ka(["#text"]),nP=ka(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),aC=ka(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),iP=ka(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),v0=ka(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),$gt=nl(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Vgt=nl(/<%[\s\S]*|[\s\S]*%>/gm),jgt=nl(/^data-[\-\w.\u00B7-\uFFFF]/),Kgt=nl(/^aria-[\-\w]+$/),Ygt=nl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),zgt=nl(/^(?:\w+script|data):/i),Xgt=nl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function Ds(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var Wgt=function(){return typeof window>"u"?null:window},qgt=function(e,t){if((typeof e>"u"?"undefined":$d(e))!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(s){return s}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function A4(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wgt(),e=function(ht){return A4(ht)};if(e.version="2.3.5",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,n=r.document,i=r.DocumentFragment,a=r.HTMLTemplateElement,o=r.Node,s=r.Element,A=r.NodeFilter,l=r.NamedNodeMap,u=l===void 0?r.NamedNodeMap||r.MozNamedAttrMap:l,h=r.HTMLFormElement,c=r.DOMParser,f=r.trustedTypes,d=s.prototype,v=d0(d,"cloneNode"),y=d0(d,"nextSibling"),m=d0(d,"childNodes"),w=d0(d,"parentNode");if(typeof a=="function"){var C=n.createElement("template");C.content&&C.content.ownerDocument&&(n=C.content.ownerDocument)}var B=qgt(f,t),R=B?B.createHTML(""):"",O=n,I=O.implementation,T=O.createNodeIterator,L=O.createDocumentFragment,P=O.getElementsByTagName,S=t.importNode,x={};try{x=th(n).documentMode?n.documentMode:{}}catch{}var M={};e.isSupported=typeof w=="function"&&I&&typeof I.createHTMLDocument<"u"&&x!==9;var D=$gt,W=Vgt,z=jgt,tt=Kgt,q=zgt,rt=Xgt,nt=Ygt,_t=null,F=ur({},[].concat(Ds(eP),Ds(rC),Ds(nC),Ds(iC),Ds(rP))),$=null,j=ur({},[].concat(Ds(nP),Ds(aC),Ds(iP),Ds(v0))),X=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),it=null,gt=null,wt=!0,at=!0,Pt=!1,Ot=!1,K=!1,Z=!1,pt=!1,et=!1,G=!1,bt=!1,St=!0,dt=!0,Et=!1,yt={},xt=null,Lt=ur({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Rt=null,Vt=ur({},["audio","video","img","source","image","track"]),zt=null,ie=ur({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ee="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",oe="http://www.w3.org/1999/xhtml",Kt=oe,Ye=!1,Re=void 0,fr=["application/xhtml+xml","text/html"],be="text/html",xe=void 0,nn=null,ar=n.createElement("form"),_i=function(ht){return ht instanceof RegExp||ht instanceof Function},Br=function(ht){nn&&nn===ht||((!ht||(typeof ht>"u"?"undefined":$d(ht))!=="object")&&(ht={}),ht=th(ht),_t="ALLOWED_TAGS"in ht?ur({},ht.ALLOWED_TAGS):F,$="ALLOWED_ATTR"in ht?ur({},ht.ALLOWED_ATTR):j,zt="ADD_URI_SAFE_ATTR"in ht?ur(th(ie),ht.ADD_URI_SAFE_ATTR):ie,Rt="ADD_DATA_URI_TAGS"in ht?ur(th(Vt),ht.ADD_DATA_URI_TAGS):Vt,xt="FORBID_CONTENTS"in ht?ur({},ht.FORBID_CONTENTS):Lt,it="FORBID_TAGS"in ht?ur({},ht.FORBID_TAGS):{},gt="FORBID_ATTR"in ht?ur({},ht.FORBID_ATTR):{},yt="USE_PROFILES"in ht?ht.USE_PROFILES:!1,wt=ht.ALLOW_ARIA_ATTR!==!1,at=ht.ALLOW_DATA_ATTR!==!1,Pt=ht.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=ht.SAFE_FOR_TEMPLATES||!1,K=ht.WHOLE_DOCUMENT||!1,et=ht.RETURN_DOM||!1,G=ht.RETURN_DOM_FRAGMENT||!1,bt=ht.RETURN_TRUSTED_TYPE||!1,pt=ht.FORCE_BODY||!1,St=ht.SANITIZE_DOM!==!1,dt=ht.KEEP_CONTENT!==!1,Et=ht.IN_PLACE||!1,nt=ht.ALLOWED_URI_REGEXP||nt,Kt=ht.NAMESPACE||oe,ht.CUSTOM_ELEMENT_HANDLING&&_i(ht.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(X.tagNameCheck=ht.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ht.CUSTOM_ELEMENT_HANDLING&&_i(ht.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(X.attributeNameCheck=ht.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ht.CUSTOM_ELEMENT_HANDLING&&typeof ht.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(X.allowCustomizedBuiltInElements=ht.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re=fr.indexOf(ht.PARSER_MEDIA_TYPE)===-1?Re=be:Re=ht.PARSER_MEDIA_TYPE,xe=Re==="application/xhtml+xml"?function(Qt){return Qt}:q0,Ot&&(at=!1),G&&(et=!0),yt&&(_t=ur({},[].concat(Ds(rP))),$=[],yt.html===!0&&(ur(_t,eP),ur($,nP)),yt.svg===!0&&(ur(_t,rC),ur($,aC),ur($,v0)),yt.svgFilters===!0&&(ur(_t,nC),ur($,aC),ur($,v0)),yt.mathMl===!0&&(ur(_t,iC),ur($,iP),ur($,v0))),ht.ADD_TAGS&&(_t===F&&(_t=th(_t)),ur(_t,ht.ADD_TAGS)),ht.ADD_ATTR&&($===j&&($=th($)),ur($,ht.ADD_ATTR)),ht.ADD_URI_SAFE_ATTR&&ur(zt,ht.ADD_URI_SAFE_ATTR),ht.FORBID_CONTENTS&&(xt===Lt&&(xt=th(xt)),ur(xt,ht.FORBID_CONTENTS)),dt&&(_t["#text"]=!0),K&&ur(_t,["html","head","body"]),_t.table&&(ur(_t,["tbody"]),delete it.tbody),ka&&ka(ht),nn=ht)},ai=ur({},["mi","mo","mn","ms","mtext"]),$r=ur({},["foreignobject","desc","title","annotation-xml"]),Vr=ur({},rC);ur(Vr,nC),ur(Vr,Ggt);var Oe=ur({},iC);ur(Oe,kgt);var mr=function(ht){var Qt=w(ht);(!Qt||!Qt.tagName)&&(Qt={namespaceURI:oe,tagName:"template"});var qt=q0(ht.tagName),Ze=q0(Qt.tagName);if(ht.namespaceURI===Xt)return Qt.namespaceURI===oe?qt==="svg":Qt.namespaceURI===ee?qt==="svg"&&(Ze==="annotation-xml"||ai[Ze]):Boolean(Vr[qt]);if(ht.namespaceURI===ee)return Qt.namespaceURI===oe?qt==="math":Qt.namespaceURI===Xt?qt==="math"&&$r[Ze]:Boolean(Oe[qt]);if(ht.namespaceURI===oe){if(Qt.namespaceURI===Xt&&!$r[Ze]||Qt.namespaceURI===ee&&!ai[Ze])return!1;var Ir=ur({},["title","style","font","a","script"]);return!Oe[qt]&&(Ir[qt]||!Vr[qt])}return!1},Gn=function(ht){yd(e.removed,{element:ht});try{ht.parentNode.removeChild(ht)}catch{try{ht.outerHTML=R}catch{ht.remove()}}},ln=function(ht,Qt){try{yd(e.removed,{attribute:Qt.getAttributeNode(ht),from:Qt})}catch{yd(e.removed,{attribute:null,from:Qt})}if(Qt.removeAttribute(ht),ht==="is"&&!$[ht])if(et||G)try{Gn(Qt)}catch{}else try{Qt.setAttribute(ht,"")}catch{}},wi=function(ht){var Qt=void 0,qt=void 0;if(pt)ht="<remove></remove>"+ht;else{var Ze=tP(ht,/^[\r\n\t ]+/);qt=Ze&&Ze[0]}Re==="application/xhtml+xml"&&(ht='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ht+"</body></html>");var Ir=B?B.createHTML(ht):ht;if(Kt===oe)try{Qt=new c().parseFromString(Ir,Re)}catch{}if(!Qt||!Qt.documentElement){Qt=I.createDocument(Kt,"template",null);try{Qt.documentElement.innerHTML=Ye?"":Ir}catch{}}var an=Qt.body||Qt.documentElement;return ht&&qt&&an.insertBefore(n.createTextNode(qt),an.childNodes[0]||null),Kt===oe?P.call(Qt,K?"html":"body")[0]:K?Qt.documentElement:an},Ei=function(ht){return T.call(ht.ownerDocument||ht,ht,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT,null,!1)},Se=function(ht){return ht instanceof h&&(typeof ht.nodeName!="string"||typeof ht.textContent!="string"||typeof ht.removeChild!="function"||!(ht.attributes instanceof u)||typeof ht.removeAttribute!="function"||typeof ht.setAttribute!="function"||typeof ht.namespaceURI!="string"||typeof ht.insertBefore!="function")},oi=function(ht){return(typeof o>"u"?"undefined":$d(o))==="object"?ht instanceof o:ht&&(typeof ht>"u"?"undefined":$d(ht))==="object"&&typeof ht.nodeType=="number"&&typeof ht.nodeName=="string"},Mn=function(ht,Qt,qt){M[ht]&&Ugt(M[ht],function(Ze){Ze.call(e,Qt,qt,nn)})},Ci=function(ht){var Qt=void 0;if(Mn("beforeSanitizeElements",ht,null),Se(ht)||tP(ht.nodeName,/[\u0080-\uFFFF]/))return Gn(ht),!0;var qt=xe(ht.nodeName);if(Mn("uponSanitizeElement",ht,{tagName:qt,allowedTags:_t}),!oi(ht.firstElementChild)&&(!oi(ht.content)||!oi(ht.content.firstElementChild))&&go(/<[/\w]/g,ht.innerHTML)&&go(/<[/\w]/g,ht.textContent)||qt==="select"&&go(/<template/i,ht.innerHTML))return Gn(ht),!0;if(!_t[qt]||it[qt]){if(dt&&!xt[qt]){var Ze=w(ht)||ht.parentNode,Ir=m(ht)||ht.childNodes;if(Ir&&Ze)for(var an=Ir.length,mn=an-1;mn>=0;--mn)Ze.insertBefore(v(Ir[mn],!0),y(ht))}return!it[qt]&&Wr(qt)&&(X.tagNameCheck instanceof RegExp&&go(X.tagNameCheck,qt)||X.tagNameCheck instanceof Function&&X.tagNameCheck(qt))?!1:(Gn(ht),!0)}return ht instanceof s&&!mr(ht)||(qt==="noscript"||qt==="noembed")&&go(/<\/no(script|embed)/i,ht.innerHTML)?(Gn(ht),!0):(Ot&&ht.nodeType===3&&(Qt=ht.textContent,Qt=kl(Qt,D," "),Qt=kl(Qt,W," "),ht.textContent!==Qt&&(yd(e.removed,{element:ht.cloneNode()}),ht.textContent=Qt)),Mn("afterSanitizeElements",ht,null),!1)},tn=function(ht,Qt,qt){if(St&&(Qt==="id"||Qt==="name")&&(qt in n||qt in ar))return!1;if(!(at&&!gt[Qt]&&go(z,Qt))){if(!(wt&&go(tt,Qt))){if(!$[Qt]||gt[Qt]){if(!(Wr(ht)&&(X.tagNameCheck instanceof RegExp&&go(X.tagNameCheck,ht)||X.tagNameCheck instanceof Function&&X.tagNameCheck(ht))&&(X.attributeNameCheck instanceof RegExp&&go(X.attributeNameCheck,Qt)||X.attributeNameCheck instanceof Function&&X.attributeNameCheck(Qt))||Qt==="is"&&X.allowCustomizedBuiltInElements&&(X.tagNameCheck instanceof RegExp&&go(X.tagNameCheck,qt)||X.tagNameCheck instanceof Function&&X.tagNameCheck(qt))))return!1}else if(!zt[Qt]){if(!go(nt,kl(qt,rt,""))){if(!((Qt==="src"||Qt==="xlink:href"||Qt==="href")&&ht!=="script"&&Dgt(qt,"data:")===0&&Rt[ht])){if(!(Pt&&!go(q,kl(qt,rt,"")))){if(qt)return!1}}}}}}return!0},Wr=function(ht){return ht.indexOf("-")>0},yn=function(ht){var Qt=void 0,qt=void 0,Ze=void 0,Ir=void 0;Mn("beforeSanitizeAttributes",ht,null);var an=ht.attributes;if(an){var mn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};for(Ir=an.length;Ir--;){Qt=an[Ir];var qo=Qt,Bi=qo.name,gA=qo.namespaceURI;if(qt=Qgt(Qt.value),Ze=xe(Bi),mn.attrName=Ze,mn.attrValue=qt,mn.keepAttr=!0,mn.forceKeepAttr=void 0,Mn("uponSanitizeAttribute",ht,mn),qt=mn.attrValue,!mn.forceKeepAttr&&(ln(Bi,ht),!!mn.keepAttr)){if(go(/\/>/i,qt)){ln(Bi,ht);continue}Ot&&(qt=kl(qt,D," "),qt=kl(qt,W," "));var gl=xe(ht.nodeName);if(tn(gl,Ze,qt))try{gA?ht.setAttributeNS(gA,Bi,qt):ht.setAttribute(Bi,qt),JM(e.removed)}catch{}}}Mn("afterSanitizeAttributes",ht,null)}},ho=function se(ht){var Qt=void 0,qt=Ei(ht);for(Mn("beforeSanitizeShadowDOM",ht,null);Qt=qt.nextNode();)Mn("uponSanitizeShadowNode",Qt,null),!Ci(Qt)&&(Qt.content instanceof i&&se(Qt.content),yn(Qt));Mn("afterSanitizeShadowDOM",ht,null)};return e.sanitize=function(se,ht){var Qt=void 0,qt=void 0,Ze=void 0,Ir=void 0,an=void 0;if(Ye=!se,Ye&&(se="<!-->"),typeof se!="string"&&!oi(se)){if(typeof se.toString!="function")throw eC("toString is not a function");if(se=se.toString(),typeof se!="string")throw eC("dirty is not a string, aborting")}if(!e.isSupported){if($d(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof se=="string")return r.toStaticHTML(se);if(oi(se))return r.toStaticHTML(se.outerHTML)}return se}if(Z||Br(ht),e.removed=[],typeof se=="string"&&(Et=!1),Et){if(se.nodeName){var mn=xe(se.nodeName);if(!_t[mn]||it[mn])throw eC("root node is forbidden and cannot be sanitized in-place")}}else if(se instanceof o)Qt=wi("<!---->"),qt=Qt.ownerDocument.importNode(se,!0),qt.nodeType===1&&qt.nodeName==="BODY"||qt.nodeName==="HTML"?Qt=qt:Qt.appendChild(qt);else{if(!et&&!Ot&&!K&&se.indexOf("<")===-1)return B&&bt?B.createHTML(se):se;if(Qt=wi(se),!Qt)return et?null:bt?R:""}Qt&&pt&&Gn(Qt.firstChild);for(var qo=Ei(Et?se:Qt);Ze=qo.nextNode();)Ze.nodeType===3&&Ze===Ir||Ci(Ze)||(Ze.content instanceof i&&ho(Ze.content),yn(Ze),Ir=Ze);if(Ir=null,Et)return se;if(et){if(G)for(an=L.call(Qt.ownerDocument);Qt.firstChild;)an.appendChild(Qt.firstChild);else an=Qt;return $.shadowroot&&(an=S.call(t,an,!0)),an}var Bi=K?Qt.outerHTML:Qt.innerHTML;return Ot&&(Bi=kl(Bi,D," "),Bi=kl(Bi,W," ")),B&&bt?B.createHTML(Bi):Bi},e.setConfig=function(se){Br(se),Z=!0},e.clearConfig=function(){nn=null,Z=!1},e.isValidAttribute=function(se,ht,Qt){nn||Br({});var qt=xe(se),Ze=xe(ht);return tn(qt,Ze,Qt)},e.addHook=function(se,ht){typeof ht=="function"&&(M[se]=M[se]||[],yd(M[se],ht))},e.removeHook=function(se){M[se]&&JM(M[se])},e.removeHooks=function(se){M[se]&&(M[se]=[])},e.removeAllHooks=function(){M={}},e}var Zgt=A4(),Jgt=Object.freeze(Object.defineProperty({__proto__:null,default:Zgt},Symbol.toStringTag,{value:"Module"})),g0=function(r){return r&&r.Math==Math&&r},We=g0(typeof globalThis=="object"&&globalThis)||g0(typeof window=="object"&&window)||g0(typeof self=="object"&&self)||g0(typeof Ys=="object"&&Ys)||function(){return this}()||Function("return this")(),Ep={},mi=function(r){try{return!!r()}catch{return!0}},tyt=mi,dl=!tyt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),eyt=mi,S1=!eyt(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),ryt=S1,y0=Function.prototype.call,Lo=ryt?y0.bind(y0):function(){return y0.apply(y0,arguments)},l4={},u4={}.propertyIsEnumerable,h4=Object.getOwnPropertyDescriptor,nyt=h4&&!u4.call({1:2},1);l4.f=nyt?function(e){var t=h4(this,e);return!!t&&t.enumerable}:u4;var b1=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}},c4=S1,f4=Function.prototype,iyt=f4.bind,Mx=f4.call,ayt=c4&&iyt.bind(Mx,Mx),gn=c4?function(r){return r&&ayt(r)}:function(r){return r&&function(){return Mx.apply(r,arguments)}},p4=gn,oyt=p4({}.toString),syt=p4("".slice),Cp=function(r){return syt(oyt(r),8,-1)},Ayt=We,lyt=gn,uyt=mi,hyt=Cp,oC=Ayt.Object,cyt=lyt("".split),d4=uyt(function(){return!oC("z").propertyIsEnumerable(0)})?function(r){return hyt(r)=="String"?cyt(r,""):oC(r)}:oC,fyt=We,pyt=fyt.TypeError,cA=function(r){if(r==null)throw pyt("Can't call method on "+r);return r},dyt=d4,vyt=cA,yg=function(r){return dyt(vyt(r))},Pi=function(r){return typeof r=="function"},gyt=Pi,Nu=function(r){return typeof r=="object"?r!==null:gyt(r)},sC=We,yyt=Pi,myt=function(r){return yyt(r)?r:void 0},lc=function(r,e){return arguments.length<2?myt(sC[r]):sC[r]&&sC[r][e]},_yt=gn,L1=_yt({}.isPrototypeOf),wyt=lc,F1=wyt("navigator","userAgent")||"",v4=We,AC=F1,aP=v4.process,oP=v4.Deno,sP=aP&&aP.versions||oP&&oP.version,AP=sP&&sP.v8,ps,u_;AP&&(ps=AP.split("."),u_=ps[0]>0&&ps[0]<4?1:+(ps[0]+ps[1]));!u_&&AC&&(ps=AC.match(/Edge\/(\d+)/),(!ps||ps[1]>=74)&&(ps=AC.match(/Chrome\/(\d+)/),ps&&(u_=+ps[1])));var TL=u_,lP=TL,Eyt=mi,g4=!!Object.getOwnPropertySymbols&&!Eyt(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&lP&&lP<41}),Cyt=g4,y4=Cyt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Byt=We,Tyt=lc,xyt=Pi,Syt=L1,byt=y4,Lyt=Byt.Object,m4=byt?function(r){return typeof r=="symbol"}:function(r){var e=Tyt("Symbol");return xyt(e)&&Syt(e.prototype,Lyt(r))},Fyt=We,Iyt=Fyt.String,I1=function(r){try{return Iyt(r)}catch{return"Object"}},Ryt=We,Oyt=Pi,Myt=I1,Pyt=Ryt.TypeError,Bp=function(r){if(Oyt(r))return r;throw Pyt(Myt(r)+" is not a function")},Nyt=Bp,Tp=function(r,e){var t=r[e];return t==null?void 0:Nyt(t)},Uyt=We,lC=Lo,uC=Pi,hC=Nu,Dyt=Uyt.TypeError,Qyt=function(r,e){var t,n;if(e==="string"&&uC(t=r.toString)&&!hC(n=lC(t,r))||uC(t=r.valueOf)&&!hC(n=lC(t,r))||e!=="string"&&uC(t=r.toString)&&!hC(n=lC(t,r)))return n;throw Dyt("Can't convert object to primitive value")},R1={exports:{}},uP=We,Hyt=Object.defineProperty,xL=function(r,e){try{Hyt(uP,r,{value:e,configurable:!0,writable:!0})}catch{uP[r]=e}return e},Gyt=We,kyt=xL,hP="__core-js_shared__",$yt=Gyt[hP]||kyt(hP,{}),SL=$yt,cP=SL;(R1.exports=function(r,e){return cP[r]||(cP[r]=e!==void 0?e:{})})("versions",[]).push({version:"3.20.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"});var Vyt=We,jyt=cA,Kyt=Vyt.Object,O1=function(r){return Kyt(jyt(r))},Yyt=gn,zyt=O1,Xyt=Yyt({}.hasOwnProperty),fA=Object.hasOwn||function(e,t){return Xyt(zyt(e),t)},Wyt=gn,qyt=0,Zyt=Math.random(),Jyt=Wyt(1 .toString),_4=function(r){return"Symbol("+(r===void 0?"":r)+")_"+Jyt(++qyt+Zyt,36)},t0t=We,e0t=R1.exports,fP=fA,r0t=_4,pP=g4,w4=y4,Xc=e0t("wks"),Oh=t0t.Symbol,dP=Oh&&Oh.for,n0t=w4?Oh:Oh&&Oh.withoutSetter||r0t,Yi=function(r){if(!fP(Xc,r)||!(pP||typeof Xc[r]=="string")){var e="Symbol."+r;pP&&fP(Oh,r)?Xc[r]=Oh[r]:w4&&dP?Xc[r]=dP(e):Xc[r]=n0t(e)}return Xc[r]},i0t=We,a0t=Lo,vP=Nu,gP=m4,o0t=Tp,s0t=Qyt,A0t=Yi,l0t=i0t.TypeError,u0t=A0t("toPrimitive"),h0t=function(r,e){if(!vP(r)||gP(r))return r;var t=o0t(r,u0t),n;if(t){if(e===void 0&&(e="default"),n=a0t(t,r,e),!vP(n)||gP(n))return n;throw l0t("Can't convert object to primitive value")}return e===void 0&&(e="number"),s0t(r,e)},c0t=h0t,f0t=m4,bL=function(r){var e=c0t(r,"string");return f0t(e)?e:e+""},p0t=We,yP=Nu,Px=p0t.document,d0t=yP(Px)&&yP(Px.createElement),M1=function(r){return d0t?Px.createElement(r):{}},v0t=dl,g0t=mi,y0t=M1,E4=!v0t&&!g0t(function(){return Object.defineProperty(y0t("div"),"a",{get:function(){return 7}}).a!=7}),m0t=dl,_0t=Lo,w0t=l4,E0t=b1,C0t=yg,B0t=bL,T0t=fA,x0t=E4,mP=Object.getOwnPropertyDescriptor;Ep.f=m0t?mP:function(e,t){if(e=C0t(e),t=B0t(t),x0t)try{return mP(e,t)}catch{}if(T0t(e,t))return E0t(!_0t(w0t.f,e,t),e[t])};var vl={},S0t=dl,b0t=mi,C4=S0t&&b0t(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),B4=We,L0t=Nu,F0t=B4.String,I0t=B4.TypeError,Ta=function(r){if(L0t(r))return r;throw I0t(F0t(r)+" is not an object")},R0t=We,O0t=dl,M0t=E4,P0t=C4,m0=Ta,_P=bL,N0t=R0t.TypeError,cC=Object.defineProperty,U0t=Object.getOwnPropertyDescriptor,fC="enumerable",pC="configurable",dC="writable";vl.f=O0t?P0t?function(e,t,n){if(m0(e),t=_P(t),m0(n),typeof e=="function"&&t==="prototype"&&"value"in n&&dC in n&&!n[dC]){var i=U0t(e,t);i&&i[dC]&&(e[t]=n.value,n={configurable:pC in n?n[pC]:i[pC],enumerable:fC in n?n[fC]:i[fC],writable:!1})}return cC(e,t,n)}:cC:function(e,t,n){if(m0(e),t=_P(t),m0(n),M0t)try{return cC(e,t,n)}catch{}if("get"in n||"set"in n)throw N0t("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var D0t=dl,Q0t=vl,H0t=b1,xp=D0t?function(r,e,t){return Q0t.f(r,e,H0t(1,t))}:function(r,e,t){return r[e]=t,r},Uu={exports:{}},G0t=gn,k0t=Pi,Nx=SL,$0t=G0t(Function.toString);k0t(Nx.inspectSource)||(Nx.inspectSource=function(r){return $0t(r)});var P1=Nx.inspectSource,V0t=We,j0t=Pi,K0t=P1,wP=V0t.WeakMap,Y0t=j0t(wP)&&/native code/.test(K0t(wP)),z0t=R1.exports,X0t=_4,EP=z0t("keys"),LL=function(r){return EP[r]||(EP[r]=X0t(r))},FL={},W0t=Y0t,T4=We,vC=gn,q0t=Nu,Z0t=xp,gC=fA,yC=SL,J0t=LL,tmt=FL,CP="Object already initialized",Ux=T4.TypeError,emt=T4.WeakMap,h_,Vv,c_,rmt=function(r){return c_(r)?Vv(r):h_(r,{})},nmt=function(r){return function(e){var t;if(!q0t(e)||(t=Vv(e)).type!==r)throw Ux("Incompatible receiver, "+r+" required");return t}};if(W0t||yC.state){var eh=yC.state||(yC.state=new emt),imt=vC(eh.get),BP=vC(eh.has),amt=vC(eh.set);h_=function(r,e){if(BP(eh,r))throw new Ux(CP);return e.facade=r,amt(eh,r,e),e},Vv=function(r){return imt(eh,r)||{}},c_=function(r){return BP(eh,r)}}else{var Wc=J0t("state");tmt[Wc]=!0,h_=function(r,e){if(gC(r,Wc))throw new Ux(CP);return e.facade=r,Z0t(r,Wc,e),e},Vv=function(r){return gC(r,Wc)?r[Wc]:{}},c_=function(r){return gC(r,Wc)}}var N1={set:h_,get:Vv,has:c_,enforce:rmt,getterFor:nmt},Dx=dl,omt=fA,x4=Function.prototype,smt=Dx&&Object.getOwnPropertyDescriptor,IL=omt(x4,"name"),Amt=IL&&function(){}.name==="something",lmt=IL&&(!Dx||Dx&&smt(x4,"name").configurable),U1={EXISTS:IL,PROPER:Amt,CONFIGURABLE:lmt},umt=We,TP=Pi,hmt=fA,xP=xp,cmt=xL,fmt=P1,S4=N1,pmt=U1.CONFIGURABLE,dmt=S4.get,vmt=S4.enforce,gmt=String(String).split("String");(Uu.exports=function(r,e,t,n){var i=n?!!n.unsafe:!1,a=n?!!n.enumerable:!1,o=n?!!n.noTargetGet:!1,s=n&&n.name!==void 0?n.name:e,A;if(TP(t)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!hmt(t,"name")||pmt&&t.name!==s)&&xP(t,"name",s),A=vmt(t),A.source||(A.source=gmt.join(typeof s=="string"?s:""))),r===umt){a?r[e]=t:cmt(e,t);return}else i?!o&&r[e]&&(a=!0):delete r[e];a?r[e]=t:xP(r,e,t)})(Function.prototype,"toString",function(){return TP(this)&&dmt(this).source||fmt(this)});var b4={},ymt=Math.ceil,mmt=Math.floor,D1=function(r){var e=+r;return e!==e||e===0?0:(e>0?mmt:ymt)(e)},_mt=D1,wmt=Math.max,Emt=Math.min,L4=function(r,e){var t=_mt(r);return t<0?wmt(t+e,0):Emt(t,e)},Cmt=D1,Bmt=Math.min,Sp=function(r){return r>0?Bmt(Cmt(r),9007199254740991):0},Tmt=Sp,Q1=function(r){return Tmt(r.length)},xmt=yg,Smt=L4,bmt=Q1,SP=function(r){return function(e,t,n){var i=xmt(e),a=bmt(i),o=Smt(n,a),s;if(r&&t!=t){for(;a>o;)if(s=i[o++],s!=s)return!0}else for(;a>o;o++)if((r||o in i)&&i[o]===t)return r||o||0;return!r&&-1}},F4={includes:SP(!0),indexOf:SP(!1)},Lmt=gn,mC=fA,Fmt=yg,Imt=F4.indexOf,Rmt=FL,bP=Lmt([].push),I4=function(r,e){var t=Fmt(r),n=0,i=[],a;for(a in t)!mC(Rmt,a)&&mC(t,a)&&bP(i,a);for(;e.length>n;)mC(t,a=e[n++])&&(~Imt(i,a)||bP(i,a));return i},RL=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Omt=I4,Mmt=RL,Pmt=Mmt.concat("length","prototype");b4.f=Object.getOwnPropertyNames||function(e){return Omt(e,Pmt)};var R4={};R4.f=Object.getOwnPropertySymbols;var Nmt=lc,Umt=gn,Dmt=b4,Qmt=R4,Hmt=Ta,Gmt=Umt([].concat),kmt=Nmt("Reflect","ownKeys")||function(e){var t=Dmt.f(Hmt(e)),n=Qmt.f;return n?Gmt(t,n(e)):t},LP=fA,$mt=kmt,Vmt=Ep,jmt=vl,Kmt=function(r,e,t){for(var n=$mt(e),i=jmt.f,a=Vmt.f,o=0;o<n.length;o++){var s=n[o];!LP(r,s)&&!(t&&LP(t,s))&&i(r,s,a(e,s))}},Ymt=mi,zmt=Pi,Xmt=/#|\.prototype\./,mg=function(r,e){var t=qmt[Wmt(r)];return t==Jmt?!0:t==Zmt?!1:zmt(e)?Ymt(e):!!e},Wmt=mg.normalize=function(r){return String(r).replace(Xmt,".").toLowerCase()},qmt=mg.data={},Zmt=mg.NATIVE="N",Jmt=mg.POLYFILL="P",O4=mg,_C=We,t_t=Ep.f,e_t=xp,r_t=Uu.exports,n_t=xL,i_t=Kmt,a_t=O4,pA=function(r,e){var t=r.target,n=r.global,i=r.stat,a,o,s,A,l,u;if(n?o=_C:i?o=_C[t]||n_t(t,{}):o=(_C[t]||{}).prototype,o)for(s in e){if(l=e[s],r.noTargetGet?(u=t_t(o,s),A=u&&u.value):A=o[s],a=a_t(n?s:t+(i?".":"#")+s,r.forced),!a&&A!==void 0){if(typeof l==typeof A)continue;i_t(l,A)}(r.sham||A&&A.sham)&&e_t(l,"sham",!0),r_t(o,s,l,r)}},o_t=We,s_t=o_t.Promise,A_t=Uu.exports,l_t=function(r,e,t){for(var n in e)A_t(r,n,e[n],t);return r},M4=We,u_t=Pi,h_t=M4.String,c_t=M4.TypeError,f_t=function(r){if(typeof r=="object"||u_t(r))return r;throw c_t("Can't set "+h_t(r)+" as a prototype")},p_t=gn,d_t=Ta,v_t=f_t,P4=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=p_t(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(e,[]),r=e instanceof Array}catch{}return function(i,a){return d_t(i),v_t(a),r?t(i,a):i.__proto__=a,i}}():void 0),g_t=vl.f,y_t=fA,m_t=Yi,FP=m_t("toStringTag"),OL=function(r,e,t){r&&!t&&(r=r.prototype),r&&!y_t(r,FP)&&g_t(r,FP,{configurable:!0,value:e})},__t=lc,w_t=vl,E_t=Yi,C_t=dl,IP=E_t("species"),B_t=function(r){var e=__t(r),t=w_t.f;C_t&&e&&!e[IP]&&t(e,IP,{configurable:!0,get:function(){return this}})},T_t=We,x_t=L1,S_t=T_t.TypeError,b_t=function(r,e){if(x_t(e,r))return r;throw S_t("Incorrect invocation")},RP=gn,L_t=Bp,F_t=S1,I_t=RP(RP.bind),ML=function(r,e){return L_t(r),e===void 0?r:F_t?I_t(r,e):function(){return r.apply(e,arguments)}},_g={},R_t=Yi,O_t=_g,M_t=R_t("iterator"),P_t=Array.prototype,N_t=function(r){return r!==void 0&&(O_t.Array===r||P_t[M_t]===r)},U_t=Yi,D_t=U_t("toStringTag"),N4={};N4[D_t]="z";var Q_t=String(N4)==="[object z]",H_t=We,G_t=Q_t,k_t=Pi,Z0=Cp,$_t=Yi,V_t=$_t("toStringTag"),j_t=H_t.Object,K_t=Z0(function(){return arguments}())=="Arguments",Y_t=function(r,e){try{return r[e]}catch{}},PL=G_t?Z0:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=Y_t(e=j_t(r),V_t))=="string"?t:K_t?Z0(e):(n=Z0(e))=="Object"&&k_t(e.callee)?"Arguments":n},z_t=PL,OP=Tp,X_t=_g,W_t=Yi,q_t=W_t("iterator"),U4=function(r){if(r!=null)return OP(r,q_t)||OP(r,"@@iterator")||X_t[z_t(r)]},Z_t=We,J_t=Lo,t1t=Bp,e1t=Ta,r1t=I1,n1t=U4,i1t=Z_t.TypeError,a1t=function(r,e){var t=arguments.length<2?n1t(r):e;if(t1t(t))return e1t(J_t(t,r));throw i1t(r1t(r)+" is not iterable")},o1t=Lo,MP=Ta,s1t=Tp,A1t=function(r,e,t){var n,i;MP(r);try{if(n=s1t(r,"return"),!n){if(e==="throw")throw t;return t}n=o1t(n,r)}catch(a){i=!0,n=a}if(e==="throw")throw t;if(i)throw n;return MP(n),t},l1t=We,u1t=ML,h1t=Lo,c1t=Ta,f1t=I1,p1t=N_t,d1t=Q1,PP=L1,v1t=a1t,g1t=U4,NP=A1t,y1t=l1t.TypeError,J0=function(r,e){this.stopped=r,this.result=e},UP=J0.prototype,m1t=function(r,e,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_ITERATOR),o=!!(t&&t.INTERRUPTED),s=u1t(e,n),A,l,u,h,c,f,d,v=function(m){return A&&NP(A,"normal",m),new J0(!0,m)},y=function(m){return i?(c1t(m),o?s(m[0],m[1],v):s(m[0],m[1])):o?s(m,v):s(m)};if(a)A=r;else{if(l=g1t(r),!l)throw y1t(f1t(r)+" is not iterable");if(p1t(l)){for(u=0,h=d1t(r);h>u;u++)if(c=y(r[u]),c&&PP(UP,c))return c;return new J0(!1)}A=v1t(r,l)}for(f=A.next;!(d=h1t(f,A)).done;){try{c=y(d.value)}catch(m){NP(A,"throw",m)}if(typeof c=="object"&&c&&PP(UP,c))return c}return new J0(!1)},_1t=Yi,D4=_1t("iterator"),Q4=!1;try{var w1t=0,DP={next:function(){return{done:!!w1t++}},return:function(){Q4=!0}};DP[D4]=function(){return this},Array.from(DP,function(){throw 2})}catch{}var E1t=function(r,e){if(!e&&!Q4)return!1;var t=!1;try{var n={};n[D4]=function(){return{next:function(){return{done:t=!0}}}},r(n)}catch{}return t},C1t=gn,B1t=mi,H4=Pi,T1t=PL,x1t=lc,S1t=P1,G4=function(){},b1t=[],k4=x1t("Reflect","construct"),NL=/^\s*(?:class|function)\b/,L1t=C1t(NL.exec),F1t=!NL.exec(G4),md=function(e){if(!H4(e))return!1;try{return k4(G4,b1t,e),!0}catch{return!1}},$4=function(e){if(!H4(e))return!1;switch(T1t(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return F1t||!!L1t(NL,S1t(e))}catch{return!0}};$4.sham=!0;var I1t=!k4||B1t(function(){var r;return md(md.call)||!md(Object)||!md(function(){r=!0})||r})?$4:md,R1t=We,O1t=I1t,M1t=I1,P1t=R1t.TypeError,N1t=function(r){if(O1t(r))return r;throw P1t(M1t(r)+" is not a constructor")},QP=Ta,U1t=N1t,D1t=Yi,Q1t=D1t("species"),V4=function(r,e){var t=QP(r).constructor,n;return t===void 0||(n=QP(t)[Q1t])==null?e:U1t(n)},H1t=S1,j4=Function.prototype,HP=j4.apply,GP=j4.call,UL=typeof Reflect=="object"&&Reflect.apply||(H1t?GP.bind(HP):function(){return GP.apply(HP,arguments)}),G1t=lc,K4=G1t("document","documentElement"),k1t=gn,$1t=k1t([].slice),V1t=F1,Y4=/(?:ipad|iphone|ipod).*applewebkit/i.test(V1t),j1t=Cp,K1t=We,H1=j1t(K1t.process)=="process",Bo=We,Y1t=UL,z1t=ML,kP=Pi,X1t=fA,W1t=mi,$P=K4,q1t=$1t,VP=M1,Z1t=Y4,J1t=H1,Qx=Bo.setImmediate,Hx=Bo.clearImmediate,twt=Bo.process,wC=Bo.Dispatch,ewt=Bo.Function,jP=Bo.MessageChannel,rwt=Bo.String,EC=0,hv={},KP="onreadystatechange",jv,rh,CC,BC;try{jv=Bo.location}catch{}var DL=function(r){if(X1t(hv,r)){var e=hv[r];delete hv[r],e()}},TC=function(r){return function(){DL(r)}},YP=function(r){DL(r.data)},zP=function(r){Bo.postMessage(rwt(r),jv.protocol+"//"+jv.host)};(!Qx||!Hx)&&(Qx=function(e){var t=q1t(arguments,1);return hv[++EC]=function(){Y1t(kP(e)?e:ewt(e),void 0,t)},rh(EC),EC},Hx=function(e){delete hv[e]},J1t?rh=function(r){twt.nextTick(TC(r))}:wC&&wC.now?rh=function(r){wC.now(TC(r))}:jP&&!Z1t?(CC=new jP,BC=CC.port2,CC.port1.onmessage=YP,rh=z1t(BC.postMessage,BC)):Bo.addEventListener&&kP(Bo.postMessage)&&!Bo.importScripts&&jv&&jv.protocol!=="file:"&&!W1t(zP)?(rh=zP,Bo.addEventListener("message",YP,!1)):KP in VP("script")?rh=function(r){$P.appendChild(VP("script"))[KP]=function(){$P.removeChild(this),DL(r)}}:rh=function(r){setTimeout(TC(r),0)});var z4={set:Qx,clear:Hx},nwt=F1,iwt=We,awt=/ipad|iphone|ipod/i.test(nwt)&&iwt.Pebble!==void 0,owt=F1,swt=/web0s(?!.*chrome)/i.test(owt),Kh=We,XP=ML,Awt=Ep.f,xC=z4.set,lwt=Y4,uwt=awt,hwt=swt,SC=H1,WP=Kh.MutationObserver||Kh.WebKitMutationObserver,qP=Kh.document,ZP=Kh.process,_0=Kh.Promise,JP=Awt(Kh,"queueMicrotask"),X4=JP&&JP.value,_d,dh,cv,uf,bC,LC,w0,tN;X4||(_d=function(){var r,e;for(SC&&(r=ZP.domain)&&r.exit();dh;){e=dh.fn,dh=dh.next;try{e()}catch(t){throw dh?uf():cv=void 0,t}}cv=void 0,r&&r.enter()},!lwt&&!SC&&!hwt&&WP&&qP?(bC=!0,LC=qP.createTextNode(""),new WP(_d).observe(LC,{characterData:!0}),uf=function(){LC.data=bC=!bC}):!uwt&&_0&&_0.resolve?(w0=_0.resolve(void 0),w0.constructor=_0,tN=XP(w0.then,w0),uf=function(){tN(_d)}):SC?uf=function(){ZP.nextTick(_d)}:(xC=XP(xC,Kh),uf=function(){xC(_d)}));var cwt=X4||function(r){var e={fn:r,next:void 0};cv&&(cv.next=e),dh||(dh=e,uf()),cv=e},QL={},eN=Bp,fwt=function(r){var e,t;this.promise=new r(function(n,i){if(e!==void 0||t!==void 0)throw TypeError("Bad Promise constructor");e=n,t=i}),this.resolve=eN(e),this.reject=eN(t)};QL.f=function(r){return new fwt(r)};var pwt=Ta,dwt=Nu,vwt=QL,gwt=function(r,e){if(pwt(r),dwt(e)&&e.constructor===r)return e;var t=vwt.f(r),n=t.resolve;return n(e),t.promise},ywt=We,mwt=function(r,e){var t=ywt.console;t&&t.error&&(arguments.length==1?t.error(r):t.error(r,e))},_wt=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}},W4=function(){this.head=null,this.tail=null};W4.prototype={add:function(r){var e={item:r,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var r=this.head;if(r)return this.head=r.next,this.tail===r&&(this.tail=null),r.item}};var wwt=W4,Ewt=typeof window=="object",G1=pA,il=We,Cwt=lc,al=Lo,f_=s_t,rN=Uu.exports,Bwt=l_t,nN=P4,Twt=OL,xwt=B_t,Gx=Bp,fv=Pi,Swt=Nu,bwt=b_t,Lwt=P1,iN=m1t,Fwt=E1t,Iwt=V4,q4=z4.set,HL=cwt,Rwt=gwt,Owt=mwt,Z4=QL,kx=_wt,Mwt=wwt,GL=N1,Pwt=O4,Nwt=Yi,Uwt=Ewt,p_=H1,aN=TL,Dwt=Nwt("species"),dA="Promise",oN=GL.getterFor(dA),Qwt=GL.set,Hwt=GL.getterFor(dA),lh=f_&&f_.prototype,gs=f_,wd=lh,J4=il.TypeError,$x=il.document,kL=il.process,ep=Z4.f,Gwt=ep,kwt=!!($x&&$x.createEvent&&il.dispatchEvent),t8=fv(il.PromiseRejectionEvent),e8="unhandledrejection",$wt="rejectionhandled",sN=0,r8=1,Vwt=2,$L=1,n8=2,Vx=!1,E0,AN,i8,lN,wg=Pwt(dA,function(){var r=Lwt(gs),e=r!==String(gs);if(!e&&aN===66)return!0;if(aN>=51&&/native code/.test(r))return!1;var t=new gs(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=t.constructor={};return i[Dwt]=n,Vx=t.then(function(){})instanceof n,Vx?!e&&Uwt&&!t8:!0}),jwt=wg||!Fwt(function(r){gs.all(r).catch(function(){})}),a8=function(r){var e;return Swt(r)&&fv(e=r.then)?e:!1},o8=function(r,e){var t=e.value,n=e.state==r8,i=n?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,A,l,u;try{i?(n||(e.rejection===n8&&Ywt(e),e.rejection=$L),i===!0?A=t:(s&&s.enter(),A=i(t),s&&(s.exit(),u=!0)),A===r.promise?o(J4("Promise-chain cycle")):(l=a8(A))?al(l,A,a,o):a(A)):o(t)}catch(h){s&&!u&&s.exit(),o(h)}},s8=function(r,e){r.notified||(r.notified=!0,HL(function(){for(var t=r.reactions,n;n=t.get();)o8(n,r);r.notified=!1,e&&!r.rejection&&Kwt(r)}))},A8=function(r,e,t){var n,i;kwt?(n=$x.createEvent("Event"),n.promise=e,n.reason=t,n.initEvent(r,!1,!0),il.dispatchEvent(n)):n={promise:e,reason:t},!t8&&(i=il["on"+r])?i(n):r===e8&&Owt("Unhandled promise rejection",t)},Kwt=function(r){al(q4,il,function(){var e=r.facade,t=r.value,n=uN(r),i;if(n&&(i=kx(function(){p_?kL.emit("unhandledRejection",t,e):A8(e8,e,t)}),r.rejection=p_||uN(r)?n8:$L,i.error))throw i.value})},uN=function(r){return r.rejection!==$L&&!r.parent},Ywt=function(r){al(q4,il,function(){var e=r.facade;p_?kL.emit("rejectionHandled",e):A8($wt,e,r.value)})},Ef=function(r,e,t){return function(n){r(e,n,t)}},Df=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=Vwt,s8(r,!0))},jx=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw J4("Promise can't be resolved itself");var n=a8(e);n?HL(function(){var i={done:!1};try{al(n,e,Ef(jx,i,r),Ef(Df,i,r))}catch(a){Df(i,a,r)}}):(r.value=e,r.state=r8,s8(r,!1))}catch(i){Df({done:!1},i,r)}}};if(wg&&(gs=function(e){bwt(this,wd),Gx(e),al(E0,this);var t=oN(this);try{e(Ef(jx,t),Ef(Df,t))}catch(n){Df(t,n)}},wd=gs.prototype,E0=function(e){Qwt(this,{type:dA,done:!1,notified:!1,parent:!1,reactions:new Mwt,rejection:!1,state:sN,value:void 0})},E0.prototype=Bwt(wd,{then:function(e,t){var n=Hwt(this),i=ep(Iwt(this,gs));return n.parent=!0,i.ok=fv(e)?e:!0,i.fail=fv(t)&&t,i.domain=p_?kL.domain:void 0,n.state==sN?n.reactions.add(i):HL(function(){o8(i,n)}),i.promise},catch:function(r){return this.then(void 0,r)}}),AN=function(){var r=new E0,e=oN(r);this.promise=r,this.resolve=Ef(jx,e),this.reject=Ef(Df,e)},Z4.f=ep=function(r){return r===gs||r===i8?new AN(r):Gwt(r)},fv(f_)&&lh!==Object.prototype)){lN=lh.then,Vx||(rN(lh,"then",function(e,t){var n=this;return new gs(function(i,a){al(lN,n,i,a)}).then(e,t)},{unsafe:!0}),rN(lh,"catch",wd.catch,{unsafe:!0}));try{delete lh.constructor}catch{}nN&&nN(lh,wd)}G1({global:!0,wrap:!0,forced:wg},{Promise:gs});Twt(gs,dA,!1);xwt(dA);i8=Cwt(dA);G1({target:dA,stat:!0,forced:wg},{reject:function(e){var t=ep(this);return al(t.reject,void 0,e),t.promise}});G1({target:dA,stat:!0,forced:wg},{resolve:function(e){return Rwt(this,e)}});G1({target:dA,stat:!0,forced:jwt},{all:function(e){var t=this,n=ep(t),i=n.resolve,a=n.reject,o=kx(function(){var s=Gx(t.resolve),A=[],l=0,u=1;iN(e,function(h){var c=l++,f=!1;u++,al(s,t,h).then(function(d){f||(f=!0,A[c]=d,--u||i(A))},a)}),--u||i(A)});return o.error&&a(o.value),n.promise},race:function(e){var t=this,n=ep(t),i=n.reject,a=kx(function(){var o=Gx(t.resolve);iN(e,function(s){al(o,t,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});function hN(r,e,t,n,i,a,o){try{var s=r[a](o),A=s.value}catch(l){t(l);return}s.done?e(A):Promise.resolve(A).then(n,i)}function sl(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(A){hN(a,n,i,o,s,"next",A)}function s(A){hN(a,n,i,o,s,"throw",A)}o(void 0)})}}var zwt=We,Xwt=PL,Wwt=zwt.String,vA=function(r){if(Xwt(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Wwt(r)},qwt=Ta,l8=function(){var r=qwt(this),e="";return r.global&&(e+="g"),r.ignoreCase&&(e+="i"),r.multiline&&(e+="m"),r.dotAll&&(e+="s"),r.unicode&&(e+="u"),r.sticky&&(e+="y"),e},VL=mi,Zwt=We,jL=Zwt.RegExp,KL=VL(function(){var r=jL("a","y");return r.lastIndex=2,r.exec("abcd")!=null}),Jwt=KL||VL(function(){return!jL("a","y").sticky}),tEt=KL||VL(function(){var r=jL("^r","gy");return r.lastIndex=2,r.exec("str")!=null}),u8={BROKEN_CARET:tEt,MISSED_STICKY:Jwt,UNSUPPORTED_Y:KL},h8={},eEt=I4,rEt=RL,nEt=Object.keys||function(e){return eEt(e,rEt)},iEt=dl,aEt=C4,oEt=vl,sEt=Ta,AEt=yg,lEt=nEt;h8.f=iEt&&!aEt?Object.defineProperties:function(e,t){sEt(e);for(var n=AEt(t),i=lEt(t),a=i.length,o=0,s;a>o;)oEt.f(e,s=i[o++],n[s]);return e};var uEt=Ta,hEt=h8,cN=RL,cEt=FL,fEt=K4,pEt=M1,dEt=LL,fN=">",pN="<",Kx="prototype",Yx="script",c8=dEt("IE_PROTO"),FC=function(){},f8=function(r){return pN+Yx+fN+r+pN+"/"+Yx+fN},dN=function(r){r.write(f8("")),r.close();var e=r.parentWindow.Object;return r=null,e},vEt=function(){var r=pEt("iframe"),e="java"+Yx+":",t;return r.style.display="none",fEt.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(f8("document.F=Object")),t.close(),t.F},C0,tm=function(){try{C0=new ActiveXObject("htmlfile")}catch{}tm=typeof document<"u"?document.domain&&C0?dN(C0):vEt():dN(C0);for(var r=cN.length;r--;)delete tm[Kx][cN[r]];return tm()};cEt[c8]=!0;var YL=Object.create||function(e,t){var n;return e!==null?(FC[Kx]=uEt(e),n=new FC,FC[Kx]=null,n[c8]=e):n=tm(),t===void 0?n:hEt.f(n,t)},gEt=mi,yEt=We,mEt=yEt.RegExp,_Et=gEt(function(){var r=mEt(".","s");return!(r.dotAll&&r.exec(`
|
||
`)&&r.flags==="s")}),wEt=mi,EEt=We,CEt=EEt.RegExp,BEt=wEt(function(){var r=CEt("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),Cf=Lo,k1=gn,TEt=vA,xEt=l8,SEt=u8,bEt=R1.exports,LEt=YL,FEt=N1.get,IEt=_Et,REt=BEt,OEt=bEt("native-string-replace",String.prototype.replace),d_=RegExp.prototype.exec,zx=d_,MEt=k1("".charAt),PEt=k1("".indexOf),NEt=k1("".replace),IC=k1("".slice),Xx=function(){var r=/a/,e=/b*/g;return Cf(d_,r,"a"),Cf(d_,e,"a"),r.lastIndex!==0||e.lastIndex!==0}(),p8=SEt.BROKEN_CARET,Wx=/()??/.exec("")[1]!==void 0,UEt=Xx||Wx||p8||IEt||REt;UEt&&(zx=function(e){var t=this,n=FEt(t),i=TEt(e),a=n.raw,o,s,A,l,u,h,c;if(a)return a.lastIndex=t.lastIndex,o=Cf(zx,a,i),t.lastIndex=a.lastIndex,o;var f=n.groups,d=p8&&t.sticky,v=Cf(xEt,t),y=t.source,m=0,w=i;if(d&&(v=NEt(v,"y",""),PEt(v,"g")===-1&&(v+="g"),w=IC(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&MEt(i,t.lastIndex-1)!==`
|
||
`)&&(y="(?: "+y+")",w=" "+w,m++),s=new RegExp("^(?:"+y+")",v)),Wx&&(s=new RegExp("^"+y+"$(?!\\s)",v)),Xx&&(A=t.lastIndex),l=Cf(d_,d?s:t,w),d?l?(l.input=IC(l.input,m),l[0]=IC(l[0],m),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:Xx&&l&&(t.lastIndex=t.global?l.index+l[0].length:A),Wx&&l&&l.length>1&&Cf(OEt,l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&f)for(l.groups=h=LEt(null),u=0;u<f.length;u++)c=f[u],h[c[0]]=l[c[1]];return l});var $1=zx,DEt=pA,vN=$1;DEt({target:"RegExp",proto:!0,forced:/./.exec!==vN},{exec:vN});var gN=gn,yN=Uu.exports,QEt=$1,mN=mi,d8=Yi,HEt=xp,GEt=d8("species"),RC=RegExp.prototype,zL=function(r,e,t,n){var i=d8(r),a=!mN(function(){var l={};return l[i]=function(){return 7},""[r](l)!=7}),o=a&&!mN(function(){var l=!1,u=/a/;return r==="split"&&(u={},u.constructor={},u.constructor[GEt]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return l=!0,null},u[i](""),!l});if(!a||!o||t){var s=gN(/./[i]),A=e(i,""[r],function(l,u,h,c,f){var d=gN(l),v=u.exec;return v===QEt||v===RC.exec?a&&!f?{done:!0,value:s(u,h,c)}:{done:!0,value:d(h,u,c)}:{done:!1}});yN(String.prototype,r,A[0]),yN(RC,i,A[1])}n&&HEt(RC[i],"sham",!0)},XL=gn,kEt=D1,$Et=vA,VEt=cA,jEt=XL("".charAt),_N=XL("".charCodeAt),KEt=XL("".slice),wN=function(r){return function(e,t){var n=$Et(VEt(e)),i=kEt(t),a=n.length,o,s;return i<0||i>=a?r?"":void 0:(o=_N(n,i),o<55296||o>56319||i+1===a||(s=_N(n,i+1))<56320||s>57343?r?jEt(n,i):o:r?KEt(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},YEt={codeAt:wN(!1),charAt:wN(!0)},zEt=YEt.charAt,WL=function(r,e,t){return e+(t?zEt(r,e).length:1)},XEt=We,EN=Lo,WEt=Ta,qEt=Pi,ZEt=Cp,JEt=$1,tCt=XEt.TypeError,qL=function(r,e){var t=r.exec;if(qEt(t)){var n=EN(t,r,e);return n!==null&&WEt(n),n}if(ZEt(r)==="RegExp")return EN(JEt,r,e);throw tCt("RegExp#exec called on incompatible receiver")},eCt=Lo,rCt=zL,nCt=Ta,iCt=Sp,OC=vA,aCt=cA,oCt=Tp,sCt=WL,CN=qL;rCt("match",function(r,e,t){return[function(i){var a=aCt(this),o=i==null?void 0:oCt(i,r);return o?eCt(o,i,a):new RegExp(i)[r](OC(a))},function(n){var i=nCt(this),a=OC(n),o=t(e,i,a);if(o.done)return o.value;if(!i.global)return CN(i,a);var s=i.unicode;i.lastIndex=0;for(var A=[],l=0,u;(u=CN(i,a))!==null;){var h=OC(u[0]);A[l]=h,h===""&&(i.lastIndex=sCt(a,iCt(i.lastIndex),s)),l++}return l===0?null:A}]});var ZL=gn,ACt=O1,lCt=Math.floor,MC=ZL("".charAt),uCt=ZL("".replace),PC=ZL("".slice),hCt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,cCt=/\$([$&'`]|\d{1,2})/g,fCt=function(r,e,t,n,i,a){var o=t+r.length,s=n.length,A=cCt;return i!==void 0&&(i=ACt(i),A=hCt),uCt(a,A,function(l,u){var h;switch(MC(u,0)){case"$":return"$";case"&":return r;case"`":return PC(e,0,t);case"'":return PC(e,o);case"<":h=i[PC(u,1,-1)];break;default:var c=+u;if(c===0)return l;if(c>s){var f=lCt(c/10);return f===0?l:f<=s?n[f-1]===void 0?MC(u,1):n[f-1]+MC(u,1):l}h=n[c-1]}return h===void 0?"":h})},pCt=UL,BN=Lo,V1=gn,dCt=zL,vCt=mi,gCt=Ta,yCt=Pi,mCt=D1,_Ct=Sp,qc=vA,wCt=cA,ECt=WL,CCt=Tp,BCt=fCt,TCt=qL,xCt=Yi,qx=xCt("replace"),SCt=Math.max,bCt=Math.min,LCt=V1([].concat),NC=V1([].push),TN=V1("".indexOf),xN=V1("".slice),FCt=function(r){return r===void 0?r:String(r)},ICt=function(){return"a".replace(/./,"$0")==="$0"}(),SN=function(){return/./[qx]?/./[qx]("a","$0")==="":!1}(),RCt=!vCt(function(){var r=/./;return r.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(r,"$<a>")!=="7"});dCt("replace",function(r,e,t){var n=SN?"$":"$0";return[function(a,o){var s=wCt(this),A=a==null?void 0:CCt(a,qx);return A?BN(A,a,s,o):BN(e,qc(s),a,o)},function(i,a){var o=gCt(this),s=qc(i);if(typeof a=="string"&&TN(a,n)===-1&&TN(a,"$<")===-1){var A=t(e,o,s,a);if(A.done)return A.value}var l=yCt(a);l||(a=qc(a));var u=o.global;if(u){var h=o.unicode;o.lastIndex=0}for(var c=[];;){var f=TCt(o,s);if(f===null||(NC(c,f),!u))break;var d=qc(f[0]);d===""&&(o.lastIndex=ECt(s,_Ct(o.lastIndex),h))}for(var v="",y=0,m=0;m<c.length;m++){f=c[m];for(var w=qc(f[0]),C=SCt(bCt(mCt(f.index),s.length),0),B=[],R=1;R<f.length;R++)NC(B,FCt(f[R]));var O=f.groups;if(l){var I=LCt([w],B,C,s);O!==void 0&&NC(I,O);var T=qc(pCt(a,void 0,I))}else T=BCt(w,s,C,B,O,a);C>=y&&(v+=xN(s,y,C)+T,y=C+w.length)}return v+xN(s,y)}]},!RCt||!ICt||SN);var OCt=Nu,MCt=Cp,PCt=Yi,NCt=PCt("match"),v8=function(r){var e;return OCt(r)&&((e=r[NCt])!==void 0?!!e:MCt(r)=="RegExp")},UCt=We,DCt=v8,QCt=UCt.TypeError,JL=function(r){if(DCt(r))throw QCt("The method doesn't accept regular expressions");return r},HCt=Yi,GCt=HCt("match"),tF=function(r){var e=/./;try{"/./"[r](e)}catch{try{return e[GCt]=!1,"/./"[r](e)}catch{}}return!1},kCt=pA,g8=gn,$Ct=Ep.f,VCt=Sp,bN=vA,jCt=JL,KCt=cA,YCt=tF,LN=g8("".startsWith),zCt=g8("".slice),XCt=Math.min,y8=YCt("startsWith"),WCt=!y8&&!!function(){var r=$Ct(String.prototype,"startsWith");return r&&!r.writable}();kCt({target:"String",proto:!0,forced:!WCt&&!y8},{startsWith:function(e){var t=bN(KCt(this));jCt(e);var n=VCt(XCt(arguments.length>1?arguments[1]:void 0,t.length)),i=bN(e);return LN?LN(t,i,n):zCt(t,n,n+i.length)===i}});var qCt=Yi,ZCt=YL,JCt=vl,Zx=qCt("unscopables"),Jx=Array.prototype;Jx[Zx]==null&&JCt.f(Jx,Zx,{configurable:!0,value:ZCt(null)});var tBt=function(r){Jx[Zx][r]=!0},eBt=mi,rBt=!eBt(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),nBt=We,iBt=fA,aBt=Pi,oBt=O1,sBt=LL,ABt=rBt,FN=sBt("IE_PROTO"),tS=nBt.Object,lBt=tS.prototype,m8=ABt?tS.getPrototypeOf:function(r){var e=oBt(r);if(iBt(e,FN))return e[FN];var t=e.constructor;return aBt(t)&&e instanceof t?t.prototype:e instanceof tS?lBt:null},uBt=mi,hBt=Pi,IN=m8,cBt=Uu.exports,fBt=Yi,eS=fBt("iterator"),_8=!1,Yh,UC,DC;[].keys&&(DC=[].keys(),"next"in DC?(UC=IN(IN(DC)),UC!==Object.prototype&&(Yh=UC)):_8=!0);var pBt=Yh==null||uBt(function(){var r={};return Yh[eS].call(r)!==r});pBt&&(Yh={});hBt(Yh[eS])||cBt(Yh,eS,function(){return this});var w8={IteratorPrototype:Yh,BUGGY_SAFARI_ITERATORS:_8},dBt=w8.IteratorPrototype,vBt=YL,gBt=b1,yBt=OL,mBt=_g,_Bt=function(){return this},wBt=function(r,e,t,n){var i=e+" Iterator";return r.prototype=vBt(dBt,{next:gBt(+!n,t)}),yBt(r,i,!1),mBt[i]=_Bt,r},EBt=pA,CBt=Lo,E8=U1,BBt=Pi,TBt=wBt,RN=m8,ON=P4,xBt=OL,SBt=xp,QC=Uu.exports,bBt=Yi,LBt=_g,C8=w8,FBt=E8.PROPER,IBt=E8.CONFIGURABLE,MN=C8.IteratorPrototype,B0=C8.BUGGY_SAFARI_ITERATORS,Ed=bBt("iterator"),PN="keys",Cd="values",NN="entries",RBt=function(){return this},OBt=function(r,e,t,n,i,a,o){TBt(t,e,n);var s=function(m){if(m===i&&c)return c;if(!B0&&m in u)return u[m];switch(m){case PN:return function(){return new t(this,m)};case Cd:return function(){return new t(this,m)};case NN:return function(){return new t(this,m)}}return function(){return new t(this)}},A=e+" Iterator",l=!1,u=r.prototype,h=u[Ed]||u["@@iterator"]||i&&u[i],c=!B0&&h||s(i),f=e=="Array"&&u.entries||h,d,v,y;if(f&&(d=RN(f.call(new r)),d!==Object.prototype&&d.next&&(RN(d)!==MN&&(ON?ON(d,MN):BBt(d[Ed])||QC(d,Ed,RBt)),xBt(d,A,!0))),FBt&&i==Cd&&h&&h.name!==Cd&&(IBt?SBt(u,"name",Cd):(l=!0,c=function(){return CBt(h,this)})),i)if(v={values:s(Cd),keys:a?c:s(PN),entries:s(NN)},o)for(y in v)(B0||l||!(y in u))&&QC(u,y,v[y]);else EBt({target:e,proto:!0,forced:B0||l},v);return u[Ed]!==c&&QC(u,Ed,c,{name:i}),LBt[e]=c,v},MBt=yg,eF=tBt,UN=_g,B8=N1,PBt=vl.f,NBt=OBt,UBt=dl,T8="Array Iterator",DBt=B8.set,QBt=B8.getterFor(T8),HBt=NBt(Array,"Array",function(r,e){DBt(this,{type:T8,target:MBt(r),index:0,kind:e})},function(){var r=QBt(this),e=r.target,t=r.kind,n=r.index++;return!e||n>=e.length?(r.target=void 0,{value:void 0,done:!0}):t=="keys"?{value:n,done:!1}:t=="values"?{value:e[n],done:!1}:{value:[n,e[n]],done:!1}},"values"),DN=UN.Arguments=UN.Array;eF("keys");eF("values");eF("entries");if(UBt&&DN.name!=="values")try{PBt(DN,"name",{value:"values"})}catch{}var GBt={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},kBt=M1,HC=kBt("span").classList,QN=HC&&HC.constructor&&HC.constructor.prototype,$Bt=QN===Object.prototype?void 0:QN,HN=We,x8=GBt,VBt=$Bt,Vd=HBt,GC=xp,S8=Yi,kC=S8("iterator"),GN=S8("toStringTag"),$C=Vd.values,b8=function(r,e){if(r){if(r[kC]!==$C)try{GC(r,kC,$C)}catch{r[kC]=$C}if(r[GN]||GC(r,GN,e),x8[e]){for(var t in Vd)if(r[t]!==Vd[t])try{GC(r,t,Vd[t])}catch{r[t]=Vd[t]}}}};for(var VC in x8)b8(HN[VC]&&HN[VC].prototype,VC);b8(VBt,"DOMTokenList");function rF(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var jBt=We,KBt=Bp,YBt=O1,zBt=d4,XBt=Q1,WBt=jBt.TypeError,kN=function(r){return function(e,t,n,i){KBt(t);var a=YBt(e),o=zBt(a),s=XBt(a),A=r?s-1:0,l=r?-1:1;if(n<2)for(;;){if(A in o){i=o[A],A+=l;break}if(A+=l,r?A<0:s<=A)throw WBt("Reduce of empty array with no initial value")}for(;r?A>=0:s>A;A+=l)A in o&&(i=t(i,o[A],A,a));return i}},qBt={left:kN(!1),right:kN(!0)},ZBt=mi,L8=function(r,e){var t=[][r];return!!t&&ZBt(function(){t.call(null,e||function(){throw 1},1)})},JBt=pA,tTt=qBt.left,eTt=L8,$N=TL,rTt=H1,nTt=eTt("reduce"),iTt=!rTt&&$N>79&&$N<83;JBt({target:"Array",proto:!0,forced:!nTt||iTt},{reduce:function(e){var t=arguments.length;return tTt(this,e,t,t>1?arguments[1]:void 0)}});var aTt=pA,F8=gn,oTt=Ep.f,sTt=Sp,VN=vA,ATt=JL,lTt=cA,uTt=tF,jN=F8("".endsWith),hTt=F8("".slice),cTt=Math.min,I8=uTt("endsWith"),fTt=!I8&&!!function(){var r=oTt(String.prototype,"endsWith");return r&&!r.writable}();aTt({target:"String",proto:!0,forced:!fTt&&!I8},{endsWith:function(e){var t=VN(lTt(this));ATt(e);var n=arguments.length>1?arguments[1]:void 0,i=t.length,a=n===void 0?i:cTt(sTt(n),i),o=VN(e);return jN?jN(t,o,a):hTt(t,a-o.length,a)===o}});var pTt=bL,dTt=vl,vTt=b1,gTt=function(r,e,t){var n=pTt(e);n in r?dTt.f(r,n,vTt(0,t)):r[n]=t},yTt=We,KN=L4,mTt=Q1,_Tt=gTt,wTt=yTt.Array,ETt=Math.max,CTt=function(r,e,t){for(var n=mTt(r),i=KN(e,n),a=KN(t===void 0?n:t,n),o=wTt(ETt(a-i,0)),s=0;i<a;i++,s++)_Tt(o,s,r[i]);return o.length=s,o},BTt=UL,Bd=Lo,nF=gn,TTt=zL,xTt=v8,STt=Ta,YN=cA,bTt=V4,LTt=WL,FTt=Sp,jC=vA,ITt=Tp,zN=CTt,XN=qL,RTt=$1,OTt=u8,MTt=mi,Zc=OTt.UNSUPPORTED_Y,WN=4294967295,PTt=Math.min,R8=[].push,NTt=nF(/./.exec),Jc=nF(R8),Td=nF("".slice),UTt=!MTt(function(){var r=/(?:)/,e=r.exec;r.exec=function(){return e.apply(this,arguments)};var t="ab".split(r);return t.length!==2||t[0]!=="a"||t[1]!=="b"});TTt("split",function(r,e,t){var n;return"abbc".split(/(b)*/)[1]=="c"||"test".split(/(?:)/,-1).length!=4||"ab".split(/(?:ab)*/).length!=2||".".split(/(.?)(.?)/).length!=4||".".split(/()()/).length>1||"".split(/.?/).length?n=function(i,a){var o=jC(YN(this)),s=a===void 0?WN:a>>>0;if(s===0)return[];if(i===void 0)return[o];if(!xTt(i))return Bd(e,o,i,s);for(var A=[],l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),u=0,h=new RegExp(i.source,l+"g"),c,f,d;(c=Bd(RTt,h,o))&&(f=h.lastIndex,!(f>u&&(Jc(A,Td(o,u,c.index)),c.length>1&&c.index<o.length&&BTt(R8,A,zN(c,1)),d=c[0].length,u=f,A.length>=s)));)h.lastIndex===c.index&&h.lastIndex++;return u===o.length?(d||!NTt(h,""))&&Jc(A,""):Jc(A,Td(o,u)),A.length>s?zN(A,0,s):A}:"0".split(void 0,0).length?n=function(i,a){return i===void 0&&a===0?[]:Bd(e,this,i,a)}:n=e,[function(a,o){var s=YN(this),A=a==null?void 0:ITt(a,r);return A?Bd(A,a,s,o):Bd(n,jC(s),a,o)},function(i,a){var o=STt(this),s=jC(i),A=t(n,o,s,a,n!==e);if(A.done)return A.value;var l=bTt(o,RegExp),u=o.unicode,h=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Zc?"g":"y"),c=new l(Zc?"^(?:"+o.source+")":o,h),f=a===void 0?WN:a>>>0;if(f===0)return[];if(s.length===0)return XN(c,s)===null?[s]:[];for(var d=0,v=0,y=[];v<s.length;){c.lastIndex=Zc?0:v;var m=XN(c,Zc?Td(s,v):s),w;if(m===null||(w=PTt(FTt(c.lastIndex+(Zc?v:0)),s.length))===d)v=LTt(s,v,u);else{if(Jc(y,Td(s,d,v)),y.length===f)return y;for(var C=1;C<=m.length-1;C++)if(Jc(y,m[C]),y.length===f)return y;v=d=w}}return Jc(y,Td(s,d)),y}]},!UTt,Zc);var j1={exports:{}},jd={exports:{}};(function(){var r,e,t,n,i,a;typeof performance<"u"&&performance!==null&&performance.now?jd.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(jd.exports=function(){return(r()-i)/1e6},e=process.hrtime,r=function(){var o;return o=e(),o[0]*1e9+o[1]},n=r(),a=process.uptime()*1e9,i=n-a):Date.now?(jd.exports=function(){return Date.now()-t},t=Date.now()):(jd.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(Ys);var DTt=jd.exports,qA=typeof window>"u"?Ys:window,T0=["moz","webkit"],Qf="AnimationFrame",rp=qA["request"+Qf],Kv=qA["cancel"+Qf]||qA["cancelRequest"+Qf];for(var xd=0;!rp&&xd<T0.length;xd++)rp=qA[T0[xd]+"Request"+Qf],Kv=qA[T0[xd]+"Cancel"+Qf]||qA[T0[xd]+"CancelRequest"+Qf];if(!rp||!Kv){var KC=0,qN=0,nh=[],QTt=1e3/60;rp=function(r){if(nh.length===0){var e=DTt(),t=Math.max(0,QTt-(e-KC));KC=t+e,setTimeout(function(){var n=nh.slice(0);nh.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(KC)}catch(a){setTimeout(function(){throw a},0)}},Math.round(t))}return nh.push({handle:++qN,callback:r,cancelled:!1}),qN},Kv=function(r){for(var e=0;e<nh.length;e++)nh[e].handle===r&&(nh[e].cancelled=!0)}}j1.exports=function(r){return rp.call(qA,r)};j1.exports.cancel=function(){Kv.apply(qA,arguments)};j1.exports.polyfill=function(r){r||(r=qA),r.requestAnimationFrame=rp,r.cancelAnimationFrame=Kv};var YC=j1.exports,O8=`
|
||
\v\f\r \u2028\u2029\uFEFF`,HTt=gn,GTt=cA,kTt=vA,$Tt=O8,ZN=HTt("".replace),v_="["+$Tt+"]",VTt=RegExp("^"+v_+v_+"*"),jTt=RegExp(v_+v_+"*$"),zC=function(r){return function(e){var t=kTt(GTt(e));return r&1&&(t=ZN(t,VTt,"")),r&2&&(t=ZN(t,jTt,"")),t}},KTt={start:zC(1),end:zC(2),trim:zC(3)},YTt=U1.PROPER,zTt=mi,JN=O8,t5="
",XTt=function(r){return zTt(function(){return!!JN[r]()||t5[r]()!==t5||YTt&&JN[r].name!==r})},WTt=pA,qTt=KTt.trim,ZTt=XTt;WTt({target:"String",proto:!0,forced:ZTt("trim")},{trim:function(){return qTt(this)}});var rS=function(r){this.ok=!1,this.alpha=1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r=r.replace(/ /g,""),r=r.toLowerCase();var e={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",rebeccapurple:"663399",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=e[r]||r;for(var t=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(A){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3]),parseFloat(A[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(A){return[parseInt(A[1]),parseInt(A[2]),parseInt(A[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(A){return[parseInt(A[1],16),parseInt(A[2],16),parseInt(A[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(A){return[parseInt(A[1]+A[1],16),parseInt(A[2]+A[2],16),parseInt(A[3]+A[3],16)]}}],n=0;n<t.length;n++){var i=t[n].re,a=t[n].process,o=i.exec(r);if(o){var s=a(o);this.r=s[0],this.g=s[1],this.b=s[2],s.length>3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?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.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var A=this.r.toString(16),l=this.g.toString(16),u=this.b.toString(16);return A.length==1&&(A="0"+A),l.length==1&&(l="0"+l),u.length==1&&(u="0"+u),"#"+A+l+u},this.getHelpXML=function(){for(var A=new Array,l=0;l<t.length;l++)for(var u=t[l].example,h=0;h<u.length;h++)A[A.length]=u[h];for(var c in e)A[A.length]=c;var f=document.createElement("ul");f.setAttribute("id","rgbcolor-examples");for(var l=0;l<A.length;l++)try{var d=document.createElement("li"),v=new RGBColor(A[l]),y=document.createElement("div");y.style.cssText="margin: 3px; border: 1px solid black; background:"+v.toHex()+"; color:"+v.toHex(),y.appendChild(document.createTextNode("test"));var m=document.createTextNode(" "+A[l]+" -> "+v.toRGB()+" -> "+v.toHex());d.appendChild(y),d.appendChild(m),f.appendChild(d)}catch{}return f}},JTt=pA,txt=gn,ext=JL,rxt=cA,e5=vA,nxt=tF,ixt=txt("".indexOf);JTt({target:"String",proto:!0,forced:!nxt("includes")},{includes:function(e){return!!~ixt(e5(rxt(this)),e5(ext(e)),arguments.length>1?arguments[1]:void 0)}});var axt=pA,oxt=gn,sxt=F4.indexOf,Axt=L8,nS=oxt([].indexOf),r5=!!nS&&1/nS([1],1,-0)<0,lxt=Axt("indexOf");axt({target:"Array",proto:!0,forced:r5||!lxt},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return r5?nS(this,e,t)||0:sxt(this,e,t)}});var uxt=Cp,hxt=Array.isArray||function(e){return uxt(e)=="Array"},cxt=pA,fxt=gn,pxt=hxt,dxt=fxt([].reverse),n5=[1,2];cxt({target:"Array",proto:!0,forced:String(n5)===String(n5.reverse())},{reverse:function(){return pxt(this)&&(this.length=this.length),dxt(this)}});/*! *****************************************************************************
|
||
Copyright (c) Microsoft Corporation.
|
||
|
||
Permission to use, copy, modify, and/or distribute this software for any
|
||
purpose with or without fee is hereby granted.
|
||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
PERFORMANCE OF THIS SOFTWARE.
|
||
***************************************************************************** */var M8=function(r,e){return(M8=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(r,e)};function P8(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}M8(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function vxt(r){var e="";Array.isArray(r)||(r=[r]);for(var t=0;t<r.length;t++){var n=r[t];if(n.type===kt.CLOSE_PATH)e+="z";else if(n.type===kt.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===kt.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===kt.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===kt.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===kt.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===kt.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===kt.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===kt.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==kt.ARC)throw new Error('Unexpected command type "'+n.type+'" at index '+t+".");e+=(n.relative?"a":"A")+n.rX+" "+n.rY+" "+n.xRot+" "+ +n.lArcFlag+" "+ +n.sweepFlag+" "+n.x+" "+n.y}}return e}function iS(r,e){var t=r[0],n=r[1];return[t*Math.cos(e)-n*Math.sin(e),t*Math.sin(e)+n*Math.cos(e)]}function cs(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0;t<r.length;t++)if(typeof r[t]!="number")throw new Error("assertNumbers arguments["+t+"] is not a number. "+typeof r[t]+" == typeof "+r[t]);return!0}var Wl=Math.PI;function XC(r,e,t){r.lArcFlag=r.lArcFlag===0?0:1,r.sweepFlag=r.sweepFlag===0?0:1;var n=r.rX,i=r.rY,a=r.x,o=r.y;n=Math.abs(r.rX),i=Math.abs(r.rY);var s=iS([(e-a)/2,(t-o)/2],-r.xRot/180*Wl),A=s[0],l=s[1],u=Math.pow(A,2)/Math.pow(n,2)+Math.pow(l,2)/Math.pow(i,2);1<u&&(n*=Math.sqrt(u),i*=Math.sqrt(u)),r.rX=n,r.rY=i;var h=Math.pow(n,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(A,2),c=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-h)/h)),f=n*l/i*c,d=-i*A/n*c,v=iS([f,d],r.xRot/180*Wl);r.cX=v[0]+(e+a)/2,r.cY=v[1]+(t+o)/2,r.phi1=Math.atan2((l-d)/i,(A-f)/n),r.phi2=Math.atan2((-l-d)/i,(-A-f)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Wl),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Wl),r.phi1*=180/Wl,r.phi2*=180/Wl}function i5(r,e,t){cs(r,e,t);var n=r*r+e*e-t*t;if(0>n)return[];if(n===0)return[[r*t/(r*r+e*e),e*t/(r*r+e*e)]];var i=Math.sqrt(n);return[[(r*t+e*i)/(r*r+e*e),(e*t-r*i)/(r*r+e*e)],[(r*t-e*i)/(r*r+e*e),(e*t+r*i)/(r*r+e*e)]]}var hi,NA=Math.PI/180;function a5(r,e,t){return(1-t)*r+t*e}function o5(r,e,t,n){return r+Math.cos(n/180*Wl)*e+Math.sin(n/180*Wl)*t}function s5(r,e,t,n){var i=1e-6,a=e-r,o=t-e,s=3*a+3*(n-t)-6*o,A=6*(o-a),l=3*a;return Math.abs(s)<i?[-l/A]:function(u,h,c){c===void 0&&(c=1e-6);var f=u*u/4-h;if(f<-c)return[];if(f<=c)return[-u/2];var d=Math.sqrt(f);return[-u/2-d,-u/2+d]}(A/s,l/s,i)}function A5(r,e,t,n,i){var a=1-i;return r*(a*a*a)+e*(3*a*a*i)+t*(3*a*i*i)+n*(i*i*i)}(function(r){function e(){return i(function(s,A,l){return s.relative&&(s.x1!==void 0&&(s.x1+=A),s.y1!==void 0&&(s.y1+=l),s.x2!==void 0&&(s.x2+=A),s.y2!==void 0&&(s.y2+=l),s.x!==void 0&&(s.x+=A),s.y!==void 0&&(s.y+=l),s.relative=!1),s})}function t(){var s=NaN,A=NaN,l=NaN,u=NaN;return i(function(h,c,f){return h.type&kt.SMOOTH_CURVE_TO&&(h.type=kt.CURVE_TO,s=isNaN(s)?c:s,A=isNaN(A)?f:A,h.x1=h.relative?c-s:2*c-s,h.y1=h.relative?f-A:2*f-A),h.type&kt.CURVE_TO?(s=h.relative?c+h.x2:h.x2,A=h.relative?f+h.y2:h.y2):(s=NaN,A=NaN),h.type&kt.SMOOTH_QUAD_TO&&(h.type=kt.QUAD_TO,l=isNaN(l)?c:l,u=isNaN(u)?f:u,h.x1=h.relative?c-l:2*c-l,h.y1=h.relative?f-u:2*f-u),h.type&kt.QUAD_TO?(l=h.relative?c+h.x1:h.x1,u=h.relative?f+h.y1:h.y1):(l=NaN,u=NaN),h})}function n(){var s=NaN,A=NaN;return i(function(l,u,h){if(l.type&kt.SMOOTH_QUAD_TO&&(l.type=kt.QUAD_TO,s=isNaN(s)?u:s,A=isNaN(A)?h:A,l.x1=l.relative?u-s:2*u-s,l.y1=l.relative?h-A:2*h-A),l.type&kt.QUAD_TO){s=l.relative?u+l.x1:l.x1,A=l.relative?h+l.y1:l.y1;var c=l.x1,f=l.y1;l.type=kt.CURVE_TO,l.x1=((l.relative?0:u)+2*c)/3,l.y1=((l.relative?0:h)+2*f)/3,l.x2=(l.x+2*c)/3,l.y2=(l.y+2*f)/3}else s=NaN,A=NaN;return l})}function i(s){var A=0,l=0,u=NaN,h=NaN;return function(c){if(isNaN(u)&&!(c.type&kt.MOVE_TO))throw new Error("path must start with moveto");var f=s(c,A,l,u,h);return c.type&kt.CLOSE_PATH&&(A=u,l=h),c.x!==void 0&&(A=c.relative?A+c.x:c.x),c.y!==void 0&&(l=c.relative?l+c.y:c.y),c.type&kt.MOVE_TO&&(u=A,h=l),f}}function a(s,A,l,u,h,c){return cs(s,A,l,u,h,c),i(function(f,d,v,y){var m=f.x1,w=f.x2,C=f.relative&&!isNaN(y),B=f.x!==void 0?f.x:C?0:d,R=f.y!==void 0?f.y:C?0:v;function O(F){return F*F}f.type&kt.HORIZ_LINE_TO&&A!==0&&(f.type=kt.LINE_TO,f.y=f.relative?0:v),f.type&kt.VERT_LINE_TO&&l!==0&&(f.type=kt.LINE_TO,f.x=f.relative?0:d),f.x!==void 0&&(f.x=f.x*s+R*l+(C?0:h)),f.y!==void 0&&(f.y=B*A+f.y*u+(C?0:c)),f.x1!==void 0&&(f.x1=f.x1*s+f.y1*l+(C?0:h)),f.y1!==void 0&&(f.y1=m*A+f.y1*u+(C?0:c)),f.x2!==void 0&&(f.x2=f.x2*s+f.y2*l+(C?0:h)),f.y2!==void 0&&(f.y2=w*A+f.y2*u+(C?0:c));var I=s*u-A*l;if(f.xRot!==void 0&&(s!==1||A!==0||l!==0||u!==1))if(I===0)delete f.rX,delete f.rY,delete f.xRot,delete f.lArcFlag,delete f.sweepFlag,f.type=kt.LINE_TO;else{var T=f.xRot*Math.PI/180,L=Math.sin(T),P=Math.cos(T),S=1/O(f.rX),x=1/O(f.rY),M=O(P)*S+O(L)*x,D=2*L*P*(S-x),W=O(L)*S+O(P)*x,z=M*u*u-D*A*u+W*A*A,tt=D*(s*u+A*l)-2*(M*l*u+W*s*A),q=M*l*l-D*s*l+W*s*s,rt=(Math.atan2(tt,z-q)+Math.PI)%Math.PI/2,nt=Math.sin(rt),_t=Math.cos(rt);f.rX=Math.abs(I)/Math.sqrt(z*O(_t)+tt*nt*_t+q*O(nt)),f.rY=Math.abs(I)/Math.sqrt(z*O(nt)-tt*nt*_t+q*O(_t)),f.xRot=180*rt/Math.PI}return f.sweepFlag!==void 0&&0>I&&(f.sweepFlag=+!f.sweepFlag),f})}function o(){return function(s){var A={};for(var l in s)A[l]=s[l];return A}}r.ROUND=function(s){function A(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),cs(s),function(l){return l.x1!==void 0&&(l.x1=A(l.x1)),l.y1!==void 0&&(l.y1=A(l.y1)),l.x2!==void 0&&(l.x2=A(l.x2)),l.y2!==void 0&&(l.y2=A(l.y2)),l.x!==void 0&&(l.x=A(l.x)),l.y!==void 0&&(l.y=A(l.y)),l.rX!==void 0&&(l.rX=A(l.rX)),l.rY!==void 0&&(l.rY=A(l.rY)),l}},r.TO_ABS=e,r.TO_REL=function(){return i(function(s,A,l){return s.relative||(s.x1!==void 0&&(s.x1-=A),s.y1!==void 0&&(s.y1-=l),s.x2!==void 0&&(s.x2-=A),s.y2!==void 0&&(s.y2-=l),s.x!==void 0&&(s.x-=A),s.y!==void 0&&(s.y-=l),s.relative=!0),s})},r.NORMALIZE_HVZ=function(s,A,l){return s===void 0&&(s=!0),A===void 0&&(A=!0),l===void 0&&(l=!0),i(function(u,h,c,f,d){if(isNaN(f)&&!(u.type&kt.MOVE_TO))throw new Error("path must start with moveto");return A&&u.type&kt.HORIZ_LINE_TO&&(u.type=kt.LINE_TO,u.y=u.relative?0:c),l&&u.type&kt.VERT_LINE_TO&&(u.type=kt.LINE_TO,u.x=u.relative?0:h),s&&u.type&kt.CLOSE_PATH&&(u.type=kt.LINE_TO,u.x=u.relative?f-h:f,u.y=u.relative?d-c:d),u.type&kt.ARC&&(u.rX===0||u.rY===0)&&(u.type=kt.LINE_TO,delete u.rX,delete u.rY,delete u.xRot,delete u.lArcFlag,delete u.sweepFlag),u})},r.NORMALIZE_ST=t,r.QT_TO_C=n,r.INFO=i,r.SANITIZE=function(s){s===void 0&&(s=0),cs(s);var A=NaN,l=NaN,u=NaN,h=NaN;return i(function(c,f,d,v,y){var m=Math.abs,w=!1,C=0,B=0;if(c.type&kt.SMOOTH_CURVE_TO&&(C=isNaN(A)?0:f-A,B=isNaN(l)?0:d-l),c.type&(kt.CURVE_TO|kt.SMOOTH_CURVE_TO)?(A=c.relative?f+c.x2:c.x2,l=c.relative?d+c.y2:c.y2):(A=NaN,l=NaN),c.type&kt.SMOOTH_QUAD_TO?(u=isNaN(u)?f:2*f-u,h=isNaN(h)?d:2*d-h):c.type&kt.QUAD_TO?(u=c.relative?f+c.x1:c.x1,h=c.relative?d+c.y1:c.y2):(u=NaN,h=NaN),c.type&kt.LINE_COMMANDS||c.type&kt.ARC&&(c.rX===0||c.rY===0||!c.lArcFlag)||c.type&kt.CURVE_TO||c.type&kt.SMOOTH_CURVE_TO||c.type&kt.QUAD_TO||c.type&kt.SMOOTH_QUAD_TO){var R=c.x===void 0?0:c.relative?c.x:c.x-f,O=c.y===void 0?0:c.relative?c.y:c.y-d;C=isNaN(u)?c.x1===void 0?C:c.relative?c.x:c.x1-f:u-f,B=isNaN(h)?c.y1===void 0?B:c.relative?c.y:c.y1-d:h-d;var I=c.x2===void 0?0:c.relative?c.x:c.x2-f,T=c.y2===void 0?0:c.relative?c.y:c.y2-d;m(R)<=s&&m(O)<=s&&m(C)<=s&&m(B)<=s&&m(I)<=s&&m(T)<=s&&(w=!0)}return c.type&kt.CLOSE_PATH&&m(f-v)<=s&&m(d-y)<=s&&(w=!0),w?[]:c})},r.MATRIX=a,r.ROTATE=function(s,A,l){A===void 0&&(A=0),l===void 0&&(l=0),cs(s,A,l);var u=Math.sin(s),h=Math.cos(s);return a(h,u,-u,h,A-A*h+l*u,l-A*u-l*h)},r.TRANSLATE=function(s,A){return A===void 0&&(A=0),cs(s,A),a(1,0,0,1,s,A)},r.SCALE=function(s,A){return A===void 0&&(A=s),cs(s,A),a(s,0,0,A,0,0)},r.SKEW_X=function(s){return cs(s),a(1,0,Math.atan(s),1,0,0)},r.SKEW_Y=function(s){return cs(s),a(1,Math.atan(s),0,1,0,0)},r.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),cs(s),a(-1,0,0,1,s,0)},r.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),cs(s),a(1,0,0,-1,0,s)},r.A_TO_C=function(){return i(function(s,A,l){return kt.ARC===s.type?function(u,h,c){var f,d,v,y;u.cX||XC(u,h,c);for(var m=Math.min(u.phi1,u.phi2),w=Math.max(u.phi1,u.phi2)-m,C=Math.ceil(w/90),B=new Array(C),R=h,O=c,I=0;I<C;I++){var T=a5(u.phi1,u.phi2,I/C),L=a5(u.phi1,u.phi2,(I+1)/C),P=L-T,S=4/3*Math.tan(P*NA/4),x=[Math.cos(T*NA)-S*Math.sin(T*NA),Math.sin(T*NA)+S*Math.cos(T*NA)],M=x[0],D=x[1],W=[Math.cos(L*NA),Math.sin(L*NA)],z=W[0],tt=W[1],q=[z+S*Math.sin(L*NA),tt-S*Math.cos(L*NA)],rt=q[0],nt=q[1];B[I]={relative:u.relative,type:kt.CURVE_TO};var _t=function(F,$){var j=iS([F*u.rX,$*u.rY],u.xRot),X=j[0],it=j[1];return[u.cX+X,u.cY+it]};f=_t(M,D),B[I].x1=f[0],B[I].y1=f[1],d=_t(rt,nt),B[I].x2=d[0],B[I].y2=d[1],v=_t(z,tt),B[I].x=v[0],B[I].y=v[1],u.relative&&(B[I].x1-=R,B[I].y1-=O,B[I].x2-=R,B[I].y2-=O,B[I].x-=R,B[I].y-=O),R=(y=[B[I].x,B[I].y])[0],O=y[1]}return B}(s,s.relative?0:A,s.relative?0:l):s})},r.ANNOTATE_ARCS=function(){return i(function(s,A,l){return s.relative&&(A=0,l=0),kt.ARC===s.type&&XC(s,A,l),s})},r.CLONE=o,r.CALCULATE_BOUNDS=function(){var s=function(c){var f={};for(var d in c)f[d]=c[d];return f},A=e(),l=n(),u=t(),h=i(function(c,f,d){var v=u(l(A(s(c))));function y(nt){nt>h.maxX&&(h.maxX=nt),nt<h.minX&&(h.minX=nt)}function m(nt){nt>h.maxY&&(h.maxY=nt),nt<h.minY&&(h.minY=nt)}if(v.type&kt.DRAWING_COMMANDS&&(y(f),m(d)),v.type&kt.HORIZ_LINE_TO&&y(v.x),v.type&kt.VERT_LINE_TO&&m(v.y),v.type&kt.LINE_TO&&(y(v.x),m(v.y)),v.type&kt.CURVE_TO){y(v.x),m(v.y);for(var w=0,C=s5(f,v.x1,v.x2,v.x);w<C.length;w++)0<(rt=C[w])&&1>rt&&y(A5(f,v.x1,v.x2,v.x,rt));for(var B=0,R=s5(d,v.y1,v.y2,v.y);B<R.length;B++)0<(rt=R[B])&&1>rt&&m(A5(d,v.y1,v.y2,v.y,rt))}if(v.type&kt.ARC){y(v.x),m(v.y),XC(v,f,d);for(var O=v.xRot/180*Math.PI,I=Math.cos(O)*v.rX,T=Math.sin(O)*v.rX,L=-Math.sin(O)*v.rY,P=Math.cos(O)*v.rY,S=v.phi1<v.phi2?[v.phi1,v.phi2]:-180>v.phi2?[v.phi2+360,v.phi1+360]:[v.phi2,v.phi1],x=S[0],M=S[1],D=function(nt){var _t=nt[0],F=nt[1],$=180*Math.atan2(F,_t)/Math.PI;return $<x?$+360:$},W=0,z=i5(L,-I,0).map(D);W<z.length;W++)(rt=z[W])>x&&rt<M&&y(o5(v.cX,I,L,rt));for(var tt=0,q=i5(P,-T,0).map(D);tt<q.length;tt++){var rt;(rt=q[tt])>x&&rt<M&&m(o5(v.cY,T,P,rt))}}return c});return h.minX=1/0,h.maxX=-1/0,h.minY=1/0,h.maxY=-1/0,h}})(hi||(hi={}));var us,N8=function(){function r(){}return r.prototype.round=function(e){return this.transform(hi.ROUND(e))},r.prototype.toAbs=function(){return this.transform(hi.TO_ABS())},r.prototype.toRel=function(){return this.transform(hi.TO_REL())},r.prototype.normalizeHVZ=function(e,t,n){return this.transform(hi.NORMALIZE_HVZ(e,t,n))},r.prototype.normalizeST=function(){return this.transform(hi.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(hi.QT_TO_C())},r.prototype.aToC=function(){return this.transform(hi.A_TO_C())},r.prototype.sanitize=function(e){return this.transform(hi.SANITIZE(e))},r.prototype.translate=function(e,t){return this.transform(hi.TRANSLATE(e,t))},r.prototype.scale=function(e,t){return this.transform(hi.SCALE(e,t))},r.prototype.rotate=function(e,t,n){return this.transform(hi.ROTATE(e,t,n))},r.prototype.matrix=function(e,t,n,i,a,o){return this.transform(hi.MATRIX(e,t,n,i,a,o))},r.prototype.skewX=function(e){return this.transform(hi.SKEW_X(e))},r.prototype.skewY=function(e){return this.transform(hi.SKEW_Y(e))},r.prototype.xSymmetry=function(e){return this.transform(hi.X_AXIS_SYMMETRY(e))},r.prototype.ySymmetry=function(e){return this.transform(hi.Y_AXIS_SYMMETRY(e))},r.prototype.annotateArcs=function(){return this.transform(hi.ANNOTATE_ARCS())},r}(),gxt=function(r){return r===" "||r===" "||r==="\r"||r===`
|
||
`},l5=function(r){return"0".charCodeAt(0)<=r.charCodeAt(0)&&r.charCodeAt(0)<="9".charCodeAt(0)},yxt=function(r){function e(){var t=r.call(this)||this;return t.curNumber="",t.curCommandType=-1,t.curCommandRelative=!1,t.canParseCommandOrComma=!0,t.curNumberHasExp=!1,t.curNumberHasExpDigits=!1,t.curNumberHasDecimal=!1,t.curArgs=[],t}return P8(e,r),e.prototype.finish=function(t){if(t===void 0&&(t=[]),this.parse(" ",t),this.curArgs.length!==0||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,n){var i=this;n===void 0&&(n=[]);for(var a=function(h){n.push(h),i.curArgs.length=0,i.canParseCommandOrComma=!0},o=0;o<t.length;o++){var s=t[o],A=!(this.curCommandType!==kt.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=l5(s)&&(this.curNumber==="0"&&s==="0"||A);if(!l5(s)||l)if(s!=="e"&&s!=="E")if(s!=="-"&&s!=="+"||!this.curNumberHasExp||this.curNumberHasExpDigits)if(s!=="."||this.curNumberHasExp||this.curNumberHasDecimal||A){if(this.curNumber&&this.curCommandType!==-1){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError("Invalid number ending at "+o);if(this.curCommandType===kt.ARC){if(this.curArgs.length===0||this.curArgs.length===1){if(0>u)throw new SyntaxError('Expected positive number, got "'+u+'" at index "'+o+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"')}this.curArgs.push(u),this.curArgs.length===mxt[this.curCommandType]&&(kt.HORIZ_LINE_TO===this.curCommandType?a({type:kt.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):kt.VERT_LINE_TO===this.curCommandType?a({type:kt.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===kt.MOVE_TO||this.curCommandType===kt.LINE_TO||this.curCommandType===kt.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),kt.MOVE_TO===this.curCommandType&&(this.curCommandType=kt.LINE_TO)):this.curCommandType===kt.CURVE_TO?a({type:kt.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===kt.SMOOTH_CURVE_TO?a({type:kt.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===kt.QUAD_TO?a({type:kt.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===kt.ARC&&a({type:kt.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!gxt(s))if(s===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(s!=="+"&&s!=="-"&&s!==".")if(l)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,s!=="z"&&s!=="Z")if(s==="h"||s==="H")this.curCommandType=kt.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=kt.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=kt.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=kt.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=kt.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=kt.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=kt.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=kt.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=kt.ARC,this.curCommandRelative=s==="a"}else n.push({type:kt.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal=s==="."}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return n},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(n,i){i===void 0&&(i=[]);for(var a=0,o=Object.getPrototypeOf(this).parse.call(this,n);a<o.length;a++){var s=o[a],A=t(s);Array.isArray(A)?i.push.apply(i,A):i.push(A)}return i}}})},e}(N8),kt=function(r){function e(t){var n=r.call(this)||this;return n.commands=typeof t=="string"?e.parse(t):t,n}return P8(e,r),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=hi.CALCULATE_BOUNDS();return this.transform(t),t},e.prototype.transform=function(t){for(var n=[],i=0,a=this.commands;i<a.length;i++){var o=t(a[i]);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return this.commands=n,this},e.encode=function(t){return vxt(t)},e.parse=function(t){var n=new yxt,i=[];return n.parse(t,i),n.finish(i),i},e.CLOSE_PATH=1,e.MOVE_TO=2,e.HORIZ_LINE_TO=4,e.VERT_LINE_TO=8,e.LINE_TO=16,e.CURVE_TO=32,e.SMOOTH_CURVE_TO=64,e.QUAD_TO=128,e.SMOOTH_QUAD_TO=256,e.ARC=512,e.LINE_COMMANDS=e.LINE_TO|e.HORIZ_LINE_TO|e.VERT_LINE_TO,e.DRAWING_COMMANDS=e.HORIZ_LINE_TO|e.VERT_LINE_TO|e.LINE_TO|e.CURVE_TO|e.SMOOTH_CURVE_TO|e.QUAD_TO|e.SMOOTH_QUAD_TO|e.ARC,e}(N8),mxt=((us={})[kt.MOVE_TO]=2,us[kt.LINE_TO]=2,us[kt.HORIZ_LINE_TO]=1,us[kt.VERT_LINE_TO]=1,us[kt.CLOSE_PATH]=0,us[kt.QUAD_TO]=4,us[kt.SMOOTH_QUAD_TO]=2,us[kt.CURVE_TO]=6,us[kt.SMOOTH_CURVE_TO]=4,us[kt.ARC]=7,us),_xt=gn,wxt=U1.PROPER,Ext=Uu.exports,Cxt=Ta,Bxt=L1,u5=vA,Txt=mi,xxt=l8,iF="toString",aS=RegExp.prototype,U8=aS[iF],Sxt=_xt(xxt),bxt=Txt(function(){return U8.call({source:"a",flags:"b"})!="/a/b"}),Lxt=wxt&&U8.name!=iF;(bxt||Lxt)&&Ext(RegExp.prototype,iF,function(){var e=Cxt(this),t=u5(e.source),n=e.flags,i=u5(n===void 0&&Bxt(aS,e)&&!("flags"in aS)?Sxt(e):n);return"/"+t+"/"+i},{unsafe:!0});function em(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?em=function(e){return typeof e}:em=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},em(r)}function Fxt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var Ixt=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],Rxt=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Oxt(r,e,t,n,i){if(typeof r=="string"&&(r=document.getElementById(r)),!r||em(r)!=="object"||!("getContext"in r))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=r.getContext("2d");try{return a.getImageData(e,t,n,i)}catch(o){throw new Error("unable to access image data: "+o)}}function Mxt(r,e,t,n,i,a){if(!(isNaN(a)||a<1)){a|=0;var o=Oxt(r,e,t,n,i);o=Pxt(o,e,t,n,i,a),r.getContext("2d").putImageData(o,e,t)}}function Pxt(r,e,t,n,i,a){for(var o=r.data,s=2*a+1,A=n-1,l=i-1,u=a+1,h=u*(u+1)/2,c=new h5,f=c,d,v=1;v<s;v++)f=f.next=new h5,v===u&&(d=f);f.next=c;for(var y=null,m=null,w=0,C=0,B=Ixt[a],R=Rxt[a],O=0;O<i;O++){f=c;for(var I=o[C],T=o[C+1],L=o[C+2],P=o[C+3],S=0;S<u;S++)f.r=I,f.g=T,f.b=L,f.a=P,f=f.next;for(var x=0,M=0,D=0,W=0,z=u*I,tt=u*T,q=u*L,rt=u*P,nt=h*I,_t=h*T,F=h*L,$=h*P,j=1;j<u;j++){var X=C+((A<j?A:j)<<2),it=o[X],gt=o[X+1],wt=o[X+2],at=o[X+3],Pt=u-j;nt+=(f.r=it)*Pt,_t+=(f.g=gt)*Pt,F+=(f.b=wt)*Pt,$+=(f.a=at)*Pt,x+=it,M+=gt,D+=wt,W+=at,f=f.next}y=c,m=d;for(var Ot=0;Ot<n;Ot++){var K=$*B>>R;if(o[C+3]=K,K!==0){var Z=255/K;o[C]=(nt*B>>R)*Z,o[C+1]=(_t*B>>R)*Z,o[C+2]=(F*B>>R)*Z}else o[C]=o[C+1]=o[C+2]=0;nt-=z,_t-=tt,F-=q,$-=rt,z-=y.r,tt-=y.g,q-=y.b,rt-=y.a;var pt=Ot+a+1;pt=w+(pt<A?pt:A)<<2,x+=y.r=o[pt],M+=y.g=o[pt+1],D+=y.b=o[pt+2],W+=y.a=o[pt+3],nt+=x,_t+=M,F+=D,$+=W,y=y.next;var et=m,G=et.r,bt=et.g,St=et.b,dt=et.a;z+=G,tt+=bt,q+=St,rt+=dt,x-=G,M-=bt,D-=St,W-=dt,m=m.next,C+=4}w+=n}for(var Et=0;Et<n;Et++){C=Et<<2;var yt=o[C],xt=o[C+1],Lt=o[C+2],Rt=o[C+3],Vt=u*yt,zt=u*xt,ie=u*Lt,ee=u*Rt,Xt=h*yt,oe=h*xt,Kt=h*Lt,Ye=h*Rt;f=c;for(var Re=0;Re<u;Re++)f.r=yt,f.g=xt,f.b=Lt,f.a=Rt,f=f.next;for(var fr=n,be=0,xe=0,nn=0,ar=0,_i=1;_i<=a;_i++){C=fr+Et<<2;var Br=u-_i;Xt+=(f.r=yt=o[C])*Br,oe+=(f.g=xt=o[C+1])*Br,Kt+=(f.b=Lt=o[C+2])*Br,Ye+=(f.a=Rt=o[C+3])*Br,ar+=yt,be+=xt,xe+=Lt,nn+=Rt,f=f.next,_i<l&&(fr+=n)}C=Et,y=c,m=d;for(var ai=0;ai<i;ai++){var $r=C<<2;o[$r+3]=Rt=Ye*B>>R,Rt>0?(Rt=255/Rt,o[$r]=(Xt*B>>R)*Rt,o[$r+1]=(oe*B>>R)*Rt,o[$r+2]=(Kt*B>>R)*Rt):o[$r]=o[$r+1]=o[$r+2]=0,Xt-=Vt,oe-=zt,Kt-=ie,Ye-=ee,Vt-=y.r,zt-=y.g,ie-=y.b,ee-=y.a,$r=Et+(($r=ai+u)<l?$r:l)*n<<2,Xt+=ar+=y.r=o[$r],oe+=be+=y.g=o[$r+1],Kt+=xe+=y.b=o[$r+2],Ye+=nn+=y.a=o[$r+3],y=y.next,Vt+=yt=m.r,zt+=xt=m.g,ie+=Lt=m.b,ee+=Rt=m.a,ar-=yt,be-=xt,xe-=Lt,nn-=Rt,m=m.next,C+=n}}return r}var h5=function r(){Fxt(this,r),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function Nxt(){var{DOMParser:r}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:r,createCanvas(t,n){return new OffscreenCanvas(t,n)},createImage(t){return sl(function*(){var n=yield fetch(t),i=yield n.blob(),a=yield createImageBitmap(i);return a})()}};return(typeof DOMParser<"u"||typeof r>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function Uxt(r){var{DOMParser:e,canvas:t,fetch:n}=r;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:n,createCanvas:t.createCanvas,createImage:t.loadImage}}var Dxt=Object.freeze({__proto__:null,offscreen:Nxt,node:Uxt});function uc(r){return r.replace(/(?!\u3000)\s+/gm," ")}function D8(r){return r.replace(/^[\n \t]+/,"")}function Q8(r){return r.replace(/[\n \t]+$/,"")}function ro(r){var e=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var Qxt=/^[A-Z-]+$/;function H8(r){return Qxt.test(r)?r.toLowerCase():r}function aF(r){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return e[2]||e[3]||e[4]}function G8(r){if(!r.startsWith("rgb"))return r;var e=3,t=r.replace(/\d+(\.\d+)?/g,(n,i)=>e--&&i?String(Math.round(parseFloat(n))):n);return t}var Hxt=/(\[[^\]]+\])/g,Gxt=/(#[^\s+>~.[:]+)/g,kxt=/(\.[^\s+>~.[:]+)/g,$xt=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,Vxt=/(:[\w-]+\([^)]*\))/gi,jxt=/(:[^\s+>~.[:]+)/g,Kxt=/([^\s+>~.[:]+)/g;function ih(r,e){var t=e.exec(r);return t?[r.replace(e," "),t.length]:[r,0]}function k8(r){var e=[0,0,0],t=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[t,n]=ih(t,Hxt),e[1]+=n,[t,n]=ih(t,Gxt),e[0]+=n,[t,n]=ih(t,kxt),e[1]+=n,[t,n]=ih(t,$xt),e[2]+=n,[t,n]=ih(t,Vxt),e[1]+=n,[t,n]=ih(t,jxt),e[1]+=n,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,n]=ih(t,Kxt),e[2]+=n,e.join("")}var Mh=1e-8;function oS(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function g_(r,e){return(r[0]*e[0]+r[1]*e[1])/(oS(r)*oS(e))}function sS(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(g_(r,e))}function AS(r){return r*r*r}function lS(r){return 3*r*r*(1-r)}function uS(r){return 3*r*(1-r)*(1-r)}function hS(r){return(1-r)*(1-r)*(1-r)}function cS(r){return r*r}function fS(r){return 2*r*(1-r)}function pS(r){return(1-r)*(1-r)}class Te{constructor(e,t,n){this.document=e,this.name=t,this.value=n,this.isNormalizedColor=!1}static empty(e){return new Te(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:n}=this;return uc(this.getString()).trim().split(e).map(i=>new Te(t,n,i))}hasValue(e){var{value:t}=this;return t!==null&&t!==""&&(e||t!==0)&&typeof t<"u"}isString(e){var{value:t}=this,n=typeof t=="string";return!n||!e?n:e.test(t)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:t}=this,n=parseFloat(t);return this.isString(/%$/)&&(n/=100),n}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var t=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=G8(t),this.value=t),t}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[n,i]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:a}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(a.computeSize("x"),a.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(a.computeSize("x"),a.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*a.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*a.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*a.computeSize(n);default:{var o=this.getNumber();return t&&o<1?o*a.computeSize(n):o}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),t=/#([^)'"]+)/.exec(e);return t&&(t=t[1]),t||(t=e),this.document.definitions[t]}getFillStyleDefinition(e,t){var n=this.getDefinition();if(!n)return null;if(typeof n.createGradient=="function")return n.createGradient(this.document.ctx,e,t);if(typeof n.createPattern=="function"){if(n.getHrefAttribute().hasValue()){var i=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),i.hasValue()&&n.getAttribute("patternTransform",!0).setValue(i.value)}return n.createPattern(this.document.ctx,e,t)}return null}getTextBaseline(){return this.hasValue()?Te.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var t=this.getColor(),n=t.length,i=0,a=0;a<n&&(t[a]===","&&i++,i!==3);a++);if(e.hasValue()&&this.isString()&&i!==3){var o=new rS(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new Te(this.document,this.name,t)}}Te.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class $8{constructor(){this.viewPorts=[]}clear(){this.viewPorts=[]}setCurrent(e,t){this.viewPorts.push({width:e,height:t})}removeCurrent(){this.viewPorts.pop()}getCurrent(){var{viewPorts:e}=this;return e[e.length-1]}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return typeof e=="number"?e:e==="x"?this.width:e==="y"?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}}class Dn{constructor(e,t){this.x=e,this.y=t}static parse(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,[n=t,i=t]=ro(e);return new Dn(n,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=t,i=n]=ro(e);return new Dn(n,i)}static parsePath(e){for(var t=ro(e),n=t.length,i=[],a=0;a<n;a+=2)i.push(new Dn(t[a],t[a+1]));return i}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:t,y:n}=this,i=t*e[0]+n*e[2]+e[4],a=t*e[1]+n*e[3]+e[5];this.x=i,this.y=a}}class V8{constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:t,onMouseMove:n}=this,i=e.ctx.canvas;i.onclick=t,i.onmousemove=n,this.working=!0}}stop(){if(this.working){var e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(this.working){var{screen:e,events:t,eventElements:n}=this,{style:i}=e.ctx.canvas;i&&(i.cursor=""),t.forEach((a,o)=>{for(var{run:s}=a,A=n[o];A;)s(A),A=A.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(!(!this.working||!t)){var{events:n,eventElements:i}=this;n.forEach((a,o)=>{var{x:s,y:A}=a;!i[o]&&t.isPointInPath&&t.isPointInPath(s,A)&&(i[o]=e)})}}checkBoundingBox(e,t){if(!(!this.working||!t)){var{events:n,eventElements:i}=this;n.forEach((a,o)=>{var{x:s,y:A}=a;!i[o]&&t.isPointInBox(s,A)&&(i[o]=e)})}}mapXY(e,t){for(var{window:n,ctx:i}=this.screen,a=new Dn(e,t),o=i.canvas;o;)a.x-=o.offsetLeft,a.y-=o.offsetTop,o=o.offsetParent;return n.scrollX&&(a.x+=n.scrollX),n.scrollY&&(a.y+=n.scrollY),a}onClick(e){var{x:t,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:t,y:n,run(i){i.onClick&&i.onClick()}})}onMouseMove(e){var{x:t,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:t,y:n,run(i){i.onMouseMove&&i.onMouseMove()}})}}var j8=typeof window<"u"?window:null,K8=typeof fetch<"u"?fetch.bind(void 0):null;class Eg{constructor(e){var{fetch:t=K8,window:n=j8}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new $8,this.mouse=new V8(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,this.fetch=t}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(t=>t());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:t,ctx:n,aspectRatio:i,width:a,desiredWidth:o,height:s,desiredHeight:A,minX:l=0,minY:u=0,refX:h,refY:c,clip:f=!1,clipX:d=0,clipY:v=0}=e,y=uc(i).replace(/^defer\s/,""),[m,w]=y.split(" "),C=m||"xMidYMid",B=w||"meet",R=a/o,O=s/A,I=Math.min(R,O),T=Math.max(R,O),L=o,P=A;B==="meet"&&(L*=I,P*=I),B==="slice"&&(L*=T,P*=T);var S=new Te(t,"refX",h),x=new Te(t,"refY",c),M=S.hasValue()&&x.hasValue();if(M&&n.translate(-I*S.getPixels("x"),-I*x.getPixels("y")),f){var D=I*d,W=I*v;n.beginPath(),n.moveTo(D,W),n.lineTo(a,W),n.lineTo(a,s),n.lineTo(D,s),n.closePath(),n.clip()}if(!M){var z=B==="meet"&&I===O,tt=B==="slice"&&T===O,q=B==="meet"&&I===R,rt=B==="slice"&&T===R;C.startsWith("xMid")&&(z||tt)&&n.translate(a/2-L/2,0),C.endsWith("YMid")&&(q||rt)&&n.translate(0,s/2-P/2),C.startsWith("xMax")&&(z||tt)&&n.translate(a-L,0),C.endsWith("YMax")&&(q||rt)&&n.translate(0,s-P)}switch(!0){case C==="none":n.scale(R,O);break;case B==="meet":n.scale(I,I);break;case B==="slice":n.scale(T,T);break}n.translate(-l,-u)}start(e){var{enableRedraw:t=!1,ignoreMouse:n=!1,ignoreAnimation:i=!1,ignoreDimensions:a=!1,ignoreClear:o=!1,forceRedraw:s,scaleWidth:A,scaleHeight:l,offsetX:u,offsetY:h}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:c,mouse:f}=this,d=1e3/c;if(this.frameDuration=d,this.readyPromise=new Promise(C=>{this.resolveReady=C}),this.isReady()&&this.render(e,a,o,A,l,u,h),!!t){var v=Date.now(),y=v,m=0,w=()=>{v=Date.now(),m=v-y,m>=d&&(y=v-m%d,this.shouldUpdate(i,s)&&(this.render(e,a,o,A,l,u,h),f.runEvents())),this.intervalId=YC(w)};n||f.start(),this.intervalId=YC(w)}}stop(){this.intervalId&&(YC.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){var{frameDuration:n}=this,i=this.animations.reduce((a,o)=>o.update(n)||a,!1);if(i)return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,t,n,i,a,o,s){var{CLIENT_WIDTH:A,CLIENT_HEIGHT:l,viewPort:u,ctx:h,isFirstRender:c}=this,f=h.canvas;u.clear(),f.width&&f.height?u.setCurrent(f.width,f.height):u.setCurrent(A,l);var d=e.getStyle("width"),v=e.getStyle("height");!t&&(c||typeof i!="number"&&typeof a!="number")&&(d.hasValue()&&(f.width=d.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),v.hasValue()&&(f.height=v.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var y=f.clientWidth||f.width,m=f.clientHeight||f.height;if(t&&d.hasValue()&&v.hasValue()&&(y=d.getPixels("x"),m=v.getPixels("y")),u.setCurrent(y,m),typeof o=="number"&&e.getAttribute("x",!0).setValue(o),typeof s=="number"&&e.getAttribute("y",!0).setValue(s),typeof i=="number"||typeof a=="number"){var w=ro(e.getAttribute("viewBox").getString()),C=0,B=0;if(typeof i=="number"){var R=e.getStyle("width");R.hasValue()?C=R.getPixels("x")/i:isNaN(w[2])||(C=w[2]/i)}if(typeof a=="number"){var O=e.getStyle("height");O.hasValue()?B=O.getPixels("y")/a:isNaN(w[3])||(B=w[3]/a)}C||(C=B),B||(B=C),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(a);var I=e.getStyle("transform",!0,!0);I.setValue("".concat(I.getString()," scale(").concat(1/C,", ").concat(1/B,")"))}n||h.clearRect(0,0,y,m),e.render(h),c&&(this.isFirstRender=!1)}}Eg.defaultWindow=j8;Eg.defaultFetch=K8;var{defaultFetch:Yxt}=Eg,zxt=typeof DOMParser<"u"?DOMParser:null;class rm{constructor(){var{fetch:e=Yxt,DOMParser:t=zxt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return sl(function*(){return e.startsWith("<")?t.parseFromString(e):t.load(e)})()}parseFromString(e){var t=new this.DOMParser;try{return this.checkDocument(t.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(t.parseFromString(e,"text/xml"))}}checkDocument(e){var t=e.getElementsByTagName("parsererror")[0];if(t)throw new Error(t.textContent);return e}load(e){var t=this;return sl(function*(){var n=yield t.fetch(e),i=yield n.text();return t.parseFromString(i)})()}}class Y8{constructor(e,t){this.type="translate",this.point=null,this.point=Dn.parse(t)}apply(e){var{x:t,y:n}=this.point;e.translate(t||0,n||0)}unapply(e){var{x:t,y:n}=this.point;e.translate(-1*t||0,-1*n||0)}applyToPoint(e){var{x:t,y:n}=this.point;e.applyTransform([1,0,0,1,t||0,n||0])}}class z8{constructor(e,t,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=ro(t);this.angle=new Te(e,"angle",i[0]),this.originX=n[0],this.originY=n[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(e){var{cx:t,cy:n,originX:i,originY:a,angle:o}=this,s=t+i.getPixels("x"),A=n+a.getPixels("y");e.translate(s,A),e.rotate(o.getRadians()),e.translate(-s,-A)}unapply(e){var{cx:t,cy:n,originX:i,originY:a,angle:o}=this,s=t+i.getPixels("x"),A=n+a.getPixels("y");e.translate(s,A),e.rotate(-1*o.getRadians()),e.translate(-s,-A)}applyToPoint(e){var{cx:t,cy:n,angle:i}=this,a=i.getRadians();e.applyTransform([1,0,0,1,t||0,n||0]),e.applyTransform([Math.cos(a),Math.sin(a),-Math.sin(a),Math.cos(a),0,0]),e.applyTransform([1,0,0,1,-t||0,-n||0])}}class X8{constructor(e,t,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=Dn.parseScale(t);(i.x===0||i.y===0)&&(i.x=Mh,i.y=Mh),this.scale=i,this.originX=n[0],this.originY=n[1]}apply(e){var{scale:{x:t,y:n},originX:i,originY:a}=this,o=i.getPixels("x"),s=a.getPixels("y");e.translate(o,s),e.scale(t,n||t),e.translate(-o,-s)}unapply(e){var{scale:{x:t,y:n},originX:i,originY:a}=this,o=i.getPixels("x"),s=a.getPixels("y");e.translate(o,s),e.scale(1/t,1/n||t),e.translate(-o,-s)}applyToPoint(e){var{x:t,y:n}=this.scale;e.applyTransform([t||0,0,0,n||0,0,0])}}class oF{constructor(e,t,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=ro(t),this.originX=n[0],this.originY=n[1]}apply(e){var{originX:t,originY:n,matrix:i}=this,a=t.getPixels("x"),o=n.getPixels("y");e.translate(a,o),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-a,-o)}unapply(e){var{originX:t,originY:n,matrix:i}=this,a=i[0],o=i[2],s=i[4],A=i[1],l=i[3],u=i[5],h=0,c=0,f=1,d=1/(a*(l*f-u*c)-o*(A*f-u*h)+s*(A*c-l*h)),v=t.getPixels("x"),y=n.getPixels("y");e.translate(v,y),e.transform(d*(l*f-u*c),d*(u*h-A*f),d*(s*c-o*f),d*(a*f-s*h),d*(o*u-s*l),d*(s*A-a*u)),e.translate(-v,-y)}applyToPoint(e){e.applyTransform(this.matrix)}}class sF extends oF{constructor(e,t,n){super(e,t,n),this.type="skew",this.angle=null,this.angle=new Te(e,"angle",t)}}class W8 extends sF{constructor(e,t,n){super(e,t,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class q8 extends sF{constructor(e,t,n){super(e,t,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function Xxt(r){return uc(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function Wxt(r){var[e,t]=r.split("(");return[e.trim(),t.trim().replace(")","")]}class Lu{constructor(e,t,n){this.document=e,this.transforms=[];var i=Xxt(t);i.forEach(a=>{if(a!=="none"){var[o,s]=Wxt(a),A=Lu.transformTypes[o];typeof A<"u"&&this.transforms.push(new A(this.document,s,n))}})}static fromElement(e,t){var n=t.getStyle("transform",!1,!0),[i,a=i]=t.getStyle("transform-origin",!1,!0).split(),o=[i,a];return n.hasValue()?new Lu(e,n.getString(),o):null}apply(e){for(var{transforms:t}=this,n=t.length,i=0;i<n;i++)t[i].apply(e)}unapply(e){for(var{transforms:t}=this,n=t.length,i=n-1;i>=0;i--)t[i].unapply(e)}applyToPoint(e){for(var{transforms:t}=this,n=t.length,i=0;i<n;i++)t[i].applyToPoint(e)}}Lu.transformTypes={translate:Y8,rotate:z8,scale:X8,matrix:oF,skewX:W8,skewY:q8};class dn{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=t,this.captureTextNodes=n,this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!t||t.nodeType!==1)){if(Array.from(t.attributes).forEach(s=>{var A=H8(s.nodeName);this.attributes[A]=new Te(e,A,s.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(s=>s.trim());i.forEach(s=>{if(s){var[A,l]=s.split(":").map(u=>u.trim());this.styles[A]=new Te(e,A,l)}})}var{definitions:a}=e,o=this.getAttribute("id");o.hasValue()&&(a[o.getString()]||(a[o.getString()]=this)),Array.from(t.childNodes).forEach(s=>{if(s.nodeType===1)this.addChild(s);else if(n&&(s.nodeType===3||s.nodeType===4)){var A=e.createTextNode(s);A.getText().length>0&&this.addChild(A)}})}}getAttribute(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.attributes[e];if(!n&&t){var i=new Te(this.document,e,"");return this.attributes[e]=i,i}return n||Te.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return Te.empty(this.document)}getStyle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[e];if(i)return i;var a=this.getAttribute(e);if(a!=null&&a.hasValue())return this.styles[e]=a,a;if(!n){var{parent:o}=this;if(o){var s=o.getStyle(e);if(s!=null&&s.hasValue())return s}}if(t){var A=new Te(this.document,e,"");return this.styles[e]=A,A}return i||Te.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var n=this.getStyle("filter").getDefinition();n&&(this.applyEffects(e),n.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var t=Lu.fromElement(this.document,this);t&&t.apply(e);var n=this.getStyle("clip-path",!1,!0);if(n.hasValue()){var i=n.getDefinition();i&&i.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(t=>{t.render(e)})}addChild(e){var t=e instanceof dn?e:this.document.createElement(e);t.parent=this,dn.ignoreChildTypes.includes(t.type)||this.children.push(t)}matchesSelector(e){var{node:t}=this;if(typeof t.matches=="function")return t.matches(e);var n=t.getAttribute("class");return!n||n===""?!1:n.split(" ").some(i=>".".concat(i)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:t}=this.document;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var i=e[n],a=t[n];if(i)for(var o in i){var s=this.stylesSpecificity[o];typeof s>"u"&&(s="000"),a>=s&&(this.styles[o]=i[o],this.stylesSpecificity[o]=a)}}}removeStyles(e,t){var n=t.reduce((i,a)=>{var o=e.getStyle(a);if(!o.hasValue())return i;var s=o.getString();return o.setValue(""),[...i,[a,s]]},[]);return n}restoreStyles(e,t){t.forEach(n=>{var[i,a]=n;e.getStyle(i,!0).setValue(a)})}}dn.ignoreChildTypes=["title"];class Z8 extends dn{constructor(e,t,n){super(e,t,n)}}function qxt(r){var e=r.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function Zxt(r){return typeof process>"u"?r:r.trim().split(",").map(qxt).join(",")}function Jxt(r){if(!r)return"";var e=r.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function tSt(r){if(!r)return"";var e=r.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class ga{constructor(e,t,n,i,a,o){var s=o?typeof o=="string"?ga.parse(o):o:{};this.fontFamily=a||s.fontFamily,this.fontSize=i||s.fontSize,this.fontStyle=e||s.fontStyle,this.fontWeight=n||s.fontWeight,this.fontVariant=t||s.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n="",i="",a="",o="",s="",A=uc(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return A.forEach(u=>{switch(!0){case(!l.fontStyle&&ga.styles.includes(u)):u!=="inherit"&&(n=u),l.fontStyle=!0;break;case(!l.fontVariant&&ga.variants.includes(u)):u!=="inherit"&&(i=u),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&ga.weights.includes(u)):u!=="inherit"&&(a=u),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0;break;case!l.fontSize:u!=="inherit"&&([o]=u.split("/")),l.fontStyle=!0,l.fontVariant=!0,l.fontWeight=!0,l.fontSize=!0;break;default:u!=="inherit"&&(s+=u)}}),new ga(n,i,a,o,s,t)}toString(){return[Jxt(this.fontStyle),this.fontVariant,tSt(this.fontWeight),this.fontSize,Zxt(this.fontFamily)].join(" ").trim()}}ga.styles="normal|italic|oblique|inherit";ga.variants="normal|small-caps|inherit";ga.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Wo{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=t,this.x2=n,this.y2=i,this.addPoint(e,t),this.addPoint(n,i)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,t){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),typeof t<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:t,y1:n,x2:i,y2:a}=e;this.addPoint(t,n),this.addPoint(i,a)}}sumCubic(e,t,n,i,a){return Math.pow(1-e,3)*t+3*Math.pow(1-e,2)*e*n+3*(1-e)*Math.pow(e,2)*i+Math.pow(e,3)*a}bezierCurveAdd(e,t,n,i,a){var o=6*t-12*n+6*i,s=-3*t+9*n-9*i+3*a,A=3*n-3*t;if(s===0){if(o===0)return;var l=-A/o;0<l&&l<1&&(e?this.addX(this.sumCubic(l,t,n,i,a)):this.addY(this.sumCubic(l,t,n,i,a)));return}var u=Math.pow(o,2)-4*A*s;if(!(u<0)){var h=(-o+Math.sqrt(u))/(2*s);0<h&&h<1&&(e?this.addX(this.sumCubic(h,t,n,i,a)):this.addY(this.sumCubic(h,t,n,i,a)));var c=(-o-Math.sqrt(u))/(2*s);0<c&&c<1&&(e?this.addX(this.sumCubic(c,t,n,i,a)):this.addY(this.sumCubic(c,t,n,i,a)))}}addBezierCurve(e,t,n,i,a,o,s,A){this.addPoint(e,t),this.addPoint(s,A),this.bezierCurveAdd(!0,e,n,a,s),this.bezierCurveAdd(!1,t,i,o,A)}addQuadraticCurve(e,t,n,i,a,o){var s=e+.6666666666666666*(n-e),A=t+2/3*(i-t),l=s+1/3*(a-e),u=A+1/3*(o-t);this.addBezierCurve(e,t,s,l,A,u,a,o)}isPointInBox(e,t){var{x1:n,y1:i,x2:a,y2:o}=this;return n<=e&&e<=a&&i<=t&&t<=o}}class ze extends kt{constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=null,this.start=null,this.current=null,this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new Dn(0,0),this.control=new Dn(0,0),this.current=new Dn(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:t}=this;return e>=t.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",n=new Dn(this.command[e],this.command[t]);return this.makeAbsolute(n)}getAsControlPoint(e,t){var n=this.getPoint(e,t);return this.control=n,n}getAsCurrentPoint(e,t){var n=this.getPoint(e,t);return this.current=n,n}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==kt.CURVE_TO&&e!==kt.SMOOTH_CURVE_TO&&e!==kt.QUAD_TO&&e!==kt.SMOOTH_QUAD_TO)return this.current;var{current:{x:t,y:n},control:{x:i,y:a}}=this,o=new Dn(2*t-i,2*n-a);return o}makeAbsolute(e){if(this.command.relative){var{x:t,y:n}=this.current;e.x+=t,e.y+=n}return e}addMarker(e,t,n){var{points:i,angles:a}=this;n&&a.length>0&&!a[a.length-1]&&(a[a.length-1]=i[i.length-1].angleTo(n)),this.addMarkerAngle(e,t?t.angleTo(e):null)}addMarkerAngle(e,t){this.points.push(e),this.angles.push(t)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,t=e.length,n=0;n<t;n++)if(!e[n]){for(var i=n+1;i<t;i++)if(e[i]){e[n]=e[i];break}}return e}}class Du extends dn{constructor(){super(...arguments),this.modifiedEmSizeStack=!1}calculateOpacity(){for(var e=1,t=this;t;){var n=t.getStyle("opacity",!1,!0);n.hasValue(!0)&&(e*=n.getNumber()),t=t.parent}return e}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!t){var n=this.getStyle("fill"),i=this.getStyle("fill-opacity"),a=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(n.isUrlDefinition()){var s=n.getFillStyleDefinition(this,i);s&&(e.fillStyle=s)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var A=n.getColor();A!=="inherit"&&(e.fillStyle=A==="none"?"rgba(0,0,0,0)":A)}if(i.hasValue()){var l=new Te(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=l}if(a.isUrlDefinition()){var u=a.getFillStyleDefinition(this,o);u&&(e.strokeStyle=u)}else if(a.hasValue()){a.getString()==="currentColor"&&a.setValue(this.getStyle("color").getColor());var h=a.getString();h!=="inherit"&&(e.strokeStyle=h==="none"?"rgba(0,0,0,0)":h)}if(o.hasValue()){var c=new Te(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=c}var f=this.getStyle("stroke-width");if(f.hasValue()){var d=f.getPixels();e.lineWidth=d||Mh}var v=this.getStyle("stroke-linecap"),y=this.getStyle("stroke-linejoin"),m=this.getStyle("stroke-miterlimit"),w=this.getStyle("stroke-dasharray"),C=this.getStyle("stroke-dashoffset");if(v.hasValue()&&(e.lineCap=v.getString()),y.hasValue()&&(e.lineJoin=y.getString()),m.hasValue()&&(e.miterLimit=m.getNumber()),w.hasValue()&&w.getString()!=="none"){var B=ro(w.getString());typeof e.setLineDash<"u"?e.setLineDash(B):typeof e.webkitLineDash<"u"?e.webkitLineDash=B:typeof e.mozDash<"u"&&!(B.length===1&&B[0]===0)&&(e.mozDash=B);var R=C.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=R:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=R:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=R)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var O=this.getStyle("font"),I=this.getStyle("font-style"),T=this.getStyle("font-variant"),L=this.getStyle("font-weight"),P=this.getStyle("font-size"),S=this.getStyle("font-family"),x=new ga(I.getString(),T.getString(),L.getString(),P.hasValue()?"".concat(P.getPixels(!0),"px"):"",S.getString(),ga.parse(O.getString(),e.font));I.setValue(x.fontStyle),T.setValue(x.fontVariant),L.setValue(x.fontWeight),P.setValue(x.fontSize),S.setValue(x.fontFamily),e.font=x.toString(),P.isPixels()&&(this.document.emSize=P.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class Xr extends Du{constructor(e,t,n){super(e,t,n),this.type="path",this.pathParser=null,this.pathParser=new ze(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,n=new Wo;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case ze.MOVE_TO:this.pathM(e,n);break;case ze.LINE_TO:this.pathL(e,n);break;case ze.HORIZ_LINE_TO:this.pathH(e,n);break;case ze.VERT_LINE_TO:this.pathV(e,n);break;case ze.CURVE_TO:this.pathC(e,n);break;case ze.SMOOTH_CURVE_TO:this.pathS(e,n);break;case ze.QUAD_TO:this.pathQ(e,n);break;case ze.SMOOTH_QUAD_TO:this.pathT(e,n);break;case ze.ARC:this.pathA(e,n);break;case ze.CLOSE_PATH:this.pathZ(e,n);break}return n}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,t=e.getMarkerPoints(),n=e.getMarkerAngles(),i=t.map((a,o)=>[a,n[o]]);return i}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var t=this.getStyle("fill-rule");e.fillStyle!==""&&(t.getString("inherit")!=="inherit"?e.fill(t.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var n=this.getMarkers();if(n){var i=n.length-1,a=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(a.isUrlDefinition()){var A=a.getDefinition(),[l,u]=n[0];A.render(e,l,u)}if(o.isUrlDefinition())for(var h=o.getDefinition(),c=1;c<i;c++){var[f,d]=n[c];h.render(e,f,d)}if(s.isUrlDefinition()){var v=s.getDefinition(),[y,m]=n[i];v.render(e,y,m)}}}static pathM(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}pathM(e,t){var{pathParser:n}=this,{point:i}=Xr.pathM(n),{x:a,y:o}=i;n.addMarker(i),t.addPoint(a,o),e&&e.moveTo(a,o)}static pathL(e){var{current:t}=e,n=e.getAsCurrentPoint();return{current:t,point:n}}pathL(e,t){var{pathParser:n}=this,{current:i,point:a}=Xr.pathL(n),{x:o,y:s}=a;n.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathH(e){var{current:t,command:n}=e,i=new Dn((n.relative?t.x:0)+n.x,t.y);return e.current=i,{current:t,point:i}}pathH(e,t){var{pathParser:n}=this,{current:i,point:a}=Xr.pathH(n),{x:o,y:s}=a;n.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathV(e){var{current:t,command:n}=e,i=new Dn(t.x,(n.relative?t.y:0)+n.y);return e.current=i,{current:t,point:i}}pathV(e,t){var{pathParser:n}=this,{current:i,point:a}=Xr.pathV(n),{x:o,y:s}=a;n.addMarker(a,i),t.addPoint(o,s),e&&e.lineTo(o,s)}static pathC(e){var{current:t}=e,n=e.getPoint("x1","y1"),i=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:t,point:n,controlPoint:i,currentPoint:a}}pathC(e,t){var{pathParser:n}=this,{current:i,point:a,controlPoint:o,currentPoint:s}=Xr.pathC(n);n.addMarker(s,o,a),t.addBezierCurve(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,o.x,o.y,s.x,s.y)}static pathS(e){var{current:t}=e,n=e.getReflectedControlPoint(),i=e.getAsControlPoint("x2","y2"),a=e.getAsCurrentPoint();return{current:t,point:n,controlPoint:i,currentPoint:a}}pathS(e,t){var{pathParser:n}=this,{current:i,point:a,controlPoint:o,currentPoint:s}=Xr.pathS(n);n.addMarker(s,o,a),t.addBezierCurve(i.x,i.y,a.x,a.y,o.x,o.y,s.x,s.y),e&&e.bezierCurveTo(a.x,a.y,o.x,o.y,s.x,s.y)}static pathQ(e){var{current:t}=e,n=e.getAsControlPoint("x1","y1"),i=e.getAsCurrentPoint();return{current:t,controlPoint:n,currentPoint:i}}pathQ(e,t){var{pathParser:n}=this,{current:i,controlPoint:a,currentPoint:o}=Xr.pathQ(n);n.addMarker(o,a,a),t.addQuadraticCurve(i.x,i.y,a.x,a.y,o.x,o.y),e&&e.quadraticCurveTo(a.x,a.y,o.x,o.y)}static pathT(e){var{current:t}=e,n=e.getReflectedControlPoint();e.control=n;var i=e.getAsCurrentPoint();return{current:t,controlPoint:n,currentPoint:i}}pathT(e,t){var{pathParser:n}=this,{current:i,controlPoint:a,currentPoint:o}=Xr.pathT(n);n.addMarker(o,a,a),t.addQuadraticCurve(i.x,i.y,a.x,a.y,o.x,o.y),e&&e.quadraticCurveTo(a.x,a.y,o.x,o.y)}static pathA(e){var{current:t,command:n}=e,{rX:i,rY:a,xRot:o,lArcFlag:s,sweepFlag:A}=n,l=o*(Math.PI/180),u=e.getAsCurrentPoint(),h=new Dn(Math.cos(l)*(t.x-u.x)/2+Math.sin(l)*(t.y-u.y)/2,-Math.sin(l)*(t.x-u.x)/2+Math.cos(l)*(t.y-u.y)/2),c=Math.pow(h.x,2)/Math.pow(i,2)+Math.pow(h.y,2)/Math.pow(a,2);c>1&&(i*=Math.sqrt(c),a*=Math.sqrt(c));var f=(s===A?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(h.y,2)-Math.pow(a,2)*Math.pow(h.x,2))/(Math.pow(i,2)*Math.pow(h.y,2)+Math.pow(a,2)*Math.pow(h.x,2)));isNaN(f)&&(f=0);var d=new Dn(f*i*h.y/a,f*-a*h.x/i),v=new Dn((t.x+u.x)/2+Math.cos(l)*d.x-Math.sin(l)*d.y,(t.y+u.y)/2+Math.sin(l)*d.x+Math.cos(l)*d.y),y=sS([1,0],[(h.x-d.x)/i,(h.y-d.y)/a]),m=[(h.x-d.x)/i,(h.y-d.y)/a],w=[(-h.x-d.x)/i,(-h.y-d.y)/a],C=sS(m,w);return g_(m,w)<=-1&&(C=Math.PI),g_(m,w)>=1&&(C=0),{currentPoint:u,rX:i,rY:a,sweepFlag:A,xAxisRotation:l,centp:v,a1:y,ad:C}}pathA(e,t){var{pathParser:n}=this,{currentPoint:i,rX:a,rY:o,sweepFlag:s,xAxisRotation:A,centp:l,a1:u,ad:h}=Xr.pathA(n),c=1-s?1:-1,f=u+c*(h/2),d=new Dn(l.x+a*Math.cos(f),l.y+o*Math.sin(f));if(n.addMarkerAngle(d,f-c*Math.PI/2),n.addMarkerAngle(i,f-c*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(u)&&!isNaN(h)){var v=a>o?a:o,y=a>o?1:a/o,m=a>o?o/a:1;e.translate(l.x,l.y),e.rotate(A),e.scale(y,m),e.arc(0,0,v,u,u+h,Boolean(1-s)),e.scale(1/y,1/m),e.rotate(-A),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){Xr.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class AF extends Xr{constructor(e,t,n){super(e,t,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class Qu extends Du{constructor(e,t,n){super(e,t,new.target===Qu?!0:n),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,t);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(e.textBaseline=n)}initializeCoordinates(e){this.x=this.getAttribute("x").getPixels("x"),this.y=this.getAttribute("y").getPixels("y");var t=this.getAttribute("dx"),n=this.getAttribute("dy");t.hasValue()&&(this.x+=t.getPixels("x")),n.hasValue()&&(this.y+=n.getPixels("y")),this.x+=this.getAnchorDelta(e,this,0)}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(e);var t=null;return this.children.forEach((n,i)=>{var a=this.getChildBoundingBox(e,this,this,i);t?t.addBoundingBox(a):t=a}),t}getFontSize(){var{document:e,parent:t}=this,n=ga.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(n);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new Wo(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,n){var i=t[n],a=null;if(e.isArabic){var o=t.length,s=t[n-1],A=t[n+1],l="isolated";if((n===0||s===" ")&&n<o-2&&A!==" "&&(l="terminal"),n>0&&s!==" "&&n<o-2&&A!==" "&&(l="medial"),n>0&&s!==" "&&(n===o-1||A===" ")&&(l="initial"),typeof e.glyphs[i]<"u"){var u=e.glyphs[i];a=u instanceof AF?u:u[l]}}else a=e.glyphs[i];return a||(a=e.missingGlyph),a}getText(){return""}getTextFromNode(e){var t=e||this.node,n=Array.from(t.parentNode.childNodes),i=n.indexOf(t),a=n.length-1,o=uc(t.textContent||"");return i===0&&(o=D8(o)),i===a&&(o=Q8(o)),o}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(e),this.children.forEach((n,i)=>{this.renderChild(e,this,this,i)});var{mouse:t}=this.document.screen;t.isWorking()&&t.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:t,parent:n}=this,i=this.getText(),a=n.getStyle("font-family").getDefinition();if(a){for(var{unitsPerEm:o}=a.fontFace,s=ga.parse(t.ctx.font),A=n.getStyle("font-size").getNumber(s.fontSize),l=n.getStyle("font-style").getString(s.fontStyle),u=A/o,h=a.isRTL?i.split("").reverse().join(""):i,c=ro(n.getAttribute("dx").getString()),f=h.length,d=0;d<f;d++){var v=this.getGlyph(a,h,d);e.translate(this.x,this.y),e.scale(u,-u);var y=e.lineWidth;e.lineWidth=e.lineWidth*o/A,l==="italic"&&e.transform(1,0,.4,1,0,0),v.render(e),l==="italic"&&e.transform(1,0,-.4,1,0,0),e.lineWidth=y,e.scale(1/u,-1/u),e.translate(-this.x,-this.y),this.x+=A*(v.horizAdvX||a.horizAdvX)/o,typeof c[d]<"u"&&!isNaN(c[d])&&(this.x+=c[d])}return}var{x:m,y:w}=this;e.fillStyle&&e.fillText(i,m,w),e.strokeStyle&&e.strokeText(i,m,w)}getAnchorDelta(e,t,n){var i=this.getStyle("text-anchor").getString("start");if(i!=="start"){for(var{children:a}=t,o=a.length,s=null,A=0,l=n;l<o&&(s=a[l],!(l>n&&s.getAttribute("x").hasValue()||s.getAttribute("text-anchor").hasValue()));l++)A+=s.measureTextRecursive(e);return-1*(i==="end"?A:A/2)}return 0}adjustChildCoordinates(e,t,n,i){var a=n.children[i];if(typeof a.measureText!="function")return a;e.save(),a.setContext(e,!0);var o=a.getAttribute("x"),s=a.getAttribute("y"),A=a.getAttribute("dx"),l=a.getAttribute("dy"),u=a.getAttribute("text-anchor").getString("start");if(i===0&&a.type!=="textNode"&&(o.hasValue()||o.setValue(t.getAttribute("x").getValue("0")),s.hasValue()||s.setValue(t.getAttribute("y").getValue("0")),A.hasValue()||A.setValue(t.getAttribute("dx").getValue("0")),l.hasValue()||l.setValue(t.getAttribute("dy").getValue("0"))),o.hasValue()){if(a.x=o.getPixels("x")+t.getAnchorDelta(e,n,i),u!=="start"){var h=a.measureTextRecursive(e);a.x+=-1*(u==="end"?h:h/2)}A.hasValue()&&(a.x+=A.getPixels("x"))}else{if(u!=="start"){var c=a.measureTextRecursive(e);t.x+=-1*(u==="end"?c:c/2)}A.hasValue()&&(t.x+=A.getPixels("x")),a.x=t.x}return t.x=a.x+a.measureText(e),s.hasValue()?(a.y=s.getPixels("y"),l.hasValue()&&(a.y+=l.getPixels("y"))):(l.hasValue()&&(t.y+=l.getPixels("y")),a.y=t.y),t.y=a.y,a.clearContext(e),e.restore(),a}getChildBoundingBox(e,t,n,i){var a=this.adjustChildCoordinates(e,t,n,i);if(typeof a.getBoundingBox!="function")return null;var o=a.getBoundingBox(e);return o?(a.children.forEach((s,A)=>{var l=t.getChildBoundingBox(e,t,a,A);o.addBoundingBox(l)}),o):null}renderChild(e,t,n,i){var a=this.adjustChildCoordinates(e,t,n,i);a.render(e),a.children.forEach((o,s)=>{t.renderChild(e,t,a,s)})}measureTextRecursive(e){var t=this.children.reduce((n,i)=>n+i.measureTextRecursive(e),this.measureText(e));return t}measureText(e){var{measureCache:t}=this;if(~t)return t;var n=this.getText(),i=this.measureTargetText(e,n);return this.measureCache=i,i}measureTargetText(e,t){if(!t.length)return 0;var{parent:n}=this,i=n.getStyle("font-family").getDefinition();if(i){for(var a=this.getFontSize(),o=i.isRTL?t.split("").reverse().join(""):t,s=ro(n.getAttribute("dx").getString()),A=o.length,l=0,u=0;u<A;u++){var h=this.getGlyph(i,o,u);l+=(h.horizAdvX||i.horizAdvX)*a/i.fontFace.unitsPerEm,typeof s[u]<"u"&&!isNaN(s[u])&&(l+=s[u])}return l}if(!e.measureText)return t.length*10;e.save(),this.setContext(e,!0);var{width:c}=e.measureText(t);return this.clearContext(e),e.restore(),c}}class Cg extends Qu{constructor(e,t,n){super(e,t,new.target===Cg?!0:n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class eSt extends Cg{constructor(){super(...arguments),this.type="textNode"}}let bp=class extends Du{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var t,{document:n}=this,{screen:i,window:a}=n,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&a&&typeof a.getComputedStyle<"u"){e.font=a.getComputedStyle(o).getPropertyValue("font");var s=new Te(n,"fontSize",ga.parse(e.font).fontSize);s.hasValue()&&(n.rootEmSize=s.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:A,height:l}=i.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var u=this.getAttribute("refX"),h=this.getAttribute("refY"),c=this.getAttribute("viewBox"),f=c.hasValue()?ro(c.getString()):null,d=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",v=0,y=0,m=0,w=0;f&&(v=f[0],y=f[1]),this.root||(A=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(m=v,w=y,v=0,y=0)),i.viewPort.setCurrent(A,l),this.node&&(!this.parent||((t=this.node.parentNode)===null||t===void 0?void 0:t.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),f&&(A=f[2],l=f[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:A,height:i.viewPort.height,desiredHeight:l,minX:v,minY:y,refX:u.getValue(),refY:h.getValue(),clip:d,clipX:m,clipY:w}),f&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(A,l))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),a=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),s=this.getAttribute("style"),A=i.getNumber(0),l=a.getNumber(0);if(n)if(typeof n=="string")this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var u=this.getAttribute("preserveAspectRatio");u.hasValue()&&u.setValue(u.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),a.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(A||e," ").concat(l||t)),s.hasValue()){var h=this.getStyle("width"),c=this.getStyle("height");h.hasValue()&&h.setValue("".concat(e,"px")),c.hasValue()&&c.setValue("".concat(t,"px"))}}};class lF extends Xr{constructor(){super(...arguments),this.type="rect"}path(e){var t=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),a=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),s=this.getAttribute("ry"),A=o.getPixels("x"),l=s.getPixels("y");if(o.hasValue()&&!s.hasValue()&&(l=A),s.hasValue()&&!o.hasValue()&&(A=l),A=Math.min(A,i/2),l=Math.min(l,a/2),e){var u=4*((Math.sqrt(2)-1)/3);e.beginPath(),a>0&&i>0&&(e.moveTo(t+A,n),e.lineTo(t+i-A,n),e.bezierCurveTo(t+i-A+u*A,n,t+i,n+l-u*l,t+i,n+l),e.lineTo(t+i,n+a-l),e.bezierCurveTo(t+i,n+a-l+u*l,t+i-A+u*A,n+a,t+i-A,n+a),e.lineTo(t+A,n+a),e.bezierCurveTo(t+A-u*A,n+a,t,n+a-l+u*l,t,n+a-l),e.lineTo(t,n+l),e.bezierCurveTo(t,n+l-u*l,t+A-u*A,n,t+A,n),e.closePath())}return new Wo(t,n,t+i,n+a)}getMarkers(){return null}}class J8 extends Xr{constructor(){super(...arguments),this.type="circle"}path(e){var t=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return e&&i>0&&(e.beginPath(),e.arc(t,n,i,0,Math.PI*2,!1),e.closePath()),new Wo(t-i,n-i,t+i,n+i)}getMarkers(){return null}}class t7 extends Xr{constructor(){super(...arguments),this.type="ellipse"}path(e){var t=4*((Math.sqrt(2)-1)/3),n=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),a=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&n>0&&i>0&&(e.beginPath(),e.moveTo(a+n,o),e.bezierCurveTo(a+n,o+t*i,a+t*n,o+i,a,o+i),e.bezierCurveTo(a-t*n,o+i,a-n,o+t*i,a-n,o),e.bezierCurveTo(a-n,o-t*i,a-t*n,o-i,a,o-i),e.bezierCurveTo(a+t*n,o-i,a+n,o-t*i,a+n,o),e.closePath()),new Wo(a-n,o-i,a+n,o+i)}getMarkers(){return null}}class e7 extends Xr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Dn(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Dn(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:n},{x:i,y:a}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,n),e.lineTo(i,a)),new Wo(t,n,i,a)}getMarkers(){var[e,t]=this.getPoints(),n=e.angleTo(t);return[[e,n],[t,n]]}}class uF extends Xr{constructor(e,t,n){super(e,t,n),this.type="polyline",this.points=[],this.points=Dn.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:n,y:i}]=t,a=new Wo(n,i);return e&&(e.beginPath(),e.moveTo(n,i)),t.forEach(o=>{var{x:s,y:A}=o;a.addPoint(s,A),e&&e.lineTo(s,A)}),a}getMarkers(){var{points:e}=this,t=e.length-1,n=[];return e.forEach((i,a)=>{a!==t&&n.push([i,i.angleTo(e[a+1])])}),n.length>0&&n.push([e[e.length-1],n[n.length-1][1]]),n}}class r7 extends uF{constructor(){super(...arguments),this.type="polygon"}path(e){var t=super.path(e),[{x:n,y:i}]=this.points;return e&&(e.lineTo(n,i),e.closePath()),t}}class n7 extends dn{constructor(){super(...arguments),this.type="pattern"}createPattern(e,t,n){var i=this.getStyle("width").getPixels("x",!0),a=this.getStyle("height").getPixels("y",!0),o=new bp(this.document,null);o.attributes.viewBox=new Te(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new Te(this.document,"width","".concat(i,"px")),o.attributes.height=new Te(this.document,"height","".concat(a,"px")),o.attributes.transform=new Te(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var s=this.document.createCanvas(i,a),A=s.getContext("2d"),l=this.getAttribute("x"),u=this.getAttribute("y");l.hasValue()&&u.hasValue()&&A.translate(l.getPixels("x",!0),u.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(var h=-1;h<=1;h++)for(var c=-1;c<=1;c++)A.save(),o.attributes.x=new Te(this.document,"x",h*s.width),o.attributes.y=new Te(this.document,"y",c*s.height),o.render(A),A.restore();var f=e.createPattern(s,"repeat");return f}}class i7 extends dn{constructor(){super(...arguments),this.type="marker"}render(e,t,n){if(t){var{x:i,y:a}=t,o=this.getAttribute("orient").getString("auto"),s=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,a),o==="auto"&&e.rotate(n),s==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var A=new bp(this.document,null);A.type=this.type,A.attributes.viewBox=new Te(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.refX=new Te(this.document,"refX",this.getAttribute("refX").getValue()),A.attributes.refY=new Te(this.document,"refY",this.getAttribute("refY").getValue()),A.attributes.width=new Te(this.document,"width",this.getAttribute("markerWidth").getValue()),A.attributes.height=new Te(this.document,"height",this.getAttribute("markerHeight").getValue()),A.attributes.overflow=new Te(this.document,"overflow",this.getAttribute("overflow").getValue()),A.attributes.fill=new Te(this.document,"fill",this.getAttribute("fill").getColor("black")),A.attributes.stroke=new Te(this.document,"stroke",this.getAttribute("stroke").getValue("none")),A.children=this.children,A.render(e),e.restore(),s==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-n),e.translate(-i,-a)}}}class a7 extends dn{constructor(){super(...arguments),this.type="defs"}render(){}}class K1 extends Du{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new Wo;return this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),t}}class hF extends dn{constructor(e,t,n){super(e,t,n),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:a}=this;a.forEach(o=>{o.type==="stop"&&i.push(o)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,t,n){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:a}=i,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(n,a[a.length-1].color);if(a.forEach(y=>{o.addColorStop(y.offset,this.addParentOpacity(n,y.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:A,viewPort:l}=s.screen,[u]=l.viewPorts,h=new lF(s,null);h.attributes.x=new Te(s,"x",-A/3),h.attributes.y=new Te(s,"y",-A/3),h.attributes.width=new Te(s,"width",A),h.attributes.height=new Te(s,"height",A);var c=new K1(s,null);c.attributes.transform=new Te(s,"transform",this.getAttribute("gradientTransform").getValue()),c.children=[h];var f=new bp(s,null);f.attributes.x=new Te(s,"x",0),f.attributes.y=new Te(s,"y",0),f.attributes.width=new Te(s,"width",u.width),f.attributes.height=new Te(s,"height",u.height),f.children=[c];var d=s.createCanvas(u.width,u.height),v=d.getContext("2d");return v.fillStyle=o,f.render(v),v.createPattern(d,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())})}addParentOpacity(e,t){if(e.hasValue()){var n=new Te(this.document,"color",t);return n.addOpacity(e).getColor()}return t}}class o7 extends hF{constructor(e,t,n){super(e,t,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,t){var n=this.getGradientUnits()==="objectBoundingBox",i=n?t.getBoundingBox(e):null;if(n&&!i)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var a=n?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=n?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),s=n?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),A=n?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return a===s&&o===A?null:e.createLinearGradient(a,o,s,A)}}class s7 extends hF{constructor(e,t,n){super(e,t,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,t){var n=this.getGradientUnits()==="objectBoundingBox",i=t.getBoundingBox(e);if(n&&!i)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var a=n?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=n?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),s=a,A=o;this.getAttribute("fx").hasValue()&&(s=n?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(A=n?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var l=n?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),u=this.getAttribute("fr").getPixels();return e.createRadialGradient(s,A,u,a,o,l)}}class A7 extends dn{constructor(e,t,n){super(e,t,n),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),a=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),a.hasValue()&&(o=o.addOpacity(a)),this.offset=i,this.color=o.getColor()}}class Y1 extends dn{constructor(e,t,n){super(e,t,n),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new Te(e,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}calcValue(){var{initialUnits:e}=this,{progress:t,from:n,to:i}=this.getProgress(),a=n.getNumber()+(i.getNumber()-n.getNumber())*t;return e==="%"&&(a*=100),"".concat(a).concat(e)}update(e){var{parent:t}=this,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,t.animationFrozen=!0,t.animationFrozenValue=n.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,n.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var a=!1;if(this.begin<this.duration){var o=this.calcValue(),s=this.getAttribute("type");if(s.hasValue()){var A=s.getString();o="".concat(A,"(").concat(o,")")}n.setValue(o),a=!0}return a}getProgress(){var{document:e,values:t}=this,n={progress:(this.duration-this.begin)/(this.maxDuration-this.begin)};if(t.hasValue()){var i=n.progress*(t.getValue().length-1),a=Math.floor(i),o=Math.ceil(i);n.from=new Te(e,"from",parseFloat(t.getValue()[a])),n.to=new Te(e,"to",parseFloat(t.getValue()[o])),n.progress=(i-a)/(o-a)}else n.from=this.from,n.to=this.to;return n}}class l7 extends Y1{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=new rS(t.getColor()),a=new rS(n.getColor());if(i.ok&&a.ok){var o=i.r+(a.r-i.r)*e,s=i.g+(a.g-i.g)*e,A=i.b+(a.b-i.b)*e;return"rgb(".concat(Math.floor(o),", ").concat(Math.floor(s),", ").concat(Math.floor(A),")")}return this.getAttribute("from").getColor()}}class u7 extends Y1{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=ro(t.getString()),a=ro(n.getString()),o=i.map((s,A)=>{var l=a[A];return s+(l-s)*e}).join(" ");return o}}class h7 extends dn{constructor(e,t,n){super(e,t,n),this.type="font",this.glyphs={},this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=e,{children:a}=this;for(var o of a)switch(o.type){case"font-face":{this.fontFace=o;var s=o.getStyle("font-family");s.hasValue()&&(i[s.getString()]=this);break}case"missing-glyph":this.missingGlyph=o;break;case"glyph":{var A=o;A.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[A.unicode]>"u"&&(this.glyphs[A.unicode]={}),this.glyphs[A.unicode][A.arabicForm]=A):this.glyphs[A.unicode]=A;break}}}render(){}}class c7 extends dn{constructor(e,t,n){super(e,t,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class f7 extends Xr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class p7 extends Qu{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var t=e.children[0];if(t)return t.getText()}return""}}class d7 extends Qu{constructor(e,t,n){super(e,t,n),this.type="a";var{childNodes:i}=t,a=i[0],o=i.length>0&&Array.from(i).every(s=>s.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(a):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:n,y:i}=this,{mouse:a}=t.screen,o=new Te(t,"fontSize",ga.parse(t.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new Wo(n,i-o.getPixels("y"),n+this.measureText(e),i))}else if(this.children.length>0){var s=new K1(this.document,null);s.children=this.children,s.parent=this,s.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function c5(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function x0(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?c5(Object(t),!0).forEach(function(n){rF(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):c5(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class v7 extends Qu{constructor(e,t,n){super(e,t,n),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);var i=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(i)}getText(){return this.text}path(e){var{dataArray:t}=this;e&&e.beginPath(),t.forEach(n=>{var{type:i,points:a}=n;switch(i){case ze.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case ze.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case ze.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case ze.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case ze.ARC:{var[o,s,A,l,u,h,c,f]=a,d=A>l?A:l,v=A>l?1:A/l,y=A>l?l/A:1;e&&(e.translate(o,s),e.rotate(c),e.scale(v,y),e.arc(0,0,d,u,u+h,Boolean(1-f)),e.scale(1/v,1/y),e.rotate(-c),e.translate(-o,-s));break}case ze.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var t=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),{glyphInfo:i}=this,a=e.fillStyle;t==="underline"&&e.beginPath(),i.forEach((o,s)=>{var{p0:A,p1:l,rotation:u,text:h}=o;e.save(),e.translate(A.x,A.y),e.rotate(u),e.fillStyle&&e.fillText(h,0,0),e.strokeStyle&&e.strokeText(h,0,0),e.restore(),t==="underline"&&(s===0&&e.moveTo(A.x,A.y+n/8),e.lineTo(l.x,l.y+n/5))}),t==="underline"&&(e.lineWidth=n/20,e.strokeStyle=a,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,t,n,i,a,o,s,A,l){var u=o,h=this.measureText(e,A);A===" "&&t==="justify"&&n<i&&(h+=(i-n)/a),l>-1&&(u+=this.getLetterSpacingAt(l));var c=this.textHeight/20,f=this.getEquidistantPointOnPath(u,c,0),d=this.getEquidistantPointOnPath(u+h,c,0),v={p0:f,p1:d},y=f&&d?Math.atan2(d.y-f.y,d.x-f.x):0;if(s){var m=Math.cos(Math.PI/2+y)*s,w=Math.cos(-y)*s;v.p0=x0(x0({},f),{},{x:f.x+m,y:f.y+w}),v.p1=x0(x0({},d),{},{x:d.x+m,y:d.y+w})}return u+=h,{offset:u,segment:v,rotation:y}}measureText(e,t){var{measuresCache:n}=this,i=t||this.getText();if(n.has(i))return n.get(i);var a=this.measureTargetText(e,i);return n.set(i,a),a}setTextData(e){if(!this.glyphInfo){var t=this.getText(),n=t.split(""),i=t.split(" ").length-1,a=this.parent.getAttribute("dx").split().map(B=>B.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),s=this.parent.getStyle("text-anchor").getString("start"),A=this.getStyle("letter-spacing"),l=this.parent.getStyle("letter-spacing"),u=0;!A.hasValue()||A.getValue()==="inherit"?u=l.getPixels():A.hasValue()&&A.getValue()!=="initial"&&A.getValue()!=="unset"&&(u=A.getPixels());var h=[],c=t.length;this.letterSpacingCache=h;for(var f=0;f<c;f++)h.push(typeof a[f]<"u"?a[f]:u);var d=h.reduce((B,R,O)=>O===0?0:B+R||0,0),v=this.measureText(e),y=Math.max(v+d,0);this.textWidth=v,this.textHeight=this.getFontSize(),this.glyphInfo=[];var m=this.getPathLength(),w=this.getStyle("startOffset").getNumber(0)*m,C=0;(s==="middle"||s==="center")&&(C=-y/2),(s==="end"||s==="right")&&(C=-y),C+=w,n.forEach((B,R)=>{var{offset:O,segment:I,rotation:T}=this.findSegmentToFitChar(e,s,y,m,i,C,o,B,R);C=O,!(!I.p0||!I.p1)&&this.glyphInfo.push({text:n[R],p0:I.p0,p1:I.p1,rotation:T})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:n}=e;for(n.reset();!n.isEnd();){var{current:i}=n,a=i?i.x:0,o=i?i.y:0,s=n.next(),A=s.type,l=[];switch(s.type){case ze.MOVE_TO:this.pathM(n,l);break;case ze.LINE_TO:A=this.pathL(n,l);break;case ze.HORIZ_LINE_TO:A=this.pathH(n,l);break;case ze.VERT_LINE_TO:A=this.pathV(n,l);break;case ze.CURVE_TO:this.pathC(n,l);break;case ze.SMOOTH_CURVE_TO:A=this.pathS(n,l);break;case ze.QUAD_TO:this.pathQ(n,l);break;case ze.SMOOTH_QUAD_TO:A=this.pathT(n,l);break;case ze.ARC:l=this.pathA(n);break;case ze.CLOSE_PATH:Xr.pathZ(n);break}s.type!==ze.CLOSE_PATH?t.push({type:A,points:l,start:{x:a,y:o},pathLength:this.calcLength(a,o,A,l)}):t.push({type:ze.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:n,y:i}=Xr.pathM(e).point;t.push(n,i)}pathL(e,t){var{x:n,y:i}=Xr.pathL(e).point;return t.push(n,i),ze.LINE_TO}pathH(e,t){var{x:n,y:i}=Xr.pathH(e).point;return t.push(n,i),ze.LINE_TO}pathV(e,t){var{x:n,y:i}=Xr.pathV(e).point;return t.push(n,i),ze.LINE_TO}pathC(e,t){var{point:n,controlPoint:i,currentPoint:a}=Xr.pathC(e);t.push(n.x,n.y,i.x,i.y,a.x,a.y)}pathS(e,t){var{point:n,controlPoint:i,currentPoint:a}=Xr.pathS(e);return t.push(n.x,n.y,i.x,i.y,a.x,a.y),ze.CURVE_TO}pathQ(e,t){var{controlPoint:n,currentPoint:i}=Xr.pathQ(e);t.push(n.x,n.y,i.x,i.y)}pathT(e,t){var{controlPoint:n,currentPoint:i}=Xr.pathT(e);return t.push(n.x,n.y,i.x,i.y),ze.QUAD_TO}pathA(e){var{rX:t,rY:n,sweepFlag:i,xAxisRotation:a,centp:o,a1:s,ad:A}=Xr.pathA(e);return i===0&&A>0&&(A-=2*Math.PI),i===1&&A<0&&(A+=2*Math.PI),[o.x,o.y,t,n,s,A,a,i]}calcLength(e,t,n,i){var a=0,o=null,s=null,A=0;switch(n){case ze.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case ze.CURVE_TO:for(a=0,o=this.getPointOnCubicBezier(0,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),A=.01;A<=1;A+=.01)s=this.getPointOnCubicBezier(A,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case ze.QUAD_TO:for(a=0,o=this.getPointOnQuadraticBezier(0,e,t,i[0],i[1],i[2],i[3]),A=.01;A<=1;A+=.01)s=this.getPointOnQuadraticBezier(A,e,t,i[0],i[1],i[2],i[3]),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return a;case ze.ARC:{a=0;var l=i[4],u=i[5],h=i[4]+u,c=Math.PI/180;if(Math.abs(l-h)<c&&(c=Math.abs(l-h)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),u<0)for(A=l-c;A>h;A-=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],A,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;else for(A=l+c;A<h;A+=c)s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],A,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),o=s;return s=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],h,0),a+=this.getLineLength(o.x,o.y,s.x,s.y),a}}return 0}getPointOnLine(e,t,n,i,a){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:t,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:n,A=(a-n)/(i-t+Mh),l=Math.sqrt(e*e/(1+A*A));i<t&&(l*=-1);var u=A*l,h=null;if(i===t)h={x:o,y:s+u};else if((s-n)/(o-t+Mh)===A)h={x:o+l,y:s+u};else{var c=0,f=0,d=this.getLineLength(t,n,i,a);if(d<Mh)return null;var v=(o-t)*(i-t)+(s-n)*(a-n);v/=d*d,c=t+v*(i-t),f=n+v*(a-n);var y=this.getLineLength(o,s,c,f),m=Math.sqrt(e*e-y*y);l=Math.sqrt(m*m/(1+A*A)),i<t&&(l*=-1),u=A*l,h={x:c+l,y:f+u}}return h}getPointOnPath(e){var t=this.getPathLength(),n=0,i=null;if(e<-5e-5||e-5e-5>t)return null;var{dataArray:a}=this;for(var o of a){if(o&&(o.pathLength<5e-5||n+o.pathLength+5e-5<e)){n+=o.pathLength;continue}var s=e-n,A=0;switch(o.type){case ze.LINE_TO:i=this.getPointOnLine(s,o.start.x,o.start.y,o.points[0],o.points[1],o.start.x,o.start.y);break;case ze.ARC:{var l=o.points[4],u=o.points[5],h=o.points[4]+u;if(A=l+s/o.pathLength*u,u<0&&A<h||u>=0&&A>h)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],A,o.points[6]);break}case ze.CURVE_TO:A=s/o.pathLength,A>1&&(A=1),i=this.getPointOnCubicBezier(A,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case ze.QUAD_TO:A=s/o.pathLength,A>1&&(A=1),i=this.getPointOnQuadraticBezier(A,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3]);break}if(i)return i;break}return null}getLineLength(e,t,n,i){return Math.sqrt((n-e)*(n-e)+(i-t)*(i-t))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,t)=>t.pathLength>0?e+t.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,t,n,i,a,o,s,A,l){var u=A*AS(e)+o*lS(e)+i*uS(e)+t*hS(e),h=l*AS(e)+s*lS(e)+a*uS(e)+n*hS(e);return{x:u,y:h}}getPointOnQuadraticBezier(e,t,n,i,a,o,s){var A=o*cS(e)+i*fS(e)+t*pS(e),l=s*cS(e)+a*fS(e)+n*pS(e);return{x:A,y:l}}getPointOnEllipticalArc(e,t,n,i,a,o){var s=Math.cos(o),A=Math.sin(o),l={x:n*Math.cos(a),y:i*Math.sin(a)};return{x:e+(l.x*s-l.y*A),y:t+(l.x*A+l.y*s)}}buildEquidistantCache(e,t){var n=this.getPathLength(),i=t||.25,a=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==a||this.equidistantCache.precision!==i){this.equidistantCache={step:a,precision:i,points:[]};for(var o=0,s=0;s<=n;s+=i){var A=this.getPointOnPath(s),l=this.getPointOnPath(s+i);!A||!l||(o+=this.getLineLength(A.x,A.y,l.x,l.y),o>=a&&(this.equidistantCache.points.push({x:A.x,y:A.y,distance:s}),o-=a))}}}getEquidistantPointOnPath(e,t,n){if(this.buildEquidistantCache(t,n),e<0||e-this.getPathLength()>5e-5)return null;var i=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}var rSt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class g7 extends Du{constructor(e,t,n){super(e,t,n),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var a=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),a?this.loadSvg(i):this.loadImage(i),this.isSvg=a}}loadImage(e){var t=this;return sl(function*(){try{var n=yield t.document.createImage(e);t.image=n}catch(i){console.error('Error while loading image "'.concat(e,'":'),i)}t.loaded=!0})()}loadSvg(e){var t=this;return sl(function*(){var n=rSt.exec(e);if(n){var i=n[5];n[4]==="base64"?t.image=atob(i):t.image=decodeURIComponent(i)}else try{var a=yield t.document.fetch(e),o=yield a.text();t.image=o}catch(s){console.error('Error while loading image "'.concat(e,'":'),s)}t.loaded=!0})()}renderChildren(e){var{document:t,image:n,loaded:i}=this,a=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),A=this.getStyle("height").getPixels("y");if(!(!i||!n||!s||!A)){if(e.save(),e.translate(a,o),this.isSvg){var l=t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:s,scaleHeight:A});l.document.documentElement.parent=this,l.render()}else{var u=this.image;t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:s,desiredWidth:u.width,height:A,desiredHeight:u.height}),this.loaded&&(typeof u.complete>"u"||u.complete)&&e.drawImage(u,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new Wo(e,t,e+n,t+i)}}class y7 extends Du{constructor(){super(...arguments),this.type="symbol"}render(e){}}class m7{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var n=this;return sl(function*(){try{var{document:i}=n,a=yield i.canvg.parser.load(t),o=a.getElementsByTagName("font");Array.from(o).forEach(s=>{var A=i.createElement(s);i.definitions[e]=A})}catch(s){console.error('Error while loading font "'.concat(t,'":'),s)}n.loaded=!0})()}}class cF extends dn{constructor(e,t,n){super(e,t,n),this.type="style";var i=uc(Array.from(t.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),a=i.split("}");a.forEach(o=>{var s=o.trim();if(s){var A=s.split("{"),l=A[0].split(","),u=A[1].split(";");l.forEach(h=>{var c=h.trim();if(c){var f=e.styles[c]||{};if(u.forEach(y=>{var m=y.indexOf(":"),w=y.substr(0,m).trim(),C=y.substr(m+1,y.length-m).trim();w&&C&&(f[w]=new Te(e,w,C))}),e.styles[c]=f,e.stylesSpecificity[c]=k8(c),c==="@font-face"){var d=f["font-family"].getString().replace(/"|'/g,""),v=f.src.getString().split(",");v.forEach(y=>{if(y.indexOf('format("svg")')>0){var m=aF(y);m&&new m7(e).load(d,m)}})}}})}})}}cF.parseExternalUrl=aF;class _7 extends Du{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var t=this.getAttribute("x"),n=this.getAttribute("y");t.hasValue()&&e.translate(t.getPixels("x"),0),n.hasValue()&&e.translate(0,n.getPixels("y"))}path(e){var{element:t}=this;t&&t.path(e)}renderChildren(e){var{document:t,element:n}=this;if(n){var i=n;if(n.type==="symbol"&&(i=new bp(t,null),i.attributes.viewBox=new Te(t,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new Te(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new Te(t,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new Te(t,"opacity",this.calculateOpacity())),i.type==="svg"){var a=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);a.hasValue()&&(i.attributes.width=new Te(t,"width",a.getString())),o.hasValue()&&(i.attributes.height=new Te(t,"height",o.getString()))}var s=i.parent;i.parent=this,i.render(e),i.parent=s}}getBoundingBox(e){var{element:t}=this;return t?t.getBoundingBox(e):null}elementTransform(){var{document:e,element:t}=this;return Lu.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function S0(r,e,t,n,i,a){return r[t*n*4+e*4+a]}function b0(r,e,t,n,i,a,o){r[t*n*4+e*4+a]=o}function ui(r,e,t){var n=r[e];return n*t}function UA(r,e,t,n){return e+Math.cos(r)*t+Math.sin(r)*n}class fF extends dn{constructor(e,t,n){super(e,t,n),this.type="feColorMatrix";var i=ro(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var a=i[0];i=[.213+.787*a,.715-.715*a,.072-.072*a,0,0,.213-.213*a,.715+.285*a,.072-.072*a,0,0,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[UA(o,.213,.787,-.213),UA(o,.715,-.715,-.715),UA(o,.072,-.072,.928),0,0,UA(o,.213,-.213,.143),UA(o,.715,.285,.14),UA(o,.072,-.072,-.283),0,0,UA(o,.213,-.213,-.787),UA(o,.715,-.715,.715),UA(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=i,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,t,n,i,a){for(var{includeOpacity:o,matrix:s}=this,A=e.getImageData(0,0,i,a),l=0;l<a;l++)for(var u=0;u<i;u++){var h=S0(A.data,u,l,i,a,0),c=S0(A.data,u,l,i,a,1),f=S0(A.data,u,l,i,a,2),d=S0(A.data,u,l,i,a,3),v=ui(s,0,h)+ui(s,1,c)+ui(s,2,f)+ui(s,3,d)+ui(s,4,1),y=ui(s,5,h)+ui(s,6,c)+ui(s,7,f)+ui(s,8,d)+ui(s,9,1),m=ui(s,10,h)+ui(s,11,c)+ui(s,12,f)+ui(s,13,d)+ui(s,14,1),w=ui(s,15,h)+ui(s,16,c)+ui(s,17,f)+ui(s,18,d)+ui(s,19,1);o&&(v=0,y=0,m=0,w*=d/255),b0(A.data,u,l,i,a,0,v),b0(A.data,u,l,i,a,1,y),b0(A.data,u,l,i,a,2,m),b0(A.data,u,l,i,a,3,w)}e.clearRect(0,0,i,a),e.putImageData(A,0,0)}}class Bg extends dn{constructor(){super(...arguments),this.type="mask"}apply(e,t){var{document:n}=this,i=this.getAttribute("x").getPixels("x"),a=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(!o&&!s){var A=new Wo;this.children.forEach(d=>{A.addBoundingBox(d.getBoundingBox(e))}),i=Math.floor(A.x1),a=Math.floor(A.y1),o=Math.floor(A.width),s=Math.floor(A.height)}var l=this.removeStyles(t,Bg.ignoreStyles),u=n.createCanvas(i+o,a+s),h=u.getContext("2d");n.screen.setDefaults(h),this.renderChildren(h),new fF(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(h,0,0,i+o,a+s);var c=n.createCanvas(i+o,a+s),f=c.getContext("2d");n.screen.setDefaults(f),t.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=h.createPattern(u,"no-repeat"),f.fillRect(0,0,i+o,a+s),e.fillStyle=f.createPattern(c,"no-repeat"),e.fillRect(0,0,i+o,a+s),this.restoreStyles(t,l)}render(e){}}Bg.ignoreStyles=["mask","transform","clip-path"];var f5=()=>{};class w7 extends dn{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,n=Reflect.getPrototypeOf(e),{beginPath:i,closePath:a}=e;n&&(n.beginPath=f5,n.closePath=f5),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=Lu.fromElement(t,o)),s&&s.apply(e),o.path(e),n&&(n.closePath=a),s&&s.unapply(e)}}),Reflect.apply(a,e,[]),e.clip(),n&&(n.beginPath=i,n.closePath=a)}render(e){}}class Tg extends dn{constructor(){super(...arguments),this.type="filter"}apply(e,t){var{document:n,children:i}=this,a=t.getBoundingBox(e);if(a){var o=0,s=0;i.forEach(m=>{var w=m.extraFilterDistance||0;o=Math.max(o,w),s=Math.max(s,w)});var A=Math.floor(a.width),l=Math.floor(a.height),u=A+2*o,h=l+2*s;if(!(u<1||h<1)){var c=Math.floor(a.x),f=Math.floor(a.y),d=this.removeStyles(t,Tg.ignoreStyles),v=n.createCanvas(u,h),y=v.getContext("2d");n.screen.setDefaults(y),y.translate(-c+o,-f+s),t.render(y),i.forEach(m=>{typeof m.apply=="function"&&m.apply(y,0,0,u,h)}),e.drawImage(v,0,0,u,h,c-o,f-s,u,h),this.restoreStyles(t,d)}}}render(e){}}Tg.ignoreStyles=["filter","transform","clip-path"];class E7 extends dn{constructor(e,t,n){super(e,t,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,n,i,a){}}class C7 extends dn{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,n,i,a){}}class B7 extends dn{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,n,i,a){}}class T7 extends dn{constructor(e,t,n){super(e,t,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,t,n,i,a){var{document:o,blurRadius:s}=this,A=o.window?o.window.document.body:null,l=e.canvas;l.id=o.getUniqueId(),A&&(l.style.display="none",A.appendChild(l)),Mxt(l,t,n,i,a,s),A&&A.removeChild(l)}}class x7 extends dn{constructor(){super(...arguments),this.type="title"}}class S7 extends dn{constructor(){super(...arguments),this.type="desc"}}var nSt={svg:bp,rect:lF,circle:J8,ellipse:t7,line:e7,polyline:uF,polygon:r7,path:Xr,pattern:n7,marker:i7,defs:a7,linearGradient:o7,radialGradient:s7,stop:A7,animate:Y1,animateColor:l7,animateTransform:u7,font:h7,"font-face":c7,"missing-glyph":f7,glyph:AF,text:Qu,tspan:Cg,tref:p7,a:d7,textPath:v7,image:g7,g:K1,symbol:y7,style:cF,use:_7,mask:Bg,clipPath:w7,filter:Tg,feDropShadow:E7,feMorphology:C7,feComposite:B7,feColorMatrix:fF,feGaussianBlur:T7,title:x7,desc:S7};function p5(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function iSt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?p5(Object(t),!0).forEach(function(n){rF(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):p5(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function aSt(r,e){var t=document.createElement("canvas");return t.width=r,t.height=e,t}function oSt(r){return dS.apply(this,arguments)}function dS(){return dS=sl(function*(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,t=document.createElement("img");return e&&(t.crossOrigin="Anonymous"),new Promise((n,i)=>{t.onload=()=>{n(t)},t.onerror=(a,o,s,A,l)=>{i(l)},t.src=r})}),dS.apply(this,arguments)}class ZA{constructor(e){var{rootEmSize:t=12,emSize:n=12,createCanvas:i=ZA.createCanvas,createImage:a=ZA.createImage,anonymousCrossOrigin:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=t,this.emSize=n,this.createCanvas=i,this.createImage=this.bindCreateImage(a,o),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,t){return typeof t=="boolean"?(n,i)=>e(n,typeof i=="boolean"?i:t):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:t}=this;t.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}createElement(e){var t=e.nodeName.replace(/^[^:]+:/,""),n=ZA.elementTypes[t];return typeof n<"u"?new n(this,e):new Z8(this,e)}createTextNode(e){return new eSt(this,e)}setViewBox(e){this.screen.setViewBox(iSt({document:this},e))}}ZA.createCanvas=aSt;ZA.createImage=oSt;ZA.elementTypes=nSt;function d5(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function ah(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?d5(Object(t),!0).forEach(function(n){rF(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):d5(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class wh{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new rm(n),this.screen=new Eg(e,n),this.options=n;var i=new ZA(this,n),a=i.createDocumentElement(t);this.document=i,this.documentElement=a}static from(e,t){var n=arguments;return sl(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:{},a=new rm(i),o=yield a.parse(t);return new wh(e,o,i)})()}static fromString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new rm(n),a=i.parseFromString(t);return new wh(e,a,n)}fork(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return wh.from(e,t,ah(ah({},this.options),n))}forkString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return wh.fromString(e,t,ah(ah({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return sl(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};t.start(ah({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),yield t.ready(),t.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:t,screen:n,options:i}=this;n.start(t,ah(ah({enableRedraw:!0},i),e))}stop(){this.screen.stop()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,t,n)}}var sSt=Object.freeze(Object.defineProperty({__proto__:null,default:wh,AElement:d7,AnimateColorElement:l7,AnimateElement:Y1,AnimateTransformElement:u7,BoundingBox:Wo,CB1:AS,CB2:lS,CB3:uS,CB4:hS,Canvg:wh,CircleElement:J8,ClipPathElement:w7,DefsElement:a7,DescElement:S7,Document:ZA,Element:dn,EllipseElement:t7,FeColorMatrixElement:fF,FeCompositeElement:B7,FeDropShadowElement:E7,FeGaussianBlurElement:T7,FeMorphologyElement:C7,FilterElement:Tg,Font:ga,FontElement:h7,FontFaceElement:c7,GElement:K1,GlyphElement:AF,GradientElement:hF,ImageElement:g7,LineElement:e7,LinearGradientElement:o7,MarkerElement:i7,MaskElement:Bg,Matrix:oF,MissingGlyphElement:f7,Mouse:V8,PSEUDO_ZERO:Mh,Parser:rm,PathElement:Xr,PathParser:ze,PatternElement:n7,Point:Dn,PolygonElement:r7,PolylineElement:uF,Property:Te,QB1:cS,QB2:fS,QB3:pS,RadialGradientElement:s7,RectElement:lF,RenderedElement:Du,Rotate:z8,SVGElement:bp,SVGFontLoader:m7,Scale:X8,Screen:Eg,Skew:sF,SkewX:W8,SkewY:q8,StopElement:A7,StyleElement:cF,SymbolElement:y7,TRefElement:p7,TSpanElement:Cg,TextElement:Qu,TextPathElement:v7,TitleElement:x7,Transform:Lu,Translate:Y8,UnknownElement:Z8,UseElement:_7,ViewPort:$8,compressSpaces:uc,getSelectorSpecificity:k8,normalizeAttributeName:H8,normalizeColor:G8,parseExternalUrl:aF,presets:Dxt,toNumbers:ro,trimLeft:D8,trimRight:Q8,vectorMagnitude:oS,vectorsAngle:sS,vectorsRatio:g_},Symbol.toStringTag,{value:"Module"}));const b7=$k(v9);b7.use(lx);b7.mount("#app")});export default ASt();
|