Files
traintracker/dist/assets/index-f45376ca.js
2023-02-22 21:20:26 +00:00

988 lines
1.8 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var I9=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports);var eRt=I9(Ei=>{(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 T1(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]}const F9="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",L9=T1(F9);function Mg(r){if(we(r)){const e={};for(let t=0;t<r.length;t++){const n=r[t],i=Pn(n)?N9(n):Mg(n);if(i)for(const a in i)e[a]=i[a]}return e}else{if(Pn(r))return r;if(hn(r))return r}}const O9=/;(?![^(]*\))/g,R9=/:([^]+)/,M9=/\/\*.*?\*\//gs;function N9(r){const e={};return r.replace(M9,"").split(O9).forEach(t=>{if(t){const n=t.split(R9);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Ng(r){let e="";if(Pn(r))e=r;else if(we(r))for(let t=0;t<r.length;t++){const n=Ng(r[t]);n&&(e+=n+" ")}else if(hn(r))for(const t in r)r[t]&&(e+=t+" ");return e.trim()}function P9(r){if(!r)return null;let{class:e,style:t}=r;return e&&!Pn(e)&&(r.class=Ng(e)),t&&(r.style=Mg(t)),r}const U9="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",D9=T1(U9);function O2(r){return!!r||r===""}function Q9(r,e){if(r.length!==e.length)return!1;let t=!0;for(let n=0;t&&n<r.length;n++)t=Iu(r[n],e[n]);return t}function Iu(r,e){if(r===e)return!0;let t=GO(r),n=GO(e);if(t||n)return t&&n?r.getTime()===e.getTime():!1;if(t=Jv(r),n=Jv(e),t||n)return r===e;if(t=we(r),n=we(e),t||n)return t&&n?Q9(r,e):!1;if(t=hn(r),n=hn(e),t||n){if(!t||!n)return!1;const i=Object.keys(r).length,a=Object.keys(e).length;if(i!==a)return!1;for(const o in r){const s=r.hasOwnProperty(o),A=e.hasOwnProperty(o);if(s&&!A||!s&&A||!Iu(r[o],e[o]))return!1}}return String(r)===String(e)}function S1(r,e){return r.findIndex(t=>Iu(t,e))}const tu=r=>Pn(r)?r:r==null?"":we(r)||hn(r)&&(r.toString===M2||!je(r.toString))?JSON.stringify(r,R2,2):String(r),R2=(r,e)=>e&&e.__v_isRef?R2(r,e.value):ep(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,i])=>(t[`${n} =>`]=i,t),{})}:wh(e)?{[`Set(${e.size})`]:[...e.values()]}:hn(e)&&!we(e)&&!N2(e)?String(e):e,nn={},tp=[],Ts=()=>{},H9=()=>!1,G9=/^on[^a-z]/,Pg=r=>G9.test(r),Wb=r=>r.startsWith("onUpdate:"),Kn=Object.assign,qb=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},k9=Object.prototype.hasOwnProperty,br=(r,e)=>k9.call(r,e),we=Array.isArray,ep=r=>Ug(r)==="[object Map]",wh=r=>Ug(r)==="[object Set]",GO=r=>Ug(r)==="[object Date]",je=r=>typeof r=="function",Pn=r=>typeof r=="string",Jv=r=>typeof r=="symbol",hn=r=>r!==null&&typeof r=="object",Zb=r=>hn(r)&&je(r.then)&&je(r.catch),M2=Object.prototype.toString,Ug=r=>M2.call(r),$9=r=>Ug(r).slice(8,-1),N2=r=>Ug(r)==="[object Object]",Jb=r=>Pn(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,Iv=T1(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),x1=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},V9=/-(\w)/g,so=x1(r=>r.replace(V9,(e,t)=>t?t.toUpperCase():"")),j9=/\B([A-Z])/g,Wo=x1(r=>r.replace(j9,"-$1").toLowerCase()),Dg=x1(r=>r.charAt(0).toUpperCase()+r.slice(1)),Fv=x1(r=>r?`on${Dg(r)}`:""),_p=(r,e)=>!Object.is(r,e),rp=(r,e)=>{for(let t=0;t<r.length;t++)r[t](e)},a_=(r,e,t)=>{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value:t})},Al=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let kO;const K9=()=>kO||(kO=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let xo;class tI{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=xo,!e&&xo&&(this.index=(xo.scopes||(xo.scopes=[])).push(this)-1)}run(e){if(this.active){const t=xo;try{return xo=this,e()}finally{xo=t}}}on(){xo=this}off(){xo=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 z9(r){return new tI(r)}function P2(r,e=xo){e&&e.active&&e.effects.push(r)}function Y9(){return xo}function X9(r){xo&&xo.cleanups.push(r)}const eI=r=>{const e=new Set(r);return e.w=0,e.n=0,e},U2=r=>(r.w&Fu)>0,D2=r=>(r.n&Fu)>0,W9=({deps:r})=>{if(r.length)for(let e=0;e<r.length;e++)r[e].w|=Fu},q9=r=>{const{deps:e}=r;if(e.length){let t=0;for(let n=0;n<e.length;n++){const i=e[n];U2(i)&&!D2(i)?i.delete(r):e[t++]=i,i.w&=~Fu,i.n&=~Fu}e.length=t}},pT=new WeakMap;let lv=0,Fu=1;const dT=30;let Es;const $c=Symbol(""),vT=Symbol("");class Qg{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,P2(this,n)}run(){if(!this.active)return this.fn();let e=Es,t=mu;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=Es,Es=this,mu=!0,Fu=1<<++lv,lv<=dT?W9(this):$O(this),this.fn()}finally{lv<=dT&&q9(this),Fu=1<<--lv,Es=this.parent,mu=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){Es===this?this.deferStop=!0:this.active&&($O(this),this.onStop&&this.onStop(),this.active=!1)}}function $O(r){const{deps:e}=r;if(e.length){for(let t=0;t<e.length;t++)e[t].delete(r);e.length=0}}function Z9(r,e){r.effect&&(r=r.effect.fn);const t=new Qg(r);e&&(Kn(t,e),e.scope&&P2(t,e.scope)),(!e||!e.lazy)&&t.run();const n=t.run.bind(t);return n.effect=t,n}function J9(r){r.effect.stop()}let mu=!0;const Q2=[];function Qp(){Q2.push(mu),mu=!1}function Hp(){const r=Q2.pop();mu=r===void 0?!0:r}function Mo(r,e,t){if(mu&&Es){let n=pT.get(r);n||pT.set(r,n=new Map);let i=n.get(t);i||n.set(t,i=eI()),H2(i)}}function H2(r,e){let t=!1;lv<=dT?D2(r)||(r.n|=Fu,t=!U2(r)):t=!r.has(Es),t&&(r.add(Es),Es.deps.push(r))}function ll(r,e,t,n,i,a){const o=pT.get(r);if(!o)return;let s=[];if(e==="clear")s=[...o.values()];else if(t==="length"&&we(r)){const A=Al(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":we(r)?Jb(t)&&s.push(o.get("length")):(s.push(o.get($c)),ep(r)&&s.push(o.get(vT)));break;case"delete":we(r)||(s.push(o.get($c)),ep(r)&&s.push(o.get(vT)));break;case"set":ep(r)&&s.push(o.get($c));break}if(s.length===1)s[0]&&gT(s[0]);else{const A=[];for(const l of s)l&&A.push(...l);gT(eI(A))}}function gT(r,e){const t=we(r)?r:[...r];for(const n of t)n.computed&&VO(n);for(const n of t)n.computed||VO(n)}function VO(r,e){(r!==Es||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const t$=T1("__proto__,__v_isRef,__isVue"),G2=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(Jv)),e$=b1(),r$=b1(!1,!0),n$=b1(!0),i$=b1(!0,!0),jO=a$();function a$(){const r={};return["includes","indexOf","lastIndexOf"].forEach(e=>{r[e]=function(...t){const n=Lr(this);for(let a=0,o=this.length;a<o;a++)Mo(n,"get",a+"");const i=n[e](...t);return i===-1||i===!1?n[e](...t.map(Lr)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{r[e]=function(...t){Qp();const n=Lr(this)[e].apply(this,t);return Hp(),n}}),r}function b1(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?Y2:z2:e?K2:j2).get(n))return n;const o=we(n);if(!r&&o&&br(jO,i))return Reflect.get(jO,i,a);const s=Reflect.get(n,i,a);return(Jv(i)?G2.has(i):t$(i))||(r||Mo(n,"get",i),e)?s:Wi(s)?o&&Jb(i)?s:s.value:hn(s)?r?nI(s):Hg(s):s}}const o$=k2(),s$=k2(!0);function k2(r=!1){return function(t,n,i,a){let o=t[n];if(ih(o)&&Wi(o)&&!Wi(i))return!1;if(!r&&(!tg(i)&&!ih(i)&&(o=Lr(o),i=Lr(i)),!we(t)&&Wi(o)&&!Wi(i)))return o.value=i,!0;const s=we(t)&&Jb(n)?Number(n)<t.length:br(t,n),A=Reflect.set(t,n,i,a);return t===Lr(a)&&(s?_p(i,o)&&ll(t,"set",n,i):ll(t,"add",n,i)),A}}function A$(r,e){const t=br(r,e);r[e];const n=Reflect.deleteProperty(r,e);return n&&t&&ll(r,"delete",e,void 0),n}function l$(r,e){const t=Reflect.has(r,e);return(!Jv(e)||!G2.has(e))&&Mo(r,"has",e),t}function u$(r){return Mo(r,"iterate",we(r)?"length":$c),Reflect.ownKeys(r)}const $2={get:e$,set:o$,deleteProperty:A$,has:l$,ownKeys:u$},V2={get:n$,set(r,e){return!0},deleteProperty(r,e){return!0}},c$=Kn({},$2,{get:r$,set:s$}),h$=Kn({},V2,{get:i$}),rI=r=>r,I1=r=>Reflect.getPrototypeOf(r);function lm(r,e,t=!1,n=!1){r=r.__v_raw;const i=Lr(r),a=Lr(e);t||(e!==a&&Mo(i,"get",e),Mo(i,"get",a));const{has:o}=I1(i),s=n?rI:t?oI:eg;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 um(r,e=!1){const t=this.__v_raw,n=Lr(t),i=Lr(r);return e||(r!==i&&Mo(n,"has",r),Mo(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function cm(r,e=!1){return r=r.__v_raw,!e&&Mo(Lr(r),"iterate",$c),Reflect.get(r,"size",r)}function KO(r){r=Lr(r);const e=Lr(this);return I1(e).has.call(e,r)||(e.add(r),ll(e,"add",r,r)),this}function zO(r,e){e=Lr(e);const t=Lr(this),{has:n,get:i}=I1(t);let a=n.call(t,r);a||(r=Lr(r),a=n.call(t,r));const o=i.call(t,r);return t.set(r,e),a?_p(e,o)&&ll(t,"set",r,e):ll(t,"add",r,e),this}function YO(r){const e=Lr(this),{has:t,get:n}=I1(e);let i=t.call(e,r);i||(r=Lr(r),i=t.call(e,r)),n&&n.call(e,r);const a=e.delete(r);return i&&ll(e,"delete",r,void 0),a}function XO(){const r=Lr(this),e=r.size!==0,t=r.clear();return e&&ll(r,"clear",void 0,void 0),t}function hm(r,e){return function(n,i){const a=this,o=a.__v_raw,s=Lr(o),A=e?rI:r?oI:eg;return!r&&Mo(s,"iterate",$c),o.forEach((l,u)=>n.call(i,A(l),A(u),a))}}function fm(r,e,t){return function(...n){const i=this.__v_raw,a=Lr(i),o=ep(a),s=r==="entries"||r===Symbol.iterator&&o,A=r==="keys"&&o,l=i[r](...n),u=t?rI:e?oI:eg;return!e&&Mo(a,"iterate",A?vT:$c),{next(){const{value:c,done:h}=l.next();return h?{value:c,done:h}:{value:s?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function $l(r){return function(...e){return r==="delete"?!1:this}}function f$(){const r={get(a){return lm(this,a)},get size(){return cm(this)},has:um,add:KO,set:zO,delete:YO,clear:XO,forEach:hm(!1,!1)},e={get(a){return lm(this,a,!1,!0)},get size(){return cm(this)},has:um,add:KO,set:zO,delete:YO,clear:XO,forEach:hm(!1,!0)},t={get(a){return lm(this,a,!0)},get size(){return cm(this,!0)},has(a){return um.call(this,a,!0)},add:$l("add"),set:$l("set"),delete:$l("delete"),clear:$l("clear"),forEach:hm(!0,!1)},n={get(a){return lm(this,a,!0,!0)},get size(){return cm(this,!0)},has(a){return um.call(this,a,!0)},add:$l("add"),set:$l("set"),delete:$l("delete"),clear:$l("clear"),forEach:hm(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=fm(a,!1,!1),t[a]=fm(a,!0,!1),e[a]=fm(a,!1,!0),n[a]=fm(a,!0,!0)}),[r,t,e,n]}const[p$,d$,v$,g$]=f$();function F1(r,e){const t=e?r?g$:v$:r?d$:p$;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 y$={get:F1(!1,!1)},m$={get:F1(!1,!0)},_$={get:F1(!0,!1)},w$={get:F1(!0,!0)},j2=new WeakMap,K2=new WeakMap,z2=new WeakMap,Y2=new WeakMap;function E$(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function C$(r){return r.__v_skip||!Object.isExtensible(r)?0:E$($9(r))}function Hg(r){return ih(r)?r:L1(r,!1,$2,y$,j2)}function X2(r){return L1(r,!1,c$,m$,K2)}function nI(r){return L1(r,!0,V2,_$,z2)}function B$(r){return L1(r,!0,h$,w$,Y2)}function L1(r,e,t,n,i){if(!hn(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const a=i.get(r);if(a)return a;const o=C$(r);if(o===0)return r;const s=new Proxy(r,o===2?n:t);return i.set(r,s),s}function Vc(r){return ih(r)?Vc(r.__v_raw):!!(r&&r.__v_isReactive)}function ih(r){return!!(r&&r.__v_isReadonly)}function tg(r){return!!(r&&r.__v_isShallow)}function iI(r){return Vc(r)||ih(r)}function Lr(r){const e=r&&r.__v_raw;return e?Lr(e):r}function aI(r){return a_(r,"__v_skip",!0),r}const eg=r=>hn(r)?Hg(r):r,oI=r=>hn(r)?nI(r):r;function sI(r){mu&&Es&&(r=Lr(r),H2(r.dep||(r.dep=eI())))}function O1(r,e){r=Lr(r),r.dep&&gT(r.dep)}function Wi(r){return!!(r&&r.__v_isRef===!0)}function Gn(r){return W2(r,!1)}function T$(r){return W2(r,!0)}function W2(r,e){return Wi(r)?r:new S$(r,e)}class S${constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Lr(e),this._value=t?e:eg(e)}get value(){return sI(this),this._value}set value(e){const t=this.__v_isShallow||tg(e)||ih(e);e=t?e:Lr(e),_p(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:eg(e),O1(this))}}function x$(r){O1(r)}function q2(r){return Wi(r)?r.value:r}const b$={get:(r,e,t)=>q2(Reflect.get(r,e,t)),set:(r,e,t,n)=>{const i=r[e];return Wi(i)&&!Wi(t)?(i.value=t,!0):Reflect.set(r,e,t,n)}};function AI(r){return Vc(r)?r:new Proxy(r,b$)}class I${constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e(()=>sI(this),()=>O1(this));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function F$(r){return new I$(r)}function Lu(r){const e=we(r)?new Array(r.length):{};for(const t in r)e[t]=Z2(r,t);return e}class L${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 Z2(r,e,t){const n=r[e];return Wi(n)?n:new L$(r,e,t)}var J2;class O${constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[J2]=!1,this._dirty=!0,this.effect=new Qg(e,()=>{this._dirty||(this._dirty=!0,O1(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Lr(this);return sI(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}J2="__v_isReadonly";function R$(r,e,t=!1){let n,i;const a=je(r);return a?(n=r,i=Ts):(n=r.get,i=r.set),new O$(n,i,a||!i,t)}function M$(r,...e){}function JA(r,e,t,n){let i;try{i=n?r(...n):r()}catch(a){Eh(a,e,t)}return i}function Ro(r,e,t,n){if(je(r)){const a=JA(r,e,t,n);return a&&Zb(a)&&a.catch(o=>{Eh(o,e,t)}),a}const i=[];for(let a=0;a<r.length;a++)i.push(Ro(r[a],e,t,n));return i}function Eh(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){JA(A,null,10,[r,o,s]);return}}N$(r,t,i,n)}function N$(r,e,t,n=!0){console.error(r)}let rg=!1,yT=!1;const Ea=[];let zs=0;const np=[];let jA=null,Fc=0;const tD=Promise.resolve();let lI=null;function uI(r){const e=lI||tD;return r?e.then(this?r.bind(this):r):e}function P$(r){let e=zs+1,t=Ea.length;for(;e<t;){const n=e+t>>>1;ng(Ea[n])<r?e=n+1:t=n}return e}function R1(r){(!Ea.length||!Ea.includes(r,rg&&r.allowRecurse?zs+1:zs))&&(r.id==null?Ea.push(r):Ea.splice(P$(r.id),0,r),eD())}function eD(){!rg&&!yT&&(yT=!0,lI=tD.then(rD))}function U$(r){const e=Ea.indexOf(r);e>zs&&Ea.splice(e,1)}function cI(r){we(r)?np.push(...r):(!jA||!jA.includes(r,r.allowRecurse?Fc+1:Fc))&&np.push(r),eD()}function WO(r,e=rg?zs+1:0){for(;e<Ea.length;e++){const t=Ea[e];t&&t.pre&&(Ea.splice(e,1),e--,t())}}function o_(r){if(np.length){const e=[...new Set(np)];if(np.length=0,jA){jA.push(...e);return}for(jA=e,jA.sort((t,n)=>ng(t)-ng(n)),Fc=0;Fc<jA.length;Fc++)jA[Fc]();jA=null,Fc=0}}const ng=r=>r.id==null?1/0:r.id,D$=(r,e)=>{const t=ng(r)-ng(e);if(t===0){if(r.pre&&!e.pre)return-1;if(e.pre&&!r.pre)return 1}return t};function rD(r){yT=!1,rg=!0,Ea.sort(D$);const e=Ts;try{for(zs=0;zs<Ea.length;zs++){const t=Ea[zs];t&&t.active!==!1&&JA(t,null,14)}}finally{zs=0,Ea.length=0,o_(),rg=!1,lI=null,(Ea.length||np.length)&&rD()}}let Ff,pm=[];function nD(r,e){var t,n;Ff=r,Ff?(Ff.enabled=!0,pm.forEach(({event:i,args:a})=>Ff.emit(i,...a)),pm=[]):typeof window<"u"&&window.HTMLElement&&!(!((n=(t=window.navigator)===null||t===void 0?void 0:t.userAgent)===null||n===void 0)&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{nD(a,e)}),setTimeout(()=>{Ff||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,pm=[])},3e3)):pm=[]}function Q$(r,e,...t){if(r.isUnmounted)return;const n=r.vnode.props||nn;let i=t;const a=e.startsWith("update:"),o=a&&e.slice(7);if(o&&o in n){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:c,trim:h}=n[u]||nn;h&&(i=t.map(f=>Pn(f)?f.trim():f)),c&&(i=t.map(Al))}let s,A=n[s=Fv(e)]||n[s=Fv(so(e))];!A&&a&&(A=n[s=Fv(Wo(e))]),A&&Ro(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,Ro(l,r,6,i)}}function iD(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(!je(r)){const A=l=>{const u=iD(l,e,!0);u&&(s=!0,Kn(o,u))};!t&&e.mixins.length&&e.mixins.forEach(A),r.extends&&A(r.extends),r.mixins&&r.mixins.forEach(A)}return!a&&!s?(hn(r)&&n.set(r,null),null):(we(a)?a.forEach(A=>o[A]=null):Kn(o,a),hn(r)&&n.set(r,o),o)}function M1(r,e){return!r||!Pg(e)?!1:(e=e.slice(2).replace(/Once$/,""),br(r,e[0].toLowerCase()+e.slice(1))||br(r,Wo(e))||br(r,e))}let ia=null,N1=null;function ig(r){const e=ia;return ia=r,N1=r&&r.type.__scopeId||null,e}function aD(r){N1=r}function oD(){N1=null}const H$=r=>Nc;function Nc(r,e=ia,t){if(!e||r._n)return r;const n=(...i)=>{n._d&&TT(-1);const a=ig(e);let o;try{o=r(...i)}finally{ig(a),n._d&&TT(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function L0(r){const{type:e,vnode:t,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:A,emit:l,render:u,renderCache:c,data:h,setupState:f,ctx:p,inheritAttrs:v}=r;let m,g;const _=ig(r);try{if(t.shapeFlag&4){const B=i||n;m=bo(u.call(B,B,c,a,f,h,p)),g=A}else{const B=e;m=bo(B.length>1?B(a,{attrs:A,slots:s,emit:l}):B(a,null)),g=e.props?A:k$(A)}}catch(B){Rv.length=0,Eh(B,r,1),m=Wr(Ba)}let E=m;if(g&&v!==!1){const B=Object.keys(g),{shapeFlag:L}=E;B.length&&L&7&&(o&&B.some(Wb)&&(g=$$(g,o)),E=sA(E,g))}return t.dirs&&(E=sA(E),E.dirs=E.dirs?E.dirs.concat(t.dirs):t.dirs),t.transition&&(E.transition=t.transition),m=E,ig(_),m}function G$(r){let e;for(let t=0;t<r.length;t++){const n=r[t];if(Ou(n)){if(n.type!==Ba||n.children==="v-if"){if(e)return;e=n}}else return}return e}const k$=r=>{let e;for(const t in r)(t==="class"||t==="style"||Pg(t))&&((e||(e={}))[t]=r[t]);return e},$$=(r,e)=>{const t={};for(const n in r)(!Wb(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function V$(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?qO(n,o,l):!!o;if(A&8){const u=e.dynamicProps;for(let c=0;c<u.length;c++){const h=u[c];if(o[h]!==n[h]&&!M1(l,h))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:n===o?!1:n?o?qO(n,o,l):!0:!!o;return!1}function qO(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]&&!M1(t,a))return!0}return!1}function hI({vnode:r,parent:e},t){for(;e&&e.subTree===r;)(r=e.vnode).el=t,e=e.parent}const sD=r=>r.__isSuspense,j$={name:"Suspense",__isSuspense:!0,process(r,e,t,n,i,a,o,s,A,l){r==null?z$(e,t,n,i,a,o,s,A,l):Y$(r,e,t,n,i,o,s,A,l)},hydrate:X$,create:fI,normalize:W$},K$=j$;function ag(r,e){const t=r.props&&r.props[e];je(t)&&t()}function z$(r,e,t,n,i,a,o,s,A){const{p:l,o:{createElement:u}}=A,c=u("div"),h=r.suspense=fI(r,i,n,e,c,t,a,o,s,A);l(null,h.pendingBranch=r.ssContent,c,null,n,h,a,o),h.deps>0?(ag(r,"onPending"),ag(r,"onFallback"),l(null,r.ssFallback,e,t,n,null,a,o),ip(h,r.ssFallback)):h.resolve()}function Y$(r,e,t,n,i,a,o,s,{p:A,um:l,o:{createElement:u}}){const c=e.suspense=r.suspense;c.vnode=e,e.el=r.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:p,pendingBranch:v,isInFallback:m,isHydrating:g}=c;if(v)c.pendingBranch=h,Ys(h,v)?(A(v,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():m&&(A(p,f,t,n,i,null,a,o,s),ip(c,f))):(c.pendingId++,g?(c.isHydrating=!1,c.activeBranch=v):l(v,i,c),c.deps=0,c.effects.length=0,c.hiddenContainer=u("div"),m?(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():(A(p,f,t,n,i,null,a,o,s),ip(c,f))):p&&Ys(h,p)?(A(p,h,t,n,i,c,a,o,s),c.resolve(!0)):(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0&&c.resolve()));else if(p&&Ys(h,p))A(p,h,t,n,i,c,a,o,s),ip(c,h);else if(ag(e,"onPending"),c.pendingBranch=h,c.pendingId++,A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0)c.resolve();else{const{timeout:_,pendingId:E}=c;_>0?setTimeout(()=>{c.pendingId===E&&c.fallback(f)},_):_===0&&c.fallback(f)}}function fI(r,e,t,n,i,a,o,s,A,l,u=!1){const{p:c,m:h,um:f,n:p,o:{parentNode:v,remove:m}}=l,g=Al(r.props&&r.props.timeout),_={vnode:r,parent:e,parentComponent:t,isSVG:o,container:n,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof g=="number"?g:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(E=!1){const{vnode:B,activeBranch:L,pendingBranch:O,pendingId:b,effects:T,parentComponent:I,container:M}=_;if(_.isHydrating)_.isHydrating=!1;else if(!E){const N=L&&O.transition&&O.transition.mode==="out-in";N&&(L.transition.afterLeave=()=>{b===_.pendingId&&h(O,M,P,0)});let{anchor:P}=_;L&&(P=p(L),f(L,I,_,!0)),N||h(O,M,P,0)}ip(_,O),_.pendingBranch=null,_.isInFallback=!1;let x=_.parent,S=!1;for(;x;){if(x.pendingBranch){x.effects.push(...T),S=!0;break}x=x.parent}S||cI(T),_.effects=[],ag(B,"onResolve")},fallback(E){if(!_.pendingBranch)return;const{vnode:B,activeBranch:L,parentComponent:O,container:b,isSVG:T}=_;ag(B,"onFallback");const I=p(L),M=()=>{_.isInFallback&&(c(null,E,b,I,O,null,T,s,A),ip(_,E))},x=E.transition&&E.transition.mode==="out-in";x&&(L.transition.afterLeave=M),_.isInFallback=!0,f(L,O,null,!0),x||M()},move(E,B,L){_.activeBranch&&h(_.activeBranch,E,B,L),_.container=E},next(){return _.activeBranch&&p(_.activeBranch)},registerDep(E,B){const L=!!_.pendingBranch;L&&_.deps++;const O=E.vnode.el;E.asyncDep.catch(b=>{Eh(b,E,0)}).then(b=>{if(E.isUnmounted||_.isUnmounted||_.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:T}=E;ST(E,b,!1),O&&(T.el=O);const I=!O&&E.subTree.el;B(E,T,v(O||E.subTree.el),O?null:p(E.subTree),_,o,A),I&&m(I),hI(E,T.el),L&&--_.deps===0&&_.resolve()})},unmount(E,B){_.isUnmounted=!0,_.activeBranch&&f(_.activeBranch,t,E,B),_.pendingBranch&&f(_.pendingBranch,t,E,B)}};return _}function X$(r,e,t,n,i,a,o,s,A){const l=e.suspense=fI(e,n,t,r.parentNode,document.createElement("div"),null,i,a,o,s,!0),u=A(r,l.pendingBranch=e.ssContent,t,l,a,o);return l.deps===0&&l.resolve(),u}function W$(r){const{shapeFlag:e,children:t}=r,n=e&32;r.ssContent=ZO(n?t.default:t),r.ssFallback=n?ZO(t.fallback):Wr(Ba)}function ZO(r){let e;if(je(r)){const t=sh&&r._c;t&&(r._d=!1,cn()),r=r(),t&&(r._d=!0,e=oo,PD())}return we(r)&&(r=G$(r)),r=bo(r),e&&!r.dynamicChildren&&(r.dynamicChildren=e.filter(t=>t!==r)),r}function AD(r,e){e&&e.pendingBranch?we(r)?e.effects.push(...r):e.effects.push(r):cI(r)}function ip(r,e){r.activeBranch=e;const{vnode:t,parentComponent:n}=r,i=t.el=e.el;n&&n.subTree===t&&(n.vnode.el=i,hI(n,i))}function Mr(r,e){if(Ni){let t=Ni.provides;const n=Ni.parent&&Ni.parent.provides;n===t&&(t=Ni.provides=Object.create(n)),t[r]=e}}function Ce(r,e,t=!1){const n=Ni||ia;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&&je(e)?e.call(n.proxy):e}}function lD(r,e){return Gg(r,null,e)}function uD(r,e){return Gg(r,null,{flush:"post"})}function q$(r,e){return Gg(r,null,{flush:"sync"})}const dm={};function he(r,e,t){return Gg(r,e,t)}function Gg(r,e,{immediate:t,deep:n,flush:i,onTrack:a,onTrigger:o}=nn){const s=Ni;let A,l=!1,u=!1;if(Wi(r)?(A=()=>r.value,l=tg(r)):Vc(r)?(A=()=>r,n=!0):we(r)?(u=!0,l=r.some(E=>Vc(E)||tg(E)),A=()=>r.map(E=>{if(Wi(E))return E.value;if(Vc(E))return Pc(E);if(je(E))return JA(E,s,2)})):je(r)?e?A=()=>JA(r,s,2):A=()=>{if(!(s&&s.isUnmounted))return c&&c(),Ro(r,s,3,[h])}:A=Ts,e&&n){const E=A;A=()=>Pc(E())}let c,h=E=>{c=g.onStop=()=>{JA(E,s,4)}},f;if(Ep)if(h=Ts,e?t&&Ro(e,s,3,[A(),u?[]:void 0,h]):A(),i==="sync"){const E=XD();f=E.__watcherHandles||(E.__watcherHandles=[])}else return Ts;let p=u?new Array(r.length).fill(dm):dm;const v=()=>{if(g.active)if(e){const E=g.run();(n||l||(u?E.some((B,L)=>_p(B,p[L])):_p(E,p)))&&(c&&c(),Ro(e,s,3,[E,p===dm?void 0:u&&p[0]===dm?[]:p,h]),p=E)}else g.run()};v.allowRecurse=!!e;let m;i==="sync"?m=v:i==="post"?m=()=>ea(v,s&&s.suspense):(v.pre=!0,s&&(v.id=s.uid),m=()=>R1(v));const g=new Qg(A,m);e?t?v():p=g.run():i==="post"?ea(g.run.bind(g),s&&s.suspense):g.run();const _=()=>{g.stop(),s&&s.scope&&qb(s.scope.effects,g)};return f&&f.push(_),_}function Z$(r,e,t){const n=this.proxy,i=Pn(r)?r.includes(".")?cD(n,r):()=>n[r]:r.bind(n,n);let a;je(e)?a=e:(a=e.handler,t=e);const o=Ni;Ru(this);const s=Gg(i,a.bind(n),t);return o?Ru(o):_u(),s}function cD(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 Pc(r,e){if(!hn(r)||r.__v_skip||(e=e||new Set,e.has(r)))return r;if(e.add(r),Wi(r))Pc(r.value,e);else if(we(r))for(let t=0;t<r.length;t++)Pc(r[t],e);else if(wh(r)||ep(r))r.forEach(t=>{Pc(t,e)});else if(N2(r))for(const t in r)Pc(r[t],e);return r}function pI(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ze(()=>{r.isMounted=!0}),Q1(()=>{r.isUnmounting=!0}),r}const Vo=[Function,Array],J$={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Vo,onEnter:Vo,onAfterEnter:Vo,onEnterCancelled:Vo,onBeforeLeave:Vo,onLeave:Vo,onAfterLeave:Vo,onLeaveCancelled:Vo,onBeforeAppear:Vo,onAppear:Vo,onAfterAppear:Vo,onAppearCancelled:Vo},setup(r,{slots:e}){const t=Yu(),n=pI();let i;return()=>{const a=e.default&&P1(e.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const v of a)if(v.type!==Ba){o=v;break}}const s=Lr(r),{mode:A}=s;if(n.isLeaving)return ZE(o);const l=JO(o);if(!l)return ZE(o);const u=wp(l,s,n,t);ah(l,u);const c=t.subTree,h=c&&JO(c);let f=!1;const{getTransitionKey:p}=l.type;if(p){const v=p();i===void 0?i=v:v!==i&&(i=v,f=!0)}if(h&&h.type!==Ba&&(!Ys(l,h)||f)){const v=wp(h,s,n,t);if(ah(h,v),A==="out-in")return n.isLeaving=!0,v.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},ZE(o);A==="in-out"&&l.type!==Ba&&(v.delayLeave=(m,g,_)=>{const E=hD(n,h);E[String(h.key)]=h,m._leaveCb=()=>{g(),m._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=_})}return o}}},dI=J$;function hD(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 wp(r,e,t,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:A,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:c,onLeave:h,onAfterLeave:f,onLeaveCancelled:p,onBeforeAppear:v,onAppear:m,onAfterAppear:g,onAppearCancelled:_}=e,E=String(r.key),B=hD(t,r),L=(T,I)=>{T&&Ro(T,n,9,I)},O=(T,I)=>{const M=I[1];L(T,I),we(T)?T.every(x=>x.length<=1)&&M():T.length<=1&&M()},b={mode:a,persisted:o,beforeEnter(T){let I=s;if(!t.isMounted)if(i)I=v||s;else return;T._leaveCb&&T._leaveCb(!0);const M=B[E];M&&Ys(r,M)&&M.el._leaveCb&&M.el._leaveCb(),L(I,[T])},enter(T){let I=A,M=l,x=u;if(!t.isMounted)if(i)I=m||A,M=g||l,x=_||u;else return;let S=!1;const N=T._enterCb=P=>{S||(S=!0,P?L(x,[T]):L(M,[T]),b.delayedLeave&&b.delayedLeave(),T._enterCb=void 0)};I?O(I,[T,N]):N()},leave(T,I){const M=String(r.key);if(T._enterCb&&T._enterCb(!0),t.isUnmounting)return I();L(c,[T]);let x=!1;const S=T._leaveCb=N=>{x||(x=!0,I(),N?L(p,[T]):L(f,[T]),T._leaveCb=void 0,B[M]===r&&delete B[M])};B[M]=r,h?O(h,[T,S]):S()},clone(T){return wp(T,e,t,n)}};return b}function ZE(r){if(kg(r))return r=sA(r),r.children=null,r}function JO(r){return kg(r)?r.children?r.children[0]:void 0:r}function ah(r,e){r.shapeFlag&6&&r.component?ah(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 P1(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===Ri?(o.patchFlag&128&&i++,n=n.concat(P1(o.children,e,s))):(e||o.type!==Ba)&&n.push(s!=null?sA(o,{key:s}):o)}if(i>1)for(let a=0;a<n.length;a++)n[a].patchFlag=-2;return n}function vI(r){return je(r)?{setup:r,name:r.name}:r}const jc=r=>!!r.type.__asyncLoader;function tV(r){je(r)&&(r={loader:r});const{loader:e,loadingComponent:t,errorComponent:n,delay:i=200,timeout:a,suspensible:o=!0,onError:s}=r;let A=null,l,u=0;const c=()=>(u++,A=null,h()),h=()=>{let f;return A||(f=A=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),s)return new Promise((v,m)=>{s(p,()=>v(c()),()=>m(p),u+1)});throw p}).then(p=>f!==A&&A?A:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),l=p,p)))};return vI({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return l},setup(){const f=Ni;if(l)return()=>JE(l,f);const p=_=>{A=null,Eh(_,f,13,!n)};if(o&&f.suspense||Ep)return h().then(_=>()=>JE(_,f)).catch(_=>(p(_),()=>n?Wr(n,{error:_}):null));const v=Gn(!1),m=Gn(),g=Gn(!!i);return i&&setTimeout(()=>{g.value=!1},i),a!=null&&setTimeout(()=>{if(!v.value&&!m.value){const _=new Error(`Async component timed out after ${a}ms.`);p(_),m.value=_}},a),h().then(()=>{v.value=!0,f.parent&&kg(f.parent.vnode)&&R1(f.parent.update)}).catch(_=>{p(_),m.value=_}),()=>{if(v.value&&l)return JE(l,f);if(m.value&&n)return Wr(n,{error:m.value});if(t&&!g.value)return Wr(t)}}})}function JE(r,e){const{ref:t,props:n,children:i,ce:a}=e.vnode,o=Wr(r,n,i);return o.ref=t,o.ce=a,delete e.vnode.ce,o}const kg=r=>r.type.__isKeepAlive,eV={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:e}){const t=Yu(),n=t.ctx;if(!n.renderer)return()=>{const _=e.default&&e.default();return _&&_.length===1?_[0]:_};const i=new Map,a=new Set;let o=null;const s=t.suspense,{renderer:{p:A,m:l,um:u,o:{createElement:c}}}=n,h=c("div");n.activate=(_,E,B,L,O)=>{const b=_.component;l(_,E,B,0,s),A(b.vnode,_,E,B,b,s,L,_.slotScopeIds,O),ea(()=>{b.isDeactivated=!1,b.a&&rp(b.a);const T=_.props&&_.props.onVnodeMounted;T&&ro(T,b.parent,_)},s)},n.deactivate=_=>{const E=_.component;l(_,h,null,1,s),ea(()=>{E.da&&rp(E.da);const B=_.props&&_.props.onVnodeUnmounted;B&&ro(B,E.parent,_),E.isDeactivated=!0},s)};function f(_){tC(_),u(_,t,s,!0)}function p(_){i.forEach((E,B)=>{const L=bT(E.type);L&&(!_||!_(L))&&v(B)})}function v(_){const E=i.get(_);!o||E.type!==o.type?f(E):o&&tC(o),i.delete(_),a.delete(_)}he(()=>[r.include,r.exclude],([_,E])=>{_&&p(B=>uv(_,B)),E&&p(B=>!uv(E,B))},{flush:"post",deep:!0});let m=null;const g=()=>{m!=null&&i.set(m,eC(t.subTree))};return Ze(g),D1(g),Q1(()=>{i.forEach(_=>{const{subTree:E,suspense:B}=t,L=eC(E);if(_.type===L.type){tC(L);const O=L.component.da;O&&ea(O,B);return}f(_)})}),()=>{if(m=null,!e.default)return null;const _=e.default(),E=_[0];if(_.length>1)return o=null,_;if(!Ou(E)||!(E.shapeFlag&4)&&!(E.shapeFlag&128))return o=null,E;let B=eC(E);const L=B.type,O=bT(jc(B)?B.type.__asyncResolved||{}:L),{include:b,exclude:T,max:I}=r;if(b&&(!O||!uv(b,O))||T&&O&&uv(T,O))return o=B,E;const M=B.key==null?L:B.key,x=i.get(M);return B.el&&(B=sA(B),E.shapeFlag&128&&(E.ssContent=B)),m=M,x?(B.el=x.el,B.component=x.component,B.transition&&ah(B,B.transition),B.shapeFlag|=512,a.delete(M),a.add(M)):(a.add(M),I&&a.size>parseInt(I,10)&&v(a.values().next().value)),B.shapeFlag|=256,o=B,sD(E.type)?E:B}}},rV=eV;function uv(r,e){return we(r)?r.some(t=>uv(t,e)):Pn(r)?r.split(",").includes(e):r.test?r.test(e):!1}function fD(r,e){dD(r,"a",e)}function pD(r,e){dD(r,"da",e)}function dD(r,e,t=Ni){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if(U1(e,n,t),t){let i=t.parent;for(;i&&i.parent;)kg(i.parent.vnode)&&nV(n,e,t,i),i=i.parent}}function nV(r,e,t,n){const i=U1(e,r,n,!0);ir(()=>{qb(n[e],i)},t)}function tC(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function eC(r){return r.shapeFlag&128?r.ssContent:r}function U1(r,e,t=Ni,n=!1){if(t){const i=t[r]||(t[r]=[]),a=e.__weh||(e.__weh=(...o)=>{if(t.isUnmounted)return;Qp(),Ru(t);const s=Ro(e,t,r,o);return _u(),Hp(),s});return n?i.unshift(a):i.push(a),a}}const gl=r=>(e,t=Ni)=>(!Ep||r==="sp")&&U1(r,(...n)=>e(...n),t),vD=gl("bm"),Ze=gl("m"),gD=gl("bu"),D1=gl("u"),Q1=gl("bum"),ir=gl("um"),yD=gl("sp"),mD=gl("rtg"),_D=gl("rtc");function wD(r,e=Ni){U1("ec",r,e)}function iV(r,e){const t=ia;if(t===null)return r;const n=G1(t)||t.proxy,i=r.dirs||(r.dirs=[]);for(let a=0;a<e.length;a++){let[o,s,A,l=nn]=e[a];o&&(je(o)&&(o={mounted:o,updated:o}),o.deep&&Pc(s),i.push({dir:o,instance:n,value:s,oldValue:void 0,arg:A,modifiers:l}))}return r}function js(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&&(Qp(),Ro(A,t,8,[r.el,s,r,e]),Hp())}}const gI="components",aV="directives";function Lf(r,e){return yI(gI,r,!0,e)||r}const ED=Symbol();function oV(r){return Pn(r)?yI(gI,r,!1)||r:r||ED}function sV(r){return yI(aV,r)}function yI(r,e,t=!0,n=!1){const i=ia||Ni;if(i){const a=i.type;if(r===gI){const s=bT(a,!1);if(s&&(s===e||s===so(e)||s===Dg(so(e))))return a}const o=tR(i[r]||a[r],e)||tR(i.appContext[r],e);return!o&&n?a:o}}function tR(r,e){return r&&(r[e]||r[so(e)]||r[Dg(so(e))])}function CD(r,e,t,n){let i;const a=t&&t[n];if(we(r)||Pn(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(hn(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 AV(r,e){for(let t=0;t<e.length;t++){const n=e[t];if(we(n))for(let i=0;i<n.length;i++)r[n[i].name]=n[i].fn;else n&&(r[n.name]=n.key?(...i)=>{const a=n.fn(...i);return a&&(a.key=n.key),a}:n.fn)}return r}function mr(r,e,t={},n,i){if(ia.isCE||ia.parent&&jc(ia.parent)&&ia.parent.isCE)return e!=="default"&&(t.name=e),Wr("slot",t,n&&n());let a=r[e];a&&a._c&&(a._d=!1),cn();const o=a&&BD(a(t)),s=$g(Ri,{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 BD(r){return r.some(e=>Ou(e)?!(e.type===Ba||e.type===Ri&&!BD(e.children)):!0)?r:null}function lV(r,e){const t={};for(const n in r)t[e&&/[A-Z]/.test(n)?`on:${n}`:Fv(n)]=r[n];return t}const mT=r=>r?kD(r)?G1(r)||r.proxy:mT(r.parent):null,Lv=Kn(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=>mT(r.parent),$root:r=>mT(r.root),$emit:r=>r.emit,$options:r=>mI(r),$forceUpdate:r=>r.f||(r.f=()=>R1(r.update)),$nextTick:r=>r.n||(r.n=uI.bind(r.proxy)),$watch:r=>Z$.bind(r)}),rC=(r,e)=>r!==nn&&!r.__isScriptSetup&&br(r,e),_T={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(rC(n,e))return o[e]=1,n[e];if(i!==nn&&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!==nn&&br(t,e))return o[e]=4,t[e];wT&&(o[e]=0)}}const u=Lv[e];let c,h;if(u)return e==="$attrs"&&Mo(r,"get",e),u(r);if((c=s.__cssModules)&&(c=c[e]))return c;if(t!==nn&&br(t,e))return o[e]=4,t[e];if(h=A.config.globalProperties,br(h,e))return h[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:a}=r;return rC(i,e)?(i[e]=t,!0):n!==nn&&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!==nn&&br(r,o)||rC(e,o)||(s=a[0])&&br(s,o)||br(n,o)||br(Lv,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)}},uV=Kn({},_T,{get(r,e){if(e!==Symbol.unscopables)return _T.get(r,e,r)},has(r,e){return e[0]!=="_"&&!L9(e)}});let wT=!0;function cV(r){const e=mI(r),t=r.proxy,n=r.ctx;wT=!1,e.beforeCreate&&eR(e.beforeCreate,r,"bc");const{data:i,computed:a,methods:o,watch:s,provide:A,inject:l,created:u,beforeMount:c,mounted:h,beforeUpdate:f,updated:p,activated:v,deactivated:m,beforeDestroy:g,beforeUnmount:_,destroyed:E,unmounted:B,render:L,renderTracked:O,renderTriggered:b,errorCaptured:T,serverPrefetch:I,expose:M,inheritAttrs:x,components:S,directives:N,filters:P}=e;if(l&&hV(l,n,null,r.appContext.config.unwrapInjectedRef),o)for(const tt in o){const J=o[tt];je(J)&&(n[tt]=J.bind(t))}if(i){const tt=i.call(t,t);hn(tt)&&(r.data=Hg(tt))}if(wT=!0,a)for(const tt in a){const J=a[tt],nt=je(J)?J.bind(t,t):je(J.get)?J.get.bind(t,t):Ts,it=!je(J)&&je(J.set)?J.set.bind(t):Ts,_t=hr({get:nt,set:it});Object.defineProperty(n,tt,{enumerable:!0,configurable:!0,get:()=>_t.value,set:R=>_t.value=R})}if(s)for(const tt in s)TD(s[tt],n,t,tt);if(A){const tt=je(A)?A.call(t):A;Reflect.ownKeys(tt).forEach(J=>{Mr(J,tt[J])})}u&&eR(u,r,"c");function z(tt,J){we(J)?J.forEach(nt=>tt(nt.bind(t))):J&&tt(J.bind(t))}if(z(vD,c),z(Ze,h),z(gD,f),z(D1,p),z(fD,v),z(pD,m),z(wD,T),z(_D,O),z(mD,b),z(Q1,_),z(ir,B),z(yD,I),we(M))if(M.length){const tt=r.exposed||(r.exposed={});M.forEach(J=>{Object.defineProperty(tt,J,{get:()=>t[J],set:nt=>t[J]=nt})})}else r.exposed||(r.exposed={});L&&r.render===Ts&&(r.render=L),x!=null&&(r.inheritAttrs=x),S&&(r.components=S),N&&(r.directives=N)}function hV(r,e,t=Ts,n=!1){we(r)&&(r=ET(r));for(const i in r){const a=r[i];let o;hn(a)?"default"in a?o=Ce(a.from||i,a.default,!0):o=Ce(a.from||i):o=Ce(a),Wi(o)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):e[i]=o}}function eR(r,e,t){Ro(we(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function TD(r,e,t,n){const i=n.includes(".")?cD(t,n):()=>t[n];if(Pn(r)){const a=e[r];je(a)&&he(i,a)}else if(je(r))he(i,r.bind(t));else if(hn(r))if(we(r))r.forEach(a=>TD(a,e,t,n));else{const a=je(r.handler)?r.handler.bind(t):e[r.handler];je(a)&&he(i,a,r)}}function mI(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=>s_(A,l,o,!0)),s_(A,e,o)),hn(e)&&a.set(e,A),A}function s_(r,e,t,n=!1){const{mixins:i,extends:a}=e;a&&s_(r,a,t,!0),i&&i.forEach(o=>s_(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const s=fV[o]||t&&t[o];r[o]=s?s(r[o],e[o]):e[o]}return r}const fV={data:rR,props:Tc,emits:Tc,methods:Tc,computed:Tc,beforeCreate:Ra,created:Ra,beforeMount:Ra,mounted:Ra,beforeUpdate:Ra,updated:Ra,beforeDestroy:Ra,beforeUnmount:Ra,destroyed:Ra,unmounted:Ra,activated:Ra,deactivated:Ra,errorCaptured:Ra,serverPrefetch:Ra,components:Tc,directives:Tc,watch:dV,provide:rR,inject:pV};function rR(r,e){return e?r?function(){return Kn(je(r)?r.call(this,this):r,je(e)?e.call(this,this):e)}:e:r}function pV(r,e){return Tc(ET(r),ET(e))}function ET(r){if(we(r)){const e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return r}function Ra(r,e){return r?[...new Set([].concat(r,e))]:e}function Tc(r,e){return r?Kn(Kn(Object.create(null),r),e):e}function dV(r,e){if(!r)return e;if(!e)return r;const t=Kn(Object.create(null),r);for(const n in e)t[n]=Ra(r[n],e[n]);return t}function vV(r,e,t,n=!1){const i={},a={};a_(a,H1,1),r.propsDefaults=Object.create(null),SD(r,e,i,a);for(const o in r.propsOptions[0])o in i||(i[o]=void 0);t?r.props=n?i:X2(i):r.type.props?r.props=i:r.props=a,r.attrs=a}function gV(r,e,t,n){const{props:i,attrs:a,vnode:{patchFlag:o}}=r,s=Lr(i),[A]=r.propsOptions;let l=!1;if((n||o>0)&&!(o&16)){if(o&8){const u=r.vnode.dynamicProps;for(let c=0;c<u.length;c++){let h=u[c];if(M1(r.emitsOptions,h))continue;const f=e[h];if(A)if(br(a,h))f!==a[h]&&(a[h]=f,l=!0);else{const p=so(h);i[p]=CT(A,s,p,f,r,!1)}else f!==a[h]&&(a[h]=f,l=!0)}}}else{SD(r,e,i,a)&&(l=!0);let u;for(const c in s)(!e||!br(e,c)&&((u=Wo(c))===c||!br(e,u)))&&(A?t&&(t[c]!==void 0||t[u]!==void 0)&&(i[c]=CT(A,s,c,void 0,r,!0)):delete i[c]);if(a!==s)for(const c in a)(!e||!br(e,c))&&(delete a[c],l=!0)}l&&ll(r,"set","$attrs")}function SD(r,e,t,n){const[i,a]=r.propsOptions;let o=!1,s;if(e)for(let A in e){if(Iv(A))continue;const l=e[A];let u;i&&br(i,u=so(A))?!a||!a.includes(u)?t[u]=l:(s||(s={}))[u]=l:M1(r.emitsOptions,A)||(!(A in n)||l!==n[A])&&(n[A]=l,o=!0)}if(a){const A=Lr(t),l=s||nn;for(let u=0;u<a.length;u++){const c=a[u];t[c]=CT(i,A,c,l[c],r,!br(l,c))}}return o}function CT(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&&je(A)){const{propsDefaults:l}=i;t in l?n=l[t]:(Ru(i),n=l[t]=A.call(null,e),_u())}else n=A}o[0]&&(a&&!s?n=!1:o[1]&&(n===""||n===Wo(t))&&(n=!0))}return n}function xD(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(!je(r)){const u=c=>{A=!0;const[h,f]=xD(c,e,!0);Kn(o,h),f&&s.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}if(!a&&!A)return hn(r)&&n.set(r,tp),tp;if(we(a))for(let u=0;u<a.length;u++){const c=so(a[u]);nR(c)&&(o[c]=nn)}else if(a)for(const u in a){const c=so(u);if(nR(c)){const h=a[u],f=o[c]=we(h)||je(h)?{type:h}:Object.assign({},h);if(f){const p=oR(Boolean,f.type),v=oR(String,f.type);f[0]=p>-1,f[1]=v<0||p<v,(p>-1||br(f,"default"))&&s.push(c)}}}const l=[o,s];return hn(r)&&n.set(r,l),l}function nR(r){return r[0]!=="$"}function iR(r){const e=r&&r.toString().match(/^\s*function (\w+)/);return e?e[1]:r===null?"null":""}function aR(r,e){return iR(r)===iR(e)}function oR(r,e){return we(e)?e.findIndex(t=>aR(t,r)):je(e)&&aR(e,r)?0:-1}const bD=r=>r[0]==="_"||r==="$stable",_I=r=>we(r)?r.map(bo):[bo(r)],yV=(r,e,t)=>{if(e._n)return e;const n=Nc((...i)=>_I(e(...i)),t);return n._c=!1,n},ID=(r,e,t)=>{const n=r._ctx;for(const i in r){if(bD(i))continue;const a=r[i];if(je(a))e[i]=yV(i,a,n);else if(a!=null){const o=_I(a);e[i]=()=>o}}},FD=(r,e)=>{const t=_I(e);r.slots.default=()=>t},mV=(r,e)=>{if(r.vnode.shapeFlag&32){const t=e._;t?(r.slots=Lr(e),a_(e,"_",t)):ID(e,r.slots={})}else r.slots={},e&&FD(r,e);a_(r.slots,H1,1)},_V=(r,e,t)=>{const{vnode:n,slots:i}=r;let a=!0,o=nn;if(n.shapeFlag&32){const s=e._;s?t&&s===1?a=!1:(Kn(i,e),!t&&s===1&&delete i._):(a=!e.$stable,ID(e,i)),o=e}else e&&(FD(r,e),o={default:1});if(a)for(const s in i)!bD(s)&&!(s in o)&&delete i[s]};function LD(){return{app:null,config:{isNativeTag:H9,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 wV=0;function EV(r,e){return function(n,i=null){je(n)||(n=Object.assign({},n)),i!=null&&!hn(i)&&(i=null);const a=LD(),o=new Set;let s=!1;const A=a.app={_uid:wV++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:qD,get config(){return a.config},set config(l){},use(l,...u){return o.has(l)||(l&&je(l.install)?(o.add(l),l.install(A,...u)):je(l)&&(o.add(l),l(A,...u))),A},mixin(l){return a.mixins.includes(l)||a.mixins.push(l),A},component(l,u){return u?(a.components[l]=u,A):a.components[l]},directive(l,u){return u?(a.directives[l]=u,A):a.directives[l]},mount(l,u,c){if(!s){const h=Wr(n,i);return h.appContext=a,u&&e?e(h,l):r(h,l,c),s=!0,A._container=l,l.__vue_app__=A,G1(h.component)||h.component.proxy}},unmount(){s&&(r(null,A._container),delete A._container.__vue_app__)},provide(l,u){return a.provides[l]=u,A}};return A}}function A_(r,e,t,n,i=!1){if(we(r)){r.forEach((h,f)=>A_(h,e&&(we(e)?e[f]:e),t,n,i));return}if(jc(n)&&!i)return;const a=n.shapeFlag&4?G1(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:A}=r,l=e&&e.r,u=s.refs===nn?s.refs={}:s.refs,c=s.setupState;if(l!=null&&l!==A&&(Pn(l)?(u[l]=null,br(c,l)&&(c[l]=null)):Wi(l)&&(l.value=null)),je(A))JA(A,s,12,[o,u]);else{const h=Pn(A),f=Wi(A);if(h||f){const p=()=>{if(r.f){const v=h?br(c,A)?c[A]:u[A]:A.value;i?we(v)&&qb(v,a):we(v)?v.includes(a)||v.push(a):h?(u[A]=[a],br(c,A)&&(c[A]=u[A])):(A.value=[a],r.k&&(u[r.k]=A.value))}else h?(u[A]=o,br(c,A)&&(c[A]=o)):f&&(A.value=o,r.k&&(u[r.k]=o))};o?(p.id=-1,ea(p,t)):p()}}}let Vl=!1;const vm=r=>/svg/.test(r.namespaceURI)&&r.tagName!=="foreignObject",gm=r=>r.nodeType===8;function CV(r){const{mt:e,p:t,o:{patchProp:n,createText:i,nextSibling:a,parentNode:o,remove:s,insert:A,createComment:l}}=r,u=(g,_)=>{if(!_.hasChildNodes()){t(null,g,_),o_(),_._vnode=g;return}Vl=!1,c(_.firstChild,g,null,null,null),o_(),_._vnode=g,Vl&&console.error("Hydration completed but contains mismatches.")},c=(g,_,E,B,L,O=!1)=>{const b=gm(g)&&g.data==="[",T=()=>v(g,_,E,B,L,b),{type:I,ref:M,shapeFlag:x,patchFlag:S}=_;let N=g.nodeType;_.el=g,S===-2&&(O=!1,_.dynamicChildren=null);let P=null;switch(I){case oh:N!==3?_.children===""?(A(_.el=i(""),o(g),g),P=g):P=T():(g.data!==_.children&&(Vl=!0,g.data=_.children),P=a(g));break;case Ba:N!==8||b?P=T():P=a(g);break;case Kc:if(b&&(g=a(g),N=g.nodeType),N===1||N===3){P=g;const X=!_.children.length;for(let z=0;z<_.staticCount;z++)X&&(_.children+=P.nodeType===1?P.outerHTML:P.data),z===_.staticCount-1&&(_.anchor=P),P=a(P);return b?a(P):P}else T();break;case Ri:b?P=p(g,_,E,B,L,O):P=T();break;default:if(x&1)N!==1||_.type.toLowerCase()!==g.tagName.toLowerCase()?P=T():P=h(g,_,E,B,L,O);else if(x&6){_.slotScopeIds=L;const X=o(g);if(e(_,X,null,E,B,vm(X),O),P=b?m(g):a(g),P&&gm(P)&&P.data==="teleport end"&&(P=a(P)),jc(_)){let z;b?(z=Wr(Ri),z.anchor=P?P.previousSibling:X.lastChild):z=g.nodeType===3?EI(""):Wr("div"),z.el=g,_.component.subTree=z}}else x&64?N!==8?P=T():P=_.type.hydrate(g,_,E,B,L,O,r,f):x&128&&(P=_.type.hydrate(g,_,E,B,vm(o(g)),L,O,r,c))}return M!=null&&A_(M,null,B,_),P},h=(g,_,E,B,L,O)=>{O=O||!!_.dynamicChildren;const{type:b,props:T,patchFlag:I,shapeFlag:M,dirs:x}=_,S=b==="input"&&x||b==="option";if(S||I!==-1){if(x&&js(_,null,E,"created"),T)if(S||!O||I&48)for(const P in T)(S&&P.endsWith("value")||Pg(P)&&!Iv(P))&&n(g,P,null,T[P],!1,void 0,E);else T.onClick&&n(g,"onClick",null,T.onClick,!1,void 0,E);let N;if((N=T&&T.onVnodeBeforeMount)&&ro(N,E,_),x&&js(_,null,E,"beforeMount"),((N=T&&T.onVnodeMounted)||x)&&AD(()=>{N&&ro(N,E,_),x&&js(_,null,E,"mounted")},B),M&16&&!(T&&(T.innerHTML||T.textContent))){let P=f(g.firstChild,_,g,E,B,L,O);for(;P;){Vl=!0;const X=P;P=P.nextSibling,s(X)}}else M&8&&g.textContent!==_.children&&(Vl=!0,g.textContent=_.children)}return g.nextSibling},f=(g,_,E,B,L,O,b)=>{b=b||!!_.dynamicChildren;const T=_.children,I=T.length;for(let M=0;M<I;M++){const x=b?T[M]:T[M]=bo(T[M]);if(g)g=c(g,x,B,L,O,b);else{if(x.type===oh&&!x.children)continue;Vl=!0,t(null,x,E,null,B,L,vm(E),O)}}return g},p=(g,_,E,B,L,O)=>{const{slotScopeIds:b}=_;b&&(L=L?L.concat(b):b);const T=o(g),I=f(a(g),_,T,E,B,L,O);return I&&gm(I)&&I.data==="]"?a(_.anchor=I):(Vl=!0,A(_.anchor=l("]"),T,I),I)},v=(g,_,E,B,L,O)=>{if(Vl=!0,_.el=null,O){const I=m(g);for(;;){const M=a(g);if(M&&M!==I)s(M);else break}}const b=a(g),T=o(g);return s(g),t(null,_,T,b,E,B,vm(T),L),b},m=g=>{let _=0;for(;g;)if(g=a(g),g&&gm(g)&&(g.data==="["&&_++,g.data==="]")){if(_===0)return a(g);_--}return g};return[u,c]}const ea=AD;function OD(r){return MD(r)}function RD(r){return MD(r,CV)}function MD(r,e){const t=K9();t.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:s,createComment:A,setText:l,setElementText:u,parentNode:c,nextSibling:h,setScopeId:f=Ts,insertStaticContent:p}=r,v=(j,Z,ut,rt=null,G=null,xt=null,bt=!1,dt=null,Et=!!Z.dynamicChildren)=>{if(j===Z)return;j&&!Ys(j,Z)&&(rt=vt(j),R(j,G,xt,!0),j=null),Z.patchFlag===-2&&(Et=!1,Z.dynamicChildren=null);const{type:yt,ref:St,shapeFlag:Ft}=Z;switch(yt){case oh:m(j,Z,ut,rt);break;case Ba:g(j,Z,ut,rt);break;case Kc:j==null&&_(Z,ut,rt,bt);break;case Ri:S(j,Z,ut,rt,G,xt,bt,dt,Et);break;default:Ft&1?L(j,Z,ut,rt,G,xt,bt,dt,Et):Ft&6?N(j,Z,ut,rt,G,xt,bt,dt,Et):(Ft&64||Ft&128)&&yt.process(j,Z,ut,rt,G,xt,bt,dt,Et,W)}St!=null&&G&&A_(St,j&&j.ref,xt,Z||j,!Z)},m=(j,Z,ut,rt)=>{if(j==null)n(Z.el=s(Z.children),ut,rt);else{const G=Z.el=j.el;Z.children!==j.children&&l(G,Z.children)}},g=(j,Z,ut,rt)=>{j==null?n(Z.el=A(Z.children||""),ut,rt):Z.el=j.el},_=(j,Z,ut,rt)=>{[j.el,j.anchor]=p(j.children,Z,ut,rt,j.el,j.anchor)},E=({el:j,anchor:Z},ut,rt)=>{let G;for(;j&&j!==Z;)G=h(j),n(j,ut,rt),j=G;n(Z,ut,rt)},B=({el:j,anchor:Z})=>{let ut;for(;j&&j!==Z;)ut=h(j),i(j),j=ut;i(Z)},L=(j,Z,ut,rt,G,xt,bt,dt,Et)=>{bt=bt||Z.type==="svg",j==null?O(Z,ut,rt,G,xt,bt,dt,Et):I(j,Z,G,xt,bt,dt,Et)},O=(j,Z,ut,rt,G,xt,bt,dt)=>{let Et,yt;const{type:St,props:Ft,shapeFlag:Mt,transition:Vt,dirs:Yt}=j;if(Et=j.el=o(j.type,xt,Ft&&Ft.is,Ft),Mt&8?u(Et,j.children):Mt&16&&T(j.children,Et,null,rt,G,xt&&St!=="foreignObject",bt,dt),Yt&&js(j,null,rt,"created"),Ft){for(const ee in Ft)ee!=="value"&&!Iv(ee)&&a(Et,ee,null,Ft[ee],xt,j.children,rt,G,at);"value"in Ft&&a(Et,"value",null,Ft.value),(yt=Ft.onVnodeBeforeMount)&&ro(yt,rt,j)}b(Et,j,j.scopeId,bt,rt),Yt&&js(j,null,rt,"beforeMount");const ie=(!G||G&&!G.pendingBranch)&&Vt&&!Vt.persisted;ie&&Vt.beforeEnter(Et),n(Et,Z,ut),((yt=Ft&&Ft.onVnodeMounted)||ie||Yt)&&ea(()=>{yt&&ro(yt,rt,j),ie&&Vt.enter(Et),Yt&&js(j,null,rt,"mounted")},G)},b=(j,Z,ut,rt,G)=>{if(ut&&f(j,ut),rt)for(let xt=0;xt<rt.length;xt++)f(j,rt[xt]);if(G){let xt=G.subTree;if(Z===xt){const bt=G.vnode;b(j,bt,bt.scopeId,bt.slotScopeIds,G.parent)}}},T=(j,Z,ut,rt,G,xt,bt,dt,Et=0)=>{for(let yt=Et;yt<j.length;yt++){const St=j[yt]=dt?au(j[yt]):bo(j[yt]);v(null,St,Z,ut,rt,G,xt,bt,dt)}},I=(j,Z,ut,rt,G,xt,bt)=>{const dt=Z.el=j.el;let{patchFlag:Et,dynamicChildren:yt,dirs:St}=Z;Et|=j.patchFlag&16;const Ft=j.props||nn,Mt=Z.props||nn;let Vt;ut&&hc(ut,!1),(Vt=Mt.onVnodeBeforeUpdate)&&ro(Vt,ut,Z,j),St&&js(Z,j,ut,"beforeUpdate"),ut&&hc(ut,!0);const Yt=G&&Z.type!=="foreignObject";if(yt?M(j.dynamicChildren,yt,dt,ut,rt,Yt,xt):bt||J(j,Z,dt,null,ut,rt,Yt,xt,!1),Et>0){if(Et&16)x(dt,Z,Ft,Mt,ut,rt,G);else if(Et&2&&Ft.class!==Mt.class&&a(dt,"class",null,Mt.class,G),Et&4&&a(dt,"style",Ft.style,Mt.style,G),Et&8){const ie=Z.dynamicProps;for(let ee=0;ee<ie.length;ee++){const Xt=ie[ee],oe=Ft[Xt],Kt=Mt[Xt];(Kt!==oe||Xt==="value")&&a(dt,Xt,oe,Kt,G,j.children,ut,rt,at)}}Et&1&&j.children!==Z.children&&u(dt,Z.children)}else!bt&&yt==null&&x(dt,Z,Ft,Mt,ut,rt,G);((Vt=Mt.onVnodeUpdated)||St)&&ea(()=>{Vt&&ro(Vt,ut,Z,j),St&&js(Z,j,ut,"updated")},rt)},M=(j,Z,ut,rt,G,xt,bt)=>{for(let dt=0;dt<Z.length;dt++){const Et=j[dt],yt=Z[dt],St=Et.el&&(Et.type===Ri||!Ys(Et,yt)||Et.shapeFlag&70)?c(Et.el):ut;v(Et,yt,St,null,rt,G,xt,bt,!0)}},x=(j,Z,ut,rt,G,xt,bt)=>{if(ut!==rt){if(ut!==nn)for(const dt in ut)!Iv(dt)&&!(dt in rt)&&a(j,dt,ut[dt],null,bt,Z.children,G,xt,at);for(const dt in rt){if(Iv(dt))continue;const Et=rt[dt],yt=ut[dt];Et!==yt&&dt!=="value"&&a(j,dt,yt,Et,bt,Z.children,G,xt,at)}"value"in rt&&a(j,"value",ut.value,rt.value)}},S=(j,Z,ut,rt,G,xt,bt,dt,Et)=>{const yt=Z.el=j?j.el:s(""),St=Z.anchor=j?j.anchor:s("");let{patchFlag:Ft,dynamicChildren:Mt,slotScopeIds:Vt}=Z;Vt&&(dt=dt?dt.concat(Vt):Vt),j==null?(n(yt,ut,rt),n(St,ut,rt),T(Z.children,ut,St,G,xt,bt,dt,Et)):Ft>0&&Ft&64&&Mt&&j.dynamicChildren?(M(j.dynamicChildren,Mt,ut,G,xt,bt,dt),(Z.key!=null||G&&Z===G.subTree)&&wI(j,Z,!0)):J(j,Z,ut,St,G,xt,bt,dt,Et)},N=(j,Z,ut,rt,G,xt,bt,dt,Et)=>{Z.slotScopeIds=dt,j==null?Z.shapeFlag&512?G.ctx.activate(Z,ut,rt,bt,Et):P(Z,ut,rt,G,xt,bt,Et):X(j,Z,Et)},P=(j,Z,ut,rt,G,xt,bt)=>{const dt=j.component=GD(j,rt,G);if(kg(j)&&(dt.ctx.renderer=W),$D(dt),dt.asyncDep){if(G&&G.registerDep(dt,z),!j.el){const Et=dt.subTree=Wr(Ba);g(null,Et,Z,ut)}return}z(dt,j,Z,ut,G,xt,bt)},X=(j,Z,ut)=>{const rt=Z.component=j.component;if(V$(j,Z,ut))if(rt.asyncDep&&!rt.asyncResolved){tt(rt,Z,ut);return}else rt.next=Z,U$(rt.update),rt.update();else Z.el=j.el,rt.vnode=Z},z=(j,Z,ut,rt,G,xt,bt)=>{const dt=()=>{if(j.isMounted){let{next:St,bu:Ft,u:Mt,parent:Vt,vnode:Yt}=j,ie=St,ee;hc(j,!1),St?(St.el=Yt.el,tt(j,St,bt)):St=Yt,Ft&&rp(Ft),(ee=St.props&&St.props.onVnodeBeforeUpdate)&&ro(ee,Vt,St,Yt),hc(j,!0);const Xt=L0(j),oe=j.subTree;j.subTree=Xt,v(oe,Xt,c(oe.el),vt(oe),j,G,xt),St.el=Xt.el,ie===null&&hI(j,Xt.el),Mt&&ea(Mt,G),(ee=St.props&&St.props.onVnodeUpdated)&&ea(()=>ro(ee,Vt,St,Yt),G)}else{let St;const{el:Ft,props:Mt}=Z,{bm:Vt,m:Yt,parent:ie}=j,ee=jc(Z);if(hc(j,!1),Vt&&rp(Vt),!ee&&(St=Mt&&Mt.onVnodeBeforeMount)&&ro(St,ie,Z),hc(j,!0),Ft&&Ot){const Xt=()=>{j.subTree=L0(j),Ot(Ft,j.subTree,j,G,null)};ee?Z.type.__asyncLoader().then(()=>!j.isUnmounted&&Xt()):Xt()}else{const Xt=j.subTree=L0(j);v(null,Xt,ut,rt,j,G,xt),Z.el=Xt.el}if(Yt&&ea(Yt,G),!ee&&(St=Mt&&Mt.onVnodeMounted)){const Xt=Z;ea(()=>ro(St,ie,Xt),G)}(Z.shapeFlag&256||ie&&jc(ie.vnode)&&ie.vnode.shapeFlag&256)&&j.a&&ea(j.a,G),j.isMounted=!0,Z=ut=rt=null}},Et=j.effect=new Qg(dt,()=>R1(yt),j.scope),yt=j.update=()=>Et.run();yt.id=j.uid,hc(j,!0),yt()},tt=(j,Z,ut)=>{Z.component=j;const rt=j.vnode.props;j.vnode=Z,j.next=null,gV(j,Z.props,rt,ut),_V(j,Z.children,ut),Qp(),WO(),Hp()},J=(j,Z,ut,rt,G,xt,bt,dt,Et=!1)=>{const yt=j&&j.children,St=j?j.shapeFlag:0,Ft=Z.children,{patchFlag:Mt,shapeFlag:Vt}=Z;if(Mt>0){if(Mt&128){it(yt,Ft,ut,rt,G,xt,bt,dt,Et);return}else if(Mt&256){nt(yt,Ft,ut,rt,G,xt,bt,dt,Et);return}}Vt&8?(St&16&&at(yt,G,xt),Ft!==yt&&u(ut,Ft)):St&16?Vt&16?it(yt,Ft,ut,rt,G,xt,bt,dt,Et):at(yt,G,xt,!0):(St&8&&u(ut,""),Vt&16&&T(Ft,ut,rt,G,xt,bt,dt,Et))},nt=(j,Z,ut,rt,G,xt,bt,dt,Et)=>{j=j||tp,Z=Z||tp;const yt=j.length,St=Z.length,Ft=Math.min(yt,St);let Mt;for(Mt=0;Mt<Ft;Mt++){const Vt=Z[Mt]=Et?au(Z[Mt]):bo(Z[Mt]);v(j[Mt],Vt,ut,null,G,xt,bt,dt,Et)}yt>St?at(j,G,xt,!0,!1,Ft):T(Z,ut,rt,G,xt,bt,dt,Et,Ft)},it=(j,Z,ut,rt,G,xt,bt,dt,Et)=>{let yt=0;const St=Z.length;let Ft=j.length-1,Mt=St-1;for(;yt<=Ft&&yt<=Mt;){const Vt=j[yt],Yt=Z[yt]=Et?au(Z[yt]):bo(Z[yt]);if(Ys(Vt,Yt))v(Vt,Yt,ut,null,G,xt,bt,dt,Et);else break;yt++}for(;yt<=Ft&&yt<=Mt;){const Vt=j[Ft],Yt=Z[Mt]=Et?au(Z[Mt]):bo(Z[Mt]);if(Ys(Vt,Yt))v(Vt,Yt,ut,null,G,xt,bt,dt,Et);else break;Ft--,Mt--}if(yt>Ft){if(yt<=Mt){const Vt=Mt+1,Yt=Vt<St?Z[Vt].el:rt;for(;yt<=Mt;)v(null,Z[yt]=Et?au(Z[yt]):bo(Z[yt]),ut,Yt,G,xt,bt,dt,Et),yt++}}else if(yt>Mt)for(;yt<=Ft;)R(j[yt],G,xt,!0),yt++;else{const Vt=yt,Yt=yt,ie=new Map;for(yt=Yt;yt<=Mt;yt++){const Ie=Z[yt]=Et?au(Z[yt]):bo(Z[yt]);Ie.key!=null&&ie.set(Ie.key,yt)}let ee,Xt=0;const oe=Mt-Yt+1;let Kt=!1,Xe=0;const Re=new Array(oe);for(yt=0;yt<oe;yt++)Re[yt]=0;for(yt=Vt;yt<=Ft;yt++){const Ie=j[yt];if(Xt>=oe){R(Ie,G,xt,!0);continue}let xe;if(Ie.key!=null)xe=ie.get(Ie.key);else for(ee=Yt;ee<=Mt;ee++)if(Re[ee-Yt]===0&&Ys(Ie,Z[ee])){xe=ee;break}xe===void 0?R(Ie,G,xt,!0):(Re[xe-Yt]=yt+1,xe>=Xe?Xe=xe:Kt=!0,v(Ie,Z[xe],ut,null,G,xt,bt,dt,Et),Xt++)}const pr=Kt?BV(Re):tp;for(ee=pr.length-1,yt=oe-1;yt>=0;yt--){const Ie=Yt+yt,xe=Z[Ie],on=Ie+1<St?Z[Ie+1].el:rt;Re[yt]===0?v(null,xe,ut,on,G,xt,bt,dt,Et):Kt&&(ee<0||yt!==pr[ee]?_t(xe,ut,on,2):ee--)}}},_t=(j,Z,ut,rt,G=null)=>{const{el:xt,type:bt,transition:dt,children:Et,shapeFlag:yt}=j;if(yt&6){_t(j.component.subTree,Z,ut,rt);return}if(yt&128){j.suspense.move(Z,ut,rt);return}if(yt&64){bt.move(j,Z,ut,W);return}if(bt===Ri){n(xt,Z,ut);for(let Ft=0;Ft<Et.length;Ft++)_t(Et[Ft],Z,ut,rt);n(j.anchor,Z,ut);return}if(bt===Kc){E(j,Z,ut);return}if(rt!==2&&yt&1&&dt)if(rt===0)dt.beforeEnter(xt),n(xt,Z,ut),ea(()=>dt.enter(xt),G);else{const{leave:Ft,delayLeave:Mt,afterLeave:Vt}=dt,Yt=()=>n(xt,Z,ut),ie=()=>{Ft(xt,()=>{Yt(),Vt&&Vt()})};Mt?Mt(xt,Yt,ie):ie()}else n(xt,Z,ut)},R=(j,Z,ut,rt=!1,G=!1)=>{const{type:xt,props:bt,ref:dt,children:Et,dynamicChildren:yt,shapeFlag:St,patchFlag:Ft,dirs:Mt}=j;if(dt!=null&&A_(dt,null,ut,j,!0),St&256){Z.ctx.deactivate(j);return}const Vt=St&1&&Mt,Yt=!jc(j);let ie;if(Yt&&(ie=bt&&bt.onVnodeBeforeUnmount)&&ro(ie,Z,j),St&6)q(j.component,ut,rt);else{if(St&128){j.suspense.unmount(ut,rt);return}Vt&&js(j,null,Z,"beforeUnmount"),St&64?j.type.remove(j,Z,ut,G,W,rt):yt&&(xt!==Ri||Ft>0&&Ft&64)?at(yt,Z,ut,!1,!0):(xt===Ri&&Ft&384||!G&&St&16)&&at(Et,Z,ut),rt&&$(j)}(Yt&&(ie=bt&&bt.onVnodeUnmounted)||Vt)&&ea(()=>{ie&&ro(ie,Z,j),Vt&&js(j,null,Z,"unmounted")},ut)},$=j=>{const{type:Z,el:ut,anchor:rt,transition:G}=j;if(Z===Ri){K(ut,rt);return}if(Z===Kc){B(j);return}const xt=()=>{i(ut),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(j.shapeFlag&1&&G&&!G.persisted){const{leave:bt,delayLeave:dt}=G,Et=()=>bt(ut,xt);dt?dt(j.el,xt,Et):Et()}else xt()},K=(j,Z)=>{let ut;for(;j!==Z;)ut=h(j),i(j),j=ut;i(Z)},q=(j,Z,ut)=>{const{bum:rt,scope:G,update:xt,subTree:bt,um:dt}=j;rt&&rp(rt),G.stop(),xt&&(xt.active=!1,R(bt,j,Z,ut)),dt&&ea(dt,Z),ea(()=>{j.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},at=(j,Z,ut,rt=!1,G=!1,xt=0)=>{for(let bt=xt;bt<j.length;bt++)R(j[bt],Z,ut,rt,G)},vt=j=>j.shapeFlag&6?vt(j.component.subTree):j.shapeFlag&128?j.suspense.next():h(j.anchor||j.el),wt=(j,Z,ut)=>{j==null?Z._vnode&&R(Z._vnode,null,null,!0):v(Z._vnode||null,j,Z,null,null,null,ut),WO(),o_(),Z._vnode=j},W={p:v,um:R,m:_t,r:$,mt:P,mc:T,pc:J,pbc:M,n:vt,o:r};let It,Ot;return e&&([It,Ot]=e(W)),{render:wt,hydrate:It,createApp:EV(wt,It)}}function hc({effect:r,update:e},t){r.allowRecurse=e.allowRecurse=t}function wI(r,e,t=!1){const n=r.children,i=e.children;if(we(n)&&we(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]=au(i[a]),s.el=o.el),t||wI(o,s)),s.type===oh&&(s.el=o.el)}}function BV(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 TV=r=>r.__isTeleport,Ov=r=>r&&(r.disabled||r.disabled===""),sR=r=>typeof SVGElement<"u"&&r instanceof SVGElement,BT=(r,e)=>{const t=r&&r.to;return Pn(t)?e?e(t):null:t},SV={__isTeleport:!0,process(r,e,t,n,i,a,o,s,A,l){const{mc:u,pc:c,pbc:h,o:{insert:f,querySelector:p,createText:v,createComment:m}}=l,g=Ov(e.props);let{shapeFlag:_,children:E,dynamicChildren:B}=e;if(r==null){const L=e.el=v(""),O=e.anchor=v("");f(L,t,n),f(O,t,n);const b=e.target=BT(e.props,p),T=e.targetAnchor=v("");b&&(f(T,b),o=o||sR(b));const I=(M,x)=>{_&16&&u(E,M,x,i,a,o,s,A)};g?I(t,O):b&&I(b,T)}else{e.el=r.el;const L=e.anchor=r.anchor,O=e.target=r.target,b=e.targetAnchor=r.targetAnchor,T=Ov(r.props),I=T?t:O,M=T?L:b;if(o=o||sR(O),B?(h(r.dynamicChildren,B,I,i,a,o,s),wI(r,e,!0)):A||c(r,e,I,M,i,a,o,s,!1),g)T||ym(e,t,L,l,1);else if((e.props&&e.props.to)!==(r.props&&r.props.to)){const x=e.target=BT(e.props,p);x&&ym(e,x,null,l,0)}else T&&ym(e,O,b,l,1)}ND(e)},remove(r,e,t,n,{um:i,o:{remove:a}},o){const{shapeFlag:s,children:A,anchor:l,targetAnchor:u,target:c,props:h}=r;if(c&&a(u),(o||!Ov(h))&&(a(l),s&16))for(let f=0;f<A.length;f++){const p=A[f];i(p,e,t,!0,!!p.dynamicChildren)}},move:ym,hydrate:xV};function ym(r,e,t,{o:{insert:n},m:i},a=2){a===0&&n(r.targetAnchor,e,t);const{el:o,anchor:s,shapeFlag:A,children:l,props:u}=r,c=a===2;if(c&&n(o,e,t),(!c||Ov(u))&&A&16)for(let h=0;h<l.length;h++)i(l[h],e,t,2);c&&n(s,e,t)}function xV(r,e,t,n,i,a,{o:{nextSibling:o,parentNode:s,querySelector:A}},l){const u=e.target=BT(e.props,A);if(u){const c=u._lpa||u.firstChild;if(e.shapeFlag&16)if(Ov(e.props))e.anchor=l(o(r),e,s(r),t,n,i,a),e.targetAnchor=c;else{e.anchor=o(r);let h=c;for(;h;)if(h=o(h),h&&h.nodeType===8&&h.data==="teleport anchor"){e.targetAnchor=h,u._lpa=e.targetAnchor&&o(e.targetAnchor);break}l(c,e,u,t,n,i,a)}ND(e)}return e.anchor&&o(e.anchor)}const bV=SV;function ND(r){const e=r.ctx;if(e&&e.ut){let t=r.children[0].el;for(;t!==r.targetAnchor;)t.nodeType===1&&t.setAttribute("data-v-owner",e.uid),t=t.nextSibling;e.ut()}}const Ri=Symbol(void 0),oh=Symbol(void 0),Ba=Symbol(void 0),Kc=Symbol(void 0),Rv=[];let oo=null;function cn(r=!1){Rv.push(oo=r?null:[])}function PD(){Rv.pop(),oo=Rv[Rv.length-1]||null}let sh=1;function TT(r){sh+=r}function UD(r){return r.dynamicChildren=sh>0?oo||tp:null,PD(),sh>0&&oo&&oo.push(r),r}function Vn(r,e,t,n,i,a){return UD(Ki(r,e,t,n,i,a,!0))}function $g(r,e,t,n,i){return UD(Wr(r,e,t,n,i,!0))}function Ou(r){return r?r.__v_isVNode===!0:!1}function Ys(r,e){return r.type===e.type&&r.key===e.key}function IV(r){}const H1="__vInternal",DD=({key:r})=>r??null,O0=({ref:r,ref_key:e,ref_for:t})=>r!=null?Pn(r)||Wi(r)||je(r)?{i:ia,r,k:e,f:!!t}:r:null;function Ki(r,e=null,t=null,n=0,i=null,a=r===Ri?0:1,o=!1,s=!1){const A={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&DD(e),ref:e&&O0(e),scopeId:N1,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:ia};return s?(CI(A,t),a&128&&r.normalize(A)):t&&(A.shapeFlag|=Pn(t)?8:16),sh>0&&!o&&oo&&(A.patchFlag>0||a&6)&&A.patchFlag!==32&&oo.push(A),A}const Wr=FV;function FV(r,e=null,t=null,n=0,i=null,a=!1){if((!r||r===ED)&&(r=Ba),Ou(r)){const s=sA(r,e,!0);return t&&CI(s,t),sh>0&&!a&&oo&&(s.shapeFlag&6?oo[oo.indexOf(r)]=s:oo.push(s)),s.patchFlag|=-2,s}if(DV(r)&&(r=r.__vccOpts),e){e=QD(e);let{class:s,style:A}=e;s&&!Pn(s)&&(e.class=Ng(s)),hn(A)&&(iI(A)&&!we(A)&&(A=Kn({},A)),e.style=Mg(A))}const o=Pn(r)?1:sD(r)?128:TV(r)?64:hn(r)?4:je(r)?2:0;return Ki(r,e,t,n,i,o,a,!0)}function QD(r){return r?iI(r)||H1 in r?Kn({},r):r:null}function sA(r,e,t=!1){const{props:n,ref:i,patchFlag:a,children:o}=r,s=e?HD(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:s,key:s&&DD(s),ref:e&&e.ref?t&&i?we(i)?i.concat(O0(e)):[i,O0(e)]:O0(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!==Ri?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&&sA(r.ssContent),ssFallback:r.ssFallback&&sA(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx}}function EI(r=" ",e=0){return Wr(oh,null,r,e)}function LV(r,e){const t=Wr(Kc,null,r);return t.staticCount=e,t}function dr(r="",e=!1){return e?(cn(),$g(Ba,null,r)):Wr(Ba,null,r)}function bo(r){return r==null||typeof r=="boolean"?Wr(Ba):we(r)?Wr(Ri,null,r.slice()):typeof r=="object"?au(r):Wr(oh,null,String(r))}function au(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:sA(r)}function CI(r,e){let t=0;const{shapeFlag:n}=r;if(e==null)e=null;else if(we(e))t=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),CI(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!(H1 in e)?e._ctx=ia:i===3&&ia&&(ia.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else je(e)?(e={default:e,_ctx:ia},t=32):(e=String(e),n&64?(t=16,e=[EI(e)]):t=8);r.children=e,r.shapeFlag|=t}function HD(...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=Ng([e.class,n.class]));else if(i==="style")e.style=Mg([e.style,n.style]);else if(Pg(i)){const a=e[i],o=n[i];o&&a!==o&&!(we(a)&&a.includes(o))&&(e[i]=a?[].concat(a,o):o)}else i!==""&&(e[i]=n[i])}return e}function ro(r,e,t,n=null){Ro(r,e,7,[t,n])}const OV=LD();let RV=0;function GD(r,e,t){const n=r.type,i=(e?e.appContext:r.appContext)||OV,a={uid:RV++,vnode:r,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new tI(!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:xD(n,i),emitsOptions:iD(n,i),emit:null,emitted:null,propsDefaults:nn,inheritAttrs:n.inheritAttrs,ctx:nn,data:nn,props:nn,attrs:nn,slots:nn,refs:nn,setupState:nn,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=Q$.bind(null,a),r.ce&&r.ce(a),a}let Ni=null;const Yu=()=>Ni||ia,Ru=r=>{Ni=r,r.scope.on()},_u=()=>{Ni&&Ni.scope.off(),Ni=null};function kD(r){return r.vnode.shapeFlag&4}let Ep=!1;function $D(r,e=!1){Ep=e;const{props:t,children:n}=r.vnode,i=kD(r);vV(r,t,i,e),mV(r,n);const a=i?MV(r,e):void 0;return Ep=!1,a}function MV(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=aI(new Proxy(r.ctx,_T));const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?jD(r):null;Ru(r),Qp();const a=JA(n,r,0,[r.props,i]);if(Hp(),_u(),Zb(a)){if(a.then(_u,_u),e)return a.then(o=>{ST(r,o,e)}).catch(o=>{Eh(o,r,0)});r.asyncDep=a}else ST(r,a,e)}else VD(r,e)}function ST(r,e,t){je(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:hn(e)&&(r.setupState=AI(e)),VD(r,t)}let l_,xT;function NV(r){l_=r,xT=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,uV))}}const PV=()=>!l_;function VD(r,e,t){const n=r.type;if(!r.render){if(!e&&l_&&!n.render){const i=n.template||mI(r).template;if(i){const{isCustomElement:a,compilerOptions:o}=r.appContext.config,{delimiters:s,compilerOptions:A}=n,l=Kn(Kn({isCustomElement:a,delimiters:s},o),A);n.render=l_(i,l)}}r.render=n.render||Ts,xT&&xT(r)}Ru(r),Qp(),cV(r),Hp(),_u()}function UV(r){return new Proxy(r.attrs,{get(e,t){return Mo(r,"get","$attrs"),e[t]}})}function jD(r){const e=n=>{r.exposed=n||{}};let t;return{get attrs(){return t||(t=UV(r))},slots:r.slots,emit:r.emit,expose:e}}function G1(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(AI(aI(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in Lv)return Lv[t](r)},has(e,t){return t in e||t in Lv}}))}function bT(r,e=!0){return je(r)?r.displayName||r.name:r.name||e&&r.__name}function DV(r){return je(r)&&"__vccOpts"in r}const hr=(r,e)=>R$(r,e,Ep);function QV(){return null}function HV(){return null}function GV(r){}function kV(r,e){return null}function $V(){return KD().slots}function VV(){return KD().attrs}function KD(){const r=Yu();return r.setupContext||(r.setupContext=jD(r))}function jV(r,e){const t=we(r)?r.reduce((n,i)=>(n[i]={},n),{}):r;for(const n in e){const i=t[n];i?we(i)||je(i)?t[n]={type:i,default:e[n]}:i.default=e[n]:i===null&&(t[n]={default:e[n]})}return t}function KV(r,e){const t={};for(const n in r)e.includes(n)||Object.defineProperty(t,n,{enumerable:!0,get:()=>r[n]});return t}function zV(r){const e=Yu();let t=r();return _u(),Zb(t)&&(t=t.catch(n=>{throw Ru(e),n})),[t,()=>Ru(e)]}function zD(r,e,t){const n=arguments.length;return n===2?hn(e)&&!we(e)?Ou(e)?Wr(r,null,[e]):Wr(r,e):Wr(r,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&Ou(t)&&(t=[t]),Wr(r,e,t))}const YD=Symbol(""),XD=()=>Ce(YD);function YV(){}function XV(r,e,t,n){const i=t[n];if(i&&WD(i,r))return i;const a=e();return a.memo=r.slice(),t[n]=a}function WD(r,e){const t=r.memo;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(_p(t[n],e[n]))return!1;return sh>0&&oo&&oo.push(r),!0}const qD="3.2.45",WV={createComponentInstance:GD,setupComponent:$D,renderComponentRoot:L0,setCurrentRenderingInstance:ig,isVNode:Ou,normalizeVNode:bo},qV=WV,ZV=null,JV=null,tj="http://www.w3.org/2000/svg",Lc=typeof document<"u"?document:null,AR=Lc&&Lc.createElement("template"),ej={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?Lc.createElementNS(tj,r):Lc.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>Lc.createTextNode(r),createComment:r=>Lc.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>Lc.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{AR.innerHTML=n?`<svg>${r}</svg>`:r;const s=AR.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 rj(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 nj(r,e,t){const n=r.style,i=Pn(t);if(t&&!i){for(const a in t)IT(n,a,t[a]);if(e&&!Pn(e))for(const a in e)t[a]==null&&IT(n,a,"")}else{const a=n.display;i?e!==t&&(n.cssText=t):e&&r.removeAttribute("style"),"_vod"in r&&(n.display=a)}}const lR=/\s*!important$/;function IT(r,e,t){if(we(t))t.forEach(n=>IT(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=ij(r,e);lR.test(t)?r.setProperty(Wo(n),t.replace(lR,""),"important"):r[n]=t}}const uR=["Webkit","Moz","ms"],nC={};function ij(r,e){const t=nC[e];if(t)return t;let n=so(e);if(n!=="filter"&&n in r)return nC[e]=n;n=Dg(n);for(let i=0;i<uR.length;i++){const a=uR[i]+n;if(a in r)return nC[e]=a}return e}const cR="http://www.w3.org/1999/xlink";function aj(r,e,t,n,i){if(n&&e.startsWith("xlink:"))t==null?r.removeAttributeNS(cR,e.slice(6,e.length)):r.setAttributeNS(cR,e,t);else{const a=D9(e);t==null||a&&!O2(t)?r.removeAttribute(e):r.setAttribute(e,a?"":t)}}function oj(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=O2(t):t==null&&A==="string"?(t="",s=!0):A==="number"&&(t=0,s=!0)}try{r[e]=t}catch{}s&&r.removeAttribute(e)}function WA(r,e,t,n){r.addEventListener(e,t,n)}function sj(r,e,t,n){r.removeEventListener(e,t,n)}function Aj(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]=lj(e);if(n){const l=a[e]=hj(n,i);WA(r,s,l,A)}else o&&(sj(r,s,o,A),a[e]=void 0)}}const hR=/(?:Once|Passive|Capture)$/;function lj(r){let e;if(hR.test(r)){e={};let n;for(;n=r.match(hR);)r=r.slice(0,r.length-n[0].length),e[n[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):Wo(r.slice(2)),e]}let iC=0;const uj=Promise.resolve(),cj=()=>iC||(uj.then(()=>iC=0),iC=Date.now());function hj(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;Ro(fj(n,t.value),e,5,[n])};return t.value=r,t.attached=cj(),t}function fj(r,e){if(we(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 fR=/^on[a-z]/,pj=(r,e,t,n,i=!1,a,o,s,A)=>{e==="class"?rj(r,n,i):e==="style"?nj(r,t,n):Pg(e)?Wb(e)||Aj(r,e,t,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):dj(r,e,n,i))?oj(r,e,n,a,o,s,A):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),aj(r,e,n,i))};function dj(r,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in r&&fR.test(e)&&je(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA"||fR.test(e)&&Pn(t)?!1:e in r}function ZD(r,e){const t=vI(r);class n extends k1{constructor(a){super(t,a,e)}}return n.def=t,n}const vj=r=>ZD(r,f6),gj=typeof HTMLElement<"u"?HTMLElement:class{};class k1 extends gj{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,uI(()=>{this._connected||(OT(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let n=0;n<this.attributes.length;n++)this._setAttr(this.attributes[n].name);new MutationObserver(n=>{for(const i of n)this._setAttr(i.attributeName)}).observe(this,{attributes:!0});const e=(n,i=!1)=>{const{props:a,styles:o}=n;let s;if(a&&!we(a))for(const A in a){const l=a[A];(l===Number||l&&l.type===Number)&&(A in this._props&&(this._props[A]=Al(this._props[A])),(s||(s=Object.create(null)))[so(A)]=!0)}this._numberProps=s,i&&this._resolveProps(n),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then(n=>e(n,!0)):e(this._def)}_resolveProps(e){const{props:t}=e,n=we(t)?t:Object.keys(t||{});for(const i of Object.keys(this))i[0]!=="_"&&n.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of n.map(so))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(a){this._setProp(i,a)}})}_setAttr(e){let t=this.getAttribute(e);const n=so(e);this._numberProps&&this._numberProps[n]&&(t=Al(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,i=!0){t!==this._props[e]&&(this._props[e]=t,i&&this._instance&&this._update(),n&&(t===!0?this.setAttribute(Wo(e),""):typeof t=="string"||typeof t=="number"?this.setAttribute(Wo(e),t+""):t||this.removeAttribute(Wo(e))))}_update(){OT(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Wr(this._def,Kn({},this._props));return this._instance||(e.ce=t=>{this._instance=t,t.isCE=!0;const n=(a,o)=>{this.dispatchEvent(new CustomEvent(a,{detail:o}))};t.emit=(a,...o)=>{n(a,o),Wo(a)!==a&&n(Wo(a),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof k1){t.parent=i._instance,t.provides=i._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(t=>{const n=document.createElement("style");n.textContent=t,this.shadowRoot.appendChild(n)})}}function yj(r="$style"){{const e=Yu();if(!e)return nn;const t=e.type.__cssModules;if(!t)return nn;const n=t[r];return n||nn}}function mj(r){const e=Yu();if(!e)return;const t=e.ut=(i=r(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(a=>LT(a,i))},n=()=>{const i=r(e.proxy);FT(e.subTree,i),t(i)};uD(n),Ze(()=>{const i=new MutationObserver(n);i.observe(e.subTree.el.parentNode,{childList:!0}),ir(()=>i.disconnect())})}function FT(r,e){if(r.shapeFlag&128){const t=r.suspense;r=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{FT(t.activeBranch,e)})}for(;r.component;)r=r.component.subTree;if(r.shapeFlag&1&&r.el)LT(r.el,e);else if(r.type===Ri)r.children.forEach(t=>FT(t,e));else if(r.type===Kc){let{el:t,anchor:n}=r;for(;t&&(LT(t,e),t!==n);)t=t.nextSibling}}function LT(r,e){if(r.nodeType===1){const t=r.style;for(const n in e)t.setProperty(`--${n}`,e[n])}}const jl="transition",Qd="animation",$1=(r,{slots:e})=>zD(dI,t6(r),e);$1.displayName="Transition";const JD={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},_j=$1.props=Kn({},dI.props,JD),fc=(r,e=[])=>{we(r)?r.forEach(t=>t(...e)):r&&r(...e)},pR=r=>r?we(r)?r.some(e=>e.length>1):r.length>1:!1;function t6(r){const e={};for(const S in r)S in JD||(e[S]=r[S]);if(r.css===!1)return e;const{name:t="v",type:n,duration:i,enterFromClass:a=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:s=`${t}-enter-to`,appearFromClass:A=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:c=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=r,p=wj(i),v=p&&p[0],m=p&&p[1],{onBeforeEnter:g,onEnter:_,onEnterCancelled:E,onLeave:B,onLeaveCancelled:L,onBeforeAppear:O=g,onAppear:b=_,onAppearCancelled:T=E}=e,I=(S,N,P)=>{eu(S,N?u:s),eu(S,N?l:o),P&&P()},M=(S,N)=>{S._isLeaving=!1,eu(S,c),eu(S,f),eu(S,h),N&&N()},x=S=>(N,P)=>{const X=S?b:_,z=()=>I(N,S,P);fc(X,[N,z]),dR(()=>{eu(N,S?A:a),$A(N,S?u:s),pR(X)||vR(N,n,v,z)})};return Kn(e,{onBeforeEnter(S){fc(g,[S]),$A(S,a),$A(S,o)},onBeforeAppear(S){fc(O,[S]),$A(S,A),$A(S,l)},onEnter:x(!1),onAppear:x(!0),onLeave(S,N){S._isLeaving=!0;const P=()=>M(S,N);$A(S,c),r6(),$A(S,h),dR(()=>{S._isLeaving&&(eu(S,c),$A(S,f),pR(B)||vR(S,n,m,P))}),fc(B,[S,P])},onEnterCancelled(S){I(S,!1),fc(E,[S])},onAppearCancelled(S){I(S,!0),fc(T,[S])},onLeaveCancelled(S){M(S),fc(L,[S])}})}function wj(r){if(r==null)return null;if(hn(r))return[aC(r.enter),aC(r.leave)];{const e=aC(r);return[e,e]}}function aC(r){return Al(r)}function $A(r,e){e.split(/\s+/).forEach(t=>t&&r.classList.add(t)),(r._vtc||(r._vtc=new Set)).add(e)}function eu(r,e){e.split(/\s+/).forEach(n=>n&&r.classList.remove(n));const{_vtc:t}=r;t&&(t.delete(e),t.size||(r._vtc=void 0))}function dR(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let Ej=0;function vR(r,e,t,n){const i=r._endId=++Ej,a=()=>{i===r._endId&&n()};if(t)return setTimeout(a,t);const{type:o,timeout:s,propCount:A}=e6(r,e);if(!o)return n();const l=o+"end";let u=0;const c=()=>{r.removeEventListener(l,h),a()},h=f=>{f.target===r&&++u>=A&&c()};setTimeout(()=>{u<A&&c()},s+1),r.addEventListener(l,h)}function e6(r,e){const t=window.getComputedStyle(r),n=p=>(t[p]||"").split(", "),i=n(`${jl}Delay`),a=n(`${jl}Duration`),o=gR(i,a),s=n(`${Qd}Delay`),A=n(`${Qd}Duration`),l=gR(s,A);let u=null,c=0,h=0;e===jl?o>0&&(u=jl,c=o,h=a.length):e===Qd?l>0&&(u=Qd,c=l,h=A.length):(c=Math.max(o,l),u=c>0?o>l?jl:Qd:null,h=u?u===jl?a.length:A.length:0);const f=u===jl&&/\b(transform|all)(,|$)/.test(n(`${jl}Property`).toString());return{type:u,timeout:c,propCount:h,hasTransform:f}}function gR(r,e){for(;r.length<e.length;)r=r.concat(r);return Math.max(...e.map((t,n)=>yR(t)+yR(r[n])))}function yR(r){return Number(r.slice(0,-1).replace(",","."))*1e3}function r6(){return document.body.offsetHeight}const n6=new WeakMap,i6=new WeakMap,Cj={name:"TransitionGroup",props:Kn({},_j,{tag:String,moveClass:String}),setup(r,{slots:e}){const t=Yu(),n=pI();let i,a;return D1(()=>{if(!i.length)return;const o=r.moveClass||`${r.name||"v"}-move`;if(!bj(i[0].el,t.vnode.el,o))return;i.forEach(Tj),i.forEach(Sj);const s=i.filter(xj);r6(),s.forEach(A=>{const l=A.el,u=l.style;$A(l,o),u.transform=u.webkitTransform=u.transitionDuration="";const c=l._moveCb=h=>{h&&h.target!==l||(!h||/transform$/.test(h.propertyName))&&(l.removeEventListener("transitionend",c),l._moveCb=null,eu(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=Lr(r),s=t6(o);let A=o.tag||Ri;i=a,a=e.default?P1(e.default()):[];for(let l=0;l<a.length;l++){const u=a[l];u.key!=null&&ah(u,wp(u,s,n,t))}if(i)for(let l=0;l<i.length;l++){const u=i[l];ah(u,wp(u,s,n,t)),n6.set(u,u.el.getBoundingClientRect())}return Wr(A,null,a)}}},Bj=Cj;function Tj(r){const e=r.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function Sj(r){i6.set(r,r.el.getBoundingClientRect())}function xj(r){const e=n6.get(r),t=i6.get(r),n=e.left-t.left,i=e.top-t.top;if(n||i){const a=r.el.style;return a.transform=a.webkitTransform=`translate(${n}px,${i}px)`,a.transitionDuration="0s",r}}function bj(r,e,t){const n=r.cloneNode();r._vtc&&r._vtc.forEach(o=>{o.split(/\s+/).forEach(s=>s&&n.classList.remove(s))}),t.split(/\s+/).forEach(o=>o&&n.classList.add(o)),n.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(n);const{hasTransform:a}=e6(n);return i.removeChild(n),a}const Mu=r=>{const e=r.props["onUpdate:modelValue"]||!1;return we(e)?t=>rp(e,t):e};function Ij(r){r.target.composing=!0}function mR(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const u_={created(r,{modifiers:{lazy:e,trim:t,number:n}},i){r._assign=Mu(i);const a=n||i.props&&i.props.type==="number";WA(r,e?"change":"input",o=>{if(o.target.composing)return;let s=r.value;t&&(s=s.trim()),a&&(s=Al(s)),r._assign(s)}),t&&WA(r,"change",()=>{r.value=r.value.trim()}),e||(WA(r,"compositionstart",Ij),WA(r,"compositionend",mR),WA(r,"change",mR))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,modifiers:{lazy:t,trim:n,number:i}},a){if(r._assign=Mu(a),r.composing||document.activeElement===r&&r.type!=="range"&&(t||n&&r.value.trim()===e||(i||r.type==="number")&&Al(r.value)===e))return;const o=e??"";r.value!==o&&(r.value=o)}},BI={deep:!0,created(r,e,t){r._assign=Mu(t),WA(r,"change",()=>{const n=r._modelValue,i=Cp(r),a=r.checked,o=r._assign;if(we(n)){const s=S1(n,i),A=s!==-1;if(a&&!A)o(n.concat(i));else if(!a&&A){const l=[...n];l.splice(s,1),o(l)}}else if(wh(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(o6(r,a))})},mounted:_R,beforeUpdate(r,e,t){r._assign=Mu(t),_R(r,e,t)}};function _R(r,{value:e,oldValue:t},n){r._modelValue=e,we(e)?r.checked=S1(e,n.props.value)>-1:wh(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=Iu(e,o6(r,!0)))}const TI={created(r,{value:e},t){r.checked=Iu(e,t.props.value),r._assign=Mu(t),WA(r,"change",()=>{r._assign(Cp(r))})},beforeUpdate(r,{value:e,oldValue:t},n){r._assign=Mu(n),e!==t&&(r.checked=Iu(e,n.props.value))}},a6={deep:!0,created(r,{value:e,modifiers:{number:t}},n){const i=wh(e);WA(r,"change",()=>{const a=Array.prototype.filter.call(r.options,o=>o.selected).map(o=>t?Al(Cp(o)):Cp(o));r._assign(r.multiple?i?new Set(a):a:a[0])}),r._assign=Mu(n)},mounted(r,{value:e}){wR(r,e)},beforeUpdate(r,e,t){r._assign=Mu(t)},updated(r,{value:e}){wR(r,e)}};function wR(r,e){const t=r.multiple;if(!(t&&!we(e)&&!wh(e))){for(let n=0,i=r.options.length;n<i;n++){const a=r.options[n],o=Cp(a);if(t)we(e)?a.selected=S1(e,o)>-1:a.selected=e.has(o);else if(Iu(Cp(a),e)){r.selectedIndex!==n&&(r.selectedIndex=n);return}}!t&&r.selectedIndex!==-1&&(r.selectedIndex=-1)}}function Cp(r){return"_value"in r?r._value:r.value}function o6(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const s6={created(r,e,t){mm(r,e,t,null,"created")},mounted(r,e,t){mm(r,e,t,null,"mounted")},beforeUpdate(r,e,t,n){mm(r,e,t,n,"beforeUpdate")},updated(r,e,t,n){mm(r,e,t,n,"updated")}};function A6(r,e){switch(r){case"SELECT":return a6;case"TEXTAREA":return u_;default:switch(e){case"checkbox":return BI;case"radio":return TI;default:return u_}}}function mm(r,e,t,n,i){const o=A6(r.tagName,t.props&&t.props.type)[i];o&&o(r,e,t,n)}function Fj(){u_.getSSRProps=({value:r})=>({value:r}),TI.getSSRProps=({value:r},e)=>{if(e.props&&Iu(e.props.value,r))return{checked:!0}},BI.getSSRProps=({value:r},e)=>{if(we(r)){if(e.props&&S1(r,e.props.value)>-1)return{checked:!0}}else if(wh(r)){if(e.props&&r.has(e.props.value))return{checked:!0}}else if(r)return{checked:!0}},s6.getSSRProps=(r,e)=>{if(typeof e.type!="string")return;const t=A6(e.type.toUpperCase(),e.props&&e.props.type);if(t.getSSRProps)return t.getSSRProps(r,e)}}const Lj=["ctrl","shift","alt","meta"],Oj={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>Lj.some(t=>r[`${t}Key`]&&!e.includes(t))},Rj=(r,e)=>(t,...n)=>{for(let i=0;i<e.length;i++){const a=Oj[e[i]];if(a&&a(t,e))return}return r(t,...n)},Mj={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Nj=(r,e)=>t=>{if(!("key"in t))return;const n=Wo(t.key);if(e.some(i=>i===n||Mj[i]===n))return r(t)},l6={beforeMount(r,{value:e},{transition:t}){r._vod=r.style.display==="none"?"":r.style.display,t&&e?t.beforeEnter(r):Hd(r,e)},mounted(r,{value:e},{transition:t}){t&&e&&t.enter(r)},updated(r,{value:e,oldValue:t},{transition:n}){!e!=!t&&(n?e?(n.beforeEnter(r),Hd(r,!0),n.enter(r)):n.leave(r,()=>{Hd(r,!1)}):Hd(r,e))},beforeUnmount(r,{value:e}){Hd(r,e)}};function Hd(r,e){r.style.display=e?r._vod:"none"}function Pj(){l6.getSSRProps=({value:r})=>{if(!r)return{style:{display:"none"}}}}const u6=Kn({patchProp:pj},ej);let Mv,ER=!1;function c6(){return Mv||(Mv=OD(u6))}function h6(){return Mv=ER?Mv:RD(u6),ER=!0,Mv}const OT=(...r)=>{c6().render(...r)},f6=(...r)=>{h6().hydrate(...r)},p6=(...r)=>{const e=c6().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=d6(n);if(!i)return;const a=e._component;!je(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},Uj=(...r)=>{const e=h6().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=d6(n);if(i)return t(i,!0,i instanceof SVGElement)},e};function d6(r){return Pn(r)?document.querySelector(r):r}let CR=!1;const Dj=()=>{CR||(CR=!0,Fj(),Pj())},Qj=()=>{},Hj=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:dI,Comment:Ba,EffectScope:tI,Fragment:Ri,KeepAlive:rV,ReactiveEffect:Qg,Static:Kc,Suspense:K$,Teleport:bV,Text:oh,Transition:$1,TransitionGroup:Bj,VueElement:k1,callWithAsyncErrorHandling:Ro,callWithErrorHandling:JA,camelize:so,capitalize:Dg,cloneVNode:sA,compatUtils:JV,compile:Qj,computed:hr,createApp:p6,createBlock:$g,createCommentVNode:dr,createElementBlock:Vn,createElementVNode:Ki,createHydrationRenderer:RD,createPropsRestProxy:KV,createRenderer:OD,createSSRApp:Uj,createSlots:AV,createStaticVNode:LV,createTextVNode:EI,createVNode:Wr,customRef:F$,defineAsyncComponent:tV,defineComponent:vI,defineCustomElement:ZD,defineEmits:HV,defineExpose:GV,defineProps:QV,defineSSRCustomElement:vj,get devtools(){return Ff},effect:Z9,effectScope:z9,getCurrentInstance:Yu,getCurrentScope:Y9,getTransitionRawChildren:P1,guardReactiveProps:QD,h:zD,handleError:Eh,hydrate:f6,initCustomFormatter:YV,initDirectivesForSSR:Dj,inject:Ce,isMemoSame:WD,isProxy:iI,isReactive:Vc,isReadonly:ih,isRef:Wi,isRuntimeOnly:PV,isShallow:tg,isVNode:Ou,markRaw:aI,mergeDefaults:jV,mergeProps:HD,nextTick:uI,normalizeClass:Ng,normalizeProps:P9,normalizeStyle:Mg,onActivated:fD,onBeforeMount:vD,onBeforeUnmount:Q1,onBeforeUpdate:gD,onDeactivated:pD,onErrorCaptured:wD,onMounted:Ze,onRenderTracked:_D,onRenderTriggered:mD,onScopeDispose:X9,onServerPrefetch:yD,onUnmounted:ir,onUpdated:D1,openBlock:cn,popScopeId:oD,provide:Mr,proxyRefs:AI,pushScopeId:aD,queuePostFlushCb:cI,reactive:Hg,readonly:nI,ref:Gn,registerRuntimeCompiler:NV,render:OT,renderList:CD,renderSlot:mr,resolveComponent:Lf,resolveDirective:sV,resolveDynamicComponent:oV,resolveFilter:ZV,resolveTransitionHooks:wp,setBlockTracking:TT,setDevtoolsHook:nD,setTransitionHooks:ah,shallowReactive:X2,shallowReadonly:B$,shallowRef:T$,ssrContextKey:YD,ssrUtils:qV,stop:J9,toDisplayString:tu,toHandlerKey:Fv,toHandlers:lV,toRaw:Lr,toRef:Z2,toRefs:Lu,transformVNodeArgs:IV,triggerRef:x$,unref:q2,useAttrs:VV,useCssModule:yj,useCssVars:mj,useSSRContext:XD,useSlots:$V,useTransitionState:pI,vModelCheckbox:BI,vModelDynamic:s6,vModelRadio:TI,vModelSelect:a6,vModelText:u_,vShow:l6,version:qD,warn:M$,watch:he,watchEffect:lD,watchPostEffect:uD,watchSyncEffect:q$,withAsyncContext:zV,withCtx:Nc,withDefaults:kV,withDirectives:iV,withKeys:Nj,withMemo:XV,withModifiers:Rj,withScopeId:H$},Symbol.toStringTag,{value:"Module"})),Gj={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};let kj=class{constructor(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}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Gj[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(e){this.defaultTileGrid_=e}setExtent(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)}setWorldExtent(e){this.worldExtent_=e}setGetPointResolution(e){this.getPointResolutionFunc_=e}getPointResolutionFunc(){return this.getPointResolutionFunc_}};const v6=kj,Vg=6378137,kf=Math.PI*Vg,$j=[-kf,-kf,kf,kf],Vj=[-180,-85,180,85],_m=Vg*Math.log(Math.tan(Math.PI/2));let uf=class extends v6{constructor(e){super({code:e,units:"m",extent:$j,global:!0,worldExtent:Vj,getPointResolution:function(t,n){return t/Math.cosh(n[1]/Vg)}})}};const BR=[new uf("EPSG:3857"),new uf("EPSG:102100"),new uf("EPSG:102113"),new uf("EPSG:900913"),new uf("http://www.opengis.net/def/crs/EPSG/0/3857"),new uf("http://www.opengis.net/gml/srs/epsg.xml#3857")];function jj(r,e,t){const n=r.length;t=t>1?t:2,e===void 0&&(t>2?e=r.slice():e=new Array(n));for(let i=0;i<n;i+=t){e[i]=kf*r[i]/180;let a=Vg*Math.log(Math.tan(Math.PI*(+r[i+1]+90)/360));a>_m?a=_m:a<-_m&&(a=-_m),e[i+1]=a}return e}function Kj(r,e,t){const n=r.length;t=t>1?t:2,e===void 0&&(t>2?e=r.slice():e=new Array(n));for(let i=0;i<n;i+=t)e[i]=180*r[i]/kf,e[i+1]=360*Math.atan(Math.exp(r[i+1]/Vg))/Math.PI-90;return e}const zj=6378137,TR=[-180,-90,180,90],Yj=Math.PI*zj/180;let pc=class extends v6{constructor(e,t){super({code:e,units:"degrees",extent:TR,axisOrientation:t,global:!0,metersPerUnit:Yj,worldExtent:TR})}};const SR=[new pc("CRS:84"),new pc("EPSG:4326","neu"),new pc("urn:ogc:def:crs:OGC:1.3:CRS84"),new pc("urn:ogc:def:crs:OGC:2:84"),new pc("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new pc("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new pc("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let RT={};function Xj(r){return RT[r]||RT[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Wj(r,e){RT[r]=e}let ap={};function c_(r,e,t){const n=r.getCode(),i=e.getCode();n in ap||(ap[n]={}),ap[n][i]=t}function qj(r,e){let t;return r in ap&&e in ap[r]&&(t=ap[r][e]),t}function g6(r,e){if(e!==void 0){for(let t=0,n=r.length;t<n;++t)e[t]=r[t];e=e}else e=r.slice();return e}function Zj(r,e){if(e!==void 0&&r!==e){for(let t=0,n=r.length;t<n;++t)e[t]=r[t];r=e}return r}function Jj(r){Wj(r.getCode(),r),c_(r,r,g6)}function tK(r){r.forEach(Jj)}function xR(r){return typeof r=="string"?Xj(r):r||null}function bR(r){tK(r),r.forEach(function(e){r.forEach(function(t){e!==t&&c_(e,t,g6)})})}function eK(r,e,t,n){r.forEach(function(i){e.forEach(function(a){c_(i,a,t),c_(a,i,n)})})}function IR(r,e){return iK(r,"EPSG:4326",e!==void 0?e:"EPSG:3857")}function rK(r,e){const t=r.getCode(),n=e.getCode();let i=qj(t,n);return i||(i=Zj),i}function nK(r,e){const t=xR(r),n=xR(e);return rK(t,n)}function iK(r,e,t){return nK(e,t)(r,void 0,r.length)}function aK(){bR(BR),bR(SR),eK(SR,BR,jj,Kj)}aK();/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*//**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const y6=function(r){const e=[];let t=0;for(let n=0;n<r.length;n++){let i=r.charCodeAt(n);i<128?e[t++]=i:i<2048?(e[t++]=i>>6|192,e[t++]=i&63|128):(i&64512)===55296&&n+1<r.length&&(r.charCodeAt(n+1)&64512)===56320?(i=65536+((i&1023)<<10)+(r.charCodeAt(++n)&1023),e[t++]=i>>18|240,e[t++]=i>>12&63|128,e[t++]=i>>6&63|128,e[t++]=i&63|128):(e[t++]=i>>12|224,e[t++]=i>>6&63|128,e[t++]=i&63|128)}return e},oK=function(r){const e=[];let t=0,n=0;for(;t<r.length;){const i=r[t++];if(i<128)e[n++]=String.fromCharCode(i);else if(i>191&&i<224){const a=r[t++];e[n++]=String.fromCharCode((i&31)<<6|a&63)}else if(i>239&&i<365){const a=r[t++],o=r[t++],s=r[t++],A=((i&7)<<18|(a&63)<<12|(o&63)<<6|s&63)-65536;e[n++]=String.fromCharCode(55296+(A>>10)),e[n++]=String.fromCharCode(56320+(A&1023))}else{const a=r[t++],o=r[t++];e[n++]=String.fromCharCode((i&15)<<12|(a&63)<<6|o&63)}}return e.join("")},m6={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:typeof atob=="function",encodeByteArray(r,e){if(!Array.isArray(r))throw Error("encodeByteArray takes an array as a parameter");this.init_();const t=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,n=[];for(let i=0;i<r.length;i+=3){const a=r[i],o=i+1<r.length,s=o?r[i+1]:0,A=i+2<r.length,l=A?r[i+2]:0,u=a>>2,c=(a&3)<<4|s>>4;let h=(s&15)<<2|l>>6,f=l&63;A||(f=64,o||(h=64)),n.push(t[u],t[c],t[h],t[f])}return n.join("")},encodeString(r,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(r):this.encodeByteArray(y6(r),e)},decodeString(r,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(r):oK(this.decodeStringToByteArray(r,e))},decodeStringToByteArray(r,e){this.init_();const t=e?this.charToByteMapWebSafe_:this.charToByteMap_,n=[];for(let i=0;i<r.length;){const a=t[r.charAt(i++)],s=i<r.length?t[r.charAt(i)]:0;++i;const l=i<r.length?t[r.charAt(i)]:64;++i;const c=i<r.length?t[r.charAt(i)]:64;if(++i,a==null||s==null||l==null||c==null)throw Error();const h=a<<2|s>>4;if(n.push(h),l!==64){const f=s<<4&240|l>>2;if(n.push(f),c!==64){const p=l<<6&192|c;n.push(p)}}}return n},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let r=0;r<this.ENCODED_VALS.length;r++)this.byteToCharMap_[r]=this.ENCODED_VALS.charAt(r),this.charToByteMap_[this.byteToCharMap_[r]]=r,this.byteToCharMapWebSafe_[r]=this.ENCODED_VALS_WEBSAFE.charAt(r),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[r]]=r,r>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(r)]=r,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(r)]=r)}}},sK=function(r){const e=y6(r);return m6.encodeByteArray(e,!0)},_6=function(r){return sK(r).replace(/\./g,"")},AK=function(r){try{return m6.decodeString(r,!0)}catch(e){console.error("base64Decode failed: ",e)}return null};/**
* @license
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function lK(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("Unable to locate global object.")}/**
* @license
* Copyright 2022 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const uK=()=>lK().__FIREBASE_DEFAULTS__,cK=()=>{if(typeof process>"u"||typeof process.env>"u")return;const r={}.__FIREBASE_DEFAULTS__;if(r)return JSON.parse(r)},hK=()=>{if(typeof document>"u")return;let r;try{r=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=r&&AK(r[1]);return e&&JSON.parse(e)},w6=()=>{try{return uK()||cK()||hK()}catch(r){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${r}`);return}},fK=r=>{var e,t;return(t=(e=w6())===null||e===void 0?void 0:e.emulatorHosts)===null||t===void 0?void 0:t[r]},pK=r=>{const e=fK(r);if(!e)return;const t=e.lastIndexOf(":");if(t<=0||t+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const n=parseInt(e.substring(t+1),10);return e[0]==="["?[e.substring(1,t-1),n]:[e.substring(0,t),n]},dK=()=>{var r;return(r=w6())===null||r===void 0?void 0:r.config};/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class vK{constructor(){this.reject=()=>{},this.resolve=()=>{},this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}wrapCallback(e){return(t,n)=>{t?this.reject(t):this.resolve(n),typeof e=="function"&&(this.promise.catch(()=>{}),e.length===1?e(t):e(t,n))}}}function gK(){try{return typeof indexedDB=="object"}catch{return!1}}function yK(){return new Promise((r,e)=>{try{let t=!0;const n="validate-browser-context-for-indexeddb-analytics-module",i=self.indexedDB.open(n);i.onsuccess=()=>{i.result.close(),t||self.indexedDB.deleteDatabase(n),r(!0)},i.onupgradeneeded=()=>{t=!1},i.onerror=()=>{var a;e(((a=i.error)===null||a===void 0?void 0:a.message)||"")}}catch(t){e(t)}})}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const mK="FirebaseError";class Gp extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name=mK,Object.setPrototypeOf(this,Gp.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,E6.prototype.create)}}class E6{constructor(e,t,n){this.service=e,this.serviceName=t,this.errors=n}create(e,...t){const n=t[0]||{},i=`${this.service}/${e}`,a=this.errors[e],o=a?_K(a,n):"Error",s=`${this.serviceName}: ${o} (${i}).`;return new Gp(i,s,n)}}function _K(r,e){return r.replace(wK,(t,n)=>{const i=e[n];return i!=null?String(i):`<${n}?>`})}const wK=/\{\$([^}]+)}/g;function MT(r,e){if(r===e)return!0;const t=Object.keys(r),n=Object.keys(e);for(const i of t){if(!n.includes(i))return!1;const a=r[i],o=e[i];if(FR(a)&&FR(o)){if(!MT(a,o))return!1}else if(a!==o)return!1}for(const i of n)if(!t.includes(i))return!1;return!0}function FR(r){return r!==null&&typeof r=="object"}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function SI(r){return r&&r._delegate?r._delegate:r}class og{constructor(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(e){return this.instantiationMode=e,this}setMultipleInstances(e){return this.multipleInstances=e,this}setServiceProps(e){return this.serviceProps=e,this}setInstanceCreatedCallback(e){return this.onInstanceCreated=e,this}}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Sc="[DEFAULT]";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class EK{constructor(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.instancesOptions=new Map,this.onInitCallbacks=new Map}get(e){const t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){const n=new vK;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{const i=this.getOrInitializeService({instanceIdentifier:t});i&&n.resolve(i)}catch{}}return this.instancesDeferred.get(t).promise}getImmediate(e){var t;const n=this.normalizeInstanceIdentifier(e==null?void 0:e.identifier),i=(t=e==null?void 0:e.optional)!==null&&t!==void 0?t:!1;if(this.isInitialized(n)||this.shouldAutoInitialize())try{return this.getOrInitializeService({instanceIdentifier:n})}catch(a){if(i)return null;throw a}else{if(i)return null;throw Error(`Service ${this.name} is not available`)}}getComponent(){return this.component}setComponent(e){if(e.name!==this.name)throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);if(this.component)throw Error(`Component for ${this.name} has already been provided`);if(this.component=e,!!this.shouldAutoInitialize()){if(BK(e))try{this.getOrInitializeService({instanceIdentifier:Sc})}catch{}for(const[t,n]of this.instancesDeferred.entries()){const i=this.normalizeInstanceIdentifier(t);try{const a=this.getOrInitializeService({instanceIdentifier:i});n.resolve(a)}catch{}}}}clearInstance(e=Sc){this.instancesDeferred.delete(e),this.instancesOptions.delete(e),this.instances.delete(e)}async delete(){const e=Array.from(this.instances.values());await Promise.all([...e.filter(t=>"INTERNAL"in t).map(t=>t.INTERNAL.delete()),...e.filter(t=>"_delete"in t).map(t=>t._delete())])}isComponentSet(){return this.component!=null}isInitialized(e=Sc){return this.instances.has(e)}getOptions(e=Sc){return this.instancesOptions.get(e)||{}}initialize(e={}){const{options:t={}}=e,n=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(n))throw Error(`${this.name}(${n}) has already been initialized`);if(!this.isComponentSet())throw Error(`Component ${this.name} has not been registered yet`);const i=this.getOrInitializeService({instanceIdentifier:n,options:t});for(const[a,o]of this.instancesDeferred.entries()){const s=this.normalizeInstanceIdentifier(a);n===s&&o.resolve(i)}return i}onInit(e,t){var n;const i=this.normalizeInstanceIdentifier(t),a=(n=this.onInitCallbacks.get(i))!==null&&n!==void 0?n:new Set;a.add(e),this.onInitCallbacks.set(i,a);const o=this.instances.get(i);return o&&e(o,i),()=>{a.delete(e)}}invokeOnInitCallbacks(e,t){const n=this.onInitCallbacks.get(t);if(n)for(const i of n)try{i(e,t)}catch{}}getOrInitializeService({instanceIdentifier:e,options:t={}}){let n=this.instances.get(e);if(!n&&this.component&&(n=this.component.instanceFactory(this.container,{instanceIdentifier:CK(e),options:t}),this.instances.set(e,n),this.instancesOptions.set(e,t),this.invokeOnInitCallbacks(n,e),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,e,n)}catch{}return n||null}normalizeInstanceIdentifier(e=Sc){return this.component?this.component.multipleInstances?e:Sc:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function CK(r){return r===Sc?void 0:r}function BK(r){return r.instantiationMode==="EAGER"}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class TK{constructor(e){this.name=e,this.providers=new Map}addComponent(e){const t=this.getProvider(e.name);if(t.isComponentSet())throw new Error(`Component ${e.name} has already been registered with ${this.name}`);t.setComponent(e)}addOrOverwriteComponent(e){this.getProvider(e.name).isComponentSet()&&this.providers.delete(e.name),this.addComponent(e)}getProvider(e){if(this.providers.has(e))return this.providers.get(e);const t=new EK(e,this);return this.providers.set(e,t),t}getProviders(){return Array.from(this.providers.values())}}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/var Bn;(function(r){r[r.DEBUG=0]="DEBUG",r[r.VERBOSE=1]="VERBOSE",r[r.INFO=2]="INFO",r[r.WARN=3]="WARN",r[r.ERROR=4]="ERROR",r[r.SILENT=5]="SILENT"})(Bn||(Bn={}));const SK={debug:Bn.DEBUG,verbose:Bn.VERBOSE,info:Bn.INFO,warn:Bn.WARN,error:Bn.ERROR,silent:Bn.SILENT},xK=Bn.INFO,bK={[Bn.DEBUG]:"log",[Bn.VERBOSE]:"log",[Bn.INFO]:"info",[Bn.WARN]:"warn",[Bn.ERROR]:"error"},IK=(r,e,...t)=>{if(e<r.logLevel)return;const n=new Date().toISOString(),i=bK[e];if(i)console[i](`[${n}] ${r.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};let FK=class{constructor(e){this.name=e,this._logLevel=xK,this._logHandler=IK,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Bn))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?SK[e]:e}get logHandler(){return this._logHandler}set logHandler(e){if(typeof e!="function")throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e}get userLogHandler(){return this._userLogHandler}set userLogHandler(e){this._userLogHandler=e}debug(...e){this._userLogHandler&&this._userLogHandler(this,Bn.DEBUG,...e),this._logHandler(this,Bn.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Bn.VERBOSE,...e),this._logHandler(this,Bn.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Bn.INFO,...e),this._logHandler(this,Bn.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Bn.WARN,...e),this._logHandler(this,Bn.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Bn.ERROR,...e),this._logHandler(this,Bn.ERROR,...e)}};const LK=(r,e)=>e.some(t=>r instanceof t);let LR,OR;function OK(){return LR||(LR=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function RK(){return OR||(OR=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const C6=new WeakMap,NT=new WeakMap,B6=new WeakMap,oC=new WeakMap,xI=new WeakMap;function MK(r){const e=new Promise((t,n)=>{const i=()=>{r.removeEventListener("success",a),r.removeEventListener("error",o)},a=()=>{t(wu(r.result)),i()},o=()=>{n(r.error),i()};r.addEventListener("success",a),r.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&C6.set(t,r)}).catch(()=>{}),xI.set(e,r),e}function NK(r){if(NT.has(r))return;const e=new Promise((t,n)=>{const i=()=>{r.removeEventListener("complete",a),r.removeEventListener("error",o),r.removeEventListener("abort",o)},a=()=>{t(),i()},o=()=>{n(r.error||new DOMException("AbortError","AbortError")),i()};r.addEventListener("complete",a),r.addEventListener("error",o),r.addEventListener("abort",o)});NT.set(r,e)}let PT={get(r,e,t){if(r instanceof IDBTransaction){if(e==="done")return NT.get(r);if(e==="objectStoreNames")return r.objectStoreNames||B6.get(r);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return wu(r[e])},set(r,e,t){return r[e]=t,!0},has(r,e){return r instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in r}};function PK(r){PT=r(PT)}function UK(r){return r===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=r.call(sC(this),e,...t);return B6.set(n,e.sort?e.sort():[e]),wu(n)}:RK().includes(r)?function(...e){return r.apply(sC(this),e),wu(C6.get(this))}:function(...e){return wu(r.apply(sC(this),e))}}function DK(r){return typeof r=="function"?UK(r):(r instanceof IDBTransaction&&NK(r),LK(r,OK())?new Proxy(r,PT):r)}function wu(r){if(r instanceof IDBRequest)return MK(r);if(oC.has(r))return oC.get(r);const e=DK(r);return e!==r&&(oC.set(r,e),xI.set(e,r)),e}const sC=r=>xI.get(r);function QK(r,e,{blocked:t,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(r,e),s=wu(o);return n&&o.addEventListener("upgradeneeded",A=>{n(wu(o.result),A.oldVersion,A.newVersion,wu(o.transaction))}),t&&o.addEventListener("blocked",()=>t()),s.then(A=>{a&&A.addEventListener("close",()=>a()),i&&A.addEventListener("versionchange",()=>i())}).catch(()=>{}),s}const HK=["get","getKey","getAll","getAllKeys","count"],GK=["put","add","delete","clear"],AC=new Map;function RR(r,e){if(!(r instanceof IDBDatabase&&!(e in r)&&typeof e=="string"))return;if(AC.get(e))return AC.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,i=GK.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(i||HK.includes(t)))return;const a=async function(o,...s){const A=this.transaction(o,i?"readwrite":"readonly");let l=A.store;return n&&(l=l.index(s.shift())),(await Promise.all([l[t](...s),i&&A.done]))[0]};return AC.set(e,a),a}PK(r=>({...r,get:(e,t,n)=>RR(e,t)||r.get(e,t,n),has:(e,t)=>!!RR(e,t)||r.has(e,t)}));/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class kK{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if($K(t)){const n=t.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(t=>t).join(" ")}}function $K(r){const e=r.getComponent();return(e==null?void 0:e.type)==="VERSION"}const UT="@firebase/app",MR="0.9.3";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Ah=new FK("@firebase/app"),VK="@firebase/app-compat",jK="@firebase/analytics-compat",KK="@firebase/analytics",zK="@firebase/app-check-compat",YK="@firebase/app-check",XK="@firebase/auth",WK="@firebase/auth-compat",qK="@firebase/database",ZK="@firebase/database-compat",JK="@firebase/functions",tz="@firebase/functions-compat",ez="@firebase/installations",rz="@firebase/installations-compat",nz="@firebase/messaging",iz="@firebase/messaging-compat",az="@firebase/performance",oz="@firebase/performance-compat",sz="@firebase/remote-config",Az="@firebase/remote-config-compat",lz="@firebase/storage",uz="@firebase/storage-compat",cz="@firebase/firestore",hz="@firebase/firestore-compat",fz="firebase";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const DT="[DEFAULT]",pz={[UT]:"fire-core",[VK]:"fire-core-compat",[KK]:"fire-analytics",[jK]:"fire-analytics-compat",[YK]:"fire-app-check",[zK]:"fire-app-check-compat",[XK]:"fire-auth",[WK]:"fire-auth-compat",[qK]:"fire-rtdb",[ZK]:"fire-rtdb-compat",[JK]:"fire-fn",[tz]:"fire-fn-compat",[ez]:"fire-iid",[rz]:"fire-iid-compat",[nz]:"fire-fcm",[iz]:"fire-fcm-compat",[az]:"fire-perf",[oz]:"fire-perf-compat",[sz]:"fire-rc",[Az]:"fire-rc-compat",[lz]:"fire-gcs",[uz]:"fire-gcs-compat",[cz]:"fire-fst",[hz]:"fire-fst-compat","fire-js":"fire-js",[fz]:"fire-js-all"};/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const h_=new Map,QT=new Map;function dz(r,e){try{r.container.addComponent(e)}catch(t){Ah.debug(`Component ${e.name} failed to register with FirebaseApp ${r.name}`,t)}}function f_(r){const e=r.name;if(QT.has(e))return Ah.debug(`There were multiple attempts to register component ${e}.`),!1;QT.set(e,r);for(const t of h_.values())dz(t,r);return!0}function vz(r,e){const t=r.container.getProvider("heartbeat").getImmediate({optional:!0});return t&&t.triggerHeartbeat(),r.container.getProvider(e)}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const gz={["no-app"]:"No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",["bad-app-name"]:"Illegal App name: '{$appName}",["duplicate-app"]:"Firebase App named '{$appName}' already exists with different options or config",["app-deleted"]:"Firebase App named '{$appName}' already deleted",["no-options"]:"Need to provide options, when not being deployed to hosting via source.",["invalid-app-argument"]:"firebase.{$appName}() takes either no argument or a Firebase App instance.",["invalid-log-argument"]:"First argument to `onLog` must be null or a function.",["idb-open"]:"Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",["idb-get"]:"Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",["idb-set"]:"Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",["idb-delete"]:"Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}."},Eu=new E6("app","Firebase",gz);/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class yz{constructor(e,t,n){this._isDeleted=!1,this._options=Object.assign({},e),this._config=Object.assign({},t),this._name=t.name,this._automaticDataCollectionEnabled=t.automaticDataCollectionEnabled,this._container=n,this.container.addComponent(new og("app",()=>this,"PUBLIC"))}get automaticDataCollectionEnabled(){return this.checkDestroyed(),this._automaticDataCollectionEnabled}set automaticDataCollectionEnabled(e){this.checkDestroyed(),this._automaticDataCollectionEnabled=e}get name(){return this.checkDestroyed(),this._name}get options(){return this.checkDestroyed(),this._options}get config(){return this.checkDestroyed(),this._config}get container(){return this._container}get isDeleted(){return this._isDeleted}set isDeleted(e){this._isDeleted=e}checkDestroyed(){if(this.isDeleted)throw Eu.create("app-deleted",{appName:this._name})}}function T6(r,e={}){let t=r;typeof e!="object"&&(e={name:e});const n=Object.assign({name:DT,automaticDataCollectionEnabled:!1},e),i=n.name;if(typeof i!="string"||!i)throw Eu.create("bad-app-name",{appName:String(i)});if(t||(t=dK()),!t)throw Eu.create("no-options");const a=h_.get(i);if(a){if(MT(t,a.options)&&MT(n,a.config))return a;throw Eu.create("duplicate-app",{appName:i})}const o=new TK(i);for(const A of QT.values())o.addComponent(A);const s=new yz(t,n,o);return h_.set(i,s),s}function mz(r=DT){const e=h_.get(r);if(!e&&r===DT)return T6();if(!e)throw Eu.create("no-app",{appName:r});return e}function op(r,e,t){var n;let i=(n=pz[r])!==null&&n!==void 0?n:r;t&&(i+=`-${t}`);const a=i.match(/\s|\//),o=e.match(/\s|\//);if(a||o){const s=[`Unable to register library "${i}" with version "${e}":`];a&&s.push(`library name "${i}" contains illegal characters (whitespace or "/")`),a&&o&&s.push("and"),o&&s.push(`version name "${e}" contains illegal characters (whitespace or "/")`),Ah.warn(s.join(" "));return}f_(new og(`${i}-version`,()=>({library:i,version:e}),"VERSION"))}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const _z="firebase-heartbeat-database",wz=1,sg="firebase-heartbeat-store";let lC=null;function S6(){return lC||(lC=QK(_z,wz,{upgrade:(r,e)=>{switch(e){case 0:r.createObjectStore(sg)}}}).catch(r=>{throw Eu.create("idb-open",{originalErrorMessage:r.message})})),lC}async function Ez(r){try{return(await S6()).transaction(sg).objectStore(sg).get(x6(r))}catch(e){if(e instanceof Gp)Ah.warn(e.message);else{const t=Eu.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});Ah.warn(t.message)}}}async function NR(r,e){try{const n=(await S6()).transaction(sg,"readwrite");return await n.objectStore(sg).put(e,x6(r)),n.done}catch(t){if(t instanceof Gp)Ah.warn(t.message);else{const n=Eu.create("idb-set",{originalErrorMessage:t==null?void 0:t.message});Ah.warn(n.message)}}}function x6(r){return`${r.name}!${r.options.appId}`}/**
* @license
* Copyright 2021 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Cz=1024,Bz=30*24*60*60*1e3;class Tz{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new xz(t),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}async triggerHeartbeat(){const t=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),n=PR();if(this._heartbeatsCache===null&&(this._heartbeatsCache=await this._heartbeatsCachePromise),!(this._heartbeatsCache.lastSentHeartbeatDate===n||this._heartbeatsCache.heartbeats.some(i=>i.date===n)))return this._heartbeatsCache.heartbeats.push({date:n,agent:t}),this._heartbeatsCache.heartbeats=this._heartbeatsCache.heartbeats.filter(i=>{const a=new Date(i.date).valueOf();return Date.now()-a<=Bz}),this._storage.overwrite(this._heartbeatsCache)}async getHeartbeatsHeader(){if(this._heartbeatsCache===null&&await this._heartbeatsCachePromise,this._heartbeatsCache===null||this._heartbeatsCache.heartbeats.length===0)return"";const e=PR(),{heartbeatsToSend:t,unsentEntries:n}=Sz(this._heartbeatsCache.heartbeats),i=_6(JSON.stringify({version:2,heartbeats:t}));return this._heartbeatsCache.lastSentHeartbeatDate=e,n.length>0?(this._heartbeatsCache.heartbeats=n,await this._storage.overwrite(this._heartbeatsCache)):(this._heartbeatsCache.heartbeats=[],this._storage.overwrite(this._heartbeatsCache)),i}}function PR(){return new Date().toISOString().substring(0,10)}function Sz(r,e=Cz){const t=[];let n=r.slice();for(const i of r){const a=t.find(o=>o.agent===i.agent);if(a){if(a.dates.push(i.date),UR(t)>e){a.dates.pop();break}}else if(t.push({agent:i.agent,dates:[i.date]}),UR(t)>e){t.pop();break}n=n.slice(1)}return{heartbeatsToSend:t,unsentEntries:n}}class xz{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return gK()?yK().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await Ez(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return NR(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:e.heartbeats})}else return}async add(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return NR(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function UR(r){return _6(JSON.stringify({version:2,heartbeats:r})).length}/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function bz(r){f_(new og("platform-logger",e=>new kK(e),"PRIVATE")),f_(new og("heartbeat",e=>new Tz(e),"PRIVATE")),op(UT,MR,r),op(UT,MR,"esm2017"),op("fire-js","")}bz("");var Iz="firebase",Fz="9.17.1";/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/op(Iz,Fz,"app");const Lz={},DR=T6(Lz);/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Oz="type.googleapis.com/google.protobuf.Int64Value",Rz="type.googleapis.com/google.protobuf.UInt64Value";function b6(r,e){const t={};for(const n in r)r.hasOwnProperty(n)&&(t[n]=e(r[n]));return t}function HT(r){if(r==null)return null;if(r instanceof Number&&(r=r.valueOf()),typeof r=="number"&&isFinite(r)||r===!0||r===!1||Object.prototype.toString.call(r)==="[object String]")return r;if(r instanceof Date)return r.toISOString();if(Array.isArray(r))return r.map(e=>HT(e));if(typeof r=="function"||typeof r=="object")return b6(r,e=>HT(e));throw new Error("Data cannot be encoded in JSON: "+r)}function p_(r){if(r==null)return r;if(r["@type"])switch(r["@type"]){case Oz:case Rz:{const e=Number(r.value);if(isNaN(e))throw new Error("Data cannot be decoded from JSON: "+r);return e}default:throw new Error("Data cannot be decoded from JSON: "+r)}return Array.isArray(r)?r.map(e=>p_(e)):typeof r=="function"||typeof r=="object"?b6(r,e=>p_(e)):r}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const bI="functions";/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const QR={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class sp extends Gp{constructor(e,t,n){super(`${bI}/${e}`,t||""),this.details=n}}function Mz(r){if(r>=200&&r<300)return"ok";switch(r){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function Nz(r,e){let t=Mz(r),n=t,i;try{const a=e&&e.error;if(a){const o=a.status;if(typeof o=="string"){if(!QR[o])return new sp("internal","internal");t=QR[o],n=o}const s=a.message;typeof s=="string"&&(n=s),i=a.details,i!==void 0&&(i=p_(i))}}catch{}return t==="ok"?null:new sp(t,n,i)}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class Pz{constructor(e,t,n){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=e.getImmediate({optional:!0}),this.messaging=t.getImmediate({optional:!0}),this.auth||e.get().then(i=>this.auth=i,()=>{}),this.messaging||t.get().then(i=>this.messaging=i,()=>{}),this.appCheck||n.get().then(i=>this.appCheck=i,()=>{})}async getAuthToken(){if(this.auth)try{const e=await this.auth.getToken();return e==null?void 0:e.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(){if(this.appCheck){const e=await this.appCheck.getToken();return e.error?null:e.token}return null}async getContext(){const e=await this.getAuthToken(),t=await this.getMessagingToken(),n=await this.getAppCheckToken();return{authToken:e,messagingToken:t,appCheckToken:n}}}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const GT="us-central1";function Uz(r){let e=null;return{promise:new Promise((t,n)=>{e=setTimeout(()=>{n(new sp("deadline-exceeded","deadline-exceeded"))},r)}),cancel:()=>{e&&clearTimeout(e)}}}class Dz{constructor(e,t,n,i,a=GT,o){this.app=e,this.fetchImpl=o,this.emulatorOrigin=null,this.contextProvider=new Pz(t,n,i),this.cancelAllRequests=new Promise(s=>{this.deleteService=()=>Promise.resolve(s())});try{const s=new URL(a);this.customDomain=s.origin,this.region=GT}catch{this.customDomain=null,this.region=a}}_delete(){return this.deleteService()}_url(e){const t=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${t}/${this.region}/${e}`:this.customDomain!==null?`${this.customDomain}/${e}`:`https://${this.region}-${t}.cloudfunctions.net/${e}`}}function Qz(r,e,t){r.emulatorOrigin=`http://${e}:${t}`}function Hz(r,e,t){return n=>kz(r,e,n,t||{})}async function Gz(r,e,t,n){t["Content-Type"]="application/json";let i;try{i=await n(r,{method:"POST",body:JSON.stringify(e),headers:t})}catch{return{status:0,json:null}}let a=null;try{a=await i.json()}catch{}return{status:i.status,json:a}}function kz(r,e,t,n){const i=r._url(e);return $z(r,i,t,n)}async function $z(r,e,t,n){t=HT(t);const i={data:t},a={},o=await r.contextProvider.getContext();o.authToken&&(a.Authorization="Bearer "+o.authToken),o.messagingToken&&(a["Firebase-Instance-ID-Token"]=o.messagingToken),o.appCheckToken!==null&&(a["X-Firebase-AppCheck"]=o.appCheckToken);const s=n.timeout||7e4,A=Uz(s),l=await Promise.race([Gz(e,i,a,r.fetchImpl),A.promise,r.cancelAllRequests]);if(A.cancel(),!l)throw new sp("cancelled","Firebase Functions instance was deleted.");const u=Nz(l.status,l.json);if(u)throw u;if(!l.json)throw new sp("internal","Response is not valid JSON object.");let c=l.json.data;if(typeof c>"u"&&(c=l.json.result),typeof c>"u")throw new sp("internal","Response is missing data field.");return{data:p_(c)}}const HR="@firebase/functions",GR="0.9.3";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const Vz="auth-internal",jz="app-check-internal",Kz="messaging-internal";function zz(r,e){const t=(n,{instanceIdentifier:i})=>{const a=n.getProvider("app").getImmediate(),o=n.getProvider(Vz),s=n.getProvider(Kz),A=n.getProvider(jz);return new Dz(a,o,s,A,i,r)};f_(new og(bI,t,"PUBLIC").setMultipleInstances(!0)),op(HR,GR,e),op(HR,GR,"esm2017")}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function kR(r=mz(),e=GT){const n=vz(SI(r),bI).getImmediate({identifier:e}),i=pK("functions");return i&&kT(n,...i),n}function kT(r,e,t){Qz(SI(r),e,t)}function $R(r,e,t){return Hz(SI(r),e,t)}zz(fetch.bind(self));const Yz=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},Xz={name:"MapsOverlay",data(){const r=Gn(IR([-7.5029786,53.4494762])),e=Gn("EPSG:3857"),t=Gn(7),n=Gn(0),i=Gn(10),a=Gn(1),o=Gn("black"),s=Gn("red");return{center:r,projection:e,zoom:t,rotation:n,radius:i,strokeWidth:a,strokeColor:o,fillColor:s,coordinates:[],dbLiveTrainData:[],allDataMap:{},selectedDataMap:{},display:!1}},created(){console.log("jere"),this.getLiveTrainData()},methods:{getLiveTrainData(){const r=kR(DR);window.location.hostname==="127.0.0.1"&&kT(r,"localhost",5001);const e=$R(r,"getLiveTrainData");let t=this.$loading.show({loader:"dots",container:this.$refs.container,canCancel:!1});e().then(n=>{try{this.dbLiveTrainData=n.data;for(var i=0;i<this.dbLiveTrainData.length;i++)this.coordinates[i]=Gn(IR([this.dbLiveTrainData[i].TrainLongitude[0],this.dbLiveTrainData[i].TrainLatitude[0]])),this.allDataMap[i]=this.dbLiveTrainData[i];t.hide()}catch{t.hide()}})},getSelectedTrain(r){this.display=!0,this.selectedDataMap.TrainCode=this.allDataMap[r].TrainCode[0],this.selectedDataMap.TrainDate=this.allDataMap[r].TrainDate[0],this.selectedDataMap.TrainStatus=this.allDataMap[r].TrainStatus[0],this.selectedDataMap.TrainLongitude=this.allDataMap[r].TrainLongitude[0],this.selectedDataMap.TrainLatitude=this.allDataMap[r].TrainLatitude[0],this.selectedDataMap.Direction=this.allDataMap[r].Direction[0],this.selectedDataMap.PublicMessage=this.allDataMap[r].PublicMessage[0]},postLiveTrainData(){const r=kR(DR);window.location.hostname==="127.0.0.1"&&kT(r,"localhost",5001),$R(r,"postLiveTrainData")().then(t=>{console.log("Test")})}}},I6=r=>(aD("data-v-b6d78a5d"),r=r(),oD(),r),Wz={key:0,id:"sidebarDiv"},qz={id:"sidebarHeader"},Zz=I6(()=>Ki("img",{id:"headerImage",src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png"},null,-1)),Jz={id:"sidebarDiv"},tY=["onClick"],eY=I6(()=>Ki("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",class:"trainMapIcon"},null,-1)),rY=[eY];function nY(r,e,t,n,i,a){const o=Lf("ol-view"),s=Lf("ol-source-osm"),A=Lf("ol-tile-layer"),l=Lf("ol-overlay"),u=Lf("ol-map");return cn(),Vn(Ri,null,[Ki("button",{onClick:e[0]||(e[0]=(...c)=>a.getLiveTrainData&&a.getLiveTrainData(...c))},"Fetch Data"),Ki("button",{onClick:e[1]||(e[1]=(...c)=>a.postLiveTrainData&&a.postLiveTrainData(...c))},"Populate Database"),Wr($1,{id:"sidebar",name:"slideLeft"},{default:Nc(()=>[this.display?(cn(),Vn("div",Wz,[Ki("div",qz,[Zz,Ki("div",{onClick:e[2]||(e[2]=c=>this.display=!1),id:"xButton"},"X")]),Ki("div",Jz,[Ki("h2",null,"Train Code: "+tu(i.selectedDataMap.TrainCode),1),Ki("p",null,"Date: "+tu(i.selectedDataMap.TrainDate),1),Ki("p",null,"Status: "+tu(i.selectedDataMap.TrainStatus),1),Ki("p",null,"Longitude: "+tu(i.selectedDataMap.TrainLongitude),1),Ki("p",null,"Latitude: "+tu(i.selectedDataMap.TrainLatitude),1),Ki("p",null,"Direction: "+tu(i.selectedDataMap.Direction),1),Ki("p",null,"Public Message: "+tu(i.selectedDataMap.PublicMessage),1)])])):dr("",!0)]),_:1}),Wr(u,{loadTilesWhileAnimating:!0,loadTilesWhileInteracting:!0,style:{height:"1000px"}},{default:Nc(()=>[Wr(o,{ref:"view",center:i.center,rotation:i.rotation,zoom:i.zoom,projection:i.projection},null,8,["center","rotation","zoom","projection"]),Wr(A,null,{default:Nc(()=>[Wr(s)]),_:1}),(cn(!0),Vn(Ri,null,CD(i.coordinates,(c,h)=>(cn(),$g(l,{position:c},{default:Nc(()=>[Ki("div",{class:"overlay-content",onClick:f=>a.getSelectedTrain(h)},rY,8,tY)]),_:2},1032,["position"]))),256))]),_:1})],64)}const iY=Yz(Xz,[["render",nY],["__scopeId","data-v-b6d78a5d"]]),aY={__name:"App",setup(r){return(e,t)=>(cn(),$g(iY))}};var oY=Object.defineProperty,sY=Object.defineProperties,AY=Object.getOwnPropertyDescriptors,VR=Object.getOwnPropertySymbols,lY=Object.prototype.hasOwnProperty,uY=Object.prototype.propertyIsEnumerable,jR=(r,e,t)=>e in r?oY(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Un=(r,e)=>{for(var t in e||(e={}))lY.call(e,t)&&jR(r,t,e[t]);if(VR)for(var t of VR(e))uY.call(e,t)&&jR(r,t,e[t]);return r},Os=(r,e)=>sY(r,AY(e)),cY=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}(),V1=cY;function hY(r,e,t){for(var n,i,a=t||Nu,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 Nu(r,e){return r>e?1:r<e?-1:0}function yi(r,e){return r.indexOf(e)>=0}function j1(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 fY(r,e,t){for(;e<t;){var n=r[e];r[e]=r[t],r[t]=n,++e,--t}}function Qr(r,e){for(var t=Array.isArray(e)?e:[e],n=t.length,i=0;i<n;i++)r[r.length]=t[i]}function yl(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 pY(r,e,t){var n=e||Nu;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 iA(){return!0}function Ch(){return!1}function lh(){}function dY(r){var e=!1,t,n,i;return function(){var a=Array.prototype.slice.call(arguments);return(!e||this!==i||!yl(a,n))&&(e=!0,i=this,n=a,t=r.apply(this,arguments)),t}}function Be(){return function(){throw new Error("Unimplemented abstract method.")}()}var vY=0;function pe(r){return r.ol_uid||(r.ol_uid=String(++vY))}var F6="6.14.1",Pu=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",gY=Pu.indexOf("firefox")!==-1,yY=Pu.indexOf("safari")!==-1&&Pu.indexOf("chrom")==-1,mY=yY&&!!(Pu.indexOf("version/15.4")>=0||Pu.match(/cpu (os|iphone os) 15_4 like mac os x/)),_Y=Pu.indexOf("webkit")!==-1&&Pu.indexOf("edge")==-1,L6=Pu.indexOf("macintosh")!==-1,uh=typeof devicePixelRatio<"u"?devicePixelRatio:1,K1=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,wY=typeof Image<"u"&&Image.prototype.decode,O6=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}(),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)}}(),CY=function(r){EY(e,r);function e(t){var n=this,i="v"+F6.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),R6=CY;function _e(r,e){if(!r)throw new R6(e)}var II=new Array(6);function oi(){return[1,0,0,1,0,0]}function Nv(r){return jg(r,1,0,0,1,0,0)}function kp(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=r[4],s=r[5],A=e[0],l=e[1],u=e[2],c=e[3],h=e[4],f=e[5];return r[0]=t*A+i*l,r[1]=n*A+a*l,r[2]=t*u+i*c,r[3]=n*u+a*c,r[4]=t*h+i*f+o,r[5]=n*h+a*f+s,r}function jg(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 BY(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 un(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 TY(r,e){var t=Math.cos(e),n=Math.sin(e);return kp(r,jg(II,t,n,-n,t,0,0))}function Pv(r,e,t){return kp(r,jg(II,e,0,0,t,0,0))}function SY(r,e,t){return jg(r,e,0,0,t,0,0)}function xY(r,e,t){return kp(r,jg(II,1,0,0,1,e,t))}function $a(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 Kg(r,e){var t=bY(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 bY(r){return r[0]*r[3]-r[1]*r[2]}var KR;function FI(r){var e="matrix("+r.join(", ")+")";if(K1)return e;var t=KR||(KR=document.createElement("div"));return t.style.transform=e,t.style.transform}var cv={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},zi={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function Yi(r){for(var e=_i(),t=0,n=r.length;t<n;++t)Yc(e,r[t]);return e}function IY(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 uo(n,i,a,o,t)}function Va(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 LI(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r.slice()}function Xu(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 xs(r,e){return z1(r,e[0],e[1])}function Fo(r,e){return r[0]<=e[0]&&e[2]<=r[2]&&r[1]<=e[1]&&e[3]<=r[3]}function z1(r,e,t){return r[0]<=e&&e<=r[2]&&r[1]<=t&&t<=r[3]}function d_(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=e[0],s=e[1],A=zi.UNKNOWN;return o<t?A=A|zi.LEFT:o>i&&(A=A|zi.RIGHT),s<n?A=A|zi.BELOW:s>a&&(A=A|zi.ABOVE),A===zi.UNKNOWN&&(A=zi.INTERSECTING),A}function _i(){return[1/0,1/0,-1/0,-1/0]}function uo(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 Wu(r){return uo(1/0,1/0,-1/0,-1/0,r)}function zc(r,e){var t=r[0],n=r[1];return uo(t,n,t,n,e)}function FY(r,e){var t=Wu(e);return OI(t,r)}function Y1(r,e,t,n,i){var a=Wu(i);return RI(a,r,e,t,n)}function LY(r,e){var t=Wu(e);return M6(t,r)}function AA(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function OY(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 Uu(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 Yc(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 OI(r,e){for(var t=0,n=e.length;t<n;++t)Yc(r,e[t]);return r}function RI(r,e,t,n,i){for(;t<n;t+=i)N6(r,e[t],e[t+1]);return r}function M6(r,e){for(var t=0,n=e.length;t<n;++t)OI(r,e[t]);return r}function N6(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 X1(r,e){var t;return t=e(zg(r)),t||(t=e($p(r)),t)||(t=e(Yg(r)),t)||(t=e(Rs(r)),t)?t:!1}function Ag(r){var e=0;return Vp(r)||(e=Fr(r)*Ai(r)),e}function zg(r){return[r[0],r[1]]}function $p(r){return[r[2],r[1]]}function Sa(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function P6(r,e){var t;return e===cv.BOTTOM_LEFT?t=zg(r):e===cv.BOTTOM_RIGHT?t=$p(r):e===cv.TOP_LEFT?t=Rs(r):e===cv.TOP_RIGHT?t=Yg(r):_e(!1,13),t}function RY(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 Xc(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,c=o*s,h=o*A,f=r[0],p=r[1],v=f-l+h,m=f-l-h,g=f+l-h,_=f+l+h,E=p-u-c,B=p-u+c,L=p+u+c,O=p+u-c;return uo(Math.min(v,m,g,_),Math.min(E,B,L,O),Math.max(v,m,g,_),Math.max(E,B,L,O),i)}function Ai(r){return r[3]-r[1]}function MY(r,e){var t=Jo(r,e);return Ag(t)}function Jo(r,e,t){var n=t||_i();return Mn(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]):Wu(n),n}function NY(r){return Fr(r)+Ai(r)}function PY(r){return[r[2]-r[0],r[3]-r[1]]}function Rs(r){return[r[0],r[3]]}function Yg(r){return[r[2],r[3]]}function Fr(r){return r[2]-r[0]}function Mn(r,e){return r[0]<=e[2]&&r[2]>=e[0]&&r[1]<=e[3]&&r[3]>=e[1]}function Vp(r){return r[2]<r[0]||r[3]<r[1]}function U6(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r}function D6(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 Q6(r,e,t){var n=!1,i=d_(r,e),a=d_(r,t);if(i===zi.INTERSECTING||a===zi.INTERSECTING)n=!0;else{var o=r[0],s=r[1],A=r[2],l=r[3],u=e[0],c=e[1],h=t[0],f=t[1],p=(f-c)/(h-u),v=void 0,m=void 0;a&zi.ABOVE&&!(i&zi.ABOVE)&&(v=h-(f-l)/p,n=v>=o&&v<=A),!n&&a&zi.RIGHT&&!(i&zi.RIGHT)&&(m=f-(h-A)*p,n=m>=s&&m<=l),!n&&a&zi.BELOW&&!(i&zi.BELOW)&&(v=h-(f-s)/p,n=v>=o&&v<=A),!n&&a&zi.LEFT&&!(i&zi.LEFT)&&(m=f-(h-o)*p,n=m>=s&&m<=l)}return n}function MI(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 IY(A,l,t)}function H6(r,e){var t=e.getExtent(),n=Sa(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 UY=Object.freeze(Object.defineProperty({__proto__:null,boundingExtent:Yi,buffer:Va,clone:LI,closestSquaredDistanceXY:Xu,containsCoordinate:xs,containsExtent:Fo,containsXY:z1,coordinateRelationship:d_,createEmpty:_i,createOrUpdate:uo,createOrUpdateEmpty:Wu,createOrUpdateFromCoordinate:zc,createOrUpdateFromCoordinates:FY,createOrUpdateFromFlatCoordinates:Y1,createOrUpdateFromRings:LY,equals:AA,approximatelyEquals:OY,extend:Uu,extendCoordinate:Yc,extendCoordinates:OI,extendFlatCoordinates:RI,extendRings:M6,extendXY:N6,forEachCorner:X1,getArea:Ag,getBottomLeft:zg,getBottomRight:$p,getCenter:Sa,getCorner:P6,getEnlargedArea:RY,getForViewAndSize:Xc,getHeight:Ai,getIntersectionArea:MY,getIntersection:Jo,getMargin:NY,getSize:PY,getTopLeft:Rs,getTopRight:Yg,getWidth:Fr,intersects:Mn,isEmpty:Vp,returnOrUpdate:U6,scaleFromCenter:D6,intersectsSegment:Q6,applyTransform:MI,wrapX:H6},Symbol.toStringTag,{value:"Module"}));function xn(r,e,t){return Math.min(Math.max(r,e),t)}var DY=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),G6=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function QY(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 Wc(r,e,t,n)}function Wc(r,e,t,n){var i=t-r,a=n-e;return i*i+a*a}function HY(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 c=new Array(e),h=e-1;h>=0;h--){c[h]=r[h][e]/r[h][h];for(var f=h-1;f>=0;f--)r[f][e]-=r[f][h]*c[h]}return c}function zR(r){return r*180/Math.PI}function Cu(r){return r*Math.PI/180}function Bu(r,e){var t=r%e;return t*e<0?t+e:t}function YA(r,e,t){return r+t*(e-r)}function NI(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}function YR(r,e){return Math.round(NI(r,e))}function $f(r,e){return Math.floor(NI(r,e))}function lu(r,e){return Math.ceil(NI(r,e))}var k6=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,$6=/^([a-z]*)$|^hsla?\(.*\)$/i;function tl(r){return typeof r=="string"?r:K6(r)}function V6(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 j6=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=GY(n),e[n]=i,++t}return i}}();function Du(r){return Array.isArray(r)?r:j6(r)}function GY(r){var e,t,n,i,a;if($6.exec(r)&&(r=V6(r)),k6.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),XR(a)):r.indexOf("rgb(")==0?(a=r.slice(4,-1).split(",").map(Number),a.push(1),XR(a)):_e(!1,14);return a}function XR(r){return r[0]=xn(r[0]+.5|0,0,255),r[1]=xn(r[1]+.5|0,0,255),r[2]=xn(r[2]+.5|0,0,255),r[3]=xn(r[3],0,1),r}function K6(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 kY(r){return $6.test(r)&&(r=V6(r)),k6.test(r)||r.indexOf("rgba(")===0||r.indexOf("rgb(")===0}var $Y=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=WR(e,t,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(e,t,n,i){var a=WR(e,t,n);this.cache_[a]=i,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function WR(r,e,t){var n=t?tl(t):"null";return e+":"+r+":"+n}var v_=new $Y,VY=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 jY(r){r.stopPropagation()}var fo=VY,ch={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 Bh(r){for(var e in r)delete r[e]}var PI=typeof Object.values=="function"?Object.values:function(r){var e=[];for(var t in r)e.push(r[t]);return e};function hh(r){var e;for(e in r)return!1;return!e}var KY=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)}}(),zY=function(r){KY(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 fo(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,c=a.length;u<c;++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 h=A[i];for(delete A[i];h--;)this.removeEventListener(i,lh);delete s[i]}return l}},e.prototype.disposeInternal=function(){this.listeners_&&Bh(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]=lh,++this.pendingRemovals_[t]):(i.splice(a,1),i.length===0&&delete this.listeners_[t]))}},e}(V1),Th=zY,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 lg(r,e,t,n){return Pe(r,e,t,n,!0)}function Rr(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),Bh(r))}var YY=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)}}(),Xg=function(r){YY(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]=lg(this,t[o],n)}else i=lg(this,t,n);return n.ol_key=i,i},e.prototype.unInternal=function(t,n){var i=n.ol_key;if(i)No(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}(Th);Xg.prototype.on;Xg.prototype.once;Xg.prototype.un;function No(r){if(Array.isArray(r))for(var e=0,t=r.length;e<t;++e)Rr(r[e]);else Rr(r)}var z6=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){z6(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.key=n,a.oldValue=i,a}return e}(fo),XY=function(r){z6(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 qR(i,t,n)),i=ch.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new qR(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],hh(this.values_)&&(this.values_=null),n||this.notify(t,i)}},e}(Xg),li=XY,Dr={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"},WY=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)}}(),qY=function(r){WY(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[Dr.OPACITY]=t.opacity!==void 0?t.opacity:1,_e(typeof i[Dr.OPACITY]=="number",64),i[Dr.VISIBLE]=t.visible!==void 0?t.visible:!0,i[Dr.Z_INDEX]=t.zIndex,i[Dr.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,i[Dr.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,i[Dr.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,i[Dr.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=xn(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 Be()},e.prototype.getLayerStatesArray=function(t){return Be()},e.prototype.getExtent=function(){return this.get(Dr.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(Dr.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(Dr.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(Dr.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(Dr.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(Dr.OPACITY)},e.prototype.getSourceState=function(){return Be()},e.prototype.getVisible=function(){return this.get(Dr.VISIBLE)},e.prototype.getZIndex=function(){return this.get(Dr.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Dr.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(Dr.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(Dr.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(Dr.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(Dr.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){_e(typeof t=="number",64),this.set(Dr.OPACITY,t)},e.prototype.setVisible=function(t){this.set(Dr.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(Dr.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),r.prototype.disposeInternal.call(this)},e}(li),UI=qY,ao={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},Da={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},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)}}(),JY=function(r){ZY(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(Dr.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(Dr.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():Da.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(Dr.MAP,t)},e.prototype.getMapInternal=function(){return this.get(Dr.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,ao.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(Dr.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}(UI);function g_(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 Sh=JY;function Gd(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 Y6(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 X6(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function tX(r,e){var t=e.getRadius(),n=e.getCenter(),i=n[0],a=n[1],o=r[0],s=r[1],A=o-i,l=s-a;A===0&&l===0&&(A=1);var u=Math.sqrt(A*A+l*l),c=i+t*A/u,h=a+t*l/u;return[c,h]}function DI(r,e){var t=r[0],n=r[1],i=e[0],a=e[1],o=i[0],s=i[1],A=a[0],l=a[1],u=A-o,c=l-s,h=u===0&&c===0?0:(u*(t-o)+c*(n-s))/(u*u+c*c||0),f,p;return h<=0?(f=o,p=s):h>=1?(f=A,p=l):(f=o+h*u,p=s+h*c),[f,p]}function _s(r,e){for(var t=!0,n=r.length-1;n>=0;--n)if(r[n]!=e[n]){t=!1;break}return t}function QI(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 W6(r,e){return r[0]*=e,r[1]*=e,r}function el(r,e){var t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function ZR(r,e){return Math.sqrt(el(r,e))}function eX(r,e){return el(r,DI(r,e))}function HI(r,e){if(e.canWrapX()){var t=Fr(e.getExtent()),n=q6(r,e,t);n&&(r[0]-=n*t)}return r}function q6(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 rX=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)}}(),nX=function(r){rX(e,r);function e(t){var n=r.call(this)||this;return n.map_=t,n}return e.prototype.dispatchRenderEvent=function(t,n){Be()},e.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,a=t.pixelToCoordinateTransform;$a(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),Kg(a,i)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o,s,A,l){var u,c=n.viewState;function h(X,z,tt,J){return o.call(s,z,X?tt:null,J)}var f=c.projection,p=HI(t.slice(),f),v=[[0,0]];if(f.canWrapX()&&a){var m=f.getExtent(),g=Fr(m);v.push([-g,0],[g,0])}for(var _=n.layerStatesArray,E=_.length,B=[],L=[],O=0;O<v.length;O++)for(var b=E-1;b>=0;--b){var T=_[b],I=T.layer;if(I.hasRenderer()&&g_(T,c)&&A.call(l,I)){var M=I.getRenderer(),x=I.getSource();if(M&&x){var S=x.getWrapX()?p:t,N=h.bind(null,T.managed);L[0]=S[0]+v[O][0],L[1]=S[1]+v[O][1],u=M.forEachFeatureAtCoordinate(L,n,i,N,B)}if(u)return u}}if(B.length!==0){var P=1/B.length;return B.forEach(function(X,z){return X.distanceSq+=z*P}),B.sort(function(X,z){return X.distanceSq-z.distanceSq}),B.some(function(X){return u=X.callback(X.feature,X.layer,X.geometry)}),u}},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){return Be()},e.prototype.hasFeatureAtCoordinate=function(t,n,i,a,o,s){var A=this.forEachFeatureAtCoordinate(t,n,i,a,iA,this,o,s);return A!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Be()},e.prototype.scheduleExpireIconCache=function(t){v_.canExpireCache()&&t.postRenderFunctions.push(iX)},e}(V1);function iX(r,e){v_.expire()}var aX=nX,oX=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)}}(),sX=function(r){oX(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}(fo),Uv=sX,wm="ol-hidden",AX="ol-selectable",lA="ol-unselectable",JR="ol-unsupported",xh="ol-control",y_="ol-collapsed",lX=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"),tM=["style","variant","weight","size","lineHeight","family"],Z6=function(r){var e=r.match(lX);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=tM.length;n<i;++n){var a=e[n+1];a!==void 0&&(t[tM[n]]=a)}return t.families=t.family.split(/,\s?/),t};function J6(r){return r===1?"":String(Math.round(r*100)/100)}function ja(r,e,t,n){var i;return t&&t.length?i=t.shift():K1?i=new OffscreenCanvas(r||300,e||300):i=document.createElement("canvas"),r&&(i.width=r),e&&(i.height=e),i.getContext("2d",n)}function uX(r){var e=r.offsetWidth,t=getComputedStyle(r);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function cX(r){var e=r.offsetHeight,t=getComputedStyle(r);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function Bp(r,e){var t=e.parentNode;t&&t.replaceChild(r,e)}function m_(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function tQ(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function hX(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 eQ="10px sans-serif",rl="#000",__="round",ug=[],cg=0,Tp="round",hg=10,fg="#000",pg="center",w_="middle",Uc=[0,0,0,0],dg=1,VA=new li,fX=new Th;fX.setSize=function(){console.warn("labelCache is deprecated.")};var Of=null,$T,VT={},pX=function(){var r=100,e="32px ",t=["monospace","serif"],n=t.length,i="wmytzilWMYTZIL@#/&?$%10",a,o;function s(l,u,c){for(var h=!0,f=0;f<n;++f){var p=t[f];if(o=E_(l+" "+u+" "+e+p,i),c!=p){var v=E_(l+" "+u+" "+e+c+","+p,i);h=h&&v!=o}}return!!h}function A(){for(var l=!0,u=VA.getKeys(),c=0,h=u.length;c<h;++c){var f=u[c];VA.get(f)<r&&(s.apply(this,f.split(`
`))?(Bh(VT),Of=null,$T=void 0,VA.set(f,r)):(VA.set(f,VA.get(f)+1,!0),l=!1))}l&&(clearInterval(a),a=void 0)}return function(l){var u=Z6(l);if(u)for(var c=u.families,h=0,f=c.length;h<f;++h){var p=c[h],v=u.style+`
`+u.weight+`
`+p;VA.get(v)===void 0&&(VA.set(v,r,!0),s(u.style,u.weight,p)||(VA.set(v,0,!0),a===void 0&&(a=setInterval(A,32))))}}}(),dX=function(){var r;return function(e){var t=VT[e];if(t==null){if(K1){var n=Z6(e),i=rQ(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);VT[e]=t}return t}}();function rQ(r,e){return Of||(Of=ja(1,1)),r!=$T&&(Of.font=r,$T=Of.font),Of.measureText(e)}function E_(r,e){return rQ(r,e).width}function eM(r,e,t){if(e in t)return t[e];var n=E_(r,e);return t[e]=n,n}function vX(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 c=e[l];if(c===`
`||l===u){a=Math.max(a,o),i.push(o),o=0,s+=A;continue}var h=e[l+1]||r.font,f=E_(h,c);t.push(f),o+=f;var p=dX(h);n.push(p),A=Math.max(A,p)}return{width:a,height:s,widths:t,heights:n,lineWidths:i}}function gX(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]),yX(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 yX(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 mX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),_X=function(r){mX(e,r);function e(t){var n=r.call(this,t)||this;n.fontChangeListenerKey_=Pe(VA,ch.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=lA+" 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 Uv(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(ao.PRECOMPOSE,t);var n=t.layerStatesArray.sort(function(f,p){return f.zIndex-p.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,c=u.getSourceState();if(!g_(l,i)||c!=Da.READY&&c!=Da.UNDEFINED){u.unrender();continue}var h=u.render(t,o);h&&(h!==o&&(this.children_.push(h),o=h),"getDeclutter"in u&&a.push(u))}for(var s=a.length-1;s>=0;--s)a[s].renderDeclutter(t);hX(this.element_,this.children_),this.dispatchRenderEvent(ao.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){for(var s=n.viewState,A=n.layerStatesArray,l=A.length,u=l-1;u>=0;--u){var c=A[u],h=c.layer;if(h.hasRenderer()&&g_(c,s)&&o(h)){var f=h.getRenderer(),p=f.getDataAtPixel(t,n,i);if(p){var v=a(h,p);if(v)return v}}}},e}(aX),nQ=_X,kn={ADD:"add",REMOVE:"remove"},iQ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rM={LENGTH:"length"},Em=function(r){iQ(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.element=n,a.index=i,a}return e}(fo),wX=function(r){iQ(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(rM.LENGTH)},e.prototype.insertAt=function(t,n){this.unique_&&this.assertUnique_(n),this.array_.splice(t,0,n),this.updateLength_(),this.dispatchEvent(new Em(kn.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 Em(kn.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 Em(kn.REMOVE,a,t)),this.dispatchEvent(new Em(kn.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(rM.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 R6(58)},e}(li),si=wX,aQ=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)}}(),ou=function(r){aQ(e,r);function e(t,n){var i=r.call(this,t)||this;return i.layer=n,i}return e}(fo),uC={LAYERS:"layers"},EX=function(r){aQ(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(uC.LAYERS,n.handleLayersChanged_),o?Array.isArray(o)?o=new si(o.slice(),{unique:!0}):_e(typeof o.getArray=="function",43):o=new si(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,kn.ADD,this.handleLayersAdd_,this),Pe(t,kn.REMOVE,this.handleLayersRemove_,this));for(var n in this.listenerKeys_)this.listenerKeys_[n].forEach(Rr);Bh(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 ou("addlayer",s))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[Pe(t,ch.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 ou("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new ou("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var n=t.element;this.registerLayerListeners_(n),this.dispatchEvent(new ou("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 ou("removelayer",n)),this.changed()},e.prototype.getLayers=function(){return this.get(uC.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 ou("removelayer",i[a]));this.set(uC.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=Jo(l.extent,a.extent):l.extent=a.extent),l.zIndex===void 0&&(l.zIndex=o)}return n},e.prototype.getSourceState=function(){return Da.READY},e}(UI),Wg=EX,CX=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)}}(),BX=function(r){CX(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}(fo),Rf=BX,TX=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)}}(),SX=function(r){TX(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}(Rf),KA=SX,ar={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"},Xs={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},xX=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)}}(),bX=function(r){xX(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,Xs.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=Pe(a,Xs.POINTERMOVE,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(ye.TOUCHMOVE,i.boundHandleTouchMove_,O6?{passive:!1}:!1),i}return e.prototype.emulateClick_=function(t){var n=new KA(ar.CLICK,this.map_,t);this.dispatchEvent(n),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new KA(ar.DBLCLICK,this.map_,t),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var i=new KA(ar.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var n=t;n.type==ar.POINTERUP||n.type==ar.POINTERCANCEL?delete this.trackedTouches_[n.pointerId]:n.type==ar.POINTERDOWN&&(this.trackedTouches_[n.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var n=new KA(ar.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 KA(ar.POINTERDOWN,this.map_,t);this.dispatchEvent(n),this.down_={};for(var i in t){var a=t[i];this.down_[i]=typeof a=="function"?lh:a}if(this.dragListenerKeys_.length===0){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(Pe(o,ar.POINTERMOVE,this.handlePointerMove_,this),Pe(o,ar.POINTERUP,this.handlePointerUp_,this),Pe(this.element_,ar.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(Pe(this.element_.getRootNode(),ar.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var n=new KA(ar.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 KA(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}(Th),IX=bX,Ks={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},Jn={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},C_=1/0,FX=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,Bh(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!=C_?(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==C_?delete this.queuedElements_[this.keyFunction_(o)]:(n[i]=A,t[i++]=o);t.length=i,n.length=i,this.heapify_()},r}(),LX=FX,ge={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},OX=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)}}(),RX=function(r){OX(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}(LX),MX=RX;function NX(r,e,t,n,i){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return C_;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"},jp={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},bs={};bs[jp.RADIANS]=6370997/(2*Math.PI);bs[jp.DEGREES]=2*Math.PI*6370997/360;bs[jp.FEET]=.3048;bs[jp.METERS]=1;bs[jp.USFEET]=1200/3937;var Qa=jp,gn={ANIMATING:0,INTERACTING:1},So={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},PX=42,GI=256,UX=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_||bs[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}(),ml=UX,DX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),qg=6378137,Vf=Math.PI*qg,QX=[-Vf,-Vf,Vf,Vf],HX=[-180,-85,180,85],Cm=qg*Math.log(Math.tan(Math.PI/2)),cf=function(r){DX(e,r);function e(t){return r.call(this,{code:t,units:Qa.METERS,extent:QX,global:!0,worldExtent:HX,getPointResolution:function(n,i){return n/DY(i[1]/qg)}})||this}return e}(ml),nM=[new cf("EPSG:3857"),new cf("EPSG:102100"),new cf("EPSG:102113"),new cf("EPSG:900913"),new cf("http://www.opengis.net/def/crs/EPSG/0/3857"),new cf("http://www.opengis.net/gml/srs/epsg.xml#3857")];function GX(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]=Vf*r[o]/180;var s=qg*Math.log(Math.tan(Math.PI*(+r[o+1]+90)/360));s>Cm?s=Cm:s<-Cm&&(s=-Cm),a[o+1]=s}return a}function kX(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]/Vf,a[o+1]=360*Math.atan(Math.exp(r[o+1]/qg))/Math.PI-90;return a}var $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)}}(),VX=6378137,iM=[-180,-90,180,90],jX=Math.PI*VX/180,dc=function(r){$X(e,r);function e(t,n){return r.call(this,{code:t,units:Qa.DEGREES,extent:iM,axisOrientation:n,global:!0,metersPerUnit:jX,worldExtent:iM})||this}return e}(ml),aM=[new dc("CRS:84"),new dc("EPSG:4326","neu"),new dc("urn:ogc:def:crs:OGC:1.3:CRS84"),new dc("urn:ogc:def:crs:OGC:2:84"),new dc("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new dc("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new dc("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],jT={};function KX(r){return jT[r]||jT[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function zX(r,e){jT[r]=e}var Ap={};function Sp(r,e,t){var n=r.getCode(),i=e.getCode();n in Ap||(Ap[n]={}),Ap[n][i]=t}function oQ(r,e){var t;return r in Ap&&e in Ap[r]&&(t=Ap[r][e]),t}var sQ=63710088e-1;function B_(r,e,t){var n=t||sQ,i=Cu(r[1]),a=Cu(e[1]),o=(a-i)/2,s=Cu(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 YX(r,e,t,n){var i=n||sQ,a=Cu(r[1]),o=Cu(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[zR(l),zR(A)]}var KT=!0;function XX(r){var e=r===void 0?!0:r;KT=!e}function kI(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 W1(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 AQ(r){zX(r.getCode(),r),Sp(r,r,kI)}function WX(r){r.forEach(AQ)}function Oe(r){return typeof r=="string"?KX(r):r||null}function T_(r,e,t,n){r=Oe(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/bs[n])}}else{var s=r.getUnits();if(s==Qa.DEGREES&&!n||n==Qa.DEGREES)i=e;else{var A=fh(r,Oe("EPSG:4326"));if(A===W1&&s!==Qa.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=B_(l.slice(0,2),l.slice(2,4)),c=B_(l.slice(4,6),l.slice(6,8));i=(u+c)/2}var o=n?bs[n]:r.getMetersPerUnit();o!==void 0&&(i/=o)}}return i}function zT(r){WX(r),r.forEach(function(e){r.forEach(function(t){e!==t&&Sp(e,t,kI)})})}function qX(r,e,t,n){r.forEach(function(i){e.forEach(function(a){Sp(i,a,t),Sp(a,i,n)})})}function $I(r,e){return r?typeof r=="string"?Oe(r):r:Oe(e)}function oM(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 ZX(r,e,t,n){var i=Oe(r),a=Oe(e);Sp(i,a,oM(t)),Sp(a,i,oM(n))}function Ws(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var n=fh(r,e);return n===kI&&t}function fh(r,e){var t=r.getCode(),n=e.getCode(),i=oQ(t,n);return i||(i=W1),i}function vg(r,e){var t=Oe(r),n=Oe(e);return fh(t,n)}function Qu(r,e,t){var n=vg(e,t);return n(r,void 0,r.length)}function S_(r,e,t,n){var i=vg(e,t);return MI(r,i,void 0,n)}var JX=null;function ph(){return JX}function xp(r,e){return r}function Tn(r,e){return KT&&!_s(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(KT=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function q1(r,e){return r}function Lo(r,e){return r}function tW(r,e){return r}function sM(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=q6(n,r,l),s&&(i=i-s*l),i=xn(i,A[0],A[2]),a=xn(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 eW(){zT(nM),zT(aM),qX(aM,nM,GX,kX)}eW();function AM(r,e,t){return function(n,i,a,o,s){if(n){if(!i&&!e)return n;var A=e?0:a[0]*i,l=e?0:a[1]*i,u=s?s[0]:0,c=s?s[1]:0,h=r[0]+A/2+u,f=r[2]-A/2+u,p=r[1]+l/2+c,v=r[3]-l/2+c;h>f&&(h=(f+h)/2,f=h),p>v&&(p=(v+p)/2,v=p);var m=xn(n[0],h,f),g=xn(n[1],p,v);if(o&&t&&i){var _=30*i;m+=-_*Math.log(1+Math.max(0,h-n[0])/_)+_*Math.log(1+Math.max(0,n[0]-f)/_),g+=-_*Math.log(1+Math.max(0,p-n[1])/_)+_*Math.log(1+Math.max(0,n[1]-v)/_)}return[m,g]}}}function rW(r){return r}function VI(r,e,t,n){var i=Fr(e)/t[0],a=Ai(e)/t[1];return n?Math.min(r,Math.max(i,a)):Math.min(r,Math.min(i,a))}function jI(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),xn(n,t/2,e*2)}function nW(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?VI(A,t,o,n):A;if(s){var c=e!==void 0?e:!0;return c?jI(i,u,l):xn(i,l,u)}var h=Math.min(u,i),f=Math.floor(j1(r,h,a));return r[f]>u&&f<r.length-1?r[f+1]:r[f]}else return}}function iW(r,e,t,n,i,a){return function(o,s,A,l){if(o!==void 0){var u=i?VI(e,i,A,a):e,c=t!==void 0?t:0;if(l){var h=n!==void 0?n:!0;return h?jI(o,u,c):xn(o,c,u)}var f=1e-9,p=Math.ceil(Math.log(e/u)/Math.log(r)-f),v=-s*(.5-f)+.5,m=Math.min(u,o),g=Math.floor(Math.log(e/m)/Math.log(r)+v),_=Math.max(p,g),E=e/Math.pow(r,_);return xn(E,c,u)}else return}}function lM(r,e,t,n,i){return function(a,o,s,A){if(a!==void 0){var l=n?VI(r,n,s,i):r,u=t!==void 0?t:!0;return!u||!A?xn(a,e,l):jI(a,l,e)}else return}}function KI(r){if(r!==void 0)return 0}function uM(r){if(r!==void 0)return r}function aW(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 oW(r){var e=r||Cu(5);return function(t,n){if(n)return t;if(t!==void 0)return Math.abs(t)<=e?0:t}}function zI(r){return Math.pow(r,3)}function ts(r){return 1-zI(1-r)}function x_(r){return 3*r*r-2*r*r*r}function YI(r){return r}function sW(r){return r<.5?x_(2*r):1-x_(2*(r-.5))}var AW=Object.freeze(Object.defineProperty({__proto__:null,easeIn:zI,easeOut:ts,inAndOut:x_,linear:YI,upAndDown:sW},Symbol.toStringTag,{value:"Module"})),Wt={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function Tu(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 XI(r,e,t,n,i,a,o){for(var s=o||[],A=Math.cos(i),l=Math.sin(i),u=a[0],c=a[1],h=0,f=e;f<t;f+=n){var p=r[f]-u,v=r[f+1]-c;s[h++]=u+p*A-v*l,s[h++]=c+p*l+v*A;for(var m=f+2;m<f+n;++m)s[h++]=r[m]}return o&&s.length!=h&&(s.length=h),s}function lW(r,e,t,n,i,a,o,s){for(var A=s||[],l=o[0],u=o[1],c=0,h=e;h<t;h+=n){var f=r[h]-l,p=r[h+1]-u;A[c++]=l+i*f,A[c++]=u+a*p;for(var v=h+2;v<h+n;++v)A[c++]=r[v]}return s&&A.length!=c&&(A.length=c),A}function lQ(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 uW=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=oi(),cW=function(r){uW(e,r);function e(){var t=r.call(this)||this;return t.extent_=_i(),t.extentRevision_=-1,t.simplifiedGeometryMaxMinSquaredTolerance=0,t.simplifiedGeometryRevision=0,t.simplifyTransformedInternal=dY(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 Be()},e.prototype.closestPointXY=function(t,n,i,a){return Be()},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 Be()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Wu(n),this.extentRevision_=this.getRevision()}return U6(this.extent_,t)},e.prototype.rotate=function(t,n){Be()},e.prototype.scale=function(t,n,i){Be()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Be()},e.prototype.getType=function(){return Be()},e.prototype.applyTransform=function(t){Be()},e.prototype.intersectsExtent=function(t){return Be()},e.prototype.translate=function(t,n){Be()},e.prototype.transform=function(t,n){var i=Oe(t),a=i.getUnits()==Qa.TILE_PIXELS?function(o,s,A){var l=i.getExtent(),u=i.getWorldExtent(),c=Ai(u)/Ai(l);return $a(cM,u[0],u[3],c,-c,0,0,0),Tu(o,0,o.length,A,cM,s),vg(i,n)(o,s,A)}:vg(i,n);return this.applyTransform(a),this},e}(li),Z1=cW,hW=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)}}(),fW=function(r){hW(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 Y1(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Be()},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=YT(t),this.layout=t,this.flatCoordinates=n},e.prototype.setCoordinates=function(t,n){Be()},e.prototype.setLayout=function(t,n,i){var a;if(t)a=YT(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=pW(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();XI(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=Sa(this.getExtent()));var s=this.getFlatCoordinates();if(s){var A=this.getStride();lW(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();lQ(i,0,i.length,a,t,n,i),this.changed()}},e}(Z1);function pW(r){var e;return r==2?e=Wt.XY:r==3?e=Wt.XYZ:r==4&&(e=Wt.XYZM),e}function YT(r){var e;return r==Wt.XY?e=2:r==Wt.XYZ||r==Wt.XYM?e=3:r==Wt.XYZM&&(e=4),e}function dW(r,e,t){var n=r.getFlatCoordinates();if(n){var i=r.getStride();return Tu(n,0,n.length,i,e,t)}else return null}var Is=fW;function hM(r,e,t,n,i,a,o){var s=r[e],A=r[e+1],l=r[t]-s,u=r[t+1]-A,c;if(l===0&&u===0)c=e;else{var h=((i-s)*l+(a-A)*u)/(l*l+u*u);if(h>1)c=t;else if(h>0){for(var f=0;f<n;++f)o[f]=YA(r[e+f],r[t+f],h);o.length=n;return}else c=e}for(var f=0;f<n;++f)o[f]=r[c+f];o.length=n}function WI(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=Wc(a,o,s,A);l>i&&(i=l),a=s,o=A}return i}function qI(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=WI(r,e,s,n,i),e=s}return i}function vW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=qI(r,e,s,n,i),e=s[s.length-1]}return i}function ZI(r,e,t,n,i,a,o,s,A,l,u){if(e==t)return l;var c,h;if(i===0)if(h=Wc(o,s,r[e],r[e+1]),h<l){for(c=0;c<n;++c)A[c]=r[e+c];return A.length=n,h}else return l;for(var f=u||[NaN,NaN],p=e+n;p<t;)if(hM(r,p-n,p,n,o,s,f),h=Wc(o,s,f[0],f[1]),h<l){for(l=h,c=0;c<n;++c)A[c]=f[c];A.length=n,p+=n}else p+=n*Math.max((Math.sqrt(h)-Math.sqrt(l))/i|0,1);if(a&&(hM(r,t-n,e,n,o,s,f),h=Wc(o,s,f[0],f[1]),h<l)){for(l=h,c=0;c<n;++c)A[c]=f[c];A.length=n}return l}function JI(r,e,t,n,i,a,o,s,A,l,u){for(var c=u||[NaN,NaN],h=0,f=t.length;h<f;++h){var p=t[h];l=ZI(r,e,p,n,i,a,o,s,A,l,c),e=p}return l}function gW(r,e,t,n,i,a,o,s,A,l,u){for(var c=u||[NaN,NaN],h=0,f=t.length;h<f;++h){var p=t[h];l=JI(r,e,p,n,i,a,o,s,A,l,c),e=p[p.length-1]}return l}function uQ(r,e,t,n){for(var i=0,a=t.length;i<a;++i)r[e++]=t[i];return e}function Zg(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 tF(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=Zg(r,e,t[s],n);a[o++]=l,e=l}return a.length=o,a}function yW(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=tF(r,e,t[s],n,a[o]);a[o++]=l,e=l[l.length-1]}return a.length=o,a}function eF(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 c=l.pop(),h=l.pop(),f=0,p=r[h],v=r[h+1],m=r[c],g=r[c+1],_=h+n;_<c;_+=n){var E=r[_],B=r[_+1],L=QY(E,B,p,v,m,g);L>f&&(u=_,f=L)}f>i&&(A[(u-e)/n]=1,h+n<u&&l.push(h,u),u+n<c&&l.push(u,c))}for(var _=0;_<s;++_)A[_]&&(a[o++]=r[e+_*n],a[o++]=r[e+_*n+1]);return o}function mW(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=eF(r,e,u,n,i,a,o),s.push(o),e=u}return o}function xc(r,e){return e*Math.round(r/e)}function _W(r,e,t,n,i,a,o){if(e==t)return o;var s=xc(r[e],i),A=xc(r[e+1],i);e+=n,a[o++]=s,a[o++]=A;var l,u;do if(l=xc(r[e],i),u=xc(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 c=xc(r[e],i),h=xc(r[e+1],i);if(e+=n,!(c==l&&h==u)){var f=l-s,p=u-A,v=c-s,m=h-A;if(f*m==p*v&&(f<0&&v<f||f==v||f>0&&v>f)&&(p<0&&m<p||p==m||p>0&&m>p)){l=c,u=h;continue}a[o++]=l,a[o++]=u,s=l,A=u,l=c,u=h}}return a[o++]=l,a[o++]=u,o}function cQ(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=_W(r,e,u,n,i,a,o),s.push(o),e=u}return o}function wW(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A],c=[];o=cQ(r,e,u,n,i,a,o,c),s.push(c),e=u[u.length-1]}return o}function qA(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 gg(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++]=qA(r,e,l,n,a[o]),e=l}return a.length=o,a}function XT(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++]=gg(r,e,l,n,a[o]),e=l[l.length-1]}return a.length=o,a}function hQ(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 fQ(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=hQ(r,e,s,n),e=s}return i}function EW(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=fQ(r,e,s,n),e=s[s.length-1]}return i}var CW=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)}}(),BW=function(r){CW(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<Xu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(WI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ZI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.getArea=function(){return hQ(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return qA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=eF(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=Zg(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Is),bp=BW,TW=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)}}(),SW=function(r){TW(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=Wc(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 zc(this.flatCoordinates,t)},e.prototype.getType=function(){return st.POINT},e.prototype.intersectsExtent=function(t){return z1(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=uQ(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Is),fr=SW;function xW(r,e,t,n,i){var a=X1(i,function(o){return!Dc(r,e,t,n,o[0],o[1])});return!a}function Dc(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 rF(r,e,t,n,i,a){if(t.length===0||!Dc(r,e,t[0],n,i,a))return!1;for(var o=1,s=t.length;o<s;++o)if(Dc(r,t[o-1],t[o],n,i,a))return!1;return!0}function bW(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(rF(r,e,A,n,i,a))return!0;e=A[A.length-1]}return!1}function nF(r,e,t,n,i,a,o){for(var s,A,l,u,c,h,f,p=i[a+1],v=[],m=0,g=t.length;m<g;++m){var _=t[m];for(u=r[_-n],h=r[_-n+1],s=e;s<_;s+=n)c=r[s],f=r[s+1],(p<=h&&f<=p||h<=p&&p<=f)&&(l=(p-h)/(f-h)*(c-u)+u,v.push(l)),u=c,h=f}var E=NaN,B=-1/0;for(v.sort(Nu),u=v[0],s=1,A=v.length;s<A;++s){c=v[s];var L=Math.abs(c-u);L>B&&(l=(u+c)/2,rF(r,e,t,n,l,p)&&(E=l,B=L)),u=c}return isNaN(E)&&(E=i[a]),o?(o.push(E,p,B),o):[E,p,B]}function pQ(r,e,t,n,i){for(var a=[],o=0,s=t.length;o<s;++o){var A=t[o];a=nF(r,e,A,n,i,2*o,a),e=A[A.length-1]}return a}function dQ(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 J1(r,e,t,n,i){var a=RI(_i(),r,e,t,n);return Mn(i,a)?Fo(i,a)||a[0]>=i[0]&&a[2]<=i[2]||a[1]>=i[1]&&a[3]<=i[3]?!0:dQ(r,e,t,n,function(o,s){return Q6(i,o,s)}):!1}function IW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){if(J1(r,e,t[a],n,i))return!0;e=t[a]}return!1}function FW(r,e,t,n,i){return!!(J1(r,e,t,n,i)||Dc(r,e,t,n,i[0],i[1])||Dc(r,e,t,n,i[0],i[3])||Dc(r,e,t,n,i[2],i[1])||Dc(r,e,t,n,i[2],i[3]))}function vQ(r,e,t,n,i){if(!FW(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(xW(r,t[a-1],t[a],n,i)&&!J1(r,t[a-1],t[a],n,i))return!1;return!0}function LW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(vQ(r,e,s,n,i))return!0;e=s[s.length-1]}return!1}function OW(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 tw(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 gQ(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=tw(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 RW(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(!gQ(r,e,s,n,i))return!1;s.length&&(e=s[s.length-1])}return!0}function WT(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=tw(r,e,A,n),u=o===0?a&&l||!a&&!l:a&&!l||!a&&l;u&&OW(r,e,A,n),e=A}return e}function fM(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a)e=WT(r,e,t[a],n,i);return e}function MW(r,e){for(var t=[],n=0,i=0,a=0,o=e.length;a<o;++a){var s=e[a];if(!tw(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 NW=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)}}(),ew=function(r){NW(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?Qr(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<Xu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(qI(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),JI(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return rF(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,n)},e.prototype.getArea=function(){return fQ(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),WT(n,0,this.ends_,this.stride,t)):n=this.flatCoordinates,gg(n,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Sa(this.getExtent());this.flatInteriorPoint_=nF(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new fr(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 bp(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 bp(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;gQ(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=WT(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=cQ(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 vQ(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=tF(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(Is),bn=ew;function PW(r,e,t,n){for(var i=t||32,a=[],o=0;o<i;++o)Qr(a,YX(r,e,2*Math.PI*o/i,n));return a.push(a[0],a[1]),new ew(a,Wt.XY,[a.length])}function Hu(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 ew(a,Wt.XY,[a.length])}function yQ(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 c=[A.length],h=new ew(A,a,c);return UW(h,o,r.getRadius(),t),h}function UW(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+Bu(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 DW=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)}}(),cC=0,QW=function(r){DW(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_=$I(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&&XX(),i.center&&(i.center=Tn(i.center,n.projection_)),i.extent&&(i.extent=Lo(i.extent,n.projection_)),n.applyOptions_(i),n}return e.prototype.applyOptions_=function(t){var n=de({},t);for(var i in So)delete n[i];this.setProperties(n,!0);var a=GW(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=HW(t),s=a.constraint,A=kW(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=Tn(a.center,this.getProjection())),a.anchor&&(a=de({},a),a.anchor=Tn(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&&Bm(i,!0);return}for(var s=Date.now(),A=this.targetCenter_.slice(),l=this.targetResolution_,u=this.targetRotation_,c=[];a<n;++a){var h=arguments[a],f={start:s,complete:!1,anchor:h.anchor,duration:h.duration!==void 0?h.duration:1e3,easing:h.easing||x_,callback:i};if(h.center&&(f.sourceCenter=A,f.targetCenter=h.center.slice(),A=f.targetCenter),h.zoom!==void 0?(f.sourceResolution=l,f.targetResolution=this.getResolutionForZoom(h.zoom),l=f.targetResolution):h.resolution&&(f.sourceResolution=l,f.targetResolution=h.resolution,l=f.targetResolution),h.rotation!==void 0){f.sourceRotation=u;var p=Bu(h.rotation-u+Math.PI,2*Math.PI)-Math.PI;f.targetRotation=u+p,u=f.targetRotation}$W(f)?f.complete=!0:s+=f.duration,c.push(f)}this.animations_.push(c),this.setHint(gn.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[gn.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[gn.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(gn.ANIMATING,-this.hints_[gn.ANIMATING]);for(var t,n=0,i=this.animations_.length;n<i;++n){var a=this.animations_[n];if(a[0].callback&&Bm(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,c=l.duration>0?u/l.duration:1;c>=1?(l.complete=!0,c=1):o=!1;var h=l.easing(c);if(l.sourceCenter){var f=l.sourceCenter[0],p=l.sourceCenter[1],v=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;var g=f+h*(v-f),_=p+h*(m-p);this.targetCenter_=[g,_]}if(l.sourceResolution&&l.targetResolution){var E=h===1?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){var B=this.getViewportSize_(this.getRotation()),L=this.constraints_.resolution(E,0,B,!0);this.targetCenter_=this.calculateCenterZoom(L,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=E,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){var O=h===1?Bu(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){var b=this.constraints_.rotation(O,!0);this.targetCenter_=this.calculateCenterRotate(b,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(gn.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var T=a[0].callback;T&&Bm(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]],QI(i,t-this.getRotation()),X6(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&&xp(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(So.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 q1(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),Xc(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(So.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(Lo(t,this.getProjection()),n)},e.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.getViewportSizeMinusPadding_(),a=Fr(t)/i[0],o=Ai(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(So.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=hC(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=j1(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=xn(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,xn(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(!Vp(t),25);var a=Lo(t,this.getProjection());i=Hu(a)}else if(t.getType()===st.CIRCLE){var a=Lo(t.getExtent(),this.getProjection());i=Hu(a),i.rotate(this.getRotation(),Sa(a))}else{var o=ph();o?i=t.clone().transform(o,this.getProjection()):i=t}this.fitInternal(i,n)},e.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),i=Math.cos(n),a=Math.sin(-n),o=t.getFlatCoordinates(),s=t.getStride(),A=1/0,l=1/0,u=-1/0,c=-1/0,h=0,f=o.length;h<f;h+=s){var p=o[h]*i-o[h+1]*a,v=o[h]*a+o[h+1]*i;A=Math.min(A,p),l=Math.min(l,v),u=Math.max(u,p),c=Math.max(c,v)}return[A,l,u,c]},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 c=this.getRotation(),h=Math.sin(c),f=Math.cos(c),p=Sa(l);p[0]+=(o[1]-o[3])/2*u,p[1]+=(o[0]-o[2])/2*u;var v=p[0]*f-p[1]*h,m=p[1]*f+p[0]*h,g=this.getConstrainedCenter([v,m],u),_=i.callback?i.callback:lh;i.duration!==void 0?this.animateInternal({resolution:u,center:g,duration:i.duration,easing:i.easing},_):(this.targetResolution_=u,this.targetCenter_=g,this.applyTargetState_(!1,!0),Bm(_,!0))},e.prototype.centerOn=function(t,n,i){this.centerOnInternal(Tn(t,this.getProjection()),n,i)},e.prototype.centerOnInternal=function(t,n,i){this.setCenterInternal(hC(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=hC(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=xp(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&&Tn(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=Tn(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&&Tn(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(So.ROTATION)!==a&&this.set(So.ROTATION,a),this.get(So.RESOLUTION)!==s&&(this.set(So.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!A||!this.get(So.CENTER)||!_s(this.get(So.CENTER),A))&&this.set(So.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 c=i||(a===0?this.cancelAnchor_:void 0);this.cancelAnchor_=void 0,(this.getResolution()!==l||this.getRotation()!==s||!this.getCenterInternal()||!_s(this.getCenterInternal(),u))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:u,resolution:l,duration:a,easing:ts,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(gn.INTERACTING,1)},e.prototype.endInteraction=function(t,n,i){var a=i&&Tn(i,this.getProjection());this.endInteractionInternal(t,n,a)},e.prototype.endInteractionInternal=function(t,n,i){this.setHint(gn.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}(li);function Bm(r,e){setTimeout(function(){r(e)},0)}function HW(r){if(r.extent!==void 0){var e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return AM(r.extent,r.constrainOnlyCenter,e)}var t=$I(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){var n=t.getExtent().slice();return n[0]=-1/0,n[2]=1/0,AM(n,!1,!1)}return rW}function GW(r){var e,t,n,i=28,a=2,o=r.minZoom!==void 0?r.minZoom:cC,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,c=r.showFullExtent!==void 0?r.showFullExtent:!1,h=$I(r.projection,"EPSG:3857"),f=h.getExtent(),p=r.constrainOnlyCenter,v=r.extent;if(!l&&!v&&h.isGlobal()&&(p=!1,v=f),r.resolutions!==void 0){var m=r.resolutions;t=m[o],n=m[s]!==void 0?m[s]:m[m.length-1],r.constrainResolution?e=nW(m,u,!p&&v,c):e=lM(t,n,u,!p&&v,c)}else{var g=f?Math.max(Fr(f),Ai(f)):360*bs[Qa.DEGREES]/h.getMetersPerUnit(),_=g/GI/Math.pow(a,cC),E=_/Math.pow(a,i-cC);t=r.maxResolution,t!==void 0?o=0:t=_/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=_/Math.pow(A,s):n=E),s=o+Math.floor(Math.log(t/n)/Math.log(A)),n=t/Math.pow(A,s-o),r.constrainResolution?e=iW(A,t,n,u,!p&&v,c):e=lM(t,n,u,!p&&v,c)}return{constraint:e,maxResolution:t,minResolution:n,minZoom:o,zoomFactor:A}}function kW(r){var e=r.enableRotation!==void 0?r.enableRotation:!0;if(e){var t=r.constrainRotation;return t===void 0||t===!0?oW():t===!1?uM:typeof t=="number"?aW(t):uM}else return KI}function $W(r){return!(r.sourceCenter&&r.targetCenter&&!_s(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function hC(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 qs=QW;function pM(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]+2*e,t[1]=r[1]+2*e,t}function dM(r){return r[0]>0&&r[1]>0}function mQ(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 Pi(r,e){return Array.isArray(r)?r:(e===void 0?e=[r,r]:(e[0]=r,e[1]=r),e)}var VW=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 _Q(r){if(r instanceof Sh){r.setMapInternal(null);return}r instanceof Wg&&r.getLayers().forEach(_Q)}function wQ(r,e){if(r instanceof Sh){r.setMapInternal(e);return}if(r instanceof Wg)for(var t=r.getLayers().getArray(),n=0,i=t.length;n<i;++n)wQ(t[n],e)}var jW=function(r){VW(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=KW(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_=oi(),n.pixelToCoordinateTransform_=oi(),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 si,n.interactions=i.interactions||new si,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new MX(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(Jn.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(Jn.VIEW,n.handleViewChanged_),n.addChangeListener(Jn.SIZE,n.handleSizeChanged_),n.addChangeListener(Jn.TARGET,n.handleTargetChanged_),n.setProperties(i.values);var a=n;return t.view&&!(t.view instanceof qs)&&t.view.then(function(o){a.setView(new qs(o))}),n.controls.addEventListener(kn.ADD,function(o){o.element.setMap(this)}.bind(n)),n.controls.addEventListener(kn.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.interactions.addEventListener(kn.ADD,function(o){o.element.setMap(this)}.bind(n)),n.interactions.addEventListener(kn.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(kn.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(n)),n.overlays_.addEventListener(kn.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){wQ(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:iA,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 Wg?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||iA;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:iA,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(Jn.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 xp(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var n=this.frameState_;return n?un(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(Jn.LAYERGROUP)},e.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof si){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=Tn(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},e.prototype.getPixelFromCoordinateInternal=function(t){var n=this.frameState_;return n?un(n.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(Jn.SIZE)},e.prototype.getView=function(){return this.get(Jn.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 NX(this.frameState_,t,n,i,a)},e.prototype.handleBrowserEvent=function(t,n){var i=n||t.type,a=new KA(i,this,t);this.handleMapBrowserEvent(a)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var n=t.originalEvent,i=n.type;if(i===Xs.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 c=u.handleEvent(t);if(!c||t.propagationStopped)break}}}},e.prototype.handlePostRender=function(){var t=this.frameState_,n=this.tileQueue_;if(!n.isEmpty()){var i=this.maxTilesLoading_,a=i;if(t){var o=t.viewHints;if(o[gn.ANIMATING]||o[gn.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(ao.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(ao.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Rf(Ks.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Rf(Ks.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,m_(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 IX(this,this.moveTolerance_);for(var a in ar)this.mapBrowserEventHandler_.addEventListener(ar[a],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(ye.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(ye.WHEEL,this.boundHandleBrowserEvent_,O6?{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,ch.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 ou("addlayer",t)),this.layerGroupPropertyListenerKeys_=[Pe(t,ch.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){_Q(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&&dM(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:Xc(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=Xc(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 c=!this.previousExtent_||!Vp(this.previousExtent_)&&!AA(s.extent,this.previousExtent_);c&&(this.dispatchEvent(new Rf(Ks.MOVESTART,this,o)),this.previousExtent_=Wu(this.previousExtent_))}var h=this.previousExtent_&&!s.viewHints[gn.ANIMATING]&&!s.viewHints[gn.INTERACTING]&&!AA(s.extent,this.previousExtent_);h&&(this.dispatchEvent(new Rf(Ks.MOVEEND,this,s)),LI(s.extent,this.previousExtent_))}this.dispatchEvent(new Rf(Ks.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(Ks.LOADSTART)||this.hasListener(Ks.LOADEND)||this.hasListener(ao.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 ou("removelayer",n)),this.set(Jn.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(Jn.SIZE,t)},e.prototype.setTarget=function(t){this.set(Jn.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof qs){this.set(Jn.VIEW,t);return}this.set(Jn.VIEW,new qs);var n=this;t.then(function(i){n.setView(new qs(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],!dM(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}(li);function KW(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 Wg({layers:r.layers});t[Jn.LAYERGROUP]=n,t[Jn.TARGET]=r.target,t[Jn.VIEW]=r.view instanceof qs?r.view:new qs;var i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new si(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 si(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 si(r.overlays.slice()):(_e(typeof r.overlays.getArray=="function",49),o=r.overlays):o=new si,{controls:i,interactions:a,keyboardEventTarget:e,overlays:o,values:t}}var EQ=jW,zW=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=function(r){zW(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(){m_(this.element),r.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&m_(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!==lh&&this.listenerKeys.push(Pe(t,Ks.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}(li),_r=YW,XW=Object.freeze(Object.defineProperty({__proto__:null,default:_r},Symbol.toStringTag,{value:"Module"})),WW=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=function(r){WW(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 c=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(c),n.toggleButton_.addEventListener(ye.CLICK,n.handleClick_.bind(n),!1);var h=a+" "+lA+" "+xh+(n.collapsed_&&n.collapsible_?" "+y_:"")+(n.collapsible_?"":" ol-uncollapsible"),f=n.element;return f.className=h,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(g_(l,t.viewState)){var u=l.layer.getSource();if(u){var c=u.getAttributions();if(c){var h=c(t);if(h)if(a=a&&u.getAttributionsCollapsible()!==!1,Array.isArray(h))for(var f=0,p=h.length;f<p;++f)h[f]in n||(i.push(h[f]),n[h[f]]=!0);else h in n||(i.push(h),n[h]=!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),!yl(n,this.renderedAttributions_)){tQ(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(y_),this.collapsed_?Bp(this.collapseLabel_,this.label_):Bp(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}(_r),CQ=qW,ZW=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)}}(),JW=function(r){ZW(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+" "+lA+" "+xh,c=n.element;return c.className=u,c.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(wm),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:ts}):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(wm);!o&&i===0?this.element.classList.add(wm):o&&i!==0&&this.element.classList.remove(wm)}this.label_.style.transform=a}this.rotation_=i}},e}(_r),BQ=JW,tq=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)}}(),eq=function(r){tq(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this;var a=i.className!==void 0?i.className:"ol-zoom",o=i.delta!==void 0?i.delta:1,s=i.zoomInClassName!==void 0?i.zoomInClassName:a+"-in",A=i.zoomOutClassName!==void 0?i.zoomOutClassName:a+"-out",l=i.zoomInLabel!==void 0?i.zoomInLabel:"+",u=i.zoomOutLabel!==void 0?i.zoomOutLabel:"",c=i.zoomInTipLabel!==void 0?i.zoomInTipLabel:"Zoom in",h=i.zoomOutTipLabel!==void 0?i.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=c,f.appendChild(typeof l=="string"?document.createTextNode(l):l),f.addEventListener(ye.CLICK,n.handleClick_.bind(n,o),!1);var p=document.createElement("button");p.className=A,p.setAttribute("type","button"),p.title=h,p.appendChild(typeof u=="string"?document.createTextNode(u):u),p.addEventListener(ye.CLICK,n.handleClick_.bind(n,-o),!1);var v=a+" "+lA+" "+xh,m=n.element;return m.className=v,m.appendChild(f),m.appendChild(p),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:ts})):i.setZoom(o)}}},e}(_r),TQ=eq,rq=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)}}(),vM=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],gM={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},nq=function(r){rq(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(lA," ").concat(xh),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(yM(n))if(mM(n))aq(n);else{var i=void 0;this.source_?i=typeof this.source_=="string"?n.getElementById(this.source_):this.source_:i=t.getTargetElement(),this.keys_?iq(i):SQ(i)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var n=this.isInFullscreen_;this.isInFullscreen_=mM(t.getOwnerDocument()),n!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(Bp(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(gM.ENTERFULLSCREEN)):(Bp(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(gM.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(Jn.TARGET,this.boundHandleMapTargetChange_),r.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(Jn.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();yM(o)?this.element.classList.remove(JR):this.element.classList.add(JR);for(var n=0,i=vM.length;n<i;++n)t.push(Pe(o,vM[n],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(_r);function yM(r){var e=r.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&r.msFullscreenEnabled||e.requestFullscreen&&r.fullscreenEnabled)}function mM(r){return!!(r.webkitIsFullScreen||r.msFullscreenElement||r.fullscreenElement)}function SQ(r){r.requestFullscreen?r.requestFullscreen():r.msRequestFullscreen?r.msRequestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}function iq(r){r.webkitRequestFullscreen?r.webkitRequestFullscreen():SQ(r)}function aq(r){r.exitFullscreen?r.exitFullscreen():r.msExitFullscreen?r.msExitFullscreen():r.webkitExitFullscreen&&r.webkitExitFullscreen()}var oq=nq,sq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),fC="projection",_M="coordinateFormat",Aq=function(r){sq(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(fC,n.handleProjectionChanged_),i.coordinateFormat&&n.setCoordinateFormat(i.coordinateFormat),i.projection&&n.setProjection(i.projection);var o=!0,s="&#160;";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(_M)},e.prototype.getProjection=function(){return this.get(fC)},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,Xs.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(Pe(n,Xs.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},e.prototype.setCoordinateFormat=function(t){this.set(_M,t)},e.prototype.setProjection=function(t){this.set(fC,Oe(t))},e.prototype.updateHTML_=function(t){var n=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var i=this.getProjection();i?this.transform_=fh(this.mapProjection_,i):this.transform_=W1}var a=this.getMap(),o=a.getCoordinateFromPixelInternal(t);if(o){var s=ph();s&&(this.transform_=fh(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}(_r),lq=Aq,to={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"},uq=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)}}(),fa={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},cq=function(r){uq(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 "+AX,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(fa.ELEMENT,n.handleElementChanged),n.addChangeListener(fa.MAP,n.handleMapChanged),n.addChangeListener(fa.OFFSET,n.handleOffsetChanged),n.addChangeListener(fa.POSITION,n.handlePositionChanged),n.addChangeListener(fa.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:to.TOP_LEFT),t.position!==void 0&&n.setPosition(t.position),n}return e.prototype.getElement=function(){return this.get(fa.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(fa.MAP)||null},e.prototype.getOffset=function(){return this.get(fa.OFFSET)},e.prototype.getPosition=function(){return this.get(fa.POSITION)},e.prototype.getPositioning=function(){return this.get(fa.POSITIONING)},e.prototype.handleElementChanged=function(){tQ(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(m_(this.element),Rr(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=Pe(t,Ks.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(fa.ELEMENT,t)},e.prototype.setMap=function(t){this.set(fa.MAP,t)},e.prototype.setOffset=function(t){this.set(fa.OFFSET,t)},e.prototype.setPosition=function(t){this.set(fa.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(fa.POSITION))){var i=this.getRect(n.getTargetElement(),n.getSize()),a=this.getElement(),o=this.getRect(a,[uX(a),cX(a)]),s=t||{},A=s.margin===void 0?20:s.margin;if(!Fo(i,o)){var l=o[0]-i[0],u=i[2]-o[2],c=o[1]-i[1],h=i[3]-o[3],f=[0,0];if(l<0?f[0]=l-A:u<0&&(f[0]=Math.abs(u)+A),c<0?f[1]=c-A:h<0&&(f[1]=Math.abs(h)+A),f[0]!==0||f[1]!==0){var p=n.getView().getCenterInternal(),v=n.getPixelFromCoordinateInternal(p);if(!v)return;var m=[v[0]+f[0],v[1]+f[1]],g=s.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(m),duration:g.duration,easing:g.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(fa.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==to.BOTTOM_RIGHT||o==to.CENTER_RIGHT||o==to.TOP_RIGHT?l="-100%":(o==to.BOTTOM_CENTER||o==to.CENTER_CENTER||o==to.TOP_CENTER)&&(l="-50%"),o==to.BOTTOM_LEFT||o==to.BOTTOM_CENTER||o==to.BOTTOM_RIGHT?u="-100%":(o==to.CENTER_LEFT||o==to.CENTER_CENTER||o==to.CENTER_RIGHT)&&(u="-50%");var c="translate(".concat(l,", ").concat(u,") translate(").concat(s,", ").concat(A,")");this.rendered.transform_!=c&&(this.rendered.transform_=c,i.transform=c,i.msTransform=c)},e.prototype.getOptions=function(){return this.options},e}(li),xQ=cq,bQ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),pC=.75,Tm=.1,hq=function(r){bQ(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createRenderer=function(){return new nQ(this)},e}(EQ),fq=function(r){bQ(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 hq({view:i.view});var c=n.ovmap_;i.layers&&i.layers.forEach(function(L){c.addLayer(L)});var h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",n.boxOverlay_=new xQ({position:[0,0],positioning:to.CENTER_CENTER,element:h}),n.ovmap_.addOverlay(n.boxOverlay_);var f=a+" "+lA+" "+xh+(n.collapsed_&&n.collapsible_?" "+y_:"")+(n.collapsible_?"":" ol-uncollapsible"),p=n.element;p.className=f,p.appendChild(n.ovmapDiv_),p.appendChild(u);var v=n,m=n.boxOverlay_,g=n.boxOverlay_.getElement(),_=function(L){return{clientX:L.clientX,clientY:L.clientY}},E=function(L){var O=_(L),b=c.getEventCoordinateInternal(O);m.setPosition(b)},B=function(L){var O=c.getEventCoordinateInternal(L);v.getMap().getView().setCenterInternal(O),window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",B)};return g.addEventListener("mousedown",function(){window.addEventListener("mousemove",E),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,ch.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===Jn.VIEW){var n=t.oldValue;n&&this.unbindView_(n);var i=this.getMap().getView();this.bindView_(i)}else!this.ovmap_.isRendered()&&(t.key===Jn.TARGET||t.key===Jn.SIZE)&&this.ovmap_.updateSize()},e.prototype.bindView_=function(t){if(!this.view_){var n=new qs({projection:t.getProjection()});this.ovmap_.setView(n)}t.addChangeListener(So.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeChangeListener(So.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_&&AA(o,this.viewExtent_))){this.viewExtent_=o;var s=n.getSize(),A=n.getView(),l=A.calculateExtentInternal(s),u=n.getPixelFromCoordinateInternal(Rs(o)),c=n.getPixelFromCoordinateInternal($p(o)),h=Math.abs(u[0]-c[0]),f=Math.abs(u[1]-c[1]),p=s[0],v=s[1];h<p*Tm||f<v*Tm||h>p*pC||f>v*pC?this.resetExtent_():Fo(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(pC/Tm)/Math.LN2,l=1/(Math.pow(2,A/2)*Tm);D6(o,l),s.fitInternal(Hu(o))},e.prototype.recenter_=function(){var t=this.getMap(),n=this.ovmap_,i=t.getView(),a=n.getView();a.setCenterInternal(i.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),n=this.ovmap_;if(!(!t.isRendered()||!n.isRendered())){var i=t.getSize(),a=t.getView(),o=n.getView(),s=this.rotateWithView_?0:-a.getRotation(),A=this.boxOverlay_,l=this.boxOverlay_.getElement(),u=a.getCenterInternal(),c=a.getResolution(),h=o.getResolution(),f=i[0]*c/h,p=i[1]*c/h;if(A.setPosition(u),l){l.style.width=f+"px",l.style.height=p+"px";var v="rotate("+s+"rad)";l.style.transform=v}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=lg(this.ovmap_,Ks.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(y_),this.collapsed_?Bp(this.collapseLabel_,this.label_):Bp(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}(_r),pq=fq,dq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dC="units",vc={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},vq=[1,2,5],vC=25.4/.28,gq=function(r){dq(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+" "+lA,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(dC,n.handleUnitsChanged_),n.setUnits(i.units||vc.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(dC)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(dC,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==vc.DEGREES?Qa.DEGREES:Qa.METERS,s=T_(i,t.resolution,n,o),A=this.minWidth_*(this.dpi_||vC)/vC,l=A*s,u="";if(a==vc.DEGREES){var c=bs[Qa.DEGREES];l*=c,l<c/60?(u="″",s*=3600):l<c?(u="",s*=60):u="°"}else a==vc.IMPERIAL?l<.9144?(u="in",s/=.0254):l<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):a==vc.NAUTICAL?(s/=1852,u="nm"):a==vc.METRIC?l<.001?(u="μm",s*=1e6):l<1?(u="mm",s*=1e3):l<1e3?u="m":(u="km",s/=1e3):a==vc.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 h=3*Math.floor(Math.log(A*s)/Math.log(10)),f,p,v;;){v=Math.floor(h/3);var m=Math.pow(10,v);if(f=vq[(h%3+3)%3]*m,p=Math.round(f/s),isNaN(p)){this.element.style.display="none",this.renderedVisible_=!1;return}else if(p>=A)break;++h}var g;this.scaleBar_?g=this.createScaleBar(p,f,u):g=f.toFixed(v<0?-v:0)+" "+u,this.renderedHTML_!=g&&(this.innerElement_.innerHTML=g,this.renderedHTML_=g),this.renderedWidth_!=p&&(this.innerElement_.style.width=p+"px",this.renderedWidth_=p),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 c='<div style="display: flex;">'+u+o.join("")+"</div>";return c},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=T_(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,Qa.METERS),n=this.dpi_||vC,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}(_r),yq=gq,mq=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)}}(),kd={VERTICAL:0,HORIZONTAL:1},_q=function(r){mq(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_=kd.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 "+lA;var s=n.element;return s.className=a+" "+lA+" "+xh,s.appendChild(o),s.addEventListener(Xs.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),s.addEventListener(Xs.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),s.addEventListener(Xs.POINTERUP,n.handleDraggerEnd_.bind(n),!1),s.addEventListener(ye.CLICK,n.handleContainerClick_.bind(n),!1),o.addEventListener(ye.CLICK,jY,!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_=kd.HORIZONTAL,this.widthLimit_=n-A):(this.direction_=kd.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:ts})},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,Xs.POINTERMOVE,i,this),Pe(o,Xs.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_==kd.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_===kd.HORIZONTAL?i=t/this.widthLimit_:i=n/this.heightLimit_,xn(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 xn(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}(_r),wq=_q,Eq=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)}}(),Cq=function(r){Eq(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+" "+lA+" "+xh,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(Hu(i))},e}(_r),Bq=Cq;function Tq(r){var e=r||{},t=new si,n=e.zoom!==void 0?e.zoom:!0;n&&t.push(new TQ(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new BQ(e.rotateOptions));var a=e.attribution!==void 0?e.attribution:!0;return a&&t.push(new CQ(e.attributionOptions)),t}var qT={ACTIVE:"active"},Sq=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)}}(),xq=function(r){Sq(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(qT.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(qT.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(li);function bq(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:YI,center:r.getConstrainedCenter(i)})}}function iF(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:ts})}}var Kp=xq,Iq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Fq=function(r){Iq(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==ar.DBLCLICK){var i=t.originalEvent,a=t.map,o=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_,A=a.getView();iF(A,s,o,this.duration_),i.preventDefault(),n=!0}return!n},e}(Kp),Lq=Fq,Oq=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)}}(),Rq=function(r){Oq(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==ar.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==ar.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==ar.POINTERDOWN){var a=this.handleDownEvent(t);this.handlingDownUpSequence=a,n=this.stopDown(a)}else t.type==ar.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(Mq(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==ar.POINTERUP?delete this.trackedPointers_[i]:t.type==ar.POINTERDOWN?this.trackedPointers_[i]=n:i in this.trackedPointers_&&(this.trackedPointers_[i]=n),this.targetPointers=PI(this.trackedPointers_)}},e}(Kp);function aF(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 Mq(r){var e=r.type;return e===ar.POINTERDOWN||e===ar.POINTERDRAG||e===ar.POINTERUP}var Po=Rq;function b_(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 IQ=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},FQ=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},LQ=function(r){var e=r.map.getTargetElement(),t=r.map.getOwnerDocument().activeElement;return e.contains(t)},oF=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?LQ(r):!0},rw=iA,Nq=function(r){return r.type==ar.CLICK},sF=function(r){var e=r.originalEvent;return e.button==0&&!(_Y&&L6&&e.ctrlKey)},ZT=Ch,Pq=function(r){return r.type=="pointermove"},nw=function(r){return r.type==ar.SINGLECLICK},Uq=function(r){return r.type==ar.DBLCLICK},iw=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},Dq=function(r){var e=r.originalEvent;return!e.altKey&&(L6?e.metaKey:e.ctrlKey)&&!e.shiftKey},Jg=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},AF=function(r){var e=r.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"},qc=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.pointerType=="mouse"},Qq=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.pointerType==="touch"},Hq=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.pointerType==="pen"},lF=function(r){var e=r.originalEvent;return _e(e!==void 0,56),e.isPrimary&&e.button===0},Gq=Object.freeze(Object.defineProperty({__proto__:null,all:b_,altKeyOnly:IQ,altShiftKeysOnly:FQ,focus:LQ,focusWithTabindex:oF,always:rw,click:Nq,mouseActionButton:sF,never:ZT,pointerMove:Pq,singleClick:nw,doubleClick:Uq,noModifierKeys:iw,platformModifierKeyOnly:Dq,shiftKeyOnly:Jg,targetNotEditable:AF,mouseOnly:qc,touchOnly:Qq,penOnly:Hq,primaryAction:lF},Symbol.toStringTag,{value:"Module"})),kq=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){kq(e,r);function e(t){var n=r.call(this,{stopDown:Ch})||this,i=t||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var a=i.condition?i.condition:b_(iw,lF);return n.condition_=i.onFocusOnly?b_(oF,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=aF(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();W6(a,s.getResolution()),QI(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:ts})}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}(Po),Vq=$q,jq=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)}}(),Kq=function(r){jq(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,{stopDown:Ch})||this,n.condition_=i.condition?i.condition:FQ,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){if(qc(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==KI){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(!qc(t))return!0;var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!qc(t))return!1;if(sF(t)&&this.condition_(t)){var n=t.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(Po),zq=Kq,Yq=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)}}(),Xq=function(r){Yq(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 bn([a])},e.prototype.getGeometry=function(){return this.geometry_},e}(V1),Wq=Xq,OQ=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)}}(),Sm={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},gC=function(r){OQ(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.coordinate=n,a.mapBrowserEvent=i,a}return e}(fo),qq=function(r){OQ(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.box_=new Wq(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:sF,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 gC(Sm.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 gC(n?Sm.BOXEND:Sm.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 gC(Sm.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(Po),Zq=qq,Jq=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)}}(),t3=function(r){Jq(e,r);function e(t){var n=this,i=t||{},a=i.condition?i.condition:Jg;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:ts})},e}(Zq),e3=t3,gc={LEFT:37,UP:38,RIGHT:39,DOWN:40},r3=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)}}(),n3=function(r){r3(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.defaultCondition_=function(a){return iw(a)&&AF(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==gc.DOWN||a==gc.LEFT||a==gc.RIGHT||a==gc.UP)){var o=t.map,s=o.getView(),A=s.getResolution()*this.pixelDelta_,l=0,u=0;a==gc.DOWN?u=-A:a==gc.LEFT?l=-A:a==gc.RIGHT?l=A:u=A;var c=[l,u];QI(c,s.getRotation()),bq(s,c,this.duration_),i.preventDefault(),n=!0}}return!n},e}(Kp),i3=n3,a3=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)}}(),o3=function(r){a3(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.condition_=i.condition?i.condition:AF,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();iF(A,s,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},e}(Kp),s3=o3,A3=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}(),l3=A3,u3=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)}}(),yC={TRACKPAD:"trackpad",WHEEL:"wheel"},c3=function(r){u3(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:rw;return n.condition_=i.onFocusOnly?b_(oF,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,gY&&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?yC.TRACKPAD:yC.WHEEL);var A=i.getView();if(this.mode_===yC.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=-xn(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),iF(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}(Kp),h3=c3,f3=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)}}(),p3=function(r){f3(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=Ch),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!==KI){var u=A.getViewport().getBoundingClientRect(),c=aF(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.anchor_=A.getCoordinateFromPixelInternal(c),this.rotating_&&(A.render(),l.adjustRotationInternal(n,this.anchor_))}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(Po),d3=p3,v3=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)}}(),g3=function(r){v3(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=Ch),n=r.call(this,a)||this,n.anchor_=null,n.duration_=i.duration!==void 0?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return e.prototype.handleDragEvent=function(t){var n=1,i=this.targetPointers[0],a=this.targetPointers[1],o=i.clientX-a.clientX,s=i.clientY-a.clientY,A=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(n=this.lastDistance_/A),this.lastDistance_=A;var l=t.map,u=l.getView();n!=1&&(this.lastScaleDelta_=n);var c=l.getViewport().getBoundingClientRect(),h=aF(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),l.render(),u.adjustResolutionInternal(n,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView(),a=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,a),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(Po),y3=g3,Cs={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"},m3=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)}}(),_3=function(r){m3(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.condition_=i.condition?i.condition:Jg,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(qc(t)){var n=t.map,i=n.getSize(),a=t.pixel,o=a[0]-i[0]/2,s=i[1]/2-a[1],A=Math.atan2(s,o),l=Math.sqrt(o*o+s*s),u=n.getView();if(this.lastAngle_!==void 0){var c=this.lastAngle_-A;u.adjustRotationInternal(c)}this.lastAngle_=A,this.lastMagnitude_!==void 0&&u.adjustResolutionInternal(this.lastMagnitude_/l),this.lastMagnitude_!==void 0&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},e.prototype.handleUpEvent=function(t){if(!qc(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 qc(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0):!1},e}(Po),w3=_3,E3=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)}}(),RQ=function(r){E3(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 c=this.getRadius()/Math.sqrt(l);i[0]=o[0]+c*s,i[1]=o[1]+c*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 uo(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(Mn(t,n)){var i=this.getCenter();return t[0]<=i[0]&&t[2]>=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:X1(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=uQ(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(XI(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(lQ(i,0,i.length,a,t,n,i)),this.changed()},e}(Is);RQ.prototype.transform;var uF=RQ,C3=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)}}(),B3=function(r){C3(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?T3(t):void 0,this.changed()},e.prototype.setId=function(t){this.id_=t,this.changed()},e.prototype.setGeometryName=function(t){this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_()},e}(li);function T3(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 or=B3;function I_(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],c=r[e+1],h=0,f=[0],p=e+n;p<t;p+=n){var v=r[p],m=r[p+1];h+=Math.sqrt((v-u)*(v-u)+(m-c)*(m-c)),f.push(h),u=v,c=m}var g=i*h,_=hY(f,g);_<0?(A=(g-f[-_-2])/(f[-_-1]-f[-_-2]),s=e+(-_-2)*n):s=e+_*n}for(var E=o>1?o:2,B=a||new Array(E),p=0;p<E;++p)B[p]=s===void 0?NaN:A===void 0?r[s+p]:YA(r[s+p],r[s+n+p],A);return B}function JT(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 c=r[(s+1)*n-1],h=(i-u)/(c-u);o=[];for(var f=0;f<n-1;++f)o.push(YA(r[(s-1)*n+f],r[s*n+f],h));return o.push(i),o}function S3(r,e,t,n,i,a,o){if(o)return JT(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 JT(r,e,u,n,i,!1);e=u}}return null}function MQ(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 x3=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)}}(),b3=function(r){x3(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?Qr(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<Xu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(WI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),ZI(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.forEachSegment=function(t){return dQ(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 JT(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return qA(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,n){return I_(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},e.prototype.getLength=function(){return MQ(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=eF(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 J1(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=Zg(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Is),Hr=b3,I3=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)}}(),F3=function(r){I3(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,c=s.length;u<c;++u){var h=s[u];u===0&&(o=h.getLayout()),Qr(A,h.getFlatCoordinates()),l.push(A.length)}a.setFlatCoordinates(o,A),a.ends_=l}return a}return e.prototype.appendLineString=function(t){this.flatCoordinates?Qr(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<Xu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(qI(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),JI(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 S3(this.flatCoordinates,0,this.ends_,this.stride,t,a,o)},e.prototype.getCoordinates=function(){return gg(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 Hr(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 Hr(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=I_(n,i,l,o,.5);Qr(t,u),i=l}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=mW(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 IW(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=tF(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(Is),xa=F3,L3=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)}}(),O3=function(r){L3(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?Qr(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<Xu(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=Wc(t,n,o[A],o[A+1]);if(u<a){a=u;for(var c=0;c<s;++c)i[c]=o[A+c];i.length=s}}return a},e.prototype.getCoordinates=function(){return qA(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 fr(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 fr(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(z1(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=Zg(this.flatCoordinates,0,t,this.stride),this.changed()},e}(Is),es=O3;function NQ(r,e,t,n){for(var i=[],a=_i(),o=0,s=t.length;o<s;++o){var A=t[o];a=Y1(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 R3=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)}}(),M3=function(r){R3(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,c=s.length;u<c;++u){var h=s[u];u===0&&(o=h.getLayout());for(var f=A.length,p=h.getEnds(),v=0,m=p.length;v<m;++v)p[v]+=f;Qr(A,h.getFlatCoordinates()),l.push(p)}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;Qr(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<Xu(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(vW(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),gW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return bW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,n)},e.prototype.getArea=function(){return EW(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),fM(n,0,this.endss_,this.stride,t)):n=this.flatCoordinates,XT(n,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=NQ(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=pQ(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new es(this.getFlatInteriorPoints().slice(),Wt.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;RW(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=fM(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=wW(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 bn(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 c=0,h=l.length;c<h;++c)l[c]-=o;var f=new bn(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 LW(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=yW(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}(Is),ba=M3;function N3(r,e,t,n,i){PQ(r,e,t||0,n||r.length-1,i||P3)}function PQ(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)),c=Math.min(n,Math.floor(e+(a-o)*A/a+l));PQ(r,e,u,c,i)}var h=r[e],f=t,p=n;for($d(r,t,e),i(r[n],h)>0&&$d(r,t,n);f<p;){for($d(r,f,p),f++,p--;i(r[f],h)<0;)f++;for(;i(r[p],h)>0;)p--}i(r[t],h)===0?$d(r,t,p):(p++,$d(r,p,n)),p<=e&&(t=p+1),e<=p&&(n=p-1)}}function $d(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function P3(r,e){return r<e?-1:r>e?1:0}class UQ{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(!bm(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;bm(e,A)&&(t.leaf?n.push(s):_C(e,A)?this._all(s,n):a.push(s))}t=a.pop()}return n}collides(e){let t=this.data;if(!bm(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(bm(e,o)){if(t.leaf||_C(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=Mf([]),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=U3(e,n.children,t);if(u!==-1)return n.children.splice(u,1),a.push(n),this._condense(a),this}!l&&!n.leaf&&_C(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=Mf(e.slice(t,n+1)),hf(s,this.toBBox),s;i||(i=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,i-1))),s=Mf([]),s.leaf=!1,s.height=i;const A=Math.ceil(a/o),l=A*Math.ceil(Math.sqrt(o));wM(e,t,n,l,this.compareMinX);for(let u=t;u<=n;u+=l){const c=Math.min(u+l-1,n);wM(e,u,c,A,this.compareMinY);for(let h=u;h<=c;h+=A){const f=Math.min(h+A-1,c);s.children.push(this._build(e,h,f,i-1))}}return hf(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=mC(l),c=H3(e,l)-u;c<o?(o=c,a=u<a?u:a,s=l):c===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),fv(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=Mf(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,hf(n,this.toBBox),hf(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=Mf([e,t]),this.data.height=e.height+1,this.data.leaf=!1,hf(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=hv(e,0,s,this.toBBox),l=hv(e,s,n,this.toBBox),u=G3(A,l),c=mC(A)+mC(l);u<a?(a=u,i=s,o=c<o?c:o):u===a&&c<o&&(o=c,i=s)}return i||n-t}_chooseSplitAxis(e,t,n){const i=e.leaf?this.compareMinX:D3,a=e.leaf?this.compareMinY:Q3,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=hv(e,0,t,a),s=hv(e,n-t,n,a);let A=xm(o)+xm(s);for(let l=t;l<n-t;l++){const u=e.children[l];fv(o,e.leaf?a(u):u),A+=xm(o)}for(let l=n-t-1;l>=t;l--){const u=e.children[l];fv(s,e.leaf?a(u):u),A+=xm(s)}return A}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)fv(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():hf(e[t],this.toBBox)}}function U3(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 hf(r,e){hv(r,0,r.children.length,e,r)}function hv(r,e,t,n,i){i||(i=Mf(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];fv(i,r.leaf?n(o):o)}return i}function fv(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 D3(r,e){return r.minX-e.minX}function Q3(r,e){return r.minY-e.minY}function mC(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function xm(r){return r.maxX-r.minX+(r.maxY-r.minY)}function H3(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 G3(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 _C(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function bm(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function Mf(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function wM(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;N3(r,o,e,t,i),a.push(e,o,o,t)}}var $e={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},k3=function(){function r(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Pi(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 Be()},r.prototype.getImage=function(e){return Be()},r.prototype.getHitDetectionImage=function(){return Be()},r.prototype.getPixelRatio=function(e){return 1},r.prototype.getImageState=function(){return Be()},r.prototype.getImageSize=function(){return Be()},r.prototype.getOrigin=function(){return Be()},r.prototype.getSize=function(){return Be()},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_=Pi(e)},r.prototype.listenImageChange=function(e){Be()},r.prototype.load=function(){Be()},r.prototype.unlistenImageChange=function(e){Be()},r}(),DQ=k3;function Js(r){return Array.isArray(r)?K6(r):r}var $3=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)}}(),V3=function(r){$3(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=ja(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 $e.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),c=Math.sqrt(o*o-u*u),h=a-c,f=Math.sqrt(u*u+h*h),p=f/u;if(t==="miter"&&p<=i)return p*n;var v=n/2/p,m=n/2*(h/f),g=Math.sqrt((a+v)*(a+v)+m*m),_=g-a;if(this.radius2_===void 0||t==="bevel")return _*2;var E=a*Math.sin(l),B=Math.sqrt(a*a-E*E),L=o-B,O=Math.sqrt(E*E+L*L),b=O/E;if(b<=i){var T=b*n/2-o-a;return 2*Math.max(_,T)}return _*2},e.prototype.createRenderOptions=function(){var t=Tp,n=0,i=null,a=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=fg),o=Js(o),s=this.stroke_.getWidth(),s===void 0&&(s=dg),i=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Tp),n=this.stroke_.getMiterLimit(),n===void 0&&(n=hg));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=rl),n.fillStyle=Js(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=Du(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0){var a=ja(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=rl,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}(DQ),R0=V3,j3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),K3=function(r){j3(e,r);function e(t){var n=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}(R0),ty=K3,z3=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}(),Aa=z3,Y3=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}(),Ui=Y3,jf=function(){function r(e){var t=e||{};this.geometry_=null,this.geometryFunction_=EM,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_=EM,this.geometry_=e},r.prototype.setZIndex=function(e){this.zIndex_=e},r}();function X3(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 wC=null;function W3(r,e){if(!wC){var t=new Aa({color:"rgba(255,255,255,0.4)"}),n=new Ui({color:"#3399CC",width:1.25});wC=[new jf({image:new ty({fill:t,stroke:n,radius:5}),fill:t,stroke:n})]}return wC}function cF(){var r={},e=[255,255,255,1],t=[0,153,255,1],n=3;return r[st.POLYGON]=[new jf({fill:new Aa({color:[255,255,255,.5]})})],r[st.MULTI_POLYGON]=r[st.POLYGON],r[st.LINE_STRING]=[new jf({stroke:new Ui({color:e,width:n+2})}),new jf({stroke:new Ui({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 jf({image:new ty({radius:n*2,fill:new Aa({color:t}),stroke:new Ui({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 EM(r){return r.getGeometry()}var oa=jf,q3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),CM={RENDER_ORDER:"renderOrder"},Z3=function(r){q3(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(CM.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 UQ(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(CM.RENDER_ORDER,t)},e.prototype.setStyle=function(t){this.style_=t!==void 0?t:W3,this.styleFunction_=t===null?void 0:X3(this.style_),this.changed()},e}(Sh),aw=Z3,ey={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},Im=[ey.FILL],uu=[ey.STROKE],Qc=[ey.BEGIN_PATH],BM=[ey.CLOSE_PATH],Qe=ey,J3=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}(),QQ=J3,tZ=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)}}(),eZ=function(r){tZ(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],xs(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 c=t[n],h=t[n+1],f=this.tmpCoordinate_,p=!0,v,m,g;for(v=n+a;v<i;v+=a)f[0]=t[v],f[1]=t[v+1],g=d_(u,f),g!==m?(p&&(A[l++]=c,A[l++]=h,p=!1),A[l++]=f[0],A[l++]=f[1]):g===zi.INTERSECTING?(A[l++]=f[0],A[l++]=f[1],p=!1):p=!0,c=f[0],h=f[1],m=g;return(o&&p||v===n+a)&&(A[l++]=c,A[l++]=h),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,c,h,f;switch(o){case st.MULTI_POLYGON:l=t.getOrientedFlatCoordinates(),h=[];var p=t.getEndss();f=0;for(var v=0,m=p.length;v<m;++v){var g=[];f=this.drawCustomCoordinates_(l,f,p[v],s,g),h.push(g)}this.instructions.push([Qe.CUSTOM,A,h,t,i,XT]),this.hitDetectionInstructions.push([Qe.CUSTOM,A,h,t,a||i,XT]);break;case st.POLYGON:case st.MULTI_LINE_STRING:c=[],l=o==st.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),f=this.drawCustomCoordinates_(l,0,t.getEnds(),s,c),this.instructions.push([Qe.CUSTOM,A,c,t,i,gg]),this.hitDetectionInstructions.push([Qe.CUSTOM,A,c,t,a||i,gg]);break;case st.LINE_STRING:case st.CIRCLE:l=t.getFlatCoordinates(),u=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([Qe.CUSTOM,A,u,t,i,qA]),this.hitDetectionInstructions.push([Qe.CUSTOM,A,u,t,a||i,qA]);break;case st.MULTI_POINT:l=t.getFlatCoordinates(),u=this.appendFlatPointCoordinates(l,s),u>A&&(this.instructions.push([Qe.CUSTOM,A,u,t,i,qA]),this.hitDetectionInstructions.push([Qe.CUSTOM,A,u,t,a||i,qA]));break;case st.POINT:l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([Qe.CUSTOM,A,u,t,i]),this.hitDetectionInstructions.push([Qe.CUSTOM,A,u,t,a||i]);break}this.endGeometry(n)},e.prototype.beginGeometry=function(t,n){this.beginGeometryInstruction1_=[Qe.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Qe.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==Qe.END_GEOMETRY?s=n:o==Qe.BEGIN_GEOMETRY&&(a[2]=n,fY(this.hitDetectionInstructions,s,n),s=-1)},e.prototype.setFillStrokeStyle=function(t,n){var i=this.state;if(t){var a=t.getColor();i.fillStyle=Js(a||rl)}else i.fillStyle=void 0;if(n){var o=n.getColor();i.strokeStyle=Js(o||fg);var s=n.getLineCap();i.lineCap=s!==void 0?s:__;var A=n.getLineDash();i.lineDash=A?A.slice():ug;var l=n.getLineDashOffset();i.lineDashOffset=l||cg;var u=n.getLineJoin();i.lineJoin=u!==void 0?u:Tp;var c=n.getWidth();i.lineWidth=c!==void 0?c:dg;var h=n.getMiterLimit();i.miterLimit=h!==void 0?h:hg,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=[Qe.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[Qe.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&&!yl(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=[Qe.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=LI(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;Va(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(QQ),ry=eZ,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)}}(),nZ=function(r){rZ(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([Qe.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([Qe.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([Qe.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([Qe.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}(ry),iZ=nZ,aZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),oZ=function(r){aZ(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=[Qe.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([Qe.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,ug,cg],Qc);var s=t.getFlatCoordinates(),A=t.getStride();this.drawFlatCoordinates_(s,0,s.length,A),this.hitDetectionInstructions.push(uu),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([Qe.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],Qc);for(var s=t.getEnds(),A=t.getFlatCoordinates(),l=t.getStride(),u=0,c=0,h=s.length;c<h;++c)u=this.drawFlatCoordinates_(A,u,s[c],l);this.hitDetectionInstructions.push(uu),this.endGeometry(n)}},e.prototype.finish=function(){var t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(uu),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(uu),t.lastStroke=this.coordinates.length),t.lastStroke=0,r.prototype.applyStroke.call(this,t),this.instructions.push(Qc)},e}(ry),sZ=oZ,AZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),lZ=function(r){AZ(e,r);function e(t,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(Qc),this.hitDetectionInstructions.push(Qc);for(var u=0;u<l;++u){var c=i[u],h=this.coordinates.length,f=this.appendFlatLineCoordinates(t,n,c,a,!0,!A),p=[Qe.MOVE_TO_LINE_TO,h,f];this.instructions.push(p),this.hitDetectionInstructions.push(p),A&&(this.instructions.push(BM),this.hitDetectionInstructions.push(BM)),n=c}return s&&(this.instructions.push(Im),this.hitDetectionInstructions.push(Im)),A&&(this.instructions.push(uu),this.hitDetectionInstructions.push(uu)),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([Qe.SET_FILL_STYLE,rl]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Qe.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=[Qe.CIRCLE,l];this.instructions.push(Qc,u),this.hitDetectionInstructions.push(Qc,u),i.fillStyle!==void 0&&(this.instructions.push(Im),this.hitDetectionInstructions.push(Im)),i.strokeStyle!==void 0&&(this.instructions.push(uu),this.hitDetectionInstructions.push(uu)),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([Qe.SET_FILL_STYLE,rl]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Qe.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([Qe.SET_FILL_STYLE,rl]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([Qe.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,c=0,h=s.length;c<h;++c)u=this.drawFlatCoordinatess_(A,u,s[c],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]=xc(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}(ry),TM=lZ,HQ={POINT:"point",LINE:"line"};function uZ(r,e,t,n,i){var a=t,o=t,s=0,A=0,l=t,u,c,h,f,p,v,m,g,_,E;for(c=t;c<n;c+=i){var B=e[c],L=e[c+1];p!==void 0&&(_=B-p,E=L-v,f=Math.sqrt(_*_+E*E),m!==void 0&&(A+=h,u=Math.acos((m*_+g*E)/(h*f)),u>r&&(A>s&&(s=A,a=l,o=c),A=0,l=c-i)),h=f,m=_,g=E),p=B,v=L}return A+=f,A>s?[l,c]:[a,o]}var 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)}}(),F_={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},hZ=function(r){cZ(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i,a)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return e.prototype.finish=function(){var t=r.prototype.finish.call(this);return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t},e.prototype.drawText=function(t,n){var i=this.textFillState_,a=this.textStrokeState_,o=this.textState_;if(!(this.text_===""||!o||!i&&!a)){var s=this.coordinates,A=s.length,l=t.getType(),u=null,c=t.getStride();if(o.placement===HQ.LINE&&(l==st.LINE_STRING||l==st.MULTI_LINE_STRING||l==st.POLYGON||l==st.MULTI_POLYGON)){if(!Mn(this.getBufferedMaxExtent(),t.getExtent()))return;var h=void 0;if(u=t.getFlatCoordinates(),l==st.LINE_STRING)h=[u.length];else if(l==st.MULTI_LINE_STRING)h=t.getEnds();else if(l==st.POLYGON)h=t.getEnds().slice(0,1);else if(l==st.MULTI_POLYGON){var f=t.getEndss();h=[];for(var p=0,v=f.length;p<v;++p)h.push(f[p][0])}this.beginGeometry(t,n);for(var m=o.textAlign,g=0,_=void 0,E=0,B=h.length;E<B;++E){if(m==null){var L=uZ(o.maxAngle,u,g,h[E],c);g=L[0],_=L[1]}else _=h[E];for(var p=g;p<_;p+=c)s.push(u[p],u[p+1]);var O=s.length;g=h[E],this.drawChars_(A,O),A=O}this.endGeometry(n)}else{var b=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(),c=2;break;case st.POLYGON:u=t.getFlatInteriorPoint(),o.overflow||b.push(u[2]/this.resolution),c=3;break;case st.MULTI_POLYGON:var T=t.getFlatInteriorPoints();u=[];for(var p=0,v=T.length;p<v;p+=3)o.overflow||b.push(T[p+2]/this.resolution),u.push(T[p],T[p+1]);if(u.length===0)return;c=2;break}var O=this.appendFlatPointCoordinates(u,c);if(O===A)return;if(b&&(O-A)/2!==u.length/c){var I=A/2;b=b.filter(function(J,nt){var it=s[(I+nt)*2]===u[nt*c]&&s[(I+nt)*2+1]===u[nt*c+1];return it||--I,it})}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 M=o.padding;if(M!=Uc&&(o.scale[0]<0||o.scale[1]<0)){var x=o.padding[0],S=o.padding[1],N=o.padding[2],P=o.padding[3];o.scale[0]<0&&(S=-S,P=-P),o.scale[1]<0&&(x=-x,N=-N),M=[x,S,N,P]}var X=this.pixelRatio;this.instructions.push([Qe.DRAW_IMAGE,A,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,M==Uc?Uc:M.map(function(J){return J*X}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,b]);var z=1/X;this.hitDetectionInstructions.push([Qe.DRAW_IMAGE,A,O,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[z,z],NaN,this.declutterImageWithText_,M,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,b]),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||pg,textBaseline:n.textBaseline||w_,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=F_[a.textBaseline],c=this.textOffsetY_*l,h=this.text_,f=i?i.lineWidth*Math.abs(a.scale[0])/2:0;this.instructions.push([Qe.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,l,c,o,f*l,h,s,1]),this.hitDetectionInstructions.push([Qe.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,1,c,o,f,h,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=Js(s.getColor()||rl)):(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(),c=A.getWidth(),h=A.getMiterLimit();o.lineCap=A.getLineCap()||__,o.lineDash=l?l.slice():ug,o.lineDashOffset=u===void 0?cg:u,o.lineJoin=A.getLineJoin()||Tp,o.lineWidth=c===void 0?dg:c,o.miterLimit=h===void 0?hg:h,o.strokeStyle=Js(A.getColor()||fg)}i=this.textState_;var f=t.getFont()||eQ;pX(f);var p=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()||w_,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Uc,i.scale=p===void 0?[1,1]:p;var v=t.getOffsetX(),m=t.getOffsetY(),g=t.getRotateWithView(),_=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=v===void 0?0:v,this.textOffsetY_=m===void 0?0:m,this.textRotateWithView_=g===void 0?!1:g,this.textRotation_=_===void 0?0:_,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}(ry),fZ=hZ,pZ={Circle:TM,Default:ry,Image:iZ,LineString:sZ,Polygon:TM,Text:fZ},dZ=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=pZ[t];a=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=a}return a},r}(),L_=dZ,vZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gZ=function(r){vZ(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 Be()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return Be()},e.prototype.renderFrame=function(t,n){return Be()},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()===$e.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var n=t.getState();return n!=$e.LOADED&&n!=$e.ERROR&&t.addEventListener(ye.CHANGE,this.boundHandleImageChange_),n==$e.IDLE&&(t.load(),n=t.getState()),n==$e.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==Da.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,r.prototype.disposeInternal.call(this)},e}(Xg),GQ=gZ,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)}}(),pv=null;function mZ(){var r=document.createElement("canvas");r.width=1,r.height=1,pv=r.getContext("2d")}var _Z=function(r){yZ(e,r);function e(t){var n=r.call(this,t)||this;return n.container=null,n.renderedResolution,n.tempTransform=oi(),n.pixelTransform=oi(),n.inversePixelTransform=oi(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return e.prototype.getImageData=function(t,n,i){pv||mZ(),pv.clearRect(0,0,1,1);var a;try{pv.drawImage(t,n,i,1,1,0,0,1,1),a=pv.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&&yl(Du(t.style.backgroundColor),Du(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=ja();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=Rs(i),o=Yg(i),s=$p(i),A=zg(i);un(n.coordinateToPixelTransform,a),un(n.coordinateToPixelTransform,o),un(n.coordinateToPixelTransform,s),un(n.coordinateToPixelTransform,A);var l=this.inversePixelTransform;un(l,a),un(l,o),un(l,s),un(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 Uv(t,this.inversePixelTransform,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.frameState=n,this.dispatchRenderEvent_(ao.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(ao.POSTRENDER,t,n)},e.prototype.getRenderTransform=function(t,n,i,a,o,s,A){var l=o/2,u=s/2,c=a/n,h=-c,f=-t[0]+A,p=-t[1];return $a(this.tempTransform,l,u,c,h,-i,f,p)},e.prototype.getDataAtPixel=function(t,n,i){var a=un(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer(),A=s.getExtent();if(A){var l=un(n.pixelToCoordinateTransform,t.slice());if(!xs(A,l))return null}var u=Math.round(a[0]),c=Math.round(a[1]),h=this.pixelContext_;if(!h){var f=document.createElement("canvas");f.width=1,f.height=1,h=f.getContext("2d"),this.pixelContext_=h}h.clearRect(0,0,1,1);var p;try{h.drawImage(o.canvas,u,c,1,1,0,0,1,1),p=h.getImageData(0,0,1,1).data}catch(v){return v.name==="SecurityError"?(this.pixelContext_=null,new Uint8Array):p}return p[3]===0?null:p},e.prototype.disposeInternal=function(){delete this.frameState,r.prototype.disposeInternal.call(this)},e}(GQ),hF=_Z,Ar={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function wZ(r,e,t,n,i,a,o,s,A,l,u,c){var h=r[e],f=r[e+1],p=0,v=0,m=0,g=0;function _(){p=h,v=f,e+=n,h=r[e],f=r[e+1],g+=m,m=Math.sqrt((h-p)*(h-p)+(f-v)*(f-v))}do _();while(e<t-n&&g+m<a);for(var E=m===0?0:(a-g)/m,B=YA(p,h,E),L=YA(v,f,E),O=e-n,b=g,T=a+s*A(l,i,u);e<t-n&&g+m<T;)_();E=m===0?0:(T-g)/m;var I=YA(p,h,E),M=YA(v,f,E),x;if(c){var S=[B,L,I,M];XI(S,0,4,2,c,S,S),x=S[0]>S[2]}else x=B>I;var N=Math.PI,P=[],X=O+n===e;e=O,m=0,g=b,h=r[e],f=r[e+1];var z;if(X){_(),z=Math.atan2(f-v,h-p),x&&(z+=z>0?-N:N);var tt=(I+B)/2,J=(M+L)/2;return P[0]=[tt,J,(T-a)/2,z,i],P}for(var nt=0,it=i.length;nt<it;){_();var _t=Math.atan2(f-v,h-p);if(x&&(_t+=_t>0?-N:N),z!==void 0){var R=_t-z;if(R+=R>N?-2*N:R<-N?2*N:0,Math.abs(R)>o)return null}z=_t;for(var $=nt,K=0;nt<it;++nt){var q=x?it-nt-1:nt,at=s*A(l,i[q],u);if(e+n<t&&g+m<a+K+at/2)break;K+=at}if(nt!==$){var vt=x?i.substring(it-$,it-nt):i.substring($,nt);E=m===0?0:(a+K/2-g)/m;var tt=YA(p,h,E),J=YA(v,f,E);P.push([tt,J,K/2,_t,vt]),a+=K}}return P}var ff=_i(),Kl=[],RA=[],MA=[],zl=[];function SM(r){return r[3].declutterBox}var EZ=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 xM(r,e){return(e==="start"||e==="end")&&!EZ.test(r)&&(e=e==="start"?"left":"right"),F_[e]}function CZ(r,e,t){return t>0&&r.push(`
`,""),r.push(e,""),r}var BZ=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_=oi(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return r.prototype.createLabel=function(e,t,n,i){var a=e+t+n+i;if(this.labels_[a])return this.labels_[a];var o=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,A=this.textStates[t],l=this.pixelRatio,u=[A.scale[0]*l,A.scale[1]*l],c=Array.isArray(e),h=xM(c?e[0]:e,A.textAlign||pg),f=i&&o.lineWidth?o.lineWidth:0,p=c?e:e.split(`
`).reduce(CZ,[]),v=vX(A,p),m=v.width,g=v.height,_=v.widths,E=v.heights,B=v.lineWidths,L=m+f,O=[],b=(L+2)*u[0],T=(g+f)*u[1],I={width:b<0?Math.floor(b):Math.ceil(b),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 M=K1?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;M.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 x=.5-h,S=h*L+x*f,N=[],P=[],X=0,z=0,tt=0,J=0,nt,it=0,_t=p.length;it<_t;it+=2){var R=p[it];if(R===`
`){z+=X,X=0,S=h*L+x*f,++J;continue}var $=p[it+1]||A.font;$!==nt&&(i&&N.push("font",$),n&&P.push("font",$),nt=$),X=Math.max(X,E[tt]);var K=[R,S+x*_[tt]+h*(_[tt]-B[J]),.5*(f+X)+z];S+=_[tt],i&&N.push("strokeText",K),n&&P.push("fillText",K),++tt}return Array.prototype.push.apply(O,N),Array.prototype.push.apply(O,P),this.labels_[a]=I,I},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,c,h,f,p,v,m){s*=h[0],A*=h[1];var g=n-s,_=i-A,E=a+l>e?e-l:a,B=o+u>t?t-u:o,L=p[3]+E*h[0]+p[1],O=p[0]+B*h[1]+p[2],b=g-p[3],T=_-p[0];(v||c!==0)&&(Kl[0]=b,zl[0]=b,Kl[1]=T,RA[1]=T,RA[0]=b+L,MA[0]=RA[0],MA[1]=T+O,zl[1]=MA[1]);var I;return c!==0?(I=$a(oi(),n,i,1,1,c,-n,-i),un(I,Kl),un(I,RA),un(I,MA),un(I,zl),uo(Math.min(Kl[0],RA[0],MA[0],zl[0]),Math.min(Kl[1],RA[1],MA[1],zl[1]),Math.max(Kl[0],RA[0],MA[0],zl[0]),Math.max(Kl[1],RA[1],MA[1],zl[1]),ff)):uo(Math.min(b,b+L),Math.min(T,T+O),Math.max(b,b+L),Math.max(T,T+O),ff),f&&(g=Math.round(g),_=Math.round(_)),{drawImageX:g,drawImageY:_,drawImageW:E,drawImageH:B,originX:l,originY:u,declutterBox:{minX:ff[0],minY:ff[1],maxX:ff[2],maxY:ff[3],value:m},canvasTransform:I,scale:h}},r.prototype.replayImageOrLabel_=function(e,t,n,i,a,o,s){var A=!!(o||s),l=i.declutterBox,u=e.canvas,c=s?s[2]*i.scale[0]/2:0,h=l.minX-c<=u.width/t&&l.maxX+c>=0&&l.minY-c<=u.height/t&&l.maxY+c>=0;return h&&(A&&this.replayTextBackground_(e,Kl,RA,MA,zl,o,s),gX(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=un(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=xM(Array.isArray(e)?e[0]:e,a.textAlign||pg),u=F_[a.textBaseline||w_],c=s&&s.lineWidth?s.lineWidth:0,h=o.width/A-2*a.scale[0],f=l*h+2*(.5-l)*c,p=u*o.height/A+2*(.5-u)*c;return{label:o,anchorX:f,anchorY:p}},r.prototype.execute_=function(e,t,n,i,a,o,s,A){var l;this.pixelCoordinates_&&yl(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Tu(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),BY(this.renderedTransform_,n));for(var u=0,c=i.length,h=0,f,p,v,m,g,_,E,B,L,O,b,T,I=0,M=0,x=null,S=null,N=this.coordinateCache_,P=this.viewRotation_,X=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,z={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:P},tt=this.instructions!=i||this.overlaps?0:200,J,nt,it,_t;u<c;){var R=i[u],$=R[0];switch($){case Qe.BEGIN_GEOMETRY:J=R[1],_t=R[3],J.getGeometry()?s!==void 0&&!Mn(s,_t.getExtent())?u=R[2]+1:++u:u=R[2];break;case Qe.BEGIN_PATH:I>tt&&(this.fill_(e),I=0),M>tt&&(e.stroke(),M=0),!I&&!M&&(e.beginPath(),m=NaN,g=NaN),++u;break;case Qe.CIRCLE:h=R[1];var K=l[h],q=l[h+1],at=l[h+2],vt=l[h+3],wt=at-K,W=vt-q,It=Math.sqrt(wt*wt+W*W);e.moveTo(K+It,q),e.arc(K,q,It,0,2*Math.PI,!0),++u;break;case Qe.CLOSE_PATH:e.closePath(),++u;break;case Qe.CUSTOM:h=R[1],f=R[2];var Ot=R[3],j=R[4],Z=R.length==6?R[5]:void 0;z.geometry=Ot,z.feature=J,u in N||(N[u]=[]);var ut=N[u];Z?Z(l,h,f,2,ut):(ut[0]=l[h],ut[1]=l[h+1],ut.length=2),j(ut,z),++u;break;case Qe.DRAW_IMAGE:h=R[1],f=R[2],B=R[3],p=R[4],v=R[5];var rt=R[6],G=R[7],xt=R[8],bt=R[9],dt=R[10],Et=R[11],yt=R[12],St=R[13],Ft=R[14];if(!B&&R.length>=19){L=R[18],O=R[19],b=R[20],T=R[21];var Mt=this.drawLabelWithPointPlacement_(L,O,b,T);B=Mt.label,R[3]=B;var Vt=R[22];p=(Mt.anchorX-Vt)*this.pixelRatio,R[4]=p;var Yt=R[23];v=(Mt.anchorY-Yt)*this.pixelRatio,R[5]=v,rt=B.height,R[6]=rt,St=B.width,R[13]=St}var ie=void 0;R.length>24&&(ie=R[24]);var ee=void 0,Xt=void 0,oe=void 0;R.length>16?(ee=R[15],Xt=R[16],oe=R[17]):(ee=Uc,Xt=!1,oe=!1),dt&&X?Et+=P:!dt&&!X&&(Et-=P);for(var Kt=0;h<f;h+=2)if(!(ie&&ie[Kt++]<St/this.pixelRatio)){var Xe=this.calculateImageOrLabelDimensions_(B.width,B.height,l[h],l[h+1],St,rt,p,v,xt,bt,Et,yt,a,ee,Xt||oe,J),Re=[e,t,B,Xe,G,Xt?x:null,oe?S:null],pr=void 0,Ie=void 0;if(A&&Ft){var xe=f-h;if(!Ft[xe]){Ft[xe]=Re;continue}if(pr=Ft[xe],delete Ft[xe],Ie=SM(pr),A.collides(Ie))continue}A&&A.collides(Xe.declutterBox)||(pr&&(A&&A.insert(Ie),this.replayImageOrLabel_.apply(this,pr)),A&&A.insert(Xe.declutterBox),this.replayImageOrLabel_.apply(this,Re))}++u;break;case Qe.DRAW_CHARS:var on=R[1],sr=R[2],Ti=R[3],Br=R[4];T=R[5];var ci=R[6],$r=R[7],Vr=R[8];b=R[9];var Me=R[10];L=R[11],O=R[12];var wr=[R[13],R[13]],Yn=this.textStates[O],fn=Yn.font,Si=[Yn.scale[0]*$r,Yn.scale[1]*$r],xi=void 0;fn in this.widths_?xi=this.widths_[fn]:(xi={},this.widths_[fn]=xi);var be=MQ(l,on,sr,2),hi=Math.abs(Si[0])*eM(fn,L,xi);if(Br||hi<=be){var Dn=this.textStates[O].textAlign,bi=(be-hi)*F_[Dn],en=wZ(l,on,sr,2,L,bi,ci,Math.abs(Si[0]),eM,fn,xi,X?0:this.viewRotation_);t:if(en){var qr=[],En=void 0,mo=void 0,se=void 0,ht=void 0,Qt=void 0;if(b)for(En=0,mo=en.length;En<mo;++En){Qt=en[En],se=Qt[4],ht=this.createLabel(se,O,"",b),p=Qt[2]+(Si[0]<0?-Me:Me),v=Ti*ht.height+(.5-Ti)*2*Me*Si[1]/Si[0]-Vr;var Xe=this.calculateImageOrLabelDimensions_(ht.width,ht.height,Qt[0],Qt[1],ht.width,ht.height,p,v,0,0,Qt[3],wr,!1,Uc,!1,J);if(A&&A.collides(Xe.declutterBox))break t;qr.push([e,t,ht,Xe,1,null,null])}if(T)for(En=0,mo=en.length;En<mo;++En){Qt=en[En],se=Qt[4],ht=this.createLabel(se,O,T,""),p=Qt[2],v=Ti*ht.height-Vr;var Xe=this.calculateImageOrLabelDimensions_(ht.width,ht.height,Qt[0],Qt[1],ht.width,ht.height,p,v,0,0,Qt[3],wr,!1,Uc,!1,J);if(A&&A.collides(Xe.declutterBox))break t;qr.push([e,t,ht,Xe,1,null,null])}A&&A.load(qr.map(SM));for(var qt=0,er=qr.length;qt<er;++qt)this.replayImageOrLabel_.apply(this,qr[qt])}}++u;break;case Qe.END_GEOMETRY:if(o!==void 0){J=R[1];var Or=o(J,_t);if(Or)return Or}++u;break;case Qe.FILL:tt?I++:this.fill_(e),++u;break;case Qe.MOVE_TO_LINE_TO:for(h=R[1],f=R[2],nt=l[h],it=l[h+1],_=nt+.5|0,E=it+.5|0,(_!==m||E!==g)&&(e.moveTo(nt,it),m=_,g=E),h+=2;h<f;h+=2)nt=l[h],it=l[h+1],_=nt+.5|0,E=it+.5|0,(h==f-2||_!==m||E!==g)&&(e.lineTo(nt,it),m=_,g=E);++u;break;case Qe.SET_FILL_STYLE:x=R,this.alignFill_=R[2],I&&(this.fill_(e),I=0,M&&(e.stroke(),M=0)),e.fillStyle=R[1],++u;break;case Qe.SET_STROKE_STYLE:S=R,M&&(e.stroke(),M=0),this.setStrokeStyle_(e,R),++u;break;case Qe.STROKE:tt?M++:e.stroke(),++u;break;default:++u;break}}I&&this.fill_(e),M&&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}(),TZ=BZ,EC=[Ar.POLYGON,Ar.CIRCLE,Ar.LINE_STRING,Ar.IMAGE,Ar.TEXT,Ar.DEFAULT],SZ=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_=oi(),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 TZ(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=$a(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=ja(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 c;this.renderBuffer_!==void 0&&(c=_i(),Yc(c,e),Va(c,t*(this.renderBuffer_+i),c));var h=xZ(i),f;function p(O,b){for(var T=u.getImageData(0,0,s,s).data,I=0,M=h.length;I<M;I++)if(T[h[I]]>0){if(!o||f!==Ar.IMAGE&&f!==Ar.TEXT||o.indexOf(O)!==-1){var x=(h[I]-3)/4,S=i-x%s,N=i-(x/s|0),P=a(O,b,S*S+N*N);if(P)return P}u.clearRect(0,0,s,s);break}}var v=Object.keys(this.executorsByZIndex_).map(Number);v.sort(Nu);var m,g,_,E,B;for(m=v.length-1;m>=0;--m){var L=v[m].toString();for(_=this.executorsByZIndex_[L],g=EC.length-1;g>=0;--g)if(f=EC[g],E=_[f],E!==void 0&&(B=E.executeHitDetection(u,A,n,p,c),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 Tu(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return hh(this.executorsByZIndex_)},r.prototype.execute=function(e,t,n,i,a,o,s){var A=Object.keys(this.executorsByZIndex_).map(Number);A.sort(Nu),this.maxExtent_&&(e.save(),this.clip(e,n));var l=o||EC,u,c,h,f,p,v;for(s&&A.reverse(),u=0,c=A.length;u<c;++u){var m=A[u].toString();for(p=this.executorsByZIndex_[m],h=0,f=l.length;h<f;++h){var g=l[h];v=p[g],v!==void 0&&v.execute(e,t,n,i,a,s)}}this.maxExtent_&&e.restore()},r}(),CC={};function xZ(r){if(CC[r]!==void 0)return CC[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 CC[r]=A,A}var O_=SZ,bZ=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)}}(),IZ=function(r){bZ(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_=oi(),l}return e.prototype.drawImages_=function(t,n,i,a){if(this.image_){var o=Tu(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 c=0,h=o.length;c<h;c+=2){var f=o[c]-this.imageAnchorX_,p=o[c+1]-this.imageAnchorY_;if(u!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var v=f+this.imageAnchorX_,m=p+this.imageAnchorY_;$a(A,v,m,1,1,u,-v,-m),s.setTransform.apply(s,A),s.translate(v,m),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,p,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=Tu(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 c=$a(this.tmpLocalTransform_,l,u,1,1,A,-l,-u);s.setTransform.apply(s,c),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=Tu(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(Mn(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=dW(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||!Mn(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_)),!!Mn(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(Mn(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 c=t.getFlatMidpoints();this.drawText_(c,0,c.length,2)}}},e.prototype.drawPolygon=function(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),!!Mn(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_)),!!Mn(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 c=t.getFlatInteriorPoints();this.drawText_(c,0,c.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&&(yl(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:pg;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:Js(a||rl)}}if(!n)this.strokeState_=null;else{var o=n.getColor(),s=n.getLineCap(),A=n.getLineDash(),l=n.getLineDashOffset(),u=n.getLineJoin(),c=n.getWidth(),h=n.getMiterLimit(),f=A||ug;this.strokeState_={lineCap:s!==void 0?s:__,lineDash:this.pixelRatio_===1?f:f.map(function(p){return p*i.pixelRatio_}),lineDashOffset:(l||cg)*this.pixelRatio_,lineJoin:u!==void 0?u:Tp,lineWidth:(c!==void 0?c:dg)*this.pixelRatio_,miterLimit:h!==void 0?h:hg,strokeStyle:Js(o||fg)}}},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:Js(i||rl)}}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(),c=a.getWidth(),h=a.getMiterLimit();this.textStrokeState_={lineCap:s!==void 0?s:__,lineDash:A||ug,lineDashOffset:l||cg,lineJoin:u!==void 0?u:Tp,lineWidth:c!==void 0?c:dg,miterLimit:h!==void 0?h:hg,strokeStyle:Js(o||fg)}}var f=t.getFont(),p=t.getOffsetX(),v=t.getOffsetY(),m=t.getRotateWithView(),g=t.getRotation(),_=t.getScaleArray(),E=t.getText(),B=t.getTextAlign(),L=t.getTextBaseline();this.textState_={font:f!==void 0?f:eQ,textAlign:B!==void 0?B:pg,textBaseline:L!==void 0?L:w_},this.text_=E!==void 0?Array.isArray(E)?E.reduce(function(O,b,T){return O+=T%2?" ":b},""):E:"",this.textOffsetX_=p!==void 0?this.pixelRatio_*p:0,this.textOffsetY_=v!==void 0?this.pixelRatio_*v:0,this.textRotateWithView_=m!==void 0?m:!1,this.textRotation_=g!==void 0?g:0,this.textScale_=[this.pixelRatio_*_[0],this.pixelRatio_*_[1]]}},e}(QQ),fF=IZ,Ua={FRACTION:"fraction",PIXELS:"pixels"},Li={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},FZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),LZ=function(r){FZ(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 Be()},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(){Be()},e}(Th),kQ=LZ,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)}}(),RZ=function(r){OZ(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,i,$e.IDLE)||this;return A.src_=a,A.image_=new Image,o!==null&&(A.image_.crossOrigin=o),A.unlisten_=null,A.state=$e.IDLE,A.imageLoadFunction_=s,A}return e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=$e.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=Ai(this.extent)/this.image_.height),this.state=$e.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){(this.state==$e.IDLE||this.state==$e.ERROR)&&(this.state=$e.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=pF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Ai(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(kQ);function pF(r,e,t){var n=r,i=!0,a=!1,o=!1,s=[lg(n,ye.LOAD,function(){o=!0,a||e()})];return n.src&&wY?(a=!0,n.decode().then(function(){i&&e()}).catch(function(A){i&&(o?e():t())})):s.push(lg(n,ye.ERROR,t)),function(){i=!1,s.forEach(Rr)}}var $Q=RZ,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)}}(),Vd=null,NZ=function(r){MZ(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_===$e.LOADED){Vd||(Vd=ja(1,1)),Vd.drawImage(this.image_,0,0);try{Vd.getImageData(0,0,1,1),this.tainted_=!1}catch{Vd=null,this.tainted_=!0}}return this.tainted_===!0},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(ye.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=$e.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=$e.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=ja(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_==$e.IDLE){this.imageState_=$e.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=pF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(!(!this.color_||this.canvas_[t]||this.imageState_!==$e.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=tl(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],c=0,h=o.length;c<h;c+=4)o[c]*=s,o[c+1]*=A,o[c+2]*=l,o[c+3]*=u;i.putImageData(a,0,0)}}},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(Th);function PZ(r,e,t,n,i,a){var o=v_.get(e,n,a);return o||(o=new NZ(r,e,t,n,i,a),v_.set(e,n,a,o)),o}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){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:Li.TOP_LEFT,n.anchorXUnits_=i.anchorXUnits!==void 0?i.anchorXUnits:Ua.FRACTION,n.anchorYUnits_=i.anchorYUnits!==void 0?i.anchorYUnits:Ua.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 c=i.src!==void 0?$e.IDLE:$e.LOADED;return n.color_=i.color!==void 0?Du(i.color):null,n.iconImage_=PZ(l,u,n.imgSize_!==void 0?n.imgSize_:null,n.crossOrigin_,c,n.color_),n.offset_=i.offset!==void 0?i.offset:[0,0],n.offsetOrigin_=i.offsetOrigin!==void 0?i.offsetOrigin:Li.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_==Ua.FRACTION||this.anchorYUnits_==Ua.FRACTION){if(!n)return null;t=this.anchor_.slice(),this.anchorXUnits_==Ua.FRACTION&&(t[0]*=n[0]),this.anchorYUnits_==Ua.FRACTION&&(t[1]*=n[1])}if(this.anchorOrigin_!=Li.TOP_LEFT){if(!n)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==Li.TOP_RIGHT||this.anchorOrigin_==Li.BOTTOM_RIGHT)&&(t[0]=-t[0]+n[0]),(this.anchorOrigin_==Li.BOTTOM_LEFT||this.anchorOrigin_==Li.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_!=Li.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;t=t.slice(),(this.offsetOrigin_==Li.TOP_RIGHT||this.offsetOrigin_==Li.BOTTOM_RIGHT)&&(t[0]=i[0]-n[0]-t[0]),(this.offsetOrigin_==Li.BOTTOM_LEFT||this.offsetOrigin_==Li.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}(DQ),ny=DZ,QZ="#333",HZ=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_=Pi(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 Aa({color:QZ}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:HQ.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_=Pi(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}(),bh=HZ,Io=.5;function VQ(r,e,t,n,i,a,o){var s=r[0]*Io,A=r[1]*Io,l=ja(s,A);l.imageSmoothingEnabled=!1;for(var u=l.canvas,c=new fF(l,Io,i,null,o),h=t.length,f=Math.floor((256*256*256-1)/h),p={},v=1;v<=h;++v){var m=t[v-1],g=m.getStyleFunction()||n;if(n){var _=g(m,a);if(_){Array.isArray(_)||(_=[_]);for(var E=v*f,B="#"+("000000"+E.toString(16)).slice(-6),L=0,O=_.length;L<O;++L){var b=_[L],T=b.getGeometryFunction()(m);if(!(!T||!Mn(i,T.getExtent()))){var I=b.clone(),M=I.getFill();M&&M.setColor(B);var x=I.getStroke();x&&(x.setColor(B),x.setLineDash(null)),I.setText(void 0);var S=b.getImage();if(S&&S.getOpacity()!==0){var N=S.getImageSize();if(!N)continue;var P=ja(N[0],N[1],void 0,{alpha:!1}),X=P.canvas;P.fillStyle=B,P.fillRect(0,0,X.width,X.height),I.setImage(new ny({img:X,imgSize:N,anchor:S.getAnchor(),anchorXUnits:Ua.PIXELS,anchorYUnits:Ua.PIXELS,offset:S.getOrigin(),opacity:1,size:S.getSize(),scale:S.getScale(),rotation:S.getRotation(),rotateWithView:S.getRotateWithView()}))}var z=I.getZIndex()||0,tt=p[z];tt||(tt={},p[z]=tt,tt[st.POLYGON]=[],tt[st.CIRCLE]=[],tt[st.LINE_STRING]=[],tt[st.POINT]=[]),tt[T.getType().replace("Multi","")].push(T,I)}}}}}for(var J=Object.keys(p).map(Number).sort(Nu),v=0,nt=J.length;v<nt;++v){var tt=p[J[v]];for(var it in tt)for(var _t=tt[it],L=0,O=_t.length;L<O;L+=2){c.setStyle(_t[L+1]);for(var R=0,$=e.length;R<$;++R)c.setTransform(e[R]),c.drawGeometry(_t[L])}}return l.getImageData(0,0,u.width,u.height)}function jQ(r,e,t){var n=[];if(t){var i=Math.floor(Math.round(r[0])*Io),a=Math.floor(Math.round(r[1])*Io),o=(xn(i,0,t.width-1)+xn(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),c=Math.floor((256*256*256-1)/e.length);u&&u%c===0&&n.push(e[u/c-1])}return n}var GZ=.5,KQ={Point:XZ,LineString:KZ,Polygon:qZ,MultiPoint:WZ,MultiLineString:zZ,MultiPolygon:YZ,GeometryCollection:jZ,Circle:$Z};function kZ(r,e){return parseInt(pe(r),10)-parseInt(pe(e),10)}function zQ(r,e){var t=tS(r,e);return t*t}function tS(r,e){return GZ*r/e}function $Z(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),Ar.CIRCLE);s.setFillStrokeStyle(a,o),s.drawCircle(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Ar.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function R_(r,e,t,n,i,a,o){var s=!1,A=t.getImage();if(A){var l=A.getImageState();l==$e.LOADED||l==$e.ERROR?A.unlistenImageChange(i):(l==$e.IDLE&&A.load(),l=A.getImageState(),A.listenImageChange(i),s=!0)}return VZ(r,e,t,n,a,o),s}function VZ(r,e,t,n,i,a){var o=t.getGeometryFunction()(e);if(o){var s=o.simplifyTransformed(n,i),A=t.getRenderer();if(A)YQ(r,s,t,e);else{var l=KQ[s.getType()];l(r,s,t,e,a)}}}function YQ(r,e,t,n){if(e.getType()==st.GEOMETRY_COLLECTION){for(var i=e.getGeometries(),a=0,o=i.length;a<o;++a)YQ(r,i[a],t,n);return}var s=r.getBuilder(t.getZIndex(),Ar.DEFAULT);s.drawCustom(e,n,t.getRenderer(),t.getHitDetectionRenderer())}function jZ(r,e,t,n,i){var a=e.getGeometriesArray(),o,s;for(o=0,s=a.length;o<s;++o){var A=KQ[a[o].getType()];A(r,a[o],t,n,i)}}function KZ(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),Ar.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(),Ar.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function zZ(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),Ar.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(),Ar.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function YZ(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(o||a){var s=r.getBuilder(t.getZIndex(),Ar.POLYGON);s.setFillStrokeStyle(a,o),s.drawMultiPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Ar.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function XZ(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()!=$e.LOADED)return;var A=r.getBuilder(t.getZIndex(),Ar.IMAGE);A.setImageStyle(a,s),A.drawPoint(e,n)}if(o&&o.getText()){var l=r.getBuilder(t.getZIndex(),Ar.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function WZ(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()!=$e.LOADED)return;var A=r.getBuilder(t.getZIndex(),Ar.IMAGE);A.setImageStyle(a,s),A.drawMultiPoint(e,n)}if(o&&o.getText()){var l=(i||r).getBuilder(t.getZIndex(),Ar.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function qZ(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),Ar.POLYGON);s.setFillStrokeStyle(a,o),s.drawPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Ar.TEXT);l.setTextStyle(A),l.drawText(e,n)}}var ZZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),JZ=function(r){ZZ(e,r);function e(t){var n=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_=_i(),n.wrappedRenderedExtent_=_i(),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,c=l.getExtent(),h=this.getLayer().getSource(),f=n.pixelRatio,p=n.viewHints,v=!(p[gn.ANIMATING]||p[gn.INTERACTING]),m=this.context,g=Math.round(n.size[0]*f),_=Math.round(n.size[1]*f),E=h.getWrapX()&&l.canWrapX(),B=E?Fr(c):null,L=E?Math.ceil((a[2]-c[2])/B)+1:1,O=E?Math.floor((a[0]-c[0])/B):0;do{var b=this.getRenderTransform(s,A,u,f,g,_,O*B);t.execute(m,1,b,u,v,void 0,i)}while(++O<L)},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];SY(this.pixelTransform,1/i,1/i),Kg(this.inversePixelTransform,this.pixelTransform);var o=FI(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 c=Math.round(t.size[0]*i),h=Math.round(t.size[1]*i);A.width!=c||A.height!=h?(A.width=c,A.height=h,A.style.transform!==o&&(A.style.transform=o)):this.containerReused||s.clearRect(0,0,c,h),this.preRender(s,t);var f=t.viewState;f.projection;var p=!1,v=!0;if(a.extent&&this.clipping){var m=Lo(a.extent);v=Mn(m,t.extent),p=v&&!Fo(m,t.extent),p&&this.clipUnrotated(s,t,m)}v&&this.renderWorlds(l,t),p&&s.restore(),this.postRender(s,t);var g=J6(a.opacity),_=this.container;return g!==_.style.opacity&&(_.style.opacity=g),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];un(this.pixelTransform,i);var a=this.renderedCenter_,o=this.renderedResolution_,s=this.renderedRotation_,A=this.renderedProjection_,l=this.wrappedRenderedExtent_,u=this.getLayer(),c=[],h=i[0]*Io,f=i[1]*Io;c.push(this.getRenderTransform(a,o,s,Io,h,f,0).slice());var p=u.getSource(),v=A.getExtent();if(p.getWrapX()&&A.canWrapX()&&!Fo(v,l)){for(var m=l[0],g=Fr(v),_=0,E=void 0;m<v[0];)--_,E=g*_,c.push(this.getRenderTransform(a,o,s,Io,h,f,E).slice()),m+=g;for(_=0,m=l[2];m>v[2];)++_,E=g*_,c.push(this.getRenderTransform(a,o,s,Io,h,f,E).slice()),m-=g}this.hitDetectionImageData_=VQ(i,c,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}n(jQ(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){var s=this;if(this.replayGroup_){var A=n.viewState.resolution,l=n.viewState.rotation,u=this.getLayer(),c={},h=function(v,m,g){var _=pe(v),E=c[_];if(E){if(E!==!0&&g<E.distanceSq){if(g===0)return c[_]=!0,o.splice(o.lastIndexOf(E),1),a(v,u,m);E.geometry=m,E.distanceSq=g}}else{if(g===0)return c[_]=!0,a(v,u,m);o.push(c[_]={feature:v,layer:u,geometry:m,distanceSq:g,callback:a})}},f,p=[this.replayGroup_];return this.declutterExecutorGroup&&p.push(this.declutterExecutorGroup),p.some(function(v){return f=v.forEachFeatureAtCoordinate(t,A,l,i,h,v===s.declutterExecutorGroup&&n.declutterTree?n.declutterTree.all().map(function(m){return m.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[gn.ANIMATING],o=t.viewHints[gn.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,c=u.projection,h=u.resolution,f=t.pixelRatio,p=n.getRevision(),v=n.getRenderBuffer(),m=n.getRenderOrder();m===void 0&&(m=kZ);var g=u.center.slice(),_=Va(l,v*h),E=_.slice(),B=[_.slice()],L=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!Fo(L,t.extent)){var O=Fr(L),b=Math.max(Fr(_)/2,O);_[0]=L[0]-b,_[2]=L[2]+b,HI(g,c);var T=H6(B[0],c);T[0]<L[0]&&T[2]<L[2]?B.push([T[0]+O,T[1],T[2]+O,T[3]]):T[0]>L[0]&&T[2]>L[2]&&B.push([T[0]-O,T[1],T[2]-O,T[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==p&&this.renderedRenderOrder_==m&&Fo(this.wrappedRenderedExtent_,_))return yl(this.renderedExtent_,E)||(this.hitDetectionImageData_=null,this.renderedExtent_=E),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var I=new L_(tS(h,f),_,h,f),M;this.getLayer().getDeclutter()&&(M=new L_(tS(h,f),_,h,f));for(var x,S,N,S=0,N=B.length;S<N;++S)i.loadFeatures(B[S],h,c);var P=zQ(h,f),X=function(it){var _t,R=it.getStyleFunction()||n.getStyleFunction();if(R&&(_t=R(it,h)),_t){var $=this.renderFeature(it,P,_t,I,x,M);this.dirty_=this.dirty_||$}}.bind(this),z=q1(_),tt=i.getFeaturesInExtent(z);m&&tt.sort(m);for(var S=0,N=tt.length;S<N;++S)X(tt[S]);this.renderedFeatures_=tt;var J=I.finish(),nt=new O_(_,h,f,i.getOverlaps(),J,n.getRenderBuffer());return M&&(this.declutterExecutorGroup=new O_(_,h,f,i.getOverlaps(),M.finish(),n.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=p,this.renderedRenderOrder_=m,this.renderedExtent_=E,this.wrappedRenderedExtent_=_,this.renderedCenter_=g,this.renderedProjection_=c,this.replayGroup_=nt,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=R_(a,t,i[l],n,this.boundHandleStyleImageChange_,o,s)||A;else A=R_(a,t,i,n,this.boundHandleStyleImageChange_,o,s);return A},e}(hF),tJ=JZ,eJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rJ=function(r){eJ(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new tJ(this)},e}(aw),hA=rJ,nJ=function(){function r(e){this.rbush_=new UQ(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];AA(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 hh(this.items_)},r.prototype.clear=function(){this.rbush_.clear(),this.items_={}},r.prototype.getExtent=function(e){var t=this.rbush_.toJSON();return uo(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}(),M_=nJ,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;n.projection=Oe(t.projection),n.attributions_=bM(t.attributions),n.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,n.loading=!1,n.state_=t.state!==void 0?t.state:Da.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 Be()},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_=bM(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(li);function bM(r){return r?Array.isArray(r)?function(e){return r}:typeof r=="function"?r:function(e){return[r]}:null}var ow=aJ,Oi={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function XQ(r,e){return[[-1/0,-1/0,1/0,1/0]]}function oJ(r,e){return[r]}function sJ(r){return function(e,t,n){var i=r.getZForResolution(tW(t)),a=r.getTileRangeForExtentAndZ(Lo(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(q1(r.getTileCoordExtent(s)));return o}}var AJ=Object.freeze(Object.defineProperty({__proto__:null,all:XQ,bbox:oJ,tile:sJ},Symbol.toStringTag,{value:"Module"})),lJ=!1;function uJ(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()==Cs.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.withCredentials=lJ,s.onload=function(A){if(!s.status||s.status>=200&&s.status<300){var l=e.getType(),u=void 0;l==Cs.JSON||l==Cs.TEXT?u=s.responseText:l==Cs.XML?(u=s.responseXML,u||(u=new DOMParser().parseFromString(s.responseText,"application/xml"))):l==Cs.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 IM(r,e){return function(t,n,i,a,o){var s=this;uJ(r,e,t,n,i,function(A,l){s.addFeatures(A),a!==void 0&&a(A)},o||lh)}}var WQ=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)}}(),Yl=function(r){WQ(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.feature=n,a.features=i,a}return e}(fo),cJ=function(r){WQ(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:Da.READY,wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,n.on,n.once,n.un,n.loader_=lh,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_=IM(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:XQ;var a=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=a?new M_:null,n.loadedExtentsRtree_=new M_,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 si(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 Yl(Oi.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,n){this.featureChangeKeys_[t]=[Pe(n,ye.CHANGE,this.handleFeatureChange_,this),Pe(n,ch.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 c=A.getGeometry();if(c){var h=c.getExtent();n.push(h),a.push(A)}else this.nullGeometryFeatures_[l]=A}if(this.featuresRtree_&&this.featuresRtree_.load(n,a),this.hasListener(Oi.ADDFEATURE))for(var o=0,f=i.length;o<f;o++)this.dispatchEvent(new Yl(Oi.ADDFEATURE,i[o]))},e.prototype.bindFeaturesCollection_=function(t){var n=!1;this.addEventListener(Oi.ADDFEATURE,function(i){n||(n=!0,t.push(i.feature),n=!1)}),this.addEventListener(Oi.REMOVEFEATURE,function(i){n||(n=!0,t.remove(i.feature),n=!1)}),t.addEventListener(kn.ADD,function(i){n||(n=!0,this.addFeature(i.element),n=!1)}.bind(this)),t.addEventListener(kn.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 Yl(Oi.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(),hh(this.nullGeometryFeatures_)||Qr(t,PI(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||iA;return this.featuresRtree_.forEachInExtent(l,function(c){if(u(c)){var h=c.getGeometry(),f=A;if(A=h.closestPointXY(i,a,s,A),A<f){o=c;var p=Math.sqrt(A);l[0]=i-p,l[1]=a-p,l[2]=i+p,l[3]=a+p}}}),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 Yl(Oi.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()&&hh(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(c,h){var f=o[c],p=a.forEachInExtent(f,function(v){return Fo(v.extent,f)});p||(++A.loadingExtentsCount_,A.dispatchEvent(new Yl(Oi.FEATURESLOADSTART)),A.loader_.call(A,f,n,i,function(v){--this.loadingExtentsCount_,this.dispatchEvent(new Yl(Oi.FEATURESLOADEND,void 0,v))}.bind(A),function(){--this.loadingExtentsCount_,this.dispatchEvent(new Yl(Oi.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(AA(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 Yl(Oi.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(IM(t,this.format_))},e}(ow),_l=cJ,qQ=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)}}(),xr={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},Fm={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},Lm=function(r){qQ(e,r);function e(t,n){var i=r.call(this,t)||this;return i.feature=n,i}return e}(fo),hJ=function(r){qQ(e,r);function e(t){var n=this,i=t;i.stopDown||(i.stopDown=Ch),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_=pJ(n.type_),n.stopClick_=!!t.stopClick,n.minPoints_=t.minPoints?t.minPoints:n.mode_===xr.POLYGON?3:2,n.maxPoints_=n.mode_===xr.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,n.finishCondition_=t.finishCondition?t.finishCondition:iA;var a=t.geometryFunction;if(!a){var o=n.mode_;if(o===xr.CIRCLE)a=function(A,l,u){var c=l||new uF([NaN,NaN]),h=Tn(A[0]),f=el(h,Tn(A[A.length-1]));return c.setCenterAndRadius(h,Math.sqrt(f)),c};else{var s;o===xr.POINT?s=fr:o===xr.LINE_STRING?s=Hr:o===xr.POLYGON&&(s=bn),a=function(A,l,u){return l?o===xr.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 hA({source:new _l({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:fJ(),updateWhileInteracting:!0}),n.geometryName_=t.geometryName,n.condition_=t.condition?t.condition:iw,n.freehandCondition_,t.freehand?n.freehandCondition_=rw:n.freehandCondition_=t.freehandCondition?t.freehandCondition:Jg,n.addChangeListener(qT.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_!==xr.POINT&&this.freehandCondition_(t);var n=t.type===ar.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===ar.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===ar.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===ar.POINTERDOWN?i=!1:n&&this.getPointerCount()<2?(i=t.type===ar.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===ar.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===ar.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 KA(ar.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_===xr.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===xr.POINT)n=!0;else if(o===xr.CIRCLE)n=this.sketchCoords_.length===2;else if(o===xr.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(o===xr.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 c=a[l],h=A.getPixelFromCoordinate(c),f=t[0]-h[0],p=t[1]-h[1],v=this.freehand_?1:this.snapTolerance_;if(n=Math.sqrt(f*f+p*p)<=v,n){this.finishCoordinate_=c;break}}}return n},e.prototype.createOrUpdateSketchPoint_=function(t){if(!this.sketchPoint_)this.sketchPoint_=new or(new fr(t)),this.updateSketchFeatures_();else{var n=this.sketchPoint_.getGeometry();n.setCoordinates(t)}},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new or);var n=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),i.changed()):(i=new Hr(n.getFlatCoordinates(),n.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var n=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===xr.POINT?this.sketchCoords_=t.slice():this.mode_===xr.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new or(new Hr(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,n);this.sketchFeature_=new or,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new Lm(Fm.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_===xr.POINT?s=this.sketchCoords_:this.mode_===xr.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_!==xr.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===xr.LINE_STRING||s===xr.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===xr.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===xr.LINE_STRING||a===xr.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===xr.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_===xr.LINE_STRING?(n.pop(),this.geometryFunction_(n,i,a)):this.mode_===xr.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i,a),n=i.getCoordinates()),this.type_===st.MULTI_POINT?t.setGeometry(new es([n])):this.type_===st.MULTI_LINE_STRING?t.setGeometry(new xa([n])):this.type_===st.MULTI_POLYGON&&t.setGeometry(new ba([n])),this.dispatchEvent(new Lm(Fm.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 Lm(Fm.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var n=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(t[0]);var a;if(n===xr.LINE_STRING||n===xr.CIRCLE)a=this.sketchCoords_;else if(n===xr.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 or(new fr(a)),this.updateSketchFeatures_(),this.dispatchEvent(new Lm(Fm.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}(Po);function fJ(){var r=cF();return function(e,t){return r[e.getGeometry().getType()]}}function pJ(r){switch(r){case st.POINT:case st.MULTI_POINT:return xr.POINT;case st.LINE_STRING:case st.MULTI_LINE_STRING:return xr.LINE_STRING;case st.POLYGON:case st.MULTI_POLYGON:return xr.POLYGON;case st.CIRCLE:return xr.CIRCLE;default:throw new Error("Invalid type: "+r)}}var dF=hJ,ZQ=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)}}(),FM=0,Dv=1,LM=[0,0,0,0],lp=[],BC={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},TC=function(r){ZQ(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.features=n,a.mapBrowserEvent=i,a}return e}(fo),dJ=function(r){ZQ(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:lF,n.defaultDeleteCondition_=function(a){return IQ(a)&&nw(a)},n.deleteCondition_=t.deleteCondition?t.deleteCondition:n.defaultDeleteCondition_,n.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:rw,n.vertexFeature_=null,n.vertexSegments_=null,n.lastPixel_=[0,0],n.ignoreNextSingleClick_=!1,n.featuresBeingModified_=null,n.rBush_=new M_,n.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,n.snappedToVertex_=!1,n.changingFeature_=!1,n.dragSegments_=[],n.overlay_=new hA({source:new _l({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:gJ(),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 si(n.source_.getFeatures()),n.source_.addEventListener(Oi.ADDFEATURE,n.handleSourceAdd_.bind(n)),n.source_.addEventListener(Oi.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(kn.ADD,n.handleFeatureAdd_.bind(n)),n.features_.addEventListener(kn.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 si;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 TC(BC.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(Yi(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),c={feature:t,geometry:n,depth:[a],index:A,segment:u};this.rBush_.insert(Yi(u),c)}},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),c={feature:t,geometry:n,depth:[a],index:A,segment:u};this.rBush_.insert(Yi(u),c)}},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],c=0,h=u.length-1;c<h;++c){var f=u.slice(c,c+2),p={feature:t,geometry:n,depth:[A,a],index:c,segment:f};this.rBush_.insert(Yi(f),p)}},e.prototype.writeCircleGeometry_=function(t,n){var i=n.getCenter(),a={feature:t,geometry:n,index:FM,segment:[i,i]},o={feature:t,geometry:n,index:Dv,segment:[i,i]},s=[a,o];a.featureSegments=s,o.featureSegments=s,this.rBush_.insert(zc(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 or(new fr(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==ar.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=ar.SINGLECLICK||!this.ignoreNextSingleClick_?n=this.removePoint():n=!0),t.type==ar.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 c=l.geometry;a.indexOf(c)===-1&&a.push(c);for(var h=l.depth,f=void 0,p=l.segment,v=A[1];n.length<c.getStride();)n.push(p[v][n.length]);switch(c.getType()){case st.POINT:f=n,p[0]=n,p[1]=n;break;case st.MULTI_POINT:f=c.getCoordinates(),f[l.index]=n,p[0]=n,p[1]=n;break;case st.LINE_STRING:f=c.getCoordinates(),f[l.index+v]=n,p[v]=n;break;case st.MULTI_LINE_STRING:f=c.getCoordinates(),f[h[0]][l.index+v]=n,p[v]=n;break;case st.POLYGON:f=c.getCoordinates(),f[h[0]][l.index+v]=n,p[v]=n;break;case st.MULTI_POLYGON:f=c.getCoordinates(),f[h[1]][h[0]][l.index+v]=n,p[v]=n;break;case st.CIRCLE:if(p[0]=n,p[1]=n,l.index===FM)this.changingFeature_=!0,c.setCenter(n),this.changingFeature_=!1;else{this.changingFeature_=!0;var m=t.map.getView().getProjection(),g=ZR(Tn(c.getCenter()),Tn(n)),_=ph();if(_){var E=c.clone().transform(_,m);E.setRadius(g),g=E.transform(m,_).getRadius()}c.setRadius(g),this.changingFeature_=!1}break}f&&this.setGeometryCoordinates_(c,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=Yi([s]),l=this.rBush_.getInExtent(A),u={};l.sort(vJ);for(var c=0,h=l.length;c<h;++c){var f=l[c],p=f.segment,v=pe(f.geometry),m=f.depth;if(m&&(v+="-"+m.join("-")),u[v]||(u[v]=new Array(2)),f.geometry.getType()===st.CIRCLE&&f.index===Dv){var g=RM(n,f,a);_s(g,s)&&!u[v][0]&&(this.dragSegments_.push([f,0]),u[v][0]=f);continue}if(_s(p[0],s)&&!u[v][0]){this.dragSegments_.push([f,0]),u[v][0]=f;continue}if(_s(p[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(p)in this.vertexSegments_&&!u[v][0]&&!u[v][1]&&this.insertVertexCondition_(t)&&o.push(f)}o.length&&this.willModifyFeatures_(t,[o]);for(var _=o.length-1;_>=0;--_)this.insertVertex_(o[_],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(zc(o),s);var l=a,u=ph();if(u){var c=t.map.getView().getProjection();l=l.clone().transform(u,c),l=yQ(l).transform(c,u)}this.rBush_.update(l.getExtent(),A)}else this.rBush_.update(Yi(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new TC(BC.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(P,X){return OM(o,P,s)-OM(o,X,s)},l,u;if(this.hitDetection_){var c=typeof this.hitDetection_=="object"?function(P){return P===a.hitDetection_}:void 0;n.forEachFeatureAtPixel(t,function(P,X,z){if(z=z||P.getGeometry(),z.getType()===st.POINT&&yi(a.features_.getArray(),P)){u=z;var tt=z.getFlatCoordinates().slice(0,2);l=[{feature:P,geometry:z,segment:[tt,tt]}]}return!0},{layerFilter:c})}if(!l){var h=Lo(zc(o,LM)),f=n.getView().getResolution()*this.pixelTolerance_,p=q1(Va(h,f,LM));l=this.rBush_.getInExtent(p)}if(l&&l.length>0){var v=l.sort(A)[0],m=v.segment,g=RM(o,v,s),_=n.getPixelFromCoordinate(g),E=ZR(t,_);if(u||E<=this.pixelTolerance_){var B={};if(B[pe(m)]=!0,this.snapToPointer_||(this.delta_[0]=g[0]-o[0],this.delta_[1]=g[1]-o[1]),v.geometry.getType()===st.CIRCLE&&v.index===Dv)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(g,[v.feature],[v.geometry]);else{var L=n.getPixelFromCoordinate(m[0]),O=n.getPixelFromCoordinate(m[1]),b=el(_,L),T=el(_,O);E=Math.sqrt(Math.min(b,T)),this.snappedToVertex_=E<=this.pixelTolerance_,this.snappedToVertex_&&(g=b>T?m[1]:m[0]),this.createOrUpdateVertexFeature_(g,[v.feature],[v.geometry]);var I={};I[pe(v.geometry)]=!0;for(var M=1,x=l.length;M<x;++M){var S=l[M].segment;if(_s(m[0],S[0])&&_s(m[1],S[1])||_s(m[0],S[1])&&_s(m[1],S[0])){var N=pe(l[M].geometry);N in I||(I[N]=!0,B[pe(S)]=!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 c={segment:[i[0],n],feature:a,geometry:o,depth:s,index:A};u.insert(Yi(c.segment),c),this.dragSegments_.push([c,1]);var h={segment:[n,i[1]],feature:a,geometry:o,depth:s,index:A+1};u.insert(Yi(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=ar.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var n=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new TC(BC.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,c,h,f,p,v;for(l=t.length-1;l>=0;--l)s=t[l],p=s[0],v=pe(p.feature),p.depth&&(v+="-"+p.depth.join("-")),v in n||(n[v]={}),s[1]===0?(n[v].right=p,n[v].index=p.index):s[1]==1&&(n[v].left=p,n[v].index=p.index+1);for(v in n){switch(f=n[v].right,c=n[v].left,u=n[v].index,h=u-1,c!==void 0?p=c:p=f,h<0&&(h=0),A=p.geometry,o=A.getCoordinates(),a=o,i=!1,A.getType()){case st.MULTI_LINE_STRING:o[p.depth[0]].length>2&&(o[p.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[p.depth[1]];case st.POLYGON:a=a[p.depth[0]],a.length>4&&(u==a.length-1&&(u=0),a.splice(u,1),i=!0,u===0&&(a.pop(),a.push(a[0]),h=a.length-1));break}if(i){this.setGeometryCoordinates_(A,o);var m=[];if(c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[0])),f!==void 0&&(this.rBush_.remove(f),m.push(f.segment[1])),c!==void 0&&f!==void 0){var g={depth:p.depth,feature:p.feature,geometry:p.geometry,index:h,segment:m};this.rBush_.insert(Yi(g.segment),g)}this.updateSegmentIndices_(A,u,p.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||yl(o.depth,i))&&o.index>n&&(o.index+=a)})},e}(Po);function vJ(r,e){return r.index-e.index}function OM(r,e,t){var n=e.geometry;if(n.getType()===st.CIRCLE){var i=n;if(e.index===Dv){var a=ph();a&&(i=i.clone().transform(a,t));var o=el(i.getCenter(),Tn(r)),s=Math.sqrt(o)-i.getRadius();return s*s}}var A=Tn(r);return lp[0]=Tn(e.segment[0]),lp[1]=Tn(e.segment[1]),eX(A,lp)}function RM(r,e,t){var n=e.geometry;if(n.getType()===st.CIRCLE&&e.index===Dv){var i=n,a=ph();return a&&(i=i.clone().transform(a,t)),xp(i.getClosestPoint(Tn(r)))}var o=Tn(r);return lp[0]=Tn(e.segment[0]),lp[1]=Tn(e.segment[1]),xp(DI(o,lp))}function gJ(){var r=cF();return function(e,t){return r[st.POINT]}}var vF=dJ,JQ=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)}}(),yJ={SELECT:"select"},mJ=function(r){JQ(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}(fo),Om={},_J=function(r){JQ(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:nw,n.addCondition_=i.addCondition?i.addCondition:ZT,n.removeCondition_=i.removeCondition?i.removeCondition:ZT,n.toggleCondition_=i.toggleCondition?i.toggleCondition:Jg,n.multi_=i.multi?i.multi:!1,n.filter_=i.filter?i.filter:iA,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.style_=i.style!==void 0?i.style:wJ(),n.features_=i.features||new si;var a;if(i.layers)if(typeof i.layers=="function")a=i.layers;else{var o=i.layers;a=function(s){return yi(o,s)}}else a=iA;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(kn.ADD,this.boundAddFeature_),this.features_.addEventListener(kn.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(kn.ADD,this.boundAddFeature_),this.features_.removeEventListener(kn.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 hA&&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 Om||(Om[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(Om[o]),delete Om[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){Bh(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,function(v,m){if(this.filter_(v,m))return this.addFeatureLayerAssociation_(v,m),u.push(v),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var c=A.getLength()-1;c>=0;--c){var h=A.item(c),f=u.indexOf(h);f>-1?u.splice(f,1):(A.remove(h),l.push(h))}u.length!==0&&A.extend(u)}else{s.forEachFeatureAtPixel(t.pixel,function(v,m){if(this.filter_(v,m))return(n||a)&&!yi(A.getArray(),v)?(this.addFeatureLayerAssociation_(v,m),u.push(v)):(i||a)&&yi(A.getArray(),v)&&(l.push(v),this.removeFeatureLayerAssociation_(v)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var p=l.length-1;p>=0;--p)A.remove(l[p]);A.extend(u)}return(u.length>0||l.length>0)&&this.dispatchEvent(new mJ(yJ.SELECT,u,l,t)),!0},e}(Kp);function wJ(){var r=cF();return Qr(r[st.POLYGON],r[st.LINE_STRING]),Qr(r[st.GEOMETRY_COLLECTION],r[st.LINE_STRING]),function(e){return e.getGeometry()?r[e.getGeometry().getType()]:null}}var sw=_J,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 MM(r){if(r.feature)return r.feature;if(r.element)return r.element}var SC=[],CJ=function(r){EJ(e,r);function e(t){var n=this,i=t||{},a=i;return a.handleDownEvent||(a.handleDownEvent=iA),a.stopDown||(a.stopDown=Ch),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 M_,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(_i());var A=[];if(s(A,o),A.length===1)this.rBush_.insert(Yi(A[0]),{feature:t,segment:A[0]});else if(A.length>1){var l=A.map(function(c){return Yi(c)}),u=A.map(function(c){return{feature:t,segment:c}});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=MM(t);this.addFeature(n)},e.prototype.handleFeatureRemove_=function(t){var n=MM(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=PI(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_,kn.ADD,this.handleFeatureAdd_,this),Pe(this.features_,kn.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(Pe(this.source_,Oi.ADDFEATURE,this.handleFeatureAdd_,this),Pe(this.source_,Oi.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=Yi([a,o]),A=this.rBush_.getInExtent(s),l=A.length;if(l===0)return null;var u=i.getView().getProjection(),c=Tn(n),h,f=1/0,p=this.pixelTolerance_*this.pixelTolerance_,v=function(){if(h){var M=i.getPixelFromCoordinate(h),x=el(t,M);if(x<=p)return{vertex:h,vertexPixel:[Math.round(M[0]),Math.round(M[1])]}}return null};if(this.vertex_){for(var m=0;m<l;++m){var g=A[m];g.feature.getGeometry().getType()!==st.CIRCLE&&g.segment.forEach(function(M){var x=Tn(M),S=el(c,x);S<f&&(h=M,f=S)})}var _=v();if(_)return _}if(this.edge_){for(var m=0;m<l;++m){var E=null,g=A[m];if(g.feature.getGeometry().getType()===st.CIRCLE){var B=g.feature.getGeometry(),L=ph();L&&(B=B.clone().transform(L,u)),E=xp(tX(c,B))}else{var O=g.segment,b=O[0],T=O[1];T&&(SC[0]=Tn(b),SC[1]=Tn(T),E=DI(c,SC))}if(E){var I=el(c,E);I<f&&(h=E,f=I)}}var _=v();if(_)return _}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=yQ(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],c=0,h=u.length-1;c<h;++c)t.push(u.slice(c,c+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}(Po),BJ=CJ;function TJ(r){var e=r||{},t=new si,n=new l3(-.005,.05,100),i=e.altShiftDragRotate!==void 0?e.altShiftDragRotate:!0;i&&t.push(new zq);var a=e.doubleClickZoom!==void 0?e.doubleClickZoom:!0;a&&t.push(new Lq({delta:e.zoomDelta,duration:e.zoomDuration}));var o=e.dragPan!==void 0?e.dragPan:!0;o&&t.push(new Vq({onFocusOnly:e.onFocusOnly,kinetic:n}));var s=e.pinchRotate!==void 0?e.pinchRotate:!0;s&&t.push(new d3);var A=e.pinchZoom!==void 0?e.pinchZoom:!0;A&&t.push(new y3({duration:e.zoomDuration}));var l=e.keyboard!==void 0?e.keyboard:!0;l&&(t.push(new i3),t.push(new s3({delta:e.zoomDelta,duration:e.zoomDuration})));var u=e.mouseWheelZoom!==void 0?e.mouseWheelZoom:!0;u&&t.push(new h3({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var c=e.shiftDragZoom!==void 0?e.shiftDragZoom:!0;return c&&t.push(new e3({duration:e.zoomDuration})),t}var 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)}}(),xJ=function(r){SJ(e,r);function e(t){return t=de({},t),t.controls||(t.controls=Tq()),t.interactions||(t.interactions=TJ({onFocusOnly:!0})),r.call(this,t)||this}return e.prototype.createRenderer=function(){return new nQ(this)},e}(EQ),Aw=xJ;function vr(r,e=[]){let t=Lu(r);Object.keys(t).forEach(i=>{t[i]=t[i].value});const n=Hg(Un({},t));return he(r,()=>{t=Lu(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 bJ={name:"ol-map",setup(r,{emit:e}){const{properties:t}=vr(r),n=Gn(null);let i=new Aw(t);he(t,()=>{i.setProperties(t)}),Ze(()=>{i.setTarget(n.value)}),ir(()=>{i.setTarget(null),i=null}),Mr("map",i);const a=()=>i.focus(),o=(h,f,p={})=>i.forEachFeatureAtPixel(h,f,p),s=(h,f,p)=>i.forEachLayerAtPixel(h,f,p),A=h=>i.getCoordinateFromPixel(h),l=()=>i.refresh(),u=()=>i.render(),c=()=>i.updateSize();return i.on("click",h=>e("click",h)),i.on("dblclick",h=>e("dblclick",h)),i.on("singleclick",h=>e("singleclick",h)),i.on("pointerdrag",h=>e("pointerdrag",h)),i.on("pointermove",h=>e("pointermove",h)),i.on("movestart",h=>e("movestart",h)),i.on("moveend",h=>e("moveend",h)),i.on("postrender",h=>e("postrender",h)),i.on("precompose",h=>e("precompose",h)),i.on("postcompose",h=>e("postcompose",h)),{map:i,mapRef:n,focus:a,forEachFeatureAtPixel:o,forEachLayerAtPixel:s,getCoordinateFromPixel:A,refresh:l,render:u,updateSize:c}},props:{loadTilesWhileAnimating:{type:Boolean,default:!1},loadTilesWhileInteracting:{type:Boolean,default:!1},moveTolerance:{type:Number,default:1},pixelRatio:{type:Number,default:1},controls:{type:Array,default:()=>[]}}};function IJ(r,e,t,n,i,a){return cn(),Vn("div",{ref:o=>n.mapRef=o},[mr(r.$slots,"default")],512)}var eS=le(bJ,[["render",IJ]]);function FJ(r,e){const t=Ce("map"),{properties:n}=vr(r),i=()=>Os(Un({},n),{projection:typeof n.projection=="string"?n.projection:new ml(Un({},n.projection))});let a=new qs(i());Ze(()=>{t.setView(a)}),a.on("change:center",()=>{e("centerChanged",L()),e("zoomChanged",it())}),a.on("change:resolution",()=>e("resolutionChanged",P())),a.on("change:rotation",()=>e("rotationChanged",nt())),he(n,()=>{let W=i();a.setProperties(W),a.applyOptions_(W)});const o=W=>a.adjustCenter(W),s=(W,It)=>a.adjustResolution(W,It),A=(W,It)=>a.adjustRotation(W,It),l=(W,It)=>a.adjustZoom(W,It),u=W=>a.animate(W),c=()=>a.beginInteraction(),h=W=>a.calculateExtent(W),f=()=>a.cancelAnimations(),p=(W,It,Ot)=>a.centerOn(W,It,Ot),v=()=>a.changed(),m=W=>a.dispatchEvent(W),g=(W,It,Ot)=>a.endInteraction(W,It,Ot),_=(W,It)=>a.fit(W,It),E=W=>a.get(W),B=()=>a.getAnimating(),L=()=>a.getCenter(),O=()=>a.getInteracting(),b=()=>a.getKeys(),T=()=>a.getMaxResolution(),I=()=>a.getMaxZoom(),M=()=>a.getMinResolution(),x=()=>a.getMinZoom(),S=()=>a.getProjection(),N=()=>a.getProperties(),P=()=>a.getResolution(),X=(W,It)=>a.getResolutionForExtent(W,It),z=W=>a.getResolutionForZoom(W),tt=()=>a.getResolutions(),J=()=>a.getRevision(),nt=()=>a.getRotation(),it=()=>a.getZoom();return{view:a,adjustCenter:o,adjustResolution:s,adjustRotation:A,adjustZoom:l,animate:u,beginInteraction:c,calculateExtent:h,cancelAnimations:f,centerOn:p,changed:v,dispatchEvent:m,endInteraction:g,fit:_,get:E,getAnimating:B,getCenter:L,getInteracting:O,getKeys:b,getMaxResolution:T,getMaxZoom:I,getMinResolution:M,getMinZoom:x,getProjection:S,getProperties:N,getResolution:P,getResolutionForExtent:X,getResolutionForZoom:z,getResolutions:tt,getRevision:J,getRotation:nt,getZoom:it,getZoomForResolution:W=>a.getZoomForResolution(W),setCenter:W=>a.setCenter(W),setConstrainResolution:W=>a.setConstrainResolution(W),setMaxZoom:W=>a.setMaxZoom(W),setMinZoom:W=>a.setMinZoom(W),setResolution:W=>a.setResolution(W),setRotation:W=>a.setRotation(W),setZoom:W=>a.setZoom(W)}}const LJ={name:"ol-view",setup(r,{emit:e}){const t=FJ(r,e);return Un({},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 OJ(r,e,t,n,i,a){return dr("",!0)}var rS=le(LJ,[["render",OJ]]);const RJ={name:"ol-feature",setup(r){const e=Ce("vectorSource"),t=Ce("vectorLayer"),n=Ce("animation",null),{properties:i}=vr(r);let a=hr(()=>new or(Un({},i.properties)));return he(a,(o,s)=>{e.value.removeFeature(s),e.value.addFeature(o),e.value.changed()}),he(e,(o,s)=>{s.removeFeature(a.value),o.addFeature(a.value),o.changed()}),Ze(()=>{e.value.addFeature(a.value),n!=null&&t.value.animateFeature(a.value,n.value)}),ir(()=>{e.value.removeFeature(a.value)}),Mr("feature",a),Mr("stylable",a),{feature:a}},props:{properties:{type:[Z1,Object,Array]}}};function MJ(r,e,t,n,i,a){return mr(r.$slots,"default")}var nS=le(RJ,[["render",MJ]]);function NJ(r,e){const t=Ce("map"),n=Gn(null),{properties:i}=vr(r);let a=hr(()=>new xQ(i));Ze(()=>{t.addOverlay(a.value)}),ir(()=>{t.removeOverlay(a.value)}),he(a,(v,m)=>{t.removeOverlay(m),t.addOverlay(v)}),lD(()=>{c(n.value)},{flush:"post"}),a.value.on("change:element",()=>e("elementChanged",o())),a.value.on("change:offset",()=>e("offsetChanged",s())),a.value.on("change:position",()=>e("positionChanged",A())),a.value.on("change:positioning",()=>e("positioningChanged",l()));const o=()=>a.value.getElement(),s=()=>a.value.getOffset(),A=()=>a.value.getPosition(),l=()=>a.value.getPositioning(),u=v=>a.value.panIntoView(v),c=v=>a.value.setElement(v);return{overlay:a,htmlContent:n,getOffset:s,getPosition:A,getPositioning:l,panIntoView:u,setElement:c,setOffset:v=>a.value.setOffset(v),setPosition:v=>a.value.setPosition(v),setPositioning:v=>a.value.setPositioning(v)}}const PJ={name:"ol-overlay",setup(r,{emit:e}){const t=new NJ(r,e);return Un({},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}}},UJ={ref:"htmlContent"};function DJ(r,e,t,n,i,a){return cn(),Vn("div",UJ,[mr(r.$slots,"default",{position:t.position})],512)}var iS=le(PJ,[["render",DJ]]),t4=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)}}(),On={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},QJ=function(r){t4(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}(fo),HJ=function(r){t4(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_=W1,n.watchId_=void 0,n.addChangeListener(On.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(On.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_=fh(Oe("EPSG:4326"),t),this.position_&&this.set(On.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(On.ACCURACY,n.accuracy),this.set(On.ALTITUDE,n.altitude===null?void 0:n.altitude),this.set(On.ALTITUDE_ACCURACY,n.altitudeAccuracy===null?void 0:n.altitudeAccuracy),this.set(On.HEADING,n.heading===null?void 0:Cu(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(On.POSITION,i),this.set(On.SPEED,n.speed===null?void 0:n.speed);var a=PW(this.position_,n.accuracy);a.applyTransform(this.transform_),this.set(On.ACCURACY_GEOMETRY,a),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new QJ(t))},e.prototype.getAccuracy=function(){return this.get(On.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(On.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(On.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(On.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(On.HEADING)},e.prototype.getPosition=function(){return this.get(On.POSITION)},e.prototype.getProjection=function(){return this.get(On.PROJECTION)},e.prototype.getSpeed=function(){return this.get(On.SPEED)},e.prototype.getTracking=function(){return this.get(On.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(On.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(On.PROJECTION,Oe(t))},e.prototype.setTracking=function(t){this.set(On.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(On.TRACKING_OPTIONS,t)},e}(li),GJ=HJ;const kJ={name:"ol-geolocation",emits:["positionChanged","speedChanged","headingChanged","altitudeChanged","altitudeAccuracyChanged","accuracyGeometryChanged"],setup(r,{emit:e}){const{properties:t}=vr(r);let n=hr(()=>{let h=new GJ(t);return h.on("change",c),h});const i=Gn([]),a=Gn(0),o=Gn(0),s=Gn(0),A=Gn(0),l=Gn(0),u=Gn({});he(i,()=>{e("positionChanged",i.value)}),he(A,()=>{e("speedChanged",A.value)}),he(l,()=>{e("headingChanged",l.value)}),he(o,()=>{e("altitudeChanged",o.value)}),he(s,()=>{e("altitudeAccuracyChanged",s.value)}),he(u,()=>{e("accuracyGeometryChanged",u.value)});const c=()=>{i.value=n.value.getPosition(),A.value=n.value.getSpeed(),l.value=n.value.getHeading(),a.value=n.value.getAccuracy(),o.value=n.value.getAltitude(),s.value=n.value.getAltitudeAccuracy(),u.value=n.value.getAccuracyGeometry()};return he(n,(h,f)=>{f.un("change",c),h.on("change",c)}),{geoLoc:n,position:i,accuracy:a,altitude:o,altitudeAccuracy:s,speed:A,heading:l,accuracyGeometry:u}},props:{projection:{type:[String,Object],default:"EPSG:3857"},tracking:{type:Boolean,default:!0},trackingOptions:{type:Object,default:()=>({enableHighAccuracy:!0})}}};function $J(r,e,t,n,i,a){return mr(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 aS=le(kJ,[["render",$J]]);function VJ(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 dh=1,vh=2,M0=3,jJ=4,oS=5,NM=6378137,KJ=6356752314e-3,PM=.0066943799901413165,Qv=484813681109536e-20,zt=Math.PI/2,zJ=.16666666666666666,YJ=.04722222222222222,XJ=.022156084656084655,ne=1e-10,ra=.017453292519943295,tA=57.29577951308232,zr=Math.PI/4,yg=Math.PI*2,ei=3.14159265359,po={};po.greenwich=0;po.lisbon=-9.131906111111;po.paris=2.337229166667;po.bogota=-74.080916666667;po.madrid=-3.687938888889;po.rome=12.452333333333;po.bern=7.439583333333;po.jakarta=106.807719444444;po.ferro=-17.666666666667;po.brussels=4.367975;po.stockholm=18.058277777778;po.athens=23.7163375;po.oslo=10.722916666667;var WJ={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},UM=/[\s_\-\/\(\)]/g;function Gu(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace(UM,""),i=-1,a,o;++i<t.length;)if(a=t[i],o=a.toLowerCase().replace(UM,""),o===n)return r[a]}function sS(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*ra},lat_1:function(s){e.lat1=s*ra},lat_2:function(s){e.lat2=s*ra},lat_ts:function(s){e.lat_ts=s*ra},lon_0:function(s){e.long0=s*ra},lon_1:function(s){e.long1=s*ra},lon_2:function(s){e.long2=s*ra},alpha:function(s){e.alpha=parseFloat(s)*ra},gamma:function(s){e.rectified_grid_angle=parseFloat(s)},lonc:function(s){e.longc=s*ra},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=Gu(WJ,s);A&&(e.to_meter=A.to_meter)},from_greenwich:function(s){e.from_greenwich=s*ra},pm:function(s){var A=Gu(po,s);e.from_greenwich=(A||parseFloat(s))*ra},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 mg=1,e4=2,r4=3,N_=4,n4=5,gF=-1,qJ=/\s/,ZJ=/[A-Za-z]/,JJ=/[A-Za-z84_]/,lw=/[,\]]/,i4=/[\d\.E\-\+]/;function wl(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=mg}wl.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==N_)for(;qJ.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case mg:return this.neutral(r);case e4:return this.keyword(r);case N_:return this.quoted(r);case n4:return this.afterquote(r);case r4:return this.number(r);case gF:return}};wl.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=N_;return}if(lw.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)};wl.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=mg;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=mg,this.currentObject=this.stack.pop(),this.currentObject||(this.state=gF);return}};wl.prototype.number=function(r){if(i4.test(r)){this.word+=r;return}if(lw.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)};wl.prototype.quoted=function(r){if(r==='"'){this.state=n4;return}this.word+=r};wl.prototype.keyword=function(r){if(JJ.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=mg;return}if(lw.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)};wl.prototype.neutral=function(r){if(ZJ.test(r)){this.word=r,this.state=e4;return}if(r==='"'){this.word="",this.state=N_;return}if(i4.test(r)){this.word=r,this.state=r4;return}if(lw.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)};wl.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===gF)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function ttt(r){var e=new wl(r);return e.output()}function DM(r,e,t){Array.isArray(e)&&(t.unshift(e),e=null);var n=e?{}:r,i=t.reduce(function(a,o){return Kf(o,a),a},n);e&&(r[e]=i)}function Kf(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]={},Kf(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&&Kf(r[2],e[t]);return;case"SPHEROID":case"ELLIPSOID":e[t]={name:r[0],a:r[1],rf:r[2]},r.length===4&&Kf(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]],DM(e,t,r);return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return Kf(r,e[t]);return DM(e,t,r)}}var ett=.017453292519943295;function rtt(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 NA(r){return r*ett}function ntt(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 rtt(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",NA],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",NA],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",NA],["lat0","latitude_of_origin",NA],["lat0","standard_parallel_1",NA],["lat1","standard_parallel_1",NA],["lat2","standard_parallel_2",NA],["azimuth","Azimuth"],["alpha","azimuth",NA],["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=NA(r.lat1>0?90:-90),r.lat_ts=r.lat1)}function a4(r){var e=ttt(r),t=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",t]);var i={};return Kf(e,i),ntt(i),i}function Na(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Na[r]=sS(arguments[1]):Na[r]=a4(arguments[1]):Na[r]=t}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Na.apply(e,n):Na(n)});if(typeof r=="string"){if(r in Na)return Na[r]}else"EPSG"in r?Na["EPSG:"+r.EPSG]=r:"ESRI"in r?Na["ESRI:"+r.ESRI]=r:"IAU2000"in r?Na["IAU2000:"+r.IAU2000]=r:console.log(r);return}}VJ(Na);function itt(r){return typeof r=="string"}function att(r){return r in Na}var ott=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function stt(r){return ott.some(function(e){return r.indexOf(e)>-1})}var Att=["3857","900913","3785","102113"];function ltt(r){var e=Gu(r,"authority");if(e){var t=Gu(e,"epsg");return t&&Att.indexOf(t)>-1}}function utt(r){var e=Gu(r,"extension");if(e)return Gu(e,"proj4")}function ctt(r){return r[0]==="+"}function htt(r){if(itt(r)){if(att(r))return Na[r];if(stt(r)){var e=a4(r);if(ltt(e))return Na["EPSG:3857"];var t=utt(e);return t?sS(t):e}if(ctt(r))return sS(r)}else return r}function QM(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 uA(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function iy(r){return r<0?-1:1}function fe(r){return Math.abs(r)<=ei?r:r-iy(r)*yg}function Ss(r,e,t){var n=r*t,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(zt-e))/n}function _g(r,e){for(var t=.5*r,n,i,a=zt-2*Math.atan(e),o=0;o<=15;o++)if(n=r*Math.sin(a),i=zt-2*Math.atan(e*Math.pow((1-n)/(1+n),t))-a,a+=i,Math.abs(i)<=1e-10)return a;return-9999}function ftt(){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=uA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function ptt(r){var e=r.x,t=r.y;if(t*tA>90&&t*tA<-90&&e*tA>180&&e*tA<-180)return null;var n,i;if(Math.abs(Math.abs(t)-zt)<=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(zr+.5*t));else{var a=Math.sin(t),o=Ss(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 dtt(r){var e=r.x-this.x0,t=r.y-this.y0,n,i;if(this.sphere)i=zt-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(i=_g(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 vtt=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],gtt={init:ftt,forward:ptt,inverse:dtt,names:vtt};function ytt(){}function HM(r){return r}var mtt=["longlat","identity"],_tt={init:ytt,forward:HM,inverse:HM,names:mtt},wtt=[gtt,_tt],N0={},P_=[];function o4(r,e){var t=P_.length;return r.names?(P_[t]=r,r.names.forEach(function(n){N0[n.toLowerCase()]=t}),this):(console.log(e),!0)}function Ett(r){if(!r)return!1;var e=r.toLowerCase();if(typeof N0[e]<"u"&&P_[N0[e]])return P_[N0[e]]}function Ctt(){wtt.forEach(o4)}var Btt={start:Ctt,add:o4,get:Ett},Ye={};Ye.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Ye.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Ye.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Ye.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Ye.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Ye.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Ye.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Ye.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Ye.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Ye.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Ye.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Ye.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Ye.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Ye.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Ye.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Ye.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Ye.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Ye.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Ye.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Ye.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Ye.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Ye.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Ye.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Ye.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Ye.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Ye.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Ye.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Ye.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Ye.hough={a:6378270,rf:297,ellipseName:"Hough"};Ye.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Ye.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Ye.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Ye.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Ye.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Ye.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Ye.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Ye.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Ye.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Ye.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Ye.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Ye.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var Ttt=Ye.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ye.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Stt(r,e,t,n){var i=r*r,a=e*e,o=(i-a)/i,s=0;n?(r*=1-o*(zJ+o*(YJ+o*XJ)),i=r*r,o=0):s=Math.sqrt(o);var A=(i-a)/a;return{es:o,e:s,ep2:A}}function xtt(r,e,t,n,i){if(!r){var a=Gu(Ye,n);a||(a=Ttt),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 Ei={};Ei.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};Ei.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};Ei.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};Ei.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};Ei.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};Ei.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};Ei.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};Ei.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};Ei.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};Ei.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};Ei.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};Ei.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};Ei.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};Ei.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};Ei.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};Ei.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};Ei.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function btt(r,e,t,n,i,a,o){var s={};return r===void 0||r==="none"?s.datum_type=oS:s.datum_type=jJ,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=dh),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=vh,s.datum_params[3]*=Qv,s.datum_params[4]*=Qv,s.datum_params[5]*=Qv,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=M0,s.grids=o),s.a=t,s.b=n,s.es=i,s.ep2=a,s}var s4={};function Itt(r,e){var t=new DataView(e),n=Ott(t),i=Rtt(t,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=Mtt(t,i,n),o={header:i,subgrids:a};return s4[r]=o,o}function Ftt(r){if(r===void 0)return null;var e=r.split(",");return e.map(Ltt)}function Ltt(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:s4[r]||null,isNull:!1}}function zf(r){return r/3600*Math.PI/180}function Ott(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 Rtt(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:AS(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 AS(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function Mtt(r,e,t){for(var n=176,i=[],a=0;a<e.nSubgrids;a++){var o=Ptt(r,n,t),s=Utt(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:[zf(o.lowerLongitude),zf(o.lowerLatitude)],del:[zf(o.longitudeInterval),zf(o.latitudeInterval)],lim:[A,l],count:o.gridNodeCount,cvs:Ntt(s)})}return i}function Ntt(r){return r.map(function(e){return[zf(e.longitudeShift),zf(e.latitudeShift)]})}function Ptt(r,e,t){return{name:AS(r,e+8,e+16).trim(),parent:AS(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 Utt(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 aA(r,e){if(!(this instanceof aA))return new aA(r);e=e||function(l){if(l)throw l};var t=htt(r);if(typeof t!="object"){e(r);return}var n=aA.projections.get(t.projName);if(!n){e(r);return}if(t.datumCode&&t.datumCode!=="none"){var i=Gu(Ei,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=xtt(t.a,t.b,t.rf,t.ellps,t.sphere),o=Stt(a.a,a.b,a.rf,t.R_A),s=Ftt(t.nadgrids),A=t.datum||btt(t.datumCode,t.datum_params,a.a,a.b,o.es,o.ep2,s);QM(this,t),QM(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)}aA.projections=Btt;aA.projections.start();function Dtt(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===dh?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===vh?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 A4(r,e,t){var n=r.x,i=r.y,a=r.z?r.z:0,o,s,A,l;if(i<-zt&&i>-1.001*zt)i=-zt;else if(i>zt&&i<1.001*zt)i=zt;else{if(i<-zt)return{x:-1/0,y:-1/0,z:r.z};if(i>zt)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 l4(r,e,t,n){var i=1e-12,a=i*i,o=30,s,A,l,u,c,h,f,p,v,m,g,_,E,B=r.x,L=r.y,O=r.z?r.z:0,b,T,I;if(s=Math.sqrt(B*B+L*L),A=Math.sqrt(B*B+L*L+O*O),s/t<i){if(b=0,A/t<i)return T=zt,I=-n,{x:r.x,y:r.y,z:r.z}}else b=Math.atan2(L,B);l=O/A,u=s/A,c=1/Math.sqrt(1-e*(2-e)*u*u),p=u*(1-e)*c,v=l*c,E=0;do E++,f=t/Math.sqrt(1-e*v*v),I=s*p+O*v-f*(1-e*v*v),h=e*f/(f+I),c=1/Math.sqrt(1-h*(2-h)*u*u),m=u*(1-h)*c,g=l*c,_=g*p-m*v,p=m,v=g;while(_*_>a&&E<o);return T=Math.atan(g/Math.abs(m)),{x:b,y:T,z:I}}function Qtt(r,e,t){if(e===dh)return{x:r.x+t[0],y:r.y+t[1],z:r.z+t[2]};if(e===vh){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 Htt(r,e,t){if(e===dh)return{x:r.x-t[0],y:r.y-t[1],z:r.z-t[2]};if(e===vh){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,c=(r.y-i)/l,h=(r.z-a)/l;return{x:u+A*c-s*h,y:-A*u+c+o*h,z:s*u-o*c+h}}}function Rm(r){return r===dh||r===vh}function Gtt(r,e,t){if(Dtt(r,e)||r.datum_type===oS||e.datum_type===oS)return t;var n=r.a,i=r.es;if(r.datum_type===M0){var a=GM(r,!1,t);if(a!==0)return;n=NM,i=PM}var o=e.a,s=e.b,A=e.es;if(e.datum_type===M0&&(o=NM,s=KJ,A=PM),i===A&&n===o&&!Rm(r.datum_type)&&!Rm(e.datum_type))return t;if(t=A4(t,i,n),Rm(r.datum_type)&&(t=Qtt(t,r.datum_type,r.datum_params)),Rm(e.datum_type)&&(t=Htt(t,e.datum_type,e.datum_params)),t=l4(t,A,o,s),e.datum_type===M0){var l=GM(e,!0,t);if(l!==0)return}return t}function GM(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,c=A.ll[1]-l,h=A.ll[0]+(A.lim[0]-1)*A.del[0]+l,f=A.ll[1]+(A.lim[1]-1)*A.del[1]+l;if(!(c>n.y||u>n.x||f<n.y||h<n.x)&&(i=ktt(n,e,A),!isNaN(i.x)))break}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*tA+" "+n.y*tA+" tried: '"+a+"'"),-1):(t.x=-i.x,t.y=i.y,0)}function ktt(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=kM(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=kM(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 kM(r,e){var t={x:r.x/e.del[0],y:r.y/e.del[1]},n={x:Math.floor(t.x),y:Math.floor(t.y)},i={x:t.x-1*n.x,y:t.y-1*n.y},a={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=e.lim[0]||n.y<0||n.y>=e.lim[1])return a;o=n.y*e.lim[0]+n.x;var s={x:e.cvs[o][0],y:e.cvs[o][1]};o++;var A={x:e.cvs[o][0],y:e.cvs[o][1]};o+=e.lim[0];var l={x:e.cvs[o][0],y:e.cvs[o][1]};o--;var u={x:e.cvs[o][0],y:e.cvs[o][1]},c=i.x*i.y,h=i.x*(1-i.y),f=(1-i.x)*(1-i.y),p=(1-i.x)*i.y;return a.x=f*s.x+h*A.x+p*u.x+c*l.x,a.y=f*s.y+h*A.y+p*u.y+c*l.y,a}function $M(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 u4(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 $tt(r){VM(r.x),VM(r.y)}function VM(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 Vtt(r,e){return(r.datum.datum_type===dh||r.datum.datum_type===vh)&&e.datumCode!=="WGS84"||(e.datum.datum_type===dh||e.datum.datum_type===vh)&&r.datumCode!=="WGS84"}function U_(r,e,t,n){var i;if(Array.isArray(t)&&(t=u4(t)),$tt(t),r.datum&&e.datum&&Vtt(r,e)&&(i=new aA("WGS84"),t=U_(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=$M(r,!1,t)),r.projName==="longlat")t={x:t.x*ra,y:t.y*ra,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=Gtt(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*tA,y:t.y*tA,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"?$M(e,!0,t):t}var jM=aA("WGS84");function xC(r,e,t,n){var i,a,o;return Array.isArray(t)?(i=U_(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=U_(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 KM(r){return r instanceof aA?r:r.oProj?r.oProj:aA(r)}function co(r,e,t){r=KM(r);var n=!1,i;return typeof e>"u"?(e=r,r=jM,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=jM,n=!0),e=KM(e),t?xC(r,e,t):(i={forward:function(a,o){return xC(r,e,a,o)},inverse:function(a,o){return xC(e,r,a,o)}},n&&(i.oProj=e),i)}var zM=6,c4="AJSAJS",h4="AFAFAF",Yf=65,eo=73,Ko=79,dv=86,vv=90,jtt={forward:f4,inverse:Ktt,toPoint:p4};function f4(r,e){return e=e||5,Xtt(ztt({lat:r[1],lon:r[0]}),e)}function Ktt(r){var e=yF(v4(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function p4(r){var e=yF(v4(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function bC(r){return r*(Math.PI/180)}function YM(r){return 180*(r/Math.PI)}function ztt(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,a=.9996,o,s,A,l,u,c,h,f=bC(e),p=bC(t),v,m;m=Math.floor((t+180)/6)+1,t===180&&(m=60),e>=56&&e<64&&t>=3&&t<12&&(m=32),e>=72&&e<84&&(t>=0&&t<9?m=31:t>=9&&t<21?m=33:t>=21&&t<33?m=35:t>=33&&t<42&&(m=37)),o=(m-1)*6-180+3,v=bC(o),s=i/(1-i),A=n/Math.sqrt(1-i*Math.sin(f)*Math.sin(f)),l=Math.tan(f)*Math.tan(f),u=s*Math.cos(f)*Math.cos(f),c=Math.cos(f)*(p-v),h=n*((1-i/4-3*i*i/64-5*i*i*i/256)*f-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*f)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*f)-35*i*i*i/3072*Math.sin(6*f));var g=a*A*(c+(1-l+u)*c*c*c/6+(5-18*l+l*l+72*u-58*s)*c*c*c*c*c/120)+5e5,_=a*(h+A*Math.tan(f)*(c*c/2+(5-l+9*u+4*u*u)*c*c*c*c/24+(61-58*l+l*l+600*u-330*s)*c*c*c*c*c*c/720));return e<0&&(_+=1e7),{northing:Math.round(_),easting:Math.round(g),zoneNumber:m,zoneLetter:Ytt(e)}}function yF(r){var e=r.northing,t=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var a=.9996,o=6378137,s=.00669438,A,l=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),u,c,h,f,p,v,m,g,_,E=t-5e5,B=e;n<"N"&&(B-=1e7),m=(i-1)*6-180+3,A=s/(1-s),v=B/a,g=v/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),_=g+(3*l/2-27*l*l*l/32)*Math.sin(2*g)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*g)+151*l*l*l/96*Math.sin(6*g),u=o/Math.sqrt(1-s*Math.sin(_)*Math.sin(_)),c=Math.tan(_)*Math.tan(_),h=A*Math.cos(_)*Math.cos(_),f=o*(1-s)/Math.pow(1-s*Math.sin(_)*Math.sin(_),1.5),p=E/(u*a);var L=_-u*Math.tan(_)/f*(p*p/2-(5+3*c+10*h-4*h*h-9*A)*p*p*p*p/24+(61+90*c+298*h+45*c*c-252*A-3*h*h)*p*p*p*p*p*p/720);L=YM(L);var O=(p-(1+2*c+h)*p*p*p/6+(5-2*h+28*c-3*h*h+8*A+24*c*c)*p*p*p*p*p/120)/Math.cos(_);O=m+YM(O);var b;if(r.accuracy){var T=yF({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});b={top:T.lat,right:T.lon,bottom:L,left:O}}else b={lat:L,lon:O};return b}function Ytt(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 Xtt(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+Wtt(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function Wtt(r,e,t){var n=d4(t),i=Math.floor(r/1e5),a=Math.floor(e/1e5)%20;return qtt(i,a,n)}function d4(r){var e=r%zM;return e===0&&(e=zM),e}function qtt(r,e,t){var n=t-1,i=c4.charCodeAt(n),a=h4.charCodeAt(n),o=i+r-1,s=a+e,A=!1;o>vv&&(o=o-vv+Yf-1,A=!0),(o===eo||i<eo&&o>eo||(o>eo||i<eo)&&A)&&o++,(o===Ko||i<Ko&&o>Ko||(o>Ko||i<Ko)&&A)&&(o++,o===eo&&o++),o>vv&&(o=o-vv+Yf-1),s>dv?(s=s-dv+Yf-1,A=!0):A=!1,(s===eo||a<eo&&s>eo||(s>eo||a<eo)&&A)&&s++,(s===Ko||a<Ko&&s>Ko||(s>Ko||a<Ko)&&A)&&(s++,s===eo&&s++),s>dv&&(s=s-dv+Yf-1);var l=String.fromCharCode(o)+String.fromCharCode(s);return l}function v4(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=d4(o),l=Ztt(t.charAt(0),A),u=Jtt(t.charAt(1),A);u<tet(s);)u+=2e6;var c=e-a;if(c%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 h=c/2,f=0,p=0,v,m,g,_,E;return h>0&&(v=1e5/Math.pow(10,h),m=r.substring(a,a+h),f=parseFloat(m)*v,g=r.substring(a+h),p=parseFloat(g)*v),_=f+l,E=p+u,{easting:_,northing:E,zoneLetter:s,zoneNumber:o,accuracy:v}}function Ztt(r,e){for(var t=c4.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===eo&&t++,t===Ko&&t++,t>vv){if(i)throw"Bad character: "+r;t=Yf,i=!0}n+=1e5}return n}function Jtt(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=h4.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===eo&&t++,t===Ko&&t++,t>dv){if(i)throw"Bad character: "+r;t=Yf,i=!0}n+=1e5}return n}function tet(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 Ip(r,e,t){if(!(this instanceof Ip))return new Ip(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")}Ip.fromMGRS=function(r){return new Ip(p4(r))};Ip.prototype.toMGRS=function(r){return f4([this.x,this.y],r)};var eet=1,ret=.25,XM=.046875,WM=.01953125,qM=.01068115234375,net=.75,iet=.46875,aet=.013020833333333334,oet=.007120768229166667,set=.3645833333333333,Aet=.005696614583333333,uet=.3076171875;function g4(r){var e=[];e[0]=eet-r*(ret+r*(XM+r*(WM+r*qM))),e[1]=r*(net-r*(XM+r*(WM+r*qM)));var t=r*r;return e[2]=t*(iet-r*(aet+r*oet)),t*=r,e[3]=t*(set-r*Aet),e[4]=t*r*uet,e}function uw(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 cet=20;function y4(r,e,t){for(var n=1/(1-e),i=r,a=cet;a;--a){var o=Math.sin(i),s=1-e*o*o;if(s=(uw(i,o,Math.cos(i),t)-r)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)<ne)return i}return i}function het(){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=g4(this.es),this.ml0=uw(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function fet(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,c=Math.pow(u,2),h=this.ep2*Math.pow(A,2),f=Math.pow(h,2),p=Math.abs(A)>ne?Math.tan(t):0,v=Math.pow(p,2),m=Math.pow(v,2);i=1-this.es*Math.pow(s,2),u=u/Math.sqrt(i);var g=uw(t,s,A,this.en);a=this.a*(this.k0*u*(1+c/6*(1-v+h+c/20*(5-18*v+m+14*h-58*v*h+c/42*(61+179*m-m*v-479*v)))))+this.x0,o=this.a*(this.k0*(g-this.ml0+s*n*u/2*(1+c/12*(5-v+9*h+4*f+c/30*(61+m-58*v+270*h-330*v*h+c/56*(1385+543*m-m*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 pet(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=y4(e,this.es,this.en),Math.abs(t)<zt){var c=Math.sin(t),h=Math.cos(t),f=Math.abs(h)>ne?Math.tan(t):0,p=this.ep2*Math.pow(h,2),v=Math.pow(p,2),m=Math.pow(f,2),g=Math.pow(m,2);e=1-this.es*Math.pow(c,2);var _=a*Math.sqrt(e)/this.k0,E=Math.pow(_,2);e=e*f,n=t-e*E/(1-this.es)*.5*(1-E/12*(5+3*m-9*p*m+p-4*v-E/30*(61+90*m-252*p*m+45*g+46*p-E/56*(1385+3633*m+4095*g+1574*g*m)))),i=fe(this.long0+_*(1-E/6*(1+2*m+p-E/20*(5+28*m+24*g+8*p*m+6*p-E/42*(61+662*m+1320*g+720*g*m))))/h)}else n=zt*iy(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 det=["Fast_Transverse_Mercator","Fast Transverse Mercator"],P0={init:het,forward:fet,inverse:pet,names:det};function m4(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function cw(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 vet(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function get(r){var e=Math.abs(r);return e=vet(e*(1+e/(cw(1,e)+1))),r<0?-e:e}function mF(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 yet(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 met(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function _4(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),a=m4(t),o=met(t),s=2*i*o,A=-2*n*a,l=r.length-1,u=r[l],c=0,h=0,f=0,p,v;--l>=0;)p=h,v=c,h=u,c=f,u=-p+s*h-A*c+r[l],f=-v+A*h+s*c;return s=n*o,A=i*a,[s*u-A*f,s*f+A*u]}function _et(){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&&(P0.init.apply(this),this.forward=P0.forward,this.inverse=P0.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=mF(this.cbg,this.lat0);this.Zb=-this.Qn*(n+yet(this.gtu,2*n))}function wet(r){var e=fe(r.x-this.long0),t=r.y;t=mF(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,cw(n,i*o)),e=get(Math.tan(e));var s=_4(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 Eet(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=_4(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(m4(e));var o=Math.sin(t),s=Math.cos(t),A=Math.sin(e),l=Math.cos(e);t=Math.atan2(o*l,cw(A,l*s)),e=Math.atan2(A,l*s),n=fe(e+this.long0),i=mF(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var Cet=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],U0={init:_et,forward:wet,inverse:Eet,names:Cet};function Bet(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 Tet="etmerc";function xet(){var r=Bet(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*ra,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,U0.init.apply(this),this.forward=U0.forward,this.inverse=U0.inverse}var bet=["Universal Transverse Mercator System","utm"],Iet={init:xet,names:bet,dependsOn:Tet};function _F(r,e){return Math.pow((1-r)/(1+r),e)}var Fet=20;function Let(){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+zr)/(Math.pow(Math.tan(.5*this.lat0+zr),this.C)*_F(this.e*r,this.ratexp))}function Oet(r){var e=r.x,t=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+zr),this.C)*_F(this.e*Math.sin(t),this.ratexp))-zt,r.x=this.C*e,r}function Ret(r){for(var e=1e-14,t=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+zr)/this.K,1/this.C),a=Fet;a>0&&(n=2*Math.atan(i*_F(this.e*Math.sin(r.y),-.5*this.e))-zt,!(Math.abs(n-r.y)<e));--a)r.y=n;return a?(r.x=t,r.y=n,r):null}var Met=["gauss"],wF={init:Let,forward:Oet,inverse:Ret,names:Met};function Net(){wF.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 Pet(r){var e,t,n,i;return r.x=fe(r.x-this.long0),wF.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 Uet(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,wF.inverse.apply(this,[r]),r.x=fe(r.x+this.long0),r}var Det=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],Qet={init:Net,forward:Pet,inverse:Uet,names:Det};function Het(r,e,t){return e*=t,Math.tan(.5*(zt+r))*Math.pow((1-e)/(1+e),.5*t)}function Get(){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+iy(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*uA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ss(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=uA(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-zt,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function ket(r){var e=r.x,t=r.y,n=Math.sin(t),i=Math.cos(t),a,o,s,A,l,u,c=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(c)),r.x=this.a*a*i*Math.sin(c)+this.x0,r.y=this.a*a*(this.coslat0*n-this.sinlat0*i*Math.cos(c))+this.y0,r):(o=2*Math.atan(this.ssfn_(t,n,this.e))-zt,A=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=ne?(l=Ss(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(c)),r.y=a*s):(a=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*s+this.cosX0*A*Math.cos(c))),r.y=a*(this.cosX0*s-this.sinX0*A*Math.cos(c))+this.y0),r.x=a*A*Math.sin(c)+this.x0,r))}function $et(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*_g(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*_g(this.e,Math.tan(.5*(zt+a)));return r.x=e,r.y=t,r}var Vet=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],jet={init:Get,forward:ket,inverse:$et,names:Vet,ssfn_:Het};function Ket(){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 zet(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 Yet(r){for(var e=r.x-this.x0,t=r.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(t/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+o/this.alpha,A=0,l=a,u=-1e3,c=0;Math.abs(l-u)>1e-7;){if(++c>20)return;A=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(A))-Math.PI/2}return r.x=s,r.y=l,r}var Xet=["somerc"],Wet={init:Ket,forward:zet,inverse:Yet,names:Xet},Nf=1e-7;function qet(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 Zet(){var r,e,t,n,i,a,o,s,A,l,u=0,c,h=0,f=0,p=0,v=0,m=0,g=0;this.no_off=qet(this),this.no_rot="no_rot"in this;var _=!1;"alpha"in this&&(_=!0);var E=!1;if("rectified_grid_angle"in this&&(E=!0),_&&(g=this.alpha),E&&(u=this.rectified_grid_angle*ra),_||E)h=this.longc;else if(f=this.long1,v=this.lat1,p=this.long2,m=this.lat2,Math.abs(v-m)<=Nf||(r=Math.abs(v))<=Nf||Math.abs(r-zt)<=Nf||Math.abs(Math.abs(this.lat0)-zt)<=Nf||Math.abs(Math.abs(m)-zt)<=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(Ss(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),_||E?(_?(c=Math.asin(Math.sin(g)/n),E||(u=g)):(c=u,g=Math.asin(n*Math.sin(c))),this.lam0=h-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(a=Math.pow(Ss(this.e,v,Math.sin(v)),this.B),o=Math.pow(Ss(this.e,m,Math.sin(m)),this.B),i=this.E/a,A=(o-a)/(o+a),l=this.E*this.E,l=(l-o*a)/(l+o*a),r=f-p,r<-Math.pi?p-=yg:r>Math.pi&&(p+=yg),this.lam0=fe(.5*(f+p)-Math.atan(l*Math.tan(.5*this.B*(f-p))/A)/this.B),c=Math.atan(2*Math.sin(this.B*fe(f-this.lam0))/(i-1/i)),u=g=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(g))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(zr-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(zr+i))}function Jet(r){var e={},t,n,i,a,o,s,A,l;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-zt)>ne){if(o=this.E/Math.pow(Ss(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 trt(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?-zt:zt;else{if(A.y=this.E/Math.sqrt((1+s)/(1-s)),A.y=_g(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 ert=["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"],rrt={init:Zet,forward:Jet,inverse:trt,names:ert};function nrt(){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=uA(this.e,e,t),i=Ss(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=uA(this.e,a,o),A=Ss(this.e,this.lat2,a),l=Ss(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 irt(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=ne&&(t=iy(t)*(zt-2*ne));var n=Math.abs(Math.abs(t)-zt),i,a;if(n>ne)i=Ss(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 art(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=_g(this.e,n),i===-9999)return null}else i=-zt;return a=fe(A/this.ns+this.long0),r.x=a,r.y=i,r}var ort=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],srt={init:nrt,forward:irt,inverse:art,names:ort};function Art(){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 lrt(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 urt(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 crt=["Krovak","krovak"],hrt={init:Art,forward:lrt,inverse:urt,names:crt};function Ha(r,e,t,n,i){return r*i-e*Math.sin(2*i)+t*Math.sin(4*i)-n*Math.sin(6*i)}function ay(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function oy(r){return .375*r*(1+.25*r*(1+.46875*r))}function sy(r){return .05859375*r*r*(1+.75*r)}function Ay(r){return r*r*r*(35/3072)}function Fp(r,e,t){var n=e*t;return r/Math.sqrt(1-n*n)}function zp(r){return Math.abs(r)<zt?r:r-iy(r)*Math.PI}function D_(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 frt(){this.sphere||(this.e0=ay(this.es),this.e1=oy(this.es),this.e2=sy(this.es),this.e3=Ay(this.es),this.ml0=this.a*Ha(this.e0,this.e1,this.e2,this.e3,this.lat0))}function prt(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=Fp(this.a,this.e,a),A=Math.tan(i)*Math.tan(i),l=n*Math.cos(i),u=l*l,c=this.es*o*o/(1-this.es),h=this.a*Ha(this.e0,this.e1,this.e2,this.e3,i);e=s*l*(1-u*A*(1/6-(8-A+8*c)*u/120)),t=h-this.ml0+s*a/o*u*(.5+(5-A+6*c)*u/24)}return r.x=e+this.x0,r.y=t+this.y0,r}function drt(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=D_(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-zt)<=ne)return r.x=this.long0,r.y=zt,t<0&&(r.y*=-1),r;var A=Fp(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),c=e*this.a/A,h=c*c;n=s-A*Math.tan(s)/l*c*c*(.5-(1+3*u)*c*c/24),i=c*(1-h*(u/3+(1+3*u)*u*h/15))/Math.cos(s)}return r.x=fe(i+this.long0),r.y=zp(n),r}var vrt=["Cassini","Cassini_Soldner","cass"],grt={init:frt,forward:prt,inverse:drt,names:vrt};function Su(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 yrt=1,mrt=2,_rt=3,wrt=4;function Ert(){var r=Math.abs(this.lat0);if(Math.abs(r-zt)<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=Su(this.e,1),this.mmf=.5/(1-this.es),this.apa=Lrt(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=Su(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 Crt(r){var e,t,n,i,a,o,s,A,l,u,c=r.x,h=r.y;if(c=fe(c-this.long0),this.sphere){if(a=Math.sin(h),u=Math.cos(h),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t=this.mode===this.EQUIT?1+u*n:1+this.sinph0*a+this.cosph0*u*n,t<=ne)return null;t=Math.sqrt(2/t),e=t*u*Math.sin(c),t*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(h+this.lat0)<ne)return null;t=zr-h*.5,t=2*(this.mode===this.S_POLE?Math.cos(t):Math.sin(t)),e=t*Math.sin(c),t*=n}}else{switch(s=0,A=0,l=0,n=Math.cos(c),i=Math.sin(c),a=Math.sin(h),o=Su(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=zt+h,o=this.qp-o;break;case this.S_POLE:l=h-zt,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 Brt(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i,a,o,s,A,l;if(this.sphere){var u=0,c,h=0;if(c=Math.sqrt(e*e+t*t),i=c*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(i),u=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=ne?0:Math.asin(t*h/c),e*=h,t=u*c;break;case this.OBLIQ:i=Math.abs(c)<=ne?this.lat0:Math.asin(u*this.sinph0+t*h*this.cosph0/c),e*=h*this.cosph0,t=(u-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:t=-t,i=zt-i;break;case this.S_POLE:i-=zt;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=Ort(Math.asin(l),this.apa)}return r.x=fe(this.long0+n),r.y=i,r}var Trt=.3333333333333333,Srt=.17222222222222222,xrt=.10257936507936508,brt=.06388888888888888,Irt=.0664021164021164,Frt=.016415012942191543;function Lrt(r){var e,t=[];return t[0]=r*Trt,e=r*r,t[0]+=e*Srt,t[1]=e*brt,e*=r,t[0]+=e*xrt,t[1]+=e*Irt,t[2]=e*Frt,t}function Ort(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 Rrt=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],Mrt={init:Ert,forward:Crt,inverse:Brt,names:Rrt,S_POLE:yrt,N_POLE:mrt,EQUIT:_rt,OBLIQ:wrt};function ku(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function Nrt(){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=uA(this.e3,this.sin_po,this.cos_po),this.qs1=Su(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=uA(this.e3,this.sin_po,this.cos_po),this.qs2=Su(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=Su(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 Prt(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=Su(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 Urt(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 Drt(r,e){var t,n,i,a,o,s=ku(.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 Qrt=["Albers_Conic_Equal_Area","Albers","aea"],Hrt={init:Nrt,forward:Prt,inverse:Urt,names:Qrt,phi1z:Drt};function Grt(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function krt(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 $rt(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=ku(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 Vrt=["gnom"],jrt={init:Grt,forward:krt,inverse:$rt,names:Vrt};function Krt(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*zt:zt;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 zrt(){this.sphere||(this.k0=uA(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Yrt(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=Su(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 Xrt(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=Krt(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 Wrt=["cea"],qrt={init:zrt,forward:Yrt,inverse:Xrt,names:Wrt};function Zrt(){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 Jrt(r){var e=r.x,t=r.y,n=fe(e-this.long0),i=zp(t-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function tnt(r){var e=r.x,t=r.y;return r.x=fe(this.long0+(e-this.x0)/(this.a*this.rc)),r.y=zp(this.lat0+(t-this.y0)/this.a),r}var ent=["Equirectangular","Equidistant_Cylindrical","eqc"],rnt={init:Zrt,forward:Jrt,inverse:tnt,names:ent},ZM=20;function nnt(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ay(this.es),this.e1=oy(this.es),this.e2=sy(this.es),this.e3=Ay(this.es),this.ml0=this.a*Ha(this.e0,this.e1,this.e2,this.e3,this.lat0)}function int(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*(zp(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=Fp(this.a,this.e,Math.sin(t))/Math.tan(t);n=s*Math.sin(a),i=this.a*Ha(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 ant(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=ZM;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 c,h,f,p,v;for(a=ZM;a;--a)if(v=this.e*Math.sin(A),c=Math.sqrt(1-v*v)*Math.tan(A),h=this.a*Ha(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),p=h/this.a,l=(o*(c*p+1)-p-.5*c*(p*p+s))/(this.es*Math.sin(2*A)*(p*p+s-2*o*p)/(4*c)+(o-p)*(c*f-2/Math.sin(2*A))-f),A-=l,Math.abs(l)<=ne){t=A;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=fe(this.long0+Math.asin(n*c/this.a)/Math.sin(t))}return r.x=e,r.y=t,r}var ont=["Polyconic","poly"],snt={init:nnt,forward:int,inverse:ant,names:ont};function Ant(){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 lnt(r){var e,t=r.x,n=r.y,i=n-this.lat0,a=t-this.long0,o=i/Qv*1e-5,s=a,A=1,l=0;for(e=1;e<=10;e++)A=A*o,l=l+this.A[e]*A;var u=l,c=s,h=1,f=0,p,v,m=0,g=0;for(e=1;e<=6;e++)p=h*u-f*c,v=f*u+h*c,h=p,f=v,m=m+this.B_re[e]*h-this.B_im[e]*f,g=g+this.B_im[e]*h+this.B_re[e]*f;return r.x=g*this.a+this.x0,r.y=m*this.a+this.y0,r}function unt(r){var e,t=r.x,n=r.y,i=t-this.x0,a=n-this.y0,o=a/this.a,s=i/this.a,A=1,l=0,u,c,h=0,f=0;for(e=1;e<=6;e++)u=A*o-l*s,c=l*o+A*s,A=u,l=c,h=h+this.C_re[e]*A-this.C_im[e]*l,f=f+this.C_im[e]*A+this.C_re[e]*l;for(var p=0;p<this.iterations;p++){var v=h,m=f,g,_,E=o,B=s;for(e=2;e<=6;e++)g=v*h-m*f,_=m*h+v*f,v=g,m=_,E=E+(e-1)*(this.B_re[e]*v-this.B_im[e]*m),B=B+(e-1)*(this.B_im[e]*v+this.B_re[e]*m);v=1,m=0;var L=this.B_re[1],O=this.B_im[1];for(e=2;e<=6;e++)g=v*h-m*f,_=m*h+v*f,v=g,m=_,L=L+e*(this.B_re[e]*v-this.B_im[e]*m),O=O+e*(this.B_im[e]*v+this.B_re[e]*m);var b=L*L+O*O;h=(E*L+B*O)/b,f=(B*L-E*O)/b}var T=h,I=f,M=1,x=0;for(e=1;e<=9;e++)M=M*T,x=x+this.D[e]*M;var S=this.lat0+x*Qv*1e5,N=this.long0+I;return r.x=N,r.y=S,r}var cnt=["New_Zealand_Map_Grid","nzmg"],hnt={init:Ant,forward:lnt,inverse:unt,names:cnt};function fnt(){}function pnt(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 dnt(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 vnt=["Miller_Cylindrical","mill"],gnt={init:fnt,forward:pnt,inverse:dnt,names:vnt},ynt=20;function mnt(){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=g4(this.es)}function _nt(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=ynt;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*uw(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 wnt(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=ku((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=ku(Math.sin(e)/this.n)),n=fe(n+this.long0),e=zp(e)):(e=y4(r.y/this.a,this.es,this.en),i=Math.abs(e),i<zt?(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<zt&&(n=this.long0)),r.x=n,r.y=e,r}var Ent=["Sinusoidal","sinu"],Cnt={init:mnt,forward:_nt,inverse:wnt,names:Ent};function Bnt(){}function Tnt(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 Snt(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 xnt=["Mollweide","moll"],bnt={init:Bnt,forward:Tnt,inverse:Snt,names:xnt};function Int(){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=ay(this.es),this.e1=oy(this.es),this.e2=sy(this.es),this.e3=Ay(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=uA(this.e,this.sinphi,this.cosphi),this.ml1=Ha(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=uA(this.e,this.sinphi,this.cosphi),this.ml2=Ha(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=Ha(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function Fnt(r){var e=r.x,t=r.y,n;if(this.sphere)n=this.a*(this.g-t);else{var i=Ha(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 Lnt(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=zp(this.g-t/this.a),r.x=i,r.y=n,r;var o=this.g-t/this.a;return n=D_(o,this.e0,this.e1,this.e2,this.e3),i=fe(this.long0+a/this.ns),r.x=i,r.y=n,r}var Ont=["Equidistant_Conic","eqdc"],Rnt={init:Int,forward:Fnt,inverse:Lnt,names:Ont};function Mnt(){this.R=this.a}function Nnt(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=ku(2*Math.abs(t/Math.PI));(Math.abs(n)<=ne||Math.abs(Math.abs(t)-zt)<=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),c=u/(l+u-1),h=c*c,f=c*(2/l-1),p=f*f,v=Math.PI*this.R*(s*(c-p)+Math.sqrt(A*(c-p)*(c-p)-(p+A)*(h-p)))/(p+A);n<0&&(v=-v),i=this.x0+v;var m=A+c;return v=Math.PI*this.R*(f*m-s*Math.sqrt((p+A)*(A+1)-m*m))/(p+A),t>=0?a=this.y0+v:a=this.y0-v,r.x=i,r.y=a,r}function Pnt(r){var e,t,n,i,a,o,s,A,l,u,c,h,f;return r.x-=this.x0,r.y-=this.y0,c=Math.PI*this.R,n=r.x/c,i=r.y/c,a=n*n+i*i,o=-Math.abs(i)*(1+a),s=o-2*i*i+n*n,A=-2*o+1+2*i*i+a*a,f=i*i/A+(2*s*s*s/A/A/A-9*o*s/A/A)/27,l=(o-s*s/3/A)/A,u=2*Math.sqrt(-l/3),c=3*f/l/u,Math.abs(c)>1&&(c>=0?c=1:c=-1),h=Math.acos(c)/3,r.y>=0?t=(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI:t=-(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI,Math.abs(n)<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 Unt=["Van_der_Grinten_I","VanDerGrinten","vandg"],Dnt={init:Mnt,forward:Nnt,inverse:Pnt,names:Unt};function Qnt(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function Hnt(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,c,h,f,p,v,m,g,_,E,B,L,O,b,T,I,M,x,S;return this.sphere?Math.abs(this.sin_p12-1)<=ne?(r.x=this.x0+this.a*(zt-t)*Math.sin(a),r.y=this.y0-this.a*(zt-t)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=ne?(r.x=this.x0+this.a*(zt+t)*Math.sin(a),r.y=this.y0+this.a*(zt+t)*Math.cos(a),r):(b=this.sin_p12*n+this.cos_p12*i*Math.cos(a),L=Math.acos(b),O=L?L/Math.sin(L):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=ay(this.es),s=oy(this.es),A=sy(this.es),l=Ay(this.es),Math.abs(this.sin_p12-1)<=ne?(u=this.a*Ha(o,s,A,l,zt),c=this.a*Ha(o,s,A,l,t),r.x=this.x0+(u-c)*Math.sin(a),r.y=this.y0-(u-c)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=ne?(u=this.a*Ha(o,s,A,l,zt),c=this.a*Ha(o,s,A,l,t),r.x=this.x0+(u+c)*Math.sin(a),r.y=this.y0+(u+c)*Math.cos(a),r):(h=n/i,f=Fp(this.a,this.e,this.sin_p12),p=Fp(this.a,this.e,n),v=Math.atan((1-this.es)*h+this.es*f*this.sin_p12/(p*i)),m=Math.atan2(Math.sin(a),this.cos_p12*Math.tan(v)-this.sin_p12*Math.cos(a)),m===0?T=Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):Math.abs(Math.abs(m)-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(m)),g=this.e*this.sin_p12/Math.sqrt(1-this.es),_=this.e*this.cos_p12*Math.cos(m)/Math.sqrt(1-this.es),E=g*_,B=_*_,I=T*T,M=I*T,x=M*T,S=x*T,L=f*T*(1-I*B*(1-B)/6+M/8*E*(1-2*B)+x/120*(B*(4-7*B)-3*g*g*(1-7*B))-S/48*E),r.x=this.x0+L*Math.sin(m),r.y=this.y0+L*Math.cos(m),r))}function Gnt(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,O,b,T;return this.sphere?(e=Math.sqrt(r.x*r.x+r.y*r.y),e>2*zt*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=ku(i*this.sin_p12+r.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-zt,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=ay(this.es),l=oy(this.es),u=sy(this.es),c=Ay(this.es),Math.abs(this.sin_p12-1)<=ne?(h=this.a*Ha(A,l,u,c,zt),e=Math.sqrt(r.x*r.x+r.y*r.y),f=h-e,o=D_(f/this.a,A,l,u,c),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?(h=this.a*Ha(A,l,u,c,zt),e=Math.sqrt(r.x*r.x+r.y*r.y),f=e-h,o=D_(f/this.a,A,l,u,c),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),m=Math.atan2(r.x,r.y),p=Fp(this.a,this.e,this.sin_p12),g=Math.cos(m),_=this.e*this.cos_p12*g,E=-_*_/(1-this.es),B=3*this.es*(1-E)*this.sin_p12*this.cos_p12*g/(1-this.es),L=e/p,O=L-E*(1+E)*Math.pow(L,3)/6-B*(1+3*E)*Math.pow(L,4)/24,b=1-E*O*O/2-L*O*O*O/6,v=Math.asin(this.sin_p12*Math.cos(O)+this.cos_p12*Math.sin(O)*g),a=fe(this.long0+Math.asin(Math.sin(m)*Math.sin(O)/Math.cos(v))),T=Math.sin(v),o=Math.atan2((T-this.es*b*this.sin_p12)*Math.tan(v),T*(1-this.es)),r.x=a,r.y=o,r))}var knt=["Azimuthal_Equidistant","aeqd"],$nt={init:Qnt,forward:Hnt,inverse:Gnt,names:knt};function Vnt(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function jnt(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 Knt(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=ku(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=ku(i*this.sin_p14+r.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-zt,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 znt=["ortho"],Ynt={init:Vnt,forward:jnt,inverse:Knt,names:znt},Rn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},Yr={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Xnt(){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>=zt-zr/2?this.face=Rn.TOP:this.lat0<=-(zt-zr/2)?this.face=Rn.BOTTOM:Math.abs(this.long0)<=zr?this.face=Rn.FRONT:Math.abs(this.long0)<=zt+zr?this.face=this.long0>0?Rn.RIGHT:Rn.LEFT:this.face=Rn.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 Wnt(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===Rn.TOP)a=zt-t,n>=zr&&n<=zt+zr?(A.value=Yr.AREA_0,i=n-zt):n>zt+zr||n<=-(zt+zr)?(A.value=Yr.AREA_1,i=n>0?n-ei:n+ei):n>-(zt+zr)&&n<=-zr?(A.value=Yr.AREA_2,i=n+zt):(A.value=Yr.AREA_3,i=n);else if(this.face===Rn.BOTTOM)a=zt+t,n>=zr&&n<=zt+zr?(A.value=Yr.AREA_0,i=-n+zt):n<zr&&n>=-zr?(A.value=Yr.AREA_1,i=-n):n<-zr&&n>=-(zt+zr)?(A.value=Yr.AREA_2,i=-n-zt):(A.value=Yr.AREA_3,i=n>0?-n+ei:-n-ei);else{var l,u,c,h,f,p,v;this.face===Rn.RIGHT?n=up(n,+zt):this.face===Rn.BACK?n=up(n,+ei):this.face===Rn.LEFT&&(n=up(n,-zt)),h=Math.sin(t),f=Math.cos(t),p=Math.sin(n),v=Math.cos(n),l=f*v,u=f*p,c=h,this.face===Rn.FRONT?(a=Math.acos(l),i=Mm(a,c,u,A)):this.face===Rn.RIGHT?(a=Math.acos(u),i=Mm(a,c,-l,A)):this.face===Rn.BACK?(a=Math.acos(-l),i=Mm(a,c,-u,A)):this.face===Rn.LEFT?(a=Math.acos(-u),i=Mm(a,c,l,A)):(a=i=0,A.value=Yr.AREA_0)}return s=Math.atan(12/ei*(i+Math.acos(Math.sin(i)*Math.cos(zr))-zt)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),A.value===Yr.AREA_1?s+=zt:A.value===Yr.AREA_2?s+=ei:A.value===Yr.AREA_3&&(s+=1.5*ei),e.x=o*Math.cos(s),e.y=o*Math.sin(s),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,r.x=e.x,r.y=e.y,r}function qnt(r){var e={lam:0,phi:0},t,n,i,a,o,s,A,l,u,c={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),t=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?c.value=Yr.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(c.value=Yr.AREA_1,t-=zt):r.x<0&&-r.x>=Math.abs(r.y)?(c.value=Yr.AREA_2,t=t<0?t+ei:t-ei):(c.value=Yr.AREA_3,t+=zt),u=ei/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),s=Math.atan(o),i=Math.cos(t),a=Math.tan(n),A=1-i*i*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),A<-1?A=-1:A>1&&(A=1),this.face===Rn.TOP)l=Math.acos(A),e.phi=zt-l,c.value===Yr.AREA_0?e.lam=s+zt:c.value===Yr.AREA_1?e.lam=s<0?s+ei:s-ei:c.value===Yr.AREA_2?e.lam=s-zt:e.lam=s;else if(this.face===Rn.BOTTOM)l=Math.acos(A),e.phi=l-zt,c.value===Yr.AREA_0?e.lam=-s+zt:c.value===Yr.AREA_1?e.lam=-s:c.value===Yr.AREA_2?e.lam=-s-zt:e.lam=s<0?-s-ei:-s+ei;else{var h,f,p;h=A,u=h*h,u>=1?p=0:p=Math.sqrt(1-u)*Math.sin(s),u+=p*p,u>=1?f=0:f=Math.sqrt(1-u),c.value===Yr.AREA_1?(u=f,f=-p,p=u):c.value===Yr.AREA_2?(f=-f,p=-p):c.value===Yr.AREA_3&&(u=f,f=p,p=-u),this.face===Rn.RIGHT?(u=h,h=-f,f=u):this.face===Rn.BACK?(h=-h,f=-f):this.face===Rn.LEFT&&(u=h,h=f,f=-u),e.phi=Math.acos(-p)-zt,e.lam=Math.atan2(f,h),this.face===Rn.RIGHT?e.lam=up(e.lam,-zt):this.face===Rn.BACK?e.lam=up(e.lam,-ei):this.face===Rn.LEFT&&(e.lam=up(e.lam,+zt))}if(this.es!==0){var v,m,g;v=e.phi<0?1:0,m=Math.tan(e.phi),g=this.b/Math.sqrt(m*m+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-g*g)/(this.one_minus_f*g)),v&&(e.phi=-e.phi)}return e.lam+=this.long0,r.x=e.lam,r.y=e.phi,r}function Mm(r,e,t,n){var i;return r<ne?(n.value=Yr.AREA_0,i=0):(i=Math.atan2(e,t),Math.abs(i)<=zr?n.value=Yr.AREA_0:i>zr&&i<=zt+zr?(n.value=Yr.AREA_1,i-=zt):i>zt+zr||i<=-(zt+zr)?(n.value=Yr.AREA_2,i=i>=0?i-ei:i+ei):(n.value=Yr.AREA_3,i+=zt)),i}function up(r,e){var t=r+e;return t<-ei?t+=yg:t>+ei&&(t-=yg),t}var Znt=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Jnt={init:Xnt,forward:Wnt,inverse:qnt,names:Znt},lS=[[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]],gv=[[-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]],w4=.8487,E4=1.3523,C4=tA/5,tit=1/C4,Xf=18,Q_=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},eit=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function rit(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 nit(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function iit(r){var e=fe(r.x-this.long0),t=Math.abs(r.y),n=Math.floor(t*C4);n<0?n=0:n>=Xf&&(n=Xf-1),t=tA*(t-tit*n);var i={x:Q_(lS[n],t)*e,y:Q_(gv[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*w4+this.x0,i.y=i.y*this.a*E4+this.y0,i}function ait(r){var e={x:(r.x-this.x0)/(this.a*w4),y:Math.abs(r.y-this.y0)/(this.a*E4)};if(e.y>=1)e.x/=lS[Xf][0],e.y=r.y<0?-zt:zt;else{var t=Math.floor(e.y*Xf);for(t<0?t=0:t>=Xf&&(t=Xf-1);;)if(gv[t][0]>e.y)--t;else if(gv[t+1][0]<=e.y)++t;else break;var n=gv[t],i=5*(e.y-n[0])/(gv[t+1][0]-n[0]);i=rit(function(a){return(Q_(n,a)-e.y)/eit(n,a)},i,ne,100),e.x/=Q_(lS[t],i),e.y=(5*t+i)*ra,r.y<0&&(e.y=-e.y)}return e.x=fe(e.x+this.long0),e}var oit=["Robinson","robin"],sit={init:nit,forward:iit,inverse:ait,names:oit};function Ait(){this.name="geocent"}function lit(r){var e=A4(r,this.es,this.a);return e}function uit(r){var e=l4(r,this.es,this.a,this.b);return e}var cit=["Geocentric","geocentric","geocent","Geocent"],hit={init:Ait,forward:lit,inverse:uit,names:cit},ma={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},jd={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 fit(){if(Object.keys(jd).forEach(function(t){if(typeof this[t]>"u")this[t]=jd[t].def;else{if(jd[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);jd[t].num&&(this[t]=parseFloat(this[t]))}jd[t].degrees&&(this[t]=this[t]*ra)}.bind(this)),Math.abs(Math.abs(this.lat0)-zt)<ne?this.mode=this.lat0<0?ma.S_POLE:ma.N_POLE:Math.abs(this.lat0)<ne?this.mode=ma.EQUIT:(this.mode=ma.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 pit(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 ma.OBLIQ:a=this.sinph0*e+this.cosph0*t*n;break;case ma.EQUIT:a=t*n;break;case ma.S_POLE:a=-e;break;case ma.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),i=a*t*Math.sin(r.x),this.mode){case ma.OBLIQ:a*=this.cosph0*e-this.sinph0*t*n;break;case ma.EQUIT:a*=e;break;case ma.N_POLE:a*=-(t*n);break;case ma.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 dit(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=cw(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 ma.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 ma.EQUIT:e.y=Math.asin(r.y*s/a),r.y=o*a,r.x*=s;break;case ma.N_POLE:e.y=Math.asin(o),r.y=-r.y;break;case ma.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 vit=["Tilted_Perspective","tpers"],git={init:fit,forward:pit,inverse:dit,names:vit};function yit(r){r.Proj.projections.add(P0),r.Proj.projections.add(U0),r.Proj.projections.add(Iet),r.Proj.projections.add(Qet),r.Proj.projections.add(jet),r.Proj.projections.add(Wet),r.Proj.projections.add(rrt),r.Proj.projections.add(srt),r.Proj.projections.add(hrt),r.Proj.projections.add(grt),r.Proj.projections.add(Mrt),r.Proj.projections.add(Hrt),r.Proj.projections.add(jrt),r.Proj.projections.add(qrt),r.Proj.projections.add(rnt),r.Proj.projections.add(snt),r.Proj.projections.add(hnt),r.Proj.projections.add(gnt),r.Proj.projections.add(Cnt),r.Proj.projections.add(bnt),r.Proj.projections.add(Rnt),r.Proj.projections.add(Dnt),r.Proj.projections.add($nt),r.Proj.projections.add(Ynt),r.Proj.projections.add(Jnt),r.Proj.projections.add(sit),r.Proj.projections.add(hit),r.Proj.projections.add(git)}co.defaultDatum="WGS84";co.Proj=aA;co.WGS84=new co.Proj("WGS84");co.Point=Ip;co.toPoint=u4;co.defs=Na;co.nadgrid=Itt;co.transform=U_;co.mgrs=jtt;co.version="__VERSION__";yit(co);function mit(r){var e=Object.keys(r.defs),t=e.length,n,i;for(n=0;n<t;++n){var a=e[n];if(!Oe(a)){var o=r.defs(a),s=o.units;!s&&o.projName==="longlat"&&(s=Qa.DEGREES),AQ(new ml({code:a,axisOrientation:o.axis,metersPerUnit:o.to_meter,units:s}))}}for(n=0;n<t;++n){var A=e[n],l=Oe(A);for(i=0;i<t;++i){var u=e[i],c=Oe(u);if(!oQ(A,u))if(r.defs[A]===r.defs[u])zT([l,c]);else{var h=r(A,u);ZX(l,c,sM(l,c,h.forward),sM(c,l,h.inverse))}}}}const _it={name:"ol-projection-register",setup(r){const{projectionName:e,projectionDef:t,projectionExtent:n}=Lu(r);return co.defs(e.value,t.value),mit(co),{projection:new ml({code:e.value,extent:n.value})}},props:{projectionName:{type:String},projectionDef:{type:String},projectionExtent:{type:Array}}};function wit(r,e,t,n,i,a){return dr("",!0)}var uS=le(_it,[["render",wit]]);function H_(r){H_.installed||(H_.installed=!0,r.component(eS.name,eS),r.component(rS.name,rS),r.component(nS.name,nS),r.component(iS.name,iS),r.component(aS.name,aS),r.component(uS.name,uS))}var Eit=Object.freeze(Object.defineProperty({__proto__:null,default:H_,install:H_,Map:eS,View:rS,Feature:nS,Overlay:iS,GeoLocation:aS,Projection:uS},Symbol.toStringTag,{value:"Module"})),cu={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"},Cit=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)}}(),Bit=function(r){Cit(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(cu.PRELOAD)},e.prototype.setPreload=function(t){this.set(cu.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(cu.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(cu.USE_INTERIM_TILES_ON_ERROR,t)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Sh),B4=Bit,Tit=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)}}(),Sit=function(r){Tit(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(){Be()},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:zI(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}(Th),EF=Sit,xit=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)}}(),bit=function(r){xit(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_=Iit(),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_=pF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(EF);function Iit(){var r=ja(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var G_=bit,T4=.5,Fit=10,JM=.25,Lit=function(){function r(e,t,n,i,a,o){this.sourceProj_=e,this.targetProj_=t;var s={},A=vg(this.targetProj_,this.sourceProj_);this.transformInv_=function(E){var B=E[0]+"/"+E[1];return s[B]||(s[B]=A(E)),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=Rs(n),u=Yg(n),c=$p(n),h=zg(n),f=this.transformInv_(l),p=this.transformInv_(u),v=this.transformInv_(c),m=this.transformInv_(h),g=Fit+(o?Math.max(0,Math.ceil(G6(Ag(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,c,h,f,p,v,m,g),this.wrapsXInSource_){var _=1/0;this.triangles_.forEach(function(E,B,L){_=Math.min(_,E.source[0][0],E.source[1][0],E.source[2][0])}),this.triangles_.forEach(function(E){if(Math.max(E.source[0][0],E.source[1][0],E.source[2][0])-_>this.sourceWorldWidth_/2){var B=[[E.source[0][0],E.source[0][1]],[E.source[1][0],E.source[1][1]],[E.source[2][0],E.source[2][1]]];B[0][0]-_>this.sourceWorldWidth_/2&&(B[0][0]-=this.sourceWorldWidth_),B[1][0]-_>this.sourceWorldWidth_/2&&(B[1][0]-=this.sourceWorldWidth_),B[2][0]-_>this.sourceWorldWidth_/2&&(B[2][0]-=this.sourceWorldWidth_);var L=Math.min(B[0][0],B[1][0],B[2][0]),O=Math.max(B[0][0],B[1][0],B[2][0]);O-L<this.sourceWorldWidth_/2&&(E.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=Yi([a,o,s,A]),c=this.sourceWorldWidth_?Fr(u)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&c>.5&&c<1,p=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var v=Yi([e,t,n,i]),m=Fr(v)/this.targetWorldWidth_;p=m>JM||p}!f&&this.sourceProj_.isGlobal()&&c&&(p=c>JM||p)}if(!(!p&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Mn(u,this.maxSourceExtent_))){var g=0;if(!p&&(!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)p=!0;else if(g=(!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),g!=1&&g!=2&&g!=4&&g!=8)return}if(l>0){if(!p){var _=[(e[0]+n[0])/2,(e[1]+n[1])/2],E=this.transformInv_(_),B=void 0;if(f){var L=(Bu(a[0],h)+Bu(s[0],h))/2;B=L-Bu(E[0],h)}else B=(a[0]+s[0])/2-E[0];var O=(a[1]+s[1])/2-E[1],b=B*B+O*O;p=b>this.errorThresholdSquared_}if(p){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],I=this.transformInv_(T),M=[(i[0]+e[0])/2,(i[1]+e[1])/2],x=this.transformInv_(M);this.addQuad_(e,t,T,M,a,o,I,x,l-1),this.addQuad_(M,T,n,i,x,I,s,A,l-1)}else{var S=[(e[0]+t[0])/2,(e[1]+t[1])/2],N=this.transformInv_(S),P=[(n[0]+i[0])/2,(n[1]+i[1])/2],X=this.transformInv_(P);this.addQuad_(e,S,P,i,a,N,X,A,l-1),this.addQuad_(S,t,n,P,N,o,s,X,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}g&11||this.addTriangle_(e,n,i,a,s,A),g&14||this.addTriangle_(e,n,t,a,s,o),g&&(g&13||this.addTriangle_(t,i,e,o,A,a),g&7||this.addTriangle_(t,i,n,o,A,s))}},r.prototype.calculateSourceExtent=function(){var e=_i();return this.triangles_.forEach(function(t,n,i){var a=t.source;Yc(e,a[0]),Yc(e,a[1]),Yc(e,a[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}(),S4=Lit,Lp={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},x4={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},IC;function tN(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 FC(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function Oit(){if(IC===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",tN(r,4,5,4,0),tN(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;IC=FC(e,0)||FC(e,4)||FC(e,8)}return IC}function wg(r,e,t,n){var i=Qu(t,e,r),a=T_(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||xs(A,i)){var l=T_(r,a,i)/a;isFinite(l)&&l>0&&(a/=l)}return a}function Rit(r,e,t,n){var i=Sa(t),a=wg(r,e,i,n);return(!isFinite(a)||a<=0)&&X1(t,function(o){return a=wg(r,e,o,n),isFinite(a)&&a>0}),a}function b4(r,e,t,n,i,a,o,s,A,l,u,c){var h=ja(Math.round(t*r),Math.round(t*e));if(c||de(h,Lp),A.length===0)return h.canvas;h.scale(t,t);function f(B){return Math.round(B*t)/t}h.globalCompositeOperation="lighter";var p=_i();A.forEach(function(B,L,O){Uu(p,B.extent)});var v=Fr(p),m=Ai(p),g=ja(Math.round(t*v/n),Math.round(t*m/n));c||de(g,Lp);var _=t/n;A.forEach(function(B,L,O){var b=B.extent[0]-p[0],T=-(B.extent[3]-p[3]),I=Fr(B.extent),M=Ai(B.extent);B.image.width>0&&B.image.height>0&&g.drawImage(B.image,l,l,B.image.width-2*l,B.image.height-2*l,b*_,T*_,I*_,M*_)});var E=Rs(o);return s.getTriangles().forEach(function(B,L,O){var b=B.source,T=B.target,I=b[0][0],M=b[0][1],x=b[1][0],S=b[1][1],N=b[2][0],P=b[2][1],X=f((T[0][0]-E[0])/a),z=f(-(T[0][1]-E[1])/a),tt=f((T[1][0]-E[0])/a),J=f(-(T[1][1]-E[1])/a),nt=f((T[2][0]-E[0])/a),it=f(-(T[2][1]-E[1])/a),_t=I,R=M;I=0,M=0,x-=_t,S-=R,N-=_t,P-=R;var $=[[x,S,0,0,tt-X],[N,P,0,0,nt-X],[0,0,x,S,J-z],[0,0,N,P,it-z]],K=HY($);if(K){if(h.save(),h.beginPath(),Oit()||!c){h.moveTo(tt,J);for(var q=4,at=X-tt,vt=z-J,wt=0;wt<q;wt++)h.lineTo(tt+f((wt+1)*at/q),J+f(wt*vt/(q-1))),wt!=q-1&&h.lineTo(tt+f((wt+1)*at/q),J+f((wt+1)*vt/(q-1)));h.lineTo(nt,it)}else h.moveTo(tt,J),h.lineTo(X,z),h.lineTo(nt,it);h.clip(),h.transform(K[0],K[2],K[1],K[3],X,z),h.translate(p[0]-_t,p[3]-R),h.scale(n/t,-n/t),h.drawImage(g.canvas,0,0),h.restore()}}),u&&(h.save(),h.globalCompositeOperation="source-over",h.strokeStyle="black",h.lineWidth=1,s.getTriangles().forEach(function(B,L,O){var b=B.target,T=(b[0][0]-E[0])/a,I=-(b[0][1]-E[1])/a,M=(b[1][0]-E[0])/a,x=-(b[1][1]-E[1])/a,S=(b[2][0]-E[0])/a,N=-(b[2][1]-E[1])/a;h.beginPath(),h.moveTo(M,x),h.lineTo(T,I),h.lineTo(S,N),h.closePath(),h.stroke()}),h.restore()),h.canvas}var Mit=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)}}(),Nit=function(r){Mit(e,r);function e(t,n,i,a,o,s,A,l,u,c,h,f){var p=r.call(this,o,ge.IDLE,{interpolate:!!f})||this;p.renderEdges_=h!==void 0?h:!1,p.pixelRatio_=A,p.gutter_=l,p.canvas_=null,p.sourceTileGrid_=n,p.targetTileGrid_=a,p.wrappedTileCoord_=s||o,p.sourceTiles_=[],p.sourcesListenerKeys_=null,p.sourceZ_=0;var v=a.getTileCoordExtent(p.wrappedTileCoord_),m=p.targetTileGrid_.getExtent(),g=p.sourceTileGrid_.getExtent(),_=m?Jo(v,m):v;if(Ag(_)===0)return p.state=ge.EMPTY,p;var E=t.getExtent();E&&(g?g=Jo(g,E):g=E);var B=a.getResolution(p.wrappedTileCoord_[0]),L=Rit(t,i,_,B);if(!isFinite(L)||L<=0)return p.state=ge.EMPTY,p;var O=c!==void 0?c:T4;if(p.triangulation_=new S4(t,i,_,g,L*O,B),p.triangulation_.getTriangles().length===0)return p.state=ge.EMPTY,p;p.sourceZ_=n.getZForResolution(L);var b=p.triangulation_.calculateSourceExtent();if(g&&(t.canWrapX()?(b[1]=xn(b[1],g[1],g[3]),b[3]=xn(b[3],g[1],g[3])):b=Jo(b,g)),!Ag(b))p.state=ge.EMPTY;else{for(var T=n.getTileRangeForExtentAndZ(b,p.sourceZ_),I=T.minX;I<=T.maxX;I++)for(var M=T.minY;M<=T.maxY;M++){var x=u(p.sourceZ_,I,M,A);x&&p.sourceTiles_.push(x)}p.sourceTiles_.length===0&&(p.state=ge.EMPTY)}return p}return e.prototype.getImage=function(){return this.canvas_},e.prototype.reproject_=function(){var t=[];if(this.sourceTiles_.forEach(function(u,c,h){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_=b4(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}(EF),CF=Nit,I4=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 pf(r,e,t,n,i){return i!==void 0?(i.minX=r,i.maxX=e,i.minY=t,i.maxY=n,i):new I4(r,e,t,n)}var BF=I4,Pit=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)}}(),Uit=function(r){Pit(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=_i(),n.tmpTileRange_=new BF(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=un(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!xs(o,a))return null;for(var s=n.pixelRatio,A=n.viewState.projection,l=n.viewState,u=i.getRenderSource(),c=u.getTileGridForProjection(l.projection),h=u.getTilePixelRatio(n.pixelRatio),f=c.getZForResolution(l.resolution);f>=c.getMinZoom();--f){var p=c.getTileCoordForCoordAndZ(a,f),v=u.getTile(f,p[1],p[2],s,A);if(!(v instanceof G_||v instanceof CF))return null;if(v.getState()===ge.LOADED){var m=c.getOrigin(f),g=Pi(c.getTileSize(f)),_=c.getResolution(f),E=Math.floor(h*((a[0]-m[0])/_-p[1]*g[0])),B=Math.floor(h*((m[1]-a[1])/_-p[2]*g[1]));return this.getImageData(v.getImage(),E,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,c=this.getLayer(),h=c.getSource(),f=h.getRevision(),p=h.getTileGridForProjection(o),v=p.getZForResolution(s,h.zDirection),m=p.getResolution(v),g=t.extent,_=i.extent&&Lo(i.extent);_&&(g=Jo(g,Lo(i.extent)));var E=h.getTilePixelRatio(u),B=Math.round(t.size[0]*E),L=Math.round(t.size[1]*E);if(l){var O=Math.round(Math.sqrt(B*B+L*L));B=O,L=O}var b=m*B/2/E,T=m*L/2/E,I=[A[0]-b,A[1]-T,A[0]+b,A[1]+T],M=p.getTileRangeForExtentAndZ(g,v),x={};x[v]={};var S=this.createLoadedTileFinder(h,o,x),N=this.tmpExtent,P=this.tmpTileRange_;this.newTiles_=!1;for(var X=M.minX;X<=M.maxX;++X)for(var z=M.minY;z<=M.maxY;++z){var tt=this.getTile(v,X,z,t);if(this.isDrawableTile(tt)){var J=pe(this);if(tt.getState()==ge.LOADED){x[v][tt.tileCoord.toString()]=tt;var nt=tt.inTransition(J);!this.newTiles_&&(nt||this.renderedTiles.indexOf(tt)===-1)&&(this.newTiles_=!0)}if(tt.getAlpha(J,t.time)===1)continue}var it=p.getTileCoordChildTileRange(tt.tileCoord,P,N),_t=!1;it&&(_t=S(v+1,it)),_t||p.forEachTileCoordParentTileRange(tt.tileCoord,S,P,N)}var R=m/s;$a(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/E,1/E,l,-B/2,-L/2);var $=FI(this.pixelTransform);this.useContainer(n,$,i.opacity,this.getBackground(t));var K=this.context,q=K.canvas;Kg(this.inversePixelTransform,this.pixelTransform),$a(this.tempTransform,B/2,L/2,R,R,0,-B/2,-L/2),q.width!=B||q.height!=L?(q.width=B,q.height=L):this.containerReused||K.clearRect(0,0,B,L),_&&this.clipUnrotated(K,t,_),h.getInterpolate()||de(K,Lp),this.preRender(K,t),this.renderedTiles.length=0;var at=Object.keys(x).map(Number);at.sort(Nu);var vt,wt,W;i.opacity===1&&(!this.containerReused||h.getOpaque(t.viewState.projection))?at=at.reverse():(vt=[],wt=[]);for(var It=at.length-1;It>=0;--It){var Ot=at[It],j=h.getTilePixelSize(Ot,u,o),Z=p.getResolution(Ot),ut=Z/m,rt=j[0]*ut*R,G=j[1]*ut*R,xt=p.getTileCoordForCoordAndZ(Rs(I),Ot),bt=p.getTileCoordExtent(xt),dt=un(this.tempTransform,[E*(bt[0]-I[0])/m,E*(I[3]-bt[3])/m]),Et=E*h.getGutterForProjection(o),yt=x[Ot];for(var St in yt){var tt=yt[St],Ft=tt.tileCoord,Mt=xt[1]-Ft[1],Vt=Math.round(dt[0]-(Mt-1)*rt),Yt=xt[2]-Ft[2],ie=Math.round(dt[1]-(Yt-1)*G),X=Math.round(dt[0]-Mt*rt),z=Math.round(dt[1]-Yt*G),ee=Vt-X,Xt=ie-z,oe=v===Ot,nt=oe&&tt.getAlpha(pe(this),t.time)!==1,Kt=!1;if(!nt)if(vt){W=[X,z,X+ee,z,X+ee,z+Xt,X,z+Xt];for(var Xe=0,Re=vt.length;Xe<Re;++Xe)if(v!==Ot&&Ot<wt[Xe]){var pr=vt[Xe];Mn([X,z,X+ee,z+Xt],[pr[0],pr[3],pr[4],pr[7]])&&(Kt||(K.save(),Kt=!0),K.beginPath(),K.moveTo(W[0],W[1]),K.lineTo(W[2],W[3]),K.lineTo(W[4],W[5]),K.lineTo(W[6],W[7]),K.moveTo(pr[6],pr[7]),K.lineTo(pr[4],pr[5]),K.lineTo(pr[2],pr[3]),K.lineTo(pr[0],pr[1]),K.clip())}vt.push(W),wt.push(Ot)}else K.clearRect(X,z,ee,Xt);this.drawTileImage(tt,t,X,z,ee,Xt,Et,oe),vt&&!nt?(Kt&&K.restore(),this.renderedTiles.unshift(tt)):this.renderedTiles.push(tt),this.updateUsedTiles(t.usedTiles,h,tt)}}this.renderedRevision=f,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!AA(this.renderedExtent_,I),this.renderedExtent_=I,this.renderedPixelRatio=u,this.renderedProjection=o,this.manageTilePyramid(t,h,p,u,o,g,v,c.getPreload()),this.scheduleExpireCache(t,h),this.postRender(K,t),i.extent&&K.restore(),de(K,x4),$!==q.style.transform&&(q.style.transform=$);var Ie=J6(i.opacity),xe=this.container;return Ie!==xe.style.opacity&&(xe.style.opacity=Ie),this.container},e.prototype.drawTileImage=function(t,n,i,a,o,s,A,l){var u=this.getTileImage(t);if(u){var c=pe(this),h=l?t.getAlpha(c,n.time):1,f=h!==this.context.globalAlpha;f&&(this.context.save(),this.context.globalAlpha=h),this.context.drawImage(u,A,A,u.width-2*A,u.height-2*A,i,a,o,s),f&&this.context.restore(),h!==1?n.animate=!0:l&&t.endTransition(c)}},e.prototype.getImage=function(){var t=this.context;return t?t.canvas:null},e.prototype.getTileImage=function(t){return t.getImage()},e.prototype.scheduleExpireCache=function(t,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 c=pe(n);c in t.wantedTiles||(t.wantedTiles[c]={});var h=t.wantedTiles[c],f=t.tileQueue,p=i.getMinZoom(),v=0,m,g,_,E,B,L;for(L=p;L<=A;++L)for(g=i.getTileRangeForExtentAndZ(s,L,g),_=i.getResolution(L),E=g.minX;E<=g.maxX;++E)for(B=g.minY;B<=g.maxY;++B)A-L<=l?(++v,m=n.getTile(L,E,B,a,o),m.getState()==ge.IDLE&&(h[m.getKey()]=!0,f.isKeyQueued(m.getKey())||f.enqueue([m,c,i.getTileCoordCenter(m.tileCoord),_])),u!==void 0&&u(m)):n.useTile(L,E,B,o);n.updateCacheSize(v,o)},e}(hF),F4=Uit,Dit=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)}}(),Qit=function(r){Dit(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new F4(this)},e}(B4),TF=Qit;const Hit={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 Git(r,e,t,n,i,a){return cn(),Vn("div")}var Ih=le(Hit,[["render",Git]]);const kit={extends:Ih,name:"ol-tile-layer",setup(r){const e=Ce("map"),t=Ce("overviewMap",null),{properties:n}=vr(r),i=hr(()=>new TF(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&&he(t,()=>{o(),a()}),Ze(()=>{a()}),ir(()=>{o()}),Mr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function $it(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var cS=le(kit,[["render",$it]]),Vit=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}(),L4=Vit,jit=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)}}(),Kit=function(r){jit(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}(EF),zit=Kit,Eg=34962,hw=34963,Yit=35040,SF=35044,D0=35048,Xit=5121,Wit=5123,qit=5125,O4=5126,eN=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function R4(r,e){for(var t=de({preserveDrawingBuffer:!0,antialias:!mY},e),n=eN.length,i=0;i<n;++i)try{var a=r.getContext(eN[i],t);if(a)return a}catch{}return null}var Zit={STATIC_DRAW:SF,STREAM_DRAW:Yit,DYNAMIC_DRAW:D0},Jit=function(){function r(e,t){this.array=null,this.type=e,_e(e===Eg||e===hw,62),this.usage=t!==void 0?t:Zit.STATIC_DRAW}return r.prototype.ofSize=function(e){this.array=new(LC(this.type))(e)},r.prototype.fromArray=function(e){var t=LC(this.type);this.array=t.from?t.from(e):new t(e)},r.prototype.fromArrayBuffer=function(e){this.array=new(LC(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 LC(r){switch(r){case Eg:return Float32Array;case hw:return Uint32Array;default:return Float32Array}}var Hv=Jit,tat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function M4(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 eat(r,e,t,n){M4(r,e,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t)}function rN(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;M4(o,e,a&&A);var u=t.byteLength/n[1],c=1;u%8===0?c=8:u%4===0?c=4:u%2===0&&(c=2);var h;switch(i){case 1:{h=o.LUMINANCE;break}case 2:{h=o.LUMINANCE_ALPHA;break}case 3:{h=o.RGB;break}case 4:{h=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,c),o.texImage2D(o.TEXTURE_2D,0,h,n[0],n[1],0,h,s,t),o.pixelStorei(o.UNPACK_ALIGNMENT,f)}var yv=null;function rat(){var r=document.createElement("canvas");r.width=1,r.height=1,yv=r.getContext("2d")}var nat=function(r){tat(e,r);function e(t){var n=r.call(this)||this;n.tile,n.textures=[],n.handleTileChange_=n.handleTileChange_.bind(n),n.size=Pi(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 Hv(Eg,SF);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 G_){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 G_||i instanceof CF){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=ja(s,A);i.interpolate||de(l,Lp),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,eat(n,u,a,i.interpolate);return}var c=[this.size[0]*this.tilePixelRatio_,this.size[1]*this.tilePixelRatio_],h=i.getData(),f=h instanceof Float32Array,p=c[0]*c[1],v=f?Float32Array:Uint8Array,m=v.BYTES_PER_ELEMENT,g=h.byteLength/c[1];this.bandCount=Math.floor(g/m/c[0]);var _=Math.ceil(this.bandCount/4);if(_===1){var u=n.createTexture();this.textures.push(u),rN(t,u,h,c,this.bandCount,i.interpolate);return}for(var E=new Array(_),B=0;B<_;++B){var u=n.createTexture();this.textures.push(u);var L=B<_-1?4:this.bandCount%4;E[B]=new v(p*L)}for(var O=0,b=0,T=c[0]*this.bandCount,I=0;I<c[1];++I){for(var M=0;M<T;++M){var x=h[b+M],S=Math.floor(O/this.bandCount),N=M%this.bandCount,B=Math.floor(N/4),P=E[B],L=P.length/p,X=N%4;P[S*L+X]=x,++O}b+=g/m}for(var B=0;B<_;++B){var u=this.textures[B],P=E[B],L=P.length/p;rN(t,u,P,c,L,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 zit){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)}yv||rat(),yv.clearRect(0,0,1,1);var u,c=this.tile.getImage();try{yv.drawImage(c,t,n,1,1,0,0,1,1),u=yv.getImageData(0,0,1,1).data}catch{return null}return u},e}(Th),iat=nat,Nm={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},aat=`
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);
}
`,oat=`
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;
}
`,sat=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||aat),t.compileShader(n);var i=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,e.fragmentShader||oat),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}(),nN=sat;function N4(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function Q0(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 Aat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Pf={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"},Yo={UNSIGNED_BYTE:Xit,UNSIGNED_SHORT:Wit,UNSIGNED_INT:qit,FLOAT:O4},k_={};function iN(r){return"shared/"+r}var aN=0;function lat(){var r="unique/"+aN;return aN+=1,r}function uat(r){var e=k_[r];if(!e){var t=document.createElement("canvas");t.style.position="absolute",t.style.left="0",e={users:0,canvas:t},k_[r]=e}return e.users+=1,e.canvas}function cat(r){var e=k_[r];if(e&&(e.users-=1,!(e.users>0))){var t=e.canvas,n=R4(t),i=n.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete k_[r]}}var hat=function(r){Aat(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?iN(i.canvasCacheKey):lat(),n.canvas_=uat(n.canvasCacheKey_),n.gl_=R4(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(Nm.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(Nm.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=oi(),n.offsetScaleMatrix_=oi(),n.tmpMat4_=N4(),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 nN({webGlContext:a,scaleRatio:o.scaleRatio,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,uniforms:o.uniforms})}):[new nN({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_===iN(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(Nm.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(Nm.RESTORED,this.boundHandleWebGLContextRestored_),cat(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=Nv(this.offsetScaleMatrix_);Pv(a,2/n[0],2/n[1]);var o=Nv(this.offsetRotateMatrix_);i!==0&&TY(o,-i),this.setUniformMatrixValue(Pf.OFFSET_SCALE_MATRIX,Q0(this.tmpMat4_,a)),this.setUniformMatrixValue(Pf.OFFSET_ROTATION_MATRIX,Q0(this.tmpMat4_,o)),this.setUniformFloatValue(Pf.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(Pf.ZOOM,t.viewState.zoom),this.setUniformFloatValue(Pf.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,Q0(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 Nv(n),$a(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=fat(t),i=0,a=0;a<t.length;a++){var o=t[a];this.enableAttributeArray_(o.name,o.size,o.type||O4,n,i),i+=o.size*P4(o.type)}},e.prototype.handleWebGLContextLost=function(){Bh(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,c=a.UNSIGNED_BYTE;return a.bindTexture(a.TEXTURE_2D,o),n?a.texImage2D(a.TEXTURE_2D,s,A,u,c,n):a.texImage2D(a.TEXTURE_2D,s,A,t[0],t[1],l,u,c,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}(V1);function fat(r){for(var e=0,t=0;t<r.length;t++){var n=r[t];e+=n.size*P4(n.type)}return e}function P4(r){switch(r){case Yo.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Yo.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Yo.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Yo.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var pat=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)}}(),OC={GENERATE_BUFFERS:"GENERATE_BUFFERS"},dat=function(r){pat(e,r);function e(t,n){var i=r.call(this,t)||this,a=n||{};return i.inversePixelTransform_=oi(),i.pixelContext_=null,i.postProcesses_=a.postProcesses,i.uniforms_=a.uniforms,i.helper,t.addChangeListener(Dr.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(ao.PRECOMPOSE)){var a=new Uv(ao.PRECOMPOSE,void 0,n,t);i.dispatchEvent(a)}},e.prototype.dispatchPostComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(ao.POSTCOMPOSE)){var a=new Uv(ao.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 c="map/"+t.mapId+"/group/"+i;(!this.helper||!this.helper.canvasCacheKeyMatches(c))&&(this.removeHelper(),this.helper=new hat({postProcesses:this.postProcesses_,uniforms:this.uniforms_,canvasCacheKey:c}),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)){$a(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var o=new Uv(t,this.inversePixelTransform_,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.dispatchRenderEvent_(ao.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(ao.POSTRENDER,t,n)},e.prototype.getDataAtPixel=function(t,n,i){var a=un([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=un(n.pixelToCoordinateTransform,t.slice());if(!xs(A,l))return null}var u=o.getContextAttributes();if(!u||!u.preserveDrawingBuffer)return new Uint8Array;var c=Math.round(a[0]),h=Math.round(a[1]),f=this.pixelContext_;if(!f){var p=document.createElement("canvas");p.width=1,p.height=1,f=p.getContext("2d"),this.pixelContext_=f}f.clearRect(0,0,1,1);var v;try{f.drawImage(o.canvas,c,h,1,1,0,0,1,1),v=f.getImageData(0,0,1,1).data}catch{return v}return v[3]===0?null:v},e}(GQ);function vat(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 gat(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 U4=dat;function Cg(r,e,t,n){return n!==void 0?(n[0]=r,n[1]=e,n[2]=t,n):[r,e,t]}function fw(r,e,t){return r+"/"+e+"/"+t}function Bg(r){return fw(r[0],r[1],r[2])}function yat(r){return r.split("/").map(Number)}function D4(r){return(r[1]<<r[0])+r[2]}function mat(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 _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)}}(),qe={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"},H0={TEXTURE_COORD:"a_textureCoord"},wat=[{name:H0.TEXTURE_COORD,size:2,type:Yo.FLOAT}],Eat={};function Cat(r){return 2*(1-1/(r+1))-1}function oN(r,e,t){t in r||(r[t]=[]),r[t].push(e)}function RC(r,e){var t=r.layerStatesArray[r.layerIndex];t.extent&&(e=Jo(e,Lo(t.extent,r.viewState.projection)));var n=t.layer.getRenderSource();if(!n.getWrapX()){var i=n.getTileGridForProjection(r.viewState.projection).getExtent();i&&(e=Jo(e,i))}return e}function MC(r,e){return"".concat(r.getKey(),",").concat(Bg(e))}var Bat=function(r){_at(e,r);function e(t,n){var i=r.call(this,t,{uniforms:n.uniforms})||this;i.renderComplete=!1,i.tileTransform_=oi(),i.tempMat4_=N4(),i.tempTileRange_=new BF(0,0,0,0),i.tempTileCoord_=Cg(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.indices_=new Hv(hw,SF),i.indices_.fromArray([0,1,3,1,2,3]);var a=n.cacheSize!==void 0?n.cacheSize:512;return i.tileTextureCache_=new L4(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||Vp(RC(t,t.extent))?!1:i.getState()===Da.READY},e.prototype.enqueueTiles=function(t,n,i,a){var o=t.viewState,s=this.getLayer(),A=s.getRenderSource(),l=A.getTileGridForProjection(o.projection),u=A.getTilePixelRatio(t.pixelRatio),c=A.getGutterForProjection(o.projection),h=pe(A);h in t.wantedTiles||(t.wantedTiles[h]={});for(var f=t.wantedTiles[h],p=this.tileTextureCache_,v=Math.max(i-s.getPreload(),l.getMinZoom(),s.getMinZoom()),m=i;m>=v;--m)for(var g=l.getTileRangeForExtentAndZ(n,m,this.tempTileRange_),_=l.getResolution(m),E=g.minX;E<=g.maxX;++E)for(var B=g.minY;B<=g.maxY;++B){var L=Cg(m,E,B,this.tempTileCoord_),O=MC(A,L),b=void 0,T=void 0;if(p.containsKey(O)&&(b=p.get(O),T=b.tile),!b||b.tile.key!==A.getKey())if(T=A.getTile(m,E,B,t.pixelRatio,o.projection),!b)b=new iat({tile:T,grid:l,helper:this.helper,tilePixelRatio:u,gutter:c}),p.set(O,b);else if(this.isDrawableTile_(T))b.setTile(T);else{var I=T.getInterimTile();b.setTile(I)}oN(a,b,m);var M=T.getKey();f[M]=!0,T.getState()===ge.IDLE&&(t.tileQueue.isKeyQueued(M)||t.tileQueue.enqueue([T,h,l.getTileCoordCenter(L),_]))}},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=RC(t,t.extent),l=s.getZForResolution(i.resolution,o.zDirection),u={};if(t.nextExtent){var c=s.getZForResolution(i.nextResolution,o.zDirection),h=RC(t,t.nextExtent);this.enqueueTiles(t,h,c,u)}this.enqueueTiles(t,A,l,u);for(var f={},p=pe(this),v=t.time,m=!1,g=u[l],_=0,E=g.length;_<E;++_){var B=g[_],L=B.tile,O=L.tileCoord;if(B.loaded){var b=L.getAlpha(p,v);if(b===1){L.endTransition(p);continue}m=!0;var T=Bg(O);f[T]=b}this.renderComplete=!1;var I=this.findAltTiles_(s,O,l+1,u);if(!I)for(var M=s.getMinZoom(),x=l-1;x>=M;--x){var S=this.findAltTiles_(s,O,x,u);if(S)break}}this.helper.useProgram(this.program_),this.helper.prepareDraw(t,!m);for(var N=Object.keys(u).map(Number).sort(Nu),P=i.center[0],X=i.center[1],z=0,tt=N.length;z<tt;++z)for(var J=N[z],nt=s.getResolution(J),it=Pi(s.getTileSize(J),this.tempSize_),_t=s.getOrigin(J),R=(P-_t[0])/(it[0]*nt),$=(_t[1]-X)/(it[1]*nt),K=i.resolution/nt,q=Cat(J),at=u[J],_=0,E=at.length;_<E;++_){var B=at[_];if(B.loaded){var L=B.tile,O=L.tileCoord,T=Bg(O),vt=O[1],wt=O[2];$a(this.tileTransform_,0,0,2/(t.size[0]*K/it[0]),-2/(t.size[1]*K/it[1]),i.rotation,-(R-vt),-($-wt)),this.helper.setUniformMatrixValue(qe.TILE_TRANSFORM,Q0(this.tempMat4_,this.tileTransform_)),this.helper.bindBuffer(B.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(wat);for(var W=0;W<B.textures.length;){var It="TEXTURE"+W,Ot="".concat(qe.TILE_TEXTURE_ARRAY,"[").concat(W,"]");n.activeTexture(n[It]),n.bindTexture(n.TEXTURE_2D,B.textures[W]),n.uniform1i(this.helper.getUniformLocation(Ot),W),++W}for(var j=0;j<this.paletteTextures_.length;++j){var Z=this.paletteTextures_[j];n.activeTexture(n["TEXTURE"+W]);var ut=Z.getTexture(n);n.bindTexture(n.TEXTURE_2D,ut),n.uniform1i(this.helper.getUniformLocation(Z.name),W),++W}var b=T in f?f[T]:1;b<1&&(t.animate=!0),this.helper.setUniformFloatValue(qe.TRANSITION_ALPHA,b),this.helper.setUniformFloatValue(qe.DEPTH,q),this.helper.setUniformFloatValue(qe.TEXTURE_PIXEL_WIDTH,it[0]),this.helper.setUniformFloatValue(qe.TEXTURE_PIXEL_HEIGHT,it[1]),this.helper.setUniformFloatValue(qe.TEXTURE_RESOLUTION,nt),this.helper.setUniformFloatValue(qe.TEXTURE_ORIGIN_X,_t[0]+vt*it[0]*nt),this.helper.setUniformFloatValue(qe.TEXTURE_ORIGIN_Y,_t[1]-wt*it[1]*nt),this.helper.setUniformFloatVec4(qe.RENDER_EXTENT,A),this.helper.setUniformFloatValue(qe.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(qe.ZOOM,i.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var rt=this.helper.getCanvas(),G=this.tileTextureCache_;G.canExpireCache();){var B=G.pop();B.dispose()}var xt=function(bt,dt){o.expireCache(dt.viewState.projection,Eat)};return t.postRenderFunctions.push(xt),this.postRender(n,t),rt},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=un(i.pixelToCoordinateTransform,t.slice()),s=i.viewState,A=a.getExtent();if(A&&!xs(Lo(A,s.projection),o))return null;var l=a.getRenderSource(),u=l.getTileGridForProjection(s.projection);if(!l.getWrapX()){var c=u.getExtent();if(c&&!xs(c,o))return null}for(var h=this.tileTextureCache_,f=u.getZForResolution(s.resolution);f>=u.getMinZoom();--f){var p=u.getTileCoordForCoordAndZ(o,f),v=MC(l,p);if(h.containsKey(v)){var m=h.get(v);if(m.loaded){var g=u.getOrigin(f),_=Pi(u.getTileSize(f)),E=u.getResolution(f),B=(o[0]-g[0])/E-p[1]*_[0],L=(g[1]-o[1])/E-p[2]*_[1];return m.getPixelData(B,L)}}}return null},e.prototype.findAltTiles_=function(t,n,i,a){var o=t.getTileRangeForTileCoordAndZ(n,i,this.tempTileRange_);if(!o)return!1;for(var s=!0,A=this.tileTextureCache_,l=this.getLayer().getRenderSource(),u=o.minX;u<=o.maxX;++u)for(var c=o.minY;c<=o.maxY;++c){var h=MC(l,[i,u,c]),f=!1;if(A.containsKey(h)){var p=A.get(h);p.loaded&&(oN(a,p,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}(U4),Tat=Bat,Sat=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}(),xat=Sat,Jt={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},nr={};function cA(r){if(typeof r=="number")return Jt.NUMBER;if(typeof r=="boolean")return Jt.BOOLEAN;if(typeof r=="string")return kY(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=nr[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.getReturnType(e.slice(1))}function bat(r){return G6(r)%1===0}function pw(r){var e=r.toString();return e.indexOf(".")===-1?e+".0":e}function Q4(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(pw).join(", "),")")}function Iat(r){var e=Du(r).slice();return e.length<4&&e.push(1),Q4(e.map(function(t,n){return n<3?t/255:t}))}function $_(r,e){return r.stringLiteralsMap[e]===void 0&&(r.stringLiteralsMap[e]=Object.keys(r.stringLiteralsMap).length),r.stringLiteralsMap[e]}function Fat(r,e){return pw($_(r,e))}function Ae(r,e,t){if(Array.isArray(e)&&typeof e[0]=="string"){var n=nr[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=cA(e);if((i&Jt.NUMBER)>0)return pw(e);if((i&Jt.BOOLEAN)>0)return e.toString();if((i&Jt.STRING)>0&&(t===void 0||t==Jt.STRING))return Fat(r,e.toString());if((i&Jt.COLOR)>0&&(t===void 0||t==Jt.COLOR))return Iat(e);if((i&Jt.NUMBER_ARRAY)>0)return Q4(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(t,")"))}function H4(r){if(!(cA(r)&Jt.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(r)," instead"))}function ui(r){for(var e=0;e<r.length;e++)H4(r[e])}function G4(r){if(!(cA(r)&Jt.STRING))throw new Error("A string value was expected, got ".concat(JSON.stringify(r)," instead"))}function xF(r){if(!(cA(r)&Jt.BOOLEAN))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(r)," instead"))}function _n(r,e){if(r.length!==e)throw new Error("Exactly ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function qu(r,e){if(r.length<e)throw new Error("At least ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function dw(r,e){if(r.length>e)throw new Error("At most ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function k4(r){if(r.length%2!==0)throw new Error("An even amount of arguments was expected, got ".concat(r," instead"))}function Lat(r){if(r.length%2===0)throw new Error("An odd amount of arguments was expected, got ".concat(r," instead"))}function bF(r,e){if(!bat(e))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(r)))}nr.get={getReturnType:function(r){return Jt.ANY},toGlsl:function(r,e){_n(e,1),G4(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 IF(r){return"u_var_"+r}nr.var={getReturnType:function(r){return Jt.ANY},toGlsl:function(r,e){_n(e,1),G4(e[0]);var t=e[0].toString();return r.variables.indexOf(t)===-1&&r.variables.push(t),IF(t)}};var $4="u_paletteTextures";nr.palette={getReturnType:function(r){return Jt.COLOR},toGlsl:function(r,e){_n(e,2),H4(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=j6(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 c="".concat($4,"[").concat(r.paletteTextures.length,"]"),h=new xat(c,a);return r.paletteTextures.push(h),"texture2D(".concat(c,", vec2((").concat(t," + 0.5) / ").concat(i,".0, 0.5))")}};var NC="getBandValue";nr.band={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){qu(e,1),dw(e,3);var t=e[0];if(!(NC 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(qe.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[NC]=`
float getBandValue(float band, float xOffset, float yOffset) {
float dx = xOffset / `.concat(qe.TEXTURE_PIXEL_WIDTH,`;
float dy = yOffset / `).concat(qe.TEXTURE_PIXEL_HEIGHT,`;
`).concat(n,`
}
`)}var l=Ae(r,t),u=Ae(r,e[1]||0),c=Ae(r,e[2]||0);return"".concat(NC,"(").concat(l,", ").concat(u,", ").concat(c,")")}};nr.time={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,0),"u_time"}};nr.zoom={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,0),"u_zoom"}};nr.resolution={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,0),"u_resolution"}};nr["*"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," * ").concat(Ae(r,e[1]),")")}};nr["/"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," / ").concat(Ae(r,e[1]),")")}};nr["+"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," + ").concat(Ae(r,e[1]),")")}};nr["-"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," - ").concat(Ae(r,e[1]),")")}};nr.clamp={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){_n(e,3),ui(e);var t=Ae(r,e[1]),n=Ae(r,e[2]);return"clamp(".concat(Ae(r,e[0]),", ").concat(t,", ").concat(n,")")}};nr["%"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,2),ui(e),"mod(".concat(Ae(r,e[0]),", ").concat(Ae(r,e[1]),")")}};nr["^"]={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,2),ui(e),"pow(".concat(Ae(r,e[0]),", ").concat(Ae(r,e[1]),")")}};nr.abs={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,1),ui(e),"abs(".concat(Ae(r,e[0]),")")}};nr.floor={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,1),ui(e),"floor(".concat(Ae(r,e[0]),")")}};nr.round={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,1),ui(e),"floor(".concat(Ae(r,e[0])," + 0.5)")}};nr.ceil={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,1),ui(e),"ceil(".concat(Ae(r,e[0]),")")}};nr.sin={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,1),ui(e),"sin(".concat(Ae(r,e[0]),")")}};nr.cos={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return _n(e,1),ui(e),"cos(".concat(Ae(r,e[0]),")")}};nr.atan={getReturnType:function(r){return Jt.NUMBER},toGlsl:function(r,e){return qu(e,1),dw(e,2),ui(e),e.length===2?"atan(".concat(Ae(r,e[0]),", ").concat(Ae(r,e[1]),")"):"atan(".concat(Ae(r,e[0]),")")}};nr[">"]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," > ").concat(Ae(r,e[1]),")")}};nr[">="]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," >= ").concat(Ae(r,e[1]),")")}};nr["<"]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," < ").concat(Ae(r,e[1]),")")}};nr["<="]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return _n(e,2),ui(e),"(".concat(Ae(r,e[0])," <= ").concat(Ae(r,e[1]),")")}};function V4(r){return{getReturnType:function(e){return Jt.BOOLEAN},toGlsl:function(e,t){_n(t,2);for(var n=Jt.ANY,i=0;i<t.length;i++)n&=cA(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),")")}}}nr["=="]=V4("==");nr["!="]=V4("!=");nr["!"]={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){return _n(e,1),xF(e[0]),"(!".concat(Ae(r,e[0]),")")}};function j4(r){return{getReturnType:function(e){return Jt.BOOLEAN},toGlsl:function(e,t){qu(t,2);for(var n=0;n<t.length;n++)xF(t[n]);var i="";return i=t.map(function(a){return Ae(e,a)}).join(" ".concat(r," ")),i="(".concat(i,")"),i}}}nr.all=j4("&&");nr.any=j4("||");nr.between={getReturnType:function(r){return Jt.BOOLEAN},toGlsl:function(r,e){_n(e,3),ui(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,")")}};nr.array={getReturnType:function(r){return Jt.NUMBER_ARRAY},toGlsl:function(r,e){qu(e,2),dw(e,4),ui(e);var t=e.map(function(n){return Ae(r,n,Jt.NUMBER)});return"vec".concat(e.length,"(").concat(t.join(", "),")")}};nr.color={getReturnType:function(r){return Jt.COLOR},toGlsl:function(r,e){qu(e,3),dw(e,4),ui(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(", "),")")}};nr.interpolate={getReturnType:function(r){for(var e=Jt.COLOR|Jt.NUMBER,t=3;t<r.length;t+=2)e=e&cA(r[t]);return e},toGlsl:function(r,e,t){k4(e),qu(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=nr.interpolate.getReturnType(e)&a;bF(e,o);for(var s=Ae(r,e[1]),A=pw(i),l="",u=2;u<e.length-2;u+=2){var c=Ae(r,e[u]),h=l||Ae(r,e[u+1],o),f=Ae(r,e[u+2]),p=Ae(r,e[u+3],o);l="mix(".concat(h,", ").concat(p,", pow(clamp((").concat(s," - ").concat(c,") / (").concat(f," - ").concat(c,"), 0.0, 1.0), ").concat(A,"))")}return l}};nr.match={getReturnType:function(r){for(var e=Jt.ANY,t=2;t<r.length;t+=2)e=e&cA(r[t]);return e=e&cA(r[r.length-1]),e},toGlsl:function(r,e,t){k4(e),qu(e,4);var n=t!==void 0?t:Jt.ANY,i=nr.match.getReturnType(e)&n;bF(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}};nr.case={getReturnType:function(r){for(var e=Jt.ANY,t=1;t<r.length;t+=2)e=e&cA(r[t]);return e=e&cA(r[r.length-1]),e},toGlsl:function(r,e,t){Lat(e),qu(e,3);var n=t!==void 0?t:Jt.ANY,i=nr.case.getReturnType(e)&n;bF(e,i);for(var a=0;a<e.length-1;a+=2)xF(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 Oat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function sN(r,e){var t=`
attribute vec2 `.concat(H0.TEXTURE_COORD,`;
uniform mat4 `).concat(qe.TILE_TRANSFORM,`;
uniform float `).concat(qe.TEXTURE_PIXEL_WIDTH,`;
uniform float `).concat(qe.TEXTURE_PIXEL_HEIGHT,`;
uniform float `).concat(qe.TEXTURE_RESOLUTION,`;
uniform float `).concat(qe.TEXTURE_ORIGIN_X,`;
uniform float `).concat(qe.TEXTURE_ORIGIN_Y,`;
uniform float `).concat(qe.DEPTH,`;
varying vec2 v_textureCoord;
varying vec2 v_mapCoord;
void main() {
v_textureCoord = `).concat(H0.TEXTURE_COORD,`;
v_mapCoord = vec2(
`).concat(qe.TEXTURE_ORIGIN_X," + ").concat(qe.TEXTURE_RESOLUTION," * ").concat(qe.TEXTURE_PIXEL_WIDTH,` * v_textureCoord[0],
`).concat(qe.TEXTURE_ORIGIN_Y," - ").concat(qe.TEXTURE_RESOLUTION," * ").concat(qe.TEXTURE_PIXEL_HEIGHT,` * v_textureCoord[1]
);
gl_Position = `).concat(qe.TILE_TRANSFORM," * vec4(").concat(H0.TEXTURE_COORD,", ").concat(qe.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 c={},h=n.variables.length;if(h>1&&!r.variables)throw new Error("Missing variables in style (expected ".concat(n.variables,")"));for(var f=function(E){var B=n.variables[E];if(!(B in r.variables))throw new Error("Missing '".concat(B,"' in style variables"));var L=IF(B);c[L]=function(){var O=r.variables[B];return typeof O=="string"&&(O=$_(n,O)),O!==void 0?O:-9999999}},p=0;p<h;++p)f(p);var v=Object.keys(c).map(function(E){return"uniform float ".concat(E,";")}),m=Math.ceil(e/4);v.push("uniform sampler2D ".concat(qe.TILE_TEXTURE_ARRAY,"[").concat(m,"];")),n.paletteTextures&&v.push("uniform sampler2D ".concat($4,"[").concat(n.paletteTextures.length,"];"));var g=Object.keys(n.functions).map(function(E){return n.functions[E]}),_=`
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
varying vec2 v_textureCoord;
varying vec2 v_mapCoord;
uniform vec4 `.concat(qe.RENDER_EXTENT,`;
uniform float `).concat(qe.TRANSITION_ALPHA,`;
uniform float `).concat(qe.TEXTURE_PIXEL_WIDTH,`;
uniform float `).concat(qe.TEXTURE_PIXEL_HEIGHT,`;
uniform float `).concat(qe.RESOLUTION,`;
uniform float `).concat(qe.ZOOM,`;
`).concat(v.join(`
`),`
`).concat(g.join(`
`),`
void main() {
if (
v_mapCoord[0] < `).concat(qe.RENDER_EXTENT,`[0] ||
v_mapCoord[1] < `).concat(qe.RENDER_EXTENT,`[1] ||
v_mapCoord[0] > `).concat(qe.RENDER_EXTENT,`[2] ||
v_mapCoord[1] > `).concat(qe.RENDER_EXTENT,`[3]
) {
discard;
}
vec4 color = texture2D(`).concat(qe.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(qe.TRANSITION_ALPHA,`;
}`);return{vertexShader:t,fragmentShader:_,uniforms:c,paletteTextures:n.paletteTextures}}var K4=function(r){Oat(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(Dr.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():Da.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=sN(this.style_,this.getSourceBandCount_());return new Tat(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,p){var v=o[f],m=v.getState();if(m==Da.LOADING){var g=function(){v.getState()==Da.READY&&(v.removeEventListener("change",g),i.changed())};v.addEventListener("change",g)}s=s&&m==Da.READY},l=0,u=o.length;l<u;++l)A(l);var c=this.renderSources(t,o);if(this.getRenderer().renderComplete&&s)return this.renderedResolution_=a.resolution,c;if(this.renderedResolution_>.5*a.resolution){var h=this.getSources(t.extent,this.renderedResolution_).filter(function(f){return!o.includes(f)});if(h.length>0)return this.renderSources(t,h)}return c},e.prototype.setStyle=function(t){this.styleVariables_=t.variables||{},this.style_=t;var n=sN(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}(B4);K4.prototype.dispose;var Rat=K4;const Mat={extends:Ih,name:"ol-webgl-tile-layer",setup(r){const e=Ce("map"),t=Ce("overviewMap",null),{properties:n}=vr(r),i=hr(()=>new Rat(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&&he(t,()=>{o(),a()}),Ze(()=>{a()}),ir(()=>{o()}),Mr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function Nat(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var hS=le(Mat,[["render",Nat]]),Pat=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)}}(),Uat=function(r){Pat(e,r);function e(t){var n=t||{};return r.call(this,n)||this}return e}(Sh),Dat=Uat,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(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=Jo(l,Lo(n.extent,a.projection))),!A[gn.ANIMATING]&&!A[gn.INTERACTING]&&!Vp(l))if(s){var u=a.projection,c=s.getImage(l,o,i,u);c&&(this.loadImage(c)?this.image_=c:c.getState()===$e.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=un(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!xs(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 c=Ai(s),h=Math.floor(A.height*((s[3]-a[1])/c));return h<0||h>=A.height?null:this.getImageData(A,u,h)},e.prototype.renderFrame=function(t,n){var i=this.image_,a=i.getExtent(),o=i.getResolution(),s=i.getPixelRatio(),A=t.layerStatesArray[t.layerIndex],l=t.pixelRatio,u=t.viewState,c=u.center,h=u.resolution,f=t.size,p=l*o/(h*s),v=Math.round(f[0]*l),m=Math.round(f[1]*l),g=u.rotation;if(g){var _=Math.round(Math.sqrt(v*v+m*m));v=_,m=_}$a(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,g,-v/2,-m/2),Kg(this.inversePixelTransform,this.pixelTransform);var E=FI(this.pixelTransform);this.useContainer(n,E,A.opacity,this.getBackground(t));var B=this.context,L=B.canvas;L.width!=v||L.height!=m?(L.width=v,L.height=m):this.containerReused||B.clearRect(0,0,v,m);var O=!1,b=!0;if(A.extent){var T=Lo(A.extent,u.projection);b=Mn(T,t.extent),O=b&&!Fo(T,t.extent),O&&this.clipUnrotated(B,t,T)}var I=i.getImage(),M=$a(this.tempTransform,v/2,m/2,p,p,0,s*(a[0]-c[0])/o,s*(c[1]-a[3])/o);this.renderedResolution=o*l/s;var x=I.width*M[0],S=I.height*M[3];if(this.getLayer().getSource().getInterpolate()||de(B,Lp),this.preRender(B,t),b&&x>=.5&&S>=.5){var N=M[4],P=M[5],X=A.opacity,z=void 0;X!==1&&(z=B.globalAlpha,B.globalAlpha=X),B.drawImage(I,0,0,+I.width,+I.height,Math.round(N),Math.round(P),Math.round(x),Math.round(S)),X!==1&&(B.globalAlpha=z)}return this.postRender(B,t),O&&B.restore(),de(B,x4),E!==L.style.transform&&(L.style.transform=E),this.container},e}(hF),Gat=Hat,kat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),$at=function(r){kat(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Gat(this)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Dat),z4=$at;const Vat={extends:Ih,name:"ol-image-layer",setup(r){const e=Ce("map"),{properties:t}=vr(r),n=new z4(t);return he(t,()=>{n.setProperties(t)}),Ze(()=>{e.addLayer(n)}),ir(()=>{e.removeLayer(n)}),Mr("imageLayer",n),{imageLayer:n}}};function jat(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var fS=le(Vat,[["render",jat]]);const Kat={extends:Ih,name:"ol-vector-layer",setup(r){const e=Ce("map"),{properties:t}=vr(r),n=hr(()=>new hA(t));return he(t,()=>{n.value.setProperties(t)}),Ze(()=>{e.addLayer(n.value)}),ir(()=>{e.removeLayer(n.value)}),Mr("vectorLayer",n),Mr("stylable",n),{vectorLayer:n}},props:{renderBuffer:{type:Number,default:100},updateWhileAnimating:{type:Boolean,default:!1},style:{type:Function},updateWhileInteracting:{type:Boolean,default:!1}}};function zat(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var pS=le(Kat,[["render",zat]]),Yat=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Xat=function(r){Yat(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=yat(t),i=n[0];this.forEach(function(a){a.tileCoord[0]!==i&&(this.remove(Bg(a.tileCoord)),a.release())}.bind(this))}},e}(L4),Y4=Xat,PC={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Wat=[0,0,0],Xl=5,qat=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,_e(pY(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_=Rs(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:GI,_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 BF(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=pf(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 pf(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 pf(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 pf(A,A,l,l,n);var u=Math.floor(s*(a+1))-1,c=Math.floor(s*(o+1))-1;return pf(A,u,l,c,n)}var h=this.getTileCoordExtent(e,this.tmpExtent_);return this.getTileRangeForExtentAndZ(h,t,n)},r.prototype.getTileRangeExtent=function(e,t,n){var i=this.getOrigin(e),a=this.getResolution(e),o=Pi(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 uo(s,l,A,u,n)},r.prototype.getTileRangeForExtentAndZ=function(e,t,n){var i=Wat;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),pf(a,i[1],o,i[2],n)},r.prototype.getTileCoordCenter=function(e){var t=this.getOrigin(e[0]),n=this.getResolution(e[0]),i=Pi(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=Pi(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 uo(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=Pi(this.getTileSize(o),this.tmpSize_),u=s*(e-A[0])/n/l[0],c=s*(A[1]-t)/n/l[1];return i?(u=lu(u,Xl)-1,c=lu(c,Xl)-1):(u=$f(u,Xl),c=$f(c,Xl)),Cg(o,u,c,a)},r.prototype.getTileCoordForXYAndZ_=function(e,t,n,i,a){var o=this.getOrigin(n),s=this.getResolution(n),A=Pi(this.getTileSize(n),this.tmpSize_),l=(e-o[0])/s/A[0],u=(o[1]-t)/s/A[1];return i?(l=lu(l,Xl)-1,u=lu(u,Xl)-1):(l=$f(l,Xl),u=$f(u,Xl)),Cg(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=j1(this.resolutions_,e,t||0);return xn(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}(),FF=qat;function X4(r){var e=r.getDefaultTileGrid();return e||(e=tot(r),r.setDefaultTileGrid(e)),e}function Zat(r,e,t){var n=e[0],i=r.getTileCoordCenter(e),a=vw(t);if(xs(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 Jat(r,e,t,n){var i=n!==void 0?n:cv.TOP_LEFT,a=q4(r,e,t);return new FF({extent:r,origin:P6(r,i),resolutions:a,tileSize:t})}function W4(r){var e=r||{},t=e.extent||Oe("EPSG:3857").getExtent(),n={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:q4(t,e.maxZoom,e.tileSize,e.maxResolution)};return new FF(n)}function q4(r,e,t,n){for(var i=e!==void 0?e:PX,a=Ai(r),o=Fr(r),s=Pi(t!==void 0?t:GI),A=n>0?n:Math.max(o/s[0],a/s[1]),l=i+1,u=new Array(l),c=0;c<l;++c)u[c]=A/Math.pow(2,c);return u}function tot(r,e,t,n){var i=vw(r);return Jat(i,e,t,n)}function vw(r){r=Oe(r);var e=r.getExtent();if(!e){var t=180*bs[Qa.DEGREES]/r.getMetersPerUnit();e=uo(-t,-t,t,t)}return e}var Z4=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)}}(),eot=function(r){Z4(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&&Pi(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),i),n.tileCache=new Y4(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,c=i.minX;c<=i.maxX;++c)for(var h=i.minY;h<=i.maxY;++h)l=fw(n,c,h),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 Be()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:X4(t)},e.prototype.getTileCacheForProjection=function(t){return _e(Ws(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=Pi(a.getTileSize(t),this.tmpSize);return o==1?s:mQ(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=Zat(a,t,i)),mat(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}(ow),rot=function(r){Z4(e,r);function e(t,n){var i=r.call(this,t)||this;return i.tile=n,i}return e}(fo),J4=eot;function not(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 c=u.getHeight()-o[2]-1;return c.toString()})}}function iot(r,e){for(var t=r.length,n=new Array(t),i=0;i<t;++i)n[i]=not(r[i],e);return V_(n)}function V_(r){return r.length===1?r[0]:function(e,t,n){if(e){var i=D4(e),a=Bu(i,r.length);return r[a](e,t,n)}else return}}function t8(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 aot=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){aot(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=PC.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],o=a==ge.ERROR?PC.TILELOADERROR:a==ge.LOADED?PC.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new rot(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=t8(t);this.urls=n,this.setUrls(n)},e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
`);this.generateTileUrlFunction_?this.setTileUrlFunction(iot(t,this.tileGrid),n):this.setKey(n)},e.prototype.tileUrlFunction=function(t,n,i){},e.prototype.useTile=function(t,n,i){var a=fw(t,n,i);this.tileCache.containsKey(a)&&this.tileCache.get(a)},e}(J4),sot=oot,Aot=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)}}(),lot=function(r){Aot(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:uot,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:G_,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&&!Ws(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&&!Ws(this.getProjection(),t)?!1:r.prototype.getOpaque.call(this,t)},e.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(this.tileGrid&&(!n||Ws(n,t)))return this.tileGrid;var i=pe(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=X4(t)),this.tileGridForProjection[i]},e.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||Ws(n,t))return this.tileCache;var i=pe(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new Y4(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,c=new this.tileClass(A,u!==void 0?ge.IDLE:ge.EMPTY,u!==void 0?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=s,c.addEventListener(ye.CHANGE,this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,n,i,a,o){var s=this.getProjection();if(!s||!o||Ws(s,o))return this.getTileInternal(t,n,i,a,s||o);var A=this.getTileCacheForProjection(o),l=[t,n,i],u=void 0,c=Bg(l);A.containsKey(c)&&(u=A.get(c));var h=this.getKey();if(u&&u.key==h)return u;var f=this.getTileGridForProjection(s),p=this.getTileGridForProjection(o),v=this.getTileCoordForTileUrlFunction(l,o),m=new CF(s,f,o,p,l,v,this.getTilePixelRatio(a),this.getGutter(),function(g,_,E,B){return this.getTileInternal(g,_,E,B,s)}.bind(this),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.getInterpolate());return m.key=h,u?(m.interimTile=u,m.refreshInterimChain(),A.replace(c,m)):A.set(c,m),m},e.prototype.getTileInternal=function(t,n,i,a,o){var s=null,A=fw(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=Oe(t);if(i){var a=pe(i);a in this.tileGridForProjection||(this.tileGridForProjection[a]=n)}}},e}(sot);function uot(r,e){r.getImage().src=e}var gw=lot,e8=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 cot(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){e8(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){e8(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 hot=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 fot(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 pot='<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>',dot=function(r){hot(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:Oe("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:Da.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 cot(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(Da.ERROR);return}var n=t.resourceSets[0].resources[0],i=this.maxZoom_==-1?n.zoomMax:this.maxZoom_,a=this.getProjection(),o=vw(a),s=this.hidpi_?2:1,A=n.imageWidth==n.imageHeight?n.imageWidth/s:[n.imageWidth/s,n.imageHeight/s],l=W4({extent:o,minZoom:n.zoomMin,maxZoom:i,tileSize:A});this.tileGrid=l;var u=this.culture_,c=this.hidpi_;if(this.tileUrlFunction=V_(n.imageUrlSubdomains.map(function(f){var p=[0,0,0],v=n.imageUrl.replace("{subdomain}",f).replace("{culture}",u);return function(m,g,_){if(m){Cg(m[0],m[1],m[2],p);var E=v;return c&&(E+="&dpi=d1&device=mobile"),E.replace("{quadkey}",fot(p))}else return}})),n.imageryProviders){var h=fh(Oe("EPSG:4326"),this.getProjection());this.setAttributions(function(f){var p=[],v=f.viewState,m=this.getTileGrid(),g=m.getZForResolution(v.resolution,this.zDirection),_=m.getTileCoordForCoordAndZ(v.center,g),E=_[0];return n.imageryProviders.map(function(B){for(var L=!1,O=B.coverageAreas,b=0,T=O.length;b<T;++b){var I=O[b];if(E>=I.zoomMin&&E<=I.zoomMax){var M=I.bbox,x=[M[1],M[0],M[3],M[2]],S=MI(x,h);if(Mn(S,f.extent)){L=!0;break}}}L&&p.push(B.attribution)}),p.push(pot),p}.bind(this))}this.setState(Da.READY)},e}(gw),vot=dot,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)}}(),yot=function(r){got(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:W4({extent:vw(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}(gw),r8=yot,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)}}(),_ot=function(r){mot(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=_i(),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();zc(u,t),Va(t,n,t);var c=this.source.getFeaturesInExtent(t).filter(function(h){var f=pe(h);return f in a?!1:(a[f]=!0,!0)});this.features.push(this.createCluster(c,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?X6(i,o.getCoordinates()):t.splice(a,1)}W6(i,1/t.length);var s=Sa(n),A=this.interpolationRatio,l=new fr([i[0]*(1-A)+s[0]*A,i[1]*(1-A)+s[1]*A]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new or({geometry:l,features:t})},e}(_l),n8=_ot,Zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wot(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 wa=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))},Pa={VERSION1:"version1",VERSION2:"version2",VERSION3:"version3"},gh={};gh[Pa.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"]}};gh[Pa.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"]}};gh[Pa.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"]}};gh.none={none:{supports:[],formats:[],qualities:[]}};var Eot=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,AN=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,Cot=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;function Bot(r){var e=r.getComplianceLevelSupportedFeatures();return e===void 0&&(e=gh[Pa.VERSION1].level0),{url:r.imageInfo["@id"]===void 0?void 0:r.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:wa(wa([],e.formats,!0),[r.imageInfo.formats===void 0?[]:r.imageInfo.formats],!1),qualities:wa(wa([],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 Tot(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:wa(wa([],e.supports,!0),n,!0),formats:wa(wa([],e.formats,!0),i,!0),qualities:wa(wa([],e.qualities,!0),a,!0)}}function Sot(r){var e=r.getComplianceLevelSupportedFeatures(),t=r.imageInfo.extraFormats===void 0?e.formats:wa(wa([],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 yi(["jpg","png","gif"],i)}).reduce(function(i,a){return i===void 0&&yi(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:wa(wa([],e.supports,!0),r.imageInfo.extraFeatures,!0),formats:t,qualities:r.imageInfo.extraQualities===void 0?e.qualities:wa(wa([],e.qualities,!0),r.imageInfo.extraQualities,!0),preferredFormat:n}}var yw={};yw[Pa.VERSION1]=Bot;yw[Pa.VERSION2]=Tot;yw[Pa.VERSION3]=Sot;var xot=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 Pa.VERSION1;case"http://iiif.io/api/image/2/context.json":return Pa.VERSION2;case"http://iiif.io/api/image/3/context.json":return Pa.VERSION3;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(Pa.VERSION1)&&this.imageInfo.identifier)return Pa.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 Pa.VERSION1:if(Eot.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Pa.VERSION3:if(Cot.test(this.imageInfo.profile))return this.imageInfo.profile;break;case Pa.VERSION2:if(typeof this.imageInfo.profile=="string"&&AN.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"&&AN.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?gh.none.none:gh[e][t]}},r.prototype.getTileSourceOptions=function(e){var t=e||{},n=this.getImageApiVersion();if(n!==void 0){var i=n===void 0?void 0:yw[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&&yi(i.formats,t.format)?t.format:i.preferredFormat!==void 0?i.preferredFormat:"jpg",supports:i.supports,quality:t.quality&&yi(i.qualities,t.quality)?t.quality:yi(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}(),bot=xot,Iot=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)}}(),Fot=function(r){Iot(e,r);function e(t,n,i,a,o,s,A){var l=this,u=t.getExtent(),c=n.getExtent(),h=c?Jo(i,c):i,f=Sa(h),p=wg(t,n,f,a),v=T4,m=new S4(t,n,h,u,p*v,a),g=m.calculateSourceExtent(),_=s(g,p,o),E=_?$e.IDLE:$e.EMPTY,B=_?_.getPixelRatio():1;return l=r.call(this,i,a,B,E)||this,l.targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=m,l.targetResolution_=a,l.targetExtent_=i,l.sourceImage_=_,l.sourcePixelRatio_=B,l.interpolate_=A,l.canvas_=null,l.sourceListenerKey_=null,l}return e.prototype.disposeInternal=function(){this.state==$e.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==$e.LOADED){var n=Fr(this.targetExtent_)/this.targetResolution_,i=Ai(this.targetExtent_)/this.targetResolution_;this.canvas_=b4(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==$e.IDLE){this.state=$e.LOADING,this.changed();var t=this.sourceImage_.getState();t==$e.LOADED||t==$e.ERROR?this.reproject_():(this.sourceListenerKey_=Pe(this.sourceImage_,ye.CHANGE,function(n){var i=this.sourceImage_.getState();(i==$e.LOADED||i==$e.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){Rr(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(kQ),Lot=Fot,i8=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)}}(),UC={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},Oot=function(r){i8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.image=n,i}return e}(fo),Rot=function(r){i8(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=j1(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||Ws(o,a))return o&&(a=o),this.getImageInternal(t,n,i,a);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&Ws(this.reprojectedImage_.getProjection(),a)&&this.reprojectedImage_.getResolution()==n&&AA(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new Lot(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 Be()},e.prototype.handleImageChange=function(t){var n=t.target,i;switch(n.getState()){case $e.LOADING:this.loading=!0,i=UC.IMAGELOADSTART;break;case $e.LOADED:this.loading=!1,i=UC.IMAGELOADEND;break;case $e.ERROR:this.loading=!1,i=UC.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new Oot(i,n))},e}(ow);function a8(r,e){r.getImage().src=e}var o8=Rot;function Op(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 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)}}(),Not=function(r){Mot(e,r);function e(t){var n=this,i=t.crossOrigin!==void 0?t.crossOrigin:null,a=t.imageLoadFunction!==void 0?t.imageLoadFunction:a8,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:Oe(t.projection)})||this,n.url_=t.url,n.imageExtent_=t.imageExtent,n.image_=new $Q(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 Mn(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(t){if(this.image_.getState()==$e.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=Ai(n),l=s/a,u=A/o,c=a,h=o;if(l>u?c=Math.round(s/u):h=Math.round(A/l),c!==a||h!==o){var f=ja(c,h);this.getInterpolate()||de(f,Lp);var p=f.canvas;f.drawImage(i,0,0,a,o,0,0,p.width,p.height),this.image_.setImage(p)}}r.prototype.handleImageChange.call(this,t)},e}(o8),Pot=Not,hu="1.3.0",fu={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"},Uot=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)}}(),Wl=4,lN=[101,101],Dot=function(r){Uot(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:a8,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=Oe(i),s=this.getProjection();s&&s!==o&&(n=wg(s,o,t,n),t=Qu(t,o,s));var A=Xc(t,n,0,lN),l={SERVICE:"WMS",VERSION:hu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};de(l,this.params_,a);var u=$f((t[0]-A[0])/n,Wl),c=$f((A[3]-t[1])/n,Wl);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(A,lN,1,s||o,l)}},e.prototype.getLegendUrl=function(t,n){if(this.url_!==void 0){var i={SERVICE:"WMS",VERSION:hu,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),Op(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=Sa(t),A=lu(Fr(t)/o,Wl),l=lu(Ai(t)/o,Wl),u=Xc(s,o,0,[A,l]),c=lu(this.ratio_*Fr(t)/o,Wl),h=lu(this.ratio_*Ai(t)/o,Wl),f=Xc(s,o,0,[c,h]),p=this.image_;if(p&&this.renderedRevision_==this.getRevision()&&p.getResolution()==n&&p.getPixelRatio()==i&&Fo(p.getExtent(),u))return p;var v={SERVICE:"WMS",VERSION:hu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};de(v,this.params_),this.imageSize_[0]=YR(Fr(f)/o,Wl),this.imageSize_[1]=YR(Ai(f)/o,Wl);var m=this.getRequestUrl_(f,this.imageSize_,i,a,v);return this.image_=new $Q(f,n,i,m,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 fu.GEOSERVER:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case fu.MAPSERVER:o.MAP_RESOLUTION=90*i;break;case fu.CARMENTA_SERVER:case fu.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(","),Op(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||hu;this.v13_=Y6(t,"1.3")>=0},e}(o8),Qot=Dot,Hot=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)}}(),Got='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',kot=function(r){Hot(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=[Got];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}(r8),$ot=kot,Vot=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)}}(),jot=function(r){Vot(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_=_i(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){var o=Oe(i),s=this.getProjection(),A=this.getTileGrid();A||(A=this.getTileGridForProjection(o));var l=A.getZForResolution(n,this.zDirection),u=A.getTileCoordForCoordAndZ(t,l);if(!(A.getResolutions().length<=u[0])){var c=A.getResolution(u[0]),h=A.getTileCoordExtent(u,this.tmpExtent_),f=Pi(A.getTileSize(u[0]),this.tmpSize),p=this.gutter_;p!==0&&(f=pM(f,p,this.tmpSize),h=Va(h,c*p,h)),s&&s!==o&&(c=wg(s,o,t,c),h=S_(h,o,s),t=Qu(t,o,s));var v={SERVICE:"WMS",VERSION:hu,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};de(v,this.params_,a);var m=Math.floor((t[0]-h[0])/c),g=Math.floor((h[3]-t[1])/c);return v[this.v13_?"I":"X"]=m,v[this.v13_?"J":"Y"]=g,this.getRequestUrl_(u,f,h,1,s||o,v)}},e.prototype.getLegendUrl=function(t,n){if(this.urls[0]!==void 0){var i={SERVICE:"WMS",VERSION:hu,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),Op(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 fu.GEOSERVER:var l=90*a+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+l:s.FORMAT_OPTIONS="dpi:"+l;break;case fu.MAPSERVER:s.MAP_RESOLUTION=90*a;break;case fu.CARMENTA_SERVER:case fu.QGIS:s.DPI=90*a;break;default:_e(!1,52);break}var u=o.getAxisOrientation(),c=i;if(this.v13_&&u.substr(0,2)=="ne"){var h=void 0;h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h}s.BBOX=c.join(",");var f;if(A.length==1)f=A[0];else{var p=Bu(D4(t),A.length);f=A[p]}return Op(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||hu;this.v13_=Y6(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=Pi(a.getTileSize(t[0]),this.tmpSize),l=this.gutter_;l!==0&&(A=pM(A,l,this.tmpSize),s=Va(s,o*l,s)),n!=1&&(A=mQ(A,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:hu,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return de(u,this.params_),this.getRequestUrl_(t,A,s,n,i,u)}},e}(gw),Kot=jot,Pm={KVP:"KVP",REST:"REST"},zot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Yot=function(r){zot(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}(FF),dS=Yot,Xot=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)}}(),Wot=function(r){Xot(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:Pm.KVP,o=t.tileGrid,s=t.urls;return s===void 0&&t.url!==void 0&&(s=t8(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=V_(s.map(n.createFromWMTSTemplate.bind(n)))),n}return e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
`);this.setTileUrlFunction(V_(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==Pm.KVP&&de(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=n==Pm.KVP?Op(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 c=t;return n==Pm.KVP?c=Op(c,u):c=c.replace(/\{(\w+?)\}/g,function(h,f){return u[f]}),c}else return}},e}(gw),s8=Wot;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 mw(r){const e=r.frameState,t=kp(r.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new fF(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 G0=F6.split(".");G0=parseInt(G0[0])*100+parseInt(G0[1]);var vS=function(r,e){var t=r.frameState.pixelRatio;if(G0>605&&t!==1&&e.getImage()instanceof ny){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},Fh=function(r){var e=r||{};hA.call(this,e),this.oldcluster=new _l,this.clusters=[],this.animation={start:!1},this.set("animationDuration",typeof e.animationDuration=="number"?e.animationDuration:700),this.set("animationMethod",e.animationMethod||ts),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(Fh,hA);Fh.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)}};Fh.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};Fh.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]};Fh.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=Va(s,100*t),a.cA=this.oldcluster.getFeaturesInExtent(s),a.cB=this.getSource().getFeaturesInExtent(s),a.revers=!1):(s=Va(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||mw(r),c=(o-a.start)/e;c>1&&(this.stopAnimation(),c=1),c=this.get("animationMethod")(c);var h=this.getStyle(),f=typeof h=="function"?h:h.length?function(){return h}:function(){return[h]};for(r.context.save(),r.context.globalAlpha=this.getOpacity(),n=0,l;l=a.clusters[n];n++){var p=l.f.getGeometry().getCoordinates(),v=p[0]-l.pt[0],m=p[1]-l.pt[1];a.revers?(p[0]=l.pt[0]+c*v,p[1]=l.pt[1]+c*m):(p[0]=p[0]-c*v,p[1]=p[1]-c*m);var g=f(l.f,t,!0);if(g.length||(g=[g]),l.f.get("features").length===1&&!v&&!m)A=l.f.get("features")[0];else{var _=new fr(p);A=new or(_)}for(var E=0,B;B=g[E];E++)if(B.getText()&&/\n/.test(B.getText().getText())){var L=B.getText().getOffsetX(),O=B.getText().getOffsetY(),b=B.getText().getRotation()||0,T=Number((B.getText().getFont()||"10px").match(/\d+/))*1.2,I=B.getText().getText().split(`
`),M,x=I.length-1,S=B.clone();I.forEach(function(N,P){switch(P==1&&(S.setImage(),S.setFill(),S.setStroke()),B.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":{M=x;break}case"hanging":case"top":{M=0;break}default:{M=x/2;break}}S.getText().setOffsetX(L-Math.sin(b)*T*(P-M)),S.getText().setOffsetY(O+Math.cos(b)*T*(P-M)),S.getText().setText(N),u.drawFeature(A,vS(r,S))})}else u.drawFeature(A,vS(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}}};Fh.prototype.postanimate=function(r){this.clip_&&(r.context.restore(),this.clip_=!1)};const qot={extends:Ih,name:"ol-animated-clusterlayer",setup(r){const e=Ce("map"),{properties:t}=vr(r),n=hr(()=>new Fh(Os(Un({},t),{source:new n8({distance:t.distance,geometryFunction:o=>o.getGeometry()})}))),i=hr(()=>n.value.getSource());return he(t,()=>{n.value.setProperties(t),n.value.changed()}),Ze(()=>{e.addLayer(n.value),n.value.changed(),e.changed()}),ir(()=>{e.removeLayer(n.value)}),Mr("vectorLayer",i),Mr("stylable",n),{vectorLayer:n,map:e}},props:{animationDuration:{type:Number,default:700},distance:{type:Number,default:20},animationMethod:{type:Function,default:ts},updateWhileAnimating:{type:Boolean,default:!1},updateWhileInteracting:{type:Boolean,default:!1}}};function Zot(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var gS=le(qot,[["render",Zot]]),Gs=new Uint8Array(4),Jot=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){yl(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 Gs[0]=0,Gs[1]=0,Gs[2]=0,Gs[3]=0,Gs;this.readAll();var n=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return Gs[0]=this.data_[n*4],Gs[1]=this.data_[n*4+1],Gs[2]=this.data_[n*4+2],Gs[3]=this.data_[n*4+3],Gs},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}(),tst=Jot;function est(){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 rst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),nst=function(r){rst(e,r);function e(t,n){var i=this,a=n.uniforms||{},o=oi();a[Pf.PROJECTION_MATRIX]=o,i=r.call(this,t,{uniforms:a,postProcesses:n.postProcesses})||this,i.ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new Hv(Eg,D0),i.hitVerticesBuffer_=new Hv(Eg,D0),i.indicesBuffer_=new Hv(hw,D0),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:Yo.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:Yo.FLOAT},{name:"a_index",size:1,type:Yo.FLOAT}].concat(s),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Yo.FLOAT},{name:"a_index",size:1,type:Yo.FLOAT},{name:"a_hitColor",size:4,type:Yo.FLOAT},{name:"a_featureUid",size:1,type:Yo.FLOAT}].concat(s),i.customAttributes=n.attributes?n.attributes:[],i.previousExtent_=_i(),i.currentTransform_=o,i.renderTransform_=oi(),i.invertRenderTransform_=oi(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=est(),i.worker_.addEventListener("message",function(l){var u=l.data;if(u.type===OC.GENERATE_BUFFERS){var c=u.projectionTransform;u.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(u.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=c,Kg(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,Oi.ADDFEATURE,i.handleSourceFeatureAdded_,i),Pe(A,Oi.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),Pe(A,Oi.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),Pe(A,Oi.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 tst(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[gn.ANIMATING]&&!t.viewHints[gn.INTERACTING],s=!AA(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,c=n instanceof aw?n.getRenderBuffer():0,h=Va(t.extent,c*u);i.loadFeatures(h,u,l),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),kp(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=oi();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,c=0,h;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],un(n,A),h=vat(c+6,l),this.renderInstructions_[u++]=A[0],this.renderInstructions_[u++]=A[1],this.hitDetectionEnabled_&&(this.hitRenderInstructions_[c++]=A[0],this.hitRenderInstructions_[c++]=A[1],this.hitRenderInstructions_[c++]=h[0],this.hitRenderInstructions_[c++]=h[1],this.hitRenderInstructions_[c++]=h[2],this.hitRenderInstructions_[c++]=h[3],this.hitRenderInstructions_[c++]=Number(f));for(var p=void 0,v=0;v<this.customAttributes.length;v++)p=this.customAttributes[v].callback(o.feature,o.properties),this.renderInstructions_[u++]=p,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[c++]=p)}var m={type:OC.GENERATE_BUFFERS,renderInstructions:this.renderInstructions_.buffer,customAttributesCount:this.customAttributes.length};if(m.projectionTransform=n,m.generateBuffersRun=++this.generateBuffersRun_,this.ready=!1,this.worker_.postMessage(m,[this.renderInstructions_.buffer]),this.renderInstructions_=null,this.hitDetectionEnabled_){var g={type:OC.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};g.projectionTransform=n,g.hitDetection=!0,this.worker_.postMessage(g,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){if(_e(this.hitDetectionEnabled_,66),!!this.hitRenderInstructions_){var s=un(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=gat(l),c=this.hitRenderInstructions_[u],h=Math.floor(c).toString(),f=this.getLayer().getSource(),p=f.getFeatureByUid(h);if(p)return a(p,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}(U4),A8=nst,ist=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 ast(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),c=Ae(A,i,Jt.NUMBER_ARRAY),h=Ae(A,s,Jt.NUMBER),f={inFragmentShader:!0,variables:A.variables,attributes:[],stringLiteralsMap:A.stringLiteralsMap,functions:{}},p=Ae(f,n,Jt.COLOR),v=Ae(f,o,Jt.NUMBER),m="1.0",g="vec2(".concat(Ae(f,t,Jt.NUMBER_ARRAY|Jt.NUMBER),").x");switch(e.symbolType){case"square":break;case"image":break;case"circle":m="(1.0-smoothstep(1.-4./".concat(g,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var _="(v_quadCoord*2.-1.)",E="(atan(".concat(_,".x,").concat(_,".y))");m="(1.0-smoothstep(.5-3./".concat(g,",.5,cos(floor(.5+").concat(E,"/2.094395102)*2.094395102-").concat(E,")*length(").concat(_,")))");break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var B=new ist().setSizeExpression("vec2(".concat(l,")")).setRotationExpression(h).setSymbolOffsetExpression(u).setTextureCoordinateExpression(c).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4(".concat(p,".rgb, ").concat(p,".a * ").concat(v," * ").concat(m,")"));if(r.filter){var L=Ae(f,r.filter,Jt.BOOLEAN);B.setFragmentDiscardExpression("!".concat(L))}var O={};if(f.variables.forEach(function(T){var I=IF(T);B.addUniform("float ".concat(I)),O[I]=function(){if(!r.variables||r.variables[T]===void 0)throw new Error("The following variable is missing from the style: ".concat(T));var M=r.variables[T];return typeof M=="string"&&(M=$_(A,M)),M!==void 0?M:-9999999}}),e.symbolType==="image"&&e.src){var b=new Image;b.crossOrigin=e.crossOrigin===void 0?"anonymous":e.crossOrigin,b.src=e.src,B.addUniform("sampler2D u_texture").setColorExpression(B.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),O.u_texture=b}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(I,M){var x=M[T];return typeof x=="string"&&(x=$_(A,x)),x!==void 0?x:-9999999}}}),uniforms:O}}var ost=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)}}(),sst=function(r){ost(e,r);function e(t){var n=this,i=de({},t);return n=r.call(this,i)||this,n.parseResult_=ast(t.style),n.styleVariables_=t.style.variables||{},n.hitDetectionDisabled_=!!t.disableHitDetection,n}return e.prototype.createRenderer=function(){return new A8(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}(Sh),Ast=sst;const lst={extends:Ih,name:"ol-webglpoints-layer",setup(r){const e=Ce("map"),{properties:t}=vr(r),n=hr(()=>new Ast(t));return he(t,()=>{n.value.setProperties(t)}),Ze(()=>{e.addLayer(n.value)}),ir(()=>{e.removeLayer(n.value)}),Mr("webglPointsLayer",n),{webglPointsLayer:n}},props:{disableHitDetection:{type:Boolean,default:!1},style:{type:Object,default:()=>({symbol:{symbolType:"circle",size:8,color:"#33AAFF",opacity:.9}})}}};function ust(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var yS=le(lst,[["render",ust]]),cst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ps={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},hst=["#00f","#0ff","#0f0","#ff0","#f00"],fst=function(r){cst(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(ps.GRADIENT,n.handleGradientChanged_),n.setGradient(i.gradient?i.gradient:hst),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(ps.BLUR)},e.prototype.getGradient=function(){return this.get(ps.GRADIENT)},e.prototype.getRadius=function(){return this.get(ps.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=pst(this.getGradient())},e.prototype.setBlur=function(t){this.set(ps.BLUR,t)},e.prototype.setGradient=function(t){this.set(ps.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(ps.RADIUS,t)},e.prototype.createRenderer=function(){return new A8(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.weightFunction_(t);return n!==void 0?xn(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(ps.RADIUS)+this.get(ps.BLUR))*2}.bind(this),u_blurSlope:function(){return this.get(ps.RADIUS)/Math.max(1,this.get(ps.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}(aw);function pst(r){for(var e=1,t=256,n=ja(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 l8=fst;const dst={extends:Ih,name:"ol-heatmap-layer",setup(r){const e=Ce("map"),{properties:t}=vr(r),n=hr(()=>new l8(t));return he(t,()=>{n.value.setProperties(t)}),Ze(()=>{e.addLayer(n.value)}),ir(()=>{e.removeLayer(n.value)}),Mr("heatmapLayer",n),Mr("stylable",n),{heatmapLayer:n}},props:{weight:{type:Function},extent:{type:Array},blur:{type:Number},radius:{type:Number}}};function vst(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var mS=le(dst,[["render",vst]]);function j_(r){j_.installed||(j_.installed=!0,r.component(cS.name,cS),r.component(hS.name,hS),r.component(fS.name,fS),r.component(pS.name,pS),r.component(gS.name,gS),r.component(yS.name,yS),r.component(mS.name,mS))}var gst=Object.freeze(Object.defineProperty({__proto__:null,default:j_,install:j_,TileLayer:cS,WebGLTileLayer:hS,ImageLayer:fS,VectorLayer:pS,AnimatedClusterLayer:gS,WebglPointsLayer:yS,HeatmapLayer:mS},Symbol.toStringTag,{value:"Module"}));const yst={name:"ol-source-xyz",setup(r){const e=Ce("tileLayer"),{properties:t}=vr(r);let n=hr(()=>new r8(t));return he(n,()=>{e.value.setSource(n.value)}),he(e,()=>{e.value.setSource(n.value)}),Ze(()=>{e.value.setSource(n.value)}),ir(()=>{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 mst(r,e,t,n,i,a){return dr("",!0)}var _S=le(yst,[["render",mst]]);const _st={name:"ol-source-osm",setup(r){const e=Ce("tileLayer"),{properties:t}=vr(r);let n=hr(()=>new $ot(t));return he(n,()=>{e.value.setSource(n.value)}),he(e,()=>{e.value.setSource(n.value)}),Ze(()=>{e.value.setSource(n.value)}),ir(()=>{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 wst(r,e,t,n,i,a){return dr("",!0)}var wS=le(_st,[["render",wst]]);const Est={name:"ol-source-image-static",setup(r){const e=Ce("imageLayer"),{properties:t}=vr(r),n=()=>new Pot(Os(Un({},t),{projection:typeof t.projection=="string"?t.projection:new ml(Un({},t.projection))}));let i=n();return he(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),Ze(()=>{e.setSource(i)}),ir(()=>{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 Cst(r,e,t,n,i,a){return dr("",!0)}var ES=le(Est,[["render",Cst]]);const Bst={name:"ol-source-wmts",setup(r){const e=Ce("tileLayer"),{properties:t}=vr(r),n=hr(()=>Oe(t.projection).getExtent()),i=hr(()=>Rs(n.value)),a=hr(()=>Fr(n.value)/256),o=hr(()=>{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 dS({origin:i.value,resolutions:A,matrixIds:l})}),s=hr(()=>new s8(Os(Un({},t),{projection:typeof t.projection=="string"?t.projection:new ml(Un({},t.projection)),tileGrid:o.value})));return he(s,()=>{e.value.setSource(s.value)}),he(e,()=>{e.value.setSource(s.value)}),Ze(()=>{e.value.setSource(s.value)}),ir(()=>{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 Tst(r,e,t,n,i,a){return dr("",!0)}var CS=le(Bst,[["render",Tst]]);const Sst={name:"ol-source-vector",setup(r){const e=Ce("vectorLayer")||Ce("heatmapLayer"),{properties:t}=vr(r);let n=hr(()=>new _l(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return he(t,()=>{i()}),he(e,()=>{i()}),Ze(()=>{e.value.setSource(n.value)}),ir(()=>{e.value.setSource(null)}),Mr("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 xst(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var BS=le(Sst,[["render",xst]]);const bst={name:"ol-source-cluster",setup(r){const e=Ce("vectorLayer"),{properties:t}=vr(r);let n=hr(()=>new n8(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return he(t,()=>{i()}),he(e,()=>{i()}),Ze(()=>{e.value.setSource(n.value),e.value.changed()}),ir(()=>{e.value.setSource(null)}),Mr("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 Ist(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var TS=le(bst,[["render",Ist]]);const Fst={name:"ol-source-bingmaps",setup(r){const e=Ce("tileLayer"),{properties:t}=vr(r);let n=hr(()=>new vot(Os(Un({},t),{key:t.apiKey})));return he(n,()=>{e.value.setSource(n.value)}),he(e,()=>{e.value.setSource(n.value)}),Ze(()=>{e.value.setSource(n.value)}),ir(()=>{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 Lst(r,e,t,n,i,a){return dr("",!0)}var SS=le(Fst,[["render",Lst]]);class zA extends s8{constructor(e){zA.layerLabelMap={vec:"cva",ter:"cta",img:"cia"},zA.layerZoomMap={vec:18,ter:14,img:18};let t=e||{};t.layerType=t.layerType||"vec",t.layerType=t.isLabel?zA.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||zA.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:zA.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"?zA.default4326TileGrid():zA.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 dS({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 dS({extent:[-200375083427892e-7,-200375083427892e-7,200375083427892e-7,200375083427892e-7],resolutions:e,matrixIds:t,origin:[-200375083427892e-7,200375083427892e-7],minZoom:1})}}const Ost={name:"ol-source-tianditu",setup(r){const e=Ce("tileLayer"),{properties:t}=vr(r);let n=hr(()=>new zA(t));return he(n,()=>{e.value.setSource(n.value)}),he(e,()=>{e.value.setSource(n.value)}),Ze(()=>{e.value.setSource(n.value)}),ir(()=>{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 Rst(r,e,t,n,i,a){return dr("",!0)}var xS=le(Ost,[["render",Rst]]);const Mst={name:"ol-source-image-wms",setup(r){const e=Ce("imageLayer"),{properties:t}=vr(r),n=()=>new Qot(Os(Un({},t),{params:{LAYERS:r.layers,STYLES:r.styles,TIME:r.time},projection:typeof t.projection=="string"?t.projection:new ml(Un({},t.projection))}));let i=n();return he(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),Ze(()=>{e.setSource(i)}),ir(()=>{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 Nst(r,e,t,n,i,a){return dr("",!0)}var bS=le(Mst,[["render",Nst]]);const Pst={name:"ol-source-webglpoints",setup(r){const e=Ce("webglPointsLayer"),{properties:t}=vr(r);let n=hr(()=>new _l(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return he(t,()=>{i()}),he(e,()=>{i()}),Ze(()=>{e.value.setSource(n.value)}),ir(()=>{e.value.setSource(null)}),Mr("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 Ust(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var IS=le(Pst,[["render",Ust]]);function K_(r){K_.installed||(K_.installed=!0,r.component(_S.name,_S),r.component(wS.name,wS),r.component(ES.name,ES),r.component(CS.name,CS),r.component(BS.name,BS),r.component(TS.name,TS),r.component(SS.name,SS),r.component(xS.name,xS),r.component(bS.name,bS),r.component(IS.name,IS))}var Dst=Object.freeze(Object.defineProperty({__proto__:null,default:K_,install:K_,SourceXYZ:_S,SourceOSM:wS,SourceImageStatic:ES,SourceWMTS:CS,SourceVector:BS,SourceCluster:TS,SourceTianDiTu:xS,SourceImageWMS:bS,SourceWebglPoints:IS,SourceBingMaps:SS},Symbol.toStringTag,{value:"Module"}));function Di(r,e,t){const n=Ce("map"),i=Ce("controlBar",null),a=i!=null?i.value:n,{properties:o}=vr(e);let s=hr(()=>new r(Un({},o)));return s.value.set("order",t.attrs.order==null?0:t.attrs.order),he(s,(A,l)=>{a.removeControl&&(a.removeControl(l),a.addControl(A),n.changed())}),Ze(()=>{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()}),ir(()=>{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 Qst={name:"ol-fullscreen-control",setup(r,e){const{control:t}=Di(oq,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 Hst(r,e,t,n,i,a){return dr("",!0)}var FS=le(Qst,[["render",Hst]]);const Gst={name:"ol-mouseposition-control",setup(r,e){const{control:t}=Di(lq,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:"&#160;"}}};function kst(r,e,t,n,i,a){return dr("",!0)}var LS=le(Gst,[["render",kst]]);const $st={name:"ol-attribution-control",setup(r,e){const{control:t}=Di(CQ,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 Vst(r,e,t,n,i,a){return dr("",!0)}var OS=le($st,[["render",Vst]]);const jst={name:"ol-overviewmap-control",setup(r,e){const t=Ce("map"),{control:n}=Di(pq,r,e);return Ze(()=>{n.value.setMap(t)}),ir(()=>{n.value.setMap(null)}),Mr("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 Kst(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var RS=le(jst,[["render",Kst]]);const zst={name:"ol-scaleline-control",setup(r,e){const{control:t}=Di(yq,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 Yst(r,e,t,n,i,a){return dr("",!0)}var MS=le(zst,[["render",Yst]]);const Xst={name:"ol-zoom-control",setup(r,e){const{control:t}=Di(TQ,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 Wst(r,e,t,n,i,a){return dr("",!0)}var NS=le(Xst,[["render",Wst]]);const qst={name:"ol-zoomslider-control",setup(r,e){const{control:t}=Di(wq,r,e);return{control:t}},props:{duration:{type:Number,default:200},className:{type:String,default:"ol-zoomslider"},render:{type:Function}}};function Zst(r,e,t,n,i,a){return dr("",!0)}var PS=le(qst,[["render",Zst]]);const Jst={name:"ol-zoomtoextent-control",setup(r,e){const{control:t}=Di(Bq,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 tAt(r,e,t,n,i,a){return dr("",!0)}var US=le(Jst,[["render",tAt]]);const eAt={name:"ol-rotate-control",setup(r,e){const{control:t}=Di(BQ,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 rAt(r,e,t,n,i,a){return dr("",!0)}var uN=le(eAt,[["render",rAt]]),u8={exports:{}},nAt=wot(XW);/*!
* 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(nAt)})(Zs,function(t){function n(I){return I&&typeof I=="object"&&"default"in I?I:{default:I}}var i=n(t),a="ol-ctx-menu",o={namespace:a,container:a+"-container",separator:a+"-separator",submenu:a+"-submenu",hidden:a+"-hidden",icon:a+"-icon",zoomIn:a+"-zoom-in",zoomOut:a+"-zoom-out",unselectable:"ol-unselectable"},s=o,A="beforeopen",l="open",u="close",c="contextmenu",h={width:150,scrollAt:4,eventType:c,defaultItems:!0},f=[{text:"Zoom In",classname:o.zoomIn+" "+o.icon,callback:function(I,M){var x=M.getView();x.animate({zoom:+x.getZoom()+1,duration:700,center:I.coordinate})}},{text:"Zoom Out",classname:o.zoomOut+" "+o.icon,callback:function(I,M){var x=M.getView();x.animate({zoom:+x.getZoom()-1,duration:700,center:I.coordinate})}}];function p(I,M){if(M===void 0&&(M="Assertion failed"),!I)throw typeof Error<"u"?new Error(M):M}function v(I){return/^\d+$/.test(I)}function m(I,M){return I.classList?I.classList.contains(M):B(M).test(I.className)}function g(I,M,x){M===void 0&&(M=window.document);var S=Array.prototype.slice,N=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(I))switch(I[0]){case"#":N=[_(I.substr(1))];break;case".":N=S.call(M.getElementsByClassName(I.substr(1).replace(/\./g," ")));break;default:N=S.call(M.getElementsByTagName(I))}else N=S.call(M.querySelectorAll(I));return x?N:N[0]}function _(I){return I=I[0]==="#"?I.substr(1,I.length):I,document.getElementById(I)}function E(I){var M=document.createDocumentFragment(),x=document.createElement("div");for(x.innerHTML=I;x.firstChild;)M.appendChild(x.firstChild);return M}function B(I){return new RegExp("(^|\\s+) "+I+" (\\s+|$)")}function L(I,M,x){I.classList?I.classList.add(M):I.className=(I.className+" "+M).trim(),x&&v(x)&&window.setTimeout(function(){return O(I,M)},x)}function O(I,M,x){I.classList?I.classList.remove(M):I.className=I.className.replace(B(M)," ").trim(),x&&v(x)&&window.setTimeout(function(){return L(I,M)},x)}var b=function(I){return this.Base=I,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:I.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};b.prototype.init=function(I){this.map=I,this.viewport=I.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},b.prototype.getItemsLength=function(){var I=this,M=0;return Object.keys(this.items).forEach(function(x){I.items[x].submenu||I.items[x].separator||M++}),M},b.prototype.getPixelClicked=function(){return this.pixelClicked},b.prototype.getCoordinateClicked=function(){return this.coordinateClicked},b.prototype.positionContainer=function(I){var M=this,x=this.Base.container,S=this.map.getSize(),N=S[1]-I[1],P=S[0]-I[0],X=x.offsetWidth,z=Math.round(this.lineHeight*this.getItemsLength()),tt=g("li."+s.submenu+">div",x,!0);P>=X?(x.style.right="auto",x.style.left=I[0]+5+"px"):(x.style.left="auto",x.style.right="15px"),N>=z?(x.style.bottom="auto",x.style.top=I[1]-10+"px"):(x.style.top="auto",x.style.bottom=0),function J(nt,it,_t){if(Array.isArray(nt))nt.forEach(function(K){return J(K,it,_t)});else for(var R=Array.isArray(it)?it:it.split(/\s+/),$=R.length;$--;)m(nt,R[$])&&O(nt,R[$],_t)}(x,s.hidden),tt.length&&(this.submenu.lastLeft=P<2*X?"-"+X+"px":this.submenu.left,tt.forEach(function(J){var nt,it,_t,R={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},$=(it=(nt=J).getBoundingClientRect(),_t=document.documentElement,{left:it.left+window.pageXOffset-_t.clientLeft,top:it.top+window.pageYOffset-_t.clientTop,width:nt.offsetWidth,height:nt.offsetHeight}),K=$.height,q=N-K;q<0&&(q=K-(R.h-$.top),J.style.top="-"+q+"px"),J.style.left=M.submenu.lastLeft}))},b.prototype.openMenu=function(I,M){this.Base.dispatchEvent({type:l,pixel:I,coordinate:M}),this.opened=!0,this.positionContainer(I)},b.prototype.closeMenu=function(){this.opened=!1,function I(M,x,S){if(Array.isArray(M))M.forEach(function(X){return I(X,x)});else for(var N=Array.isArray(x)?x:x.split(/\s+/),P=N.length;P--;)m(M,N[P])||L(M,N[P],S)}(this.Base.container,s.hidden),this.Base.dispatchEvent({type:u})},b.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},b.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},b.prototype.handleEvent=function(I){var M=this;this.coordinateClicked=this.map.getEventCoordinate(I),this.pixelClicked=this.map.getEventPixel(I),this.Base.dispatchEvent({type:A,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===c&&(I.stopPropagation(),I.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),I.target.addEventListener("pointerdown",{handleEvent:function(x){M.opened&&(M.closeMenu(),x.stopPropagation(),I.target.removeEventListener(x.type,this,!1))}},!1))},b.prototype.handleMapMoveEvent=function(I){this.closeMenu()},b.prototype.setItemListener=function(I,M){var x,S=this;I&&typeof this.items[M].callback=="function"&&(x=this.items[M].callback,I.addEventListener("click",function(N){N.preventDefault();var P={coordinate:S.getCoordinateClicked(),data:S.items[M].data||null};S.closeMenu(),x(P,S.map)},!1))};var T=function(I){return this.Base=I,this.Base.container=this.container=this.createContainer(!0),this};return T.prototype.createContainer=function(I){var M=document.createElement("div"),x=document.createElement("ul"),S=[s.container,s.unselectable];return I&&S.push(s.hidden),M.className=S.join(" "),M.style.width=parseInt(this.Base.options.width,10)+"px",M.appendChild(x),M},T.prototype.createMenu=function(){var I=[];if("items"in this.Base.options?I=this.Base.options.defaultItems?this.Base.options.items.concat(f):this.Base.options.items:this.Base.options.defaultItems&&(I=f),I.length===0)return!1;I.forEach(this.addMenuEntry,this)},T.prototype.addMenuEntry=function(I){var M,x=this;if(I.items&&Array.isArray(I.items)){I.classname=I.classname||"",M=s.submenu,~I.classname.indexOf(M)||(I.classname=I.classname.length?" "+s.submenu:s.submenu);var S=this.generateHtmlAndPublish(this.container,I),N=this.createContainer();N.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,S.appendChild(N),I.items.forEach(function(P){x.generateHtmlAndPublish(N,P,!0)})}else this.generateHtmlAndPublish(this.container,I)},T.prototype.generateHtmlAndPublish=function(I,M,x){var S,N,P="_"+Math.random().toString(36).substr(2,9),X=!1;return typeof M=="string"&&M.trim()==="-"?(S=E('<li id="'+P+'" class="'+s.separator+'"><hr></li>'),N=[].slice.call(S.childNodes,0)[0],I.firstChild.appendChild(S),X=!0):(M.classname=M.classname||"",S=E("<span>"+M.text+"</span>"),N=document.createElement("li"),M.icon&&(M.classname===""?M.classname=s.icon:M.classname.indexOf(s.icon)===-1&&(M.classname+=" "+s.icon),N.setAttribute("style","background-image:url("+M.icon+")")),N.id=P,N.className=M.classname,N.appendChild(S),I.firstChild.appendChild(N)),this.Base.Internal.items[P]={id:P,submenu:x||0,separator:X,callback:M.callback,data:M.data||null},this.Base.Internal.setItemListener(N,P),N},T.prototype.removeMenuEntry=function(I){var M=g("#"+I,this.container.firstChild);M&&this.container.firstChild.removeChild(M),delete this.Base.Internal.items[I]},T.prototype.cloneAndGetLineHeight=function(){var I=this.container.cloneNode(),M=E("<span>Foo</span>"),x=E("<span>Foo</span>"),S=document.createElement("li"),N=document.createElement("li");S.appendChild(M),N.appendChild(x),I.appendChild(S),I.appendChild(N),this.container.parentNode.appendChild(I);var P=I.offsetHeight/2;return this.container.parentNode.removeChild(I),P},function(I){function M(x){x===void 0&&(x={}),p(typeof x=="object","@param `opt_options` should be object type!"),this.options=function(S,N){var P={};for(var X in S)P[X]=S[X];for(var z in N)P[z]=N[z];return P}(h,x),this.disabled=!1,this.Internal=new b(this),this.Html=new T(this),I.call(this,{element:this.container})}return I&&(M.__proto__=I),M.prototype=Object.create(I&&I.prototype),M.prototype.constructor=M,M.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},M.prototype.close=function(){this.Internal.closeMenu()},M.prototype.enable=function(){this.disabled=!1},M.prototype.disable=function(){this.disabled=!0},M.prototype.getDefaultItems=function(){return f},M.prototype.countItems=function(){return Object.keys(this.Internal.items).length},M.prototype.extend=function(x){p(Array.isArray(x),"@param `arr` should be an Array."),x.forEach(this.push,this)},M.prototype.isOpen=function(){return this.Internal.opened},M.prototype.updatePosition=function(x){p(Array.isArray(x),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(x)},M.prototype.pop=function(){var x=Object.keys(this.Internal.items);this.Html.removeMenuEntry(x[x.length-1])},M.prototype.push=function(x){p(x!=null,"@param `item` must be informed."),this.Html.addMenuEntry(x)},M.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},M.prototype.setMap=function(x){I.prototype.setMap.call(this,x),x?this.Internal.init(x,this):this.Internal.removeListeners()},M}(i.default)})})(u8);var iAt=u8.exports;const aAt={name:"ol-context-menu",setup(r,e){const{control:t}=Di(iAt,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 oAt(r,e,t,n,i,a){return dr("",!0)}var DS=le(aAt,[["render",oAt]]),vo=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)),_r.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(vo,_r);vo.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(_r.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{}}};vo.prototype.isLayer_=function(r){for(var e=0;e<this.layers.length;e++)if(this.layers[e].layer===r)return e;return-1};vo.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{}}}};vo.prototype.removeLayers=function(){var r=[];this.layers.forEach(function(e){r.push(e.layer)}),this.removeLayer(r)};vo.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{}};vo.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")])};vo.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}}};vo.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};vo.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)}};vo.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()}};vo.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()}};vo.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 sAt={name:"ol-swipe-control",setup(r,e){const{control:t}=Di(vo,r,e),{layerList:n}=Lu(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 AAt(r,e,t,n,i,a){return dr("",!0)}var QS=le(sAt,[["render",AAt]]),Uo=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"),_r.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(Uo,_r);Uo.prototype.setVisible=function(r){r?this.element.style.display="":this.element.style.display="none"};Uo.prototype.getVisible=function(){return this.element.style.display!="none"};Uo.prototype.setMap=function(r){_r.prototype.setMap.call(this,r);for(var e=0;e<this.controls_.length;e++){var t=this.controls_[e];t.setMap(r)}};Uo.prototype.getControls=function(){return this.controls_};Uo.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}};Uo.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)};Uo.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)};Uo.prototype.getActiveControls=function(){for(var r=[],e=0,t;t=this.controls_[e];e++)t.getActive&&t.getActive()&&r.push(t);return r};Uo.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)};Uo.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}}}};Uo.prototype.getControlsByName=function(r){var e=this.getControls();return e.filter(function(t){return t.get("name")===r})};const lAt={name:"ol-control-bar",setup(r,e){const{control:t}=Di(Uo,r,e);return Mr("controlBar",t),{control:t}},props:{toggleOne:{type:Boolean,default:!0},group:{type:Boolean,default:!0}}};function uAt(r,e,t,n,i,a){return mr(r.$slots,"default")}var HS=le(lAt,[["render",uAt]]);window.ol&&(ol.ext.input={});var Lh=function(r){r=r||{},li.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(Lh,li);Lh.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)};Lh.prototype.setValue=function(r){r!==void 0&&(this.input.value=r),this.input.dispatchEvent(new Event("change"))};Lh.prototype.getValue=function(){return this.input.value};Lh.prototype.getInputElement=function(){return this.input};var Oh=function(r){r=r||{},Lh.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(Oh,Lh);Oh.prototype.isChecked=function(){return this.input.checked};var c8=function(r){r=r||{},Oh.call(this,r),this.element.className=("ol-ext-toggle-switch "+(r.className||"")).trim()};Cr(c8,Oh);var h8=function(r){r=r||{},Oh.call(this,r),this.element.className=("ol-ext-check ol-ext-radio "+(r.className||"")).trim()};Cr(h8,Oh);var ct={};ct.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)ct.create("OPTION",{html:i,value:e.options[i],parent:t});break}case"style":{this.setStyle(t,e.style);break}case"change":case"click":{ct.addListener(t,n,e[n]);break}case"on":{for(var a in e.on)ct.addListener(t,a,e.on[a]);break}case"checked":{t.checked=!!e.checked;break}default:{t.setAttribute(n,e[n]);break}}}return t};ct.createSwitch=function(r){var e=ct.create("INPUT",{type:"checkbox",on:r.on,click:r.click,change:r.change,parent:r.parent}),t=Object.assign({input:e},r||{});return new c8(t),e};ct.createCheck=function(r){var e=ct.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 h8(t):new Oh(t),e};ct.setHTML=function(r,e){e instanceof Element?r.appendChild(e):e!==void 0&&(r.innerHTML=e)};ct.appendText=function(r,e){r.appendChild(document.createTextNode(e||""))};ct.addListener=function(r,e,t,n){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(i){r.addEventListener(i,t,n)})};ct.removeListener=function(r,e,t){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(n){r.removeEventListener(n,t)})};ct.show=function(r){r.style.display=""};ct.hide=function(r){r.style.display="none"};ct.hidden=function(r){return ct.getStyle(r,"display")==="none"};ct.toggle=function(r){r.style.display=r.style.display==="none"?"":"none"};ct.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]}};ct.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};ct.outerHeight=function(r){return r.offsetHeight+ct.getStyle(r,"marginBottom")};ct.outerWidth=function(r){return r.offsetWidth+ct.getStyle(r,"marginLeft")};ct.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}};ct.getFixedOffset=function(r){var e={left:0,top:0},t=function(n){if(!n)return e;if(ct.getStyle(n,"position")==="absolute"&&ct.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)};ct.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)};ct.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,c,h=0,f=function(){E&&(h++,setTimeout(p))},p=function(){if(E){if(h--,h)return;var b=r.clientHeight,T=r.scrollHeight;u=b/T,E.style.height=u*100+"%",E.style.top=r.scrollTop/T*100+"%",_.style.height=b+"px",b>T-.5?_.classList.add("ol-100pc"):_.classList.remove("ol-100pc")}},v=function(b){b.target.classList.contains("ol-noscroll")||(l=!1,t=b[s],a=new Date,r.classList.add("ol-move"),b.preventDefault(),window.addEventListener("pointermove",m),ct.addListener(window,["pointerup","pointercancel"],L))},m=function(b){if(l=!0,t!==!1){var T=(c?-1/u:1)*(t-b[s]);r[A]+=T,i=new Date,i-a&&(n=(n+T/(i-a))/2),t=b[s],a=i,T&&o(!0)}},g=function(b){var T=b>0?Math.min(100,b/2):Math.max(-100,b/2);b-=T,r[A]+=T,-1<b&&b<1?(l?setTimeout(function(){r.classList.remove("ol-move")}):r.classList.remove("ol-move"),l=!1,o(!1)):setTimeout(function(){g(b)},40)},_,E;if(e.vertical&&e.minibar){var B=function(b){r.removeEventListener("pointermove",B),r.parentNode.classList.add("ol-miniscroll"),E=ct.create("DIV"),_=ct.create("DIV",{className:"ol-scroll",html:E}),r.parentNode.insertBefore(_,r),E.addEventListener("pointerdown",function(T){c=!0,v(T)}),e.mousewheel&&(ct.addListener(_,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){O(T)}),ct.addListener(E,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){O(T)})),r.parentNode.addEventListener("pointerenter",f),window.addEventListener("resize",f),b!==!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"),ct.addListener(r,["pointerdown"],function(b){c=!1,v(b)}),r.addEventListener("click",function(b){r.classList.contains("ol-move")&&(b.preventDefault(),b.stopPropagation())},!0);var L=function(b){a=new Date-a,a>100||c?n=0:a>0&&(n=((n||0)+(t-b[s])/a)/2),g(e.animate===!1?0:n*200),t=!1,n=0,a=0,r.classList.contains("ol-move")?r.classList.remove("ol-hasClick"):(r.classList.add("ol-hasClick"),setTimeout(function(){r.classList.remove("ol-hasClick")},500)),c=!1,window.removeEventListener("pointermove",m),ct.removeListener(window,["pointerup","pointercancel"],L)},O=function(b){var T=Math.max(-1,Math.min(1,b.wheelDelta||-b.detail));return r.classList.add("ol-move"),r[A]-=T*30,r.classList.remove("ol-move"),!1};return e.mousewheel&&ct.addListener(r,["mousewheel","DOMMouseScroll","onmousewheel"],O),{refresh:f}};ct.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 El=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),_r.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(El,_r);El.prototype.setVisible=function(r){r?ct.show(this.element):ct.hide(this.element)};El.prototype.setTitle=function(r){this.button_.setAttribute("title",r)};El.prototype.setHtml=function(r){ct.setHTML(this.button_,r)};El.prototype.getButtonElement=function(){return this.button_};var rs=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",El.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(rs,El);rs.prototype.setMap=function(r){!r&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),El.prototype.setMap.call(this,r),r&&(this.interaction_&&r.addInteraction(this.interaction_),this.subbar_&&r.addControl(this.subbar_))};rs.prototype.getSubBar=function(){return this.subbar_};rs.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_))};rs.prototype.getDisable=function(){var r=this.element.querySelector("button");return r&&r.disabled};rs.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}))};rs.prototype.getActive=function(){return this.element.classList.contains("ol-active")};rs.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)};rs.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}))};rs.prototype.setInteraction=function(r){this.interaction_=r};rs.prototype.getInteraction=function(){return this.interaction_};const cAt={name:"ol-control-toggle",setup(r,e){const{control:t}=Di(rs,r,e);return{control:t}},props:{html:{type:String},interaction:{type:Object},className:{type:String},title:{type:String},onToggle:{type:Function}}};function hAt(r,e,t,n,i,a){return dr("",!0)}var GS=le(cAt,[["render",hAt]]);const fAt={name:"ol-control-button",setup(r,e){const{control:t}=Di(El,r,e);return{control:t}},props:{html:{type:String},name:{type:String},className:{type:String},title:{type:String},handleClick:{type:Function}}};function pAt(r,e,t,n,i,a){return dr("",!0)}var kS=le(fAt,[["render",pAt]]),Ia=function(r){r=r||{},r.fullscreen&&(r.target=document.body);var e=ct.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=ct.create("FORM",{on:{submit:this._onButton("submit")},parent:e});ct.create("H2",{parent:t}),ct.create("DIV",{className:"ol-closebox",click:this._onButton("cancel"),parent:t}),ct.create("DIV",{className:"ol-content",parent:t}),this._progress=ct.create("DIV",{style:{display:"none"},parent:t});var n=ct.create("DIV",{className:"ol-progress-bar",parent:this._progress});this._progressbar=ct.create("DIV",{parent:n}),this._progressMessage=ct.create("DIV",{className:"ol-progress-message",parent:this._progress}),ct.create("DIV",{className:"ol-buttons",parent:t}),_r.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(Ia,_r);Ia.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))}}};Ia.prototype.open=function(){this.show()};Ia.prototype.setContentMessage=function(r){if(r!==void 0){var e=this.getContentElement();r instanceof Element&&ct.setHTML(e,""),ct.setHTML(e,r||"")}};Ia.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")};Ia.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&&ct.setHTML(e.querySelector(".ol-content"),""),ct.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)ct.create("INPUT",{type:i==="submit"?"submit":"button",value:n[i],click:this._onButton(i,r.onButton),parent:t})}else e.classList.remove("ol-button")}};Ia.prototype.getContentElement=function(){return this.element.querySelector("form .ol-content")};Ia.prototype.setProgress=function(r,e,t){if(r===!1){ct.setStyle(this._progress,{display:"none"});return}if(e>0?this.set("max",Number(e)):e=this.get("max"),!e)ct.setStyle(this._progress,{display:"none"});else{var n=Math.round(r/e*100);ct.setStyle(this._progress,{display:""}),this._progressbar.className=n?"":"notransition",ct.setStyle(this._progressbar,{width:n+"%"})}this._progressMessage.innerHTML="",ct.setHTML(this._progressMessage,t||"")};Ia.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};Ia.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};Ia.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})};Ia.prototype.close=Ia.prototype.hide;Ia.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")};var dAt=function(r){if(!r)return null;var e=r.getViewport().getElementsByClassName("ol-fixedoverlay")[0];return e||(r.getViewport().querySelector(".ol-layers")?(e=document.createElement("canvas"),e.className="ol-fixedoverlay",r.getViewport().querySelector(".ol-layers").after(e),r.on("precompose",function(t){e.width=r.getSize()[0]*t.frameState.pixelRatio,e.height=r.getSize()[1]*t.frameState.pixelRatio})):e=r.getViewport().querySelector("canvas")),e},Qi=function(r){r||(r={}),this.setStyle(r.style),_r.call(this,r)};Cr(Qi,_r);Qi.prototype.setMap=function(r){this.getCanvas(r);var e=this.getMap();if(this._listener&&(No(this._listener),this._listener=null),_r.prototype.setMap.call(this,r),e)try{e.renderSync()}catch{}r&&(this._listener=r.on("postcompose",this._draw.bind(this)))};Qi.prototype.getCanvas=function(r){return dAt(r)};Qi.prototype.getContext=function(r){var e=r.context;if(!e&&this.getMap()){var t=this.getMap().getViewport().getElementsByClassName("ol-fixedoverlay")[0];e=t?t.getContext("2d"):null}return e};Qi.prototype.setStyle=function(r){this._style=r||new oa({})};Qi.prototype.getStyle=function(){return this._style};Qi.prototype.getStroke=function(){var r=this._style.getStroke();return r||this._style.setStroke(new Ui({color:"#000",width:1.25})),this._style.getStroke()};Qi.prototype.getFill=function(){var r=this._style.getFill();return r||this._style.setFill(new Aa({color:"#fff"})),this._style.getFill()};Qi.prototype.getTextStroke=function(){var r=this._style.getText();return r||(r=new bh({})),r.getStroke()||r.setStroke(new Ui({color:"#fff",width:3})),r.getStroke()};Qi.prototype.getTextFill=function(){var r=this._style.getText();return r||(r=new bh({})),r.getFill()||r.setFill(new Aa({color:"#fff"})),r.getFill()};Qi.prototype.getTextFont=function(){var r=this._style.getText();return r||(r=new bh({})),r.getFont()||r.setFont("12px sans-serif"),r.getFont()};Qi.prototype._draw=function(){console.warn("[CanvasBase] draw function not implemented.")};function vAt(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=Pv(oi(),i,i);return new fF(r,i,o,s,0)}var Rp=function(r){r=r||{},li.call(this,r),r.feature&&this.set("feature",r.feature.clone())};Cr(Rp,li);Rp.prototype.setTitle=function(r){this.set("title",r||""),this.changed()};Rp.prototype.getElement=function(r,e){var t=ct.create("LI",{className:this.get("className"),click:function(n){e(!1),n.stopPropagation()},style:{height:r[1]+"px"},"aria-label":this.get("title")});return ct.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 la=function(r){r=r||{},li.call(this),this._items=new si;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){No(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=ct.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 bh({font:"16px sans-serif",fill:new Aa({color:"#333"}),backgroundFill:new Aa({color:"rgba(255,255,255,.8)"})}),this._title=new Rp({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(la,li);la.prototype.setTitle=function(r){this._title.setTitle(r),this.refresh()};la.prototype.getTitle=function(){return this._title.get("title")};la.prototype.getTextStyle=function(){return this._textStyle};la.prototype.set=function(r,e,t){li.prototype.set.call(this,r,e,t),t||this.refresh()};la.prototype.getListElement=function(){return this._listElement};la.prototype.getCanvas=function(){return this._canvas};la.prototype.setStyle=function(r){this._style=r,this.refresh()};la.prototype.addItem=function(r){r instanceof Rp?this._items.push(r):this._items.push(new Rp(r))};la.prototype.getItems=function(){return this._items};la.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()};la.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}};la.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=tl(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(h){this.dispatchEvent({type:"select",index:l,symbol:h,item:A})}.bind(this)));var c=A.getProperties();a.textAlign="left",c.feature||c.typeGeom?(i=this.getLegendImage(c,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(c.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})};la.prototype.getLegendImage=function(r,e,t){return r=r||{},la.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)};la.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(){la.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=vAt(s,{pixelRatio:o}),l=r.typeGeom,u,c=r.feature;!c&&l&&(/Point/.test(l)?c=new or(new fr([0,0])):/LineString/.test(l)?c=new or(new Hr([0,0])):c=new or(new bn([[0,0]])),r.properties&&c.setProperties(r.properties)),c?(u=c.getStyle(),typeof u=="function"&&(u=u(c)),u||(u=typeof r.style=="function"?r.style(c):r.style||[]),l=c.getGeometry().getType()):u=[],u instanceof Array||(u=[u]);var h=i/2,f=a/2,p=n[0]/2,v=n[1]/2,m,g;if(l==="Point"){var _=null;for(m=0;g=u[m];m++){var E=g.getImage();if(E){var B=E.getImage();if(B&&B.complete&&!B.naturalWidth&&(typeof r.onload=="function"&&B.addEventListener("load",function(){setTimeout(function(){r.onload()},100)}),E.load()),E.getAnchor){var L=E.getAnchor();if(L){var O=E.getSize(),b=L[0]-O[0],T=L[1]-O[1];_?Uu(_,[b,T,b+O[0],T+O[1]]):_=[b,T,b+O[0],T+O[1]]}}}}_&&(h=h+(_[2]+_[0])/2,f=f+(_[3]+_[1])/2)}for(f+=t*a||0,m=0;g=u[m];m++)switch(A.setStyle(g),l){case fr:case"Point":case"MultiPoint":A.drawGeometry(new fr([h,f]));break;case Hr:case"LineString":case"MultiLineString":s.save(),s.rect(r.margin*o,0,n[0]*o,e.height),s.clip(),A.drawGeometry(new Hr([[h-p,f],[h+p,f]])),s.restore();break;case bn:case"Polygon":case"MultiPolygon":A.drawGeometry(new bn([[[h-p,f-v],[h+p,f-v],[h+p,f+v],[h-p,f+v],[h-p,f-v]]]));break}return s.restore(),e};var Ms=function(r){r=r||{};var e=document.createElement("div");if(r.target)e.className=r.className||"ol-legend";else{e.className=(r.className||"ol-legend")+" ol-unselectable ol-control"+(r.collapsible===!1?" ol-uncollapsible":" ol-collapsed");var t=document.createElement("button");t.setAttribute("type","button"),t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t),t=document.createElement("button"),t.setAttribute("type","button"),t.className="ol-closebox",t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t)}Qi.call(this,{element:e,target:r.target}),this._legend=r.legend,this._legend.getCanvas().className="ol-legendImg",e.appendChild(this._legend.getCanvas()),e.appendChild(this._legend.getListElement()),r.collapsible!==!1&&r.collapsed===!1&&this.show(),this._legend.on("select",function(n){this.dispatchEvent(n)}.bind(this)),this._legend.on("refresh",function(){if(this._onCanvas&&this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this))};Cr(Ms,Qi);Ms.prototype.getLegend=function(){return this._legend};Ms.prototype.setCanvas=function(r){if(this._onCanvas=r,this.element.style.visibility=r?"hidden":"visible",this.getMap())try{this.getMap().renderSync()}catch{}};Ms.prototype.onCanvas=function(){return!!this._onCanvas};Ms.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=tl(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()}};Ms.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{}};Ms.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{}};Ms.prototype.collapse=function(r){r===!1?this.show():this.hide()};Ms.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")};Ms.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 Zu=function(r){r||(r={});var e=ct.create("DIV",{className:r.className||"ol-print"});r.target||(e.classList.add("ol-unselectable","ol-control"),ct.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e})),_r.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(Zu,_r);Zu.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)}};Zu.prototype.copyMap=function(r,e){this.once("print",function(t){this.toClipboard(t,e)}.bind(this)),this.print(r)};Zu.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,ct.getStyle(a.parentNode,"mix-blend-mode")==="multiply"&&(n.globalCompositeOperation="multiply");var o=ct.getStyle(a,"transform")||ct.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,ct.getStyle(a,"width"),ct.getStyle(a,"height")),n.restore()}}.bind(this))}return t};Zu.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())};Zu.prototype.print=function(r){r=r||{};var e=r.imageType||this.get("imageType"),t=r.quality||this.get("quality");if(this.getMap()){if(r.immediate!=="silent"&&this.dispatchEvent(Object.assign({type:"printing"},r)),!r.immediate){setTimeout(function(){r=Object.assign({},r),r.immediate="silent",this.print(r)}.bind(this),200);return}this.getMap().once(this.get("immediate")?"postcompose":"rendercomplete",function(n){var i=this._getCanvas(n,e),a=r.size||[210,297],o=r.format||"a4",s,A,l,u=r.orient||this.get("orientation"),c=typeof r.margin=="number"?r.margin:10;if(i){u!=="landscape"&&u!=="portrait"&&(u=i.width>i.height?"landscape":"portrait"),u==="landscape"&&(a=[a[1],a[0]]);var h=Math.min((a[0]-2*c)/i.width,(a[1]-2*c)/i.height);s=h*i.width,A=h*i.height,l=[(a[0]-s)/2,(a[1]-A)/2]}var f;try{f=i?i.toDataURL(e,t):null}catch{this.dispatchEvent({type:"error",canvas:i});return}var p=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(p)}.bind(this)),this.getMap().render()}};var Ju=function(r){r||(r={});var e=ct.create("DIV",{className:(r.className||"")+" ol-control-title ol-unselectable",style:{display:"block",visibility:"hidden"}});Qi.call(this,{element:e,style:r.style}),this.setTitle(r.title||""),this.setVisible(r.visible),this.element.style.font=this.getTextFont()};Cr(Ju,Qi);Ju.prototype.setStyle=function(r){Qi.prototype.setStyle.call(this,r),this.element&&(this.element.style.font=this.getTextFont()),this.getMap()&&this.getMap().render()};Ju.prototype.setTitle=function(r){if(this.element.textContent=r,this.set("title",r),this.getMap())try{this.getMap().renderSync()}catch{}};Ju.prototype.getTitle=function(){return this.get("title")};Ju.prototype.setVisible=function(r){if(this.element.style.display=r?"block":"none",this.getMap())try{this.getMap().renderSync()}catch{}};Ju.prototype.getVisible=function(){return this.element.style.display!=="none"};Ju.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=tl(this.getFill().getColor()),e.rect(0,0,s,o),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=tl(this.getTextFill().getColor()),e.strokeStyle=tl(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 $S=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=B_(Qu(i,n,"EPSG:4326"),Qu(o,n,"EPSG:4326"));return s*=(e||96)/.0254,s},gAt=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=B_(Qu(o,a,"EPSG:4326"),Qu(A,a,"EPSG:4326"));return l*=(t||96)/.0254,i.setResolution(i.getResolution()*n/l),n}},ul=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 Ui?new oa({stroke:r.style}):r.style;r.style||(t=new oa({stroke:new Ui({width:0})})),Qi.call(this,{element:e,style:t}),this.set("rotateVithView",r.rotateWithView!==!1),this.setVisible(r.visible!==!1),this.setImage(r.image||r.src)};Cr(ul,Qi);ul.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())};ul.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};ul.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};ul.prototype.getVisible=function(){return ct.getStyle(this.element,"display")==="block"};ul.prototype.setVisible=function(r){r?this.element.classList.add("ol-visible"):this.element.classList.remove("ol-visible"),this.getMap()&&this.getMap().render()};ul.prototype._draw=function(r){var e=this.getContext(r);if(!(!e||!this.getVisible())){var t=e.canvas,n,i=[];for(n=0;n<8;n++)i[n]=[Math.cos(Math.PI*n/8),Math.sin(Math.PI*n/8)];var a=r.frameState.pixelRatio;e.save(),e.scale(a,a);var o=this.element.clientWidth,s=this.element.clientHeight,A={left:this.element.offsetLeft,top:this.element.offsetTop},l=this.img_,u=r.frameState.viewState.rotation;if(e.beginPath(),e.translate(A.left+o/2,A.top+s/2),this.get("rotateVithView")&&e.rotate(u),this.getStroke().getWidth()){e.beginPath(),e.strokeStyle=this.getStroke().getColor(),e.lineWidth=this.getStroke().getWidth();var c=Math.max(t.width,t.height);for(n=0;n<8;n++)e.moveTo(-i[n][0]*c,-i[n][1]*c),e.lineTo(i[n][0]*c,i[n][1]*c);e.stroke()}l.width&&e.drawImage(l,-o/2,-s/2,o,s),e.closePath(),e.restore()}};var In=function(r){r||(r={}),this._lang=r.lang||"en";var e=ct.create("DIV",{className:(r.className||"ol-print")+" ol-unselectable ol-control"});ct.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e}),_r.call(this,{element:e}),r.openWindow&&this.on("print",function(S){S.canvas&&window.open().document.write('<img src="'+S.canvas.toDataURL()+'"/>')}),r.target=ct.create("DIV");var t=this._printCtrl=new Zu(r);t.on(["print","error","printing"],function(S){i.setAttribute("data-status",S.type),S.clipboard||this.dispatchEvent(S)}.bind(this)),this._compass=new ul({src:r.northImage||"compact",visible:!1,className:"olext-print-compass",style:new Ui({color:"#333",width:0})});var n=this._printDialog=new Ia({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),i=n.getContentElement();this._input={};var a=ct.create("DIV",{className:"ol-print-param",parent:i});this._pages=[ct.create("DIV",{className:"ol-page"})];var o=ct.create("DIV",{className:"ol-map",parent:this._pages[0]});ct.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:i}),ct.create("H2",{html:this.i18n("title"),parent:a});var s=ct.create("UL",{parent:a}),A=ct.create("LI",{className:"ol-orientation",parent:s});this._input.orientation={list:A};var l=ct.create("LABEL",{className:"portrait",parent:A});this._input.orientation.portrait=ct.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),ct.create("SPAN",{html:this.i18n("portrait"),parent:l}),l=ct.create("LABEL",{className:"landscape",parent:A}),this._input.orientation.landscape=ct.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),ct.create("SPAN",{html:this.i18n("landscape"),parent:l});var u;A=ct.create("LI",{html:ct.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:s});var c=this._input.size=ct.create("SELECT",{on:{change:function(){this.setSize(c.value||I)}.bind(this)},parent:A});for(u in this.paperSize)ct.create("OPTION",{html:u+(this.paperSize[u]?" - "+this.paperSize[u][0]+"x"+this.paperSize[u][1]+" mm":this.i18n("custom")),value:u,parent:c});A=ct.create("LI",{html:ct.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:s});var h=this._input.margin=ct.create("SELECT",{on:{change:function(){this.setMargin(h.value)}.bind(this)},parent:A});for(u in this.marginSize)ct.create("OPTION",{html:this.i18n(u)+" - "+this.marginSize[u]+" mm",value:this.marginSize[u],parent:h});A=ct.create("LI",{html:ct.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:s});var f=this._input.scale=ct.create("SELECT",{on:{change:function(){this.setScale(parseInt(f.value))}.bind(this)},parent:A});Object.keys(this.scales).forEach(function(S){ct.create("OPTION",{html:this.scales[S],value:S,parent:f})}.bind(this)),A=ct.create("LI",{className:"ol-legend",parent:s});var p=ct.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){x.legend.control.setCanvas(p.checked)}.bind(this)},parent:A});A=ct.create("LI",{className:"ol-print-north",parent:s});var v=this._input.north=ct.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=ct.create("LI",{className:"ol-print-title",parent:s});var m=ct.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(S){x.title.control.setVisible(S.target.checked)}.bind(this)},parent:A}),g=ct.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(S){S.keyCode===13&&S.preventDefault()},keyup:function(){x.title.control.setTitle(g.value)},change:function(){x.title.control.setTitle(g.value)}.bind(this)},parent:A}),_=ct.create("DIV",{className:"ol-user-param",parent:a});A=ct.create("LI",{className:"ol-saveas",parent:s});var E=ct.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),B=ct.create("SELECT",{on:{change:function(){if(this.formats[B.value].clipboard)t.copyMap(this.formats[B.value],function(P){P&&(E.classList.add("visible"),setTimeout(function(){E.classList.remove("visible")},1e3))});else{var S=typeof this.getSize()=="string"?this.getSize():null,N=Object.assign({format:S,size:S?this.paperSize[S]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[B.value]);t.print(N)}B.value=""}.bind(this)},parent:A});ct.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:B}),this.formats.forEach(function(S,N){if(S.pdf){if(r.pdf===!1)return}else if(S.clipboard){if(r.copy===!1)return}else if(r.save===!1)return;ct.create("OPTION",{html:this.i18n(S.title),value:N,parent:B})}.bind(this)),A=ct.create("LI",{className:"ol-savelegend",parent:s});var L=ct.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),O=ct.create("SELECT",{on:{change:function(){var S=x.legend.control.getLegend().getCanvas(),N=document.createElement("CANVAS");N.width=S.width,N.height=S.height;var P=N.getContext("2d");if(P.fillStyle="#fff",P.fillRect(0,0,N.width,N.height),P.drawImage(S,0,0),this.formats[O.value].clipboard)N.toBlob(function(_t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},_t.type,{value:_t,enumerable:!0}))]),L.classList.add("visible"),setTimeout(function(){L.classList.remove("visible")},1e3)}catch{}},"image/png");else{var X;try{X=N.toDataURL(this.formats[O.value].imageType,this.formats[O.value].quality);var z=typeof this.getSize()=="string"?this.getSize():"A4",tt=N.width/96*25.4,J=N.height/96*25.4,nt=this.paperSize[z];this.getOrientation()==="landscape"&&(nt=[nt[1],nt[0]]);var it=[(nt[0]-tt)/2,(nt[1]-J)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:z,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[z],position:it,imageWidth:tt,imageHeight:J},image:X,imageType:this.formats[O.value].imageType,pdf:this.formats[O.value].pdf,quality:this.formats[O.value].quality,canvas:N})}catch{}}O.value=""}.bind(this)},parent:A});ct.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:O}),this.formats.forEach(function(S,N){ct.create("OPTION",{html:this.i18n(S.title),value:N,parent:O})}.bind(this));var b=ct.create("DIV",{className:"ol-ext-buttons",parent:a});ct.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(S){S.preventDefault(),window.print()},parent:b}),ct.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){n.hide()},parent:b}),ct.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:a});var T,I,M,x={};n.on("show",function(){this.dispatchEvent({type:"show",userElement:_,dialog:this._printDialog,page:this.getPage()});var S=this.getMap();S&&(document.body.classList.add("ol-print-document"),T=S.getTargetElement(),I=S.getSize(),typeof this.getSize()=="string"?this.setSize(this.getSize()):this.setSize(I),S.setTarget(o),M&&No(M),M=S.on("moveend",function(){this.setScale($S(S))}.bind(this)),this.setScale($S(S)),x={},this.getMap().getControls().forEach(function(N){N instanceof Ms&&(x.legend={control:N}),N instanceof Ju&&(x.title={control:N}),N instanceof ul&&(x.compass?N.element.classList.remove("ol-print-compass"):(this._input.north.checked?N.element.classList.add("ol-print-compass"):N.element.classList.remove("ol-print-compass"),this._compass=N,x.compass={control:N}))}.bind(this)),x.title?(m.checked=x.title.isVisible=x.title.control.getVisible(),g.value=x.title.control.getTitle(),m.parentNode.parentNode.classList.remove("hidden")):m.parentNode.parentNode.classList.add("hidden"),x.legend?(x.legend.ison=x.legend.control.onCanvas(),x.legend.collapsed=x.legend.control.isCollapsed(),x.legend.control.collapse(!1),O.parentNode.classList.remove("hidden"),p.parentNode.parentNode.classList.remove("hidden"),p.checked=!x.legend.collapsed,x.legend.control.setCanvas(!x.legend.collapsed)):(O.parentNode.classList.add("hidden"),p.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,M&&No(M),x.title&&x.title.control.setVisible(x.title.isVisible),x.legend&&(x.legend.control.setCanvas(x.legend.ison),x.legend.control.collapse(x.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),r.saveAs&&this.on("print",function(S){S.pdf||S.canvas.toBlob(function(N){var P=(S.print.legend?"legend.":"map.")+S.imageType.replace("image/","");r.saveAs(N,P)},S.imageType,S.quality)}),r.jsPDF&&this.on("print",function(S){if(S.pdf){var N=new r.jsPDF({orientation:S.print.orientation,unit:S.print.unit,format:S.print.size});N.addImage(S.image,"JPEG",S.print.position[0],S.print.position[0],S.print.imageWidth,S.print.imageHeight),N.save(S.print.legend?"legend.pdf":"map.pdf")}})};Cr(In,_r);In.prototype.isOpen=function(){return this._printDialog.isOpen()};In.addLang=function(r,e){In.prototype._labels[r]=e};In.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};In.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:"取消"}};In.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]};In.prototype.marginSize={none:0,small:5,large:10};In.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}];In.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"};In.prototype.getOrientation=function(){return this._orientation||"portrait"};In.prototype.setOrientation=function(r){this._orientation=r==="landscape"?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()};In.prototype.getMargin=function(){return this._margin||0};In.prototype.setMargin=function(r){this._margin=r,this._input.margin.value=r,this.setSize()};In.prototype.getSize=function(){return this._size};In.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"})}};In.prototype.getContentElement=function(){return this._printDialog.getContentElement()};In.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")};In.prototype.getPage=function(){return this._pages[0]};In.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),_r.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))};In.prototype.setScale=function(r){gAt(this.getMap(),r),this._input.scale.value=" "+Math.round(r/100)*100};In.prototype.getScale=function(){return $S(this.getMap())};In.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()};In.prototype.getrintControl=function(){return this._printCtrl};var LF={exports:{}};(function(r,e){(function(t,n){n()})(Zs,function(){function t(l,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function n(l,u,c){var h=new XMLHttpRequest;h.open("GET",l),h.responseType="blob",h.onload=function(){A(h.response,u,c)},h.onerror=function(){console.error("could not download file")},h.send()}function i(l){var u=new XMLHttpRequest;u.open("HEAD",l,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(u)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Zs=="object"&&Zs.global===Zs?Zs:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,u,c){var h=o.URL||o.webkitURL,f=document.createElement("a");u=u||l.name||"download",f.download=u,f.rel="noopener",typeof l=="string"?(f.href=l,f.origin===location.origin?a(f):i(f.href)?n(l,u,c):a(f,f.target="_blank")):(f.href=h.createObjectURL(l),setTimeout(function(){h.revokeObjectURL(f.href)},4e4),setTimeout(function(){a(f)},0))}:"msSaveOrOpenBlob"in navigator?function(l,u,c){if(u=u||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(t(l,c),u);else if(i(l))n(l,u,c);else{var h=document.createElement("a");h.href=l,h.target="_blank",setTimeout(function(){a(h)})}}:function(l,u,c,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof l=="string")return n(l,u,c);var f=l.type==="application/octet-stream",p=/constructor/i.test(o.HTMLElement)||o.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||f&&p||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var E=m.result;E=v?E:E.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=E:location=E,h=null},m.readAsDataURL(l)}else{var g=o.URL||o.webkitURL,_=g.createObjectURL(l);h?h.location=_:location.href=_,h=null,setTimeout(function(){g.revokeObjectURL(_)},4e4)}});o.saveAs=A.saveAs=A,r.exports=A})})(LF);function tn(r){return tn=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},tn(r)}var Ga=Uint8Array,ka=Uint16Array,Tg=Uint32Array,_w=new Ga([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]),ww=new Ga([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]),VS=new Ga([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),f8=function(r,e){for(var t=new ka(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var i=new Tg(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]},p8=f8(_w,2),d8=p8[0],jS=p8[1];d8[28]=258,jS[258]=28;var v8=f8(ww,0),yAt=v8[0],cN=v8[1],KS=new ka(32768);for(var Sn=0;Sn<32768;++Sn){var ql=(Sn&43690)>>>1|(Sn&21845)<<1;ql=(ql&52428)>>>2|(ql&13107)<<2,ql=(ql&61680)>>>4|(ql&3855)<<4,KS[Sn]=((ql&65280)>>>8|(ql&255)<<8)>>>1}var oA=function(r,e,t){for(var n=r.length,i=0,a=new ka(e);i<n;++i)++a[r[i]-1];var o=new ka(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(t){s=new ka(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],c=o[r[i]-1]++<<u,h=c|(1<<u)-1;c<=h;++c)s[KS[c]>>>A]=l}else for(s=new ka(n),i=0;i<n;++i)s[i]=KS[o[r[i]-1]++]>>>15-r[i];return s},$u=new Ga(288);for(var Sn=0;Sn<144;++Sn)$u[Sn]=8;for(var Sn=144;Sn<256;++Sn)$u[Sn]=9;for(var Sn=256;Sn<280;++Sn)$u[Sn]=7;for(var Sn=280;Sn<288;++Sn)$u[Sn]=8;var Sg=new Ga(32);for(var Sn=0;Sn<32;++Sn)Sg[Sn]=5;var mAt=oA($u,9,0),_At=oA($u,9,1),wAt=oA(Sg,5,0),EAt=oA(Sg,5,1),DC=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},ds=function(r,e,t){var n=e/8>>0;return(r[n]|r[n+1]<<8)>>>(e&7)&t},QC=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},OF=function(r){return(r/8>>0)+(r&7&&1)},g8=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof ka?ka:r instanceof Tg?Tg:Ga)(t-e);return n.set(r.subarray(e,t)),n},CAt=function(r,e,t){var n=r.length,i=!e||t,a=!t||t.i;t||(t={}),e||(e=new Ga(n*3));var o=function(at){var vt=e.length;if(at>vt){var wt=new Ga(Math.max(vt*2,at));wt.set(e),e=wt}},s=t.f||0,A=t.p||0,l=t.b||0,u=t.l,c=t.d,h=t.m,f=t.n,p=n*8;do{if(!u){t.f=s=ds(r,A,1);var v=ds(r,A+1,3);if(A+=3,v)if(v==1)u=_At,c=EAt,h=9,f=5;else if(v==2){var E=ds(r,A,31)+257,B=ds(r,A+10,15)+4,L=E+ds(r,A+5,31)+1;A+=14;for(var O=new Ga(L),b=new Ga(19),T=0;T<B;++T)b[VS[T]]=ds(r,A+T*3,7);A+=B*3;var I=DC(b),M=(1<<I)-1;if(!a&&A+L*(I+7)>p)break;for(var x=oA(b,I,1),T=0;T<L;){var S=x[ds(r,A,M)];A+=S&15;var m=S>>>4;if(m<16)O[T++]=m;else{var N=0,P=0;for(m==16?(P=3+ds(r,A,3),A+=2,N=O[T-1]):m==17?(P=3+ds(r,A,7),A+=3):m==18&&(P=11+ds(r,A,127),A+=7);P--;)O[T++]=N}}var X=O.subarray(0,E),z=O.subarray(E);h=DC(X),f=DC(z),u=oA(X,h,1),c=oA(z,f,1)}else throw"invalid block type";else{var m=OF(A)+4,g=r[m-4]|r[m-3]<<8,_=m+g;if(_>n){if(a)throw"unexpected EOF";break}i&&o(l+g),e.set(r.subarray(m,_),l),t.b=l+=g,t.p=A=_*8;continue}if(A>p)throw"unexpected EOF"}i&&o(l+131072);for(var tt=(1<<h)-1,J=(1<<f)-1,nt=h+f+18;a||A+nt<p;){var N=u[QC(r,A)&tt],it=N>>>4;if(A+=N&15,A>p)throw"unexpected EOF";if(!N)throw"invalid length/literal";if(it<256)e[l++]=it;else if(it==256){u=null;break}else{var _t=it-254;if(it>264){var T=it-257,R=_w[T];_t=ds(r,A,(1<<R)-1)+d8[T],A+=R}var $=c[QC(r,A)&J],K=$>>>4;if(!$)throw"invalid distance";A+=$&15;var z=yAt[K];if(K>3){var R=ww[K];z+=QC(r,A)&(1<<R)-1,A+=R}if(A>p)throw"unexpected EOF";i&&o(l+131072);for(var q=l+_t;l<q;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=q}}t.l=u,t.p=A,t.b=l,u&&(s=1,t.m=h,t.d=c,t.n=f)}while(!s);return l==e.length?e:g8(e,0,l)},PA=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8},Kd=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},HC=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 Ga(0),0];if(i==1){var o=new Ga(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(L,O){return L.f-O.f}),t.push({s:-1,f:25001});var s=t[0],A=t[1],l=0,u=1,c=2;for(t[0]={s:-1,f:s.f+A.f,l:s,r:A};u!=i-1;)s=t[t[l].f<t[c].f?l++:c++],A=t[l!=u&&t[l].f<t[c].f?l++:c++],t[u++]={s:-1,f:s.f+A.f,l:s,r:A};for(var h=a[0].s,n=1;n<i;++n)a[n].s>h&&(h=a[n].s);var f=new ka(h+1),p=zS(t[u-1],f,0);if(p>e){var n=0,v=0,m=p-e,g=1<<m;for(a.sort(function(O,b){return f[b.s]-f[O.s]||O.f-b.f});n<i;++n){var _=a[n].s;if(f[_]>e)v+=g-(1<<p-f[_]),f[_]=e;else break}for(v>>>=m;v>0;){var E=a[n].s;f[E]<e?v-=1<<e-f[E]++-1:++n}for(;n>=0&&v;--n){var B=a[n].s;f[B]==e&&(--f[B],++v)}p=e}return[new Ga(f),p]},zS=function(r,e,t){return r.s==-1?Math.max(zS(r.l,e,t+1),zS(r.r,e,t+1)):e[r.s]=t},hN=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new ka(++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]},zd=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},k0=function(r,e,t){var n=t.length,i=OF(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},fN=function(r,e,t,n,i,a,o,s,A,l,u){PA(e,u++,t),++i[256];for(var c=HC(i,15),h=c[0],f=c[1],p=HC(a,15),v=p[0],m=p[1],g=hN(h),_=g[0],E=g[1],B=hN(v),L=B[0],O=B[1],b=new ka(19),T=0;T<_.length;++T)b[_[T]&31]++;for(var T=0;T<L.length;++T)b[L[T]&31]++;for(var I=HC(b,7),M=I[0],x=I[1],S=19;S>4&&!M[VS[S-1]];--S);var N=l+5<<3,P=zd(i,$u)+zd(a,Sg)+o,X=zd(i,h)+zd(a,v)+o+14+3*S+zd(b,M)+(2*b[16]+3*b[17]+7*b[18]);if(N<=P&&N<=X)return k0(e,u,r.subarray(A,A+l));var z,tt,J,nt;if(PA(e,u,1+(X<P)),u+=2,X<P){z=oA(h,f,0),tt=h,J=oA(v,m,0),nt=v;var it=oA(M,x,0);PA(e,u,E-257),PA(e,u+5,O-1),PA(e,u+10,S-4),u+=14;for(var T=0;T<S;++T)PA(e,u+3*T,M[VS[T]]);u+=3*S;for(var _t=[_,L],R=0;R<2;++R)for(var $=_t[R],T=0;T<$.length;++T){var K=$[T]&31;PA(e,u,it[K]),u+=M[K],K>15&&(PA(e,u,$[T]>>>5&127),u+=$[T]>>>12)}}else z=mAt,tt=$u,J=wAt,nt=Sg;for(var T=0;T<s;++T)if(n[T]>255){var K=n[T]>>>18&31;Kd(e,u,z[K+257]),u+=tt[K+257],K>7&&(PA(e,u,n[T]>>>23&31),u+=_w[K]);var q=n[T]&31;Kd(e,u,J[q]),u+=nt[q],q>3&&(Kd(e,u,n[T]>>>5&8191),u+=ww[q])}else Kd(e,u,z[n[T]]),u+=tt[n[T]];return Kd(e,u,z[256]),u+tt[256]},BAt=new Tg([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),TAt=new Ga(0),SAt=function(r,e,t,n,i,a){var o=r.length,s=new Ga(n+o+5*(1+Math.floor(o/7e3))+i),A=s.subarray(n,s.length-i),l=0;if(!e||o<8)for(var u=0;u<=o;u+=65535){var c=u+65535;c<o?l=k0(A,l,r.subarray(u,c)):(A[u]=a,l=k0(A,l,r.subarray(u,o)))}else{for(var h=BAt[e-1],f=h>>>13,p=h&8191,v=(1<<t)-1,m=new ka(32768),g=new ka(v+1),_=Math.ceil(t/3),E=2*_,B=function(ut){return(r[ut]^r[ut+1]<<_^r[ut+2]<<E)&v},L=new Tg(25e3),O=new ka(288),b=new ka(32),T=0,I=0,u=0,M=0,x=0,S=0;u<o;++u){var N=B(u),P=u&32767,X=g[N];if(m[P]=X,g[N]=P,x<=u){var z=o-u;if((T>7e3||M>24576)&&z>423){l=fN(r,A,0,L,O,b,I,M,S,u-S,l),M=T=I=0,S=u;for(var tt=0;tt<286;++tt)O[tt]=0;for(var tt=0;tt<30;++tt)b[tt]=0}var J=2,nt=0,it=p,_t=P-X&32767;if(z>2&&N==B(u-_t))for(var R=Math.min(f,z)-1,$=Math.min(32767,u),K=Math.min(258,z);_t<=$&&--it&&P!=X;){if(r[u+J]==r[u+J-_t]){for(var q=0;q<K&&r[u+q]==r[u+q-_t];++q);if(q>J){if(J=q,nt=_t,q>R)break;for(var at=Math.min(_t,q-2),vt=0,tt=0;tt<at;++tt){var wt=u-_t+tt+32768&32767,W=m[wt],It=wt-W+32768&32767;It>vt&&(vt=It,X=wt)}}}P=X,X=m[P],_t+=P-X+32768&32767}if(nt){L[M++]=268435456|jS[J]<<18|cN[nt];var Ot=jS[J]&31,j=cN[nt]&31;I+=_w[Ot]+ww[j],++O[257+Ot],++b[j],x=u+J,++T}else L[M++]=r[u],++O[r[u]]}}l=fN(r,A,a,L,O,b,I,M,S,u-S,l),a||(l=k0(A,l,TAt))}return g8(s,0,n+OF(l)+i)},xAt=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}}},bAt=function(r,e,t,n,i){return SAt(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)},IAt=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},FAt=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)},LAt=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 YS(r,e){e===void 0&&(e={});var t=xAt();t.p(r);var n=bAt(r,e,2,4);return FAt(n,e),IAt(n,n.length-4,t.d()),n}function OAt(r,e){return CAt((LAt(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 He=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function GC(){He.console&&typeof He.console.log=="function"&&He.console.log.apply(He.console,arguments)}var ln={log:GC,warn:function(r){He.console&&(typeof He.console.warn=="function"?He.console.warn.apply(He.console,arguments):GC.call(null,arguments))},error:function(r){He.console&&(typeof He.console.error=="function"?He.console.error.apply(He.console,arguments):GC(r))}};function kC(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){bc(n.response,e,t)},n.onerror=function(){ln.error("could not download file")},n.send()}function pN(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function Um(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 Gv,XS,bc=He.saveAs||((typeof window>"u"?"undefined":tn(window))!=="object"||window!==He?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=He.URL||He.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?pN(i.href)?kC(r,e,t):Um(i,i.target="_blank"):Um(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){Um(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(pN(r))kC(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){Um(n)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:tn(a)!=="object"&&(ln.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 kC(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(He.HTMLElement)||He.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":tn(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=He.URL||He.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 y8(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 $C(r,e){var t=r[0],n=r[1],i=r[2],a=r[3];t=pa(t,n,i,a,e[0],7,-680876936),a=pa(a,t,n,i,e[1],12,-389564586),i=pa(i,a,t,n,e[2],17,606105819),n=pa(n,i,a,t,e[3],22,-1044525330),t=pa(t,n,i,a,e[4],7,-176418897),a=pa(a,t,n,i,e[5],12,1200080426),i=pa(i,a,t,n,e[6],17,-1473231341),n=pa(n,i,a,t,e[7],22,-45705983),t=pa(t,n,i,a,e[8],7,1770035416),a=pa(a,t,n,i,e[9],12,-1958414417),i=pa(i,a,t,n,e[10],17,-42063),n=pa(n,i,a,t,e[11],22,-1990404162),t=pa(t,n,i,a,e[12],7,1804603682),a=pa(a,t,n,i,e[13],12,-40341101),i=pa(i,a,t,n,e[14],17,-1502002290),t=da(t,n=pa(n,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=da(a,t,n,i,e[6],9,-1069501632),i=da(i,a,t,n,e[11],14,643717713),n=da(n,i,a,t,e[0],20,-373897302),t=da(t,n,i,a,e[5],5,-701558691),a=da(a,t,n,i,e[10],9,38016083),i=da(i,a,t,n,e[15],14,-660478335),n=da(n,i,a,t,e[4],20,-405537848),t=da(t,n,i,a,e[9],5,568446438),a=da(a,t,n,i,e[14],9,-1019803690),i=da(i,a,t,n,e[3],14,-187363961),n=da(n,i,a,t,e[8],20,1163531501),t=da(t,n,i,a,e[13],5,-1444681467),a=da(a,t,n,i,e[2],9,-51403784),i=da(i,a,t,n,e[7],14,1735328473),t=va(t,n=da(n,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=va(a,t,n,i,e[8],11,-2022574463),i=va(i,a,t,n,e[11],16,1839030562),n=va(n,i,a,t,e[14],23,-35309556),t=va(t,n,i,a,e[1],4,-1530992060),a=va(a,t,n,i,e[4],11,1272893353),i=va(i,a,t,n,e[7],16,-155497632),n=va(n,i,a,t,e[10],23,-1094730640),t=va(t,n,i,a,e[13],4,681279174),a=va(a,t,n,i,e[0],11,-358537222),i=va(i,a,t,n,e[3],16,-722521979),n=va(n,i,a,t,e[6],23,76029189),t=va(t,n,i,a,e[9],4,-640364487),a=va(a,t,n,i,e[12],11,-421815835),i=va(i,a,t,n,e[15],16,530742520),t=ga(t,n=va(n,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=ga(a,t,n,i,e[7],10,1126891415),i=ga(i,a,t,n,e[14],15,-1416354905),n=ga(n,i,a,t,e[5],21,-57434055),t=ga(t,n,i,a,e[12],6,1700485571),a=ga(a,t,n,i,e[3],10,-1894986606),i=ga(i,a,t,n,e[10],15,-1051523),n=ga(n,i,a,t,e[1],21,-2054922799),t=ga(t,n,i,a,e[8],6,1873313359),a=ga(a,t,n,i,e[15],10,-30611744),i=ga(i,a,t,n,e[6],15,-1560198380),n=ga(n,i,a,t,e[13],21,1309151649),t=ga(t,n,i,a,e[4],6,-145523070),a=ga(a,t,n,i,e[11],10,-1120210379),i=ga(i,a,t,n,e[2],15,718787259),n=ga(n,i,a,t,e[9],21,-343485551),r[0]=pu(t,r[0]),r[1]=pu(n,r[1]),r[2]=pu(i,r[2]),r[3]=pu(a,r[3])}function Ew(r,e,t,n,i,a){return e=pu(pu(e,r),pu(n,a)),pu(e<<i|e>>>32-i,t)}function pa(r,e,t,n,i,a,o){return Ew(e&t|~e&n,r,e,i,a,o)}function da(r,e,t,n,i,a,o){return Ew(e&n|t&~n,r,e,i,a,o)}function va(r,e,t,n,i,a,o){return Ew(e^t^n,r,e,i,a,o)}function ga(r,e,t,n,i,a,o){return Ew(t^(e|~n),r,e,i,a,o)}function m8(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)$C(n,RAt(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($C(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,$C(n,i),n}function RAt(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}Gv=He.atob.bind(He),XS=He.btoa.bind(He);var dN="0123456789abcdef".split("");function MAt(r){for(var e="",t=0;t<4;t++)e+=dN[r>>8*t+4&15]+dN[r>>8*t&15];return e}function NAt(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function WS(r){return m8(r).map(NAt).join("")}var PAt=function(r){for(var e=0;e<r.length;e++)r[e]=MAt(r[e]);return r.join("")}(m8("hello"))!="5d41402abc4b2a76b9719d911017c592";function pu(r,e){if(PAt){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 qS(r,e){var t,n,i,a;if(r!==t){for(var o=(i=r,a=1+(256/r.length>>0),new Array(a+1).join(i)),s=[],A=0;A<256;A++)s[A]=A;var l=0;for(A=0;A<256;A++){var u=s[A];l=(l+u+o.charCodeAt(A))%256,s[A]=s[l],s[l]=u}t=r,n=s}else s=n;var c=e.length,h=0,f=0,p="";for(A=0;A<c;A++)f=(f+(u=s[h=(h+1)%256]))%256,s[h]=s[f],s[f]=u,o=s[(s[h]+s[f])%256],p+=String.fromCharCode(e.charCodeAt(A)^o);return p}/**
* @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 vN={print:4,modify:8,copy:16,"annot-forms":32};function Uf(r,e,t,n){this.v=1,this.r=2;var i=192;r.forEach(function(s){if(vN.perm!==void 0)throw new Error("Invalid permission: "+s);i+=vN[s]}),this.padding="(¿N^NuŠAd\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=WS(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=qS(this.encryptionKey,this.padding)}function Df(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 gN(r){if(tn(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){He.console&&ln.error("jsPDF PubSub Error",s.message,s)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function z_(r){if(!(this instanceof z_))return new z_(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 _8(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function Oc(r,e,t,n,i){if(!(this instanceof Oc))return new Oc(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,_8.call(this,n,i)}function Wf(r,e,t,n,i){if(!(this instanceof Wf))return new Wf(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,_8.call(this,n,i)}function Ue(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;tn(r=r||{})==="object"&&(t=r.orientation,n=r.unit||n,i=r.format||i,a=r.compress||r.compressPdf||a,(u=r.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),s=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(A=r.floatPrecision),l=r.defaultPathOperation||"S"),o=r.filters||(a===!0?["FlateEncode"]:o),n=n||"mm",t=(""+(t||"P")).toLowerCase();var c=r.putOnlyUsedFonts||!1,h={},f={internal:{},__private__:{}};f.__private__.PubSub=gN;var p="1.3",v=f.__private__.getPdfVersion=function(){return p};f.__private__.setPdfVersion=function(w){p=w};var m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return m};var g=f.__private__.getPageFormat=function(w){return m[w]};i=i||"a4";var _={COMPAT:"compat",ADVANCED:"advanced"},E=_.COMPAT;function B(){this.saveGraphicsState(),G(new be(Kt,0,0,-Kt,0,Fl()*Kt).toString()+" cm"),this.setFontSize(this.getFontSize()/Kt),l="n",E=_.ADVANCED}function L(){this.restoreGraphicsState(),l="S",E=_.COMPAT}var O=f.__private__.combineFontStyleAndFontWeight=function(w,D){if(w=="bold"&&D=="normal"||w=="bold"&&D==400||w=="normal"&&D=="italic"||w=="bold"&&D=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return D&&(w=D==400||D==="normal"?w==="italic"?"italic":"normal":D!=700&&D!=="bold"||w!=="normal"?(D==700?"bold":D)+""+w:"bold"),w};f.advancedAPI=function(w){var D=E===_.COMPAT;return D&&B.call(this),typeof w!="function"||(w(this),D&&L.call(this)),this},f.compatAPI=function(w){var D=E===_.ADVANCED;return D&&L.call(this),typeof w!="function"||(w(this),D&&B.call(this)),this},f.isAdvancedAPI=function(){return E===_.ADVANCED};var b,T=function(w){if(E!==_.ADVANCED)throw new Error(w+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},I=f.roundToPrecision=f.__private__.roundToPrecision=function(w,D){var et=e||D;if(isNaN(w)||isNaN(et))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return w.toFixed(et).replace(/0+$/,"")};b=f.hpf=f.__private__.hpf=typeof A=="number"?function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.hpf");return I(w,A)}:A==="smart"?function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.hpf");return I(w,w>-1&&w<1?16:5)}:function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.hpf");return I(w,16)};var M=f.f2=f.__private__.f2=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.f2");return I(w,2)},x=f.__private__.f3=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.f3");return I(w,3)},S=f.scale=f.__private__.scale=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.scale");return E===_.COMPAT?w*Kt:E===_.ADVANCED?w:void 0},N=function(w){return E===_.COMPAT?Fl()-w:E===_.ADVANCED?w:void 0},P=function(w){return S(N(w))};f.__private__.setPrecision=f.setPrecision=function(w){typeof parseInt(w,10)=="number"&&(e=parseInt(w,10))};var X,z="00000000000000000000000000000000",tt=f.__private__.getFileId=function(){return z},J=f.__private__.setFileId=function(w){return z=w!==void 0&&/^[a-fA-F0-9]{32}$/.test(w)?w.toUpperCase():z.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(ca=new Uf(u.userPermissions,u.userPassword,u.ownerPassword,z)),z};f.setFileId=function(w){return J(w),this},f.getFileId=function(){return tt()};var nt=f.__private__.convertDateToPDFDate=function(w){var D=w.getTimezoneOffset(),et=D<0?"+":"-",lt=Math.floor(Math.abs(D/60)),Ct=Math.abs(D%60),Rt=[et,K(lt),"'",K(Ct),"'"].join("");return["D:",w.getFullYear(),K(w.getMonth()+1),K(w.getDate()),K(w.getHours()),K(w.getMinutes()),K(w.getSeconds()),Rt].join("")},it=f.__private__.convertPDFDateToDate=function(w){var D=parseInt(w.substr(2,4),10),et=parseInt(w.substr(6,2),10)-1,lt=parseInt(w.substr(8,2),10),Ct=parseInt(w.substr(10,2),10),Rt=parseInt(w.substr(12,2),10),jt=parseInt(w.substr(14,2),10);return new Date(D,et,lt,Ct,Rt,jt,0)},_t=f.__private__.setCreationDate=function(w){var D;if(w===void 0&&(w=new Date),w instanceof Date)D=nt(w);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(w))throw new Error("Invalid argument passed to jsPDF.setCreationDate");D=w}return X=D},R=f.__private__.getCreationDate=function(w){var D=X;return w==="jsDate"&&(D=it(X)),D};f.setCreationDate=function(w){return _t(w),this},f.getCreationDate=function(w){return R(w)};var $,K=f.__private__.padd2=function(w){return("0"+parseInt(w)).slice(-2)},q=f.__private__.padd2Hex=function(w){return("00"+(w=w.toString())).substr(w.length)},at=0,vt=[],wt=[],W=0,It=[],Ot=[],j=!1,Z=wt,ut=function(){at=0,W=0,wt=[],vt=[],It=[],se=qr(),ht=qr()};f.__private__.setCustomOutputDestination=function(w){j=!0,Z=w};var rt=function(w){j||(Z=w)};f.__private__.resetCustomOutputDestination=function(){j=!1,Z=wt};var G=f.__private__.out=function(w){return w=w.toString(),W+=w.length+1,Z.push(w),Z},xt=f.__private__.write=function(w){return G(arguments.length===1?w.toString():Array.prototype.join.call(arguments," "))},bt=f.__private__.getArrayBuffer=function(w){for(var D=w.length,et=new ArrayBuffer(D),lt=new Uint8Array(et);D--;)lt[D]=w.charCodeAt(D);return et},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(w){return Et=E===_.ADVANCED?w/Kt:w,this};var yt,St=f.__private__.getFontSize=f.getFontSize=function(){return E===_.COMPAT?Et:Et*Kt},Ft=r.R2L||!1;f.__private__.setR2L=f.setR2L=function(w){return Ft=w,this},f.__private__.getR2L=f.getR2L=function(){return Ft};var Mt,Vt=f.__private__.setZoomMode=function(w){var D=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(w))yt=w;else if(isNaN(w)){if(D.indexOf(w)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+w+'" is not recognized.');yt=w}else yt=parseInt(w,10)};f.__private__.getZoomMode=function(){return yt};var Yt,ie=f.__private__.setPageMode=function(w){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(w)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+w+'" is not recognized.');Mt=w};f.__private__.getPageMode=function(){return Mt};var ee=f.__private__.setLayoutMode=function(w){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(w)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+w+'" is not recognized.');Yt=w};f.__private__.getLayoutMode=function(){return Yt},f.__private__.setDisplayMode=f.setDisplayMode=function(w,D,et){return Vt(w),ee(D),ie(et),this};var Xt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(w){if(Object.keys(Xt).indexOf(w)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Xt[w]},f.__private__.getDocumentProperties=function(){return Xt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(w){for(var D in Xt)Xt.hasOwnProperty(D)&&w[D]&&(Xt[D]=w[D]);return this},f.__private__.setDocumentProperty=function(w,D){if(Object.keys(Xt).indexOf(w)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Xt[w]=D};var oe,Kt,Xe,Re,pr,Ie={},xe={},on=[],sr={},Ti={},Br={},ci={},$r=null,Vr=0,Me=[],wr=new gN(f),Yn=r.hotfixes||[],fn={},Si={},xi=[],be=function w(D,et,lt,Ct,Rt,jt){if(!(this instanceof w))return new w(D,et,lt,Ct,Rt,jt);isNaN(D)&&(D=1),isNaN(et)&&(et=0),isNaN(lt)&&(lt=0),isNaN(Ct)&&(Ct=1),isNaN(Rt)&&(Rt=0),isNaN(jt)&&(jt=0),this._matrix=[D,et,lt,Ct,Rt,jt]};Object.defineProperty(be.prototype,"sx",{get:function(){return this._matrix[0]},set:function(w){this._matrix[0]=w}}),Object.defineProperty(be.prototype,"shy",{get:function(){return this._matrix[1]},set:function(w){this._matrix[1]=w}}),Object.defineProperty(be.prototype,"shx",{get:function(){return this._matrix[2]},set:function(w){this._matrix[2]=w}}),Object.defineProperty(be.prototype,"sy",{get:function(){return this._matrix[3]},set:function(w){this._matrix[3]=w}}),Object.defineProperty(be.prototype,"tx",{get:function(){return this._matrix[4]},set:function(w){this._matrix[4]=w}}),Object.defineProperty(be.prototype,"ty",{get:function(){return this._matrix[5]},set:function(w){this._matrix[5]=w}}),Object.defineProperty(be.prototype,"a",{get:function(){return this._matrix[0]},set:function(w){this._matrix[0]=w}}),Object.defineProperty(be.prototype,"b",{get:function(){return this._matrix[1]},set:function(w){this._matrix[1]=w}}),Object.defineProperty(be.prototype,"c",{get:function(){return this._matrix[2]},set:function(w){this._matrix[2]=w}}),Object.defineProperty(be.prototype,"d",{get:function(){return this._matrix[3]},set:function(w){this._matrix[3]=w}}),Object.defineProperty(be.prototype,"e",{get:function(){return this._matrix[4]},set:function(w){this._matrix[4]=w}}),Object.defineProperty(be.prototype,"f",{get:function(){return this._matrix[5]},set:function(w){this._matrix[5]=w}}),Object.defineProperty(be.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(be.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(be.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(be.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),be.prototype.join=function(w){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(b).join(w)},be.prototype.multiply=function(w){var D=w.sx*this.sx+w.shy*this.shx,et=w.sx*this.shy+w.shy*this.sy,lt=w.shx*this.sx+w.sy*this.shx,Ct=w.shx*this.shy+w.sy*this.sy,Rt=w.tx*this.sx+w.ty*this.shx+this.tx,jt=w.tx*this.shy+w.ty*this.sy+this.ty;return new be(D,et,lt,Ct,Rt,jt)},be.prototype.decompose=function(){var w=this.sx,D=this.shy,et=this.shx,lt=this.sy,Ct=this.tx,Rt=this.ty,jt=Math.sqrt(w*w+D*D),re=(w/=jt)*et+(D/=jt)*lt;et-=w*re,lt-=D*re;var Fe=Math.sqrt(et*et+lt*lt);return re/=Fe,w*(lt/=Fe)<D*(et/=Fe)&&(w=-w,D=-D,re=-re,jt=-jt),{scale:new be(jt,0,0,Fe,0,0),translate:new be(1,0,0,1,Ct,Rt),rotate:new be(w,D,-D,w,0,0),skew:new be(1,0,re,1,0,0)}},be.prototype.toString=function(w){return this.join(" ")},be.prototype.inversed=function(){var w=this.sx,D=this.shy,et=this.shx,lt=this.sy,Ct=this.tx,Rt=this.ty,jt=1/(w*lt-D*et),re=lt*jt,Fe=-D*jt,ur=-et*jt,Ke=w*jt;return new be(re,Fe,ur,Ke,-re*Ct-ur*Rt,-Fe*Ct-Ke*Rt)},be.prototype.applyToPoint=function(w){var D=w.x*this.sx+w.y*this.shx+this.tx,et=w.x*this.shy+w.y*this.sy+this.ty;return new Yh(D,et)},be.prototype.applyToRectangle=function(w){var D=this.applyToPoint(w),et=this.applyToPoint(new Yh(w.x+w.w,w.y+w.h));return new _d(D.x,D.y,et.x-D.x,et.y-D.y)},be.prototype.clone=function(){var w=this.sx,D=this.shy,et=this.shx,lt=this.sy,Ct=this.tx,Rt=this.ty;return new be(w,D,et,lt,Ct,Rt)},f.Matrix=be;var hi=f.matrixMult=function(w,D){return D.multiply(w)},Dn=new be(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Dn;var bi=function(w,D){if(!Ti[w]){var et=(D instanceof Oc?"Sh":"P")+(Object.keys(sr).length+1).toString(10);D.id=et,Ti[w]=et,sr[et]=D,wr.publish("addPattern",D)}};f.ShadingPattern=Oc,f.TilingPattern=Wf,f.addShadingPattern=function(w,D){return T("addShadingPattern()"),bi(w,D),this},f.beginTilingPattern=function(w){T("beginTilingPattern()"),Hy(w.boundingBox[0],w.boundingBox[1],w.boundingBox[2]-w.boundingBox[0],w.boundingBox[3]-w.boundingBox[1],w.matrix)},f.endTilingPattern=function(w,D){T("endTilingPattern()"),D.stream=Ot[$].join(`
`),bi(w,D),wr.publish("endTilingPattern",D),xi.pop().restore()};var en=f.__private__.newObject=function(){var w=qr();return En(w,!0),w},qr=f.__private__.newObjectDeferred=function(){return at++,vt[at]=function(){return W},at},En=function(w,D){return D=typeof D=="boolean"&&D,vt[w]=W,D&&G(w+" 0 obj"),w},mo=f.__private__.newAdditionalObject=function(){var w={objId:qr(),content:""};return It.push(w),w},se=qr(),ht=qr(),Qt=f.__private__.decodeColorString=function(w){var D=w.split(" ");if(D.length!==2||D[1]!=="g"&&D[1]!=="G")D.length===5&&(D[4]==="k"||D[4]==="K")&&(D=[(1-D[0])*(1-D[3]),(1-D[1])*(1-D[3]),(1-D[2])*(1-D[3]),"r"]);else{var et=parseFloat(D[0]);D=[et,et,et,"r"]}for(var lt="#",Ct=0;Ct<3;Ct++)lt+=("0"+Math.floor(255*parseFloat(D[Ct])).toString(16)).slice(-2);return lt},qt=f.__private__.encodeColorString=function(w){var D;typeof w=="string"&&(w={ch1:w});var et=w.ch1,lt=w.ch2,Ct=w.ch3,Rt=w.ch4,jt=w.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof et=="string"&&et.charAt(0)!=="#"){var re=new y8(et);if(re.ok)et=re.toHex();else if(!/^\d*\.?\d*$/.test(et))throw new Error('Invalid color "'+et+'" passed to jsPDF.encodeColorString.')}if(typeof et=="string"&&/^#[0-9A-Fa-f]{3}$/.test(et)&&(et="#"+et[1]+et[1]+et[2]+et[2]+et[3]+et[3]),typeof et=="string"&&/^#[0-9A-Fa-f]{6}$/.test(et)){var Fe=parseInt(et.substr(1),16);et=Fe>>16&255,lt=Fe>>8&255,Ct=255&Fe}if(lt===void 0||Rt===void 0&&et===lt&&lt===Ct)if(typeof et=="string")D=et+" "+jt[0];else switch(w.precision){case 2:D=M(et/255)+" "+jt[0];break;case 3:default:D=x(et/255)+" "+jt[0]}else if(Rt===void 0||tn(Rt)==="object"){if(Rt&&!isNaN(Rt.a)&&Rt.a===0)return D=["1.","1.","1.",jt[1]].join(" ");if(typeof et=="string")D=[et,lt,Ct,jt[1]].join(" ");else switch(w.precision){case 2:D=[M(et/255),M(lt/255),M(Ct/255),jt[1]].join(" ");break;default:case 3:D=[x(et/255),x(lt/255),x(Ct/255),jt[1]].join(" ")}}else if(typeof et=="string")D=[et,lt,Ct,Rt,jt[2]].join(" ");else switch(w.precision){case 2:D=[M(et),M(lt),M(Ct),M(Rt),jt[2]].join(" ");break;case 3:default:D=[x(et),x(lt),x(Ct),x(Rt),jt[2]].join(" ")}return D},er=f.__private__.getFilters=function(){return o},Or=f.__private__.putStream=function(w){var D=(w=w||{}).data||"",et=w.filters||er(),lt=w.alreadyAppliedFilters||[],Ct=w.addLength1||!1,Rt=D.length,jt=w.objectId,re=function(ha){return ha};if(u!==null&&jt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(re=ca.encryptor(jt,0));var Fe={};et===!0&&(et=["FlateEncode"]);var ur=w.additionalKeyValues||[],Ke=(Fe=Ue.API.processDataByFilters!==void 0?Ue.API.processDataByFilters(D,et):{data:D,reverseChain:[]}).reverseChain+(Array.isArray(lt)?lt.join(" "):lt.toString());if(Fe.data.length!==0&&(ur.push({key:"Length",value:Fe.data.length}),Ct===!0&&ur.push({key:"Length1",value:Rt})),Ke.length!=0)if(Ke.split("/").length-1==1)ur.push({key:"Filter",value:Ke});else{ur.push({key:"Filter",value:"["+Ke+"]"});for(var Tr=0;Tr<ur.length;Tr+=1)if(ur[Tr].key==="DecodeParms"){for(var Ji=[],Wn=0;Wn<Fe.reverseChain.split("/").length-1;Wn+=1)Ji.push("null");Ji.push(ur[Tr].value),ur[Tr].value="["+Ji.join(" ")+"]"}}G("<<");for(var fi=0;fi<ur.length;fi++)G("/"+ur[fi].key+" "+ur[fi].value);G(">>"),Fe.data.length!==0&&(G("stream"),G(re(Fe.data)),G("endstream"))},sn=f.__private__.putPage=function(w){var D=w.number,et=w.data,lt=w.objId,Ct=w.contentsObjId;En(lt,!0),G("<</Type /Page"),G("/Parent "+w.rootDictionaryObjId+" 0 R"),G("/Resources "+w.resourceDictionaryObjId+" 0 R"),G("/MediaBox ["+parseFloat(b(w.mediaBox.bottomLeftX))+" "+parseFloat(b(w.mediaBox.bottomLeftY))+" "+b(w.mediaBox.topRightX)+" "+b(w.mediaBox.topRightY)+"]"),w.cropBox!==null&&G("/CropBox ["+b(w.cropBox.bottomLeftX)+" "+b(w.cropBox.bottomLeftY)+" "+b(w.cropBox.topRightX)+" "+b(w.cropBox.topRightY)+"]"),w.bleedBox!==null&&G("/BleedBox ["+b(w.bleedBox.bottomLeftX)+" "+b(w.bleedBox.bottomLeftY)+" "+b(w.bleedBox.topRightX)+" "+b(w.bleedBox.topRightY)+"]"),w.trimBox!==null&&G("/TrimBox ["+b(w.trimBox.bottomLeftX)+" "+b(w.trimBox.bottomLeftY)+" "+b(w.trimBox.topRightX)+" "+b(w.trimBox.topRightY)+"]"),w.artBox!==null&&G("/ArtBox ["+b(w.artBox.bottomLeftX)+" "+b(w.artBox.bottomLeftY)+" "+b(w.artBox.topRightX)+" "+b(w.artBox.topRightY)+"]"),typeof w.userUnit=="number"&&w.userUnit!==1&&G("/UserUnit "+w.userUnit),wr.publish("putPage",{objId:lt,pageContext:Me[D],pageNumber:D,page:et}),G("/Contents "+Ct+" 0 R"),G(">>"),G("endobj");var Rt=et.join(`
`);return E===_.ADVANCED&&(Rt+=`
Q`),En(Ct,!0),Or({data:Rt,filters:er(),objectId:Ct}),G("endobj"),lt},Cn=f.__private__.putPages=function(){var w,D,et=[];for(w=1;w<=Vr;w++)Me[w].objId=qr(),Me[w].contentsObjId=qr();for(w=1;w<=Vr;w++)et.push(sn({number:w,data:Ot[w],objId:Me[w].objId,contentsObjId:Me[w].contentsObjId,mediaBox:Me[w].mediaBox,cropBox:Me[w].cropBox,bleedBox:Me[w].bleedBox,trimBox:Me[w].trimBox,artBox:Me[w].artBox,userUnit:Me[w].userUnit,rootDictionaryObjId:se,resourceDictionaryObjId:ht}));En(se,!0),G("<</Type /Pages");var lt="/Kids [";for(D=0;D<Vr;D++)lt+=et[D]+" 0 R ";G(lt+"]"),G("/Count "+Vr),G(">>"),G("endobj"),wr.publish("postPutPages")},is=function(w){wr.publish("putFont",{font:w,out:G,newObject:en,putStream:Or}),w.isAlreadyPutted!==!0&&(w.objectNumber=en(),G("<<"),G("/Type /Font"),G("/BaseFont /"+Df(w.postScriptName)),G("/Subtype /Type1"),typeof w.encoding=="string"&&G("/Encoding /"+w.encoding),G("/FirstChar 32"),G("/LastChar 255"),G(">>"),G("endobj"))},Ii=function(){for(var w in Ie)Ie.hasOwnProperty(w)&&(c===!1||c===!0&&h.hasOwnProperty(w))&&is(Ie[w])},EA=function(w){w.objectNumber=en();var D=[];D.push({key:"Type",value:"/XObject"}),D.push({key:"Subtype",value:"/Form"}),D.push({key:"BBox",value:"["+[b(w.x),b(w.y),b(w.x+w.width),b(w.y+w.height)].join(" ")+"]"}),D.push({key:"Matrix",value:"["+w.matrix.toString()+"]"});var et=w.pages[1].join(`
`);Or({data:et,additionalKeyValues:D,objectId:w.objectNumber}),G("endobj")},Sl=function(){for(var w in fn)fn.hasOwnProperty(w)&&EA(fn[w])},ld=function(w,D){var et,lt=[],Ct=1/(D-1);for(et=0;et<1;et+=Ct)lt.push(et);if(lt.push(1),w[0].offset!=0){var Rt={offset:0,color:w[0].color};w.unshift(Rt)}if(w[w.length-1].offset!=1){var jt={offset:1,color:w[w.length-1].color};w.push(jt)}for(var re="",Fe=0,ur=0;ur<lt.length;ur++){for(et=lt[ur];et>w[Fe+1].offset;)Fe++;var Ke=w[Fe].offset,Tr=(et-Ke)/(w[Fe+1].offset-Ke),Ji=w[Fe].color,Wn=w[Fe+1].color;re+=q(Math.round((1-Tr)*Ji[0]+Tr*Wn[0]).toString(16))+q(Math.round((1-Tr)*Ji[1]+Tr*Wn[1]).toString(16))+q(Math.round((1-Tr)*Ji[2]+Tr*Wn[2]).toString(16))}return re.trim()},AE=function(w,D){D||(D=21);var et=en(),lt=ld(w.colors,D),Ct=[];Ct.push({key:"FunctionType",value:"0"}),Ct.push({key:"Domain",value:"[0.0 1.0]"}),Ct.push({key:"Size",value:"["+D+"]"}),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]"}),Or({data:lt,additionalKeyValues:Ct,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:et}),G("endobj"),w.objectNumber=en(),G("<< /ShadingType "+w.type),G("/ColorSpace /DeviceRGB");var Rt="/Coords ["+b(parseFloat(w.coords[0]))+" "+b(parseFloat(w.coords[1]))+" ";w.type===2?Rt+=b(parseFloat(w.coords[2]))+" "+b(parseFloat(w.coords[3])):Rt+=b(parseFloat(w.coords[2]))+" "+b(parseFloat(w.coords[3]))+" "+b(parseFloat(w.coords[4]))+" "+b(parseFloat(w.coords[5])),G(Rt+="]"),w.matrix&&G("/Matrix ["+w.matrix.toString()+"]"),G("/Function "+et+" 0 R"),G("/Extend [true true]"),G(">>"),G("endobj")},lE=function(w,D){var et=qr(),lt=en();D.push({resourcesOid:et,objectOid:lt}),w.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:"["+w.boundingBox.map(b).join(" ")+"]"}),Ct.push({key:"XStep",value:b(w.xStep)}),Ct.push({key:"YStep",value:b(w.yStep)}),Ct.push({key:"Resources",value:et+" 0 R"}),w.matrix&&Ct.push({key:"Matrix",value:"["+w.matrix.toString()+"]"}),Or({data:w.stream,additionalKeyValues:Ct,objectId:w.objectNumber}),G("endobj")},Hh=function(w){var D;for(D in sr)sr.hasOwnProperty(D)&&(sr[D]instanceof Oc?AE(sr[D]):sr[D]instanceof Wf&&lE(sr[D],w))},Cy=function(w){for(var D in w.objectNumber=en(),G("<<"),w)switch(D){case"opacity":G("/ca "+M(w[D]));break;case"stroke-opacity":G("/CA "+M(w[D]))}G(">>"),G("endobj")},uE=function(){var w;for(w in Br)Br.hasOwnProperty(w)&&Cy(Br[w])},ud=function(){for(var w in G("/XObject <<"),fn)fn.hasOwnProperty(w)&&fn[w].objectNumber>=0&&G("/"+w+" "+fn[w].objectNumber+" 0 R");wr.publish("putXobjectDict"),G(">>")},cE=function(){ca.oid=en(),G("<<"),G("/Filter /Standard"),G("/V "+ca.v),G("/R "+ca.r),G("/U <"+ca.toHexString(ca.U)+">"),G("/O <"+ca.toHexString(ca.O)+">"),G("/P "+ca.P),G(">>"),G("endobj")},By=function(){for(var w in G("/Font <<"),Ie)Ie.hasOwnProperty(w)&&(c===!1||c===!0&&h.hasOwnProperty(w))&&G("/"+w+" "+Ie[w].objectNumber+" 0 R");G(">>")},hE=function(){if(Object.keys(sr).length>0){for(var w in G("/Shading <<"),sr)sr.hasOwnProperty(w)&&sr[w]instanceof Oc&&sr[w].objectNumber>=0&&G("/"+w+" "+sr[w].objectNumber+" 0 R");wr.publish("putShadingPatternDict"),G(">>")}},Gh=function(w){if(Object.keys(sr).length>0){for(var D in G("/Pattern <<"),sr)sr.hasOwnProperty(D)&&sr[D]instanceof f.TilingPattern&&sr[D].objectNumber>=0&&sr[D].objectNumber<w&&G("/"+D+" "+sr[D].objectNumber+" 0 R");wr.publish("putTilingPatternDict"),G(">>")}},fE=function(){if(Object.keys(Br).length>0){var w;for(w in G("/ExtGState <<"),Br)Br.hasOwnProperty(w)&&Br[w].objectNumber>=0&&G("/"+w+" "+Br[w].objectNumber+" 0 R");wr.publish("putGStateDict"),G(">>")}},Xn=function(w){En(w.resourcesOid,!0),G("<<"),G("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),By(),hE(),Gh(w.objectOid),fE(),ud(),G(">>"),G("endobj")},Ty=function(){var w=[];Ii(),uE(),Sl(),Hh(w),wr.publish("putResources"),w.forEach(Xn),Xn({resourcesOid:ht,objectOid:Number.MAX_SAFE_INTEGER}),wr.publish("postPutResources")},Sy=function(){wr.publish("putAdditionalObjects");for(var w=0;w<It.length;w++){var D=It[w];En(D.objId,!0),G(D.content),G("endobj")}wr.publish("postPutAdditionalObjects")},xy=function(w){xe[w.fontName]=xe[w.fontName]||{},xe[w.fontName][w.fontStyle]=w.id},cd=function(w,D,et,lt,Ct){var Rt={id:"F"+(Object.keys(Ie).length+1).toString(10),postScriptName:w,fontName:D,fontStyle:et,encoding:lt,isStandardFont:Ct||!1,metadata:{}};return wr.publish("addFont",{font:Rt,instance:this}),Ie[Rt.id]=Rt,xy(Rt),Rt.id},pE=function(w){for(var D=0,et=dt.length;D<et;D++){var lt=cd.call(this,w[D][0],w[D][1],w[D][2],dt[D][3],!0);c===!1&&(h[lt]=!0);var Ct=w[D][0].split("-");xy({id:lt,fontName:Ct[0],fontStyle:Ct[1]||""})}wr.publish("addFonts",{fonts:Ie,dictionary:xe})},as=function(w){return w.foo=function(){try{return w.apply(this,arguments)}catch(lt){var D=lt.stack||"";~D.indexOf(" at ")&&(D=D.split(" at ")[1]);var et="Error in function "+D.split(`
`)[0].split("<")[0]+": "+lt.message;if(!He.console)throw new Error(et);He.console.error(et,lt),He.alert&&alert(et)}},w.foo.bar=w,w.foo},kh=function(w,D){var et,lt,Ct,Rt,jt,re,Fe,ur,Ke;if(Ct=(D=D||{}).sourceEncoding||"Unicode",jt=D.outputEncoding,(D.autoencode||jt)&&Ie[oe].metadata&&Ie[oe].metadata[Ct]&&Ie[oe].metadata[Ct].encoding&&(Rt=Ie[oe].metadata[Ct].encoding,!jt&&Ie[oe].encoding&&(jt=Ie[oe].encoding),!jt&&Rt.codePages&&(jt=Rt.codePages[0]),typeof jt=="string"&&(jt=Rt[jt]),jt)){for(Fe=!1,re=[],et=0,lt=w.length;et<lt;et++)(ur=jt[w.charCodeAt(et)])?re.push(String.fromCharCode(ur)):re.push(w[et]),re[et].charCodeAt(0)>>8&&(Fe=!0);w=re.join("")}for(et=w.length;Fe===void 0&&et!==0;)w.charCodeAt(et-1)>>8&&(Fe=!0),et--;if(!Fe)return w;for(re=D.noBOM?[]:[254,255],et=0,lt=w.length;et<lt;et++){if((Ke=(ur=w.charCodeAt(et))>>8)>>8)throw new Error("Character at position "+et+" of string '"+w+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");re.push(Ke),re.push(ur-(Ke<<8))}return String.fromCharCode.apply(void 0,re)},Ya=f.__private__.pdfEscape=f.pdfEscape=function(w,D){return kh(w,D).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},hd=f.__private__.beginPage=function(w){Ot[++Vr]=[],Me[Vr]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(w[0]),topRightY:Number(w[1])}},Iy(Vr),rt(Ot[$])},by=function(w,D){var et,lt,Ct;switch(t=D||t,typeof w=="string"&&(et=g(w.toLowerCase()),Array.isArray(et)&&(lt=et[0],Ct=et[1])),Array.isArray(w)&&(lt=w[0]*Kt,Ct=w[1]*Kt),isNaN(lt)&&(lt=i[0],Ct=i[1]),(lt>14400||Ct>14400)&&(ln.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])}hd(i),Ny(vd),G(os),yd!==0&&G(yd+" J"),md!==0&&G(md+" j"),wr.publish("addPage",{pageNumber:Vr})},dE=function(w){w>0&&w<=Vr&&(Ot.splice(w,1),Me.splice(w,1),Vr--,$>Vr&&($=Vr),this.setPage($))},Iy=function(w){w>0&&w<=Vr&&($=w)},vE=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return Ot.length-1},Fy=function(w,D,et){var lt,Ct=void 0;return et=et||{},w=w!==void 0?w:Ie[oe].fontName,D=D!==void 0?D:Ie[oe].fontStyle,lt=w.toLowerCase(),xe[lt]!==void 0&&xe[lt][D]!==void 0?Ct=xe[lt][D]:xe[w]!==void 0&&xe[w][D]!==void 0?Ct=xe[w][D]:et.disableWarning===!1&&ln.warn("Unable to look up font label for font '"+w+"', '"+D+"'. Refer to getFontList() for available fonts."),Ct||et.noFallback||(Ct=xe.times[D])==null&&(Ct=xe.times.normal),Ct},gE=f.__private__.putInfo=function(){var w=en(),D=function(lt){return lt};for(var et in u!==null&&(D=ca.encryptor(w,0)),G("<<"),G("/Producer ("+Ya(D("jsPDF "+Ue.version))+")"),Xt)Xt.hasOwnProperty(et)&&Xt[et]&&G("/"+et.substr(0,1).toUpperCase()+et.substr(1)+" ("+Ya(D(Xt[et]))+")");G("/CreationDate ("+Ya(D(X))+")"),G(">>"),G("endobj")},fd=f.__private__.putCatalog=function(w){var D=(w=w||{}).rootDictionaryObjId||se;switch(en(),G("<<"),G("/Type /Catalog"),G("/Pages "+D+" 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 et=""+yt;et.substr(et.length-1)==="%"&&(yt=parseInt(yt)/100),typeof yt=="number"&&G("/OpenAction [3 0 R /XYZ null null "+M(yt)+"]")}switch(Yt||(Yt="continuous"),Yt){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")}Mt&&G("/PageMode /"+Mt),wr.publish("putCatalog"),G(">>"),G("endobj")},yE=f.__private__.putTrailer=function(){G("trailer"),G("<<"),G("/Size "+(at+1)),G("/Root "+at+" 0 R"),G("/Info "+(at-1)+" 0 R"),u!==null&&G("/Encrypt "+ca.oid+" 0 R"),G("/ID [ <"+z+"> <"+z+"> ]"),G(">>")},mE=f.__private__.putHeader=function(){G("%PDF-"+p),G("%ºß¬à")},_E=f.__private__.putXRef=function(){var w="0000000000";G("xref"),G("0 "+(at+1)),G("0000000000 65535 f ");for(var D=1;D<=at;D++)typeof vt[D]=="function"?G((w+vt[D]()).slice(-10)+" 00000 n "):vt[D]!==void 0?G((w+vt[D]).slice(-10)+" 00000 n "):G("0000000000 00000 n ")},CA=f.__private__.buildDocument=function(){ut(),rt(wt),wr.publish("buildDocument"),mE(),Cn(),Sy(),Ty(),u!==null&&cE(),gE(),fd();var w=W;return _E(),yE(),G("startxref"),G(""+w),G("%%EOF"),rt(Ot[$]),wt.join(`
`)},$h=f.__private__.getBlob=function(w){return new Blob([bt(w)],{type:"application/pdf"})},Vh=f.output=f.__private__.output=as(function(w,D){switch(typeof(D=D||{})=="string"?D={filename:D}:D.filename=D.filename||"generated.pdf",w){case void 0:return CA();case"save":f.save(D.filename);break;case"arraybuffer":return bt(CA());case"blob":return $h(CA());case"bloburi":case"bloburl":if(He.URL!==void 0&&typeof He.URL.createObjectURL=="function")return He.URL&&He.URL.createObjectURL($h(CA()))||void 0;ln.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var et="",lt=CA();try{et=XS(lt)}catch{et=XS(unescape(encodeURIComponent(lt)))}return"data:application/pdf;filename="+D.filename+";base64,"+et;case"pdfobjectnewwindow":if(Object.prototype.toString.call(He)==="[object Window]"){var Ct='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+(D.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(D)+");<\/script></body></html>",Rt=He.open();return Rt!==null&&Rt.document.write(Ct),Rt}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(He)==="[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="'+(D.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+D.filename+'" width="500px" height="400px" /></body></html>',re=He.open();if(re!==null){re.document.write(jt);var Fe=this;re.document.documentElement.querySelector("#pdfViewer").onload=function(){re.document.title=D.filename,re.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(Fe.output("bloburl"))}}return re}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(He)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var ur='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",D)+'"></iframe></body></html>',Ke=He.open();if(Ke!==null&&(Ke.document.write(ur),Ke.document.title=D.filename),Ke||typeof safari>"u")return Ke;break;case"datauri":case"dataurl":return He.document.location.href=this.output("datauristring",D);default:return null}}),Ly=function(w){return Array.isArray(Yn)===!0&&Yn.indexOf(w)>-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=Ly("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 ca=null;_t(),J();var wE=function(w){return u!==null?ca.encryptor(w,0):function(D){return D}},Oy=f.__private__.getPageInfo=f.getPageInfo=function(w){if(isNaN(w)||w%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:Me[w].objId,pageNumber:w,pageContext:Me[w]}},Ve=f.__private__.getPageInfoByObjId=function(w){if(isNaN(w)||w%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var D in Me)if(Me[D].objId===w)break;return Oy(D)},EE=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:Me[$].objId,pageNumber:$,pageContext:Me[$]}};f.addPage=function(){return by.apply(this,arguments),this},f.setPage=function(){return Iy.apply(this,arguments),rt.call(this,Ot[$]),this},f.insertPage=function(w){return this.addPage(),this.movePage($,w),this},f.movePage=function(w,D){var et,lt;if(w>D){et=Ot[w],lt=Me[w];for(var Ct=w;Ct>D;Ct--)Ot[Ct]=Ot[Ct-1],Me[Ct]=Me[Ct-1];Ot[D]=et,Me[D]=lt,this.setPage(D)}else if(w<D){et=Ot[w],lt=Me[w];for(var Rt=w;Rt<D;Rt++)Ot[Rt]=Ot[Rt+1],Me[Rt]=Me[Rt+1];Ot[D]=et,Me[D]=lt,this.setPage(D)}return this},f.deletePage=function(){return dE.apply(this,arguments),this},f.__private__.text=f.text=function(w,D,et,lt,Ct){var Rt,jt,re,Fe,ur,Ke,Tr,Ji,Wn,fi=(lt=lt||{}).scope||this;if(typeof w=="number"&&typeof D=="number"&&(typeof et=="string"||Array.isArray(et))){var ha=et;et=D,D=w,w=ha}if(arguments[3]instanceof be?(T("The transform parameter of text() with a Matrix value"),Wn=Ct):(re=arguments[4],Fe=arguments[5],tn(Tr=arguments[3])==="object"&&Tr!==null||(typeof re=="string"&&(Fe=re,re=null),typeof Tr=="string"&&(Fe=Tr,Tr=null),typeof Tr=="number"&&(re=Tr,Tr=null),lt={flags:Tr,angle:re,align:Fe})),isNaN(D)||isNaN(et)||w==null)throw new Error("Invalid arguments passed to jsPDF.text");if(w.length===0)return fi;var ki="",ss=!1,_o=typeof lt.lineHeightFactor=="number"?lt.lineHeightFactor:oc,TA=fi.internal.scaleFactor;function Gy(pn){return pn=pn.split(" ").join(Array(lt.TabLen||9).join(" ")),Ya(pn,Tr)}function Bd(pn){for(var dn,qn=pn.concat(),Fi=[],IA=qn.length;IA--;)typeof(dn=qn.shift())=="string"?Fi.push(dn):Array.isArray(pn)&&(dn.length===1||dn[1]===void 0&&dn[2]===void 0)?Fi.push(dn[0]):Fi.push([dn[0],dn[1],dn[2]]);return Fi}function Td(pn,dn){var qn;if(typeof pn=="string")qn=dn(pn)[0];else if(Array.isArray(pn)){for(var Fi,IA,Nl=pn.concat(),af=[],$y=Nl.length;$y--;)typeof(Fi=Nl.shift())=="string"?af.push(dn(Fi)[0]):Array.isArray(Fi)&&typeof Fi[0]=="string"&&(IA=dn(Fi[0],Fi[1],Fi[2]),af.push([IA[0],IA[1],IA[2]]));qn=af}return qn}var Wh=!1,Sd=!0;if(typeof w=="string")Wh=!0;else if(Array.isArray(w)){var xd=w.concat();jt=[];for(var qh,Xa=xd.length;Xa--;)(typeof(qh=xd.shift())!="string"||Array.isArray(qh)&&typeof qh[0]!="string")&&(Sd=!1);Wh=Sd}if(Wh===!1)throw new Error('Type of text must be string or Array. "'+w+'" is not recognized.');typeof w=="string"&&(w=w.match(/[\r?\n]/)?w.split(/\r\n|\r|\n/g):[w]);var Zh=Et/fi.internal.scaleFactor,Jh=Zh*(_o-1);switch(lt.baseline){case"bottom":et-=Jh;break;case"top":et+=Zh-Jh;break;case"hanging":et+=Zh-2*Jh;break;case"middle":et+=Zh/2-Jh}if((Ke=lt.maxWidth||0)>0&&(typeof w=="string"?w=fi.splitTextToSize(w,Ke):Object.prototype.toString.call(w)==="[object Array]"&&(w=w.reduce(function(pn,dn){return pn.concat(fi.splitTextToSize(dn,Ke))},[]))),Rt={text:w,x:D,y:et,options:lt,mutex:{pdfEscape:Ya,activeFontKey:oe,fonts:Ie,activeFontSize:Et}},wr.publish("preProcessText",Rt),w=Rt.text,re=(lt=Rt.options).angle,!(Wn instanceof be)&&re&&typeof re=="number"){re*=Math.PI/180,lt.rotationDirection===0&&(re=-re),E===_.ADVANCED&&(re=-re);var tf=Math.cos(re),bd=Math.sin(re);Wn=new be(tf,bd,-bd,tf,0,0)}else re&&re instanceof be&&(Wn=re);E!==_.ADVANCED||Wn||(Wn=Dn),(ur=lt.charSpace||zh)!==void 0&&(ki+=b(S(ur))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Ji=lt.horizontalScale)!==void 0&&(ki+=b(100*Ji)+` Tz
`),lt.lang;var Wa=-1,OE=lt.renderingMode!==void 0?lt.renderingMode:lt.stroke,Id=fi.internal.getCurrentPageInfo().pageContext;switch(OE){case 0:case!1:case"fill":Wa=0;break;case 1:case!0:case"stroke":Wa=1;break;case 2:case"fillThenStroke":Wa=2;break;case 3:case"invisible":Wa=3;break;case 4:case"fillAndAddForClipping":Wa=4;break;case 5:case"strokeAndAddPathForClipping":Wa=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Wa=6;break;case 7:case"addToPathForClipping":Wa=7}var ky=Id.usedRenderingMode!==void 0?Id.usedRenderingMode:-1;Wa!==-1?ki+=Wa+` Tr
`:ky!==-1&&(ki+=`0 Tr
`),Wa!==-1&&(Id.usedRenderingMode=Wa),Fe=lt.align||"left";var As,Fd=Et*_o,RE=fi.internal.pageSize.getWidth(),ME=Ie[oe];ur=lt.charSpace||zh,Ke=lt.maxWidth||0,Tr=Object.assign({autoencode:!0,noBOM:!0},lt.flags);var Ll=[];if(Object.prototype.toString.call(w)==="[object Array]"){var Qo;jt=Bd(w),Fe!=="left"&&(As=jt.map(function(pn){return fi.getStringUnitWidth(pn,{font:ME,charSpace:ur,fontSize:Et,doKerning:!1})*Et/TA}));var ls,Ol=0;if(Fe==="right"){D-=As[0],w=[],Xa=jt.length;for(var Qs=0;Qs<Xa;Qs++)Qs===0?(ls=BA(D),Qo=bl(et)):(ls=S(Ol-As[Qs]),Qo=-Fd),w.push([jt[Qs],ls,Qo]),Ol=As[Qs]}else if(Fe==="center"){D-=As[0]/2,w=[],Xa=jt.length;for(var SA=0;SA<Xa;SA++)SA===0?(ls=BA(D),Qo=bl(et)):(ls=S((Ol-As[SA])/2),Qo=-Fd),w.push([jt[SA],ls,Qo]),Ol=As[SA]}else if(Fe==="left"){w=[],Xa=jt.length;for(var ef=0;ef<Xa;ef++)w.push(jt[ef])}else{if(Fe!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');w=[],Xa=jt.length,Ke=Ke!==0?Ke:RE;for(var us=0;us<Xa;us++)Qo=us===0?bl(et):-Fd,ls=us===0?BA(D):0,us<Xa-1?Ll.push(b(S((Ke-As[us])/(jt[us].split(" ").length-1)))):Ll.push(0),w.push([jt[us],ls,Qo])}}var rf=typeof lt.R2L=="boolean"?lt.R2L:Ft;rf===!0&&(w=Td(w,function(pn,dn,qn){return[pn.split("").reverse().join(""),dn,qn]})),Rt={text:w,x:D,y:et,options:lt,mutex:{pdfEscape:Ya,activeFontKey:oe,fonts:Ie,activeFontSize:Et}},wr.publish("postProcessText",Rt),w=Rt.text,ss=Rt.mutex.isHex||!1;var Ld=Ie[oe].encoding;Ld!=="WinAnsiEncoding"&&Ld!=="StandardEncoding"||(w=Td(w,function(pn,dn,qn){return[Gy(pn),dn,qn]})),jt=Bd(w),w=[];for(var Rl,cs,xA,lc=0,nf=1,uc=Array.isArray(jt[0])?nf:lc,Ml="",Od=function(pn,dn,qn){var Fi="";return qn instanceof be?(qn=typeof lt.angle=="number"?hi(qn,new be(1,0,0,1,pn,dn)):hi(new be(1,0,0,1,pn,dn),qn),E===_.ADVANCED&&(qn=hi(new be(1,0,0,-1,0,0),qn)),Fi=qn.join(" ")+` Tm
`):Fi=b(pn)+" "+b(dn)+` Td
`,Fi},Ho=0;Ho<jt.length;Ho++){switch(Ml="",uc){case nf:xA=(ss?"<":"(")+jt[Ho][0]+(ss?">":")"),Rl=parseFloat(jt[Ho][1]),cs=parseFloat(jt[Ho][2]);break;case lc:xA=(ss?"<":"(")+jt[Ho]+(ss?">":")"),Rl=BA(D),cs=bl(et)}Ll!==void 0&&Ll[Ho]!==void 0&&(Ml=Ll[Ho]+` Tw
`),Ho===0?w.push(Ml+Od(Rl,cs,Wn)+xA):uc===lc?w.push(Ml+xA):uc===nf&&w.push(Ml+Od(Rl,cs,Wn)+xA)}w=uc===lc?w.join(` Tj
T* `):w.join(` Tj
`),w+=` Tj
`;var bA=`BT
/`;return bA+=oe+" "+Et+` Tf
`,bA+=b(Et*_o)+` TL
`,bA+=sc+`
`,bA+=ki,bA+=w,G(bA+="ET"),h[oe]=!0,fi};var CE=f.__private__.clip=f.clip=function(w){return G(w==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return CE("evenodd")},f.__private__.discardPath=f.discardPath=function(){return G("n"),this};var Ds=f.__private__.isValidStyle=function(w){var D=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(w)!==-1&&(D=!0),D};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(w){return Ds(w)&&(l=w),this};var Ry=f.__private__.getStyle=f.getStyle=function(w){var D=l;switch(w){case"D":case"S":D="S";break;case"F":D="f";break;case"FD":case"DF":D="B";break;case"f":case"f*":case"B":case"B*":D=w}return D},My=f.close=function(){return G("h"),this};f.stroke=function(){return G("S"),this},f.fill=function(w){return jh("f",w),this},f.fillEvenOdd=function(w){return jh("f*",w),this},f.fillStroke=function(w){return jh("B",w),this},f.fillStrokeEvenOdd=function(w){return jh("B*",w),this};var jh=function(w,D){tn(D)==="object"?TE(D,w):G(w)},pd=function(w){w===null||E===_.ADVANCED&&w===void 0||(w=Ry(w),G(w))};function BE(w,D,et,lt,Ct){var Rt=new Wf(D||this.boundingBox,et||this.xStep,lt||this.yStep,this.gState,Ct||this.matrix);Rt.stream=this.stream;var jt=w+"$$"+this.cloneIndex+++"$$";return bi(jt,Rt),Rt}var TE=function(w,D){var et=Ti[w.key],lt=sr[et];if(lt instanceof Oc)G("q"),G(SE(D)),lt.gState&&f.setGState(lt.gState),G(w.matrix.toString()+" cm"),G("/"+et+" sh"),G("Q");else if(lt instanceof Wf){var Ct=new be(1,0,0,-1,0,Fl());w.matrix&&(Ct=Ct.multiply(w.matrix||Dn),et=BE.call(lt,w.key,w.boundingBox,w.xStep,w.yStep,Ct).id),G("q"),G("/Pattern cs"),G("/"+et+" scn"),lt.gState&&f.setGState(lt.gState),G(D),G("Q")}},SE=function(w){switch(w){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"}},dd=f.moveTo=function(w,D){return G(b(S(w))+" "+b(P(D))+" m"),this},ac=f.lineTo=function(w,D){return G(b(S(w))+" "+b(P(D))+" l"),this},xl=f.curveTo=function(w,D,et,lt,Ct,Rt){return G([b(S(w)),b(P(D)),b(S(et)),b(P(lt)),b(S(Ct)),b(P(Rt)),"c"].join(" ")),this};f.__private__.line=f.line=function(w,D,et,lt,Ct){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||!Ds(Ct))throw new Error("Invalid arguments passed to jsPDF.line");return E===_.COMPAT?this.lines([[et-w,lt-D]],w,D,[1,1],Ct||"S"):this.lines([[et-w,lt-D]],w,D,[1,1]).stroke()},f.__private__.lines=f.lines=function(w,D,et,lt,Ct,Rt){var jt,re,Fe,ur,Ke,Tr,Ji,Wn,fi,ha,ki,ss;if(typeof w=="number"&&(ss=et,et=D,D=w,w=ss),lt=lt||[1,1],Rt=Rt||!1,isNaN(D)||isNaN(et)||!Array.isArray(w)||!Array.isArray(lt)||!Ds(Ct)||typeof Rt!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(dd(D,et),jt=lt[0],re=lt[1],ur=w.length,ha=D,ki=et,Fe=0;Fe<ur;Fe++)(Ke=w[Fe]).length===2?(ha=Ke[0]*jt+ha,ki=Ke[1]*re+ki,ac(ha,ki)):(Tr=Ke[0]*jt+ha,Ji=Ke[1]*re+ki,Wn=Ke[2]*jt+ha,fi=Ke[3]*re+ki,ha=Ke[4]*jt+ha,ki=Ke[5]*re+ki,xl(Tr,Ji,Wn,fi,ha,ki));return Rt&&My(),pd(Ct),this},f.path=function(w){for(var D=0;D<w.length;D++){var et=w[D],lt=et.c;switch(et.op){case"m":dd(lt[0],lt[1]);break;case"l":ac(lt[0],lt[1]);break;case"c":xl.apply(this,lt);break;case"h":My()}}return this},f.__private__.rect=f.rect=function(w,D,et,lt,Ct){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||!Ds(Ct))throw new Error("Invalid arguments passed to jsPDF.rect");return E===_.COMPAT&&(lt=-lt),G([b(S(w)),b(P(D)),b(S(et)),b(S(lt)),"re"].join(" ")),pd(Ct),this},f.__private__.triangle=f.triangle=function(w,D,et,lt,Ct,Rt,jt){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||isNaN(Ct)||isNaN(Rt)||!Ds(jt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[et-w,lt-D],[Ct-et,Rt-lt],[w-Ct,D-Rt]],w,D,[1,1],jt,!0),this},f.__private__.roundedRect=f.roundedRect=function(w,D,et,lt,Ct,Rt,jt){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||isNaN(Ct)||isNaN(Rt)||!Ds(jt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var re=4/3*(Math.SQRT2-1);return Ct=Math.min(Ct,.5*et),Rt=Math.min(Rt,.5*lt),this.lines([[et-2*Ct,0],[Ct*re,0,Ct,Rt-Rt*re,Ct,Rt],[0,lt-2*Rt],[0,Rt*re,-Ct*re,Rt,-Ct,Rt],[2*Ct-et,0],[-Ct*re,0,-Ct,-Rt*re,-Ct,-Rt],[0,2*Rt-lt],[0,-Rt*re,Ct*re,-Rt,Ct,-Rt]],w+Ct,D,[1,1],jt,!0),this},f.__private__.ellipse=f.ellipse=function(w,D,et,lt,Ct){if(isNaN(w)||isNaN(D)||isNaN(et)||isNaN(lt)||!Ds(Ct))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Rt=4/3*(Math.SQRT2-1)*et,jt=4/3*(Math.SQRT2-1)*lt;return dd(w+et,D),xl(w+et,D-jt,w+Rt,D-lt,w,D-lt),xl(w-Rt,D-lt,w-et,D-jt,w-et,D),xl(w-et,D+jt,w-Rt,D+lt,w,D+lt),xl(w+Rt,D+lt,w+et,D+jt,w+et,D),pd(Ct),this},f.__private__.circle=f.circle=function(w,D,et,lt){if(isNaN(w)||isNaN(D)||isNaN(et)||!Ds(lt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(w,D,et,et,lt)},f.setFont=function(w,D,et){return et&&(D=O(D,et)),oe=Fy(w,D,{disableWarning:!1}),this};var xE=f.__private__.getFont=f.getFont=function(){return Ie[Fy.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var w,D,et={};for(w in xe)if(xe.hasOwnProperty(w))for(D in et[w]=[],xe[w])xe[w].hasOwnProperty(D)&&et[w].push(D);return et},f.addFont=function(w,D,et,lt,Ct){var Rt=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Rt.indexOf(arguments[3])!==-1?Ct=arguments[3]:arguments[3]&&Rt.indexOf(arguments[3])==-1&&(et=O(et,lt)),Ct=Ct||"Identity-H",cd.call(this,w,D,et,Ct)};var oc,vd=r.lineWidth||.200025,Kh=f.__private__.getLineWidth=f.getLineWidth=function(){return vd},Ny=f.__private__.setLineWidth=f.setLineWidth=function(w){return vd=w,G(b(S(w))+" w"),this};f.__private__.setLineDash=Ue.API.setLineDash=Ue.API.setLineDashPattern=function(w,D){if(w=w||[],D=D||0,isNaN(D)||!Array.isArray(w))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return w=w.map(function(et){return b(S(et))}).join(" "),D=b(S(D)),G("["+w+"] "+D+" d"),this};var Py=f.__private__.getLineHeight=f.getLineHeight=function(){return Et*oc};f.__private__.getLineHeight=f.getLineHeight=function(){return Et*oc};var Uy=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(w){return typeof(w=w||1.15)=="number"&&(oc=w),this},Dy=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return oc};Uy(r.lineHeight);var BA=f.__private__.getHorizontalCoordinate=function(w){return S(w)},bl=f.__private__.getVerticalCoordinate=function(w){return E===_.ADVANCED?w:Me[$].mediaBox.topRightY-Me[$].mediaBox.bottomLeftY-S(w)},bE=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(w){return b(BA(w))},Il=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(w){return b(bl(w))},os=r.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return Qt(os)},f.__private__.setStrokeColor=f.setDrawColor=function(w,D,et,lt){return os=qt({ch1:w,ch2:D,ch3:et,ch4:lt,pdfColorType:"draw",precision:2}),G(os),this};var gd=r.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return Qt(gd)},f.__private__.setFillColor=f.setFillColor=function(w,D,et,lt){return gd=qt({ch1:w,ch2:D,ch3:et,ch4:lt,pdfColorType:"fill",precision:2}),G(gd),this};var sc=r.textColor||"0 g",IE=f.__private__.getTextColor=f.getTextColor=function(){return Qt(sc)};f.__private__.setTextColor=f.setTextColor=function(w,D,et,lt){return sc=qt({ch1:w,ch2:D,ch3:et,ch4:lt,pdfColorType:"text",precision:3}),this};var zh=r.charSpace,FE=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(zh||0)};f.__private__.setCharSpace=f.setCharSpace=function(w){if(isNaN(w))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return zh=w,this};var yd=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(w){var D=f.CapJoinStyles[w];if(D===void 0)throw new Error("Line cap style of '"+w+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return yd=D,G(D+" J"),this};var md=0;f.__private__.setLineJoin=f.setLineJoin=function(w){var D=f.CapJoinStyles[w];if(D===void 0)throw new Error("Line join style of '"+w+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return md=D,G(D+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(w){if(w=w||0,isNaN(w))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return G(b(S(w))+" M"),this},f.GState=z_,f.setGState=function(w){(w=typeof w=="string"?Br[ci[w]]:Qy(null,w)).equals($r)||(G("/"+w.id+" gs"),$r=w)};var Qy=function(w,D){if(!w||!ci[w]){var et=!1;for(var lt in Br)if(Br.hasOwnProperty(lt)&&Br[lt].equals(D)){et=!0;break}if(et)D=Br[lt];else{var Ct="GS"+(Object.keys(Br).length+1).toString(10);Br[Ct]=D,D.id=Ct}return w&&(ci[w]=D.id),wr.publish("addGState",D),D}};f.addGState=function(w,D){return Qy(w,D),this},f.saveGraphicsState=function(){return G("q"),on.push({key:oe,size:Et,color:sc}),this},f.restoreGraphicsState=function(){G("Q");var w=on.pop();return oe=w.key,Et=w.size,sc=w.color,$r=null,this},f.setCurrentTransformationMatrix=function(w){return G(w.toString()+" cm"),this},f.comment=function(w){return G("#"+w),this};var Yh=function(w,D){var et=w||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return et},set:function(Rt){isNaN(Rt)||(et=parseFloat(Rt))}});var lt=D||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return lt},set:function(Rt){isNaN(Rt)||(lt=parseFloat(Rt))}});var Ct="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return Ct},set:function(Rt){Ct=Rt.toString()}}),this},_d=function(w,D,et,lt){Yh.call(this,w,D),this.type="rect";var Ct=et||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return Ct},set:function(jt){isNaN(jt)||(Ct=parseFloat(jt))}});var Rt=lt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Rt},set:function(jt){isNaN(jt)||(Rt=parseFloat(jt))}}),this},wd=function(){this.page=Vr,this.currentPage=$,this.pages=Ot.slice(0),this.pagesContext=Me.slice(0),this.x=Xe,this.y=Re,this.matrix=pr,this.width=Ac($),this.height=Fl($),this.outputDestination=Z,this.id="",this.objectNumber=-1};wd.prototype.restore=function(){Vr=this.page,$=this.currentPage,Me=this.pagesContext,Ot=this.pages,Xe=this.x,Re=this.y,pr=this.matrix,Ed($,this.width),Cd($,this.height),Z=this.outputDestination};var Hy=function(w,D,et,lt,Ct){xi.push(new wd),Vr=$=0,Ot=[],Xe=w,Re=D,pr=Ct,hd([et,lt])},LE=function(w){if(Si[w])xi.pop().restore();else{var D=new wd,et="Xo"+(Object.keys(fn).length+1).toString(10);D.id=et,Si[w]=et,fn[et]=D,wr.publish("addFormObject",D),xi.pop().restore()}};for(var Xh in f.beginFormObject=function(w,D,et,lt,Ct){return Hy(w,D,et,lt,Ct),this},f.endFormObject=function(w){return LE(w),this},f.doFormObject=function(w,D){var et=fn[Si[w]];return G("q"),G(D.toString()+" cm"),G("/"+et.id+" Do"),G("Q"),this},f.getFormObject=function(w){var D=fn[Si[w]];return{x:D.x,y:D.y,width:D.width,height:D.height,matrix:D.matrix}},f.save=function(w,D){return w=w||"generated.pdf",(D=D||{}).returnPromise=D.returnPromise||!1,D.returnPromise===!1?(bc($h(CA()),w),typeof bc.unload=="function"&&He.setTimeout&&setTimeout(bc.unload,911),this):new Promise(function(et,lt){try{var Ct=bc($h(CA()),w);typeof bc.unload=="function"&&He.setTimeout&&setTimeout(bc.unload,911),et(Ct)}catch(Rt){lt(Rt.message)}})},Ue.API)Ue.API.hasOwnProperty(Xh)&&(Xh==="events"&&Ue.API.events.length?function(w,D){var et,lt,Ct;for(Ct=D.length-1;Ct!==-1;Ct--)et=D[Ct][0],lt=D[Ct][1],w.subscribe.apply(w,[et].concat(typeof lt=="function"?[lt]:lt))}(wr,Ue.API.events):f[Xh]=Ue.API[Xh]);var Ac=f.getPageWidth=function(w){return(Me[w=w||$].mediaBox.topRightX-Me[w].mediaBox.bottomLeftX)/Kt},Ed=f.setPageWidth=function(w,D){Me[w].mediaBox.topRightX=D*Kt+Me[w].mediaBox.bottomLeftX},Fl=f.getPageHeight=function(w){return(Me[w=w||$].mediaBox.topRightY-Me[w].mediaBox.bottomLeftY)/Kt},Cd=f.setPageHeight=function(w,D){Me[w].mediaBox.topRightY=D*Kt+Me[w].mediaBox.bottomLeftY};return f.internal={pdfEscape:Ya,getStyle:Ry,getFont:xE,getFontSize:St,getCharSpace:FE,getTextColor:IE,getLineHeight:Py,getLineHeightFactor:Dy,getLineWidth:Kh,write:xt,getHorizontalCoordinate:BA,getVerticalCoordinate:bl,getCoordinateString:bE,getVerticalCoordinateString:Il,collections:{},newObject:en,newAdditionalObject:mo,newObjectDeferred:qr,newObjectDeferredBegin:En,getFilters:er,putStream:Or,events:wr,scaleFactor:Kt,pageSize:{getWidth:function(){return Ac($)},setWidth:function(w){Ed($,w)},getHeight:function(){return Fl($)},setHeight:function(w){Cd($,w)}},encryptionOptions:u,encryption:ca,getEncryptor:wE,output:Vh,getNumberOfPages:vE,pages:Ot,out:G,f2:M,f3:x,getPageInfo:Oy,getPageInfoByObjId:Ve,getCurrentPageInfo:EE,getPDFVersion:v,Point:Yh,Rectangle:_d,Matrix:be,hasHotfix:Ly},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return Ac($)},set:function(w){Ed($,w)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return Fl($)},set:function(w){Cd($,w)},enumerable:!0,configurable:!0}),pE.call(f,dt),oe="F1",by(i,t),wr.publish("initialized"),f}Uf.prototype.lsbFirstWord=function(r){return String.fromCharCode(r>>0&255,r>>8&255,r>>16&255,r>>24&255)},Uf.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Uf.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("")},Uf.prototype.processOwnerPassword=function(r,e){return qS(WS(e).substr(0,5),r)},Uf.prototype.encryptor=function(r,e){var t=WS(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return qS(t,n)}},z_.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||tn(r)!==tn(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},Ue.API={events:[]},Ue.version="2.5.0";var Hn=Ue.API,RF=1,Rh=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},df=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},ze=function(r){return r.toFixed(2)},Zl=function(r){return r.toFixed(5)};Hn.__acroform__={};var go=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},yN=function(r){return r*RF},Vs=function(r){var e=new E8,t=ve.internal.getHeight(r)||0,n=ve.internal.getWidth(r)||0;return e.BBox=[0,0,Number(ze(n)),Number(ze(t))],e},UAt=Hn.__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},DAt=Hn.__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)},QAt=Hn.__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},ri=Hn.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return QAt(r,e-1)},ni=Hn.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return UAt(r,e-1)},ii=Hn.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return DAt(r,e-1)},HAt=Hn.__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(ze(A.lowerLeft_X)),Number(ze(A.lowerLeft_Y)),Number(ze(A.upperRight_X)),Number(ze(A.upperRight_Y))]},GAt=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,n=ZS(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+" "+ze(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=Vs(r);return a.scope=r.scope,a.stream=e.join(`
`),a}},ZS=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(x){return x.split(`
`)}):i.map(function(x){return[x]});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(x,S,N){if(x+1<i.length){var P=S+" "+i[x+1][0];return Dm(P,r,N).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var l,u,c=Dm("3",r,a).height,h=r.multiline?o-a:(o-c)/2,f=h+=2,p=0,v=0,m=0;if(a<=0){e=`(...) Tj
`,e+="% Width of Text: "+Dm(e,r,a=12).width+", FieldWidth:"+s+`
`;break}for(var g="",_=0,E=0;E<i.length;E++)if(i.hasOwnProperty(E)){var B=!1;if(i[E].length!==1&&m!==i[E].length-1){if((c+2)*(_+2)+2>o)continue t;g+=i[E][m],B=!0,v=E,E--}else{g=(g+=i[E][m]+" ").substr(g.length-1)==" "?g.substr(0,g.length-1):g;var L=parseInt(E),O=A(L,g,a),b=E>=i.length-1;if(O&&!b){g+=" ",m=0;continue}if(O||b){if(b)v=L;else if(r.multiline&&(c+2)*(_+2)+2>o)continue t}else{if(!r.multiline||(c+2)*(_+2)+2>o)continue t;v=L}}for(var T="",I=p;I<=v;I++){var M=i[I];if(r.multiline){if(I===v){T+=M[m]+" ",m=(m+1)%M.length;continue}if(I===p){T+=M[M.length-1]+" ";continue}}T+=M[0]+" "}switch(T=T.substr(T.length-1)==" "?T.substr(0,T.length-1):T,u=Dm(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+=ze(l)+" "+ze(f)+` Td
`,e+="("+Rh(T)+`) Tj
`,e+=-ze(l)+` 0 Td
`,f=-(a+2),u=0,p=B?v:v+1,_++,g=""}break}return n.text=e,n.fontSize=a,n},Dm=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}},kAt={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},$At=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)},VAt=function(r,e){for(var t in r)if(r.hasOwnProperty(t)){var n=t,i=r[t];e.internal.newObjectDeferredBegin(i.objId,!0),tn(i)==="object"&&typeof i.putStream=="function"&&i.putStream(),delete r[n]}},jAt=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(Ns.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(kAt)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");RF=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new C8,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&&$At(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=HAt(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=ve.createDefaultAppearanceStream(s),tn(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(A=s.getKeyValueListForStream()),s.Rect=l,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=GAt(s);A.push({key:"AP",value:"<</N "+u+">>"}),i.internal.acroformPlugin.xForms.push(u)}if(s.appearanceStreamContent){var c="";for(var h in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(h)){var f=s.appearanceStreamContent[h];if(c+="/"+h+" ",c+="<<",Object.keys(f).length>=1||Array.isArray(f)){for(var o in f)if(f.hasOwnProperty(o)){var p=f[o];typeof p=="function"&&(p=p.call(i,s)),c+="/"+o+" "+p+" ",i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p)}}else typeof(p=f)=="function"&&(p=p.call(i,s)),c+="/"+o+" "+p,i.internal.acroformPlugin.xForms.indexOf(p)>=0||i.internal.acroformPlugin.xForms.push(p);c+=">>"}A.push({key:"AP",value:`<<
`+c+">>"})}i.internal.putStream({additionalKeyValues:A,objectId:s.objId}),i.internal.out("endobj")}a&&VAt(i.internal.acroformPlugin.xForms,i)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},w8=Hn.__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+=" "),tn(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+="("+Rh(n(r[a].toString()))+")"):i+=r[a].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},VC=function(r,e,t){var n=function(i){return i};return e!==void 0&&t&&(n=t.internal.getEncryptor(e)),(r=r||"").toString(),r="("+Rh(n(r))+")"},eA=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})};eA.prototype.toString=function(){return this.objId+" 0 R"},eA.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},eA.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:w8(i,this.objId,this.scope)}):i instanceof eA?(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 E8=function(){eA.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}})};go(E8,eA);var C8=function(){eA.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)),"("+Rh(t(r))+")"}},set:function(t){r=t}})};go(C8,eA);var Ns=function r(){eA.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(g){if(isNaN(g))throw new Error('Invalid value "'+g+'" for attribute F supplied.');e=g}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(e,3))},set:function(g){Boolean(g)===!0?this.F=ni(e,3):this.F=ii(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(g){if(isNaN(g))throw new Error('Invalid value "'+g+'" for attribute Ff supplied.');t=g}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(g){n=g!==void 0?g:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(g){n[0]=g}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(g){n[1]=g}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(g){n[2]=g}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(g){n[3]=g}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(g){switch(g){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=g;break;default:throw new Error('Invalid value "'+g+'" 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 Y_)return;a="FieldObject"+r.FieldNum++}var g=function(_){return _};return this.scope&&(g=this.scope.internal.getEncryptor(this.objId)),"("+Rh(g(a))+")"},set:function(g){a=g.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(g){a=g}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(g){o=g}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(g){s=g}});var A=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return A},set:function(g){A=g}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/RF:l},set:function(g){l=g}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(g){u=g}});var c="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!c||this instanceof Y_||this instanceof Zc))return VC(c,this.objId,this.scope)},set:function(g){g=g.toString(),c=g}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof Xi?h:VC(h,this.objId,this.scope)},set:function(g){g=g.toString(),h=this instanceof Xi?g:g.substr(0,1)==="("?df(g.substr(1,g.length-2)):df(g)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Xi?df(h.substr(1,h.length-1)):h},set:function(g){g=g.toString(),h=this instanceof Xi?"/"+g:g}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(g){this.V=g}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof Xi?f:VC(f,this.objId,this.scope)},set:function(g){g=g.toString(),f=this instanceof Xi?g:g.substr(0,1)==="("?df(g.substr(1,g.length-2)):df(g)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Xi?df(f.substr(1,f.length-1)):f},set:function(g){g=g.toString(),f=this instanceof Xi?"/"+g:g}}),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 p,v=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return v},set:function(g){g=Boolean(g),v=g}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(g){p=g}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,1))},set:function(g){Boolean(g)===!0?this.Ff=ni(this.Ff,1):this.Ff=ii(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,2))},set:function(g){Boolean(g)===!0?this.Ff=ni(this.Ff,2):this.Ff=ii(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,3))},set:function(g){Boolean(g)===!0?this.Ff=ni(this.Ff,3):this.Ff=ii(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(m!==null)return m},set:function(g){if([0,1,2].indexOf(g)===-1)throw new Error('Invalid value "'+g+'" for attribute Q supplied.');m=g}}),Object.defineProperty(this,"textAlign",{get:function(){var g;switch(m){case 0:default:g="left";break;case 1:g="center";break;case 2:g="right"}return g},configurable:!0,enumerable:!0,set:function(g){switch(g){case"right":case 2:m=2;break;case"center":case 1:m=1;break;case"left":case 0:default:m=0}}})};go(Ns,eA);var cp=function(){Ns.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 w8(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(ri(this.Ff,18))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,18):this.Ff=ii(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,19))},set:function(t){this.combo===!0&&(Boolean(t)===!0?this.Ff=ni(this.Ff,19):this.Ff=ii(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,20))},set:function(t){Boolean(t)===!0?(this.Ff=ni(this.Ff,20),e.sort()):this.Ff=ii(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,22))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,22):this.Ff=ii(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,23))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,23):this.Ff=ii(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,27))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,27):this.Ff=ii(this.Ff,27)}}),this.hasAppearanceStream=!1};go(cp,Ns);var hp=function(){cp.call(this),this.fontName="helvetica",this.combo=!1};go(hp,cp);var fp=function(){hp.call(this),this.combo=!0};go(fp,hp);var $0=function(){fp.call(this),this.edit=!0};go($0,fp);var Xi=function(){Ns.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,15))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,15):this.Ff=ii(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,16))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,16):this.Ff=ii(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,17))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,17):this.Ff=ii(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,26))},set:function(t){Boolean(t)===!0?this.Ff=ni(this.Ff,26):this.Ff=ii(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+" ("+Rh(t(e[n]))+")");return i.push(">>"),i.join(`
`)}},set:function(t){tn(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}})};go(Xi,Ns);var V0=function(){Xi.call(this),this.pushButton=!0};go(V0,Xi);var pp=function(){Xi.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:[]}})};go(pp,Xi);var Y_=function(){var r,e;Ns.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+" ("+Rh(i(n[a]))+")");return o.push(">>"),o.join(`
`)},set:function(i){tn(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)};go(Y_,Ns),pp.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()}},pp.prototype.createOption=function(r){var e=new Y_;return e.Parent=this,e.optionName=r,this.Kids.push(e),KAt.call(this.scope,e),e};var j0=function(){Xi.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=ve.CheckBox.createAppearanceStream()};go(j0,Xi);var Zc=function(){Ns.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,13))},set:function(e){Boolean(e)===!0?this.Ff=ni(this.Ff,13):this.Ff=ii(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,21))},set:function(e){Boolean(e)===!0?this.Ff=ni(this.Ff,21):this.Ff=ii(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,23))},set:function(e){Boolean(e)===!0?this.Ff=ni(this.Ff,23):this.Ff=ii(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,24))},set:function(e){Boolean(e)===!0?this.Ff=ni(this.Ff,24):this.Ff=ii(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,25))},set:function(e){Boolean(e)===!0?this.Ff=ni(this.Ff,25):this.Ff=ii(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,26))},set:function(e){Boolean(e)===!0?this.Ff=ni(this.Ff,26):this.Ff=ii(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}})};go(Zc,Ns);var K0=function(){Zc.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(ri(this.Ff,14))},set:function(r){Boolean(r)===!0?this.Ff=ni(this.Ff,14):this.Ff=ii(this.Ff,14)}}),this.password=!0};go(K0,Zc);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=Vs(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=ZS(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+ze(ve.internal.getWidth(r))+" "+ze(ve.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+ze(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=Vs(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=ZS(r,r.caption);return i.push("1 g"),i.push("0 0 "+ze(o)+" "+ze(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+ze(o-1)+" "+ze(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+ze(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
`),e},OffPushDown:function(r){var e=Vs(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+ze(ve.internal.getWidth(r))+" "+ze(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=Vs(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 "+Zl(ve.internal.getWidth(r)/2)+" "+Zl(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=Vs(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 "+Zl(ve.internal.getWidth(r)/2)+" "+Zl(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 "+Zl(ve.internal.getWidth(r)/2)+" "+Zl(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=Vs(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 "+Zl(ve.internal.getWidth(r)/2)+" "+Zl(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=Vs(r);e.scope=r.scope;var t=[],n=ve.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+ze(ve.internal.getWidth(r)-2)+" "+ze(ve.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(ze(n.x1.x)+" "+ze(n.x1.y)+" m"),t.push(ze(n.x2.x)+" "+ze(n.x2.y)+" l"),t.push(ze(n.x4.x)+" "+ze(n.x4.y)+" m"),t.push(ze(n.x3.x)+" "+ze(n.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(r){var e=Vs(r);e.scope=r.scope;var t=ve.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+ze(ve.internal.getWidth(r))+" "+ze(ve.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+ze(ve.internal.getWidth(r)-2)+" "+ze(ve.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(ze(t.x1.x)+" "+ze(t.x1.y)+" m"),n.push(ze(t.x2.x)+" "+ze(t.x2.y)+" l"),n.push(ze(t.x4.x)+" "+ze(t.x4.y)+" m"),n.push(ze(t.x3.x)+" "+ze(t.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
`),e},OffPushDown:function(r){var e=Vs(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+ze(ve.internal.getWidth(r))+" "+ze(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 tn(r)==="object"&&(e=yN(r.Rect[2])),e},ve.internal.getHeight=function(r){var e=0;return tn(r)==="object"&&(e=yN(r.Rect[3])),e};var KAt=Hn.addField=function(r){if(jAt(this,r),!(r instanceof Ns))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};Hn.AcroFormChoiceField=cp,Hn.AcroFormListBox=hp,Hn.AcroFormComboBox=fp,Hn.AcroFormEditBox=$0,Hn.AcroFormButton=Xi,Hn.AcroFormPushButton=V0,Hn.AcroFormRadioButton=pp,Hn.AcroFormCheckBox=j0,Hn.AcroFormTextField=Zc,Hn.AcroFormPasswordField=K0,Hn.AcroFormAppearance=ve,Hn.AcroForm={ChoiceField:cp,ListBox:hp,ComboBox:fp,EditBox:$0,Button:Xi,PushButton:V0,RadioButton:pp,CheckBox:j0,TextField:Zc,PasswordField:K0,Appearance:ve},Ue.AcroForm={ChoiceField:cp,ListBox:hp,ComboBox:fp,EditBox:$0,Button:Xi,PushButton:V0,RadioButton:pp,CheckBox:j0,TextField:Zc,PasswordField:K0,Appearance:ve};Ue.AcroForm;function B8(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(x,S){var N,P,X,z,tt,J=e;if((S=S||e)==="RGBA"||x.data!==void 0&&x.data instanceof Uint8ClampedArray&&"height"in x&&"width"in x)return"RGBA";if(O(x))for(tt in t)for(X=t[tt],N=0;N<X.length;N+=1){for(z=!0,P=0;P<X[N].length;P+=1)if(X[N][P]!==void 0&&X[N][P]!==x[P]){z=!1;break}if(z===!0){J=tt;break}}else for(tt in t)for(X=t[tt],N=0;N<X.length;N+=1){for(z=!0,P=0;P<X[N].length;P+=1)if(X[N][P]!==void 0&&X[N][P]!==x.charCodeAt(P)){z=!1;break}if(z===!0){J=tt;break}}return J===e&&S!==e&&(J=S),J},i=function x(S){for(var N=this.internal.write,P=this.internal.putStream,X=(0,this.internal.getFilters)();X.indexOf("FlateEncode")!==-1;)X.splice(X.indexOf("FlateEncode"),1);S.objectId=this.internal.newObject();var z=[];if(z.push({key:"Type",value:"/XObject"}),z.push({key:"Subtype",value:"/Image"}),z.push({key:"Width",value:S.width}),z.push({key:"Height",value:S.height}),S.colorSpace===m.INDEXED?z.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(S.palette.length/3-1)+" "+("sMask"in S&&S.sMask!==void 0?S.objectId+2:S.objectId+1)+" 0 R]"}):(z.push({key:"ColorSpace",value:"/"+S.colorSpace}),S.colorSpace===m.DEVICE_CMYK&&z.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),z.push({key:"BitsPerComponent",value:S.bitsPerComponent}),"decodeParameters"in S&&S.decodeParameters!==void 0&&z.push({key:"DecodeParms",value:"<<"+S.decodeParameters+">>"}),"transparency"in S&&Array.isArray(S.transparency)){for(var tt="",J=0,nt=S.transparency.length;J<nt;J++)tt+=S.transparency[J]+" "+S.transparency[J]+" ";z.push({key:"Mask",value:"["+tt+"]"})}S.sMask!==void 0&&z.push({key:"SMask",value:S.objectId+1+" 0 R"});var it=S.filter!==void 0?["/"+S.filter]:void 0;if(P({data:S.data,additionalKeyValues:z,alreadyAppliedFilters:it,objectId:S.objectId}),N("endobj"),"sMask"in S&&S.sMask!==void 0){var _t="/Predictor "+S.predictor+" /Colors 1 /BitsPerComponent "+S.bitsPerComponent+" /Columns "+S.width,R={width:S.width,height:S.height,colorSpace:"DeviceGray",bitsPerComponent:S.bitsPerComponent,decodeParameters:_t,data:S.sMask};"filter"in S&&(R.filter=S.filter),x.call(this,R)}if(S.colorSpace===m.INDEXED){var $=this.internal.newObject();P({data:T(new Uint8Array(S.palette)),objectId:$}),N("endobj")}},a=function(){var x=this.internal.collections.addImage_images;for(var S in x)i.call(this,x[S])},o=function(){var x,S=this.internal.collections.addImage_images,N=this.internal.write;for(var P in S)N("/I"+(x=S[P]).index,x.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 x=this.internal.collections.addImage_images;return s.call(this),x},l=function(){return Object.keys(this.internal.collections.addImage_images).length},u=function(x){return typeof r["process"+x.toUpperCase()]=="function"},c=function(x){return tn(x)==="object"&&x.nodeType===1},h=function(x,S){if(x.nodeName==="IMG"&&x.hasAttribute("src")){var N=""+x.getAttribute("src");if(N.indexOf("data:image/")===0)return Gv(unescape(N).split("base64,").pop());var P=r.loadFile(N,!0);if(P!==void 0)return P}if(x.nodeName==="CANVAS"){if(x.width===0||x.height===0)throw new Error("Given canvas must have data. Canvas width: "+x.width+", height: "+x.height);var X;switch(S){case"PNG":X="image/png";break;case"WEBP":X="image/webp";break;case"JPEG":case"JPG":default:X="image/jpeg"}return Gv(x.toDataURL(X,1).split("base64,").pop())}},f=function(x){var S=this.internal.collections.addImage_images;if(S){for(var N in S)if(x===S[N].alias)return S[N]}},p=function(x,S,N){return x||S||(x=-96,S=-96),x<0&&(x=-1*N.width*72/x/this.internal.scaleFactor),S<0&&(S=-1*N.height*72/S/this.internal.scaleFactor),x===0&&(x=S*N.width/N.height),S===0&&(S=x*N.height/N.width),[x,S]},v=function(x,S,N,P,X,z){var tt=p.call(this,N,P,X),J=this.internal.getCoordinateString,nt=this.internal.getVerticalCoordinateString,it=A.call(this);if(N=tt[0],P=tt[1],it[X.index]=X,z){z*=Math.PI/180;var _t=Math.cos(z),R=Math.sin(z),$=function(q){return q.toFixed(4)},K=[$(_t),$(R),$(-1*R),$(_t),0,0,"cm"]}this.internal.write("q"),z?(this.internal.write([1,"0","0",1,J(x),nt(S+P),"cm"].join(" ")),this.internal.write(K.join(" ")),this.internal.write([J(N),"0","0",J(P),"0","0","cm"].join(" "))):this.internal.write([J(N),"0","0",J(P),J(x),nt(S+P),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+X.index+" Do"),this.internal.write("Q")},m=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 g=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},_=r.__addimage__.sHashCode=function(x){var S,N,P=0;if(typeof x=="string")for(N=x.length,S=0;S<N;S++)P=(P<<5)-P+x.charCodeAt(S),P|=0;else if(O(x))for(N=x.byteLength/2,S=0;S<N;S++)P=(P<<5)-P+x[S],P|=0;return P},E=r.__addimage__.validateStringAsBase64=function(x){(x=x||"").toString().trim();var S=!0;return x.length===0&&(S=!1),x.length%4!=0&&(S=!1),/^[A-Za-z0-9+/]+$/.test(x.substr(0,x.length-2))===!1&&(S=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(x.substr(-2))===!1&&(S=!1),S},B=r.__addimage__.extractImageFromDataUrl=function(x){var S=(x=x||"").split("base64,"),N=null;if(S.length===2){var P=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(S[0]);Array.isArray(P)&&(N={mimeType:P[1],charset:P[2],data:S[1]})}return N},L=r.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};r.__addimage__.isArrayBuffer=function(x){return L()&&x instanceof ArrayBuffer};var O=r.__addimage__.isArrayBufferView=function(x){return L()&&typeof Uint32Array<"u"&&(x instanceof Int8Array||x instanceof Uint8Array||typeof Uint8ClampedArray<"u"&&x instanceof Uint8ClampedArray||x instanceof Int16Array||x instanceof Uint16Array||x instanceof Int32Array||x instanceof Uint32Array||x instanceof Float32Array||x instanceof Float64Array)},b=r.__addimage__.binaryStringToUint8Array=function(x){for(var S=x.length,N=new Uint8Array(S),P=0;P<S;P++)N[P]=x.charCodeAt(P);return N},T=r.__addimage__.arrayBufferToBinaryString=function(x){for(var S="",N=O(x)?x:new Uint8Array(x),P=0;P<N.length;P+=8192)S+=String.fromCharCode.apply(null,N.subarray(P,P+8192));return S};r.addImage=function(){var x,S,N,P,X,z,tt,J,nt;if(typeof arguments[1]=="number"?(S=e,N=arguments[1],P=arguments[2],X=arguments[3],z=arguments[4],tt=arguments[5],J=arguments[6],nt=arguments[7]):(S=arguments[1],N=arguments[2],P=arguments[3],X=arguments[4],z=arguments[5],tt=arguments[6],J=arguments[7],nt=arguments[8]),tn(x=arguments[0])==="object"&&!c(x)&&"imageData"in x){var it=x;x=it.imageData,S=it.format||S||e,N=it.x||N||0,P=it.y||P||0,X=it.w||it.width||X,z=it.h||it.height||z,tt=it.alias||tt,J=it.compression||J,nt=it.rotation||it.angle||nt}var _t=this.internal.getFilters();if(J===void 0&&_t.indexOf("FlateEncode")!==-1&&(J="SLOW"),isNaN(N)||isNaN(P))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var R=I.call(this,x,S,tt,J);return v.call(this,N,P,X,z,R,nt),this};var I=function(x,S,N,P){var X,z,tt;if(typeof x=="string"&&n(x)===e){x=unescape(x);var J=M(x,!1);(J!==""||(J=r.loadFile(x,!0))!==void 0)&&(x=J)}if(c(x)&&(x=h(x,S)),S=n(x,S),!u(S))throw new Error("addImage does not support files of type '"+S+"', please ensure that a plugin for '"+S+"' support is added.");if(((tt=N)==null||tt.length===0)&&(N=function(nt){return typeof nt=="string"||O(nt)?_(nt):O(nt.data)?_(nt.data):null}(x)),(X=f.call(this,N))||(L()&&(x instanceof Uint8Array||S==="RGBA"||(z=x,x=b(x))),X=this["process"+S.toUpperCase()](x,l.call(this),N,function(nt){return nt&&typeof nt=="string"&&(nt=nt.toUpperCase()),nt in r.image_compression?nt:g.NONE}(P),z)),!X)throw new Error("An unknown error occurred whilst processing the image.");return X},M=r.__addimage__.convertBase64ToBinaryString=function(x,S){var N;S=typeof S!="boolean"||S;var P,X="";if(typeof x=="string"){P=(N=B(x))!==null?N.data:x;try{X=Gv(P)}catch(z){if(S)throw E(P)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+z.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return X};r.getImageProperties=function(x){var S,N,P="";if(c(x)&&(x=h(x)),typeof x=="string"&&n(x)===e&&((P=M(x,!1))===""&&(P=r.loadFile(x)||""),x=P),N=n(x),!u(N))throw new Error("addImage does not support files of type '"+N+"', please ensure that a plugin for '"+N+"' support is added.");if(!L()||x instanceof Uint8Array||(x=b(x)),!(S=this["process"+N.toUpperCase()](x)))throw new Error("An unknown error occurred whilst processing the image");return S.fileType=N,S}})(Ue.API),function(r){var e=function(t){if(t!==void 0&&t!="")return!0};Ue.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,c=0;c<l.length&&!u;c++)switch((n=l[c]).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 h=0;h<l.length;h++){n=l[h];var f=this.internal.pdfEscape,p=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(),m=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(v.objId),_=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(g(n.contents))+")",a+=" /Popup "+m.objId+" 0 R",a+=" /P "+A.objId+" 0 R",a+=" /T ("+f(g(_))+") >>",v.content=a;var E=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 "+E,n.open&&(a+=" /Open true"),a+=" >>",m.content=a,this.internal.write(v.objId,"0 R",m.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(p(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 L=this.annotations._nameMap[n.options.name];n.options.pageNumber=L.page,n.options.top=L.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(p(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}}(Ue.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},c=r.__arabicParser__.resolveLigatures=function(v){var m=0,g=t,_="",E=0;for(m=0;m<v.length;m+=1)g[v.charCodeAt(m)]!==void 0?(E++,typeof(g=g[v.charCodeAt(m)])=="number"&&(_+=String.fromCharCode(g),g=t,E=0),m===v.length-1&&(g=t,_+=v.charAt(m-(E-1)),m-=E-1,E=0)):(g=t,_+=v.charAt(m-E),m-=E,E=0);return _};r.__arabicParser__.isArabicDiacritic=function(v){return v!==void 0&&n[v.charCodeAt(0)]!==void 0};var h=r.__arabicParser__.getCorrectForm=function(v,m,g){return o(v)?a(v)===!1?-1:!l(v)||!o(m)&&!o(g)||!o(g)&&s(m)||s(v)&&!o(m)||s(v)&&A(m)||s(v)&&s(m)?0:u(v)&&o(m)&&!s(m)&&o(g)&&l(g)?3:s(v)||!o(g)?1:2:-1},f=function(v){var m=0,g=0,_=0,E="",B="",L="",O=(v=v||"").split("\\s+"),b=[];for(m=0;m<O.length;m+=1){for(b.push(""),g=0;g<O[m].length;g+=1)E=O[m][g],B=O[m][g-1],L=O[m][g+1],o(E)?(_=h(E,B,L),b[m]+=_!==-1?String.fromCharCode(e[E.charCodeAt(0)][_]):E):b[m]+=E;b[m]=c(b[m])}return b.join(" ")},p=r.__arabicParser__.processArabic=r.processArabic=function(){var v,m=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,g=[];if(Array.isArray(m)){var _=0;for(g=[],_=0;_<m.length;_+=1)Array.isArray(m[_])?g.push([f(m[_][0]),m[_][1],m[_][2]]):g.push([f(m[_])]);v=g}else v=f(m);return typeof arguments[0]=="string"?v:(arguments[0].text=v,arguments[0])};r.events.push(["preProcessText",p])}(Ue.API),Ue.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}])}(Ue.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 c=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return c},set:function(v){c=v}});var h=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return h},set:function(v){h=v}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(v){f=v}});var p=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return p},set:function(v){p=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(),c=l.font||this.getFont(),h=l.scaleFactor||this.internal.scaleFactor,f=0,p=0,v=0,m=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 g=l.maxWidth;g>0?typeof A=="string"?A=this.splitTextToSize(A,g):Object.prototype.toString.call(A)==="[object Array]"&&(A=A.reduce(function(E,B){return E.concat(m.splitTextToSize(B,g))},[])):A=Array.isArray(A)?A:[A];for(var _=0;_<A.length;_++)f<(v=this.getStringUnitWidth(A[_],{font:c})*u)&&(f=v);return f!==0&&(p=A.length),{w:f/=h,h:Math.max((p*u*this.getLineHeightFactor()-u*(this.getLineHeightFactor()-1))/h,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,c=this.internal.__cell__.margins||e,h=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+c.bottom>this.getPageHeight()?(this.cellAddPage(),A.y=c.top,f&&h&&(this.printHeaderRow(A.lineNumber,!0),A.y+=h[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,c,h){if(n.call(this),!u)throw new Error("No data for PDF table.");var f,p,v,m,g=[],_=[],E=[],B={},L={},O=[],b=[],T=(h=h||{}).autoSize||!1,I=h.printHeaders!==!1,M=h.css&&h.css["font-size"]!==void 0?16*h.css["font-size"]:h.fontSize||12,x=h.margins||Object.assign({width:this.getPageWidth()},e),S=typeof h.padding=="number"?h.padding:3,N=h.headerBackgroundColor||"#c8c8c8",P=h.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=I,this.internal.__cell__.margins=x,this.internal.__cell__.table_font_size=M,this.internal.__cell__.padding=S,this.internal.__cell__.headerBackgroundColor=N,this.internal.__cell__.headerTextColor=P,this.setFontSize(M),c==null)_=g=Object.keys(u[0]),E=g.map(function(){return"left"});else if(Array.isArray(c)&&tn(c[0])==="object")for(g=c.map(function(it){return it.name}),_=c.map(function(it){return it.prompt||it.name||""}),E=c.map(function(it){return it.align||"left"}),f=0;f<c.length;f+=1)L[c[f].name]=c[f].width*(19.049976/25.4);else Array.isArray(c)&&typeof c[0]=="string"&&(_=g=c,E=g.map(function(){return"left"}));if(T||Array.isArray(c)&&typeof c[0]=="string")for(f=0;f<g.length;f+=1){for(B[m=g[f]]=u.map(function(it){return it[m]}),this.setFont(void 0,"bold"),O.push(this.getTextDimensions(_[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),p=B[m],this.setFont(void 0,"normal"),v=0;v<p.length;v+=1)O.push(this.getTextDimensions(p[v],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);L[m]=Math.max.apply(null,O)+S+S,O=[]}if(I){var X={};for(f=0;f<g.length;f+=1)X[g[f]]={},X[g[f]].text=_[f],X[g[f]].align=E[f];var z=s.call(this,X,L);b=g.map(function(it){return new a(A,l,L[it],z,X[it].text,void 0,X[it].align)}),this.setTableHeaderRow(b),this.printHeaderRow(1,!1)}var tt=c.reduce(function(it,_t){return it[_t.name]=_t.align,it},{});for(f=0;f<u.length;f+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:f,data:u[f]},this);var J=s.call(this,u[f],L);for(v=0;v<g.length;v+=1){var nt=u[f][g[v]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:f,col:v,data:nt},this),o.call(this,new a(A,l,L[g[v]],J,nt,f+2,tt[g[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,c=this.internal.__cell__.table_font_size,h=this.internal.scaleFactor;return Object.keys(A).map(function(f){var p=A[f];return this.splitTextToSize(p.hasOwnProperty("text")?p.text:p,l[f]-u-u)},this).map(function(f){return this.getLineHeightFactor()*f.length*c/h+u+u},this).reduce(function(f,p){return Math.max(f,p)},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 c=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(c[0],c[1],c[2],c[3],void 0,-1)}this.setFont(void 0,"bold");for(var h=[],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,h.push(u)),u.lineNumber=A;var p=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,u),this.setTextColor(p)}h.length>0&&this.setTableHeaderRow(h),this.setFont(void 0,"normal"),t=!1}}(Ue.API);var T8={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},S8=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],JS=B8(S8),x8=[100,200,300,400,500,600,700,800,900],zAt=B8(x8);function tx(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=function(a){return T8[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 JS[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 mN(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 YAt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},_N={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function wN(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function XAt(r,e,t){for(var n=(t=t||{}).defaultFontFamily||"times",i=Object.assign({},YAt,t.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=tx(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 '"+wN(a)+"' and default family '"+n+"'.");if(o=function(A,l){if(l[A])return l[A];var u=JS[A],c=u<=JS.normal?-1:1,h=mN(l,S8,u,c);if(!h)throw new Error("Could not find a matching font-stretch value for "+A);return h}(a.stretch,o),o=function(A,l){if(l[A])return l[A];for(var u=T8[A],c=0;c<u.length;++c)if(l[u[c]])return l[u[c]];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=zAt[A],c=mN(l,x8,u,A<400?-1:1);if(!c)throw new Error("Could not find a matching font-weight for value "+A);return c}(a.weight,o)))throw new Error("Failed to resolve a font for the rule '"+wN(a)+"'.");return o}function EN(r){return r.trimLeft()}function WAt(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 qAt(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 Qm,CN,BN,jC=["times"];(function(r){var e,t,n,i,a,o,s,A,l,u=function(R){return R=R||{},this.isStrokeTransparent=R.isStrokeTransparent||!1,this.strokeOpacity=R.strokeOpacity||1,this.strokeStyle=R.strokeStyle||"#000000",this.fillStyle=R.fillStyle||"#000000",this.isFillTransparent=R.isFillTransparent||!1,this.fillOpacity=R.fillOpacity||1,this.font=R.font||"10px sans-serif",this.textBaseline=R.textBaseline||"alphabetic",this.textAlign=R.textAlign||"left",this.lineWidth=R.lineWidth||1,this.lineJoin=R.lineJoin||"miter",this.lineCap=R.lineCap||"butt",this.path=R.path||[],this.transform=R.transform!==void 0?R.transform.clone():new A,this.globalCompositeOperation=R.globalCompositeOperation||"normal",this.globalAlpha=R.globalAlpha||1,this.clip_path=R.clip_path||[],this.currentPoint=R.currentPoint||new o,this.miterLimit=R.miterLimit||10,this.lastPoint=R.lastPoint||new o,this.lineDashOffset=R.lineDashOffset||0,this.lineDash=R.lineDash||[],this.margin=R.margin||[0,0,0,0],this.prevPageLastElemOffset=R.prevPageLastElemOffset||0,this.ignoreClearRect=typeof R.ignoreClearRect!="boolean"||R.ignoreClearRect,this};r.events.push(["initialized",function(){this.context2d=new c(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 c=function(R){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var $=R;Object.defineProperty(this,"pdf",{get:function(){return $}});var K=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return K},set:function(rt){K=Boolean(rt)}});var q=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return q},set:function(rt){q=Boolean(rt)}});var at=0;Object.defineProperty(this,"posX",{get:function(){return at},set:function(rt){isNaN(rt)||(at=rt)}});var vt=0;Object.defineProperty(this,"posY",{get:function(){return vt},set:function(rt){isNaN(rt)||(vt=rt)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(rt){var G;typeof rt=="number"?G=[rt,rt,rt,rt]:((G=new Array(4))[0]=rt[0],G[1]=rt.length>=2?rt[1]:G[0],G[2]=rt.length>=3?rt[2]:G[0],G[3]=rt.length>=4?rt[3]:G[1]),l.margin=G}});var wt=!1;Object.defineProperty(this,"autoPaging",{get:function(){return wt},set:function(rt){wt=rt}});var W=0;Object.defineProperty(this,"lastBreak",{get:function(){return W},set:function(rt){W=rt}});var It=[];Object.defineProperty(this,"pageBreaks",{get:function(){return It},set:function(rt){It=rt}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(rt){rt instanceof u&&(l=rt)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(rt){l.path=rt}});var Ot=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ot},set:function(rt){Ot=rt}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(rt){var G;G=h(rt),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(rt){var G=h(rt);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(rt){["butt","round","square"].indexOf(rt)!==-1&&(this.ctx.lineCap=rt,this.pdf.setLineCap(rt))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(rt){isNaN(rt)||(this.ctx.lineWidth=rt,this.pdf.setLineWidth(rt))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(rt){["bevel","round","miter"].indexOf(rt)!==-1&&(this.ctx.lineJoin=rt,this.pdf.setLineJoin(rt))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(rt){isNaN(rt)||(this.ctx.miterLimit=rt,this.pdf.setMiterLimit(rt))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(rt){this.ctx.textBaseline=rt}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(rt){["right","end","center","left","start"].indexOf(rt)!==-1&&(this.ctx.textAlign=rt)}});var j=null;function Z(rt,G){if(j===null){var xt=function(bt){var dt=[];return Object.keys(bt).forEach(function(Et){bt[Et].forEach(function(yt){var St=null;switch(yt){case"bold":St={family:Et,weight:"bold"};break;case"italic":St={family:Et,style:"italic"};break;case"bolditalic":St={family:Et,weight:"bold",style:"italic"};break;case"":case"normal":St={family:Et}}St!==null&&(St.ref={name:Et,style:yt},dt.push(St))})}),dt}(rt.getFontList());j=function(bt){for(var dt={},Et=0;Et<bt.length;++Et){var yt=tx(bt[Et]),St=yt.family,Ft=yt.stretch,Mt=yt.style,Vt=yt.weight;dt[St]=dt[St]||{},dt[St][Ft]=dt[St][Ft]||{},dt[St][Ft][Mt]=dt[St][Ft][Mt]||{},dt[St][Ft][Mt][Vt]=yt}return dt}(xt.concat(G))}return j}var ut=null;Object.defineProperty(this,"fontFaces",{get:function(){return ut},set:function(rt){j=null,ut=rt}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(rt){var G;if(this.ctx.font=rt,(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(rt))!==null){var xt=G[1],bt=(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 St=function(Xt){var oe,Kt,Xe=[],Re=Xt.trim();if(Re==="")return jC;if(Re in _N)return[_N[Re]];for(;Re!=="";){switch(Kt=null,oe=(Re=EN(Re)).charAt(0)){case'"':case"'":Kt=WAt(Re.substring(1),oe);break;default:Kt=qAt(Re)}if(Kt===null||(Xe.push(Kt[0]),(Re=EN(Kt[1]))!==""&&Re.charAt(0)!==","))return jC;Re=Re.replace(/^,/,"")}return Xe}(Et);if(this.fontFaces){var Ft=XAt(Z(this.pdf,this.fontFaces),St.map(function(Xt){return{family:Xt,stretch:"normal",weight:bt,style:xt}}));this.pdf.setFont(Ft.ref.name,Ft.ref.style)}else{var Mt="";(bt==="bold"||parseInt(bt,10)>=700||xt==="bold")&&(Mt="bold"),xt==="italic"&&(Mt+="italic"),Mt.length===0&&(Mt="normal");for(var Vt="",Yt={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<St.length;ie++){if(this.pdf.internal.getFont(St[ie],Mt,{noFallback:!0,disableWarning:!0})!==void 0){Vt=St[ie];break}if(Mt==="bolditalic"&&this.pdf.internal.getFont(St[ie],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Vt=St[ie],Mt="bold";else if(this.pdf.internal.getFont(St[ie],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Vt=St[ie],Mt="normal";break}}if(Vt===""){for(var ee=0;ee<St.length;ee++)if(Yt[St[ee]]){Vt=Yt[St[ee]];break}}Vt=Vt===""?"Times":Vt,this.pdf.setFont(Vt,Mt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(rt){this.ctx.globalCompositeOperation=rt}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(rt){this.ctx.globalAlpha=rt}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(rt){this.ctx.lineDashOffset=rt,_t.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(rt){this.ctx.lineDash=rt,_t.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(rt){this.ctx.ignoreClearRect=Boolean(rt)}})};c.prototype.setLineDash=function(R){this.lineDash=R},c.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},c.prototype.fill=function(){B.call(this,"fill",!1)},c.prototype.stroke=function(){B.call(this,"stroke",!1)},c.prototype.beginPath=function(){this.path=[{type:"begin"}]},c.prototype.moveTo=function(R,$){if(isNaN(R)||isNaN($))throw ln.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var K=this.ctx.transform.applyToPoint(new o(R,$));this.path.push({type:"mt",x:K.x,y:K.y}),this.ctx.lastPoint=new o(R,$)},c.prototype.closePath=function(){var R=new o(0,0),$=0;for($=this.path.length-1;$!==-1;$--)if(this.path[$].type==="begin"&&tn(this.path[$+1])==="object"&&typeof this.path[$+1].x=="number"){R=new o(this.path[$+1].x,this.path[$+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(R.x,R.y)},c.prototype.lineTo=function(R,$){if(isNaN(R)||isNaN($))throw ln.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var K=this.ctx.transform.applyToPoint(new o(R,$));this.path.push({type:"lt",x:K.x,y:K.y}),this.ctx.lastPoint=new o(K.x,K.y)},c.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),B.call(this,null,!0)},c.prototype.quadraticCurveTo=function(R,$,K,q){if(isNaN(K)||isNaN(q)||isNaN(R)||isNaN($))throw ln.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var at=this.ctx.transform.applyToPoint(new o(K,q)),vt=this.ctx.transform.applyToPoint(new o(R,$));this.path.push({type:"qct",x1:vt.x,y1:vt.y,x:at.x,y:at.y}),this.ctx.lastPoint=new o(at.x,at.y)},c.prototype.bezierCurveTo=function(R,$,K,q,at,vt){if(isNaN(at)||isNaN(vt)||isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw ln.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var wt=this.ctx.transform.applyToPoint(new o(at,vt)),W=this.ctx.transform.applyToPoint(new o(R,$)),It=this.ctx.transform.applyToPoint(new o(K,q));this.path.push({type:"bct",x1:W.x,y1:W.y,x2:It.x,y2:It.y,x:wt.x,y:wt.y}),this.ctx.lastPoint=new o(wt.x,wt.y)},c.prototype.arc=function(R,$,K,q,at,vt){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q)||isNaN(at))throw ln.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(vt=Boolean(vt),!this.ctx.transform.isIdentity){var wt=this.ctx.transform.applyToPoint(new o(R,$));R=wt.x,$=wt.y;var W=this.ctx.transform.applyToPoint(new o(0,K)),It=this.ctx.transform.applyToPoint(new o(0,0));K=Math.sqrt(Math.pow(W.x-It.x,2)+Math.pow(W.y-It.y,2))}Math.abs(at-q)>=2*Math.PI&&(q=0,at=2*Math.PI),this.path.push({type:"arc",x:R,y:$,radius:K,startAngle:q,endAngle:at,counterclockwise:vt})},c.prototype.arcTo=function(R,$,K,q,at){throw new Error("arcTo not implemented.")},c.prototype.rect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw ln.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(R,$),this.lineTo(R+K,$),this.lineTo(R+K,$+q),this.lineTo(R,$+q),this.lineTo(R,$),this.lineTo(R+K,$),this.lineTo(R,$)},c.prototype.fillRect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw ln.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var at={};this.lineCap!=="butt"&&(at.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(at.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(R,$,K,q),this.fill(),at.hasOwnProperty("lineCap")&&(this.lineCap=at.lineCap),at.hasOwnProperty("lineJoin")&&(this.lineJoin=at.lineJoin)}},c.prototype.strokeRect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw ln.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(R,$,K,q),this.stroke())},c.prototype.clearRect=function(R,$,K,q){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q))throw ln.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(R,$,K,q))},c.prototype.save=function(R){R=typeof R!="boolean"||R;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("q");if(this.pdf.setPage($),R){this.ctx.fontSize=this.pdf.internal.getFontSize();var q=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=q}},c.prototype.restore=function(R){R=typeof R!="boolean"||R;for(var $=this.pdf.internal.getCurrentPageInfo().pageNumber,K=0;K<this.pdf.internal.getNumberOfPages();K++)this.pdf.setPage(K+1),this.pdf.internal.out("Q");this.pdf.setPage($),R&&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)},c.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var h=function(R){var $,K,q,at;if(R.isCanvasGradient===!0&&(R=R.getColor()),!R)return{r:0,g:0,b:0,a:0,style:R};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(R))$=0,K=0,q=0,at=0;else{var vt=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(R);if(vt!==null)$=parseInt(vt[1]),K=parseInt(vt[2]),q=parseInt(vt[3]),at=1;else if((vt=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(R))!==null)$=parseInt(vt[1]),K=parseInt(vt[2]),q=parseInt(vt[3]),at=parseFloat(vt[4]);else{if(at=1,typeof R=="string"&&R.charAt(0)!=="#"){var wt=new y8(R);R=wt.ok?wt.toHex():"#000000"}R.length===4?($=R.substring(1,2),$+=$,K=R.substring(2,3),K+=K,q=R.substring(3,4),q+=q):($=R.substring(1,3),K=R.substring(3,5),q=R.substring(5,7)),$=parseInt($,16),K=parseInt(K,16),q=parseInt(q,16)}}return{r:$,g:K,b:q,a:at,style:R}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},p=function(){return Boolean(this.ctx.isStrokeTransparent||this.globalAlpha==0)};c.prototype.fillText=function(R,$,K,q){if(isNaN($)||isNaN(K)||typeof R!="string")throw ln.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(q=isNaN(q)?void 0:q,!f.call(this)){var at=J(this.ctx.transform.rotation),vt=this.ctx.transform.scaleX;S.call(this,{text:R,x:$,y:K,scale:vt,angle:at,align:this.textAlign,maxWidth:q})}},c.prototype.strokeText=function(R,$,K,q){if(isNaN($)||isNaN(K)||typeof R!="string")throw ln.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!p.call(this)){q=isNaN(q)?void 0:q;var at=J(this.ctx.transform.rotation),vt=this.ctx.transform.scaleX;S.call(this,{text:R,x:$,y:K,scale:vt,renderingMode:"stroke",angle:at,align:this.textAlign,maxWidth:q})}},c.prototype.measureText=function(R){if(typeof R!="string")throw ln.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var $=this.pdf,K=this.pdf.internal.scaleFactor,q=$.internal.getFontSize(),at=$.getStringUnitWidth(R)*q/$.internal.scaleFactor,vt=function(wt){var W=(wt=wt||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return W}}),this};return new vt({width:at*=Math.round(96*K/72*1e4)/1e4})},c.prototype.scale=function(R,$){if(isNaN(R)||isNaN($))throw ln.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var K=new A(R,0,0,$,0,0);this.ctx.transform=this.ctx.transform.multiply(K)},c.prototype.rotate=function(R){if(isNaN(R))throw ln.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var $=new A(Math.cos(R),Math.sin(R),-Math.sin(R),Math.cos(R),0,0);this.ctx.transform=this.ctx.transform.multiply($)},c.prototype.translate=function(R,$){if(isNaN(R)||isNaN($))throw ln.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var K=new A(1,0,0,1,R,$);this.ctx.transform=this.ctx.transform.multiply(K)},c.prototype.transform=function(R,$,K,q,at,vt){if(isNaN(R)||isNaN($)||isNaN(K)||isNaN(q)||isNaN(at)||isNaN(vt))throw ln.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var wt=new A(R,$,K,q,at,vt);this.ctx.transform=this.ctx.transform.multiply(wt)},c.prototype.setTransform=function(R,$,K,q,at,vt){R=isNaN(R)?1:R,$=isNaN($)?0:$,K=isNaN(K)?0:K,q=isNaN(q)?1:q,at=isNaN(at)?0:at,vt=isNaN(vt)?0:vt,this.ctx.transform=new A(R,$,K,q,at,vt)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};c.prototype.drawImage=function(R,$,K,q,at,vt,wt,W,It){var Ot=this.pdf.getImageProperties(R),j=1,Z=1,ut=1,rt=1;q!==void 0&&W!==void 0&&(ut=W/q,rt=It/at,j=Ot.width/q*W/q,Z=Ot.height/at*It/at),vt===void 0&&(vt=$,wt=K,$=0,K=0),q!==void 0&&W===void 0&&(W=q,It=at),q===void 0&&W===void 0&&(W=Ot.width,It=Ot.height);for(var G,xt=this.ctx.transform.decompose(),bt=J(xt.rotate.shx),dt=new A,Et=(dt=(dt=(dt=dt.multiply(xt.translate)).multiply(xt.skew)).multiply(xt.scale)).applyToRectangle(new s(vt-$*ut,wt-K*rt,q*j,at*Z)),yt=m.call(this,Et),St=[],Ft=0;Ft<yt.length;Ft+=1)St.indexOf(yt[Ft])===-1&&St.push(yt[Ft]);if(E(St),this.autoPaging)for(var Mt=St[0],Vt=St[St.length-1],Yt=Mt;Yt<Vt+1;Yt++){this.pdf.setPage(Yt);var ie=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],ee=Yt===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=Yt===1?0:Xt+(Yt-2)*oe;if(this.ctx.clip_path.length!==0){var Xe=this.path;G=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(G,this.posX+this.margin[3],-Kt+ee+this.ctx.prevPageLastElemOffset),L.call(this,"fill",!0),this.path=Xe}var Re=JSON.parse(JSON.stringify(Et));Re=_([Re],this.posX+this.margin[3],-Kt+ee+this.ctx.prevPageLastElemOffset)[0];var pr=(Yt>Mt||Yt<Vt)&&v.call(this);pr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ie,oe,null).clip().discardPath()),this.pdf.addImage(R,"JPEG",Re.x,Re.y,Re.w,Re.h,null,null,bt),pr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(R,"JPEG",Et.x,Et.y,Et.w,Et.h,null,null,bt)};var m=function(R,$,K){var q=[];$=$||this.pdf.internal.pageSize.width,K=K||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var at=this.posY+this.ctx.prevPageLastElemOffset;switch(R.type){default:case"mt":case"lt":q.push(Math.floor((R.y+at)/K)+1);break;case"arc":q.push(Math.floor((R.y+at-R.radius)/K)+1),q.push(Math.floor((R.y+at+R.radius)/K)+1);break;case"qct":var vt=nt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,R.x1,R.y1,R.x,R.y);q.push(Math.floor((vt.y+at)/K)+1),q.push(Math.floor((vt.y+vt.h+at)/K)+1);break;case"bct":var wt=it(this.ctx.lastPoint.x,this.ctx.lastPoint.y,R.x1,R.y1,R.x2,R.y2,R.x,R.y);q.push(Math.floor((wt.y+at)/K)+1),q.push(Math.floor((wt.y+wt.h+at)/K)+1);break;case"rect":q.push(Math.floor((R.y+at)/K)+1),q.push(Math.floor((R.y+R.h+at)/K)+1)}for(var W=0;W<q.length;W+=1)for(;this.pdf.internal.getNumberOfPages()<q[W];)g.call(this);return q},g=function(){var R=this.fillStyle,$=this.strokeStyle,K=this.font,q=this.lineCap,at=this.lineWidth,vt=this.lineJoin;this.pdf.addPage(),this.fillStyle=R,this.strokeStyle=$,this.font=K,this.lineCap=q,this.lineWidth=at,this.lineJoin=vt},_=function(R,$,K){for(var q=0;q<R.length;q++)switch(R[q].type){case"bct":R[q].x2+=$,R[q].y2+=K;case"qct":R[q].x1+=$,R[q].y1+=K;case"mt":case"lt":case"arc":default:R[q].x+=$,R[q].y+=K}return R},E=function(R){return R.sort(function($,K){return $-K})},B=function(R,$){for(var K,q,at=this.fillStyle,vt=this.strokeStyle,wt=this.lineCap,W=this.lineWidth,It=Math.abs(W*this.ctx.transform.scaleX),Ot=this.lineJoin,j=JSON.parse(JSON.stringify(this.path)),Z=JSON.parse(JSON.stringify(this.path)),ut=[],rt=0;rt<Z.length;rt++)if(Z[rt].x!==void 0)for(var G=m.call(this,Z[rt]),xt=0;xt<G.length;xt+=1)ut.indexOf(G[xt])===-1&&ut.push(G[xt]);for(var bt=0;bt<ut.length;bt++)for(;this.pdf.internal.getNumberOfPages()<ut[bt];)g.call(this);if(E(ut),this.autoPaging)for(var dt=ut[0],Et=ut[ut.length-1],yt=dt;yt<Et+1;yt++){this.pdf.setPage(yt),this.fillStyle=at,this.strokeStyle=vt,this.lineCap=wt,this.lineWidth=It,this.lineJoin=Ot;var St=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Ft=yt===1?this.posY+this.margin[0]:this.margin[0],Mt=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],Yt=yt===1?0:Mt+(yt-2)*Vt;if(this.ctx.clip_path.length!==0){var ie=this.path;K=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(K,this.posX+this.margin[3],-Yt+Ft+this.ctx.prevPageLastElemOffset),L.call(this,R,!0),this.path=ie}if(q=JSON.parse(JSON.stringify(j)),this.path=_(q,this.posX+this.margin[3],-Yt+Ft+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],St,Vt,null).clip().discardPath()),L.call(this,R,$),ee&&this.pdf.restoreGraphicsState()}this.lineWidth=W}else this.lineWidth=It,L.call(this,R,$),this.lineWidth=W;this.path=j},L=function(R,$){if((R!=="stroke"||$||!p.call(this))&&(R==="stroke"||$||!f.call(this))){for(var K,q,at=[],vt=this.path,wt=0;wt<vt.length;wt++){var W=vt[wt];switch(W.type){case"begin":at.push({begin:!0});break;case"close":at.push({close:!0});break;case"mt":at.push({start:W,deltas:[],abs:[]});break;case"lt":var It=at.length;if(vt[wt-1]&&!isNaN(vt[wt-1].x)&&(K=[W.x-vt[wt-1].x,W.y-vt[wt-1].y],It>0)){for(;It>=0;It--)if(at[It-1].close!==!0&&at[It-1].begin!==!0){at[It-1].deltas.push(K),at[It-1].abs.push(W);break}}break;case"bct":K=[W.x1-vt[wt-1].x,W.y1-vt[wt-1].y,W.x2-vt[wt-1].x,W.y2-vt[wt-1].y,W.x-vt[wt-1].x,W.y-vt[wt-1].y],at[at.length-1].deltas.push(K);break;case"qct":var Ot=vt[wt-1].x+2/3*(W.x1-vt[wt-1].x),j=vt[wt-1].y+2/3*(W.y1-vt[wt-1].y),Z=W.x+2/3*(W.x1-W.x),ut=W.y+2/3*(W.y1-W.y),rt=W.x,G=W.y;K=[Ot-vt[wt-1].x,j-vt[wt-1].y,Z-vt[wt-1].x,ut-vt[wt-1].y,rt-vt[wt-1].x,G-vt[wt-1].y],at[at.length-1].deltas.push(K);break;case"arc":at.push({deltas:[],abs:[],arc:!0}),Array.isArray(at[at.length-1].abs)&&at[at.length-1].abs.push(W)}}q=$?null:R==="stroke"?"stroke":"fill";for(var xt=!1,bt=0;bt<at.length;bt++)if(at[bt].arc)for(var dt=at[bt].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,$,!xt):N.call(this,yt.x,yt.y),xt=!0}else if(at[bt].close===!0)this.pdf.internal.out("h"),xt=!1;else if(at[bt].begin!==!0){var St=at[bt].start.x,Ft=at[bt].start.y;P.call(this,at[bt].deltas,St,Ft),xt=!0}q&&I.call(this,q),$&&M.call(this)}},O=function(R){var $=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,K=$*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return R-K;case"top":return R+$-K;case"hanging":return R+$-2*K;case"middle":return R+$/2-K;case"ideographic":return R;case"alphabetic":default:return R}},b=function(R){return R+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};c.prototype.createLinearGradient=function(){var R=function(){};return R.colorStops=[],R.addColorStop=function($,K){this.colorStops.push([$,K])},R.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},R.isCanvasGradient=!0,R},c.prototype.createPattern=function(){return this.createLinearGradient()},c.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(R,$,K,q,at,vt,wt,W,It){for(var Ot=z.call(this,K,q,at,vt),j=0;j<Ot.length;j++){var Z=Ot[j];j===0&&(It?x.call(this,Z.x1+R,Z.y1+$):N.call(this,Z.x1+R,Z.y1+$)),X.call(this,R,$,Z.x2,Z.y2,Z.x3,Z.y3,Z.x4,Z.y4)}W?M.call(this):I.call(this,wt)},I=function(R){switch(R){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},M=function(){this.pdf.clip(),this.pdf.discardPath()},x=function(R,$){this.pdf.internal.out(t(R)+" "+n($)+" m")},S=function(R){var $;switch(R.align){case"right":case"end":$="right";break;case"center":$="center";break;case"left":case"start":default:$="left"}var K=this.pdf.getTextDimensions(R.text),q=O.call(this,R.y),at=b.call(this,q)-K.h,vt=this.ctx.transform.applyToPoint(new o(R.x,q)),wt=this.ctx.transform.decompose(),W=new A;W=(W=(W=W.multiply(wt.translate)).multiply(wt.skew)).multiply(wt.scale);for(var It,Ot,j,Z=this.ctx.transform.applyToRectangle(new s(R.x,q,K.w,K.h)),ut=W.applyToRectangle(new s(R.x,at,K.w,K.h)),rt=m.call(this,ut),G=[],xt=0;xt<rt.length;xt+=1)G.indexOf(rt[xt])===-1&&G.push(rt[xt]);if(E(G),this.autoPaging)for(var bt=G[0],dt=G[G.length-1],Et=bt;Et<dt+1;Et++){this.pdf.setPage(Et);var yt=Et===1?this.posY+this.margin[0]:this.margin[0],St=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Ft=this.pdf.internal.pageSize.height-this.margin[2],Mt=Ft-this.margin[0],Vt=this.pdf.internal.pageSize.width-this.margin[1],Yt=Vt-this.margin[3],ie=Et===1?0:St+(Et-2)*Mt;if(this.ctx.clip_path.length!==0){var ee=this.path;It=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=_(It,this.posX+this.margin[3],-1*ie+yt),L.call(this,"fill",!0),this.path=ee}var Xt=_([JSON.parse(JSON.stringify(ut))],this.posX+this.margin[3],-ie+yt+this.ctx.prevPageLastElemOffset)[0];R.scale>=.01&&(Ot=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ot*R.scale),j=this.lineWidth,this.lineWidth=j*R.scale);var oe=this.autoPaging!=="text";if(oe||Xt.y+Xt.h<=Ft){if(oe||Xt.y>=yt&&Xt.x<=Vt){var Kt=oe?R.text:this.pdf.splitTextToSize(R.text,R.maxWidth||Vt-Xt.x)[0],Xe=_([JSON.parse(JSON.stringify(Z))],this.posX+this.margin[3],-ie+yt+this.ctx.prevPageLastElemOffset)[0],Re=oe&&(Et>bt||Et<dt)&&v.call(this);Re&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Yt,Mt,null).clip().discardPath()),this.pdf.text(Kt,Xe.x,Xe.y,{angle:R.angle,align:$,renderingMode:R.renderingMode}),Re&&this.pdf.restoreGraphicsState()}}else Xt.y<Ft&&(this.ctx.prevPageLastElemOffset+=Ft-Xt.y);R.scale>=.01&&(this.pdf.setFontSize(Ot),this.lineWidth=j)}else R.scale>=.01&&(Ot=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Ot*R.scale),j=this.lineWidth,this.lineWidth=j*R.scale),this.pdf.text(R.text,vt.x+this.posX,vt.y+this.posY,{angle:R.angle,align:$,renderingMode:R.renderingMode,maxWidth:R.maxWidth}),R.scale>=.01&&(this.pdf.setFontSize(Ot),this.lineWidth=j)},N=function(R,$,K,q){K=K||0,q=q||0,this.pdf.internal.out(t(R+K)+" "+n($+q)+" l")},P=function(R,$,K){return this.pdf.lines(R,$,K,null,null)},X=function(R,$,K,q,at,vt,wt,W){this.pdf.internal.out([e(i(K+R)),e(a(q+$)),e(i(at+R)),e(a(vt+$)),e(i(wt+R)),e(a(W+$)),"c"].join(" "))},z=function(R,$,K,q){for(var at=2*Math.PI,vt=Math.PI/2;$>K;)$-=at;var wt=Math.abs(K-$);wt<at&&q&&(wt=at-wt);for(var W=[],It=q?-1:1,Ot=$;wt>1e-5;){var j=Ot+It*Math.min(wt,vt);W.push(tt.call(this,R,Ot,j)),wt-=Math.abs(j-Ot),Ot=j}return W},tt=function(R,$,K){var q=(K-$)/2,at=R*Math.cos(q),vt=R*Math.sin(q),wt=at,W=-vt,It=wt*wt+W*W,Ot=It+wt*at+W*vt,j=4/3*(Math.sqrt(2*It*Ot)-Ot)/(wt*vt-W*at),Z=wt-j*W,ut=W+j*wt,rt=Z,G=-ut,xt=q+$,bt=Math.cos(xt),dt=Math.sin(xt);return{x1:R*Math.cos($),y1:R*Math.sin($),x2:Z*bt-ut*dt,y2:Z*dt+ut*bt,x3:rt*bt-G*dt,y3:rt*dt+G*bt,x4:R*Math.cos(K),y4:R*Math.sin(K)}},J=function(R){return 180*R/Math.PI},nt=function(R,$,K,q,at,vt){var wt=R+.5*(K-R),W=$+.5*(q-$),It=at+.5*(K-at),Ot=vt+.5*(q-vt),j=Math.min(R,at,wt,It),Z=Math.max(R,at,wt,It),ut=Math.min($,vt,W,Ot),rt=Math.max($,vt,W,Ot);return new s(j,ut,Z-j,rt-ut)},it=function(R,$,K,q,at,vt,wt,W){var It,Ot,j,Z,ut,rt,G,xt,bt,dt,Et,yt,St,Ft,Mt=K-R,Vt=q-$,Yt=at-K,ie=vt-q,ee=wt-at,Xt=W-vt;for(Ot=0;Ot<41;Ot++)bt=(G=(j=R+(It=Ot/40)*Mt)+It*((ut=K+It*Yt)-j))+It*(ut+It*(at+It*ee-ut)-G),dt=(xt=(Z=$+It*Vt)+It*((rt=q+It*ie)-Z))+It*(rt+It*(vt+It*Xt-rt)-xt),Ot==0?(Et=bt,yt=dt,St=bt,Ft=dt):(Et=Math.min(Et,bt),yt=Math.min(yt,dt),St=Math.max(St,bt),Ft=Math.max(Ft,dt));return new s(Math.round(Et),Math.round(yt),Math.round(St-Et),Math.round(Ft-yt))},_t=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var R,$,K=(R=this.ctx.lineDash,$=this.ctx.lineDashOffset,JSON.stringify({lineDash:R,lineDashOffset:$}));this.prevLineDash!==K&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=K)}}})(Ue.API),function(r){var e=function(a){var o,s,A,l,u,c,h,f,p,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?(c=(u=((u=((u=((u=(u-(v=u%85))/85)-(p=u%85))/85)-(f=u%85))/85)-(h=u%85))/85)%85,s.push(c+33,h+33,f+33,p+33,v+33)):s.push(122);return function(m,g){for(var _=g;_>0;_--)m.pop()}(s,o.length),String.fromCharCode.apply(String,s)+"~>"},t=function(a){var o,s,A,l,u,c=String,h="length",f=255,p="charCodeAt",v="slice",m="replace";for(a[v](-2),a=a[v](0,-2)[m](/\s/g,"")[m]("z","!!!!!"),A=[],l=0,u=(a+=o="uuuuu"[v](a[h]%5||5))[h];u>l;l+=5)s=52200625*(a[p](l)-33)+614125*(a[p](l+1)-33)+7225*(a[p](l+2)-33)+85*(a[p](l+3)-33)+(a[p](l+4)-33),A.push(f&s>>24,f&s>>16,f&s>>8,f&s);return function(g,_){for(var E=_;E>0;E--)g.pop()}(A,o[h]),c.fromCharCode.apply(c,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=YS(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(" ")}}}(Ue.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 c=new XMLHttpRequest,h=0,f=function(p){var v=p.length,m=[],g=String.fromCharCode;for(h=0;h<v;h+=1)m.push(g(255&p.charCodeAt(h)));return m.join("")};if(c.open("GET",A,!l),c.overrideMimeType("text/plain; charset=x-user-defined"),l===!1&&(c.onload=function(){c.status===200?u(f(this.responseText)):u(void 0)}),c.send(null),l&&c.status===200)return f(c.responseText)}(i,a,o)}catch{}return s}(e,t,n)},r.loadImageFile=r.loadFile}(Ue.API),function(r){function e(){return(He.html2canvas?Promise.resolve(He.html2canvas):Promise.resolve().then(function(){return mwt})).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(He.DOMPurify?Promise.resolve(He.DOMPurify):Promise.resolve().then(function(){return kwt})).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=tn(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 c=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),h=l.firstChild;h;h=h.nextSibling)u!==!0&&h.nodeType===1&&h.nodeName==="SCRIPT"||c.appendChild(A(h,u));return l.nodeType===1&&(l.nodeName==="CANVAS"?(c.width=l.width,c.height=l.height,c.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(c.value=l.value),c.addEventListener("load",function(){c.scrollTop=l.scrollTop,c.scrollLeft=l.scrollLeft},!0)),c}(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,c=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 c.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 h=0;h<l.length;++h){var f=l[h],p=f.src.find(function(v){return v.format==="truetype"});p&&A.addFont(p.url,f.ref.name,f.ref.style)}return c.windowHeight=c.windowHeight||0,c.windowHeight=c.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):c.windowHeight,A.context2d.save(!0),s(this.prop.container,c)}).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||Ue.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(c){return A.updateProgress(null,l),c}).then(l,u).then(function(c){return A.updateProgress(1),c})})},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,Ue.getPageSize=function(o,s,A){if(tn(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,c=(""+A).toLowerCase(),h={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,p=0,v=0;if(h.hasOwnProperty(c))p=h[c][1]/u,v=h[c][0]/u;else try{p=A[1],v=A[0]}catch{throw new Error("Invalid format: "+A)}if(o==="p"||o==="portrait")o="p",v>p&&(f=v,v=p,p=f);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",p>v&&(f=v,v=p,p=f)}return{width:v,height:p,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(tx):null;var A=new a(s);return s.worker?A:A.from(o).doCallback()}}(Ue.API),Ue.API.addJS=function(r){return BN=r,this.internal.events.subscribe("postPutResources",function(){Qm=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Qm+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),CN=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+BN+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){Qm!==void 0&&CN!==void 0&&this.internal.out("/Names <</JavaScript "+Qm+" 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 c=t.internal.newObject();u.push(c);var h=t.internal.getPageInfo(a+1);t.internal.write("<< /D["+h.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}}])}(Ue.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(c){for(var h,f=256*c.charCodeAt(4)+c.charCodeAt(5),p=c.length,v={width:0,height:0,numcomponents:1},m=4;m<p;m+=2){if(m+=f,e.indexOf(c.charCodeAt(m+1))!==-1){h=256*c.charCodeAt(m+5)+c.charCodeAt(m+6),v={width:256*c.charCodeAt(m+7)+c.charCodeAt(m+8),height:h,numcomponents:c.charCodeAt(m+9)};break}f=256*c.charCodeAt(m+2)+c.charCodeAt(m+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}}(Ue.API);var vf,Hm,TN,SN,xN,ZAt=function(){var r,e,t;function n(a){var o,s,A,l,u,c,h,f,p,v,m,g,_,E;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},c=null;;){switch(o=this.readUInt32(),p=function(){var B,L;for(L=[],B=0;B<4;++B)L.push(String.fromCharCode(this.data[this.pos++]));return L}.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":c&&this.animation.frames.push(c),this.pos+=4,c={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},u=this.readUInt16(),l=this.readUInt16()||100,c.delay=1e3*u/l,c.disposeOp=this.data[this.pos++],c.blendOp=this.data[this.pos++],c.data=[];break;case"IDAT":case"fdAT":for(p==="fdAT"&&(this.pos+=4,o-=4),a=(c!=null?c.data:void 0)||this.imgData,g=0;0<=o?g<o:g>o;0<=o?++g:--g)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(_=0;0<=v?_<v:_>v;0<=v?++_:--_)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":h=(m=this.read(o)).indexOf(0),f=String.fromCharCode.apply(String,m.slice(0,h)),this.text[f]=String.fromCharCode.apply(String,m.slice(h+1));break;case"IEND":return c&&this.animation.frames.push(c),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=(E=this.colorType)===4||E===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(c,h,f,p){var v,m,g,_,E,B,L,O,b,T,I,M,x,S,N,P,X,z,tt,J,nt,it=Math.ceil((l.width-c)/f),_t=Math.ceil((l.height-h)/p),R=l.width==it&&l.height==_t;for(S=o*it,M=R?s:new Uint8Array(S*_t),B=a.length,x=0,m=0;x<_t&&A<B;){switch(a[A++]){case 0:for(_=X=0;X<S;_=X+=1)M[m++]=a[A++];break;case 1:for(_=z=0;z<S;_=z+=1)v=a[A++],E=_<o?0:M[m-o],M[m++]=(v+E)%256;break;case 2:for(_=tt=0;tt<S;_=tt+=1)v=a[A++],g=(_-_%o)/o,N=x&&M[(x-1)*S+g*o+_%o],M[m++]=(N+v)%256;break;case 3:for(_=J=0;J<S;_=J+=1)v=a[A++],g=(_-_%o)/o,E=_<o?0:M[m-o],N=x&&M[(x-1)*S+g*o+_%o],M[m++]=(v+Math.floor((E+N)/2))%256;break;case 4:for(_=nt=0;nt<S;_=nt+=1)v=a[A++],g=(_-_%o)/o,E=_<o?0:M[m-o],x===0?N=P=0:(N=M[(x-1)*S+g*o+_%o],P=g&&M[(x-1)*S+(g-1)*o+_%o]),L=E+N-P,O=Math.abs(L-E),T=Math.abs(L-N),I=Math.abs(L-P),b=O<=T&&O<=I?E:T<=I?N:P,M[m++]=(v+b)%256;break;default:throw new Error("Invalid filter algorithm: "+a[A-1])}if(!R){var $=((h+x*p)*l.width+c)*o,K=x*S;for(_=0;_<it;_+=1){for(var q=0;q<o;q+=1)s[$++]=M[K++];$+=(f-1)*o}}x++}}return a=OAt(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,c,h,f;for(s=this.palette,u=this.transparency.indexed||[],l=new Uint8Array((u.length||0)+s.length),A=0,a=0,o=c=0,h=s.length;c<h;o=c+=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,c,h,f,p,v,m,g;if(A=this.colors,v=null,s=this.hasAlphaChannel,this.palette.length&&(v=(g=this._decodedPalette)!=null?g:this._decodedPalette=this.decodePalette(),A=4,s=!0),p=(l=a.data||a).length,c=v||o,u=h=0,A===1)for(;u<p;)f=v?4*o[u/4]:h,m=c[f++],l[u++]=m,l[u++]=m,l[u++]=m,l[u++]=s?c[f++]:255,h=f;else for(;u<p;)f=v?4*o[u/4]:h,l[u++]=c[f++],l[u++]=c[f++],l[u++]=c[f++],l[u++]=s?c[f++]:255,h=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(He)==="[object Window]"){try{e=He.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,c,h,f;if(this.animation){for(f=[],s=u=0,c=(h=this.animation.frames).length;u<c;s=++u)o=h[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,c,h=this;return s=0,c=this.animation,l=c.numFrames,A=c.frames,u=c.numPlays,(o=function(){var f,p;if(f=s++%l,p=A[f],h.renderFrame(a,f),l>1&&s/l<u)return h.animation._timeout=setTimeout(o,p.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 JAt(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=[],c=0,h=null,f=0,p=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,p=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((x=r[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}break;case 249:if(r[e++]!==4||r[e+4]!==0)throw new Error("Invalid graphics extension block.");var v=r[e++];c=r[e++]|r[e++]<<8,h=r[e++],!(1&v)&&(h=null),f=v>>2&7,e++;break;case 254:for(;;){if(!((x=r[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}break;default:throw new Error("Unknown graphic control label: 0x"+r[e-1].toString(16))}break;case 44:var m=r[e++]|r[e++]<<8,g=r[e++]|r[e++]<<8,_=r[e++]|r[e++]<<8,E=r[e++]|r[e++]<<8,B=r[e++],L=B>>6&1,O=1<<(7&B)+1,b=s,T=A,I=!1;B>>7&&(I=!0,b=e,T=O,e+=3*O);var M=e;for(e++;;){var x;if(!((x=r[e++])>=0))throw Error("Invalid block size");if(x===0)break;e+=x}u.push({x:m,y:g,width:_,height:E,has_local_palette:I,palette_offset:b,palette_size:T,data_offset:M,data_length:e-M,transparent_index:h,interlaced:!!L,delay:c,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 p},this.frameInfo=function(S){if(S<0||S>=u.length)throw new Error("Frame index out of range.");return u[S]},this.decodeAndBlitFrameBGRA=function(S,N){var P=this.frameInfo(S),X=P.width*P.height,z=new Uint8Array(X);bN(r,P.data_offset,z,X);var tt=P.palette_offset,J=P.transparent_index;J===null&&(J=256);var nt=P.width,it=t-nt,_t=nt,R=4*(P.y*t+P.x),$=4*((P.y+P.height)*t+P.x),K=R,q=4*it;P.interlaced===!0&&(q+=4*t*7);for(var at=8,vt=0,wt=z.length;vt<wt;++vt){var W=z[vt];if(_t===0&&(_t=nt,(K+=q)>=$&&(q=4*it+4*t*(at-1),K=R+(nt+it)*(at<<1),at>>=1)),W===J)K+=4;else{var It=r[tt+3*W],Ot=r[tt+3*W+1],j=r[tt+3*W+2];N[K++]=j,N[K++]=Ot,N[K++]=It,N[K++]=255}--_t}},this.decodeAndBlitFrameRGBA=function(S,N){var P=this.frameInfo(S),X=P.width*P.height,z=new Uint8Array(X);bN(r,P.data_offset,z,X);var tt=P.palette_offset,J=P.transparent_index;J===null&&(J=256);var nt=P.width,it=t-nt,_t=nt,R=4*(P.y*t+P.x),$=4*((P.y+P.height)*t+P.x),K=R,q=4*it;P.interlaced===!0&&(q+=4*t*7);for(var at=8,vt=0,wt=z.length;vt<wt;++vt){var W=z[vt];if(_t===0&&(_t=nt,(K+=q)>=$&&(q=4*it+4*t*(at-1),K=R+(nt+it)*(at<<1),at>>=1)),W===J)K+=4;else{var It=r[tt+3*W],Ot=r[tt+3*W+1],j=r[tt+3*W+2];N[K++]=It,N[K++]=Ot,N[K++]=j,N[K++]=255}--_t}}}function bN(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,c=0,h=0,f=r[e++],p=new Int32Array(4096),v=null;;){for(;u<16&&f!==0;)c|=r[e++]<<u,u+=8,f===1?f=r[e++]:--f;if(u<A)break;var m=c&l;if(c>>=A,u-=A,m!==a){if(m===o)break;for(var g=m<s?m:v,_=0,E=g;E>a;)E=p[E]>>8,++_;var B=E;if(h+_+(g!==m?1:0)>n)return void ln.log("Warning, gif stream longer than expected.");t[h++]=B;var L=h+=_;for(g!==m&&(t[h++]=B),E=g;_--;)E=p[E],t[--L]=255&E,E>>=8;v!==null&&s<4096&&(p[s++]=v<<8|B,s>=l+1&&A<12&&(++A,l=l<<1|1)),v=m}else s=o+1,l=(1<<(A=i+1))-1,v=null}return h!==n&&ln.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 KC(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),c=new Array(65535),h=new Array(65535),f=new Array(64),p=new Array(64),v=[],m=0,g=7,_=new Array(64),E=new Array(64),B=new Array(64),L=new Array(256),O=new Array(2048),b=[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],I=[0,1,2,3,4,5,6,7,8,9,10,11],M=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],x=[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],S=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],N=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],X=[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(R,$){for(var K=0,q=0,at=new Array,vt=1;vt<=16;vt++){for(var wt=1;wt<=R[vt];wt++)at[$[q]]=[],at[$[q]][0]=K,at[$[q]][1]=vt,q++,K++;K*=2}return at}function tt(R){for(var $=R[0],K=R[1]-1;K>=0;)$&1<<K&&(m|=1<<g),K--,--g<0&&(m==255?(J(255),J(0)):J(m),g=7,m=0)}function J(R){v.push(R)}function nt(R){J(R>>8&255),J(255&R)}function it(R,$,K,q,at){for(var vt,wt=at[0],W=at[240],It=function(dt,Et){var yt,St,Ft,Mt,Vt,Yt,ie,ee,Xt,oe,Kt=0;for(Xt=0;Xt<8;++Xt){yt=dt[Kt],St=dt[Kt+1],Ft=dt[Kt+2],Mt=dt[Kt+3],Vt=dt[Kt+4],Yt=dt[Kt+5],ie=dt[Kt+6];var Xe=yt+(ee=dt[Kt+7]),Re=yt-ee,pr=St+ie,Ie=St-ie,xe=Ft+Yt,on=Ft-Yt,sr=Mt+Vt,Ti=Mt-Vt,Br=Xe+sr,ci=Xe-sr,$r=pr+xe,Vr=pr-xe;dt[Kt]=Br+$r,dt[Kt+4]=Br-$r;var Me=.707106781*(Vr+ci);dt[Kt+2]=ci+Me,dt[Kt+6]=ci-Me;var wr=.382683433*((Br=Ti+on)-(Vr=Ie+Re)),Yn=.5411961*Br+wr,fn=1.306562965*Vr+wr,Si=.707106781*($r=on+Ie),xi=Re+Si,be=Re-Si;dt[Kt+5]=be+Yn,dt[Kt+3]=be-Yn,dt[Kt+1]=xi+fn,dt[Kt+7]=xi-fn,Kt+=8}for(Kt=0,Xt=0;Xt<8;++Xt){yt=dt[Kt],St=dt[Kt+8],Ft=dt[Kt+16],Mt=dt[Kt+24],Vt=dt[Kt+32],Yt=dt[Kt+40],ie=dt[Kt+48];var hi=yt+(ee=dt[Kt+56]),Dn=yt-ee,bi=St+ie,en=St-ie,qr=Ft+Yt,En=Ft-Yt,mo=Mt+Vt,se=Mt-Vt,ht=hi+mo,Qt=hi-mo,qt=bi+qr,er=bi-qr;dt[Kt]=ht+qt,dt[Kt+32]=ht-qt;var Or=.707106781*(er+Qt);dt[Kt+16]=Qt+Or,dt[Kt+48]=Qt-Or;var sn=.382683433*((ht=se+En)-(er=en+Dn)),Cn=.5411961*ht+sn,is=1.306562965*er+sn,Ii=.707106781*(qt=En+en),EA=Dn+Ii,Sl=Dn-Ii;dt[Kt+40]=Sl+Cn,dt[Kt+24]=Sl-Cn,dt[Kt+8]=EA+is,dt[Kt+56]=EA-is,Kt++}for(Xt=0;Xt<64;++Xt)oe=dt[Xt]*Et[Xt],f[Xt]=oe>0?oe+.5|0:oe-.5|0;return f}(R,$),Ot=0;Ot<64;++Ot)p[b[Ot]]=It[Ot];var j=p[0]-K;K=p[0],j==0?tt(q[0]):(tt(q[h[vt=32767+j]]),tt(c[vt]));for(var Z=63;Z>0&&p[Z]==0;)Z--;if(Z==0)return tt(wt),K;for(var ut,rt=1;rt<=Z;){for(var G=rt;p[rt]==0&&rt<=Z;)++rt;var xt=rt-G;if(xt>=16){ut=xt>>4;for(var bt=1;bt<=ut;++bt)tt(W);xt&=15}vt=32767+p[rt],tt(at[(xt<<4)+h[vt]]),tt(c[vt]),rt++}return Z!=63&&tt(wt),K}function _t(R){R=Math.min(Math.max(R,1),100),a!=R&&(function($){for(var K=[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],q=0;q<64;q++){var at=o((K[q]*$+50)/100);at=Math.min(Math.max(at,1),255),s[b[q]]=at}for(var vt=[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 W=o((vt[wt]*$+50)/100);W=Math.min(Math.max(W,1),255),A[b[wt]]=W}for(var It=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ot=0,j=0;j<8;j++)for(var Z=0;Z<8;Z++)l[Ot]=1/(s[b[Ot]]*It[j]*It[Z]*8),u[Ot]=1/(A[b[Ot]]*It[j]*It[Z]*8),Ot++}(R<50?Math.floor(5e3/R):Math.floor(200-2*R)),a=R)}this.encode=function(R,$){$&&_t($),v=new Array,m=0,g=7,nt(65496),nt(65504),nt(16),J(74),J(70),J(73),J(70),J(0),J(1),J(1),J(0),nt(1),nt(1),J(0),J(0),function(){nt(65499),nt(132),J(0);for(var St=0;St<64;St++)J(s[St]);J(1);for(var Ft=0;Ft<64;Ft++)J(A[Ft])}(),function(St,Ft){nt(65472),nt(17),J(8),nt(Ft),nt(St),J(3),J(1),J(17),J(0),J(2),J(17),J(1),J(3),J(17),J(1)}(R.width,R.height),function(){nt(65476),nt(418),J(0);for(var St=0;St<16;St++)J(T[St+1]);for(var Ft=0;Ft<=11;Ft++)J(I[Ft]);J(16);for(var Mt=0;Mt<16;Mt++)J(M[Mt+1]);for(var Vt=0;Vt<=161;Vt++)J(x[Vt]);J(1);for(var Yt=0;Yt<16;Yt++)J(S[Yt+1]);for(var ie=0;ie<=11;ie++)J(N[ie]);J(17);for(var ee=0;ee<16;ee++)J(P[ee+1]);for(var Xt=0;Xt<=161;Xt++)J(X[Xt])}(),nt(65498),nt(12),J(3),J(1),J(0),J(2),J(17),J(3),J(17),J(0),J(63),J(0);var K=0,q=0,at=0;m=0,g=7,this.encode.displayName="_encode_";for(var vt,wt,W,It,Ot,j,Z,ut,rt,G=R.data,xt=R.width,bt=R.height,dt=4*xt,Et=0;Et<bt;){for(vt=0;vt<dt;){for(Ot=dt*Et+vt,Z=-1,ut=0,rt=0;rt<64;rt++)j=Ot+(ut=rt>>3)*dt+(Z=4*(7&rt)),Et+ut>=bt&&(j-=dt*(Et+1+ut-bt)),vt+Z>=dt&&(j-=vt+Z-dt+4),wt=G[j++],W=G[j++],It=G[j++],_[rt]=(O[wt]+O[W+256>>0]+O[It+512>>0]>>16)-128,E[rt]=(O[wt+768>>0]+O[W+1024>>0]+O[It+1280>>0]>>16)-128,B[rt]=(O[wt+1280>>0]+O[W+1536>>0]+O[It+1792>>0]>>16)-128;K=it(_,l,K,e,n),q=it(E,u,q,t,i),at=it(B,u,at,t,i),vt+=32}Et+=8}if(g>=0){var yt=[];yt[1]=g+1,yt[0]=(1<<g+1)-1,tt(yt)}return nt(65497),new Uint8Array(v)},r=r||50,function(){for(var R=String.fromCharCode,$=0;$<256;$++)L[$]=R($)}(),e=z(T,I),t=z(S,N),n=z(M,x),i=z(P,X),function(){for(var R=1,$=2,K=1;K<=15;K++){for(var q=R;q<$;q++)h[32767+q]=K,c[32767+q]=[],c[32767+q][1]=K,c[32767+q][0]=q;for(var at=-($-1);at<=-R;at++)h[32767+at]=K,c[32767+at]=[],c[32767+at][1]=K,c[32767+at][0]=$-1+at;R<<=1,$<<=1}}(),function(){for(var R=0;R<256;R++)O[R]=19595*R,O[R+256>>0]=38470*R,O[R+512>>0]=7471*R+32768,O[R+768>>0]=-11059*R,O[R+1024>>0]=-21709*R,O[R+1280>>0]=32768*R+8421375,O[R+1536>>0]=-27439*R,O[R+1792>>0]=-5329*R}(),_t(r)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function vs(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 IN(r){function e(T){if(!T)throw Error("assert :P")}function t(T,I,M){for(var x=0;4>x;x++)if(T[I+x]!=M.charCodeAt(x))return!0;return!1}function n(T,I,M,x,S){for(var N=0;N<S;N++)T[I+N]=M[x+N]}function i(T,I,M,x){for(var S=0;S<x;S++)T[I+S]=M}function a(T){return new Int32Array(T)}function o(T,I){for(var M=[],x=0;x<T;x++)M.push(new I);return M}function s(T,I){var M=[];return function x(S,N,P){for(var X=P[N],z=0;z<X&&(S.push(P.length>N+1?[]:new I),!(P.length<N+1));z++)x(S[z],N+1,P)}(M,0,T),M}var A=function(){var T=this;function I(d,y){for(var C=1<<y-1>>>0;d&C;)C>>>=1;return C?(d&C-1)+C:d}function M(d,y,C,F,U){e(!(F%C));do d[y+(F-=C)]=U;while(0<F)}function x(d,y,C,F,U){if(e(2328>=U),512>=U)var Q=a(512);else if((Q=a(U))==null)return 0;return function(H,k,V,Y,ft,Bt){var Tt,mt,Dt=k,Lt=1<<V,pt=a(16),gt=a(16);for(e(ft!=0),e(Y!=null),e(H!=null),e(0<V),mt=0;mt<ft;++mt){if(15<Y[mt])return 0;++pt[Y[mt]]}if(pt[0]==ft)return 0;for(gt[1]=0,Tt=1;15>Tt;++Tt){if(pt[Tt]>1<<Tt)return 0;gt[Tt+1]=gt[Tt]+pt[Tt]}for(mt=0;mt<ft;++mt)Tt=Y[mt],0<Y[mt]&&(Bt[gt[Tt]++]=mt);if(gt[15]==1)return(Y=new S).g=0,Y.value=Bt[0],M(H,Dt,1,Lt,Y),Lt;var Pt,Ht=-1,Ut=Lt-1,ue=0,Zt=1,Ne=1,te=1<<V;for(mt=0,Tt=1,ft=2;Tt<=V;++Tt,ft<<=1){if(Zt+=Ne<<=1,0>(Ne-=pt[Tt]))return 0;for(;0<pt[Tt];--pt[Tt])(Y=new S).g=Tt,Y.value=Bt[mt++],M(H,Dt+ue,ft,te,Y),ue=I(ue,Tt)}for(Tt=V+1,ft=2;15>=Tt;++Tt,ft<<=1){if(Zt+=Ne<<=1,0>(Ne-=pt[Tt]))return 0;for(;0<pt[Tt];--pt[Tt]){if(Y=new S,(ue&Ut)!=Ht){for(Dt+=te,Pt=1<<(Ht=Tt)-V;15>Ht&&!(0>=(Pt-=pt[Ht]));)++Ht,Pt<<=1;Lt+=te=1<<(Pt=Ht-V),H[k+(Ht=ue&Ut)].g=Pt+V,H[k+Ht].value=Dt-k-Ht}Y.g=Tt-V,Y.value=Bt[mt++],M(H,Dt+(ue>>V),ft,te,Y),ue=I(ue,Tt)}}return Zt!=2*gt[15]-1?0:Lt}(d,y,C,F,U,Q)}function S(){this.value=this.g=0}function N(){this.value=this.g=0}function P(){this.G=o(5,S),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Xa,N)}function X(d,y,C,F){e(d!=null),e(y!=null),e(2147483648>F),d.Ca=254,d.I=0,d.b=-8,d.Ka=0,d.oa=y,d.pa=C,d.Jd=y,d.Yc=C+F,d.Zc=4<=F?C+F-4+1:C,vt(d)}function z(d,y){for(var C=0;0<y--;)C|=W(d,128)<<y;return C}function tt(d,y){var C=z(d,y);return wt(d)?-C:C}function J(d,y,C,F){var U,Q=0;for(e(d!=null),e(y!=null),e(4294967288>F),d.Sb=F,d.Ra=0,d.u=0,d.h=0,4<F&&(F=4),U=0;U<F;++U)Q+=y[C+U]<<8*U;d.Ra=Q,d.bb=F,d.oa=y,d.pa=C}function nt(d){for(;8<=d.u&&d.bb<d.Sb;)d.Ra>>>=8,d.Ra+=d.oa[d.pa+d.bb]<<tf-8>>>0,++d.bb,d.u-=8;K(d)&&(d.h=1,d.u=0)}function it(d,y){if(e(0<=y),!d.h&&y<=Jh){var C=$(d)&Zh[y];return d.u+=y,nt(d),C}return d.h=1,d.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 R(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function $(d){return d.Ra>>>(d.u&tf-1)>>>0}function K(d){return e(d.bb<=d.Sb),d.h||d.bb==d.Sb&&d.u>tf}function q(d,y){d.u=y,d.h=K(d)}function at(d){d.u>=bd&&(e(d.u>=bd),nt(d))}function vt(d){e(d!=null&&d.oa!=null),d.pa<d.Zc?(d.I=(d.oa[d.pa++]|d.I<<8)>>>0,d.b+=8):(e(d!=null&&d.oa!=null),d.pa<d.Yc?(d.b+=8,d.I=d.oa[d.pa++]|d.I<<8):d.Ka?d.b=0:(d.I<<=8,d.b+=8,d.Ka=1))}function wt(d){return z(d,1)}function W(d,y){var C=d.Ca;0>d.b&&vt(d);var F=d.b,U=C*y>>>8,Q=(d.I>>>F>U)+0;for(Q?(C-=U,d.I-=U+1<<F>>>0):C=U+1,F=C,U=0;256<=F;)U+=8,F>>=8;return F=7^U+Wa[F],d.b-=F,d.Ca=(C<<F)-1,Q}function It(d,y,C){d[y+0]=C>>24&255,d[y+1]=C>>16&255,d[y+2]=C>>8&255,d[y+3]=C>>0&255}function Ot(d,y){return d[y+0]<<0|d[y+1]<<8}function j(d,y){return Ot(d,y)|d[y+2]<<16}function Z(d,y){return Ot(d,y)|Ot(d,y+2)<<16}function ut(d,y){var C=1<<y;return e(d!=null),e(0<y),d.X=a(C),d.X==null?0:(d.Mb=32-y,d.Xa=y,1)}function rt(d,y){e(d!=null),e(y!=null),e(d.Xa==y.Xa),n(y.X,0,d.X,0,1<<y.Xa)}function G(){this.X=[],this.Xa=this.Mb=0}function xt(d,y,C,F){e(C!=null),e(F!=null);var U=C[0],Q=F[0];return U==0&&(U=(d*Q+y/2)/y),Q==0&&(Q=(y*U+d/2)/d),0>=U||0>=Q?0:(C[0]=U,F[0]=Q,1)}function bt(d,y){return d+(1<<y)-1>>>y}function dt(d,y){return((4278255360&d)+(4278255360&y)>>>0&4278255360)+((16711935&d)+(16711935&y)>>>0&16711935)>>>0}function Et(d,y){T[y]=function(C,F,U,Q,H,k,V){var Y;for(Y=0;Y<H;++Y){var ft=T[d](k[V+Y-1],U,Q+Y);k[V+Y]=dt(C[F+Y],ft)}}}function yt(){this.ud=this.hd=this.jd=0}function St(d,y){return((4278124286&(d^y))>>>1)+(d&y)>>>0}function Ft(d){return 0<=d&&256>d?d:0>d?0:255<d?255:void 0}function Mt(d,y){return Ft(d+(d-y+.5>>1))}function Vt(d,y,C){return Math.abs(y-C)-Math.abs(d-C)}function Yt(d,y,C,F,U,Q,H){for(F=Q[H-1],C=0;C<U;++C)Q[H+C]=F=dt(d[y+C],F)}function ie(d,y,C,F,U){var Q;for(Q=0;Q<C;++Q){var H=d[y+Q],k=H>>8&255,V=16711935&(V=(V=16711935&H)+((k<<16)+k));F[U+Q]=(4278255360&H)+V>>>0}}function ee(d,y){y.jd=d>>0&255,y.hd=d>>8&255,y.ud=d>>16&255}function Xt(d,y,C,F,U,Q){var H;for(H=0;H<F;++H){var k=y[C+H],V=k>>>8,Y=k,ft=255&(ft=(ft=k>>>16)+((d.jd<<24>>24)*(V<<24>>24)>>>5));Y=255&(Y=(Y=Y+((d.hd<<24>>24)*(V<<24>>24)>>>5))+((d.ud<<24>>24)*(ft<<24>>24)>>>5)),U[Q+H]=(4278255360&k)+(ft<<16)+Y}}function oe(d,y,C,F,U){T[y]=function(Q,H,k,V,Y,ft,Bt,Tt,mt){for(V=Bt;V<Tt;++V)for(Bt=0;Bt<mt;++Bt)Y[ft++]=U(k[F(Q[H++])])},T[d]=function(Q,H,k,V,Y,ft,Bt){var Tt=8>>Q.b,mt=Q.Ea,Dt=Q.K[0],Lt=Q.w;if(8>Tt)for(Q=(1<<Q.b)-1,Lt=(1<<Tt)-1;H<k;++H){var pt,gt=0;for(pt=0;pt<mt;++pt)pt&Q||(gt=F(V[Y++])),ft[Bt++]=U(Dt[gt&Lt]),gt>>=Tt}else T["VP8LMapColor"+C](V,Y,Dt,Lt,ft,Bt,H,k,mt)}}function Kt(d,y,C,F,U){for(C=y+C;y<C;){var Q=d[y++];F[U++]=Q>>16&255,F[U++]=Q>>8&255,F[U++]=Q>>0&255}}function Xe(d,y,C,F,U){for(C=y+C;y<C;){var Q=d[y++];F[U++]=Q>>16&255,F[U++]=Q>>8&255,F[U++]=Q>>0&255,F[U++]=Q>>24&255}}function Re(d,y,C,F,U){for(C=y+C;y<C;){var Q=(H=d[y++])>>16&240|H>>12&15,H=H>>0&240|H>>28&15;F[U++]=Q,F[U++]=H}}function pr(d,y,C,F,U){for(C=y+C;y<C;){var Q=(H=d[y++])>>16&248|H>>13&7,H=H>>5&224|H>>3&31;F[U++]=Q,F[U++]=H}}function Ie(d,y,C,F,U){for(C=y+C;y<C;){var Q=d[y++];F[U++]=Q>>0&255,F[U++]=Q>>8&255,F[U++]=Q>>16&255}}function xe(d,y,C,F,U,Q){if(Q==0)for(C=y+C;y<C;)It(F,((Q=d[y++])[0]>>24|Q[1]>>8&65280|Q[2]<<8&16711680|Q[3]<<24)>>>0),U+=32;else n(F,U,d,y,C)}function on(d,y){T[y][0]=T[d+"0"],T[y][1]=T[d+"1"],T[y][2]=T[d+"2"],T[y][3]=T[d+"3"],T[y][4]=T[d+"4"],T[y][5]=T[d+"5"],T[y][6]=T[d+"6"],T[y][7]=T[d+"7"],T[y][8]=T[d+"8"],T[y][9]=T[d+"9"],T[y][10]=T[d+"10"],T[y][11]=T[d+"11"],T[y][12]=T[d+"12"],T[y][13]=T[d+"13"],T[y][14]=T[d+"0"],T[y][15]=T[d+"0"]}function sr(d){return d==UE||d==DE||d==Xy||d==QE}function Ti(){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 ci(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Ti,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 Me(d){return alert("todo:WebPSamplerProcessPlane"),d.T}function wr(d,y){var C=d.T,F=y.ba.f.RGBA,U=F.eb,Q=F.fb+d.ka*F.A,H=ko[y.ba.S],k=d.y,V=d.O,Y=d.f,ft=d.N,Bt=d.ea,Tt=d.W,mt=y.cc,Dt=y.dc,Lt=y.Mc,pt=y.Nc,gt=d.ka,Pt=d.ka+d.T,Ht=d.U,Ut=Ht+1>>1;for(gt==0?H(k,V,null,null,Y,ft,Bt,Tt,Y,ft,Bt,Tt,U,Q,null,null,Ht):(H(y.ec,y.fc,k,V,mt,Dt,Lt,pt,Y,ft,Bt,Tt,U,Q-F.A,U,Q,Ht),++C);gt+2<Pt;gt+=2)mt=Y,Dt=ft,Lt=Bt,pt=Tt,ft+=d.Rc,Tt+=d.Rc,Q+=2*F.A,H(k,(V+=2*d.fa)-d.fa,k,V,mt,Dt,Lt,pt,Y,ft,Bt,Tt,U,Q-F.A,U,Q,Ht);return V+=d.fa,d.j+Pt<d.o?(n(y.ec,y.fc,k,V,Ht),n(y.cc,y.dc,Y,ft,Ut),n(y.Mc,y.Nc,Bt,Tt,Ut),C--):1&Pt||H(k,V,null,null,Y,ft,Bt,Tt,Y,ft,Bt,Tt,U,Q+F.A,null,null,Ht),C}function Yn(d,y,C){var F=d.F,U=[d.J];if(F!=null){var Q=d.U,H=y.ba.S,k=H==Yy||H==Xy;y=y.ba.f.RGBA;var V=[0],Y=d.ka;V[0]=d.T,d.Kb&&(Y==0?--V[0]:(--Y,U[0]-=d.width),d.j+d.ka+d.T==d.o&&(V[0]=d.o-d.j-Y));var ft=y.eb;Y=y.fb+Y*y.A,d=$y(F,U[0],d.width,Q,V,ft,Y+(k?0:3),y.A),e(C==V),d&&sr(H)&&Nl(ft,Y,k,Q,V,y.A)}return 0}function fn(d){var y=d.ma,C=y.ba.S,F=11>C,U=C==Ky||C==zy||C==Yy||C==PE||C==12||sr(C);if(y.memory=null,y.Ib=null,y.Jb=null,y.Nd=null,!Sd(y.Oa,d,U?11:12))return 0;if(U&&sr(C)&&jt(),d.da)alert("todo:use_scaling");else{if(F){if(y.Ib=Me,d.Kb){if(C=d.U+1>>1,y.memory=a(d.U+2*C),y.memory==null)return 0;y.ec=y.memory,y.fc=0,y.cc=y.ec,y.dc=y.fc+d.U,y.Mc=y.cc,y.Nc=y.dc+C,y.Ib=wr,jt()}}else alert("todo:EmitYUV");U&&(y.Jb=Yn,F&&Ct())}if(F&&!CO){for(d=0;256>d;++d)u9[d]=89858*(d-128)+qy>>Wy,f9[d]=-22014*(d-128)+qy,h9[d]=-45773*(d-128),c9[d]=113618*(d-128)+qy>>Wy;for(d=Md;d<kE;++d)y=76283*(d-16)+qy>>Wy,p9[d-Md]=_o(y,255),d9[d-Md]=_o(y+8>>4,15);CO=1}return 1}function Si(d){var y=d.ma,C=d.U,F=d.T;return e(!(1&d.ka)),0>=C||0>=F?0:(C=y.Ib(d,y),y.Jb!=null&&y.Jb(d,y,C),y.Dc+=C,1)}function xi(d){d.ma.memory=null}function be(d,y,C,F){return it(d,8)!=47?0:(y[0]=it(d,14)+1,C[0]=it(d,14)+1,F[0]=it(d,1),it(d,3)!=0?0:!d.h)}function hi(d,y){if(4>d)return d+1;var C=d-2>>1;return(2+(1&d)<<C)+it(y,C)+1}function Dn(d,y){return 120<y?y-120:1<=(C=((C=Wk[y-1])>>4)*d+(8-(15&C)))?C:1;var C}function bi(d,y,C){var F=$(C),U=d[y+=255&F].g-8;return 0<U&&(q(C,C.u+8),F=$(C),y+=d[y].value,y+=F&(1<<U)-1),q(C,C.u+d[y].g),d[y].value}function en(d,y,C){return C.g+=d.g,C.value+=d.value<<y>>>0,e(8>=C.g),d.g}function qr(d,y,C){var F=d.xc;return e((y=F==0?0:d.vc[d.md*(C>>F)+(y>>F)])<d.Wb),d.Ya[y]}function En(d,y,C,F){var U=d.ab,Q=d.c*y,H=d.C;y=H+y;var k=C,V=F;for(F=d.Ta,C=d.Ua;0<U--;){var Y=d.gc[U],ft=H,Bt=y,Tt=k,mt=V,Dt=(V=F,k=C,Y.Ea);switch(e(ft<Bt),e(Bt<=Y.nc),Y.hc){case 2:ky(Tt,mt,(Bt-ft)*Dt,V,k);break;case 0:var Lt=ft,pt=Bt,gt=V,Pt=k,Ht=(te=Y).Ea;Lt==0&&(OE(Tt,mt,null,null,1,gt,Pt),Yt(Tt,mt+1,0,0,Ht-1,gt,Pt+1),mt+=Ht,Pt+=Ht,++Lt);for(var Ut=1<<te.b,ue=Ut-1,Zt=bt(Ht,te.b),Ne=te.K,te=te.w+(Lt>>te.b)*Zt;Lt<pt;){var Nr=Ne,Zr=te,Sr=1;for(Id(Tt,mt,gt,Pt-Ht,1,gt,Pt);Sr<Ht;){var gr=(Sr&~ue)+Ut;gr>Ht&&(gr=Ht),(0,Ll[Nr[Zr++]>>8&15])(Tt,mt+ +Sr,gt,Pt+Sr-Ht,gr-Sr,gt,Pt+Sr),Sr=gr}mt+=Ht,Pt+=Ht,++Lt&ue||(te+=Zt)}Bt!=Y.nc&&n(V,k-Dt,V,k+(Bt-ft-1)*Dt,Dt);break;case 1:for(Dt=Tt,pt=mt,Ht=(Tt=Y.Ea)-(Pt=Tt&~(gt=(mt=1<<Y.b)-1)),Lt=bt(Tt,Y.b),Ut=Y.K,Y=Y.w+(ft>>Y.b)*Lt;ft<Bt;){for(ue=Ut,Zt=Y,Ne=new yt,te=pt+Pt,Nr=pt+Tt;pt<te;)ee(ue[Zt++],Ne),Qo(Ne,Dt,pt,mt,V,k),pt+=mt,k+=mt;pt<Nr&&(ee(ue[Zt++],Ne),Qo(Ne,Dt,pt,Ht,V,k),pt+=Ht,k+=Ht),++ft&gt||(Y+=Lt)}break;case 3:if(Tt==V&&mt==k&&0<Y.b){for(pt=V,Tt=Dt=k+(Bt-ft)*Dt-(Pt=(Bt-ft)*bt(Y.Ea,Y.b)),mt=V,gt=k,Lt=[],Pt=(Ht=Pt)-1;0<=Pt;--Pt)Lt[Pt]=mt[gt+Pt];for(Pt=Ht-1;0<=Pt;--Pt)pt[Tt+Pt]=Lt[Pt];As(Y,ft,Bt,V,Dt,V,k)}else As(Y,ft,Bt,Tt,mt,V,k)}k=F,V=C}V!=C&&n(F,C,k,V,Q)}function mo(d,y){var C=d.V,F=d.Ba+d.c*d.C,U=y-d.C;if(e(y<=d.l.o),e(16>=U),0<U){var Q=d.l,H=d.Ta,k=d.Ua,V=Q.width;if(En(d,U,C,F),U=k=[k],e((C=d.C)<(F=y)),e(Q.v<Q.va),F>Q.o&&(F=Q.o),C<Q.j){var Y=Q.j-C;C=Q.j,U[0]+=Y*V}if(C>=F?C=0:(U[0]+=4*Q.v,Q.ka=C-Q.j,Q.U=Q.va-Q.v,Q.T=F-C,C=1),C){if(k=k[0],11>(C=d.ca).S){var ft=C.f.RGBA,Bt=(F=C.S,U=Q.U,Q=Q.T,Y=ft.eb,ft.A),Tt=Q;for(ft=ft.fb+d.Ma*ft.A;0<Tt--;){var mt=H,Dt=k,Lt=U,pt=Y,gt=ft;switch(F){case jy:ls(mt,Dt,Lt,pt,gt);break;case Ky:Ol(mt,Dt,Lt,pt,gt);break;case UE:Ol(mt,Dt,Lt,pt,gt),Nl(pt,gt,0,Lt,1,0);break;case fO:ef(mt,Dt,Lt,pt,gt);break;case zy:xe(mt,Dt,Lt,pt,gt,1);break;case DE:xe(mt,Dt,Lt,pt,gt,1),Nl(pt,gt,0,Lt,1,0);break;case Yy:xe(mt,Dt,Lt,pt,gt,0);break;case Xy:xe(mt,Dt,Lt,pt,gt,0),Nl(pt,gt,1,Lt,1,0);break;case PE:Qs(mt,Dt,Lt,pt,gt);break;case QE:Qs(mt,Dt,Lt,pt,gt),af(pt,gt,Lt,1,0);break;case pO:SA(mt,Dt,Lt,pt,gt);break;default:e(0)}k+=V,ft+=Bt}d.Ma+=Q}else alert("todo:EmitRescaledRowsYUVA");e(d.Ma<=C.height)}}d.C=y,e(d.C<=d.i)}function se(d){var y;if(0<d.ua)return 0;for(y=0;y<d.Wb;++y){var C=d.Ya[y].G,F=d.Ya[y].H;if(0<C[1][F[1]+0].g||0<C[2][F[2]+0].g||0<C[3][F[3]+0].g)return 0}return 1}function ht(d,y,C,F,U,Q){if(d.Z!=0){var H=d.qd,k=d.rd;for(e(Ul[d.Z]!=null);y<C;++y)Ul[d.Z](H,k,F,U,F,U,Q),H=F,k=U,U+=Q;d.qd=H,d.rd=k}}function Qt(d,y){var C=d.l.ma,F=C.Z==0||C.Z==1?d.l.j:d.C;if(F=d.C<F?F:d.C,e(y<=d.l.o),y>F){var U=d.l.width,Q=C.ca,H=C.tb+U*F,k=d.V,V=d.Ba+d.c*F,Y=d.gc;e(d.ab==1),e(Y[0].hc==3),RE(Y[0],F,y,k,V,Q,H),ht(C,F,y,Q,H,U)}d.C=d.Ma=y}function qt(d,y,C,F,U,Q,H){var k=d.$/F,V=d.$%F,Y=d.m,ft=d.s,Bt=C+d.$,Tt=Bt;U=C+F*U;var mt=C+F*Q,Dt=280+ft.ua,Lt=d.Pb?k:16777216,pt=0<ft.ua?ft.Wa:null,gt=ft.wc,Pt=Bt<mt?qr(ft,V,k):null;e(d.C<Q),e(mt<=U);var Ht=!1;t:for(;;){for(;Ht||Bt<mt;){var Ut=0;if(k>=Lt){var ue=Bt-C;e((Lt=d).Pb),Lt.wd=Lt.m,Lt.xd=ue,0<Lt.s.ua&&rt(Lt.s.Wa,Lt.s.vb),Lt=k+Zk}if(V&gt||(Pt=qr(ft,V,k)),e(Pt!=null),Pt.Qb&&(y[Bt]=Pt.qb,Ht=!0),!Ht)if(at(Y),Pt.jc){Ut=Y,ue=y;var Zt=Bt,Ne=Pt.pd[$(Ut)&Xa-1];e(Pt.jc),256>Ne.g?(q(Ut,Ut.u+Ne.g),ue[Zt]=Ne.value,Ut=0):(q(Ut,Ut.u+Ne.g-256),e(256<=Ne.value),Ut=Ne.value),Ut==0&&(Ht=!0)}else Ut=bi(Pt.G[0],Pt.H[0],Y);if(Y.h)break;if(Ht||256>Ut){if(!Ht)if(Pt.nd)y[Bt]=(Pt.qb|Ut<<8)>>>0;else{if(at(Y),Ht=bi(Pt.G[1],Pt.H[1],Y),at(Y),ue=bi(Pt.G[2],Pt.H[2],Y),Zt=bi(Pt.G[3],Pt.H[3],Y),Y.h)break;y[Bt]=(Zt<<24|Ht<<16|Ut<<8|ue)>>>0}if(Ht=!1,++Bt,++V>=F&&(V=0,++k,H!=null&&k<=Q&&!(k%16)&&H(d,k),pt!=null))for(;Tt<Bt;)Ut=y[Tt++],pt.X[(506832829*Ut&4294967295)>>>pt.Mb]=Ut}else if(280>Ut){if(Ut=hi(Ut-256,Y),ue=bi(Pt.G[4],Pt.H[4],Y),at(Y),ue=Dn(F,ue=hi(ue,Y)),Y.h)break;if(Bt-C<ue||U-Bt<Ut)break t;for(Zt=0;Zt<Ut;++Zt)y[Bt+Zt]=y[Bt+Zt-ue];for(Bt+=Ut,V+=Ut;V>=F;)V-=F,++k,H!=null&&k<=Q&&!(k%16)&&H(d,k);if(e(Bt<=U),V&gt&&(Pt=qr(ft,V,k)),pt!=null)for(;Tt<Bt;)Ut=y[Tt++],pt.X[(506832829*Ut&4294967295)>>>pt.Mb]=Ut}else{if(!(Ut<Dt))break t;for(Ht=Ut-280,e(pt!=null);Tt<Bt;)Ut=y[Tt++],pt.X[(506832829*Ut&4294967295)>>>pt.Mb]=Ut;Ut=Bt,e(!(Ht>>>(ue=pt).Xa)),y[Ut]=ue.X[Ht],Ht=!0}Ht||e(Y.h==K(Y))}if(d.Pb&&Y.h&&Bt<U)e(d.m.h),d.a=5,d.m=d.wd,d.$=d.xd,0<d.s.ua&&rt(d.s.vb,d.s.Wa);else{if(Y.h)break t;H!=null&&H(d,k>Q?Q:k),d.a=0,d.$=Bt-C}return 1}return d.a=3,0}function er(d){e(d!=null),d.vc=null,d.yc=null,d.Ya=null;var y=d.Wa;y!=null&&(y.X=null),d.vb=null,e(d!=null)}function Or(){var d=new LE;return d==null?null:(d.a=0,d.xb=gO,on("Predictor","VP8LPredictors"),on("Predictor","VP8LPredictors_C"),on("PredictorAdd","VP8LPredictorsAdd"),on("PredictorAdd","VP8LPredictorsAdd_C"),ky=ie,Qo=Xt,ls=Kt,Ol=Xe,Qs=Re,SA=pr,ef=Ie,T.VP8LMapColor32b=Fd,T.VP8LMapColor8b=ME,d)}function sn(d,y,C,F,U){var Q=1,H=[d],k=[y],V=F.m,Y=F.s,ft=null,Bt=0;t:for(;;){if(C)for(;Q&&it(V,1);){var Tt=H,mt=k,Dt=F,Lt=1,pt=Dt.m,gt=Dt.gc[Dt.ab],Pt=it(pt,2);if(Dt.Oc&1<<Pt)Q=0;else{switch(Dt.Oc|=1<<Pt,gt.hc=Pt,gt.Ea=Tt[0],gt.nc=mt[0],gt.K=[null],++Dt.ab,e(4>=Dt.ab),Pt){case 0:case 1:gt.b=it(pt,3)+2,Lt=sn(bt(gt.Ea,gt.b),bt(gt.nc,gt.b),0,Dt,gt.K),gt.K=gt.K[0];break;case 3:var Ht,Ut=it(pt,8)+1,ue=16<Ut?0:4<Ut?1:2<Ut?2:3;if(Tt[0]=bt(gt.Ea,ue),gt.b=ue,Ht=Lt=sn(Ut,1,0,Dt,gt.K)){var Zt,Ne=Ut,te=gt,Nr=1<<(8>>te.b),Zr=a(Nr);if(Zr==null)Ht=0;else{var Sr=te.K[0],gr=te.w;for(Zr[0]=te.K[0][0],Zt=1;Zt<1*Ne;++Zt)Zr[Zt]=dt(Sr[gr+Zt],Zr[Zt-1]);for(;Zt<4*Nr;++Zt)Zr[Zt]=0;te.K[0]=null,te.K[0]=Zr,Ht=1}}Lt=Ht;break;case 2:break;default:e(0)}Q=Lt}}if(H=H[0],k=k[0],Q&&it(V,1)&&!(Q=1<=(Bt=it(V,4))&&11>=Bt)){F.a=3;break t}var An;if(An=Q)e:{var rn,tr,pi,qa=F,di=H,Za=k,Jr=Bt,Eo=C,Co=qa.m,$i=qa.s,ta=[null],La=1,$o=0,Hs=qk[Jr];r:for(;;){if(Eo&&it(Co,1)){var Vi=it(Co,3)+2,LA=bt(di,Vi),cc=bt(Za,Vi),of=LA*cc;if(!sn(LA,cc,0,qa,ta))break r;for(ta=ta[0],$i.xc=Vi,rn=0;rn<of;++rn){var Dl=ta[rn]>>8&65535;ta[rn]=Dl,Dl>=La&&(La=Dl+1)}}if(Co.h)break r;for(tr=0;5>tr;++tr){var Qn=dO[tr];!tr&&0<Jr&&(Qn+=1<<Jr),$o<Qn&&($o=Qn)}var $E=o(La*Hs,S),SO=La,xO=o(SO,P);if(xO==null)var Jy=null;else e(65536>=SO),Jy=xO;var Nd=a($o);if(Jy==null||Nd==null||$E==null){qa.a=1;break r}var tm=$E;for(rn=pi=0;rn<La;++rn){var fs=Jy[rn],sf=fs.G,Af=fs.H,bO=0,em=1,IO=0;for(tr=0;5>tr;++tr){Qn=dO[tr],sf[tr]=tm,Af[tr]=pi,!tr&&0<Jr&&(Qn+=1<<Jr);i:{var rm,VE=Qn,nm=qa,Pd=Nd,y9=tm,m9=pi,jE=0,Ql=nm.m,_9=it(Ql,1);if(i(Pd,0,0,VE),_9){var w9=it(Ql,1)+1,E9=it(Ql,1),FO=it(Ql,E9==0?1:8);Pd[FO]=1,w9==2&&(Pd[FO=it(Ql,8)]=1);var im=1}else{var LO=a(19),OO=it(Ql,4)+4;if(19<OO){nm.a=3;var am=0;break i}for(rm=0;rm<OO;++rm)LO[Xk[rm]]=it(Ql,3);var KE=void 0,Ud=void 0,RO=nm,C9=LO,om=VE,MO=Pd,zE=0,Hl=RO.m,NO=8,PO=o(128,S);n:for(;x(PO,0,7,C9,19);){if(it(Hl,1)){var B9=2+2*it(Hl,3);if((KE=2+it(Hl,B9))>om)break n}else KE=om;for(Ud=0;Ud<om&&KE--;){at(Hl);var UO=PO[0+(127&$(Hl))];q(Hl,Hl.u+UO.g);var lf=UO.value;if(16>lf)MO[Ud++]=lf,lf!=0&&(NO=lf);else{var T9=lf==16,DO=lf-16,S9=zk[DO],QO=it(Hl,Kk[DO])+S9;if(Ud+QO>om)break n;for(var x9=T9?NO:0;0<QO--;)MO[Ud++]=x9}}zE=1;break n}zE||(RO.a=3),im=zE}(im=im&&!Ql.h)&&(jE=x(y9,m9,8,Pd,VE)),im&&jE!=0?am=jE:(nm.a=3,am=0)}if(am==0)break r;if(em&&Yk[tr]==1&&(em=tm[pi].g==0),bO+=tm[pi].g,pi+=am,3>=tr){var Dd,YE=Nd[0];for(Dd=1;Dd<Qn;++Dd)Nd[Dd]>YE&&(YE=Nd[Dd]);IO+=YE}}if(fs.nd=em,fs.Qb=0,em&&(fs.qb=(sf[3][Af[3]+0].value<<24|sf[1][Af[1]+0].value<<16|sf[2][Af[2]+0].value)>>>0,bO==0&&256>sf[0][Af[0]+0].value&&(fs.Qb=1,fs.qb+=sf[0][Af[0]+0].value<<8)),fs.jc=!fs.Qb&&6>IO,fs.jc){var sm,OA=fs;for(sm=0;sm<Xa;++sm){var Gl=sm,kl=OA.pd[Gl],Am=OA.G[0][OA.H[0]+Gl];256<=Am.value?(kl.g=Am.g+256,kl.value=Am.value):(kl.g=0,kl.value=0,Gl>>=en(Am,8,kl),Gl>>=en(OA.G[1][OA.H[1]+Gl],16,kl),Gl>>=en(OA.G[2][OA.H[2]+Gl],0,kl),en(OA.G[3][OA.H[3]+Gl],24,kl))}}}$i.vc=ta,$i.Wb=La,$i.Ya=Jy,$i.yc=$E,An=1;break e}An=0}if(!(Q=An)){F.a=3;break t}if(0<Bt){if(Y.ua=1<<Bt,!ut(Y.Wa,Bt)){F.a=1,Q=0;break t}}else Y.ua=0;var XE=F,HO=H,b9=k,WE=XE.s,qE=WE.xc;if(XE.c=HO,XE.i=b9,WE.md=bt(HO,qE),WE.wc=qE==0?-1:(1<<qE)-1,C){F.xb=a9;break t}if((ft=a(H*k))==null){F.a=1,Q=0;break t}Q=(Q=qt(F,ft,0,H,k,k,null))&&!V.h;break t}return Q?(U!=null?U[0]=ft:(e(ft==null),e(C)),F.$=0,C||er(Y)):er(Y),Q}function Cn(d,y){var C=d.c*d.i,F=C+y+16*y;return e(d.c<=y),d.V=a(F),d.V==null?(d.Ta=null,d.Ua=0,d.a=1,0):(d.Ta=d.V,d.Ua=d.Ba+C+y,1)}function is(d,y){var C=d.C,F=y-C,U=d.V,Q=d.Ba+d.c*C;for(e(y<=d.l.o);0<F;){var H=16<F?16:F,k=d.l.ma,V=d.l.width,Y=V*H,ft=k.ca,Bt=k.tb+V*C,Tt=d.Ta,mt=d.Ua;En(d,H,U,Q),sO(Tt,mt,ft,Bt,Y),ht(k,C,C+H,ft,Bt,V),F-=H,U+=H*d.c,C+=H}e(C==y),d.C=d.Ma=y}function Ii(){this.ub=this.yd=this.td=this.Rb=0}function EA(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Sl(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function ld(){this.Yb=function(){var d=[];return function y(C,F,U){for(var Q=U[F],H=0;H<Q&&(C.push(U.length>F+1?[]:0),!(U.length<F+1));H++)y(C[H],F+1,U)}(d,0,[3,11]),d}()}function AE(){this.jb=a(3),this.Wc=s([4,8],ld),this.Xc=s([4,17],ld)}function lE(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Hh(){this.ld=this.La=this.dd=this.tc=0}function Cy(){this.Na=this.la=0}function uE(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function ud(){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 cE(){this.uc=this.M=this.Nb=0,this.wa=Array(new Hh),this.Y=0,this.ya=Array(new ud),this.aa=0,this.l=new Gh}function By(){this.y=a(16),this.f=a(8),this.ea=a(8)}function hE(){this.cb=this.a=0,this.sc="",this.m=new _t,this.Od=new Ii,this.Kc=new EA,this.ed=new lE,this.Qa=new Sl,this.Ic=this.$c=this.Aa=0,this.D=new cE,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,uE),this.Pa=new AE,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new By),this.Hd=0,this.rb=Array(new Cy),this.sb=0,this.wa=Array(new Hh),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 ud),this.L=this.aa=0,this.gd=s([4,2],Hh),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 Gh(){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 fE(){var d=new hE;return d!=null&&(d.a=0,d.sc="OK",d.cb=0,d.Xb=0,Rd||(Rd=xy)),d}function Xn(d,y,C){return d.a==0&&(d.a=y,d.sc=C,d.cb=0),0}function Ty(d,y,C){return 3<=C&&d[y+0]==157&&d[y+1]==1&&d[y+2]==42}function Sy(d,y){if(d==null)return 0;if(d.a=0,d.sc="OK",y==null)return Xn(d,2,"null VP8Io passed to VP8GetHeaders()");var C=y.data,F=y.w,U=y.ha;if(4>U)return Xn(d,7,"Truncated header.");var Q=C[F+0]|C[F+1]<<8|C[F+2]<<16,H=d.Od;if(H.Rb=!(1&Q),H.td=Q>>1&7,H.yd=Q>>4&1,H.ub=Q>>5,3<H.td)return Xn(d,3,"Incorrect keyframe parameters.");if(!H.yd)return Xn(d,4,"Frame not displayable.");F+=3,U-=3;var k=d.Kc;if(H.Rb){if(7>U)return Xn(d,7,"cannot parse picture header");if(!Ty(C,F,U))return Xn(d,3,"Bad code word");k.c=16383&(C[F+4]<<8|C[F+3]),k.Td=C[F+4]>>6,k.i=16383&(C[F+6]<<8|C[F+5]),k.Ud=C[F+6]>>6,F+=7,U-=7,d.za=k.c+15>>4,d.Ub=k.i+15>>4,y.width=k.c,y.height=k.i,y.Da=0,y.j=0,y.v=0,y.va=y.width,y.o=y.height,y.da=0,y.ib=y.width,y.hb=y.height,y.U=y.width,y.T=y.height,i((Q=d.Pa).jb,0,255,Q.jb.length),e((Q=d.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>U)return Xn(d,7,"bad partition length");X(Q=d.m,C,F,H.ub),F+=H.ub,U-=H.ub,H.Rb&&(k.Ld=wt(Q),k.Kd=wt(Q)),k=d.Qa;var V,Y=d.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 Xn(d,3,"cannot parse segment header");if((k=d.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(d.L=k.Tb==0?0:k.zd?1:2,Q.Ka)return Xn(d,3,"cannot parse filter header");var ft=U;if(U=V=F,F=V+ft,k=ft,d.Xb=(1<<z(d.m,2))-1,ft<3*(Y=d.Xb))C=7;else{for(V+=3*Y,k-=3*Y,ft=0;ft<Y;++ft){var Bt=C[U+0]|C[U+1]<<8|C[U+2]<<16;Bt>k&&(Bt=k),X(d.Jc[+ft],C,V,Bt),V+=Bt,k-=Bt,U+=3}X(d.Jc[+Y],C,V,k),C=V<F?0:5}if(C!=0)return Xn(d,C,"cannot parse partitions");for(C=z(V=d.m,7),U=wt(V)?tt(V,4):0,F=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,ft=d.Qa,Bt=0;4>Bt;++Bt){if(ft.Cb){var Tt=ft.Zb[Bt];ft.Fb||(Tt+=C)}else{if(0<Bt){d.pb[Bt]=d.pb[0];continue}Tt=C}var mt=d.pb[Bt];mt.Sc[0]=HE[_o(Tt+U,127)],mt.Sc[1]=GE[_o(Tt+0,127)],mt.Eb[0]=2*HE[_o(Tt+F,127)],mt.Eb[1]=101581*GE[_o(Tt+k,127)]>>16,8>mt.Eb[1]&&(mt.Eb[1]=8),mt.Qc[0]=HE[_o(Tt+Y,117)],mt.Qc[1]=GE[_o(Tt+V,127)],mt.lc=Tt+V}if(!H.Rb)return Xn(d,4,"Not a key frame.");for(wt(Q),H=d.Pa,C=0;4>C;++C){for(U=0;8>U;++U)for(F=0;3>F;++F)for(k=0;11>k;++k)Y=W(Q,n9[C][U][F][k])?z(Q,8):e9[C][U][F][k],H.Wc[C][U].Yb[F][k]=Y;for(U=0;17>U;++U)H.Xc[C][U]=H.Wc[C][i9[U]]}return d.kc=wt(Q),d.kc&&(d.Bd=z(Q,8)),d.cb=1}function xy(d,y,C,F,U,Q,H){var k=y[U].Yb[C];for(C=0;16>U;++U){if(!W(d,k[C+0]))return U;for(;!W(d,k[C+1]);)if(k=y[++U].Yb[0],C=0,U==16)return 16;var V=y[U+1].Yb;if(W(d,k[C+2])){var Y=d,ft=0;if(W(Y,(Tt=k)[(Bt=C)+3]))if(W(Y,Tt[Bt+6])){for(k=0,Bt=2*(ft=W(Y,Tt[Bt+8]))+(Tt=W(Y,Tt[Bt+9+ft])),ft=0,Tt=Jk[Bt];Tt[k];++k)ft+=ft+W(Y,Tt[k]);ft+=3+(8<<Bt)}else W(Y,Tt[Bt+7])?(ft=7+2*W(Y,165),ft+=W(Y,145)):ft=5+W(Y,159);else ft=W(Y,Tt[Bt+4])?3+W(Y,Tt[Bt+5]):2;k=V[2]}else ft=1,k=V[1];V=H+t9[U],0>(Y=d).b&&vt(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]=((ft^mt)-mt)*F[(0<U)+0]}return 16}function cd(d){var y=d.rb[d.sb-1];y.la=0,y.Na=0,i(d.zc,0,0,d.zc.length),d.ja=0}function pE(d,y){if(d==null)return 0;if(y==null)return Xn(d,2,"NULL VP8Io parameter in VP8Decode().");if(!d.cb&&!Sy(d,y))return 0;if(e(d.cb),y.ac==null||y.ac(y)){y.ob&&(d.L=0);var C=Zy[d.L];if(d.L==2?(d.yb=0,d.zb=0):(d.yb=y.v-C>>4,d.zb=y.j-C>>4,0>d.yb&&(d.yb=0),0>d.zb&&(d.zb=0)),d.Va=y.o+15+C>>4,d.Hb=y.va+15+C>>4,d.Hb>d.za&&(d.Hb=d.za),d.Va>d.Ub&&(d.Va=d.Ub),0<d.L){var F=d.ed;for(C=0;4>C;++C){var U;if(d.Qa.Cb){var Q=d.Qa.Lb[C];d.Qa.Fb||(Q+=F.Tb)}else Q=F.Tb;for(U=0;1>=U;++U){var H=d.gd[C][U],k=Q;if(F.Pc&&(k+=F.vd[0],U&&(k+=F.od[0])),0<(k=0>k?0:63<k?63:k)){var V=k;0<F.wb&&(V=4<F.wb?V>>2:V>>1)>9-F.wb&&(V=9-F.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=U}}}C=0}else Xn(d,6,"Frame setup failed"),C=d.a;if(C=C==0){if(C){d.$c=0,0<d.Aa||(d.Ic=g9);t:{C=d.Ic,F=4*(V=d.za);var Y=32*V,ft=V+1,Bt=0<d.L?V*(0<d.Aa?2:1):0,Tt=(d.Aa==2?2:1)*V;if((H=F+832+(U=3*(16*C+Zy[d.L])/2*Y)+(Q=d.Fa!=null&&0<d.Fa.length?d.Kc.c*d.Kc.i:0))!=H)C=0;else{if(H>d.Vb){if(d.Vb=0,d.Ec=a(H),d.Fc=0,d.Ec==null){C=Xn(d,1,"no memory during frame initialization.");break t}d.Vb=H}H=d.Ec,k=d.Fc,d.Ac=H,d.Bc=k,k+=F,d.Gd=o(Y,By),d.Hd=0,d.rb=o(ft+1,Cy),d.sb=1,d.wa=Bt?o(Bt,Hh):null,d.Y=0,d.D.Nb=0,d.D.wa=d.wa,d.D.Y=d.Y,0<d.Aa&&(d.D.Y+=V),e(!0),d.oc=H,d.pc=k,k+=832,d.ya=o(Tt,ud),d.aa=0,d.D.ya=d.ya,d.D.aa=d.aa,d.Aa==2&&(d.D.aa+=V),d.R=16*V,d.B=8*V,V=(Y=Zy[d.L])*d.R,Y=Y/2*d.B,d.sa=H,d.ta=k+V,d.qa=d.sa,d.ra=d.ta+16*C*d.R+Y,d.Ha=d.qa,d.Ia=d.ra+8*C*d.B+Y,d.$c=0,k+=U,d.mb=Q?H:null,d.nb=Q?k:null,e(k+Q<=d.Fc+d.Vb),cd(d),i(d.Ac,d.Bc,0,F),C=1}}if(C){if(y.ka=0,y.y=d.sa,y.O=d.ta,y.f=d.qa,y.N=d.ra,y.ea=d.Ha,y.Vd=d.Ia,y.fa=d.R,y.Rc=d.B,y.F=null,y.J=0,!hO){for(C=-255;255>=C;++C)AO[255+C]=0>C?-C:C;for(C=-1020;1020>=C;++C)lO[1020+C]=-128>C?-128:127<C?127:C;for(C=-112;112>=C;++C)uO[112+C]=-16>C?-16:15<C?15:C;for(C=-255;510>=C;++C)cO[255+C]=0>C?0:255<C?255:C;hO=1}us=gE,rf=dE,Rl=Iy,cs=vE,xA=Fy,Ld=by,lc=gd,nf=sc,uc=FE,Ml=yd,Od=IE,Ho=zh,bA=md,pn=Qy,dn=Dy,qn=BA,Fi=bl,IA=bE,hs[0]=Ds,hs[1]=yE,hs[2]=EE,hs[3]=CE,hs[4]=Ry,hs[5]=jh,hs[6]=My,hs[7]=pd,hs[8]=TE,hs[9]=BE,Pl[0]=Ly,Pl[1]=_E,Pl[2]=CA,Pl[3]=$h,Pl[4]=ca,Pl[5]=wE,Pl[6]=Oy,FA[0]=xl,FA[1]=mE,FA[2]=SE,FA[3]=dd,FA[4]=oc,FA[5]=xE,FA[6]=vd,C=1}else C=0}C&&(C=function(mt,Dt){for(mt.M=0;mt.M<mt.Va;++mt.M){var Lt,pt=mt.Jc[mt.M&mt.Xb],gt=mt.m,Pt=mt;for(Lt=0;Lt<Pt.za;++Lt){var Ht=gt,Ut=Pt,ue=Ut.Ac,Zt=Ut.Bc+4*Lt,Ne=Ut.zc,te=Ut.ya[Ut.aa+Lt];if(Ut.Qa.Bb?te.$b=W(Ht,Ut.Pa.jb[0])?2+W(Ht,Ut.Pa.jb[2]):W(Ht,Ut.Pa.jb[1]):te.$b=0,Ut.kc&&(te.Ad=W(Ht,Ut.Bd)),te.Za=!W(Ht,145)+0,te.Za){var Nr=te.Ob,Zr=0;for(Ut=0;4>Ut;++Ut){var Sr,gr=Ne[0+Ut];for(Sr=0;4>Sr;++Sr){gr=r9[ue[Zt+Sr]][gr];for(var An=vO[W(Ht,gr[0])];0<An;)An=vO[2*An+W(Ht,gr[An])];gr=-An,ue[Zt+Sr]=gr}n(Nr,Zr,ue,Zt,4),Zr+=4,Ne[0+Ut]=gr}}else gr=W(Ht,156)?W(Ht,128)?1:3:W(Ht,163)?2:0,te.Ob[0]=gr,i(ue,Zt,gr,4),i(Ne,0,gr,4);te.Dd=W(Ht,142)?W(Ht,114)?W(Ht,183)?1:3:2:0}if(Pt.m.Ka)return Xn(mt,7,"Premature end-of-partition0 encountered.");for(;mt.ja<mt.za;++mt.ja){if(Pt=pt,Ht=(gt=mt).rb[gt.sb-1],ue=gt.rb[gt.sb+gt.ja],Lt=gt.ya[gt.aa+gt.ja],Zt=gt.kc?Lt.Ad:0)Ht.la=ue.la=0,Lt.Za||(Ht.Na=ue.Na=0),Lt.Hc=0,Lt.Gc=0,Lt.ia=0;else{var rn,tr;if(Ht=ue,ue=Pt,Zt=gt.Pa.Xc,Ne=gt.ya[gt.aa+gt.ja],te=gt.pb[Ne.$b],Ut=Ne.ad,Nr=0,Zr=gt.rb[gt.sb-1],gr=Sr=0,i(Ut,Nr,0,384),Ne.Za)var pi=0,qa=Zt[3];else{An=a(16);var di=Ht.Na+Zr.Na;if(di=Rd(ue,Zt[1],di,te.Eb,0,An,0),Ht.Na=Zr.Na=(0<di)+0,1<di)us(An,0,Ut,Nr);else{var Za=An[0]+3>>3;for(An=0;256>An;An+=16)Ut[Nr+An]=Za}pi=1,qa=Zt[0]}var Jr=15&Ht.la,Eo=15&Zr.la;for(An=0;4>An;++An){var Co=1&Eo;for(Za=tr=0;4>Za;++Za)Jr=Jr>>1|(Co=(di=Rd(ue,qa,di=Co+(1&Jr),te.Sc,pi,Ut,Nr))>pi)<<7,tr=tr<<2|(3<di?3:1<di?2:Ut[Nr+0]!=0),Nr+=16;Jr>>=4,Eo=Eo>>1|Co<<7,Sr=(Sr<<8|tr)>>>0}for(qa=Jr,pi=Eo>>4,rn=0;4>rn;rn+=2){for(tr=0,Jr=Ht.la>>4+rn,Eo=Zr.la>>4+rn,An=0;2>An;++An){for(Co=1&Eo,Za=0;2>Za;++Za)di=Co+(1&Jr),Jr=Jr>>1|(Co=0<(di=Rd(ue,Zt[2],di,te.Qc,0,Ut,Nr)))<<3,tr=tr<<2|(3<di?3:1<di?2:Ut[Nr+0]!=0),Nr+=16;Jr>>=2,Eo=Eo>>1|Co<<5}gr|=tr<<4*rn,qa|=Jr<<4<<rn,pi|=(240&Eo)<<rn}Ht.la=qa,Zr.la=pi,Ne.Hc=Sr,Ne.Gc=gr,Ne.ia=43690&gr?0:te.ia,Zt=!(Sr|gr)}if(0<gt.L&&(gt.wa[gt.Y+gt.ja]=gt.gd[Lt.$b][Lt.Za],gt.wa[gt.Y+gt.ja].La|=!Zt),Pt.Ka)return Xn(mt,7,"Premature end-of-file encountered.")}if(cd(mt),gt=Dt,Pt=1,Lt=(pt=mt).D,Ht=0<pt.L&&pt.M>=pt.zb&&pt.M<=pt.Va,pt.Aa==0)t:{if(Lt.M=pt.M,Lt.uc=Ht,Td(pt,Lt),Pt=1,Lt=(tr=pt.D).Nb,Ht=(gr=Zy[pt.L])*pt.R,ue=gr/2*pt.B,An=16*Lt*pt.R,Za=8*Lt*pt.B,Zt=pt.sa,Ne=pt.ta-Ht+An,te=pt.qa,Ut=pt.ra-ue+Za,Nr=pt.Ha,Zr=pt.Ia-ue+Za,Eo=(Jr=tr.M)==0,Sr=Jr>=pt.Va-1,pt.Aa==2&&Td(pt,tr),tr.uc)for(Co=(di=pt).D.M,e(di.D.uc),tr=di.yb;tr<di.Hb;++tr){pi=tr,qa=Co;var $i=(ta=(Qn=di).D).Nb;rn=Qn.R;var ta=ta.wa[ta.Y+pi],La=Qn.sa,$o=Qn.ta+16*$i*rn+16*pi,Hs=ta.dd,Vi=ta.tc;if(Vi!=0)if(e(3<=Vi),Qn.L==1)0<pi&&qn(La,$o,rn,Vi+4),ta.La&&IA(La,$o,rn,Vi),0<qa&&dn(La,$o,rn,Vi+4),ta.La&&Fi(La,$o,rn,Vi);else{var LA=Qn.B,cc=Qn.qa,of=Qn.ra+8*$i*LA+8*pi,Dl=Qn.Ha,Qn=Qn.Ia+8*$i*LA+8*pi;$i=ta.ld,0<pi&&(nf(La,$o,rn,Vi+4,Hs,$i),Ml(cc,of,Dl,Qn,LA,Vi+4,Hs,$i)),ta.La&&(Ho(La,$o,rn,Vi,Hs,$i),pn(cc,of,Dl,Qn,LA,Vi,Hs,$i)),0<qa&&(lc(La,$o,rn,Vi+4,Hs,$i),uc(cc,of,Dl,Qn,LA,Vi+4,Hs,$i)),ta.La&&(Od(La,$o,rn,Vi,Hs,$i),bA(cc,of,Dl,Qn,LA,Vi,Hs,$i))}}if(pt.ia&&alert("todo:DitherRow"),gt.put!=null){if(tr=16*Jr,Jr=16*(Jr+1),Eo?(gt.y=pt.sa,gt.O=pt.ta+An,gt.f=pt.qa,gt.N=pt.ra+Za,gt.ea=pt.Ha,gt.W=pt.Ia+Za):(tr-=gr,gt.y=Zt,gt.O=Ne,gt.f=te,gt.N=Ut,gt.ea=Nr,gt.W=Zr),Sr||(Jr-=gr),Jr>gt.o&&(Jr=gt.o),gt.F=null,gt.J=null,pt.Fa!=null&&0<pt.Fa.length&&tr<Jr&&(gt.J=Cd(pt,gt,tr,Jr-tr),gt.F=pt.mb,gt.F==null&&gt.F.length==0)){Pt=Xn(pt,3,"Could not decode alpha data.");break t}tr<gt.j&&(gr=gt.j-tr,tr=gt.j,e(!(1&gr)),gt.O+=pt.R*gr,gt.N+=pt.B*(gr>>1),gt.W+=pt.B*(gr>>1),gt.F!=null&&(gt.J+=gt.width*gr)),tr<Jr&&(gt.O+=gt.v,gt.N+=gt.v>>1,gt.W+=gt.v>>1,gt.F!=null&&(gt.J+=gt.v),gt.ka=tr-gt.j,gt.U=gt.va-gt.v,gt.T=Jr-tr,Pt=gt.put(gt))}Lt+1!=pt.Ic||Sr||(n(pt.sa,pt.ta-Ht,Zt,Ne+16*pt.R,Ht),n(pt.qa,pt.ra-ue,te,Ut+8*pt.B,ue),n(pt.Ha,pt.Ia-ue,Nr,Zr+8*pt.B,ue))}if(!Pt)return Xn(mt,6,"Output aborted.")}return 1}(d,y)),y.bc!=null&&y.bc(y),C&=1}return C?(d.cb=0,C):0}function as(d,y,C,F,U){U=d[y+C+32*F]+(U>>3),d[y+C+32*F]=-256&U?0>U?0:255:U}function kh(d,y,C,F,U,Q){as(d,y,0,C,F+U),as(d,y,1,C,F+Q),as(d,y,2,C,F-Q),as(d,y,3,C,F-U)}function Ya(d){return(20091*d>>16)+d}function hd(d,y,C,F){var U,Q=0,H=a(16);for(U=0;4>U;++U){var k=d[y+0]+d[y+8],V=d[y+0]-d[y+8],Y=(35468*d[y+4]>>16)-Ya(d[y+12]),ft=Ya(d[y+4])+(35468*d[y+12]>>16);H[Q+0]=k+ft,H[Q+1]=V+Y,H[Q+2]=V-Y,H[Q+3]=k-ft,Q+=4,y++}for(U=Q=0;4>U;++U)k=(d=H[Q+0]+4)+H[Q+8],V=d-H[Q+8],Y=(35468*H[Q+4]>>16)-Ya(H[Q+12]),as(C,F,0,0,k+(ft=Ya(H[Q+4])+(35468*H[Q+12]>>16))),as(C,F,1,0,V+Y),as(C,F,2,0,V-Y),as(C,F,3,0,k-ft),Q++,F+=32}function by(d,y,C,F){var U=d[y+0]+4,Q=35468*d[y+4]>>16,H=Ya(d[y+4]),k=35468*d[y+1]>>16;kh(C,F,0,U+H,d=Ya(d[y+1]),k),kh(C,F,1,U+Q,d,k),kh(C,F,2,U-Q,d,k),kh(C,F,3,U-H,d,k)}function dE(d,y,C,F,U){hd(d,y,C,F),U&&hd(d,y+16,C,F+4)}function Iy(d,y,C,F){rf(d,y+0,C,F,1),rf(d,y+32,C,F+128,1)}function vE(d,y,C,F){var U;for(d=d[y+0]+4,U=0;4>U;++U)for(y=0;4>y;++y)as(C,F,y,U,d)}function Fy(d,y,C,F){d[y+0]&&cs(d,y+0,C,F),d[y+16]&&cs(d,y+16,C,F+4),d[y+32]&&cs(d,y+32,C,F+128),d[y+48]&&cs(d,y+48,C,F+128+4)}function gE(d,y,C,F){var U,Q=a(16);for(U=0;4>U;++U){var H=d[y+0+U]+d[y+12+U],k=d[y+4+U]+d[y+8+U],V=d[y+4+U]-d[y+8+U],Y=d[y+0+U]-d[y+12+U];Q[0+U]=H+k,Q[8+U]=H-k,Q[4+U]=Y+V,Q[12+U]=Y-V}for(U=0;4>U;++U)H=(d=Q[0+4*U]+3)+Q[3+4*U],k=Q[1+4*U]+Q[2+4*U],V=Q[1+4*U]-Q[2+4*U],Y=d-Q[3+4*U],C[F+0]=H+k>>3,C[F+16]=Y+V>>3,C[F+32]=H-k>>3,C[F+48]=Y-V>>3,F+=64}function fd(d,y,C){var F,U=y-32,Q=wo,H=255-d[U-1];for(F=0;F<C;++F){var k,V=Q,Y=H+d[y-1];for(k=0;k<C;++k)d[y+k]=V[Y+d[U+k]];y+=32}}function yE(d,y){fd(d,y,4)}function mE(d,y){fd(d,y,8)}function _E(d,y){fd(d,y,16)}function CA(d,y){var C;for(C=0;16>C;++C)n(d,y+32*C,d,y-32,16)}function $h(d,y){var C;for(C=16;0<C;--C)i(d,y,d[y-1],16),y+=32}function Vh(d,y,C){var F;for(F=0;16>F;++F)i(y,C+32*F,d,16)}function Ly(d,y){var C,F=16;for(C=0;16>C;++C)F+=d[y-1+32*C]+d[y+C-32];Vh(F>>5,d,y)}function ca(d,y){var C,F=8;for(C=0;16>C;++C)F+=d[y-1+32*C];Vh(F>>4,d,y)}function wE(d,y){var C,F=8;for(C=0;16>C;++C)F+=d[y+C-32];Vh(F>>4,d,y)}function Oy(d,y){Vh(128,d,y)}function Ve(d,y,C){return d+2*y+C+2>>2}function EE(d,y){var C,F=y-32;for(F=new Uint8Array([Ve(d[F-1],d[F+0],d[F+1]),Ve(d[F+0],d[F+1],d[F+2]),Ve(d[F+1],d[F+2],d[F+3]),Ve(d[F+2],d[F+3],d[F+4])]),C=0;4>C;++C)n(d,y+32*C,F,0,F.length)}function CE(d,y){var C=d[y-1],F=d[y-1+32],U=d[y-1+64],Q=d[y-1+96];It(d,y+0,16843009*Ve(d[y-1-32],C,F)),It(d,y+32,16843009*Ve(C,F,U)),It(d,y+64,16843009*Ve(F,U,Q)),It(d,y+96,16843009*Ve(U,Q,Q))}function Ds(d,y){var C,F=4;for(C=0;4>C;++C)F+=d[y+C-32]+d[y-1+32*C];for(F>>=3,C=0;4>C;++C)i(d,y+32*C,F,4)}function Ry(d,y){var C=d[y-1+0],F=d[y-1+32],U=d[y-1+64],Q=d[y-1-32],H=d[y+0-32],k=d[y+1-32],V=d[y+2-32],Y=d[y+3-32];d[y+0+96]=Ve(F,U,d[y-1+96]),d[y+1+96]=d[y+0+64]=Ve(C,F,U),d[y+2+96]=d[y+1+64]=d[y+0+32]=Ve(Q,C,F),d[y+3+96]=d[y+2+64]=d[y+1+32]=d[y+0+0]=Ve(H,Q,C),d[y+3+64]=d[y+2+32]=d[y+1+0]=Ve(k,H,Q),d[y+3+32]=d[y+2+0]=Ve(V,k,H),d[y+3+0]=Ve(Y,V,k)}function My(d,y){var C=d[y+1-32],F=d[y+2-32],U=d[y+3-32],Q=d[y+4-32],H=d[y+5-32],k=d[y+6-32],V=d[y+7-32];d[y+0+0]=Ve(d[y+0-32],C,F),d[y+1+0]=d[y+0+32]=Ve(C,F,U),d[y+2+0]=d[y+1+32]=d[y+0+64]=Ve(F,U,Q),d[y+3+0]=d[y+2+32]=d[y+1+64]=d[y+0+96]=Ve(U,Q,H),d[y+3+32]=d[y+2+64]=d[y+1+96]=Ve(Q,H,k),d[y+3+64]=d[y+2+96]=Ve(H,k,V),d[y+3+96]=Ve(k,V,V)}function jh(d,y){var C=d[y-1+0],F=d[y-1+32],U=d[y-1+64],Q=d[y-1-32],H=d[y+0-32],k=d[y+1-32],V=d[y+2-32],Y=d[y+3-32];d[y+0+0]=d[y+1+64]=Q+H+1>>1,d[y+1+0]=d[y+2+64]=H+k+1>>1,d[y+2+0]=d[y+3+64]=k+V+1>>1,d[y+3+0]=V+Y+1>>1,d[y+0+96]=Ve(U,F,C),d[y+0+64]=Ve(F,C,Q),d[y+0+32]=d[y+1+96]=Ve(C,Q,H),d[y+1+32]=d[y+2+96]=Ve(Q,H,k),d[y+2+32]=d[y+3+96]=Ve(H,k,V),d[y+3+32]=Ve(k,V,Y)}function pd(d,y){var C=d[y+0-32],F=d[y+1-32],U=d[y+2-32],Q=d[y+3-32],H=d[y+4-32],k=d[y+5-32],V=d[y+6-32],Y=d[y+7-32];d[y+0+0]=C+F+1>>1,d[y+1+0]=d[y+0+64]=F+U+1>>1,d[y+2+0]=d[y+1+64]=U+Q+1>>1,d[y+3+0]=d[y+2+64]=Q+H+1>>1,d[y+0+32]=Ve(C,F,U),d[y+1+32]=d[y+0+96]=Ve(F,U,Q),d[y+2+32]=d[y+1+96]=Ve(U,Q,H),d[y+3+32]=d[y+2+96]=Ve(Q,H,k),d[y+3+64]=Ve(H,k,V),d[y+3+96]=Ve(k,V,Y)}function BE(d,y){var C=d[y-1+0],F=d[y-1+32],U=d[y-1+64],Q=d[y-1+96];d[y+0+0]=C+F+1>>1,d[y+2+0]=d[y+0+32]=F+U+1>>1,d[y+2+32]=d[y+0+64]=U+Q+1>>1,d[y+1+0]=Ve(C,F,U),d[y+3+0]=d[y+1+32]=Ve(F,U,Q),d[y+3+32]=d[y+1+64]=Ve(U,Q,Q),d[y+3+64]=d[y+2+64]=d[y+0+96]=d[y+1+96]=d[y+2+96]=d[y+3+96]=Q}function TE(d,y){var C=d[y-1+0],F=d[y-1+32],U=d[y-1+64],Q=d[y-1+96],H=d[y-1-32],k=d[y+0-32],V=d[y+1-32],Y=d[y+2-32];d[y+0+0]=d[y+2+32]=C+H+1>>1,d[y+0+32]=d[y+2+64]=F+C+1>>1,d[y+0+64]=d[y+2+96]=U+F+1>>1,d[y+0+96]=Q+U+1>>1,d[y+3+0]=Ve(k,V,Y),d[y+2+0]=Ve(H,k,V),d[y+1+0]=d[y+3+32]=Ve(C,H,k),d[y+1+32]=d[y+3+64]=Ve(F,C,H),d[y+1+64]=d[y+3+96]=Ve(U,F,C),d[y+1+96]=Ve(Q,U,F)}function SE(d,y){var C;for(C=0;8>C;++C)n(d,y+32*C,d,y-32,8)}function dd(d,y){var C;for(C=0;8>C;++C)i(d,y,d[y-1],8),y+=32}function ac(d,y,C){var F;for(F=0;8>F;++F)i(y,C+32*F,d,8)}function xl(d,y){var C,F=8;for(C=0;8>C;++C)F+=d[y+C-32]+d[y-1+32*C];ac(F>>4,d,y)}function xE(d,y){var C,F=4;for(C=0;8>C;++C)F+=d[y+C-32];ac(F>>3,d,y)}function oc(d,y){var C,F=4;for(C=0;8>C;++C)F+=d[y-1+32*C];ac(F>>3,d,y)}function vd(d,y){ac(128,d,y)}function Kh(d,y,C){var F=d[y-C],U=d[y+0],Q=3*(U-F)+NE[1020+d[y-2*C]-d[y+C]],H=Vy[112+(Q+4>>3)];d[y-C]=wo[255+F+Vy[112+(Q+3>>3)]],d[y+0]=wo[255+U-H]}function Ny(d,y,C,F){var U=d[y+0],Q=d[y+C];return Go[255+d[y-2*C]-d[y-C]]>F||Go[255+Q-U]>F}function Py(d,y,C,F){return 4*Go[255+d[y-C]-d[y+0]]+Go[255+d[y-2*C]-d[y+C]]<=F}function Uy(d,y,C,F,U){var Q=d[y-3*C],H=d[y-2*C],k=d[y-C],V=d[y+0],Y=d[y+C],ft=d[y+2*C],Bt=d[y+3*C];return 4*Go[255+k-V]+Go[255+H-Y]>F?0:Go[255+d[y-4*C]-Q]<=U&&Go[255+Q-H]<=U&&Go[255+H-k]<=U&&Go[255+Bt-ft]<=U&&Go[255+ft-Y]<=U&&Go[255+Y-V]<=U}function Dy(d,y,C,F){var U=2*F+1;for(F=0;16>F;++F)Py(d,y+F,C,U)&&Kh(d,y+F,C)}function BA(d,y,C,F){var U=2*F+1;for(F=0;16>F;++F)Py(d,y+F*C,1,U)&&Kh(d,y+F*C,1)}function bl(d,y,C,F){var U;for(U=3;0<U;--U)Dy(d,y+=4*C,C,F)}function bE(d,y,C,F){var U;for(U=3;0<U;--U)BA(d,y+=4,C,F)}function Il(d,y,C,F,U,Q,H,k){for(Q=2*Q+1;0<U--;){if(Uy(d,y,C,Q,H))if(Ny(d,y,C,k))Kh(d,y,C);else{var V=d,Y=y,ft=C,Bt=V[Y-2*ft],Tt=V[Y-ft],mt=V[Y+0],Dt=V[Y+ft],Lt=V[Y+2*ft],pt=27*(Pt=NE[1020+3*(mt-Tt)+NE[1020+Bt-Dt]])+63>>7,gt=18*Pt+63>>7,Pt=9*Pt+63>>7;V[Y-3*ft]=wo[255+V[Y-3*ft]+Pt],V[Y-2*ft]=wo[255+Bt+gt],V[Y-ft]=wo[255+Tt+pt],V[Y+0]=wo[255+mt-pt],V[Y+ft]=wo[255+Dt-gt],V[Y+2*ft]=wo[255+Lt-Pt]}y+=F}}function os(d,y,C,F,U,Q,H,k){for(Q=2*Q+1;0<U--;){if(Uy(d,y,C,Q,H))if(Ny(d,y,C,k))Kh(d,y,C);else{var V=d,Y=y,ft=C,Bt=V[Y-ft],Tt=V[Y+0],mt=V[Y+ft],Dt=Vy[112+((Lt=3*(Tt-Bt))+4>>3)],Lt=Vy[112+(Lt+3>>3)],pt=Dt+1>>1;V[Y-2*ft]=wo[255+V[Y-2*ft]+pt],V[Y-ft]=wo[255+Bt+Lt],V[Y+0]=wo[255+Tt-Dt],V[Y+ft]=wo[255+mt-pt]}y+=F}}function gd(d,y,C,F,U,Q){Il(d,y,C,1,16,F,U,Q)}function sc(d,y,C,F,U,Q){Il(d,y,1,C,16,F,U,Q)}function IE(d,y,C,F,U,Q){var H;for(H=3;0<H;--H)os(d,y+=4*C,C,1,16,F,U,Q)}function zh(d,y,C,F,U,Q){var H;for(H=3;0<H;--H)os(d,y+=4,1,C,16,F,U,Q)}function FE(d,y,C,F,U,Q,H,k){Il(d,y,U,1,8,Q,H,k),Il(C,F,U,1,8,Q,H,k)}function yd(d,y,C,F,U,Q,H,k){Il(d,y,1,U,8,Q,H,k),Il(C,F,1,U,8,Q,H,k)}function md(d,y,C,F,U,Q,H,k){os(d,y+4*U,U,1,8,Q,H,k),os(C,F+4*U,U,1,8,Q,H,k)}function Qy(d,y,C,F,U,Q,H,k){os(d,y+4,1,U,8,Q,H,k),os(C,F+4,1,U,8,Q,H,k)}function Yh(){this.ba=new ci,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 _d(){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 wd(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Hy(){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 P,this.yc=new S}function LE(){this.xb=this.a=0,this.l=new Gh,this.ca=new ci,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new R,this.Pb=0,this.wd=new R,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Hy,this.ab=0,this.gc=o(4,wd),this.Oc=0}function Xh(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gh,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Ac(d,y,C,F,U,Q,H){for(d=d==null?0:d[y+0],y=0;y<H;++y)U[Q+y]=d+C[F+y]&255,d=U[Q+y]}function Ed(d,y,C,F,U,Q,H){var k;if(d==null)Ac(null,null,C,F,U,Q,H);else for(k=0;k<H;++k)U[Q+k]=d[y+k]+C[F+k]&255}function Fl(d,y,C,F,U,Q,H){if(d==null)Ac(null,null,C,F,U,Q,H);else{var k,V=d[y+0],Y=V,ft=V;for(k=0;k<H;++k)Y=ft+(V=d[y+k])-Y,ft=C[F+k]+(-256&Y?0>Y?0:255:Y)&255,Y=V,U[Q+k]=ft}}function Cd(d,y,C,F){var U=y.width,Q=y.o;if(e(d!=null&&y!=null),0>C||0>=F||C+F>Q)return null;if(!d.Cc){if(d.ga==null){var H;if(d.ga=new Xh,(H=d.ga==null)||(H=y.width*y.o,e(d.Gb.length==0),d.Gb=a(H),d.Uc=0,d.Gb==null?H=0:(d.mb=d.Gb,d.nb=d.Uc,d.rc=null,H=1),H=!H),!H){H=d.ga;var k=d.Fa,V=d.P,Y=d.qc,ft=d.mb,Bt=d.nb,Tt=V+1,mt=Y-1,Dt=H.l;if(e(k!=null&&ft!=null&&y!=null),Ul[0]=null,Ul[1]=Ac,Ul[2]=Ed,Ul[3]=Fl,H.ca=ft,H.tb=Bt,H.c=y.width,H.i=y.height,e(0<H.c&&0<H.i),1>=Y)y=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)y=0;else if(Dt.put=Si,Dt.ac=fn,Dt.bc=xi,Dt.ma=H,Dt.width=y.width,Dt.height=y.height,Dt.Da=y.Da,Dt.v=y.v,Dt.va=y.va,Dt.j=y.j,Dt.o=y.o,H.$a)t:{e(H.$a==1),y=Or();e:for(;;){if(y==null){y=0;break t}if(e(H!=null),H.mc=y,y.c=H.c,y.i=H.i,y.l=H.l,y.l.ma=H,y.l.width=H.c,y.l.height=H.i,y.a=0,J(y.m,k,Tt,mt),!sn(H.c,H.i,1,y,null)||(y.ab==1&&y.gc[0].hc==3&&se(y.s)?(H.ic=1,k=y.c*y.i,y.Ta=null,y.Ua=0,y.V=a(k),y.Ba=0,y.V==null?(y.a=1,y=0):y=1):(H.ic=0,y=Cn(y,H.c)),!y))break e;y=1;break t}H.mc=null,y=0}else y=mt>=H.c*H.i;H=!y}if(H)return null;d.ga.Lc!=1?d.Ga=0:F=Q-C}e(d.ga!=null),e(C+F<=Q);t:{if(y=(k=d.ga).c,Q=k.l.o,k.$a==0){if(Tt=d.rc,mt=d.Vc,Dt=d.Fa,V=d.P+1+C*y,Y=d.mb,ft=d.nb+C*y,e(V<=d.P+d.qc),k.Z!=0)for(e(Ul[k.Z]!=null),H=0;H<F;++H)Ul[k.Z](Tt,mt,Dt,V,Y,ft,y),Tt=Y,mt=ft,ft+=y,V+=y;else for(H=0;H<F;++H)n(Y,ft,Dt,V,y),Tt=Y,mt=ft,ft+=y,V+=y;d.rc=Tt,d.Vc=mt}else{if(e(k.mc!=null),y=C+F,e((H=k.mc)!=null),e(y<=H.i),H.C>=y)y=1;else if(k.ic||Ct(),k.ic){k=H.V,Tt=H.Ba,mt=H.c;var Lt=H.i,pt=(Dt=1,V=H.$/mt,Y=H.$%mt,ft=H.m,Bt=H.s,H.$),gt=mt*Lt,Pt=mt*y,Ht=Bt.wc,Ut=pt<Pt?qr(Bt,Y,V):null;e(pt<=gt),e(y<=Lt),e(se(Bt));e:for(;;){for(;!ft.h&&pt<Pt;){if(Y&Ht||(Ut=qr(Bt,Y,V)),e(Ut!=null),at(ft),256>(Lt=bi(Ut.G[0],Ut.H[0],ft)))k[Tt+pt]=Lt,++pt,++Y>=mt&&(Y=0,++V<=y&&!(V%16)&&Qt(H,V));else{if(!(280>Lt)){Dt=0;break e}Lt=hi(Lt-256,ft);var ue,Zt=bi(Ut.G[4],Ut.H[4],ft);if(at(ft),!(pt>=(Zt=Dn(mt,Zt=hi(Zt,ft)))&&gt-pt>=Lt)){Dt=0;break e}for(ue=0;ue<Lt;++ue)k[Tt+pt+ue]=k[Tt+pt+ue-Zt];for(pt+=Lt,Y+=Lt;Y>=mt;)Y-=mt,++V<=y&&!(V%16)&&Qt(H,V);pt<Pt&&Y&Ht&&(Ut=qr(Bt,Y,V))}e(ft.h==K(ft))}Qt(H,V>y?y:V);break e}!Dt||ft.h&&pt<gt?(Dt=0,H.a=ft.h?5:3):H.$=pt,y=Dt}else y=qt(H,H.V,H.Ba,H.c,H.i,y,is);if(!y){F=0;break t}}C+F>=Q&&(d.Cc=1),F=1}if(!F)return null;if(d.Cc&&((F=d.ga)!=null&&(F.mc=null),d.ga=null,0<d.Ga))return alert("todo:WebPDequantizeLevels"),null}return d.nb+C*U}function w(d,y,C,F,U,Q){for(;0<U--;){var H,k=d,V=y+(C?1:0),Y=d,ft=y+(C?0:3);for(H=0;H<F;++H){var Bt=Y[ft+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)}y+=Q}}function D(d,y,C,F,U){for(;0<F--;){var Q;for(Q=0;Q<C;++Q){var H=d[y+2*Q+0],k=15&(Y=d[y+2*Q+1]),V=4369*k,Y=(240&Y|Y>>4)*V>>16;d[y+2*Q+0]=(240&H|H>>4)*V>>16&240|(15&H|H<<4)*V>>16>>4&15,d[y+2*Q+1]=240&Y|k}y+=U}}function et(d,y,C,F,U,Q,H,k){var V,Y,ft=255;for(Y=0;Y<U;++Y){for(V=0;V<F;++V){var Bt=d[y+V];Q[H+4*V]=Bt,ft&=Bt}y+=C,H+=k}return ft!=255}function lt(d,y,C,F,U){var Q;for(Q=0;Q<U;++Q)C[F+Q]=d[y+Q]>>8}function Ct(){Nl=w,af=D,$y=et,sO=lt}function Rt(d,y,C){T[d]=function(F,U,Q,H,k,V,Y,ft,Bt,Tt,mt,Dt,Lt,pt,gt,Pt,Ht){var Ut,ue=Ht-1>>1,Zt=k[V+0]|Y[ft+0]<<16,Ne=Bt[Tt+0]|mt[Dt+0]<<16;e(F!=null);var te=3*Zt+Ne+131074>>2;for(y(F[U+0],255&te,te>>16,Lt,pt),Q!=null&&(te=3*Ne+Zt+131074>>2,y(Q[H+0],255&te,te>>16,gt,Pt)),Ut=1;Ut<=ue;++Ut){var Nr=k[V+Ut]|Y[ft+Ut]<<16,Zr=Bt[Tt+Ut]|mt[Dt+Ut]<<16,Sr=Zt+Nr+Ne+Zr+524296,gr=Sr+2*(Nr+Ne)>>3;te=gr+Zt>>1,Zt=(Sr=Sr+2*(Zt+Zr)>>3)+Nr>>1,y(F[U+2*Ut-1],255&te,te>>16,Lt,pt+(2*Ut-1)*C),y(F[U+2*Ut-0],255&Zt,Zt>>16,Lt,pt+(2*Ut-0)*C),Q!=null&&(te=Sr+Ne>>1,Zt=gr+Zr>>1,y(Q[H+2*Ut-1],255&te,te>>16,gt,Pt+(2*Ut-1)*C),y(Q[H+2*Ut+0],255&Zt,Zt>>16,gt,Pt+(2*Ut+0)*C)),Zt=Nr,Ne=Zr}1&Ht||(te=3*Zt+Ne+131074>>2,y(F[U+Ht-1],255&te,te>>16,Lt,pt+(Ht-1)*C),Q!=null&&(te=3*Ne+Zt+131074>>2,y(Q[H+Ht-1],255&te,te>>16,gt,Pt+(Ht-1)*C)))}}function jt(){ko[jy]=o9,ko[Ky]=yO,ko[fO]=s9,ko[zy]=mO,ko[Yy]=_O,ko[PE]=wO,ko[pO]=A9,ko[UE]=yO,ko[DE]=mO,ko[Xy]=_O,ko[QE]=wO}function re(d){return d&~l9?0>d?0:255:d>>EO}function Fe(d,y){return re((19077*d>>8)+(26149*y>>8)-14234)}function ur(d,y,C){return re((19077*d>>8)-(6419*y>>8)-(13320*C>>8)+8708)}function Ke(d,y){return re((19077*d>>8)+(33050*y>>8)-17685)}function Tr(d,y,C,F,U){F[U+0]=Fe(d,C),F[U+1]=ur(d,y,C),F[U+2]=Ke(d,y)}function Ji(d,y,C,F,U){F[U+0]=Ke(d,y),F[U+1]=ur(d,y,C),F[U+2]=Fe(d,C)}function Wn(d,y,C,F,U){var Q=ur(d,y,C);y=Q<<3&224|Ke(d,y)>>3,F[U+0]=248&Fe(d,C)|Q>>5,F[U+1]=y}function fi(d,y,C,F,U){var Q=240&Ke(d,y)|15;F[U+0]=240&Fe(d,C)|ur(d,y,C)>>4,F[U+1]=Q}function ha(d,y,C,F,U){F[U+0]=255,Tr(d,y,C,F,U+1)}function ki(d,y,C,F,U){Ji(d,y,C,F,U),F[U+3]=255}function ss(d,y,C,F,U){Tr(d,y,C,F,U),F[U+3]=255}function _o(d,y){return 0>d?0:d>y?y:d}function TA(d,y,C){T[d]=function(F,U,Q,H,k,V,Y,ft,Bt){for(var Tt=ft+(-2&Bt)*C;ft!=Tt;)y(F[U+0],Q[H+0],k[V+0],Y,ft),y(F[U+1],Q[H+0],k[V+0],Y,ft+C),U+=2,++H,++V,ft+=2*C;1&Bt&&y(F[U+0],Q[H+0],k[V+0],Y,ft)}}function Gy(d,y,C){return C==0?d==0?y==0?6:5:y==0?4:0:C}function Bd(d,y,C,F,U){switch(d>>>30){case 3:rf(y,C,F,U,0);break;case 2:Ld(y,C,F,U);break;case 1:cs(y,C,F,U)}}function Td(d,y){var C,F,U=y.M,Q=y.Nb,H=d.oc,k=d.pc+40,V=d.oc,Y=d.pc+584,ft=d.oc,Bt=d.pc+600;for(C=0;16>C;++C)H[k+32*C-1]=129;for(C=0;8>C;++C)V[Y+32*C-1]=129,ft[Bt+32*C-1]=129;for(0<U?H[k-1-32]=V[Y-1-32]=ft[Bt-1-32]=129:(i(H,k-32-1,127,21),i(V,Y-32-1,127,9),i(ft,Bt-32-1,127,9)),F=0;F<d.za;++F){var Tt=y.ya[y.aa+F];if(0<F){for(C=-1;16>C;++C)n(H,k+32*C-4,H,k+32*C+12,4);for(C=-1;8>C;++C)n(V,Y+32*C-4,V,Y+32*C+4,4),n(ft,Bt+32*C-4,ft,Bt+32*C+4,4)}var mt=d.Gd,Dt=d.Hd+F,Lt=Tt.ad,pt=Tt.Hc;if(0<U&&(n(H,k-32,mt[Dt].y,0,16),n(V,Y-32,mt[Dt].f,0,8),n(ft,Bt-32,mt[Dt].ea,0,8)),Tt.Za){var gt=H,Pt=k-32+16;for(0<U&&(F>=d.za-1?i(gt,Pt,mt[Dt].y[15],4):n(gt,Pt,mt[Dt+1].y,0,4)),C=0;4>C;C++)gt[Pt+128+C]=gt[Pt+256+C]=gt[Pt+384+C]=gt[Pt+0+C];for(C=0;16>C;++C,pt<<=2)gt=H,Pt=k+BO[C],hs[Tt.Ob[C]](gt,Pt),Bd(pt,Lt,16*+C,gt,Pt)}else if(gt=Gy(F,U,Tt.Ob[0]),Pl[gt](H,k),pt!=0)for(C=0;16>C;++C,pt<<=2)Bd(pt,Lt,16*+C,H,k+BO[C]);for(C=Tt.Gc,gt=Gy(F,U,Tt.Dd),FA[gt](V,Y),FA[gt](ft,Bt),pt=Lt,gt=V,Pt=Y,255&(Tt=C>>0)&&(170&Tt?Rl(pt,256,gt,Pt):xA(pt,256,gt,Pt)),Tt=ft,pt=Bt,255&(C>>=8)&&(170&C?Rl(Lt,320,Tt,pt):xA(Lt,320,Tt,pt)),U<d.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,ft,Bt+224,8)),C=8*Q*d.B,mt=d.sa,Dt=d.ta+16*F+16*Q*d.R,Lt=d.qa,Tt=d.ra+8*F+C,pt=d.Ha,gt=d.Ia+8*F+C,C=0;16>C;++C)n(mt,Dt+C*d.R,H,k+32*C,16);for(C=0;8>C;++C)n(Lt,Tt+C*d.B,V,Y+32*C,8),n(pt,gt+C*d.B,ft,Bt+32*C,8)}}function Wh(d,y,C,F,U,Q,H,k,V){var Y=[0],ft=[0],Bt=0,Tt=V!=null?V.kd:0,mt=V??new _d;if(d==null||12>C)return 7;mt.data=d,mt.w=y,mt.ha=C,y=[y],C=[C],mt.gb=[mt.gb];t:{var Dt=y,Lt=C,pt=mt.gb;if(e(d!=null),e(Lt!=null),e(pt!=null),pt[0]=0,12<=Lt[0]&&!t(d,Dt[0],"RIFF")){if(t(d,Dt[0]+8,"WEBP")){pt=3;break t}var gt=Z(d,Dt[0]+4);if(12>gt||4294967286<gt){pt=3;break t}if(Tt&&gt>Lt[0]-8){pt=7;break t}pt[0]=gt,Dt[0]+=12,Lt[0]-=12}pt=0}if(pt!=0)return pt;for(gt=0<mt.gb[0],C=C[0];;){t:{var Pt=d;Lt=y,pt=C;var Ht=Y,Ut=ft,ue=Dt=[0];if((te=Bt=[Bt])[0]=0,8>pt[0])pt=7;else{if(!t(Pt,Lt[0],"VP8X")){if(Z(Pt,Lt[0]+4)!=10){pt=3;break t}if(18>pt[0]){pt=7;break t}var Zt=Z(Pt,Lt[0]+8),Ne=1+j(Pt,Lt[0]+12);if(2147483648<=Ne*(Pt=1+j(Pt,Lt[0]+15))){pt=3;break t}ue!=null&&(ue[0]=Zt),Ht!=null&&(Ht[0]=Ne),Ut!=null&&(Ut[0]=Pt),Lt[0]+=18,pt[0]-=18,te[0]=1}pt=0}}if(Bt=Bt[0],Dt=Dt[0],pt!=0)return pt;if(Lt=!!(2&Dt),!gt&&Bt)return 3;if(Q!=null&&(Q[0]=!!(16&Dt)),H!=null&&(H[0]=Lt),k!=null&&(k[0]=0),H=Y[0],Dt=ft[0],Bt&&Lt&&V==null){pt=0;break}if(4>C){pt=7;break}if(gt&&Bt||!gt&&!Bt&&!t(d,y[0],"ALPH")){C=[C],mt.na=[mt.na],mt.P=[mt.P],mt.Sa=[mt.Sa];t:{Zt=d,pt=y,gt=C;var te=mt.gb;Ht=mt.na,Ut=mt.P,ue=mt.Sa,Ne=22,e(Zt!=null),e(gt!=null),Pt=pt[0];var Nr=gt[0];for(e(Ht!=null),e(ue!=null),Ht[0]=null,Ut[0]=null,ue[0]=0;;){if(pt[0]=Pt,gt[0]=Nr,8>Nr){pt=7;break t}var Zr=Z(Zt,Pt+4);if(4294967286<Zr){pt=3;break t}var Sr=8+Zr+1&-2;if(Ne+=Sr,0<te&&Ne>te){pt=3;break t}if(!t(Zt,Pt,"VP8 ")||!t(Zt,Pt,"VP8L")){pt=0;break t}if(Nr[0]<Sr){pt=7;break t}t(Zt,Pt,"ALPH")||(Ht[0]=Zt,Ut[0]=Pt+8,ue[0]=Zr),Pt+=Sr,Nr-=Sr}}if(C=C[0],mt.na=mt.na[0],mt.P=mt.P[0],mt.Sa=mt.Sa[0],pt!=0)break}C=[C],mt.Ja=[mt.Ja],mt.xa=[mt.xa];t:if(te=d,pt=y,gt=C,Ht=mt.gb[0],Ut=mt.Ja,ue=mt.xa,Zt=pt[0],Pt=!t(te,Zt,"VP8 "),Ne=!t(te,Zt,"VP8L"),e(te!=null),e(gt!=null),e(Ut!=null),e(ue!=null),8>gt[0])pt=7;else{if(Pt||Ne){if(te=Z(te,Zt+4),12<=Ht&&te>Ht-12){pt=3;break t}if(Tt&&te>gt[0]-8){pt=7;break t}Ut[0]=te,pt[0]+=8,gt[0]-=8,ue[0]=Ne}else ue[0]=5<=gt[0]&&te[Zt+0]==47&&!(te[Zt+4]>>5),Ut[0]=gt[0];pt=0}if(C=C[0],mt.Ja=mt.Ja[0],mt.xa=mt.xa[0],y=y[0],pt!=0)break;if(4294967286<mt.Ja)return 3;if(k==null||Lt||(k[0]=mt.xa?2:1),H=[H],Dt=[Dt],mt.xa){if(5>C){pt=7;break}k=H,Tt=Dt,Lt=Q,d==null||5>C?d=0:5<=C&&d[y+0]==47&&!(d[y+4]>>5)?(gt=[0],te=[0],Ht=[0],J(Ut=new R,d,y,C),be(Ut,gt,te,Ht)?(k!=null&&(k[0]=gt[0]),Tt!=null&&(Tt[0]=te[0]),Lt!=null&&(Lt[0]=Ht[0]),d=1):d=0):d=0}else{if(10>C){pt=7;break}k=Dt,d==null||10>C||!Ty(d,y+3,C-3)?d=0:(Tt=d[y+0]|d[y+1]<<8|d[y+2]<<16,Lt=16383&(d[y+7]<<8|d[y+6]),d=16383&(d[y+9]<<8|d[y+8]),1&Tt||3<(Tt>>1&7)||!(Tt>>4&1)||Tt>>5>=mt.Ja||!Lt||!d?d=0:(H&&(H[0]=Lt),k&&(k[0]=d),d=1))}if(!d||(H=H[0],Dt=Dt[0],Bt&&(Y[0]!=H||ft[0]!=Dt)))return 3;V!=null&&(V[0]=mt,V.offset=y-V.w,e(4294967286>y-V.w),e(V.offset==V.ha-C));break}return pt==0||pt==7&&Bt&&V==null?(Q!=null&&(Q[0]|=mt.na!=null&&0<mt.na.length),F!=null&&(F[0]=H),U!=null&&(U[0]=Dt),0):pt}function Sd(d,y,C){var F=y.width,U=y.height,Q=0,H=0,k=F,V=U;if(y.Da=d!=null&&0<d.Da,y.Da&&(k=d.cd,V=d.bd,Q=d.v,H=d.j,11>C||(Q&=-2,H&=-2),0>Q||0>H||0>=k||0>=V||Q+k>F||H+V>U))return 0;if(y.v=Q,y.j=H,y.va=Q+k,y.o=H+V,y.U=k,y.T=V,y.da=d!=null&&0<d.da,y.da){if(!xt(k,V,C=[d.ib],Q=[d.hb]))return 0;y.ib=C[0],y.hb=Q[0]}return y.ob=d!=null&&d.ob,y.Kb=d==null||!d.Sd,y.da&&(y.ob=y.ib<3*F/4&&y.hb<3*U/4,y.Kb=0),1}function xd(d){if(d==null)return 2;if(11>d.S){var y=d.f.RGBA;y.fb+=(d.height-1)*y.A,y.A=-y.A}else y=d.f.kb,d=d.height,y.O+=(d-1)*y.fa,y.fa=-y.fa,y.N+=(d-1>>1)*y.Ab,y.Ab=-y.Ab,y.W+=(d-1>>1)*y.Db,y.Db=-y.Db,y.F!=null&&(y.J+=(d-1)*y.lb,y.lb=-y.lb);return 0}function qh(d,y,C,F){if(F==null||0>=d||0>=y)return 2;if(C!=null){if(C.Da){var U=C.cd,Q=C.bd,H=-2&C.v,k=-2&C.j;if(0>H||0>k||0>=U||0>=Q||H+U>d||k+Q>y)return 2;d=U,y=Q}if(C.da){if(!xt(d,y,U=[C.ib],Q=[C.hb]))return 2;d=U[0],y=Q[0]}}F.width=d,F.height=y;t:{var V=F.width,Y=F.height;if(d=F.S,0>=V||0>=Y||!(d>=jy&&13>d))d=2;else{if(0>=F.Rd&&F.sd==null){H=Q=U=y=0;var ft=(k=V*TO[d])*Y;if(11>d||(Q=(Y+1)/2*(y=(V+1)/2),d==12&&(H=(U=V)*Y)),(Y=a(ft+2*Q+H))==null){d=1;break t}F.sd=Y,11>d?((V=F.f.RGBA).eb=Y,V.fb=0,V.A=k,V.size=ft):((V=F.f.kb).y=Y,V.O=0,V.fa=k,V.Fd=ft,V.f=Y,V.N=0+ft,V.Ab=y,V.Cd=Q,V.ea=Y,V.W=0+ft+Q,V.Db=y,V.Ed=Q,d==12&&(V.F=Y,V.J=0+ft+2*Q),V.Tc=H,V.lb=U)}if(y=1,U=F.S,Q=F.width,H=F.height,U>=jy&&13>U)if(11>U)d=F.f.RGBA,y&=(k=Math.abs(d.A))*(H-1)+Q<=d.size,y&=k>=Q*TO[U],y&=d.eb!=null;else{d=F.f.kb,k=(Q+1)/2,ft=(H+1)/2,V=Math.abs(d.fa),Y=Math.abs(d.Ab);var Bt=Math.abs(d.Db),Tt=Math.abs(d.lb),mt=Tt*(H-1)+Q;y&=V*(H-1)+Q<=d.Fd,y&=Y*(ft-1)+k<=d.Cd,y=(y&=Bt*(ft-1)+k<=d.Ed)&V>=Q&Y>=k&Bt>=k,y&=d.y!=null,y&=d.f!=null,y&=d.ea!=null,U==12&&(y&=Tt>=Q,y&=mt<=d.Tc,y&=d.F!=null)}else y=0;d=y?0:2}}return d!=0||C!=null&&C.fd&&(d=xd(F)),d}var Xa=64,Zh=[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],Jh=24,tf=32,bd=8,Wa=[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(d){return d},T.Predictor2=function(d,y,C){return y[C+0]},T.Predictor3=function(d,y,C){return y[C+1]},T.Predictor4=function(d,y,C){return y[C-1]},T.Predictor5=function(d,y,C){return St(St(d,y[C+1]),y[C+0])},T.Predictor6=function(d,y,C){return St(d,y[C-1])},T.Predictor7=function(d,y,C){return St(d,y[C+0])},T.Predictor8=function(d,y,C){return St(y[C-1],y[C+0])},T.Predictor9=function(d,y,C){return St(y[C+0],y[C+1])},T.Predictor10=function(d,y,C){return St(St(d,y[C-1]),St(y[C+0],y[C+1]))},T.Predictor11=function(d,y,C){var F=y[C+0];return 0>=Vt(F>>24&255,d>>24&255,(y=y[C-1])>>24&255)+Vt(F>>16&255,d>>16&255,y>>16&255)+Vt(F>>8&255,d>>8&255,y>>8&255)+Vt(255&F,255&d,255&y)?F:d},T.Predictor12=function(d,y,C){var F=y[C+0];return(Ft((d>>24&255)+(F>>24&255)-((y=y[C-1])>>24&255))<<24|Ft((d>>16&255)+(F>>16&255)-(y>>16&255))<<16|Ft((d>>8&255)+(F>>8&255)-(y>>8&255))<<8|Ft((255&d)+(255&F)-(255&y)))>>>0},T.Predictor13=function(d,y,C){var F=y[C-1];return(Mt((d=St(d,y[C+0]))>>24&255,F>>24&255)<<24|Mt(d>>16&255,F>>16&255)<<16|Mt(d>>8&255,F>>8&255)<<8|Mt(d>>0&255,F>>0&255))>>>0};var OE=T.PredictorAdd0;T.PredictorAdd1=Yt,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 Id=T.PredictorAdd2;oe("ColorIndexInverseTransform","MapARGB","32b",function(d){return d>>8&255},function(d){return d}),oe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(d){return d},function(d){return d>>8&255});var ky,As=T.ColorIndexInverseTransform,Fd=T.MapARGB,RE=T.VP8LColorIndexInverseTransformAlpha,ME=T.MapAlpha,Ll=T.VP8LPredictorsAdd=[];Ll.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var Qo,ls,Ol,Qs,SA,ef,us,rf,Ld,Rl,cs,xA,lc,nf,uc,Ml,Od,Ho,bA,pn,dn,qn,Fi,IA,Nl,af,$y,sO,AO=a(511),lO=a(2041),uO=a(225),cO=a(767),hO=0,NE=lO,Vy=uO,wo=cO,Go=AO,jy=0,Ky=1,fO=2,zy=3,Yy=4,PE=5,pO=6,UE=7,DE=8,Xy=9,QE=10,Kk=[2,3,7],zk=[3,3,11],dO=[280,256,256,256,40],Yk=[0,1,1,1,0],Xk=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Wk=[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],qk=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Zk=8,HE=[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],GE=[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],Rd=null,Jk=[[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]],t9=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],vO=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],e9=[[[[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]]]],r9=[[[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]]],n9=[[[[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]]]],i9=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Pl=[],hs=[],FA=[],a9=1,gO=2,Ul=[],ko=[];Rt("UpsampleRgbLinePair",Tr,3),Rt("UpsampleBgrLinePair",Ji,3),Rt("UpsampleRgbaLinePair",ss,4),Rt("UpsampleBgraLinePair",ki,4),Rt("UpsampleArgbLinePair",ha,4),Rt("UpsampleRgba4444LinePair",fi,2),Rt("UpsampleRgb565LinePair",Wn,2);var o9=T.UpsampleRgbLinePair,s9=T.UpsampleBgrLinePair,yO=T.UpsampleRgbaLinePair,mO=T.UpsampleBgraLinePair,_O=T.UpsampleArgbLinePair,wO=T.UpsampleRgba4444LinePair,A9=T.UpsampleRgb565LinePair,Wy=16,qy=1<<Wy-1,Md=-227,kE=482,EO=6,l9=(256<<EO)-1,CO=0,u9=a(256),c9=a(256),h9=a(256),f9=a(256),p9=a(kE-Md),d9=a(kE-Md);TA("YuvToRgbRow",Tr,3),TA("YuvToBgrRow",Ji,3),TA("YuvToRgbaRow",ss,4),TA("YuvToBgraRow",ki,4),TA("YuvToArgbRow",ha,4),TA("YuvToRgba4444Row",fi,2),TA("YuvToRgb565Row",Wn,2);var BO=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Zy=[0,2,8],v9=[8,7,6,4,4,2,2,2,1,1,1,1],g9=1;this.WebPDecodeRGBA=function(d,y,C,F,U){var Q=Ky,H=new Yh,k=new ci;H.ba=k,k.S=Q,k.width=[k.width],k.height=[k.height];var V=k.width,Y=k.height,ft=new $r;if(ft==null||d==null)var Bt=2;else e(ft!=null),Bt=Wh(d,y,C,ft.width,ft.height,ft.Pd,ft.Qd,ft.format,null);if(Bt!=0?V=0:(V!=null&&(V[0]=ft.width[0]),Y!=null&&(Y[0]=ft.height[0]),V=1),V){k.width=k.width[0],k.height=k.height[0],F!=null&&(F[0]=k.width),U!=null&&(U[0]=k.height);t:{if(F=new Gh,(U=new _d).data=d,U.w=y,U.ha=C,U.kd=1,y=[0],e(U!=null),((d=Wh(U.data,U.w,U.ha,null,null,null,y,null,U))==0||d==7)&&y[0]&&(d=4),(y=d)==0){if(e(H!=null),F.data=U.data,F.w=U.w+U.offset,F.ha=U.ha-U.offset,F.put=Si,F.ac=fn,F.bc=xi,F.ma=H,U.xa){if((d=Or())==null){H=1;break t}if(function(Tt,mt){var Dt=[0],Lt=[0],pt=[0];e:for(;;){if(Tt==null)return 0;if(mt==null)return Tt.a=2,0;if(Tt.l=mt,Tt.a=0,J(Tt.m,mt.data,mt.w,mt.ha),!be(Tt.m,Dt,Lt,pt)){Tt.a=3;break e}if(Tt.xb=gO,mt.width=Dt[0],mt.height=Lt[0],!sn(Dt[0],Lt[0],1,Tt,null))break e;return 1}return e(Tt.a!=0),0}(d,F)){if(F=(y=qh(F.width,F.height,H.Oa,H.ba))==0){e:{F=d;r:for(;;){if(F==null){F=0;break e}if(e(F.s.yc!=null),e(F.s.Ya!=null),e(0<F.s.Wb),e((C=F.l)!=null),e((U=C.ma)!=null),F.xb!=0){if(F.ca=U.ba,F.tb=U.tb,e(F.ca!=null),!Sd(U.Oa,C,zy)){F.a=2;break r}if(!Cn(F,C.width)||C.da)break r;if((C.da||sr(F.ca.S))&&Ct(),11>F.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),F.ca.f.kb.F!=null&&Ct()),F.Pb&&0<F.s.ua&&F.s.vb.X==null&&!ut(F.s.vb,F.s.Wa.Xa)){F.a=1;break r}F.xb=0}if(!qt(F,F.V,F.Ba,F.c,F.i,C.o,mo))break r;U.Dc=F.Ma,F=1;break e}e(F.a!=0),F=0}F=!F}F&&(y=d.a)}else y=d.a}else{if((d=new fE)==null){H=1;break t}if(d.Fa=U.na,d.P=U.P,d.qc=U.Sa,Sy(d,F)){if((y=qh(F.width,F.height,H.Oa,H.ba))==0){if(d.Aa=0,C=H.Oa,e((U=d)!=null),C!=null){if(0<(V=0>(V=C.Md)?0:100<V?255:255*V/100)){for(Y=ft=0;4>Y;++Y)12>(Bt=U.pb[Y]).lc&&(Bt.ia=V*v9[0>Bt.lc?0:Bt.lc]>>3),ft|=Bt.ia;ft&&(alert("todo:VP8InitRandom"),U.ia=1)}U.Ga=C.Id,100<U.Ga?U.Ga=100:0>U.Ga&&(U.Ga=0)}pE(d,F)||(y=d.a)}}else y=d.a}y==0&&H.Oa!=null&&H.Oa.fd&&(y=xd(H.ba))}H=y}Q=H!=0?null:11>Q?k.f.RGBA.eb:k.f.kb.y}else Q=null;return Q};var TO=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(T,I){for(var M="",x=0;x<4;x++)M+=String.fromCharCode(T[I++]);return M}function u(T,I){return(T[I+0]<<0|T[I+1]<<8|T[I+2]<<16)>>>0}function c(T,I){return(T[I+0]<<0|T[I+1]<<8|T[I+2]<<16|T[I+3]<<24)>>>0}new A;var h=[0],f=[0],p=[],v=new A,m=r,g=function(T,I){var M={},x=0,S=!1,N=0,P=0;if(M.frames=[],!function($,K,q,at){for(var vt=0;vt<at;vt++)if($[K+vt]!=q.charCodeAt(vt))return!0;return!1}(T,I,"RIFF",4)){var X,z;for(c(T,I+=4),I+=8;I<T.length;){var tt=l(T,I),J=c(T,I+=4);I+=4;var nt=J+(1&J);switch(tt){case"VP8 ":case"VP8L":M.frames[x]===void 0&&(M.frames[x]={}),(R=M.frames[x]).src_off=S?P:I-8,R.src_size=N+J+8,x++,S&&(S=!1,N=0,P=0);break;case"VP8X":(R=M.header={}).feature_flags=T[I];var it=I+4;R.canvas_width=1+u(T,it),it+=3,R.canvas_height=1+u(T,it),it+=3;break;case"ALPH":S=!0,N=nt+8,P=I-8;break;case"ANIM":(R=M.header).bgcolor=c(T,I),it=I+4,R.loop_count=(X=T)[(z=it)+0]<<0|X[z+1]<<8,it+=2;break;case"ANMF":var _t,R;(R=M.frames[x]={}).offset_x=2*u(T,I),I+=3,R.offset_y=2*u(T,I),I+=3,R.width=1+u(T,I),I+=3,R.height=1+u(T,I),I+=3,R.duration=u(T,I),I+=3,_t=T[I++],R.dispose=1&_t,R.blend=_t>>1&1}tt!="ANMF"&&(I+=nt)}return M}}(m,0);g.response=m,g.rgbaoutput=!0,g.dataurl=!1;var _=g.header?g.header:null,E=g.frames?g.frames:null;if(_){_.loop_counter=_.loop_count,h=[_.canvas_height],f=[_.canvas_width];for(var B=0;B<E.length&&E[B].blend!=0;B++);}var L=E[0],O=v.WebPDecodeRGBA(m,L.src_off,L.src_size,f,h);L.rgba=O,L.imgwidth=f[0],L.imgheight=h[0];for(var b=0;b<f[0]*h[0]*4;b++)p[b]=O[b];return this.width=f,this.height=h,this.data=p,this}(function(r){var e=function(){return typeof YS=="function"},t=function(h,f,p,v){var m=4,g=o;switch(v){case r.image_compression.FAST:m=1,g=a;break;case r.image_compression.MEDIUM:m=6,g=s;break;case r.image_compression.SLOW:m=9,g=A}h=n(h,f,p,g);var _=YS(h,{level:m});return r.__addimage__.arrayBufferToBinaryString(_)},n=function(h,f,p,v){for(var m,g,_,E=h.length/f,B=new Uint8Array(h.length+E),L=u(),O=0;O<E;O+=1){if(_=O*f,m=h.subarray(_,_+f),v)B.set(v(m,p,g),_+O);else{for(var b,T=L.length,I=[];b<T;b+=1)I[b]=L[b](m,p,g);var M=c(I.concat());B.set(I[M],_+O)}g=m}return B},i=function(h){var f=Array.apply([],h);return f.unshift(0),f},a=function(h,f){var p,v=[],m=h.length;v[0]=1;for(var g=0;g<m;g+=1)p=h[g-f]||0,v[g+1]=h[g]-p+256&255;return v},o=function(h,f,p){var v,m=[],g=h.length;m[0]=2;for(var _=0;_<g;_+=1)v=p&&p[_]||0,m[_+1]=h[_]-v+256&255;return m},s=function(h,f,p){var v,m,g=[],_=h.length;g[0]=3;for(var E=0;E<_;E+=1)v=h[E-f]||0,m=p&&p[E]||0,g[E+1]=h[E]+256-(v+m>>>1)&255;return g},A=function(h,f,p){var v,m,g,_,E=[],B=h.length;E[0]=4;for(var L=0;L<B;L+=1)v=h[L-f]||0,m=p&&p[L]||0,g=p&&p[L-f]||0,_=l(v,m,g),E[L+1]=h[L]-_+256&255;return E},l=function(h,f,p){if(h===f&&f===p)return h;var v=Math.abs(f-p),m=Math.abs(h-p),g=Math.abs(h+f-p-p);return v<=m&&v<=g?h:m<=g?f:p},u=function(){return[i,a,o,s,A]},c=function(h){var f=h.map(function(p){return p.reduce(function(v,m){return v+Math.abs(m)},0)});return f.indexOf(Math.min.apply(null,f))};r.processPNG=function(h,f,p,v){var m,g,_,E,B,L,O,b,T,I,M,x,S,N,P,X=this.decode.FLATE_DECODE,z="";if(this.__addimage__.isArrayBuffer(h)&&(h=new Uint8Array(h)),this.__addimage__.isArrayBufferView(h)){if(h=(_=new ZAt(h)).imgData,g=_.bits,m=_.colorSpace,B=_.colors,[4,6].indexOf(_.colorType)!==-1){if(_.bits===8){T=(b=_.pixelBitlength==32?new Uint32Array(_.decodePixels().buffer):_.pixelBitlength==16?new Uint16Array(_.decodePixels().buffer):new Uint8Array(_.decodePixels().buffer)).length,M=new Uint8Array(T*_.colors),I=new Uint8Array(T);var tt,J=_.pixelBitlength-_.bits;for(N=0,P=0;N<T;N++){for(S=b[N],tt=0;tt<J;)M[P++]=S>>>tt&255,tt+=_.bits;I[N]=S>>>tt&255}}if(_.bits===16){T=(b=new Uint32Array(_.decodePixels().buffer)).length,M=new Uint8Array(T*(32/_.pixelBitlength)*_.colors),I=new Uint8Array(T*(32/_.pixelBitlength)),x=_.colors>1,N=0,P=0;for(var nt=0;N<T;)S=b[N++],M[P++]=S>>>0&255,x&&(M[P++]=S>>>16&255,S=b[N++],M[P++]=S>>>0&255),I[nt++]=S>>>16&255;g=8}v!==r.image_compression.NONE&&e()?(h=t(M,_.width*_.colors,_.colors,v),O=t(I,_.width,1,v)):(h=M,O=I,X=void 0)}if(_.colorType===3&&(m=this.color_spaces.INDEXED,L=_.palette,_.transparency.indexed)){var it=_.transparency.indexed,_t=0;for(N=0,T=it.length;N<T;++N)_t+=it[N];if((_t/=255)===T-1&&it.indexOf(0)!==-1)E=[it.indexOf(0)];else if(_t!==T){for(b=_.decodePixels(),I=new Uint8Array(b.length),N=0,T=b.length;N<T;N++)I[N]=it[b[N]];O=t(I,_.width,1)}}var R=function($){var K;switch($){case r.image_compression.FAST:K=11;break;case r.image_compression.MEDIUM:K=13;break;case r.image_compression.SLOW:K=14;break;default:K=12}return K}(v);return X===this.decode.FLATE_DECODE&&(z="/Predictor "+R+" "),z+="/Colors "+B+" /BitsPerComponent "+g+" /Columns "+_.width,(this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),(O&&this.__addimage__.isArrayBuffer(O)||this.__addimage__.isArrayBufferView(O))&&(O=this.__addimage__.arrayBufferToBinaryString(O)),{alias:p,data:h,index:f,filter:X,decodeParameters:z,transparency:E,palette:L,sMask:O,predictor:R,width:_.width,height:_.height,bitsPerComponent:g,colorSpace:m}}}})(Ue.API),function(r){r.processGIF89A=function(e,t,n,i){var a=new JAt(e),o=a.width,s=a.height,A=[];a.decodeAndBlitFrameRGBA(0,A);var l={data:A,width:o,height:s},u=new KC(100).encode(l,100);return r.processJPEG.call(this,u,t,n,i)},r.processGIF87A=r.processGIF89A}(Ue.API),vs.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)},vs.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){ln.log("bit decode error:"+t)}},vs.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)}},vs.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)}},vs.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)}},vs.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}},vs.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}},vs.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}},vs.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}},vs.prototype.getData=function(){return this.data},function(r){r.processBMP=function(e,t,n,i){var a=new vs(e,!1),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new KC(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(Ue.API),IN.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(e,t,n,i){var a=new IN(e),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new KC(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(Ue.API),Ue.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],c=n[l+1],h=n[l+2],f=n[l+3];a[s++]=u,a[s++]=c,a[s++]=h,o[A++]=f}var p=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:p,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Ue.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},vf=Ue.API,Hm=vf.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,c=e.doKerning!==!1,h=0,f=r.length,p=0,v=s[0]||A,m=[];for(t=0;t<f;t++)n=r.charCodeAt(t),typeof i.metadata.widthOfString=="function"?m.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+o*(1e3/a)||0)/1e3):(h=c&&tn(l[n])==="object"&&!isNaN(parseInt(l[n][p],10))?l[n][p]/u:0,m.push((s[n]||v)/A+h)),p=n;return m},TN=vf.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 vf.processArabic&&(r=vf.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,t,i)/t:Hm.apply(this,arguments).reduce(function(a,o){return a+o},0)},SN=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},xN=function(r,e,t){t||(t={});var n,i,a,o,s,A,l,u=[],c=[u],h=t.textIndent||0,f=0,p=0,v=r.split(" "),m=Hm.apply(this,[" ",t])[0];if(A=t.lineIndent===-1?v[0].length+2:t.lineIndent||0){var g=Array(A).join(" "),_=[];v.map(function(B){(B=B.split(/\s*\n/)).length>1?_=_.concat(B.map(function(L,O){return(O&&L.length?`
`:"")+L})):_.push(B[0])}),v=_,A=TN.apply(this,[g,t])}for(a=0,o=v.length;a<o;a++){var E=0;if(n=v[a],A&&n[0]==`
`&&(n=n.substr(1),E=1),h+f+(p=(i=Hm.apply(this,[n,t])).reduce(function(B,L){return B+L},0))>e||E){if(p>e){for(s=SN.apply(this,[n,i,e-(h+f),e]),u.push(s.shift()),u=[s.pop()];s.length;)c.push([s.shift()]);p=i.slice(n.length-(u[0]?u[0].length:0)).reduce(function(B,L){return B+L},0)}else u=[n];c.push(u),h=p+A,f=m}else u.push(n),h+=f+p,f=m}return l=A?function(B,L){return(L?g:"")+B.join(" ")}:function(B){return B.join(" ")},c.map(l)},vf.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 c=this.internal.getFont(u.fontName,u.fontStyle);return c.metadata.Unicode?{widths:c.metadata.Unicode.widths||{0:1},kerning:c.metadata.Unicode.kerning||{}}:{font:c.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(xN.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(c){return"0x"+parseInt(c,10).toString(16)},o=r.__fontmetrics__.compress=function(c){var h,f,p,v,m=["{"];for(var g in c){if(h=c[g],isNaN(parseInt(g,10))?f="'"+g+"'":(g=parseInt(g,10),f=(f=a(g).slice(2)).slice(0,-1)+n[f.slice(-1)]),typeof h=="number")h<0?(p=a(h).slice(3),v="-"):(p=a(h).slice(2),v=""),p=v+p.slice(0,-1)+n[p.slice(-1)];else{if(tn(h)!=="object")throw new Error("Don't know what to do with value type "+tn(h)+".");p=o(h)}m.push(f+p)}return m.push("}"),m.join("")},s=r.__fontmetrics__.uncompress=function(c){if(typeof c!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,f,p,v,m={},g=1,_=m,E=[],B="",L="",O=c.length-1,b=1;b<O;b+=1)(v=c[b])=="'"?h?(p=h.join(""),h=void 0):h=[]:h?h.push(v):v=="{"?(E.push([_,p]),_={},p=void 0):v=="}"?((f=E.pop())[0][f[1]]=_,p=void 0,_=f[0]):v=="-"?g=-1:p===void 0?t.hasOwnProperty(v)?(B+=t[v],p=parseInt(B,16)*g,g=1,B=""):B+=v:t.hasOwnProperty(v)?(L+=t[v],_[p]=parseInt(L,16)*g,g=1,p=void 0,L=""):L+=v;return m},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(c){var h=c.font,f=u.Unicode[h.postScriptName];f&&(h.metadata.Unicode={},h.metadata.Unicode.widths=f.widths,h.metadata.Unicode.kerning=f.kerning);var p=l.Unicode[h.postScriptName];p&&(h.metadata.Unicode.encoding=p,h.encoding=p.codePages[0])}])}(Ue.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(Gv(s)),o.metadata=r.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,n)}}])}(Ue),function(r){function e(){return(He.canvg?Promise.resolve(He.canvg):Promise.resolve().then(function(){return WOt})).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}Ue.API.addSvgAsImage=function(t,n,i,a,o,s,A,l){if(isNaN(n)||isNaN(i))throw ln.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(o))throw ln.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 c=u.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,u.width,u.height);var h={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},f=this;return e().then(function(p){return p.fromString(c,t,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(h)}).then(function(){f.addImage(u.toDataURL("image/jpeg",1),n,i,a,o,A,l)})}}(),Ue.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},Ue.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,c=0;function h(p,v){var m,g=!1;for(m=0;m<p.length;m+=1)p[m]===v&&(g=!0);return g}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(c=0;c<f;c+=1)t[s[c]].value=t[s[c]].defaultValue,t[s[c]].explicitSet=!1}if(tn(r)==="object"){for(i in r)if(a=r[i],h(s,i)&&a!==void 0){if(t[i].type==="boolean"&&typeof a=="boolean")t[i].value=a;else if(t[i].type==="name"&&h(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 p,v=[];for(p in t)t[p].explicitSet===!0&&(t[p].type==="name"?v.push("/"+p+" /"+t[p].value):v.push("/"+p+" "+t[p].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}}(Ue.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=[""],c=0,h=a.length;c<h;++c){if(s=o.metadata.characterToGlyph(a.charCodeAt(c)),o.metadata.glyIdsUsed.push(s),o.metadata.toUnicode[s]=a.charCodeAt(c),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,c,h;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=[],c=0,h=(s=Object.keys(a).sort(function(f,p){return f-p})).length;c<h;c++)o=s[c],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 c=s.metadata.Unicode.widths,h=s.metadata.subset.encode(s.metadata.glyIdsUsed,1),f="",p=0;p<h.length;p++)f+=String.fromCharCode(h[p]);var v=l();u({data:f,addLength1:!0,objectId:v}),A("endobj");var m=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:m}),A("endobj");var g=l();A("<<"),A("/Type /FontDescriptor"),A("/FontName /"+Df(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 _=l();A("<<"),A("/Type /Font"),A("/BaseFont /"+Df(s.fontName)),A("/FontDescriptor "+g+" 0 R"),A("/W "+r.API.PDFObject.convert(c)),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 "+m+" 0 R"),A("/BaseFont /"+Df(s.fontName)),A("/Encoding /"+s.encoding),A("/DescendantFonts ["+_+" 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 c=s.metadata.rawData,h="",f=0;f<c.length;f++)h+=String.fromCharCode(c[f]);var p=l();u({data:h,addLength1:!0,objectId:p}),A("endobj");var v=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:v}),A("endobj");var m=l();A("<<"),A("/Descent "+s.metadata.decender),A("/CapHeight "+s.metadata.capHeight),A("/StemV "+s.metadata.stemV),A("/Type /FontDescriptor"),A("/FontFile2 "+p+" 0 R"),A("/Flags 96"),A("/FontBBox "+r.API.PDFObject.convert(s.metadata.bbox)),A("/FontName /"+Df(s.fontName)),A("/ItalicAngle "+s.metadata.italicAngle),A("/Ascent "+s.metadata.ascender),A(">>"),A("endobj"),s.objectNumber=l();for(var g=0;g<s.metadata.hmtx.widths.length;g++)s.metadata.hmtx.widths[g]=parseInt(s.metadata.hmtx.widths[g]*(1e3/s.metadata.head.unitsPerEm));A("<</Subtype/TrueType/Type/Font/ToUnicode "+v+" 0 R/BaseFont/"+Df(s.fontName)+"/FontDescriptor "+m+" 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||{},c=a.mutex||{},h=c.pdfEscape,f=c.activeFontKey,p=c.fonts,v=f,m="",g=0,_="",E=p[v].encoding;if(p[v].encoding!=="Identity-H")return{text:s,x:A,y:l,options:u,mutex:c};for(_=s,v=f,Array.isArray(s)&&(_=s[0]),g=0;g<_.length;g+=1)p[v].metadata.hasOwnProperty("cmap")&&(o=p[v].metadata.cmap.unicode.codeMap[_[g].charCodeAt(0)]),o||_[g].charCodeAt(0)<256&&p[v].metadata.hasOwnProperty("Unicode")?m+=_[g]:m+="";var B="";return parseInt(v.slice(1))<14||E==="WinAnsiEncoding"?B=h(m,v).split("").map(function(L){return L.charCodeAt(0).toString(16)}).join(""):E==="Identity-H"&&(B=t(m,p[v])),c.isHex=!0,{text:B,x:A,y:l,options:u,mutex:c}};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}])}(Ue),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}}(Ue.API),function(r){r.__bidiEngine__=r.prototype.__bidiEngine__=function(n){var i,a,o,s,A,l,u,c=e,h=[[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]],p={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},m=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","","","","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=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)$/),_=!1,E=0;this.__bidiEngine__={};var B=function(x){var S=x.charCodeAt(),N=S>>8,P=v[N];return P!==void 0?c[256*P+(255&S)]:N===252||N===253?"AL":g.test(N)?"L":N===8?"R":"N"},L=function(x){for(var S,N=0;N<x.length;N++){if((S=B(x.charAt(N)))==="L")return!1;if(S==="R")return!0}return!1},O=function(x,S,N,P){var X,z,tt,J,nt=S[P];switch(nt){case"L":case"R":_=!1;break;case"N":case"AN":break;case"EN":_&&(nt="AN");break;case"AL":_=!0,nt="R";break;case"WS":nt="N";break;case"CS":P<1||P+1>=S.length||(X=N[P-1])!=="EN"&&X!=="AN"||(z=S[P+1])!=="EN"&&z!=="AN"?nt="N":_&&(z="AN"),nt=z===X?z:"N";break;case"ES":nt=(X=P>0?N[P-1]:"B")==="EN"&&P+1<S.length&&S[P+1]==="EN"?"EN":"N";break;case"ET":if(P>0&&N[P-1]==="EN"){nt="EN";break}if(_){nt="N";break}for(tt=P+1,J=S.length;tt<J&&S[tt]==="ET";)tt++;nt=tt<J&&S[tt]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(J=S.length,tt=P+1;tt<J&&S[tt]==="NSM";)tt++;if(tt<J){var it=x[P],_t=it>=1425&&it<=2303||it===64286;if(X=S[tt],_t&&(X==="R"||X==="AL")){nt="R";break}}}nt=P<1||(X=S[P-1])==="B"?"N":N[P-1];break;case"B":_=!1,i=!0,nt=E;break;case"S":a=!0,nt="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":_=!1;break;case"BN":nt="N"}return nt},b=function(x,S,N){var P=x.split("");return N&&T(P,N,{hiLevel:E}),P.reverse(),S&&S.reverse(),P.join("")},T=function(x,S,N){var P,X,z,tt,J,nt=-1,it=x.length,_t=0,R=[],$=E?f:h,K=[];for(_=!1,i=!1,a=!1,X=0;X<it;X++)K[X]=B(x[X]);for(z=0;z<it;z++){if(J=_t,R[z]=O(x,K,R,z),P=240&(_t=$[J][p[R[z]]]),_t&=15,S[z]=tt=$[_t][5],P>0)if(P===16){for(X=nt;X<z;X++)S[X]=1;nt=-1}else nt=-1;if($[_t][6])nt===-1&&(nt=z);else if(nt>-1){for(X=nt;X<z;X++)S[X]=tt;nt=-1}K[z]==="B"&&(S[z]=0),N.hiLevel|=tt}a&&function(q,at,vt){for(var wt=0;wt<vt;wt++)if(q[wt]==="S"){at[wt]=E;for(var W=wt-1;W>=0&&q[W]==="WS";W--)at[W]=E}}(K,S,it)},I=function(x,S,N,P,X){if(!(X.hiLevel<x)){if(x===1&&E===1&&!i)return S.reverse(),void(N&&N.reverse());for(var z,tt,J,nt,it=S.length,_t=0;_t<it;){if(P[_t]>=x){for(J=_t+1;J<it&&P[J]>=x;)J++;for(nt=_t,tt=J-1;nt<tt;nt++,tt--)z=S[nt],S[nt]=S[tt],S[tt]=z,N&&(z=N[nt],N[nt]=N[tt],N[tt]=z);_t=J}_t++}}},M=function(x,S,N){var P=x.split(""),X={hiLevel:E};return N||(N=[]),T(P,N,X),function(z,tt,J){if(J.hiLevel!==0&&u)for(var nt,it=0;it<z.length;it++)tt[it]===1&&(nt=m.indexOf(z[it]))>=0&&(z[it]=m[nt+1])}(P,N,X),I(2,P,S,N,X),I(1,P,S,N,X),P.join("")};return this.__bidiEngine__.doBidiReorder=function(x,S,N){if(function(X,z){if(z)for(var tt=0;tt<X.length;tt++)z[tt]=tt;s===void 0&&(s=L(X)),l===void 0&&(l=L(X))}(x,S),o||!A||l)if(o&&A&&s^l)E=s?1:0,x=b(x,S,N);else if(!o&&A&&l)E=s?1:0,x=M(x,S,N),x=b(x,S);else if(!o||s||A||l){if(o&&!A&&s^l)x=b(x,S),s?(E=0,x=M(x,S,N)):(E=1,x=M(x,S,N),x=b(x,S));else if(o&&s&&!A&&l)E=1,x=M(x,S,N),x=b(x,S);else if(!o&&!A&&s^l){var P=u;s?(E=1,x=M(x,S,N),E=0,u=!1,x=M(x,S,N),u=P):(E=0,x=M(x,S,N),x=b(x,S),E=1,u=!1,x=M(x,S,N),u=P,x=b(x,S))}}else E=0,x=M(x,S,N);else E=s?1:0,x=M(x,S,N);return x},this.__bidiEngine__.setOptions=function(x){x&&(o=x.isInputVisual,A=x.isOutputVisual,s=x.isInputRtl,l=x.isOutputRtl,u=x.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})}])}(Ue),Ue.API.TTFFont=function(){function r(e){var t;if(this.rawData=e,t=this.contents=new Vu(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new plt(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new tlt(this.contents),this.head=new rlt(this),this.name=new slt(this),this.cmap=new b8(this),this.toUnicode={},this.hhea=new nlt(this),this.maxp=new Alt(this),this.hmtx=new llt(this),this.post=new alt(this),this.os2=new ilt(this),this.loca=new flt(this),this.glyf=new ult(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 Ps,Vu=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}(),tlt=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,c,h,f,p,v;for(v in f=Object.keys(t).length,A=Math.log(2),c=16*Math.floor(Math.log(f)/A),o=Math.floor(c/A),u=16*f-c,(i=new Vu).writeInt(this.scalarType),i.writeShort(f),i.writeShort(c),i.writeShort(o),i.writeShort(u),a=16*f,l=i.pos+a,s=null,p=[],t)for(h=t[v],i.writeString(v),i.writeInt(r(h)),i.writeInt(l),i.writeInt(h.length),p=p.concat(h),v==="head"&&(s=l),l+=h.length;l%4;)p.push(0),l++;return i.write(p),n=2981146554-r(i.data),i.pos=s+8,i.writeUInt32(n),i.data},r=function(t){var n,i,a,o;for(t=I8.call(t);t.length%4;)t.push(0);for(a=new Vu(t),i=0,n=0,o=t.length;n<o;n=n+=4)i+=a.readUInt32();return 4294967295&i},e}(),elt={}.hasOwnProperty,fA=function(r,e){for(var t in e)elt.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};Ps=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 rlt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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 Vu).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}(),FN=function(){function r(e,t){var n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),c=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(),h=f/2,e.pos+=6,a=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),e.pos+=2,v=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),l=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),u=function(){var B,L;for(L=[],A=B=0;0<=h?B<h:B>h;A=0<=h?++B:--B)L.push(e.readUInt16());return L}(),i=(this.length-e.pos+this.offset)/2,s=function(){var B,L;for(L=[],A=B=0;0<=i?B<i:B>i;A=0<=i?++B:--B)L.push(e.readUInt16());return L}(),A=g=0,E=a.length;g<E;A=++g)for(m=a[A],n=_=p=v[A];p<=m?_<=m:_>=m;n=p<=m?++_:--_)u[A]===0?o=n+l[A]:(o=s[u[A]/2+(n-p)-(h-A)]||0)!==0&&(o+=l[A]),this.codeMap[n]=65535&o}e.pos=c}return r.encode=function(e,t){var n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,O,b,T,I,M,x,S,N,P,X,z,tt,J,nt,it,_t,R,$,K,q,at,vt,wt,W,It,Ot,j;switch(P=new Vu,o=Object.keys(e).sort(function(Z,ut){return Z-ut}),t){case"macroman":for(v=0,m=function(){var Z=[];for(p=0;p<256;++p)Z.push(0);return Z}(),_={0:0},a={},X=0,nt=o.length;X<nt;X++)_[W=e[i=o[X]]]==null&&(_[W]=++v),a[i]={old:e[i],new:_[e[i]]},m[i]=_[e[i]];return P.writeUInt16(1),P.writeUInt16(0),P.writeUInt32(12),P.writeUInt16(0),P.writeUInt16(262),P.writeUInt16(0),P.write(m),{charMap:a,subtable:P.data,maxGlyphID:v+1};case"unicode":for(S=[],c=[],E=0,_={},n={},g=l=null,z=0,it=o.length;z<it;z++)_[L=e[i=o[z]]]==null&&(_[L]=++E),n[i]={old:L,new:_[L]},s=_[L]-i,g!=null&&s===l||(g&&c.push(g),S.push(i),l=s),g=i;for(g&&c.push(g),c.push(65535),S.push(65535),M=2*(I=S.length),T=2*Math.pow(Math.log(I)/Math.LN2,2),h=Math.log(T/2)/Math.LN2,b=2*I-T,A=[],O=[],f=[],p=tt=0,_t=S.length;tt<_t;p=++tt){if(x=S[p],u=c[p],x===65535){A.push(0),O.push(0);break}if(x-(N=n[x].new)>=32768)for(A.push(0),O.push(2*(f.length+I-p)),i=J=x;x<=u?J<=u:J>=u;i=x<=u?++J:--J)f.push(n[i].new);else A.push(N-x),O.push(0)}for(P.writeUInt16(3),P.writeUInt16(1),P.writeUInt32(12),P.writeUInt16(4),P.writeUInt16(16+8*I+2*f.length),P.writeUInt16(0),P.writeUInt16(M),P.writeUInt16(T),P.writeUInt16(h),P.writeUInt16(b),vt=0,R=c.length;vt<R;vt++)i=c[vt],P.writeUInt16(i);for(P.writeUInt16(0),wt=0,$=S.length;wt<$;wt++)i=S[wt],P.writeUInt16(i);for(It=0,K=A.length;It<K;It++)s=A[It],P.writeUInt16(s);for(Ot=0,q=O.length;Ot<q;Ot++)B=O[Ot],P.writeUInt16(B);for(j=0,at=f.length;j<at;j++)v=f[j],P.writeUInt16(v);return{charMap:n,subtable:P.data,maxGlyphID:E+1}}},r}(),b8=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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 FN(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=FN.encode(t,n),(a=new Vu).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},e}(),nlt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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}(),ilt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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}(),alt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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}(),olt=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},slt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),e.prototype.tag="name",e.prototype.parse=function(t){var n,i,a,o,s,A,l,u,c,h,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=c=0,h=i.length;c<h;o=++c)a=i[o],t.pos=a.offset,u=t.readString(a.length),s=new olt(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}(),Alt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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}(),llt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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,c;for(c=[],n=u=0;0<=a?u<a:u>a;n=0<=a?++u:--u)c.push(t.readInt16());return c}(),this.widths=function(){var u,c,h,f;for(f=[],u=0,c=(h=this.metrics).length;u<c;u++)o=h[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}(),I8=[].slice,ult=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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,c,h;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 Vu(n.read(a))).readShort(),u=A.readShort(),h=A.readShort(),l=A.readShort(),c=A.readShort(),this.cache[t]=s===-1?new hlt(A,u,h,l,c):new clt(A,s,u,h,l,c),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}(),clt=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}(),hlt=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 Vu(I8.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},r}(),flt=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return fA(e,Ps),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),c=0;c<i.length;++c)u[4*c+3]=255&i[c],u[4*c+2]=(65280&i[c])>>8,u[4*c+1]=(16711680&i[c])>>16,u[4*c]=(4278190080&i[c])>>24;return u},e}(),plt=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,c,h,f,p,v,m,g;for(i in n=b8.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),f={0:0},g=n.charMap)f[(A=g[i]).old]=A.new;for(p in h=n.maxGlyphID,o)p in f||(f[p]=h++);return u=function(_){var E,B;for(E in B={},_)B[_[E]]=E;return B}(f),c=Object.keys(u).sort(function(_,E){return _-E}),v=function(){var _,E,B;for(B=[],_=0,E=c.length;_<E;_++)s=c[_],B.push(u[s]);return B}(),a=this.font.glyf.encode(o,v,f),l=this.font.loca.encode(a.offsets,v),m={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&&(m["OS/2"]=this.font.os2.raw()),this.font.directory.encode(m)},r}();Ue.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 dlt={name:"ol-control-printdialog",setup(r,e){const{control:t}=Di(In,r,e);return t.value.on(["print","error"],function(n){if(n.image)if(n.pdf){var i=new Ue({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/","");LF.exports.saveAs(a,o)},n.imageType,n.quality);else console.warn("No canvas to export")}),{control:t}},props:{lang:{type:String}}};function vlt(r,e,t,n,i,a){return dr("",!0)}var ex=le(dlt,[["render",vlt]]),Mh=function(r){r||(r={});var e=ct.create("DIV",{className:(r.className||"ol-videorec")+" ol-unselectable ol-control"});ct.create("BUTTON",{type:"button",className:"ol-start",title:"start",click:function(){this.start()}.bind(this),parent:e}),ct.create("BUTTON",{type:"button",className:"ol-stop",title:"stop",click:function(){this.stop()}.bind(this),parent:e}),ct.create("BUTTON",{type:"button",className:"ol-pause",title:"pause",click:function(){this.pause()}.bind(this),parent:e}),ct.create("BUTTON",{type:"button",className:"ol-resume",title:"resume",click:function(){this.resume()}.bind(this),parent:e}),_r.call(this,{element:e,target:r.target}),this.set("framerate",30),this.set("videoBitsPerSecond",5e6),r.videoTarget==="DIALOG"?(this._dialog=new Ia({className:"ol-fullscreen-dialog",target:document.body,closeBox:!0}),this._videoTarget=this._dialog.getContentElement()):this._videoTarget=r.videoTarget,this._printCtrl=new Zu({target:ct.create("DIV")})};Cr(Mh,_r);Mh.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._printCtrl),this._dialog&&this.getMap().removeControl(this._dialog)),_r.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._printCtrl),this._dialog&&this.getMap().addControl(this._dialog))};Mh.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=ct.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))};Mh.prototype.stop=function(){this._mediaRecorder&&(this._mediaRecorder.stop(),this._mediaRecorder=null,this.element.setAttribute("data-state","inactive"))};Mh.prototype.pause=function(){this._mediaRecorder&&(this._mediaRecorder.pause(),this.element.setAttribute("data-state","pause"))};Mh.prototype.resume=function(){this._mediaRecorder&&(this._mediaRecorder.resume(),this.element.setAttribute("data-state","rec"))};const glt={name:"ol-control-videorecorder",emits:["start","stop"],setup(r,e){const{control:t}=Di(Mh,r,e),{downloadName:n}=Lu(r);return t.value.on("start",i=>{e.emit("start",i)}),t.value.on("stop",i=>{e.emit("stop",i),LF.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 ylt(r,e,t,n,i,a){return dr("",!0)}var rx=le(glt,[["render",ylt]]),du={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},mlt=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={image:[Ar.POLYGON,Ar.CIRCLE,Ar.LINE_STRING,Ar.IMAGE,Ar.TEXT],hybrid:[Ar.POLYGON,Ar.LINE_STRING],vector:[]},wlt={hybrid:[Ar.IMAGE,Ar.TEXT,Ar.DEFAULT],vector:[Ar.POLYGON,Ar.CIRCLE,Ar.LINE_STRING,Ar.IMAGE,Ar.TEXT,Ar.DEFAULT]},Elt=function(r){mlt(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_=oi(),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(),c=u.getSource().getTile(t,n,i,o,l),h=a.viewHints,f=!(h[gn.ANIMATING]||h[gn.INTERACTING]);(f||!c.wantedResolution)&&(c.wantedResolution=A);var p=this.prepareTile(c,o,l);return p&&(f||Date.now()-a.time<8)&&u.getRenderMode()!==du.VECTOR&&this.renderTileImage_(c,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()===du.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(),c=a.getDeclutter(),h=u.getTileGrid(),f=u.getTileGridForProjection(i),p=f.getTileCoordExtent(t.wrappedTileCoord),v=u.getSourceTiles(n,i,t),m=pe(a);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],c&&(t.declutterExecutorGroups[m]=[]);for(var g=function(L,O){var b=v[L];if(b.getState()!=ge.LOADED)return"continue";var T=b.tileCoord,I=h.getTileCoordExtent(T),M=Jo(p,I),x=Va(M,a.getRenderBuffer()*A,_.tmpExtent),S=AA(I,M)?null:x;l.dirty=!1;var N=new L_(0,x,A,n),P=c?new L_(0,M,A,n):void 0,X=zQ(A,n),z=function(q){var at,vt=q.getStyleFunction()||a.getStyleFunction();if(vt&&(at=vt(q,A)),at){var wt=this.renderFeature(q,X,at,N,P);this.dirty_=this.dirty_||wt,l.dirty=l.dirty||wt}},tt=b.getFeatures();s&&s!==l.renderedRenderOrder&&tt.sort(s);for(var J=0,nt=tt.length;J<nt;++J){var it=tt[J];(!S||Mn(S,it.getGeometry().getExtent()))&&z.call(_,it)}var _t=N.finish(),R=a.getRenderMode()!==du.VECTOR&&c&&v.length===1?null:M,$=new O_(R,A,n,u.getOverlaps(),_t,a.getRenderBuffer());if(t.executorGroups[m].push($),P){var K=new O_(null,A,n,u.getOverlaps(),P.finish(),a.getRenderBuffer());t.declutterExecutorGroups[m].push(K)}},_=this,E=0,B=v.length;E<B;++E)g(E);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(),c=u.getTileGridForProjection(n.viewState.projection),h=Yi([t]);Va(h,s*i,h);for(var f={},p=function(B,L,O){var b=B.getId();b===void 0&&(b=pe(B));var T=f[b];if(T){if(T!==!0&&O<T.distanceSq){if(O===0)return f[b]=!0,o.splice(o.lastIndexOf(T),1),a(B,l,L);T.geometry=L,T.distanceSq=O}}else{if(O===0)return f[b]=!0,a(B,l,L);o.push(f[b]={feature:B,layer:l,geometry:L,distanceSq:O,callback:a})}},v=this.renderedTiles,m,g=function(B,L){var O=v[B],b=c.getTileCoordExtent(O.wrappedTileCoord);if(!Mn(b,h))return"continue";var T=pe(l),I=[O.executorGroups[T]],M=O.declutterExecutorGroups[T];M&&I.push(M),I.some(function(x){for(var S=x===M?n.declutterTree.all().map(function(z){return z.value}):null,N=0,P=x.length;N<P;++N){var X=x[N];if(m=X.forEachFeatureAtCoordinate(t,s,A,i,p,S),m)return!0}})},_=0,E=v.length;!m&&_<E;++_)g(_);return m},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,c=s.getTileGridForProjection(A),h=un(this.renderedPixelToCoordinateTransform_,t.slice()),f=c.getTileCoordForCoordAndResolution(h,u),p,v=0,m=this.renderedTiles.length;v<m;++v)if(f.toString()===this.renderedTiles[v].tileCoord.toString()){if(p=this.renderedTiles[v],p.getState()===ge.LOADED){var g=c.getTileCoordExtent(p.tileCoord);s.getWrapX()&&A.canWrapX()&&!Fo(l,g)&&HI(h,A);break}p=void 0}if(!p||p.loadingSourceTiles>0){n([]);return}var _=c.getTileCoordExtent(p.wrappedTileCoord),E=Rs(_),B=[(h[0]-E[0])/u,(E[1]-h[1])/u],L=p.getSourceTiles().reduce(function(M,x){return M.concat(x.getFeatures())},[]),O=p.hitDetectionImageData[o];if(!O&&!this.animatingOrInteracting_){var b=Pi(c.getTileSize(c.getZForResolution(u))),T=this.renderedRotation_,I=[this.getRenderTransform(c.getTileCoordCenter(p.wrappedTileCoord),u,0,Io,b[0]*Io,b[1]*Io,0)];O=VQ(b,I,L,a.getStyleFunction(),c.getTileCoordExtent(p.wrappedTileCoord),p.getReplayState(a).renderedResolution,T),p.hitDetectionImageData[o]=O}n(jQ(B,L,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[gn.ANIMATING]||a[gn.INTERACTING]),s=this.renderedTiles,A=0,l=s.length;A<l;++A){var u=s[A],c=u.declutterExecutorGroups[pe(this.getLayer())];if(c)for(var h=c.length-1;h>=0;--h)c[h].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),c=Math.round(l[1]*i),h=this.getLayer().getSource(),f=h.getTileGridForProjection(n.viewState.projection),p=t.tileCoord,v=f.getTileCoordExtent(t.wrappedTileCoord),m=f.getTileCoordExtent(p,this.tmpExtent)[0]-v[0],g=kp(Pv(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(o,s,A,i,u,c,m));return g},e.prototype.renderFrame=function(t,n){var i=t.viewHints,a=!(i[gn.ANIMATING]||i[gn.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=wlt[s],c=t.viewState,h=c.rotation,f=o.getSource(),p=f.getTileGridForProjection(c.projection),v=p.getZForResolution(c.resolution,f.zDirection),m=this.renderedTiles,g=[],_=[],E=m.length-1;E>=0;--E){var B=m[E],L=B.executorGroups[pe(o)].filter(function(z){return z.hasExecutors(u)});if(L.length!==0){for(var O=this.getTileRenderTransform(B,t),b=B.tileCoord[0],T=!1,I=L[0].getClipCoords(O),M=0,x=g.length;M<x;++M)if(v!==b&&b<_[M]){var S=g[M];Mn([I[0],I[3],I[4],I[7]],[S[0],S[3],S[4],S[7]])&&(T||(A.save(),T=!0),A.beginPath(),A.moveTo(I[0],I[1]),A.lineTo(I[2],I[3]),A.lineTo(I[4],I[5]),A.lineTo(I[6],I[7]),A.moveTo(S[6],S[7]),A.lineTo(S[4],S[5]),A.lineTo(S[2],S[3]),A.lineTo(S[0],S[1]),A.clip())}g.push(I),_.push(b);for(var N=0,P=L.length;N<P;++N){var X=L[N];X.execute(A,1,O,h,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=R_(a,t,i[A],n,this.boundHandleStyleImageChange_,void 0,o)||s;else s=R_(a,t,i,n,this.boundHandleStyleImageChange_,void 0,o);return s},e.prototype.tileImageNeedsRender_=function(t){var n=this.getLayer();if(n.getRenderMode()===du.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(),c=n.pixelRatio,h=n.viewState,f=h.projection,p=u.getTileGridForProjection(f),v=p.getResolution(t.tileCoord[0]),m=n.pixelRatio/t.wantedResolution*v,g=p.getResolution(l),_=t.getContext(i);c=Math.round(Math.max(c,m/c));var E=u.getTilePixelSize(l,c,f);_.canvas.width=E[0],_.canvas.height=E[1];var B=c/m;if(B!==1){var L=Nv(this.tmpTransform_);Pv(L,B,B),_.setTransform.apply(_,L)}var O=p.getTileCoordExtent(A,this.tmpExtent),b=m/g,T=Nv(this.tmpTransform_);Pv(T,b,-b),xY(T,-O[0],-O[3]);for(var I=0,M=s.length;I<M;++I){var x=s[I];x.execute(_,B,T,0,!0,_lt[i.getRenderMode()])}a.renderedTileResolution=t.wantedResolution},e}(F4),Clt=Elt,Blt=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)}}(),Tlt=function(r){Blt(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===du.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var o=i.renderMode||du.HYBRID;return _e(o==du.HYBRID||o==du.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 Clt(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(cu.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(cu.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(cu.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(cu.USE_INTERIM_TILES_ON_ERROR,t)},e}(aw),Slt=Tlt,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=ct.create("DIV",{className:r.switcherClass||"ol-layerswitcher"}):(t=ct.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=ct.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=ct.create("DIV",{className:"ol-switchertopdiv",parent:t,click:function(){e.overflow("+50%")}}),this.botv=ct.create("DIV",{className:"ol-switcherbottomdiv",parent:t,click:function(){e.overflow("-50%")}})),this._noScroll=r.noScroll),this.panel_=ct.create("UL",{className:"panel"}),this.panelContainer_=ct.create("DIV",{className:"panel-container",html:this.panel_,parent:t}),!r.target&&!r.noScroll&&ct.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_=ct.create("LI",{className:"ol-header",parent:this.panel_}),_r.call(this,{element:t,target:r.target}),this.set("drawDelay",r.drawDelay||0),this.set("selection",r.selection),r.minibar&&setTimeout(function(){var n=ct.scrollDiv(this.panelContainer_,{mousewheel:!0,vertical:!0,minibar:!0});this.on(["drawlist","toggle"],function(){n.refresh()})}.bind(this))};Cr(kr,_r);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(_r.prototype.setMap.call(this,r),this.drawPanel(),this._listener)for(var e in this._listener)No(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){ct.setHTML(this.header_,r)};kr.prototype.overflow=function(r){if(this.button&&!this._noScroll){if(ct.hidden(this.panel_)){ct.setStyle(this.element,{height:"auto"});return}var e=ct.outerHeight(this.element),t=ct.outerHeight(this.panel_),n=this.button.offsetTop+ct.outerHeight(this.button),i=this.panel_.offsetTop-n;if(t>e-n){ct.setStyle(this.element,{height:"100%"});var a=this.panel_.querySelectorAll("li.visible .li-content")[0],o=a?2*ct.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,ct.hide(this.botv)):ct.show(this.botv),i>=0?(i=0,ct.hide(this.topv)):ct.show(this.topv),ct.setStyle(this.panel_,{top:i+"px"}),!0}else return ct.setStyle(this.element,{height:"auto"}),ct.setStyle(this.panel_,{top:0}),ct.hide(this.botv),ct.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){No(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 Mn(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 c(){if(s){var f=l,p=e.getSelection()===f;if(f&&s){var v;u?v=u.getLayers():v=e._layerGroup?e._layerGroup.getLayers():e.getMap().getLayers();for(var m=v.getArray(),g=0;g<m.length;g++)if(m[g]==f){v.removeAt(g);break}for(var _=0;_<m.length;_++)if(m[_]===s){g>_?v.insertAt(_,f):v.insertAt(_+1,f);break}}p&&e.selectLayer(f),e.dispatchEvent({type:"reorder-end",layer:f,group:u})}t.parentNode.querySelectorAll("li").forEach(function(E){E.classList.remove("dropover"),E.classList.remove("dropover-after"),E.classList.remove("dropover-before")}),t.classList.remove("drag"),t.parentNode.classList.remove("drag"),e.element.classList.remove("drag"),A&&A.remove(),ct.removeListener(document,"mousemove touchmove",h),ct.removeListener(document,"mouseup touchend touchcancel",c)}function h(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=ct.create("LI",{className:"ol-dragover",html:t.innerHTML,style:{position:"absolute","z-index":1e4,left:t.offsetLeft,opacity:.5,width:ct.outerWidth(t),height:ct.getStyle(t,"height")},parent:i}),e.element.classList.add("drag"),e.dispatchEvent({type:"reorder-start",layer:l,group:u})),!n){f.preventDefault(),f.stopPropagation(),ct.setStyle(A,{top:a-ct.offsetRect(i).top+i.scrollTop+5});var p;for(f.touches?p=document.elementFromPoint(f.touches[0].clientX,f.touches[0].clientY):p=f.target,p.classList.contains("ol-switcherbottomdiv")?e.overflow(-1):p.classList.contains("ol-switchertopdiv")&&e.overflow(1);p&&p.tagName!=="LI";)p=p.parentNode;(!p||!p.classList.contains("dropover"))&&t.parentNode.querySelectorAll("li").forEach(function(v){v.classList.remove("dropover"),v.classList.remove("dropover-after"),v.classList.remove("dropover-before")}),p&&p.parentNode.classList.contains("drag")&&p!==t?(s=e._getLayerForLI(p),s&&!s.get("allwaysOnTop")==!l.get("allwaysOnTop")?(p.classList.add("dropover"),p.classList.add(t.offsetTop<p.offsetTop?"dropover-after":"dropover-before")):s=!1,ct.show(A)):(s=!1,p===t?ct.hide(A):ct.show(A)),s?A.classList.remove("forbidden"):A.classList.add("forbidden")}}ct.addListener(document,"mousemove touchmove",h),ct.addListener(document,"mouseup touchend touchcancel",c)};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=ct.getStyle(t,"left")-i;e.dragging_=!0;function o(){ct.removeListener(document,"mouseup touchend touchcancel",o),ct.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)/ct.getStyle(t.parentNode,"width"),c=Math.max(0,Math.min(1,u));ct.setStyle(t,{left:c*100+"%"}),t.parentNode.nextElementSibling.innerHTML=Math.round(c*100),n.setOpacity(c)}ct.addListener(document,"mouseup touchend touchcancel",o),ct.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 c=t._getLayerForLI(this.parentNode.parentNode);t.switchLayerVisibility(c,e),t.get("selection")&&c.getVisible()&&t.selectLayer(c),t.onchangeCheck&&t.onchangeCheck(c)};function a(u){u.stopPropagation(),u.preventDefault();var c=t._getLayerForLI(this.parentNode.parentNode);t.oninfo(c),t.dispatchEvent({type:"info",layer:c})}function o(u){u.stopPropagation(),u.preventDefault();var c=t._getLayerForLI(this.parentNode.parentNode);t.onextent?t.onextent(c):t.getMap().getView().fit(c.getExtent(),t.getMap().getSize()),t.dispatchEvent({type:"extent",layer:c})}function s(u){u.stopPropagation(),u.preventDefault();var c=this.parentNode.parentNode.parentNode.parentNode,h,f=t._getLayerForLI(c);f?(h=t._getLayerForLI(this.parentNode.parentNode),f.getLayers().remove(h),f.getLayers().getLength()==0&&!f.get("noSwitcherDelete")&&s.call(c.querySelectorAll(".layerTrash")[0],u)):(c=this.parentNode.parentNode,t.getMap().removeLayer(t._getLayerForLI(c)))}function A(u){if(!this.displayInLayerSwitcher(u)){this._setLayerForLI(null,u);return}var c=ct.create("LI",{className:(u.getVisible()?"visible ":" ")+(u.get("baseLayer")?"baselayer":""),parent:r});this._setLayerForLI(c,u),this._selectedLayer===u&&c.classList.add("ol-layer-select");var h=ct.create("DIV",{className:"ol-layerswitcher-buttons",parent:c}),f=ct.create("DIV",{className:"li-content",parent:c});ct.create("INPUT",{type:u.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:u.getVisible(),click:i,parent:f});var p=ct.create("LABEL",{title:u.get("title")||u.get("name"),click:i,unselectable:"on",style:{userSelect:"none"},parent:f});if(p.addEventListener("selectstart",function(){return!1}),ct.create("SPAN",{html:u.get("title")||u.get("name"),click:function(B){this.get("selection")&&(B.stopPropagation(),this.selectLayer(u))}.bind(this),parent:p}),this.reordering&&(l<n.length-1&&(u.get("allwaysOnTop")||!n[l+1].get("allwaysOnTop"))||l>0&&(!u.get("allwaysOnTop")||n[l-1].get("allwaysOnTop")))&&ct.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(B){t.dragOrdering_(B)}},parent:h}),u.getLayers){var v=0;u.getLayers().forEach(function(B){t.displayInLayerSwitcher(B)&&v++}),v&&ct.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:h})}if(this.oninfo&&ct.create("DIV",{className:"layerInfo",title:this.tip.info,click:a,parent:h}),this.hastrash&&!u.get("noSwitcherDelete")&&ct.create("DIV",{className:"layerTrash",title:this.tip.trash,click:s,parent:h}),this.hasextent&&n[l].getExtent()){var m=n[l].getExtent();m.length==4&&m[0]<m[2]&&m[1]<m[3]&&ct.create("DIV",{className:"layerExtent",title:this.tip.extent,click:o,parent:h})}if(this.show_progress&&u instanceof TF){var g=ct.create("DIV",{className:"layerswitcher-progress",parent:f});this.setprogress_(u),u.layerswitcher_progress=ct.create("DIV",{parent:g})}var _=ct.create("DIV",{className:"layerswitcher-opacity",click:function(B){if(B.target===this){B.stopPropagation(),B.preventDefault();var L=Math.max(0,Math.min(1,B.offsetX/ct.getStyle(this,"width")));t._getLayerForLI(this.parentNode.parentNode).setOpacity(L)}},parent:f});if(ct.create("DIV",{className:"layerswitcher-opacity-cursor ol-noscroll",style:{left:u.getOpacity()*100+"%"},on:{"mousedown touchstart":function(B){t.dragOpacity_(B)}},parent:_}),ct.create("DIV",{className:"layerswitcher-opacity-label",html:Math.round(u.getOpacity()*100),parent:f}),u.getLayers&&(c.classList.add("ol-layer-group"),u.get("openInLayerSwitcher")===!0)){var E=ct.create("UL",{parent:c});this.drawList(E,u.getLayers())}c.classList.add(this.getLayerClass(u)),this.dispatchEvent({type:"drawlist",layer:u,li:c})}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 hA?"ol-layer-vector":r instanceof Slt?"ol-layer-vectortile":r instanceof TF?"ol-layer-tile":r instanceof z4?"ol-layer-image":r instanceof l8?"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,ct.setStyle(r.layerswitcher_progress,{width:0})):ct.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 xlt={name:"ol-layerswitcher-control",setup(r,e){const{control:t}=Di(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 blt(r,e,t,n,i,a){return dr("",!0)}var X_=le(xlt,[["render",blt]]);ow.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"};J4.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())};Kot.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};Sh.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&&!xs(a,r)&&(r=[(a[0]+a[2])/2,(a[1]+a[3])/2]),t&&(r=Qu(r,t,this.getSource().getProjection())),this.getSource&&this.getSource()?[this.getSource().getPreview(r,e)]:[]};Wg.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 Cw=function(r){r=r||{},r.switcherClass="ol-layerswitcher-image",r.mouseover!==!1&&(r.mouseover=!0),kr.call(this,r)};Cr(Cw,kr);Cw.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")};ct.setStyle(r,{height:"auto"}),e.forEach(function(i){if(t.displayInLayerSwitcher(i)){var a=i.getPreview?i.getPreview():["none"],o=ct.create("LI",{className:"ol-imgcontainer"+(i.getVisible()?" ol-visible":""),on:{"touchstart click":n},parent:r});t._setLayerForLI(o,i),a.forEach(function(s){ct.create("IMG",{src:s,parent:o})}),ct.create("p",{html:i.get("title")||i.get("name"),parent:o}),t.testLayerVisibility(i)&&o.classList.add("ol-layer-hidden")}})};Cw.prototype.overflow=function(){};const Ilt={name:"ol-layerswitcherimage-control",extends:X_,setup(r,e){const{control:t}=Di(Cw,r,e);return{control:t}}};function Flt(r,e,t,n,i,a){return dr("",!0)}var nx=le(Ilt,[["render",Flt]]),Ta=function(r){r||(r={});var e=document.createElement("div");if(r.target)e=ct.create("DIV",{className:r.className||"ol-mapzone"});else{e=ct.create("DIV",{className:(r.className||"ol-mapzone")+" ol-unselectable ol-control ol-collapsed"});var t=ct.create("BUTTON",{type:"button",on:{click:function(){e.classList.toggle("ol-collapsed"),n.forEach(function(i){i.updateSize()})}.bind(this)},parent:e});ct.create("I",{parent:t})}_r.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(Ta,_r);Ta.prototype.setCollapsed=function(r){r?(this.element.classList.remove("ol-collapsed"),this.getMaps().forEach(function(e){e.updateSize()})):this.element.classList.add("ol-collapsed")};Ta.prototype.getCollapsed=function(){return this.element.classList.contains("ol-collapsed")};Ta.prototype.setVisible=Ta.prototype.setCollapsed;Ta.prototype.getMaps=function(){return this._maps};Ta.prototype.getLength=function(){return this._maps.length};Ta.prototype.addZone=function(r){var e=new qs({zoom:6,center:[0,0],projection:this._projection}),t;r.map?t=S_(r.map.getView().calculateExtent(),r.map.getView().getProjection(),e.getProjection()):t=S_(r.extent,"EPSG:4326",e.getProjection());var n=ct.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:Sa(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 Aw({target:n,view:e,controls:[],interactions:[],layers:[i]});a.set("zone",r),this._maps.push(a),e.fit(t),ct.create("P",{html:r.title,parent:n})};Ta.prototype.removeZone=function(r){var e=this.element.querySelectorAll(".ol-mapzonezone")[r];e&&(e.remove(),this._maps.splice(r,1))};Ta.zones={};Ta.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]}];Ta.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]}];Ta.zones.DOMTOM=[{title:"Métropole",extent:[-5.318421740712579,41.16082274292913,9.73284186155716,51.21957336557702]}].concat(Ta.zones.DOM,Ta.zones.TOM);const Llt={name:"ol-zone-control",setup(r,e){const{control:t}=Di(Ta,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 Olt(r,e,t,n,i,a){return dr("",!0)}var ix=le(Llt,[["render",Olt]]);function W_(r){W_.installed||(W_.installed=!0,r.component(FS.name,FS),r.component(LS.name,LS),r.component(OS.name,OS),r.component(RS.name,RS),r.component(MS.name,MS),r.component(NS.name,NS),r.component(PS.name,PS),r.component(US.name,US),r.component(uN.name,uN),r.component(DS.name,DS),r.component(QS.name,QS),r.component(HS.name,HS),r.component(GS.name,GS),r.component(kS.name,kS),r.component(ex.name,ex),r.component(rx.name,rx),r.component(X_.name,X_),r.component(nx.name,nx),r.component(ix.name,ix))}var Rlt=Object.freeze(Object.defineProperty({__proto__:null,default:W_,install:W_,FullScreenControl:FS,MousePositionControl:LS,AttributionControl:OS,OverviewMapControl:RS,ScaleLineControl:MS,ZoomControl:NS,ZoomSliderControl:PS,ZoomToExtentControl:US,ContextMenuControl:DS,SwipeControl:QS,ControlBar:HS,ToggleControl:GS,ButtonControl:kS,PrintDialog:ex,VideoRecorderControl:rx,LayerSwitcherControl:X_,LayerSwitcherImageControl:nx,ZoneControl:ix},Symbol.toStringTag,{value:"Module"}));function Yp(r,e){const t=Ce("feature"),{properties:n}=vr(e);let i=hr(()=>new r(...Object.values(n)));return he(n,()=>{t.value.setGeometry(i.value),t.value.changed()}),he(t,()=>{t.value.setGeometry(i.value)}),Ze(()=>{t.value.setGeometry(i.value)}),ir(()=>{t.value.setGeometry(null)}),{geometry:i}}const Mlt={name:"ol-geom-point",setup(r){const{geometry:e}=Yp(fr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Nlt(r,e,t,n,i,a){return dr("",!0)}var ax=le(Mlt,[["render",Nlt]]);const Plt={name:"ol-geom-line-string",setup(r){const{geometry:e}=Yp(Hr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Ult(r,e,t,n,i,a){return dr("",!0)}var ox=le(Plt,[["render",Ult]]);const Dlt={name:"ol-geom-polygon",setup(r){const{geometry:e}=Yp(bn,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Qlt(r,e,t,n,i,a){return dr("",!0)}var sx=le(Dlt,[["render",Qlt]]);const Hlt={name:"ol-geom-multi-point",setup(r){const{geometry:e}=Yp(es,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Glt(r,e,t,n,i,a){return dr("",!0)}var Ax=le(Hlt,[["render",Glt]]);const klt={name:"ol-geom-multi-line-string",setup(r){const{geometry:e}=Yp(xa,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function $lt(r,e,t,n,i,a){return dr("",!0)}var lx=le(klt,[["render",$lt]]);const Vlt={name:"ol-geom-multi-polygon",setup(r){const{geometry:e}=Yp(ba,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function jlt(r,e,t,n,i,a){return dr("",!0)}var ux=le(Vlt,[["render",jlt]]);function q_(r){q_.installed||(q_.installed=!0,r.component(ax.name,ax),r.component(ox.name,ox),r.component(sx.name,sx),r.component(Ax.name,Ax),r.component(lx.name,lx),r.component(ux.name,ux))}var Klt=Object.freeze(Object.defineProperty({__proto__:null,default:q_,install:q_,Point:ax,LineString:ox,Polygon:sx,MultiPoint:Ax,MultiLineString:lx,MultiPolygon:ux},Symbol.toStringTag,{value:"Module"}));const zlt={name:"ol-style",setup(r){const e=Ce("stylable",null),{properties:t}=vr(r);let n=hr(()=>new oa(t));const i=o=>{if(e instanceof dF||e instanceof vF){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=hr(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return he(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),Ze(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),ir(()=>{i(null)}),Mr("style",n),Mr("styledObj",e),{style:n}},props:{zIndex:{type:Number},overrideStyleFunction:{type:Function}}};function Ylt(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var cx=le(zlt,[["render",Ylt]]);const Xlt={name:"ol-style-circle",setup(r){const e=Ce("style",null),t=Ce("styledObj",null),{properties:n}=vr(r),i=s=>new ty(Os(Un({},s),{fill:new Aa,stroke:new Ui}));let a=hr(()=>i(n));const o=()=>{e.value.setImage(null),e.value.setImage(a.value),t.value.changed()};he(n,()=>{o()}),he(e,()=>{o()}),Ze(()=>{e.value.setImage(a.value)}),ir(()=>{e.value.setImage(null)}),Mr("circle",a),Mr("styledObj",t)},props:{radius:{type:Number},scale:{type:Number}}};function Wlt(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var hx=le(Xlt,[["render",Wlt]]);const qlt={name:"ol-style-stroke",setup(r){const e=Ce("style",null),t=Ce("circle",null),n=Ce("styledObj",null),{properties:i}=vr(r);if(e!=null&&t==null){let a=new Ui(i);e.value.setStroke(a);const o=()=>{e.value.setStroke(null),a=new Ui(i),e.value.setStroke(a)};he(i,()=>{o()}),he(e,()=>{o()}),Ze(()=>{e.value.setStroke(a)}),ir(()=>{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),he(i,o=>{a(o)}),he(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 Zlt(r,e,t,n,i,a){return dr("",!0)}var fx=le(qlt,[["render",Zlt]]);const Jlt={name:"ol-style-fill",setup(r){const e=Ce("style",null),t=Ce("circle",null),n=Ce("styledObj",null),{properties:i}=vr(r);if(e!=null&&t==null){let a=new Aa(i);e.value.setFill(a);const o=()=>{e.value.setFill(null),a=new Aa(i),e.value.setFill(a)};he(i,()=>{o()}),he(e,()=>{o()}),Ze(()=>{e.value.setFill(a)}),ir(()=>{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),he(i,()=>{a(i.color)}),he(t,()=>{a(i.color)})}},props:{color:{type:String}}};function tut(r,e,t,n,i,a){return dr("",!0)}var px=le(Jlt,[["render",tut]]);const eut={name:"ol-style-icon",setup(r){const e=Ce("style",null),t=Ce("styledObj",null),{properties:n}=vr(r);let i=hr(()=>{let o=new ny(n);return o.load(),o});const a=()=>{e.value.setImage(null),e.value.setImage(i.value),t.value.changed()};he(n,()=>{a()}),he(e,()=>{a()}),Ze(()=>{e.value.setImage(i.value)}),ir(()=>{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 rut(r,e,t,n,i,a){return dr("",!0)}var dx=le(eut,[["render",rut]]);const nut={name:"ol-style-text",setup(r){const e=Ce("style",null),t=Ce("styledObj",null),{properties:n}=vr(r),i=s=>new bh(Os(Un({},s),{fill:new Aa,stroke:new Ui}));let a=hr(()=>i(n));const o=()=>{e.value.setText(null),e.value.setText(a.value),t.value.changed()};he(n,()=>{o()}),he(e,()=>{o()}),Ze(()=>{e.value.setText(a.value)}),ir(()=>{e.value.setText(null)}),Mr("style",a),Mr("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 iut(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var vx=le(nut,[["render",iut]]),Mp=function(r,e){var t=r[0]-e[0],n=r[1]-e[1];return Math.sqrt(t*t+n*n)},Yd=function(r,e){return r[0]==e[0]&&r[1]==e[1]},F8;(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))}F8=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 bn(a[0]):new ba(a)}})();var Bw=function(r,e,t,n){var i=[];n!==!1&&i.push(r);var a=Mp(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};Hr.prototype.sampleAt=function(r){for(var e=this.getCoordinates(),t=[],n=1;n<e.length;n++)t=t.concat(Bw(e[n-1],e[n],r,n===1));return new Hr(t)};xa.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(Bw(n[a-1],n[a],r,a===1));t.push(i)}),new xa(t)};bn.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(Bw(n[a-1],n[a],r,a===1));t.push(i)}),new bn(t)};ba.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(Bw(a[s-1],a[s],r,s===1));i.push(o)})}),new ba(t)};uF.prototype.intersection=function(r,e){if(r.sampleAt){var t=Va(this.getCenter().concat(this.getCenter()),this.getRadius());r=F8(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 c=[];l.push(c),u.forEach(function(h){var f=Mp(n,h);f>i?(o=!0,c.push([n[0]+i/f*(h[0]-n[0]),n[1]+i/f*(h[1]-n[1])])):c.push(h)})})}),o?r.getType()==="Polygon"?new bn(s[0]):new ba(s):r}}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+r.getType());return r};Hr.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(Yd(r,this.getFirstCoordinate())||Yd(r,this.getLastCoordinate()))return[this];var s=this.getCoordinates(),A=[s[0]],l=[];for(t=0;t<s.length-1;t++)if(!Yd(s[t],s[t+1])){if(Yd(r,s[t+1]))A.push(s[t+1]),l.push(new Hr(A)),A=[];else if(!Yd(r,s[t])){var u,c,h=!1;s[t][0]==s[t+1][0]?(u=(s[t][1]-r[1])/(s[t][1]-s[t+1][1]),h=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]),h=s[t][1]==r[1]&&0<u&&u<=1):(u=(s[t][0]-r[0])/(s[t][0]-s[t+1][0]),c=(s[t][1]-r[1])/(s[t][1]-s[t+1][1]),h=Math.abs(u-c)<=e&&0<u&&u<=1),h&&(A.push(r),l.push(new Hr(A)),A=[r])}A.push(s[t+1])}return A.length>1&&l.push(new Hr(A)),l.length?l:[this]};var Ci=function(r){r||(r={}),oa.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(Ci,oa);Ci.prototype.setWidth=function(r){this._width=r||0};Ci.prototype.setWidth2=function(r){this._width2=r};Ci.prototype.getOffset=function(r){return this._offset[r]};Ci.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}}};Ci.prototype.setLineCap=function(r){this._lineCap=r==="round"?"round":"butt"};Ci.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};Ci.prototype.setColor=function(r){try{this._color=Du(r)}catch{this._color=[0,0,0,1]}};Ci.prototype.setColor2=function(r){try{this._color2=Du(r)}catch{this._color2=null}};Ci.prototype.setArrowColor=function(r){try{this._acolor=tl(r)}catch{this._acolor=null}};Ci.prototype.getColor=function(r,e){if(this._colorFn)return tl(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)+")"};Ci.prototype.getArrow=function(){return this._arrow};Ci.prototype.setArrow=function(r){this._arrow=parseInt(r),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)};Ci.prototype.getArrowSize=function(){return this._arrowSize||[16,16]};Ci.prototype.setArrowSize=function(r){Array.isArray(r)?this._arrowSize=r:typeof r=="number"&&(this._arrowSize=[r,r])};Ci.prototype.drawArrow=function(r,e,t,n,i){var a=this.getArrowSize()[0]*i,o=Mp(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()};Ci.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 c=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,c),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,c,!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 h=this._splitInto(r,255,2),f=0,p=h.length;if(a.lineJoin="round",a.lineCap=this._lineCap||"butt",h.length>1)for(f=0;f<h.length;f++){var v=f/p;for(n=h[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()}};Ci.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=Mp(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=Mp(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]};Ci.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+=Mp(r[n-1],i);var l=Math.max(t||2,A/(e||255)),u=r[0];A=0;var c=[u];for(n=1,i=r[1];n<r.length;){var h=i[0]-u[0],f=i[1]-u[1];if(s=Math.sqrt(h*h+f*f),A+s>l){var p=(l-A)/s;c.push([u[0]+h*p,u[1]+f*p]),o.push(c),u=[u[0]+h*p*a,u[1]+f*p*a],c=[u],A=0}else A+=s,u=i,c.push(u),n++,i=r[n]}return o.push(c),o};const aut={name:"ol-style-flowline",setup(r){const e=Ce("stylable",null),{properties:t}=vr(r);let n=hr(()=>new Ci(t));const i=o=>{if(e instanceof dF||e instanceof vF){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=hr(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return he(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),Ze(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),ir(()=>{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 out(r,e,t,n,i,a){return cn(),Vn("div",null,[mr(r.$slots,"default")])}var gx=le(aut,[["render",out]]);function Z_(r){Z_.installed||(Z_.installed=!0,r.component(cx.name,cx),r.component(hx.name,hx),r.component(fx.name,fx),r.component(px.name,px),r.component(dx.name,dx),r.component(vx.name,vx),r.component(gx.name,gx))}var sut=Object.freeze(Object.defineProperty({__proto__:null,default:Z_,install:Z_,Style:cx,Stroke:fx,Fill:px,Icon:dx,Text:vx,FlowLine:gx,Circle:hx},Symbol.toStringTag,{value:"Module"}));const Aut={name:"ol-interaction-select",emits:["select"],setup(r,{emit:e}){const t=Ce("map"),{properties:n}=vr(r);let i=hr(()=>{let a=new sw(Os(Un({},n),{style:new oa}));return a.on("select",o=>{e("select",o)}),a});return he(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),Ze(()=>{t.addInteraction(i.value)}),ir(()=>{t.removeInteraction(i.value)}),Mr("stylable",i),{select:i}},props:{multi:{type:Boolean,default:!1},condition:{type:Function},filter:{type:Function},features:{type:[si,Object]},hitTolerance:{type:Number,default:0,validator:r=>r>=0}}};function lut(r,e,t,n,i,a){return mr(r.$slots,"default")}var yx=le(Aut,[["render",lut]]),tc=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 hA({source:new _l({features:new si,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=nw),sw.call(this,r),this.on("select",this.selectCluster.bind(this))};Cr(tc,sw);tc.prototype.setMap=function(r){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&No(this._listener),this._listener=null,sw.prototype.setMap.call(this,r),this.overlayLayer_.setMap(r),r&&r.getView()&&(this._listener=r.getView().on("change:resolution",this.clear.bind(this)))};tc.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()};tc.prototype.getLayer=function(){return this.overlayLayer_};tc.prototype.selectCluster=function(r){if(r instanceof or&&(r={selected:[r]}),!r.selected.length){this._autoClose?this.clear():r.deselected.forEach(_=>{_.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,c,h,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)],c=new or({selectclusterfeature:!0,features:[n[A]],geometry:new fr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new or({selectclusterlink:!0,geometry:new Hr([i,u])}),f.push(h);else{s=0;var p=2*this.pointRadius;for(l=Math.min(this.maxObjects,n.length),A=0;A<l;A++){o=p/2+p*s/(2*Math.PI),s=s+(p+.1)/o;var v=a*o*Math.sin(s),m=a*o*Math.cos(s);u=[i[0]+v,i[1]+m],c=new or({selectclusterfeature:!0,features:[n[A]],geometry:new fr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new or({selectclusterlink:!0,geometry:new Hr([i,u])}),f.push(h)}}e.set("selectcluserfeatures",f),this.animate?this.animateCluster_(i,f):t.addFeatures(f)}}};tc.prototype.animateCluster_=function(r,e){if(this.listenerKey_&&No(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||mw(A),u=A.frameState.pixelRatio,c=this.getMap().getView().getResolution(),h=ts((A.frameState.time-a)/i),f=0,p;p=e[f];f++)if(p.get("features")){var v=p.getGeometry().getCoordinates();v[0]=r[0]+h*(v[0]-r[0]),v[1]=r[1]+h*(v[1]-r[1]);for(var m=new fr(v),g=n(p,c),_=0;_<g.length;_++){var E,B=Aw.prototype.getFeaturesAtPixel?!1:g[_].getImage();B&&(E=B.getScale(),B.setScale(u)),l.setStyle?(l.setStyle(g[_]),l.drawGeometry(m)):(l.setImageStyle(B),l.drawPointGeometry(m)),B&&B.setScale(E)}}if(h>1){No(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 or(new fr(this.getMap().getView().getCenter()));s.setStyle(new oa({image:new ty({})})),this.overlayLayer_.getSource().addFeature(s)};tc.prototype.getClusterExtent=function(r){if(!r.get("features"))return null;var e=_i();return r.get("features").forEach(function(t){e=Uu(e,t.getGeometry().getExtent())}),e[0]===e[2]&&e[1]===e[3]?null:e};const uut={name:"ol-interaction-clusterselect",emits:["select"],setup(r,{emit:e}){const t=Ce("map"),{properties:n}=vr(r);let i=hr(()=>{let a=new tc(Os(Un({},n),{style:new oa}));return a.on("select",o=>{e("select",o)}),a});he(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),Ze(()=>{t.addInteraction(i.value)}),ir(()=>{t.removeInteraction(i.value)}),Mr("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 cut(r,e,t,n,i,a){return mr(r.$slots,"default")}var mx=le(uut,[["render",cut]]);const hut={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:c,geometryFunction:h,geometryName:f,condition:p,freehand:v,freehandCondition:m,wrapX:g}=Lu(r);let _=()=>{let B=new dF({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:c.value,geometryFunction:h.value,geometryName:f.value,condition:p.value,freehand:v.value,freehandCondition:m.value,wrapX:g.value});return B.on("drawstart",L=>{e("drawstart",L)}),B.on("drawend",L=>{e("drawend",L)}),B},E=_();he([i,a,o,s,A,l,u,c,h,f,p,v,m,g],()=>{t.removeInteraction(E),E=_(),t.addInteraction(E),E.changed(),t.changed()}),Ze(()=>{t.addInteraction(E)}),ir(()=>{t.removeInteraction(E)}),Mr("stylable",E)},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 fut(r,e,t,n,i,a){return mr(r.$slots,"default")}var _x=le(hut,[["render",fut]]);const put={name:"ol-interaction-snap",setup(r){const e=Ce("map"),t=Ce("vectorSource"),{properties:n}=vr(r);let i=()=>new BJ(Os(Un({},n),{source:t.value})),a=i();he(n,()=>{e.removeInteraction(a),a=i(),e.addInteraction(a),e.changed()}),Ze(()=>{e.addInteraction(a)}),ir(()=>{e.removeInteraction(a)})},props:{vertex:{type:Boolean,default:!0},edge:{type:Boolean,default:!0},pixelTolerance:{type:Number,default:10}}};function dut(r,e,t,n,i,a){return mr(r.$slots,"default")}var wx=le(put,[["render",dut]]);const vut={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}=Lu(r);let c=()=>{let f=new vF({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",p=>{e("modifystart",p)}),f.on("modifyend",p=>{e("modifyend",p)}),f},h=c();he([a,o,s,A,l,u],()=>{t.removeInteraction(h),h=c(),t.addInteraction(h),h.changed(),t.changed()}),Ze(()=>{t.addInteraction(h)}),ir(()=>{t.removeInteraction(h)}),Mr("stylable",h)},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:[si,Object]}}};function gut(r,e,t,n,i,a){return mr(r.$slots,"default")}var Ex=le(vut,[["render",gut]]),zn=function(r){r||(r={});var e=this;this.selection_=new si,this.handles_=new si,this.overlayLayer_=new hA({source:new _l({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")||"")]}}),Po.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(zn,Po);zn.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"};zn.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}Po.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())};zn.prototype.setActive=function(r){this.select(null),this.overlayLayer_.setVisible(r),Po.prototype.setActive.call(this,r)};zn.prototype.setDefaultStyle=function(r){r=r||{};var e=r.pointStroke||new Ui({color:[255,0,0,1],width:1}),t=r.stroke||new Ui({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=r.fill||new Aa({color:[255,0,0,.01]}),i=r.pointFill||new Aa({color:[255,255,255,.8]}),a=new R0({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 R0({fill:i,stroke:e,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),s=new R0({fill:i,stroke:e,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function A(l,u,c){return[new oa({image:l,stroke:u,fill:c})]}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_()};zn.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_()}};zn.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")})||{}};zn.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};zn.prototype._isRectangle=function(r){if(this.get("keepRectangle")&&r.getType()==="Polygon"){var e=r.getCoordinates()[0];return e.length===5}return!1};zn.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=Va(o,0),this.selection_.forEach(function(c){var h=this.getGeometryRotateToZero_(c).getExtent();Uu(o,h)}.bind(this)),r===!0)this.ispt_||(this.overlayLayer_.getSource().addFeature(new or({geometry:new fr(this.center_),handle:"rotate0"})),n=Hu(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new or(n),this.overlayLayer_.getSource().addFeature(t));else{if(this.ispt_){var A=this.getMap().getPixelFromCoordinate([o[0],o[1]]);A&&(o=Yi([this.getMap().getCoordinateFromPixel([A[0]-10,A[1]-10]),this.getMap().getCoordinateFromPixel([A[0]+10,A[1]+10])]))}n=i?new bn([s]):Hu(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new or(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 or({geometry:new fr([(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 or({geometry:new fr(u[e]),handle:"scale",option:e}),l.push(t);this.get("translate")&&!this.get("translateFeature")&&(t=new or({geometry:new fr([(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 or({geometry:new fr(u[3]),handle:"rotate"}),l.push(t)),this.overlayLayer_.getSource().addFeatures(l)}}};zn.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_})}};zn.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_})};zn.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach(function(r){No(r)}),this._featureListeners=[],this.selection_.forEach(function(r){this._featureListeners.push(r.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))};zn.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=_i(),a=_i(),o=0,s;s=this.selection_.item(o);o++)if(this.geoms_.push(s.getGeometry().clone()),i=Uu(i,s.getGeometry().getExtent()),this.get("enableRotatedTransform")&&n!==0){var A=this.getGeometryRotateToZero_(s,!0);this.rotatedGeoms_.push(A),a=Uu(a,A.getExtent())}if(this.extent_=Hu(i).getCoordinates()[0],this.get("enableRotatedTransform")&&n!==0&&(this.rotatedExtent_=Hu(a).getCoordinates()[0]),this.mode_==="rotate"){this.center_=this.getCenter()||Sa(i);var l=r.map.getTargetElement();l.style.cursor=this.Cursors.rotate0,this.previousCursor_=l.style.cursor}else this.center_=Sa(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}}};zn.prototype.getFeatures=function(){return this.selection_};zn.prototype.getCenter=function(){return this.get("center")};zn.prototype.setCenter=function(r){return this.set("center",r)};function UA(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 Ja(r,e){return[e[0]-r[0],e[1]-r[1]]}function Oa(r,e){return[r[0]+e[0],r[1]+e[1]]}zn.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 c=this.center_;if(this.get("modifyCenter")(r)){var h=this.extent_;this.get("enableRotatedTransform")&&e!==0&&(h=this.rotatedExtent_),c=h[(Number(this.opt_)+2)%4]}var f=this.geoms_.length==1&&this._isRectangle(this.geoms_[0]),p=this.constraint_,v=this.opt_,m=this.coordinate_,g=r.coordinate;if(this.get("enableRotatedTransform")&&e!==0){var _=new fr(this.coordinate_);_.rotate(e*-1,c),m=_.getCoordinates();var E=new fr(r.coordinate);E.rotate(e*-1,c),g=E.getCoordinates()}var B=(g[0]-c[0])/(m[0]-c[0]),L=(g[1]-c[1])/(m[1]-c[1]),O=[g[0]-m[0],g[1]-m[1]];if(this.get("enableRotatedTransform")&&e!==0){var b=new fr(c);b.rotate(e*-1,this.getMap().getView().getCenter()),c=b.getCoordinates()}for(this.get("noFlip")&&(B<0&&(B=-B),L<0&&(L=-L)),this.constraint_?this.constraint_=="h"?B=1:L=1:this.get("keepAspectRatio")(r)&&(B=L=Math.min(B,L)),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,I,M){if(M<2)return I;if(f){var x=[[6],[0,8],[2],[4]],S=[T[0],T[1]],N=[T[2],T[3]],P=[T[4],T[5]],X=[T[6],T[7]],z=[T[8],T[9]];if(p){var tt=v%2===0?Ja(S,N):Ja(X,S),J=UA(O,tt),nt=v+1<x.length?v+1:0,it=[...x[v],...x[nt]];for(n=0;n<T.length;n+=M)I[n]=it.includes(n)?T[n]+J[0]:T[n],I[n+1]=it.includes(n)?T[n+1]+J[1]:T[n+1]}else{var _t,R;switch(v){case 0:O=Ja(X,g),_t=UA(O,Ja(P,X)),R=UA(O,Ja(S,X)),[I[0],I[1]]=Oa(S,_t),[I[4],I[5]]=Oa(P,R),[I[6],I[7]]=Oa(X,O),[I[8],I[9]]=Oa(z,_t);break;case 1:O=Ja(S,g),_t=UA(O,Ja(X,S)),R=UA(O,Ja(N,S)),[I[0],I[1]]=Oa(S,O),[I[2],I[3]]=Oa(N,_t),[I[6],I[7]]=Oa(X,R),[I[8],I[9]]=Oa(z,O);break;case 2:O=Ja(N,g),_t=UA(O,Ja(S,N)),R=UA(O,Ja(P,N)),[I[0],I[1]]=Oa(S,R),[I[2],I[3]]=Oa(N,O),[I[4],I[5]]=Oa(P,_t),[I[8],I[9]]=Oa(z,R);break;case 3:O=Ja(P,g),_t=UA(O,Ja(N,P)),R=UA(O,Ja(X,P)),[I[2],I[3]]=Oa(N,R),[I[4],I[5]]=Oa(P,O),[I[6],I[7]]=Oa(X,_t);break}}}else for(n=0;n<T.length;n+=M)B!=1&&(I[n]=c[0]+(T[n]-c[0])*B),L!=1&&(I[n+1]=c[1]+(T[n+1]-c[1])*L);return a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),I}),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,L],pixel:r.pixel,coordinate:r.coordinate});break}}this.isUpdating_=!1}};zn.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}};zn.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};zn.prototype.getFeatures=function(){return this.selection_};const yut={name:"ol-interaction-transform",setup(r){const e=Ce("map"),{properties:t}=vr(r);let n=hr(()=>new zn(Un({},t)));he(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),Ze(()=>{e.addInteraction(n.value)}),ir(()=>{e.removeInteraction(n.value)}),Mr("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 mut(r,e,t,n,i,a){return mr(r.$slots,"default")}var Cx=le(yut,[["render",mut]]);const _ut={name:"ol-interaction-dragrotatezoom",setup(r){const e=Ce("map"),{properties:t}=vr(r);let n=hr(()=>new w3(Un({},t)));he(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),Ze(()=>{e.addInteraction(n.value)}),ir(()=>{e.removeInteraction(n.value)})},props:{condition:{type:Function},duration:{type:Number,default:400}}};function wut(r,e,t,n,i,a){return mr(r.$slots,"default")}var Bx=le(_ut,[["render",wut]]);function J_(r){J_.installed||(J_.installed=!0,r.component(yx.name,yx),r.component(mx.name,mx),r.component(_x.name,_x),r.component(wx.name,wx),r.component(Ex.name,Ex),r.component(Cx.name,Cx),r.component(Bx.name,Bx))}var Eut=Object.freeze(Object.defineProperty({__proto__:null,default:J_,install:J_,SelectInteraction:yx,ClusterSelectInteraction:mx,DrawInteraction:_x,SnapInteraction:wx,ModifyInteraction:Ex,TransformInteraction:Cx,DragRotateAndZoomInteraction:Bx},Symbol.toStringTag,{value:"Module"}));const Cut={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:ts}}};function But(r,e,t,n,i,a){return mr(r.$slots,"default")}var Fs=le(Cut,[["render",But]]),Hi=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:YI;r.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=r.hiddenStyle,li.call(this)};Cr(Hi,li);Hi.hiddenStyle=new oa({image:new ty({}),stroke:new Ui({color:"transparent"})});Hi.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||mw(r),o=vS(r,n[i]);a.setStyle(o),o.getZIndex()<0?a.drawGeometry(t||e):a.drawGeometry(e)}catch{}};Hi.prototype.animate=function(){return!1};Aw.prototype.animateFeature=function(r,e){var t=this._featureAnimationLayer;t||(t=this._featureAnimationLayer=new hA({source:new _l}),t.setMap(this)),t.getSource().addFeature(r);var n=e.on("animationend",function(i){i.feature===r&&(t.getSource().removeFeature(r),No(n))});t.animateFeature(r,e)};UI.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:Sa(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,c=t&&this.getFilters?this.getFilters():[];function h(v){s.type=v.type;try{s.vectorContext=v.vectorContext||mw(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(),c.forEach(function(g){g.get("active")&&g.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 m={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(m),n.dispatchEvent(m)}c.forEach(function(g){g.get("active")&&g.postcompose(v)}),v.context.restore(),v.frameState.animate=!0}function f(v){No(i),i=null,r.setStyle(a);var m={type:"animationend",feature:r};if(v)for(var g in v)v.hasOwnProperty(g)&&(m[g]=v[g]);e[u].dispatchEvent(m),n.dispatchEvent(m)}function p(v){if(e.length&&!i){if(i=n.on(["postcompose","postrender"],h.bind(n)),n.renderSync)try{n.renderSync()}catch{}else n.changed();r.setStyle(e[u].hiddenStyle||Hi.hiddenStyle);var m={type:"animationstart",feature:r};if(v)for(var g in v)v.hasOwnProperty(g)&&(m[g]=v[g]);e[u].dispatchEvent(m),n.dispatchEvent(m)}}return p(),{start:p,stop:f,isPlaying:function(){return!!i}}};var MF=function(r){r=r||{},this.speed_=r.speed||0,Hi.call(this,r),this.side_=r.side||"top"};Cr(MF,Hi);MF.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 Nh(r,e){const{map:t,vectorLayer:n}=Fs.setup(),{properties:i}=vr(e),a=hr(()=>new r(Un({},i)));return Mr("animation",a),{map:t,vectorLayer:n,animation:a,properties:i}}const Tut={name:"ol-animation-drop",extends:Fs,setup(r){const{map:e,vectorLayer:t,properties:n}=Nh(MF,r);return{map:e,vectorLayer:t,properties:n}},props:{side:{type:Number,default:0},speed:{type:Number,default:0}}};function Sut(r,e,t,n,i,a){return mr(r.$slots,"default")}var Tx=le(Tut,[["render",Sut]]),NF=function(r){r=r||{},Hi.call(this,r),this.amplitude_=r.amplitude||40,this.bounce_=-Math.PI*(r.bounce||6),this.horizontal_=r.horizontal};Cr(NF,Hi);NF.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 xut={name:"ol-animation-shake",extends:Fs,setup(r){const{map:e,vectorLayer:t,properties:n,animation:i}=Nh(NF,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 but(r,e,t,n,i,a){return mr(r.$slots,"default")}var Sx=le(xut,[["render",but]]),ly=function(r){r=r||{},Hi.call(this,r),this.set("zoomout",r.zoomOut)};Cr(ly,Hi);var Iut=function(r){r=r||{},r.zoomOut=!0,ly.call(this,r)};Cr(Iut,ly);ly.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 Fut={name:"ol-animation-zoom",extends:Fs,setup(r){const{map:e,vectorLayer:t,properties:n}=Nh(ly,r);return{map:e,vectorLayer:t,properties:n}},props:{zoomOut:{type:Boolean,default:!1}}};function Lut(r,e,t,n,i,a){return mr(r.$slots,"default")}var xx=le(Fut,[["render",Lut]]),PF=function(r){Hi.call(this,r)};Cr(PF,Hi);PF.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 Out={name:"ol-animation-teleport",extends:Fs,setup(r){const{map:e,vectorLayer:t,properties:n}=Nh(PF,r);return{map:e,vectorLayer:t,properties:n}},props:{}};function Rut(r,e,t,n,i,a){return mr(r.$slots,"default")}var bx=le(Out,[["render",Rut]]),UF=function(r){r=r||{},this.speed_=r.speed||0,Hi.call(this,r)};Cr(UF,Hi);UF.prototype.animate=function(r){return r.context.globalAlpha=this.easing_(r.elapsed),this.drawGeom_(r,r.geom),r.time<=this.duration_};const Mut={name:"ol-animation-fade",extends:Fs,setup(r){const{map:e,vectorLayer:t,properties:n}=Nh(UF,r);return{map:e,vectorLayer:t,properties:n}}};function Nut(r,e,t,n,i,a){return mr(r.$slots,"default")}var Ix=le(Mut,[["render",Nut]]),DF=function(r){r=r||{},this.speed_=r.speed||0,Hi.call(this,r),this.side_=r.side||"left"};Cr(DF,Hi);DF.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 Put={name:"ol-animation-slide",extends:Fs,setup(r){const{map:e,vectorLayer:t,properties:n}=Nh(DF,r);return{map:e,vectorLayer:t,properties:n}},props:{speed:{type:Number,default:0}}};function Uut(r,e,t,n,i,a){return mr(r.$slots,"default")}var Fx=le(Put,[["render",Uut]]),QF=function(r){switch(r=r||{},Hi.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(QF,Hi);QF.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 c=[],h=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(h),c.push(i);r.style=c}return r.geom.setCoordinates(n),this.drawGeom_(r,r.geom),r.style=u,r.time<=this.duration_};const Dut={name:"ol-animation-path",extends:Fs,setup(r){const{map:e,vectorLayer:t,properties:n}=Nh(QF,r);return{map:e,vectorLayer:t,properties:n}},props:{rotate:{type:Boolean,default:!1},speed:{type:Number,default:0},path:{type:Object}}};function Qut(r,e,t,n,i,a){return mr(r.$slots,"default")}var Lx=le(Dut,[["render",Qut]]);function t1(r){t1.installed||(t1.installed=!0,r.component(Fs.name,Fs),r.component(Tx.name,Tx),r.component(Sx.name,Sx),r.component(xx.name,xx),r.component(bx.name,bx),r.component(Ix.name,Ix),r.component(Fx.name,Fx),r.component(Lx.name,Lx))}var Hut=Object.freeze(Object.defineProperty({__proto__:null,default:t1,install:t1,FeatureAnimation:Fs,DropAnimation:Tx,ShakeAnimation:Sx,ZoomAnimation:xx,TeleportAnimation:bx,FadeAnimation:Ix,PathAnimation:Lx,SlideAnimation:Fx},Symbol.toStringTag,{value:"Module"})),Gut=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)}}(),kut=function(r){Gut(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<Xu(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){Wu(t);for(var n=this.geometries_,i=0,a=n.length;i<a;++i)Uu(t,n[i].getExtent());return t},e.prototype.getGeometries=function(){return LN(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=Sa(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(LN(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}(Z1);function LN(r){for(var e=[],t=0,n=r.length;t<n;++t)e.push(r[t].clone());return e}var sa=kut,$ut=Object.freeze(Object.defineProperty({__proto__:null,Circle:uF,Geometry:Z1,GeometryCollection:sa,LinearRing:bp,LineString:Hr,MultiLineString:xa,MultiPoint:es,MultiPolygon:ba,Point:fr,Polygon:bn,SimpleGeometry:Is},Symbol.toStringTag,{value:"Module"})),Vut=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?Oe(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()===Qa.TILE_PIXELS&&(i=Oe(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 Be()},r.prototype.readFeature=function(e,t){return Be()},r.prototype.readFeatures=function(e,t){return Be()},r.prototype.readGeometry=function(e,t){return Be()},r.prototype.readProjection=function(e){return Be()},r.prototype.writeFeature=function(e,t){return Be()},r.prototype.writeFeatures=function(e,t){return Be()},r.prototype.writeGeometry=function(e,t){return Be()},r}(),uy=Vut;function Ln(r,e,t){var n=t?Oe(t.featureProjection):null,i=t?Oe(t.dataProjection):null,a;if(n&&i&&!Ws(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 HF(r,e){var t=e?Oe(e.featureProjection):null,n=e?Oe(e.dataProjection):null;return t&&n&&!Ws(t,n)?S_(r,n,t):r}var jut=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)}}(),Kut=function(r){jut(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return Cs.JSON},e.prototype.readFeature=function(t,n){return this.readFeatureFromObject(Gm(t),this.getReadOptions(t,n))},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(Gm(t),this.getReadOptions(t,n))},e.prototype.readFeatureFromObject=function(t,n){return Be()},e.prototype.readFeaturesFromObject=function(t,n){return Be()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(Gm(t),this.getReadOptions(t,n))},e.prototype.readGeometryFromObject=function(t,n){return Be()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(Gm(t))},e.prototype.readProjectionFromObject=function(t){return Be()},e.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},e.prototype.writeFeatureObject=function(t,n){return Be()},e.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},e.prototype.writeFeaturesObject=function(t,n){return Be()},e.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},e.prototype.writeGeometryObject=function(t,n){return Be()},e}(uy);function Gm(r){if(typeof r=="string"){var e=JSON.parse(r);return e||null}else return r!==null?r:null}var GF=Kut,zut=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)}}(),Ph={};Ph[st.POINT]=Wut;Ph[st.LINE_STRING]=qut;Ph[st.POLYGON]=ect;Ph[st.MULTI_POINT]=Jut;Ph[st.MULTI_LINE_STRING]=Zut;Ph[st.MULTI_POLYGON]=tct;var Uh={};Uh[st.POINT]=rct;Uh[st.LINE_STRING]=nct;Uh[st.POLYGON]=ict;Uh[st.MULTI_POINT]=oct;Uh[st.MULTI_LINE_STRING]=act;Uh[st.MULTI_POLYGON]=sct;var Yut=function(r){zut(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=ON(a.geometry,n),s=new or;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 ON(t,n)},e.prototype.readProjectionFromObject=function(t){if(t.spatialReference&&t.spatialReference.wkid!==void 0){var n=t.spatialReference,i=n.wkid;return Oe("EPSG:"+i)}else return null},e.prototype.writeGeometryObject=function(t,n){return RN(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=RN(o,n);var s=n&&(n.dataProjection||n.featureProjection);s&&(i.geometry.spatialReference={wkid:Number(Oe(s).getCode().split(":").pop())}),delete a[t.getGeometryName()]}return hh(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}(GF);function ON(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=Xp(o),A=Xut(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=Ph[i];return Ln(l(r),!1,e)}function Xut(r,e){var t=[],n=[],i=[],a,o;for(a=0,o=r.length;a<o;++a){t.length=0,Zg(t,0,r[a],e.length);var s=tw(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],c=Fo(new bp(u).getExtent(),new bp(A).getExtent());if(c){n[a].push(A),l=!0;break}}l||n.push([A.reverse()])}return n}function Wut(r){var e;return r.m!==void 0&&r.z!==void 0?e=new fr([r.x,r.y,r.z,r.m],Wt.XYZM):r.z!==void 0?e=new fr([r.x,r.y,r.z],Wt.XYZ):r.m!==void 0?e=new fr([r.x,r.y,r.m],Wt.XYM):e=new fr([r.x,r.y]),e}function qut(r){var e=Xp(r);return new Hr(r.paths[0],e)}function Zut(r){var e=Xp(r);return new xa(r.paths,e)}function Xp(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 Jut(r){var e=Xp(r);return new es(r.points,e)}function tct(r){var e=Xp(r);return new ba(r.rings,e)}function ect(r){var e=Xp(r);return new bn(r.rings,e)}function rct(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 cy(r){var e=r.getLayout();return{hasZ:e===Wt.XYZ||e===Wt.XYZM,hasM:e===Wt.XYM||e===Wt.XYZM}}function nct(r,e){var t=cy(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:[r.getCoordinates()]}}function ict(r,e){var t=cy(r);return{hasZ:t.hasZ,hasM:t.hasM,rings:r.getCoordinates(!1)}}function act(r,e){var t=cy(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:r.getCoordinates()}}function oct(r,e){var t=cy(r);return{hasZ:t.hasZ,hasM:t.hasM,points:r.getCoordinates()}}function sct(r,e){for(var t=cy(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 RN(r,e){var t=Uh[r.getType()];return t(Ln(r,!0,e),e)}var Act=Yut,lct=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)}}(),uct=function(r){lct(e,r);function e(t){var n=this,i=t||{};return n=r.call(this)||this,n.dataProjection=Oe(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(n.defaultFeatureProjection=Oe(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=Ox(i.geometry,n),o=new or;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 Ox(t,n)},e.prototype.readProjectionFromObject=function(t){var n=t.crs,i;return n?n.type=="name"?i=Oe(n.properties.name):n.type==="EPSG"?i=Oe("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=Rx(s,n),delete o[t.getGeometryName()]),hh(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 Rx(t,this.adaptOptions(n))},e}(GF);function Ox(r,e){if(!r)return null;var t;switch(r.type){case st.POINT:{t=hct(r);break}case st.LINE_STRING:{t=fct(r);break}case st.POLYGON:{t=gct(r);break}case st.MULTI_POINT:{t=dct(r);break}case st.MULTI_LINE_STRING:{t=pct(r);break}case st.MULTI_POLYGON:{t=vct(r);break}case st.GEOMETRY_COLLECTION:{t=cct(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return Ln(t,!1,e)}function cct(r,e){var t=r.geometries.map(function(n){return Ox(n,e)});return new sa(t)}function hct(r){return new fr(r.coordinates)}function fct(r){return new Hr(r.coordinates)}function pct(r){return new xa(r.coordinates)}function dct(r){return new es(r.coordinates)}function vct(r){return new ba(r.coordinates)}function gct(r){return new bn(r.coordinates)}function Rx(r,e){r=Ln(r,!0,e);var t=r.getType(),n;switch(t){case st.POINT:{n=Cct(r);break}case st.LINE_STRING:{n=mct(r);break}case st.POLYGON:{n=Bct(r,e);break}case st.MULTI_POINT:{n=wct(r);break}case st.MULTI_LINE_STRING:{n=_ct(r);break}case st.MULTI_POLYGON:{n=Ect(r,e);break}case st.GEOMETRY_COLLECTION:{n=yct(r,e);break}case st.CIRCLE:{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return n}function yct(r,e){var t=r.getGeometriesArray().map(function(n){var i=de({},e);return delete i.featureProjection,Rx(n,i)});return{type:"GeometryCollection",geometries:t}}function mct(r,e){return{type:"LineString",coordinates:r.getCoordinates()}}function _ct(r,e){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function wct(r,e){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function Ect(r,e){var t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(t)}}function Cct(r,e){return{type:"Point",coordinates:r.getCoordinates()}}function Bct(r,e){var t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(t)}}var Tct=uct,yh="http://www.w3.org/2001/XMLSchema-instance";function ke(r,e){return Wp().createElementNS(r,e)}function Ka(r,e){return L8(r,e,[]).join("")}function L8(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)L8(n,e,t)}return t}function rA(r){return"documentElement"in r}function Sct(r,e,t){return r.getAttributeNS(e,t)||""}function nA(r){return new DOMParser().parseFromString(r,"application/xml")}function MN(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];Qr(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 Le(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 vn(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 O8(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=Nn(i.localName)}R8(t,n,a,o)}}function Nn(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 ke(l,A)}}var qi=Nn();function ho(r,e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=r[e[i]];return n}function Nt(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 Ao(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),Ao(e,t,n,i),n.pop()}function R8(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 Ge(r,e,t,n,i,a,o){return i.push(r),R8(e,t,n,i,a,o),i.pop()}var zC=void 0;function xct(){return zC===void 0&&typeof XMLSerializer<"u"&&(zC=new XMLSerializer),zC}var YC=void 0;function Wp(){return YC===void 0&&typeof document<"u"&&(YC=document.implementation.createDocument("","",null)),YC}var bct=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)}}(),Ict=function(r){bct(e,r);function e(){var t=r.call(this)||this;return t.xmlSerializer_=xct(),t}return e.prototype.getType=function(){return Cs.XML},e.prototype.readFeature=function(t,n){if(t)if(typeof t=="string"){var i=nA(t);return this.readFeatureFromDocument(i,n)}else return rA(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=nA(t);return this.readFeaturesFromDocument(i,n)}else return rA(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&&Qr(i,this.readFeaturesFromNode(a,n));return i},e.prototype.readFeaturesFromNode=function(t,n){return Be()},e.prototype.readGeometry=function(t,n){if(t)if(typeof t=="string"){var i=nA(t);return this.readGeometryFromDocument(i,n)}else return rA(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=nA(t);return this.readProjectionFromDocument(n)}else return rA(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}(uy),hy=Ict,Fct=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)}}(),nl="http://www.opengis.net/gml",Lct=/^[\s\xa0]*$/,jn=function(r){Fct(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:Le(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 c=0,h=t.childNodes.length;c<h;++c){var f=t.childNodes[c];if(f.nodeType===1){var p=f.nodeName.split(":").pop();if(s.indexOf(p)===-1){var v="",m=0,g=f.namespaceURI;for(var _ in A){if(A[_]===g){v=_;break}++m}v||(v=l+m,A[v]=g),s.push(v+":"+p)}}}i!="featureMember"&&(o.featureType=s,o.featureNS=A)}if(typeof A=="string"){var E=A;A={},A[u]=E}var B={},L=Array.isArray(s)?s:[s];for(var O in A){for(var b={},c=0,h=L.length;c<h;++c){var T=L[c].indexOf(":")===-1?u:L[c].split(":")[0];T===O&&(b[L[c].split(":").pop()]=i=="featureMembers"?me(this.readFeatureElement,this):Le(this.readFeatureElement,this))}B[A[O]]=b}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?HF(a,i):void 0},e.prototype.readGeometryElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?Ln(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=Ka(s,!1),Lct.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 c=0;c<u;c++){var h=s.attributes[c].name;o[l][h]=s.attributes[c].value}}}if(i){var f=new or(o);a&&f.setGeometryName(a);var p=t.getAttribute("fid")||Sct(t,this.namespace,"id");return p&&f.setId(p),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 fr(i,Wt.XYZ)},e.prototype.readMultiPoint=function(t,n){var i=Gt([],this.MULTIPOINT_PARSERS,t,n,this);if(i)return new es(i)},e.prototype.readMultiLineString=function(t,n){var i=Gt([],this.MULTILINESTRING_PARSERS,t,n,this);if(i)return new xa(i)},e.prototype.readMultiPolygon=function(t,n){var i=Gt([],this.MULTIPOLYGON_PARSERS,t,n,this);if(i)return new ba(i)},e.prototype.pointMemberParser=function(t,n){Ao(this.POINTMEMBER_PARSERS,t,n,this)},e.prototype.lineStringMemberParser=function(t,n){Ao(this.LINESTRINGMEMBER_PARSERS,t,n,this)},e.prototype.polygonMemberParser=function(t,n){Ao(this.POLYGONMEMBER_PARSERS,t,n,this)},e.prototype.readLineString=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i){var a=new Hr(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 bp(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)Qr(a,i[s]),o.push(a.length);return new bn(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 Oe(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(hy);jn.prototype.namespace=nl;jn.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}};jn.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}};jn.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}};jn.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:me(jn.prototype.pointMemberParser),pointMembers:me(jn.prototype.pointMemberParser)}};jn.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:me(jn.prototype.lineStringMemberParser),lineStringMembers:me(jn.prototype.lineStringMemberParser)}};jn.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:me(jn.prototype.polygonMemberParser),polygonMembers:me(jn.prototype.polygonMemberParser)}};jn.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:me(jn.prototype.readFlatCoordinatesFromNode)}};jn.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:me(jn.prototype.readLineString)}};jn.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:me(jn.prototype.readPolygon)}};jn.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:Le(jn.prototype.readFlatLinearRing)}};var lr=jn;function ju(r){var e=Ka(r,!1);return Jc(e)}function Jc(r){var e=/^\s*(true|1)|(false|0)\s*$/.exec(r);if(e)return e[1]!==void 0||!1}function kF(r){var e=Ka(r,!1),t=Date.parse(e);return isNaN(t)?void 0:t/1e3}function Ir(r){var e=Ka(r,!1);return XA(e)}function XA(r){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(r);if(e)return parseFloat(e[1])}function ai(r){var e=Ka(r,!1);return ZA(e)}function ZA(r){var e=/^\s*(\d+)\s*$/.exec(r);if(e)return parseInt(e[1],10)}function $t(r){return Ka(r,!1).trim()}function Np(r,e){De(r,e?"1":"0")}function Oct(r,e){r.appendChild(Wp().createCDATASection(e))}function Rct(r,e){var t=new Date(e*1e3),n=t.getUTCFullYear()+"-"+Gd(t.getUTCMonth()+1,2)+"-"+Gd(t.getUTCDate(),2)+"T"+Gd(t.getUTCHours(),2)+":"+Gd(t.getUTCMinutes(),2)+":"+Gd(t.getUTCSeconds(),2)+"Z";r.appendChild(Wp().createTextNode(n))}function no(r,e){var t=e.toPrecision();r.appendChild(Wp().createTextNode(t))}function e1(r,e){var t=e.toString();r.appendChild(Wp().createTextNode(t))}function De(r,e){r.appendChild(Wp().createTextNode(e))}var Mct=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)}}(),Nct=nl+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",Pct={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Er=function(r){Mct(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.FEATURE_COLLECTION_PARSERS[nl].featureMember=me(n.readFeaturesInternal),n.schemaLocation=i.schemaLocation?i.schemaLocation:Nct,n}return e.prototype.readFlatCoordinates=function(t,n){var i=Ka(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s="enu";if(o){var A=Oe(o);A&&(s=A.getAxisOrientation())}for(var l=i.trim().split(/\s+/),u=[],c=0,h=l.length;c<h;c++){var f=l[c].split(/,+/),p=parseFloat(f[0]),v=parseFloat(f[1]),m=f.length===3?parseFloat(f[2]):0;s.substr(0,2)==="en"?u.push(p,v,m):u.push(v,p,m)}return u},e.prototype.readBox=function(t,n){var i=Gt([null],this.BOX_PARSERS_,t,n,this);return uo(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")),ke("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 c=n.getProperties();for(var h in c){var f=c[h];f!==null&&(l.push(h),u.push(f),h==A||typeof f.getSimplifiedGeometry=="function"?h in o.serializers[s]||(o.serializers[s][h]=At(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=At(De)))}}var p=de({},o);p.node=t,Ge(p,o.serializers,Nn(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=ke(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();Ge({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=HF(n,a):s=Ln(n,!0,a),Ge(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var n=ke(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),c=0;c<l;++c){var h=A[c];u[c]=this.getCoords_(h,s,o)}De(t,u.join(" "))},e.prototype.writeCurveSegments_=function(t,n,i){var a=ke(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();Ge({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=ke(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),ke(o.namespaceURI,s!==void 0?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,n,i){var a=ke(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeRing=function(t,n,i){var a=ke(t.namespaceURI,"LinearRing");t.appendChild(a),this.writeLinearRing(a,n,i)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Oe(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);De(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();Ge({node:t,hasZ:o,srsName:s},this.POINTMEMBER_SERIALIZERS,Nn("pointMember"),A,i,void 0,this)},e.prototype.writePointMember=function(t,n,i){var a=ke(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();Ge({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]];Ge({node:t},this.ENVELOPE_SERIALIZERS,qi,A,i,s,this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return ke("http://www.opengis.net/gml",Pct[a.nodeName])},e}(lr);Er.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:Le(Er.prototype.readFlatCoordinates)}};Er.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:Er.prototype.innerBoundaryIsParser,outerBoundaryIs:Er.prototype.outerBoundaryIsParser}};Er.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:me(Er.prototype.readFlatCoordinates)}};Er.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Le(lr.prototype.readPoint),MultiPoint:Le(lr.prototype.readMultiPoint),LineString:Le(lr.prototype.readLineString),MultiLineString:Le(lr.prototype.readMultiLineString),LinearRing:Le(lr.prototype.readLinearRing),Polygon:Le(lr.prototype.readPolygon),MultiPolygon:Le(lr.prototype.readMultiPolygon),Box:Le(Er.prototype.readBox)}};Er.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:At(Er.prototype.writeCurveOrLineString),MultiCurve:At(Er.prototype.writeMultiCurveOrLineString),Point:At(Er.prototype.writePoint),MultiPoint:At(Er.prototype.writeMultiPoint),LineString:At(Er.prototype.writeCurveOrLineString),MultiLineString:At(Er.prototype.writeMultiCurveOrLineString),LinearRing:At(Er.prototype.writeLinearRing),Polygon:At(Er.prototype.writeSurfaceOrPolygon),MultiPolygon:At(Er.prototype.writeMultiSurfaceOrPolygon),Surface:At(Er.prototype.writeSurfaceOrPolygon),MultiSurface:At(Er.prototype.writeMultiSurfaceOrPolygon),Envelope:At(Er.prototype.writeEnvelope)}};Er.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:At(Er.prototype.writeLineStringOrCurveMember),curveMember:At(Er.prototype.writeLineStringOrCurveMember)}};Er.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:At(Er.prototype.writeRing),innerBoundaryIs:At(Er.prototype.writeRing)}};Er.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:At(Er.prototype.writePointMember)}};Er.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:At(Er.prototype.writeSurfaceOrPolygonMember),polygonMember:At(Er.prototype.writeSurfaceOrPolygonMember)}};Er.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:At(De),upperCorner:At(De)}};var qp=Er,Uct=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)}}(),Dct=nl+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",Qct={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Ee=function(r){Uct(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:Dct,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 xa(i);return a}else return},e.prototype.readMultiSurface=function(t,n){var i=Gt([],this.MULTISURFACE_PARSERS,t,n,this);if(i)return new ba(i)},e.prototype.curveMemberParser=function(t,n){Ao(this.CURVEMEMBER_PARSERS,t,n,this)},e.prototype.surfaceMemberParser=function(t,n){Ao(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)Qr(a,i[s]),o.push(a.length);return new bn(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 Hr(i,Wt.XYZ);return a}else return},e.prototype.readEnvelope=function(t,n){var i=Gt([null],this.ENVELOPE_PARSERS,t,n,this);return uo(i[1][0],i[1][1],i[2][0],i[2][1])},e.prototype.readFlatPos=function(t,n){for(var i=Ka(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 c=Oe(l);u=c.getAxisOrientation()}if(u==="neu"){var h=void 0,f=void 0;for(h=0,f=o.length;h<f;h+=3){var p=o[h],v=o[h+1];o[h]=v,o[h+1]=p}}var m=o.length;if(m==2&&o.push(0),m!==0)return o}},e.prototype.readFlatPosList=function(t,n){var i=Ka(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s=a.srsDimension,A="enu";if(o){var l=Oe(o);A=l.getAxisOrientation()}var u=i.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=ZA(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=ZA(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=ZA(t.parentNode.getAttribute("srsDimension")):s&&(c=ZA(s));for(var h,f,p,v=[],m=0,g=u.length;m<g;m+=c)h=parseFloat(u[m]),f=parseFloat(u[m+1]),p=c===3?parseFloat(u[m+2]):0,A.substr(0,2)==="en"?v.push(h,f,p):v.push(f,h,p);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=Oe(A).getAxisOrientation());var u=n.getCoordinates(),c;if(l.substr(0,2)==="en"?c=u[0]+" "+u[1]:c=u[1]+" "+u[0],o){var h=u[2]||0;c+=" "+h}De(t,c)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Oe(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,c=new Array(u),h,f=0;f<u;++f)h=l[f],c[f]=this.getCoords_(h,A,o);De(t,c.join(" "))},e.prototype.writePoint=function(t,n,i){var a=i[i.length-1],o=a.srsName;o&&t.setAttribute("srsName",o);var s=ke(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]];Ge({node:t},this.ENVELOPE_SERIALIZERS,qi,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=ke(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),ke(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();Ge({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=ke(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=ke(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,n,i)}else if(t.nodeName==="Curve"){var A=ke(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();Ge({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();Ge({node:t,hasZ:s,srsName:o},this.POINTMEMBER_SERIALIZERS,Nn("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();Ge({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=ke(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=ke(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=ke(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeCurveSegments_=function(t,n,i){var a=ke(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=HF(n,a):s=Ln(n,!0,a),Ge(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 c=n.getProperties();for(var h in c){var f=c[h];f!==null&&(l.push(h),u.push(f),h==A||typeof f.getSimplifiedGeometry=="function"?h in o.serializers[s]||(o.serializers[s][h]=At(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=At(De)))}}var p=de({},o);p.node=t,Ge(p,o.serializers,Nn(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,Ge(l,A,Nn(o,s),n,i)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return ke(this.namespace,Qct[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")),ke(this.namespace,u)},e.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var i=ke(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=ke(this.namespace,"featureMembers");i.setAttributeNS(yh,"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}(lr);Ee.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:Le(Ee.prototype.readFlatPos),posList:Le(Ee.prototype.readFlatPosList),coordinates:Le(qp.prototype.readFlatCoordinates)}};Ee.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:Ee.prototype.interiorParser,exterior:Ee.prototype.exteriorParser}};Ee.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:Le(lr.prototype.readPoint),MultiPoint:Le(lr.prototype.readMultiPoint),LineString:Le(lr.prototype.readLineString),MultiLineString:Le(lr.prototype.readMultiLineString),LinearRing:Le(lr.prototype.readLinearRing),Polygon:Le(lr.prototype.readPolygon),MultiPolygon:Le(lr.prototype.readMultiPolygon),Surface:Le(Ee.prototype.readSurface),MultiSurface:Le(Ee.prototype.readMultiSurface),Curve:Le(Ee.prototype.readCurve),MultiCurve:Le(Ee.prototype.readMultiCurve),Envelope:Le(Ee.prototype.readEnvelope)}};Ee.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:me(Ee.prototype.curveMemberParser),curveMembers:me(Ee.prototype.curveMemberParser)}};Ee.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:me(Ee.prototype.surfaceMemberParser),surfaceMembers:me(Ee.prototype.surfaceMemberParser)}};Ee.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:me(lr.prototype.readLineString),Curve:me(Ee.prototype.readCurve)}};Ee.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:me(lr.prototype.readPolygon),Surface:me(Ee.prototype.readSurface)}};Ee.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:Le(Ee.prototype.readPatch)}};Ee.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:Le(Ee.prototype.readSegment)}};Ee.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:me(Ee.prototype.readFlatPosList),upperCorner:me(Ee.prototype.readFlatPosList)}};Ee.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:Le(Ee.prototype.readPolygonPatch)}};Ee.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:Le(Ee.prototype.readLineStringSegment)}};Ee.prototype.writeFeatures;Ee.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:At(Ee.prototype.writeRing),interior:At(Ee.prototype.writeRing)}};Ee.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:At(De),upperCorner:At(De)}};Ee.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:At(Ee.prototype.writeSurfaceOrPolygonMember),polygonMember:At(Ee.prototype.writeSurfaceOrPolygonMember)}};Ee.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:At(Ee.prototype.writePointMember)}};Ee.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:At(Ee.prototype.writeLineStringOrCurveMember),curveMember:At(Ee.prototype.writeLineStringOrCurveMember)}};Ee.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:At(Ee.prototype.writeCurveOrLineString),MultiCurve:At(Ee.prototype.writeMultiCurveOrLineString),Point:At(Ee.prototype.writePoint),MultiPoint:At(Ee.prototype.writeMultiPoint),LineString:At(Ee.prototype.writeCurveOrLineString),MultiLineString:At(Ee.prototype.writeMultiCurveOrLineString),LinearRing:At(Ee.prototype.writeLinearRing),Polygon:At(Ee.prototype.writeSurfaceOrPolygon),MultiPolygon:At(Ee.prototype.writeMultiSurfaceOrPolygon),Surface:At(Ee.prototype.writeSurfaceOrPolygon),MultiSurface:At(Ee.prototype.writeMultiSurfaceOrPolygon),Envelope:At(Ee.prototype.writeEnvelope)}};var rr=Ee,$F=rr;$F.prototype.writeFeatures;$F.prototype.writeFeaturesNode;var Hct=$F,Gct=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)}}(),wi=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],kct="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd",$ct={rte:M8,trk:N8,wpt:P8},Vct=Nt(wi,{rte:me(M8),trk:me(N8),wpt:me(P8)}),jct=Nt(wi,{text:ot($t,"linkText"),type:ot($t,"linkType")}),Kct=Nt(wi,{rte:At(vht),trk:At(ght),wpt:At(mht)}),zct=function(r){Gct(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Oe("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(!yi(wi,t.namespaceURI))return null;var i=$ct[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(!yi(wi,t.namespaceURI))return[];if(t.localName=="gpx"){var i=Gt([],Vct,t,[this.getReadOptions(t,n)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=ke("http://www.topografix.com/GPX/1/1","gpx"),a="http://www.w3.org/2000/xmlns/";return i.setAttributeNS(a,"xmlns:xsi",yh),i.setAttributeNS(yh,"xsi:schemaLocation",kct),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),Ge({node:i},Kct,hht,t,[n]),i},e}(hy),Yct=Nt(wi,{name:ot($t),cmt:ot($t),desc:ot($t),src:ot($t),link:KF,number:ot(ai),extensions:zF,type:ot($t),rtept:fht}),Xct=Nt(wi,{ele:ot(Ir),time:ot(kF)}),Wct=Nt(wi,{name:ot($t),cmt:ot($t),desc:ot($t),src:ot($t),link:KF,number:ot(ai),type:ot($t),extensions:zF,trkseg:dht}),qct=Nt(wi,{trkpt:pht}),Zct=Nt(wi,{ele:ot(Ir),time:ot(kF)}),Jct=Nt(wi,{ele:ot(Ir),time:ot(kF),magvar:ot(Ir),geoidheight:ot(Ir),name:ot($t),cmt:ot($t),desc:ot($t),src:ot($t),link:KF,sym:ot($t),type:ot($t),fix:ot($t),sat:ot(ai),hdop:ot(Ir),vdop:ot(Ir),pdop:ot(Ir),ageofdgpsdata:ot(Ir),dgpsid:ot(ai),extensions:zF}),tht=["text","type"],eht=Nt(wi,{text:At(De),type:At(De)}),rht=Nt(wi,["name","cmt","desc","src","link","number","type","rtept"]),nht=Nt(wi,{name:At(De),cmt:At(De),desc:At(De),src:At(De),link:At(YF),number:At(e1),type:At(De),rtept:O8(At(XF))}),iht=Nt(wi,["ele","time"]),aht=Nt(wi,["name","cmt","desc","src","link","number","type","trkseg"]),oht=Nt(wi,{name:At(De),cmt:At(De),desc:At(De),src:At(De),link:At(YF),number:At(e1),type:At(De),trkseg:O8(At(yht))}),sht=Nn("trkpt"),Aht=Nt(wi,{trkpt:At(XF)}),lht=Nt(wi,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),uht=Nt(wi,{ele:At(no),time:At(Rct),magvar:At(no),geoidheight:At(no),name:At(De),cmt:At(De),desc:At(De),src:At(De),link:At(YF),sym:At(De),type:At(De),fix:At(De),sat:At(e1),hdop:At(no),vdop:At(no),pdop:At(no),ageofdgpsdata:At(no),dgpsid:At(e1)}),cht={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function hht(r,e,t){var n=r.getGeometry();if(n){var i=cht[n.getType()];if(i){var a=e[e.length-1].node;return ke(a.namespaceURI,i)}}}function VF(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 jF(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 KF(r,e){var t=e[e.length-1],n=r.getAttribute("href");n!==null&&(t.link=n),Ao(jct,r,e)}function zF(r,e){var t=e[e.length-1];t.extensionsNode_=r}function fht(r,e){var t=Gt({},Xct,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;VF(i,a,r,t)}}function pht(r,e){var t=Gt({},Zct,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;VF(i,a,r,t)}}function dht(r,e){var t=e[e.length-1];Ao(qct,r,e);var n=t.flatCoordinates,i=t.ends;i.push(n.length)}function M8(r,e){var t=e[0],n=Gt({flatCoordinates:[],layoutOptions:{}},Yct,r,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var a=n.layoutOptions;delete n.layoutOptions;var o=jF(a,i),s=new Hr(i,o);Ln(s,!1,t);var A=new or(s);return A.setProperties(n,!0),A}}function N8(r,e){var t=e[0],n=Gt({flatCoordinates:[],ends:[],layoutOptions:{}},Wct,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=jF(o,i,a),A=new xa(i,s,a);Ln(A,!1,t);var l=new or(A);return l.setProperties(n,!0),l}}function P8(r,e){var t=e[0],n=Gt({},Jct,r,e);if(n){var i={},a=VF([],i,r,n),o=jF(i,a),s=new fr(a,o);Ln(s,!1,t);var A=new or(s);return A.setProperties(n,!0),A}}function YF(r,e,t){r.setAttribute("href",e);var n=t[t.length-1],i=n.properties,a=[i.linkText,i.linkType];Ge({node:r},eht,qi,a,t,tht)}function XF(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"?iht[a]:lht[a],l=ho(o,A);Ge({node:r,properties:o},uht,qi,l,t,A)}function vht(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=Ln(o,!0,n);a.geometryLayout=s.getLayout(),i.rtept=s.getCoordinates()}var A=t[t.length-1].node,l=rht[A.namespaceURI],u=ho(i,l);Ge(a,nht,qi,u,t,l)}function ght(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=Ln(o,!0,n);i.trkseg=s.getLineStrings()}var A=t[t.length-1].node,l=aht[A.namespaceURI],u=ho(i,l);Ge(a,oht,qi,u,t,l)}function yht(r,e,t){var n={node:r};n.geometryLayout=e.getLayout(),n.properties={},Ge(n,Aht,sht,e.getCoordinates(),t)}function mht(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=Ln(a,!0,n);i.geometryLayout=o.getLayout(),XF(r,o.getCoordinates(),t)}}var _ht=zct,wht=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)}}(),Eht=function(r){wht(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return Cs.TEXT},e.prototype.readFeature=function(t,n){return this.readFeatureFromText(km(t),this.adaptOptions(n))},e.prototype.readFeatureFromText=function(t,n){return Be()},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(km(t),this.adaptOptions(n))},e.prototype.readFeaturesFromText=function(t,n){return Be()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromText(km(t),this.adaptOptions(n))},e.prototype.readGeometryFromText=function(t,n){return Be()},e.prototype.readProjection=function(t){return this.readProjectionFromText(km(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 Be()},e.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},e.prototype.writeFeaturesText=function(t,n){return Be()},e.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},e.prototype.writeGeometryText=function(t,n){return Be()},e}(uy);function km(r){return typeof r=="string"?r:""}var WF=Eht,Cht=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)}}(),Xd={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},Bht=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,Tht=/^H.([A-Z]{3}).*?:(.*)/,Sht=/^HFDTE(\d{2})(\d{2})(\d{2})/,xht=/\r\n|\r|\n/,bht=function(r){Cht(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Oe("EPSG:4326"),n.altitudeMode_=i.altitudeMode?i.altitudeMode:Xd.NONE,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.altitudeMode_,a=t.split(xht),o={},s=[],A=2e3,l=0,u=1,c=-1,h,f;for(h=0,f=a.length;h<f;++h){var p=a[h],v=void 0;if(p.charAt(0)=="B"){if(v=Bht.exec(p),v){var m=parseInt(v[1],10),g=parseInt(v[2],10),_=parseInt(v[3],10),E=parseInt(v[4],10)+parseInt(v[5],10)/6e4;v[6]=="S"&&(E=-E);var B=parseInt(v[7],10)+parseInt(v[8],10)/6e4;if(v[9]=="W"&&(B=-B),s.push(B,E),i!=Xd.NONE){var L=void 0;i==Xd.GPS?L=parseInt(v[11],10):i==Xd.BAROMETRIC?L=parseInt(v[12],10):L=0,s.push(L)}var O=Date.UTC(A,l,u,m,g,_);O<c&&(O=Date.UTC(A,l,u+1,m,g,_)),s.push(O/1e3),c=O}}else p.charAt(0)=="H"&&(v=Sht.exec(p),v?(u=parseInt(v[1],10),l=parseInt(v[2],10)-1,A=2e3+parseInt(v[3],10)):(v=Tht.exec(p),v&&(o[v[1]]=v[2].trim())))}if(s.length===0)return null;var b=i==Xd.NONE?Wt.XYM:Wt.XYZM,T=new Hr(s,b),I=new or(Ln(T,!1,n));return I.setProperties(o,!0),I},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return i?[i]:[]},e}(WF),Iht=bht,Fht=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)}}(),Cl=["http://www.google.com/kml/ext/2.2"],Te=[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"],Lht="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",NN={fraction:Ua.FRACTION,pixels:Ua.PIXELS,insetPixels:Ua.PIXELS},Oht=Nt(Te,{ExtendedData:q8,Region:Z8,MultiGeometry:ot(Y8,"geometry"),LineString:ot(K8,"geometry"),LinearRing:ot(z8,"geometry"),Point:ot(X8,"geometry"),Polygon:ot(W8,"geometry"),Style:ot(JF),StyleMap:pft,address:ot($t),description:ot($t),name:ot($t),open:ot(ju),phoneNumber:ot($t),styleUrl:ot(G8),visibility:ot(ju)},Nt(Cl,{MultiTrack:ot(eft,"geometry"),Track:ot(j8,"geometry")})),Rht=Nt(Te,{ExtendedData:q8,Region:Z8,Link:Sft,address:ot($t),description:ot($t),name:ot($t),open:ot(ju),phoneNumber:ot($t),visibility:ot(ju)}),Mht=Nt(Te,{href:ot(H8)}),U8=Nt(Te,{LatLonAltBox:mft,Lod:wft}),Nht=Nt(Te,["Document","Placemark"]),Pht=Nt(Te,{Document:At(Mft),Placemark:At(eH)}),dp,z0=null,Mx,kv,$v,Vv,r1,Nx=null,qF,Px=null,Ux,Hc=null,PN=null,Dx=null;function n1(r){return 32/Math.min(r[0],r[1])}function Uht(){dp=[255,255,255,1],z0=new Aa({color:dp}),Mx=[20,2],kv=Ua.PIXELS,$v=Ua.PIXELS,Vv=[64,64],r1="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",Nx=new ny({anchor:Mx,anchorOrigin:Li.BOTTOM_LEFT,anchorXUnits:kv,anchorYUnits:$v,crossOrigin:"anonymous",rotation:0,scale:n1(Vv),size:Vv,src:r1}),qF="NO_IMAGE",Px=new Ui({color:dp,width:1}),Ux=new Ui({color:[51,51,51,1],width:2}),Hc=new bh({font:"bold 16px Helvetica",fill:z0,stroke:Ux,scale:.8}),PN=new oa({fill:z0,image:Nx,text:Hc,stroke:Px,zIndex:0}),Dx=[PN]}var $m;function Dht(r){return r}var Qht=function(r){Fht(e,r);function e(t){var n=r.call(this)||this,i=t||{};return Dx||Uht(),n.dataProjection=Oe("EPSG:4326"),n.defaultStyle_=i.defaultStyle?i.defaultStyle:Dx,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:Dht,n.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],n}return e.prototype.readDocumentOrFolder_=function(t,n){var i=Nt(Te,{Document:MN(this.readDocumentOrFolder_,this),Folder:MN(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},Oht,t,n,this);if(i){var a=new or,o=t.getAttribute("id");o!==null&&a.setId(o);var s=n[0],A=i.geometry;if(A&&Ln(A,!1,s),a.setGeometry(A),delete i.geometry,this.extractStyles_){var l=i.Style,u=i.styleUrl,c=Ght(l,u,this.defaultStyle_,this.sharedStyles_,this.showPointNames_);a.setStyle(c)}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=JF.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=$8.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(!yi(Te,t.namespaceURI))return null;var i=this.readPlacemark_(t,[this.getReadOptions(t,n)]);return i||null},e.prototype.readFeaturesFromNode=function(t,n){if(!yi(Te,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&&Qr(i,A)}return i}else return[]},e.prototype.readName=function(t){if(t)if(typeof t=="string"){var n=nA(t);return this.readNameFromDocument(n)}else return rA(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(yi(Te,n.namespaceURI)&&n.localName=="name")return $t(n);for(var n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(yi(Te,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=nA(t);Qr(n,this.readNetworkLinksFromDocument(i))}else rA(t)?Qr(n,this.readNetworkLinksFromDocument(t)):Qr(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&&Qr(n,this.readNetworkLinksFromNode(i));return n},e.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(yi(Te,i.namespaceURI)&&i.localName=="NetworkLink"){var a=Gt({},Rht,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;yi(Te,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&Qr(n,this.readNetworkLinksFromNode(i))}return n},e.prototype.readRegion=function(t){var n=[];if(typeof t=="string"){var i=nA(t);Qr(n,this.readRegionFromDocument(i))}else rA(t)?Qr(n,this.readRegionFromDocument(t)):Qr(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&&Qr(n,this.readRegionFromNode(i));return n},e.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(yi(Te,i.namespaceURI)&&i.localName=="Region"){var a=Gt({},U8,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;yi(Te,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&Qr(n,this.readRegionFromNode(i))}return n},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=ke(Te[4],"kml"),a="http://www.w3.org/2000/xmlns/";i.setAttributeNS(a,"xmlns:gx",Cl[0]),i.setAttributeNS(a,"xmlns:xsi",yh),i.setAttributeNS(yh,"xsi:schemaLocation",Lht);var o={node:i},s={};t.length>1?s.Document=t:t.length==1&&(s.Placemark=t[0]);var A=Nht[i.namespaceURI],l=ho(s,A);return Ge(o,Pht,qi,l,[n],A,this),i},e}(hy);function Hht(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()||Hc.getFont()),A.setScale(A.getScale()||Hc.getScale()),A.setFill(A.getFill()||Hc.getFill()),A.setStroke(A.getStroke()||Ux)):A=Hc.clone(),A.setText(e),A.setOffsetX(t[0]),A.setOffsetY(t[1]),A.setTextAlign(n);var l=new oa({image:i,text:A});return l}function Ght(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 sa)l=u.getGeometriesArrayRecursive().filter(function(v){var m=v.getType();return m===st.POINT||m===st.MULTI_POINT}),s=l.length>0;else{var c=u.getType();s=c===st.POINT||c===st.MULTI_POINT}}s&&(A=a.get("name"),s=s&&!!A,s&&A.search(/&[^&]+;/)>-1&&($m||($m=document.createElement("textarea")),$m.innerHTML=A,A=$m.value));var h=t;if(r?h=r:e&&(h=D8(e,t,n)),s){var f=Hht(h[0],A);if(l.length>0){f.setGeometry(new sa(l));var p=new oa({geometry:h[0].getGeometry(),image:null,fill:h[0].getFill(),stroke:h[0].getStroke(),text:null});return[f,p].concat(h.slice(1))}return f}return h}}function D8(r,e,t){return Array.isArray(r)?r:typeof r=="string"?D8(t[r],e,t):e}function Tw(r){var e=Ka(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 Q8(r){var e=Ka(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 H8(r){var e=Ka(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 G8(r){var e=Ka(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 kht(r){var e=r.getAttribute("xunits"),t=r.getAttribute("yunits"),n;return e!=="insetPixels"?t!=="insetPixels"?n=Li.BOTTOM_LEFT:n=Li.TOP_LEFT:t!=="insetPixels"?n=Li.BOTTOM_RIGHT:n=Li.TOP_RIGHT,{x:parseFloat(r.getAttribute("x")),xunits:NN[e],y:parseFloat(r.getAttribute("y")),yunits:NN[t],origin:n}}function k8(r){return Ir(r)}var $ht=Nt(Te,{Pair:fft});function $8(r,e){return Gt(void 0,$ht,r,e,this)}var Vht=Nt(Te,{Icon:ot(ift),color:ot(Tw),heading:ot(Ir),hotSpot:ot(kht),scale:ot(k8)});function jht(r,e){var t=Gt({},Vht,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=r1);var A,l,u,c=Li.BOTTOM_LEFT,h=t.hotSpot;h?(A=[h.x,h.y],l=h.xunits,u=h.yunits,c=h.origin):/^http:\/\/maps\.(?:google|gstatic)\.com\//.test(o)&&(/pushpin/.test(o)?(A=Mx,l=kv,u=$v):/arrow-reverse/.test(o)?(A=[54,42],l=kv,u=$v):/paddle/.test(o)&&(A=[32,1],l=kv,u=$v));var f,p=i.x,v=i.y;p!==void 0&&v!==void 0&&(f=[p,v]);var m,g=i.w,_=i.h;g!==void 0&&_!==void 0&&(m=[g,_]);var E,B=t.heading;B!==void 0&&(E=Cu(B));var L=t.scale,O=t.color;if(a){o==r1&&(m=Vv);var b=new ny({anchor:A,anchorOrigin:c,anchorXUnits:l,anchorYUnits:u,crossOrigin:this.crossOrigin_,offset:f,offsetOrigin:Li.BOTTOM_LEFT,rotation:E,scale:L,size:m,src:this.iconUrlFunction_(o),color:O}),T=b.getScaleArray()[0],I=b.getSize();if(I===null){var M=b.getImageState();if(M===$e.IDLE||M===$e.LOADING){var x=function(){var N=b.getImageState();if(!(N===$e.IDLE||N===$e.LOADING)){var P=b.getSize();if(P&&P.length==2){var X=n1(P);b.setScale(T*X)}b.unlistenImageChange(x)}};b.listenImageChange(x),M===$e.IDLE&&b.load()}}else if(I.length==2){var S=n1(I);b.setScale(T*S)}n.imageStyle=b}else n.imageStyle=qF}}var Kht=Nt(Te,{color:ot(Tw),scale:ot(k8)});function zht(r,e){var t=Gt({},Kht,r,e);if(t){var n=e[e.length-1],i=new bh({fill:new Aa({color:"color"in t?t.color:dp}),scale:t.scale});n.textStyle=i}}var Yht=Nt(Te,{color:ot(Tw),width:ot(Ir)});function Xht(r,e){var t=Gt({},Yht,r,e);if(t){var n=e[e.length-1],i=new Ui({color:"color"in t?t.color:dp,width:"width"in t?t.width:1});n.strokeStyle=i}}var Wht=Nt(Te,{color:ot(Tw),fill:ot(ju),outline:ot(ju)});function qht(r,e){var t=Gt({},Wht,r,e);if(t){var n=e[e.length-1],i=new Aa({color:"color"in t?t.color:dp});n.fillStyle=i;var a=t.fill;a!==void 0&&(n.fill=a);var o=t.outline;o!==void 0&&(n.outline=o)}}var Zht=Nt(Te,{coordinates:Le(Q8)});function V8(r,e){return Gt(null,Zht,r,e)}function Jht(r,e){var t=e[e.length-1],n=t.coordinates,i=Ka(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 tft=Nt(Cl,{Track:me(j8)});function eft(r,e){var t=Gt([],tft,r,e);if(t)return new xa(t)}var rft=Nt(Te,{when:xft},Nt(Cl,{coord:Jht}));function j8(r,e){var t=Gt({coordinates:[],whens:[]},rft,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 Hr(n,Wt.XYZM)}}var nft=Nt(Te,{href:ot(H8)},Nt(Cl,{x:ot(Ir),y:ot(Ir),w:ot(Ir),h:ot(Ir)}));function ift(r,e){var t=Gt({},nft,r,e);return t||null}var aft=Nt(Te,{coordinates:Le(Q8)});function ZF(r,e){return Gt(null,aft,r,e)}var Sw=Nt(Te,{extrude:ot(ju),tessellate:ot(ju),altitudeMode:ot($t)});function K8(r,e){var t=Gt({},Sw,r,e),n=ZF(r,e);if(n){var i=new Hr(n,Wt.XYZ);return i.setProperties(t,!0),i}else return}function z8(r,e){var t=Gt({},Sw,r,e),n=ZF(r,e);if(n){var i=new bn(n,Wt.XYZ,[n.length]);return i.setProperties(t,!0),i}else return}var oft=Nt(Te,{LineString:me(K8),LinearRing:me(z8),MultiGeometry:me(Y8),Point:me(X8),Polygon:me(W8)});function Y8(r,e){var t=Gt([],oft,r,e);if(!t)return null;if(t.length===0)return new sa(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 c=t[0];l=c.getLayout(),u=c.getFlatCoordinates();for(var s=1,A=t.length;s<A;++s)o=t[s],Qr(u,o.getFlatCoordinates());n=new es(u,l),XC(n,t)}else a==st.LINE_STRING?(n=new xa(t),XC(n,t)):a==st.POLYGON?(n=new ba(t),XC(n,t)):a==st.GEOMETRY_COLLECTION?n=new sa(t):_e(!1,37)}else n=new sa(t);return n}function X8(r,e){var t=Gt({},Sw,r,e),n=ZF(r,e);if(n){var i=new fr(n,Wt.XYZ);return i.setProperties(t,!0),i}else return}var sft=Nt(Te,{innerBoundaryIs:Cft,outerBoundaryIs:Tft});function W8(r,e){var t=Gt({},Sw,r,e),n=Gt([null],sft,r,e);if(n&&n[0]){for(var i=n[0],a=[i.length],o=1,s=n.length;o<s;++o)Qr(i,n[o]),a.push(i.length);var A=new bn(i,Wt.XYZ,a);return A.setProperties(t,!0),A}else return}var Aft=Nt(Te,{IconStyle:jht,LabelStyle:zht,LineStyle:Xht,PolyStyle:qht});function JF(r,e){var t=Gt({},Aft,r,e,this);if(!t)return null;var n="fillStyle"in t?t.fillStyle:z0,i=t.fill;i!==void 0&&!i&&(n=null);var a;"imageStyle"in t?t.imageStyle!=qF&&(a=t.imageStyle):a=Nx;var o="textStyle"in t?t.textStyle:Hc,s="strokeStyle"in t?t.strokeStyle:Px,A=t.outline;return A!==void 0&&!A?[new oa({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===st.GEOMETRY_COLLECTION){var h=u;return new sa(h.getGeometriesArrayRecursive().filter(function(f){var p=f.getType();return p!==st.POLYGON&&p!==st.MULTI_POLYGON}))}else if(c!==st.POLYGON&&c!==st.MULTI_POLYGON)return u},fill:n,image:a,stroke:s,text:o,zIndex:void 0}),new oa({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===st.GEOMETRY_COLLECTION){var h=u;return new sa(h.getGeometriesArrayRecursive().filter(function(f){var p=f.getType();return p===st.POLYGON||p===st.MULTI_POLYGON}))}else if(c===st.POLYGON||c===st.MULTI_POLYGON)return u},fill:n,stroke:null,zIndex:void 0})]:[new oa({fill:n,image:a,stroke:s,text:o,zIndex:void 0})]}function XC(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 lft=Nt(Te,{displayName:ot($t),value:ot($t)});function uft(r,e){var t=r.getAttribute("name");Ao(lft,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 cft=Nt(Te,{Data:uft,SchemaData:vft});function q8(r,e){Ao(cft,r,e)}function Z8(r,e){Ao(U8,r,e)}var hft=Nt(Te,{Style:ot(JF),key:ot($t),styleUrl:ot(G8)});function fft(r,e){var t=Gt({},hft,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 pft(r,e){var t=$8.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 dft=Nt(Te,{SimpleData:gft});function vft(r,e){Ao(dft,r,e)}function gft(r,e){var t=r.getAttribute("name");if(t!==null){var n=$t(r),i=e[e.length-1];i[t]=n}}var yft=Nt(Te,{altitudeMode:ot($t),minAltitude:ot(Ir),maxAltitude:ot(Ir),north:ot(Ir),south:ot(Ir),east:ot(Ir),west:ot(Ir)});function mft(r,e){var t=Gt({},yft,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 _ft=Nt(Te,{minLodPixels:ot(Ir),maxLodPixels:ot(Ir),minFadeExtent:ot(Ir),maxFadeExtent:ot(Ir)});function wft(r,e){var t=Gt({},_ft,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 Eft=Nt(Te,{LinearRing:me(V8)});function Cft(r,e){var t=Gt([],Eft,r,e);if(t.length>0){var n=e[e.length-1];n.push.apply(n,t)}}var Bft=Nt(Te,{LinearRing:Le(V8)});function Tft(r,e){var t=Gt(void 0,Bft,r,e);if(t){var n=e[e.length-1];n[0]=t}}function Sft(r,e){Ao(Mht,r,e)}function xft(r,e){var t=e[e.length-1],n=t.whens,i=Ka(r,!1),a=Date.parse(i);n.push(isNaN(a)?0:a)}function xw(r,e){for(var t=Du(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}De(r,i.join(""))}function bft(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]}}De(r,A)}var Y0=Nt(Te,{Data:At(Ift),value:At(Lft),displayName:At(Fft)});function Ift(r,e,t){r.setAttribute("name",e.name);var n={node:r},i=e.value;typeof i=="object"?(i!==null&&i.displayName&&Ge(n,Y0,qi,[i.displayName],t,["displayName"]),i!==null&&i.value&&Ge(n,Y0,qi,[i.value],t,["value"])):Ge(n,Y0,qi,[i],t,["value"])}function Fft(r,e){Oct(r,e)}function Lft(r,e){De(r,e)}var Oft=Nt(Te,{Placemark:At(eH)}),Rft=function(r,e,t){var n=e[e.length-1].node;return ke(n.namespaceURI,"Placemark")};function Mft(r,e,t){var n={node:r};Ge(n,Oft,Rft,e,t,void 0,this)}var Nft=Nn("Data");function Pft(r,e,t){for(var n={node:r},i=e.names,a=e.values,o=i.length,s=0;s<o;s++)Ge(n,Y0,Nft,[{name:i[s],value:a[s]}],t)}var UN=Nt(Te,["href"],Nt(Cl,["x","y","w","h"])),DN=Nt(Te,{href:At(De)},Nt(Cl,{x:At(no),y:At(no),w:At(no),h:At(no)})),Uft=function(r,e,t){return ke(Cl[0],"gx:"+t)};function Dft(r,e,t){var n={node:r},i=t[t.length-1].node,a=UN[i.namespaceURI],o=ho(e,a);Ge(n,DN,qi,o,t,a),a=UN[Cl[0]],o=ho(e,a),Ge(n,DN,Uft,o,t,a)}var Qft=Nt(Te,["scale","heading","Icon","color","hotSpot"]),Hft=Nt(Te,{Icon:At(Dft),color:At(xw),heading:At(no),hotSpot:At(fpt),scale:At(nH)});function Gft(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 c={x:l[0],xunits:Ua.PIXELS,y:o[1]-l[1],yunits:Ua.PIXELS};i.hotSpot=c}}i.Icon=A;var h=e.getScaleArray()[0],f=o;if(f===null&&(f=Vv),f.length==2){var p=n1(f);h=h/p}h!==1&&(i.scale=h);var v=e.getRotation();v!==0&&(i.heading=v);var m=e.getColor();m&&(i.color=m);var g=t[t.length-1].node,_=Qft[g.namespaceURI],E=ho(i,_);Ge(n,Hft,qi,E,t,_)}var kft=Nt(Te,["color","scale"]),$ft=Nt(Te,{color:At(xw),scale:At(nH)});function Vft(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=kft[s.namespaceURI],l=ho(i,A);Ge(n,$ft,qi,l,t,A)}var jft=Nt(Te,["color","width"]),Kft=Nt(Te,{color:At(xw),width:At(no)});function zft(r,e,t){var n={node:r},i={color:e.getColor(),width:Number(e.getWidth())||1},a=t[t.length-1].node,o=jft[a.namespaceURI],s=ho(i,o);Ge(n,Kft,qi,s,t,o)}var Yft={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},J8=function(r,e,t){if(r){var n=e[e.length-1].node;return ke(n.namespaceURI,Yft[r.getType()])}},Xft=Nn("Point"),Wft=Nn("LineString"),qft=Nn("LinearRing"),Zft=Nn("Polygon"),Jft=Nt(Te,{LineString:At(vp),Point:At(vp),Polygon:At(rH),GeometryCollection:At(tH)});function tH(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=J8):i===st.MULTI_POINT?(a=e.getPoints(),o=Xft):i===st.MULTI_LINE_STRING?(a=e.getLineStrings(),o=Wft):i===st.MULTI_POLYGON?(a=e.getPolygons(),o=Zft):_e(!1,39),Ge(n,Jft,o,a,t)}var tpt=Nt(Te,{LinearRing:At(vp)});function QN(r,e,t){var n={node:r};Ge(n,tpt,qft,[e],t)}var WC=Nt(Te,{ExtendedData:At(Pft),MultiGeometry:At(tH),LineString:At(vp),LinearRing:At(vp),Point:At(vp),Polygon:At(rH),Style:At(hpt),address:At(De),description:At(De),name:At(De),open:At(Np),phoneNumber:At(De),styleUrl:At(De),visibility:At(Np)}),ept=Nt(Te,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),rpt=Nn("ExtendedData");function eH(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(L){return!a[L]}),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(L){var O=L.getGeometryFunction()(e);if(O){var b=O.getType();return b===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var I=T.getType();return I===st.POINT||I===st.MULTI_POINT}).length:b===st.POINT||b===st.MULTI_POINT}})),this.writeStyles_){var c=l,h=l;e.getGeometry()&&(c=l.filter(function(L){var O=L.getGeometryFunction()(e);if(O){var b=O.getType();return b===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var I=T.getType();return I===st.LINE_STRING||I===st.MULTI_LINE_STRING}).length:b===st.LINE_STRING||b===st.MULTI_LINE_STRING}}),h=l.filter(function(L){var O=L.getGeometryFunction()(e);if(O){var b=O.getType();return b===st.GEOMETRY_COLLECTION?O.getGeometriesArrayRecursive().filter(function(T){var I=T.getType();return I===st.POLYGON||I===st.MULTI_POLYGON}).length:b===st.POLYGON||b===st.MULTI_POLYGON}})),i.Style={pointStyles:u,lineStyles:c,polyStyles:h}}if(u.length&&i.name===void 0){var f=u[0].getText();f&&(i.name=f.getText())}}}var p=t[t.length-1].node,v=ept[p.namespaceURI],m=ho(i,v);if(Ge(n,WC,qi,m,t,v),o.length>0){var g=ho(i,o),_={names:o,values:g};Ge(n,WC,rpt,[_],t)}var E=t[0],B=e.getGeometry();B&&(B=Ln(B,!0,E)),Ge(n,WC,J8,[B],t)}var npt=Nt(Te,["extrude","tessellate","altitudeMode","coordinates"]),ipt=Nt(Te,{extrude:At(Np),tessellate:At(Np),altitudeMode:At(De),coordinates:At(bft)});function vp(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=npt[o.namespaceURI],A=ho(a,s);Ge(i,ipt,qi,A,t,s)}var apt=Nt(Te,["color","fill","outline"]),HN=Nt(Te,{outerBoundaryIs:At(QN),innerBoundaryIs:At(QN)}),opt=Nn("innerBoundaryIs"),spt=Nn("outerBoundaryIs");function rH(r,e,t){var n=e.getLinearRings(),i=n.shift(),a={node:r};Ge(a,HN,opt,n,t),Ge(a,HN,spt,[i],t)}var Apt=Nt(Te,{color:At(xw),fill:At(Np),outline:At(Np)});function lpt(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=apt[s.namespaceURI],l=ho(o,A);Ge(n,Apt,qi,l,t,A)}function nH(r,e){no(r,Math.round(e*1e6)/1e6)}var upt=Nt(Te,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),cpt=Nt(Te,{IconStyle:At(Gft),LabelStyle:At(Vft),LineStyle:At(zft),PolyStyle:At(lpt)});function hpt(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=upt[A.namespaceURI],u=ho(i,l);Ge(n,cpt,qi,u,t,l)}function fpt(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 ppt=Qht,tL={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */tL.read=function(r,e,t,n,i){var a,o,s=i*8-n-1,A=(1<<s)-1,l=A>>1,u=-7,c=t?i-1:0,h=t?-1:1,f=r[e+c];for(c+=h,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=a*256+r[e+c],c+=h,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=o*256+r[e+c],c+=h,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)};tL.write=function(r,e,t,n,i,a){var o,s,A,l=a*8-i-1,u=(1<<l)-1,c=u>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,p=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+c>=1?e+=h/A:e+=h*Math.pow(2,1-c),e*A>=2&&(o++,A/=2),o+c>=u?(s=0,o=u):o+c>=1?(s=(e*A-1)*Math.pow(2,i),o=o+c):(s=e*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;r[t+f]=s&255,f+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;r[t+f]=o&255,f+=p,o/=256,l-=8);r[t+f-p]|=v*128};var dpt=Pr,Vm=tL;function Pr(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}Pr.Varint=0;Pr.Fixed64=1;Pr.Bytes=2;Pr.Fixed32=5;var Qx=(1<<16)*(1<<16),GN=1/Qx,vpt=12,iH=typeof TextDecoder>"u"?null:new TextDecoder("utf8");Pr.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=jm(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=$N(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=jm(this.buf,this.pos)+jm(this.buf,this.pos+4)*Qx;return this.pos+=8,r},readSFixed64:function(){var r=jm(this.buf,this.pos)+$N(this.buf,this.pos+4)*Qx;return this.pos+=8,r},readFloat:function(){var r=Vm.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=Vm.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,gpt(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>=vpt&&iH?Lpt(this.buf,e,r):Fpt(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!==Pr.Bytes)return r.push(this.readVarint(e));var t=DA(this);for(r=r||[];this.pos<t;)r.push(this.readVarint(e));return r},readPackedSVarint:function(r){if(this.type!==Pr.Bytes)return r.push(this.readSVarint());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readSVarint());return r},readPackedBoolean:function(r){if(this.type!==Pr.Bytes)return r.push(this.readBoolean());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readBoolean());return r},readPackedFloat:function(r){if(this.type!==Pr.Bytes)return r.push(this.readFloat());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readFloat());return r},readPackedDouble:function(r){if(this.type!==Pr.Bytes)return r.push(this.readDouble());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readDouble());return r},readPackedFixed32:function(r){if(this.type!==Pr.Bytes)return r.push(this.readFixed32());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readFixed32());return r},readPackedSFixed32:function(r){if(this.type!==Pr.Bytes)return r.push(this.readSFixed32());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed32());return r},readPackedFixed64:function(r){if(this.type!==Pr.Bytes)return r.push(this.readFixed64());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readFixed64());return r},readPackedSFixed64:function(r){if(this.type!==Pr.Bytes)return r.push(this.readSFixed64());var e=DA(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed64());return r},skip:function(r){var e=r&7;if(e===Pr.Varint)for(;this.buf[this.pos++]>127;);else if(e===Pr.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Pr.Fixed32)this.pos+=4;else if(e===Pr.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),yf(this.buf,r,this.pos),this.pos+=4},writeSFixed32:function(r){this.realloc(4),yf(this.buf,r,this.pos),this.pos+=4},writeFixed64:function(r){this.realloc(8),yf(this.buf,r&-1,this.pos),yf(this.buf,Math.floor(r*GN),this.pos+4),this.pos+=8},writeSFixed64:function(r){this.realloc(8),yf(this.buf,r&-1,this.pos),yf(this.buf,Math.floor(r*GN),this.pos+4),this.pos+=8},writeVarint:function(r){if(r=+r||0,r>268435455||r<0){ypt(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=Opt(this.buf,r,this.pos);var t=this.pos-e;t>=128&&kN(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(r){this.realloc(4),Vm.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),Vm.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&&kN(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeMessage:function(r,e,t){this.writeTag(r,Pr.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,wpt,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,Ept,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,Tpt,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,Cpt,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,Bpt,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,Spt,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,xpt,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,bpt,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,Ipt,e)},writeBytesField:function(r,e){this.writeTag(r,Pr.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,Pr.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,Pr.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,Pr.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,Pr.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,Pr.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,Pr.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,Pr.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,Pr.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,Pr.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};function gpt(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 gf(r,i,e);throw new Error("Expected varint not more than 10 bytes")}function DA(r){return r.type===Pr.Bytes?r.readVarint()+r.pos:r.pos+1}function gf(r,e,t){return t?e*4294967296+(r>>>0):(e>>>0)*4294967296+(r>>>0)}function ypt(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),mpt(t,n,e),_pt(n,e)}function mpt(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 _pt(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 kN(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 wpt(r,e){for(var t=0;t<r.length;t++)e.writeVarint(r[t])}function Ept(r,e){for(var t=0;t<r.length;t++)e.writeSVarint(r[t])}function Cpt(r,e){for(var t=0;t<r.length;t++)e.writeFloat(r[t])}function Bpt(r,e){for(var t=0;t<r.length;t++)e.writeDouble(r[t])}function Tpt(r,e){for(var t=0;t<r.length;t++)e.writeBoolean(r[t])}function Spt(r,e){for(var t=0;t<r.length;t++)e.writeFixed32(r[t])}function xpt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed32(r[t])}function bpt(r,e){for(var t=0;t<r.length;t++)e.writeFixed64(r[t])}function Ipt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed64(r[t])}function jm(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+r[e+3]*16777216}function yf(r,e,t){r[t]=e,r[t+1]=e>>>8,r[t+2]=e>>>16,r[t+3]=e>>>24}function $N(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function Fpt(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 Lpt(r,e,t){return iH.decode(r.subarray(e,t))}function Opt(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 VN=oi(),xg=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?zc(this.flatCoordinates_):Y1(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},r.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var e=Sa(this.getExtent());this.flatInteriorPoints_=nF(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_},r.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var e=NQ(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=pQ(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_},r.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=I_(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=I_(e,t,o,2,.5);Qr(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=Oe(e);var t=e.getExtent(),n=e.getWorldExtent();if(t&&n){var i=Ai(n)/Ai(t);$a(VN,n[0],n[3],i,-i,0,0,0),Tu(this.flatCoordinates_,0,this.flatCoordinates_.length,2,VN,this.flatCoordinates_)}},r.prototype.getEnds=function(){return this.ends_},r}();xg.prototype.getEndss=xg.prototype.getEnds;xg.prototype.getFlatCoordinates=xg.prototype.getOrientedFlatCoordinates;var jN=xg,Rpt=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)}}(),Mpt=function(r){Rpt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=new ml({code:"",units:Qa.TILE_PIXELS}),n.featureClass_=i.featureClass?i.featureClass:jN,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,c=0,h=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&&c>h&&(a.push(c),h=c),i.push(l,u),c+=2):s===7?c>h&&(i.push(i[h],i[h+1]),c+=2):_e(!1,59)}c>h&&(a.push(c),h=c)},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 c=Qpt(a,u.length);if(this.featureClass_===jN)o=new this.featureClass_(c,l,u,s,A),o.transform(i.dataProjection);else{var h=void 0;if(c==st.POLYGON){var f=MW(l,u);h=f.length>1?new ba(l,Wt.XY,f):new bn(l,Wt.XY,u)}else h=c===st.POINT?new fr(l,Wt.XY):c===st.LINE_STRING?new Hr(l,Wt.XY):c===st.POLYGON?new bn(l,Wt.XY,u):c===st.MULTI_POINT?new es(l,Wt.XY):c===st.MULTI_LINE_STRING?new xa(l,Wt.XY,u):null;var p=this.featureClass_;o=new p,this.geometryName_&&o.setGeometryName(this.geometryName_);var v=Ln(h,!1,i);o.setGeometry(v),A!==void 0&&o.setId(A),o.setProperties(s,!0)}return o},e.prototype.getType=function(){return Cs.ARRAY_BUFFER},e.prototype.readFeatures=function(t,n){var i=this.layers_,a=this.adaptOptions(n),o=Oe(a.dataProjection);o.setWorldExtent(a.extent),a.dataProjection=o;var s=new dpt(t),A=s.readFields(Npt,{}),l=[];for(var u in A)if(!(i&&i.indexOf(u)==-1)){var c=A[u],h=c?[0,0,c.extent,c.extent]:null;o.setExtent(h);for(var f=0,p=c.length;f<p;++f){var v=Dpt(s,c,f),m=this.createFeature_(s,v,a);m!==null&&l.push(m)}}return l},e.prototype.readProjection=function(t){return this.dataProjection},e.prototype.setLayers=function(t){this.layers_=t},e}(uy);function Npt(r,e,t){if(r===3){var n={keys:[],values:[],features:[]},i=t.readVarint()+t.pos;t.readFields(Ppt,n,i),n.length=n.features.length,n.length&&(e[n.name]=n)}}function Ppt(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 Upt(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 Dpt(r,e,t){r.pos=e.features[t];var n=r.readVarint()+r.pos,i={layer:e,type:0,properties:{}};return r.readFields(Upt,i,n),i}function Qpt(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 Hpt=Mpt,Gpt=function(){function r(){}return r.prototype.read=function(e){if(e)if(typeof e=="string"){var t=nA(e);return this.readFromDocument(t)}else return rA(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}(),eL=Gpt,kpt="http://www.w3.org/1999/xlink";function Zp(r){return r.getAttributeNS(kpt,"href")}var $pt=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)}}(),yo=[null,"http://www.opengis.net/ows/1.1"],Vpt=Nt(yo,{ServiceIdentification:ot(ddt),ServiceProvider:ot(gdt),OperationsMetadata:ot(fdt)}),jpt=function(r){$pt(e,r);function e(){return r.call(this)||this}return e.prototype.readFromNode=function(t){var n=Gt({},Vpt,t,[]);return n||null},e}(eL),Kpt=Nt(yo,{DeliveryPoint:ot($t),City:ot($t),AdministrativeArea:ot($t),PostalCode:ot($t),Country:ot($t),ElectronicMailAddress:ot($t)}),zpt=Nt(yo,{Value:vn(ydt)}),Ypt=Nt(yo,{AllowedValues:ot(odt)}),Xpt=Nt(yo,{Phone:ot(pdt),Address:ot(adt)}),Wpt=Nt(yo,{HTTP:ot(cdt)}),qpt=Nt(yo,{Get:vn(udt),Post:void 0}),Zpt=Nt(yo,{DCP:ot(ldt)}),Jpt=Nt(yo,{Operation:hdt}),tdt=Nt(yo,{Voice:ot($t),Facsimile:ot($t)}),edt=Nt(yo,{Constraint:vn(sdt)}),rdt=Nt(yo,{IndividualName:ot($t),PositionName:ot($t),ContactInfo:ot(Adt)}),ndt=Nt(yo,{Abstract:ot($t),AccessConstraints:ot($t),Fees:ot($t),Title:ot($t),ServiceTypeVersion:ot($t),ServiceType:ot($t)}),idt=Nt(yo,{ProviderName:ot($t),ProviderSite:ot(Zp),ServiceContact:ot(vdt)});function adt(r,e){return Gt({},Kpt,r,e)}function odt(r,e){return Gt({},zpt,r,e)}function sdt(r,e){var t=r.getAttribute("name");if(t)return Gt({name:t},Ypt,r,e)}function Adt(r,e){return Gt({},Xpt,r,e)}function ldt(r,e){return Gt({},Wpt,r,e)}function udt(r,e){var t=Zp(r);if(t)return Gt({href:t},edt,r,e)}function cdt(r,e){return Gt({},qpt,r,e)}function hdt(r,e){var t=r.getAttribute("name"),n=Gt({},Zpt,r,e);if(n){var i=e[e.length-1];i[t]=n}}function fdt(r,e){return Gt({},Jpt,r,e)}function pdt(r,e){return Gt({},tdt,r,e)}function ddt(r,e){return Gt({},ndt,r,e)}function vdt(r,e){return Gt({},rdt,r,e)}function gdt(r,e){return Gt({},idt,r,e)}function ydt(r,e){return $t(r)}var aH=jpt;function KN(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 mdt=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)}}(),_dt=function(r){mdt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Oe("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 or(i)},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return[i]},e.prototype.readGeometryFromText=function(t,n){var i=YT(this.geometryLayout_),a=Edt(t,i,this.factor_);KN(a,0,a.length,i,a);var o=qA(a,0,a.length,i),s=new Hr(o,this.geometryLayout_);return Ln(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=Ln(t,!0,this.adaptOptions(n));var i=t.getFlatCoordinates(),a=t.getStride();return KN(i,0,i.length,a,i),wdt(i,a,this.factor_)},e}(WF);function wdt(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 Cdt(r,n)}function Edt(r,e,t){var n=t||1e5,i,a=new Array(e);for(i=0;i<e;++i)a[i]=0;for(var o=Bdt(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 Cdt(r,e){for(var t=e||1e5,n=0,i=r.length;n<i;++n)r[n]=Math.round(r[n]*t);return Tdt(r)}function Bdt(r,e){for(var t=e||1e5,n=Sdt(r),i=0,a=n.length;i<a;++i)n[i]/=t;return n}function Tdt(r){for(var e=0,t=r.length;e<t;++e){var n=r[e];r[e]=n<0?~(n<<1):n<<1}return xdt(r)}function Sdt(r){for(var e=bdt(r),t=0,n=e.length;t<n;++t){var i=e[t];e[t]=i&1?~(i>>1):i>>1}return e}function xdt(r){for(var e="",t=0,n=r.length;t<n;++t)e+=Idt(r[t]);return e}function bdt(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 Idt(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 Fdt=_dt,Ldt=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)}}(),Odt=function(r){Ldt(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=Oe(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&&Gdt(A,o,s);var l=[],u=i.objects,c=this.layerName_,h=void 0;for(var f in u)this.layers_&&this.layers_.indexOf(f)==-1||(u[f].type==="GeometryCollection"?(h=u[f],l.push.apply(l,Hdt(h,A,o,s,c,f,n))):(h=u[f],l.push(oH(h,A,o,s,c,f,n))));return l}else return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(GF),Rdt={Point:Mdt,LineString:Pdt,Polygon:Ddt,MultiPoint:Ndt,MultiLineString:Udt,MultiPolygon:Qdt};function bw(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 Mdt(r,e,t){var n=r.coordinates;return e&&t&&rL(n,e,t),new fr(n)}function Ndt(r,e,t){var n=r.coordinates;if(e&&t)for(var i=0,a=n.length;i<a;++i)rL(n[i],e,t);return new es(n)}function Pdt(r,e){var t=bw(r.arcs,e);return new Hr(t)}function Udt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=bw(r.arcs[n],e);return new xa(t)}function Ddt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=bw(r.arcs[n],e);return new bn(t)}function Qdt(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]=bw(a[s],e);t[n]=o}return new ba(t)}function Hdt(r,e,t,n,i,a,o){for(var s=r.geometries,A=[],l=0,u=s.length;l<u;++l)A[l]=oH(s[l],e,t,n,i,a,o);return A}function oH(r,e,t,n,i,a,o){var s=null,A=r.type;if(A){var l=Rdt[A];A==="Point"||A==="MultiPoint"?s=l(r,t,n):s=l(r,e),s=Ln(s,!1,o)}var u=new or({geometry:s});r.id!==void 0&&u.setId(r.id);var c=r.properties;return i&&(c||(c={}),c[i]=a),c&&u.setProperties(c,!0),u}function Gdt(r,e,t){for(var n=0,i=r.length;n<i;++n)kdt(r[n],e,t)}function kdt(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,rL(s,e,t)}}function rL(r,e,t){r[0]=r[0]*e[0]+t[0],r[1]=r[1]*e[1]+t[1]}var $dt=Odt,Vdt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Gr=function(r){Vdt(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}(rr);Gr.prototype.namespace="http://www.opengis.net/gml/3.2";Gr.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:Le(rr.prototype.readFlatPos),posList:Le(rr.prototype.readFlatPosList),coordinates:Le(qp.prototype.readFlatCoordinates)}};Gr.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:rr.prototype.interiorParser,exterior:rr.prototype.exteriorParser}};Gr.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Le(lr.prototype.readPoint),MultiPoint:Le(lr.prototype.readMultiPoint),LineString:Le(lr.prototype.readLineString),MultiLineString:Le(lr.prototype.readMultiLineString),LinearRing:Le(lr.prototype.readLinearRing),Polygon:Le(lr.prototype.readPolygon),MultiPolygon:Le(lr.prototype.readMultiPolygon),Surface:Le(Gr.prototype.readSurface),MultiSurface:Le(rr.prototype.readMultiSurface),Curve:Le(Gr.prototype.readCurve),MultiCurve:Le(rr.prototype.readMultiCurve),Envelope:Le(Gr.prototype.readEnvelope)}};Gr.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:me(rr.prototype.curveMemberParser),curveMembers:me(rr.prototype.curveMemberParser)}};Gr.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:me(rr.prototype.surfaceMemberParser),surfaceMembers:me(rr.prototype.surfaceMemberParser)}};Gr.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:me(lr.prototype.readLineString),Curve:me(rr.prototype.readCurve)}};Gr.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:me(lr.prototype.readPolygon),Surface:me(rr.prototype.readSurface)}};Gr.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:Le(rr.prototype.readPatch)}};Gr.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:Le(rr.prototype.readSegment)}};Gr.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:me(rr.prototype.readFlatPosList),upperCorner:me(rr.prototype.readFlatPosList)}};Gr.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:Le(rr.prototype.readPolygonPatch)}};Gr.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:Le(rr.prototype.readLineStringSegment)}};Gr.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:me(lr.prototype.pointMemberParser),pointMembers:me(lr.prototype.pointMemberParser)}};Gr.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:me(lr.prototype.lineStringMemberParser),lineStringMembers:me(lr.prototype.lineStringMemberParser)}};Gr.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:me(lr.prototype.polygonMemberParser),polygonMembers:me(lr.prototype.polygonMemberParser)}};Gr.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:me(lr.prototype.readFlatCoordinatesFromNode)}};Gr.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:me(lr.prototype.readLineString)}};Gr.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:me(lr.prototype.readPolygon)}};Gr.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:Le(lr.prototype.readFlatLinearRing)}};Gr.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:At(rr.prototype.writeRing),interior:At(rr.prototype.writeRing)}};Gr.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:At(De),upperCorner:At(De)}};Gr.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:At(rr.prototype.writeSurfaceOrPolygonMember),polygonMember:At(rr.prototype.writeSurfaceOrPolygonMember)}};Gr.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:At(rr.prototype.writePointMember)}};Gr.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:At(rr.prototype.writeLineStringOrCurveMember),curveMember:At(rr.prototype.writeLineStringOrCurveMember)}};Gr.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:At(rr.prototype.writeCurveOrLineString),MultiCurve:At(rr.prototype.writeMultiCurveOrLineString),Point:At(Gr.prototype.writePoint),MultiPoint:At(rr.prototype.writeMultiPoint),LineString:At(rr.prototype.writeCurveOrLineString),MultiLineString:At(rr.prototype.writeMultiCurveOrLineString),LinearRing:At(rr.prototype.writeLinearRing),Polygon:At(rr.prototype.writeSurfaceOrPolygon),MultiPolygon:At(rr.prototype.writeMultiSurfaceOrPolygon),Surface:At(rr.prototype.writeSurfaceOrPolygon),MultiSurface:At(rr.prototype.writeMultiSurfaceOrPolygon),Envelope:At(rr.prototype.writeEnvelope)}};var nL=Gr,jdt=function(){function r(e){this.tagName_=e}return r.prototype.getTagName=function(){return this.tagName_},r}(),sH=jdt,Kdt=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)}}(),zdt=function(r){Kdt(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}(sH),Ydt=zdt,Xdt=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)}}(),Wdt=function(r){Xdt(e,r);function e(t){return r.call(this,"And",Array.prototype.slice.call(arguments))||this}return e}(Ydt),qdt=Wdt,Zdt=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)}}(),Jdt=function(r){Zdt(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}(sH),tvt=Jdt;function evt(r){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(qdt,e))}function rvt(r,e,t){return new tvt(r,e,t)}var nvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zN={"http://www.opengis.net/gml":{boundedBy:ot(lr.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:me(lr.prototype.readFeaturesInternal)}},ivt={"http://www.opengis.net/wfs":{totalInserted:ot(ai),totalUpdated:ot(ai),totalDeleted:ot(ai)},"http://www.opengis.net/wfs/2.0":{totalInserted:ot(ai),totalUpdated:ot(ai),totalDeleted:ot(ai)}},avt={"http://www.opengis.net/wfs":{TransactionSummary:ot(XN,"transactionSummary"),InsertResults:ot(qN,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:ot(XN,"transactionSummary"),InsertResults:ot(qN,"insertIds")}},ovt={"http://www.opengis.net/wfs":{PropertyName:At(De)},"http://www.opengis.net/wfs/2.0":{PropertyName:At(De)}},AH={"http://www.opengis.net/wfs":{Insert:At(ZN),Update:At(tP),Delete:At(JN),Property:At(eP),Native:At(rP)},"http://www.opengis.net/wfs/2.0":{Insert:At(ZN),Update:At(tP),Delete:At(JN),Property:At(eP),Native:At(rP)}},lH="feature",iL="http://www.w3.org/2000/xmlns/",aL={"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"},Hx={"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"},oL={"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"},YN={"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"},sL={"2.0.0":nL,"1.1.0":rr,"1.0.0":qp},svt="1.1.0",Avt=function(r){nvt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.version_=i.version?i.version:svt,n.featureType_=i.featureType,n.featureNS_=i.featureNS,n.gmlFormat_=i.gmlFormat?i.gmlFormat:new sL[n.version_],n.schemaLocation_=i.schemaLocation?i.schemaLocation:YN[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=zN: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=nA(t);return this.readTransactionResponseFromDocument(n)}else return rA(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t);else return},e.prototype.readFeatureCollectionMetadata=function(t){if(t)if(typeof t=="string"){var n=nA(t);return this.readFeatureCollectionMetadataFromDocument(n)}else return rA(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=ZA(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,Gt(n,zN,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({},avt,t,[])},e.prototype.writeGetFeature=function(t){var n=this,i=ke(Hx[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(yh,"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}),hP(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}),hP(i,[s.name],[a])});return i},e.prototype.combineBboxAndFilter=function(t,n,i,a){var o=rvt(t,n,i);return a?evt(a,o):o},e.prototype.writeTransaction=function(t,n,i,a){var o=[],s=a.version?a.version:this.version_,A=ke(Hx[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(yh,"xsi:schemaLocation",YN[s]);var u=lvt(A,l,s,a);return t&&Km("Insert",t,o,u),n&&Km("Update",n,o,u),i&&Km("Delete",i,o,u),a.nativeElements&&Km("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),Oe(i.pop().srsName)}}return null},e}(hy);function lvt(r,e,t,n){var i=n.featurePrefix?n.featurePrefix:lH,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 Km(r,e,t,n){Ge(n,AH,Nn(r),e,t)}function XN(r,e){return Gt({},ivt,r,e)}var uvt={"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 WN(r,e){Ao(uvt,r,e)}var cvt={"http://www.opengis.net/wfs":{Feature:WN},"http://www.opengis.net/wfs/2.0":{Feature:WN}};function qN(r,e){return Gt([],cvt,r,e)}function ZN(r,e,t){var n=t[t.length-1],i=n.featureType,a=n.featureNS,o=n.gmlVersion,s=ke(a,i);r.appendChild(s),o===2?qp.prototype.writeFeatureElement(s,e,t):o===3?rr.prototype.writeFeatureElement(s,e,t):nL.prototype.writeFeatureElement(s,e,t)}function uH(r,e,t){var n=t[t.length-1],i=n.version,a=aL[i],o=ke(a,"Filter"),s=ke(a,"FeatureId");o.appendChild(s),s.setAttribute("fid",e),r.appendChild(o)}function AL(r,e){r=r||lH;var t=r+":";return e.indexOf(t)===0?e:t+e}function JN(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=AL(a,i);r.setAttribute("typeName",s),r.setAttributeNS(iL,"xmlns:"+a,o);var A=e.getId();A!==void 0&&uH(r,A,t)}function tP(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=AL(o,a),l=e.getGeometryName();r.setAttribute("typeName",A),r.setAttributeNS(iL,"xmlns:"+o,s);var u=e.getId();if(u!==void 0){for(var c=e.getKeys(),h=[],f=0,p=c.length;f<p;f++){var v=e.get(c[f]);if(v!==void 0){var m=c[f];v&&typeof v.getSimplifiedGeometry=="function"&&(m=l),h.push({name:m,value:v})}}Ge({version:i,gmlVersion:n.gmlVersion,node:r,hasZ:n.hasZ,srsName:n.srsName},AH,Nn("Property"),h,t),uH(r,u,t)}}function eP(r,e,t){var n=t[t.length-1],i=n.version,a=Hx[i],o=ke(a,"Name"),s=n.gmlVersion;if(r.appendChild(o),De(o,e.name),e.value!==void 0&&e.value!==null){var A=ke(a,"Value");r.appendChild(A),e.value&&typeof e.value.getSimplifiedGeometry=="function"?s===2?qp.prototype.writeGeometryElement(A,e.value,t):s===3?rr.prototype.writeGeometryElement(A,e.value,t):nL.prototype.writeGeometryElement(A,e.value,t):De(A,e.value)}}function rP(r,e,t){e.vendorId&&r.setAttribute("vendorId",e.vendorId),e.safeToIgnore!==void 0&&r.setAttribute("safeToIgnore",String(e.safeToIgnore)),e.value!==void 0&&De(r,e.value)}var Iw={"http://www.opengis.net/wfs":{Query:At(nP)},"http://www.opengis.net/wfs/2.0":{Query:At(nP)},"http://www.opengis.net/ogc":{During:At(oP),And:At(zm),Or:At(zm),Not:At(sP),BBOX:At(iP),Contains:At(ru),Intersects:At(ru),Within:At(ru),DWithin:At(aP),PropertyIsEqualTo:At(jo),PropertyIsNotEqualTo:At(jo),PropertyIsLessThan:At(jo),PropertyIsLessThanOrEqualTo:At(jo),PropertyIsGreaterThan:At(jo),PropertyIsGreaterThanOrEqualTo:At(jo),PropertyIsNull:At(AP),PropertyIsBetween:At(lP),PropertyIsLike:At(uP)},"http://www.opengis.net/fes/2.0":{During:At(oP),And:At(zm),Or:At(zm),Not:At(sP),BBOX:At(iP),Contains:At(ru),Disjoint:At(ru),Intersects:At(ru),ResourceId:At(fvt),Within:At(ru),DWithin:At(aP),PropertyIsEqualTo:At(jo),PropertyIsNotEqualTo:At(jo),PropertyIsLessThan:At(jo),PropertyIsLessThanOrEqualTo:At(jo),PropertyIsGreaterThan:At(jo),PropertyIsGreaterThanOrEqualTo:At(jo),PropertyIsNull:At(AP),PropertyIsBetween:At(lP),PropertyIsLike:At(uP)}};function nP(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=AL(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(iL,"xmlns:"+a,o);var c=de({},n);c.node=r,Ge(c,ovt,Nn("PropertyName"),s,t);var h=n.filter;if(h){var f=ke(Fw(i),"Filter");r.appendChild(f),hvt(f,h,t)}}function hvt(r,e,t){var n=t[t.length-1],i={node:r};de(i,{context:n}),Ge(i,Iw,Nn(e.getTagName()),[e],t)}function iP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=sL[a];Jp(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.extent,t)}function fvt(r,e,t){r.setAttribute("rid",e.rid)}function ru(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=sL[a];Jp(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.geometry,t)}function aP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;ru(r,e,t);var o=ke(Fw(a),"Distance");De(o,e.distance.toString()),a==="2.0.0"?o.setAttribute("uom",e.unit):o.setAttribute("units",e.unit),r.appendChild(o)}function oP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;i1(oL[a],"ValueReference",r,e.propertyName);var o=ke(nl,"TimePeriod");r.appendChild(o);var s=ke(nl,"begin");o.appendChild(s),cP(s,e.begin);var A=ke(nl,"end");o.appendChild(A),cP(A,e.end)}function zm(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];Ge(a,Iw,Nn(l.getTagName()),[l],t)}}function sP(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};de(a,{context:i});var o=e.condition;Ge(a,Iw,Nn(o.getTagName()),[o],t)}function jo(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()),Jp(a,r,e.propertyName),a1(a,r,""+e.expression)}function AP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;Jp(a,r,e.propertyName)}function lP(r,e,t){var n=t[t.length-1],i=n.context,a=i.version,o=Fw(a);Jp(a,r,e.propertyName);var s=ke(o,"LowerBoundary");r.appendChild(s),a1(a,s,""+e.lowerBoundary);var A=ke(o,"UpperBoundary");r.appendChild(A),a1(a,A,""+e.upperBoundary)}function uP(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()),Jp(a,r,e.propertyName),a1(a,r,""+e.pattern)}function i1(r,e,t,n){var i=ke(r,e);De(i,n),t.appendChild(i)}function a1(r,e,t){i1(Fw(r),"Literal",e,t)}function Jp(r,e,t){r==="2.0.0"?i1(oL[r],"ValueReference",e,t):i1(aL[r],"PropertyName",e,t)}function cP(r,e){var t=ke(nl,"TimeInstant");r.appendChild(t);var n=ke(nl,"timePosition");t.appendChild(n),De(n,e)}function hP(r,e,t){var n=t[t.length-1],i=de({},n);i.node=r,Ge(i,Iw,Nn("Query"),e,t)}function Fw(r){var e;return r==="2.0.0"?e=oL[r]:e=aL[r],e}var pvt=Avt,dvt=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},fP=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(""),c=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(c&&this.srid_!==c)throw new Error("Inconsistent coordinate system (SRID)")}else this.isLittleEndian_=n,this.hasZ_=o,this.hasM_=s,this.layout_=u,this.srid_=c,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 fr(t,this.layout_);case Kr.LINE_STRING:return new Hr(t,this.layout_);case Kr.POLYGON:case Kr.TRIANGLE:return new bn(t,this.layout_);case Kr.MULTI_POINT:return new es(t,this.layout_);case Kr.MULTI_LINE_STRING:return new xa(t,this.layout_);case Kr.MULTI_POLYGON:case Kr.POLYHEDRAL_SURFACE:case Kr.TIN:return new ba(t,this.layout_);case Kr.GEOMETRY_COLLECTION:return new sa(t);default:return null}},r.prototype.getSrid=function(){return this.srid_},r}(),vvt=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 Is)return n(e.getLayout(),t);if(e instanceof sa)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 Is){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 sa&&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}(),gvt=function(r){dvt(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_?Cs.TEXT:Cs.ARRAY_BUFFER},e.prototype.readFeature=function(t,n){return new or({geometry:this.readGeometry(t,n)})},e.prototype.readFeatures=function(t,n){var i=[],a=this.readGeometry(t,n);return this.splitCollection&&a instanceof sa?i=a.getGeometriesArray():i=[a],i.map(function(o){return new or({geometry:o})})},e.prototype.readGeometry=function(t,n){var i=pP(t);if(!i)return null;var a=new fP(i),o=a.readGeometry();this.viewCache_=i;var s=this.getReadOptions(t,n);return this.viewCache_=null,Ln(o,!1,s)},e.prototype.readProjection=function(t){var n=this.viewCache_||pP(t);if(n){var i=new fP(n);return i.readWkbHeader(),i.getSrid()&&Oe("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 sa(t.map(function(i){return i.getGeometry()})),n)},e.prototype.writeGeometry=function(t,n){var i=this.adaptOptions(n),a=new vvt({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&&Oe(i.dataProjection);if(s){var A=s.getCode();A.indexOf("EPSG:")===0&&(o=Number(A.substring(5)))}}a.writeGeometry(Ln(t,!0,i),o);var l=a.getBuffer();return this.hex_?yvt(l):l},e}(uy);function yvt(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 mvt(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 pP(r){return typeof r=="string"?mvt(r):ArrayBuffer.isView(r)?r instanceof DataView?r:new DataView(r.buffer,r.byteOffset,r.byteLength):r instanceof ArrayBuffer?new DataView(r):null}var _vt=gvt,wvt=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)}}(),Evt={POINT:fr,LINESTRING:Hr,POLYGON:bn,MULTIPOINT:es,MULTILINESTRING:xa,MULTIPOLYGON:ba},cH="EMPTY",hH="Z",fH="M",Cvt="ZM",Ur={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6};for(var Bvt in st)st[Bvt].toUpperCase();var Tvt=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=Ur.LEFT_PAREN;else if(e==",")i=Ur.COMMA;else if(e==")")i=Ur.RIGHT_PAREN;else if(this.isNumeric_(e)||e=="-")i=Ur.NUMBER,n=this.readNumber_();else if(this.isAlpha_(e))i=Ur.TEXT,n=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(e==="")i=Ur.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}(),Svt=function(){function r(e){this.lexer_=e,this.token_={position:0,type:Ur.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(Ur.TEXT)){var n=t.value;n===hH?e=Wt.XYZ:n===fH?e=Wt.XYM:n===Cvt&&(e=Wt.XYZM),e!==Wt.XY&&this.consume_()}return e},r.prototype.parseGeometryCollectionText_=function(){if(this.match(Ur.LEFT_PAREN)){var e=[];do e.push(this.parseGeometry_());while(this.match(Ur.COMMA));if(this.match(Ur.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePointText_=function(){if(this.match(Ur.LEFT_PAREN)){var e=this.parsePoint_();if(this.match(Ur.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseLineStringText_=function(){if(this.match(Ur.LEFT_PAREN)){var e=this.parsePointList_();if(this.match(Ur.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePolygonText_=function(){if(this.match(Ur.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Ur.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPointText_=function(){if(this.match(Ur.LEFT_PAREN)){var e=void 0;if(this.token_.type==Ur.LEFT_PAREN?e=this.parsePointTextList_():e=this.parsePointList_(),this.match(Ur.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiLineStringText_=function(){if(this.match(Ur.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Ur.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPolygonText_=function(){if(this.match(Ur.LEFT_PAREN)){var e=this.parsePolygonTextList_();if(this.match(Ur.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(Ur.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(Ur.COMMA);)e.push(this.parsePoint_());return e},r.prototype.parsePointTextList_=function(){for(var e=[this.parsePointText_()];this.match(Ur.COMMA);)e.push(this.parsePointText_());return e},r.prototype.parseLineStringTextList_=function(){for(var e=[this.parseLineStringText_()];this.match(Ur.COMMA);)e.push(this.parseLineStringText_());return e},r.prototype.parsePolygonTextList_=function(){for(var e=[this.parsePolygonText_()];this.match(Ur.COMMA);)e.push(this.parsePolygonText_());return e},r.prototype.isEmptyGeometry_=function(){var e=this.isTokenType(Ur.TEXT)&&this.token_.value==cH;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(Ur.TEXT)){var t=e.value;this.layout_=this.parseGeometryLayout_();var n=this.isEmptyGeometry_();if(t=="GEOMETRYCOLLECTION"){if(n)return new sa([]);var i=this.parseGeometryCollectionText_();return new sa(i)}else{var a=Evt[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}(),xvt=function(r){wvt(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 Tvt(t),i=new Svt(n);return i.parse()},e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n),a=new or;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 or;l.setGeometry(i[s]),o.push(l)}return o},e.prototype.readGeometryFromText=function(t,n){var i=this.parse_(t);return Ln(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 sa(i);return this.writeGeometryText(s,n)},e.prototype.writeGeometryText=function(t,n){return vH(Ln(t,!0,n))},e}(WF);function pH(r){var e=r.getCoordinates();return e.length===0?"":e.join(" ")}function bvt(r){for(var e=[],t=r.getPoints(),n=0,i=t.length;n<i;++n)e.push("("+pH(t[n])+")");return e.join(",")}function Ivt(r){for(var e=[],t=r.getGeometries(),n=0,i=t.length;n<i;++n)e.push(vH(t[n]));return e.join(",")}function lL(r){for(var e=r.getCoordinates(),t=[],n=0,i=e.length;n<i;++n)t.push(e[n].join(" "));return t.join(",")}function Fvt(r){for(var e=[],t=r.getLineStrings(),n=0,i=t.length;n<i;++n)e.push("("+lL(t[n])+")");return e.join(",")}function dH(r){for(var e=[],t=r.getLinearRings(),n=0,i=t.length;n<i;++n)e.push("("+lL(t[n])+")");return e.join(",")}function Lvt(r){for(var e=[],t=r.getPolygons(),n=0,i=t.length;n<i;++n)e.push("("+dH(t[n])+")");return e.join(",")}function Ovt(r){var e=r.getLayout(),t="";return(e===Wt.XYZ||e===Wt.XYZM)&&(t+=hH),(e===Wt.XYM||e===Wt.XYZM)&&(t+=fH),t}var Rvt={Point:pH,LineString:lL,Polygon:dH,MultiPoint:bvt,MultiLineString:Fvt,MultiPolygon:Lvt,GeometryCollection:Ivt};function vH(r){var e=r.getType(),t=Rvt[e],n=t(r);if(e=e.toUpperCase(),typeof r.getFlatCoordinates=="function"){var i=Ovt(r);i.length>0&&(e+=" "+i)}return n.length===0?e+" "+cH:e+"("+n+")"}var Mvt=xvt,Nvt=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)}}(),ua=[null,"http://www.opengis.net/wms"],Pvt=Nt(ua,{Service:ot(ngt),Capability:ot(rgt)}),Uvt=Nt(ua,{Request:ot(ugt),Exception:ot(sgt),Layer:ot(Agt)}),Dvt=function(r){Nvt(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},Pvt,t,[]);return n||null},e}(eL),Qvt=Nt(ua,{Name:ot($t),Title:ot($t),Abstract:ot($t),KeywordList:ot(_H),OnlineResource:ot(Zp),ContactInformation:ot(igt),Fees:ot($t),AccessConstraints:ot($t),LayerLimit:ot(ai),MaxWidth:ot(ai),MaxHeight:ot(ai)}),Hvt=Nt(ua,{ContactPersonPrimary:ot(agt),ContactPosition:ot($t),ContactAddress:ot(ogt),ContactVoiceTelephone:ot($t),ContactFacsimileTelephone:ot($t),ContactElectronicMailAddress:ot($t)}),Gvt=Nt(ua,{ContactPerson:ot($t),ContactOrganization:ot($t)}),kvt=Nt(ua,{AddressType:ot($t),Address:ot($t),City:ot($t),StateOrProvince:ot($t),PostCode:ot($t),Country:ot($t)}),$vt=Nt(ua,{Format:me($t)}),gH=Nt(ua,{Name:ot($t),Title:ot($t),Abstract:ot($t),KeywordList:ot(_H),CRS:vn($t),EX_GeographicBoundingBox:ot(egt),BoundingBox:vn(tgt),Dimension:vn(lgt),Attribution:ot(Jvt),AuthorityURL:vn(fgt),Identifier:vn($t),MetadataURL:vn(pgt),DataURL:vn(cl),FeatureListURL:vn(cl),Style:vn(dgt),MinScaleDenominator:ot(Ir),MaxScaleDenominator:ot(Ir),Layer:vn(yH)}),Vvt=Nt(ua,{Title:ot($t),OnlineResource:ot(Zp),LogoURL:ot(mH)}),jvt=Nt(ua,{westBoundLongitude:ot(Ir),eastBoundLongitude:ot(Ir),southBoundLatitude:ot(Ir),northBoundLatitude:ot(Ir)}),Kvt=Nt(ua,{GetCapabilities:ot(qC),GetMap:ot(qC),GetFeatureInfo:ot(qC)}),zvt=Nt(ua,{Format:vn($t),DCPType:vn(cgt)}),Yvt=Nt(ua,{HTTP:ot(hgt)}),Xvt=Nt(ua,{Get:ot(cl),Post:ot(cl)}),Wvt=Nt(ua,{Name:ot($t),Title:ot($t),Abstract:ot($t),LegendURL:vn(mH),StyleSheetURL:ot(cl),StyleURL:ot(cl)}),qvt=Nt(ua,{Format:ot($t),OnlineResource:ot(Zp)}),Zvt=Nt(ua,{Keyword:me($t)});function Jvt(r,e){return Gt({},Vvt,r,e)}function tgt(r,e){var t=[XA(r.getAttribute("minx")),XA(r.getAttribute("miny")),XA(r.getAttribute("maxx")),XA(r.getAttribute("maxy"))],n=[XA(r.getAttribute("resx")),XA(r.getAttribute("resy"))];return{crs:r.getAttribute("CRS"),extent:t,res:n}}function egt(r,e){var t=Gt({},jvt,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 rgt(r,e){return Gt({},Uvt,r,e)}function ngt(r,e){return Gt({},Qvt,r,e)}function igt(r,e){return Gt({},Hvt,r,e)}function agt(r,e){return Gt({},Gvt,r,e)}function ogt(r,e){return Gt({},kvt,r,e)}function sgt(r,e){return Gt([],$vt,r,e)}function Agt(r,e){var t=Gt({},gH,r,e);return t.Layer===void 0?Object.assign(t,yH(r,e)):t}function yH(r,e){var t=e[e.length-1],n=Gt({},gH,r,e);if(n){var i=Jc(r.getAttribute("queryable"));i===void 0&&(i=t.queryable),n.queryable=i!==void 0?i:!1;var a=ZA(r.getAttribute("cascaded"));a===void 0&&(a=t.cascaded),n.cascaded=a;var o=Jc(r.getAttribute("opaque"));o===void 0&&(o=t.opaque),n.opaque=o!==void 0?o:!1;var s=Jc(r.getAttribute("noSubsets"));s===void 0&&(s=t.noSubsets),n.noSubsets=s!==void 0?s:!1;var A=XA(r.getAttribute("fixedWidth"));A||(A=t.fixedWidth),n.fixedWidth=A;var l=XA(r.getAttribute("fixedHeight"));l||(l=t.fixedHeight),n.fixedHeight=l;var u=["Style","CRS","AuthorityURL"];u.forEach(function(h){if(h in t){var f=n[h]||[];n[h]=f.concat(t[h])}});var c=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];return c.forEach(function(h){if(!(h in n)){var f=t[h];n[h]=f}}),n}}function lgt(r,e){var t={name:r.getAttribute("name"),units:r.getAttribute("units"),unitSymbol:r.getAttribute("unitSymbol"),default:r.getAttribute("default"),multipleValues:Jc(r.getAttribute("multipleValues")),nearestValue:Jc(r.getAttribute("nearestValue")),current:Jc(r.getAttribute("current")),values:$t(r)};return t}function cl(r,e){return Gt({},qvt,r,e)}function ugt(r,e){return Gt({},Kvt,r,e)}function cgt(r,e){return Gt({},Yvt,r,e)}function hgt(r,e){return Gt({},Xvt,r,e)}function qC(r,e){return Gt({},zvt,r,e)}function mH(r,e){var t=cl(r,e);if(t){var n=[ZA(r.getAttribute("width")),ZA(r.getAttribute("height"))];return t.size=n,t}}function fgt(r,e){var t=cl(r,e);if(t)return t.name=r.getAttribute("name"),t}function pgt(r,e){var t=cl(r,e);if(t)return t.type=r.getAttribute("type"),t}function dgt(r,e){return Gt({},Wvt,r,e)}function _H(r,e){return Gt([],Zvt,r,e)}var vgt=Dvt,ggt=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)}}(),ygt="_feature",mgt="_layer",_gt=function(r){ggt(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 qp,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],c=mgt,h=l.localName.replace(c,"");if(!(this.layers_&&!yi(this.layers_,h))){var f=h+ygt;u.featureType=f,u.featureNS=this.featureNS_;var p={};p[f]=me(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var v=Nt([u.featureNS,null],p);l.setAttribute("namespaceURI",this.featureNS_);var m=Gt([],v,l,n,this.gmlFormat_);m&&Qr(a,m)}}}if(i=="FeatureCollection"){var g=Gt([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);g&&(a=g)}return a},e.prototype.readFeaturesFromNode=function(t,n){var i={};return n&&de(i,this.getReadOptions(t,n)),this.readFeatures_(t,[i])},e}(hy),wgt=_gt,Egt=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)}}(),pA=[null,"http://www.opengis.net/wmts/1.0"],td=[null,"http://www.opengis.net/ows/1.1"],Cgt=Nt(pA,{Contents:ot(Ngt)}),Bgt=function(r){Egt(e,r);function e(){var t=r.call(this)||this;return t.owsParser_=new aH,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,Cgt,t,[]),i||null):null},e}(eL),Tgt=Nt(pA,{Layer:vn(Pgt),TileMatrixSet:vn(Ugt)}),Sgt=Nt(pA,{Style:vn(Dgt),Format:vn($t),TileMatrixSetLink:vn(Qgt),Dimension:vn(Hgt),ResourceURL:vn(Ggt)},Nt(td,{Title:ot($t),Abstract:ot($t),WGS84BoundingBox:ot(wH),Identifier:ot($t)})),xgt=Nt(pA,{LegendURL:vn(kgt)},Nt(td,{Title:ot($t),Identifier:ot($t)})),bgt=Nt(pA,{TileMatrixSet:ot($t),TileMatrixSetLimits:ot(Vgt)}),Igt=Nt(pA,{TileMatrixLimits:me(jgt)}),Fgt=Nt(pA,{TileMatrix:ot($t),MinTileRow:ot(ai),MaxTileRow:ot(ai),MinTileCol:ot(ai),MaxTileCol:ot(ai)}),Lgt=Nt(pA,{Default:ot($t),Value:vn($t)},Nt(td,{Identifier:ot($t)})),Ogt=Nt(td,{LowerCorner:me(Gx),UpperCorner:me(Gx)}),Rgt=Nt(pA,{WellKnownScaleSet:ot($t),TileMatrix:vn($gt)},Nt(td,{SupportedCRS:ot($t),Identifier:ot($t),BoundingBox:ot(wH)})),Mgt=Nt(pA,{TopLeftCorner:ot(Gx),ScaleDenominator:ot(Ir),TileWidth:ot(ai),TileHeight:ot(ai),MatrixWidth:ot(ai),MatrixHeight:ot(ai)},Nt(td,{Identifier:ot($t)}));function Ngt(r,e){return Gt({},Tgt,r,e)}function Pgt(r,e){return Gt({},Sgt,r,e)}function Ugt(r,e){return Gt({},Rgt,r,e)}function Dgt(r,e){var t=Gt({},xgt,r,e);if(t){var n=r.getAttribute("isDefault")==="true";return t.isDefault=n,t}}function Qgt(r,e){return Gt({},bgt,r,e)}function Hgt(r,e){return Gt({},Lgt,r,e)}function Ggt(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 wH(r,e){var t=Gt([],Ogt,r,e);if(t.length==2)return Yi(t)}function kgt(r,e){var t={};return t.format=r.getAttribute("format"),t.href=Zp(r),t}function Gx(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 $gt(r,e){return Gt({},Mgt,r,e)}function Vgt(r,e){return Gt([],Igt,r,e)}function jgt(r,e){return Gt({},Fgt,r,e)}var Kgt=Bgt,zgt=Object.freeze(Object.defineProperty({__proto__:null,EsriJSON:Act,GeoJSON:Tct,GML:Hct,GPX:_ht,IGC:Iht,IIIFInfo:bot,KML:ppt,MVT:Hpt,OWS:aH,Polyline:Fdt,TopoJSON:$dt,WFS:pvt,WKB:_vt,WKT:Mvt,WMSCapabilities:vgt,WMSGetFeatureInfo:wgt,WMTSCapabilities:Kgt},Symbol.toStringTag,{value:"Module"}));function kx(r){if(kx.installed){console.error("OPENLAYERS MAP ALREADY INSTALLED");return}kx.installed=!0,r.use(Eit),r.use(gst),r.use(Dst),r.use(Rlt),r.use(Klt),r.use(sut),r.use(Eut),r.use(Hut),r.provide("ol-feature",or),r.provide("ol-geom",$ut),r.provide("ol-animations",AW),r.provide("ol-format",zgt),r.provide("ol-loadingstrategy",AJ),r.provide("ol-selectconditions",Gq),r.provide("ol-extent",UY)}/*!
* 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 $x=function(r,e){return $x=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])},$x(r,e)};function Us(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");$x(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Vx=function(){return Vx=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},Vx.apply(this,arguments)};function Ma(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(c){o(c)}}function A(u){try{l(n.throw(u))}catch(c){o(c)}}function l(u){u.done?a(u.value):i(u.value).then(s,A)}l((n=n.apply(r,e||[])).next())})}function ya(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 Ym(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 hl=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}(),Lw=function(r,e){return hl.fromClientRect(r,e.getBoundingClientRect())},Ygt=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 hl(0,0,n,i)},Ow=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},ti=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},dP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xgt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Xm=0;Xm<dP.length;Xm++)Xgt[dP.charCodeAt(Xm)]=Xm;var vP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Wm=0;Wm<vP.length;Wm++)mv[vP.charCodeAt(Wm)]=Wm;var Wgt=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=mv[r.charCodeAt(n)],o=mv[r.charCodeAt(n+1)],s=mv[r.charCodeAt(n+2)],A=mv[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},qgt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},Zgt=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},th=5,uL=6+5,ZC=2,Jgt=uL-th,EH=65536>>th,tyt=1<<th,JC=tyt-1,eyt=1024>>th,ryt=EH+eyt,nyt=ryt,iyt=32,ayt=nyt+iyt,oyt=65536>>uL,syt=1<<Jgt,Ayt=syt-1,gP=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},lyt=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},uyt=function(r,e){var t=Wgt(r),n=Array.isArray(t)?Zgt(t):new Uint32Array(t),i=Array.isArray(t)?qgt(t):new Uint16Array(t),a=24,o=gP(i,a/2,n[4]/2),s=n[5]===2?gP(i,(a+n[4])/2):lyt(n,Math.ceil((a+n[4])/4));return new cyt(n[0],n[1],n[2],n[3],o,s)},cyt=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>>th],t=(t<<ZC)+(e&JC),this.data[t];if(e<=65535)return t=this.index[EH+(e-55296>>th)],t=(t<<ZC)+(e&JC),this.data[t];if(e<this.highStart)return t=ayt-oyt+(e>>uL),t=this.index[t],t+=e>>th&Ayt,t=this.index[t],t=(t<<ZC)+(e&JC),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),yP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hyt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var qm=0;qm<yP.length;qm++)hyt[yP.charCodeAt(qm)]=qm;var fyt="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==",mP=50,pyt=1,CH=2,BH=3,dyt=4,vyt=5,_P=7,TH=8,wP=9,vu=10,jx=11,EP=12,Kx=13,gyt=14,_v=15,zx=16,Zm=17,Wd=18,yyt=19,CP=20,Yx=21,qd=22,tB=23,mf=24,To=25,wv=26,Ev=27,_f=28,myt=29,Rc=30,_yt=31,Jm=32,t0=33,Xx=34,Wx=35,qx=36,bg=37,Zx=38,X0=39,W0=40,eB=41,SH=42,wyt=43,Eyt=[9001,65288],xH="!",yr="×",e0="÷",Jx=uyt(fyt),QA=[Rc,qx],tb=[pyt,CH,BH,vyt],bH=[vu,TH],BP=[Ev,wv],Cyt=tb.concat(bH),TP=[Zx,X0,W0,Xx,Wx],Byt=[_v,Kx],Tyt=function(r,e){e===void 0&&(e="strict");var t=[],n=[],i=[];return r.forEach(function(a,o){var s=Jx.get(a);if(s>mP?(i.push(!0),s-=mP):i.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(a)!==-1)return n.push(o),t.push(zx);if(s===dyt||s===jx){if(o===0)return n.push(o),t.push(Rc);var A=t[o-1];return Cyt.indexOf(A)===-1?(n.push(n[o-1]),t.push(A)):(n.push(o),t.push(Rc))}if(n.push(o),s===_yt)return t.push(e==="strict"?Yx:bg);if(s===SH||s===myt)return t.push(Rc);if(s===wyt)return a>=131072&&a<=196605||a>=196608&&a<=262141?t.push(bg):t.push(Rc);t.push(s)}),[n,t,i]},rB=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!==vu)break}if(i===vu)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!==vu)break}if(s!==vu)break}return!1},SP=function(r,e){for(var t=r;t>=0;){var n=e[t];if(n===vu)t--;else return n}return 0},Syt=function(r,e,t,n,i){if(t[n]===0)return yr;var a=n-1;if(Array.isArray(i)&&i[a]===!0)return yr;var o=a-1,s=a+1,A=e[a],l=o>=0?e[o]:0,u=e[s];if(A===CH&&u===BH)return yr;if(tb.indexOf(A)!==-1)return xH;if(tb.indexOf(u)!==-1||bH.indexOf(u)!==-1)return yr;if(SP(a,e)===TH)return e0;if(Jx.get(r[a])===jx||(A===Jm||A===t0)&&Jx.get(r[s])===jx||A===_P||u===_P||A===wP||[vu,Kx,_v].indexOf(A)===-1&&u===wP||[Zm,Wd,yyt,mf,_f].indexOf(u)!==-1||SP(a,e)===qd||rB(tB,qd,a,e)||rB([Zm,Wd],Yx,a,e)||rB(EP,EP,a,e))return yr;if(A===vu)return e0;if(A===tB||u===tB)return yr;if(u===zx||A===zx)return e0;if([Kx,_v,Yx].indexOf(u)!==-1||A===gyt||l===qx&&Byt.indexOf(A)!==-1||A===_f&&u===qx||u===CP||QA.indexOf(u)!==-1&&A===To||QA.indexOf(A)!==-1&&u===To||A===Ev&&[bg,Jm,t0].indexOf(u)!==-1||[bg,Jm,t0].indexOf(A)!==-1&&u===wv||QA.indexOf(A)!==-1&&BP.indexOf(u)!==-1||BP.indexOf(A)!==-1&&QA.indexOf(u)!==-1||[Ev,wv].indexOf(A)!==-1&&(u===To||[qd,_v].indexOf(u)!==-1&&e[s+1]===To)||[qd,_v].indexOf(A)!==-1&&u===To||A===To&&[To,_f,mf].indexOf(u)!==-1)return yr;if([To,_f,mf,Zm,Wd].indexOf(u)!==-1)for(var c=a;c>=0;){var h=e[c];if(h===To)return yr;if([_f,mf].indexOf(h)!==-1)c--;else break}if([Ev,wv].indexOf(u)!==-1)for(var c=[Zm,Wd].indexOf(A)!==-1?o:a;c>=0;){var h=e[c];if(h===To)return yr;if([_f,mf].indexOf(h)!==-1)c--;else break}if(Zx===A&&[Zx,X0,Xx,Wx].indexOf(u)!==-1||[X0,Xx].indexOf(A)!==-1&&[X0,W0].indexOf(u)!==-1||[W0,Wx].indexOf(A)!==-1&&u===W0||TP.indexOf(A)!==-1&&[CP,wv].indexOf(u)!==-1||TP.indexOf(u)!==-1&&A===Ev||QA.indexOf(A)!==-1&&QA.indexOf(u)!==-1||A===mf&&QA.indexOf(u)!==-1||QA.concat(To).indexOf(A)!==-1&&u===qd&&Eyt.indexOf(r[s])===-1||QA.concat(To).indexOf(u)!==-1&&A===Wd)return yr;if(A===eB&&u===eB){for(var f=t[a],p=1;f>0&&(f--,e[f]===eB);)p++;if(p%2!==0)return yr}return A===Jm&&u===t0?yr:e0},xyt=function(r,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=Tyt(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[To,Rc,SH].indexOf(s)!==-1?bg: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]},byt=function(){function r(e,t,n,i){this.codePoints=e,this.required=t===xH,this.start=n,this.end=i}return r.prototype.slice=function(){return ti.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),Iyt=function(r,e){var t=Ow(r),n=xyt(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=yr;l<s&&(u=Syt(t,a,i,++l,o))===yr;);if(u!==yr||l===s){var c=new byt(t,u,A,l);return A=l,{value:c,done:!1}}return{done:!0,value:null}}}},Fyt=1<<0,Lyt=1<<1,fy=1<<2,xP=1<<3,o1=10,bP=47,jv=92,Oyt=9,Ryt=32,r0=34,Zd=61,Myt=35,Nyt=36,Pyt=37,n0=39,i0=40,Jd=41,Uyt=95,io=45,Dyt=33,Qyt=60,Hyt=62,Gyt=64,kyt=91,$yt=93,Vyt=61,jyt=123,a0=63,Kyt=125,IP=124,zyt=126,Yyt=128,FP=65533,nB=42,Gc=43,Xyt=44,Wyt=58,qyt=59,Ig=46,Zyt=0,Jyt=8,tmt=11,emt=14,rmt=31,nmt=127,ks=-1,IH=48,FH=97,LH=101,imt=102,amt=117,omt=122,OH=65,RH=69,MH=70,smt=85,Amt=90,_a=function(r){return r>=IH&&r<=57},lmt=function(r){return r>=55296&&r<=57343},wf=function(r){return _a(r)||r>=OH&&r<=MH||r>=FH&&r<=imt},umt=function(r){return r>=FH&&r<=omt},cmt=function(r){return r>=OH&&r<=Amt},hmt=function(r){return umt(r)||cmt(r)},fmt=function(r){return r>=Yyt},o0=function(r){return r===o1||r===Oyt||r===Ryt},s1=function(r){return hmt(r)||fmt(r)||r===Uyt},LP=function(r){return s1(r)||_a(r)||r===io},pmt=function(r){return r>=Zyt&&r<=Jyt||r===tmt||r>=emt&&r<=rmt||r===nmt},su=function(r,e){return r!==jv?!1:e!==o1},s0=function(r,e,t){return r===io?s1(e)||su(e,t):s1(r)?!0:!!(r===jv&&su(r,e))},iB=function(r,e,t){return r===Gc||r===io?_a(e)?!0:e===Ig&&_a(t):_a(r===Ig?e:r)},dmt=function(r){var e=0,t=1;(r[e]===Gc||r[e]===io)&&(r[e]===io&&(t=-1),e++);for(var n=[];_a(r[e]);)n.push(r[e++]);var i=n.length?parseInt(ti.apply(void 0,n),10):0;r[e]===Ig&&e++;for(var a=[];_a(r[e]);)a.push(r[e++]);var o=a.length,s=o?parseInt(ti.apply(void 0,a),10):0;(r[e]===RH||r[e]===LH)&&e++;var A=1;(r[e]===Gc||r[e]===io)&&(r[e]===io&&(A=-1),e++);for(var l=[];_a(r[e]);)l.push(r[e++]);var u=l.length?parseInt(ti.apply(void 0,l),10):0;return t*(i+s*Math.pow(10,-o))*Math.pow(10,A*u)},vmt={type:2},gmt={type:3},ymt={type:4},mmt={type:13},_mt={type:8},wmt={type:21},Emt={type:9},Cmt={type:10},Bmt={type:11},Tmt={type:12},Smt={type:14},A0={type:23},xmt={type:1},bmt={type:25},Imt={type:24},Fmt={type:26},Lmt={type:27},Omt={type:28},Rmt={type:29},Mmt={type:31},eb={type:32},NH=function(){function r(){this._value=[]}return r.prototype.write=function(e){this._value=this._value.concat(Ow(e))},r.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==eb;)e.push(t),t=this.consumeToken();return e},r.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case r0:return this.consumeStringToken(r0);case Myt:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),i=this.peekCodePoint(2);if(LP(t)||su(n,i)){var a=s0(t,n,i)?Lyt:Fyt,o=this.consumeName();return{type:5,value:o,flags:a}}break;case Nyt:if(this.peekCodePoint(0)===Zd)return this.consumeCodePoint(),mmt;break;case n0:return this.consumeStringToken(n0);case i0:return vmt;case Jd:return gmt;case nB:if(this.peekCodePoint(0)===Zd)return this.consumeCodePoint(),Smt;break;case Gc:if(iB(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Xyt:return ymt;case io:var s=e,A=this.peekCodePoint(0),l=this.peekCodePoint(1);if(iB(s,A,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(s0(s,A,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(A===io&&l===Hyt)return this.consumeCodePoint(),this.consumeCodePoint(),Imt;break;case Ig:if(iB(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case bP:if(this.peekCodePoint(0)===nB)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===nB&&(u=this.consumeCodePoint(),u===bP))return this.consumeToken();if(u===ks)return this.consumeToken()}break;case Wyt:return Fmt;case qyt:return Lmt;case Qyt:if(this.peekCodePoint(0)===Dyt&&this.peekCodePoint(1)===io&&this.peekCodePoint(2)===io)return this.consumeCodePoint(),this.consumeCodePoint(),bmt;break;case Gyt:var c=this.peekCodePoint(0),h=this.peekCodePoint(1),f=this.peekCodePoint(2);if(s0(c,h,f)){var o=this.consumeName();return{type:7,value:o}}break;case kyt:return Omt;case jv:if(su(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case $yt:return Rmt;case Vyt:if(this.peekCodePoint(0)===Zd)return this.consumeCodePoint(),_mt;break;case jyt:return Bmt;case Kyt:return Tmt;case amt:case smt:var p=this.peekCodePoint(0),v=this.peekCodePoint(1);return p===Gc&&(wf(v)||v===a0)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case IP:if(this.peekCodePoint(0)===Zd)return this.consumeCodePoint(),Emt;if(this.peekCodePoint(0)===IP)return this.consumeCodePoint(),wmt;break;case zyt:if(this.peekCodePoint(0)===Zd)return this.consumeCodePoint(),Cmt;break;case ks:return eb}return o0(e)?(this.consumeWhiteSpace(),Mmt):_a(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):s1(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:ti(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();wf(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===a0&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var i=parseInt(ti.apply(void 0,e.map(function(A){return A===a0?IH:A})),16),a=parseInt(ti.apply(void 0,e.map(function(A){return A===a0?MH:A})),16);return{type:30,start:i,end:a}}var o=parseInt(ti.apply(void 0,e),16);if(this.peekCodePoint(0)===io&&wf(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];wf(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();var a=parseInt(ti.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)===i0?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===i0?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},r.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===ks)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===n0||t===r0){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===ks||this.peekCodePoint(0)===Jd)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),A0)}for(;;){var i=this.consumeCodePoint();if(i===ks||i===Jd)return{type:22,value:ti.apply(void 0,e)};if(o0(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===ks||this.peekCodePoint(0)===Jd?(this.consumeCodePoint(),{type:22,value:ti.apply(void 0,e)}):(this.consumeBadUrlRemnants(),A0);if(i===r0||i===n0||i===i0||pmt(i))return this.consumeBadUrlRemnants(),A0;if(i===jv)if(su(i,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),A0;else e.push(i)}},r.prototype.consumeWhiteSpace=function(){for(;o0(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===Jd||e===ks)return;su(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+=ti.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===ks||i===void 0||i===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(i===o1)return this._value.splice(0,n),xmt;if(i===jv){var a=this._value[n+1];a!==ks&&a!==void 0&&(a===o1?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):su(i,a)&&(t+=this.consumeStringSlice(n),t+=ti(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var e=[],t=fy,n=this.peekCodePoint(0);for((n===Gc||n===io)&&e.push(this.consumeCodePoint());_a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(n===Ig&&_a(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=xP;_a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),i=this.peekCodePoint(1);var a=this.peekCodePoint(2);if((n===RH||n===LH)&&((i===Gc||i===io)&&_a(a)||_a(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=xP;_a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[dmt(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(s0(i,a,o)){var s=this.consumeName();return{type:15,number:t,flags:n,unit:s}}return i===Pyt?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(wf(e)){for(var t=ti(e);wf(this.peekCodePoint(0))&&t.length<6;)t+=ti(this.consumeCodePoint());o0(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||lmt(n)||n>1114111?FP:n}return e===ks?FP:e},r.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(LP(t))e+=ti(t);else if(su(t,this.peekCodePoint(0)))e+=ti(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},r}(),PH=function(){function r(e){this._tokens=e}return r.create=function(e){var t=new NH;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||Pmt(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"?eb:e},r.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},r}(),py=function(r){return r.type===15},ed=function(r){return r.type===17},an=function(r){return r.type===20},Nmt=function(r){return r.type===0},rb=function(r,e){return an(r)&&r.value===e},UH=function(r){return r.type!==31},Pp=function(r){return r.type!==31&&r.type!==4},dA=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},Pmt=function(r,e){return e===11&&r.type===12||e===28&&r.type===29?!0:e===2&&r.type===3},Ku=function(r){return r.type===17||r.type===15},mi=function(r){return r.type===16||Ku(r)},DH=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},aa={type:17,number:0,flags:fy},cL={type:16,number:50,flags:fy},gu={type:16,number:100,flags:fy},Cv=function(r,e,t){var n=r[0],i=r[1];return[yn(n,e),yn(typeof i<"u"?i:n,t)]},yn=function(r,e){if(r.type===16)return r.number/100*e;if(py(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},QH="deg",HH="grad",GH="rad",kH="turn",Rw={name:"angle",parse:function(r,e){if(e.type===15)switch(e.unit){case QH:return Math.PI*e.number/180;case HH:return Math.PI/200*e.number;case GH:return e.number;case kH:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},$H=function(r){return r.type===15&&(r.unit===QH||r.unit===HH||r.unit===GH||r.unit===kH)},VH=function(r){var e=r.filter(an).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[aa,aa];case"to top":case"bottom":return qo(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[aa,gu];case"to right":case"left":return qo(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[gu,gu];case"to bottom":case"top":return qo(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[gu,aa];case"to left":case"right":return qo(270)}return 0},qo=function(r){return Math.PI*r/180},xu={name:"color",parse:function(r,e){if(e.type===18){var t=Umt[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 yu(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 yu(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 yu(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 yu(parseInt(n,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(e.type===20){var s=il[e.value.toUpperCase()];if(typeof s<"u")return s}return il.TRANSPARENT}},bu=function(r){return(255&r)===0},ji=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+")"},yu=function(r,e,t,n){return(r<<24|e<<16|t<<8|Math.round(n*255)<<0)>>>0},OP=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},RP=function(r,e){var t=e.filter(Pp);if(t.length===3){var n=t.map(OP),i=n[0],a=n[1],o=n[2];return yu(i,a,o,1)}if(t.length===4){var s=t.map(OP),i=s[0],a=s[1],o=s[2],A=s[3];return yu(i,a,o,A)}return 0};function aB(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 MP=function(r,e){var t=e.filter(Pp),n=t[0],i=t[1],a=t[2],o=t[3],s=(n.type===17?qo(n.number):Rw.parse(r,n))/(Math.PI*2),A=mi(i)?i.number/100:0,l=mi(a)?a.number/100:0,u=typeof o<"u"&&mi(o)?yn(o,1):1;if(A===0)return yu(l*255,l*255,l*255,1);var c=l<=.5?l*(A+1):l+A-l*A,h=l*2-c,f=aB(h,c,s+1/3),p=aB(h,c,s),v=aB(h,c,s-1/3);return yu(f*255,p*255,v*255,u)},Umt={hsl:MP,hsla:MP,rgb:RP,rgba:RP},Kv=function(r,e){return xu.parse(r,PH.create(e).parseComponentValue())},il={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},Dmt={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(an(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Qmt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Mw=function(r,e){var t=xu.parse(r,e[0]),n=e[1];return n&&mi(n)?{color:t,stop:n}:{color:t,stop:null}},NP=function(r,e){var t=r[0],n=r[r.length-1];t.stop===null&&(t.stop=aa),n.stop===null&&(n.stop=gu);for(var i=[],a=0,o=0;o<r.length;o++){var s=r[o].stop;if(s!==null){var A=yn(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 c=o-l,h=i[l-1],f=(u-h)/(c+1),p=1;p<=c;p++)i[l+p-1]=f*p;l=null}}return r.map(function(v,m){var g=v.color;return{color:g,stop:Math.max(Math.min(1,i[m]/e),0)}})},Hmt=function(r,e,t){var n=e/2,i=t/2,a=yn(r[0],e)-n,o=i-yn(r[1],t);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},Gmt=function(r,e,t){var n=typeof r=="number"?r:Hmt(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]},ys=function(r,e){return Math.sqrt(r*r+e*e)},PP=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=ys(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},kmt=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(ys(e,t),ys(e,t-i),ys(e-n,t),ys(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=PP(n,i,e,t,!0),l=A[0],u=A[1];a=ys(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(ys(e,t),ys(e,t-i),ys(e-n,t),ys(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)),c=PP(n,i,e,t,!1),l=c[0],u=c[1];a=ys(l-e,(u-t)/s),o=s*a}break}return Array.isArray(r.size)&&(a=yn(r.size[0],n),o=r.size.length===2?yn(r.size[1],i):a),[a,o]},$mt=function(r,e){var t=qo(180),n=[];return dA(e).forEach(function(i,a){if(a===0){var o=i[0];if(o.type===20&&o.value==="to"){t=VH(i);return}else if($H(o)){t=Rw.parse(r,o);return}}var s=Mw(r,i);n.push(s)}),{angle:t,stops:n,type:1}},l0=function(r,e){var t=qo(180),n=[];return dA(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=VH(i);return}else if($H(o)){t=(Rw.parse(r,o)+qo(270))%qo(360);return}}var s=Mw(r,i);n.push(s)}),{angle:t,stops:n,type:1}},Vmt=function(r,e){var t=qo(180),n=[],i=1,a=0,o=3,s=[];return dA(e).forEach(function(A,l){var u=A[0];if(l===0){if(an(u)&&u.value==="linear"){i=1;return}else if(an(u)&&u.value==="radial"){i=2;return}}if(u.type===18){if(u.name==="from"){var c=xu.parse(r,u.values[0]);n.push({stop:aa,color:c})}else if(u.name==="to"){var c=xu.parse(r,u.values[0]);n.push({stop:gu,color:c})}else if(u.name==="color-stop"){var h=u.values.filter(Pp);if(h.length===2){var c=xu.parse(r,h[1]),f=h[0];ed(f)&&n.push({stop:{type:16,number:f.number*100,flags:f.flags},color:c})}}}}),i===1?{angle:(t+qo(180))%qo(360),stops:n,type:i}:{size:o,shape:a,stops:n,position:s,type:i}},jH="closest-side",KH="farthest-side",zH="closest-corner",YH="farthest-corner",XH="circle",WH="ellipse",qH="cover",ZH="contain",jmt=function(r,e){var t=0,n=3,i=[],a=[];return dA(e).forEach(function(o,s){var A=!0;if(s===0){var l=!1;A=o.reduce(function(c,h){if(l)if(an(h))switch(h.value){case"center":return a.push(cL),c;case"top":case"left":return a.push(aa),c;case"right":case"bottom":return a.push(gu),c}else(mi(h)||Ku(h))&&a.push(h);else if(an(h))switch(h.value){case XH:return t=0,!1;case WH:return t=1,!1;case"at":return l=!0,!1;case jH:return n=0,!1;case qH:case KH:return n=1,!1;case ZH:case zH:return n=2,!1;case YH:return n=3,!1}else if(Ku(h)||mi(h))return Array.isArray(n)||(n=[]),n.push(h),!1;return c},A)}if(A){var u=Mw(r,o);i.push(u)}}),{size:n,shape:t,stops:i,position:a,type:2}},u0=function(r,e){var t=0,n=3,i=[],a=[];return dA(e).forEach(function(o,s){var A=!0;if(s===0?A=o.reduce(function(u,c){if(an(c))switch(c.value){case"center":return a.push(cL),!1;case"top":case"left":return a.push(aa),!1;case"right":case"bottom":return a.push(gu),!1}else if(mi(c)||Ku(c))return a.push(c),!1;return u},A):s===1&&(A=o.reduce(function(u,c){if(an(c))switch(c.value){case XH:return t=0,!1;case WH:return t=1,!1;case ZH:case jH:return n=0,!1;case KH:return n=1,!1;case zH:return n=2,!1;case qH:case YH:return n=3,!1}else if(Ku(c)||mi(c))return Array.isArray(n)||(n=[]),n.push(c),!1;return u},A)),A){var l=Mw(r,o);i.push(l)}}),{size:n,shape:t,stops:i,position:a,type:2}},Kmt=function(r){return r.type===1},zmt=function(r){return r.type===2},hL={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=JH[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 Ymt(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!JH[r.name])}var JH={"linear-gradient":$mt,"-moz-linear-gradient":l0,"-ms-linear-gradient":l0,"-o-linear-gradient":l0,"-webkit-linear-gradient":l0,"radial-gradient":jmt,"-moz-radial-gradient":u0,"-ms-radial-gradient":u0,"-o-radial-gradient":u0,"-webkit-radial-gradient":u0,"-webkit-gradient":Vmt},Xmt={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 Pp(n)&&Ymt(n)}).map(function(n){return hL.parse(r,n)})}},Wmt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(an(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},qmt={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,e){return dA(e).map(function(t){return t.filter(mi)}).map(DH)}},Zmt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,e){return dA(e).map(function(t){return t.filter(an).map(function(n){return n.value}).join(" ")}).map(Jmt)}},Jmt=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}},gp;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(gp||(gp={}));var t0t={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,e){return dA(e).map(function(t){return t.filter(e0t)})}},e0t=function(r){return an(r)||mi(r)},Nw=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},r0t=Nw("top"),n0t=Nw("right"),i0t=Nw("bottom"),a0t=Nw("left"),Pw=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return DH(t.filter(mi))}}},o0t=Pw("top-left"),s0t=Pw("top-right"),A0t=Pw("bottom-right"),l0t=Pw("bottom-left"),Uw=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}}},u0t=Uw("top"),c0t=Uw("right"),h0t=Uw("bottom"),f0t=Uw("left"),Dw=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return py(t)?t.number:0}}},p0t=Dw("top"),d0t=Dw("right"),v0t=Dw("bottom"),g0t=Dw("left"),y0t={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},m0t={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},_0t={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,e){return e.filter(an).reduce(function(t,n){return t|w0t(n.value)},0)}},w0t=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},E0t={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}},C0t={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}},A1;(function(r){r.NORMAL="normal",r.STRICT="strict"})(A1||(A1={}));var B0t={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"strict":return A1.STRICT;case"normal":default:return A1.NORMAL}}},T0t={name:"line-height",initialValue:"normal",prefix:!1,type:4},UP=function(r,e){return an(r)&&r.value==="normal"?1.2*e:r.type===17?e*r.number:mi(r)?yn(r,e):e},S0t={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,e){return e.type===20&&e.value==="none"?null:hL.parse(r,e)}},x0t={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}}},nb={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}}},Qw=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},b0t=Qw("top"),I0t=Qw("right"),F0t=Qw("bottom"),L0t=Qw("left"),O0t={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,e){return e.filter(an).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}})}},R0t={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"}}},Hw=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},M0t=Hw("top"),N0t=Hw("right"),P0t=Hw("bottom"),U0t=Hw("left"),D0t={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}}},Q0t={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}},H0t={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&rb(e[0],"none")?[]:dA(e).map(function(t){for(var n={color:il.TRANSPARENT,offsetX:aa,offsetY:aa,blur:aa},i=0,a=0;a<t.length;a++){var o=t[a];Ku(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:n.blur=o,i++):n.color=xu.parse(r,o)}return n})}},G0t={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}},k0t={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=j0t[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},$0t=function(r){var e=r.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},V0t=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},j0t={matrix:$0t,matrix3d:V0t},DP={type:16,number:50,flags:fy},K0t=[DP,DP],z0t={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,e){var t=e.filter(mi);return t.length!==2?K0t:[t[0],t[1]]}},Y0t={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}}},zv;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(zv||(zv={}));var X0t={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-all":return zv.BREAK_ALL;case"keep-all":return zv.KEEP_ALL;case"normal":default:return zv.NORMAL}}},W0t={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,e){if(e.type===20)return{auto:!0,order:0};if(ed(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},t7={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")}},q0t={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,e){return ed(e)?e.number:1}},Z0t={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},J0t={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,e){return e.filter(an).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})}},t_t={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+"'"})}},e_t={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},r_t={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,e){if(ed(e))return e.number;if(an(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},n_t={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.filter(an).map(function(t){return t.value})}},i_t={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"}}},Mi=function(r,e){return(r&e)!==0},a_t={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}},o_t={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(UH),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(o.type===20){var A=s&&ed(s)?s.number:1;n.push({counter:o.value,increment:A})}}return n}},s_t={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return[];for(var t=[],n=e.filter(UH),i=0;i<n.length;i++){var a=n[i],o=n[i+1];if(an(a)&&a.value!=="none"){var s=o&&ed(o)?o.number:0;t.push({counter:a.value,reset:s})}}return t}},A_t={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(r,e){return e.filter(py).map(function(t){return t7.parse(r,t)})}},l_t={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(Nmt);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}},QP=function(r,e,t){if(!r)return"";var n=r[Math.min(e,r.length-1)];return n?t?n.open:n.close:""},u_t={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&rb(e[0],"none")?[]:dA(e).map(function(t){for(var n={color:255,offsetX:aa,offsetY:aa,blur:aa,spread:aa,inset:!1},i=0,a=0;a<t.length;a++){var o=t[a];rb(o,"inset")?n.inset=!0:Ku(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:i===2?n.blur=o:n.spread=o,i++):n.color=xu.parse(r,o)}return n})}},c_t={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(r,e){var t=[0,1,2],n=[];return e.filter(an).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}},h_t={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},f_t={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(r,e){return py(e)?e.number:0}},p_t=function(){function r(e,t){var n,i;this.animationDuration=ce(e,A_t,t.animationDuration),this.backgroundClip=ce(e,Dmt,t.backgroundClip),this.backgroundColor=ce(e,Qmt,t.backgroundColor),this.backgroundImage=ce(e,Xmt,t.backgroundImage),this.backgroundOrigin=ce(e,Wmt,t.backgroundOrigin),this.backgroundPosition=ce(e,qmt,t.backgroundPosition),this.backgroundRepeat=ce(e,Zmt,t.backgroundRepeat),this.backgroundSize=ce(e,t0t,t.backgroundSize),this.borderTopColor=ce(e,r0t,t.borderTopColor),this.borderRightColor=ce(e,n0t,t.borderRightColor),this.borderBottomColor=ce(e,i0t,t.borderBottomColor),this.borderLeftColor=ce(e,a0t,t.borderLeftColor),this.borderTopLeftRadius=ce(e,o0t,t.borderTopLeftRadius),this.borderTopRightRadius=ce(e,s0t,t.borderTopRightRadius),this.borderBottomRightRadius=ce(e,A0t,t.borderBottomRightRadius),this.borderBottomLeftRadius=ce(e,l0t,t.borderBottomLeftRadius),this.borderTopStyle=ce(e,u0t,t.borderTopStyle),this.borderRightStyle=ce(e,c0t,t.borderRightStyle),this.borderBottomStyle=ce(e,h0t,t.borderBottomStyle),this.borderLeftStyle=ce(e,f0t,t.borderLeftStyle),this.borderTopWidth=ce(e,p0t,t.borderTopWidth),this.borderRightWidth=ce(e,d0t,t.borderRightWidth),this.borderBottomWidth=ce(e,v0t,t.borderBottomWidth),this.borderLeftWidth=ce(e,g0t,t.borderLeftWidth),this.boxShadow=ce(e,u_t,t.boxShadow),this.color=ce(e,y0t,t.color),this.direction=ce(e,m0t,t.direction),this.display=ce(e,_0t,t.display),this.float=ce(e,E0t,t.cssFloat),this.fontFamily=ce(e,t_t,t.fontFamily),this.fontSize=ce(e,e_t,t.fontSize),this.fontStyle=ce(e,i_t,t.fontStyle),this.fontVariant=ce(e,n_t,t.fontVariant),this.fontWeight=ce(e,r_t,t.fontWeight),this.letterSpacing=ce(e,C0t,t.letterSpacing),this.lineBreak=ce(e,B0t,t.lineBreak),this.lineHeight=ce(e,T0t,t.lineHeight),this.listStyleImage=ce(e,S0t,t.listStyleImage),this.listStylePosition=ce(e,x0t,t.listStylePosition),this.listStyleType=ce(e,nb,t.listStyleType),this.marginTop=ce(e,b0t,t.marginTop),this.marginRight=ce(e,I0t,t.marginRight),this.marginBottom=ce(e,F0t,t.marginBottom),this.marginLeft=ce(e,L0t,t.marginLeft),this.opacity=ce(e,q0t,t.opacity);var a=ce(e,O0t,t.overflow);this.overflowX=a[0],this.overflowY=a[a.length>1?1:0],this.overflowWrap=ce(e,R0t,t.overflowWrap),this.paddingTop=ce(e,M0t,t.paddingTop),this.paddingRight=ce(e,N0t,t.paddingRight),this.paddingBottom=ce(e,P0t,t.paddingBottom),this.paddingLeft=ce(e,U0t,t.paddingLeft),this.paintOrder=ce(e,c_t,t.paintOrder),this.position=ce(e,Q0t,t.position),this.textAlign=ce(e,D0t,t.textAlign),this.textDecorationColor=ce(e,Z0t,(n=t.textDecorationColor)!==null&&n!==void 0?n:t.color),this.textDecorationLine=ce(e,J0t,(i=t.textDecorationLine)!==null&&i!==void 0?i:t.textDecoration),this.textShadow=ce(e,H0t,t.textShadow),this.textTransform=ce(e,G0t,t.textTransform),this.transform=ce(e,k0t,t.transform),this.transformOrigin=ce(e,z0t,t.transformOrigin),this.visibility=ce(e,Y0t,t.visibility),this.webkitTextStrokeColor=ce(e,h_t,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=ce(e,f_t,t.webkitTextStrokeWidth),this.wordBreak=ce(e,X0t,t.wordBreak),this.zIndex=ce(e,W0t,t.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return bu(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 Mi(this.display,4)||Mi(this.display,33554432)||Mi(this.display,268435456)||Mi(this.display,536870912)||Mi(this.display,67108864)||Mi(this.display,134217728)},r}(),d_t=function(){function r(e,t){this.content=ce(e,a_t,t.content),this.quotes=ce(e,l_t,t.quotes)}return r}(),HP=function(){function r(e,t){this.counterIncrement=ce(e,o_t,t.counterIncrement),this.counterReset=ce(e,s_t,t.counterReset)}return r}(),ce=function(r,e,t){var n=new NH,i=t!==null&&typeof t<"u"?t.toString():e.initialValue;n.write(i);var a=new PH(n.read());switch(e.type){case 2:var o=a.parseComponentValue();return e.parse(r,an(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 Rw.parse(r,a.parseComponentValue());case"color":return xu.parse(r,a.parseComponentValue());case"image":return hL.parse(r,a.parseComponentValue());case"length":var s=a.parseComponentValue();return Ku(s)?s:aa;case"length-percentage":var A=a.parseComponentValue();return mi(A)?A:aa;case"time":return t7.parse(r,a.parseComponentValue())}break}},v_t="data-html2canvas-debug",g_t=function(r){var e=r.getAttribute(v_t);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},ib=function(r,e){var t=g_t(r);return t===1||e===t},vA=function(){function r(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,ib(t,3))debugger;this.styles=new p_t(e,window.getComputedStyle(t,null)),sb(t)&&(this.styles.animationDuration.some(function(n){return n>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=Lw(this.context,t),ib(t,4)&&(this.flags|=16)}return r}(),y_t="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",GP="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bv=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var c0=0;c0<GP.length;c0++)Bv[GP.charCodeAt(c0)]=c0;var m_t=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=Bv[r.charCodeAt(n)],o=Bv[r.charCodeAt(n+1)],s=Bv[r.charCodeAt(n+2)],A=Bv[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},__t=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},w_t=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},eh=5,fL=6+5,oB=2,E_t=fL-eh,e7=65536>>eh,C_t=1<<eh,sB=C_t-1,B_t=1024>>eh,T_t=e7+B_t,S_t=T_t,x_t=32,b_t=S_t+x_t,I_t=65536>>fL,F_t=1<<E_t,L_t=F_t-1,kP=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},O_t=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},R_t=function(r,e){var t=m_t(r),n=Array.isArray(t)?w_t(t):new Uint32Array(t),i=Array.isArray(t)?__t(t):new Uint16Array(t),a=24,o=kP(i,a/2,n[4]/2),s=n[5]===2?kP(i,(a+n[4])/2):O_t(n,Math.ceil((a+n[4])/4));return new M_t(n[0],n[1],n[2],n[3],o,s)},M_t=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>>eh],t=(t<<oB)+(e&sB),this.data[t];if(e<=65535)return t=this.index[e7+(e-55296>>eh)],t=(t<<oB)+(e&sB),this.data[t];if(e<this.highStart)return t=b_t-I_t+(e>>fL),t=this.index[t],t+=e>>eh&L_t,t=this.index[t],t=(t<<oB)+(e&sB),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),$P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N_t=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var h0=0;h0<$P.length;h0++)N_t[$P.charCodeAt(h0)]=h0;var P_t=1,AB=2,lB=3,VP=4,jP=5,U_t=7,KP=8,uB=9,cB=10,zP=11,YP=12,XP=13,WP=14,hB=15,D_t=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},Q_t=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},H_t=R_t(y_t),zo="×",fB="÷",G_t=function(r){return H_t.get(r)},k_t=function(r,e,t){var n=t-2,i=e[n],a=e[t-1],o=e[t];if(a===AB&&o===lB)return zo;if(a===AB||a===lB||a===VP||o===AB||o===lB||o===VP)return fB;if(a===KP&&[KP,uB,zP,YP].indexOf(o)!==-1||(a===zP||a===uB)&&(o===uB||o===cB)||(a===YP||a===cB)&&o===cB||o===XP||o===jP||o===U_t||a===P_t)return zo;if(a===XP&&o===WP){for(;i===jP;)i=e[--n];if(i===WP)return zo}if(a===hB&&o===hB){for(var s=0;i===hB;)s++,i=e[--n];if(s%2===0)return zo}return fB},$_t=function(r){var e=D_t(r),t=e.length,n=0,i=0,a=e.map(G_t);return{next:function(){if(n>=t)return{done:!0,value:null};for(var o=zo;n<t&&(o=k_t(e,a,++n))===zo;);if(o!==zo||n===t){var s=Q_t.apply(null,e.slice(i,n));return i=n,{value:s,done:!1}}return{done:!0,value:null}}}},V_t=function(r){for(var e=$_t(r),t=[],n;!(n=e.next()).done;)n.value&&t.push(n.value.slice());return t},j_t=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},K_t=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"?"&#128104;".repeat(10):"";var n=e.firstChild,i=Ow(n.data).map(function(A){return ti(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 c=u.x>o.x||u.y>o.y;return o=u,l===0?!0:c});return r.body.removeChild(e),s},z_t=function(){return typeof new Image().crossOrigin<"u"},Y_t=function(){return typeof new XMLHttpRequest().responseType=="string"},X_t=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},qP=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},W_t=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=ab(t,t,0,0,i);return n.fillStyle="red",n.fillRect(0,0,t,t),ZP(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",qP(A)?ZP(ab(t,t,0,0,l)):Promise.reject(!1)}).then(function(s){return n.drawImage(s,0,0),qP(n.getImageData(0,0,t,t).data)}).catch(function(){return!1})},ab=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},ZP=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))})},na={get SUPPORT_RANGE_BOUNDS(){var r=j_t(document);return Object.defineProperty(na,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=na.SUPPORT_RANGE_BOUNDS&&K_t(document);return Object.defineProperty(na,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=X_t(document);return Object.defineProperty(na,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?W_t(document):Promise.resolve(!1);return Object.defineProperty(na,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=z_t();return Object.defineProperty(na,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=Y_t();return Object.defineProperty(na,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(na,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(na,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},Yv=function(){function r(e,t){this.text=e,this.bounds=t}return r}(),q_t=function(r,e,t,n){var i=t1t(e,t),a=[],o=0;return i.forEach(function(s){if(t.textDecorationLine.length||s.trim().length>0)if(na.SUPPORT_RANGE_BOUNDS){var A=JP(n,o,s.length).getClientRects();if(A.length>1){var l=pL(s),u=0;l.forEach(function(h){a.push(new Yv(h,hl.fromDOMRectList(r,JP(n,u+o,h.length).getClientRects()))),u+=h.length})}else a.push(new Yv(s,hl.fromDOMRectList(r,A)))}else{var c=n.splitText(s.length);a.push(new Yv(s,Z_t(r,n))),n=c}else na.SUPPORT_RANGE_BOUNDS||(n=n.splitText(s.length));o+=s.length}),a},Z_t=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=Lw(r,n);return n.firstChild&&i.replaceChild(n.firstChild,n),a}}return hl.EMPTY},JP=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},pL=function(r){if(na.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 V_t(r)},J_t=function(r,e){if(na.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 r1t(r,e)},t1t=function(r,e){return e.letterSpacing!==0?pL(r):J_t(r,e)},e1t=[32,160,4961,65792,65793,4153,4241],r1t=function(r,e){for(var t=Iyt(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=Ow(o),A="";s.forEach(function(l){e1t.indexOf(l)===-1?A+=ti(l):(A.length&&n.push(A),n.push(ti(l)),A="")}),A.length&&n.push(A)}};!(i=t.next()).done;)a();return n},n1t=function(){function r(e,t,n){this.text=i1t(t.data,n.textTransform),this.textBounds=q_t(e,this.text,n,t)}return r}(),i1t=function(r,e){switch(e){case 1:return r.toLowerCase();case 3:return r.replace(a1t,o1t);case 2:return r.toUpperCase();default:return r}},a1t=/(^|\s|:|-|\(|\))([a-z])/g,o1t=function(r,e,t){return r.length>0?e+t.toUpperCase():r},r7=function(r){Us(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}(vA),n7=function(r){Us(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}(vA),i7=function(r){Us(e,r);function e(t,n){var i=r.call(this,t,n)||this,a=new XMLSerializer,o=Lw(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}(vA),a7=function(r){Us(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(vA),ob=function(r){Us(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}(vA),s1t=[{type:15,flags:0,unit:"px",number:3}],A1t=[{type:16,flags:0,number:50}],l1t=function(r){return r.width>r.height?new hl(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new hl(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r},u1t=function(r){var e=r.type===c1t?new Array(r.value.length+1).join("•"):r.value;return e.length===0?r.placeholder||"":e},l1="checkbox",u1="radio",c1t="password",t5=707406591,dL=function(r){Us(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=u1t(n),(i.type===l1||i.type===u1)&&(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=l1t(i.bounds)),i.type){case l1:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=s1t;break;case u1:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=A1t;break}return i}return e}(vA),o7=function(r){Us(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}(vA),s7=function(r){Us(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(vA),A7=function(r){Us(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=u7(t,n.contentWindow.document.documentElement);var a=n.contentWindow.document.documentElement?Kv(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):il.TRANSPARENT,o=n.contentWindow.document.body?Kv(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):il.TRANSPARENT;i.backgroundColor=bu(a)?bu(o)?i.styles.backgroundColor:o:a}}catch{}return i}return e}(vA),h1t=["OL","UL","MENU"],q0=function(r,e,t,n){for(var i=e.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,c7(i)&&i.data.trim().length>0)t.textNodes.push(new n1t(r,i,t.styles));else if(qf(i))if(d7(i)&&i.assignedNodes)i.assignedNodes().forEach(function(s){return q0(r,s,t,n)});else{var o=l7(r,i);o.styles.isVisible()&&(f1t(i,o,n)?o.flags|=4:p1t(o.styles)&&(o.flags|=2),h1t.indexOf(i.tagName)!==-1&&(o.flags|=8),t.elements.push(o),i.slot,i.shadowRoot?q0(r,i.shadowRoot,o,n):!c1(i)&&!h7(i)&&!h1(i)&&q0(r,i,o,n))}},l7=function(r,e){return Ab(e)?new r7(r,e):f7(e)?new n7(r,e):h7(e)?new i7(r,e):d1t(e)?new a7(r,e):v1t(e)?new ob(r,e):g1t(e)?new dL(r,e):h1(e)?new o7(r,e):c1(e)?new s7(r,e):p7(e)?new A7(r,e):new vA(r,e)},u7=function(r,e){var t=l7(r,e);return t.flags|=4,q0(r,e,t,t),t},f1t=function(r,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||vL(r)&&t.styles.isTransparent()},p1t=function(r){return r.isPositioned()||r.isFloating()},c7=function(r){return r.nodeType===Node.TEXT_NODE},qf=function(r){return r.nodeType===Node.ELEMENT_NODE},sb=function(r){return qf(r)&&typeof r.style<"u"&&!Z0(r)},Z0=function(r){return typeof r.className=="object"},d1t=function(r){return r.tagName==="LI"},v1t=function(r){return r.tagName==="OL"},g1t=function(r){return r.tagName==="INPUT"},y1t=function(r){return r.tagName==="HTML"},h7=function(r){return r.tagName==="svg"},vL=function(r){return r.tagName==="BODY"},f7=function(r){return r.tagName==="CANVAS"},e5=function(r){return r.tagName==="VIDEO"},Ab=function(r){return r.tagName==="IMG"},p7=function(r){return r.tagName==="IFRAME"},r5=function(r){return r.tagName==="STYLE"},m1t=function(r){return r.tagName==="SCRIPT"},c1=function(r){return r.tagName==="TEXTAREA"},h1=function(r){return r.tagName==="SELECT"},d7=function(r){return r.tagName==="SLOT"},n5=function(r){return r.tagName.indexOf("-")>0},_1t=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}(),i5={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"]},a5={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},w1t={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},E1t={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ef=function(r,e,t,n,i,a){return r<e||r>t?Fg(r,i,a.length>0):n.integers.reduce(function(o,s,A){for(;r>=s;)r-=s,o+=n.values[A];return o},"")+a},v7=function(r,e,t,n){var i="";do t||r--,i=n(r)+i,r/=e;while(r*e>=e);return i},Zn=function(r,e,t,n,i){var a=t-e+1;return(r<0?"-":"")+(v7(Math.abs(r),a,n,function(o){return ti(Math.floor(o%a)+e)})+i)},yc=function(r,e,t){t===void 0&&(t=". ");var n=e.length;return v7(Math.abs(r),n,!1,function(i){return e[Math.floor(i%n)]})+t},Qf=1<<0,nu=1<<1,iu=1<<2,Tv=1<<3,HA=function(r,e,t,n,i,a){if(r<-9999||r>9999)return Fg(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&&Mi(a,Qf)&&s!==""?s=e[l]+s:l>1||l===1&&A===0||l===1&&A===1&&Mi(a,nu)||l===1&&A===1&&Mi(a,iu)&&r>100||l===1&&A>1&&Mi(a,Tv)?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},o5="十百千萬",s5="拾佰仟萬",A5="マイナス",pB="마이너스",Fg=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=Zn(r,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return yc(r,"〇一二三四五六七八九",i);case 6:return Ef(r,1,3999,i5,3,n).toLowerCase();case 7:return Ef(r,1,3999,i5,3,n);case 8:return Zn(r,945,969,!1,n);case 9:return Zn(r,97,122,!1,n);case 10:return Zn(r,65,90,!1,n);case 11:return Zn(r,1632,1641,!0,n);case 12:case 49:return Ef(r,1,9999,a5,3,n);case 35:return Ef(r,1,9999,a5,3,n).toLowerCase();case 13:return Zn(r,2534,2543,!0,n);case 14:case 30:return Zn(r,6112,6121,!0,n);case 15:return yc(r,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return yc(r,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return HA(r,"零一二三四五六七八九",o5,"負",i,nu|iu|Tv);case 47:return HA(r,"零壹貳參肆伍陸柒捌玖",s5,"負",i,Qf|nu|iu|Tv);case 42:return HA(r,"零一二三四五六七八九",o5,"负",i,nu|iu|Tv);case 41:return HA(r,"零壹贰叁肆伍陆柒捌玖",s5,"负",i,Qf|nu|iu|Tv);case 26:return HA(r,"〇一二三四五六七八九","十百千万",A5,i,0);case 25:return HA(r,"零壱弐参四伍六七八九","拾百千万",A5,i,Qf|nu|iu);case 31:return HA(r,"영일이삼사오육칠팔구","십백천만",pB,a,Qf|nu|iu);case 33:return HA(r,"零一二三四五六七八九","十百千萬",pB,a,0);case 32:return HA(r,"零壹貳參四五六七八九","拾百千",pB,a,Qf|nu|iu);case 18:return Zn(r,2406,2415,!0,n);case 20:return Ef(r,1,19999,E1t,3,n);case 21:return Zn(r,2790,2799,!0,n);case 22:return Zn(r,2662,2671,!0,n);case 22:return Ef(r,1,10999,w1t,3,n);case 23:return yc(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return yc(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Zn(r,3302,3311,!0,n);case 28:return yc(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return yc(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return Zn(r,3792,3801,!0,n);case 37:return Zn(r,6160,6169,!0,n);case 38:return Zn(r,4160,4169,!0,n);case 39:return Zn(r,2918,2927,!0,n);case 40:return Zn(r,1776,1785,!0,n);case 43:return Zn(r,3046,3055,!0,n);case 44:return Zn(r,3174,3183,!0,n);case 45:return Zn(r,3664,3673,!0,n);case 46:return Zn(r,3872,3881,!0,n);case 3:default:return Zn(r,48,57,!0,n)}},g7="data-html2canvas-ignore",l5=function(){function r(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new _1t,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=C1t(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=S1t(i).then(function(){return Ma(n,void 0,void 0,function(){var u,c;return ya(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(F1t),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,c=this.clonedReferenceElement,typeof c>"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:h.sent(),h.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,T1t(A)]:[3,4];case 3:h.sent(),h.label=4;case 4:return typeof u=="function"?[2,Promise.resolve().then(function(){return u(A,c)}).then(function(){return i})]:[2,i]}})})});return A.open(),A.write(b1t(document.doctype)+"<html></html>"),I1t(this.referenceElement.ownerDocument,a,o),A.replaceChild(A.adoptNode(this.documentElement),A.documentElement),A.close(),l},r.prototype.createElementClone=function(e){if(ib(e,2))debugger;if(f7(e))return this.createCanvasClone(e);if(e5(e))return this.createVideoClone(e);if(r5(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Ab(t)&&(Ab(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),n5(t)?this.createCustomElementClone(t):t},r.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return dB(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){(!qf(t)||!m1t(t)&&!t.hasAttribute(g7)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!qf(t)||!r5(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(qf(a)&&d7(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(c7(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&qf(e)&&(sb(e)||Z0(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&&sb(i)&&(this.clonedReferenceElement=i),vL(i)&&R1t(i);var A=this.counters.parse(new HP(this.context,a)),l=this.resolvePseudoContent(e,i,o,Xv.BEFORE);n5(e)&&(t=!0),e5(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var u=this.resolvePseudoContent(e,i,s,Xv.AFTER);return u&&i.appendChild(u),this.counters.pop(A),(a&&(this.options.copyStyles||Z0(e))&&!p7(e)||t)&&dB(a,i),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(c1(e)||h1(e))&&(c1(i)||h1(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 HP(this.context,n));var A=new d_t(this.context,n),l=s.createElement("html2canvaspseudoelement");dB(n,l),A.content.forEach(function(c){if(c.type===0)l.appendChild(s.createTextNode(c.value));else if(c.type===22){var h=s.createElement("img");h.src=c.value,h.style.opacity="1",l.appendChild(h)}else if(c.type===18){if(c.name==="attr"){var f=c.values.filter(an);f.length&&l.appendChild(s.createTextNode(e.getAttribute(f[0].value)||""))}else if(c.name==="counter"){var p=c.values.filter(Pp),v=p[0],m=p[1];if(v&&an(v)){var g=a.counters.getCounterValue(v.value),_=m&&an(m)?nb.parse(a.context,m.value):3;l.appendChild(s.createTextNode(Fg(g,_,!1)))}}else if(c.name==="counters"){var E=c.values.filter(Pp),v=E[0],B=E[1],m=E[2];if(v&&an(v)){var L=a.counters.getCounterValues(v.value),O=m&&an(m)?nb.parse(a.context,m.value):3,b=B&&B.type===0?B.value:"",T=L.map(function(x){return Fg(x,O,!1)}).join(b);l.appendChild(s.createTextNode(T))}}}else if(c.type===20)switch(c.value){case"open-quote":l.appendChild(s.createTextNode(QP(A.quotes,a.quoteDepth++,!0)));break;case"close-quote":l.appendChild(s.createTextNode(QP(A.quotes,--a.quoteDepth,!1)));break;default:l.appendChild(s.createTextNode(c.value))}}),l.className=lb+" "+ub;var u=i===Xv.BEFORE?" "+lb:" "+ub;return Z0(t)?t.className.baseValue+=u:t.className+=u,l}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r}(),Xv;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(Xv||(Xv={}));var C1t=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(g7,"true"),r.body.appendChild(t),t},B1t=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},T1t=function(r){return Promise.all([].slice.call(r.images,0).map(B1t))},S1t=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)}})},x1t=["all","d","content"],dB=function(r,e){for(var t=r.length-1;t>=0;t--){var n=r.item(t);x1t.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},b1t=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},I1t=function(r,e,t){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||t!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,t)},F1t=function(r){var e=r[0],t=r[1],n=r[2];e.scrollLeft=t,e.scrollTop=n},L1t=":before",O1t=":after",lb="___html2canvas___pseudoelement_before",ub="___html2canvas___pseudoelement_after",u5=`{
content: "" !important;
display: none !important;
}`,R1t=function(r){M1t(r,"."+lb+L1t+u5+`
.`+ub+O1t+u5)},M1t=function(r,e){var t=r.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,r.appendChild(n)}},y7=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}(),N1t=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)||(gB(e)||Q1t(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 Ma(this,void 0,void 0,function(){var t,n,i,a,o=this;return ya(this,function(s){switch(s.label){case 0:return t=y7.isSameOrigin(e),n=!vB(e)&&this._options.useCORS===!0&&na.SUPPORT_CORS_IMAGES&&!t,i=!vB(e)&&!t&&!gB(e)&&typeof this._options.proxy=="string"&&na.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!vB(e)&&!gB(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,(H1t(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=na.SUPPORT_RESPONSE_TYPE?"blob":"text",A=new XMLHttpRequest;A.onload=function(){if(A.status===200)if(s==="text")a(A.response);else{var c=new FileReader;c.addEventListener("load",function(){return a(c.result)},!1),c.addEventListener("error",function(h){return o(h)},!1),c.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}(),P1t=/^data:image\/svg\+xml/i,U1t=/^data:image\/.*;base64,/i,D1t=/^data:image\/.*/i,Q1t=function(r){return na.SUPPORT_SVG_DRAWING||!G1t(r)},vB=function(r){return D1t.test(r)},H1t=function(r){return U1t.test(r)},gB=function(r){return r.substr(0,4)==="blob"},G1t=function(r){return r.substr(-3).toLowerCase()==="svg"||P1t.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}(),Cf=function(r,e,t){return new ae(r.x+(e.x-r.x)*t,r.y+(e.y-r.y)*t)},f0=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=Cf(this.start,this.startControl,e),i=Cf(this.startControl,this.endControl,e),a=Cf(this.endControl,this.end,e),o=Cf(n,i,e),s=Cf(i,a,e),A=Cf(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}(),Xo=function(r){return r.type===1},k1t=function(){function r(e){var t=e.styles,n=e.bounds,i=Cv(t.borderTopLeftRadius,n.width,n.height),a=i[0],o=i[1],s=Cv(t.borderTopRightRadius,n.width,n.height),A=s[0],l=s[1],u=Cv(t.borderBottomRightRadius,n.width,n.height),c=u[0],h=u[1],f=Cv(t.borderBottomLeftRadius,n.width,n.height),p=f[0],v=f[1],m=[];m.push((a+A)/n.width),m.push((p+c)/n.width),m.push((o+v)/n.height),m.push((l+h)/n.height);var g=Math.max.apply(Math,m);g>1&&(a/=g,o/=g,A/=g,l/=g,c/=g,h/=g,p/=g,v/=g);var _=n.width-A,E=n.height-h,B=n.width-c,L=n.height-v,O=t.borderTopWidth,b=t.borderRightWidth,T=t.borderBottomWidth,I=t.borderLeftWidth,M=yn(t.paddingTop,e.bounds.width),x=yn(t.paddingRight,e.bounds.width),S=yn(t.paddingBottom,e.bounds.width),N=yn(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?Fn(n.left+I/3,n.top+O/3,a-I/3,o-O/3,jr.TOP_LEFT):new ae(n.left+I/3,n.top+O/3),this.topRightBorderDoubleOuterBox=a>0||o>0?Fn(n.left+_,n.top+O/3,A-b/3,l-O/3,jr.TOP_RIGHT):new ae(n.left+n.width-b/3,n.top+O/3),this.bottomRightBorderDoubleOuterBox=c>0||h>0?Fn(n.left+B,n.top+E,c-b/3,h-T/3,jr.BOTTOM_RIGHT):new ae(n.left+n.width-b/3,n.top+n.height-T/3),this.bottomLeftBorderDoubleOuterBox=p>0||v>0?Fn(n.left+I/3,n.top+L,p-I/3,v-T/3,jr.BOTTOM_LEFT):new ae(n.left+I/3,n.top+n.height-T/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?Fn(n.left+I*2/3,n.top+O*2/3,a-I*2/3,o-O*2/3,jr.TOP_LEFT):new ae(n.left+I*2/3,n.top+O*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?Fn(n.left+_,n.top+O*2/3,A-b*2/3,l-O*2/3,jr.TOP_RIGHT):new ae(n.left+n.width-b*2/3,n.top+O*2/3),this.bottomRightBorderDoubleInnerBox=c>0||h>0?Fn(n.left+B,n.top+E,c-b*2/3,h-T*2/3,jr.BOTTOM_RIGHT):new ae(n.left+n.width-b*2/3,n.top+n.height-T*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||v>0?Fn(n.left+I*2/3,n.top+L,p-I*2/3,v-T*2/3,jr.BOTTOM_LEFT):new ae(n.left+I*2/3,n.top+n.height-T*2/3),this.topLeftBorderStroke=a>0||o>0?Fn(n.left+I/2,n.top+O/2,a-I/2,o-O/2,jr.TOP_LEFT):new ae(n.left+I/2,n.top+O/2),this.topRightBorderStroke=a>0||o>0?Fn(n.left+_,n.top+O/2,A-b/2,l-O/2,jr.TOP_RIGHT):new ae(n.left+n.width-b/2,n.top+O/2),this.bottomRightBorderStroke=c>0||h>0?Fn(n.left+B,n.top+E,c-b/2,h-T/2,jr.BOTTOM_RIGHT):new ae(n.left+n.width-b/2,n.top+n.height-T/2),this.bottomLeftBorderStroke=p>0||v>0?Fn(n.left+I/2,n.top+L,p-I/2,v-T/2,jr.BOTTOM_LEFT):new ae(n.left+I/2,n.top+n.height-T/2),this.topLeftBorderBox=a>0||o>0?Fn(n.left,n.top,a,o,jr.TOP_LEFT):new ae(n.left,n.top),this.topRightBorderBox=A>0||l>0?Fn(n.left+_,n.top,A,l,jr.TOP_RIGHT):new ae(n.left+n.width,n.top),this.bottomRightBorderBox=c>0||h>0?Fn(n.left+B,n.top+E,c,h,jr.BOTTOM_RIGHT):new ae(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||v>0?Fn(n.left,n.top+L,p,v,jr.BOTTOM_LEFT):new ae(n.left,n.top+n.height),this.topLeftPaddingBox=a>0||o>0?Fn(n.left+I,n.top+O,Math.max(0,a-I),Math.max(0,o-O),jr.TOP_LEFT):new ae(n.left+I,n.top+O),this.topRightPaddingBox=A>0||l>0?Fn(n.left+Math.min(_,n.width-b),n.top+O,_>n.width+b?0:Math.max(0,A-b),Math.max(0,l-O),jr.TOP_RIGHT):new ae(n.left+n.width-b,n.top+O),this.bottomRightPaddingBox=c>0||h>0?Fn(n.left+Math.min(B,n.width-I),n.top+Math.min(E,n.height-T),Math.max(0,c-b),Math.max(0,h-T),jr.BOTTOM_RIGHT):new ae(n.left+n.width-b,n.top+n.height-T),this.bottomLeftPaddingBox=p>0||v>0?Fn(n.left+I,n.top+Math.min(L,n.height-T),Math.max(0,p-I),Math.max(0,v-T),jr.BOTTOM_LEFT):new ae(n.left+I,n.top+n.height-T),this.topLeftContentBox=a>0||o>0?Fn(n.left+I+N,n.top+O+M,Math.max(0,a-(I+N)),Math.max(0,o-(O+M)),jr.TOP_LEFT):new ae(n.left+I+N,n.top+O+M),this.topRightContentBox=A>0||l>0?Fn(n.left+Math.min(_,n.width+I+N),n.top+O+M,_>n.width+I+N?0:A-I+N,l-(O+M),jr.TOP_RIGHT):new ae(n.left+n.width-(b+x),n.top+O+M),this.bottomRightContentBox=c>0||h>0?Fn(n.left+Math.min(B,n.width-(I+N)),n.top+Math.min(E,n.height+O+M),Math.max(0,c-(b+x)),h-(T+S),jr.BOTTOM_RIGHT):new ae(n.left+n.width-(b+x),n.top+n.height-(T+S)),this.bottomLeftContentBox=p>0||v>0?Fn(n.left+I+N,n.top+L,Math.max(0,p-(I+N)),v-(T+S),jr.BOTTOM_LEFT):new ae(n.left+I+N,n.top+n.height-(T+S))}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 Fn=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 f0(new ae(r,l),new ae(r,l-s),new ae(A-o,e),new ae(A,e));case jr.TOP_RIGHT:return new f0(new ae(r,e),new ae(r+o,e),new ae(A,l-s),new ae(A,l));case jr.BOTTOM_RIGHT:return new f0(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 f0(new ae(A,l),new ae(A-o,l),new ae(r,e+s),new ae(r,e))}},f1=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},$1t=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},p1=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},V1t=function(){function r(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return r}(),p0=function(){function r(e,t){this.path=e,this.target=t,this.type=1}return r}(),j1t=function(){function r(e){this.opacity=e,this.type=2,this.target=6}return r}(),K1t=function(r){return r.type===0},m7=function(r){return r.type===1},z1t=function(r){return r.type===2},c5=function(r,e){return r.length===e.length?r.some(function(t,n){return t===e[n]}):!1},Y1t=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})},_7=function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),w7=function(){function r(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new k1t(this.container),this.container.styles.opacity<1&&this.effects.push(new j1t(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 V1t(n,i,a))}if(this.container.styles.overflowX!==0){var o=f1(this.curves),s=p1(this.curves);c5(o,s)?this.effects.push(new p0(o,6)):(this.effects.push(new p0(o,2)),this.effects.push(new p0(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!m7(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=f1(n.curves),s=p1(n.curves);c5(o,s)||i.unshift(new p0(s,6))}}else i.unshift.apply(i,a);n=n.parent}return i.filter(function(A){return Mi(A.target,e)})},r}(),cb=function(r,e,t,n){r.container.elements.forEach(function(i){var a=Mi(i.flags,4),o=Mi(i.flags,2),s=new w7(i,r);Mi(i.styles.display,2048)&&n.push(s);var A=Mi(i.flags,8)?[]:n;if(a||o){var l=a||i.styles.isPositioned()?t:e,u=new _7(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var c=i.styles.zIndex.order;if(c<0){var h=0;l.negativeZIndex.some(function(p,v){return c>p.element.container.styles.zIndex.order?(h=v,!1):h>0}),l.negativeZIndex.splice(h,0,u)}else if(c>0){var f=0;l.positiveZIndex.some(function(p,v){return c>=p.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);cb(s,u,a?u:t,A)}else i.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),cb(s,e,t,A);Mi(i.flags,8)&&E7(i,A)})},E7=function(r,e){for(var t=r instanceof ob?r.start:1,n=r instanceof ob?r.reversed:!1,i=0;i<e.length;i++){var a=e[i];a.container instanceof a7&&typeof a.container.value=="number"&&a.container.value!==0&&(t=a.container.value),a.listValue=Fg(t,a.container.styles.listStyleType,!0),t+=n?-1:1}},X1t=function(r){var e=new w7(r,null),t=new _7(e),n=[];return cb(e,t,t,n),E7(e.container,n),t},h5=function(r,e){switch(e){case 0:return Zo(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return Zo(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return Zo(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return Zo(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},W1t=function(r,e){switch(e){case 0:return Zo(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return Zo(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return Zo(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return Zo(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},q1t=function(r,e){switch(e){case 0:return Zo(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return Zo(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return Zo(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return Zo(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},Z1t=function(r,e){switch(e){case 0:return d0(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return d0(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return d0(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return d0(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},d0=function(r,e){var t=[];return Xo(r)?t.push(r.subdivide(.5,!1)):t.push(r),Xo(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Zo=function(r,e,t,n){var i=[];return Xo(r)?i.push(r.subdivide(.5,!1)):i.push(r),Xo(t)?i.push(t.subdivide(.5,!0)):i.push(t),Xo(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),Xo(e)?i.push(e.subdivide(.5,!1).reverse()):i.push(e),i},C7=function(r){var e=r.bounds,t=r.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},d1=function(r){var e=r.styles,t=r.bounds,n=yn(e.paddingLeft,t.width),i=yn(e.paddingRight,t.width),a=yn(e.paddingTop,t.width),o=yn(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))},J1t=function(r,e){return r===0?e.bounds:r===2?d1(e):C7(e)},twt=function(r,e){return r===0?e.bounds:r===2?d1(e):C7(e)},yB=function(r,e,t){var n=J1t(Hf(r.styles.backgroundOrigin,e),r),i=twt(Hf(r.styles.backgroundClip,e),r),a=ewt(Hf(r.styles.backgroundSize,e),t,n),o=a[0],s=a[1],A=Cv(Hf(r.styles.backgroundPosition,e),n.width-o,n.height-s),l=rwt(Hf(r.styles.backgroundRepeat,e),A,a,n,i),u=Math.round(n.left+A[0]),c=Math.round(n.top+A[1]);return[l,u,c,o,s]},Bf=function(r){return an(r)&&r.value===gp.AUTO},v0=function(r){return typeof r=="number"},ewt=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(mi(o)&&s&&mi(s))return[yn(o,t.width),yn(s,t.height)];var A=v0(a);if(an(o)&&(o.value===gp.CONTAIN||o.value===gp.COVER)){if(v0(a)){var l=t.width/t.height;return l<a!=(o.value===gp.COVER)?[t.width,t.width/a]:[t.height*a,t.height]}return[t.width,t.height]}var u=v0(n),c=v0(i),h=u||c;if(Bf(o)&&(!s||Bf(s))){if(u&&c)return[n,i];if(!A&&!h)return[t.width,t.height];if(h&&A){var f=u?n:i*a,p=c?i:n/a;return[f,p]}var v=u?n:t.width,m=c?i:t.height;return[v,m]}if(A){var g=0,_=0;return mi(o)?g=yn(o,t.width):mi(s)&&(_=yn(s,t.height)),Bf(o)?g=_*a:(!s||Bf(s))&&(_=g/a),[g,_]}var E=null,B=null;if(mi(o)?E=yn(o,t.width):s&&mi(s)&&(B=yn(s,t.height)),E!==null&&(!s||Bf(s))&&(B=u&&c?E/n*i:t.height),B!==null&&Bf(o)&&(E=u&&c?B/i*n:t.width),E!==null&&B!==null)return[E,B];throw new Error("Unable to calculate background-size for element")},Hf=function(r,e){var t=r[e];return typeof t>"u"?r[0]:t},rwt=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))]}},nwt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",f5="Hidden Text",iwt=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=nwt,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(f5)),n.appendChild(a),n.appendChild(i);var s=i.offsetTop-a.offsetTop+2;n.removeChild(a),n.appendChild(this._document.createTextNode(f5)),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}(),B7=function(){function r(e,t){this.context=e,this.options=t}return r}(),awt=1e4,owt=function(r){Us(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 iwt(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(),z1t(t)&&(this.ctx.globalAlpha=t.opacity),K1t(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)),m7(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 Ma(this,void 0,void 0,function(){var n;return ya(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 Ma(this,void 0,void 0,function(){return ya(this,function(n){switch(n.label){case 0:if(Mi(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=pL(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=cwt(t.fontFamily).join(", "),a=py(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 Ma(this,void 0,void 0,function(){var i,a,o,s,A,l,u,c,h=this;return ya(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,c=n.paintOrder,t.textBounds.forEach(function(p){c.forEach(function(v){switch(v){case 0:h.ctx.fillStyle=ji(n.color),h.renderTextWithLetterSpacing(p,n.letterSpacing,l);var m=n.textShadow;m.length&&p.text.trim().length&&(m.slice(0).reverse().forEach(function(g){h.ctx.shadowColor=ji(g.color),h.ctx.shadowOffsetX=g.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=g.offsetY.number*h.options.scale,h.ctx.shadowBlur=g.blur.number,h.renderTextWithLetterSpacing(p,n.letterSpacing,l)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),n.textDecorationLine.length&&(h.ctx.fillStyle=ji(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(g){switch(g){case 1:h.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top+l),p.bounds.width,1);break;case 2:h.ctx.fillRect(p.bounds.left,Math.round(p.bounds.top),p.bounds.width,1);break;case 3:h.ctx.fillRect(p.bounds.left,Math.ceil(p.bounds.top+u),p.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&p.text.trim().length&&(h.ctx.strokeStyle=ji(n.webkitTextStrokeColor),h.ctx.lineWidth=n.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(p.text,p.bounds.left,p.bounds.top+l)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,n,i){if(i&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var a=d1(t),o=p1(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 Ma(this,void 0,void 0,function(){var n,i,a,o,s,A,_,_,l,u,c,h,B,f,p,L,v,m,g,_,E,B,L;return ya(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 r7))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 _=O.sent(),this.renderReplacedElement(n,i,_),[3,8];case 7:return O.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof n7&&this.renderReplacedElement(n,i,n.canvas),!(n instanceof i7))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 _=O.sent(),this.renderReplacedElement(n,i,_),[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 A7&&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 dL&&(c=Math.min(n.bounds.width,n.bounds.height),n.type===l1?n.checked&&(this.ctx.save(),this.path([new ae(n.bounds.left+c*.39363,n.bounds.top+c*.79),new ae(n.bounds.left+c*.16,n.bounds.top+c*.5549),new ae(n.bounds.left+c*.27347,n.bounds.top+c*.44071),new ae(n.bounds.left+c*.39694,n.bounds.top+c*.5649),new ae(n.bounds.left+c*.72983,n.bounds.top+c*.23),new ae(n.bounds.left+c*.84,n.bounds.top+c*.34085),new ae(n.bounds.left+c*.39363,n.bounds.top+c*.79)]),this.ctx.fillStyle=ji(t5),this.ctx.fill(),this.ctx.restore()):n.type===u1&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+c/2,n.bounds.top+c/2,c/4,0,Math.PI*2,!0),this.ctx.fillStyle=ji(t5),this.ctx.fill(),this.ctx.restore())),swt(n)&&n.value.length){switch(h=this.createFontStyle(a),B=h[0],f=h[1],p=this.fontMetrics.getMetrics(B,f).baseline,this.ctx.font=B,this.ctx.fillStyle=ji(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=lwt(n.styles.textAlign),L=d1(n),v=0,n.styles.textAlign){case 1:v+=L.width/2;break;case 2:v+=L.width;break}m=L.add(v,0,0,-L.height/2+1),this.ctx.save(),this.path([new ae(L.left,L.top),new ae(L.left+L.width,L.top),new ae(L.left+L.width,L.top+L.height),new ae(L.left,L.top+L.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Yv(n.value,m),a.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Mi(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(g=n.styles.listStyleImage,g.type!==0)return[3,18];_=void 0,E=g.url,O.label=15;case 15:return O.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return _=O.sent(),this.ctx.drawImage(_,n.bounds.left-(_.width+10),n.bounds.top),[3,18];case 17:return O.sent(),this.context.logger.error("Error loading list-style-image "+E),[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=ji(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",L=new hl(n.bounds.left,n.bounds.top+yn(n.styles.paddingTop,n.bounds.width),n.bounds.width,UP(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Yv(t.listValue,L),a.letterSpacing,UP(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 Ma(this,void 0,void 0,function(){var n,i,g,a,o,g,s,A,g,l,u,g,c,h,g,f,p,g,v,m,g;return ya(this,function(_){switch(_.label){case 0:if(Mi(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:_.sent(),n=0,i=t.negativeZIndex,_.label=2;case 2:return n<i.length?(g=i[n],[4,this.renderStack(g)]):[3,5];case 3:_.sent(),_.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:_.sent(),a=0,o=t.nonInlineLevel,_.label=7;case 7:return a<o.length?(g=o[a],[4,this.renderNode(g)]):[3,10];case 8:_.sent(),_.label=9;case 9:return a++,[3,7];case 10:s=0,A=t.nonPositionedFloats,_.label=11;case 11:return s<A.length?(g=A[s],[4,this.renderStack(g)]):[3,14];case 12:_.sent(),_.label=13;case 13:return s++,[3,11];case 14:l=0,u=t.nonPositionedInlineLevel,_.label=15;case 15:return l<u.length?(g=u[l],[4,this.renderStack(g)]):[3,18];case 16:_.sent(),_.label=17;case 17:return l++,[3,15];case 18:c=0,h=t.inlineLevel,_.label=19;case 19:return c<h.length?(g=h[c],[4,this.renderNode(g)]):[3,22];case 20:_.sent(),_.label=21;case 21:return c++,[3,19];case 22:f=0,p=t.zeroOrAutoZIndexOrTransformedOrOpacity,_.label=23;case 23:return f<p.length?(g=p[f],[4,this.renderStack(g)]):[3,26];case 24:_.sent(),_.label=25;case 25:return f++,[3,23];case 26:v=0,m=t.positiveZIndex,_.label=27;case 27:return v<m.length?(g=m[v],[4,this.renderStack(g)]):[3,30];case 28:_.sent(),_.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=Xo(i)?i.start:i;a===0?n.ctx.moveTo(o.x,o.y):n.ctx.lineTo(o.x,o.y),Xo(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 Ma(this,void 0,void 0,function(){var n,i,a,o,s,A;return ya(this,function(l){switch(l.label){case 0:n=t.styles.backgroundImage.length-1,i=function(u){var c,h,f,M,z,tt,N,P,T,p,M,z,tt,N,P,v,m,g,_,E,B,L,O,b,T,I,M,x,S,N,P,X,z,tt,J,nt,it,_t,R,$,K,q;return ya(this,function(at){switch(at.label){case 0:if(u.type!==0)return[3,5];c=void 0,h=u.url,at.label=1;case 1:return at.trys.push([1,3,,4]),[4,a.context.cache.match(h)];case 2:return c=at.sent(),[3,4];case 3:return at.sent(),a.context.logger.error("Error loading background-image "+h),[3,4];case 4:return c&&(f=yB(t,n,[c.width,c.height,c.width/c.height]),M=f[0],z=f[1],tt=f[2],N=f[3],P=f[4],T=a.ctx.createPattern(a.resizeImage(c,N,P),"repeat"),a.renderRepeat(M,T,z,tt)),[3,6];case 5:Kmt(u)?(p=yB(t,n,[null,null,null]),M=p[0],z=p[1],tt=p[2],N=p[3],P=p[4],v=Gmt(u.angle,N,P),m=v[0],g=v[1],_=v[2],E=v[3],B=v[4],L=document.createElement("canvas"),L.width=N,L.height=P,O=L.getContext("2d"),b=O.createLinearGradient(g,E,_,B),NP(u.stops,m).forEach(function(vt){return b.addColorStop(vt.stop,ji(vt.color))}),O.fillStyle=b,O.fillRect(0,0,N,P),N>0&&P>0&&(T=a.ctx.createPattern(L,"repeat"),a.renderRepeat(M,T,z,tt))):zmt(u)&&(I=yB(t,n,[null,null,null]),M=I[0],x=I[1],S=I[2],N=I[3],P=I[4],X=u.position.length===0?[cL]:u.position,z=yn(X[0],N),tt=yn(X[X.length-1],P),J=kmt(u,z,tt,N,P),nt=J[0],it=J[1],nt>0&&it>0&&(_t=a.ctx.createRadialGradient(x+z,S+tt,0,x+z,S+tt,nt),NP(u.stops,nt*2).forEach(function(vt){return _t.addColorStop(vt.stop,ji(vt.color))}),a.path(M),a.ctx.fillStyle=_t,nt!==it?(R=t.bounds.left+.5*t.bounds.width,$=t.bounds.top+.5*t.bounds.height,K=it/nt,q=1/K,a.ctx.save(),a.ctx.translate(R,$),a.ctx.transform(1,0,0,K,0,0),a.ctx.translate(-R,-$),a.ctx.fillRect(x,q*(S-$)+$,N,P*q),a.ctx.restore()):a.ctx.fill())),at.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 Ma(this,void 0,void 0,function(){return ya(this,function(a){return this.path(h5(i,n)),this.ctx.fillStyle=ji(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,i,a){return Ma(this,void 0,void 0,function(){var o,s;return ya(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=W1t(a,i),this.path(o),this.ctx.fillStyle=ji(t),this.ctx.fill(),s=q1t(a,i),this.path(s),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return Ma(this,void 0,void 0,function(){var n,i,a,o,s,A,l,u,c=this;return ya(this,function(h){switch(h.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,i=!bu(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=Awt(Hf(n.backgroundClip,0),t.curves),i||n.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),bu(n.backgroundColor)||(this.ctx.fillStyle=ji(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(t.container)]):[3,2];case 1:h.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(f){c.ctx.save();var p=f1(t.curves),v=f.inset?0:awt,m=Y1t(p,-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?(c.path(p),c.ctx.clip(),c.mask(m)):(c.mask(p),c.ctx.clip(),c.path(m)),c.ctx.shadowOffsetX=f.offsetX.number+v,c.ctx.shadowOffsetY=f.offsetY.number,c.ctx.shadowColor=ji(f.color),c.ctx.shadowBlur=f.blur.number,c.ctx.fillStyle=f.inset?ji(f.color):"rgba(0,0,0,1)",c.ctx.fill(),c.ctx.restore()}),h.label=2;case 2:s=0,A=0,l=a,h.label=3;case 3:return A<l.length?(u=l[A],u.style!==0&&!bu(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 h.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 h.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,s,t.curves)];case 8:return h.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,s,t.curves)];case 10:h.sent(),h.label=11;case 11:s++,h.label=12;case 12:return A++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,n,i,a,o){return Ma(this,void 0,void 0,function(){var s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,O,L,O;return ya(this,function(b){return this.ctx.save(),s=Z1t(a,i),A=h5(a,i),o===2&&(this.path(A),this.ctx.clip()),Xo(A[0])?(l=A[0].start.x,u=A[0].start.y):(l=A[0].x,u=A[0].y),Xo(A[1])?(c=A[1].end.x,h=A[1].end.y):(c=A[1].x,h=A[1].y),i===0||i===2?f=Math.abs(l-c):f=Math.abs(u-h),this.ctx.beginPath(),o===3?this.formatPath(s):this.formatPath(A.slice(0,2)),p=n<3?n*3:n*2,v=n<3?n*2:n,o===3&&(p=n,v=n),m=!0,f<=p*2?m=!1:f<=p*2+v?(g=f/(2*p+v),p*=g,v*=g):(_=Math.floor((f+v)/(p+v)),E=(f-_*p)/(_-1),B=(f-(_+1)*p)/_,v=B<=0||Math.abs(v-E)<Math.abs(v-B)?E:B),m&&(o===3?this.ctx.setLineDash([0,p+v]):this.ctx.setLineDash([p,v])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=ji(t),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(Xo(A[0])&&(L=A[3],O=A[0],this.ctx.beginPath(),this.formatPath([new ae(L.end.x,L.end.y),new ae(O.start.x,O.start.y)]),this.ctx.stroke()),Xo(A[1])&&(L=A[1],O=A[2],this.ctx.beginPath(),this.formatPath([new ae(L.end.x,L.end.y),new ae(O.start.x,O.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return Ma(this,void 0,void 0,function(){var n;return ya(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ji(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=X1t(t),[4,this.renderStack(n)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(B7),swt=function(r){return r instanceof s7||r instanceof o7?!0:r instanceof dL&&r.type!==u1&&r.type!==l1},Awt=function(r,e){switch(r){case 0:return f1(e);case 2:return $1t(e);case 1:default:return p1(e)}},lwt=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},uwt=["-apple-system","system-ui"],cwt=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(e){return uwt.indexOf(e)===-1}):r},hwt=function(r){Us(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 Ma(this,void 0,void 0,function(){var n,i;return ya(this,function(a){switch(a.label){case 0:return n=ab(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,fwt(n)];case 1:return i=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ji(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}(B7),fwt=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))})},pwt=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,Ym([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,Ym([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,Ym([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,Ym([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.instances={},r}(),dwt=function(){function r(e,t){var n;this.windowBounds=t,this.instanceName="#"+r.instanceCount++,this.logger=new pwt({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new N1t(this,e)}return r.instanceCount=1,r}(),vwt=function(r,e){return e===void 0&&(e={}),gwt(r,e)};typeof window<"u"&&y7.setContext(window);var gwt=function(r,e){return Ma(void 0,void 0,void 0,function(){var t,n,i,a,o,s,A,l,u,c,h,f,p,v,m,g,_,E,B,L,b,O,b,T,I,M,x,S,N,P,X,z,tt,J,nt,it,_t,R,$,K;return ya(this,function(q){switch(q.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:(I=e.imageTimeout)!==null&&I!==void 0?I:15e3,proxy:e.proxy,useCORS:(M=e.useCORS)!==null&&M!==void 0?M:!1},a=Vx({logging:(x=e.logging)!==null&&x!==void 0?x:!0,cache:e.cache},i),o={windowWidth:(S=e.windowWidth)!==null&&S!==void 0?S:n.innerWidth,windowHeight:(N=e.windowHeight)!==null&&N!==void 0?N:n.innerHeight,scrollX:(P=e.scrollX)!==null&&P!==void 0?P:n.pageXOffset,scrollY:(X=e.scrollY)!==null&&X!==void 0?X:n.pageYOffset},s=new hl(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),A=new dwt(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),c=new l5(A,r,u),h=c.clonedReferenceElement,h?[4,c.toIFrame(t,s)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=q.sent(),p=vL(h)||y1t(h)?Ygt(h.ownerDocument):Lw(A,h),v=p.width,m=p.height,g=p.left,_=p.top,E=ywt(A,h,e.backgroundColor),B={canvas:e.canvas,backgroundColor:E,scale:(nt=(J=e.scale)!==null&&J!==void 0?J:n.devicePixelRatio)!==null&&nt!==void 0?nt:1,x:((it=e.x)!==null&&it!==void 0?it:0)+g,y:((_t=e.y)!==null&&_t!==void 0?_t:0)+_,width:(R=e.width)!==null&&R!==void 0?R:Math.ceil(v),height:($=e.height)!==null&&$!==void 0?$:Math.ceil(m)},l?(A.logger.debug("Document cloned, using foreign object rendering"),b=new hwt(A,B),[4,b.render(h)]):[3,3];case 2:return L=q.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+g+","+_+" with size "+v+"x"+m+" using computed rendering"),A.logger.debug("Starting DOM parsing"),O=u7(A,h),E===O.styles.backgroundColor&&(O.styles.backgroundColor=il.TRANSPARENT),A.logger.debug("Starting renderer for element at "+B.x+","+B.y+" with size "+B.width+"x"+B.height),b=new owt(A,B),[4,b.render(O)];case 4:L=q.sent(),q.label=5;case 5:return(!((K=e.removeContainer)!==null&&K!==void 0)||K)&&(l5.destroy(f)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,L]}})})},ywt=function(r,e,t){var n=e.ownerDocument,i=n.documentElement?Kv(r,getComputedStyle(n.documentElement).backgroundColor):il.TRANSPARENT,a=n.body?Kv(r,getComputedStyle(n.body).backgroundColor):il.TRANSPARENT,o=typeof t=="string"?Kv(r,t):t===null?il.TRANSPARENT:4294967295;return e===n.documentElement?bu(i)?bu(a)?o:a:i:o},mwt=Object.freeze(Object.defineProperty({__proto__:null,default:vwt},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 _wt(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 wwt=Object.hasOwnProperty,p5=Object.setPrototypeOf,Ewt=Object.isFrozen,Cwt=Object.getPrototypeOf,Bwt=Object.getOwnPropertyDescriptor,za=Object.freeze,fl=Object.seal,Twt=Object.create,T7=typeof Reflect<"u"&&Reflect,v1=T7.apply,hb=T7.construct;v1||(v1=function(e,t,n){return e.apply(t,n)});za||(za=function(e){return e});fl||(fl=function(e){return e});hb||(hb=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(_wt(t))))});var Swt=Ls(Array.prototype.forEach),d5=Ls(Array.prototype.pop),tv=Ls(Array.prototype.push),J0=Ls(String.prototype.toLowerCase),v5=Ls(String.prototype.match),Jl=Ls(String.prototype.replace),xwt=Ls(String.prototype.indexOf),bwt=Ls(String.prototype.trim),Bo=Ls(RegExp.prototype.test),mB=Iwt(TypeError);function Ls(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 v1(r,e,n)}}function Iwt(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return hb(r,t)}}function cr(r,e){p5&&p5(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=J0(n);i!==n&&(Ewt(e)||(e[t]=i),n=i)}r[n]=!0}return r}function mc(r){var e=Twt(null),t=void 0;for(t in r)v1(wwt,r,[t])&&(e[t]=r[t]);return e}function g0(r,e){for(;r!==null;){var t=Bwt(r,e);if(t){if(t.get)return Ls(t.get);if(typeof t.value=="function")return Ls(t.value)}r=Cwt(r)}function n(i){return console.warn("fallback value for",i),null}return n}var g5=za(["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"]),_B=za(["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"]),wB=za(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Fwt=za(["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"]),EB=za(["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"]),Lwt=za(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),y5=za(["#text"]),m5=za(["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"]),CB=za(["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"]),_5=za(["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"]),y0=za(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Owt=fl(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Rwt=fl(/<%[\s\S]*|[\s\S]*%>/gm),Mwt=fl(/^data-[\-\w.\u00B7-\uFFFF]/),Nwt=fl(/^aria-[\-\w]+$/),Pwt=fl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Uwt=fl(/^(?:\w+script|data):/i),Dwt=fl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Sv=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 $s(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 Qwt=function(){return typeof window>"u"?null:window},Hwt=function(e,t){if((typeof e>"u"?"undefined":Sv(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 S7(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qwt(),e=function(ht){return S7(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,c=r.HTMLFormElement,h=r.DOMParser,f=r.trustedTypes,p=s.prototype,v=g0(p,"cloneNode"),m=g0(p,"nextSibling"),g=g0(p,"childNodes"),_=g0(p,"parentNode");if(typeof a=="function"){var E=n.createElement("template");E.content&&E.content.ownerDocument&&(n=E.content.ownerDocument)}var B=Hwt(f,t),L=B?B.createHTML(""):"",O=n,b=O.implementation,T=O.createNodeIterator,I=O.createDocumentFragment,M=O.getElementsByTagName,x=t.importNode,S={};try{S=mc(n).documentMode?n.documentMode:{}}catch{}var N={};e.isSupported=typeof _=="function"&&b&&typeof b.createHTMLDocument<"u"&&S!==9;var P=Owt,X=Rwt,z=Mwt,tt=Nwt,J=Uwt,nt=Dwt,it=Pwt,_t=null,R=cr({},[].concat($s(g5),$s(_B),$s(wB),$s(EB),$s(y5))),$=null,K=cr({},[].concat($s(m5),$s(CB),$s(_5),$s(y0))),q=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}})),at=null,vt=null,wt=!0,W=!0,It=!1,Ot=!1,j=!1,Z=!1,ut=!1,rt=!1,G=!1,xt=!1,bt=!0,dt=!0,Et=!1,yt={},St=null,Ft=cr({},["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"]),Mt=null,Vt=cr({},["audio","video","img","source","image","track"]),Yt=null,ie=cr({},["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,Xe=!1,Re=void 0,pr=["application/xhtml+xml","text/html"],Ie="text/html",xe=void 0,on=null,sr=n.createElement("form"),Ti=function(ht){return ht instanceof RegExp||ht instanceof Function},Br=function(ht){on&&on===ht||((!ht||(typeof ht>"u"?"undefined":Sv(ht))!=="object")&&(ht={}),ht=mc(ht),_t="ALLOWED_TAGS"in ht?cr({},ht.ALLOWED_TAGS):R,$="ALLOWED_ATTR"in ht?cr({},ht.ALLOWED_ATTR):K,Yt="ADD_URI_SAFE_ATTR"in ht?cr(mc(ie),ht.ADD_URI_SAFE_ATTR):ie,Mt="ADD_DATA_URI_TAGS"in ht?cr(mc(Vt),ht.ADD_DATA_URI_TAGS):Vt,St="FORBID_CONTENTS"in ht?cr({},ht.FORBID_CONTENTS):Ft,at="FORBID_TAGS"in ht?cr({},ht.FORBID_TAGS):{},vt="FORBID_ATTR"in ht?cr({},ht.FORBID_ATTR):{},yt="USE_PROFILES"in ht?ht.USE_PROFILES:!1,wt=ht.ALLOW_ARIA_ATTR!==!1,W=ht.ALLOW_DATA_ATTR!==!1,It=ht.ALLOW_UNKNOWN_PROTOCOLS||!1,Ot=ht.SAFE_FOR_TEMPLATES||!1,j=ht.WHOLE_DOCUMENT||!1,rt=ht.RETURN_DOM||!1,G=ht.RETURN_DOM_FRAGMENT||!1,xt=ht.RETURN_TRUSTED_TYPE||!1,ut=ht.FORCE_BODY||!1,bt=ht.SANITIZE_DOM!==!1,dt=ht.KEEP_CONTENT!==!1,Et=ht.IN_PLACE||!1,it=ht.ALLOWED_URI_REGEXP||it,Kt=ht.NAMESPACE||oe,ht.CUSTOM_ELEMENT_HANDLING&&Ti(ht.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(q.tagNameCheck=ht.CUSTOM_ELEMENT_HANDLING.tagNameCheck),ht.CUSTOM_ELEMENT_HANDLING&&Ti(ht.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(q.attributeNameCheck=ht.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),ht.CUSTOM_ELEMENT_HANDLING&&typeof ht.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(q.allowCustomizedBuiltInElements=ht.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Re=pr.indexOf(ht.PARSER_MEDIA_TYPE)===-1?Re=Ie:Re=ht.PARSER_MEDIA_TYPE,xe=Re==="application/xhtml+xml"?function(Qt){return Qt}:J0,Ot&&(W=!1),G&&(rt=!0),yt&&(_t=cr({},[].concat($s(y5))),$=[],yt.html===!0&&(cr(_t,g5),cr($,m5)),yt.svg===!0&&(cr(_t,_B),cr($,CB),cr($,y0)),yt.svgFilters===!0&&(cr(_t,wB),cr($,CB),cr($,y0)),yt.mathMl===!0&&(cr(_t,EB),cr($,_5),cr($,y0))),ht.ADD_TAGS&&(_t===R&&(_t=mc(_t)),cr(_t,ht.ADD_TAGS)),ht.ADD_ATTR&&($===K&&($=mc($)),cr($,ht.ADD_ATTR)),ht.ADD_URI_SAFE_ATTR&&cr(Yt,ht.ADD_URI_SAFE_ATTR),ht.FORBID_CONTENTS&&(St===Ft&&(St=mc(St)),cr(St,ht.FORBID_CONTENTS)),dt&&(_t["#text"]=!0),j&&cr(_t,["html","head","body"]),_t.table&&(cr(_t,["tbody"]),delete at.tbody),za&&za(ht),on=ht)},ci=cr({},["mi","mo","mn","ms","mtext"]),$r=cr({},["foreignobject","desc","title","annotation-xml"]),Vr=cr({},_B);cr(Vr,wB),cr(Vr,Fwt);var Me=cr({},EB);cr(Me,Lwt);var wr=function(ht){var Qt=_(ht);(!Qt||!Qt.tagName)&&(Qt={namespaceURI:oe,tagName:"template"});var qt=J0(ht.tagName),er=J0(Qt.tagName);if(ht.namespaceURI===Xt)return Qt.namespaceURI===oe?qt==="svg":Qt.namespaceURI===ee?qt==="svg"&&(er==="annotation-xml"||ci[er]):Boolean(Vr[qt]);if(ht.namespaceURI===ee)return Qt.namespaceURI===oe?qt==="math":Qt.namespaceURI===Xt?qt==="math"&&$r[er]:Boolean(Me[qt]);if(ht.namespaceURI===oe){if(Qt.namespaceURI===Xt&&!$r[er]||Qt.namespaceURI===ee&&!ci[er])return!1;var Or=cr({},["title","style","font","a","script"]);return!Me[qt]&&(Or[qt]||!Vr[qt])}return!1},Yn=function(ht){tv(e.removed,{element:ht});try{ht.parentNode.removeChild(ht)}catch{try{ht.outerHTML=L}catch{ht.remove()}}},fn=function(ht,Qt){try{tv(e.removed,{attribute:Qt.getAttributeNode(ht),from:Qt})}catch{tv(e.removed,{attribute:null,from:Qt})}if(Qt.removeAttribute(ht),ht==="is"&&!$[ht])if(rt||G)try{Yn(Qt)}catch{}else try{Qt.setAttribute(ht,"")}catch{}},Si=function(ht){var Qt=void 0,qt=void 0;if(ut)ht="<remove></remove>"+ht;else{var er=v5(ht,/^[\r\n\t ]+/);qt=er&&er[0]}Re==="application/xhtml+xml"&&(ht='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+ht+"</body></html>");var Or=B?B.createHTML(ht):ht;if(Kt===oe)try{Qt=new h().parseFromString(Or,Re)}catch{}if(!Qt||!Qt.documentElement){Qt=b.createDocument(Kt,"template",null);try{Qt.documentElement.innerHTML=Xe?"":Or}catch{}}var sn=Qt.body||Qt.documentElement;return ht&&qt&&sn.insertBefore(n.createTextNode(qt),sn.childNodes[0]||null),Kt===oe?M.call(Qt,j?"html":"body")[0]:j?Qt.documentElement:sn},xi=function(ht){return T.call(ht.ownerDocument||ht,ht,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT,null,!1)},be=function(ht){return ht instanceof c&&(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")},hi=function(ht){return(typeof o>"u"?"undefined":Sv(o))==="object"?ht instanceof o:ht&&(typeof ht>"u"?"undefined":Sv(ht))==="object"&&typeof ht.nodeType=="number"&&typeof ht.nodeName=="string"},Dn=function(ht,Qt,qt){N[ht]&&Swt(N[ht],function(er){er.call(e,Qt,qt,on)})},bi=function(ht){var Qt=void 0;if(Dn("beforeSanitizeElements",ht,null),be(ht)||v5(ht.nodeName,/[\u0080-\uFFFF]/))return Yn(ht),!0;var qt=xe(ht.nodeName);if(Dn("uponSanitizeElement",ht,{tagName:qt,allowedTags:_t}),!hi(ht.firstElementChild)&&(!hi(ht.content)||!hi(ht.content.firstElementChild))&&Bo(/<[/\w]/g,ht.innerHTML)&&Bo(/<[/\w]/g,ht.textContent)||qt==="select"&&Bo(/<template/i,ht.innerHTML))return Yn(ht),!0;if(!_t[qt]||at[qt]){if(dt&&!St[qt]){var er=_(ht)||ht.parentNode,Or=g(ht)||ht.childNodes;if(Or&&er)for(var sn=Or.length,Cn=sn-1;Cn>=0;--Cn)er.insertBefore(v(Or[Cn],!0),m(ht))}return!at[qt]&&qr(qt)&&(q.tagNameCheck instanceof RegExp&&Bo(q.tagNameCheck,qt)||q.tagNameCheck instanceof Function&&q.tagNameCheck(qt))?!1:(Yn(ht),!0)}return ht instanceof s&&!wr(ht)||(qt==="noscript"||qt==="noembed")&&Bo(/<\/no(script|embed)/i,ht.innerHTML)?(Yn(ht),!0):(Ot&&ht.nodeType===3&&(Qt=ht.textContent,Qt=Jl(Qt,P," "),Qt=Jl(Qt,X," "),ht.textContent!==Qt&&(tv(e.removed,{element:ht.cloneNode()}),ht.textContent=Qt)),Dn("afterSanitizeElements",ht,null),!1)},en=function(ht,Qt,qt){if(bt&&(Qt==="id"||Qt==="name")&&(qt in n||qt in sr))return!1;if(!(W&&!vt[Qt]&&Bo(z,Qt))){if(!(wt&&Bo(tt,Qt))){if(!$[Qt]||vt[Qt]){if(!(qr(ht)&&(q.tagNameCheck instanceof RegExp&&Bo(q.tagNameCheck,ht)||q.tagNameCheck instanceof Function&&q.tagNameCheck(ht))&&(q.attributeNameCheck instanceof RegExp&&Bo(q.attributeNameCheck,Qt)||q.attributeNameCheck instanceof Function&&q.attributeNameCheck(Qt))||Qt==="is"&&q.allowCustomizedBuiltInElements&&(q.tagNameCheck instanceof RegExp&&Bo(q.tagNameCheck,qt)||q.tagNameCheck instanceof Function&&q.tagNameCheck(qt))))return!1}else if(!Yt[Qt]){if(!Bo(it,Jl(qt,nt,""))){if(!((Qt==="src"||Qt==="xlink:href"||Qt==="href")&&ht!=="script"&&xwt(qt,"data:")===0&&Mt[ht])){if(!(It&&!Bo(J,Jl(qt,nt,"")))){if(qt)return!1}}}}}}return!0},qr=function(ht){return ht.indexOf("-")>0},En=function(ht){var Qt=void 0,qt=void 0,er=void 0,Or=void 0;Dn("beforeSanitizeAttributes",ht,null);var sn=ht.attributes;if(sn){var Cn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$};for(Or=sn.length;Or--;){Qt=sn[Or];var is=Qt,Ii=is.name,EA=is.namespaceURI;if(qt=bwt(Qt.value),er=xe(Ii),Cn.attrName=er,Cn.attrValue=qt,Cn.keepAttr=!0,Cn.forceKeepAttr=void 0,Dn("uponSanitizeAttribute",ht,Cn),qt=Cn.attrValue,!Cn.forceKeepAttr&&(fn(Ii,ht),!!Cn.keepAttr)){if(Bo(/\/>/i,qt)){fn(Ii,ht);continue}Ot&&(qt=Jl(qt,P," "),qt=Jl(qt,X," "));var Sl=xe(ht.nodeName);if(en(Sl,er,qt))try{EA?ht.setAttributeNS(EA,Ii,qt):ht.setAttribute(Ii,qt),d5(e.removed)}catch{}}}Dn("afterSanitizeAttributes",ht,null)}},mo=function se(ht){var Qt=void 0,qt=xi(ht);for(Dn("beforeSanitizeShadowDOM",ht,null);Qt=qt.nextNode();)Dn("uponSanitizeShadowNode",Qt,null),!bi(Qt)&&(Qt.content instanceof i&&se(Qt.content),En(Qt));Dn("afterSanitizeShadowDOM",ht,null)};return e.sanitize=function(se,ht){var Qt=void 0,qt=void 0,er=void 0,Or=void 0,sn=void 0;if(Xe=!se,Xe&&(se="<!-->"),typeof se!="string"&&!hi(se)){if(typeof se.toString!="function")throw mB("toString is not a function");if(se=se.toString(),typeof se!="string")throw mB("dirty is not a string, aborting")}if(!e.isSupported){if(Sv(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof se=="string")return r.toStaticHTML(se);if(hi(se))return r.toStaticHTML(se.outerHTML)}return se}if(Z||Br(ht),e.removed=[],typeof se=="string"&&(Et=!1),Et){if(se.nodeName){var Cn=xe(se.nodeName);if(!_t[Cn]||at[Cn])throw mB("root node is forbidden and cannot be sanitized in-place")}}else if(se instanceof o)Qt=Si("<!---->"),qt=Qt.ownerDocument.importNode(se,!0),qt.nodeType===1&&qt.nodeName==="BODY"||qt.nodeName==="HTML"?Qt=qt:Qt.appendChild(qt);else{if(!rt&&!Ot&&!j&&se.indexOf("<")===-1)return B&&xt?B.createHTML(se):se;if(Qt=Si(se),!Qt)return rt?null:xt?L:""}Qt&&ut&&Yn(Qt.firstChild);for(var is=xi(Et?se:Qt);er=is.nextNode();)er.nodeType===3&&er===Or||bi(er)||(er.content instanceof i&&mo(er.content),En(er),Or=er);if(Or=null,Et)return se;if(rt){if(G)for(sn=I.call(Qt.ownerDocument);Qt.firstChild;)sn.appendChild(Qt.firstChild);else sn=Qt;return $.shadowroot&&(sn=x.call(t,sn,!0)),sn}var Ii=j?Qt.outerHTML:Qt.innerHTML;return Ot&&(Ii=Jl(Ii,P," "),Ii=Jl(Ii,X," ")),B&&xt?B.createHTML(Ii):Ii},e.setConfig=function(se){Br(se),Z=!0},e.clearConfig=function(){on=null,Z=!1},e.isValidAttribute=function(se,ht,Qt){on||Br({});var qt=xe(se),er=xe(ht);return en(qt,er,Qt)},e.addHook=function(se,ht){typeof ht=="function"&&(N[se]=N[se]||[],tv(N[se],ht))},e.removeHook=function(se){N[se]&&d5(N[se])},e.removeHooks=function(se){N[se]&&(N[se]=[])},e.removeAllHooks=function(){N={}},e}var Gwt=S7(),kwt=Object.freeze(Object.defineProperty({__proto__:null,default:Gwt},Symbol.toStringTag,{value:"Module"})),m0=function(r){return r&&r.Math==Math&&r},Je=m0(typeof globalThis=="object"&&globalThis)||m0(typeof window=="object"&&window)||m0(typeof self=="object"&&self)||m0(typeof Zs=="object"&&Zs)||function(){return this}()||Function("return this")(),rd={},Bi=function(r){try{return!!r()}catch{return!0}},$wt=Bi,Bl=!$wt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Vwt=Bi,Gw=!Vwt(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),jwt=Gw,_0=Function.prototype.call,Do=jwt?_0.bind(_0):function(){return _0.apply(_0,arguments)},x7={},b7={}.propertyIsEnumerable,I7=Object.getOwnPropertyDescriptor,Kwt=I7&&!b7.call({1:2},1);x7.f=Kwt?function(e){var t=I7(this,e);return!!t&&t.enumerable}:b7;var kw=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}},F7=Gw,L7=Function.prototype,zwt=L7.bind,fb=L7.call,Ywt=F7&&zwt.bind(fb,fb),wn=F7?function(r){return r&&Ywt(r)}:function(r){return r&&function(){return fb.apply(r,arguments)}},O7=wn,Xwt=O7({}.toString),Wwt=O7("".slice),nd=function(r){return Wwt(Xwt(r),8,-1)},qwt=Je,Zwt=wn,Jwt=Bi,tEt=nd,BB=qwt.Object,eEt=Zwt("".split),R7=Jwt(function(){return!BB("z").propertyIsEnumerable(0)})?function(r){return tEt(r)=="String"?eEt(r,""):BB(r)}:BB,rEt=Je,nEt=rEt.TypeError,gA=function(r){if(r==null)throw nEt("Can't call method on "+r);return r},iEt=R7,aEt=gA,dy=function(r){return iEt(aEt(r))},Gi=function(r){return typeof r=="function"},oEt=Gi,ec=function(r){return typeof r=="object"?r!==null:oEt(r)},TB=Je,sEt=Gi,AEt=function(r){return sEt(r)?r:void 0},Dh=function(r,e){return arguments.length<2?AEt(TB[r]):TB[r]&&TB[r][e]},lEt=wn,$w=lEt({}.isPrototypeOf),uEt=Dh,Vw=uEt("navigator","userAgent")||"",M7=Je,SB=Vw,w5=M7.process,E5=M7.Deno,C5=w5&&w5.versions||E5&&E5.version,B5=C5&&C5.v8,ws,g1;B5&&(ws=B5.split("."),g1=ws[0]>0&&ws[0]<4?1:+(ws[0]+ws[1]));!g1&&SB&&(ws=SB.match(/Edge\/(\d+)/),(!ws||ws[1]>=74)&&(ws=SB.match(/Chrome\/(\d+)/),ws&&(g1=+ws[1])));var gL=g1,T5=gL,cEt=Bi,N7=!!Object.getOwnPropertySymbols&&!cEt(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&T5&&T5<41}),hEt=N7,P7=hEt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",fEt=Je,pEt=Dh,dEt=Gi,vEt=$w,gEt=P7,yEt=fEt.Object,U7=gEt?function(r){return typeof r=="symbol"}:function(r){var e=pEt("Symbol");return dEt(e)&&vEt(e.prototype,yEt(r))},mEt=Je,_Et=mEt.String,jw=function(r){try{return _Et(r)}catch{return"Object"}},wEt=Je,EEt=Gi,CEt=jw,BEt=wEt.TypeError,id=function(r){if(EEt(r))return r;throw BEt(CEt(r)+" is not a function")},TEt=id,ad=function(r,e){var t=r[e];return t==null?void 0:TEt(t)},SEt=Je,xB=Do,bB=Gi,IB=ec,xEt=SEt.TypeError,bEt=function(r,e){var t,n;if(e==="string"&&bB(t=r.toString)&&!IB(n=xB(t,r))||bB(t=r.valueOf)&&!IB(n=xB(t,r))||e!=="string"&&bB(t=r.toString)&&!IB(n=xB(t,r)))return n;throw xEt("Can't convert object to primitive value")},Kw={exports:{}},S5=Je,IEt=Object.defineProperty,yL=function(r,e){try{IEt(S5,r,{value:e,configurable:!0,writable:!0})}catch{S5[r]=e}return e},FEt=Je,LEt=yL,x5="__core-js_shared__",OEt=FEt[x5]||LEt(x5,{}),mL=OEt,b5=mL;(Kw.exports=function(r,e){return b5[r]||(b5[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 REt=Je,MEt=gA,NEt=REt.Object,zw=function(r){return NEt(MEt(r))},PEt=wn,UEt=zw,DEt=PEt({}.hasOwnProperty),yA=Object.hasOwn||function(e,t){return DEt(UEt(e),t)},QEt=wn,HEt=0,GEt=Math.random(),kEt=QEt(1 .toString),D7=function(r){return"Symbol("+(r===void 0?"":r)+")_"+kEt(++HEt+GEt,36)},$Et=Je,VEt=Kw.exports,I5=yA,jEt=D7,F5=N7,Q7=P7,Tf=VEt("wks"),rh=$Et.Symbol,L5=rh&&rh.for,KEt=Q7?rh:rh&&rh.withoutSetter||jEt,Zi=function(r){if(!I5(Tf,r)||!(F5||typeof Tf[r]=="string")){var e="Symbol."+r;F5&&I5(rh,r)?Tf[r]=rh[r]:Q7&&L5?Tf[r]=L5(e):Tf[r]=KEt(e)}return Tf[r]},zEt=Je,YEt=Do,O5=ec,R5=U7,XEt=ad,WEt=bEt,qEt=Zi,ZEt=zEt.TypeError,JEt=qEt("toPrimitive"),tCt=function(r,e){if(!O5(r)||R5(r))return r;var t=XEt(r,JEt),n;if(t){if(e===void 0&&(e="default"),n=YEt(t,r,e),!O5(n)||R5(n))return n;throw ZEt("Can't convert object to primitive value")}return e===void 0&&(e="number"),WEt(r,e)},eCt=tCt,rCt=U7,_L=function(r){var e=eCt(r,"string");return rCt(e)?e:e+""},nCt=Je,M5=ec,pb=nCt.document,iCt=M5(pb)&&M5(pb.createElement),Yw=function(r){return iCt?pb.createElement(r):{}},aCt=Bl,oCt=Bi,sCt=Yw,H7=!aCt&&!oCt(function(){return Object.defineProperty(sCt("div"),"a",{get:function(){return 7}}).a!=7}),ACt=Bl,lCt=Do,uCt=x7,cCt=kw,hCt=dy,fCt=_L,pCt=yA,dCt=H7,N5=Object.getOwnPropertyDescriptor;rd.f=ACt?N5:function(e,t){if(e=hCt(e),t=fCt(t),dCt)try{return N5(e,t)}catch{}if(pCt(e,t))return cCt(!lCt(uCt.f,e,t),e[t])};var Tl={},vCt=Bl,gCt=Bi,G7=vCt&&gCt(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),k7=Je,yCt=ec,mCt=k7.String,_Ct=k7.TypeError,Fa=function(r){if(yCt(r))return r;throw _Ct(mCt(r)+" is not an object")},wCt=Je,ECt=Bl,CCt=H7,BCt=G7,w0=Fa,P5=_L,TCt=wCt.TypeError,FB=Object.defineProperty,SCt=Object.getOwnPropertyDescriptor,LB="enumerable",OB="configurable",RB="writable";Tl.f=ECt?BCt?function(e,t,n){if(w0(e),t=P5(t),w0(n),typeof e=="function"&&t==="prototype"&&"value"in n&&RB in n&&!n[RB]){var i=SCt(e,t);i&&i[RB]&&(e[t]=n.value,n={configurable:OB in n?n[OB]:i[OB],enumerable:LB in n?n[LB]:i[LB],writable:!1})}return FB(e,t,n)}:FB:function(e,t,n){if(w0(e),t=P5(t),w0(n),CCt)try{return FB(e,t,n)}catch{}if("get"in n||"set"in n)throw TCt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var xCt=Bl,bCt=Tl,ICt=kw,od=xCt?function(r,e,t){return bCt.f(r,e,ICt(1,t))}:function(r,e,t){return r[e]=t,r},rc={exports:{}},FCt=wn,LCt=Gi,db=mL,OCt=FCt(Function.toString);LCt(db.inspectSource)||(db.inspectSource=function(r){return OCt(r)});var Xw=db.inspectSource,RCt=Je,MCt=Gi,NCt=Xw,U5=RCt.WeakMap,PCt=MCt(U5)&&/native code/.test(NCt(U5)),UCt=Kw.exports,DCt=D7,D5=UCt("keys"),wL=function(r){return D5[r]||(D5[r]=DCt(r))},EL={},QCt=PCt,$7=Je,MB=wn,HCt=ec,GCt=od,NB=yA,PB=mL,kCt=wL,$Ct=EL,Q5="Object already initialized",vb=$7.TypeError,VCt=$7.WeakMap,y1,Lg,m1,jCt=function(r){return m1(r)?Lg(r):y1(r,{})},KCt=function(r){return function(e){var t;if(!HCt(e)||(t=Lg(e)).type!==r)throw vb("Incompatible receiver, "+r+" required");return t}};if(QCt||PB.state){var _c=PB.state||(PB.state=new VCt),zCt=MB(_c.get),H5=MB(_c.has),YCt=MB(_c.set);y1=function(r,e){if(H5(_c,r))throw new vb(Q5);return e.facade=r,YCt(_c,r,e),e},Lg=function(r){return zCt(_c,r)||{}},m1=function(r){return H5(_c,r)}}else{var Sf=kCt("state");$Ct[Sf]=!0,y1=function(r,e){if(NB(r,Sf))throw new vb(Q5);return e.facade=r,GCt(r,Sf,e),e},Lg=function(r){return NB(r,Sf)?r[Sf]:{}},m1=function(r){return NB(r,Sf)}}var Ww={set:y1,get:Lg,has:m1,enforce:jCt,getterFor:KCt},gb=Bl,XCt=yA,V7=Function.prototype,WCt=gb&&Object.getOwnPropertyDescriptor,CL=XCt(V7,"name"),qCt=CL&&function(){}.name==="something",ZCt=CL&&(!gb||gb&&WCt(V7,"name").configurable),qw={EXISTS:CL,PROPER:qCt,CONFIGURABLE:ZCt},JCt=Je,G5=Gi,tBt=yA,k5=od,eBt=yL,rBt=Xw,j7=Ww,nBt=qw.CONFIGURABLE,iBt=j7.get,aBt=j7.enforce,oBt=String(String).split("String");(rc.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(G5(t)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!tBt(t,"name")||nBt&&t.name!==s)&&k5(t,"name",s),A=aBt(t),A.source||(A.source=oBt.join(typeof s=="string"?s:""))),r===JCt){a?r[e]=t:eBt(e,t);return}else i?!o&&r[e]&&(a=!0):delete r[e];a?r[e]=t:k5(r,e,t)})(Function.prototype,"toString",function(){return G5(this)&&iBt(this).source||rBt(this)});var K7={},sBt=Math.ceil,ABt=Math.floor,Zw=function(r){var e=+r;return e!==e||e===0?0:(e>0?ABt:sBt)(e)},lBt=Zw,uBt=Math.max,cBt=Math.min,z7=function(r,e){var t=lBt(r);return t<0?uBt(t+e,0):cBt(t,e)},hBt=Zw,fBt=Math.min,sd=function(r){return r>0?fBt(hBt(r),9007199254740991):0},pBt=sd,Jw=function(r){return pBt(r.length)},dBt=dy,vBt=z7,gBt=Jw,$5=function(r){return function(e,t,n){var i=dBt(e),a=gBt(i),o=vBt(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}},Y7={includes:$5(!0),indexOf:$5(!1)},yBt=wn,UB=yA,mBt=dy,_Bt=Y7.indexOf,wBt=EL,V5=yBt([].push),X7=function(r,e){var t=mBt(r),n=0,i=[],a;for(a in t)!UB(wBt,a)&&UB(t,a)&&V5(i,a);for(;e.length>n;)UB(t,a=e[n++])&&(~_Bt(i,a)||V5(i,a));return i},BL=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],EBt=X7,CBt=BL,BBt=CBt.concat("length","prototype");K7.f=Object.getOwnPropertyNames||function(e){return EBt(e,BBt)};var W7={};W7.f=Object.getOwnPropertySymbols;var TBt=Dh,SBt=wn,xBt=K7,bBt=W7,IBt=Fa,FBt=SBt([].concat),LBt=TBt("Reflect","ownKeys")||function(e){var t=xBt.f(IBt(e)),n=bBt.f;return n?FBt(t,n(e)):t},j5=yA,OBt=LBt,RBt=rd,MBt=Tl,NBt=function(r,e,t){for(var n=OBt(e),i=MBt.f,a=RBt.f,o=0;o<n.length;o++){var s=n[o];!j5(r,s)&&!(t&&j5(t,s))&&i(r,s,a(e,s))}},PBt=Bi,UBt=Gi,DBt=/#|\.prototype\./,vy=function(r,e){var t=HBt[QBt(r)];return t==kBt?!0:t==GBt?!1:UBt(e)?PBt(e):!!e},QBt=vy.normalize=function(r){return String(r).replace(DBt,".").toLowerCase()},HBt=vy.data={},GBt=vy.NATIVE="N",kBt=vy.POLYFILL="P",q7=vy,DB=Je,$Bt=rd.f,VBt=od,jBt=rc.exports,KBt=yL,zBt=NBt,YBt=q7,mA=function(r,e){var t=r.target,n=r.global,i=r.stat,a,o,s,A,l,u;if(n?o=DB:i?o=DB[t]||KBt(t,{}):o=(DB[t]||{}).prototype,o)for(s in e){if(l=e[s],r.noTargetGet?(u=$Bt(o,s),A=u&&u.value):A=o[s],a=YBt(n?s:t+(i?".":"#")+s,r.forced),!a&&A!==void 0){if(typeof l==typeof A)continue;zBt(l,A)}(r.sham||A&&A.sham)&&VBt(l,"sham",!0),jBt(o,s,l,r)}},XBt=Je,WBt=XBt.Promise,qBt=rc.exports,ZBt=function(r,e,t){for(var n in e)qBt(r,n,e[n],t);return r},Z7=Je,JBt=Gi,tTt=Z7.String,eTt=Z7.TypeError,rTt=function(r){if(typeof r=="object"||JBt(r))return r;throw eTt("Can't set "+tTt(r)+" as a prototype")},nTt=wn,iTt=Fa,aTt=rTt,J7=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=nTt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(e,[]),r=e instanceof Array}catch{}return function(i,a){return iTt(i),aTt(a),r?t(i,a):i.__proto__=a,i}}():void 0),oTt=Tl.f,sTt=yA,ATt=Zi,K5=ATt("toStringTag"),TL=function(r,e,t){r&&!t&&(r=r.prototype),r&&!sTt(r,K5)&&oTt(r,K5,{configurable:!0,value:e})},lTt=Dh,uTt=Tl,cTt=Zi,hTt=Bl,z5=cTt("species"),fTt=function(r){var e=lTt(r),t=uTt.f;hTt&&e&&!e[z5]&&t(e,z5,{configurable:!0,get:function(){return this}})},pTt=Je,dTt=$w,vTt=pTt.TypeError,gTt=function(r,e){if(dTt(e,r))return r;throw vTt("Incorrect invocation")},Y5=wn,yTt=id,mTt=Gw,_Tt=Y5(Y5.bind),SL=function(r,e){return yTt(r),e===void 0?r:mTt?_Tt(r,e):function(){return r.apply(e,arguments)}},gy={},wTt=Zi,ETt=gy,CTt=wTt("iterator"),BTt=Array.prototype,TTt=function(r){return r!==void 0&&(ETt.Array===r||BTt[CTt]===r)},STt=Zi,xTt=STt("toStringTag"),tG={};tG[xTt]="z";var bTt=String(tG)==="[object z]",ITt=Je,FTt=bTt,LTt=Gi,t_=nd,OTt=Zi,RTt=OTt("toStringTag"),MTt=ITt.Object,NTt=t_(function(){return arguments}())=="Arguments",PTt=function(r,e){try{return r[e]}catch{}},xL=FTt?t_:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=PTt(e=MTt(r),RTt))=="string"?t:NTt?t_(e):(n=t_(e))=="Object"&&LTt(e.callee)?"Arguments":n},UTt=xL,X5=ad,DTt=gy,QTt=Zi,HTt=QTt("iterator"),eG=function(r){if(r!=null)return X5(r,HTt)||X5(r,"@@iterator")||DTt[UTt(r)]},GTt=Je,kTt=Do,$Tt=id,VTt=Fa,jTt=jw,KTt=eG,zTt=GTt.TypeError,YTt=function(r,e){var t=arguments.length<2?KTt(r):e;if($Tt(t))return VTt(kTt(t,r));throw zTt(jTt(r)+" is not iterable")},XTt=Do,W5=Fa,WTt=ad,qTt=function(r,e,t){var n,i;W5(r);try{if(n=WTt(r,"return"),!n){if(e==="throw")throw t;return t}n=XTt(n,r)}catch(a){i=!0,n=a}if(e==="throw")throw t;if(i)throw n;return W5(n),t},ZTt=Je,JTt=SL,tSt=Do,eSt=Fa,rSt=jw,nSt=TTt,iSt=Jw,q5=$w,aSt=YTt,oSt=eG,Z5=qTt,sSt=ZTt.TypeError,e_=function(r,e){this.stopped=r,this.result=e},J5=e_.prototype,ASt=function(r,e,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_ITERATOR),o=!!(t&&t.INTERRUPTED),s=JTt(e,n),A,l,u,c,h,f,p,v=function(g){return A&&Z5(A,"normal",g),new e_(!0,g)},m=function(g){return i?(eSt(g),o?s(g[0],g[1],v):s(g[0],g[1])):o?s(g,v):s(g)};if(a)A=r;else{if(l=oSt(r),!l)throw sSt(rSt(r)+" is not iterable");if(nSt(l)){for(u=0,c=iSt(r);c>u;u++)if(h=m(r[u]),h&&q5(J5,h))return h;return new e_(!1)}A=aSt(r,l)}for(f=A.next;!(p=tSt(f,A)).done;){try{h=m(p.value)}catch(g){Z5(A,"throw",g)}if(typeof h=="object"&&h&&q5(J5,h))return h}return new e_(!1)},lSt=Zi,rG=lSt("iterator"),nG=!1;try{var uSt=0,tU={next:function(){return{done:!!uSt++}},return:function(){nG=!0}};tU[rG]=function(){return this},Array.from(tU,function(){throw 2})}catch{}var cSt=function(r,e){if(!e&&!nG)return!1;var t=!1;try{var n={};n[rG]=function(){return{next:function(){return{done:t=!0}}}},r(n)}catch{}return t},hSt=wn,fSt=Bi,iG=Gi,pSt=xL,dSt=Dh,vSt=Xw,aG=function(){},gSt=[],oG=dSt("Reflect","construct"),bL=/^\s*(?:class|function)\b/,ySt=hSt(bL.exec),mSt=!bL.exec(aG),ev=function(e){if(!iG(e))return!1;try{return oG(aG,gSt,e),!0}catch{return!1}},sG=function(e){if(!iG(e))return!1;switch(pSt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mSt||!!ySt(bL,vSt(e))}catch{return!0}};sG.sham=!0;var _St=!oG||fSt(function(){var r;return ev(ev.call)||!ev(Object)||!ev(function(){r=!0})||r})?sG:ev,wSt=Je,ESt=_St,CSt=jw,BSt=wSt.TypeError,TSt=function(r){if(ESt(r))return r;throw BSt(CSt(r)+" is not a constructor")},eU=Fa,SSt=TSt,xSt=Zi,bSt=xSt("species"),AG=function(r,e){var t=eU(r).constructor,n;return t===void 0||(n=eU(t)[bSt])==null?e:SSt(n)},ISt=Gw,lG=Function.prototype,rU=lG.apply,nU=lG.call,IL=typeof Reflect=="object"&&Reflect.apply||(ISt?nU.bind(rU):function(){return nU.apply(rU,arguments)}),FSt=Dh,uG=FSt("document","documentElement"),LSt=wn,OSt=LSt([].slice),RSt=Vw,cG=/(?:ipad|iphone|ipod).*applewebkit/i.test(RSt),MSt=nd,NSt=Je,tE=MSt(NSt.process)=="process",Oo=Je,PSt=IL,USt=SL,iU=Gi,DSt=yA,QSt=Bi,aU=uG,HSt=OSt,oU=Yw,GSt=cG,kSt=tE,yb=Oo.setImmediate,mb=Oo.clearImmediate,$St=Oo.process,QB=Oo.Dispatch,VSt=Oo.Function,sU=Oo.MessageChannel,jSt=Oo.String,HB=0,Wv={},AU="onreadystatechange",Og,wc,GB,kB;try{Og=Oo.location}catch{}var FL=function(r){if(DSt(Wv,r)){var e=Wv[r];delete Wv[r],e()}},$B=function(r){return function(){FL(r)}},lU=function(r){FL(r.data)},uU=function(r){Oo.postMessage(jSt(r),Og.protocol+"//"+Og.host)};(!yb||!mb)&&(yb=function(e){var t=HSt(arguments,1);return Wv[++HB]=function(){PSt(iU(e)?e:VSt(e),void 0,t)},wc(HB),HB},mb=function(e){delete Wv[e]},kSt?wc=function(r){$St.nextTick($B(r))}:QB&&QB.now?wc=function(r){QB.now($B(r))}:sU&&!GSt?(GB=new sU,kB=GB.port2,GB.port1.onmessage=lU,wc=USt(kB.postMessage,kB)):Oo.addEventListener&&iU(Oo.postMessage)&&!Oo.importScripts&&Og&&Og.protocol!=="file:"&&!QSt(uU)?(wc=uU,Oo.addEventListener("message",lU,!1)):AU in oU("script")?wc=function(r){aU.appendChild(oU("script"))[AU]=function(){aU.removeChild(this),FL(r)}}:wc=function(r){setTimeout($B(r),0)});var hG={set:yb,clear:mb},KSt=Vw,zSt=Je,YSt=/ipad|iphone|ipod/i.test(KSt)&&zSt.Pebble!==void 0,XSt=Vw,WSt=/web0s(?!.*chrome)/i.test(XSt),mh=Je,cU=SL,qSt=rd.f,VB=hG.set,ZSt=cG,JSt=YSt,txt=WSt,jB=tE,hU=mh.MutationObserver||mh.WebKitMutationObserver,fU=mh.document,pU=mh.process,E0=mh.Promise,dU=qSt(mh,"queueMicrotask"),fG=dU&&dU.value,rv,Mc,qv,Gf,KB,zB,C0,vU;fG||(rv=function(){var r,e;for(jB&&(r=pU.domain)&&r.exit();Mc;){e=Mc.fn,Mc=Mc.next;try{e()}catch(t){throw Mc?Gf():qv=void 0,t}}qv=void 0,r&&r.enter()},!ZSt&&!jB&&!txt&&hU&&fU?(KB=!0,zB=fU.createTextNode(""),new hU(rv).observe(zB,{characterData:!0}),Gf=function(){zB.data=KB=!KB}):!JSt&&E0&&E0.resolve?(C0=E0.resolve(void 0),C0.constructor=E0,vU=cU(C0.then,C0),Gf=function(){vU(rv)}):jB?Gf=function(){pU.nextTick(rv)}:(VB=cU(VB,mh),Gf=function(){VB(rv)}));var ext=fG||function(r){var e={fn:r,next:void 0};qv&&(qv.next=e),Mc||(Mc=e,Gf()),qv=e},LL={},gU=id,rxt=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=gU(e),this.reject=gU(t)};LL.f=function(r){return new rxt(r)};var nxt=Fa,ixt=ec,axt=LL,oxt=function(r,e){if(nxt(r),ixt(e)&&e.constructor===r)return e;var t=axt.f(r),n=t.resolve;return n(e),t.promise},sxt=Je,Axt=function(r,e){var t=sxt.console;t&&t.error&&(arguments.length==1?t.error(r):t.error(r,e))},lxt=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}},pG=function(){this.head=null,this.tail=null};pG.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 uxt=pG,cxt=typeof window=="object",eE=mA,pl=Je,hxt=Dh,dl=Do,_1=WBt,yU=rc.exports,fxt=ZBt,mU=J7,pxt=TL,dxt=fTt,_b=id,Zv=Gi,vxt=ec,gxt=gTt,yxt=Xw,_U=ASt,mxt=cSt,_xt=AG,dG=hG.set,OL=ext,wxt=oxt,Ext=Axt,vG=LL,wb=lxt,Cxt=uxt,RL=Ww,Bxt=q7,Txt=Zi,Sxt=cxt,w1=tE,wU=gL,xxt=Txt("species"),_A="Promise",EU=RL.getterFor(_A),bxt=RL.set,Ixt=RL.getterFor(_A),Ic=_1&&_1.prototype,Bs=_1,nv=Ic,gG=pl.TypeError,Eb=pl.document,ML=pl.process,Up=vG.f,Fxt=Up,Lxt=!!(Eb&&Eb.createEvent&&pl.dispatchEvent),yG=Zv(pl.PromiseRejectionEvent),mG="unhandledrejection",Oxt="rejectionhandled",CU=0,_G=1,Rxt=2,NL=1,wG=2,Cb=!1,B0,BU,EG,TU,yy=Bxt(_A,function(){var r=yxt(Bs),e=r!==String(Bs);if(!e&&wU===66)return!0;if(wU>=51&&/native code/.test(r))return!1;var t=new Bs(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=t.constructor={};return i[xxt]=n,Cb=t.then(function(){})instanceof n,Cb?!e&&Sxt&&!yG:!0}),Mxt=yy||!mxt(function(r){Bs.all(r).catch(function(){})}),CG=function(r){var e;return vxt(r)&&Zv(e=r.then)?e:!1},BG=function(r,e){var t=e.value,n=e.state==_G,i=n?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,A,l,u;try{i?(n||(e.rejection===wG&&Pxt(e),e.rejection=NL),i===!0?A=t:(s&&s.enter(),A=i(t),s&&(s.exit(),u=!0)),A===r.promise?o(gG("Promise-chain cycle")):(l=CG(A))?dl(l,A,a,o):a(A)):o(t)}catch(c){s&&!u&&s.exit(),o(c)}},TG=function(r,e){r.notified||(r.notified=!0,OL(function(){for(var t=r.reactions,n;n=t.get();)BG(n,r);r.notified=!1,e&&!r.rejection&&Nxt(r)}))},SG=function(r,e,t){var n,i;Lxt?(n=Eb.createEvent("Event"),n.promise=e,n.reason=t,n.initEvent(r,!1,!0),pl.dispatchEvent(n)):n={promise:e,reason:t},!yG&&(i=pl["on"+r])?i(n):r===mG&&Ext("Unhandled promise rejection",t)},Nxt=function(r){dl(dG,pl,function(){var e=r.facade,t=r.value,n=SU(r),i;if(n&&(i=wb(function(){w1?ML.emit("unhandledRejection",t,e):SG(mG,e,t)}),r.rejection=w1||SU(r)?wG:NL,i.error))throw i.value})},SU=function(r){return r.rejection!==NL&&!r.parent},Pxt=function(r){dl(dG,pl,function(){var e=r.facade;w1?ML.emit("rejectionHandled",e):SG(Oxt,e,r.value)})},Zf=function(r,e,t){return function(n){r(e,n,t)}},yp=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=Rxt,TG(r,!0))},Bb=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw gG("Promise can't be resolved itself");var n=CG(e);n?OL(function(){var i={done:!1};try{dl(n,e,Zf(Bb,i,r),Zf(yp,i,r))}catch(a){yp(i,a,r)}}):(r.value=e,r.state=_G,TG(r,!1))}catch(i){yp({done:!1},i,r)}}};if(yy&&(Bs=function(e){gxt(this,nv),_b(e),dl(B0,this);var t=EU(this);try{e(Zf(Bb,t),Zf(yp,t))}catch(n){yp(t,n)}},nv=Bs.prototype,B0=function(e){bxt(this,{type:_A,done:!1,notified:!1,parent:!1,reactions:new Cxt,rejection:!1,state:CU,value:void 0})},B0.prototype=fxt(nv,{then:function(e,t){var n=Ixt(this),i=Up(_xt(this,Bs));return n.parent=!0,i.ok=Zv(e)?e:!0,i.fail=Zv(t)&&t,i.domain=w1?ML.domain:void 0,n.state==CU?n.reactions.add(i):OL(function(){BG(i,n)}),i.promise},catch:function(r){return this.then(void 0,r)}}),BU=function(){var r=new B0,e=EU(r);this.promise=r,this.resolve=Zf(Bb,e),this.reject=Zf(yp,e)},vG.f=Up=function(r){return r===Bs||r===EG?new BU(r):Fxt(r)},Zv(_1)&&Ic!==Object.prototype)){TU=Ic.then,Cb||(yU(Ic,"then",function(e,t){var n=this;return new Bs(function(i,a){dl(TU,n,i,a)}).then(e,t)},{unsafe:!0}),yU(Ic,"catch",nv.catch,{unsafe:!0}));try{delete Ic.constructor}catch{}mU&&mU(Ic,nv)}eE({global:!0,wrap:!0,forced:yy},{Promise:Bs});pxt(Bs,_A,!1);dxt(_A);EG=hxt(_A);eE({target:_A,stat:!0,forced:yy},{reject:function(e){var t=Up(this);return dl(t.reject,void 0,e),t.promise}});eE({target:_A,stat:!0,forced:yy},{resolve:function(e){return wxt(this,e)}});eE({target:_A,stat:!0,forced:Mxt},{all:function(e){var t=this,n=Up(t),i=n.resolve,a=n.reject,o=wb(function(){var s=_b(t.resolve),A=[],l=0,u=1;_U(e,function(c){var h=l++,f=!1;u++,dl(s,t,c).then(function(p){f||(f=!0,A[h]=p,--u||i(A))},a)}),--u||i(A)});return o.error&&a(o.value),n.promise},race:function(e){var t=this,n=Up(t),i=n.reject,a=wb(function(){var o=_b(t.resolve);_U(e,function(s){dl(o,t,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});function xU(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 vl(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(A){xU(a,n,i,o,s,"next",A)}function s(A){xU(a,n,i,o,s,"throw",A)}o(void 0)})}}var Uxt=Je,Dxt=xL,Qxt=Uxt.String,wA=function(r){if(Dxt(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return Qxt(r)},Hxt=Fa,xG=function(){var r=Hxt(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},PL=Bi,Gxt=Je,UL=Gxt.RegExp,DL=PL(function(){var r=UL("a","y");return r.lastIndex=2,r.exec("abcd")!=null}),kxt=DL||PL(function(){return!UL("a","y").sticky}),$xt=DL||PL(function(){var r=UL("^r","gy");return r.lastIndex=2,r.exec("str")!=null}),bG={BROKEN_CARET:$xt,MISSED_STICKY:kxt,UNSUPPORTED_Y:DL},IG={},Vxt=X7,jxt=BL,Kxt=Object.keys||function(e){return Vxt(e,jxt)},zxt=Bl,Yxt=G7,Xxt=Tl,Wxt=Fa,qxt=dy,Zxt=Kxt;IG.f=zxt&&!Yxt?Object.defineProperties:function(e,t){Wxt(e);for(var n=qxt(t),i=Zxt(t),a=i.length,o=0,s;a>o;)Xxt.f(e,s=i[o++],n[s]);return e};var Jxt=Fa,tbt=IG,bU=BL,ebt=EL,rbt=uG,nbt=Yw,ibt=wL,IU=">",FU="<",Tb="prototype",Sb="script",FG=ibt("IE_PROTO"),YB=function(){},LG=function(r){return FU+Sb+IU+r+FU+"/"+Sb+IU},LU=function(r){r.write(LG("")),r.close();var e=r.parentWindow.Object;return r=null,e},abt=function(){var r=nbt("iframe"),e="java"+Sb+":",t;return r.style.display="none",rbt.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(LG("document.F=Object")),t.close(),t.F},T0,r_=function(){try{T0=new ActiveXObject("htmlfile")}catch{}r_=typeof document<"u"?document.domain&&T0?LU(T0):abt():LU(T0);for(var r=bU.length;r--;)delete r_[Tb][bU[r]];return r_()};ebt[FG]=!0;var QL=Object.create||function(e,t){var n;return e!==null?(YB[Tb]=Jxt(e),n=new YB,YB[Tb]=null,n[FG]=e):n=r_(),t===void 0?n:tbt.f(n,t)},obt=Bi,sbt=Je,Abt=sbt.RegExp,lbt=obt(function(){var r=Abt(".","s");return!(r.dotAll&&r.exec(`
`)&&r.flags==="s")}),ubt=Bi,cbt=Je,hbt=cbt.RegExp,fbt=ubt(function(){var r=hbt("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),Jf=Do,rE=wn,pbt=wA,dbt=xG,vbt=bG,gbt=Kw.exports,ybt=QL,mbt=Ww.get,_bt=lbt,wbt=fbt,Ebt=gbt("native-string-replace",String.prototype.replace),E1=RegExp.prototype.exec,xb=E1,Cbt=rE("".charAt),Bbt=rE("".indexOf),Tbt=rE("".replace),XB=rE("".slice),bb=function(){var r=/a/,e=/b*/g;return Jf(E1,r,"a"),Jf(E1,e,"a"),r.lastIndex!==0||e.lastIndex!==0}(),OG=vbt.BROKEN_CARET,Ib=/()??/.exec("")[1]!==void 0,Sbt=bb||Ib||OG||_bt||wbt;Sbt&&(xb=function(e){var t=this,n=mbt(t),i=pbt(e),a=n.raw,o,s,A,l,u,c,h;if(a)return a.lastIndex=t.lastIndex,o=Jf(xb,a,i),t.lastIndex=a.lastIndex,o;var f=n.groups,p=OG&&t.sticky,v=Jf(dbt,t),m=t.source,g=0,_=i;if(p&&(v=Tbt(v,"y",""),Bbt(v,"g")===-1&&(v+="g"),_=XB(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&Cbt(i,t.lastIndex-1)!==`
`)&&(m="(?: "+m+")",_=" "+_,g++),s=new RegExp("^(?:"+m+")",v)),Ib&&(s=new RegExp("^"+m+"$(?!\\s)",v)),bb&&(A=t.lastIndex),l=Jf(E1,p?s:t,_),p?l?(l.input=XB(l.input,g),l[0]=XB(l[0],g),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:bb&&l&&(t.lastIndex=t.global?l.index+l[0].length:A),Ib&&l&&l.length>1&&Jf(Ebt,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=c=ybt(null),u=0;u<f.length;u++)h=f[u],c[h[0]]=l[h[1]];return l});var nE=xb,xbt=mA,OU=nE;xbt({target:"RegExp",proto:!0,forced:/./.exec!==OU},{exec:OU});var RU=wn,MU=rc.exports,bbt=nE,NU=Bi,RG=Zi,Ibt=od,Fbt=RG("species"),WB=RegExp.prototype,HL=function(r,e,t,n){var i=RG(r),a=!NU(function(){var l={};return l[i]=function(){return 7},""[r](l)!=7}),o=a&&!NU(function(){var l=!1,u=/a/;return r==="split"&&(u={},u.constructor={},u.constructor[Fbt]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return l=!0,null},u[i](""),!l});if(!a||!o||t){var s=RU(/./[i]),A=e(i,""[r],function(l,u,c,h,f){var p=RU(l),v=u.exec;return v===bbt||v===WB.exec?a&&!f?{done:!0,value:s(u,c,h)}:{done:!0,value:p(c,u,h)}:{done:!1}});MU(String.prototype,r,A[0]),MU(WB,i,A[1])}n&&Ibt(WB[i],"sham",!0)},GL=wn,Lbt=Zw,Obt=wA,Rbt=gA,Mbt=GL("".charAt),PU=GL("".charCodeAt),Nbt=GL("".slice),UU=function(r){return function(e,t){var n=Obt(Rbt(e)),i=Lbt(t),a=n.length,o,s;return i<0||i>=a?r?"":void 0:(o=PU(n,i),o<55296||o>56319||i+1===a||(s=PU(n,i+1))<56320||s>57343?r?Mbt(n,i):o:r?Nbt(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},Pbt={codeAt:UU(!1),charAt:UU(!0)},Ubt=Pbt.charAt,kL=function(r,e,t){return e+(t?Ubt(r,e).length:1)},Dbt=Je,DU=Do,Qbt=Fa,Hbt=Gi,Gbt=nd,kbt=nE,$bt=Dbt.TypeError,$L=function(r,e){var t=r.exec;if(Hbt(t)){var n=DU(t,r,e);return n!==null&&Qbt(n),n}if(Gbt(r)==="RegExp")return DU(kbt,r,e);throw $bt("RegExp#exec called on incompatible receiver")},Vbt=Do,jbt=HL,Kbt=Fa,zbt=sd,qB=wA,Ybt=gA,Xbt=ad,Wbt=kL,QU=$L;jbt("match",function(r,e,t){return[function(i){var a=Ybt(this),o=i==null?void 0:Xbt(i,r);return o?Vbt(o,i,a):new RegExp(i)[r](qB(a))},function(n){var i=Kbt(this),a=qB(n),o=t(e,i,a);if(o.done)return o.value;if(!i.global)return QU(i,a);var s=i.unicode;i.lastIndex=0;for(var A=[],l=0,u;(u=QU(i,a))!==null;){var c=qB(u[0]);A[l]=c,c===""&&(i.lastIndex=Wbt(a,zbt(i.lastIndex),s)),l++}return l===0?null:A}]});var VL=wn,qbt=zw,Zbt=Math.floor,ZB=VL("".charAt),Jbt=VL("".replace),JB=VL("".slice),tIt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,eIt=/\$([$&'`]|\d{1,2})/g,rIt=function(r,e,t,n,i,a){var o=t+r.length,s=n.length,A=eIt;return i!==void 0&&(i=qbt(i),A=tIt),Jbt(a,A,function(l,u){var c;switch(ZB(u,0)){case"$":return"$";case"&":return r;case"`":return JB(e,0,t);case"'":return JB(e,o);case"<":c=i[JB(u,1,-1)];break;default:var h=+u;if(h===0)return l;if(h>s){var f=Zbt(h/10);return f===0?l:f<=s?n[f-1]===void 0?ZB(u,1):n[f-1]+ZB(u,1):l}c=n[h-1]}return c===void 0?"":c})},nIt=IL,HU=Do,iE=wn,iIt=HL,aIt=Bi,oIt=Fa,sIt=Gi,AIt=Zw,lIt=sd,xf=wA,uIt=gA,cIt=kL,hIt=ad,fIt=rIt,pIt=$L,dIt=Zi,Fb=dIt("replace"),vIt=Math.max,gIt=Math.min,yIt=iE([].concat),tT=iE([].push),GU=iE("".indexOf),kU=iE("".slice),mIt=function(r){return r===void 0?r:String(r)},_It=function(){return"a".replace(/./,"$0")==="$0"}(),$U=function(){return/./[Fb]?/./[Fb]("a","$0")==="":!1}(),wIt=!aIt(function(){var r=/./;return r.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(r,"$<a>")!=="7"});iIt("replace",function(r,e,t){var n=$U?"$":"$0";return[function(a,o){var s=uIt(this),A=a==null?void 0:hIt(a,Fb);return A?HU(A,a,s,o):HU(e,xf(s),a,o)},function(i,a){var o=oIt(this),s=xf(i);if(typeof a=="string"&&GU(a,n)===-1&&GU(a,"$<")===-1){var A=t(e,o,s,a);if(A.done)return A.value}var l=sIt(a);l||(a=xf(a));var u=o.global;if(u){var c=o.unicode;o.lastIndex=0}for(var h=[];;){var f=pIt(o,s);if(f===null||(tT(h,f),!u))break;var p=xf(f[0]);p===""&&(o.lastIndex=cIt(s,lIt(o.lastIndex),c))}for(var v="",m=0,g=0;g<h.length;g++){f=h[g];for(var _=xf(f[0]),E=vIt(gIt(AIt(f.index),s.length),0),B=[],L=1;L<f.length;L++)tT(B,mIt(f[L]));var O=f.groups;if(l){var b=yIt([_],B,E,s);O!==void 0&&tT(b,O);var T=xf(nIt(a,void 0,b))}else T=fIt(_,s,E,B,O,a);E>=m&&(v+=kU(s,m,E)+T,m=E+_.length)}return v+kU(s,m)}]},!wIt||!_It||$U);var EIt=ec,CIt=nd,BIt=Zi,TIt=BIt("match"),MG=function(r){var e;return EIt(r)&&((e=r[TIt])!==void 0?!!e:CIt(r)=="RegExp")},SIt=Je,xIt=MG,bIt=SIt.TypeError,jL=function(r){if(xIt(r))throw bIt("The method doesn't accept regular expressions");return r},IIt=Zi,FIt=IIt("match"),KL=function(r){var e=/./;try{"/./"[r](e)}catch{try{return e[FIt]=!1,"/./"[r](e)}catch{}}return!1},LIt=mA,NG=wn,OIt=rd.f,RIt=sd,VU=wA,MIt=jL,NIt=gA,PIt=KL,jU=NG("".startsWith),UIt=NG("".slice),DIt=Math.min,PG=PIt("startsWith"),QIt=!PG&&!!function(){var r=OIt(String.prototype,"startsWith");return r&&!r.writable}();LIt({target:"String",proto:!0,forced:!QIt&&!PG},{startsWith:function(e){var t=VU(NIt(this));MIt(e);var n=RIt(DIt(arguments.length>1?arguments[1]:void 0,t.length)),i=VU(e);return jU?jU(t,i,n):UIt(t,n,n+i.length)===i}});var HIt=Zi,GIt=QL,kIt=Tl,Lb=HIt("unscopables"),Ob=Array.prototype;Ob[Lb]==null&&kIt.f(Ob,Lb,{configurable:!0,value:GIt(null)});var $It=function(r){Ob[Lb][r]=!0},VIt=Bi,jIt=!VIt(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),KIt=Je,zIt=yA,YIt=Gi,XIt=zw,WIt=wL,qIt=jIt,KU=WIt("IE_PROTO"),Rb=KIt.Object,ZIt=Rb.prototype,UG=qIt?Rb.getPrototypeOf:function(r){var e=XIt(r);if(zIt(e,KU))return e[KU];var t=e.constructor;return YIt(t)&&e instanceof t?t.prototype:e instanceof Rb?ZIt:null},JIt=Bi,tFt=Gi,zU=UG,eFt=rc.exports,rFt=Zi,Mb=rFt("iterator"),DG=!1,_h,eT,rT;[].keys&&(rT=[].keys(),"next"in rT?(eT=zU(zU(rT)),eT!==Object.prototype&&(_h=eT)):DG=!0);var nFt=_h==null||JIt(function(){var r={};return _h[Mb].call(r)!==r});nFt&&(_h={});tFt(_h[Mb])||eFt(_h,Mb,function(){return this});var QG={IteratorPrototype:_h,BUGGY_SAFARI_ITERATORS:DG},iFt=QG.IteratorPrototype,aFt=QL,oFt=kw,sFt=TL,AFt=gy,lFt=function(){return this},uFt=function(r,e,t,n){var i=e+" Iterator";return r.prototype=aFt(iFt,{next:oFt(+!n,t)}),sFt(r,i,!1),AFt[i]=lFt,r},cFt=mA,hFt=Do,HG=qw,fFt=Gi,pFt=uFt,YU=UG,XU=J7,dFt=TL,vFt=od,nT=rc.exports,gFt=Zi,yFt=gy,GG=QG,mFt=HG.PROPER,_Ft=HG.CONFIGURABLE,WU=GG.IteratorPrototype,S0=GG.BUGGY_SAFARI_ITERATORS,iv=gFt("iterator"),qU="keys",av="values",ZU="entries",wFt=function(){return this},EFt=function(r,e,t,n,i,a,o){pFt(t,e,n);var s=function(g){if(g===i&&h)return h;if(!S0&&g in u)return u[g];switch(g){case qU:return function(){return new t(this,g)};case av:return function(){return new t(this,g)};case ZU:return function(){return new t(this,g)}}return function(){return new t(this)}},A=e+" Iterator",l=!1,u=r.prototype,c=u[iv]||u["@@iterator"]||i&&u[i],h=!S0&&c||s(i),f=e=="Array"&&u.entries||c,p,v,m;if(f&&(p=YU(f.call(new r)),p!==Object.prototype&&p.next&&(YU(p)!==WU&&(XU?XU(p,WU):fFt(p[iv])||nT(p,iv,wFt)),dFt(p,A,!0))),mFt&&i==av&&c&&c.name!==av&&(_Ft?vFt(u,"name",av):(l=!0,h=function(){return hFt(c,this)})),i)if(v={values:s(av),keys:a?h:s(qU),entries:s(ZU)},o)for(m in v)(S0||l||!(m in u))&&nT(u,m,v[m]);else cFt({target:e,proto:!0,forced:S0||l},v);return u[iv]!==h&&nT(u,iv,h,{name:i}),yFt[e]=h,v},CFt=dy,zL=$It,JU=gy,kG=Ww,BFt=Tl.f,TFt=EFt,SFt=Bl,$G="Array Iterator",xFt=kG.set,bFt=kG.getterFor($G),IFt=TFt(Array,"Array",function(r,e){xFt(this,{type:$G,target:CFt(r),index:0,kind:e})},function(){var r=bFt(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"),t2=JU.Arguments=JU.Array;zL("keys");zL("values");zL("entries");if(SFt&&t2.name!=="values")try{BFt(t2,"name",{value:"values"})}catch{}var FFt={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},LFt=Yw,iT=LFt("span").classList,e2=iT&&iT.constructor&&iT.constructor.prototype,OFt=e2===Object.prototype?void 0:e2,r2=Je,VG=FFt,RFt=OFt,xv=IFt,aT=od,jG=Zi,oT=jG("iterator"),n2=jG("toStringTag"),sT=xv.values,KG=function(r,e){if(r){if(r[oT]!==sT)try{aT(r,oT,sT)}catch{r[oT]=sT}if(r[n2]||aT(r,n2,e),VG[e]){for(var t in xv)if(r[t]!==xv[t])try{aT(r,t,xv[t])}catch{r[t]=xv[t]}}}};for(var AT in VG)KG(r2[AT]&&r2[AT].prototype,AT);KG(RFt,"DOMTokenList");function YL(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var MFt=Je,NFt=id,PFt=zw,UFt=R7,DFt=Jw,QFt=MFt.TypeError,i2=function(r){return function(e,t,n,i){NFt(t);var a=PFt(e),o=UFt(a),s=DFt(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 QFt("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}},HFt={left:i2(!1),right:i2(!0)},GFt=Bi,zG=function(r,e){var t=[][r];return!!t&&GFt(function(){t.call(null,e||function(){throw 1},1)})},kFt=mA,$Ft=HFt.left,VFt=zG,a2=gL,jFt=tE,KFt=VFt("reduce"),zFt=!jFt&&a2>79&&a2<83;kFt({target:"Array",proto:!0,forced:!KFt||zFt},{reduce:function(e){var t=arguments.length;return $Ft(this,e,t,t>1?arguments[1]:void 0)}});var YFt=mA,YG=wn,XFt=rd.f,WFt=sd,o2=wA,qFt=jL,ZFt=gA,JFt=KL,s2=YG("".endsWith),tLt=YG("".slice),eLt=Math.min,XG=JFt("endsWith"),rLt=!XG&&!!function(){var r=XFt(String.prototype,"endsWith");return r&&!r.writable}();YFt({target:"String",proto:!0,forced:!rLt&&!XG},{endsWith:function(e){var t=o2(ZFt(this));qFt(e);var n=arguments.length>1?arguments[1]:void 0,i=t.length,a=n===void 0?i:eLt(WFt(n),i),o=o2(e);return s2?s2(t,o,a):tLt(t,a-o.length,a)===o}});var nLt=_L,iLt=Tl,aLt=kw,oLt=function(r,e,t){var n=nLt(e);n in r?iLt.f(r,n,aLt(0,t)):r[n]=t},sLt=Je,A2=z7,ALt=Jw,lLt=oLt,uLt=sLt.Array,cLt=Math.max,hLt=function(r,e,t){for(var n=ALt(r),i=A2(e,n),a=A2(t===void 0?n:t,n),o=uLt(cLt(a-i,0)),s=0;i<a;i++,s++)lLt(o,s,r[i]);return o.length=s,o},fLt=IL,ov=Do,XL=wn,pLt=HL,dLt=MG,vLt=Fa,l2=gA,gLt=AG,yLt=kL,mLt=sd,lT=wA,_Lt=ad,u2=hLt,c2=$L,wLt=nE,ELt=bG,CLt=Bi,bf=ELt.UNSUPPORTED_Y,h2=4294967295,BLt=Math.min,WG=[].push,TLt=XL(/./.exec),If=XL(WG),sv=XL("".slice),SLt=!CLt(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"});pLt("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=lT(l2(this)),s=a===void 0?h2:a>>>0;if(s===0)return[];if(i===void 0)return[o];if(!dLt(i))return ov(e,o,i,s);for(var A=[],l=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(i.sticky?"y":""),u=0,c=new RegExp(i.source,l+"g"),h,f,p;(h=ov(wLt,c,o))&&(f=c.lastIndex,!(f>u&&(If(A,sv(o,u,h.index)),h.length>1&&h.index<o.length&&fLt(WG,A,u2(h,1)),p=h[0].length,u=f,A.length>=s)));)c.lastIndex===h.index&&c.lastIndex++;return u===o.length?(p||!TLt(c,""))&&If(A,""):If(A,sv(o,u)),A.length>s?u2(A,0,s):A}:"0".split(void 0,0).length?n=function(i,a){return i===void 0&&a===0?[]:ov(e,this,i,a)}:n=e,[function(a,o){var s=l2(this),A=a==null?void 0:_Lt(a,r);return A?ov(A,a,s,o):ov(n,lT(s),a,o)},function(i,a){var o=vLt(this),s=lT(i),A=t(n,o,s,a,n!==e);if(A.done)return A.value;var l=gLt(o,RegExp),u=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(bf?"g":"y"),h=new l(bf?"^(?:"+o.source+")":o,c),f=a===void 0?h2:a>>>0;if(f===0)return[];if(s.length===0)return c2(h,s)===null?[s]:[];for(var p=0,v=0,m=[];v<s.length;){h.lastIndex=bf?0:v;var g=c2(h,bf?sv(s,v):s),_;if(g===null||(_=BLt(mLt(h.lastIndex+(bf?v:0)),s.length))===p)v=yLt(s,v,u);else{if(If(m,sv(s,p,v)),m.length===f)return m;for(var E=1;E<=g.length-1;E++)if(If(m,g[E]),m.length===f)return m;v=p=_}}return If(m,sv(s,p)),m}]},!SLt,bf);var aE={exports:{}},bv={exports:{}};(function(){var r,e,t,n,i,a;typeof performance<"u"&&performance!==null&&performance.now?bv.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(bv.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?(bv.exports=function(){return Date.now()-t},t=Date.now()):(bv.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(Zs);var xLt=bv.exports,al=typeof window>"u"?Zs:window,x0=["moz","webkit"],mp="AnimationFrame",Dp=al["request"+mp],Rg=al["cancel"+mp]||al["cancelRequest"+mp];for(var Av=0;!Dp&&Av<x0.length;Av++)Dp=al[x0[Av]+"Request"+mp],Rg=al[x0[Av]+"Cancel"+mp]||al[x0[Av]+"CancelRequest"+mp];if(!Dp||!Rg){var uT=0,f2=0,Ec=[],bLt=1e3/60;Dp=function(r){if(Ec.length===0){var e=xLt(),t=Math.max(0,bLt-(e-uT));uT=t+e,setTimeout(function(){var n=Ec.slice(0);Ec.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(uT)}catch(a){setTimeout(function(){throw a},0)}},Math.round(t))}return Ec.push({handle:++f2,callback:r,cancelled:!1}),f2},Rg=function(r){for(var e=0;e<Ec.length;e++)Ec[e].handle===r&&(Ec[e].cancelled=!0)}}aE.exports=function(r){return Dp.call(al,r)};aE.exports.cancel=function(){Rg.apply(al,arguments)};aE.exports.polyfill=function(r){r||(r=al),r.requestAnimationFrame=Dp,r.cancelAnimationFrame=Rg};var cT=aE.exports,qG=`
\v\f\r    \u2028\u2029\uFEFF`,ILt=wn,FLt=gA,LLt=wA,OLt=qG,p2=ILt("".replace),C1="["+OLt+"]",RLt=RegExp("^"+C1+C1+"*"),MLt=RegExp(C1+C1+"*$"),hT=function(r){return function(e){var t=LLt(FLt(e));return r&1&&(t=p2(t,RLt,"")),r&2&&(t=p2(t,MLt,"")),t}},NLt={start:hT(1),end:hT(2),trim:hT(3)},PLt=qw.PROPER,ULt=Bi,d2=qG,v2="…",DLt=function(r){return ULt(function(){return!!d2[r]()||v2[r]()!==v2||PLt&&d2[r].name!==r})},QLt=mA,HLt=NLt.trim,GLt=DLt;QLt({target:"String",proto:!0,forced:GLt("trim")},{trim:function(){return HLt(this)}});var Nb=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,c=0;c<u.length;c++)A[A.length]=u[c];for(var h in e)A[A.length]=h;var f=document.createElement("ul");f.setAttribute("id","rgbcolor-examples");for(var l=0;l<A.length;l++)try{var p=document.createElement("li"),v=new RGBColor(A[l]),m=document.createElement("div");m.style.cssText="margin: 3px; border: 1px solid black; background:"+v.toHex()+"; color:"+v.toHex(),m.appendChild(document.createTextNode("test"));var g=document.createTextNode(" "+A[l]+" -> "+v.toRGB()+" -> "+v.toHex());p.appendChild(m),p.appendChild(g),f.appendChild(p)}catch{}return f}},kLt=mA,$Lt=wn,VLt=jL,jLt=gA,g2=wA,KLt=KL,zLt=$Lt("".indexOf);kLt({target:"String",proto:!0,forced:!KLt("includes")},{includes:function(e){return!!~zLt(g2(jLt(this)),g2(VLt(e)),arguments.length>1?arguments[1]:void 0)}});var YLt=mA,XLt=wn,WLt=Y7.indexOf,qLt=zG,Pb=XLt([].indexOf),y2=!!Pb&&1/Pb([1],1,-0)<0,ZLt=qLt("indexOf");YLt({target:"Array",proto:!0,forced:y2||!ZLt},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return y2?Pb(this,e,t)||0:WLt(this,e,t)}});var JLt=nd,tOt=Array.isArray||function(e){return JLt(e)=="Array"},eOt=mA,rOt=wn,nOt=tOt,iOt=rOt([].reverse),m2=[1,2];eOt({target:"Array",proto:!0,forced:String(m2)===String(m2.reverse())},{reverse:function(){return nOt(this)&&(this.length=this.length),iOt(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 ZG=function(r,e){return(ZG=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 JG(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}ZG(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function aOt(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 Ub(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 ms(){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 Au=Math.PI;function fT(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=Ub([(e-a)/2,(t-o)/2],-r.xRot/180*Au),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 c=Math.pow(n,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(A,2),h=(r.lArcFlag!==r.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(n,2)*Math.pow(i,2)-c)/c)),f=n*l/i*h,p=-i*A/n*h,v=Ub([f,p],r.xRot/180*Au);r.cX=v[0]+(e+a)/2,r.cY=v[1]+(t+o)/2,r.phi1=Math.atan2((l-p)/i,(A-f)/n),r.phi2=Math.atan2((-l-p)/i,(-A-f)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Au),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Au),r.phi1*=180/Au,r.phi2*=180/Au}function _2(r,e,t){ms(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 gi,GA=Math.PI/180;function w2(r,e,t){return(1-t)*r+t*e}function E2(r,e,t,n){return r+Math.cos(n/180*Au)*e+Math.sin(n/180*Au)*t}function C2(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,c,h){h===void 0&&(h=1e-6);var f=u*u/4-c;if(f<-h)return[];if(f<=h)return[-u/2];var p=Math.sqrt(f);return[-u/2-p,-u/2+p]}(A/s,l/s,i)}function B2(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(c,h,f){return c.type&kt.SMOOTH_CURVE_TO&&(c.type=kt.CURVE_TO,s=isNaN(s)?h:s,A=isNaN(A)?f:A,c.x1=c.relative?h-s:2*h-s,c.y1=c.relative?f-A:2*f-A),c.type&kt.CURVE_TO?(s=c.relative?h+c.x2:c.x2,A=c.relative?f+c.y2:c.y2):(s=NaN,A=NaN),c.type&kt.SMOOTH_QUAD_TO&&(c.type=kt.QUAD_TO,l=isNaN(l)?h:l,u=isNaN(u)?f:u,c.x1=c.relative?h-l:2*h-l,c.y1=c.relative?f-u:2*f-u),c.type&kt.QUAD_TO?(l=c.relative?h+c.x1:c.x1,u=c.relative?f+c.y1:c.y1):(l=NaN,u=NaN),c})}function n(){var s=NaN,A=NaN;return i(function(l,u,c){if(l.type&kt.SMOOTH_QUAD_TO&&(l.type=kt.QUAD_TO,s=isNaN(s)?u:s,A=isNaN(A)?c:A,l.x1=l.relative?u-s:2*u-s,l.y1=l.relative?c-A:2*c-A),l.type&kt.QUAD_TO){s=l.relative?u+l.x1:l.x1,A=l.relative?c+l.y1:l.y1;var h=l.x1,f=l.y1;l.type=kt.CURVE_TO,l.x1=((l.relative?0:u)+2*h)/3,l.y1=((l.relative?0:c)+2*f)/3,l.x2=(l.x+2*h)/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,c=NaN;return function(h){if(isNaN(u)&&!(h.type&kt.MOVE_TO))throw new Error("path must start with moveto");var f=s(h,A,l,u,c);return h.type&kt.CLOSE_PATH&&(A=u,l=c),h.x!==void 0&&(A=h.relative?A+h.x:h.x),h.y!==void 0&&(l=h.relative?l+h.y:h.y),h.type&kt.MOVE_TO&&(u=A,c=l),f}}function a(s,A,l,u,c,h){return ms(s,A,l,u,c,h),i(function(f,p,v,m){var g=f.x1,_=f.x2,E=f.relative&&!isNaN(m),B=f.x!==void 0?f.x:E?0:p,L=f.y!==void 0?f.y:E?0:v;function O(R){return R*R}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:p),f.x!==void 0&&(f.x=f.x*s+L*l+(E?0:c)),f.y!==void 0&&(f.y=B*A+f.y*u+(E?0:h)),f.x1!==void 0&&(f.x1=f.x1*s+f.y1*l+(E?0:c)),f.y1!==void 0&&(f.y1=g*A+f.y1*u+(E?0:h)),f.x2!==void 0&&(f.x2=f.x2*s+f.y2*l+(E?0:c)),f.y2!==void 0&&(f.y2=_*A+f.y2*u+(E?0:h));var b=s*u-A*l;if(f.xRot!==void 0&&(s!==1||A!==0||l!==0||u!==1))if(b===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,I=Math.sin(T),M=Math.cos(T),x=1/O(f.rX),S=1/O(f.rY),N=O(M)*x+O(I)*S,P=2*I*M*(x-S),X=O(I)*x+O(M)*S,z=N*u*u-P*A*u+X*A*A,tt=P*(s*u+A*l)-2*(N*l*u+X*s*A),J=N*l*l-P*s*l+X*s*s,nt=(Math.atan2(tt,z-J)+Math.PI)%Math.PI/2,it=Math.sin(nt),_t=Math.cos(nt);f.rX=Math.abs(b)/Math.sqrt(z*O(_t)+tt*it*_t+J*O(it)),f.rY=Math.abs(b)/Math.sqrt(z*O(it)-tt*it*_t+J*O(_t)),f.xRot=180*nt/Math.PI}return f.sweepFlag!==void 0&&0>b&&(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),ms(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,c,h,f,p){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:h),l&&u.type&kt.VERT_LINE_TO&&(u.type=kt.LINE_TO,u.x=u.relative?0:c),s&&u.type&kt.CLOSE_PATH&&(u.type=kt.LINE_TO,u.x=u.relative?f-c:f,u.y=u.relative?p-h:p),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),ms(s);var A=NaN,l=NaN,u=NaN,c=NaN;return i(function(h,f,p,v,m){var g=Math.abs,_=!1,E=0,B=0;if(h.type&kt.SMOOTH_CURVE_TO&&(E=isNaN(A)?0:f-A,B=isNaN(l)?0:p-l),h.type&(kt.CURVE_TO|kt.SMOOTH_CURVE_TO)?(A=h.relative?f+h.x2:h.x2,l=h.relative?p+h.y2:h.y2):(A=NaN,l=NaN),h.type&kt.SMOOTH_QUAD_TO?(u=isNaN(u)?f:2*f-u,c=isNaN(c)?p:2*p-c):h.type&kt.QUAD_TO?(u=h.relative?f+h.x1:h.x1,c=h.relative?p+h.y1:h.y2):(u=NaN,c=NaN),h.type&kt.LINE_COMMANDS||h.type&kt.ARC&&(h.rX===0||h.rY===0||!h.lArcFlag)||h.type&kt.CURVE_TO||h.type&kt.SMOOTH_CURVE_TO||h.type&kt.QUAD_TO||h.type&kt.SMOOTH_QUAD_TO){var L=h.x===void 0?0:h.relative?h.x:h.x-f,O=h.y===void 0?0:h.relative?h.y:h.y-p;E=isNaN(u)?h.x1===void 0?E:h.relative?h.x:h.x1-f:u-f,B=isNaN(c)?h.y1===void 0?B:h.relative?h.y:h.y1-p:c-p;var b=h.x2===void 0?0:h.relative?h.x:h.x2-f,T=h.y2===void 0?0:h.relative?h.y:h.y2-p;g(L)<=s&&g(O)<=s&&g(E)<=s&&g(B)<=s&&g(b)<=s&&g(T)<=s&&(_=!0)}return h.type&kt.CLOSE_PATH&&g(f-v)<=s&&g(p-m)<=s&&(_=!0),_?[]:h})},r.MATRIX=a,r.ROTATE=function(s,A,l){A===void 0&&(A=0),l===void 0&&(l=0),ms(s,A,l);var u=Math.sin(s),c=Math.cos(s);return a(c,u,-u,c,A-A*c+l*u,l-A*u-l*c)},r.TRANSLATE=function(s,A){return A===void 0&&(A=0),ms(s,A),a(1,0,0,1,s,A)},r.SCALE=function(s,A){return A===void 0&&(A=s),ms(s,A),a(s,0,0,A,0,0)},r.SKEW_X=function(s){return ms(s),a(1,0,Math.atan(s),1,0,0)},r.SKEW_Y=function(s){return ms(s),a(1,Math.atan(s),0,1,0,0)},r.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ms(s),a(-1,0,0,1,s,0)},r.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),ms(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,c,h){var f,p,v,m;u.cX||fT(u,c,h);for(var g=Math.min(u.phi1,u.phi2),_=Math.max(u.phi1,u.phi2)-g,E=Math.ceil(_/90),B=new Array(E),L=c,O=h,b=0;b<E;b++){var T=w2(u.phi1,u.phi2,b/E),I=w2(u.phi1,u.phi2,(b+1)/E),M=I-T,x=4/3*Math.tan(M*GA/4),S=[Math.cos(T*GA)-x*Math.sin(T*GA),Math.sin(T*GA)+x*Math.cos(T*GA)],N=S[0],P=S[1],X=[Math.cos(I*GA),Math.sin(I*GA)],z=X[0],tt=X[1],J=[z+x*Math.sin(I*GA),tt-x*Math.cos(I*GA)],nt=J[0],it=J[1];B[b]={relative:u.relative,type:kt.CURVE_TO};var _t=function(R,$){var K=Ub([R*u.rX,$*u.rY],u.xRot),q=K[0],at=K[1];return[u.cX+q,u.cY+at]};f=_t(N,P),B[b].x1=f[0],B[b].y1=f[1],p=_t(nt,it),B[b].x2=p[0],B[b].y2=p[1],v=_t(z,tt),B[b].x=v[0],B[b].y=v[1],u.relative&&(B[b].x1-=L,B[b].y1-=O,B[b].x2-=L,B[b].y2-=O,B[b].x-=L,B[b].y-=O),L=(m=[B[b].x,B[b].y])[0],O=m[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&&fT(s,A,l),s})},r.CLONE=o,r.CALCULATE_BOUNDS=function(){var s=function(h){var f={};for(var p in h)f[p]=h[p];return f},A=e(),l=n(),u=t(),c=i(function(h,f,p){var v=u(l(A(s(h))));function m(it){it>c.maxX&&(c.maxX=it),it<c.minX&&(c.minX=it)}function g(it){it>c.maxY&&(c.maxY=it),it<c.minY&&(c.minY=it)}if(v.type&kt.DRAWING_COMMANDS&&(m(f),g(p)),v.type&kt.HORIZ_LINE_TO&&m(v.x),v.type&kt.VERT_LINE_TO&&g(v.y),v.type&kt.LINE_TO&&(m(v.x),g(v.y)),v.type&kt.CURVE_TO){m(v.x),g(v.y);for(var _=0,E=C2(f,v.x1,v.x2,v.x);_<E.length;_++)0<(nt=E[_])&&1>nt&&m(B2(f,v.x1,v.x2,v.x,nt));for(var B=0,L=C2(p,v.y1,v.y2,v.y);B<L.length;B++)0<(nt=L[B])&&1>nt&&g(B2(p,v.y1,v.y2,v.y,nt))}if(v.type&kt.ARC){m(v.x),g(v.y),fT(v,f,p);for(var O=v.xRot/180*Math.PI,b=Math.cos(O)*v.rX,T=Math.sin(O)*v.rX,I=-Math.sin(O)*v.rY,M=Math.cos(O)*v.rY,x=v.phi1<v.phi2?[v.phi1,v.phi2]:-180>v.phi2?[v.phi2+360,v.phi1+360]:[v.phi2,v.phi1],S=x[0],N=x[1],P=function(it){var _t=it[0],R=it[1],$=180*Math.atan2(R,_t)/Math.PI;return $<S?$+360:$},X=0,z=_2(I,-b,0).map(P);X<z.length;X++)(nt=z[X])>S&&nt<N&&m(E2(v.cX,b,I,nt));for(var tt=0,J=_2(M,-T,0).map(P);tt<J.length;tt++){var nt;(nt=J[tt])>S&&nt<N&&g(E2(v.cY,T,M,nt))}}return h});return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}})(gi||(gi={}));var gs,tk=function(){function r(){}return r.prototype.round=function(e){return this.transform(gi.ROUND(e))},r.prototype.toAbs=function(){return this.transform(gi.TO_ABS())},r.prototype.toRel=function(){return this.transform(gi.TO_REL())},r.prototype.normalizeHVZ=function(e,t,n){return this.transform(gi.NORMALIZE_HVZ(e,t,n))},r.prototype.normalizeST=function(){return this.transform(gi.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(gi.QT_TO_C())},r.prototype.aToC=function(){return this.transform(gi.A_TO_C())},r.prototype.sanitize=function(e){return this.transform(gi.SANITIZE(e))},r.prototype.translate=function(e,t){return this.transform(gi.TRANSLATE(e,t))},r.prototype.scale=function(e,t){return this.transform(gi.SCALE(e,t))},r.prototype.rotate=function(e,t,n){return this.transform(gi.ROTATE(e,t,n))},r.prototype.matrix=function(e,t,n,i,a,o){return this.transform(gi.MATRIX(e,t,n,i,a,o))},r.prototype.skewX=function(e){return this.transform(gi.SKEW_X(e))},r.prototype.skewY=function(e){return this.transform(gi.SKEW_Y(e))},r.prototype.xSymmetry=function(e){return this.transform(gi.X_AXIS_SYMMETRY(e))},r.prototype.ySymmetry=function(e){return this.transform(gi.Y_AXIS_SYMMETRY(e))},r.prototype.annotateArcs=function(){return this.transform(gi.ANNOTATE_ARCS())},r}(),oOt=function(r){return r===" "||r===" "||r==="\r"||r===`
`},T2=function(r){return"0".charCodeAt(0)<=r.charCodeAt(0)&&r.charCodeAt(0)<="9".charCodeAt(0)},sOt=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 JG(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(c){n.push(c),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=T2(s)&&(this.curNumber==="0"&&s==="0"||A);if(!T2(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===AOt[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(!oOt(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}(tk),kt=function(r){function e(t){var n=r.call(this)||this;return n.commands=typeof t=="string"?e.parse(t):t,n}return JG(e,r),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=gi.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 aOt(t)},e.parse=function(t){var n=new sOt,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}(tk),AOt=((gs={})[kt.MOVE_TO]=2,gs[kt.LINE_TO]=2,gs[kt.HORIZ_LINE_TO]=1,gs[kt.VERT_LINE_TO]=1,gs[kt.CLOSE_PATH]=0,gs[kt.QUAD_TO]=4,gs[kt.SMOOTH_QUAD_TO]=2,gs[kt.CURVE_TO]=6,gs[kt.SMOOTH_CURVE_TO]=4,gs[kt.ARC]=7,gs),lOt=wn,uOt=qw.PROPER,cOt=rc.exports,hOt=Fa,fOt=$w,S2=wA,pOt=Bi,dOt=xG,WL="toString",Db=RegExp.prototype,ek=Db[WL],vOt=lOt(dOt),gOt=pOt(function(){return ek.call({source:"a",flags:"b"})!="/a/b"}),yOt=uOt&&ek.name!=WL;(gOt||yOt)&&cOt(RegExp.prototype,WL,function(){var e=hOt(this),t=S2(e.source),n=e.flags,i=S2(n===void 0&&fOt(Db,e)&&!("flags"in Db)?vOt(e):n);return"/"+t+"/"+i},{unsafe:!0});function n_(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?n_=function(e){return typeof e}:n_=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n_(r)}function mOt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var _Ot=[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],wOt=[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 EOt(r,e,t,n,i){if(typeof r=="string"&&(r=document.getElementById(r)),!r||n_(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 COt(r,e,t,n,i,a){if(!(isNaN(a)||a<1)){a|=0;var o=EOt(r,e,t,n,i);o=BOt(o,e,t,n,i,a),r.getContext("2d").putImageData(o,e,t)}}function BOt(r,e,t,n,i,a){for(var o=r.data,s=2*a+1,A=n-1,l=i-1,u=a+1,c=u*(u+1)/2,h=new x2,f=h,p,v=1;v<s;v++)f=f.next=new x2,v===u&&(p=f);f.next=h;for(var m=null,g=null,_=0,E=0,B=_Ot[a],L=wOt[a],O=0;O<i;O++){f=h;for(var b=o[E],T=o[E+1],I=o[E+2],M=o[E+3],x=0;x<u;x++)f.r=b,f.g=T,f.b=I,f.a=M,f=f.next;for(var S=0,N=0,P=0,X=0,z=u*b,tt=u*T,J=u*I,nt=u*M,it=c*b,_t=c*T,R=c*I,$=c*M,K=1;K<u;K++){var q=E+((A<K?A:K)<<2),at=o[q],vt=o[q+1],wt=o[q+2],W=o[q+3],It=u-K;it+=(f.r=at)*It,_t+=(f.g=vt)*It,R+=(f.b=wt)*It,$+=(f.a=W)*It,S+=at,N+=vt,P+=wt,X+=W,f=f.next}m=h,g=p;for(var Ot=0;Ot<n;Ot++){var j=$*B>>L;if(o[E+3]=j,j!==0){var Z=255/j;o[E]=(it*B>>L)*Z,o[E+1]=(_t*B>>L)*Z,o[E+2]=(R*B>>L)*Z}else o[E]=o[E+1]=o[E+2]=0;it-=z,_t-=tt,R-=J,$-=nt,z-=m.r,tt-=m.g,J-=m.b,nt-=m.a;var ut=Ot+a+1;ut=_+(ut<A?ut:A)<<2,S+=m.r=o[ut],N+=m.g=o[ut+1],P+=m.b=o[ut+2],X+=m.a=o[ut+3],it+=S,_t+=N,R+=P,$+=X,m=m.next;var rt=g,G=rt.r,xt=rt.g,bt=rt.b,dt=rt.a;z+=G,tt+=xt,J+=bt,nt+=dt,S-=G,N-=xt,P-=bt,X-=dt,g=g.next,E+=4}_+=n}for(var Et=0;Et<n;Et++){E=Et<<2;var yt=o[E],St=o[E+1],Ft=o[E+2],Mt=o[E+3],Vt=u*yt,Yt=u*St,ie=u*Ft,ee=u*Mt,Xt=c*yt,oe=c*St,Kt=c*Ft,Xe=c*Mt;f=h;for(var Re=0;Re<u;Re++)f.r=yt,f.g=St,f.b=Ft,f.a=Mt,f=f.next;for(var pr=n,Ie=0,xe=0,on=0,sr=0,Ti=1;Ti<=a;Ti++){E=pr+Et<<2;var Br=u-Ti;Xt+=(f.r=yt=o[E])*Br,oe+=(f.g=St=o[E+1])*Br,Kt+=(f.b=Ft=o[E+2])*Br,Xe+=(f.a=Mt=o[E+3])*Br,sr+=yt,Ie+=St,xe+=Ft,on+=Mt,f=f.next,Ti<l&&(pr+=n)}E=Et,m=h,g=p;for(var ci=0;ci<i;ci++){var $r=E<<2;o[$r+3]=Mt=Xe*B>>L,Mt>0?(Mt=255/Mt,o[$r]=(Xt*B>>L)*Mt,o[$r+1]=(oe*B>>L)*Mt,o[$r+2]=(Kt*B>>L)*Mt):o[$r]=o[$r+1]=o[$r+2]=0,Xt-=Vt,oe-=Yt,Kt-=ie,Xe-=ee,Vt-=m.r,Yt-=m.g,ie-=m.b,ee-=m.a,$r=Et+(($r=ci+u)<l?$r:l)*n<<2,Xt+=sr+=m.r=o[$r],oe+=Ie+=m.g=o[$r+1],Kt+=xe+=m.b=o[$r+2],Xe+=on+=m.a=o[$r+3],m=m.next,Vt+=yt=g.r,Yt+=St=g.g,ie+=Ft=g.b,ee+=Mt=g.a,sr-=yt,Ie-=St,xe-=Ft,on-=Mt,g=g.next,E+=n}}return r}var x2=function r(){mOt(this,r),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function TOt(){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 vl(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 SOt(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 xOt=Object.freeze({__proto__:null,offscreen:TOt,node:SOt});function Qh(r){return r.replace(/(?!\u3000)\s+/gm," ")}function rk(r){return r.replace(/^[\n \t]+/,"")}function nk(r){return r.replace(/[\n \t]+$/,"")}function lo(r){var e=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var bOt=/^[A-Z-]+$/;function ik(r){return bOt.test(r)?r.toLowerCase():r}function qL(r){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return e[2]||e[3]||e[4]}function ak(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 IOt=/(\[[^\]]+\])/g,FOt=/(#[^\s+>~.[:]+)/g,LOt=/(\.[^\s+>~.[:]+)/g,OOt=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,ROt=/(:[\w-]+\([^)]*\))/gi,MOt=/(:[^\s+>~.[:]+)/g,NOt=/([^\s+>~.[:]+)/g;function Cc(r,e){var t=e.exec(r);return t?[r.replace(e," "),t.length]:[r,0]}function ok(r){var e=[0,0,0],t=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[t,n]=Cc(t,IOt),e[1]+=n,[t,n]=Cc(t,FOt),e[0]+=n,[t,n]=Cc(t,LOt),e[1]+=n,[t,n]=Cc(t,OOt),e[2]+=n,[t,n]=Cc(t,ROt),e[1]+=n,[t,n]=Cc(t,MOt),e[1]+=n,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,n]=Cc(t,NOt),e[2]+=n,e.join("")}var nh=1e-8;function Qb(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function B1(r,e){return(r[0]*e[0]+r[1]*e[1])/(Qb(r)*Qb(e))}function Hb(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(B1(r,e))}function Gb(r){return r*r*r}function kb(r){return 3*r*r*(1-r)}function $b(r){return 3*r*(1-r)*(1-r)}function Vb(r){return(1-r)*(1-r)*(1-r)}function jb(r){return r*r}function Kb(r){return 2*r*(1-r)}function zb(r){return(1-r)*(1-r)}class Se{constructor(e,t,n){this.document=e,this.name=t,this.value=n,this.isNormalizedColor=!1}static empty(e){return new Se(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:n}=this;return Qh(this.getString()).trim().split(e).map(i=>new Se(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=ak(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()?Se.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 Nb(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new Se(this.document,this.name,t)}}Se.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 sk{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 $n{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]=lo(e);return new $n(n,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=t,i=n]=lo(e);return new $n(n,i)}static parsePath(e){for(var t=lo(e),n=t.length,i=[],a=0;a<n;a+=2)i.push(new $n(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 Ak{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 $n(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 lk=typeof window<"u"?window:null,uk=typeof fetch<"u"?fetch.bind(void 0):null;class my{constructor(e){var{fetch:t=uk,window:n=lk}=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 sk,this.mouse=new Ak(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:c,refY:h,clip:f=!1,clipX:p=0,clipY:v=0}=e,m=Qh(i).replace(/^defer\s/,""),[g,_]=m.split(" "),E=g||"xMidYMid",B=_||"meet",L=a/o,O=s/A,b=Math.min(L,O),T=Math.max(L,O),I=o,M=A;B==="meet"&&(I*=b,M*=b),B==="slice"&&(I*=T,M*=T);var x=new Se(t,"refX",c),S=new Se(t,"refY",h),N=x.hasValue()&&S.hasValue();if(N&&n.translate(-b*x.getPixels("x"),-b*S.getPixels("y")),f){var P=b*p,X=b*v;n.beginPath(),n.moveTo(P,X),n.lineTo(a,X),n.lineTo(a,s),n.lineTo(P,s),n.closePath(),n.clip()}if(!N){var z=B==="meet"&&b===O,tt=B==="slice"&&T===O,J=B==="meet"&&b===L,nt=B==="slice"&&T===L;E.startsWith("xMid")&&(z||tt)&&n.translate(a/2-I/2,0),E.endsWith("YMid")&&(J||nt)&&n.translate(0,s/2-M/2),E.startsWith("xMax")&&(z||tt)&&n.translate(a-I,0),E.endsWith("YMax")&&(J||nt)&&n.translate(0,s-M)}switch(!0){case E==="none":n.scale(L,O);break;case B==="meet":n.scale(b,b);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:c}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:h,mouse:f}=this,p=1e3/h;if(this.frameDuration=p,this.readyPromise=new Promise(E=>{this.resolveReady=E}),this.isReady()&&this.render(e,a,o,A,l,u,c),!!t){var v=Date.now(),m=v,g=0,_=()=>{v=Date.now(),g=v-m,g>=p&&(m=v-g%p,this.shouldUpdate(i,s)&&(this.render(e,a,o,A,l,u,c),f.runEvents())),this.intervalId=cT(_)};n||f.start(),this.intervalId=cT(_)}}stop(){this.intervalId&&(cT.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:c,isFirstRender:h}=this,f=c.canvas;u.clear(),f.width&&f.height?u.setCurrent(f.width,f.height):u.setCurrent(A,l);var p=e.getStyle("width"),v=e.getStyle("height");!t&&(h||typeof i!="number"&&typeof a!="number")&&(p.hasValue()&&(f.width=p.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 m=f.clientWidth||f.width,g=f.clientHeight||f.height;if(t&&p.hasValue()&&v.hasValue()&&(m=p.getPixels("x"),g=v.getPixels("y")),u.setCurrent(m,g),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 _=lo(e.getAttribute("viewBox").getString()),E=0,B=0;if(typeof i=="number"){var L=e.getStyle("width");L.hasValue()?E=L.getPixels("x")/i:isNaN(_[2])||(E=_[2]/i)}if(typeof a=="number"){var O=e.getStyle("height");O.hasValue()?B=O.getPixels("y")/a:isNaN(_[3])||(B=_[3]/a)}E||(E=B),B||(B=E),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(a);var b=e.getStyle("transform",!0,!0);b.setValue("".concat(b.getString()," scale(").concat(1/E,", ").concat(1/B,")"))}n||c.clearRect(0,0,m,g),e.render(c),h&&(this.isFirstRender=!1)}}my.defaultWindow=lk;my.defaultFetch=uk;var{defaultFetch:POt}=my,UOt=typeof DOMParser<"u"?DOMParser:null;class i_{constructor(){var{fetch:e=POt,DOMParser:t=UOt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return vl(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 vl(function*(){var n=yield t.fetch(e),i=yield n.text();return t.parseFromString(i)})()}}class ck{constructor(e,t){this.type="translate",this.point=null,this.point=$n.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 hk{constructor(e,t,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=lo(t);this.angle=new Se(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 fk{constructor(e,t,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=$n.parseScale(t);(i.x===0||i.y===0)&&(i.x=nh,i.y=nh),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 ZL{constructor(e,t,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=lo(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],c=0,h=0,f=1,p=1/(a*(l*f-u*h)-o*(A*f-u*c)+s*(A*h-l*c)),v=t.getPixels("x"),m=n.getPixels("y");e.translate(v,m),e.transform(p*(l*f-u*h),p*(u*c-A*f),p*(s*h-o*f),p*(a*f-s*c),p*(o*u-s*l),p*(s*A-a*u)),e.translate(-v,-m)}applyToPoint(e){e.applyTransform(this.matrix)}}class JL extends ZL{constructor(e,t,n){super(e,t,n),this.type="skew",this.angle=null,this.angle=new Se(e,"angle",t)}}class pk extends JL{constructor(e,t,n){super(e,t,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class dk extends JL{constructor(e,t,n){super(e,t,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function DOt(r){return Qh(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function QOt(r){var[e,t]=r.split("(");return[e.trim(),t.trim().replace(")","")]}class zu{constructor(e,t,n){this.document=e,this.transforms=[];var i=DOt(t);i.forEach(a=>{if(a!=="none"){var[o,s]=QOt(a),A=zu.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 zu(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)}}zu.transformTypes={translate:ck,rotate:hk,scale:fk,matrix:ZL,skewX:pk,skewY:dk};class mn{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=ik(s.nodeName);this.attributes[A]=new Se(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 Se(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 Se(this.document,e,"");return this.attributes[e]=i,i}return n||Se.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return Se.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 Se(this.document,e,"");return this.styles[e]=A,A}return i||Se.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=zu.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 mn?e:this.document.createElement(e);t.parent=this,mn.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)})}}mn.ignoreChildTypes=["title"];class vk extends mn{constructor(e,t,n){super(e,t,n)}}function HOt(r){var e=r.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function GOt(r){return typeof process>"u"?r:r.trim().split(",").map(HOt).join(",")}function kOt(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 $Ot(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 Ca{constructor(e,t,n,i,a,o){var s=o?typeof o=="string"?Ca.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=Qh(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return A.forEach(u=>{switch(!0){case(!l.fontStyle&&Ca.styles.includes(u)):u!=="inherit"&&(n=u),l.fontStyle=!0;break;case(!l.fontVariant&&Ca.variants.includes(u)):u!=="inherit"&&(i=u),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&Ca.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 Ca(n,i,a,o,s,t)}toString(){return[kOt(this.fontStyle),this.fontVariant,$Ot(this.fontWeight),this.fontSize,GOt(this.fontFamily)].join(" ").trim()}}Ca.styles="normal|italic|oblique|inherit";Ca.variants="normal|small-caps|inherit";Ca.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class ns{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 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)));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)))}}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 We 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 $n(0,0),this.control=new $n(0,0),this.current=new $n(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 $n(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 $n(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 nc extends mn{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 Se(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 c=a.getString();c!=="inherit"&&(e.strokeStyle=c==="none"?"rgba(0,0,0,0)":c)}if(o.hasValue()){var h=new Se(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=h}var f=this.getStyle("stroke-width");if(f.hasValue()){var p=f.getPixels();e.lineWidth=p||nh}var v=this.getStyle("stroke-linecap"),m=this.getStyle("stroke-linejoin"),g=this.getStyle("stroke-miterlimit"),_=this.getStyle("stroke-dasharray"),E=this.getStyle("stroke-dashoffset");if(v.hasValue()&&(e.lineCap=v.getString()),m.hasValue()&&(e.lineJoin=m.getString()),g.hasValue()&&(e.miterLimit=g.getNumber()),_.hasValue()&&_.getString()!=="none"){var B=lo(_.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 L=E.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=L:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=L:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=L)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var O=this.getStyle("font"),b=this.getStyle("font-style"),T=this.getStyle("font-variant"),I=this.getStyle("font-weight"),M=this.getStyle("font-size"),x=this.getStyle("font-family"),S=new Ca(b.getString(),T.getString(),I.getString(),M.hasValue()?"".concat(M.getPixels(!0),"px"):"",x.getString(),Ca.parse(O.getString(),e.font));b.setValue(S.fontStyle),T.setValue(S.fontVariant),I.setValue(S.fontWeight),M.setValue(S.fontSize),x.setValue(S.fontFamily),e.font=S.toString(),M.isPixels()&&(this.document.emSize=M.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 nc{constructor(e,t,n){super(e,t,n),this.type="path",this.pathParser=null,this.pathParser=new We(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,n=new ns;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case We.MOVE_TO:this.pathM(e,n);break;case We.LINE_TO:this.pathL(e,n);break;case We.HORIZ_LINE_TO:this.pathH(e,n);break;case We.VERT_LINE_TO:this.pathV(e,n);break;case We.CURVE_TO:this.pathC(e,n);break;case We.SMOOTH_CURVE_TO:this.pathS(e,n);break;case We.QUAD_TO:this.pathQ(e,n);break;case We.SMOOTH_QUAD_TO:this.pathT(e,n);break;case We.ARC:this.pathA(e,n);break;case We.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 c=o.getDefinition(),h=1;h<i;h++){var[f,p]=n[h];c.render(e,f,p)}if(s.isUrlDefinition()){var v=s.getDefinition(),[m,g]=n[i];v.render(e,m,g)}}}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 $n((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 $n(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(),c=new $n(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),h=Math.pow(c.x,2)/Math.pow(i,2)+Math.pow(c.y,2)/Math.pow(a,2);h>1&&(i*=Math.sqrt(h),a*=Math.sqrt(h));var f=(s===A?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(a,2)-Math.pow(i,2)*Math.pow(c.y,2)-Math.pow(a,2)*Math.pow(c.x,2))/(Math.pow(i,2)*Math.pow(c.y,2)+Math.pow(a,2)*Math.pow(c.x,2)));isNaN(f)&&(f=0);var p=new $n(f*i*c.y/a,f*-a*c.x/i),v=new $n((t.x+u.x)/2+Math.cos(l)*p.x-Math.sin(l)*p.y,(t.y+u.y)/2+Math.sin(l)*p.x+Math.cos(l)*p.y),m=Hb([1,0],[(c.x-p.x)/i,(c.y-p.y)/a]),g=[(c.x-p.x)/i,(c.y-p.y)/a],_=[(-c.x-p.x)/i,(-c.y-p.y)/a],E=Hb(g,_);return B1(g,_)<=-1&&(E=Math.PI),B1(g,_)>=1&&(E=0),{currentPoint:u,rX:i,rY:a,sweepFlag:A,xAxisRotation:l,centp:v,a1:m,ad:E}}pathA(e,t){var{pathParser:n}=this,{currentPoint:i,rX:a,rY:o,sweepFlag:s,xAxisRotation:A,centp:l,a1:u,ad:c}=Xr.pathA(n),h=1-s?1:-1,f=u+h*(c/2),p=new $n(l.x+a*Math.cos(f),l.y+o*Math.sin(f));if(n.addMarkerAngle(p,f-h*Math.PI/2),n.addMarkerAngle(i,f-h*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(u)&&!isNaN(c)){var v=a>o?a:o,m=a>o?1:a/o,g=a>o?o/a:1;e.translate(l.x,l.y),e.rotate(A),e.scale(m,g),e.arc(0,0,v,u,u+c,Boolean(1-s)),e.scale(1/m,1/g),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 tO 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 ic extends nc{constructor(e,t,n){super(e,t,new.target===ic?!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=Ca.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(n);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new ns(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 tO?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=Qh(t.textContent||"");return i===0&&(o=rk(o)),i===a&&(o=nk(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=Ca.parse(t.ctx.font),A=n.getStyle("font-size").getNumber(s.fontSize),l=n.getStyle("font-style").getString(s.fontStyle),u=A/o,c=a.isRTL?i.split("").reverse().join(""):i,h=lo(n.getAttribute("dx").getString()),f=c.length,p=0;p<f;p++){var v=this.getGlyph(a,c,p);e.translate(this.x,this.y),e.scale(u,-u);var m=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=m,e.scale(1/u,-1/u),e.translate(-this.x,-this.y),this.x+=A*(v.horizAdvX||a.horizAdvX)/o,typeof h[p]<"u"&&!isNaN(h[p])&&(this.x+=h[p])}return}var{x:g,y:_}=this;e.fillStyle&&e.fillText(i,g,_),e.strokeStyle&&e.strokeText(i,g,_)}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 c=a.measureTextRecursive(e);a.x+=-1*(u==="end"?c:c/2)}A.hasValue()&&(a.x+=A.getPixels("x"))}else{if(u!=="start"){var h=a.measureTextRecursive(e);t.x+=-1*(u==="end"?h:h/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=lo(n.getAttribute("dx").getString()),A=o.length,l=0,u=0;u<A;u++){var c=this.getGlyph(i,o,u);l+=(c.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:h}=e.measureText(t);return this.clearContext(e),e.restore(),h}}class _y extends ic{constructor(e,t,n){super(e,t,new.target===_y?!0:n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class VOt extends _y{constructor(){super(...arguments),this.type="textNode"}}let Ad=class extends nc{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 Se(n,"fontSize",Ca.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"),c=this.getAttribute("refY"),h=this.getAttribute("viewBox"),f=h.hasValue()?lo(h.getString()):null,p=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",v=0,m=0,g=0,_=0;f&&(v=f[0],m=f[1]),this.root||(A=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(g=v,_=m,v=0,m=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:m,refX:u.getValue(),refY:c.getValue(),clip:p,clipX:g,clipY:_}),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 c=this.getStyle("width"),h=this.getStyle("height");c.hasValue()&&c.setValue("".concat(e,"px")),h.hasValue()&&h.setValue("".concat(t,"px"))}}};class eO 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 ns(t,n,t+i,n+a)}getMarkers(){return null}}class gk 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 ns(t-i,n-i,t+i,n+i)}getMarkers(){return null}}class yk 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 ns(a-n,o-i,a+n,o+i)}getMarkers(){return null}}class mk extends Xr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new $n(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new $n(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 ns(t,n,i,a)}getMarkers(){var[e,t]=this.getPoints(),n=e.angleTo(t);return[[e,n],[t,n]]}}class rO extends Xr{constructor(e,t,n){super(e,t,n),this.type="polyline",this.points=[],this.points=$n.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:n,y:i}]=t,a=new ns(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 _k extends rO{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 wk extends mn{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 Ad(this.document,null);o.attributes.viewBox=new Se(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new Se(this.document,"width","".concat(i,"px")),o.attributes.height=new Se(this.document,"height","".concat(a,"px")),o.attributes.transform=new Se(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 c=-1;c<=1;c++)for(var h=-1;h<=1;h++)A.save(),o.attributes.x=new Se(this.document,"x",c*s.width),o.attributes.y=new Se(this.document,"y",h*s.height),o.render(A),A.restore();var f=e.createPattern(s,"repeat");return f}}class Ek extends mn{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 Ad(this.document,null);A.type=this.type,A.attributes.viewBox=new Se(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.refX=new Se(this.document,"refX",this.getAttribute("refX").getValue()),A.attributes.refY=new Se(this.document,"refY",this.getAttribute("refY").getValue()),A.attributes.width=new Se(this.document,"width",this.getAttribute("markerWidth").getValue()),A.attributes.height=new Se(this.document,"height",this.getAttribute("markerHeight").getValue()),A.attributes.overflow=new Se(this.document,"overflow",this.getAttribute("overflow").getValue()),A.attributes.fill=new Se(this.document,"fill",this.getAttribute("fill").getColor("black")),A.attributes.stroke=new Se(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 Ck extends mn{constructor(){super(...arguments),this.type="defs"}render(){}}class oE extends nc{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new ns;return this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),t}}class nO extends mn{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(m=>{o.addColorStop(m.offset,this.addParentOpacity(n,m.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:s}=this,{MAX_VIRTUAL_PIXELS:A,viewPort:l}=s.screen,[u]=l.viewPorts,c=new eO(s,null);c.attributes.x=new Se(s,"x",-A/3),c.attributes.y=new Se(s,"y",-A/3),c.attributes.width=new Se(s,"width",A),c.attributes.height=new Se(s,"height",A);var h=new oE(s,null);h.attributes.transform=new Se(s,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[c];var f=new Ad(s,null);f.attributes.x=new Se(s,"x",0),f.attributes.y=new Se(s,"y",0),f.attributes.width=new Se(s,"width",u.width),f.attributes.height=new Se(s,"height",u.height),f.children=[h];var p=s.createCanvas(u.width,u.height),v=p.getContext("2d");return v.fillStyle=o,f.render(v),v.createPattern(p,"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 Se(this.document,"color",t);return n.addOpacity(e).getColor()}return t}}class Bk extends nO{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 Tk extends nO{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 Sk extends mn{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 sE extends mn{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 Se(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 Se(e,"from",parseFloat(t.getValue()[a])),n.to=new Se(e,"to",parseFloat(t.getValue()[o])),n.progress=(i-a)/(o-a)}else n.from=this.from,n.to=this.to;return n}}class xk extends sE{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=new Nb(t.getColor()),a=new Nb(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 bk extends sE{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=lo(t.getString()),a=lo(n.getString()),o=i.map((s,A)=>{var l=a[A];return s+(l-s)*e}).join(" ");return o}}class Ik extends mn{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 Fk extends mn{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 Lk extends Xr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class Ok extends ic{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 Rk extends ic{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 Se(t,"fontSize",Ca.parse(t.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new ns(n,i-o.getPixels("y"),n+this.measureText(e),i))}else if(this.children.length>0){var s=new oE(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 b2(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 b0(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?b2(Object(t),!0).forEach(function(n){YL(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):b2(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class Mk extends ic{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 We.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case We.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case We.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case We.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case We.ARC:{var[o,s,A,l,u,c,h,f]=a,p=A>l?A:l,v=A>l?1:A/l,m=A>l?l/A:1;e&&(e.translate(o,s),e.rotate(h),e.scale(v,m),e.arc(0,0,p,u,u+c,Boolean(1-f)),e.scale(1/v,1/m),e.rotate(-h),e.translate(-o,-s));break}case We.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:c}=o;e.save(),e.translate(A.x,A.y),e.rotate(u),e.fillStyle&&e.fillText(c,0,0),e.strokeStyle&&e.strokeText(c,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,c=this.measureText(e,A);A===" "&&t==="justify"&&n<i&&(c+=(i-n)/a),l>-1&&(u+=this.getLetterSpacingAt(l));var h=this.textHeight/20,f=this.getEquidistantPointOnPath(u,h,0),p=this.getEquidistantPointOnPath(u+c,h,0),v={p0:f,p1:p},m=f&&p?Math.atan2(p.y-f.y,p.x-f.x):0;if(s){var g=Math.cos(Math.PI/2+m)*s,_=Math.cos(-m)*s;v.p0=b0(b0({},f),{},{x:f.x+g,y:f.y+_}),v.p1=b0(b0({},p),{},{x:p.x+g,y:p.y+_})}return u+=c,{offset:u,segment:v,rotation:m}}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 c=[],h=t.length;this.letterSpacingCache=c;for(var f=0;f<h;f++)c.push(typeof a[f]<"u"?a[f]:u);var p=c.reduce((B,L,O)=>O===0?0:B+L||0,0),v=this.measureText(e),m=Math.max(v+p,0);this.textWidth=v,this.textHeight=this.getFontSize(),this.glyphInfo=[];var g=this.getPathLength(),_=this.getStyle("startOffset").getNumber(0)*g,E=0;(s==="middle"||s==="center")&&(E=-m/2),(s==="end"||s==="right")&&(E=-m),E+=_,n.forEach((B,L)=>{var{offset:O,segment:b,rotation:T}=this.findSegmentToFitChar(e,s,m,g,i,E,o,B,L);E=O,!(!b.p0||!b.p1)&&this.glyphInfo.push({text:n[L],p0:b.p0,p1:b.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 We.MOVE_TO:this.pathM(n,l);break;case We.LINE_TO:A=this.pathL(n,l);break;case We.HORIZ_LINE_TO:A=this.pathH(n,l);break;case We.VERT_LINE_TO:A=this.pathV(n,l);break;case We.CURVE_TO:this.pathC(n,l);break;case We.SMOOTH_CURVE_TO:A=this.pathS(n,l);break;case We.QUAD_TO:this.pathQ(n,l);break;case We.SMOOTH_QUAD_TO:A=this.pathT(n,l);break;case We.ARC:l=this.pathA(n);break;case We.CLOSE_PATH:Xr.pathZ(n);break}s.type!==We.CLOSE_PATH?t.push({type:A,points:l,start:{x:a,y:o},pathLength:this.calcLength(a,o,A,l)}):t.push({type:We.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),We.LINE_TO}pathH(e,t){var{x:n,y:i}=Xr.pathH(e).point;return t.push(n,i),We.LINE_TO}pathV(e,t){var{x:n,y:i}=Xr.pathV(e).point;return t.push(n,i),We.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),We.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),We.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 We.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case We.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 We.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 We.ARC:{a=0;var l=i[4],u=i[5],c=i[4]+u,h=Math.PI/180;if(Math.abs(l-c)<h&&(h=Math.abs(l-c)),o=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],l,0),u<0)for(A=l-h;A>c;A-=h)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+h;A<c;A+=h)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],c,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+nh),l=Math.sqrt(e*e/(1+A*A));i<t&&(l*=-1);var u=A*l,c=null;if(i===t)c={x:o,y:s+u};else if((s-n)/(o-t+nh)===A)c={x:o+l,y:s+u};else{var h=0,f=0,p=this.getLineLength(t,n,i,a);if(p<nh)return null;var v=(o-t)*(i-t)+(s-n)*(a-n);v/=p*p,h=t+v*(i-t),f=n+v*(a-n);var m=this.getLineLength(o,s,h,f),g=Math.sqrt(e*e-m*m);l=Math.sqrt(g*g/(1+A*A)),i<t&&(l*=-1),u=A*l,c={x:h+l,y:f+u}}return c}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 We.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 We.ARC:{var l=o.points[4],u=o.points[5],c=o.points[4]+u;if(A=l+s/o.pathLength*u,u<0&&A<c||u>=0&&A>c)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],A,o.points[6]);break}case We.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 We.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*Gb(e)+o*kb(e)+i*$b(e)+t*Vb(e),c=l*Gb(e)+s*kb(e)+a*$b(e)+n*Vb(e);return{x:u,y:c}}getPointOnQuadraticBezier(e,t,n,i,a,o,s){var A=o*jb(e)+i*Kb(e)+t*zb(e),l=s*jb(e)+a*Kb(e)+n*zb(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 jOt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Nk extends nc{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 vl(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 vl(function*(){var n=jOt.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 ns(e,t,e+n,t+i)}}class Pk extends nc{constructor(){super(...arguments),this.type="symbol"}render(e){}}class Uk{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var n=this;return vl(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 iO extends mn{constructor(e,t,n){super(e,t,n),this.type="style";var i=Qh(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(c=>{var h=c.trim();if(h){var f=e.styles[h]||{};if(u.forEach(m=>{var g=m.indexOf(":"),_=m.substr(0,g).trim(),E=m.substr(g+1,m.length-g).trim();_&&E&&(f[_]=new Se(e,_,E))}),e.styles[h]=f,e.stylesSpecificity[h]=ok(h),h==="@font-face"){var p=f["font-family"].getString().replace(/"|'/g,""),v=f.src.getString().split(",");v.forEach(m=>{if(m.indexOf('format("svg")')>0){var g=qL(m);g&&new Uk(e).load(p,g)}})}}})}})}}iO.parseExternalUrl=qL;class Dk extends nc{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 Ad(t,null),i.attributes.viewBox=new Se(t,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new Se(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new Se(t,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new Se(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 Se(t,"width",a.getString())),o.hasValue()&&(i.attributes.height=new Se(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 zu.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function I0(r,e,t,n,i,a){return r[t*n*4+e*4+a]}function F0(r,e,t,n,i,a,o){r[t*n*4+e*4+a]=o}function vi(r,e,t){var n=r[e];return n*t}function kA(r,e,t,n){return e+Math.cos(r)*t+Math.sin(r)*n}class aO extends mn{constructor(e,t,n){super(e,t,n),this.type="feColorMatrix";var i=lo(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=[kA(o,.213,.787,-.213),kA(o,.715,-.715,-.715),kA(o,.072,-.072,.928),0,0,kA(o,.213,-.213,.143),kA(o,.715,.285,.14),kA(o,.072,-.072,-.283),0,0,kA(o,.213,-.213,-.787),kA(o,.715,-.715,.715),kA(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 c=I0(A.data,u,l,i,a,0),h=I0(A.data,u,l,i,a,1),f=I0(A.data,u,l,i,a,2),p=I0(A.data,u,l,i,a,3),v=vi(s,0,c)+vi(s,1,h)+vi(s,2,f)+vi(s,3,p)+vi(s,4,1),m=vi(s,5,c)+vi(s,6,h)+vi(s,7,f)+vi(s,8,p)+vi(s,9,1),g=vi(s,10,c)+vi(s,11,h)+vi(s,12,f)+vi(s,13,p)+vi(s,14,1),_=vi(s,15,c)+vi(s,16,h)+vi(s,17,f)+vi(s,18,p)+vi(s,19,1);o&&(v=0,m=0,g=0,_*=p/255),F0(A.data,u,l,i,a,0,v),F0(A.data,u,l,i,a,1,m),F0(A.data,u,l,i,a,2,g),F0(A.data,u,l,i,a,3,_)}e.clearRect(0,0,i,a),e.putImageData(A,0,0)}}class wy extends mn{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 ns;this.children.forEach(p=>{A.addBoundingBox(p.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,wy.ignoreStyles),u=n.createCanvas(i+o,a+s),c=u.getContext("2d");n.screen.setDefaults(c),this.renderChildren(c),new aO(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,i+o,a+s);var h=n.createCanvas(i+o,a+s),f=h.getContext("2d");n.screen.setDefaults(f),t.render(f),f.globalCompositeOperation="destination-in",f.fillStyle=c.createPattern(u,"no-repeat"),f.fillRect(0,0,i+o,a+s),e.fillStyle=f.createPattern(h,"no-repeat"),e.fillRect(0,0,i+o,a+s),this.restoreStyles(t,l)}render(e){}}wy.ignoreStyles=["mask","transform","clip-path"];var I2=()=>{};class Qk extends mn{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,n=Reflect.getPrototypeOf(e),{beginPath:i,closePath:a}=e;n&&(n.beginPath=I2,n.closePath=I2),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=zu.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 Ey extends mn{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(g=>{var _=g.extraFilterDistance||0;o=Math.max(o,_),s=Math.max(s,_)});var A=Math.floor(a.width),l=Math.floor(a.height),u=A+2*o,c=l+2*s;if(!(u<1||c<1)){var h=Math.floor(a.x),f=Math.floor(a.y),p=this.removeStyles(t,Ey.ignoreStyles),v=n.createCanvas(u,c),m=v.getContext("2d");n.screen.setDefaults(m),m.translate(-h+o,-f+s),t.render(m),i.forEach(g=>{typeof g.apply=="function"&&g.apply(m,0,0,u,c)}),e.drawImage(v,0,0,u,c,h-o,f-s,u,c),this.restoreStyles(t,p)}}}render(e){}}Ey.ignoreStyles=["filter","transform","clip-path"];class Hk extends mn{constructor(e,t,n){super(e,t,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,n,i,a){}}class Gk extends mn{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,n,i,a){}}class kk extends mn{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,n,i,a){}}class $k extends mn{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)),COt(l,t,n,i,a,s),A&&A.removeChild(l)}}class Vk extends mn{constructor(){super(...arguments),this.type="title"}}class jk extends mn{constructor(){super(...arguments),this.type="desc"}}var KOt={svg:Ad,rect:eO,circle:gk,ellipse:yk,line:mk,polyline:rO,polygon:_k,path:Xr,pattern:wk,marker:Ek,defs:Ck,linearGradient:Bk,radialGradient:Tk,stop:Sk,animate:sE,animateColor:xk,animateTransform:bk,font:Ik,"font-face":Fk,"missing-glyph":Lk,glyph:tO,text:ic,tspan:_y,tref:Ok,a:Rk,textPath:Mk,image:Nk,g:oE,symbol:Pk,style:iO,use:Dk,mask:wy,clipPath:Qk,filter:Ey,feDropShadow:Hk,feMorphology:Gk,feComposite:kk,feColorMatrix:aO,feGaussianBlur:$k,title:Vk,desc:jk};function F2(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 zOt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?F2(Object(t),!0).forEach(function(n){YL(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):F2(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function YOt(r,e){var t=document.createElement("canvas");return t.width=r,t.height=e,t}function XOt(r){return Yb.apply(this,arguments)}function Yb(){return Yb=vl(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})}),Yb.apply(this,arguments)}class sl{constructor(e){var{rootEmSize:t=12,emSize:n=12,createCanvas:i=sl.createCanvas,createImage:a=sl.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=sl.elementTypes[t];return typeof n<"u"?new n(this,e):new vk(this,e)}createTextNode(e){return new VOt(this,e)}setViewBox(e){this.screen.setViewBox(zOt({document:this},e))}}sl.createCanvas=YOt;sl.createImage=XOt;sl.elementTypes=KOt;function L2(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 Bc(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?L2(Object(t),!0).forEach(function(n){YL(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):L2(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class kc{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new i_(n),this.screen=new my(e,n),this.options=n;var i=new sl(this,n),a=i.createDocumentElement(t);this.document=i,this.documentElement=a}static from(e,t){var n=arguments;return vl(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:{},a=new i_(i),o=yield a.parse(t);return new kc(e,o,i)})()}static fromString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new i_(n),a=i.parseFromString(t);return new kc(e,a,n)}fork(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return kc.from(e,t,Bc(Bc({},this.options),n))}forkString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return kc.fromString(e,t,Bc(Bc({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return vl(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};t.start(Bc({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,Bc(Bc({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 WOt=Object.freeze(Object.defineProperty({__proto__:null,default:kc,AElement:Rk,AnimateColorElement:xk,AnimateElement:sE,AnimateTransformElement:bk,BoundingBox:ns,CB1:Gb,CB2:kb,CB3:$b,CB4:Vb,Canvg:kc,CircleElement:gk,ClipPathElement:Qk,DefsElement:Ck,DescElement:jk,Document:sl,Element:mn,EllipseElement:yk,FeColorMatrixElement:aO,FeCompositeElement:kk,FeDropShadowElement:Hk,FeGaussianBlurElement:$k,FeMorphologyElement:Gk,FilterElement:Ey,Font:Ca,FontElement:Ik,FontFaceElement:Fk,GElement:oE,GlyphElement:tO,GradientElement:nO,ImageElement:Nk,LineElement:mk,LinearGradientElement:Bk,MarkerElement:Ek,MaskElement:wy,Matrix:ZL,MissingGlyphElement:Lk,Mouse:Ak,PSEUDO_ZERO:nh,Parser:i_,PathElement:Xr,PathParser:We,PatternElement:wk,Point:$n,PolygonElement:_k,PolylineElement:rO,Property:Se,QB1:jb,QB2:Kb,QB3:zb,RadialGradientElement:Tk,RectElement:eO,RenderedElement:nc,Rotate:hk,SVGElement:Ad,SVGFontLoader:Uk,Scale:fk,Screen:my,Skew:JL,SkewX:pk,SkewY:dk,StopElement:Sk,StyleElement:iO,SymbolElement:Pk,TRefElement:Ok,TSpanElement:_y,TextElement:ic,TextPathElement:Mk,TitleElement:Vk,Transform:zu,Translate:ck,UnknownElement:vk,UseElement:Dk,ViewPort:sk,compressSpaces:Qh,getSelectorSpecificity:ok,normalizeAttributeName:ik,normalizeColor:ak,parseExternalUrl:qL,presets:xOt,toNumbers:lo,trimLeft:rk,trimRight:nk,vectorMagnitude:Qb,vectorsAngle:Hb,vectorsRatio:B1},Symbol.toStringTag,{value:"Module"})),qOt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ZOt(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){if(this instanceof n){var i=[null];i.push.apply(i,arguments);var a=Function.bind.apply(e,i);return new a}return e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Xb={},JOt={get exports(){return Xb},set exports(r){Xb=r}};const tRt=ZOt(Hj);(function(r,e){(function(n,i){r.exports=i(tRt)})(qOt,t=>(()=>{var n={657:(s,A)=>{Object.defineProperty(A,"__esModule",{value:!0}),A.default=(l,u)=>{const c=l.__vccOpts||l;for(const[h,f]of u)c[h]=f;return c}},976:s=>{s.exports=t}},i={};function a(s){var A=i[s];if(A!==void 0)return A.exports;var l=i[s]={exports:{}};return n[s](l,l.exports,a),l.exports}a.d=(s,A)=>{for(var l in A)a.o(A,l)&&!a.o(s,l)&&Object.defineProperty(s,l,{enumerable:!0,get:A[l]})},a.o=(s,A)=>Object.prototype.hasOwnProperty.call(s,A),a.r=s=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})};var o={};return(()=>{a.r(o),a.d(o,{Component:()=>q,LoadingPlugin:()=>vt,default:()=>wt,useLoading:()=>at});var s=a(976);function A(W){var It;typeof W.remove<"u"?W.remove():(It=W.parentNode)==null||It.removeChild(W)}function l(W,It,Ot){let j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const Z=(0,s.h)(W,It,j),ut=document.createElement("div");return ut.classList.add("vld-container"),Ot.appendChild(ut),(0,s.render)(Z,ut),Z.component}function u(){return typeof window<"u"}const c=u()?window.HTMLElement:Object,h=["aria-busy"],f={class:"vl-icon"};function p(W,It,Ot,j,Z,ut){return(0,s.openBlock)(),(0,s.createBlock)(s.Transition,{name:W.transition},{default:(0,s.withCtx)(()=>[(0,s.withDirectives)((0,s.createElementVNode)("div",{tabindex:"0",class:(0,s.normalizeClass)(["vl-overlay vl-active",{"vl-full-page":W.isFullPage}]),"aria-busy":W.isActive,"aria-label":"Loading",style:(0,s.normalizeStyle)({zIndex:W.zIndex})},[(0,s.createElementVNode)("div",{class:"vl-background",onClick:It[0]||(It[0]=(0,s.withModifiers)(function(){return W.cancel&&W.cancel(...arguments)},["prevent"])),style:(0,s.normalizeStyle)(W.bgStyle)},null,4),(0,s.createElementVNode)("div",f,[(0,s.renderSlot)(W.$slots,"before"),(0,s.renderSlot)(W.$slots,"default",{},()=>[((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(W.loader),{color:W.color,width:W.width,height:W.height},null,8,["color","width","height"]))]),(0,s.renderSlot)(W.$slots,"after")])],14,h),[[s.vShow,W.isActive]])]),_:3},8,["name"])}const v={mounted(){this.enforceFocus&&document.addEventListener("focusin",this.focusIn)},methods:{focusIn(W){if(!this.isActive||W.target===this.$el||this.$el.contains(W.target))return;let It=this.container?this.container:this.isFullPage?null:this.$el.parentElement;(this.isFullPage||It&&It.contains(W.target))&&(W.preventDefault(),this.$el.focus())}},beforeUnmount(){document.removeEventListener("focusin",this.focusIn)}},m=["width","height","stroke"],_=[(0,s.createStaticVNode)('<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".25" cx="18" cy="18" r="18"></circle><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.8s" repeatCount="indefinite"></animateTransform></path></g></g>',1)];function E(W,It,Ot,j,Z,ut){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",width:W.width,height:W.height,stroke:W.color},_,8,m)}const B=(0,s.defineComponent)({name:"spinner",props:{color:{type:String,default:"#000"},height:{type:Number,default:64},width:{type:Number,default:64}}});var L=a(657);const b=(0,L.default)(B,[["render",E]]),T=["fill","width","height"],M=[(0,s.createStaticVNode)('<circle cx="15" cy="15" r="15"><animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="60" cy="15" r="9" fill-opacity="0.3"><animate attributeName="r" from="9" to="9" begin="0s" dur="0.8s" values="9;15;9" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" from="0.5" to="0.5" begin="0s" dur="0.8s" values=".5;1;.5" calcMode="linear" repeatCount="indefinite"></animate></circle><circle cx="105" cy="15" r="15"><animate attributeName="r" from="15" to="15" begin="0s" dur="0.8s" values="15;9;15" calcMode="linear" repeatCount="indefinite"></animate><animate attributeName="fill-opacity" from="1" to="1" begin="0s" dur="0.8s" values="1;.5;1" calcMode="linear" repeatCount="indefinite"></animate></circle>',3)];function x(W,It,Ot,j,Z,ut){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:W.color,width:W.width,height:W.height},M,8,T)}const S=(0,s.defineComponent)({name:"dots",props:{color:{type:String,default:"#000"},height:{type:Number,default:240},width:{type:Number,default:60}}}),P=(0,L.default)(S,[["render",x]]),X=["height","width","fill"],tt=[(0,s.createStaticVNode)('<rect x="0" y="13" width="4" height="5"><animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="10" y="13" width="4" height="5"><animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate></rect><rect x="20" y="13" width="4" height="5"><animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate><animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate></rect>',3)];function J(W,It,Ot,j,Z,ut){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",height:W.height,width:W.width,fill:W.color},tt,8,X)}const nt=(0,s.defineComponent)({name:"bars",props:{color:{type:String,default:"#000"},height:{type:Number,default:40},width:{type:Number,default:40}}}),R={Spinner:b,Dots:P,Bars:(0,L.default)(nt,[["render",J]])},$=(0,s.defineComponent)({name:"VueLoading",mixins:[v],props:{active:Boolean,programmatic:Boolean,container:[Object,Function,c],isFullPage:{type:Boolean,default:!0},enforceFocus:{type:Boolean,default:!0},lockScroll:Boolean,transition:{type:String,default:"fade"},canCancel:Boolean,onCancel:{type:Function,default:()=>{}},color:String,backgroundColor:String,opacity:Number,width:Number,height:Number,zIndex:Number,loader:{type:String,default:"spinner"}},components:R,emits:["hide","update:active"],data(){return{isActive:this.active}},mounted(){document.addEventListener("keyup",this.keyPress)},methods:{cancel(){!this.canCancel||!this.isActive||(this.hide(),this.onCancel.apply(null,arguments))},hide(){this.$emit("hide"),this.$emit("update:active",!1),this.programmatic&&(this.isActive=!1,setTimeout(()=>{const W=this.$el.parentElement;(0,s.render)(null,W),A(W)},150))},disableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.add("vl-shown")},enableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.remove("vl-shown")},keyPress(W){W.keyCode===27&&this.cancel()}},watch:{active(W){this.isActive=W},isActive(W){W?this.disableScroll():this.enableScroll()}},computed:{bgStyle(){return{background:this.backgroundColor,opacity:this.opacity}}},beforeUnmount(){document.removeEventListener("keyup",this.keyPress)}}),q=(0,L.default)($,[["render",p]]);function at(){let W=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{show(){let Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:W,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It;const ut={...W,...Ot,...{programmatic:!0,lockScroll:!0,isFullPage:!1,active:!0}};let rt=ut.container;ut.container||(rt=document.body,ut.isFullPage=!0);const G={...It,...j};return{hide:l(q,ut,rt,G).ctx.hide}}}}const vt=function(W){let It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ot=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const j=at(It,Ot);W.config.globalProperties.$loading=j,W.provide("$loading",j)},wt=q})(),o})())})(JOt);const oO=p6(aY);oO.use(kx);oO.use(Xb.LoadingPlugin);oO.mount("#app")});export default eRt();