Files
traintracker/dist/assets/index-93b9eb88.js
2023-03-09 15:04:50 +00:00

2016 lines
2.0 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.

(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const o of a.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerpolicy&&(a.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?a.credentials="include":i.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function n(i){if(i.ep)return;i.ep=!0;const a=t(i);fetch(i.href,a)}})();function eC(r,e){const t=Object.create(null),n=r.split(",");for(let i=0;i<n.length;i++)t[n[i]]=!0;return e?i=>!!t[i.toLowerCase()]:i=>!!t[i]}const BK="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",bK=eC(BK);function l0(r){if(Oe(r)){const e={};for(let t=0;t<r.length;t++){const n=r[t],i=Zn(n)?IK(n):l0(n);if(i)for(const a in i)e[a]=i[a]}return e}else{if(Zn(r))return r;if(Tn(r))return r}}const TK=/;(?![^(]*\))/g,SK=/:([^]+)/,xK=/\/\*.*?\*\//gs;function IK(r){const e={};return r.replace(xK,"").split(TK).forEach(t=>{if(t){const n=t.split(SK);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function u0(r){let e="";if(Zn(r))e=r;else if(Oe(r))for(let t=0;t<r.length;t++){const n=u0(r[t]);n&&(e+=n+" ")}else if(Tn(r))for(const t in r)r[t]&&(e+=t+" ");return e.trim()}function LK(r){if(!r)return null;let{class:e,style:t}=r;return e&&!Zn(e)&&(r.class=u0(e)),t&&(r.style=l0(t)),r}const OK="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",FK=eC(OK);function j6(r){return!!r||r===""}function RK(r,e){if(r.length!==e.length)return!1;let t=!0;for(let n=0;t&&n<r.length;n++)t=eh(r[n],e[n]);return t}function eh(r,e){if(r===e)return!0;let t=CN(r),n=CN(e);if(t||n)return t&&n?r.getTime()===e.getTime():!1;if(t=By(r),n=By(e),t||n)return r===e;if(t=Oe(r),n=Oe(e),t||n)return t&&n?RK(r,e):!1;if(t=Tn(r),n=Tn(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||!eh(r[o],e[o]))return!1}}return String(r)===String(e)}function rC(r,e){return r.findIndex(t=>eh(t,e))}const MK=r=>Zn(r)?r:r==null?"":Oe(r)||Tn(r)&&(r.toString===W6||!ar(r.toString))?JSON.stringify(r,K6,2):String(r),K6=(r,e)=>e&&e.__v_isRef?K6(r,e.value):og(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((t,[n,i])=>(t[`${n} =>`]=i,t),{})}:vd(e)?{[`Set(${e.size})`]:[...e.values()]}:Tn(e)&&!Oe(e)&&!z6(e)?String(e):e,wn={},ag=[],dA=()=>{},NK=()=>!1,PK=/^on[^a-z]/,c0=r=>PK.test(r),IO=r=>r.startsWith("onUpdate:"),ui=Object.assign,LO=(r,e)=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)},UK=Object.prototype.hasOwnProperty,$r=(r,e)=>UK.call(r,e),Oe=Array.isArray,og=r=>h0(r)==="[object Map]",vd=r=>h0(r)==="[object Set]",CN=r=>h0(r)==="[object Date]",ar=r=>typeof r=="function",Zn=r=>typeof r=="string",By=r=>typeof r=="symbol",Tn=r=>r!==null&&typeof r=="object",OO=r=>Tn(r)&&ar(r.then)&&ar(r.catch),W6=Object.prototype.toString,h0=r=>W6.call(r),DK=r=>h0(r).slice(8,-1),z6=r=>h0(r)==="[object Object]",FO=r=>Zn(r)&&r!=="NaN"&&r[0]!=="-"&&""+parseInt(r,10)===r,Ym=eC(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),nC=r=>{const e=Object.create(null);return t=>e[t]||(e[t]=r(t))},QK=/-(\w)/g,Uo=nC(r=>r.replace(QK,(e,t)=>t?t.toUpperCase():"")),kK=/\B([A-Z])/g,Ps=nC(r=>r.replace(kK,"-$1").toLowerCase()),f0=nC(r=>r.charAt(0).toUpperCase()+r.slice(1)),Xm=nC(r=>r?`on${f0(r)}`:""),bg=(r,e)=>!Object.is(r,e),sg=(r,e)=>{for(let t=0;t<r.length;t++)r[t](e)},Ow=(r,e,t)=>{Object.defineProperty(r,e,{configurable:!0,enumerable:!1,value:t})},_u=r=>{const e=parseFloat(r);return isNaN(e)?r:e};let BN;const HK=()=>BN||(BN=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});let us;class RO{constructor(e=!1){this.detached=e,this.active=!0,this.effects=[],this.cleanups=[],this.parent=us,!e&&us&&(this.index=(us.scopes||(us.scopes=[])).push(this)-1)}run(e){if(this.active){const t=us;try{return us=this,e()}finally{us=t}}}on(){us=this}off(){us=this.parent}stop(e){if(this.active){let t,n;for(t=0,n=this.effects.length;t<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 GK(r){return new RO(r)}function Y6(r,e=us){e&&e.active&&e.effects.push(r)}function $K(){return us}function VK(r){us&&us.cleanups.push(r)}const MO=r=>{const e=new Set(r);return e.w=0,e.n=0,e},X6=r=>(r.w&rh)>0,q6=r=>(r.n&rh)>0,jK=({deps:r})=>{if(r.length)for(let e=0;e<r.length;e++)r[e].w|=rh},KK=r=>{const{deps:e}=r;if(e.length){let t=0;for(let n=0;n<e.length;n++){const i=e[n];X6(i)&&!q6(i)?i.delete(r):e[t++]=i,i.w&=~rh,i.n&=~rh}e.length=t}},VS=new WeakMap;let Sm=0,rh=1;const jS=30;let cA;const Ff=Symbol(""),KS=Symbol("");class d0{constructor(e,t=null,n){this.fn=e,this.scheduler=t,this.active=!0,this.deps=[],this.parent=void 0,Y6(this,n)}run(){if(!this.active)return this.fn();let e=cA,t=jc;for(;e;){if(e===this)return;e=e.parent}try{return this.parent=cA,cA=this,jc=!0,rh=1<<++Sm,Sm<=jS?jK(this):bN(this),this.fn()}finally{Sm<=jS&&KK(this),rh=1<<--Sm,cA=this.parent,jc=t,this.parent=void 0,this.deferStop&&this.stop()}}stop(){cA===this?this.deferStop=!0:this.active&&(bN(this),this.onStop&&this.onStop(),this.active=!1)}}function bN(r){const{deps:e}=r;if(e.length){for(let t=0;t<e.length;t++)e[t].delete(r);e.length=0}}function WK(r,e){r.effect&&(r=r.effect.fn);const t=new d0(r);e&&(ui(t,e),e.scope&&Y6(t,e.scope)),(!e||!e.lazy)&&t.run();const n=t.run.bind(t);return n.effect=t,n}function zK(r){r.effect.stop()}let jc=!0;const Z6=[];function Zg(){Z6.push(jc),jc=!1}function Jg(){const r=Z6.pop();jc=r===void 0?!0:r}function vs(r,e,t){if(jc&&cA){let n=VS.get(r);n||VS.set(r,n=new Map);let i=n.get(t);i||n.set(t,i=MO()),J6(i)}}function J6(r,e){let t=!1;Sm<=jS?q6(r)||(r.n|=rh,t=!X6(r)):t=!r.has(cA),t&&(r.add(cA),cA.deps.push(r))}function wu(r,e,t,n,i,a){const o=VS.get(r);if(!o)return;let s=[];if(e==="clear")s=[...o.values()];else if(t==="length"&&Oe(r)){const A=_u(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":Oe(r)?FO(t)&&s.push(o.get("length")):(s.push(o.get(Ff)),og(r)&&s.push(o.get(KS)));break;case"delete":Oe(r)||(s.push(o.get(Ff)),og(r)&&s.push(o.get(KS)));break;case"set":og(r)&&s.push(o.get(Ff));break}if(s.length===1)s[0]&&WS(s[0]);else{const A=[];for(const l of s)l&&A.push(...l);WS(MO(A))}}function WS(r,e){const t=Oe(r)?r:[...r];for(const n of t)n.computed&&TN(n);for(const n of t)n.computed||TN(n)}function TN(r,e){(r!==cA||r.allowRecurse)&&(r.scheduler?r.scheduler():r.run())}const YK=eC("__proto__,__v_isRef,__isVue"),t4=new Set(Object.getOwnPropertyNames(Symbol).filter(r=>r!=="arguments"&&r!=="caller").map(r=>Symbol[r]).filter(By)),XK=iC(),qK=iC(!1,!0),ZK=iC(!0),JK=iC(!0,!0),SN=tW();function tW(){const r={};return["includes","indexOf","lastIndexOf"].forEach(e=>{r[e]=function(...t){const n=Kr(this);for(let a=0,o=this.length;a<o;a++)vs(n,"get",a+"");const i=n[e](...t);return i===-1||i===!1?n[e](...t.map(Kr)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{r[e]=function(...t){Zg();const n=Kr(this)[e].apply(this,t);return Jg(),n}}),r}function iC(r=!1,e=!1){return function(n,i,a){if(i==="__v_isReactive")return!r;if(i==="__v_isReadonly")return r;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&a===(r?e?s4:o4:e?a4:i4).get(n))return n;const o=Oe(n);if(!r&&o&&$r(SN,i))return Reflect.get(SN,i,a);const s=Reflect.get(n,i,a);return(By(i)?t4.has(i):YK(i))||(r||vs(n,"get",i),e)?s:Aa(s)?o&&FO(i)?s:s.value:Tn(s)?r?PO(s):md(s):s}}const eW=e4(),rW=e4(!0);function e4(r=!1){return function(t,n,i,a){let o=t[n];if(Xf(o)&&Aa(o)&&!Aa(i))return!1;if(!r&&(!by(i)&&!Xf(i)&&(o=Kr(o),i=Kr(i)),!Oe(t)&&Aa(o)&&!Aa(i)))return o.value=i,!0;const s=Oe(t)&&FO(n)?Number(n)<t.length:$r(t,n),A=Reflect.set(t,n,i,a);return t===Kr(a)&&(s?bg(i,o)&&wu(t,"set",n,i):wu(t,"add",n,i)),A}}function nW(r,e){const t=$r(r,e);r[e];const n=Reflect.deleteProperty(r,e);return n&&t&&wu(r,"delete",e,void 0),n}function iW(r,e){const t=Reflect.has(r,e);return(!By(e)||!t4.has(e))&&vs(r,"has",e),t}function aW(r){return vs(r,"iterate",Oe(r)?"length":Ff),Reflect.ownKeys(r)}const r4={get:XK,set:eW,deleteProperty:nW,has:iW,ownKeys:aW},n4={get:ZK,set(r,e){return!0},deleteProperty(r,e){return!0}},oW=ui({},r4,{get:qK,set:rW}),sW=ui({},n4,{get:JK}),NO=r=>r,aC=r=>Reflect.getPrototypeOf(r);function I_(r,e,t=!1,n=!1){r=r.__v_raw;const i=Kr(r),a=Kr(e);t||(e!==a&&vs(i,"get",e),vs(i,"get",a));const{has:o}=aC(i),s=n?NO:t?QO:Ty;if(o.call(i,e))return s(r.get(e));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(e)}function L_(r,e=!1){const t=this.__v_raw,n=Kr(t),i=Kr(r);return e||(r!==i&&vs(n,"has",r),vs(n,"has",i)),r===i?t.has(r):t.has(r)||t.has(i)}function O_(r,e=!1){return r=r.__v_raw,!e&&vs(Kr(r),"iterate",Ff),Reflect.get(r,"size",r)}function xN(r){r=Kr(r);const e=Kr(this);return aC(e).has.call(e,r)||(e.add(r),wu(e,"add",r,r)),this}function IN(r,e){e=Kr(e);const t=Kr(this),{has:n,get:i}=aC(t);let a=n.call(t,r);a||(r=Kr(r),a=n.call(t,r));const o=i.call(t,r);return t.set(r,e),a?bg(e,o)&&wu(t,"set",r,e):wu(t,"add",r,e),this}function LN(r){const e=Kr(this),{has:t,get:n}=aC(e);let i=t.call(e,r);i||(r=Kr(r),i=t.call(e,r)),n&&n.call(e,r);const a=e.delete(r);return i&&wu(e,"delete",r,void 0),a}function ON(){const r=Kr(this),e=r.size!==0,t=r.clear();return e&&wu(r,"clear",void 0,void 0),t}function F_(r,e){return function(n,i){const a=this,o=a.__v_raw,s=Kr(o),A=e?NO:r?QO:Ty;return!r&&vs(s,"iterate",Ff),o.forEach((l,u)=>n.call(i,A(l),A(u),a))}}function R_(r,e,t){return function(...n){const i=this.__v_raw,a=Kr(i),o=og(a),s=r==="entries"||r===Symbol.iterator&&o,A=r==="keys"&&o,l=i[r](...n),u=t?NO:e?QO:Ty;return!e&&vs(a,"iterate",A?KS:Ff),{next(){const{value:c,done:h}=l.next();return h?{value:c,done:h}:{value:s?[u(c[0]),u(c[1])]:u(c),done:h}},[Symbol.iterator](){return this}}}}function lc(r){return function(...e){return r==="delete"?!1:this}}function AW(){const r={get(a){return I_(this,a)},get size(){return O_(this)},has:L_,add:xN,set:IN,delete:LN,clear:ON,forEach:F_(!1,!1)},e={get(a){return I_(this,a,!1,!0)},get size(){return O_(this)},has:L_,add:xN,set:IN,delete:LN,clear:ON,forEach:F_(!1,!0)},t={get(a){return I_(this,a,!0)},get size(){return O_(this,!0)},has(a){return L_.call(this,a,!0)},add:lc("add"),set:lc("set"),delete:lc("delete"),clear:lc("clear"),forEach:F_(!0,!1)},n={get(a){return I_(this,a,!0,!0)},get size(){return O_(this,!0)},has(a){return L_.call(this,a,!0)},add:lc("add"),set:lc("set"),delete:lc("delete"),clear:lc("clear"),forEach:F_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(a=>{r[a]=R_(a,!1,!1),t[a]=R_(a,!0,!1),e[a]=R_(a,!1,!0),n[a]=R_(a,!0,!0)}),[r,t,e,n]}const[lW,uW,cW,hW]=AW();function oC(r,e){const t=e?r?hW:cW:r?uW:lW;return(n,i,a)=>i==="__v_isReactive"?!r:i==="__v_isReadonly"?r:i==="__v_raw"?n:Reflect.get($r(t,i)&&i in n?t:n,i,a)}const fW={get:oC(!1,!1)},dW={get:oC(!1,!0)},pW={get:oC(!0,!1)},gW={get:oC(!0,!0)},i4=new WeakMap,a4=new WeakMap,o4=new WeakMap,s4=new WeakMap;function vW(r){switch(r){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function mW(r){return r.__v_skip||!Object.isExtensible(r)?0:vW(DK(r))}function md(r){return Xf(r)?r:sC(r,!1,r4,fW,i4)}function A4(r){return sC(r,!1,oW,dW,a4)}function PO(r){return sC(r,!0,n4,pW,o4)}function yW(r){return sC(r,!0,sW,gW,s4)}function sC(r,e,t,n,i){if(!Tn(r)||r.__v_raw&&!(e&&r.__v_isReactive))return r;const a=i.get(r);if(a)return a;const o=mW(r);if(o===0)return r;const s=new Proxy(r,o===2?n:t);return i.set(r,s),s}function Rf(r){return Xf(r)?Rf(r.__v_raw):!!(r&&r.__v_isReactive)}function Xf(r){return!!(r&&r.__v_isReadonly)}function by(r){return!!(r&&r.__v_isShallow)}function UO(r){return Rf(r)||Xf(r)}function Kr(r){const e=r&&r.__v_raw;return e?Kr(e):r}function DO(r){return Ow(r,"__v_skip",!0),r}const Ty=r=>Tn(r)?md(r):r,QO=r=>Tn(r)?PO(r):r;function kO(r){jc&&cA&&(r=Kr(r),J6(r.dep||(r.dep=MO())))}function AC(r,e){r=Kr(r),r.dep&&WS(r.dep)}function Aa(r){return!!(r&&r.__v_isRef===!0)}function Fo(r){return u4(r,!1)}function l4(r){return u4(r,!0)}function u4(r,e){return Aa(r)?r:new _W(r,e)}class _W{constructor(e,t){this.__v_isShallow=t,this.dep=void 0,this.__v_isRef=!0,this._rawValue=t?e:Kr(e),this._value=t?e:Ty(e)}get value(){return kO(this),this._value}set value(e){const t=this.__v_isShallow||by(e)||Xf(e);e=t?e:Kr(e),bg(e,this._rawValue)&&(this._rawValue=e,this._value=t?e:Ty(e),AC(this))}}function wW(r){AC(r)}function Mf(r){return Aa(r)?r.value:r}const EW={get:(r,e,t)=>Mf(Reflect.get(r,e,t)),set:(r,e,t,n)=>{const i=r[e];return Aa(i)&&!Aa(t)?(i.value=t,!0):Reflect.set(r,e,t,n)}};function HO(r){return Rf(r)?r:new Proxy(r,EW)}class CW{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:t,set:n}=e(()=>kO(this),()=>AC(this));this._get=t,this._set=n}get value(){return this._get()}set value(e){this._set(e)}}function BW(r){return new CW(r)}function nh(r){const e=Oe(r)?new Array(r.length):{};for(const t in r)e[t]=c4(r,t);return e}class bW{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}}function c4(r,e,t){const n=r[e];return Aa(n)?n:new bW(r,e,t)}var h4;class TW{constructor(e,t,n,i){this._setter=t,this.dep=void 0,this.__v_isRef=!0,this[h4]=!1,this._dirty=!0,this.effect=new d0(e,()=>{this._dirty||(this._dirty=!0,AC(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=n}get value(){const e=Kr(this);return kO(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}h4="__v_isReadonly";function SW(r,e,t=!1){let n,i;const a=ar(r);return a?(n=r,i=dA):(n=r.get,i=r.set),new TW(n,i,a||!i,t)}function xW(r,...e){}function hu(r,e,t,n){let i;try{i=n?r(...n):r()}catch(a){yd(a,e,t)}return i}function gs(r,e,t,n){if(ar(r)){const a=hu(r,e,t,n);return a&&OO(a)&&a.catch(o=>{yd(o,e,t)}),a}const i=[];for(let a=0;a<r.length;a++)i.push(gs(r[a],e,t,n));return i}function yd(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){hu(A,null,10,[r,o,s]);return}}IW(r,t,i,n)}function IW(r,e,t,n=!0){console.error(r)}let Sy=!1,zS=!1;const ja=[];let qA=0;const Ag=[];let ru=null,_f=0;const f4=Promise.resolve();let GO=null;function lC(r){const e=GO||f4;return r?e.then(this?r.bind(this):r):e}function LW(r){let e=qA+1,t=ja.length;for(;e<t;){const n=e+t>>>1;xy(ja[n])<r?e=n+1:t=n}return e}function uC(r){(!ja.length||!ja.includes(r,Sy&&r.allowRecurse?qA+1:qA))&&(r.id==null?ja.push(r):ja.splice(LW(r.id),0,r),d4())}function d4(){!Sy&&!zS&&(zS=!0,GO=f4.then(p4))}function OW(r){const e=ja.indexOf(r);e>qA&&ja.splice(e,1)}function $O(r){Oe(r)?Ag.push(...r):(!ru||!ru.includes(r,r.allowRecurse?_f+1:_f))&&Ag.push(r),d4()}function FN(r,e=Sy?qA+1:0){for(;e<ja.length;e++){const t=ja[e];t&&t.pre&&(ja.splice(e,1),e--,t())}}function Fw(r){if(Ag.length){const e=[...new Set(Ag)];if(Ag.length=0,ru){ru.push(...e);return}for(ru=e,ru.sort((t,n)=>xy(t)-xy(n)),_f=0;_f<ru.length;_f++)ru[_f]();ru=null,_f=0}}const xy=r=>r.id==null?1/0:r.id,FW=(r,e)=>{const t=xy(r)-xy(e);if(t===0){if(r.pre&&!e.pre)return-1;if(e.pre&&!r.pre)return 1}return t};function p4(r){zS=!1,Sy=!0,ja.sort(FW);const e=dA;try{for(qA=0;qA<ja.length;qA++){const t=ja[qA];t&&t.active!==!1&&hu(t,null,14)}}finally{qA=0,ja.length=0,Fw(),Sy=!1,GO=null,(ja.length||Ag.length)&&p4()}}let Mp,M_=[];function g4(r,e){var t,n;Mp=r,Mp?(Mp.enabled=!0,M_.forEach(({event:i,args:a})=>Mp.emit(i,...a)),M_=[]):typeof window<"u"&&window.HTMLElement&&!(!((n=(t=window.navigator)===null||t===void 0?void 0:t.userAgent)===null||n===void 0)&&n.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(a=>{g4(a,e)}),setTimeout(()=>{Mp||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,M_=[])},3e3)):M_=[]}function RW(r,e,...t){if(r.isUnmounted)return;const n=r.vnode.props||wn;let i=t;const a=e.startsWith("update:"),o=a&&e.slice(7);if(o&&o in n){const u=`${o==="modelValue"?"model":o}Modifiers`,{number:c,trim:h}=n[u]||wn;h&&(i=t.map(f=>Zn(f)?f.trim():f)),c&&(i=t.map(_u))}let s,A=n[s=Xm(e)]||n[s=Xm(Uo(e))];!A&&a&&(A=n[s=Xm(Ps(e))]),A&&gs(A,r,6,i);const l=n[s+"Once"];if(l){if(!r.emitted)r.emitted={};else if(r.emitted[s])return;r.emitted[s]=!0,gs(l,r,6,i)}}function v4(r,e,t=!1){const n=e.emitsCache,i=n.get(r);if(i!==void 0)return i;const a=r.emits;let o={},s=!1;if(!ar(r)){const A=l=>{const u=v4(l,e,!0);u&&(s=!0,ui(o,u))};!t&&e.mixins.length&&e.mixins.forEach(A),r.extends&&A(r.extends),r.mixins&&r.mixins.forEach(A)}return!a&&!s?(Tn(r)&&n.set(r,null),null):(Oe(a)?a.forEach(A=>o[A]=null):ui(o,a),Tn(r)&&n.set(r,o),o)}function cC(r,e){return!r||!c0(e)?!1:(e=e.slice(2).replace(/Once$/,""),$r(r,e[0].toLowerCase()+e.slice(1))||$r(r,Ps(e))||$r(r,e))}let _a=null,hC=null;function Iy(r){const e=_a;return _a=r,hC=r&&r.type.__scopeId||null,e}function MW(r){hC=r}function NW(){hC=null}const PW=r=>VO;function VO(r,e=_a,t){if(!e||r._n)return r;const n=(...i)=>{n._d&&ex(-1);const a=Iy(e);let o;try{o=r(...i)}finally{Iy(a),n._d&&ex(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Z1(r){const{type:e,vnode:t,proxy:n,withProxy:i,props:a,propsOptions:[o],slots:s,attrs:A,emit:l,render:u,renderCache:c,data:h,setupState:f,ctx:d,inheritAttrs:g}=r;let m,v;const y=Iy(r);try{if(t.shapeFlag&4){const C=i||n;m=cs(u.call(C,C,c,a,f,h,d)),v=A}else{const C=e;m=cs(C.length>1?C(a,{attrs:A,slots:s,emit:l}):C(a,null)),v=e.props?A:DW(A)}}catch(C){Jm.length=0,yd(C,r,1),m=Pn(Wa)}let w=m;if(v&&g!==!1){const C=Object.keys(v),{shapeFlag:O}=w;C.length&&O&7&&(o&&C.some(IO)&&(v=QW(v,o)),w=pl(w,v))}return t.dirs&&(w=pl(w),w.dirs=w.dirs?w.dirs.concat(t.dirs):t.dirs),t.transition&&(w.transition=t.transition),m=w,Iy(y),m}function UW(r){let e;for(let t=0;t<r.length;t++){const n=r[t];if(ih(n)){if(n.type!==Wa||n.children==="v-if"){if(e)return;e=n}}else return}return e}const DW=r=>{let e;for(const t in r)(t==="class"||t==="style"||c0(t))&&((e||(e={}))[t]=r[t]);return e},QW=(r,e)=>{const t={};for(const n in r)(!IO(n)||!(n.slice(9)in e))&&(t[n]=r[n]);return t};function kW(r,e,t){const{props:n,children:i,component:a}=r,{props:o,children:s,patchFlag:A}=e,l=a.emitsOptions;if(e.dirs||e.transition)return!0;if(t&&A>=0){if(A&1024)return!0;if(A&16)return n?RN(n,o,l):!!o;if(A&8){const u=e.dynamicProps;for(let c=0;c<u.length;c++){const h=u[c];if(o[h]!==n[h]&&!cC(l,h))return!0}}}else return(i||s)&&(!s||!s.$stable)?!0:n===o?!1:n?o?RN(n,o,l):!0:!!o;return!1}function RN(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]&&!cC(t,a))return!0}return!1}function jO({vnode:r,parent:e},t){for(;e&&e.subTree===r;)(r=e.vnode).el=t,e=e.parent}const m4=r=>r.__isSuspense,HW={name:"Suspense",__isSuspense:!0,process(r,e,t,n,i,a,o,s,A,l){r==null?$W(e,t,n,i,a,o,s,A,l):VW(r,e,t,n,i,o,s,A,l)},hydrate:jW,create:KO,normalize:KW},GW=HW;function Ly(r,e){const t=r.props&&r.props[e];ar(t)&&t()}function $W(r,e,t,n,i,a,o,s,A){const{p:l,o:{createElement:u}}=A,c=u("div"),h=r.suspense=KO(r,i,n,e,c,t,a,o,s,A);l(null,h.pendingBranch=r.ssContent,c,null,n,h,a,o),h.deps>0?(Ly(r,"onPending"),Ly(r,"onFallback"),l(null,r.ssFallback,e,t,n,null,a,o),lg(h,r.ssFallback)):h.resolve()}function VW(r,e,t,n,i,a,o,s,{p:A,um:l,o:{createElement:u}}){const c=e.suspense=r.suspense;c.vnode=e,e.el=r.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:d,pendingBranch:g,isInFallback:m,isHydrating:v}=c;if(g)c.pendingBranch=h,ZA(h,g)?(A(g,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():m&&(A(d,f,t,n,i,null,a,o,s),lg(c,f))):(c.pendingId++,v?(c.isHydrating=!1,c.activeBranch=g):l(g,i,c),c.deps=0,c.effects.length=0,c.hiddenContainer=u("div"),m?(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0?c.resolve():(A(d,f,t,n,i,null,a,o,s),lg(c,f))):d&&ZA(h,d)?(A(d,h,t,n,i,c,a,o,s),c.resolve(!0)):(A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0&&c.resolve()));else if(d&&ZA(h,d))A(d,h,t,n,i,c,a,o,s),lg(c,h);else if(Ly(e,"onPending"),c.pendingBranch=h,c.pendingId++,A(null,h,c.hiddenContainer,null,i,c,a,o,s),c.deps<=0)c.resolve();else{const{timeout:y,pendingId:w}=c;y>0?setTimeout(()=>{c.pendingId===w&&c.fallback(f)},y):y===0&&c.fallback(f)}}function KO(r,e,t,n,i,a,o,s,A,l,u=!1){const{p:c,m:h,um:f,n:d,o:{parentNode:g,remove:m}}=l,v=_u(r.props&&r.props.timeout),y={vnode:r,parent:e,parentComponent:t,isSVG:o,container:n,hiddenContainer:i,anchor:a,deps:0,pendingId:0,timeout:typeof v=="number"?v:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:u,isUnmounted:!1,effects:[],resolve(w=!1){const{vnode:C,activeBranch:O,pendingBranch:F,pendingId:I,effects:T,parentComponent:L,container:N}=y;if(y.isHydrating)y.isHydrating=!1;else if(!w){const P=O&&F.transition&&F.transition.mode==="out-in";P&&(O.transition.afterLeave=()=>{I===y.pendingId&&h(F,N,U,0)});let{anchor:U}=y;O&&(U=d(O),f(O,L,y,!0)),P||h(F,N,U,0)}lg(y,F),y.pendingBranch=null,y.isInFallback=!1;let x=y.parent,S=!1;for(;x;){if(x.pendingBranch){x.effects.push(...T),S=!0;break}x=x.parent}S||$O(T),y.effects=[],Ly(C,"onResolve")},fallback(w){if(!y.pendingBranch)return;const{vnode:C,activeBranch:O,parentComponent:F,container:I,isSVG:T}=y;Ly(C,"onFallback");const L=d(O),N=()=>{y.isInFallback&&(c(null,w,I,L,F,null,T,s,A),lg(y,w))},x=w.transition&&w.transition.mode==="out-in";x&&(O.transition.afterLeave=N),y.isInFallback=!0,f(O,F,null,!0),x||N()},move(w,C,O){y.activeBranch&&h(y.activeBranch,w,C,O),y.container=w},next(){return y.activeBranch&&d(y.activeBranch)},registerDep(w,C){const O=!!y.pendingBranch;O&&y.deps++;const F=w.vnode.el;w.asyncDep.catch(I=>{yd(I,w,0)}).then(I=>{if(w.isUnmounted||y.isUnmounted||y.pendingId!==w.suspenseId)return;w.asyncResolved=!0;const{vnode:T}=w;rx(w,I,!1),F&&(T.el=F);const L=!F&&w.subTree.el;C(w,T,g(F||w.subTree.el),F?null:d(w.subTree),y,o,A),L&&m(L),jO(w,T.el),O&&--y.deps===0&&y.resolve()})},unmount(w,C){y.isUnmounted=!0,y.activeBranch&&f(y.activeBranch,t,w,C),y.pendingBranch&&f(y.pendingBranch,t,w,C)}};return y}function jW(r,e,t,n,i,a,o,s,A){const l=e.suspense=KO(e,n,t,r.parentNode,document.createElement("div"),null,i,a,o,s,!0),u=A(r,l.pendingBranch=e.ssContent,t,l,a,o);return l.deps===0&&l.resolve(),u}function KW(r){const{shapeFlag:e,children:t}=r,n=e&32;r.ssContent=MN(n?t.default:t),r.ssFallback=n?MN(t.fallback):Pn(Wa)}function MN(r){let e;if(ar(r)){const t=Jf&&r._c;t&&(r._d=!1,ti()),r=r(),t&&(r._d=!0,e=Po,W4())}return Oe(r)&&(r=UW(r)),r=cs(r),e&&!r.dynamicChildren&&(r.dynamicChildren=e.filter(t=>t!==r)),r}function y4(r,e){e&&e.pendingBranch?Oe(r)?e.effects.push(...r):e.effects.push(r):$O(r)}function lg(r,e){r.activeBranch=e;const{vnode:t,parentComponent:n}=r,i=t.el=e.el;n&&n.subTree===t&&(n.vnode.el=i,jO(n,i))}function Dr(r,e){if(Ki){let t=Ki.provides;const n=Ki.parent&&Ki.parent.provides;n===t&&(t=Ki.provides=Object.create(n)),t[r]=e}}function Be(r,e,t=!1){const n=Ki||_a;if(n){const i=n.parent==null?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides;if(i&&r in i)return i[r];if(arguments.length>1)return t&&ar(e)?e.call(n.proxy):e}}function _4(r,e){return p0(r,null,e)}function w4(r,e){return p0(r,null,{flush:"post"})}function WW(r,e){return p0(r,null,{flush:"sync"})}const N_={};function ye(r,e,t){return p0(r,e,t)}function p0(r,e,{immediate:t,deep:n,flush:i,onTrack:a,onTrigger:o}=wn){const s=Ki;let A,l=!1,u=!1;if(Aa(r)?(A=()=>r.value,l=by(r)):Rf(r)?(A=()=>r,n=!0):Oe(r)?(u=!0,l=r.some(w=>Rf(w)||by(w)),A=()=>r.map(w=>{if(Aa(w))return w.value;if(Rf(w))return bf(w);if(ar(w))return hu(w,s,2)})):ar(r)?e?A=()=>hu(r,s,2):A=()=>{if(!(s&&s.isUnmounted))return c&&c(),gs(r,s,3,[h])}:A=dA,e&&n){const w=A;A=()=>bf(w())}let c,h=w=>{c=v.onStop=()=>{hu(w,s,4)}},f;if(Sg)if(h=dA,e?t&&gs(e,s,3,[A(),u?[]:void 0,h]):A(),i==="sync"){const w=ak();f=w.__watcherHandles||(w.__watcherHandles=[])}else return dA;let d=u?new Array(r.length).fill(N_):N_;const g=()=>{if(v.active)if(e){const w=v.run();(n||l||(u?w.some((C,O)=>bg(C,d[O])):bg(w,d)))&&(c&&c(),gs(e,s,3,[w,d===N_?void 0:u&&d[0]===N_?[]:d,h]),d=w)}else v.run()};g.allowRecurse=!!e;let m;i==="sync"?m=g:i==="post"?m=()=>ga(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),m=()=>uC(g));const v=new d0(A,m);e?t?g():d=v.run():i==="post"?ga(v.run.bind(v),s&&s.suspense):v.run();const y=()=>{v.stop(),s&&s.scope&&LO(s.scope.effects,v)};return f&&f.push(y),y}function zW(r,e,t){const n=this.proxy,i=Zn(r)?r.includes(".")?E4(n,r):()=>n[r]:r.bind(n,n);let a;ar(e)?a=e:(a=e.handler,t=e);const o=Ki;ah(this);const s=p0(i,a.bind(n),t);return o?ah(o):Kc(),s}function E4(r,e){const t=e.split(".");return()=>{let n=r;for(let i=0;i<t.length&&n;i++)n=n[t[i]];return n}}function bf(r,e){if(!Tn(r)||r.__v_skip||(e=e||new Set,e.has(r)))return r;if(e.add(r),Aa(r))bf(r.value,e);else if(Oe(r))for(let t=0;t<r.length;t++)bf(r[t],e);else if(vd(r)||og(r))r.forEach(t=>{bf(t,e)});else if(z6(r))for(const t in r)bf(r[t],e);return r}function WO(){const r={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return cr(()=>{r.isMounted=!0}),gC(()=>{r.isUnmounting=!0}),r}const Ls=[Function,Array],YW={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ls,onEnter:Ls,onAfterEnter:Ls,onEnterCancelled:Ls,onBeforeLeave:Ls,onLeave:Ls,onAfterLeave:Ls,onLeaveCancelled:Ls,onBeforeAppear:Ls,onAppear:Ls,onAfterAppear:Ls,onAppearCancelled:Ls},setup(r,{slots:e}){const t=_h(),n=WO();let i;return()=>{const a=e.default&&fC(e.default(),!0);if(!a||!a.length)return;let o=a[0];if(a.length>1){for(const g of a)if(g.type!==Wa){o=g;break}}const s=Kr(r),{mode:A}=s;if(n.isLeaving)return Eb(o);const l=NN(o);if(!l)return Eb(o);const u=Tg(l,s,n,t);qf(l,u);const c=t.subTree,h=c&&NN(c);let f=!1;const{getTransitionKey:d}=l.type;if(d){const g=d();i===void 0?i=g:g!==i&&(i=g,f=!0)}if(h&&h.type!==Wa&&(!ZA(l,h)||f)){const g=Tg(h,s,n,t);if(qf(h,g),A==="out-in")return n.isLeaving=!0,g.afterLeave=()=>{n.isLeaving=!1,t.update.active!==!1&&t.update()},Eb(o);A==="in-out"&&l.type!==Wa&&(g.delayLeave=(m,v,y)=>{const w=C4(n,h);w[String(h.key)]=h,m._leaveCb=()=>{v(),m._leaveCb=void 0,delete u.delayedLeave},u.delayedLeave=y})}return o}}},zO=YW;function C4(r,e){const{leavingVNodes:t}=r;let n=t.get(e.type);return n||(n=Object.create(null),t.set(e.type,n)),n}function Tg(r,e,t,n){const{appear:i,mode:a,persisted:o=!1,onBeforeEnter:s,onEnter:A,onAfterEnter:l,onEnterCancelled:u,onBeforeLeave:c,onLeave:h,onAfterLeave:f,onLeaveCancelled:d,onBeforeAppear:g,onAppear:m,onAfterAppear:v,onAppearCancelled:y}=e,w=String(r.key),C=C4(t,r),O=(T,L)=>{T&&gs(T,n,9,L)},F=(T,L)=>{const N=L[1];O(T,L),Oe(T)?T.every(x=>x.length<=1)&&N():T.length<=1&&N()},I={mode:a,persisted:o,beforeEnter(T){let L=s;if(!t.isMounted)if(i)L=g||s;else return;T._leaveCb&&T._leaveCb(!0);const N=C[w];N&&ZA(r,N)&&N.el._leaveCb&&N.el._leaveCb(),O(L,[T])},enter(T){let L=A,N=l,x=u;if(!t.isMounted)if(i)L=m||A,N=v||l,x=y||u;else return;let S=!1;const P=T._enterCb=U=>{S||(S=!0,U?O(x,[T]):O(N,[T]),I.delayedLeave&&I.delayedLeave(),T._enterCb=void 0)};L?F(L,[T,P]):P()},leave(T,L){const N=String(r.key);if(T._enterCb&&T._enterCb(!0),t.isUnmounting)return L();O(c,[T]);let x=!1;const S=T._leaveCb=P=>{x||(x=!0,L(),P?O(d,[T]):O(f,[T]),T._leaveCb=void 0,C[N]===r&&delete C[N])};C[N]=r,h?F(h,[T,S]):S()},clone(T){return Tg(T,e,t,n)}};return I}function Eb(r){if(v0(r))return r=pl(r),r.children=null,r}function NN(r){return v0(r)?r.children?r.children[0]:void 0:r}function qf(r,e){r.shapeFlag&6&&r.component?qf(r.component.subTree,e):r.shapeFlag&128?(r.ssContent.transition=e.clone(r.ssContent),r.ssFallback.transition=e.clone(r.ssFallback)):r.transition=e}function fC(r,e=!1,t){let n=[],i=0;for(let a=0;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===ya?(o.patchFlag&128&&i++,n=n.concat(fC(o.children,e,s))):(e||o.type!==Wa)&&n.push(s!=null?pl(o,{key:s}):o)}if(i>1)for(let a=0;a<n.length;a++)n[a].patchFlag=-2;return n}function g0(r){return ar(r)?{setup:r,name:r.name}:r}const Nf=r=>!!r.type.__asyncLoader;function XW(r){ar(r)&&(r={loader:r});const{loader:e,loadingComponent:t,errorComponent:n,delay:i=200,timeout:a,suspensible:o=!0,onError:s}=r;let A=null,l,u=0;const c=()=>(u++,A=null,h()),h=()=>{let f;return A||(f=A=e().catch(d=>{if(d=d instanceof Error?d:new Error(String(d)),s)return new Promise((g,m)=>{s(d,()=>g(c()),()=>m(d),u+1)});throw d}).then(d=>f!==A&&A?A:(d&&(d.__esModule||d[Symbol.toStringTag]==="Module")&&(d=d.default),l=d,d)))};return g0({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return l},setup(){const f=Ki;if(l)return()=>Cb(l,f);const d=y=>{A=null,yd(y,f,13,!n)};if(o&&f.suspense||Sg)return h().then(y=>()=>Cb(y,f)).catch(y=>(d(y),()=>n?Pn(n,{error:y}):null));const g=Fo(!1),m=Fo(),v=Fo(!!i);return i&&setTimeout(()=>{v.value=!1},i),a!=null&&setTimeout(()=>{if(!g.value&&!m.value){const y=new Error(`Async component timed out after ${a}ms.`);d(y),m.value=y}},a),h().then(()=>{g.value=!0,f.parent&&v0(f.parent.vnode)&&uC(f.parent.update)}).catch(y=>{d(y),m.value=y}),()=>{if(g.value&&l)return Cb(l,f);if(m.value&&n)return Pn(n,{error:m.value});if(t&&!v.value)return Pn(t)}}})}function Cb(r,e){const{ref:t,props:n,children:i,ce:a}=e.vnode,o=Pn(r,n,i);return o.ref=t,o.ce=a,delete e.vnode.ce,o}const v0=r=>r.type.__isKeepAlive,qW={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(r,{slots:e}){const t=_h(),n=t.ctx;if(!n.renderer)return()=>{const y=e.default&&e.default();return y&&y.length===1?y[0]:y};const i=new Map,a=new Set;let o=null;const s=t.suspense,{renderer:{p:A,m:l,um:u,o:{createElement:c}}}=n,h=c("div");n.activate=(y,w,C,O,F)=>{const I=y.component;l(y,w,C,0,s),A(I.vnode,y,w,C,I,s,O,y.slotScopeIds,F),ga(()=>{I.isDeactivated=!1,I.a&&sg(I.a);const T=y.props&&y.props.onVnodeMounted;T&&Oo(T,I.parent,y)},s)},n.deactivate=y=>{const w=y.component;l(y,h,null,1,s),ga(()=>{w.da&&sg(w.da);const C=y.props&&y.props.onVnodeUnmounted;C&&Oo(C,w.parent,y),w.isDeactivated=!0},s)};function f(y){Bb(y),u(y,t,s,!0)}function d(y){i.forEach((w,C)=>{const O=ix(w.type);O&&(!y||!y(O))&&g(C)})}function g(y){const w=i.get(y);!o||w.type!==o.type?f(w):o&&Bb(o),i.delete(y),a.delete(y)}ye(()=>[r.include,r.exclude],([y,w])=>{y&&d(C=>xm(y,C)),w&&d(C=>!xm(w,C))},{flush:"post",deep:!0});let m=null;const v=()=>{m!=null&&i.set(m,bb(t.subTree))};return cr(v),pC(v),gC(()=>{i.forEach(y=>{const{subTree:w,suspense:C}=t,O=bb(w);if(y.type===O.type){Bb(O);const F=O.component.da;F&&ga(F,C);return}f(y)})}),()=>{if(m=null,!e.default)return null;const y=e.default(),w=y[0];if(y.length>1)return o=null,y;if(!ih(w)||!(w.shapeFlag&4)&&!(w.shapeFlag&128))return o=null,w;let C=bb(w);const O=C.type,F=ix(Nf(C)?C.type.__asyncResolved||{}:O),{include:I,exclude:T,max:L}=r;if(I&&(!F||!xm(I,F))||T&&F&&xm(T,F))return o=C,w;const N=C.key==null?O:C.key,x=i.get(N);return C.el&&(C=pl(C),w.shapeFlag&128&&(w.ssContent=C)),m=N,x?(C.el=x.el,C.component=x.component,C.transition&&qf(C,C.transition),C.shapeFlag|=512,a.delete(N),a.add(N)):(a.add(N),L&&a.size>parseInt(L,10)&&g(a.values().next().value)),C.shapeFlag|=256,o=C,m4(w.type)?w:C}}},ZW=qW;function xm(r,e){return Oe(r)?r.some(t=>xm(t,e)):Zn(r)?r.split(",").includes(e):r.test?r.test(e):!1}function B4(r,e){T4(r,"a",e)}function b4(r,e){T4(r,"da",e)}function T4(r,e,t=Ki){const n=r.__wdc||(r.__wdc=()=>{let i=t;for(;i;){if(i.isDeactivated)return;i=i.parent}return r()});if(dC(e,n,t),t){let i=t.parent;for(;i&&i.parent;)v0(i.parent.vnode)&&JW(n,e,t,i),i=i.parent}}function JW(r,e,t,n){const i=dC(e,r,n,!0);pr(()=>{LO(n[e],i)},t)}function Bb(r){r.shapeFlag&=-257,r.shapeFlag&=-513}function bb(r){return r.shapeFlag&128?r.ssContent:r}function dC(r,e,t=Ki,n=!1){if(t){const i=t[r]||(t[r]=[]),a=e.__weh||(e.__weh=(...o)=>{if(t.isUnmounted)return;Zg(),ah(t);const s=gs(e,t,r,o);return Kc(),Jg(),s});return n?i.unshift(a):i.push(a),a}}const Ou=r=>(e,t=Ki)=>(!Sg||r==="sp")&&dC(r,(...n)=>e(...n),t),S4=Ou("bm"),cr=Ou("m"),x4=Ou("bu"),pC=Ou("u"),gC=Ou("bum"),pr=Ou("um"),I4=Ou("sp"),L4=Ou("rtg"),O4=Ou("rtc");function F4(r,e=Ki){dC("ec",r,e)}function tz(r,e){const t=_a;if(t===null)return r;const n=yC(t)||t.proxy,i=r.dirs||(r.dirs=[]);for(let a=0;a<e.length;a++){let[o,s,A,l=wn]=e[a];o&&(ar(o)&&(o={mounted:o,updated:o}),o.deep&&bf(s),i.push({dir:o,instance:n,value:s,oldValue:void 0,arg:A,modifiers:l}))}return r}function YA(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&&(Zg(),gs(A,t,8,[r.el,s,r,e]),Jg())}}const YO="components",ez="directives";function R4(r,e){return XO(YO,r,!0,e)||r}const M4=Symbol();function rz(r){return Zn(r)?XO(YO,r,!1)||r:r||M4}function nz(r){return XO(ez,r)}function XO(r,e,t=!0,n=!1){const i=_a||Ki;if(i){const a=i.type;if(r===YO){const s=ix(a,!1);if(s&&(s===e||s===Uo(e)||s===f0(Uo(e))))return a}const o=PN(i[r]||a[r],e)||PN(i.appContext[r],e);return!o&&n?a:o}}function PN(r,e){return r&&(r[e]||r[Uo(e)]||r[f0(Uo(e))])}function iz(r,e,t,n){let i;const a=t&&t[n];if(Oe(r)||Zn(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(Tn(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 az(r,e){for(let t=0;t<e.length;t++){const n=e[t];if(Oe(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 Rr(r,e,t={},n,i){if(_a.isCE||_a.parent&&Nf(_a.parent)&&_a.parent.isCE)return e!=="default"&&(t.name=e),Pn("slot",t,n&&n());let a=r[e];a&&a._c&&(a._d=!1),ti();const o=a&&N4(a(t)),s=vC(ya,{key:t.key||o&&o.key||`_${e}`},o||(n?n():[]),o&&r._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),a&&a._c&&(a._d=!0),s}function N4(r){return r.some(e=>ih(e)?!(e.type===Wa||e.type===ya&&!N4(e.children)):!0)?r:null}function oz(r,e){const t={};for(const n in r)t[e&&/[A-Z]/.test(n)?`on:${n}`:Xm(n)]=r[n];return t}const YS=r=>r?J4(r)?yC(r)||r.proxy:YS(r.parent):null,qm=ui(Object.create(null),{$:r=>r,$el:r=>r.vnode.el,$data:r=>r.data,$props:r=>r.props,$attrs:r=>r.attrs,$slots:r=>r.slots,$refs:r=>r.refs,$parent:r=>YS(r.parent),$root:r=>YS(r.root),$emit:r=>r.emit,$options:r=>qO(r),$forceUpdate:r=>r.f||(r.f=()=>uC(r.update)),$nextTick:r=>r.n||(r.n=lC.bind(r.proxy)),$watch:r=>zW.bind(r)}),Tb=(r,e)=>r!==wn&&!r.__isScriptSetup&&$r(r,e),XS={get({_:r},e){const{ctx:t,setupState:n,data:i,props:a,accessCache:o,type:s,appContext:A}=r;let l;if(e[0]!=="$"){const f=o[e];if(f!==void 0)switch(f){case 1:return n[e];case 2:return i[e];case 4:return t[e];case 3:return a[e]}else{if(Tb(n,e))return o[e]=1,n[e];if(i!==wn&&$r(i,e))return o[e]=2,i[e];if((l=r.propsOptions[0])&&$r(l,e))return o[e]=3,a[e];if(t!==wn&&$r(t,e))return o[e]=4,t[e];qS&&(o[e]=0)}}const u=qm[e];let c,h;if(u)return e==="$attrs"&&vs(r,"get",e),u(r);if((c=s.__cssModules)&&(c=c[e]))return c;if(t!==wn&&$r(t,e))return o[e]=4,t[e];if(h=A.config.globalProperties,$r(h,e))return h[e]},set({_:r},e,t){const{data:n,setupState:i,ctx:a}=r;return Tb(i,e)?(i[e]=t,!0):n!==wn&&$r(n,e)?(n[e]=t,!0):$r(r.props,e)||e[0]==="$"&&e.slice(1)in r?!1:(a[e]=t,!0)},has({_:{data:r,setupState:e,accessCache:t,ctx:n,appContext:i,propsOptions:a}},o){let s;return!!t[o]||r!==wn&&$r(r,o)||Tb(e,o)||(s=a[0])&&$r(s,o)||$r(n,o)||$r(qm,o)||$r(i.config.globalProperties,o)},defineProperty(r,e,t){return t.get!=null?r._.accessCache[e]=0:$r(t,"value")&&this.set(r,e,t.value,null),Reflect.defineProperty(r,e,t)}},sz=ui({},XS,{get(r,e){if(e!==Symbol.unscopables)return XS.get(r,e,r)},has(r,e){return e[0]!=="_"&&!bK(e)}});let qS=!0;function Az(r){const e=qO(r),t=r.proxy,n=r.ctx;qS=!1,e.beforeCreate&&UN(e.beforeCreate,r,"bc");const{data:i,computed:a,methods:o,watch:s,provide:A,inject:l,created:u,beforeMount:c,mounted:h,beforeUpdate:f,updated:d,activated:g,deactivated:m,beforeDestroy:v,beforeUnmount:y,destroyed:w,unmounted:C,render:O,renderTracked:F,renderTriggered:I,errorCaptured:T,serverPrefetch:L,expose:N,inheritAttrs:x,components:S,directives:P,filters:U}=e;if(l&&lz(l,n,null,r.appContext.config.unwrapInjectedRef),o)for(const rt in o){const nt=o[rt];ar(nt)&&(n[rt]=nt.bind(t))}if(i){const rt=i.call(t,t);Tn(rt)&&(r.data=md(rt))}if(qS=!0,a)for(const rt in a){const nt=a[rt],At=ar(nt)?nt.bind(t,t):ar(nt.get)?nt.get.bind(t,t):dA,ct=!ar(nt)&&ar(nt.set)?nt.set.bind(t):dA,Tt=qe({get:At,set:ct});Object.defineProperty(n,rt,{enumerable:!0,configurable:!0,get:()=>Tt.value,set:M=>Tt.value=M})}if(s)for(const rt in s)P4(s[rt],n,t,rt);if(A){const rt=ar(A)?A.call(t):A;Reflect.ownKeys(rt).forEach(nt=>{Dr(nt,rt[nt])})}u&&UN(u,r,"c");function q(rt,nt){Oe(nt)?nt.forEach(At=>rt(At.bind(t))):nt&&rt(nt.bind(t))}if(q(S4,c),q(cr,h),q(x4,f),q(pC,d),q(B4,g),q(b4,m),q(F4,T),q(O4,F),q(L4,I),q(gC,y),q(pr,C),q(I4,L),Oe(N))if(N.length){const rt=r.exposed||(r.exposed={});N.forEach(nt=>{Object.defineProperty(rt,nt,{get:()=>t[nt],set:At=>t[nt]=At})})}else r.exposed||(r.exposed={});O&&r.render===dA&&(r.render=O),x!=null&&(r.inheritAttrs=x),S&&(r.components=S),P&&(r.directives=P)}function lz(r,e,t=dA,n=!1){Oe(r)&&(r=ZS(r));for(const i in r){const a=r[i];let o;Tn(a)?"default"in a?o=Be(a.from||i,a.default,!0):o=Be(a.from||i):o=Be(a),Aa(o)&&n?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:s=>o.value=s}):e[i]=o}}function UN(r,e,t){gs(Oe(r)?r.map(n=>n.bind(e.proxy)):r.bind(e.proxy),e,t)}function P4(r,e,t,n){const i=n.includes(".")?E4(t,n):()=>t[n];if(Zn(r)){const a=e[r];ar(a)&&ye(i,a)}else if(ar(r))ye(i,r.bind(t));else if(Tn(r))if(Oe(r))r.forEach(a=>P4(a,e,t,n));else{const a=ar(r.handler)?r.handler.bind(t):e[r.handler];ar(a)&&ye(i,a,r)}}function qO(r){const e=r.type,{mixins:t,extends:n}=e,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=r.appContext,s=a.get(e);let A;return s?A=s:!i.length&&!t&&!n?A=e:(A={},i.length&&i.forEach(l=>Rw(A,l,o,!0)),Rw(A,e,o)),Tn(e)&&a.set(e,A),A}function Rw(r,e,t,n=!1){const{mixins:i,extends:a}=e;a&&Rw(r,a,t,!0),i&&i.forEach(o=>Rw(r,o,t,!0));for(const o in e)if(!(n&&o==="expose")){const s=uz[o]||t&&t[o];r[o]=s?s(r[o],e[o]):e[o]}return r}const uz={data:DN,props:pf,emits:pf,methods:pf,computed:pf,beforeCreate:oo,created:oo,beforeMount:oo,mounted:oo,beforeUpdate:oo,updated:oo,beforeDestroy:oo,beforeUnmount:oo,destroyed:oo,unmounted:oo,activated:oo,deactivated:oo,errorCaptured:oo,serverPrefetch:oo,components:pf,directives:pf,watch:hz,provide:DN,inject:cz};function DN(r,e){return e?r?function(){return ui(ar(r)?r.call(this,this):r,ar(e)?e.call(this,this):e)}:e:r}function cz(r,e){return pf(ZS(r),ZS(e))}function ZS(r){if(Oe(r)){const e={};for(let t=0;t<r.length;t++)e[r[t]]=r[t];return e}return r}function oo(r,e){return r?[...new Set([].concat(r,e))]:e}function pf(r,e){return r?ui(ui(Object.create(null),r),e):e}function hz(r,e){if(!r)return e;if(!e)return r;const t=ui(Object.create(null),r);for(const n in e)t[n]=oo(r[n],e[n]);return t}function fz(r,e,t,n=!1){const i={},a={};Ow(a,mC,1),r.propsDefaults=Object.create(null),U4(r,e,i,a);for(const o in r.propsOptions[0])o in i||(i[o]=void 0);t?r.props=n?i:A4(i):r.type.props?r.props=i:r.props=a,r.attrs=a}function dz(r,e,t,n){const{props:i,attrs:a,vnode:{patchFlag:o}}=r,s=Kr(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(cC(r.emitsOptions,h))continue;const f=e[h];if(A)if($r(a,h))f!==a[h]&&(a[h]=f,l=!0);else{const d=Uo(h);i[d]=JS(A,s,d,f,r,!1)}else f!==a[h]&&(a[h]=f,l=!0)}}}else{U4(r,e,i,a)&&(l=!0);let u;for(const c in s)(!e||!$r(e,c)&&((u=Ps(c))===c||!$r(e,u)))&&(A?t&&(t[c]!==void 0||t[u]!==void 0)&&(i[c]=JS(A,s,c,void 0,r,!0)):delete i[c]);if(a!==s)for(const c in a)(!e||!$r(e,c))&&(delete a[c],l=!0)}l&&wu(r,"set","$attrs")}function U4(r,e,t,n){const[i,a]=r.propsOptions;let o=!1,s;if(e)for(let A in e){if(Ym(A))continue;const l=e[A];let u;i&&$r(i,u=Uo(A))?!a||!a.includes(u)?t[u]=l:(s||(s={}))[u]=l:cC(r.emitsOptions,A)||(!(A in n)||l!==n[A])&&(n[A]=l,o=!0)}if(a){const A=Kr(t),l=s||wn;for(let u=0;u<a.length;u++){const c=a[u];t[c]=JS(i,A,c,l[c],r,!$r(l,c))}}return o}function JS(r,e,t,n,i,a){const o=r[t];if(o!=null){const s=$r(o,"default");if(s&&n===void 0){const A=o.default;if(o.type!==Function&&ar(A)){const{propsDefaults:l}=i;t in l?n=l[t]:(ah(i),n=l[t]=A.call(null,e),Kc())}else n=A}o[0]&&(a&&!s?n=!1:o[1]&&(n===""||n===Ps(t))&&(n=!0))}return n}function D4(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(!ar(r)){const u=c=>{A=!0;const[h,f]=D4(c,e,!0);ui(o,h),f&&s.push(...f)};!t&&e.mixins.length&&e.mixins.forEach(u),r.extends&&u(r.extends),r.mixins&&r.mixins.forEach(u)}if(!a&&!A)return Tn(r)&&n.set(r,ag),ag;if(Oe(a))for(let u=0;u<a.length;u++){const c=Uo(a[u]);QN(c)&&(o[c]=wn)}else if(a)for(const u in a){const c=Uo(u);if(QN(c)){const h=a[u],f=o[c]=Oe(h)||ar(h)?{type:h}:Object.assign({},h);if(f){const d=GN(Boolean,f.type),g=GN(String,f.type);f[0]=d>-1,f[1]=g<0||d<g,(d>-1||$r(f,"default"))&&s.push(c)}}}const l=[o,s];return Tn(r)&&n.set(r,l),l}function QN(r){return r[0]!=="$"}function kN(r){const e=r&&r.toString().match(/^\s*function (\w+)/);return e?e[1]:r===null?"null":""}function HN(r,e){return kN(r)===kN(e)}function GN(r,e){return Oe(e)?e.findIndex(t=>HN(t,r)):ar(e)&&HN(e,r)?0:-1}const Q4=r=>r[0]==="_"||r==="$stable",ZO=r=>Oe(r)?r.map(cs):[cs(r)],pz=(r,e,t)=>{if(e._n)return e;const n=VO((...i)=>ZO(e(...i)),t);return n._c=!1,n},k4=(r,e,t)=>{const n=r._ctx;for(const i in r){if(Q4(i))continue;const a=r[i];if(ar(a))e[i]=pz(i,a,n);else if(a!=null){const o=ZO(a);e[i]=()=>o}}},H4=(r,e)=>{const t=ZO(e);r.slots.default=()=>t},gz=(r,e)=>{if(r.vnode.shapeFlag&32){const t=e._;t?(r.slots=Kr(e),Ow(e,"_",t)):k4(e,r.slots={})}else r.slots={},e&&H4(r,e);Ow(r.slots,mC,1)},vz=(r,e,t)=>{const{vnode:n,slots:i}=r;let a=!0,o=wn;if(n.shapeFlag&32){const s=e._;s?t&&s===1?a=!1:(ui(i,e),!t&&s===1&&delete i._):(a=!e.$stable,k4(e,i)),o=e}else e&&(H4(r,e),o={default:1});if(a)for(const s in i)!Q4(s)&&!(s in o)&&delete i[s]};function G4(){return{app:null,config:{isNativeTag:NK,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let mz=0;function yz(r,e){return function(n,i=null){ar(n)||(n=Object.assign({},n)),i!=null&&!Tn(i)&&(i=null);const a=G4(),o=new Set;let s=!1;const A=a.app={_uid:mz++,_component:n,_props:i,_container:null,_context:a,_instance:null,version:sk,get config(){return a.config},set config(l){},use(l,...u){return o.has(l)||(l&&ar(l.install)?(o.add(l),l.install(A,...u)):ar(l)&&(o.add(l),l(A,...u))),A},mixin(l){return a.mixins.includes(l)||a.mixins.push(l),A},component(l,u){return u?(a.components[l]=u,A):a.components[l]},directive(l,u){return u?(a.directives[l]=u,A):a.directives[l]},mount(l,u,c){if(!s){const h=Pn(n,i);return h.appContext=a,u&&e?e(h,l):r(h,l,c),s=!0,A._container=l,l.__vue_app__=A,yC(h.component)||h.component.proxy}},unmount(){s&&(r(null,A._container),delete A._container.__vue_app__)},provide(l,u){return a.provides[l]=u,A}};return A}}function Mw(r,e,t,n,i=!1){if(Oe(r)){r.forEach((h,f)=>Mw(h,e&&(Oe(e)?e[f]:e),t,n,i));return}if(Nf(n)&&!i)return;const a=n.shapeFlag&4?yC(n.component)||n.component.proxy:n.el,o=i?null:a,{i:s,r:A}=r,l=e&&e.r,u=s.refs===wn?s.refs={}:s.refs,c=s.setupState;if(l!=null&&l!==A&&(Zn(l)?(u[l]=null,$r(c,l)&&(c[l]=null)):Aa(l)&&(l.value=null)),ar(A))hu(A,s,12,[o,u]);else{const h=Zn(A),f=Aa(A);if(h||f){const d=()=>{if(r.f){const g=h?$r(c,A)?c[A]:u[A]:A.value;i?Oe(g)&&LO(g,a):Oe(g)?g.includes(a)||g.push(a):h?(u[A]=[a],$r(c,A)&&(c[A]=u[A])):(A.value=[a],r.k&&(u[r.k]=A.value))}else h?(u[A]=o,$r(c,A)&&(c[A]=o)):f&&(A.value=o,r.k&&(u[r.k]=o))};o?(d.id=-1,ga(d,t)):d()}}}let uc=!1;const P_=r=>/svg/.test(r.namespaceURI)&&r.tagName!=="foreignObject",U_=r=>r.nodeType===8;function _z(r){const{mt:e,p:t,o:{patchProp:n,createText:i,nextSibling:a,parentNode:o,remove:s,insert:A,createComment:l}}=r,u=(v,y)=>{if(!y.hasChildNodes()){t(null,v,y),Fw(),y._vnode=v;return}uc=!1,c(y.firstChild,v,null,null,null),Fw(),y._vnode=v,uc&&console.error("Hydration completed but contains mismatches.")},c=(v,y,w,C,O,F=!1)=>{const I=U_(v)&&v.data==="[",T=()=>g(v,y,w,C,O,I),{type:L,ref:N,shapeFlag:x,patchFlag:S}=y;let P=v.nodeType;y.el=v,S===-2&&(F=!1,y.dynamicChildren=null);let U=null;switch(L){case Zf:P!==3?y.children===""?(A(y.el=i(""),o(v),v),U=v):U=T():(v.data!==y.children&&(uc=!0,v.data=y.children),U=a(v));break;case Wa:P!==8||I?U=T():U=a(v);break;case Pf:if(I&&(v=a(v),P=v.nodeType),P===1||P===3){U=v;const tt=!y.children.length;for(let q=0;q<y.staticCount;q++)tt&&(y.children+=U.nodeType===1?U.outerHTML:U.data),q===y.staticCount-1&&(y.anchor=U),U=a(U);return I?a(U):U}else T();break;case ya:I?U=d(v,y,w,C,O,F):U=T();break;default:if(x&1)P!==1||y.type.toLowerCase()!==v.tagName.toLowerCase()?U=T():U=h(v,y,w,C,O,F);else if(x&6){y.slotScopeIds=O;const tt=o(v);if(e(y,tt,null,w,C,P_(tt),F),U=I?m(v):a(v),U&&U_(U)&&U.data==="teleport end"&&(U=a(U)),Nf(y)){let q;I?(q=Pn(ya),q.anchor=U?U.previousSibling:tt.lastChild):q=v.nodeType===3?eF(""):Pn("div"),q.el=v,y.component.subTree=q}}else x&64?P!==8?U=T():U=y.type.hydrate(v,y,w,C,O,F,r,f):x&128&&(U=y.type.hydrate(v,y,w,C,P_(o(v)),O,F,r,c))}return N!=null&&Mw(N,null,C,y),U},h=(v,y,w,C,O,F)=>{F=F||!!y.dynamicChildren;const{type:I,props:T,patchFlag:L,shapeFlag:N,dirs:x}=y,S=I==="input"&&x||I==="option";if(S||L!==-1){if(x&&YA(y,null,w,"created"),T)if(S||!F||L&48)for(const U in T)(S&&U.endsWith("value")||c0(U)&&!Ym(U))&&n(v,U,null,T[U],!1,void 0,w);else T.onClick&&n(v,"onClick",null,T.onClick,!1,void 0,w);let P;if((P=T&&T.onVnodeBeforeMount)&&Oo(P,w,y),x&&YA(y,null,w,"beforeMount"),((P=T&&T.onVnodeMounted)||x)&&y4(()=>{P&&Oo(P,w,y),x&&YA(y,null,w,"mounted")},C),N&16&&!(T&&(T.innerHTML||T.textContent))){let U=f(v.firstChild,y,v,w,C,O,F);for(;U;){uc=!0;const tt=U;U=U.nextSibling,s(tt)}}else N&8&&v.textContent!==y.children&&(uc=!0,v.textContent=y.children)}return v.nextSibling},f=(v,y,w,C,O,F,I)=>{I=I||!!y.dynamicChildren;const T=y.children,L=T.length;for(let N=0;N<L;N++){const x=I?T[N]:T[N]=cs(T[N]);if(v)v=c(v,x,C,O,F,I);else{if(x.type===Zf&&!x.children)continue;uc=!0,t(null,x,w,null,C,O,P_(w),F)}}return v},d=(v,y,w,C,O,F)=>{const{slotScopeIds:I}=y;I&&(O=O?O.concat(I):I);const T=o(v),L=f(a(v),y,T,w,C,O,F);return L&&U_(L)&&L.data==="]"?a(y.anchor=L):(uc=!0,A(y.anchor=l("]"),T,L),L)},g=(v,y,w,C,O,F)=>{if(uc=!0,y.el=null,F){const L=m(v);for(;;){const N=a(v);if(N&&N!==L)s(N);else break}}const I=a(v),T=o(v);return s(v),t(null,y,T,I,w,C,P_(T),O),I},m=v=>{let y=0;for(;v;)if(v=a(v),v&&U_(v)&&(v.data==="["&&y++,v.data==="]")){if(y===0)return a(v);y--}return v};return[u,c]}const ga=y4;function $4(r){return j4(r)}function V4(r){return j4(r,_z)}function j4(r,e){const t=HK();t.__VUE__=!0;const{insert:n,remove:i,patchProp:a,createElement:o,createText:s,createComment:A,setText:l,setElementText:u,parentNode:c,nextSibling:h,setScopeId:f=dA,insertStaticContent:d}=r,g=(j,Z,ft,it=null,V=null,Ft=null,Mt=!1,Et=null,Bt=!!Z.dynamicChildren)=>{if(j===Z)return;j&&!ZA(j,Z)&&(it=ot(j),M(j,V,Ft,!0),j=null),Z.patchFlag===-2&&(Bt=!1,Z.dynamicChildren=null);const{type:Ct,ref:Rt,shapeFlag:Nt}=Z;switch(Ct){case Zf:m(j,Z,ft,it);break;case Wa:v(j,Z,ft,it);break;case Pf:j==null&&y(Z,ft,it,Mt);break;case ya:S(j,Z,ft,it,V,Ft,Mt,Et,Bt);break;default:Nt&1?O(j,Z,ft,it,V,Ft,Mt,Et,Bt):Nt&6?P(j,Z,ft,it,V,Ft,Mt,Et,Bt):(Nt&64||Nt&128)&&Ct.process(j,Z,ft,it,V,Ft,Mt,Et,Bt,X)}Rt!=null&&V&&Mw(Rt,j&&j.ref,Ft,Z||j,!Z)},m=(j,Z,ft,it)=>{if(j==null)n(Z.el=s(Z.children),ft,it);else{const V=Z.el=j.el;Z.children!==j.children&&l(V,Z.children)}},v=(j,Z,ft,it)=>{j==null?n(Z.el=A(Z.children||""),ft,it):Z.el=j.el},y=(j,Z,ft,it)=>{[j.el,j.anchor]=d(j.children,Z,ft,it,j.el,j.anchor)},w=({el:j,anchor:Z},ft,it)=>{let V;for(;j&&j!==Z;)V=h(j),n(j,ft,it),j=V;n(Z,ft,it)},C=({el:j,anchor:Z})=>{let ft;for(;j&&j!==Z;)ft=h(j),i(j),j=ft;i(Z)},O=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{Mt=Mt||Z.type==="svg",j==null?F(Z,ft,it,V,Ft,Mt,Et,Bt):L(j,Z,V,Ft,Mt,Et,Bt)},F=(j,Z,ft,it,V,Ft,Mt,Et)=>{let Bt,Ct;const{type:Rt,props:Nt,shapeFlag:Dt,transition:Wt,dirs:te}=j;if(Bt=j.el=o(j.type,Ft,Nt&&Nt.is,Nt),Dt&8?u(Bt,j.children):Dt&16&&T(j.children,Bt,null,it,V,Ft&&Rt!=="foreignObject",Mt,Et),te&&YA(j,null,it,"created"),Nt){for(const oe in Nt)oe!=="value"&&!Ym(oe)&&a(Bt,oe,null,Nt[oe],Ft,j.children,it,V,J);"value"in Nt&&a(Bt,"value",null,Nt.value),(Ct=Nt.onVnodeBeforeMount)&&Oo(Ct,it,j)}I(Bt,j,j.scopeId,Mt,it),te&&YA(j,null,it,"beforeMount");const Ae=(!V||V&&!V.pendingBranch)&&Wt&&!Wt.persisted;Ae&&Wt.beforeEnter(Bt),n(Bt,Z,ft),((Ct=Nt&&Nt.onVnodeMounted)||Ae||te)&&ga(()=>{Ct&&Oo(Ct,it,j),Ae&&Wt.enter(Bt),te&&YA(j,null,it,"mounted")},V)},I=(j,Z,ft,it,V)=>{if(ft&&f(j,ft),it)for(let Ft=0;Ft<it.length;Ft++)f(j,it[Ft]);if(V){let Ft=V.subTree;if(Z===Ft){const Mt=V.vnode;I(j,Mt,Mt.scopeId,Mt.slotScopeIds,V.parent)}}},T=(j,Z,ft,it,V,Ft,Mt,Et,Bt=0)=>{for(let Ct=Bt;Ct<j.length;Ct++){const Rt=j[Ct]=Et?Tc(j[Ct]):cs(j[Ct]);g(null,Rt,Z,ft,it,V,Ft,Mt,Et)}},L=(j,Z,ft,it,V,Ft,Mt)=>{const Et=Z.el=j.el;let{patchFlag:Bt,dynamicChildren:Ct,dirs:Rt}=Z;Bt|=j.patchFlag&16;const Nt=j.props||wn,Dt=Z.props||wn;let Wt;ft&&rf(ft,!1),(Wt=Dt.onVnodeBeforeUpdate)&&Oo(Wt,ft,Z,j),Rt&&YA(Z,j,ft,"beforeUpdate"),ft&&rf(ft,!0);const te=V&&Z.type!=="foreignObject";if(Ct?N(j.dynamicChildren,Ct,Et,ft,it,te,Ft):Mt||nt(j,Z,Et,null,ft,it,te,Ft,!1),Bt>0){if(Bt&16)x(Et,Z,Nt,Dt,ft,it,V);else if(Bt&2&&Nt.class!==Dt.class&&a(Et,"class",null,Dt.class,V),Bt&4&&a(Et,"style",Nt.style,Dt.style,V),Bt&8){const Ae=Z.dynamicProps;for(let oe=0;oe<Ae.length;oe++){const Jt=Ae[oe],fe=Nt[Jt],qt=Dt[Jt];(qt!==fe||Jt==="value")&&a(Et,Jt,fe,qt,V,j.children,ft,it,J)}}Bt&1&&j.children!==Z.children&&u(Et,Z.children)}else!Mt&&Ct==null&&x(Et,Z,Nt,Dt,ft,it,V);((Wt=Dt.onVnodeUpdated)||Rt)&&ga(()=>{Wt&&Oo(Wt,ft,Z,j),Rt&&YA(Z,j,ft,"updated")},it)},N=(j,Z,ft,it,V,Ft,Mt)=>{for(let Et=0;Et<Z.length;Et++){const Bt=j[Et],Ct=Z[Et],Rt=Bt.el&&(Bt.type===ya||!ZA(Bt,Ct)||Bt.shapeFlag&70)?c(Bt.el):ft;g(Bt,Ct,Rt,null,it,V,Ft,Mt,!0)}},x=(j,Z,ft,it,V,Ft,Mt)=>{if(ft!==it){if(ft!==wn)for(const Et in ft)!Ym(Et)&&!(Et in it)&&a(j,Et,ft[Et],null,Mt,Z.children,V,Ft,J);for(const Et in it){if(Ym(Et))continue;const Bt=it[Et],Ct=ft[Et];Bt!==Ct&&Et!=="value"&&a(j,Et,Ct,Bt,Mt,Z.children,V,Ft,J)}"value"in it&&a(j,"value",ft.value,it.value)}},S=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{const Ct=Z.el=j?j.el:s(""),Rt=Z.anchor=j?j.anchor:s("");let{patchFlag:Nt,dynamicChildren:Dt,slotScopeIds:Wt}=Z;Wt&&(Et=Et?Et.concat(Wt):Wt),j==null?(n(Ct,ft,it),n(Rt,ft,it),T(Z.children,ft,Rt,V,Ft,Mt,Et,Bt)):Nt>0&&Nt&64&&Dt&&j.dynamicChildren?(N(j.dynamicChildren,Dt,ft,V,Ft,Mt,Et),(Z.key!=null||V&&Z===V.subTree)&&JO(j,Z,!0)):nt(j,Z,ft,Rt,V,Ft,Mt,Et,Bt)},P=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{Z.slotScopeIds=Et,j==null?Z.shapeFlag&512?V.ctx.activate(Z,ft,it,Mt,Bt):U(Z,ft,it,V,Ft,Mt,Bt):tt(j,Z,Bt)},U=(j,Z,ft,it,V,Ft,Mt)=>{const Et=j.component=Z4(j,it,V);if(v0(j)&&(Et.ctx.renderer=X),tk(Et),Et.asyncDep){if(V&&V.registerDep(Et,q),!j.el){const Bt=Et.subTree=Pn(Wa);v(null,Bt,Z,ft)}return}q(Et,j,Z,ft,V,Ft,Mt)},tt=(j,Z,ft)=>{const it=Z.component=j.component;if(kW(j,Z,ft))if(it.asyncDep&&!it.asyncResolved){rt(it,Z,ft);return}else it.next=Z,OW(it.update),it.update();else Z.el=j.el,it.vnode=Z},q=(j,Z,ft,it,V,Ft,Mt)=>{const Et=()=>{if(j.isMounted){let{next:Rt,bu:Nt,u:Dt,parent:Wt,vnode:te}=j,Ae=Rt,oe;rf(j,!1),Rt?(Rt.el=te.el,rt(j,Rt,Mt)):Rt=te,Nt&&sg(Nt),(oe=Rt.props&&Rt.props.onVnodeBeforeUpdate)&&Oo(oe,Wt,Rt,te),rf(j,!0);const Jt=Z1(j),fe=j.subTree;j.subTree=Jt,g(fe,Jt,c(fe.el),ot(fe),j,V,Ft),Rt.el=Jt.el,Ae===null&&jO(j,Jt.el),Dt&&ga(Dt,V),(oe=Rt.props&&Rt.props.onVnodeUpdated)&&ga(()=>Oo(oe,Wt,Rt,te),V)}else{let Rt;const{el:Nt,props:Dt}=Z,{bm:Wt,m:te,parent:Ae}=j,oe=Nf(Z);if(rf(j,!1),Wt&&sg(Wt),!oe&&(Rt=Dt&&Dt.onVnodeBeforeMount)&&Oo(Rt,Ae,Z),rf(j,!0),Nt&&at){const Jt=()=>{j.subTree=Z1(j),at(Nt,j.subTree,j,V,null)};oe?Z.type.__asyncLoader().then(()=>!j.isUnmounted&&Jt()):Jt()}else{const Jt=j.subTree=Z1(j);g(null,Jt,ft,it,j,V,Ft),Z.el=Jt.el}if(te&&ga(te,V),!oe&&(Rt=Dt&&Dt.onVnodeMounted)){const Jt=Z;ga(()=>Oo(Rt,Ae,Jt),V)}(Z.shapeFlag&256||Ae&&Nf(Ae.vnode)&&Ae.vnode.shapeFlag&256)&&j.a&&ga(j.a,V),j.isMounted=!0,Z=ft=it=null}},Bt=j.effect=new d0(Et,()=>uC(Ct),j.scope),Ct=j.update=()=>Bt.run();Ct.id=j.uid,rf(j,!0),Ct()},rt=(j,Z,ft)=>{Z.component=j;const it=j.vnode.props;j.vnode=Z,j.next=null,dz(j,Z.props,it,ft),vz(j,Z.children,ft),Zg(),FN(),Jg()},nt=(j,Z,ft,it,V,Ft,Mt,Et,Bt=!1)=>{const Ct=j&&j.children,Rt=j?j.shapeFlag:0,Nt=Z.children,{patchFlag:Dt,shapeFlag:Wt}=Z;if(Dt>0){if(Dt&128){ct(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt);return}else if(Dt&256){At(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt);return}}Wt&8?(Rt&16&&J(Ct,V,Ft),Nt!==Ct&&u(ft,Nt)):Rt&16?Wt&16?ct(Ct,Nt,ft,it,V,Ft,Mt,Et,Bt):J(Ct,V,Ft,!0):(Rt&8&&u(ft,""),Wt&16&&T(Nt,ft,it,V,Ft,Mt,Et,Bt))},At=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{j=j||ag,Z=Z||ag;const Ct=j.length,Rt=Z.length,Nt=Math.min(Ct,Rt);let Dt;for(Dt=0;Dt<Nt;Dt++){const Wt=Z[Dt]=Bt?Tc(Z[Dt]):cs(Z[Dt]);g(j[Dt],Wt,ft,null,V,Ft,Mt,Et,Bt)}Ct>Rt?J(j,V,Ft,!0,!1,Nt):T(Z,ft,it,V,Ft,Mt,Et,Bt,Nt)},ct=(j,Z,ft,it,V,Ft,Mt,Et,Bt)=>{let Ct=0;const Rt=Z.length;let Nt=j.length-1,Dt=Rt-1;for(;Ct<=Nt&&Ct<=Dt;){const Wt=j[Ct],te=Z[Ct]=Bt?Tc(Z[Ct]):cs(Z[Ct]);if(ZA(Wt,te))g(Wt,te,ft,null,V,Ft,Mt,Et,Bt);else break;Ct++}for(;Ct<=Nt&&Ct<=Dt;){const Wt=j[Nt],te=Z[Dt]=Bt?Tc(Z[Dt]):cs(Z[Dt]);if(ZA(Wt,te))g(Wt,te,ft,null,V,Ft,Mt,Et,Bt);else break;Nt--,Dt--}if(Ct>Nt){if(Ct<=Dt){const Wt=Dt+1,te=Wt<Rt?Z[Wt].el:it;for(;Ct<=Dt;)g(null,Z[Ct]=Bt?Tc(Z[Ct]):cs(Z[Ct]),ft,te,V,Ft,Mt,Et,Bt),Ct++}}else if(Ct>Dt)for(;Ct<=Nt;)M(j[Ct],V,Ft,!0),Ct++;else{const Wt=Ct,te=Ct,Ae=new Map;for(Ct=te;Ct<=Dt;Ct++){const Ne=Z[Ct]=Bt?Tc(Z[Ct]):cs(Z[Ct]);Ne.key!=null&&Ae.set(Ne.key,Ct)}let oe,Jt=0;const fe=Dt-te+1;let qt=!1,nr=0;const ke=new Array(fe);for(Ct=0;Ct<fe;Ct++)ke[Ct]=0;for(Ct=Wt;Ct<=Nt;Ct++){const Ne=j[Ct];if(Jt>=fe){M(Ne,V,Ft,!0);continue}let Pe;if(Ne.key!=null)Pe=Ae.get(Ne.key);else for(oe=te;oe<=Dt;oe++)if(ke[oe-te]===0&&ZA(Ne,Z[oe])){Pe=oe;break}Pe===void 0?M(Ne,V,Ft,!0):(ke[Pe-te]=Ct+1,Pe>=nr?nr=Pe:qt=!0,g(Ne,Z[Pe],ft,null,V,Ft,Mt,Et,Bt),Jt++)}const wr=qt?wz(ke):ag;for(oe=wr.length-1,Ct=fe-1;Ct>=0;Ct--){const Ne=te+Ct,Pe=Z[Ne],Hr=Ne+1<Rt?Z[Ne+1].el:it;ke[Ct]===0?g(null,Pe,ft,Hr,V,Ft,Mt,Et,Bt):qt&&(oe<0||Ct!==wr[oe]?Tt(Pe,ft,Hr,2):oe--)}}},Tt=(j,Z,ft,it,V=null)=>{const{el:Ft,type:Mt,transition:Et,children:Bt,shapeFlag:Ct}=j;if(Ct&6){Tt(j.component.subTree,Z,ft,it);return}if(Ct&128){j.suspense.move(Z,ft,it);return}if(Ct&64){Mt.move(j,Z,ft,X);return}if(Mt===ya){n(Ft,Z,ft);for(let Nt=0;Nt<Bt.length;Nt++)Tt(Bt[Nt],Z,ft,it);n(j.anchor,Z,ft);return}if(Mt===Pf){w(j,Z,ft);return}if(it!==2&&Ct&1&&Et)if(it===0)Et.beforeEnter(Ft),n(Ft,Z,ft),ga(()=>Et.enter(Ft),V);else{const{leave:Nt,delayLeave:Dt,afterLeave:Wt}=Et,te=()=>n(Ft,Z,ft),Ae=()=>{Nt(Ft,()=>{te(),Wt&&Wt()})};Dt?Dt(Ft,te,Ae):Ae()}else n(Ft,Z,ft)},M=(j,Z,ft,it=!1,V=!1)=>{const{type:Ft,props:Mt,ref:Et,children:Bt,dynamicChildren:Ct,shapeFlag:Rt,patchFlag:Nt,dirs:Dt}=j;if(Et!=null&&Mw(Et,null,ft,j,!0),Rt&256){Z.ctx.deactivate(j);return}const Wt=Rt&1&&Dt,te=!Nf(j);let Ae;if(te&&(Ae=Mt&&Mt.onVnodeBeforeUnmount)&&Oo(Ae,Z,j),Rt&6)H(j.component,ft,it);else{if(Rt&128){j.suspense.unmount(ft,it);return}Wt&&YA(j,null,Z,"beforeUnmount"),Rt&64?j.type.remove(j,Z,ft,V,X,it):Ct&&(Ft!==ya||Nt>0&&Nt&64)?J(Ct,Z,ft,!1,!0):(Ft===ya&&Nt&384||!V&&Rt&16)&&J(Bt,Z,ft),it&&W(j)}(te&&(Ae=Mt&&Mt.onVnodeUnmounted)||Wt)&&ga(()=>{Ae&&Oo(Ae,Z,j),Wt&&YA(j,null,Z,"unmounted")},ft)},W=j=>{const{type:Z,el:ft,anchor:it,transition:V}=j;if(Z===ya){Y(ft,it);return}if(Z===Pf){C(j);return}const Ft=()=>{i(ft),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(j.shapeFlag&1&&V&&!V.persisted){const{leave:Mt,delayLeave:Et}=V,Bt=()=>Mt(ft,Ft);Et?Et(j.el,Ft,Bt):Bt()}else Ft()},Y=(j,Z)=>{let ft;for(;j!==Z;)ft=h(j),i(j),j=ft;i(Z)},H=(j,Z,ft)=>{const{bum:it,scope:V,update:Ft,subTree:Mt,um:Et}=j;it&&sg(it),V.stop(),Ft&&(Ft.active=!1,M(Mt,j,Z,ft)),Et&&ga(Et,Z),ga(()=>{j.isUnmounted=!0},Z),Z&&Z.pendingBranch&&!Z.isUnmounted&&j.asyncDep&&!j.asyncResolved&&j.suspenseId===Z.pendingId&&(Z.deps--,Z.deps===0&&Z.resolve())},J=(j,Z,ft,it=!1,V=!1,Ft=0)=>{for(let Mt=Ft;Mt<j.length;Mt++)M(j[Mt],Z,ft,it,V)},ot=j=>j.shapeFlag&6?ot(j.component.subTree):j.shapeFlag&128?j.suspense.next():h(j.anchor||j.el),ut=(j,Z,ft)=>{j==null?Z._vnode&&M(Z._vnode,null,null,!0):g(Z._vnode||null,j,Z,null,null,null,ft),FN(),Fw(),Z._vnode=j},X={p:g,um:M,m:Tt,r:W,mt:U,mc:T,pc:nt,pbc:N,n:ot,o:r};let It,at;return e&&([It,at]=e(X)),{render:ut,hydrate:It,createApp:yz(ut,It)}}function rf({effect:r,update:e},t){r.allowRecurse=e.allowRecurse=t}function JO(r,e,t=!1){const n=r.children,i=e.children;if(Oe(n)&&Oe(i))for(let a=0;a<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]=Tc(i[a]),s.el=o.el),t||JO(o,s)),s.type===Zf&&(s.el=o.el)}}function wz(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 Ez=r=>r.__isTeleport,Zm=r=>r&&(r.disabled||r.disabled===""),$N=r=>typeof SVGElement<"u"&&r instanceof SVGElement,tx=(r,e)=>{const t=r&&r.to;return Zn(t)?e?e(t):null:t},Cz={__isTeleport:!0,process(r,e,t,n,i,a,o,s,A,l){const{mc:u,pc:c,pbc:h,o:{insert:f,querySelector:d,createText:g,createComment:m}}=l,v=Zm(e.props);let{shapeFlag:y,children:w,dynamicChildren:C}=e;if(r==null){const O=e.el=g(""),F=e.anchor=g("");f(O,t,n),f(F,t,n);const I=e.target=tx(e.props,d),T=e.targetAnchor=g("");I&&(f(T,I),o=o||$N(I));const L=(N,x)=>{y&16&&u(w,N,x,i,a,o,s,A)};v?L(t,F):I&&L(I,T)}else{e.el=r.el;const O=e.anchor=r.anchor,F=e.target=r.target,I=e.targetAnchor=r.targetAnchor,T=Zm(r.props),L=T?t:F,N=T?O:I;if(o=o||$N(F),C?(h(r.dynamicChildren,C,L,i,a,o,s),JO(r,e,!0)):A||c(r,e,L,N,i,a,o,s,!1),v)T||D_(e,t,O,l,1);else if((e.props&&e.props.to)!==(r.props&&r.props.to)){const x=e.target=tx(e.props,d);x&&D_(e,x,null,l,0)}else T&&D_(e,F,I,l,1)}K4(e)},remove(r,e,t,n,{um:i,o:{remove:a}},o){const{shapeFlag:s,children:A,anchor:l,targetAnchor:u,target:c,props:h}=r;if(c&&a(u),(o||!Zm(h))&&(a(l),s&16))for(let f=0;f<A.length;f++){const d=A[f];i(d,e,t,!0,!!d.dynamicChildren)}},move:D_,hydrate:Bz};function D_(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||Zm(u))&&A&16)for(let h=0;h<l.length;h++)i(l[h],e,t,2);c&&n(s,e,t)}function Bz(r,e,t,n,i,a,{o:{nextSibling:o,parentNode:s,querySelector:A}},l){const u=e.target=tx(e.props,A);if(u){const c=u._lpa||u.firstChild;if(e.shapeFlag&16)if(Zm(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)}K4(e)}return e.anchor&&o(e.anchor)}const bz=Cz;function K4(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 ya=Symbol(void 0),Zf=Symbol(void 0),Wa=Symbol(void 0),Pf=Symbol(void 0),Jm=[];let Po=null;function ti(r=!1){Jm.push(Po=r?null:[])}function W4(){Jm.pop(),Po=Jm[Jm.length-1]||null}let Jf=1;function ex(r){Jf+=r}function z4(r){return r.dynamicChildren=Jf>0?Po||ag:null,W4(),Jf>0&&Po&&Po.push(r),r}function Yi(r,e,t,n,i,a){return z4(tF(r,e,t,n,i,a,!0))}function vC(r,e,t,n,i){return z4(Pn(r,e,t,n,i,!0))}function ih(r){return r?r.__v_isVNode===!0:!1}function ZA(r,e){return r.type===e.type&&r.key===e.key}function Tz(r){}const mC="__vInternal",Y4=({key:r})=>r??null,J1=({ref:r,ref_key:e,ref_for:t})=>r!=null?Zn(r)||Aa(r)||ar(r)?{i:_a,r,k:e,f:!!t}:r:null;function tF(r,e=null,t=null,n=0,i=null,a=r===ya?0:1,o=!1,s=!1){const A={__v_isVNode:!0,__v_skip:!0,type:r,props:e,key:e&&Y4(e),ref:e&&J1(e),scopeId:hC,slotScopeIds:null,children:t,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:n,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:_a};return s?(rF(A,t),a&128&&r.normalize(A)):t&&(A.shapeFlag|=Zn(t)?8:16),Jf>0&&!o&&Po&&(A.patchFlag>0||a&6)&&A.patchFlag!==32&&Po.push(A),A}const Pn=Sz;function Sz(r,e=null,t=null,n=0,i=null,a=!1){if((!r||r===M4)&&(r=Wa),ih(r)){const s=pl(r,e,!0);return t&&rF(s,t),Jf>0&&!a&&Po&&(s.shapeFlag&6?Po[Po.indexOf(r)]=s:Po.push(s)),s.patchFlag|=-2,s}if(Nz(r)&&(r=r.__vccOpts),e){e=X4(e);let{class:s,style:A}=e;s&&!Zn(s)&&(e.class=u0(s)),Tn(A)&&(UO(A)&&!Oe(A)&&(A=ui({},A)),e.style=l0(A))}const o=Zn(r)?1:m4(r)?128:Ez(r)?64:Tn(r)?4:ar(r)?2:0;return tF(r,e,t,n,i,o,a,!0)}function X4(r){return r?UO(r)||mC in r?ui({},r):r:null}function pl(r,e,t=!1){const{props:n,ref:i,patchFlag:a,children:o}=r,s=e?q4(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:r.type,props:s,key:s&&Y4(s),ref:e&&e.ref?t&&i?Oe(i)?i.concat(J1(e)):[i,J1(e)]:J1(e):i,scopeId:r.scopeId,slotScopeIds:r.slotScopeIds,children:o,target:r.target,targetAnchor:r.targetAnchor,staticCount:r.staticCount,shapeFlag:r.shapeFlag,patchFlag:e&&r.type!==ya?a===-1?16:a|16:a,dynamicProps:r.dynamicProps,dynamicChildren:r.dynamicChildren,appContext:r.appContext,dirs:r.dirs,transition:r.transition,component:r.component,suspense:r.suspense,ssContent:r.ssContent&&pl(r.ssContent),ssFallback:r.ssFallback&&pl(r.ssFallback),el:r.el,anchor:r.anchor,ctx:r.ctx}}function eF(r=" ",e=0){return Pn(Zf,null,r,e)}function xz(r,e){const t=Pn(Pf,null,r);return t.staticCount=e,t}function Mr(r="",e=!1){return e?(ti(),vC(Wa,null,r)):Pn(Wa,null,r)}function cs(r){return r==null||typeof r=="boolean"?Pn(Wa):Oe(r)?Pn(ya,null,r.slice()):typeof r=="object"?Tc(r):Pn(Zf,null,String(r))}function Tc(r){return r.el===null&&r.patchFlag!==-1||r.memo?r:pl(r)}function rF(r,e){let t=0;const{shapeFlag:n}=r;if(e==null)e=null;else if(Oe(e))t=16;else if(typeof e=="object")if(n&65){const i=e.default;i&&(i._c&&(i._d=!1),rF(r,i()),i._c&&(i._d=!0));return}else{t=32;const i=e._;!i&&!(mC in e)?e._ctx=_a:i===3&&_a&&(_a.slots._===1?e._=1:(e._=2,r.patchFlag|=1024))}else ar(e)?(e={default:e,_ctx:_a},t=32):(e=String(e),n&64?(t=16,e=[eF(e)]):t=8);r.children=e,r.shapeFlag|=t}function q4(...r){const e={};for(let t=0;t<r.length;t++){const n=r[t];for(const i in n)if(i==="class")e.class!==n.class&&(e.class=u0([e.class,n.class]));else if(i==="style")e.style=l0([e.style,n.style]);else if(c0(i)){const a=e[i],o=n[i];o&&a!==o&&!(Oe(a)&&a.includes(o))&&(e[i]=a?[].concat(a,o):o)}else i!==""&&(e[i]=n[i])}return e}function Oo(r,e,t,n=null){gs(r,e,7,[t,n])}const Iz=G4();let Lz=0;function Z4(r,e,t){const n=r.type,i=(e?e.appContext:r.appContext)||Iz,a={uid:Lz++,vnode:r,type:n,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,scope:new RO(!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:D4(n,i),emitsOptions:v4(n,i),emit:null,emitted:null,propsDefaults:wn,inheritAttrs:n.inheritAttrs,ctx:wn,data:wn,props:wn,attrs:wn,slots:wn,refs:wn,setupState:wn,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=RW.bind(null,a),r.ce&&r.ce(a),a}let Ki=null;const _h=()=>Ki||_a,ah=r=>{Ki=r,r.scope.on()},Kc=()=>{Ki&&Ki.scope.off(),Ki=null};function J4(r){return r.vnode.shapeFlag&4}let Sg=!1;function tk(r,e=!1){Sg=e;const{props:t,children:n}=r.vnode,i=J4(r);fz(r,t,i,e),gz(r,n);const a=i?Oz(r,e):void 0;return Sg=!1,a}function Oz(r,e){const t=r.type;r.accessCache=Object.create(null),r.proxy=DO(new Proxy(r.ctx,XS));const{setup:n}=t;if(n){const i=r.setupContext=n.length>1?rk(r):null;ah(r),Zg();const a=hu(n,r,0,[r.props,i]);if(Jg(),Kc(),OO(a)){if(a.then(Kc,Kc),e)return a.then(o=>{rx(r,o,e)}).catch(o=>{yd(o,r,0)});r.asyncDep=a}else rx(r,a,e)}else ek(r,e)}function rx(r,e,t){ar(e)?r.type.__ssrInlineRender?r.ssrRender=e:r.render=e:Tn(e)&&(r.setupState=HO(e)),ek(r,t)}let Nw,nx;function Fz(r){Nw=r,nx=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,sz))}}const Rz=()=>!Nw;function ek(r,e,t){const n=r.type;if(!r.render){if(!e&&Nw&&!n.render){const i=n.template||qO(r).template;if(i){const{isCustomElement:a,compilerOptions:o}=r.appContext.config,{delimiters:s,compilerOptions:A}=n,l=ui(ui({isCustomElement:a,delimiters:s},o),A);n.render=Nw(i,l)}}r.render=n.render||dA,nx&&nx(r)}ah(r),Zg(),Az(r),Jg(),Kc()}function Mz(r){return new Proxy(r.attrs,{get(e,t){return vs(r,"get","$attrs"),e[t]}})}function rk(r){const e=n=>{r.exposed=n||{}};let t;return{get attrs(){return t||(t=Mz(r))},slots:r.slots,emit:r.emit,expose:e}}function yC(r){if(r.exposed)return r.exposeProxy||(r.exposeProxy=new Proxy(HO(DO(r.exposed)),{get(e,t){if(t in e)return e[t];if(t in qm)return qm[t](r)},has(e,t){return t in e||t in qm}}))}function ix(r,e=!0){return ar(r)?r.displayName||r.name:r.name||e&&r.__name}function Nz(r){return ar(r)&&"__vccOpts"in r}const qe=(r,e)=>SW(r,e,Sg);function Pz(){return null}function Uz(){return null}function Dz(r){}function Qz(r,e){return null}function kz(){return nk().slots}function Hz(){return nk().attrs}function nk(){const r=_h();return r.setupContext||(r.setupContext=rk(r))}function Gz(r,e){const t=Oe(r)?r.reduce((n,i)=>(n[i]={},n),{}):r;for(const n in e){const i=t[n];i?Oe(i)||ar(i)?t[n]={type:i,default:e[n]}:i.default=e[n]:i===null&&(t[n]={default:e[n]})}return t}function $z(r,e){const t={};for(const n in r)e.includes(n)||Object.defineProperty(t,n,{enumerable:!0,get:()=>r[n]});return t}function Vz(r){const e=_h();let t=r();return Kc(),OO(t)&&(t=t.catch(n=>{throw ah(e),n})),[t,()=>ah(e)]}function _C(r,e,t){const n=arguments.length;return n===2?Tn(e)&&!Oe(e)?ih(e)?Pn(r,null,[e]):Pn(r,e):Pn(r,null,e):(n>3?t=Array.prototype.slice.call(arguments,2):n===3&&ih(t)&&(t=[t]),Pn(r,e,t))}const ik=Symbol(""),ak=()=>Be(ik);function jz(){}function Kz(r,e,t,n){const i=t[n];if(i&&ok(i,r))return i;const a=e();return a.memo=r.slice(),t[n]=a}function ok(r,e){const t=r.memo;if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(bg(t[n],e[n]))return!1;return Jf>0&&Po&&Po.push(r),!0}const sk="3.2.45",Wz={createComponentInstance:Z4,setupComponent:tk,renderComponentRoot:Z1,setCurrentRenderingInstance:Iy,isVNode:ih,normalizeVNode:cs},zz=Wz,Yz=null,Xz=null,qz="http://www.w3.org/2000/svg",wf=typeof document<"u"?document:null,VN=wf&&wf.createElement("template"),Zz={insert:(r,e,t)=>{e.insertBefore(r,t||null)},remove:r=>{const e=r.parentNode;e&&e.removeChild(r)},createElement:(r,e,t,n)=>{const i=e?wf.createElementNS(qz,r):wf.createElement(r,t?{is:t}:void 0);return r==="select"&&n&&n.multiple!=null&&i.setAttribute("multiple",n.multiple),i},createText:r=>wf.createTextNode(r),createComment:r=>wf.createComment(r),setText:(r,e)=>{r.nodeValue=e},setElementText:(r,e)=>{r.textContent=e},parentNode:r=>r.parentNode,nextSibling:r=>r.nextSibling,querySelector:r=>wf.querySelector(r),setScopeId(r,e){r.setAttribute(e,"")},insertStaticContent(r,e,t,n,i,a){const o=t?t.previousSibling:e.lastChild;if(i&&(i===a||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),t),!(i===a||!(i=i.nextSibling)););else{VN.innerHTML=n?`<svg>${r}</svg>`:r;const s=VN.content;if(n){const A=s.firstChild;for(;A.firstChild;)s.appendChild(A.firstChild);s.removeChild(A)}e.insertBefore(s,t)}return[o?o.nextSibling:e.firstChild,t?t.previousSibling:e.lastChild]}};function Jz(r,e,t){const n=r._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?r.removeAttribute("class"):t?r.setAttribute("class",e):r.className=e}function tY(r,e,t){const n=r.style,i=Zn(t);if(t&&!i){for(const a in t)ax(n,a,t[a]);if(e&&!Zn(e))for(const a in e)t[a]==null&&ax(n,a,"")}else{const a=n.display;i?e!==t&&(n.cssText=t):e&&r.removeAttribute("style"),"_vod"in r&&(n.display=a)}}const jN=/\s*!important$/;function ax(r,e,t){if(Oe(t))t.forEach(n=>ax(r,e,n));else if(t==null&&(t=""),e.startsWith("--"))r.setProperty(e,t);else{const n=eY(r,e);jN.test(t)?r.setProperty(Ps(n),t.replace(jN,""),"important"):r[n]=t}}const KN=["Webkit","Moz","ms"],Sb={};function eY(r,e){const t=Sb[e];if(t)return t;let n=Uo(e);if(n!=="filter"&&n in r)return Sb[e]=n;n=f0(n);for(let i=0;i<KN.length;i++){const a=KN[i]+n;if(a in r)return Sb[e]=a}return e}const WN="http://www.w3.org/1999/xlink";function rY(r,e,t,n,i){if(n&&e.startsWith("xlink:"))t==null?r.removeAttributeNS(WN,e.slice(6,e.length)):r.setAttributeNS(WN,e,t);else{const a=FK(e);t==null||a&&!j6(t)?r.removeAttribute(e):r.setAttribute(e,a?"":t)}}function nY(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=j6(t):t==null&&A==="string"?(t="",s=!0):A==="number"&&(t=0,s=!0)}try{r[e]=t}catch{}s&&r.removeAttribute(e)}function su(r,e,t,n){r.addEventListener(e,t,n)}function iY(r,e,t,n){r.removeEventListener(e,t,n)}function aY(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]=oY(e);if(n){const l=a[e]=lY(n,i);su(r,s,l,A)}else o&&(iY(r,s,o,A),a[e]=void 0)}}const zN=/(?:Once|Passive|Capture)$/;function oY(r){let e;if(zN.test(r)){e={};let n;for(;n=r.match(zN);)r=r.slice(0,r.length-n[0].length),e[n[0].toLowerCase()]=!0}return[r[2]===":"?r.slice(3):Ps(r.slice(2)),e]}let xb=0;const sY=Promise.resolve(),AY=()=>xb||(sY.then(()=>xb=0),xb=Date.now());function lY(r,e){const t=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=t.attached)return;gs(uY(n,t.value),e,5,[n])};return t.value=r,t.attached=AY(),t}function uY(r,e){if(Oe(e)){const t=r.stopImmediatePropagation;return r.stopImmediatePropagation=()=>{t.call(r),r._stopped=!0},e.map(n=>i=>!i._stopped&&n&&n(i))}else return e}const YN=/^on[a-z]/,cY=(r,e,t,n,i=!1,a,o,s,A)=>{e==="class"?Jz(r,n,i):e==="style"?tY(r,t,n):c0(e)?IO(e)||aY(r,e,t,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):hY(r,e,n,i))?nY(r,e,n,a,o,s,A):(e==="true-value"?r._trueValue=n:e==="false-value"&&(r._falseValue=n),rY(r,e,n,i))};function hY(r,e,t,n){return n?!!(e==="innerHTML"||e==="textContent"||e in r&&YN.test(e)&&ar(t)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&r.tagName==="INPUT"||e==="type"&&r.tagName==="TEXTAREA"||YN.test(e)&&Zn(t)?!1:e in r}function Ak(r,e){const t=g0(r);class n extends wC{constructor(a){super(t,a,e)}}return n.def=t,n}const fY=r=>Ak(r,Ck),dY=typeof HTMLElement<"u"?HTMLElement:class{};class wC extends dY{constructor(e,t={},n){super(),this._def=e,this._props=t,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&n?n(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,lC(()=>{this._connected||(Ax(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let n=0;n<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&&!Oe(a))for(const A in a){const l=a[A];(l===Number||l&&l.type===Number)&&(A in this._props&&(this._props[A]=_u(this._props[A])),(s||(s=Object.create(null)))[Uo(A)]=!0)}this._numberProps=s,i&&this._resolveProps(n),this._applyStyles(o),this._update()},t=this._def.__asyncLoader;t?t().then(n=>e(n,!0)):e(this._def)}_resolveProps(e){const{props:t}=e,n=Oe(t)?t:Object.keys(t||{});for(const i of Object.keys(this))i[0]!=="_"&&n.includes(i)&&this._setProp(i,this[i],!0,!1);for(const i of n.map(Uo))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(a){this._setProp(i,a)}})}_setAttr(e){let t=this.getAttribute(e);const n=Uo(e);this._numberProps&&this._numberProps[n]&&(t=_u(t)),this._setProp(n,t,!1)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,i=!0){t!==this._props[e]&&(this._props[e]=t,i&&this._instance&&this._update(),n&&(t===!0?this.setAttribute(Ps(e),""):typeof t=="string"||typeof t=="number"?this.setAttribute(Ps(e),t+""):t||this.removeAttribute(Ps(e))))}_update(){Ax(this._createVNode(),this.shadowRoot)}_createVNode(){const e=Pn(this._def,ui({},this._props));return this._instance||(e.ce=t=>{this._instance=t,t.isCE=!0;const n=(a,o)=>{this.dispatchEvent(new CustomEvent(a,{detail:o}))};t.emit=(a,...o)=>{n(a,o),Ps(a)!==a&&n(Ps(a),o)};let i=this;for(;i=i&&(i.parentNode||i.host);)if(i instanceof wC){t.parent=i._instance,t.provides=i._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(t=>{const n=document.createElement("style");n.textContent=t,this.shadowRoot.appendChild(n)})}}function pY(r="$style"){{const e=_h();if(!e)return wn;const t=e.type.__cssModules;if(!t)return wn;const n=t[r];return n||wn}}function gY(r){const e=_h();if(!e)return;const t=e.ut=(i=r(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(a=>sx(a,i))},n=()=>{const i=r(e.proxy);ox(e.subTree,i),t(i)};w4(n),cr(()=>{const i=new MutationObserver(n);i.observe(e.subTree.el.parentNode,{childList:!0}),pr(()=>i.disconnect())})}function ox(r,e){if(r.shapeFlag&128){const t=r.suspense;r=t.activeBranch,t.pendingBranch&&!t.isHydrating&&t.effects.push(()=>{ox(t.activeBranch,e)})}for(;r.component;)r=r.component.subTree;if(r.shapeFlag&1&&r.el)sx(r.el,e);else if(r.type===ya)r.children.forEach(t=>ox(t,e));else if(r.type===Pf){let{el:t,anchor:n}=r;for(;t&&(sx(t,e),t!==n);)t=t.nextSibling}}function sx(r,e){if(r.nodeType===1){const t=r.style;for(const n in e)t.setProperty(`--${n}`,e[n])}}const cc="transition",tm="animation",nF=(r,{slots:e})=>_C(zO,uk(r),e);nF.displayName="Transition";const lk={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},vY=nF.props=ui({},zO.props,lk),nf=(r,e=[])=>{Oe(r)?r.forEach(t=>t(...e)):r&&r(...e)},XN=r=>r?Oe(r)?r.some(e=>e.length>1):r.length>1:!1;function uk(r){const e={};for(const S in r)S in lk||(e[S]=r[S]);if(r.css===!1)return e;const{name:t="v",type:n,duration:i,enterFromClass:a=`${t}-enter-from`,enterActiveClass:o=`${t}-enter-active`,enterToClass:s=`${t}-enter-to`,appearFromClass:A=a,appearActiveClass:l=o,appearToClass:u=s,leaveFromClass:c=`${t}-leave-from`,leaveActiveClass:h=`${t}-leave-active`,leaveToClass:f=`${t}-leave-to`}=r,d=mY(i),g=d&&d[0],m=d&&d[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:w,onLeave:C,onLeaveCancelled:O,onBeforeAppear:F=v,onAppear:I=y,onAppearCancelled:T=w}=e,L=(S,P,U)=>{Ec(S,P?u:s),Ec(S,P?l:o),U&&U()},N=(S,P)=>{S._isLeaving=!1,Ec(S,c),Ec(S,f),Ec(S,h),P&&P()},x=S=>(P,U)=>{const tt=S?I:y,q=()=>L(P,S,U);nf(tt,[P,q]),qN(()=>{Ec(P,S?A:a),tu(P,S?u:s),XN(tt)||ZN(P,n,g,q)})};return ui(e,{onBeforeEnter(S){nf(v,[S]),tu(S,a),tu(S,o)},onBeforeAppear(S){nf(F,[S]),tu(S,A),tu(S,l)},onEnter:x(!1),onAppear:x(!0),onLeave(S,P){S._isLeaving=!0;const U=()=>N(S,P);tu(S,c),hk(),tu(S,h),qN(()=>{S._isLeaving&&(Ec(S,c),tu(S,f),XN(C)||ZN(S,n,m,U))}),nf(C,[S,U])},onEnterCancelled(S){L(S,!1),nf(w,[S])},onAppearCancelled(S){L(S,!0),nf(T,[S])},onLeaveCancelled(S){N(S),nf(O,[S])}})}function mY(r){if(r==null)return null;if(Tn(r))return[Ib(r.enter),Ib(r.leave)];{const e=Ib(r);return[e,e]}}function Ib(r){return _u(r)}function tu(r,e){e.split(/\s+/).forEach(t=>t&&r.classList.add(t)),(r._vtc||(r._vtc=new Set)).add(e)}function Ec(r,e){e.split(/\s+/).forEach(n=>n&&r.classList.remove(n));const{_vtc:t}=r;t&&(t.delete(e),t.size||(r._vtc=void 0))}function qN(r){requestAnimationFrame(()=>{requestAnimationFrame(r)})}let yY=0;function ZN(r,e,t,n){const i=r._endId=++yY,a=()=>{i===r._endId&&n()};if(t)return setTimeout(a,t);const{type:o,timeout:s,propCount:A}=ck(r,e);if(!o)return n();const l=o+"end";let u=0;const c=()=>{r.removeEventListener(l,h),a()},h=f=>{f.target===r&&++u>=A&&c()};setTimeout(()=>{u<A&&c()},s+1),r.addEventListener(l,h)}function ck(r,e){const t=window.getComputedStyle(r),n=d=>(t[d]||"").split(", "),i=n(`${cc}Delay`),a=n(`${cc}Duration`),o=JN(i,a),s=n(`${tm}Delay`),A=n(`${tm}Duration`),l=JN(s,A);let u=null,c=0,h=0;e===cc?o>0&&(u=cc,c=o,h=a.length):e===tm?l>0&&(u=tm,c=l,h=A.length):(c=Math.max(o,l),u=c>0?o>l?cc:tm:null,h=u?u===cc?a.length:A.length:0);const f=u===cc&&/\b(transform|all)(,|$)/.test(n(`${cc}Property`).toString());return{type:u,timeout:c,propCount:h,hasTransform:f}}function JN(r,e){for(;r.length<e.length;)r=r.concat(r);return Math.max(...e.map((t,n)=>tP(t)+tP(r[n])))}function tP(r){return Number(r.slice(0,-1).replace(",","."))*1e3}function hk(){return document.body.offsetHeight}const fk=new WeakMap,dk=new WeakMap,_Y={name:"TransitionGroup",props:ui({},vY,{tag:String,moveClass:String}),setup(r,{slots:e}){const t=_h(),n=WO();let i,a;return pC(()=>{if(!i.length)return;const o=r.moveClass||`${r.name||"v"}-move`;if(!bY(i[0].el,t.vnode.el,o))return;i.forEach(EY),i.forEach(CY);const s=i.filter(BY);hk(),s.forEach(A=>{const l=A.el,u=l.style;tu(l,o),u.transform=u.webkitTransform=u.transitionDuration="";const c=l._moveCb=h=>{h&&h.target!==l||(!h||/transform$/.test(h.propertyName))&&(l.removeEventListener("transitionend",c),l._moveCb=null,Ec(l,o))};l.addEventListener("transitionend",c)})}),()=>{const o=Kr(r),s=uk(o);let A=o.tag||ya;i=a,a=e.default?fC(e.default()):[];for(let l=0;l<a.length;l++){const u=a[l];u.key!=null&&qf(u,Tg(u,s,n,t))}if(i)for(let l=0;l<i.length;l++){const u=i[l];qf(u,Tg(u,s,n,t)),fk.set(u,u.el.getBoundingClientRect())}return Pn(A,null,a)}}},wY=_Y;function EY(r){const e=r.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function CY(r){dk.set(r,r.el.getBoundingClientRect())}function BY(r){const e=fk.get(r),t=dk.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 bY(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}=ck(n);return i.removeChild(n),a}const oh=r=>{const e=r.props["onUpdate:modelValue"]||!1;return Oe(e)?t=>sg(e,t):e};function TY(r){r.target.composing=!0}function eP(r){const e=r.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Pw={created(r,{modifiers:{lazy:e,trim:t,number:n}},i){r._assign=oh(i);const a=n||i.props&&i.props.type==="number";su(r,e?"change":"input",o=>{if(o.target.composing)return;let s=r.value;t&&(s=s.trim()),a&&(s=_u(s)),r._assign(s)}),t&&su(r,"change",()=>{r.value=r.value.trim()}),e||(su(r,"compositionstart",TY),su(r,"compositionend",eP),su(r,"change",eP))},mounted(r,{value:e}){r.value=e??""},beforeUpdate(r,{value:e,modifiers:{lazy:t,trim:n,number:i}},a){if(r._assign=oh(a),r.composing||document.activeElement===r&&r.type!=="range"&&(t||n&&r.value.trim()===e||(i||r.type==="number")&&_u(r.value)===e))return;const o=e??"";r.value!==o&&(r.value=o)}},iF={deep:!0,created(r,e,t){r._assign=oh(t),su(r,"change",()=>{const n=r._modelValue,i=xg(r),a=r.checked,o=r._assign;if(Oe(n)){const s=rC(n,i),A=s!==-1;if(a&&!A)o(n.concat(i));else if(!a&&A){const l=[...n];l.splice(s,1),o(l)}}else if(vd(n)){const s=new Set(n);a?s.add(i):s.delete(i),o(s)}else o(gk(r,a))})},mounted:rP,beforeUpdate(r,e,t){r._assign=oh(t),rP(r,e,t)}};function rP(r,{value:e,oldValue:t},n){r._modelValue=e,Oe(e)?r.checked=rC(e,n.props.value)>-1:vd(e)?r.checked=e.has(n.props.value):e!==t&&(r.checked=eh(e,gk(r,!0)))}const aF={created(r,{value:e},t){r.checked=eh(e,t.props.value),r._assign=oh(t),su(r,"change",()=>{r._assign(xg(r))})},beforeUpdate(r,{value:e,oldValue:t},n){r._assign=oh(n),e!==t&&(r.checked=eh(e,n.props.value))}},pk={deep:!0,created(r,{value:e,modifiers:{number:t}},n){const i=vd(e);su(r,"change",()=>{const a=Array.prototype.filter.call(r.options,o=>o.selected).map(o=>t?_u(xg(o)):xg(o));r._assign(r.multiple?i?new Set(a):a:a[0])}),r._assign=oh(n)},mounted(r,{value:e}){nP(r,e)},beforeUpdate(r,e,t){r._assign=oh(t)},updated(r,{value:e}){nP(r,e)}};function nP(r,e){const t=r.multiple;if(!(t&&!Oe(e)&&!vd(e))){for(let n=0,i=r.options.length;n<i;n++){const a=r.options[n],o=xg(a);if(t)Oe(e)?a.selected=rC(e,o)>-1:a.selected=e.has(o);else if(eh(xg(a),e)){r.selectedIndex!==n&&(r.selectedIndex=n);return}}!t&&r.selectedIndex!==-1&&(r.selectedIndex=-1)}}function xg(r){return"_value"in r?r._value:r.value}function gk(r,e){const t=e?"_trueValue":"_falseValue";return t in r?r[t]:e}const vk={created(r,e,t){Q_(r,e,t,null,"created")},mounted(r,e,t){Q_(r,e,t,null,"mounted")},beforeUpdate(r,e,t,n){Q_(r,e,t,n,"beforeUpdate")},updated(r,e,t,n){Q_(r,e,t,n,"updated")}};function mk(r,e){switch(r){case"SELECT":return pk;case"TEXTAREA":return Pw;default:switch(e){case"checkbox":return iF;case"radio":return aF;default:return Pw}}}function Q_(r,e,t,n,i){const o=mk(r.tagName,t.props&&t.props.type)[i];o&&o(r,e,t,n)}function SY(){Pw.getSSRProps=({value:r})=>({value:r}),aF.getSSRProps=({value:r},e)=>{if(e.props&&eh(e.props.value,r))return{checked:!0}},iF.getSSRProps=({value:r},e)=>{if(Oe(r)){if(e.props&&rC(r,e.props.value)>-1)return{checked:!0}}else if(vd(r)){if(e.props&&r.has(e.props.value))return{checked:!0}}else if(r)return{checked:!0}},vk.getSSRProps=(r,e)=>{if(typeof e.type!="string")return;const t=mk(e.type.toUpperCase(),e.props&&e.props.type);if(t.getSSRProps)return t.getSSRProps(r,e)}}const xY=["ctrl","shift","alt","meta"],IY={stop:r=>r.stopPropagation(),prevent:r=>r.preventDefault(),self:r=>r.target!==r.currentTarget,ctrl:r=>!r.ctrlKey,shift:r=>!r.shiftKey,alt:r=>!r.altKey,meta:r=>!r.metaKey,left:r=>"button"in r&&r.button!==0,middle:r=>"button"in r&&r.button!==1,right:r=>"button"in r&&r.button!==2,exact:(r,e)=>xY.some(t=>r[`${t}Key`]&&!e.includes(t))},LY=(r,e)=>(t,...n)=>{for(let i=0;i<e.length;i++){const a=IY[e[i]];if(a&&a(t,e))return}return r(t,...n)},OY={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},FY=(r,e)=>t=>{if(!("key"in t))return;const n=Ps(t.key);if(e.some(i=>i===n||OY[i]===n))return r(t)},yk={beforeMount(r,{value:e},{transition:t}){r._vod=r.style.display==="none"?"":r.style.display,t&&e?t.beforeEnter(r):em(r,e)},mounted(r,{value:e},{transition:t}){t&&e&&t.enter(r)},updated(r,{value:e,oldValue:t},{transition:n}){!e!=!t&&(n?e?(n.beforeEnter(r),em(r,!0),n.enter(r)):n.leave(r,()=>{em(r,!1)}):em(r,e))},beforeUnmount(r,{value:e}){em(r,e)}};function em(r,e){r.style.display=e?r._vod:"none"}function RY(){yk.getSSRProps=({value:r})=>{if(!r)return{style:{display:"none"}}}}const _k=ui({patchProp:cY},Zz);let ty,iP=!1;function wk(){return ty||(ty=$4(_k))}function Ek(){return ty=iP?ty:V4(_k),iP=!0,ty}const Ax=(...r)=>{wk().render(...r)},Ck=(...r)=>{Ek().hydrate(...r)},Bk=(...r)=>{const e=wk().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=bk(n);if(!i)return;const a=e._component;!ar(a)&&!a.render&&!a.template&&(a.template=i.innerHTML),i.innerHTML="";const o=t(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),o},e},MY=(...r)=>{const e=Ek().createApp(...r),{mount:t}=e;return e.mount=n=>{const i=bk(n);if(i)return t(i,!0,i instanceof SVGElement)},e};function bk(r){return Zn(r)?document.querySelector(r):r}let aP=!1;const NY=()=>{aP||(aP=!0,SY(),RY())},PY=()=>{},UY=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:zO,Comment:Wa,EffectScope:RO,Fragment:ya,KeepAlive:ZW,ReactiveEffect:d0,Static:Pf,Suspense:GW,Teleport:bz,Text:Zf,Transition:nF,TransitionGroup:wY,VueElement:wC,callWithAsyncErrorHandling:gs,callWithErrorHandling:hu,camelize:Uo,capitalize:f0,cloneVNode:pl,compatUtils:Xz,compile:PY,computed:qe,createApp:Bk,createBlock:vC,createCommentVNode:Mr,createElementBlock:Yi,createElementVNode:tF,createHydrationRenderer:V4,createPropsRestProxy:$z,createRenderer:$4,createSSRApp:MY,createSlots:az,createStaticVNode:xz,createTextVNode:eF,createVNode:Pn,customRef:BW,defineAsyncComponent:XW,defineComponent:g0,defineCustomElement:Ak,defineEmits:Uz,defineExpose:Dz,defineProps:Pz,defineSSRCustomElement:fY,get devtools(){return Mp},effect:WK,effectScope:GK,getCurrentInstance:_h,getCurrentScope:$K,getTransitionRawChildren:fC,guardReactiveProps:X4,h:_C,handleError:yd,hydrate:Ck,initCustomFormatter:jz,initDirectivesForSSR:NY,inject:Be,isMemoSame:ok,isProxy:UO,isReactive:Rf,isReadonly:Xf,isRef:Aa,isRuntimeOnly:Rz,isShallow:by,isVNode:ih,markRaw:DO,mergeDefaults:Gz,mergeProps:q4,nextTick:lC,normalizeClass:u0,normalizeProps:LK,normalizeStyle:l0,onActivated:B4,onBeforeMount:S4,onBeforeUnmount:gC,onBeforeUpdate:x4,onDeactivated:b4,onErrorCaptured:F4,onMounted:cr,onRenderTracked:O4,onRenderTriggered:L4,onScopeDispose:VK,onServerPrefetch:I4,onUnmounted:pr,onUpdated:pC,openBlock:ti,popScopeId:NW,provide:Dr,proxyRefs:HO,pushScopeId:MW,queuePostFlushCb:$O,reactive:md,readonly:PO,ref:Fo,registerRuntimeCompiler:Fz,render:Ax,renderList:iz,renderSlot:Rr,resolveComponent:R4,resolveDirective:nz,resolveDynamicComponent:rz,resolveFilter:Yz,resolveTransitionHooks:Tg,setBlockTracking:ex,setDevtoolsHook:g4,setTransitionHooks:qf,shallowReactive:A4,shallowReadonly:yW,shallowRef:l4,ssrContextKey:ik,ssrUtils:zz,stop:zK,toDisplayString:MK,toHandlerKey:Xm,toHandlers:oz,toRaw:Kr,toRef:c4,toRefs:nh,transformVNodeArgs:Tz,triggerRef:wW,unref:Mf,useAttrs:Hz,useCssModule:pY,useCssVars:gY,useSSRContext:ak,useSlots:kz,useTransitionState:WO,vModelCheckbox:iF,vModelDynamic:vk,vModelRadio:aF,vModelSelect:pk,vModelText:Pw,vShow:yk,version:sk,warn:xW,watch:ye,watchEffect:_4,watchPostEffect:w4,watchSyncEffect:WW,withAsyncContext:Vz,withCtx:VO,withDefaults:Qz,withDirectives:tz,withKeys:FY,withMemo:Kz,withModifiers:LY,withScopeId:PW},Symbol.toStringTag,{value:"Module"})),DY=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t},QY={};function kY(r,e){const t=R4("router-view");return ti(),vC(t)}const HY=DY(QY,[["render",kY]]);var GY=Object.defineProperty,$Y=Object.defineProperties,VY=Object.getOwnPropertyDescriptors,oP=Object.getOwnPropertySymbols,jY=Object.prototype.hasOwnProperty,KY=Object.prototype.propertyIsEnumerable,sP=(r,e,t)=>e in r?GY(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Jn=(r,e)=>{for(var t in e||(e={}))jY.call(e,t)&&sP(r,t,e[t]);if(oP)for(var t of oP(e))KY.call(e,t)&&sP(r,t,e[t]);return r},CA=(r,e)=>$Y(r,VY(e)),WY=function(){function r(){this.disposed=!1}return r.prototype.dispose=function(){this.disposed||(this.disposed=!0,this.disposeInternal())},r.prototype.disposeInternal=function(){},r}(),EC=WY;function zY(r,e,t){for(var n,i,a=t||sh,o=0,s=r.length,A=!1;o<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 sh(r,e){return r>e?1:r<e?-1:0}function Ni(r,e){return r.indexOf(e)>=0}function CC(r,e,t){var n=r.length;if(r[0]<=e)return 0;if(e<=r[n-1])return n-1;var i=void 0;if(t>0){for(i=1;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 YY(r,e,t){for(;e<t;){var n=r[e];r[e]=r[t],r[t]=n,++e,--t}}function tn(r,e){for(var t=Array.isArray(e)?e:[e],n=t.length,i=0;i<n;i++)r[r.length]=t[i]}function Fu(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 XY(r,e,t){var n=e||sh;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 ll(){return!0}function _d(){return!1}function td(){}function qY(r){var e=!1,t,n,i;return function(){var a=Array.prototype.slice.call(arguments);return(!e||this!==i||!Fu(a,n))&&(e=!0,i=this,n=a,t=r.apply(this,arguments)),t}}function Re(){return function(){throw new Error("Unimplemented abstract method.")}()}var ZY=0;function Ee(r){return r.ol_uid||(r.ol_uid=String(++ZY))}var Tk="6.14.1",Ah=typeof navigator<"u"&&typeof navigator.userAgent<"u"?navigator.userAgent.toLowerCase():"",JY=Ah.indexOf("firefox")!==-1,tX=Ah.indexOf("safari")!==-1&&Ah.indexOf("chrom")==-1,eX=tX&&!!(Ah.indexOf("version/15.4")>=0||Ah.match(/cpu (os|iphone os) 15_4 like mac os x/)),rX=Ah.indexOf("webkit")!==-1&&Ah.indexOf("edge")==-1,Sk=Ah.indexOf("macintosh")!==-1,ed=typeof devicePixelRatio<"u"?devicePixelRatio:1,BC=typeof WorkerGlobalScope<"u"&&typeof OffscreenCanvas<"u"&&self instanceof WorkerGlobalScope,nX=typeof Image<"u"&&Image.prototype.decode,xk=function(){var r=!1;try{var e=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return r}(),iX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),aX=function(r){iX(e,r);function e(t){var n=this,i="v"+Tk.split("-")[0],a="Assertion failed. See https://openlayers.org/en/"+i+"/doc/errors/#"+t+" for details.";return n=r.call(this,a)||this,n.code=t,n.name="AssertionError",n.message=a,n}return e}(Error),Ik=aX;function Le(r,e){if(!r)throw new Ik(e)}var oF=new Array(6);function Si(){return[1,0,0,1,0,0]}function ey(r){return m0(r,1,0,0,1,0,0)}function tv(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=r[4],s=r[5],A=e[0],l=e[1],u=e[2],c=e[3],h=e[4],f=e[5];return r[0]=t*A+i*l,r[1]=n*A+a*l,r[2]=t*u+i*c,r[3]=n*u+a*c,r[4]=t*h+i*f+o,r[5]=n*h+a*f+s,r}function m0(r,e,t,n,i,a,o){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r[4]=a,r[5]=o,r}function oX(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function bn(r,e){var t=e[0],n=e[1];return e[0]=r[0]*t+r[2]*n+r[4],e[1]=r[1]*t+r[3]*n+r[5],e}function sX(r,e){var t=Math.cos(e),n=Math.sin(e);return tv(r,m0(oF,t,n,-n,t,0,0))}function ry(r,e,t){return tv(r,m0(oF,e,0,0,t,0,0))}function AX(r,e,t){return m0(r,e,0,0,t,0,0)}function lX(r,e,t){return tv(r,m0(oF,1,0,0,1,e,t))}function yo(r,e,t,n,i,a,o,s){var A=Math.sin(a),l=Math.cos(a);return r[0]=n*l,r[1]=i*A,r[2]=-n*A,r[3]=i*l,r[4]=o*n*l-s*n*A+e,r[5]=o*i*A+s*i*l+t,r}function y0(r,e){var t=uX(e);Le(t!==0,32);var n=e[0],i=e[1],a=e[2],o=e[3],s=e[4],A=e[5];return r[0]=o/t,r[1]=-i/t,r[2]=-a/t,r[3]=n/t,r[4]=(a*A-o*s)/t,r[5]=-(n*A-i*s)/t,r}function uX(r){return r[0]*r[3]-r[1]*r[2]}var AP;function sF(r){var e="matrix("+r.join(", ")+")";if(BC)return e;var t=AP||(AP=document.createElement("div"));return t.style.transform=e,t.style.transform}var Im={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},aa={UNKNOWN:0,INTERSECTING:1,ABOVE:2,RIGHT:4,BELOW:8,LEFT:16};function oa(r){for(var e=Ui(),t=0,n=r.length;t<n;++t)Df(e,r[t]);return e}function cX(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 ko(n,i,a,o,t)}function _o(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 AF(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r.slice()}function wh(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 gA(r,e){return bC(r,e[0],e[1])}function fs(r,e){return r[0]<=e[0]&&e[2]<=r[2]&&r[1]<=e[1]&&e[3]<=r[3]}function bC(r,e,t){return r[0]<=e&&e<=r[2]&&r[1]<=t&&t<=r[3]}function Uw(r,e){var t=r[0],n=r[1],i=r[2],a=r[3],o=e[0],s=e[1],A=aa.UNKNOWN;return o<t?A=A|aa.LEFT:o>i&&(A=A|aa.RIGHT),s<n?A=A|aa.BELOW:s>a&&(A=A|aa.ABOVE),A===aa.UNKNOWN&&(A=aa.INTERSECTING),A}function Ui(){return[1/0,1/0,-1/0,-1/0]}function ko(r,e,t,n,i){return i?(i[0]=r,i[1]=e,i[2]=t,i[3]=n,i):[r,e,t,n]}function Eh(r){return ko(1/0,1/0,-1/0,-1/0,r)}function Uf(r,e){var t=r[0],n=r[1];return ko(t,n,t,n,e)}function hX(r,e){var t=Eh(e);return lF(t,r)}function TC(r,e,t,n,i){var a=Eh(i);return uF(a,r,e,t,n)}function fX(r,e){var t=Eh(e);return Lk(t,r)}function gl(r,e){return r[0]==e[0]&&r[2]==e[2]&&r[1]==e[1]&&r[3]==e[3]}function dX(r,e,t){return Math.abs(r[0]-e[0])<t&&Math.abs(r[2]-e[2])<t&&Math.abs(r[1]-e[1])<t&&Math.abs(r[3]-e[3])<t}function lh(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 Df(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 lF(r,e){for(var t=0,n=e.length;t<n;++t)Df(r,e[t]);return r}function uF(r,e,t,n,i){for(;t<n;t+=i)Ok(r,e[t],e[t+1]);return r}function Lk(r,e){for(var t=0,n=e.length;t<n;++t)lF(r,e[t]);return r}function Ok(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 SC(r,e){var t;return t=e(_0(r)),t||(t=e(ev(r)),t)||(t=e(w0(r)),t)||(t=e(BA(r)),t)?t:!1}function Oy(r){var e=0;return rv(r)||(e=jr(r)*Ii(r)),e}function _0(r){return[r[0],r[1]]}function ev(r){return[r[2],r[1]]}function Ya(r){return[(r[0]+r[2])/2,(r[1]+r[3])/2]}function Fk(r,e){var t;return e===Im.BOTTOM_LEFT?t=_0(r):e===Im.BOTTOM_RIGHT?t=ev(r):e===Im.TOP_LEFT?t=BA(r):e===Im.TOP_RIGHT?t=w0(r):Le(!1,13),t}function pX(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 Qf(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],d=r[1],g=f-l+h,m=f-l-h,v=f+l-h,y=f+l+h,w=d-u-c,C=d-u+c,O=d+u+c,F=d+u-c;return ko(Math.min(g,m,v,y),Math.min(w,C,O,F),Math.max(g,m,v,y),Math.max(w,C,O,F),i)}function Ii(r){return r[3]-r[1]}function gX(r,e){var t=Qs(r,e);return Oy(t)}function Qs(r,e,t){var n=t||Ui();return Xn(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]):Eh(n),n}function vX(r){return jr(r)+Ii(r)}function mX(r){return[r[2]-r[0],r[3]-r[1]]}function BA(r){return[r[0],r[3]]}function w0(r){return[r[2],r[3]]}function jr(r){return r[2]-r[0]}function Xn(r,e){return r[0]<=e[2]&&r[2]>=e[0]&&r[1]<=e[3]&&r[3]>=e[1]}function rv(r){return r[2]<r[0]||r[3]<r[1]}function Rk(r,e){return e?(e[0]=r[0],e[1]=r[1],e[2]=r[2],e[3]=r[3],e):r}function Mk(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 Nk(r,e,t){var n=!1,i=Uw(r,e),a=Uw(r,t);if(i===aa.INTERSECTING||a===aa.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],d=(f-c)/(h-u),g=void 0,m=void 0;a&aa.ABOVE&&!(i&aa.ABOVE)&&(g=h-(f-l)/d,n=g>=o&&g<=A),!n&&a&aa.RIGHT&&!(i&aa.RIGHT)&&(m=f-(h-A)*d,n=m>=s&&m<=l),!n&&a&aa.BELOW&&!(i&aa.BELOW)&&(g=h-(f-s)/d,n=g>=o&&g<=A),!n&&a&aa.LEFT&&!(i&aa.LEFT)&&(m=f-(h-o)*d,n=m>=s&&m<=l)}return n}function cF(r,e,t,n){var i=[];if(n>1)for(var a=r[2]-r[0],o=r[3]-r[1],s=0;s<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 cX(A,l,t)}function Pk(r,e){var t=e.getExtent(),n=Ya(r);if(e.canWrapX()&&(n[0]<t[0]||n[0]>=t[2])){var i=jr(t),a=Math.floor((n[0]-t[0])/i),o=a*i;r[0]-=o,r[2]-=o}return r}var yX=Object.freeze(Object.defineProperty({__proto__:null,boundingExtent:oa,buffer:_o,clone:AF,closestSquaredDistanceXY:wh,containsCoordinate:gA,containsExtent:fs,containsXY:bC,coordinateRelationship:Uw,createEmpty:Ui,createOrUpdate:ko,createOrUpdateEmpty:Eh,createOrUpdateFromCoordinate:Uf,createOrUpdateFromCoordinates:hX,createOrUpdateFromFlatCoordinates:TC,createOrUpdateFromRings:fX,equals:gl,approximatelyEquals:dX,extend:lh,extendCoordinate:Df,extendCoordinates:lF,extendFlatCoordinates:uF,extendRings:Lk,extendXY:Ok,forEachCorner:SC,getArea:Oy,getBottomLeft:_0,getBottomRight:ev,getCenter:Ya,getCorner:Fk,getEnlargedArea:pX,getForViewAndSize:Qf,getHeight:Ii,getIntersectionArea:gX,getIntersection:Qs,getMargin:vX,getSize:mX,getTopLeft:BA,getTopRight:w0,getWidth:jr,intersects:Xn,isEmpty:rv,returnOrUpdate:Rk,scaleFromCenter:Mk,intersectsSegment:Nk,applyTransform:cF,wrapX:Pk},Symbol.toStringTag,{value:"Module"}));function Un(r,e,t){return Math.min(Math.max(r,e),t)}var _X=function(){var r;return"cosh"in Math?r=Math.cosh:r=function(e){var t=Math.exp(e);return(t+1/t)/2},r}(),Uk=function(){var r;return"log2"in Math?r=Math.log2:r=function(e){return Math.log(e)*Math.LOG2E},r}();function wX(r,e,t,n,i,a){var o=i-t,s=a-n;if(o!==0||s!==0){var A=((r-t)*o+(e-n)*s)/(o*o+s*s);A>1?(t=i,n=a):A>0&&(t+=o*A,n+=s*A)}return kf(r,e,t,n)}function kf(r,e,t,n){var i=t-r,a=n-e;return i*i+a*a}function EX(r){for(var e=r.length,t=0;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 lP(r){return r*180/Math.PI}function Wc(r){return r*Math.PI/180}function zc(r,e){var t=r%e;return t*e<0?t+e:t}function au(r,e,t){return r+t*(e-r)}function hF(r,e){var t=Math.pow(10,e);return Math.round(r*t)/t}function uP(r,e){return Math.round(hF(r,e))}function Wp(r,e){return Math.floor(hF(r,e))}function Nc(r,e){return Math.ceil(hF(r,e))}var Dk=/^#([a-f0-9]{3}|[a-f0-9]{4}(?:[a-f0-9]{2}){0,2})$/i,Qk=/^([a-z]*)$|^hsla?\(.*\)$/i;function fu(r){return typeof r=="string"?r:Gk(r)}function kk(r){var e=document.createElement("div");if(e.style.color=r,e.style.color!==""){document.body.appendChild(e);var t=getComputedStyle(e).color;return document.body.removeChild(e),t}else return""}var Hk=function(){var r=1024,e={},t=0;return function(n){var i;if(e.hasOwnProperty(n))i=e[n];else{if(t>=r){var a=0;for(var o in e)a++&3||(delete e[o],--t)}i=CX(n),e[n]=i,++t}return i}}();function uh(r){return Array.isArray(r)?r:Hk(r)}function CX(r){var e,t,n,i,a;if(Qk.exec(r)&&(r=kk(r)),Dk.exec(r)){var o=r.length-1,s=void 0;o<=4?s=1:s=2;var A=o===4||o===8;e=parseInt(r.substr(1+0*s,s),16),t=parseInt(r.substr(1+1*s,s),16),n=parseInt(r.substr(1+2*s,s),16),A?i=parseInt(r.substr(1+3*s,s),16):i=255,s==1&&(e=(e<<4)+e,t=(t<<4)+t,n=(n<<4)+n,A&&(i=(i<<4)+i)),a=[e,t,n,i/255]}else r.indexOf("rgba(")==0?(a=r.slice(5,-1).split(",").map(Number),cP(a)):r.indexOf("rgb(")==0?(a=r.slice(4,-1).split(",").map(Number),a.push(1),cP(a)):Le(!1,14);return a}function cP(r){return r[0]=Un(r[0]+.5|0,0,255),r[1]=Un(r[1]+.5|0,0,255),r[2]=Un(r[2]+.5|0,0,255),r[3]=Un(r[3],0,1),r}function Gk(r){var e=r[0];e!=(e|0)&&(e=e+.5|0);var t=r[1];t!=(t|0)&&(t=t+.5|0);var n=r[2];n!=(n|0)&&(n=n+.5|0);var i=r[3]===void 0?1:Math.round(r[3]*100)/100;return"rgba("+e+","+t+","+n+","+i+")"}function BX(r){return Qk.test(r)&&(r=kk(r)),Dk.test(r)||r.indexOf("rgba(")===0||r.indexOf("rgb(")===0}var bX=function(){function r(){this.cache_={},this.cacheSize_=0,this.maxCacheSize_=32}return r.prototype.clear=function(){this.cache_={},this.cacheSize_=0},r.prototype.canExpireCache=function(){return this.cacheSize_>this.maxCacheSize_},r.prototype.expire=function(){if(this.canExpireCache()){var e=0;for(var t in this.cache_){var n=this.cache_[t];!(e++&3)&&!n.hasListener()&&(delete this.cache_[t],--this.cacheSize_)}}},r.prototype.get=function(e,t,n){var i=hP(e,t,n);return i in this.cache_?this.cache_[i]:null},r.prototype.set=function(e,t,n,i){var a=hP(e,t,n);this.cache_[a]=i,++this.cacheSize_},r.prototype.setSize=function(e){this.maxCacheSize_=e,this.expire()},r}();function hP(r,e,t){var n=t?fu(t):"null";return e+":"+r+":"+n}var Dw=new bX,TX=function(){function r(e){this.propagationStopped,this.defaultPrevented,this.type=e,this.target=null}return r.prototype.preventDefault=function(){this.defaultPrevented=!0},r.prototype.stopPropagation=function(){this.propagationStopped=!0},r}();function SX(r){r.stopPropagation()}var $o=TX,rd={PROPERTYCHANGE:"propertychange"},Ce=typeof Object.assign=="function"?Object.assign:function(r,e){if(r==null)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(r),n=1,i=arguments.length;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 wd(r){for(var e in r)delete r[e]}var fF=typeof Object.values=="function"?Object.values:function(r){var e=[];for(var t in r)e.push(r[t]);return e};function nd(r){var e;for(e in r)return!1;return!e}var 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)}}(),IX=function(r){xX(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 $o(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,td);delete s[i]}return l}},e.prototype.disposeInternal=function(){this.listeners_&&wd(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]=td,++this.pendingRemovals_[t]):(i.splice(a,1),i.length===0&&delete this.listeners_[t]))}},e}(EC),Ed=IX,xe={CHANGE:"change",ERROR:"error",BLUR:"blur",CLEAR:"clear",CONTEXTMENU:"contextmenu",CLICK:"click",DBLCLICK:"dblclick",DRAGENTER:"dragenter",DRAGOVER:"dragover",DROP:"drop",FOCUS:"focus",KEYDOWN:"keydown",KEYPRESS:"keypress",LOAD:"load",RESIZE:"resize",TOUCHMOVE:"touchmove",WHEEL:"wheel"};function je(r,e,t,n,i){if(n&&n!==r&&(t=t.bind(n)),i){var a=t;t=function(){r.removeEventListener(e,t),a.apply(this,arguments)}}var o={target:r,type:e,listener:t};return r.addEventListener(e,t),o}function Fy(r,e,t,n){return je(r,e,t,n,!0)}function Yr(r){r&&r.target&&(r.target.removeEventListener(r.type,r.listener),wd(r))}var LX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),E0=function(r){LX(e,r);function e(){var t=r.call(this)||this;return t.on=t.onInternal,t.once=t.onceInternal,t.un=t.unInternal,t.revision_=0,t}return e.prototype.changed=function(){++this.revision_,this.dispatchEvent(xe.CHANGE)},e.prototype.getRevision=function(){return this.revision_},e.prototype.onInternal=function(t,n){if(Array.isArray(t)){for(var i=t.length,a=new Array(i),o=0;o<i;++o)a[o]=je(this,t[o],n);return a}else return je(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]=Fy(this,t[o],n)}else i=Fy(this,t,n);return n.ol_key=i,i},e.prototype.unInternal=function(t,n){var i=n.ol_key;if(i)ms(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}(Ed);E0.prototype.on;E0.prototype.once;E0.prototype.un;function ms(r){if(Array.isArray(r))for(var e=0,t=r.length;e<t;++e)Yr(r[e]);else Yr(r)}var $k=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),fP=function(r){$k(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.key=n,a.oldValue=i,a}return e}($o),OX=function(r){$k(e,r);function e(t){var n=r.call(this)||this;return n.on,n.once,n.un,Ee(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_&&Ce({},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 fP(i,t,n)),i=rd.PROPERTYCHANGE,this.hasListener(i)&&this.dispatchEvent(new fP(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_&&Ce(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],nd(this.values_)&&(this.values_=null),n||this.notify(t,i)}},e}(E0),Li=OX,Jr={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"},FX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),RX=function(r){FX(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un,n.background_=t.background;var i=Ce({},t);return typeof t.properties=="object"&&(delete i.properties,Ce(i,t.properties)),i[Jr.OPACITY]=t.opacity!==void 0?t.opacity:1,Le(typeof i[Jr.OPACITY]=="number",64),i[Jr.VISIBLE]=t.visible!==void 0?t.visible:!0,i[Jr.Z_INDEX]=t.zIndex,i[Jr.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,i[Jr.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,i[Jr.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,i[Jr.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=Un(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 Re()},e.prototype.getLayerStatesArray=function(t){return Re()},e.prototype.getExtent=function(){return this.get(Jr.EXTENT)},e.prototype.getMaxResolution=function(){return this.get(Jr.MAX_RESOLUTION)},e.prototype.getMinResolution=function(){return this.get(Jr.MIN_RESOLUTION)},e.prototype.getMinZoom=function(){return this.get(Jr.MIN_ZOOM)},e.prototype.getMaxZoom=function(){return this.get(Jr.MAX_ZOOM)},e.prototype.getOpacity=function(){return this.get(Jr.OPACITY)},e.prototype.getSourceState=function(){return Re()},e.prototype.getVisible=function(){return this.get(Jr.VISIBLE)},e.prototype.getZIndex=function(){return this.get(Jr.Z_INDEX)},e.prototype.setBackground=function(t){this.background_=t,this.changed()},e.prototype.setExtent=function(t){this.set(Jr.EXTENT,t)},e.prototype.setMaxResolution=function(t){this.set(Jr.MAX_RESOLUTION,t)},e.prototype.setMinResolution=function(t){this.set(Jr.MIN_RESOLUTION,t)},e.prototype.setMaxZoom=function(t){this.set(Jr.MAX_ZOOM,t)},e.prototype.setMinZoom=function(t){this.set(Jr.MIN_ZOOM,t)},e.prototype.setOpacity=function(t){Le(typeof t=="number",64),this.set(Jr.OPACITY,t)},e.prototype.setVisible=function(t){this.set(Jr.VISIBLE,t)},e.prototype.setZIndex=function(t){this.set(Jr.Z_INDEX,t)},e.prototype.disposeInternal=function(){this.state_&&(this.state_.layer=null,this.state_=null),r.prototype.disposeInternal.call(this)},e}(Li),dF=RX,No={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"},co={UNDEFINED:"undefined",LOADING:"loading",READY:"ready",ERROR:"error"},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)}}(),NX=function(r){MX(e,r);function e(t){var n=this,i=Ce({},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(Jr.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(Jr.SOURCE)||null},e.prototype.getRenderSource=function(){return this.getSource()},e.prototype.getSourceState=function(){var t=this.getSource();return t?t.getState():co.UNDEFINED},e.prototype.handleSourceChange_=function(){this.changed()},e.prototype.handleSourcePropertyChange_=function(){this.sourceChangeKey_&&(Yr(this.sourceChangeKey_),this.sourceChangeKey_=null);var t=this.getSource();t&&(this.sourceChangeKey_=je(t,xe.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(Jr.MAP,t)},e.prototype.getMapInternal=function(){return this.get(Jr.MAP)},e.prototype.setMap=function(t){this.mapPrecomposeKey_&&(Yr(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(Yr(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=je(t,No.PRECOMPOSE,function(n){var i=n,a=i.frameState.layerStatesArray,o=this.getLayerState(!1);Le(!a.some(function(s){return s.layer===o.layer}),67),a.push(o)},this),this.mapRenderKey_=je(this,xe.CHANGE,t.render,t),this.changed())},e.prototype.setSource=function(t){this.set(Jr.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}(dF);function Qw(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 Cd=NX;function rm(r,e,t){var n=t!==void 0?r.toFixed(t):""+r,i=n.indexOf(".");return i=i===-1?n.length:i,i>e?n:new Array(1+e-i).join("0")+n}function Vk(r,e){for(var t=(""+r).split("."),n=(""+e).split("."),i=0;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 jk(r,e){return r[0]+=+e[0],r[1]+=+e[1],r}function PX(r,e){var t=e.getRadius(),n=e.getCenter(),i=n[0],a=n[1],o=r[0],s=r[1],A=o-i,l=s-a;A===0&&l===0&&(A=1);var u=Math.sqrt(A*A+l*l),c=i+t*A/u,h=a+t*l/u;return[c,h]}function pF(r,e){var t=r[0],n=r[1],i=e[0],a=e[1],o=i[0],s=i[1],A=a[0],l=a[1],u=A-o,c=l-s,h=u===0&&c===0?0:(u*(t-o)+c*(n-s))/(u*u+c*c||0),f,d;return h<=0?(f=o,d=s):h>=1?(f=A,d=l):(f=o+h*u,d=s+h*c),[f,d]}function lA(r,e){for(var t=!0,n=r.length-1;n>=0;--n)if(r[n]!=e[n]){t=!1;break}return t}function gF(r,e){var t=Math.cos(e),n=Math.sin(e),i=r[0]*t-r[1]*n,a=r[1]*t+r[0]*n;return r[0]=i,r[1]=a,r}function Kk(r,e){return r[0]*=e,r[1]*=e,r}function du(r,e){var t=r[0]-e[0],n=r[1]-e[1];return t*t+n*n}function dP(r,e){return Math.sqrt(du(r,e))}function UX(r,e){return du(r,pF(r,e))}function vF(r,e){if(e.canWrapX()){var t=jr(e.getExtent()),n=Wk(r,e,t);n&&(r[0]-=n*t)}return r}function Wk(r,e,t){var n=e.getExtent(),i=0;if(e.canWrapX()&&(r[0]<n[0]||r[0]>n[2])){var a=t||jr(n);i=Math.floor((r[0]-n[0])/a)}return i}var DX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),QX=function(r){DX(e,r);function e(t){var n=r.call(this)||this;return n.map_=t,n}return e.prototype.dispatchRenderEvent=function(t,n){Re()},e.prototype.calculateMatrices2D=function(t){var n=t.viewState,i=t.coordinateToPixelTransform,a=t.pixelToCoordinateTransform;yo(i,t.size[0]/2,t.size[1]/2,1/n.resolution,-1/n.resolution,-n.rotation,-n.center[0],-n.center[1]),y0(a,i)},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o,s,A,l){var u,c=n.viewState;function h(tt,q,rt,nt){return o.call(s,q,tt?rt:null,nt)}var f=c.projection,d=vF(t.slice(),f),g=[[0,0]];if(f.canWrapX()&&a){var m=f.getExtent(),v=jr(m);g.push([-v,0],[v,0])}for(var y=n.layerStatesArray,w=y.length,C=[],O=[],F=0;F<g.length;F++)for(var I=w-1;I>=0;--I){var T=y[I],L=T.layer;if(L.hasRenderer()&&Qw(T,c)&&A.call(l,L)){var N=L.getRenderer(),x=L.getSource();if(N&&x){var S=x.getWrapX()?d:t,P=h.bind(null,T.managed);O[0]=S[0]+g[F][0],O[1]=S[1]+g[F][1],u=N.forEachFeatureAtCoordinate(O,n,i,P,C)}if(u)return u}}if(C.length!==0){var U=1/C.length;return C.forEach(function(tt,q){return tt.distanceSq+=q*U}),C.sort(function(tt,q){return tt.distanceSq-q.distanceSq}),C.some(function(tt){return u=tt.callback(tt.feature,tt.layer,tt.geometry)}),u}},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){return Re()},e.prototype.hasFeatureAtCoordinate=function(t,n,i,a,o,s){var A=this.forEachFeatureAtCoordinate(t,n,i,a,ll,this,o,s);return A!==void 0},e.prototype.getMap=function(){return this.map_},e.prototype.renderFrame=function(t){Re()},e.prototype.scheduleExpireIconCache=function(t){Dw.canExpireCache()&&t.postRenderFunctions.push(kX)},e}(EC);function kX(r,e){Dw.expire()}var HX=QX,GX=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),$X=function(r){GX(e,r);function e(t,n,i,a){var o=r.call(this,t)||this;return o.inversePixelTransform=n,o.frameState=i,o.context=a,o}return e}($o),ny=$X,k_="ol-hidden",VX="ol-selectable",vl="ol-unselectable",pP="ol-unsupported",Bd="ol-control",kw="ol-collapsed",jX=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))",`?\\s*([-,\\"\\'\\sa-z]+?)\\s*$`].join(""),"i"),gP=["style","variant","weight","size","lineHeight","family"],zk=function(r){var e=r.match(jX);if(!e)return null;for(var t={lineHeight:"normal",size:"1.2em",style:"normal",weight:"normal",variant:"normal"},n=0,i=gP.length;n<i;++n){var a=e[n+1];a!==void 0&&(t[gP[n]]=a)}return t.families=t.family.split(/,\s?/),t};function Yk(r){return r===1?"":String(Math.round(r*100)/100)}function wo(r,e,t,n){var i;return t&&t.length?i=t.shift():BC?i=new OffscreenCanvas(r||300,e||300):i=document.createElement("canvas"),r&&(i.width=r),e&&(i.height=e),i.getContext("2d",n)}function KX(r){var e=r.offsetWidth,t=getComputedStyle(r);return e+=parseInt(t.marginLeft,10)+parseInt(t.marginRight,10),e}function WX(r){var e=r.offsetHeight,t=getComputedStyle(r);return e+=parseInt(t.marginTop,10)+parseInt(t.marginBottom,10),e}function Ig(r,e){var t=e.parentNode;t&&t.replaceChild(r,e)}function Hw(r){return r&&r.parentNode?r.parentNode.removeChild(r):null}function Xk(r){for(;r.lastChild;)r.removeChild(r.lastChild)}function zX(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 qk="10px sans-serif",pu="#000",Gw="round",Ry=[],My=0,Lg="round",Ny=10,Py="#000",Uy="center",$w="middle",Tf=[0,0,0,0],Dy=1,eu=new Li,YX=new Ed;YX.setSize=function(){console.warn("labelCache is deprecated.")};var Np=null,lx,ux={},XX=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 d=t[f];if(o=Vw(l+" "+u+" "+e+d,i),c!=d){var g=Vw(l+" "+u+" "+e+c+","+d,i);h=h&&g!=o}}return!!h}function A(){for(var l=!0,u=eu.getKeys(),c=0,h=u.length;c<h;++c){var f=u[c];eu.get(f)<r&&(s.apply(this,f.split(`
`))?(wd(ux),Np=null,lx=void 0,eu.set(f,r)):(eu.set(f,eu.get(f)+1,!0),l=!1))}l&&(clearInterval(a),a=void 0)}return function(l){var u=zk(l);if(u)for(var c=u.families,h=0,f=c.length;h<f;++h){var d=c[h],g=u.style+`
`+u.weight+`
`+d;eu.get(g)===void 0&&(eu.set(g,r,!0),s(u.style,u.weight,d)||(eu.set(g,0,!0),a===void 0&&(a=setInterval(A,32))))}}}(),qX=function(){var r;return function(e){var t=ux[e];if(t==null){if(BC){var n=zk(e),i=Zk(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);ux[e]=t}return t}}();function Zk(r,e){return Np||(Np=wo(1,1)),r!=lx&&(Np.font=r,lx=Np.font),Np.measureText(e)}function Vw(r,e){return Zk(r,e).width}function vP(r,e,t){if(e in t)return t[e];var n=Vw(r,e);return t[e]=n,n}function ZX(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=Vw(h,c);t.push(f),o+=f;var d=qX(h);n.push(d),A=Math.max(A,d)}return{width:a,height:s,widths:t,heights:n,lineWidths:i}}function JX(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]),tq(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 tq(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 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)}}(),rq=function(r){eq(e,r);function e(t){var n=r.call(this,t)||this;n.fontChangeListenerKey_=je(eu,rd.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=vl+" 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 ny(t,void 0,n);i.dispatchEvent(a)}},e.prototype.disposeInternal=function(){Yr(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(No.PRECOMPOSE,t);var n=t.layerStatesArray.sort(function(f,d){return f.zIndex-d.zIndex}),i=t.viewState;this.children_.length=0;for(var a=[],o=null,s=0,A=n.length;s<A;++s){var l=n[s];t.layerIndex=s;var u=l.layer,c=u.getSourceState();if(!Qw(l,i)||c!=co.READY&&c!=co.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);zX(this.element_,this.children_),this.dispatchRenderEvent(No.POSTCOMPOSE,t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)},e.prototype.forEachLayerAtPixel=function(t,n,i,a,o){for(var s=n.viewState,A=n.layerStatesArray,l=A.length,u=l-1;u>=0;--u){var c=A[u],h=c.layer;if(h.hasRenderer()&&Qw(c,s)&&o(h)){var f=h.getRenderer(),d=f.getDataAtPixel(t,n,i);if(d){var g=a(h,d);if(g)return g}}}},e}(HX),Jk=rq,si={ADD:"add",REMOVE:"remove"},t8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),mP={LENGTH:"length"},H_=function(r){t8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.element=n,a.index=i,a}return e}($o),nq=function(r){t8(e,r);function e(t,n){var i=r.call(this)||this;i.on,i.once,i.un;var a=n||{};if(i.unique_=!!a.unique,i.array_=t||[],i.unique_)for(var o=0,s=i.array_.length;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(mP.LENGTH)},e.prototype.insertAt=function(t,n){this.unique_&&this.assertUnique_(n),this.array_.splice(t,0,n),this.updateLength_(),this.dispatchEvent(new H_(si.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 H_(si.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 H_(si.REMOVE,a,t)),this.dispatchEvent(new H_(si.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(mP.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 Ik(58)},e}(Li),xi=nq,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)}}(),Sc=function(r){e8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.layer=n,i}return e}($o),Lb={LAYERS:"layers"},iq=function(r){e8(e,r);function e(t){var n=this,i=t||{},a=Ce({},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(Lb.LAYERS,n.handleLayersChanged_),o?Array.isArray(o)?o=new xi(o.slice(),{unique:!0}):Le(typeof o.getArray=="function",43):o=new xi(void 0,{unique:!0}),n.setLayers(o),n}return e.prototype.handleLayerChange_=function(){this.changed()},e.prototype.handleLayersChanged_=function(){this.layersListenerKeys_.forEach(Yr),this.layersListenerKeys_.length=0;var t=this.getLayers();this.layersListenerKeys_.push(je(t,si.ADD,this.handleLayersAdd_,this),je(t,si.REMOVE,this.handleLayersRemove_,this));for(var n in this.listenerKeys_)this.listenerKeys_[n].forEach(Yr);wd(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 Sc("addlayer",s))}this.changed()},e.prototype.registerLayerListeners_=function(t){var n=[je(t,rd.PROPERTYCHANGE,this.handleLayerChange_,this),je(t,xe.CHANGE,this.handleLayerChange_,this)];t instanceof e&&n.push(je(t,"addlayer",this.handleLayerGroupAdd_,this),je(t,"removelayer",this.handleLayerGroupRemove_,this)),this.listenerKeys_[Ee(t)]=n},e.prototype.handleLayerGroupAdd_=function(t){this.dispatchEvent(new Sc("addlayer",t.layer))},e.prototype.handleLayerGroupRemove_=function(t){this.dispatchEvent(new Sc("removelayer",t.layer))},e.prototype.handleLayersAdd_=function(t){var n=t.element;this.registerLayerListeners_(n),this.dispatchEvent(new Sc("addlayer",n)),this.changed()},e.prototype.handleLayersRemove_=function(t){var n=t.element,i=Ee(n);this.listenerKeys_[i].forEach(Yr),delete this.listenerKeys_[i],this.dispatchEvent(new Sc("removelayer",n)),this.changed()},e.prototype.getLayers=function(){return this.get(Lb.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 Sc("removelayer",i[a]));this.set(Lb.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=Qs(l.extent,a.extent):l.extent=a.extent),l.zIndex===void 0&&(l.zIndex=o)}return n},e.prototype.getSourceState=function(){return co.READY},e}(dF),C0=iq,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)}}(),oq=function(r){aq(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}($o),Pp=oq,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)}}(),Aq=function(r){sq(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}(Pp),nu=Aq,yr={SINGLECLICK:"singleclick",CLICK:xe.CLICK,DBLCLICK:xe.DBLCLICK,POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},JA={POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},lq=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),uq=function(r){lq(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_=je(a,JA.POINTERDOWN,i.handlePointerDown_,i),i.originalPointerMoveEvent_,i.relayedListenerKey_=je(a,JA.POINTERMOVE,i.relayEvent_,i),i.boundHandleTouchMove_=i.handleTouchMove_.bind(i),i.element_.addEventListener(xe.TOUCHMOVE,i.boundHandleTouchMove_,xk?{passive:!1}:!1),i}return e.prototype.emulateClick_=function(t){var n=new nu(yr.CLICK,this.map_,t);this.dispatchEvent(n),this.clickTimeoutId_!==void 0?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,n=new nu(yr.DBLCLICK,this.map_,t),this.dispatchEvent(n)):this.clickTimeoutId_=setTimeout(function(){this.clickTimeoutId_=void 0;var i=new nu(yr.SINGLECLICK,this.map_,t);this.dispatchEvent(i)}.bind(this),250)},e.prototype.updateActivePointers_=function(t){var n=t;n.type==yr.POINTERUP||n.type==yr.POINTERCANCEL?delete this.trackedTouches_[n.pointerId]:n.type==yr.POINTERDOWN&&(this.trackedTouches_[n.pointerId]=!0),this.activePointers_=Object.keys(this.trackedTouches_).length},e.prototype.handlePointerUp_=function(t){this.updateActivePointers_(t);var n=new nu(yr.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(Yr),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 nu(yr.POINTERDOWN,this.map_,t);this.dispatchEvent(n),this.down_={};for(var i in t){var a=t[i];this.down_[i]=typeof a=="function"?td:a}if(this.dragListenerKeys_.length===0){var o=this.map_.getOwnerDocument();this.dragListenerKeys_.push(je(o,yr.POINTERMOVE,this.handlePointerMove_,this),je(o,yr.POINTERUP,this.handlePointerUp_,this),je(this.element_,yr.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==o&&this.dragListenerKeys_.push(je(this.element_.getRootNode(),yr.POINTERUP,this.handlePointerUp_,this))}},e.prototype.handlePointerMove_=function(t){if(this.isMoving_(t)){this.dragging_=!0;var n=new nu(yr.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 nu(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_&&(Yr(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(xe.TOUCHMOVE,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(Yr(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(Yr),this.dragListenerKeys_.length=0,this.element_=null,r.prototype.disposeInternal.call(this)},e}(Ed),cq=uq,XA={POSTRENDER:"postrender",MOVESTART:"movestart",MOVEEND:"moveend",LOADSTART:"loadstart",LOADEND:"loadend"},_i={LAYERGROUP:"layergroup",SIZE:"size",TARGET:"target",VIEW:"view"},jw=1/0,hq=function(){function r(e,t){this.priorityFunction_=e,this.keyFunction_=t,this.elements_=[],this.priorities_=[],this.queuedElements_={}}return r.prototype.clear=function(){this.elements_.length=0,this.priorities_.length=0,wd(this.queuedElements_)},r.prototype.dequeue=function(){var e=this.elements_,t=this.priorities_,n=e[0];e.length==1?(e.length=0,t.length=0):(e[0]=e.pop(),t[0]=t.pop(),this.siftUp_(0));var i=this.keyFunction_(n);return delete this.queuedElements_[i],n},r.prototype.enqueue=function(e){Le(!(this.keyFunction_(e)in this.queuedElements_),31);var t=this.priorityFunction_(e);return t!=jw?(this.elements_.push(e),this.priorities_.push(t),this.queuedElements_[this.keyFunction_(e)]=!0,this.siftDown_(0,this.elements_.length-1),!0):!1},r.prototype.getCount=function(){return this.elements_.length},r.prototype.getLeftChildIndex_=function(e){return e*2+1},r.prototype.getRightChildIndex_=function(e){return e*2+2},r.prototype.getParentIndex_=function(e){return e-1>>1},r.prototype.heapify_=function(){var e;for(e=(this.elements_.length>>1)-1;e>=0;e--)this.siftUp_(e)},r.prototype.isEmpty=function(){return this.elements_.length===0},r.prototype.isKeyQueued=function(e){return e in this.queuedElements_},r.prototype.isQueued=function(e){return this.isKeyQueued(this.keyFunction_(e))},r.prototype.siftUp_=function(e){for(var t=this.elements_,n=this.priorities_,i=t.length,a=t[e],o=n[e],s=e;e<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==jw?delete this.queuedElements_[this.keyFunction_(o)]:(n[i]=A,t[i++]=o);t.length=i,n.length=i,this.heapify_()},r}(),fq=hq,Te={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},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)}}(),pq=function(r){dq(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(xe.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===Te.LOADED||i===Te.ERROR||i===Te.EMPTY){n.removeEventListener(xe.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===Te.IDLE&&!(s in this.tilesLoadingKeys_)&&(this.tilesLoadingKeys_[s]=!0,++this.tilesLoading_,++i,o.load())},e}(fq),gq=pq;function vq(r,e,t,n,i){if(!r||!(t in r.wantedTiles)||!r.wantedTiles[t][e.getKey()])return jw;var a=r.viewState.center,o=n[0]-a[0],s=n[1]-a[1];return 65536*Math.log(i)+Math.sqrt(o*o+s*s)/i}var pt={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},nv={RADIANS:"radians",DEGREES:"degrees",FEET:"ft",METERS:"m",PIXELS:"pixels",TILE_PIXELS:"tile-pixels",USFEET:"us-ft"},vA={};vA[nv.RADIANS]=6370997/(2*Math.PI);vA[nv.DEGREES]=2*Math.PI*6370997/360;vA[nv.FEET]=.3048;vA[nv.METERS]=1;vA[nv.USFEET]=1200/3937;var ho=nv,In={ANIMATING:0,INTERACTING:1},ls={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"},mq=42,mF=256,yq=function(){function r(e){this.code_=e.code,this.units_=e.units,this.extent_=e.extent!==void 0?e.extent:null,this.worldExtent_=e.worldExtent!==void 0?e.worldExtent:null,this.axisOrientation_=e.axisOrientation!==void 0?e.axisOrientation:"enu",this.global_=e.global!==void 0?e.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=e.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=e.metersPerUnit}return r.prototype.canWrapX=function(){return this.canWrapX_},r.prototype.getCode=function(){return this.code_},r.prototype.getExtent=function(){return this.extent_},r.prototype.getUnits=function(){return this.units_},r.prototype.getMetersPerUnit=function(){return this.metersPerUnit_||vA[this.units_]},r.prototype.getWorldExtent=function(){return this.worldExtent_},r.prototype.getAxisOrientation=function(){return this.axisOrientation_},r.prototype.isGlobal=function(){return this.global_},r.prototype.setGlobal=function(e){this.global_=e,this.canWrapX_=!!(e&&this.extent_)},r.prototype.getDefaultTileGrid=function(){return this.defaultTileGrid_},r.prototype.setDefaultTileGrid=function(e){this.defaultTileGrid_=e},r.prototype.setExtent=function(e){this.extent_=e,this.canWrapX_=!!(this.global_&&e)},r.prototype.setWorldExtent=function(e){this.worldExtent_=e},r.prototype.setGetPointResolution=function(e){this.getPointResolutionFunc_=e},r.prototype.getPointResolutionFunc=function(){return this.getPointResolutionFunc_},r}(),Ru=yq,_q=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),B0=6378137,zp=Math.PI*B0,wq=[-zp,-zp,zp,zp],Eq=[-180,-85,180,85],G_=B0*Math.log(Math.tan(Math.PI/2)),dp=function(r){_q(e,r);function e(t){return r.call(this,{code:t,units:ho.METERS,extent:wq,global:!0,worldExtent:Eq,getPointResolution:function(n,i){return n/_X(i[1]/B0)}})||this}return e}(Ru),yP=[new dp("EPSG:3857"),new dp("EPSG:102100"),new dp("EPSG:102113"),new dp("EPSG:900913"),new dp("http://www.opengis.net/def/crs/EPSG/0/3857"),new dp("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Cq(r,e,t){var n=r.length,i=t>1?t:2,a=e;a===void 0&&(i>2?a=r.slice():a=new Array(n));for(var o=0;o<n;o+=i){a[o]=zp*r[o]/180;var s=B0*Math.log(Math.tan(Math.PI*(+r[o+1]+90)/360));s>G_?s=G_:s<-G_&&(s=-G_),a[o+1]=s}return a}function Bq(r,e,t){var n=r.length,i=t>1?t:2,a=e;a===void 0&&(i>2?a=r.slice():a=new Array(n));for(var o=0;o<n;o+=i)a[o]=180*r[o]/zp,a[o+1]=360*Math.atan(Math.exp(r[o+1]/B0))/Math.PI-90;return a}var 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)}}(),Tq=6378137,_P=[-180,-90,180,90],Sq=Math.PI*Tq/180,af=function(r){bq(e,r);function e(t,n){return r.call(this,{code:t,units:ho.DEGREES,extent:_P,axisOrientation:n,global:!0,metersPerUnit:Sq,worldExtent:_P})||this}return e}(Ru),wP=[new af("CRS:84"),new af("EPSG:4326","neu"),new af("urn:ogc:def:crs:OGC:1.3:CRS84"),new af("urn:ogc:def:crs:OGC:2:84"),new af("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new af("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new af("http://www.opengis.net/def/crs/EPSG/0/4326","neu")],cx={};function xq(r){return cx[r]||cx[r.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function Iq(r,e){cx[r]=e}var ug={};function Og(r,e,t){var n=r.getCode(),i=e.getCode();n in ug||(ug[n]={}),ug[n][i]=t}function r8(r,e){var t;return r in ug&&e in ug[r]&&(t=ug[r][e]),t}var n8=63710088e-1;function Kw(r,e,t){var n=t||n8,i=Wc(r[1]),a=Wc(e[1]),o=(a-i)/2,s=Wc(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 Lq(r,e,t,n){var i=n||n8,a=Wc(r[1]),o=Wc(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[lP(l),lP(A)]}var hx=!0;function Oq(r){var e=r===void 0?!0:r;hx=!e}function yF(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 xC(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 i8(r){Iq(r.getCode(),r),Og(r,r,yF)}function Fq(r){r.forEach(i8)}function Ve(r){return typeof r=="string"?xq(r):r||null}function Ww(r,e,t,n){r=Ve(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/vA[n])}}else{var s=r.getUnits();if(s==ho.DEGREES&&!n||n==ho.DEGREES)i=e;else{var A=id(r,Ve("EPSG:4326"));if(A===xC&&s!==ho.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=Kw(l.slice(0,2),l.slice(2,4)),c=Kw(l.slice(4,6),l.slice(6,8));i=(u+c)/2}var o=n?vA[n]:r.getMetersPerUnit();o!==void 0&&(i/=o)}}return i}function fx(r){Fq(r),r.forEach(function(e){r.forEach(function(t){e!==t&&Og(e,t,yF)})})}function Rq(r,e,t,n){r.forEach(function(i){e.forEach(function(a){Og(i,a,t),Og(a,i,n)})})}function _F(r,e){return r?typeof r=="string"?Ve(r):r:Ve(e)}function EP(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 Mq(r,e,t,n){var i=Ve(r),a=Ve(e);Og(i,a,EP(t)),Og(a,i,EP(n))}function tl(r,e){if(r===e)return!0;var t=r.getUnits()===e.getUnits();if(r.getCode()===e.getCode())return t;var n=id(r,e);return n===yF&&t}function id(r,e){var t=r.getCode(),n=e.getCode(),i=r8(t,n);return i||(i=xC),i}function Qy(r,e){var t=Ve(r),n=Ve(e);return id(t,n)}function ch(r,e,t){var n=Qy(e,t);return n(r,void 0,r.length)}function zw(r,e,t,n){var i=Qy(e,t);return cF(r,i,void 0,n)}var Nq=null;function ad(){return Nq}function Fg(r,e){return r}function Mn(r,e){return hx&&!lA(r,[0,0])&&r[0]>=-180&&r[0]<=180&&r[1]>=-90&&r[1]<=90&&(hx=!1,console.warn("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),r}function IC(r,e){return r}function ds(r,e){return r}function Pq(r,e){return r}function CP(r,e,t){return function(n){var i=n[0],a=n[1],o,s;if(r.canWrapX()){var A=r.getExtent(),l=jr(A);s=Wk(n,r,l),s&&(i=i-s*l),i=Un(i,A[0],A[2]),a=Un(a,A[1],A[3]),o=t([i,a])}else o=t(n);return s&&e.canWrapX()&&(o[0]+=s*jr(e.getExtent())),o}}function Uq(){fx(yP),fx(wP),Rq(wP,yP,Cq,Bq)}Uq();function BP(r,e,t){return function(n,i,a,o,s){if(n){if(!i&&!e)return n;var A=e?0:a[0]*i,l=e?0:a[1]*i,u=s?s[0]:0,c=s?s[1]:0,h=r[0]+A/2+u,f=r[2]-A/2+u,d=r[1]+l/2+c,g=r[3]-l/2+c;h>f&&(h=(f+h)/2,f=h),d>g&&(d=(g+d)/2,g=d);var m=Un(n[0],h,f),v=Un(n[1],d,g);if(o&&t&&i){var y=30*i;m+=-y*Math.log(1+Math.max(0,h-n[0])/y)+y*Math.log(1+Math.max(0,n[0]-f)/y),v+=-y*Math.log(1+Math.max(0,d-n[1])/y)+y*Math.log(1+Math.max(0,n[1]-g)/y)}return[m,v]}}}function Dq(r){return r}function wF(r,e,t,n){var i=jr(e)/t[0],a=Ii(e)/t[1];return n?Math.min(r,Math.max(i,a)):Math.min(r,Math.min(i,a))}function EF(r,e,t){var n=Math.min(r,e),i=50;return n*=Math.log(1+i*Math.max(0,r/e-1))/i+1,t&&(n=Math.max(n,t),n/=Math.log(1+i*Math.max(0,t/r-1))/i+1),Un(n,t/2,e*2)}function Qq(r,e,t,n){return function(i,a,o,s){if(i!==void 0){var A=r[0],l=r[r.length-1],u=t?wF(A,t,o,n):A;if(s){var c=e!==void 0?e:!0;return c?EF(i,u,l):Un(i,l,u)}var h=Math.min(u,i),f=Math.floor(CC(r,h,a));return r[f]>u&&f<r.length-1?r[f+1]:r[f]}else return}}function kq(r,e,t,n,i,a){return function(o,s,A,l){if(o!==void 0){var u=i?wF(e,i,A,a):e,c=t!==void 0?t:0;if(l){var h=n!==void 0?n:!0;return h?EF(o,u,c):Un(o,c,u)}var f=1e-9,d=Math.ceil(Math.log(e/u)/Math.log(r)-f),g=-s*(.5-f)+.5,m=Math.min(u,o),v=Math.floor(Math.log(e/m)/Math.log(r)+g),y=Math.max(d,v),w=e/Math.pow(r,y);return Un(w,c,u)}else return}}function bP(r,e,t,n,i){return function(a,o,s,A){if(a!==void 0){var l=n?wF(r,n,s,i):r,u=t!==void 0?t:!0;return!u||!A?Un(a,e,l):EF(a,l,e)}else return}}function CF(r){if(r!==void 0)return 0}function TP(r){if(r!==void 0)return r}function Hq(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 Gq(r){var e=r||Wc(5);return function(t,n){if(n)return t;if(t!==void 0)return Math.abs(t)<=e?0:t}}function BF(r){return Math.pow(r,3)}function Hs(r){return 1-BF(1-r)}function Yw(r){return 3*r*r-2*r*r*r}function bF(r){return r}function $q(r){return r<.5?Yw(2*r):1-Yw(2*(r-.5))}var Vq=Object.freeze(Object.defineProperty({__proto__:null,easeIn:BF,easeOut:Hs,inAndOut:Yw,linear:bF,upAndDown:$q},Symbol.toStringTag,{value:"Module"})),ae={XY:"XY",XYZ:"XYZ",XYM:"XYM",XYZM:"XYZM"};function Yc(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 TF(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 d=r[f]-u,g=r[f+1]-c;s[h++]=u+d*A-g*l,s[h++]=c+d*l+g*A;for(var m=f+2;m<f+n;++m)s[h++]=r[m]}return o&&s.length!=h&&(s.length=h),s}function jq(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,d=r[h+1]-u;A[c++]=l+i*f,A[c++]=u+a*d;for(var g=h+2;g<h+n;++g)A[c++]=r[g]}return s&&A.length!=c&&(A.length=c),A}function a8(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 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)}}(),SP=Si(),Wq=function(r){Kq(e,r);function e(){var t=r.call(this)||this;return t.extent_=Ui(),t.extentRevision_=-1,t.simplifiedGeometryMaxMinSquaredTolerance=0,t.simplifiedGeometryRevision=0,t.simplifyTransformedInternal=qY(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 Re()},e.prototype.closestPointXY=function(t,n,i,a){return Re()},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 Re()},e.prototype.getExtent=function(t){if(this.extentRevision_!=this.getRevision()){var n=this.computeExtent(this.extent_);(isNaN(n[0])||isNaN(n[1]))&&Eh(n),this.extentRevision_=this.getRevision()}return Rk(this.extent_,t)},e.prototype.rotate=function(t,n){Re()},e.prototype.scale=function(t,n,i){Re()},e.prototype.simplify=function(t){return this.getSimplifiedGeometry(t*t)},e.prototype.getSimplifiedGeometry=function(t){return Re()},e.prototype.getType=function(){return Re()},e.prototype.applyTransform=function(t){Re()},e.prototype.intersectsExtent=function(t){return Re()},e.prototype.translate=function(t,n){Re()},e.prototype.transform=function(t,n){var i=Ve(t),a=i.getUnits()==ho.TILE_PIXELS?function(o,s,A){var l=i.getExtent(),u=i.getWorldExtent(),c=Ii(u)/Ii(l);return yo(SP,u[0],u[3],c,-c,0,0,0),Yc(o,0,o.length,A,SP,s),Qy(i,n)(o,s,A)}:Qy(i,n);return this.applyTransform(a),this},e}(Li),LC=Wq,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)}}(),Yq=function(r){zq(e,r);function e(){var t=r.call(this)||this;return t.layout=ae.XY,t.stride=2,t.flatCoordinates=null,t}return e.prototype.computeExtent=function(t){return TC(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinates=function(){return Re()},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=dx(t),this.layout=t,this.flatCoordinates=n},e.prototype.setCoordinates=function(t,n){Re()},e.prototype.setLayout=function(t,n,i){var a;if(t)a=dx(t);else{for(var o=0;o<i;++o)if(n.length===0){this.layout=ae.XY,this.stride=2;return}else n=n[0];a=n.length,t=Xq(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();TF(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=Ya(this.getExtent()));var s=this.getFlatCoordinates();if(s){var A=this.getStride();jq(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();a8(i,0,i.length,a,t,n,i),this.changed()}},e}(LC);function Xq(r){var e;return r==2?e=ae.XY:r==3?e=ae.XYZ:r==4&&(e=ae.XYZM),e}function dx(r){var e;return r==ae.XY?e=2:r==ae.XYZ||r==ae.XYM?e=3:r==ae.XYZM&&(e=4),e}function qq(r,e,t){var n=r.getFlatCoordinates();if(n){var i=r.getStride();return Yc(n,0,n.length,i,e,t)}else return null}var mA=Yq;function xP(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]=au(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 SF(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=kf(a,o,s,A);l>i&&(i=l),a=s,o=A}return i}function xF(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=SF(r,e,s,n,i),e=s}return i}function Zq(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];i=xF(r,e,s,n,i),e=s[s.length-1]}return i}function IF(r,e,t,n,i,a,o,s,A,l,u){if(e==t)return l;var c,h;if(i===0)if(h=kf(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],d=e+n;d<t;)if(xP(r,d-n,d,n,o,s,f),h=kf(o,s,f[0],f[1]),h<l){for(l=h,c=0;c<n;++c)A[c]=f[c];A.length=n,d+=n}else d+=n*Math.max((Math.sqrt(h)-Math.sqrt(l))/i|0,1);if(a&&(xP(r,t-n,e,n,o,s,f),h=kf(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 LF(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 d=t[h];l=IF(r,e,d,n,i,a,o,s,A,l,c),e=d}return l}function Jq(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 d=t[h];l=LF(r,e,d,n,i,a,o,s,A,l,c),e=d[d.length-1]}return l}function o8(r,e,t,n){for(var i=0,a=t.length;i<a;++i)r[e++]=t[i];return e}function b0(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 OF(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=b0(r,e,t[s],n);a[o++]=l,e=l}return a.length=o,a}function t3(r,e,t,n,i){for(var a=i||[],o=0,s=0,A=t.length;s<A;++s){var l=OF(r,e,t[s],n,a[o]);a[o++]=l,e=l[l.length-1]}return a.length=o,a}function FF(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,d=r[h],g=r[h+1],m=r[c],v=r[c+1],y=h+n;y<c;y+=n){var w=r[y],C=r[y+1],O=wX(w,C,d,g,m,v);O>f&&(u=y,f=O)}f>i&&(A[(u-e)/n]=1,h+n<u&&l.push(h,u),u+n<c&&l.push(u,c))}for(var y=0;y<s;++y)A[y]&&(a[o++]=r[e+y*n],a[o++]=r[e+y*n+1]);return o}function e3(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=FF(r,e,u,n,i,a,o),s.push(o),e=u}return o}function gf(r,e){return e*Math.round(r/e)}function r3(r,e,t,n,i,a,o){if(e==t)return o;var s=gf(r[e],i),A=gf(r[e+1],i);e+=n,a[o++]=s,a[o++]=A;var l,u;do if(l=gf(r[e],i),u=gf(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=gf(r[e],i),h=gf(r[e+1],i);if(e+=n,!(c==l&&h==u)){var f=l-s,d=u-A,g=c-s,m=h-A;if(f*m==d*g&&(f<0&&g<f||f==g||f>0&&g>f)&&(d<0&&m<d||d==m||d>0&&m>d)){l=c,u=h;continue}a[o++]=l,a[o++]=u,s=l,A=u,l=c,u=h}}return a[o++]=l,a[o++]=u,o}function s8(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A];o=r3(r,e,u,n,i,a,o),s.push(o),e=u}return o}function n3(r,e,t,n,i,a,o,s){for(var A=0,l=t.length;A<l;++A){var u=t[A],c=[];o=s8(r,e,u,n,i,a,o,c),s.push(c),e=u[u.length-1]}return o}function Au(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 ky(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++]=Au(r,e,l,n,a[o]),e=l}return a.length=o,a}function px(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++]=ky(r,e,l,n,a[o]),e=l[l.length-1]}return a.length=o,a}function A8(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 l8(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=A8(r,e,s,n),e=s}return i}function i3(r,e,t,n){for(var i=0,a=0,o=t.length;a<o;++a){var s=t[a];i+=l8(r,e,s,n),e=s[s.length-1]}return i}var 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,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<wh(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(SF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),IF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.getArea=function(){return A8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinates=function(){return Au(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[];return n.length=FF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,ae.XY)},e.prototype.getType=function(){return pt.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=b0(this.flatCoordinates,0,t,this.stride),this.changed()},e}(mA),Rg=o3,s3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),A3=function(r){s3(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=kf(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 Uf(this.flatCoordinates,t)},e.prototype.getType=function(){return pt.POINT},e.prototype.intersectsExtent=function(t){return bC(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=o8(this.flatCoordinates,0,t,this.stride),this.changed()},e}(mA),xr=A3;function l3(r,e,t,n,i){var a=SC(i,function(o){return!Sf(r,e,t,n,o[0],o[1])});return!a}function Sf(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||!Sf(r,e,t[0],n,i,a))return!1;for(var o=1,s=t.length;o<s;++o)if(Sf(r,t[o-1],t[o],n,i,a))return!1;return!0}function u3(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 MF(r,e,t,n,i,a,o){for(var s,A,l,u,c,h,f,d=i[a+1],g=[],m=0,v=t.length;m<v;++m){var y=t[m];for(u=r[y-n],h=r[y-n+1],s=e;s<y;s+=n)c=r[s],f=r[s+1],(d<=h&&f<=d||h<=d&&d<=f)&&(l=(d-h)/(f-h)*(c-u)+u,g.push(l)),u=c,h=f}var w=NaN,C=-1/0;for(g.sort(sh),u=g[0],s=1,A=g.length;s<A;++s){c=g[s];var O=Math.abs(c-u);O>C&&(l=(u+c)/2,RF(r,e,t,n,l,d)&&(w=l,C=O)),u=c}return isNaN(w)&&(w=i[a]),o?(o.push(w,d,C),o):[w,d,C]}function u8(r,e,t,n,i){for(var a=[],o=0,s=t.length;o<s;++o){var A=t[o];a=MF(r,e,A,n,i,2*o,a),e=A[A.length-1]}return a}function c8(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 OC(r,e,t,n,i){var a=uF(Ui(),r,e,t,n);return Xn(i,a)?fs(i,a)||a[0]>=i[0]&&a[2]<=i[2]||a[1]>=i[1]&&a[3]<=i[3]?!0:c8(r,e,t,n,function(o,s){return Nk(i,o,s)}):!1}function c3(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){if(OC(r,e,t[a],n,i))return!0;e=t[a]}return!1}function h3(r,e,t,n,i){return!!(OC(r,e,t,n,i)||Sf(r,e,t,n,i[0],i[1])||Sf(r,e,t,n,i[0],i[3])||Sf(r,e,t,n,i[2],i[1])||Sf(r,e,t,n,i[2],i[3]))}function h8(r,e,t,n,i){if(!h3(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(l3(r,t[a-1],t[a],n,i)&&!OC(r,t[a-1],t[a],n,i))return!1;return!0}function f3(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(h8(r,e,s,n,i))return!0;e=s[s.length-1]}return!1}function d3(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 FC(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 f8(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=FC(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 p3(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a){var s=t[a];if(!f8(r,e,s,n,i))return!1;s.length&&(e=s[s.length-1])}return!0}function gx(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=FC(r,e,A,n),u=o===0?a&&l||!a&&!l:a&&!l||!a&&l;u&&d3(r,e,A,n),e=A}return e}function IP(r,e,t,n,i){for(var a=0,o=t.length;a<o;++a)e=gx(r,e,t[a],n,i);return e}function g3(r,e){for(var t=[],n=0,i=0,a=0,o=e.length;a<o;++a){var s=e[a];if(!FC(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 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)}}(),RC=function(r){v3(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?tn(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<wh(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xF(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),LF(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 l8(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),gx(n,0,this.ends_,this.stride,t)):n=this.flatCoordinates,ky(n,0,this.ends_,this.stride)},e.prototype.getEnds=function(){return this.ends_},e.prototype.getFlatInteriorPoint=function(){if(this.flatInteriorPointRevision_!=this.getRevision()){var t=Ya(this.getExtent());this.flatInteriorPoint_=MF(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_},e.prototype.getInteriorPoint=function(){return new xr(this.getFlatInteriorPoint(),ae.XYM)},e.prototype.getLinearRingCount=function(){return this.ends_.length},e.prototype.getLinearRing=function(t){return t<0||this.ends_.length<=t?null:new Rg(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 Rg(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;f8(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=gx(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=s8(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),n,0,i),new e(n,ae.XY,i)},e.prototype.getType=function(){return pt.POLYGON},e.prototype.intersectsExtent=function(t){return h8(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=OF(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(mA),Dn=RC;function m3(r,e,t,n){for(var i=t||32,a=[],o=0;o<i;++o)tn(a,Lq(r,e,2*Math.PI*o/i,n));return a.push(a[0],a[1]),new RC(a,ae.XY,[a.length])}function hh(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 RC(a,ae.XY,[a.length])}function d8(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 RC(A,a,c);return y3(h,o,r.getRadius(),t),h}function y3(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+zc(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 _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)}}(),Ob=0,w3=function(r){_3(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=Ce({},t);return n.hints_=[0,0],n.animations_=[],n.updateAnimationKey_,n.projection_=_F(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&&Oq(),i.center&&(i.center=Mn(i.center,n.projection_)),i.extent&&(i.extent=ds(i.extent,n.projection_)),n.applyOptions_(i),n}return e.prototype.applyOptions_=function(t){var n=Ce({},t);for(var i in ls)delete n[i];this.setProperties(n,!0);var a=C3(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=E3(t),s=a.constraint,A=B3(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(),Ce({},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=Ce({},a),a.center=Mn(a.center,this.getProjection())),a.anchor&&(a=Ce({},a),a.anchor=Mn(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&&$_(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||Yw,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 d=zc(h.rotation-u+Math.PI,2*Math.PI)-Math.PI;f.targetRotation=u+d,u=f.targetRotation}b3(f)?f.complete=!0:s+=f.duration,c.push(f)}this.animations_.push(c),this.setHint(In.ANIMATING,1),this.updateAnimations_()},e.prototype.getAnimating=function(){return this.hints_[In.ANIMATING]>0},e.prototype.getInteracting=function(){return this.hints_[In.INTERACTING]>0},e.prototype.cancelAnimations=function(){this.setHint(In.ANIMATING,-this.hints_[In.ANIMATING]);for(var t,n=0,i=this.animations_.length;n<i;++n){var a=this.animations_[n];if(a[0].callback&&$_(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],d=l.sourceCenter[1],g=l.targetCenter[0],m=l.targetCenter[1];this.nextCenter_=l.targetCenter;var v=f+h*(g-f),y=d+h*(m-d);this.targetCenter_=[v,y]}if(l.sourceResolution&&l.targetResolution){var w=h===1?l.targetResolution:l.sourceResolution+h*(l.targetResolution-l.sourceResolution);if(l.anchor){var C=this.getViewportSize_(this.getRotation()),O=this.constraints_.resolution(w,0,C,!0);this.targetCenter_=this.calculateCenterZoom(O,l.anchor)}this.nextResolution_=l.targetResolution,this.targetResolution_=w,this.applyTargetState_(!0)}if(l.sourceRotation!==void 0&&l.targetRotation!==void 0){var F=h===1?zc(l.targetRotation+Math.PI,2*Math.PI)-Math.PI:l.sourceRotation+h*(l.targetRotation-l.sourceRotation);if(l.anchor){var I=this.constraints_.rotation(F,!0);this.targetCenter_=this.calculateCenterRotate(I,l.anchor)}this.nextRotation_=l.targetRotation,this.targetRotation_=F}if(this.applyTargetState_(!0),n=!0,!l.complete)break}}if(o){this.animations_[i]=null,this.setHint(In.ANIMATING,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;var T=a[0].callback;T&&$_(T,!0)}}this.animations_=this.animations_.filter(Boolean),n&&this.updateAnimationKey_===void 0&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}},e.prototype.calculateCenterRotate=function(t,n){var i,a=this.getCenterInternal();return a!==void 0&&(i=[a[0]-n[0],a[1]-n[1]],gF(i,t-this.getRotation()),jk(i,n)),i},e.prototype.calculateCenterZoom=function(t,n){var i,a=this.getCenterInternal(),o=this.getResolution();if(a!==void 0&&o!==void 0){var s=n[0]-t*(n[0]-a[0])/o,A=n[1]-t*(n[1]-a[1])/o;i=[s,A]}return i},e.prototype.getViewportSize_=function(t){var n=this.viewportSize_;if(t){var i=n[0],a=n[1];return[Math.abs(i*Math.cos(t))+Math.abs(a*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(a*Math.cos(t))]}else return n},e.prototype.setViewportSize=function(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)},e.prototype.getCenter=function(){var t=this.getCenterInternal();return t&&Fg(t,this.getProjection())},e.prototype.getCenterInternal=function(){return this.get(ls.CENTER)},e.prototype.getConstraints=function(){return this.constraints_},e.prototype.getConstrainResolution=function(){return this.get("constrainResolution")},e.prototype.getHints=function(t){return t!==void 0?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()},e.prototype.calculateExtent=function(t){var n=this.calculateExtentInternal(t);return IC(n,this.getProjection())},e.prototype.calculateExtentInternal=function(t){var n=t||this.getViewportSizeMinusPadding_(),i=this.getCenterInternal();Le(i,1);var a=this.getResolution();Le(a!==void 0,2);var o=this.getRotation();return Le(o!==void 0,3),Qf(i,a,o,n)},e.prototype.getMaxResolution=function(){return this.maxResolution_},e.prototype.getMinResolution=function(){return this.minResolution_},e.prototype.getMaxZoom=function(){return this.getZoomForResolution(this.minResolution_)},e.prototype.setMaxZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))},e.prototype.getMinZoom=function(){return this.getZoomForResolution(this.maxResolution_)},e.prototype.setMinZoom=function(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))},e.prototype.setConstrainResolution=function(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))},e.prototype.getProjection=function(){return this.projection_},e.prototype.getResolution=function(){return this.get(ls.RESOLUTION)},e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.getResolutionForExtent=function(t,n){return this.getResolutionForExtentInternal(ds(t,this.getProjection()),n)},e.prototype.getResolutionForExtentInternal=function(t,n){var i=n||this.getViewportSizeMinusPadding_(),a=jr(t)/i[0],o=Ii(t)/i[1];return Math.max(a,o)},e.prototype.getResolutionForValueFunction=function(t){var n=t||2,i=this.getConstrainedResolution(this.maxResolution_),a=this.minResolution_,o=Math.log(i/a)/Math.log(n);return function(s){var A=i/Math.pow(n,s*o);return A}},e.prototype.getRotation=function(){return this.get(ls.ROTATION)},e.prototype.getValueForResolutionFunction=function(t){var n=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),a=this.minResolution_,o=Math.log(i/a)/n;return function(s){var A=Math.log(i/s)/n/o;return A}},e.prototype.getViewportSizeMinusPadding_=function(t){var n=this.getViewportSize_(t),i=this.padding_;return i&&(n=[n[0]-i[1]-i[3],n[1]-i[0]-i[2]]),n},e.prototype.getState=function(){var t=this.getProjection(),n=this.getResolution(),i=this.getRotation(),a=this.getCenterInternal(),o=this.padding_;if(o){var s=this.getViewportSizeMinusPadding_();a=Fb(a,this.getViewportSize_(),[s[0]/2+o[3],s[1]/2+o[0]],n,i)}return{center:a.slice(0),projection:t!==void 0?t:null,resolution:n,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}},e.prototype.getZoom=function(){var t,n=this.getResolution();return n!==void 0&&(t=this.getZoomForResolution(n)),t},e.prototype.getZoomForResolution=function(t){var n=this.minZoom_||0,i,a;if(this.resolutions_){var o=CC(this.resolutions_,t,1);n=o,i=this.resolutions_[o],o==this.resolutions_.length-1?a=2:a=i/this.resolutions_[o+1]}else i=this.maxResolution_,a=this.zoomFactor_;return n+Math.log(i/t)/Math.log(a)},e.prototype.getResolutionForZoom=function(t){if(this.resolutions_){if(this.resolutions_.length<=1)return 0;var n=Un(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[n]/this.resolutions_[n+1];return this.resolutions_[n]/Math.pow(i,Un(t-n,0,1))}else return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)},e.prototype.fit=function(t,n){var i;if(Le(Array.isArray(t)||typeof t.getSimplifiedGeometry=="function",24),Array.isArray(t)){Le(!rv(t),25);var a=ds(t,this.getProjection());i=hh(a)}else if(t.getType()===pt.CIRCLE){var a=ds(t.getExtent(),this.getProjection());i=hh(a),i.rotate(this.getRotation(),Ya(a))}else{var o=ad();o?i=t.clone().transform(o,this.getProjection()):i=t}this.fitInternal(i,n)},e.prototype.rotatedExtentForGeometry=function(t){for(var n=this.getRotation(),i=Math.cos(n),a=Math.sin(-n),o=t.getFlatCoordinates(),s=t.getStride(),A=1/0,l=1/0,u=-1/0,c=-1/0,h=0,f=o.length;h<f;h+=s){var d=o[h]*i-o[h+1]*a,g=o[h]*a+o[h+1]*i;A=Math.min(A,d),l=Math.min(l,g),u=Math.max(u,d),c=Math.max(c,g)}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),d=Ya(l);d[0]+=(o[1]-o[3])/2*u,d[1]+=(o[0]-o[2])/2*u;var g=d[0]*f-d[1]*h,m=d[1]*f+d[0]*h,v=this.getConstrainedCenter([g,m],u),y=i.callback?i.callback:td;i.duration!==void 0?this.animateInternal({resolution:u,center:v,duration:i.duration,easing:i.easing},y):(this.targetResolution_=u,this.targetCenter_=v,this.applyTargetState_(!1,!0),$_(y,!0))},e.prototype.centerOn=function(t,n,i){this.centerOnInternal(Mn(t,this.getProjection()),n,i)},e.prototype.centerOnInternal=function(t,n,i){this.setCenterInternal(Fb(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=Fb(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=Fg(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&&Mn(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=Mn(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&&Mn(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(ls.ROTATION)!==a&&this.set(ls.ROTATION,a),this.get(ls.RESOLUTION)!==s&&(this.set(ls.RESOLUTION,s),this.set("zoom",this.getZoom(),!0)),(!A||!this.get(ls.CENTER)||!lA(this.get(ls.CENTER),A))&&this.set(ls.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()||!lA(this.getCenterInternal(),u))&&(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:u,resolution:l,duration:a,easing:Hs,anchor:c}))},e.prototype.beginInteraction=function(){this.resolveConstraints(0),this.setHint(In.INTERACTING,1)},e.prototype.endInteraction=function(t,n,i){var a=i&&Mn(i,this.getProjection());this.endInteractionInternal(t,n,a)},e.prototype.endInteractionInternal=function(t,n,i){this.setHint(In.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 $_(r,e){setTimeout(function(){r(e)},0)}function E3(r){if(r.extent!==void 0){var e=r.smoothExtentConstraint!==void 0?r.smoothExtentConstraint:!0;return BP(r.extent,r.constrainOnlyCenter,e)}var t=_F(r.projection,"EPSG:3857");if(r.multiWorld!==!0&&t.isGlobal()){var n=t.getExtent().slice();return n[0]=-1/0,n[2]=1/0,BP(n,!1,!1)}return Dq}function C3(r){var e,t,n,i=28,a=2,o=r.minZoom!==void 0?r.minZoom:Ob,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=_F(r.projection,"EPSG:3857"),f=h.getExtent(),d=r.constrainOnlyCenter,g=r.extent;if(!l&&!g&&h.isGlobal()&&(d=!1,g=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=Qq(m,u,!d&&g,c):e=bP(t,n,u,!d&&g,c)}else{var v=f?Math.max(jr(f),Ii(f)):360*vA[ho.DEGREES]/h.getMetersPerUnit(),y=v/mF/Math.pow(a,Ob),w=y/Math.pow(a,i-Ob);t=r.maxResolution,t!==void 0?o=0:t=y/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=y/Math.pow(A,s):n=w),s=o+Math.floor(Math.log(t/n)/Math.log(A)),n=t/Math.pow(A,s-o),r.constrainResolution?e=kq(A,t,n,u,!d&&g,c):e=bP(t,n,u,!d&&g,c)}return{constraint:e,maxResolution:t,minResolution:n,minZoom:o,zoomFactor:A}}function B3(r){var e=r.enableRotation!==void 0?r.enableRotation:!0;if(e){var t=r.constrainRotation;return t===void 0||t===!0?Gq():t===!1?TP:typeof t=="number"?Hq(t):TP}else return CF}function b3(r){return!(r.sourceCenter&&r.targetCenter&&!lA(r.sourceCenter,r.targetCenter)||r.sourceResolution!==r.targetResolution||r.sourceRotation!==r.targetRotation)}function Fb(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 el=w3;function LP(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]+2*e,t[1]=r[1]+2*e,t}function OP(r){return r[0]>0&&r[1]>0}function p8(r,e,t){return t===void 0&&(t=[0,0]),t[0]=r[0]*e+.5|0,t[1]=r[1]*e+.5|0,t}function Wi(r,e){return Array.isArray(r)?r:(e===void 0?e=[r,r]:(e[0]=r,e[1]=r),e)}var T3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function g8(r){if(r instanceof Cd){r.setMapInternal(null);return}r instanceof C0&&r.getLayers().forEach(g8)}function v8(r,e){if(r instanceof Cd){r.setMapInternal(e);return}if(r instanceof C0)for(var t=r.getLayers().getArray(),n=0,i=t.length;n<i;++n)v8(t[n],e)}var S3=function(r){T3(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=x3(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:ed,n.postRenderTimeoutHandle_,n.animationDelayKey_,n.animationDelay_=function(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}.bind(n),n.coordinateToPixelTransform_=Si(),n.pixelToCoordinateTransform_=Si(),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 xi,n.interactions=i.interactions||new xi,n.overlays_=i.overlays,n.overlayIdIndex_={},n.renderer_=null,n.postRenderFunctions_=[],n.tileQueue_=new gq(n.getTilePriority.bind(n),n.handleTileChange_.bind(n)),n.addChangeListener(_i.LAYERGROUP,n.handleLayerGroupChanged_),n.addChangeListener(_i.VIEW,n.handleViewChanged_),n.addChangeListener(_i.SIZE,n.handleSizeChanged_),n.addChangeListener(_i.TARGET,n.handleTargetChanged_),n.setProperties(i.values);var a=n;return t.view&&!(t.view instanceof el)&&t.view.then(function(o){a.setView(new el(o))}),n.controls.addEventListener(si.ADD,function(o){o.element.setMap(this)}.bind(n)),n.controls.addEventListener(si.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.interactions.addEventListener(si.ADD,function(o){o.element.setMap(this)}.bind(n)),n.interactions.addEventListener(si.REMOVE,function(o){o.element.setMap(null)}.bind(n)),n.overlays_.addEventListener(si.ADD,function(o){this.addOverlayInternal_(o.element)}.bind(n)),n.overlays_.addEventListener(si.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){v8(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:ll,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 C0?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||ll;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:ll,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(_i.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 Fg(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())},e.prototype.getCoordinateFromPixelInternal=function(t){var n=this.frameState_;return n?bn(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(_i.LAYERGROUP)},e.prototype.setLayers=function(t){var n=this.getLayerGroup();if(t instanceof xi){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=Mn(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(n)},e.prototype.getPixelFromCoordinateInternal=function(t){var n=this.frameState_;return n?bn(n.coordinateToPixelTransform,t.slice(0,2)):null},e.prototype.getRenderer=function(){return this.renderer_},e.prototype.getSize=function(){return this.get(_i.SIZE)},e.prototype.getView=function(){return this.get(_i.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 vq(this.frameState_,t,n,i,a)},e.prototype.handleBrowserEvent=function(t,n){var i=n||t.type,a=new nu(i,this,t);this.handleMapBrowserEvent(a)},e.prototype.handleMapBrowserEvent=function(t){if(this.frameState_){var n=t.originalEvent,i=n.type;if(i===JA.POINTERDOWN||i===xe.WHEEL||i===xe.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[In.ANIMATING]||o[In.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(No.RENDERCOMPLETE)&&this.renderer_.dispatchRenderEvent(No.RENDERCOMPLETE,t),this.loaded_===!1&&(this.loaded_=!0,this.dispatchEvent(new Pp(XA.LOADEND,this,t)))):this.loaded_===!0&&(this.loaded_=!1,this.dispatchEvent(new Pp(XA.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)Yr(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(xe.CONTEXTMENU,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(xe.WHEEL,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,Hw(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 cq(this,this.moveTolerance_);for(var a in yr)this.mapBrowserEventHandler_.addEventListener(yr[a],this.handleMapBrowserEvent.bind(this));this.viewport_.addEventListener(xe.CONTEXTMENU,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(xe.WHEEL,this.boundHandleBrowserEvent_,xk?{passive:!1}:!1);var o=this.getOwnerDocument().defaultView,s=this.keyboardEventTarget_?this.keyboardEventTarget_:i;this.targetChangeHandlerKeys_=[je(s,xe.KEYDOWN,this.handleBrowserEvent,this),je(s,xe.KEYPRESS,this.handleBrowserEvent,this),je(o,xe.RESIZE,this.updateSize,this)]}this.updateSize()},e.prototype.handleTileChange_=function(){this.render()},e.prototype.handleViewPropertyChanged_=function(){this.render()},e.prototype.handleViewChanged_=function(){this.viewPropertyListenerKey_&&(Yr(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(Yr(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);var t=this.getView();t&&(this.updateViewportSize_(),this.viewPropertyListenerKey_=je(t,rd.PROPERTYCHANGE,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=je(t,xe.CHANGE,this.handleViewPropertyChanged_,this),t.resolveConstraints(0)),this.render()},e.prototype.handleLayerGroupChanged_=function(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(Yr),this.layerGroupPropertyListenerKeys_=null);var t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Sc("addlayer",t)),this.layerGroupPropertyListenerKeys_=[je(t,rd.PROPERTYCHANGE,this.render,this),je(t,xe.CHANGE,this.render,this),je(t,"addlayer",this.handleLayerAdd_,this),je(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){g8(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&&OP(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:Qf(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:Ee(this),renderTargets:{}},l.nextCenter&&l.nextResolution){var u=isNaN(l.nextRotation)?l.rotation:l.nextRotation;s.nextExtent=Qf(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_||!rv(this.previousExtent_)&&!gl(s.extent,this.previousExtent_);c&&(this.dispatchEvent(new Pp(XA.MOVESTART,this,o)),this.previousExtent_=Eh(this.previousExtent_))}var h=this.previousExtent_&&!s.viewHints[In.ANIMATING]&&!s.viewHints[In.INTERACTING]&&!gl(s.extent,this.previousExtent_);h&&(this.dispatchEvent(new Pp(XA.MOVEEND,this,s)),AF(s.extent,this.previousExtent_))}this.dispatchEvent(new Pp(XA.POSTRENDER,this,s)),this.renderComplete_=this.hasListener(XA.LOADSTART)||this.hasListener(XA.LOADEND)||this.hasListener(No.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 Sc("removelayer",n)),this.set(_i.LAYERGROUP,t)},e.prototype.setSize=function(t){this.set(_i.SIZE,t)},e.prototype.setTarget=function(t){this.set(_i.TARGET,t)},e.prototype.setView=function(t){if(!t||t instanceof el){this.set(_i.VIEW,t);return}this.set(_i.VIEW,new el);var n=this;t.then(function(i){n.setView(new el(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],!OP(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 x3(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 C0({layers:r.layers});t[_i.LAYERGROUP]=n,t[_i.TARGET]=r.target,t[_i.VIEW]=r.view instanceof el?r.view:new el;var i;r.controls!==void 0&&(Array.isArray(r.controls)?i=new xi(r.controls.slice()):(Le(typeof r.controls.getArray=="function",47),i=r.controls));var a;r.interactions!==void 0&&(Array.isArray(r.interactions)?a=new xi(r.interactions.slice()):(Le(typeof r.interactions.getArray=="function",48),a=r.interactions));var o;return r.overlays!==void 0?Array.isArray(r.overlays)?o=new xi(r.overlays.slice()):(Le(typeof r.overlays.getArray=="function",49),o=r.overlays):o=new xi,{controls:i,interactions:a,keyboardEventTarget:e,overlays:o,values:t}}var m8=S3,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)}}(),L3=function(r){I3(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(){Hw(this.element),r.prototype.disposeInternal.call(this)},e.prototype.getMap=function(){return this.map_},e.prototype.setMap=function(t){this.map_&&Hw(this.element);for(var n=0,i=this.listenerKeys.length;n<i;++n)Yr(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!==td&&this.listenerKeys.push(je(t,XA.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),Nr=L3,O3=Object.freeze(Object.defineProperty({__proto__:null,default:Nr},Symbol.toStringTag,{value:"Module"})),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)}}(),R3=function(r){F3(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(xe.CLICK,n.handleClick_.bind(n),!1);var h=a+" "+vl+" "+Bd+(n.collapsed_&&n.collapsible_?" "+kw:"")+(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(Qw(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,d=h.length;f<d;++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),!Fu(n,this.renderedAttributions_)){Xk(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(kw),this.collapsed_?Ig(this.collapseLabel_,this.label_):Ig(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}(Nr),y8=R3,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)}}(),N3=function(r){M3(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(xe.CLICK,n.handleClick_.bind(n),!1);var u=a+" "+vl+" "+Bd,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(k_),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:Hs}):n.setRotation(0))}},e.prototype.render=function(t){var n=t.frameState;if(n){var i=n.viewState.rotation;if(i!=this.rotation_){var a="rotate("+i+"rad)";if(this.autoHide_){var o=this.element.classList.contains(k_);!o&&i===0?this.element.classList.add(k_):o&&i!==0&&this.element.classList.remove(k_)}this.label_.style.transform=a}this.rotation_=i}},e}(Nr),_8=N3,P3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),U3=function(r){P3(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this;var a=i.className!==void 0?i.className:"ol-zoom",o=i.delta!==void 0?i.delta:1,s=i.zoomInClassName!==void 0?i.zoomInClassName:a+"-in",A=i.zoomOutClassName!==void 0?i.zoomOutClassName:a+"-out",l=i.zoomInLabel!==void 0?i.zoomInLabel:"+",u=i.zoomOutLabel!==void 0?i.zoomOutLabel:"",c=i.zoomInTipLabel!==void 0?i.zoomInTipLabel:"Zoom in",h=i.zoomOutTipLabel!==void 0?i.zoomOutTipLabel:"Zoom out",f=document.createElement("button");f.className=s,f.setAttribute("type","button"),f.title=c,f.appendChild(typeof l=="string"?document.createTextNode(l):l),f.addEventListener(xe.CLICK,n.handleClick_.bind(n,o),!1);var d=document.createElement("button");d.className=A,d.setAttribute("type","button"),d.title=h,d.appendChild(typeof u=="string"?document.createTextNode(u):u),d.addEventListener(xe.CLICK,n.handleClick_.bind(n,-o),!1);var g=a+" "+vl+" "+Bd,m=n.element;return m.className=g,m.appendChild(f),m.appendChild(d),n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleClick_=function(t,n){n.preventDefault(),this.zoomByDelta_(t)},e.prototype.zoomByDelta_=function(t){var n=this.getMap(),i=n.getView();if(i){var a=i.getZoom();if(a!==void 0){var o=i.getConstrainedZoom(a+t);this.duration_>0?(i.getAnimating()&&i.cancelAnimations(),i.animate({zoom:o,duration:this.duration_,easing:Hs})):i.setZoom(o)}}},e}(Nr),w8=U3,D3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),FP=["fullscreenchange","webkitfullscreenchange","MSFullscreenChange"],RP={ENTERFULLSCREEN:"enterfullscreen",LEAVEFULLSCREEN:"leavefullscreen"},Q3=function(r){D3(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this,n.on,n.once,n.un,n.keys_=i.keys!==void 0?i.keys:!1,n.source_=i.source,n.isInFullscreen_=!1,n.boundHandleMapTargetChange_=n.handleMapTargetChange_.bind(n),n.cssClassName_=i.className!==void 0?i.className:"ol-full-screen",n.documentListeners_=[],n.activeClassName_=i.activeClassName!==void 0?i.activeClassName.split(" "):[n.cssClassName_+"-true"],n.inactiveClassName_=i.inactiveClassName!==void 0?i.inactiveClassName.split(" "):[n.cssClassName_+"-false"];var a=i.label!==void 0?i.label:"⤢";n.labelNode_=typeof a=="string"?document.createTextNode(a):a;var o=i.labelActive!==void 0?i.labelActive:"×";n.labelActiveNode_=typeof o=="string"?document.createTextNode(o):o;var s=i.tipLabel?i.tipLabel:"Toggle full-screen";return n.button_=document.createElement("button"),n.button_.title=s,n.button_.setAttribute("type","button"),n.button_.appendChild(n.labelNode_),n.button_.addEventListener(xe.CLICK,n.handleClick_.bind(n),!1),n.setClassName_(n.button_,n.isInFullscreen_),n.element.className="".concat(n.cssClassName_," ").concat(vl," ").concat(Bd),n.element.appendChild(n.button_),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.handleFullScreen_()},e.prototype.handleFullScreen_=function(){var t=this.getMap();if(t){var n=t.getOwnerDocument();if(MP(n))if(NP(n))H3(n);else{var i=void 0;this.source_?i=typeof this.source_=="string"?n.getElementById(this.source_):this.source_:i=t.getTargetElement(),this.keys_?k3(i):E8(i)}}},e.prototype.handleFullScreenChange_=function(){var t=this.getMap();if(t){var n=this.isInFullscreen_;this.isInFullscreen_=NP(t.getOwnerDocument()),n!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(Ig(this.labelActiveNode_,this.labelNode_),this.dispatchEvent(RP.ENTERFULLSCREEN)):(Ig(this.labelNode_,this.labelActiveNode_),this.dispatchEvent(RP.LEAVEFULLSCREEN)),t.updateSize())}},e.prototype.setClassName_=function(t,n){var i,a,o,s;n?((i=t.classList).remove.apply(i,this.inactiveClassName_),(a=t.classList).add.apply(a,this.activeClassName_)):((o=t.classList).remove.apply(o,this.activeClassName_),(s=t.classList).add.apply(s,this.inactiveClassName_))},e.prototype.setMap=function(t){var n=this.getMap();n&&n.removeChangeListener(_i.TARGET,this.boundHandleMapTargetChange_),r.prototype.setMap.call(this,t),this.handleMapTargetChange_(),t&&t.addChangeListener(_i.TARGET,this.boundHandleMapTargetChange_)},e.prototype.handleMapTargetChange_=function(){for(var t=this.documentListeners_,n=0,i=t.length;n<i;++n)Yr(t[n]);t.length=0;var a=this.getMap();if(a){var o=a.getOwnerDocument();MP(o)?this.element.classList.remove(pP):this.element.classList.add(pP);for(var n=0,i=FP.length;n<i;++n)t.push(je(o,FP[n],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}},e}(Nr);function MP(r){var e=r.body;return!!(e.webkitRequestFullscreen||e.msRequestFullscreen&&r.msFullscreenEnabled||e.requestFullscreen&&r.fullscreenEnabled)}function NP(r){return!!(r.webkitIsFullScreen||r.msFullscreenElement||r.fullscreenElement)}function E8(r){r.requestFullscreen?r.requestFullscreen():r.msRequestFullscreen?r.msRequestFullscreen():r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}function k3(r){r.webkitRequestFullscreen?r.webkitRequestFullscreen():E8(r)}function H3(r){r.exitFullscreen?r.exitFullscreen():r.msExitFullscreen?r.msExitFullscreen():r.webkitExitFullscreen&&r.webkitExitFullscreen()}var G3=Q3,$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)}}(),Rb="projection",PP="coordinateFormat",V3=function(r){$3(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(Rb,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(PP)},e.prototype.getProjection=function(){return this.get(Rb)},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(je(n,JA.POINTERMOVE,this.handleMouseMove,this)),this.renderOnMouseOut_&&this.listenerKeys.push(je(n,JA.POINTEROUT,this.handleMouseOut,this)),this.updateHTML_(null)}},e.prototype.setCoordinateFormat=function(t){this.set(PP,t)},e.prototype.setProjection=function(t){this.set(Rb,Ve(t))},e.prototype.updateHTML_=function(t){var n=this.placeholder_;if(t&&this.mapProjection_){if(!this.transform_){var i=this.getProjection();i?this.transform_=id(this.mapProjection_,i):this.transform_=xC}var a=this.getMap(),o=a.getCoordinateFromPixelInternal(t);if(o){var s=ad();s&&(this.transform_=id(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}(Nr),j3=V3,Io={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"},K3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a 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={ELEMENT:"element",MAP:"map",OFFSET:"offset",POSITION:"position",POSITIONING:"positioning"},W3=function(r){K3(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 "+VX,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(Pa.ELEMENT,n.handleElementChanged),n.addChangeListener(Pa.MAP,n.handleMapChanged),n.addChangeListener(Pa.OFFSET,n.handleOffsetChanged),n.addChangeListener(Pa.POSITION,n.handlePositionChanged),n.addChangeListener(Pa.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:Io.TOP_LEFT),t.position!==void 0&&n.setPosition(t.position),n}return e.prototype.getElement=function(){return this.get(Pa.ELEMENT)},e.prototype.getId=function(){return this.id},e.prototype.getMap=function(){return this.get(Pa.MAP)||null},e.prototype.getOffset=function(){return this.get(Pa.OFFSET)},e.prototype.getPosition=function(){return this.get(Pa.POSITION)},e.prototype.getPositioning=function(){return this.get(Pa.POSITIONING)},e.prototype.handleElementChanged=function(){Xk(this.element);var t=this.getElement();t&&this.element.appendChild(t)},e.prototype.handleMapChanged=function(){this.mapPostrenderListenerKey&&(Hw(this.element),Yr(this.mapPostrenderListenerKey),this.mapPostrenderListenerKey=null);var t=this.getMap();if(t){this.mapPostrenderListenerKey=je(t,XA.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(Pa.ELEMENT,t)},e.prototype.setMap=function(t){this.set(Pa.MAP,t)},e.prototype.setOffset=function(t){this.set(Pa.OFFSET,t)},e.prototype.setPosition=function(t){this.set(Pa.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(Pa.POSITION))){var i=this.getRect(n.getTargetElement(),n.getSize()),a=this.getElement(),o=this.getRect(a,[KX(a),WX(a)]),s=t||{},A=s.margin===void 0?20:s.margin;if(!fs(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 d=n.getView().getCenterInternal(),g=n.getPixelFromCoordinateInternal(d);if(!g)return;var m=[g[0]+f[0],g[1]+f[1]],v=s.animation||{};n.getView().animateInternal({center:n.getCoordinateFromPixelInternal(m),duration:v.duration,easing:v.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(Pa.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==Io.BOTTOM_RIGHT||o==Io.CENTER_RIGHT||o==Io.TOP_RIGHT?l="-100%":(o==Io.BOTTOM_CENTER||o==Io.CENTER_CENTER||o==Io.TOP_CENTER)&&(l="-50%"),o==Io.BOTTOM_LEFT||o==Io.BOTTOM_CENTER||o==Io.BOTTOM_RIGHT?u="-100%":(o==Io.CENTER_LEFT||o==Io.CENTER_CENTER||o==Io.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),C8=W3,B8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Mb=.75,V_=.1,z3=function(r){B8(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createRenderer=function(){return new Jk(this)},e}(m8),Y3=function(r){B8(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(xe.CLICK,n.handleClick_.bind(n),!1),n.ovmapDiv_=document.createElement("div"),n.ovmapDiv_.className="ol-overviewmap-map",n.view_=i.view,n.ovmap_=new z3({view:i.view});var c=n.ovmap_;i.layers&&i.layers.forEach(function(O){c.addLayer(O)});var h=document.createElement("div");h.className="ol-overviewmap-box",h.style.boxSizing="border-box",n.boxOverlay_=new C8({position:[0,0],positioning:Io.CENTER_CENTER,element:h}),n.ovmap_.addOverlay(n.boxOverlay_);var f=a+" "+vl+" "+Bd+(n.collapsed_&&n.collapsible_?" "+kw:"")+(n.collapsible_?"":" ol-uncollapsible"),d=n.element;d.className=f,d.appendChild(n.ovmapDiv_),d.appendChild(u);var g=n,m=n.boxOverlay_,v=n.boxOverlay_.getElement(),y=function(O){return{clientX:O.clientX,clientY:O.clientY}},w=function(O){var F=y(O),I=c.getEventCoordinateInternal(F);m.setPosition(I)},C=function(O){var F=c.getEventCoordinateInternal(O);g.getMap().getView().setCenterInternal(F),window.removeEventListener("mousemove",w),window.removeEventListener("mouseup",C)};return v.addEventListener("mousedown",function(){window.addEventListener("mousemove",w),window.addEventListener("mouseup",C)}),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(je(t,rd.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===_i.VIEW){var n=t.oldValue;n&&this.unbindView_(n);var i=this.getMap().getView();this.bindView_(i)}else!this.ovmap_.isRendered()&&(t.key===_i.TARGET||t.key===_i.SIZE)&&this.ovmap_.updateSize()},e.prototype.bindView_=function(t){if(!this.view_){var n=new el({projection:t.getProjection()});this.ovmap_.setView(n)}t.addChangeListener(ls.ROTATION,this.boundHandleRotationChanged_),this.handleRotationChanged_()},e.prototype.unbindView_=function(t){t.removeChangeListener(ls.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_&&gl(o,this.viewExtent_))){this.viewExtent_=o;var s=n.getSize(),A=n.getView(),l=A.calculateExtentInternal(s),u=n.getPixelFromCoordinateInternal(BA(o)),c=n.getPixelFromCoordinateInternal(ev(o)),h=Math.abs(u[0]-c[0]),f=Math.abs(u[1]-c[1]),d=s[0],g=s[1];h<d*V_||f<g*V_||h>d*Mb||f>g*Mb?this.resetExtent_():fs(l,o)||this.recenter_()}}},e.prototype.resetExtent_=function(){var t=this.getMap(),n=this.ovmap_,i=t.getSize(),a=t.getView(),o=a.calculateExtentInternal(i),s=n.getView(),A=Math.log(Mb/V_)/Math.LN2,l=1/(Math.pow(2,A/2)*V_);Mk(o,l),s.fitInternal(hh(o))},e.prototype.recenter_=function(){var t=this.getMap(),n=this.ovmap_,i=t.getView(),a=n.getView();a.setCenterInternal(i.getCenterInternal())},e.prototype.updateBox_=function(){var t=this.getMap(),n=this.ovmap_;if(!(!t.isRendered()||!n.isRendered())){var i=t.getSize(),a=t.getView(),o=n.getView(),s=this.rotateWithView_?0:-a.getRotation(),A=this.boxOverlay_,l=this.boxOverlay_.getElement(),u=a.getCenterInternal(),c=a.getResolution(),h=o.getResolution(),f=i[0]*c/h,d=i[1]*c/h;if(A.setPosition(u),l){l.style.width=f+"px",l.style.height=d+"px";var g="rotate("+s+"rad)";l.style.transform=g}}},e.prototype.updateBoxAfterOvmapIsRendered_=function(){this.ovmapPostrenderKey_||(this.ovmapPostrenderKey_=Fy(this.ovmap_,XA.POSTRENDER,function(t){delete this.ovmapPostrenderKey_,this.updateBox_()},this))},e.prototype.handleClick_=function(t){t.preventDefault(),this.handleToggle_()},e.prototype.handleToggle_=function(){this.element.classList.toggle(kw),this.collapsed_?Ig(this.collapseLabel_,this.label_):Ig(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_;var t=this.ovmap_;if(!this.collapsed_){if(t.isRendered()){this.viewExtent_=void 0,t.render();return}t.updateSize(),this.resetExtent_(),this.updateBoxAfterOvmapIsRendered_()}},e.prototype.getCollapsible=function(){return this.collapsible_},e.prototype.setCollapsible=function(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),!t&&this.collapsed_&&this.handleToggle_())},e.prototype.setCollapsed=function(t){!this.collapsible_||this.collapsed_===t||this.handleToggle_()},e.prototype.getCollapsed=function(){return this.collapsed_},e.prototype.getRotateWithView=function(){return this.rotateWithView_},e.prototype.setRotateWithView=function(t){this.rotateWithView_!==t&&(this.rotateWithView_=t,this.getMap().getView().getRotation()!==0&&(this.rotateWithView_?this.handleRotationChanged_():this.ovmap_.getView().setRotation(0),this.viewExtent_=void 0,this.validateExtent_(),this.updateBox_()))},e.prototype.getOverviewMap=function(){return this.ovmap_},e.prototype.render=function(t){this.validateExtent_(),this.updateBox_()},e}(Nr),X3=Y3,q3=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Nb="units",of={DEGREES:"degrees",IMPERIAL:"imperial",NAUTICAL:"nautical",METRIC:"metric",US:"us"},Z3=[1,2,5],Pb=25.4/.28,J3=function(r){q3(e,r);function e(t){var n=this,i=t||{},a=i.className!==void 0?i.className:i.bar?"ol-scale-bar":"ol-scale-line";return n=r.call(this,{element:document.createElement("div"),render:i.render,target:i.target})||this,n.on,n.once,n.un,n.innerElement_=document.createElement("div"),n.innerElement_.className=a+"-inner",n.element.className=a+" "+vl,n.element.appendChild(n.innerElement_),n.viewState_=null,n.minWidth_=i.minWidth!==void 0?i.minWidth:64,n.renderedVisible_=!1,n.renderedWidth_=void 0,n.renderedHTML_="",n.addChangeListener(Nb,n.handleUnitsChanged_),n.setUnits(i.units||of.METRIC),n.scaleBar_=i.bar||!1,n.scaleBarSteps_=i.steps||4,n.scaleBarText_=i.text||!1,n.dpi_=i.dpi||void 0,n}return e.prototype.getUnits=function(){return this.get(Nb)},e.prototype.handleUnitsChanged_=function(){this.updateElement_()},e.prototype.setUnits=function(t){this.set(Nb,t)},e.prototype.setDpi=function(t){this.dpi_=t},e.prototype.updateElement_=function(){var t=this.viewState_;if(!t){this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1);return}var n=t.center,i=t.projection,a=this.getUnits(),o=a==of.DEGREES?ho.DEGREES:ho.METERS,s=Ww(i,t.resolution,n,o),A=this.minWidth_*(this.dpi_||Pb)/Pb,l=A*s,u="";if(a==of.DEGREES){var c=vA[ho.DEGREES];l*=c,l<c/60?(u="″",s*=3600):l<c?(u="",s*=60):u="°"}else a==of.IMPERIAL?l<.9144?(u="in",s/=.0254):l<1609.344?(u="ft",s/=.3048):(u="mi",s/=1609.344):a==of.NAUTICAL?(s/=1852,u="nm"):a==of.METRIC?l<.001?(u="μm",s*=1e6):l<1?(u="mm",s*=1e3):l<1e3?u="m":(u="km",s/=1e3):a==of.US?l<.9144?(u="in",s*=39.37):l<1609.344?(u="ft",s/=.30480061):(u="mi",s/=1609.3472):Le(!1,33);for(var h=3*Math.floor(Math.log(A*s)/Math.log(10)),f,d,g;;){g=Math.floor(h/3);var m=Math.pow(10,g);if(f=Z3[(h%3+3)%3]*m,d=Math.round(f/s),isNaN(d)){this.element.style.display="none",this.renderedVisible_=!1;return}else if(d>=A)break;++h}var v;this.scaleBar_?v=this.createScaleBar(d,f,u):v=f.toFixed(g<0?-g:0)+" "+u,this.renderedHTML_!=v&&(this.innerElement_.innerHTML=v,this.renderedHTML_=v),this.renderedWidth_!=d&&(this.innerElement_.style.width=d+"px",this.renderedWidth_=d),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)},e.prototype.createScaleBar=function(t,n,i){for(var a="1 : "+Math.round(this.getScaleForResolution()).toLocaleString(),o=[],s=t/this.scaleBarSteps_,A="#ffffff",l=0;l<this.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=Ww(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,ho.METERS),n=this.dpi_||Pb,i=1e3/25.4;return parseFloat(t.toString())*i*n},e.prototype.render=function(t){var n=t.frameState;n?this.viewState_=n.viewState:this.viewState_=null,this.updateElement_()},e}(Nr),tZ=J3,eZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),nm={VERTICAL:0,HORIZONTAL:1},rZ=function(r){eZ(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),render:i.render})||this,n.dragListenerKeys_=[],n.currentResolution_=void 0,n.direction_=nm.VERTICAL,n.dragging_,n.heightLimit_=0,n.widthLimit_=0,n.startX_,n.startY_,n.thumbSize_=null,n.sliderInitialized_=!1,n.duration_=i.duration!==void 0?i.duration:200;var a=i.className!==void 0?i.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=a+"-thumb "+vl;var s=n.element;return s.className=a+" "+vl+" "+Bd,s.appendChild(o),s.addEventListener(JA.POINTERDOWN,n.handleDraggerStart_.bind(n),!1),s.addEventListener(JA.POINTERMOVE,n.handleDraggerDrag_.bind(n),!1),s.addEventListener(JA.POINTERUP,n.handleDraggerEnd_.bind(n),!1),s.addEventListener(xe.CLICK,n.handleContainerClick_.bind(n),!1),o.addEventListener(xe.CLICK,SX,!1),n}return e.prototype.setMap=function(t){r.prototype.setMap.call(this,t),t&&t.render()},e.prototype.initSlider_=function(){var t=this.element,n=t.offsetWidth,i=t.offsetHeight;if(n===0&&i===0)return this.sliderInitialized_=!1;var a=getComputedStyle(t);n-=parseFloat(a.paddingRight)+parseFloat(a.paddingLeft),i-=parseFloat(a.paddingTop)+parseFloat(a.paddingBottom);var o=t.firstElementChild,s=getComputedStyle(o),A=o.offsetWidth+parseFloat(s.marginRight)+parseFloat(s.marginLeft),l=o.offsetHeight+parseFloat(s.marginTop)+parseFloat(s.marginBottom);return this.thumbSize_=[A,l],n>i?(this.direction_=nm.HORIZONTAL,this.widthLimit_=n-A):(this.direction_=nm.VERTICAL,this.heightLimit_=i-l),this.sliderInitialized_=!0},e.prototype.handleContainerClick_=function(t){var n=this.getMap().getView(),i=this.getRelativePosition_(t.offsetX-this.thumbSize_[0]/2,t.offsetY-this.thumbSize_[1]/2),a=this.getResolutionForPosition_(i),o=n.getConstrainedZoom(n.getZoomForResolution(a));n.animateInternal({zoom:o,duration:this.duration_,easing:Hs})},e.prototype.handleDraggerStart_=function(t){if(!this.dragging_&&t.target===this.element.firstElementChild){var n=this.element.firstElementChild;if(this.getMap().getView().beginInteraction(),this.startX_=t.clientX-parseFloat(n.style.left),this.startY_=t.clientY-parseFloat(n.style.top),this.dragging_=!0,this.dragListenerKeys_.length===0){var i=this.handleDraggerDrag_,a=this.handleDraggerEnd_,o=this.getMap().getOwnerDocument();this.dragListenerKeys_.push(je(o,JA.POINTERMOVE,i,this),je(o,JA.POINTERUP,a,this))}}},e.prototype.handleDraggerDrag_=function(t){if(this.dragging_){var n=t.clientX-this.startX_,i=t.clientY-this.startY_,a=this.getRelativePosition_(n,i);this.currentResolution_=this.getResolutionForPosition_(a),this.getMap().getView().setResolution(this.currentResolution_)}},e.prototype.handleDraggerEnd_=function(t){if(this.dragging_){var n=this.getMap().getView();n.endInteraction(),this.dragging_=!1,this.startX_=void 0,this.startY_=void 0,this.dragListenerKeys_.forEach(Yr),this.dragListenerKeys_.length=0}},e.prototype.setThumbPosition_=function(t){var n=this.getPositionForResolution_(t),i=this.element.firstElementChild;this.direction_==nm.HORIZONTAL?i.style.left=this.widthLimit_*n+"px":i.style.top=this.heightLimit_*n+"px"},e.prototype.getRelativePosition_=function(t,n){var i;return this.direction_===nm.HORIZONTAL?i=t/this.widthLimit_:i=n/this.heightLimit_,Un(i,0,1)},e.prototype.getResolutionForPosition_=function(t){var n=this.getMap().getView().getResolutionForValueFunction();return n(1-t)},e.prototype.getPositionForResolution_=function(t){var n=this.getMap().getView().getValueForResolutionFunction();return Un(1-n(t),0,1)},e.prototype.render=function(t){if(t.frameState&&!(!this.sliderInitialized_&&!this.initSlider_())){var n=t.frameState.viewState.resolution;this.currentResolution_=n,this.setThumbPosition_(n)}},e}(Nr),nZ=rZ,iZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),aZ=function(r){iZ(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{element:document.createElement("div"),target:i.target})||this,n.extent=i.extent?i.extent:null;var a=i.className!==void 0?i.className:"ol-zoom-extent",o=i.label!==void 0?i.label:"E",s=i.tipLabel!==void 0?i.tipLabel:"Fit to extent",A=document.createElement("button");A.setAttribute("type","button"),A.title=s,A.appendChild(typeof o=="string"?document.createTextNode(o):o),A.addEventListener(xe.CLICK,n.handleClick_.bind(n),!1);var l=a+" "+vl+" "+Bd,u=n.element;return u.className=l,u.appendChild(A),n}return e.prototype.handleClick_=function(t){t.preventDefault(),this.handleZoomToExtent()},e.prototype.handleZoomToExtent=function(){var t=this.getMap(),n=t.getView(),i=this.extent?this.extent:n.getProjection().getExtent();n.fitInternal(hh(i))},e}(Nr),oZ=aZ;function sZ(r){var e=r||{},t=new xi,n=e.zoom!==void 0?e.zoom:!0;n&&t.push(new w8(e.zoomOptions));var i=e.rotate!==void 0?e.rotate:!0;i&&t.push(new _8(e.rotateOptions));var a=e.attribution!==void 0?e.attribution:!0;return a&&t.push(new y8(e.attributionOptions)),t}var vx={ACTIVE:"active"},AZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),lZ=function(r){AZ(e,r);function e(t){var n=r.call(this)||this;return n.on,n.once,n.un,t&&t.handleEvent&&(n.handleEvent=t.handleEvent),n.map_=null,n.setActive(!0),n}return e.prototype.getActive=function(){return this.get(vx.ACTIVE)},e.prototype.getMap=function(){return this.map_},e.prototype.handleEvent=function(t){return!0},e.prototype.setActive=function(t){this.set(vx.ACTIVE,t)},e.prototype.setMap=function(t){this.map_=t},e}(Li);function uZ(r,e,t){var n=r.getCenterInternal();if(n){var i=[n[0]+e[0],n[1]+e[1]];r.animateInternal({duration:t!==void 0?t:250,easing:bF,center:r.getConstrainedCenter(i)})}}function NF(r,e,t,n){var i=r.getZoom();if(i!==void 0){var a=r.getConstrainedZoom(i+e),o=r.getResolutionForZoom(a);r.getAnimating()&&r.cancelAnimations(),r.animate({resolution:o,anchor:t,duration:n!==void 0?n:250,easing:Hs})}}var iv=lZ,cZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),hZ=function(r){cZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==yr.DBLCLICK){var i=t.originalEvent,a=t.map,o=t.coordinate,s=i.shiftKey?-this.delta_:this.delta_,A=a.getView();NF(A,s,o,this.duration_),i.preventDefault(),n=!0}return!n},e}(iv),fZ=hZ,dZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),pZ=function(r){dZ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,i.handleDownEvent&&(n.handleDownEvent=i.handleDownEvent),i.handleDragEvent&&(n.handleDragEvent=i.handleDragEvent),i.handleMoveEvent&&(n.handleMoveEvent=i.handleMoveEvent),i.handleUpEvent&&(n.handleUpEvent=i.handleUpEvent),i.stopDown&&(n.stopDown=i.stopDown),n.handlingDownUpSequence=!1,n.trackedPointers_={},n.targetPointers=[],n}return e.prototype.getPointerCount=function(){return this.targetPointers.length},e.prototype.handleDownEvent=function(t){return!1},e.prototype.handleDragEvent=function(t){},e.prototype.handleEvent=function(t){if(!t.originalEvent)return!0;var n=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==yr.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==yr.POINTERUP){var i=this.handleUpEvent(t);this.handlingDownUpSequence=i&&this.targetPointers.length>0}}else if(t.type==yr.POINTERDOWN){var a=this.handleDownEvent(t);this.handlingDownUpSequence=a,n=this.stopDown(a)}else t.type==yr.POINTERMOVE&&this.handleMoveEvent(t);return!n},e.prototype.handleMoveEvent=function(t){},e.prototype.handleUpEvent=function(t){return!1},e.prototype.stopDown=function(t){return t},e.prototype.updateTrackedPointers_=function(t){if(gZ(t)){var n=t.originalEvent,i=n.pointerId.toString();t.type==yr.POINTERUP?delete this.trackedPointers_[i]:t.type==yr.POINTERDOWN?this.trackedPointers_[i]=n:i in this.trackedPointers_&&(this.trackedPointers_[i]=n),this.targetPointers=fF(this.trackedPointers_)}},e}(iv);function PF(r){for(var e=r.length,t=0,n=0,i=0;i<e;i++)t+=r[i].clientX,n+=r[i].clientY;return[t/e,n/e]}function gZ(r){var e=r.type;return e===yr.POINTERDOWN||e===yr.POINTERDRAG||e===yr.POINTERUP}var ws=pZ;function Xw(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 b8=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},T8=function(r){var e=r.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},S8=function(r){var e=r.map.getTargetElement(),t=r.map.getOwnerDocument().activeElement;return e.contains(t)},UF=function(r){return r.map.getTargetElement().hasAttribute("tabindex")?S8(r):!0},MC=ll,vZ=function(r){return r.type==yr.CLICK},DF=function(r){var e=r.originalEvent;return e.button==0&&!(rX&&Sk&&e.ctrlKey)},mx=_d,mZ=function(r){return r.type=="pointermove"},NC=function(r){return r.type==yr.SINGLECLICK},yZ=function(r){return r.type==yr.DBLCLICK},PC=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},_Z=function(r){var e=r.originalEvent;return!e.altKey&&(Sk?e.metaKey:e.ctrlKey)&&!e.shiftKey},T0=function(r){var e=r.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},QF=function(r){var e=r.originalEvent,t=e.target.tagName;return t!=="INPUT"&&t!=="SELECT"&&t!=="TEXTAREA"},Hf=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.pointerType=="mouse"},wZ=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.pointerType==="touch"},EZ=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.pointerType==="pen"},kF=function(r){var e=r.originalEvent;return Le(e!==void 0,56),e.isPrimary&&e.button===0},CZ=Object.freeze(Object.defineProperty({__proto__:null,all:Xw,altKeyOnly:b8,altShiftKeysOnly:T8,focus:S8,focusWithTabindex:UF,always:MC,click:vZ,mouseActionButton:DF,never:mx,pointerMove:mZ,singleClick:NC,doubleClick:yZ,noModifierKeys:PC,platformModifierKeyOnly:_Z,shiftKeyOnly:T0,targetNotEditable:QF,mouseOnly:Hf,touchOnly:wZ,penOnly:EZ,primaryAction:kF},Symbol.toStringTag,{value:"Module"})),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)}}(),bZ=function(r){BZ(e,r);function e(t){var n=r.call(this,{stopDown:_d})||this,i=t||{};n.kinetic_=i.kinetic,n.lastCentroid=null,n.lastPointersCount_,n.panning_=!1;var a=i.condition?i.condition:Xw(PC,kF);return n.condition_=i.onFocusOnly?Xw(UF,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=PF(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();Kk(a,s.getResolution()),gF(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:Hs})}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}(ws),TZ=bZ,SZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),xZ=function(r){SZ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,{stopDown:_d})||this,n.condition_=i.condition?i.condition:T8,n.lastAngle_=void 0,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){if(Hf(t)){var n=t.map,i=n.getView();if(i.getConstraints().rotation!==CF){var a=n.getSize(),o=t.pixel,s=Math.atan2(a[1]/2-o[1],o[0]-a[0]/2);if(this.lastAngle_!==void 0){var A=s-this.lastAngle_;i.adjustRotationInternal(-A)}this.lastAngle_=s}}},e.prototype.handleUpEvent=function(t){if(!Hf(t))return!0;var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1},e.prototype.handleDownEvent=function(t){if(!Hf(t))return!1;if(DF(t)&&this.condition_(t)){var n=t.map;return n.getView().beginInteraction(),this.lastAngle_=void 0,!0}else return!1},e}(ws),IZ=xZ,LZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),OZ=function(r){LZ(e,r);function e(t){var n=r.call(this)||this;return n.geometry_=null,n.element_=document.createElement("div"),n.element_.style.position="absolute",n.element_.style.pointerEvents="auto",n.element_.className="ol-box "+t,n.map_=null,n.startPixel_=null,n.endPixel_=null,n}return e.prototype.disposeInternal=function(){this.setMap(null)},e.prototype.render_=function(){var t=this.startPixel_,n=this.endPixel_,i="px",a=this.element_.style;a.left=Math.min(t[0],n[0])+i,a.top=Math.min(t[1],n[1])+i,a.width=Math.abs(n[0]-t[0])+i,a.height=Math.abs(n[1]-t[1])+i},e.prototype.setMap=function(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);var n=this.element_.style;n.left="inherit",n.top="inherit",n.width="inherit",n.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)},e.prototype.setPixels=function(t,n){this.startPixel_=t,this.endPixel_=n,this.createOrUpdateGeometry(),this.render_()},e.prototype.createOrUpdateGeometry=function(){var t=this.startPixel_,n=this.endPixel_,i=[t,[t[0],n[1]],n,[n[0],t[1]]],a=i.map(this.map_.getCoordinateFromPixelInternal,this.map_);a[4]=a[0].slice(),this.geometry_?this.geometry_.setCoordinates([a]):this.geometry_=new Dn([a])},e.prototype.getGeometry=function(){return this.geometry_},e}(EC),FZ=OZ,x8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),j_={BOXSTART:"boxstart",BOXDRAG:"boxdrag",BOXEND:"boxend",BOXCANCEL:"boxcancel"},Ub=function(r){x8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.coordinate=n,a.mapBrowserEvent=i,a}return e}($o),RZ=function(r){x8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.box_=new FZ(i.className||"ol-dragbox"),n.minArea_=i.minArea!==void 0?i.minArea:64,i.onBoxEnd&&(n.onBoxEnd=i.onBoxEnd),n.startPixel_=null,n.condition_=i.condition?i.condition:DF,n.boxEndCondition_=i.boxEndCondition?i.boxEndCondition:n.defaultBoxEndCondition,n}return e.prototype.defaultBoxEndCondition=function(t,n,i){var a=i[0]-n[0],o=i[1]-n[1];return a*a+o*o>=this.minArea_},e.prototype.getGeometry=function(){return this.box_.getGeometry()},e.prototype.handleDragEvent=function(t){this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new Ub(j_.BOXDRAG,t.coordinate,t))},e.prototype.handleUpEvent=function(t){this.box_.setMap(null);var n=this.boxEndCondition_(t,this.startPixel_,t.pixel);return n&&this.onBoxEnd(t),this.dispatchEvent(new Ub(n?j_.BOXEND:j_.BOXCANCEL,t.coordinate,t)),!1},e.prototype.handleDownEvent=function(t){return this.condition_(t)?(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new Ub(j_.BOXSTART,t.coordinate,t)),!0):!1},e.prototype.onBoxEnd=function(t){},e}(ws),MZ=RZ,NZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),PZ=function(r){NZ(e,r);function e(t){var n=this,i=t||{},a=i.condition?i.condition:T0;return n=r.call(this,{condition:a,className:i.className||"ol-dragzoom",minArea:i.minArea})||this,n.duration_=i.duration!==void 0?i.duration:200,n.out_=i.out!==void 0?i.out:!1,n}return e.prototype.onBoxEnd=function(t){var n=this.getMap(),i=n.getView(),a=this.getGeometry();if(this.out_){var o=i.rotatedExtentForGeometry(a),s=i.getResolutionForExtentInternal(o),A=i.getResolution()/s;a=a.clone(),a.scale(A*A)}i.fitInternal(a,{duration:this.duration_,easing:Hs})},e}(MZ),UZ=PZ,sf={LEFT:37,UP:38,RIGHT:39,DOWN:40},DZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),QZ=function(r){DZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.defaultCondition_=function(a){return PC(a)&&QF(a)},n.condition_=i.condition!==void 0?i.condition:n.defaultCondition_,n.duration_=i.duration!==void 0?i.duration:100,n.pixelDelta_=i.pixelDelta!==void 0?i.pixelDelta:128,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==xe.KEYDOWN){var i=t.originalEvent,a=i.keyCode;if(this.condition_(t)&&(a==sf.DOWN||a==sf.LEFT||a==sf.RIGHT||a==sf.UP)){var o=t.map,s=o.getView(),A=s.getResolution()*this.pixelDelta_,l=0,u=0;a==sf.DOWN?u=-A:a==sf.LEFT?l=-A:a==sf.RIGHT?l=A:u=A;var c=[l,u];gF(c,s.getRotation()),uZ(s,c,this.duration_),i.preventDefault(),n=!0}}return!n},e}(iv),kZ=QZ,HZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),GZ=function(r){HZ(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.condition_=i.condition?i.condition:QF,n.delta_=i.delta?i.delta:1,n.duration_=i.duration!==void 0?i.duration:100,n}return e.prototype.handleEvent=function(t){var n=!1;if(t.type==xe.KEYDOWN||t.type==xe.KEYPRESS){var i=t.originalEvent,a=i.charCode;if(this.condition_(t)&&(a=="+".charCodeAt(0)||a=="-".charCodeAt(0))){var o=t.map,s=a=="+".charCodeAt(0)?this.delta_:-this.delta_,A=o.getView();NF(A,s,void 0,this.duration_),i.preventDefault(),n=!0}}return!n},e}(iv),$Z=GZ,VZ=function(){function r(e,t,n){this.decay_=e,this.minVelocity_=t,this.delay_=n,this.points_=[],this.angle_=0,this.initialVelocity_=0}return r.prototype.begin=function(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0},r.prototype.update=function(e,t){this.points_.push(e,t,Date.now())},r.prototype.end=function(){if(this.points_.length<6)return!1;var e=Date.now()-this.delay_,t=this.points_.length-3;if(this.points_[t+2]<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}(),jZ=VZ,KZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Db={TRACKPAD:"trackpad",WHEEL:"wheel"},WZ=function(r){KZ(e,r);function e(t){var n=this,i=t||{};n=r.call(this,i)||this,n.totalDelta_=0,n.lastDelta_=0,n.maxDelta_=i.maxDelta!==void 0?i.maxDelta:1,n.duration_=i.duration!==void 0?i.duration:250,n.timeout_=i.timeout!==void 0?i.timeout:80,n.useAnchor_=i.useAnchor!==void 0?i.useAnchor:!0,n.constrainResolution_=i.constrainResolution!==void 0?i.constrainResolution:!1;var a=i.condition?i.condition:MC;return n.condition_=i.onFocusOnly?Xw(UF,a):a,n.lastAnchor_=null,n.startTime_=void 0,n.timeoutId_,n.mode_=void 0,n.trackpadEventGap_=400,n.trackpadTimeoutId_,n.deltaPerZoom_=300,n}return e.prototype.endInteraction_=function(){this.trackpadTimeoutId_=void 0;var t=this.getMap().getView();t.endInteraction(void 0,this.lastDelta_?this.lastDelta_>0?1:-1:0,this.lastAnchor_)},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var n=t.type;if(n!==xe.WHEEL)return!0;var i=t.map,a=t.originalEvent;a.preventDefault(),this.useAnchor_&&(this.lastAnchor_=t.coordinate);var o;if(t.type==xe.WHEEL&&(o=a.deltaY,JY&&a.deltaMode===WheelEvent.DOM_DELTA_PIXEL&&(o/=ed),a.deltaMode===WheelEvent.DOM_DELTA_LINE&&(o*=40)),o===0)return!1;this.lastDelta_=o;var s=Date.now();this.startTime_===void 0&&(this.startTime_=s),(!this.mode_||s-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(o)<4?Db.TRACKPAD:Db.WHEEL);var A=i.getView();if(this.mode_===Db.TRACKPAD&&!(A.getConstrainResolution()||this.constrainResolution_))return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(A.getAnimating()&&A.cancelAnimations(),A.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),A.adjustZoom(-o/this.deltaPerZoom_,this.lastAnchor_),this.startTime_=s,!1;this.totalDelta_+=o;var l=Math.max(this.timeout_-(s-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,i),l),!1},e.prototype.handleWheelZoom_=function(t){var n=t.getView();n.getAnimating()&&n.cancelAnimations();var i=-Un(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(n.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),NF(n,i,this.lastAnchor_,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0},e.prototype.setMouseAnchor=function(t){this.useAnchor_=t,t||(this.lastAnchor_=null)},e}(iv),zZ=WZ,YZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),XZ=function(r){YZ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=_d),n=r.call(this,a)||this,n.anchor_=null,n.lastAngle_=void 0,n.rotating_=!1,n.rotationDelta_=0,n.threshold_=i.threshold!==void 0?i.threshold:.3,n.duration_=i.duration!==void 0?i.duration:250,n}return e.prototype.handleDragEvent=function(t){var n=0,i=this.targetPointers[0],a=this.targetPointers[1],o=Math.atan2(a.clientY-i.clientY,a.clientX-i.clientX);if(this.lastAngle_!==void 0){var s=o-this.lastAngle_;this.rotationDelta_+=s,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),n=s}this.lastAngle_=o;var A=t.map,l=A.getView();if(l.getConstraints().rotation!==CF){var u=A.getViewport().getBoundingClientRect(),c=PF(this.targetPointers);c[0]-=u.left,c[1]-=u.top,this.anchor_=A.getCoordinateFromPixelInternal(c),this.rotating_&&(A.render(),l.adjustRotationInternal(n,this.anchor_))}},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView();return i.endInteraction(this.duration_),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(ws),qZ=XZ,ZZ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),JZ=function(r){ZZ(e,r);function e(t){var n=this,i=t||{},a=i;return a.stopDown||(a.stopDown=_d),n=r.call(this,a)||this,n.anchor_=null,n.duration_=i.duration!==void 0?i.duration:400,n.lastDistance_=void 0,n.lastScaleDelta_=1,n}return e.prototype.handleDragEvent=function(t){var n=1,i=this.targetPointers[0],a=this.targetPointers[1],o=i.clientX-a.clientX,s=i.clientY-a.clientY,A=Math.sqrt(o*o+s*s);this.lastDistance_!==void 0&&(n=this.lastDistance_/A),this.lastDistance_=A;var l=t.map,u=l.getView();n!=1&&(this.lastScaleDelta_=n);var c=l.getViewport().getBoundingClientRect(),h=PF(this.targetPointers);h[0]-=c.left,h[1]-=c.top,this.anchor_=l.getCoordinateFromPixelInternal(h),l.render(),u.adjustResolutionInternal(n,this.anchor_)},e.prototype.handleUpEvent=function(t){if(this.targetPointers.length<2){var n=t.map,i=n.getView(),a=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,a),!1}else return!0},e.prototype.handleDownEvent=function(t){if(this.targetPointers.length>=2){var n=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||n.getView().beginInteraction(),!0}else return!1},e}(ws),tJ=JZ,hA={ARRAY_BUFFER:"arraybuffer",JSON:"json",TEXT:"text",XML:"xml"},eJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rJ=function(r){eJ(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.condition_=i.condition?i.condition:T0,n.lastAngle_=void 0,n.lastMagnitude_=void 0,n.lastScaleDelta_=0,n.duration_=i.duration!==void 0?i.duration:400,n}return e.prototype.handleDragEvent=function(t){if(Hf(t)){var n=t.map,i=n.getSize(),a=t.pixel,o=a[0]-i[0]/2,s=i[1]/2-a[1],A=Math.atan2(s,o),l=Math.sqrt(o*o+s*s),u=n.getView();if(this.lastAngle_!==void 0){var c=this.lastAngle_-A;u.adjustRotationInternal(c)}this.lastAngle_=A,this.lastMagnitude_!==void 0&&u.adjustResolutionInternal(this.lastMagnitude_/l),this.lastMagnitude_!==void 0&&(this.lastScaleDelta_=this.lastMagnitude_/l),this.lastMagnitude_=l}},e.prototype.handleUpEvent=function(t){if(!Hf(t))return!0;var n=t.map,i=n.getView(),a=this.lastScaleDelta_>1?1:-1;return i.endInteraction(this.duration_,a),this.lastScaleDelta_=0,!1},e.prototype.handleDownEvent=function(t){return Hf(t)&&this.condition_(t)?(t.map.getView().beginInteraction(),this.lastAngle_=void 0,this.lastMagnitude_=void 0,!0):!1},e}(ws),nJ=rJ,iJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),I8=function(r){iJ(e,r);function e(t,n,i){var a=r.call(this)||this;if(i!==void 0&&n===void 0)a.setFlatCoordinates(i,t);else{var o=n||0;a.setCenterAndRadius(t,o,i)}return a}return e.prototype.clone=function(){var t=new e(this.flatCoordinates.slice(),void 0,this.layout);return t.applyProperties(this),t},e.prototype.closestPointXY=function(t,n,i,a){var o=this.flatCoordinates,s=t-o[0],A=n-o[1],l=s*s+A*A;if(l<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 ko(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 pt.CIRCLE},e.prototype.intersectsExtent=function(t){var n=this.getExtent();if(Xn(t,n)){var i=this.getCenter();return t[0]<=i[0]&&t[2]>=i[0]||t[1]<=i[1]&&t[3]>=i[1]?!0:SC(t,this.intersectsCoordinate.bind(this))}return!1},e.prototype.setCenter=function(t){var n=this.stride,i=this.flatCoordinates[n]-this.flatCoordinates[0],a=t.slice();a[n]=a[0]+i;for(var o=1;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=o8(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(TF(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(a8(i,0,i.length,a,t,n,i)),this.changed()},e}(mA);I8.prototype.transform;var HF=I8,aJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),oJ=function(r){aJ(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_&&(Yr(this.geometryChangeKey_),this.geometryChangeKey_=null);var t=this.getGeometry();t&&(this.geometryChangeKey_=je(t,xe.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?sJ(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 sJ(r){if(typeof r=="function")return r;var e;if(Array.isArray(r))e=r;else{Le(typeof r.getZIndex=="function",41);var t=r;e=[t]}return function(){return e}}var _r=oJ;function qw(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],d=e+n;d<t;d+=n){var g=r[d],m=r[d+1];h+=Math.sqrt((g-u)*(g-u)+(m-c)*(m-c)),f.push(h),u=g,c=m}var v=i*h,y=zY(f,v);y<0?(A=(v-f[-y-2])/(f[-y-1]-f[-y-2]),s=e+(-y-2)*n):s=e+y*n}for(var w=o>1?o:2,C=a||new Array(w),d=0;d<w;++d)C[d]=s===void 0?NaN:A===void 0?r[s+d]:au(r[s+d],r[s+n+d],A);return C}function yx(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(au(r[(s-1)*n+f],r[s*n+f],h));return o.push(i),o}function AJ(r,e,t,n,i,a,o){if(o)return yx(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 yx(r,e,u,n,i,!1);e=u}}return null}function L8(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 lJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),uJ=function(r){lJ(e,r);function e(t,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?tn(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<wh(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(SF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),IF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.forEachSegment=function(t){return c8(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)},e.prototype.getCoordinateAtM=function(t,n){if(this.layout!=ae.XYM&&this.layout!=ae.XYZM)return null;var i=n!==void 0?n:!1;return yx(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,i)},e.prototype.getCoordinates=function(){return Au(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)},e.prototype.getCoordinateAt=function(t,n){return qw(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,this.stride)},e.prototype.getLength=function(){return L8(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=FF(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,n,0),new e(n,ae.XY)},e.prototype.getType=function(){return pt.LINE_STRING},e.prototype.intersectsExtent=function(t){return OC(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=b0(this.flatCoordinates,0,t,this.stride),this.changed()},e}(mA),en=uJ,cJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),hJ=function(r){cJ(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()),tn(A,h.getFlatCoordinates()),l.push(A.length)}a.setFlatCoordinates(o,A),a.ends_=l}return a}return e.prototype.appendLineString=function(t){this.flatCoordinates?tn(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<wh(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(xF(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),LF(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,n,i,a))},e.prototype.getCoordinateAtM=function(t,n,i){if(this.layout!=ae.XYM&&this.layout!=ae.XYZM||this.flatCoordinates.length===0)return null;var a=n!==void 0?n:!1,o=i!==void 0?i:!1;return AJ(this.flatCoordinates,0,this.ends_,this.stride,t,a,o)},e.prototype.getCoordinates=function(){return ky(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 en(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 en(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=qw(n,i,l,o,.5);tn(t,u),i=l}return t},e.prototype.getSimplifiedGeometryInternal=function(t){var n=[],i=[];return n.length=e3(this.flatCoordinates,0,this.ends_,this.stride,t,n,0,i),new e(n,ae.XY,i)},e.prototype.getType=function(){return pt.MULTI_LINE_STRING},e.prototype.intersectsExtent=function(t){return c3(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=OF(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=i.length===0?0:i[i.length-1],this.changed()},e}(mA),Xa=hJ,fJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dJ=function(r){fJ(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?tn(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<wh(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=kf(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 Au(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 xr(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 xr(t.slice(o,o+i),n);a.push(A)}return a},e.prototype.getType=function(){return pt.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(bC(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=b0(this.flatCoordinates,0,t,this.stride),this.changed()},e}(mA),Gs=dJ;function O8(r,e,t,n){for(var i=[],a=Ui(),o=0,s=t.length;o<s;++o){var A=t[o];a=TC(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 pJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gJ=function(r){pJ(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,d=h.getEnds(),g=0,m=d.length;g<m;++g)d[g]+=f;tn(A,h.getFlatCoordinates()),l.push(d)}n=o,t=A,i=l}return n!==void 0&&i?(a.setFlatCoordinates(n,t),a.endss_=i):a.setCoordinates(t,n),a}return e.prototype.appendPolygon=function(t){var n;if(!this.flatCoordinates)this.flatCoordinates=t.getFlatCoordinates().slice(),n=t.getEnds().slice(),this.endss_.push();else{var i=this.flatCoordinates.length;tn(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<wh(this.getExtent(),t,n)?a:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Zq(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Jq(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,!0,t,n,i,a))},e.prototype.containsXY=function(t,n){return u3(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,n)},e.prototype.getArea=function(){return i3(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)},e.prototype.getCoordinates=function(t){var n;return t!==void 0?(n=this.getOrientedFlatCoordinates().slice(),IP(n,0,this.endss_,this.stride,t)):n=this.flatCoordinates,px(n,0,this.endss_,this.stride)},e.prototype.getEndss=function(){return this.endss_},e.prototype.getFlatInteriorPoints=function(){if(this.flatInteriorPointsRevision_!=this.getRevision()){var t=O8(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=u8(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_},e.prototype.getInteriorPoints=function(){return new Gs(this.getFlatInteriorPoints().slice(),ae.XYM)},e.prototype.getOrientedFlatCoordinates=function(){if(this.orientedRevision_!=this.getRevision()){var t=this.flatCoordinates;p3(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=IP(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=n3(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),n,0,i),new e(n,ae.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 Dn(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 Dn(n.slice(o,u),t,l);a.push(f),o=u}return a},e.prototype.getType=function(){return pt.MULTI_POLYGON},e.prototype.intersectsExtent=function(t){return f3(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=t3(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}(mA),qa=gJ;function vJ(r,e,t,n,i){F8(r,e,t||0,n||r.length-1,i||mJ)}function F8(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));F8(r,e,u,c,i)}var h=r[e],f=t,d=n;for(im(r,t,e),i(r[n],h)>0&&im(r,t,n);f<d;){for(im(r,f,d),f++,d--;i(r[f],h)<0;)f++;for(;i(r[d],h)>0;)d--}i(r[t],h)===0?im(r,t,d):(d++,im(r,d,n)),d<=e&&(t=d+1),e<=d&&(n=d-1)}}function im(r,e,t){var n=r[e];r[e]=r[t],r[t]=n}function mJ(r,e){return r<e?-1:r>e?1:0}class R8{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let t=this.data;const n=[];if(!W_(e,t))return n;const i=this.toBBox,a=[];for(;t;){for(let o=0;o<t.children.length;o++){const s=t.children[o],A=t.leaf?i(s):s;W_(e,A)&&(t.leaf?n.push(s):kb(e,A)?this._all(s,n):a.push(s))}t=a.pop()}return n}collides(e){let t=this.data;if(!W_(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(W_(e,o)){if(t.leaf||kb(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=Up([]),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=yJ(e,n.children,t);if(u!==-1)return n.children.splice(u,1),a.push(n),this._condense(a),this}!l&&!n.leaf&&kb(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=Up(e.slice(t,n+1)),pp(s,this.toBBox),s;i||(i=Math.ceil(Math.log(a)/Math.log(o)),o=Math.ceil(a/Math.pow(o,i-1))),s=Up([]),s.leaf=!1,s.height=i;const A=Math.ceil(a/o),l=A*Math.ceil(Math.sqrt(o));UP(e,t,n,l,this.compareMinX);for(let u=t;u<=n;u+=l){const c=Math.min(u+l-1,n);UP(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 pp(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=Qb(l),c=EJ(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),Om(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=Up(n.children.splice(o,n.children.length-o));s.height=n.height,s.leaf=n.leaf,pp(n,this.toBBox),pp(s,this.toBBox),t?e[t-1].children.push(s):this._splitRoot(n,s)}_splitRoot(e,t){this.data=Up([e,t]),this.data.height=e.height+1,this.data.leaf=!1,pp(this.data,this.toBBox)}_chooseSplitIndex(e,t,n){let i,a=1/0,o=1/0;for(let s=t;s<=n-t;s++){const A=Lm(e,0,s,this.toBBox),l=Lm(e,s,n,this.toBBox),u=CJ(A,l),c=Qb(A)+Qb(l);u<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:_J,a=e.leaf?this.compareMinY:wJ,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=Lm(e,0,t,a),s=Lm(e,n-t,n,a);let A=K_(o)+K_(s);for(let l=t;l<n-t;l++){const u=e.children[l];Om(o,e.leaf?a(u):u),A+=K_(o)}for(let l=n-t-1;l>=t;l--){const u=e.children[l];Om(s,e.leaf?a(u):u),A+=K_(s)}return A}_adjustParentBBoxes(e,t,n){for(let i=n;i>=0;i--)Om(t[i],e)}_condense(e){for(let t=e.length-1,n;t>=0;t--)e[t].children.length===0?t>0?(n=e[t-1].children,n.splice(n.indexOf(e[t]),1)):this.clear():pp(e[t],this.toBBox)}}function yJ(r,e,t){if(!t)return e.indexOf(r);for(let n=0;n<e.length;n++)if(t(r,e[n]))return n;return-1}function pp(r,e){Lm(r,0,r.children.length,e,r)}function Lm(r,e,t,n,i){i||(i=Up(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];Om(i,r.leaf?n(o):o)}return i}function Om(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 _J(r,e){return r.minX-e.minX}function wJ(r,e){return r.minY-e.minY}function Qb(r){return(r.maxX-r.minX)*(r.maxY-r.minY)}function K_(r){return r.maxX-r.minX+(r.maxY-r.minY)}function EJ(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 CJ(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 kb(r,e){return r.minX<=e.minX&&r.minY<=e.minY&&e.maxX<=r.maxX&&e.maxY<=r.maxY}function W_(r,e){return e.minX<=r.maxX&&e.minY<=r.maxY&&e.maxX>=r.minX&&e.maxY>=r.minY}function Up(r){return{children:r,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function UP(r,e,t,n,i){const a=[e,t];for(;a.length;){if(t=a.pop(),e=a.pop(),t-e<=n)continue;const o=e+Math.ceil((t-e)/n/2)*n;vJ(r,o,e,t,i),a.push(e,o,o,t)}}var rr={IDLE:0,LOADING:1,LOADED:2,ERROR:3,EMPTY:4},BJ=function(){function r(e){this.opacity_=e.opacity,this.rotateWithView_=e.rotateWithView,this.rotation_=e.rotation,this.scale_=e.scale,this.scaleArray_=Wi(e.scale),this.displacement_=e.displacement}return r.prototype.clone=function(){var e=this.getScale();return new r({opacity:this.getOpacity(),scale:Array.isArray(e)?e.slice():e,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice()})},r.prototype.getOpacity=function(){return this.opacity_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getDisplacement=function(){return this.displacement_},r.prototype.getAnchor=function(){return Re()},r.prototype.getImage=function(e){return Re()},r.prototype.getHitDetectionImage=function(){return Re()},r.prototype.getPixelRatio=function(e){return 1},r.prototype.getImageState=function(){return Re()},r.prototype.getImageSize=function(){return Re()},r.prototype.getOrigin=function(){return Re()},r.prototype.getSize=function(){return Re()},r.prototype.setDisplacement=function(e){this.displacement_=e},r.prototype.setOpacity=function(e){this.opacity_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=Wi(e)},r.prototype.listenImageChange=function(e){Re()},r.prototype.load=function(){Re()},r.prototype.unlistenImageChange=function(e){Re()},r}(),M8=BJ;function nl(r){return Array.isArray(r)?Gk(r):r}var bJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),TJ=function(r){bJ(e,r);function e(t){var n=this,i=t.rotateWithView!==void 0?t.rotateWithView:!1;return n=r.call(this,{opacity:1,rotateWithView:i,rotation:t.rotation!==void 0?t.rotation:0,scale:t.scale!==void 0?t.scale:1,displacement:t.displacement!==void 0?t.displacement:[0,0]})||this,n.canvas_=void 0,n.hitDetectionCanvas_=null,n.fill_=t.fill!==void 0?t.fill:null,n.origin_=[0,0],n.points_=t.points,n.radius_=t.radius!==void 0?t.radius:t.radius1,n.radius2_=t.radius2,n.angle_=t.angle!==void 0?t.angle:0,n.stroke_=t.stroke!==void 0?t.stroke:null,n.size_=null,n.renderOptions_=null,n.render(),n}return e.prototype.clone=function(){var t=this.getScale(),n=new e({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice()});return n.setOpacity(this.getOpacity()),n},e.prototype.getAnchor=function(){var t=this.size_;if(!t)return null;var n=this.getDisplacement();return[t[0]/2-n[0],t[1]/2+n[1]]},e.prototype.getAngle=function(){return this.angle_},e.prototype.getFill=function(){return this.fill_},e.prototype.getHitDetectionImage=function(){return this.hitDetectionCanvas_||this.createHitDetectionCanvas_(this.renderOptions_),this.hitDetectionCanvas_},e.prototype.getImage=function(t){var n=this.canvas_[t];if(!n){var i=this.renderOptions_,a=wo(i.size*t,i.size*t);this.draw_(i,a,t),n=a.canvas,this.canvas_[t]=n}return n},e.prototype.getPixelRatio=function(t){return t},e.prototype.getImageSize=function(){return this.size_},e.prototype.getImageState=function(){return rr.LOADED},e.prototype.getOrigin=function(){return this.origin_},e.prototype.getPoints=function(){return this.points_},e.prototype.getRadius=function(){return this.radius_},e.prototype.getRadius2=function(){return this.radius2_},e.prototype.getSize=function(){return this.size_},e.prototype.getStroke=function(){return this.stroke_},e.prototype.listenImageChange=function(t){},e.prototype.load=function(){},e.prototype.unlistenImageChange=function(t){},e.prototype.calculateLineJoinSize_=function(t,n,i){if(n===0||this.points_===1/0||t!=="bevel"&&t!=="miter")return n;var a=this.radius_,o=this.radius2_===void 0?a:this.radius2_;if(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),d=f/u;if(t==="miter"&&d<=i)return d*n;var g=n/2/d,m=n/2*(h/f),v=Math.sqrt((a+g)*(a+g)+m*m),y=v-a;if(this.radius2_===void 0||t==="bevel")return y*2;var w=a*Math.sin(l),C=Math.sqrt(a*a-w*w),O=o-C,F=Math.sqrt(w*w+O*O),I=F/w;if(I<=i){var T=I*n/2-o-a;return 2*Math.max(y,T)}return y*2},e.prototype.createRenderOptions=function(){var t=Lg,n=0,i=null,a=0,o,s=0;this.stroke_&&(o=this.stroke_.getColor(),o===null&&(o=Py),o=nl(o),s=this.stroke_.getWidth(),s===void 0&&(s=Dy),i=this.stroke_.getLineDash(),a=this.stroke_.getLineDashOffset(),t=this.stroke_.getLineJoin(),t===void 0&&(t=Lg),n=this.stroke_.getMiterLimit(),n===void 0&&(n=Ny));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=pu),n.fillStyle=nl(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=uh(n)),n===null?i=1:Array.isArray(n)&&(i=n.length===4?n[3]:1),i===0){var a=wo(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=pu,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}(M8),tw=TJ,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){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}(tw),S0=xJ,IJ=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}(),Ba=IJ,LJ=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}(),zi=LJ,Yp=function(){function r(e){var t=e||{};this.geometry_=null,this.geometryFunction_=DP,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_=DP,this.geometry_=e},r.prototype.setZIndex=function(e){this.zIndex_=e},r}();function OJ(r){var e;if(typeof r=="function")e=r;else{var t;if(Array.isArray(r))t=r;else{Le(typeof r.getZIndex=="function",41);var n=r;t=[n]}e=function(){return t}}return e}var Hb=null;function FJ(r,e){if(!Hb){var t=new Ba({color:"rgba(255,255,255,0.4)"}),n=new zi({color:"#3399CC",width:1.25});Hb=[new Yp({image:new S0({fill:t,stroke:n,radius:5}),fill:t,stroke:n})]}return Hb}function GF(){var r={},e=[255,255,255,1],t=[0,153,255,1],n=3;return r[pt.POLYGON]=[new Yp({fill:new Ba({color:[255,255,255,.5]})})],r[pt.MULTI_POLYGON]=r[pt.POLYGON],r[pt.LINE_STRING]=[new Yp({stroke:new zi({color:e,width:n+2})}),new Yp({stroke:new zi({color:t,width:n})})],r[pt.MULTI_LINE_STRING]=r[pt.LINE_STRING],r[pt.CIRCLE]=r[pt.POLYGON].concat(r[pt.LINE_STRING]),r[pt.POINT]=[new Yp({image:new S0({radius:n*2,fill:new Ba({color:t}),stroke:new zi({color:e,width:n/2})}),zIndex:1/0})],r[pt.MULTI_POINT]=r[pt.POINT],r[pt.GEOMETRY_COLLECTION]=r[pt.POLYGON].concat(r[pt.LINE_STRING],r[pt.POINT]),r}function DP(r){return r.getGeometry()}var Ea=Yp,RJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),QP={RENDER_ORDER:"renderOrder"},MJ=function(r){RJ(e,r);function e(t){var n=this,i=t||{},a=Ce({},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(QP.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 R8(9)),this.getRenderer().renderDeclutter(t)},e.prototype.setRenderOrder=function(t){this.set(QP.RENDER_ORDER,t)},e.prototype.setStyle=function(t){this.style_=t!==void 0?t:FJ,this.styleFunction_=t===null?void 0:OJ(this.style_),this.changed()},e}(Cd),UC=MJ,x0={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},z_=[x0.FILL],Pc=[x0.STROKE],xf=[x0.BEGIN_PATH],kP=[x0.CLOSE_PATH],ze=x0,NJ=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}(),N8=NJ,PJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),UJ=function(r){PJ(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],gA(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_,d=!0,g,m,v;for(g=n+a;g<i;g+=a)f[0]=t[g],f[1]=t[g+1],v=Uw(u,f),v!==m?(d&&(A[l++]=c,A[l++]=h,d=!1),A[l++]=f[0],A[l++]=f[1]):v===aa.INTERSECTING?(A[l++]=f[0],A[l++]=f[1],d=!1):d=!0,c=f[0],h=f[1],m=v;return(o&&d||g===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 pt.MULTI_POLYGON:l=t.getOrientedFlatCoordinates(),h=[];var d=t.getEndss();f=0;for(var g=0,m=d.length;g<m;++g){var v=[];f=this.drawCustomCoordinates_(l,f,d[g],s,v),h.push(v)}this.instructions.push([ze.CUSTOM,A,h,t,i,px]),this.hitDetectionInstructions.push([ze.CUSTOM,A,h,t,a||i,px]);break;case pt.POLYGON:case pt.MULTI_LINE_STRING:c=[],l=o==pt.POLYGON?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),f=this.drawCustomCoordinates_(l,0,t.getEnds(),s,c),this.instructions.push([ze.CUSTOM,A,c,t,i,ky]),this.hitDetectionInstructions.push([ze.CUSTOM,A,c,t,a||i,ky]);break;case pt.LINE_STRING:case pt.CIRCLE:l=t.getFlatCoordinates(),u=this.appendFlatLineCoordinates(l,0,l.length,s,!1,!1),this.instructions.push([ze.CUSTOM,A,u,t,i,Au]),this.hitDetectionInstructions.push([ze.CUSTOM,A,u,t,a||i,Au]);break;case pt.MULTI_POINT:l=t.getFlatCoordinates(),u=this.appendFlatPointCoordinates(l,s),u>A&&(this.instructions.push([ze.CUSTOM,A,u,t,i,Au]),this.hitDetectionInstructions.push([ze.CUSTOM,A,u,t,a||i,Au]));break;case pt.POINT:l=t.getFlatCoordinates(),this.coordinates.push(l[0],l[1]),u=this.coordinates.length,this.instructions.push([ze.CUSTOM,A,u,t,i]),this.hitDetectionInstructions.push([ze.CUSTOM,A,u,t,a||i]);break}this.endGeometry(n)},e.prototype.beginGeometry=function(t,n){this.beginGeometryInstruction1_=[ze.BEGIN_GEOMETRY,n,0,t],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[ze.BEGIN_GEOMETRY,n,0,t],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)},e.prototype.finish=function(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}},e.prototype.reverseHitDetectionInstructions=function(){var t=this.hitDetectionInstructions;t.reverse();var n,i=t.length,a,o,s=-1;for(n=0;n<i;++n)a=t[n],o=a[0],o==ze.END_GEOMETRY?s=n:o==ze.BEGIN_GEOMETRY&&(a[2]=n,YY(this.hitDetectionInstructions,s,n),s=-1)},e.prototype.setFillStrokeStyle=function(t,n){var i=this.state;if(t){var a=t.getColor();i.fillStyle=nl(a||pu)}else i.fillStyle=void 0;if(n){var o=n.getColor();i.strokeStyle=nl(o||Py);var s=n.getLineCap();i.lineCap=s!==void 0?s:Gw;var A=n.getLineDash();i.lineDash=A?A.slice():Ry;var l=n.getLineDashOffset();i.lineDashOffset=l||My;var u=n.getLineJoin();i.lineJoin=u!==void 0?u:Lg;var c=n.getWidth();i.lineWidth=c!==void 0?c:Dy;var h=n.getMiterLimit();i.miterLimit=h!==void 0?h:Ny,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=[ze.SET_FILL_STYLE,n];return typeof n!="string"&&i.push(!0),i},e.prototype.applyStroke=function(t){this.instructions.push(this.createStroke(t))},e.prototype.createStroke=function(t){return[ze.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,this.applyPixelRatio(t.lineDash),t.lineDashOffset*this.pixelRatio]},e.prototype.updateFillStyle=function(t,n){var i=t.fillStyle;(typeof i!="string"||t.currentFillStyle!=i)&&(i!==void 0&&this.instructions.push(n.call(this,t)),t.currentFillStyle=i)},e.prototype.updateStrokeStyle=function(t,n){var i=t.strokeStyle,a=t.lineCap,o=t.lineDash,s=t.lineDashOffset,A=t.lineJoin,l=t.lineWidth,u=t.miterLimit;(t.currentStrokeStyle!=i||t.currentLineCap!=a||o!=t.currentLineDash&&!Fu(t.currentLineDash,o)||t.currentLineDashOffset!=s||t.currentLineJoin!=A||t.currentLineWidth!=l||t.currentMiterLimit!=u)&&(i!==void 0&&n.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=a,t.currentLineDash=o,t.currentLineDashOffset=s,t.currentLineJoin=A,t.currentLineWidth=l,t.currentMiterLimit=u)},e.prototype.endGeometry=function(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;var n=[ze.END_GEOMETRY,t];this.instructions.push(n),this.hitDetectionInstructions.push(n)},e.prototype.getBufferedMaxExtent=function(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=AF(this.maxExtent),this.maxLineWidth>0)){var t=this.resolution*(this.maxLineWidth+1)/2;_o(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_},e}(N8),I0=UJ,DJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),QJ=function(r){DJ(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i,a)||this;return o.hitDetectionImage_=null,o.image_=null,o.imagePixelRatio_=void 0,o.anchorX_=void 0,o.anchorY_=void 0,o.height_=void 0,o.opacity_=void 0,o.originX_=void 0,o.originY_=void 0,o.rotateWithView_=void 0,o.rotation_=void 0,o.scale_=void 0,o.width_=void 0,o.declutterImageWithText_=void 0,o}return e.prototype.drawPoint=function(t,n){if(this.image_){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),a=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(i,a);this.instructions.push([ze.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([ze.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(n)}},e.prototype.drawMultiPoint=function(t,n){if(this.image_){this.beginGeometry(t,n);var i=t.getFlatCoordinates(),a=t.getStride(),o=this.coordinates.length,s=this.appendFlatPointCoordinates(i,a);this.instructions.push([ze.DRAW_IMAGE,o,s,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterImageWithText_]),this.hitDetectionInstructions.push([ze.DRAW_IMAGE,o,s,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,this.opacity_,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterImageWithText_]),this.endGeometry(n)}},e.prototype.finish=function(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,r.prototype.finish.call(this)},e.prototype.setImageStyle=function(t,n){var i=t.getAnchor(),a=t.getSize(),o=t.getHitDetectionImage(),s=t.getImage(this.pixelRatio),A=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=o,this.image_=s,this.height_=a[1],this.opacity_=t.getOpacity(),this.originX_=A[0]*this.imagePixelRatio_,this.originY_=A[1]*this.imagePixelRatio_,this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=a[0],this.declutterImageWithText_=n},e}(I0),kJ=QJ,HJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),GJ=function(r){HJ(e,r);function e(t,n,i,a){return r.call(this,t,n,i,a)||this}return e.prototype.drawFlatCoordinates_=function(t,n,i,a){var o=this.coordinates.length,s=this.appendFlatLineCoordinates(t,n,i,a,!1,!1),A=[ze.MOVE_TO_LINE_TO,o,s];return this.instructions.push(A),this.hitDetectionInstructions.push(A),i},e.prototype.drawLineString=function(t,n){var i=this.state,a=i.strokeStyle,o=i.lineWidth;if(!(a===void 0||o===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([ze.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,Ry,My],xf);var s=t.getFlatCoordinates(),A=t.getStride();this.drawFlatCoordinates_(s,0,s.length,A),this.hitDetectionInstructions.push(Pc),this.endGeometry(n)}},e.prototype.drawMultiLineString=function(t,n){var i=this.state,a=i.strokeStyle,o=i.lineWidth;if(!(a===void 0||o===void 0)){this.updateStrokeStyle(i,this.applyStroke),this.beginGeometry(t,n),this.hitDetectionInstructions.push([ze.SET_STROKE_STYLE,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset],xf);for(var s=t.getEnds(),A=t.getFlatCoordinates(),l=t.getStride(),u=0,c=0,h=s.length;c<h;++c)u=this.drawFlatCoordinates_(A,u,s[c],l);this.hitDetectionInstructions.push(Pc),this.endGeometry(n)}},e.prototype.finish=function(){var t=this.state;return t.lastStroke!=null&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Pc),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(Pc),t.lastStroke=this.coordinates.length),t.lastStroke=0,r.prototype.applyStroke.call(this,t),this.instructions.push(xf)},e}(I0),$J=GJ,VJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),jJ=function(r){VJ(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(xf),this.hitDetectionInstructions.push(xf);for(var u=0;u<l;++u){var c=i[u],h=this.coordinates.length,f=this.appendFlatLineCoordinates(t,n,c,a,!0,!A),d=[ze.MOVE_TO_LINE_TO,h,f];this.instructions.push(d),this.hitDetectionInstructions.push(d),A&&(this.instructions.push(kP),this.hitDetectionInstructions.push(kP)),n=c}return s&&(this.instructions.push(z_),this.hitDetectionInstructions.push(z_)),A&&(this.instructions.push(Pc),this.hitDetectionInstructions.push(Pc)),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([ze.SET_FILL_STYLE,pu]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ze.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=[ze.CIRCLE,l];this.instructions.push(xf,u),this.hitDetectionInstructions.push(xf,u),i.fillStyle!==void 0&&(this.instructions.push(z_),this.hitDetectionInstructions.push(z_)),i.strokeStyle!==void 0&&(this.instructions.push(Pc),this.hitDetectionInstructions.push(Pc)),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([ze.SET_FILL_STYLE,pu]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ze.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([ze.SET_FILL_STYLE,pu]),i.strokeStyle!==void 0&&this.hitDetectionInstructions.push([ze.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]=gf(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}(I0),HP=jJ,P8={POINT:"point",LINE:"line"};function KJ(r,e,t,n,i){var a=t,o=t,s=0,A=0,l=t,u,c,h,f,d,g,m,v,y,w;for(c=t;c<n;c+=i){var C=e[c],O=e[c+1];d!==void 0&&(y=C-d,w=O-g,f=Math.sqrt(y*y+w*w),m!==void 0&&(A+=h,u=Math.acos((m*y+v*w)/(h*f)),u>r&&(A>s&&(s=A,a=l,o=c),A=0,l=c-i)),h=f,m=y,v=w),d=C,g=O}return A+=f,A>s?[l,c]:[a,o]}var WJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Zw={left:0,end:0,center:.5,right:1,start:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},zJ=function(r){WJ(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i,a)||this;return o.labels_=null,o.text_="",o.textOffsetX_=0,o.textOffsetY_=0,o.textRotateWithView_=void 0,o.textRotation_=0,o.textFillState_=null,o.fillStates={},o.textStrokeState_=null,o.strokeStates={},o.textState_={},o.textStates={},o.textKey_="",o.fillKey_="",o.strokeKey_="",o.declutterImageWithText_=void 0,o}return e.prototype.finish=function(){var t=r.prototype.finish.call(this);return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t},e.prototype.drawText=function(t,n){var i=this.textFillState_,a=this.textStrokeState_,o=this.textState_;if(!(this.text_===""||!o||!i&&!a)){var s=this.coordinates,A=s.length,l=t.getType(),u=null,c=t.getStride();if(o.placement===P8.LINE&&(l==pt.LINE_STRING||l==pt.MULTI_LINE_STRING||l==pt.POLYGON||l==pt.MULTI_POLYGON)){if(!Xn(this.getBufferedMaxExtent(),t.getExtent()))return;var h=void 0;if(u=t.getFlatCoordinates(),l==pt.LINE_STRING)h=[u.length];else if(l==pt.MULTI_LINE_STRING)h=t.getEnds();else if(l==pt.POLYGON)h=t.getEnds().slice(0,1);else if(l==pt.MULTI_POLYGON){var f=t.getEndss();h=[];for(var d=0,g=f.length;d<g;++d)h.push(f[d][0])}this.beginGeometry(t,n);for(var m=o.textAlign,v=0,y=void 0,w=0,C=h.length;w<C;++w){if(m==null){var O=KJ(o.maxAngle,u,v,h[w],c);v=O[0],y=O[1]}else y=h[w];for(var d=v;d<y;d+=c)s.push(u[d],u[d+1]);var F=s.length;v=h[w],this.drawChars_(A,F),A=F}this.endGeometry(n)}else{var I=o.overflow?null:[];switch(l){case pt.POINT:case pt.MULTI_POINT:u=t.getFlatCoordinates();break;case pt.LINE_STRING:u=t.getFlatMidpoint();break;case pt.CIRCLE:u=t.getCenter();break;case pt.MULTI_LINE_STRING:u=t.getFlatMidpoints(),c=2;break;case pt.POLYGON:u=t.getFlatInteriorPoint(),o.overflow||I.push(u[2]/this.resolution),c=3;break;case pt.MULTI_POLYGON:var T=t.getFlatInteriorPoints();u=[];for(var d=0,g=T.length;d<g;d+=3)o.overflow||I.push(T[d+2]/this.resolution),u.push(T[d],T[d+1]);if(u.length===0)return;c=2;break}var F=this.appendFlatPointCoordinates(u,c);if(F===A)return;if(I&&(F-A)/2!==u.length/c){var L=A/2;I=I.filter(function(nt,At){var ct=s[(L+At)*2]===u[At*c]&&s[(L+At)*2+1]===u[At*c+1];return ct||--L,ct})}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 N=o.padding;if(N!=Tf&&(o.scale[0]<0||o.scale[1]<0)){var x=o.padding[0],S=o.padding[1],P=o.padding[2],U=o.padding[3];o.scale[0]<0&&(S=-S,U=-U),o.scale[1]<0&&(x=-x,P=-P),N=[x,S,P,U]}var tt=this.pixelRatio;this.instructions.push([ze.DRAW_IMAGE,A,F,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterImageWithText_,N==Tf?Tf:N.map(function(nt){return nt*tt}),!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,I]);var q=1/tt;this.hitDetectionInstructions.push([ze.DRAW_IMAGE,A,F,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[q,q],NaN,this.declutterImageWithText_,N,!!o.backgroundFill,!!o.backgroundStroke,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,I]),this.endGeometry(n)}}},e.prototype.saveTextStates_=function(){var t=this.textStrokeState_,n=this.textState_,i=this.textFillState_,a=this.strokeKey_;t&&(a in this.strokeStates||(this.strokeStates[a]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));var o=this.textKey_;o in this.textStates||(this.textStates[o]={font:n.font,textAlign:n.textAlign||Uy,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=Zw[a.textBaseline],c=this.textOffsetY_*l,h=this.text_,f=i?i.lineWidth*Math.abs(a.scale[0])/2:0;this.instructions.push([ze.DRAW_CHARS,t,n,u,a.overflow,A,a.maxAngle,l,c,o,f*l,h,s,1]),this.hitDetectionInstructions.push([ze.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=nl(s.getColor()||pu)):(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()||Gw,o.lineDash=l?l.slice():Ry,o.lineDashOffset=u===void 0?My:u,o.lineJoin=A.getLineJoin()||Lg,o.lineWidth=c===void 0?Dy:c,o.miterLimit=h===void 0?Ny:h,o.strokeStyle=nl(A.getColor()||Py)}i=this.textState_;var f=t.getFont()||qk;XX(f);var d=t.getScaleArray();i.overflow=t.getOverflow(),i.font=f,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.textBaseline=t.getTextBaseline()||$w,i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Tf,i.scale=d===void 0?[1,1]:d;var g=t.getOffsetX(),m=t.getOffsetY(),v=t.getRotateWithView(),y=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=g===void 0?0:g,this.textOffsetY_=m===void 0?0:m,this.textRotateWithView_=v===void 0?!1:v,this.textRotation_=y===void 0?0:y,this.strokeKey_=o?(typeof o.strokeStyle=="string"?o.strokeStyle:Ee(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:"|"+Ee(a.fillStyle):""}this.declutterImageWithText_=n},e}(I0),YJ=zJ,XJ={Circle:HP,Default:I0,Image:kJ,LineString:$J,Polygon:HP,Text:YJ},qJ=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=XJ[t];a=new o(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),i[t]=a}return a},r}(),Jw=qJ,ZJ=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),JJ=function(r){ZJ(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 Re()},e.prototype.getData=function(t){return null},e.prototype.prepareFrame=function(t){return Re()},e.prototype.renderFrame=function(t,n){return Re()},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()===rr.LOADED&&this.renderIfReadyAndVisible()},e.prototype.loadImage=function(t){var n=t.getState();return n!=rr.LOADED&&n!=rr.ERROR&&t.addEventListener(xe.CHANGE,this.boundHandleImageChange_),n==rr.IDLE&&(t.load(),n=t.getState()),n==rr.LOADED},e.prototype.renderIfReadyAndVisible=function(){var t=this.getLayer();t.getVisible()&&t.getSourceState()==co.READY&&t.changed()},e.prototype.disposeInternal=function(){delete this.layer_,r.prototype.disposeInternal.call(this)},e}(E0),U8=JJ,ttt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a 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=null;function ett(){var r=document.createElement("canvas");r.width=1,r.height=1,Fm=r.getContext("2d")}var rtt=function(r){ttt(e,r);function e(t){var n=r.call(this,t)||this;return n.container=null,n.renderedResolution,n.tempTransform=Si(),n.pixelTransform=Si(),n.inversePixelTransform=Si(),n.context=null,n.containerReused=!1,n.pixelContext_=null,n.frameState=null,n}return e.prototype.getImageData=function(t,n,i){Fm||ett(),Fm.clearRect(0,0,1,1);var a;try{Fm.drawImage(t,n,i,1,1,0,0,1,1),a=Fm.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&&Fu(uh(t.style.backgroundColor),uh(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=wo();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=BA(i),o=w0(i),s=ev(i),A=_0(i);bn(n.coordinateToPixelTransform,a),bn(n.coordinateToPixelTransform,o),bn(n.coordinateToPixelTransform,s),bn(n.coordinateToPixelTransform,A);var l=this.inversePixelTransform;bn(l,a),bn(l,o),bn(l,s),bn(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 ny(t,this.inversePixelTransform,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.frameState=n,this.dispatchRenderEvent_(No.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(No.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,d=-t[1];return yo(this.tempTransform,l,u,c,h,-i,f,d)},e.prototype.getDataAtPixel=function(t,n,i){var a=bn(this.inversePixelTransform,t.slice()),o=this.context,s=this.getLayer(),A=s.getExtent();if(A){var l=bn(n.pixelToCoordinateTransform,t.slice());if(!gA(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 d;try{h.drawImage(o.canvas,u,c,1,1,0,0,1,1),d=h.getImageData(0,0,1,1).data}catch(g){return g.name==="SecurityError"?(this.pixelContext_=null,new Uint8Array):d}return d[3]===0?null:d},e.prototype.disposeInternal=function(){delete this.frameState,r.prototype.disposeInternal.call(this)},e}(U8),$F=rtt,Er={CIRCLE:"Circle",DEFAULT:"Default",IMAGE:"Image",LINE_STRING:"LineString",POLYGON:"Polygon",TEXT:"Text"};function ntt(r,e,t,n,i,a,o,s,A,l,u,c){var h=r[e],f=r[e+1],d=0,g=0,m=0,v=0;function y(){d=h,g=f,e+=n,h=r[e],f=r[e+1],v+=m,m=Math.sqrt((h-d)*(h-d)+(f-g)*(f-g))}do y();while(e<t-n&&v+m<a);for(var w=m===0?0:(a-v)/m,C=au(d,h,w),O=au(g,f,w),F=e-n,I=v,T=a+s*A(l,i,u);e<t-n&&v+m<T;)y();w=m===0?0:(T-v)/m;var L=au(d,h,w),N=au(g,f,w),x;if(c){var S=[C,O,L,N];TF(S,0,4,2,c,S,S),x=S[0]>S[2]}else x=C>L;var P=Math.PI,U=[],tt=F+n===e;e=F,m=0,v=I,h=r[e],f=r[e+1];var q;if(tt){y(),q=Math.atan2(f-g,h-d),x&&(q+=q>0?-P:P);var rt=(L+C)/2,nt=(N+O)/2;return U[0]=[rt,nt,(T-a)/2,q,i],U}for(var At=0,ct=i.length;At<ct;){y();var Tt=Math.atan2(f-g,h-d);if(x&&(Tt+=Tt>0?-P:P),q!==void 0){var M=Tt-q;if(M+=M>P?-2*P:M<-P?2*P:0,Math.abs(M)>o)return null}q=Tt;for(var W=At,Y=0;At<ct;++At){var H=x?ct-At-1:At,J=s*A(l,i[H],u);if(e+n<t&&v+m<a+Y+J/2)break;Y+=J}if(At!==W){var ot=x?i.substring(ct-W,ct-At):i.substring(W,At);w=m===0?0:(a+Y/2-v)/m;var rt=au(d,h,w),nt=au(g,f,w);U.push([rt,nt,Y/2,Tt,ot]),a+=Y}}return U}var gp=Ui(),hc=[],$l=[],Vl=[],fc=[];function GP(r){return r[3].declutterBox}var itt=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 $P(r,e){return(e==="start"||e==="end")&&!itt.test(r)&&(e=e==="start"?"left":"right"),Zw[e]}function att(r,e,t){return t>0&&r.push(`
`,""),r.push(e,""),r}var ott=function(){function r(e,t,n,i){this.overlaps=n,this.pixelRatio=t,this.resolution=e,this.alignFill_,this.instructions=i.instructions,this.coordinates=i.coordinates,this.coordinateCache_={},this.renderedTransform_=Si(),this.hitDetectionInstructions=i.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=i.fillStates||{},this.strokeStates=i.strokeStates||{},this.textStates=i.textStates||{},this.widths_={},this.labels_={}}return r.prototype.createLabel=function(e,t,n,i){var a=e+t+n+i;if(this.labels_[a])return this.labels_[a];var o=i?this.strokeStates[i]:null,s=n?this.fillStates[n]:null,A=this.textStates[t],l=this.pixelRatio,u=[A.scale[0]*l,A.scale[1]*l],c=Array.isArray(e),h=$P(c?e[0]:e,A.textAlign||Uy),f=i&&o.lineWidth?o.lineWidth:0,d=c?e:e.split(`
`).reduce(att,[]),g=ZX(A,d),m=g.width,v=g.height,y=g.widths,w=g.heights,C=g.lineWidths,O=m+f,F=[],I=(O+2)*u[0],T=(v+f)*u[1],L={width:I<0?Math.floor(I):Math.ceil(I),height:T<0?Math.floor(T):Math.ceil(T),contextInstructions:F};if((u[0]!=1||u[1]!=1)&&F.push("scale",u),i){F.push("strokeStyle",o.strokeStyle),F.push("lineWidth",f),F.push("lineCap",o.lineCap),F.push("lineJoin",o.lineJoin),F.push("miterLimit",o.miterLimit);var N=BC?OffscreenCanvasRenderingContext2D:CanvasRenderingContext2D;N.prototype.setLineDash&&(F.push("setLineDash",[o.lineDash]),F.push("lineDashOffset",o.lineDashOffset))}n&&F.push("fillStyle",s.fillStyle),F.push("textBaseline","middle"),F.push("textAlign","center");for(var x=.5-h,S=h*O+x*f,P=[],U=[],tt=0,q=0,rt=0,nt=0,At,ct=0,Tt=d.length;ct<Tt;ct+=2){var M=d[ct];if(M===`
`){q+=tt,tt=0,S=h*O+x*f,++nt;continue}var W=d[ct+1]||A.font;W!==At&&(i&&P.push("font",W),n&&U.push("font",W),At=W),tt=Math.max(tt,w[rt]);var Y=[M,S+x*y[rt]+h*(y[rt]-C[nt]),.5*(f+tt)+q];S+=y[rt],i&&P.push("strokeText",Y),n&&U.push("fillText",Y),++rt}return Array.prototype.push.apply(F,P),Array.prototype.push.apply(F,U),this.labels_[a]=L,L},r.prototype.replayTextBackground_=function(e,t,n,i,a,o,s){e.beginPath(),e.moveTo.apply(e,t),e.lineTo.apply(e,n),e.lineTo.apply(e,i),e.lineTo.apply(e,a),e.lineTo.apply(e,t),o&&(this.alignFill_=o[2],this.fill_(e)),s&&(this.setStrokeStyle_(e,s),e.stroke())},r.prototype.calculateImageOrLabelDimensions_=function(e,t,n,i,a,o,s,A,l,u,c,h,f,d,g,m){s*=h[0],A*=h[1];var v=n-s,y=i-A,w=a+l>e?e-l:a,C=o+u>t?t-u:o,O=d[3]+w*h[0]+d[1],F=d[0]+C*h[1]+d[2],I=v-d[3],T=y-d[0];(g||c!==0)&&(hc[0]=I,fc[0]=I,hc[1]=T,$l[1]=T,$l[0]=I+O,Vl[0]=$l[0],Vl[1]=T+F,fc[1]=Vl[1]);var L;return c!==0?(L=yo(Si(),n,i,1,1,c,-n,-i),bn(L,hc),bn(L,$l),bn(L,Vl),bn(L,fc),ko(Math.min(hc[0],$l[0],Vl[0],fc[0]),Math.min(hc[1],$l[1],Vl[1],fc[1]),Math.max(hc[0],$l[0],Vl[0],fc[0]),Math.max(hc[1],$l[1],Vl[1],fc[1]),gp)):ko(Math.min(I,I+O),Math.min(T,T+F),Math.max(I,I+O),Math.max(T,T+F),gp),f&&(v=Math.round(v),y=Math.round(y)),{drawImageX:v,drawImageY:y,drawImageW:w,drawImageH:C,originX:l,originY:u,declutterBox:{minX:gp[0],minY:gp[1],maxX:gp[2],maxY:gp[3],value:m},canvasTransform:L,scale:h}},r.prototype.replayImageOrLabel_=function(e,t,n,i,a,o,s){var A=!!(o||s),l=i.declutterBox,u=e.canvas,c=s?s[2]*i.scale[0]/2:0,h=l.minX-c<=u.width/t&&l.maxX+c>=0&&l.minY-c<=u.height/t&&l.maxY+c>=0;return h&&(A&&this.replayTextBackground_(e,hc,$l,Vl,fc,o,s),JX(e,i.canvasTransform,a,n,i.originX,i.originY,i.drawImageW,i.drawImageH,i.drawImageX,i.drawImageY,i.scale)),!0},r.prototype.fill_=function(e){if(this.alignFill_){var t=bn(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;e.save(),e.translate(t[0]%n,t[1]%n),e.rotate(this.viewRotation_)}e.fill(),this.alignFill_&&e.restore()},r.prototype.setStrokeStyle_=function(e,t){e.strokeStyle=t[1],e.lineWidth=t[2],e.lineCap=t[3],e.lineJoin=t[4],e.miterLimit=t[5],e.setLineDash&&(e.lineDashOffset=t[7],e.setLineDash(t[6]))},r.prototype.drawLabelWithPointPlacement_=function(e,t,n,i){var a=this.textStates[t],o=this.createLabel(e,t,i,n),s=this.strokeStates[n],A=this.pixelRatio,l=$P(Array.isArray(e)?e[0]:e,a.textAlign||Uy),u=Zw[a.textBaseline||$w],c=s&&s.lineWidth?s.lineWidth:0,h=o.width/A-2*a.scale[0],f=l*h+2*(.5-l)*c,d=u*o.height/A+2*(.5-u)*c;return{label:o,anchorX:f,anchorY:d}},r.prototype.execute_=function(e,t,n,i,a,o,s,A){var l;this.pixelCoordinates_&&Fu(n,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=Yc(this.coordinates,0,this.coordinates.length,2,n,this.pixelCoordinates_),oX(this.renderedTransform_,n));for(var u=0,c=i.length,h=0,f,d,g,m,v,y,w,C,O,F,I,T,L=0,N=0,x=null,S=null,P=this.coordinateCache_,U=this.viewRotation_,tt=Math.round(Math.atan2(-n[1],n[0])*1e12)/1e12,q={context:e,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:U},rt=this.instructions!=i||this.overlaps?0:200,nt,At,ct,Tt;u<c;){var M=i[u],W=M[0];switch(W){case ze.BEGIN_GEOMETRY:nt=M[1],Tt=M[3],nt.getGeometry()?s!==void 0&&!Xn(s,Tt.getExtent())?u=M[2]+1:++u:u=M[2];break;case ze.BEGIN_PATH:L>rt&&(this.fill_(e),L=0),N>rt&&(e.stroke(),N=0),!L&&!N&&(e.beginPath(),m=NaN,v=NaN),++u;break;case ze.CIRCLE:h=M[1];var Y=l[h],H=l[h+1],J=l[h+2],ot=l[h+3],ut=J-Y,X=ot-H,It=Math.sqrt(ut*ut+X*X);e.moveTo(Y+It,H),e.arc(Y,H,It,0,2*Math.PI,!0),++u;break;case ze.CLOSE_PATH:e.closePath(),++u;break;case ze.CUSTOM:h=M[1],f=M[2];var at=M[3],j=M[4],Z=M.length==6?M[5]:void 0;q.geometry=at,q.feature=nt,u in P||(P[u]=[]);var ft=P[u];Z?Z(l,h,f,2,ft):(ft[0]=l[h],ft[1]=l[h+1],ft.length=2),j(ft,q),++u;break;case ze.DRAW_IMAGE:h=M[1],f=M[2],C=M[3],d=M[4],g=M[5];var it=M[6],V=M[7],Ft=M[8],Mt=M[9],Et=M[10],Bt=M[11],Ct=M[12],Rt=M[13],Nt=M[14];if(!C&&M.length>=19){O=M[18],F=M[19],I=M[20],T=M[21];var Dt=this.drawLabelWithPointPlacement_(O,F,I,T);C=Dt.label,M[3]=C;var Wt=M[22];d=(Dt.anchorX-Wt)*this.pixelRatio,M[4]=d;var te=M[23];g=(Dt.anchorY-te)*this.pixelRatio,M[5]=g,it=C.height,M[6]=it,Rt=C.width,M[13]=Rt}var Ae=void 0;M.length>24&&(Ae=M[24]);var oe=void 0,Jt=void 0,fe=void 0;M.length>16?(oe=M[15],Jt=M[16],fe=M[17]):(oe=Tf,Jt=!1,fe=!1),Et&&tt?Bt+=U:!Et&&!tt&&(Bt-=U);for(var qt=0;h<f;h+=2)if(!(Ae&&Ae[qt++]<Rt/this.pixelRatio)){var nr=this.calculateImageOrLabelDimensions_(C.width,C.height,l[h],l[h+1],Rt,it,d,g,Ft,Mt,Bt,Ct,a,oe,Jt||fe,nt),ke=[e,t,C,nr,V,Jt?x:null,fe?S:null],wr=void 0,Ne=void 0;if(A&&Nt){var Pe=f-h;if(!Nt[Pe]){Nt[Pe]=ke;continue}if(wr=Nt[Pe],delete Nt[Pe],Ne=GP(wr),A.collides(Ne))continue}A&&A.collides(nr.declutterBox)||(wr&&(A&&A.insert(Ne),this.replayImageOrLabel_.apply(this,wr)),A&&A.insert(nr.declutterBox),this.replayImageOrLabel_.apply(this,ke))}++u;break;case ze.DRAW_CHARS:var Hr=M[1],se=M[2],hi=M[3],gr=M[4];T=M[5];var ei=M[6],Wr=M[7],zr=M[8];I=M[9];var He=M[10];O=M[11],F=M[12];var Ir=[M[13],M[13]],Gn=this.textStates[F],yn=Gn.font,fi=[Gn.scale[0]*Wr,Gn.scale[1]*Wr],di=void 0;yn in this.widths_?di=this.widths_[yn]:(di={},this.widths_[yn]=di);var Ue=L8(l,Hr,se,2),ri=Math.abs(fi[0])*vP(yn,O,di);if(gr||ri<=Ue){var Cn=this.textStates[F].textAlign,pi=(Ue-ri)*Zw[Cn],cn=ntt(l,Hr,se,2,O,pi,ei,Math.abs(fi[0]),vP,yn,di,tt?0:this.viewRotation_);t:if(cn){var Br=[],_n=void 0,eo=void 0,de=void 0,_t=void 0,$t=void 0;if(I)for(_n=0,eo=cn.length;_n<eo;++_n){$t=cn[_n],de=$t[4],_t=this.createLabel(de,F,"",I),d=$t[2]+(fi[0]<0?-He:He),g=hi*_t.height+(.5-hi)*2*He*fi[1]/fi[0]-zr;var nr=this.calculateImageOrLabelDimensions_(_t.width,_t.height,$t[0],$t[1],_t.width,_t.height,d,g,0,0,$t[3],Ir,!1,Tf,!1,nt);if(A&&A.collides(nr.declutterBox))break t;Br.push([e,t,_t,nr,1,null,null])}if(T)for(_n=0,eo=cn.length;_n<eo;++_n){$t=cn[_n],de=$t[4],_t=this.createLabel(de,F,T,""),d=$t[2],g=hi*_t.height-zr;var nr=this.calculateImageOrLabelDimensions_(_t.width,_t.height,$t[0],$t[1],_t.width,_t.height,d,g,0,0,$t[3],Ir,!1,Tf,!1,nt);if(A&&A.collides(nr.declutterBox))break t;Br.push([e,t,_t,nr,1,null,null])}A&&A.load(Br.map(GP));for(var ne=0,Ze=Br.length;ne<Ze;++ne)this.replayImageOrLabel_.apply(this,Br[ne])}}++u;break;case ze.END_GEOMETRY:if(o!==void 0){nt=M[1];var Lr=o(nt,Tt);if(Lr)return Lr}++u;break;case ze.FILL:rt?L++:this.fill_(e),++u;break;case ze.MOVE_TO_LINE_TO:for(h=M[1],f=M[2],At=l[h],ct=l[h+1],y=At+.5|0,w=ct+.5|0,(y!==m||w!==v)&&(e.moveTo(At,ct),m=y,v=w),h+=2;h<f;h+=2)At=l[h],ct=l[h+1],y=At+.5|0,w=ct+.5|0,(h==f-2||y!==m||w!==v)&&(e.lineTo(At,ct),m=y,v=w);++u;break;case ze.SET_FILL_STYLE:x=M,this.alignFill_=M[2],L&&(this.fill_(e),L=0,N&&(e.stroke(),N=0)),e.fillStyle=M[1],++u;break;case ze.SET_STROKE_STYLE:S=M,N&&(e.stroke(),N=0),this.setStrokeStyle_(e,M),++u;break;case ze.STROKE:rt?N++:e.stroke(),++u;break;default:++u;break}}L&&this.fill_(e),N&&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}(),stt=ott,Gb=[Er.POLYGON,Er.CIRCLE,Er.LINE_STRING,Er.IMAGE,Er.TEXT,Er.DEFAULT],Att=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_=Si(),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 stt(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=yo(this.hitDetectionTransform_,i+.5,i+.5,1/t,-1/t,-n,-e[0],-e[1]),l=!this.hitDetectionContext_;l&&(this.hitDetectionContext_=wo(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=Ui(),Df(c,e),_o(c,t*(this.renderBuffer_+i),c));var h=ltt(i),f;function d(F,I){for(var T=u.getImageData(0,0,s,s).data,L=0,N=h.length;L<N;L++)if(T[h[L]]>0){if(!o||f!==Er.IMAGE&&f!==Er.TEXT||o.indexOf(F)!==-1){var x=(h[L]-3)/4,S=i-x%s,P=i-(x/s|0),U=a(F,I,S*S+P*P);if(U)return U}u.clearRect(0,0,s,s);break}}var g=Object.keys(this.executorsByZIndex_).map(Number);g.sort(sh);var m,v,y,w,C;for(m=g.length-1;m>=0;--m){var O=g[m].toString();for(y=this.executorsByZIndex_[O],v=Gb.length-1;v>=0;--v)if(f=Gb[v],w=y[f],w!==void 0&&(C=w.executeHitDetection(u,A,n,d,c),C))return C}},r.prototype.getClipCoords=function(e){var t=this.maxExtent_;if(!t)return null;var n=t[0],i=t[1],a=t[2],o=t[3],s=[n,i,n,o,a,o,a,i];return Yc(s,0,8,2,e,s),s},r.prototype.isEmpty=function(){return nd(this.executorsByZIndex_)},r.prototype.execute=function(e,t,n,i,a,o,s){var A=Object.keys(this.executorsByZIndex_).map(Number);A.sort(sh),this.maxExtent_&&(e.save(),this.clip(e,n));var l=o||Gb,u,c,h,f,d,g;for(s&&A.reverse(),u=0,c=A.length;u<c;++u){var m=A[u].toString();for(d=this.executorsByZIndex_[m],h=0,f=l.length;h<f;++h){var v=l[h];g=d[v],g!==void 0&&g.execute(e,t,n,i,a,s)}}this.maxExtent_&&e.restore()},r}(),$b={};function ltt(r){if($b[r]!==void 0)return $b[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 $b[r]=A,A}var tE=Att,utt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ctt=function(r){utt(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_=Si(),l}return e.prototype.drawImages_=function(t,n,i,a){if(this.image_){var o=Yc(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_,d=o[c+1]-this.imageAnchorY_;if(u!==0||this.imageScale_[0]!=1||this.imageScale_[1]!=1){var g=f+this.imageAnchorX_,m=d+this.imageAnchorY_;yo(A,g,m,1,1,u,-g,-m),s.setTransform.apply(s,A),s.translate(g,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,d,this.imageWidth_,this.imageHeight_)}this.imageOpacity_!=1&&(s.globalAlpha=l)}},e.prototype.drawText_=function(t,n,i,a){if(!(!this.textState_||this.text_==="")){this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);var o=Yc(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=yo(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=Yc(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(Xn(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);var n=qq(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 pt.POINT:this.drawPoint(t);break;case pt.LINE_STRING:this.drawLineString(t);break;case pt.POLYGON:this.drawPolygon(t);break;case pt.MULTI_POINT:this.drawMultiPoint(t);break;case pt.MULTI_LINE_STRING:this.drawMultiLineString(t);break;case pt.MULTI_POLYGON:this.drawMultiPolygon(t);break;case pt.GEOMETRY_COLLECTION:this.drawGeometryCollection(t);break;case pt.CIRCLE:this.drawCircle(t);break}},e.prototype.drawFeature=function(t,n){var i=n.getGeometryFunction()(t);!i||!Xn(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_)),!!Xn(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(Xn(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_)),!!Xn(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_)),!!Xn(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&&(Fu(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:Uy;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:nl(a||pu)}}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||Ry;this.strokeState_={lineCap:s!==void 0?s:Gw,lineDash:this.pixelRatio_===1?f:f.map(function(d){return d*i.pixelRatio_}),lineDashOffset:(l||My)*this.pixelRatio_,lineJoin:u!==void 0?u:Lg,lineWidth:(c!==void 0?c:Dy)*this.pixelRatio_,miterLimit:h!==void 0?h:Ny,strokeStyle:nl(o||Py)}}},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:nl(i||pu)}}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:Gw,lineDash:A||Ry,lineDashOffset:l||My,lineJoin:u!==void 0?u:Lg,lineWidth:c!==void 0?c:Dy,miterLimit:h!==void 0?h:Ny,strokeStyle:nl(o||Py)}}var f=t.getFont(),d=t.getOffsetX(),g=t.getOffsetY(),m=t.getRotateWithView(),v=t.getRotation(),y=t.getScaleArray(),w=t.getText(),C=t.getTextAlign(),O=t.getTextBaseline();this.textState_={font:f!==void 0?f:qk,textAlign:C!==void 0?C:Uy,textBaseline:O!==void 0?O:$w},this.text_=w!==void 0?Array.isArray(w)?w.reduce(function(F,I,T){return F+=T%2?" ":I},""):w:"",this.textOffsetX_=d!==void 0?this.pixelRatio_*d:0,this.textOffsetY_=g!==void 0?this.pixelRatio_*g:0,this.textRotateWithView_=m!==void 0?m:!1,this.textRotation_=v!==void 0?v:0,this.textScale_=[this.pixelRatio_*y[0],this.pixelRatio_*y[1]]}},e}(N8),VF=ctt,uo={FRACTION:"fraction",PIXELS:"pixels"},$i={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",TOP_LEFT:"top-left",TOP_RIGHT:"top-right"},htt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ftt=function(r){htt(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(xe.CHANGE)},e.prototype.getExtent=function(){return this.extent},e.prototype.getImage=function(){return Re()},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(){Re()},e}(Ed),D8=ftt,dtt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ptt=function(r){dtt(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,i,rr.IDLE)||this;return A.src_=a,A.image_=new Image,o!==null&&(A.image_.crossOrigin=o),A.unlisten_=null,A.state=rr.IDLE,A.imageLoadFunction_=s,A}return e.prototype.getImage=function(){return this.image_},e.prototype.handleImageError_=function(){this.state=rr.ERROR,this.unlistenImage_(),this.changed()},e.prototype.handleImageLoad_=function(){this.resolution===void 0&&(this.resolution=Ii(this.extent)/this.image_.height),this.state=rr.LOADED,this.unlistenImage_(),this.changed()},e.prototype.load=function(){(this.state==rr.IDLE||this.state==rr.ERROR)&&(this.state=rr.LOADING,this.changed(),this.imageLoadFunction_(this,this.src_),this.unlisten_=jF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.setImage=function(t){this.image_=t,this.resolution=Ii(this.extent)/this.image_.height},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(D8);function jF(r,e,t){var n=r,i=!0,a=!1,o=!1,s=[Fy(n,xe.LOAD,function(){o=!0,a||e()})];return n.src&&nX?(a=!0,n.decode().then(function(){i&&e()}).catch(function(A){i&&(o?e():t())})):s.push(Fy(n,xe.ERROR,t)),function(){i=!1,s.forEach(Yr)}}var Q8=ptt,gtt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),am=null,vtt=function(r){gtt(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_===rr.LOADED){am||(am=wo(1,1)),am.drawImage(this.image_,0,0);try{am.getImageData(0,0,1,1),this.tainted_=!1}catch{am=null,this.tainted_=!0}}return this.tainted_===!0},e.prototype.dispatchChangeEvent_=function(){this.dispatchEvent(xe.CHANGE)},e.prototype.handleImageError_=function(){this.imageState_=rr.ERROR,this.unlistenImage_(),this.dispatchChangeEvent_()},e.prototype.handleImageLoad_=function(){this.imageState_=rr.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=wo(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_==rr.IDLE){this.imageState_=rr.LOADING;try{this.image_.src=this.src_}catch{this.handleImageError_()}this.unlisten_=jF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this))}},e.prototype.replaceColor_=function(t){if(!(!this.color_||this.canvas_[t]||this.imageState_!==rr.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=fu(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}(Ed);function mtt(r,e,t,n,i,a){var o=Dw.get(e,n,a);return o||(o=new vtt(r,e,t,n,i,a),Dw.set(e,n,a,o)),o}var ytt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),_tt=function(r){ytt(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:$i.TOP_LEFT,n.anchorXUnits_=i.anchorXUnits!==void 0?i.anchorXUnits:uo.FRACTION,n.anchorYUnits_=i.anchorYUnits!==void 0?i.anchorYUnits:uo.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;Le(!(u!==void 0&&l),4),Le(!l||l&&n.imgSize_,5),(u===void 0||u.length===0)&&l&&(u=l.src||Ee(l)),Le(u!==void 0&&u.length>0,6);var c=i.src!==void 0?rr.IDLE:rr.LOADED;return n.color_=i.color!==void 0?uh(i.color):null,n.iconImage_=mtt(l,u,n.imgSize_!==void 0?n.imgSize_:null,n.crossOrigin_,c,n.color_),n.offset_=i.offset!==void 0?i.offset:[0,0],n.offsetOrigin_=i.offsetOrigin!==void 0?i.offsetOrigin:$i.TOP_LEFT,n.origin_=null,n.size_=i.size!==void 0?i.size:null,n}return e.prototype.clone=function(){var t=this.getScale();return new e({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,imgSize:this.imgSize_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:Array.isArray(t)?t.slice():t,size:this.size_!==null?this.size_.slice():void 0,src:this.getSrc()})},e.prototype.getAnchor=function(){var t=this.normalizedAnchor_;if(!t){t=this.anchor_;var n=this.getSize();if(this.anchorXUnits_==uo.FRACTION||this.anchorYUnits_==uo.FRACTION){if(!n)return null;t=this.anchor_.slice(),this.anchorXUnits_==uo.FRACTION&&(t[0]*=n[0]),this.anchorYUnits_==uo.FRACTION&&(t[1]*=n[1])}if(this.anchorOrigin_!=$i.TOP_LEFT){if(!n)return null;t===this.anchor_&&(t=this.anchor_.slice()),(this.anchorOrigin_==$i.TOP_RIGHT||this.anchorOrigin_==$i.BOTTOM_RIGHT)&&(t[0]=-t[0]+n[0]),(this.anchorOrigin_==$i.BOTTOM_LEFT||this.anchorOrigin_==$i.BOTTOM_RIGHT)&&(t[1]=-t[1]+n[1])}this.normalizedAnchor_=t}var i=this.getDisplacement();return[t[0]-i[0],t[1]+i[1]]},e.prototype.setAnchor=function(t){this.anchor_=t,this.normalizedAnchor_=null},e.prototype.getColor=function(){return this.color_},e.prototype.getImage=function(t){return this.iconImage_.getImage(t)},e.prototype.getPixelRatio=function(t){return this.iconImage_.getPixelRatio(t)},e.prototype.getImageSize=function(){return this.iconImage_.getSize()},e.prototype.getImageState=function(){return this.iconImage_.getImageState()},e.prototype.getHitDetectionImage=function(){return this.iconImage_.getHitDetectionImage()},e.prototype.getOrigin=function(){if(this.origin_)return this.origin_;var t=this.offset_;if(this.offsetOrigin_!=$i.TOP_LEFT){var n=this.getSize(),i=this.iconImage_.getSize();if(!n||!i)return null;t=t.slice(),(this.offsetOrigin_==$i.TOP_RIGHT||this.offsetOrigin_==$i.BOTTOM_RIGHT)&&(t[0]=i[0]-n[0]-t[0]),(this.offsetOrigin_==$i.BOTTOM_LEFT||this.offsetOrigin_==$i.BOTTOM_RIGHT)&&(t[1]=i[1]-n[1]-t[1])}return this.origin_=t,this.origin_},e.prototype.getSrc=function(){return this.iconImage_.getSrc()},e.prototype.getSize=function(){return this.size_?this.size_:this.iconImage_.getSize()},e.prototype.listenImageChange=function(t){this.iconImage_.addEventListener(xe.CHANGE,t)},e.prototype.load=function(){this.iconImage_.load()},e.prototype.unlistenImageChange=function(t){this.iconImage_.removeEventListener(xe.CHANGE,t)},e}(M8),L0=_tt,wtt="#333",Ett=function(){function r(e){var t=e||{};this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.scale_=t.scale,this.scaleArray_=Wi(t.scale!==void 0?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.textBaseline_=t.textBaseline,this.fill_=t.fill!==void 0?t.fill:new Ba({color:wtt}),this.maxAngle_=t.maxAngle!==void 0?t.maxAngle:Math.PI/4,this.placement_=t.placement!==void 0?t.placement:P8.POINT,this.overflow_=!!t.overflow,this.stroke_=t.stroke!==void 0?t.stroke:null,this.offsetX_=t.offsetX!==void 0?t.offsetX:0,this.offsetY_=t.offsetY!==void 0?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=t.padding===void 0?null:t.padding}return r.prototype.clone=function(){var e=this.getScale();return new r({font:this.getFont(),placement:this.getPlacement(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(e)?e.slice():e,text:this.getText(),textAlign:this.getTextAlign(),textBaseline:this.getTextBaseline(),fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0})},r.prototype.getOverflow=function(){return this.overflow_},r.prototype.getFont=function(){return this.font_},r.prototype.getMaxAngle=function(){return this.maxAngle_},r.prototype.getPlacement=function(){return this.placement_},r.prototype.getOffsetX=function(){return this.offsetX_},r.prototype.getOffsetY=function(){return this.offsetY_},r.prototype.getFill=function(){return this.fill_},r.prototype.getRotateWithView=function(){return this.rotateWithView_},r.prototype.getRotation=function(){return this.rotation_},r.prototype.getScale=function(){return this.scale_},r.prototype.getScaleArray=function(){return this.scaleArray_},r.prototype.getStroke=function(){return this.stroke_},r.prototype.getText=function(){return this.text_},r.prototype.getTextAlign=function(){return this.textAlign_},r.prototype.getTextBaseline=function(){return this.textBaseline_},r.prototype.getBackgroundFill=function(){return this.backgroundFill_},r.prototype.getBackgroundStroke=function(){return this.backgroundStroke_},r.prototype.getPadding=function(){return this.padding_},r.prototype.setOverflow=function(e){this.overflow_=e},r.prototype.setFont=function(e){this.font_=e},r.prototype.setMaxAngle=function(e){this.maxAngle_=e},r.prototype.setOffsetX=function(e){this.offsetX_=e},r.prototype.setOffsetY=function(e){this.offsetY_=e},r.prototype.setPlacement=function(e){this.placement_=e},r.prototype.setRotateWithView=function(e){this.rotateWithView_=e},r.prototype.setFill=function(e){this.fill_=e},r.prototype.setRotation=function(e){this.rotation_=e},r.prototype.setScale=function(e){this.scale_=e,this.scaleArray_=Wi(e!==void 0?e:1)},r.prototype.setStroke=function(e){this.stroke_=e},r.prototype.setText=function(e){this.text_=e},r.prototype.setTextAlign=function(e){this.textAlign_=e},r.prototype.setTextBaseline=function(e){this.textBaseline_=e},r.prototype.setBackgroundFill=function(e){this.backgroundFill_=e},r.prototype.setBackgroundStroke=function(e){this.backgroundStroke_=e},r.prototype.setPadding=function(e){this.padding_=e},r}(),bd=Ett,hs=.5;function k8(r,e,t,n,i,a,o){var s=r[0]*hs,A=r[1]*hs,l=wo(s,A);l.imageSmoothingEnabled=!1;for(var u=l.canvas,c=new VF(l,hs,i,null,o),h=t.length,f=Math.floor((256*256*256-1)/h),d={},g=1;g<=h;++g){var m=t[g-1],v=m.getStyleFunction()||n;if(n){var y=v(m,a);if(y){Array.isArray(y)||(y=[y]);for(var w=g*f,C="#"+("000000"+w.toString(16)).slice(-6),O=0,F=y.length;O<F;++O){var I=y[O],T=I.getGeometryFunction()(m);if(!(!T||!Xn(i,T.getExtent()))){var L=I.clone(),N=L.getFill();N&&N.setColor(C);var x=L.getStroke();x&&(x.setColor(C),x.setLineDash(null)),L.setText(void 0);var S=I.getImage();if(S&&S.getOpacity()!==0){var P=S.getImageSize();if(!P)continue;var U=wo(P[0],P[1],void 0,{alpha:!1}),tt=U.canvas;U.fillStyle=C,U.fillRect(0,0,tt.width,tt.height),L.setImage(new L0({img:tt,imgSize:P,anchor:S.getAnchor(),anchorXUnits:uo.PIXELS,anchorYUnits:uo.PIXELS,offset:S.getOrigin(),opacity:1,size:S.getSize(),scale:S.getScale(),rotation:S.getRotation(),rotateWithView:S.getRotateWithView()}))}var q=L.getZIndex()||0,rt=d[q];rt||(rt={},d[q]=rt,rt[pt.POLYGON]=[],rt[pt.CIRCLE]=[],rt[pt.LINE_STRING]=[],rt[pt.POINT]=[]),rt[T.getType().replace("Multi","")].push(T,L)}}}}}for(var nt=Object.keys(d).map(Number).sort(sh),g=0,At=nt.length;g<At;++g){var rt=d[nt[g]];for(var ct in rt)for(var Tt=rt[ct],O=0,F=Tt.length;O<F;O+=2){c.setStyle(Tt[O+1]);for(var M=0,W=e.length;M<W;++M)c.setTransform(e[M]),c.drawGeometry(Tt[O])}}return l.getImageData(0,0,u.width,u.height)}function H8(r,e,t){var n=[];if(t){var i=Math.floor(Math.round(r[0])*hs),a=Math.floor(Math.round(r[1])*hs),o=(Un(i,0,t.width-1)+Un(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 Ctt=.5,G8={Point:Ott,LineString:xtt,Polygon:Rtt,MultiPoint:Ftt,MultiLineString:Itt,MultiPolygon:Ltt,GeometryCollection:Stt,Circle:btt};function Btt(r,e){return parseInt(Ee(r),10)-parseInt(Ee(e),10)}function $8(r,e){var t=_x(r,e);return t*t}function _x(r,e){return Ctt*r/e}function btt(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),Er.CIRCLE);s.setFillStrokeStyle(a,o),s.drawCircle(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function eE(r,e,t,n,i,a,o){var s=!1,A=t.getImage();if(A){var l=A.getImageState();l==rr.LOADED||l==rr.ERROR?A.unlistenImageChange(i):(l==rr.IDLE&&A.load(),l=A.getImageState(),A.listenImageChange(i),s=!0)}return Ttt(r,e,t,n,a,o),s}function Ttt(r,e,t,n,i,a){var o=t.getGeometryFunction()(e);if(o){var s=o.simplifyTransformed(n,i),A=t.getRenderer();if(A)V8(r,s,t,e);else{var l=G8[s.getType()];l(r,s,t,e,a)}}}function V8(r,e,t,n){if(e.getType()==pt.GEOMETRY_COLLECTION){for(var i=e.getGeometries(),a=0,o=i.length;a<o;++a)V8(r,i[a],t,n);return}var s=r.getBuilder(t.getZIndex(),Er.DEFAULT);s.drawCustom(e,n,t.getRenderer(),t.getHitDetectionRenderer())}function Stt(r,e,t,n,i){var a=e.getGeometriesArray(),o,s;for(o=0,s=a.length;o<s;++o){var A=G8[a[o].getType()];A(r,a[o],t,n,i)}}function xtt(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),Er.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(),Er.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function Itt(r,e,t,n,i){var a=t.getStroke();if(a){var o=r.getBuilder(t.getZIndex(),Er.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(),Er.TEXT);A.setTextStyle(s),A.drawText(e,n)}}function Ltt(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(o||a){var s=r.getBuilder(t.getZIndex(),Er.POLYGON);s.setFillStrokeStyle(a,o),s.drawMultiPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(A),l.drawText(e,n)}}function Ott(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()!=rr.LOADED)return;var A=r.getBuilder(t.getZIndex(),Er.IMAGE);A.setImageStyle(a,s),A.drawPoint(e,n)}if(o&&o.getText()){var l=r.getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function Ftt(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()!=rr.LOADED)return;var A=r.getBuilder(t.getZIndex(),Er.IMAGE);A.setImageStyle(a,s),A.drawMultiPoint(e,n)}if(o&&o.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(o,s),l.drawText(e,n)}}function Rtt(r,e,t,n,i){var a=t.getFill(),o=t.getStroke();if(a||o){var s=r.getBuilder(t.getZIndex(),Er.POLYGON);s.setFillStrokeStyle(a,o),s.drawPolygon(e,n)}var A=t.getText();if(A&&A.getText()){var l=(i||r).getBuilder(t.getZIndex(),Er.TEXT);l.setTextStyle(A),l.drawText(e,n)}}var Mtt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ntt=function(r){Mtt(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_=Ui(),n.wrappedRenderedExtent_=Ui(),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,d=n.viewHints,g=!(d[In.ANIMATING]||d[In.INTERACTING]),m=this.context,v=Math.round(n.size[0]*f),y=Math.round(n.size[1]*f),w=h.getWrapX()&&l.canWrapX(),C=w?jr(c):null,O=w?Math.ceil((a[2]-c[2])/C)+1:1,F=w?Math.floor((a[0]-c[0])/C):0;do{var I=this.getRenderTransform(s,A,u,f,v,y,F*C);t.execute(m,1,I,u,g,void 0,i)}while(++F<O)},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];AX(this.pixelTransform,1/i,1/i),y0(this.inversePixelTransform,this.pixelTransform);var o=sF(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 d=!1,g=!0;if(a.extent&&this.clipping){var m=ds(a.extent);g=Xn(m,t.extent),d=g&&!fs(m,t.extent),d&&this.clipUnrotated(s,t,m)}g&&this.renderWorlds(l,t),d&&s.restore(),this.postRender(s,t);var v=Yk(a.opacity),y=this.container;return v!==y.style.opacity&&(y.style.opacity=v),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];bn(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]*hs,f=i[1]*hs;c.push(this.getRenderTransform(a,o,s,hs,h,f,0).slice());var d=u.getSource(),g=A.getExtent();if(d.getWrapX()&&A.canWrapX()&&!fs(g,l)){for(var m=l[0],v=jr(g),y=0,w=void 0;m<g[0];)--y,w=v*y,c.push(this.getRenderTransform(a,o,s,hs,h,f,w).slice()),m+=v;for(y=0,m=l[2];m>g[2];)++y,w=v*y,c.push(this.getRenderTransform(a,o,s,hs,h,f,w).slice()),m-=v}this.hitDetectionImageData_=k8(i,c,this.renderedFeatures_,u.getStyleFunction(),l,o,s)}n(H8(t,this.renderedFeatures_,this.hitDetectionImageData_))}.bind(this))},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){var s=this;if(this.replayGroup_){var A=n.viewState.resolution,l=n.viewState.rotation,u=this.getLayer(),c={},h=function(g,m,v){var y=Ee(g),w=c[y];if(w){if(w!==!0&&v<w.distanceSq){if(v===0)return c[y]=!0,o.splice(o.lastIndexOf(w),1),a(g,u,m);w.geometry=m,w.distanceSq=v}}else{if(v===0)return c[y]=!0,a(g,u,m);o.push(c[y]={feature:g,layer:u,geometry:m,distanceSq:v,callback:a})}},f,d=[this.replayGroup_];return this.declutterExecutorGroup&&d.push(this.declutterExecutorGroup),d.some(function(g){return f=g.forEachFeatureAtCoordinate(t,A,l,i,h,g===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[In.ANIMATING],o=t.viewHints[In.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,d=n.getRevision(),g=n.getRenderBuffer(),m=n.getRenderOrder();m===void 0&&(m=Btt);var v=u.center.slice(),y=_o(l,g*h),w=y.slice(),C=[y.slice()],O=c.getExtent();if(i.getWrapX()&&c.canWrapX()&&!fs(O,t.extent)){var F=jr(O),I=Math.max(jr(y)/2,F);y[0]=O[0]-I,y[2]=O[2]+I,vF(v,c);var T=Pk(C[0],c);T[0]<O[0]&&T[2]<O[2]?C.push([T[0]+F,T[1],T[2]+F,T[3]]):T[0]>O[0]&&T[2]>O[2]&&C.push([T[0]-F,T[1],T[2]-F,T[3]])}if(!this.dirty_&&this.renderedResolution_==h&&this.renderedRevision_==d&&this.renderedRenderOrder_==m&&fs(this.wrappedRenderedExtent_,y))return Fu(this.renderedExtent_,w)||(this.hitDetectionImageData_=null,this.renderedExtent_=w),this.renderedCenter_=v,this.replayGroupChanged=!1,!0;this.replayGroup_=null,this.dirty_=!1;var L=new Jw(_x(h,f),y,h,f),N;this.getLayer().getDeclutter()&&(N=new Jw(_x(h,f),y,h,f));for(var x,S,P,S=0,P=C.length;S<P;++S)i.loadFeatures(C[S],h,c);var U=$8(h,f),tt=function(ct){var Tt,M=ct.getStyleFunction()||n.getStyleFunction();if(M&&(Tt=M(ct,h)),Tt){var W=this.renderFeature(ct,U,Tt,L,x,N);this.dirty_=this.dirty_||W}}.bind(this),q=IC(y),rt=i.getFeaturesInExtent(q);m&&rt.sort(m);for(var S=0,P=rt.length;S<P;++S)tt(rt[S]);this.renderedFeatures_=rt;var nt=L.finish(),At=new tE(y,h,f,i.getOverlaps(),nt,n.getRenderBuffer());return N&&(this.declutterExecutorGroup=new tE(y,h,f,i.getOverlaps(),N.finish(),n.getRenderBuffer())),this.renderedResolution_=h,this.renderedRevision_=d,this.renderedRenderOrder_=m,this.renderedExtent_=w,this.wrappedRenderedExtent_=y,this.renderedCenter_=v,this.renderedProjection_=c,this.replayGroup_=At,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=eE(a,t,i[l],n,this.boundHandleStyleImageChange_,o,s)||A;else A=eE(a,t,i,n,this.boundHandleStyleImageChange_,o,s);return A},e}($F),Ptt=Ntt,Utt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Dtt=function(r){Utt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Ptt(this)},e}(UC),wl=Dtt,Qtt=function(){function r(e){this.rbush_=new R8(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_[Ee(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_[Ee(s)]=A}this.rbush_.load(n)},r.prototype.remove=function(e){var t=Ee(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_[Ee(t)],i=[n.minX,n.minY,n.maxX,n.maxY];gl(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 nd(this.items_)},r.prototype.clear=function(){this.rbush_.clear(),this.items_={}},r.prototype.getExtent=function(e){var t=this.rbush_.toJSON();return ko(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}(),rE=Qtt,ktt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Htt=function(r){ktt(e,r);function e(t){var n=r.call(this)||this;n.projection=Ve(t.projection),n.attributions_=VP(t.attributions),n.attributionsCollapsible_=t.attributionsCollapsible!==void 0?t.attributionsCollapsible:!0,n.loading=!1,n.state_=t.state!==void 0?t.state:co.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 Re()},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_=VP(t),this.changed()},e.prototype.setState=function(t){this.state_=t,this.changed()},e}(Li);function VP(r){return r?Array.isArray(r)?function(e){return r}:typeof r=="function"?r:function(e){return[r]}:null}var DC=Htt,Vi={ADDFEATURE:"addfeature",CHANGEFEATURE:"changefeature",CLEAR:"clear",REMOVEFEATURE:"removefeature",FEATURESLOADSTART:"featuresloadstart",FEATURESLOADEND:"featuresloadend",FEATURESLOADERROR:"featuresloaderror"};function j8(r,e){return[[-1/0,-1/0,1/0,1/0]]}function Gtt(r,e){return[r]}function $tt(r){return function(e,t,n){var i=r.getZForResolution(Pq(t)),a=r.getTileRangeForExtentAndZ(ds(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(IC(r.getTileCoordExtent(s)));return o}}var Vtt=Object.freeze(Object.defineProperty({__proto__:null,all:j8,bbox:Gtt,tile:$tt},Symbol.toStringTag,{value:"Module"})),jtt=!1;function Ktt(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()==hA.ARRAY_BUFFER&&(s.responseType="arraybuffer"),s.withCredentials=jtt,s.onload=function(A){if(!s.status||s.status>=200&&s.status<300){var l=e.getType(),u=void 0;l==hA.JSON||l==hA.TEXT?u=s.responseText:l==hA.XML?(u=s.responseXML,u||(u=new DOMParser().parseFromString(s.responseText,"application/xml"))):l==hA.ARRAY_BUFFER&&(u=s.response),u?a(e.readFeatures(u,{extent:t,featureProjection:i}),e.readProjection(u)):o()}else o()},s.onerror=o,s.send()}function jP(r,e){return function(t,n,i,a,o){var s=this;Ktt(r,e,t,n,i,function(A,l){s.addFeatures(A),a!==void 0&&a(A)},o||td)}}var K8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dc=function(r){K8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.feature=n,a.features=i,a}return e}($o),Wtt=function(r){K8(e,r);function e(t){var n=this,i=t||{};n=r.call(this,{attributions:i.attributions,interpolate:!0,projection:void 0,state:co.READY,wrapX:i.wrapX!==void 0?i.wrapX:!0})||this,n.on,n.once,n.un,n.loader_=td,n.format_=i.format,n.overlaps_=i.overlaps===void 0?!0:i.overlaps,n.url_=i.url,i.loader!==void 0?n.loader_=i.loader:n.url_!==void 0&&(Le(n.format_,7),n.loader_=jP(n.url_,n.format_)),n.strategy_=i.strategy!==void 0?i.strategy:j8;var a=i.useSpatialIndex!==void 0?i.useSpatialIndex:!0;n.featuresRtree_=a?new rE:null,n.loadedExtentsRtree_=new rE,n.loadingExtentsCount_=0,n.nullGeometryFeatures_={},n.idIndex_={},n.uidIndex_={},n.featureChangeKeys_={},n.featuresCollection_=null;var o,s;return Array.isArray(i.features)?s=i.features:i.features&&(o=i.features,s=o.getArray()),!a&&o===void 0&&(o=new xi(s)),s!==void 0&&n.addFeaturesInternal(s),o!==void 0&&n.bindFeaturesCollection_(o),n}return e.prototype.addFeature=function(t){this.addFeatureInternal(t),this.changed()},e.prototype.addFeatureInternal=function(t){var n=Ee(t);if(!this.addToIndex_(n,t)){this.featuresCollection_&&this.featuresCollection_.remove(t);return}this.setupChangeEvents_(n,t);var i=t.getGeometry();if(i){var a=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(a,t)}else this.nullGeometryFeatures_[n]=t;this.dispatchEvent(new dc(Vi.ADDFEATURE,t))},e.prototype.setupChangeEvents_=function(t,n){this.featureChangeKeys_[t]=[je(n,xe.CHANGE,this.handleFeatureChange_,this),je(n,rd.PROPERTYCHANGE,this.handleFeatureChange_,this)]},e.prototype.addToIndex_=function(t,n){var i=!0,a=n.getId();return a!==void 0&&(a.toString()in this.idIndex_?i=!1:this.idIndex_[a.toString()]=n),i&&(Le(!(t in this.uidIndex_),30),this.uidIndex_[t]=n),i},e.prototype.addFeatures=function(t){this.addFeaturesInternal(t),this.changed()},e.prototype.addFeaturesInternal=function(t){for(var n=[],i=[],a=[],o=0,s=t.length;o<s;o++){var A=t[o],l=Ee(A);this.addToIndex_(l,A)&&i.push(A)}for(var o=0,u=i.length;o<u;o++){var A=i[o],l=Ee(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(Vi.ADDFEATURE))for(var o=0,f=i.length;o<f;o++)this.dispatchEvent(new dc(Vi.ADDFEATURE,i[o]))},e.prototype.bindFeaturesCollection_=function(t){var n=!1;this.addEventListener(Vi.ADDFEATURE,function(i){n||(n=!0,t.push(i.feature),n=!1)}),this.addEventListener(Vi.REMOVEFEATURE,function(i){n||(n=!0,t.remove(i.feature),n=!1)}),t.addEventListener(si.ADD,function(i){n||(n=!0,this.addFeature(i.element),n=!1)}.bind(this)),t.addEventListener(si.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(Yr)}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 dc(Vi.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(),nd(this.nullGeometryFeatures_)||tn(t,fF(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||ll;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 d=Math.sqrt(A);l[0]=i-d,l[1]=a-d,l[2]=i+d,l[3]=a+d}}}),o},e.prototype.getExtent=function(t){return this.featuresRtree_.getExtent(t)},e.prototype.getFeatureById=function(t){var n=this.idIndex_[t.toString()];return n!==void 0?n:null},e.prototype.getFeatureByUid=function(t){var n=this.uidIndex_[t];return n!==void 0?n:null},e.prototype.getFormat=function(){return this.format_},e.prototype.getOverlaps=function(){return this.overlaps_},e.prototype.getUrl=function(){return this.url_},e.prototype.handleFeatureChange_=function(t){var n=t.target,i=Ee(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 dc(Vi.CHANGEFEATURE,n))},e.prototype.hasFeature=function(t){var n=t.getId();return n!==void 0?n in this.idIndex_:Ee(t)in this.uidIndex_},e.prototype.isEmpty=function(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&nd(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],d=a.forEachInExtent(f,function(g){return fs(g.extent,f)});d||(++A.loadingExtentsCount_,A.dispatchEvent(new dc(Vi.FEATURESLOADSTART)),A.loader_.call(A,f,n,i,function(g){--this.loadingExtentsCount_,this.dispatchEvent(new dc(Vi.FEATURESLOADEND,void 0,g))}.bind(A),function(){--this.loadingExtentsCount_,this.dispatchEvent(new dc(Vi.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(gl(a.extent,t))return i=a,!0}),i&&n.remove(i)},e.prototype.removeFeature=function(t){if(t){var n=Ee(t);n in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[n]:this.featuresRtree_&&this.featuresRtree_.remove(t);var i=this.removeFeatureInternal(t);i&&this.changed()}},e.prototype.removeFeatureInternal=function(t){var n=Ee(t),i=this.featureChangeKeys_[n];if(i){i.forEach(Yr),delete this.featureChangeKeys_[n];var a=t.getId();return a!==void 0&&delete this.idIndex_[a.toString()],delete this.uidIndex_[n],this.dispatchEvent(new dc(Vi.REMOVEFEATURE,t)),t}},e.prototype.removeFromIdIndex_=function(t){var n=!1;for(var i in this.idIndex_)if(this.idIndex_[i]===t){delete this.idIndex_[i],n=!0;break}return n},e.prototype.setLoader=function(t){this.loader_=t},e.prototype.setUrl=function(t){Le(this.format_,7),this.url_=t,this.setLoader(jP(t,this.format_))},e}(DC),Mu=Wtt,W8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Gr={POINT:"Point",LINE_STRING:"LineString",POLYGON:"Polygon",CIRCLE:"Circle"},Y_={DRAWSTART:"drawstart",DRAWEND:"drawend",DRAWABORT:"drawabort"},X_=function(r){W8(e,r);function e(t,n){var i=r.call(this,t)||this;return i.feature=n,i}return e}($o),ztt=function(r){W8(e,r);function e(t){var n=this,i=t;i.stopDown||(i.stopDown=_d),n=r.call(this,i)||this,n.on,n.once,n.un,n.shouldHandle_=!1,n.downPx_=null,n.downTimeout_,n.lastDragTime_,n.pointerType_,n.freehand_=!1,n.source_=t.source?t.source:null,n.features_=t.features?t.features:null,n.snapTolerance_=t.snapTolerance?t.snapTolerance:12,n.type_=t.type,n.mode_=Xtt(n.type_),n.stopClick_=!!t.stopClick,n.minPoints_=t.minPoints?t.minPoints:n.mode_===Gr.POLYGON?3:2,n.maxPoints_=n.mode_===Gr.CIRCLE?2:t.maxPoints?t.maxPoints:1/0,n.finishCondition_=t.finishCondition?t.finishCondition:ll;var a=t.geometryFunction;if(!a){var o=n.mode_;if(o===Gr.CIRCLE)a=function(A,l,u){var c=l||new HF([NaN,NaN]),h=Mn(A[0]),f=du(h,Mn(A[A.length-1]));return c.setCenterAndRadius(h,Math.sqrt(f)),c};else{var s;o===Gr.POINT?s=xr:o===Gr.LINE_STRING?s=en:o===Gr.POLYGON&&(s=Dn),a=function(A,l,u){return l?o===Gr.POLYGON?A[0].length?l.setCoordinates([A[0].concat([A[0][0]])]):l.setCoordinates([]):l.setCoordinates(A):l=new s(A),l}}}return n.geometryFunction_=a,n.dragVertexDelay_=t.dragVertexDelay!==void 0?t.dragVertexDelay:500,n.finishCoordinate_=null,n.sketchFeature_=null,n.sketchPoint_=null,n.sketchCoords_=null,n.sketchLine_=null,n.sketchLineCoords_=null,n.squaredClickTolerance_=t.clickTolerance?t.clickTolerance*t.clickTolerance:36,n.overlay_=new wl({source:new Mu({useSpatialIndex:!1,wrapX:t.wrapX?t.wrapX:!1}),style:t.style?t.style:Ytt(),updateWhileInteracting:!0}),n.geometryName_=t.geometryName,n.condition_=t.condition?t.condition:PC,n.freehandCondition_,t.freehand?n.freehandCondition_=MC:n.freehandCondition_=t.freehandCondition?t.freehandCondition:T0,n.addChangeListener(vx.ACTIVE,n.updateState_),n}return e.prototype.setMap=function(t){r.prototype.setMap.call(this,t),this.updateState_()},e.prototype.getOverlay=function(){return this.overlay_},e.prototype.handleEvent=function(t){t.originalEvent.type===xe.CONTEXTMENU&&t.originalEvent.preventDefault(),this.freehand_=this.mode_!==Gr.POINT&&this.freehandCondition_(t);var n=t.type===yr.POINTERMOVE,i=!0;if(!this.freehand_&&this.lastDragTime_&&t.type===yr.POINTERDRAG){var a=Date.now();a-this.lastDragTime_>=this.dragVertexDelay_?(this.downPx_=t.pixel,this.shouldHandle_=!this.freehand_,n=!0):this.lastDragTime_=void 0,this.shouldHandle_&&this.downTimeout_!==void 0&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0)}return this.freehand_&&t.type===yr.POINTERDRAG&&this.sketchFeature_!==null?(this.addToDrawing_(t.coordinate),i=!1):this.freehand_&&t.type===yr.POINTERDOWN?i=!1:n&&this.getPointerCount()<2?(i=t.type===yr.POINTERMOVE,i&&this.freehand_?(this.handlePointerMove_(t),this.shouldHandle_&&t.originalEvent.preventDefault()):(t.originalEvent.pointerType==="mouse"||t.type===yr.POINTERDRAG&&this.downTimeout_===void 0)&&this.handlePointerMove_(t)):t.type===yr.DBLCLICK&&(i=!1),r.prototype.handleEvent.call(this,t)&&i},e.prototype.handleDownEvent=function(t){return this.shouldHandle_=!this.freehand_,this.freehand_?(this.downPx_=t.pixel,this.finishCoordinate_||this.startDrawing_(t.coordinate),!0):this.condition_(t)?(this.lastDragTime_=Date.now(),this.downTimeout_=setTimeout(function(){this.handlePointerMove_(new nu(yr.POINTERMOVE,t.map,t.originalEvent,!1,t.frameState))}.bind(this),this.dragVertexDelay_),this.downPx_=t.pixel,!0):(this.lastDragTime_=void 0,!1)},e.prototype.handleUpEvent=function(t){var n=!0;if(this.getPointerCount()===0)if(this.downTimeout_&&(clearTimeout(this.downTimeout_),this.downTimeout_=void 0),this.handlePointerMove_(t),this.shouldHandle_){var i=!this.finishCoordinate_;i&&this.startDrawing_(t.coordinate),!i&&this.freehand_?this.finishDrawing():!this.freehand_&&(!i||this.mode_===Gr.POINT)&&(this.atFinish_(t.pixel)?this.finishCondition_(t)&&this.finishDrawing():this.addToDrawing_(t.coordinate)),n=!1}else this.freehand_&&this.abortDrawing();return!n&&this.stopClick_&&t.preventDefault(),n},e.prototype.handlePointerMove_=function(t){if(this.pointerType_=t.originalEvent.pointerType,this.downPx_&&(!this.freehand_&&this.shouldHandle_||this.freehand_&&!this.shouldHandle_)){var n=this.downPx_,i=t.pixel,a=n[0]-i[0],o=n[1]-i[1],s=a*a+o*o;if(this.shouldHandle_=this.freehand_?s>this.squaredClickTolerance_:s<=this.squaredClickTolerance_,!this.shouldHandle_)return}this.finishCoordinate_?this.modifyDrawing_(t.coordinate):this.createOrUpdateSketchPoint_(t.coordinate.slice())},e.prototype.atFinish_=function(t){var n=!1;if(this.sketchFeature_){var i=!1,a=[this.finishCoordinate_],o=this.mode_;if(o===Gr.POINT)n=!0;else if(o===Gr.CIRCLE)n=this.sketchCoords_.length===2;else if(o===Gr.LINE_STRING)i=this.sketchCoords_.length>this.minPoints_;else if(o===Gr.POLYGON){var s=this.sketchCoords_;i=s[0].length>this.minPoints_,a=[s[0][0],s[0][s[0].length-2]]}if(i)for(var A=this.getMap(),l=0,u=a.length;l<u;l++){var c=a[l],h=A.getPixelFromCoordinate(c),f=t[0]-h[0],d=t[1]-h[1],g=this.freehand_?1:this.snapTolerance_;if(n=Math.sqrt(f*f+d*d)<=g,n){this.finishCoordinate_=c;break}}}return n},e.prototype.createOrUpdateSketchPoint_=function(t){if(!this.sketchPoint_)this.sketchPoint_=new _r(new xr(t)),this.updateSketchFeatures_();else{var n=this.sketchPoint_.getGeometry();n.setCoordinates(t)}},e.prototype.createOrUpdateCustomSketchLine_=function(t){this.sketchLine_||(this.sketchLine_=new _r);var n=t.getLinearRing(0),i=this.sketchLine_.getGeometry();i?(i.setFlatCoordinates(n.getLayout(),n.getFlatCoordinates()),i.changed()):(i=new en(n.getFlatCoordinates(),n.getLayout()),this.sketchLine_.setGeometry(i))},e.prototype.startDrawing_=function(t){var n=this.getMap().getView().getProjection();this.finishCoordinate_=t,this.mode_===Gr.POINT?this.sketchCoords_=t.slice():this.mode_===Gr.POLYGON?(this.sketchCoords_=[[t.slice(),t.slice()]],this.sketchLineCoords_=this.sketchCoords_[0]):this.sketchCoords_=[t.slice(),t.slice()],this.sketchLineCoords_&&(this.sketchLine_=new _r(new en(this.sketchLineCoords_)));var i=this.geometryFunction_(this.sketchCoords_,void 0,n);this.sketchFeature_=new _r,this.geometryName_&&this.sketchFeature_.setGeometryName(this.geometryName_),this.sketchFeature_.setGeometry(i),this.updateSketchFeatures_(),this.dispatchEvent(new X_(Y_.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_===Gr.POINT?s=this.sketchCoords_:this.mode_===Gr.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()===pt.POLYGON&&this.mode_!==Gr.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===Gr.LINE_STRING||s===Gr.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===Gr.POLYGON&&(o=this.sketchCoords_[0],o.length>=this.maxPoints_&&(this.freehand_?o.pop():a=!0),o.push(t.slice()),a&&(this.finishCoordinate_=o[0]),this.geometryFunction_(this.sketchCoords_,n,i)),this.createOrUpdateSketchPoint_(t.slice()),this.updateSketchFeatures_(),a&&this.finishDrawing()},e.prototype.removeLastPoint=function(){if(this.sketchFeature_){var t=this.sketchFeature_.getGeometry(),n=this.getMap().getView().getProjection(),i,a=this.mode_;if(a===Gr.LINE_STRING||a===Gr.CIRCLE){if(i=this.sketchCoords_,i.splice(-2,1),i.length>=2){this.finishCoordinate_=i[i.length-2].slice();var o=this.finishCoordinate_.slice();i[i.length-1]=o,this.createOrUpdateSketchPoint_(o)}this.geometryFunction_(i,t,n),t.getType()===pt.POLYGON&&this.sketchLine_&&this.createOrUpdateCustomSketchLine_(t)}else if(a===Gr.POLYGON){i=this.sketchCoords_[0],i.splice(-2,1);var s=this.sketchLine_.getGeometry();if(i.length>=2){var o=i[i.length-2].slice();i[i.length-1]=o,this.createOrUpdateSketchPoint_(o)}s.setCoordinates(i),this.geometryFunction_(this.sketchCoords_,t,n)}i.length===1&&this.abortDrawing(),this.updateSketchFeatures_()}},e.prototype.finishDrawing=function(){var t=this.abortDrawing_();if(t){var n=this.sketchCoords_,i=t.getGeometry(),a=this.getMap().getView().getProjection();this.mode_===Gr.LINE_STRING?(n.pop(),this.geometryFunction_(n,i,a)):this.mode_===Gr.POLYGON&&(n[0].pop(),this.geometryFunction_(n,i,a),n=i.getCoordinates()),this.type_===pt.MULTI_POINT?t.setGeometry(new Gs([n])):this.type_===pt.MULTI_LINE_STRING?t.setGeometry(new Xa([n])):this.type_===pt.MULTI_POLYGON&&t.setGeometry(new qa([n])),this.dispatchEvent(new X_(Y_.DRAWEND,t)),this.features_&&this.features_.push(t),this.source_&&this.source_.addFeature(t)}},e.prototype.abortDrawing_=function(){this.finishCoordinate_=null;var t=this.sketchFeature_;return this.sketchFeature_=null,this.sketchPoint_=null,this.sketchLine_=null,this.overlay_.getSource().clear(!0),t},e.prototype.abortDrawing=function(){var t=this.abortDrawing_();t&&this.dispatchEvent(new X_(Y_.DRAWABORT,t))},e.prototype.appendCoordinates=function(t){var n=this.mode_,i=!this.sketchFeature_;i&&this.startDrawing_(t[0]);var a;if(n===Gr.LINE_STRING||n===Gr.CIRCLE)a=this.sketchCoords_;else if(n===Gr.POLYGON)a=this.sketchCoords_&&this.sketchCoords_.length?this.sketchCoords_[0]:[];else return;i&&a.shift(),a.pop();for(var o=0;o<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 _r(new xr(a)),this.updateSketchFeatures_(),this.dispatchEvent(new X_(Y_.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}(ws);function Ytt(){var r=GF();return function(e,t){return r[e.getGeometry().getType()]}}function Xtt(r){switch(r){case pt.POINT:case pt.MULTI_POINT:return Gr.POINT;case pt.LINE_STRING:case pt.MULTI_LINE_STRING:return Gr.LINE_STRING;case pt.POLYGON:case pt.MULTI_POLYGON:return Gr.POLYGON;case pt.CIRCLE:return Gr.CIRCLE;default:throw new Error("Invalid type: "+r)}}var KF=ztt,z8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),KP=0,iy=1,WP=[0,0,0,0],cg=[],Vb={MODIFYSTART:"modifystart",MODIFYEND:"modifyend"},jb=function(r){z8(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.features=n,a.mapBrowserEvent=i,a}return e}($o),qtt=function(r){z8(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:kF,n.defaultDeleteCondition_=function(a){return b8(a)&&NC(a)},n.deleteCondition_=t.deleteCondition?t.deleteCondition:n.defaultDeleteCondition_,n.insertVertexCondition_=t.insertVertexCondition?t.insertVertexCondition:MC,n.vertexFeature_=null,n.vertexSegments_=null,n.lastPixel_=[0,0],n.ignoreNextSingleClick_=!1,n.featuresBeingModified_=null,n.rBush_=new rE,n.pixelTolerance_=t.pixelTolerance!==void 0?t.pixelTolerance:10,n.snappedToVertex_=!1,n.changingFeature_=!1,n.dragSegments_=[],n.overlay_=new wl({source:new Mu({useSpatialIndex:!1,wrapX:!!t.wrapX}),style:t.style?t.style:Jtt(),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 xi(n.source_.getFeatures()),n.source_.addEventListener(Vi.ADDFEATURE,n.handleSourceAdd_.bind(n)),n.source_.addEventListener(Vi.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(si.ADD,n.handleFeatureAdd_.bind(n)),n.features_.addEventListener(si.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(xe.CHANGE,this.boundHandleFeatureChange_)},e.prototype.willModifyFeatures_=function(t,n){if(!this.featuresBeingModified_){this.featuresBeingModified_=new xi;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 jb(Vb.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(xe.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(oa(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(oa(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(oa(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),d={feature:t,geometry:n,depth:[A,a],index:c,segment:f};this.rBush_.insert(oa(f),d)}},e.prototype.writeCircleGeometry_=function(t,n){var i=n.getCenter(),a={feature:t,geometry:n,index:KP,segment:[i,i]},o={feature:t,geometry:n,index:iy,segment:[i,i]},s=[a,o];a.featureSegments=s,o.featureSegments=s,this.rBush_.insert(Uf(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 _r(new xr(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==yr.POINTERMOVE&&!this.handlingDownUpSequence&&this.handlePointerMove_(t),this.vertexFeature_&&this.deleteCondition_(t)&&(t.type!=yr.SINGLECLICK||!this.ignoreNextSingleClick_?n=this.removePoint():n=!0),t.type==yr.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,d=l.segment,g=A[1];n.length<c.getStride();)n.push(d[g][n.length]);switch(c.getType()){case pt.POINT:f=n,d[0]=n,d[1]=n;break;case pt.MULTI_POINT:f=c.getCoordinates(),f[l.index]=n,d[0]=n,d[1]=n;break;case pt.LINE_STRING:f=c.getCoordinates(),f[l.index+g]=n,d[g]=n;break;case pt.MULTI_LINE_STRING:f=c.getCoordinates(),f[h[0]][l.index+g]=n,d[g]=n;break;case pt.POLYGON:f=c.getCoordinates(),f[h[0]][l.index+g]=n,d[g]=n;break;case pt.MULTI_POLYGON:f=c.getCoordinates(),f[h[1]][h[0]][l.index+g]=n,d[g]=n;break;case pt.CIRCLE:if(d[0]=n,d[1]=n,l.index===KP)this.changingFeature_=!0,c.setCenter(n),this.changingFeature_=!1;else{this.changingFeature_=!0;var m=t.map.getView().getProjection(),v=dP(Mn(c.getCenter()),Mn(n)),y=ad();if(y){var w=c.clone().transform(y,m);w.setRadius(v),v=w.transform(m,y).getRadius()}c.setRadius(v),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=oa([s]),l=this.rBush_.getInExtent(A),u={};l.sort(Ztt);for(var c=0,h=l.length;c<h;++c){var f=l[c],d=f.segment,g=Ee(f.geometry),m=f.depth;if(m&&(g+="-"+m.join("-")),u[g]||(u[g]=new Array(2)),f.geometry.getType()===pt.CIRCLE&&f.index===iy){var v=YP(n,f,a);lA(v,s)&&!u[g][0]&&(this.dragSegments_.push([f,0]),u[g][0]=f);continue}if(lA(d[0],s)&&!u[g][0]){this.dragSegments_.push([f,0]),u[g][0]=f;continue}if(lA(d[1],s)&&!u[g][1]){if((f.geometry.getType()===pt.LINE_STRING||f.geometry.getType()===pt.MULTI_LINE_STRING)&&u[g][0]&&u[g][0].index===0)continue;this.dragSegments_.push([f,1]),u[g][1]=f;continue}Ee(d)in this.vertexSegments_&&!u[g][0]&&!u[g][1]&&this.insertVertexCondition_(t)&&o.push(f)}o.length&&this.willModifyFeatures_(t,[o]);for(var y=o.length-1;y>=0;--y)this.insertVertex_(o[y],s)}return!!this.vertexFeature_},e.prototype.handleUpEvent=function(t){for(var n=this.dragSegments_.length-1;n>=0;--n){var i=this.dragSegments_[n][0],a=i.geometry;if(a.getType()===pt.CIRCLE){var o=a.getCenter(),s=i.featureSegments[0],A=i.featureSegments[1];s.segment[0]=o,s.segment[1]=o,A.segment[0]=o,A.segment[1]=o,this.rBush_.update(Uf(o),s);var l=a,u=ad();if(u){var c=t.map.getView().getProjection();l=l.clone().transform(u,c),l=d8(l).transform(c,u)}this.rBush_.update(l.getExtent(),A)}else this.rBush_.update(oa(i.segment),i)}return this.featuresBeingModified_&&(this.dispatchEvent(new jb(Vb.MODIFYEND,this.featuresBeingModified_,t)),this.featuresBeingModified_=null),!1},e.prototype.handlePointerMove_=function(t){this.lastPixel_=t.pixel,this.handlePointerAtPixel_(t.pixel,t.map,t.coordinate)},e.prototype.handlePointerAtPixel_=function(t,n,i){var a=this,o=i||n.getCoordinateFromPixel(t),s=n.getView().getProjection(),A=function(U,tt){return zP(o,U,s)-zP(o,tt,s)},l,u;if(this.hitDetection_){var c=typeof this.hitDetection_=="object"?function(U){return U===a.hitDetection_}:void 0;n.forEachFeatureAtPixel(t,function(U,tt,q){if(q=q||U.getGeometry(),q.getType()===pt.POINT&&Ni(a.features_.getArray(),U)){u=q;var rt=q.getFlatCoordinates().slice(0,2);l=[{feature:U,geometry:q,segment:[rt,rt]}]}return!0},{layerFilter:c})}if(!l){var h=ds(Uf(o,WP)),f=n.getView().getResolution()*this.pixelTolerance_,d=IC(_o(h,f,WP));l=this.rBush_.getInExtent(d)}if(l&&l.length>0){var g=l.sort(A)[0],m=g.segment,v=YP(o,g,s),y=n.getPixelFromCoordinate(v),w=dP(t,y);if(u||w<=this.pixelTolerance_){var C={};if(C[Ee(m)]=!0,this.snapToPointer_||(this.delta_[0]=v[0]-o[0],this.delta_[1]=v[1]-o[1]),g.geometry.getType()===pt.CIRCLE&&g.index===iy)this.snappedToVertex_=!0,this.createOrUpdateVertexFeature_(v,[g.feature],[g.geometry]);else{var O=n.getPixelFromCoordinate(m[0]),F=n.getPixelFromCoordinate(m[1]),I=du(y,O),T=du(y,F);w=Math.sqrt(Math.min(I,T)),this.snappedToVertex_=w<=this.pixelTolerance_,this.snappedToVertex_&&(v=I>T?m[1]:m[0]),this.createOrUpdateVertexFeature_(v,[g.feature],[g.geometry]);var L={};L[Ee(g.geometry)]=!0;for(var N=1,x=l.length;N<x;++N){var S=l[N].segment;if(lA(m[0],S[0])&&lA(m[1],S[1])||lA(m[0],S[1])&&lA(m[1],S[0])){var P=Ee(l[N].geometry);P in L||(L[P]=!0,C[Ee(S)]=!0)}else break}}this.vertexSegments_=C;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 pt.MULTI_LINE_STRING:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case pt.POLYGON:l=o.getCoordinates(),l[s[0]].splice(A+1,0,n);break;case pt.MULTI_POLYGON:l=o.getCoordinates(),l[s[1]][s[0]].splice(A+1,0,n);break;case pt.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(oa(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(oa(h.segment),h),this.dragSegments_.push([h,0]),this.ignoreNextSingleClick_=!0},e.prototype.removePoint=function(){if(this.lastPointerEvent_&&this.lastPointerEvent_.type!=yr.POINTERDRAG){var t=this.lastPointerEvent_;this.willModifyFeatures_(t,this.dragSegments_);var n=this.removeVertex_();return this.featuresBeingModified_&&this.dispatchEvent(new jb(Vb.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,d,g;for(l=t.length-1;l>=0;--l)s=t[l],d=s[0],g=Ee(d.feature),d.depth&&(g+="-"+d.depth.join("-")),g in n||(n[g]={}),s[1]===0?(n[g].right=d,n[g].index=d.index):s[1]==1&&(n[g].left=d,n[g].index=d.index+1);for(g in n){switch(f=n[g].right,c=n[g].left,u=n[g].index,h=u-1,c!==void 0?d=c:d=f,h<0&&(h=0),A=d.geometry,o=A.getCoordinates(),a=o,i=!1,A.getType()){case pt.MULTI_LINE_STRING:o[d.depth[0]].length>2&&(o[d.depth[0]].splice(u,1),i=!0);break;case pt.LINE_STRING:o.length>2&&(o.splice(u,1),i=!0);break;case pt.MULTI_POLYGON:a=a[d.depth[1]];case pt.POLYGON:a=a[d.depth[0]],a.length>4&&(u==a.length-1&&(u=0),a.splice(u,1),i=!0,u===0&&(a.pop(),a.push(a[0]),h=a.length-1));break}if(i){this.setGeometryCoordinates_(A,o);var m=[];if(c!==void 0&&(this.rBush_.remove(c),m.push(c.segment[0])),f!==void 0&&(this.rBush_.remove(f),m.push(f.segment[1])),c!==void 0&&f!==void 0){var v={depth:d.depth,feature:d.feature,geometry:d.geometry,index:h,segment:m};this.rBush_.insert(oa(v.segment),v)}this.updateSegmentIndices_(A,u,d.depth,-1),this.vertexFeature_&&(this.overlay_.getSource().removeFeature(this.vertexFeature_),this.vertexFeature_=null),t.length=0}}return i},e.prototype.setGeometryCoordinates_=function(t,n){this.changingFeature_=!0,t.setCoordinates(n),this.changingFeature_=!1},e.prototype.updateSegmentIndices_=function(t,n,i,a){this.rBush_.forEachInExtent(t.getExtent(),function(o){o.geometry===t&&(i===void 0||o.depth===void 0||Fu(o.depth,i))&&o.index>n&&(o.index+=a)})},e}(ws);function Ztt(r,e){return r.index-e.index}function zP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE){var i=n;if(e.index===iy){var a=ad();a&&(i=i.clone().transform(a,t));var o=du(i.getCenter(),Mn(r)),s=Math.sqrt(o)-i.getRadius();return s*s}}var A=Mn(r);return cg[0]=Mn(e.segment[0]),cg[1]=Mn(e.segment[1]),UX(A,cg)}function YP(r,e,t){var n=e.geometry;if(n.getType()===pt.CIRCLE&&e.index===iy){var i=n,a=ad();return a&&(i=i.clone().transform(a,t)),Fg(i.getClosestPoint(Mn(r)))}var o=Mn(r);return cg[0]=Mn(e.segment[0]),cg[1]=Mn(e.segment[1]),Fg(pF(o,cg))}function Jtt(){var r=GF();return function(e,t){return r[pt.POINT]}}var WF=qtt,Y8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),tet={SELECT:"select"},eet=function(r){Y8(e,r);function e(t,n,i,a){var o=r.call(this,t)||this;return o.selected=n,o.deselected=i,o.mapBrowserEvent=a,o}return e}($o),q_={},ret=function(r){Y8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};n.boundAddFeature_=n.addFeature_.bind(n),n.boundRemoveFeature_=n.removeFeature_.bind(n),n.condition_=i.condition?i.condition:NC,n.addCondition_=i.addCondition?i.addCondition:mx,n.removeCondition_=i.removeCondition?i.removeCondition:mx,n.toggleCondition_=i.toggleCondition?i.toggleCondition:T0,n.multi_=i.multi?i.multi:!1,n.filter_=i.filter?i.filter:ll,n.hitTolerance_=i.hitTolerance?i.hitTolerance:0,n.style_=i.style!==void 0?i.style:net(),n.features_=i.features||new xi;var a;if(i.layers)if(typeof i.layers=="function")a=i.layers;else{var o=i.layers;a=function(s){return Ni(o,s)}}else a=ll;return n.layerFilter_=a,n.featureLayerAssociation_={},n}return e.prototype.addFeatureLayerAssociation_=function(t,n){this.featureLayerAssociation_[Ee(t)]=n},e.prototype.getFeatures=function(){return this.features_},e.prototype.getHitTolerance=function(){return this.hitTolerance_},e.prototype.getLayer=function(t){return this.featureLayerAssociation_[Ee(t)]},e.prototype.setHitTolerance=function(t){this.hitTolerance_=t},e.prototype.setMap=function(t){var n=this.getMap();n&&this.style_&&this.features_.forEach(this.restorePreviousStyle_.bind(this)),r.prototype.setMap.call(this,t),t?(this.features_.addEventListener(si.ADD,this.boundAddFeature_),this.features_.addEventListener(si.REMOVE,this.boundRemoveFeature_),this.style_&&this.features_.forEach(this.applySelectedStyle_.bind(this))):(this.features_.removeEventListener(si.ADD,this.boundAddFeature_),this.features_.removeEventListener(si.REMOVE,this.boundRemoveFeature_))},e.prototype.addFeature_=function(t){var n=t.element;if(this.style_&&this.applySelectedStyle_(n),!this.getLayer(n)){var i=this.getMap().getAllLayers().find(function(a){if(a instanceof wl&&a.getSource()&&a.getSource().hasFeature(n))return a});i&&this.addFeatureLayerAssociation_(n,i)}},e.prototype.removeFeature_=function(t){var n=t.element;this.style_&&this.restorePreviousStyle_(n)},e.prototype.getStyle=function(){return this.style_},e.prototype.applySelectedStyle_=function(t){var n=Ee(t);n in q_||(q_[n]=t.getStyle()),t.setStyle(this.style_)},e.prototype.restorePreviousStyle_=function(t){for(var n=this.getMap().getInteractions().getArray(),i=n.length-1;i>=0;--i){var a=n[i];if(a!==this&&a instanceof e&&a.getStyle()&&a.getFeatures().getArray().lastIndexOf(t)!==-1){t.setStyle(a.getStyle());return}}var o=Ee(t);t.setStyle(q_[o]),delete q_[o]},e.prototype.removeFeatureLayerAssociation_=function(t){delete this.featureLayerAssociation_[Ee(t)]},e.prototype.handleEvent=function(t){if(!this.condition_(t))return!0;var n=this.addCondition_(t),i=this.removeCondition_(t),a=this.toggleCondition_(t),o=!n&&!i&&!a,s=t.map,A=this.getFeatures(),l=[],u=[];if(o){wd(this.featureLayerAssociation_),s.forEachFeatureAtPixel(t.pixel,function(g,m){if(this.filter_(g,m))return this.addFeatureLayerAssociation_(g,m),u.push(g),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var c=A.getLength()-1;c>=0;--c){var h=A.item(c),f=u.indexOf(h);f>-1?u.splice(f,1):(A.remove(h),l.push(h))}u.length!==0&&A.extend(u)}else{s.forEachFeatureAtPixel(t.pixel,function(g,m){if(this.filter_(g,m))return(n||a)&&!Ni(A.getArray(),g)?(this.addFeatureLayerAssociation_(g,m),u.push(g)):(i||a)&&Ni(A.getArray(),g)&&(l.push(g),this.removeFeatureLayerAssociation_(g)),!this.multi_}.bind(this),{layerFilter:this.layerFilter_,hitTolerance:this.hitTolerance_});for(var d=l.length-1;d>=0;--d)A.remove(l[d]);A.extend(u)}return(u.length>0||l.length>0)&&this.dispatchEvent(new eet(tet.SELECT,u,l,t)),!0},e}(iv);function net(){var r=GF();return tn(r[pt.POLYGON],r[pt.LINE_STRING]),tn(r[pt.GEOMETRY_COLLECTION],r[pt.LINE_STRING]),function(e){return e.getGeometry()?r[e.getGeometry().getType()]:null}}var QC=ret,iet=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function XP(r){if(r.feature)return r.feature;if(r.element)return r.element}var Kb=[],aet=function(r){iet(e,r);function e(t){var n=this,i=t||{},a=i;return a.handleDownEvent||(a.handleDownEvent=ll),a.stopDown||(a.stopDown=_d),n=r.call(this,a)||this,n.source_=i.source?i.source:null,n.vertex_=i.vertex!==void 0?i.vertex:!0,n.edge_=i.edge!==void 0?i.edge:!0,n.features_=i.features?i.features:null,n.featuresListenerKeys_=[],n.featureChangeListenerKeys_={},n.indexedFeaturesExtents_={},n.pendingFeatures_={},n.pixelTolerance_=i.pixelTolerance!==void 0?i.pixelTolerance:10,n.rBush_=new rE,n.GEOMETRY_SEGMENTERS_={Point:n.segmentPointGemetry_.bind(n),LineString:n.segmentLineStringGemetry_.bind(n),LinearRing:n.segmentLineStringGemetry_.bind(n),Polygon:n.segmentPolygonGemetry_.bind(n),MultiPoint:n.segmentMultiPointGemetry_.bind(n),MultiLineString:n.segmentMultiLineStringGemetry_.bind(n),MultiPolygon:n.segmentMultiPolygonGemetry_.bind(n),GeometryCollection:n.segmentGeometryCollectionGemetry_.bind(n),Circle:n.segmentCircleGemetry_.bind(n)},n}return e.prototype.addFeature=function(t,n){var i=n!==void 0?n:!0,a=Ee(t),o=t.getGeometry();if(o){var s=this.GEOMETRY_SEGMENTERS_[o.getType()];if(s){this.indexedFeaturesExtents_[a]=o.getExtent(Ui());var A=[];if(s(A,o),A.length===1)this.rBush_.insert(oa(A[0]),{feature:t,segment:A[0]});else if(A.length>1){var l=A.map(function(c){return oa(c)}),u=A.map(function(c){return{feature:t,segment:c}});this.rBush_.load(l,u)}}}i&&(this.featureChangeListenerKeys_[a]=je(t,xe.CHANGE,this.handleFeatureChange_,this))},e.prototype.forEachFeatureAdd_=function(t){this.addFeature(t)},e.prototype.forEachFeatureRemove_=function(t){this.removeFeature(t)},e.prototype.getFeatures_=function(){var t;return this.features_?t=this.features_:this.source_&&(t=this.source_.getFeatures()),t},e.prototype.handleEvent=function(t){var n=this.snapTo(t.pixel,t.coordinate,t.map);return n&&(t.coordinate=n.vertex.slice(0,2),t.pixel=n.vertexPixel),r.prototype.handleEvent.call(this,t)},e.prototype.handleFeatureAdd_=function(t){var n=XP(t);this.addFeature(n)},e.prototype.handleFeatureRemove_=function(t){var n=XP(t);this.removeFeature(n)},e.prototype.handleFeatureChange_=function(t){var n=t.target;if(this.handlingDownUpSequence){var i=Ee(n);i in this.pendingFeatures_||(this.pendingFeatures_[i]=n)}else this.updateFeature_(n)},e.prototype.handleUpEvent=function(t){var n=fF(this.pendingFeatures_);return n.length&&(n.forEach(this.updateFeature_.bind(this)),this.pendingFeatures_={}),!1},e.prototype.removeFeature=function(t,n){var i=n!==void 0?n:!0,a=Ee(t),o=this.indexedFeaturesExtents_[a];if(o){var s=this.rBush_,A=[];s.forEachInExtent(o,function(u){t===u.feature&&A.push(u)});for(var l=A.length-1;l>=0;--l)s.remove(A[l])}i&&(Yr(this.featureChangeListenerKeys_[a]),delete this.featureChangeListenerKeys_[a])},e.prototype.setMap=function(t){var n=this.getMap(),i=this.featuresListenerKeys_,a=this.getFeatures_();n&&(i.forEach(Yr),i.length=0,a.forEach(this.forEachFeatureRemove_.bind(this))),r.prototype.setMap.call(this,t),t&&(this.features_?i.push(je(this.features_,si.ADD,this.handleFeatureAdd_,this),je(this.features_,si.REMOVE,this.handleFeatureRemove_,this)):this.source_&&i.push(je(this.source_,Vi.ADDFEATURE,this.handleFeatureAdd_,this),je(this.source_,Vi.REMOVEFEATURE,this.handleFeatureRemove_,this)),a.forEach(this.forEachFeatureAdd_.bind(this)))},e.prototype.snapTo=function(t,n,i){var a=i.getCoordinateFromPixel([t[0]-this.pixelTolerance_,t[1]+this.pixelTolerance_]),o=i.getCoordinateFromPixel([t[0]+this.pixelTolerance_,t[1]-this.pixelTolerance_]),s=oa([a,o]),A=this.rBush_.getInExtent(s),l=A.length;if(l===0)return null;var u=i.getView().getProjection(),c=Mn(n),h,f=1/0,d=this.pixelTolerance_*this.pixelTolerance_,g=function(){if(h){var N=i.getPixelFromCoordinate(h),x=du(t,N);if(x<=d)return{vertex:h,vertexPixel:[Math.round(N[0]),Math.round(N[1])]}}return null};if(this.vertex_){for(var m=0;m<l;++m){var v=A[m];v.feature.getGeometry().getType()!==pt.CIRCLE&&v.segment.forEach(function(N){var x=Mn(N),S=du(c,x);S<f&&(h=N,f=S)})}var y=g();if(y)return y}if(this.edge_){for(var m=0;m<l;++m){var w=null,v=A[m];if(v.feature.getGeometry().getType()===pt.CIRCLE){var C=v.feature.getGeometry(),O=ad();O&&(C=C.clone().transform(O,u)),w=Fg(PX(c,C))}else{var F=v.segment,I=F[0],T=F[1];T&&(Kb[0]=Mn(I),Kb[1]=Mn(T),w=pF(c,Kb))}if(w){var L=du(c,w);L<f&&(h=w,f=L)}}var y=g();if(y)return y}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=d8(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}(ws),oet=aet;function set(r){var e=r||{},t=new xi,n=new jZ(-.005,.05,100),i=e.altShiftDragRotate!==void 0?e.altShiftDragRotate:!0;i&&t.push(new IZ);var a=e.doubleClickZoom!==void 0?e.doubleClickZoom:!0;a&&t.push(new fZ({delta:e.zoomDelta,duration:e.zoomDuration}));var o=e.dragPan!==void 0?e.dragPan:!0;o&&t.push(new TZ({onFocusOnly:e.onFocusOnly,kinetic:n}));var s=e.pinchRotate!==void 0?e.pinchRotate:!0;s&&t.push(new qZ);var A=e.pinchZoom!==void 0?e.pinchZoom:!0;A&&t.push(new tJ({duration:e.zoomDuration}));var l=e.keyboard!==void 0?e.keyboard:!0;l&&(t.push(new kZ),t.push(new $Z({delta:e.zoomDelta,duration:e.zoomDuration})));var u=e.mouseWheelZoom!==void 0?e.mouseWheelZoom:!0;u&&t.push(new zZ({onFocusOnly:e.onFocusOnly,duration:e.zoomDuration}));var c=e.shiftDragZoom!==void 0?e.shiftDragZoom:!0;return c&&t.push(new UZ({duration:e.zoomDuration})),t}var Aet=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),uet=function(r){Aet(e,r);function e(t){return t=Ce({},t),t.controls||(t.controls=sZ()),t.interactions||(t.interactions=set({onFocusOnly:!0})),r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Jk(this)},e}(m8),kC=uet;function Or(r,e=[]){let t=nh(r);Object.keys(t).forEach(i=>{t[i]=t[i].value});const n=md(Jn({},t));return ye(r,()=>{t=nh(r),Object.keys(t).forEach(i=>{n[i]!=t[i].value&&!e.includes(i)&&(n[i]=t[i].value)})}),{properties:n}}var me=(r,e)=>{const t=r.__vccOpts||r;for(const[n,i]of e)t[n]=i;return t};const cet={name:"ol-map",setup(r,{emit:e}){const{properties:t}=Or(r),n=Fo(null);let i=new kC(t);ye(t,()=>{i.setProperties(t)}),cr(()=>{i.setTarget(n.value)}),pr(()=>{i.setTarget(null),i=null}),Dr("map",i);const a=()=>i.focus(),o=(h,f,d={})=>i.forEachFeatureAtPixel(h,f,d),s=(h,f,d)=>i.forEachLayerAtPixel(h,f,d),A=h=>i.getCoordinateFromPixel(h),l=()=>i.refresh(),u=()=>i.render(),c=()=>i.updateSize();return i.on("click",h=>e("click",h)),i.on("dblclick",h=>e("dblclick",h)),i.on("singleclick",h=>e("singleclick",h)),i.on("pointerdrag",h=>e("pointerdrag",h)),i.on("pointermove",h=>e("pointermove",h)),i.on("movestart",h=>e("movestart",h)),i.on("moveend",h=>e("moveend",h)),i.on("postrender",h=>e("postrender",h)),i.on("precompose",h=>e("precompose",h)),i.on("postcompose",h=>e("postcompose",h)),{map:i,mapRef:n,focus:a,forEachFeatureAtPixel:o,forEachLayerAtPixel:s,getCoordinateFromPixel:A,refresh:l,render:u,updateSize:c}},props:{loadTilesWhileAnimating:{type:Boolean,default:!1},loadTilesWhileInteracting:{type:Boolean,default:!1},moveTolerance:{type:Number,default:1},pixelRatio:{type:Number,default:1},controls:{type:Array,default:()=>[]}}};function het(r,e,t,n,i,a){return ti(),Yi("div",{ref:o=>n.mapRef=o},[Rr(r.$slots,"default")],512)}var wx=me(cet,[["render",het]]);function fet(r,e){const t=Be("map"),{properties:n}=Or(r),i=()=>CA(Jn({},n),{projection:typeof n.projection=="string"?n.projection:new Ru(Jn({},n.projection))});let a=new el(i());cr(()=>{t.setView(a)}),a.on("change:center",()=>{e("centerChanged",O()),e("zoomChanged",ct())}),a.on("change:resolution",()=>e("resolutionChanged",U())),a.on("change:rotation",()=>e("rotationChanged",At())),ye(n,()=>{let X=i();a.setProperties(X),a.applyOptions_(X)});const o=X=>a.adjustCenter(X),s=(X,It)=>a.adjustResolution(X,It),A=(X,It)=>a.adjustRotation(X,It),l=(X,It)=>a.adjustZoom(X,It),u=X=>a.animate(X),c=()=>a.beginInteraction(),h=X=>a.calculateExtent(X),f=()=>a.cancelAnimations(),d=(X,It,at)=>a.centerOn(X,It,at),g=()=>a.changed(),m=X=>a.dispatchEvent(X),v=(X,It,at)=>a.endInteraction(X,It,at),y=(X,It)=>a.fit(X,It),w=X=>a.get(X),C=()=>a.getAnimating(),O=()=>a.getCenter(),F=()=>a.getInteracting(),I=()=>a.getKeys(),T=()=>a.getMaxResolution(),L=()=>a.getMaxZoom(),N=()=>a.getMinResolution(),x=()=>a.getMinZoom(),S=()=>a.getProjection(),P=()=>a.getProperties(),U=()=>a.getResolution(),tt=(X,It)=>a.getResolutionForExtent(X,It),q=X=>a.getResolutionForZoom(X),rt=()=>a.getResolutions(),nt=()=>a.getRevision(),At=()=>a.getRotation(),ct=()=>a.getZoom();return{view:a,adjustCenter:o,adjustResolution:s,adjustRotation:A,adjustZoom:l,animate:u,beginInteraction:c,calculateExtent:h,cancelAnimations:f,centerOn:d,changed:g,dispatchEvent:m,endInteraction:v,fit:y,get:w,getAnimating:C,getCenter:O,getInteracting:F,getKeys:I,getMaxResolution:T,getMaxZoom:L,getMinResolution:N,getMinZoom:x,getProjection:S,getProperties:P,getResolution:U,getResolutionForExtent:tt,getResolutionForZoom:q,getResolutions:rt,getRevision:nt,getRotation:At,getZoom:ct,getZoomForResolution:X=>a.getZoomForResolution(X),setCenter:X=>a.setCenter(X),setConstrainResolution:X=>a.setConstrainResolution(X),setMaxZoom:X=>a.setMaxZoom(X),setMinZoom:X=>a.setMinZoom(X),setResolution:X=>a.setResolution(X),setRotation:X=>a.setRotation(X),setZoom:X=>a.setZoom(X)}}const det={name:"ol-view",setup(r,{emit:e}){const t=fet(r,e);return Jn({},t)},props:{center:{type:Array,default:()=>[0,0]},constrainRotation:{type:Boolean,default:!0},enableRotation:{type:Boolean,default:!0},extent:{type:Array},constrainOnlyCenter:{type:Boolean,default:!1},smoothExtentConstraint:{type:Boolean,default:!0},maxResolution:{type:Number},minResolution:{type:Number},maxZoom:{type:Number,default:28},minZoom:{type:Number,default:0},multiWorld:{type:Boolean,default:!1},constrainResolution:{type:Boolean,default:!1},smoothResolutionConstraint:{type:Boolean,default:!0},showFullExtent:{type:Boolean,default:!1},projection:{type:[String,Object],default:"EPSG:3857"},resolution:{type:Number},resolutions:{type:Array},rotation:{type:Number},zoom:{type:Number,default:0},zoomFactor:{type:Number,default:2},padding:{type:Array,default:()=>[0,0,0,0]}}};function pet(r,e,t,n,i,a){return Mr("",!0)}var Ex=me(det,[["render",pet]]);const get={name:"ol-feature",setup(r){const e=Be("vectorSource"),t=Be("vectorLayer"),n=Be("animation",null),{properties:i}=Or(r);let a=qe(()=>new _r(Jn({},i.properties)));return ye(a,(o,s)=>{e.value.removeFeature(s),e.value.addFeature(o),e.value.changed()}),ye(e,(o,s)=>{s.removeFeature(a.value),o.addFeature(a.value),o.changed()}),cr(()=>{e.value.addFeature(a.value),n!=null&&t.value.animateFeature(a.value,n.value)}),pr(()=>{e.value.removeFeature(a.value)}),Dr("feature",a),Dr("stylable",a),{feature:a}},props:{properties:{type:[LC,Object,Array]}}};function vet(r,e,t,n,i,a){return Rr(r.$slots,"default")}var Cx=me(get,[["render",vet]]);function met(r,e){const t=Be("map"),n=Fo(null),{properties:i}=Or(r);let a=qe(()=>new C8(i));cr(()=>{t.addOverlay(a.value)}),pr(()=>{t.removeOverlay(a.value)}),ye(a,(g,m)=>{t.removeOverlay(m),t.addOverlay(g)}),_4(()=>{c(n.value)},{flush:"post"}),a.value.on("change:element",()=>e("elementChanged",o())),a.value.on("change:offset",()=>e("offsetChanged",s())),a.value.on("change:position",()=>e("positionChanged",A())),a.value.on("change:positioning",()=>e("positioningChanged",l()));const o=()=>a.value.getElement(),s=()=>a.value.getOffset(),A=()=>a.value.getPosition(),l=()=>a.value.getPositioning(),u=g=>a.value.panIntoView(g),c=g=>a.value.setElement(g);return{overlay:a,htmlContent:n,getOffset:s,getPosition:A,getPositioning:l,panIntoView:u,setElement:c,setOffset:g=>a.value.setOffset(g),setPosition:g=>a.value.setPosition(g),setPositioning:g=>a.value.setPositioning(g)}}const yet={name:"ol-overlay",setup(r,{emit:e}){const t=new met(r,e);return Jn({},t)},props:{position:{type:Array},offset:{type:Array},positioning:{type:String},stopEvent:{type:Boolean,default:!0},insertFirst:{type:Boolean,default:!0},autoPan:{type:Boolean,default:!1},autoPanMargin:{type:Number,default:20},autoPanAnimation:{type:Object,default:void 0}}},_et={ref:"htmlContent"};function wet(r,e,t,n,i,a){return ti(),Yi("div",_et,[Rr(r.$slots,"default",{position:t.position})],512)}var Bx=me(yet,[["render",wet]]),X8=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),zn={ACCURACY:"accuracy",ACCURACY_GEOMETRY:"accuracyGeometry",ALTITUDE:"altitude",ALTITUDE_ACCURACY:"altitudeAccuracy",HEADING:"heading",POSITION:"position",PROJECTION:"projection",SPEED:"speed",TRACKING:"tracking",TRACKING_OPTIONS:"trackingOptions"},Eet=function(r){X8(e,r);function e(t){var n=r.call(this,xe.ERROR)||this;return n.code=t.code,n.message=t.message,n}return e}($o),Cet=function(r){X8(e,r);function e(t){var n=r.call(this)||this;n.on,n.once,n.un;var i=t||{};return n.position_=null,n.transform_=xC,n.watchId_=void 0,n.addChangeListener(zn.PROJECTION,n.handleProjectionChanged_),n.addChangeListener(zn.TRACKING,n.handleTrackingChanged_),i.projection!==void 0&&n.setProjection(i.projection),i.trackingOptions!==void 0&&n.setTrackingOptions(i.trackingOptions),n.setTracking(i.tracking!==void 0?i.tracking:!1),n}return e.prototype.disposeInternal=function(){this.setTracking(!1),r.prototype.disposeInternal.call(this)},e.prototype.handleProjectionChanged_=function(){var t=this.getProjection();t&&(this.transform_=id(Ve("EPSG:4326"),t),this.position_&&this.set(zn.POSITION,this.transform_(this.position_)))},e.prototype.handleTrackingChanged_=function(){if("geolocation"in navigator){var t=this.getTracking();t&&this.watchId_===void 0?this.watchId_=navigator.geolocation.watchPosition(this.positionChange_.bind(this),this.positionError_.bind(this),this.getTrackingOptions()):!t&&this.watchId_!==void 0&&(navigator.geolocation.clearWatch(this.watchId_),this.watchId_=void 0)}},e.prototype.positionChange_=function(t){var n=t.coords;this.set(zn.ACCURACY,n.accuracy),this.set(zn.ALTITUDE,n.altitude===null?void 0:n.altitude),this.set(zn.ALTITUDE_ACCURACY,n.altitudeAccuracy===null?void 0:n.altitudeAccuracy),this.set(zn.HEADING,n.heading===null?void 0:Wc(n.heading)),this.position_?(this.position_[0]=n.longitude,this.position_[1]=n.latitude):this.position_=[n.longitude,n.latitude];var i=this.transform_(this.position_);this.set(zn.POSITION,i),this.set(zn.SPEED,n.speed===null?void 0:n.speed);var a=m3(this.position_,n.accuracy);a.applyTransform(this.transform_),this.set(zn.ACCURACY_GEOMETRY,a),this.changed()},e.prototype.positionError_=function(t){this.dispatchEvent(new Eet(t))},e.prototype.getAccuracy=function(){return this.get(zn.ACCURACY)},e.prototype.getAccuracyGeometry=function(){return this.get(zn.ACCURACY_GEOMETRY)||null},e.prototype.getAltitude=function(){return this.get(zn.ALTITUDE)},e.prototype.getAltitudeAccuracy=function(){return this.get(zn.ALTITUDE_ACCURACY)},e.prototype.getHeading=function(){return this.get(zn.HEADING)},e.prototype.getPosition=function(){return this.get(zn.POSITION)},e.prototype.getProjection=function(){return this.get(zn.PROJECTION)},e.prototype.getSpeed=function(){return this.get(zn.SPEED)},e.prototype.getTracking=function(){return this.get(zn.TRACKING)},e.prototype.getTrackingOptions=function(){return this.get(zn.TRACKING_OPTIONS)},e.prototype.setProjection=function(t){this.set(zn.PROJECTION,Ve(t))},e.prototype.setTracking=function(t){this.set(zn.TRACKING,t)},e.prototype.setTrackingOptions=function(t){this.set(zn.TRACKING_OPTIONS,t)},e}(Li),Bet=Cet;const bet={name:"ol-geolocation",emits:["positionChanged","speedChanged","headingChanged","altitudeChanged","altitudeAccuracyChanged","accuracyGeometryChanged"],setup(r,{emit:e}){const{properties:t}=Or(r);let n=qe(()=>{let h=new Bet(t);return h.on("change",c),h});const i=Fo([]),a=Fo(0),o=Fo(0),s=Fo(0),A=Fo(0),l=Fo(0),u=Fo({});ye(i,()=>{e("positionChanged",i.value)}),ye(A,()=>{e("speedChanged",A.value)}),ye(l,()=>{e("headingChanged",l.value)}),ye(o,()=>{e("altitudeChanged",o.value)}),ye(s,()=>{e("altitudeAccuracyChanged",s.value)}),ye(u,()=>{e("accuracyGeometryChanged",u.value)});const c=()=>{i.value=n.value.getPosition(),A.value=n.value.getSpeed(),l.value=n.value.getHeading(),a.value=n.value.getAccuracy(),o.value=n.value.getAltitude(),s.value=n.value.getAltitudeAccuracy(),u.value=n.value.getAccuracyGeometry()};return ye(n,(h,f)=>{f.un("change",c),h.on("change",c)}),{geoLoc:n,position:i,accuracy:a,altitude:o,altitudeAccuracy:s,speed:A,heading:l,accuracyGeometry:u}},props:{projection:{type:[String,Object],default:"EPSG:3857"},tracking:{type:Boolean,default:!0},trackingOptions:{type:Object,default:()=>({enableHighAccuracy:!0})}}};function Tet(r,e,t,n,i,a){return Rr(r.$slots,"default",{position:n.position,speed:n.speed,heading:n.heading,accuracy:n.accuracy,altitude:n.altitude,altitudeAccuracy:n.altitudeAccuracy,accuracyGeometry:n.accuracyGeometry})}var bx=me(bet,[["render",Tet]]);function xet(r){r("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),r("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),r("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),r.WGS84=r["EPSG:4326"],r["EPSG:3785"]=r["EPSG:3857"],r.GOOGLE=r["EPSG:3857"],r["EPSG:900913"]=r["EPSG:3857"],r["EPSG:102113"]=r["EPSG:3857"]}var od=1,sd=2,ew=3,Iet=4,Tx=5,qP=6378137,Let=6356752314e-3,ZP=.0066943799901413165,ay=484813681109536e-20,ee=Math.PI/2,Oet=.16666666666666666,Fet=.04722222222222222,Ret=.022156084656084655,he=1e-10,va=.017453292519943295,il=57.29577951308232,An=Math.PI/4,Hy=Math.PI*2,Ei=3.14159265359,Vo={};Vo.greenwich=0;Vo.lisbon=-9.131906111111;Vo.paris=2.337229166667;Vo.bogota=-74.080916666667;Vo.madrid=-3.687938888889;Vo.rome=12.452333333333;Vo.bern=7.439583333333;Vo.jakarta=106.807719444444;Vo.ferro=-17.666666666667;Vo.brussels=4.367975;Vo.stockholm=18.058277777778;Vo.athens=23.7163375;Vo.oslo=10.722916666667;var Met={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},JP=/[\s_\-\/\(\)]/g;function fh(r,e){if(r[e])return r[e];for(var t=Object.keys(r),n=e.toLowerCase().replace(JP,""),i=-1,a,o;++i<t.length;)if(a=t[i],o=a.toLowerCase().replace(JP,""),o===n)return r[a]}function Sx(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*va},lat_1:function(s){e.lat1=s*va},lat_2:function(s){e.lat2=s*va},lat_ts:function(s){e.lat_ts=s*va},lon_0:function(s){e.long0=s*va},lon_1:function(s){e.long1=s*va},lon_2:function(s){e.long2=s*va},alpha:function(s){e.alpha=parseFloat(s)*va},gamma:function(s){e.rectified_grid_angle=parseFloat(s)},lonc:function(s){e.longc=s*va},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=fh(Met,s);A&&(e.to_meter=A.to_meter)},from_greenwich:function(s){e.from_greenwich=s*va},pm:function(s){var A=fh(Vo,s);e.from_greenwich=(A||parseFloat(s))*va},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 Gy=1,q8=2,Z8=3,nE=4,J8=5,zF=-1,Net=/\s/,Pet=/[A-Za-z]/,Uet=/[A-Za-z84_]/,HC=/[,\]]/,tH=/[\d\.E\-\+]/;function Nu(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=Gy}Nu.prototype.readCharicter=function(){var r=this.text[this.place++];if(this.state!==nE)for(;Net.test(r);){if(this.place>=this.text.length)return;r=this.text[this.place++]}switch(this.state){case Gy:return this.neutral(r);case q8:return this.keyword(r);case nE:return this.quoted(r);case J8:return this.afterquote(r);case Z8:return this.number(r);case zF:return}};Nu.prototype.afterquote=function(r){if(r==='"'){this.word+='"',this.state=nE;return}if(HC.test(r)){this.word=this.word.trim(),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in afterquote yet, index '+this.place)};Nu.prototype.afterItem=function(r){if(r===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=Gy;return}if(r==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=Gy,this.currentObject=this.stack.pop(),this.currentObject||(this.state=zF);return}};Nu.prototype.number=function(r){if(tH.test(r)){this.word+=r;return}if(HC.test(r)){this.word=parseFloat(this.word),this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in number yet, index '+this.place)};Nu.prototype.quoted=function(r){if(r==='"'){this.state=J8;return}this.word+=r};Nu.prototype.keyword=function(r){if(Uet.test(r)){this.word+=r;return}if(r==="["){var e=[];e.push(this.word),this.level++,this.root===null?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,this.state=Gy;return}if(HC.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in keyword yet, index '+this.place)};Nu.prototype.neutral=function(r){if(Pet.test(r)){this.word=r,this.state=q8;return}if(r==='"'){this.word="",this.state=nE;return}if(tH.test(r)){this.word=r,this.state=Z8;return}if(HC.test(r)){this.afterItem(r);return}throw new Error(`havn't handled "`+r+'" in neutral yet, index '+this.place)};Nu.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===zF)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Det(r){var e=new Nu(r);return e.output()}function t5(r,e,t){Array.isArray(e)&&(t.unshift(e),e=null);var n=e?{}:r,i=t.reduce(function(a,o){return Xp(o,a),a},n);e&&(r[e]=i)}function Xp(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]={},Xp(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&&Xp(r[2],e[t]);return;case"SPHEROID":case"ELLIPSOID":e[t]={name:r[0],a:r[1],rf:r[2]},r.length===4&&Xp(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]],t5(e,t,r);return;default:for(n=-1;++n<r.length;)if(!Array.isArray(r[n]))return Xp(r,e[t]);return t5(e,t,r)}}var Qet=.017453292519943295;function ket(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 jl(r){return r*Qet}function Het(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 ket(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",jl],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",jl],["x0","false_easting",o],["y0","false_northing",o],["long0","central_meridian",jl],["lat0","latitude_of_origin",jl],["lat0","standard_parallel_1",jl],["lat1","standard_parallel_1",jl],["lat2","standard_parallel_2",jl],["azimuth","Azimuth"],["alpha","azimuth",jl],["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=jl(r.lat1>0?90:-90),r.lat_ts=r.lat1)}function eH(r){var e=Det(r),t=e.shift(),n=e.shift();e.unshift(["name",n]),e.unshift(["type",t]);var i={};return Xp(e,i),Het(i),i}function Ao(r){var e=this;if(arguments.length===2){var t=arguments[1];typeof t=="string"?t.charAt(0)==="+"?Ao[r]=Sx(arguments[1]):Ao[r]=eH(arguments[1]):Ao[r]=t}else if(arguments.length===1){if(Array.isArray(r))return r.map(function(n){Array.isArray(n)?Ao.apply(e,n):Ao(n)});if(typeof r=="string"){if(r in Ao)return Ao[r]}else"EPSG"in r?Ao["EPSG:"+r.EPSG]=r:"ESRI"in r?Ao["ESRI:"+r.ESRI]=r:"IAU2000"in r?Ao["IAU2000:"+r.IAU2000]=r:console.log(r);return}}xet(Ao);function Get(r){return typeof r=="string"}function $et(r){return r in Ao}var Vet=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function jet(r){return Vet.some(function(e){return r.indexOf(e)>-1})}var Ket=["3857","900913","3785","102113"];function Wet(r){var e=fh(r,"authority");if(e){var t=fh(e,"epsg");return t&&Ket.indexOf(t)>-1}}function zet(r){var e=fh(r,"extension");if(e)return fh(e,"proj4")}function Yet(r){return r[0]==="+"}function Xet(r){if(Get(r)){if($et(r))return Ao[r];if(jet(r)){var e=eH(r);if(Wet(e))return Ao["EPSG:3857"];var t=zet(e);return t?Sx(t):e}if(Yet(r))return Sx(r)}else return r}function e5(r,e){r=r||{};var t,n;if(!e)return r;for(n in e)t=e[n],t!==void 0&&(r[n]=t);return r}function ml(r,e,t){var n=r*e;return t/Math.sqrt(1-n*n)}function O0(r){return r<0?-1:1}function we(r){return Math.abs(r)<=Ei?r:r-O0(r)*Hy}function pA(r,e,t){var n=r*t,i=.5*r;return n=Math.pow((1-n)/(1+n),i),Math.tan(.5*(ee-e))/n}function $y(r,e){for(var t=.5*r,n,i,a=ee-2*Math.atan(e),o=0;o<=15;o++)if(n=r*Math.sin(a),i=ee-2*Math.atan(e*Math.pow((1-n)/(1+n),t))-a,a+=i,Math.abs(i)<=1e-10)return a;return-9999}function qet(){var r=this.b/this.a;this.es=1-r*r,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function Zet(r){var e=r.x,t=r.y;if(t*il>90&&t*il<-90&&e*il>180&&e*il<-180)return null;var n,i;if(Math.abs(Math.abs(t)-ee)<=he)return null;if(this.sphere)n=this.x0+this.a*this.k0*we(e-this.long0),i=this.y0+this.a*this.k0*Math.log(Math.tan(An+.5*t));else{var a=Math.sin(t),o=pA(this.e,t,a);n=this.x0+this.a*this.k0*we(e-this.long0),i=this.y0-this.a*this.k0*Math.log(o)}return r.x=n,r.y=i,r}function Jet(r){var e=r.x-this.x0,t=r.y-this.y0,n,i;if(this.sphere)i=ee-2*Math.atan(Math.exp(-t/(this.a*this.k0)));else{var a=Math.exp(-t/(this.a*this.k0));if(i=$y(this.e,a),i===-9999)return null}return n=we(this.long0+e/(this.a*this.k0)),r.x=n,r.y=i,r}var trt=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],ert={init:qet,forward:Zet,inverse:Jet,names:trt};function rrt(){}function r5(r){return r}var nrt=["longlat","identity"],irt={init:rrt,forward:r5,inverse:r5,names:nrt},art=[ert,irt],rw={},iE=[];function rH(r,e){var t=iE.length;return r.names?(iE[t]=r,r.names.forEach(function(n){rw[n.toLowerCase()]=t}),this):(console.log(e),!0)}function ort(r){if(!r)return!1;var e=r.toLowerCase();if(typeof rw[e]<"u"&&iE[rw[e]])return iE[rw[e]]}function srt(){art.forEach(rH)}var Art={start:srt,add:rH,get:ort},Ar={};Ar.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"};Ar.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"};Ar.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"};Ar.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"};Ar.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"};Ar.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"};Ar.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"};Ar.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"};Ar.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"};Ar.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"};Ar.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"};Ar.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"};Ar.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"};Ar.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"};Ar.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."};Ar.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"};Ar.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"};Ar.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"};Ar.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"};Ar.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"};Ar.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"};Ar.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"};Ar.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"};Ar.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"};Ar.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"};Ar.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"};Ar.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"};Ar.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"};Ar.hough={a:6378270,rf:297,ellipseName:"Hough"};Ar.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"};Ar.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"};Ar.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"};Ar.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"};Ar.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"};Ar.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"};Ar.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"};Ar.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"};Ar.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"};Ar.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"};Ar.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"};Ar.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var lrt=Ar.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Ar.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function urt(r,e,t,n){var i=r*r,a=e*e,o=(i-a)/i,s=0;n?(r*=1-o*(Oet+o*(Fet+o*Ret)),i=r*r,o=0):s=Math.sqrt(o);var A=(i-a)/a;return{es:o,e:s,ep2:A}}function crt(r,e,t,n,i){if(!r){var a=fh(Ar,n);a||(a=lrt),r=a.a,e=a.b,t=a.rf}return t&&!e&&(e=(1-1/t)*r),(t===0||Math.abs(r-e)<he)&&(i=!0,e=r),{a:r,b:e,rf:t,sphere:i}}var ua={};ua.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"};ua.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"};ua.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"};ua.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"};ua.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"};ua.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"};ua.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"};ua.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"};ua.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"};ua.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"};ua.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"};ua.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"};ua.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"};ua.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"};ua.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"};ua.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"};ua.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function hrt(r,e,t,n,i,a,o){var s={};return r===void 0||r==="none"?s.datum_type=Tx:s.datum_type=Iet,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=od),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=sd,s.datum_params[3]*=ay,s.datum_params[4]*=ay,s.datum_params[5]*=ay,s.datum_params[6]=s.datum_params[6]/1e6+1)),o&&(s.datum_type=ew,s.grids=o),s.a=t,s.b=n,s.es=i,s.ep2=a,s}var nH={};function frt(r,e){var t=new DataView(e),n=grt(t),i=vrt(t,n);i.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var a=mrt(t,i,n),o={header:i,subgrids:a};return nH[r]=o,o}function drt(r){if(r===void 0)return null;var e=r.split(",");return e.map(prt)}function prt(r){if(r.length===0)return null;var e=r[0]==="@";return e&&(r=r.slice(1)),r==="null"?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:r,mandatory:!e,grid:nH[r]||null,isNull:!1}}function qp(r){return r/3600*Math.PI/180}function grt(r){var e=r.getInt32(8,!1);return e===11?!1:(e=r.getInt32(8,!0),e!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function vrt(r,e){return{nFields:r.getInt32(8,e),nSubgridFields:r.getInt32(24,e),nSubgrids:r.getInt32(40,e),shiftType:xx(r,56,56+8).trim(),fromSemiMajorAxis:r.getFloat64(120,e),fromSemiMinorAxis:r.getFloat64(136,e),toSemiMajorAxis:r.getFloat64(152,e),toSemiMinorAxis:r.getFloat64(168,e)}}function xx(r,e,t){return String.fromCharCode.apply(null,new Uint8Array(r.buffer.slice(e,t)))}function mrt(r,e,t){for(var n=176,i=[],a=0;a<e.nSubgrids;a++){var o=_rt(r,n,t),s=wrt(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:[qp(o.lowerLongitude),qp(o.lowerLatitude)],del:[qp(o.longitudeInterval),qp(o.latitudeInterval)],lim:[A,l],count:o.gridNodeCount,cvs:yrt(s)})}return i}function yrt(r){return r.map(function(e){return[qp(e.longitudeShift),qp(e.latitudeShift)]})}function _rt(r,e,t){return{name:xx(r,e+8,e+16).trim(),parent:xx(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 wrt(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 ul(r,e){if(!(this instanceof ul))return new ul(r);e=e||function(l){if(l)throw l};var t=Xet(r);if(typeof t!="object"){e(r);return}var n=ul.projections.get(t.projName);if(!n){e(r);return}if(t.datumCode&&t.datumCode!=="none"){var i=fh(ua,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=crt(t.a,t.b,t.rf,t.ellps,t.sphere),o=urt(a.a,a.b,a.rf,t.R_A),s=drt(t.nadgrids),A=t.datum||hrt(t.datumCode,t.datum_params,a.a,a.b,o.es,o.ep2,s);e5(this,t),e5(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)}ul.projections=Art;ul.projections.start();function Ert(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===od?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]:r.datum_type===sd?r.datum_params[0]===e.datum_params[0]&&r.datum_params[1]===e.datum_params[1]&&r.datum_params[2]===e.datum_params[2]&&r.datum_params[3]===e.datum_params[3]&&r.datum_params[4]===e.datum_params[4]&&r.datum_params[5]===e.datum_params[5]&&r.datum_params[6]===e.datum_params[6]:!0}function iH(r,e,t){var n=r.x,i=r.y,a=r.z?r.z:0,o,s,A,l;if(i<-ee&&i>-1.001*ee)i=-ee;else if(i>ee&&i<1.001*ee)i=ee;else{if(i<-ee)return{x:-1/0,y:-1/0,z:r.z};if(i>ee)return{x:1/0,y:1/0,z:r.z}}return n>Math.PI&&(n-=2*Math.PI),s=Math.sin(i),l=Math.cos(i),A=s*s,o=t/Math.sqrt(1-e*A),{x:(o+a)*l*Math.cos(n),y:(o+a)*l*Math.sin(n),z:(o*(1-e)+a)*s}}function aH(r,e,t,n){var i=1e-12,a=i*i,o=30,s,A,l,u,c,h,f,d,g,m,v,y,w,C=r.x,O=r.y,F=r.z?r.z:0,I,T,L;if(s=Math.sqrt(C*C+O*O),A=Math.sqrt(C*C+O*O+F*F),s/t<i){if(I=0,A/t<i)return T=ee,L=-n,{x:r.x,y:r.y,z:r.z}}else I=Math.atan2(O,C);l=F/A,u=s/A,c=1/Math.sqrt(1-e*(2-e)*u*u),d=u*(1-e)*c,g=l*c,w=0;do w++,f=t/Math.sqrt(1-e*g*g),L=s*d+F*g-f*(1-e*g*g),h=e*f/(f+L),c=1/Math.sqrt(1-h*(2-h)*u*u),m=u*(1-h)*c,v=l*c,y=v*d-m*g,d=m,g=v;while(y*y>a&&w<o);return T=Math.atan(v/Math.abs(m)),{x:I,y:T,z:L}}function Crt(r,e,t){if(e===od)return{x:r.x+t[0],y:r.y+t[1],z:r.z+t[2]};if(e===sd){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 Brt(r,e,t){if(e===od)return{x:r.x-t[0],y:r.y-t[1],z:r.z-t[2]};if(e===sd){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 Z_(r){return r===od||r===sd}function brt(r,e,t){if(Ert(r,e)||r.datum_type===Tx||e.datum_type===Tx)return t;var n=r.a,i=r.es;if(r.datum_type===ew){var a=n5(r,!1,t);if(a!==0)return;n=qP,i=ZP}var o=e.a,s=e.b,A=e.es;if(e.datum_type===ew&&(o=qP,s=Let,A=ZP),i===A&&n===o&&!Z_(r.datum_type)&&!Z_(e.datum_type))return t;if(t=iH(t,i,n),Z_(r.datum_type)&&(t=Crt(t,r.datum_type,r.datum_params)),Z_(e.datum_type)&&(t=Brt(t,e.datum_type,e.datum_params)),t=aH(t,A,o,s),e.datum_type===ew){var l=n5(e,!0,t);if(l!==0)return}return t}function n5(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=Trt(n,e,A),!isNaN(i.x)))break}return isNaN(i.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*il+" "+n.y*il+" tried: '"+a+"'"),-1):(t.x=-i.x,t.y=i.y,0)}function Trt(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=we(i.x-Math.PI)+Math.PI;var a=i5(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=i5(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=we(a.x+t.ll[0]),n.y=a.y+t.ll[1]}else isNaN(a.x)||(n.x=r.x+a.x,n.y=r.y+a.y);return n}function i5(r,e){var t={x:r.x/e.del[0],y:r.y/e.del[1]},n={x:Math.floor(t.x),y:Math.floor(t.y)},i={x:t.x-1*n.x,y:t.y-1*n.y},a={x:Number.NaN,y:Number.NaN},o;if(n.x<0||n.x>=e.lim[0]||n.y<0||n.y>=e.lim[1])return a;o=n.y*e.lim[0]+n.x;var s={x:e.cvs[o][0],y:e.cvs[o][1]};o++;var A={x:e.cvs[o][0],y:e.cvs[o][1]};o+=e.lim[0];var l={x:e.cvs[o][0],y:e.cvs[o][1]};o--;var u={x:e.cvs[o][0],y:e.cvs[o][1]},c=i.x*i.y,h=i.x*(1-i.y),f=(1-i.x)*(1-i.y),d=(1-i.x)*i.y;return a.x=f*s.x+h*A.x+d*u.x+c*l.x,a.y=f*s.y+h*A.y+d*u.y+c*l.y,a}function a5(r,e,t){var n=t.x,i=t.y,a=t.z||0,o,s,A,l={};for(A=0;A<3;A++)if(!(e&&A===2&&t.z===void 0))switch(A===0?(o=n,"ew".indexOf(r.axis[A])!==-1?s="x":s="y"):A===1?(o=i,"ns".indexOf(r.axis[A])!==-1?s="y":s="x"):(o=a,s="z"),r.axis[A]){case"e":l[s]=o;break;case"w":l[s]=-o;break;case"n":l[s]=o;break;case"s":l[s]=-o;break;case"u":t[s]!==void 0&&(l.z=o);break;case"d":t[s]!==void 0&&(l.z=-o);break;default:return null}return l}function oH(r){var e={x:r[0],y:r[1]};return r.length>2&&(e.z=r[2]),r.length>3&&(e.m=r[3]),e}function Srt(r){o5(r.x),o5(r.y)}function o5(r){if(typeof Number.isFinite=="function"){if(Number.isFinite(r))return;throw new TypeError("coordinates must be finite numbers")}if(typeof r!="number"||r!==r||!isFinite(r))throw new TypeError("coordinates must be finite numbers")}function xrt(r,e){return(r.datum.datum_type===od||r.datum.datum_type===sd)&&e.datumCode!=="WGS84"||(e.datum.datum_type===od||e.datum.datum_type===sd)&&r.datumCode!=="WGS84"}function aE(r,e,t,n){var i;if(Array.isArray(t)&&(t=oH(t)),Srt(t),r.datum&&e.datum&&xrt(r,e)&&(i=new ul("WGS84"),t=aE(r,i,t,n),r=i),n&&r.axis!=="enu"&&(t=a5(r,!1,t)),r.projName==="longlat")t={x:t.x*va,y:t.y*va,z:t.z||0};else if(r.to_meter&&(t={x:t.x*r.to_meter,y:t.y*r.to_meter,z:t.z||0}),t=r.inverse(t),!t)return;if(r.from_greenwich&&(t.x+=r.from_greenwich),t=brt(r.datum,e.datum,t),!!t)return e.from_greenwich&&(t={x:t.x-e.from_greenwich,y:t.y,z:t.z||0}),e.projName==="longlat"?t={x:t.x*il,y:t.y*il,z:t.z||0}:(t=e.forward(t),e.to_meter&&(t={x:t.x/e.to_meter,y:t.y/e.to_meter,z:t.z||0})),n&&e.axis!=="enu"?a5(e,!0,t):t}var s5=ul("WGS84");function Wb(r,e,t,n){var i,a,o;return Array.isArray(t)?(i=aE(r,e,t,n)||{x:NaN,y:NaN},t.length>2?typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"?typeof i.z=="number"?[i.x,i.y,i.z].concat(t.splice(3)):[i.x,i.y,t[2]].concat(t.splice(3)):[i.x,i.y].concat(t.splice(2)):[i.x,i.y]):(a=aE(r,e,t,n),o=Object.keys(t),o.length===2||o.forEach(function(s){if(typeof r.name<"u"&&r.name==="geocent"||typeof e.name<"u"&&e.name==="geocent"){if(s==="x"||s==="y"||s==="z")return}else if(s==="x"||s==="y")return;a[s]=t[s]}),a)}function A5(r){return r instanceof ul?r:r.oProj?r.oProj:ul(r)}function Ho(r,e,t){r=A5(r);var n=!1,i;return typeof e>"u"?(e=r,r=s5,n=!0):(typeof e.x<"u"||Array.isArray(e))&&(t=e,e=r,r=s5,n=!0),e=A5(e),t?Wb(r,e,t):(i={forward:function(a,o){return Wb(r,e,a,o)},inverse:function(a,o){return Wb(e,r,a,o)}},n&&(i.oProj=e),i)}var l5=6,sH="AJSAJS",AH="AFAFAF",Zp=65,Lo=73,Fs=79,Rm=86,Mm=90,Irt={forward:lH,inverse:Lrt,toPoint:uH};function lH(r,e){return e=e||5,Rrt(Ort({lat:r[1],lon:r[0]}),e)}function Lrt(r){var e=YF(hH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]}function uH(r){var e=YF(hH(r.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function zb(r){return r*(Math.PI/180)}function u5(r){return 180*(r/Math.PI)}function Ort(r){var e=r.lat,t=r.lon,n=6378137,i=.00669438,a=.9996,o,s,A,l,u,c,h,f=zb(e),d=zb(t),g,m;m=Math.floor((t+180)/6)+1,t===180&&(m=60),e>=56&&e<64&&t>=3&&t<12&&(m=32),e>=72&&e<84&&(t>=0&&t<9?m=31:t>=9&&t<21?m=33:t>=21&&t<33?m=35:t>=33&&t<42&&(m=37)),o=(m-1)*6-180+3,g=zb(o),s=i/(1-i),A=n/Math.sqrt(1-i*Math.sin(f)*Math.sin(f)),l=Math.tan(f)*Math.tan(f),u=s*Math.cos(f)*Math.cos(f),c=Math.cos(f)*(d-g),h=n*((1-i/4-3*i*i/64-5*i*i*i/256)*f-(3*i/8+3*i*i/32+45*i*i*i/1024)*Math.sin(2*f)+(15*i*i/256+45*i*i*i/1024)*Math.sin(4*f)-35*i*i*i/3072*Math.sin(6*f));var v=a*A*(c+(1-l+u)*c*c*c/6+(5-18*l+l*l+72*u-58*s)*c*c*c*c*c/120)+5e5,y=a*(h+A*Math.tan(f)*(c*c/2+(5-l+9*u+4*u*u)*c*c*c*c/24+(61-58*l+l*l+600*u-330*s)*c*c*c*c*c*c/720));return e<0&&(y+=1e7),{northing:Math.round(y),easting:Math.round(v),zoneNumber:m,zoneLetter:Frt(e)}}function YF(r){var e=r.northing,t=r.easting,n=r.zoneLetter,i=r.zoneNumber;if(i<0||i>60)return null;var a=.9996,o=6378137,s=.00669438,A,l=(1-Math.sqrt(1-s))/(1+Math.sqrt(1-s)),u,c,h,f,d,g,m,v,y,w=t-5e5,C=e;n<"N"&&(C-=1e7),m=(i-1)*6-180+3,A=s/(1-s),g=C/a,v=g/(o*(1-s/4-3*s*s/64-5*s*s*s/256)),y=v+(3*l/2-27*l*l*l/32)*Math.sin(2*v)+(21*l*l/16-55*l*l*l*l/32)*Math.sin(4*v)+151*l*l*l/96*Math.sin(6*v),u=o/Math.sqrt(1-s*Math.sin(y)*Math.sin(y)),c=Math.tan(y)*Math.tan(y),h=A*Math.cos(y)*Math.cos(y),f=o*(1-s)/Math.pow(1-s*Math.sin(y)*Math.sin(y),1.5),d=w/(u*a);var O=y-u*Math.tan(y)/f*(d*d/2-(5+3*c+10*h-4*h*h-9*A)*d*d*d*d/24+(61+90*c+298*h+45*c*c-252*A-3*h*h)*d*d*d*d*d*d/720);O=u5(O);var F=(d-(1+2*c+h)*d*d*d/6+(5-2*h+28*c-3*h*h+8*A+24*c*c)*d*d*d*d*d/120)/Math.cos(y);F=m+u5(F);var I;if(r.accuracy){var T=YF({northing:r.northing+r.accuracy,easting:r.easting+r.accuracy,zoneLetter:r.zoneLetter,zoneNumber:r.zoneNumber});I={top:T.lat,right:T.lon,bottom:O,left:F}}else I={lat:O,lon:F};return I}function Frt(r){var e="Z";return 84>=r&&r>=72?e="X":72>r&&r>=64?e="W":64>r&&r>=56?e="V":56>r&&r>=48?e="U":48>r&&r>=40?e="T":40>r&&r>=32?e="S":32>r&&r>=24?e="R":24>r&&r>=16?e="Q":16>r&&r>=8?e="P":8>r&&r>=0?e="N":0>r&&r>=-8?e="M":-8>r&&r>=-16?e="L":-16>r&&r>=-24?e="K":-24>r&&r>=-32?e="J":-32>r&&r>=-40?e="H":-40>r&&r>=-48?e="G":-48>r&&r>=-56?e="F":-56>r&&r>=-64?e="E":-64>r&&r>=-72?e="D":-72>r&&r>=-80&&(e="C"),e}function Rrt(r,e){var t="00000"+r.easting,n="00000"+r.northing;return r.zoneNumber+r.zoneLetter+Mrt(r.easting,r.northing,r.zoneNumber)+t.substr(t.length-5,e)+n.substr(n.length-5,e)}function Mrt(r,e,t){var n=cH(t),i=Math.floor(r/1e5),a=Math.floor(e/1e5)%20;return Nrt(i,a,n)}function cH(r){var e=r%l5;return e===0&&(e=l5),e}function Nrt(r,e,t){var n=t-1,i=sH.charCodeAt(n),a=AH.charCodeAt(n),o=i+r-1,s=a+e,A=!1;o>Mm&&(o=o-Mm+Zp-1,A=!0),(o===Lo||i<Lo&&o>Lo||(o>Lo||i<Lo)&&A)&&o++,(o===Fs||i<Fs&&o>Fs||(o>Fs||i<Fs)&&A)&&(o++,o===Lo&&o++),o>Mm&&(o=o-Mm+Zp-1),s>Rm?(s=s-Rm+Zp-1,A=!0):A=!1,(s===Lo||a<Lo&&s>Lo||(s>Lo||a<Lo)&&A)&&s++,(s===Fs||a<Fs&&s>Fs||(s>Fs||a<Fs)&&A)&&(s++,s===Lo&&s++),s>Rm&&(s=s-Rm+Zp-1);var l=String.fromCharCode(o)+String.fromCharCode(s);return l}function hH(r){if(r&&r.length===0)throw"MGRSPoint coverting from nothing";for(var e=r.length,t=null,n="",i,a=0;!/[A-Z]/.test(i=r.charAt(a));){if(a>=2)throw"MGRSPoint bad conversion from: "+r;n+=i,a++}var o=parseInt(n,10);if(a===0||a+3>e)throw"MGRSPoint bad conversion from: "+r;var s=r.charAt(a++);if(s<="A"||s==="B"||s==="Y"||s>="Z"||s==="I"||s==="O")throw"MGRSPoint zone letter "+s+" not handled: "+r;t=r.substring(a,a+=2);for(var A=cH(o),l=Prt(t.charAt(0),A),u=Urt(t.charAt(1),A);u<Drt(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,d=0,g,m,v,y,w;return h>0&&(g=1e5/Math.pow(10,h),m=r.substring(a,a+h),f=parseFloat(m)*g,v=r.substring(a+h),d=parseFloat(v)*g),y=f+l,w=d+u,{easting:y,northing:w,zoneLetter:s,zoneNumber:o,accuracy:g}}function Prt(r,e){for(var t=sH.charCodeAt(e-1),n=1e5,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Fs&&t++,t>Mm){if(i)throw"Bad character: "+r;t=Zp,i=!0}n+=1e5}return n}function Urt(r,e){if(r>"V")throw"MGRSPoint given invalid Northing "+r;for(var t=AH.charCodeAt(e-1),n=0,i=!1;t!==r.charCodeAt(0);){if(t++,t===Lo&&t++,t===Fs&&t++,t>Rm){if(i)throw"Bad character: "+r;t=Zp,i=!0}n+=1e5}return n}function Drt(r){var e;switch(r){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+r}function Mg(r,e,t){if(!(this instanceof Mg))return new Mg(r,e,t);if(Array.isArray(r))this.x=r[0],this.y=r[1],this.z=r[2]||0;else if(typeof r=="object")this.x=r.x,this.y=r.y,this.z=r.z||0;else if(typeof r=="string"&&typeof e>"u"){var n=r.split(",");this.x=parseFloat(n[0],10),this.y=parseFloat(n[1],10),this.z=parseFloat(n[2],10)||0}else this.x=r,this.y=e,this.z=t||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Mg.fromMGRS=function(r){return new Mg(uH(r))};Mg.prototype.toMGRS=function(r){return lH([this.x,this.y],r)};var Qrt=1,krt=.25,c5=.046875,h5=.01953125,f5=.01068115234375,Hrt=.75,Grt=.46875,$rt=.013020833333333334,Vrt=.007120768229166667,jrt=.3645833333333333,Krt=.005696614583333333,Wrt=.3076171875;function fH(r){var e=[];e[0]=Qrt-r*(krt+r*(c5+r*(h5+r*f5))),e[1]=r*(Hrt-r*(c5+r*(h5+r*f5)));var t=r*r;return e[2]=t*(Grt-r*($rt+r*Vrt)),t*=r,e[3]=t*(jrt-r*Krt),e[4]=t*r*Wrt,e}function GC(r,e,t,n){return t*=e,e*=e,n[0]*r-t*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}var zrt=20;function dH(r,e,t){for(var n=1/(1-e),i=r,a=zrt;a;--a){var o=Math.sin(i),s=1-e*o*o;if(s=(GC(i,o,Math.cos(i),t)-r)*(s*Math.sqrt(s))*n,i-=s,Math.abs(s)<he)return i}return i}function Yrt(){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=fH(this.es),this.ml0=GC(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function Xrt(r){var e=r.x,t=r.y,n=we(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),d=Math.abs(A)>he?Math.tan(t):0,g=Math.pow(d,2),m=Math.pow(g,2);i=1-this.es*Math.pow(s,2),u=u/Math.sqrt(i);var v=GC(t,s,A,this.en);a=this.a*(this.k0*u*(1+c/6*(1-g+h+c/20*(5-18*g+m+14*h-58*g*h+c/42*(61+179*m-m*g-479*g)))))+this.x0,o=this.a*(this.k0*(v-this.ml0+s*n*u/2*(1+c/12*(5-g+9*h+4*f+c/30*(61+m-58*g+270*h-330*g*h+c/56*(1385+543*m-m*g-3111*g))))))+this.y0}else{var l=A*Math.sin(n);if(Math.abs(Math.abs(l)-1)<he)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>he)return 93;o=0}else o=Math.acos(o);t<0&&(o=-o),o=this.a*this.k0*(o-this.lat0)+this.y0}return r.x=a,r.y=o,r}function qrt(r){var e,t,n,i,a=(r.x-this.x0)*(1/this.a),o=(r.y-this.y0)*(1/this.a);if(this.es)if(e=this.ml0+o/this.k0,t=dH(e,this.es,this.en),Math.abs(t)<ee){var c=Math.sin(t),h=Math.cos(t),f=Math.abs(h)>he?Math.tan(t):0,d=this.ep2*Math.pow(h,2),g=Math.pow(d,2),m=Math.pow(f,2),v=Math.pow(m,2);e=1-this.es*Math.pow(c,2);var y=a*Math.sqrt(e)/this.k0,w=Math.pow(y,2);e=e*f,n=t-e*w/(1-this.es)*.5*(1-w/12*(5+3*m-9*d*m+d-4*g-w/30*(61+90*m-252*d*m+45*v+46*d-w/56*(1385+3633*m+4095*v+1574*v*m)))),i=we(this.long0+y*(1-w/6*(1+2*m+d-w/20*(5+28*m+24*v+8*d*m+6*d-w/42*(61+662*m+1320*v+720*v*m))))/h)}else n=ee*O0(o),i=0;else{var s=Math.exp(a/this.k0),A=.5*(s-1/s),l=this.lat0+o/this.k0,u=Math.cos(l);e=Math.sqrt((1-Math.pow(u,2))/(1+Math.pow(A,2))),n=Math.asin(e),o<0&&(n=-n),A===0&&u===0?i=0:i=we(Math.atan2(A,u)+this.long0)}return r.x=i,r.y=n,r}var Zrt=["Fast_Transverse_Mercator","Fast Transverse Mercator"],nw={init:Yrt,forward:Xrt,inverse:qrt,names:Zrt};function pH(r){var e=Math.exp(r);return e=(e-1/e)/2,e}function $C(r,e){r=Math.abs(r),e=Math.abs(e);var t=Math.max(r,e),n=Math.min(r,e)/(t||1);return t*Math.sqrt(1+Math.pow(n,2))}function Jrt(r){var e=1+r,t=e-1;return t===0?r:r*Math.log(e)/t}function tnt(r){var e=Math.abs(r);return e=Jrt(e*(1+e/($C(1,e)+1))),r<0?-e:e}function XF(r,e){for(var t=2*Math.cos(2*e),n=r.length-1,i=r[n],a=0,o;--n>=0;)o=-a+t*i+r[n],a=i,i=o;return e+o*Math.sin(2*e)}function ent(r,e){for(var t=2*Math.cos(e),n=r.length-1,i=r[n],a=0,o;--n>=0;)o=-a+t*i+r[n],a=i,i=o;return Math.sin(e)*o}function rnt(r){var e=Math.exp(r);return e=(e+1/e)/2,e}function gH(r,e,t){for(var n=Math.sin(e),i=Math.cos(e),a=pH(t),o=rnt(t),s=2*i*o,A=-2*n*a,l=r.length-1,u=r[l],c=0,h=0,f=0,d,g;--l>=0;)d=h,g=c,h=u,c=f,u=-d+s*h-A*c+r[l],f=-g+A*h+s*c;return s=n*o,A=i*a,[s*u-A*f,s*f+A*u]}function nnt(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(nw.init.apply(this),this.forward=nw.forward,this.inverse=nw.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var r=this.es/(1+Math.sqrt(1-this.es)),e=r/(2-r),t=e;this.cgb[0]=e*(2+e*(-2/3+e*(-2+e*(116/45+e*(26/45+e*(-2854/675)))))),this.cbg[0]=e*(-2+e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))),t=t*e,this.cgb[1]=t*(7/3+e*(-8/5+e*(-227/45+e*(2704/315+e*(2323/945))))),this.cbg[1]=t*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),t=t*e,this.cgb[2]=t*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=t*(-26/15+e*(34/21+e*(8/5+e*(-12686/2835)))),t=t*e,this.cgb[3]=t*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=t*(1237/630+e*(-12/5+e*(-24832/14175))),t=t*e,this.cgb[4]=t*(4174/315+e*(-144838/6237)),this.cbg[4]=t*(-734/315+e*(109598/31185)),t=t*e,this.cgb[5]=t*(601676/22275),this.cbg[5]=t*(444337/155925),t=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+t*(1/4+t*(1/64+t/256))),this.utg[0]=e*(-.5+e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=t*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=t*(13/48+e*(-3/5+e*(557/1440+e*(281/630+e*(-1983433/1935360))))),t=t*e,this.utg[2]=t*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=t*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),t=t*e,this.utg[3]=t*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=t*(49561/161280+e*(-179/168+e*(6601661/7257600))),t=t*e,this.utg[4]=t*(-4583/161280+e*(108847/3991680)),this.gtu[4]=t*(34729/80640+e*(-3418889/1995840)),t=t*e,this.utg[5]=t*(-20648693/638668800),this.gtu[5]=t*(212378941/319334400);var n=XF(this.cbg,this.lat0);this.Zb=-this.Qn*(n+ent(this.gtu,2*n))}function int(r){var e=we(r.x-this.long0),t=r.y;t=XF(this.cbg,t);var n=Math.sin(t),i=Math.cos(t),a=Math.sin(e),o=Math.cos(e);t=Math.atan2(n,o*i),e=Math.atan2(a*i,$C(n,i*o)),e=tnt(Math.tan(e));var s=gH(this.gtu,2*t,2*e);t=t+s[0],e=e+s[1];var A,l;return Math.abs(e)<=2.623395162778?(A=this.a*(this.Qn*e)+this.x0,l=this.a*(this.Qn*t+this.Zb)+this.y0):(A=1/0,l=1/0),r.x=A,r.y=l,r}function ant(r){var e=(r.x-this.x0)*(1/this.a),t=(r.y-this.y0)*(1/this.a);t=(t-this.Zb)/this.Qn,e=e/this.Qn;var n,i;if(Math.abs(e)<=2.623395162778){var a=gH(this.utg,2*t,2*e);t=t+a[0],e=e+a[1],e=Math.atan(pH(e));var o=Math.sin(t),s=Math.cos(t),A=Math.sin(e),l=Math.cos(e);t=Math.atan2(o*l,$C(A,l*s)),e=Math.atan2(A,l*s),n=we(e+this.long0),i=XF(this.cgb,t)}else n=1/0,i=1/0;return r.x=n,r.y=i,r}var ont=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],iw={init:nnt,forward:int,inverse:ant,names:ont};function snt(r,e){if(r===void 0){if(r=Math.floor((we(e)+Math.PI)*30/Math.PI)+1,r<0)return 0;if(r>60)return 60}return r}var Ant="etmerc";function lnt(){var r=snt(this.zone,this.long0);if(r===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(r)-183)*va,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,iw.init.apply(this),this.forward=iw.forward,this.inverse=iw.inverse}var unt=["Universal Transverse Mercator System","utm"],cnt={init:lnt,names:unt,dependsOn:Ant};function qF(r,e){return Math.pow((1-r)/(1+r),e)}var hnt=20;function fnt(){var r=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*r*r),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(r/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+An)/(Math.pow(Math.tan(.5*this.lat0+An),this.C)*qF(this.e*r,this.ratexp))}function dnt(r){var e=r.x,t=r.y;return r.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*t+An),this.C)*qF(this.e*Math.sin(t),this.ratexp))-ee,r.x=this.C*e,r}function pnt(r){for(var e=1e-14,t=r.x/this.C,n=r.y,i=Math.pow(Math.tan(.5*n+An)/this.K,1/this.C),a=hnt;a>0&&(n=2*Math.atan(i*qF(this.e*Math.sin(r.y),-.5*this.e))-ee,!(Math.abs(n-r.y)<e));--a)r.y=n;return a?(r.x=t,r.y=n,r):null}var gnt=["gauss"],ZF={init:fnt,forward:dnt,inverse:pnt,names:gnt};function vnt(){ZF.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 mnt(r){var e,t,n,i;return r.x=we(r.x-this.long0),ZF.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 ynt(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,ZF.inverse.apply(this,[r]),r.x=we(r.x+this.long0),r}var _nt=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],wnt={init:vnt,forward:mnt,inverse:ynt,names:_nt};function Ent(r,e,t){return e*=t,Math.tan(.5*(ee+r))*Math.pow((1-e)/(1+e),.5*t)}function Cnt(){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)<=he&&(this.k0=.5*(1+O0(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=he&&(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)<=he&&(this.k0=.5*this.cons*ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/pA(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=ml(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-ee,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function Bnt(r){var e=r.x,t=r.y,n=Math.sin(t),i=Math.cos(t),a,o,s,A,l,u,c=we(e-this.long0);return Math.abs(Math.abs(e-this.long0)-Math.PI)<=he&&Math.abs(t+this.lat0)<=he?(r.x=NaN,r.y=NaN,r):this.sphere?(a=2*this.k0/(1+this.sinlat0*n+this.coslat0*i*Math.cos(c)),r.x=this.a*a*i*Math.sin(c)+this.x0,r.y=this.a*a*(this.coslat0*n-this.sinlat0*i*Math.cos(c))+this.y0,r):(o=2*Math.atan(this.ssfn_(t,n,this.e))-ee,A=Math.cos(o),s=Math.sin(o),Math.abs(this.coslat0)<=he?(l=pA(this.e,t*this.con,this.con*n),u=2*this.a*this.k0*l/this.cons,r.x=this.x0+u*Math.sin(e-this.long0),r.y=this.y0-this.con*u*Math.cos(e-this.long0),r):(Math.abs(this.sinlat0)<he?(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 bnt(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<=he?(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)<he?this.lat0>0?e=we(this.long0+Math.atan2(r.x,-1*r.y)):e=we(this.long0+Math.atan2(r.x,r.y)):e=we(this.long0+Math.atan2(r.x*Math.sin(s),o*this.coslat0*Math.cos(s)-r.y*this.sinlat0*Math.sin(s))),r.x=e,r.y=t,r)}else if(Math.abs(this.coslat0)<=he){if(o<=he)return t=this.lat0,e=this.long0,r.x=e,r.y=t,r;r.x*=this.con,r.y*=this.con,n=o*this.cons/(2*this.a*this.k0),t=this.con*$y(this.e,n),e=this.con*we(this.con*this.long0+Math.atan2(r.x,-1*r.y))}else i=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=he?a=this.X0:(a=Math.asin(Math.cos(i)*this.sinX0+r.y*Math.sin(i)*this.cosX0/o),e=we(this.long0+Math.atan2(r.x*Math.sin(i),o*this.cosX0*Math.cos(i)-r.y*this.sinX0*Math.sin(i)))),t=-1*$y(this.e,Math.tan(.5*(ee+a)));return r.x=e,r.y=t,r}var Tnt=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],Snt={init:Cnt,forward:Bnt,inverse:bnt,names:Tnt,ssfn_:Ent};function xnt(){var r=this.lat0;this.lambda0=this.long0;var e=Math.sin(r),t=this.a,n=this.rf,i=1/n,a=2*i-Math.pow(i,2),o=this.e=Math.sqrt(a);this.R=this.k0*t*Math.sqrt(1-a)/(1-a*Math.pow(e,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(r),4)),this.b0=Math.asin(e/this.alpha);var s=Math.log(Math.tan(Math.PI/4+this.b0/2)),A=Math.log(Math.tan(Math.PI/4+r/2)),l=Math.log((1+o*e)/(1-o*e));this.K=s-this.alpha*A+this.alpha*o/2*l}function Int(r){var e=Math.log(Math.tan(Math.PI/4-r.y/2)),t=this.e/2*Math.log((1+this.e*Math.sin(r.y))/(1-this.e*Math.sin(r.y))),n=-this.alpha*(e+t)+this.K,i=2*(Math.atan(Math.exp(n))-Math.PI/4),a=this.alpha*(r.x-this.lambda0),o=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(i)+Math.cos(this.b0)*Math.cos(a))),s=Math.asin(Math.cos(this.b0)*Math.sin(i)-Math.sin(this.b0)*Math.cos(i)*Math.cos(a));return r.y=this.R/2*Math.log((1+Math.sin(s))/(1-Math.sin(s)))+this.y0,r.x=this.R*o+this.x0,r}function Lnt(r){for(var e=r.x-this.x0,t=r.y-this.y0,n=e/this.R,i=2*(Math.atan(Math.exp(t/this.R))-Math.PI/4),a=Math.asin(Math.cos(this.b0)*Math.sin(i)+Math.sin(this.b0)*Math.cos(i)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(i))),s=this.lambda0+o/this.alpha,A=0,l=a,u=-1e3,c=0;Math.abs(l-u)>1e-7;){if(++c>20)return;A=1/this.alpha*(Math.log(Math.tan(Math.PI/4+a/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),u=l,l=2*Math.atan(Math.exp(A))-Math.PI/2}return r.x=s,r.y=l,r}var Ont=["somerc"],Fnt={init:xnt,forward:Int,inverse:Lnt,names:Ont},Dp=1e-7;function Rnt(r){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],t=typeof r.PROJECTION=="object"?Object.keys(r.PROJECTION)[0]:r.PROJECTION;return"no_uoff"in r||"no_off"in r||e.indexOf(t)!==-1}function Mnt(){var r,e,t,n,i,a,o,s,A,l,u=0,c,h=0,f=0,d=0,g=0,m=0,v=0;this.no_off=Rnt(this),this.no_rot="no_rot"in this;var y=!1;"alpha"in this&&(y=!0);var w=!1;if("rectified_grid_angle"in this&&(w=!0),y&&(v=this.alpha),w&&(u=this.rectified_grid_angle*va),y||w)h=this.longc;else if(f=this.long1,g=this.lat1,d=this.long2,m=this.lat2,Math.abs(g-m)<=Dp||(r=Math.abs(g))<=Dp||Math.abs(r-ee)<=Dp||Math.abs(Math.abs(this.lat0)-ee)<=Dp||Math.abs(Math.abs(m)-ee)<=Dp)throw new Error;var C=1-this.es;e=Math.sqrt(C),Math.abs(this.lat0)>he?(s=Math.sin(this.lat0),t=Math.cos(this.lat0),r=1-this.es*s*s,this.B=t*t,this.B=Math.sqrt(1+this.es*this.B*this.B/C),this.A=this.B*this.k0*e/r,n=this.B*e/(t*Math.sqrt(r)),i=n*n-1,i<=0?i=0:(i=Math.sqrt(i),this.lat0<0&&(i=-i)),this.E=i+=n,this.E*=Math.pow(pA(this.e,this.lat0,s),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=i=1),y||w?(y?(c=Math.asin(Math.sin(v)/n),w||(u=v)):(c=u,v=Math.asin(n*Math.sin(c))),this.lam0=h-Math.asin(.5*(i-1/i)*Math.tan(c))/this.B):(a=Math.pow(pA(this.e,g,Math.sin(g)),this.B),o=Math.pow(pA(this.e,m,Math.sin(m)),this.B),i=this.E/a,A=(o-a)/(o+a),l=this.E*this.E,l=(l-o*a)/(l+o*a),r=f-d,r<-Math.pi?d-=Hy:r>Math.pi&&(d+=Hy),this.lam0=we(.5*(f+d)-Math.atan(l*Math.tan(.5*this.B*(f-d))/A)/this.B),c=Math.atan(2*Math.sin(this.B*we(f-this.lam0))/(i-1/i)),u=v=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.A*this.B,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(v))),this.lat0<0&&(this.u_0=-this.u_0)),i=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(An-i)),this.v_pole_s=this.ArB*Math.log(Math.tan(An+i))}function Nnt(r){var e={},t,n,i,a,o,s,A,l;if(r.x=r.x-this.lam0,Math.abs(Math.abs(r.y)-ee)>he){if(o=this.E/Math.pow(pA(this.e,r.y,Math.sin(r.y)),this.B),s=1/o,t=.5*(o-s),n=.5*(o+s),a=Math.sin(this.B*r.x),i=(t*this.singam-a*this.cosgam)/n,Math.abs(Math.abs(i)-1)<he)throw new Error;l=.5*this.ArB*Math.log((1-i)/(1+i)),s=Math.cos(this.B*r.x),Math.abs(s)<Dp?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 Pnt(r){var e,t,n,i,a,o,s,A={};if(r.x=(r.x-this.x0)*(1/this.a),r.y=(r.y-this.y0)*(1/this.a),this.no_rot?(t=r.y,e=r.x):(t=r.x*this.cosrot-r.y*this.sinrot,e=r.y*this.cosrot+r.x*this.sinrot+this.u_0),n=Math.exp(-this.BrA*t),i=.5*(n-1/n),a=.5*(n+1/n),o=Math.sin(this.BrA*e),s=(o*this.cosgam+i*this.singam)/a,Math.abs(Math.abs(s)-1)<he)A.x=0,A.y=s<0?-ee:ee;else{if(A.y=this.E/Math.sqrt((1+s)/(1-s)),A.y=$y(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 Unt=["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"],Dnt={init:Mnt,forward:Nnt,inverse:Pnt,names:Unt};function Qnt(){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)<he)){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=ml(this.e,e,t),i=pA(this.e,this.lat1,e),a=Math.sin(this.lat2),o=Math.cos(this.lat2),s=ml(this.e,a,o),A=pA(this.e,this.lat2,a),l=pA(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>he?this.ns=Math.log(n/s)/Math.log(i/A):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(i,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function knt(r){var e=r.x,t=r.y;Math.abs(2*Math.abs(t)-Math.PI)<=he&&(t=O0(t)*(ee-2*he));var n=Math.abs(Math.abs(t)-ee),i,a;if(n>he)i=pA(this.e,t,Math.sin(t)),a=this.a*this.f0*Math.pow(i,this.ns);else{if(n=t*this.ns,n<=0)return null;a=0}var o=this.ns*we(e-this.long0);return r.x=this.k0*(a*Math.sin(o))+this.x0,r.y=this.k0*(this.rh-a*Math.cos(o))+this.y0,r}function Hnt(r){var e,t,n,i,a,o=(r.x-this.x0)/this.k0,s=this.rh-(r.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+s*s),t=1):(e=-Math.sqrt(o*o+s*s),t=-1);var A=0;if(e!==0&&(A=Math.atan2(t*o,t*s)),e!==0||this.ns>0){if(t=1/this.ns,n=Math.pow(e/(this.a*this.f0),t),i=$y(this.e,n),i===-9999)return null}else i=-ee;return a=we(A/this.ns+this.long0),r.x=a,r.y=i,r}var Gnt=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc"],$nt={init:Qnt,forward:knt,inverse:Hnt,names:Gnt};function Vnt(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function jnt(r){var e,t,n,i,a,o,s,A=r.x,l=r.y,u=we(A-this.long0);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),t=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-u*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(t)+Math.sin(this.ad)*Math.cos(t)*Math.cos(n)),a=Math.asin(Math.cos(t)*Math.sin(n)/Math.cos(i)),o=this.n*a,s=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),r.y=s*Math.cos(o)/1,r.x=s*Math.sin(o)/1,this.czech||(r.y*=-1,r.x*=-1),r}function Knt(r){var e,t,n,i,a,o,s,A,l=r.x;r.x=r.y,r.y=l,this.czech||(r.y*=-1,r.x*=-1),o=Math.sqrt(r.x*r.x+r.y*r.y),a=Math.atan2(r.y,r.x),i=a/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/o,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(i)),t=Math.asin(Math.cos(n)*Math.sin(i)/Math.cos(e)),r.x=this.long0-t/this.alfa,s=e,A=0;var u=0;do r.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(s))/(1-this.e*Math.sin(s)),this.e/2))-this.s45),Math.abs(s-r.y)<1e-10&&(A=1),s=r.y,u+=1;while(A===0&&u<15);return u>=15?null:r}var Wnt=["Krovak","krovak"],znt={init:Vnt,forward:jnt,inverse:Knt,names:Wnt};function fo(r,e,t,n,i){return r*i-e*Math.sin(2*i)+t*Math.sin(4*i)-n*Math.sin(6*i)}function F0(r){return 1-.25*r*(1+r/16*(3+1.25*r))}function R0(r){return .375*r*(1+.25*r*(1+.46875*r))}function M0(r){return .05859375*r*r*(1+.75*r)}function N0(r){return r*r*r*(35/3072)}function Ng(r,e,t){var n=e*t;return r/Math.sqrt(1-n*n)}function av(r){return Math.abs(r)<ee?r:r-O0(r)*Math.PI}function oE(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 Ynt(){this.sphere||(this.e0=F0(this.es),this.e1=R0(this.es),this.e2=M0(this.es),this.e3=N0(this.es),this.ml0=this.a*fo(this.e0,this.e1,this.e2,this.e3,this.lat0))}function Xnt(r){var e,t,n=r.x,i=r.y;if(n=we(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=Ng(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*fo(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 qnt(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=oE(o,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(s)-ee)<=he)return r.x=this.long0,r.y=ee,t<0&&(r.y*=-1),r;var A=Ng(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=we(i+this.long0),r.y=av(n),r}var Znt=["Cassini","Cassini_Soldner","cass"],Jnt={init:Ynt,forward:Xnt,inverse:qnt,names:Znt};function Xc(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 tit=1,eit=2,rit=3,nit=4;function iit(){var r=Math.abs(this.lat0);if(Math.abs(r-ee)<he?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(r)<he?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=Xc(this.e,1),this.mmf=.5/(1-this.es),this.apa=fit(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=Xc(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function ait(r){var e,t,n,i,a,o,s,A,l,u,c=r.x,h=r.y;if(c=we(c-this.long0),this.sphere){if(a=Math.sin(h),u=Math.cos(h),n=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(t=this.mode===this.EQUIT?1+u*n:1+this.sinph0*a+this.cosph0*u*n,t<=he)return null;t=Math.sqrt(2/t),e=t*u*Math.sin(c),t*=this.mode===this.EQUIT?a:this.cosph0*a-this.sinph0*u*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(h+this.lat0)<he)return null;t=An-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=Xc(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=ee+h,o=this.qp-o;break;case this.S_POLE:l=h-ee,o=this.qp+o;break}if(Math.abs(l)<he)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 oit(r){r.x-=this.x0,r.y-=this.y0;var e=r.x/this.a,t=r.y/this.a,n,i,a,o,s,A,l;if(this.sphere){var u=0,c,h=0;if(c=Math.sqrt(e*e+t*t),i=c*.5,i>1)return null;switch(i=2*Math.asin(i),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(h=Math.sin(i),u=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=he?0:Math.asin(t*h/c),e*=h,t=u*c;break;case this.OBLIQ:i=Math.abs(c)<=he?this.lat0:Math.asin(u*this.sinph0+t*h*this.cosph0/c),e*=h*this.cosph0,t=(u-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:t=-t,i=ee-i;break;case this.S_POLE:i-=ee;break}n=t===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(e,t)}else{if(l=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(e/=this.dd,t*=this.dd,A=Math.sqrt(e*e+t*t),A<he)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=dit(Math.asin(l),this.apa)}return r.x=we(this.long0+n),r.y=i,r}var sit=.3333333333333333,Ait=.17222222222222222,lit=.10257936507936508,uit=.06388888888888888,cit=.0664021164021164,hit=.016415012942191543;function fit(r){var e,t=[];return t[0]=r*sit,e=r*r,t[0]+=e*Ait,t[1]=e*uit,e*=r,t[0]+=e*lit,t[1]+=e*cit,t[2]=e*hit,t}function dit(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 pit=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],git={init:iit,forward:ait,inverse:oit,names:pit,S_POLE:tit,N_POLE:eit,EQUIT:rit,OBLIQ:nit};function dh(r){return Math.abs(r)>1&&(r=r>1?1:-1),Math.asin(r)}function vit(){Math.abs(this.lat1+this.lat2)<he||(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=ml(this.e3,this.sin_po,this.cos_po),this.qs1=Xc(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=ml(this.e3,this.sin_po,this.cos_po),this.qs2=Xc(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=Xc(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>he?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function mit(r){var e=r.x,t=r.y;this.sin_phi=Math.sin(t),this.cos_phi=Math.cos(t);var n=Xc(this.e3,this.sin_phi,this.cos_phi),i=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,a=this.ns0*we(e-this.long0),o=i*Math.sin(a)+this.x0,s=this.rh-i*Math.cos(a)+this.y0;return r.x=o,r.y=s,r}function yit(r){var e,t,n,i,a,o;return r.x-=this.x0,r.y=this.rh-r.y+this.y0,this.ns0>=0?(e=Math.sqrt(r.x*r.x+r.y*r.y),n=1):(e=-Math.sqrt(r.x*r.x+r.y*r.y),n=-1),i=0,e!==0&&(i=Math.atan2(n*r.x,n*r.y)),n=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(t=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,t)),a=we(i/this.ns0+this.long0),r.x=a,r.y=o,r}function _it(r,e){var t,n,i,a,o,s=dh(.5*e);if(r<he)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 wit=["Albers_Conic_Equal_Area","Albers","aea"],Eit={init:vit,forward:mit,inverse:yit,names:wit,phi1z:_it};function Cit(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function Bit(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=we(l-this.long0),e=Math.sin(u),t=Math.cos(u),i=Math.cos(n),o=this.sin_p14*e+this.cos_p14*t*i,a=1,o>0||Math.abs(o)<=he?(s=this.x0+this.a*a*t*Math.sin(n)/o,A=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*i)/o):(s=this.x0+this.infinity_dist*t*Math.sin(n),A=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*t*i)),r.x=s,r.y=A,r}function bit(r){var e,t,n,i,a,o;return r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,r.x/=this.k0,r.y/=this.k0,(e=Math.sqrt(r.x*r.x+r.y*r.y))?(i=Math.atan2(e,this.rc),t=Math.sin(i),n=Math.cos(i),o=dh(n*this.sin_p14+r.y*t*this.cos_p14/e),a=Math.atan2(r.x*t,e*this.cos_p14*n-r.y*this.sin_p14*t),a=we(this.long0+a)):(o=this.phic0,a=0),r.x=a,r.y=o,r}var Tit=["gnom"],Sit={init:Cit,forward:Bit,inverse:bit,names:Tit};function xit(r,e){var t=1-(1-r*r)/(2*r)*Math.log((1-r)/(1+r));if(Math.abs(Math.abs(e)-t)<1e-6)return e<0?-1*ee:ee;for(var n=Math.asin(.5*e),i,a,o,s,A=0;A<30;A++)if(a=Math.sin(n),o=Math.cos(n),s=r*a,i=Math.pow(1-s*s,2)/(2*o)*(e/(1-r*r)-a/(1-s*s)+.5/r*Math.log((1-s)/(1+s))),n+=i,Math.abs(i)<=1e-10)return n;return NaN}function Iit(){this.sphere||(this.k0=ml(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function Lit(r){var e=r.x,t=r.y,n,i,a=we(e-this.long0);if(this.sphere)n=this.x0+this.a*a*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(t)/Math.cos(this.lat_ts);else{var o=Xc(this.e,Math.sin(t));n=this.x0+this.a*this.k0*a,i=this.y0+this.a*o*.5/this.k0}return r.x=n,r.y=i,r}function Oit(r){r.x-=this.x0,r.y-=this.y0;var e,t;return this.sphere?(e=we(this.long0+r.x/this.a/Math.cos(this.lat_ts)),t=Math.asin(r.y/this.a*Math.cos(this.lat_ts))):(t=xit(this.e,2*r.y*this.k0/this.a),e=we(this.long0+r.x/(this.a*this.k0))),r.x=e,r.y=t,r}var Fit=["cea"],Rit={init:Iit,forward:Lit,inverse:Oit,names:Fit};function Mit(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Nit(r){var e=r.x,t=r.y,n=we(e-this.long0),i=av(t-this.lat0);return r.x=this.x0+this.a*n*this.rc,r.y=this.y0+this.a*i,r}function Pit(r){var e=r.x,t=r.y;return r.x=we(this.long0+(e-this.x0)/(this.a*this.rc)),r.y=av(this.lat0+(t-this.y0)/this.a),r}var Uit=["Equirectangular","Equidistant_Cylindrical","eqc"],Dit={init:Mit,forward:Nit,inverse:Pit,names:Uit},d5=20;function Qit(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=F0(this.es),this.e1=R0(this.es),this.e2=M0(this.es),this.e3=N0(this.es),this.ml0=this.a*fo(this.e0,this.e1,this.e2,this.e3,this.lat0)}function kit(r){var e=r.x,t=r.y,n,i,a,o=we(e-this.long0);if(a=o*Math.sin(t),this.sphere)Math.abs(t)<=he?(n=this.a*o,i=-1*this.a*this.lat0):(n=this.a*Math.sin(a)/Math.tan(t),i=this.a*(av(t-this.lat0)+(1-Math.cos(a))/Math.tan(t)));else if(Math.abs(t)<=he)n=this.a*o,i=-1*this.ml0;else{var s=Ng(this.a,this.e,Math.sin(t))/Math.tan(t);n=s*Math.sin(a),i=this.a*fo(this.e0,this.e1,this.e2,this.e3,t)-this.ml0+s*(1-Math.cos(a))}return r.x=n+this.x0,r.y=i+this.y0,r}function Hit(r){var e,t,n,i,a,o,s,A,l;if(n=r.x-this.x0,i=r.y-this.y0,this.sphere)if(Math.abs(i+this.a*this.lat0)<=he)e=we(n/this.a+this.long0),t=0;else{o=this.lat0+i/this.a,s=n*n/this.a/this.a+o*o,A=o;var u;for(a=d5;a;--a)if(u=Math.tan(A),l=-1*(o*(A*u+1)-A-.5*(A*A+s)*u)/((A-o)/u-1),A+=l,Math.abs(l)<=he){t=A;break}e=we(this.long0+Math.asin(n*Math.tan(A)/this.a)/Math.sin(t))}else if(Math.abs(i+this.ml0)<=he)t=0,e=we(this.long0+n/this.a);else{o=(this.ml0+i)/this.a,s=n*n/this.a/this.a+o*o,A=o;var c,h,f,d,g;for(a=d5;a;--a)if(g=this.e*Math.sin(A),c=Math.sqrt(1-g*g)*Math.tan(A),h=this.a*fo(this.e0,this.e1,this.e2,this.e3,A),f=this.e0-2*this.e1*Math.cos(2*A)+4*this.e2*Math.cos(4*A)-6*this.e3*Math.cos(6*A),d=h/this.a,l=(o*(c*d+1)-d-.5*c*(d*d+s))/(this.es*Math.sin(2*A)*(d*d+s-2*o*d)/(4*c)+(o-d)*(c*f-2/Math.sin(2*A))-f),A-=l,Math.abs(l)<=he){t=A;break}c=Math.sqrt(1-this.es*Math.pow(Math.sin(t),2))*Math.tan(t),e=we(this.long0+Math.asin(n*c/this.a)/Math.sin(t))}return r.x=e,r.y=t,r}var Git=["Polyconic","poly"],$it={init:Qit,forward:kit,inverse:Hit,names:Git};function Vit(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function jit(r){var e,t=r.x,n=r.y,i=n-this.lat0,a=t-this.long0,o=i/ay*1e-5,s=a,A=1,l=0;for(e=1;e<=10;e++)A=A*o,l=l+this.A[e]*A;var u=l,c=s,h=1,f=0,d,g,m=0,v=0;for(e=1;e<=6;e++)d=h*u-f*c,g=f*u+h*c,h=d,f=g,m=m+this.B_re[e]*h-this.B_im[e]*f,v=v+this.B_im[e]*h+this.B_re[e]*f;return r.x=v*this.a+this.x0,r.y=m*this.a+this.y0,r}function Kit(r){var e,t=r.x,n=r.y,i=t-this.x0,a=n-this.y0,o=a/this.a,s=i/this.a,A=1,l=0,u,c,h=0,f=0;for(e=1;e<=6;e++)u=A*o-l*s,c=l*o+A*s,A=u,l=c,h=h+this.C_re[e]*A-this.C_im[e]*l,f=f+this.C_im[e]*A+this.C_re[e]*l;for(var d=0;d<this.iterations;d++){var g=h,m=f,v,y,w=o,C=s;for(e=2;e<=6;e++)v=g*h-m*f,y=m*h+g*f,g=v,m=y,w=w+(e-1)*(this.B_re[e]*g-this.B_im[e]*m),C=C+(e-1)*(this.B_im[e]*g+this.B_re[e]*m);g=1,m=0;var O=this.B_re[1],F=this.B_im[1];for(e=2;e<=6;e++)v=g*h-m*f,y=m*h+g*f,g=v,m=y,O=O+e*(this.B_re[e]*g-this.B_im[e]*m),F=F+e*(this.B_im[e]*g+this.B_re[e]*m);var I=O*O+F*F;h=(w*O+C*F)/I,f=(C*O-w*F)/I}var T=h,L=f,N=1,x=0;for(e=1;e<=9;e++)N=N*T,x=x+this.D[e]*N;var S=this.lat0+x*ay*1e5,P=this.long0+L;return r.x=P,r.y=S,r}var Wit=["New_Zealand_Map_Grid","nzmg"],zit={init:Vit,forward:jit,inverse:Kit,names:Wit};function Yit(){}function Xit(r){var e=r.x,t=r.y,n=we(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 qit(r){r.x-=this.x0,r.y-=this.y0;var e=we(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 Zit=["Miller_Cylindrical","mill"],Jit={init:Yit,forward:Xit,inverse:qit,names:Zit},tat=20;function eat(){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=fH(this.es)}function rat(r){var e,t,n=r.x,i=r.y;if(n=we(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=tat;o;--o){var s=(this.m*i+Math.sin(i)-a)/(this.m+Math.cos(i));if(i-=s,Math.abs(s)<he)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*GC(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 nat(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=dh((this.m*e+Math.sin(e))/this.n):this.n!==1&&(e=dh(Math.sin(e)/this.n)),n=we(n+this.long0),e=av(e)):(e=dH(r.y/this.a,this.es,this.en),i=Math.abs(e),i<ee?(i=Math.sin(e),t=this.long0+r.x*Math.sqrt(1-this.es*i*i)/(this.a*Math.cos(e)),n=we(t)):i-he<ee&&(n=this.long0)),r.x=n,r.y=e,r}var iat=["Sinusoidal","sinu"],aat={init:eat,forward:rat,inverse:nat,names:iat};function oat(){}function sat(r){for(var e=r.x,t=r.y,n=we(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)<he)break}i/=2,Math.PI/2-Math.abs(t)<he&&(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 Aat(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=we(this.long0+r.x/(.900316316158*this.a*Math.cos(e)));n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),t=(2*e+Math.sin(2*e))/Math.PI,Math.abs(t)>1&&(t=1);var i=Math.asin(t);return r.x=n,r.y=i,r}var lat=["Mollweide","moll"],uat={init:oat,forward:sat,inverse:Aat,names:lat};function cat(){Math.abs(this.lat1+this.lat2)<he||(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=F0(this.es),this.e1=R0(this.es),this.e2=M0(this.es),this.e3=N0(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=ml(this.e,this.sinphi,this.cosphi),this.ml1=fo(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<he?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=ml(this.e,this.sinphi,this.cosphi),this.ml2=fo(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=fo(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function hat(r){var e=r.x,t=r.y,n;if(this.sphere)n=this.a*(this.g-t);else{var i=fo(this.e0,this.e1,this.e2,this.e3,t);n=this.a*(this.g-i)}var a=this.ns*we(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 fat(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=we(this.long0+a/this.ns),n=av(this.g-t/this.a),r.x=i,r.y=n,r;var o=this.g-t/this.a;return n=oE(o,this.e0,this.e1,this.e2,this.e3),i=we(this.long0+a/this.ns),r.x=i,r.y=n,r}var dat=["Equidistant_Conic","eqdc"],pat={init:cat,forward:hat,inverse:fat,names:dat};function gat(){this.R=this.a}function vat(r){var e=r.x,t=r.y,n=we(e-this.long0),i,a;Math.abs(t)<=he&&(i=this.x0+this.R*n,a=this.y0);var o=dh(2*Math.abs(t/Math.PI));(Math.abs(n)<=he||Math.abs(Math.abs(t)-ee)<=he)&&(i=this.x0,t>=0?a=this.y0+Math.PI*this.R*Math.tan(.5*o):a=this.y0+Math.PI*this.R*-Math.tan(.5*o));var s=.5*Math.abs(Math.PI/n-n/Math.PI),A=s*s,l=Math.sin(o),u=Math.cos(o),c=u/(l+u-1),h=c*c,f=c*(2/l-1),d=f*f,g=Math.PI*this.R*(s*(c-d)+Math.sqrt(A*(c-d)*(c-d)-(d+A)*(h-d)))/(d+A);n<0&&(g=-g),i=this.x0+g;var m=A+c;return g=Math.PI*this.R*(f*m-s*Math.sqrt((d+A)*(A+1)-m*m))/(d+A),t>=0?a=this.y0+g:a=this.y0-g,r.x=i,r.y=a,r}function mat(r){var e,t,n,i,a,o,s,A,l,u,c,h,f;return r.x-=this.x0,r.y-=this.y0,c=Math.PI*this.R,n=r.x/c,i=r.y/c,a=n*n+i*i,o=-Math.abs(i)*(1+a),s=o-2*i*i+n*n,A=-2*o+1+2*i*i+a*a,f=i*i/A+(2*s*s*s/A/A/A-9*o*s/A/A)/27,l=(o-s*s/3/A)/A,u=2*Math.sqrt(-l/3),c=3*f/l/u,Math.abs(c)>1&&(c>=0?c=1:c=-1),h=Math.acos(c)/3,r.y>=0?t=(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI:t=-(-u*Math.cos(h+Math.PI/3)-s/3/A)*Math.PI,Math.abs(n)<he?e=this.long0:e=we(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 yat=["Van_der_Grinten_I","VanDerGrinten","vandg"],_at={init:gat,forward:vat,inverse:mat,names:yat};function wat(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function Eat(r){var e=r.x,t=r.y,n=Math.sin(r.y),i=Math.cos(r.y),a=we(e-this.long0),o,s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,F,I,T,L,N,x,S;return this.sphere?Math.abs(this.sin_p12-1)<=he?(r.x=this.x0+this.a*(ee-t)*Math.sin(a),r.y=this.y0-this.a*(ee-t)*Math.cos(a),r):Math.abs(this.sin_p12+1)<=he?(r.x=this.x0+this.a*(ee+t)*Math.sin(a),r.y=this.y0+this.a*(ee+t)*Math.cos(a),r):(I=this.sin_p12*n+this.cos_p12*i*Math.cos(a),O=Math.acos(I),F=O?O/Math.sin(O):1,r.x=this.x0+this.a*F*i*Math.sin(a),r.y=this.y0+this.a*F*(this.cos_p12*n-this.sin_p12*i*Math.cos(a)),r):(o=F0(this.es),s=R0(this.es),A=M0(this.es),l=N0(this.es),Math.abs(this.sin_p12-1)<=he?(u=this.a*fo(o,s,A,l,ee),c=this.a*fo(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)<=he?(u=this.a*fo(o,s,A,l,ee),c=this.a*fo(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=Ng(this.a,this.e,this.sin_p12),d=Ng(this.a,this.e,n),g=Math.atan((1-this.es)*h+this.es*f*this.sin_p12/(d*i)),m=Math.atan2(Math.sin(a),this.cos_p12*Math.tan(g)-this.sin_p12*Math.cos(a)),m===0?T=Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):Math.abs(Math.abs(m)-Math.PI)<=he?T=-Math.asin(this.cos_p12*Math.sin(g)-this.sin_p12*Math.cos(g)):T=Math.asin(Math.sin(a)*Math.cos(g)/Math.sin(m)),v=this.e*this.sin_p12/Math.sqrt(1-this.es),y=this.e*this.cos_p12*Math.cos(m)/Math.sqrt(1-this.es),w=v*y,C=y*y,L=T*T,N=L*T,x=N*T,S=x*T,O=f*T*(1-L*C*(1-C)/6+N/8*w*(1-2*C)+x/120*(C*(4-7*C)-3*v*v*(1-7*C))-S/48*w),r.x=this.x0+O*Math.sin(m),r.y=this.y0+O*Math.cos(m),r))}function Cat(r){r.x-=this.x0,r.y-=this.y0;var e,t,n,i,a,o,s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,F,I,T;return this.sphere?(e=Math.sqrt(r.x*r.x+r.y*r.y),e>2*ee*this.a?void 0:(t=e/this.a,n=Math.sin(t),i=Math.cos(t),a=this.long0,Math.abs(e)<=he?o=this.lat0:(o=dh(i*this.sin_p12+r.y*n*this.cos_p12/e),s=Math.abs(this.lat0)-ee,Math.abs(s)<=he?this.lat0>=0?a=we(this.long0+Math.atan2(r.x,-r.y)):a=we(this.long0-Math.atan2(-r.x,r.y)):a=we(this.long0+Math.atan2(r.x*n,e*this.cos_p12*i-r.y*this.sin_p12*n))),r.x=a,r.y=o,r)):(A=F0(this.es),l=R0(this.es),u=M0(this.es),c=N0(this.es),Math.abs(this.sin_p12-1)<=he?(h=this.a*fo(A,l,u,c,ee),e=Math.sqrt(r.x*r.x+r.y*r.y),f=h-e,o=oE(f/this.a,A,l,u,c),a=we(this.long0+Math.atan2(r.x,-1*r.y)),r.x=a,r.y=o,r):Math.abs(this.sin_p12+1)<=he?(h=this.a*fo(A,l,u,c,ee),e=Math.sqrt(r.x*r.x+r.y*r.y),f=e-h,o=oE(f/this.a,A,l,u,c),a=we(this.long0+Math.atan2(r.x,r.y)),r.x=a,r.y=o,r):(e=Math.sqrt(r.x*r.x+r.y*r.y),m=Math.atan2(r.x,r.y),d=Ng(this.a,this.e,this.sin_p12),v=Math.cos(m),y=this.e*this.cos_p12*v,w=-y*y/(1-this.es),C=3*this.es*(1-w)*this.sin_p12*this.cos_p12*v/(1-this.es),O=e/d,F=O-w*(1+w)*Math.pow(O,3)/6-C*(1+3*w)*Math.pow(O,4)/24,I=1-w*F*F/2-O*F*F*F/6,g=Math.asin(this.sin_p12*Math.cos(F)+this.cos_p12*Math.sin(F)*v),a=we(this.long0+Math.asin(Math.sin(m)*Math.sin(F)/Math.cos(g))),T=Math.sin(g),o=Math.atan2((T-this.es*I*this.sin_p12)*Math.tan(g),T*(1-this.es)),r.x=a,r.y=o,r))}var Bat=["Azimuthal_Equidistant","aeqd"],bat={init:wat,forward:Eat,inverse:Cat,names:Bat};function Tat(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function Sat(r){var e,t,n,i,a,o,s,A,l=r.x,u=r.y;return n=we(l-this.long0),e=Math.sin(u),t=Math.cos(u),i=Math.cos(n),o=this.sin_p14*e+this.cos_p14*t*i,a=1,(o>0||Math.abs(o)<=he)&&(s=this.a*a*t*Math.sin(n),A=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*t*i)),r.x=s,r.y=A,r}function xat(r){var e,t,n,i,a,o,s;return r.x-=this.x0,r.y-=this.y0,e=Math.sqrt(r.x*r.x+r.y*r.y),t=dh(e/this.a),n=Math.sin(t),i=Math.cos(t),o=this.long0,Math.abs(e)<=he?(s=this.lat0,r.x=o,r.y=s,r):(s=dh(i*this.sin_p14+r.y*n*this.cos_p14/e),a=Math.abs(this.lat0)-ee,Math.abs(a)<=he?(this.lat0>=0?o=we(this.long0+Math.atan2(r.x,-r.y)):o=we(this.long0-Math.atan2(-r.x,r.y)),r.x=o,r.y=s,r):(o=we(this.long0+Math.atan2(r.x*n,e*this.cos_p14*i-r.y*this.sin_p14*n)),r.x=o,r.y=s,r))}var Iat=["ortho"],Lat={init:Tat,forward:Sat,inverse:xat,names:Iat},Yn={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ln={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function Oat(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=ee-An/2?this.face=Yn.TOP:this.lat0<=-(ee-An/2)?this.face=Yn.BOTTOM:Math.abs(this.long0)<=An?this.face=Yn.FRONT:Math.abs(this.long0)<=ee+An?this.face=this.long0>0?Yn.RIGHT:Yn.LEFT:this.face=Yn.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function Fat(r){var e={x:0,y:0},t,n,i,a,o,s,A={value:0};if(r.x-=this.long0,this.es!==0?t=Math.atan(this.one_minus_f_squared*Math.tan(r.y)):t=r.y,n=r.x,this.face===Yn.TOP)a=ee-t,n>=An&&n<=ee+An?(A.value=ln.AREA_0,i=n-ee):n>ee+An||n<=-(ee+An)?(A.value=ln.AREA_1,i=n>0?n-Ei:n+Ei):n>-(ee+An)&&n<=-An?(A.value=ln.AREA_2,i=n+ee):(A.value=ln.AREA_3,i=n);else if(this.face===Yn.BOTTOM)a=ee+t,n>=An&&n<=ee+An?(A.value=ln.AREA_0,i=-n+ee):n<An&&n>=-An?(A.value=ln.AREA_1,i=-n):n<-An&&n>=-(ee+An)?(A.value=ln.AREA_2,i=-n-ee):(A.value=ln.AREA_3,i=n>0?-n+Ei:-n-Ei);else{var l,u,c,h,f,d,g;this.face===Yn.RIGHT?n=hg(n,+ee):this.face===Yn.BACK?n=hg(n,+Ei):this.face===Yn.LEFT&&(n=hg(n,-ee)),h=Math.sin(t),f=Math.cos(t),d=Math.sin(n),g=Math.cos(n),l=f*g,u=f*d,c=h,this.face===Yn.FRONT?(a=Math.acos(l),i=J_(a,c,u,A)):this.face===Yn.RIGHT?(a=Math.acos(u),i=J_(a,c,-l,A)):this.face===Yn.BACK?(a=Math.acos(-l),i=J_(a,c,-u,A)):this.face===Yn.LEFT?(a=Math.acos(-u),i=J_(a,c,l,A)):(a=i=0,A.value=ln.AREA_0)}return s=Math.atan(12/Ei*(i+Math.acos(Math.sin(i)*Math.cos(An))-ee)),o=Math.sqrt((1-Math.cos(a))/(Math.cos(s)*Math.cos(s))/(1-Math.cos(Math.atan(1/Math.cos(i))))),A.value===ln.AREA_1?s+=ee:A.value===ln.AREA_2?s+=Ei:A.value===ln.AREA_3&&(s+=1.5*Ei),e.x=o*Math.cos(s),e.y=o*Math.sin(s),e.x=e.x*this.a+this.x0,e.y=e.y*this.a+this.y0,r.x=e.x,r.y=e.y,r}function Rat(r){var e={lam:0,phi:0},t,n,i,a,o,s,A,l,u,c={value:0};if(r.x=(r.x-this.x0)/this.a,r.y=(r.y-this.y0)/this.a,n=Math.atan(Math.sqrt(r.x*r.x+r.y*r.y)),t=Math.atan2(r.y,r.x),r.x>=0&&r.x>=Math.abs(r.y)?c.value=ln.AREA_0:r.y>=0&&r.y>=Math.abs(r.x)?(c.value=ln.AREA_1,t-=ee):r.x<0&&-r.x>=Math.abs(r.y)?(c.value=ln.AREA_2,t=t<0?t+Ei:t-Ei):(c.value=ln.AREA_3,t+=ee),u=Ei/12*Math.tan(t),o=Math.sin(u)/(Math.cos(u)-1/Math.sqrt(2)),s=Math.atan(o),i=Math.cos(t),a=Math.tan(n),A=1-i*i*a*a*(1-Math.cos(Math.atan(1/Math.cos(s)))),A<-1?A=-1:A>1&&(A=1),this.face===Yn.TOP)l=Math.acos(A),e.phi=ee-l,c.value===ln.AREA_0?e.lam=s+ee:c.value===ln.AREA_1?e.lam=s<0?s+Ei:s-Ei:c.value===ln.AREA_2?e.lam=s-ee:e.lam=s;else if(this.face===Yn.BOTTOM)l=Math.acos(A),e.phi=l-ee,c.value===ln.AREA_0?e.lam=-s+ee:c.value===ln.AREA_1?e.lam=-s:c.value===ln.AREA_2?e.lam=-s-ee:e.lam=s<0?-s-Ei:-s+Ei;else{var h,f,d;h=A,u=h*h,u>=1?d=0:d=Math.sqrt(1-u)*Math.sin(s),u+=d*d,u>=1?f=0:f=Math.sqrt(1-u),c.value===ln.AREA_1?(u=f,f=-d,d=u):c.value===ln.AREA_2?(f=-f,d=-d):c.value===ln.AREA_3&&(u=f,f=d,d=-u),this.face===Yn.RIGHT?(u=h,h=-f,f=u):this.face===Yn.BACK?(h=-h,f=-f):this.face===Yn.LEFT&&(u=h,h=f,f=-u),e.phi=Math.acos(-d)-ee,e.lam=Math.atan2(f,h),this.face===Yn.RIGHT?e.lam=hg(e.lam,-ee):this.face===Yn.BACK?e.lam=hg(e.lam,-Ei):this.face===Yn.LEFT&&(e.lam=hg(e.lam,+ee))}if(this.es!==0){var g,m,v;g=e.phi<0?1:0,m=Math.tan(e.phi),v=this.b/Math.sqrt(m*m+this.one_minus_f_squared),e.phi=Math.atan(Math.sqrt(this.a*this.a-v*v)/(this.one_minus_f*v)),g&&(e.phi=-e.phi)}return e.lam+=this.long0,r.x=e.lam,r.y=e.phi,r}function J_(r,e,t,n){var i;return r<he?(n.value=ln.AREA_0,i=0):(i=Math.atan2(e,t),Math.abs(i)<=An?n.value=ln.AREA_0:i>An&&i<=ee+An?(n.value=ln.AREA_1,i-=ee):i>ee+An||i<=-(ee+An)?(n.value=ln.AREA_2,i=i>=0?i-Ei:i+Ei):(n.value=ln.AREA_3,i+=ee)),i}function hg(r,e){var t=r+e;return t<-Ei?t+=Hy:t>+Ei&&(t-=Hy),t}var Mat=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],Nat={init:Oat,forward:Fat,inverse:Rat,names:Mat},Ix=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Nm=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],vH=.8487,mH=1.3523,yH=il/5,Pat=1/yH,Jp=18,sE=function(r,e){return r[0]+e*(r[1]+e*(r[2]+e*r[3]))},Uat=function(r,e){return r[1]+e*(2*r[2]+e*3*r[3])};function Dat(r,e,t,n){for(var i=e;n;--n){var a=r(i);if(i-=a,Math.abs(a)<t)break}return i}function Qat(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function kat(r){var e=we(r.x-this.long0),t=Math.abs(r.y),n=Math.floor(t*yH);n<0?n=0:n>=Jp&&(n=Jp-1),t=il*(t-Pat*n);var i={x:sE(Ix[n],t)*e,y:sE(Nm[n],t)};return r.y<0&&(i.y=-i.y),i.x=i.x*this.a*vH+this.x0,i.y=i.y*this.a*mH+this.y0,i}function Hat(r){var e={x:(r.x-this.x0)/(this.a*vH),y:Math.abs(r.y-this.y0)/(this.a*mH)};if(e.y>=1)e.x/=Ix[Jp][0],e.y=r.y<0?-ee:ee;else{var t=Math.floor(e.y*Jp);for(t<0?t=0:t>=Jp&&(t=Jp-1);;)if(Nm[t][0]>e.y)--t;else if(Nm[t+1][0]<=e.y)++t;else break;var n=Nm[t],i=5*(e.y-n[0])/(Nm[t+1][0]-n[0]);i=Dat(function(a){return(sE(n,a)-e.y)/Uat(n,a)},i,he,100),e.x/=sE(Ix[t],i),e.y=(5*t+i)*va,r.y<0&&(e.y=-e.y)}return e.x=we(e.x+this.long0),e}var Gat=["Robinson","robin"],$at={init:Qat,forward:kat,inverse:Hat,names:Gat};function Vat(){this.name="geocent"}function jat(r){var e=iH(r,this.es,this.a);return e}function Kat(r){var e=aH(r,this.es,this.a,this.b);return e}var Wat=["Geocentric","geocentric","geocent","Geocent"],zat={init:Vat,forward:jat,inverse:Kat,names:Wat},Ga={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},om={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function Yat(){if(Object.keys(om).forEach(function(t){if(typeof this[t]>"u")this[t]=om[t].def;else{if(om[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);om[t].num&&(this[t]=parseFloat(this[t]))}om[t].degrees&&(this[t]=this[t]*va)}.bind(this)),Math.abs(Math.abs(this.lat0)-ee)<he?this.mode=this.lat0<0?Ga.S_POLE:Ga.N_POLE:Math.abs(this.lat0)<he?this.mode=Ga.EQUIT:(this.mode=Ga.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 Xat(r){r.x-=this.long0;var e=Math.sin(r.y),t=Math.cos(r.y),n=Math.cos(r.x),i,a;switch(this.mode){case Ga.OBLIQ:a=this.sinph0*e+this.cosph0*t*n;break;case Ga.EQUIT:a=t*n;break;case Ga.S_POLE:a=-e;break;case Ga.N_POLE:a=e;break}switch(a=this.pn1/(this.p-a),i=a*t*Math.sin(r.x),this.mode){case Ga.OBLIQ:a*=this.cosph0*e-this.sinph0*t*n;break;case Ga.EQUIT:a*=e;break;case Ga.N_POLE:a*=-(t*n);break;case Ga.S_POLE:a*=t*n;break}var o,s;return o=a*this.cg+i*this.sg,s=1/(o*this.sw*this.h1+this.cw),i=(i*this.cg-a*this.sg)*this.cw*s,a=o*s,r.x=i*this.a,r.y=a*this.a,r}function qat(r){r.x/=this.a,r.y/=this.a;var e={x:r.x,y:r.y},t,n,i;i=1/(this.pn1-r.y*this.sw),t=this.pn1*r.x*i,n=this.pn1*r.y*this.cw*i,r.x=t*this.cg+n*this.sg,r.y=n*this.cg-t*this.sg;var a=$C(r.x,r.y);if(Math.abs(a)<he)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 Ga.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 Ga.EQUIT:e.y=Math.asin(r.y*s/a),r.y=o*a,r.x*=s;break;case Ga.N_POLE:e.y=Math.asin(o),r.y=-r.y;break;case Ga.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 Zat=["Tilted_Perspective","tpers"],Jat={init:Yat,forward:Xat,inverse:qat,names:Zat};function tot(r){r.Proj.projections.add(nw),r.Proj.projections.add(iw),r.Proj.projections.add(cnt),r.Proj.projections.add(wnt),r.Proj.projections.add(Snt),r.Proj.projections.add(Fnt),r.Proj.projections.add(Dnt),r.Proj.projections.add($nt),r.Proj.projections.add(znt),r.Proj.projections.add(Jnt),r.Proj.projections.add(git),r.Proj.projections.add(Eit),r.Proj.projections.add(Sit),r.Proj.projections.add(Rit),r.Proj.projections.add(Dit),r.Proj.projections.add($it),r.Proj.projections.add(zit),r.Proj.projections.add(Jit),r.Proj.projections.add(aat),r.Proj.projections.add(uat),r.Proj.projections.add(pat),r.Proj.projections.add(_at),r.Proj.projections.add(bat),r.Proj.projections.add(Lat),r.Proj.projections.add(Nat),r.Proj.projections.add($at),r.Proj.projections.add(zat),r.Proj.projections.add(Jat)}Ho.defaultDatum="WGS84";Ho.Proj=ul;Ho.WGS84=new Ho.Proj("WGS84");Ho.Point=Mg;Ho.toPoint=oH;Ho.defs=Ao;Ho.nadgrid=frt;Ho.transform=aE;Ho.mgrs=Irt;Ho.version="__VERSION__";tot(Ho);function eot(r){var e=Object.keys(r.defs),t=e.length,n,i;for(n=0;n<t;++n){var a=e[n];if(!Ve(a)){var o=r.defs(a),s=o.units;!s&&o.projName==="longlat"&&(s=ho.DEGREES),i8(new Ru({code:a,axisOrientation:o.axis,metersPerUnit:o.to_meter,units:s}))}}for(n=0;n<t;++n){var A=e[n],l=Ve(A);for(i=0;i<t;++i){var u=e[i],c=Ve(u);if(!r8(A,u))if(r.defs[A]===r.defs[u])fx([l,c]);else{var h=r(A,u);Mq(l,c,CP(l,c,h.forward),CP(c,l,h.inverse))}}}}const rot={name:"ol-projection-register",setup(r){const{projectionName:e,projectionDef:t,projectionExtent:n}=nh(r);return Ho.defs(e.value,t.value),eot(Ho),{projection:new Ru({code:e.value,extent:n.value})}},props:{projectionName:{type:String},projectionDef:{type:String},projectionExtent:{type:Array}}};function not(r,e,t,n,i,a){return Mr("",!0)}var Lx=me(rot,[["render",not]]);function AE(r){AE.installed||(AE.installed=!0,r.component(wx.name,wx),r.component(Ex.name,Ex),r.component(Cx.name,Cx),r.component(Bx.name,Bx),r.component(bx.name,bx),r.component(Lx.name,Lx))}var iot=Object.freeze(Object.defineProperty({__proto__:null,default:AE,install:AE,Map:wx,View:Ex,Feature:Cx,Overlay:Bx,GeoLocation:bx,Projection:Lx},Symbol.toStringTag,{value:"Module"})),Uc={PRELOAD:"preload",USE_INTERIM_TILES_ON_ERROR:"useInterimTilesOnError"},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=this,i=t||{},a=Ce({},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(Uc.PRELOAD)},e.prototype.setPreload=function(t){this.set(Uc.PRELOAD,t)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Uc.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Uc.USE_INTERIM_TILES_ON_ERROR,t)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(Cd),_H=oot,sot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Aot=function(r){sot(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(xe.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()==Te.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()==Te.LOADED){t.interimTile=null;break}else t.getState()==Te.LOADING?n=t:t.getState()==Te.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!==Te.ERROR&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()},e.prototype.load=function(){Re()},e.prototype.getAlpha=function(t,n){if(!this.transition_)return 1;var i=this.transitionStarts_[t];if(!i)i=n,this.transitionStarts_[t]=i;else if(i===-1)return 1;var a=n-i+1e3/60;return a>=this.transition_?1:BF(a/this.transition_)},e.prototype.inTransition=function(t){return this.transition_?this.transitionStarts_[t]!==-1:!1},e.prototype.endTransition=function(t){this.transition_&&(this.transitionStarts_[t]=-1)},e}(Ed),JF=Aot,lot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),uot=function(r){lot(e,r);function e(t,n,i,a,o,s){var A=r.call(this,t,n,s)||this;return A.crossOrigin_=a,A.src_=i,A.key=i,A.image_=new Image,a!==null&&(A.image_.crossOrigin=a),A.unlisten_=null,A.tileLoadFunction_=o,A}return e.prototype.getImage=function(){return this.image_},e.prototype.setImage=function(t){this.image_=t,this.state=Te.LOADED,this.unlistenImage_(),this.changed()},e.prototype.handleImageError_=function(){this.state=Te.ERROR,this.unlistenImage_(),this.image_=cot(),this.changed()},e.prototype.handleImageLoad_=function(){var t=this.image_;t.naturalWidth&&t.naturalHeight?this.state=Te.LOADED:this.state=Te.EMPTY,this.unlistenImage_(),this.changed()},e.prototype.load=function(){this.state==Te.ERROR&&(this.state=Te.IDLE,this.image_=new Image,this.crossOrigin_!==null&&(this.image_.crossOrigin=this.crossOrigin_)),this.state==Te.IDLE&&(this.state=Te.LOADING,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=jF(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))},e.prototype.unlistenImage_=function(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)},e}(JF);function cot(){var r=wo(1,1);return r.fillStyle="rgba(0,0,0,0)",r.fillRect(0,0,1,1),r.canvas}var lE=uot,wH=.5,hot=10,p5=.25,fot=function(){function r(e,t,n,i,a,o){this.sourceProj_=e,this.targetProj_=t;var s={},A=Qy(this.targetProj_,this.sourceProj_);this.transformInv_=function(w){var C=w[0]+"/"+w[1];return s[C]||(s[C]=A(w)),s[C]},this.maxSourceExtent_=i,this.errorThresholdSquared_=a*a,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!i&&!!this.sourceProj_.getExtent()&&jr(i)==jr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?jr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?jr(this.targetProj_.getExtent()):null;var l=BA(n),u=w0(n),c=ev(n),h=_0(n),f=this.transformInv_(l),d=this.transformInv_(u),g=this.transformInv_(c),m=this.transformInv_(h),v=hot+(o?Math.max(0,Math.ceil(Uk(Oy(n)/(o*o*256*256)))):0);if(this.addQuad_(l,u,c,h,f,d,g,m,v),this.wrapsXInSource_){var y=1/0;this.triangles_.forEach(function(w,C,O){y=Math.min(y,w.source[0][0],w.source[1][0],w.source[2][0])}),this.triangles_.forEach(function(w){if(Math.max(w.source[0][0],w.source[1][0],w.source[2][0])-y>this.sourceWorldWidth_/2){var C=[[w.source[0][0],w.source[0][1]],[w.source[1][0],w.source[1][1]],[w.source[2][0],w.source[2][1]]];C[0][0]-y>this.sourceWorldWidth_/2&&(C[0][0]-=this.sourceWorldWidth_),C[1][0]-y>this.sourceWorldWidth_/2&&(C[1][0]-=this.sourceWorldWidth_),C[2][0]-y>this.sourceWorldWidth_/2&&(C[2][0]-=this.sourceWorldWidth_);var O=Math.min(C[0][0],C[1][0],C[2][0]),F=Math.max(C[0][0],C[1][0],C[2][0]);F-O<this.sourceWorldWidth_/2&&(w.source=C)}}.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=oa([a,o,s,A]),c=this.sourceWorldWidth_?jr(u)/this.sourceWorldWidth_:null,h=this.sourceWorldWidth_,f=this.sourceProj_.canWrapX()&&c>.5&&c<1,d=!1;if(l>0){if(this.targetProj_.isGlobal()&&this.targetWorldWidth_){var g=oa([e,t,n,i]),m=jr(g)/this.targetWorldWidth_;d=m>p5||d}!f&&this.sourceProj_.isGlobal()&&c&&(d=c>p5||d)}if(!(!d&&this.maxSourceExtent_&&isFinite(u[0])&&isFinite(u[1])&&isFinite(u[2])&&isFinite(u[3])&&!Xn(u,this.maxSourceExtent_))){var v=0;if(!d&&(!isFinite(a[0])||!isFinite(a[1])||!isFinite(o[0])||!isFinite(o[1])||!isFinite(s[0])||!isFinite(s[1])||!isFinite(A[0])||!isFinite(A[1]))){if(l>0)d=!0;else if(v=(!isFinite(a[0])||!isFinite(a[1])?8:0)+(!isFinite(o[0])||!isFinite(o[1])?4:0)+(!isFinite(s[0])||!isFinite(s[1])?2:0)+(!isFinite(A[0])||!isFinite(A[1])?1:0),v!=1&&v!=2&&v!=4&&v!=8)return}if(l>0){if(!d){var y=[(e[0]+n[0])/2,(e[1]+n[1])/2],w=this.transformInv_(y),C=void 0;if(f){var O=(zc(a[0],h)+zc(s[0],h))/2;C=O-zc(w[0],h)}else C=(a[0]+s[0])/2-w[0];var F=(a[1]+s[1])/2-w[1],I=C*C+F*F;d=I>this.errorThresholdSquared_}if(d){if(Math.abs(e[0]-n[0])<=Math.abs(e[1]-n[1])){var T=[(t[0]+n[0])/2,(t[1]+n[1])/2],L=this.transformInv_(T),N=[(i[0]+e[0])/2,(i[1]+e[1])/2],x=this.transformInv_(N);this.addQuad_(e,t,T,N,a,o,L,x,l-1),this.addQuad_(N,T,n,i,x,L,s,A,l-1)}else{var S=[(e[0]+t[0])/2,(e[1]+t[1])/2],P=this.transformInv_(S),U=[(n[0]+i[0])/2,(n[1]+i[1])/2],tt=this.transformInv_(U);this.addQuad_(e,S,U,i,a,P,tt,A,l-1),this.addQuad_(S,t,n,U,P,o,s,tt,l-1)}return}}if(f){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}v&11||this.addTriangle_(e,n,i,a,s,A),v&14||this.addTriangle_(e,n,t,a,s,o),v&&(v&13||this.addTriangle_(t,i,e,o,A,a),v&7||this.addTriangle_(t,i,n,o,A,s))}},r.prototype.calculateSourceExtent=function(){var e=Ui();return this.triangles_.forEach(function(t,n,i){var a=t.source;Df(e,a[0]),Df(e,a[1]),Df(e,a[2])}),e},r.prototype.getTriangles=function(){return this.triangles_},r}(),EH=fot,Pg={imageSmoothingEnabled:!1,msImageSmoothingEnabled:!1},CH={imageSmoothingEnabled:!0,msImageSmoothingEnabled:!0},Yb;function g5(r,e,t,n,i){r.beginPath(),r.moveTo(0,0),r.lineTo(e,t),r.lineTo(n,i),r.closePath(),r.save(),r.clip(),r.fillRect(0,0,Math.max(e,n)+1,Math.max(t,i)),r.restore()}function Xb(r,e){return Math.abs(r[e*4]-210)>2||Math.abs(r[e*4+3]-.75*255)>2}function dot(){if(Yb===void 0){var r=document.createElement("canvas").getContext("2d");r.globalCompositeOperation="lighter",r.fillStyle="rgba(210, 0, 0, 0.75)",g5(r,4,5,4,0),g5(r,4,5,0,5);var e=r.getImageData(0,0,3,3).data;Yb=Xb(e,0)||Xb(e,4)||Xb(e,8)}return Yb}function Vy(r,e,t,n){var i=ch(t,e,r),a=Ww(e,n,t),o=e.getMetersPerUnit();o!==void 0&&(a*=o);var s=r.getMetersPerUnit();s!==void 0&&(a/=s);var A=r.getExtent();if(!A||gA(A,i)){var l=Ww(r,a,i)/a;isFinite(l)&&l>0&&(a/=l)}return a}function pot(r,e,t,n){var i=Ya(t),a=Vy(r,e,i,n);return(!isFinite(a)||a<=0)&&SC(t,function(o){return a=Vy(r,e,o,n),isFinite(a)&&a>0}),a}function BH(r,e,t,n,i,a,o,s,A,l,u,c){var h=wo(Math.round(t*r),Math.round(t*e));if(c||Ce(h,Pg),A.length===0)return h.canvas;h.scale(t,t);function f(C){return Math.round(C*t)/t}h.globalCompositeOperation="lighter";var d=Ui();A.forEach(function(C,O,F){lh(d,C.extent)});var g=jr(d),m=Ii(d),v=wo(Math.round(t*g/n),Math.round(t*m/n));c||Ce(v,Pg);var y=t/n;A.forEach(function(C,O,F){var I=C.extent[0]-d[0],T=-(C.extent[3]-d[3]),L=jr(C.extent),N=Ii(C.extent);C.image.width>0&&C.image.height>0&&v.drawImage(C.image,l,l,C.image.width-2*l,C.image.height-2*l,I*y,T*y,L*y,N*y)});var w=BA(o);return s.getTriangles().forEach(function(C,O,F){var I=C.source,T=C.target,L=I[0][0],N=I[0][1],x=I[1][0],S=I[1][1],P=I[2][0],U=I[2][1],tt=f((T[0][0]-w[0])/a),q=f(-(T[0][1]-w[1])/a),rt=f((T[1][0]-w[0])/a),nt=f(-(T[1][1]-w[1])/a),At=f((T[2][0]-w[0])/a),ct=f(-(T[2][1]-w[1])/a),Tt=L,M=N;L=0,N=0,x-=Tt,S-=M,P-=Tt,U-=M;var W=[[x,S,0,0,rt-tt],[P,U,0,0,At-tt],[0,0,x,S,nt-q],[0,0,P,U,ct-q]],Y=EX(W);if(Y){if(h.save(),h.beginPath(),dot()||!c){h.moveTo(rt,nt);for(var H=4,J=tt-rt,ot=q-nt,ut=0;ut<H;ut++)h.lineTo(rt+f((ut+1)*J/H),nt+f(ut*ot/(H-1))),ut!=H-1&&h.lineTo(rt+f((ut+1)*J/H),nt+f((ut+1)*ot/(H-1)));h.lineTo(At,ct)}else h.moveTo(rt,nt),h.lineTo(tt,q),h.lineTo(At,ct);h.clip(),h.transform(Y[0],Y[2],Y[1],Y[3],tt,q),h.translate(d[0]-Tt,d[3]-M),h.scale(n/t,-n/t),h.drawImage(v.canvas,0,0),h.restore()}}),u&&(h.save(),h.globalCompositeOperation="source-over",h.strokeStyle="black",h.lineWidth=1,s.getTriangles().forEach(function(C,O,F){var I=C.target,T=(I[0][0]-w[0])/a,L=-(I[0][1]-w[1])/a,N=(I[1][0]-w[0])/a,x=-(I[1][1]-w[1])/a,S=(I[2][0]-w[0])/a,P=-(I[2][1]-w[1])/a;h.beginPath(),h.moveTo(N,x),h.lineTo(T,L),h.lineTo(S,P),h.closePath(),h.stroke()}),h.restore()),h.canvas}var 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)}}(),vot=function(r){got(e,r);function e(t,n,i,a,o,s,A,l,u,c,h,f){var d=r.call(this,o,Te.IDLE,{interpolate:!!f})||this;d.renderEdges_=h!==void 0?h:!1,d.pixelRatio_=A,d.gutter_=l,d.canvas_=null,d.sourceTileGrid_=n,d.targetTileGrid_=a,d.wrappedTileCoord_=s||o,d.sourceTiles_=[],d.sourcesListenerKeys_=null,d.sourceZ_=0;var g=a.getTileCoordExtent(d.wrappedTileCoord_),m=d.targetTileGrid_.getExtent(),v=d.sourceTileGrid_.getExtent(),y=m?Qs(g,m):g;if(Oy(y)===0)return d.state=Te.EMPTY,d;var w=t.getExtent();w&&(v?v=Qs(v,w):v=w);var C=a.getResolution(d.wrappedTileCoord_[0]),O=pot(t,i,y,C);if(!isFinite(O)||O<=0)return d.state=Te.EMPTY,d;var F=c!==void 0?c:wH;if(d.triangulation_=new EH(t,i,y,v,O*F,C),d.triangulation_.getTriangles().length===0)return d.state=Te.EMPTY,d;d.sourceZ_=n.getZForResolution(O);var I=d.triangulation_.calculateSourceExtent();if(v&&(t.canWrapX()?(I[1]=Un(I[1],v[1],v[3]),I[3]=Un(I[3],v[1],v[3])):I=Qs(I,v)),!Oy(I))d.state=Te.EMPTY;else{for(var T=n.getTileRangeForExtentAndZ(I,d.sourceZ_),L=T.minX;L<=T.maxX;L++)for(var N=T.minY;N<=T.maxY;N++){var x=u(d.sourceZ_,L,N,A);x&&d.sourceTiles_.push(x)}d.sourceTiles_.length===0&&(d.state=Te.EMPTY)}return d}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()==Te.LOADED&&t.push({extent:this.sourceTileGrid_.getTileCoordExtent(u.tileCoord),image:u.getImage()})}.bind(this)),this.sourceTiles_.length=0,t.length===0)this.state=Te.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_=BH(a,o,this.pixelRatio_,A,this.sourceTileGrid_.getExtent(),s,l,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=Te.LOADED}this.changed()},e.prototype.load=function(){if(this.state==Te.IDLE){this.state=Te.LOADING,this.changed();var t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(function(n,i,a){var o=n.getState();if(o==Te.IDLE||o==Te.LOADING){t++;var s=je(n,xe.CHANGE,function(A){var l=n.getState();(l==Te.LOADED||l==Te.ERROR||l==Te.EMPTY)&&(Yr(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==Te.IDLE&&n.load()})}},e.prototype.unlistenSources_=function(){this.sourcesListenerKeys_.forEach(Yr),this.sourcesListenerKeys_=null},e}(JF),tR=vot,bH=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 vp(r,e,t,n,i){return i!==void 0?(i.minX=r,i.maxX=e,i.minY=t,i.maxY=n,i):new bH(r,e,t,n)}var eR=bH,mot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),yot=function(r){mot(e,r);function e(t){var n=r.call(this,t)||this;return n.extentChanged=!0,n.renderedExtent_=null,n.renderedPixelRatio,n.renderedProjection=null,n.renderedRevision,n.renderedTiles=[],n.newTiles_=!1,n.tmpExtent=Ui(),n.tmpTileRange_=new eR(0,0,0,0),n}return e.prototype.isDrawableTile=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==Te.LOADED||i==Te.EMPTY||i==Te.ERROR&&!a},e.prototype.getTile=function(t,n,i,a){var o=a.pixelRatio,s=a.viewState.projection,A=this.getLayer(),l=A.getSource(),u=l.getTile(t,n,i,o,s);return u.getState()==Te.ERROR&&(A.getUseInterimTilesOnError()?A.getPreload()>0&&(this.newTiles_=!0):u.setState(Te.LOADED)),this.isDrawableTile(u)||(u=u.getInterimTile()),u},e.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),a=bn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!gA(o,a))return null;for(var s=n.pixelRatio,A=n.viewState.projection,l=n.viewState,u=i.getRenderSource(),c=u.getTileGridForProjection(l.projection),h=u.getTilePixelRatio(n.pixelRatio),f=c.getZForResolution(l.resolution);f>=c.getMinZoom();--f){var d=c.getTileCoordForCoordAndZ(a,f),g=u.getTile(f,d[1],d[2],s,A);if(!(g instanceof lE||g instanceof tR))return null;if(g.getState()===Te.LOADED){var m=c.getOrigin(f),v=Wi(c.getTileSize(f)),y=c.getResolution(f),w=Math.floor(h*((a[0]-m[0])/y-d[1]*v[0])),C=Math.floor(h*((m[1]-a[1])/y-d[2]*v[1]));return this.getImageData(g.getImage(),w,C)}}return null},e.prototype.loadedTileCallback=function(t,n,i){return this.isDrawableTile(i)?r.prototype.loadedTileCallback.call(this,t,n,i):!1},e.prototype.prepareFrame=function(t){return!!this.getLayer().getSource()},e.prototype.renderFrame=function(t,n){var i=t.layerStatesArray[t.layerIndex],a=t.viewState,o=a.projection,s=a.resolution,A=a.center,l=a.rotation,u=t.pixelRatio,c=this.getLayer(),h=c.getSource(),f=h.getRevision(),d=h.getTileGridForProjection(o),g=d.getZForResolution(s,h.zDirection),m=d.getResolution(g),v=t.extent,y=i.extent&&ds(i.extent);y&&(v=Qs(v,ds(i.extent)));var w=h.getTilePixelRatio(u),C=Math.round(t.size[0]*w),O=Math.round(t.size[1]*w);if(l){var F=Math.round(Math.sqrt(C*C+O*O));C=F,O=F}var I=m*C/2/w,T=m*O/2/w,L=[A[0]-I,A[1]-T,A[0]+I,A[1]+T],N=d.getTileRangeForExtentAndZ(v,g),x={};x[g]={};var S=this.createLoadedTileFinder(h,o,x),P=this.tmpExtent,U=this.tmpTileRange_;this.newTiles_=!1;for(var tt=N.minX;tt<=N.maxX;++tt)for(var q=N.minY;q<=N.maxY;++q){var rt=this.getTile(g,tt,q,t);if(this.isDrawableTile(rt)){var nt=Ee(this);if(rt.getState()==Te.LOADED){x[g][rt.tileCoord.toString()]=rt;var At=rt.inTransition(nt);!this.newTiles_&&(At||this.renderedTiles.indexOf(rt)===-1)&&(this.newTiles_=!0)}if(rt.getAlpha(nt,t.time)===1)continue}var ct=d.getTileCoordChildTileRange(rt.tileCoord,U,P),Tt=!1;ct&&(Tt=S(g+1,ct)),Tt||d.forEachTileCoordParentTileRange(rt.tileCoord,S,U,P)}var M=m/s;yo(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/w,1/w,l,-C/2,-O/2);var W=sF(this.pixelTransform);this.useContainer(n,W,i.opacity,this.getBackground(t));var Y=this.context,H=Y.canvas;y0(this.inversePixelTransform,this.pixelTransform),yo(this.tempTransform,C/2,O/2,M,M,0,-C/2,-O/2),H.width!=C||H.height!=O?(H.width=C,H.height=O):this.containerReused||Y.clearRect(0,0,C,O),y&&this.clipUnrotated(Y,t,y),h.getInterpolate()||Ce(Y,Pg),this.preRender(Y,t),this.renderedTiles.length=0;var J=Object.keys(x).map(Number);J.sort(sh);var ot,ut,X;i.opacity===1&&(!this.containerReused||h.getOpaque(t.viewState.projection))?J=J.reverse():(ot=[],ut=[]);for(var It=J.length-1;It>=0;--It){var at=J[It],j=h.getTilePixelSize(at,u,o),Z=d.getResolution(at),ft=Z/m,it=j[0]*ft*M,V=j[1]*ft*M,Ft=d.getTileCoordForCoordAndZ(BA(L),at),Mt=d.getTileCoordExtent(Ft),Et=bn(this.tempTransform,[w*(Mt[0]-L[0])/m,w*(L[3]-Mt[3])/m]),Bt=w*h.getGutterForProjection(o),Ct=x[at];for(var Rt in Ct){var rt=Ct[Rt],Nt=rt.tileCoord,Dt=Ft[1]-Nt[1],Wt=Math.round(Et[0]-(Dt-1)*it),te=Ft[2]-Nt[2],Ae=Math.round(Et[1]-(te-1)*V),tt=Math.round(Et[0]-Dt*it),q=Math.round(Et[1]-te*V),oe=Wt-tt,Jt=Ae-q,fe=g===at,At=fe&&rt.getAlpha(Ee(this),t.time)!==1,qt=!1;if(!At)if(ot){X=[tt,q,tt+oe,q,tt+oe,q+Jt,tt,q+Jt];for(var nr=0,ke=ot.length;nr<ke;++nr)if(g!==at&&at<ut[nr]){var wr=ot[nr];Xn([tt,q,tt+oe,q+Jt],[wr[0],wr[3],wr[4],wr[7]])&&(qt||(Y.save(),qt=!0),Y.beginPath(),Y.moveTo(X[0],X[1]),Y.lineTo(X[2],X[3]),Y.lineTo(X[4],X[5]),Y.lineTo(X[6],X[7]),Y.moveTo(wr[6],wr[7]),Y.lineTo(wr[4],wr[5]),Y.lineTo(wr[2],wr[3]),Y.lineTo(wr[0],wr[1]),Y.clip())}ot.push(X),ut.push(at)}else Y.clearRect(tt,q,oe,Jt);this.drawTileImage(rt,t,tt,q,oe,Jt,Bt,fe),ot&&!At?(qt&&Y.restore(),this.renderedTiles.unshift(rt)):this.renderedTiles.push(rt),this.updateUsedTiles(t.usedTiles,h,rt)}}this.renderedRevision=f,this.renderedResolution=m,this.extentChanged=!this.renderedExtent_||!gl(this.renderedExtent_,L),this.renderedExtent_=L,this.renderedPixelRatio=u,this.renderedProjection=o,this.manageTilePyramid(t,h,d,u,o,v,g,c.getPreload()),this.scheduleExpireCache(t,h),this.postRender(Y,t),i.extent&&Y.restore(),Ce(Y,CH),W!==H.style.transform&&(H.style.transform=W);var Ne=Yk(i.opacity),Pe=this.container;return Ne!==Pe.style.opacity&&(Pe.style.opacity=Ne),this.container},e.prototype.drawTileImage=function(t,n,i,a,o,s,A,l){var u=this.getTileImage(t);if(u){var c=Ee(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=Ee(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=Ee(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=Ee(n);c in t.wantedTiles||(t.wantedTiles[c]={});var h=t.wantedTiles[c],f=t.tileQueue,d=i.getMinZoom(),g=0,m,v,y,w,C,O;for(O=d;O<=A;++O)for(v=i.getTileRangeForExtentAndZ(s,O,v),y=i.getResolution(O),w=v.minX;w<=v.maxX;++w)for(C=v.minY;C<=v.maxY;++C)A-O<=l?(++g,m=n.getTile(O,w,C,a,o),m.getState()==Te.IDLE&&(h[m.getKey()]=!0,f.isKeyQueued(m.getKey())||f.enqueue([m,c,i.getTileCoordCenter(m.tileCoord),y])),u!==void 0&&u(m)):n.useTile(O,w,C,o);n.updateCacheSize(g,o)},e}($F),TH=yot,_ot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a 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){_ot(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new TH(this)},e}(_H),rR=wot;const Eot={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 Cot(r,e,t,n,i,a){return ti(),Yi("div")}var Td=me(Eot,[["render",Cot]]);const Bot={extends:Td,name:"ol-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=qe(()=>new rR(n)),a=()=>{t!=null?(t.value.getOverviewMap().addLayer(i.value),t.value.changed()):e.addLayer(i.value)},o=()=>{t!=null?(t.value.getOverviewMap().removeLayer(i.value),t.value.changed()):e.removeLayer(i.value)};return t!=null&&ye(t,()=>{o(),a()}),cr(()=>{a()}),pr(()=>{o()}),Dr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function bot(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Ox=me(Bot,[["render",bot]]),Tot=function(){function r(e){this.highWaterMark=e!==void 0?e:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}return r.prototype.canExpireCache=function(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark},r.prototype.expireCache=function(e){for(;this.canExpireCache();)this.pop()},r.prototype.clear=function(){this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null},r.prototype.containsKey=function(e){return this.entries_.hasOwnProperty(e)},r.prototype.forEach=function(e){for(var t=this.oldest_;t;)e(t.value_,t.key_,this),t=t.newer},r.prototype.get=function(e,t){var n=this.entries_[e];return Le(n!==void 0,15),n===this.newest_||(n===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(n.newer.older=n.older,n.older.newer=n.newer),n.newer=null,n.older=this.newest_,this.newest_.newer=n,this.newest_=n),n.value_},r.prototype.remove=function(e){var t=this.entries_[e];return Le(t!==void 0,15),t===this.newest_?(this.newest_=t.older,this.newest_&&(this.newest_.newer=null)):t===this.oldest_?(this.oldest_=t.newer,this.oldest_&&(this.oldest_.older=null)):(t.newer.older=t.older,t.older.newer=t.newer),delete this.entries_[e],--this.count_,t.value_},r.prototype.getCount=function(){return this.count_},r.prototype.getKeys=function(){var e=new Array(this.count_),t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.key_;return e},r.prototype.getValues=function(){var e=new Array(this.count_),t=0,n;for(n=this.newest_;n;n=n.older)e[t++]=n.value_;return e},r.prototype.peekLast=function(){return this.oldest_.value_},r.prototype.peekLastKey=function(){return this.oldest_.key_},r.prototype.peekFirstKey=function(){return this.newest_.key_},r.prototype.pop=function(){var e=this.oldest_;return delete this.entries_[e.key_],e.newer&&(e.newer.older=null),this.oldest_=e.newer,this.oldest_||(this.newest_=null),--this.count_,e.value_},r.prototype.replace=function(e,t){this.get(e),this.entries_[e].value_=t},r.prototype.set=function(e,t){Le(!(e in this.entries_),16);var n={key_:e,newer:null,older:this.newest_,value_:t};this.newest_?this.newest_.newer=n:this.oldest_=n,this.newest_=n,this.entries_[e]=n,++this.count_},r.prototype.setSize=function(e){this.highWaterMark=e},r}(),SH=Tot,Sot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),xot=function(r){Sot(e,r);function e(t){var n=this,i=Te.IDLE;return n=r.call(this,t.tileCoord,i,{transition:t.transition,interpolate:t.interpolate})||this,n.loader_=t.loader,n.data_=null,n.error_=null,n}return e.prototype.getData=function(){return this.data_},e.prototype.getError=function(){return this.error_},e.prototype.load=function(){this.state=Te.LOADING,this.changed();var t=this;this.loader_().then(function(n){t.data_=n,t.state=Te.LOADED,t.changed()}).catch(function(n){t.error_=n,t.state=Te.ERROR,t.changed()})},e}(JF),Iot=xot,jy=34962,VC=34963,Lot=35040,nR=35044,aw=35048,Oot=5121,Fot=5123,Rot=5125,xH=5126,v5=["experimental-webgl","webgl","webkit-3d","moz-webgl"];function IH(r,e){for(var t=Ce({preserveDrawingBuffer:!0,antialias:!eX},e),n=v5.length,i=0;i<n;++i)try{var a=r.getContext(v5[i],t);if(a)return a}catch{}return null}var Mot={STATIC_DRAW:nR,STREAM_DRAW:Lot,DYNAMIC_DRAW:aw},Not=function(){function r(e,t){this.array=null,this.type=e,Le(e===jy||e===VC,62),this.usage=t!==void 0?t:Mot.STATIC_DRAW}return r.prototype.ofSize=function(e){this.array=new(qb(this.type))(e)},r.prototype.fromArray=function(e){var t=qb(this.type);this.array=t.from?t.from(e):new t(e)},r.prototype.fromArrayBuffer=function(e){this.array=new(qb(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 qb(r){switch(r){case jy:return Float32Array;case VC:return Uint32Array;default:return Float32Array}}var oy=Not,Pot=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function LH(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 Uot(r,e,t,n){LH(r,e,n),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,t)}function m5(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;LH(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 Pm=null;function Dot(){var r=document.createElement("canvas");r.width=1,r.height=1,Pm=r.getContext("2d")}var Qot=function(r){Pot(e,r);function e(t){var n=r.call(this)||this;n.tile,n.textures=[],n.handleTileChange_=n.handleTileChange_.bind(n),n.size=Wi(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 oy(jy,nR);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(xe.CHANGE,this.handleTileChange_),this.tile=t,this.textures.length=0,this.loaded=t.getState()===Te.LOADED,this.loaded)this.uploadTile_();else{if(t instanceof lE){var n=t.getImage();n instanceof Image&&!n.crossOrigin&&(n.crossOrigin="anonymous")}t.addEventListener(xe.CHANGE,this.handleTileChange_)}},e.prototype.uploadTile_=function(){var t=this.helper_,n=t.getGL(),i=this.tile;if(i instanceof lE||i instanceof tR){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=wo(s,A);i.interpolate||Ce(l,Pg),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,Uot(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,d=c[0]*c[1],g=f?Float32Array:Uint8Array,m=g.BYTES_PER_ELEMENT,v=h.byteLength/c[1];this.bandCount=Math.floor(v/m/c[0]);var y=Math.ceil(this.bandCount/4);if(y===1){var u=n.createTexture();this.textures.push(u),m5(t,u,h,c,this.bandCount,i.interpolate);return}for(var w=new Array(y),C=0;C<y;++C){var u=n.createTexture();this.textures.push(u);var O=C<y-1?4:this.bandCount%4;w[C]=new g(d*O)}for(var F=0,I=0,T=c[0]*this.bandCount,L=0;L<c[1];++L){for(var N=0;N<T;++N){var x=h[I+N],S=Math.floor(F/this.bandCount),P=N%this.bandCount,C=Math.floor(P/4),U=w[C],O=U.length/d,tt=P%4;U[S*O+tt]=x,++F}I+=v/m}for(var C=0;C<y;++C){var u=this.textures[C],U=w[C],O=U.length/d;m5(t,u,U,c,O,i.interpolate)}},e.prototype.handleTileChange_=function(){this.tile.getState()===Te.LOADED&&(this.loaded=!0,this.uploadTile_(),this.dispatchEvent(xe.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(xe.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 Iot){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)}Pm||Dot(),Pm.clearRect(0,0,1,1);var u,c=this.tile.getImage();try{Pm.drawImage(c,t,n,1,1,0,0,1,1),u=Pm.getImageData(0,0,1,1).data}catch{return null}return u},e}(Ed),kot=Qot,t1={LOST:"webglcontextlost",RESTORED:"webglcontextrestored"},Hot=`
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);
}
`,Got=`
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;
}
`,$ot=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||Hot),t.compileShader(n);var i=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(i,e.fragmentShader||Got),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=Ee(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}(),y5=$ot;function OH(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function ow(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 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)}}(),Qp={PROJECTION_MATRIX:"u_projectionMatrix",OFFSET_SCALE_MATRIX:"u_offsetScaleMatrix",OFFSET_ROTATION_MATRIX:"u_offsetRotateMatrix",TIME:"u_time",ZOOM:"u_zoom",RESOLUTION:"u_resolution"},Ms={UNSIGNED_BYTE:Oot,UNSIGNED_SHORT:Fot,UNSIGNED_INT:Rot,FLOAT:xH},uE={};function _5(r){return"shared/"+r}var w5=0;function jot(){var r="unique/"+w5;return w5+=1,r}function Kot(r){var e=uE[r];if(!e){var t=document.createElement("canvas");t.style.position="absolute",t.style.left="0",e={users:0,canvas:t},uE[r]=e}return e.users+=1,e.canvas}function Wot(r){var e=uE[r];if(e&&(e.users-=1,!(e.users>0))){var t=e.canvas,n=IH(t),i=n.getExtension("WEBGL_lose_context");i&&i.loseContext(),delete uE[r]}}var zot=function(r){Vot(e,r);function e(t){var n=r.call(this)||this,i=t||{};n.boundHandleWebGLContextLost_=n.handleWebGLContextLost.bind(n),n.boundHandleWebGLContextRestored_=n.handleWebGLContextRestored.bind(n),n.canvasCacheKey_=i.canvasCacheKey?_5(i.canvasCacheKey):jot(),n.canvas_=Kot(n.canvasCacheKey_),n.gl_=IH(n.canvas_),n.bufferCache_={},n.extensionCache_={},n.currentProgram_=null,n.canvas_.addEventListener(t1.LOST,n.boundHandleWebGLContextLost_),n.canvas_.addEventListener(t1.RESTORED,n.boundHandleWebGLContextRestored_),n.offsetRotateMatrix_=Si(),n.offsetScaleMatrix_=Si(),n.tmpMat4_=OH(),n.uniformLocations_={},n.attribLocations_={},n.uniforms_=[],i.uniforms&&n.setUniforms(i.uniforms);var a=n.getGL();return n.postProcessPasses_=i.postProcesses?i.postProcesses.map(function(o){return new y5({webGlContext:a,scaleRatio:o.scaleRatio,vertexShader:o.vertexShader,fragmentShader:o.fragmentShader,uniforms:o.uniforms})}):[new y5({webGlContext:a})],n.shaderCompileErrors_=null,n.startTime_=Date.now(),n}return e.prototype.setUniforms=function(t){this.uniforms_=[];for(var n in t)this.uniforms_.push({name:n,value:t[n]});this.uniformLocations_={}},e.prototype.canvasCacheKeyMatches=function(t){return this.canvasCacheKey_===_5(t)},e.prototype.getExtension=function(t){if(t in this.extensionCache_)return this.extensionCache_[t];var n=this.gl_.getExtension(t);return this.extensionCache_[t]=n,n},e.prototype.bindBuffer=function(t){var n=this.getGL(),i=Ee(t),a=this.bufferCache_[i];if(!a){var o=n.createBuffer();a={buffer:t,webGlBuffer:o},this.bufferCache_[i]=a}n.bindBuffer(t.getType(),a.webGlBuffer)},e.prototype.flushBufferData=function(t){var n=this.getGL();this.bindBuffer(t),n.bufferData(t.getType(),t.getArray(),t.getUsage())},e.prototype.deleteBuffer=function(t){var n=this.getGL(),i=Ee(t),a=this.bufferCache_[i];a&&!n.isContextLost()&&n.deleteBuffer(a.webGlBuffer),delete this.bufferCache_[i]},e.prototype.disposeInternal=function(){this.canvas_.removeEventListener(t1.LOST,this.boundHandleWebGLContextLost_),this.canvas_.removeEventListener(t1.RESTORED,this.boundHandleWebGLContextRestored_),Wot(this.canvasCacheKey_),delete this.gl_,delete this.canvas_},e.prototype.prepareDraw=function(t,n){var i=this.getGL(),a=this.getCanvas(),o=t.size,s=t.pixelRatio;a.width=o[0]*s,a.height=o[1]*s,a.style.width=o[0]+"px",a.style.height=o[1]+"px",i.useProgram(this.currentProgram_);for(var A=this.postProcessPasses_.length-1;A>=0;A--)this.postProcessPasses_[A].init(t);i.bindTexture(i.TEXTURE_2D,null),i.clearColor(0,0,0,0),i.clear(i.COLOR_BUFFER_BIT),i.enable(i.BLEND),i.blendFunc(i.ONE,n?i.ZERO:i.ONE_MINUS_SRC_ALPHA),i.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.prepareDrawToRenderTarget=function(t,n,i){var a=this.getGL(),o=n.getSize();a.bindFramebuffer(a.FRAMEBUFFER,n.getFramebuffer()),a.viewport(0,0,o[0],o[1]),a.bindTexture(a.TEXTURE_2D,n.getTexture()),a.clearColor(0,0,0,0),a.clear(a.COLOR_BUFFER_BIT),a.enable(a.BLEND),a.blendFunc(a.ONE,i?a.ZERO:a.ONE_MINUS_SRC_ALPHA),a.useProgram(this.currentProgram_),this.applyFrameState(t),this.applyUniforms(t)},e.prototype.drawElements=function(t,n){var i=this.getGL();this.getExtension("OES_element_index_uint");var a=i.UNSIGNED_INT,o=4,s=n-t,A=t*o;i.drawElements(i.TRIANGLES,s,a,A)},e.prototype.finalizeDraw=function(t,n,i){for(var a=0,o=this.postProcessPasses_.length;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=ey(this.offsetScaleMatrix_);ry(a,2/n[0],2/n[1]);var o=ey(this.offsetRotateMatrix_);i!==0&&sX(o,-i),this.setUniformMatrixValue(Qp.OFFSET_SCALE_MATRIX,ow(this.tmpMat4_,a)),this.setUniformMatrixValue(Qp.OFFSET_ROTATION_MATRIX,ow(this.tmpMat4_,o)),this.setUniformFloatValue(Qp.TIME,(Date.now()-this.startTime_)*.001),this.setUniformFloatValue(Qp.ZOOM,t.viewState.zoom),this.setUniformFloatValue(Qp.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,ow(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 ey(n),yo(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=Yot(t),i=0,a=0;a<t.length;a++){var o=t[a];this.enableAttributeArray_(o.name,o.size,o.type||xH,n,i),i+=o.size*FH(o.type)}},e.prototype.handleWebGLContextLost=function(){wd(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}(EC);function Yot(r){for(var e=0,t=0;t<r.length;t++){var n=r[t];e+=n.size*FH(n.type)}return e}function FH(r){switch(r){case Ms.UNSIGNED_BYTE:return Uint8Array.BYTES_PER_ELEMENT;case Ms.UNSIGNED_SHORT:return Uint16Array.BYTES_PER_ELEMENT;case Ms.UNSIGNED_INT:return Uint32Array.BYTES_PER_ELEMENT;case Ms.FLOAT:default:return Float32Array.BYTES_PER_ELEMENT}}var 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)}}(),Zb={GENERATE_BUFFERS:"GENERATE_BUFFERS"},qot=function(r){Xot(e,r);function e(t,n){var i=r.call(this,t)||this,a=n||{};return i.inversePixelTransform_=Si(),i.pixelContext_=null,i.postProcesses_=a.postProcesses,i.uniforms_=a.uniforms,i.helper,t.addChangeListener(Jr.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(No.PRECOMPOSE)){var a=new ny(No.PRECOMPOSE,void 0,n,t);i.dispatchEvent(a)}},e.prototype.dispatchPostComposeEvent=function(t,n){var i=this.getLayer();if(i.hasListener(No.POSTCOMPOSE)){var a=new ny(No.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 zot({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)){yo(this.inversePixelTransform_,0,0,i.pixelRatio,-i.pixelRatio,0,0,-i.size[1]);var o=new ny(t,this.inversePixelTransform_,i,n);a.dispatchEvent(o)}},e.prototype.preRender=function(t,n){this.dispatchRenderEvent_(No.PRERENDER,t,n)},e.prototype.postRender=function(t,n){this.dispatchRenderEvent_(No.POSTRENDER,t,n)},e.prototype.getDataAtPixel=function(t,n,i){var a=bn([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=bn(n.pixelToCoordinateTransform,t.slice());if(!gA(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 d=document.createElement("canvas");d.width=1,d.height=1,f=d.getContext("2d"),this.pixelContext_=f}f.clearRect(0,0,1,1);var g;try{f.drawImage(o.canvas,c,h,1,1,0,0,1,1),g=f.getImageData(0,0,1,1).data}catch{return g}return g[3]===0?null:g},e}(U8);function Zot(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 Jot(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 RH=qot;function Ky(r,e,t,n){return n!==void 0?(n[0]=r,n[1]=e,n[2]=t,n):[r,e,t]}function jC(r,e,t){return r+"/"+e+"/"+t}function Wy(r){return jC(r[0],r[1],r[2])}function tst(r){return r.split("/").map(Number)}function MH(r){return(r[1]<<r[0])+r[2]}function est(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 rst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ur={TILE_TEXTURE_ARRAY:"u_tileTextures",TILE_TRANSFORM:"u_tileTransform",TRANSITION_ALPHA:"u_transitionAlpha",DEPTH:"u_depth",TEXTURE_PIXEL_WIDTH:"u_texturePixelWidth",TEXTURE_PIXEL_HEIGHT:"u_texturePixelHeight",TEXTURE_RESOLUTION:"u_textureResolution",TEXTURE_ORIGIN_X:"u_textureOriginX",TEXTURE_ORIGIN_Y:"u_textureOriginY",RENDER_EXTENT:"u_renderExtent",RESOLUTION:"u_resolution",ZOOM:"u_zoom"},sw={TEXTURE_COORD:"a_textureCoord"},nst=[{name:sw.TEXTURE_COORD,size:2,type:Ms.FLOAT}],ist={};function ast(r){return 2*(1-1/(r+1))-1}function E5(r,e,t){t in r||(r[t]=[]),r[t].push(e)}function Jb(r,e){var t=r.layerStatesArray[r.layerIndex];t.extent&&(e=Qs(e,ds(t.extent,r.viewState.projection)));var n=t.layer.getRenderSource();if(!n.getWrapX()){var i=n.getTileGridForProjection(r.viewState.projection).getExtent();i&&(e=Qs(e,i))}return e}function tT(r,e){return"".concat(r.getKey(),",").concat(Wy(e))}var ost=function(r){rst(e,r);function e(t,n){var i=r.call(this,t,{uniforms:n.uniforms})||this;i.renderComplete=!1,i.tileTransform_=Si(),i.tempMat4_=OH(),i.tempTileRange_=new eR(0,0,0,0),i.tempTileCoord_=Ky(0,0,0),i.tempSize_=[0,0],i.program_,i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.indices_=new oy(VC,nR),i.indices_.fromArray([0,1,3,1,2,3]);var a=n.cacheSize!==void 0?n.cacheSize:512;return i.tileTextureCache_=new SH(a),i.paletteTextures_=n.paletteTextures||[],i.frameState_=null,i}return e.prototype.reset=function(t){r.prototype.reset.call(this,{uniforms:t.uniforms}),this.vertexShader_=t.vertexShader,this.fragmentShader_=t.fragmentShader,this.paletteTextures_=t.paletteTextures||[],this.helper&&(this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_))},e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.helper.flushBufferData(this.indices_)},e.prototype.isDrawableTile_=function(t){var n=this.getLayer(),i=t.getState(),a=n.getUseInterimTilesOnError();return i==Te.LOADED||i==Te.EMPTY||i==Te.ERROR&&!a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getRenderSource();return!i||rv(Jb(t,t.extent))?!1:i.getState()===co.READY},e.prototype.enqueueTiles=function(t,n,i,a){var o=t.viewState,s=this.getLayer(),A=s.getRenderSource(),l=A.getTileGridForProjection(o.projection),u=A.getTilePixelRatio(t.pixelRatio),c=A.getGutterForProjection(o.projection),h=Ee(A);h in t.wantedTiles||(t.wantedTiles[h]={});for(var f=t.wantedTiles[h],d=this.tileTextureCache_,g=Math.max(i-s.getPreload(),l.getMinZoom(),s.getMinZoom()),m=i;m>=g;--m)for(var v=l.getTileRangeForExtentAndZ(n,m,this.tempTileRange_),y=l.getResolution(m),w=v.minX;w<=v.maxX;++w)for(var C=v.minY;C<=v.maxY;++C){var O=Ky(m,w,C,this.tempTileCoord_),F=tT(A,O),I=void 0,T=void 0;if(d.containsKey(F)&&(I=d.get(F),T=I.tile),!I||I.tile.key!==A.getKey())if(T=A.getTile(m,w,C,t.pixelRatio,o.projection),!I)I=new kot({tile:T,grid:l,helper:this.helper,tilePixelRatio:u,gutter:c}),d.set(F,I);else if(this.isDrawableTile_(T))I.setTile(T);else{var L=T.getInterimTile();I.setTile(L)}E5(a,I,m);var N=T.getKey();f[N]=!0,T.getState()===Te.IDLE&&(t.tileQueue.isKeyQueued(N)||t.tileQueue.enqueue([T,h,l.getTileCoordCenter(O),y]))}},e.prototype.renderFrame=function(t){this.frameState_=t,this.renderComplete=!0;var n=this.helper.getGL();this.preRender(n,t);var i=t.viewState,a=this.getLayer(),o=a.getRenderSource(),s=o.getTileGridForProjection(i.projection),A=Jb(t,t.extent),l=s.getZForResolution(i.resolution,o.zDirection),u={};if(t.nextExtent){var c=s.getZForResolution(i.nextResolution,o.zDirection),h=Jb(t,t.nextExtent);this.enqueueTiles(t,h,c,u)}this.enqueueTiles(t,A,l,u);for(var f={},d=Ee(this),g=t.time,m=!1,v=u[l],y=0,w=v.length;y<w;++y){var C=v[y],O=C.tile,F=O.tileCoord;if(C.loaded){var I=O.getAlpha(d,g);if(I===1){O.endTransition(d);continue}m=!0;var T=Wy(F);f[T]=I}this.renderComplete=!1;var L=this.findAltTiles_(s,F,l+1,u);if(!L)for(var N=s.getMinZoom(),x=l-1;x>=N;--x){var S=this.findAltTiles_(s,F,x,u);if(S)break}}this.helper.useProgram(this.program_),this.helper.prepareDraw(t,!m);for(var P=Object.keys(u).map(Number).sort(sh),U=i.center[0],tt=i.center[1],q=0,rt=P.length;q<rt;++q)for(var nt=P[q],At=s.getResolution(nt),ct=Wi(s.getTileSize(nt),this.tempSize_),Tt=s.getOrigin(nt),M=(U-Tt[0])/(ct[0]*At),W=(Tt[1]-tt)/(ct[1]*At),Y=i.resolution/At,H=ast(nt),J=u[nt],y=0,w=J.length;y<w;++y){var C=J[y];if(C.loaded){var O=C.tile,F=O.tileCoord,T=Wy(F),ot=F[1],ut=F[2];yo(this.tileTransform_,0,0,2/(t.size[0]*Y/ct[0]),-2/(t.size[1]*Y/ct[1]),i.rotation,-(M-ot),-(W-ut)),this.helper.setUniformMatrixValue(ur.TILE_TRANSFORM,ow(this.tempMat4_,this.tileTransform_)),this.helper.bindBuffer(C.coords),this.helper.bindBuffer(this.indices_),this.helper.enableAttributes(nst);for(var X=0;X<C.textures.length;){var It="TEXTURE"+X,at="".concat(ur.TILE_TEXTURE_ARRAY,"[").concat(X,"]");n.activeTexture(n[It]),n.bindTexture(n.TEXTURE_2D,C.textures[X]),n.uniform1i(this.helper.getUniformLocation(at),X),++X}for(var j=0;j<this.paletteTextures_.length;++j){var Z=this.paletteTextures_[j];n.activeTexture(n["TEXTURE"+X]);var ft=Z.getTexture(n);n.bindTexture(n.TEXTURE_2D,ft),n.uniform1i(this.helper.getUniformLocation(Z.name),X),++X}var I=T in f?f[T]:1;I<1&&(t.animate=!0),this.helper.setUniformFloatValue(ur.TRANSITION_ALPHA,I),this.helper.setUniformFloatValue(ur.DEPTH,H),this.helper.setUniformFloatValue(ur.TEXTURE_PIXEL_WIDTH,ct[0]),this.helper.setUniformFloatValue(ur.TEXTURE_PIXEL_HEIGHT,ct[1]),this.helper.setUniformFloatValue(ur.TEXTURE_RESOLUTION,At),this.helper.setUniformFloatValue(ur.TEXTURE_ORIGIN_X,Tt[0]+ot*ct[0]*At),this.helper.setUniformFloatValue(ur.TEXTURE_ORIGIN_Y,Tt[1]-ut*ct[1]*At),this.helper.setUniformFloatVec4(ur.RENDER_EXTENT,A),this.helper.setUniformFloatValue(ur.RESOLUTION,i.resolution),this.helper.setUniformFloatValue(ur.ZOOM,i.zoom),this.helper.drawElements(0,this.indices_.getSize())}}this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);for(var it=this.helper.getCanvas(),V=this.tileTextureCache_;V.canExpireCache();){var C=V.pop();C.dispose()}var Ft=function(Mt,Et){o.expireCache(Et.viewState.projection,ist)};return t.postRenderFunctions.push(Ft),this.postRender(n,t),it},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=bn(i.pixelToCoordinateTransform,t.slice()),s=i.viewState,A=a.getExtent();if(A&&!gA(ds(A,s.projection),o))return null;var l=a.getRenderSource(),u=l.getTileGridForProjection(s.projection);if(!l.getWrapX()){var c=u.getExtent();if(c&&!gA(c,o))return null}for(var h=this.tileTextureCache_,f=u.getZForResolution(s.resolution);f>=u.getMinZoom();--f){var d=u.getTileCoordForCoordAndZ(o,f),g=tT(l,d);if(h.containsKey(g)){var m=h.get(g);if(m.loaded){var v=u.getOrigin(f),y=Wi(u.getTileSize(f)),w=u.getResolution(f),C=(o[0]-v[0])/w-d[1]*y[0],O=(v[1]-o[1])/w-d[2]*y[1];return m.getPixelData(C,O)}}}return null},e.prototype.findAltTiles_=function(t,n,i,a){var o=t.getTileRangeForTileCoordAndZ(n,i,this.tempTileRange_);if(!o)return!1;for(var s=!0,A=this.tileTextureCache_,l=this.getLayer().getRenderSource(),u=o.minX;u<=o.maxX;++u)for(var c=o.minY;c<=o.maxY;++c){var h=tT(l,[i,u,c]),f=!1;if(A.containsKey(h)){var d=A.get(h);d.loaded&&(E5(a,d,i),f=!0)}f||(s=!1)}return s},e.prototype.removeHelper=function(){if(this.helper){var t=this.tileTextureCache_;t.forEach(function(n){return n.dispose()}),t.clear()}r.prototype.removeHelper.call(this)},e.prototype.disposeInternal=function(){var t=this.helper;if(t){var n=t.getGL();n.deleteProgram(this.program_),delete this.program_,t.deleteBuffer(this.indices_)}r.prototype.disposeInternal.call(this),delete this.indices_,delete this.tileTextureCache_,delete this.frameState_},e}(RH),sst=ost,Ast=function(){function r(e,t){this.name=e,this.data=t,this.texture_=null}return r.prototype.getTexture=function(e){if(!this.texture_){var t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.data.length/4,1,0,e.RGBA,e.UNSIGNED_BYTE,this.data),this.texture_=t}return this.texture_},r}(),lst=Ast,ue={NUMBER:1,STRING:2,COLOR:4,BOOLEAN:8,NUMBER_ARRAY:16,ANY:31,NONE:0},dr={};function yl(r){if(typeof r=="number")return ue.NUMBER;if(typeof r=="boolean")return ue.BOOLEAN;if(typeof r=="string")return BX(r)?ue.COLOR|ue.STRING:ue.STRING;if(!Array.isArray(r))throw new Error("Unhandled value type: ".concat(JSON.stringify(r)));var e=r,t=e.every(function(i){return typeof i=="number"});if(t)return e.length===3||e.length===4?ue.COLOR|ue.NUMBER_ARRAY:ue.NUMBER_ARRAY;if(typeof e[0]!="string")throw new Error("Expected an expression operator but received: ".concat(JSON.stringify(e)));var n=dr[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.getReturnType(e.slice(1))}function ust(r){return Uk(r)%1===0}function KC(r){var e=r.toString();return e.indexOf(".")===-1?e+".0":e}function NH(r){if(r.length<2||r.length>4)throw new Error("`formatArray` can only output `vec2`, `vec3` or `vec4` arrays.");return"vec".concat(r.length,"(").concat(r.map(KC).join(", "),")")}function cst(r){var e=uh(r).slice();return e.length<4&&e.push(1),NH(e.map(function(t,n){return n<3?t/255:t}))}function cE(r,e){return r.stringLiteralsMap[e]===void 0&&(r.stringLiteralsMap[e]=Object.keys(r.stringLiteralsMap).length),r.stringLiteralsMap[e]}function hst(r,e){return KC(cE(r,e))}function ve(r,e,t){if(Array.isArray(e)&&typeof e[0]=="string"){var n=dr[e[0]];if(n===void 0)throw new Error("Unrecognized expression operator: ".concat(JSON.stringify(e)));return n.toGlsl(r,e.slice(1),t)}var i=yl(e);if((i&ue.NUMBER)>0)return KC(e);if((i&ue.BOOLEAN)>0)return e.toString();if((i&ue.STRING)>0&&(t===void 0||t==ue.STRING))return hst(r,e.toString());if((i&ue.COLOR)>0&&(t===void 0||t==ue.COLOR))return cst(e);if((i&ue.NUMBER_ARRAY)>0)return NH(e);throw new Error("Unexpected expression ".concat(e," (expected type ").concat(t,")"))}function PH(r){if(!(yl(r)&ue.NUMBER))throw new Error("A numeric value was expected, got ".concat(JSON.stringify(r)," instead"))}function Oi(r){for(var e=0;e<r.length;e++)PH(r[e])}function UH(r){if(!(yl(r)&ue.STRING))throw new Error("A string value was expected, got ".concat(JSON.stringify(r)," instead"))}function iR(r){if(!(yl(r)&ue.BOOLEAN))throw new Error("A boolean value was expected, got ".concat(JSON.stringify(r)," instead"))}function Fn(r,e){if(r.length!==e)throw new Error("Exactly ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function Ch(r,e){if(r.length<e)throw new Error("At least ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function WC(r,e){if(r.length>e)throw new Error("At most ".concat(e," arguments were expected, got ").concat(r.length," instead"))}function DH(r){if(r.length%2!==0)throw new Error("An even amount of arguments was expected, got ".concat(r," instead"))}function fst(r){if(r.length%2===0)throw new Error("An odd amount of arguments was expected, got ".concat(r," instead"))}function aR(r,e){if(!ust(e))throw new Error("Could not infer only one type from the following expression: ".concat(JSON.stringify(r)))}dr.get={getReturnType:function(r){return ue.ANY},toGlsl:function(r,e){Fn(e,1),UH(e[0]);var t=e[0].toString();r.attributes.indexOf(t)===-1&&r.attributes.push(t);var n=r.inFragmentShader?"v_":"a_";return n+t}};function oR(r){return"u_var_"+r}dr.var={getReturnType:function(r){return ue.ANY},toGlsl:function(r,e){Fn(e,1),UH(e[0]);var t=e[0].toString();return r.variables.indexOf(t)===-1&&r.variables.push(t),oR(t)}};var QH="u_paletteTextures";dr.palette={getReturnType:function(r){return ue.COLOR},toGlsl:function(r,e){Fn(e,2),PH(e[0]);var t=ve(r,e[0]),n=e[1];if(!Array.isArray(n))throw new Error("The second argument of palette must be an array");for(var i=n.length,a=new Uint8Array(i*4),o=0;o<i;o++){var s=n[o],A=void 0;if(typeof s=="string")A=Hk(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(QH,"[").concat(r.paletteTextures.length,"]"),h=new lst(c,a);return r.paletteTextures.push(h),"texture2D(".concat(c,", vec2((").concat(t," + 0.5) / ").concat(i,".0, 0.5))")}};var eT="getBandValue";dr.band={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){Ch(e,1),WC(e,3);var t=e[0];if(!(eT 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(ur.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[eT]=`
float getBandValue(float band, float xOffset, float yOffset) {
float dx = xOffset / `.concat(ur.TEXTURE_PIXEL_WIDTH,`;
float dy = yOffset / `).concat(ur.TEXTURE_PIXEL_HEIGHT,`;
`).concat(n,`
}
`)}var l=ve(r,t),u=ve(r,e[1]||0),c=ve(r,e[2]||0);return"".concat(eT,"(").concat(l,", ").concat(u,", ").concat(c,")")}};dr.time={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,0),"u_time"}};dr.zoom={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,0),"u_zoom"}};dr.resolution={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,0),"u_resolution"}};dr["*"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," * ").concat(ve(r,e[1]),")")}};dr["/"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," / ").concat(ve(r,e[1]),")")}};dr["+"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," + ").concat(ve(r,e[1]),")")}};dr["-"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," - ").concat(ve(r,e[1]),")")}};dr.clamp={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){Fn(e,3),Oi(e);var t=ve(r,e[1]),n=ve(r,e[2]);return"clamp(".concat(ve(r,e[0]),", ").concat(t,", ").concat(n,")")}};dr["%"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Oi(e),"mod(".concat(ve(r,e[0]),", ").concat(ve(r,e[1]),")")}};dr["^"]={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,2),Oi(e),"pow(".concat(ve(r,e[0]),", ").concat(ve(r,e[1]),")")}};dr.abs={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Oi(e),"abs(".concat(ve(r,e[0]),")")}};dr.floor={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Oi(e),"floor(".concat(ve(r,e[0]),")")}};dr.round={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Oi(e),"floor(".concat(ve(r,e[0])," + 0.5)")}};dr.ceil={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Oi(e),"ceil(".concat(ve(r,e[0]),")")}};dr.sin={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Oi(e),"sin(".concat(ve(r,e[0]),")")}};dr.cos={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Fn(e,1),Oi(e),"cos(".concat(ve(r,e[0]),")")}};dr.atan={getReturnType:function(r){return ue.NUMBER},toGlsl:function(r,e){return Ch(e,1),WC(e,2),Oi(e),e.length===2?"atan(".concat(ve(r,e[0]),", ").concat(ve(r,e[1]),")"):"atan(".concat(ve(r,e[0]),")")}};dr[">"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," > ").concat(ve(r,e[1]),")")}};dr[">="]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," >= ").concat(ve(r,e[1]),")")}};dr["<"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," < ").concat(ve(r,e[1]),")")}};dr["<="]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,2),Oi(e),"(".concat(ve(r,e[0])," <= ").concat(ve(r,e[1]),")")}};function kH(r){return{getReturnType:function(e){return ue.BOOLEAN},toGlsl:function(e,t){Fn(t,2);for(var n=ue.ANY,i=0;i<t.length;i++)n&=yl(t[i]);if(n===ue.NONE)throw new Error("All arguments should be of compatible type, got ".concat(JSON.stringify(t)," instead"));return n&=~ue.COLOR,"(".concat(ve(e,t[0],n)," ").concat(r," ").concat(ve(e,t[1],n),")")}}}dr["=="]=kH("==");dr["!="]=kH("!=");dr["!"]={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){return Fn(e,1),iR(e[0]),"(!".concat(ve(r,e[0]),")")}};function HH(r){return{getReturnType:function(e){return ue.BOOLEAN},toGlsl:function(e,t){Ch(t,2);for(var n=0;n<t.length;n++)iR(t[n]);var i="";return i=t.map(function(a){return ve(e,a)}).join(" ".concat(r," ")),i="(".concat(i,")"),i}}}dr.all=HH("&&");dr.any=HH("||");dr.between={getReturnType:function(r){return ue.BOOLEAN},toGlsl:function(r,e){Fn(e,3),Oi(e);var t=ve(r,e[1]),n=ve(r,e[2]),i=ve(r,e[0]);return"(".concat(i," >= ").concat(t," && ").concat(i," <= ").concat(n,")")}};dr.array={getReturnType:function(r){return ue.NUMBER_ARRAY},toGlsl:function(r,e){Ch(e,2),WC(e,4),Oi(e);var t=e.map(function(n){return ve(r,n,ue.NUMBER)});return"vec".concat(e.length,"(").concat(t.join(", "),")")}};dr.color={getReturnType:function(r){return ue.COLOR},toGlsl:function(r,e){Ch(e,3),WC(e,4),Oi(e);var t=e;e.length===3&&t.push(1);var n=e.map(function(i,a){return ve(r,i,ue.NUMBER)+(a<3?" / 255.0":"")});return"vec".concat(e.length,"(").concat(n.join(", "),")")}};dr.interpolate={getReturnType:function(r){for(var e=ue.COLOR|ue.NUMBER,t=3;t<r.length;t+=2)e=e&yl(r[t]);return e},toGlsl:function(r,e,t){DH(e),Ch(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:ue.ANY,o=dr.interpolate.getReturnType(e)&a;aR(e,o);for(var s=ve(r,e[1]),A=KC(i),l="",u=2;u<e.length-2;u+=2){var c=ve(r,e[u]),h=l||ve(r,e[u+1],o),f=ve(r,e[u+2]),d=ve(r,e[u+3],o);l="mix(".concat(h,", ").concat(d,", pow(clamp((").concat(s," - ").concat(c,") / (").concat(f," - ").concat(c,"), 0.0, 1.0), ").concat(A,"))")}return l}};dr.match={getReturnType:function(r){for(var e=ue.ANY,t=2;t<r.length;t+=2)e=e&yl(r[t]);return e=e&yl(r[r.length-1]),e},toGlsl:function(r,e,t){DH(e),Ch(e,4);var n=t!==void 0?t:ue.ANY,i=dr.match.getReturnType(e)&n;aR(e,i);for(var a=ve(r,e[0]),o=ve(r,e[e.length-1],i),s=null,A=e.length-3;A>=1;A-=2){var l=ve(r,e[A]),u=ve(r,e[A+1],i);s="(".concat(a," == ").concat(l," ? ").concat(u," : ").concat(s||o,")")}return s}};dr.case={getReturnType:function(r){for(var e=ue.ANY,t=1;t<r.length;t+=2)e=e&yl(r[t]);return e=e&yl(r[r.length-1]),e},toGlsl:function(r,e,t){fst(e),Ch(e,3);var n=t!==void 0?t:ue.ANY,i=dr.case.getReturnType(e)&n;aR(e,i);for(var a=0;a<e.length-1;a+=2)iR(e[a]);for(var o=ve(r,e[e.length-1],i),s=null,a=e.length-3;a>=0;a-=2){var A=ve(r,e[a]),l=ve(r,e[a+1],i);s="(".concat(A," ? ").concat(l," : ").concat(s||o,")")}return s}};var dst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();function C5(r,e){var t=`
attribute vec2 `.concat(sw.TEXTURE_COORD,`;
uniform mat4 `).concat(ur.TILE_TRANSFORM,`;
uniform float `).concat(ur.TEXTURE_PIXEL_WIDTH,`;
uniform float `).concat(ur.TEXTURE_PIXEL_HEIGHT,`;
uniform float `).concat(ur.TEXTURE_RESOLUTION,`;
uniform float `).concat(ur.TEXTURE_ORIGIN_X,`;
uniform float `).concat(ur.TEXTURE_ORIGIN_Y,`;
uniform float `).concat(ur.DEPTH,`;
varying vec2 v_textureCoord;
varying vec2 v_mapCoord;
void main() {
v_textureCoord = `).concat(sw.TEXTURE_COORD,`;
v_mapCoord = vec2(
`).concat(ur.TEXTURE_ORIGIN_X," + ").concat(ur.TEXTURE_RESOLUTION," * ").concat(ur.TEXTURE_PIXEL_WIDTH,` * v_textureCoord[0],
`).concat(ur.TEXTURE_ORIGIN_Y," - ").concat(ur.TEXTURE_RESOLUTION," * ").concat(ur.TEXTURE_PIXEL_HEIGHT,` * v_textureCoord[1]
);
gl_Position = `).concat(ur.TILE_TRANSFORM," * vec4(").concat(sw.TEXTURE_COORD,", ").concat(ur.DEPTH,`, 1.0);
}
`),n={inFragmentShader:!0,variables:[],attributes:[],stringLiteralsMap:{},functions:{},bandCount:e},i=[];if(r.color!==void 0){var a=ve(n,r.color,ue.COLOR);i.push("color = ".concat(a,";"))}if(r.contrast!==void 0){var o=ve(n,r.contrast,ue.NUMBER);i.push("color.rgb = clamp((".concat(o," + 1.0) * color.rgb - (").concat(o," / 2.0), vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(r.exposure!==void 0){var s=ve(n,r.exposure,ue.NUMBER);i.push("color.rgb = clamp((".concat(s," + 1.0) * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}if(r.saturation!==void 0){var A=ve(n,r.saturation,ue.NUMBER);i.push(`
float saturation = `.concat(A,` + 1.0;
float sr = (1.0 - saturation) * 0.2126;
float sg = (1.0 - saturation) * 0.7152;
float sb = (1.0 - saturation) * 0.0722;
mat3 saturationMatrix = mat3(
sr + saturation, sr, sr,
sg, sg + saturation, sg,
sb, sb, sb + saturation
);
color.rgb = clamp(saturationMatrix * color.rgb, vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));
`))}if(r.gamma!==void 0){var l=ve(n,r.gamma,ue.NUMBER);i.push("color.rgb = pow(color.rgb, vec3(1.0 / ".concat(l,"));"))}if(r.brightness!==void 0){var u=ve(n,r.brightness,ue.NUMBER);i.push("color.rgb = clamp(color.rgb + ".concat(u,", vec3(0.0, 0.0, 0.0), vec3(1.0, 1.0, 1.0));"))}var c={},h=n.variables.length;if(h>1&&!r.variables)throw new Error("Missing variables in style (expected ".concat(n.variables,")"));for(var f=function(w){var C=n.variables[w];if(!(C in r.variables))throw new Error("Missing '".concat(C,"' in style variables"));var O=oR(C);c[O]=function(){var F=r.variables[C];return typeof F=="string"&&(F=cE(n,F)),F!==void 0?F:-9999999}},d=0;d<h;++d)f(d);var g=Object.keys(c).map(function(w){return"uniform float ".concat(w,";")}),m=Math.ceil(e/4);g.push("uniform sampler2D ".concat(ur.TILE_TEXTURE_ARRAY,"[").concat(m,"];")),n.paletteTextures&&g.push("uniform sampler2D ".concat(QH,"[").concat(n.paletteTextures.length,"];"));var v=Object.keys(n.functions).map(function(w){return n.functions[w]}),y=`
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
#else
precision mediump float;
#endif
varying vec2 v_textureCoord;
varying vec2 v_mapCoord;
uniform vec4 `.concat(ur.RENDER_EXTENT,`;
uniform float `).concat(ur.TRANSITION_ALPHA,`;
uniform float `).concat(ur.TEXTURE_PIXEL_WIDTH,`;
uniform float `).concat(ur.TEXTURE_PIXEL_HEIGHT,`;
uniform float `).concat(ur.RESOLUTION,`;
uniform float `).concat(ur.ZOOM,`;
`).concat(g.join(`
`),`
`).concat(v.join(`
`),`
void main() {
if (
v_mapCoord[0] < `).concat(ur.RENDER_EXTENT,`[0] ||
v_mapCoord[1] < `).concat(ur.RENDER_EXTENT,`[1] ||
v_mapCoord[0] > `).concat(ur.RENDER_EXTENT,`[2] ||
v_mapCoord[1] > `).concat(ur.RENDER_EXTENT,`[3]
) {
discard;
}
vec4 color = texture2D(`).concat(ur.TILE_TEXTURE_ARRAY,`[0], v_textureCoord);
`).concat(i.join(`
`),`
if (color.a == 0.0) {
discard;
}
gl_FragColor = color;
gl_FragColor.rgb *= gl_FragColor.a;
gl_FragColor *= `).concat(ur.TRANSITION_ALPHA,`;
}`);return{vertexShader:t,fragmentShader:y,uniforms:c,paletteTextures:n.paletteTextures}}var GH=function(r){dst(e,r);function e(t){var n=this,i=t?Ce({},t):{},a=i.style||{};delete i.style;var o=i.cacheSize;return delete i.cacheSize,n=r.call(this,i)||this,n.sources_=i.sources,n.renderedSource_=null,n.renderedResolution_=NaN,n.style_=a,n.cacheSize_=o,n.styleVariables_=n.style_.variables||{},n.addChangeListener(Jr.SOURCE,n.handleSourceUpdate_),n}return e.prototype.getSources=function(t,n){var i=this.getSource();return this.sources_?typeof this.sources_=="function"?this.sources_(t,n):this.sources_:i?[i]:[]},e.prototype.getRenderSource=function(){return this.renderedSource_||this.getSource()},e.prototype.getSourceState=function(){var t=this.getRenderSource();return t?t.getState():co.UNDEFINED},e.prototype.handleSourceUpdate_=function(){this.getSource()&&this.setStyle(this.style_)},e.prototype.getSourceBandCount_=function(){var t=this.getSource();return t&&"bandCount"in t?t.bandCount:4},e.prototype.createRenderer=function(){var t=C5(this.style_,this.getSourceBandCount_());return new sst(this,{vertexShader:t.vertexShader,fragmentShader:t.fragmentShader,uniforms:t.uniforms,cacheSize:this.cacheSize_,paletteTextures:t.paletteTextures})},e.prototype.renderSources=function(t,n){for(var i=this.getRenderer(),a,o=0,s=n.length;o<s;++o)this.renderedSource_=n[o],i.prepareFrame(t)&&(a=i.renderFrame(t));return a},e.prototype.render=function(t,n){var i=this;this.rendered=!0;for(var a=t.viewState,o=this.getSources(t.extent,a.resolution),s=!0,A=function(f,d){var g=o[f],m=g.getState();if(m==co.LOADING){var v=function(){g.getState()==co.READY&&(g.removeEventListener("change",v),i.changed())};g.addEventListener("change",v)}s=s&&m==co.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=C5(this.style_,this.getSourceBandCount_()),i=this.getRenderer();i.reset({vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,uniforms:n.uniforms,paletteTextures:n.paletteTextures}),this.changed()},e.prototype.updateStyleVariables=function(t){Ce(this.styleVariables_,t),this.changed()},e}(_H);GH.prototype.dispose;var pst=GH;const gst={extends:Td,name:"ol-webgl-tile-layer",setup(r){const e=Be("map"),t=Be("overviewMap",null),{properties:n}=Or(r),i=qe(()=>new pst(n)),a=()=>{t!=null?(t.value.getOverviewMap().addLayer(i.value),t.value.changed()):e.addLayer(i.value)},o=()=>{t!=null?(t.value.getOverviewMap().removeLayer(i.value),t.value.changed()):e.removeLayer(i.value)};return t!=null&&ye(t,()=>{o(),a()}),cr(()=>{a()}),pr(()=>{o()}),Dr("tileLayer",i),{tileLayer:i}},props:{preload:{type:Number,default:1}}};function vst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Fx=me(gst,[["render",vst]]),mst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),yst=function(r){mst(e,r);function e(t){var n=t||{};return r.call(this,n)||this}return e}(Cd),_st=yst,wst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Est=function(r){wst(e,r);function e(t){var n=r.call(this,t)||this;return n.image_=null,n}return e.prototype.getImage=function(){return this.image_?this.image_.getImage():null},e.prototype.prepareFrame=function(t){var n=t.layerStatesArray[t.layerIndex],i=t.pixelRatio,a=t.viewState,o=a.resolution,s=this.getLayer().getSource(),A=t.viewHints,l=t.extent;if(n.extent!==void 0&&(l=Qs(l,ds(n.extent,a.projection))),!A[In.ANIMATING]&&!A[In.INTERACTING]&&!rv(l))if(s){var u=a.projection,c=s.getImage(l,o,i,u);c&&(this.loadImage(c)?this.image_=c:c.getState()===rr.EMPTY&&(this.image_=null))}else this.image_=null;return!!this.image_},e.prototype.getData=function(t){var n=this.frameState;if(!n)return null;var i=this.getLayer(),a=bn(n.pixelToCoordinateTransform,t.slice()),o=i.getExtent();if(o&&!gA(o,a))return null;var s=this.image_.getExtent(),A=this.image_.getImage(),l=jr(s),u=Math.floor(A.width*((a[0]-s[0])/l));if(u<0||u>=A.width)return null;var c=Ii(s),h=Math.floor(A.height*((s[3]-a[1])/c));return h<0||h>=A.height?null:this.getImageData(A,u,h)},e.prototype.renderFrame=function(t,n){var i=this.image_,a=i.getExtent(),o=i.getResolution(),s=i.getPixelRatio(),A=t.layerStatesArray[t.layerIndex],l=t.pixelRatio,u=t.viewState,c=u.center,h=u.resolution,f=t.size,d=l*o/(h*s),g=Math.round(f[0]*l),m=Math.round(f[1]*l),v=u.rotation;if(v){var y=Math.round(Math.sqrt(g*g+m*m));g=y,m=y}yo(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/l,1/l,v,-g/2,-m/2),y0(this.inversePixelTransform,this.pixelTransform);var w=sF(this.pixelTransform);this.useContainer(n,w,A.opacity,this.getBackground(t));var C=this.context,O=C.canvas;O.width!=g||O.height!=m?(O.width=g,O.height=m):this.containerReused||C.clearRect(0,0,g,m);var F=!1,I=!0;if(A.extent){var T=ds(A.extent,u.projection);I=Xn(T,t.extent),F=I&&!fs(T,t.extent),F&&this.clipUnrotated(C,t,T)}var L=i.getImage(),N=yo(this.tempTransform,g/2,m/2,d,d,0,s*(a[0]-c[0])/o,s*(c[1]-a[3])/o);this.renderedResolution=o*l/s;var x=L.width*N[0],S=L.height*N[3];if(this.getLayer().getSource().getInterpolate()||Ce(C,Pg),this.preRender(C,t),I&&x>=.5&&S>=.5){var P=N[4],U=N[5],tt=A.opacity,q=void 0;tt!==1&&(q=C.globalAlpha,C.globalAlpha=tt),C.drawImage(L,0,0,+L.width,+L.height,Math.round(P),Math.round(U),Math.round(x),Math.round(S)),tt!==1&&(C.globalAlpha=q)}return this.postRender(C,t),F&&C.restore(),Ce(C,CH),w!==O.style.transform&&(O.style.transform=w),this.container},e}($F),Cst=Est,Bst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),bst=function(r){Bst(e,r);function e(t){return r.call(this,t)||this}return e.prototype.createRenderer=function(){return new Cst(this)},e.prototype.getData=function(t){return r.prototype.getData.call(this,t)},e}(_st),$H=bst;const Tst={extends:Td,name:"ol-image-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=new $H(t);return ye(t,()=>{n.setProperties(t)}),cr(()=>{e.addLayer(n)}),pr(()=>{e.removeLayer(n)}),Dr("imageLayer",n),{imageLayer:n}}};function Sst(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Rx=me(Tst,[["render",Sst]]);const xst={extends:Td,name:"ol-vector-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=qe(()=>new wl(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Dr("vectorLayer",n),Dr("stylable",n),{vectorLayer:n}},props:{renderBuffer:{type:Number,default:100},updateWhileAnimating:{type:Boolean,default:!1},style:{type:Function},updateWhileInteracting:{type:Boolean,default:!1}}};function Ist(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Mx=me(xst,[["render",Ist]]),Lst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ost=function(r){Lst(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.expireCache=function(t){for(;this.canExpireCache();){var n=this.peekLast();if(n.getKey()in t)break;this.pop().release()}},e.prototype.pruneExceptNewestZ=function(){if(this.getCount()!==0){var t=this.peekFirstKey(),n=tst(t),i=n[0];this.forEach(function(a){a.tileCoord[0]!==i&&(this.remove(Wy(a.tileCoord)),a.release())}.bind(this))}},e}(SH),VH=Ost,rT={TILELOADSTART:"tileloadstart",TILELOADEND:"tileloadend",TILELOADERROR:"tileloaderror"},Fst=[0,0,0],pc=5,Rst=function(){function r(e){this.minZoom=e.minZoom!==void 0?e.minZoom:0,this.resolutions_=e.resolutions,Le(XY(this.resolutions_,function(o,s){return s-o},!0),17);var t;if(!e.origins){for(var n=0,i=this.resolutions_.length-1;n<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,Le(this.origins_.length==this.resolutions_.length,20));var a=e.extent;a!==void 0&&!this.origin_&&!this.origins_&&(this.origin_=BA(a)),Le(!this.origin_&&this.origins_||this.origin_&&!this.origins_,18),this.tileSizes_=null,e.tileSizes!==void 0&&(this.tileSizes_=e.tileSizes,Le(this.tileSizes_.length==this.resolutions_.length,19)),this.tileSize_=e.tileSize!==void 0?e.tileSize:this.tileSizes_?null:mF,Le(!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 eR(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=vp(o,o,s,s,n)):a=this.getTileRangeForExtentAndZ(A,l,n),t(l,a))return!0;--l}return!1},r.prototype.getExtent=function(){return this.extent_},r.prototype.getMaxZoom=function(){return this.maxZoom},r.prototype.getMinZoom=function(){return this.minZoom},r.prototype.getOrigin=function(e){return this.origin_?this.origin_:this.origins_[e]},r.prototype.getResolution=function(e){return this.resolutions_[e]},r.prototype.getResolutions=function(){return this.resolutions_},r.prototype.getTileCoordChildTileRange=function(e,t,n){if(e[0]<this.maxZoom){if(this.zoomFactor_===2){var i=e[1]*2,a=e[2]*2;return vp(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 vp(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 vp(A,A,l,l,n);var u=Math.floor(s*(a+1))-1,c=Math.floor(s*(o+1))-1;return vp(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=Wi(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 ko(s,l,A,u,n)},r.prototype.getTileRangeForExtentAndZ=function(e,t,n){var i=Fst;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),vp(a,i[1],o,i[2],n)},r.prototype.getTileCoordCenter=function(e){var t=this.getOrigin(e[0]),n=this.getResolution(e[0]),i=Wi(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=Wi(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 ko(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=Wi(this.getTileSize(o),this.tmpSize_),u=s*(e-A[0])/n/l[0],c=s*(A[1]-t)/n/l[1];return i?(u=Nc(u,pc)-1,c=Nc(c,pc)-1):(u=Wp(u,pc),c=Wp(c,pc)),Ky(o,u,c,a)},r.prototype.getTileCoordForXYAndZ_=function(e,t,n,i,a){var o=this.getOrigin(n),s=this.getResolution(n),A=Wi(this.getTileSize(n),this.tmpSize_),l=(e-o[0])/s/A[0],u=(o[1]-t)/s/A[1];return i?(l=Nc(l,pc)-1,u=Nc(u,pc)-1):(l=Wp(l,pc),u=Wp(u,pc)),Ky(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=CC(this.resolutions_,e,t||0);return Un(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}(),sR=Rst;function jH(r){var e=r.getDefaultTileGrid();return e||(e=Pst(r),r.setDefaultTileGrid(e)),e}function Mst(r,e,t){var n=e[0],i=r.getTileCoordCenter(e),a=zC(t);if(gA(a,i))return e;var o=jr(a),s=Math.ceil((a[0]-i[0])/o);return i[0]+=o*s,r.getTileCoordForCoordAndZ(i,n)}function Nst(r,e,t,n){var i=n!==void 0?n:Im.TOP_LEFT,a=WH(r,e,t);return new sR({extent:r,origin:Fk(r,i),resolutions:a,tileSize:t})}function KH(r){var e=r||{},t=e.extent||Ve("EPSG:3857").getExtent(),n={extent:t,minZoom:e.minZoom,tileSize:e.tileSize,resolutions:WH(t,e.maxZoom,e.tileSize,e.maxResolution)};return new sR(n)}function WH(r,e,t,n){for(var i=e!==void 0?e:mq,a=Ii(r),o=jr(r),s=Wi(t!==void 0?t:mF),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 Pst(r,e,t,n){var i=zC(r);return Nst(i,e,t,n)}function zC(r){r=Ve(r);var e=r.getExtent();if(!e){var t=180*vA[ho.DEGREES]/r.getMetersPerUnit();e=ko(-t,-t,t,t)}return e}var zH=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ust=function(r){zH(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&&Wi(n.tileGrid.getTileSize(n.tileGrid.getMinZoom()),i),n.tileCache=new VH(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=jC(n,c,h),u=!1,o.containsKey(l)&&(A=o.get(l),u=A.getState()===Te.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 Re()},e.prototype.getTileGrid=function(){return this.tileGrid},e.prototype.getTileGridForProjection=function(t){return this.tileGrid?this.tileGrid:jH(t)},e.prototype.getTileCacheForProjection=function(t){return Le(tl(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=Wi(a.getTileSize(t),this.tmpSize);return o==1?s:p8(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=Mst(a,t,i)),est(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}(DC),Dst=function(r){zH(e,r);function e(t,n){var i=r.call(this,t)||this;return i.tile=n,i}return e}($o),YH=Ust;function Qst(r,e){var t=/\{z\}/g,n=/\{x\}/g,i=/\{y\}/g,a=/\{-y\}/g;return function(o,s,A){if(o)return r.replace(t,o[0].toString()).replace(n,o[1].toString()).replace(i,o[2].toString()).replace(a,function(){var l=o[0],u=e.getFullTileRange(l);Le(u,55);var c=u.getHeight()-o[2]-1;return c.toString()})}}function kst(r,e){for(var t=r.length,n=new Array(t),i=0;i<t;++i)n[i]=Qst(r[i],e);return hE(n)}function hE(r){return r.length===1?r[0]:function(e,t,n){if(e){var i=MH(e),a=zc(i,r.length);return r[a](e,t,n)}else return}}function XH(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 Hst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Gst=function(r){Hst(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=Ee(n),a=n.getState(),o;a==Te.LOADING?(this.tileLoadingKeys_[i]=!0,o=rT.TILELOADSTART):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],o=a==Te.ERROR?rT.TILELOADERROR:a==Te.LOADED?rT.TILELOADEND:void 0),o!=null&&this.dispatchEvent(new Dst(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=XH(t);this.urls=n,this.setUrls(n)},e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
`);this.generateTileUrlFunction_?this.setTileUrlFunction(kst(t,this.tileGrid),n):this.setKey(n)},e.prototype.tileUrlFunction=function(t,n,i){},e.prototype.useTile=function(t,n,i){var a=jC(t,n,i);this.tileCache.containsKey(a)&&this.tileCache.get(a)},e}(YH),$st=Gst,Vst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),jst=function(r){Vst(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:Kst,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:lE,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&&!tl(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&&!tl(this.getProjection(),t)?!1:r.prototype.getOpaque.call(this,t)},e.prototype.getTileGridForProjection=function(t){var n=this.getProjection();if(this.tileGrid&&(!n||tl(n,t)))return this.tileGrid;var i=Ee(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=jH(t)),this.tileGridForProjection[i]},e.prototype.getTileCacheForProjection=function(t){var n=this.getProjection();if(!n||tl(n,t))return this.tileCache;var i=Ee(t);return i in this.tileCacheForProjection||(this.tileCacheForProjection[i]=new VH(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?Te.IDLE:Te.EMPTY,u!==void 0?u:"",this.crossOrigin,this.tileLoadFunction,this.tileOptions);return c.key=s,c.addEventListener(xe.CHANGE,this.handleTileChange.bind(this)),c},e.prototype.getTile=function(t,n,i,a,o){var s=this.getProjection();if(!s||!o||tl(s,o))return this.getTileInternal(t,n,i,a,s||o);var A=this.getTileCacheForProjection(o),l=[t,n,i],u=void 0,c=Wy(l);A.containsKey(c)&&(u=A.get(c));var h=this.getKey();if(u&&u.key==h)return u;var f=this.getTileGridForProjection(s),d=this.getTileGridForProjection(o),g=this.getTileCoordForTileUrlFunction(l,o),m=new tR(s,f,o,d,l,g,this.getTilePixelRatio(a),this.getGutter(),function(v,y,w,C){return this.getTileInternal(v,y,w,C,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=jC(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()==Te.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=Ve(t);if(i){var a=Ee(i);a in this.tileGridForProjection||(this.tileGridForProjection[a]=n)}}},e}($st);function Kst(r,e){r.getImage().src=e}var YC=jst,qH=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a 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 Wst(r,e,t,n){var i=document.createElement("script"),a="olc_"+Ee(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){qH(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){qH(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 zst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a 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 Yst(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 Xst='<a class="ol-attribution-bing-tos" href="https://www.microsoft.com/maps/product/terms.html" target="_blank">Terms of Use</a>',qst=function(r){zst(e,r);function e(t){var n=this,i=t.hidpi!==void 0?t.hidpi:!1,a=t.imageSmoothing!==void 0?t.imageSmoothing:!0;t.interpolate!==void 0&&(a=t.interpolate),n=r.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",interpolate:a,opaque:!0,projection:Ve("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:co.LOADING,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:i?2:1,wrapX:t.wrapX!==void 0?t.wrapX:!0,transition:t.transition,zDirection:t.zDirection})||this,n.hidpi_=i,n.culture_=t.culture!==void 0?t.culture:"en-us",n.maxZoom_=t.maxZoom!==void 0?t.maxZoom:-1,n.apiKey_=t.key,n.imagerySet_=t.imagerySet;var o="https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+n.imagerySet_+"?uriScheme=https&include=ImageryProviders&key="+n.apiKey_+"&c="+n.culture_;return Wst(o,n.handleImageryMetadataResponse.bind(n),void 0,"jsonp"),n}return e.prototype.getApiKey=function(){return this.apiKey_},e.prototype.getImagerySet=function(){return this.imagerySet_},e.prototype.handleImageryMetadataResponse=function(t){if(t.statusCode!=200||t.statusDescription!="OK"||t.authenticationResultCode!="ValidCredentials"||t.resourceSets.length!=1||t.resourceSets[0].resources.length!=1){this.setState(co.ERROR);return}var n=t.resourceSets[0].resources[0],i=this.maxZoom_==-1?n.zoomMax:this.maxZoom_,a=this.getProjection(),o=zC(a),s=this.hidpi_?2:1,A=n.imageWidth==n.imageHeight?n.imageWidth/s:[n.imageWidth/s,n.imageHeight/s],l=KH({extent:o,minZoom:n.zoomMin,maxZoom:i,tileSize:A});this.tileGrid=l;var u=this.culture_,c=this.hidpi_;if(this.tileUrlFunction=hE(n.imageUrlSubdomains.map(function(f){var d=[0,0,0],g=n.imageUrl.replace("{subdomain}",f).replace("{culture}",u);return function(m,v,y){if(m){Ky(m[0],m[1],m[2],d);var w=g;return c&&(w+="&dpi=d1&device=mobile"),w.replace("{quadkey}",Yst(d))}else return}})),n.imageryProviders){var h=id(Ve("EPSG:4326"),this.getProjection());this.setAttributions(function(f){var d=[],g=f.viewState,m=this.getTileGrid(),v=m.getZForResolution(g.resolution,this.zDirection),y=m.getTileCoordForCoordAndZ(g.center,v),w=y[0];return n.imageryProviders.map(function(C){for(var O=!1,F=C.coverageAreas,I=0,T=F.length;I<T;++I){var L=F[I];if(w>=L.zoomMin&&w<=L.zoomMax){var N=L.bbox,x=[N[1],N[0],N[3],N[2]],S=cF(x,h);if(Xn(S,f.extent)){O=!0;break}}}O&&d.push(C.attribution)}),d.push(Xst),d}.bind(this))}this.setState(co.READY)},e}(YC),Zst=qst,Jst=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),tAt=function(r){Jst(e,r);function e(t){var n=t||{},i=n.imageSmoothing!==void 0?n.imageSmoothing:!0;n.interpolate!==void 0&&(i=n.interpolate);var a=n.projection!==void 0?n.projection:"EPSG:3857",o=n.tileGrid!==void 0?n.tileGrid:KH({extent:zC(a),maxResolution:n.maxResolution,maxZoom:n.maxZoom,minZoom:n.minZoom,tileSize:n.tileSize});return r.call(this,{attributions:n.attributions,cacheSize:n.cacheSize,crossOrigin:n.crossOrigin,interpolate:i,opaque:n.opaque,projection:a,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:n.tileLoadFunction,tilePixelRatio:n.tilePixelRatio,tileUrlFunction:n.tileUrlFunction,url:n.url,urls:n.urls,wrapX:n.wrapX!==void 0?n.wrapX:!0,transition:n.transition,attributionsCollapsible:n.attributionsCollapsible,zDirection:n.zDirection})||this}return e}(YC),ZH=tAt,eAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rAt=function(r){eAt(e,r);function e(t){var n=r.call(this,{attributions:t.attributions,wrapX:t.wrapX})||this;return n.resolution=void 0,n.distance=t.distance!==void 0?t.distance:20,n.minDistance=t.minDistance||0,n.interpolationRatio=0,n.features=[],n.geometryFunction=t.geometryFunction||function(i){var a=i.getGeometry();return Le(a.getType()==pt.POINT,10),a},n.createCustomCluster_=t.createCluster,n.source=null,n.boundRefresh_=n.refresh.bind(n),n.updateDistance(n.distance,n.minDistance),n.setSource(t.source||null),n}return e.prototype.clear=function(t){this.features.length=0,r.prototype.clear.call(this,t)},e.prototype.getDistance=function(){return this.distance},e.prototype.getSource=function(){return this.source},e.prototype.loadFeatures=function(t,n,i){this.source.loadFeatures(t,n,i),n!==this.resolution&&(this.resolution=n,this.refresh())},e.prototype.setDistance=function(t){this.updateDistance(t,this.minDistance)},e.prototype.setMinDistance=function(t){this.updateDistance(this.distance,t)},e.prototype.getMinDistance=function(){return this.minDistance},e.prototype.setSource=function(t){this.source&&this.source.removeEventListener(xe.CHANGE,this.boundRefresh_),this.source=t,t&&t.addEventListener(xe.CHANGE,this.boundRefresh_),this.refresh()},e.prototype.refresh=function(){this.clear(),this.cluster(),this.addFeatures(this.features)},e.prototype.updateDistance=function(t,n){var i=t===0?0:Math.min(n,t)/t,a=t!==this.distance||this.interpolationRatio!==i;this.distance=t,this.minDistance=n,this.interpolationRatio=i,a&&this.refresh()},e.prototype.cluster=function(){if(!(this.resolution===void 0||!this.source))for(var t=Ui(),n=this.distance*this.resolution,i=this.source.getFeatures(),a={},o=0,s=i.length;o<s;o++){var A=i[o];if(!(Ee(A)in a)){var l=this.geometryFunction(A);if(l){var u=l.getCoordinates();Uf(u,t),_o(t,n,t);var c=this.source.getFeaturesInExtent(t).filter(function(h){var f=Ee(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?jk(i,o.getCoordinates()):t.splice(a,1)}Kk(i,1/t.length);var s=Ya(n),A=this.interpolationRatio,l=new xr([i[0]*(1-A)+s[0]*A,i[1]*(1-A)+s[1]*A]);return this.createCustomCluster_?this.createCustomCluster_(l,t):new _r({geometry:l,features:t})},e}(Mu),JH=rAt,rl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function nAt(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:function(){return r[t]}})}),e}var Va=globalThis&&globalThis.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,a;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))},lo={VERSION1:"version1",VERSION2:"version2",VERSION3:"version3"},Ad={};Ad[lo.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"]}};Ad[lo.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"]}};Ad[lo.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"]}};Ad.none={none:{supports:[],formats:[],qualities:[]}};var iAt=/^https?:\/\/library\.stanford\.edu\/iiif\/image-api\/(?:1\.1\/)?compliance\.html#level[0-2]$/,B5=/^https?:\/\/iiif\.io\/api\/image\/2\/level[0-2](?:\.json)?$/,aAt=/(^https?:\/\/iiif\.io\/api\/image\/3\/level[0-2](?:\.json)?$)|(^level[0-2]$)/;function oAt(r){var e=r.getComplianceLevelSupportedFeatures();return e===void 0&&(e=Ad[lo.VERSION1].level0),{url:r.imageInfo["@id"]===void 0?void 0:r.imageInfo["@id"].replace(/\/?(?:info\.json)?$/g,""),supports:e.supports,formats:Va(Va([],e.formats,!0),[r.imageInfo.formats===void 0?[]:r.imageInfo.formats],!1),qualities:Va(Va([],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 sAt(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:Va(Va([],e.supports,!0),n,!0),formats:Va(Va([],e.formats,!0),i,!0),qualities:Va(Va([],e.qualities,!0),a,!0)}}function AAt(r){var e=r.getComplianceLevelSupportedFeatures(),t=r.imageInfo.extraFormats===void 0?e.formats:Va(Va([],e.formats,!0),r.imageInfo.extraFormats,!0),n=r.imageInfo.preferredFormats!==void 0&&Array.isArray(r.imageInfo.preferredFormats)&&r.imageInfo.preferredFormats.length>0?r.imageInfo.preferredFormats.filter(function(i){return Ni(["jpg","png","gif"],i)}).reduce(function(i,a){return i===void 0&&Ni(t,a)?a:i},void 0):void 0;return{url:r.imageInfo.id,sizes:r.imageInfo.sizes===void 0?void 0:r.imageInfo.sizes.map(function(i){return[i.width,i.height]}),tileSize:r.imageInfo.tiles===void 0?void 0:[r.imageInfo.tiles.map(function(i){return i.width})[0],r.imageInfo.tiles.map(function(i){return i.height})[0]],resolutions:r.imageInfo.tiles===void 0?void 0:r.imageInfo.tiles.map(function(i){return i.scaleFactors})[0],supports:r.imageInfo.extraFeatures===void 0?e.supports:Va(Va([],e.supports,!0),r.imageInfo.extraFeatures,!0),formats:t,qualities:r.imageInfo.extraQualities===void 0?e.qualities:Va(Va([],e.qualities,!0),r.imageInfo.extraQualities,!0),preferredFormat:n}}var XC={};XC[lo.VERSION1]=oAt;XC[lo.VERSION2]=sAt;XC[lo.VERSION3]=AAt;var lAt=function(){function r(e){this.setImageInfo(e)}return r.prototype.setImageInfo=function(e){typeof e=="string"?this.imageInfo=JSON.parse(e):this.imageInfo=e},r.prototype.getImageApiVersion=function(){if(this.imageInfo!==void 0){var e=this.imageInfo["@context"]||"ol-no-context";typeof e=="string"&&(e=[e]);for(var t=0;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 lo.VERSION1;case"http://iiif.io/api/image/2/context.json":return lo.VERSION2;case"http://iiif.io/api/image/3/context.json":return lo.VERSION3;case"ol-no-context":if(this.getComplianceLevelEntryFromProfile(lo.VERSION1)&&this.imageInfo.identifier)return lo.VERSION1;break}Le(!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 lo.VERSION1:if(iAt.test(this.imageInfo.profile))return this.imageInfo.profile;break;case lo.VERSION3:if(aAt.test(this.imageInfo.profile))return this.imageInfo.profile;break;case lo.VERSION2:if(typeof this.imageInfo.profile=="string"&&B5.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"&&B5.test(this.imageInfo.profile[0]))return this.imageInfo.profile[0];break}},r.prototype.getComplianceLevelFromProfile=function(e){var t=this.getComplianceLevelEntryFromProfile(e);if(t!==void 0){var n=t.match(/level[0-2](?:\.json)?$/g);return Array.isArray(n)?n[0].replace(".json",""):void 0}},r.prototype.getComplianceLevelSupportedFeatures=function(){if(this.imageInfo!==void 0){var e=this.getImageApiVersion(),t=this.getComplianceLevelFromProfile(e);return t===void 0?Ad.none.none:Ad[e][t]}},r.prototype.getTileSourceOptions=function(e){var t=e||{},n=this.getImageApiVersion();if(n!==void 0){var i=n===void 0?void 0:XC[n](this);if(i!==void 0)return{url:i.url,version:n,size:[this.imageInfo.width,this.imageInfo.height],sizes:i.sizes,format:t.format!==void 0&&Ni(i.formats,t.format)?t.format:i.preferredFormat!==void 0?i.preferredFormat:"jpg",supports:i.supports,quality:t.quality&&Ni(i.qualities,t.quality)?t.quality:Ni(i.qualities,"native")?"native":"default",resolutions:Array.isArray(i.resolutions)?i.resolutions.sort(function(a,o){return o-a}):void 0,tileSize:i.tileSize}}},r}(),uAt=lAt,cAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),hAt=function(r){cAt(e,r);function e(t,n,i,a,o,s,A){var l=this,u=t.getExtent(),c=n.getExtent(),h=c?Qs(i,c):i,f=Ya(h),d=Vy(t,n,f,a),g=wH,m=new EH(t,n,h,u,d*g,a),v=m.calculateSourceExtent(),y=s(v,d,o),w=y?rr.IDLE:rr.EMPTY,C=y?y.getPixelRatio():1;return l=r.call(this,i,a,C,w)||this,l.targetProj_=n,l.maxSourceExtent_=u,l.triangulation_=m,l.targetResolution_=a,l.targetExtent_=i,l.sourceImage_=y,l.sourcePixelRatio_=C,l.interpolate_=A,l.canvas_=null,l.sourceListenerKey_=null,l}return e.prototype.disposeInternal=function(){this.state==rr.LOADING&&this.unlistenSource_(),r.prototype.disposeInternal.call(this)},e.prototype.getImage=function(){return this.canvas_},e.prototype.getProjection=function(){return this.targetProj_},e.prototype.reproject_=function(){var t=this.sourceImage_.getState();if(t==rr.LOADED){var n=jr(this.targetExtent_)/this.targetResolution_,i=Ii(this.targetExtent_)/this.targetResolution_;this.canvas_=BH(n,i,this.sourcePixelRatio_,this.sourceImage_.getResolution(),this.maxSourceExtent_,this.targetResolution_,this.targetExtent_,this.triangulation_,[{extent:this.sourceImage_.getExtent(),image:this.sourceImage_.getImage()}],0,void 0,this.interpolate_)}this.state=t,this.changed()},e.prototype.load=function(){if(this.state==rr.IDLE){this.state=rr.LOADING,this.changed();var t=this.sourceImage_.getState();t==rr.LOADED||t==rr.ERROR?this.reproject_():(this.sourceListenerKey_=je(this.sourceImage_,xe.CHANGE,function(n){var i=this.sourceImage_.getState();(i==rr.LOADED||i==rr.ERROR)&&(this.unlistenSource_(),this.reproject_())},this),this.sourceImage_.load())}},e.prototype.unlistenSource_=function(){Yr(this.sourceListenerKey_),this.sourceListenerKey_=null},e}(D8),fAt=hAt,tG=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),nT={IMAGELOADSTART:"imageloadstart",IMAGELOADEND:"imageloadend",IMAGELOADERROR:"imageloaderror"},dAt=function(r){tG(e,r);function e(t,n){var i=r.call(this,t)||this;return i.image=n,i}return e}($o),pAt=function(r){tG(e,r);function e(t){var n=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(i=t.interpolate),n=r.call(this,{attributions:t.attributions,projection:t.projection,state:t.state,interpolate:i})||this,n.on,n.once,n.un,n.resolutions_=t.resolutions!==void 0?t.resolutions:null,n.reprojectedImage_=null,n.reprojectedRevision_=0,n}return e.prototype.getResolutions=function(){return this.resolutions_},e.prototype.findNearestResolution=function(t){if(this.resolutions_){var n=CC(this.resolutions_,t,0);t=this.resolutions_[n]}return t},e.prototype.getImage=function(t,n,i,a){var o=this.getProjection();if(!o||!a||tl(o,a))return o&&(a=o),this.getImageInternal(t,n,i,a);if(this.reprojectedImage_){if(this.reprojectedRevision_==this.getRevision()&&tl(this.reprojectedImage_.getProjection(),a)&&this.reprojectedImage_.getResolution()==n&&gl(this.reprojectedImage_.getExtent(),t))return this.reprojectedImage_;this.reprojectedImage_.dispose(),this.reprojectedImage_=null}return this.reprojectedImage_=new fAt(o,a,t,n,i,function(s,A,l){return this.getImageInternal(s,A,l,o)}.bind(this),this.getInterpolate()),this.reprojectedRevision_=this.getRevision(),this.reprojectedImage_},e.prototype.getImageInternal=function(t,n,i,a){return Re()},e.prototype.handleImageChange=function(t){var n=t.target,i;switch(n.getState()){case rr.LOADING:this.loading=!0,i=nT.IMAGELOADSTART;break;case rr.LOADED:this.loading=!1,i=nT.IMAGELOADEND;break;case rr.ERROR:this.loading=!1,i=nT.IMAGELOADERROR;break;default:return}this.hasListener(i)&&this.dispatchEvent(new dAt(i,n))},e}(DC);function eG(r,e){r.getImage().src=e}var rG=pAt;function Ug(r,e){var t=[];Object.keys(e).forEach(function(i){e[i]!==null&&e[i]!==void 0&&t.push(i+"="+encodeURIComponent(e[i]))});var n=t.join("&");return r=r.replace(/[?&]$/,""),r=r.indexOf("?")===-1?r+"?":r+"&",r+n}var gAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),vAt=function(r){gAt(e,r);function e(t){var n=this,i=t.crossOrigin!==void 0?t.crossOrigin:null,a=t.imageLoadFunction!==void 0?t.imageLoadFunction:eG,o=t.imageSmoothing!==void 0?t.imageSmoothing:!0;return t.interpolate!==void 0&&(o=t.interpolate),n=r.call(this,{attributions:t.attributions,interpolate:o,projection:Ve(t.projection)})||this,n.url_=t.url,n.imageExtent_=t.imageExtent,n.image_=new Q8(n.imageExtent_,void 0,1,n.url_,i,a),n.imageSize_=t.imageSize?t.imageSize:null,n.image_.addEventListener(xe.CHANGE,n.handleImageChange.bind(n)),n}return e.prototype.getImageExtent=function(){return this.imageExtent_},e.prototype.getImageInternal=function(t,n,i,a){return Xn(t,this.image_.getExtent())?this.image_:null},e.prototype.getUrl=function(){return this.url_},e.prototype.handleImageChange=function(t){if(this.image_.getState()==rr.LOADED){var n=this.image_.getExtent(),i=this.image_.getImage(),a=void 0,o=void 0;this.imageSize_?(a=this.imageSize_[0],o=this.imageSize_[1]):(a=i.width,o=i.height);var s=jr(n),A=Ii(n),l=s/a,u=A/o,c=a,h=o;if(l>u?c=Math.round(s/u):h=Math.round(A/l),c!==a||h!==o){var f=wo(c,h);this.getInterpolate()||Ce(f,Pg);var d=f.canvas;f.drawImage(i,0,0,a,o,0,0,d.width,d.height),this.image_.setImage(d)}}r.prototype.handleImageChange.call(this,t)},e}(rG),mAt=vAt,Dc="1.3.0",Qc={CARMENTA_SERVER:"carmentaserver",GEOSERVER:"geoserver",MAPSERVER:"mapserver",QGIS:"qgis"},yAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gc=4,b5=[101,101],_At=function(r){yAt(e,r);function e(t){var n=this,i=t||{},a=i.imageSmoothing!==void 0?i.imageSmoothing:!0;return i.interpolate!==void 0&&(a=i.interpolate),n=r.call(this,{attributions:i.attributions,interpolate:a,projection:i.projection,resolutions:i.resolutions})||this,n.crossOrigin_=i.crossOrigin!==void 0?i.crossOrigin:null,n.url_=i.url,n.imageLoadFunction_=i.imageLoadFunction!==void 0?i.imageLoadFunction:eG,n.params_=i.params||{},n.v13_=!0,n.updateV13_(),n.serverType_=i.serverType,n.hidpi_=i.hidpi!==void 0?i.hidpi:!0,n.image_=null,n.imageSize_=[0,0],n.renderedRevision_=0,n.ratio_=i.ratio!==void 0?i.ratio:1.5,n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){if(this.url_!==void 0){var o=Ve(i),s=this.getProjection();s&&s!==o&&(n=Vy(s,o,t,n),t=ch(t,o,s));var A=Qf(t,n,0,b5),l={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Ce(l,this.params_,a);var u=Wp((t[0]-A[0])/n,gc),c=Wp((A[3]-t[1])/n,gc);return l[this.v13_?"I":"X"]=u,l[this.v13_?"J":"Y"]=c,this.getRequestUrl_(A,b5,1,s||o,l)}},e.prototype.getLegendUrl=function(t,n){if(this.url_!==void 0){var i={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(n===void 0||n.LAYER===void 0){var a=this.params_.LAYERS,o=!Array.isArray(a)||a.length===1;if(!o)return;i.LAYER=a}if(t!==void 0){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1,A=28e-5;i.SCALE=t*s/A}return Ce(i,n),Ug(this.url_,i)}},e.prototype.getParams=function(){return this.params_},e.prototype.getImageInternal=function(t,n,i,a){if(this.url_===void 0)return null;n=this.findNearestResolution(n),i!=1&&(!this.hidpi_||this.serverType_===void 0)&&(i=1);var o=n/i,s=Ya(t),A=Nc(jr(t)/o,gc),l=Nc(Ii(t)/o,gc),u=Qf(s,o,0,[A,l]),c=Nc(this.ratio_*jr(t)/o,gc),h=Nc(this.ratio_*Ii(t)/o,gc),f=Qf(s,o,0,[c,h]),d=this.image_;if(d&&this.renderedRevision_==this.getRevision()&&d.getResolution()==n&&d.getPixelRatio()==i&&fs(d.getExtent(),u))return d;var g={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};Ce(g,this.params_),this.imageSize_[0]=uP(jr(f)/o,gc),this.imageSize_[1]=uP(Ii(f)/o,gc);var m=this.getRequestUrl_(f,this.imageSize_,i,a,g);return this.image_=new Q8(f,n,i,m,this.crossOrigin_,this.imageLoadFunction_),this.renderedRevision_=this.getRevision(),this.image_.addEventListener(xe.CHANGE,this.handleImageChange.bind(this)),this.image_},e.prototype.getImageLoadFunction=function(){return this.imageLoadFunction_},e.prototype.getRequestUrl_=function(t,n,i,a,o){if(Le(this.url_!==void 0,9),o[this.v13_?"CRS":"SRS"]=a.getCode(),"STYLES"in this.params_||(o.STYLES=""),i!=1)switch(this.serverType_){case Qc.GEOSERVER:var s=90*i+.5|0;"FORMAT_OPTIONS"in o?o.FORMAT_OPTIONS+=";dpi:"+s:o.FORMAT_OPTIONS="dpi:"+s;break;case Qc.MAPSERVER:o.MAP_RESOLUTION=90*i;break;case Qc.CARMENTA_SERVER:case Qc.QGIS:o.DPI=90*i;break;default:Le(!1,8);break}o.WIDTH=n[0],o.HEIGHT=n[1];var A=a.getAxisOrientation(),l;return this.v13_&&A.substr(0,2)=="ne"?l=[t[1],t[0],t[3],t[2]]:l=t,o.BBOX=l.join(","),Ug(this.url_,o)},e.prototype.getUrl=function(){return this.url_},e.prototype.setImageLoadFunction=function(t){this.image_=null,this.imageLoadFunction_=t,this.changed()},e.prototype.setUrl=function(t){t!=this.url_&&(this.url_=t,this.image_=null,this.changed())},e.prototype.updateParams=function(t){Ce(this.params_,t),this.updateV13_(),this.image_=null,this.changed()},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Dc;this.v13_=Vk(t,"1.3")>=0},e}(rG),wAt=_At,EAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),CAt='&#169; <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors.',BAt=function(r){EAt(e,r);function e(t){var n=t||{},i=n.imageSmoothing!==void 0?n.imageSmoothing:!0;n.interpolate!==void 0&&(i=n.interpolate);var a;n.attributions!==void 0?a=n.attributions:a=[CAt];var o=n.crossOrigin!==void 0?n.crossOrigin:"anonymous",s=n.url!==void 0?n.url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png";return r.call(this,{attributions:a,attributionsCollapsible:!1,cacheSize:n.cacheSize,crossOrigin:o,interpolate:i,maxZoom:n.maxZoom!==void 0?n.maxZoom:19,opaque:n.opaque!==void 0?n.opaque:!0,reprojectionErrorThreshold:n.reprojectionErrorThreshold,tileLoadFunction:n.tileLoadFunction,transition:n.transition,url:s,wrapX:n.wrapX,zDirection:n.zDirection})||this}return e}(ZH),bAt=BAt,TAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),SAt=function(r){TAt(e,r);function e(t){var n=this,i=t||{},a=i.imageSmoothing!==void 0?i.imageSmoothing:!0;i.interpolate!==void 0&&(a=i.interpolate);var o=i.params||{},s="TRANSPARENT"in o?o.TRANSPARENT:!0;return n=r.call(this,{attributions:i.attributions,attributionsCollapsible:i.attributionsCollapsible,cacheSize:i.cacheSize,crossOrigin:i.crossOrigin,interpolate:a,opaque:!s,projection:i.projection,reprojectionErrorThreshold:i.reprojectionErrorThreshold,tileClass:i.tileClass,tileGrid:i.tileGrid,tileLoadFunction:i.tileLoadFunction,url:i.url,urls:i.urls,wrapX:i.wrapX!==void 0?i.wrapX:!0,transition:i.transition,zDirection:i.zDirection})||this,n.gutter_=i.gutter!==void 0?i.gutter:0,n.params_=o,n.v13_=!0,n.serverType_=i.serverType,n.hidpi_=i.hidpi!==void 0?i.hidpi:!0,n.tmpExtent_=Ui(),n.updateV13_(),n.setKey(n.getKeyForParams_()),n}return e.prototype.getFeatureInfoUrl=function(t,n,i,a){var o=Ve(i),s=this.getProjection(),A=this.getTileGrid();A||(A=this.getTileGridForProjection(o));var l=A.getZForResolution(n,this.zDirection),u=A.getTileCoordForCoordAndZ(t,l);if(!(A.getResolutions().length<=u[0])){var c=A.getResolution(u[0]),h=A.getTileCoordExtent(u,this.tmpExtent_),f=Wi(A.getTileSize(u[0]),this.tmpSize),d=this.gutter_;d!==0&&(f=LP(f,d,this.tmpSize),h=_o(h,c*d,h)),s&&s!==o&&(c=Vy(s,o,t,c),h=zw(h,o,s),t=ch(t,o,s));var g={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetFeatureInfo",FORMAT:"image/png",TRANSPARENT:!0,QUERY_LAYERS:this.params_.LAYERS};Ce(g,this.params_,a);var m=Math.floor((t[0]-h[0])/c),v=Math.floor((h[3]-t[1])/c);return g[this.v13_?"I":"X"]=m,g[this.v13_?"J":"Y"]=v,this.getRequestUrl_(u,f,h,1,s||o,g)}},e.prototype.getLegendUrl=function(t,n){if(this.urls[0]!==void 0){var i={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetLegendGraphic",FORMAT:"image/png"};if(n===void 0||n.LAYER===void 0){var a=this.params_.LAYERS,o=!Array.isArray(a)||a.length===1;if(!o)return;i.LAYER=a}if(t!==void 0){var s=this.getProjection()?this.getProjection().getMetersPerUnit():1,A=28e-5;i.SCALE=t*s/A}return Ce(i,n),Ug(this.urls[0],i)}},e.prototype.getGutter=function(){return this.gutter_},e.prototype.getParams=function(){return this.params_},e.prototype.getRequestUrl_=function(t,n,i,a,o,s){var A=this.urls;if(A){if(s.WIDTH=n[0],s.HEIGHT=n[1],s[this.v13_?"CRS":"SRS"]=o.getCode(),"STYLES"in this.params_||(s.STYLES=""),a!=1)switch(this.serverType_){case Qc.GEOSERVER:var l=90*a+.5|0;"FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+=";dpi:"+l:s.FORMAT_OPTIONS="dpi:"+l;break;case Qc.MAPSERVER:s.MAP_RESOLUTION=90*a;break;case Qc.CARMENTA_SERVER:case Qc.QGIS:s.DPI=90*a;break;default:Le(!1,52);break}var u=o.getAxisOrientation(),c=i;if(this.v13_&&u.substr(0,2)=="ne"){var h=void 0;h=i[0],c[0]=i[1],c[1]=h,h=i[2],c[2]=i[3],c[3]=h}s.BBOX=c.join(",");var f;if(A.length==1)f=A[0];else{var d=zc(MH(t),A.length);f=A[d]}return Ug(f,s)}},e.prototype.getTilePixelRatio=function(t){return!this.hidpi_||this.serverType_===void 0?1:t},e.prototype.getKeyForParams_=function(){var t=0,n=[];for(var i in this.params_)n[t++]=i+"-"+this.params_[i];return n.join("/")},e.prototype.updateParams=function(t){Ce(this.params_,t),this.updateV13_(),this.setKey(this.getKeyForParams_())},e.prototype.updateV13_=function(){var t=this.params_.VERSION||Dc;this.v13_=Vk(t,"1.3")>=0},e.prototype.tileUrlFunction=function(t,n,i){var a=this.getTileGrid();if(a||(a=this.getTileGridForProjection(i)),!(a.getResolutions().length<=t[0])){n!=1&&(!this.hidpi_||this.serverType_===void 0)&&(n=1);var o=a.getResolution(t[0]),s=a.getTileCoordExtent(t,this.tmpExtent_),A=Wi(a.getTileSize(t[0]),this.tmpSize),l=this.gutter_;l!==0&&(A=LP(A,l,this.tmpSize),s=_o(s,o*l,s)),n!=1&&(A=p8(A,n,this.tmpSize));var u={SERVICE:"WMS",VERSION:Dc,REQUEST:"GetMap",FORMAT:"image/png",TRANSPARENT:!0};return Ce(u,this.params_),this.getRequestUrl_(t,A,s,n,i,u)}},e}(YC),xAt=SAt,e1={KVP:"KVP",REST:"REST"},IAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),LAt=function(r){IAt(e,r);function e(t){var n=r.call(this,{extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes})||this;return n.matrixIds_=t.matrixIds,n}return e.prototype.getMatrixId=function(t){return this.matrixIds_[t]},e.prototype.getMatrixIds=function(){return this.matrixIds_},e}(sR),Nx=LAt,OAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),FAt=function(r){OAt(e,r);function e(t){var n=this,i=t.imageSmoothing!==void 0?t.imageSmoothing:!0;t.interpolate!==void 0&&(i=t.interpolate);var a=t.requestEncoding!==void 0?t.requestEncoding:e1.KVP,o=t.tileGrid,s=t.urls;return s===void 0&&t.url!==void 0&&(s=XH(t.url)),n=r.call(this,{attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,interpolate:i,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:s,wrapX:t.wrapX!==void 0?t.wrapX:!1,transition:t.transition,zDirection:t.zDirection})||this,n.version_=t.version!==void 0?t.version:"1.0.0",n.format_=t.format!==void 0?t.format:"image/jpeg",n.dimensions_=t.dimensions!==void 0?t.dimensions:{},n.layer_=t.layer,n.matrixSet_=t.matrixSet,n.style_=t.style,n.requestEncoding_=a,n.setKey(n.getKeyForDimensions_()),s&&s.length>0&&(n.tileUrlFunction=hE(s.map(n.createFromWMTSTemplate.bind(n)))),n}return e.prototype.setUrls=function(t){this.urls=t;var n=t.join(`
`);this.setTileUrlFunction(hE(t.map(this.createFromWMTSTemplate.bind(this))),n)},e.prototype.getDimensions=function(){return this.dimensions_},e.prototype.getFormat=function(){return this.format_},e.prototype.getLayer=function(){return this.layer_},e.prototype.getMatrixSet=function(){return this.matrixSet_},e.prototype.getRequestEncoding=function(){return this.requestEncoding_},e.prototype.getStyle=function(){return this.style_},e.prototype.getVersion=function(){return this.version_},e.prototype.getKeyForDimensions_=function(){var t=0,n=[];for(var i in this.dimensions_)n[t++]=i+"-"+this.dimensions_[i];return n.join("/")},e.prototype.updateDimensions=function(t){Ce(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())},e.prototype.createFromWMTSTemplate=function(t){var n=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};n==e1.KVP&&Ce(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t=n==e1.KVP?Ug(t,i):t.replace(/\{(\w+?)\}/g,function(s,A){return A.toLowerCase()in i?i[A.toLowerCase()]:s});var a=this.tileGrid,o=this.dimensions_;return function(s,A,l){if(s){var u={TileMatrix:a.getMatrixId(s[0]),TileCol:s[1],TileRow:s[2]};Ce(u,o);var c=t;return n==e1.KVP?c=Ug(c,u):c=c.replace(/\{(\w+?)\}/g,function(h,f){return u[f]}),c}else return}},e}(YC),nG=FAt;window.ol&&!ol.ext&&(ol.ext={});var Qr=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r};window.ol&&(ol.inherits||(ol.inherits=Qr));window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach);window.Element&&!Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});function qC(r){const e=r.frameState,t=tv(r.inversePixelTransform.slice(),e.coordinateToPixelTransform);return new VF(r.context,e.pixelRatio,e.extent,t,e.viewState.rotation)}window.ol&&(ol.util?ol.util.VERSION||(ol.util.VERSION=ol.VERSION||"6.1.0"):ol.util={VERSION:ol.VERSION||"5.3.0"});var Aw=Tk.split(".");Aw=parseInt(Aw[0])*100+parseInt(Aw[1]);var Px=function(r,e){var t=r.frameState.pixelRatio;if(Aw>605&&t!==1&&e.getImage()instanceof L0){e=e.clone();var n=e.getImage();n.setScale(n.getScale()*t);var i=n.getAnchor();if(n.setDisplacement){var a=n.getDisplacement();a&&(a[0]-=i[0]/t,a[1]+=i[1]/t,n.setAnchor([0,0]))}else i&&(i[0]/=t,i[1]/=t)}return e},Sd=function(r){var e=r||{};wl.call(this,e),this.oldcluster=new Mu,this.clusters=[],this.animation={start:!1},this.set("animationDuration",typeof e.animationDuration=="number"?e.animationDuration:700),this.set("animationMethod",e.animationMethod||Hs),this.getSource().on("change",this.saveCluster.bind(this)),this.on(["precompose","prerender"],this.animate.bind(this)),this.on(["postcompose","postrender"],this.postanimate.bind(this))};Qr(Sd,wl);Sd.prototype.saveCluster=function(){if(this.oldcluster){if(this.oldcluster.clear(),!this.get("animationDuration"))return;var r=this.getSource().getFeatures();r.length&&r[0].get("features")&&(this.oldcluster.addFeatures(this.clusters),this.clusters=r.slice(0),this.sourceChanged=!0)}};Sd.prototype.getClusterForFeature=function(r,e){for(var t=0,n;n=e[t];t++){var i=n.get("features");if(i&&i.length){for(var a=0,o;o=i[a];a++)if(r===o)return n}}return!1};Sd.prototype.stopAnimation=function(){this.animation.start=!1,this.animation.cA=[],this.animation.cB=[]};Sd.prototype.animate=function(r){var e=this.get("animationDuration");if(e){var t=r.frameState.viewState.resolution,n,i,a=this.animation,o=r.frameState.time;if(a.resolution!=t&&this.sourceChanged){var s=r.frameState.extent;for(a.resolution<t?(s=_o(s,100*t),a.cA=this.oldcluster.getFeaturesInExtent(s),a.cB=this.getSource().getFeaturesInExtent(s),a.revers=!1):(s=_o(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||qC(r),c=(o-a.start)/e;c>1&&(this.stopAnimation(),c=1),c=this.get("animationMethod")(c);var h=this.getStyle(),f=typeof h=="function"?h:h.length?function(){return h}:function(){return[h]};for(r.context.save(),r.context.globalAlpha=this.getOpacity(),n=0,l;l=a.clusters[n];n++){var d=l.f.getGeometry().getCoordinates(),g=d[0]-l.pt[0],m=d[1]-l.pt[1];a.revers?(d[0]=l.pt[0]+c*g,d[1]=l.pt[1]+c*m):(d[0]=d[0]-c*g,d[1]=d[1]-c*m);var v=f(l.f,t,!0);if(v.length||(v=[v]),l.f.get("features").length===1&&!g&&!m)A=l.f.get("features")[0];else{var y=new xr(d);A=new _r(y)}for(var w=0,C;C=v[w];w++)if(C.getText()&&/\n/.test(C.getText().getText())){var O=C.getText().getOffsetX(),F=C.getText().getOffsetY(),I=C.getText().getRotation()||0,T=Number((C.getText().getFont()||"10px").match(/\d+/))*1.2,L=C.getText().getText().split(`
`),N,x=L.length-1,S=C.clone();L.forEach(function(P,U){switch(U==1&&(S.setImage(),S.setFill(),S.setStroke()),C.getText().getTextBaseline()){case"alphabetic":case"ideographic":case"bottom":{N=x;break}case"hanging":case"top":{N=0;break}default:{N=x/2;break}}S.getText().setOffsetX(O-Math.sin(I)*T*(U-N)),S.getText().setOffsetY(F+Math.cos(I)*T*(U-N)),S.getText().setText(P),u.drawFeature(A,Px(r,S))})}else u.drawFeature(A,Px(r,C))}r.context.restore(),r.frameState.animate=!0,r.context.save(),r.context.beginPath(),r.context.rect(0,0,0,0),r.context.clip(),this.clip_=!0}}};Sd.prototype.postanimate=function(r){this.clip_&&(r.context.restore(),this.clip_=!1)};const RAt={extends:Td,name:"ol-animated-clusterlayer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=qe(()=>new Sd(CA(Jn({},t),{source:new JH({distance:t.distance,geometryFunction:o=>o.getGeometry()})}))),i=qe(()=>n.value.getSource());return ye(t,()=>{n.value.setProperties(t),n.value.changed()}),cr(()=>{e.addLayer(n.value),n.value.changed(),e.changed()}),pr(()=>{e.removeLayer(n.value)}),Dr("vectorLayer",i),Dr("stylable",n),{vectorLayer:n,map:e}},props:{animationDuration:{type:Number,default:700},distance:{type:Number,default:20},animationMethod:{type:Function,default:Hs},updateWhileAnimating:{type:Boolean,default:!1},updateWhileInteracting:{type:Boolean,default:!1}}};function MAt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Ux=me(RAt,[["render",MAt]]),jA=new Uint8Array(4),NAt=function(){function r(e,t){this.helper_=e;var n=e.getGL();this.texture_=n.createTexture(),this.framebuffer_=n.createFramebuffer(),this.size_=t||[1,1],this.data_=new Uint8Array(0),this.dataCacheDirty_=!0,this.updateSize_()}return r.prototype.setSize=function(e){Fu(e,this.size_)||(this.size_[0]=e[0],this.size_[1]=e[1],this.updateSize_())},r.prototype.getSize=function(){return this.size_},r.prototype.clearCachedData=function(){this.dataCacheDirty_=!0},r.prototype.readAll=function(){if(this.dataCacheDirty_){var e=this.size_,t=this.helper_.getGL();t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.readPixels(0,0,e[0],e[1],t.RGBA,t.UNSIGNED_BYTE,this.data_),this.dataCacheDirty_=!1}return this.data_},r.prototype.readPixel=function(e,t){if(e<0||t<0||e>this.size_[0]||t>=this.size_[1])return jA[0]=0,jA[1]=0,jA[2]=0,jA[3]=0,jA;this.readAll();var n=Math.floor(e)+(this.size_[1]-Math.floor(t)-1)*this.size_[0];return jA[0]=this.data_[n*4],jA[1]=this.data_[n*4+1],jA[2]=this.data_[n*4+2],jA[3]=this.data_[n*4+3],jA},r.prototype.getTexture=function(){return this.texture_},r.prototype.getFramebuffer=function(){return this.framebuffer_},r.prototype.updateSize_=function(){var e=this.size_,t=this.helper_.getGL();this.texture_=this.helper_.createTexture(e,null,this.texture_),t.bindFramebuffer(t.FRAMEBUFFER,this.framebuffer_),t.viewport(0,0,e[0],e[1]),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,this.texture_,0),this.data_=new Uint8Array(e[0]*e[1]*4)},r}(),PAt=NAt;function UAt(){var r='var e="function"==typeof Object.assign?Object.assign:function(e,n){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),r=1,o=arguments.length;r<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 DAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),QAt=function(r){DAt(e,r);function e(t,n){var i=this,a=n.uniforms||{},o=Si();a[Qp.PROJECTION_MATRIX]=o,i=r.call(this,t,{uniforms:a,postProcesses:n.postProcesses})||this,i.ready=!1,i.sourceRevision_=-1,i.verticesBuffer_=new oy(jy,aw),i.hitVerticesBuffer_=new oy(jy,aw),i.indicesBuffer_=new oy(VC,aw),i.vertexShader_=n.vertexShader,i.fragmentShader_=n.fragmentShader,i.program_,i.hitDetectionEnabled_=!!(n.hitFragmentShader&&n.hitVertexShader),i.hitVertexShader_=n.hitVertexShader,i.hitFragmentShader_=n.hitFragmentShader,i.hitProgram_;var s=n.attributes?n.attributes.map(function(l){return{name:"a_"+l.name,size:1,type:Ms.FLOAT}}):[];i.attributes=[{name:"a_position",size:2,type:Ms.FLOAT},{name:"a_index",size:1,type:Ms.FLOAT}].concat(s),i.hitDetectionAttributes=[{name:"a_position",size:2,type:Ms.FLOAT},{name:"a_index",size:1,type:Ms.FLOAT},{name:"a_hitColor",size:4,type:Ms.FLOAT},{name:"a_featureUid",size:1,type:Ms.FLOAT}].concat(s),i.customAttributes=n.attributes?n.attributes:[],i.previousExtent_=Ui(),i.currentTransform_=o,i.renderTransform_=Si(),i.invertRenderTransform_=Si(),i.renderInstructions_=new Float32Array(0),i.hitRenderInstructions_=new Float32Array(0),i.hitRenderTarget_,i.generateBuffersRun_=0,i.worker_=UAt(),i.worker_.addEventListener("message",function(l){var u=l.data;if(u.type===Zb.GENERATE_BUFFERS){var c=u.projectionTransform;u.hitDetection?(this.hitVerticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.hitVerticesBuffer_)):(this.verticesBuffer_.fromArrayBuffer(u.vertexBuffer),this.helper.flushBufferData(this.verticesBuffer_)),this.indicesBuffer_.fromArrayBuffer(u.indexBuffer),this.helper.flushBufferData(this.indicesBuffer_),this.renderTransform_=c,y0(this.invertRenderTransform_,this.renderTransform_),u.hitDetection?this.hitRenderInstructions_=new Float32Array(l.data.renderInstructions):(this.renderInstructions_=new Float32Array(l.data.renderInstructions),u.generateBuffersRun===this.generateBuffersRun_&&(this.ready=!0)),this.getLayer().changed()}}.bind(i)),i.featureCache_={},i.featureCount_=0;var A=i.getLayer().getSource();return i.sourceListenKeys_=[je(A,Vi.ADDFEATURE,i.handleSourceFeatureAdded_,i),je(A,Vi.CHANGEFEATURE,i.handleSourceFeatureChanged_,i),je(A,Vi.REMOVEFEATURE,i.handleSourceFeatureDelete_,i),je(A,Vi.CLEAR,i.handleSourceFeatureClear_,i)],A.forEachFeature(function(l){this.featureCache_[Ee(l)]={feature:l,properties:l.getProperties(),geometry:l.getGeometry()},this.featureCount_++}.bind(i)),i}return e.prototype.afterHelperCreated=function(){this.program_=this.helper.getProgram(this.fragmentShader_,this.vertexShader_),this.hitDetectionEnabled_&&(this.hitProgram_=this.helper.getProgram(this.hitFragmentShader_,this.hitVertexShader_),this.hitRenderTarget_=new PAt(this.helper))},e.prototype.handleSourceFeatureAdded_=function(t){var n=t.feature;this.featureCache_[Ee(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()},this.featureCount_++},e.prototype.handleSourceFeatureChanged_=function(t){var n=t.feature;this.featureCache_[Ee(n)]={feature:n,properties:n.getProperties(),geometry:n.getGeometry()}},e.prototype.handleSourceFeatureDelete_=function(t){var n=t.feature;delete this.featureCache_[Ee(n)],this.featureCount_--},e.prototype.handleSourceFeatureClear_=function(){this.featureCache_={},this.featureCount_=0},e.prototype.renderFrame=function(t){var n=this.helper.getGL();this.preRender(n,t);var i=this.indicesBuffer_.getSize();this.helper.drawElements(0,i),this.helper.finalizeDraw(t,this.dispatchPreComposeEvent,this.dispatchPostComposeEvent);var a=this.helper.getCanvas();return this.hitDetectionEnabled_&&(this.renderHitDetection(t),this.hitRenderTarget_.clearCachedData()),this.postRender(n,t),a},e.prototype.prepareFrameInternal=function(t){var n=this.getLayer(),i=n.getSource(),a=t.viewState,o=!t.viewHints[In.ANIMATING]&&!t.viewHints[In.INTERACTING],s=!gl(this.previousExtent_,t.extent),A=this.sourceRevision_<i.getRevision();if(A&&(this.sourceRevision_=i.getRevision()),o&&(s||A)){var l=a.projection,u=a.resolution,c=n instanceof UC?n.getRenderBuffer():0,h=_o(t.extent,c*u);i.loadFeatures(h,u,l),this.rebuildBuffers_(t),this.previousExtent_=t.extent.slice()}return this.helper.makeProjectionTransform(t,this.currentTransform_),tv(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=Si();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()!==pt.POINT)){A[0]=s.getFlatCoordinates()[0],A[1]=s.getFlatCoordinates()[1],bn(n,A),h=Zot(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 d=void 0,g=0;g<this.customAttributes.length;g++)d=this.customAttributes[g].callback(o.feature,o.properties),this.renderInstructions_[u++]=d,this.hitDetectionEnabled_&&(this.hitRenderInstructions_[c++]=d)}var m={type:Zb.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 v={type:Zb.GENERATE_BUFFERS,renderInstructions:this.hitRenderInstructions_.buffer,customAttributesCount:5+this.customAttributes.length};v.projectionTransform=n,v.hitDetection=!0,this.worker_.postMessage(v,[this.hitRenderInstructions_.buffer]),this.hitRenderInstructions_=null}},e.prototype.forEachFeatureAtCoordinate=function(t,n,i,a,o){if(Le(this.hitDetectionEnabled_,66),!!this.hitRenderInstructions_){var s=bn(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=Jot(l),c=this.hitRenderInstructions_[u],h=Math.floor(c).toString(),f=this.getLayer().getSource(),d=f.getFeatureByUid(h);if(d)return a(d,this.getLayer(),null)}},e.prototype.renderHitDetection=function(t){if(this.hitVerticesBuffer_.getSize()){this.hitRenderTarget_.setSize([Math.floor(t.size[0]/2),Math.floor(t.size[1]/2)]),this.helper.useProgram(this.hitProgram_),this.helper.prepareDrawToRenderTarget(t,this.hitRenderTarget_,!0),this.helper.bindBuffer(this.hitVerticesBuffer_),this.helper.bindBuffer(this.indicesBuffer_),this.helper.enableAttributes(this.hitDetectionAttributes);var n=this.indicesBuffer_.getSize();this.helper.drawElements(0,n)}},e.prototype.disposeInternal=function(){this.worker_.terminate(),this.layer_=null,this.sourceListenKeys_.forEach(function(t){Yr(t)}),this.sourceListenKeys_=null,r.prototype.disposeInternal.call(this)},e}(RH),iG=QAt,kAt=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 HAt(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=ve(A,t,ue.NUMBER_ARRAY|ue.NUMBER),u=ve(A,a,ue.NUMBER_ARRAY),c=ve(A,i,ue.NUMBER_ARRAY),h=ve(A,s,ue.NUMBER),f={inFragmentShader:!0,variables:A.variables,attributes:[],stringLiteralsMap:A.stringLiteralsMap,functions:{}},d=ve(f,n,ue.COLOR),g=ve(f,o,ue.NUMBER),m="1.0",v="vec2(".concat(ve(f,t,ue.NUMBER_ARRAY|ue.NUMBER),").x");switch(e.symbolType){case"square":break;case"image":break;case"circle":m="(1.0-smoothstep(1.-4./".concat(v,",1.,dot(v_quadCoord-.5,v_quadCoord-.5)*4.))");break;case"triangle":var y="(v_quadCoord*2.-1.)",w="(atan(".concat(y,".x,").concat(y,".y))");m="(1.0-smoothstep(.5-3./".concat(v,",.5,cos(floor(.5+").concat(w,"/2.094395102)*2.094395102-").concat(w,")*length(").concat(y,")))");break;default:throw new Error("Unexpected symbol type: "+e.symbolType)}var C=new kAt().setSizeExpression("vec2(".concat(l,")")).setRotationExpression(h).setSymbolOffsetExpression(u).setTextureCoordinateExpression(c).setSymbolRotateWithView(!!e.rotateWithView).setColorExpression("vec4(".concat(d,".rgb, ").concat(d,".a * ").concat(g," * ").concat(m,")"));if(r.filter){var O=ve(f,r.filter,ue.BOOLEAN);C.setFragmentDiscardExpression("!".concat(O))}var F={};if(f.variables.forEach(function(T){var L=oR(T);C.addUniform("float ".concat(L)),F[L]=function(){if(!r.variables||r.variables[T]===void 0)throw new Error("The following variable is missing from the style: ".concat(T));var N=r.variables[T];return typeof N=="string"&&(N=cE(A,N)),N!==void 0?N:-9999999}}),e.symbolType==="image"&&e.src){var I=new Image;I.crossOrigin=e.crossOrigin===void 0?"anonymous":e.crossOrigin,I.src=e.src,C.addUniform("sampler2D u_texture").setColorExpression(C.getColorExpression()+" * texture2D(u_texture, v_texCoord)"),F.u_texture=I}return f.attributes.forEach(function(T){A.attributes.indexOf(T)===-1&&A.attributes.push(T),C.addVarying("v_".concat(T),"float","a_".concat(T))}),A.attributes.forEach(function(T){C.addAttribute("float a_".concat(T))}),{builder:C,attributes:A.attributes.map(function(T){return{name:T,callback:function(L,N){var x=N[T];return typeof x=="string"&&(x=cE(A,x)),x!==void 0?x:-9999999}}}),uniforms:F}}var GAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),$At=function(r){GAt(e,r);function e(t){var n=this,i=Ce({},t);return n=r.call(this,i)||this,n.parseResult_=HAt(t.style),n.styleVariables_=t.style.variables||{},n.hitDetectionDisabled_=!!t.disableHitDetection,n}return e.prototype.createRenderer=function(){return new iG(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){Ce(this.styleVariables_,t),this.changed()},e}(Cd),VAt=$At;const jAt={extends:Td,name:"ol-webglpoints-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=qe(()=>new VAt(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Dr("webglPointsLayer",n),{webglPointsLayer:n}},props:{disableHitDetection:{type:Boolean,default:!1},style:{type:Object,default:()=>({symbol:{symbolType:"circle",size:8,color:"#33AAFF",opacity:.9}})}}};function KAt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Dx=me(jAt,[["render",KAt]]),WAt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),nA={BLUR:"blur",GRADIENT:"gradient",RADIUS:"radius"},zAt=["#00f","#0ff","#0f0","#ff0","#f00"],YAt=function(r){WAt(e,r);function e(t){var n=this,i=t||{},a=Ce({},i);delete a.gradient,delete a.radius,delete a.blur,delete a.weight,n=r.call(this,a)||this,n.gradient_=null,n.addChangeListener(nA.GRADIENT,n.handleGradientChanged_),n.setGradient(i.gradient?i.gradient:zAt),n.setBlur(i.blur!==void 0?i.blur:15),n.setRadius(i.radius!==void 0?i.radius:8);var o=i.weight?i.weight:"weight";return typeof o=="string"?n.weightFunction_=function(s){return s.get(o)}:n.weightFunction_=o,n.setRenderOrder(null),n}return e.prototype.getBlur=function(){return this.get(nA.BLUR)},e.prototype.getGradient=function(){return this.get(nA.GRADIENT)},e.prototype.getRadius=function(){return this.get(nA.RADIUS)},e.prototype.handleGradientChanged_=function(){this.gradient_=XAt(this.getGradient())},e.prototype.setBlur=function(t){this.set(nA.BLUR,t)},e.prototype.setGradient=function(t){this.set(nA.GRADIENT,t)},e.prototype.setRadius=function(t){this.set(nA.RADIUS,t)},e.prototype.createRenderer=function(){return new iG(this,{className:this.getClassName(),attributes:[{name:"weight",callback:function(t){var n=this.weightFunction_(t);return n!==void 0?Un(n,0,1):1}.bind(this)}],vertexShader:`
precision mediump float;
uniform mat4 u_projectionMatrix;
uniform mat4 u_offsetScaleMatrix;
uniform float u_size;
attribute vec2 a_position;
attribute float a_index;
attribute float a_weight;
varying vec2 v_texCoord;
varying float v_weight;
void main(void) {
mat4 offsetMatrix = u_offsetScaleMatrix;
float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;
float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;
vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);
gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;
float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;
float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;
v_texCoord = vec2(u, v);
v_weight = a_weight;
}`,fragmentShader:`
precision mediump float;
uniform float u_blurSlope;
varying vec2 v_texCoord;
varying float v_weight;
void main(void) {
vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);
float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;
float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;
float alpha = smoothstep(0.0, 1.0, value) * v_weight;
gl_FragColor = vec4(alpha, alpha, alpha, alpha);
}`,hitVertexShader:`
precision mediump float;
uniform mat4 u_projectionMatrix;
uniform mat4 u_offsetScaleMatrix;
uniform float u_size;
attribute vec2 a_position;
attribute float a_index;
attribute float a_weight;
attribute vec4 a_hitColor;
varying vec2 v_texCoord;
varying float v_weight;
varying vec4 v_hitColor;
void main(void) {
mat4 offsetMatrix = u_offsetScaleMatrix;
float offsetX = a_index == 0.0 || a_index == 3.0 ? -u_size / 2.0 : u_size / 2.0;
float offsetY = a_index == 0.0 || a_index == 1.0 ? -u_size / 2.0 : u_size / 2.0;
vec4 offsets = offsetMatrix * vec4(offsetX, offsetY, 0.0, 0.0);
gl_Position = u_projectionMatrix * vec4(a_position, 0.0, 1.0) + offsets;
float u = a_index == 0.0 || a_index == 3.0 ? 0.0 : 1.0;
float v = a_index == 0.0 || a_index == 1.0 ? 0.0 : 1.0;
v_texCoord = vec2(u, v);
v_hitColor = a_hitColor;
v_weight = a_weight;
}`,hitFragmentShader:`
precision mediump float;
uniform float u_blurSlope;
varying vec2 v_texCoord;
varying float v_weight;
varying vec4 v_hitColor;
void main(void) {
vec2 texCoord = v_texCoord * 2.0 - vec2(1.0, 1.0);
float sqRadius = texCoord.x * texCoord.x + texCoord.y * texCoord.y;
float value = (1.0 - sqrt(sqRadius)) * u_blurSlope;
float alpha = smoothstep(0.0, 1.0, value) * v_weight;
if (alpha < 0.05) {
discard;
}
gl_FragColor = v_hitColor;
}`,uniforms:{u_size:function(){return(this.get(nA.RADIUS)+this.get(nA.BLUR))*2}.bind(this),u_blurSlope:function(){return this.get(nA.RADIUS)/Math.max(1,this.get(nA.BLUR))}.bind(this)},postProcesses:[{fragmentShader:`
precision mediump float;
uniform sampler2D u_image;
uniform sampler2D u_gradientTexture;
uniform float u_opacity;
varying vec2 v_texCoord;
void main() {
vec4 color = texture2D(u_image, v_texCoord);
gl_FragColor.a = color.a * u_opacity;
gl_FragColor.rgb = texture2D(u_gradientTexture, vec2(0.5, color.a)).rgb;
gl_FragColor.rgb *= gl_FragColor.a;
}`,uniforms:{u_gradientTexture:function(){return this.gradient_}.bind(this),u_opacity:function(){return this.getOpacity()}.bind(this)}}]})},e.prototype.renderDeclutter=function(){},e}(UC);function XAt(r){for(var e=1,t=256,n=wo(e,t),i=n.createLinearGradient(0,0,e,t),a=1/(r.length-1),o=0,s=r.length;o<s;++o)i.addColorStop(o*a,r[o]);return n.fillStyle=i,n.fillRect(0,0,e,t),n.canvas}var aG=YAt;const qAt={extends:Td,name:"ol-heatmap-layer",setup(r){const e=Be("map"),{properties:t}=Or(r),n=qe(()=>new aG(t));return ye(t,()=>{n.value.setProperties(t)}),cr(()=>{e.addLayer(n.value)}),pr(()=>{e.removeLayer(n.value)}),Dr("heatmapLayer",n),Dr("stylable",n),{heatmapLayer:n}},props:{weight:{type:Function},extent:{type:Array},blur:{type:Number},radius:{type:Number}}};function ZAt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Qx=me(qAt,[["render",ZAt]]);function fE(r){fE.installed||(fE.installed=!0,r.component(Ox.name,Ox),r.component(Fx.name,Fx),r.component(Rx.name,Rx),r.component(Mx.name,Mx),r.component(Ux.name,Ux),r.component(Dx.name,Dx),r.component(Qx.name,Qx))}var JAt=Object.freeze(Object.defineProperty({__proto__:null,default:fE,install:fE,TileLayer:Ox,WebGLTileLayer:Fx,ImageLayer:Rx,VectorLayer:Mx,AnimatedClusterLayer:Ux,WebglPointsLayer:Dx,HeatmapLayer:Qx},Symbol.toStringTag,{value:"Module"}));const tlt={name:"ol-source-xyz",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new ZH(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{attributions:{type:[String,Array]},url:{type:String},cacheSize:{type:Number,default:2048},crossOrigin:{type:String},maxZoom:{type:Number,default:28},minZoom:{type:Number,default:0},opaque:{type:Boolean},projection:{type:String,default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},tileSize:{type:Array,default:()=>[256,256]},tilePixelRatio:{type:Number,default:1},tileKey:{type:String},transition:{type:Number},tileGrid:{type:Object}}};function elt(r,e,t,n,i,a){return Mr("",!0)}var kx=me(tlt,[["render",elt]]);const rlt={name:"ol-source-osm",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new bAt(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{attributions:{type:String},cacheSize:{type:Number,default:2048},crossOrigin:{type:String,default:"anonymous"},imageSmoothing:{type:Boolean,default:!0},minZoom:{type:Number,default:0},maxZoom:{type:Number,default:19},opaque:{type:Boolean,default:!0},reprojectionErrorThreshold:{type:Number,default:.5},transition:{type:Number,default:250},url:{type:String,default:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png"},wrapX:{type:Boolean,default:!0}}};function nlt(r,e,t,n,i,a){return Mr("",!0)}var Hx=me(rlt,[["render",nlt]]);const ilt={name:"ol-source-image-static",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new mAt(CA(Jn({},t),{projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection))}));let i=n();return ye(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),cr(()=>{e.setSource(i)}),pr(()=>{e.setSource(null)}),{layer:e,source:i}},props:{attributions:{type:String},crossOrigin:{type:String},imageExtent:{type:Array},projection:{type:[String,Object]},imageSmoothing:{type:Boolean,default:!0},imageSize:{type:Array},url:{type:String}}};function alt(r,e,t,n,i,a){return Mr("",!0)}var Gx=me(ilt,[["render",alt]]);const olt={name:"ol-source-wmts",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r),n=qe(()=>Ve(t.projection).getExtent()),i=qe(()=>BA(n.value)),a=qe(()=>jr(n.value)/256),o=qe(()=>{const A=new Array(t.tileZoomLevel),l=new Array(t.tileZoomLevel);for(var u=0;u<t.tileZoomLevel;++u)A[u]=a.value/Math.pow(2,u),l[u]=u;return new Nx({origin:i.value,resolutions:A,matrixIds:l})}),s=qe(()=>new nG(CA(Jn({},t),{projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection)),tileGrid:o.value})));return ye(s,()=>{e.value.setSource(s.value)}),ye(e,()=>{e.value.setSource(s.value)}),cr(()=>{e.value.setSource(s.value)}),pr(()=>{e.value.setSource(null)}),{tileLayer:e,source:s}},props:{tileZoomLevel:{type:Number,default:30},attributions:{type:String},cacheSize:{type:Number},crossOrigin:{type:String},imageSmoothing:{type:Boolean,default:!0},projection:{type:[String,Object],default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},tilePixelRatio:{type:Number,default:1},format:{type:String,default:"image/jpeg"},version:{type:String,default:"1.0.0"},matrixSet:{type:String},dimensions:{type:Object},requestEncoding:{type:String,default:"KVP"},url:{type:String},urls:{type:Array},wrapX:{type:Boolean,default:!1},transition:{type:Number},layer:{type:String},style:{type:String}}};function slt(r,e,t,n,i,a){return Mr("",!0)}var $x=me(olt,[["render",slt]]);const Alt={name:"ol-source-vector",setup(r){const e=Be("vectorLayer")||Be("heatmapLayer"),{properties:t}=Or(r);let n=qe(()=>new Mu(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),Dr("vectorSource",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},features:{type:Array,default:()=>[]},format:{type:Object},loader:{type:Function},overlaps:{type:Boolean,default:!0},projection:{type:String,default:"EPSG:3857"},strategy:{type:Function},url:{type:[String,Function]},useSpatialIndex:{type:Boolean,default:!0},wrapX:{type:Boolean,default:!0}}};function llt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Vx=me(Alt,[["render",llt]]);const ult={name:"ol-source-cluster",setup(r){const e=Be("vectorLayer"),{properties:t}=Or(r);let n=qe(()=>new JH(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value),e.value.changed()}),pr(()=>{e.value.setSource(null)}),Dr("vectorLayer",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},distance:{type:Number,default:20},geometryFunction:{type:Function,default:r=>r.getGeometry()},wrapX:{type:Boolean,default:!0}}};function clt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var jx=me(ult,[["render",clt]]);const hlt={name:"ol-source-bingmaps",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new Zst(CA(Jn({},t),{key:t.apiKey})));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{cacheSize:{type:Number},hidpi:{type:Boolean,default:!1},culture:{type:String,default:"en-us"},apiKey:{type:String},imagerySet:{type:String},imageSmoothing:{type:Boolean,default:!0},maxZoom:{type:Number,default:21},reprojectionErrorThreshold:{type:Number,default:.5},tileLoadFunction:{type:Function,default:(r,e)=>r.getImage().src=e},wrapX:{type:Boolean,default:!0},transition:{type:Number}}};function flt(r,e,t,n,i,a){return Mr("",!0)}var Kx=me(hlt,[["render",flt]]);class iu extends nG{constructor(e){iu.layerLabelMap={vec:"cva",ter:"cta",img:"cia"},iu.layerZoomMap={vec:18,ter:14,img:18};let t=e||{};t.layerType=t.layerType||"vec",t.layerType=t.isLabel?iu.layerLabelMap[t.layerType]:t.layerType,t.matrixSet=t.projection==="EPSG:4326"||t.projection==="EPSG:4490"?"c":"w",!t.url&&!t.urls&&(t.url="https://t{0-7}.tianditu.gov.cn/{layer}_{proj}/wmts?"),t.tk&&(t.url=`${t.url}tk=${t.tk}`),t.url=t.url.replace("{layer}",t.layerType).replace("{proj}",t.matrixSet);let n=t.tileGrid||iu.getTileGrid(t.projection||"EPSG:3857"),i=t.crossOrigin!==void 0?t.crossOrigin:"anonymous",a={version:t.version||"1.0.0",format:t.format||"tiles",dimensions:t.dimensions||{},layer:t.layerType,matrixSet:t.matrixSet,tileGrid:n,style:t.style||"default",cacheSize:t.cacheSize,crossOrigin:i,opaque:t.opaque===void 0?!0:t.opaque,maxZoom:iu.layerZoomMap[t.layerType],reprojectionErrorThreshold:t.reprojectionErrorThreshold,url:t.url,urls:t.urls,projection:t.projection||"EPSG:3857",wrapX:t.wrapX};t.tileProxy&&(a.tileLoadFunction=s),super(a),t.tileProxy&&(this.tileProxy=t.tileProxy);let o=this;function s(A,l){A.getImage().src=o.tileProxy+encodeURIComponent(l)}}static getTileGrid(e){return e==="EPSG:4326"||e==="EPSG:4490"?iu.default4326TileGrid():iu.default3857TileGrid()}static default4326TileGrid(){let e=[],t=[];for(let i=1;i<19;i++)e.push(.703125*2/Math.pow(2,i)),t.push(i);return new Nx({extent:[-180,-90,180,90],resolutions:e,origin:[-180,90],matrixIds:t,minZoom:1})}static default3857TileGrid(){let e=[],t=[];for(let i=1;i<19;i++)e.push(78271.51696402031*2/Math.pow(2,i)),t.push(i);return new Nx({extent:[-200375083427892e-7,-200375083427892e-7,200375083427892e-7,200375083427892e-7],resolutions:e,matrixIds:t,origin:[-200375083427892e-7,200375083427892e-7],minZoom:1})}}const dlt={name:"ol-source-tianditu",setup(r){const e=Be("tileLayer"),{properties:t}=Or(r);let n=qe(()=>new iu(t));return ye(n,()=>{e.value.setSource(n.value)}),ye(e,()=>{e.value.setSource(n.value)}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),{layer:e,source:n}},props:{layerType:{type:String,default:"img"},tk:{type:String},isLabel:{type:Boolean,default:!1},cacheSize:{type:Number},crossOrigin:{type:String},projection:{Type:String,default:"EPSG:3857"},hidpi:{type:Boolean,default:!1},requestEncoding:{type:String,default:"KVP"},format:{type:String},version:{type:String,default:"1.0.0"},culture:{type:String,default:"en-us"},matrixSet:{type:String},dimensions:{type:Object,default:()=>{}},imageSmoothing:{type:Boolean,default:!0},maxZoom:{type:Number,default:21},reprojectionErrorThreshold:{type:Number},tileLoadFunction:{type:Function,default:(r,e)=>r.getImage().src=e},wrapX:{type:Boolean,default:!0},transition:{type:Number}}};function plt(r,e,t,n,i,a){return Mr("",!0)}var Wx=me(dlt,[["render",plt]]);const glt={name:"ol-source-image-wms",setup(r){const e=Be("imageLayer"),{properties:t}=Or(r),n=()=>new wAt(CA(Jn({},t),{params:{LAYERS:r.layers,STYLES:r.styles,TIME:r.time},projection:typeof t.projection=="string"?t.projection:new Ru(Jn({},t.projection))}));let i=n();return ye(t,()=>{e.setSource(null),i=n(),e.setSource(i)}),cr(()=>{e.setSource(i)}),pr(()=>{e.setSource(null)}),{layer:e,source:i}},props:{attributions:{type:String},crossOrigin:{type:String},imageExtent:{type:Array},projection:{type:[String,Object],default:"EPSG:3857"},reprojectionErrorThreshold:{type:Number,default:.5},format:{type:String,default:"image/png"},version:{type:String,default:"1.3.0"},matrixSet:{type:String},serverType:{type:String,default:"mapserver"},imageSmoothing:{type:Boolean,default:!0},layers:{type:[String,Array],required:!0},styles:{type:[String,Array],default:""},time:{type:String},ratio:{type:Number,default:1},imageSize:{type:Array},url:{type:String},params:{type:Object},imageLoadFunction:{type:Function}}};function vlt(r,e,t,n,i,a){return Mr("",!0)}var zx=me(glt,[["render",vlt]]);const mlt={name:"ol-source-webglpoints",setup(r){const e=Be("webglPointsLayer"),{properties:t}=Or(r);let n=qe(()=>new Mu(t));const i=()=>{e.value.setSource(null),e.value.setSource(n.value),e.value.changed()};return ye(t,()=>{i()}),ye(e,()=>{i()}),cr(()=>{e.value.setSource(n.value)}),pr(()=>{e.value.setSource(null)}),Dr("vectorSource",n),{layer:e,source:n}},props:{attributions:{type:[String,Array]},features:{type:Array,default:()=>[]},format:{type:Object},loader:{type:Function},overlaps:{type:Boolean,default:!0},projection:{type:String,default:"EPSG:3857"},strategy:{type:Function},url:{type:[String,Function]},useSpatialIndex:{type:Boolean,default:!0},wrapX:{type:Boolean,default:!0}}};function ylt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Yx=me(mlt,[["render",ylt]]);function dE(r){dE.installed||(dE.installed=!0,r.component(kx.name,kx),r.component(Hx.name,Hx),r.component(Gx.name,Gx),r.component($x.name,$x),r.component(Vx.name,Vx),r.component(jx.name,jx),r.component(Kx.name,Kx),r.component(Wx.name,Wx),r.component(zx.name,zx),r.component(Yx.name,Yx))}var _lt=Object.freeze(Object.defineProperty({__proto__:null,default:dE,install:dE,SourceXYZ:kx,SourceOSM:Hx,SourceImageStatic:Gx,SourceWMTS:$x,SourceVector:Vx,SourceCluster:jx,SourceTianDiTu:Wx,SourceImageWMS:zx,SourceWebglPoints:Yx,SourceBingMaps:Kx},Symbol.toStringTag,{value:"Module"}));function Xi(r,e,t){const n=Be("map"),i=Be("controlBar",null),a=i!=null?i.value:n,{properties:o}=Or(e);let s=qe(()=>new r(Jn({},o)));return s.value.set("order",t.attrs.order==null?0:t.attrs.order),ye(s,(A,l)=>{a.removeControl&&(a.removeControl(l),a.addControl(A),n.changed())}),cr(()=>{if(a.addControl(s.value),a.controls_!=null){let A=[...a.controls_];A.sort((l,u)=>l.get("order")-u.get("order")),a.controls_=[],A.forEach(l=>{a.addControl(l)}),a.changed()}n.changed()}),pr(()=>{if(a.removeControl)a.removeControl(s.value);else{let A=a.controls_.findIndex(l=>l==s.value);a.controls_.splice(A,1),s.value.dispose()}n.changed()}),{map:n,control:s}}const wlt={name:"ol-fullscreen-control",setup(r,e){const{control:t}=Xi(G3,r,e);return{control:t}},props:{className:{type:String,default:"ol-full-screen"},label:{type:String,default:"⤢"},labelActive:{type:String,default:"×"},activeClassName:{type:String,default:"ol-full-screen-true"},inactiveClassName:{type:String,default:"ol-full-screen-false"},tipLabel:{type:String,default:"Toggle full-screen"},keys:{type:Boolean,default:!1},target:{type:Object,default:void 0},source:{type:Object,default:void 0}}};function Elt(r,e,t,n,i,a){return Mr("",!0)}var Xx=me(wlt,[["render",Elt]]);const Clt={name:"ol-mouseposition-control",setup(r,e){const{control:t}=Xi(j3,r,e);return{control:t}},props:{className:{type:String,default:"ol-mouse-position"},coordinateFormat:{type:[String,Function]},projection:{type:String},render:{type:Function},target:{type:HTMLElement},undefinedHTML:{type:String,default:"&#160;"}}};function Blt(r,e,t,n,i,a){return Mr("",!0)}var qx=me(Clt,[["render",Blt]]);const blt={name:"ol-attribution-control",setup(r,e){const{control:t}=Xi(y8,r,e);return{control:t}},props:{className:{type:String,default:"ol-attribution"},target:{type:HTMLElement},collapsible:{type:Boolean},collapsed:{type:Boolean,default:!0},tipLabel:{type:String,default:"Attributions"},label:{type:String,default:"i"},expandClassName:{type:String,default:"ol-attribution-expand"},collapseLabel:{type:String,default:"»"},collapseClassName:{type:String,default:"ol-attribution-collapse"},render:{type:Function}}};function Tlt(r,e,t,n,i,a){return Mr("",!0)}var Zx=me(blt,[["render",Tlt]]);const Slt={name:"ol-overviewmap-control",setup(r,e){const t=Be("map"),{control:n}=Xi(X3,r,e);return cr(()=>{n.value.setMap(t)}),pr(()=>{n.value.setMap(null)}),Dr("overviewMap",n),{control:n}},props:{className:{type:String,default:"ol-overviewmap"},collapsed:{type:Boolean,default:!0},collapseLabel:{type:String,default:"«"},collapsible:{type:Boolean,default:!0},label:{type:String,default:"»"},render:{type:Function},rotateWithView:{type:Boolean,default:!1},target:{type:HTMLElement},tipLabel:{type:String,default:"Overview map"}}};function xlt(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var Jx=me(Slt,[["render",xlt]]);const Ilt={name:"ol-scaleline-control",setup(r,e){const{control:t}=Xi(tZ,r,e);return{control:t}},props:{className:{type:String,default:"ol-scale-line"},minWidth:{type:Number,default:64},render:{type:Function},target:{type:HTMLElement},units:{type:String,default:"metric"},bar:{type:Boolean,default:!1},steps:{type:Number,default:4},text:{type:Boolean,default:!1},dpi:{type:Number,default:void 0}}};function Llt(r,e,t,n,i,a){return Mr("",!0)}var tI=me(Ilt,[["render",Llt]]);const Olt={name:"ol-zoom-control",setup(r,e){const{control:t}=Xi(w8,r,e);return{control:t}},props:{duration:{type:Number,default:250},className:{type:String,default:"ol-zoom"},zoomInClassName:{type:String,default:"ol-zoom-in"},zoomOutClassName:{type:String,default:"ol-zoom-out"},zoomInLabel:{type:String,default:"+"},zoomOutLabel:{type:String,default:"-"},zoomInTipLabel:{type:String,default:"Zoom in"},zoomOutTipLabel:{type:String,default:"Zoom Out"},delta:{type:Number,default:1},target:{type:HTMLElement}}};function Flt(r,e,t,n,i,a){return Mr("",!0)}var eI=me(Olt,[["render",Flt]]);const Rlt={name:"ol-zoomslider-control",setup(r,e){const{control:t}=Xi(nZ,r,e);return{control:t}},props:{duration:{type:Number,default:200},className:{type:String,default:"ol-zoomslider"},render:{type:Function}}};function Mlt(r,e,t,n,i,a){return Mr("",!0)}var rI=me(Rlt,[["render",Mlt]]);const Nlt={name:"ol-zoomtoextent-control",setup(r,e){const{control:t}=Xi(oZ,r,e);return{control:t}},props:{className:{type:String,default:"ol-zoom-extent"},target:{type:HTMLElement},label:{type:String,default:"E"},tipLabel:{type:String,default:"Fit to extent"},extent:{type:Array}}};function Plt(r,e,t,n,i,a){return Mr("",!0)}var nI=me(Nlt,[["render",Plt]]);const Ult={name:"ol-rotate-control",setup(r,e){const{control:t}=Xi(_8,r,e);return{control:t}},props:{className:{type:String,default:"ol-rotate"},label:{type:String,default:"⇧"},tipLabel:{type:String,default:"Reset rotation"},compassClassName:{type:String,default:"ol-compass"},duration:{type:Number,default:250},autoHide:{type:Boolean,default:!1},render:{type:Function},resetNorth:{type:Function},target:{type:HTMLElement}}};function Dlt(r,e,t,n,i,a){return Mr("",!0)}var T5=me(Ult,[["render",Dlt]]),oG={exports:{}},Qlt=nAt(O3);/*!
* ol-contextmenu - v4.1.0
* https://github.com/jonataswalker/ol-contextmenu
* Built: Sat Aug 15 2020 10:43:26 GMT-0300 (Brasilia Standard Time)
*/(function(r,e){(function(t,n){r.exports=n(Qlt)})(rl,function(t){function n(L){return L&&typeof L=="object"&&"default"in L?L:{default:L}}var i=n(t),a="ol-ctx-menu",o={namespace:a,container:a+"-container",separator:a+"-separator",submenu:a+"-submenu",hidden:a+"-hidden",icon:a+"-icon",zoomIn:a+"-zoom-in",zoomOut:a+"-zoom-out",unselectable:"ol-unselectable"},s=o,A="beforeopen",l="open",u="close",c="contextmenu",h={width:150,scrollAt:4,eventType:c,defaultItems:!0},f=[{text:"Zoom In",classname:o.zoomIn+" "+o.icon,callback:function(L,N){var x=N.getView();x.animate({zoom:+x.getZoom()+1,duration:700,center:L.coordinate})}},{text:"Zoom Out",classname:o.zoomOut+" "+o.icon,callback:function(L,N){var x=N.getView();x.animate({zoom:+x.getZoom()-1,duration:700,center:L.coordinate})}}];function d(L,N){if(N===void 0&&(N="Assertion failed"),!L)throw typeof Error<"u"?new Error(N):N}function g(L){return/^\d+$/.test(L)}function m(L,N){return L.classList?L.classList.contains(N):C(N).test(L.className)}function v(L,N,x){N===void 0&&(N=window.document);var S=Array.prototype.slice,P=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(L))switch(L[0]){case"#":P=[y(L.substr(1))];break;case".":P=S.call(N.getElementsByClassName(L.substr(1).replace(/\./g," ")));break;default:P=S.call(N.getElementsByTagName(L))}else P=S.call(N.querySelectorAll(L));return x?P:P[0]}function y(L){return L=L[0]==="#"?L.substr(1,L.length):L,document.getElementById(L)}function w(L){var N=document.createDocumentFragment(),x=document.createElement("div");for(x.innerHTML=L;x.firstChild;)N.appendChild(x.firstChild);return N}function C(L){return new RegExp("(^|\\s+) "+L+" (\\s+|$)")}function O(L,N,x){L.classList?L.classList.add(N):L.className=(L.className+" "+N).trim(),x&&g(x)&&window.setTimeout(function(){return F(L,N)},x)}function F(L,N,x){L.classList?L.classList.remove(N):L.className=L.className.replace(C(N)," ").trim(),x&&g(x)&&window.setTimeout(function(){return O(L,N)},x)}var I=function(L){return this.Base=L,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:L.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this.eventMapMoveHandler=this.handleMapMoveEvent.bind(this),this};I.prototype.init=function(L){this.map=L,this.viewport=L.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=this.getItemsLength()>0?this.Base.container.offsetHeight/this.getItemsLength():this.Base.Html.cloneAndGetLineHeight()},I.prototype.getItemsLength=function(){var L=this,N=0;return Object.keys(this.items).forEach(function(x){L.items[x].submenu||L.items[x].separator||N++}),N},I.prototype.getPixelClicked=function(){return this.pixelClicked},I.prototype.getCoordinateClicked=function(){return this.coordinateClicked},I.prototype.positionContainer=function(L){var N=this,x=this.Base.container,S=this.map.getSize(),P=S[1]-L[1],U=S[0]-L[0],tt=x.offsetWidth,q=Math.round(this.lineHeight*this.getItemsLength()),rt=v("li."+s.submenu+">div",x,!0);U>=tt?(x.style.right="auto",x.style.left=L[0]+5+"px"):(x.style.left="auto",x.style.right="15px"),P>=q?(x.style.bottom="auto",x.style.top=L[1]-10+"px"):(x.style.top="auto",x.style.bottom=0),function nt(At,ct,Tt){if(Array.isArray(At))At.forEach(function(Y){return nt(Y,ct,Tt)});else for(var M=Array.isArray(ct)?ct:ct.split(/\s+/),W=M.length;W--;)m(At,M[W])&&F(At,M[W],Tt)}(x,s.hidden),rt.length&&(this.submenu.lastLeft=U<2*tt?"-"+tt+"px":this.submenu.left,rt.forEach(function(nt){var At,ct,Tt,M={w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight},W=(ct=(At=nt).getBoundingClientRect(),Tt=document.documentElement,{left:ct.left+window.pageXOffset-Tt.clientLeft,top:ct.top+window.pageYOffset-Tt.clientTop,width:At.offsetWidth,height:At.offsetHeight}),Y=W.height,H=P-Y;H<0&&(H=Y-(M.h-W.top),nt.style.top="-"+H+"px"),nt.style.left=N.submenu.lastLeft}))},I.prototype.openMenu=function(L,N){this.Base.dispatchEvent({type:l,pixel:L,coordinate:N}),this.opened=!0,this.positionContainer(L)},I.prototype.closeMenu=function(){this.opened=!1,function L(N,x,S){if(Array.isArray(N))N.forEach(function(tt){return L(tt,x)});else for(var P=Array.isArray(x)?x:x.split(/\s+/),U=P.length;U--;)m(N,P[U])||O(N,P[U],S)}(this.Base.container,s.hidden),this.Base.dispatchEvent({type:u})},I.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.on("movestart",this.eventMapMoveHandler)},I.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1),this.map.un("movestart",this.eventMapMoveHandler)},I.prototype.handleEvent=function(L){var N=this;this.coordinateClicked=this.map.getEventCoordinate(L),this.pixelClicked=this.map.getEventPixel(L),this.Base.dispatchEvent({type:A,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===c&&(L.stopPropagation(),L.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),L.target.addEventListener("pointerdown",{handleEvent:function(x){N.opened&&(N.closeMenu(),x.stopPropagation(),L.target.removeEventListener(x.type,this,!1))}},!1))},I.prototype.handleMapMoveEvent=function(L){this.closeMenu()},I.prototype.setItemListener=function(L,N){var x,S=this;L&&typeof this.items[N].callback=="function"&&(x=this.items[N].callback,L.addEventListener("click",function(P){P.preventDefault();var U={coordinate:S.getCoordinateClicked(),data:S.items[N].data||null};S.closeMenu(),x(U,S.map)},!1))};var T=function(L){return this.Base=L,this.Base.container=this.container=this.createContainer(!0),this};return T.prototype.createContainer=function(L){var N=document.createElement("div"),x=document.createElement("ul"),S=[s.container,s.unselectable];return L&&S.push(s.hidden),N.className=S.join(" "),N.style.width=parseInt(this.Base.options.width,10)+"px",N.appendChild(x),N},T.prototype.createMenu=function(){var L=[];if("items"in this.Base.options?L=this.Base.options.defaultItems?this.Base.options.items.concat(f):this.Base.options.items:this.Base.options.defaultItems&&(L=f),L.length===0)return!1;L.forEach(this.addMenuEntry,this)},T.prototype.addMenuEntry=function(L){var N,x=this;if(L.items&&Array.isArray(L.items)){L.classname=L.classname||"",N=s.submenu,~L.classname.indexOf(N)||(L.classname=L.classname.length?" "+s.submenu:s.submenu);var S=this.generateHtmlAndPublish(this.container,L),P=this.createContainer();P.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,S.appendChild(P),L.items.forEach(function(U){x.generateHtmlAndPublish(P,U,!0)})}else this.generateHtmlAndPublish(this.container,L)},T.prototype.generateHtmlAndPublish=function(L,N,x){var S,P,U="_"+Math.random().toString(36).substr(2,9),tt=!1;return typeof N=="string"&&N.trim()==="-"?(S=w('<li id="'+U+'" class="'+s.separator+'"><hr></li>'),P=[].slice.call(S.childNodes,0)[0],L.firstChild.appendChild(S),tt=!0):(N.classname=N.classname||"",S=w("<span>"+N.text+"</span>"),P=document.createElement("li"),N.icon&&(N.classname===""?N.classname=s.icon:N.classname.indexOf(s.icon)===-1&&(N.classname+=" "+s.icon),P.setAttribute("style","background-image:url("+N.icon+")")),P.id=U,P.className=N.classname,P.appendChild(S),L.firstChild.appendChild(P)),this.Base.Internal.items[U]={id:U,submenu:x||0,separator:tt,callback:N.callback,data:N.data||null},this.Base.Internal.setItemListener(P,U),P},T.prototype.removeMenuEntry=function(L){var N=v("#"+L,this.container.firstChild);N&&this.container.firstChild.removeChild(N),delete this.Base.Internal.items[L]},T.prototype.cloneAndGetLineHeight=function(){var L=this.container.cloneNode(),N=w("<span>Foo</span>"),x=w("<span>Foo</span>"),S=document.createElement("li"),P=document.createElement("li");S.appendChild(N),P.appendChild(x),L.appendChild(S),L.appendChild(P),this.container.parentNode.appendChild(L);var U=L.offsetHeight/2;return this.container.parentNode.removeChild(L),U},function(L){function N(x){x===void 0&&(x={}),d(typeof x=="object","@param `opt_options` should be object type!"),this.options=function(S,P){var U={};for(var tt in S)U[tt]=S[tt];for(var q in P)U[q]=P[q];return U}(h,x),this.disabled=!1,this.Internal=new I(this),this.Html=new T(this),L.call(this,{element:this.container})}return L&&(N.__proto__=L),N.prototype=Object.create(L&&L.prototype),N.prototype.constructor=N,N.prototype.clear=function(){Object.keys(this.Internal.items).forEach(this.Html.removeMenuEntry,this.Html)},N.prototype.close=function(){this.Internal.closeMenu()},N.prototype.enable=function(){this.disabled=!1},N.prototype.disable=function(){this.disabled=!0},N.prototype.getDefaultItems=function(){return f},N.prototype.countItems=function(){return Object.keys(this.Internal.items).length},N.prototype.extend=function(x){d(Array.isArray(x),"@param `arr` should be an Array."),x.forEach(this.push,this)},N.prototype.isOpen=function(){return this.Internal.opened},N.prototype.updatePosition=function(x){d(Array.isArray(x),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(x)},N.prototype.pop=function(){var x=Object.keys(this.Internal.items);this.Html.removeMenuEntry(x[x.length-1])},N.prototype.push=function(x){d(x!=null,"@param `item` must be informed."),this.Html.addMenuEntry(x)},N.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},N.prototype.setMap=function(x){L.prototype.setMap.call(this,x),x?this.Internal.init(x,this):this.Internal.removeListeners()},N}(i.default)})})(oG);var klt=oG.exports;const Hlt={name:"ol-context-menu",setup(r,e){const{control:t}=Xi(klt,r,e);return{control:t}},props:{eventType:{type:String,default:"contextmenu"},defaultItems:{type:Boolean,default:!0},width:{type:Number,default:150},items:{type:Array,default:()=>[]}}};function Glt(r,e,t,n,i,a){return Mr("",!0)}var iI=me(Hlt,[["render",Glt]]),jo=function(r){r=r||{};var e=document.createElement("button"),t=document.createElement("div");t.className=(r.className||"ol-swipe")+" ol-unselectable ol-control",t.appendChild(e),t.addEventListener("mousedown",this.move.bind(this)),t.addEventListener("touchstart",this.move.bind(this)),Nr.call(this,{element:t}),this.precomposeRight_=this.precomposeRight.bind(this),this.precomposeLeft_=this.precomposeLeft.bind(this),this.postcompose_=this.postcompose.bind(this),this.layers=[],r.layers&&this.addLayer(r.layers,!1),r.rightLayers&&this.addLayer(r.rightLayers,!0),this.on("propertychange",function(n){if(this.getMap())try{this.getMap().renderSync()}catch{}this.get("orientation")==="horizontal"?(this.element.style.top=this.get("position")*100+"%",this.element.style.left=""):(this.get("orientation")!=="vertical"&&this.set("orientation","vertical"),this.element.style.left=this.get("position")*100+"%",this.element.style.top=""),n.key==="orientation"&&(this.element.classList.remove("horizontal","vertical"),this.element.classList.add(this.get("orientation"))),this.isMoving||this.layers.forEach(function(i){i.layer.getImageRatio&&i.layer.changed()})}.bind(this)),this.set("position",r.position||.5),this.set("orientation",r.orientation||"vertical")};Qr(jo,Nr);jo.prototype.setMap=function(r){var e,t;if(this.getMap()){for(e=0;e<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(Nr.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{}}};jo.prototype.isLayer_=function(r){for(var e=0;e<this.layers.length;e++)if(this.layers[e].layer===r)return e;return-1};jo.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{}}}};jo.prototype.removeLayers=function(){var r=[];this.layers.forEach(function(e){r.push(e.layer)}),this.removeLayer(r)};jo.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{}};jo.prototype.getRectangle=function(){var r;return this.get("orientation")==="vertical"?(r=this.getMap().getSize(),[0,0,r[0]*this.get("position"),r[1]]):(r=this.getMap().getSize(),[0,0,r[0],r[1]*this.get("position")])};jo.prototype.move=function(r){var e=this,t;switch(this._movefn||(this._movefn=this.move.bind(this)),r.type){case"touchcancel":case"touchend":case"mouseup":{e.isMoving=!1,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(s){document.removeEventListener(s,e._movefn)}),this.layers.forEach(function(s){s.layer.getImageRatio&&s.layer.changed()});break}case"mousedown":case"touchstart":e.isMoving=!0,["mouseup","mousemove","touchend","touchcancel","touchmove"].forEach(function(s){document.addEventListener(s,e._movefn)});case"mousemove":case"touchmove":{if(e.isMoving)if(e.get("orientation")==="vertical"){var n=r.pageX||r.touches&&r.touches.length&&r.touches[0].pageX||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageX;if(!n)break;n-=e.getMap().getTargetElement().getBoundingClientRect().left+window.pageXOffset-document.documentElement.clientLeft,t=e.getMap().getSize()[0];var i=t-Math.min(Math.max(0,t-n),t);t=i/t,e.set("position",t),e.dispatchEvent({type:"moving",size:[i,e.getMap().getSize()[1]],position:[t,0]})}else{var a=r.pageY||r.touches&&r.touches.length&&r.touches[0].pageY||r.changedTouches&&r.changedTouches.length&&r.changedTouches[0].pageY;if(!a)break;a-=e.getMap().getTargetElement().getBoundingClientRect().top+window.pageYOffset-document.documentElement.clientTop,t=e.getMap().getSize()[1];var o=t-Math.min(Math.max(0,t-a),t);t=o/t,e.set("position",t),e.dispatchEvent({type:"moving",size:[e.getMap().getSize()[0],o],position:[0,t]})}break}}};jo.prototype._transformPt=function(r,e){var t=r.inversePixelTransform,n=e[0],i=e[1];return e[0]=t[0]*n+t[2]*i+t[4],e[1]=t[1]*n+t[3]*i+t[5],e};jo.prototype._drawRect=function(r,e){var t=r.inversePixelTransform;if(t){var n=[[e[0][0],e[0][1]],[e[0][0],e[1][1]],[e[1][0],e[1][1]],[e[1][0],e[0][1]],[e[0][0],e[0][1]]];if(r.context.save(),r.target.getImageRatio){var i=-Math.atan2(r.frameState.pixelToCoordinateTransform[1],r.frameState.pixelToCoordinateTransform[0]);r.context.translate(r.frameState.size[0]/2,r.frameState.size[1]/2),r.context.rotate(i),r.context.translate(-r.frameState.size[0]/2,-r.frameState.size[1]/2)}n.forEach(function(o,s){o=[o[0]*t[0]-o[1]*t[1]+t[4],-o[0]*t[2]+o[1]*t[3]+t[5]],s?r.context.lineTo(o[0],o[1]):r.context.moveTo(o[0],o[1])}),r.context.restore()}else{var a=r.frameState.pixelRatio;r.context.rect(e[0][0]*a,e[0][1]*a,e[1][0]*a,e[1][1]*a)}};jo.prototype.precomposeLeft=function(r){var e=r.context;if(e instanceof WebGLRenderingContext){if(r.type==="prerender"){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var t=this.getMap().getSize(),n=this._transformPt(r,[0,t[1]]),i=this._transformPt(r,[t[0],0]),a=i[0]-n[0],o=i[1]-n[1];this.get("orientation")==="vertical"?a=Math.round(a*this.get("position")):(o=Math.round(o*this.get("position")),n[1]+=t[1]-o),e.scissor(n[0],n[1],a,o)}}else{var s=r.frameState.size;e.save(),e.beginPath();var A=[[0,0],[s[0],s[1]]];this.get("orientation")==="vertical"?A[1]=[s[0]*.5+this.getMap().getSize()[0]*(this.get("position")-.5),s[1]]:A[1]=[s[0],s[1]*.5+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(r,A),e.clip()}};jo.prototype.precomposeRight=function(r){var e=r.context;if(e instanceof WebGLRenderingContext){if(r.type==="prerender"){e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT),e.enable(e.SCISSOR_TEST);var t=this.getMap().getSize(),n=this._transformPt(r,[0,t[1]]),i=this._transformPt(r,[t[0],0]),a=i[0]-n[0],o=i[1]-n[1];this.get("orientation")==="vertical"?(a=Math.round(a*(1-this.get("position"))),n[0]+=t[0]-a):o=Math.round(o*(1-this.get("position"))),e.scissor(n[0],n[1],a,o)}}else{var s=r.frameState.size;e.save(),e.beginPath();var A=[[0,0],[s[0],s[1]]];this.get("orientation")==="vertical"?A[0]=[s[0]*.5+this.getMap().getSize()[0]*(this.get("position")-.5),0]:A[0]=[0,s[1]*.5+this.getMap().getSize()[1]*(this.get("position")-.5)],this._drawRect(r,A),e.clip()}};jo.prototype.postcompose=function(r){if(r.context instanceof WebGLRenderingContext){if(r.type==="postrender"){var e=r.context;e.disable(e.SCISSOR_TEST)}}else r.target.getClassName&&r.target.getClassName()!=="ol-layer"&&r.target.get("declutter")?setTimeout(function(){r.context.restore()},0):r.context.restore()};const $lt={name:"ol-swipe-control",setup(r,e){const{control:t}=Xi(jo,r,e),{layerList:n}=nh(r);return n.value.forEach((i,a)=>{t.value.addLayer(i,a==1)}),{control:t}},props:{layerList:{type:Array},className:{type:String,default:"ol-swipe"},position:{type:Number,default:.5},orientation:{type:String,default:"vertical"}}};function Vlt(r,e,t,n,i,a){return Mr("",!0)}var aI=me($lt,[["render",Vlt]]),Es=function(r){r||(r={});var e=document.createElement("div");if(e.classList.add("ol-unselectable","ol-control","ol-bar"),r.className){var t=r.className.split(" ").filter(function(i){return i.length>0});e.classList.add.apply(e.classList,t)}if(r.group&&e.classList.add("ol-group"),Nr.call(this,{element:e,target:r.target}),this.set("toggleOne",r.toggleOne),this.set("autoDeactivate",r.autoDeactivate),this.controls_=[],r.controls instanceof Array)for(var n=0;n<r.controls.length;n++)this.addControl(r.controls[n])};Qr(Es,Nr);Es.prototype.setVisible=function(r){r?this.element.style.display="":this.element.style.display="none"};Es.prototype.getVisible=function(){return this.element.style.display!="none"};Es.prototype.setMap=function(r){Nr.prototype.setMap.call(this,r);for(var e=0;e<this.controls_.length;e++){var t=this.controls_[e];t.setMap(r)}};Es.prototype.getControls=function(){return this.controls_};Es.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}};Es.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)};Es.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)};Es.prototype.getActiveControls=function(){for(var r=[],e=0,t;t=this.controls_[e];e++)t.getActive&&t.getActive()&&r.push(t);return r};Es.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)};Es.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}}}};Es.prototype.getControlsByName=function(r){var e=this.getControls();return e.filter(function(t){return t.get("name")===r})};const jlt={name:"ol-control-bar",setup(r,e){const{control:t}=Xi(Es,r,e);return Dr("controlBar",t),{control:t}},props:{toggleOne:{type:Boolean,default:!0},group:{type:Boolean,default:!0}}};function Klt(r,e,t,n,i,a){return Rr(r.$slots,"default")}var oI=me(jlt,[["render",Klt]]);window.ol&&(ol.ext.input={});var xd=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))};Qr(xd,Li);xd.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)};xd.prototype.setValue=function(r){r!==void 0&&(this.input.value=r),this.input.dispatchEvent(new Event("change"))};xd.prototype.getValue=function(){return this.input.value};xd.prototype.getInputElement=function(){return this.input};var Id=function(r){r=r||{},xd.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))};Qr(Id,xd);Id.prototype.isChecked=function(){return this.input.checked};var sG=function(r){r=r||{},Id.call(this,r),this.element.className=("ol-ext-toggle-switch "+(r.className||"")).trim()};Qr(sG,Id);var AG=function(r){r=r||{},Id.call(this,r),this.element.className=("ol-ext-check ol-ext-radio "+(r.className||"")).trim()};Qr(AG,Id);var yt={};yt.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)yt.create("OPTION",{html:i,value:e.options[i],parent:t});break}case"style":{this.setStyle(t,e.style);break}case"change":case"click":{yt.addListener(t,n,e[n]);break}case"on":{for(var a in e.on)yt.addListener(t,a,e.on[a]);break}case"checked":{t.checked=!!e.checked;break}default:{t.setAttribute(n,e[n]);break}}}return t};yt.createSwitch=function(r){var e=yt.create("INPUT",{type:"checkbox",on:r.on,click:r.click,change:r.change,parent:r.parent}),t=Object.assign({input:e},r||{});return new sG(t),e};yt.createCheck=function(r){var e=yt.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 AG(t):new Id(t),e};yt.setHTML=function(r,e){e instanceof Element?r.appendChild(e):e!==void 0&&(r.innerHTML=e)};yt.appendText=function(r,e){r.appendChild(document.createTextNode(e||""))};yt.addListener=function(r,e,t,n){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(i){r.addEventListener(i,t,n)})};yt.removeListener=function(r,e,t){typeof e=="string"&&(e=e.split(" ")),e.forEach(function(n){r.removeEventListener(n,t)})};yt.show=function(r){r.style.display=""};yt.hide=function(r){r.style.display="none"};yt.hidden=function(r){return yt.getStyle(r,"display")==="none"};yt.toggle=function(r){r.style.display=r.style.display==="none"?"":"none"};yt.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]}};yt.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};yt.outerHeight=function(r){return r.offsetHeight+yt.getStyle(r,"marginBottom")};yt.outerWidth=function(r){return r.offsetWidth+yt.getStyle(r,"marginLeft")};yt.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}};yt.getFixedOffset=function(r){var e={left:0,top:0},t=function(n){if(!n)return e;if(yt.getStyle(n,"position")==="absolute"&&yt.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)};yt.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)};yt.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(){w&&(h++,setTimeout(d))},d=function(){if(w){if(h--,h)return;var I=r.clientHeight,T=r.scrollHeight;u=I/T,w.style.height=u*100+"%",w.style.top=r.scrollTop/T*100+"%",y.style.height=I+"px",I>T-.5?y.classList.add("ol-100pc"):y.classList.remove("ol-100pc")}},g=function(I){I.target.classList.contains("ol-noscroll")||(l=!1,t=I[s],a=new Date,r.classList.add("ol-move"),I.preventDefault(),window.addEventListener("pointermove",m),yt.addListener(window,["pointerup","pointercancel"],O))},m=function(I){if(l=!0,t!==!1){var T=(c?-1/u:1)*(t-I[s]);r[A]+=T,i=new Date,i-a&&(n=(n+T/(i-a))/2),t=I[s],a=i,T&&o(!0)}},v=function(I){var T=I>0?Math.min(100,I/2):Math.max(-100,I/2);I-=T,r[A]+=T,-1<I&&I<1?(l?setTimeout(function(){r.classList.remove("ol-move")}):r.classList.remove("ol-move"),l=!1,o(!1)):setTimeout(function(){v(I)},40)},y,w;if(e.vertical&&e.minibar){var C=function(I){r.removeEventListener("pointermove",C),r.parentNode.classList.add("ol-miniscroll"),w=yt.create("DIV"),y=yt.create("DIV",{className:"ol-scroll",html:w}),r.parentNode.insertBefore(y,r),w.addEventListener("pointerdown",function(T){c=!0,g(T)}),e.mousewheel&&(yt.addListener(y,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){F(T)}),yt.addListener(w,["mousewheel","DOMMouseScroll","onmousewheel"],function(T){F(T)})),r.parentNode.addEventListener("pointerenter",f),window.addEventListener("resize",f),I!==!1&&f()};r.parentNode?C(!1):r.addEventListener("pointermove",C),r.addEventListener("scroll",function(){f()})}r.style["touch-action"]="none",r.style.overflow="hidden",r.classList.add("ol-scrolldiv"),yt.addListener(r,["pointerdown"],function(I){c=!1,g(I)}),r.addEventListener("click",function(I){r.classList.contains("ol-move")&&(I.preventDefault(),I.stopPropagation())},!0);var O=function(I){a=new Date-a,a>100||c?n=0:a>0&&(n=((n||0)+(t-I[s])/a)/2),v(e.animate===!1?0:n*200),t=!1,n=0,a=0,r.classList.contains("ol-move")?r.classList.remove("ol-hasClick"):(r.classList.add("ol-hasClick"),setTimeout(function(){r.classList.remove("ol-hasClick")},500)),c=!1,window.removeEventListener("pointermove",m),yt.removeListener(window,["pointerup","pointercancel"],O)},F=function(I){var T=Math.max(-1,Math.min(1,I.wheelDelta||-I.detail));return r.classList.add("ol-move"),r[A]-=T*30,r.classList.remove("ol-move"),!1};return e.mousewheel&&yt.addListener(r,["mousewheel","DOMMouseScroll","onmousewheel"],F),{refresh:f}};yt.dispatchEvent=function(r,e){var t;try{t=new CustomEvent(r)}catch{t=document.createEvent("CustomEvent"),t.initCustomEvent(r,!0,!0,{})}e.dispatchEvent(t)};var Pu=function(r){r=r||{};var e=document.createElement("div");e.className=(r.className||"")+" ol-button ol-unselectable ol-control";var t=this,n=this.button_=document.createElement(/ol-text-button/.test(r.className)?"div":"button");n.type="button",r.title&&(n.title=r.title),r.name&&(n.name=r.name),r.html instanceof Element?n.appendChild(r.html):n.innerHTML=r.html||"";var i=function(a){a&&a.preventDefault&&(a.preventDefault(),a.stopPropagation()),r.handleClick&&r.handleClick.call(t,a)};n.addEventListener("click",i),e.appendChild(n),!r.title&&n.firstElementChild&&(n.title=n.firstElementChild.title),Nr.call(this,{element:e,target:r.target}),r.title&&this.set("title",r.title),r.title&&this.set("title",r.title),r.name&&this.set("name",r.name)};Qr(Pu,Nr);Pu.prototype.setVisible=function(r){r?yt.show(this.element):yt.hide(this.element)};Pu.prototype.setTitle=function(r){this.button_.setAttribute("title",r)};Pu.prototype.setHtml=function(r){yt.setHTML(this.button_,r)};Pu.prototype.getButtonElement=function(){return this.button_};var $s=function(r){r=r||{};var e=this;this.interaction_=r.interaction,this.interaction_&&(this.interaction_.setActive(r.active),this.interaction_.on("change:active",function(){e.setActive(e.interaction_.getActive())})),r.toggleFn&&(r.onToggle=r.toggleFn),r.handleClick=function(){e.toggle(),r.onToggle&&r.onToggle.call(e,e.getActive())},r.className=(r.className||"")+" ol-toggle",Pu.call(this,r),this.set("title",r.title),this.set("autoActivate",r.autoActivate),r.bar&&this.setSubBar(r.bar),this.setActive(r.active),this.setDisable(r.disable)};Qr($s,Pu);$s.prototype.setMap=function(r){!r&&this.getMap()&&(this.interaction_&&this.getMap().removeInteraction(this.interaction_),this.subbar_&&this.getMap().removeControl(this.subbar_)),Pu.prototype.setMap.call(this,r),r&&(this.interaction_&&r.addInteraction(this.interaction_),this.subbar_&&r.addControl(this.subbar_))};$s.prototype.getSubBar=function(){return this.subbar_};$s.prototype.setSubBar=function(r){var e=this.getMap();e&&this.subbar_&&e.removeControl(this.subbar_),this.subbar_=r,r&&(this.subbar_.setTarget(this.element),this.subbar_.element.classList.add("ol-option-bar"),e&&e.addControl(this.subbar_))};$s.prototype.getDisable=function(){var r=this.element.querySelector("button");return r&&r.disabled};$s.prototype.setDisable=function(r){this.getDisable()!=r&&(this.element.querySelector("button").disabled=r,r&&this.getActive()&&this.setActive(!1),this.dispatchEvent({type:"change:disable",key:"disable",oldValue:!r,disable:r}))};$s.prototype.getActive=function(){return this.element.classList.contains("ol-active")};$s.prototype.toggle=function(){this.getActive()?this.setActive(!1):this.setActive(!0)};$s.prototype.setActive=function(r){this.interaction_&&this.interaction_.setActive(r),this.subbar_&&this.subbar_.setActive(r),this.getActive()!==r&&(r?this.element.classList.add("ol-active"):this.element.classList.remove("ol-active"),this.dispatchEvent({type:"change:active",key:"active",oldValue:!r,active:r}))};$s.prototype.setInteraction=function(r){this.interaction_=r};$s.prototype.getInteraction=function(){return this.interaction_};const Wlt={name:"ol-control-toggle",setup(r,e){const{control:t}=Xi($s,r,e);return{control:t}},props:{html:{type:String},interaction:{type:Object},className:{type:String},title:{type:String},onToggle:{type:Function}}};function zlt(r,e,t,n,i,a){return Mr("",!0)}var sI=me(Wlt,[["render",zlt]]);const Ylt={name:"ol-control-button",setup(r,e){const{control:t}=Xi(Pu,r,e);return{control:t}},props:{html:{type:String},name:{type:String},className:{type:String},title:{type:String},handleClick:{type:Function}}};function Xlt(r,e,t,n,i,a){return Mr("",!0)}var AI=me(Ylt,[["render",Xlt]]),Za=function(r){r=r||{},r.fullscreen&&(r.target=document.body);var e=yt.create("DIV",{className:((r.className||"")+(r.zoom?" ol-zoom":"")+" ol-ext-dialog").trim(),click:function(i){this.get("hideOnBack")&&i.target===e&&this.close(),this.get("hideOnClick")&&this.close()}.bind(this)}),t=yt.create("FORM",{on:{submit:this._onButton("submit")},parent:e});yt.create("H2",{parent:t}),yt.create("DIV",{className:"ol-closebox",click:this._onButton("cancel"),parent:t}),yt.create("DIV",{className:"ol-content",parent:t}),this._progress=yt.create("DIV",{style:{display:"none"},parent:t});var n=yt.create("DIV",{className:"ol-progress-bar",parent:this._progress});this._progressbar=yt.create("DIV",{parent:n}),this._progressMessage=yt.create("DIV",{className:"ol-progress-message",parent:this._progress}),yt.create("DIV",{className:"ol-buttons",parent:t}),Nr.call(this,{element:e,target:r.target}),this.set("closeBox",r.closeBox!==!1),this.set("zoom",!!r.zoom),this.set("hideOnClick",!!r.hideOnClick),this.set("hideOnBack",!!r.hideOnBack),this.set("className",e.className),this.set("closeOnSubmit",r.closeOnSubmit),this.set("buttons",r.buttons),this.setContent(r)};Qr(Za,Nr);Za.prototype.show=function(r){r&&((r instanceof Element||typeof r=="string")&&(r={content:r}),this.setContent(r)),this.element.classList.add("ol-visible");var e=this.element.querySelector('input[type="text"],input[type="search"],input[type="number"]');if(e&&e.focus(),this.dispatchEvent({type:"show"}),r){if(r.autoclose){var t=setTimeout(function(){this.hide()}.bind(this),r.autoclose);this.once("hide",function(){clearTimeout(t)})}if(r.hideOnBack){var n=this.get("hideOnBack");this.set("hideOnBack",!0),this.once("hide",function(){this.set("hideOnBack",n)}.bind(this))}}};Za.prototype.open=function(){this.show()};Za.prototype.setContentMessage=function(r){if(r!==void 0){var e=this.getContentElement();r instanceof Element&&yt.setHTML(e,""),yt.setHTML(e,r||"")}};Za.prototype.setTitle=function(r){var e=this.element.querySelector("form");e.querySelector("h2").innerText=r||"",r?e.classList.add("ol-title"):e.classList.remove("ol-title")};Za.prototype.setContent=function(r){if(r){this.element.className=this.get("className"),typeof r=="string"&&(r={content:r}),r=r||{},this.setProgress(!1),r.max&&this.setProgress(0,r.max),r.progress!==void 0&&this.setProgress(r.progress),this.get("zoom")?this.element.classList.add("ol-zoom"):this.element.classList.remove("ol-zoom"),r.className&&r.className.split(" ").forEach(function(a){this.element.classList.add(a)}.bind(this));var e=this.element.querySelector("form");r.content!==void 0&&(r.content instanceof Element&&yt.setHTML(e.querySelector(".ol-content"),""),yt.setHTML(e.querySelector(".ol-content"),r.content||"")),this.setTitle(r.title),r.closeBox||this.get("closeBox")&&r.closeBox!==!1?e.classList.add("ol-closebox"):e.classList.remove("ol-closebox");var t=this.element.querySelector(".ol-buttons");t.innerHTML="";var n=r.buttons||this.get("buttons");if(n){e.classList.add("ol-button");for(var i in n)yt.create("INPUT",{type:i==="submit"?"submit":"button",value:n[i],click:this._onButton(i,r.onButton),parent:t})}else e.classList.remove("ol-button")}};Za.prototype.getContentElement=function(){return this.element.querySelector("form .ol-content")};Za.prototype.setProgress=function(r,e,t){if(r===!1){yt.setStyle(this._progress,{display:"none"});return}if(e>0?this.set("max",Number(e)):e=this.get("max"),!e)yt.setStyle(this._progress,{display:"none"});else{var n=Math.round(r/e*100);yt.setStyle(this._progress,{display:""}),this._progressbar.className=n?"":"notransition",yt.setStyle(this._progressbar,{width:n+"%"})}this._progressMessage.innerHTML="",yt.setHTML(this._progressMessage,t||"")};Za.prototype._onButton=function(r,e){var t=function(n){n.preventDefault(),(r!=="submit"||this.get("closeOnSubmit")!==!1)&&this.hide();var i=this.getInputs();this.dispatchEvent({type:"button",button:r,inputs:i}),typeof e=="function"&&e(r,i)}.bind(this);return t};Za.prototype.getInputs=function(){var r={};return["input","textarea","select"].forEach(function(e){this.element.querySelectorAll("form "+e).forEach(function(t){t.className&&t.className.split(" ").forEach(function(n){r[n]=t})})}.bind(this)),r};Za.prototype.hide=function(){this.element.classList.remove("ol-visible"),this.dispatchEvent({type:"hide"})};Za.prototype.close=Za.prototype.hide;Za.prototype.isOpen=function(){return this.element.classList.contains("ol-visible")};var qlt=function(r){if(!r)return null;var e=r.getViewport().getElementsByClassName("ol-fixedoverlay")[0];return e||(r.getViewport().querySelector(".ol-layers")?(e=document.createElement("canvas"),e.className="ol-fixedoverlay",r.getViewport().querySelector(".ol-layers").after(e),r.on("precompose",function(t){e.width=r.getSize()[0]*t.frameState.pixelRatio,e.height=r.getSize()[1]*t.frameState.pixelRatio})):e=r.getViewport().querySelector("canvas")),e},qi=function(r){r||(r={}),this.setStyle(r.style),Nr.call(this,r)};Qr(qi,Nr);qi.prototype.setMap=function(r){this.getCanvas(r);var e=this.getMap();if(this._listener&&(ms(this._listener),this._listener=null),Nr.prototype.setMap.call(this,r),e)try{e.renderSync()}catch{}r&&(this._listener=r.on("postcompose",this._draw.bind(this)))};qi.prototype.getCanvas=function(r){return qlt(r)};qi.prototype.getContext=function(r){var e=r.context;if(!e&&this.getMap()){var t=this.getMap().getViewport().getElementsByClassName("ol-fixedoverlay")[0];e=t?t.getContext("2d"):null}return e};qi.prototype.setStyle=function(r){this._style=r||new Ea({})};qi.prototype.getStyle=function(){return this._style};qi.prototype.getStroke=function(){var r=this._style.getStroke();return r||this._style.setStroke(new zi({color:"#000",width:1.25})),this._style.getStroke()};qi.prototype.getFill=function(){var r=this._style.getFill();return r||this._style.setFill(new Ba({color:"#fff"})),this._style.getFill()};qi.prototype.getTextStroke=function(){var r=this._style.getText();return r||(r=new bd({})),r.getStroke()||r.setStroke(new zi({color:"#fff",width:3})),r.getStroke()};qi.prototype.getTextFill=function(){var r=this._style.getText();return r||(r=new bd({})),r.getFill()||r.setFill(new Ba({color:"#fff"})),r.getFill()};qi.prototype.getTextFont=function(){var r=this._style.getText();return r||(r=new bd({})),r.getFont()||r.setFont("12px sans-serif"),r.getFont()};qi.prototype._draw=function(){console.warn("[CanvasBase] draw function not implemented.")};function Zlt(r,e){var t=r.canvas,n=e||{},i=n.pixelRatio||ed,a=n.size;a&&(t.width=a[0]*i,t.height=a[1]*i,t.style.width=a[0]+"px",t.style.height=a[1]+"px");var o=[0,0,t.width,t.height],s=ry(Si(),i,i);return new VF(r,i,o,s,0)}var Dg=function(r){r=r||{},Li.call(this,r),r.feature&&this.set("feature",r.feature.clone())};Qr(Dg,Li);Dg.prototype.setTitle=function(r){this.set("title",r||""),this.changed()};Dg.prototype.getElement=function(r,e){var t=yt.create("LI",{className:this.get("className"),click:function(n){e(!1),n.stopPropagation()},style:{height:r[1]+"px"},"aria-label":this.get("title")});return yt.create("DIV",{click:function(n){e(!0),n.stopPropagation()},style:{width:r[0]+"px",height:r[1]+"px"},parent:t}),t};window.ol&&!ol.legend&&(ol.legend={});var ba=function(r){r=r||{},Li.call(this),this._items=new xi;var e=[],t;this._items.on("add",function(n){e.push({item:n.element,on:n.element.on("change",function(){this.refresh()}.bind(this))}),t&&(clearTimeout(t),t=null),t=setTimeout(function(){this.refresh()}.bind(this),0)}.bind(this)),this._items.on("remove",function(n){for(var i=0;i<e;i++)if(n.element===e[i].item){ms(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=yt.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 bd({font:"16px sans-serif",fill:new Ba({color:"#333"}),backgroundFill:new Ba({color:"rgba(255,255,255,.8)"})}),this._title=new Dg({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()};Qr(ba,Li);ba.prototype.setTitle=function(r){this._title.setTitle(r),this.refresh()};ba.prototype.getTitle=function(){return this._title.get("title")};ba.prototype.getTextStyle=function(){return this._textStyle};ba.prototype.set=function(r,e,t){Li.prototype.set.call(this,r,e,t),t||this.refresh()};ba.prototype.getListElement=function(){return this._listElement};ba.prototype.getCanvas=function(){return this._canvas};ba.prototype.setStyle=function(r){this._style=r,this.refresh()};ba.prototype.addItem=function(r){r instanceof Dg?this._items.push(r):this._items.push(new Dg(r))};ba.prototype.getItems=function(){return this._items};ba.prototype._drawText=function(r,e,t,n){r.save(),r.scale(ed,ed),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()};ba.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}};ba.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=ed;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=fu(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})};ba.prototype.getLegendImage=function(r,e,t){return r=r||{},ba.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)};ba.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(){ba.getLegendImage(r,e,t)},100)};var i=n[0]+2*r.margin,a=r.lineHeight||n[1]+2*r.margin,o=ed;e||(t=0,e=document.createElement("canvas"),e.width=i*o,e.height=a*o);var s=e.getContext("2d");s.save();var A=Zlt(s,{pixelRatio:o}),l=r.typeGeom,u,c=r.feature;!c&&l&&(/Point/.test(l)?c=new _r(new xr([0,0])):/LineString/.test(l)?c=new _r(new en([0,0])):c=new _r(new Dn([[0,0]])),r.properties&&c.setProperties(r.properties)),c?(u=c.getStyle(),typeof u=="function"&&(u=u(c)),u||(u=typeof r.style=="function"?r.style(c):r.style||[]),l=c.getGeometry().getType()):u=[],u instanceof Array||(u=[u]);var h=i/2,f=a/2,d=n[0]/2,g=n[1]/2,m,v;if(l==="Point"){var y=null;for(m=0;v=u[m];m++){var w=v.getImage();if(w){var C=w.getImage();if(C&&C.complete&&!C.naturalWidth&&(typeof r.onload=="function"&&C.addEventListener("load",function(){setTimeout(function(){r.onload()},100)}),w.load()),w.getAnchor){var O=w.getAnchor();if(O){var F=w.getSize(),I=O[0]-F[0],T=O[1]-F[1];y?lh(y,[I,T,I+F[0],T+F[1]]):y=[I,T,I+F[0],T+F[1]]}}}}y&&(h=h+(y[2]+y[0])/2,f=f+(y[3]+y[1])/2)}for(f+=t*a||0,m=0;v=u[m];m++)switch(A.setStyle(v),l){case xr:case"Point":case"MultiPoint":A.drawGeometry(new xr([h,f]));break;case en:case"LineString":case"MultiLineString":s.save(),s.rect(r.margin*o,0,n[0]*o,e.height),s.clip(),A.drawGeometry(new en([[h-d,f],[h+d,f]])),s.restore();break;case Dn:case"Polygon":case"MultiPolygon":A.drawGeometry(new Dn([[[h-d,f-g],[h+d,f-g],[h+d,f+g],[h-d,f+g],[h-d,f-g]]]));break}return s.restore(),e};var bA=function(r){r=r||{};var e=document.createElement("div");if(r.target)e.className=r.className||"ol-legend";else{e.className=(r.className||"ol-legend")+" ol-unselectable ol-control"+(r.collapsible===!1?" ol-uncollapsible":" ol-collapsed");var t=document.createElement("button");t.setAttribute("type","button"),t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t),t=document.createElement("button"),t.setAttribute("type","button"),t.className="ol-closebox",t.addEventListener("click",function(){this.toggle()}.bind(this)),e.appendChild(t)}qi.call(this,{element:e,target:r.target}),this._legend=r.legend,this._legend.getCanvas().className="ol-legendImg",e.appendChild(this._legend.getCanvas()),e.appendChild(this._legend.getListElement()),r.collapsible!==!1&&r.collapsed===!1&&this.show(),this._legend.on("select",function(n){this.dispatchEvent(n)}.bind(this)),this._legend.on("refresh",function(){if(this._onCanvas&&this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this))};Qr(bA,qi);bA.prototype.getLegend=function(){return this._legend};bA.prototype.setCanvas=function(r){if(this._onCanvas=r,this.element.style.visibility=r?"hidden":"visible",this.getMap())try{this.getMap().renderSync()}catch{}};bA.prototype.onCanvas=function(){return!!this._onCanvas};bA.prototype._draw=function(r){if(this._onCanvas&&!this.element.classList.contains("ol-collapsed")){var e=this._legend.getCanvas(),t=this.getContext(r),n=t.canvas.height-e.height;t.save(),t.rect(0,n,e.width,e.height);var i="#fff";this._legend.getTextStyle().getBackgroundFill()&&(i=fu(this._legend.getTextStyle().getBackgroundFill().getColor())),t.fillStyle=t.strokeStyle=i,t.lineWidth=10,t.lineJoin="round",t.stroke(),t.clearRect(0,n,e.width,e.height),t.fill(),t.drawImage(e,0,n),t.restore()}};bA.prototype.show=function(){if(this.element.classList.contains("ol-collapsed")&&(this.element.classList.remove("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:!1}),this.getMap()))try{this.getMap().renderSync()}catch{}};bA.prototype.hide=function(){if(!this.element.classList.contains("ol-collapsed")&&(this.element.classList.add("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:!0}),this.getMap()))try{this.getMap().renderSync()}catch{}};bA.prototype.collapse=function(r){r===!1?this.show():this.hide()};bA.prototype.isCollapsed=function(){return this.element.classList.contains("ol-collapsed")};bA.prototype.toggle=function(){if(this.element.classList.toggle("ol-collapsed"),this.dispatchEvent({type:"change:collapse",collapsed:this.element.classList.contains("ol-collapsed")}),this.getMap())try{this.getMap().renderSync()}catch{}};var Bh=function(r){r||(r={});var e=yt.create("DIV",{className:r.className||"ol-print"});r.target||(e.classList.add("ol-unselectable","ol-control"),yt.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e})),Nr.call(this,{element:e,target:r.target}),this.set("immediate",r.immediate),this.set("imageType",r.imageType||"image/jpeg"),this.set("quality",r.quality||.8),this.set("orientation",r.orientation)};Qr(Bh,Nr);Bh.prototype.toClipboard=function(r,e){try{r.canvas.toBlob(function(t){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},t.type,{value:t,enumerable:!0}))]),typeof e=="function"&&e(!0)}catch{typeof e=="function"&&e(!1)}})}catch{typeof e=="function"&&e(!1)}};Bh.prototype.copyMap=function(r,e){this.once("print",function(t){this.toClipboard(t,e)}.bind(this)),this.print(r)};Bh.prototype._getCanvas=function(r,e,t){var n;if(r.context)t=r.context.canvas;else{if(t)n=t.getContext("2d");else{t=document.createElement("canvas");var i=this.getMap().getSize();t.width=i[0],t.height=i[1],n=t.getContext("2d"),/jp.*g$/.test(e)&&(n.fillStyle=this.get("bgColor")||"white",n.fillRect(0,0,t.width,t.height))}this.getMap().getViewport().querySelectorAll(".ol-layers canvas, canvas.ol-fixedoverlay").forEach(function(a){if(a.width){if(n.save(),a.parentNode.style.opacity==="0")return;n.globalAlpha=parseFloat(a.parentNode.style.opacity)||1,yt.getStyle(a.parentNode,"mix-blend-mode")==="multiply"&&(n.globalCompositeOperation="multiply");var o=yt.getStyle(a,"transform")||yt.getStyle(a,"-webkit-transform");/^matrix/.test(o)?(o=o.replace(/^matrix\(|\)$/g,"").split(","),o.forEach(function(s,A){o[A]=parseFloat(s)}),n.transform(o[0],o[1],o[2],o[3],o[4],o[5]),n.drawImage(a,0,0)):n.drawImage(a,0,0,yt.getStyle(a,"width"),yt.getStyle(a,"height")),n.restore()}}.bind(this))}return t};Bh.prototype.fastPrint=function(r,e){r=r||{},this._ol6?requestAnimationFrame(function(){e(this._getCanvas({},r.imageType,r.canvas))}.bind(this)):(this.getMap().once("postcompose",function(t){t.context||(this._ol6=!0),e(this._getCanvas(t,r.imageType,r.canvas))}.bind(this)),this.getMap().render())};Bh.prototype.print=function(r){r=r||{};var e=r.imageType||this.get("imageType"),t=r.quality||this.get("quality");if(this.getMap()){if(r.immediate!=="silent"&&this.dispatchEvent(Object.assign({type:"printing"},r)),!r.immediate){setTimeout(function(){r=Object.assign({},r),r.immediate="silent",this.print(r)}.bind(this),200);return}this.getMap().once(this.get("immediate")?"postcompose":"rendercomplete",function(n){var i=this._getCanvas(n,e),a=r.size||[210,297],o=r.format||"a4",s,A,l,u=r.orient||this.get("orientation"),c=typeof r.margin=="number"?r.margin:10;if(i){u!=="landscape"&&u!=="portrait"&&(u=i.width>i.height?"landscape":"portrait"),u==="landscape"&&(a=[a[1],a[0]]);var h=Math.min((a[0]-2*c)/i.width,(a[1]-2*c)/i.height);s=h*i.width,A=h*i.height,l=[(a[0]-s)/2,(a[1]-A)/2]}var f;try{f=i?i.toDataURL(e,t):null}catch{this.dispatchEvent({type:"error",canvas:i});return}var d=Object.assign({type:"print",print:{format:o,orientation:u,unit:"mm",size:a,position:l,imageWidth:s,imageHeight:A},image:f,imageType:e,quality:t,canvas:i},r);this.dispatchEvent(d)}.bind(this)),this.getMap().render()}};var bh=function(r){r||(r={});var e=yt.create("DIV",{className:(r.className||"")+" ol-control-title ol-unselectable",style:{display:"block",visibility:"hidden"}});qi.call(this,{element:e,style:r.style}),this.setTitle(r.title||""),this.setVisible(r.visible),this.element.style.font=this.getTextFont()};Qr(bh,qi);bh.prototype.setStyle=function(r){qi.prototype.setStyle.call(this,r),this.element&&(this.element.style.font=this.getTextFont()),this.getMap()&&this.getMap().render()};bh.prototype.setTitle=function(r){if(this.element.textContent=r,this.set("title",r),this.getMap())try{this.getMap().renderSync()}catch{}};bh.prototype.getTitle=function(){return this.get("title")};bh.prototype.setVisible=function(r){if(this.element.style.display=r?"block":"none",this.getMap())try{this.getMap().renderSync()}catch{}};bh.prototype.getVisible=function(){return this.element.style.display!=="none"};bh.prototype._draw=function(r){if(this.getVisible()){var e=this.getContext(r);if(e){var t=r.frameState.pixelRatio;e.save(),e.scale(t,t);var n=this.element.getBoundingClientRect(),i=this.getMap().getViewport().getBoundingClientRect(),a=this.getMap().getSize()[0]/i.width;e.translate(Math.round((n.left-i.left)*a),Math.round((n.top-i.top)*a));var o=this.element.clientHeight,s=this.element.clientWidth,A=s/2;e.beginPath(),e.fillStyle=fu(this.getFill().getColor()),e.rect(0,0,s,o),e.fill(),e.closePath(),e.beginPath(),e.fillStyle=fu(this.getTextFill().getColor()),e.strokeStyle=fu(this.getTextStroke().getColor()),e.lineWidth=this.getTextStroke().getWidth(),e.textAlign="center",e.textBaseline="middle",e.font=this.getTextFont(),e.lineWidth&&e.strokeText(this.getTitle(),A,o/2),e.fillText(this.getTitle(),A,o/2),e.closePath(),e.restore()}}};var lI=function(r,e){var t=r.getView(),n=t.getProjection(),i=t.getCenter(),a=r.getPixelFromCoordinate(i);a[1]+=1;var o=r.getCoordinateFromPixel(a),s=Kw(ch(i,n,"EPSG:4326"),ch(o,n,"EPSG:4326"));return s*=(e||96)/.0254,s},Jlt=function(r,e,t){if(r&&e){var n=e;if(typeof e=="string"&&(n=e.split("/")[1],n||(n=e),n=n.replace(/[^\d]/g,""),n=parseInt(n)),!n)return;var i=r.getView(),a=i.getProjection(),o=i.getCenter(),s=r.getPixelFromCoordinate(o);s[1]+=1;var A=r.getCoordinateFromPixel(s),l=Kw(ch(o,a,"EPSG:4326"),ch(A,a,"EPSG:4326"));return l*=(t||96)/.0254,i.setResolution(i.getResolution()*n/l),n}},Eu=function(r){r||(r={});var e=document.createElement("div");e.className="ol-control ol-compassctrl ol-unselectable ol-hidden"+(r.className?" "+r.className:""),e.style.position="absolute",e.style.visibility="hidden";var t=r.style instanceof zi?new Ea({stroke:r.style}):r.style;r.style||(t=new Ea({stroke:new zi({width:0})})),qi.call(this,{element:e,style:t}),this.set("rotateVithView",r.rotateWithView!==!1),this.setVisible(r.visible!==!1),this.setImage(r.image||r.src)};Qr(Eu,qi);Eu.prototype.setImage=function(r){if(r instanceof Image)this.img_=r,this.img_.onload=function(){if(this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this);else if(typeof r=="string")switch(r){case"compact":{this.img_=this.compactCompass_(this.element.clientWidth,this.getStroke().getColor());break}case"default":{this.img_=this.defaultCompass_(this.element.clientWidth,this.getStroke().getColor());break}default:{this.img_=new Image,this.img_.onload=function(){if(this.getMap())try{this.getMap().renderSync()}catch{}}.bind(this),this.img_.src=r;break}}else this.img_=this.defaultCompass_(this.element.clientWidth,this.getStroke().getColor())};Eu.prototype.compactCompass_=function(r,e){var t=document.createElement("canvas"),n=t.getContext("2d");r=t.width=t.height=r||150;var i=r/2;return n.translate(i,i),n.fillStyle=e||"#963",n.lineWidth=5,n.lineJoin=n.lineCap="round",n.font="bold "+i*.4+"px sans-serif",n.textBaseline="bottom",n.textAlign="center",n.strokeStyle="#fff",n.globalAlpha=.75,n.strokeText("N",0,-i/2),n.globalAlpha=1,n.fillText("N",0,-i/2),n.beginPath(),n.moveTo(0,i/4),n.lineTo(i/3,i/2),n.lineTo(0,-i/2),n.lineTo(-i/3,i/2),n.lineTo(0,i/4),n.lineWidth=12,n.fillStyle="#fff",n.globalAlpha=.75,n.fill(),n.stroke(),n.globalAlpha=1,n.fillStyle=n.strokeStyle=e||"#963",n.lineWidth=5,n.beginPath(),n.moveTo(0,i/4),n.lineTo(0,-i/2),n.lineTo(i/3,i/2),n.lineTo(0,i/4),n.fill(),n.stroke(),n.beginPath(),n.moveTo(0,i/4),n.lineTo(0,-i/2),n.lineTo(-i/3,i/2),n.lineTo(0,i/4),n.stroke(),t};Eu.prototype.defaultCompass_=function(r,e){var t=document.createElement("canvas"),n=t.getContext("2d");r=t.width=t.height=r||150;var i=r/2,a=.22*i;function o(A,l){n.fillStyle=e||"#963",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,-l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(l,-l),n.moveTo(0,0),n.fill(),n.stroke()}function s(A,l){n.globalCompositeOperation="destination-out",n.fillStyle="#fff",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,-l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(-l,-l),n.moveTo(0,0),n.fill(),n.globalCompositeOperation="source-over",n.beginPath(),n.moveTo(0,0),n.lineTo(A,0),n.lineTo(l,-l),n.moveTo(0,0),n.lineTo(-A,0),n.lineTo(-l,l),n.moveTo(0,0),n.lineTo(0,A),n.lineTo(l,l),n.moveTo(0,0),n.lineTo(0,-A),n.lineTo(-l,-l),n.moveTo(0,0),n.stroke()}return n.translate(i,i),n.strokeStyle=e||"#963",n.lineWidth=1.5,n.beginPath(),n.arc(0,0,r*.41,0,2*Math.PI),n.arc(0,0,r*.44,0,2*Math.PI),n.stroke(),n.rotate(Math.PI/4),o(i*.9,a*.8),s(i*.9,a*.8),n.rotate(-Math.PI/4),o(i,a),s(i,a),t};Eu.prototype.getVisible=function(){return yt.getStyle(this.element,"display")==="block"};Eu.prototype.setVisible=function(r){r?this.element.classList.add("ol-visible"):this.element.classList.remove("ol-visible"),this.getMap()&&this.getMap().render()};Eu.prototype._draw=function(r){var e=this.getContext(r);if(!(!e||!this.getVisible())){var t=e.canvas,n,i=[];for(n=0;n<8;n++)i[n]=[Math.cos(Math.PI*n/8),Math.sin(Math.PI*n/8)];var a=r.frameState.pixelRatio;e.save(),e.scale(a,a);var o=this.element.clientWidth,s=this.element.clientHeight,A={left:this.element.offsetLeft,top:this.element.offsetTop},l=this.img_,u=r.frameState.viewState.rotation;if(e.beginPath(),e.translate(A.left+o/2,A.top+s/2),this.get("rotateVithView")&&e.rotate(u),this.getStroke().getWidth()){e.beginPath(),e.strokeStyle=this.getStroke().getColor(),e.lineWidth=this.getStroke().getWidth();var c=Math.max(t.width,t.height);for(n=0;n<8;n++)e.moveTo(-i[n][0]*c,-i[n][1]*c),e.lineTo(i[n][0]*c,i[n][1]*c);e.stroke()}l.width&&e.drawImage(l,-o/2,-s/2,o,s),e.closePath(),e.restore()}};var Qn=function(r){r||(r={}),this._lang=r.lang||"en";var e=yt.create("DIV",{className:(r.className||"ol-print")+" ol-unselectable ol-control"});yt.create("BUTTON",{type:"button",title:r.title||"Print",click:function(){this.print()}.bind(this),parent:e}),Nr.call(this,{element:e}),r.openWindow&&this.on("print",function(S){S.canvas&&window.open().document.write('<img src="'+S.canvas.toDataURL()+'"/>')}),r.target=yt.create("DIV");var t=this._printCtrl=new Bh(r);t.on(["print","error","printing"],function(S){i.setAttribute("data-status",S.type),S.clipboard||this.dispatchEvent(S)}.bind(this)),this._compass=new Eu({src:r.northImage||"compact",visible:!1,className:"olext-print-compass",style:new zi({color:"#333",width:0})});var n=this._printDialog=new Za({target:document.body,closeBox:!0,className:"ol-ext-print-dialog"}),i=n.getContentElement();this._input={};var a=yt.create("DIV",{className:"ol-print-param",parent:i});this._pages=[yt.create("DIV",{className:"ol-page"})];var o=yt.create("DIV",{className:"ol-map",parent:this._pages[0]});yt.create("DIV",{html:this._pages[0],className:"ol-print-map",parent:i}),yt.create("H2",{html:this.i18n("title"),parent:a});var s=yt.create("UL",{parent:a}),A=yt.create("LI",{className:"ol-orientation",parent:s});this._input.orientation={list:A};var l=yt.create("LABEL",{className:"portrait",parent:A});this._input.orientation.portrait=yt.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"portrait",checked:!0,on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),yt.create("SPAN",{html:this.i18n("portrait"),parent:l}),l=yt.create("LABEL",{className:"landscape",parent:A}),this._input.orientation.landscape=yt.create("INPUT",{type:"radio",name:"ol-print-orientation",value:"landscape",on:{change:function(S){this.setOrientation(S.target.value)}.bind(this)},parent:l}),yt.create("SPAN",{html:this.i18n("landscape"),parent:l});var u;A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("size")}),className:"ol-size",parent:s});var c=this._input.size=yt.create("SELECT",{on:{change:function(){this.setSize(c.value||L)}.bind(this)},parent:A});for(u in this.paperSize)yt.create("OPTION",{html:u+(this.paperSize[u]?" - "+this.paperSize[u][0]+"x"+this.paperSize[u][1]+" mm":this.i18n("custom")),value:u,parent:c});A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("margin")}),className:"ol-margin",parent:s});var h=this._input.margin=yt.create("SELECT",{on:{change:function(){this.setMargin(h.value)}.bind(this)},parent:A});for(u in this.marginSize)yt.create("OPTION",{html:this.i18n(u)+" - "+this.marginSize[u]+" mm",value:this.marginSize[u],parent:h});A=yt.create("LI",{html:yt.create("LABEL",{html:this.i18n("scale")}),className:"ol-scale",parent:s});var f=this._input.scale=yt.create("SELECT",{on:{change:function(){this.setScale(parseInt(f.value))}.bind(this)},parent:A});Object.keys(this.scales).forEach(function(S){yt.create("OPTION",{html:this.scales[S],value:S,parent:f})}.bind(this)),A=yt.create("LI",{className:"ol-legend",parent:s});var d=yt.createSwitch({html:this.i18n("legend"),checked:!1,on:{change:function(){x.legend.control.setCanvas(d.checked)}.bind(this)},parent:A});A=yt.create("LI",{className:"ol-print-north",parent:s});var g=this._input.north=yt.createSwitch({html:this.i18n("north"),checked:"checked",on:{change:function(){g.checked?this._compass.element.classList.add("ol-print-compass"):this._compass.element.classList.remove("ol-print-compass"),this.getMap().render()}.bind(this)},parent:A});A=yt.create("LI",{className:"ol-print-title",parent:s});var m=yt.createSwitch({html:this.i18n("mapTitle"),checked:!1,on:{change:function(S){x.title.control.setVisible(S.target.checked)}.bind(this)},parent:A}),v=yt.create("INPUT",{type:"text",placeholder:this.i18n("mapTitle"),on:{keydown:function(S){S.keyCode===13&&S.preventDefault()},keyup:function(){x.title.control.setTitle(v.value)},change:function(){x.title.control.setTitle(v.value)}.bind(this)},parent:A}),y=yt.create("DIV",{className:"ol-user-param",parent:a});A=yt.create("LI",{className:"ol-saveas",parent:s});var w=yt.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),C=yt.create("SELECT",{on:{change:function(){if(this.formats[C.value].clipboard)t.copyMap(this.formats[C.value],function(U){U&&(w.classList.add("visible"),setTimeout(function(){w.classList.remove("visible")},1e3))});else{var S=typeof this.getSize()=="string"?this.getSize():null,P=Object.assign({format:S,size:S?this.paperSize[S]:null,orient:this.getOrientation(),margin:this.getMargin()},this.formats[C.value]);t.print(P)}C.value=""}.bind(this)},parent:A});yt.create("OPTION",{html:this.i18n("saveas"),style:{display:"none"},value:"",parent:C}),this.formats.forEach(function(S,P){if(S.pdf){if(r.pdf===!1)return}else if(S.clipboard){if(r.copy===!1)return}else if(r.save===!1)return;yt.create("OPTION",{html:this.i18n(S.title),value:P,parent:C})}.bind(this)),A=yt.create("LI",{className:"ol-savelegend",parent:s});var O=yt.create("DIV",{html:this.i18n("copied"),className:"ol-clipboard-copy",parent:A}),F=yt.create("SELECT",{on:{change:function(){var S=x.legend.control.getLegend().getCanvas(),P=document.createElement("CANVAS");P.width=S.width,P.height=S.height;var U=P.getContext("2d");if(U.fillStyle="#fff",U.fillRect(0,0,P.width,P.height),U.drawImage(S,0,0),this.formats[F.value].clipboard)P.toBlob(function(Tt){try{navigator.clipboard.write([new window.ClipboardItem(Object.defineProperty({},Tt.type,{value:Tt,enumerable:!0}))]),O.classList.add("visible"),setTimeout(function(){O.classList.remove("visible")},1e3)}catch{}},"image/png");else{var tt;try{tt=P.toDataURL(this.formats[F.value].imageType,this.formats[F.value].quality);var q=typeof this.getSize()=="string"?this.getSize():"A4",rt=P.width/96*25.4,nt=P.height/96*25.4,At=this.paperSize[q];this.getOrientation()==="landscape"&&(At=[At[1],At[0]]);var ct=[(At[0]-rt)/2,(At[1]-nt)/2];this.dispatchEvent({type:"print",print:{legend:!0,format:q,orientation:this.getOrientation(),unit:"mm",size:this.paperSize[q],position:ct,imageWidth:rt,imageHeight:nt},image:tt,imageType:this.formats[F.value].imageType,pdf:this.formats[F.value].pdf,quality:this.formats[F.value].quality,canvas:P})}catch{}}F.value=""}.bind(this)},parent:A});yt.create("OPTION",{html:this.i18n("saveLegend"),style:{display:"none"},value:"",parent:F}),this.formats.forEach(function(S,P){yt.create("OPTION",{html:this.i18n(S.title),value:P,parent:F})}.bind(this));var I=yt.create("DIV",{className:"ol-ext-buttons",parent:a});yt.create("BUTTON",{html:this.i18n("printBt"),type:"submit",click:function(S){S.preventDefault(),window.print()},parent:I}),yt.create("BUTTON",{html:this.i18n("cancel"),type:"button",click:function(){n.hide()},parent:I}),yt.create("DIV",{html:this.i18n("errorMsg"),className:"ol-error",parent:a});var T,L,N,x={};n.on("show",function(){this.dispatchEvent({type:"show",userElement:y,dialog:this._printDialog,page:this.getPage()});var S=this.getMap();S&&(document.body.classList.add("ol-print-document"),T=S.getTargetElement(),L=S.getSize(),typeof this.getSize()=="string"?this.setSize(this.getSize()):this.setSize(L),S.setTarget(o),N&&ms(N),N=S.on("moveend",function(){this.setScale(lI(S))}.bind(this)),this.setScale(lI(S)),x={},this.getMap().getControls().forEach(function(P){P instanceof bA&&(x.legend={control:P}),P instanceof bh&&(x.title={control:P}),P instanceof Eu&&(x.compass?P.element.classList.remove("ol-print-compass"):(this._input.north.checked?P.element.classList.add("ol-print-compass"):P.element.classList.remove("ol-print-compass"),this._compass=P,x.compass={control:P}))}.bind(this)),x.title?(m.checked=x.title.isVisible=x.title.control.getVisible(),v.value=x.title.control.getTitle(),m.parentNode.parentNode.classList.remove("hidden")):m.parentNode.parentNode.classList.add("hidden"),x.legend?(x.legend.ison=x.legend.control.onCanvas(),x.legend.collapsed=x.legend.control.isCollapsed(),x.legend.control.collapse(!1),F.parentNode.classList.remove("hidden"),d.parentNode.parentNode.classList.remove("hidden"),d.checked=!x.legend.collapsed,x.legend.control.setCanvas(!x.legend.collapsed)):(F.parentNode.classList.add("hidden"),d.parentNode.parentNode.classList.add("hidden")))}.bind(this)),n.on("hide",function(){document.body.classList.remove("ol-print-document"),T&&(this.getMap().setTarget(T),T=null,N&&ms(N),x.title&&x.title.control.setVisible(x.title.isVisible),x.legend&&(x.legend.control.setCanvas(x.legend.ison),x.legend.control.collapse(x.legend.collapsed)),this.dispatchEvent({type:"hide"}))}.bind(this)),window.addEventListener("resize",function(){this.setSize()}.bind(this)),r.saveAs&&this.on("print",function(S){S.pdf||S.canvas.toBlob(function(P){var U=(S.print.legend?"legend.":"map.")+S.imageType.replace("image/","");r.saveAs(P,U)},S.imageType,S.quality)}),r.jsPDF&&this.on("print",function(S){if(S.pdf){var P=new r.jsPDF({orientation:S.print.orientation,unit:S.print.unit,format:S.print.size});P.addImage(S.image,"JPEG",S.print.position[0],S.print.position[0],S.print.imageWidth,S.print.imageHeight),P.save(S.print.legend?"legend.pdf":"map.pdf")}})};Qr(Qn,Nr);Qn.prototype.isOpen=function(){return this._printDialog.isOpen()};Qn.addLang=function(r,e){Qn.prototype._labels[r]=e};Qn.prototype.i18n=function(r){var e=this._labels.en[r]||"bad param";return this._labels[this._lang]&&this._labels[this._lang][r]&&(e=this._labels[this._lang][r]),e};Qn.prototype._labels={en:{title:"Print",orientation:"Orientation",portrait:"Portrait",landscape:"Landscape",size:"Page size",custom:"screen size",margin:"Margin",scale:"Scale",legend:"Legend",north:"North arrow",mapTitle:"Map title",saveas:"Save as...",saveLegend:"Save legend...",copied:"✔ Copied to clipboard",errorMsg:"Can't save map canvas...",printBt:"Print...",clipboardFormat:"copy to clipboard...",jpegFormat:"save as jpeg",pngFormat:"save as png",pdfFormat:"save as pdf",none:"none",small:"small",large:"large",cancel:"cancel"},fr:{title:"Imprimer",orientation:"Orientation",portrait:"Portrait",landscape:"Paysage",size:"Taille du papier",custom:"taille écran",margin:"Marges",scale:"Echelle",legend:"Légende",north:"Flèche du nord",mapTitle:"Titre de la carte",saveas:"Enregistrer sous...",saveLegend:"Enregistrer la légende...",copied:"✔ Carte copiée",errorMsg:"Impossible d'enregistrer la carte",printBt:"Imprimer",clipboardFormat:"copier dans le presse-papier...",jpegFormat:"enregistrer un jpeg",pngFormat:"enregistrer un png",pdfFormat:"enregistrer un pdf",none:"aucune",small:"petites",large:"larges",cancel:"annuler"},de:{title:"Drucken",orientation:"Ausrichtung",portrait:"Hochformat",landscape:"Querformat",size:"Papierformat",custom:"Bildschirmgröße",margin:"Rand",scale:"Maßstab",legend:"Legende",north:"Nordpfeil",mapTitle:"Kartentitel",saveas:"Speichern als...",saveLegend:"Legende speichern...",copied:"✔ In die Zwischenablage kopiert",errorMsg:"Kann Karte nicht speichern...",printBt:"Drucken...",clipboardFormat:"in die Zwischenablage kopieren...",jpegFormat:"speichern als jpeg",pngFormat:"speichern als png",pdfFormat:"speichern als pdf",none:"kein",small:"klein",large:"groß",cancel:"abbrechen"},zh:{title:"打印",orientation:"方向",portrait:"纵向",landscape:"横向",size:"页面大小",custom:"屏幕大小",margin:"外边距",scale:"尺度",legend:"图例",north:"指北针",mapTitle:"地图名字",saveas:"保存为...",saveLegend:"保存图例为...",copied:"✔ 已复制到剪贴板",errorMsg:"无法保存地图...",printBt:"打印...",cancel:"取消"}};Qn.prototype.paperSize={"":null,A0:[841,1189],A1:[594,841],A2:[420,594],A3:[297,420],A4:[210,297],"US Letter":[215.9,279.4],A5:[148,210],B4:[257,364],B5:[182,257]};Qn.prototype.marginSize={none:0,small:5,large:10};Qn.prototype.formats=[{title:"clipboardFormat",imageType:"image/png",clipboard:!0},{title:"jpegFormat",imageType:"image/jpeg",quality:.8},{title:"pngFormat",imageType:"image/png",quality:.8},{title:"pdfFormat",imageType:"image/jpeg",pdf:!0}];Qn.prototype.scales={" 5000":"1/5.000"," 10000":"1/10.000"," 25000":"1/25.000"," 50000":"1/50.000"," 100000":"1/100.000"," 250000":"1/250.000"," 1000000":"1/1.000.000"};Qn.prototype.getOrientation=function(){return this._orientation||"portrait"};Qn.prototype.setOrientation=function(r){this._orientation=r==="landscape"?"landscape":"portrait",this._input.orientation[this._orientation].checked=!0,this.setSize()};Qn.prototype.getMargin=function(){return this._margin||0};Qn.prototype.setMargin=function(r){this._margin=r,this._input.margin.value=r,this.setSize()};Qn.prototype.getSize=function(){return this._size};Qn.prototype.setSize=function(r){if(this._printDialog.getContentElement().setAttribute("data-status",""),r?this._size=r:r=this._size,!!r){if(typeof r=="string"){for(var e in this.paperSize)e&&new RegExp(e,"i").test(r)&&(r=e);this.paperSize[r]||(r=this._size="A4"),this._input.size.value=r,r=[Math.trunc(this.paperSize[r][0]*96/25.4),Math.trunc(this.paperSize[r][1]*96/25.4)],this.getOrientation()==="landscape"&&(r=[r[1],r[0]]),this.getPage().classList.remove("margin")}else this._input.size.value="",this.getPage().classList.add("margin");var t=this.getPage(),n=t.parentNode.getBoundingClientRect(),i=(n.width-40)/r[0],a=(n.height-40)/r[1],o=Math.min(i,a,1);t.style.width=r[0]+"px",t.style.height=r[1]+"px",t.style["-webkit-transform"]=t.style.transform="translate(-50%,-50%) scale("+o+")";var s=Math.round(5/o);t.style["-webkit-box-shadow"]=t.style["box-shadow"]=s+"px "+s+"px "+s+"px rgba(0,0,0,.6)",t.style.padding=this.getMargin()*96/25.4+"px",this.getMap()&&this.getMap().updateSize(),this.dispatchEvent({type:"dialog:refresh"})}};Qn.prototype.getContentElement=function(){return this._printDialog.getContentElement()};Qn.prototype.getUserElement=function(){return this._printDialog.getContentElement().querySelector(".ol-user-param")};Qn.prototype.getPage=function(){return this._pages[0]};Qn.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._compass),this.getMap().removeControl(this._printCtrl),this.getMap().removeControl(this._printDialog)),Nr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._compass),this.getMap().addControl(this._printCtrl),this.getMap().addControl(this._printDialog))};Qn.prototype.setScale=function(r){Jlt(this.getMap(),r),this._input.scale.value=" "+Math.round(r/100)*100};Qn.prototype.getScale=function(){return lI(this.getMap())};Qn.prototype.print=function(r){r=r||{},r.size&&this.setSize(r.size),r.scale&&this.setScale(r.scale),r.orientation&&this.setOrientation(r.orientation),r.margin&&this.setMargin(r.margin),this._printDialog.show()};Qn.prototype.getrintControl=function(){return this._printCtrl};var AR={exports:{}};(function(r,e){(function(t,n){n()})(rl,function(){function t(l,u){return typeof u>"u"?u={autoBom:!1}:typeof u!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),u={autoBom:!u}),u.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(l.type)?new Blob(["\uFEFF",l],{type:l.type}):l}function n(l,u,c){var h=new XMLHttpRequest;h.open("GET",l),h.responseType="blob",h.onload=function(){A(h.response,u,c)},h.onerror=function(){console.error("could not download file")},h.send()}function i(l){var u=new XMLHttpRequest;u.open("HEAD",l,!1);try{u.send()}catch{}return 200<=u.status&&299>=u.status}function a(l){try{l.dispatchEvent(new MouseEvent("click"))}catch{var u=document.createEvent("MouseEvents");u.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),l.dispatchEvent(u)}}var o=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof rl=="object"&&rl.global===rl?rl:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),A=o.saveAs||(typeof window!="object"||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(l,u,c){var h=o.URL||o.webkitURL,f=document.createElement("a");u=u||l.name||"download",f.download=u,f.rel="noopener",typeof l=="string"?(f.href=l,f.origin===location.origin?a(f):i(f.href)?n(l,u,c):a(f,f.target="_blank")):(f.href=h.createObjectURL(l),setTimeout(function(){h.revokeObjectURL(f.href)},4e4),setTimeout(function(){a(f)},0))}:"msSaveOrOpenBlob"in navigator?function(l,u,c){if(u=u||l.name||"download",typeof l!="string")navigator.msSaveOrOpenBlob(t(l,c),u);else if(i(l))n(l,u,c);else{var h=document.createElement("a");h.href=l,h.target="_blank",setTimeout(function(){a(h)})}}:function(l,u,c,h){if(h=h||open("","_blank"),h&&(h.document.title=h.document.body.innerText="downloading..."),typeof l=="string")return n(l,u,c);var f=l.type==="application/octet-stream",d=/constructor/i.test(o.HTMLElement)||o.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||f&&d||s)&&typeof FileReader<"u"){var m=new FileReader;m.onloadend=function(){var w=m.result;w=g?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),h?h.location.href=w:location=w,h=null},m.readAsDataURL(l)}else{var v=o.URL||o.webkitURL,y=v.createObjectURL(l);h?h.location=y:location.href=y,h=null,setTimeout(function(){v.revokeObjectURL(y)},4e4)}});o.saveAs=A.saveAs=A,r.exports=A})})(AR);function mn(r){return mn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mn(r)}var po=Uint8Array,go=Uint16Array,zy=Uint32Array,ZC=new po([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),JC=new po([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),uI=new po([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lG=function(r,e){for(var t=new go(31),n=0;n<31;++n)t[n]=e+=1<<r[n-1];for(var i=new zy(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]},uG=lG(ZC,2),cG=uG[0],cI=uG[1];cG[28]=258,cI[258]=28;var hG=lG(JC,0),tut=hG[0],S5=hG[1],hI=new go(32768);for(var Nn=0;Nn<32768;++Nn){var vc=(Nn&43690)>>>1|(Nn&21845)<<1;vc=(vc&52428)>>>2|(vc&13107)<<2,vc=(vc&61680)>>>4|(vc&3855)<<4,hI[Nn]=((vc&65280)>>>8|(vc&255)<<8)>>>1}var cl=function(r,e,t){for(var n=r.length,i=0,a=new go(e);i<n;++i)++a[r[i]-1];var o=new go(e);for(i=0;i<e;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(t){s=new go(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[hI[c]>>>A]=l}else for(s=new go(n),i=0;i<n;++i)s[i]=hI[o[r[i]-1]++]>>>15-r[i];return s},ph=new po(288);for(var Nn=0;Nn<144;++Nn)ph[Nn]=8;for(var Nn=144;Nn<256;++Nn)ph[Nn]=9;for(var Nn=256;Nn<280;++Nn)ph[Nn]=7;for(var Nn=280;Nn<288;++Nn)ph[Nn]=8;var Yy=new po(32);for(var Nn=0;Nn<32;++Nn)Yy[Nn]=5;var eut=cl(ph,9,0),rut=cl(ph,9,1),nut=cl(Yy,5,0),iut=cl(Yy,5,1),iT=function(r){for(var e=r[0],t=1;t<r.length;++t)r[t]>e&&(e=r[t]);return e},iA=function(r,e,t){var n=e/8>>0;return(r[n]|r[n+1]<<8)>>>(e&7)&t},aT=function(r,e){var t=e/8>>0;return(r[t]|r[t+1]<<8|r[t+2]<<16)>>>(e&7)},lR=function(r){return(r/8>>0)+(r&7&&1)},fG=function(r,e,t){(e==null||e<0)&&(e=0),(t==null||t>r.length)&&(t=r.length);var n=new(r instanceof go?go:r instanceof zy?zy:po)(t-e);return n.set(r.subarray(e,t)),n},aut=function(r,e,t){var n=r.length,i=!e||t,a=!t||t.i;t||(t={}),e||(e=new po(n*3));var o=function(J){var ot=e.length;if(J>ot){var ut=new po(Math.max(ot*2,J));ut.set(e),e=ut}},s=t.f||0,A=t.p||0,l=t.b||0,u=t.l,c=t.d,h=t.m,f=t.n,d=n*8;do{if(!u){t.f=s=iA(r,A,1);var g=iA(r,A+1,3);if(A+=3,g)if(g==1)u=rut,c=iut,h=9,f=5;else if(g==2){var w=iA(r,A,31)+257,C=iA(r,A+10,15)+4,O=w+iA(r,A+5,31)+1;A+=14;for(var F=new po(O),I=new po(19),T=0;T<C;++T)I[uI[T]]=iA(r,A+T*3,7);A+=C*3;var L=iT(I),N=(1<<L)-1;if(!a&&A+O*(L+7)>d)break;for(var x=cl(I,L,1),T=0;T<O;){var S=x[iA(r,A,N)];A+=S&15;var m=S>>>4;if(m<16)F[T++]=m;else{var P=0,U=0;for(m==16?(U=3+iA(r,A,3),A+=2,P=F[T-1]):m==17?(U=3+iA(r,A,7),A+=3):m==18&&(U=11+iA(r,A,127),A+=7);U--;)F[T++]=P}}var tt=F.subarray(0,w),q=F.subarray(w);h=iT(tt),f=iT(q),u=cl(tt,h,1),c=cl(q,f,1)}else throw"invalid block type";else{var m=lR(A)+4,v=r[m-4]|r[m-3]<<8,y=m+v;if(y>n){if(a)throw"unexpected EOF";break}i&&o(l+v),e.set(r.subarray(m,y),l),t.b=l+=v,t.p=A=y*8;continue}if(A>d)throw"unexpected EOF"}i&&o(l+131072);for(var rt=(1<<h)-1,nt=(1<<f)-1,At=h+f+18;a||A+At<d;){var P=u[aT(r,A)&rt],ct=P>>>4;if(A+=P&15,A>d)throw"unexpected EOF";if(!P)throw"invalid length/literal";if(ct<256)e[l++]=ct;else if(ct==256){u=null;break}else{var Tt=ct-254;if(ct>264){var T=ct-257,M=ZC[T];Tt=iA(r,A,(1<<M)-1)+cG[T],A+=M}var W=c[aT(r,A)&nt],Y=W>>>4;if(!W)throw"invalid distance";A+=W&15;var q=tut[Y];if(Y>3){var M=JC[Y];q+=aT(r,A)&(1<<M)-1,A+=M}if(A>d)throw"unexpected EOF";i&&o(l+131072);for(var H=l+Tt;l<H;l+=4)e[l]=e[l-q],e[l+1]=e[l+1-q],e[l+2]=e[l+2-q],e[l+3]=e[l+3-q];l=H}}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:fG(e,0,l)},Kl=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8},sm=function(r,e,t){t<<=e&7;var n=e/8>>0;r[n]|=t,r[n+1]|=t>>>8,r[n+2]|=t>>>16},oT=function(r,e){for(var t=[],n=0;n<r.length;++n)r[n]&&t.push({s:n,f:r[n]});var i=t.length,a=t.slice();if(!i)return[new po(0),0];if(i==1){var o=new po(t[0].s+1);return o[t[0].s]=1,[o,1]}t.sort(function(O,F){return O.f-F.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 go(h+1),d=fI(t[u-1],f,0);if(d>e){var n=0,g=0,m=d-e,v=1<<m;for(a.sort(function(F,I){return f[I.s]-f[F.s]||F.f-I.f});n<i;++n){var y=a[n].s;if(f[y]>e)g+=v-(1<<d-f[y]),f[y]=e;else break}for(g>>>=m;g>0;){var w=a[n].s;f[w]<e?g-=1<<e-f[w]++-1:++n}for(;n>=0&&g;--n){var C=a[n].s;f[C]==e&&(--f[C],++g)}d=e}return[new po(f),d]},fI=function(r,e,t){return r.s==-1?Math.max(fI(r.l,e,t+1),fI(r.r,e,t+1)):e[r.s]=t},x5=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new go(++e),n=0,i=r[0],a=1,o=function(A){t[n++]=A},s=1;s<=e;++s)if(r[s]==i&&s!=e)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=r[s]}return[t.subarray(0,n),e]},Am=function(r,e){for(var t=0,n=0;n<e.length;++n)t+=r[n]*e[n];return t},lw=function(r,e,t){var n=t.length,i=lR(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},I5=function(r,e,t,n,i,a,o,s,A,l,u){Kl(e,u++,t),++i[256];for(var c=oT(i,15),h=c[0],f=c[1],d=oT(a,15),g=d[0],m=d[1],v=x5(h),y=v[0],w=v[1],C=x5(g),O=C[0],F=C[1],I=new go(19),T=0;T<y.length;++T)I[y[T]&31]++;for(var T=0;T<O.length;++T)I[O[T]&31]++;for(var L=oT(I,7),N=L[0],x=L[1],S=19;S>4&&!N[uI[S-1]];--S);var P=l+5<<3,U=Am(i,ph)+Am(a,Yy)+o,tt=Am(i,h)+Am(a,g)+o+14+3*S+Am(I,N)+(2*I[16]+3*I[17]+7*I[18]);if(P<=U&&P<=tt)return lw(e,u,r.subarray(A,A+l));var q,rt,nt,At;if(Kl(e,u,1+(tt<U)),u+=2,tt<U){q=cl(h,f,0),rt=h,nt=cl(g,m,0),At=g;var ct=cl(N,x,0);Kl(e,u,w-257),Kl(e,u+5,F-1),Kl(e,u+10,S-4),u+=14;for(var T=0;T<S;++T)Kl(e,u+3*T,N[uI[T]]);u+=3*S;for(var Tt=[y,O],M=0;M<2;++M)for(var W=Tt[M],T=0;T<W.length;++T){var Y=W[T]&31;Kl(e,u,ct[Y]),u+=N[Y],Y>15&&(Kl(e,u,W[T]>>>5&127),u+=W[T]>>>12)}}else q=eut,rt=ph,nt=nut,At=Yy;for(var T=0;T<s;++T)if(n[T]>255){var Y=n[T]>>>18&31;sm(e,u,q[Y+257]),u+=rt[Y+257],Y>7&&(Kl(e,u,n[T]>>>23&31),u+=ZC[Y]);var H=n[T]&31;sm(e,u,nt[H]),u+=At[H],H>3&&(sm(e,u,n[T]>>>5&8191),u+=JC[H])}else sm(e,u,q[n[T]]),u+=rt[n[T]];return sm(e,u,q[256]),u+rt[256]},out=new zy([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sut=new po(0),Aut=function(r,e,t,n,i,a){var o=r.length,s=new po(n+o+5*(1+Math.floor(o/7e3))+i),A=s.subarray(n,s.length-i),l=0;if(!e||o<8)for(var u=0;u<=o;u+=65535){var c=u+65535;c<o?l=lw(A,l,r.subarray(u,c)):(A[u]=a,l=lw(A,l,r.subarray(u,o)))}else{for(var h=out[e-1],f=h>>>13,d=h&8191,g=(1<<t)-1,m=new go(32768),v=new go(g+1),y=Math.ceil(t/3),w=2*y,C=function(ft){return(r[ft]^r[ft+1]<<y^r[ft+2]<<w)&g},O=new zy(25e3),F=new go(288),I=new go(32),T=0,L=0,u=0,N=0,x=0,S=0;u<o;++u){var P=C(u),U=u&32767,tt=v[P];if(m[U]=tt,v[P]=U,x<=u){var q=o-u;if((T>7e3||N>24576)&&q>423){l=I5(r,A,0,O,F,I,L,N,S,u-S,l),N=T=L=0,S=u;for(var rt=0;rt<286;++rt)F[rt]=0;for(var rt=0;rt<30;++rt)I[rt]=0}var nt=2,At=0,ct=d,Tt=U-tt&32767;if(q>2&&P==C(u-Tt))for(var M=Math.min(f,q)-1,W=Math.min(32767,u),Y=Math.min(258,q);Tt<=W&&--ct&&U!=tt;){if(r[u+nt]==r[u+nt-Tt]){for(var H=0;H<Y&&r[u+H]==r[u+H-Tt];++H);if(H>nt){if(nt=H,At=Tt,H>M)break;for(var J=Math.min(Tt,H-2),ot=0,rt=0;rt<J;++rt){var ut=u-Tt+rt+32768&32767,X=m[ut],It=ut-X+32768&32767;It>ot&&(ot=It,tt=ut)}}}U=tt,tt=m[U],Tt+=U-tt+32768&32767}if(At){O[N++]=268435456|cI[nt]<<18|S5[At];var at=cI[nt]&31,j=S5[At]&31;L+=ZC[at]+JC[j],++F[257+at],++I[j],x=u+nt,++T}else O[N++]=r[u],++F[r[u]]}}l=I5(r,A,a,O,F,I,L,N,S,u-S,l),a||(l=lw(A,l,sut))}return fG(s,0,n+lR(l)+i)},lut=function(){var r=1,e=0;return{p:function(t){for(var n=r,i=e,a=t.length,o=0;o!=a;){for(var s=Math.min(o+5552,a);o<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}}},uut=function(r,e,t,n,i){return Aut(r,e.level==null?6:e.level,e.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):12+e.mem,t,n,!i)},cut=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},hut=function(r,e){var t=e.level,n=t==0?0:t<6?1:t==9?3:2;r[0]=120,r[1]=n<<6|(n?32-2*n:1)},fut=function(r){if((r[0]&15)!=8||r[0]>>>4>7||(r[0]<<8|r[1])%31)throw"invalid zlib data";if(r[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function dI(r,e){e===void 0&&(e={});var t=lut();t.p(r);var n=uut(r,e,2,4);return hut(n,e),cut(n,n.length-4,t.d()),n}function dut(r,e){return aut((fut(r),r.subarray(2,-4)),e)}/** @license
*
* jsPDF - PDF Document creation from JavaScript
* Version 2.5.0 Built on 2021-12-21T09:44:51.866Z
* CommitID 00000000
*
* Copyright (c) 2010-2021 James Hall <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 Ye=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function sT(){Ye.console&&typeof Ye.console.log=="function"&&Ye.console.log.apply(Ye.console,arguments)}var Bn={log:sT,warn:function(r){Ye.console&&(typeof Ye.console.warn=="function"?Ye.console.warn.apply(Ye.console,arguments):sT.call(null,arguments))},error:function(r){Ye.console&&(typeof Ye.console.error=="function"?Ye.console.error.apply(Ye.console,arguments):sT(r))}};function AT(r,e,t){var n=new XMLHttpRequest;n.open("GET",r),n.responseType="blob",n.onload=function(){vf(n.response,e,t)},n.onerror=function(){Bn.error("could not download file")},n.send()}function L5(r){var e=new XMLHttpRequest;e.open("HEAD",r,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function r1(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var sy,pI,vf=Ye.saveAs||((typeof window>"u"?"undefined":mn(window))!=="object"||window!==Ye?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var n=Ye.URL||Ye.webkitURL,i=document.createElement("a");e=e||r.name||"download",i.download=e,i.rel="noopener",typeof r=="string"?(i.href=r,i.origin!==location.origin?L5(i.href)?AT(r,e,t):r1(i,i.target="_blank"):r1(i)):(i.href=n.createObjectURL(r),setTimeout(function(){n.revokeObjectURL(i.href)},4e4),setTimeout(function(){r1(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(L5(r))AT(r,e,t);else{var n=document.createElement("a");n.href=r,n.target="_blank",setTimeout(function(){r1(n)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:mn(a)!=="object"&&(Bn.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob([String.fromCharCode(65279),i],{type:i.type}):i}(r,t),e)}:function(r,e,t,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),typeof r=="string")return AT(r,e,t);var i=r.type==="application/octet-stream",a=/constructor/i.test(Ye.HTMLElement)||Ye.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>"u"?"undefined":mn(FileReader))==="object"){var s=new FileReader;s.onloadend=function(){var u=s.result;u=o?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=u:location=u,n=null},s.readAsDataURL(r)}else{var A=Ye.URL||Ye.webkitURL,l=A.createObjectURL(r);n?n.location=l:location.href=l,n=null,setTimeout(function(){A.revokeObjectURL(l)},4e4)}});/**
* A class to parse color values
* @author Stoyan Stefanov <sstoo@gmail.com>
* {@link http://www.phpied.com/rgb-color-parser-in-javascript/}
* @license Use it if you like it
*/function dG(r){var e;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(s){return[parseInt(s[1]),parseInt(s[2]),parseInt(s[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}}],n=0;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 lT(r,e){var t=r[0],n=r[1],i=r[2],a=r[3];t=Ua(t,n,i,a,e[0],7,-680876936),a=Ua(a,t,n,i,e[1],12,-389564586),i=Ua(i,a,t,n,e[2],17,606105819),n=Ua(n,i,a,t,e[3],22,-1044525330),t=Ua(t,n,i,a,e[4],7,-176418897),a=Ua(a,t,n,i,e[5],12,1200080426),i=Ua(i,a,t,n,e[6],17,-1473231341),n=Ua(n,i,a,t,e[7],22,-45705983),t=Ua(t,n,i,a,e[8],7,1770035416),a=Ua(a,t,n,i,e[9],12,-1958414417),i=Ua(i,a,t,n,e[10],17,-42063),n=Ua(n,i,a,t,e[11],22,-1990404162),t=Ua(t,n,i,a,e[12],7,1804603682),a=Ua(a,t,n,i,e[13],12,-40341101),i=Ua(i,a,t,n,e[14],17,-1502002290),t=Da(t,n=Ua(n,i,a,t,e[15],22,1236535329),i,a,e[1],5,-165796510),a=Da(a,t,n,i,e[6],9,-1069501632),i=Da(i,a,t,n,e[11],14,643717713),n=Da(n,i,a,t,e[0],20,-373897302),t=Da(t,n,i,a,e[5],5,-701558691),a=Da(a,t,n,i,e[10],9,38016083),i=Da(i,a,t,n,e[15],14,-660478335),n=Da(n,i,a,t,e[4],20,-405537848),t=Da(t,n,i,a,e[9],5,568446438),a=Da(a,t,n,i,e[14],9,-1019803690),i=Da(i,a,t,n,e[3],14,-187363961),n=Da(n,i,a,t,e[8],20,1163531501),t=Da(t,n,i,a,e[13],5,-1444681467),a=Da(a,t,n,i,e[2],9,-51403784),i=Da(i,a,t,n,e[7],14,1735328473),t=Qa(t,n=Da(n,i,a,t,e[12],20,-1926607734),i,a,e[5],4,-378558),a=Qa(a,t,n,i,e[8],11,-2022574463),i=Qa(i,a,t,n,e[11],16,1839030562),n=Qa(n,i,a,t,e[14],23,-35309556),t=Qa(t,n,i,a,e[1],4,-1530992060),a=Qa(a,t,n,i,e[4],11,1272893353),i=Qa(i,a,t,n,e[7],16,-155497632),n=Qa(n,i,a,t,e[10],23,-1094730640),t=Qa(t,n,i,a,e[13],4,681279174),a=Qa(a,t,n,i,e[0],11,-358537222),i=Qa(i,a,t,n,e[3],16,-722521979),n=Qa(n,i,a,t,e[6],23,76029189),t=Qa(t,n,i,a,e[9],4,-640364487),a=Qa(a,t,n,i,e[12],11,-421815835),i=Qa(i,a,t,n,e[15],16,530742520),t=ka(t,n=Qa(n,i,a,t,e[2],23,-995338651),i,a,e[0],6,-198630844),a=ka(a,t,n,i,e[7],10,1126891415),i=ka(i,a,t,n,e[14],15,-1416354905),n=ka(n,i,a,t,e[5],21,-57434055),t=ka(t,n,i,a,e[12],6,1700485571),a=ka(a,t,n,i,e[3],10,-1894986606),i=ka(i,a,t,n,e[10],15,-1051523),n=ka(n,i,a,t,e[1],21,-2054922799),t=ka(t,n,i,a,e[8],6,1873313359),a=ka(a,t,n,i,e[15],10,-30611744),i=ka(i,a,t,n,e[6],15,-1560198380),n=ka(n,i,a,t,e[13],21,1309151649),t=ka(t,n,i,a,e[4],6,-145523070),a=ka(a,t,n,i,e[11],10,-1120210379),i=ka(i,a,t,n,e[2],15,718787259),n=ka(n,i,a,t,e[9],21,-343485551),r[0]=kc(t,r[0]),r[1]=kc(n,r[1]),r[2]=kc(i,r[2]),r[3]=kc(a,r[3])}function tB(r,e,t,n,i,a){return e=kc(kc(e,r),kc(n,a)),kc(e<<i|e>>>32-i,t)}function Ua(r,e,t,n,i,a,o){return tB(e&t|~e&n,r,e,i,a,o)}function Da(r,e,t,n,i,a,o){return tB(e&n|t&~n,r,e,i,a,o)}function Qa(r,e,t,n,i,a,o){return tB(e^t^n,r,e,i,a,o)}function ka(r,e,t,n,i,a,o){return tB(t^(e|~n),r,e,i,a,o)}function pG(r){var e,t=r.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=r.length;e+=64)lT(n,put(r.substring(e-64,e)));r=r.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<r.length;e++)i[e>>2]|=r.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(lT(n,i),e=0;e<16;e++)i[e]=0;return i[14]=8*t,lT(n,i),n}function put(r){var e,t=[];for(e=0;e<64;e+=4)t[e>>2]=r.charCodeAt(e)+(r.charCodeAt(e+1)<<8)+(r.charCodeAt(e+2)<<16)+(r.charCodeAt(e+3)<<24);return t}sy=Ye.atob.bind(Ye),pI=Ye.btoa.bind(Ye);var O5="0123456789abcdef".split("");function gut(r){for(var e="",t=0;t<4;t++)e+=O5[r>>8*t+4&15]+O5[r>>8*t&15];return e}function vut(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function gI(r){return pG(r).map(vut).join("")}var mut=function(r){for(var e=0;e<r.length;e++)r[e]=gut(r[e]);return r.join("")}(pG("hello"))!="5d41402abc4b2a76b9719d911017c592";function kc(r,e){if(mut){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 vI(r,e){var t,n,i,a;if(r!==t){for(var o=(i=r,a=1+(256/r.length>>0),new Array(a+1).join(i)),s=[],A=0;A<256;A++)s[A]=A;var l=0;for(A=0;A<256;A++){var u=s[A];l=(l+u+o.charCodeAt(A))%256,s[A]=s[l],s[l]=u}t=r,n=s}else s=n;var c=e.length,h=0,f=0,d="";for(A=0;A<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],d+=String.fromCharCode(e.charCodeAt(A)^o);return d}/**
* @license
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
* Author: Owen Leong (@owenl131)
* Date: 15 Oct 2020
* References:
* https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
* https://github.com/foliojs/pdfkit/blob/master/lib/security.js
* http://www.fpdf.org/en/script/script37.php
*/var F5={print:4,modify:8,copy:16,"annot-forms":32};function kp(r,e,t,n){this.v=1,this.r=2;var i=192;r.forEach(function(s){if(F5.perm!==void 0)throw new Error("Invalid permission: "+s);i+=F5[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=gI(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=vI(this.encryptionKey,this.padding)}function Hp(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var e="",t=r.length,n=0;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 R5(r){if(mn(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,n,i){if(i=i||!1,typeof t!="string"||typeof n!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var a=Math.random().toString(35);return e[t][a]=[n,!!i],a},this.unsubscribe=function(t){for(var n in e)if(e[n][t])return delete e[n][t],Object.keys(e[n]).length===0&&delete e[n],!0;return!1},this.publish=function(t){if(e.hasOwnProperty(t)){var n=Array.prototype.slice.call(arguments,1),i=[];for(var a in e[t]){var o=e[t][a];try{o[0].apply(r,n)}catch(s){Ye.console&&Bn.error("jsPDF PubSub Error",s.message,s)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function pE(r){if(!(this instanceof pE))return new pE(r);var e="opacity,stroke-opacity".split(",");for(var t in r)r.hasOwnProperty(t)&&e.indexOf(t)>=0&&(this[t]=r[t]);this.id="",this.objectNumber=-1}function gG(r,e){this.gState=r,this.matrix=e,this.id="",this.objectNumber=-1}function Ef(r,e,t,n,i){if(!(this instanceof Ef))return new Ef(r,e,t,n,i);this.type=r==="axial"?2:3,this.coords=e,this.colors=t,gG.call(this,n,i)}function tg(r,e,t,n,i){if(!(this instanceof tg))return new tg(r,e,t,n,i);this.boundingBox=r,this.xStep=e,this.yStep=t,this.stream="",this.cloneIndex=0,gG.call(this,n,i)}function Ke(r){var e,t=typeof arguments[0]=="string"?arguments[0]:"p",n=arguments[1],i=arguments[2],a=arguments[3],o=[],s=1,A=16,l="S",u=null;mn(r=r||{})==="object"&&(t=r.orientation,n=r.unit||n,i=r.format||i,a=r.compress||r.compressPdf||a,(u=r.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),s=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(e=r.precision),r.floatPrecision!==void 0&&(A=r.floatPrecision),l=r.defaultPathOperation||"S"),o=r.filters||(a===!0?["FlateEncode"]:o),n=n||"mm",t=(""+(t||"P")).toLowerCase();var c=r.putOnlyUsedFonts||!1,h={},f={internal:{},__private__:{}};f.__private__.PubSub=R5;var d="1.3",g=f.__private__.getPdfVersion=function(){return d};f.__private__.setPdfVersion=function(E){d=E};var m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return m};var v=f.__private__.getPageFormat=function(E){return m[E]};i=i||"a4";var y={COMPAT:"compat",ADVANCED:"advanced"},w=y.COMPAT;function C(){this.saveGraphicsState(),V(new Ue(qt,0,0,-qt,0,qs()*qt).toString()+" cm"),this.setFontSize(this.getFontSize()/qt),l="n",w=y.ADVANCED}function O(){this.restoreGraphicsState(),l="S",w=y.COMPAT}var F=f.__private__.combineFontStyleAndFontWeight=function(E,k){if(E=="bold"&&k=="normal"||E=="bold"&&k==400||E=="normal"&&k=="italic"||E=="bold"&&k=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return k&&(E=k==400||k==="normal"?E==="italic"?"italic":"normal":k!=700&&k!=="bold"||E!=="normal"?(k==700?"bold":k)+""+E:"bold"),E};f.advancedAPI=function(E){var k=w===y.COMPAT;return k&&C.call(this),typeof E!="function"||(E(this),k&&O.call(this)),this},f.compatAPI=function(E){var k=w===y.ADVANCED;return k&&O.call(this),typeof E!="function"||(E(this),k&&C.call(this)),this},f.isAdvancedAPI=function(){return w===y.ADVANCED};var I,T=function(E){if(w!==y.ADVANCED)throw new Error(E+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},L=f.roundToPrecision=f.__private__.roundToPrecision=function(E,k){var st=e||k;if(isNaN(E)||isNaN(st))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return E.toFixed(st).replace(/0+$/,"")};I=f.hpf=f.__private__.hpf=typeof A=="number"?function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,A)}:A==="smart"?function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,E>-1&&E<1?16:5)}:function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.hpf");return L(E,16)};var N=f.f2=f.__private__.f2=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.f2");return L(E,2)},x=f.__private__.f3=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.f3");return L(E,3)},S=f.scale=f.__private__.scale=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.scale");return w===y.COMPAT?E*qt:w===y.ADVANCED?E:void 0},P=function(E){return w===y.COMPAT?qs()-E:w===y.ADVANCED?E:void 0},U=function(E){return S(P(E))};f.__private__.setPrecision=f.setPrecision=function(E){typeof parseInt(E,10)=="number"&&(e=parseInt(E,10))};var tt,q="00000000000000000000000000000000",rt=f.__private__.getFileId=function(){return q},nt=f.__private__.setFileId=function(E){return q=E!==void 0&&/^[a-fA-F0-9]{32}$/.test(E)?E.toUpperCase():q.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(ta=new kp(u.userPermissions,u.userPassword,u.ownerPassword,q)),q};f.setFileId=function(E){return nt(E),this},f.getFileId=function(){return rt()};var At=f.__private__.convertDateToPDFDate=function(E){var k=E.getTimezoneOffset(),st=k<0?"+":"-",gt=Math.floor(Math.abs(k/60)),xt=Math.abs(k%60),Ut=[st,Y(gt),"'",Y(xt),"'"].join("");return["D:",E.getFullYear(),Y(E.getMonth()+1),Y(E.getDate()),Y(E.getHours()),Y(E.getMinutes()),Y(E.getSeconds()),Ut].join("")},ct=f.__private__.convertPDFDateToDate=function(E){var k=parseInt(E.substr(2,4),10),st=parseInt(E.substr(6,2),10)-1,gt=parseInt(E.substr(8,2),10),xt=parseInt(E.substr(10,2),10),Ut=parseInt(E.substr(12,2),10),Yt=parseInt(E.substr(14,2),10);return new Date(k,st,gt,xt,Ut,Yt,0)},Tt=f.__private__.setCreationDate=function(E){var k;if(E===void 0&&(E=new Date),E instanceof Date)k=At(E);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(E))throw new Error("Invalid argument passed to jsPDF.setCreationDate");k=E}return tt=k},M=f.__private__.getCreationDate=function(E){var k=tt;return E==="jsDate"&&(k=ct(tt)),k};f.setCreationDate=function(E){return Tt(E),this},f.getCreationDate=function(E){return M(E)};var W,Y=f.__private__.padd2=function(E){return("0"+parseInt(E)).slice(-2)},H=f.__private__.padd2Hex=function(E){return("00"+(E=E.toString())).substr(E.length)},J=0,ot=[],ut=[],X=0,It=[],at=[],j=!1,Z=ut,ft=function(){J=0,X=0,ut=[],ot=[],It=[],de=Br(),_t=Br()};f.__private__.setCustomOutputDestination=function(E){j=!0,Z=E};var it=function(E){j||(Z=E)};f.__private__.resetCustomOutputDestination=function(){j=!1,Z=ut};var V=f.__private__.out=function(E){return E=E.toString(),X+=E.length+1,Z.push(E),Z},Ft=f.__private__.write=function(E){return V(arguments.length===1?E.toString():Array.prototype.join.call(arguments," "))},Mt=f.__private__.getArrayBuffer=function(E){for(var k=E.length,st=new ArrayBuffer(k),gt=new Uint8Array(st);k--;)gt[k]=E.charCodeAt(k);return st},Et=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];f.__private__.getStandardFonts=function(){return Et};var Bt=r.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(E){return Bt=w===y.ADVANCED?E/qt:E,this};var Ct,Rt=f.__private__.getFontSize=f.getFontSize=function(){return w===y.COMPAT?Bt:Bt*qt},Nt=r.R2L||!1;f.__private__.setR2L=f.setR2L=function(E){return Nt=E,this},f.__private__.getR2L=f.getR2L=function(){return Nt};var Dt,Wt=f.__private__.setZoomMode=function(E){var k=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^\d*\.?\d*%$/.test(E))Ct=E;else if(isNaN(E)){if(k.indexOf(E)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+E+'" is not recognized.');Ct=E}else Ct=parseInt(E,10)};f.__private__.getZoomMode=function(){return Ct};var te,Ae=f.__private__.setPageMode=function(E){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(E)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+E+'" is not recognized.');Dt=E};f.__private__.getPageMode=function(){return Dt};var oe=f.__private__.setLayoutMode=function(E){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(E)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+E+'" is not recognized.');te=E};f.__private__.getLayoutMode=function(){return te},f.__private__.setDisplayMode=f.setDisplayMode=function(E,k,st){return Wt(E),oe(k),Ae(st),this};var Jt={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(E){if(Object.keys(Jt).indexOf(E)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Jt[E]},f.__private__.getDocumentProperties=function(){return Jt},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(E){for(var k in Jt)Jt.hasOwnProperty(k)&&E[k]&&(Jt[k]=E[k]);return this},f.__private__.setDocumentProperty=function(E,k){if(Object.keys(Jt).indexOf(E)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Jt[E]=k};var fe,qt,nr,ke,wr,Ne={},Pe={},Hr=[],se={},hi={},gr={},ei={},Wr=null,zr=0,He=[],Ir=new R5(f),Gn=r.hotfixes||[],yn={},fi={},di=[],Ue=function E(k,st,gt,xt,Ut,Yt){if(!(this instanceof E))return new E(k,st,gt,xt,Ut,Yt);isNaN(k)&&(k=1),isNaN(st)&&(st=0),isNaN(gt)&&(gt=0),isNaN(xt)&&(xt=1),isNaN(Ut)&&(Ut=0),isNaN(Yt)&&(Yt=0),this._matrix=[k,st,gt,xt,Ut,Yt]};Object.defineProperty(Ue.prototype,"sx",{get:function(){return this._matrix[0]},set:function(E){this._matrix[0]=E}}),Object.defineProperty(Ue.prototype,"shy",{get:function(){return this._matrix[1]},set:function(E){this._matrix[1]=E}}),Object.defineProperty(Ue.prototype,"shx",{get:function(){return this._matrix[2]},set:function(E){this._matrix[2]=E}}),Object.defineProperty(Ue.prototype,"sy",{get:function(){return this._matrix[3]},set:function(E){this._matrix[3]=E}}),Object.defineProperty(Ue.prototype,"tx",{get:function(){return this._matrix[4]},set:function(E){this._matrix[4]=E}}),Object.defineProperty(Ue.prototype,"ty",{get:function(){return this._matrix[5]},set:function(E){this._matrix[5]=E}}),Object.defineProperty(Ue.prototype,"a",{get:function(){return this._matrix[0]},set:function(E){this._matrix[0]=E}}),Object.defineProperty(Ue.prototype,"b",{get:function(){return this._matrix[1]},set:function(E){this._matrix[1]=E}}),Object.defineProperty(Ue.prototype,"c",{get:function(){return this._matrix[2]},set:function(E){this._matrix[2]=E}}),Object.defineProperty(Ue.prototype,"d",{get:function(){return this._matrix[3]},set:function(E){this._matrix[3]=E}}),Object.defineProperty(Ue.prototype,"e",{get:function(){return this._matrix[4]},set:function(E){this._matrix[4]=E}}),Object.defineProperty(Ue.prototype,"f",{get:function(){return this._matrix[5]},set:function(E){this._matrix[5]=E}}),Object.defineProperty(Ue.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ue.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ue.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ue.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ue.prototype.join=function(E){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(I).join(E)},Ue.prototype.multiply=function(E){var k=E.sx*this.sx+E.shy*this.shx,st=E.sx*this.shy+E.shy*this.sy,gt=E.shx*this.sx+E.sy*this.shx,xt=E.shx*this.shy+E.sy*this.sy,Ut=E.tx*this.sx+E.ty*this.shx+this.tx,Yt=E.tx*this.shy+E.ty*this.sy+this.ty;return new Ue(k,st,gt,xt,Ut,Yt)},Ue.prototype.decompose=function(){var E=this.sx,k=this.shy,st=this.shx,gt=this.sy,xt=this.tx,Ut=this.ty,Yt=Math.sqrt(E*E+k*k),ce=(E/=Yt)*st+(k/=Yt)*gt;st-=E*ce,gt-=k*ce;var De=Math.sqrt(st*st+gt*gt);return ce/=De,E*(gt/=De)<k*(st/=De)&&(E=-E,k=-k,ce=-ce,Yt=-Yt),{scale:new Ue(Yt,0,0,De,0,0),translate:new Ue(1,0,0,1,xt,Ut),rotate:new Ue(E,k,-k,E,0,0),skew:new Ue(1,0,ce,1,0,0)}},Ue.prototype.toString=function(E){return this.join(" ")},Ue.prototype.inversed=function(){var E=this.sx,k=this.shy,st=this.shx,gt=this.sy,xt=this.tx,Ut=this.ty,Yt=1/(E*gt-k*st),ce=gt*Yt,De=-k*Yt,vr=-st*Yt,ir=E*Yt;return new Ue(ce,De,vr,ir,-ce*xt-vr*Ut,-De*xt-ir*Ut)},Ue.prototype.applyToPoint=function(E){var k=E.x*this.sx+E.y*this.shx+this.tx,st=E.x*this.shy+E.y*this.sy+this.ty;return new Wu(k,st)},Ue.prototype.applyToRectangle=function(E){var k=this.applyToPoint(E),st=this.applyToPoint(new Wu(E.x+E.w,E.y+E.h));return new Gh(k.x,k.y,st.x-k.x,st.y-k.y)},Ue.prototype.clone=function(){var E=this.sx,k=this.shy,st=this.shx,gt=this.sy,xt=this.tx,Ut=this.ty;return new Ue(E,k,st,gt,xt,Ut)},f.Matrix=Ue;var ri=f.matrixMult=function(E,k){return k.multiply(E)},Cn=new Ue(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Cn;var pi=function(E,k){if(!hi[E]){var st=(k instanceof Ef?"Sh":"P")+(Object.keys(se).length+1).toString(10);k.id=st,hi[E]=st,se[st]=k,Ir.publish("addPattern",k)}};f.ShadingPattern=Ef,f.TilingPattern=tg,f.addShadingPattern=function(E,k){return T("addShadingPattern()"),pi(E,k),this},f.beginTilingPattern=function(E){T("beginTilingPattern()"),tp(E.boundingBox[0],E.boundingBox[1],E.boundingBox[2]-E.boundingBox[0],E.boundingBox[3]-E.boundingBox[1],E.matrix)},f.endTilingPattern=function(E,k){T("endTilingPattern()"),k.stream=at[W].join(`
`),pi(E,k),Ir.publish("endTilingPattern",k),di.pop().restore()};var cn=f.__private__.newObject=function(){var E=Br();return _n(E,!0),E},Br=f.__private__.newObjectDeferred=function(){return J++,ot[J]=function(){return X},J},_n=function(E,k){return k=typeof k=="boolean"&&k,ot[E]=X,k&&V(E+" 0 obj"),E},eo=f.__private__.newAdditionalObject=function(){var E={objId:Br(),content:""};return It.push(E),E},de=Br(),_t=Br(),$t=f.__private__.decodeColorString=function(E){var k=E.split(" ");if(k.length!==2||k[1]!=="g"&&k[1]!=="G")k.length===5&&(k[4]==="k"||k[4]==="K")&&(k=[(1-k[0])*(1-k[3]),(1-k[1])*(1-k[3]),(1-k[2])*(1-k[3]),"r"]);else{var st=parseFloat(k[0]);k=[st,st,st,"r"]}for(var gt="#",xt=0;xt<3;xt++)gt+=("0"+Math.floor(255*parseFloat(k[xt])).toString(16)).slice(-2);return gt},ne=f.__private__.encodeColorString=function(E){var k;typeof E=="string"&&(E={ch1:E});var st=E.ch1,gt=E.ch2,xt=E.ch3,Ut=E.ch4,Yt=E.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof st=="string"&&st.charAt(0)!=="#"){var ce=new dG(st);if(ce.ok)st=ce.toHex();else if(!/^\d*\.?\d*$/.test(st))throw new Error('Invalid color "'+st+'" passed to jsPDF.encodeColorString.')}if(typeof st=="string"&&/^#[0-9A-Fa-f]{3}$/.test(st)&&(st="#"+st[1]+st[1]+st[2]+st[2]+st[3]+st[3]),typeof st=="string"&&/^#[0-9A-Fa-f]{6}$/.test(st)){var De=parseInt(st.substr(1),16);st=De>>16&255,gt=De>>8&255,xt=255&De}if(gt===void 0||Ut===void 0&&st===gt&&gt===xt)if(typeof st=="string")k=st+" "+Yt[0];else switch(E.precision){case 2:k=N(st/255)+" "+Yt[0];break;case 3:default:k=x(st/255)+" "+Yt[0]}else if(Ut===void 0||mn(Ut)==="object"){if(Ut&&!isNaN(Ut.a)&&Ut.a===0)return k=["1.","1.","1.",Yt[1]].join(" ");if(typeof st=="string")k=[st,gt,xt,Yt[1]].join(" ");else switch(E.precision){case 2:k=[N(st/255),N(gt/255),N(xt/255),Yt[1]].join(" ");break;default:case 3:k=[x(st/255),x(gt/255),x(xt/255),Yt[1]].join(" ")}}else if(typeof st=="string")k=[st,gt,xt,Ut,Yt[2]].join(" ");else switch(E.precision){case 2:k=[N(st),N(gt),N(xt),N(Ut),Yt[2]].join(" ");break;case 3:default:k=[x(st),x(gt),x(xt),x(Ut),Yt[2]].join(" ")}return k},Ze=f.__private__.getFilters=function(){return o},Lr=f.__private__.putStream=function(E){var k=(E=E||{}).data||"",st=E.filters||Ze(),gt=E.alreadyAppliedFilters||[],xt=E.addLength1||!1,Ut=k.length,Yt=E.objectId,ce=function(ea){return ea};if(u!==null&&Yt===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(ce=ta.encryptor(Yt,0));var De={};st===!0&&(st=["FlateEncode"]);var vr=E.additionalKeyValues||[],ir=(De=Ke.API.processDataByFilters!==void 0?Ke.API.processDataByFilters(k,st):{data:k,reverseChain:[]}).reverseChain+(Array.isArray(gt)?gt.join(" "):gt.toString());if(De.data.length!==0&&(vr.push({key:"Length",value:De.data.length}),xt===!0&&vr.push({key:"Length1",value:Ut})),ir.length!=0)if(ir.split("/").length-1==1)vr.push({key:"Filter",value:ir});else{vr.push({key:"Filter",value:"["+ir+"]"});for(var br=0;br<vr.length;br+=1)if(vr[br].key==="DecodeParms"){for(var Gi=[],Vn=0;Vn<De.reverseChain.split("/").length-1;Vn+=1)Gi.push("null");Gi.push(vr[br].value),vr[br].value="["+Gi.join(" ")+"]"}}V("<<");for(var ni=0;ni<vr.length;ni++)V("/"+vr[ni].key+" "+vr[ni].value);V(">>"),De.data.length!==0&&(V("stream"),V(ce(De.data)),V("endstream"))},hn=f.__private__.putPage=function(E){var k=E.number,st=E.data,gt=E.objId,xt=E.contentsObjId;_n(gt,!0),V("<</Type /Page"),V("/Parent "+E.rootDictionaryObjId+" 0 R"),V("/Resources "+E.resourceDictionaryObjId+" 0 R"),V("/MediaBox ["+parseFloat(I(E.mediaBox.bottomLeftX))+" "+parseFloat(I(E.mediaBox.bottomLeftY))+" "+I(E.mediaBox.topRightX)+" "+I(E.mediaBox.topRightY)+"]"),E.cropBox!==null&&V("/CropBox ["+I(E.cropBox.bottomLeftX)+" "+I(E.cropBox.bottomLeftY)+" "+I(E.cropBox.topRightX)+" "+I(E.cropBox.topRightY)+"]"),E.bleedBox!==null&&V("/BleedBox ["+I(E.bleedBox.bottomLeftX)+" "+I(E.bleedBox.bottomLeftY)+" "+I(E.bleedBox.topRightX)+" "+I(E.bleedBox.topRightY)+"]"),E.trimBox!==null&&V("/TrimBox ["+I(E.trimBox.bottomLeftX)+" "+I(E.trimBox.bottomLeftY)+" "+I(E.trimBox.topRightX)+" "+I(E.trimBox.topRightY)+"]"),E.artBox!==null&&V("/ArtBox ["+I(E.artBox.bottomLeftX)+" "+I(E.artBox.bottomLeftY)+" "+I(E.artBox.topRightX)+" "+I(E.artBox.topRightY)+"]"),typeof E.userUnit=="number"&&E.userUnit!==1&&V("/UserUnit "+E.userUnit),Ir.publish("putPage",{objId:gt,pageContext:He[k],pageNumber:k,page:st}),V("/Contents "+xt+" 0 R"),V(">>"),V("endobj");var Ut=st.join(`
`);return w===y.ADVANCED&&(Ut+=`
Q`),_n(xt,!0),Lr({data:Ut,filters:Ze(),objectId:xt}),V("endobj"),gt},fn=f.__private__.putPages=function(){var E,k,st=[];for(E=1;E<=zr;E++)He[E].objId=Br(),He[E].contentsObjId=Br();for(E=1;E<=zr;E++)st.push(hn({number:E,data:at[E],objId:He[E].objId,contentsObjId:He[E].contentsObjId,mediaBox:He[E].mediaBox,cropBox:He[E].cropBox,bleedBox:He[E].bleedBox,trimBox:He[E].trimBox,artBox:He[E].artBox,userUnit:He[E].userUnit,rootDictionaryObjId:de,resourceDictionaryObjId:_t}));_n(de,!0),V("<</Type /Pages");var gt="/Kids [";for(k=0;k<zr;k++)gt+=st[k]+" 0 R ";V(gt+"]"),V("/Count "+zr),V(">>"),V("endobj"),Ir.publish("postPutPages")},zo=function(E){Ir.publish("putFont",{font:E,out:V,newObject:cn,putStream:Lr}),E.isAlreadyPutted!==!0&&(E.objectNumber=cn(),V("<<"),V("/Type /Font"),V("/BaseFont /"+Hp(E.postScriptName)),V("/Subtype /Type1"),typeof E.encoding=="string"&&V("/Encoding /"+E.encoding),V("/FirstChar 32"),V("/LastChar 255"),V(">>"),V("endobj"))},gi=function(){for(var E in Ne)Ne.hasOwnProperty(E)&&(c===!1||c===!0&&h.hasOwnProperty(E))&&zo(Ne[E])},Ks=function(E){E.objectNumber=cn();var k=[];k.push({key:"Type",value:"/XObject"}),k.push({key:"Subtype",value:"/Form"}),k.push({key:"BBox",value:"["+[I(E.x),I(E.y),I(E.x+E.width),I(E.y+E.height)].join(" ")+"]"}),k.push({key:"Matrix",value:"["+E.matrix.toString()+"]"});var st=E.pages[1].join(`
`);Lr({data:st,additionalKeyValues:k,objectId:E.objectNumber}),V("endobj")},IA=function(){for(var E in yn)yn.hasOwnProperty(E)&&Ks(yn[E])},Rh=function(E,k){var st,gt=[],xt=1/(k-1);for(st=0;st<1;st+=xt)gt.push(st);if(gt.push(1),E[0].offset!=0){var Ut={offset:0,color:E[0].color};E.unshift(Ut)}if(E[E.length-1].offset!=1){var Yt={offset:1,color:E[E.length-1].color};E.push(Yt)}for(var ce="",De=0,vr=0;vr<gt.length;vr++){for(st=gt[vr];st>E[De+1].offset;)De++;var ir=E[De].offset,br=(st-ir)/(E[De+1].offset-ir),Gi=E[De].color,Vn=E[De+1].color;ce+=H(Math.round((1-br)*Gi[0]+br*Vn[0]).toString(16))+H(Math.round((1-br)*Gi[1]+br*Vn[1]).toString(16))+H(Math.round((1-br)*Gi[2]+br*Vn[2]).toString(16))}return ce.trim()},Cv=function(E,k){k||(k=21);var st=cn(),gt=Rh(E.colors,k),xt=[];xt.push({key:"FunctionType",value:"0"}),xt.push({key:"Domain",value:"[0.0 1.0]"}),xt.push({key:"Size",value:"["+k+"]"}),xt.push({key:"BitsPerSample",value:"8"}),xt.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),xt.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Lr({data:gt,additionalKeyValues:xt,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:st}),V("endobj"),E.objectNumber=cn(),V("<< /ShadingType "+E.type),V("/ColorSpace /DeviceRGB");var Ut="/Coords ["+I(parseFloat(E.coords[0]))+" "+I(parseFloat(E.coords[1]))+" ";E.type===2?Ut+=I(parseFloat(E.coords[2]))+" "+I(parseFloat(E.coords[3])):Ut+=I(parseFloat(E.coords[2]))+" "+I(parseFloat(E.coords[3]))+" "+I(parseFloat(E.coords[4]))+" "+I(parseFloat(E.coords[5])),V(Ut+="]"),E.matrix&&V("/Matrix ["+E.matrix.toString()+"]"),V("/Function "+st+" 0 R"),V("/Extend [true true]"),V(">>"),V("endobj")},Ud=function(E,k){var st=Br(),gt=cn();k.push({resourcesOid:st,objectOid:gt}),E.objectNumber=gt;var xt=[];xt.push({key:"Type",value:"/Pattern"}),xt.push({key:"PatternType",value:"1"}),xt.push({key:"PaintType",value:"1"}),xt.push({key:"TilingType",value:"1"}),xt.push({key:"BBox",value:"["+E.boundingBox.map(I).join(" ")+"]"}),xt.push({key:"XStep",value:I(E.xStep)}),xt.push({key:"YStep",value:I(E.yStep)}),xt.push({key:"Resources",value:st+" 0 R"}),E.matrix&&xt.push({key:"Matrix",value:"["+E.matrix.toString()+"]"}),Lr({data:E.stream,additionalKeyValues:xt,objectId:E.objectNumber}),V("endobj")},Ws=function(E){var k;for(k in se)se.hasOwnProperty(k)&&(se[k]instanceof Ef?Cv(se[k]):se[k]instanceof tg&&Ud(se[k],E))},Dd=function(E){for(var k in E.objectNumber=cn(),V("<<"),E)switch(k){case"opacity":V("/ca "+N(E[k]));break;case"stroke-opacity":V("/CA "+N(E[k]))}V(">>"),V("endobj")},Bv=function(){var E;for(E in gr)gr.hasOwnProperty(E)&&Dd(gr[E])},Mh=function(){for(var E in V("/XObject <<"),yn)yn.hasOwnProperty(E)&&yn[E].objectNumber>=0&&V("/"+E+" "+yn[E].objectNumber+" 0 R");Ir.publish("putXobjectDict"),V(">>")},bv=function(){ta.oid=cn(),V("<<"),V("/Filter /Standard"),V("/V "+ta.v),V("/R "+ta.r),V("/U <"+ta.toHexString(ta.U)+">"),V("/O <"+ta.toHexString(ta.O)+">"),V("/P "+ta.P),V(">>"),V("endobj")},Qd=function(){for(var E in V("/Font <<"),Ne)Ne.hasOwnProperty(E)&&(c===!1||c===!0&&h.hasOwnProperty(E))&&V("/"+E+" "+Ne[E].objectNumber+" 0 R");V(">>")},kd=function(){if(Object.keys(se).length>0){for(var E in V("/Shading <<"),se)se.hasOwnProperty(E)&&se[E]instanceof Ef&&se[E].objectNumber>=0&&V("/"+E+" "+se[E].objectNumber+" 0 R");Ir.publish("putShadingPatternDict"),V(">>")}},Ol=function(E){if(Object.keys(se).length>0){for(var k in V("/Pattern <<"),se)se.hasOwnProperty(k)&&se[k]instanceof f.TilingPattern&&se[k].objectNumber>=0&&se[k].objectNumber<E&&V("/"+k+" "+se[k].objectNumber+" 0 R");Ir.publish("putTilingPatternDict"),V(">>")}},Tv=function(){if(Object.keys(gr).length>0){var E;for(E in V("/ExtGState <<"),gr)gr.hasOwnProperty(E)&&gr[E].objectNumber>=0&&V("/"+E+" "+gr[E].objectNumber+" 0 R");Ir.publish("putGStateDict"),V(">>")}},$n=function(E){_n(E.resourcesOid,!0),V("<<"),V("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Qd(),kd(),Ol(E.objectOid),Tv(),Mh(),V(">>"),V("endobj")},Hd=function(){var E=[];gi(),Bv(),IA(),Ws(E),Ir.publish("putResources"),E.forEach($n),$n({resourcesOid:_t,objectOid:Number.MAX_SAFE_INTEGER}),Ir.publish("postPutResources")},Gd=function(){Ir.publish("putAdditionalObjects");for(var E=0;E<It.length;E++){var k=It[E];_n(k.objId,!0),V(k.content),V("endobj")}Ir.publish("postPutAdditionalObjects")},$d=function(E){Pe[E.fontName]=Pe[E.fontName]||{},Pe[E.fontName][E.fontStyle]=E.id},Nh=function(E,k,st,gt,xt){var Ut={id:"F"+(Object.keys(Ne).length+1).toString(10),postScriptName:E,fontName:k,fontStyle:st,encoding:gt,isStandardFont:xt||!1,metadata:{}};return Ir.publish("addFont",{font:Ut,instance:this}),Ne[Ut.id]=Ut,$d(Ut),Ut.id},Sv=function(E){for(var k=0,st=Et.length;k<st;k++){var gt=Nh.call(this,E[k][0],E[k][1],E[k][2],Et[k][3],!0);c===!1&&(h[gt]=!0);var xt=E[k][0].split("-");$d({id:gt,fontName:xt[0],fontStyle:xt[1]||""})}Ir.publish("addFonts",{fonts:Ne,dictionary:Pe})},Yo=function(E){return E.foo=function(){try{return E.apply(this,arguments)}catch(gt){var k=gt.stack||"";~k.indexOf(" at ")&&(k=k.split(" at ")[1]);var st="Error in function "+k.split(`
`)[0].split("<")[0]+": "+gt.message;if(!Ye.console)throw new Error(st);Ye.console.error(st,gt),Ye.alert&&alert(st)}},E.foo.bar=E,E.foo},Xo=function(E,k){var st,gt,xt,Ut,Yt,ce,De,vr,ir;if(xt=(k=k||{}).sourceEncoding||"Unicode",Yt=k.outputEncoding,(k.autoencode||Yt)&&Ne[fe].metadata&&Ne[fe].metadata[xt]&&Ne[fe].metadata[xt].encoding&&(Ut=Ne[fe].metadata[xt].encoding,!Yt&&Ne[fe].encoding&&(Yt=Ne[fe].encoding),!Yt&&Ut.codePages&&(Yt=Ut.codePages[0]),typeof Yt=="string"&&(Yt=Ut[Yt]),Yt)){for(De=!1,ce=[],st=0,gt=E.length;st<gt;st++)(vr=Yt[E.charCodeAt(st)])?ce.push(String.fromCharCode(vr)):ce.push(E[st]),ce[st].charCodeAt(0)>>8&&(De=!0);E=ce.join("")}for(st=E.length;De===void 0&&st!==0;)E.charCodeAt(st-1)>>8&&(De=!0),st--;if(!De)return E;for(ce=k.noBOM?[]:[254,255],st=0,gt=E.length;st<gt;st++){if((ir=(vr=E.charCodeAt(st))>>8)>>8)throw new Error("Character at position "+st+" of string '"+E+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");ce.push(ir),ce.push(vr-(ir<<8))}return String.fromCharCode.apply(void 0,ce)},Sa=f.__private__.pdfEscape=f.pdfEscape=function(E,k){return Xo(E,k).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Vd=f.__private__.beginPage=function(E){at[++zr]=[],He[zr]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(E[0]),topRightY:Number(E[1])}},jd(zr),it(at[W])},LA=function(E,k){var st,gt,xt;switch(t=k||t,typeof E=="string"&&(st=v(E.toLowerCase()),Array.isArray(st)&&(gt=st[0],xt=st[1])),Array.isArray(E)&&(gt=E[0]*qt,xt=E[1]*qt),isNaN(gt)&&(gt=i[0],xt=i[1]),(gt>14400||xt>14400)&&(Bn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),gt=Math.min(14400,gt),xt=Math.min(14400,xt)),i=[gt,xt],t.substr(0,1)){case"l":xt>gt&&(i=[xt,gt]);break;case"p":gt>xt&&(i=[xt,gt])}Vd(i),Xd(ju),V(Zo),kh!==0&&V(kh+" J"),Hh!==0&&V(Hh+" j"),Ir.publish("addPage",{pageNumber:zr})},xv=function(E){E>0&&E<=zr&&(at.splice(E,1),He.splice(E,1),zr--,W>zr&&(W=zr),this.setPage(W))},jd=function(E){E>0&&E<=zr&&(W=E)},Iv=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return at.length-1},Kd=function(E,k,st){var gt,xt=void 0;return st=st||{},E=E!==void 0?E:Ne[fe].fontName,k=k!==void 0?k:Ne[fe].fontStyle,gt=E.toLowerCase(),Pe[gt]!==void 0&&Pe[gt][k]!==void 0?xt=Pe[gt][k]:Pe[E]!==void 0&&Pe[E][k]!==void 0?xt=Pe[E][k]:st.disableWarning===!1&&Bn.warn("Unable to look up font label for font '"+E+"', '"+k+"'. Refer to getFontList() for available fonts."),xt||st.noFallback||(xt=Pe.times[k])==null&&(xt=Pe.times.normal),xt},Lv=f.__private__.putInfo=function(){var E=cn(),k=function(gt){return gt};for(var st in u!==null&&(k=ta.encryptor(E,0)),V("<<"),V("/Producer ("+Sa(k("jsPDF "+Ke.version))+")"),Jt)Jt.hasOwnProperty(st)&&Jt[st]&&V("/"+st.substr(0,1).toUpperCase()+st.substr(1)+" ("+Sa(k(Jt[st]))+")");V("/CreationDate ("+Sa(k(tt))+")"),V(">>"),V("endobj")},Ph=f.__private__.putCatalog=function(E){var k=(E=E||{}).rootDictionaryObjId||de;switch(cn(),V("<<"),V("/Type /Catalog"),V("/Pages "+k+" 0 R"),Ct||(Ct="fullwidth"),Ct){case"fullwidth":V("/OpenAction [3 0 R /FitH null]");break;case"fullheight":V("/OpenAction [3 0 R /FitV null]");break;case"fullpage":V("/OpenAction [3 0 R /Fit]");break;case"original":V("/OpenAction [3 0 R /XYZ null null 1]");break;default:var st=""+Ct;st.substr(st.length-1)==="%"&&(Ct=parseInt(Ct)/100),typeof Ct=="number"&&V("/OpenAction [3 0 R /XYZ null null "+N(Ct)+"]")}switch(te||(te="continuous"),te){case"continuous":V("/PageLayout /OneColumn");break;case"single":V("/PageLayout /SinglePage");break;case"two":case"twoleft":V("/PageLayout /TwoColumnLeft");break;case"tworight":V("/PageLayout /TwoColumnRight")}Dt&&V("/PageMode /"+Dt),Ir.publish("putCatalog"),V(">>"),V("endobj")},Uh=f.__private__.putTrailer=function(){V("trailer"),V("<<"),V("/Size "+(J+1)),V("/Root "+J+" 0 R"),V("/Info "+(J-1)+" 0 R"),u!==null&&V("/Encrypt "+ta.oid+" 0 R"),V("/ID [ <"+q+"> <"+q+"> ]"),V(">>")},OA=f.__private__.putHeader=function(){V("%PDF-"+d),V("%ºß¬à")},Hu=f.__private__.putXRef=function(){var E="0000000000";V("xref"),V("0 "+(J+1)),V("0000000000 65535 f ");for(var k=1;k<=J;k++)typeof ot[k]=="function"?V((E+ot[k]()).slice(-10)+" 00000 n "):ot[k]!==void 0?V((E+ot[k]).slice(-10)+" 00000 n "):V("0000000000 00000 n ")},zs=f.__private__.buildDocument=function(){ft(),it(ut),Ir.publish("buildDocument"),OA(),fn(),Gd(),Hd(),u!==null&&bv(),Lv(),Ph();var E=X;return Hu(),Uh(),V("startxref"),V(""+E),V("%%EOF"),it(at[W]),ut.join(`
`)},Gu=f.__private__.getBlob=function(E){return new Blob([Mt(E)],{type:"application/pdf"})},$u=f.output=f.__private__.output=Yo(function(E,k){switch(typeof(k=k||{})=="string"?k={filename:k}:k.filename=k.filename||"generated.pdf",E){case void 0:return zs();case"save":f.save(k.filename);break;case"arraybuffer":return Mt(zs());case"blob":return Gu(zs());case"bloburi":case"bloburl":if(Ye.URL!==void 0&&typeof Ye.URL.createObjectURL=="function")return Ye.URL&&Ye.URL.createObjectURL(Gu(zs()))||void 0;Bn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var st="",gt=zs();try{st=pI(gt)}catch{st=pI(unescape(encodeURIComponent(gt)))}return"data:application/pdf;filename="+k.filename+";base64,"+st;case"pdfobjectnewwindow":if(Object.prototype.toString.call(Ye)==="[object Window]"){var xt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+(k.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(k)+");<\/script></body></html>",Ut=Ye.open();return Ut!==null&&Ut.document.write(xt),Ut}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(Ye)==="[object Window]"){var Yt='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(k.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+k.filename+'" width="500px" height="400px" /></body></html>',ce=Ye.open();if(ce!==null){ce.document.write(Yt);var De=this;ce.document.documentElement.querySelector("#pdfViewer").onload=function(){ce.document.title=k.filename,ce.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(De.output("bloburl"))}}return ce}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(Ye)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var vr='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",k)+'"></iframe></body></html>',ir=Ye.open();if(ir!==null&&(ir.document.write(vr),ir.document.title=k.filename),ir||typeof safari>"u")return ir;break;case"datauri":case"dataurl":return Ye.document.location.href=this.output("datauristring",k);default:return null}}),Wd=function(E){return Array.isArray(Gn)===!0&&Gn.indexOf(E)>-1};switch(n){case"pt":qt=1;break;case"mm":qt=72/25.4;break;case"cm":qt=72/2.54;break;case"in":qt=72;break;case"px":qt=Wd("px_scaling")==1?.75:96/72;break;case"pc":case"em":qt=12;break;case"ex":qt=6;break;default:if(typeof n!="number")throw new Error("Invalid unit: "+n);qt=n}var ta=null;Tt(),nt();var Ov=function(E){return u!==null?ta.encryptor(E,0):function(k){return k}},Vu=f.__private__.getPageInfo=f.getPageInfo=function(E){if(isNaN(E)||E%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:He[E].objId,pageNumber:E,pageContext:He[E]}},tr=f.__private__.getPageInfoByObjId=function(E){if(isNaN(E)||E%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var k in He)if(He[k].objId===E)break;return Vu(k)},Fv=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:He[W].objId,pageNumber:W,pageContext:He[W]}};f.addPage=function(){return LA.apply(this,arguments),this},f.setPage=function(){return jd.apply(this,arguments),it.call(this,at[W]),this},f.insertPage=function(E){return this.addPage(),this.movePage(W,E),this},f.movePage=function(E,k){var st,gt;if(E>k){st=at[E],gt=He[E];for(var xt=E;xt>k;xt--)at[xt]=at[xt-1],He[xt]=He[xt-1];at[k]=st,He[k]=gt,this.setPage(k)}else if(E<k){st=at[E],gt=He[E];for(var Ut=E;Ut<k;Ut++)at[Ut]=at[Ut+1],He[Ut]=He[Ut+1];at[k]=st,He[k]=gt,this.setPage(k)}return this},f.deletePage=function(){return xv.apply(this,arguments),this},f.__private__.text=f.text=function(E,k,st,gt,xt){var Ut,Yt,ce,De,vr,ir,br,Gi,Vn,ni=(gt=gt||{}).scope||this;if(typeof E=="number"&&typeof k=="number"&&(typeof st=="string"||Array.isArray(st))){var ea=st;st=k,k=E,E=ea}if(arguments[3]instanceof Ue?(T("The transform parameter of text() with a Matrix value"),Vn=xt):(ce=arguments[4],De=arguments[5],mn(br=arguments[3])==="object"&&br!==null||(typeof ce=="string"&&(De=ce,ce=null),typeof br=="string"&&(De=br,br=null),typeof br=="number"&&(ce=br,br=null),gt={flags:br,angle:ce,align:De})),isNaN(k)||isNaN(st)||E==null)throw new Error("Invalid arguments passed to jsPDF.text");if(E.length===0)return ni;var vi="",Jo=!1,ro=typeof gt.lineHeightFactor=="number"?gt.lineHeightFactor:Rl,bs=ni.internal.scaleFactor;function ep(dn){return dn=dn.split(" ").join(Array(gt.TabLen||9).join(" ")),Sa(dn,br)}function rp(dn){for(var pn,jn=dn.concat(),mi=[],tA=jn.length;tA--;)typeof(pn=jn.shift())=="string"?mi.push(pn):Array.isArray(dn)&&(pn.length===1||pn[1]===void 0&&pn[2]===void 0)?mi.push(pn[0]):mi.push([pn[0],pn[1],pn[2]]);return mi}function ha(dn,pn){var jn;if(typeof dn=="string")jn=pn(dn)[0];else if(Array.isArray(dn)){for(var mi,tA,GA=dn.concat(),nc=[],np=GA.length;np--;)typeof(mi=GA.shift())=="string"?nc.push(pn(mi)[0]):Array.isArray(mi)&&typeof mi[0]=="string"&&(tA=pn(mi[0],mi[1],mi[2]),nc.push([tA[0],tA[1],tA[2]]));jn=nc}return jn}var Xu=!1,Vh=!0;if(typeof E=="string")Xu=!0;else if(Array.isArray(E)){var jh=E.concat();Yt=[];for(var qu,fa=jh.length;fa--;)(typeof(qu=jh.shift())!="string"||Array.isArray(qu)&&typeof qu[0]!="string")&&(Vh=!1);Xu=Vh}if(Xu===!1)throw new Error('Type of text must be string or Array. "'+E+'" is not recognized.');typeof E=="string"&&(E=E.match(/[\r?\n]/)?E.split(/\r\n|\r|\n/g):[E]);var Pl=Bt/ni.internal.scaleFactor,Zu=Pl*(ro-1);switch(gt.baseline){case"bottom":st-=Zu;break;case"top":st+=Pl-Zu;break;case"hanging":st+=Pl-2*Zu;break;case"middle":st+=Pl/2-Zu}if((ir=gt.maxWidth||0)>0&&(typeof E=="string"?E=ni.splitTextToSize(E,ir):Object.prototype.toString.call(E)==="[object Array]"&&(E=E.reduce(function(dn,pn){return dn.concat(ni.splitTextToSize(pn,ir))},[]))),Ut={text:E,x:k,y:st,options:gt,mutex:{pdfEscape:Sa,activeFontKey:fe,fonts:Ne,activeFontSize:Bt}},Ir.publish("preProcessText",Ut),E=Ut.text,ce=(gt=Ut.options).angle,!(Vn instanceof Ue)&&ce&&typeof ce=="number"){ce*=Math.PI/180,gt.rotationDirection===0&&(ce=-ce),w===y.ADVANCED&&(ce=-ce);var Ju=Math.cos(ce),Kh=Math.sin(ce);Vn=new Ue(Ju,Kh,-Kh,Ju,0,0)}else ce&&ce instanceof Ue&&(Vn=ce);w!==y.ADVANCED||Vn||(Vn=Cn),(vr=gt.charSpace||Ku)!==void 0&&(vi+=I(S(vr))+` Tc
`,this.setCharSpace(this.getCharSpace()||0)),(Gi=gt.horizontalScale)!==void 0&&(vi+=I(100*Gi)+` Tz
`),gt.lang;var Ia=-1,kv=gt.renderingMode!==void 0?gt.renderingMode:gt.stroke,Wh=ni.internal.getCurrentPageInfo().pageContext;switch(kv){case 0:case!1:case"fill":Ia=0;break;case 1:case!0:case"stroke":Ia=1;break;case 2:case"fillThenStroke":Ia=2;break;case 3:case"invisible":Ia=3;break;case 4:case"fillAndAddForClipping":Ia=4;break;case 5:case"strokeAndAddPathForClipping":Ia=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Ia=6;break;case 7:case"addToPathForClipping":Ia=7}var zh=Wh.usedRenderingMode!==void 0?Wh.usedRenderingMode:-1;Ia!==-1?vi+=Ia+` Tr
`:zh!==-1&&(vi+=`0 Tr
`),Ia!==-1&&(Wh.usedRenderingMode=Ia),De=gt.align||"left";var ts,tc=Bt*ro,Yh=ni.internal.pageSize.getWidth(),Hv=Ne[fe];vr=gt.charSpace||Ku,ir=gt.maxWidth||0,br=Object.assign({autoencode:!0,noBOM:!0},gt.flags);var DA=[];if(Object.prototype.toString.call(E)==="[object Array]"){var Bo;Yt=rp(E),De!=="left"&&(ts=Yt.map(function(dn){return ni.getStringUnitWidth(dn,{font:Hv,charSpace:vr,fontSize:Bt,doKerning:!1})*Bt/bs}));var es,QA=0;if(De==="right"){k-=ts[0],E=[],fa=Yt.length;for(var Ts=0;Ts<fa;Ts++)Ts===0?(es=Xs(k),Bo=NA(st)):(es=S(QA-ts[Ts]),Bo=-tc),E.push([Yt[Ts],es,Bo]),QA=ts[Ts]}else if(De==="center"){k-=ts[0]/2,E=[],fa=Yt.length;for(var da=0;da<fa;da++)da===0?(es=Xs(k),Bo=NA(st)):(es=S((QA-ts[da])/2),Bo=-tc),E.push([Yt[da],es,Bo]),QA=ts[da]}else if(De==="left"){E=[],fa=Yt.length;for(var ec=0;ec<fa;ec++)E.push(Yt[ec])}else{if(De!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');E=[],fa=Yt.length,ir=ir!==0?ir:Yh;for(var Ss=0;Ss<fa;Ss++)Bo=Ss===0?NA(st):-tc,es=Ss===0?Xs(k):0,Ss<fa-1?DA.push(I(S((ir-ts[Ss])/(Yt[Ss].split(" ").length-1)))):DA.push(0),E.push([Yt[Ss],es,Bo])}}var La=typeof gt.R2L=="boolean"?gt.R2L:Nt;La===!0&&(E=ha(E,function(dn,pn,jn){return[dn.split("").reverse().join(""),pn,jn]})),Ut={text:E,x:k,y:st,options:gt,mutex:{pdfEscape:Sa,activeFontKey:fe,fonts:Ne,activeFontSize:Bt}},Ir.publish("postProcessText",Ut),E=Ut.text,Jo=Ut.mutex.isHex||!1;var rc=Ne[fe].encoding;rc!=="WinAnsiEncoding"&&rc!=="StandardEncoding"||(E=ha(E,function(dn,pn,jn){return[ep(dn),pn,jn]})),Yt=rp(E),E=[];for(var kA,rs,xs,HA=0,Ul=1,Dl=Array.isArray(Yt[0])?Ul:HA,Zs="",Xh=function(dn,pn,jn){var mi="";return jn instanceof Ue?(jn=typeof gt.angle=="number"?ri(jn,new Ue(1,0,0,1,dn,pn)):ri(new Ue(1,0,0,1,dn,pn),jn),w===y.ADVANCED&&(jn=ri(new Ue(1,0,0,-1,0,0),jn)),mi=jn.join(" ")+` Tm
`):mi=I(dn)+" "+I(pn)+` Td
`,mi},bo=0;bo<Yt.length;bo++){switch(Zs="",Dl){case Ul:xs=(Jo?"<":"(")+Yt[bo][0]+(Jo?">":")"),kA=parseFloat(Yt[bo][1]),rs=parseFloat(Yt[bo][2]);break;case HA:xs=(Jo?"<":"(")+Yt[bo]+(Jo?">":")"),kA=Xs(k),rs=NA(st)}DA!==void 0&&DA[bo]!==void 0&&(Zs=DA[bo]+` Tw
`),bo===0?E.push(Zs+Xh(kA,rs,Vn)+xs):Dl===HA?E.push(Zs+xs):Dl===Ul&&E.push(Zs+Xh(kA,rs,Vn)+xs)}E=Dl===HA?E.join(` Tj
T* `):E.join(` Tj
`),E+=` Tj
`;var Js=`BT
/`;return Js+=fe+" "+Bt+` Tf
`,Js+=I(Bt*ro)+` TL
`,Js+=Nl+`
`,Js+=vi,Js+=E,V(Js+="ET"),h[fe]=!0,ni};var FA=f.__private__.clip=f.clip=function(E){return V(E==="evenodd"?"W*":"W"),this};f.clipEvenOdd=function(){return FA("evenodd")},f.__private__.discardPath=f.discardPath=function(){return V("n"),this};var qo=f.__private__.isValidStyle=function(E){var k=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(E)!==-1&&(k=!0),k};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(E){return qo(E)&&(l=E),this};var Rv=f.__private__.getStyle=f.getStyle=function(E){var k=l;switch(E){case"D":case"S":k="S";break;case"F":k="f";break;case"FD":case"DF":k="B";break;case"f":case"f*":case"B":case"B*":k=E}return k},Bs=f.close=function(){return V("h"),this};f.stroke=function(){return V("S"),this},f.fill=function(E){return RA("f",E),this},f.fillEvenOdd=function(E){return RA("f*",E),this},f.fillStroke=function(E){return RA("B",E),this},f.fillStrokeEvenOdd=function(E){return RA("B*",E),this};var RA=function(E,k){mn(k)==="object"?Mv(k,E):V(E)},Dh=function(E){E===null||w===y.ADVANCED&&E===void 0||(E=Rv(E),V(E))};function zd(E,k,st,gt,xt){var Ut=new tg(k||this.boundingBox,st||this.xStep,gt||this.yStep,this.gState,xt||this.matrix);Ut.stream=this.stream;var Yt=E+"$$"+this.cloneIndex+++"$$";return pi(Yt,Ut),Ut}var Mv=function(E,k){var st=hi[E.key],gt=se[st];if(gt instanceof Ef)V("q"),V(Yd(k)),gt.gState&&f.setGState(gt.gState),V(E.matrix.toString()+" cm"),V("/"+st+" sh"),V("Q");else if(gt instanceof tg){var xt=new Ue(1,0,0,-1,0,qs());E.matrix&&(xt=xt.multiply(E.matrix||Cn),st=zd.call(gt,E.key,E.boundingBox,E.xStep,E.yStep,xt).id),V("q"),V("/Pattern cs"),V("/"+st+" scn"),gt.gState&&f.setGState(gt.gState),V(k),V("Q")}},Yd=function(E){switch(E){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"}},Qh=f.moveTo=function(E,k){return V(I(S(E))+" "+I(U(k))+" m"),this},Fl=f.lineTo=function(E,k){return V(I(S(E))+" "+I(U(k))+" l"),this},MA=f.curveTo=function(E,k,st,gt,xt,Ut){return V([I(S(E)),I(U(k)),I(S(st)),I(U(gt)),I(S(xt)),I(U(Ut)),"c"].join(" ")),this};f.__private__.line=f.line=function(E,k,st,gt,xt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||!qo(xt))throw new Error("Invalid arguments passed to jsPDF.line");return w===y.COMPAT?this.lines([[st-E,gt-k]],E,k,[1,1],xt||"S"):this.lines([[st-E,gt-k]],E,k,[1,1]).stroke()},f.__private__.lines=f.lines=function(E,k,st,gt,xt,Ut){var Yt,ce,De,vr,ir,br,Gi,Vn,ni,ea,vi,Jo;if(typeof E=="number"&&(Jo=st,st=k,k=E,E=Jo),gt=gt||[1,1],Ut=Ut||!1,isNaN(k)||isNaN(st)||!Array.isArray(E)||!Array.isArray(gt)||!qo(xt)||typeof Ut!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Qh(k,st),Yt=gt[0],ce=gt[1],vr=E.length,ea=k,vi=st,De=0;De<vr;De++)(ir=E[De]).length===2?(ea=ir[0]*Yt+ea,vi=ir[1]*ce+vi,Fl(ea,vi)):(br=ir[0]*Yt+ea,Gi=ir[1]*ce+vi,Vn=ir[2]*Yt+ea,ni=ir[3]*ce+vi,ea=ir[4]*Yt+ea,vi=ir[5]*ce+vi,MA(br,Gi,Vn,ni,ea,vi));return Ut&&Bs(),Dh(xt),this},f.path=function(E){for(var k=0;k<E.length;k++){var st=E[k],gt=st.c;switch(st.op){case"m":Qh(gt[0],gt[1]);break;case"l":Fl(gt[0],gt[1]);break;case"c":MA.apply(this,gt);break;case"h":Bs()}}return this},f.__private__.rect=f.rect=function(E,k,st,gt,xt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||!qo(xt))throw new Error("Invalid arguments passed to jsPDF.rect");return w===y.COMPAT&&(gt=-gt),V([I(S(E)),I(U(k)),I(S(st)),I(S(gt)),"re"].join(" ")),Dh(xt),this},f.__private__.triangle=f.triangle=function(E,k,st,gt,xt,Ut,Yt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||isNaN(xt)||isNaN(Ut)||!qo(Yt))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[st-E,gt-k],[xt-st,Ut-gt],[E-xt,k-Ut]],E,k,[1,1],Yt,!0),this},f.__private__.roundedRect=f.roundedRect=function(E,k,st,gt,xt,Ut,Yt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||isNaN(xt)||isNaN(Ut)||!qo(Yt))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var ce=4/3*(Math.SQRT2-1);return xt=Math.min(xt,.5*st),Ut=Math.min(Ut,.5*gt),this.lines([[st-2*xt,0],[xt*ce,0,xt,Ut-Ut*ce,xt,Ut],[0,gt-2*Ut],[0,Ut*ce,-xt*ce,Ut,-xt,Ut],[2*xt-st,0],[-xt*ce,0,-xt,-Ut*ce,-xt,-Ut],[0,2*Ut-gt],[0,-Ut*ce,xt*ce,-Ut,xt,-Ut]],E+xt,k,[1,1],Yt,!0),this},f.__private__.ellipse=f.ellipse=function(E,k,st,gt,xt){if(isNaN(E)||isNaN(k)||isNaN(st)||isNaN(gt)||!qo(xt))throw new Error("Invalid arguments passed to jsPDF.ellipse");var Ut=4/3*(Math.SQRT2-1)*st,Yt=4/3*(Math.SQRT2-1)*gt;return Qh(E+st,k),MA(E+st,k-Yt,E+Ut,k-gt,E,k-gt),MA(E-Ut,k-gt,E-st,k-Yt,E-st,k),MA(E-st,k+Yt,E-Ut,k+gt,E,k+gt),MA(E+Ut,k+gt,E+st,k+Yt,E+st,k),Dh(xt),this},f.__private__.circle=f.circle=function(E,k,st,gt){if(isNaN(E)||isNaN(k)||isNaN(st)||!qo(gt))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(E,k,st,st,gt)},f.setFont=function(E,k,st){return st&&(k=F(k,st)),fe=Kd(E,k,{disableWarning:!1}),this};var Nv=f.__private__.getFont=f.getFont=function(){return Ne[Kd.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var E,k,st={};for(E in Pe)if(Pe.hasOwnProperty(E))for(k in st[E]=[],Pe[E])Pe[E].hasOwnProperty(k)&&st[E].push(k);return st},f.addFont=function(E,k,st,gt,xt){var Ut=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&Ut.indexOf(arguments[3])!==-1?xt=arguments[3]:arguments[3]&&Ut.indexOf(arguments[3])==-1&&(st=F(st,gt)),xt=xt||"Identity-H",Nh.call(this,E,k,st,xt)};var Rl,ju=r.lineWidth||.200025,Ml=f.__private__.getLineWidth=f.getLineWidth=function(){return ju},Xd=f.__private__.setLineWidth=f.setLineWidth=function(E){return ju=E,V(I(S(E))+" w"),this};f.__private__.setLineDash=Ke.API.setLineDash=Ke.API.setLineDashPattern=function(E,k){if(E=E||[],k=k||0,isNaN(k)||!Array.isArray(E))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return E=E.map(function(st){return I(S(st))}).join(" "),k=I(S(k)),V("["+E+"] "+k+" d"),this};var Ys=f.__private__.getLineHeight=f.getLineHeight=function(){return Bt*Rl};f.__private__.getLineHeight=f.getLineHeight=function(){return Bt*Rl};var qd=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(E){return typeof(E=E||1.15)=="number"&&(Rl=E),this},Zd=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return Rl};qd(r.lineHeight);var Xs=f.__private__.getHorizontalCoordinate=function(E){return S(E)},NA=f.__private__.getVerticalCoordinate=function(E){return w===y.ADVANCED?E:He[W].mediaBox.topRightY-He[W].mediaBox.bottomLeftY-S(E)},Pv=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(E){return I(Xs(E))},xa=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(E){return I(NA(E))},Zo=r.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return $t(Zo)},f.__private__.setStrokeColor=f.setDrawColor=function(E,k,st,gt){return Zo=ne({ch1:E,ch2:k,ch3:st,ch4:gt,pdfColorType:"draw",precision:2}),V(Zo),this};var PA=r.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return $t(PA)},f.__private__.setFillColor=f.setFillColor=function(E,k,st,gt){return PA=ne({ch1:E,ch2:k,ch3:st,ch4:gt,pdfColorType:"fill",precision:2}),V(PA),this};var Nl=r.textColor||"0 g",Uv=f.__private__.getTextColor=f.getTextColor=function(){return $t(Nl)};f.__private__.setTextColor=f.setTextColor=function(E,k,st,gt){return Nl=ne({ch1:E,ch2:k,ch3:st,ch4:gt,pdfColorType:"text",precision:3}),this};var Ku=r.charSpace,Dv=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(Ku||0)};f.__private__.setCharSpace=f.setCharSpace=function(E){if(isNaN(E))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Ku=E,this};var kh=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(E){var k=f.CapJoinStyles[E];if(k===void 0)throw new Error("Line cap style of '"+E+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return kh=k,V(k+" J"),this};var Hh=0;f.__private__.setLineJoin=f.setLineJoin=function(E){var k=f.CapJoinStyles[E];if(k===void 0)throw new Error("Line join style of '"+E+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Hh=k,V(k+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(E){if(E=E||0,isNaN(E))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return V(I(S(E))+" M"),this},f.GState=pE,f.setGState=function(E){(E=typeof E=="string"?gr[ei[E]]:Jd(null,E)).equals(Wr)||(V("/"+E.id+" gs"),Wr=E)};var Jd=function(E,k){if(!E||!ei[E]){var st=!1;for(var gt in gr)if(gr.hasOwnProperty(gt)&&gr[gt].equals(k)){st=!0;break}if(st)k=gr[gt];else{var xt="GS"+(Object.keys(gr).length+1).toString(10);gr[xt]=k,k.id=xt}return E&&(ei[E]=k.id),Ir.publish("addGState",k),k}};f.addGState=function(E,k){return Jd(E,k),this},f.saveGraphicsState=function(){return V("q"),Hr.push({key:fe,size:Bt,color:Nl}),this},f.restoreGraphicsState=function(){V("Q");var E=Hr.pop();return fe=E.key,Bt=E.size,Nl=E.color,Wr=null,this},f.setCurrentTransformationMatrix=function(E){return V(E.toString()+" cm"),this},f.comment=function(E){return V("#"+E),this};var Wu=function(E,k){var st=E||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return st},set:function(Ut){isNaN(Ut)||(st=parseFloat(Ut))}});var gt=k||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return gt},set:function(Ut){isNaN(Ut)||(gt=parseFloat(Ut))}});var xt="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return xt},set:function(Ut){xt=Ut.toString()}}),this},Gh=function(E,k,st,gt){Wu.call(this,E,k),this.type="rect";var xt=st||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return xt},set:function(Yt){isNaN(Yt)||(xt=parseFloat(Yt))}});var Ut=gt||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return Ut},set:function(Yt){isNaN(Yt)||(Ut=parseFloat(Yt))}}),this},$h=function(){this.page=zr,this.currentPage=W,this.pages=at.slice(0),this.pagesContext=He.slice(0),this.x=nr,this.y=ke,this.matrix=wr,this.width=Hi(W),this.height=qs(W),this.outputDestination=Z,this.id="",this.objectNumber=-1};$h.prototype.restore=function(){zr=this.page,W=this.currentPage,He=this.pagesContext,at=this.pages,nr=this.x,ke=this.y,wr=this.matrix,Yu(W,this.width),UA(W,this.height),Z=this.outputDestination};var tp=function(E,k,st,gt,xt){di.push(new $h),zr=W=0,at=[],nr=E,ke=k,wr=xt,Vd([st,gt])},Qv=function(E){if(fi[E])di.pop().restore();else{var k=new $h,st="Xo"+(Object.keys(yn).length+1).toString(10);k.id=st,fi[E]=st,yn[st]=k,Ir.publish("addFormObject",k),di.pop().restore()}};for(var zu in f.beginFormObject=function(E,k,st,gt,xt){return tp(E,k,st,gt,xt),this},f.endFormObject=function(E){return Qv(E),this},f.doFormObject=function(E,k){var st=yn[fi[E]];return V("q"),V(k.toString()+" cm"),V("/"+st.id+" Do"),V("Q"),this},f.getFormObject=function(E){var k=yn[fi[E]];return{x:k.x,y:k.y,width:k.width,height:k.height,matrix:k.matrix}},f.save=function(E,k){return E=E||"generated.pdf",(k=k||{}).returnPromise=k.returnPromise||!1,k.returnPromise===!1?(vf(Gu(zs()),E),typeof vf.unload=="function"&&Ye.setTimeout&&setTimeout(vf.unload,911),this):new Promise(function(st,gt){try{var xt=vf(Gu(zs()),E);typeof vf.unload=="function"&&Ye.setTimeout&&setTimeout(vf.unload,911),st(xt)}catch(Ut){gt(Ut.message)}})},Ke.API)Ke.API.hasOwnProperty(zu)&&(zu==="events"&&Ke.API.events.length?function(E,k){var st,gt,xt;for(xt=k.length-1;xt!==-1;xt--)st=k[xt][0],gt=k[xt][1],E.subscribe.apply(E,[st].concat(typeof gt=="function"?[gt]:gt))}(Ir,Ke.API.events):f[zu]=Ke.API[zu]);var Hi=f.getPageWidth=function(E){return(He[E=E||W].mediaBox.topRightX-He[E].mediaBox.bottomLeftX)/qt},Yu=f.setPageWidth=function(E,k){He[E].mediaBox.topRightX=k*qt+He[E].mediaBox.bottomLeftX},qs=f.getPageHeight=function(E){return(He[E=E||W].mediaBox.topRightY-He[E].mediaBox.bottomLeftY)/qt},UA=f.setPageHeight=function(E,k){He[E].mediaBox.topRightY=k*qt+He[E].mediaBox.bottomLeftY};return f.internal={pdfEscape:Sa,getStyle:Rv,getFont:Nv,getFontSize:Rt,getCharSpace:Dv,getTextColor:Uv,getLineHeight:Ys,getLineHeightFactor:Zd,getLineWidth:Ml,write:Ft,getHorizontalCoordinate:Xs,getVerticalCoordinate:NA,getCoordinateString:Pv,getVerticalCoordinateString:xa,collections:{},newObject:cn,newAdditionalObject:eo,newObjectDeferred:Br,newObjectDeferredBegin:_n,getFilters:Ze,putStream:Lr,events:Ir,scaleFactor:qt,pageSize:{getWidth:function(){return Hi(W)},setWidth:function(E){Yu(W,E)},getHeight:function(){return qs(W)},setHeight:function(E){UA(W,E)}},encryptionOptions:u,encryption:ta,getEncryptor:Ov,output:$u,getNumberOfPages:Iv,pages:at,out:V,f2:N,f3:x,getPageInfo:Vu,getPageInfoByObjId:tr,getCurrentPageInfo:Fv,getPDFVersion:g,Point:Wu,Rectangle:Gh,Matrix:Ue,hasHotfix:Wd},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return Hi(W)},set:function(E){Yu(W,E)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return qs(W)},set:function(E){UA(W,E)},enumerable:!0,configurable:!0}),Sv.call(f,Et),fe="F1",LA(i,t),Ir.publish("initialized"),f}kp.prototype.lsbFirstWord=function(r){return String.fromCharCode(r>>0&255,r>>8&255,r>>16&255,r>>24&255)},kp.prototype.toHexString=function(r){return r.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},kp.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("")},kp.prototype.processOwnerPassword=function(r,e){return vI(gI(e).substr(0,5),r)},kp.prototype.encryptor=function(r,e){var t=gI(this.encryptionKey+String.fromCharCode(255&r,r>>8&255,r>>16&255,255&e,e>>8&255)).substr(0,10);return function(n){return vI(t,n)}},pE.prototype.equals=function(r){var e,t="id,objectNumber,equals";if(!r||mn(r)!==mn(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},Ke.API={events:[]},Ke.version="2.5.0";var oi=Ke.API,uR=1,Ld=function(r){return r.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},mp=function(r){return r.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},sr=function(r){return r.toFixed(2)},mc=function(r){return r.toFixed(5)};oi.__acroform__={};var Ko=function(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r},M5=function(r){return r*uR},zA=function(r){var e=new mG,t=be.internal.getHeight(r)||0,n=be.internal.getWidth(r)||0;return e.BBox=[0,0,Number(sr(n)),Number(sr(t))],e},yut=oi.__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},_ut=oi.__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)},wut=oi.__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},Ci=oi.__acroform__.getBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return wut(r,e-1)},Bi=oi.__acroform__.setBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return yut(r,e-1)},bi=oi.__acroform__.clearBitForPdf=function(r,e){if(isNaN(r)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return _ut(r,e-1)},Eut=oi.__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(sr(A.lowerLeft_X)),Number(sr(A.lowerLeft_Y)),Number(sr(A.upperRight_X)),Number(sr(A.upperRight_Y))]},Cut=function(r){if(r.appearanceStreamContent)return r.appearanceStreamContent;if(r.V||r.DV){var e=[],t=r._V||r.DV,n=mI(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+" "+sr(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=zA(r);return a.scope=r.scope,a.stream=e.join(`
`),a}},mI=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=be.internal.getHeight(r)||0;o=o<0?-o:o;var s=be.internal.getWidth(r)||0;s=s<0?-s:s;var A=function(x,S,P){if(x+1<i.length){var U=S+" "+i[x+1][0];return n1(U,r,P).width<=s-4}return!1};a++;t:for(;a>0;){e="",a--;var l,u,c=n1("3",r,a).height,h=r.multiline?o-a:(o-c)/2,f=h+=2,d=0,g=0,m=0;if(a<=0){e=`(...) Tj
`,e+="% Width of Text: "+n1(e,r,a=12).width+", FieldWidth:"+s+`
`;break}for(var v="",y=0,w=0;w<i.length;w++)if(i.hasOwnProperty(w)){var C=!1;if(i[w].length!==1&&m!==i[w].length-1){if((c+2)*(y+2)+2>o)continue t;v+=i[w][m],C=!0,g=w,w--}else{v=(v+=i[w][m]+" ").substr(v.length-1)==" "?v.substr(0,v.length-1):v;var O=parseInt(w),F=A(O,v,a),I=w>=i.length-1;if(F&&!I){v+=" ",m=0;continue}if(F||I){if(I)g=O;else if(r.multiline&&(c+2)*(y+2)+2>o)continue t}else{if(!r.multiline||(c+2)*(y+2)+2>o)continue t;g=O}}for(var T="",L=d;L<=g;L++){var N=i[L];if(r.multiline){if(L===g){T+=N[m]+" ",m=(m+1)%N.length;continue}if(L===d){T+=N[N.length-1]+" ";continue}}T+=N[0]+" "}switch(T=T.substr(T.length-1)==" "?T.substr(0,T.length-1):T,u=n1(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+=sr(l)+" "+sr(f)+` Td
`,e+="("+Ld(T)+`) Tj
`,e+=-sr(l)+` 0 Td
`,f=-(a+2),u=0,d=C?g:g+1,y++,v=""}break}return n.text=e,n.fontSize=a,n},n1=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}},But={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},but=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)},Tut=function(r,e){for(var t in r)if(r.hasOwnProperty(t)){var n=t,i=r[t];e.internal.newObjectDeferredBegin(i.objId,!0),mn(i)==="object"&&typeof i.putStream=="function"&&i.putStream(),delete r[n]}},Sut=function(r,e){if(e.scope=r,r.internal!==void 0&&(r.internal.acroformPlugin===void 0||r.internal.acroformPlugin.isInitialized===!1)){if(TA.FieldNum=0,r.internal.acroformPlugin=JSON.parse(JSON.stringify(But)),r.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");uR=r.internal.scaleFactor,r.internal.acroformPlugin.acroFormDictionaryRoot=new yG,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&&but(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=Eut(s.Rect,i)),i.internal.newObjectDeferredBegin(s.objId,!0),s.DA=be.createDefaultAppearanceStream(s),mn(s)==="object"&&typeof s.getKeyValueListForStream=="function"&&(A=s.getKeyValueListForStream()),s.Rect=l,s.hasAppearanceStream&&!s.appearanceStreamContent){var u=Cut(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 d=f[o];typeof d=="function"&&(d=d.call(i,s)),c+="/"+o+" "+d+" ",i.internal.acroformPlugin.xForms.indexOf(d)>=0||i.internal.acroformPlugin.xForms.push(d)}}else typeof(d=f)=="function"&&(d=d.call(i,s)),c+="/"+o+" "+d,i.internal.acroformPlugin.xForms.indexOf(d)>=0||i.internal.acroformPlugin.xForms.push(d);c+=">>"}A.push({key:"AP",value:`<<
`+c+">>"})}i.internal.putStream({additionalKeyValues:A,objectId:s.objId}),i.internal.out("endobj")}a&&Tut(i.internal.acroformPlugin.xForms,i)})(t,r)}),r.internal.acroformPlugin.isInitialized=!0}},vG=oi.__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+=" "),mn(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+="("+Ld(n(r[a].toString()))+")"):i+=r[a].toString()}return i+="]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},uT=function(r,e,t){var n=function(i){return i};return e!==void 0&&t&&(n=t.internal.getEncryptor(e)),(r=r||"").toString(),r="("+Ld(n(r))+")"},al=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})};al.prototype.toString=function(){return this.objId+" 0 R"},al.prototype.putStream=function(){var r=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:r,objectId:this.objId}),this.scope.internal.out("endobj")},al.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:vG(i,this.objId,this.scope)}):i instanceof al?(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 mG=function(){al.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}})};Ko(mG,al);var yG=function(){al.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)),"("+Ld(t(r))+")"}},set:function(t){r=t}})};Ko(yG,al);var TA=function r(){al.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(v){if(isNaN(v))throw new Error('Invalid value "'+v+'" for attribute F supplied.');e=v}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(e,3))},set:function(v){Boolean(v)===!0?this.F=Bi(e,3):this.F=bi(e,3)}});var t=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(v){if(isNaN(v))throw new Error('Invalid value "'+v+'" for attribute Ff supplied.');t=v}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(n.length!==0)return n},set:function(v){n=v!==void 0?v:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(v){n[0]=v}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(v){n[1]=v}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(v){n[2]=v}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(v){n[3]=v}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(v){switch(v){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=v;break;default:throw new Error('Invalid value "'+v+'" 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 gE)return;a="FieldObject"+r.FieldNum++}var v=function(y){return y};return this.scope&&(v=this.scope.internal.getEncryptor(this.objId)),"("+Ld(v(a))+")"},set:function(v){a=v.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a},set:function(v){a=v}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(v){o=v}});var s="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(v){s=v}});var A=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return A},set:function(v){A=v}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/uR:l},set:function(v){l=v}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(v){u=v}});var c="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!c||this instanceof gE||this instanceof Gf))return uT(c,this.objId,this.scope)},set:function(v){v=v.toString(),c=v}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof sa?h:uT(h,this.objId,this.scope)},set:function(v){v=v.toString(),h=this instanceof sa?v:v.substr(0,1)==="("?mp(v.substr(1,v.length-2)):mp(v)}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof sa?mp(h.substr(1,h.length-1)):h},set:function(v){v=v.toString(),h=this instanceof sa?"/"+v:v}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(v){this.V=v}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof sa?f:uT(f,this.objId,this.scope)},set:function(v){v=v.toString(),f=this instanceof sa?v:v.substr(0,1)==="("?mp(v.substr(1,v.length-2)):mp(v)}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof sa?mp(f.substr(1,f.length-1)):f},set:function(v){v=v.toString(),f=this instanceof sa?"/"+v:v}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var d,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(v){v=Boolean(v),g=v}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(d)return d},set:function(v){d=v}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,1))},set:function(v){Boolean(v)===!0?this.Ff=Bi(this.Ff,1):this.Ff=bi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,2))},set:function(v){Boolean(v)===!0?this.Ff=Bi(this.Ff,2):this.Ff=bi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,3))},set:function(v){Boolean(v)===!0?this.Ff=Bi(this.Ff,3):this.Ff=bi(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(m!==null)return m},set:function(v){if([0,1,2].indexOf(v)===-1)throw new Error('Invalid value "'+v+'" for attribute Q supplied.');m=v}}),Object.defineProperty(this,"textAlign",{get:function(){var v;switch(m){case 0:default:v="left";break;case 1:v="center";break;case 2:v="right"}return v},configurable:!0,enumerable:!0,set:function(v){switch(v){case"right":case 2:m=2;break;case"center":case 1:m=1;break;case"left":case 0:default:m=0}}})};Ko(TA,al);var fg=function(){TA.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 vG(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(Ci(this.Ff,18))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,18):this.Ff=bi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,19))},set:function(t){this.combo===!0&&(Boolean(t)===!0?this.Ff=Bi(this.Ff,19):this.Ff=bi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,20))},set:function(t){Boolean(t)===!0?(this.Ff=Bi(this.Ff,20),e.sort()):this.Ff=bi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,22))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,22):this.Ff=bi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,23))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,23):this.Ff=bi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,27))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,27):this.Ff=bi(this.Ff,27)}}),this.hasAppearanceStream=!1};Ko(fg,TA);var dg=function(){fg.call(this),this.fontName="helvetica",this.combo=!1};Ko(dg,fg);var pg=function(){dg.call(this),this.combo=!0};Ko(pg,dg);var uw=function(){pg.call(this),this.edit=!0};Ko(uw,pg);var sa=function(){TA.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,15))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,15):this.Ff=bi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,16))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,16):this.Ff=bi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,17))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,17):this.Ff=bi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,26))},set:function(t){Boolean(t)===!0?this.Ff=Bi(this.Ff,26):this.Ff=bi(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+" ("+Ld(t(e[n]))+")");return i.push(">>"),i.join(`
`)}},set:function(t){mn(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}})};Ko(sa,TA);var cw=function(){sa.call(this),this.pushButton=!0};Ko(cw,sa);var gg=function(){sa.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:[]}})};Ko(gg,sa);var gE=function(){var r,e;TA.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+" ("+Ld(i(n[a]))+")");return o.push(">>"),o.join(`
`)},set:function(i){mn(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=be.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};Ko(gE,TA),gg.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()}},gg.prototype.createOption=function(r){var e=new gE;return e.Parent=this,e.optionName=r,this.Kids.push(e),xut.call(this.scope,e),e};var hw=function(){sa.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=be.CheckBox.createAppearanceStream()};Ko(hw,sa);var Gf=function(){TA.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,13))},set:function(e){Boolean(e)===!0?this.Ff=Bi(this.Ff,13):this.Ff=bi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,21))},set:function(e){Boolean(e)===!0?this.Ff=Bi(this.Ff,21):this.Ff=bi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,23))},set:function(e){Boolean(e)===!0?this.Ff=Bi(this.Ff,23):this.Ff=bi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,24))},set:function(e){Boolean(e)===!0?this.Ff=Bi(this.Ff,24):this.Ff=bi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,25))},set:function(e){Boolean(e)===!0?this.Ff=Bi(this.Ff,25):this.Ff=bi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,26))},set:function(e){Boolean(e)===!0?this.Ff=Bi(this.Ff,26):this.Ff=bi(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}})};Ko(Gf,TA);var fw=function(){Gf.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(Ci(this.Ff,14))},set:function(r){Boolean(r)===!0?this.Ff=Bi(this.Ff,14):this.Ff=bi(this.Ff,14)}}),this.password=!0};Ko(fw,Gf);var be={CheckBox:{createAppearanceStream:function(){return{N:{On:be.CheckBox.YesNormal},D:{On:be.CheckBox.YesPushDown,Off:be.CheckBox.OffPushDown}}},YesPushDown:function(r){var e=zA(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=mI(r,r.caption);return t.push("0.749023 g"),t.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.internal.getHeight(r))+" re"),t.push("f"),t.push("BMC"),t.push("q"),t.push("0 0 1 rg"),t.push("/"+n+" "+sr(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=zA(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=be.internal.getHeight(r),o=be.internal.getWidth(r),s=mI(r,r.caption);return i.push("1 g"),i.push("0 0 "+sr(o)+" "+sr(a)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+sr(o-1)+" "+sr(a-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+t+" "+sr(s.fontSize)+" Tf "+n),i.push(s.text),i.push("ET"),i.push("Q"),e.stream=i.join(`
`),e},OffPushDown:function(r){var e=zA(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.internal.getHeight(r))+" re"),t.push("f"),e.stream=t.join(`
`),e}},RadioButton:{Circle:{createAppearanceStream:function(r){var e={D:{Off:be.RadioButton.Circle.OffPushDown},N:{}};return e.N[r]=be.RadioButton.Circle.YesNormal,e.D[r]=be.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(r){var e=zA(r);e.scope=r.scope;var t=[],n=be.internal.getWidth(r)<=be.internal.getHeight(r)?be.internal.getWidth(r)/4:be.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=be.internal.Bezier_C,a=Number((n*i).toFixed(5));return t.push("q"),t.push("1 0 0 1 "+mc(be.internal.getWidth(r)/2)+" "+mc(be.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=zA(r);e.scope=r.scope;var t=[],n=be.internal.getWidth(r)<=be.internal.getHeight(r)?be.internal.getWidth(r)/4:be.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*be.internal.Bezier_C).toFixed(5)),o=Number((n*be.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+mc(be.internal.getWidth(r)/2)+" "+mc(be.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 "+mc(be.internal.getWidth(r)/2)+" "+mc(be.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=zA(r);e.scope=r.scope;var t=[],n=be.internal.getWidth(r)<=be.internal.getHeight(r)?be.internal.getWidth(r)/4:be.internal.getHeight(r)/4;n=Number((.9*n).toFixed(5));var i=Number((2*n).toFixed(5)),a=Number((i*be.internal.Bezier_C).toFixed(5));return t.push("0.749023 g"),t.push("q"),t.push("1 0 0 1 "+mc(be.internal.getWidth(r)/2)+" "+mc(be.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:be.RadioButton.Cross.OffPushDown},N:{}};return e.N[r]=be.RadioButton.Cross.YesNormal,e.D[r]=be.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(r){var e=zA(r);e.scope=r.scope;var t=[],n=be.internal.calculateCross(r);return t.push("q"),t.push("1 1 "+sr(be.internal.getWidth(r)-2)+" "+sr(be.internal.getHeight(r)-2)+" re"),t.push("W"),t.push("n"),t.push(sr(n.x1.x)+" "+sr(n.x1.y)+" m"),t.push(sr(n.x2.x)+" "+sr(n.x2.y)+" l"),t.push(sr(n.x4.x)+" "+sr(n.x4.y)+" m"),t.push(sr(n.x3.x)+" "+sr(n.x3.y)+" l"),t.push("s"),t.push("Q"),e.stream=t.join(`
`),e},YesPushDown:function(r){var e=zA(r);e.scope=r.scope;var t=be.internal.calculateCross(r),n=[];return n.push("0.749023 g"),n.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.internal.getHeight(r))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+sr(be.internal.getWidth(r)-2)+" "+sr(be.internal.getHeight(r)-2)+" re"),n.push("W"),n.push("n"),n.push(sr(t.x1.x)+" "+sr(t.x1.y)+" m"),n.push(sr(t.x2.x)+" "+sr(t.x2.y)+" l"),n.push(sr(t.x4.x)+" "+sr(t.x4.y)+" m"),n.push(sr(t.x3.x)+" "+sr(t.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(`
`),e},OffPushDown:function(r){var e=zA(r);e.scope=r.scope;var t=[];return t.push("0.749023 g"),t.push("0 0 "+sr(be.internal.getWidth(r))+" "+sr(be.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}};be.internal={Bezier_C:.551915024494,calculateCross:function(r){var e=be.internal.getWidth(r),t=be.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}}}},be.internal.getWidth=function(r){var e=0;return mn(r)==="object"&&(e=M5(r.Rect[2])),e},be.internal.getHeight=function(r){var e=0;return mn(r)==="object"&&(e=M5(r.Rect[3])),e};var xut=oi.addField=function(r){if(Sut(this,r),!(r instanceof TA))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};oi.AcroFormChoiceField=fg,oi.AcroFormListBox=dg,oi.AcroFormComboBox=pg,oi.AcroFormEditBox=uw,oi.AcroFormButton=sa,oi.AcroFormPushButton=cw,oi.AcroFormRadioButton=gg,oi.AcroFormCheckBox=hw,oi.AcroFormTextField=Gf,oi.AcroFormPasswordField=fw,oi.AcroFormAppearance=be,oi.AcroForm={ChoiceField:fg,ListBox:dg,ComboBox:pg,EditBox:uw,Button:sa,PushButton:cw,RadioButton:gg,CheckBox:hw,TextField:Gf,PasswordField:fw,Appearance:be},Ke.AcroForm={ChoiceField:fg,ListBox:dg,ComboBox:pg,EditBox:uw,Button:sa,PushButton:cw,RadioButton:gg,CheckBox:hw,TextField:Gf,PasswordField:fw,Appearance:be};Ke.AcroForm;function _G(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 P,U,tt,q,rt,nt=e;if((S=S||e)==="RGBA"||x.data!==void 0&&x.data instanceof Uint8ClampedArray&&"height"in x&&"width"in x)return"RGBA";if(F(x))for(rt in t)for(tt=t[rt],P=0;P<tt.length;P+=1){for(q=!0,U=0;U<tt[P].length;U+=1)if(tt[P][U]!==void 0&&tt[P][U]!==x[U]){q=!1;break}if(q===!0){nt=rt;break}}else for(rt in t)for(tt=t[rt],P=0;P<tt.length;P+=1){for(q=!0,U=0;U<tt[P].length;U+=1)if(tt[P][U]!==void 0&&tt[P][U]!==x.charCodeAt(U)){q=!1;break}if(q===!0){nt=rt;break}}return nt===e&&S!==e&&(nt=S),nt},i=function x(S){for(var P=this.internal.write,U=this.internal.putStream,tt=(0,this.internal.getFilters)();tt.indexOf("FlateEncode")!==-1;)tt.splice(tt.indexOf("FlateEncode"),1);S.objectId=this.internal.newObject();var q=[];if(q.push({key:"Type",value:"/XObject"}),q.push({key:"Subtype",value:"/Image"}),q.push({key:"Width",value:S.width}),q.push({key:"Height",value:S.height}),S.colorSpace===m.INDEXED?q.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]"}):(q.push({key:"ColorSpace",value:"/"+S.colorSpace}),S.colorSpace===m.DEVICE_CMYK&&q.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),q.push({key:"BitsPerComponent",value:S.bitsPerComponent}),"decodeParameters"in S&&S.decodeParameters!==void 0&&q.push({key:"DecodeParms",value:"<<"+S.decodeParameters+">>"}),"transparency"in S&&Array.isArray(S.transparency)){for(var rt="",nt=0,At=S.transparency.length;nt<At;nt++)rt+=S.transparency[nt]+" "+S.transparency[nt]+" ";q.push({key:"Mask",value:"["+rt+"]"})}S.sMask!==void 0&&q.push({key:"SMask",value:S.objectId+1+" 0 R"});var ct=S.filter!==void 0?["/"+S.filter]:void 0;if(U({data:S.data,additionalKeyValues:q,alreadyAppliedFilters:ct,objectId:S.objectId}),P("endobj"),"sMask"in S&&S.sMask!==void 0){var Tt="/Predictor "+S.predictor+" /Colors 1 /BitsPerComponent "+S.bitsPerComponent+" /Columns "+S.width,M={width:S.width,height:S.height,colorSpace:"DeviceGray",bitsPerComponent:S.bitsPerComponent,decodeParameters:Tt,data:S.sMask};"filter"in S&&(M.filter=S.filter),x.call(this,M)}if(S.colorSpace===m.INDEXED){var W=this.internal.newObject();U({data:T(new Uint8Array(S.palette)),objectId:W}),P("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,P=this.internal.write;for(var U in S)P("/I"+(x=S[U]).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 mn(x)==="object"&&x.nodeType===1},h=function(x,S){if(x.nodeName==="IMG"&&x.hasAttribute("src")){var P=""+x.getAttribute("src");if(P.indexOf("data:image/")===0)return sy(unescape(P).split("base64,").pop());var U=r.loadFile(P,!0);if(U!==void 0)return U}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 tt;switch(S){case"PNG":tt="image/png";break;case"WEBP":tt="image/webp";break;case"JPEG":case"JPG":default:tt="image/jpeg"}return sy(x.toDataURL(tt,1).split("base64,").pop())}},f=function(x){var S=this.internal.collections.addImage_images;if(S){for(var P in S)if(x===S[P].alias)return S[P]}},d=function(x,S,P){return x||S||(x=-96,S=-96),x<0&&(x=-1*P.width*72/x/this.internal.scaleFactor),S<0&&(S=-1*P.height*72/S/this.internal.scaleFactor),x===0&&(x=S*P.width/P.height),S===0&&(S=x*P.height/P.width),[x,S]},g=function(x,S,P,U,tt,q){var rt=d.call(this,P,U,tt),nt=this.internal.getCoordinateString,At=this.internal.getVerticalCoordinateString,ct=A.call(this);if(P=rt[0],U=rt[1],ct[tt.index]=tt,q){q*=Math.PI/180;var Tt=Math.cos(q),M=Math.sin(q),W=function(H){return H.toFixed(4)},Y=[W(Tt),W(M),W(-1*M),W(Tt),0,0,"cm"]}this.internal.write("q"),q?(this.internal.write([1,"0","0",1,nt(x),At(S+U),"cm"].join(" ")),this.internal.write(Y.join(" ")),this.internal.write([nt(P),"0","0",nt(U),"0","0","cm"].join(" "))):this.internal.write([nt(P),"0","0",nt(U),nt(x),At(S+U),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+tt.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 v=r.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},y=r.__addimage__.sHashCode=function(x){var S,P,U=0;if(typeof x=="string")for(P=x.length,S=0;S<P;S++)U=(U<<5)-U+x.charCodeAt(S),U|=0;else if(F(x))for(P=x.byteLength/2,S=0;S<P;S++)U=(U<<5)-U+x[S],U|=0;return U},w=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},C=r.__addimage__.extractImageFromDataUrl=function(x){var S=(x=x||"").split("base64,"),P=null;if(S.length===2){var U=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(S[0]);Array.isArray(U)&&(P={mimeType:U[1],charset:U[2],data:S[1]})}return P},O=r.__addimage__.supportsArrayBuffer=function(){return typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"};r.__addimage__.isArrayBuffer=function(x){return O()&&x instanceof ArrayBuffer};var F=r.__addimage__.isArrayBufferView=function(x){return O()&&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)},I=r.__addimage__.binaryStringToUint8Array=function(x){for(var S=x.length,P=new Uint8Array(S),U=0;U<S;U++)P[U]=x.charCodeAt(U);return P},T=r.__addimage__.arrayBufferToBinaryString=function(x){for(var S="",P=F(x)?x:new Uint8Array(x),U=0;U<P.length;U+=8192)S+=String.fromCharCode.apply(null,P.subarray(U,U+8192));return S};r.addImage=function(){var x,S,P,U,tt,q,rt,nt,At;if(typeof arguments[1]=="number"?(S=e,P=arguments[1],U=arguments[2],tt=arguments[3],q=arguments[4],rt=arguments[5],nt=arguments[6],At=arguments[7]):(S=arguments[1],P=arguments[2],U=arguments[3],tt=arguments[4],q=arguments[5],rt=arguments[6],nt=arguments[7],At=arguments[8]),mn(x=arguments[0])==="object"&&!c(x)&&"imageData"in x){var ct=x;x=ct.imageData,S=ct.format||S||e,P=ct.x||P||0,U=ct.y||U||0,tt=ct.w||ct.width||tt,q=ct.h||ct.height||q,rt=ct.alias||rt,nt=ct.compression||nt,At=ct.rotation||ct.angle||At}var Tt=this.internal.getFilters();if(nt===void 0&&Tt.indexOf("FlateEncode")!==-1&&(nt="SLOW"),isNaN(P)||isNaN(U))throw new Error("Invalid coordinates passed to jsPDF.addImage");s.call(this);var M=L.call(this,x,S,rt,nt);return g.call(this,P,U,tt,q,M,At),this};var L=function(x,S,P,U){var tt,q,rt;if(typeof x=="string"&&n(x)===e){x=unescape(x);var nt=N(x,!1);(nt!==""||(nt=r.loadFile(x,!0))!==void 0)&&(x=nt)}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(((rt=P)==null||rt.length===0)&&(P=function(At){return typeof At=="string"||F(At)?y(At):F(At.data)?y(At.data):null}(x)),(tt=f.call(this,P))||(O()&&(x instanceof Uint8Array||S==="RGBA"||(q=x,x=I(x))),tt=this["process"+S.toUpperCase()](x,l.call(this),P,function(At){return At&&typeof At=="string"&&(At=At.toUpperCase()),At in r.image_compression?At:v.NONE}(U),q)),!tt)throw new Error("An unknown error occurred whilst processing the image.");return tt},N=r.__addimage__.convertBase64ToBinaryString=function(x,S){var P;S=typeof S!="boolean"||S;var U,tt="";if(typeof x=="string"){U=(P=C(x))!==null?P.data:x;try{tt=sy(U)}catch(q){if(S)throw w(U)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+q.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return tt};r.getImageProperties=function(x){var S,P,U="";if(c(x)&&(x=h(x)),typeof x=="string"&&n(x)===e&&((U=N(x,!1))===""&&(U=r.loadFile(x)||""),x=U),P=n(x),!u(P))throw new Error("addImage does not support files of type '"+P+"', please ensure that a plugin for '"+P+"' support is added.");if(!O()||x instanceof Uint8Array||(x=I(x)),!(S=this["process"+P.toUpperCase()](x)))throw new Error("An unknown error occurred whilst processing the image");return S.fileType=P,S}})(Ke.API),function(r){var e=function(t){if(t!==void 0&&t!="")return!0};Ke.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,d=this.internal.getEncryptor(t.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var g=this.internal.newAdditionalObject(),m=this.internal.newAdditionalObject(),v=this.internal.getEncryptor(g.objId),y=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(v(n.contents))+")",a+=" /Popup "+m.objId+" 0 R",a+=" /P "+A.objId+" 0 R",a+=" /T ("+f(v(y))+") >>",g.content=a;var w=g.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 "+w,n.open&&(a+=" /Open true"),a+=" >>",m.content=a,this.internal.write(g.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 C=n.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+f(d(n.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+C+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var O=this.annotations._nameMap[n.options.name];n.options.pageNumber=O.page,n.options.top=O.y}else n.options.top||(n.options.top=0);if(i="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",a="",n.options.url)a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+f(d(n.options.url))+") >>";else if(n.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,a+=" /FitV "+n.options.left+"]";break;case"XYZ":default:var F=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+" "+F+" "+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}}(Ke.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(g){return e[g.charCodeAt(0)]!==void 0},o=r.__arabicParser__.isArabicLetter=function(g){return typeof g=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(g)},s=r.__arabicParser__.isArabicEndLetter=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length<=2},A=r.__arabicParser__.isArabicAlfLetter=function(g){return o(g)&&i.indexOf(g.charCodeAt(0))>=0};r.__arabicParser__.arabicLetterHasIsolatedForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length>=1};var l=r.__arabicParser__.arabicLetterHasFinalForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length>=2};r.__arabicParser__.arabicLetterHasInitialForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length>=3};var u=r.__arabicParser__.arabicLetterHasMedialForm=function(g){return o(g)&&a(g)&&e[g.charCodeAt(0)].length==4},c=r.__arabicParser__.resolveLigatures=function(g){var m=0,v=t,y="",w=0;for(m=0;m<g.length;m+=1)v[g.charCodeAt(m)]!==void 0?(w++,typeof(v=v[g.charCodeAt(m)])=="number"&&(y+=String.fromCharCode(v),v=t,w=0),m===g.length-1&&(v=t,y+=g.charAt(m-(w-1)),m-=w-1,w=0)):(v=t,y+=g.charAt(m-w),m-=w,w=0);return y};r.__arabicParser__.isArabicDiacritic=function(g){return g!==void 0&&n[g.charCodeAt(0)]!==void 0};var h=r.__arabicParser__.getCorrectForm=function(g,m,v){return o(g)?a(g)===!1?-1:!l(g)||!o(m)&&!o(v)||!o(v)&&s(m)||s(g)&&!o(m)||s(g)&&A(m)||s(g)&&s(m)?0:u(g)&&o(m)&&!s(m)&&o(v)&&l(v)?3:s(g)||!o(v)?1:2:-1},f=function(g){var m=0,v=0,y=0,w="",C="",O="",F=(g=g||"").split("\\s+"),I=[];for(m=0;m<F.length;m+=1){for(I.push(""),v=0;v<F[m].length;v+=1)w=F[m][v],C=F[m][v-1],O=F[m][v+1],o(w)?(y=h(w,C,O),I[m]+=y!==-1?String.fromCharCode(e[w.charCodeAt(0)][y]):w):I[m]+=w;I[m]=c(I[m])}return I.join(" ")},d=r.__arabicParser__.processArabic=r.processArabic=function(){var g,m=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,v=[];if(Array.isArray(m)){var y=0;for(v=[],y=0;y<m.length;y+=1)Array.isArray(m[y])?v.push([f(m[y][0]),m[y][1],m[y][2]]):v.push([f(m[y])]);g=v}else g=f(m);return typeof arguments[0]=="string"?g:(arguments[0].text=g,arguments[0])};r.events.push(["preProcessText",d])}(Ke.API),Ke.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}])}(Ke.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(g){A=g}});var l=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return l},set:function(g){l=g}});var u=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return u},set:function(g){u=g}});var c=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return c},set:function(g){c=g}});var h=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return h},set:function(g){h=g}});var f=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return f},set:function(g){f=g}});var d=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return d},set:function(g){d=g}}),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,d=0,g=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 v=l.maxWidth;v>0?typeof A=="string"?A=this.splitTextToSize(A,v):Object.prototype.toString.call(A)==="[object Array]"&&(A=A.reduce(function(w,C){return w.concat(m.splitTextToSize(C,v))},[])):A=Array.isArray(A)?A:[A];for(var y=0;y<A.length;y++)f<(g=this.getStringUnitWidth(A[y],{font:c})*u)&&(f=g);return f!==0&&(d=A.length),{w:f/=h,h:Math.max((d*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,d,g,m,v=[],y=[],w=[],C={},O={},F=[],I=[],T=(h=h||{}).autoSize||!1,L=h.printHeaders!==!1,N=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,P=h.headerBackgroundColor||"#c8c8c8",U=h.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=L,this.internal.__cell__.margins=x,this.internal.__cell__.table_font_size=N,this.internal.__cell__.padding=S,this.internal.__cell__.headerBackgroundColor=P,this.internal.__cell__.headerTextColor=U,this.setFontSize(N),c==null)y=v=Object.keys(u[0]),w=v.map(function(){return"left"});else if(Array.isArray(c)&&mn(c[0])==="object")for(v=c.map(function(ct){return ct.name}),y=c.map(function(ct){return ct.prompt||ct.name||""}),w=c.map(function(ct){return ct.align||"left"}),f=0;f<c.length;f+=1)O[c[f].name]=c[f].width*(19.049976/25.4);else Array.isArray(c)&&typeof c[0]=="string"&&(y=v=c,w=v.map(function(){return"left"}));if(T||Array.isArray(c)&&typeof c[0]=="string")for(f=0;f<v.length;f+=1){for(C[m=v[f]]=u.map(function(ct){return ct[m]}),this.setFont(void 0,"bold"),F.push(this.getTextDimensions(y[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),d=C[m],this.setFont(void 0,"normal"),g=0;g<d.length;g+=1)F.push(this.getTextDimensions(d[g],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);O[m]=Math.max.apply(null,F)+S+S,F=[]}if(L){var tt={};for(f=0;f<v.length;f+=1)tt[v[f]]={},tt[v[f]].text=y[f],tt[v[f]].align=w[f];var q=s.call(this,tt,O);I=v.map(function(ct){return new a(A,l,O[ct],q,tt[ct].text,void 0,tt[ct].align)}),this.setTableHeaderRow(I),this.printHeaderRow(1,!1)}var rt=c.reduce(function(ct,Tt){return ct[Tt.name]=Tt.align,ct},{});for(f=0;f<u.length;f+=1){"rowStart"in h&&h.rowStart instanceof Function&&h.rowStart({row:f,data:u[f]},this);var nt=s.call(this,u[f],O);for(g=0;g<v.length;g+=1){var At=u[f][v[g]];"cellStart"in h&&h.cellStart instanceof Function&&h.cellStart({row:f,col:g,data:At},this),o.call(this,new a(A,l,O[v[g]],nt,At,f+2,rt[v[g]]))}}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 d=A[f];return this.splitTextToSize(d.hasOwnProperty("text")?d.text:d,l[f]-u-u)},this).map(function(f){return this.getLineHeightFactor()*f.length*c/h+u+u},this).reduce(function(f,d){return Math.max(f,d)},0)};r.setTableHeaderRow=function(A){n.call(this),this.internal.__cell__.tableHeaderRow=A},r.printHeaderRow=function(A,l){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var u;if(t=!0,typeof this.internal.__cell__.headerFunction=="function"){var 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 d=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,u),this.setTextColor(d)}h.length>0&&this.setTableHeaderRow(h),this.setFont(void 0,"normal"),t=!1}}(Ke.API);var wG={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},EG=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],yI=_G(EG),CG=[100,200,300,400,500,600,700,800,900],Iut=_G(CG);function _I(r){var e=r.family.replace(/"|'/g,"").toLowerCase(),t=function(a){return wG[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 yI[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 N5(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 Lut={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},P5={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function U5(r){return[r.stretch,r.style,r.weight,r.family].join(" ")}function Out(r,e,t){for(var n=(t=t||{}).defaultFontFamily||"times",i=Object.assign({},Lut,t.genericFontFamilies||{}),a=null,o=null,s=0;s<e.length;++s)if(i[(a=_I(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 '"+U5(a)+"' and default family '"+n+"'.");if(o=function(A,l){if(l[A])return l[A];var u=yI[A],c=u<=yI.normal?-1:1,h=N5(l,EG,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=wG[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=Iut[A],c=N5(l,CG,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 '"+U5(a)+"'.");return o}function D5(r){return r.trimLeft()}function Fut(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 Rut(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 i1,Q5,k5,cT=["times"];(function(r){var e,t,n,i,a,o,s,A,l,u=function(M){return M=M||{},this.isStrokeTransparent=M.isStrokeTransparent||!1,this.strokeOpacity=M.strokeOpacity||1,this.strokeStyle=M.strokeStyle||"#000000",this.fillStyle=M.fillStyle||"#000000",this.isFillTransparent=M.isFillTransparent||!1,this.fillOpacity=M.fillOpacity||1,this.font=M.font||"10px sans-serif",this.textBaseline=M.textBaseline||"alphabetic",this.textAlign=M.textAlign||"left",this.lineWidth=M.lineWidth||1,this.lineJoin=M.lineJoin||"miter",this.lineCap=M.lineCap||"butt",this.path=M.path||[],this.transform=M.transform!==void 0?M.transform.clone():new A,this.globalCompositeOperation=M.globalCompositeOperation||"normal",this.globalAlpha=M.globalAlpha||1,this.clip_path=M.clip_path||[],this.currentPoint=M.currentPoint||new o,this.miterLimit=M.miterLimit||10,this.lastPoint=M.lastPoint||new o,this.lineDashOffset=M.lineDashOffset||0,this.lineDash=M.lineDash||[],this.margin=M.margin||[0,0,0,0],this.prevPageLastElemOffset=M.prevPageLastElemOffset||0,this.ignoreClearRect=typeof M.ignoreClearRect!="boolean"||M.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(M){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var W=M;Object.defineProperty(this,"pdf",{get:function(){return W}});var Y=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return Y},set:function(it){Y=Boolean(it)}});var H=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return H},set:function(it){H=Boolean(it)}});var J=0;Object.defineProperty(this,"posX",{get:function(){return J},set:function(it){isNaN(it)||(J=it)}});var ot=0;Object.defineProperty(this,"posY",{get:function(){return ot},set:function(it){isNaN(it)||(ot=it)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(it){var V;typeof it=="number"?V=[it,it,it,it]:((V=new Array(4))[0]=it[0],V[1]=it.length>=2?it[1]:V[0],V[2]=it.length>=3?it[2]:V[0],V[3]=it.length>=4?it[3]:V[1]),l.margin=V}});var ut=!1;Object.defineProperty(this,"autoPaging",{get:function(){return ut},set:function(it){ut=it}});var X=0;Object.defineProperty(this,"lastBreak",{get:function(){return X},set:function(it){X=it}});var It=[];Object.defineProperty(this,"pageBreaks",{get:function(){return It},set:function(it){It=it}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(it){it instanceof u&&(l=it)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(it){l.path=it}});var at=[];Object.defineProperty(this,"ctxStack",{get:function(){return at},set:function(it){at=it}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(it){var V;V=h(it),this.ctx.fillStyle=V.style,this.ctx.isFillTransparent=V.a===0,this.ctx.fillOpacity=V.a,this.pdf.setFillColor(V.r,V.g,V.b,{a:V.a}),this.pdf.setTextColor(V.r,V.g,V.b,{a:V.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(it){var V=h(it);this.ctx.strokeStyle=V.style,this.ctx.isStrokeTransparent=V.a===0,this.ctx.strokeOpacity=V.a,V.a===0?this.pdf.setDrawColor(255,255,255):(V.a,this.pdf.setDrawColor(V.r,V.g,V.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(it){["butt","round","square"].indexOf(it)!==-1&&(this.ctx.lineCap=it,this.pdf.setLineCap(it))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(it){isNaN(it)||(this.ctx.lineWidth=it,this.pdf.setLineWidth(it))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(it){["bevel","round","miter"].indexOf(it)!==-1&&(this.ctx.lineJoin=it,this.pdf.setLineJoin(it))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(it){isNaN(it)||(this.ctx.miterLimit=it,this.pdf.setMiterLimit(it))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(it){this.ctx.textBaseline=it}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(it){["right","end","center","left","start"].indexOf(it)!==-1&&(this.ctx.textAlign=it)}});var j=null;function Z(it,V){if(j===null){var Ft=function(Mt){var Et=[];return Object.keys(Mt).forEach(function(Bt){Mt[Bt].forEach(function(Ct){var Rt=null;switch(Ct){case"bold":Rt={family:Bt,weight:"bold"};break;case"italic":Rt={family:Bt,style:"italic"};break;case"bolditalic":Rt={family:Bt,weight:"bold",style:"italic"};break;case"":case"normal":Rt={family:Bt}}Rt!==null&&(Rt.ref={name:Bt,style:Ct},Et.push(Rt))})}),Et}(it.getFontList());j=function(Mt){for(var Et={},Bt=0;Bt<Mt.length;++Bt){var Ct=_I(Mt[Bt]),Rt=Ct.family,Nt=Ct.stretch,Dt=Ct.style,Wt=Ct.weight;Et[Rt]=Et[Rt]||{},Et[Rt][Nt]=Et[Rt][Nt]||{},Et[Rt][Nt][Dt]=Et[Rt][Nt][Dt]||{},Et[Rt][Nt][Dt][Wt]=Ct}return Et}(Ft.concat(V))}return j}var ft=null;Object.defineProperty(this,"fontFaces",{get:function(){return ft},set:function(it){j=null,ft=it}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(it){var V;if(this.ctx.font=it,(V=/^\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(it))!==null){var Ft=V[1],Mt=(V[2],V[3]),Et=V[4],Bt=(V[5],V[6]),Ct=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(Et)[2];Et=Math.floor(Ct==="px"?parseFloat(Et)*this.pdf.internal.scaleFactor:Ct==="em"?parseFloat(Et)*this.pdf.getFontSize():parseFloat(Et)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(Et);var Rt=function(Jt){var fe,qt,nr=[],ke=Jt.trim();if(ke==="")return cT;if(ke in P5)return[P5[ke]];for(;ke!=="";){switch(qt=null,fe=(ke=D5(ke)).charAt(0)){case'"':case"'":qt=Fut(ke.substring(1),fe);break;default:qt=Rut(ke)}if(qt===null||(nr.push(qt[0]),(ke=D5(qt[1]))!==""&&ke.charAt(0)!==","))return cT;ke=ke.replace(/^,/,"")}return nr}(Bt);if(this.fontFaces){var Nt=Out(Z(this.pdf,this.fontFaces),Rt.map(function(Jt){return{family:Jt,stretch:"normal",weight:Mt,style:Ft}}));this.pdf.setFont(Nt.ref.name,Nt.ref.style)}else{var Dt="";(Mt==="bold"||parseInt(Mt,10)>=700||Ft==="bold")&&(Dt="bold"),Ft==="italic"&&(Dt+="italic"),Dt.length===0&&(Dt="normal");for(var Wt="",te={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"},Ae=0;Ae<Rt.length;Ae++){if(this.pdf.internal.getFont(Rt[Ae],Dt,{noFallback:!0,disableWarning:!0})!==void 0){Wt=Rt[Ae];break}if(Dt==="bolditalic"&&this.pdf.internal.getFont(Rt[Ae],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Wt=Rt[Ae],Dt="bold";else if(this.pdf.internal.getFont(Rt[Ae],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Wt=Rt[Ae],Dt="normal";break}}if(Wt===""){for(var oe=0;oe<Rt.length;oe++)if(te[Rt[oe]]){Wt=te[Rt[oe]];break}}Wt=Wt===""?"Times":Wt,this.pdf.setFont(Wt,Dt)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(it){this.ctx.globalCompositeOperation=it}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(it){this.ctx.globalAlpha=it}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(it){this.ctx.lineDashOffset=it,Tt.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(it){this.ctx.lineDash=it,Tt.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(it){this.ctx.ignoreClearRect=Boolean(it)}})};c.prototype.setLineDash=function(M){this.lineDash=M},c.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},c.prototype.fill=function(){C.call(this,"fill",!1)},c.prototype.stroke=function(){C.call(this,"stroke",!1)},c.prototype.beginPath=function(){this.path=[{type:"begin"}]},c.prototype.moveTo=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var Y=this.ctx.transform.applyToPoint(new o(M,W));this.path.push({type:"mt",x:Y.x,y:Y.y}),this.ctx.lastPoint=new o(M,W)},c.prototype.closePath=function(){var M=new o(0,0),W=0;for(W=this.path.length-1;W!==-1;W--)if(this.path[W].type==="begin"&&mn(this.path[W+1])==="object"&&typeof this.path[W+1].x=="number"){M=new o(this.path[W+1].x,this.path[W+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(M.x,M.y)},c.prototype.lineTo=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var Y=this.ctx.transform.applyToPoint(new o(M,W));this.path.push({type:"lt",x:Y.x,y:Y.y}),this.ctx.lastPoint=new o(Y.x,Y.y)},c.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),C.call(this,null,!0)},c.prototype.quadraticCurveTo=function(M,W,Y,H){if(isNaN(Y)||isNaN(H)||isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var J=this.ctx.transform.applyToPoint(new o(Y,H)),ot=this.ctx.transform.applyToPoint(new o(M,W));this.path.push({type:"qct",x1:ot.x,y1:ot.y,x:J.x,y:J.y}),this.ctx.lastPoint=new o(J.x,J.y)},c.prototype.bezierCurveTo=function(M,W,Y,H,J,ot){if(isNaN(J)||isNaN(ot)||isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var ut=this.ctx.transform.applyToPoint(new o(J,ot)),X=this.ctx.transform.applyToPoint(new o(M,W)),It=this.ctx.transform.applyToPoint(new o(Y,H));this.path.push({type:"bct",x1:X.x,y1:X.y,x2:It.x,y2:It.y,x:ut.x,y:ut.y}),this.ctx.lastPoint=new o(ut.x,ut.y)},c.prototype.arc=function(M,W,Y,H,J,ot){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H)||isNaN(J))throw Bn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(ot=Boolean(ot),!this.ctx.transform.isIdentity){var ut=this.ctx.transform.applyToPoint(new o(M,W));M=ut.x,W=ut.y;var X=this.ctx.transform.applyToPoint(new o(0,Y)),It=this.ctx.transform.applyToPoint(new o(0,0));Y=Math.sqrt(Math.pow(X.x-It.x,2)+Math.pow(X.y-It.y,2))}Math.abs(J-H)>=2*Math.PI&&(H=0,J=2*Math.PI),this.path.push({type:"arc",x:M,y:W,radius:Y,startAngle:H,endAngle:J,counterclockwise:ot})},c.prototype.arcTo=function(M,W,Y,H,J){throw new Error("arcTo not implemented.")},c.prototype.rect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(M,W),this.lineTo(M+Y,W),this.lineTo(M+Y,W+H),this.lineTo(M,W+H),this.lineTo(M,W),this.lineTo(M+Y,W),this.lineTo(M,W)},c.prototype.fillRect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var J={};this.lineCap!=="butt"&&(J.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(J.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(M,W,Y,H),this.fill(),J.hasOwnProperty("lineCap")&&(this.lineCap=J.lineCap),J.hasOwnProperty("lineJoin")&&(this.lineJoin=J.lineJoin)}},c.prototype.strokeRect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");d.call(this)||(this.beginPath(),this.rect(M,W,Y,H),this.stroke())},c.prototype.clearRect=function(M,W,Y,H){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H))throw Bn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(M,W,Y,H))},c.prototype.save=function(M){M=typeof M!="boolean"||M;for(var W=this.pdf.internal.getCurrentPageInfo().pageNumber,Y=0;Y<this.pdf.internal.getNumberOfPages();Y++)this.pdf.setPage(Y+1),this.pdf.internal.out("q");if(this.pdf.setPage(W),M){this.ctx.fontSize=this.pdf.internal.getFontSize();var H=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=H}},c.prototype.restore=function(M){M=typeof M!="boolean"||M;for(var W=this.pdf.internal.getCurrentPageInfo().pageNumber,Y=0;Y<this.pdf.internal.getNumberOfPages();Y++)this.pdf.setPage(Y+1),this.pdf.internal.out("Q");this.pdf.setPage(W),M&&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(M){var W,Y,H,J;if(M.isCanvasGradient===!0&&(M=M.getColor()),!M)return{r:0,g:0,b:0,a:0,style:M};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(M))W=0,Y=0,H=0,J=0;else{var ot=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(M);if(ot!==null)W=parseInt(ot[1]),Y=parseInt(ot[2]),H=parseInt(ot[3]),J=1;else if((ot=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(M))!==null)W=parseInt(ot[1]),Y=parseInt(ot[2]),H=parseInt(ot[3]),J=parseFloat(ot[4]);else{if(J=1,typeof M=="string"&&M.charAt(0)!=="#"){var ut=new dG(M);M=ut.ok?ut.toHex():"#000000"}M.length===4?(W=M.substring(1,2),W+=W,Y=M.substring(2,3),Y+=Y,H=M.substring(3,4),H+=H):(W=M.substring(1,3),Y=M.substring(3,5),H=M.substring(5,7)),W=parseInt(W,16),Y=parseInt(Y,16),H=parseInt(H,16)}}return{r:W,g:Y,b:H,a:J,style:M}},f=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},d=function(){return Boolean(this.ctx.isStrokeTransparent||this.globalAlpha==0)};c.prototype.fillText=function(M,W,Y,H){if(isNaN(W)||isNaN(Y)||typeof M!="string")throw Bn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(H=isNaN(H)?void 0:H,!f.call(this)){var J=nt(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;S.call(this,{text:M,x:W,y:Y,scale:ot,angle:J,align:this.textAlign,maxWidth:H})}},c.prototype.strokeText=function(M,W,Y,H){if(isNaN(W)||isNaN(Y)||typeof M!="string")throw Bn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!d.call(this)){H=isNaN(H)?void 0:H;var J=nt(this.ctx.transform.rotation),ot=this.ctx.transform.scaleX;S.call(this,{text:M,x:W,y:Y,scale:ot,renderingMode:"stroke",angle:J,align:this.textAlign,maxWidth:H})}},c.prototype.measureText=function(M){if(typeof M!="string")throw Bn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var W=this.pdf,Y=this.pdf.internal.scaleFactor,H=W.internal.getFontSize(),J=W.getStringUnitWidth(M)*H/W.internal.scaleFactor,ot=function(ut){var X=(ut=ut||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return X}}),this};return new ot({width:J*=Math.round(96*Y/72*1e4)/1e4})},c.prototype.scale=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var Y=new A(M,0,0,W,0,0);this.ctx.transform=this.ctx.transform.multiply(Y)},c.prototype.rotate=function(M){if(isNaN(M))throw Bn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var W=new A(Math.cos(M),Math.sin(M),-Math.sin(M),Math.cos(M),0,0);this.ctx.transform=this.ctx.transform.multiply(W)},c.prototype.translate=function(M,W){if(isNaN(M)||isNaN(W))throw Bn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var Y=new A(1,0,0,1,M,W);this.ctx.transform=this.ctx.transform.multiply(Y)},c.prototype.transform=function(M,W,Y,H,J,ot){if(isNaN(M)||isNaN(W)||isNaN(Y)||isNaN(H)||isNaN(J)||isNaN(ot))throw Bn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var ut=new A(M,W,Y,H,J,ot);this.ctx.transform=this.ctx.transform.multiply(ut)},c.prototype.setTransform=function(M,W,Y,H,J,ot){M=isNaN(M)?1:M,W=isNaN(W)?0:W,Y=isNaN(Y)?0:Y,H=isNaN(H)?1:H,J=isNaN(J)?0:J,ot=isNaN(ot)?0:ot,this.ctx.transform=new A(M,W,Y,H,J,ot)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};c.prototype.drawImage=function(M,W,Y,H,J,ot,ut,X,It){var at=this.pdf.getImageProperties(M),j=1,Z=1,ft=1,it=1;H!==void 0&&X!==void 0&&(ft=X/H,it=It/J,j=at.width/H*X/H,Z=at.height/J*It/J),ot===void 0&&(ot=W,ut=Y,W=0,Y=0),H!==void 0&&X===void 0&&(X=H,It=J),H===void 0&&X===void 0&&(X=at.width,It=at.height);for(var V,Ft=this.ctx.transform.decompose(),Mt=nt(Ft.rotate.shx),Et=new A,Bt=(Et=(Et=(Et=Et.multiply(Ft.translate)).multiply(Ft.skew)).multiply(Ft.scale)).applyToRectangle(new s(ot-W*ft,ut-Y*it,H*j,J*Z)),Ct=m.call(this,Bt),Rt=[],Nt=0;Nt<Ct.length;Nt+=1)Rt.indexOf(Ct[Nt])===-1&&Rt.push(Ct[Nt]);if(w(Rt),this.autoPaging)for(var Dt=Rt[0],Wt=Rt[Rt.length-1],te=Dt;te<Wt+1;te++){this.pdf.setPage(te);var Ae=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],oe=te===1?this.posY+this.margin[0]:this.margin[0],Jt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],fe=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],qt=te===1?0:Jt+(te-2)*fe;if(this.ctx.clip_path.length!==0){var nr=this.path;V=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(V,this.posX+this.margin[3],-qt+oe+this.ctx.prevPageLastElemOffset),O.call(this,"fill",!0),this.path=nr}var ke=JSON.parse(JSON.stringify(Bt));ke=y([ke],this.posX+this.margin[3],-qt+oe+this.ctx.prevPageLastElemOffset)[0];var wr=(te>Dt||te<Wt)&&g.call(this);wr&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Ae,fe,null).clip().discardPath()),this.pdf.addImage(M,"JPEG",ke.x,ke.y,ke.w,ke.h,null,null,Mt),wr&&this.pdf.restoreGraphicsState()}else this.pdf.addImage(M,"JPEG",Bt.x,Bt.y,Bt.w,Bt.h,null,null,Mt)};var m=function(M,W,Y){var H=[];W=W||this.pdf.internal.pageSize.width,Y=Y||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var J=this.posY+this.ctx.prevPageLastElemOffset;switch(M.type){default:case"mt":case"lt":H.push(Math.floor((M.y+J)/Y)+1);break;case"arc":H.push(Math.floor((M.y+J-M.radius)/Y)+1),H.push(Math.floor((M.y+J+M.radius)/Y)+1);break;case"qct":var ot=At(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x,M.y);H.push(Math.floor((ot.y+J)/Y)+1),H.push(Math.floor((ot.y+ot.h+J)/Y)+1);break;case"bct":var ut=ct(this.ctx.lastPoint.x,this.ctx.lastPoint.y,M.x1,M.y1,M.x2,M.y2,M.x,M.y);H.push(Math.floor((ut.y+J)/Y)+1),H.push(Math.floor((ut.y+ut.h+J)/Y)+1);break;case"rect":H.push(Math.floor((M.y+J)/Y)+1),H.push(Math.floor((M.y+M.h+J)/Y)+1)}for(var X=0;X<H.length;X+=1)for(;this.pdf.internal.getNumberOfPages()<H[X];)v.call(this);return H},v=function(){var M=this.fillStyle,W=this.strokeStyle,Y=this.font,H=this.lineCap,J=this.lineWidth,ot=this.lineJoin;this.pdf.addPage(),this.fillStyle=M,this.strokeStyle=W,this.font=Y,this.lineCap=H,this.lineWidth=J,this.lineJoin=ot},y=function(M,W,Y){for(var H=0;H<M.length;H++)switch(M[H].type){case"bct":M[H].x2+=W,M[H].y2+=Y;case"qct":M[H].x1+=W,M[H].y1+=Y;case"mt":case"lt":case"arc":default:M[H].x+=W,M[H].y+=Y}return M},w=function(M){return M.sort(function(W,Y){return W-Y})},C=function(M,W){for(var Y,H,J=this.fillStyle,ot=this.strokeStyle,ut=this.lineCap,X=this.lineWidth,It=Math.abs(X*this.ctx.transform.scaleX),at=this.lineJoin,j=JSON.parse(JSON.stringify(this.path)),Z=JSON.parse(JSON.stringify(this.path)),ft=[],it=0;it<Z.length;it++)if(Z[it].x!==void 0)for(var V=m.call(this,Z[it]),Ft=0;Ft<V.length;Ft+=1)ft.indexOf(V[Ft])===-1&&ft.push(V[Ft]);for(var Mt=0;Mt<ft.length;Mt++)for(;this.pdf.internal.getNumberOfPages()<ft[Mt];)v.call(this);if(w(ft),this.autoPaging)for(var Et=ft[0],Bt=ft[ft.length-1],Ct=Et;Ct<Bt+1;Ct++){this.pdf.setPage(Ct),this.fillStyle=J,this.strokeStyle=ot,this.lineCap=ut,this.lineWidth=It,this.lineJoin=at;var Rt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Nt=Ct===1?this.posY+this.margin[0]:this.margin[0],Dt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Wt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],te=Ct===1?0:Dt+(Ct-2)*Wt;if(this.ctx.clip_path.length!==0){var Ae=this.path;Y=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(Y,this.posX+this.margin[3],-te+Nt+this.ctx.prevPageLastElemOffset),O.call(this,M,!0),this.path=Ae}if(H=JSON.parse(JSON.stringify(j)),this.path=y(H,this.posX+this.margin[3],-te+Nt+this.ctx.prevPageLastElemOffset),W===!1||Ct===0){var oe=(Ct>Et||Ct<Bt)&&g.call(this);oe&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Rt,Wt,null).clip().discardPath()),O.call(this,M,W),oe&&this.pdf.restoreGraphicsState()}this.lineWidth=X}else this.lineWidth=It,O.call(this,M,W),this.lineWidth=X;this.path=j},O=function(M,W){if((M!=="stroke"||W||!d.call(this))&&(M==="stroke"||W||!f.call(this))){for(var Y,H,J=[],ot=this.path,ut=0;ut<ot.length;ut++){var X=ot[ut];switch(X.type){case"begin":J.push({begin:!0});break;case"close":J.push({close:!0});break;case"mt":J.push({start:X,deltas:[],abs:[]});break;case"lt":var It=J.length;if(ot[ut-1]&&!isNaN(ot[ut-1].x)&&(Y=[X.x-ot[ut-1].x,X.y-ot[ut-1].y],It>0)){for(;It>=0;It--)if(J[It-1].close!==!0&&J[It-1].begin!==!0){J[It-1].deltas.push(Y),J[It-1].abs.push(X);break}}break;case"bct":Y=[X.x1-ot[ut-1].x,X.y1-ot[ut-1].y,X.x2-ot[ut-1].x,X.y2-ot[ut-1].y,X.x-ot[ut-1].x,X.y-ot[ut-1].y],J[J.length-1].deltas.push(Y);break;case"qct":var at=ot[ut-1].x+2/3*(X.x1-ot[ut-1].x),j=ot[ut-1].y+2/3*(X.y1-ot[ut-1].y),Z=X.x+2/3*(X.x1-X.x),ft=X.y+2/3*(X.y1-X.y),it=X.x,V=X.y;Y=[at-ot[ut-1].x,j-ot[ut-1].y,Z-ot[ut-1].x,ft-ot[ut-1].y,it-ot[ut-1].x,V-ot[ut-1].y],J[J.length-1].deltas.push(Y);break;case"arc":J.push({deltas:[],abs:[],arc:!0}),Array.isArray(J[J.length-1].abs)&&J[J.length-1].abs.push(X)}}H=W?null:M==="stroke"?"stroke":"fill";for(var Ft=!1,Mt=0;Mt<J.length;Mt++)if(J[Mt].arc)for(var Et=J[Mt].abs,Bt=0;Bt<Et.length;Bt++){var Ct=Et[Bt];Ct.type==="arc"?T.call(this,Ct.x,Ct.y,Ct.radius,Ct.startAngle,Ct.endAngle,Ct.counterclockwise,void 0,W,!Ft):P.call(this,Ct.x,Ct.y),Ft=!0}else if(J[Mt].close===!0)this.pdf.internal.out("h"),Ft=!1;else if(J[Mt].begin!==!0){var Rt=J[Mt].start.x,Nt=J[Mt].start.y;U.call(this,J[Mt].deltas,Rt,Nt),Ft=!0}H&&L.call(this,H),W&&N.call(this)}},F=function(M){var W=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,Y=W*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return M-Y;case"top":return M+W-Y;case"hanging":return M+W-2*Y;case"middle":return M+W/2-Y;case"ideographic":return M;case"alphabetic":default:return M}},I=function(M){return M+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};c.prototype.createLinearGradient=function(){var M=function(){};return M.colorStops=[],M.addColorStop=function(W,Y){this.colorStops.push([W,Y])},M.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},M.isCanvasGradient=!0,M},c.prototype.createPattern=function(){return this.createLinearGradient()},c.prototype.createRadialGradient=function(){return this.createLinearGradient()};var T=function(M,W,Y,H,J,ot,ut,X,It){for(var at=q.call(this,Y,H,J,ot),j=0;j<at.length;j++){var Z=at[j];j===0&&(It?x.call(this,Z.x1+M,Z.y1+W):P.call(this,Z.x1+M,Z.y1+W)),tt.call(this,M,W,Z.x2,Z.y2,Z.x3,Z.y3,Z.x4,Z.y4)}X?N.call(this):L.call(this,ut)},L=function(M){switch(M){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},N=function(){this.pdf.clip(),this.pdf.discardPath()},x=function(M,W){this.pdf.internal.out(t(M)+" "+n(W)+" m")},S=function(M){var W;switch(M.align){case"right":case"end":W="right";break;case"center":W="center";break;case"left":case"start":default:W="left"}var Y=this.pdf.getTextDimensions(M.text),H=F.call(this,M.y),J=I.call(this,H)-Y.h,ot=this.ctx.transform.applyToPoint(new o(M.x,H)),ut=this.ctx.transform.decompose(),X=new A;X=(X=(X=X.multiply(ut.translate)).multiply(ut.skew)).multiply(ut.scale);for(var It,at,j,Z=this.ctx.transform.applyToRectangle(new s(M.x,H,Y.w,Y.h)),ft=X.applyToRectangle(new s(M.x,J,Y.w,Y.h)),it=m.call(this,ft),V=[],Ft=0;Ft<it.length;Ft+=1)V.indexOf(it[Ft])===-1&&V.push(it[Ft]);if(w(V),this.autoPaging)for(var Mt=V[0],Et=V[V.length-1],Bt=Mt;Bt<Et+1;Bt++){this.pdf.setPage(Bt);var Ct=Bt===1?this.posY+this.margin[0]:this.margin[0],Rt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Nt=this.pdf.internal.pageSize.height-this.margin[2],Dt=Nt-this.margin[0],Wt=this.pdf.internal.pageSize.width-this.margin[1],te=Wt-this.margin[3],Ae=Bt===1?0:Rt+(Bt-2)*Dt;if(this.ctx.clip_path.length!==0){var oe=this.path;It=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(It,this.posX+this.margin[3],-1*Ae+Ct),O.call(this,"fill",!0),this.path=oe}var Jt=y([JSON.parse(JSON.stringify(ft))],this.posX+this.margin[3],-Ae+Ct+this.ctx.prevPageLastElemOffset)[0];M.scale>=.01&&(at=this.pdf.internal.getFontSize(),this.pdf.setFontSize(at*M.scale),j=this.lineWidth,this.lineWidth=j*M.scale);var fe=this.autoPaging!=="text";if(fe||Jt.y+Jt.h<=Nt){if(fe||Jt.y>=Ct&&Jt.x<=Wt){var qt=fe?M.text:this.pdf.splitTextToSize(M.text,M.maxWidth||Wt-Jt.x)[0],nr=y([JSON.parse(JSON.stringify(Z))],this.posX+this.margin[3],-Ae+Ct+this.ctx.prevPageLastElemOffset)[0],ke=fe&&(Bt>Mt||Bt<Et)&&g.call(this);ke&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],te,Dt,null).clip().discardPath()),this.pdf.text(qt,nr.x,nr.y,{angle:M.angle,align:W,renderingMode:M.renderingMode}),ke&&this.pdf.restoreGraphicsState()}}else Jt.y<Nt&&(this.ctx.prevPageLastElemOffset+=Nt-Jt.y);M.scale>=.01&&(this.pdf.setFontSize(at),this.lineWidth=j)}else M.scale>=.01&&(at=this.pdf.internal.getFontSize(),this.pdf.setFontSize(at*M.scale),j=this.lineWidth,this.lineWidth=j*M.scale),this.pdf.text(M.text,ot.x+this.posX,ot.y+this.posY,{angle:M.angle,align:W,renderingMode:M.renderingMode,maxWidth:M.maxWidth}),M.scale>=.01&&(this.pdf.setFontSize(at),this.lineWidth=j)},P=function(M,W,Y,H){Y=Y||0,H=H||0,this.pdf.internal.out(t(M+Y)+" "+n(W+H)+" l")},U=function(M,W,Y){return this.pdf.lines(M,W,Y,null,null)},tt=function(M,W,Y,H,J,ot,ut,X){this.pdf.internal.out([e(i(Y+M)),e(a(H+W)),e(i(J+M)),e(a(ot+W)),e(i(ut+M)),e(a(X+W)),"c"].join(" "))},q=function(M,W,Y,H){for(var J=2*Math.PI,ot=Math.PI/2;W>Y;)W-=J;var ut=Math.abs(Y-W);ut<J&&H&&(ut=J-ut);for(var X=[],It=H?-1:1,at=W;ut>1e-5;){var j=at+It*Math.min(ut,ot);X.push(rt.call(this,M,at,j)),ut-=Math.abs(j-at),at=j}return X},rt=function(M,W,Y){var H=(Y-W)/2,J=M*Math.cos(H),ot=M*Math.sin(H),ut=J,X=-ot,It=ut*ut+X*X,at=It+ut*J+X*ot,j=4/3*(Math.sqrt(2*It*at)-at)/(ut*ot-X*J),Z=ut-j*X,ft=X+j*ut,it=Z,V=-ft,Ft=H+W,Mt=Math.cos(Ft),Et=Math.sin(Ft);return{x1:M*Math.cos(W),y1:M*Math.sin(W),x2:Z*Mt-ft*Et,y2:Z*Et+ft*Mt,x3:it*Mt-V*Et,y3:it*Et+V*Mt,x4:M*Math.cos(Y),y4:M*Math.sin(Y)}},nt=function(M){return 180*M/Math.PI},At=function(M,W,Y,H,J,ot){var ut=M+.5*(Y-M),X=W+.5*(H-W),It=J+.5*(Y-J),at=ot+.5*(H-ot),j=Math.min(M,J,ut,It),Z=Math.max(M,J,ut,It),ft=Math.min(W,ot,X,at),it=Math.max(W,ot,X,at);return new s(j,ft,Z-j,it-ft)},ct=function(M,W,Y,H,J,ot,ut,X){var It,at,j,Z,ft,it,V,Ft,Mt,Et,Bt,Ct,Rt,Nt,Dt=Y-M,Wt=H-W,te=J-Y,Ae=ot-H,oe=ut-J,Jt=X-ot;for(at=0;at<41;at++)Mt=(V=(j=M+(It=at/40)*Dt)+It*((ft=Y+It*te)-j))+It*(ft+It*(J+It*oe-ft)-V),Et=(Ft=(Z=W+It*Wt)+It*((it=H+It*Ae)-Z))+It*(it+It*(ot+It*Jt-it)-Ft),at==0?(Bt=Mt,Ct=Et,Rt=Mt,Nt=Et):(Bt=Math.min(Bt,Mt),Ct=Math.min(Ct,Et),Rt=Math.max(Rt,Mt),Nt=Math.max(Nt,Et));return new s(Math.round(Bt),Math.round(Ct),Math.round(Rt-Bt),Math.round(Nt-Ct))},Tt=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var M,W,Y=(M=this.ctx.lineDash,W=this.ctx.lineDashOffset,JSON.stringify({lineDash:M,lineDashOffset:W}));this.prevLineDash!==Y&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=Y)}}})(Ke.API),function(r){var e=function(a){var o,s,A,l,u,c,h,f,d,g;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-(g=u%85))/85)-(d=u%85))/85)-(f=u%85))/85)-(h=u%85))/85)%85,s.push(c+33,h+33,f+33,d+33,g+33)):s.push(122);return function(m,v){for(var y=v;y>0;y--)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,d="charCodeAt",g="slice",m="replace";for(a[g](-2),a=a[g](0,-2)[m](/\s/g,"")[m]("z","!!!!!"),A=[],l=0,u=(a+=o="uuuuu"[g](a[h]%5||5))[h];u>l;l+=5)s=52200625*(a[d](l)-33)+614125*(a[d](l+1)-33)+7225*(a[d](l+2)-33)+85*(a[d](l+3)-33)+(a[d](l+4)-33),A.push(f&s>>24,f&s>>16,f&s>>8,f&s);return function(v,y){for(var w=y;w>0;w--)v.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=dI(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(" ")}}}(Ke.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(d){var g=d.length,m=[],v=String.fromCharCode;for(h=0;h<g;h+=1)m.push(v(255&d.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}(Ke.API),function(r){function e(){return(Ye.html2canvas?Promise.resolve(Ye.html2canvas):Promise.resolve().then(function(){return eCt})).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(Ye.DOMPurify?Promise.resolve(Ye.DOMPurify):Promise.resolve().then(function(){return BCt})).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=mn(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],d=f.src.find(function(g){return g.format==="truetype"});d&&A.addFont(d.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||Ke.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,Ke.getPageSize=function(o,s,A){if(mn(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,d=0,g=0;if(h.hasOwnProperty(c))d=h[c][1]/u,g=h[c][0]/u;else try{d=A[1],g=A[0]}catch{throw new Error("Invalid format: "+A)}if(o==="p"||o==="portrait")o="p",g>d&&(f=g,g=d,d=f);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",d>g&&(f=g,g=d,d=f)}return{width:g,height:d,unit:s,k:u,orientation:o}},r.html=function(o,s){(s=s||{}).callback=s.callback||function(){},s.html2canvas=s.html2canvas||{},s.html2canvas.canvas=s.html2canvas.canvas||this.canvas,s.jsPDF=s.jsPDF||this,s.fontFaces=s.fontFaces?s.fontFaces.map(_I):null;var A=new a(s);return s.worker?A:A.from(o).doCallback()}}(Ke.API),Ke.API.addJS=function(r){return k5=r,this.internal.events.subscribe("postPutResources",function(){i1=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(i1+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Q5=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+k5+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){i1!==void 0&&Q5!==void 0&&this.internal.out("/Names <</JavaScript "+i1+" 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}}])}(Ke.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),d=c.length,g={width:0,height:0,numcomponents:1},m=4;m<d;m+=2){if(m+=f,e.indexOf(c.charCodeAt(m+1))!==-1){h=256*c.charCodeAt(m+5)+c.charCodeAt(m+6),g={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 g}(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}}(Ke.API);var yp,a1,H5,G5,$5,Mut=function(){var r,e,t;function n(a){var o,s,A,l,u,c,h,f,d,g,m,v,y,w;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},c=null;;){switch(o=this.readUInt32(),d=function(){var C,O;for(O=[],C=0;C<4;++C)O.push(String.fromCharCode(this.data[this.pos++]));return O}.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(d==="fdAT"&&(this.pos+=4,o-=4),a=(c!=null?c.data:void 0)||this.imgData,v=0;0<=o?v<o:v>o;0<=o?++v:--v)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((g=A-this.transparency.indexed.length)>0)for(y=0;0<=g?y<g:y>g;0<=g?++y:--y)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=(w=this.colorType)===4||w===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,d){var g,m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct=Math.ceil((l.width-c)/f),Tt=Math.ceil((l.height-h)/d),M=l.width==ct&&l.height==Tt;for(S=o*ct,N=M?s:new Uint8Array(S*Tt),C=a.length,x=0,m=0;x<Tt&&A<C;){switch(a[A++]){case 0:for(y=tt=0;tt<S;y=tt+=1)N[m++]=a[A++];break;case 1:for(y=q=0;q<S;y=q+=1)g=a[A++],w=y<o?0:N[m-o],N[m++]=(g+w)%256;break;case 2:for(y=rt=0;rt<S;y=rt+=1)g=a[A++],v=(y-y%o)/o,P=x&&N[(x-1)*S+v*o+y%o],N[m++]=(P+g)%256;break;case 3:for(y=nt=0;nt<S;y=nt+=1)g=a[A++],v=(y-y%o)/o,w=y<o?0:N[m-o],P=x&&N[(x-1)*S+v*o+y%o],N[m++]=(g+Math.floor((w+P)/2))%256;break;case 4:for(y=At=0;At<S;y=At+=1)g=a[A++],v=(y-y%o)/o,w=y<o?0:N[m-o],x===0?P=U=0:(P=N[(x-1)*S+v*o+y%o],U=v&&N[(x-1)*S+(v-1)*o+y%o]),O=w+P-U,F=Math.abs(O-w),T=Math.abs(O-P),L=Math.abs(O-U),I=F<=T&&F<=L?w:T<=L?P:U,N[m++]=(g+I)%256;break;default:throw new Error("Invalid filter algorithm: "+a[A-1])}if(!M){var W=((h+x*d)*l.width+c)*o,Y=x*S;for(y=0;y<ct;y+=1){for(var H=0;H<o;H+=1)s[W++]=N[Y++];W+=(f-1)*o}}x++}}return a=dut(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,d,g,m,v;if(A=this.colors,g=null,s=this.hasAlphaChannel,this.palette.length&&(g=(v=this._decodedPalette)!=null?v:this._decodedPalette=this.decodePalette(),A=4,s=!0),d=(l=a.data||a).length,c=g||o,u=h=0,A===1)for(;u<d;)f=g?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<d;)f=g?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(Ye)==="[object Window]"){try{e=Ye.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,d;if(f=s++%l,d=A[f],h.renderFrame(a,f),l>1&&s/l<u)return h.animation._timeout=setTimeout(o,d.delay)})()},n.prototype.stopAnimation=function(){var a;return clearTimeout((a=this.animation)!=null?a._timeout:void 0)},n.prototype.render=function(a){var o,s;return a._png&&a._png.stopAnimation(),a._png=this,a.width=this.width,a.height=this.height,o=a.getContext("2d"),this.animation?(this.decodeFrames(o),this.animate(o)):(s=o.createImageData(this.width,this.height),this.copyToImageData(s,this.decodePixels()),o.putImageData(s,0,0))},n}();/**
* @license
*
* Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* ====================================================================
*//**
* @license
* (c) Dean McNamee <dean@gmail.com>, 2013.
*
* https://github.com/deanm/omggif
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
* sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*
* omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
* including animation and compression. It does not rely on any specific
* underlying system, so should run in the browser, Node, or Plask.
*/function Nut(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,d=null;for(this.width=t,this.height=n;l&&e<r.length;)switch(r[e++]){case 33:switch(r[e++]){case 255:if(r[e]!==11||r[e+1]==78&&r[e+2]==69&&r[e+3]==84&&r[e+4]==83&&r[e+5]==67&&r[e+6]==65&&r[e+7]==80&&r[e+8]==69&&r[e+9]==50&&r[e+10]==46&&r[e+11]==48&&r[e+12]==3&&r[e+13]==1&&r[e+16]==0)e+=14,d=r[e++]|r[e++]<<8,e++;else for(e+=12;;){if(!((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 g=r[e++];c=r[e++]|r[e++]<<8,h=r[e++],!(1&g)&&(h=null),f=g>>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,v=r[e++]|r[e++]<<8,y=r[e++]|r[e++]<<8,w=r[e++]|r[e++]<<8,C=r[e++],O=C>>6&1,F=1<<(7&C)+1,I=s,T=A,L=!1;C>>7&&(L=!0,I=e,T=F,e+=3*F);var N=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:v,width:y,height:w,has_local_palette:L,palette_offset:I,palette_size:T,data_offset:N,data_length:e-N,transparent_index:h,interlaced:!!O,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 d},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,P){var U=this.frameInfo(S),tt=U.width*U.height,q=new Uint8Array(tt);V5(r,U.data_offset,q,tt);var rt=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var At=U.width,ct=t-At,Tt=At,M=4*(U.y*t+U.x),W=4*((U.y+U.height)*t+U.x),Y=M,H=4*ct;U.interlaced===!0&&(H+=4*t*7);for(var J=8,ot=0,ut=q.length;ot<ut;++ot){var X=q[ot];if(Tt===0&&(Tt=At,(Y+=H)>=W&&(H=4*ct+4*t*(J-1),Y=M+(At+ct)*(J<<1),J>>=1)),X===nt)Y+=4;else{var It=r[rt+3*X],at=r[rt+3*X+1],j=r[rt+3*X+2];P[Y++]=j,P[Y++]=at,P[Y++]=It,P[Y++]=255}--Tt}},this.decodeAndBlitFrameRGBA=function(S,P){var U=this.frameInfo(S),tt=U.width*U.height,q=new Uint8Array(tt);V5(r,U.data_offset,q,tt);var rt=U.palette_offset,nt=U.transparent_index;nt===null&&(nt=256);var At=U.width,ct=t-At,Tt=At,M=4*(U.y*t+U.x),W=4*((U.y+U.height)*t+U.x),Y=M,H=4*ct;U.interlaced===!0&&(H+=4*t*7);for(var J=8,ot=0,ut=q.length;ot<ut;++ot){var X=q[ot];if(Tt===0&&(Tt=At,(Y+=H)>=W&&(H=4*ct+4*t*(J-1),Y=M+(At+ct)*(J<<1),J>>=1)),X===nt)Y+=4;else{var It=r[rt+3*X],at=r[rt+3*X+1],j=r[rt+3*X+2];P[Y++]=It,P[Y++]=at,P[Y++]=j,P[Y++]=255}--Tt}}}function V5(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++],d=new Int32Array(4096),g=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 v=m<s?m:g,y=0,w=v;w>a;)w=d[w]>>8,++y;var C=w;if(h+y+(v!==m?1:0)>n)return void Bn.log("Warning, gif stream longer than expected.");t[h++]=C;var O=h+=y;for(v!==m&&(t[h++]=C),w=v;y--;)w=d[w],t[--O]=255&w,w>>=8;g!==null&&s<4096&&(d[s++]=g<<8|C,s>=l+1&&A<12&&(++A,l=l<<1|1)),g=m}else s=o+1,l=(1<<(A=i+1))-1,g=null}return h!==n&&Bn.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 hT(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),d=new Array(64),g=[],m=0,v=7,y=new Array(64),w=new Array(64),C=new Array(64),O=new Array(256),F=new Array(2048),I=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],T=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],L=[0,1,2,3,4,5,6,7,8,9,10,11],N=[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],P=[0,1,2,3,4,5,6,7,8,9,10,11],U=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],tt=[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 q(M,W){for(var Y=0,H=0,J=new Array,ot=1;ot<=16;ot++){for(var ut=1;ut<=M[ot];ut++)J[W[H]]=[],J[W[H]][0]=Y,J[W[H]][1]=ot,H++,Y++;Y*=2}return J}function rt(M){for(var W=M[0],Y=M[1]-1;Y>=0;)W&1<<Y&&(m|=1<<v),Y--,--v<0&&(m==255?(nt(255),nt(0)):nt(m),v=7,m=0)}function nt(M){g.push(M)}function At(M){nt(M>>8&255),nt(255&M)}function ct(M,W,Y,H,J){for(var ot,ut=J[0],X=J[240],It=function(Et,Bt){var Ct,Rt,Nt,Dt,Wt,te,Ae,oe,Jt,fe,qt=0;for(Jt=0;Jt<8;++Jt){Ct=Et[qt],Rt=Et[qt+1],Nt=Et[qt+2],Dt=Et[qt+3],Wt=Et[qt+4],te=Et[qt+5],Ae=Et[qt+6];var nr=Ct+(oe=Et[qt+7]),ke=Ct-oe,wr=Rt+Ae,Ne=Rt-Ae,Pe=Nt+te,Hr=Nt-te,se=Dt+Wt,hi=Dt-Wt,gr=nr+se,ei=nr-se,Wr=wr+Pe,zr=wr-Pe;Et[qt]=gr+Wr,Et[qt+4]=gr-Wr;var He=.707106781*(zr+ei);Et[qt+2]=ei+He,Et[qt+6]=ei-He;var Ir=.382683433*((gr=hi+Hr)-(zr=Ne+ke)),Gn=.5411961*gr+Ir,yn=1.306562965*zr+Ir,fi=.707106781*(Wr=Hr+Ne),di=ke+fi,Ue=ke-fi;Et[qt+5]=Ue+Gn,Et[qt+3]=Ue-Gn,Et[qt+1]=di+yn,Et[qt+7]=di-yn,qt+=8}for(qt=0,Jt=0;Jt<8;++Jt){Ct=Et[qt],Rt=Et[qt+8],Nt=Et[qt+16],Dt=Et[qt+24],Wt=Et[qt+32],te=Et[qt+40],Ae=Et[qt+48];var ri=Ct+(oe=Et[qt+56]),Cn=Ct-oe,pi=Rt+Ae,cn=Rt-Ae,Br=Nt+te,_n=Nt-te,eo=Dt+Wt,de=Dt-Wt,_t=ri+eo,$t=ri-eo,ne=pi+Br,Ze=pi-Br;Et[qt]=_t+ne,Et[qt+32]=_t-ne;var Lr=.707106781*(Ze+$t);Et[qt+16]=$t+Lr,Et[qt+48]=$t-Lr;var hn=.382683433*((_t=de+_n)-(Ze=cn+Cn)),fn=.5411961*_t+hn,zo=1.306562965*Ze+hn,gi=.707106781*(ne=_n+cn),Ks=Cn+gi,IA=Cn-gi;Et[qt+40]=IA+fn,Et[qt+24]=IA-fn,Et[qt+8]=Ks+zo,Et[qt+56]=Ks-zo,qt++}for(Jt=0;Jt<64;++Jt)fe=Et[Jt]*Bt[Jt],f[Jt]=fe>0?fe+.5|0:fe-.5|0;return f}(M,W),at=0;at<64;++at)d[I[at]]=It[at];var j=d[0]-Y;Y=d[0],j==0?rt(H[0]):(rt(H[h[ot=32767+j]]),rt(c[ot]));for(var Z=63;Z>0&&d[Z]==0;)Z--;if(Z==0)return rt(ut),Y;for(var ft,it=1;it<=Z;){for(var V=it;d[it]==0&&it<=Z;)++it;var Ft=it-V;if(Ft>=16){ft=Ft>>4;for(var Mt=1;Mt<=ft;++Mt)rt(X);Ft&=15}ot=32767+d[it],rt(J[(Ft<<4)+h[ot]]),rt(c[ot]),it++}return Z!=63&&rt(ut),Y}function Tt(M){M=Math.min(Math.max(M,1),100),a!=M&&(function(W){for(var Y=[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],H=0;H<64;H++){var J=o((Y[H]*W+50)/100);J=Math.min(Math.max(J,1),255),s[I[H]]=J}for(var ot=[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],ut=0;ut<64;ut++){var X=o((ot[ut]*W+50)/100);X=Math.min(Math.max(X,1),255),A[I[ut]]=X}for(var It=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],at=0,j=0;j<8;j++)for(var Z=0;Z<8;Z++)l[at]=1/(s[I[at]]*It[j]*It[Z]*8),u[at]=1/(A[I[at]]*It[j]*It[Z]*8),at++}(M<50?Math.floor(5e3/M):Math.floor(200-2*M)),a=M)}this.encode=function(M,W){W&&Tt(W),g=new Array,m=0,v=7,At(65496),At(65504),At(16),nt(74),nt(70),nt(73),nt(70),nt(0),nt(1),nt(1),nt(0),At(1),At(1),nt(0),nt(0),function(){At(65499),At(132),nt(0);for(var Rt=0;Rt<64;Rt++)nt(s[Rt]);nt(1);for(var Nt=0;Nt<64;Nt++)nt(A[Nt])}(),function(Rt,Nt){At(65472),At(17),nt(8),At(Nt),At(Rt),nt(3),nt(1),nt(17),nt(0),nt(2),nt(17),nt(1),nt(3),nt(17),nt(1)}(M.width,M.height),function(){At(65476),At(418),nt(0);for(var Rt=0;Rt<16;Rt++)nt(T[Rt+1]);for(var Nt=0;Nt<=11;Nt++)nt(L[Nt]);nt(16);for(var Dt=0;Dt<16;Dt++)nt(N[Dt+1]);for(var Wt=0;Wt<=161;Wt++)nt(x[Wt]);nt(1);for(var te=0;te<16;te++)nt(S[te+1]);for(var Ae=0;Ae<=11;Ae++)nt(P[Ae]);nt(17);for(var oe=0;oe<16;oe++)nt(U[oe+1]);for(var Jt=0;Jt<=161;Jt++)nt(tt[Jt])}(),At(65498),At(12),nt(3),nt(1),nt(0),nt(2),nt(17),nt(3),nt(17),nt(0),nt(63),nt(0);var Y=0,H=0,J=0;m=0,v=7,this.encode.displayName="_encode_";for(var ot,ut,X,It,at,j,Z,ft,it,V=M.data,Ft=M.width,Mt=M.height,Et=4*Ft,Bt=0;Bt<Mt;){for(ot=0;ot<Et;){for(at=Et*Bt+ot,Z=-1,ft=0,it=0;it<64;it++)j=at+(ft=it>>3)*Et+(Z=4*(7&it)),Bt+ft>=Mt&&(j-=Et*(Bt+1+ft-Mt)),ot+Z>=Et&&(j-=ot+Z-Et+4),ut=V[j++],X=V[j++],It=V[j++],y[it]=(F[ut]+F[X+256>>0]+F[It+512>>0]>>16)-128,w[it]=(F[ut+768>>0]+F[X+1024>>0]+F[It+1280>>0]>>16)-128,C[it]=(F[ut+1280>>0]+F[X+1536>>0]+F[It+1792>>0]>>16)-128;Y=ct(y,l,Y,e,n),H=ct(w,u,H,t,i),J=ct(C,u,J,t,i),ot+=32}Bt+=8}if(v>=0){var Ct=[];Ct[1]=v+1,Ct[0]=(1<<v+1)-1,rt(Ct)}return At(65497),new Uint8Array(g)},r=r||50,function(){for(var M=String.fromCharCode,W=0;W<256;W++)O[W]=M(W)}(),e=q(T,L),t=q(S,P),n=q(N,x),i=q(U,tt),function(){for(var M=1,W=2,Y=1;Y<=15;Y++){for(var H=M;H<W;H++)h[32767+H]=Y,c[32767+H]=[],c[32767+H][1]=Y,c[32767+H][0]=H;for(var J=-(W-1);J<=-M;J++)h[32767+J]=Y,c[32767+J]=[],c[32767+J][1]=Y,c[32767+J][0]=W-1+J;M<<=1,W<<=1}}(),function(){for(var M=0;M<256;M++)F[M]=19595*M,F[M+256>>0]=38470*M,F[M+512>>0]=7471*M+32768,F[M+768>>0]=-11059*M,F[M+1024>>0]=-21709*M,F[M+1280>>0]=32768*M+8421375,F[M+1536>>0]=-27439*M,F[M+1792>>0]=-5329*M}(),Tt(r)}/**
* @license
* Copyright (c) 2017 Aras Abbasi
*
* Licensed under the MIT License.
* http://opensource.org/licenses/mit-license
*/function aA(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 j5(r){function e(T){if(!T)throw Error("assert :P")}function t(T,L,N){for(var x=0;4>x;x++)if(T[L+x]!=N.charCodeAt(x))return!0;return!1}function n(T,L,N,x,S){for(var P=0;P<S;P++)T[L+P]=N[x+P]}function i(T,L,N,x){for(var S=0;S<x;S++)T[L+S]=N}function a(T){return new Int32Array(T)}function o(T,L){for(var N=[],x=0;x<T;x++)N.push(new L);return N}function s(T,L){var N=[];return function x(S,P,U){for(var tt=U[P],q=0;q<tt&&(S.push(U.length>P+1?[]:new L),!(U.length<P+1));q++)x(S[q],P+1,U)}(N,0,T),N}var A=function(){var T=this;function L(p,_){for(var b=1<<_-1>>>0;p&b;)b>>>=1;return b?(p&b-1)+b:p}function N(p,_,b,R,Q){e(!(R%b));do p[_+(R-=b)]=Q;while(0<R)}function x(p,_,b,R,Q){if(e(2328>=Q),512>=Q)var G=a(512);else if((G=a(Q))==null)return 0;return function($,K,z,et,mt,Lt){var Ot,St,Vt=K,Pt=1<<z,wt=a(16),bt=a(16);for(e(mt!=0),e(et!=null),e($!=null),e(0<z),St=0;St<mt;++St){if(15<et[St])return 0;++wt[et[St]]}if(wt[0]==mt)return 0;for(bt[1]=0,Ot=1;15>Ot;++Ot){if(wt[Ot]>1<<Ot)return 0;bt[Ot+1]=bt[Ot]+wt[Ot]}for(St=0;St<mt;++St)Ot=et[St],0<et[St]&&(Lt[bt[Ot]++]=St);if(bt[15]==1)return(et=new S).g=0,et.value=Lt[0],N($,Vt,1,Pt,et),Pt;var Ht,jt=-1,Gt=Pt-1,pe=0,ie=1,Ge=1,le=1<<z;for(St=0,Ot=1,mt=2;Ot<=z;++Ot,mt<<=1){if(ie+=Ge<<=1,0>(Ge-=wt[Ot]))return 0;for(;0<wt[Ot];--wt[Ot])(et=new S).g=Ot,et.value=Lt[St++],N($,Vt+pe,mt,le,et),pe=L(pe,Ot)}for(Ot=z+1,mt=2;15>=Ot;++Ot,mt<<=1){if(ie+=Ge<<=1,0>(Ge-=wt[Ot]))return 0;for(;0<wt[Ot];--wt[Ot]){if(et=new S,(pe&Gt)!=jt){for(Vt+=le,Ht=1<<(jt=Ot)-z;15>jt&&!(0>=(Ht-=wt[jt]));)++jt,Ht<<=1;Pt+=le=1<<(Ht=jt-z),$[K+(jt=pe&Gt)].g=Ht+z,$[K+jt].value=Vt-K-jt}et.g=Ot-z,et.value=Lt[St++],N($,Vt+(pe>>z),mt,le,et),pe=L(pe,Ot)}}return ie!=2*bt[15]-1?0:Pt}(p,_,b,R,Q,G)}function S(){this.value=this.g=0}function P(){this.value=this.g=0}function U(){this.G=o(5,S),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(fa,P)}function tt(p,_,b,R){e(p!=null),e(_!=null),e(2147483648>R),p.Ca=254,p.I=0,p.b=-8,p.Ka=0,p.oa=_,p.pa=b,p.Jd=_,p.Yc=b+R,p.Zc=4<=R?b+R-4+1:b,ot(p)}function q(p,_){for(var b=0;0<_--;)b|=X(p,128)<<_;return b}function rt(p,_){var b=q(p,_);return ut(p)?-b:b}function nt(p,_,b,R){var Q,G=0;for(e(p!=null),e(_!=null),e(4294967288>R),p.Sb=R,p.Ra=0,p.u=0,p.h=0,4<R&&(R=4),Q=0;Q<R;++Q)G+=_[b+Q]<<8*Q;p.Ra=G,p.bb=R,p.oa=_,p.pa=b}function At(p){for(;8<=p.u&&p.bb<p.Sb;)p.Ra>>>=8,p.Ra+=p.oa[p.pa+p.bb]<<Ju-8>>>0,++p.bb,p.u-=8;Y(p)&&(p.h=1,p.u=0)}function ct(p,_){if(e(0<=_),!p.h&&_<=Zu){var b=W(p)&Pl[_];return p.u+=_,At(p),b}return p.h=1,p.u=0}function Tt(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function M(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function W(p){return p.Ra>>>(p.u&Ju-1)>>>0}function Y(p){return e(p.bb<=p.Sb),p.h||p.bb==p.Sb&&p.u>Ju}function H(p,_){p.u=_,p.h=Y(p)}function J(p){p.u>=Kh&&(e(p.u>=Kh),At(p))}function ot(p){e(p!=null&&p.oa!=null),p.pa<p.Zc?(p.I=(p.oa[p.pa++]|p.I<<8)>>>0,p.b+=8):(e(p!=null&&p.oa!=null),p.pa<p.Yc?(p.b+=8,p.I=p.oa[p.pa++]|p.I<<8):p.Ka?p.b=0:(p.I<<=8,p.b+=8,p.Ka=1))}function ut(p){return q(p,1)}function X(p,_){var b=p.Ca;0>p.b&&ot(p);var R=p.b,Q=b*_>>>8,G=(p.I>>>R>Q)+0;for(G?(b-=Q,p.I-=Q+1<<R>>>0):b=Q+1,R=b,Q=0;256<=R;)Q+=8,R>>=8;return R=7^Q+Ia[R],p.b-=R,p.Ca=(b<<R)-1,G}function It(p,_,b){p[_+0]=b>>24&255,p[_+1]=b>>16&255,p[_+2]=b>>8&255,p[_+3]=b>>0&255}function at(p,_){return p[_+0]<<0|p[_+1]<<8}function j(p,_){return at(p,_)|p[_+2]<<16}function Z(p,_){return at(p,_)|at(p,_+2)<<16}function ft(p,_){var b=1<<_;return e(p!=null),e(0<_),p.X=a(b),p.X==null?0:(p.Mb=32-_,p.Xa=_,1)}function it(p,_){e(p!=null),e(_!=null),e(p.Xa==_.Xa),n(_.X,0,p.X,0,1<<_.Xa)}function V(){this.X=[],this.Xa=this.Mb=0}function Ft(p,_,b,R){e(b!=null),e(R!=null);var Q=b[0],G=R[0];return Q==0&&(Q=(p*G+_/2)/_),G==0&&(G=(_*Q+p/2)/p),0>=Q||0>=G?0:(b[0]=Q,R[0]=G,1)}function Mt(p,_){return p+(1<<_)-1>>>_}function Et(p,_){return((4278255360&p)+(4278255360&_)>>>0&4278255360)+((16711935&p)+(16711935&_)>>>0&16711935)>>>0}function Bt(p,_){T[_]=function(b,R,Q,G,$,K,z){var et;for(et=0;et<$;++et){var mt=T[p](K[z+et-1],Q,G+et);K[z+et]=Et(b[R+et],mt)}}}function Ct(){this.ud=this.hd=this.jd=0}function Rt(p,_){return((4278124286&(p^_))>>>1)+(p&_)>>>0}function Nt(p){return 0<=p&&256>p?p:0>p?0:255<p?255:void 0}function Dt(p,_){return Nt(p+(p-_+.5>>1))}function Wt(p,_,b){return Math.abs(_-b)-Math.abs(p-b)}function te(p,_,b,R,Q,G,$){for(R=G[$-1],b=0;b<Q;++b)G[$+b]=R=Et(p[_+b],R)}function Ae(p,_,b,R,Q){var G;for(G=0;G<b;++G){var $=p[_+G],K=$>>8&255,z=16711935&(z=(z=16711935&$)+((K<<16)+K));R[Q+G]=(4278255360&$)+z>>>0}}function oe(p,_){_.jd=p>>0&255,_.hd=p>>8&255,_.ud=p>>16&255}function Jt(p,_,b,R,Q,G){var $;for($=0;$<R;++$){var K=_[b+$],z=K>>>8,et=K,mt=255&(mt=(mt=K>>>16)+((p.jd<<24>>24)*(z<<24>>24)>>>5));et=255&(et=(et=et+((p.hd<<24>>24)*(z<<24>>24)>>>5))+((p.ud<<24>>24)*(mt<<24>>24)>>>5)),Q[G+$]=(4278255360&K)+(mt<<16)+et}}function fe(p,_,b,R,Q){T[_]=function(G,$,K,z,et,mt,Lt,Ot,St){for(z=Lt;z<Ot;++z)for(Lt=0;Lt<St;++Lt)et[mt++]=Q(K[R(G[$++])])},T[p]=function(G,$,K,z,et,mt,Lt){var Ot=8>>G.b,St=G.Ea,Vt=G.K[0],Pt=G.w;if(8>Ot)for(G=(1<<G.b)-1,Pt=(1<<Ot)-1;$<K;++$){var wt,bt=0;for(wt=0;wt<St;++wt)wt&G||(bt=R(z[et++])),mt[Lt++]=Q(Vt[bt&Pt]),bt>>=Ot}else T["VP8LMapColor"+b](z,et,Vt,Pt,mt,Lt,$,K,St)}}function qt(p,_,b,R,Q){for(b=_+b;_<b;){var G=p[_++];R[Q++]=G>>16&255,R[Q++]=G>>8&255,R[Q++]=G>>0&255}}function nr(p,_,b,R,Q){for(b=_+b;_<b;){var G=p[_++];R[Q++]=G>>16&255,R[Q++]=G>>8&255,R[Q++]=G>>0&255,R[Q++]=G>>24&255}}function ke(p,_,b,R,Q){for(b=_+b;_<b;){var G=($=p[_++])>>16&240|$>>12&15,$=$>>0&240|$>>28&15;R[Q++]=G,R[Q++]=$}}function wr(p,_,b,R,Q){for(b=_+b;_<b;){var G=($=p[_++])>>16&248|$>>13&7,$=$>>5&224|$>>3&31;R[Q++]=G,R[Q++]=$}}function Ne(p,_,b,R,Q){for(b=_+b;_<b;){var G=p[_++];R[Q++]=G>>0&255,R[Q++]=G>>8&255,R[Q++]=G>>16&255}}function Pe(p,_,b,R,Q,G){if(G==0)for(b=_+b;_<b;)It(R,((G=p[_++])[0]>>24|G[1]>>8&65280|G[2]<<8&16711680|G[3]<<24)>>>0),Q+=32;else n(R,Q,p,_,b)}function Hr(p,_){T[_][0]=T[p+"0"],T[_][1]=T[p+"1"],T[_][2]=T[p+"2"],T[_][3]=T[p+"3"],T[_][4]=T[p+"4"],T[_][5]=T[p+"5"],T[_][6]=T[p+"6"],T[_][7]=T[p+"7"],T[_][8]=T[p+"8"],T[_][9]=T[p+"9"],T[_][10]=T[p+"10"],T[_][11]=T[p+"11"],T[_][12]=T[p+"12"],T[_][13]=T[p+"13"],T[_][14]=T[p+"0"],T[_][15]=T[p+"0"]}function se(p){return p==ic||p==Gv||p==Zh||p==up}function hi(){this.eb=[],this.size=this.A=this.fb=0}function gr(){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 ei(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new hi,this.f.kb=new gr,this.sd=null}function Wr(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function zr(){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 He(p){return alert("todo:WebPSamplerProcessPlane"),p.T}function Ir(p,_){var b=p.T,R=_.ba.f.RGBA,Q=R.eb,G=R.fb+p.ka*R.A,$=So[_.ba.S],K=p.y,z=p.O,et=p.f,mt=p.N,Lt=p.ea,Ot=p.W,St=_.cc,Vt=_.dc,Pt=_.Mc,wt=_.Nc,bt=p.ka,Ht=p.ka+p.T,jt=p.U,Gt=jt+1>>1;for(bt==0?$(K,z,null,null,et,mt,Lt,Ot,et,mt,Lt,Ot,Q,G,null,null,jt):($(_.ec,_.fc,K,z,St,Vt,Pt,wt,et,mt,Lt,Ot,Q,G-R.A,Q,G,jt),++b);bt+2<Ht;bt+=2)St=et,Vt=mt,Pt=Lt,wt=Ot,mt+=p.Rc,Ot+=p.Rc,G+=2*R.A,$(K,(z+=2*p.fa)-p.fa,K,z,St,Vt,Pt,wt,et,mt,Lt,Ot,Q,G-R.A,Q,G,jt);return z+=p.fa,p.j+Ht<p.o?(n(_.ec,_.fc,K,z,jt),n(_.cc,_.dc,et,mt,Gt),n(_.Mc,_.Nc,Lt,Ot,Gt),b--):1&Ht||$(K,z,null,null,et,mt,Lt,Ot,et,mt,Lt,Ot,Q,G+R.A,null,null,jt),b}function Gn(p,_,b){var R=p.F,Q=[p.J];if(R!=null){var G=p.U,$=_.ba.S,K=$==lp||$==Zh;_=_.ba.f.RGBA;var z=[0],et=p.ka;z[0]=p.T,p.Kb&&(et==0?--z[0]:(--et,Q[0]-=p.width),p.j+p.ka+p.T==p.o&&(z[0]=p.o-p.j-et));var mt=_.eb;et=_.fb+et*_.A,p=np(R,Q[0],p.width,G,z,mt,et+(K?0:3),_.A),e(b==z),p&&se($)&&GA(mt,et,K,G,z,_.A)}return 0}function yn(p){var _=p.ma,b=_.ba.S,R=11>b,Q=b==sp||b==Ap||b==lp||b==qh||b==12||se(b);if(_.memory=null,_.Ib=null,_.Jb=null,_.Nd=null,!Vh(_.Oa,p,Q?11:12))return 0;if(Q&&se(b)&&Yt(),p.da)alert("todo:use_scaling");else{if(R){if(_.Ib=He,p.Kb){if(b=p.U+1>>1,_.memory=a(p.U+2*b),_.memory==null)return 0;_.ec=_.memory,_.fc=0,_.cc=_.ec,_.dc=_.fc+p.U,_.Mc=_.cc,_.Nc=_.dc+b,_.Ib=Ir,Yt()}}else alert("todo:EmitYUV");Q&&(_.Jb=Gn,R&&xt())}if(R&&!sb){for(p=0;256>p;++p)Ab[p]=89858*(p-128)+cp>>rA,cb[p]=-22014*(p-128)+cp,ub[p]=-45773*(p-128),lb[p]=113618*(p-128)+cp>>rA;for(p=kl;p<zv;++p)_=76283*(p-16)+cp>>rA,hb[p-kl]=ro(_,255),ef[p-kl]=ro(_+8>>4,15);sb=1}return 1}function fi(p){var _=p.ma,b=p.U,R=p.T;return e(!(1&p.ka)),0>=b||0>=R?0:(b=_.Ib(p,_),_.Jb!=null&&_.Jb(p,_,b),_.Dc+=b,1)}function di(p){p.ma.memory=null}function Ue(p,_,b,R){return ct(p,8)!=47?0:(_[0]=ct(p,14)+1,b[0]=ct(p,14)+1,R[0]=ct(p,1),ct(p,3)!=0?0:!p.h)}function ri(p,_){if(4>p)return p+1;var b=p-2>>1;return(2+(1&p)<<b)+ct(_,b)+1}function Cn(p,_){return 120<_?_-120:1<=(b=((b=qB[_-1])>>4)*p+(8-(15&b)))?b:1;var b}function pi(p,_,b){var R=W(b),Q=p[_+=255&R].g-8;return 0<Q&&(H(b,b.u+8),R=W(b),_+=p[_].value,_+=R&(1<<Q)-1),H(b,b.u+p[_].g),p[_].value}function cn(p,_,b){return b.g+=p.g,b.value+=p.value<<_>>>0,e(8>=b.g),p.g}function Br(p,_,b){var R=p.xc;return e((_=R==0?0:p.vc[p.md*(b>>R)+(_>>R)])<p.Wb),p.Ya[_]}function _n(p,_,b,R){var Q=p.ab,G=p.c*_,$=p.C;_=$+_;var K=b,z=R;for(R=p.Ta,b=p.Ua;0<Q--;){var et=p.gc[Q],mt=$,Lt=_,Ot=K,St=z,Vt=(z=R,K=b,et.Ea);switch(e(mt<Lt),e(Lt<=et.nc),et.hc){case 2:zh(Ot,St,(Lt-mt)*Vt,z,K);break;case 0:var Pt=mt,wt=Lt,bt=z,Ht=K,jt=(le=et).Ea;Pt==0&&(kv(Ot,St,null,null,1,bt,Ht),te(Ot,St+1,0,0,jt-1,bt,Ht+1),St+=jt,Ht+=jt,++Pt);for(var Gt=1<<le.b,pe=Gt-1,ie=Mt(jt,le.b),Ge=le.K,le=le.w+(Pt>>le.b)*ie;Pt<wt;){var mr=Ge,Xr=le,Pr=1;for(Wh(Ot,St,bt,Ht-jt,1,bt,Ht);Pr<jt;){var Tr=(Pr&~pe)+Gt;Tr>jt&&(Tr=jt),(0,DA[mr[Xr++]>>8&15])(Ot,St+ +Pr,bt,Ht+Pr-jt,Tr-Pr,bt,Ht+Pr),Pr=Tr}St+=jt,Ht+=jt,++Pt&pe||(le+=ie)}Lt!=et.nc&&n(z,K-Vt,z,K+(Lt-mt-1)*Vt,Vt);break;case 1:for(Vt=Ot,wt=St,jt=(Ot=et.Ea)-(Ht=Ot&~(bt=(St=1<<et.b)-1)),Pt=Mt(Ot,et.b),Gt=et.K,et=et.w+(mt>>et.b)*Pt;mt<Lt;){for(pe=Gt,ie=et,Ge=new Ct,le=wt+Ht,mr=wt+Ot;wt<le;)oe(pe[ie++],Ge),Bo(Ge,Vt,wt,St,z,K),wt+=St,K+=St;wt<mr&&(oe(pe[ie++],Ge),Bo(Ge,Vt,wt,jt,z,K),wt+=jt,K+=jt),++mt&bt||(et+=Pt)}break;case 3:if(Ot==z&&St==K&&0<et.b){for(wt=z,Ot=Vt=K+(Lt-mt)*Vt-(Ht=(Lt-mt)*Mt(et.Ea,et.b)),St=z,bt=K,Pt=[],Ht=(jt=Ht)-1;0<=Ht;--Ht)Pt[Ht]=St[bt+Ht];for(Ht=jt-1;0<=Ht;--Ht)wt[Ot+Ht]=Pt[Ht];ts(et,mt,Lt,z,Vt,z,K)}else ts(et,mt,Lt,Ot,St,z,K)}K=R,z=b}z!=b&&n(R,b,K,z,G)}function eo(p,_){var b=p.V,R=p.Ba+p.c*p.C,Q=_-p.C;if(e(_<=p.l.o),e(16>=Q),0<Q){var G=p.l,$=p.Ta,K=p.Ua,z=G.width;if(_n(p,Q,b,R),Q=K=[K],e((b=p.C)<(R=_)),e(G.v<G.va),R>G.o&&(R=G.o),b<G.j){var et=G.j-b;b=G.j,Q[0]+=et*z}if(b>=R?b=0:(Q[0]+=4*G.v,G.ka=b-G.j,G.U=G.va-G.v,G.T=R-b,b=1),b){if(K=K[0],11>(b=p.ca).S){var mt=b.f.RGBA,Lt=(R=b.S,Q=G.U,G=G.T,et=mt.eb,mt.A),Ot=G;for(mt=mt.fb+p.Ma*mt.A;0<Ot--;){var St=$,Vt=K,Pt=Q,wt=et,bt=mt;switch(R){case op:es(St,Vt,Pt,wt,bt);break;case sp:QA(St,Vt,Pt,wt,bt);break;case ic:QA(St,Vt,Pt,wt,bt),GA(wt,bt,0,Pt,1,0);break;case c_:ec(St,Vt,Pt,wt,bt);break;case Ap:Pe(St,Vt,Pt,wt,bt,1);break;case Gv:Pe(St,Vt,Pt,wt,bt,1),GA(wt,bt,0,Pt,1,0);break;case lp:Pe(St,Vt,Pt,wt,bt,0);break;case Zh:Pe(St,Vt,Pt,wt,bt,0),GA(wt,bt,1,Pt,1,0);break;case qh:Ts(St,Vt,Pt,wt,bt);break;case up:Ts(St,Vt,Pt,wt,bt),nc(wt,bt,Pt,1,0);break;case h_:da(St,Vt,Pt,wt,bt);break;default:e(0)}K+=z,mt+=Lt}p.Ma+=G}else alert("todo:EmitRescaledRowsYUVA");e(p.Ma<=b.height)}}p.C=_,e(p.C<=p.i)}function de(p){var _;if(0<p.ua)return 0;for(_=0;_<p.Wb;++_){var b=p.Ya[_].G,R=p.Ya[_].H;if(0<b[1][R[1]+0].g||0<b[2][R[2]+0].g||0<b[3][R[3]+0].g)return 0}return 1}function _t(p,_,b,R,Q,G){if(p.Z!=0){var $=p.qd,K=p.rd;for(e(is[p.Z]!=null);_<b;++_)is[p.Z]($,K,R,Q,R,Q,G),$=R,K=Q,Q+=G;p.qd=$,p.rd=K}}function $t(p,_){var b=p.l.ma,R=b.Z==0||b.Z==1?p.l.j:p.C;if(R=p.C<R?R:p.C,e(_<=p.l.o),_>R){var Q=p.l.width,G=b.ca,$=b.tb+Q*R,K=p.V,z=p.Ba+p.c*R,et=p.gc;e(p.ab==1),e(et[0].hc==3),Yh(et[0],R,_,K,z,G,$),_t(b,R,_,G,$,Q)}p.C=p.Ma=_}function ne(p,_,b,R,Q,G,$){var K=p.$/R,z=p.$%R,et=p.m,mt=p.s,Lt=b+p.$,Ot=Lt;Q=b+R*Q;var St=b+R*G,Vt=280+mt.ua,Pt=p.Pb?K:16777216,wt=0<mt.ua?mt.Wa:null,bt=mt.wc,Ht=Lt<St?Br(mt,z,K):null;e(p.C<G),e(St<=Q);var jt=!1;t:for(;;){for(;jt||Lt<St;){var Gt=0;if(K>=Pt){var pe=Lt-b;e((Pt=p).Pb),Pt.wd=Pt.m,Pt.xd=pe,0<Pt.s.ua&&it(Pt.s.Wa,Pt.s.vb),Pt=K+JB}if(z&bt||(Ht=Br(mt,z,K)),e(Ht!=null),Ht.Qb&&(_[Lt]=Ht.qb,jt=!0),!jt)if(J(et),Ht.jc){Gt=et,pe=_;var ie=Lt,Ge=Ht.pd[W(Gt)&fa-1];e(Ht.jc),256>Ge.g?(H(Gt,Gt.u+Ge.g),pe[ie]=Ge.value,Gt=0):(H(Gt,Gt.u+Ge.g-256),e(256<=Ge.value),Gt=Ge.value),Gt==0&&(jt=!0)}else Gt=pi(Ht.G[0],Ht.H[0],et);if(et.h)break;if(jt||256>Gt){if(!jt)if(Ht.nd)_[Lt]=(Ht.qb|Gt<<8)>>>0;else{if(J(et),jt=pi(Ht.G[1],Ht.H[1],et),J(et),pe=pi(Ht.G[2],Ht.H[2],et),ie=pi(Ht.G[3],Ht.H[3],et),et.h)break;_[Lt]=(ie<<24|jt<<16|Gt<<8|pe)>>>0}if(jt=!1,++Lt,++z>=R&&(z=0,++K,$!=null&&K<=G&&!(K%16)&&$(p,K),wt!=null))for(;Ot<Lt;)Gt=_[Ot++],wt.X[(506832829*Gt&4294967295)>>>wt.Mb]=Gt}else if(280>Gt){if(Gt=ri(Gt-256,et),pe=pi(Ht.G[4],Ht.H[4],et),J(et),pe=Cn(R,pe=ri(pe,et)),et.h)break;if(Lt-b<pe||Q-Lt<Gt)break t;for(ie=0;ie<Gt;++ie)_[Lt+ie]=_[Lt+ie-pe];for(Lt+=Gt,z+=Gt;z>=R;)z-=R,++K,$!=null&&K<=G&&!(K%16)&&$(p,K);if(e(Lt<=Q),z&bt&&(Ht=Br(mt,z,K)),wt!=null)for(;Ot<Lt;)Gt=_[Ot++],wt.X[(506832829*Gt&4294967295)>>>wt.Mb]=Gt}else{if(!(Gt<Vt))break t;for(jt=Gt-280,e(wt!=null);Ot<Lt;)Gt=_[Ot++],wt.X[(506832829*Gt&4294967295)>>>wt.Mb]=Gt;Gt=Lt,e(!(jt>>>(pe=wt).Xa)),_[Gt]=pe.X[jt],jt=!0}jt||e(et.h==Y(et))}if(p.Pb&&et.h&&Lt<Q)e(p.m.h),p.a=5,p.m=p.wd,p.$=p.xd,0<p.s.ua&&it(p.s.vb,p.s.Wa);else{if(et.h)break t;$!=null&&$(p,K>G?G:K),p.a=0,p.$=Lt-b}return 1}return p.a=3,0}function Ze(p){e(p!=null),p.vc=null,p.yc=null,p.Ya=null;var _=p.Wa;_!=null&&(_.X=null),p.vb=null,e(p!=null)}function Lr(){var p=new Qv;return p==null?null:(p.a=0,p.xb=p_,Hr("Predictor","VP8LPredictors"),Hr("Predictor","VP8LPredictors_C"),Hr("PredictorAdd","VP8LPredictorsAdd"),Hr("PredictorAdd","VP8LPredictorsAdd_C"),zh=Ae,Bo=Jt,es=qt,QA=nr,Ts=ke,da=wr,ec=Ne,T.VP8LMapColor32b=tc,T.VP8LMapColor8b=Hv,p)}function hn(p,_,b,R,Q){var G=1,$=[p],K=[_],z=R.m,et=R.s,mt=null,Lt=0;t:for(;;){if(b)for(;G&&ct(z,1);){var Ot=$,St=K,Vt=R,Pt=1,wt=Vt.m,bt=Vt.gc[Vt.ab],Ht=ct(wt,2);if(Vt.Oc&1<<Ht)G=0;else{switch(Vt.Oc|=1<<Ht,bt.hc=Ht,bt.Ea=Ot[0],bt.nc=St[0],bt.K=[null],++Vt.ab,e(4>=Vt.ab),Ht){case 0:case 1:bt.b=ct(wt,3)+2,Pt=hn(Mt(bt.Ea,bt.b),Mt(bt.nc,bt.b),0,Vt,bt.K),bt.K=bt.K[0];break;case 3:var jt,Gt=ct(wt,8)+1,pe=16<Gt?0:4<Gt?1:2<Gt?2:3;if(Ot[0]=Mt(bt.Ea,pe),bt.b=pe,jt=Pt=hn(Gt,1,0,Vt,bt.K)){var ie,Ge=Gt,le=bt,mr=1<<(8>>le.b),Xr=a(mr);if(Xr==null)jt=0;else{var Pr=le.K[0],Tr=le.w;for(Xr[0]=le.K[0][0],ie=1;ie<1*Ge;++ie)Xr[ie]=Et(Pr[Tr+ie],Xr[ie-1]);for(;ie<4*mr;++ie)Xr[ie]=0;le.K[0]=null,le.K[0]=Xr,jt=1}}Pt=jt;break;case 2:break;default:e(0)}G=Pt}}if($=$[0],K=K[0],G&&ct(z,1)&&!(G=1<=(Lt=ct(z,4))&&11>=Lt)){R.a=3;break t}var gn;if(gn=G)e:{var an,or,ii,Oa=R,ai=$,pa=K,kr=Lt,ra=b,io=Oa.m,Fi=Oa.s,Kn=[null],Fa=1,lt=0,B=ZB[kr];r:for(;;){if(ra&&ct(io,1)){var D=ct(io,3)+2,ht=Mt(ai,D),Qt=Mt(pa,D),re=ht*Qt;if(!hn(ht,Qt,0,Oa,Kn))break r;for(Kn=Kn[0],Fi.xc=D,an=0;an<re;++an){var Zt=Kn[an]>>8&65535;Kn[an]=Zt,Zt>=Fa&&(Fa=Zt+1)}}if(io.h)break r;for(or=0;5>or;++or){var Se=f_[or];!or&&0<kr&&(Se+=1<<kr),lt<Se&&(lt=Se)}var na=o(Fa*B,S),Ra=Fa,Wn=o(Ra,U);if(Wn==null)var Ma=null;else e(65536>=Ra),Ma=Wn;var Na=a(lt);if(Ma==null||Na==null||na==null){Oa.a=1;break r}var VA=na;for(an=ii=0;an<Fa;++an){var as=Ma[an],os=as.G,hp=as.H,uN=0,w_=1,cN=0;for(or=0;5>or;++or){Se=f_[or],os[or]=VA,hp[or]=ii,!or&&0<kr&&(Se+=1<<kr);i:{var E_,db=Se,C_=Oa,qv=Na,fK=VA,dK=ii,pb=0,ac=C_.m,pK=ct(ac,1);if(i(qv,0,0,db),pK){var gK=ct(ac,1)+1,vK=ct(ac,1),hN=ct(ac,vK==0?1:8);qv[hN]=1,gK==2&&(qv[hN=ct(ac,8)]=1);var B_=1}else{var fN=a(19),dN=ct(ac,4)+4;if(19<dN){C_.a=3;var b_=0;break i}for(E_=0;E_<dN;++E_)fN[XB[E_]]=ct(ac,3);var gb=void 0,Zv=void 0,pN=C_,mK=fN,T_=db,gN=qv,vb=0,oc=pN.m,vN=8,mN=o(128,S);n:for(;x(mN,0,7,mK,19);){if(ct(oc,1)){var yK=2+2*ct(oc,3);if((gb=2+ct(oc,yK))>T_)break n}else gb=T_;for(Zv=0;Zv<T_&&gb--;){J(oc);var yN=mN[0+(127&W(oc))];H(oc,oc.u+yN.g);var fp=yN.value;if(16>fp)gN[Zv++]=fp,fp!=0&&(vN=fp);else{var _K=fp==16,_N=fp-16,wK=$v[_N],wN=ct(oc,Jh[_N])+wK;if(Zv+wN>T_)break n;for(var EK=_K?vN:0;0<wN--;)gN[Zv++]=EK}}vb=1;break n}vb||(pN.a=3),B_=vb}(B_=B_&&!ac.h)&&(pb=x(fK,dK,8,qv,db)),B_&&pb!=0?b_=pb:(C_.a=3,b_=0)}if(b_==0)break r;if(w_&&YB[or]==1&&(w_=VA[ii].g==0),uN+=VA[ii].g,ii+=b_,3>=or){var Jv,mb=Na[0];for(Jv=1;Jv<Se;++Jv)Na[Jv]>mb&&(mb=Na[Jv]);cN+=mb}}if(as.nd=w_,as.Qb=0,w_&&(as.qb=(os[3][hp[3]+0].value<<24|os[1][hp[1]+0].value<<16|os[2][hp[2]+0].value)>>>0,uN==0&&256>os[0][hp[0]+0].value&&(as.Qb=1,as.qb+=os[0][hp[0]+0].value<<8)),as.jc=!as.Qb&&6>cN,as.jc){var S_,Gl=as;for(S_=0;S_<fa;++S_){var sc=S_,Ac=Gl.pd[sc],x_=Gl.G[0][Gl.H[0]+sc];256<=x_.value?(Ac.g=x_.g+256,Ac.value=x_.value):(Ac.g=0,Ac.value=0,sc>>=cn(x_,8,Ac),sc>>=cn(Gl.G[1][Gl.H[1]+sc],16,Ac),sc>>=cn(Gl.G[2][Gl.H[2]+sc],0,Ac),cn(Gl.G[3][Gl.H[3]+sc],24,Ac))}}}Fi.vc=Kn,Fi.Wb=Fa,Fi.Ya=Ma,Fi.yc=na,gn=1;break e}gn=0}if(!(G=gn)){R.a=3;break t}if(0<Lt){if(et.ua=1<<Lt,!ft(et.Wa,Lt)){R.a=1,G=0;break t}}else et.ua=0;var yb=R,EN=$,CK=K,_b=yb.s,wb=_b.xc;if(yb.c=EN,yb.i=CK,_b.md=Mt(EN,wb),_b.wc=wb==0?-1:(1<<wb)-1,b){R.xb=ab;break t}if((mt=a($*K))==null){R.a=1,G=0;break t}G=(G=ne(R,mt,0,$,K,K,null))&&!z.h;break t}return G?(Q!=null?Q[0]=mt:(e(mt==null),e(b)),R.$=0,b||Ze(et)):Ze(et),G}function fn(p,_){var b=p.c*p.i,R=b+_+16*_;return e(p.c<=_),p.V=a(R),p.V==null?(p.Ta=null,p.Ua=0,p.a=1,0):(p.Ta=p.V,p.Ua=p.Ba+b+_,1)}function zo(p,_){var b=p.C,R=_-b,Q=p.V,G=p.Ba+p.c*b;for(e(_<=p.l.o);0<R;){var $=16<R?16:R,K=p.l.ma,z=p.l.width,et=z*$,mt=K.ca,Lt=K.tb+z*b,Ot=p.Ta,St=p.Ua;_n(p,$,Q,G),Is(Ot,St,mt,Lt,et),_t(K,b,b+$,mt,Lt,z),R-=$,Q+=$*p.c,b+=$}e(b==_),p.C=p.Ma=_}function gi(){this.ub=this.yd=this.td=this.Rb=0}function Ks(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function IA(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Rh(){this.Yb=function(){var p=[];return function _(b,R,Q){for(var G=Q[R],$=0;$<G&&(b.push(Q.length>R+1?[]:0),!(Q.length<R+1));$++)_(b[$],R+1,Q)}(p,0,[3,11]),p}()}function Cv(){this.jb=a(3),this.Wc=s([4,8],Rh),this.Xc=s([4,17],Rh)}function Ud(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Ws(){this.ld=this.La=this.dd=this.tc=0}function Dd(){this.Na=this.la=0}function Bv(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Mh(){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 bv(){this.uc=this.M=this.Nb=0,this.wa=Array(new Ws),this.Y=0,this.ya=Array(new Mh),this.aa=0,this.l=new Ol}function Qd(){this.y=a(16),this.f=a(8),this.ea=a(8)}function kd(){this.cb=this.a=0,this.sc="",this.m=new Tt,this.Od=new gi,this.Kc=new Ks,this.ed=new Ud,this.Qa=new IA,this.Ic=this.$c=this.Aa=0,this.D=new bv,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,Tt),this.ia=0,this.pb=o(4,Bv),this.Pa=new Cv,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Qd),this.Hd=0,this.rb=Array(new Dd),this.sb=0,this.wa=Array(new Ws),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 Mh),this.L=this.aa=0,this.gd=s([4,2],Ws),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 Ol(){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 Tv(){var p=new kd;return p!=null&&(p.a=0,p.sc="OK",p.cb=0,p.Xb=0,tf||(tf=$d)),p}function $n(p,_,b){return p.a==0&&(p.a=_,p.sc=b,p.cb=0),0}function Hd(p,_,b){return 3<=b&&p[_+0]==157&&p[_+1]==1&&p[_+2]==42}function Gd(p,_){if(p==null)return 0;if(p.a=0,p.sc="OK",_==null)return $n(p,2,"null VP8Io passed to VP8GetHeaders()");var b=_.data,R=_.w,Q=_.ha;if(4>Q)return $n(p,7,"Truncated header.");var G=b[R+0]|b[R+1]<<8|b[R+2]<<16,$=p.Od;if($.Rb=!(1&G),$.td=G>>1&7,$.yd=G>>4&1,$.ub=G>>5,3<$.td)return $n(p,3,"Incorrect keyframe parameters.");if(!$.yd)return $n(p,4,"Frame not displayable.");R+=3,Q-=3;var K=p.Kc;if($.Rb){if(7>Q)return $n(p,7,"cannot parse picture header");if(!Hd(b,R,Q))return $n(p,3,"Bad code word");K.c=16383&(b[R+4]<<8|b[R+3]),K.Td=b[R+4]>>6,K.i=16383&(b[R+6]<<8|b[R+5]),K.Ud=b[R+6]>>6,R+=7,Q-=7,p.za=K.c+15>>4,p.Ub=K.i+15>>4,_.width=K.c,_.height=K.i,_.Da=0,_.j=0,_.v=0,_.va=_.width,_.o=_.height,_.da=0,_.ib=_.width,_.hb=_.height,_.U=_.width,_.T=_.height,i((G=p.Pa).jb,0,255,G.jb.length),e((G=p.Qa)!=null),G.Cb=0,G.Bb=0,G.Fb=1,i(G.Zb,0,0,G.Zb.length),i(G.Lb,0,0,G.Lb)}if($.ub>Q)return $n(p,7,"bad partition length");tt(G=p.m,b,R,$.ub),R+=$.ub,Q-=$.ub,$.Rb&&(K.Ld=ut(G),K.Kd=ut(G)),K=p.Qa;var z,et=p.Pa;if(e(G!=null),e(K!=null),K.Cb=ut(G),K.Cb){if(K.Bb=ut(G),ut(G)){for(K.Fb=ut(G),z=0;4>z;++z)K.Zb[z]=ut(G)?rt(G,7):0;for(z=0;4>z;++z)K.Lb[z]=ut(G)?rt(G,6):0}if(K.Bb)for(z=0;3>z;++z)et.jb[z]=ut(G)?q(G,8):255}else K.Bb=0;if(G.Ka)return $n(p,3,"cannot parse segment header");if((K=p.ed).zd=ut(G),K.Tb=q(G,6),K.wb=q(G,3),K.Pc=ut(G),K.Pc&&ut(G)){for(et=0;4>et;++et)ut(G)&&(K.vd[et]=rt(G,6));for(et=0;4>et;++et)ut(G)&&(K.od[et]=rt(G,6))}if(p.L=K.Tb==0?0:K.zd?1:2,G.Ka)return $n(p,3,"cannot parse filter header");var mt=Q;if(Q=z=R,R=z+mt,K=mt,p.Xb=(1<<q(p.m,2))-1,mt<3*(et=p.Xb))b=7;else{for(z+=3*et,K-=3*et,mt=0;mt<et;++mt){var Lt=b[Q+0]|b[Q+1]<<8|b[Q+2]<<16;Lt>K&&(Lt=K),tt(p.Jc[+mt],b,z,Lt),z+=Lt,K-=Lt,Q+=3}tt(p.Jc[+et],b,z,K),b=z<R?0:5}if(b!=0)return $n(p,b,"cannot parse partitions");for(b=q(z=p.m,7),Q=ut(z)?rt(z,4):0,R=ut(z)?rt(z,4):0,K=ut(z)?rt(z,4):0,et=ut(z)?rt(z,4):0,z=ut(z)?rt(z,4):0,mt=p.Qa,Lt=0;4>Lt;++Lt){if(mt.Cb){var Ot=mt.Zb[Lt];mt.Fb||(Ot+=b)}else{if(0<Lt){p.pb[Lt]=p.pb[0];continue}Ot=b}var St=p.pb[Lt];St.Sc[0]=Vv[ro(Ot+Q,127)],St.Sc[1]=jv[ro(Ot+0,127)],St.Eb[0]=2*Vv[ro(Ot+R,127)],St.Eb[1]=101581*jv[ro(Ot+K,127)]>>16,8>St.Eb[1]&&(St.Eb[1]=8),St.Qc[0]=Vv[ro(Ot+et,117)],St.Qc[1]=jv[ro(Ot+z,127)],St.lc=Ot+z}if(!$.Rb)return $n(p,4,"Not a key frame.");for(ut(G),$=p.Pa,b=0;4>b;++b){for(Q=0;8>Q;++Q)for(R=0;3>R;++R)for(K=0;11>K;++K)et=X(G,ib[b][Q][R][K])?q(G,8):rb[b][Q][R][K],$.Wc[b][Q].Yb[R][K]=et;for(Q=0;17>Q;++Q)$.Xc[b][Q]=$.Wc[b][Ql[Q]]}return p.kc=ut(G),p.kc&&(p.Bd=q(G,8)),p.cb=1}function $d(p,_,b,R,Q,G,$){var K=_[Q].Yb[b];for(b=0;16>Q;++Q){if(!X(p,K[b+0]))return Q;for(;!X(p,K[b+1]);)if(K=_[++Q].Yb[0],b=0,Q==16)return 16;var z=_[Q+1].Yb;if(X(p,K[b+2])){var et=p,mt=0;if(X(et,(Ot=K)[(Lt=b)+3]))if(X(et,Ot[Lt+6])){for(K=0,Lt=2*(mt=X(et,Ot[Lt+8]))+(Ot=X(et,Ot[Lt+9+mt])),mt=0,Ot=tb[Lt];Ot[K];++K)mt+=mt+X(et,Ot[K]);mt+=3+(8<<Lt)}else X(et,Ot[Lt+7])?(mt=7+2*X(et,165),mt+=X(et,145)):mt=5+X(et,159);else mt=X(et,Ot[Lt+4])?3+X(et,Ot[Lt+5]):2;K=z[2]}else mt=1,K=z[1];z=$+eb[Q],0>(et=p).b&&ot(et);var Lt,Ot=et.b,St=(Lt=et.Ca>>1)-(et.I>>Ot)>>31;--et.b,et.Ca+=St,et.Ca|=1,et.I-=(Lt+1&St)<<Ot,G[z]=((mt^St)-St)*R[(0<Q)+0]}return 16}function Nh(p){var _=p.rb[p.sb-1];_.la=0,_.Na=0,i(p.zc,0,0,p.zc.length),p.ja=0}function Sv(p,_){if(p==null)return 0;if(_==null)return $n(p,2,"NULL VP8Io parameter in VP8Decode().");if(!p.cb&&!Gd(p,_))return 0;if(e(p.cb),_.ac==null||_.ac(_)){_.ob&&(p.L=0);var b=Xv[p.L];if(p.L==2?(p.yb=0,p.zb=0):(p.yb=_.v-b>>4,p.zb=_.j-b>>4,0>p.yb&&(p.yb=0),0>p.zb&&(p.zb=0)),p.Va=_.o+15+b>>4,p.Hb=_.va+15+b>>4,p.Hb>p.za&&(p.Hb=p.za),p.Va>p.Ub&&(p.Va=p.Ub),0<p.L){var R=p.ed;for(b=0;4>b;++b){var Q;if(p.Qa.Cb){var G=p.Qa.Lb[b];p.Qa.Fb||(G+=R.Tb)}else G=R.Tb;for(Q=0;1>=Q;++Q){var $=p.gd[b][Q],K=G;if(R.Pc&&(K+=R.vd[0],Q&&(K+=R.od[0])),0<(K=0>K?0:63<K?63:K)){var z=K;0<R.wb&&(z=4<R.wb?z>>2:z>>1)>9-R.wb&&(z=9-R.wb),1>z&&(z=1),$.dd=z,$.tc=2*K+z,$.ld=40<=K?2:15<=K?1:0}else $.tc=0;$.La=Q}}}b=0}else $n(p,6,"Frame setup failed"),b=p.a;if(b=b==0){if(b){p.$c=0,0<p.Aa||(p.Ic=fb);t:{b=p.Ic,R=4*(z=p.za);var et=32*z,mt=z+1,Lt=0<p.L?z*(0<p.Aa?2:1):0,Ot=(p.Aa==2?2:1)*z;if(($=R+832+(Q=3*(16*b+Xv[p.L])/2*et)+(G=p.Fa!=null&&0<p.Fa.length?p.Kc.c*p.Kc.i:0))!=$)b=0;else{if($>p.Vb){if(p.Vb=0,p.Ec=a($),p.Fc=0,p.Ec==null){b=$n(p,1,"no memory during frame initialization.");break t}p.Vb=$}$=p.Ec,K=p.Fc,p.Ac=$,p.Bc=K,K+=R,p.Gd=o(et,Qd),p.Hd=0,p.rb=o(mt+1,Dd),p.sb=1,p.wa=Lt?o(Lt,Ws):null,p.Y=0,p.D.Nb=0,p.D.wa=p.wa,p.D.Y=p.Y,0<p.Aa&&(p.D.Y+=z),e(!0),p.oc=$,p.pc=K,K+=832,p.ya=o(Ot,Mh),p.aa=0,p.D.ya=p.ya,p.D.aa=p.aa,p.Aa==2&&(p.D.aa+=z),p.R=16*z,p.B=8*z,z=(et=Xv[p.L])*p.R,et=et/2*p.B,p.sa=$,p.ta=K+z,p.qa=p.sa,p.ra=p.ta+16*b*p.R+et,p.Ha=p.qa,p.Ia=p.ra+8*b*p.B+et,p.$c=0,K+=Q,p.mb=G?$:null,p.nb=G?K:null,e(K+G<=p.Fc+p.Vb),Nh(p),i(p.Ac,p.Bc,0,R),b=1}}if(b){if(_.ka=0,_.y=p.sa,_.O=p.ta,_.f=p.qa,_.N=p.ra,_.ea=p.Ha,_.Vd=p.Ia,_.fa=p.R,_.Rc=p.B,_.F=null,_.J=0,!u_){for(b=-255;255>=b;++b)o_[255+b]=0>b?-b:b;for(b=-1020;1020>=b;++b)s_[1020+b]=-128>b?-128:127<b?127:b;for(b=-112;112>=b;++b)A_[112+b]=-16>b?-16:15<b?15:b;for(b=-255;510>=b;++b)l_[255+b]=0>b?0:255<b?255:b;u_=1}Ss=Lv,La=xv,kA=jd,rs=Iv,xs=Kd,rc=LA,HA=PA,Ul=Nl,Dl=Dv,Zs=kh,Xh=Uv,bo=Ku,Js=Hh,dn=Jd,pn=Zd,jn=Xs,mi=NA,tA=Pv,ns[0]=qo,ns[1]=Uh,ns[2]=Fv,ns[3]=FA,ns[4]=Rv,ns[5]=RA,ns[6]=Bs,ns[7]=Dh,ns[8]=Mv,ns[9]=zd,$A[0]=Wd,$A[1]=Hu,$A[2]=zs,$A[3]=Gu,$A[4]=ta,$A[5]=Ov,$A[6]=Vu,eA[0]=MA,eA[1]=OA,eA[2]=Yd,eA[3]=Qh,eA[4]=Rl,eA[5]=Nv,eA[6]=ju,b=1}else b=0}b&&(b=function(St,Vt){for(St.M=0;St.M<St.Va;++St.M){var Pt,wt=St.Jc[St.M&St.Xb],bt=St.m,Ht=St;for(Pt=0;Pt<Ht.za;++Pt){var jt=bt,Gt=Ht,pe=Gt.Ac,ie=Gt.Bc+4*Pt,Ge=Gt.zc,le=Gt.ya[Gt.aa+Pt];if(Gt.Qa.Bb?le.$b=X(jt,Gt.Pa.jb[0])?2+X(jt,Gt.Pa.jb[2]):X(jt,Gt.Pa.jb[1]):le.$b=0,Gt.kc&&(le.Ad=X(jt,Gt.Bd)),le.Za=!X(jt,145)+0,le.Za){var mr=le.Ob,Xr=0;for(Gt=0;4>Gt;++Gt){var Pr,Tr=Ge[0+Gt];for(Pr=0;4>Pr;++Pr){Tr=nb[pe[ie+Pr]][Tr];for(var gn=d_[X(jt,Tr[0])];0<gn;)gn=d_[2*gn+X(jt,Tr[gn])];Tr=-gn,pe[ie+Pr]=Tr}n(mr,Xr,pe,ie,4),Xr+=4,Ge[0+Gt]=Tr}}else Tr=X(jt,156)?X(jt,128)?1:3:X(jt,163)?2:0,le.Ob[0]=Tr,i(pe,ie,Tr,4),i(Ge,0,Tr,4);le.Dd=X(jt,142)?X(jt,114)?X(jt,183)?1:3:2:0}if(Ht.m.Ka)return $n(St,7,"Premature end-of-partition0 encountered.");for(;St.ja<St.za;++St.ja){if(Ht=wt,jt=(bt=St).rb[bt.sb-1],pe=bt.rb[bt.sb+bt.ja],Pt=bt.ya[bt.aa+bt.ja],ie=bt.kc?Pt.Ad:0)jt.la=pe.la=0,Pt.Za||(jt.Na=pe.Na=0),Pt.Hc=0,Pt.Gc=0,Pt.ia=0;else{var an,or;if(jt=pe,pe=Ht,ie=bt.Pa.Xc,Ge=bt.ya[bt.aa+bt.ja],le=bt.pb[Ge.$b],Gt=Ge.ad,mr=0,Xr=bt.rb[bt.sb-1],Tr=Pr=0,i(Gt,mr,0,384),Ge.Za)var ii=0,Oa=ie[3];else{gn=a(16);var ai=jt.Na+Xr.Na;if(ai=tf(pe,ie[1],ai,le.Eb,0,gn,0),jt.Na=Xr.Na=(0<ai)+0,1<ai)Ss(gn,0,Gt,mr);else{var pa=gn[0]+3>>3;for(gn=0;256>gn;gn+=16)Gt[mr+gn]=pa}ii=1,Oa=ie[0]}var kr=15&jt.la,ra=15&Xr.la;for(gn=0;4>gn;++gn){var io=1&ra;for(pa=or=0;4>pa;++pa)kr=kr>>1|(io=(ai=tf(pe,Oa,ai=io+(1&kr),le.Sc,ii,Gt,mr))>ii)<<7,or=or<<2|(3<ai?3:1<ai?2:Gt[mr+0]!=0),mr+=16;kr>>=4,ra=ra>>1|io<<7,Pr=(Pr<<8|or)>>>0}for(Oa=kr,ii=ra>>4,an=0;4>an;an+=2){for(or=0,kr=jt.la>>4+an,ra=Xr.la>>4+an,gn=0;2>gn;++gn){for(io=1&ra,pa=0;2>pa;++pa)ai=io+(1&kr),kr=kr>>1|(io=0<(ai=tf(pe,ie[2],ai,le.Qc,0,Gt,mr)))<<3,or=or<<2|(3<ai?3:1<ai?2:Gt[mr+0]!=0),mr+=16;kr>>=2,ra=ra>>1|io<<5}Tr|=or<<4*an,Oa|=kr<<4<<an,ii|=(240&ra)<<an}jt.la=Oa,Xr.la=ii,Ge.Hc=Pr,Ge.Gc=Tr,Ge.ia=43690&Tr?0:le.ia,ie=!(Pr|Tr)}if(0<bt.L&&(bt.wa[bt.Y+bt.ja]=bt.gd[Pt.$b][Pt.Za],bt.wa[bt.Y+bt.ja].La|=!ie),Ht.Ka)return $n(St,7,"Premature end-of-file encountered.")}if(Nh(St),bt=Vt,Ht=1,Pt=(wt=St).D,jt=0<wt.L&&wt.M>=wt.zb&&wt.M<=wt.Va,wt.Aa==0)t:{if(Pt.M=wt.M,Pt.uc=jt,ha(wt,Pt),Ht=1,Pt=(or=wt.D).Nb,jt=(Tr=Xv[wt.L])*wt.R,pe=Tr/2*wt.B,gn=16*Pt*wt.R,pa=8*Pt*wt.B,ie=wt.sa,Ge=wt.ta-jt+gn,le=wt.qa,Gt=wt.ra-pe+pa,mr=wt.Ha,Xr=wt.Ia-pe+pa,ra=(kr=or.M)==0,Pr=kr>=wt.Va-1,wt.Aa==2&&ha(wt,or),or.uc)for(io=(ai=wt).D.M,e(ai.D.uc),or=ai.yb;or<ai.Hb;++or){ii=or,Oa=io;var Fi=(Kn=(Se=ai).D).Nb;an=Se.R;var Kn=Kn.wa[Kn.Y+ii],Fa=Se.sa,lt=Se.ta+16*Fi*an+16*ii,B=Kn.dd,D=Kn.tc;if(D!=0)if(e(3<=D),Se.L==1)0<ii&&jn(Fa,lt,an,D+4),Kn.La&&tA(Fa,lt,an,D),0<Oa&&pn(Fa,lt,an,D+4),Kn.La&&mi(Fa,lt,an,D);else{var ht=Se.B,Qt=Se.qa,re=Se.ra+8*Fi*ht+8*ii,Zt=Se.Ha,Se=Se.Ia+8*Fi*ht+8*ii;Fi=Kn.ld,0<ii&&(Ul(Fa,lt,an,D+4,B,Fi),Zs(Qt,re,Zt,Se,ht,D+4,B,Fi)),Kn.La&&(bo(Fa,lt,an,D,B,Fi),dn(Qt,re,Zt,Se,ht,D,B,Fi)),0<Oa&&(HA(Fa,lt,an,D+4,B,Fi),Dl(Qt,re,Zt,Se,ht,D+4,B,Fi)),Kn.La&&(Xh(Fa,lt,an,D,B,Fi),Js(Qt,re,Zt,Se,ht,D,B,Fi))}}if(wt.ia&&alert("todo:DitherRow"),bt.put!=null){if(or=16*kr,kr=16*(kr+1),ra?(bt.y=wt.sa,bt.O=wt.ta+gn,bt.f=wt.qa,bt.N=wt.ra+pa,bt.ea=wt.Ha,bt.W=wt.Ia+pa):(or-=Tr,bt.y=ie,bt.O=Ge,bt.f=le,bt.N=Gt,bt.ea=mr,bt.W=Xr),Pr||(kr-=Tr),kr>bt.o&&(kr=bt.o),bt.F=null,bt.J=null,wt.Fa!=null&&0<wt.Fa.length&&or<kr&&(bt.J=UA(wt,bt,or,kr-or),bt.F=wt.mb,bt.F==null&&bt.F.length==0)){Ht=$n(wt,3,"Could not decode alpha data.");break t}or<bt.j&&(Tr=bt.j-or,or=bt.j,e(!(1&Tr)),bt.O+=wt.R*Tr,bt.N+=wt.B*(Tr>>1),bt.W+=wt.B*(Tr>>1),bt.F!=null&&(bt.J+=bt.width*Tr)),or<kr&&(bt.O+=bt.v,bt.N+=bt.v>>1,bt.W+=bt.v>>1,bt.F!=null&&(bt.J+=bt.v),bt.ka=or-bt.j,bt.U=bt.va-bt.v,bt.T=kr-or,Ht=bt.put(bt))}Pt+1!=wt.Ic||Pr||(n(wt.sa,wt.ta-jt,ie,Ge+16*wt.R,jt),n(wt.qa,wt.ra-pe,le,Gt+8*wt.B,pe),n(wt.Ha,wt.Ia-pe,mr,Xr+8*wt.B,pe))}if(!Ht)return $n(St,6,"Output aborted.")}return 1}(p,_)),_.bc!=null&&_.bc(_),b&=1}return b?(p.cb=0,b):0}function Yo(p,_,b,R,Q){Q=p[_+b+32*R]+(Q>>3),p[_+b+32*R]=-256&Q?0>Q?0:255:Q}function Xo(p,_,b,R,Q,G){Yo(p,_,0,b,R+Q),Yo(p,_,1,b,R+G),Yo(p,_,2,b,R-G),Yo(p,_,3,b,R-Q)}function Sa(p){return(20091*p>>16)+p}function Vd(p,_,b,R){var Q,G=0,$=a(16);for(Q=0;4>Q;++Q){var K=p[_+0]+p[_+8],z=p[_+0]-p[_+8],et=(35468*p[_+4]>>16)-Sa(p[_+12]),mt=Sa(p[_+4])+(35468*p[_+12]>>16);$[G+0]=K+mt,$[G+1]=z+et,$[G+2]=z-et,$[G+3]=K-mt,G+=4,_++}for(Q=G=0;4>Q;++Q)K=(p=$[G+0]+4)+$[G+8],z=p-$[G+8],et=(35468*$[G+4]>>16)-Sa($[G+12]),Yo(b,R,0,0,K+(mt=Sa($[G+4])+(35468*$[G+12]>>16))),Yo(b,R,1,0,z+et),Yo(b,R,2,0,z-et),Yo(b,R,3,0,K-mt),G++,R+=32}function LA(p,_,b,R){var Q=p[_+0]+4,G=35468*p[_+4]>>16,$=Sa(p[_+4]),K=35468*p[_+1]>>16;Xo(b,R,0,Q+$,p=Sa(p[_+1]),K),Xo(b,R,1,Q+G,p,K),Xo(b,R,2,Q-G,p,K),Xo(b,R,3,Q-$,p,K)}function xv(p,_,b,R,Q){Vd(p,_,b,R),Q&&Vd(p,_+16,b,R+4)}function jd(p,_,b,R){La(p,_+0,b,R,1),La(p,_+32,b,R+128,1)}function Iv(p,_,b,R){var Q;for(p=p[_+0]+4,Q=0;4>Q;++Q)for(_=0;4>_;++_)Yo(b,R,_,Q,p)}function Kd(p,_,b,R){p[_+0]&&rs(p,_+0,b,R),p[_+16]&&rs(p,_+16,b,R+4),p[_+32]&&rs(p,_+32,b,R+128),p[_+48]&&rs(p,_+48,b,R+128+4)}function Lv(p,_,b,R){var Q,G=a(16);for(Q=0;4>Q;++Q){var $=p[_+0+Q]+p[_+12+Q],K=p[_+4+Q]+p[_+8+Q],z=p[_+4+Q]-p[_+8+Q],et=p[_+0+Q]-p[_+12+Q];G[0+Q]=$+K,G[8+Q]=$-K,G[4+Q]=et+z,G[12+Q]=et-z}for(Q=0;4>Q;++Q)$=(p=G[0+4*Q]+3)+G[3+4*Q],K=G[1+4*Q]+G[2+4*Q],z=G[1+4*Q]-G[2+4*Q],et=p-G[3+4*Q],b[R+0]=$+K>>3,b[R+16]=et+z>>3,b[R+32]=$-K>>3,b[R+48]=et-z>>3,R+=64}function Ph(p,_,b){var R,Q=_-32,G=no,$=255-p[Q-1];for(R=0;R<b;++R){var K,z=G,et=$+p[_-1];for(K=0;K<b;++K)p[_+K]=z[et+p[Q+K]];_+=32}}function Uh(p,_){Ph(p,_,4)}function OA(p,_){Ph(p,_,8)}function Hu(p,_){Ph(p,_,16)}function zs(p,_){var b;for(b=0;16>b;++b)n(p,_+32*b,p,_-32,16)}function Gu(p,_){var b;for(b=16;0<b;--b)i(p,_,p[_-1],16),_+=32}function $u(p,_,b){var R;for(R=0;16>R;++R)i(_,b+32*R,p,16)}function Wd(p,_){var b,R=16;for(b=0;16>b;++b)R+=p[_-1+32*b]+p[_+b-32];$u(R>>5,p,_)}function ta(p,_){var b,R=8;for(b=0;16>b;++b)R+=p[_-1+32*b];$u(R>>4,p,_)}function Ov(p,_){var b,R=8;for(b=0;16>b;++b)R+=p[_+b-32];$u(R>>4,p,_)}function Vu(p,_){$u(128,p,_)}function tr(p,_,b){return p+2*_+b+2>>2}function Fv(p,_){var b,R=_-32;for(R=new Uint8Array([tr(p[R-1],p[R+0],p[R+1]),tr(p[R+0],p[R+1],p[R+2]),tr(p[R+1],p[R+2],p[R+3]),tr(p[R+2],p[R+3],p[R+4])]),b=0;4>b;++b)n(p,_+32*b,R,0,R.length)}function FA(p,_){var b=p[_-1],R=p[_-1+32],Q=p[_-1+64],G=p[_-1+96];It(p,_+0,16843009*tr(p[_-1-32],b,R)),It(p,_+32,16843009*tr(b,R,Q)),It(p,_+64,16843009*tr(R,Q,G)),It(p,_+96,16843009*tr(Q,G,G))}function qo(p,_){var b,R=4;for(b=0;4>b;++b)R+=p[_+b-32]+p[_-1+32*b];for(R>>=3,b=0;4>b;++b)i(p,_+32*b,R,4)}function Rv(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1-32],$=p[_+0-32],K=p[_+1-32],z=p[_+2-32],et=p[_+3-32];p[_+0+96]=tr(R,Q,p[_-1+96]),p[_+1+96]=p[_+0+64]=tr(b,R,Q),p[_+2+96]=p[_+1+64]=p[_+0+32]=tr(G,b,R),p[_+3+96]=p[_+2+64]=p[_+1+32]=p[_+0+0]=tr($,G,b),p[_+3+64]=p[_+2+32]=p[_+1+0]=tr(K,$,G),p[_+3+32]=p[_+2+0]=tr(z,K,$),p[_+3+0]=tr(et,z,K)}function Bs(p,_){var b=p[_+1-32],R=p[_+2-32],Q=p[_+3-32],G=p[_+4-32],$=p[_+5-32],K=p[_+6-32],z=p[_+7-32];p[_+0+0]=tr(p[_+0-32],b,R),p[_+1+0]=p[_+0+32]=tr(b,R,Q),p[_+2+0]=p[_+1+32]=p[_+0+64]=tr(R,Q,G),p[_+3+0]=p[_+2+32]=p[_+1+64]=p[_+0+96]=tr(Q,G,$),p[_+3+32]=p[_+2+64]=p[_+1+96]=tr(G,$,K),p[_+3+64]=p[_+2+96]=tr($,K,z),p[_+3+96]=tr(K,z,z)}function RA(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1-32],$=p[_+0-32],K=p[_+1-32],z=p[_+2-32],et=p[_+3-32];p[_+0+0]=p[_+1+64]=G+$+1>>1,p[_+1+0]=p[_+2+64]=$+K+1>>1,p[_+2+0]=p[_+3+64]=K+z+1>>1,p[_+3+0]=z+et+1>>1,p[_+0+96]=tr(Q,R,b),p[_+0+64]=tr(R,b,G),p[_+0+32]=p[_+1+96]=tr(b,G,$),p[_+1+32]=p[_+2+96]=tr(G,$,K),p[_+2+32]=p[_+3+96]=tr($,K,z),p[_+3+32]=tr(K,z,et)}function Dh(p,_){var b=p[_+0-32],R=p[_+1-32],Q=p[_+2-32],G=p[_+3-32],$=p[_+4-32],K=p[_+5-32],z=p[_+6-32],et=p[_+7-32];p[_+0+0]=b+R+1>>1,p[_+1+0]=p[_+0+64]=R+Q+1>>1,p[_+2+0]=p[_+1+64]=Q+G+1>>1,p[_+3+0]=p[_+2+64]=G+$+1>>1,p[_+0+32]=tr(b,R,Q),p[_+1+32]=p[_+0+96]=tr(R,Q,G),p[_+2+32]=p[_+1+96]=tr(Q,G,$),p[_+3+32]=p[_+2+96]=tr(G,$,K),p[_+3+64]=tr($,K,z),p[_+3+96]=tr(K,z,et)}function zd(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1+96];p[_+0+0]=b+R+1>>1,p[_+2+0]=p[_+0+32]=R+Q+1>>1,p[_+2+32]=p[_+0+64]=Q+G+1>>1,p[_+1+0]=tr(b,R,Q),p[_+3+0]=p[_+1+32]=tr(R,Q,G),p[_+3+32]=p[_+1+64]=tr(Q,G,G),p[_+3+64]=p[_+2+64]=p[_+0+96]=p[_+1+96]=p[_+2+96]=p[_+3+96]=G}function Mv(p,_){var b=p[_-1+0],R=p[_-1+32],Q=p[_-1+64],G=p[_-1+96],$=p[_-1-32],K=p[_+0-32],z=p[_+1-32],et=p[_+2-32];p[_+0+0]=p[_+2+32]=b+$+1>>1,p[_+0+32]=p[_+2+64]=R+b+1>>1,p[_+0+64]=p[_+2+96]=Q+R+1>>1,p[_+0+96]=G+Q+1>>1,p[_+3+0]=tr(K,z,et),p[_+2+0]=tr($,K,z),p[_+1+0]=p[_+3+32]=tr(b,$,K),p[_+1+32]=p[_+3+64]=tr(R,b,$),p[_+1+64]=p[_+3+96]=tr(Q,R,b),p[_+1+96]=tr(G,Q,R)}function Yd(p,_){var b;for(b=0;8>b;++b)n(p,_+32*b,p,_-32,8)}function Qh(p,_){var b;for(b=0;8>b;++b)i(p,_,p[_-1],8),_+=32}function Fl(p,_,b){var R;for(R=0;8>R;++R)i(_,b+32*R,p,8)}function MA(p,_){var b,R=8;for(b=0;8>b;++b)R+=p[_+b-32]+p[_-1+32*b];Fl(R>>4,p,_)}function Nv(p,_){var b,R=4;for(b=0;8>b;++b)R+=p[_+b-32];Fl(R>>3,p,_)}function Rl(p,_){var b,R=4;for(b=0;8>b;++b)R+=p[_-1+32*b];Fl(R>>3,p,_)}function ju(p,_){Fl(128,p,_)}function Ml(p,_,b){var R=p[_-b],Q=p[_+0],G=3*(Q-R)+ip[1020+p[_-2*b]-p[_+b]],$=ap[112+(G+4>>3)];p[_-b]=no[255+R+ap[112+(G+3>>3)]],p[_+0]=no[255+Q-$]}function Xd(p,_,b,R){var Q=p[_+0],G=p[_+b];return To[255+p[_-2*b]-p[_-b]]>R||To[255+G-Q]>R}function Ys(p,_,b,R){return 4*To[255+p[_-b]-p[_+0]]+To[255+p[_-2*b]-p[_+b]]<=R}function qd(p,_,b,R,Q){var G=p[_-3*b],$=p[_-2*b],K=p[_-b],z=p[_+0],et=p[_+b],mt=p[_+2*b],Lt=p[_+3*b];return 4*To[255+K-z]+To[255+$-et]>R?0:To[255+p[_-4*b]-G]<=Q&&To[255+G-$]<=Q&&To[255+$-K]<=Q&&To[255+Lt-mt]<=Q&&To[255+mt-et]<=Q&&To[255+et-z]<=Q}function Zd(p,_,b,R){var Q=2*R+1;for(R=0;16>R;++R)Ys(p,_+R,b,Q)&&Ml(p,_+R,b)}function Xs(p,_,b,R){var Q=2*R+1;for(R=0;16>R;++R)Ys(p,_+R*b,1,Q)&&Ml(p,_+R*b,1)}function NA(p,_,b,R){var Q;for(Q=3;0<Q;--Q)Zd(p,_+=4*b,b,R)}function Pv(p,_,b,R){var Q;for(Q=3;0<Q;--Q)Xs(p,_+=4,b,R)}function xa(p,_,b,R,Q,G,$,K){for(G=2*G+1;0<Q--;){if(qd(p,_,b,G,$))if(Xd(p,_,b,K))Ml(p,_,b);else{var z=p,et=_,mt=b,Lt=z[et-2*mt],Ot=z[et-mt],St=z[et+0],Vt=z[et+mt],Pt=z[et+2*mt],wt=27*(Ht=ip[1020+3*(St-Ot)+ip[1020+Lt-Vt]])+63>>7,bt=18*Ht+63>>7,Ht=9*Ht+63>>7;z[et-3*mt]=no[255+z[et-3*mt]+Ht],z[et-2*mt]=no[255+Lt+bt],z[et-mt]=no[255+Ot+wt],z[et+0]=no[255+St-wt],z[et+mt]=no[255+Vt-bt],z[et+2*mt]=no[255+Pt-Ht]}_+=R}}function Zo(p,_,b,R,Q,G,$,K){for(G=2*G+1;0<Q--;){if(qd(p,_,b,G,$))if(Xd(p,_,b,K))Ml(p,_,b);else{var z=p,et=_,mt=b,Lt=z[et-mt],Ot=z[et+0],St=z[et+mt],Vt=ap[112+((Pt=3*(Ot-Lt))+4>>3)],Pt=ap[112+(Pt+3>>3)],wt=Vt+1>>1;z[et-2*mt]=no[255+z[et-2*mt]+wt],z[et-mt]=no[255+Lt+Pt],z[et+0]=no[255+Ot-Vt],z[et+mt]=no[255+St-wt]}_+=R}}function PA(p,_,b,R,Q,G){xa(p,_,b,1,16,R,Q,G)}function Nl(p,_,b,R,Q,G){xa(p,_,1,b,16,R,Q,G)}function Uv(p,_,b,R,Q,G){var $;for($=3;0<$;--$)Zo(p,_+=4*b,b,1,16,R,Q,G)}function Ku(p,_,b,R,Q,G){var $;for($=3;0<$;--$)Zo(p,_+=4,1,b,16,R,Q,G)}function Dv(p,_,b,R,Q,G,$,K){xa(p,_,Q,1,8,G,$,K),xa(b,R,Q,1,8,G,$,K)}function kh(p,_,b,R,Q,G,$,K){xa(p,_,1,Q,8,G,$,K),xa(b,R,1,Q,8,G,$,K)}function Hh(p,_,b,R,Q,G,$,K){Zo(p,_+4*Q,Q,1,8,G,$,K),Zo(b,R+4*Q,Q,1,8,G,$,K)}function Jd(p,_,b,R,Q,G,$,K){Zo(p,_+4,1,Q,8,G,$,K),Zo(b,R+4,1,Q,8,G,$,K)}function Wu(){this.ba=new ei,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new zr,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function Gh(){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 $h(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function tp(){this.ua=0,this.Wa=new V,this.vb=new V,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new U,this.yc=new S}function Qv(){this.xb=this.a=0,this.l=new Ol,this.ca=new ei,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new M,this.Pb=0,this.wd=new M,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new tp,this.ab=0,this.gc=o(4,$h),this.Oc=0}function zu(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ol,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Hi(p,_,b,R,Q,G,$){for(p=p==null?0:p[_+0],_=0;_<$;++_)Q[G+_]=p+b[R+_]&255,p=Q[G+_]}function Yu(p,_,b,R,Q,G,$){var K;if(p==null)Hi(null,null,b,R,Q,G,$);else for(K=0;K<$;++K)Q[G+K]=p[_+K]+b[R+K]&255}function qs(p,_,b,R,Q,G,$){if(p==null)Hi(null,null,b,R,Q,G,$);else{var K,z=p[_+0],et=z,mt=z;for(K=0;K<$;++K)et=mt+(z=p[_+K])-et,mt=b[R+K]+(-256&et?0>et?0:255:et)&255,et=z,Q[G+K]=mt}}function UA(p,_,b,R){var Q=_.width,G=_.o;if(e(p!=null&&_!=null),0>b||0>=R||b+R>G)return null;if(!p.Cc){if(p.ga==null){var $;if(p.ga=new zu,($=p.ga==null)||($=_.width*_.o,e(p.Gb.length==0),p.Gb=a($),p.Uc=0,p.Gb==null?$=0:(p.mb=p.Gb,p.nb=p.Uc,p.rc=null,$=1),$=!$),!$){$=p.ga;var K=p.Fa,z=p.P,et=p.qc,mt=p.mb,Lt=p.nb,Ot=z+1,St=et-1,Vt=$.l;if(e(K!=null&&mt!=null&&_!=null),is[0]=null,is[1]=Hi,is[2]=Yu,is[3]=qs,$.ca=mt,$.tb=Lt,$.c=_.width,$.i=_.height,e(0<$.c&&0<$.i),1>=et)_=0;else if($.$a=K[z+0]>>0&3,$.Z=K[z+0]>>2&3,$.Lc=K[z+0]>>4&3,z=K[z+0]>>6&3,0>$.$a||1<$.$a||4<=$.Z||1<$.Lc||z)_=0;else if(Vt.put=fi,Vt.ac=yn,Vt.bc=di,Vt.ma=$,Vt.width=_.width,Vt.height=_.height,Vt.Da=_.Da,Vt.v=_.v,Vt.va=_.va,Vt.j=_.j,Vt.o=_.o,$.$a)t:{e($.$a==1),_=Lr();e:for(;;){if(_==null){_=0;break t}if(e($!=null),$.mc=_,_.c=$.c,_.i=$.i,_.l=$.l,_.l.ma=$,_.l.width=$.c,_.l.height=$.i,_.a=0,nt(_.m,K,Ot,St),!hn($.c,$.i,1,_,null)||(_.ab==1&&_.gc[0].hc==3&&de(_.s)?($.ic=1,K=_.c*_.i,_.Ta=null,_.Ua=0,_.V=a(K),_.Ba=0,_.V==null?(_.a=1,_=0):_=1):($.ic=0,_=fn(_,$.c)),!_))break e;_=1;break t}$.mc=null,_=0}else _=St>=$.c*$.i;$=!_}if($)return null;p.ga.Lc!=1?p.Ga=0:R=G-b}e(p.ga!=null),e(b+R<=G);t:{if(_=(K=p.ga).c,G=K.l.o,K.$a==0){if(Ot=p.rc,St=p.Vc,Vt=p.Fa,z=p.P+1+b*_,et=p.mb,mt=p.nb+b*_,e(z<=p.P+p.qc),K.Z!=0)for(e(is[K.Z]!=null),$=0;$<R;++$)is[K.Z](Ot,St,Vt,z,et,mt,_),Ot=et,St=mt,mt+=_,z+=_;else for($=0;$<R;++$)n(et,mt,Vt,z,_),Ot=et,St=mt,mt+=_,z+=_;p.rc=Ot,p.Vc=St}else{if(e(K.mc!=null),_=b+R,e(($=K.mc)!=null),e(_<=$.i),$.C>=_)_=1;else if(K.ic||xt(),K.ic){K=$.V,Ot=$.Ba,St=$.c;var Pt=$.i,wt=(Vt=1,z=$.$/St,et=$.$%St,mt=$.m,Lt=$.s,$.$),bt=St*Pt,Ht=St*_,jt=Lt.wc,Gt=wt<Ht?Br(Lt,et,z):null;e(wt<=bt),e(_<=Pt),e(de(Lt));e:for(;;){for(;!mt.h&&wt<Ht;){if(et&jt||(Gt=Br(Lt,et,z)),e(Gt!=null),J(mt),256>(Pt=pi(Gt.G[0],Gt.H[0],mt)))K[Ot+wt]=Pt,++wt,++et>=St&&(et=0,++z<=_&&!(z%16)&&$t($,z));else{if(!(280>Pt)){Vt=0;break e}Pt=ri(Pt-256,mt);var pe,ie=pi(Gt.G[4],Gt.H[4],mt);if(J(mt),!(wt>=(ie=Cn(St,ie=ri(ie,mt)))&&bt-wt>=Pt)){Vt=0;break e}for(pe=0;pe<Pt;++pe)K[Ot+wt+pe]=K[Ot+wt+pe-ie];for(wt+=Pt,et+=Pt;et>=St;)et-=St,++z<=_&&!(z%16)&&$t($,z);wt<Ht&&et&jt&&(Gt=Br(Lt,et,z))}e(mt.h==Y(mt))}$t($,z>_?_:z);break e}!Vt||mt.h&&wt<bt?(Vt=0,$.a=mt.h?5:3):$.$=wt,_=Vt}else _=ne($,$.V,$.Ba,$.c,$.i,_,zo);if(!_){R=0;break t}}b+R>=G&&(p.Cc=1),R=1}if(!R)return null;if(p.Cc&&((R=p.ga)!=null&&(R.mc=null),p.ga=null,0<p.Ga))return alert("todo:WebPDequantizeLevels"),null}return p.nb+b*Q}function E(p,_,b,R,Q,G){for(;0<Q--;){var $,K=p,z=_+(b?1:0),et=p,mt=_+(b?0:3);for($=0;$<R;++$){var Lt=et[mt+4*$];Lt!=255&&(Lt*=32897,K[z+4*$+0]=K[z+4*$+0]*Lt>>23,K[z+4*$+1]=K[z+4*$+1]*Lt>>23,K[z+4*$+2]=K[z+4*$+2]*Lt>>23)}_+=G}}function k(p,_,b,R,Q){for(;0<R--;){var G;for(G=0;G<b;++G){var $=p[_+2*G+0],K=15&(et=p[_+2*G+1]),z=4369*K,et=(240&et|et>>4)*z>>16;p[_+2*G+0]=(240&$|$>>4)*z>>16&240|(15&$|$<<4)*z>>16>>4&15,p[_+2*G+1]=240&et|K}_+=Q}}function st(p,_,b,R,Q,G,$,K){var z,et,mt=255;for(et=0;et<Q;++et){for(z=0;z<R;++z){var Lt=p[_+z];G[$+4*z]=Lt,mt&=Lt}_+=b,$+=K}return mt!=255}function gt(p,_,b,R,Q){var G;for(G=0;G<Q;++G)b[R+G]=p[_+G]>>8}function xt(){GA=E,nc=k,np=st,Is=gt}function Ut(p,_,b){T[p]=function(R,Q,G,$,K,z,et,mt,Lt,Ot,St,Vt,Pt,wt,bt,Ht,jt){var Gt,pe=jt-1>>1,ie=K[z+0]|et[mt+0]<<16,Ge=Lt[Ot+0]|St[Vt+0]<<16;e(R!=null);var le=3*ie+Ge+131074>>2;for(_(R[Q+0],255&le,le>>16,Pt,wt),G!=null&&(le=3*Ge+ie+131074>>2,_(G[$+0],255&le,le>>16,bt,Ht)),Gt=1;Gt<=pe;++Gt){var mr=K[z+Gt]|et[mt+Gt]<<16,Xr=Lt[Ot+Gt]|St[Vt+Gt]<<16,Pr=ie+mr+Ge+Xr+524296,Tr=Pr+2*(mr+Ge)>>3;le=Tr+ie>>1,ie=(Pr=Pr+2*(ie+Xr)>>3)+mr>>1,_(R[Q+2*Gt-1],255&le,le>>16,Pt,wt+(2*Gt-1)*b),_(R[Q+2*Gt-0],255&ie,ie>>16,Pt,wt+(2*Gt-0)*b),G!=null&&(le=Pr+Ge>>1,ie=Tr+Xr>>1,_(G[$+2*Gt-1],255&le,le>>16,bt,Ht+(2*Gt-1)*b),_(G[$+2*Gt+0],255&ie,ie>>16,bt,Ht+(2*Gt+0)*b)),ie=mr,Ge=Xr}1&jt||(le=3*ie+Ge+131074>>2,_(R[Q+jt-1],255&le,le>>16,Pt,wt+(jt-1)*b),G!=null&&(le=3*Ge+ie+131074>>2,_(G[$+jt-1],255&le,le>>16,bt,Ht+(jt-1)*b)))}}function Yt(){So[op]=AN,So[sp]=g_,So[c_]=Kv,So[Ap]=v_,So[lp]=Wv,So[qh]=m_,So[h_]=ob,So[ic]=g_,So[Gv]=v_,So[Zh]=Wv,So[up]=m_}function ce(p){return p&~lN?0>p?0:255:p>>Yv}function De(p,_){return ce((19077*p>>8)+(26149*_>>8)-14234)}function vr(p,_,b){return ce((19077*p>>8)-(6419*_>>8)-(13320*b>>8)+8708)}function ir(p,_){return ce((19077*p>>8)+(33050*_>>8)-17685)}function br(p,_,b,R,Q){R[Q+0]=De(p,b),R[Q+1]=vr(p,_,b),R[Q+2]=ir(p,_)}function Gi(p,_,b,R,Q){R[Q+0]=ir(p,_),R[Q+1]=vr(p,_,b),R[Q+2]=De(p,b)}function Vn(p,_,b,R,Q){var G=vr(p,_,b);_=G<<3&224|ir(p,_)>>3,R[Q+0]=248&De(p,b)|G>>5,R[Q+1]=_}function ni(p,_,b,R,Q){var G=240&ir(p,_)|15;R[Q+0]=240&De(p,b)|vr(p,_,b)>>4,R[Q+1]=G}function ea(p,_,b,R,Q){R[Q+0]=255,br(p,_,b,R,Q+1)}function vi(p,_,b,R,Q){Gi(p,_,b,R,Q),R[Q+3]=255}function Jo(p,_,b,R,Q){br(p,_,b,R,Q),R[Q+3]=255}function ro(p,_){return 0>p?0:p>_?_:p}function bs(p,_,b){T[p]=function(R,Q,G,$,K,z,et,mt,Lt){for(var Ot=mt+(-2&Lt)*b;mt!=Ot;)_(R[Q+0],G[$+0],K[z+0],et,mt),_(R[Q+1],G[$+0],K[z+0],et,mt+b),Q+=2,++$,++z,mt+=2*b;1&Lt&&_(R[Q+0],G[$+0],K[z+0],et,mt)}}function ep(p,_,b){return b==0?p==0?_==0?6:5:_==0?4:0:b}function rp(p,_,b,R,Q){switch(p>>>30){case 3:La(_,b,R,Q,0);break;case 2:rc(_,b,R,Q);break;case 1:rs(_,b,R,Q)}}function ha(p,_){var b,R,Q=_.M,G=_.Nb,$=p.oc,K=p.pc+40,z=p.oc,et=p.pc+584,mt=p.oc,Lt=p.pc+600;for(b=0;16>b;++b)$[K+32*b-1]=129;for(b=0;8>b;++b)z[et+32*b-1]=129,mt[Lt+32*b-1]=129;for(0<Q?$[K-1-32]=z[et-1-32]=mt[Lt-1-32]=129:(i($,K-32-1,127,21),i(z,et-32-1,127,9),i(mt,Lt-32-1,127,9)),R=0;R<p.za;++R){var Ot=_.ya[_.aa+R];if(0<R){for(b=-1;16>b;++b)n($,K+32*b-4,$,K+32*b+12,4);for(b=-1;8>b;++b)n(z,et+32*b-4,z,et+32*b+4,4),n(mt,Lt+32*b-4,mt,Lt+32*b+4,4)}var St=p.Gd,Vt=p.Hd+R,Pt=Ot.ad,wt=Ot.Hc;if(0<Q&&(n($,K-32,St[Vt].y,0,16),n(z,et-32,St[Vt].f,0,8),n(mt,Lt-32,St[Vt].ea,0,8)),Ot.Za){var bt=$,Ht=K-32+16;for(0<Q&&(R>=p.za-1?i(bt,Ht,St[Vt].y[15],4):n(bt,Ht,St[Vt+1].y,0,4)),b=0;4>b;b++)bt[Ht+128+b]=bt[Ht+256+b]=bt[Ht+384+b]=bt[Ht+0+b];for(b=0;16>b;++b,wt<<=2)bt=$,Ht=K+y_[b],ns[Ot.Ob[b]](bt,Ht),rp(wt,Pt,16*+b,bt,Ht)}else if(bt=ep(R,Q,Ot.Ob[0]),$A[bt]($,K),wt!=0)for(b=0;16>b;++b,wt<<=2)rp(wt,Pt,16*+b,$,K+y_[b]);for(b=Ot.Gc,bt=ep(R,Q,Ot.Dd),eA[bt](z,et),eA[bt](mt,Lt),wt=Pt,bt=z,Ht=et,255&(Ot=b>>0)&&(170&Ot?kA(wt,256,bt,Ht):xs(wt,256,bt,Ht)),Ot=mt,wt=Lt,255&(b>>=8)&&(170&b?kA(Pt,320,Ot,wt):xs(Pt,320,Ot,wt)),Q<p.Ub-1&&(n(St[Vt].y,0,$,K+480,16),n(St[Vt].f,0,z,et+224,8),n(St[Vt].ea,0,mt,Lt+224,8)),b=8*G*p.B,St=p.sa,Vt=p.ta+16*R+16*G*p.R,Pt=p.qa,Ot=p.ra+8*R+b,wt=p.Ha,bt=p.Ia+8*R+b,b=0;16>b;++b)n(St,Vt+b*p.R,$,K+32*b,16);for(b=0;8>b;++b)n(Pt,Ot+b*p.B,z,et+32*b,8),n(wt,bt+b*p.B,mt,Lt+32*b,8)}}function Xu(p,_,b,R,Q,G,$,K,z){var et=[0],mt=[0],Lt=0,Ot=z!=null?z.kd:0,St=z??new Gh;if(p==null||12>b)return 7;St.data=p,St.w=_,St.ha=b,_=[_],b=[b],St.gb=[St.gb];t:{var Vt=_,Pt=b,wt=St.gb;if(e(p!=null),e(Pt!=null),e(wt!=null),wt[0]=0,12<=Pt[0]&&!t(p,Vt[0],"RIFF")){if(t(p,Vt[0]+8,"WEBP")){wt=3;break t}var bt=Z(p,Vt[0]+4);if(12>bt||4294967286<bt){wt=3;break t}if(Ot&&bt>Pt[0]-8){wt=7;break t}wt[0]=bt,Vt[0]+=12,Pt[0]-=12}wt=0}if(wt!=0)return wt;for(bt=0<St.gb[0],b=b[0];;){t:{var Ht=p;Pt=_,wt=b;var jt=et,Gt=mt,pe=Vt=[0];if((le=Lt=[Lt])[0]=0,8>wt[0])wt=7;else{if(!t(Ht,Pt[0],"VP8X")){if(Z(Ht,Pt[0]+4)!=10){wt=3;break t}if(18>wt[0]){wt=7;break t}var ie=Z(Ht,Pt[0]+8),Ge=1+j(Ht,Pt[0]+12);if(2147483648<=Ge*(Ht=1+j(Ht,Pt[0]+15))){wt=3;break t}pe!=null&&(pe[0]=ie),jt!=null&&(jt[0]=Ge),Gt!=null&&(Gt[0]=Ht),Pt[0]+=18,wt[0]-=18,le[0]=1}wt=0}}if(Lt=Lt[0],Vt=Vt[0],wt!=0)return wt;if(Pt=!!(2&Vt),!bt&&Lt)return 3;if(G!=null&&(G[0]=!!(16&Vt)),$!=null&&($[0]=Pt),K!=null&&(K[0]=0),$=et[0],Vt=mt[0],Lt&&Pt&&z==null){wt=0;break}if(4>b){wt=7;break}if(bt&&Lt||!bt&&!Lt&&!t(p,_[0],"ALPH")){b=[b],St.na=[St.na],St.P=[St.P],St.Sa=[St.Sa];t:{ie=p,wt=_,bt=b;var le=St.gb;jt=St.na,Gt=St.P,pe=St.Sa,Ge=22,e(ie!=null),e(bt!=null),Ht=wt[0];var mr=bt[0];for(e(jt!=null),e(pe!=null),jt[0]=null,Gt[0]=null,pe[0]=0;;){if(wt[0]=Ht,bt[0]=mr,8>mr){wt=7;break t}var Xr=Z(ie,Ht+4);if(4294967286<Xr){wt=3;break t}var Pr=8+Xr+1&-2;if(Ge+=Pr,0<le&&Ge>le){wt=3;break t}if(!t(ie,Ht,"VP8 ")||!t(ie,Ht,"VP8L")){wt=0;break t}if(mr[0]<Pr){wt=7;break t}t(ie,Ht,"ALPH")||(jt[0]=ie,Gt[0]=Ht+8,pe[0]=Xr),Ht+=Pr,mr-=Pr}}if(b=b[0],St.na=St.na[0],St.P=St.P[0],St.Sa=St.Sa[0],wt!=0)break}b=[b],St.Ja=[St.Ja],St.xa=[St.xa];t:if(le=p,wt=_,bt=b,jt=St.gb[0],Gt=St.Ja,pe=St.xa,ie=wt[0],Ht=!t(le,ie,"VP8 "),Ge=!t(le,ie,"VP8L"),e(le!=null),e(bt!=null),e(Gt!=null),e(pe!=null),8>bt[0])wt=7;else{if(Ht||Ge){if(le=Z(le,ie+4),12<=jt&&le>jt-12){wt=3;break t}if(Ot&&le>bt[0]-8){wt=7;break t}Gt[0]=le,wt[0]+=8,bt[0]-=8,pe[0]=Ge}else pe[0]=5<=bt[0]&&le[ie+0]==47&&!(le[ie+4]>>5),Gt[0]=bt[0];wt=0}if(b=b[0],St.Ja=St.Ja[0],St.xa=St.xa[0],_=_[0],wt!=0)break;if(4294967286<St.Ja)return 3;if(K==null||Pt||(K[0]=St.xa?2:1),$=[$],Vt=[Vt],St.xa){if(5>b){wt=7;break}K=$,Ot=Vt,Pt=G,p==null||5>b?p=0:5<=b&&p[_+0]==47&&!(p[_+4]>>5)?(bt=[0],le=[0],jt=[0],nt(Gt=new M,p,_,b),Ue(Gt,bt,le,jt)?(K!=null&&(K[0]=bt[0]),Ot!=null&&(Ot[0]=le[0]),Pt!=null&&(Pt[0]=jt[0]),p=1):p=0):p=0}else{if(10>b){wt=7;break}K=Vt,p==null||10>b||!Hd(p,_+3,b-3)?p=0:(Ot=p[_+0]|p[_+1]<<8|p[_+2]<<16,Pt=16383&(p[_+7]<<8|p[_+6]),p=16383&(p[_+9]<<8|p[_+8]),1&Ot||3<(Ot>>1&7)||!(Ot>>4&1)||Ot>>5>=St.Ja||!Pt||!p?p=0:($&&($[0]=Pt),K&&(K[0]=p),p=1))}if(!p||($=$[0],Vt=Vt[0],Lt&&(et[0]!=$||mt[0]!=Vt)))return 3;z!=null&&(z[0]=St,z.offset=_-z.w,e(4294967286>_-z.w),e(z.offset==z.ha-b));break}return wt==0||wt==7&&Lt&&z==null?(G!=null&&(G[0]|=St.na!=null&&0<St.na.length),R!=null&&(R[0]=$),Q!=null&&(Q[0]=Vt),0):wt}function Vh(p,_,b){var R=_.width,Q=_.height,G=0,$=0,K=R,z=Q;if(_.Da=p!=null&&0<p.Da,_.Da&&(K=p.cd,z=p.bd,G=p.v,$=p.j,11>b||(G&=-2,$&=-2),0>G||0>$||0>=K||0>=z||G+K>R||$+z>Q))return 0;if(_.v=G,_.j=$,_.va=G+K,_.o=$+z,_.U=K,_.T=z,_.da=p!=null&&0<p.da,_.da){if(!Ft(K,z,b=[p.ib],G=[p.hb]))return 0;_.ib=b[0],_.hb=G[0]}return _.ob=p!=null&&p.ob,_.Kb=p==null||!p.Sd,_.da&&(_.ob=_.ib<3*R/4&&_.hb<3*Q/4,_.Kb=0),1}function jh(p){if(p==null)return 2;if(11>p.S){var _=p.f.RGBA;_.fb+=(p.height-1)*_.A,_.A=-_.A}else _=p.f.kb,p=p.height,_.O+=(p-1)*_.fa,_.fa=-_.fa,_.N+=(p-1>>1)*_.Ab,_.Ab=-_.Ab,_.W+=(p-1>>1)*_.Db,_.Db=-_.Db,_.F!=null&&(_.J+=(p-1)*_.lb,_.lb=-_.lb);return 0}function qu(p,_,b,R){if(R==null||0>=p||0>=_)return 2;if(b!=null){if(b.Da){var Q=b.cd,G=b.bd,$=-2&b.v,K=-2&b.j;if(0>$||0>K||0>=Q||0>=G||$+Q>p||K+G>_)return 2;p=Q,_=G}if(b.da){if(!Ft(p,_,Q=[b.ib],G=[b.hb]))return 2;p=Q[0],_=G[0]}}R.width=p,R.height=_;t:{var z=R.width,et=R.height;if(p=R.S,0>=z||0>=et||!(p>=op&&13>p))p=2;else{if(0>=R.Rd&&R.sd==null){$=G=Q=_=0;var mt=(K=z*__[p])*et;if(11>p||(G=(et+1)/2*(_=(z+1)/2),p==12&&($=(Q=z)*et)),(et=a(mt+2*G+$))==null){p=1;break t}R.sd=et,11>p?((z=R.f.RGBA).eb=et,z.fb=0,z.A=K,z.size=mt):((z=R.f.kb).y=et,z.O=0,z.fa=K,z.Fd=mt,z.f=et,z.N=0+mt,z.Ab=_,z.Cd=G,z.ea=et,z.W=0+mt+G,z.Db=_,z.Ed=G,p==12&&(z.F=et,z.J=0+mt+2*G),z.Tc=$,z.lb=Q)}if(_=1,Q=R.S,G=R.width,$=R.height,Q>=op&&13>Q)if(11>Q)p=R.f.RGBA,_&=(K=Math.abs(p.A))*($-1)+G<=p.size,_&=K>=G*__[Q],_&=p.eb!=null;else{p=R.f.kb,K=(G+1)/2,mt=($+1)/2,z=Math.abs(p.fa),et=Math.abs(p.Ab);var Lt=Math.abs(p.Db),Ot=Math.abs(p.lb),St=Ot*($-1)+G;_&=z*($-1)+G<=p.Fd,_&=et*(mt-1)+K<=p.Cd,_=(_&=Lt*(mt-1)+K<=p.Ed)&z>=G&et>=K&Lt>=K,_&=p.y!=null,_&=p.f!=null,_&=p.ea!=null,Q==12&&(_&=Ot>=G,_&=St<=p.Tc,_&=p.F!=null)}else _=0;p=_?0:2}}return p!=0||b!=null&&b.fd&&(p=jh(R)),p}var fa=64,Pl=[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],Zu=24,Ju=32,Kh=8,Ia=[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];Bt("Predictor0","PredictorAdd0"),T.Predictor0=function(){return 4278190080},T.Predictor1=function(p){return p},T.Predictor2=function(p,_,b){return _[b+0]},T.Predictor3=function(p,_,b){return _[b+1]},T.Predictor4=function(p,_,b){return _[b-1]},T.Predictor5=function(p,_,b){return Rt(Rt(p,_[b+1]),_[b+0])},T.Predictor6=function(p,_,b){return Rt(p,_[b-1])},T.Predictor7=function(p,_,b){return Rt(p,_[b+0])},T.Predictor8=function(p,_,b){return Rt(_[b-1],_[b+0])},T.Predictor9=function(p,_,b){return Rt(_[b+0],_[b+1])},T.Predictor10=function(p,_,b){return Rt(Rt(p,_[b-1]),Rt(_[b+0],_[b+1]))},T.Predictor11=function(p,_,b){var R=_[b+0];return 0>=Wt(R>>24&255,p>>24&255,(_=_[b-1])>>24&255)+Wt(R>>16&255,p>>16&255,_>>16&255)+Wt(R>>8&255,p>>8&255,_>>8&255)+Wt(255&R,255&p,255&_)?R:p},T.Predictor12=function(p,_,b){var R=_[b+0];return(Nt((p>>24&255)+(R>>24&255)-((_=_[b-1])>>24&255))<<24|Nt((p>>16&255)+(R>>16&255)-(_>>16&255))<<16|Nt((p>>8&255)+(R>>8&255)-(_>>8&255))<<8|Nt((255&p)+(255&R)-(255&_)))>>>0},T.Predictor13=function(p,_,b){var R=_[b-1];return(Dt((p=Rt(p,_[b+0]))>>24&255,R>>24&255)<<24|Dt(p>>16&255,R>>16&255)<<16|Dt(p>>8&255,R>>8&255)<<8|Dt(p>>0&255,R>>0&255))>>>0};var kv=T.PredictorAdd0;T.PredictorAdd1=te,Bt("Predictor2","PredictorAdd2"),Bt("Predictor3","PredictorAdd3"),Bt("Predictor4","PredictorAdd4"),Bt("Predictor5","PredictorAdd5"),Bt("Predictor6","PredictorAdd6"),Bt("Predictor7","PredictorAdd7"),Bt("Predictor8","PredictorAdd8"),Bt("Predictor9","PredictorAdd9"),Bt("Predictor10","PredictorAdd10"),Bt("Predictor11","PredictorAdd11"),Bt("Predictor12","PredictorAdd12"),Bt("Predictor13","PredictorAdd13");var Wh=T.PredictorAdd2;fe("ColorIndexInverseTransform","MapARGB","32b",function(p){return p>>8&255},function(p){return p}),fe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(p){return p},function(p){return p>>8&255});var zh,ts=T.ColorIndexInverseTransform,tc=T.MapARGB,Yh=T.VP8LColorIndexInverseTransformAlpha,Hv=T.MapAlpha,DA=T.VP8LPredictorsAdd=[];DA.length=16,(T.VP8LPredictors=[]).length=16,(T.VP8LPredictorsAdd_C=[]).length=16,(T.VP8LPredictors_C=[]).length=16;var Bo,es,QA,Ts,da,ec,Ss,La,rc,kA,rs,xs,HA,Ul,Dl,Zs,Xh,bo,Js,dn,pn,jn,mi,tA,GA,nc,np,Is,o_=a(511),s_=a(2041),A_=a(225),l_=a(767),u_=0,ip=s_,ap=A_,no=l_,To=o_,op=0,sp=1,c_=2,Ap=3,lp=4,qh=5,h_=6,ic=7,Gv=8,Zh=9,up=10,Jh=[2,3,7],$v=[3,3,11],f_=[280,256,256,256,40],YB=[0,1,1,1,0],XB=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],qB=[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],ZB=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],JB=8,Vv=[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],jv=[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],tf=null,tb=[[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]],eb=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],d_=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],rb=[[[[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]]]],nb=[[[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]]],ib=[[[[255,255,255,255,255,255,255,255,255,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]]]],Ql=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],$A=[],ns=[],eA=[],ab=1,p_=2,is=[],So=[];Ut("UpsampleRgbLinePair",br,3),Ut("UpsampleBgrLinePair",Gi,3),Ut("UpsampleRgbaLinePair",Jo,4),Ut("UpsampleBgraLinePair",vi,4),Ut("UpsampleArgbLinePair",ea,4),Ut("UpsampleRgba4444LinePair",ni,2),Ut("UpsampleRgb565LinePair",Vn,2);var AN=T.UpsampleRgbLinePair,Kv=T.UpsampleBgrLinePair,g_=T.UpsampleRgbaLinePair,v_=T.UpsampleBgraLinePair,Wv=T.UpsampleArgbLinePair,m_=T.UpsampleRgba4444LinePair,ob=T.UpsampleRgb565LinePair,rA=16,cp=1<<rA-1,kl=-227,zv=482,Yv=6,lN=(256<<Yv)-1,sb=0,Ab=a(256),lb=a(256),ub=a(256),cb=a(256),hb=a(zv-kl),ef=a(zv-kl);bs("YuvToRgbRow",br,3),bs("YuvToBgrRow",Gi,3),bs("YuvToRgbaRow",Jo,4),bs("YuvToBgraRow",vi,4),bs("YuvToArgbRow",ea,4),bs("YuvToRgba4444Row",ni,2),bs("YuvToRgb565Row",Vn,2);var y_=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Xv=[0,2,8],Hl=[8,7,6,4,4,2,2,2,1,1,1,1],fb=1;this.WebPDecodeRGBA=function(p,_,b,R,Q){var G=sp,$=new Wu,K=new ei;$.ba=K,K.S=G,K.width=[K.width],K.height=[K.height];var z=K.width,et=K.height,mt=new Wr;if(mt==null||p==null)var Lt=2;else e(mt!=null),Lt=Xu(p,_,b,mt.width,mt.height,mt.Pd,mt.Qd,mt.format,null);if(Lt!=0?z=0:(z!=null&&(z[0]=mt.width[0]),et!=null&&(et[0]=mt.height[0]),z=1),z){K.width=K.width[0],K.height=K.height[0],R!=null&&(R[0]=K.width),Q!=null&&(Q[0]=K.height);t:{if(R=new Ol,(Q=new Gh).data=p,Q.w=_,Q.ha=b,Q.kd=1,_=[0],e(Q!=null),((p=Xu(Q.data,Q.w,Q.ha,null,null,null,_,null,Q))==0||p==7)&&_[0]&&(p=4),(_=p)==0){if(e($!=null),R.data=Q.data,R.w=Q.w+Q.offset,R.ha=Q.ha-Q.offset,R.put=fi,R.ac=yn,R.bc=di,R.ma=$,Q.xa){if((p=Lr())==null){$=1;break t}if(function(Ot,St){var Vt=[0],Pt=[0],wt=[0];e:for(;;){if(Ot==null)return 0;if(St==null)return Ot.a=2,0;if(Ot.l=St,Ot.a=0,nt(Ot.m,St.data,St.w,St.ha),!Ue(Ot.m,Vt,Pt,wt)){Ot.a=3;break e}if(Ot.xb=p_,St.width=Vt[0],St.height=Pt[0],!hn(Vt[0],Pt[0],1,Ot,null))break e;return 1}return e(Ot.a!=0),0}(p,R)){if(R=(_=qu(R.width,R.height,$.Oa,$.ba))==0){e:{R=p;r:for(;;){if(R==null){R=0;break e}if(e(R.s.yc!=null),e(R.s.Ya!=null),e(0<R.s.Wb),e((b=R.l)!=null),e((Q=b.ma)!=null),R.xb!=0){if(R.ca=Q.ba,R.tb=Q.tb,e(R.ca!=null),!Vh(Q.Oa,b,Ap)){R.a=2;break r}if(!fn(R,b.width)||b.da)break r;if((b.da||se(R.ca.S))&&xt(),11>R.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),R.ca.f.kb.F!=null&&xt()),R.Pb&&0<R.s.ua&&R.s.vb.X==null&&!ft(R.s.vb,R.s.Wa.Xa)){R.a=1;break r}R.xb=0}if(!ne(R,R.V,R.Ba,R.c,R.i,b.o,eo))break r;Q.Dc=R.Ma,R=1;break e}e(R.a!=0),R=0}R=!R}R&&(_=p.a)}else _=p.a}else{if((p=new Tv)==null){$=1;break t}if(p.Fa=Q.na,p.P=Q.P,p.qc=Q.Sa,Gd(p,R)){if((_=qu(R.width,R.height,$.Oa,$.ba))==0){if(p.Aa=0,b=$.Oa,e((Q=p)!=null),b!=null){if(0<(z=0>(z=b.Md)?0:100<z?255:255*z/100)){for(et=mt=0;4>et;++et)12>(Lt=Q.pb[et]).lc&&(Lt.ia=z*Hl[0>Lt.lc?0:Lt.lc]>>3),mt|=Lt.ia;mt&&(alert("todo:VP8InitRandom"),Q.ia=1)}Q.Ga=b.Id,100<Q.Ga?Q.Ga=100:0>Q.Ga&&(Q.Ga=0)}Sv(p,R)||(_=p.a)}}else _=p.a}_==0&&$.Oa!=null&&$.Oa.fd&&(_=jh($.ba))}$=_}G=$!=0?null:11>G?K.f.RGBA.eb:K.f.kb.y}else G=null;return G};var __=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(T,L){for(var N="",x=0;x<4;x++)N+=String.fromCharCode(T[L++]);return N}function u(T,L){return(T[L+0]<<0|T[L+1]<<8|T[L+2]<<16)>>>0}function c(T,L){return(T[L+0]<<0|T[L+1]<<8|T[L+2]<<16|T[L+3]<<24)>>>0}new A;var h=[0],f=[0],d=[],g=new A,m=r,v=function(T,L){var N={},x=0,S=!1,P=0,U=0;if(N.frames=[],!function(W,Y,H,J){for(var ot=0;ot<J;ot++)if(W[Y+ot]!=H.charCodeAt(ot))return!0;return!1}(T,L,"RIFF",4)){var tt,q;for(c(T,L+=4),L+=8;L<T.length;){var rt=l(T,L),nt=c(T,L+=4);L+=4;var At=nt+(1&nt);switch(rt){case"VP8 ":case"VP8L":N.frames[x]===void 0&&(N.frames[x]={}),(M=N.frames[x]).src_off=S?U:L-8,M.src_size=P+nt+8,x++,S&&(S=!1,P=0,U=0);break;case"VP8X":(M=N.header={}).feature_flags=T[L];var ct=L+4;M.canvas_width=1+u(T,ct),ct+=3,M.canvas_height=1+u(T,ct),ct+=3;break;case"ALPH":S=!0,P=At+8,U=L-8;break;case"ANIM":(M=N.header).bgcolor=c(T,L),ct=L+4,M.loop_count=(tt=T)[(q=ct)+0]<<0|tt[q+1]<<8,ct+=2;break;case"ANMF":var Tt,M;(M=N.frames[x]={}).offset_x=2*u(T,L),L+=3,M.offset_y=2*u(T,L),L+=3,M.width=1+u(T,L),L+=3,M.height=1+u(T,L),L+=3,M.duration=u(T,L),L+=3,Tt=T[L++],M.dispose=1&Tt,M.blend=Tt>>1&1}rt!="ANMF"&&(L+=At)}return N}}(m,0);v.response=m,v.rgbaoutput=!0,v.dataurl=!1;var y=v.header?v.header:null,w=v.frames?v.frames:null;if(y){y.loop_counter=y.loop_count,h=[y.canvas_height],f=[y.canvas_width];for(var C=0;C<w.length&&w[C].blend!=0;C++);}var O=w[0],F=g.WebPDecodeRGBA(m,O.src_off,O.src_size,f,h);O.rgba=F,O.imgwidth=f[0],O.imgheight=h[0];for(var I=0;I<f[0]*h[0]*4;I++)d[I]=F[I];return this.width=f,this.height=h,this.data=d,this}(function(r){var e=function(){return typeof dI=="function"},t=function(h,f,d,g){var m=4,v=o;switch(g){case r.image_compression.FAST:m=1,v=a;break;case r.image_compression.MEDIUM:m=6,v=s;break;case r.image_compression.SLOW:m=9,v=A}h=n(h,f,d,v);var y=dI(h,{level:m});return r.__addimage__.arrayBufferToBinaryString(y)},n=function(h,f,d,g){for(var m,v,y,w=h.length/f,C=new Uint8Array(h.length+w),O=u(),F=0;F<w;F+=1){if(y=F*f,m=h.subarray(y,y+f),g)C.set(g(m,d,v),y+F);else{for(var I,T=O.length,L=[];I<T;I+=1)L[I]=O[I](m,d,v);var N=c(L.concat());C.set(L[N],y+F)}v=m}return C},i=function(h){var f=Array.apply([],h);return f.unshift(0),f},a=function(h,f){var d,g=[],m=h.length;g[0]=1;for(var v=0;v<m;v+=1)d=h[v-f]||0,g[v+1]=h[v]-d+256&255;return g},o=function(h,f,d){var g,m=[],v=h.length;m[0]=2;for(var y=0;y<v;y+=1)g=d&&d[y]||0,m[y+1]=h[y]-g+256&255;return m},s=function(h,f,d){var g,m,v=[],y=h.length;v[0]=3;for(var w=0;w<y;w+=1)g=h[w-f]||0,m=d&&d[w]||0,v[w+1]=h[w]+256-(g+m>>>1)&255;return v},A=function(h,f,d){var g,m,v,y,w=[],C=h.length;w[0]=4;for(var O=0;O<C;O+=1)g=h[O-f]||0,m=d&&d[O]||0,v=d&&d[O-f]||0,y=l(g,m,v),w[O+1]=h[O]-y+256&255;return w},l=function(h,f,d){if(h===f&&f===d)return h;var g=Math.abs(f-d),m=Math.abs(h-d),v=Math.abs(h+f-d-d);return g<=m&&g<=v?h:m<=v?f:d},u=function(){return[i,a,o,s,A]},c=function(h){var f=h.map(function(d){return d.reduce(function(g,m){return g+Math.abs(m)},0)});return f.indexOf(Math.min.apply(null,f))};r.processPNG=function(h,f,d,g){var m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt=this.decode.FLATE_DECODE,q="";if(this.__addimage__.isArrayBuffer(h)&&(h=new Uint8Array(h)),this.__addimage__.isArrayBufferView(h)){if(h=(y=new Mut(h)).imgData,v=y.bits,m=y.colorSpace,C=y.colors,[4,6].indexOf(y.colorType)!==-1){if(y.bits===8){T=(I=y.pixelBitlength==32?new Uint32Array(y.decodePixels().buffer):y.pixelBitlength==16?new Uint16Array(y.decodePixels().buffer):new Uint8Array(y.decodePixels().buffer)).length,N=new Uint8Array(T*y.colors),L=new Uint8Array(T);var rt,nt=y.pixelBitlength-y.bits;for(P=0,U=0;P<T;P++){for(S=I[P],rt=0;rt<nt;)N[U++]=S>>>rt&255,rt+=y.bits;L[P]=S>>>rt&255}}if(y.bits===16){T=(I=new Uint32Array(y.decodePixels().buffer)).length,N=new Uint8Array(T*(32/y.pixelBitlength)*y.colors),L=new Uint8Array(T*(32/y.pixelBitlength)),x=y.colors>1,P=0,U=0;for(var At=0;P<T;)S=I[P++],N[U++]=S>>>0&255,x&&(N[U++]=S>>>16&255,S=I[P++],N[U++]=S>>>0&255),L[At++]=S>>>16&255;v=8}g!==r.image_compression.NONE&&e()?(h=t(N,y.width*y.colors,y.colors,g),F=t(L,y.width,1,g)):(h=N,F=L,tt=void 0)}if(y.colorType===3&&(m=this.color_spaces.INDEXED,O=y.palette,y.transparency.indexed)){var ct=y.transparency.indexed,Tt=0;for(P=0,T=ct.length;P<T;++P)Tt+=ct[P];if((Tt/=255)===T-1&&ct.indexOf(0)!==-1)w=[ct.indexOf(0)];else if(Tt!==T){for(I=y.decodePixels(),L=new Uint8Array(I.length),P=0,T=I.length;P<T;P++)L[P]=ct[I[P]];F=t(L,y.width,1)}}var M=function(W){var Y;switch(W){case r.image_compression.FAST:Y=11;break;case r.image_compression.MEDIUM:Y=13;break;case r.image_compression.SLOW:Y=14;break;default:Y=12}return Y}(g);return tt===this.decode.FLATE_DECODE&&(q="/Predictor "+M+" "),q+="/Colors "+C+" /BitsPerComponent "+v+" /Columns "+y.width,(this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),(F&&this.__addimage__.isArrayBuffer(F)||this.__addimage__.isArrayBufferView(F))&&(F=this.__addimage__.arrayBufferToBinaryString(F)),{alias:d,data:h,index:f,filter:tt,decodeParameters:q,transparency:w,palette:O,sMask:F,predictor:M,width:y.width,height:y.height,bitsPerComponent:v,colorSpace:m}}}})(Ke.API),function(r){r.processGIF89A=function(e,t,n,i){var a=new Nut(e),o=a.width,s=a.height,A=[];a.decodeAndBlitFrameRGBA(0,A);var l={data:A,width:o,height:s},u=new hT(100).encode(l,100);return r.processJPEG.call(this,u,t,n,i)},r.processGIF87A=r.processGIF89A}(Ke.API),aA.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)},aA.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){Bn.log("bit decode error:"+t)}},aA.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)}},aA.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)}},aA.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)}},aA.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}},aA.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}},aA.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}},aA.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}},aA.prototype.getData=function(){return this.data},function(r){r.processBMP=function(e,t,n,i){var a=new aA(e,!1),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new hT(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(Ke.API),j5.prototype.getData=function(){return this.data},function(r){r.processWEBP=function(e,t,n,i){var a=new j5(e),o=a.width,s=a.height,A={data:a.getData(),width:o,height:s},l=new hT(100).encode(A,100);return r.processJPEG.call(this,l,t,n,i)}}(Ke.API),Ke.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 d=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:d,index:e,alias:t,colorSpace:"DeviceRGB",bitsPerComponent:8,width:r.width,height:r.height}},Ke.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},yp=Ke.API,a1=yp.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,d=0,g=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&&mn(l[n])==="object"&&!isNaN(parseInt(l[n][d],10))?l[n][d]/u:0,m.push((s[n]||g)/A+h)),d=n;return m},H5=yp.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 yp.processArabic&&(r=yp.processArabic(r)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(r,t,i)/t:a1.apply(this,arguments).reduce(function(a,o){return a+o},0)},G5=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},$5=function(r,e,t){t||(t={});var n,i,a,o,s,A,l,u=[],c=[u],h=t.textIndent||0,f=0,d=0,g=r.split(" "),m=a1.apply(this,[" ",t])[0];if(A=t.lineIndent===-1?g[0].length+2:t.lineIndent||0){var v=Array(A).join(" "),y=[];g.map(function(C){(C=C.split(/\s*\n/)).length>1?y=y.concat(C.map(function(O,F){return(F&&O.length?`
`:"")+O})):y.push(C[0])}),g=y,A=H5.apply(this,[v,t])}for(a=0,o=g.length;a<o;a++){var w=0;if(n=g[a],A&&n[0]==`
`&&(n=n.substr(1),w=1),h+f+(d=(i=a1.apply(this,[n,t])).reduce(function(C,O){return C+O},0))>e||w){if(d>e){for(s=G5.apply(this,[n,i,e-(h+f),e]),u.push(s.shift()),u=[s.pop()];s.length;)c.push([s.shift()]);d=i.slice(n.length-(u[0]?u[0].length:0)).reduce(function(C,O){return C+O},0)}else u=[n];c.push(u),h=d+A,f=m}else u.push(n),h+=f+d,f=m}return l=A?function(C,O){return(O?v:"")+C.join(" ")}:function(C){return C.join(" ")},c.map(l)},yp.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($5.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,d,g,m=["{"];for(var v in c){if(h=c[v],isNaN(parseInt(v,10))?f="'"+v+"'":(v=parseInt(v,10),f=(f=a(v).slice(2)).slice(0,-1)+n[f.slice(-1)]),typeof h=="number")h<0?(d=a(h).slice(3),g="-"):(d=a(h).slice(2),g=""),d=g+d.slice(0,-1)+n[d.slice(-1)];else{if(mn(h)!=="object")throw new Error("Don't know what to do with value type "+mn(h)+".");d=o(h)}m.push(f+d)}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,d,g,m={},v=1,y=m,w=[],C="",O="",F=c.length-1,I=1;I<F;I+=1)(g=c[I])=="'"?h?(d=h.join(""),h=void 0):h=[]:h?h.push(g):g=="{"?(w.push([y,d]),y={},d=void 0):g=="}"?((f=w.pop())[0][f[1]]=y,d=void 0,y=f[0]):g=="-"?v=-1:d===void 0?t.hasOwnProperty(g)?(C+=t[g],d=parseInt(C,16)*v,v=1,C=""):C+=g:t.hasOwnProperty(g)?(O+=t[g],y[d]=parseInt(O,16)*v,v=1,d=void 0,O=""):O+=g;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 d=l.Unicode[h.postScriptName];d&&(h.metadata.Unicode.encoding=d,h.encoding=d.codePages[0])}])}(Ke.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(sy(s)),o.metadata=r.API.TTFFont.open(s),o.metadata.Unicode=o.metadata.Unicode||{encoding:{},kerning:{},widths:[]},o.metadata.glyIdsUsed=[0]})(i,n)}}])}(Ke),function(r){function e(){return(Ye.canvg?Promise.resolve(Ye.canvg):Promise.resolve().then(function(){return FMt})).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t})}Ke.API.addSvgAsImage=function(t,n,i,a,o,s,A,l){if(isNaN(n)||isNaN(i))throw Bn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(o))throw Bn.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(d){return d.fromString(c,t,h)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(d){return d.render(h)}).then(function(){f.addImage(u.toDataURL("image/jpeg",1),n,i,a,o,A,l)})}}(),Ke.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},Ke.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(d,g){var m,v=!1;for(m=0;m<d.length;m+=1)d[m]===g&&(v=!0);return v}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(mn(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 d,g=[];for(d in t)t[d].explicitSet===!0&&(t[d].type==="name"?g.push("/"+d+" /"+t[d].value):g.push("/"+d+" "+t[d].value));g.length!==0&&this.internal.write(`/ViewerPreferences
<<
`+g.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}}(Ke.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,d){return f-d})).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="",d=0;d<h.length;d++)f+=String.fromCharCode(h[d]);var g=l();u({data:f,addLength1:!0,objectId:g}),A("endobj");var m=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:m}),A("endobj");var v=l();A("<<"),A("/Type /FontDescriptor"),A("/FontName /"+Hp(s.fontName)),A("/FontFile2 "+g+" 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 y=l();A("<<"),A("/Type /Font"),A("/BaseFont /"+Hp(s.fontName)),A("/FontDescriptor "+v+" 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 /"+Hp(s.fontName)),A("/Encoding /"+s.encoding),A("/DescendantFonts ["+y+" 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 d=l();u({data:h,addLength1:!0,objectId:d}),A("endobj");var g=l();u({data:n(s.metadata.toUnicode),addLength1:!0,objectId:g}),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 "+d+" 0 R"),A("/Flags 96"),A("/FontBBox "+r.API.PDFObject.convert(s.metadata.bbox)),A("/FontName /"+Hp(s.fontName)),A("/ItalicAngle "+s.metadata.italicAngle),A("/Ascent "+s.metadata.ascender),A(">>"),A("endobj"),s.objectNumber=l();for(var v=0;v<s.metadata.hmtx.widths.length;v++)s.metadata.hmtx.widths[v]=parseInt(s.metadata.hmtx.widths[v]*(1e3/s.metadata.head.unitsPerEm));A("<</Subtype/TrueType/Type/Font/ToUnicode "+g+" 0 R/BaseFont/"+Hp(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,d=c.fonts,g=f,m="",v=0,y="",w=d[g].encoding;if(d[g].encoding!=="Identity-H")return{text:s,x:A,y:l,options:u,mutex:c};for(y=s,g=f,Array.isArray(s)&&(y=s[0]),v=0;v<y.length;v+=1)d[g].metadata.hasOwnProperty("cmap")&&(o=d[g].metadata.cmap.unicode.codeMap[y[v].charCodeAt(0)]),o||y[v].charCodeAt(0)<256&&d[g].metadata.hasOwnProperty("Unicode")?m+=y[v]:m+="";var C="";return parseInt(g.slice(1))<14||w==="WinAnsiEncoding"?C=h(m,g).split("").map(function(O){return O.charCodeAt(0).toString(16)}).join(""):w==="Identity-H"&&(C=t(m,d[g])),c.isHex=!0,{text:C,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}])}(Ke),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}}(Ke.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]],d={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},g={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},m=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","","","","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],v=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)$/),y=!1,w=0;this.__bidiEngine__={};var C=function(x){var S=x.charCodeAt(),P=S>>8,U=g[P];return U!==void 0?c[256*U+(255&S)]:P===252||P===253?"AL":v.test(P)?"L":P===8?"R":"N"},O=function(x){for(var S,P=0;P<x.length;P++){if((S=C(x.charAt(P)))==="L")return!1;if(S==="R")return!0}return!1},F=function(x,S,P,U){var tt,q,rt,nt,At=S[U];switch(At){case"L":case"R":y=!1;break;case"N":case"AN":break;case"EN":y&&(At="AN");break;case"AL":y=!0,At="R";break;case"WS":At="N";break;case"CS":U<1||U+1>=S.length||(tt=P[U-1])!=="EN"&&tt!=="AN"||(q=S[U+1])!=="EN"&&q!=="AN"?At="N":y&&(q="AN"),At=q===tt?q:"N";break;case"ES":At=(tt=U>0?P[U-1]:"B")==="EN"&&U+1<S.length&&S[U+1]==="EN"?"EN":"N";break;case"ET":if(U>0&&P[U-1]==="EN"){At="EN";break}if(y){At="N";break}for(rt=U+1,nt=S.length;rt<nt&&S[rt]==="ET";)rt++;At=rt<nt&&S[rt]==="EN"?"EN":"N";break;case"NSM":if(o&&!s){for(nt=S.length,rt=U+1;rt<nt&&S[rt]==="NSM";)rt++;if(rt<nt){var ct=x[U],Tt=ct>=1425&&ct<=2303||ct===64286;if(tt=S[rt],Tt&&(tt==="R"||tt==="AL")){At="R";break}}}At=U<1||(tt=S[U-1])==="B"?"N":P[U-1];break;case"B":y=!1,i=!0,At=w;break;case"S":a=!0,At="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":y=!1;break;case"BN":At="N"}return At},I=function(x,S,P){var U=x.split("");return P&&T(U,P,{hiLevel:w}),U.reverse(),S&&S.reverse(),U.join("")},T=function(x,S,P){var U,tt,q,rt,nt,At=-1,ct=x.length,Tt=0,M=[],W=w?f:h,Y=[];for(y=!1,i=!1,a=!1,tt=0;tt<ct;tt++)Y[tt]=C(x[tt]);for(q=0;q<ct;q++){if(nt=Tt,M[q]=F(x,Y,M,q),U=240&(Tt=W[nt][d[M[q]]]),Tt&=15,S[q]=rt=W[Tt][5],U>0)if(U===16){for(tt=At;tt<q;tt++)S[tt]=1;At=-1}else At=-1;if(W[Tt][6])At===-1&&(At=q);else if(At>-1){for(tt=At;tt<q;tt++)S[tt]=rt;At=-1}Y[q]==="B"&&(S[q]=0),P.hiLevel|=rt}a&&function(H,J,ot){for(var ut=0;ut<ot;ut++)if(H[ut]==="S"){J[ut]=w;for(var X=ut-1;X>=0&&H[X]==="WS";X--)J[X]=w}}(Y,S,ct)},L=function(x,S,P,U,tt){if(!(tt.hiLevel<x)){if(x===1&&w===1&&!i)return S.reverse(),void(P&&P.reverse());for(var q,rt,nt,At,ct=S.length,Tt=0;Tt<ct;){if(U[Tt]>=x){for(nt=Tt+1;nt<ct&&U[nt]>=x;)nt++;for(At=Tt,rt=nt-1;At<rt;At++,rt--)q=S[At],S[At]=S[rt],S[rt]=q,P&&(q=P[At],P[At]=P[rt],P[rt]=q);Tt=nt}Tt++}}},N=function(x,S,P){var U=x.split(""),tt={hiLevel:w};return P||(P=[]),T(U,P,tt),function(q,rt,nt){if(nt.hiLevel!==0&&u)for(var At,ct=0;ct<q.length;ct++)rt[ct]===1&&(At=m.indexOf(q[ct]))>=0&&(q[ct]=m[At+1])}(U,P,tt),L(2,U,S,P,tt),L(1,U,S,P,tt),U.join("")};return this.__bidiEngine__.doBidiReorder=function(x,S,P){if(function(tt,q){if(q)for(var rt=0;rt<tt.length;rt++)q[rt]=rt;s===void 0&&(s=O(tt)),l===void 0&&(l=O(tt))}(x,S),o||!A||l)if(o&&A&&s^l)w=s?1:0,x=I(x,S,P);else if(!o&&A&&l)w=s?1:0,x=N(x,S,P),x=I(x,S);else if(!o||s||A||l){if(o&&!A&&s^l)x=I(x,S),s?(w=0,x=N(x,S,P)):(w=1,x=N(x,S,P),x=I(x,S));else if(o&&s&&!A&&l)w=1,x=N(x,S,P),x=I(x,S);else if(!o&&!A&&s^l){var U=u;s?(w=1,x=N(x,S,P),w=0,u=!1,x=N(x,S,P),u=U):(w=0,x=N(x,S,P),x=I(x,S),w=1,u=!1,x=N(x,S,P),u=U,x=I(x,S))}}else w=0,x=N(x,S,P);else w=s?1:0,x=N(x,S,P);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})}])}(Ke),Ke.API.TTFFont=function(){function r(e){var t;if(this.rawData=e,t=this.contents=new gh(e),this.contents.pos=4,t.readString(4)==="ttcf")throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new Xut(this),this.registerTTF()}return r.open=function(e){return new r(e)},r.prototype.parse=function(){return this.directory=new Put(this.contents),this.head=new Dut(this),this.name=new $ut(this),this.cmap=new BG(this),this.toUnicode={},this.hhea=new Qut(this),this.maxp=new Vut(this),this.hmtx=new jut(this),this.post=new Hut(this),this.os2=new kut(this),this.loca=new Yut(this),this.glyf=new Kut(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 SA,gh=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}(),Put=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,d,g;for(g 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 gh).writeInt(this.scalarType),i.writeShort(f),i.writeShort(c),i.writeShort(o),i.writeShort(u),a=16*f,l=i.pos+a,s=null,d=[],t)for(h=t[g],i.writeString(g),i.writeInt(r(h)),i.writeInt(l),i.writeInt(h.length),d=d.concat(h),g==="head"&&(s=l),l+=h.length;l%4;)d.push(0),l++;return i.write(d),n=2981146554-r(i.data),i.pos=s+8,i.writeUInt32(n),i.data},r=function(t){var n,i,a,o;for(t=bG.call(t);t.length%4;)t.push(0);for(a=new gh(t),i=0,n=0,o=t.length;n<o;n=n+=4)i+=a.readUInt32();return 4294967295&i},e}(),Uut={}.hasOwnProperty,El=function(r,e){for(var t in e)Uut.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};SA=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 Dut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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 gh).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}(),K5=function(){function r(e,t){var n,i,a,o,s,A,l,u,c,h,f,d,g,m,v,y,w;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 C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),e.pos+=2,g=function(){var C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),l=function(){var C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),u=function(){var C,O;for(O=[],A=C=0;0<=h?C<h:C>h;A=0<=h?++C:--C)O.push(e.readUInt16());return O}(),i=(this.length-e.pos+this.offset)/2,s=function(){var C,O;for(O=[],A=C=0;0<=i?C<i:C>i;A=0<=i?++C:--C)O.push(e.readUInt16());return O}(),A=v=0,w=a.length;v<w;A=++v)for(m=a[A],n=y=d=g[A];d<=m?y<=m:y>=m;n=d<=m?++y:--y)u[A]===0?o=n+l[A]:(o=s[u[A]/2+(n-d)-(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,d,g,m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct,Tt,M,W,Y,H,J,ot,ut,X,It,at,j;switch(U=new gh,o=Object.keys(e).sort(function(Z,ft){return Z-ft}),t){case"macroman":for(g=0,m=function(){var Z=[];for(d=0;d<256;++d)Z.push(0);return Z}(),y={0:0},a={},tt=0,At=o.length;tt<At;tt++)y[X=e[i=o[tt]]]==null&&(y[X]=++g),a[i]={old:e[i],new:y[e[i]]},m[i]=y[e[i]];return U.writeUInt16(1),U.writeUInt16(0),U.writeUInt32(12),U.writeUInt16(0),U.writeUInt16(262),U.writeUInt16(0),U.write(m),{charMap:a,subtable:U.data,maxGlyphID:g+1};case"unicode":for(S=[],c=[],w=0,y={},n={},v=l=null,q=0,ct=o.length;q<ct;q++)y[O=e[i=o[q]]]==null&&(y[O]=++w),n[i]={old:O,new:y[O]},s=y[O]-i,v!=null&&s===l||(v&&c.push(v),S.push(i),l=s),v=i;for(v&&c.push(v),c.push(65535),S.push(65535),N=2*(L=S.length),T=2*Math.pow(Math.log(L)/Math.LN2,2),h=Math.log(T/2)/Math.LN2,I=2*L-T,A=[],F=[],f=[],d=rt=0,Tt=S.length;rt<Tt;d=++rt){if(x=S[d],u=c[d],x===65535){A.push(0),F.push(0);break}if(x-(P=n[x].new)>=32768)for(A.push(0),F.push(2*(f.length+L-d)),i=nt=x;x<=u?nt<=u:nt>=u;i=x<=u?++nt:--nt)f.push(n[i].new);else A.push(P-x),F.push(0)}for(U.writeUInt16(3),U.writeUInt16(1),U.writeUInt32(12),U.writeUInt16(4),U.writeUInt16(16+8*L+2*f.length),U.writeUInt16(0),U.writeUInt16(N),U.writeUInt16(T),U.writeUInt16(h),U.writeUInt16(I),ot=0,M=c.length;ot<M;ot++)i=c[ot],U.writeUInt16(i);for(U.writeUInt16(0),ut=0,W=S.length;ut<W;ut++)i=S[ut],U.writeUInt16(i);for(It=0,Y=A.length;It<Y;It++)s=A[It],U.writeUInt16(s);for(at=0,H=F.length;at<H;at++)C=F[at],U.writeUInt16(C);for(j=0,J=f.length;j<J;j++)g=f[j],U.writeUInt16(g);return{charMap:n,subtable:U.data,maxGlyphID:w+1}}},r}(),BG=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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 K5(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=K5.encode(t,n),(a=new gh).writeUInt16(0),a.writeUInt16(1),i.table=a.data.concat(i.subtable),i},e}(),Qut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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}(),kut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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}(),Hut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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}(),Gut=function(r,e){this.raw=r,this.length=r.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},$ut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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 Gut(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}(),Vut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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}(),jut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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}(),bG=[].slice,Kut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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 gh(n.read(a))).readShort(),u=A.readShort(),h=A.readShort(),l=A.readShort(),c=A.readShort(),this.cache[t]=s===-1?new zut(A,u,h,l,c):new Wut(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}(),Wut=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}(),zut=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 gh(bG.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},r}(),Yut=function(r){function e(){return e.__super__.constructor.apply(this,arguments)}return El(e,SA),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}(),Xut=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,d,g,m,v;for(i in n=BG.encode(this.generateCmap(),"unicode"),o=this.glyphsFor(e),f={0:0},v=n.charMap)f[(A=v[i]).old]=A.new;for(d in h=n.maxGlyphID,o)d in f||(f[d]=h++);return u=function(y){var w,C;for(w in C={},y)C[y[w]]=w;return C}(f),c=Object.keys(u).sort(function(y,w){return y-w}),g=function(){var y,w,C;for(C=[],y=0,w=c.length;y<w;y++)s=c[y],C.push(u[s]);return C}(),a=this.font.glyf.encode(o,g,f),l=this.font.loca.encode(a.offsets,g),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}();Ke.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 qut={name:"ol-control-printdialog",setup(r,e){const{control:t}=Xi(Qn,r,e);return t.value.on(["print","error"],function(n){if(n.image)if(n.pdf){var i=new Ke({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/","");AR.exports.saveAs(a,o)},n.imageType,n.quality);else console.warn("No canvas to export")}),{control:t}},props:{lang:{type:String}}};function Zut(r,e,t,n,i,a){return Mr("",!0)}var wI=me(qut,[["render",Zut]]),Od=function(r){r||(r={});var e=yt.create("DIV",{className:(r.className||"ol-videorec")+" ol-unselectable ol-control"});yt.create("BUTTON",{type:"button",className:"ol-start",title:"start",click:function(){this.start()}.bind(this),parent:e}),yt.create("BUTTON",{type:"button",className:"ol-stop",title:"stop",click:function(){this.stop()}.bind(this),parent:e}),yt.create("BUTTON",{type:"button",className:"ol-pause",title:"pause",click:function(){this.pause()}.bind(this),parent:e}),yt.create("BUTTON",{type:"button",className:"ol-resume",title:"resume",click:function(){this.resume()}.bind(this),parent:e}),Nr.call(this,{element:e,target:r.target}),this.set("framerate",30),this.set("videoBitsPerSecond",5e6),r.videoTarget==="DIALOG"?(this._dialog=new Za({className:"ol-fullscreen-dialog",target:document.body,closeBox:!0}),this._videoTarget=this._dialog.getContentElement()):this._videoTarget=r.videoTarget,this._printCtrl=new Bh({target:yt.create("DIV")})};Qr(Od,Nr);Od.prototype.setMap=function(r){this.getMap()&&(this.getMap().removeControl(this._printCtrl),this._dialog&&this.getMap().removeControl(this._dialog)),Nr.prototype.setMap.call(this,r),this.getMap()&&(this.getMap().addControl(this._printCtrl),this._dialog&&this.getMap().addControl(this._dialog))};Od.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=yt.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))};Od.prototype.stop=function(){this._mediaRecorder&&(this._mediaRecorder.stop(),this._mediaRecorder=null,this.element.setAttribute("data-state","inactive"))};Od.prototype.pause=function(){this._mediaRecorder&&(this._mediaRecorder.pause(),this.element.setAttribute("data-state","pause"))};Od.prototype.resume=function(){this._mediaRecorder&&(this._mediaRecorder.resume(),this.element.setAttribute("data-state","rec"))};const Jut={name:"ol-control-videorecorder",emits:["start","stop"],setup(r,e){const{control:t}=Xi(Od,r,e),{downloadName:n}=nh(r);return t.value.on("start",i=>{e.emit("start",i)}),t.value.on("stop",i=>{e.emit("stop",i),AR.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 tct(r,e,t,n,i,a){return Mr("",!0)}var EI=me(Jut,[["render",tct]]),Hc={IMAGE:"image",HYBRID:"hybrid",VECTOR:"vector"},ect=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rct={image:[Er.POLYGON,Er.CIRCLE,Er.LINE_STRING,Er.IMAGE,Er.TEXT],hybrid:[Er.POLYGON,Er.LINE_STRING],vector:[]},nct={hybrid:[Er.IMAGE,Er.TEXT,Er.DEFAULT],vector:[Er.POLYGON,Er.CIRCLE,Er.LINE_STRING,Er.IMAGE,Er.TEXT,Er.DEFAULT]},ict=function(r){ect(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_=Si(),n}return e.prototype.prepareTile=function(t,n,i){var a,o=t.getState();return(o===Te.LOADED||o===Te.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[In.ANIMATING]||h[In.INTERACTING]);(f||!c.wantedResolution)&&(c.wantedResolution=A);var d=this.prepareTile(c,o,l);return d&&(f||Date.now()-a.time<8)&&u.getRenderMode()!==Hc.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()===Hc.VECTOR?Ee(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),d=f.getTileCoordExtent(t.wrappedTileCoord),g=u.getSourceTiles(n,i,t),m=Ee(a);delete t.hitDetectionImageData[m],t.executorGroups[m]=[],c&&(t.declutterExecutorGroups[m]=[]);for(var v=function(O,F){var I=g[O];if(I.getState()!=Te.LOADED)return"continue";var T=I.tileCoord,L=h.getTileCoordExtent(T),N=Qs(d,L),x=_o(N,a.getRenderBuffer()*A,y.tmpExtent),S=gl(L,N)?null:x;l.dirty=!1;var P=new Jw(0,x,A,n),U=c?new Jw(0,N,A,n):void 0,tt=$8(A,n),q=function(H){var J,ot=H.getStyleFunction()||a.getStyleFunction();if(ot&&(J=ot(H,A)),J){var ut=this.renderFeature(H,tt,J,P,U);this.dirty_=this.dirty_||ut,l.dirty=l.dirty||ut}},rt=I.getFeatures();s&&s!==l.renderedRenderOrder&&rt.sort(s);for(var nt=0,At=rt.length;nt<At;++nt){var ct=rt[nt];(!S||Xn(S,ct.getGeometry().getExtent()))&&q.call(y,ct)}var Tt=P.finish(),M=a.getRenderMode()!==Hc.VECTOR&&c&&g.length===1?null:N,W=new tE(M,A,n,u.getOverlaps(),Tt,a.getRenderBuffer());if(t.executorGroups[m].push(W),U){var Y=new tE(null,A,n,u.getOverlaps(),U.finish(),a.getRenderBuffer());t.declutterExecutorGroups[m].push(Y)}},y=this,w=0,C=g.length;w<C;++w)v(w);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=oa([t]);_o(h,s*i,h);for(var f={},d=function(C,O,F){var I=C.getId();I===void 0&&(I=Ee(C));var T=f[I];if(T){if(T!==!0&&F<T.distanceSq){if(F===0)return f[I]=!0,o.splice(o.lastIndexOf(T),1),a(C,l,O);T.geometry=O,T.distanceSq=F}}else{if(F===0)return f[I]=!0,a(C,l,O);o.push(f[I]={feature:C,layer:l,geometry:O,distanceSq:F,callback:a})}},g=this.renderedTiles,m,v=function(C,O){var F=g[C],I=c.getTileCoordExtent(F.wrappedTileCoord);if(!Xn(I,h))return"continue";var T=Ee(l),L=[F.executorGroups[T]],N=F.declutterExecutorGroups[T];N&&L.push(N),L.some(function(x){for(var S=x===N?n.declutterTree.all().map(function(q){return q.value}):null,P=0,U=x.length;P<U;++P){var tt=x[P];if(m=tt.forEachFeatureAtCoordinate(t,s,A,i,d,S),m)return!0}})},y=0,w=g.length;!m&&y<w;++y)v(y);return m},e.prototype.getFeatures=function(t){return new Promise(function(n,i){for(var a=this.getLayer(),o=Ee(a),s=a.getSource(),A=this.renderedProjection,l=A.getExtent(),u=this.renderedResolution,c=s.getTileGridForProjection(A),h=bn(this.renderedPixelToCoordinateTransform_,t.slice()),f=c.getTileCoordForCoordAndResolution(h,u),d,g=0,m=this.renderedTiles.length;g<m;++g)if(f.toString()===this.renderedTiles[g].tileCoord.toString()){if(d=this.renderedTiles[g],d.getState()===Te.LOADED){var v=c.getTileCoordExtent(d.tileCoord);s.getWrapX()&&A.canWrapX()&&!fs(l,v)&&vF(h,A);break}d=void 0}if(!d||d.loadingSourceTiles>0){n([]);return}var y=c.getTileCoordExtent(d.wrappedTileCoord),w=BA(y),C=[(h[0]-w[0])/u,(w[1]-h[1])/u],O=d.getSourceTiles().reduce(function(N,x){return N.concat(x.getFeatures())},[]),F=d.hitDetectionImageData[o];if(!F&&!this.animatingOrInteracting_){var I=Wi(c.getTileSize(c.getZForResolution(u))),T=this.renderedRotation_,L=[this.getRenderTransform(c.getTileCoordCenter(d.wrappedTileCoord),u,0,hs,I[0]*hs,I[1]*hs,0)];F=k8(I,L,O,a.getStyleFunction(),c.getTileCoordExtent(d.wrappedTileCoord),d.getReplayState(a).renderedResolution,T),d.hitDetectionImageData[o]=F}n(H8(C,O,F))}.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[In.ANIMATING]||a[In.INTERACTING]),s=this.renderedTiles,A=0,l=s.length;A<l;++A){var u=s[A],c=u.declutterExecutorGroups[Ee(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),d=t.tileCoord,g=f.getTileCoordExtent(t.wrappedTileCoord),m=f.getTileCoordExtent(d,this.tmpExtent)[0]-g[0],v=tv(ry(this.inversePixelTransform.slice(),1/i,1/i),this.getRenderTransform(o,s,A,i,u,c,m));return v},e.prototype.renderFrame=function(t,n){var i=t.viewHints,a=!(i[In.ANIMATING]||i[In.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=nct[s],c=t.viewState,h=c.rotation,f=o.getSource(),d=f.getTileGridForProjection(c.projection),g=d.getZForResolution(c.resolution,f.zDirection),m=this.renderedTiles,v=[],y=[],w=m.length-1;w>=0;--w){var C=m[w],O=C.executorGroups[Ee(o)].filter(function(q){return q.hasExecutors(u)});if(O.length!==0){for(var F=this.getTileRenderTransform(C,t),I=C.tileCoord[0],T=!1,L=O[0].getClipCoords(F),N=0,x=v.length;N<x;++N)if(g!==I&&I<y[N]){var S=v[N];Xn([L[0],L[3],L[4],L[7]],[S[0],S[3],S[4],S[7]])&&(T||(A.save(),T=!0),A.beginPath(),A.moveTo(L[0],L[1]),A.lineTo(L[2],L[3]),A.lineTo(L[4],L[5]),A.lineTo(L[6],L[7]),A.moveTo(S[6],S[7]),A.lineTo(S[4],S[5]),A.lineTo(S[2],S[3]),A.lineTo(S[0],S[1]),A.clip())}v.push(L),y.push(I);for(var P=0,U=O.length;P<U;++P){var tt=O[P];tt.execute(A,1,F,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=eE(a,t,i[A],n,this.boundHandleStyleImageChange_,void 0,o)||s;else s=eE(a,t,i,n,this.boundHandleStyleImageChange_,void 0,o);return s},e.prototype.tileImageNeedsRender_=function(t){var n=this.getLayer();if(n.getRenderMode()===Hc.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[Ee(i)];a.renderedTileRevision=o;var A=t.wrappedTileCoord,l=A[0],u=i.getSource(),c=n.pixelRatio,h=n.viewState,f=h.projection,d=u.getTileGridForProjection(f),g=d.getResolution(t.tileCoord[0]),m=n.pixelRatio/t.wantedResolution*g,v=d.getResolution(l),y=t.getContext(i);c=Math.round(Math.max(c,m/c));var w=u.getTilePixelSize(l,c,f);y.canvas.width=w[0],y.canvas.height=w[1];var C=c/m;if(C!==1){var O=ey(this.tmpTransform_);ry(O,C,C),y.setTransform.apply(y,O)}var F=d.getTileCoordExtent(A,this.tmpExtent),I=m/v,T=ey(this.tmpTransform_);ry(T,I,-I),lX(T,-F[0],-F[3]);for(var L=0,N=s.length;L<N;++L){var x=s[L];x.execute(y,C,T,0,!0,rct[i.getRenderMode()])}a.renderedTileResolution=t.wantedResolution},e}(TH),act=ict,oct=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),sct=function(r){oct(e,r);function e(t){var n=this,i=t||{},a=Ce({},i);delete a.preload,delete a.useInterimTilesOnError,n=r.call(this,a)||this,n.on,n.once,n.un,i.renderMode===Hc.IMAGE&&(console.warn('renderMode: "image" is deprecated. Option ignored.'),i.renderMode=void 0);var o=i.renderMode||Hc.HYBRID;return Le(o==Hc.HYBRID||o==Hc.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 act(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(Uc.PRELOAD)},e.prototype.getUseInterimTilesOnError=function(){return this.get(Uc.USE_INTERIM_TILES_ON_ERROR)},e.prototype.setPreload=function(t){this.set(Uc.PRELOAD,t)},e.prototype.setUseInterimTilesOnError=function(t){this.set(Uc.USE_INTERIM_TILES_ON_ERROR,t)},e}(UC),Act=sct,nn=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=yt.create("DIV",{className:r.switcherClass||"ol-layerswitcher"}):(t=yt.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=yt.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=yt.create("DIV",{className:"ol-switchertopdiv",parent:t,click:function(){e.overflow("+50%")}}),this.botv=yt.create("DIV",{className:"ol-switcherbottomdiv",parent:t,click:function(){e.overflow("-50%")}})),this._noScroll=r.noScroll),this.panel_=yt.create("UL",{className:"panel"}),this.panelContainer_=yt.create("DIV",{className:"panel-container",html:this.panel_,parent:t}),!r.target&&!r.noScroll&&yt.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_=yt.create("LI",{className:"ol-header",parent:this.panel_}),Nr.call(this,{element:t,target:r.target}),this.set("drawDelay",r.drawDelay||0),this.set("selection",r.selection),r.minibar&&setTimeout(function(){var n=yt.scrollDiv(this.panelContainer_,{mousewheel:!0,vertical:!0,minibar:!0});this.on(["drawlist","toggle"],function(){n.refresh()})}.bind(this))};Qr(nn,Nr);nn.prototype.tip={up:"up/down",down:"down",info:"informations...",extent:"zoom to extent",trash:"remove layer",plus:"expand/shrink"};nn.prototype.displayInLayerSwitcher=function(r){return r.get("displayInLayerSwitcher")!==!1};nn.prototype.setMap=function(r){if(Nr.prototype.setMap.call(this,r),this.drawPanel(),this._listener)for(var e in this._listener)ms(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)))};nn.prototype.show=function(){this.element.classList.add("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!1})};nn.prototype.hide=function(){this.element.classList.remove("ol-forceopen"),this.overflow(),self.dispatchEvent({type:"toggle",collapsed:!0})};nn.prototype.toggle=function(){this.element.classList.toggle("ol-forceopen"),this.overflow()};nn.prototype.isOpen=function(){return this.element.classList.contains("ol-forceopen")};nn.prototype.setHeader=function(r){yt.setHTML(this.header_,r)};nn.prototype.overflow=function(r){if(this.button&&!this._noScroll){if(yt.hidden(this.panel_)){yt.setStyle(this.element,{height:"auto"});return}var e=yt.outerHeight(this.element),t=yt.outerHeight(this.panel_),n=this.button.offsetTop+yt.outerHeight(this.button),i=this.panel_.offsetTop-n;if(t>e-n){yt.setStyle(this.element,{height:"100%"});var a=this.panel_.querySelectorAll("li.visible .li-content")[0],o=a?2*yt.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,yt.hide(this.botv)):yt.show(this.botv),i>=0?(i=0,yt.hide(this.topv)):yt.show(this.topv),yt.setStyle(this.panel_,{top:i+"px"}),!0}else return yt.setStyle(this.element,{height:"auto"}),yt.setStyle(this.panel_,{top:0}),yt.hide(this.botv),yt.hide(this.topv),!1}else return!1};nn.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})};nn.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})};nn.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})};nn.prototype._clearLayerForLI=function(){this._layers.forEach(function(r){r.listeners.forEach(function(e){ms(e)})}),this._layers=[]};nn.prototype._getLayerForLI=function(r){for(var e=0,t;t=this._layers[e];e++)if(t.li===r)return t.layer;return null};nn.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))};nn.prototype.getPanel=function(){return this.panelContainer_};nn.prototype.drawPanel=function(){if(this.getMap()){var r=this;this.dcount++,setTimeout(function(){r.drawPanel_()},this.get("drawDelay")||0)}};nn.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}};nn.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())};nn.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 Xn(i,n)}return!0};nn.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,d=e.getSelection()===f;if(f&&s){var g;u?g=u.getLayers():g=e._layerGroup?e._layerGroup.getLayers():e.getMap().getLayers();for(var m=g.getArray(),v=0;v<m.length;v++)if(m[v]==f){g.removeAt(v);break}for(var y=0;y<m.length;y++)if(m[y]===s){v>y?g.insertAt(y,f):g.insertAt(y+1,f);break}}d&&e.selectLayer(f),e.dispatchEvent({type:"reorder-end",layer:f,group:u})}t.parentNode.querySelectorAll("li").forEach(function(w){w.classList.remove("dropover"),w.classList.remove("dropover-after"),w.classList.remove("dropover-before")}),t.classList.remove("drag"),t.parentNode.classList.remove("drag"),e.element.classList.remove("drag"),A&&A.remove(),yt.removeListener(document,"mousemove touchmove",h),yt.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=yt.create("LI",{className:"ol-dragover",html:t.innerHTML,style:{position:"absolute","z-index":1e4,left:t.offsetLeft,opacity:.5,width:yt.outerWidth(t),height:yt.getStyle(t,"height")},parent:i}),e.element.classList.add("drag"),e.dispatchEvent({type:"reorder-start",layer:l,group:u})),!n){f.preventDefault(),f.stopPropagation(),yt.setStyle(A,{top:a-yt.offsetRect(i).top+i.scrollTop+5});var d;for(f.touches?d=document.elementFromPoint(f.touches[0].clientX,f.touches[0].clientY):d=f.target,d.classList.contains("ol-switcherbottomdiv")?e.overflow(-1):d.classList.contains("ol-switchertopdiv")&&e.overflow(1);d&&d.tagName!=="LI";)d=d.parentNode;(!d||!d.classList.contains("dropover"))&&t.parentNode.querySelectorAll("li").forEach(function(g){g.classList.remove("dropover"),g.classList.remove("dropover-after"),g.classList.remove("dropover-before")}),d&&d.parentNode.classList.contains("drag")&&d!==t?(s=e._getLayerForLI(d),s&&!s.get("allwaysOnTop")==!l.get("allwaysOnTop")?(d.classList.add("dropover"),d.classList.add(t.offsetTop<d.offsetTop?"dropover-after":"dropover-before")):s=!1,yt.show(A)):(s=!1,d===t?yt.hide(A):yt.show(A)),s?A.classList.remove("forbidden"):A.classList.add("forbidden")}}yt.addListener(document,"mousemove touchmove",h),yt.addListener(document,"mouseup touchend touchcancel",c)};nn.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=yt.getStyle(t,"left")-i;e.dragging_=!0;function o(){yt.removeListener(document,"mouseup touchend touchcancel",o),yt.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)/yt.getStyle(t.parentNode,"width"),c=Math.max(0,Math.min(1,u));yt.setStyle(t,{left:c*100+"%"}),t.parentNode.nextElementSibling.innerHTML=Math.round(c*100),n.setOpacity(c)}yt.addListener(document,"mouseup touchend touchcancel",o),yt.addListener(document,"mousemove touchmove",s)};nn.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=yt.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=yt.create("DIV",{className:"ol-layerswitcher-buttons",parent:c}),f=yt.create("DIV",{className:"li-content",parent:c});yt.create("INPUT",{type:u.get("baseLayer")?"radio":"checkbox",className:"ol-visibility",checked:u.getVisible(),click:i,parent:f});var d=yt.create("LABEL",{title:u.get("title")||u.get("name"),click:i,unselectable:"on",style:{userSelect:"none"},parent:f});if(d.addEventListener("selectstart",function(){return!1}),yt.create("SPAN",{html:u.get("title")||u.get("name"),click:function(C){this.get("selection")&&(C.stopPropagation(),this.selectLayer(u))}.bind(this),parent:d}),this.reordering&&(l<n.length-1&&(u.get("allwaysOnTop")||!n[l+1].get("allwaysOnTop"))||l>0&&(!u.get("allwaysOnTop")||n[l-1].get("allwaysOnTop")))&&yt.create("DIV",{className:"layerup ol-noscroll",title:this.tip.up,on:{"mousedown touchstart":function(C){t.dragOrdering_(C)}},parent:h}),u.getLayers){var g=0;u.getLayers().forEach(function(C){t.displayInLayerSwitcher(C)&&g++}),g&&yt.create("DIV",{className:u.get("openInLayerSwitcher")?"collapse-layers":"expend-layers",title:this.tip.plus,click:function(){var C=t._getLayerForLI(this.parentNode.parentNode);C.set("openInLayerSwitcher",!C.get("openInLayerSwitcher"))},parent:h})}if(this.oninfo&&yt.create("DIV",{className:"layerInfo",title:this.tip.info,click:a,parent:h}),this.hastrash&&!u.get("noSwitcherDelete")&&yt.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]&&yt.create("DIV",{className:"layerExtent",title:this.tip.extent,click:o,parent:h})}if(this.show_progress&&u instanceof rR){var v=yt.create("DIV",{className:"layerswitcher-progress",parent:f});this.setprogress_(u),u.layerswitcher_progress=yt.create("DIV",{parent:v})}var y=yt.create("DIV",{className:"layerswitcher-opacity",click:function(C){if(C.target===this){C.stopPropagation(),C.preventDefault();var O=Math.max(0,Math.min(1,C.offsetX/yt.getStyle(this,"width")));t._getLayerForLI(this.parentNode.parentNode).setOpacity(O)}},parent:f});if(yt.create("DIV",{className:"layerswitcher-opacity-cursor ol-noscroll",style:{left:u.getOpacity()*100+"%"},on:{"mousedown touchstart":function(C){t.dragOpacity_(C)}},parent:y}),yt.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 w=yt.create("UL",{parent:c});this.drawList(w,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()};nn.prototype.getLayerClass=function(r){return r?r.getLayers?"ol-layer-group":r instanceof wl?"ol-layer-vector":r instanceof Act?"ol-layer-vectortile":r instanceof rR?"ol-layer-tile":r instanceof $H?"ol-layer-image":r instanceof aG?"ol-layer-heatmap":r.getFeatures?"ol-layer-vectorimage":"unknown":"none"};nn.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})};nn.prototype.getSelection=function(){return this._selectedLayer};nn.prototype.setprogress_=function(r){if(!r.layerswitcher_progress){var e=0,t=0,n=function(){t===e?(t=e=0,yt.setStyle(r.layerswitcher_progress,{width:0})):yt.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 lct={name:"ol-layerswitcher-control",setup(r,e){const{control:t}=Xi(nn,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 uct(r,e,t,n,i,a){return Mr("",!0)}var vE=me(lct,[["render",uct]]);DC.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"};YH.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())};xAt.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};Cd.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&&!gA(a,r)&&(r=[(a[0]+a[2])/2,(a[1]+a[3])/2]),t&&(r=ch(r,t,this.getSource().getProjection())),this.getSource&&this.getSource()?[this.getSource().getPreview(r,e)]:[]};C0.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 eB=function(r){r=r||{},r.switcherClass="ol-layerswitcher-image",r.mouseover!==!1&&(r.mouseover=!0),nn.call(this,r)};Qr(eB,nn);eB.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")};yt.setStyle(r,{height:"auto"}),e.forEach(function(i){if(t.displayInLayerSwitcher(i)){var a=i.getPreview?i.getPreview():["none"],o=yt.create("LI",{className:"ol-imgcontainer"+(i.getVisible()?" ol-visible":""),on:{"touchstart click":n},parent:r});t._setLayerForLI(o,i),a.forEach(function(s){yt.create("IMG",{src:s,parent:o})}),yt.create("p",{html:i.get("title")||i.get("name"),parent:o}),t.testLayerVisibility(i)&&o.classList.add("ol-layer-hidden")}})};eB.prototype.overflow=function(){};const cct={name:"ol-layerswitcherimage-control",extends:vE,setup(r,e){const{control:t}=Xi(eB,r,e);return{control:t}}};function hct(r,e,t,n,i,a){return Mr("",!0)}var CI=me(cct,[["render",hct]]),za=function(r){r||(r={});var e=document.createElement("div");if(r.target)e=yt.create("DIV",{className:r.className||"ol-mapzone"});else{e=yt.create("DIV",{className:(r.className||"ol-mapzone")+" ol-unselectable ol-control ol-collapsed"});var t=yt.create("BUTTON",{type:"button",on:{click:function(){e.classList.toggle("ol-collapsed"),n.forEach(function(i){i.updateSize()})}.bind(this)},parent:e});yt.create("I",{parent:t})}Nr.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()})})};Qr(za,Nr);za.prototype.setCollapsed=function(r){r?(this.element.classList.remove("ol-collapsed"),this.getMaps().forEach(function(e){e.updateSize()})):this.element.classList.add("ol-collapsed")};za.prototype.getCollapsed=function(){return this.element.classList.contains("ol-collapsed")};za.prototype.setVisible=za.prototype.setCollapsed;za.prototype.getMaps=function(){return this._maps};za.prototype.getLength=function(){return this._maps.length};za.prototype.addZone=function(r){var e=new el({zoom:6,center:[0,0],projection:this._projection}),t;r.map?t=zw(r.map.getView().calculateExtent(),r.map.getView().getProjection(),e.getProjection()):t=zw(r.extent,"EPSG:4326",e.getProjection());var n=yt.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:Ya(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 kC({target:n,view:e,controls:[],interactions:[],layers:[i]});a.set("zone",r),this._maps.push(a),e.fit(t),yt.create("P",{html:r.title,parent:n})};za.prototype.removeZone=function(r){var e=this.element.querySelectorAll(".ol-mapzonezone")[r];e&&(e.remove(),this._maps.splice(r,1))};za.zones={};za.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]}];za.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]}];za.zones.DOMTOM=[{title:"Métropole",extent:[-5.318421740712579,41.16082274292913,9.73284186155716,51.21957336557702]}].concat(za.zones.DOM,za.zones.TOM);const fct={name:"ol-zone-control",setup(r,e){const{control:t}=Xi(za,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 dct(r,e,t,n,i,a){return Mr("",!0)}var BI=me(fct,[["render",dct]]);function mE(r){mE.installed||(mE.installed=!0,r.component(Xx.name,Xx),r.component(qx.name,qx),r.component(Zx.name,Zx),r.component(Jx.name,Jx),r.component(tI.name,tI),r.component(eI.name,eI),r.component(rI.name,rI),r.component(nI.name,nI),r.component(T5.name,T5),r.component(iI.name,iI),r.component(aI.name,aI),r.component(oI.name,oI),r.component(sI.name,sI),r.component(AI.name,AI),r.component(wI.name,wI),r.component(EI.name,EI),r.component(vE.name,vE),r.component(CI.name,CI),r.component(BI.name,BI))}var pct=Object.freeze(Object.defineProperty({__proto__:null,default:mE,install:mE,FullScreenControl:Xx,MousePositionControl:qx,AttributionControl:Zx,OverviewMapControl:Jx,ScaleLineControl:tI,ZoomControl:eI,ZoomSliderControl:rI,ZoomToExtentControl:nI,ContextMenuControl:iI,SwipeControl:aI,ControlBar:oI,ToggleControl:sI,ButtonControl:AI,PrintDialog:wI,VideoRecorderControl:EI,LayerSwitcherControl:vE,LayerSwitcherImageControl:CI,ZoneControl:BI},Symbol.toStringTag,{value:"Module"}));function ov(r,e){const t=Be("feature"),{properties:n}=Or(e);let i=qe(()=>new r(...Object.values(n)));return ye(n,()=>{t.value.setGeometry(i.value),t.value.changed()}),ye(t,()=>{t.value.setGeometry(i.value)}),cr(()=>{t.value.setGeometry(i.value)}),pr(()=>{t.value.setGeometry(null)}),{geometry:i}}const gct={name:"ol-geom-point",setup(r){const{geometry:e}=ov(xr,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function vct(r,e,t,n,i,a){return Mr("",!0)}var bI=me(gct,[["render",vct]]);const mct={name:"ol-geom-line-string",setup(r){const{geometry:e}=ov(en,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function yct(r,e,t,n,i,a){return Mr("",!0)}var TI=me(mct,[["render",yct]]);const _ct={name:"ol-geom-polygon",setup(r){const{geometry:e}=ov(Dn,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function wct(r,e,t,n,i,a){return Mr("",!0)}var SI=me(_ct,[["render",wct]]);const Ect={name:"ol-geom-multi-point",setup(r){const{geometry:e}=ov(Gs,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Cct(r,e,t,n,i,a){return Mr("",!0)}var xI=me(Ect,[["render",Cct]]);const Bct={name:"ol-geom-multi-line-string",setup(r){const{geometry:e}=ov(Xa,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function bct(r,e,t,n,i,a){return Mr("",!0)}var II=me(Bct,[["render",bct]]);const Tct={name:"ol-geom-multi-polygon",setup(r){const{geometry:e}=ov(qa,r);return{geometry:e}},props:{coordinates:{type:Array},opt_layout:{type:String,default:"XY"}}};function Sct(r,e,t,n,i,a){return Mr("",!0)}var LI=me(Tct,[["render",Sct]]);function yE(r){yE.installed||(yE.installed=!0,r.component(bI.name,bI),r.component(TI.name,TI),r.component(SI.name,SI),r.component(xI.name,xI),r.component(II.name,II),r.component(LI.name,LI))}var xct=Object.freeze(Object.defineProperty({__proto__:null,default:yE,install:yE,Point:bI,LineString:TI,Polygon:SI,MultiPoint:xI,MultiLineString:II,MultiPolygon:LI},Symbol.toStringTag,{value:"Module"}));const Ict={name:"ol-style",setup(r){const e=Be("stylable",null),{properties:t}=Or(r);let n=qe(()=>new Ea(t));const i=o=>{if(e instanceof KF||e instanceof WF){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=qe(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return ye(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),cr(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),pr(()=>{i(null)}),Dr("style",n),Dr("styledObj",e),{style:n}},props:{zIndex:{type:Number},overrideStyleFunction:{type:Function}}};function Lct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var OI=me(Ict,[["render",Lct]]);const Oct={name:"ol-style-circle",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=Or(r),i=s=>new S0(CA(Jn({},s),{fill:new Ba,stroke:new zi}));let a=qe(()=>i(n));const o=()=>{e.value.setImage(null),e.value.setImage(a.value),t.value.changed()};ye(n,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setImage(a.value)}),pr(()=>{e.value.setImage(null)}),Dr("circle",a),Dr("styledObj",t)},props:{radius:{type:Number},scale:{type:Number}}};function Fct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var FI=me(Oct,[["render",Fct]]);const Rct={name:"ol-style-stroke",setup(r){const e=Be("style",null),t=Be("circle",null),n=Be("styledObj",null),{properties:i}=Or(r);if(e!=null&&t==null){let a=new zi(i);e.value.setStroke(a);const o=()=>{e.value.setStroke(null),a=new zi(i),e.value.setStroke(a)};ye(i,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setStroke(a)}),pr(()=>{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),ye(i,o=>{a(o)}),ye(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 Mct(r,e,t,n,i,a){return Mr("",!0)}var RI=me(Rct,[["render",Mct]]);const Nct={name:"ol-style-fill",setup(r){const e=Be("style",null),t=Be("circle",null),n=Be("styledObj",null),{properties:i}=Or(r);if(e!=null&&t==null){let a=new Ba(i);e.value.setFill(a);const o=()=>{e.value.setFill(null),a=new Ba(i),e.value.setFill(a)};ye(i,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setFill(a)}),pr(()=>{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),ye(i,()=>{a(i.color)}),ye(t,()=>{a(i.color)})}},props:{color:{type:String}}};function Pct(r,e,t,n,i,a){return Mr("",!0)}var MI=me(Nct,[["render",Pct]]);const Uct={name:"ol-style-icon",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=Or(r);let i=qe(()=>{let o=new L0(n);return o.load(),o});const a=()=>{e.value.setImage(null),e.value.setImage(i.value),t.value.changed()};ye(n,()=>{a()}),ye(e,()=>{a()}),cr(()=>{e.value.setImage(i.value)}),pr(()=>{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 Dct(r,e,t,n,i,a){return Mr("",!0)}var NI=me(Uct,[["render",Dct]]);const Qct={name:"ol-style-text",setup(r){const e=Be("style",null),t=Be("styledObj",null),{properties:n}=Or(r),i=s=>new bd(CA(Jn({},s),{fill:new Ba,stroke:new zi}));let a=qe(()=>i(n));const o=()=>{e.value.setText(null),e.value.setText(a.value),t.value.changed()};ye(n,()=>{o()}),ye(e,()=>{o()}),cr(()=>{e.value.setText(a.value)}),pr(()=>{e.value.setText(null)}),Dr("style",a),Dr("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 kct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var PI=me(Qct,[["render",kct]]),Qg=function(r,e){var t=r[0]-e[0],n=r[1]-e[1];return Math.sqrt(t*t+n*n)},lm=function(r,e){return r[0]==e[0]&&r[1]==e[1]},TG;(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))}TG=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 Dn(a[0]):new qa(a)}})();var rB=function(r,e,t,n){var i=[];n!==!1&&i.push(r);var a=Qg(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};en.prototype.sampleAt=function(r){for(var e=this.getCoordinates(),t=[],n=1;n<e.length;n++)t=t.concat(rB(e[n-1],e[n],r,n===1));return new en(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(rB(n[a-1],n[a],r,a===1));t.push(i)}),new Xa(t)};Dn.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(rB(n[a-1],n[a],r,a===1));t.push(i)}),new Dn(t)};qa.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(rB(a[s-1],a[s],r,s===1));i.push(o)})}),new qa(t)};HF.prototype.intersection=function(r,e){if(r.sampleAt){var t=_o(this.getCenter().concat(this.getCenter()),this.getRadius());r=TG(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=Qg(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 Dn(s[0]):new qa(s):r}}}else console.warn("[ol/geom/Circle~intersection] Unsupported geometry type: "+r.getType());return r};en.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(lm(r,this.getFirstCoordinate())||lm(r,this.getLastCoordinate()))return[this];var s=this.getCoordinates(),A=[s[0]],l=[];for(t=0;t<s.length-1;t++)if(!lm(s[t],s[t+1])){if(lm(r,s[t+1]))A.push(s[t+1]),l.push(new en(A)),A=[];else if(!lm(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 en(A)),A=[r])}A.push(s[t+1])}return A.length>1&&l.push(new en(A)),l.length?l:[this]};var Qi=function(r){r||(r={}),Ea.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};Qr(Qi,Ea);Qi.prototype.setWidth=function(r){this._width=r||0};Qi.prototype.setWidth2=function(r){this._width2=r};Qi.prototype.getOffset=function(r){return this._offset[r]};Qi.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}}};Qi.prototype.setLineCap=function(r){this._lineCap=r==="round"?"round":"butt"};Qi.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};Qi.prototype.setColor=function(r){try{this._color=uh(r)}catch{this._color=[0,0,0,1]}};Qi.prototype.setColor2=function(r){try{this._color2=uh(r)}catch{this._color2=null}};Qi.prototype.setArrowColor=function(r){try{this._acolor=fu(r)}catch{this._acolor=null}};Qi.prototype.getColor=function(r,e){if(this._colorFn)return fu(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)+")"};Qi.prototype.getArrow=function(){return this._arrow};Qi.prototype.setArrow=function(r){this._arrow=parseInt(r),(this._arrow<-1||this._arrow>2)&&(this._arrow=0)};Qi.prototype.getArrowSize=function(){return this._arrowSize||[16,16]};Qi.prototype.setArrowSize=function(r){Array.isArray(r)?this._arrowSize=r:typeof r=="number"&&(this._arrowSize=[r,r])};Qi.prototype.drawArrow=function(r,e,t,n,i){var a=this.getArrowSize()[0]*i,o=Qg(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()};Qi.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,d=h.length;if(a.lineJoin="round",a.lineCap=this._lineCap||"butt",h.length>1)for(f=0;f<h.length;f++){var g=f/d;for(n=h[f],a.lineWidth=this.getWidth(e.feature,g)*e.pixelRatio,a.strokeStyle=this.getColor(e.feature,g),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()}};Qi.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=Qg(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=Qg(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]};Qi.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+=Qg(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 d=(l-A)/s;c.push([u[0]+h*d,u[1]+f*d]),o.push(c),u=[u[0]+h*d*a,u[1]+f*d*a],c=[u],A=0}else A+=s,u=i,c.push(u),n++,i=r[n]}return o.push(c),o};const Hct={name:"ol-style-flowline",setup(r){const e=Be("stylable",null),{properties:t}=Or(r);let n=qe(()=>new Qi(t));const i=o=>{if(e instanceof KF||e instanceof WF){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=qe(()=>o=>(t.overrideStyleFunction!=null&&t.overrideStyleFunction(o,n.value),n.value));return ye(t,()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),cr(()=>{t.overrideStyleFunction==null?i(n.value):i(a.value)}),pr(()=>{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 Gct(r,e,t,n,i,a){return ti(),Yi("div",null,[Rr(r.$slots,"default")])}var UI=me(Hct,[["render",Gct]]);function _E(r){_E.installed||(_E.installed=!0,r.component(OI.name,OI),r.component(FI.name,FI),r.component(RI.name,RI),r.component(MI.name,MI),r.component(NI.name,NI),r.component(PI.name,PI),r.component(UI.name,UI))}var $ct=Object.freeze(Object.defineProperty({__proto__:null,default:_E,install:_E,Style:OI,Stroke:RI,Fill:MI,Icon:NI,Text:PI,FlowLine:UI,Circle:FI},Symbol.toStringTag,{value:"Module"}));const Vct={name:"ol-interaction-select",emits:["select"],setup(r,{emit:e}){const t=Be("map"),{properties:n}=Or(r);let i=qe(()=>{let a=new QC(CA(Jn({},n),{style:new Ea}));return a.on("select",o=>{e("select",o)}),a});return ye(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),cr(()=>{t.addInteraction(i.value)}),pr(()=>{t.removeInteraction(i.value)}),Dr("stylable",i),{select:i}},props:{multi:{type:Boolean,default:!1},condition:{type:Function},filter:{type:Function},features:{type:[xi,Object]},hitTolerance:{type:Number,default:0,validator:r=>r>=0}}};function jct(r,e,t,n,i,a){return Rr(r.$slots,"default")}var DI=me(Vct,[["render",jct]]),Th=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 wl({source:new Mu({features:new xi,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=NC),QC.call(this,r),this.on("select",this.selectCluster.bind(this))};Qr(Th,QC);Th.prototype.setMap=function(r){this.getMap()&&this.getMap().removeLayer(this.overlayLayer_),this._listener&&ms(this._listener),this._listener=null,QC.prototype.setMap.call(this,r),this.overlayLayer_.setMap(r),r&&r.getView()&&(this._listener=r.getView().on("change:resolution",this.clear.bind(this)))};Th.prototype.clear=function(){this.getFeatures().clear(),this.overlayLayer_.getSource().clear()};Th.prototype.getLayer=function(){return this.overlayLayer_};Th.prototype.selectCluster=function(r){if(r instanceof _r&&(r={selected:[r]}),!r.selected.length){this._autoClose?this.clear():r.deselected.forEach(y=>{y.get("selectcluserfeatures").forEach(C=>{this.overlayLayer_.getSource().removeFeature(C)})});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 _r({selectclusterfeature:!0,features:[n[A]],geometry:new xr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new _r({selectclusterlink:!0,geometry:new en([i,u])}),f.push(h);else{s=0;var d=2*this.pointRadius;for(l=Math.min(this.maxObjects,n.length),A=0;A<l;A++){o=d/2+d*s/(2*Math.PI),s=s+(d+.1)/o;var g=a*o*Math.sin(s),m=a*o*Math.cos(s);u=[i[0]+g,i[1]+m],c=new _r({selectclusterfeature:!0,features:[n[A]],geometry:new xr(u)}),c.setStyle(n[A].getStyle()),f.push(c),h=new _r({selectclusterlink:!0,geometry:new en([i,u])}),f.push(h)}}e.set("selectcluserfeatures",f),this.animate?this.animateCluster_(i,f):t.addFeatures(f)}}};Th.prototype.animateCluster_=function(r,e){if(this.listenerKey_&&ms(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||qC(A),u=A.frameState.pixelRatio,c=this.getMap().getView().getResolution(),h=Hs((A.frameState.time-a)/i),f=0,d;d=e[f];f++)if(d.get("features")){var g=d.getGeometry().getCoordinates();g[0]=r[0]+h*(g[0]-r[0]),g[1]=r[1]+h*(g[1]-r[1]);for(var m=new xr(g),v=n(d,c),y=0;y<v.length;y++){var w,C=kC.prototype.getFeaturesAtPixel?!1:v[y].getImage();C&&(w=C.getScale(),C.setScale(u)),l.setStyle?(l.setStyle(v[y]),l.drawGeometry(m)):(l.setImageStyle(C),l.drawPointGeometry(m)),C&&C.setScale(w)}}if(h>1){ms(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 _r(new xr(this.getMap().getView().getCenter()));s.setStyle(new Ea({image:new S0({})})),this.overlayLayer_.getSource().addFeature(s)};Th.prototype.getClusterExtent=function(r){if(!r.get("features"))return null;var e=Ui();return r.get("features").forEach(function(t){e=lh(e,t.getGeometry().getExtent())}),e[0]===e[2]&&e[1]===e[3]?null:e};const Kct={name:"ol-interaction-clusterselect",emits:["select"],setup(r,{emit:e}){const t=Be("map"),{properties:n}=Or(r);let i=qe(()=>{let a=new Th(CA(Jn({},n),{style:new Ea}));return a.on("select",o=>{e("select",o)}),a});ye(i,(a,o)=>{t.removeInteraction(o),t.addInteraction(a),t.changed()}),cr(()=>{t.addInteraction(i.value)}),pr(()=>{t.removeInteraction(i.value)}),Dr("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 Wct(r,e,t,n,i,a){return Rr(r.$slots,"default")}var QI=me(Kct,[["render",Wct]]);const zct={name:"ol-interaction-draw",emits:["drawstart","drawend"],setup(r,{emit:e}){const t=Be("map"),n=Be("vectorSource"),{type:i,clickTolerance:a,dragVertexDelay:o,snapTolerance:s,stopClick:A,maxPoints:l,minPoints:u,finishCondition:c,geometryFunction:h,geometryName:f,condition:d,freehand:g,freehandCondition:m,wrapX:v}=nh(r);let y=()=>{let C=new KF({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:d.value,freehand:g.value,freehandCondition:m.value,wrapX:v.value});return C.on("drawstart",O=>{e("drawstart",O)}),C.on("drawend",O=>{e("drawend",O)}),C},w=y();ye([i,a,o,s,A,l,u,c,h,f,d,g,m,v],()=>{t.removeInteraction(w),w=y(),t.addInteraction(w),w.changed(),t.changed()}),cr(()=>{t.addInteraction(w)}),pr(()=>{t.removeInteraction(w)}),Dr("stylable",w)},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 Yct(r,e,t,n,i,a){return Rr(r.$slots,"default")}var kI=me(zct,[["render",Yct]]);const Xct={name:"ol-interaction-snap",setup(r){const e=Be("map"),t=Be("vectorSource"),{properties:n}=Or(r);let i=()=>new oet(CA(Jn({},n),{source:t.value})),a=i();ye(n,()=>{e.removeInteraction(a),a=i(),e.addInteraction(a),e.changed()}),cr(()=>{e.addInteraction(a)}),pr(()=>{e.removeInteraction(a)})},props:{vertex:{type:Boolean,default:!0},edge:{type:Boolean,default:!0},pixelTolerance:{type:Number,default:10}}};function qct(r,e,t,n,i,a){return Rr(r.$slots,"default")}var HI=me(Xct,[["render",qct]]);const Zct={name:"ol-interaction-modify",emits:["modifystart","modifyend"],setup(r,{emit:e}){const t=Be("map"),n=Be("vectorSource"),{features:i,condition:a,deleteCondition:o,insertVertexCondition:s,pixelTolerance:A,wrapX:l,hitDetection:u}=nh(r);let c=()=>{let f=new WF({source:n.value,features:i.value,condition:a.value,deleteCondition:o.value,insertVertexCondition:s.value,pixelTolerance:A.value,wrapX:l.value,hitDetection:u.value});return f.on("modifystart",d=>{e("modifystart",d)}),f.on("modifyend",d=>{e("modifyend",d)}),f},h=c();ye([a,o,s,A,l,u],()=>{t.removeInteraction(h),h=c(),t.addInteraction(h),h.changed(),t.changed()}),cr(()=>{t.addInteraction(h)}),pr(()=>{t.removeInteraction(h)}),Dr("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:[xi,Object]}}};function Jct(r,e,t,n,i,a){return Rr(r.$slots,"default")}var GI=me(Zct,[["render",Jct]]),ci=function(r){r||(r={});var e=this;this.selection_=new xi,this.handles_=new xi,this.overlayLayer_=new wl({source:new Mu({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")||"")]}}),ws.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()};Qr(ci,ws);ci.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"};ci.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}ws.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())};ci.prototype.setActive=function(r){this.select(null),this.overlayLayer_.setVisible(r),ws.prototype.setActive.call(this,r)};ci.prototype.setDefaultStyle=function(r){r=r||{};var e=r.pointStroke||new zi({color:[255,0,0,1],width:1}),t=r.stroke||new zi({color:[255,0,0,1],width:1,lineDash:[4,4]}),n=r.fill||new Ba({color:[255,0,0,.01]}),i=r.pointFill||new Ba({color:[255,255,255,.8]}),a=new tw({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 tw({fill:i,stroke:e,radius:this.isTouch?16:8,points:4,angle:Math.PI/4}),s=new tw({fill:i,stroke:e,radius:this.isTouch?12:6,points:4,angle:Math.PI/4});function A(l,u,c){return[new Ea({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_()};ci.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_()}};ci.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")})||{}};ci.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};ci.prototype._isRectangle=function(r){if(this.get("keepRectangle")&&r.getType()==="Polygon"){var e=r.getCoordinates()[0];return e.length===5}return!1};ci.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=_o(o,0),this.selection_.forEach(function(c){var h=this.getGeometryRotateToZero_(c).getExtent();lh(o,h)}.bind(this)),r===!0)this.ispt_||(this.overlayLayer_.getSource().addFeature(new _r({geometry:new xr(this.center_),handle:"rotate0"})),n=hh(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new _r(n),this.overlayLayer_.getSource().addFeature(t));else{if(this.ispt_){var A=this.getMap().getPixelFromCoordinate([o[0],o[1]]);A&&(o=oa([this.getMap().getCoordinateFromPixel([A[0]-10,A[1]-10]),this.getMap().getCoordinateFromPixel([A[0]+10,A[1]+10])]))}n=i?new Dn([s]):hh(o),this.get("enableRotatedTransform")&&a!==0&&n.rotate(a,this.getMap().getView().getCenter()),t=this.bbox_=new _r(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 _r({geometry:new xr([(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 _r({geometry:new xr(u[e]),handle:"scale",option:e}),l.push(t);this.get("translate")&&!this.get("translateFeature")&&(t=new _r({geometry:new xr([(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 _r({geometry:new xr(u[3]),handle:"rotate"}),l.push(t)),this.overlayLayer_.getSource().addFeatures(l)}}};ci.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_})}};ci.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_})};ci.prototype.watchFeatures_=function(){this._featureListeners&&this._featureListeners.forEach(function(r){ms(r)}),this._featureListeners=[],this.selection_.forEach(function(r){this._featureListeners.push(r.on("change",function(){this.isUpdating_||this.drawSketch_()}.bind(this)))}.bind(this))};ci.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=Ui(),a=Ui(),o=0,s;s=this.selection_.item(o);o++)if(this.geoms_.push(s.getGeometry().clone()),i=lh(i,s.getGeometry().getExtent()),this.get("enableRotatedTransform")&&n!==0){var A=this.getGeometryRotateToZero_(s,!0);this.rotatedGeoms_.push(A),a=lh(a,A.getExtent())}if(this.extent_=hh(i).getCoordinates()[0],this.get("enableRotatedTransform")&&n!==0&&(this.rotatedExtent_=hh(a).getCoordinates()[0]),this.mode_==="rotate"){this.center_=this.getCenter()||Ya(i);var l=r.map.getTargetElement();l.style.cursor=this.Cursors.rotate0,this.previousCursor_=l.style.cursor}else this.center_=Ya(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}}};ci.prototype.getFeatures=function(){return this.selection_};ci.prototype.getCenter=function(){return this.get("center")};ci.prototype.setCenter=function(r){return this.set("center",r)};function Wl(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 xo(r,e){return[e[0]-r[0],e[1]-r[1]]}function ao(r,e){return[r[0]+e[0],r[1]+e[1]]}ci.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]),d=this.constraint_,g=this.opt_,m=this.coordinate_,v=r.coordinate;if(this.get("enableRotatedTransform")&&e!==0){var y=new xr(this.coordinate_);y.rotate(e*-1,c),m=y.getCoordinates();var w=new xr(r.coordinate);w.rotate(e*-1,c),v=w.getCoordinates()}var C=(v[0]-c[0])/(m[0]-c[0]),O=(v[1]-c[1])/(m[1]-c[1]),F=[v[0]-m[0],v[1]-m[1]];if(this.get("enableRotatedTransform")&&e!==0){var I=new xr(c);I.rotate(e*-1,this.getMap().getView().getCenter()),c=I.getCoordinates()}for(this.get("noFlip")&&(C<0&&(C=-C),O<0&&(O=-O)),this.constraint_?this.constraint_=="h"?C=1:O=1:this.get("keepAspectRatio")(r)&&(C=O=Math.min(C,O)),t=0,i;i=this.selection_.item(t);t++)a=e===0||!this.get("enableRotatedTransform")?this.geoms_[t].clone():this.rotatedGeoms_[t].clone(),a.applyTransform(function(T,L,N){if(N<2)return L;if(f){var x=[[6],[0,8],[2],[4]],S=[T[0],T[1]],P=[T[2],T[3]],U=[T[4],T[5]],tt=[T[6],T[7]],q=[T[8],T[9]];if(d){var rt=g%2===0?xo(S,P):xo(tt,S),nt=Wl(F,rt),At=g+1<x.length?g+1:0,ct=[...x[g],...x[At]];for(n=0;n<T.length;n+=N)L[n]=ct.includes(n)?T[n]+nt[0]:T[n],L[n+1]=ct.includes(n)?T[n+1]+nt[1]:T[n+1]}else{var Tt,M;switch(g){case 0:F=xo(tt,v),Tt=Wl(F,xo(U,tt)),M=Wl(F,xo(S,tt)),[L[0],L[1]]=ao(S,Tt),[L[4],L[5]]=ao(U,M),[L[6],L[7]]=ao(tt,F),[L[8],L[9]]=ao(q,Tt);break;case 1:F=xo(S,v),Tt=Wl(F,xo(tt,S)),M=Wl(F,xo(P,S)),[L[0],L[1]]=ao(S,F),[L[2],L[3]]=ao(P,Tt),[L[6],L[7]]=ao(tt,M),[L[8],L[9]]=ao(q,F);break;case 2:F=xo(P,v),Tt=Wl(F,xo(S,P)),M=Wl(F,xo(U,P)),[L[0],L[1]]=ao(S,M),[L[2],L[3]]=ao(P,F),[L[4],L[5]]=ao(U,Tt),[L[8],L[9]]=ao(q,M);break;case 3:F=xo(U,v),Tt=Wl(F,xo(P,U)),M=Wl(F,xo(tt,U)),[L[2],L[3]]=ao(P,M),[L[4],L[5]]=ao(U,F),[L[6],L[7]]=ao(tt,Tt);break}}}else for(n=0;n<T.length;n+=N)C!=1&&(L[n]=c[0]+(T[n]-c[0])*C),O!=1&&(L[n+1]=c[1]+(T[n+1]-c[1])*O);return a.getType()=="Circle"&&a.setCenterAndRadius(a.getCenter(),a.getRadius()),L}),this.get("enableRotatedTransform")&&e!==0&&a.rotate(e,this.getMap().getView().getCenter()),i.setGeometry(a);this.drawSketch_(),this.dispatchEvent({type:"scaling",feature:this.selection_.item(0),features:this.selection_,scale:[C,O],pixel:r.pixel,coordinate:r.coordinate});break}}this.isUpdating_=!1}};ci.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}};ci.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};ci.prototype.getFeatures=function(){return this.selection_};const tht={name:"ol-interaction-transform",setup(r){const e=Be("map"),{properties:t}=Or(r);let n=qe(()=>new ci(Jn({},t)));ye(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),cr(()=>{e.addInteraction(n.value)}),pr(()=>{e.removeInteraction(n.value)}),Dr("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 eht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var $I=me(tht,[["render",eht]]);const rht={name:"ol-interaction-dragrotatezoom",setup(r){const e=Be("map"),{properties:t}=Or(r);let n=qe(()=>new nJ(Jn({},t)));ye(n,(i,a)=>{e.removeInteraction(a),e.addInteraction(i),e.changed()}),cr(()=>{e.addInteraction(n.value)}),pr(()=>{e.removeInteraction(n.value)})},props:{condition:{type:Function},duration:{type:Number,default:400}}};function nht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var VI=me(rht,[["render",nht]]);function wE(r){wE.installed||(wE.installed=!0,r.component(DI.name,DI),r.component(QI.name,QI),r.component(kI.name,kI),r.component(HI.name,HI),r.component(GI.name,GI),r.component($I.name,$I),r.component(VI.name,VI))}var iht=Object.freeze(Object.defineProperty({__proto__:null,default:wE,install:wE,SelectInteraction:DI,ClusterSelectInteraction:QI,DrawInteraction:kI,SnapInteraction:HI,ModifyInteraction:GI,TransformInteraction:$I,DragRotateAndZoomInteraction:VI},Symbol.toStringTag,{value:"Module"}));const aht={setup(){const r=Be("map"),e=Be("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:Hs}}};function oht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var yA=me(aht,[["render",oht]]),Zi=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:bF;r.revers?this.easing_=function(t){return 1-e(t)}:this.easing_=e,this.hiddenStyle=r.hiddenStyle,Li.call(this)};Qr(Zi,Li);Zi.hiddenStyle=new Ea({image:new S0({}),stroke:new zi({color:"transparent"})});Zi.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||qC(r),o=Px(r,n[i]);a.setStyle(o),o.getZIndex()<0?a.drawGeometry(t||e):a.drawGeometry(e)}catch{}};Zi.prototype.animate=function(){return!1};kC.prototype.animateFeature=function(r,e){var t=this._featureAnimationLayer;t||(t=this._featureAnimationLayer=new wl({source:new Mu}),t.setMap(this)),t.getSource().addFeature(r);var n=e.on("animationend",function(i){i.feature===r&&(t.getSource().removeFeature(r),ms(n))});t.animateFeature(r,e)};dF.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:Ya(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(g){s.type=g.type;try{s.vectorContext=g.vectorContext||qC(g)}catch{}if(s.frameState=g.frameState,s.inversePixelTransform=g.inversePixelTransform,s.extent||(s.extent=g.frameState.extent,s.start=g.frameState.time,s.context=g.context),s.time=g.frameState.time-s.start,s.elapsed=s.time/e[u].duration_,s.elapsed>1&&(s.elapsed=1),g.context.save(),c.forEach(function(v){v.get("active")&&v.precompose(g)}),this.getOpacity&&(g.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(v){v.get("active")&&v.postcompose(g)}),g.context.restore(),g.frameState.animate=!0}function f(g){ms(i),i=null,r.setStyle(a);var m={type:"animationend",feature:r};if(g)for(var v in g)g.hasOwnProperty(v)&&(m[v]=g[v]);e[u].dispatchEvent(m),n.dispatchEvent(m)}function d(g){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||Zi.hiddenStyle);var m={type:"animationstart",feature:r};if(g)for(var v in g)g.hasOwnProperty(v)&&(m[v]=g[v]);e[u].dispatchEvent(m),n.dispatchEvent(m)}}return d(),{start:d,stop:f,isPlaying:function(){return!!i}}};var cR=function(r){r=r||{},this.speed_=r.speed||0,Zi.call(this,r),this.side_=r.side||"top"};Qr(cR,Zi);cR.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 Fd(r,e){const{map:t,vectorLayer:n}=yA.setup(),{properties:i}=Or(e),a=qe(()=>new r(Jn({},i)));return Dr("animation",a),{map:t,vectorLayer:n,animation:a,properties:i}}const sht={name:"ol-animation-drop",extends:yA,setup(r){const{map:e,vectorLayer:t,properties:n}=Fd(cR,r);return{map:e,vectorLayer:t,properties:n}},props:{side:{type:Number,default:0},speed:{type:Number,default:0}}};function Aht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var jI=me(sht,[["render",Aht]]),hR=function(r){r=r||{},Zi.call(this,r),this.amplitude_=r.amplitude||40,this.bounce_=-Math.PI*(r.bounce||6),this.horizontal_=r.horizontal};Qr(hR,Zi);hR.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 lht={name:"ol-animation-shake",extends:yA,setup(r){const{map:e,vectorLayer:t,properties:n,animation:i}=Fd(hR,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 uht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var KI=me(lht,[["render",uht]]),P0=function(r){r=r||{},Zi.call(this,r),this.set("zoomout",r.zoomOut)};Qr(P0,Zi);var cht=function(r){r=r||{},r.zoomOut=!0,P0.call(this,r)};Qr(cht,P0);P0.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 hht={name:"ol-animation-zoom",extends:yA,setup(r){const{map:e,vectorLayer:t,properties:n}=Fd(P0,r);return{map:e,vectorLayer:t,properties:n}},props:{zoomOut:{type:Boolean,default:!1}}};function fht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var WI=me(hht,[["render",fht]]),fR=function(r){Zi.call(this,r)};Qr(fR,Zi);fR.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 dht={name:"ol-animation-teleport",extends:yA,setup(r){const{map:e,vectorLayer:t,properties:n}=Fd(fR,r);return{map:e,vectorLayer:t,properties:n}},props:{}};function pht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var zI=me(dht,[["render",pht]]),dR=function(r){r=r||{},this.speed_=r.speed||0,Zi.call(this,r)};Qr(dR,Zi);dR.prototype.animate=function(r){return r.context.globalAlpha=this.easing_(r.elapsed),this.drawGeom_(r,r.geom),r.time<=this.duration_};const ght={name:"ol-animation-fade",extends:yA,setup(r){const{map:e,vectorLayer:t,properties:n}=Fd(dR,r);return{map:e,vectorLayer:t,properties:n}}};function vht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var YI=me(ght,[["render",vht]]),pR=function(r){r=r||{},this.speed_=r.speed||0,Zi.call(this,r),this.side_=r.side||"left"};Qr(pR,Zi);pR.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 mht={name:"ol-animation-slide",extends:yA,setup(r){const{map:e,vectorLayer:t,properties:n}=Fd(pR,r);return{map:e,vectorLayer:t,properties:n}},props:{speed:{type:Number,default:0}}};function yht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var XI=me(mht,[["render",yht]]),gR=function(r){switch(r=r||{},Zi.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_)};Qr(gR,Zi);gR.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 _ht={name:"ol-animation-path",extends:yA,setup(r){const{map:e,vectorLayer:t,properties:n}=Fd(gR,r);return{map:e,vectorLayer:t,properties:n}},props:{rotate:{type:Boolean,default:!1},speed:{type:Number,default:0},path:{type:Object}}};function wht(r,e,t,n,i,a){return Rr(r.$slots,"default")}var qI=me(_ht,[["render",wht]]);function EE(r){EE.installed||(EE.installed=!0,r.component(yA.name,yA),r.component(jI.name,jI),r.component(KI.name,KI),r.component(WI.name,WI),r.component(zI.name,zI),r.component(YI.name,YI),r.component(XI.name,XI),r.component(qI.name,qI))}var Eht=Object.freeze(Object.defineProperty({__proto__:null,default:EE,install:EE,FeatureAnimation:yA,DropAnimation:jI,ShakeAnimation:KI,ZoomAnimation:WI,TeleportAnimation:zI,FadeAnimation:YI,PathAnimation:qI,SlideAnimation:XI},Symbol.toStringTag,{value:"Module"})),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)}}(),Bht=function(r){Cht(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(Yr),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(je(this.geometries_[t],xe.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<wh(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){Eh(t);for(var n=this.geometries_,i=0,a=n.length;i<a;++i)lh(t,n[i].getExtent());return t},e.prototype.getGeometries=function(){return W5(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 pt.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=Ya(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(W5(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}(LC);function W5(r){for(var e=[],t=0,n=r.length;t<n;++t)e.push(r[t].clone());return e}var Ca=Bht,bht=Object.freeze(Object.defineProperty({__proto__:null,Circle:HF,Geometry:LC,GeometryCollection:Ca,LinearRing:Rg,LineString:en,MultiLineString:Xa,MultiPoint:Gs,MultiPolygon:qa,Point:xr,Polygon:Dn,SimpleGeometry:mA},Symbol.toStringTag,{value:"Module"})),Tht=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?Ve(t.dataProjection):this.readProjection(e);t.extent&&i&&i.getUnits()===ho.TILE_PIXELS&&(i=Ve(i),i.setWorldExtent(t.extent)),n={dataProjection:i,featureProjection:t.featureProjection}}return this.adaptOptions(n)},r.prototype.adaptOptions=function(e){return Ce({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection},e)},r.prototype.getType=function(){return Re()},r.prototype.readFeature=function(e,t){return Re()},r.prototype.readFeatures=function(e,t){return Re()},r.prototype.readGeometry=function(e,t){return Re()},r.prototype.readProjection=function(e){return Re()},r.prototype.writeFeature=function(e,t){return Re()},r.prototype.writeFeatures=function(e,t){return Re()},r.prototype.writeGeometry=function(e,t){return Re()},r}(),U0=Tht;function Hn(r,e,t){var n=t?Ve(t.featureProjection):null,i=t?Ve(t.dataProjection):null,a;if(n&&i&&!tl(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 vR(r,e){var t=e?Ve(e.featureProjection):null,n=e?Ve(e.dataProjection):null;return t&&n&&!tl(t,n)?zw(r,n,t):r}var Sht=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),xht=function(r){Sht(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return hA.JSON},e.prototype.readFeature=function(t,n){return this.readFeatureFromObject(o1(t),this.getReadOptions(t,n))},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromObject(o1(t),this.getReadOptions(t,n))},e.prototype.readFeatureFromObject=function(t,n){return Re()},e.prototype.readFeaturesFromObject=function(t,n){return Re()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromObject(o1(t),this.getReadOptions(t,n))},e.prototype.readGeometryFromObject=function(t,n){return Re()},e.prototype.readProjection=function(t){return this.readProjectionFromObject(o1(t))},e.prototype.readProjectionFromObject=function(t){return Re()},e.prototype.writeFeature=function(t,n){return JSON.stringify(this.writeFeatureObject(t,n))},e.prototype.writeFeatureObject=function(t,n){return Re()},e.prototype.writeFeatures=function(t,n){return JSON.stringify(this.writeFeaturesObject(t,n))},e.prototype.writeFeaturesObject=function(t,n){return Re()},e.prototype.writeGeometry=function(t,n){return JSON.stringify(this.writeGeometryObject(t,n))},e.prototype.writeGeometryObject=function(t,n){return Re()},e}(U0);function o1(r){if(typeof r=="string"){var e=JSON.parse(r);return e||null}else return r!==null?r:null}var mR=xht,Iht=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Rd={};Rd[pt.POINT]=Fht;Rd[pt.LINE_STRING]=Rht;Rd[pt.POLYGON]=Uht;Rd[pt.MULTI_POINT]=Nht;Rd[pt.MULTI_LINE_STRING]=Mht;Rd[pt.MULTI_POLYGON]=Pht;var Md={};Md[pt.POINT]=Dht;Md[pt.LINE_STRING]=Qht;Md[pt.POLYGON]=kht;Md[pt.MULTI_POINT]=Ght;Md[pt.MULTI_LINE_STRING]=Hht;Md[pt.MULTI_POLYGON]=$ht;var Lht=function(r){Iht(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=z5(a.geometry,n),s=new _r;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 z5(t,n)},e.prototype.readProjectionFromObject=function(t){if(t.spatialReference&&t.spatialReference.wkid!==void 0){var n=t.spatialReference,i=n.wkid;return Ve("EPSG:"+i)}else return null},e.prototype.writeGeometryObject=function(t,n){return Y5(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=Y5(o,n);var s=n&&(n.dataProjection||n.featureProjection);s&&(i.geometry.spatialReference={wkid:Number(Ve(s).getCode().split(":").pop())}),delete a[t.getGeometryName()]}return nd(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}(mR);function z5(r,e){var t,n;if(!r)return null;var i;if(typeof r.x=="number"&&typeof r.y=="number")i=pt.POINT;else if(r.points)i=pt.MULTI_POINT;else if(r.paths){var a=r;a.paths.length===1?i=pt.LINE_STRING:i=pt.MULTI_LINE_STRING}else if(r.rings){var o=r,s=sv(o),A=Oht(o.rings,s);A.length===1?(i=pt.POLYGON,r=Ce({},r,(t={},t.rings=A[0],t))):(i=pt.MULTI_POLYGON,r=Ce({},r,(n={},n.rings=A,n)))}var l=Rd[i];return Hn(l(r),!1,e)}function Oht(r,e){var t=[],n=[],i=[],a,o;for(a=0,o=r.length;a<o;++a){t.length=0,b0(t,0,r[a],e.length);var s=FC(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=fs(new Rg(u).getExtent(),new Rg(A).getExtent());if(c){n[a].push(A),l=!0;break}}l||n.push([A.reverse()])}return n}function Fht(r){var e;return r.m!==void 0&&r.z!==void 0?e=new xr([r.x,r.y,r.z,r.m],ae.XYZM):r.z!==void 0?e=new xr([r.x,r.y,r.z],ae.XYZ):r.m!==void 0?e=new xr([r.x,r.y,r.m],ae.XYM):e=new xr([r.x,r.y]),e}function Rht(r){var e=sv(r);return new en(r.paths[0],e)}function Mht(r){var e=sv(r);return new Xa(r.paths,e)}function sv(r){var e=ae.XY;return r.hasZ===!0&&r.hasM===!0?e=ae.XYZM:r.hasZ===!0?e=ae.XYZ:r.hasM===!0&&(e=ae.XYM),e}function Nht(r){var e=sv(r);return new Gs(r.points,e)}function Pht(r){var e=sv(r);return new qa(r.rings,e)}function Uht(r){var e=sv(r);return new Dn(r.rings,e)}function Dht(r,e){var t=r.getCoordinates(),n,i=r.getLayout();return i===ae.XYZ?n={x:t[0],y:t[1],z:t[2]}:i===ae.XYM?n={x:t[0],y:t[1],m:t[2]}:i===ae.XYZM?n={x:t[0],y:t[1],z:t[2],m:t[3]}:i===ae.XY?n={x:t[0],y:t[1]}:Le(!1,34),n}function D0(r){var e=r.getLayout();return{hasZ:e===ae.XYZ||e===ae.XYZM,hasM:e===ae.XYM||e===ae.XYZM}}function Qht(r,e){var t=D0(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:[r.getCoordinates()]}}function kht(r,e){var t=D0(r);return{hasZ:t.hasZ,hasM:t.hasM,rings:r.getCoordinates(!1)}}function Hht(r,e){var t=D0(r);return{hasZ:t.hasZ,hasM:t.hasM,paths:r.getCoordinates()}}function Ght(r,e){var t=D0(r);return{hasZ:t.hasZ,hasM:t.hasM,points:r.getCoordinates()}}function $ht(r,e){for(var t=D0(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 Y5(r,e){var t=Md[r.getType()];return t(Hn(r,!0,e),e)}var Vht=Lht,jht=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Kht=function(r){jht(e,r);function e(t){var n=this,i=t||{};return n=r.call(this)||this,n.dataProjection=Ve(i.dataProjection?i.dataProjection:"EPSG:4326"),i.featureProjection&&(n.defaultFeatureProjection=Ve(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=ZI(i.geometry,n),o=new _r;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 ZI(t,n)},e.prototype.readProjectionFromObject=function(t){var n=t.crs,i;return n?n.type=="name"?i=Ve(n.properties.name):n.type==="EPSG"?i=Ve("EPSG:"+n.properties.code):Le(!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=JI(s,n),delete o[t.getGeometryName()]),nd(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 JI(t,this.adaptOptions(n))},e}(mR);function ZI(r,e){if(!r)return null;var t;switch(r.type){case pt.POINT:{t=zht(r);break}case pt.LINE_STRING:{t=Yht(r);break}case pt.POLYGON:{t=Jht(r);break}case pt.MULTI_POINT:{t=qht(r);break}case pt.MULTI_LINE_STRING:{t=Xht(r);break}case pt.MULTI_POLYGON:{t=Zht(r);break}case pt.GEOMETRY_COLLECTION:{t=Wht(r);break}default:throw new Error("Unsupported GeoJSON type: "+r.type)}return Hn(t,!1,e)}function Wht(r,e){var t=r.geometries.map(function(n){return ZI(n,e)});return new Ca(t)}function zht(r){return new xr(r.coordinates)}function Yht(r){return new en(r.coordinates)}function Xht(r){return new Xa(r.coordinates)}function qht(r){return new Gs(r.coordinates)}function Zht(r){return new qa(r.coordinates)}function Jht(r){return new Dn(r.coordinates)}function JI(r,e){r=Hn(r,!0,e);var t=r.getType(),n;switch(t){case pt.POINT:{n=aft(r);break}case pt.LINE_STRING:{n=eft(r);break}case pt.POLYGON:{n=oft(r,e);break}case pt.MULTI_POINT:{n=nft(r);break}case pt.MULTI_LINE_STRING:{n=rft(r);break}case pt.MULTI_POLYGON:{n=ift(r,e);break}case pt.GEOMETRY_COLLECTION:{n=tft(r,e);break}case pt.CIRCLE:{n={type:"GeometryCollection",geometries:[]};break}default:throw new Error("Unsupported geometry type: "+t)}return n}function tft(r,e){var t=r.getGeometriesArray().map(function(n){var i=Ce({},e);return delete i.featureProjection,JI(n,i)});return{type:"GeometryCollection",geometries:t}}function eft(r,e){return{type:"LineString",coordinates:r.getCoordinates()}}function rft(r,e){return{type:"MultiLineString",coordinates:r.getCoordinates()}}function nft(r,e){return{type:"MultiPoint",coordinates:r.getCoordinates()}}function ift(r,e){var t;return e&&(t=e.rightHanded),{type:"MultiPolygon",coordinates:r.getCoordinates(t)}}function aft(r,e){return{type:"Point",coordinates:r.getCoordinates()}}function oft(r,e){var t;return e&&(t=e.rightHanded),{type:"Polygon",coordinates:r.getCoordinates(t)}}var sft=Kht,ld="http://www.w3.org/2001/XMLSchema-instance";function Je(r,e){return Av().createElementNS(r,e)}function Eo(r,e){return SG(r,e,[]).join("")}function SG(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)SG(n,e,t)}return t}function sl(r){return"documentElement"in r}function Aft(r,e,t){return r.getAttributeNS(e,t)||""}function Al(r){return new DOMParser().parseFromString(r,"application/xml")}function X5(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];tn(a,i)}}}function Ie(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 $e(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 xn(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 dt(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 vt(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 xG(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=qn(i.localName)}IG(t,n,a,o)}}function qn(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 Je(l,A)}}var la=qn();function Go(r,e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=r[e[i]];return n}function kt(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 Do(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 Kt(r,e,t,n,i){return n.push(r),Do(e,t,n,i),n.pop()}function IG(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 Xe(r,e,t,n,i,a,o){return i.push(r),IG(e,t,n,i,a,o),i.pop()}var fT=void 0;function lft(){return fT===void 0&&typeof XMLSerializer<"u"&&(fT=new XMLSerializer),fT}var dT=void 0;function Av(){return dT===void 0&&typeof document<"u"&&(dT=document.implementation.createDocument("","",null)),dT}var uft=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),cft=function(r){uft(e,r);function e(){var t=r.call(this)||this;return t.xmlSerializer_=lft(),t}return e.prototype.getType=function(){return hA.XML},e.prototype.readFeature=function(t,n){if(t)if(typeof t=="string"){var i=Al(t);return this.readFeatureFromDocument(i,n)}else return sl(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=Al(t);return this.readFeaturesFromDocument(i,n)}else return sl(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&&tn(i,this.readFeaturesFromNode(a,n));return i},e.prototype.readFeaturesFromNode=function(t,n){return Re()},e.prototype.readGeometry=function(t,n){if(t)if(typeof t=="string"){var i=Al(t);return this.readGeometryFromDocument(i,n)}else return sl(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=Al(t);return this.readProjectionFromDocument(n)}else return sl(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}(U0),Q0=cft,hft=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),gu="http://www.opengis.net/gml",fft=/^[\s\xa0]*$/,li=function(r){hft(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:Ie(n.readFeaturesInternal),featureMembers:$e(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=Kt([],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 d=f.nodeName.split(":").pop();if(s.indexOf(d)===-1){var g="",m=0,v=f.namespaceURI;for(var y in A){if(A[y]===v){g=y;break}++m}g||(g=l+m,A[g]=v),s.push(g+":"+d)}}}i!="featureMember"&&(o.featureType=s,o.featureNS=A)}if(typeof A=="string"){var w=A;A={},A[u]=w}var C={},O=Array.isArray(s)?s:[s];for(var F in A){for(var I={},c=0,h=O.length;c<h;++c){var T=O[c].indexOf(":")===-1?u:O[c].split(":")[0];T===F&&(I[O[c].split(":").pop()]=i=="featureMembers"?Ie(this.readFeatureElement,this):$e(this.readFeatureElement,this))}C[A[F]]=I}i=="featureMember"||i=="member"?a=Kt(void 0,C,t,n):a=Kt([],C,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"),Kt(null,this.GEOMETRY_PARSERS,t,n,this)},e.prototype.readExtentElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?vR(a,i):void 0},e.prototype.readGeometryElement=function(t,n){var i=n[0],a=this.readGeometryOrExtent(t,n);return a?Hn(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=Eo(s,!1),fft.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 _r(o);a&&f.setGeometryName(a);var d=t.getAttribute("fid")||Aft(t,this.namespace,"id");return d&&f.setId(d),f}else return o},e.prototype.readFeatureElement=function(t,n){return this.readFeatureElementInternal(t,n,!0)},e.prototype.readPoint=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i)return new xr(i,ae.XYZ)},e.prototype.readMultiPoint=function(t,n){var i=Kt([],this.MULTIPOINT_PARSERS,t,n,this);if(i)return new Gs(i)},e.prototype.readMultiLineString=function(t,n){var i=Kt([],this.MULTILINESTRING_PARSERS,t,n,this);if(i)return new Xa(i)},e.prototype.readMultiPolygon=function(t,n){var i=Kt([],this.MULTIPOLYGON_PARSERS,t,n,this);if(i)return new qa(i)},e.prototype.pointMemberParser=function(t,n){Do(this.POINTMEMBER_PARSERS,t,n,this)},e.prototype.lineStringMemberParser=function(t,n){Do(this.LINESTRINGMEMBER_PARSERS,t,n,this)},e.prototype.polygonMemberParser=function(t,n){Do(this.POLYGONMEMBER_PARSERS,t,n,this)},e.prototype.readLineString=function(t,n){var i=this.readFlatCoordinatesFromNode(t,n);if(i){var a=new en(i,ae.XYZ);return a}else return},e.prototype.readFlatLinearRing=function(t,n){var i=Kt(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 Rg(i,ae.XYZ)},e.prototype.readPolygon=function(t,n){var i=Kt([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)tn(a,i[s]),o.push(a.length);return new Dn(a,ae.XYZ,o)}else return},e.prototype.readFlatCoordinatesFromNode=function(t,n){return Kt(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&&Ce(i,this.getReadOptions(t,n));var a=this.readFeaturesInternal(t,[i]);return a||[]},e.prototype.readProjectionFromNode=function(t){return Ve(this.srsName?this.srsName:t.firstElementChild.getAttribute("srsName"))},e}(Q0);li.prototype.namespace=gu;li.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{}};li.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{}};li.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{}};li.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml":{pointMember:Ie(li.prototype.pointMemberParser),pointMembers:Ie(li.prototype.pointMemberParser)}};li.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml":{lineStringMember:Ie(li.prototype.lineStringMemberParser),lineStringMembers:Ie(li.prototype.lineStringMemberParser)}};li.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml":{polygonMember:Ie(li.prototype.polygonMemberParser),polygonMembers:Ie(li.prototype.polygonMemberParser)}};li.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml":{Point:Ie(li.prototype.readFlatCoordinatesFromNode)}};li.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Ie(li.prototype.readLineString)}};li.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Ie(li.prototype.readPolygon)}};li.prototype.RING_PARSERS={"http://www.opengis.net/gml":{LinearRing:$e(li.prototype.readFlatLinearRing)}};var Cr=li;function vh(r){var e=Eo(r,!1);return $f(e)}function $f(r){var e=/^\s*(true|1)|(false|0)\s*$/.exec(r);if(e)return e[1]!==void 0||!1}function yR(r){var e=Eo(r,!1),t=Date.parse(e);return isNaN(t)?void 0:t/1e3}function Vr(r){var e=Eo(r,!1);return ou(e)}function ou(r){var e=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(r);if(e)return parseFloat(e[1])}function Ti(r){var e=Eo(r,!1);return lu(e)}function lu(r){var e=/^\s*(\d+)\s*$/.exec(r);if(e)return parseInt(e[1],10)}function Xt(r){return Eo(r,!1).trim()}function kg(r,e){We(r,e?"1":"0")}function dft(r,e){r.appendChild(Av().createCDATASection(e))}function pft(r,e){var t=new Date(e*1e3),n=t.getUTCFullYear()+"-"+rm(t.getUTCMonth()+1,2)+"-"+rm(t.getUTCDate(),2)+"T"+rm(t.getUTCHours(),2)+":"+rm(t.getUTCMinutes(),2)+":"+rm(t.getUTCSeconds(),2)+"Z";r.appendChild(Av().createTextNode(n))}function Ro(r,e){var t=e.toPrecision();r.appendChild(Av().createTextNode(t))}function CE(r,e){var t=e.toString();r.appendChild(Av().createTextNode(t))}function We(r,e){r.appendChild(Av().createTextNode(e))}var gft=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),vft=gu+" http://schemas.opengis.net/gml/2.1.2/feature.xsd",mft={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Ur=function(r){gft(e,r);function e(t){var n=this,i=t||{};return n=r.call(this,i)||this,n.FEATURE_COLLECTION_PARSERS[gu].featureMember=Ie(n.readFeaturesInternal),n.schemaLocation=i.schemaLocation?i.schemaLocation:vft,n}return e.prototype.readFlatCoordinates=function(t,n){var i=Eo(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s="enu";if(o){var A=Ve(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(/,+/),d=parseFloat(f[0]),g=parseFloat(f[1]),m=f.length===3?parseFloat(f[2]):0;s.substr(0,2)==="en"?u.push(d,g,m):u.push(g,d,m)}return u},e.prototype.readBox=function(t,n){var i=Kt([null],this.BOX_PARSERS_,t,n,this);return ko(i[1][0],i[1][1],i[1][3],i[1][4])},e.prototype.innerBoundaryIsParser=function(t,n){var i=Kt(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=Kt(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")),Je("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]=vt(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=vt(We)))}}var d=Ce({},o);d.node=t,Xe(d,o.serializers,qn(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=Je(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();Xe({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=Ce({},a);o.node=t;var s;Array.isArray(n)?s=vR(n,a):s=Hn(n,!0,a),Xe(o,this.GEOMETRY_SERIALIZERS,this.GEOMETRY_NODE_FACTORY_,[s],i,void 0,this)},e.prototype.createCoordinatesNode_=function(t){var n=Je(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)}We(t,u.join(" "))},e.prototype.writeCurveSegments_=function(t,n,i){var a=Je(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();Xe({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=Je(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),Je(o.namespaceURI,s!==void 0?"innerBoundaryIs":"outerBoundaryIs")},e.prototype.writeSurfacePatches_=function(t,n,i){var a=Je(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeRing=function(t,n,i){var a=Je(t.namespaceURI,"LinearRing");t.appendChild(a),this.writeLinearRing(a,n,i)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Ve(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);We(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();Xe({node:t,hasZ:o,srsName:s},this.POINTMEMBER_SERIALIZERS,qn("pointMember"),A,i,void 0,this)},e.prototype.writePointMember=function(t,n,i){var a=Je(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();Xe({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]];Xe({node:t},this.ENVELOPE_SERIALIZERS,la,A,i,s,this)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return Je("http://www.opengis.net/gml",mft[a.nodeName])},e}(Cr);Ur.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{coordinates:$e(Ur.prototype.readFlatCoordinates)}};Ur.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{innerBoundaryIs:Ur.prototype.innerBoundaryIsParser,outerBoundaryIs:Ur.prototype.outerBoundaryIsParser}};Ur.prototype.BOX_PARSERS_={"http://www.opengis.net/gml":{coordinates:Ie(Ur.prototype.readFlatCoordinates)}};Ur.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:$e(Cr.prototype.readPoint),MultiPoint:$e(Cr.prototype.readMultiPoint),LineString:$e(Cr.prototype.readLineString),MultiLineString:$e(Cr.prototype.readMultiLineString),LinearRing:$e(Cr.prototype.readLinearRing),Polygon:$e(Cr.prototype.readPolygon),MultiPolygon:$e(Cr.prototype.readMultiPolygon),Box:$e(Ur.prototype.readBox)}};Ur.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:vt(Ur.prototype.writeCurveOrLineString),MultiCurve:vt(Ur.prototype.writeMultiCurveOrLineString),Point:vt(Ur.prototype.writePoint),MultiPoint:vt(Ur.prototype.writeMultiPoint),LineString:vt(Ur.prototype.writeCurveOrLineString),MultiLineString:vt(Ur.prototype.writeMultiCurveOrLineString),LinearRing:vt(Ur.prototype.writeLinearRing),Polygon:vt(Ur.prototype.writeSurfaceOrPolygon),MultiPolygon:vt(Ur.prototype.writeMultiSurfaceOrPolygon),Surface:vt(Ur.prototype.writeSurfaceOrPolygon),MultiSurface:vt(Ur.prototype.writeMultiSurfaceOrPolygon),Envelope:vt(Ur.prototype.writeEnvelope)}};Ur.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:vt(Ur.prototype.writeLineStringOrCurveMember),curveMember:vt(Ur.prototype.writeLineStringOrCurveMember)}};Ur.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{outerBoundaryIs:vt(Ur.prototype.writeRing),innerBoundaryIs:vt(Ur.prototype.writeRing)}};Ur.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:vt(Ur.prototype.writePointMember)}};Ur.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:vt(Ur.prototype.writeSurfaceOrPolygonMember),polygonMember:vt(Ur.prototype.writeSurfaceOrPolygonMember)}};Ur.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:vt(We),upperCorner:vt(We)}};var lv=Ur,yft=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),_ft=gu+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",wft={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},Fe=function(r){yft(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:_ft,n.hasZ=i.hasZ!==void 0?i.hasZ:!1,n}return e.prototype.readMultiCurve=function(t,n){var i=Kt([],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=Kt([],this.MULTISURFACE_PARSERS,t,n,this);if(i)return new qa(i)},e.prototype.curveMemberParser=function(t,n){Do(this.CURVEMEMBER_PARSERS,t,n,this)},e.prototype.surfaceMemberParser=function(t,n){Do(this.SURFACEMEMBER_PARSERS,t,n,this)},e.prototype.readPatch=function(t,n){return Kt([null],this.PATCHES_PARSERS,t,n,this)},e.prototype.readSegment=function(t,n){return Kt([null],this.SEGMENTS_PARSERS,t,n,this)},e.prototype.readPolygonPatch=function(t,n){return Kt([null],this.FLAT_LINEAR_RINGS_PARSERS,t,n,this)},e.prototype.readLineStringSegment=function(t,n){return Kt([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,t,n,this)},e.prototype.interiorParser=function(t,n){var i=Kt(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=Kt(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=Kt([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)tn(a,i[s]),o.push(a.length);return new Dn(a,ae.XYZ,o)}else return},e.prototype.readCurve=function(t,n){var i=Kt([null],this.CURVE_PARSERS,t,n,this);if(i){var a=new en(i,ae.XYZ);return a}else return},e.prototype.readEnvelope=function(t,n){var i=Kt([null],this.ENVELOPE_PARSERS,t,n,this);return ko(i[1][0],i[1][1],i[2][0],i[2][1])},e.prototype.readFlatPos=function(t,n){for(var i=Eo(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=Ve(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 d=o[h],g=o[h+1];o[h]=g,o[h+1]=d}}var m=o.length;if(m==2&&o.push(0),m!==0)return o}},e.prototype.readFlatPosList=function(t,n){var i=Eo(t,!1).replace(/^\s*|\s*$/g,""),a=n[0],o=a.srsName,s=a.srsDimension,A="enu";if(o){var l=Ve(o);A=l.getAxisOrientation()}var u=i.split(/\s+/),c=2;t.getAttribute("srsDimension")?c=lu(t.getAttribute("srsDimension")):t.getAttribute("dimension")?c=lu(t.getAttribute("dimension")):t.parentNode.getAttribute("srsDimension")?c=lu(t.parentNode.getAttribute("srsDimension")):s&&(c=lu(s));for(var h,f,d,g=[],m=0,v=u.length;m<v;m+=c)h=parseFloat(u[m]),f=parseFloat(u[m+1]),d=c===3?parseFloat(u[m+2]):0,A.substr(0,2)==="en"?g.push(h,f,d):g.push(f,h,d);return g},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=Ve(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}We(t,c)},e.prototype.getCoords_=function(t,n,i){var a="enu";n&&(a=Ve(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);We(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=Je(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]];Xe({node:t},this.ENVELOPE_SERIALIZERS,la,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=Je(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),Je(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();Xe({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=Je(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=Je(t.namespaceURI,"posList");t.appendChild(s),this.writePosList_(s,n,i)}else if(t.nodeName==="Curve"){var A=Je(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();Xe({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();Xe({node:t,hasZ:s,srsName:o},this.POINTMEMBER_SERIALIZERS,qn("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();Xe({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=Je(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=Je(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=Je(t.namespaceURI,"PolygonPatch");t.appendChild(a),this.writeSurfaceOrPolygon(a,n,i)},e.prototype.writeCurveSegments_=function(t,n,i){var a=Je(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=Ce({},a);o.node=t;var s;Array.isArray(n)?s=vR(n,a):s=Hn(n,!0,a),Xe(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]=vt(this.writeGeometryElement,this)):h in o.serializers[s]||(o.serializers[s][h]=vt(We)))}}var d=Ce({},o);d.node=t,Xe(d,o.serializers,qn(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]=vt(this.writeFeatureElement,this);var l=Ce({},a);l.node=t,Xe(l,A,qn(o,s),n,i)},e.prototype.MULTIGEOMETRY_MEMBER_NODE_FACTORY_=function(t,n,i){var a=n[n.length-1].node;return Je(this.namespace,wft[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")),Je(this.namespace,u)},e.prototype.writeGeometryNode=function(t,n){n=this.adaptOptions(n);var i=Je(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&&Ce(a,n),this.writeGeometryElement(i,t,[a]),i},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Je(this.namespace,"featureMembers");i.setAttributeNS(ld,"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&&Ce(a,n),this.writeFeatureMembers_(i,t,[a]),i},e}(Cr);Fe.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml":{pos:$e(Fe.prototype.readFlatPos),posList:$e(Fe.prototype.readFlatPosList),coordinates:$e(lv.prototype.readFlatCoordinates)}};Fe.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml":{interior:Fe.prototype.interiorParser,exterior:Fe.prototype.exteriorParser}};Fe.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml":{Point:$e(Cr.prototype.readPoint),MultiPoint:$e(Cr.prototype.readMultiPoint),LineString:$e(Cr.prototype.readLineString),MultiLineString:$e(Cr.prototype.readMultiLineString),LinearRing:$e(Cr.prototype.readLinearRing),Polygon:$e(Cr.prototype.readPolygon),MultiPolygon:$e(Cr.prototype.readMultiPolygon),Surface:$e(Fe.prototype.readSurface),MultiSurface:$e(Fe.prototype.readMultiSurface),Curve:$e(Fe.prototype.readCurve),MultiCurve:$e(Fe.prototype.readMultiCurve),Envelope:$e(Fe.prototype.readEnvelope)}};Fe.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml":{curveMember:Ie(Fe.prototype.curveMemberParser),curveMembers:Ie(Fe.prototype.curveMemberParser)}};Fe.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml":{surfaceMember:Ie(Fe.prototype.surfaceMemberParser),surfaceMembers:Ie(Fe.prototype.surfaceMemberParser)}};Fe.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml":{LineString:Ie(Cr.prototype.readLineString),Curve:Ie(Fe.prototype.readCurve)}};Fe.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml":{Polygon:Ie(Cr.prototype.readPolygon),Surface:Ie(Fe.prototype.readSurface)}};Fe.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml":{patches:$e(Fe.prototype.readPatch)}};Fe.prototype.CURVE_PARSERS={"http://www.opengis.net/gml":{segments:$e(Fe.prototype.readSegment)}};Fe.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml":{lowerCorner:Ie(Fe.prototype.readFlatPosList),upperCorner:Ie(Fe.prototype.readFlatPosList)}};Fe.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml":{PolygonPatch:$e(Fe.prototype.readPolygonPatch)}};Fe.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml":{LineStringSegment:$e(Fe.prototype.readLineStringSegment)}};Fe.prototype.writeFeatures;Fe.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml":{exterior:vt(Fe.prototype.writeRing),interior:vt(Fe.prototype.writeRing)}};Fe.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml":{lowerCorner:vt(We),upperCorner:vt(We)}};Fe.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{surfaceMember:vt(Fe.prototype.writeSurfaceOrPolygonMember),polygonMember:vt(Fe.prototype.writeSurfaceOrPolygonMember)}};Fe.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{pointMember:vt(Fe.prototype.writePointMember)}};Fe.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml":{lineStringMember:vt(Fe.prototype.writeLineStringOrCurveMember),curveMember:vt(Fe.prototype.writeLineStringOrCurveMember)}};Fe.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml":{Curve:vt(Fe.prototype.writeCurveOrLineString),MultiCurve:vt(Fe.prototype.writeMultiCurveOrLineString),Point:vt(Fe.prototype.writePoint),MultiPoint:vt(Fe.prototype.writeMultiPoint),LineString:vt(Fe.prototype.writeCurveOrLineString),MultiLineString:vt(Fe.prototype.writeMultiCurveOrLineString),LinearRing:vt(Fe.prototype.writeLinearRing),Polygon:vt(Fe.prototype.writeSurfaceOrPolygon),MultiPolygon:vt(Fe.prototype.writeMultiSurfaceOrPolygon),Surface:vt(Fe.prototype.writeSurfaceOrPolygon),MultiSurface:vt(Fe.prototype.writeMultiSurfaceOrPolygon),Envelope:vt(Fe.prototype.writeEnvelope)}};var fr=Fe,_R=fr;_R.prototype.writeFeatures;_R.prototype.writeFeaturesNode;var Eft=_R,Cft=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Di=[null,"http://www.topografix.com/GPX/1/0","http://www.topografix.com/GPX/1/1"],Bft="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd",bft={rte:LG,trk:OG,wpt:FG},Tft=kt(Di,{rte:Ie(LG),trk:Ie(OG),wpt:Ie(FG)}),Sft=kt(Di,{text:dt(Xt,"linkText"),type:dt(Xt,"linkType")}),xft=kt(Di,{rte:vt(Zft),trk:vt(Jft),wpt:vt(edt)}),Ift=function(r){Cft(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ve("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(!Ni(Di,t.namespaceURI))return null;var i=bft[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(!Ni(Di,t.namespaceURI))return[];if(t.localName=="gpx"){var i=Kt([],Tft,t,[this.getReadOptions(t,n)]);return i?(this.handleReadExtensions_(i),i):[]}return[]},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Je("http://www.topografix.com/GPX/1/1","gpx"),a="http://www.w3.org/2000/xmlns/";return i.setAttributeNS(a,"xmlns:xsi",ld),i.setAttributeNS(ld,"xsi:schemaLocation",Bft),i.setAttribute("version","1.1"),i.setAttribute("creator","OpenLayers"),Xe({node:i},xft,zft,t,[n]),i},e}(Q0),Lft=kt(Di,{name:dt(Xt),cmt:dt(Xt),desc:dt(Xt),src:dt(Xt),link:CR,number:dt(Ti),extensions:BR,type:dt(Xt),rtept:Yft}),Oft=kt(Di,{ele:dt(Vr),time:dt(yR)}),Fft=kt(Di,{name:dt(Xt),cmt:dt(Xt),desc:dt(Xt),src:dt(Xt),link:CR,number:dt(Ti),type:dt(Xt),extensions:BR,trkseg:qft}),Rft=kt(Di,{trkpt:Xft}),Mft=kt(Di,{ele:dt(Vr),time:dt(yR)}),Nft=kt(Di,{ele:dt(Vr),time:dt(yR),magvar:dt(Vr),geoidheight:dt(Vr),name:dt(Xt),cmt:dt(Xt),desc:dt(Xt),src:dt(Xt),link:CR,sym:dt(Xt),type:dt(Xt),fix:dt(Xt),sat:dt(Ti),hdop:dt(Vr),vdop:dt(Vr),pdop:dt(Vr),ageofdgpsdata:dt(Vr),dgpsid:dt(Ti),extensions:BR}),Pft=["text","type"],Uft=kt(Di,{text:vt(We),type:vt(We)}),Dft=kt(Di,["name","cmt","desc","src","link","number","type","rtept"]),Qft=kt(Di,{name:vt(We),cmt:vt(We),desc:vt(We),src:vt(We),link:vt(bR),number:vt(CE),type:vt(We),rtept:xG(vt(TR))}),kft=kt(Di,["ele","time"]),Hft=kt(Di,["name","cmt","desc","src","link","number","type","trkseg"]),Gft=kt(Di,{name:vt(We),cmt:vt(We),desc:vt(We),src:vt(We),link:vt(bR),number:vt(CE),type:vt(We),trkseg:xG(vt(tdt))}),$ft=qn("trkpt"),Vft=kt(Di,{trkpt:vt(TR)}),jft=kt(Di,["ele","time","magvar","geoidheight","name","cmt","desc","src","link","sym","type","fix","sat","hdop","vdop","pdop","ageofdgpsdata","dgpsid"]),Kft=kt(Di,{ele:vt(Ro),time:vt(pft),magvar:vt(Ro),geoidheight:vt(Ro),name:vt(We),cmt:vt(We),desc:vt(We),src:vt(We),link:vt(bR),sym:vt(We),type:vt(We),fix:vt(We),sat:vt(CE),hdop:vt(Ro),vdop:vt(Ro),pdop:vt(Ro),ageofdgpsdata:vt(Ro),dgpsid:vt(CE)}),Wft={Point:"wpt",LineString:"rte",MultiLineString:"trk"};function zft(r,e,t){var n=r.getGeometry();if(n){var i=Wft[n.getType()];if(i){var a=e[e.length-1].node;return Je(a.namespaceURI,i)}}}function wR(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 ER(r,e,t){var n=ae.XY,i=2;if(r.hasZ&&r.hasM?(n=ae.XYZM,i=4):r.hasZ?(n=ae.XYZ,i=3):r.hasM&&(n=ae.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 CR(r,e){var t=e[e.length-1],n=r.getAttribute("href");n!==null&&(t.link=n),Do(Sft,r,e)}function BR(r,e){var t=e[e.length-1];t.extensionsNode_=r}function Yft(r,e){var t=Kt({},Oft,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;wR(i,a,r,t)}}function Xft(r,e){var t=Kt({},Mft,r,e);if(t){var n=e[e.length-1],i=n.flatCoordinates,a=n.layoutOptions;wR(i,a,r,t)}}function qft(r,e){var t=e[e.length-1];Do(Rft,r,e);var n=t.flatCoordinates,i=t.ends;i.push(n.length)}function LG(r,e){var t=e[0],n=Kt({flatCoordinates:[],layoutOptions:{}},Lft,r,e);if(n){var i=n.flatCoordinates;delete n.flatCoordinates;var a=n.layoutOptions;delete n.layoutOptions;var o=ER(a,i),s=new en(i,o);Hn(s,!1,t);var A=new _r(s);return A.setProperties(n,!0),A}}function OG(r,e){var t=e[0],n=Kt({flatCoordinates:[],ends:[],layoutOptions:{}},Fft,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=ER(o,i,a),A=new Xa(i,s,a);Hn(A,!1,t);var l=new _r(A);return l.setProperties(n,!0),l}}function FG(r,e){var t=e[0],n=Kt({},Nft,r,e);if(n){var i={},a=wR([],i,r,n),o=ER(i,a),s=new xr(a,o);Hn(s,!1,t);var A=new _r(s);return A.setProperties(n,!0),A}}function bR(r,e,t){r.setAttribute("href",e);var n=t[t.length-1],i=n.properties,a=[i.linkText,i.linkType];Xe({node:r},Uft,la,a,t,Pft)}function TR(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 ae.XYZM:e[3]!==0&&(o.time=e[3]);case ae.XYZ:e[2]!==0&&(o.ele=e[2]);break;case ae.XYM:e[2]!==0&&(o.time=e[2]);break}var A=r.nodeName=="rtept"?kft[a]:jft[a],l=Go(o,A);Xe({node:r,properties:o},Kft,la,l,t,A)}function Zft(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==pt.LINE_STRING){var s=Hn(o,!0,n);a.geometryLayout=s.getLayout(),i.rtept=s.getCoordinates()}var A=t[t.length-1].node,l=Dft[A.namespaceURI],u=Go(i,l);Xe(a,Qft,la,u,t,l)}function Jft(r,e,t){var n=t[0],i=e.getProperties(),a={node:r};a.properties=i;var o=e.getGeometry();if(o.getType()==pt.MULTI_LINE_STRING){var s=Hn(o,!0,n);i.trkseg=s.getLineStrings()}var A=t[t.length-1].node,l=Hft[A.namespaceURI],u=Go(i,l);Xe(a,Gft,la,u,t,l)}function tdt(r,e,t){var n={node:r};n.geometryLayout=e.getLayout(),n.properties={},Xe(n,Vft,$ft,e.getCoordinates(),t)}function edt(r,e,t){var n=t[0],i=t[t.length-1];i.properties=e.getProperties();var a=e.getGeometry();if(a.getType()==pt.POINT){var o=Hn(a,!0,n);i.geometryLayout=o.getLayout(),TR(r,o.getCoordinates(),t)}}var rdt=Ift,ndt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),idt=function(r){ndt(e,r);function e(){return r.call(this)||this}return e.prototype.getType=function(){return hA.TEXT},e.prototype.readFeature=function(t,n){return this.readFeatureFromText(s1(t),this.adaptOptions(n))},e.prototype.readFeatureFromText=function(t,n){return Re()},e.prototype.readFeatures=function(t,n){return this.readFeaturesFromText(s1(t),this.adaptOptions(n))},e.prototype.readFeaturesFromText=function(t,n){return Re()},e.prototype.readGeometry=function(t,n){return this.readGeometryFromText(s1(t),this.adaptOptions(n))},e.prototype.readGeometryFromText=function(t,n){return Re()},e.prototype.readProjection=function(t){return this.readProjectionFromText(s1(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 Re()},e.prototype.writeFeatures=function(t,n){return this.writeFeaturesText(t,this.adaptOptions(n))},e.prototype.writeFeaturesText=function(t,n){return Re()},e.prototype.writeGeometry=function(t,n){return this.writeGeometryText(t,this.adaptOptions(n))},e.prototype.writeGeometryText=function(t,n){return Re()},e}(U0);function s1(r){return typeof r=="string"?r:""}var SR=idt,adt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),um={BAROMETRIC:"barometric",GPS:"gps",NONE:"none"},odt=/^B(\d{2})(\d{2})(\d{2})(\d{2})(\d{5})([NS])(\d{3})(\d{5})([EW])([AV])(\d{5})(\d{5})/,sdt=/^H.([A-Z]{3}).*?:(.*)/,Adt=/^HFDTE(\d{2})(\d{2})(\d{2})/,ldt=/\r\n|\r|\n/,udt=function(r){adt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ve("EPSG:4326"),n.altitudeMode_=i.altitudeMode?i.altitudeMode:um.NONE,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.altitudeMode_,a=t.split(ldt),o={},s=[],A=2e3,l=0,u=1,c=-1,h,f;for(h=0,f=a.length;h<f;++h){var d=a[h],g=void 0;if(d.charAt(0)=="B"){if(g=odt.exec(d),g){var m=parseInt(g[1],10),v=parseInt(g[2],10),y=parseInt(g[3],10),w=parseInt(g[4],10)+parseInt(g[5],10)/6e4;g[6]=="S"&&(w=-w);var C=parseInt(g[7],10)+parseInt(g[8],10)/6e4;if(g[9]=="W"&&(C=-C),s.push(C,w),i!=um.NONE){var O=void 0;i==um.GPS?O=parseInt(g[11],10):i==um.BAROMETRIC?O=parseInt(g[12],10):O=0,s.push(O)}var F=Date.UTC(A,l,u,m,v,y);F<c&&(F=Date.UTC(A,l,u+1,m,v,y)),s.push(F/1e3),c=F}}else d.charAt(0)=="H"&&(g=Adt.exec(d),g?(u=parseInt(g[1],10),l=parseInt(g[2],10)-1,A=2e3+parseInt(g[3],10)):(g=sdt.exec(d),g&&(o[g[1]]=g[2].trim())))}if(s.length===0)return null;var I=i==um.NONE?ae.XYM:ae.XYZM,T=new en(s,I),L=new _r(Hn(T,!1,n));return L.setProperties(o,!0),L},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return i?[i]:[]},e}(SR),cdt=udt,hdt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Uu=["http://www.google.com/kml/ext/2.2"],Me=[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"],fdt="http://www.opengis.net/kml/2.2 https://developers.google.com/kml/schema/kml22gx.xsd",q5={fraction:uo.FRACTION,pixels:uo.PIXELS,insetPixels:uo.PIXELS},ddt=kt(Me,{ExtendedData:WG,Region:zG,MultiGeometry:dt(VG,"geometry"),LineString:dt(GG,"geometry"),LinearRing:dt($G,"geometry"),Point:dt(jG,"geometry"),Polygon:dt(KG,"geometry"),Style:dt(LR),StyleMap:Xdt,address:dt(Xt),description:dt(Xt),name:dt(Xt),open:dt(vh),phoneNumber:dt(Xt),styleUrl:dt(UG),visibility:dt(vh)},kt(Uu,{MultiTrack:dt(Udt,"geometry"),Track:dt(HG,"geometry")})),pdt=kt(Me,{ExtendedData:WG,Region:zG,Link:Apt,address:dt(Xt),description:dt(Xt),name:dt(Xt),open:dt(vh),phoneNumber:dt(Xt),visibility:dt(vh)}),gdt=kt(Me,{href:dt(PG)}),RG=kt(Me,{LatLonAltBox:ept,Lod:npt}),vdt=kt(Me,["Document","Placemark"]),mdt=kt(Me,{Document:vt(gpt),Placemark:vt(qG)}),vg,dw=null,tL,Ay,ly,uy,BE,eL=null,xR,rL=null,nL,If=null,Z5=null,iL=null;function bE(r){return 32/Math.min(r[0],r[1])}function ydt(){vg=[255,255,255,1],dw=new Ba({color:vg}),tL=[20,2],Ay=uo.PIXELS,ly=uo.PIXELS,uy=[64,64],BE="https://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png",eL=new L0({anchor:tL,anchorOrigin:$i.BOTTOM_LEFT,anchorXUnits:Ay,anchorYUnits:ly,crossOrigin:"anonymous",rotation:0,scale:bE(uy),size:uy,src:BE}),xR="NO_IMAGE",rL=new zi({color:vg,width:1}),nL=new zi({color:[51,51,51,1],width:2}),If=new bd({font:"bold 16px Helvetica",fill:dw,stroke:nL,scale:.8}),Z5=new Ea({fill:dw,image:eL,text:If,stroke:rL,zIndex:0}),iL=[Z5]}var A1;function _dt(r){return r}var wdt=function(r){hdt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return iL||ydt(),n.dataProjection=Ve("EPSG:4326"),n.defaultStyle_=i.defaultStyle?i.defaultStyle:iL,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:_dt,n.supportedMediaTypes=["application/vnd.google-earth.kml+xml"],n}return e.prototype.readDocumentOrFolder_=function(t,n){var i=kt(Me,{Document:X5(this.readDocumentOrFolder_,this),Folder:X5(this.readDocumentOrFolder_,this),Placemark:Ie(this.readPlacemark_,this),Style:this.readSharedStyle_.bind(this),StyleMap:this.readSharedStyleMap_.bind(this)}),a=Kt([],i,t,n,this);if(a)return a},e.prototype.readPlacemark_=function(t,n){var i=Kt({geometry:null},ddt,t,n,this);if(i){var a=new _r,o=t.getAttribute("id");o!==null&&a.setId(o);var s=n[0],A=i.geometry;if(A&&Hn(A,!1,s),a.setGeometry(A),delete i.geometry,this.extractStyles_){var l=i.Style,u=i.styleUrl,c=Cdt(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=LR.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=QG.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(!Ni(Me,t.namespaceURI))return null;var i=this.readPlacemark_(t,[this.getReadOptions(t,n)]);return i||null},e.prototype.readFeaturesFromNode=function(t,n){if(!Ni(Me,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&&tn(i,A)}return i}else return[]},e.prototype.readName=function(t){if(t)if(typeof t=="string"){var n=Al(t);return this.readNameFromDocument(n)}else return sl(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(Ni(Me,n.namespaceURI)&&n.localName=="name")return Xt(n);for(var n=t.firstElementChild;n;n=n.nextElementSibling){var i=n.localName;if(Ni(Me,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=Al(t);tn(n,this.readNetworkLinksFromDocument(i))}else sl(t)?tn(n,this.readNetworkLinksFromDocument(t)):tn(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&&tn(n,this.readNetworkLinksFromNode(i));return n},e.prototype.readNetworkLinksFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(Ni(Me,i.namespaceURI)&&i.localName=="NetworkLink"){var a=Kt({},pdt,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;Ni(Me,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&tn(n,this.readNetworkLinksFromNode(i))}return n},e.prototype.readRegion=function(t){var n=[];if(typeof t=="string"){var i=Al(t);tn(n,this.readRegionFromDocument(i))}else sl(t)?tn(n,this.readRegionFromDocument(t)):tn(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&&tn(n,this.readRegionFromNode(i));return n},e.prototype.readRegionFromNode=function(t){for(var n=[],i=t.firstElementChild;i;i=i.nextElementSibling)if(Ni(Me,i.namespaceURI)&&i.localName=="Region"){var a=Kt({},RG,i,[]);n.push(a)}for(var i=t.firstElementChild;i;i=i.nextElementSibling){var o=i.localName;Ni(Me,i.namespaceURI)&&(o=="Document"||o=="Folder"||o=="kml")&&tn(n,this.readRegionFromNode(i))}return n},e.prototype.writeFeaturesNode=function(t,n){n=this.adaptOptions(n);var i=Je(Me[4],"kml"),a="http://www.w3.org/2000/xmlns/";i.setAttributeNS(a,"xmlns:gx",Uu[0]),i.setAttributeNS(a,"xmlns:xsi",ld),i.setAttributeNS(ld,"xsi:schemaLocation",fdt);var o={node:i},s={};t.length>1?s.Document=t:t.length==1&&(s.Placemark=t[0]);var A=vdt[i.namespaceURI],l=Go(s,A);return Xe(o,mdt,la,l,[n],A,this),i},e}(Q0);function Edt(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()||If.getFont()),A.setScale(A.getScale()||If.getScale()),A.setFill(A.getFill()||If.getFill()),A.setStroke(A.getStroke()||nL)):A=If.clone(),A.setText(e),A.setOffsetX(t[0]),A.setOffsetY(t[1]),A.setTextAlign(n);var l=new Ea({image:i,text:A});return l}function Cdt(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 Ca)l=u.getGeometriesArrayRecursive().filter(function(g){var m=g.getType();return m===pt.POINT||m===pt.MULTI_POINT}),s=l.length>0;else{var c=u.getType();s=c===pt.POINT||c===pt.MULTI_POINT}}s&&(A=a.get("name"),s=s&&!!A,s&&A.search(/&[^&]+;/)>-1&&(A1||(A1=document.createElement("textarea")),A1.innerHTML=A,A=A1.value));var h=t;if(r?h=r:e&&(h=MG(e,t,n)),s){var f=Edt(h[0],A);if(l.length>0){f.setGeometry(new Ca(l));var d=new Ea({geometry:h[0].getGeometry(),image:null,fill:h[0].getFill(),stroke:h[0].getStroke(),text:null});return[f,d].concat(h.slice(1))}return f}return h}}function MG(r,e,t){return Array.isArray(r)?r:typeof r=="string"?MG(t[r],e,t):e}function nB(r){var e=Eo(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 NG(r){var e=Eo(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 PG(r){var e=Eo(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 UG(r){var e=Eo(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 Bdt(r){var e=r.getAttribute("xunits"),t=r.getAttribute("yunits"),n;return e!=="insetPixels"?t!=="insetPixels"?n=$i.BOTTOM_LEFT:n=$i.TOP_LEFT:t!=="insetPixels"?n=$i.BOTTOM_RIGHT:n=$i.TOP_RIGHT,{x:parseFloat(r.getAttribute("x")),xunits:q5[e],y:parseFloat(r.getAttribute("y")),yunits:q5[t],origin:n}}function DG(r){return Vr(r)}var bdt=kt(Me,{Pair:Ydt});function QG(r,e){return Kt(void 0,bdt,r,e,this)}var Tdt=kt(Me,{Icon:dt(kdt),color:dt(nB),heading:dt(Vr),hotSpot:dt(Bdt),scale:dt(DG)});function Sdt(r,e){var t=Kt({},Tdt,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=BE);var A,l,u,c=$i.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=tL,l=Ay,u=ly):/arrow-reverse/.test(o)?(A=[54,42],l=Ay,u=ly):/paddle/.test(o)&&(A=[32,1],l=Ay,u=ly));var f,d=i.x,g=i.y;d!==void 0&&g!==void 0&&(f=[d,g]);var m,v=i.w,y=i.h;v!==void 0&&y!==void 0&&(m=[v,y]);var w,C=t.heading;C!==void 0&&(w=Wc(C));var O=t.scale,F=t.color;if(a){o==BE&&(m=uy);var I=new L0({anchor:A,anchorOrigin:c,anchorXUnits:l,anchorYUnits:u,crossOrigin:this.crossOrigin_,offset:f,offsetOrigin:$i.BOTTOM_LEFT,rotation:w,scale:O,size:m,src:this.iconUrlFunction_(o),color:F}),T=I.getScaleArray()[0],L=I.getSize();if(L===null){var N=I.getImageState();if(N===rr.IDLE||N===rr.LOADING){var x=function(){var P=I.getImageState();if(!(P===rr.IDLE||P===rr.LOADING)){var U=I.getSize();if(U&&U.length==2){var tt=bE(U);I.setScale(T*tt)}I.unlistenImageChange(x)}};I.listenImageChange(x),N===rr.IDLE&&I.load()}}else if(L.length==2){var S=bE(L);I.setScale(T*S)}n.imageStyle=I}else n.imageStyle=xR}}var xdt=kt(Me,{color:dt(nB),scale:dt(DG)});function Idt(r,e){var t=Kt({},xdt,r,e);if(t){var n=e[e.length-1],i=new bd({fill:new Ba({color:"color"in t?t.color:vg}),scale:t.scale});n.textStyle=i}}var Ldt=kt(Me,{color:dt(nB),width:dt(Vr)});function Odt(r,e){var t=Kt({},Ldt,r,e);if(t){var n=e[e.length-1],i=new zi({color:"color"in t?t.color:vg,width:"width"in t?t.width:1});n.strokeStyle=i}}var Fdt=kt(Me,{color:dt(nB),fill:dt(vh),outline:dt(vh)});function Rdt(r,e){var t=Kt({},Fdt,r,e);if(t){var n=e[e.length-1],i=new Ba({color:"color"in t?t.color:vg});n.fillStyle=i;var a=t.fill;a!==void 0&&(n.fill=a);var o=t.outline;o!==void 0&&(n.outline=o)}}var Mdt=kt(Me,{coordinates:$e(NG)});function kG(r,e){return Kt(null,Mdt,r,e)}function Ndt(r,e){var t=e[e.length-1],n=t.coordinates,i=Eo(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 Pdt=kt(Uu,{Track:Ie(HG)});function Udt(r,e){var t=Kt([],Pdt,r,e);if(t)return new Xa(t)}var Ddt=kt(Me,{when:lpt},kt(Uu,{coord:Ndt}));function HG(r,e){var t=Kt({coordinates:[],whens:[]},Ddt,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 en(n,ae.XYZM)}}var Qdt=kt(Me,{href:dt(PG)},kt(Uu,{x:dt(Vr),y:dt(Vr),w:dt(Vr),h:dt(Vr)}));function kdt(r,e){var t=Kt({},Qdt,r,e);return t||null}var Hdt=kt(Me,{coordinates:$e(NG)});function IR(r,e){return Kt(null,Hdt,r,e)}var iB=kt(Me,{extrude:dt(vh),tessellate:dt(vh),altitudeMode:dt(Xt)});function GG(r,e){var t=Kt({},iB,r,e),n=IR(r,e);if(n){var i=new en(n,ae.XYZ);return i.setProperties(t,!0),i}else return}function $G(r,e){var t=Kt({},iB,r,e),n=IR(r,e);if(n){var i=new Dn(n,ae.XYZ,[n.length]);return i.setProperties(t,!0),i}else return}var Gdt=kt(Me,{LineString:Ie(GG),LinearRing:Ie($G),MultiGeometry:Ie(VG),Point:Ie(jG),Polygon:Ie(KG)});function VG(r,e){var t=Kt([],Gdt,r,e);if(!t)return null;if(t.length===0)return new Ca(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==pt.POINT){var c=t[0];l=c.getLayout(),u=c.getFlatCoordinates();for(var s=1,A=t.length;s<A;++s)o=t[s],tn(u,o.getFlatCoordinates());n=new Gs(u,l),pT(n,t)}else a==pt.LINE_STRING?(n=new Xa(t),pT(n,t)):a==pt.POLYGON?(n=new qa(t),pT(n,t)):a==pt.GEOMETRY_COLLECTION?n=new Ca(t):Le(!1,37)}else n=new Ca(t);return n}function jG(r,e){var t=Kt({},iB,r,e),n=IR(r,e);if(n){var i=new xr(n,ae.XYZ);return i.setProperties(t,!0),i}else return}var $dt=kt(Me,{innerBoundaryIs:apt,outerBoundaryIs:spt});function KG(r,e){var t=Kt({},iB,r,e),n=Kt([null],$dt,r,e);if(n&&n[0]){for(var i=n[0],a=[i.length],o=1,s=n.length;o<s;++o)tn(i,n[o]),a.push(i.length);var A=new Dn(i,ae.XYZ,a);return A.setProperties(t,!0),A}else return}var Vdt=kt(Me,{IconStyle:Sdt,LabelStyle:Idt,LineStyle:Odt,PolyStyle:Rdt});function LR(r,e){var t=Kt({},Vdt,r,e,this);if(!t)return null;var n="fillStyle"in t?t.fillStyle:dw,i=t.fill;i!==void 0&&!i&&(n=null);var a;"imageStyle"in t?t.imageStyle!=xR&&(a=t.imageStyle):a=eL;var o="textStyle"in t?t.textStyle:If,s="strokeStyle"in t?t.strokeStyle:rL,A=t.outline;return A!==void 0&&!A?[new Ea({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===pt.GEOMETRY_COLLECTION){var h=u;return new Ca(h.getGeometriesArrayRecursive().filter(function(f){var d=f.getType();return d!==pt.POLYGON&&d!==pt.MULTI_POLYGON}))}else if(c!==pt.POLYGON&&c!==pt.MULTI_POLYGON)return u},fill:n,image:a,stroke:s,text:o,zIndex:void 0}),new Ea({geometry:function(l){var u=l.getGeometry(),c=u.getType();if(c===pt.GEOMETRY_COLLECTION){var h=u;return new Ca(h.getGeometriesArrayRecursive().filter(function(f){var d=f.getType();return d===pt.POLYGON||d===pt.MULTI_POLYGON}))}else if(c===pt.POLYGON||c===pt.MULTI_POLYGON)return u},fill:n,stroke:null,zIndex:void 0})]:[new Ea({fill:n,image:a,stroke:s,text:o,zIndex:void 0})]}function pT(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 jdt=kt(Me,{displayName:dt(Xt),value:dt(Xt)});function Kdt(r,e){var t=r.getAttribute("name");Do(jdt,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 Wdt=kt(Me,{Data:Kdt,SchemaData:Zdt});function WG(r,e){Do(Wdt,r,e)}function zG(r,e){Do(RG,r,e)}var zdt=kt(Me,{Style:dt(LR),key:dt(Xt),styleUrl:dt(UG)});function Ydt(r,e){var t=Kt({},zdt,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 Xdt(r,e){var t=QG.call(this,r,e);if(t){var n=e[e.length-1];Array.isArray(t)?n.Style=t:typeof t=="string"?n.styleUrl=t:Le(!1,38)}}var qdt=kt(Me,{SimpleData:Jdt});function Zdt(r,e){Do(qdt,r,e)}function Jdt(r,e){var t=r.getAttribute("name");if(t!==null){var n=Xt(r),i=e[e.length-1];i[t]=n}}var tpt=kt(Me,{altitudeMode:dt(Xt),minAltitude:dt(Vr),maxAltitude:dt(Vr),north:dt(Vr),south:dt(Vr),east:dt(Vr),west:dt(Vr)});function ept(r,e){var t=Kt({},tpt,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 rpt=kt(Me,{minLodPixels:dt(Vr),maxLodPixels:dt(Vr),minFadeExtent:dt(Vr),maxFadeExtent:dt(Vr)});function npt(r,e){var t=Kt({},rpt,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 ipt=kt(Me,{LinearRing:Ie(kG)});function apt(r,e){var t=Kt([],ipt,r,e);if(t.length>0){var n=e[e.length-1];n.push.apply(n,t)}}var opt=kt(Me,{LinearRing:$e(kG)});function spt(r,e){var t=Kt(void 0,opt,r,e);if(t){var n=e[e.length-1];n[0]=t}}function Apt(r,e){Do(gdt,r,e)}function lpt(r,e){var t=e[e.length-1],n=t.whens,i=Eo(r,!1),a=Date.parse(i);n.push(isNaN(a)?0:a)}function aB(r,e){for(var t=uh(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}We(r,i.join(""))}function upt(r,e,t){var n=t[t.length-1],i=n.layout,a=n.stride,o;i==ae.XY||i==ae.XYM?o=2:i==ae.XYZ||i==ae.XYZM?o=3:Le(!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]}}We(r,A)}var pw=kt(Me,{Data:vt(cpt),value:vt(fpt),displayName:vt(hpt)});function cpt(r,e,t){r.setAttribute("name",e.name);var n={node:r},i=e.value;typeof i=="object"?(i!==null&&i.displayName&&Xe(n,pw,la,[i.displayName],t,["displayName"]),i!==null&&i.value&&Xe(n,pw,la,[i.value],t,["value"])):Xe(n,pw,la,[i],t,["value"])}function hpt(r,e){dft(r,e)}function fpt(r,e){We(r,e)}var dpt=kt(Me,{Placemark:vt(qG)}),ppt=function(r,e,t){var n=e[e.length-1].node;return Je(n.namespaceURI,"Placemark")};function gpt(r,e,t){var n={node:r};Xe(n,dpt,ppt,e,t,void 0,this)}var vpt=qn("Data");function mpt(r,e,t){for(var n={node:r},i=e.names,a=e.values,o=i.length,s=0;s<o;s++)Xe(n,pw,vpt,[{name:i[s],value:a[s]}],t)}var J5=kt(Me,["href"],kt(Uu,["x","y","w","h"])),tU=kt(Me,{href:vt(We)},kt(Uu,{x:vt(Ro),y:vt(Ro),w:vt(Ro),h:vt(Ro)})),ypt=function(r,e,t){return Je(Uu[0],"gx:"+t)};function _pt(r,e,t){var n={node:r},i=t[t.length-1].node,a=J5[i.namespaceURI],o=Go(e,a);Xe(n,tU,la,o,t,a),a=J5[Uu[0]],o=Go(e,a),Xe(n,tU,ypt,o,t,a)}var wpt=kt(Me,["scale","heading","Icon","color","hotSpot"]),Ept=kt(Me,{Icon:vt(_pt),color:vt(aB),heading:vt(Ro),hotSpot:vt(Ypt),scale:vt(JG)});function Cpt(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:uo.PIXELS,y:o[1]-l[1],yunits:uo.PIXELS};i.hotSpot=c}}i.Icon=A;var h=e.getScaleArray()[0],f=o;if(f===null&&(f=uy),f.length==2){var d=bE(f);h=h/d}h!==1&&(i.scale=h);var g=e.getRotation();g!==0&&(i.heading=g);var m=e.getColor();m&&(i.color=m);var v=t[t.length-1].node,y=wpt[v.namespaceURI],w=Go(i,y);Xe(n,Ept,la,w,t,y)}var Bpt=kt(Me,["color","scale"]),bpt=kt(Me,{color:vt(aB),scale:vt(JG)});function Tpt(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=Bpt[s.namespaceURI],l=Go(i,A);Xe(n,bpt,la,l,t,A)}var Spt=kt(Me,["color","width"]),xpt=kt(Me,{color:vt(aB),width:vt(Ro)});function Ipt(r,e,t){var n={node:r},i={color:e.getColor(),width:Number(e.getWidth())||1},a=t[t.length-1].node,o=Spt[a.namespaceURI],s=Go(i,o);Xe(n,xpt,la,s,t,o)}var Lpt={Point:"Point",LineString:"LineString",LinearRing:"LinearRing",Polygon:"Polygon",MultiPoint:"MultiGeometry",MultiLineString:"MultiGeometry",MultiPolygon:"MultiGeometry",GeometryCollection:"MultiGeometry"},YG=function(r,e,t){if(r){var n=e[e.length-1].node;return Je(n.namespaceURI,Lpt[r.getType()])}},Opt=qn("Point"),Fpt=qn("LineString"),Rpt=qn("LinearRing"),Mpt=qn("Polygon"),Npt=kt(Me,{LineString:vt(mg),Point:vt(mg),Polygon:vt(ZG),GeometryCollection:vt(XG)});function XG(r,e,t){var n={node:r},i=e.getType(),a=[],o;i===pt.GEOMETRY_COLLECTION?(e.getGeometriesArrayRecursive().forEach(function(s){var A=s.getType();A===pt.MULTI_POINT?a=a.concat(s.getPoints()):A===pt.MULTI_LINE_STRING?a=a.concat(s.getLineStrings()):A===pt.MULTI_POLYGON?a=a.concat(s.getPolygons()):A===pt.POINT||A===pt.LINE_STRING||A===pt.POLYGON?a.push(s):Le(!1,39)}),o=YG):i===pt.MULTI_POINT?(a=e.getPoints(),o=Opt):i===pt.MULTI_LINE_STRING?(a=e.getLineStrings(),o=Fpt):i===pt.MULTI_POLYGON?(a=e.getPolygons(),o=Mpt):Le(!1,39),Xe(n,Npt,o,a,t)}var Ppt=kt(Me,{LinearRing:vt(mg)});function eU(r,e,t){var n={node:r};Xe(n,Ppt,Rpt,[e],t)}var gT=kt(Me,{ExtendedData:vt(mpt),MultiGeometry:vt(XG),LineString:vt(mg),LinearRing:vt(mg),Point:vt(mg),Polygon:vt(ZG),Style:vt(zpt),address:vt(We),description:vt(We),name:vt(We),open:vt(kg),phoneNumber:vt(We),styleUrl:vt(We),visibility:vt(kg)}),Upt=kt(Me,["name","open","visibility","address","phoneNumber","description","styleUrl","Style"]),Dpt=qn("ExtendedData");function qG(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(O){return!a[O]}),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(O){var F=O.getGeometryFunction()(e);if(F){var I=F.getType();return I===pt.GEOMETRY_COLLECTION?F.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===pt.POINT||L===pt.MULTI_POINT}).length:I===pt.POINT||I===pt.MULTI_POINT}})),this.writeStyles_){var c=l,h=l;e.getGeometry()&&(c=l.filter(function(O){var F=O.getGeometryFunction()(e);if(F){var I=F.getType();return I===pt.GEOMETRY_COLLECTION?F.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===pt.LINE_STRING||L===pt.MULTI_LINE_STRING}).length:I===pt.LINE_STRING||I===pt.MULTI_LINE_STRING}}),h=l.filter(function(O){var F=O.getGeometryFunction()(e);if(F){var I=F.getType();return I===pt.GEOMETRY_COLLECTION?F.getGeometriesArrayRecursive().filter(function(T){var L=T.getType();return L===pt.POLYGON||L===pt.MULTI_POLYGON}).length:I===pt.POLYGON||I===pt.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 d=t[t.length-1].node,g=Upt[d.namespaceURI],m=Go(i,g);if(Xe(n,gT,la,m,t,g),o.length>0){var v=Go(i,o),y={names:o,values:v};Xe(n,gT,Dpt,[y],t)}var w=t[0],C=e.getGeometry();C&&(C=Hn(C,!0,w)),Xe(n,gT,YG,[C],t)}var Qpt=kt(Me,["extrude","tessellate","altitudeMode","coordinates"]),kpt=kt(Me,{extrude:vt(kg),tessellate:vt(kg),altitudeMode:vt(We),coordinates:vt(upt)});function mg(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=Qpt[o.namespaceURI],A=Go(a,s);Xe(i,kpt,la,A,t,s)}var Hpt=kt(Me,["color","fill","outline"]),rU=kt(Me,{outerBoundaryIs:vt(eU),innerBoundaryIs:vt(eU)}),Gpt=qn("innerBoundaryIs"),$pt=qn("outerBoundaryIs");function ZG(r,e,t){var n=e.getLinearRings(),i=n.shift(),a={node:r};Xe(a,rU,Gpt,n,t),Xe(a,rU,$pt,[i],t)}var Vpt=kt(Me,{color:vt(aB),fill:vt(kg),outline:vt(kg)});function jpt(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=Hpt[s.namespaceURI],l=Go(o,A);Xe(n,Vpt,la,l,t,A)}function JG(r,e){Ro(r,Math.round(e*1e6)/1e6)}var Kpt=kt(Me,["IconStyle","LabelStyle","LineStyle","PolyStyle"]),Wpt=kt(Me,{IconStyle:vt(Cpt),LabelStyle:vt(Tpt),LineStyle:vt(Ipt),PolyStyle:vt(jpt)});function zpt(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=Kpt[A.namespaceURI],u=Go(i,l);Xe(n,Wpt,la,u,t,l)}function Ypt(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 Xpt=wdt,OR={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */OR.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)};OR.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,d=n?1:-1,g=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+=d,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;r[t+f]=o&255,f+=d,o/=256,l-=8);r[t+f-d]|=g*128};var qpt=qr,l1=OR;function qr(r){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(r)?r:new Uint8Array(r||0),this.pos=0,this.type=0,this.length=this.buf.length}qr.Varint=0;qr.Fixed64=1;qr.Bytes=2;qr.Fixed32=5;var aL=(1<<16)*(1<<16),nU=1/aL,Zpt=12,t7=typeof TextDecoder>"u"?null:new TextDecoder("utf8");qr.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=u1(this.buf,this.pos);return this.pos+=4,r},readSFixed32:function(){var r=aU(this.buf,this.pos);return this.pos+=4,r},readFixed64:function(){var r=u1(this.buf,this.pos)+u1(this.buf,this.pos+4)*aL;return this.pos+=8,r},readSFixed64:function(){var r=u1(this.buf,this.pos)+aU(this.buf,this.pos+4)*aL;return this.pos+=8,r},readFloat:function(){var r=l1.read(this.buf,this.pos,!0,23,4);return this.pos+=4,r},readDouble:function(){var r=l1.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,Jpt(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>=Zpt&&t7?fgt(this.buf,e,r):hgt(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!==qr.Bytes)return r.push(this.readVarint(e));var t=zl(this);for(r=r||[];this.pos<t;)r.push(this.readVarint(e));return r},readPackedSVarint:function(r){if(this.type!==qr.Bytes)return r.push(this.readSVarint());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readSVarint());return r},readPackedBoolean:function(r){if(this.type!==qr.Bytes)return r.push(this.readBoolean());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readBoolean());return r},readPackedFloat:function(r){if(this.type!==qr.Bytes)return r.push(this.readFloat());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readFloat());return r},readPackedDouble:function(r){if(this.type!==qr.Bytes)return r.push(this.readDouble());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readDouble());return r},readPackedFixed32:function(r){if(this.type!==qr.Bytes)return r.push(this.readFixed32());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readFixed32());return r},readPackedSFixed32:function(r){if(this.type!==qr.Bytes)return r.push(this.readSFixed32());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed32());return r},readPackedFixed64:function(r){if(this.type!==qr.Bytes)return r.push(this.readFixed64());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readFixed64());return r},readPackedSFixed64:function(r){if(this.type!==qr.Bytes)return r.push(this.readSFixed64());var e=zl(this);for(r=r||[];this.pos<e;)r.push(this.readSFixed64());return r},skip:function(r){var e=r&7;if(e===qr.Varint)for(;this.buf[this.pos++]>127;);else if(e===qr.Bytes)this.pos=this.readVarint()+this.pos;else if(e===qr.Fixed32)this.pos+=4;else if(e===qr.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),wp(this.buf,r,this.pos),this.pos+=4},writeSFixed32:function(r){this.realloc(4),wp(this.buf,r,this.pos),this.pos+=4},writeFixed64:function(r){this.realloc(8),wp(this.buf,r&-1,this.pos),wp(this.buf,Math.floor(r*nU),this.pos+4),this.pos+=8},writeSFixed64:function(r){this.realloc(8),wp(this.buf,r&-1,this.pos),wp(this.buf,Math.floor(r*nU),this.pos+4),this.pos+=8},writeVarint:function(r){if(r=+r||0,r>268435455||r<0){tgt(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=dgt(this.buf,r,this.pos);var t=this.pos-e;t>=128&&iU(e,t,this),this.pos=e-1,this.writeVarint(t),this.pos+=t},writeFloat:function(r){this.realloc(4),l1.write(this.buf,r,this.pos,!0,23,4),this.pos+=4},writeDouble:function(r){this.realloc(8),l1.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&&iU(t,n,this),this.pos=t-1,this.writeVarint(n),this.pos+=n},writeMessage:function(r,e,t){this.writeTag(r,qr.Bytes),this.writeRawMessage(e,t)},writePackedVarint:function(r,e){e.length&&this.writeMessage(r,ngt,e)},writePackedSVarint:function(r,e){e.length&&this.writeMessage(r,igt,e)},writePackedBoolean:function(r,e){e.length&&this.writeMessage(r,sgt,e)},writePackedFloat:function(r,e){e.length&&this.writeMessage(r,agt,e)},writePackedDouble:function(r,e){e.length&&this.writeMessage(r,ogt,e)},writePackedFixed32:function(r,e){e.length&&this.writeMessage(r,Agt,e)},writePackedSFixed32:function(r,e){e.length&&this.writeMessage(r,lgt,e)},writePackedFixed64:function(r,e){e.length&&this.writeMessage(r,ugt,e)},writePackedSFixed64:function(r,e){e.length&&this.writeMessage(r,cgt,e)},writeBytesField:function(r,e){this.writeTag(r,qr.Bytes),this.writeBytes(e)},writeFixed32Field:function(r,e){this.writeTag(r,qr.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(r,e){this.writeTag(r,qr.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(r,e){this.writeTag(r,qr.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(r,e){this.writeTag(r,qr.Fixed64),this.writeSFixed64(e)},writeVarintField:function(r,e){this.writeTag(r,qr.Varint),this.writeVarint(e)},writeSVarintField:function(r,e){this.writeTag(r,qr.Varint),this.writeSVarint(e)},writeStringField:function(r,e){this.writeTag(r,qr.Bytes),this.writeString(e)},writeFloatField:function(r,e){this.writeTag(r,qr.Fixed32),this.writeFloat(e)},writeDoubleField:function(r,e){this.writeTag(r,qr.Fixed64),this.writeDouble(e)},writeBooleanField:function(r,e){this.writeVarintField(r,Boolean(e))}};function Jpt(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 _p(r,i,e);throw new Error("Expected varint not more than 10 bytes")}function zl(r){return r.type===qr.Bytes?r.readVarint()+r.pos:r.pos+1}function _p(r,e,t){return t?e*4294967296+(r>>>0):(e>>>0)*4294967296+(r>>>0)}function tgt(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),egt(t,n,e),rgt(n,e)}function egt(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 rgt(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 iU(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 ngt(r,e){for(var t=0;t<r.length;t++)e.writeVarint(r[t])}function igt(r,e){for(var t=0;t<r.length;t++)e.writeSVarint(r[t])}function agt(r,e){for(var t=0;t<r.length;t++)e.writeFloat(r[t])}function ogt(r,e){for(var t=0;t<r.length;t++)e.writeDouble(r[t])}function sgt(r,e){for(var t=0;t<r.length;t++)e.writeBoolean(r[t])}function Agt(r,e){for(var t=0;t<r.length;t++)e.writeFixed32(r[t])}function lgt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed32(r[t])}function ugt(r,e){for(var t=0;t<r.length;t++)e.writeFixed64(r[t])}function cgt(r,e){for(var t=0;t<r.length;t++)e.writeSFixed64(r[t])}function u1(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+r[e+3]*16777216}function wp(r,e,t){r[t]=e,r[t+1]=e>>>8,r[t+2]=e>>>16,r[t+3]=e>>>24}function aU(r,e){return(r[e]|r[e+1]<<8|r[e+2]<<16)+(r[e+3]<<24)}function hgt(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 fgt(r,e,t){return t7.decode(r.subarray(e,t))}function dgt(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 oU=Si(),Xy=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_===pt.POINT?Uf(this.flatCoordinates_):TC(this.flatCoordinates_,0,this.flatCoordinates_.length,2)),this.extent_},r.prototype.getFlatInteriorPoint=function(){if(!this.flatInteriorPoints_){var e=Ya(this.getExtent());this.flatInteriorPoints_=MF(this.flatCoordinates_,0,this.ends_,2,e,0)}return this.flatInteriorPoints_},r.prototype.getFlatInteriorPoints=function(){if(!this.flatInteriorPoints_){var e=O8(this.flatCoordinates_,0,this.ends_,2);this.flatInteriorPoints_=u8(this.flatCoordinates_,0,this.ends_,2,e)}return this.flatInteriorPoints_},r.prototype.getFlatMidpoint=function(){return this.flatMidpoints_||(this.flatMidpoints_=qw(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=qw(e,t,o,2,.5);tn(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=Ve(e);var t=e.getExtent(),n=e.getWorldExtent();if(t&&n){var i=Ii(n)/Ii(t);yo(oU,n[0],n[3],i,-i,0,0,0),Yc(this.flatCoordinates_,0,this.flatCoordinates_.length,2,oU,this.flatCoordinates_)}},r.prototype.getEnds=function(){return this.ends_},r}();Xy.prototype.getEndss=Xy.prototype.getEnds;Xy.prototype.getFlatCoordinates=Xy.prototype.getOrientedFlatCoordinates;var sU=Xy,pgt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),ggt=function(r){pgt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=new Ru({code:"",units:ho.TILE_PIXELS}),n.featureClass_=i.featureClass?i.featureClass:sU,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):Le(!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=wgt(a,u.length);if(this.featureClass_===sU)o=new this.featureClass_(c,l,u,s,A),o.transform(i.dataProjection);else{var h=void 0;if(c==pt.POLYGON){var f=g3(l,u);h=f.length>1?new qa(l,ae.XY,f):new Dn(l,ae.XY,u)}else h=c===pt.POINT?new xr(l,ae.XY):c===pt.LINE_STRING?new en(l,ae.XY):c===pt.POLYGON?new Dn(l,ae.XY,u):c===pt.MULTI_POINT?new Gs(l,ae.XY):c===pt.MULTI_LINE_STRING?new Xa(l,ae.XY,u):null;var d=this.featureClass_;o=new d,this.geometryName_&&o.setGeometryName(this.geometryName_);var g=Hn(h,!1,i);o.setGeometry(g),A!==void 0&&o.setId(A),o.setProperties(s,!0)}return o},e.prototype.getType=function(){return hA.ARRAY_BUFFER},e.prototype.readFeatures=function(t,n){var i=this.layers_,a=this.adaptOptions(n),o=Ve(a.dataProjection);o.setWorldExtent(a.extent),a.dataProjection=o;var s=new qpt(t),A=s.readFields(vgt,{}),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,d=c.length;f<d;++f){var g=_gt(s,c,f),m=this.createFeature_(s,g,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}(U0);function vgt(r,e,t){if(r===3){var n={keys:[],values:[],features:[]},i=t.readVarint()+t.pos;t.readFields(mgt,n,i),n.length=n.features.length,n.length&&(e[n.name]=n)}}function mgt(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 ygt(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 _gt(r,e,t){r.pos=e.features[t];var n=r.readVarint()+r.pos,i={layer:e,type:0,properties:{}};return r.readFields(ygt,i,n),i}function wgt(r,e){var t;return r===1?t=e===1?pt.POINT:pt.MULTI_POINT:r===2?t=e===1?pt.LINE_STRING:pt.MULTI_LINE_STRING:r===3&&(t=pt.POLYGON),t}var Egt=ggt,Cgt=function(){function r(){}return r.prototype.read=function(e){if(e)if(typeof e=="string"){var t=Al(e);return this.readFromDocument(t)}else return sl(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}(),FR=Cgt,Bgt="http://www.w3.org/1999/xlink";function uv(r){return r.getAttributeNS(Bgt,"href")}var bgt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Wo=[null,"http://www.opengis.net/ows/1.1"],Tgt=kt(Wo,{ServiceIdentification:dt(qgt),ServiceProvider:dt(Jgt),OperationsMetadata:dt(Ygt)}),Sgt=function(r){bgt(e,r);function e(){return r.call(this)||this}return e.prototype.readFromNode=function(t){var n=Kt({},Tgt,t,[]);return n||null},e}(FR),xgt=kt(Wo,{DeliveryPoint:dt(Xt),City:dt(Xt),AdministrativeArea:dt(Xt),PostalCode:dt(Xt),Country:dt(Xt),ElectronicMailAddress:dt(Xt)}),Igt=kt(Wo,{Value:xn(tvt)}),Lgt=kt(Wo,{AllowedValues:dt(Ggt)}),Ogt=kt(Wo,{Phone:dt(Xgt),Address:dt(Hgt)}),Fgt=kt(Wo,{HTTP:dt(Wgt)}),Rgt=kt(Wo,{Get:xn(Kgt),Post:void 0}),Mgt=kt(Wo,{DCP:dt(jgt)}),Ngt=kt(Wo,{Operation:zgt}),Pgt=kt(Wo,{Voice:dt(Xt),Facsimile:dt(Xt)}),Ugt=kt(Wo,{Constraint:xn($gt)}),Dgt=kt(Wo,{IndividualName:dt(Xt),PositionName:dt(Xt),ContactInfo:dt(Vgt)}),Qgt=kt(Wo,{Abstract:dt(Xt),AccessConstraints:dt(Xt),Fees:dt(Xt),Title:dt(Xt),ServiceTypeVersion:dt(Xt),ServiceType:dt(Xt)}),kgt=kt(Wo,{ProviderName:dt(Xt),ProviderSite:dt(uv),ServiceContact:dt(Zgt)});function Hgt(r,e){return Kt({},xgt,r,e)}function Ggt(r,e){return Kt({},Igt,r,e)}function $gt(r,e){var t=r.getAttribute("name");if(t)return Kt({name:t},Lgt,r,e)}function Vgt(r,e){return Kt({},Ogt,r,e)}function jgt(r,e){return Kt({},Fgt,r,e)}function Kgt(r,e){var t=uv(r);if(t)return Kt({href:t},Ugt,r,e)}function Wgt(r,e){return Kt({},Rgt,r,e)}function zgt(r,e){var t=r.getAttribute("name"),n=Kt({},Mgt,r,e);if(n){var i=e[e.length-1];i[t]=n}}function Ygt(r,e){return Kt({},Ngt,r,e)}function Xgt(r,e){return Kt({},Pgt,r,e)}function qgt(r,e){return Kt({},Qgt,r,e)}function Zgt(r,e){return Kt({},Dgt,r,e)}function Jgt(r,e){return Kt({},kgt,r,e)}function tvt(r,e){return Xt(r)}var e7=Sgt;function AU(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 evt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rvt=function(r){evt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.dataProjection=Ve("EPSG:4326"),n.factor_=i.factor?i.factor:1e5,n.geometryLayout_=i.geometryLayout?i.geometryLayout:ae.XY,n}return e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n);return new _r(i)},e.prototype.readFeaturesFromText=function(t,n){var i=this.readFeatureFromText(t,n);return[i]},e.prototype.readGeometryFromText=function(t,n){var i=dx(this.geometryLayout_),a=ivt(t,i,this.factor_);AU(a,0,a.length,i,a);var o=Au(a,0,a.length,i),s=new en(o,this.geometryLayout_);return Hn(s,!1,this.adaptOptions(n))},e.prototype.writeFeatureText=function(t,n){var i=t.getGeometry();return i?this.writeGeometryText(i,n):(Le(!1,40),"")},e.prototype.writeFeaturesText=function(t,n){return this.writeFeatureText(t[0],n)},e.prototype.writeGeometryText=function(t,n){t=Hn(t,!0,this.adaptOptions(n));var i=t.getFlatCoordinates(),a=t.getStride();return AU(i,0,i.length,a,i),nvt(i,a,this.factor_)},e}(SR);function nvt(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 avt(r,n)}function ivt(r,e,t){var n=t||1e5,i,a=new Array(e);for(i=0;i<e;++i)a[i]=0;for(var o=ovt(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 avt(r,e){for(var t=e||1e5,n=0,i=r.length;n<i;++n)r[n]=Math.round(r[n]*t);return svt(r)}function ovt(r,e){for(var t=e||1e5,n=Avt(r),i=0,a=n.length;i<a;++i)n[i]/=t;return n}function svt(r){for(var e=0,t=r.length;e<t;++e){var n=r[e];r[e]=n<0?~(n<<1):n<<1}return lvt(r)}function Avt(r){for(var e=uvt(r),t=0,n=e.length;t<n;++t){var i=e[t];e[t]=i&1?~(i>>1):i>>1}return e}function lvt(r){for(var e="",t=0,n=r.length;t<n;++t)e+=cvt(r[t]);return e}function uvt(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 cvt(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 hvt=rvt,fvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),dvt=function(r){fvt(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=Ve(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&&Cvt(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,Evt(h,A,o,s,c,f,n))):(h=u[f],l.push(r7(h,A,o,s,c,f,n))));return l}else return[]},e.prototype.readProjectionFromObject=function(t){return this.dataProjection},e}(mR),pvt={Point:gvt,LineString:mvt,Polygon:_vt,MultiPoint:vvt,MultiLineString:yvt,MultiPolygon:wvt};function oB(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 gvt(r,e,t){var n=r.coordinates;return e&&t&&RR(n,e,t),new xr(n)}function vvt(r,e,t){var n=r.coordinates;if(e&&t)for(var i=0,a=n.length;i<a;++i)RR(n[i],e,t);return new Gs(n)}function mvt(r,e){var t=oB(r.arcs,e);return new en(t)}function yvt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=oB(r.arcs[n],e);return new Xa(t)}function _vt(r,e){for(var t=[],n=0,i=r.arcs.length;n<i;++n)t[n]=oB(r.arcs[n],e);return new Dn(t)}function wvt(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]=oB(a[s],e);t[n]=o}return new qa(t)}function Evt(r,e,t,n,i,a,o){for(var s=r.geometries,A=[],l=0,u=s.length;l<u;++l)A[l]=r7(s[l],e,t,n,i,a,o);return A}function r7(r,e,t,n,i,a,o){var s=null,A=r.type;if(A){var l=pvt[A];A==="Point"||A==="MultiPoint"?s=l(r,t,n):s=l(r,e),s=Hn(s,!1,o)}var u=new _r({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 Cvt(r,e,t){for(var n=0,i=r.length;n<i;++n)Bvt(r[n],e,t)}function Bvt(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,RR(s,e,t)}}function RR(r,e,t){r[0]=r[0]*e[0]+t[0],r[1]=r[1]*e[1]+t[1]}var bvt=dvt,Tvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),rn=function(r){Tvt(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}(fr);rn.prototype.namespace="http://www.opengis.net/gml/3.2";rn.prototype.GEOMETRY_FLAT_COORDINATES_PARSERS={"http://www.opengis.net/gml/3.2":{pos:$e(fr.prototype.readFlatPos),posList:$e(fr.prototype.readFlatPosList),coordinates:$e(lv.prototype.readFlatCoordinates)}};rn.prototype.FLAT_LINEAR_RINGS_PARSERS={"http://www.opengis.net/gml/3.2":{interior:fr.prototype.interiorParser,exterior:fr.prototype.exteriorParser}};rn.prototype.GEOMETRY_PARSERS={"http://www.opengis.net/gml/3.2":{Point:$e(Cr.prototype.readPoint),MultiPoint:$e(Cr.prototype.readMultiPoint),LineString:$e(Cr.prototype.readLineString),MultiLineString:$e(Cr.prototype.readMultiLineString),LinearRing:$e(Cr.prototype.readLinearRing),Polygon:$e(Cr.prototype.readPolygon),MultiPolygon:$e(Cr.prototype.readMultiPolygon),Surface:$e(rn.prototype.readSurface),MultiSurface:$e(fr.prototype.readMultiSurface),Curve:$e(rn.prototype.readCurve),MultiCurve:$e(fr.prototype.readMultiCurve),Envelope:$e(rn.prototype.readEnvelope)}};rn.prototype.MULTICURVE_PARSERS={"http://www.opengis.net/gml/3.2":{curveMember:Ie(fr.prototype.curveMemberParser),curveMembers:Ie(fr.prototype.curveMemberParser)}};rn.prototype.MULTISURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{surfaceMember:Ie(fr.prototype.surfaceMemberParser),surfaceMembers:Ie(fr.prototype.surfaceMemberParser)}};rn.prototype.CURVEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Ie(Cr.prototype.readLineString),Curve:Ie(fr.prototype.readCurve)}};rn.prototype.SURFACEMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Ie(Cr.prototype.readPolygon),Surface:Ie(fr.prototype.readSurface)}};rn.prototype.SURFACE_PARSERS={"http://www.opengis.net/gml/3.2":{patches:$e(fr.prototype.readPatch)}};rn.prototype.CURVE_PARSERS={"http://www.opengis.net/gml/3.2":{segments:$e(fr.prototype.readSegment)}};rn.prototype.ENVELOPE_PARSERS={"http://www.opengis.net/gml/3.2":{lowerCorner:Ie(fr.prototype.readFlatPosList),upperCorner:Ie(fr.prototype.readFlatPosList)}};rn.prototype.PATCHES_PARSERS={"http://www.opengis.net/gml/3.2":{PolygonPatch:$e(fr.prototype.readPolygonPatch)}};rn.prototype.SEGMENTS_PARSERS={"http://www.opengis.net/gml/3.2":{LineStringSegment:$e(fr.prototype.readLineStringSegment)}};rn.prototype.MULTIPOINT_PARSERS={"http://www.opengis.net/gml/3.2":{pointMember:Ie(Cr.prototype.pointMemberParser),pointMembers:Ie(Cr.prototype.pointMemberParser)}};rn.prototype.MULTILINESTRING_PARSERS={"http://www.opengis.net/gml/3.2":{lineStringMember:Ie(Cr.prototype.lineStringMemberParser),lineStringMembers:Ie(Cr.prototype.lineStringMemberParser)}};rn.prototype.MULTIPOLYGON_PARSERS={"http://www.opengis.net/gml/3.2":{polygonMember:Ie(Cr.prototype.polygonMemberParser),polygonMembers:Ie(Cr.prototype.polygonMemberParser)}};rn.prototype.POINTMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Point:Ie(Cr.prototype.readFlatCoordinatesFromNode)}};rn.prototype.LINESTRINGMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{LineString:Ie(Cr.prototype.readLineString)}};rn.prototype.POLYGONMEMBER_PARSERS={"http://www.opengis.net/gml/3.2":{Polygon:Ie(Cr.prototype.readPolygon)}};rn.prototype.RING_PARSERS={"http://www.opengis.net/gml/3.2":{LinearRing:$e(Cr.prototype.readFlatLinearRing)}};rn.prototype.RING_SERIALIZERS={"http://www.opengis.net/gml/3.2":{exterior:vt(fr.prototype.writeRing),interior:vt(fr.prototype.writeRing)}};rn.prototype.ENVELOPE_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lowerCorner:vt(We),upperCorner:vt(We)}};rn.prototype.SURFACEORPOLYGONMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{surfaceMember:vt(fr.prototype.writeSurfaceOrPolygonMember),polygonMember:vt(fr.prototype.writeSurfaceOrPolygonMember)}};rn.prototype.POINTMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{pointMember:vt(fr.prototype.writePointMember)}};rn.prototype.LINESTRINGORCURVEMEMBER_SERIALIZERS={"http://www.opengis.net/gml/3.2":{lineStringMember:vt(fr.prototype.writeLineStringOrCurveMember),curveMember:vt(fr.prototype.writeLineStringOrCurveMember)}};rn.prototype.GEOMETRY_SERIALIZERS={"http://www.opengis.net/gml/3.2":{Curve:vt(fr.prototype.writeCurveOrLineString),MultiCurve:vt(fr.prototype.writeMultiCurveOrLineString),Point:vt(rn.prototype.writePoint),MultiPoint:vt(fr.prototype.writeMultiPoint),LineString:vt(fr.prototype.writeCurveOrLineString),MultiLineString:vt(fr.prototype.writeMultiCurveOrLineString),LinearRing:vt(fr.prototype.writeLinearRing),Polygon:vt(fr.prototype.writeSurfaceOrPolygon),MultiPolygon:vt(fr.prototype.writeMultiSurfaceOrPolygon),Surface:vt(fr.prototype.writeSurfaceOrPolygon),MultiSurface:vt(fr.prototype.writeMultiSurfaceOrPolygon),Envelope:vt(fr.prototype.writeEnvelope)}};var MR=rn,Svt=function(){function r(e){this.tagName_=e}return r.prototype.getTagName=function(){return this.tagName_},r}(),n7=Svt,xvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ivt=function(r){xvt(e,r);function e(t,n){var i=r.call(this,t)||this;return i.conditions=n,Le(i.conditions.length>=2,57),i}return e}(n7),Lvt=Ivt,Ovt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Fvt=function(r){Ovt(e,r);function e(t){return r.call(this,"And",Array.prototype.slice.call(arguments))||this}return e}(Lvt),Rvt=Fvt,Mvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Nvt=function(r){Mvt(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}(n7),Pvt=Nvt;function Uvt(r){var e=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(Rvt,e))}function Dvt(r,e,t){return new Pvt(r,e,t)}var Qvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),lU={"http://www.opengis.net/gml":{boundedBy:dt(Cr.prototype.readExtentElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:Ie(Cr.prototype.readFeaturesInternal)}},kvt={"http://www.opengis.net/wfs":{totalInserted:dt(Ti),totalUpdated:dt(Ti),totalDeleted:dt(Ti)},"http://www.opengis.net/wfs/2.0":{totalInserted:dt(Ti),totalUpdated:dt(Ti),totalDeleted:dt(Ti)}},Hvt={"http://www.opengis.net/wfs":{TransactionSummary:dt(cU,"transactionSummary"),InsertResults:dt(fU,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:dt(cU,"transactionSummary"),InsertResults:dt(fU,"insertIds")}},Gvt={"http://www.opengis.net/wfs":{PropertyName:vt(We)},"http://www.opengis.net/wfs/2.0":{PropertyName:vt(We)}},i7={"http://www.opengis.net/wfs":{Insert:vt(dU),Update:vt(gU),Delete:vt(pU),Property:vt(vU),Native:vt(mU)},"http://www.opengis.net/wfs/2.0":{Insert:vt(dU),Update:vt(gU),Delete:vt(pU),Property:vt(vU),Native:vt(mU)}},a7="feature",NR="http://www.w3.org/2000/xmlns/",PR={"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"},oL={"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"},UR={"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"},uU={"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"},DR={"2.0.0":MR,"1.1.0":fr,"1.0.0":lv},$vt="1.1.0",Vvt=function(r){Qvt(e,r);function e(t){var n=r.call(this)||this,i=t||{};return n.version_=i.version?i.version:$vt,n.featureType_=i.featureType,n.featureNS_=i.featureNS,n.gmlFormat_=i.gmlFormat?i.gmlFormat:new DR[n.version_],n.schemaLocation_=i.schemaLocation?i.schemaLocation:uU[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};Ce(i,{featureType:this.featureType_,featureNS:this.featureNS_}),Ce(i,this.getReadOptions(t,n||{}));var a=[i],o;this.version_==="2.0.0"?o=lU:o=this.gmlFormat_.FEATURE_COLLECTION_PARSERS;var s=Kt([],o,t,a,this.gmlFormat_);return s||(s=[]),s},e.prototype.readTransactionResponse=function(t){if(t)if(typeof t=="string"){var n=Al(t);return this.readTransactionResponseFromDocument(n)}else return sl(t)?this.readTransactionResponseFromDocument(t):this.readTransactionResponseFromNode(t);else return},e.prototype.readFeatureCollectionMetadata=function(t){if(t)if(typeof t=="string"){var n=Al(t);return this.readFeatureCollectionMetadataFromDocument(n)}else return sl(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=lu(t.getAttribute("numberOfFeatures"));return n.numberOfFeatures=i,Kt(n,lU,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 Kt({},Hvt,t,[])},e.prototype.writeGetFeature=function(t){var n=this,i=Je(oL[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(ld,"xsi:schemaLocation",this.schemaLocation_);var a={node:i};if(Ce(a,{version:this.version_,srsName:t.srsName,featureNS:t.featureNS?t.featureNS:this.featureNS_,featurePrefix:t.featurePrefix,propertyNames:t.propertyNames?t.propertyNames:[]}),Le(Array.isArray(t.featureTypes),11),typeof t.featureTypes[0]=="string"){var o=t.filter;t.bbox&&(Le(t.geometryName,12),o=this.combineBboxAndFilter(t.geometryName,t.bbox,t.srsName,o)),Ce(a,{geometryName:t.geometryName,filter:o}),xU(i,t.featureTypes,[a])}else t.featureTypes.forEach(function(s){var A=n.combineBboxAndFilter(s.geometryName,s.bbox,t.srsName,t.filter);Ce(a,{geometryName:s.geometryName,filter:A}),xU(i,[s.name],[a])});return i},e.prototype.combineBboxAndFilter=function(t,n,i,a){var o=Dvt(t,n,i);return a?Uvt(a,o):o},e.prototype.writeTransaction=function(t,n,i,a){var o=[],s=a.version?a.version:this.version_,A=Je(oL[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(ld,"xsi:schemaLocation",uU[s]);var u=jvt(A,l,s,a);return t&&c1("Insert",t,o,u),n&&c1("Update",n,o,u),i&&c1("Delete",i,o,u),a.nativeElements&&c1("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),Ve(i.pop().srsName)}}return null},e}(Q0);function jvt(r,e,t,n){var i=n.featurePrefix?n.featurePrefix:a7,a;t==="1.0.0"?a=2:t==="1.1.0"?a=3:t==="2.0.0"&&(a=3.2);var o=Ce({node:r},{version:t,featureNS:n.featureNS,featureType:n.featureType,featurePrefix:i,gmlVersion:a,hasZ:n.hasZ,srsName:n.srsName},e);return o}function c1(r,e,t,n){Xe(n,i7,qn(r),e,t)}function cU(r,e){return Kt({},kvt,r,e)}var Kvt={"http://www.opengis.net/ogc":{FeatureId:Ie(function(r,e){return r.getAttribute("fid")})},"http://www.opengis.net/ogc/1.1":{FeatureId:Ie(function(r,e){return r.getAttribute("fid")})}};function hU(r,e){Do(Kvt,r,e)}var Wvt={"http://www.opengis.net/wfs":{Feature:hU},"http://www.opengis.net/wfs/2.0":{Feature:hU}};function fU(r,e){return Kt([],Wvt,r,e)}function dU(r,e,t){var n=t[t.length-1],i=n.featureType,a=n.featureNS,o=n.gmlVersion,s=Je(a,i);r.appendChild(s),o===2?lv.prototype.writeFeatureElement(s,e,t):o===3?fr.prototype.writeFeatureElement(s,e,t):MR.prototype.writeFeatureElement(s,e,t)}function o7(r,e,t){var n=t[t.length-1],i=n.version,a=PR[i],o=Je(a,"Filter"),s=Je(a,"FeatureId");o.appendChild(s),s.setAttribute("fid",e),r.appendChild(o)}function QR(r,e){r=r||a7;var t=r+":";return e.indexOf(t)===0?e:t+e}function pU(r,e,t){var n=t[t.length-1];Le(e.getId()!==void 0,26);var i=n.featureType,a=n.featurePrefix,o=n.featureNS,s=QR(a,i);r.setAttribute("typeName",s),r.setAttributeNS(NR,"xmlns:"+a,o);var A=e.getId();A!==void 0&&o7(r,A,t)}function gU(r,e,t){var n=t[t.length-1];Le(e.getId()!==void 0,27);var i=n.version,a=n.featureType,o=n.featurePrefix,s=n.featureNS,A=QR(o,a),l=e.getGeometryName();r.setAttribute("typeName",A),r.setAttributeNS(NR,"xmlns:"+o,s);var u=e.getId();if(u!==void 0){for(var c=e.getKeys(),h=[],f=0,d=c.length;f<d;f++){var g=e.get(c[f]);if(g!==void 0){var m=c[f];g&&typeof g.getSimplifiedGeometry=="function"&&(m=l),h.push({name:m,value:g})}}Xe({version:i,gmlVersion:n.gmlVersion,node:r,hasZ:n.hasZ,srsName:n.srsName},i7,qn("Property"),h,t),o7(r,u,t)}}function vU(r,e,t){var n=t[t.length-1],i=n.version,a=oL[i],o=Je(a,"Name"),s=n.gmlVersion;if(r.appendChild(o),We(o,e.name),e.value!==void 0&&e.value!==null){var A=Je(a,"Value");r.appendChild(A),e.value&&typeof e.value.getSimplifiedGeometry=="function"?s===2?lv.prototype.writeGeometryElement(A,e.value,t):s===3?fr.prototype.writeGeometryElement(A,e.value,t):MR.prototype.writeGeometryElement(A,e.value,t):We(A,e.value)}}function mU(r,e,t){e.vendorId&&r.setAttribute("vendorId",e.vendorId),e.safeToIgnore!==void 0&&r.setAttribute("safeToIgnore",String(e.safeToIgnore)),e.value!==void 0&&We(r,e.value)}var sB={"http://www.opengis.net/wfs":{Query:vt(yU)},"http://www.opengis.net/wfs/2.0":{Query:vt(yU)},"http://www.opengis.net/ogc":{During:vt(EU),And:vt(h1),Or:vt(h1),Not:vt(CU),BBOX:vt(_U),Contains:vt(Cc),Intersects:vt(Cc),Within:vt(Cc),DWithin:vt(wU),PropertyIsEqualTo:vt(Os),PropertyIsNotEqualTo:vt(Os),PropertyIsLessThan:vt(Os),PropertyIsLessThanOrEqualTo:vt(Os),PropertyIsGreaterThan:vt(Os),PropertyIsGreaterThanOrEqualTo:vt(Os),PropertyIsNull:vt(BU),PropertyIsBetween:vt(bU),PropertyIsLike:vt(TU)},"http://www.opengis.net/fes/2.0":{During:vt(EU),And:vt(h1),Or:vt(h1),Not:vt(CU),BBOX:vt(_U),Contains:vt(Cc),Disjoint:vt(Cc),Intersects:vt(Cc),ResourceId:vt(Yvt),Within:vt(Cc),DWithin:vt(wU),PropertyIsEqualTo:vt(Os),PropertyIsNotEqualTo:vt(Os),PropertyIsLessThan:vt(Os),PropertyIsLessThanOrEqualTo:vt(Os),PropertyIsGreaterThan:vt(Os),PropertyIsGreaterThanOrEqualTo:vt(Os),PropertyIsNull:vt(BU),PropertyIsBetween:vt(bU),PropertyIsLike:vt(TU)}};function yU(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=QR(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(NR,"xmlns:"+a,o);var c=Ce({},n);c.node=r,Xe(c,Gvt,qn("PropertyName"),s,t);var h=n.filter;if(h){var f=Je(AB(i),"Filter");r.appendChild(f),zvt(f,h,t)}}function zvt(r,e,t){var n=t[t.length-1],i={node:r};Ce(i,{context:n}),Xe(i,sB,qn(e.getTagName()),[e],t)}function _U(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=DR[a];cv(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.extent,t)}function Yvt(r,e,t){r.setAttribute("rid",e.rid)}function Cc(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;n.srsName=e.srsName;var o=DR[a];cv(a,r,e.geometryName),o.prototype.writeGeometryElement(r,e.geometry,t)}function wU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;Cc(r,e,t);var o=Je(AB(a),"Distance");We(o,e.distance.toString()),a==="2.0.0"?o.setAttribute("uom",e.unit):o.setAttribute("units",e.unit),r.appendChild(o)}function EU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;TE(UR[a],"ValueReference",r,e.propertyName);var o=Je(gu,"TimePeriod");r.appendChild(o);var s=Je(gu,"begin");o.appendChild(s),SU(s,e.begin);var A=Je(gu,"end");o.appendChild(A),SU(A,e.end)}function h1(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};Ce(a,{context:i});for(var o=e.conditions,s=0,A=o.length;s<A;++s){var l=o[s];Xe(a,sB,qn(l.getTagName()),[l],t)}}function CU(r,e,t){var n=t[t.length-1],i=n.context,a={node:r};Ce(a,{context:i});var o=e.condition;Xe(a,sB,qn(o.getTagName()),[o],t)}function Os(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()),cv(a,r,e.propertyName),SE(a,r,""+e.expression)}function BU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version;cv(a,r,e.propertyName)}function bU(r,e,t){var n=t[t.length-1],i=n.context,a=i.version,o=AB(a);cv(a,r,e.propertyName);var s=Je(o,"LowerBoundary");r.appendChild(s),SE(a,s,""+e.lowerBoundary);var A=Je(o,"UpperBoundary");r.appendChild(A),SE(a,A,""+e.upperBoundary)}function TU(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()),cv(a,r,e.propertyName),SE(a,r,""+e.pattern)}function TE(r,e,t,n){var i=Je(r,e);We(i,n),t.appendChild(i)}function SE(r,e,t){TE(AB(r),"Literal",e,t)}function cv(r,e,t){r==="2.0.0"?TE(UR[r],"ValueReference",e,t):TE(PR[r],"PropertyName",e,t)}function SU(r,e){var t=Je(gu,"TimeInstant");r.appendChild(t);var n=Je(gu,"timePosition");t.appendChild(n),We(n,e)}function xU(r,e,t){var n=t[t.length-1],i=Ce({},n);i.node=r,Xe(i,sB,qn("Query"),e,t)}function AB(r){var e;return r==="2.0.0"?e=UR[r]:e=PR[r],e}var Xvt=Vvt,qvt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),sn={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},IU=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_=ae.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 sn.POINT:return this.readPoint();case sn.LINE_STRING:return this.readLineString();case sn.POLYGON:case sn.TRIANGLE:return this.readPolygon();case sn.MULTI_POINT:return this.readMultiPoint();case sn.MULTI_LINE_STRING:return this.readMultiLineString();case sn.MULTI_POLYGON:case sn.POLYHEDRAL_SURFACE:case sn.TIN:return this.readMultiPolygon();case sn.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,sn.POINT)},r.prototype.readMultiLineString=function(){return this.readWkbCollection(this.readWkbBlock,sn.LINE_STRING)},r.prototype.readMultiPolygon=function(){return this.readWkbCollection(this.readWkbBlock,sn.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 sn.POINT:return new xr(t,this.layout_);case sn.LINE_STRING:return new en(t,this.layout_);case sn.POLYGON:case sn.TRIANGLE:return new Dn(t,this.layout_);case sn.MULTI_POINT:return new Gs(t,this.layout_);case sn.MULTI_LINE_STRING:return new Xa(t,this.layout_);case sn.MULTI_POLYGON:case sn.POLYHEDRAL_SURFACE:case sn.TIN:return new qa(t,this.layout_);case sn.GEOMETRY_COLLECTION:return new Ca(t);default:return null}},r.prototype.getSrid=function(){return this.srid_},r}(),Zvt=function(){function r(e){e=e||{},this.layout_=e.layout,this.isLittleEndian_=e.littleEndian!==!1,this.isEWKB_=e.ewkb!==!1,this.writeQueue_=[],this.nodata_=Ce({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=Ce.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=ae.XYZM);var n=function(o,s){return o===s?o:o===ae.XYZM?s:s===ae.XYZM?o:ae.XY};if(e instanceof mA)return n(e.getLayout(),t);if(e instanceof Ca)for(var i=e.getGeometriesArray(),a=0;a<i.length&&t!==ae.XY;a++)t=this.findMinimumLayout(i[a],t);return t},r.prototype.writeGeometry=function(e,t){var n,i,a=(n={},n[pt.POINT]=sn.POINT,n[pt.LINE_STRING]=sn.LINE_STRING,n[pt.POLYGON]=sn.POLYGON,n[pt.MULTI_POINT]=sn.MULTI_POINT,n[pt.MULTI_LINE_STRING]=sn.MULTI_LINE_STRING,n[pt.MULTI_POLYGON]=sn.MULTI_POLYGON,n[pt.GEOMETRY_COLLECTION]=sn.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 mA){var A=(i={},i[pt.POINT]=this.writePoint,i[pt.LINE_STRING]=this.writeLineString,i[pt.POLYGON]=this.writePolygon,i[pt.MULTI_POINT]=this.writeMultiPoint,i[pt.MULTI_LINE_STRING]=this.writeMultiLineString,i[pt.MULTI_POLYGON]=this.writeMultiPolygon,i);A[o].call(this,e.getCoordinates(),e.getLayout())}else e instanceof Ca&&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}(),Jvt=function(r){qvt(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_?hA.TEXT:hA.ARRAY_BUFFER},e.prototype.readFeature=function(t,n){return new _r({geometry:this.readGeometry(t,n)})},e.prototype.readFeatures=function(t,n){var i=[],a=this.readGeometry(t,n);return this.splitCollection&&a instanceof Ca?i=a.getGeometriesArray():i=[a],i.map(function(o){return new _r({geometry:o})})},e.prototype.readGeometry=function(t,n){var i=LU(t);if(!i)return null;var a=new IU(i),o=a.readGeometry();this.viewCache_=i;var s=this.getReadOptions(t,n);return this.viewCache_=null,Hn(o,!1,s)},e.prototype.readProjection=function(t){var n=this.viewCache_||LU(t);if(n){var i=new IU(n);return i.readWkbHeader(),i.getSrid()&&Ve("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 Ca(t.map(function(i){return i.getGeometry()})),n)},e.prototype.writeGeometry=function(t,n){var i=this.adaptOptions(n),a=new Zvt({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&&Ve(i.dataProjection);if(s){var A=s.getCode();A.indexOf("EPSG:")===0&&(o=Number(A.substring(5)))}}a.writeGeometry(Hn(t,!0,i),o);var l=a.getBuffer();return this.hex_?tmt(l):l},e}(U0);function tmt(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 emt(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 LU(r){return typeof r=="string"?emt(r):ArrayBuffer.isView(r)?r instanceof DataView?r:new DataView(r.buffer,r.byteOffset,r.byteLength):r instanceof ArrayBuffer?new DataView(r):null}var rmt=Jvt,nmt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),imt={POINT:xr,LINESTRING:en,POLYGON:Dn,MULTIPOINT:Gs,MULTILINESTRING:Xa,MULTIPOLYGON:qa},s7="EMPTY",A7="Z",l7="M",amt="ZM",Zr={START:0,TEXT:1,LEFT_PAREN:2,RIGHT_PAREN:3,NUMBER:4,COMMA:5,EOF:6};for(var omt in pt)pt[omt].toUpperCase();var smt=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=Zr.LEFT_PAREN;else if(e==",")i=Zr.COMMA;else if(e==")")i=Zr.RIGHT_PAREN;else if(this.isNumeric_(e)||e=="-")i=Zr.NUMBER,n=this.readNumber_();else if(this.isAlpha_(e))i=Zr.TEXT,n=this.readText_();else{if(this.isWhiteSpace_(e))return this.nextToken();if(e==="")i=Zr.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}(),Amt=function(){function r(e){this.lexer_=e,this.token_={position:0,type:Zr.START},this.layout_=ae.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=ae.XY,t=this.token_;if(this.isTokenType(Zr.TEXT)){var n=t.value;n===A7?e=ae.XYZ:n===l7?e=ae.XYM:n===amt&&(e=ae.XYZM),e!==ae.XY&&this.consume_()}return e},r.prototype.parseGeometryCollectionText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=[];do e.push(this.parseGeometry_());while(this.match(Zr.COMMA));if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePointText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parsePoint_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseLineStringText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parsePointList_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parsePolygonText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPointText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=void 0;if(this.token_.type==Zr.LEFT_PAREN?e=this.parsePointTextList_():e=this.parsePointList_(),this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiLineStringText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parseLineStringTextList_();if(this.match(Zr.RIGHT_PAREN))return e}throw new Error(this.formatErrorMessage_())},r.prototype.parseMultiPolygonText_=function(){if(this.match(Zr.LEFT_PAREN)){var e=this.parsePolygonTextList_();if(this.match(Zr.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(Zr.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(Zr.COMMA);)e.push(this.parsePoint_());return e},r.prototype.parsePointTextList_=function(){for(var e=[this.parsePointText_()];this.match(Zr.COMMA);)e.push(this.parsePointText_());return e},r.prototype.parseLineStringTextList_=function(){for(var e=[this.parseLineStringText_()];this.match(Zr.COMMA);)e.push(this.parseLineStringText_());return e},r.prototype.parsePolygonTextList_=function(){for(var e=[this.parsePolygonText_()];this.match(Zr.COMMA);)e.push(this.parsePolygonText_());return e},r.prototype.isEmptyGeometry_=function(){var e=this.isTokenType(Zr.TEXT)&&this.token_.value==s7;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(Zr.TEXT)){var t=e.value;this.layout_=this.parseGeometryLayout_();var n=this.isEmptyGeometry_();if(t=="GEOMETRYCOLLECTION"){if(n)return new Ca([]);var i=this.parseGeometryCollectionText_();return new Ca(i)}else{var a=imt[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}(),lmt=function(r){nmt(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 smt(t),i=new Amt(n);return i.parse()},e.prototype.readFeatureFromText=function(t,n){var i=this.readGeometryFromText(t,n),a=new _r;return a.setGeometry(i),a},e.prototype.readFeaturesFromText=function(t,n){var i=[],a=this.readGeometryFromText(t,n);this.splitCollection_&&a.getType()==pt.GEOMETRY_COLLECTION?i=a.getGeometriesArray():i=[a];for(var o=[],s=0,A=i.length;s<A;++s){var l=new _r;l.setGeometry(i[s]),o.push(l)}return o},e.prototype.readGeometryFromText=function(t,n){var i=this.parse_(t);return Hn(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 Ca(i);return this.writeGeometryText(s,n)},e.prototype.writeGeometryText=function(t,n){return h7(Hn(t,!0,n))},e}(SR);function u7(r){var e=r.getCoordinates();return e.length===0?"":e.join(" ")}function umt(r){for(var e=[],t=r.getPoints(),n=0,i=t.length;n<i;++n)e.push("("+u7(t[n])+")");return e.join(",")}function cmt(r){for(var e=[],t=r.getGeometries(),n=0,i=t.length;n<i;++n)e.push(h7(t[n]));return e.join(",")}function kR(r){for(var e=r.getCoordinates(),t=[],n=0,i=e.length;n<i;++n)t.push(e[n].join(" "));return t.join(",")}function hmt(r){for(var e=[],t=r.getLineStrings(),n=0,i=t.length;n<i;++n)e.push("("+kR(t[n])+")");return e.join(",")}function c7(r){for(var e=[],t=r.getLinearRings(),n=0,i=t.length;n<i;++n)e.push("("+kR(t[n])+")");return e.join(",")}function fmt(r){for(var e=[],t=r.getPolygons(),n=0,i=t.length;n<i;++n)e.push("("+c7(t[n])+")");return e.join(",")}function dmt(r){var e=r.getLayout(),t="";return(e===ae.XYZ||e===ae.XYZM)&&(t+=A7),(e===ae.XYM||e===ae.XYZM)&&(t+=l7),t}var pmt={Point:u7,LineString:kR,Polygon:c7,MultiPoint:umt,MultiLineString:hmt,MultiPolygon:fmt,GeometryCollection:cmt};function h7(r){var e=r.getType(),t=pmt[e],n=t(r);if(e=e.toUpperCase(),typeof r.getFlatCoordinates=="function"){var i=dmt(r);i.length>0&&(e+=" "+i)}return n.length===0?e+" "+s7:e+"("+n+")"}var gmt=lmt,vmt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Ta=[null,"http://www.opengis.net/wms"],mmt=kt(Ta,{Service:dt(Qmt),Capability:dt(Dmt)}),ymt=kt(Ta,{Request:dt(Kmt),Exception:dt($mt),Layer:dt(Vmt)}),_mt=function(r){vmt(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=Kt({version:this.version},mmt,t,[]);return n||null},e}(FR),wmt=kt(Ta,{Name:dt(Xt),Title:dt(Xt),Abstract:dt(Xt),KeywordList:dt(g7),OnlineResource:dt(uv),ContactInformation:dt(kmt),Fees:dt(Xt),AccessConstraints:dt(Xt),LayerLimit:dt(Ti),MaxWidth:dt(Ti),MaxHeight:dt(Ti)}),Emt=kt(Ta,{ContactPersonPrimary:dt(Hmt),ContactPosition:dt(Xt),ContactAddress:dt(Gmt),ContactVoiceTelephone:dt(Xt),ContactFacsimileTelephone:dt(Xt),ContactElectronicMailAddress:dt(Xt)}),Cmt=kt(Ta,{ContactPerson:dt(Xt),ContactOrganization:dt(Xt)}),Bmt=kt(Ta,{AddressType:dt(Xt),Address:dt(Xt),City:dt(Xt),StateOrProvince:dt(Xt),PostCode:dt(Xt),Country:dt(Xt)}),bmt=kt(Ta,{Format:Ie(Xt)}),f7=kt(Ta,{Name:dt(Xt),Title:dt(Xt),Abstract:dt(Xt),KeywordList:dt(g7),CRS:xn(Xt),EX_GeographicBoundingBox:dt(Umt),BoundingBox:xn(Pmt),Dimension:xn(jmt),Attribution:dt(Nmt),AuthorityURL:xn(Ymt),Identifier:xn(Xt),MetadataURL:xn(Xmt),DataURL:xn(Cu),FeatureListURL:xn(Cu),Style:xn(qmt),MinScaleDenominator:dt(Vr),MaxScaleDenominator:dt(Vr),Layer:xn(d7)}),Tmt=kt(Ta,{Title:dt(Xt),OnlineResource:dt(uv),LogoURL:dt(p7)}),Smt=kt(Ta,{westBoundLongitude:dt(Vr),eastBoundLongitude:dt(Vr),southBoundLatitude:dt(Vr),northBoundLatitude:dt(Vr)}),xmt=kt(Ta,{GetCapabilities:dt(vT),GetMap:dt(vT),GetFeatureInfo:dt(vT)}),Imt=kt(Ta,{Format:xn(Xt),DCPType:xn(Wmt)}),Lmt=kt(Ta,{HTTP:dt(zmt)}),Omt=kt(Ta,{Get:dt(Cu),Post:dt(Cu)}),Fmt=kt(Ta,{Name:dt(Xt),Title:dt(Xt),Abstract:dt(Xt),LegendURL:xn(p7),StyleSheetURL:dt(Cu),StyleURL:dt(Cu)}),Rmt=kt(Ta,{Format:dt(Xt),OnlineResource:dt(uv)}),Mmt=kt(Ta,{Keyword:Ie(Xt)});function Nmt(r,e){return Kt({},Tmt,r,e)}function Pmt(r,e){var t=[ou(r.getAttribute("minx")),ou(r.getAttribute("miny")),ou(r.getAttribute("maxx")),ou(r.getAttribute("maxy"))],n=[ou(r.getAttribute("resx")),ou(r.getAttribute("resy"))];return{crs:r.getAttribute("CRS"),extent:t,res:n}}function Umt(r,e){var t=Kt({},Smt,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 Dmt(r,e){return Kt({},ymt,r,e)}function Qmt(r,e){return Kt({},wmt,r,e)}function kmt(r,e){return Kt({},Emt,r,e)}function Hmt(r,e){return Kt({},Cmt,r,e)}function Gmt(r,e){return Kt({},Bmt,r,e)}function $mt(r,e){return Kt([],bmt,r,e)}function Vmt(r,e){var t=Kt({},f7,r,e);return t.Layer===void 0?Object.assign(t,d7(r,e)):t}function d7(r,e){var t=e[e.length-1],n=Kt({},f7,r,e);if(n){var i=$f(r.getAttribute("queryable"));i===void 0&&(i=t.queryable),n.queryable=i!==void 0?i:!1;var a=lu(r.getAttribute("cascaded"));a===void 0&&(a=t.cascaded),n.cascaded=a;var o=$f(r.getAttribute("opaque"));o===void 0&&(o=t.opaque),n.opaque=o!==void 0?o:!1;var s=$f(r.getAttribute("noSubsets"));s===void 0&&(s=t.noSubsets),n.noSubsets=s!==void 0?s:!1;var A=ou(r.getAttribute("fixedWidth"));A||(A=t.fixedWidth),n.fixedWidth=A;var l=ou(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 jmt(r,e){var t={name:r.getAttribute("name"),units:r.getAttribute("units"),unitSymbol:r.getAttribute("unitSymbol"),default:r.getAttribute("default"),multipleValues:$f(r.getAttribute("multipleValues")),nearestValue:$f(r.getAttribute("nearestValue")),current:$f(r.getAttribute("current")),values:Xt(r)};return t}function Cu(r,e){return Kt({},Rmt,r,e)}function Kmt(r,e){return Kt({},xmt,r,e)}function Wmt(r,e){return Kt({},Lmt,r,e)}function zmt(r,e){return Kt({},Omt,r,e)}function vT(r,e){return Kt({},Imt,r,e)}function p7(r,e){var t=Cu(r,e);if(t){var n=[lu(r.getAttribute("width")),lu(r.getAttribute("height"))];return t.size=n,t}}function Ymt(r,e){var t=Cu(r,e);if(t)return t.name=r.getAttribute("name"),t}function Xmt(r,e){var t=Cu(r,e);if(t)return t.type=r.getAttribute("type"),t}function qmt(r,e){return Kt({},Fmt,r,e)}function g7(r,e){return Kt([],Mmt,r,e)}var Zmt=_mt,Jmt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),tyt="_feature",eyt="_layer",ryt=function(r){Jmt(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 lv,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=eyt,h=l.localName.replace(c,"");if(!(this.layers_&&!Ni(this.layers_,h))){var f=h+tyt;u.featureType=f,u.featureNS=this.featureNS_;var d={};d[f]=Ie(this.gmlFormat_.readFeatureElement,this.gmlFormat_);var g=kt([u.featureNS,null],d);l.setAttribute("namespaceURI",this.featureNS_);var m=Kt([],g,l,n,this.gmlFormat_);m&&tn(a,m)}}}if(i=="FeatureCollection"){var v=Kt([],this.gmlFormat_.FEATURE_COLLECTION_PARSERS,t,[{}],this.gmlFormat_);v&&(a=v)}return a},e.prototype.readFeaturesFromNode=function(t,n){var i={};return n&&Ce(i,this.getReadOptions(t,n)),this.readFeatures_(t,[i])},e}(Q0),nyt=ryt,iyt=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a 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=[null,"http://www.opengis.net/wmts/1.0"],hv=[null,"http://www.opengis.net/ows/1.1"],ayt=kt(Cl,{Contents:dt(vyt)}),oyt=function(r){iyt(e,r);function e(){var t=r.call(this)||this;return t.owsParser_=new e7,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=Kt(i,ayt,t,[]),i||null):null},e}(FR),syt=kt(Cl,{Layer:xn(myt),TileMatrixSet:xn(yyt)}),Ayt=kt(Cl,{Style:xn(_yt),Format:xn(Xt),TileMatrixSetLink:xn(wyt),Dimension:xn(Eyt),ResourceURL:xn(Cyt)},kt(hv,{Title:dt(Xt),Abstract:dt(Xt),WGS84BoundingBox:dt(v7),Identifier:dt(Xt)})),lyt=kt(Cl,{LegendURL:xn(Byt)},kt(hv,{Title:dt(Xt),Identifier:dt(Xt)})),uyt=kt(Cl,{TileMatrixSet:dt(Xt),TileMatrixSetLimits:dt(Tyt)}),cyt=kt(Cl,{TileMatrixLimits:Ie(Syt)}),hyt=kt(Cl,{TileMatrix:dt(Xt),MinTileRow:dt(Ti),MaxTileRow:dt(Ti),MinTileCol:dt(Ti),MaxTileCol:dt(Ti)}),fyt=kt(Cl,{Default:dt(Xt),Value:xn(Xt)},kt(hv,{Identifier:dt(Xt)})),dyt=kt(hv,{LowerCorner:Ie(sL),UpperCorner:Ie(sL)}),pyt=kt(Cl,{WellKnownScaleSet:dt(Xt),TileMatrix:xn(byt)},kt(hv,{SupportedCRS:dt(Xt),Identifier:dt(Xt),BoundingBox:dt(v7)})),gyt=kt(Cl,{TopLeftCorner:dt(sL),ScaleDenominator:dt(Vr),TileWidth:dt(Ti),TileHeight:dt(Ti),MatrixWidth:dt(Ti),MatrixHeight:dt(Ti)},kt(hv,{Identifier:dt(Xt)}));function vyt(r,e){return Kt({},syt,r,e)}function myt(r,e){return Kt({},Ayt,r,e)}function yyt(r,e){return Kt({},pyt,r,e)}function _yt(r,e){var t=Kt({},lyt,r,e);if(t){var n=r.getAttribute("isDefault")==="true";return t.isDefault=n,t}}function wyt(r,e){return Kt({},uyt,r,e)}function Eyt(r,e){return Kt({},fyt,r,e)}function Cyt(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 v7(r,e){var t=Kt([],dyt,r,e);if(t.length==2)return oa(t)}function Byt(r,e){var t={};return t.format=r.getAttribute("format"),t.href=uv(r),t}function sL(r,e){var t=Xt(r).split(/\s+/);if(!(!t||t.length!=2)){var n=+t[0],i=+t[1];if(!(isNaN(n)||isNaN(i)))return[n,i]}}function byt(r,e){return Kt({},gyt,r,e)}function Tyt(r,e){return Kt([],cyt,r,e)}function Syt(r,e){return Kt({},hyt,r,e)}var xyt=oyt,Iyt=Object.freeze(Object.defineProperty({__proto__:null,EsriJSON:Vht,GeoJSON:sft,GML:Eft,GPX:rdt,IGC:cdt,IIIFInfo:uAt,KML:Xpt,MVT:Egt,OWS:e7,Polyline:hvt,TopoJSON:bvt,WFS:Xvt,WKB:rmt,WKT:gmt,WMSCapabilities:Zmt,WMSGetFeatureInfo:nyt,WMTSCapabilities:xyt},Symbol.toStringTag,{value:"Module"}));function AL(r){if(AL.installed){console.error("OPENLAYERS MAP ALREADY INSTALLED");return}AL.installed=!0,r.use(iot),r.use(JAt),r.use(_lt),r.use(pct),r.use(xct),r.use($ct),r.use(iht),r.use(Eht),r.provide("ol-feature",_r),r.provide("ol-geom",bht),r.provide("ol-animations",Vq),r.provide("ol-format",Iyt),r.provide("ol-loadingstrategy",Vtt),r.provide("ol-selectconditions",CZ),r.provide("ol-extent",yX)}/*!
* 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 lL=function(r,e){return lL=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])},lL(r,e)};function xA(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");lL(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var uL=function(){return uL=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},uL.apply(this,arguments)};function so(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 Ha(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 f1(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 Bu=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}(),lB=function(r,e){return Bu.fromClientRect(r,e.getBoundingClientRect())},Lyt=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 Bu(0,0,n,i)},uB=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},wi=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},OU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Oyt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var d1=0;d1<OU.length;d1++)Oyt[OU.charCodeAt(d1)]=d1;var FU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Um=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var p1=0;p1<FU.length;p1++)Um[FU.charCodeAt(p1)]=p1;var Fyt=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=Um[r.charCodeAt(n)],o=Um[r.charCodeAt(n+1)],s=Um[r.charCodeAt(n+2)],A=Um[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},Ryt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},Myt=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},Vf=5,HR=6+5,mT=2,Nyt=HR-Vf,m7=65536>>Vf,Pyt=1<<Vf,yT=Pyt-1,Uyt=1024>>Vf,Dyt=m7+Uyt,Qyt=Dyt,kyt=32,Hyt=Qyt+kyt,Gyt=65536>>HR,$yt=1<<Nyt,Vyt=$yt-1,RU=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},jyt=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},Kyt=function(r,e){var t=Fyt(r),n=Array.isArray(t)?Myt(t):new Uint32Array(t),i=Array.isArray(t)?Ryt(t):new Uint16Array(t),a=24,o=RU(i,a/2,n[4]/2),s=n[5]===2?RU(i,(a+n[4])/2):jyt(n,Math.ceil((a+n[4])/4));return new Wyt(n[0],n[1],n[2],n[3],o,s)},Wyt=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>>Vf],t=(t<<mT)+(e&yT),this.data[t];if(e<=65535)return t=this.index[m7+(e-55296>>Vf)],t=(t<<mT)+(e&yT),this.data[t];if(e<this.highStart)return t=Hyt-Gyt+(e>>HR),t=this.index[t],t+=e>>Vf&Vyt,t=this.index[t],t=(t<<mT)+(e&yT),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),MU="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zyt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var g1=0;g1<MU.length;g1++)zyt[MU.charCodeAt(g1)]=g1;var Yyt="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==",NU=50,Xyt=1,y7=2,_7=3,qyt=4,Zyt=5,PU=7,w7=8,UU=9,Gc=10,cL=11,DU=12,hL=13,Jyt=14,Dm=15,fL=16,v1=17,cm=18,t0t=19,QU=20,dL=21,hm=22,_T=23,Ep=24,As=25,Qm=26,km=27,Cp=28,e0t=29,Cf=30,r0t=31,m1=32,y1=33,pL=34,gL=35,vL=36,qy=37,mL=38,gw=39,vw=40,wT=41,E7=42,n0t=43,i0t=[9001,65288],C7="!",Fr="×",_1="÷",yL=Kyt(Yyt),Yl=[Cf,vL],_L=[Xyt,y7,_7,Zyt],B7=[Gc,w7],kU=[km,Qm],a0t=_L.concat(B7),HU=[mL,gw,vw,pL,gL],o0t=[Dm,hL],s0t=function(r,e){e===void 0&&(e="strict");var t=[],n=[],i=[];return r.forEach(function(a,o){var s=yL.get(a);if(s>NU?(i.push(!0),s-=NU):i.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(a)!==-1)return n.push(o),t.push(fL);if(s===qyt||s===cL){if(o===0)return n.push(o),t.push(Cf);var A=t[o-1];return a0t.indexOf(A)===-1?(n.push(n[o-1]),t.push(A)):(n.push(o),t.push(Cf))}if(n.push(o),s===r0t)return t.push(e==="strict"?dL:qy);if(s===E7||s===e0t)return t.push(Cf);if(s===n0t)return a>=131072&&a<=196605||a>=196608&&a<=262141?t.push(qy):t.push(Cf);t.push(s)}),[n,t,i]},ET=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!==Gc)break}if(i===Gc)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!==Gc)break}if(s!==Gc)break}return!1},GU=function(r,e){for(var t=r;t>=0;){var n=e[t];if(n===Gc)t--;else return n}return 0},A0t=function(r,e,t,n,i){if(t[n]===0)return Fr;var a=n-1;if(Array.isArray(i)&&i[a]===!0)return Fr;var o=a-1,s=a+1,A=e[a],l=o>=0?e[o]:0,u=e[s];if(A===y7&&u===_7)return Fr;if(_L.indexOf(A)!==-1)return C7;if(_L.indexOf(u)!==-1||B7.indexOf(u)!==-1)return Fr;if(GU(a,e)===w7)return _1;if(yL.get(r[a])===cL||(A===m1||A===y1)&&yL.get(r[s])===cL||A===PU||u===PU||A===UU||[Gc,hL,Dm].indexOf(A)===-1&&u===UU||[v1,cm,t0t,Ep,Cp].indexOf(u)!==-1||GU(a,e)===hm||ET(_T,hm,a,e)||ET([v1,cm],dL,a,e)||ET(DU,DU,a,e))return Fr;if(A===Gc)return _1;if(A===_T||u===_T)return Fr;if(u===fL||A===fL)return _1;if([hL,Dm,dL].indexOf(u)!==-1||A===Jyt||l===vL&&o0t.indexOf(A)!==-1||A===Cp&&u===vL||u===QU||Yl.indexOf(u)!==-1&&A===As||Yl.indexOf(A)!==-1&&u===As||A===km&&[qy,m1,y1].indexOf(u)!==-1||[qy,m1,y1].indexOf(A)!==-1&&u===Qm||Yl.indexOf(A)!==-1&&kU.indexOf(u)!==-1||kU.indexOf(A)!==-1&&Yl.indexOf(u)!==-1||[km,Qm].indexOf(A)!==-1&&(u===As||[hm,Dm].indexOf(u)!==-1&&e[s+1]===As)||[hm,Dm].indexOf(A)!==-1&&u===As||A===As&&[As,Cp,Ep].indexOf(u)!==-1)return Fr;if([As,Cp,Ep,v1,cm].indexOf(u)!==-1)for(var c=a;c>=0;){var h=e[c];if(h===As)return Fr;if([Cp,Ep].indexOf(h)!==-1)c--;else break}if([km,Qm].indexOf(u)!==-1)for(var c=[v1,cm].indexOf(A)!==-1?o:a;c>=0;){var h=e[c];if(h===As)return Fr;if([Cp,Ep].indexOf(h)!==-1)c--;else break}if(mL===A&&[mL,gw,pL,gL].indexOf(u)!==-1||[gw,pL].indexOf(A)!==-1&&[gw,vw].indexOf(u)!==-1||[vw,gL].indexOf(A)!==-1&&u===vw||HU.indexOf(A)!==-1&&[QU,Qm].indexOf(u)!==-1||HU.indexOf(u)!==-1&&A===km||Yl.indexOf(A)!==-1&&Yl.indexOf(u)!==-1||A===Ep&&Yl.indexOf(u)!==-1||Yl.concat(As).indexOf(A)!==-1&&u===hm&&i0t.indexOf(r[s])===-1||Yl.concat(As).indexOf(u)!==-1&&A===cm)return Fr;if(A===wT&&u===wT){for(var f=t[a],d=1;f>0&&(f--,e[f]===wT);)d++;if(d%2!==0)return Fr}return A===m1&&u===y1?Fr:_1},l0t=function(r,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var t=s0t(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[As,Cf,E7].indexOf(s)!==-1?qy: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]},u0t=function(){function r(e,t,n,i){this.codePoints=e,this.required=t===C7,this.start=n,this.end=i}return r.prototype.slice=function(){return wi.apply(void 0,this.codePoints.slice(this.start,this.end))},r}(),c0t=function(r,e){var t=uB(r),n=l0t(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=Fr;l<s&&(u=A0t(t,a,i,++l,o))===Fr;);if(u!==Fr||l===s){var c=new u0t(t,u,A,l);return A=l,{value:c,done:!1}}return{done:!0,value:null}}}},h0t=1<<0,f0t=1<<1,k0=1<<2,$U=1<<3,xE=10,VU=47,cy=92,d0t=9,p0t=32,w1=34,fm=61,g0t=35,v0t=36,m0t=37,E1=39,C1=40,dm=41,y0t=95,Mo=45,_0t=33,w0t=60,E0t=62,C0t=64,B0t=91,b0t=93,T0t=61,S0t=123,B1=63,x0t=125,jU=124,I0t=126,L0t=128,KU=65533,CT=42,Lf=43,O0t=44,F0t=58,R0t=59,Zy=46,M0t=0,N0t=8,P0t=11,U0t=14,D0t=31,Q0t=127,KA=-1,b7=48,T7=97,S7=101,k0t=102,H0t=117,G0t=122,x7=65,I7=69,L7=70,$0t=85,V0t=90,$a=function(r){return r>=b7&&r<=57},j0t=function(r){return r>=55296&&r<=57343},Bp=function(r){return $a(r)||r>=x7&&r<=L7||r>=T7&&r<=k0t},K0t=function(r){return r>=T7&&r<=G0t},W0t=function(r){return r>=x7&&r<=V0t},z0t=function(r){return K0t(r)||W0t(r)},Y0t=function(r){return r>=L0t},b1=function(r){return r===xE||r===d0t||r===p0t},IE=function(r){return z0t(r)||Y0t(r)||r===y0t},WU=function(r){return IE(r)||$a(r)||r===Mo},X0t=function(r){return r>=M0t&&r<=N0t||r===P0t||r>=U0t&&r<=D0t||r===Q0t},xc=function(r,e){return r!==cy?!1:e!==xE},T1=function(r,e,t){return r===Mo?IE(e)||xc(e,t):IE(r)?!0:!!(r===cy&&xc(r,e))},BT=function(r,e,t){return r===Lf||r===Mo?$a(e)?!0:e===Zy&&$a(t):$a(r===Zy?e:r)},q0t=function(r){var e=0,t=1;(r[e]===Lf||r[e]===Mo)&&(r[e]===Mo&&(t=-1),e++);for(var n=[];$a(r[e]);)n.push(r[e++]);var i=n.length?parseInt(wi.apply(void 0,n),10):0;r[e]===Zy&&e++;for(var a=[];$a(r[e]);)a.push(r[e++]);var o=a.length,s=o?parseInt(wi.apply(void 0,a),10):0;(r[e]===I7||r[e]===S7)&&e++;var A=1;(r[e]===Lf||r[e]===Mo)&&(r[e]===Mo&&(A=-1),e++);for(var l=[];$a(r[e]);)l.push(r[e++]);var u=l.length?parseInt(wi.apply(void 0,l),10):0;return t*(i+s*Math.pow(10,-o))*Math.pow(10,A*u)},Z0t={type:2},J0t={type:3},t_t={type:4},e_t={type:13},r_t={type:8},n_t={type:21},i_t={type:9},a_t={type:10},o_t={type:11},s_t={type:12},A_t={type:14},S1={type:23},l_t={type:1},u_t={type:25},c_t={type:24},h_t={type:26},f_t={type:27},d_t={type:28},p_t={type:29},g_t={type:31},wL={type:32},O7=function(){function r(){this._value=[]}return r.prototype.write=function(e){this._value=this._value.concat(uB(e))},r.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==wL;)e.push(t),t=this.consumeToken();return e},r.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case w1:return this.consumeStringToken(w1);case g0t:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),i=this.peekCodePoint(2);if(WU(t)||xc(n,i)){var a=T1(t,n,i)?f0t:h0t,o=this.consumeName();return{type:5,value:o,flags:a}}break;case v0t:if(this.peekCodePoint(0)===fm)return this.consumeCodePoint(),e_t;break;case E1:return this.consumeStringToken(E1);case C1:return Z0t;case dm:return J0t;case CT:if(this.peekCodePoint(0)===fm)return this.consumeCodePoint(),A_t;break;case Lf:if(BT(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case O0t:return t_t;case Mo:var s=e,A=this.peekCodePoint(0),l=this.peekCodePoint(1);if(BT(s,A,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(T1(s,A,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(A===Mo&&l===E0t)return this.consumeCodePoint(),this.consumeCodePoint(),c_t;break;case Zy:if(BT(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case VU:if(this.peekCodePoint(0)===CT)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===CT&&(u=this.consumeCodePoint(),u===VU))return this.consumeToken();if(u===KA)return this.consumeToken()}break;case F0t:return h_t;case R0t:return f_t;case w0t:if(this.peekCodePoint(0)===_0t&&this.peekCodePoint(1)===Mo&&this.peekCodePoint(2)===Mo)return this.consumeCodePoint(),this.consumeCodePoint(),u_t;break;case C0t:var c=this.peekCodePoint(0),h=this.peekCodePoint(1),f=this.peekCodePoint(2);if(T1(c,h,f)){var o=this.consumeName();return{type:7,value:o}}break;case B0t:return d_t;case cy:if(xc(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case b0t:return p_t;case T0t:if(this.peekCodePoint(0)===fm)return this.consumeCodePoint(),r_t;break;case S0t:return o_t;case x0t:return s_t;case H0t:case $0t:var d=this.peekCodePoint(0),g=this.peekCodePoint(1);return d===Lf&&(Bp(g)||g===B1)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case jU:if(this.peekCodePoint(0)===fm)return this.consumeCodePoint(),i_t;if(this.peekCodePoint(0)===jU)return this.consumeCodePoint(),n_t;break;case I0t:if(this.peekCodePoint(0)===fm)return this.consumeCodePoint(),a_t;break;case KA:return wL}return b1(e)?(this.consumeWhiteSpace(),g_t):$a(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):IE(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:wi(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();Bp(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===B1&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var i=parseInt(wi.apply(void 0,e.map(function(A){return A===B1?b7:A})),16),a=parseInt(wi.apply(void 0,e.map(function(A){return A===B1?L7:A})),16);return{type:30,start:i,end:a}}var o=parseInt(wi.apply(void 0,e),16);if(this.peekCodePoint(0)===Mo&&Bp(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var s=[];Bp(t)&&s.length<6;)s.push(t),t=this.consumeCodePoint();var a=parseInt(wi.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)===C1?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===C1?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},r.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===KA)return{type:22,value:""};var t=this.peekCodePoint(0);if(t===E1||t===w1){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===KA||this.peekCodePoint(0)===dm)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),S1)}for(;;){var i=this.consumeCodePoint();if(i===KA||i===dm)return{type:22,value:wi.apply(void 0,e)};if(b1(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===KA||this.peekCodePoint(0)===dm?(this.consumeCodePoint(),{type:22,value:wi.apply(void 0,e)}):(this.consumeBadUrlRemnants(),S1);if(i===w1||i===E1||i===C1||X0t(i))return this.consumeBadUrlRemnants(),S1;if(i===cy)if(xc(i,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),S1;else e.push(i)}},r.prototype.consumeWhiteSpace=function(){for(;b1(this.peekCodePoint(0));)this.consumeCodePoint()},r.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===dm||e===KA)return;xc(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+=wi.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===KA||i===void 0||i===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(i===xE)return this._value.splice(0,n),l_t;if(i===cy){var a=this._value[n+1];a!==KA&&a!==void 0&&(a===xE?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):xc(i,a)&&(t+=this.consumeStringSlice(n),t+=wi(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},r.prototype.consumeNumber=function(){var e=[],t=k0,n=this.peekCodePoint(0);for((n===Lf||n===Mo)&&e.push(this.consumeCodePoint());$a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(n===Zy&&$a(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=$U;$a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),i=this.peekCodePoint(1);var a=this.peekCodePoint(2);if((n===I7||n===S7)&&((i===Lf||i===Mo)&&$a(a)||$a(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=$U;$a(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[q0t(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(T1(i,a,o)){var s=this.consumeName();return{type:15,number:t,flags:n,unit:s}}return i===m0t?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},r.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(Bp(e)){for(var t=wi(e);Bp(this.peekCodePoint(0))&&t.length<6;)t+=wi(this.consumeCodePoint());b1(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||j0t(n)||n>1114111?KU:n}return e===KA?KU:e},r.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(WU(t))e+=wi(t);else if(xc(t,this.peekCodePoint(0)))e+=wi(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},r}(),F7=function(){function r(e){this._tokens=e}return r.create=function(e){var t=new O7;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||m_t(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"?wL:e},r.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},r}(),H0=function(r){return r.type===15},fv=function(r){return r.type===17},En=function(r){return r.type===20},v_t=function(r){return r.type===0},EL=function(r,e){return En(r)&&r.value===e},R7=function(r){return r.type!==31},Hg=function(r){return r.type!==31&&r.type!==4},Bl=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},m_t=function(r,e){return e===11&&r.type===12||e===28&&r.type===29?!0:e===2&&r.type===3},mh=function(r){return r.type===17||r.type===15},Pi=function(r){return r.type===16||mh(r)},M7=function(r){return r.length>1?[r[0],r[1]]:[r[0]]},wa={type:17,number:0,flags:k0},GR={type:16,number:50,flags:k0},$c={type:16,number:100,flags:k0},Hm=function(r,e,t){var n=r[0],i=r[1];return[Ln(n,e),Ln(typeof i<"u"?i:n,t)]},Ln=function(r,e){if(r.type===16)return r.number/100*e;if(H0(r))switch(r.unit){case"rem":case"em":return 16*r.number;case"px":default:return r.number}return r.number},N7="deg",P7="grad",U7="rad",D7="turn",cB={name:"angle",parse:function(r,e){if(e.type===15)switch(e.unit){case N7:return Math.PI*e.number/180;case P7:return Math.PI/200*e.number;case U7:return e.number;case D7:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},Q7=function(r){return r.type===15&&(r.unit===N7||r.unit===P7||r.unit===U7||r.unit===D7)},k7=function(r){var e=r.filter(En).map(function(t){return t.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[wa,wa];case"to top":case"bottom":return Us(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[wa,$c];case"to right":case"left":return Us(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[$c,$c];case"to bottom":case"top":return Us(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[$c,wa];case"to left":case"right":return Us(270)}return 0},Us=function(r){return Math.PI*r/180},qc={name:"color",parse:function(r,e){if(e.type===18){var t=y_t[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 Vc(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 Vc(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 Vc(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 Vc(parseInt(n,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(e.type===20){var s=vu[e.value.toUpperCase()];if(typeof s<"u")return s}return vu.TRANSPARENT}},Zc=function(r){return(255&r)===0},ia=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+")"},Vc=function(r,e,t,n){return(r<<24|e<<16|t<<8|Math.round(n*255)<<0)>>>0},zU=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},YU=function(r,e){var t=e.filter(Hg);if(t.length===3){var n=t.map(zU),i=n[0],a=n[1],o=n[2];return Vc(i,a,o,1)}if(t.length===4){var s=t.map(zU),i=s[0],a=s[1],o=s[2],A=s[3];return Vc(i,a,o,A)}return 0};function bT(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 XU=function(r,e){var t=e.filter(Hg),n=t[0],i=t[1],a=t[2],o=t[3],s=(n.type===17?Us(n.number):cB.parse(r,n))/(Math.PI*2),A=Pi(i)?i.number/100:0,l=Pi(a)?a.number/100:0,u=typeof o<"u"&&Pi(o)?Ln(o,1):1;if(A===0)return Vc(l*255,l*255,l*255,1);var c=l<=.5?l*(A+1):l+A-l*A,h=l*2-c,f=bT(h,c,s+1/3),d=bT(h,c,s),g=bT(h,c,s-1/3);return Vc(f*255,d*255,g*255,u)},y_t={hsl:XU,hsla:XU,rgb:YU,rgba:YU},hy=function(r,e){return qc.parse(r,F7.create(e).parseComponentValue())},vu={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},__t={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(En(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},w_t={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},hB=function(r,e){var t=qc.parse(r,e[0]),n=e[1];return n&&Pi(n)?{color:t,stop:n}:{color:t,stop:null}},qU=function(r,e){var t=r[0],n=r[r.length-1];t.stop===null&&(t.stop=wa),n.stop===null&&(n.stop=$c);for(var i=[],a=0,o=0;o<r.length;o++){var s=r[o].stop;if(s!==null){var A=Ln(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),d=1;d<=c;d++)i[l+d-1]=f*d;l=null}}return r.map(function(g,m){var v=g.color;return{color:v,stop:Math.max(Math.min(1,i[m]/e),0)}})},E_t=function(r,e,t){var n=e/2,i=t/2,a=Ln(r[0],e)-n,o=i-Ln(r[1],t);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},C_t=function(r,e,t){var n=typeof r=="number"?r:E_t(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]},sA=function(r,e){return Math.sqrt(r*r+e*e)},ZU=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=sA(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},B_t=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(sA(e,t),sA(e,t-i),sA(e-n,t),sA(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=ZU(n,i,e,t,!0),l=A[0],u=A[1];a=sA(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(sA(e,t),sA(e,t-i),sA(e-n,t),sA(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=ZU(n,i,e,t,!1),l=c[0],u=c[1];a=sA(l-e,(u-t)/s),o=s*a}break}return Array.isArray(r.size)&&(a=Ln(r.size[0],n),o=r.size.length===2?Ln(r.size[1],i):a),[a,o]},b_t=function(r,e){var t=Us(180),n=[];return Bl(e).forEach(function(i,a){if(a===0){var o=i[0];if(o.type===20&&o.value==="to"){t=k7(i);return}else if(Q7(o)){t=cB.parse(r,o);return}}var s=hB(r,i);n.push(s)}),{angle:t,stops:n,type:1}},x1=function(r,e){var t=Us(180),n=[];return Bl(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=k7(i);return}else if(Q7(o)){t=(cB.parse(r,o)+Us(270))%Us(360);return}}var s=hB(r,i);n.push(s)}),{angle:t,stops:n,type:1}},T_t=function(r,e){var t=Us(180),n=[],i=1,a=0,o=3,s=[];return Bl(e).forEach(function(A,l){var u=A[0];if(l===0){if(En(u)&&u.value==="linear"){i=1;return}else if(En(u)&&u.value==="radial"){i=2;return}}if(u.type===18){if(u.name==="from"){var c=qc.parse(r,u.values[0]);n.push({stop:wa,color:c})}else if(u.name==="to"){var c=qc.parse(r,u.values[0]);n.push({stop:$c,color:c})}else if(u.name==="color-stop"){var h=u.values.filter(Hg);if(h.length===2){var c=qc.parse(r,h[1]),f=h[0];fv(f)&&n.push({stop:{type:16,number:f.number*100,flags:f.flags},color:c})}}}}),i===1?{angle:(t+Us(180))%Us(360),stops:n,type:i}:{size:o,shape:a,stops:n,position:s,type:i}},H7="closest-side",G7="farthest-side",$7="closest-corner",V7="farthest-corner",j7="circle",K7="ellipse",W7="cover",z7="contain",S_t=function(r,e){var t=0,n=3,i=[],a=[];return Bl(e).forEach(function(o,s){var A=!0;if(s===0){var l=!1;A=o.reduce(function(c,h){if(l)if(En(h))switch(h.value){case"center":return a.push(GR),c;case"top":case"left":return a.push(wa),c;case"right":case"bottom":return a.push($c),c}else(Pi(h)||mh(h))&&a.push(h);else if(En(h))switch(h.value){case j7:return t=0,!1;case K7:return t=1,!1;case"at":return l=!0,!1;case H7:return n=0,!1;case W7:case G7:return n=1,!1;case z7:case $7:return n=2,!1;case V7:return n=3,!1}else if(mh(h)||Pi(h))return Array.isArray(n)||(n=[]),n.push(h),!1;return c},A)}if(A){var u=hB(r,o);i.push(u)}}),{size:n,shape:t,stops:i,position:a,type:2}},I1=function(r,e){var t=0,n=3,i=[],a=[];return Bl(e).forEach(function(o,s){var A=!0;if(s===0?A=o.reduce(function(u,c){if(En(c))switch(c.value){case"center":return a.push(GR),!1;case"top":case"left":return a.push(wa),!1;case"right":case"bottom":return a.push($c),!1}else if(Pi(c)||mh(c))return a.push(c),!1;return u},A):s===1&&(A=o.reduce(function(u,c){if(En(c))switch(c.value){case j7:return t=0,!1;case K7:return t=1,!1;case z7:case H7:return n=0,!1;case G7:return n=1,!1;case $7:return n=2,!1;case W7:case V7:return n=3,!1}else if(mh(c)||Pi(c))return Array.isArray(n)||(n=[]),n.push(c),!1;return u},A)),A){var l=hB(r,o);i.push(l)}}),{size:n,shape:t,stops:i,position:a,type:2}},x_t=function(r){return r.type===1},I_t=function(r){return r.type===2},$R={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=Y7[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 L_t(r){return!(r.type===20&&r.value==="none")&&(r.type!==18||!!Y7[r.name])}var Y7={"linear-gradient":b_t,"-moz-linear-gradient":x1,"-ms-linear-gradient":x1,"-o-linear-gradient":x1,"-webkit-linear-gradient":x1,"radial-gradient":S_t,"-moz-radial-gradient":I1,"-ms-radial-gradient":I1,"-o-radial-gradient":I1,"-webkit-radial-gradient":I1,"-webkit-gradient":T_t},O_t={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 Hg(n)&&L_t(n)}).map(function(n){return $R.parse(r,n)})}},F_t={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(r,e){return e.map(function(t){if(En(t))switch(t.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},R_t={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(r,e){return Bl(e).map(function(t){return t.filter(Pi)}).map(M7)}},M_t={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(r,e){return Bl(e).map(function(t){return t.filter(En).map(function(n){return n.value}).join(" ")}).map(N_t)}},N_t=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}},yg;(function(r){r.AUTO="auto",r.CONTAIN="contain",r.COVER="cover"})(yg||(yg={}));var P_t={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(r,e){return Bl(e).map(function(t){return t.filter(U_t)})}},U_t=function(r){return En(r)||Pi(r)},fB=function(r){return{name:"border-"+r+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},D_t=fB("top"),Q_t=fB("right"),k_t=fB("bottom"),H_t=fB("left"),dB=function(r){return{name:"border-radius-"+r,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return M7(t.filter(Pi))}}},G_t=dB("top-left"),$_t=dB("top-right"),V_t=dB("bottom-right"),j_t=dB("bottom-left"),pB=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}}},K_t=pB("top"),W_t=pB("right"),z_t=pB("bottom"),Y_t=pB("left"),gB=function(r){return{name:"border-"+r+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return H0(t)?t.number:0}}},X_t=gB("top"),q_t=gB("right"),Z_t=gB("bottom"),J_t=gB("left"),t1t={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},e1t={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(r,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},r1t={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(r,e){return e.filter(En).reduce(function(t,n){return t|n1t(n.value)},0)}},n1t=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},i1t={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}},a1t={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}},LE;(function(r){r.NORMAL="normal",r.STRICT="strict"})(LE||(LE={}));var o1t={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"strict":return LE.STRICT;case"normal":default:return LE.NORMAL}}},s1t={name:"line-height",initialValue:"normal",prefix:!1,type:4},JU=function(r,e){return En(r)&&r.value==="normal"?1.2*e:r.type===17?e*r.number:Pi(r)?Ln(r,e):e},A1t={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(r,e){return e.type===20&&e.value==="none"?null:$R.parse(r,e)}},l1t={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}}},CL={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}}},vB=function(r){return{name:"margin-"+r,initialValue:"0",prefix:!1,type:4}},u1t=vB("top"),c1t=vB("right"),h1t=vB("bottom"),f1t=vB("left"),d1t={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(r,e){return e.filter(En).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}})}},p1t={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"}}},mB=function(r){return{name:"padding-"+r,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},g1t=mB("top"),v1t=mB("right"),m1t=mB("bottom"),y1t=mB("left"),_1t={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}}},w1t={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}},E1t={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&EL(e[0],"none")?[]:Bl(e).map(function(t){for(var n={color:vu.TRANSPARENT,offsetX:wa,offsetY:wa,blur:wa},i=0,a=0;a<t.length;a++){var o=t[a];mh(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:n.blur=o,i++):n.color=qc.parse(r,o)}return n})}},C1t={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}},B1t={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=S1t[e.name];if(typeof t>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return t(e.values)}return null}},b1t=function(r){var e=r.filter(function(t){return t.type===17}).map(function(t){return t.number});return e.length===6?e:null},T1t=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},S1t={matrix:b1t,matrix3d:T1t},t2={type:16,number:50,flags:k0},x1t=[t2,t2],I1t={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(r,e){var t=e.filter(Pi);return t.length!==2?x1t:[t[0],t[1]]}},L1t={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}}},fy;(function(r){r.NORMAL="normal",r.BREAK_ALL="break-all",r.KEEP_ALL="keep-all"})(fy||(fy={}));var O1t={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(r,e){switch(e){case"break-all":return fy.BREAK_ALL;case"keep-all":return fy.KEEP_ALL;case"normal":default:return fy.NORMAL}}},F1t={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(r,e){if(e.type===20)return{auto:!0,order:0};if(fv(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},X7={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")}},R1t={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(r,e){return fv(e)?e.number:1}},M1t={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},N1t={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(r,e){return e.filter(En).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})}},P1t={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+"'"})}},U1t={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},D1t={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(r,e){if(fv(e))return e.number;if(En(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},Q1t={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.filter(En).map(function(t){return t.value})}},k1t={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"}}},ji=function(r,e){return(r&e)!==0},H1t={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}},G1t={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(R7),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(o.type===20){var A=s&&fv(s)?s.number:1;n.push({counter:o.value,increment:A})}}return n}},$1t={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(r,e){if(e.length===0)return[];for(var t=[],n=e.filter(R7),i=0;i<n.length;i++){var a=n[i],o=n[i+1];if(En(a)&&a.value!=="none"){var s=o&&fv(o)?o.number:0;t.push({counter:a.value,reset:s})}}return t}},V1t={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(r,e){return e.filter(H0).map(function(t){return X7.parse(r,t)})}},j1t={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(v_t);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}},e2=function(r,e,t){if(!r)return"";var n=r[Math.min(e,r.length-1)];return n?t?n.open:n.close:""},K1t={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(r,e){return e.length===1&&EL(e[0],"none")?[]:Bl(e).map(function(t){for(var n={color:255,offsetX:wa,offsetY:wa,blur:wa,spread:wa,inset:!1},i=0,a=0;a<t.length;a++){var o=t[a];EL(o,"inset")?n.inset=!0:mh(o)?(i===0?n.offsetX=o:i===1?n.offsetY=o:i===2?n.blur=o:n.spread=o,i++):n.color=qc.parse(r,o)}return n})}},W1t={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(r,e){var t=[0,1,2],n=[];return e.filter(En).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}},z1t={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Y1t={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(r,e){return H0(e)?e.number:0}},X1t=function(){function r(e,t){var n,i;this.animationDuration=_e(e,V1t,t.animationDuration),this.backgroundClip=_e(e,__t,t.backgroundClip),this.backgroundColor=_e(e,w_t,t.backgroundColor),this.backgroundImage=_e(e,O_t,t.backgroundImage),this.backgroundOrigin=_e(e,F_t,t.backgroundOrigin),this.backgroundPosition=_e(e,R_t,t.backgroundPosition),this.backgroundRepeat=_e(e,M_t,t.backgroundRepeat),this.backgroundSize=_e(e,P_t,t.backgroundSize),this.borderTopColor=_e(e,D_t,t.borderTopColor),this.borderRightColor=_e(e,Q_t,t.borderRightColor),this.borderBottomColor=_e(e,k_t,t.borderBottomColor),this.borderLeftColor=_e(e,H_t,t.borderLeftColor),this.borderTopLeftRadius=_e(e,G_t,t.borderTopLeftRadius),this.borderTopRightRadius=_e(e,$_t,t.borderTopRightRadius),this.borderBottomRightRadius=_e(e,V_t,t.borderBottomRightRadius),this.borderBottomLeftRadius=_e(e,j_t,t.borderBottomLeftRadius),this.borderTopStyle=_e(e,K_t,t.borderTopStyle),this.borderRightStyle=_e(e,W_t,t.borderRightStyle),this.borderBottomStyle=_e(e,z_t,t.borderBottomStyle),this.borderLeftStyle=_e(e,Y_t,t.borderLeftStyle),this.borderTopWidth=_e(e,X_t,t.borderTopWidth),this.borderRightWidth=_e(e,q_t,t.borderRightWidth),this.borderBottomWidth=_e(e,Z_t,t.borderBottomWidth),this.borderLeftWidth=_e(e,J_t,t.borderLeftWidth),this.boxShadow=_e(e,K1t,t.boxShadow),this.color=_e(e,t1t,t.color),this.direction=_e(e,e1t,t.direction),this.display=_e(e,r1t,t.display),this.float=_e(e,i1t,t.cssFloat),this.fontFamily=_e(e,P1t,t.fontFamily),this.fontSize=_e(e,U1t,t.fontSize),this.fontStyle=_e(e,k1t,t.fontStyle),this.fontVariant=_e(e,Q1t,t.fontVariant),this.fontWeight=_e(e,D1t,t.fontWeight),this.letterSpacing=_e(e,a1t,t.letterSpacing),this.lineBreak=_e(e,o1t,t.lineBreak),this.lineHeight=_e(e,s1t,t.lineHeight),this.listStyleImage=_e(e,A1t,t.listStyleImage),this.listStylePosition=_e(e,l1t,t.listStylePosition),this.listStyleType=_e(e,CL,t.listStyleType),this.marginTop=_e(e,u1t,t.marginTop),this.marginRight=_e(e,c1t,t.marginRight),this.marginBottom=_e(e,h1t,t.marginBottom),this.marginLeft=_e(e,f1t,t.marginLeft),this.opacity=_e(e,R1t,t.opacity);var a=_e(e,d1t,t.overflow);this.overflowX=a[0],this.overflowY=a[a.length>1?1:0],this.overflowWrap=_e(e,p1t,t.overflowWrap),this.paddingTop=_e(e,g1t,t.paddingTop),this.paddingRight=_e(e,v1t,t.paddingRight),this.paddingBottom=_e(e,m1t,t.paddingBottom),this.paddingLeft=_e(e,y1t,t.paddingLeft),this.paintOrder=_e(e,W1t,t.paintOrder),this.position=_e(e,w1t,t.position),this.textAlign=_e(e,_1t,t.textAlign),this.textDecorationColor=_e(e,M1t,(n=t.textDecorationColor)!==null&&n!==void 0?n:t.color),this.textDecorationLine=_e(e,N1t,(i=t.textDecorationLine)!==null&&i!==void 0?i:t.textDecoration),this.textShadow=_e(e,E1t,t.textShadow),this.textTransform=_e(e,C1t,t.textTransform),this.transform=_e(e,B1t,t.transform),this.transformOrigin=_e(e,I1t,t.transformOrigin),this.visibility=_e(e,L1t,t.visibility),this.webkitTextStrokeColor=_e(e,z1t,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=_e(e,Y1t,t.webkitTextStrokeWidth),this.wordBreak=_e(e,O1t,t.wordBreak),this.zIndex=_e(e,F1t,t.zIndex)}return r.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},r.prototype.isTransparent=function(){return Zc(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 ji(this.display,4)||ji(this.display,33554432)||ji(this.display,268435456)||ji(this.display,536870912)||ji(this.display,67108864)||ji(this.display,134217728)},r}(),q1t=function(){function r(e,t){this.content=_e(e,H1t,t.content),this.quotes=_e(e,j1t,t.quotes)}return r}(),r2=function(){function r(e,t){this.counterIncrement=_e(e,G1t,t.counterIncrement),this.counterReset=_e(e,$1t,t.counterReset)}return r}(),_e=function(r,e,t){var n=new O7,i=t!==null&&typeof t<"u"?t.toString():e.initialValue;n.write(i);var a=new F7(n.read());switch(e.type){case 2:var o=a.parseComponentValue();return e.parse(r,En(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 cB.parse(r,a.parseComponentValue());case"color":return qc.parse(r,a.parseComponentValue());case"image":return $R.parse(r,a.parseComponentValue());case"length":var s=a.parseComponentValue();return mh(s)?s:wa;case"length-percentage":var A=a.parseComponentValue();return Pi(A)?A:wa;case"time":return X7.parse(r,a.parseComponentValue())}break}},Z1t="data-html2canvas-debug",J1t=function(r){var e=r.getAttribute(Z1t);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},BL=function(r,e){var t=J1t(r);return t===1||e===t},bl=function(){function r(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,BL(t,3))debugger;this.styles=new X1t(e,window.getComputedStyle(t,null)),SL(t)&&(this.styles.animationDuration.some(function(n){return n>0})&&(t.style.animationDuration="0s"),this.styles.transform!==null&&(t.style.transform="none")),this.bounds=lB(this.context,t),BL(t,4)&&(this.flags|=16)}return r}(),twt="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",n2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gm=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var L1=0;L1<n2.length;L1++)Gm[n2.charCodeAt(L1)]=L1;var ewt=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=Gm[r.charCodeAt(n)],o=Gm[r.charCodeAt(n+1)],s=Gm[r.charCodeAt(n+2)],A=Gm[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},rwt=function(r){for(var e=r.length,t=[],n=0;n<e;n+=2)t.push(r[n+1]<<8|r[n]);return t},nwt=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},jf=5,VR=6+5,TT=2,iwt=VR-jf,q7=65536>>jf,awt=1<<jf,ST=awt-1,owt=1024>>jf,swt=q7+owt,Awt=swt,lwt=32,uwt=Awt+lwt,cwt=65536>>VR,hwt=1<<iwt,fwt=hwt-1,i2=function(r,e,t){return r.slice?r.slice(e,t):new Uint16Array(Array.prototype.slice.call(r,e,t))},dwt=function(r,e,t){return r.slice?r.slice(e,t):new Uint32Array(Array.prototype.slice.call(r,e,t))},pwt=function(r,e){var t=ewt(r),n=Array.isArray(t)?nwt(t):new Uint32Array(t),i=Array.isArray(t)?rwt(t):new Uint16Array(t),a=24,o=i2(i,a/2,n[4]/2),s=n[5]===2?i2(i,(a+n[4])/2):dwt(n,Math.ceil((a+n[4])/4));return new gwt(n[0],n[1],n[2],n[3],o,s)},gwt=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>>jf],t=(t<<TT)+(e&ST),this.data[t];if(e<=65535)return t=this.index[q7+(e-55296>>jf)],t=(t<<TT)+(e&ST),this.data[t];if(e<this.highStart)return t=uwt-cwt+(e>>VR),t=this.index[t],t+=e>>jf&fwt,t=this.index[t],t=(t<<TT)+(e&ST),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},r}(),a2="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",vwt=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var O1=0;O1<a2.length;O1++)vwt[a2.charCodeAt(O1)]=O1;var mwt=1,xT=2,IT=3,o2=4,s2=5,ywt=7,A2=8,LT=9,OT=10,l2=11,u2=12,c2=13,h2=14,FT=15,_wt=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},wwt=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},Ewt=pwt(twt),Rs="×",RT="÷",Cwt=function(r){return Ewt.get(r)},Bwt=function(r,e,t){var n=t-2,i=e[n],a=e[t-1],o=e[t];if(a===xT&&o===IT)return Rs;if(a===xT||a===IT||a===o2||o===xT||o===IT||o===o2)return RT;if(a===A2&&[A2,LT,l2,u2].indexOf(o)!==-1||(a===l2||a===LT)&&(o===LT||o===OT)||(a===u2||a===OT)&&o===OT||o===c2||o===s2||o===ywt||a===mwt)return Rs;if(a===c2&&o===h2){for(;i===s2;)i=e[--n];if(i===h2)return Rs}if(a===FT&&o===FT){for(var s=0;i===FT;)s++,i=e[--n];if(s%2===0)return Rs}return RT},bwt=function(r){var e=_wt(r),t=e.length,n=0,i=0,a=e.map(Cwt);return{next:function(){if(n>=t)return{done:!0,value:null};for(var o=Rs;n<t&&(o=Bwt(e,a,++n))===Rs;);if(o!==Rs||n===t){var s=wwt.apply(null,e.slice(i,n));return i=n,{value:s,done:!1}}return{done:!0,value:null}}}},Twt=function(r){for(var e=bwt(r),t=[],n;!(n=e.next()).done;)n.value&&t.push(n.value.slice());return t},Swt=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},xwt=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=uB(n.data).map(function(A){return wi(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},Iwt=function(){return typeof new Image().crossOrigin<"u"},Lwt=function(){return typeof new XMLHttpRequest().responseType=="string"},Owt=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},f2=function(r){return r[0]===0&&r[1]===255&&r[2]===0&&r[3]===255},Fwt=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=bL(t,t,0,0,i);return n.fillStyle="red",n.fillRect(0,0,t,t),d2(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",f2(A)?d2(bL(t,t,0,0,l)):Promise.reject(!1)}).then(function(s){return n.drawImage(s,0,0),f2(n.getImageData(0,0,t,t).data)}).catch(function(){return!1})},bL=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},d2=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))})},ma={get SUPPORT_RANGE_BOUNDS(){var r=Swt(document);return Object.defineProperty(ma,"SUPPORT_RANGE_BOUNDS",{value:r}),r},get SUPPORT_WORD_BREAKING(){var r=ma.SUPPORT_RANGE_BOUNDS&&xwt(document);return Object.defineProperty(ma,"SUPPORT_WORD_BREAKING",{value:r}),r},get SUPPORT_SVG_DRAWING(){var r=Owt(document);return Object.defineProperty(ma,"SUPPORT_SVG_DRAWING",{value:r}),r},get SUPPORT_FOREIGNOBJECT_DRAWING(){var r=typeof Array.from=="function"&&typeof window.fetch=="function"?Fwt(document):Promise.resolve(!1);return Object.defineProperty(ma,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:r}),r},get SUPPORT_CORS_IMAGES(){var r=Iwt();return Object.defineProperty(ma,"SUPPORT_CORS_IMAGES",{value:r}),r},get SUPPORT_RESPONSE_TYPE(){var r=Lwt();return Object.defineProperty(ma,"SUPPORT_RESPONSE_TYPE",{value:r}),r},get SUPPORT_CORS_XHR(){var r="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ma,"SUPPORT_CORS_XHR",{value:r}),r},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var r=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(ma,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:r}),r}},dy=function(){function r(e,t){this.text=e,this.bounds=t}return r}(),Rwt=function(r,e,t,n){var i=Pwt(e,t),a=[],o=0;return i.forEach(function(s){if(t.textDecorationLine.length||s.trim().length>0)if(ma.SUPPORT_RANGE_BOUNDS){var A=p2(n,o,s.length).getClientRects();if(A.length>1){var l=jR(s),u=0;l.forEach(function(h){a.push(new dy(h,Bu.fromDOMRectList(r,p2(n,u+o,h.length).getClientRects()))),u+=h.length})}else a.push(new dy(s,Bu.fromDOMRectList(r,A)))}else{var c=n.splitText(s.length);a.push(new dy(s,Mwt(r,n))),n=c}else ma.SUPPORT_RANGE_BOUNDS||(n=n.splitText(s.length));o+=s.length}),a},Mwt=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=lB(r,n);return n.firstChild&&i.replaceChild(n.firstChild,n),a}}return Bu.EMPTY},p2=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},jR=function(r){if(ma.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 Twt(r)},Nwt=function(r,e){if(ma.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 Dwt(r,e)},Pwt=function(r,e){return e.letterSpacing!==0?jR(r):Nwt(r,e)},Uwt=[32,160,4961,65792,65793,4153,4241],Dwt=function(r,e){for(var t=c0t(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=uB(o),A="";s.forEach(function(l){Uwt.indexOf(l)===-1?A+=wi(l):(A.length&&n.push(A),n.push(wi(l)),A="")}),A.length&&n.push(A)}};!(i=t.next()).done;)a();return n},Qwt=function(){function r(e,t,n){this.text=kwt(t.data,n.textTransform),this.textBounds=Rwt(e,this.text,n,t)}return r}(),kwt=function(r,e){switch(e){case 1:return r.toLowerCase();case 3:return r.replace(Hwt,Gwt);case 2:return r.toUpperCase();default:return r}},Hwt=/(^|\s|:|-|\(|\))([a-z])/g,Gwt=function(r,e,t){return r.length>0?e+t.toUpperCase():r},Z7=function(r){xA(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}(bl),J7=function(r){xA(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}(bl),t$=function(r){xA(e,r);function e(t,n){var i=r.call(this,t,n)||this,a=new XMLSerializer,o=lB(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}(bl),e$=function(r){xA(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(bl),TL=function(r){xA(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}(bl),$wt=[{type:15,flags:0,unit:"px",number:3}],Vwt=[{type:16,flags:0,number:50}],jwt=function(r){return r.width>r.height?new Bu(r.left+(r.width-r.height)/2,r.top,r.height,r.height):r.width<r.height?new Bu(r.left,r.top+(r.height-r.width)/2,r.width,r.width):r},Kwt=function(r){var e=r.type===Wwt?new Array(r.value.length+1).join("•"):r.value;return e.length===0?r.placeholder||"":e},OE="checkbox",FE="radio",Wwt="password",g2=707406591,KR=function(r){xA(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=Kwt(n),(i.type===OE||i.type===FE)&&(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=jwt(i.bounds)),i.type){case OE:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=$wt;break;case FE:i.styles.borderTopRightRadius=i.styles.borderTopLeftRadius=i.styles.borderBottomRightRadius=i.styles.borderBottomLeftRadius=Vwt;break}return i}return e}(bl),r$=function(r){xA(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}(bl),n$=function(r){xA(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.value=n.value,i}return e}(bl),i$=function(r){xA(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=o$(t,n.contentWindow.document.documentElement);var a=n.contentWindow.document.documentElement?hy(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):vu.TRANSPARENT,o=n.contentWindow.document.body?hy(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):vu.TRANSPARENT;i.backgroundColor=Zc(a)?Zc(o)?i.styles.backgroundColor:o:a}}catch{}return i}return e}(bl),zwt=["OL","UL","MENU"],mw=function(r,e,t,n){for(var i=e.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,s$(i)&&i.data.trim().length>0)t.textNodes.push(new Qwt(r,i,t.styles));else if(eg(i))if(c$(i)&&i.assignedNodes)i.assignedNodes().forEach(function(s){return mw(r,s,t,n)});else{var o=a$(r,i);o.styles.isVisible()&&(Ywt(i,o,n)?o.flags|=4:Xwt(o.styles)&&(o.flags|=2),zwt.indexOf(i.tagName)!==-1&&(o.flags|=8),t.elements.push(o),i.slot,i.shadowRoot?mw(r,i.shadowRoot,o,n):!RE(i)&&!A$(i)&&!ME(i)&&mw(r,i,o,n))}},a$=function(r,e){return xL(e)?new Z7(r,e):l$(e)?new J7(r,e):A$(e)?new t$(r,e):qwt(e)?new e$(r,e):Zwt(e)?new TL(r,e):Jwt(e)?new KR(r,e):ME(e)?new r$(r,e):RE(e)?new n$(r,e):u$(e)?new i$(r,e):new bl(r,e)},o$=function(r,e){var t=a$(r,e);return t.flags|=4,mw(r,e,t,t),t},Ywt=function(r,e,t){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||WR(r)&&t.styles.isTransparent()},Xwt=function(r){return r.isPositioned()||r.isFloating()},s$=function(r){return r.nodeType===Node.TEXT_NODE},eg=function(r){return r.nodeType===Node.ELEMENT_NODE},SL=function(r){return eg(r)&&typeof r.style<"u"&&!yw(r)},yw=function(r){return typeof r.className=="object"},qwt=function(r){return r.tagName==="LI"},Zwt=function(r){return r.tagName==="OL"},Jwt=function(r){return r.tagName==="INPUT"},tEt=function(r){return r.tagName==="HTML"},A$=function(r){return r.tagName==="svg"},WR=function(r){return r.tagName==="BODY"},l$=function(r){return r.tagName==="CANVAS"},v2=function(r){return r.tagName==="VIDEO"},xL=function(r){return r.tagName==="IMG"},u$=function(r){return r.tagName==="IFRAME"},m2=function(r){return r.tagName==="STYLE"},eEt=function(r){return r.tagName==="SCRIPT"},RE=function(r){return r.tagName==="TEXTAREA"},ME=function(r){return r.tagName==="SELECT"},c$=function(r){return r.tagName==="SLOT"},y2=function(r){return r.tagName.indexOf("-")>0},rEt=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}(),_2={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"]},w2={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:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},nEt={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:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},iEt={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:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},bp=function(r,e,t,n,i,a){return r<e||r>t?Jy(r,i,a.length>0):n.integers.reduce(function(o,s,A){for(;r>=s;)r-=s,o+=n.values[A];return o},"")+a},h$=function(r,e,t,n){var i="";do t||r--,i=n(r)+i,r/=e;while(r*e>=e);return i},yi=function(r,e,t,n,i){var a=t-e+1;return(r<0?"-":"")+(h$(Math.abs(r),a,n,function(o){return wi(Math.floor(o%a)+e)})+i)},Af=function(r,e,t){t===void 0&&(t=". ");var n=e.length;return h$(Math.abs(r),n,!1,function(i){return e[Math.floor(i%n)]})+t},Gp=1<<0,Bc=1<<1,bc=1<<2,$m=1<<3,Xl=function(r,e,t,n,i,a){if(r<-9999||r>9999)return Jy(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&&ji(a,Gp)&&s!==""?s=e[l]+s:l>1||l===1&&A===0||l===1&&A===1&&ji(a,Bc)||l===1&&A===1&&ji(a,bc)&&r>100||l===1&&A>1&&ji(a,$m)?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},E2="十百千萬",C2="拾佰仟萬",B2="マイナス",MT="마이너스",Jy=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=yi(r,48,57,!0,n);return s.length<4?"0"+s:s;case 4:return Af(r,"〇一二三四五六七八九",i);case 6:return bp(r,1,3999,_2,3,n).toLowerCase();case 7:return bp(r,1,3999,_2,3,n);case 8:return yi(r,945,969,!1,n);case 9:return yi(r,97,122,!1,n);case 10:return yi(r,65,90,!1,n);case 11:return yi(r,1632,1641,!0,n);case 12:case 49:return bp(r,1,9999,w2,3,n);case 35:return bp(r,1,9999,w2,3,n).toLowerCase();case 13:return yi(r,2534,2543,!0,n);case 14:case 30:return yi(r,6112,6121,!0,n);case 15:return Af(r,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Af(r,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return Xl(r,"零一二三四五六七八九",E2,"負",i,Bc|bc|$m);case 47:return Xl(r,"零壹貳參肆伍陸柒捌玖",C2,"負",i,Gp|Bc|bc|$m);case 42:return Xl(r,"零一二三四五六七八九",E2,"负",i,Bc|bc|$m);case 41:return Xl(r,"零壹贰叁肆伍陆柒捌玖",C2,"负",i,Gp|Bc|bc|$m);case 26:return Xl(r,"〇一二三四五六七八九","十百千万",B2,i,0);case 25:return Xl(r,"零壱弐参四伍六七八九","拾百千万",B2,i,Gp|Bc|bc);case 31:return Xl(r,"영일이삼사오육칠팔구","십백천만",MT,a,Gp|Bc|bc);case 33:return Xl(r,"零一二三四五六七八九","十百千萬",MT,a,0);case 32:return Xl(r,"零壹貳參四五六七八九","拾百千",MT,a,Gp|Bc|bc);case 18:return yi(r,2406,2415,!0,n);case 20:return bp(r,1,19999,iEt,3,n);case 21:return yi(r,2790,2799,!0,n);case 22:return yi(r,2662,2671,!0,n);case 22:return bp(r,1,10999,nEt,3,n);case 23:return Af(r,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Af(r,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return yi(r,3302,3311,!0,n);case 28:return Af(r,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Af(r,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return yi(r,3792,3801,!0,n);case 37:return yi(r,6160,6169,!0,n);case 38:return yi(r,4160,4169,!0,n);case 39:return yi(r,2918,2927,!0,n);case 40:return yi(r,1776,1785,!0,n);case 43:return yi(r,3046,3055,!0,n);case 44:return yi(r,3174,3183,!0,n);case 45:return yi(r,3664,3673,!0,n);case 46:return yi(r,3872,3881,!0,n);case 3:default:return yi(r,48,57,!0,n)}},f$="data-html2canvas-ignore",b2=function(){function r(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new rEt,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=aEt(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=AEt(i).then(function(){return so(n,void 0,void 0,function(){var u,c;return Ha(this,function(h){switch(h.label){case 0:return this.scrolledElements.forEach(hEt),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,sEt(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(uEt(document.doctype)+"<html></html>"),cEt(this.referenceElement.ownerDocument,a,o),A.replaceChild(A.adoptNode(this.documentElement),A.documentElement),A.close(),l},r.prototype.createElementClone=function(e){if(BL(e,2))debugger;if(l$(e))return this.createCanvasClone(e);if(v2(e))return this.createVideoClone(e);if(m2(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return xL(t)&&(xL(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),y2(t)?this.createCustomElementClone(t):t},r.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return NT(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){(!eg(t)||!eEt(t)&&!t.hasAttribute(f$)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!eg(t)||!m2(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(eg(a)&&c$(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(s$(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&eg(e)&&(SL(e)||yw(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&&SL(i)&&(this.clonedReferenceElement=i),WR(i)&&pEt(i);var A=this.counters.parse(new r2(this.context,a)),l=this.resolvePseudoContent(e,i,o,py.BEFORE);y2(e)&&(t=!0),v2(e)||this.cloneChildNodes(e,i,t),l&&i.insertBefore(l,i.firstChild);var u=this.resolvePseudoContent(e,i,s,py.AFTER);return u&&i.appendChild(u),this.counters.pop(A),(a&&(this.options.copyStyles||yw(e))&&!u$(e)||t)&&NT(a,i),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(RE(e)||ME(e))&&(RE(i)||ME(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 r2(this.context,n));var A=new q1t(this.context,n),l=s.createElement("html2canvaspseudoelement");NT(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(En);f.length&&l.appendChild(s.createTextNode(e.getAttribute(f[0].value)||""))}else if(c.name==="counter"){var d=c.values.filter(Hg),g=d[0],m=d[1];if(g&&En(g)){var v=a.counters.getCounterValue(g.value),y=m&&En(m)?CL.parse(a.context,m.value):3;l.appendChild(s.createTextNode(Jy(v,y,!1)))}}else if(c.name==="counters"){var w=c.values.filter(Hg),g=w[0],C=w[1],m=w[2];if(g&&En(g)){var O=a.counters.getCounterValues(g.value),F=m&&En(m)?CL.parse(a.context,m.value):3,I=C&&C.type===0?C.value:"",T=O.map(function(x){return Jy(x,F,!1)}).join(I);l.appendChild(s.createTextNode(T))}}}else if(c.type===20)switch(c.value){case"open-quote":l.appendChild(s.createTextNode(e2(A.quotes,a.quoteDepth++,!0)));break;case"close-quote":l.appendChild(s.createTextNode(e2(A.quotes,--a.quoteDepth,!1)));break;default:l.appendChild(s.createTextNode(c.value))}}),l.className=IL+" "+LL;var u=i===py.BEFORE?" "+IL:" "+LL;return yw(t)?t.className.baseValue+=u:t.className+=u,l}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r}(),py;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(py||(py={}));var aEt=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(f$,"true"),r.body.appendChild(t),t},oEt=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},sEt=function(r){return Promise.all([].slice.call(r.images,0).map(oEt))},AEt=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)}})},lEt=["all","d","content"],NT=function(r,e){for(var t=r.length-1;t>=0;t--){var n=r.item(t);lEt.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},uEt=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},cEt=function(r,e,t){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||t!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,t)},hEt=function(r){var e=r[0],t=r[1],n=r[2];e.scrollLeft=t,e.scrollTop=n},fEt=":before",dEt=":after",IL="___html2canvas___pseudoelement_before",LL="___html2canvas___pseudoelement_after",T2=`{
content: "" !important;
display: none !important;
}`,pEt=function(r){gEt(r,"."+IL+fEt+T2+`
.`+LL+dEt+T2)},gEt=function(r,e){var t=r.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,r.appendChild(n)}},d$=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}(),vEt=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)||(UT(e)||wEt(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 so(this,void 0,void 0,function(){var t,n,i,a,o=this;return Ha(this,function(s){switch(s.label){case 0:return t=d$.isSameOrigin(e),n=!PT(e)&&this._options.useCORS===!0&&ma.SUPPORT_CORS_IMAGES&&!t,i=!PT(e)&&!t&&!UT(e)&&typeof this._options.proxy=="string"&&ma.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!PT(e)&&!UT(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,(EEt(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=ma.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}(),mEt=/^data:image\/svg\+xml/i,yEt=/^data:image\/.*;base64,/i,_Et=/^data:image\/.*/i,wEt=function(r){return ma.SUPPORT_SVG_DRAWING||!CEt(r)},PT=function(r){return _Et.test(r)},EEt=function(r){return yEt.test(r)},UT=function(r){return r.substr(0,4)==="blob"},CEt=function(r){return r.substr(-3).toLowerCase()==="svg"||mEt.test(r)},ge=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}(),Tp=function(r,e,t){return new ge(r.x+(e.x-r.x)*t,r.y+(e.y-r.y)*t)},F1=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=Tp(this.start,this.startControl,e),i=Tp(this.startControl,this.endControl,e),a=Tp(this.endControl,this.end,e),o=Tp(n,i,e),s=Tp(i,a,e),A=Tp(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}(),Ns=function(r){return r.type===1},BEt=function(){function r(e){var t=e.styles,n=e.bounds,i=Hm(t.borderTopLeftRadius,n.width,n.height),a=i[0],o=i[1],s=Hm(t.borderTopRightRadius,n.width,n.height),A=s[0],l=s[1],u=Hm(t.borderBottomRightRadius,n.width,n.height),c=u[0],h=u[1],f=Hm(t.borderBottomLeftRadius,n.width,n.height),d=f[0],g=f[1],m=[];m.push((a+A)/n.width),m.push((d+c)/n.width),m.push((o+g)/n.height),m.push((l+h)/n.height);var v=Math.max.apply(Math,m);v>1&&(a/=v,o/=v,A/=v,l/=v,c/=v,h/=v,d/=v,g/=v);var y=n.width-A,w=n.height-h,C=n.width-c,O=n.height-g,F=t.borderTopWidth,I=t.borderRightWidth,T=t.borderBottomWidth,L=t.borderLeftWidth,N=Ln(t.paddingTop,e.bounds.width),x=Ln(t.paddingRight,e.bounds.width),S=Ln(t.paddingBottom,e.bounds.width),P=Ln(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=a>0||o>0?kn(n.left+L/3,n.top+F/3,a-L/3,o-F/3,on.TOP_LEFT):new ge(n.left+L/3,n.top+F/3),this.topRightBorderDoubleOuterBox=a>0||o>0?kn(n.left+y,n.top+F/3,A-I/3,l-F/3,on.TOP_RIGHT):new ge(n.left+n.width-I/3,n.top+F/3),this.bottomRightBorderDoubleOuterBox=c>0||h>0?kn(n.left+C,n.top+w,c-I/3,h-T/3,on.BOTTOM_RIGHT):new ge(n.left+n.width-I/3,n.top+n.height-T/3),this.bottomLeftBorderDoubleOuterBox=d>0||g>0?kn(n.left+L/3,n.top+O,d-L/3,g-T/3,on.BOTTOM_LEFT):new ge(n.left+L/3,n.top+n.height-T/3),this.topLeftBorderDoubleInnerBox=a>0||o>0?kn(n.left+L*2/3,n.top+F*2/3,a-L*2/3,o-F*2/3,on.TOP_LEFT):new ge(n.left+L*2/3,n.top+F*2/3),this.topRightBorderDoubleInnerBox=a>0||o>0?kn(n.left+y,n.top+F*2/3,A-I*2/3,l-F*2/3,on.TOP_RIGHT):new ge(n.left+n.width-I*2/3,n.top+F*2/3),this.bottomRightBorderDoubleInnerBox=c>0||h>0?kn(n.left+C,n.top+w,c-I*2/3,h-T*2/3,on.BOTTOM_RIGHT):new ge(n.left+n.width-I*2/3,n.top+n.height-T*2/3),this.bottomLeftBorderDoubleInnerBox=d>0||g>0?kn(n.left+L*2/3,n.top+O,d-L*2/3,g-T*2/3,on.BOTTOM_LEFT):new ge(n.left+L*2/3,n.top+n.height-T*2/3),this.topLeftBorderStroke=a>0||o>0?kn(n.left+L/2,n.top+F/2,a-L/2,o-F/2,on.TOP_LEFT):new ge(n.left+L/2,n.top+F/2),this.topRightBorderStroke=a>0||o>0?kn(n.left+y,n.top+F/2,A-I/2,l-F/2,on.TOP_RIGHT):new ge(n.left+n.width-I/2,n.top+F/2),this.bottomRightBorderStroke=c>0||h>0?kn(n.left+C,n.top+w,c-I/2,h-T/2,on.BOTTOM_RIGHT):new ge(n.left+n.width-I/2,n.top+n.height-T/2),this.bottomLeftBorderStroke=d>0||g>0?kn(n.left+L/2,n.top+O,d-L/2,g-T/2,on.BOTTOM_LEFT):new ge(n.left+L/2,n.top+n.height-T/2),this.topLeftBorderBox=a>0||o>0?kn(n.left,n.top,a,o,on.TOP_LEFT):new ge(n.left,n.top),this.topRightBorderBox=A>0||l>0?kn(n.left+y,n.top,A,l,on.TOP_RIGHT):new ge(n.left+n.width,n.top),this.bottomRightBorderBox=c>0||h>0?kn(n.left+C,n.top+w,c,h,on.BOTTOM_RIGHT):new ge(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=d>0||g>0?kn(n.left,n.top+O,d,g,on.BOTTOM_LEFT):new ge(n.left,n.top+n.height),this.topLeftPaddingBox=a>0||o>0?kn(n.left+L,n.top+F,Math.max(0,a-L),Math.max(0,o-F),on.TOP_LEFT):new ge(n.left+L,n.top+F),this.topRightPaddingBox=A>0||l>0?kn(n.left+Math.min(y,n.width-I),n.top+F,y>n.width+I?0:Math.max(0,A-I),Math.max(0,l-F),on.TOP_RIGHT):new ge(n.left+n.width-I,n.top+F),this.bottomRightPaddingBox=c>0||h>0?kn(n.left+Math.min(C,n.width-L),n.top+Math.min(w,n.height-T),Math.max(0,c-I),Math.max(0,h-T),on.BOTTOM_RIGHT):new ge(n.left+n.width-I,n.top+n.height-T),this.bottomLeftPaddingBox=d>0||g>0?kn(n.left+L,n.top+Math.min(O,n.height-T),Math.max(0,d-L),Math.max(0,g-T),on.BOTTOM_LEFT):new ge(n.left+L,n.top+n.height-T),this.topLeftContentBox=a>0||o>0?kn(n.left+L+P,n.top+F+N,Math.max(0,a-(L+P)),Math.max(0,o-(F+N)),on.TOP_LEFT):new ge(n.left+L+P,n.top+F+N),this.topRightContentBox=A>0||l>0?kn(n.left+Math.min(y,n.width+L+P),n.top+F+N,y>n.width+L+P?0:A-L+P,l-(F+N),on.TOP_RIGHT):new ge(n.left+n.width-(I+x),n.top+F+N),this.bottomRightContentBox=c>0||h>0?kn(n.left+Math.min(C,n.width-(L+P)),n.top+Math.min(w,n.height+F+N),Math.max(0,c-(I+x)),h-(T+S),on.BOTTOM_RIGHT):new ge(n.left+n.width-(I+x),n.top+n.height-(T+S)),this.bottomLeftContentBox=d>0||g>0?kn(n.left+L+P,n.top+O,Math.max(0,d-(L+P)),g-(T+S),on.BOTTOM_LEFT):new ge(n.left+L+P,n.top+n.height-(T+S))}return r}(),on;(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"})(on||(on={}));var kn=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 on.TOP_LEFT:return new F1(new ge(r,l),new ge(r,l-s),new ge(A-o,e),new ge(A,e));case on.TOP_RIGHT:return new F1(new ge(r,e),new ge(r+o,e),new ge(A,l-s),new ge(A,l));case on.BOTTOM_RIGHT:return new F1(new ge(A,e),new ge(A,e+s),new ge(r+o,l),new ge(r,l));case on.BOTTOM_LEFT:default:return new F1(new ge(A,l),new ge(A-o,l),new ge(r,e+s),new ge(r,e))}},NE=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},bEt=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},PE=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},TEt=function(){function r(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return r}(),R1=function(){function r(e,t){this.path=e,this.target=t,this.type=1}return r}(),SEt=function(){function r(e){this.opacity=e,this.type=2,this.target=6}return r}(),xEt=function(r){return r.type===0},p$=function(r){return r.type===1},IEt=function(r){return r.type===2},S2=function(r,e){return r.length===e.length?r.some(function(t,n){return t===e[n]}):!1},LEt=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})},g$=function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r}(),v$=function(){function r(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new BEt(this.container),this.container.styles.opacity<1&&this.effects.push(new SEt(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 TEt(n,i,a))}if(this.container.styles.overflowX!==0){var o=NE(this.curves),s=PE(this.curves);S2(o,s)?this.effects.push(new R1(o,6)):(this.effects.push(new R1(o,2)),this.effects.push(new R1(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!p$(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=NE(n.curves),s=PE(n.curves);S2(o,s)||i.unshift(new R1(s,6))}}else i.unshift.apply(i,a);n=n.parent}return i.filter(function(A){return ji(A.target,e)})},r}(),OL=function(r,e,t,n){r.container.elements.forEach(function(i){var a=ji(i.flags,4),o=ji(i.flags,2),s=new v$(i,r);ji(i.styles.display,2048)&&n.push(s);var A=ji(i.flags,8)?[]:n;if(a||o){var l=a||i.styles.isPositioned()?t:e,u=new g$(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(d,g){return c>d.element.container.styles.zIndex.order?(h=g,!1):h>0}),l.negativeZIndex.splice(h,0,u)}else if(c>0){var f=0;l.positiveZIndex.some(function(d,g){return c>=d.element.container.styles.zIndex.order?(f=g+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);OL(s,u,a?u:t,A)}else i.styles.isInlineLevel()?e.inlineLevel.push(s):e.nonInlineLevel.push(s),OL(s,e,t,A);ji(i.flags,8)&&m$(i,A)})},m$=function(r,e){for(var t=r instanceof TL?r.start:1,n=r instanceof TL?r.reversed:!1,i=0;i<e.length;i++){var a=e[i];a.container instanceof e$&&typeof a.container.value=="number"&&a.container.value!==0&&(t=a.container.value),a.listValue=Jy(t,a.container.styles.listStyleType,!0),t+=n?-1:1}},OEt=function(r){var e=new v$(r,null),t=new g$(e),n=[];return OL(e,t,t,n),m$(e.container,n),t},x2=function(r,e){switch(e){case 0:return Ds(r.topLeftBorderBox,r.topLeftPaddingBox,r.topRightBorderBox,r.topRightPaddingBox);case 1:return Ds(r.topRightBorderBox,r.topRightPaddingBox,r.bottomRightBorderBox,r.bottomRightPaddingBox);case 2:return Ds(r.bottomRightBorderBox,r.bottomRightPaddingBox,r.bottomLeftBorderBox,r.bottomLeftPaddingBox);case 3:default:return Ds(r.bottomLeftBorderBox,r.bottomLeftPaddingBox,r.topLeftBorderBox,r.topLeftPaddingBox)}},FEt=function(r,e){switch(e){case 0:return Ds(r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox,r.topRightBorderBox,r.topRightBorderDoubleOuterBox);case 1:return Ds(r.topRightBorderBox,r.topRightBorderDoubleOuterBox,r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox);case 2:return Ds(r.bottomRightBorderBox,r.bottomRightBorderDoubleOuterBox,r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox);case 3:default:return Ds(r.bottomLeftBorderBox,r.bottomLeftBorderDoubleOuterBox,r.topLeftBorderBox,r.topLeftBorderDoubleOuterBox)}},REt=function(r,e){switch(e){case 0:return Ds(r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox,r.topRightBorderDoubleInnerBox,r.topRightPaddingBox);case 1:return Ds(r.topRightBorderDoubleInnerBox,r.topRightPaddingBox,r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox);case 2:return Ds(r.bottomRightBorderDoubleInnerBox,r.bottomRightPaddingBox,r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox);case 3:default:return Ds(r.bottomLeftBorderDoubleInnerBox,r.bottomLeftPaddingBox,r.topLeftBorderDoubleInnerBox,r.topLeftPaddingBox)}},MEt=function(r,e){switch(e){case 0:return M1(r.topLeftBorderStroke,r.topRightBorderStroke);case 1:return M1(r.topRightBorderStroke,r.bottomRightBorderStroke);case 2:return M1(r.bottomRightBorderStroke,r.bottomLeftBorderStroke);case 3:default:return M1(r.bottomLeftBorderStroke,r.topLeftBorderStroke)}},M1=function(r,e){var t=[];return Ns(r)?t.push(r.subdivide(.5,!1)):t.push(r),Ns(e)?t.push(e.subdivide(.5,!0)):t.push(e),t},Ds=function(r,e,t,n){var i=[];return Ns(r)?i.push(r.subdivide(.5,!1)):i.push(r),Ns(t)?i.push(t.subdivide(.5,!0)):i.push(t),Ns(n)?i.push(n.subdivide(.5,!0).reverse()):i.push(n),Ns(e)?i.push(e.subdivide(.5,!1).reverse()):i.push(e),i},y$=function(r){var e=r.bounds,t=r.styles;return e.add(t.borderLeftWidth,t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth),-(t.borderTopWidth+t.borderBottomWidth))},UE=function(r){var e=r.styles,t=r.bounds,n=Ln(e.paddingLeft,t.width),i=Ln(e.paddingRight,t.width),a=Ln(e.paddingTop,t.width),o=Ln(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))},NEt=function(r,e){return r===0?e.bounds:r===2?UE(e):y$(e)},PEt=function(r,e){return r===0?e.bounds:r===2?UE(e):y$(e)},DT=function(r,e,t){var n=NEt($p(r.styles.backgroundOrigin,e),r),i=PEt($p(r.styles.backgroundClip,e),r),a=UEt($p(r.styles.backgroundSize,e),t,n),o=a[0],s=a[1],A=Hm($p(r.styles.backgroundPosition,e),n.width-o,n.height-s),l=DEt($p(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]},Sp=function(r){return En(r)&&r.value===yg.AUTO},N1=function(r){return typeof r=="number"},UEt=function(r,e,t){var n=e[0],i=e[1],a=e[2],o=r[0],s=r[1];if(!o)return[0,0];if(Pi(o)&&s&&Pi(s))return[Ln(o,t.width),Ln(s,t.height)];var A=N1(a);if(En(o)&&(o.value===yg.CONTAIN||o.value===yg.COVER)){if(N1(a)){var l=t.width/t.height;return l<a!=(o.value===yg.COVER)?[t.width,t.width/a]:[t.height*a,t.height]}return[t.width,t.height]}var u=N1(n),c=N1(i),h=u||c;if(Sp(o)&&(!s||Sp(s))){if(u&&c)return[n,i];if(!A&&!h)return[t.width,t.height];if(h&&A){var f=u?n:i*a,d=c?i:n/a;return[f,d]}var g=u?n:t.width,m=c?i:t.height;return[g,m]}if(A){var v=0,y=0;return Pi(o)?v=Ln(o,t.width):Pi(s)&&(y=Ln(s,t.height)),Sp(o)?v=y*a:(!s||Sp(s))&&(y=v/a),[v,y]}var w=null,C=null;if(Pi(o)?w=Ln(o,t.width):s&&Pi(s)&&(C=Ln(s,t.height)),w!==null&&(!s||Sp(s))&&(C=u&&c?w/n*i:t.height),C!==null&&Sp(o)&&(w=u&&c?C/i*n:t.width),w!==null&&C!==null)return[w,C];throw new Error("Unable to calculate background-size for element")},$p=function(r,e){var t=r[e];return typeof t>"u"?r[0]:t},DEt=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 ge(Math.round(n.left),Math.round(n.top+o)),new ge(Math.round(n.left+n.width),Math.round(n.top+o)),new ge(Math.round(n.left+n.width),Math.round(A+n.top+o)),new ge(Math.round(n.left),Math.round(A+n.top+o))];case 3:return[new ge(Math.round(n.left+a),Math.round(n.top)),new ge(Math.round(n.left+a+s),Math.round(n.top)),new ge(Math.round(n.left+a+s),Math.round(n.height+n.top)),new ge(Math.round(n.left+a),Math.round(n.height+n.top))];case 1:return[new ge(Math.round(n.left+a),Math.round(n.top+o)),new ge(Math.round(n.left+a+s),Math.round(n.top+o)),new ge(Math.round(n.left+a+s),Math.round(n.top+o+A)),new ge(Math.round(n.left+a),Math.round(n.top+o+A))];default:return[new ge(Math.round(i.left),Math.round(i.top)),new ge(Math.round(i.left+i.width),Math.round(i.top)),new ge(Math.round(i.left+i.width),Math.round(i.height+i.top)),new ge(Math.round(i.left),Math.round(i.height+i.top))]}},QEt="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",I2="Hidden Text",kEt=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=QEt,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(I2)),n.appendChild(a),n.appendChild(i);var s=i.offsetTop-a.offsetTop+2;n.removeChild(a),n.appendChild(this._document.createTextNode(I2)),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}(),_$=function(){function r(e,t){this.context=e,this.options=t}return r}(),HEt=1e4,GEt=function(r){xA(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 kEt(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(),IEt(t)&&(this.ctx.globalAlpha=t.opacity),xEt(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)),p$(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 so(this,void 0,void 0,function(){var n;return Ha(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 so(this,void 0,void 0,function(){return Ha(this,function(n){switch(n.label){case 0:if(ji(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=jR(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=WEt(t.fontFamily).join(", "),a=H0(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 so(this,void 0,void 0,function(){var i,a,o,s,A,l,u,c,h=this;return Ha(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(d){c.forEach(function(g){switch(g){case 0:h.ctx.fillStyle=ia(n.color),h.renderTextWithLetterSpacing(d,n.letterSpacing,l);var m=n.textShadow;m.length&&d.text.trim().length&&(m.slice(0).reverse().forEach(function(v){h.ctx.shadowColor=ia(v.color),h.ctx.shadowOffsetX=v.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=v.offsetY.number*h.options.scale,h.ctx.shadowBlur=v.blur.number,h.renderTextWithLetterSpacing(d,n.letterSpacing,l)}),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),n.textDecorationLine.length&&(h.ctx.fillStyle=ia(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(v){switch(v){case 1:h.ctx.fillRect(d.bounds.left,Math.round(d.bounds.top+l),d.bounds.width,1);break;case 2:h.ctx.fillRect(d.bounds.left,Math.round(d.bounds.top),d.bounds.width,1);break;case 3:h.ctx.fillRect(d.bounds.left,Math.ceil(d.bounds.top+u),d.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&d.text.trim().length&&(h.ctx.strokeStyle=ia(n.webkitTextStrokeColor),h.ctx.lineWidth=n.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(d.text,d.bounds.left,d.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=UE(t),o=PE(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 so(this,void 0,void 0,function(){var n,i,a,o,s,A,y,y,l,u,c,h,C,f,d,O,g,m,v,y,w,C,O;return Ha(this,function(F){switch(F.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,i=t.curves,a=n.styles,o=0,s=n.textNodes,F.label=1;case 1:return o<s.length?(A=s[o],[4,this.renderTextNode(A,a)]):[3,4];case 2:F.sent(),F.label=3;case 3:return o++,[3,1];case 4:if(!(n instanceof Z7))return[3,8];F.label=5;case 5:return F.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return y=F.sent(),this.renderReplacedElement(n,i,y),[3,8];case 7:return F.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof J7&&this.renderReplacedElement(n,i,n.canvas),!(n instanceof t$))return[3,12];F.label=9;case 9:return F.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return y=F.sent(),this.renderReplacedElement(n,i,y),[3,12];case 11:return F.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof i$&&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=F.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),F.label=14;case 14:if(n instanceof KR&&(c=Math.min(n.bounds.width,n.bounds.height),n.type===OE?n.checked&&(this.ctx.save(),this.path([new ge(n.bounds.left+c*.39363,n.bounds.top+c*.79),new ge(n.bounds.left+c*.16,n.bounds.top+c*.5549),new ge(n.bounds.left+c*.27347,n.bounds.top+c*.44071),new ge(n.bounds.left+c*.39694,n.bounds.top+c*.5649),new ge(n.bounds.left+c*.72983,n.bounds.top+c*.23),new ge(n.bounds.left+c*.84,n.bounds.top+c*.34085),new ge(n.bounds.left+c*.39363,n.bounds.top+c*.79)]),this.ctx.fillStyle=ia(g2),this.ctx.fill(),this.ctx.restore()):n.type===FE&&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=ia(g2),this.ctx.fill(),this.ctx.restore())),$Et(n)&&n.value.length){switch(h=this.createFontStyle(a),C=h[0],f=h[1],d=this.fontMetrics.getMetrics(C,f).baseline,this.ctx.font=C,this.ctx.fillStyle=ia(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=jEt(n.styles.textAlign),O=UE(n),g=0,n.styles.textAlign){case 1:g+=O.width/2;break;case 2:g+=O.width;break}m=O.add(g,0,0,-O.height/2+1),this.ctx.save(),this.path([new ge(O.left,O.top),new ge(O.left+O.width,O.top),new ge(O.left+O.width,O.top+O.height),new ge(O.left,O.top+O.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new dy(n.value,m),a.letterSpacing,d),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!ji(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(v=n.styles.listStyleImage,v.type!==0)return[3,18];y=void 0,w=v.url,F.label=15;case 15:return F.trys.push([15,17,,18]),[4,this.context.cache.match(w)];case 16:return y=F.sent(),this.ctx.drawImage(y,n.bounds.left-(y.width+10),n.bounds.top),[3,18];case 17:return F.sent(),this.context.logger.error("Error loading list-style-image "+w),[3,18];case 18:return[3,20];case 19:t.listValue&&n.styles.listStyleType!==-1&&(C=this.createFontStyle(a)[0],this.ctx.font=C,this.ctx.fillStyle=ia(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",O=new Bu(n.bounds.left,n.bounds.top+Ln(n.styles.paddingTop,n.bounds.width),n.bounds.width,JU(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new dy(t.listValue,O),a.letterSpacing,JU(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),F.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(t){return so(this,void 0,void 0,function(){var n,i,v,a,o,v,s,A,v,l,u,v,c,h,v,f,d,v,g,m,v;return Ha(this,function(y){switch(y.label){case 0:if(ji(t.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(t.element)];case 1:y.sent(),n=0,i=t.negativeZIndex,y.label=2;case 2:return n<i.length?(v=i[n],[4,this.renderStack(v)]):[3,5];case 3:y.sent(),y.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(t.element)];case 6:y.sent(),a=0,o=t.nonInlineLevel,y.label=7;case 7:return a<o.length?(v=o[a],[4,this.renderNode(v)]):[3,10];case 8:y.sent(),y.label=9;case 9:return a++,[3,7];case 10:s=0,A=t.nonPositionedFloats,y.label=11;case 11:return s<A.length?(v=A[s],[4,this.renderStack(v)]):[3,14];case 12:y.sent(),y.label=13;case 13:return s++,[3,11];case 14:l=0,u=t.nonPositionedInlineLevel,y.label=15;case 15:return l<u.length?(v=u[l],[4,this.renderStack(v)]):[3,18];case 16:y.sent(),y.label=17;case 17:return l++,[3,15];case 18:c=0,h=t.inlineLevel,y.label=19;case 19:return c<h.length?(v=h[c],[4,this.renderNode(v)]):[3,22];case 20:y.sent(),y.label=21;case 21:return c++,[3,19];case 22:f=0,d=t.zeroOrAutoZIndexOrTransformedOrOpacity,y.label=23;case 23:return f<d.length?(v=d[f],[4,this.renderStack(v)]):[3,26];case 24:y.sent(),y.label=25;case 25:return f++,[3,23];case 26:g=0,m=t.positiveZIndex,y.label=27;case 27:return g<m.length?(v=m[g],[4,this.renderStack(v)]):[3,30];case 28:y.sent(),y.label=29;case 29:return g++,[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=Ns(i)?i.start:i;a===0?n.ctx.moveTo(o.x,o.y):n.ctx.lineTo(o.x,o.y),Ns(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 so(this,void 0,void 0,function(){var n,i,a,o,s,A;return Ha(this,function(l){switch(l.label){case 0:n=t.styles.backgroundImage.length-1,i=function(u){var c,h,f,N,q,rt,P,U,T,d,N,q,rt,P,U,g,m,v,y,w,C,O,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct,Tt,M,W,Y,H;return Ha(this,function(J){switch(J.label){case 0:if(u.type!==0)return[3,5];c=void 0,h=u.url,J.label=1;case 1:return J.trys.push([1,3,,4]),[4,a.context.cache.match(h)];case 2:return c=J.sent(),[3,4];case 3:return J.sent(),a.context.logger.error("Error loading background-image "+h),[3,4];case 4:return c&&(f=DT(t,n,[c.width,c.height,c.width/c.height]),N=f[0],q=f[1],rt=f[2],P=f[3],U=f[4],T=a.ctx.createPattern(a.resizeImage(c,P,U),"repeat"),a.renderRepeat(N,T,q,rt)),[3,6];case 5:x_t(u)?(d=DT(t,n,[null,null,null]),N=d[0],q=d[1],rt=d[2],P=d[3],U=d[4],g=C_t(u.angle,P,U),m=g[0],v=g[1],y=g[2],w=g[3],C=g[4],O=document.createElement("canvas"),O.width=P,O.height=U,F=O.getContext("2d"),I=F.createLinearGradient(v,w,y,C),qU(u.stops,m).forEach(function(ot){return I.addColorStop(ot.stop,ia(ot.color))}),F.fillStyle=I,F.fillRect(0,0,P,U),P>0&&U>0&&(T=a.ctx.createPattern(O,"repeat"),a.renderRepeat(N,T,q,rt))):I_t(u)&&(L=DT(t,n,[null,null,null]),N=L[0],x=L[1],S=L[2],P=L[3],U=L[4],tt=u.position.length===0?[GR]:u.position,q=Ln(tt[0],P),rt=Ln(tt[tt.length-1],U),nt=B_t(u,q,rt,P,U),At=nt[0],ct=nt[1],At>0&&ct>0&&(Tt=a.ctx.createRadialGradient(x+q,S+rt,0,x+q,S+rt,At),qU(u.stops,At*2).forEach(function(ot){return Tt.addColorStop(ot.stop,ia(ot.color))}),a.path(N),a.ctx.fillStyle=Tt,At!==ct?(M=t.bounds.left+.5*t.bounds.width,W=t.bounds.top+.5*t.bounds.height,Y=ct/At,H=1/Y,a.ctx.save(),a.ctx.translate(M,W),a.ctx.transform(1,0,0,Y,0,0),a.ctx.translate(-M,-W),a.ctx.fillRect(x,H*(S-W)+W,P,U*H),a.ctx.restore()):a.ctx.fill())),J.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 so(this,void 0,void 0,function(){return Ha(this,function(a){return this.path(x2(i,n)),this.ctx.fillStyle=ia(t),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(t,n,i,a){return so(this,void 0,void 0,function(){var o,s;return Ha(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=FEt(a,i),this.path(o),this.ctx.fillStyle=ia(t),this.ctx.fill(),s=REt(a,i),this.path(s),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(t){return so(this,void 0,void 0,function(){var n,i,a,o,s,A,l,u,c=this;return Ha(this,function(h){switch(h.label){case 0:return this.applyEffects(t.getEffects(2)),n=t.container.styles,i=!Zc(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=VEt($p(n.backgroundClip,0),t.curves),i||n.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),Zc(n.backgroundColor)||(this.ctx.fillStyle=ia(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 d=NE(t.curves),g=f.inset?0:HEt,m=LEt(d,-g+(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(d),c.ctx.clip(),c.mask(m)):(c.mask(d),c.ctx.clip(),c.path(m)),c.ctx.shadowOffsetX=f.offsetX.number+g,c.ctx.shadowOffsetY=f.offsetY.number,c.ctx.shadowColor=ia(f.color),c.ctx.shadowBlur=f.blur.number,c.ctx.fillStyle=f.inset?ia(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&&!Zc(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 so(this,void 0,void 0,function(){var s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,F,O,F;return Ha(this,function(I){return this.ctx.save(),s=MEt(a,i),A=x2(a,i),o===2&&(this.path(A),this.ctx.clip()),Ns(A[0])?(l=A[0].start.x,u=A[0].start.y):(l=A[0].x,u=A[0].y),Ns(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)),d=n<3?n*3:n*2,g=n<3?n*2:n,o===3&&(d=n,g=n),m=!0,f<=d*2?m=!1:f<=d*2+g?(v=f/(2*d+g),d*=v,g*=v):(y=Math.floor((f+g)/(d+g)),w=(f-y*d)/(y-1),C=(f-(y+1)*d)/y,g=C<=0||Math.abs(g-w)<Math.abs(g-C)?w:C),m&&(o===3?this.ctx.setLineDash([0,d+g]):this.ctx.setLineDash([d,g])),o===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=ia(t),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(Ns(A[0])&&(O=A[3],F=A[0],this.ctx.beginPath(),this.formatPath([new ge(O.end.x,O.end.y),new ge(F.start.x,F.start.y)]),this.ctx.stroke()),Ns(A[1])&&(O=A[1],F=A[2],this.ctx.beginPath(),this.formatPath([new ge(O.end.x,O.end.y),new ge(F.start.x,F.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(t){return so(this,void 0,void 0,function(){var n;return Ha(this,function(i){switch(i.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ia(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=OEt(t),[4,this.renderStack(n)];case 1:return i.sent(),this.applyEffects([]),[2,this.canvas]}})})},e}(_$),$Et=function(r){return r instanceof n$||r instanceof r$?!0:r instanceof KR&&r.type!==FE&&r.type!==OE},VEt=function(r,e){switch(r){case 0:return NE(e);case 2:return bEt(e);case 1:default:return PE(e)}},jEt=function(r){switch(r){case 1:return"center";case 2:return"right";case 0:default:return"left"}},KEt=["-apple-system","system-ui"],WEt=function(r){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?r.filter(function(e){return KEt.indexOf(e)===-1}):r},zEt=function(r){xA(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 so(this,void 0,void 0,function(){var n,i;return Ha(this,function(a){switch(a.label){case 0:return n=bL(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,t),[4,YEt(n)];case 1:return i=a.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ia(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}(_$),YEt=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))})},XEt=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,f1([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,f1([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,f1([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,f1([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},r.instances={},r}(),qEt=function(){function r(e,t){var n;this.windowBounds=t,this.instanceName="#"+r.instanceCount++,this.logger=new XEt({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new vEt(this,e)}return r.instanceCount=1,r}(),ZEt=function(r,e){return e===void 0&&(e={}),JEt(r,e)};typeof window<"u"&&d$.setContext(window);var JEt=function(r,e){return so(void 0,void 0,void 0,function(){var t,n,i,a,o,s,A,l,u,c,h,f,d,g,m,v,y,w,C,O,I,F,I,T,L,N,x,S,P,U,tt,q,rt,nt,At,ct,Tt,M,W,Y;return Ha(this,function(H){switch(H.label){case 0:if(!r||typeof r!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(t=r.ownerDocument,!t)throw new Error("Element is not attached to a Document");if(n=t.defaultView,!n)throw new Error("Document is not attached to a Window");return i={allowTaint:(T=e.allowTaint)!==null&&T!==void 0?T:!1,imageTimeout:(L=e.imageTimeout)!==null&&L!==void 0?L:15e3,proxy:e.proxy,useCORS:(N=e.useCORS)!==null&&N!==void 0?N:!1},a=uL({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:(P=e.windowHeight)!==null&&P!==void 0?P:n.innerHeight,scrollX:(U=e.scrollX)!==null&&U!==void 0?U:n.pageXOffset,scrollY:(tt=e.scrollY)!==null&&tt!==void 0?tt:n.pageYOffset},s=new Bu(o.scrollX,o.scrollY,o.windowWidth,o.windowHeight),A=new qEt(a,s),l=(q=e.foreignObjectRendering)!==null&&q!==void 0?q:!1,u={allowTaint:(rt=e.allowTaint)!==null&&rt!==void 0?rt:!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 b2(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=H.sent(),d=WR(h)||tEt(h)?Lyt(h.ownerDocument):lB(A,h),g=d.width,m=d.height,v=d.left,y=d.top,w=tCt(A,h,e.backgroundColor),C={canvas:e.canvas,backgroundColor:w,scale:(At=(nt=e.scale)!==null&&nt!==void 0?nt:n.devicePixelRatio)!==null&&At!==void 0?At:1,x:((ct=e.x)!==null&&ct!==void 0?ct:0)+v,y:((Tt=e.y)!==null&&Tt!==void 0?Tt:0)+y,width:(M=e.width)!==null&&M!==void 0?M:Math.ceil(g),height:(W=e.height)!==null&&W!==void 0?W:Math.ceil(m)},l?(A.logger.debug("Document cloned, using foreign object rendering"),I=new zEt(A,C),[4,I.render(h)]):[3,3];case 2:return O=H.sent(),[3,5];case 3:return A.logger.debug("Document cloned, element located at "+v+","+y+" with size "+g+"x"+m+" using computed rendering"),A.logger.debug("Starting DOM parsing"),F=o$(A,h),w===F.styles.backgroundColor&&(F.styles.backgroundColor=vu.TRANSPARENT),A.logger.debug("Starting renderer for element at "+C.x+","+C.y+" with size "+C.width+"x"+C.height),I=new GEt(A,C),[4,I.render(F)];case 4:O=H.sent(),H.label=5;case 5:return(!((Y=e.removeContainer)!==null&&Y!==void 0)||Y)&&(b2.destroy(f)||A.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),A.logger.debug("Finished rendering"),[2,O]}})})},tCt=function(r,e,t){var n=e.ownerDocument,i=n.documentElement?hy(r,getComputedStyle(n.documentElement).backgroundColor):vu.TRANSPARENT,a=n.body?hy(r,getComputedStyle(n.body).backgroundColor):vu.TRANSPARENT,o=typeof t=="string"?hy(r,t):t===null?vu.TRANSPARENT:4294967295;return e===n.documentElement?Zc(i)?Zc(a)?o:a:i:o},eCt=Object.freeze(Object.defineProperty({__proto__:null,default:ZEt},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 rCt(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 nCt=Object.hasOwnProperty,L2=Object.setPrototypeOf,iCt=Object.isFrozen,aCt=Object.getPrototypeOf,oCt=Object.getOwnPropertyDescriptor,Co=Object.freeze,bu=Object.seal,sCt=Object.create,w$=typeof Reflect<"u"&&Reflect,DE=w$.apply,FL=w$.construct;DE||(DE=function(e,t,n){return e.apply(t,n)});Co||(Co=function(e){return e});bu||(bu=function(e){return e});FL||(FL=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(rCt(t))))});var ACt=_A(Array.prototype.forEach),O2=_A(Array.prototype.pop),pm=_A(Array.prototype.push),_w=_A(String.prototype.toLowerCase),F2=_A(String.prototype.match),yc=_A(String.prototype.replace),lCt=_A(String.prototype.indexOf),uCt=_A(String.prototype.trim),ss=_A(RegExp.prototype.test),QT=cCt(TypeError);function _A(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 DE(r,e,n)}}function cCt(r){return function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return FL(r,t)}}function Sr(r,e){L2&&L2(r,null);for(var t=e.length;t--;){var n=e[t];if(typeof n=="string"){var i=_w(n);i!==n&&(iCt(e)||(e[t]=i),n=i)}r[n]=!0}return r}function lf(r){var e=sCt(null),t=void 0;for(t in r)DE(nCt,r,[t])&&(e[t]=r[t]);return e}function P1(r,e){for(;r!==null;){var t=oCt(r,e);if(t){if(t.get)return _A(t.get);if(typeof t.value=="function")return _A(t.value)}r=aCt(r)}function n(i){return console.warn("fallback value for",i),null}return n}var R2=Co(["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"]),kT=Co(["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"]),HT=Co(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hCt=Co(["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"]),GT=Co(["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"]),fCt=Co(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),M2=Co(["#text"]),N2=Co(["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"]),$T=Co(["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"]),P2=Co(["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"]),U1=Co(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),dCt=bu(/\{\{[\s\S]*|[\s\S]*\}\}/gm),pCt=bu(/<%[\s\S]*|[\s\S]*%>/gm),gCt=bu(/^data-[\-\w.\u00B7-\uFFFF]/),vCt=bu(/^aria-[\-\w]+$/),mCt=bu(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yCt=bu(/^(?:\w+script|data):/i),_Ct=bu(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Vm=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 WA(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 wCt=function(){return typeof window>"u"?null:window},ECt=function(e,t){if((typeof e>"u"?"undefined":Vm(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 E$(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:wCt(),e=function(_t){return E$(_t)};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,d=s.prototype,g=P1(d,"cloneNode"),m=P1(d,"nextSibling"),v=P1(d,"childNodes"),y=P1(d,"parentNode");if(typeof a=="function"){var w=n.createElement("template");w.content&&w.content.ownerDocument&&(n=w.content.ownerDocument)}var C=ECt(f,t),O=C?C.createHTML(""):"",F=n,I=F.implementation,T=F.createNodeIterator,L=F.createDocumentFragment,N=F.getElementsByTagName,x=t.importNode,S={};try{S=lf(n).documentMode?n.documentMode:{}}catch{}var P={};e.isSupported=typeof y=="function"&&I&&typeof I.createHTMLDocument<"u"&&S!==9;var U=dCt,tt=pCt,q=gCt,rt=vCt,nt=yCt,At=_Ct,ct=mCt,Tt=null,M=Sr({},[].concat(WA(R2),WA(kT),WA(HT),WA(GT),WA(M2))),W=null,Y=Sr({},[].concat(WA(N2),WA($T),WA(P2),WA(U1))),H=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}})),J=null,ot=null,ut=!0,X=!0,It=!1,at=!1,j=!1,Z=!1,ft=!1,it=!1,V=!1,Ft=!1,Mt=!0,Et=!0,Bt=!1,Ct={},Rt=null,Nt=Sr({},["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"]),Dt=null,Wt=Sr({},["audio","video","img","source","image","track"]),te=null,Ae=Sr({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),oe="http://www.w3.org/1998/Math/MathML",Jt="http://www.w3.org/2000/svg",fe="http://www.w3.org/1999/xhtml",qt=fe,nr=!1,ke=void 0,wr=["application/xhtml+xml","text/html"],Ne="text/html",Pe=void 0,Hr=null,se=n.createElement("form"),hi=function(_t){return _t instanceof RegExp||_t instanceof Function},gr=function(_t){Hr&&Hr===_t||((!_t||(typeof _t>"u"?"undefined":Vm(_t))!=="object")&&(_t={}),_t=lf(_t),Tt="ALLOWED_TAGS"in _t?Sr({},_t.ALLOWED_TAGS):M,W="ALLOWED_ATTR"in _t?Sr({},_t.ALLOWED_ATTR):Y,te="ADD_URI_SAFE_ATTR"in _t?Sr(lf(Ae),_t.ADD_URI_SAFE_ATTR):Ae,Dt="ADD_DATA_URI_TAGS"in _t?Sr(lf(Wt),_t.ADD_DATA_URI_TAGS):Wt,Rt="FORBID_CONTENTS"in _t?Sr({},_t.FORBID_CONTENTS):Nt,J="FORBID_TAGS"in _t?Sr({},_t.FORBID_TAGS):{},ot="FORBID_ATTR"in _t?Sr({},_t.FORBID_ATTR):{},Ct="USE_PROFILES"in _t?_t.USE_PROFILES:!1,ut=_t.ALLOW_ARIA_ATTR!==!1,X=_t.ALLOW_DATA_ATTR!==!1,It=_t.ALLOW_UNKNOWN_PROTOCOLS||!1,at=_t.SAFE_FOR_TEMPLATES||!1,j=_t.WHOLE_DOCUMENT||!1,it=_t.RETURN_DOM||!1,V=_t.RETURN_DOM_FRAGMENT||!1,Ft=_t.RETURN_TRUSTED_TYPE||!1,ft=_t.FORCE_BODY||!1,Mt=_t.SANITIZE_DOM!==!1,Et=_t.KEEP_CONTENT!==!1,Bt=_t.IN_PLACE||!1,ct=_t.ALLOWED_URI_REGEXP||ct,qt=_t.NAMESPACE||fe,_t.CUSTOM_ELEMENT_HANDLING&&hi(_t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=_t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),_t.CUSTOM_ELEMENT_HANDLING&&hi(_t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=_t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),_t.CUSTOM_ELEMENT_HANDLING&&typeof _t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=_t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ke=wr.indexOf(_t.PARSER_MEDIA_TYPE)===-1?ke=Ne:ke=_t.PARSER_MEDIA_TYPE,Pe=ke==="application/xhtml+xml"?function($t){return $t}:_w,at&&(X=!1),V&&(it=!0),Ct&&(Tt=Sr({},[].concat(WA(M2))),W=[],Ct.html===!0&&(Sr(Tt,R2),Sr(W,N2)),Ct.svg===!0&&(Sr(Tt,kT),Sr(W,$T),Sr(W,U1)),Ct.svgFilters===!0&&(Sr(Tt,HT),Sr(W,$T),Sr(W,U1)),Ct.mathMl===!0&&(Sr(Tt,GT),Sr(W,P2),Sr(W,U1))),_t.ADD_TAGS&&(Tt===M&&(Tt=lf(Tt)),Sr(Tt,_t.ADD_TAGS)),_t.ADD_ATTR&&(W===Y&&(W=lf(W)),Sr(W,_t.ADD_ATTR)),_t.ADD_URI_SAFE_ATTR&&Sr(te,_t.ADD_URI_SAFE_ATTR),_t.FORBID_CONTENTS&&(Rt===Nt&&(Rt=lf(Rt)),Sr(Rt,_t.FORBID_CONTENTS)),Et&&(Tt["#text"]=!0),j&&Sr(Tt,["html","head","body"]),Tt.table&&(Sr(Tt,["tbody"]),delete J.tbody),Co&&Co(_t),Hr=_t)},ei=Sr({},["mi","mo","mn","ms","mtext"]),Wr=Sr({},["foreignobject","desc","title","annotation-xml"]),zr=Sr({},kT);Sr(zr,HT),Sr(zr,hCt);var He=Sr({},GT);Sr(He,fCt);var Ir=function(_t){var $t=y(_t);(!$t||!$t.tagName)&&($t={namespaceURI:fe,tagName:"template"});var ne=_w(_t.tagName),Ze=_w($t.tagName);if(_t.namespaceURI===Jt)return $t.namespaceURI===fe?ne==="svg":$t.namespaceURI===oe?ne==="svg"&&(Ze==="annotation-xml"||ei[Ze]):Boolean(zr[ne]);if(_t.namespaceURI===oe)return $t.namespaceURI===fe?ne==="math":$t.namespaceURI===Jt?ne==="math"&&Wr[Ze]:Boolean(He[ne]);if(_t.namespaceURI===fe){if($t.namespaceURI===Jt&&!Wr[Ze]||$t.namespaceURI===oe&&!ei[Ze])return!1;var Lr=Sr({},["title","style","font","a","script"]);return!He[ne]&&(Lr[ne]||!zr[ne])}return!1},Gn=function(_t){pm(e.removed,{element:_t});try{_t.parentNode.removeChild(_t)}catch{try{_t.outerHTML=O}catch{_t.remove()}}},yn=function(_t,$t){try{pm(e.removed,{attribute:$t.getAttributeNode(_t),from:$t})}catch{pm(e.removed,{attribute:null,from:$t})}if($t.removeAttribute(_t),_t==="is"&&!W[_t])if(it||V)try{Gn($t)}catch{}else try{$t.setAttribute(_t,"")}catch{}},fi=function(_t){var $t=void 0,ne=void 0;if(ft)_t="<remove></remove>"+_t;else{var Ze=F2(_t,/^[\r\n\t ]+/);ne=Ze&&Ze[0]}ke==="application/xhtml+xml"&&(_t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_t+"</body></html>");var Lr=C?C.createHTML(_t):_t;if(qt===fe)try{$t=new h().parseFromString(Lr,ke)}catch{}if(!$t||!$t.documentElement){$t=I.createDocument(qt,"template",null);try{$t.documentElement.innerHTML=nr?"":Lr}catch{}}var hn=$t.body||$t.documentElement;return _t&&ne&&hn.insertBefore(n.createTextNode(ne),hn.childNodes[0]||null),qt===fe?N.call($t,j?"html":"body")[0]:j?$t.documentElement:hn},di=function(_t){return T.call(_t.ownerDocument||_t,_t,A.SHOW_ELEMENT|A.SHOW_COMMENT|A.SHOW_TEXT,null,!1)},Ue=function(_t){return _t instanceof c&&(typeof _t.nodeName!="string"||typeof _t.textContent!="string"||typeof _t.removeChild!="function"||!(_t.attributes instanceof u)||typeof _t.removeAttribute!="function"||typeof _t.setAttribute!="function"||typeof _t.namespaceURI!="string"||typeof _t.insertBefore!="function")},ri=function(_t){return(typeof o>"u"?"undefined":Vm(o))==="object"?_t instanceof o:_t&&(typeof _t>"u"?"undefined":Vm(_t))==="object"&&typeof _t.nodeType=="number"&&typeof _t.nodeName=="string"},Cn=function(_t,$t,ne){P[_t]&&ACt(P[_t],function(Ze){Ze.call(e,$t,ne,Hr)})},pi=function(_t){var $t=void 0;if(Cn("beforeSanitizeElements",_t,null),Ue(_t)||F2(_t.nodeName,/[\u0080-\uFFFF]/))return Gn(_t),!0;var ne=Pe(_t.nodeName);if(Cn("uponSanitizeElement",_t,{tagName:ne,allowedTags:Tt}),!ri(_t.firstElementChild)&&(!ri(_t.content)||!ri(_t.content.firstElementChild))&&ss(/<[/\w]/g,_t.innerHTML)&&ss(/<[/\w]/g,_t.textContent)||ne==="select"&&ss(/<template/i,_t.innerHTML))return Gn(_t),!0;if(!Tt[ne]||J[ne]){if(Et&&!Rt[ne]){var Ze=y(_t)||_t.parentNode,Lr=v(_t)||_t.childNodes;if(Lr&&Ze)for(var hn=Lr.length,fn=hn-1;fn>=0;--fn)Ze.insertBefore(g(Lr[fn],!0),m(_t))}return!J[ne]&&Br(ne)&&(H.tagNameCheck instanceof RegExp&&ss(H.tagNameCheck,ne)||H.tagNameCheck instanceof Function&&H.tagNameCheck(ne))?!1:(Gn(_t),!0)}return _t instanceof s&&!Ir(_t)||(ne==="noscript"||ne==="noembed")&&ss(/<\/no(script|embed)/i,_t.innerHTML)?(Gn(_t),!0):(at&&_t.nodeType===3&&($t=_t.textContent,$t=yc($t,U," "),$t=yc($t,tt," "),_t.textContent!==$t&&(pm(e.removed,{element:_t.cloneNode()}),_t.textContent=$t)),Cn("afterSanitizeElements",_t,null),!1)},cn=function(_t,$t,ne){if(Mt&&($t==="id"||$t==="name")&&(ne in n||ne in se))return!1;if(!(X&&!ot[$t]&&ss(q,$t))){if(!(ut&&ss(rt,$t))){if(!W[$t]||ot[$t]){if(!(Br(_t)&&(H.tagNameCheck instanceof RegExp&&ss(H.tagNameCheck,_t)||H.tagNameCheck instanceof Function&&H.tagNameCheck(_t))&&(H.attributeNameCheck instanceof RegExp&&ss(H.attributeNameCheck,$t)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck($t))||$t==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&ss(H.tagNameCheck,ne)||H.tagNameCheck instanceof Function&&H.tagNameCheck(ne))))return!1}else if(!te[$t]){if(!ss(ct,yc(ne,At,""))){if(!(($t==="src"||$t==="xlink:href"||$t==="href")&&_t!=="script"&&lCt(ne,"data:")===0&&Dt[_t])){if(!(It&&!ss(nt,yc(ne,At,"")))){if(ne)return!1}}}}}}return!0},Br=function(_t){return _t.indexOf("-")>0},_n=function(_t){var $t=void 0,ne=void 0,Ze=void 0,Lr=void 0;Cn("beforeSanitizeAttributes",_t,null);var hn=_t.attributes;if(hn){var fn={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W};for(Lr=hn.length;Lr--;){$t=hn[Lr];var zo=$t,gi=zo.name,Ks=zo.namespaceURI;if(ne=uCt($t.value),Ze=Pe(gi),fn.attrName=Ze,fn.attrValue=ne,fn.keepAttr=!0,fn.forceKeepAttr=void 0,Cn("uponSanitizeAttribute",_t,fn),ne=fn.attrValue,!fn.forceKeepAttr&&(yn(gi,_t),!!fn.keepAttr)){if(ss(/\/>/i,ne)){yn(gi,_t);continue}at&&(ne=yc(ne,U," "),ne=yc(ne,tt," "));var IA=Pe(_t.nodeName);if(cn(IA,Ze,ne))try{Ks?_t.setAttributeNS(Ks,gi,ne):_t.setAttribute(gi,ne),O2(e.removed)}catch{}}}Cn("afterSanitizeAttributes",_t,null)}},eo=function de(_t){var $t=void 0,ne=di(_t);for(Cn("beforeSanitizeShadowDOM",_t,null);$t=ne.nextNode();)Cn("uponSanitizeShadowNode",$t,null),!pi($t)&&($t.content instanceof i&&de($t.content),_n($t));Cn("afterSanitizeShadowDOM",_t,null)};return e.sanitize=function(de,_t){var $t=void 0,ne=void 0,Ze=void 0,Lr=void 0,hn=void 0;if(nr=!de,nr&&(de="<!-->"),typeof de!="string"&&!ri(de)){if(typeof de.toString!="function")throw QT("toString is not a function");if(de=de.toString(),typeof de!="string")throw QT("dirty is not a string, aborting")}if(!e.isSupported){if(Vm(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof de=="string")return r.toStaticHTML(de);if(ri(de))return r.toStaticHTML(de.outerHTML)}return de}if(Z||gr(_t),e.removed=[],typeof de=="string"&&(Bt=!1),Bt){if(de.nodeName){var fn=Pe(de.nodeName);if(!Tt[fn]||J[fn])throw QT("root node is forbidden and cannot be sanitized in-place")}}else if(de instanceof o)$t=fi("<!---->"),ne=$t.ownerDocument.importNode(de,!0),ne.nodeType===1&&ne.nodeName==="BODY"||ne.nodeName==="HTML"?$t=ne:$t.appendChild(ne);else{if(!it&&!at&&!j&&de.indexOf("<")===-1)return C&&Ft?C.createHTML(de):de;if($t=fi(de),!$t)return it?null:Ft?O:""}$t&&ft&&Gn($t.firstChild);for(var zo=di(Bt?de:$t);Ze=zo.nextNode();)Ze.nodeType===3&&Ze===Lr||pi(Ze)||(Ze.content instanceof i&&eo(Ze.content),_n(Ze),Lr=Ze);if(Lr=null,Bt)return de;if(it){if(V)for(hn=L.call($t.ownerDocument);$t.firstChild;)hn.appendChild($t.firstChild);else hn=$t;return W.shadowroot&&(hn=x.call(t,hn,!0)),hn}var gi=j?$t.outerHTML:$t.innerHTML;return at&&(gi=yc(gi,U," "),gi=yc(gi,tt," ")),C&&Ft?C.createHTML(gi):gi},e.setConfig=function(de){gr(de),Z=!0},e.clearConfig=function(){Hr=null,Z=!1},e.isValidAttribute=function(de,_t,$t){Hr||gr({});var ne=Pe(de),Ze=Pe(_t);return cn(ne,Ze,$t)},e.addHook=function(de,_t){typeof _t=="function"&&(P[de]=P[de]||[],pm(P[de],_t))},e.removeHook=function(de){P[de]&&O2(P[de])},e.removeHooks=function(de){P[de]&&(P[de]=[])},e.removeAllHooks=function(){P={}},e}var CCt=E$(),BCt=Object.freeze(Object.defineProperty({__proto__:null,default:CCt},Symbol.toStringTag,{value:"Module"})),D1=function(r){return r&&r.Math==Math&&r},hr=D1(typeof globalThis=="object"&&globalThis)||D1(typeof window=="object"&&window)||D1(typeof self=="object"&&self)||D1(typeof rl=="object"&&rl)||function(){return this}()||Function("return this")(),dv={},ki=function(r){try{return!!r()}catch{return!0}},bCt=ki,Du=!bCt(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),TCt=ki,yB=!TCt(function(){var r=function(){}.bind();return typeof r!="function"||r.hasOwnProperty("prototype")}),SCt=yB,Q1=Function.prototype.call,Cs=SCt?Q1.bind(Q1):function(){return Q1.apply(Q1,arguments)},C$={},B$={}.propertyIsEnumerable,b$=Object.getOwnPropertyDescriptor,xCt=b$&&!B$.call({1:2},1);C$.f=xCt?function(e){var t=b$(this,e);return!!t&&t.enumerable}:B$;var _B=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}},T$=yB,S$=Function.prototype,ICt=S$.bind,RL=S$.call,LCt=T$&&ICt.bind(RL,RL),Rn=T$?function(r){return r&&LCt(r)}:function(r){return r&&function(){return RL.apply(r,arguments)}},x$=Rn,OCt=x$({}.toString),FCt=x$("".slice),pv=function(r){return FCt(OCt(r),8,-1)},RCt=hr,MCt=Rn,NCt=ki,PCt=pv,VT=RCt.Object,UCt=MCt("".split),I$=NCt(function(){return!VT("z").propertyIsEnumerable(0)})?function(r){return PCt(r)=="String"?UCt(r,""):VT(r)}:VT,DCt=hr,QCt=DCt.TypeError,Tl=function(r){if(r==null)throw QCt("Can't call method on "+r);return r},kCt=I$,HCt=Tl,G0=function(r){return kCt(HCt(r))},Ji=function(r){return typeof r=="function"},GCt=Ji,Sh=function(r){return typeof r=="object"?r!==null:GCt(r)},jT=hr,$Ct=Ji,VCt=function(r){return $Ct(r)?r:void 0},Nd=function(r,e){return arguments.length<2?VCt(jT[r]):jT[r]&&jT[r][e]},jCt=Rn,wB=jCt({}.isPrototypeOf),KCt=Nd,EB=KCt("navigator","userAgent")||"",L$=hr,KT=EB,U2=L$.process,D2=L$.Deno,Q2=U2&&U2.versions||D2&&D2.version,k2=Q2&&Q2.v8,uA,QE;k2&&(uA=k2.split("."),QE=uA[0]>0&&uA[0]<4?1:+(uA[0]+uA[1]));!QE&&KT&&(uA=KT.match(/Edge\/(\d+)/),(!uA||uA[1]>=74)&&(uA=KT.match(/Chrome\/(\d+)/),uA&&(QE=+uA[1])));var zR=QE,H2=zR,WCt=ki,O$=!!Object.getOwnPropertySymbols&&!WCt(function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&H2&&H2<41}),zCt=O$,F$=zCt&&!Symbol.sham&&typeof Symbol.iterator=="symbol",YCt=hr,XCt=Nd,qCt=Ji,ZCt=wB,JCt=F$,tBt=YCt.Object,R$=JCt?function(r){return typeof r=="symbol"}:function(r){var e=XCt("Symbol");return qCt(e)&&ZCt(e.prototype,tBt(r))},eBt=hr,rBt=eBt.String,CB=function(r){try{return rBt(r)}catch{return"Object"}},nBt=hr,iBt=Ji,aBt=CB,oBt=nBt.TypeError,gv=function(r){if(iBt(r))return r;throw oBt(aBt(r)+" is not a function")},sBt=gv,vv=function(r,e){var t=r[e];return t==null?void 0:sBt(t)},ABt=hr,WT=Cs,zT=Ji,YT=Sh,lBt=ABt.TypeError,uBt=function(r,e){var t,n;if(e==="string"&&zT(t=r.toString)&&!YT(n=WT(t,r))||zT(t=r.valueOf)&&!YT(n=WT(t,r))||e!=="string"&&zT(t=r.toString)&&!YT(n=WT(t,r)))return n;throw lBt("Can't convert object to primitive value")},BB={exports:{}},G2=hr,cBt=Object.defineProperty,YR=function(r,e){try{cBt(G2,r,{value:e,configurable:!0,writable:!0})}catch{G2[r]=e}return e},hBt=hr,fBt=YR,$2="__core-js_shared__",dBt=hBt[$2]||fBt($2,{}),XR=dBt,V2=XR;(BB.exports=function(r,e){return V2[r]||(V2[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 pBt=hr,gBt=Tl,vBt=pBt.Object,bB=function(r){return vBt(gBt(r))},mBt=Rn,yBt=bB,_Bt=mBt({}.hasOwnProperty),Sl=Object.hasOwn||function(e,t){return _Bt(yBt(e),t)},wBt=Rn,EBt=0,CBt=Math.random(),BBt=wBt(1 .toString),M$=function(r){return"Symbol("+(r===void 0?"":r)+")_"+BBt(++EBt+CBt,36)},bBt=hr,TBt=BB.exports,j2=Sl,SBt=M$,K2=O$,N$=F$,xp=TBt("wks"),Kf=bBt.Symbol,W2=Kf&&Kf.for,xBt=N$?Kf:Kf&&Kf.withoutSetter||SBt,ca=function(r){if(!j2(xp,r)||!(K2||typeof xp[r]=="string")){var e="Symbol."+r;K2&&j2(Kf,r)?xp[r]=Kf[r]:N$&&W2?xp[r]=W2(e):xp[r]=xBt(e)}return xp[r]},IBt=hr,LBt=Cs,z2=Sh,Y2=R$,OBt=vv,FBt=uBt,RBt=ca,MBt=IBt.TypeError,NBt=RBt("toPrimitive"),PBt=function(r,e){if(!z2(r)||Y2(r))return r;var t=OBt(r,NBt),n;if(t){if(e===void 0&&(e="default"),n=LBt(t,r,e),!z2(n)||Y2(n))return n;throw MBt("Can't convert object to primitive value")}return e===void 0&&(e="number"),FBt(r,e)},UBt=PBt,DBt=R$,qR=function(r){var e=UBt(r,"string");return DBt(e)?e:e+""},QBt=hr,X2=Sh,ML=QBt.document,kBt=X2(ML)&&X2(ML.createElement),TB=function(r){return kBt?ML.createElement(r):{}},HBt=Du,GBt=ki,$Bt=TB,P$=!HBt&&!GBt(function(){return Object.defineProperty($Bt("div"),"a",{get:function(){return 7}}).a!=7}),VBt=Du,jBt=Cs,KBt=C$,WBt=_B,zBt=G0,YBt=qR,XBt=Sl,qBt=P$,q2=Object.getOwnPropertyDescriptor;dv.f=VBt?q2:function(e,t){if(e=zBt(e),t=YBt(t),qBt)try{return q2(e,t)}catch{}if(XBt(e,t))return WBt(!jBt(KBt.f,e,t),e[t])};var Qu={},ZBt=Du,JBt=ki,U$=ZBt&&JBt(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!=42}),D$=hr,tbt=Sh,ebt=D$.String,rbt=D$.TypeError,to=function(r){if(tbt(r))return r;throw rbt(ebt(r)+" is not an object")},nbt=hr,ibt=Du,abt=P$,obt=U$,k1=to,Z2=qR,sbt=nbt.TypeError,XT=Object.defineProperty,Abt=Object.getOwnPropertyDescriptor,qT="enumerable",ZT="configurable",JT="writable";Qu.f=ibt?obt?function(e,t,n){if(k1(e),t=Z2(t),k1(n),typeof e=="function"&&t==="prototype"&&"value"in n&&JT in n&&!n[JT]){var i=Abt(e,t);i&&i[JT]&&(e[t]=n.value,n={configurable:ZT in n?n[ZT]:i[ZT],enumerable:qT in n?n[qT]:i[qT],writable:!1})}return XT(e,t,n)}:XT:function(e,t,n){if(k1(e),t=Z2(t),k1(n),abt)try{return XT(e,t,n)}catch{}if("get"in n||"set"in n)throw sbt("Accessors not supported");return"value"in n&&(e[t]=n.value),e};var lbt=Du,ubt=Qu,cbt=_B,mv=lbt?function(r,e,t){return ubt.f(r,e,cbt(1,t))}:function(r,e,t){return r[e]=t,r},xh={exports:{}},hbt=Rn,fbt=Ji,NL=XR,dbt=hbt(Function.toString);fbt(NL.inspectSource)||(NL.inspectSource=function(r){return dbt(r)});var SB=NL.inspectSource,pbt=hr,gbt=Ji,vbt=SB,J2=pbt.WeakMap,mbt=gbt(J2)&&/native code/.test(vbt(J2)),ybt=BB.exports,_bt=M$,tD=ybt("keys"),ZR=function(r){return tD[r]||(tD[r]=_bt(r))},JR={},wbt=mbt,Q$=hr,tS=Rn,Ebt=Sh,Cbt=mv,eS=Sl,rS=XR,Bbt=ZR,bbt=JR,eD="Object already initialized",PL=Q$.TypeError,Tbt=Q$.WeakMap,kE,t0,HE,Sbt=function(r){return HE(r)?t0(r):kE(r,{})},xbt=function(r){return function(e){var t;if(!Ebt(e)||(t=t0(e)).type!==r)throw PL("Incompatible receiver, "+r+" required");return t}};if(wbt||rS.state){var uf=rS.state||(rS.state=new Tbt),Ibt=tS(uf.get),rD=tS(uf.has),Lbt=tS(uf.set);kE=function(r,e){if(rD(uf,r))throw new PL(eD);return e.facade=r,Lbt(uf,r,e),e},t0=function(r){return Ibt(uf,r)||{}},HE=function(r){return rD(uf,r)}}else{var Ip=Bbt("state");bbt[Ip]=!0,kE=function(r,e){if(eS(r,Ip))throw new PL(eD);return e.facade=r,Cbt(r,Ip,e),e},t0=function(r){return eS(r,Ip)?r[Ip]:{}},HE=function(r){return eS(r,Ip)}}var xB={set:kE,get:t0,has:HE,enforce:Sbt,getterFor:xbt},UL=Du,Obt=Sl,k$=Function.prototype,Fbt=UL&&Object.getOwnPropertyDescriptor,tM=Obt(k$,"name"),Rbt=tM&&function(){}.name==="something",Mbt=tM&&(!UL||UL&&Fbt(k$,"name").configurable),IB={EXISTS:tM,PROPER:Rbt,CONFIGURABLE:Mbt},Nbt=hr,nD=Ji,Pbt=Sl,iD=mv,Ubt=YR,Dbt=SB,H$=xB,Qbt=IB.CONFIGURABLE,kbt=H$.get,Hbt=H$.enforce,Gbt=String(String).split("String");(xh.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(nD(t)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!Pbt(t,"name")||Qbt&&t.name!==s)&&iD(t,"name",s),A=Hbt(t),A.source||(A.source=Gbt.join(typeof s=="string"?s:""))),r===Nbt){a?r[e]=t:Ubt(e,t);return}else i?!o&&r[e]&&(a=!0):delete r[e];a?r[e]=t:iD(r,e,t)})(Function.prototype,"toString",function(){return nD(this)&&kbt(this).source||Dbt(this)});var G$={},$bt=Math.ceil,Vbt=Math.floor,LB=function(r){var e=+r;return e!==e||e===0?0:(e>0?Vbt:$bt)(e)},jbt=LB,Kbt=Math.max,Wbt=Math.min,$$=function(r,e){var t=jbt(r);return t<0?Kbt(t+e,0):Wbt(t,e)},zbt=LB,Ybt=Math.min,yv=function(r){return r>0?Ybt(zbt(r),9007199254740991):0},Xbt=yv,OB=function(r){return Xbt(r.length)},qbt=G0,Zbt=$$,Jbt=OB,aD=function(r){return function(e,t,n){var i=qbt(e),a=Jbt(i),o=Zbt(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}},V$={includes:aD(!0),indexOf:aD(!1)},tTt=Rn,nS=Sl,eTt=G0,rTt=V$.indexOf,nTt=JR,oD=tTt([].push),j$=function(r,e){var t=eTt(r),n=0,i=[],a;for(a in t)!nS(nTt,a)&&nS(t,a)&&oD(i,a);for(;e.length>n;)nS(t,a=e[n++])&&(~rTt(i,a)||oD(i,a));return i},eM=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],iTt=j$,aTt=eM,oTt=aTt.concat("length","prototype");G$.f=Object.getOwnPropertyNames||function(e){return iTt(e,oTt)};var K$={};K$.f=Object.getOwnPropertySymbols;var sTt=Nd,ATt=Rn,lTt=G$,uTt=K$,cTt=to,hTt=ATt([].concat),fTt=sTt("Reflect","ownKeys")||function(e){var t=lTt.f(cTt(e)),n=uTt.f;return n?hTt(t,n(e)):t},sD=Sl,dTt=fTt,pTt=dv,gTt=Qu,vTt=function(r,e,t){for(var n=dTt(e),i=gTt.f,a=pTt.f,o=0;o<n.length;o++){var s=n[o];!sD(r,s)&&!(t&&sD(t,s))&&i(r,s,a(e,s))}},mTt=ki,yTt=Ji,_Tt=/#|\.prototype\./,$0=function(r,e){var t=ETt[wTt(r)];return t==BTt?!0:t==CTt?!1:yTt(e)?mTt(e):!!e},wTt=$0.normalize=function(r){return String(r).replace(_Tt,".").toLowerCase()},ETt=$0.data={},CTt=$0.NATIVE="N",BTt=$0.POLYFILL="P",W$=$0,iS=hr,bTt=dv.f,TTt=mv,STt=xh.exports,xTt=YR,ITt=vTt,LTt=W$,xl=function(r,e){var t=r.target,n=r.global,i=r.stat,a,o,s,A,l,u;if(n?o=iS:i?o=iS[t]||xTt(t,{}):o=(iS[t]||{}).prototype,o)for(s in e){if(l=e[s],r.noTargetGet?(u=bTt(o,s),A=u&&u.value):A=o[s],a=LTt(n?s:t+(i?".":"#")+s,r.forced),!a&&A!==void 0){if(typeof l==typeof A)continue;ITt(l,A)}(r.sham||A&&A.sham)&&TTt(l,"sham",!0),STt(o,s,l,r)}},OTt=hr,FTt=OTt.Promise,RTt=xh.exports,MTt=function(r,e,t){for(var n in e)RTt(r,n,e[n],t);return r},z$=hr,NTt=Ji,PTt=z$.String,UTt=z$.TypeError,DTt=function(r){if(typeof r=="object"||NTt(r))return r;throw UTt("Can't set "+PTt(r)+" as a prototype")},QTt=Rn,kTt=to,HTt=DTt,Y$=Object.setPrototypeOf||("__proto__"in{}?function(){var r=!1,e={},t;try{t=QTt(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set),t(e,[]),r=e instanceof Array}catch{}return function(i,a){return kTt(i),HTt(a),r?t(i,a):i.__proto__=a,i}}():void 0),GTt=Qu.f,$Tt=Sl,VTt=ca,AD=VTt("toStringTag"),rM=function(r,e,t){r&&!t&&(r=r.prototype),r&&!$Tt(r,AD)&&GTt(r,AD,{configurable:!0,value:e})},jTt=Nd,KTt=Qu,WTt=ca,zTt=Du,lD=WTt("species"),YTt=function(r){var e=jTt(r),t=KTt.f;zTt&&e&&!e[lD]&&t(e,lD,{configurable:!0,get:function(){return this}})},XTt=hr,qTt=wB,ZTt=XTt.TypeError,JTt=function(r,e){if(qTt(e,r))return r;throw ZTt("Incorrect invocation")},uD=Rn,tSt=gv,eSt=yB,rSt=uD(uD.bind),nM=function(r,e){return tSt(r),e===void 0?r:eSt?rSt(r,e):function(){return r.apply(e,arguments)}},V0={},nSt=ca,iSt=V0,aSt=nSt("iterator"),oSt=Array.prototype,sSt=function(r){return r!==void 0&&(iSt.Array===r||oSt[aSt]===r)},ASt=ca,lSt=ASt("toStringTag"),X$={};X$[lSt]="z";var uSt=String(X$)==="[object z]",cSt=hr,hSt=uSt,fSt=Ji,ww=pv,dSt=ca,pSt=dSt("toStringTag"),gSt=cSt.Object,vSt=ww(function(){return arguments}())=="Arguments",mSt=function(r,e){try{return r[e]}catch{}},iM=hSt?ww:function(r){var e,t,n;return r===void 0?"Undefined":r===null?"Null":typeof(t=mSt(e=gSt(r),pSt))=="string"?t:vSt?ww(e):(n=ww(e))=="Object"&&fSt(e.callee)?"Arguments":n},ySt=iM,cD=vv,_St=V0,wSt=ca,ESt=wSt("iterator"),q$=function(r){if(r!=null)return cD(r,ESt)||cD(r,"@@iterator")||_St[ySt(r)]},CSt=hr,BSt=Cs,bSt=gv,TSt=to,SSt=CB,xSt=q$,ISt=CSt.TypeError,LSt=function(r,e){var t=arguments.length<2?xSt(r):e;if(bSt(t))return TSt(BSt(t,r));throw ISt(SSt(r)+" is not iterable")},OSt=Cs,hD=to,FSt=vv,RSt=function(r,e,t){var n,i;hD(r);try{if(n=FSt(r,"return"),!n){if(e==="throw")throw t;return t}n=OSt(n,r)}catch(a){i=!0,n=a}if(e==="throw")throw t;if(i)throw n;return hD(n),t},MSt=hr,NSt=nM,PSt=Cs,USt=to,DSt=CB,QSt=sSt,kSt=OB,fD=wB,HSt=LSt,GSt=q$,dD=RSt,$St=MSt.TypeError,Ew=function(r,e){this.stopped=r,this.result=e},pD=Ew.prototype,VSt=function(r,e,t){var n=t&&t.that,i=!!(t&&t.AS_ENTRIES),a=!!(t&&t.IS_ITERATOR),o=!!(t&&t.INTERRUPTED),s=NSt(e,n),A,l,u,c,h,f,d,g=function(v){return A&&dD(A,"normal",v),new Ew(!0,v)},m=function(v){return i?(USt(v),o?s(v[0],v[1],g):s(v[0],v[1])):o?s(v,g):s(v)};if(a)A=r;else{if(l=GSt(r),!l)throw $St(DSt(r)+" is not iterable");if(QSt(l)){for(u=0,c=kSt(r);c>u;u++)if(h=m(r[u]),h&&fD(pD,h))return h;return new Ew(!1)}A=HSt(r,l)}for(f=A.next;!(d=PSt(f,A)).done;){try{h=m(d.value)}catch(v){dD(A,"throw",v)}if(typeof h=="object"&&h&&fD(pD,h))return h}return new Ew(!1)},jSt=ca,Z$=jSt("iterator"),J$=!1;try{var KSt=0,gD={next:function(){return{done:!!KSt++}},return:function(){J$=!0}};gD[Z$]=function(){return this},Array.from(gD,function(){throw 2})}catch{}var WSt=function(r,e){if(!e&&!J$)return!1;var t=!1;try{var n={};n[Z$]=function(){return{next:function(){return{done:t=!0}}}},r(n)}catch{}return t},zSt=Rn,YSt=ki,t9=Ji,XSt=iM,qSt=Nd,ZSt=SB,e9=function(){},JSt=[],r9=qSt("Reflect","construct"),aM=/^\s*(?:class|function)\b/,txt=zSt(aM.exec),ext=!aM.exec(e9),gm=function(e){if(!t9(e))return!1;try{return r9(e9,JSt,e),!0}catch{return!1}},n9=function(e){if(!t9(e))return!1;switch(XSt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return ext||!!txt(aM,ZSt(e))}catch{return!0}};n9.sham=!0;var rxt=!r9||YSt(function(){var r;return gm(gm.call)||!gm(Object)||!gm(function(){r=!0})||r})?n9:gm,nxt=hr,ixt=rxt,axt=CB,oxt=nxt.TypeError,sxt=function(r){if(ixt(r))return r;throw oxt(axt(r)+" is not a constructor")},vD=to,Axt=sxt,lxt=ca,uxt=lxt("species"),i9=function(r,e){var t=vD(r).constructor,n;return t===void 0||(n=vD(t)[uxt])==null?e:Axt(n)},cxt=yB,a9=Function.prototype,mD=a9.apply,yD=a9.call,oM=typeof Reflect=="object"&&Reflect.apply||(cxt?yD.bind(mD):function(){return yD.apply(mD,arguments)}),hxt=Nd,o9=hxt("document","documentElement"),fxt=Rn,dxt=fxt([].slice),pxt=EB,s9=/(?:ipad|iphone|ipod).*applewebkit/i.test(pxt),gxt=pv,vxt=hr,FB=gxt(vxt.process)=="process",ps=hr,mxt=oM,yxt=nM,_D=Ji,_xt=Sl,wxt=ki,wD=o9,Ext=dxt,ED=TB,Cxt=s9,Bxt=FB,DL=ps.setImmediate,QL=ps.clearImmediate,bxt=ps.process,aS=ps.Dispatch,Txt=ps.Function,CD=ps.MessageChannel,Sxt=ps.String,oS=0,gy={},BD="onreadystatechange",e0,cf,sS,AS;try{e0=ps.location}catch{}var sM=function(r){if(_xt(gy,r)){var e=gy[r];delete gy[r],e()}},lS=function(r){return function(){sM(r)}},bD=function(r){sM(r.data)},TD=function(r){ps.postMessage(Sxt(r),e0.protocol+"//"+e0.host)};(!DL||!QL)&&(DL=function(e){var t=Ext(arguments,1);return gy[++oS]=function(){mxt(_D(e)?e:Txt(e),void 0,t)},cf(oS),oS},QL=function(e){delete gy[e]},Bxt?cf=function(r){bxt.nextTick(lS(r))}:aS&&aS.now?cf=function(r){aS.now(lS(r))}:CD&&!Cxt?(sS=new CD,AS=sS.port2,sS.port1.onmessage=bD,cf=yxt(AS.postMessage,AS)):ps.addEventListener&&_D(ps.postMessage)&&!ps.importScripts&&e0&&e0.protocol!=="file:"&&!wxt(TD)?(cf=TD,ps.addEventListener("message",bD,!1)):BD in ED("script")?cf=function(r){wD.appendChild(ED("script"))[BD]=function(){wD.removeChild(this),sM(r)}}:cf=function(r){setTimeout(lS(r),0)});var A9={set:DL,clear:QL},xxt=EB,Ixt=hr,Lxt=/ipad|iphone|ipod/i.test(xxt)&&Ixt.Pebble!==void 0,Oxt=EB,Fxt=/web0s(?!.*chrome)/i.test(Oxt),ud=hr,SD=nM,Rxt=dv.f,uS=A9.set,Mxt=s9,Nxt=Lxt,Pxt=Fxt,cS=FB,xD=ud.MutationObserver||ud.WebKitMutationObserver,ID=ud.document,LD=ud.process,H1=ud.Promise,OD=Rxt(ud,"queueMicrotask"),l9=OD&&OD.value,vm,Bf,vy,Vp,hS,fS,G1,FD;l9||(vm=function(){var r,e;for(cS&&(r=LD.domain)&&r.exit();Bf;){e=Bf.fn,Bf=Bf.next;try{e()}catch(t){throw Bf?Vp():vy=void 0,t}}vy=void 0,r&&r.enter()},!Mxt&&!cS&&!Pxt&&xD&&ID?(hS=!0,fS=ID.createTextNode(""),new xD(vm).observe(fS,{characterData:!0}),Vp=function(){fS.data=hS=!hS}):!Nxt&&H1&&H1.resolve?(G1=H1.resolve(void 0),G1.constructor=H1,FD=SD(G1.then,G1),Vp=function(){FD(vm)}):cS?Vp=function(){LD.nextTick(vm)}:(uS=SD(uS,ud),Vp=function(){uS(vm)}));var Uxt=l9||function(r){var e={fn:r,next:void 0};vy&&(vy.next=e),Bf||(Bf=e,Vp()),vy=e},AM={},RD=gv,Dxt=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=RD(e),this.reject=RD(t)};AM.f=function(r){return new Dxt(r)};var Qxt=to,kxt=Sh,Hxt=AM,Gxt=function(r,e){if(Qxt(r),kxt(e)&&e.constructor===r)return e;var t=Hxt.f(r),n=t.resolve;return n(e),t.promise},$xt=hr,Vxt=function(r,e){var t=$xt.console;t&&t.error&&(arguments.length==1?t.error(r):t.error(r,e))},jxt=function(r){try{return{error:!1,value:r()}}catch(e){return{error:!0,value:e}}},u9=function(){this.head=null,this.tail=null};u9.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 Kxt=u9,Wxt=typeof window=="object",RB=xl,Tu=hr,zxt=Nd,Su=Cs,GE=FTt,MD=xh.exports,Yxt=MTt,ND=Y$,Xxt=rM,qxt=YTt,kL=gv,my=Ji,Zxt=Sh,Jxt=JTt,tIt=SB,PD=VSt,eIt=WSt,rIt=i9,c9=A9.set,lM=Uxt,nIt=Gxt,iIt=Vxt,h9=AM,HL=jxt,aIt=Kxt,uM=xB,oIt=W$,sIt=ca,AIt=Wxt,$E=FB,UD=zR,lIt=sIt("species"),Il="Promise",DD=uM.getterFor(Il),uIt=uM.set,cIt=uM.getterFor(Il),mf=GE&&GE.prototype,fA=GE,mm=mf,f9=Tu.TypeError,GL=Tu.document,cM=Tu.process,Gg=h9.f,hIt=Gg,fIt=!!(GL&&GL.createEvent&&Tu.dispatchEvent),d9=my(Tu.PromiseRejectionEvent),p9="unhandledrejection",dIt="rejectionhandled",QD=0,g9=1,pIt=2,hM=1,v9=2,$L=!1,$1,kD,m9,HD,j0=oIt(Il,function(){var r=tIt(fA),e=r!==String(fA);if(!e&&UD===66)return!0;if(UD>=51&&/native code/.test(r))return!1;var t=new fA(function(a){a(1)}),n=function(a){a(function(){},function(){})},i=t.constructor={};return i[lIt]=n,$L=t.then(function(){})instanceof n,$L?!e&&AIt&&!d9:!0}),gIt=j0||!eIt(function(r){fA.all(r).catch(function(){})}),y9=function(r){var e;return Zxt(r)&&my(e=r.then)?e:!1},_9=function(r,e){var t=e.value,n=e.state==g9,i=n?r.ok:r.fail,a=r.resolve,o=r.reject,s=r.domain,A,l,u;try{i?(n||(e.rejection===v9&&mIt(e),e.rejection=hM),i===!0?A=t:(s&&s.enter(),A=i(t),s&&(s.exit(),u=!0)),A===r.promise?o(f9("Promise-chain cycle")):(l=y9(A))?Su(l,A,a,o):a(A)):o(t)}catch(c){s&&!u&&s.exit(),o(c)}},w9=function(r,e){r.notified||(r.notified=!0,lM(function(){for(var t=r.reactions,n;n=t.get();)_9(n,r);r.notified=!1,e&&!r.rejection&&vIt(r)}))},E9=function(r,e,t){var n,i;fIt?(n=GL.createEvent("Event"),n.promise=e,n.reason=t,n.initEvent(r,!1,!0),Tu.dispatchEvent(n)):n={promise:e,reason:t},!d9&&(i=Tu["on"+r])?i(n):r===p9&&iIt("Unhandled promise rejection",t)},vIt=function(r){Su(c9,Tu,function(){var e=r.facade,t=r.value,n=GD(r),i;if(n&&(i=HL(function(){$E?cM.emit("unhandledRejection",t,e):E9(p9,e,t)}),r.rejection=$E||GD(r)?v9:hM,i.error))throw i.value})},GD=function(r){return r.rejection!==hM&&!r.parent},mIt=function(r){Su(c9,Tu,function(){var e=r.facade;$E?cM.emit("rejectionHandled",e):E9(dIt,e,r.value)})},rg=function(r,e,t){return function(n){r(e,n,t)}},_g=function(r,e,t){r.done||(r.done=!0,t&&(r=t),r.value=e,r.state=pIt,w9(r,!0))},VL=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw f9("Promise can't be resolved itself");var n=y9(e);n?lM(function(){var i={done:!1};try{Su(n,e,rg(VL,i,r),rg(_g,i,r))}catch(a){_g(i,a,r)}}):(r.value=e,r.state=g9,w9(r,!1))}catch(i){_g({done:!1},i,r)}}};if(j0&&(fA=function(e){Jxt(this,mm),kL(e),Su($1,this);var t=DD(this);try{e(rg(VL,t),rg(_g,t))}catch(n){_g(t,n)}},mm=fA.prototype,$1=function(e){uIt(this,{type:Il,done:!1,notified:!1,parent:!1,reactions:new aIt,rejection:!1,state:QD,value:void 0})},$1.prototype=Yxt(mm,{then:function(e,t){var n=cIt(this),i=Gg(rIt(this,fA));return n.parent=!0,i.ok=my(e)?e:!0,i.fail=my(t)&&t,i.domain=$E?cM.domain:void 0,n.state==QD?n.reactions.add(i):lM(function(){_9(i,n)}),i.promise},catch:function(r){return this.then(void 0,r)}}),kD=function(){var r=new $1,e=DD(r);this.promise=r,this.resolve=rg(VL,e),this.reject=rg(_g,e)},h9.f=Gg=function(r){return r===fA||r===m9?new kD(r):hIt(r)},my(GE)&&mf!==Object.prototype)){HD=mf.then,$L||(MD(mf,"then",function(e,t){var n=this;return new fA(function(i,a){Su(HD,n,i,a)}).then(e,t)},{unsafe:!0}),MD(mf,"catch",mm.catch,{unsafe:!0}));try{delete mf.constructor}catch{}ND&&ND(mf,mm)}RB({global:!0,wrap:!0,forced:j0},{Promise:fA});Xxt(fA,Il,!1);qxt(Il);m9=zxt(Il);RB({target:Il,stat:!0,forced:j0},{reject:function(e){var t=Gg(this);return Su(t.reject,void 0,e),t.promise}});RB({target:Il,stat:!0,forced:j0},{resolve:function(e){return nIt(this,e)}});RB({target:Il,stat:!0,forced:gIt},{all:function(e){var t=this,n=Gg(t),i=n.resolve,a=n.reject,o=HL(function(){var s=kL(t.resolve),A=[],l=0,u=1;PD(e,function(c){var h=l++,f=!1;u++,Su(s,t,c).then(function(d){f||(f=!0,A[h]=d,--u||i(A))},a)}),--u||i(A)});return o.error&&a(o.value),n.promise},race:function(e){var t=this,n=Gg(t),i=n.reject,a=HL(function(){var o=kL(t.resolve);PD(e,function(s){Su(o,t,s).then(n.resolve,i)})});return a.error&&i(a.value),n.promise}});function $D(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 xu(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var a=r.apply(e,t);function o(A){$D(a,n,i,o,s,"next",A)}function s(A){$D(a,n,i,o,s,"throw",A)}o(void 0)})}}var yIt=hr,_It=iM,wIt=yIt.String,Ll=function(r){if(_It(r)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return wIt(r)},EIt=to,C9=function(){var r=EIt(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},fM=ki,CIt=hr,dM=CIt.RegExp,pM=fM(function(){var r=dM("a","y");return r.lastIndex=2,r.exec("abcd")!=null}),BIt=pM||fM(function(){return!dM("a","y").sticky}),bIt=pM||fM(function(){var r=dM("^r","gy");return r.lastIndex=2,r.exec("str")!=null}),B9={BROKEN_CARET:bIt,MISSED_STICKY:BIt,UNSUPPORTED_Y:pM},b9={},TIt=j$,SIt=eM,xIt=Object.keys||function(e){return TIt(e,SIt)},IIt=Du,LIt=U$,OIt=Qu,FIt=to,RIt=G0,MIt=xIt;b9.f=IIt&&!LIt?Object.defineProperties:function(e,t){FIt(e);for(var n=RIt(t),i=MIt(t),a=i.length,o=0,s;a>o;)OIt.f(e,s=i[o++],n[s]);return e};var NIt=to,PIt=b9,VD=eM,UIt=JR,DIt=o9,QIt=TB,kIt=ZR,jD=">",KD="<",jL="prototype",KL="script",T9=kIt("IE_PROTO"),dS=function(){},S9=function(r){return KD+KL+jD+r+KD+"/"+KL+jD},WD=function(r){r.write(S9("")),r.close();var e=r.parentWindow.Object;return r=null,e},HIt=function(){var r=QIt("iframe"),e="java"+KL+":",t;return r.style.display="none",DIt.appendChild(r),r.src=String(e),t=r.contentWindow.document,t.open(),t.write(S9("document.F=Object")),t.close(),t.F},V1,Cw=function(){try{V1=new ActiveXObject("htmlfile")}catch{}Cw=typeof document<"u"?document.domain&&V1?WD(V1):HIt():WD(V1);for(var r=VD.length;r--;)delete Cw[jL][VD[r]];return Cw()};UIt[T9]=!0;var gM=Object.create||function(e,t){var n;return e!==null?(dS[jL]=NIt(e),n=new dS,dS[jL]=null,n[T9]=e):n=Cw(),t===void 0?n:PIt.f(n,t)},GIt=ki,$It=hr,VIt=$It.RegExp,jIt=GIt(function(){var r=VIt(".","s");return!(r.dotAll&&r.exec(`
`)&&r.flags==="s")}),KIt=ki,WIt=hr,zIt=WIt.RegExp,YIt=KIt(function(){var r=zIt("(?<a>b)","g");return r.exec("b").groups.a!=="b"||"b".replace(r,"$<a>c")!=="bc"}),ng=Cs,MB=Rn,XIt=Ll,qIt=C9,ZIt=B9,JIt=BB.exports,tLt=gM,eLt=xB.get,rLt=jIt,nLt=YIt,iLt=JIt("native-string-replace",String.prototype.replace),VE=RegExp.prototype.exec,WL=VE,aLt=MB("".charAt),oLt=MB("".indexOf),sLt=MB("".replace),pS=MB("".slice),zL=function(){var r=/a/,e=/b*/g;return ng(VE,r,"a"),ng(VE,e,"a"),r.lastIndex!==0||e.lastIndex!==0}(),x9=ZIt.BROKEN_CARET,YL=/()??/.exec("")[1]!==void 0,ALt=zL||YL||x9||rLt||nLt;ALt&&(WL=function(e){var t=this,n=eLt(t),i=XIt(e),a=n.raw,o,s,A,l,u,c,h;if(a)return a.lastIndex=t.lastIndex,o=ng(WL,a,i),t.lastIndex=a.lastIndex,o;var f=n.groups,d=x9&&t.sticky,g=ng(qIt,t),m=t.source,v=0,y=i;if(d&&(g=sLt(g,"y",""),oLt(g,"g")===-1&&(g+="g"),y=pS(i,t.lastIndex),t.lastIndex>0&&(!t.multiline||t.multiline&&aLt(i,t.lastIndex-1)!==`
`)&&(m="(?: "+m+")",y=" "+y,v++),s=new RegExp("^(?:"+m+")",g)),YL&&(s=new RegExp("^"+m+"$(?!\\s)",g)),zL&&(A=t.lastIndex),l=ng(VE,d?s:t,y),d?l?(l.input=pS(l.input,v),l[0]=pS(l[0],v),l.index=t.lastIndex,t.lastIndex+=l[0].length):t.lastIndex=0:zL&&l&&(t.lastIndex=t.global?l.index+l[0].length:A),YL&&l&&l.length>1&&ng(iLt,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=tLt(null),u=0;u<f.length;u++)h=f[u],c[h[0]]=l[h[1]];return l});var NB=WL,lLt=xl,zD=NB;lLt({target:"RegExp",proto:!0,forced:/./.exec!==zD},{exec:zD});var YD=Rn,XD=xh.exports,uLt=NB,qD=ki,I9=ca,cLt=mv,hLt=I9("species"),gS=RegExp.prototype,vM=function(r,e,t,n){var i=I9(r),a=!qD(function(){var l={};return l[i]=function(){return 7},""[r](l)!=7}),o=a&&!qD(function(){var l=!1,u=/a/;return r==="split"&&(u={},u.constructor={},u.constructor[hLt]=function(){return u},u.flags="",u[i]=/./[i]),u.exec=function(){return l=!0,null},u[i](""),!l});if(!a||!o||t){var s=YD(/./[i]),A=e(i,""[r],function(l,u,c,h,f){var d=YD(l),g=u.exec;return g===uLt||g===gS.exec?a&&!f?{done:!0,value:s(u,c,h)}:{done:!0,value:d(c,u,h)}:{done:!1}});XD(String.prototype,r,A[0]),XD(gS,i,A[1])}n&&cLt(gS[i],"sham",!0)},mM=Rn,fLt=LB,dLt=Ll,pLt=Tl,gLt=mM("".charAt),ZD=mM("".charCodeAt),vLt=mM("".slice),JD=function(r){return function(e,t){var n=dLt(pLt(e)),i=fLt(t),a=n.length,o,s;return i<0||i>=a?r?"":void 0:(o=ZD(n,i),o<55296||o>56319||i+1===a||(s=ZD(n,i+1))<56320||s>57343?r?gLt(n,i):o:r?vLt(n,i,i+2):(o-55296<<10)+(s-56320)+65536)}},mLt={codeAt:JD(!1),charAt:JD(!0)},yLt=mLt.charAt,yM=function(r,e,t){return e+(t?yLt(r,e).length:1)},_Lt=hr,tQ=Cs,wLt=to,ELt=Ji,CLt=pv,BLt=NB,bLt=_Lt.TypeError,_M=function(r,e){var t=r.exec;if(ELt(t)){var n=tQ(t,r,e);return n!==null&&wLt(n),n}if(CLt(r)==="RegExp")return tQ(BLt,r,e);throw bLt("RegExp#exec called on incompatible receiver")},TLt=Cs,SLt=vM,xLt=to,ILt=yv,vS=Ll,LLt=Tl,OLt=vv,FLt=yM,eQ=_M;SLt("match",function(r,e,t){return[function(i){var a=LLt(this),o=i==null?void 0:OLt(i,r);return o?TLt(o,i,a):new RegExp(i)[r](vS(a))},function(n){var i=xLt(this),a=vS(n),o=t(e,i,a);if(o.done)return o.value;if(!i.global)return eQ(i,a);var s=i.unicode;i.lastIndex=0;for(var A=[],l=0,u;(u=eQ(i,a))!==null;){var c=vS(u[0]);A[l]=c,c===""&&(i.lastIndex=FLt(a,ILt(i.lastIndex),s)),l++}return l===0?null:A}]});var wM=Rn,RLt=bB,MLt=Math.floor,mS=wM("".charAt),NLt=wM("".replace),yS=wM("".slice),PLt=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,ULt=/\$([$&'`]|\d{1,2})/g,DLt=function(r,e,t,n,i,a){var o=t+r.length,s=n.length,A=ULt;return i!==void 0&&(i=RLt(i),A=PLt),NLt(a,A,function(l,u){var c;switch(mS(u,0)){case"$":return"$";case"&":return r;case"`":return yS(e,0,t);case"'":return yS(e,o);case"<":c=i[yS(u,1,-1)];break;default:var h=+u;if(h===0)return l;if(h>s){var f=MLt(h/10);return f===0?l:f<=s?n[f-1]===void 0?mS(u,1):n[f-1]+mS(u,1):l}c=n[h-1]}return c===void 0?"":c})},QLt=oM,rQ=Cs,PB=Rn,kLt=vM,HLt=ki,GLt=to,$Lt=Ji,VLt=LB,jLt=yv,Lp=Ll,KLt=Tl,WLt=yM,zLt=vv,YLt=DLt,XLt=_M,qLt=ca,XL=qLt("replace"),ZLt=Math.max,JLt=Math.min,tOt=PB([].concat),_S=PB([].push),nQ=PB("".indexOf),iQ=PB("".slice),eOt=function(r){return r===void 0?r:String(r)},rOt=function(){return"a".replace(/./,"$0")==="$0"}(),aQ=function(){return/./[XL]?/./[XL]("a","$0")==="":!1}(),nOt=!HLt(function(){var r=/./;return r.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(r,"$<a>")!=="7"});kLt("replace",function(r,e,t){var n=aQ?"$":"$0";return[function(a,o){var s=KLt(this),A=a==null?void 0:zLt(a,XL);return A?rQ(A,a,s,o):rQ(e,Lp(s),a,o)},function(i,a){var o=GLt(this),s=Lp(i);if(typeof a=="string"&&nQ(a,n)===-1&&nQ(a,"$<")===-1){var A=t(e,o,s,a);if(A.done)return A.value}var l=$Lt(a);l||(a=Lp(a));var u=o.global;if(u){var c=o.unicode;o.lastIndex=0}for(var h=[];;){var f=XLt(o,s);if(f===null||(_S(h,f),!u))break;var d=Lp(f[0]);d===""&&(o.lastIndex=WLt(s,jLt(o.lastIndex),c))}for(var g="",m=0,v=0;v<h.length;v++){f=h[v];for(var y=Lp(f[0]),w=ZLt(JLt(VLt(f.index),s.length),0),C=[],O=1;O<f.length;O++)_S(C,eOt(f[O]));var F=f.groups;if(l){var I=tOt([y],C,w,s);F!==void 0&&_S(I,F);var T=Lp(QLt(a,void 0,I))}else T=YLt(y,s,w,C,F,a);w>=m&&(g+=iQ(s,m,w)+T,m=w+y.length)}return g+iQ(s,m)}]},!nOt||!rOt||aQ);var iOt=Sh,aOt=pv,oOt=ca,sOt=oOt("match"),L9=function(r){var e;return iOt(r)&&((e=r[sOt])!==void 0?!!e:aOt(r)=="RegExp")},AOt=hr,lOt=L9,uOt=AOt.TypeError,EM=function(r){if(lOt(r))throw uOt("The method doesn't accept regular expressions");return r},cOt=ca,hOt=cOt("match"),CM=function(r){var e=/./;try{"/./"[r](e)}catch{try{return e[hOt]=!1,"/./"[r](e)}catch{}}return!1},fOt=xl,O9=Rn,dOt=dv.f,pOt=yv,oQ=Ll,gOt=EM,vOt=Tl,mOt=CM,sQ=O9("".startsWith),yOt=O9("".slice),_Ot=Math.min,F9=mOt("startsWith"),wOt=!F9&&!!function(){var r=dOt(String.prototype,"startsWith");return r&&!r.writable}();fOt({target:"String",proto:!0,forced:!wOt&&!F9},{startsWith:function(e){var t=oQ(vOt(this));gOt(e);var n=pOt(_Ot(arguments.length>1?arguments[1]:void 0,t.length)),i=oQ(e);return sQ?sQ(t,i,n):yOt(t,n,n+i.length)===i}});var EOt=ca,COt=gM,BOt=Qu,qL=EOt("unscopables"),ZL=Array.prototype;ZL[qL]==null&&BOt.f(ZL,qL,{configurable:!0,value:COt(null)});var bOt=function(r){ZL[qL][r]=!0},TOt=ki,SOt=!TOt(function(){function r(){}return r.prototype.constructor=null,Object.getPrototypeOf(new r)!==r.prototype}),xOt=hr,IOt=Sl,LOt=Ji,OOt=bB,FOt=ZR,ROt=SOt,AQ=FOt("IE_PROTO"),JL=xOt.Object,MOt=JL.prototype,R9=ROt?JL.getPrototypeOf:function(r){var e=OOt(r);if(IOt(e,AQ))return e[AQ];var t=e.constructor;return LOt(t)&&e instanceof t?t.prototype:e instanceof JL?MOt:null},NOt=ki,POt=Ji,lQ=R9,UOt=xh.exports,DOt=ca,tO=DOt("iterator"),M9=!1,cd,wS,ES;[].keys&&(ES=[].keys(),"next"in ES?(wS=lQ(lQ(ES)),wS!==Object.prototype&&(cd=wS)):M9=!0);var QOt=cd==null||NOt(function(){var r={};return cd[tO].call(r)!==r});QOt&&(cd={});POt(cd[tO])||UOt(cd,tO,function(){return this});var N9={IteratorPrototype:cd,BUGGY_SAFARI_ITERATORS:M9},kOt=N9.IteratorPrototype,HOt=gM,GOt=_B,$Ot=rM,VOt=V0,jOt=function(){return this},KOt=function(r,e,t,n){var i=e+" Iterator";return r.prototype=HOt(kOt,{next:GOt(+!n,t)}),$Ot(r,i,!1),VOt[i]=jOt,r},WOt=xl,zOt=Cs,P9=IB,YOt=Ji,XOt=KOt,uQ=R9,cQ=Y$,qOt=rM,ZOt=mv,CS=xh.exports,JOt=ca,tFt=V0,U9=N9,eFt=P9.PROPER,rFt=P9.CONFIGURABLE,hQ=U9.IteratorPrototype,j1=U9.BUGGY_SAFARI_ITERATORS,ym=JOt("iterator"),fQ="keys",_m="values",dQ="entries",nFt=function(){return this},iFt=function(r,e,t,n,i,a,o){XOt(t,e,n);var s=function(v){if(v===i&&h)return h;if(!j1&&v in u)return u[v];switch(v){case fQ:return function(){return new t(this,v)};case _m:return function(){return new t(this,v)};case dQ:return function(){return new t(this,v)}}return function(){return new t(this)}},A=e+" Iterator",l=!1,u=r.prototype,c=u[ym]||u["@@iterator"]||i&&u[i],h=!j1&&c||s(i),f=e=="Array"&&u.entries||c,d,g,m;if(f&&(d=uQ(f.call(new r)),d!==Object.prototype&&d.next&&(uQ(d)!==hQ&&(cQ?cQ(d,hQ):YOt(d[ym])||CS(d,ym,nFt)),qOt(d,A,!0))),eFt&&i==_m&&c&&c.name!==_m&&(rFt?ZOt(u,"name",_m):(l=!0,h=function(){return zOt(c,this)})),i)if(g={values:s(_m),keys:a?h:s(fQ),entries:s(dQ)},o)for(m in g)(j1||l||!(m in u))&&CS(u,m,g[m]);else WOt({target:e,proto:!0,forced:j1||l},g);return u[ym]!==h&&CS(u,ym,h,{name:i}),tFt[e]=h,g},aFt=G0,BM=bOt,pQ=V0,D9=xB,oFt=Qu.f,sFt=iFt,AFt=Du,Q9="Array Iterator",lFt=D9.set,uFt=D9.getterFor(Q9),cFt=sFt(Array,"Array",function(r,e){lFt(this,{type:Q9,target:aFt(r),index:0,kind:e})},function(){var r=uFt(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"),gQ=pQ.Arguments=pQ.Array;BM("keys");BM("values");BM("entries");if(AFt&&gQ.name!=="values")try{oFt(gQ,"name",{value:"values"})}catch{}var hFt={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},fFt=TB,BS=fFt("span").classList,vQ=BS&&BS.constructor&&BS.constructor.prototype,dFt=vQ===Object.prototype?void 0:vQ,mQ=hr,k9=hFt,pFt=dFt,jm=cFt,bS=mv,H9=ca,TS=H9("iterator"),yQ=H9("toStringTag"),SS=jm.values,G9=function(r,e){if(r){if(r[TS]!==SS)try{bS(r,TS,SS)}catch{r[TS]=SS}if(r[yQ]||bS(r,yQ,e),k9[e]){for(var t in jm)if(r[t]!==jm[t])try{bS(r,t,jm[t])}catch{r[t]=jm[t]}}}};for(var xS in k9)G9(mQ[xS]&&mQ[xS].prototype,xS);G9(pFt,"DOMTokenList");function bM(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var gFt=hr,vFt=gv,mFt=bB,yFt=I$,_Ft=OB,wFt=gFt.TypeError,_Q=function(r){return function(e,t,n,i){vFt(t);var a=mFt(e),o=yFt(a),s=_Ft(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 wFt("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}},EFt={left:_Q(!1),right:_Q(!0)},CFt=ki,$9=function(r,e){var t=[][r];return!!t&&CFt(function(){t.call(null,e||function(){throw 1},1)})},BFt=xl,bFt=EFt.left,TFt=$9,wQ=zR,SFt=FB,xFt=TFt("reduce"),IFt=!SFt&&wQ>79&&wQ<83;BFt({target:"Array",proto:!0,forced:!xFt||IFt},{reduce:function(e){var t=arguments.length;return bFt(this,e,t,t>1?arguments[1]:void 0)}});var LFt=xl,V9=Rn,OFt=dv.f,FFt=yv,EQ=Ll,RFt=EM,MFt=Tl,NFt=CM,CQ=V9("".endsWith),PFt=V9("".slice),UFt=Math.min,j9=NFt("endsWith"),DFt=!j9&&!!function(){var r=OFt(String.prototype,"endsWith");return r&&!r.writable}();LFt({target:"String",proto:!0,forced:!DFt&&!j9},{endsWith:function(e){var t=EQ(MFt(this));RFt(e);var n=arguments.length>1?arguments[1]:void 0,i=t.length,a=n===void 0?i:UFt(FFt(n),i),o=EQ(e);return CQ?CQ(t,o,a):PFt(t,a-o.length,a)===o}});var QFt=qR,kFt=Qu,HFt=_B,GFt=function(r,e,t){var n=QFt(e);n in r?kFt.f(r,n,HFt(0,t)):r[n]=t},$Ft=hr,BQ=$$,VFt=OB,jFt=GFt,KFt=$Ft.Array,WFt=Math.max,zFt=function(r,e,t){for(var n=VFt(r),i=BQ(e,n),a=BQ(t===void 0?n:t,n),o=KFt(WFt(a-i,0)),s=0;i<a;i++,s++)jFt(o,s,r[i]);return o.length=s,o},YFt=oM,wm=Cs,TM=Rn,XFt=vM,qFt=L9,ZFt=to,bQ=Tl,JFt=i9,tRt=yM,eRt=yv,IS=Ll,rRt=vv,TQ=zFt,SQ=_M,nRt=NB,iRt=B9,aRt=ki,Op=iRt.UNSUPPORTED_Y,xQ=4294967295,oRt=Math.min,K9=[].push,sRt=TM(/./.exec),Fp=TM(K9),Em=TM("".slice),ARt=!aRt(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"});XFt("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=IS(bQ(this)),s=a===void 0?xQ:a>>>0;if(s===0)return[];if(i===void 0)return[o];if(!qFt(i))return wm(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,d;(h=wm(nRt,c,o))&&(f=c.lastIndex,!(f>u&&(Fp(A,Em(o,u,h.index)),h.length>1&&h.index<o.length&&YFt(K9,A,TQ(h,1)),d=h[0].length,u=f,A.length>=s)));)c.lastIndex===h.index&&c.lastIndex++;return u===o.length?(d||!sRt(c,""))&&Fp(A,""):Fp(A,Em(o,u)),A.length>s?TQ(A,0,s):A}:"0".split(void 0,0).length?n=function(i,a){return i===void 0&&a===0?[]:wm(e,this,i,a)}:n=e,[function(a,o){var s=bQ(this),A=a==null?void 0:rRt(a,r);return A?wm(A,a,s,o):wm(n,IS(s),a,o)},function(i,a){var o=ZFt(this),s=IS(i),A=t(n,o,s,a,n!==e);if(A.done)return A.value;var l=JFt(o,RegExp),u=o.unicode,c=(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.unicode?"u":"")+(Op?"g":"y"),h=new l(Op?"^(?:"+o.source+")":o,c),f=a===void 0?xQ:a>>>0;if(f===0)return[];if(s.length===0)return SQ(h,s)===null?[s]:[];for(var d=0,g=0,m=[];g<s.length;){h.lastIndex=Op?0:g;var v=SQ(h,Op?Em(s,g):s),y;if(v===null||(y=oRt(eRt(h.lastIndex+(Op?g:0)),s.length))===d)g=tRt(s,g,u);else{if(Fp(m,Em(s,d,g)),m.length===f)return m;for(var w=1;w<=v.length-1;w++)if(Fp(m,v[w]),m.length===f)return m;g=d=y}}return Fp(m,Em(s,d)),m}]},!ARt,Op);var UB={exports:{}},Km={exports:{}};(function(){var r,e,t,n,i,a;typeof performance<"u"&&performance!==null&&performance.now?Km.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Km.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?(Km.exports=function(){return Date.now()-t},t=Date.now()):(Km.exports=function(){return new Date().getTime()-t},t=new Date().getTime())}).call(rl);var lRt=Km.exports,mu=typeof window>"u"?rl:window,K1=["moz","webkit"],wg="AnimationFrame",$g=mu["request"+wg],r0=mu["cancel"+wg]||mu["cancelRequest"+wg];for(var Cm=0;!$g&&Cm<K1.length;Cm++)$g=mu[K1[Cm]+"Request"+wg],r0=mu[K1[Cm]+"Cancel"+wg]||mu[K1[Cm]+"CancelRequest"+wg];if(!$g||!r0){var LS=0,IQ=0,hf=[],uRt=1e3/60;$g=function(r){if(hf.length===0){var e=lRt(),t=Math.max(0,uRt-(e-LS));LS=t+e,setTimeout(function(){var n=hf.slice(0);hf.length=0;for(var i=0;i<n.length;i++)if(!n[i].cancelled)try{n[i].callback(LS)}catch(a){setTimeout(function(){throw a},0)}},Math.round(t))}return hf.push({handle:++IQ,callback:r,cancelled:!1}),IQ},r0=function(r){for(var e=0;e<hf.length;e++)hf[e].handle===r&&(hf[e].cancelled=!0)}}UB.exports=function(r){return $g.call(mu,r)};UB.exports.cancel=function(){r0.apply(mu,arguments)};UB.exports.polyfill=function(r){r||(r=mu),r.requestAnimationFrame=$g,r.cancelAnimationFrame=r0};var OS=UB.exports,W9=`
\v\f\r    \u2028\u2029\uFEFF`,cRt=Rn,hRt=Tl,fRt=Ll,dRt=W9,LQ=cRt("".replace),jE="["+dRt+"]",pRt=RegExp("^"+jE+jE+"*"),gRt=RegExp(jE+jE+"*$"),FS=function(r){return function(e){var t=fRt(hRt(e));return r&1&&(t=LQ(t,pRt,"")),r&2&&(t=LQ(t,gRt,"")),t}},vRt={start:FS(1),end:FS(2),trim:FS(3)},mRt=IB.PROPER,yRt=ki,OQ=W9,FQ="…",_Rt=function(r){return yRt(function(){return!!OQ[r]()||FQ[r]()!==FQ||mRt&&OQ[r].name!==r})},wRt=xl,ERt=vRt.trim,CRt=_Rt;wRt({target:"String",proto:!0,forced:CRt("trim")},{trim:function(){return ERt(this)}});var eO=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 d=document.createElement("li"),g=new RGBColor(A[l]),m=document.createElement("div");m.style.cssText="margin: 3px; border: 1px solid black; background:"+g.toHex()+"; color:"+g.toHex(),m.appendChild(document.createTextNode("test"));var v=document.createTextNode(" "+A[l]+" -> "+g.toRGB()+" -> "+g.toHex());d.appendChild(m),d.appendChild(v),f.appendChild(d)}catch{}return f}},BRt=xl,bRt=Rn,TRt=EM,SRt=Tl,RQ=Ll,xRt=CM,IRt=bRt("".indexOf);BRt({target:"String",proto:!0,forced:!xRt("includes")},{includes:function(e){return!!~IRt(RQ(SRt(this)),RQ(TRt(e)),arguments.length>1?arguments[1]:void 0)}});var LRt=xl,ORt=Rn,FRt=V$.indexOf,RRt=$9,rO=ORt([].indexOf),MQ=!!rO&&1/rO([1],1,-0)<0,MRt=RRt("indexOf");LRt({target:"Array",proto:!0,forced:MQ||!MRt},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return MQ?rO(this,e,t)||0:FRt(this,e,t)}});var NRt=pv,PRt=Array.isArray||function(e){return NRt(e)=="Array"},URt=xl,DRt=Rn,QRt=PRt,kRt=DRt([].reverse),NQ=[1,2];URt({target:"Array",proto:!0,forced:String(NQ)===String(NQ.reverse())},{reverse:function(){return QRt(this)&&(this.length=this.length),kRt(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 z9=function(r,e){return(z9=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 Y9(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}z9(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function HRt(r){var e="";Array.isArray(r)||(r=[r]);for(var t=0;t<r.length;t++){var n=r[t];if(n.type===zt.CLOSE_PATH)e+="z";else if(n.type===zt.HORIZ_LINE_TO)e+=(n.relative?"h":"H")+n.x;else if(n.type===zt.VERT_LINE_TO)e+=(n.relative?"v":"V")+n.y;else if(n.type===zt.MOVE_TO)e+=(n.relative?"m":"M")+n.x+" "+n.y;else if(n.type===zt.LINE_TO)e+=(n.relative?"l":"L")+n.x+" "+n.y;else if(n.type===zt.CURVE_TO)e+=(n.relative?"c":"C")+n.x1+" "+n.y1+" "+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===zt.SMOOTH_CURVE_TO)e+=(n.relative?"s":"S")+n.x2+" "+n.y2+" "+n.x+" "+n.y;else if(n.type===zt.QUAD_TO)e+=(n.relative?"q":"Q")+n.x1+" "+n.y1+" "+n.x+" "+n.y;else if(n.type===zt.SMOOTH_QUAD_TO)e+=(n.relative?"t":"T")+n.x+" "+n.y;else{if(n.type!==zt.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 nO(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 AA(){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 Ic=Math.PI;function RS(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=nO([(e-a)/2,(t-o)/2],-r.xRot/180*Ic),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,d=-i*A/n*h,g=nO([f,d],r.xRot/180*Ic);r.cX=g[0]+(e+a)/2,r.cY=g[1]+(t+o)/2,r.phi1=Math.atan2((l-d)/i,(A-f)/n),r.phi2=Math.atan2((-l-d)/i,(-A-f)/n),r.sweepFlag===0&&r.phi2>r.phi1&&(r.phi2-=2*Ic),r.sweepFlag===1&&r.phi2<r.phi1&&(r.phi2+=2*Ic),r.phi1*=180/Ic,r.phi2*=180/Ic}function PQ(r,e,t){AA(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 Mi,ql=Math.PI/180;function UQ(r,e,t){return(1-t)*r+t*e}function DQ(r,e,t,n){return r+Math.cos(n/180*Ic)*e+Math.sin(n/180*Ic)*t}function QQ(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 d=Math.sqrt(f);return[-u/2-d,-u/2+d]}(A/s,l/s,i)}function kQ(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&zt.SMOOTH_CURVE_TO&&(c.type=zt.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&zt.CURVE_TO?(s=c.relative?h+c.x2:c.x2,A=c.relative?f+c.y2:c.y2):(s=NaN,A=NaN),c.type&zt.SMOOTH_QUAD_TO&&(c.type=zt.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&zt.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&zt.SMOOTH_QUAD_TO&&(l.type=zt.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&zt.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=zt.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&zt.MOVE_TO))throw new Error("path must start with moveto");var f=s(h,A,l,u,c);return h.type&zt.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&zt.MOVE_TO&&(u=A,c=l),f}}function a(s,A,l,u,c,h){return AA(s,A,l,u,c,h),i(function(f,d,g,m){var v=f.x1,y=f.x2,w=f.relative&&!isNaN(m),C=f.x!==void 0?f.x:w?0:d,O=f.y!==void 0?f.y:w?0:g;function F(M){return M*M}f.type&zt.HORIZ_LINE_TO&&A!==0&&(f.type=zt.LINE_TO,f.y=f.relative?0:g),f.type&zt.VERT_LINE_TO&&l!==0&&(f.type=zt.LINE_TO,f.x=f.relative?0:d),f.x!==void 0&&(f.x=f.x*s+O*l+(w?0:c)),f.y!==void 0&&(f.y=C*A+f.y*u+(w?0:h)),f.x1!==void 0&&(f.x1=f.x1*s+f.y1*l+(w?0:c)),f.y1!==void 0&&(f.y1=v*A+f.y1*u+(w?0:h)),f.x2!==void 0&&(f.x2=f.x2*s+f.y2*l+(w?0:c)),f.y2!==void 0&&(f.y2=y*A+f.y2*u+(w?0:h));var I=s*u-A*l;if(f.xRot!==void 0&&(s!==1||A!==0||l!==0||u!==1))if(I===0)delete f.rX,delete f.rY,delete f.xRot,delete f.lArcFlag,delete f.sweepFlag,f.type=zt.LINE_TO;else{var T=f.xRot*Math.PI/180,L=Math.sin(T),N=Math.cos(T),x=1/F(f.rX),S=1/F(f.rY),P=F(N)*x+F(L)*S,U=2*L*N*(x-S),tt=F(L)*x+F(N)*S,q=P*u*u-U*A*u+tt*A*A,rt=U*(s*u+A*l)-2*(P*l*u+tt*s*A),nt=P*l*l-U*s*l+tt*s*s,At=(Math.atan2(rt,q-nt)+Math.PI)%Math.PI/2,ct=Math.sin(At),Tt=Math.cos(At);f.rX=Math.abs(I)/Math.sqrt(q*F(Tt)+rt*ct*Tt+nt*F(ct)),f.rY=Math.abs(I)/Math.sqrt(q*F(ct)-rt*ct*Tt+nt*F(Tt)),f.xRot=180*At/Math.PI}return f.sweepFlag!==void 0&&0>I&&(f.sweepFlag=+!f.sweepFlag),f})}function o(){return function(s){var A={};for(var l in s)A[l]=s[l];return A}}r.ROUND=function(s){function A(l){return Math.round(l*s)/s}return s===void 0&&(s=1e13),AA(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,d){if(isNaN(f)&&!(u.type&zt.MOVE_TO))throw new Error("path must start with moveto");return A&&u.type&zt.HORIZ_LINE_TO&&(u.type=zt.LINE_TO,u.y=u.relative?0:h),l&&u.type&zt.VERT_LINE_TO&&(u.type=zt.LINE_TO,u.x=u.relative?0:c),s&&u.type&zt.CLOSE_PATH&&(u.type=zt.LINE_TO,u.x=u.relative?f-c:f,u.y=u.relative?d-h:d),u.type&zt.ARC&&(u.rX===0||u.rY===0)&&(u.type=zt.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),AA(s);var A=NaN,l=NaN,u=NaN,c=NaN;return i(function(h,f,d,g,m){var v=Math.abs,y=!1,w=0,C=0;if(h.type&zt.SMOOTH_CURVE_TO&&(w=isNaN(A)?0:f-A,C=isNaN(l)?0:d-l),h.type&(zt.CURVE_TO|zt.SMOOTH_CURVE_TO)?(A=h.relative?f+h.x2:h.x2,l=h.relative?d+h.y2:h.y2):(A=NaN,l=NaN),h.type&zt.SMOOTH_QUAD_TO?(u=isNaN(u)?f:2*f-u,c=isNaN(c)?d:2*d-c):h.type&zt.QUAD_TO?(u=h.relative?f+h.x1:h.x1,c=h.relative?d+h.y1:h.y2):(u=NaN,c=NaN),h.type&zt.LINE_COMMANDS||h.type&zt.ARC&&(h.rX===0||h.rY===0||!h.lArcFlag)||h.type&zt.CURVE_TO||h.type&zt.SMOOTH_CURVE_TO||h.type&zt.QUAD_TO||h.type&zt.SMOOTH_QUAD_TO){var O=h.x===void 0?0:h.relative?h.x:h.x-f,F=h.y===void 0?0:h.relative?h.y:h.y-d;w=isNaN(u)?h.x1===void 0?w:h.relative?h.x:h.x1-f:u-f,C=isNaN(c)?h.y1===void 0?C:h.relative?h.y:h.y1-d:c-d;var I=h.x2===void 0?0:h.relative?h.x:h.x2-f,T=h.y2===void 0?0:h.relative?h.y:h.y2-d;v(O)<=s&&v(F)<=s&&v(w)<=s&&v(C)<=s&&v(I)<=s&&v(T)<=s&&(y=!0)}return h.type&zt.CLOSE_PATH&&v(f-g)<=s&&v(d-m)<=s&&(y=!0),y?[]:h})},r.MATRIX=a,r.ROTATE=function(s,A,l){A===void 0&&(A=0),l===void 0&&(l=0),AA(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),AA(s,A),a(1,0,0,1,s,A)},r.SCALE=function(s,A){return A===void 0&&(A=s),AA(s,A),a(s,0,0,A,0,0)},r.SKEW_X=function(s){return AA(s),a(1,0,Math.atan(s),1,0,0)},r.SKEW_Y=function(s){return AA(s),a(1,Math.atan(s),0,1,0,0)},r.X_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),AA(s),a(-1,0,0,1,s,0)},r.Y_AXIS_SYMMETRY=function(s){return s===void 0&&(s=0),AA(s),a(1,0,0,-1,0,s)},r.A_TO_C=function(){return i(function(s,A,l){return zt.ARC===s.type?function(u,c,h){var f,d,g,m;u.cX||RS(u,c,h);for(var v=Math.min(u.phi1,u.phi2),y=Math.max(u.phi1,u.phi2)-v,w=Math.ceil(y/90),C=new Array(w),O=c,F=h,I=0;I<w;I++){var T=UQ(u.phi1,u.phi2,I/w),L=UQ(u.phi1,u.phi2,(I+1)/w),N=L-T,x=4/3*Math.tan(N*ql/4),S=[Math.cos(T*ql)-x*Math.sin(T*ql),Math.sin(T*ql)+x*Math.cos(T*ql)],P=S[0],U=S[1],tt=[Math.cos(L*ql),Math.sin(L*ql)],q=tt[0],rt=tt[1],nt=[q+x*Math.sin(L*ql),rt-x*Math.cos(L*ql)],At=nt[0],ct=nt[1];C[I]={relative:u.relative,type:zt.CURVE_TO};var Tt=function(M,W){var Y=nO([M*u.rX,W*u.rY],u.xRot),H=Y[0],J=Y[1];return[u.cX+H,u.cY+J]};f=Tt(P,U),C[I].x1=f[0],C[I].y1=f[1],d=Tt(At,ct),C[I].x2=d[0],C[I].y2=d[1],g=Tt(q,rt),C[I].x=g[0],C[I].y=g[1],u.relative&&(C[I].x1-=O,C[I].y1-=F,C[I].x2-=O,C[I].y2-=F,C[I].x-=O,C[I].y-=F),O=(m=[C[I].x,C[I].y])[0],F=m[1]}return C}(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),zt.ARC===s.type&&RS(s,A,l),s})},r.CLONE=o,r.CALCULATE_BOUNDS=function(){var s=function(h){var f={};for(var d in h)f[d]=h[d];return f},A=e(),l=n(),u=t(),c=i(function(h,f,d){var g=u(l(A(s(h))));function m(ct){ct>c.maxX&&(c.maxX=ct),ct<c.minX&&(c.minX=ct)}function v(ct){ct>c.maxY&&(c.maxY=ct),ct<c.minY&&(c.minY=ct)}if(g.type&zt.DRAWING_COMMANDS&&(m(f),v(d)),g.type&zt.HORIZ_LINE_TO&&m(g.x),g.type&zt.VERT_LINE_TO&&v(g.y),g.type&zt.LINE_TO&&(m(g.x),v(g.y)),g.type&zt.CURVE_TO){m(g.x),v(g.y);for(var y=0,w=QQ(f,g.x1,g.x2,g.x);y<w.length;y++)0<(At=w[y])&&1>At&&m(kQ(f,g.x1,g.x2,g.x,At));for(var C=0,O=QQ(d,g.y1,g.y2,g.y);C<O.length;C++)0<(At=O[C])&&1>At&&v(kQ(d,g.y1,g.y2,g.y,At))}if(g.type&zt.ARC){m(g.x),v(g.y),RS(g,f,d);for(var F=g.xRot/180*Math.PI,I=Math.cos(F)*g.rX,T=Math.sin(F)*g.rX,L=-Math.sin(F)*g.rY,N=Math.cos(F)*g.rY,x=g.phi1<g.phi2?[g.phi1,g.phi2]:-180>g.phi2?[g.phi2+360,g.phi1+360]:[g.phi2,g.phi1],S=x[0],P=x[1],U=function(ct){var Tt=ct[0],M=ct[1],W=180*Math.atan2(M,Tt)/Math.PI;return W<S?W+360:W},tt=0,q=PQ(L,-I,0).map(U);tt<q.length;tt++)(At=q[tt])>S&&At<P&&m(DQ(g.cX,I,L,At));for(var rt=0,nt=PQ(N,-T,0).map(U);rt<nt.length;rt++){var At;(At=nt[rt])>S&&At<P&&v(DQ(g.cY,T,N,At))}}return h});return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}})(Mi||(Mi={}));var oA,X9=function(){function r(){}return r.prototype.round=function(e){return this.transform(Mi.ROUND(e))},r.prototype.toAbs=function(){return this.transform(Mi.TO_ABS())},r.prototype.toRel=function(){return this.transform(Mi.TO_REL())},r.prototype.normalizeHVZ=function(e,t,n){return this.transform(Mi.NORMALIZE_HVZ(e,t,n))},r.prototype.normalizeST=function(){return this.transform(Mi.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(Mi.QT_TO_C())},r.prototype.aToC=function(){return this.transform(Mi.A_TO_C())},r.prototype.sanitize=function(e){return this.transform(Mi.SANITIZE(e))},r.prototype.translate=function(e,t){return this.transform(Mi.TRANSLATE(e,t))},r.prototype.scale=function(e,t){return this.transform(Mi.SCALE(e,t))},r.prototype.rotate=function(e,t,n){return this.transform(Mi.ROTATE(e,t,n))},r.prototype.matrix=function(e,t,n,i,a,o){return this.transform(Mi.MATRIX(e,t,n,i,a,o))},r.prototype.skewX=function(e){return this.transform(Mi.SKEW_X(e))},r.prototype.skewY=function(e){return this.transform(Mi.SKEW_Y(e))},r.prototype.xSymmetry=function(e){return this.transform(Mi.X_AXIS_SYMMETRY(e))},r.prototype.ySymmetry=function(e){return this.transform(Mi.Y_AXIS_SYMMETRY(e))},r.prototype.annotateArcs=function(){return this.transform(Mi.ANNOTATE_ARCS())},r}(),GRt=function(r){return r===" "||r===" "||r==="\r"||r===`
`},HQ=function(r){return"0".charCodeAt(0)<=r.charCodeAt(0)&&r.charCodeAt(0)<="9".charCodeAt(0)},$Rt=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 Y9(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!==zt.ARC||this.curArgs.length!==3&&this.curArgs.length!==4||this.curNumber.length!==1||this.curNumber!=="0"&&this.curNumber!=="1"),l=HQ(s)&&(this.curNumber==="0"&&s==="0"||A);if(!HQ(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===zt.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===VRt[this.curCommandType]&&(zt.HORIZ_LINE_TO===this.curCommandType?a({type:zt.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):zt.VERT_LINE_TO===this.curCommandType?a({type:zt.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===zt.MOVE_TO||this.curCommandType===zt.LINE_TO||this.curCommandType===zt.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),zt.MOVE_TO===this.curCommandType&&(this.curCommandType=zt.LINE_TO)):this.curCommandType===zt.CURVE_TO?a({type:zt.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===zt.SMOOTH_CURVE_TO?a({type:zt.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===zt.QUAD_TO?a({type:zt.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===zt.ARC&&a({type:zt.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(!GRt(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=zt.HORIZ_LINE_TO,this.curCommandRelative=s==="h";else if(s==="v"||s==="V")this.curCommandType=zt.VERT_LINE_TO,this.curCommandRelative=s==="v";else if(s==="m"||s==="M")this.curCommandType=zt.MOVE_TO,this.curCommandRelative=s==="m";else if(s==="l"||s==="L")this.curCommandType=zt.LINE_TO,this.curCommandRelative=s==="l";else if(s==="c"||s==="C")this.curCommandType=zt.CURVE_TO,this.curCommandRelative=s==="c";else if(s==="s"||s==="S")this.curCommandType=zt.SMOOTH_CURVE_TO,this.curCommandRelative=s==="s";else if(s==="q"||s==="Q")this.curCommandType=zt.QUAD_TO,this.curCommandRelative=s==="q";else if(s==="t"||s==="T")this.curCommandType=zt.SMOOTH_QUAD_TO,this.curCommandRelative=s==="t";else{if(s!=="a"&&s!=="A")throw new SyntaxError('Unexpected character "'+s+'" at index '+o+".");this.curCommandType=zt.ARC,this.curCommandRelative=s==="a"}else n.push({type:zt.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}(X9),zt=function(r){function e(t){var n=r.call(this)||this;return n.commands=typeof t=="string"?e.parse(t):t,n}return Y9(e,r),e.prototype.encode=function(){return e.encode(this.commands)},e.prototype.getBounds=function(){var t=Mi.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 HRt(t)},e.parse=function(t){var n=new $Rt,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}(X9),VRt=((oA={})[zt.MOVE_TO]=2,oA[zt.LINE_TO]=2,oA[zt.HORIZ_LINE_TO]=1,oA[zt.VERT_LINE_TO]=1,oA[zt.CLOSE_PATH]=0,oA[zt.QUAD_TO]=4,oA[zt.SMOOTH_QUAD_TO]=2,oA[zt.CURVE_TO]=6,oA[zt.SMOOTH_CURVE_TO]=4,oA[zt.ARC]=7,oA),jRt=Rn,KRt=IB.PROPER,WRt=xh.exports,zRt=to,YRt=wB,GQ=Ll,XRt=ki,qRt=C9,SM="toString",iO=RegExp.prototype,q9=iO[SM],ZRt=jRt(qRt),JRt=XRt(function(){return q9.call({source:"a",flags:"b"})!="/a/b"}),tMt=KRt&&q9.name!=SM;(JRt||tMt)&&WRt(RegExp.prototype,SM,function(){var e=zRt(this),t=GQ(e.source),n=e.flags,i=GQ(n===void 0&&YRt(iO,e)&&!("flags"in iO)?ZRt(e):n);return"/"+t+"/"+i},{unsafe:!0});function Bw(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Bw=function(e){return typeof e}:Bw=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bw(r)}function eMt(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}var rMt=[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],nMt=[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 iMt(r,e,t,n,i){if(typeof r=="string"&&(r=document.getElementById(r)),!r||Bw(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 aMt(r,e,t,n,i,a){if(!(isNaN(a)||a<1)){a|=0;var o=iMt(r,e,t,n,i);o=oMt(o,e,t,n,i,a),r.getContext("2d").putImageData(o,e,t)}}function oMt(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 $Q,f=h,d,g=1;g<s;g++)f=f.next=new $Q,g===u&&(d=f);f.next=h;for(var m=null,v=null,y=0,w=0,C=rMt[a],O=nMt[a],F=0;F<i;F++){f=h;for(var I=o[w],T=o[w+1],L=o[w+2],N=o[w+3],x=0;x<u;x++)f.r=I,f.g=T,f.b=L,f.a=N,f=f.next;for(var S=0,P=0,U=0,tt=0,q=u*I,rt=u*T,nt=u*L,At=u*N,ct=c*I,Tt=c*T,M=c*L,W=c*N,Y=1;Y<u;Y++){var H=w+((A<Y?A:Y)<<2),J=o[H],ot=o[H+1],ut=o[H+2],X=o[H+3],It=u-Y;ct+=(f.r=J)*It,Tt+=(f.g=ot)*It,M+=(f.b=ut)*It,W+=(f.a=X)*It,S+=J,P+=ot,U+=ut,tt+=X,f=f.next}m=h,v=d;for(var at=0;at<n;at++){var j=W*C>>O;if(o[w+3]=j,j!==0){var Z=255/j;o[w]=(ct*C>>O)*Z,o[w+1]=(Tt*C>>O)*Z,o[w+2]=(M*C>>O)*Z}else o[w]=o[w+1]=o[w+2]=0;ct-=q,Tt-=rt,M-=nt,W-=At,q-=m.r,rt-=m.g,nt-=m.b,At-=m.a;var ft=at+a+1;ft=y+(ft<A?ft:A)<<2,S+=m.r=o[ft],P+=m.g=o[ft+1],U+=m.b=o[ft+2],tt+=m.a=o[ft+3],ct+=S,Tt+=P,M+=U,W+=tt,m=m.next;var it=v,V=it.r,Ft=it.g,Mt=it.b,Et=it.a;q+=V,rt+=Ft,nt+=Mt,At+=Et,S-=V,P-=Ft,U-=Mt,tt-=Et,v=v.next,w+=4}y+=n}for(var Bt=0;Bt<n;Bt++){w=Bt<<2;var Ct=o[w],Rt=o[w+1],Nt=o[w+2],Dt=o[w+3],Wt=u*Ct,te=u*Rt,Ae=u*Nt,oe=u*Dt,Jt=c*Ct,fe=c*Rt,qt=c*Nt,nr=c*Dt;f=h;for(var ke=0;ke<u;ke++)f.r=Ct,f.g=Rt,f.b=Nt,f.a=Dt,f=f.next;for(var wr=n,Ne=0,Pe=0,Hr=0,se=0,hi=1;hi<=a;hi++){w=wr+Bt<<2;var gr=u-hi;Jt+=(f.r=Ct=o[w])*gr,fe+=(f.g=Rt=o[w+1])*gr,qt+=(f.b=Nt=o[w+2])*gr,nr+=(f.a=Dt=o[w+3])*gr,se+=Ct,Ne+=Rt,Pe+=Nt,Hr+=Dt,f=f.next,hi<l&&(wr+=n)}w=Bt,m=h,v=d;for(var ei=0;ei<i;ei++){var Wr=w<<2;o[Wr+3]=Dt=nr*C>>O,Dt>0?(Dt=255/Dt,o[Wr]=(Jt*C>>O)*Dt,o[Wr+1]=(fe*C>>O)*Dt,o[Wr+2]=(qt*C>>O)*Dt):o[Wr]=o[Wr+1]=o[Wr+2]=0,Jt-=Wt,fe-=te,qt-=Ae,nr-=oe,Wt-=m.r,te-=m.g,Ae-=m.b,oe-=m.a,Wr=Bt+((Wr=ei+u)<l?Wr:l)*n<<2,Jt+=se+=m.r=o[Wr],fe+=Ne+=m.g=o[Wr+1],qt+=Pe+=m.b=o[Wr+2],nr+=Hr+=m.a=o[Wr+3],m=m.next,Wt+=Ct=v.r,te+=Rt=v.g,Ae+=Nt=v.b,oe+=Dt=v.a,se-=Ct,Ne-=Rt,Pe-=Nt,Hr-=Dt,v=v.next,w+=n}}return r}var $Q=function r(){eMt(this,r),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null};function sMt(){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 xu(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 AMt(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 lMt=Object.freeze({__proto__:null,offscreen:sMt,node:AMt});function Pd(r){return r.replace(/(?!\u3000)\s+/gm," ")}function Z9(r){return r.replace(/^[\n \t]+/,"")}function J9(r){return r.replace(/[\n \t]+$/,"")}function Qo(r){var e=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var uMt=/^[A-Z-]+$/;function tV(r){return uMt.test(r)?r.toLowerCase():r}function xM(r){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return e[2]||e[3]||e[4]}function eV(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 cMt=/(\[[^\]]+\])/g,hMt=/(#[^\s+>~.[:]+)/g,fMt=/(\.[^\s+>~.[:]+)/g,dMt=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,pMt=/(:[\w-]+\([^)]*\))/gi,gMt=/(:[^\s+>~.[:]+)/g,vMt=/([^\s+>~.[:]+)/g;function ff(r,e){var t=e.exec(r);return t?[r.replace(e," "),t.length]:[r,0]}function rV(r){var e=[0,0,0],t=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[t,n]=ff(t,cMt),e[1]+=n,[t,n]=ff(t,hMt),e[0]+=n,[t,n]=ff(t,fMt),e[1]+=n,[t,n]=ff(t,dMt),e[2]+=n,[t,n]=ff(t,pMt),e[1]+=n,[t,n]=ff(t,gMt),e[1]+=n,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,n]=ff(t,vMt),e[2]+=n,e.join("")}var Wf=1e-8;function aO(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function KE(r,e){return(r[0]*e[0]+r[1]*e[1])/(aO(r)*aO(e))}function oO(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(KE(r,e))}function sO(r){return r*r*r}function AO(r){return 3*r*r*(1-r)}function lO(r){return 3*r*(1-r)*(1-r)}function uO(r){return(1-r)*(1-r)*(1-r)}function cO(r){return r*r}function hO(r){return 2*r*(1-r)}function fO(r){return(1-r)*(1-r)}class Qe{constructor(e,t,n){this.document=e,this.name=t,this.value=n,this.isNormalizedColor=!1}static empty(e){return new Qe(e,"EMPTY","")}split(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:n}=this;return Pd(this.getString()).trim().split(e).map(i=>new Qe(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=eV(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()?Qe.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 eO(t);o.ok&&(o.alpha=e.getNumber(),t=o.toRGBA())}return new Qe(this.document,this.name,t)}}Qe.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 nV{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 Ai{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]=Qo(e);return new Ai(n,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=t,i=n]=Qo(e);return new Ai(n,i)}static parsePath(e){for(var t=Qo(e),n=t.length,i=[],a=0;a<n;a+=2)i.push(new Ai(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 iV{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 Ai(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 aV=typeof window<"u"?window:null,oV=typeof fetch<"u"?fetch.bind(void 0):null;class K0{constructor(e){var{fetch:t=oV,window:n=aV}=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 nV,this.mouse=new iV(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:d=0,clipY:g=0}=e,m=Pd(i).replace(/^defer\s/,""),[v,y]=m.split(" "),w=v||"xMidYMid",C=y||"meet",O=a/o,F=s/A,I=Math.min(O,F),T=Math.max(O,F),L=o,N=A;C==="meet"&&(L*=I,N*=I),C==="slice"&&(L*=T,N*=T);var x=new Qe(t,"refX",c),S=new Qe(t,"refY",h),P=x.hasValue()&&S.hasValue();if(P&&n.translate(-I*x.getPixels("x"),-I*S.getPixels("y")),f){var U=I*d,tt=I*g;n.beginPath(),n.moveTo(U,tt),n.lineTo(a,tt),n.lineTo(a,s),n.lineTo(U,s),n.closePath(),n.clip()}if(!P){var q=C==="meet"&&I===F,rt=C==="slice"&&T===F,nt=C==="meet"&&I===O,At=C==="slice"&&T===O;w.startsWith("xMid")&&(q||rt)&&n.translate(a/2-L/2,0),w.endsWith("YMid")&&(nt||At)&&n.translate(0,s/2-N/2),w.startsWith("xMax")&&(q||rt)&&n.translate(a-L,0),w.endsWith("YMax")&&(nt||At)&&n.translate(0,s-N)}switch(!0){case w==="none":n.scale(O,F);break;case C==="meet":n.scale(I,I);break;case C==="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,d=1e3/h;if(this.frameDuration=d,this.readyPromise=new Promise(w=>{this.resolveReady=w}),this.isReady()&&this.render(e,a,o,A,l,u,c),!!t){var g=Date.now(),m=g,v=0,y=()=>{g=Date.now(),v=g-m,v>=d&&(m=g-v%d,this.shouldUpdate(i,s)&&(this.render(e,a,o,A,l,u,c),f.runEvents())),this.intervalId=OS(y)};n||f.start(),this.intervalId=OS(y)}}stop(){this.intervalId&&(OS.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 d=e.getStyle("width"),g=e.getStyle("height");!t&&(h||typeof i!="number"&&typeof a!="number")&&(d.hasValue()&&(f.width=d.getPixels("x"),f.style&&(f.style.width="".concat(f.width,"px"))),g.hasValue()&&(f.height=g.getPixels("y"),f.style&&(f.style.height="".concat(f.height,"px"))));var m=f.clientWidth||f.width,v=f.clientHeight||f.height;if(t&&d.hasValue()&&g.hasValue()&&(m=d.getPixels("x"),v=g.getPixels("y")),u.setCurrent(m,v),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 y=Qo(e.getAttribute("viewBox").getString()),w=0,C=0;if(typeof i=="number"){var O=e.getStyle("width");O.hasValue()?w=O.getPixels("x")/i:isNaN(y[2])||(w=y[2]/i)}if(typeof a=="number"){var F=e.getStyle("height");F.hasValue()?C=F.getPixels("y")/a:isNaN(y[3])||(C=y[3]/a)}w||(w=C),C||(C=w),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(a);var I=e.getStyle("transform",!0,!0);I.setValue("".concat(I.getString()," scale(").concat(1/w,", ").concat(1/C,")"))}n||c.clearRect(0,0,m,v),e.render(c),h&&(this.isFirstRender=!1)}}K0.defaultWindow=aV;K0.defaultFetch=oV;var{defaultFetch:mMt}=K0,yMt=typeof DOMParser<"u"?DOMParser:null;class bw{constructor(){var{fetch:e=mMt,DOMParser:t=yMt}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return xu(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 xu(function*(){var n=yield t.fetch(e),i=yield n.text();return t.parseFromString(i)})()}}class sV{constructor(e,t){this.type="translate",this.point=null,this.point=Ai.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 AV{constructor(e,t,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=Qo(t);this.angle=new Qe(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 lV{constructor(e,t,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=Ai.parseScale(t);(i.x===0||i.y===0)&&(i.x=Wf,i.y=Wf),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 IM{constructor(e,t,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Qo(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,d=1/(a*(l*f-u*h)-o*(A*f-u*c)+s*(A*h-l*c)),g=t.getPixels("x"),m=n.getPixels("y");e.translate(g,m),e.transform(d*(l*f-u*h),d*(u*c-A*f),d*(s*h-o*f),d*(a*f-s*c),d*(o*u-s*l),d*(s*A-a*u)),e.translate(-g,-m)}applyToPoint(e){e.applyTransform(this.matrix)}}class LM extends IM{constructor(e,t,n){super(e,t,n),this.type="skew",this.angle=null,this.angle=new Qe(e,"angle",t)}}class uV extends LM{constructor(e,t,n){super(e,t,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class cV extends LM{constructor(e,t,n){super(e,t,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function _Mt(r){return Pd(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function wMt(r){var[e,t]=r.split("(");return[e.trim(),t.trim().replace(")","")]}class yh{constructor(e,t,n){this.document=e,this.transforms=[];var i=_Mt(t);i.forEach(a=>{if(a!=="none"){var[o,s]=wMt(a),A=yh.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 yh(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)}}yh.transformTypes={translate:sV,rotate:AV,scale:lV,matrix:IM,skewX:uV,skewY:cV};class On{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=tV(s.nodeName);this.attributes[A]=new Qe(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 Qe(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 Qe(this.document,e,"");return this.attributes[e]=i,i}return n||Qe.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return Qe.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 Qe(this.document,e,"");return this.styles[e]=A,A}return i||Qe.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=yh.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 On?e:this.document.createElement(e);t.parent=this,On.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)})}}On.ignoreChildTypes=["title"];class hV extends On{constructor(e,t,n){super(e,t,n)}}function EMt(r){var e=r.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function CMt(r){return typeof process>"u"?r:r.trim().split(",").map(EMt).join(",")}function BMt(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 bMt(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 Ka{constructor(e,t,n,i,a,o){var s=o?typeof o=="string"?Ka.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=Pd(e).trim().split(" "),l={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return A.forEach(u=>{switch(!0){case(!l.fontStyle&&Ka.styles.includes(u)):u!=="inherit"&&(n=u),l.fontStyle=!0;break;case(!l.fontVariant&&Ka.variants.includes(u)):u!=="inherit"&&(i=u),l.fontStyle=!0,l.fontVariant=!0;break;case(!l.fontWeight&&Ka.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 Ka(n,i,a,o,s,t)}toString(){return[BMt(this.fontStyle),this.fontVariant,bMt(this.fontWeight),this.fontSize,CMt(this.fontFamily)].join(" ").trim()}}Ka.styles="normal|italic|oblique|inherit";Ka.variants="normal|small-caps|inherit";Ka.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class Vs{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 lr extends zt{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 Ai(0,0),this.control=new Ai(0,0),this.current=new Ai(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 Ai(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!==zt.CURVE_TO&&e!==zt.SMOOTH_CURVE_TO&&e!==zt.QUAD_TO&&e!==zt.SMOOTH_QUAD_TO)return this.current;var{current:{x:t,y:n},control:{x:i,y:a}}=this,o=new Ai(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 Ih extends On{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 Qe(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 Qe(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=h}var f=this.getStyle("stroke-width");if(f.hasValue()){var d=f.getPixels();e.lineWidth=d||Wf}var g=this.getStyle("stroke-linecap"),m=this.getStyle("stroke-linejoin"),v=this.getStyle("stroke-miterlimit"),y=this.getStyle("stroke-dasharray"),w=this.getStyle("stroke-dashoffset");if(g.hasValue()&&(e.lineCap=g.getString()),m.hasValue()&&(e.lineJoin=m.getString()),v.hasValue()&&(e.miterLimit=v.getNumber()),y.hasValue()&&y.getString()!=="none"){var C=Qo(y.getString());typeof e.setLineDash<"u"?e.setLineDash(C):typeof e.webkitLineDash<"u"?e.webkitLineDash=C:typeof e.mozDash<"u"&&!(C.length===1&&C[0]===0)&&(e.mozDash=C);var O=w.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=O:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=O:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=O)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var F=this.getStyle("font"),I=this.getStyle("font-style"),T=this.getStyle("font-variant"),L=this.getStyle("font-weight"),N=this.getStyle("font-size"),x=this.getStyle("font-family"),S=new Ka(I.getString(),T.getString(),L.getString(),N.hasValue()?"".concat(N.getPixels(!0),"px"):"",x.getString(),Ka.parse(F.getString(),e.font));I.setValue(S.fontStyle),T.setValue(S.fontVariant),L.setValue(S.fontWeight),N.setValue(S.fontSize),x.setValue(S.fontFamily),e.font=S.toString(),N.isPixels()&&(this.document.emSize=N.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class un extends Ih{constructor(e,t,n){super(e,t,n),this.type="path",this.pathParser=null,this.pathParser=new lr(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,n=new Vs;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case lr.MOVE_TO:this.pathM(e,n);break;case lr.LINE_TO:this.pathL(e,n);break;case lr.HORIZ_LINE_TO:this.pathH(e,n);break;case lr.VERT_LINE_TO:this.pathV(e,n);break;case lr.CURVE_TO:this.pathC(e,n);break;case lr.SMOOTH_CURVE_TO:this.pathS(e,n);break;case lr.QUAD_TO:this.pathQ(e,n);break;case lr.SMOOTH_QUAD_TO:this.pathT(e,n);break;case lr.ARC:this.pathA(e,n);break;case lr.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,d]=n[h];c.render(e,f,d)}if(s.isUrlDefinition()){var g=s.getDefinition(),[m,v]=n[i];g.render(e,m,v)}}}static pathM(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}pathM(e,t){var{pathParser:n}=this,{point:i}=un.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}=un.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 Ai((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}=un.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 Ai(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}=un.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}=un.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}=un.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}=un.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}=un.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 Ai(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 d=new Ai(f*i*c.y/a,f*-a*c.x/i),g=new Ai((t.x+u.x)/2+Math.cos(l)*d.x-Math.sin(l)*d.y,(t.y+u.y)/2+Math.sin(l)*d.x+Math.cos(l)*d.y),m=oO([1,0],[(c.x-d.x)/i,(c.y-d.y)/a]),v=[(c.x-d.x)/i,(c.y-d.y)/a],y=[(-c.x-d.x)/i,(-c.y-d.y)/a],w=oO(v,y);return KE(v,y)<=-1&&(w=Math.PI),KE(v,y)>=1&&(w=0),{currentPoint:u,rX:i,rY:a,sweepFlag:A,xAxisRotation:l,centp:g,a1:m,ad:w}}pathA(e,t){var{pathParser:n}=this,{currentPoint:i,rX:a,rY:o,sweepFlag:s,xAxisRotation:A,centp:l,a1:u,ad:c}=un.pathA(n),h=1-s?1:-1,f=u+h*(c/2),d=new Ai(l.x+a*Math.cos(f),l.y+o*Math.sin(f));if(n.addMarkerAngle(d,f-h*Math.PI/2),n.addMarkerAngle(i,f-h*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(u)&&!isNaN(c)){var g=a>o?a:o,m=a>o?1:a/o,v=a>o?o/a:1;e.translate(l.x,l.y),e.rotate(A),e.scale(m,v),e.arc(0,0,g,u,u+c,Boolean(1-s)),e.scale(1/m,1/v),e.rotate(-A),e.translate(-l.x,-l.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){un.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class OM extends un{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 Lh extends Ih{constructor(e,t,n){super(e,t,new.target===Lh?!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=Ka.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(n);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new Vs(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 OM?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=Pd(t.textContent||"");return i===0&&(o=Z9(o)),i===a&&(o=J9(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=Ka.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=Qo(n.getAttribute("dx").getString()),f=c.length,d=0;d<f;d++){var g=this.getGlyph(a,c,d);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),g.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*(g.horizAdvX||a.horizAdvX)/o,typeof h[d]<"u"&&!isNaN(h[d])&&(this.x+=h[d])}return}var{x:v,y}=this;e.fillStyle&&e.fillText(i,v,y),e.strokeStyle&&e.strokeText(i,v,y)}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=Qo(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 W0 extends Lh{constructor(e,t,n){super(e,t,new.target===W0?!0:n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}getText(){return this.text}}class TMt extends W0{constructor(){super(...arguments),this.type="textNode"}}let _v=class extends Ih{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 Qe(n,"fontSize",Ka.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()?Qo(h.getString()):null,d=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",g=0,m=0,v=0,y=0;f&&(g=f[0],m=f[1]),this.root||(A=this.getStyle("width").getPixels("x"),l=this.getStyle("height").getPixels("y"),this.type==="marker"&&(v=g,y=m,g=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:g,minY:m,refX:u.getValue(),refY:c.getValue(),clip:d,clipX:v,clipY:y}),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 FM extends un{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 Vs(t,n,t+i,n+a)}getMarkers(){return null}}class fV extends un{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 Vs(t-i,n-i,t+i,n+i)}getMarkers(){return null}}class dV extends un{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 Vs(a-n,o-i,a+n,o+i)}getMarkers(){return null}}class pV extends un{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Ai(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Ai(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 Vs(t,n,i,a)}getMarkers(){var[e,t]=this.getPoints(),n=e.angleTo(t);return[[e,n],[t,n]]}}class RM extends un{constructor(e,t,n){super(e,t,n),this.type="polyline",this.points=[],this.points=Ai.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:n,y:i}]=t,a=new Vs(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 gV extends RM{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 vV extends On{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 _v(this.document,null);o.attributes.viewBox=new Qe(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new Qe(this.document,"width","".concat(i,"px")),o.attributes.height=new Qe(this.document,"height","".concat(a,"px")),o.attributes.transform=new Qe(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 Qe(this.document,"x",c*s.width),o.attributes.y=new Qe(this.document,"y",h*s.height),o.render(A),A.restore();var f=e.createPattern(s,"repeat");return f}}class mV extends On{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 _v(this.document,null);A.type=this.type,A.attributes.viewBox=new Qe(this.document,"viewBox",this.getAttribute("viewBox").getValue()),A.attributes.refX=new Qe(this.document,"refX",this.getAttribute("refX").getValue()),A.attributes.refY=new Qe(this.document,"refY",this.getAttribute("refY").getValue()),A.attributes.width=new Qe(this.document,"width",this.getAttribute("markerWidth").getValue()),A.attributes.height=new Qe(this.document,"height",this.getAttribute("markerHeight").getValue()),A.attributes.overflow=new Qe(this.document,"overflow",this.getAttribute("overflow").getValue()),A.attributes.fill=new Qe(this.document,"fill",this.getAttribute("fill").getColor("black")),A.attributes.stroke=new Qe(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 yV extends On{constructor(){super(...arguments),this.type="defs"}render(){}}class DB extends Ih{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new Vs;return this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),t}}class MM extends On{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 FM(s,null);c.attributes.x=new Qe(s,"x",-A/3),c.attributes.y=new Qe(s,"y",-A/3),c.attributes.width=new Qe(s,"width",A),c.attributes.height=new Qe(s,"height",A);var h=new DB(s,null);h.attributes.transform=new Qe(s,"transform",this.getAttribute("gradientTransform").getValue()),h.children=[c];var f=new _v(s,null);f.attributes.x=new Qe(s,"x",0),f.attributes.y=new Qe(s,"y",0),f.attributes.width=new Qe(s,"width",u.width),f.attributes.height=new Qe(s,"height",u.height),f.children=[h];var d=s.createCanvas(u.width,u.height),g=d.getContext("2d");return g.fillStyle=o,f.render(g),g.createPattern(d,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())})}addParentOpacity(e,t){if(e.hasValue()){var n=new Qe(this.document,"color",t);return n.addOpacity(e).getColor()}return t}}class _V extends MM{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 wV extends MM{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 EV extends On{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 QB extends On{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 Qe(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 Qe(e,"from",parseFloat(t.getValue()[a])),n.to=new Qe(e,"to",parseFloat(t.getValue()[o])),n.progress=(i-a)/(o-a)}else n.from=this.from,n.to=this.to;return n}}class CV extends QB{constructor(){super(...arguments),this.type="animateColor"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=new eO(t.getColor()),a=new eO(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 BV extends QB{constructor(){super(...arguments),this.type="animateTransform"}calcValue(){var{progress:e,from:t,to:n}=this.getProgress(),i=Qo(t.getString()),a=Qo(n.getString()),o=i.map((s,A)=>{var l=a[A];return s+(l-s)*e}).join(" ");return o}}class bV extends On{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 TV extends On{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 SV extends un{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class xV extends Lh{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 IV extends Lh{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 Qe(t,"fontSize",Ka.parse(t.ctx.font).fontSize);a.isWorking()&&a.checkBoundingBox(this,new Vs(n,i-o.getPixels("y"),n+this.measureText(e),i))}else if(this.children.length>0){var s=new DB(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 VQ(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 W1(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?VQ(Object(t),!0).forEach(function(n){bM(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):VQ(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class LV extends Lh{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 lr.LINE_TO:e&&e.lineTo(a[0],a[1]);break;case lr.MOVE_TO:e&&e.moveTo(a[0],a[1]);break;case lr.CURVE_TO:e&&e.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case lr.QUAD_TO:e&&e.quadraticCurveTo(a[0],a[1],a[2],a[3]);break;case lr.ARC:{var[o,s,A,l,u,c,h,f]=a,d=A>l?A:l,g=A>l?1:A/l,m=A>l?l/A:1;e&&(e.translate(o,s),e.rotate(h),e.scale(g,m),e.arc(0,0,d,u,u+c,Boolean(1-f)),e.scale(1/g,1/m),e.rotate(-h),e.translate(-o,-s));break}case lr.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),d=this.getEquidistantPointOnPath(u+c,h,0),g={p0:f,p1:d},m=f&&d?Math.atan2(d.y-f.y,d.x-f.x):0;if(s){var v=Math.cos(Math.PI/2+m)*s,y=Math.cos(-m)*s;g.p0=W1(W1({},f),{},{x:f.x+v,y:f.y+y}),g.p1=W1(W1({},d),{},{x:d.x+v,y:d.y+y})}return u+=c,{offset:u,segment:g,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(C=>C.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 d=c.reduce((C,O,F)=>F===0?0:C+O||0,0),g=this.measureText(e),m=Math.max(g+d,0);this.textWidth=g,this.textHeight=this.getFontSize(),this.glyphInfo=[];var v=this.getPathLength(),y=this.getStyle("startOffset").getNumber(0)*v,w=0;(s==="middle"||s==="center")&&(w=-m/2),(s==="end"||s==="right")&&(w=-m),w+=y,n.forEach((C,O)=>{var{offset:F,segment:I,rotation:T}=this.findSegmentToFitChar(e,s,m,v,i,w,o,C,O);w=F,!(!I.p0||!I.p1)&&this.glyphInfo.push({text:n[O],p0:I.p0,p1:I.p1,rotation:T})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:n}=e;for(n.reset();!n.isEnd();){var{current:i}=n,a=i?i.x:0,o=i?i.y:0,s=n.next(),A=s.type,l=[];switch(s.type){case lr.MOVE_TO:this.pathM(n,l);break;case lr.LINE_TO:A=this.pathL(n,l);break;case lr.HORIZ_LINE_TO:A=this.pathH(n,l);break;case lr.VERT_LINE_TO:A=this.pathV(n,l);break;case lr.CURVE_TO:this.pathC(n,l);break;case lr.SMOOTH_CURVE_TO:A=this.pathS(n,l);break;case lr.QUAD_TO:this.pathQ(n,l);break;case lr.SMOOTH_QUAD_TO:A=this.pathT(n,l);break;case lr.ARC:l=this.pathA(n);break;case lr.CLOSE_PATH:un.pathZ(n);break}s.type!==lr.CLOSE_PATH?t.push({type:A,points:l,start:{x:a,y:o},pathLength:this.calcLength(a,o,A,l)}):t.push({type:lr.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:n,y:i}=un.pathM(e).point;t.push(n,i)}pathL(e,t){var{x:n,y:i}=un.pathL(e).point;return t.push(n,i),lr.LINE_TO}pathH(e,t){var{x:n,y:i}=un.pathH(e).point;return t.push(n,i),lr.LINE_TO}pathV(e,t){var{x:n,y:i}=un.pathV(e).point;return t.push(n,i),lr.LINE_TO}pathC(e,t){var{point:n,controlPoint:i,currentPoint:a}=un.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}=un.pathS(e);return t.push(n.x,n.y,i.x,i.y,a.x,a.y),lr.CURVE_TO}pathQ(e,t){var{controlPoint:n,currentPoint:i}=un.pathQ(e);t.push(n.x,n.y,i.x,i.y)}pathT(e,t){var{controlPoint:n,currentPoint:i}=un.pathT(e);return t.push(n.x,n.y,i.x,i.y),lr.QUAD_TO}pathA(e){var{rX:t,rY:n,sweepFlag:i,xAxisRotation:a,centp:o,a1:s,ad:A}=un.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 lr.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case lr.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 lr.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 lr.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+Wf),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+Wf)===A)c={x:o+l,y:s+u};else{var h=0,f=0,d=this.getLineLength(t,n,i,a);if(d<Wf)return null;var g=(o-t)*(i-t)+(s-n)*(a-n);g/=d*d,h=t+g*(i-t),f=n+g*(a-n);var m=this.getLineLength(o,s,h,f),v=Math.sqrt(e*e-m*m);l=Math.sqrt(v*v/(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 lr.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 lr.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 lr.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 lr.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*sO(e)+o*AO(e)+i*lO(e)+t*uO(e),c=l*sO(e)+s*AO(e)+a*lO(e)+n*uO(e);return{x:u,y:c}}getPointOnQuadraticBezier(e,t,n,i,a,o,s){var A=o*cO(e)+i*hO(e)+t*fO(e),l=s*cO(e)+a*hO(e)+n*fO(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 SMt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class OV extends Ih{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 xu(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 xu(function*(){var n=SMt.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 Vs(e,t,e+n,t+i)}}class FV extends Ih{constructor(){super(...arguments),this.type="symbol"}render(e){}}class RV{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var n=this;return xu(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 NM extends On{constructor(e,t,n){super(e,t,n),this.type="style";var i=Pd(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 v=m.indexOf(":"),y=m.substr(0,v).trim(),w=m.substr(v+1,m.length-v).trim();y&&w&&(f[y]=new Qe(e,y,w))}),e.styles[h]=f,e.stylesSpecificity[h]=rV(h),h==="@font-face"){var d=f["font-family"].getString().replace(/"|'/g,""),g=f.src.getString().split(",");g.forEach(m=>{if(m.indexOf('format("svg")')>0){var v=xM(m);v&&new RV(e).load(d,v)}})}}})}})}}NM.parseExternalUrl=xM;class MV extends Ih{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 _v(t,null),i.attributes.viewBox=new Qe(t,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new Qe(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new Qe(t,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new Qe(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 Qe(t,"width",a.getString())),o.hasValue()&&(i.attributes.height=new Qe(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 yh.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function z1(r,e,t,n,i,a){return r[t*n*4+e*4+a]}function Y1(r,e,t,n,i,a,o){r[t*n*4+e*4+a]=o}function Ri(r,e,t){var n=r[e];return n*t}function Zl(r,e,t,n){return e+Math.cos(r)*t+Math.sin(r)*n}class PM extends On{constructor(e,t,n){super(e,t,n),this.type="feColorMatrix";var i=Qo(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=[Zl(o,.213,.787,-.213),Zl(o,.715,-.715,-.715),Zl(o,.072,-.072,.928),0,0,Zl(o,.213,-.213,.143),Zl(o,.715,.285,.14),Zl(o,.072,-.072,-.283),0,0,Zl(o,.213,-.213,-.787),Zl(o,.715,-.715,.715),Zl(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=z1(A.data,u,l,i,a,0),h=z1(A.data,u,l,i,a,1),f=z1(A.data,u,l,i,a,2),d=z1(A.data,u,l,i,a,3),g=Ri(s,0,c)+Ri(s,1,h)+Ri(s,2,f)+Ri(s,3,d)+Ri(s,4,1),m=Ri(s,5,c)+Ri(s,6,h)+Ri(s,7,f)+Ri(s,8,d)+Ri(s,9,1),v=Ri(s,10,c)+Ri(s,11,h)+Ri(s,12,f)+Ri(s,13,d)+Ri(s,14,1),y=Ri(s,15,c)+Ri(s,16,h)+Ri(s,17,f)+Ri(s,18,d)+Ri(s,19,1);o&&(g=0,m=0,v=0,y*=d/255),Y1(A.data,u,l,i,a,0,g),Y1(A.data,u,l,i,a,1,m),Y1(A.data,u,l,i,a,2,v),Y1(A.data,u,l,i,a,3,y)}e.clearRect(0,0,i,a),e.putImageData(A,0,0)}}class z0 extends On{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 Vs;this.children.forEach(d=>{A.addBoundingBox(d.getBoundingBox(e))}),i=Math.floor(A.x1),a=Math.floor(A.y1),o=Math.floor(A.width),s=Math.floor(A.height)}var l=this.removeStyles(t,z0.ignoreStyles),u=n.createCanvas(i+o,a+s),c=u.getContext("2d");n.screen.setDefaults(c),this.renderChildren(c),new PM(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){}}z0.ignoreStyles=["mask","transform","clip-path"];var jQ=()=>{};class NV extends On{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,n=Reflect.getPrototypeOf(e),{beginPath:i,closePath:a}=e;n&&(n.beginPath=jQ,n.closePath=jQ),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var s=typeof o.elementTransform<"u"?o.elementTransform():null;s||(s=yh.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 Y0 extends On{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(v=>{var y=v.extraFilterDistance||0;o=Math.max(o,y),s=Math.max(s,y)});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),d=this.removeStyles(t,Y0.ignoreStyles),g=n.createCanvas(u,c),m=g.getContext("2d");n.screen.setDefaults(m),m.translate(-h+o,-f+s),t.render(m),i.forEach(v=>{typeof v.apply=="function"&&v.apply(m,0,0,u,c)}),e.drawImage(g,0,0,u,c,h-o,f-s,u,c),this.restoreStyles(t,d)}}}render(e){}}Y0.ignoreStyles=["filter","transform","clip-path"];class PV extends On{constructor(e,t,n){super(e,t,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,n,i,a){}}class UV extends On{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,n,i,a){}}class DV extends On{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,n,i,a){}}class QV extends On{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)),aMt(l,t,n,i,a,s),A&&A.removeChild(l)}}class kV extends On{constructor(){super(...arguments),this.type="title"}}class HV extends On{constructor(){super(...arguments),this.type="desc"}}var xMt={svg:_v,rect:FM,circle:fV,ellipse:dV,line:pV,polyline:RM,polygon:gV,path:un,pattern:vV,marker:mV,defs:yV,linearGradient:_V,radialGradient:wV,stop:EV,animate:QB,animateColor:CV,animateTransform:BV,font:bV,"font-face":TV,"missing-glyph":SV,glyph:OM,text:Lh,tspan:W0,tref:xV,a:IV,textPath:LV,image:OV,g:DB,symbol:FV,style:NM,use:MV,mask:z0,clipPath:NV,filter:Y0,feDropShadow:PV,feMorphology:UV,feComposite:DV,feColorMatrix:PM,feGaussianBlur:QV,title:kV,desc:HV};function KQ(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 IMt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?KQ(Object(t),!0).forEach(function(n){bM(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):KQ(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function LMt(r,e){var t=document.createElement("canvas");return t.width=r,t.height=e,t}function OMt(r){return dO.apply(this,arguments)}function dO(){return dO=xu(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})}),dO.apply(this,arguments)}class yu{constructor(e){var{rootEmSize:t=12,emSize:n=12,createCanvas:i=yu.createCanvas,createImage:a=yu.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=yu.elementTypes[t];return typeof n<"u"?new n(this,e):new hV(this,e)}createTextNode(e){return new TMt(this,e)}setViewBox(e){this.screen.setViewBox(IMt({document:this},e))}}yu.createCanvas=LMt;yu.createImage=OMt;yu.elementTypes=xMt;function WQ(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 df(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?WQ(Object(t),!0).forEach(function(n){bM(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):WQ(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}class Of{constructor(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new bw(n),this.screen=new K0(e,n),this.options=n;var i=new yu(this,n),a=i.createDocumentElement(t);this.document=i,this.documentElement=a}static from(e,t){var n=arguments;return xu(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:{},a=new bw(i),o=yield a.parse(t);return new Of(e,o,i)})()}static fromString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new bw(n),a=i.parseFromString(t);return new Of(e,a,n)}fork(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Of.from(e,t,df(df({},this.options),n))}forkString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Of.fromString(e,t,df(df({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return xu(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};t.start(df({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,df(df({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 FMt=Object.freeze(Object.defineProperty({__proto__:null,default:Of,AElement:IV,AnimateColorElement:CV,AnimateElement:QB,AnimateTransformElement:BV,BoundingBox:Vs,CB1:sO,CB2:AO,CB3:lO,CB4:uO,Canvg:Of,CircleElement:fV,ClipPathElement:NV,DefsElement:yV,DescElement:HV,Document:yu,Element:On,EllipseElement:dV,FeColorMatrixElement:PM,FeCompositeElement:DV,FeDropShadowElement:PV,FeGaussianBlurElement:QV,FeMorphologyElement:UV,FilterElement:Y0,Font:Ka,FontElement:bV,FontFaceElement:TV,GElement:DB,GlyphElement:OM,GradientElement:MM,ImageElement:OV,LineElement:pV,LinearGradientElement:_V,MarkerElement:mV,MaskElement:z0,Matrix:IM,MissingGlyphElement:SV,Mouse:iV,PSEUDO_ZERO:Wf,Parser:bw,PathElement:un,PathParser:lr,PatternElement:vV,Point:Ai,PolygonElement:gV,PolylineElement:RM,Property:Qe,QB1:cO,QB2:hO,QB3:fO,RadialGradientElement:wV,RectElement:FM,RenderedElement:Ih,Rotate:AV,SVGElement:_v,SVGFontLoader:RV,Scale:lV,Screen:K0,Skew:LM,SkewX:uV,SkewY:cV,StopElement:EV,StyleElement:NM,SymbolElement:FV,TRefElement:xV,TSpanElement:W0,TextElement:Lh,TextPathElement:LV,TitleElement:kV,Transform:yh,Translate:sV,UnknownElement:hV,UseElement:MV,ViewPort:nV,compressSpaces:Pd,getSelectorSpecificity:rV,normalizeAttributeName:tV,normalizeColor:eV,parseExternalUrl:xM,presets:lMt,toNumbers:Qo,trimLeft:Z9,trimRight:J9,vectorMagnitude:aO,vectorsAngle:oO,vectorsRatio:KE},Symbol.toStringTag,{value:"Module"}));var GV=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function dDt(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function $V(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 pO={},RMt={get exports(){return pO},set exports(r){pO=r}};const MMt=$V(UY);(function(r,e){(function(n,i){r.exports=i(MMt)})(GV,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:()=>H,LoadingPlugin:()=>ot,default:()=>ut,useLoading:()=>J});var s=a(976);function A(X){var It;typeof X.remove<"u"?X.remove():(It=X.parentNode)==null||It.removeChild(X)}function l(X,It,at){let j=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const Z=(0,s.h)(X,It,j),ft=document.createElement("div");return ft.classList.add("vld-container"),at.appendChild(ft),(0,s.render)(Z,ft),Z.component}function u(){return typeof window<"u"}const c=u()?window.HTMLElement:Object,h=["aria-busy"],f={class:"vl-icon"};function d(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createBlock)(s.Transition,{name:X.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":X.isFullPage}]),"aria-busy":X.isActive,"aria-label":"Loading",style:(0,s.normalizeStyle)({zIndex:X.zIndex})},[(0,s.createElementVNode)("div",{class:"vl-background",onClick:It[0]||(It[0]=(0,s.withModifiers)(function(){return X.cancel&&X.cancel(...arguments)},["prevent"])),style:(0,s.normalizeStyle)(X.bgStyle)},null,4),(0,s.createElementVNode)("div",f,[(0,s.renderSlot)(X.$slots,"before"),(0,s.renderSlot)(X.$slots,"default",{},()=>[((0,s.openBlock)(),(0,s.createBlock)((0,s.resolveDynamicComponent)(X.loader),{color:X.color,width:X.width,height:X.height},null,8,["color","width","height"]))]),(0,s.renderSlot)(X.$slots,"after")])],14,h),[[s.vShow,X.isActive]])]),_:3},8,["name"])}const g={mounted(){this.enforceFocus&&document.addEventListener("focusin",this.focusIn)},methods:{focusIn(X){if(!this.isActive||X.target===this.$el||this.$el.contains(X.target))return;let It=this.container?this.container:this.isFullPage?null:this.$el.parentElement;(this.isFullPage||It&&It.contains(X.target))&&(X.preventDefault(),this.$el.focus())}},beforeUnmount(){document.removeEventListener("focusin",this.focusIn)}},m=["width","height","stroke"],y=[(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 w(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 38 38",xmlns:"http://www.w3.org/2000/svg",width:X.width,height:X.height,stroke:X.color},y,8,m)}const C=(0,s.defineComponent)({name:"spinner",props:{color:{type:String,default:"#000"},height:{type:Number,default:64},width:{type:Number,default:64}}});var O=a(657);const I=(0,O.default)(C,[["render",w]]),T=["fill","width","height"],N=[(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(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{viewBox:"0 0 120 30",xmlns:"http://www.w3.org/2000/svg",fill:X.color,width:X.width,height:X.height},N,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}}}),U=(0,O.default)(S,[["render",x]]),tt=["height","width","fill"],rt=[(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 nt(X,It,at,j,Z,ft){return(0,s.openBlock)(),(0,s.createElementBlock)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 30 30",height:X.height,width:X.width,fill:X.color},rt,8,tt)}const At=(0,s.defineComponent)({name:"bars",props:{color:{type:String,default:"#000"},height:{type:Number,default:40},width:{type:Number,default:40}}}),M={Spinner:I,Dots:U,Bars:(0,O.default)(At,[["render",nt]])},W=(0,s.defineComponent)({name:"VueLoading",mixins:[g],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:M,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 X=this.$el.parentElement;(0,s.render)(null,X),A(X)},150))},disableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.add("vl-shown")},enableScroll(){this.isFullPage&&this.lockScroll&&document.body.classList.remove("vl-shown")},keyPress(X){X.keyCode===27&&this.cancel()}},watch:{active(X){this.isActive=X},isActive(X){X?this.disableScroll():this.enableScroll()}},computed:{bgStyle(){return{background:this.backgroundColor,opacity:this.opacity}}},beforeUnmount(){document.removeEventListener("keyup",this.keyPress)}}),H=(0,O.default)(W,[["render",d]]);function J(){let X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return{show(){let at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:It;const ft={...X,...at,...{programmatic:!0,lockScroll:!0,isFullPage:!1,active:!0}};let it=ft.container;ft.container||(it=document.body,ft.isFullPage=!0);const V={...It,...j};return{hide:l(H,ft,it,V).ctx.hide}}}}const ot=function(X){let It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const j=J(It,at);X.config.globalProperties.$loading=j,X.provide("$loading",j)},ut=H})(),o})())})(RMt);/*!
* vue-router v4.1.6
* (c) 2022 Eduardo San Martin Morote
* @license MIT
*/const jp=typeof window<"u";function NMt(r){return r.__esModule||r[Symbol.toStringTag]==="Module"}const vn=Object.assign;function MS(r,e){const t={};for(const n in e){const i=e[n];t[n]=wA(i)?i.map(r):r(i)}return t}const yy=()=>{},wA=Array.isArray,PMt=/\/$/,UMt=r=>r.replace(PMt,"");function NS(r,e,t="/"){let n,i={},a="",o="";const s=e.indexOf("#");let A=e.indexOf("?");return s<A&&s>=0&&(A=-1),A>-1&&(n=e.slice(0,A),a=e.slice(A+1,s>-1?s:e.length),i=r(a)),s>-1&&(n=n||e.slice(0,s),o=e.slice(s,e.length)),n=HMt(n??e,t),{fullPath:n+(a&&"?")+a+o,path:n,query:i,hash:o}}function DMt(r,e){const t=e.query?r(e.query):"";return e.path+(t&&"?")+t+(e.hash||"")}function zQ(r,e){return!e||!r.toLowerCase().startsWith(e.toLowerCase())?r:r.slice(e.length)||"/"}function QMt(r,e,t){const n=e.matched.length-1,i=t.matched.length-1;return n>-1&&n===i&&Vg(e.matched[n],t.matched[i])&&VV(e.params,t.params)&&r(e.query)===r(t.query)&&e.hash===t.hash}function Vg(r,e){return(r.aliasOf||r)===(e.aliasOf||e)}function VV(r,e){if(Object.keys(r).length!==Object.keys(e).length)return!1;for(const t in r)if(!kMt(r[t],e[t]))return!1;return!0}function kMt(r,e){return wA(r)?YQ(r,e):wA(e)?YQ(e,r):r===e}function YQ(r,e){return wA(e)?r.length===e.length&&r.every((t,n)=>t===e[n]):r.length===1&&r[0]===e}function HMt(r,e){if(r.startsWith("/"))return r;if(!r)return e;const t=e.split("/"),n=r.split("/");let i=t.length-1,a,o;for(a=0;a<n.length;a++)if(o=n[a],o!==".")if(o==="..")i>1&&i--;else break;return t.slice(0,i).join("/")+"/"+n.slice(a-(a===n.length?1:0)).join("/")}var n0;(function(r){r.pop="pop",r.push="push"})(n0||(n0={}));var _y;(function(r){r.back="back",r.forward="forward",r.unknown=""})(_y||(_y={}));function GMt(r){if(!r)if(jp){const e=document.querySelector("base");r=e&&e.getAttribute("href")||"/",r=r.replace(/^\w+:\/\/[^\/]+/,"")}else r="/";return r[0]!=="/"&&r[0]!=="#"&&(r="/"+r),UMt(r)}const $Mt=/^[^#]+#/;function VMt(r,e){return r.replace($Mt,"#")+e}function jMt(r,e){const t=document.documentElement.getBoundingClientRect(),n=r.getBoundingClientRect();return{behavior:e.behavior,left:n.left-t.left-(e.left||0),top:n.top-t.top-(e.top||0)}}const kB=()=>({left:window.pageXOffset,top:window.pageYOffset});function KMt(r){let e;if("el"in r){const t=r.el,n=typeof t=="string"&&t.startsWith("#"),i=typeof t=="string"?n?document.getElementById(t.slice(1)):document.querySelector(t):t;if(!i)return;e=jMt(i,r)}else e=r;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function XQ(r,e){return(history.state?history.state.position-e:-1)+r}const gO=new Map;function WMt(r,e){gO.set(r,e)}function zMt(r){const e=gO.get(r);return gO.delete(r),e}let YMt=()=>location.protocol+"//"+location.host;function jV(r,e){const{pathname:t,search:n,hash:i}=e,a=r.indexOf("#");if(a>-1){let s=i.includes(r.slice(a))?r.slice(a).length:1,A=i.slice(s);return A[0]!=="/"&&(A="/"+A),zQ(A,"")}return zQ(t,r)+n+i}function XMt(r,e,t,n){let i=[],a=[],o=null;const s=({state:h})=>{const f=jV(r,location),d=t.value,g=e.value;let m=0;if(h){if(t.value=f,e.value=h,o&&o===d){o=null;return}m=g?h.position-g.position:0}else n(f);i.forEach(v=>{v(t.value,d,{delta:m,type:n0.pop,direction:m?m>0?_y.forward:_y.back:_y.unknown})})};function A(){o=t.value}function l(h){i.push(h);const f=()=>{const d=i.indexOf(h);d>-1&&i.splice(d,1)};return a.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(vn({},h.state,{scroll:kB()}),"")}function c(){for(const h of a)h();a=[],window.removeEventListener("popstate",s),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",s),window.addEventListener("beforeunload",u),{pauseListeners:A,listen:l,destroy:c}}function qQ(r,e,t,n=!1,i=!1){return{back:r,current:e,forward:t,replaced:n,position:window.history.length,scroll:i?kB():null}}function qMt(r){const{history:e,location:t}=window,n={value:jV(r,t)},i={value:e.state};i.value||a(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function a(A,l,u){const c=r.indexOf("#"),h=c>-1?(t.host&&document.querySelector("base")?r:r.slice(c))+A:YMt()+r+A;try{e[u?"replaceState":"pushState"](l,"",h),i.value=l}catch(f){console.error(f),t[u?"replace":"assign"](h)}}function o(A,l){const u=vn({},e.state,qQ(i.value.back,A,i.value.forward,!0),l,{position:i.value.position});a(A,u,!0),n.value=A}function s(A,l){const u=vn({},i.value,e.state,{forward:A,scroll:kB()});a(u.current,u,!0);const c=vn({},qQ(n.value,A,null),{position:u.position+1},l);a(A,c,!1),n.value=A}return{location:n,state:i,push:s,replace:o}}function ZMt(r){r=GMt(r);const e=qMt(r),t=XMt(r,e.state,e.location,e.replace);function n(a,o=!0){o||t.pauseListeners(),history.go(a)}const i=vn({location:"",base:r,go:n,createHref:VMt.bind(null,r)},e,t);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function JMt(r){return typeof r=="string"||r&&typeof r=="object"}function KV(r){return typeof r=="string"||typeof r=="symbol"}const _c={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},WV=Symbol("");var ZQ;(function(r){r[r.aborted=4]="aborted",r[r.cancelled=8]="cancelled",r[r.duplicated=16]="duplicated"})(ZQ||(ZQ={}));function jg(r,e){return vn(new Error,{type:r,[WV]:!0},e)}function Jl(r,e){return r instanceof Error&&WV in r&&(e==null||!!(r.type&e))}const JQ="[^/]+?",tNt={sensitive:!1,strict:!1,start:!0,end:!0},eNt=/[.+*?^${}()[\]/\\]/g;function rNt(r,e){const t=vn({},tNt,e),n=[];let i=t.start?"^":"";const a=[];for(const l of r){const u=l.length?[]:[90];t.strict&&!l.length&&(i+="/");for(let c=0;c<l.length;c++){const h=l[c];let f=40+(t.sensitive?.25:0);if(h.type===0)c||(i+="/"),i+=h.value.replace(eNt,"\\$&"),f+=40;else if(h.type===1){const{value:d,repeatable:g,optional:m,regexp:v}=h;a.push({name:d,repeatable:g,optional:m});const y=v||JQ;if(y!==JQ){f+=10;try{new RegExp(`(${y})`)}catch(C){throw new Error(`Invalid custom RegExp for param "${d}" (${y}): `+C.message)}}let w=g?`((?:${y})(?:/(?:${y}))*)`:`(${y})`;c||(w=m&&l.length<2?`(?:/${w})`:"/"+w),m&&(w+="?"),i+=w,f+=20,m&&(f+=-8),g&&(f+=-20),y===".*"&&(f+=-50)}u.push(f)}n.push(u)}if(t.strict&&t.end){const l=n.length-1;n[l][n[l].length-1]+=.7000000000000001}t.strict||(i+="/?"),t.end?i+="$":t.strict&&(i+="(?:/|$)");const o=new RegExp(i,t.sensitive?"":"i");function s(l){const u=l.match(o),c={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",d=a[h-1];c[d.name]=f&&d.repeatable?f.split("/"):f}return c}function A(l){let u="",c=!1;for(const h of r){(!c||!u.endsWith("/"))&&(u+="/"),c=!1;for(const f of h)if(f.type===0)u+=f.value;else if(f.type===1){const{value:d,repeatable:g,optional:m}=f,v=d in l?l[d]:"";if(wA(v)&&!g)throw new Error(`Provided param "${d}" is an array but it is not repeatable (* or + modifiers)`);const y=wA(v)?v.join("/"):v;if(!y)if(m)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):c=!0);else throw new Error(`Missing required param "${d}"`);u+=y}}return u||"/"}return{re:o,score:n,keys:a,parse:s,stringify:A}}function nNt(r,e){let t=0;for(;t<r.length&&t<e.length;){const n=e[t]-r[t];if(n)return n;t++}return r.length<e.length?r.length===1&&r[0]===40+40?-1:1:r.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function iNt(r,e){let t=0;const n=r.score,i=e.score;for(;t<n.length&&t<i.length;){const a=nNt(n[t],i[t]);if(a)return a;t++}if(Math.abs(i.length-n.length)===1){if(t6(n))return 1;if(t6(i))return-1}return i.length-n.length}function t6(r){const e=r[r.length-1];return r.length>0&&e[e.length-1]<0}const aNt={type:0,value:""},oNt=/[a-zA-Z0-9_]/;function sNt(r){if(!r)return[[]];if(r==="/")return[[aNt]];if(!r.startsWith("/"))throw new Error(`Invalid path "${r}"`);function e(f){throw new Error(`ERR (${t})/"${l}": ${f}`)}let t=0,n=t;const i=[];let a;function o(){a&&i.push(a),a=[]}let s=0,A,l="",u="";function c(){l&&(t===0?a.push({type:0,value:l}):t===1||t===2||t===3?(a.length>1&&(A==="*"||A==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:A==="*"||A==="+",optional:A==="*"||A==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=A}for(;s<r.length;){if(A=r[s++],A==="\\"&&t!==2){n=t,t=4;continue}switch(t){case 0:A==="/"?(l&&c(),o()):A===":"?(c(),t=1):h();break;case 4:h(),t=n;break;case 1:A==="("?t=2:oNt.test(A)?h():(c(),t=0,A!=="*"&&A!=="?"&&A!=="+"&&s--);break;case 2:A===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+A:t=3:u+=A;break;case 3:c(),t=0,A!=="*"&&A!=="?"&&A!=="+"&&s--,u="";break;default:e("Unknown state");break}}return t===2&&e(`Unfinished custom RegExp for param "${l}"`),c(),o(),i}function ANt(r,e,t){const n=rNt(sNt(r.path),t),i=vn(n,{record:r,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function lNt(r,e){const t=[],n=new Map;e=n6({strict:!1,end:!0,sensitive:!1},e);function i(u){return n.get(u)}function a(u,c,h){const f=!h,d=uNt(u);d.aliasOf=h&&h.record;const g=n6(e,u),m=[d];if("alias"in u){const w=typeof u.alias=="string"?[u.alias]:u.alias;for(const C of w)m.push(vn({},d,{components:h?h.record.components:d.components,path:C,aliasOf:h?h.record:d}))}let v,y;for(const w of m){const{path:C}=w;if(c&&C[0]!=="/"){const O=c.record.path,F=O[O.length-1]==="/"?"":"/";w.path=c.record.path+(C&&F+C)}if(v=ANt(w,c,g),h?h.alias.push(v):(y=y||v,y!==v&&y.alias.push(v),f&&u.name&&!r6(v)&&o(u.name)),d.children){const O=d.children;for(let F=0;F<O.length;F++)a(O[F],v,h&&h.children[F])}h=h||v,(v.record.components&&Object.keys(v.record.components).length||v.record.name||v.record.redirect)&&A(v)}return y?()=>{o(y)}:yy}function o(u){if(KV(u)){const c=n.get(u);c&&(n.delete(u),t.splice(t.indexOf(c),1),c.children.forEach(o),c.alias.forEach(o))}else{const c=t.indexOf(u);c>-1&&(t.splice(c,1),u.record.name&&n.delete(u.record.name),u.children.forEach(o),u.alias.forEach(o))}}function s(){return t}function A(u){let c=0;for(;c<t.length&&iNt(u,t[c])>=0&&(u.record.path!==t[c].record.path||!zV(u,t[c]));)c++;t.splice(c,0,u),u.record.name&&!r6(u)&&n.set(u.record.name,u)}function l(u,c){let h,f={},d,g;if("name"in u&&u.name){if(h=n.get(u.name),!h)throw jg(1,{location:u});g=h.record.name,f=vn(e6(c.params,h.keys.filter(y=>!y.optional).map(y=>y.name)),u.params&&e6(u.params,h.keys.map(y=>y.name))),d=h.stringify(f)}else if("path"in u)d=u.path,h=t.find(y=>y.re.test(d)),h&&(f=h.parse(d),g=h.record.name);else{if(h=c.name?n.get(c.name):t.find(y=>y.re.test(c.path)),!h)throw jg(1,{location:u,currentLocation:c});g=h.record.name,f=vn({},c.params,u.params),d=h.stringify(f)}const m=[];let v=h;for(;v;)m.unshift(v.record),v=v.parent;return{name:g,path:d,params:f,matched:m,meta:hNt(m)}}return r.forEach(u=>a(u)),{addRoute:a,resolve:l,removeRoute:o,getRoutes:s,getRecordMatcher:i}}function e6(r,e){const t={};for(const n of e)n in r&&(t[n]=r[n]);return t}function uNt(r){return{path:r.path,redirect:r.redirect,name:r.name,meta:r.meta||{},aliasOf:void 0,beforeEnter:r.beforeEnter,props:cNt(r),children:r.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in r?r.components||null:r.component&&{default:r.component}}}function cNt(r){const e={},t=r.props||!1;if("component"in r)e.default=t;else for(const n in r.components)e[n]=typeof t=="boolean"?t:t[n];return e}function r6(r){for(;r;){if(r.record.aliasOf)return!0;r=r.parent}return!1}function hNt(r){return r.reduce((e,t)=>vn(e,t.meta),{})}function n6(r,e){const t={};for(const n in r)t[n]=n in e?e[n]:r[n];return t}function zV(r,e){return e.children.some(t=>t===r||zV(r,t))}const YV=/#/g,fNt=/&/g,dNt=/\//g,pNt=/=/g,gNt=/\?/g,XV=/\+/g,vNt=/%5B/g,mNt=/%5D/g,qV=/%5E/g,yNt=/%60/g,ZV=/%7B/g,_Nt=/%7C/g,JV=/%7D/g,wNt=/%20/g;function UM(r){return encodeURI(""+r).replace(_Nt,"|").replace(vNt,"[").replace(mNt,"]")}function ENt(r){return UM(r).replace(ZV,"{").replace(JV,"}").replace(qV,"^")}function vO(r){return UM(r).replace(XV,"%2B").replace(wNt,"+").replace(YV,"%23").replace(fNt,"%26").replace(yNt,"`").replace(ZV,"{").replace(JV,"}").replace(qV,"^")}function CNt(r){return vO(r).replace(pNt,"%3D")}function BNt(r){return UM(r).replace(YV,"%23").replace(gNt,"%3F")}function bNt(r){return r==null?"":BNt(r).replace(dNt,"%2F")}function WE(r){try{return decodeURIComponent(""+r)}catch{}return""+r}function TNt(r){const e={};if(r===""||r==="?")return e;const n=(r[0]==="?"?r.slice(1):r).split("&");for(let i=0;i<n.length;++i){const a=n[i].replace(XV," "),o=a.indexOf("="),s=WE(o<0?a:a.slice(0,o)),A=o<0?null:WE(a.slice(o+1));if(s in e){let l=e[s];wA(l)||(l=e[s]=[l]),l.push(A)}else e[s]=A}return e}function i6(r){let e="";for(let t in r){const n=r[t];if(t=CNt(t),n==null){n!==void 0&&(e+=(e.length?"&":"")+t);continue}(wA(n)?n.map(a=>a&&vO(a)):[n&&vO(n)]).forEach(a=>{a!==void 0&&(e+=(e.length?"&":"")+t,a!=null&&(e+="="+a))})}return e}function SNt(r){const e={};for(const t in r){const n=r[t];n!==void 0&&(e[t]=wA(n)?n.map(i=>i==null?null:""+i):n==null?n:""+n)}return e}const xNt=Symbol(""),a6=Symbol(""),DM=Symbol(""),tj=Symbol(""),mO=Symbol("");function Bm(){let r=[];function e(n){return r.push(n),()=>{const i=r.indexOf(n);i>-1&&r.splice(i,1)}}function t(){r=[]}return{add:e,list:()=>r,reset:t}}function Lc(r,e,t,n,i){const a=n&&(n.enterCallbacks[i]=n.enterCallbacks[i]||[]);return()=>new Promise((o,s)=>{const A=c=>{c===!1?s(jg(4,{from:t,to:e})):c instanceof Error?s(c):JMt(c)?s(jg(2,{from:e,to:c})):(a&&n.enterCallbacks[i]===a&&typeof c=="function"&&a.push(c),o())},l=r.call(n&&n.instances[i],e,t,A);let u=Promise.resolve(l);r.length<3&&(u=u.then(A)),u.catch(c=>s(c))})}function PS(r,e,t,n){const i=[];for(const a of r)for(const o in a.components){let s=a.components[o];if(!(e!=="beforeRouteEnter"&&!a.instances[o]))if(INt(s)){const l=(s.__vccOpts||s)[e];l&&i.push(Lc(l,t,n,a,o))}else{let A=s();i.push(()=>A.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${a.path}"`));const u=NMt(l)?l.default:l;a.components[o]=u;const h=(u.__vccOpts||u)[e];return h&&Lc(h,t,n,a,o)()}))}}return i}function INt(r){return typeof r=="object"||"displayName"in r||"props"in r||"__vccOpts"in r}function o6(r){const e=Be(DM),t=Be(tj),n=qe(()=>e.resolve(Mf(r.to))),i=qe(()=>{const{matched:A}=n.value,{length:l}=A,u=A[l-1],c=t.matched;if(!u||!c.length)return-1;const h=c.findIndex(Vg.bind(null,u));if(h>-1)return h;const f=s6(A[l-2]);return l>1&&s6(u)===f&&c[c.length-1].path!==f?c.findIndex(Vg.bind(null,A[l-2])):h}),a=qe(()=>i.value>-1&&RNt(t.params,n.value.params)),o=qe(()=>i.value>-1&&i.value===t.matched.length-1&&VV(t.params,n.value.params));function s(A={}){return FNt(A)?e[Mf(r.replace)?"replace":"push"](Mf(r.to)).catch(yy):Promise.resolve()}return{route:n,href:qe(()=>n.value.href),isActive:a,isExactActive:o,navigate:s}}const LNt=g0({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:o6,setup(r,{slots:e}){const t=md(o6(r)),{options:n}=Be(DM),i=qe(()=>({[A6(r.activeClass,n.linkActiveClass,"router-link-active")]:t.isActive,[A6(r.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:t.isExactActive}));return()=>{const a=e.default&&e.default(t);return r.custom?a:_C("a",{"aria-current":t.isExactActive?r.ariaCurrentValue:null,href:t.href,onClick:t.navigate,class:i.value},a)}}}),ONt=LNt;function FNt(r){if(!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)&&!r.defaultPrevented&&!(r.button!==void 0&&r.button!==0)){if(r.currentTarget&&r.currentTarget.getAttribute){const e=r.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return r.preventDefault&&r.preventDefault(),!0}}function RNt(r,e){for(const t in e){const n=e[t],i=r[t];if(typeof n=="string"){if(n!==i)return!1}else if(!wA(i)||i.length!==n.length||n.some((a,o)=>a!==i[o]))return!1}return!0}function s6(r){return r?r.aliasOf?r.aliasOf.path:r.path:""}const A6=(r,e,t)=>r??e??t,MNt=g0({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(r,{attrs:e,slots:t}){const n=Be(mO),i=qe(()=>r.route||n.value),a=Be(a6,0),o=qe(()=>{let l=Mf(a);const{matched:u}=i.value;let c;for(;(c=u[l])&&!c.components;)l++;return l}),s=qe(()=>i.value.matched[o.value]);Dr(a6,qe(()=>o.value+1)),Dr(xNt,s),Dr(mO,i);const A=Fo();return ye(()=>[A.value,s.value,r.name],([l,u,c],[h,f,d])=>{u&&(u.instances[c]=l,f&&f!==u&&l&&l===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),l&&u&&(!f||!Vg(u,f)||!h)&&(u.enterCallbacks[c]||[]).forEach(g=>g(l))},{flush:"post"}),()=>{const l=i.value,u=r.name,c=s.value,h=c&&c.components[u];if(!h)return l6(t.default,{Component:h,route:l});const f=c.props[u],d=f?f===!0?l.params:typeof f=="function"?f(l):f:null,m=_C(h,vn({},d,e,{onVnodeUnmounted:v=>{v.component.isUnmounted&&(c.instances[u]=null)},ref:A}));return l6(t.default,{Component:m,route:l})||m}}});function l6(r,e){if(!r)return null;const t=r(e);return t.length===1?t[0]:t}const NNt=MNt;function PNt(r){const e=lNt(r.routes,r),t=r.parseQuery||TNt,n=r.stringifyQuery||i6,i=r.history,a=Bm(),o=Bm(),s=Bm(),A=l4(_c);let l=_c;jp&&r.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=MS.bind(null,H=>""+H),c=MS.bind(null,bNt),h=MS.bind(null,WE);function f(H,J){let ot,ut;return KV(H)?(ot=e.getRecordMatcher(H),ut=J):ut=H,e.addRoute(ut,ot)}function d(H){const J=e.getRecordMatcher(H);J&&e.removeRoute(J)}function g(){return e.getRoutes().map(H=>H.record)}function m(H){return!!e.getRecordMatcher(H)}function v(H,J){if(J=vn({},J||A.value),typeof H=="string"){const j=NS(t,H,J.path),Z=e.resolve({path:j.path},J),ft=i.createHref(j.fullPath);return vn(j,Z,{params:h(Z.params),hash:WE(j.hash),redirectedFrom:void 0,href:ft})}let ot;if("path"in H)ot=vn({},H,{path:NS(t,H.path,J.path).path});else{const j=vn({},H.params);for(const Z in j)j[Z]==null&&delete j[Z];ot=vn({},H,{params:c(H.params)}),J.params=c(J.params)}const ut=e.resolve(ot,J),X=H.hash||"";ut.params=u(h(ut.params));const It=DMt(n,vn({},H,{hash:ENt(X),path:ut.path})),at=i.createHref(It);return vn({fullPath:It,hash:X,query:n===i6?SNt(H.query):H.query||{}},ut,{redirectedFrom:void 0,href:at})}function y(H){return typeof H=="string"?NS(t,H,A.value.path):vn({},H)}function w(H,J){if(l!==H)return jg(8,{from:J,to:H})}function C(H){return I(H)}function O(H){return C(vn(y(H),{replace:!0}))}function F(H){const J=H.matched[H.matched.length-1];if(J&&J.redirect){const{redirect:ot}=J;let ut=typeof ot=="function"?ot(H):ot;return typeof ut=="string"&&(ut=ut.includes("?")||ut.includes("#")?ut=y(ut):{path:ut},ut.params={}),vn({query:H.query,hash:H.hash,params:"path"in ut?{}:H.params},ut)}}function I(H,J){const ot=l=v(H),ut=A.value,X=H.state,It=H.force,at=H.replace===!0,j=F(ot);if(j)return I(vn(y(j),{state:typeof j=="object"?vn({},X,j.state):X,force:It,replace:at}),J||ot);const Z=ot;Z.redirectedFrom=J;let ft;return!It&&QMt(n,ut,ot)&&(ft=jg(16,{to:Z,from:ut}),ct(ut,ut,!0,!1)),(ft?Promise.resolve(ft):L(Z,ut)).catch(it=>Jl(it)?Jl(it,2)?it:At(it):rt(it,Z,ut)).then(it=>{if(it){if(Jl(it,2))return I(vn({replace:at},y(it.to),{state:typeof it.to=="object"?vn({},X,it.to.state):X,force:It}),J||Z)}else it=x(Z,ut,!0,at,X);return N(Z,ut,it),it})}function T(H,J){const ot=w(H,J);return ot?Promise.reject(ot):Promise.resolve()}function L(H,J){let ot;const[ut,X,It]=UNt(H,J);ot=PS(ut.reverse(),"beforeRouteLeave",H,J);for(const j of ut)j.leaveGuards.forEach(Z=>{ot.push(Lc(Z,H,J))});const at=T.bind(null,H,J);return ot.push(at),Rp(ot).then(()=>{ot=[];for(const j of a.list())ot.push(Lc(j,H,J));return ot.push(at),Rp(ot)}).then(()=>{ot=PS(X,"beforeRouteUpdate",H,J);for(const j of X)j.updateGuards.forEach(Z=>{ot.push(Lc(Z,H,J))});return ot.push(at),Rp(ot)}).then(()=>{ot=[];for(const j of H.matched)if(j.beforeEnter&&!J.matched.includes(j))if(wA(j.beforeEnter))for(const Z of j.beforeEnter)ot.push(Lc(Z,H,J));else ot.push(Lc(j.beforeEnter,H,J));return ot.push(at),Rp(ot)}).then(()=>(H.matched.forEach(j=>j.enterCallbacks={}),ot=PS(It,"beforeRouteEnter",H,J),ot.push(at),Rp(ot))).then(()=>{ot=[];for(const j of o.list())ot.push(Lc(j,H,J));return ot.push(at),Rp(ot)}).catch(j=>Jl(j,8)?j:Promise.reject(j))}function N(H,J,ot){for(const ut of s.list())ut(H,J,ot)}function x(H,J,ot,ut,X){const It=w(H,J);if(It)return It;const at=J===_c,j=jp?history.state:{};ot&&(ut||at?i.replace(H.fullPath,vn({scroll:at&&j&&j.scroll},X)):i.push(H.fullPath,X)),A.value=H,ct(H,J,ot,at),At()}let S;function P(){S||(S=i.listen((H,J,ot)=>{if(!Y.listening)return;const ut=v(H),X=F(ut);if(X){I(vn(X,{replace:!0}),ut).catch(yy);return}l=ut;const It=A.value;jp&&WMt(XQ(It.fullPath,ot.delta),kB()),L(ut,It).catch(at=>Jl(at,12)?at:Jl(at,2)?(I(at.to,ut).then(j=>{Jl(j,20)&&!ot.delta&&ot.type===n0.pop&&i.go(-1,!1)}).catch(yy),Promise.reject()):(ot.delta&&i.go(-ot.delta,!1),rt(at,ut,It))).then(at=>{at=at||x(ut,It,!1),at&&(ot.delta&&!Jl(at,8)?i.go(-ot.delta,!1):ot.type===n0.pop&&Jl(at,20)&&i.go(-1,!1)),N(ut,It,at)}).catch(yy)}))}let U=Bm(),tt=Bm(),q;function rt(H,J,ot){At(H);const ut=tt.list();return ut.length?ut.forEach(X=>X(H,J,ot)):console.error(H),Promise.reject(H)}function nt(){return q&&A.value!==_c?Promise.resolve():new Promise((H,J)=>{U.add([H,J])})}function At(H){return q||(q=!H,P(),U.list().forEach(([J,ot])=>H?ot(H):J()),U.reset()),H}function ct(H,J,ot,ut){const{scrollBehavior:X}=r;if(!jp||!X)return Promise.resolve();const It=!ot&&zMt(XQ(H.fullPath,0))||(ut||!ot)&&history.state&&history.state.scroll||null;return lC().then(()=>X(H,J,It)).then(at=>at&&KMt(at)).catch(at=>rt(at,H,J))}const Tt=H=>i.go(H);let M;const W=new Set,Y={currentRoute:A,listening:!0,addRoute:f,removeRoute:d,hasRoute:m,getRoutes:g,resolve:v,options:r,push:C,replace:O,go:Tt,back:()=>Tt(-1),forward:()=>Tt(1),beforeEach:a.add,beforeResolve:o.add,afterEach:s.add,onError:tt.add,isReady:nt,install(H){const J=this;H.component("RouterLink",ONt),H.component("RouterView",NNt),H.config.globalProperties.$router=J,Object.defineProperty(H.config.globalProperties,"$route",{enumerable:!0,get:()=>Mf(A)}),jp&&!M&&A.value===_c&&(M=!0,C(i.location).catch(X=>{}));const ot={};for(const X in _c)ot[X]=qe(()=>A.value[X]);H.provide(DM,J),H.provide(tj,md(ot)),H.provide(mO,A);const ut=H.unmount;W.add(H),H.unmount=function(){W.delete(H),W.size<1&&(l=_c,S&&S(),S=null,A.value=_c,M=!1,q=!1),ut()}}};return Y}function Rp(r){return r.reduce((e,t)=>e.then(()=>t()),Promise.resolve())}function UNt(r,e){const t=[],n=[],i=[],a=Math.max(e.matched.length,r.matched.length);for(let o=0;o<a;o++){const s=e.matched[o];s&&(r.matched.find(l=>Vg(l,s))?n.push(s):t.push(s));const A=r.matched[o];A&&(e.matched.find(l=>Vg(l,A))||i.push(A))}return[t,n,i]}const DNt="modulepreload",QNt=function(r){return"/"+r},u6={},bm=function(e,t,n){if(!t||t.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(t.map(a=>{if(a=QNt(a),a in u6)return;u6[a]=!0;const o=a.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(!!n)for(let u=i.length-1;u>=0;u--){const c=i[u];if(c.href===a&&(!o||c.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${a}"]${s}`))return;const l=document.createElement("link");if(l.rel=o?"stylesheet":DNt,o||(l.as="script",l.crossOrigin=""),l.href=a,document.head.appendChild(l),o)return new Promise((u,c)=>{l.addEventListener("load",u),l.addEventListener("error",()=>c(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>e())},kNt=(r,e)=>{const t=r[e];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e)))})};/**
* @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 ej=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},HNt=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("")},rj={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(ej(r),e)},decodeString(r,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(r):HNt(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 d=l<<6&192|c;n.push(d)}}}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)}}},GNt=function(r){const e=ej(r);return rj.encodeByteArray(e,!0)},nj=function(r){return GNt(r).replace(/\./g,"")},ij=function(r){try{return rj.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 $Nt(){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 VNt=()=>$Nt().__FIREBASE_DEFAULTS__,jNt=()=>{if(typeof process>"u"||typeof process.env>"u")return;const r={}.__FIREBASE_DEFAULTS__;if(r)return JSON.parse(r)},KNt=()=>{if(typeof document>"u")return;let r;try{r=document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/)}catch{return}const e=r&&ij(r[1]);return e&&JSON.parse(e)},QM=()=>{try{return VNt()||jNt()||KNt()}catch(r){console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${r}`);return}},aj=r=>{var e,t;return(t=(e=QM())===null||e===void 0?void 0:e.emulatorHosts)===null||t===void 0?void 0:t[r]},pDt=r=>{const e=aj(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]},WNt=()=>{var r;return(r=QM())===null||r===void 0?void 0:r.config},oj=r=>{var e;return(e=QM())===null||e===void 0?void 0:e[`_${r}`]};/**
* @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 zNt{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))}}}/**
* @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.
*/function Ja(){return typeof navigator<"u"&&typeof navigator.userAgent=="string"?navigator.userAgent:""}function YNt(){return typeof window<"u"&&!!(window.cordova||window.phonegap||window.PhoneGap)&&/ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(Ja())}function XNt(){const r=typeof chrome=="object"?chrome.runtime:typeof browser=="object"?browser.runtime:void 0;return typeof r=="object"&&r.id!==void 0}function qNt(){return typeof navigator=="object"&&navigator.product==="ReactNative"}function ZNt(){const r=Ja();return r.indexOf("MSIE ")>=0||r.indexOf("Trident/")>=0}function JNt(){try{return typeof indexedDB=="object"}catch{return!1}}function tPt(){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 ePt="FirebaseError";class Oh extends Error{constructor(e,t,n){super(t),this.code=e,this.customData=n,this.name=ePt,Object.setPrototypeOf(this,Oh.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,X0.prototype.create)}}class X0{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?rPt(a,n):"Error",s=`${this.serviceName}: ${o} (${i}).`;return new Oh(i,s,n)}}function rPt(r,e){return r.replace(nPt,(t,n)=>{const i=e[n];return i!=null?String(i):`<${n}?>`})}const nPt=/\{\$([^}]+)}/g;function iPt(r){for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e))return!1;return!0}function zE(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(c6(a)&&c6(o)){if(!zE(a,o))return!1}else if(a!==o)return!1}for(const i of n)if(!t.includes(i))return!1;return!0}function c6(r){return r!==null&&typeof r=="object"}/**
* @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.
*/function q0(r){const e=[];for(const[t,n]of Object.entries(r))Array.isArray(n)?n.forEach(i=>{e.push(encodeURIComponent(t)+"="+encodeURIComponent(i))}):e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));return e.length?"&"+e.join("&"):""}function Wm(r){const e={};return r.replace(/^\?/,"").split("&").forEach(n=>{if(n){const[i,a]=n.split("=");e[decodeURIComponent(i)]=decodeURIComponent(a)}}),e}function zm(r){const e=r.indexOf("?");if(!e)return"";const t=r.indexOf("#",e);return r.substring(e,t>0?t:void 0)}function aPt(r,e){const t=new oPt(r,e);return t.subscribe.bind(t)}class oPt{constructor(e,t){this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then(()=>{e(this)}).catch(n=>{this.error(n)})}next(e){this.forEachObserver(t=>{t.next(e)})}error(e){this.forEachObserver(t=>{t.error(e)}),this.close(e)}complete(){this.forEachObserver(e=>{e.complete()}),this.close()}subscribe(e,t,n){let i;if(e===void 0&&t===void 0&&n===void 0)throw new Error("Missing Observer.");sPt(e,["next","error","complete"])?i=e:i={next:e,error:t,complete:n},i.next===void 0&&(i.next=US),i.error===void 0&&(i.error=US),i.complete===void 0&&(i.complete=US);const a=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then(()=>{try{this.finalError?i.error(this.finalError):i.complete()}catch{}}),this.observers.push(i),a}unsubscribeOne(e){this.observers===void 0||this.observers[e]===void 0||(delete this.observers[e],this.observerCount-=1,this.observerCount===0&&this.onNoObservers!==void 0&&this.onNoObservers(this))}forEachObserver(e){if(!this.finalized)for(let t=0;t<this.observers.length;t++)this.sendOne(t,e)}sendOne(e,t){this.task.then(()=>{if(this.observers!==void 0&&this.observers[e]!==void 0)try{t(this.observers[e])}catch(n){typeof console<"u"&&console.error&&console.error(n)}})}close(e){this.finalized||(this.finalized=!0,e!==void 0&&(this.finalError=e),this.task.then(()=>{this.observers=void 0,this.onNoObservers=void 0}))}}function sPt(r,e){if(typeof r!="object"||r===null)return!1;for(const t of e)if(t in r&&typeof r[t]=="function")return!0;return!1}function US(){}/**
* @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 ku(r){return r&&r._delegate?r._delegate:r}class Kg{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 yf="[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 APt{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 zNt;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(uPt(e))try{this.getOrInitializeService({instanceIdentifier:yf})}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=yf){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=yf){return this.instances.has(e)}getOptions(e=yf){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:lPt(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=yf){return this.component?this.component.multipleInstances?e:yf:e}shouldAutoInitialize(){return!!this.component&&this.component.instantiationMode!=="EXPLICIT"}}function lPt(r){return r===yf?void 0:r}function uPt(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 cPt{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 APt(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 Sn;(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"})(Sn||(Sn={}));const hPt={debug:Sn.DEBUG,verbose:Sn.VERBOSE,info:Sn.INFO,warn:Sn.WARN,error:Sn.ERROR,silent:Sn.SILENT},fPt=Sn.INFO,dPt={[Sn.DEBUG]:"log",[Sn.VERBOSE]:"log",[Sn.INFO]:"info",[Sn.WARN]:"warn",[Sn.ERROR]:"error"},pPt=(r,e,...t)=>{if(e<r.logLevel)return;const n=new Date().toISOString(),i=dPt[e];if(i)console[i](`[${n}] ${r.name}:`,...t);else throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`)};class sj{constructor(e){this.name=e,this._logLevel=fPt,this._logHandler=pPt,this._userLogHandler=null}get logLevel(){return this._logLevel}set logLevel(e){if(!(e in Sn))throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);this._logLevel=e}setLogLevel(e){this._logLevel=typeof e=="string"?hPt[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,Sn.DEBUG,...e),this._logHandler(this,Sn.DEBUG,...e)}log(...e){this._userLogHandler&&this._userLogHandler(this,Sn.VERBOSE,...e),this._logHandler(this,Sn.VERBOSE,...e)}info(...e){this._userLogHandler&&this._userLogHandler(this,Sn.INFO,...e),this._logHandler(this,Sn.INFO,...e)}warn(...e){this._userLogHandler&&this._userLogHandler(this,Sn.WARN,...e),this._logHandler(this,Sn.WARN,...e)}error(...e){this._userLogHandler&&this._userLogHandler(this,Sn.ERROR,...e),this._logHandler(this,Sn.ERROR,...e)}}const gPt=(r,e)=>e.some(t=>r instanceof t);let h6,f6;function vPt(){return h6||(h6=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function mPt(){return f6||(f6=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Aj=new WeakMap,yO=new WeakMap,lj=new WeakMap,DS=new WeakMap,kM=new WeakMap;function yPt(r){const e=new Promise((t,n)=>{const i=()=>{r.removeEventListener("success",a),r.removeEventListener("error",o)},a=()=>{t(Jc(r.result)),i()},o=()=>{n(r.error),i()};r.addEventListener("success",a),r.addEventListener("error",o)});return e.then(t=>{t instanceof IDBCursor&&Aj.set(t,r)}).catch(()=>{}),kM.set(e,r),e}function _Pt(r){if(yO.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)});yO.set(r,e)}let _O={get(r,e,t){if(r instanceof IDBTransaction){if(e==="done")return yO.get(r);if(e==="objectStoreNames")return r.objectStoreNames||lj.get(r);if(e==="store")return t.objectStoreNames[1]?void 0:t.objectStore(t.objectStoreNames[0])}return Jc(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 wPt(r){_O=r(_O)}function EPt(r){return r===IDBDatabase.prototype.transaction&&!("objectStoreNames"in IDBTransaction.prototype)?function(e,...t){const n=r.call(QS(this),e,...t);return lj.set(n,e.sort?e.sort():[e]),Jc(n)}:mPt().includes(r)?function(...e){return r.apply(QS(this),e),Jc(Aj.get(this))}:function(...e){return Jc(r.apply(QS(this),e))}}function CPt(r){return typeof r=="function"?EPt(r):(r instanceof IDBTransaction&&_Pt(r),gPt(r,vPt())?new Proxy(r,_O):r)}function Jc(r){if(r instanceof IDBRequest)return yPt(r);if(DS.has(r))return DS.get(r);const e=CPt(r);return e!==r&&(DS.set(r,e),kM.set(e,r)),e}const QS=r=>kM.get(r);function BPt(r,e,{blocked:t,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(r,e),s=Jc(o);return n&&o.addEventListener("upgradeneeded",A=>{n(Jc(o.result),A.oldVersion,A.newVersion,Jc(o.transaction))}),t&&o.addEventListener("blocked",()=>t()),s.then(A=>{a&&A.addEventListener("close",()=>a()),i&&A.addEventListener("versionchange",()=>i())}).catch(()=>{}),s}const bPt=["get","getKey","getAll","getAllKeys","count"],TPt=["put","add","delete","clear"],kS=new Map;function d6(r,e){if(!(r instanceof IDBDatabase&&!(e in r)&&typeof e=="string"))return;if(kS.get(e))return kS.get(e);const t=e.replace(/FromIndex$/,""),n=e!==t,i=TPt.includes(t);if(!(t in(n?IDBIndex:IDBObjectStore).prototype)||!(i||bPt.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 kS.set(e,a),a}wPt(r=>({...r,get:(e,t,n)=>d6(e,t)||r.get(e,t,n),has:(e,t)=>!!d6(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 SPt{constructor(e){this.container=e}getPlatformInfoString(){return this.container.getProviders().map(t=>{if(xPt(t)){const n=t.getImmediate();return`${n.library}/${n.version}`}else return null}).filter(t=>t).join(" ")}}function xPt(r){const e=r.getComponent();return(e==null?void 0:e.type)==="VERSION"}const wO="@firebase/app",p6="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 hd=new sj("@firebase/app"),IPt="@firebase/app-compat",LPt="@firebase/analytics-compat",OPt="@firebase/analytics",FPt="@firebase/app-check-compat",RPt="@firebase/app-check",MPt="@firebase/auth",NPt="@firebase/auth-compat",PPt="@firebase/database",UPt="@firebase/database-compat",DPt="@firebase/functions",QPt="@firebase/functions-compat",kPt="@firebase/installations",HPt="@firebase/installations-compat",GPt="@firebase/messaging",$Pt="@firebase/messaging-compat",VPt="@firebase/performance",jPt="@firebase/performance-compat",KPt="@firebase/remote-config",WPt="@firebase/remote-config-compat",zPt="@firebase/storage",YPt="@firebase/storage-compat",XPt="@firebase/firestore",qPt="@firebase/firestore-compat",ZPt="firebase",JPt="9.17.1";/**
* @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 EO="[DEFAULT]",t5t={[wO]:"fire-core",[IPt]:"fire-core-compat",[OPt]:"fire-analytics",[LPt]:"fire-analytics-compat",[RPt]:"fire-app-check",[FPt]:"fire-app-check-compat",[MPt]:"fire-auth",[NPt]:"fire-auth-compat",[PPt]:"fire-rtdb",[UPt]:"fire-rtdb-compat",[DPt]:"fire-fn",[QPt]:"fire-fn-compat",[kPt]:"fire-iid",[HPt]:"fire-iid-compat",[GPt]:"fire-fcm",[$Pt]:"fire-fcm-compat",[VPt]:"fire-perf",[jPt]:"fire-perf-compat",[KPt]:"fire-rc",[WPt]:"fire-rc-compat",[zPt]:"fire-gcs",[YPt]:"fire-gcs-compat",[XPt]:"fire-fst",[qPt]:"fire-fst-compat","fire-js":"fire-js",[ZPt]:"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 YE=new Map,CO=new Map;function e5t(r,e){try{r.container.addComponent(e)}catch(t){hd.debug(`Component ${e.name} failed to register with FirebaseApp ${r.name}`,t)}}function i0(r){const e=r.name;if(CO.has(e))return hd.debug(`There were multiple attempts to register component ${e}.`),!1;CO.set(e,r);for(const t of YE.values())e5t(t,r);return!0}function uj(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 r5t={["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}."},th=new X0("app","Firebase",r5t);/**
* @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 n5t{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 Kg("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 th.create("app-deleted",{appName:this._name})}}/**
* @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 HB=JPt;function cj(r,e={}){let t=r;typeof e!="object"&&(e={name:e});const n=Object.assign({name:EO,automaticDataCollectionEnabled:!1},e),i=n.name;if(typeof i!="string"||!i)throw th.create("bad-app-name",{appName:String(i)});if(t||(t=WNt()),!t)throw th.create("no-options");const a=YE.get(i);if(a){if(zE(t,a.options)&&zE(n,a.config))return a;throw th.create("duplicate-app",{appName:i})}const o=new cPt(i);for(const A of CO.values())o.addComponent(A);const s=new n5t(t,n,o);return YE.set(i,s),s}function i5t(r=EO){const e=YE.get(r);if(!e&&r===EO)return cj();if(!e)throw th.create("no-app",{appName:r});return e}function Eg(r,e,t){var n;let i=(n=t5t[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 "/")`),hd.warn(s.join(" "));return}i0(new Kg(`${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 a5t="firebase-heartbeat-database",o5t=1,a0="firebase-heartbeat-store";let HS=null;function hj(){return HS||(HS=BPt(a5t,o5t,{upgrade:(r,e)=>{switch(e){case 0:r.createObjectStore(a0)}}}).catch(r=>{throw th.create("idb-open",{originalErrorMessage:r.message})})),HS}async function s5t(r){try{return(await hj()).transaction(a0).objectStore(a0).get(fj(r))}catch(e){if(e instanceof Oh)hd.warn(e.message);else{const t=th.create("idb-get",{originalErrorMessage:e==null?void 0:e.message});hd.warn(t.message)}}}async function g6(r,e){try{const n=(await hj()).transaction(a0,"readwrite");return await n.objectStore(a0).put(e,fj(r)),n.done}catch(t){if(t instanceof Oh)hd.warn(t.message);else{const n=th.create("idb-set",{originalErrorMessage:t==null?void 0:t.message});hd.warn(n.message)}}}function fj(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 A5t=1024,l5t=30*24*60*60*1e3;class u5t{constructor(e){this.container=e,this._heartbeatsCache=null;const t=this.container.getProvider("app").getImmediate();this._storage=new h5t(t),this._heartbeatsCachePromise=this._storage.read().then(n=>(this._heartbeatsCache=n,n))}async triggerHeartbeat(){const t=this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(),n=v6();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<=l5t}),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=v6(),{heartbeatsToSend:t,unsentEntries:n}=c5t(this._heartbeatsCache.heartbeats),i=nj(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 v6(){return new Date().toISOString().substring(0,10)}function c5t(r,e=A5t){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),m6(t)>e){a.dates.pop();break}}else if(t.push({agent:i.agent,dates:[i.date]}),m6(t)>e){t.pop();break}n=n.slice(1)}return{heartbeatsToSend:t,unsentEntries:n}}class h5t{constructor(e){this.app=e,this._canUseIndexedDBPromise=this.runIndexedDBEnvironmentCheck()}async runIndexedDBEnvironmentCheck(){return JNt()?tPt().then(()=>!0).catch(()=>!1):!1}async read(){return await this._canUseIndexedDBPromise?await s5t(this.app)||{heartbeats:[]}:{heartbeats:[]}}async overwrite(e){var t;if(await this._canUseIndexedDBPromise){const i=await this.read();return g6(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 g6(this.app,{lastSentHeartbeatDate:(t=e.lastSentHeartbeatDate)!==null&&t!==void 0?t:i.lastSentHeartbeatDate,heartbeats:[...i.heartbeats,...e.heartbeats]})}else return}}function m6(r){return nj(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 f5t(r){i0(new Kg("platform-logger",e=>new SPt(e),"PRIVATE")),i0(new Kg("heartbeat",e=>new u5t(e),"PRIVATE")),Eg(wO,p6,r),Eg(wO,p6,"esm2017"),Eg("fire-js","")}f5t("");function HM(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]]);return t}function dj(){return{["dependent-sdk-initialized-before-auth"]:"Another Firebase SDK was initialized and is trying to use Auth before Auth is initialized. Please be sure to call `initializeAuth` or `getAuth` before starting any other Firebase SDK."}}const d5t=dj,pj=new X0("auth","Firebase",dj());/**
* @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 y6=new sj("@firebase/auth");function Tw(r,...e){y6.logLevel<=Sn.ERROR&&y6.error(`Auth (${HB}): ${r}`,...e)}/**
* @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 EA(r,...e){throw GM(r,...e)}function hl(r,...e){return GM(r,...e)}function p5t(r,e,t){const n=Object.assign(Object.assign({},d5t()),{[e]:t});return new X0("auth","Firebase",n).create(e,{appName:r.name})}function GM(r,...e){if(typeof r!="string"){const t=e[0],n=[...e.slice(1)];return n[0]&&(n[0].appName=r.name),r._errorFactory.create(t,...n)}return pj.create(r,...e)}function er(r,e,...t){if(!r)throw GM(e,...t)}function uu(r){const e="INTERNAL ASSERTION FAILED: "+r;throw Tw(e),new Error(e)}function Iu(r,e){r||uu(e)}/**
* @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 _6=new Map;function cu(r){Iu(r instanceof Function,"Expected a class definition");let e=_6.get(r);return e?(Iu(e instanceof r,"Instance stored in cache mismatched with class"),e):(e=new r,_6.set(r,e),e)}/**
* @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 g5t(r,e){const t=uj(r,"auth");if(t.isInitialized()){const i=t.getImmediate(),a=t.getOptions();if(zE(a,e??{}))return i;EA(i,"already-initialized")}return t.initialize({options:e})}function v5t(r,e){const t=(e==null?void 0:e.persistence)||[],n=(Array.isArray(t)?t:[t]).map(cu);e!=null&&e.errorMap&&r._updateErrorMap(e.errorMap),r._initializeWithPersistence(n,e==null?void 0:e.popupRedirectResolver)}/**
* @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 BO(){var r;return typeof self<"u"&&((r=self.location)===null||r===void 0?void 0:r.href)||""}function m5t(){return w6()==="http:"||w6()==="https:"}function w6(){var r;return typeof self<"u"&&((r=self.location)===null||r===void 0?void 0:r.protocol)||null}/**
* @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 y5t(){return typeof navigator<"u"&&navigator&&"onLine"in navigator&&typeof navigator.onLine=="boolean"&&(m5t()||XNt()||"connection"in navigator)?navigator.onLine:!0}function _5t(){if(typeof navigator>"u")return null;const r=navigator;return r.languages&&r.languages[0]||r.language||null}/**
* @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.
*/class Z0{constructor(e,t){this.shortDelay=e,this.longDelay=t,Iu(t>e,"Short delay should be less than long delay!"),this.isMobile=YNt()||qNt()}get(){return y5t()?this.isMobile?this.longDelay:this.shortDelay:Math.min(5e3,this.shortDelay)}}/**
* @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 $M(r,e){Iu(r.emulator,"Emulator should always be set here");const{url:t}=r.emulator;return e?`${t}${e.startsWith("/")?e.slice(1):e}`:t}/**
* @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.
*/class gj{static initialize(e,t,n){this.fetchImpl=e,t&&(this.headersImpl=t),n&&(this.responseImpl=n)}static fetch(){if(this.fetchImpl)return this.fetchImpl;if(typeof self<"u"&&"fetch"in self)return self.fetch;uu("Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static headers(){if(this.headersImpl)return this.headersImpl;if(typeof self<"u"&&"Headers"in self)return self.Headers;uu("Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}static response(){if(this.responseImpl)return this.responseImpl;if(typeof self<"u"&&"Response"in self)return self.Response;uu("Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill")}}/**
* @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 w5t={CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_PASSWORD:"wrong-password",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_REQ_TYPE:"internal-error",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",INVALID_CODE:"invalid-verification-code",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_SESSION_INFO:"missing-verification-id",SESSION_EXPIRED:"code-expired",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",BLOCKING_FUNCTION_ERROR_RESPONSE:"internal-error"};/**
* @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 E5t=new Z0(3e4,6e4);function J0(r,e){return r.tenantId&&!e.tenantId?Object.assign(Object.assign({},e),{tenantId:r.tenantId}):e}async function t_(r,e,t,n,i={}){return vj(r,i,async()=>{let a={},o={};n&&(e==="GET"?o=n:a={body:JSON.stringify(n)});const s=q0(Object.assign({key:r.config.apiKey},o)).slice(1),A=await r._getAdditionalHeaders();return A["Content-Type"]="application/json",r.languageCode&&(A["X-Firebase-Locale"]=r.languageCode),gj.fetch()(mj(r,r.config.apiHost,t,s),Object.assign({method:e,headers:A,referrerPolicy:"no-referrer"},a))})}async function vj(r,e,t){r._canInitEmulator=!1;const n=Object.assign(Object.assign({},w5t),e);try{const i=new C5t(r),a=await Promise.race([t(),i.promise]);i.clearNetworkTimeout();const o=await a.json();if("needConfirmation"in o)throw X1(r,"account-exists-with-different-credential",o);if(a.ok&&!("errorMessage"in o))return o;{const s=a.ok?o.errorMessage:o.error.message,[A,l]=s.split(" : ");if(A==="FEDERATED_USER_ID_ALREADY_LINKED")throw X1(r,"credential-already-in-use",o);if(A==="EMAIL_EXISTS")throw X1(r,"email-already-in-use",o);if(A==="USER_DISABLED")throw X1(r,"user-disabled",o);const u=n[A]||A.toLowerCase().replace(/[_\s]+/g,"-");if(l)throw p5t(r,u,l);EA(r,u)}}catch(i){if(i instanceof Oh)throw i;EA(r,"network-request-failed")}}async function e_(r,e,t,n,i={}){const a=await t_(r,e,t,n,i);return"mfaPendingCredential"in a&&EA(r,"multi-factor-auth-required",{_serverResponse:a}),a}function mj(r,e,t,n){const i=`${e}${t}?${n}`;return r.config.emulator?$M(r.config,i):`${r.config.apiScheme}://${i}`}class C5t{constructor(e){this.auth=e,this.timer=null,this.promise=new Promise((t,n)=>{this.timer=setTimeout(()=>n(hl(this.auth,"network-request-failed")),E5t.get())})}clearNetworkTimeout(){clearTimeout(this.timer)}}function X1(r,e,t){const n={appName:r.name};t.email&&(n.email=t.email),t.phoneNumber&&(n.phoneNumber=t.phoneNumber);const i=hl(r,e,n);return i.customData._tokenResponse=t,i}/**
* @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.
*/async function B5t(r,e){return t_(r,"POST","/v1/accounts:delete",e)}async function b5t(r,e){return t_(r,"POST","/v1/accounts:lookup",e)}/**
* @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 wy(r){if(r)try{const e=new Date(Number(r));if(!isNaN(e.getTime()))return e.toUTCString()}catch{}}async function T5t(r,e=!1){const t=ku(r),n=await t.getIdToken(e),i=VM(n);er(i&&i.exp&&i.auth_time&&i.iat,t.auth,"internal-error");const a=typeof i.firebase=="object"?i.firebase:void 0,o=a==null?void 0:a.sign_in_provider;return{claims:i,token:n,authTime:wy(GS(i.auth_time)),issuedAtTime:wy(GS(i.iat)),expirationTime:wy(GS(i.exp)),signInProvider:o||null,signInSecondFactor:(a==null?void 0:a.sign_in_second_factor)||null}}function GS(r){return Number(r)*1e3}function VM(r){const[e,t,n]=r.split(".");if(e===void 0||t===void 0||n===void 0)return Tw("JWT malformed, contained fewer than 3 sections"),null;try{const i=ij(t);return i?JSON.parse(i):(Tw("Failed to decode base64 JWT payload"),null)}catch(i){return Tw("Caught error parsing JWT payload as JSON",i==null?void 0:i.toString()),null}}function S5t(r){const e=VM(r);return er(e,"internal-error"),er(typeof e.exp<"u","internal-error"),er(typeof e.iat<"u","internal-error"),Number(e.exp)-Number(e.iat)}/**
* @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.
*/async function o0(r,e,t=!1){if(t)return e;try{return await e}catch(n){throw n instanceof Oh&&x5t(n)&&r.auth.currentUser===r&&await r.auth.signOut(),n}}function x5t({code:r}){return r==="auth/user-disabled"||r==="auth/user-token-expired"}/**
* @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.
*/class I5t{constructor(e){this.user=e,this.isRunning=!1,this.timerId=null,this.errorBackoff=3e4}_start(){this.isRunning||(this.isRunning=!0,this.schedule())}_stop(){this.isRunning&&(this.isRunning=!1,this.timerId!==null&&clearTimeout(this.timerId))}getInterval(e){var t;if(e){const n=this.errorBackoff;return this.errorBackoff=Math.min(this.errorBackoff*2,96e4),n}else{this.errorBackoff=3e4;const i=((t=this.user.stsTokenManager.expirationTime)!==null&&t!==void 0?t:0)-Date.now()-3e5;return Math.max(0,i)}}schedule(e=!1){if(!this.isRunning)return;const t=this.getInterval(e);this.timerId=setTimeout(async()=>{await this.iteration()},t)}async iteration(){try{await this.user.getIdToken(!0)}catch(e){(e==null?void 0:e.code)==="auth/network-request-failed"&&this.schedule(!0);return}this.schedule()}}/**
* @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.
*/class yj{constructor(e,t){this.createdAt=e,this.lastLoginAt=t,this._initializeTime()}_initializeTime(){this.lastSignInTime=wy(this.lastLoginAt),this.creationTime=wy(this.createdAt)}_copy(e){this.createdAt=e.createdAt,this.lastLoginAt=e.lastLoginAt,this._initializeTime()}toJSON(){return{createdAt:this.createdAt,lastLoginAt:this.lastLoginAt}}}/**
* @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.
*/async function XE(r){var e;const t=r.auth,n=await r.getIdToken(),i=await o0(r,b5t(t,{idToken:n}));er(i==null?void 0:i.users.length,t,"internal-error");const a=i.users[0];r._notifyReloadListener(a);const o=!((e=a.providerUserInfo)===null||e===void 0)&&e.length?F5t(a.providerUserInfo):[],s=O5t(r.providerData,o),A=r.isAnonymous,l=!(r.email&&a.passwordHash)&&!(s!=null&&s.length),u=A?l:!1,c={uid:a.localId,displayName:a.displayName||null,photoURL:a.photoUrl||null,email:a.email||null,emailVerified:a.emailVerified||!1,phoneNumber:a.phoneNumber||null,tenantId:a.tenantId||null,providerData:s,metadata:new yj(a.createdAt,a.lastLoginAt),isAnonymous:u};Object.assign(r,c)}async function L5t(r){const e=ku(r);await XE(e),await e.auth._persistUserIfCurrent(e),e.auth._notifyListenersIfCurrent(e)}function O5t(r,e){return[...r.filter(n=>!e.some(i=>i.providerId===n.providerId)),...e]}function F5t(r){return r.map(e=>{var{providerId:t}=e,n=HM(e,["providerId"]);return{providerId:t,uid:n.rawId||"",displayName:n.displayName||null,email:n.email||null,phoneNumber:n.phoneNumber||null,photoURL:n.photoUrl||null}})}/**
* @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.
*/async function R5t(r,e){const t=await vj(r,{},async()=>{const n=q0({grant_type:"refresh_token",refresh_token:e}).slice(1),{tokenApiHost:i,apiKey:a}=r.config,o=mj(r,i,"/v1/token",`key=${a}`),s=await r._getAdditionalHeaders();return s["Content-Type"]="application/x-www-form-urlencoded",gj.fetch()(o,{method:"POST",headers:s,body:n})});return{accessToken:t.access_token,expiresIn:t.expires_in,refreshToken:t.refresh_token}}/**
* @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.
*/class s0{constructor(){this.refreshToken=null,this.accessToken=null,this.expirationTime=null}get isExpired(){return!this.expirationTime||Date.now()>this.expirationTime-3e4}updateFromServerResponse(e){er(e.idToken,"internal-error"),er(typeof e.idToken<"u","internal-error"),er(typeof e.refreshToken<"u","internal-error");const t="expiresIn"in e&&typeof e.expiresIn<"u"?Number(e.expiresIn):S5t(e.idToken);this.updateTokensAndExpiration(e.idToken,e.refreshToken,t)}async getToken(e,t=!1){return er(!this.accessToken||this.refreshToken,e,"user-token-expired"),!t&&this.accessToken&&!this.isExpired?this.accessToken:this.refreshToken?(await this.refresh(e,this.refreshToken),this.accessToken):null}clearRefreshToken(){this.refreshToken=null}async refresh(e,t){const{accessToken:n,refreshToken:i,expiresIn:a}=await R5t(e,t);this.updateTokensAndExpiration(n,i,Number(a))}updateTokensAndExpiration(e,t,n){this.refreshToken=t||null,this.accessToken=e||null,this.expirationTime=Date.now()+n*1e3}static fromJSON(e,t){const{refreshToken:n,accessToken:i,expirationTime:a}=t,o=new s0;return n&&(er(typeof n=="string","internal-error",{appName:e}),o.refreshToken=n),i&&(er(typeof i=="string","internal-error",{appName:e}),o.accessToken=i),a&&(er(typeof a=="number","internal-error",{appName:e}),o.expirationTime=a),o}toJSON(){return{refreshToken:this.refreshToken,accessToken:this.accessToken,expirationTime:this.expirationTime}}_assign(e){this.accessToken=e.accessToken,this.refreshToken=e.refreshToken,this.expirationTime=e.expirationTime}_clone(){return Object.assign(new s0,this.toJSON())}_performRefresh(){return uu("not implemented")}}/**
* @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 wc(r,e){er(typeof r=="string"||typeof r>"u","internal-error",{appName:e})}class zf{constructor(e){var{uid:t,auth:n,stsTokenManager:i}=e,a=HM(e,["uid","auth","stsTokenManager"]);this.providerId="firebase",this.proactiveRefresh=new I5t(this),this.reloadUserInfo=null,this.reloadListener=null,this.uid=t,this.auth=n,this.stsTokenManager=i,this.accessToken=i.accessToken,this.displayName=a.displayName||null,this.email=a.email||null,this.emailVerified=a.emailVerified||!1,this.phoneNumber=a.phoneNumber||null,this.photoURL=a.photoURL||null,this.isAnonymous=a.isAnonymous||!1,this.tenantId=a.tenantId||null,this.providerData=a.providerData?[...a.providerData]:[],this.metadata=new yj(a.createdAt||void 0,a.lastLoginAt||void 0)}async getIdToken(e){const t=await o0(this,this.stsTokenManager.getToken(this.auth,e));return er(t,this.auth,"internal-error"),this.accessToken!==t&&(this.accessToken=t,await this.auth._persistUserIfCurrent(this),this.auth._notifyListenersIfCurrent(this)),t}getIdTokenResult(e){return T5t(this,e)}reload(){return L5t(this)}_assign(e){this!==e&&(er(this.uid===e.uid,this.auth,"internal-error"),this.displayName=e.displayName,this.photoURL=e.photoURL,this.email=e.email,this.emailVerified=e.emailVerified,this.phoneNumber=e.phoneNumber,this.isAnonymous=e.isAnonymous,this.tenantId=e.tenantId,this.providerData=e.providerData.map(t=>Object.assign({},t)),this.metadata._copy(e.metadata),this.stsTokenManager._assign(e.stsTokenManager))}_clone(e){return new zf(Object.assign(Object.assign({},this),{auth:e,stsTokenManager:this.stsTokenManager._clone()}))}_onReload(e){er(!this.reloadListener,this.auth,"internal-error"),this.reloadListener=e,this.reloadUserInfo&&(this._notifyReloadListener(this.reloadUserInfo),this.reloadUserInfo=null)}_notifyReloadListener(e){this.reloadListener?this.reloadListener(e):this.reloadUserInfo=e}_startProactiveRefresh(){this.proactiveRefresh._start()}_stopProactiveRefresh(){this.proactiveRefresh._stop()}async _updateTokensIfNecessary(e,t=!1){let n=!1;e.idToken&&e.idToken!==this.stsTokenManager.accessToken&&(this.stsTokenManager.updateFromServerResponse(e),n=!0),t&&await XE(this),await this.auth._persistUserIfCurrent(this),n&&this.auth._notifyListenersIfCurrent(this)}async delete(){const e=await this.getIdToken();return await o0(this,B5t(this.auth,{idToken:e})),this.stsTokenManager.clearRefreshToken(),this.auth.signOut()}toJSON(){return Object.assign(Object.assign({uid:this.uid,email:this.email||void 0,emailVerified:this.emailVerified,displayName:this.displayName||void 0,isAnonymous:this.isAnonymous,photoURL:this.photoURL||void 0,phoneNumber:this.phoneNumber||void 0,tenantId:this.tenantId||void 0,providerData:this.providerData.map(e=>Object.assign({},e)),stsTokenManager:this.stsTokenManager.toJSON(),_redirectEventId:this._redirectEventId},this.metadata.toJSON()),{apiKey:this.auth.config.apiKey,appName:this.auth.name})}get refreshToken(){return this.stsTokenManager.refreshToken||""}static _fromJSON(e,t){var n,i,a,o,s,A,l,u;const c=(n=t.displayName)!==null&&n!==void 0?n:void 0,h=(i=t.email)!==null&&i!==void 0?i:void 0,f=(a=t.phoneNumber)!==null&&a!==void 0?a:void 0,d=(o=t.photoURL)!==null&&o!==void 0?o:void 0,g=(s=t.tenantId)!==null&&s!==void 0?s:void 0,m=(A=t._redirectEventId)!==null&&A!==void 0?A:void 0,v=(l=t.createdAt)!==null&&l!==void 0?l:void 0,y=(u=t.lastLoginAt)!==null&&u!==void 0?u:void 0,{uid:w,emailVerified:C,isAnonymous:O,providerData:F,stsTokenManager:I}=t;er(w&&I,e,"internal-error");const T=s0.fromJSON(this.name,I);er(typeof w=="string",e,"internal-error"),wc(c,e.name),wc(h,e.name),er(typeof C=="boolean",e,"internal-error"),er(typeof O=="boolean",e,"internal-error"),wc(f,e.name),wc(d,e.name),wc(g,e.name),wc(m,e.name),wc(v,e.name),wc(y,e.name);const L=new zf({uid:w,auth:e,email:h,emailVerified:C,displayName:c,isAnonymous:O,photoURL:d,phoneNumber:f,tenantId:g,stsTokenManager:T,createdAt:v,lastLoginAt:y});return F&&Array.isArray(F)&&(L.providerData=F.map(N=>Object.assign({},N))),m&&(L._redirectEventId=m),L}static async _fromIdTokenResponse(e,t,n=!1){const i=new s0;i.updateFromServerResponse(t);const a=new zf({uid:t.localId,auth:e,stsTokenManager:i,isAnonymous:n});return await XE(a),a}}/**
* @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 _j{constructor(){this.type="NONE",this.storage={}}async _isAvailable(){return!0}async _set(e,t){this.storage[e]=t}async _get(e){const t=this.storage[e];return t===void 0?null:t}async _remove(e){delete this.storage[e]}_addListener(e,t){}_removeListener(e,t){}}_j.type="NONE";const E6=_j;/**
* @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 Sw(r,e,t){return`firebase:${r}:${e}:${t}`}class Cg{constructor(e,t,n){this.persistence=e,this.auth=t,this.userKey=n;const{config:i,name:a}=this.auth;this.fullUserKey=Sw(this.userKey,i.apiKey,a),this.fullPersistenceKey=Sw("persistence",i.apiKey,a),this.boundEventHandler=t._onStorageEvent.bind(t),this.persistence._addListener(this.fullUserKey,this.boundEventHandler)}setCurrentUser(e){return this.persistence._set(this.fullUserKey,e.toJSON())}async getCurrentUser(){const e=await this.persistence._get(this.fullUserKey);return e?zf._fromJSON(this.auth,e):null}removeCurrentUser(){return this.persistence._remove(this.fullUserKey)}savePersistenceForRedirect(){return this.persistence._set(this.fullPersistenceKey,this.persistence.type)}async setPersistence(e){if(this.persistence===e)return;const t=await this.getCurrentUser();if(await this.removeCurrentUser(),this.persistence=e,t)return this.setCurrentUser(t)}delete(){this.persistence._removeListener(this.fullUserKey,this.boundEventHandler)}static async create(e,t,n="authUser"){if(!t.length)return new Cg(cu(E6),e,n);const i=(await Promise.all(t.map(async l=>{if(await l._isAvailable())return l}))).filter(l=>l);let a=i[0]||cu(E6);const o=Sw(n,e.config.apiKey,e.name);let s=null;for(const l of t)try{const u=await l._get(o);if(u){const c=zf._fromJSON(e,u);l!==a&&(s=c),a=l;break}}catch{}const A=i.filter(l=>l._shouldAllowMigration);return!a._shouldAllowMigration||!A.length?new Cg(a,e,n):(a=A[0],s&&await a._set(o,s.toJSON()),await Promise.all(t.map(async l=>{if(l!==a)try{await l._remove(o)}catch{}})),new Cg(a,e,n))}}/**
* @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 C6(r){const e=r.toLowerCase();if(e.includes("opera/")||e.includes("opr/")||e.includes("opios/"))return"Opera";if(Cj(e))return"IEMobile";if(e.includes("msie")||e.includes("trident/"))return"IE";if(e.includes("edge/"))return"Edge";if(wj(e))return"Firefox";if(e.includes("silk/"))return"Silk";if(bj(e))return"Blackberry";if(Tj(e))return"Webos";if(jM(e))return"Safari";if((e.includes("chrome/")||Ej(e))&&!e.includes("edge/"))return"Chrome";if(Bj(e))return"Android";{const t=/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/,n=r.match(t);if((n==null?void 0:n.length)===2)return n[1]}return"Other"}function wj(r=Ja()){return/firefox\//i.test(r)}function jM(r=Ja()){const e=r.toLowerCase();return e.includes("safari/")&&!e.includes("chrome/")&&!e.includes("crios/")&&!e.includes("android")}function Ej(r=Ja()){return/crios\//i.test(r)}function Cj(r=Ja()){return/iemobile/i.test(r)}function Bj(r=Ja()){return/android/i.test(r)}function bj(r=Ja()){return/blackberry/i.test(r)}function Tj(r=Ja()){return/webos/i.test(r)}function GB(r=Ja()){return/iphone|ipad|ipod/i.test(r)||/macintosh/i.test(r)&&/mobile/i.test(r)}function M5t(r=Ja()){var e;return GB(r)&&!!(!((e=window.navigator)===null||e===void 0)&&e.standalone)}function N5t(){return ZNt()&&document.documentMode===10}function Sj(r=Ja()){return GB(r)||Bj(r)||Tj(r)||bj(r)||/windows phone/i.test(r)||Cj(r)}function P5t(){try{return!!(window&&window!==window.top)}catch{return!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.
*/function xj(r,e=[]){let t;switch(r){case"Browser":t=C6(Ja());break;case"Worker":t=`${C6(Ja())}-${r}`;break;default:t=r}const n=e.length?e.join(","):"FirebaseCore-web";return`${t}/JsCore/${HB}/${n}`}/**
* @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.
*/class U5t{constructor(e){this.auth=e,this.queue=[]}pushCallback(e,t){const n=a=>new Promise((o,s)=>{try{const A=e(a);o(A)}catch(A){s(A)}});n.onAbort=t,this.queue.push(n);const i=this.queue.length-1;return()=>{this.queue[i]=()=>Promise.resolve()}}async runMiddleware(e){if(this.auth.currentUser===e)return;const t=[];try{for(const n of this.queue)await n(e),n.onAbort&&t.push(n.onAbort)}catch(n){t.reverse();for(const i of t)try{i()}catch{}throw this.auth._errorFactory.create("login-blocked",{originalMessage:n==null?void 0:n.message})}}}/**
* @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.
*/class D5t{constructor(e,t,n){this.app=e,this.heartbeatServiceProvider=t,this.config=n,this.currentUser=null,this.emulatorConfig=null,this.operations=Promise.resolve(),this.authStateSubscription=new B6(this),this.idTokenSubscription=new B6(this),this.beforeStateQueue=new U5t(this),this.redirectUser=null,this.isProactiveRefreshEnabled=!1,this._canInitEmulator=!0,this._isInitialized=!1,this._deleted=!1,this._initializationPromise=null,this._popupRedirectResolver=null,this._errorFactory=pj,this.lastNotifiedUid=void 0,this.languageCode=null,this.tenantId=null,this.settings={appVerificationDisabledForTesting:!1},this.frameworks=[],this.name=e.name,this.clientVersion=n.sdkClientVersion}_initializeWithPersistence(e,t){return t&&(this._popupRedirectResolver=cu(t)),this._initializationPromise=this.queue(async()=>{var n,i;if(!this._deleted&&(this.persistenceManager=await Cg.create(this,e),!this._deleted)){if(!((n=this._popupRedirectResolver)===null||n===void 0)&&n._shouldInitProactively)try{await this._popupRedirectResolver._initialize(this)}catch{}await this.initializeCurrentUser(t),this.lastNotifiedUid=((i=this.currentUser)===null||i===void 0?void 0:i.uid)||null,!this._deleted&&(this._isInitialized=!0)}}),this._initializationPromise}async _onStorageEvent(){if(this._deleted)return;const e=await this.assertedPersistence.getCurrentUser();if(!(!this.currentUser&&!e)){if(this.currentUser&&e&&this.currentUser.uid===e.uid){this._currentUser._assign(e),await this.currentUser.getIdToken();return}await this._updateCurrentUser(e,!0)}}async initializeCurrentUser(e){var t;const n=await this.assertedPersistence.getCurrentUser();let i=n,a=!1;if(e&&this.config.authDomain){await this.getOrInitRedirectPersistenceManager();const o=(t=this.redirectUser)===null||t===void 0?void 0:t._redirectEventId,s=i==null?void 0:i._redirectEventId,A=await this.tryRedirectSignIn(e);(!o||o===s)&&(A!=null&&A.user)&&(i=A.user,a=!0)}if(!i)return this.directlySetCurrentUser(null);if(!i._redirectEventId){if(a)try{await this.beforeStateQueue.runMiddleware(i)}catch(o){i=n,this._popupRedirectResolver._overrideRedirectResult(this,()=>Promise.reject(o))}return i?this.reloadAndSetCurrentUserOrClear(i):this.directlySetCurrentUser(null)}return er(this._popupRedirectResolver,this,"argument-error"),await this.getOrInitRedirectPersistenceManager(),this.redirectUser&&this.redirectUser._redirectEventId===i._redirectEventId?this.directlySetCurrentUser(i):this.reloadAndSetCurrentUserOrClear(i)}async tryRedirectSignIn(e){let t=null;try{t=await this._popupRedirectResolver._completeRedirectFn(this,e,!0)}catch{await this._setRedirectUser(null)}return t}async reloadAndSetCurrentUserOrClear(e){try{await XE(e)}catch(t){if((t==null?void 0:t.code)!=="auth/network-request-failed")return this.directlySetCurrentUser(null)}return this.directlySetCurrentUser(e)}useDeviceLanguage(){this.languageCode=_5t()}async _delete(){this._deleted=!0}async updateCurrentUser(e){const t=e?ku(e):null;return t&&er(t.auth.config.apiKey===this.config.apiKey,this,"invalid-user-token"),this._updateCurrentUser(t&&t._clone(this))}async _updateCurrentUser(e,t=!1){if(!this._deleted)return e&&er(this.tenantId===e.tenantId,this,"tenant-id-mismatch"),t||await this.beforeStateQueue.runMiddleware(e),this.queue(async()=>{await this.directlySetCurrentUser(e),this.notifyAuthListeners()})}async signOut(){return await this.beforeStateQueue.runMiddleware(null),(this.redirectPersistenceManager||this._popupRedirectResolver)&&await this._setRedirectUser(null),this._updateCurrentUser(null,!0)}setPersistence(e){return this.queue(async()=>{await this.assertedPersistence.setPersistence(cu(e))})}_getPersistence(){return this.assertedPersistence.persistence.type}_updateErrorMap(e){this._errorFactory=new X0("auth","Firebase",e())}onAuthStateChanged(e,t,n){return this.registerStateListener(this.authStateSubscription,e,t,n)}beforeAuthStateChanged(e,t){return this.beforeStateQueue.pushCallback(e,t)}onIdTokenChanged(e,t,n){return this.registerStateListener(this.idTokenSubscription,e,t,n)}toJSON(){var e;return{apiKey:this.config.apiKey,authDomain:this.config.authDomain,appName:this.name,currentUser:(e=this._currentUser)===null||e===void 0?void 0:e.toJSON()}}async _setRedirectUser(e,t){const n=await this.getOrInitRedirectPersistenceManager(t);return e===null?n.removeCurrentUser():n.setCurrentUser(e)}async getOrInitRedirectPersistenceManager(e){if(!this.redirectPersistenceManager){const t=e&&cu(e)||this._popupRedirectResolver;er(t,this,"argument-error"),this.redirectPersistenceManager=await Cg.create(this,[cu(t._redirectPersistence)],"redirectUser"),this.redirectUser=await this.redirectPersistenceManager.getCurrentUser()}return this.redirectPersistenceManager}async _redirectUserForId(e){var t,n;return this._isInitialized&&await this.queue(async()=>{}),((t=this._currentUser)===null||t===void 0?void 0:t._redirectEventId)===e?this._currentUser:((n=this.redirectUser)===null||n===void 0?void 0:n._redirectEventId)===e?this.redirectUser:null}async _persistUserIfCurrent(e){if(e===this.currentUser)return this.queue(async()=>this.directlySetCurrentUser(e))}_notifyListenersIfCurrent(e){e===this.currentUser&&this.notifyAuthListeners()}_key(){return`${this.config.authDomain}:${this.config.apiKey}:${this.name}`}_startProactiveRefresh(){this.isProactiveRefreshEnabled=!0,this.currentUser&&this._currentUser._startProactiveRefresh()}_stopProactiveRefresh(){this.isProactiveRefreshEnabled=!1,this.currentUser&&this._currentUser._stopProactiveRefresh()}get _currentUser(){return this.currentUser}notifyAuthListeners(){var e,t;if(!this._isInitialized)return;this.idTokenSubscription.next(this.currentUser);const n=(t=(e=this.currentUser)===null||e===void 0?void 0:e.uid)!==null&&t!==void 0?t:null;this.lastNotifiedUid!==n&&(this.lastNotifiedUid=n,this.authStateSubscription.next(this.currentUser))}registerStateListener(e,t,n,i){if(this._deleted)return()=>{};const a=typeof t=="function"?t:t.next.bind(t),o=this._isInitialized?Promise.resolve():this._initializationPromise;return er(o,this,"internal-error"),o.then(()=>a(this.currentUser)),typeof t=="function"?e.addObserver(t,n,i):e.addObserver(t)}async directlySetCurrentUser(e){this.currentUser&&this.currentUser!==e&&this._currentUser._stopProactiveRefresh(),e&&this.isProactiveRefreshEnabled&&e._startProactiveRefresh(),this.currentUser=e,e?await this.assertedPersistence.setCurrentUser(e):await this.assertedPersistence.removeCurrentUser()}queue(e){return this.operations=this.operations.then(e,e),this.operations}get assertedPersistence(){return er(this.persistenceManager,this,"internal-error"),this.persistenceManager}_logFramework(e){!e||this.frameworks.includes(e)||(this.frameworks.push(e),this.frameworks.sort(),this.clientVersion=xj(this.config.clientPlatform,this._getFrameworks()))}_getFrameworks(){return this.frameworks}async _getAdditionalHeaders(){var e;const t={["X-Client-Version"]:this.clientVersion};this.app.options.appId&&(t["X-Firebase-gmpid"]=this.app.options.appId);const n=await((e=this.heartbeatServiceProvider.getImmediate({optional:!0}))===null||e===void 0?void 0:e.getHeartbeatsHeader());return n&&(t["X-Firebase-Client"]=n),t}}function r_(r){return ku(r)}class B6{constructor(e){this.auth=e,this.observer=null,this.addObserver=aPt(t=>this.observer=t)}get next(){return er(this.observer,this.auth,"internal-error"),this.observer.next.bind(this.observer)}}function Q5t(r,e,t){const n=r_(r);er(n._canInitEmulator,n,"emulator-config-failed"),er(/^https?:\/\//.test(e),n,"invalid-emulator-scheme");const i=!!(t!=null&&t.disableWarnings),a=Ij(e),{host:o,port:s}=k5t(e),A=s===null?"":`:${s}`;n.config.emulator={url:`${a}//${o}${A}/`},n.settings.appVerificationDisabledForTesting=!0,n.emulatorConfig=Object.freeze({host:o,port:s,protocol:a.replace(":",""),options:Object.freeze({disableWarnings:i})}),i||H5t()}function Ij(r){const e=r.indexOf(":");return e<0?"":r.substr(0,e+1)}function k5t(r){const e=Ij(r),t=/(\/\/)?([^?#/]+)/.exec(r.substr(e.length));if(!t)return{host:"",port:null};const n=t[2].split("@").pop()||"",i=/^(\[[^\]]+\])(:|$)/.exec(n);if(i){const a=i[1];return{host:a,port:b6(n.substr(a.length+1))}}else{const[a,o]=n.split(":");return{host:a,port:b6(o)}}}function b6(r){if(!r)return null;const e=Number(r);return isNaN(e)?null:e}function H5t(){function r(){const e=document.createElement("p"),t=e.style;e.innerText="Running in emulator mode. Do not use with production credentials.",t.position="fixed",t.width="100%",t.backgroundColor="#ffffff",t.border=".1em solid #000000",t.color="#b50000",t.bottom="0px",t.left="0px",t.margin="0px",t.zIndex="10000",t.textAlign="center",e.classList.add("firebase-emulator-warning"),document.body.appendChild(e)}typeof console<"u"&&typeof console.info=="function"&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only. Do not use with production credentials."),typeof window<"u"&&typeof document<"u"&&(document.readyState==="loading"?window.addEventListener("DOMContentLoaded",r):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.
*/class KM{constructor(e,t){this.providerId=e,this.signInMethod=t}toJSON(){return uu("not implemented")}_getIdTokenResponse(e){return uu("not implemented")}_linkToIdToken(e,t){return uu("not implemented")}_getReauthenticationResolver(e){return uu("not implemented")}}async function G5t(r,e){return t_(r,"POST","/v1/accounts:update",e)}/**
* @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.
*/async function $5t(r,e){return e_(r,"POST","/v1/accounts:signInWithPassword",J0(r,e))}/**
* @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.
*/async function V5t(r,e){return e_(r,"POST","/v1/accounts:signInWithEmailLink",J0(r,e))}async function j5t(r,e){return e_(r,"POST","/v1/accounts:signInWithEmailLink",J0(r,e))}/**
* @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.
*/class A0 extends KM{constructor(e,t,n,i=null){super("password",n),this._email=e,this._password=t,this._tenantId=i}static _fromEmailAndPassword(e,t){return new A0(e,t,"password")}static _fromEmailAndCode(e,t,n=null){return new A0(e,t,"emailLink",n)}toJSON(){return{email:this._email,password:this._password,signInMethod:this.signInMethod,tenantId:this._tenantId}}static fromJSON(e){const t=typeof e=="string"?JSON.parse(e):e;if(t!=null&&t.email&&(t!=null&&t.password)){if(t.signInMethod==="password")return this._fromEmailAndPassword(t.email,t.password);if(t.signInMethod==="emailLink")return this._fromEmailAndCode(t.email,t.password,t.tenantId)}return null}async _getIdTokenResponse(e){switch(this.signInMethod){case"password":return $5t(e,{returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return V5t(e,{email:this._email,oobCode:this._password});default:EA(e,"internal-error")}}async _linkToIdToken(e,t){switch(this.signInMethod){case"password":return G5t(e,{idToken:t,returnSecureToken:!0,email:this._email,password:this._password});case"emailLink":return j5t(e,{idToken:t,email:this._email,oobCode:this._password});default:EA(e,"internal-error")}}_getReauthenticationResolver(e){return this._getIdTokenResponse(e)}}/**
* @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.
*/async function Bg(r,e){return e_(r,"POST","/v1/accounts:signInWithIdp",J0(r,e))}/**
* @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 K5t="http://localhost";class fd extends KM{constructor(){super(...arguments),this.pendingToken=null}static _fromParams(e){const t=new fd(e.providerId,e.signInMethod);return e.idToken||e.accessToken?(e.idToken&&(t.idToken=e.idToken),e.accessToken&&(t.accessToken=e.accessToken),e.nonce&&!e.pendingToken&&(t.nonce=e.nonce),e.pendingToken&&(t.pendingToken=e.pendingToken)):e.oauthToken&&e.oauthTokenSecret?(t.accessToken=e.oauthToken,t.secret=e.oauthTokenSecret):EA("argument-error"),t}toJSON(){return{idToken:this.idToken,accessToken:this.accessToken,secret:this.secret,nonce:this.nonce,pendingToken:this.pendingToken,providerId:this.providerId,signInMethod:this.signInMethod}}static fromJSON(e){const t=typeof e=="string"?JSON.parse(e):e,{providerId:n,signInMethod:i}=t,a=HM(t,["providerId","signInMethod"]);if(!n||!i)return null;const o=new fd(n,i);return o.idToken=a.idToken||void 0,o.accessToken=a.accessToken||void 0,o.secret=a.secret,o.nonce=a.nonce,o.pendingToken=a.pendingToken||null,o}_getIdTokenResponse(e){const t=this.buildRequest();return Bg(e,t)}_linkToIdToken(e,t){const n=this.buildRequest();return n.idToken=t,Bg(e,n)}_getReauthenticationResolver(e){const t=this.buildRequest();return t.autoCreate=!1,Bg(e,t)}buildRequest(){const e={requestUri:K5t,returnSecureToken:!0};if(this.pendingToken)e.pendingToken=this.pendingToken;else{const t={};this.idToken&&(t.id_token=this.idToken),this.accessToken&&(t.access_token=this.accessToken),this.secret&&(t.oauth_token_secret=this.secret),t.providerId=this.providerId,this.nonce&&!this.pendingToken&&(t.nonce=this.nonce),e.postBody=q0(t)}return e}}/**
* @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 W5t(r){switch(r){case"recoverEmail":return"RECOVER_EMAIL";case"resetPassword":return"PASSWORD_RESET";case"signIn":return"EMAIL_SIGNIN";case"verifyEmail":return"VERIFY_EMAIL";case"verifyAndChangeEmail":return"VERIFY_AND_CHANGE_EMAIL";case"revertSecondFactorAddition":return"REVERT_SECOND_FACTOR_ADDITION";default:return null}}function z5t(r){const e=Wm(zm(r)).link,t=e?Wm(zm(e)).deep_link_id:null,n=Wm(zm(r)).deep_link_id;return(n?Wm(zm(n)).link:null)||n||t||e||r}class WM{constructor(e){var t,n,i,a,o,s;const A=Wm(zm(e)),l=(t=A.apiKey)!==null&&t!==void 0?t:null,u=(n=A.oobCode)!==null&&n!==void 0?n:null,c=W5t((i=A.mode)!==null&&i!==void 0?i:null);er(l&&u&&c,"argument-error"),this.apiKey=l,this.operation=c,this.code=u,this.continueUrl=(a=A.continueUrl)!==null&&a!==void 0?a:null,this.languageCode=(o=A.languageCode)!==null&&o!==void 0?o:null,this.tenantId=(s=A.tenantId)!==null&&s!==void 0?s:null}static parseLink(e){const t=z5t(e);try{return new WM(t)}catch{return null}}}/**
* @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.
*/class wv{constructor(){this.providerId=wv.PROVIDER_ID}static credential(e,t){return A0._fromEmailAndPassword(e,t)}static credentialWithLink(e,t){const n=WM.parseLink(t);return er(n,"argument-error"),A0._fromEmailAndCode(e,n.code,n.tenantId)}}wv.PROVIDER_ID="password";wv.EMAIL_PASSWORD_SIGN_IN_METHOD="password";wv.EMAIL_LINK_SIGN_IN_METHOD="emailLink";/**
* @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.
*/class Lj{constructor(e){this.providerId=e,this.defaultLanguageCode=null,this.customParameters={}}setDefaultLanguage(e){this.defaultLanguageCode=e}setCustomParameters(e){return this.customParameters=e,this}getCustomParameters(){return this.customParameters}}/**
* @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 n_ extends Lj{constructor(){super(...arguments),this.scopes=[]}addScope(e){return this.scopes.includes(e)||this.scopes.push(e),this}getScopes(){return[...this.scopes]}}/**
* @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.
*/class Oc extends n_{constructor(){super("facebook.com")}static credential(e){return fd._fromParams({providerId:Oc.PROVIDER_ID,signInMethod:Oc.FACEBOOK_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Oc.credentialFromTaggedObject(e)}static credentialFromError(e){return Oc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Oc.credential(e.oauthAccessToken)}catch{return null}}}Oc.FACEBOOK_SIGN_IN_METHOD="facebook.com";Oc.PROVIDER_ID="facebook.com";/**
* @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.
*/class Fc extends n_{constructor(){super("google.com"),this.addScope("profile")}static credential(e,t){return fd._fromParams({providerId:Fc.PROVIDER_ID,signInMethod:Fc.GOOGLE_SIGN_IN_METHOD,idToken:e,accessToken:t})}static credentialFromResult(e){return Fc.credentialFromTaggedObject(e)}static credentialFromError(e){return Fc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthIdToken:t,oauthAccessToken:n}=e;if(!t&&!n)return null;try{return Fc.credential(t,n)}catch{return null}}}Fc.GOOGLE_SIGN_IN_METHOD="google.com";Fc.PROVIDER_ID="google.com";/**
* @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.
*/class Rc extends n_{constructor(){super("github.com")}static credential(e){return fd._fromParams({providerId:Rc.PROVIDER_ID,signInMethod:Rc.GITHUB_SIGN_IN_METHOD,accessToken:e})}static credentialFromResult(e){return Rc.credentialFromTaggedObject(e)}static credentialFromError(e){return Rc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e||!("oauthAccessToken"in e)||!e.oauthAccessToken)return null;try{return Rc.credential(e.oauthAccessToken)}catch{return null}}}Rc.GITHUB_SIGN_IN_METHOD="github.com";Rc.PROVIDER_ID="github.com";/**
* @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.
*/class Mc extends n_{constructor(){super("twitter.com")}static credential(e,t){return fd._fromParams({providerId:Mc.PROVIDER_ID,signInMethod:Mc.TWITTER_SIGN_IN_METHOD,oauthToken:e,oauthTokenSecret:t})}static credentialFromResult(e){return Mc.credentialFromTaggedObject(e)}static credentialFromError(e){return Mc.credentialFromTaggedObject(e.customData||{})}static credentialFromTaggedObject({_tokenResponse:e}){if(!e)return null;const{oauthAccessToken:t,oauthTokenSecret:n}=e;if(!t||!n)return null;try{return Mc.credential(t,n)}catch{return null}}}Mc.TWITTER_SIGN_IN_METHOD="twitter.com";Mc.PROVIDER_ID="twitter.com";/**
* @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.
*/async function Y5t(r,e){return e_(r,"POST","/v1/accounts:signUp",J0(r,e))}/**
* @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.
*/class dd{constructor(e){this.user=e.user,this.providerId=e.providerId,this._tokenResponse=e._tokenResponse,this.operationType=e.operationType}static async _fromIdTokenResponse(e,t,n,i=!1){const a=await zf._fromIdTokenResponse(e,n,i),o=T6(n);return new dd({user:a,providerId:o,_tokenResponse:n,operationType:t})}static async _forOperation(e,t,n){await e._updateTokensIfNecessary(n,!0);const i=T6(n);return new dd({user:e,providerId:i,_tokenResponse:n,operationType:t})}}function T6(r){return r.providerId?r.providerId:"phoneNumber"in r?"phone":null}/**
* @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.
*/class qE extends Oh{constructor(e,t,n,i){var a;super(t.code,t.message),this.operationType=n,this.user=i,Object.setPrototypeOf(this,qE.prototype),this.customData={appName:e.name,tenantId:(a=e.tenantId)!==null&&a!==void 0?a:void 0,_serverResponse:t.customData._serverResponse,operationType:n}}static _fromErrorAndOperation(e,t,n,i){return new qE(e,t,n,i)}}function Oj(r,e,t,n){return(e==="reauthenticate"?t._getReauthenticationResolver(r):t._getIdTokenResponse(r)).catch(a=>{throw a.code==="auth/multi-factor-auth-required"?qE._fromErrorAndOperation(r,a,e,n):a})}async function X5t(r,e,t=!1){const n=await o0(r,e._linkToIdToken(r.auth,await r.getIdToken()),t);return dd._forOperation(r,"link",n)}/**
* @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.
*/async function q5t(r,e,t=!1){const{auth:n}=r,i="reauthenticate";try{const a=await o0(r,Oj(n,i,e,r),t);er(a.idToken,n,"internal-error");const o=VM(a.idToken);er(o,n,"internal-error");const{sub:s}=o;return er(r.uid===s,n,"user-mismatch"),dd._forOperation(r,i,a)}catch(a){throw(a==null?void 0:a.code)==="auth/user-not-found"&&EA(n,"user-mismatch"),a}}/**
* @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.
*/async function Fj(r,e,t=!1){const n="signIn",i=await Oj(r,n,e),a=await dd._fromIdTokenResponse(r,n,i);return t||await r._updateCurrentUser(a.user),a}async function Z5t(r,e){return Fj(r_(r),e)}async function gDt(r,e,t){const n=r_(r),i=await Y5t(n,{returnSecureToken:!0,email:e,password:t}),a=await dd._fromIdTokenResponse(n,"signIn",i);return await n._updateCurrentUser(a.user),a}function vDt(r,e,t){return Z5t(ku(r),wv.credential(e,t))}function J5t(r,e,t,n){return ku(r).onIdTokenChanged(e,t,n)}function tUt(r,e,t){return ku(r).beforeAuthStateChanged(e,t)}function eUt(r,e,t,n){return ku(r).onAuthStateChanged(e,t,n)}function mDt(r){return ku(r).signOut()}const ZE="__sak";/**
* @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 Rj{constructor(e,t){this.storageRetriever=e,this.type=t}_isAvailable(){try{return this.storage?(this.storage.setItem(ZE,"1"),this.storage.removeItem(ZE),Promise.resolve(!0)):Promise.resolve(!1)}catch{return Promise.resolve(!1)}}_set(e,t){return this.storage.setItem(e,JSON.stringify(t)),Promise.resolve()}_get(e){const t=this.storage.getItem(e);return Promise.resolve(t?JSON.parse(t):null)}_remove(e){return this.storage.removeItem(e),Promise.resolve()}get storage(){return this.storageRetriever()}}/**
* @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 rUt(){const r=Ja();return jM(r)||GB(r)}const nUt=1e3,iUt=10;class Mj extends Rj{constructor(){super(()=>window.localStorage,"LOCAL"),this.boundEventHandler=(e,t)=>this.onStorageEvent(e,t),this.listeners={},this.localCache={},this.pollTimer=null,this.safariLocalStorageNotSynced=rUt()&&P5t(),this.fallbackToPolling=Sj(),this._shouldAllowMigration=!0}forAllChangedKeys(e){for(const t of Object.keys(this.listeners)){const n=this.storage.getItem(t),i=this.localCache[t];n!==i&&e(t,i,n)}}onStorageEvent(e,t=!1){if(!e.key){this.forAllChangedKeys((o,s,A)=>{this.notifyListeners(o,A)});return}const n=e.key;if(t?this.detachListener():this.stopPolling(),this.safariLocalStorageNotSynced){const o=this.storage.getItem(n);if(e.newValue!==o)e.newValue!==null?this.storage.setItem(n,e.newValue):this.storage.removeItem(n);else if(this.localCache[n]===e.newValue&&!t)return}const i=()=>{const o=this.storage.getItem(n);!t&&this.localCache[n]===o||this.notifyListeners(n,o)},a=this.storage.getItem(n);N5t()&&a!==e.newValue&&e.newValue!==e.oldValue?setTimeout(i,iUt):i()}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const i of Array.from(n))i(t&&JSON.parse(t))}startPolling(){this.stopPolling(),this.pollTimer=setInterval(()=>{this.forAllChangedKeys((e,t,n)=>{this.onStorageEvent(new StorageEvent("storage",{key:e,oldValue:t,newValue:n}),!0)})},nUt)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}attachListener(){window.addEventListener("storage",this.boundEventHandler)}detachListener(){window.removeEventListener("storage",this.boundEventHandler)}_addListener(e,t){Object.keys(this.listeners).length===0&&(this.fallbackToPolling?this.startPolling():this.attachListener()),this.listeners[e]||(this.listeners[e]=new Set,this.localCache[e]=this.storage.getItem(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&(this.detachListener(),this.stopPolling())}async _set(e,t){await super._set(e,t),this.localCache[e]=JSON.stringify(t)}async _get(e){const t=await super._get(e);return this.localCache[e]=JSON.stringify(t),t}async _remove(e){await super._remove(e),delete this.localCache[e]}}Mj.type="LOCAL";const aUt=Mj;/**
* @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.
*/class Nj extends Rj{constructor(){super(()=>window.sessionStorage,"SESSION")}_addListener(e,t){}_removeListener(e,t){}}Nj.type="SESSION";const Pj=Nj;/**
* @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 oUt(r){return Promise.all(r.map(async e=>{try{return{fulfilled:!0,value:await e}}catch(t){return{fulfilled:!1,reason: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 $B{constructor(e){this.eventTarget=e,this.handlersMap={},this.boundEventHandler=this.handleEvent.bind(this)}static _getInstance(e){const t=this.receivers.find(i=>i.isListeningto(e));if(t)return t;const n=new $B(e);return this.receivers.push(n),n}isListeningto(e){return this.eventTarget===e}async handleEvent(e){const t=e,{eventId:n,eventType:i,data:a}=t.data,o=this.handlersMap[i];if(!(o!=null&&o.size))return;t.ports[0].postMessage({status:"ack",eventId:n,eventType:i});const s=Array.from(o).map(async l=>l(t.origin,a)),A=await oUt(s);t.ports[0].postMessage({status:"done",eventId:n,eventType:i,response:A})}_subscribe(e,t){Object.keys(this.handlersMap).length===0&&this.eventTarget.addEventListener("message",this.boundEventHandler),this.handlersMap[e]||(this.handlersMap[e]=new Set),this.handlersMap[e].add(t)}_unsubscribe(e,t){this.handlersMap[e]&&t&&this.handlersMap[e].delete(t),(!t||this.handlersMap[e].size===0)&&delete this.handlersMap[e],Object.keys(this.handlersMap).length===0&&this.eventTarget.removeEventListener("message",this.boundEventHandler)}}$B.receivers=[];/**
* @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 zM(r="",e=10){let t="";for(let n=0;n<e;n++)t+=Math.floor(Math.random()*10);return r+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 sUt{constructor(e){this.target=e,this.handlers=new Set}removeMessageHandler(e){e.messageChannel&&(e.messageChannel.port1.removeEventListener("message",e.onMessage),e.messageChannel.port1.close()),this.handlers.delete(e)}async _send(e,t,n=50){const i=typeof MessageChannel<"u"?new MessageChannel:null;if(!i)throw new Error("connection_unavailable");let a,o;return new Promise((s,A)=>{const l=zM("",20);i.port1.start();const u=setTimeout(()=>{A(new Error("unsupported_event"))},n);o={messageChannel:i,onMessage(c){const h=c;if(h.data.eventId===l)switch(h.data.status){case"ack":clearTimeout(u),a=setTimeout(()=>{A(new Error("timeout"))},3e3);break;case"done":clearTimeout(a),s(h.data.response);break;default:clearTimeout(u),clearTimeout(a),A(new Error("invalid_response"));break}}},this.handlers.add(o),i.port1.addEventListener("message",o.onMessage),this.target.postMessage({eventType:e,eventId:l,data:t},[i.port2])}).finally(()=>{o&&this.removeMessageHandler(o)})}}/**
* @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 fl(){return window}function AUt(r){fl().location.href=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.
*/function Uj(){return typeof fl().WorkerGlobalScope<"u"&&typeof fl().importScripts=="function"}async function lUt(){if(!(navigator!=null&&navigator.serviceWorker))return null;try{return(await navigator.serviceWorker.ready).active}catch{return null}}function uUt(){var r;return((r=navigator==null?void 0:navigator.serviceWorker)===null||r===void 0?void 0:r.controller)||null}function cUt(){return Uj()?self:null}/**
* @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 Dj="firebaseLocalStorageDb",hUt=1,JE="firebaseLocalStorage",Qj="fbase_key";class i_{constructor(e){this.request=e}toPromise(){return new Promise((e,t)=>{this.request.addEventListener("success",()=>{e(this.request.result)}),this.request.addEventListener("error",()=>{t(this.request.error)})})}}function VB(r,e){return r.transaction([JE],e?"readwrite":"readonly").objectStore(JE)}function fUt(){const r=indexedDB.deleteDatabase(Dj);return new i_(r).toPromise()}function bO(){const r=indexedDB.open(Dj,hUt);return new Promise((e,t)=>{r.addEventListener("error",()=>{t(r.error)}),r.addEventListener("upgradeneeded",()=>{const n=r.result;try{n.createObjectStore(JE,{keyPath:Qj})}catch(i){t(i)}}),r.addEventListener("success",async()=>{const n=r.result;n.objectStoreNames.contains(JE)?e(n):(n.close(),await fUt(),e(await bO()))})})}async function S6(r,e,t){const n=VB(r,!0).put({[Qj]:e,value:t});return new i_(n).toPromise()}async function dUt(r,e){const t=VB(r,!1).get(e),n=await new i_(t).toPromise();return n===void 0?null:n.value}function x6(r,e){const t=VB(r,!0).delete(e);return new i_(t).toPromise()}const pUt=800,gUt=3;class kj{constructor(){this.type="LOCAL",this._shouldAllowMigration=!0,this.listeners={},this.localCache={},this.pollTimer=null,this.pendingWrites=0,this.receiver=null,this.sender=null,this.serviceWorkerReceiverAvailable=!1,this.activeServiceWorker=null,this._workerInitializationPromise=this.initializeServiceWorkerMessaging().then(()=>{},()=>{})}async _openDb(){return this.db?this.db:(this.db=await bO(),this.db)}async _withRetries(e){let t=0;for(;;)try{const n=await this._openDb();return await e(n)}catch(n){if(t++>gUt)throw n;this.db&&(this.db.close(),this.db=void 0)}}async initializeServiceWorkerMessaging(){return Uj()?this.initializeReceiver():this.initializeSender()}async initializeReceiver(){this.receiver=$B._getInstance(cUt()),this.receiver._subscribe("keyChanged",async(e,t)=>({keyProcessed:(await this._poll()).includes(t.key)})),this.receiver._subscribe("ping",async(e,t)=>["keyChanged"])}async initializeSender(){var e,t;if(this.activeServiceWorker=await lUt(),!this.activeServiceWorker)return;this.sender=new sUt(this.activeServiceWorker);const n=await this.sender._send("ping",{},800);n&&!((e=n[0])===null||e===void 0)&&e.fulfilled&&!((t=n[0])===null||t===void 0)&&t.value.includes("keyChanged")&&(this.serviceWorkerReceiverAvailable=!0)}async notifyServiceWorker(e){if(!(!this.sender||!this.activeServiceWorker||uUt()!==this.activeServiceWorker))try{await this.sender._send("keyChanged",{key:e},this.serviceWorkerReceiverAvailable?800:50)}catch{}}async _isAvailable(){try{if(!indexedDB)return!1;const e=await bO();return await S6(e,ZE,"1"),await x6(e,ZE),!0}catch{}return!1}async _withPendingWrite(e){this.pendingWrites++;try{await e()}finally{this.pendingWrites--}}async _set(e,t){return this._withPendingWrite(async()=>(await this._withRetries(n=>S6(n,e,t)),this.localCache[e]=t,this.notifyServiceWorker(e)))}async _get(e){const t=await this._withRetries(n=>dUt(n,e));return this.localCache[e]=t,t}async _remove(e){return this._withPendingWrite(async()=>(await this._withRetries(t=>x6(t,e)),delete this.localCache[e],this.notifyServiceWorker(e)))}async _poll(){const e=await this._withRetries(i=>{const a=VB(i,!1).getAll();return new i_(a).toPromise()});if(!e)return[];if(this.pendingWrites!==0)return[];const t=[],n=new Set;for(const{fbase_key:i,value:a}of e)n.add(i),JSON.stringify(this.localCache[i])!==JSON.stringify(a)&&(this.notifyListeners(i,a),t.push(i));for(const i of Object.keys(this.localCache))this.localCache[i]&&!n.has(i)&&(this.notifyListeners(i,null),t.push(i));return t}notifyListeners(e,t){this.localCache[e]=t;const n=this.listeners[e];if(n)for(const i of Array.from(n))i(t)}startPolling(){this.stopPolling(),this.pollTimer=setInterval(async()=>this._poll(),pUt)}stopPolling(){this.pollTimer&&(clearInterval(this.pollTimer),this.pollTimer=null)}_addListener(e,t){Object.keys(this.listeners).length===0&&this.startPolling(),this.listeners[e]||(this.listeners[e]=new Set,this._get(e)),this.listeners[e].add(t)}_removeListener(e,t){this.listeners[e]&&(this.listeners[e].delete(t),this.listeners[e].size===0&&delete this.listeners[e]),Object.keys(this.listeners).length===0&&this.stopPolling()}}kj.type="LOCAL";const vUt=kj;/**
* @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 mUt(){var r,e;return(e=(r=document.getElementsByTagName("head"))===null||r===void 0?void 0:r[0])!==null&&e!==void 0?e:document}function yUt(r){return new Promise((e,t)=>{const n=document.createElement("script");n.setAttribute("src",r),n.onload=e,n.onerror=i=>{const a=hl("internal-error");a.customData=i,t(a)},n.type="text/javascript",n.charset="UTF-8",mUt().appendChild(n)})}function _Ut(r){return`__${r}${Math.floor(Math.random()*1e6)}`}new Z0(3e4,6e4);/**
* @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 wUt(r,e){return e?cu(e):(er(r._popupRedirectResolver,r,"argument-error"),r._popupRedirectResolver)}/**
* @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 YM extends KM{constructor(e){super("custom","custom"),this.params=e}_getIdTokenResponse(e){return Bg(e,this._buildIdpRequest())}_linkToIdToken(e,t){return Bg(e,this._buildIdpRequest(t))}_getReauthenticationResolver(e){return Bg(e,this._buildIdpRequest())}_buildIdpRequest(e){const t={requestUri:this.params.requestUri,sessionId:this.params.sessionId,postBody:this.params.postBody,tenantId:this.params.tenantId,pendingToken:this.params.pendingToken,returnSecureToken:!0,returnIdpCredential:!0};return e&&(t.idToken=e),t}}function EUt(r){return Fj(r.auth,new YM(r),r.bypassAuthState)}function CUt(r){const{auth:e,user:t}=r;return er(t,e,"internal-error"),q5t(t,new YM(r),r.bypassAuthState)}async function BUt(r){const{auth:e,user:t}=r;return er(t,e,"internal-error"),X5t(t,new YM(r),r.bypassAuthState)}/**
* @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.
*/class Hj{constructor(e,t,n,i,a=!1){this.auth=e,this.resolver=n,this.user=i,this.bypassAuthState=a,this.pendingPromise=null,this.eventManager=null,this.filter=Array.isArray(t)?t:[t]}execute(){return new Promise(async(e,t)=>{this.pendingPromise={resolve:e,reject:t};try{this.eventManager=await this.resolver._initialize(this.auth),await this.onExecution(),this.eventManager.registerConsumer(this)}catch(n){this.reject(n)}})}async onAuthEvent(e){const{urlResponse:t,sessionId:n,postBody:i,tenantId:a,error:o,type:s}=e;if(o){this.reject(o);return}const A={auth:this.auth,requestUri:t,sessionId:n,tenantId:a||void 0,postBody:i||void 0,user:this.user,bypassAuthState:this.bypassAuthState};try{this.resolve(await this.getIdpTask(s)(A))}catch(l){this.reject(l)}}onError(e){this.reject(e)}getIdpTask(e){switch(e){case"signInViaPopup":case"signInViaRedirect":return EUt;case"linkViaPopup":case"linkViaRedirect":return BUt;case"reauthViaPopup":case"reauthViaRedirect":return CUt;default:EA(this.auth,"internal-error")}}resolve(e){Iu(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.resolve(e),this.unregisterAndCleanUp()}reject(e){Iu(this.pendingPromise,"Pending promise was never set"),this.pendingPromise.reject(e),this.unregisterAndCleanUp()}unregisterAndCleanUp(){this.eventManager&&this.eventManager.unregisterConsumer(this),this.pendingPromise=null,this.cleanUp()}}/**
* @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 bUt=new Z0(2e3,1e4);class ig extends Hj{constructor(e,t,n,i,a){super(e,t,i,a),this.provider=n,this.authWindow=null,this.pollId=null,ig.currentPopupAction&&ig.currentPopupAction.cancel(),ig.currentPopupAction=this}async executeNotNull(){const e=await this.execute();return er(e,this.auth,"internal-error"),e}async onExecution(){Iu(this.filter.length===1,"Popup operations only handle one event");const e=zM();this.authWindow=await this.resolver._openPopup(this.auth,this.provider,this.filter[0],e),this.authWindow.associatedEvent=e,this.resolver._originValidation(this.auth).catch(t=>{this.reject(t)}),this.resolver._isIframeWebStorageSupported(this.auth,t=>{t||this.reject(hl(this.auth,"web-storage-unsupported"))}),this.pollUserCancellation()}get eventId(){var e;return((e=this.authWindow)===null||e===void 0?void 0:e.associatedEvent)||null}cancel(){this.reject(hl(this.auth,"cancelled-popup-request"))}cleanUp(){this.authWindow&&this.authWindow.close(),this.pollId&&window.clearTimeout(this.pollId),this.authWindow=null,this.pollId=null,ig.currentPopupAction=null}pollUserCancellation(){const e=()=>{var t,n;if(!((n=(t=this.authWindow)===null||t===void 0?void 0:t.window)===null||n===void 0)&&n.closed){this.pollId=window.setTimeout(()=>{this.pollId=null,this.reject(hl(this.auth,"popup-closed-by-user"))},2e3);return}this.pollId=window.setTimeout(e,bUt.get())};e()}}ig.currentPopupAction=null;/**
* @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 TUt="pendingRedirect",xw=new Map;class SUt extends Hj{constructor(e,t,n=!1){super(e,["signInViaRedirect","linkViaRedirect","reauthViaRedirect","unknown"],t,void 0,n),this.eventId=null}async execute(){let e=xw.get(this.auth._key());if(!e){try{const n=await xUt(this.resolver,this.auth)?await super.execute():null;e=()=>Promise.resolve(n)}catch(t){e=()=>Promise.reject(t)}xw.set(this.auth._key(),e)}return this.bypassAuthState||xw.set(this.auth._key(),()=>Promise.resolve(null)),e()}async onAuthEvent(e){if(e.type==="signInViaRedirect")return super.onAuthEvent(e);if(e.type==="unknown"){this.resolve(null);return}if(e.eventId){const t=await this.auth._redirectUserForId(e.eventId);if(t)return this.user=t,super.onAuthEvent(e);this.resolve(null)}}async onExecution(){}cleanUp(){}}async function xUt(r,e){const t=OUt(e),n=LUt(r);if(!await n._isAvailable())return!1;const i=await n._get(t)==="true";return await n._remove(t),i}function IUt(r,e){xw.set(r._key(),e)}function LUt(r){return cu(r._redirectPersistence)}function OUt(r){return Sw(TUt,r.config.apiKey,r.name)}async function FUt(r,e,t=!1){const n=r_(r),i=wUt(n,e),o=await new SUt(n,i,t).execute();return o&&!t&&(delete o.user._redirectEventId,await n._persistUserIfCurrent(o.user),await n._setRedirectUser(null,e)),o}/**
* @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 RUt=10*60*1e3;class MUt{constructor(e){this.auth=e,this.cachedEventUids=new Set,this.consumers=new Set,this.queuedRedirectEvent=null,this.hasHandledPotentialRedirect=!1,this.lastProcessedEventTime=Date.now()}registerConsumer(e){this.consumers.add(e),this.queuedRedirectEvent&&this.isEventForConsumer(this.queuedRedirectEvent,e)&&(this.sendToConsumer(this.queuedRedirectEvent,e),this.saveEventToCache(this.queuedRedirectEvent),this.queuedRedirectEvent=null)}unregisterConsumer(e){this.consumers.delete(e)}onEvent(e){if(this.hasEventBeenHandled(e))return!1;let t=!1;return this.consumers.forEach(n=>{this.isEventForConsumer(e,n)&&(t=!0,this.sendToConsumer(e,n),this.saveEventToCache(e))}),this.hasHandledPotentialRedirect||!NUt(e)||(this.hasHandledPotentialRedirect=!0,t||(this.queuedRedirectEvent=e,t=!0)),t}sendToConsumer(e,t){var n;if(e.error&&!Gj(e)){const i=((n=e.error.code)===null||n===void 0?void 0:n.split("auth/")[1])||"internal-error";t.onError(hl(this.auth,i))}else t.onAuthEvent(e)}isEventForConsumer(e,t){const n=t.eventId===null||!!e.eventId&&e.eventId===t.eventId;return t.filter.includes(e.type)&&n}hasEventBeenHandled(e){return Date.now()-this.lastProcessedEventTime>=RUt&&this.cachedEventUids.clear(),this.cachedEventUids.has(I6(e))}saveEventToCache(e){this.cachedEventUids.add(I6(e)),this.lastProcessedEventTime=Date.now()}}function I6(r){return[r.type,r.eventId,r.sessionId,r.tenantId].filter(e=>e).join("-")}function Gj({type:r,error:e}){return r==="unknown"&&(e==null?void 0:e.code)==="auth/no-auth-event"}function NUt(r){switch(r.type){case"signInViaRedirect":case"linkViaRedirect":case"reauthViaRedirect":return!0;case"unknown":return Gj(r);default:return!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.
*/async function PUt(r,e={}){return t_(r,"GET","/v1/projects",e)}/**
* @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 UUt=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,DUt=/^https?/;async function QUt(r){if(r.config.emulator)return;const{authorizedDomains:e}=await PUt(r);for(const t of e)try{if(kUt(t))return}catch{}EA(r,"unauthorized-domain")}function kUt(r){const e=BO(),{protocol:t,hostname:n}=new URL(e);if(r.startsWith("chrome-extension://")){const o=new URL(r);return o.hostname===""&&n===""?t==="chrome-extension:"&&r.replace("chrome-extension://","")===e.replace("chrome-extension://",""):t==="chrome-extension:"&&o.hostname===n}if(!DUt.test(t))return!1;if(UUt.test(r))return n===r;const i=r.replace(/\./g,"\\.");return new RegExp("^(.+\\."+i+"|"+i+")$","i").test(n)}/**
* @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 HUt=new Z0(3e4,6e4);function L6(){const r=fl().___jsl;if(r!=null&&r.H){for(const e of Object.keys(r.H))if(r.H[e].r=r.H[e].r||[],r.H[e].L=r.H[e].L||[],r.H[e].r=[...r.H[e].L],r.CP)for(let t=0;t<r.CP.length;t++)r.CP[t]=null}}function GUt(r){return new Promise((e,t)=>{var n,i,a;function o(){L6(),gapi.load("gapi.iframes",{callback:()=>{e(gapi.iframes.getContext())},ontimeout:()=>{L6(),t(hl(r,"network-request-failed"))},timeout:HUt.get()})}if(!((i=(n=fl().gapi)===null||n===void 0?void 0:n.iframes)===null||i===void 0)&&i.Iframe)e(gapi.iframes.getContext());else if(!((a=fl().gapi)===null||a===void 0)&&a.load)o();else{const s=_Ut("iframefcb");return fl()[s]=()=>{gapi.load?o():t(hl(r,"network-request-failed"))},yUt(`https://apis.google.com/js/api.js?onload=${s}`).catch(A=>t(A))}}).catch(e=>{throw Iw=null,e})}let Iw=null;function $Ut(r){return Iw=Iw||GUt(r),Iw}/**
* @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 VUt=new Z0(5e3,15e3),jUt="__/auth/iframe",KUt="emulator/auth/iframe",WUt={style:{position:"absolute",top:"-100px",width:"1px",height:"1px"},"aria-hidden":"true",tabindex:"-1"},zUt=new Map([["identitytoolkit.googleapis.com","p"],["staging-identitytoolkit.sandbox.googleapis.com","s"],["test-identitytoolkit.sandbox.googleapis.com","t"]]);function YUt(r){const e=r.config;er(e.authDomain,r,"auth-domain-config-required");const t=e.emulator?$M(e,KUt):`https://${r.config.authDomain}/${jUt}`,n={apiKey:e.apiKey,appName:r.name,v:HB},i=zUt.get(r.config.apiHost);i&&(n.eid=i);const a=r._getFrameworks();return a.length&&(n.fw=a.join(",")),`${t}?${q0(n).slice(1)}`}async function XUt(r){const e=await $Ut(r),t=fl().gapi;return er(t,r,"internal-error"),e.open({where:document.body,url:YUt(r),messageHandlersFilter:t.iframes.CROSS_ORIGIN_IFRAMES_FILTER,attributes:WUt,dontclear:!0},n=>new Promise(async(i,a)=>{await n.restyle({setHideOnLeave:!1});const o=hl(r,"network-request-failed"),s=fl().setTimeout(()=>{a(o)},VUt.get());function A(){fl().clearTimeout(s),i(n)}n.ping(A).then(A,()=>{a(o)})}))}/**
* @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 qUt={location:"yes",resizable:"yes",statusbar:"yes",toolbar:"no"},ZUt=500,JUt=600,t2t="_blank",e2t="http://localhost";class O6{constructor(e){this.window=e,this.associatedEvent=null}close(){if(this.window)try{this.window.close()}catch{}}}function r2t(r,e,t,n=ZUt,i=JUt){const a=Math.max((window.screen.availHeight-i)/2,0).toString(),o=Math.max((window.screen.availWidth-n)/2,0).toString();let s="";const A=Object.assign(Object.assign({},qUt),{width:n.toString(),height:i.toString(),top:a,left:o}),l=Ja().toLowerCase();t&&(s=Ej(l)?t2t:t),wj(l)&&(e=e||e2t,A.scrollbars="yes");const u=Object.entries(A).reduce((h,[f,d])=>`${h}${f}=${d},`,"");if(M5t(l)&&s!=="_self")return n2t(e||"",s),new O6(null);const c=window.open(e||"",s,u);er(c,r,"popup-blocked");try{c.focus()}catch{}return new O6(c)}function n2t(r,e){const t=document.createElement("a");t.href=r,t.target=e;const n=document.createEvent("MouseEvent");n.initMouseEvent("click",!0,!0,window,1,0,0,0,0,!1,!1,!1,!1,1,null),t.dispatchEvent(n)}/**
* @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 i2t="__/auth/handler",a2t="emulator/auth/handler";function F6(r,e,t,n,i,a){er(r.config.authDomain,r,"auth-domain-config-required"),er(r.config.apiKey,r,"invalid-api-key");const o={apiKey:r.config.apiKey,appName:r.name,authType:t,redirectUrl:n,v:HB,eventId:i};if(e instanceof Lj){e.setDefaultLanguage(r.languageCode),o.providerId=e.providerId||"",iPt(e.getCustomParameters())||(o.customParameters=JSON.stringify(e.getCustomParameters()));for(const[A,l]of Object.entries(a||{}))o[A]=l}if(e instanceof n_){const A=e.getScopes().filter(l=>l!=="");A.length>0&&(o.scopes=A.join(","))}r.tenantId&&(o.tid=r.tenantId);const s=o;for(const A of Object.keys(s))s[A]===void 0&&delete s[A];return`${o2t(r)}?${q0(s).slice(1)}`}function o2t({config:r}){return r.emulator?$M(r,a2t):`https://${r.authDomain}/${i2t}`}/**
* @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 $S="webStorageSupport";class s2t{constructor(){this.eventManagers={},this.iframes={},this.originValidationPromises={},this._redirectPersistence=Pj,this._completeRedirectFn=FUt,this._overrideRedirectResult=IUt}async _openPopup(e,t,n,i){var a;Iu((a=this.eventManagers[e._key()])===null||a===void 0?void 0:a.manager,"_initialize() not called before _openPopup()");const o=F6(e,t,n,BO(),i);return r2t(e,o,zM())}async _openRedirect(e,t,n,i){return await this._originValidation(e),AUt(F6(e,t,n,BO(),i)),new Promise(()=>{})}_initialize(e){const t=e._key();if(this.eventManagers[t]){const{manager:i,promise:a}=this.eventManagers[t];return i?Promise.resolve(i):(Iu(a,"If manager is not set, promise should be"),a)}const n=this.initAndGetManager(e);return this.eventManagers[t]={promise:n},n.catch(()=>{delete this.eventManagers[t]}),n}async initAndGetManager(e){const t=await XUt(e),n=new MUt(e);return t.register("authEvent",i=>(er(i==null?void 0:i.authEvent,e,"invalid-auth-event"),{status:n.onEvent(i.authEvent)?"ACK":"ERROR"}),gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER),this.eventManagers[e._key()]={manager:n},this.iframes[e._key()]=t,n}_isIframeWebStorageSupported(e,t){this.iframes[e._key()].send($S,{type:$S},i=>{var a;const o=(a=i==null?void 0:i[0])===null||a===void 0?void 0:a[$S];o!==void 0&&t(!!o),EA(e,"internal-error")},gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER)}_originValidation(e){const t=e._key();return this.originValidationPromises[t]||(this.originValidationPromises[t]=QUt(e)),this.originValidationPromises[t]}get _shouldInitProactively(){return Sj()||jM()||GB()}}const A2t=s2t;var R6="@firebase/auth",M6="0.21.3";/**
* @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.
*/class l2t{constructor(e){this.auth=e,this.internalListeners=new Map}getUid(){var e;return this.assertAuthConfigured(),((e=this.auth.currentUser)===null||e===void 0?void 0:e.uid)||null}async getToken(e){return this.assertAuthConfigured(),await this.auth._initializationPromise,this.auth.currentUser?{accessToken:await this.auth.currentUser.getIdToken(e)}:null}addAuthTokenListener(e){if(this.assertAuthConfigured(),this.internalListeners.has(e))return;const t=this.auth.onIdTokenChanged(n=>{e((n==null?void 0:n.stsTokenManager.accessToken)||null)});this.internalListeners.set(e,t),this.updateProactiveRefresh()}removeAuthTokenListener(e){this.assertAuthConfigured();const t=this.internalListeners.get(e);t&&(this.internalListeners.delete(e),t(),this.updateProactiveRefresh())}assertAuthConfigured(){er(this.auth._initializationPromise,"dependent-sdk-initialized-before-auth")}updateProactiveRefresh(){this.internalListeners.size>0?this.auth._startProactiveRefresh():this.auth._stopProactiveRefresh()}}/**
* @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 u2t(r){switch(r){case"Node":return"node";case"ReactNative":return"rn";case"Worker":return"webworker";case"Cordova":return"cordova";default:return}}function c2t(r){i0(new Kg("auth",(e,{options:t})=>{const n=e.getProvider("app").getImmediate(),i=e.getProvider("heartbeat"),{apiKey:a,authDomain:o}=n.options;return((s,A)=>{er(a&&!a.includes(":"),"invalid-api-key",{appName:s.name}),er(!(o!=null&&o.includes(":")),"argument-error",{appName:s.name});const l={apiKey:a,authDomain:o,clientPlatform:r,apiHost:"identitytoolkit.googleapis.com",tokenApiHost:"securetoken.googleapis.com",apiScheme:"https",sdkClientVersion:xj(r)},u=new D5t(s,A,l);return v5t(u,t),u})(n,i)},"PUBLIC").setInstantiationMode("EXPLICIT").setInstanceCreatedCallback((e,t,n)=>{e.getProvider("auth-internal").initialize()})),i0(new Kg("auth-internal",e=>{const t=r_(e.getProvider("auth").getImmediate());return(n=>new l2t(n))(t)},"PRIVATE").setInstantiationMode("EXPLICIT")),Eg(R6,M6,u2t(r)),Eg(R6,M6,"esm2017")}/**
* @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 h2t=5*60,f2t=oj("authIdTokenMaxAge")||h2t;let N6=null;const d2t=r=>async e=>{const t=e&&await e.getIdTokenResult(),n=t&&(new Date().getTime()-Date.parse(t.issuedAtTime))/1e3;if(n&&n>f2t)return;const i=t==null?void 0:t.token;N6!==i&&(N6=i,await fetch(r,{method:i?"POST":"DELETE",headers:i?{Authorization:`Bearer ${i}`}:{}}))};function p2t(r=i5t()){const e=uj(r,"auth");if(e.isInitialized())return e.getImmediate();const t=g5t(r,{popupRedirectResolver:A2t,persistence:[vUt,aUt,Pj]}),n=oj("authTokenSyncURL");if(n){const a=d2t(n);tUt(t,a,()=>a(t.currentUser)),J5t(t,o=>a(o))}const i=aj("auth");return i&&Q5t(t,`http://${i}`),t}c2t("Browser");var g2t="firebase",v2t="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.
*/Eg(g2t,v2t,"app");const m2t={apiKey:"AIzaSyBsP9SNH1FuRBpbhcvo9flXbAQWydpctd4",authDomain:"irishrailtracker.firebaseapp.com",projectId:"irishrailtracker",storageBucket:"irishrailtracker.appspot.com",messagingSenderId:"753565032771",appId:"1:753565032771:web:092121cc9d3e254084cff6"},y2t=cj(m2t);function _2t(r,e,t){console.log("Checking auth");const n=p2t(y2t);eUt(n,i=>i?t():t({path:"/"}))}function Tm(r){return()=>kNt(Object.assign({"../pages/InsightsPage.vue":()=>bm(()=>import("./InsightsPage-37912657.js"),["assets/InsightsPage-37912657.js","assets/store-6f7621d4.js","assets/Navbar-6b07ba01.js","assets/Navbar-f25ac83d.css","assets/InsightsPage-9f2265bd.css"]),"../pages/LoginPage.vue":()=>bm(()=>import("./LoginPage-a53ab66f.js"),["assets/LoginPage-a53ab66f.js","assets/Navbar-6b07ba01.js","assets/Navbar-f25ac83d.css","assets/LoginPage-d42bd1fa.css"]),"../pages/MapPage.vue":()=>bm(()=>import("./MapPage-66b44c57.js"),["assets/MapPage-66b44c57.js","assets/store-6f7621d4.js","assets/index.esm2017-da4ff3a2.js","assets/Navbar-6b07ba01.js","assets/Navbar-f25ac83d.css","assets/MapPage-26750926.css"]),"../pages/SecurePage.vue":()=>bm(()=>import("./SecurePage-156dc9e7.js"),["assets/SecurePage-156dc9e7.js","assets/Navbar-6b07ba01.js","assets/Navbar-f25ac83d.css","assets/index.esm2017-da4ff3a2.js"]),"../pages/SignUpPage.vue":()=>bm(()=>import("./SignUpPage-f56cbda8.js"),["assets/SignUpPage-f56cbda8.js","assets/Navbar-6b07ba01.js","assets/Navbar-f25ac83d.css","assets/SignUpPage-51a5895d.css"])}),`../pages/${r}.vue`)}const w2t=[{path:"/",component:Tm("MapPage")},{path:"/insights",component:Tm("InsightsPage")},{path:"/secure",component:Tm("SecurePage"),beforeEnter:_2t},{path:"/signup",component:Tm("SignUpPage")},{path:"/login",component:Tm("LoginPage")}];var P6={},E2t={get exports(){return P6},set exports(r){P6=r}},vo="top",ys="bottom",_s="right",mo="left",jB="auto",Ev=[vo,ys,_s,mo],pd="start",Wg="end",$j="clippingParents",XM="viewport",Kp="popper",Vj="reference",TO=Ev.reduce(function(r,e){return r.concat([e+"-"+pd,e+"-"+Wg])},[]),qM=[].concat(Ev,[jB]).reduce(function(r,e){return r.concat([e,e+"-"+pd,e+"-"+Wg])},[]),jj="beforeRead",Kj="read",Wj="afterRead",zj="beforeMain",Yj="main",Xj="afterMain",qj="beforeWrite",Zj="write",Jj="afterWrite",tK=[jj,Kj,Wj,zj,Yj,Xj,qj,Zj,Jj];function _l(r){return r?(r.nodeName||"").toLowerCase():null}function js(r){if(r==null)return window;if(r.toString()!=="[object Window]"){var e=r.ownerDocument;return e&&e.defaultView||window}return r}function gd(r){var e=js(r).Element;return r instanceof e||r instanceof Element}function ks(r){var e=js(r).HTMLElement;return r instanceof e||r instanceof HTMLElement}function ZM(r){if(typeof ShadowRoot>"u")return!1;var e=js(r).ShadowRoot;return r instanceof e||r instanceof ShadowRoot}function C2t(r){var e=r.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},a=e.elements[t];!ks(a)||!_l(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function B2t(r){var e=r.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(n){var i=e.elements[n],a=e.attributes[n]||{},o=Object.keys(e.styles.hasOwnProperty(n)?e.styles[n]:t[n]),s=o.reduce(function(A,l){return A[l]="",A},{});!ks(i)||!_l(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(A){i.removeAttribute(A)}))})}}const JM={name:"applyStyles",enabled:!0,phase:"write",fn:C2t,effect:B2t,requires:["computeStyles"]};function dl(r){return r.split("-")[0]}var Yf=Math.max,tC=Math.min,zg=Math.round;function SO(){var r=navigator.userAgentData;return r!=null&&r.brands?r.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function eK(){return!/^((?!chrome|android).)*safari/i.test(SO())}function Yg(r,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var n=r.getBoundingClientRect(),i=1,a=1;e&&ks(r)&&(i=r.offsetWidth>0&&zg(n.width)/r.offsetWidth||1,a=r.offsetHeight>0&&zg(n.height)/r.offsetHeight||1);var o=gd(r)?js(r):window,s=o.visualViewport,A=!eK()&&t,l=(n.left+(A&&s?s.offsetLeft:0))/i,u=(n.top+(A&&s?s.offsetTop:0))/a,c=n.width/i,h=n.height/a;return{width:c,height:h,top:u,right:l+c,bottom:u+h,left:l,x:l,y:u}}function tN(r){var e=Yg(r),t=r.offsetWidth,n=r.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:r.offsetLeft,y:r.offsetTop,width:t,height:n}}function rK(r,e){var t=e.getRootNode&&e.getRootNode();if(r.contains(e))return!0;if(t&&ZM(t)){var n=e;do{if(n&&r.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Lu(r){return js(r).getComputedStyle(r)}function b2t(r){return["table","td","th"].indexOf(_l(r))>=0}function Fh(r){return((gd(r)?r.ownerDocument:r.document)||window.document).documentElement}function KB(r){return _l(r)==="html"?r:r.assignedSlot||r.parentNode||(ZM(r)?r.host:null)||Fh(r)}function U6(r){return!ks(r)||Lu(r).position==="fixed"?null:r.offsetParent}function T2t(r){var e=/firefox/i.test(SO()),t=/Trident/i.test(SO());if(t&&ks(r)){var n=Lu(r);if(n.position==="fixed")return null}var i=KB(r);for(ZM(i)&&(i=i.host);ks(i)&&["html","body"].indexOf(_l(i))<0;){var a=Lu(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||e&&a.willChange==="filter"||e&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function a_(r){for(var e=js(r),t=U6(r);t&&b2t(t)&&Lu(t).position==="static";)t=U6(t);return t&&(_l(t)==="html"||_l(t)==="body"&&Lu(t).position==="static")?e:t||T2t(r)||e}function eN(r){return["top","bottom"].indexOf(r)>=0?"x":"y"}function Ey(r,e,t){return Yf(r,tC(e,t))}function S2t(r,e,t){var n=Ey(r,e,t);return n>t?t:n}function nK(){return{top:0,right:0,bottom:0,left:0}}function iK(r){return Object.assign({},nK(),r)}function aK(r,e){return e.reduce(function(t,n){return t[n]=r,t},{})}var x2t=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,iK(typeof e!="number"?e:aK(e,Ev))};function I2t(r){var e,t=r.state,n=r.name,i=r.options,a=t.elements.arrow,o=t.modifiersData.popperOffsets,s=dl(t.placement),A=eN(s),l=[mo,_s].indexOf(s)>=0,u=l?"height":"width";if(!(!a||!o)){var c=x2t(i.padding,t),h=tN(a),f=A==="y"?vo:mo,d=A==="y"?ys:_s,g=t.rects.reference[u]+t.rects.reference[A]-o[A]-t.rects.popper[u],m=o[A]-t.rects.reference[A],v=a_(a),y=v?A==="y"?v.clientHeight||0:v.clientWidth||0:0,w=g/2-m/2,C=c[f],O=y-h[u]-c[d],F=y/2-h[u]/2+w,I=Ey(C,F,O),T=A;t.modifiersData[n]=(e={},e[T]=I,e.centerOffset=I-F,e)}}function L2t(r){var e=r.state,t=r.options,n=t.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||rK(e.elements.popper,i)&&(e.elements.arrow=i))}const oK={name:"arrow",enabled:!0,phase:"main",fn:I2t,effect:L2t,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Xg(r){return r.split("-")[1]}var O2t={top:"auto",right:"auto",bottom:"auto",left:"auto"};function F2t(r){var e=r.x,t=r.y,n=window,i=n.devicePixelRatio||1;return{x:zg(e*i)/i||0,y:zg(t*i)/i||0}}function D6(r){var e,t=r.popper,n=r.popperRect,i=r.placement,a=r.variation,o=r.offsets,s=r.position,A=r.gpuAcceleration,l=r.adaptive,u=r.roundOffsets,c=r.isFixed,h=o.x,f=h===void 0?0:h,d=o.y,g=d===void 0?0:d,m=typeof u=="function"?u({x:f,y:g}):{x:f,y:g};f=m.x,g=m.y;var v=o.hasOwnProperty("x"),y=o.hasOwnProperty("y"),w=mo,C=vo,O=window;if(l){var F=a_(t),I="clientHeight",T="clientWidth";if(F===js(t)&&(F=Fh(t),Lu(F).position!=="static"&&s==="absolute"&&(I="scrollHeight",T="scrollWidth")),F=F,i===vo||(i===mo||i===_s)&&a===Wg){C=ys;var L=c&&F===O&&O.visualViewport?O.visualViewport.height:F[I];g-=L-n.height,g*=A?1:-1}if(i===mo||(i===vo||i===ys)&&a===Wg){w=_s;var N=c&&F===O&&O.visualViewport?O.visualViewport.width:F[T];f-=N-n.width,f*=A?1:-1}}var x=Object.assign({position:s},l&&O2t),S=u===!0?F2t({x:f,y:g}):{x:f,y:g};if(f=S.x,g=S.y,A){var P;return Object.assign({},x,(P={},P[C]=y?"0":"",P[w]=v?"0":"",P.transform=(O.devicePixelRatio||1)<=1?"translate("+f+"px, "+g+"px)":"translate3d("+f+"px, "+g+"px, 0)",P))}return Object.assign({},x,(e={},e[C]=y?g+"px":"",e[w]=v?f+"px":"",e.transform="",e))}function R2t(r){var e=r.state,t=r.options,n=t.gpuAcceleration,i=n===void 0?!0:n,a=t.adaptive,o=a===void 0?!0:a,s=t.roundOffsets,A=s===void 0?!0:s,l={placement:dl(e.placement),variation:Xg(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,D6(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:A})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,D6(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:A})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const rN={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:R2t,data:{}};var q1={passive:!0};function M2t(r){var e=r.state,t=r.instance,n=r.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,A=js(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return a&&l.forEach(function(u){u.addEventListener("scroll",t.update,q1)}),s&&A.addEventListener("resize",t.update,q1),function(){a&&l.forEach(function(u){u.removeEventListener("scroll",t.update,q1)}),s&&A.removeEventListener("resize",t.update,q1)}}const nN={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:M2t,data:{}};var N2t={left:"right",right:"left",bottom:"top",top:"bottom"};function Lw(r){return r.replace(/left|right|bottom|top/g,function(e){return N2t[e]})}var P2t={start:"end",end:"start"};function Q6(r){return r.replace(/start|end/g,function(e){return P2t[e]})}function iN(r){var e=js(r),t=e.pageXOffset,n=e.pageYOffset;return{scrollLeft:t,scrollTop:n}}function aN(r){return Yg(Fh(r)).left+iN(r).scrollLeft}function U2t(r,e){var t=js(r),n=Fh(r),i=t.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,A=0;if(i){a=i.width,o=i.height;var l=eK();(l||!l&&e==="fixed")&&(s=i.offsetLeft,A=i.offsetTop)}return{width:a,height:o,x:s+aN(r),y:A}}function D2t(r){var e,t=Fh(r),n=iN(r),i=(e=r.ownerDocument)==null?void 0:e.body,a=Yf(t.scrollWidth,t.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Yf(t.scrollHeight,t.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+aN(r),A=-n.scrollTop;return Lu(i||t).direction==="rtl"&&(s+=Yf(t.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:A}}function oN(r){var e=Lu(r),t=e.overflow,n=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+i+n)}function sK(r){return["html","body","#document"].indexOf(_l(r))>=0?r.ownerDocument.body:ks(r)&&oN(r)?r:sK(KB(r))}function Cy(r,e){var t;e===void 0&&(e=[]);var n=sK(r),i=n===((t=r.ownerDocument)==null?void 0:t.body),a=js(n),o=i?[a].concat(a.visualViewport||[],oN(n)?n:[]):n,s=e.concat(o);return i?s:s.concat(Cy(KB(o)))}function xO(r){return Object.assign({},r,{left:r.x,top:r.y,right:r.x+r.width,bottom:r.y+r.height})}function Q2t(r,e){var t=Yg(r,!1,e==="fixed");return t.top=t.top+r.clientTop,t.left=t.left+r.clientLeft,t.bottom=t.top+r.clientHeight,t.right=t.left+r.clientWidth,t.width=r.clientWidth,t.height=r.clientHeight,t.x=t.left,t.y=t.top,t}function k6(r,e,t){return e===XM?xO(U2t(r,t)):gd(e)?Q2t(e,t):xO(D2t(Fh(r)))}function k2t(r){var e=Cy(KB(r)),t=["absolute","fixed"].indexOf(Lu(r).position)>=0,n=t&&ks(r)?a_(r):r;return gd(n)?e.filter(function(i){return gd(i)&&rK(i,n)&&_l(i)!=="body"}):[]}function H2t(r,e,t,n){var i=e==="clippingParents"?k2t(r):[].concat(e),a=[].concat(i,[t]),o=a[0],s=a.reduce(function(A,l){var u=k6(r,l,n);return A.top=Yf(u.top,A.top),A.right=tC(u.right,A.right),A.bottom=tC(u.bottom,A.bottom),A.left=Yf(u.left,A.left),A},k6(r,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function AK(r){var e=r.reference,t=r.element,n=r.placement,i=n?dl(n):null,a=n?Xg(n):null,o=e.x+e.width/2-t.width/2,s=e.y+e.height/2-t.height/2,A;switch(i){case vo:A={x:o,y:e.y-t.height};break;case ys:A={x:o,y:e.y+e.height};break;case _s:A={x:e.x+e.width,y:s};break;case mo:A={x:e.x-t.width,y:s};break;default:A={x:e.x,y:e.y}}var l=i?eN(i):null;if(l!=null){var u=l==="y"?"height":"width";switch(a){case pd:A[l]=A[l]-(e[u]/2-t[u]/2);break;case Wg:A[l]=A[l]+(e[u]/2-t[u]/2);break}}return A}function qg(r,e){e===void 0&&(e={});var t=e,n=t.placement,i=n===void 0?r.placement:n,a=t.strategy,o=a===void 0?r.strategy:a,s=t.boundary,A=s===void 0?$j:s,l=t.rootBoundary,u=l===void 0?XM:l,c=t.elementContext,h=c===void 0?Kp:c,f=t.altBoundary,d=f===void 0?!1:f,g=t.padding,m=g===void 0?0:g,v=iK(typeof m!="number"?m:aK(m,Ev)),y=h===Kp?Vj:Kp,w=r.rects.popper,C=r.elements[d?y:h],O=H2t(gd(C)?C:C.contextElement||Fh(r.elements.popper),A,u,o),F=Yg(r.elements.reference),I=AK({reference:F,element:w,strategy:"absolute",placement:i}),T=xO(Object.assign({},w,I)),L=h===Kp?T:F,N={top:O.top-L.top+v.top,bottom:L.bottom-O.bottom+v.bottom,left:O.left-L.left+v.left,right:L.right-O.right+v.right},x=r.modifiersData.offset;if(h===Kp&&x){var S=x[i];Object.keys(N).forEach(function(P){var U=[_s,ys].indexOf(P)>=0?1:-1,tt=[vo,ys].indexOf(P)>=0?"y":"x";N[P]+=S[tt]*U})}return N}function G2t(r,e){e===void 0&&(e={});var t=e,n=t.placement,i=t.boundary,a=t.rootBoundary,o=t.padding,s=t.flipVariations,A=t.allowedAutoPlacements,l=A===void 0?qM:A,u=Xg(n),c=u?s?TO:TO.filter(function(d){return Xg(d)===u}):Ev,h=c.filter(function(d){return l.indexOf(d)>=0});h.length===0&&(h=c);var f=h.reduce(function(d,g){return d[g]=qg(r,{placement:g,boundary:i,rootBoundary:a,padding:o})[dl(g)],d},{});return Object.keys(f).sort(function(d,g){return f[d]-f[g]})}function $2t(r){if(dl(r)===jB)return[];var e=Lw(r);return[Q6(r),e,Q6(e)]}function V2t(r){var e=r.state,t=r.options,n=r.name;if(!e.modifiersData[n]._skip){for(var i=t.mainAxis,a=i===void 0?!0:i,o=t.altAxis,s=o===void 0?!0:o,A=t.fallbackPlacements,l=t.padding,u=t.boundary,c=t.rootBoundary,h=t.altBoundary,f=t.flipVariations,d=f===void 0?!0:f,g=t.allowedAutoPlacements,m=e.options.placement,v=dl(m),y=v===m,w=A||(y||!d?[Lw(m)]:$2t(m)),C=[m].concat(w).reduce(function(Y,H){return Y.concat(dl(H)===jB?G2t(e,{placement:H,boundary:u,rootBoundary:c,padding:l,flipVariations:d,allowedAutoPlacements:g}):H)},[]),O=e.rects.reference,F=e.rects.popper,I=new Map,T=!0,L=C[0],N=0;N<C.length;N++){var x=C[N],S=dl(x),P=Xg(x)===pd,U=[vo,ys].indexOf(S)>=0,tt=U?"width":"height",q=qg(e,{placement:x,boundary:u,rootBoundary:c,altBoundary:h,padding:l}),rt=U?P?_s:mo:P?ys:vo;O[tt]>F[tt]&&(rt=Lw(rt));var nt=Lw(rt),At=[];if(a&&At.push(q[S]<=0),s&&At.push(q[rt]<=0,q[nt]<=0),At.every(function(Y){return Y})){L=x,T=!1;break}I.set(x,At)}if(T)for(var ct=d?3:1,Tt=function(H){var J=C.find(function(ot){var ut=I.get(ot);if(ut)return ut.slice(0,H).every(function(X){return X})});if(J)return L=J,"break"},M=ct;M>0;M--){var W=Tt(M);if(W==="break")break}e.placement!==L&&(e.modifiersData[n]._skip=!0,e.placement=L,e.reset=!0)}}const lK={name:"flip",enabled:!0,phase:"main",fn:V2t,requiresIfExists:["offset"],data:{_skip:!1}};function H6(r,e,t){return t===void 0&&(t={x:0,y:0}),{top:r.top-e.height-t.y,right:r.right-e.width+t.x,bottom:r.bottom-e.height+t.y,left:r.left-e.width-t.x}}function G6(r){return[vo,_s,ys,mo].some(function(e){return r[e]>=0})}function j2t(r){var e=r.state,t=r.name,n=e.rects.reference,i=e.rects.popper,a=e.modifiersData.preventOverflow,o=qg(e,{elementContext:"reference"}),s=qg(e,{altBoundary:!0}),A=H6(o,n),l=H6(s,i,a),u=G6(A),c=G6(l);e.modifiersData[t]={referenceClippingOffsets:A,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:c},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":c})}const uK={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:j2t};function K2t(r,e,t){var n=dl(r),i=[mo,vo].indexOf(n)>=0?-1:1,a=typeof t=="function"?t(Object.assign({},e,{placement:r})):t,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[mo,_s].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function W2t(r){var e=r.state,t=r.options,n=r.name,i=t.offset,a=i===void 0?[0,0]:i,o=qM.reduce(function(u,c){return u[c]=K2t(c,e.rects,a),u},{}),s=o[e.placement],A=s.x,l=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=A,e.modifiersData.popperOffsets.y+=l),e.modifiersData[n]=o}const cK={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:W2t};function z2t(r){var e=r.state,t=r.name;e.modifiersData[t]=AK({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}const sN={name:"popperOffsets",enabled:!0,phase:"read",fn:z2t,data:{}};function Y2t(r){return r==="x"?"y":"x"}function X2t(r){var e=r.state,t=r.options,n=r.name,i=t.mainAxis,a=i===void 0?!0:i,o=t.altAxis,s=o===void 0?!1:o,A=t.boundary,l=t.rootBoundary,u=t.altBoundary,c=t.padding,h=t.tether,f=h===void 0?!0:h,d=t.tetherOffset,g=d===void 0?0:d,m=qg(e,{boundary:A,rootBoundary:l,padding:c,altBoundary:u}),v=dl(e.placement),y=Xg(e.placement),w=!y,C=eN(v),O=Y2t(C),F=e.modifiersData.popperOffsets,I=e.rects.reference,T=e.rects.popper,L=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,N=typeof L=="number"?{mainAxis:L,altAxis:L}:Object.assign({mainAxis:0,altAxis:0},L),x=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(F){if(a){var P,U=C==="y"?vo:mo,tt=C==="y"?ys:_s,q=C==="y"?"height":"width",rt=F[C],nt=rt+m[U],At=rt-m[tt],ct=f?-T[q]/2:0,Tt=y===pd?I[q]:T[q],M=y===pd?-T[q]:-I[q],W=e.elements.arrow,Y=f&&W?tN(W):{width:0,height:0},H=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:nK(),J=H[U],ot=H[tt],ut=Ey(0,I[q],Y[q]),X=w?I[q]/2-ct-ut-J-N.mainAxis:Tt-ut-J-N.mainAxis,It=w?-I[q]/2+ct+ut+ot+N.mainAxis:M+ut+ot+N.mainAxis,at=e.elements.arrow&&a_(e.elements.arrow),j=at?C==="y"?at.clientTop||0:at.clientLeft||0:0,Z=(P=x==null?void 0:x[C])!=null?P:0,ft=rt+X-Z-j,it=rt+It-Z,V=Ey(f?tC(nt,ft):nt,rt,f?Yf(At,it):At);F[C]=V,S[C]=V-rt}if(s){var Ft,Mt=C==="x"?vo:mo,Et=C==="x"?ys:_s,Bt=F[O],Ct=O==="y"?"height":"width",Rt=Bt+m[Mt],Nt=Bt-m[Et],Dt=[vo,mo].indexOf(v)!==-1,Wt=(Ft=x==null?void 0:x[O])!=null?Ft:0,te=Dt?Rt:Bt-I[Ct]-T[Ct]-Wt+N.altAxis,Ae=Dt?Bt+I[Ct]+T[Ct]-Wt-N.altAxis:Nt,oe=f&&Dt?S2t(te,Bt,Ae):Ey(f?te:Rt,Bt,f?Ae:Nt);F[O]=oe,S[O]=oe-Bt}e.modifiersData[n]=S}}const hK={name:"preventOverflow",enabled:!0,phase:"main",fn:X2t,requiresIfExists:["offset"]};function q2t(r){return{scrollLeft:r.scrollLeft,scrollTop:r.scrollTop}}function Z2t(r){return r===js(r)||!ks(r)?iN(r):q2t(r)}function J2t(r){var e=r.getBoundingClientRect(),t=zg(e.width)/r.offsetWidth||1,n=zg(e.height)/r.offsetHeight||1;return t!==1||n!==1}function tDt(r,e,t){t===void 0&&(t=!1);var n=ks(e),i=ks(e)&&J2t(e),a=Fh(e),o=Yg(r,i,t),s={scrollLeft:0,scrollTop:0},A={x:0,y:0};return(n||!n&&!t)&&((_l(e)!=="body"||oN(a))&&(s=Z2t(e)),ks(e)?(A=Yg(e,!0),A.x+=e.clientLeft,A.y+=e.clientTop):a&&(A.x=aN(a))),{x:o.left+s.scrollLeft-A.x,y:o.top+s.scrollTop-A.y,width:o.width,height:o.height}}function eDt(r){var e=new Map,t=new Set,n=[];r.forEach(function(a){e.set(a.name,a)});function i(a){t.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!t.has(s)){var A=e.get(s);A&&i(A)}}),n.push(a)}return r.forEach(function(a){t.has(a.name)||i(a)}),n}function rDt(r){var e=eDt(r);return tK.reduce(function(t,n){return t.concat(e.filter(function(i){return i.phase===n}))},[])}function nDt(r){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(r())})})),e}}function iDt(r){var e=r.reduce(function(t,n){var i=t[n.name];return t[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,t},{});return Object.keys(e).map(function(t){return e[t]})}var $6={placement:"bottom",modifiers:[],strategy:"absolute"};function V6(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];return!e.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function WB(r){r===void 0&&(r={});var e=r,t=e.defaultModifiers,n=t===void 0?[]:t,i=e.defaultOptions,a=i===void 0?$6:i;return function(s,A,l){l===void 0&&(l=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},$6,a),modifiersData:{},elements:{reference:s,popper:A},attributes:{},styles:{}},c=[],h=!1,f={state:u,setOptions:function(v){var y=typeof v=="function"?v(u.options):v;g(),u.options=Object.assign({},a,u.options,y),u.scrollParents={reference:gd(s)?Cy(s):s.contextElement?Cy(s.contextElement):[],popper:Cy(A)};var w=rDt(iDt([].concat(n,u.options.modifiers)));return u.orderedModifiers=w.filter(function(C){return C.enabled}),d(),f.update()},forceUpdate:function(){if(!h){var v=u.elements,y=v.reference,w=v.popper;if(V6(y,w)){u.rects={reference:tDt(y,a_(w),u.options.strategy==="fixed"),popper:tN(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(N){return u.modifiersData[N.name]=Object.assign({},N.data)});for(var C=0;C<u.orderedModifiers.length;C++){if(u.reset===!0){u.reset=!1,C=-1;continue}var O=u.orderedModifiers[C],F=O.fn,I=O.options,T=I===void 0?{}:I,L=O.name;typeof F=="function"&&(u=F({state:u,options:T,name:L,instance:f})||u)}}}},update:nDt(function(){return new Promise(function(m){f.forceUpdate(),m(u)})}),destroy:function(){g(),h=!0}};if(!V6(s,A))return f;f.setOptions(l).then(function(m){!h&&l.onFirstUpdate&&l.onFirstUpdate(m)});function d(){u.orderedModifiers.forEach(function(m){var v=m.name,y=m.options,w=y===void 0?{}:y,C=m.effect;if(typeof C=="function"){var O=C({state:u,name:v,instance:f,options:w}),F=function(){};c.push(O||F)}})}function g(){c.forEach(function(m){return m()}),c=[]}return f}}var aDt=WB(),oDt=[nN,sN,rN,JM],sDt=WB({defaultModifiers:oDt}),ADt=[nN,sN,rN,JM,cK,lK,hK,oK,uK],lDt=WB({defaultModifiers:ADt});const uDt=Object.freeze(Object.defineProperty({__proto__:null,afterMain:Xj,afterRead:Wj,afterWrite:Jj,applyStyles:JM,arrow:oK,auto:jB,basePlacements:Ev,beforeMain:zj,beforeRead:jj,beforeWrite:qj,bottom:ys,clippingParents:$j,computeStyles:rN,createPopper:lDt,createPopperBase:aDt,createPopperLite:sDt,detectOverflow:qg,end:Wg,eventListeners:nN,flip:lK,hide:uK,left:mo,main:Yj,modifierPhases:tK,offset:cK,placements:qM,popper:Kp,popperGenerator:WB,popperOffsets:sN,preventOverflow:hK,read:Kj,reference:Vj,right:_s,start:pd,top:vo,variationPlacements:TO,viewport:XM,write:Zj},Symbol.toStringTag,{value:"Module"})),cDt=$V(uDt);/*!
* Bootstrap v5.2.3 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/(function(r,e){(function(t,n){r.exports=n(cDt)})(GV,function(t){function n(lt){if(lt&&lt.__esModule)return lt;const B=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(lt){for(const D in lt)if(D!=="default"){const ht=Object.getOwnPropertyDescriptor(lt,D);Object.defineProperty(B,D,ht.get?ht:{enumerable:!0,get:()=>lt[D]})}}return B.default=lt,Object.freeze(B)}const i=n(t),a=1e6,o=1e3,s="transitionend",A=lt=>lt==null?`${lt}`:Object.prototype.toString.call(lt).match(/\s([a-z]+)/i)[1].toLowerCase(),l=lt=>{do lt+=Math.floor(Math.random()*a);while(document.getElementById(lt));return lt},u=lt=>{let B=lt.getAttribute("data-bs-target");if(!B||B==="#"){let D=lt.getAttribute("href");if(!D||!D.includes("#")&&!D.startsWith("."))return null;D.includes("#")&&!D.startsWith("#")&&(D=`#${D.split("#")[1]}`),B=D&&D!=="#"?D.trim():null}return B},c=lt=>{const B=u(lt);return B&&document.querySelector(B)?B:null},h=lt=>{const B=u(lt);return B?document.querySelector(B):null},f=lt=>{if(!lt)return 0;let{transitionDuration:B,transitionDelay:D}=window.getComputedStyle(lt);const ht=Number.parseFloat(B),Qt=Number.parseFloat(D);return!ht&&!Qt?0:(B=B.split(",")[0],D=D.split(",")[0],(Number.parseFloat(B)+Number.parseFloat(D))*o)},d=lt=>{lt.dispatchEvent(new Event(s))},g=lt=>!lt||typeof lt!="object"?!1:(typeof lt.jquery<"u"&&(lt=lt[0]),typeof lt.nodeType<"u"),m=lt=>g(lt)?lt.jquery?lt[0]:lt:typeof lt=="string"&&lt.length>0?document.querySelector(lt):null,v=lt=>{if(!g(lt)||lt.getClientRects().length===0)return!1;const B=getComputedStyle(lt).getPropertyValue("visibility")==="visible",D=lt.closest("details:not([open])");if(!D)return B;if(D!==lt){const ht=lt.closest("summary");if(ht&&ht.parentNode!==D||ht===null)return!1}return B},y=lt=>!lt||lt.nodeType!==Node.ELEMENT_NODE||lt.classList.contains("disabled")?!0:typeof lt.disabled<"u"?lt.disabled:lt.hasAttribute("disabled")&&lt.getAttribute("disabled")!=="false",w=lt=>{if(!document.documentElement.attachShadow)return null;if(typeof lt.getRootNode=="function"){const B=lt.getRootNode();return B instanceof ShadowRoot?B:null}return lt instanceof ShadowRoot?lt:lt.parentNode?w(lt.parentNode):null},C=()=>{},O=lt=>{lt.offsetHeight},F=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,I=[],T=lt=>{document.readyState==="loading"?(I.length||document.addEventListener("DOMContentLoaded",()=>{for(const B of I)B()}),I.push(lt)):lt()},L=()=>document.documentElement.dir==="rtl",N=lt=>{T(()=>{const B=F();if(B){const D=lt.NAME,ht=B.fn[D];B.fn[D]=lt.jQueryInterface,B.fn[D].Constructor=lt,B.fn[D].noConflict=()=>(B.fn[D]=ht,lt.jQueryInterface)}})},x=lt=>{typeof lt=="function"&&lt()},S=(lt,B,D=!0)=>{if(!D){x(lt);return}const ht=5,Qt=f(B)+ht;let re=!1;const Zt=({target:Se})=>{Se===B&&(re=!0,B.removeEventListener(s,Zt),x(lt))};B.addEventListener(s,Zt),setTimeout(()=>{re||d(B)},Qt)},P=(lt,B,D,ht)=>{const Qt=lt.length;let re=lt.indexOf(B);return re===-1?!D&&ht?lt[Qt-1]:lt[0]:(re+=D?1:-1,ht&&(re=(re+Qt)%Qt),lt[Math.max(0,Math.min(re,Qt-1))])},U=/[^.]*(?=\..*)\.|.*/,tt=/\..*/,q=/::\d+$/,rt={};let nt=1;const At={mouseenter:"mouseover",mouseleave:"mouseout"},ct=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function Tt(lt,B){return B&&`${B}::${nt++}`||lt.uidEvent||nt++}function M(lt){const B=Tt(lt);return lt.uidEvent=B,rt[B]=rt[B]||{},rt[B]}function W(lt,B){return function D(ht){return j(ht,{delegateTarget:lt}),D.oneOff&&at.off(lt,ht.type,B),B.apply(lt,[ht])}}function Y(lt,B,D){return function ht(Qt){const re=lt.querySelectorAll(B);for(let{target:Zt}=Qt;Zt&&Zt!==this;Zt=Zt.parentNode)for(const Se of re)if(Se===Zt)return j(Qt,{delegateTarget:Zt}),ht.oneOff&&at.off(lt,Qt.type,B,D),D.apply(Zt,[Qt])}}function H(lt,B,D=null){return Object.values(lt).find(ht=>ht.callable===B&&ht.delegationSelector===D)}function J(lt,B,D){const ht=typeof B=="string",Qt=ht?D:B||D;let re=It(lt);return ct.has(re)||(re=lt),[ht,Qt,re]}function ot(lt,B,D,ht,Qt){if(typeof B!="string"||!lt)return;let[re,Zt,Se]=J(B,D,ht);B in At&&(Zt=(as=>function(os){if(!os.relatedTarget||os.relatedTarget!==os.delegateTarget&&!os.delegateTarget.contains(os.relatedTarget))return as.call(this,os)})(Zt));const na=M(lt),Ra=na[Se]||(na[Se]={}),Wn=H(Ra,Zt,re?D:null);if(Wn){Wn.oneOff=Wn.oneOff&&Qt;return}const Ma=Tt(Zt,B.replace(U,"")),Na=re?Y(lt,D,Zt):W(lt,Zt);Na.delegationSelector=re?D:null,Na.callable=Zt,Na.oneOff=Qt,Na.uidEvent=Ma,Ra[Ma]=Na,lt.addEventListener(Se,Na,re)}function ut(lt,B,D,ht,Qt){const re=H(B[D],ht,Qt);re&&(lt.removeEventListener(D,re,Boolean(Qt)),delete B[D][re.uidEvent])}function X(lt,B,D,ht){const Qt=B[D]||{};for(const re of Object.keys(Qt))if(re.includes(ht)){const Zt=Qt[re];ut(lt,B,D,Zt.callable,Zt.delegationSelector)}}function It(lt){return lt=lt.replace(tt,""),At[lt]||lt}const at={on(lt,B,D,ht){ot(lt,B,D,ht,!1)},one(lt,B,D,ht){ot(lt,B,D,ht,!0)},off(lt,B,D,ht){if(typeof B!="string"||!lt)return;const[Qt,re,Zt]=J(B,D,ht),Se=Zt!==B,na=M(lt),Ra=na[Zt]||{},Wn=B.startsWith(".");if(typeof re<"u"){if(!Object.keys(Ra).length)return;ut(lt,na,Zt,re,Qt?D:null);return}if(Wn)for(const Ma of Object.keys(na))X(lt,na,Ma,B.slice(1));for(const Ma of Object.keys(Ra)){const Na=Ma.replace(q,"");if(!Se||B.includes(Na)){const VA=Ra[Ma];ut(lt,na,Zt,VA.callable,VA.delegationSelector)}}},trigger(lt,B,D){if(typeof B!="string"||!lt)return null;const ht=F(),Qt=It(B),re=B!==Qt;let Zt=null,Se=!0,na=!0,Ra=!1;re&&ht&&(Zt=ht.Event(B,D),ht(lt).trigger(Zt),Se=!Zt.isPropagationStopped(),na=!Zt.isImmediatePropagationStopped(),Ra=Zt.isDefaultPrevented());let Wn=new Event(B,{bubbles:Se,cancelable:!0});return Wn=j(Wn,D),Ra&&Wn.preventDefault(),na&&lt.dispatchEvent(Wn),Wn.defaultPrevented&&Zt&&Zt.preventDefault(),Wn}};function j(lt,B){for(const[D,ht]of Object.entries(B||{}))try{lt[D]=ht}catch{Object.defineProperty(lt,D,{configurable:!0,get(){return ht}})}return lt}const Z=new Map,ft={set(lt,B,D){Z.has(lt)||Z.set(lt,new Map);const ht=Z.get(lt);if(!ht.has(B)&&ht.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(ht.keys())[0]}.`);return}ht.set(B,D)},get(lt,B){return Z.has(lt)&&Z.get(lt).get(B)||null},remove(lt,B){if(!Z.has(lt))return;const D=Z.get(lt);D.delete(B),D.size===0&&Z.delete(lt)}};function it(lt){if(lt==="true")return!0;if(lt==="false")return!1;if(lt===Number(lt).toString())return Number(lt);if(lt===""||lt==="null")return null;if(typeof lt!="string")return lt;try{return JSON.parse(decodeURIComponent(lt))}catch{return lt}}function V(lt){return lt.replace(/[A-Z]/g,B=>`-${B.toLowerCase()}`)}const Ft={setDataAttribute(lt,B,D){lt.setAttribute(`data-bs-${V(B)}`,D)},removeDataAttribute(lt,B){lt.removeAttribute(`data-bs-${V(B)}`)},getDataAttributes(lt){if(!lt)return{};const B={},D=Object.keys(lt.dataset).filter(ht=>ht.startsWith("bs")&&!ht.startsWith("bsConfig"));for(const ht of D){let Qt=ht.replace(/^bs/,"");Qt=Qt.charAt(0).toLowerCase()+Qt.slice(1,Qt.length),B[Qt]=it(lt.dataset[ht])}return B},getDataAttribute(lt,B){return it(lt.getAttribute(`data-bs-${V(B)}`))}};class Mt{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(B){return B=this._mergeConfigObj(B),B=this._configAfterMerge(B),this._typeCheckConfig(B),B}_configAfterMerge(B){return B}_mergeConfigObj(B,D){const ht=g(D)?Ft.getDataAttribute(D,"config"):{};return{...this.constructor.Default,...typeof ht=="object"?ht:{},...g(D)?Ft.getDataAttributes(D):{},...typeof B=="object"?B:{}}}_typeCheckConfig(B,D=this.constructor.DefaultType){for(const ht of Object.keys(D)){const Qt=D[ht],re=B[ht],Zt=g(re)?"element":A(re);if(!new RegExp(Qt).test(Zt))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${ht}" provided type "${Zt}" but expected type "${Qt}".`)}}}const Et="5.2.3";class Bt extends Mt{constructor(B,D){super(),B=m(B),B&&(this._element=B,this._config=this._getConfig(D),ft.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ft.remove(this._element,this.constructor.DATA_KEY),at.off(this._element,this.constructor.EVENT_KEY);for(const B of Object.getOwnPropertyNames(this))this[B]=null}_queueCallback(B,D,ht=!0){S(B,D,ht)}_getConfig(B){return B=this._mergeConfigObj(B,this._element),B=this._configAfterMerge(B),this._typeCheckConfig(B),B}static getInstance(B){return ft.get(m(B),this.DATA_KEY)}static getOrCreateInstance(B,D={}){return this.getInstance(B)||new this(B,typeof D=="object"?D:null)}static get VERSION(){return Et}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(B){return`${B}${this.EVENT_KEY}`}}const Ct=(lt,B="hide")=>{const D=`click.dismiss${lt.EVENT_KEY}`,ht=lt.NAME;at.on(document,D,`[data-bs-dismiss="${ht}"]`,function(Qt){if(["A","AREA"].includes(this.tagName)&&Qt.preventDefault(),y(this))return;const re=h(this)||this.closest(`.${ht}`);lt.getOrCreateInstance(re)[B]()})},Rt="alert",Dt=".bs.alert",Wt=`close${Dt}`,te=`closed${Dt}`,Ae="fade",oe="show";class Jt extends Bt{static get NAME(){return Rt}close(){if(at.trigger(this._element,Wt).defaultPrevented)return;this._element.classList.remove(oe);const D=this._element.classList.contains(Ae);this._queueCallback(()=>this._destroyElement(),this._element,D)}_destroyElement(){this._element.remove(),at.trigger(this._element,te),this.dispose()}static jQueryInterface(B){return this.each(function(){const D=Jt.getOrCreateInstance(this);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B](this)}})}}Ct(Jt,"close"),N(Jt);const fe="button",nr=".bs.button",ke=".data-api",wr="active",Ne='[data-bs-toggle="button"]',Pe=`click${nr}${ke}`;class Hr extends Bt{static get NAME(){return fe}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(wr))}static jQueryInterface(B){return this.each(function(){const D=Hr.getOrCreateInstance(this);B==="toggle"&&D[B]()})}}at.on(document,Pe,Ne,lt=>{lt.preventDefault();const B=lt.target.closest(Ne);Hr.getOrCreateInstance(B).toggle()}),N(Hr);const se={find(lt,B=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(B,lt))},findOne(lt,B=document.documentElement){return Element.prototype.querySelector.call(B,lt)},children(lt,B){return[].concat(...lt.children).filter(D=>D.matches(B))},parents(lt,B){const D=[];let ht=lt.parentNode.closest(B);for(;ht;)D.push(ht),ht=ht.parentNode.closest(B);return D},prev(lt,B){let D=lt.previousElementSibling;for(;D;){if(D.matches(B))return[D];D=D.previousElementSibling}return[]},next(lt,B){let D=lt.nextElementSibling;for(;D;){if(D.matches(B))return[D];D=D.nextElementSibling}return[]},focusableChildren(lt){const B=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(D=>`${D}:not([tabindex^="-"])`).join(",");return this.find(B,lt).filter(D=>!y(D)&&v(D))}},hi="swipe",gr=".bs.swipe",ei=`touchstart${gr}`,Wr=`touchmove${gr}`,zr=`touchend${gr}`,He=`pointerdown${gr}`,Ir=`pointerup${gr}`,Gn="touch",yn="pen",fi="pointer-event",di=40,Ue={endCallback:null,leftCallback:null,rightCallback:null},ri={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Cn extends Mt{constructor(B,D){super(),this._element=B,!(!B||!Cn.isSupported())&&(this._config=this._getConfig(D),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Ue}static get DefaultType(){return ri}static get NAME(){return hi}dispose(){at.off(this._element,gr)}_start(B){if(!this._supportPointerEvents){this._deltaX=B.touches[0].clientX;return}this._eventIsPointerPenTouch(B)&&(this._deltaX=B.clientX)}_end(B){this._eventIsPointerPenTouch(B)&&(this._deltaX=B.clientX-this._deltaX),this._handleSwipe(),x(this._config.endCallback)}_move(B){this._deltaX=B.touches&&B.touches.length>1?0:B.touches[0].clientX-this._deltaX}_handleSwipe(){const B=Math.abs(this._deltaX);if(B<=di)return;const D=B/this._deltaX;this._deltaX=0,D&&x(D>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(at.on(this._element,He,B=>this._start(B)),at.on(this._element,Ir,B=>this._end(B)),this._element.classList.add(fi)):(at.on(this._element,ei,B=>this._start(B)),at.on(this._element,Wr,B=>this._move(B)),at.on(this._element,zr,B=>this._end(B)))}_eventIsPointerPenTouch(B){return this._supportPointerEvents&&(B.pointerType===yn||B.pointerType===Gn)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const pi="carousel",Br=".bs.carousel",_n=".data-api",eo="ArrowLeft",de="ArrowRight",_t=500,$t="next",ne="prev",Ze="left",Lr="right",hn=`slide${Br}`,fn=`slid${Br}`,zo=`keydown${Br}`,gi=`mouseenter${Br}`,Ks=`mouseleave${Br}`,IA=`dragstart${Br}`,Rh=`load${Br}${_n}`,Cv=`click${Br}${_n}`,Ud="carousel",Ws="active",Dd="slide",Bv="carousel-item-end",Mh="carousel-item-start",bv="carousel-item-next",Qd="carousel-item-prev",kd=".active",Ol=".carousel-item",Tv=kd+Ol,$n=".carousel-item img",Hd=".carousel-indicators",Gd="[data-bs-slide], [data-bs-slide-to]",$d='[data-bs-ride="carousel"]',Nh={[eo]:Lr,[de]:Ze},Sv={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},Yo={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Xo extends Bt{constructor(B,D){super(B,D),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=se.findOne(Hd,this._element),this._addEventListeners(),this._config.ride===Ud&&this.cycle()}static get Default(){return Sv}static get DefaultType(){return Yo}static get NAME(){return pi}next(){this._slide($t)}nextWhenVisible(){!document.hidden&&v(this._element)&&this.next()}prev(){this._slide(ne)}pause(){this._isSliding&&d(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){at.one(this._element,fn,()=>this.cycle());return}this.cycle()}}to(B){const D=this._getItems();if(B>D.length-1||B<0)return;if(this._isSliding){at.one(this._element,fn,()=>this.to(B));return}const ht=this._getItemIndex(this._getActive());if(ht===B)return;const Qt=B>ht?$t:ne;this._slide(Qt,D[B])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(B){return B.defaultInterval=B.interval,B}_addEventListeners(){this._config.keyboard&&at.on(this._element,zo,B=>this._keydown(B)),this._config.pause==="hover"&&(at.on(this._element,gi,()=>this.pause()),at.on(this._element,Ks,()=>this._maybeEnableCycle())),this._config.touch&&Cn.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const ht of se.find($n,this._element))at.on(ht,IA,Qt=>Qt.preventDefault());const D={leftCallback:()=>this._slide(this._directionToOrder(Ze)),rightCallback:()=>this._slide(this._directionToOrder(Lr)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),_t+this._config.interval))}};this._swipeHelper=new Cn(this._element,D)}_keydown(B){if(/input|textarea/i.test(B.target.tagName))return;const D=Nh[B.key];D&&(B.preventDefault(),this._slide(this._directionToOrder(D)))}_getItemIndex(B){return this._getItems().indexOf(B)}_setActiveIndicatorElement(B){if(!this._indicatorsElement)return;const D=se.findOne(kd,this._indicatorsElement);D.classList.remove(Ws),D.removeAttribute("aria-current");const ht=se.findOne(`[data-bs-slide-to="${B}"]`,this._indicatorsElement);ht&&(ht.classList.add(Ws),ht.setAttribute("aria-current","true"))}_updateInterval(){const B=this._activeElement||this._getActive();if(!B)return;const D=Number.parseInt(B.getAttribute("data-bs-interval"),10);this._config.interval=D||this._config.defaultInterval}_slide(B,D=null){if(this._isSliding)return;const ht=this._getActive(),Qt=B===$t,re=D||P(this._getItems(),ht,Qt,this._config.wrap);if(re===ht)return;const Zt=this._getItemIndex(re),Se=VA=>at.trigger(this._element,VA,{relatedTarget:re,direction:this._orderToDirection(B),from:this._getItemIndex(ht),to:Zt});if(Se(hn).defaultPrevented||!ht||!re)return;const Ra=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(Zt),this._activeElement=re;const Wn=Qt?Mh:Bv,Ma=Qt?bv:Qd;re.classList.add(Ma),O(re),ht.classList.add(Wn),re.classList.add(Wn);const Na=()=>{re.classList.remove(Wn,Ma),re.classList.add(Ws),ht.classList.remove(Ws,Ma,Wn),this._isSliding=!1,Se(fn)};this._queueCallback(Na,ht,this._isAnimated()),Ra&&this.cycle()}_isAnimated(){return this._element.classList.contains(Dd)}_getActive(){return se.findOne(Tv,this._element)}_getItems(){return se.find(Ol,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(B){return L()?B===Ze?ne:$t:B===Ze?$t:ne}_orderToDirection(B){return L()?B===ne?Ze:Lr:B===ne?Lr:Ze}static jQueryInterface(B){return this.each(function(){const D=Xo.getOrCreateInstance(this,B);if(typeof B=="number"){D.to(B);return}if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B]()}})}}at.on(document,Cv,Gd,function(lt){const B=h(this);if(!B||!B.classList.contains(Ud))return;lt.preventDefault();const D=Xo.getOrCreateInstance(B),ht=this.getAttribute("data-bs-slide-to");if(ht){D.to(ht),D._maybeEnableCycle();return}if(Ft.getDataAttribute(this,"slide")==="next"){D.next(),D._maybeEnableCycle();return}D.prev(),D._maybeEnableCycle()}),at.on(window,Rh,()=>{const lt=se.find($d);for(const B of lt)Xo.getOrCreateInstance(B)}),N(Xo);const Sa="collapse",LA=".bs.collapse",xv=".data-api",jd=`show${LA}`,Iv=`shown${LA}`,Kd=`hide${LA}`,Lv=`hidden${LA}`,Ph=`click${LA}${xv}`,Uh="show",OA="collapse",Hu="collapsing",zs="collapsed",Gu=`:scope .${OA} .${OA}`,$u="collapse-horizontal",Wd="width",ta="height",Ov=".collapse.show, .collapse.collapsing",Vu='[data-bs-toggle="collapse"]',tr={parent:null,toggle:!0},Fv={parent:"(null|element)",toggle:"boolean"};class FA extends Bt{constructor(B,D){super(B,D),this._isTransitioning=!1,this._triggerArray=[];const ht=se.find(Vu);for(const Qt of ht){const re=c(Qt),Zt=se.find(re).filter(Se=>Se===this._element);re!==null&&Zt.length&&this._triggerArray.push(Qt)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return tr}static get DefaultType(){return Fv}static get NAME(){return Sa}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let B=[];if(this._config.parent&&(B=this._getFirstLevelChildren(Ov).filter(Se=>Se!==this._element).map(Se=>FA.getOrCreateInstance(Se,{toggle:!1}))),B.length&&B[0]._isTransitioning||at.trigger(this._element,jd).defaultPrevented)return;for(const Se of B)Se.hide();const ht=this._getDimension();this._element.classList.remove(OA),this._element.classList.add(Hu),this._element.style[ht]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const Qt=()=>{this._isTransitioning=!1,this._element.classList.remove(Hu),this._element.classList.add(OA,Uh),this._element.style[ht]="",at.trigger(this._element,Iv)},Zt=`scroll${ht[0].toUpperCase()+ht.slice(1)}`;this._queueCallback(Qt,this._element,!0),this._element.style[ht]=`${this._element[Zt]}px`}hide(){if(this._isTransitioning||!this._isShown()||at.trigger(this._element,Kd).defaultPrevented)return;const D=this._getDimension();this._element.style[D]=`${this._element.getBoundingClientRect()[D]}px`,O(this._element),this._element.classList.add(Hu),this._element.classList.remove(OA,Uh);for(const Qt of this._triggerArray){const re=h(Qt);re&&!this._isShown(re)&&this._addAriaAndCollapsedClass([Qt],!1)}this._isTransitioning=!0;const ht=()=>{this._isTransitioning=!1,this._element.classList.remove(Hu),this._element.classList.add(OA),at.trigger(this._element,Lv)};this._element.style[D]="",this._queueCallback(ht,this._element,!0)}_isShown(B=this._element){return B.classList.contains(Uh)}_configAfterMerge(B){return B.toggle=Boolean(B.toggle),B.parent=m(B.parent),B}_getDimension(){return this._element.classList.contains($u)?Wd:ta}_initializeChildren(){if(!this._config.parent)return;const B=this._getFirstLevelChildren(Vu);for(const D of B){const ht=h(D);ht&&this._addAriaAndCollapsedClass([D],this._isShown(ht))}}_getFirstLevelChildren(B){const D=se.find(Gu,this._config.parent);return se.find(B,this._config.parent).filter(ht=>!D.includes(ht))}_addAriaAndCollapsedClass(B,D){if(B.length)for(const ht of B)ht.classList.toggle(zs,!D),ht.setAttribute("aria-expanded",D)}static jQueryInterface(B){const D={};return typeof B=="string"&&/show|hide/.test(B)&&(D.toggle=!1),this.each(function(){const ht=FA.getOrCreateInstance(this,D);if(typeof B=="string"){if(typeof ht[B]>"u")throw new TypeError(`No method named "${B}"`);ht[B]()}})}}at.on(document,Ph,Vu,function(lt){(lt.target.tagName==="A"||lt.delegateTarget&&lt.delegateTarget.tagName==="A")&&lt.preventDefault();const B=c(this),D=se.find(B);for(const ht of D)FA.getOrCreateInstance(ht,{toggle:!1}).toggle()}),N(FA);const qo="dropdown",Bs=".bs.dropdown",RA=".data-api",Dh="Escape",zd="Tab",Mv="ArrowUp",Yd="ArrowDown",Qh=2,Fl=`hide${Bs}`,MA=`hidden${Bs}`,Nv=`show${Bs}`,Rl=`shown${Bs}`,ju=`click${Bs}${RA}`,Ml=`keydown${Bs}${RA}`,Xd=`keyup${Bs}${RA}`,Ys="show",qd="dropup",Zd="dropend",Xs="dropstart",NA="dropup-center",Pv="dropdown-center",xa='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Zo=`${xa}.${Ys}`,PA=".dropdown-menu",Nl=".navbar",Uv=".navbar-nav",Ku=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Dv=L()?"top-end":"top-start",kh=L()?"top-start":"top-end",Hh=L()?"bottom-end":"bottom-start",Jd=L()?"bottom-start":"bottom-end",Wu=L()?"left-start":"right-start",Gh=L()?"right-start":"left-start",$h="top",tp="bottom",Qv={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},zu={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Hi extends Bt{constructor(B,D){super(B,D),this._popper=null,this._parent=this._element.parentNode,this._menu=se.next(this._element,PA)[0]||se.prev(this._element,PA)[0]||se.findOne(PA,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Qv}static get DefaultType(){return zu}static get NAME(){return qo}toggle(){return this._isShown()?this.hide():this.show()}show(){if(y(this._element)||this._isShown())return;const B={relatedTarget:this._element};if(!at.trigger(this._element,Nv,B).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Uv))for(const ht of[].concat(...document.body.children))at.on(ht,"mouseover",C);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ys),this._element.classList.add(Ys),at.trigger(this._element,Rl,B)}}hide(){if(y(this._element)||!this._isShown())return;const B={relatedTarget:this._element};this._completeHide(B)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(B){if(!at.trigger(this._element,Fl,B).defaultPrevented){if("ontouchstart"in document.documentElement)for(const ht of[].concat(...document.body.children))at.off(ht,"mouseover",C);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ys),this._element.classList.remove(Ys),this._element.setAttribute("aria-expanded","false"),Ft.removeDataAttribute(this._menu,"popper"),at.trigger(this._element,MA,B)}}_getConfig(B){if(B=super._getConfig(B),typeof B.reference=="object"&&!g(B.reference)&&typeof B.reference.getBoundingClientRect!="function")throw new TypeError(`${qo.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return B}_createPopper(){if(typeof i>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let B=this._element;this._config.reference==="parent"?B=this._parent:g(this._config.reference)?B=m(this._config.reference):typeof this._config.reference=="object"&&(B=this._config.reference);const D=this._getPopperConfig();this._popper=i.createPopper(B,this._menu,D)}_isShown(){return this._menu.classList.contains(Ys)}_getPlacement(){const B=this._parent;if(B.classList.contains(Zd))return Wu;if(B.classList.contains(Xs))return Gh;if(B.classList.contains(NA))return $h;if(B.classList.contains(Pv))return tp;const D=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return B.classList.contains(qd)?D?kh:Dv:D?Jd:Hh}_detectNavbar(){return this._element.closest(Nl)!==null}_getOffset(){const{offset:B}=this._config;return typeof B=="string"?B.split(",").map(D=>Number.parseInt(D,10)):typeof B=="function"?D=>B(D,this._element):B}_getPopperConfig(){const B={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Ft.setDataAttribute(this._menu,"popper","static"),B.modifiers=[{name:"applyStyles",enabled:!1}]),{...B,...typeof this._config.popperConfig=="function"?this._config.popperConfig(B):this._config.popperConfig}}_selectMenuItem({key:B,target:D}){const ht=se.find(Ku,this._menu).filter(Qt=>v(Qt));ht.length&&P(ht,D,B===Yd,!ht.includes(D)).focus()}static jQueryInterface(B){return this.each(function(){const D=Hi.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B]()}})}static clearMenus(B){if(B.button===Qh||B.type==="keyup"&&B.key!==zd)return;const D=se.find(Zo);for(const ht of D){const Qt=Hi.getInstance(ht);if(!Qt||Qt._config.autoClose===!1)continue;const re=B.composedPath(),Zt=re.includes(Qt._menu);if(re.includes(Qt._element)||Qt._config.autoClose==="inside"&&!Zt||Qt._config.autoClose==="outside"&&Zt||Qt._menu.contains(B.target)&&(B.type==="keyup"&&B.key===zd||/input|select|option|textarea|form/i.test(B.target.tagName)))continue;const Se={relatedTarget:Qt._element};B.type==="click"&&(Se.clickEvent=B),Qt._completeHide(Se)}}static dataApiKeydownHandler(B){const D=/input|textarea/i.test(B.target.tagName),ht=B.key===Dh,Qt=[Mv,Yd].includes(B.key);if(!Qt&&!ht||D&&!ht)return;B.preventDefault();const re=this.matches(xa)?this:se.prev(this,xa)[0]||se.next(this,xa)[0]||se.findOne(xa,B.delegateTarget.parentNode),Zt=Hi.getOrCreateInstance(re);if(Qt){B.stopPropagation(),Zt.show(),Zt._selectMenuItem(B);return}Zt._isShown()&&(B.stopPropagation(),Zt.hide(),re.focus())}}at.on(document,Ml,xa,Hi.dataApiKeydownHandler),at.on(document,Ml,PA,Hi.dataApiKeydownHandler),at.on(document,ju,Hi.clearMenus),at.on(document,Xd,Hi.clearMenus),at.on(document,ju,xa,function(lt){lt.preventDefault(),Hi.getOrCreateInstance(this).toggle()}),N(Hi);const Yu=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",qs=".sticky-top",UA="padding-right",E="margin-right";class k{constructor(){this._element=document.body}getWidth(){const B=document.documentElement.clientWidth;return Math.abs(window.innerWidth-B)}hide(){const B=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,UA,D=>D+B),this._setElementAttributes(Yu,UA,D=>D+B),this._setElementAttributes(qs,E,D=>D-B)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,UA),this._resetElementAttributes(Yu,UA),this._resetElementAttributes(qs,E)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(B,D,ht){const Qt=this.getWidth(),re=Zt=>{if(Zt!==this._element&&window.innerWidth>Zt.clientWidth+Qt)return;this._saveInitialAttribute(Zt,D);const Se=window.getComputedStyle(Zt).getPropertyValue(D);Zt.style.setProperty(D,`${ht(Number.parseFloat(Se))}px`)};this._applyManipulationCallback(B,re)}_saveInitialAttribute(B,D){const ht=B.style.getPropertyValue(D);ht&&Ft.setDataAttribute(B,D,ht)}_resetElementAttributes(B,D){const ht=Qt=>{const re=Ft.getDataAttribute(Qt,D);if(re===null){Qt.style.removeProperty(D);return}Ft.removeDataAttribute(Qt,D),Qt.style.setProperty(D,re)};this._applyManipulationCallback(B,ht)}_applyManipulationCallback(B,D){if(g(B)){D(B);return}for(const ht of se.find(B,this._element))D(ht)}}const st="backdrop",gt="fade",xt="show",Ut=`mousedown.bs.${st}`,Yt={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},ce={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class De extends Mt{constructor(B){super(),this._config=this._getConfig(B),this._isAppended=!1,this._element=null}static get Default(){return Yt}static get DefaultType(){return ce}static get NAME(){return st}show(B){if(!this._config.isVisible){x(B);return}this._append();const D=this._getElement();this._config.isAnimated&&O(D),D.classList.add(xt),this._emulateAnimation(()=>{x(B)})}hide(B){if(!this._config.isVisible){x(B);return}this._getElement().classList.remove(xt),this._emulateAnimation(()=>{this.dispose(),x(B)})}dispose(){this._isAppended&&(at.off(this._element,Ut),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const B=document.createElement("div");B.className=this._config.className,this._config.isAnimated&&B.classList.add(gt),this._element=B}return this._element}_configAfterMerge(B){return B.rootElement=m(B.rootElement),B}_append(){if(this._isAppended)return;const B=this._getElement();this._config.rootElement.append(B),at.on(B,Ut,()=>{x(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(B){S(B,this._getElement(),this._config.isAnimated)}}const vr="focustrap",br=".bs.focustrap",Gi=`focusin${br}`,Vn=`keydown.tab${br}`,ni="Tab",ea="forward",vi="backward",Jo={autofocus:!0,trapElement:null},ro={autofocus:"boolean",trapElement:"element"};class bs extends Mt{constructor(B){super(),this._config=this._getConfig(B),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Jo}static get DefaultType(){return ro}static get NAME(){return vr}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),at.off(document,br),at.on(document,Gi,B=>this._handleFocusin(B)),at.on(document,Vn,B=>this._handleKeydown(B)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,at.off(document,br))}_handleFocusin(B){const{trapElement:D}=this._config;if(B.target===document||B.target===D||D.contains(B.target))return;const ht=se.focusableChildren(D);ht.length===0?D.focus():this._lastTabNavDirection===vi?ht[ht.length-1].focus():ht[0].focus()}_handleKeydown(B){B.key===ni&&(this._lastTabNavDirection=B.shiftKey?vi:ea)}}const ep="modal",ha=".bs.modal",Xu=".data-api",Vh="Escape",jh=`hide${ha}`,qu=`hidePrevented${ha}`,fa=`hidden${ha}`,Pl=`show${ha}`,Zu=`shown${ha}`,Ju=`resize${ha}`,Kh=`click.dismiss${ha}`,Ia=`mousedown.dismiss${ha}`,kv=`keydown.dismiss${ha}`,Wh=`click${ha}${Xu}`,zh="modal-open",ts="fade",tc="show",Yh="modal-static",Hv=".modal.show",DA=".modal-dialog",Bo=".modal-body",es='[data-bs-toggle="modal"]',QA={backdrop:!0,focus:!0,keyboard:!0},Ts={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class da extends Bt{constructor(B,D){super(B,D),this._dialog=se.findOne(DA,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new k,this._addEventListeners()}static get Default(){return QA}static get DefaultType(){return Ts}static get NAME(){return ep}toggle(B){return this._isShown?this.hide():this.show(B)}show(B){this._isShown||this._isTransitioning||at.trigger(this._element,Pl,{relatedTarget:B}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(zh),this._adjustDialog(),this._backdrop.show(()=>this._showElement(B)))}hide(){!this._isShown||this._isTransitioning||at.trigger(this._element,jh).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(tc),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){for(const B of[window,this._dialog])at.off(B,ha);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new De({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new bs({trapElement:this._element})}_showElement(B){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const D=se.findOne(Bo,this._dialog);D&&(D.scrollTop=0),O(this._element),this._element.classList.add(tc);const ht=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,at.trigger(this._element,Zu,{relatedTarget:B})};this._queueCallback(ht,this._dialog,this._isAnimated())}_addEventListeners(){at.on(this._element,kv,B=>{if(B.key===Vh){if(this._config.keyboard){B.preventDefault(),this.hide();return}this._triggerBackdropTransition()}}),at.on(window,Ju,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),at.on(this._element,Ia,B=>{at.one(this._element,Kh,D=>{if(!(this._element!==B.target||this._element!==D.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(zh),this._resetAdjustments(),this._scrollBar.reset(),at.trigger(this._element,fa)})}_isAnimated(){return this._element.classList.contains(ts)}_triggerBackdropTransition(){if(at.trigger(this._element,qu).defaultPrevented)return;const D=this._element.scrollHeight>document.documentElement.clientHeight,ht=this._element.style.overflowY;ht==="hidden"||this._element.classList.contains(Yh)||(D||(this._element.style.overflowY="hidden"),this._element.classList.add(Yh),this._queueCallback(()=>{this._element.classList.remove(Yh),this._queueCallback(()=>{this._element.style.overflowY=ht},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const B=this._element.scrollHeight>document.documentElement.clientHeight,D=this._scrollBar.getWidth(),ht=D>0;if(ht&&!B){const Qt=L()?"paddingLeft":"paddingRight";this._element.style[Qt]=`${D}px`}if(!ht&&B){const Qt=L()?"paddingRight":"paddingLeft";this._element.style[Qt]=`${D}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(B,D){return this.each(function(){const ht=da.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof ht[B]>"u")throw new TypeError(`No method named "${B}"`);ht[B](D)}})}}at.on(document,Wh,es,function(lt){const B=h(this);["A","AREA"].includes(this.tagName)&&lt.preventDefault(),at.one(B,Pl,Qt=>{Qt.defaultPrevented||at.one(B,fa,()=>{v(this)&&this.focus()})});const D=se.findOne(Hv);D&&da.getInstance(D).hide(),da.getOrCreateInstance(B).toggle(this)}),Ct(da),N(da);const ec="offcanvas",La=".bs.offcanvas",rc=".data-api",kA=`load${La}${rc}`,rs="Escape",xs="show",HA="showing",Ul="hiding",Dl="offcanvas-backdrop",Zs=".offcanvas.show",Xh=`show${La}`,bo=`shown${La}`,Js=`hide${La}`,dn=`hidePrevented${La}`,pn=`hidden${La}`,jn=`resize${La}`,mi=`click${La}${rc}`,tA=`keydown.dismiss${La}`,GA='[data-bs-toggle="offcanvas"]',nc={backdrop:!0,keyboard:!0,scroll:!1},np={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Is extends Bt{constructor(B,D){super(B,D),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return nc}static get DefaultType(){return np}static get NAME(){return ec}toggle(B){return this._isShown?this.hide():this.show(B)}show(B){if(this._isShown||at.trigger(this._element,Xh,{relatedTarget:B}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new k().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(HA);const ht=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(xs),this._element.classList.remove(HA),at.trigger(this._element,bo,{relatedTarget:B})};this._queueCallback(ht,this._element,!0)}hide(){if(!this._isShown||at.trigger(this._element,Js).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Ul),this._backdrop.hide();const D=()=>{this._element.classList.remove(xs,Ul),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new k().reset(),at.trigger(this._element,pn)};this._queueCallback(D,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const B=()=>{if(this._config.backdrop==="static"){at.trigger(this._element,dn);return}this.hide()},D=Boolean(this._config.backdrop);return new De({className:Dl,isVisible:D,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:D?B:null})}_initializeFocusTrap(){return new bs({trapElement:this._element})}_addEventListeners(){at.on(this._element,tA,B=>{if(B.key===rs){if(!this._config.keyboard){at.trigger(this._element,dn);return}this.hide()}})}static jQueryInterface(B){return this.each(function(){const D=Is.getOrCreateInstance(this,B);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B](this)}})}}at.on(document,mi,GA,function(lt){const B=h(this);if(["A","AREA"].includes(this.tagName)&&lt.preventDefault(),y(this))return;at.one(B,pn,()=>{v(this)&&this.focus()});const D=se.findOne(Zs);D&&D!==B&&Is.getInstance(D).hide(),Is.getOrCreateInstance(B).toggle(this)}),at.on(window,kA,()=>{for(const lt of se.find(Zs))Is.getOrCreateInstance(lt).show()}),at.on(window,jn,()=>{for(const lt of se.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(lt).position!=="fixed"&&Is.getOrCreateInstance(lt).hide()}),Ct(Is),N(Is);const o_=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),s_=/^aria-[\w-]*$/i,A_=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,l_=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,u_=(lt,B)=>{const D=lt.nodeName.toLowerCase();return B.includes(D)?o_.has(D)?Boolean(A_.test(lt.nodeValue)||l_.test(lt.nodeValue)):!0:B.filter(ht=>ht instanceof RegExp).some(ht=>ht.test(D))},ip={"*":["class","dir","id","lang","role",s_],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]};function ap(lt,B,D){if(!lt.length)return lt;if(D&&typeof D=="function")return D(lt);const Qt=new window.DOMParser().parseFromString(lt,"text/html"),re=[].concat(...Qt.body.querySelectorAll("*"));for(const Zt of re){const Se=Zt.nodeName.toLowerCase();if(!Object.keys(B).includes(Se)){Zt.remove();continue}const na=[].concat(...Zt.attributes),Ra=[].concat(B["*"]||[],B[Se]||[]);for(const Wn of na)u_(Wn,Ra)||Zt.removeAttribute(Wn.nodeName)}return Qt.body.innerHTML}const no="TemplateFactory",To={allowList:ip,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},op={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},sp={entry:"(string|element|function|null)",selector:"(string|element)"};class c_ extends Mt{constructor(B){super(),this._config=this._getConfig(B)}static get Default(){return To}static get DefaultType(){return op}static get NAME(){return no}getContent(){return Object.values(this._config.content).map(B=>this._resolvePossibleFunction(B)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(B){return this._checkContent(B),this._config.content={...this._config.content,...B},this}toHtml(){const B=document.createElement("div");B.innerHTML=this._maybeSanitize(this._config.template);for(const[Qt,re]of Object.entries(this._config.content))this._setContent(B,re,Qt);const D=B.children[0],ht=this._resolvePossibleFunction(this._config.extraClass);return ht&&D.classList.add(...ht.split(" ")),D}_typeCheckConfig(B){super._typeCheckConfig(B),this._checkContent(B.content)}_checkContent(B){for(const[D,ht]of Object.entries(B))super._typeCheckConfig({selector:D,entry:ht},sp)}_setContent(B,D,ht){const Qt=se.findOne(ht,B);if(Qt){if(D=this._resolvePossibleFunction(D),!D){Qt.remove();return}if(g(D)){this._putElementInTemplate(m(D),Qt);return}if(this._config.html){Qt.innerHTML=this._maybeSanitize(D);return}Qt.textContent=D}}_maybeSanitize(B){return this._config.sanitize?ap(B,this._config.allowList,this._config.sanitizeFn):B}_resolvePossibleFunction(B){return typeof B=="function"?B(this):B}_putElementInTemplate(B,D){if(this._config.html){D.innerHTML="",D.append(B);return}D.textContent=B.textContent}}const Ap="tooltip",lp=new Set(["sanitize","allowList","sanitizeFn"]),qh="fade",h_="modal",ic="show",Gv=".tooltip-inner",Zh=`.${h_}`,up="hide.bs.modal",Jh="hover",$v="focus",f_="click",YB="manual",XB="hide",qB="hidden",ZB="show",JB="shown",Vv="inserted",jv="click",tf="focusin",tb="focusout",eb="mouseenter",d_="mouseleave",rb={AUTO:"auto",TOP:"top",RIGHT:L()?"left":"right",BOTTOM:"bottom",LEFT:L()?"right":"left"},nb={allowList:ip,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},ib={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Ql extends Bt{constructor(B,D){if(typeof i>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(B,D),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return nb}static get DefaultType(){return ib}static get NAME(){return Ap}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),at.off(this._element.closest(Zh),up,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const B=at.trigger(this._element,this.constructor.eventName(ZB)),ht=(w(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(B.defaultPrevented||!ht)return;this._disposePopper();const Qt=this._getTipElement();this._element.setAttribute("aria-describedby",Qt.getAttribute("id"));const{container:re}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(re.append(Qt),at.trigger(this._element,this.constructor.eventName(Vv))),this._popper=this._createPopper(Qt),Qt.classList.add(ic),"ontouchstart"in document.documentElement)for(const Se of[].concat(...document.body.children))at.on(Se,"mouseover",C);const Zt=()=>{at.trigger(this._element,this.constructor.eventName(JB)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(Zt,this.tip,this._isAnimated())}hide(){if(!this._isShown()||at.trigger(this._element,this.constructor.eventName(XB)).defaultPrevented)return;if(this._getTipElement().classList.remove(ic),"ontouchstart"in document.documentElement)for(const Qt of[].concat(...document.body.children))at.off(Qt,"mouseover",C);this._activeTrigger[f_]=!1,this._activeTrigger[$v]=!1,this._activeTrigger[Jh]=!1,this._isHovered=null;const ht=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),at.trigger(this._element,this.constructor.eventName(qB)))};this._queueCallback(ht,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(B){const D=this._getTemplateFactory(B).toHtml();if(!D)return null;D.classList.remove(qh,ic),D.classList.add(`bs-${this.constructor.NAME}-auto`);const ht=l(this.constructor.NAME).toString();return D.setAttribute("id",ht),this._isAnimated()&&D.classList.add(qh),D}setContent(B){this._newContent=B,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(B){return this._templateFactory?this._templateFactory.changeContent(B):this._templateFactory=new c_({...this._config,content:B,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[Gv]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(B){return this.constructor.getOrCreateInstance(B.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(qh)}_isShown(){return this.tip&&this.tip.classList.contains(ic)}_createPopper(B){const D=typeof this._config.placement=="function"?this._config.placement.call(this,B,this._element):this._config.placement,ht=rb[D.toUpperCase()];return i.createPopper(this._element,B,this._getPopperConfig(ht))}_getOffset(){const{offset:B}=this._config;return typeof B=="string"?B.split(",").map(D=>Number.parseInt(D,10)):typeof B=="function"?D=>B(D,this._element):B}_resolvePossibleFunction(B){return typeof B=="function"?B.call(this._element):B}_getPopperConfig(B){const D={placement:B,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:ht=>{this._getTipElement().setAttribute("data-popper-placement",ht.state.placement)}}]};return{...D,...typeof this._config.popperConfig=="function"?this._config.popperConfig(D):this._config.popperConfig}}_setListeners(){const B=this._config.trigger.split(" ");for(const D of B)if(D==="click")at.on(this._element,this.constructor.eventName(jv),this._config.selector,ht=>{this._initializeOnDelegatedTarget(ht).toggle()});else if(D!==YB){const ht=D===Jh?this.constructor.eventName(eb):this.constructor.eventName(tf),Qt=D===Jh?this.constructor.eventName(d_):this.constructor.eventName(tb);at.on(this._element,ht,this._config.selector,re=>{const Zt=this._initializeOnDelegatedTarget(re);Zt._activeTrigger[re.type==="focusin"?$v:Jh]=!0,Zt._enter()}),at.on(this._element,Qt,this._config.selector,re=>{const Zt=this._initializeOnDelegatedTarget(re);Zt._activeTrigger[re.type==="focusout"?$v:Jh]=Zt._element.contains(re.relatedTarget),Zt._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},at.on(this._element.closest(Zh),up,this._hideModalHandler)}_fixTitle(){const B=this._element.getAttribute("title");B&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",B),this._element.setAttribute("data-bs-original-title",B),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(B,D){clearTimeout(this._timeout),this._timeout=setTimeout(B,D)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(B){const D=Ft.getDataAttributes(this._element);for(const ht of Object.keys(D))lp.has(ht)&&delete D[ht];return B={...D,...typeof B=="object"&&B?B:{}},B=this._mergeConfigObj(B),B=this._configAfterMerge(B),this._typeCheckConfig(B),B}_configAfterMerge(B){return B.container=B.container===!1?document.body:m(B.container),typeof B.delay=="number"&&(B.delay={show:B.delay,hide:B.delay}),typeof B.title=="number"&&(B.title=B.title.toString()),typeof B.content=="number"&&(B.content=B.content.toString()),B}_getDelegateConfig(){const B={};for(const D in this._config)this.constructor.Default[D]!==this._config[D]&&(B[D]=this._config[D]);return B.selector=!1,B.trigger="manual",B}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(B){return this.each(function(){const D=Ql.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B]()}})}}N(Ql);const $A="popover",ns=".popover-header",eA=".popover-body",ab={...Ql.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},p_={...Ql.DefaultType,content:"(null|string|element|function)"};class is extends Ql{static get Default(){return ab}static get DefaultType(){return p_}static get NAME(){return $A}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ns]:this._getTitle(),[eA]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(B){return this.each(function(){const D=is.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B]()}})}}N(is);const So="scrollspy",Kv=".bs.scrollspy",g_=".data-api",v_=`activate${Kv}`,Wv=`click${Kv}`,m_=`load${Kv}${g_}`,ob="dropdown-item",rA="active",cp='[data-bs-spy="scroll"]',kl="[href]",zv=".nav, .list-group",Yv=".nav-link",Ab=`${Yv}, .nav-item > ${Yv}, .list-group-item`,lb=".dropdown",ub=".dropdown-toggle",cb={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},hb={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class ef extends Bt{constructor(B,D){super(B,D),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return cb}static get DefaultType(){return hb}static get NAME(){return So}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const B of this._observableSections.values())this._observer.observe(B)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(B){return B.target=m(B.target)||document.body,B.rootMargin=B.offset?`${B.offset}px 0px -30%`:B.rootMargin,typeof B.threshold=="string"&&(B.threshold=B.threshold.split(",").map(D=>Number.parseFloat(D))),B}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(at.off(this._config.target,Wv),at.on(this._config.target,Wv,kl,B=>{const D=this._observableSections.get(B.target.hash);if(D){B.preventDefault();const ht=this._rootElement||window,Qt=D.offsetTop-this._element.offsetTop;if(ht.scrollTo){ht.scrollTo({top:Qt,behavior:"smooth"});return}ht.scrollTop=Qt}}))}_getNewObserver(){const B={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(D=>this._observerCallback(D),B)}_observerCallback(B){const D=Zt=>this._targetLinks.get(`#${Zt.target.id}`),ht=Zt=>{this._previousScrollData.visibleEntryTop=Zt.target.offsetTop,this._process(D(Zt))},Qt=(this._rootElement||document.documentElement).scrollTop,re=Qt>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=Qt;for(const Zt of B){if(!Zt.isIntersecting){this._activeTarget=null,this._clearActiveClass(D(Zt));continue}const Se=Zt.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(re&&Se){if(ht(Zt),!Qt)return;continue}!re&&!Se&&ht(Zt)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const B=se.find(kl,this._config.target);for(const D of B){if(!D.hash||y(D))continue;const ht=se.findOne(D.hash,this._element);v(ht)&&(this._targetLinks.set(D.hash,D),this._observableSections.set(D.hash,ht))}}_process(B){this._activeTarget!==B&&(this._clearActiveClass(this._config.target),this._activeTarget=B,B.classList.add(rA),this._activateParents(B),at.trigger(this._element,v_,{relatedTarget:B}))}_activateParents(B){if(B.classList.contains(ob)){se.findOne(ub,B.closest(lb)).classList.add(rA);return}for(const D of se.parents(B,zv))for(const ht of se.prev(D,Ab))ht.classList.add(rA)}_clearActiveClass(B){B.classList.remove(rA);const D=se.find(`${kl}.${rA}`,B);for(const ht of D)ht.classList.remove(rA)}static jQueryInterface(B){return this.each(function(){const D=ef.getOrCreateInstance(this,B);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B]()}})}}at.on(window,m_,()=>{for(const lt of se.find(cp))ef.getOrCreateInstance(lt)}),N(ef);const y_="tab",Hl=".bs.tab",fb=`hide${Hl}`,__=`hidden${Hl}`,p=`show${Hl}`,_=`shown${Hl}`,b=`click${Hl}`,R=`keydown${Hl}`,Q=`load${Hl}`,G="ArrowLeft",$="ArrowRight",K="ArrowUp",z="ArrowDown",et="active",mt="fade",Lt="show",Ot="dropdown",St=".dropdown-toggle",Vt=".dropdown-menu",Pt=":not(.dropdown-toggle)",wt='.list-group, .nav, [role="tablist"]',bt=".nav-item, .list-group-item",Ht=`.nav-link${Pt}, .list-group-item${Pt}, [role="tab"]${Pt}`,jt='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Gt=`${Ht}, ${jt}`,pe=`.${et}[data-bs-toggle="tab"], .${et}[data-bs-toggle="pill"], .${et}[data-bs-toggle="list"]`;class ie extends Bt{constructor(B){super(B),this._parent=this._element.closest(wt),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),at.on(this._element,R,D=>this._keydown(D)))}static get NAME(){return y_}show(){const B=this._element;if(this._elemIsActive(B))return;const D=this._getActiveElem(),ht=D?at.trigger(D,fb,{relatedTarget:B}):null;at.trigger(B,p,{relatedTarget:D}).defaultPrevented||ht&&ht.defaultPrevented||(this._deactivate(D,B),this._activate(B,D))}_activate(B,D){if(!B)return;B.classList.add(et),this._activate(h(B));const ht=()=>{if(B.getAttribute("role")!=="tab"){B.classList.add(Lt);return}B.removeAttribute("tabindex"),B.setAttribute("aria-selected",!0),this._toggleDropDown(B,!0),at.trigger(B,_,{relatedTarget:D})};this._queueCallback(ht,B,B.classList.contains(mt))}_deactivate(B,D){if(!B)return;B.classList.remove(et),B.blur(),this._deactivate(h(B));const ht=()=>{if(B.getAttribute("role")!=="tab"){B.classList.remove(Lt);return}B.setAttribute("aria-selected",!1),B.setAttribute("tabindex","-1"),this._toggleDropDown(B,!1),at.trigger(B,__,{relatedTarget:D})};this._queueCallback(ht,B,B.classList.contains(mt))}_keydown(B){if(![G,$,K,z].includes(B.key))return;B.stopPropagation(),B.preventDefault();const D=[$,z].includes(B.key),ht=P(this._getChildren().filter(Qt=>!y(Qt)),B.target,D,!0);ht&&(ht.focus({preventScroll:!0}),ie.getOrCreateInstance(ht).show())}_getChildren(){return se.find(Gt,this._parent)}_getActiveElem(){return this._getChildren().find(B=>this._elemIsActive(B))||null}_setInitialAttributes(B,D){this._setAttributeIfNotExists(B,"role","tablist");for(const ht of D)this._setInitialAttributesOnChild(ht)}_setInitialAttributesOnChild(B){B=this._getInnerElement(B);const D=this._elemIsActive(B),ht=this._getOuterElement(B);B.setAttribute("aria-selected",D),ht!==B&&this._setAttributeIfNotExists(ht,"role","presentation"),D||B.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(B,"role","tab"),this._setInitialAttributesOnTargetPanel(B)}_setInitialAttributesOnTargetPanel(B){const D=h(B);D&&(this._setAttributeIfNotExists(D,"role","tabpanel"),B.id&&this._setAttributeIfNotExists(D,"aria-labelledby",`#${B.id}`))}_toggleDropDown(B,D){const ht=this._getOuterElement(B);if(!ht.classList.contains(Ot))return;const Qt=(re,Zt)=>{const Se=se.findOne(re,ht);Se&&Se.classList.toggle(Zt,D)};Qt(St,et),Qt(Vt,Lt),ht.setAttribute("aria-expanded",D)}_setAttributeIfNotExists(B,D,ht){B.hasAttribute(D)||B.setAttribute(D,ht)}_elemIsActive(B){return B.classList.contains(et)}_getInnerElement(B){return B.matches(Gt)?B:se.findOne(Gt,B)}_getOuterElement(B){return B.closest(bt)||B}static jQueryInterface(B){return this.each(function(){const D=ie.getOrCreateInstance(this);if(typeof B=="string"){if(D[B]===void 0||B.startsWith("_")||B==="constructor")throw new TypeError(`No method named "${B}"`);D[B]()}})}}at.on(document,b,jt,function(lt){["A","AREA"].includes(this.tagName)&&lt.preventDefault(),!y(this)&&ie.getOrCreateInstance(this).show()}),at.on(window,Q,()=>{for(const lt of se.find(pe))ie.getOrCreateInstance(lt)}),N(ie);const Ge="toast",mr=".bs.toast",Xr=`mouseover${mr}`,Pr=`mouseout${mr}`,Tr=`focusin${mr}`,gn=`focusout${mr}`,an=`hide${mr}`,or=`hidden${mr}`,ii=`show${mr}`,Oa=`shown${mr}`,ai="fade",pa="hide",kr="show",ra="showing",io={animation:"boolean",autohide:"boolean",delay:"number"},Fi={animation:!0,autohide:!0,delay:5e3};class Kn extends Bt{constructor(B,D){super(B,D),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Fi}static get DefaultType(){return io}static get NAME(){return Ge}show(){if(at.trigger(this._element,ii).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(ai);const D=()=>{this._element.classList.remove(ra),at.trigger(this._element,Oa),this._maybeScheduleHide()};this._element.classList.remove(pa),O(this._element),this._element.classList.add(kr,ra),this._queueCallback(D,this._element,this._config.animation)}hide(){if(!this.isShown()||at.trigger(this._element,an).defaultPrevented)return;const D=()=>{this._element.classList.add(pa),this._element.classList.remove(ra,kr),at.trigger(this._element,or)};this._element.classList.add(ra),this._queueCallback(D,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(kr),super.dispose()}isShown(){return this._element.classList.contains(kr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(B,D){switch(B.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=D;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=D;break}}if(D){this._clearTimeout();return}const ht=B.relatedTarget;this._element===ht||this._element.contains(ht)||this._maybeScheduleHide()}_setListeners(){at.on(this._element,Xr,B=>this._onInteraction(B,!0)),at.on(this._element,Pr,B=>this._onInteraction(B,!1)),at.on(this._element,Tr,B=>this._onInteraction(B,!0)),at.on(this._element,gn,B=>this._onInteraction(B,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(B){return this.each(function(){const D=Kn.getOrCreateInstance(this,B);if(typeof B=="string"){if(typeof D[B]>"u")throw new TypeError(`No method named "${B}"`);D[B](this)}})}}return Ct(Kn),N(Kn),{Alert:Jt,Button:Hr,Carousel:Xo,Collapse:FA,Dropdown:Hi,Modal:da,Offcanvas:Is,Popover:is,ScrollSpy:ef,Tab:ie,Toast:Kn,Tooltip:Ql}})})(E2t);let hDt=PNt({history:ZMt(),routes:w2t});const zB=Bk(HY);zB.use(hDt);zB.use(AL);zB.use(pO.LoadingPlugin);zB.mount("#app");export{uj as A,ku as B,Kg as C,pDt as D,i5t as E,ya as F,Oh as G,gDt as H,nF as T,DY as _,Pn as a,tF as b,Yi as c,Mr as d,iz as e,NW as f,md as g,p2t as h,y2t as i,eUt as j,eF as k,vDt as l,tz as m,dDt as n,ti as o,MW as p,MMt as q,R4 as r,mDt as s,MK as t,Fo as u,Pw as v,VO as w,vC as x,i0 as y,Eg as z};