UNPKG

trifid-plugin-yasgui

Version:
3 lines 391 kB
import{$ as xr,$a as pu,A as Vc,Aa as vr,B as $c,Ba as Er,C as Jc,Ca as Ta,D as Ma,Da as Sa,E as Ls,Ea as Mr,F as Qc,Fa as Ai,G as Os,Ga as Nn,H as B,Ha as Ra,I as tu,Ia as Lt,J as _r,Ja as Zi,K as Pn,Ka as wa,L as Ns,La as Cr,M as Zt,Ma as fu,N as Ii,Na as mu,O as Se,Oa as zs,P as Fs,Pa as Ot,Q as eu,Qa as Hi,R as vt,Ra as Ht,S as si,Sa as Vt,T as An,Ta as Vi,U as iu,Ua as $i,V as Ds,Va as Ji,W as oi,Wa as bi,X as Gs,Xa as Qi,Y as bn,Ya as ai,Z as nu,Za as tn,_ as ks,_a as gu,a as Rp,aa as js,ab as Ia,b as Yc,ba as Us,bb as _u,c as bt,ca as Re,cb as xu,d as ni,da as ru,db as Pa,e as As,ea as yr,eb as yu,f as Bc,fa as Ca,fb as ge,g as ri,ga as jt,gb as ae,h as wn,ha as Pi,hb as Ie,i as qc,ia as Ue,ib as vu,j as Tt,ja as Xs,jb as Eu,k as Kt,ka as tt,kb as Mu,l as Kc,la as _t,lb as Cu,m as me,ma as Ln,mb as Tu,n as je,na as su,nb as Su,o as wi,oa as ou,ob as Ru,p as Zc,pa as au,pb as en,q as In,qa as hu,qb as wu,r as Ki,ra as lu,rb as Fn,s as bs,sa as lt,sb as Iu,t as U,ta as cu,tb as Pu,u as Z,ua as Xe,v as et,va as uu,w as Hc,wa as On,x as W,xa as we,y as Y,ya as It,z as St,za as du}from"./chunk-AIKUHXGA.js";var ol=Rp((rl,sl)=>{(function(i,t){typeof rl=="object"&&typeof sl<"u"?sl.exports=t():typeof define=="function"&&define.amd?define(t):(i=i||self).RBush=t()})(rl,function(){"use strict";function i(f,g,x,y,v){(function E(M,C,T,I,b){for(;I>T;){if(I-T>600){var L=I-T+1,P=C-T+1,F=Math.log(L),$=.5*Math.exp(2*F/3),X=.5*Math.sqrt(F*$*(L-$)/L)*(P-L/2<0?-1:1),O=Math.max(T,Math.floor(C-P*$/L+X)),N=Math.min(I,Math.floor(C+(L-P)*$/L+X));E(M,C,O,N,b)}var D=M[C],H=T,K=I;for(t(M,T,C),b(M[I],D)>0&&t(M,T,I);H<K;){for(t(M,H,K),H++,K--;b(M[H],D)<0;)H++;for(;b(M[K],D)>0;)K--}b(M[T],D)===0?t(M,T,K):t(M,++K,I),K<=C&&(T=K+1),C<=K&&(I=K-1)}})(f,g,x||0,y||f.length-1,v||e)}function t(f,g,x){var y=f[g];f[g]=f[x],f[x]=y}function e(f,g){return f<g?-1:f>g?1:0}var n=function(f){f===void 0&&(f=9),this._maxEntries=Math.max(4,f),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function r(f,g,x){if(!x)return g.indexOf(f);for(var y=0;y<g.length;y++)if(x(f,g[y]))return y;return-1}function s(f,g){o(f,0,f.children.length,g,f)}function o(f,g,x,y,v){v||(v=p(null)),v.minX=1/0,v.minY=1/0,v.maxX=-1/0,v.maxY=-1/0;for(var E=g;E<x;E++){var M=f.children[E];a(v,f.leaf?y(M):M)}return v}function a(f,g){return f.minX=Math.min(f.minX,g.minX),f.minY=Math.min(f.minY,g.minY),f.maxX=Math.max(f.maxX,g.maxX),f.maxY=Math.max(f.maxY,g.maxY),f}function h(f,g){return f.minX-g.minX}function l(f,g){return f.minY-g.minY}function c(f){return(f.maxX-f.minX)*(f.maxY-f.minY)}function u(f){return f.maxX-f.minX+(f.maxY-f.minY)}function d(f,g){return f.minX<=g.minX&&f.minY<=g.minY&&g.maxX<=f.maxX&&g.maxY<=f.maxY}function m(f,g){return g.minX<=f.maxX&&g.minY<=f.maxY&&g.maxX>=f.minX&&g.maxY>=f.minY}function p(f){return{children:f,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(f,g,x,y,v){for(var E=[g,x];E.length;)if(!((x=E.pop())-(g=E.pop())<=y)){var M=g+Math.ceil((x-g)/y/2)*y;i(f,M,g,x,v),E.push(g,M,M,x)}}return n.prototype.all=function(){return this._all(this.data,[])},n.prototype.search=function(f){var g=this.data,x=[];if(!m(f,g))return x;for(var y=this.toBBox,v=[];g;){for(var E=0;E<g.children.length;E++){var M=g.children[E],C=g.leaf?y(M):M;m(f,C)&&(g.leaf?x.push(M):d(f,C)?this._all(M,x):v.push(M))}g=v.pop()}return x},n.prototype.collides=function(f){var g=this.data;if(!m(f,g))return!1;for(var x=[];g;){for(var y=0;y<g.children.length;y++){var v=g.children[y],E=g.leaf?this.toBBox(v):v;if(m(f,E)){if(g.leaf||d(f,E))return!0;x.push(v)}}g=x.pop()}return!1},n.prototype.load=function(f){if(!f||!f.length)return this;if(f.length<this._minEntries){for(var g=0;g<f.length;g++)this.insert(f[g]);return this}var x=this._build(f.slice(),0,f.length-1,0);if(this.data.children.length)if(this.data.height===x.height)this._splitRoot(this.data,x);else{if(this.data.height<x.height){var y=this.data;this.data=x,x=y}this._insert(x,this.data.height-x.height-1,!0)}else this.data=x;return this},n.prototype.insert=function(f){return f&&this._insert(f,this.data.height-1),this},n.prototype.clear=function(){return this.data=p([]),this},n.prototype.remove=function(f,g){if(!f)return this;for(var x,y,v,E=this.data,M=this.toBBox(f),C=[],T=[];E||C.length;){if(E||(E=C.pop(),y=C[C.length-1],x=T.pop(),v=!0),E.leaf){var I=r(f,E.children,g);if(I!==-1)return E.children.splice(I,1),C.push(E),this._condense(C),this}v||E.leaf||!d(E,M)?y?(x++,E=y.children[x],v=!1):E=null:(C.push(E),T.push(x),x=0,y=E,E=E.children[0])}return this},n.prototype.toBBox=function(f){return f},n.prototype.compareMinX=function(f,g){return f.minX-g.minX},n.prototype.compareMinY=function(f,g){return f.minY-g.minY},n.prototype.toJSON=function(){return this.data},n.prototype.fromJSON=function(f){return this.data=f,this},n.prototype._all=function(f,g){for(var x=[];f;)f.leaf?g.push.apply(g,f.children):x.push.apply(x,f.children),f=x.pop();return g},n.prototype._build=function(f,g,x,y){var v,E=x-g+1,M=this._maxEntries;if(E<=M)return s(v=p(f.slice(g,x+1)),this.toBBox),v;y||(y=Math.ceil(Math.log(E)/Math.log(M)),M=Math.ceil(E/Math.pow(M,y-1))),(v=p([])).leaf=!1,v.height=y;var C=Math.ceil(E/M),T=C*Math.ceil(Math.sqrt(M));_(f,g,x,T,this.compareMinX);for(var I=g;I<=x;I+=T){var b=Math.min(I+T-1,x);_(f,I,b,C,this.compareMinY);for(var L=I;L<=b;L+=C){var P=Math.min(L+C-1,b);v.children.push(this._build(f,L,P,y-1))}}return s(v,this.toBBox),v},n.prototype._chooseSubtree=function(f,g,x,y){for(;y.push(g),!g.leaf&&y.length-1!==x;){for(var v=1/0,E=1/0,M=void 0,C=0;C<g.children.length;C++){var T=g.children[C],I=c(T),b=(L=f,P=T,(Math.max(P.maxX,L.maxX)-Math.min(P.minX,L.minX))*(Math.max(P.maxY,L.maxY)-Math.min(P.minY,L.minY))-I);b<E?(E=b,v=I<v?I:v,M=T):b===E&&I<v&&(v=I,M=T)}g=M||g.children[0]}var L,P;return g},n.prototype._insert=function(f,g,x){var y=x?f:this.toBBox(f),v=[],E=this._chooseSubtree(y,this.data,g,v);for(E.children.push(f),a(E,y);g>=0&&v[g].children.length>this._maxEntries;)this._split(v,g),g--;this._adjustParentBBoxes(y,v,g)},n.prototype._split=function(f,g){var x=f[g],y=x.children.length,v=this._minEntries;this._chooseSplitAxis(x,v,y);var E=this._chooseSplitIndex(x,v,y),M=p(x.children.splice(E,x.children.length-E));M.height=x.height,M.leaf=x.leaf,s(x,this.toBBox),s(M,this.toBBox),g?f[g-1].children.push(M):this._splitRoot(x,M)},n.prototype._splitRoot=function(f,g){this.data=p([f,g]),this.data.height=f.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},n.prototype._chooseSplitIndex=function(f,g,x){for(var y,v,E,M,C,T,I,b=1/0,L=1/0,P=g;P<=x-g;P++){var F=o(f,0,P,this.toBBox),$=o(f,P,x,this.toBBox),X=(v=F,E=$,M=void 0,C=void 0,T=void 0,I=void 0,M=Math.max(v.minX,E.minX),C=Math.max(v.minY,E.minY),T=Math.min(v.maxX,E.maxX),I=Math.min(v.maxY,E.maxY),Math.max(0,T-M)*Math.max(0,I-C)),O=c(F)+c($);X<b?(b=X,y=P,L=O<L?O:L):X===b&&O<L&&(L=O,y=P)}return y||x-g},n.prototype._chooseSplitAxis=function(f,g,x){var y=f.leaf?this.compareMinX:h,v=f.leaf?this.compareMinY:l;this._allDistMargin(f,g,x,y)<this._allDistMargin(f,g,x,v)&&f.children.sort(y)},n.prototype._allDistMargin=function(f,g,x,y){f.children.sort(y);for(var v=this.toBBox,E=o(f,0,g,v),M=o(f,x-g,x,v),C=u(E)+u(M),T=g;T<x-g;T++){var I=f.children[T];a(E,f.leaf?v(I):I),C+=u(E)}for(var b=x-g-1;b>=g;b--){var L=f.children[b];a(M,f.leaf?v(L):L),C+=u(M)}return C},n.prototype._adjustParentBBoxes=function(f,g,x){for(var y=x;y>=0;y--)a(g[y],f)},n.prototype._condense=function(f){for(var g=f.length-1,x=void 0;g>=0;g--)f[g].children.length===0?g>0?(x=f[g-1].children).splice(x.indexOf(f[g]),1):this.clear():s(f[g],this.toBBox)},n})});var Ws=globalThis,Ys=Ws.ShadowRoot&&(Ws.ShadyCSS===void 0||Ws.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Aa=Symbol(),Au=new WeakMap,Tr=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==Aa)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Ys&&t===void 0){let n=e!==void 0&&e.length===1;n&&(t=Au.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&Au.set(e,t))}return t}toString(){return this.cssText}},bu=i=>new Tr(typeof i=="string"?i:i+"",void 0,Aa),ba=(i,...t)=>{let e=i.length===1?i[0]:t.reduce((n,r,s)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[s+1],i[0]);return new Tr(e,i,Aa)},La=(i,t)=>{if(Ys)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let n=document.createElement("style"),r=Ws.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=e.cssText,i.appendChild(n)}},Bs=Ys?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return bu(e)})(i):i;var{is:wp,defineProperty:Ip,getOwnPropertyDescriptor:Pp,getOwnPropertyNames:Ap,getOwnPropertySymbols:bp,getPrototypeOf:Lp}=Object,qs=globalThis,Lu=qs.trustedTypes,Op=Lu?Lu.emptyScript:"",Np=qs.reactiveElementPolyfillSupport,Sr=(i,t)=>i,Rr={toAttribute(i,t){switch(t){case Boolean:i=i?Op:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Ks=(i,t)=>!wp(i,t),Ou={attribute:!0,type:String,converter:Rr,reflect:!1,hasChanged:Ks};Symbol.metadata??=Symbol("metadata"),qs.litPropertyMetadata??=new WeakMap;var hi=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ou){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(t,n,e);r!==void 0&&Ip(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){let{get:r,set:s}=Pp(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get(){return r?.call(this)},set(o){let a=r?.call(this);s.call(this,o),this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ou}static _$Ei(){if(this.hasOwnProperty(Sr("elementProperties")))return;let t=Lp(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Sr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Sr("properties"))){let e=this.properties,n=[...Ap(e),...bp(e)];for(let r of n)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[n,r]of e)this.elementProperties.set(n,r)}this._$Eh=new Map;for(let[e,n]of this.elementProperties){let r=this._$Eu(e,n);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let r of n)e.unshift(Bs(r))}else t!==void 0&&e.push(Bs(t));return e}static _$Eu(t,e){let n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return La(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EC(t,e){let n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(r!==void 0&&n.reflect===!0){let s=(n.converter?.toAttribute!==void 0?n.converter:Rr).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,e){let n=this.constructor,r=n._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let s=n.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:s.converter?.fromAttribute!==void 0?s.converter:Rr;this._$Em=r,this[r]=o.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,n){if(t!==void 0){if(n??=this.constructor.getPropertyOptions(t),!(n.hasChanged??Ks)(this[t],e))return;this.P(t,e,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,n){this._$AL.has(t)||this._$AL.set(t,e),n.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[r,s]of n)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],s)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(e)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(e=>this._$EC(e,this[e])),this._$EU()}updated(t){}firstUpdated(t){}};hi.elementStyles=[],hi.shadowRootOptions={mode:"open"},hi[Sr("elementProperties")]=new Map,hi[Sr("finalized")]=new Map,Np?.({ReactiveElement:hi}),(qs.reactiveElementVersions??=[]).push("2.0.4");var ja=globalThis,Zs=ja.trustedTypes,Nu=Zs?Zs.createPolicy("lit-html",{createHTML:i=>i}):void 0,Uu="$lit$",Li=`lit$${Math.random().toFixed(9).slice(2)}$`,Xu="?"+Li,Fp=`<${Xu}>`,sn=document,Ir=()=>sn.createComment(""),Pr=i=>i===null||typeof i!="object"&&typeof i!="function",Ua=Array.isArray,Dp=i=>Ua(i)||typeof i?.[Symbol.iterator]=="function",Oa=`[ \f\r]`,wr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Fu=/-->/g,Du=/>/g,nn=RegExp(`>|${Oa}(?:([^\\s"'>=/]+)(${Oa}*=${Oa}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),Gu=/'/g,ku=/"/g,zu=/^(?:script|style|textarea|title)$/i,Xa=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),kn=Xa(1),CE=Xa(2),TE=Xa(3),on=Symbol.for("lit-noChange"),Rt=Symbol.for("lit-nothing"),ju=new WeakMap,rn=sn.createTreeWalker(sn,129);function Wu(i,t){if(!Ua(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Nu!==void 0?Nu.createHTML(t):t}var Gp=(i,t)=>{let e=i.length-1,n=[],r,s=t===2?"<svg>":t===3?"<math>":"",o=wr;for(let a=0;a<e;a++){let h=i[a],l,c,u=-1,d=0;for(;d<h.length&&(o.lastIndex=d,c=o.exec(h),c!==null);)d=o.lastIndex,o===wr?c[1]==="!--"?o=Fu:c[1]!==void 0?o=Du:c[2]!==void 0?(zu.test(c[2])&&(r=RegExp("</"+c[2],"g")),o=nn):c[3]!==void 0&&(o=nn):o===nn?c[0]===">"?(o=r??wr,u=-1):c[1]===void 0?u=-2:(u=o.lastIndex-c[2].length,l=c[1],o=c[3]===void 0?nn:c[3]==='"'?ku:Gu):o===ku||o===Gu?o=nn:o===Fu||o===Du?o=wr:(o=nn,r=void 0);let m=o===nn&&i[a+1].startsWith("/>")?" ":"";s+=o===wr?h+Fp:u>=0?(n.push(l),h.slice(0,u)+Uu+h.slice(u)+Li+m):h+Li+(u===-2?a:m)}return[Wu(i,s+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]},Ar=class i{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let s=0,o=0,a=t.length-1,h=this.parts,[l,c]=Gp(t,e);if(this.el=i.createElement(l,n),rn.currentNode=this.el.content,e===2||e===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(r=rn.nextNode())!==null&&h.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let u of r.getAttributeNames())if(u.endsWith(Uu)){let d=c[o++],m=r.getAttribute(u).split(Li),p=/([.?@])?(.*)/.exec(d);h.push({type:1,index:s,name:p[2],strings:m,ctor:p[1]==="."?Fa:p[1]==="?"?Da:p[1]==="@"?Ga:Gn}),r.removeAttribute(u)}else u.startsWith(Li)&&(h.push({type:6,index:s}),r.removeAttribute(u));if(zu.test(r.tagName)){let u=r.textContent.split(Li),d=u.length-1;if(d>0){r.textContent=Zs?Zs.emptyScript:"";for(let m=0;m<d;m++)r.append(u[m],Ir()),rn.nextNode(),h.push({type:2,index:++s});r.append(u[d],Ir())}}}else if(r.nodeType===8)if(r.data===Xu)h.push({type:2,index:s});else{let u=-1;for(;(u=r.data.indexOf(Li,u+1))!==-1;)h.push({type:7,index:s}),u+=Li.length-1}s++}}static createElement(t,e){let n=sn.createElement("template");return n.innerHTML=t,n}};function Dn(i,t,e=i,n){if(t===on)return t;let r=n!==void 0?e._$Co?.[n]:e._$Cl,s=Pr(t)?void 0:t._$litDirective$;return r?.constructor!==s&&(r?._$AO?.(!1),s===void 0?r=void 0:(r=new s(i),r._$AT(i,e,n)),n!==void 0?(e._$Co??=[])[n]=r:e._$Cl=r),r!==void 0&&(t=Dn(i,r._$AS(i,t.values),r,n)),t}var Na=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??sn).importNode(e,!0);rn.currentNode=r;let s=rn.nextNode(),o=0,a=0,h=n[0];for(;h!==void 0;){if(o===h.index){let l;h.type===2?l=new br(s,s.nextSibling,this,t):h.type===1?l=new h.ctor(s,h.name,h.strings,this,t):h.type===6&&(l=new ka(s,this,t)),this._$AV.push(l),h=n[++a]}o!==h?.index&&(s=rn.nextNode(),o++)}return rn.currentNode=sn,r}p(t){let e=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}},br=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=Rt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Dn(this,t,e),Pr(t)?t===Rt||t==null||t===""?(this._$AH!==Rt&&this._$AR(),this._$AH=Rt):t!==this._$AH&&t!==on&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Dp(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==Rt&&Pr(this._$AH)?this._$AA.nextSibling.data=t:this.T(sn.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,r=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=Ar.createElement(Wu(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{let s=new Na(r,this),o=s.u(this.options);s.p(e),this.T(o),this._$AH=s}}_$AC(t){let e=ju.get(t.strings);return e===void 0&&ju.set(t.strings,e=new Ar(t)),e}k(t){Ua(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,r=0;for(let s of t)r===e.length?e.push(n=new i(this.O(Ir()),this.O(Ir()),this,this.options)):n=e[r],n._$AI(s),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let n=t.nextSibling;t.remove(),t=n}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},Gn=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,s){this.type=1,this._$AH=Rt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=s,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=Rt}_$AI(t,e=this,n,r){let s=this.strings,o=!1;if(s===void 0)t=Dn(this,t,e,0),o=!Pr(t)||t!==this._$AH&&t!==on,o&&(this._$AH=t);else{let a=t,h,l;for(t=s[0],h=0;h<s.length-1;h++)l=Dn(this,a[n+h],e,h),l===on&&(l=this._$AH[h]),o||=!Pr(l)||l!==this._$AH[h],l===Rt?t=Rt:t!==Rt&&(t+=(l??"")+s[h+1]),this._$AH[h]=l}o&&!r&&this.j(t)}j(t){t===Rt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Fa=class extends Gn{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===Rt?void 0:t}},Da=class extends Gn{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==Rt)}},Ga=class extends Gn{constructor(t,e,n,r,s){super(t,e,n,r,s),this.type=5}_$AI(t,e=this){if((t=Dn(this,t,e,0)??Rt)===on)return;let n=this._$AH,r=t===Rt&&n!==Rt||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,s=t!==Rt&&(n===Rt||r);r&&this.element.removeEventListener(this.name,this,n),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ka=class{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Dn(this,t)}};var kp=ja.litHtmlPolyfillSupport;kp?.(Ar,br),(ja.litHtmlVersions??=[]).push("3.2.1");var Yu=(i,t,e)=>{let n=e?.renderBefore??t,r=n._$litPart$;if(r===void 0){let s=e?.renderBefore??null;n._$litPart$=r=new br(t.insertBefore(Ir(),s),s,void 0,e??{})}return r._$AI(i),r};var Nt=class extends hi{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Yu(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return on}};Nt._$litElement$=!0,Nt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:Nt});var jp=globalThis.litElementPolyfillSupport;jp?.({LitElement:Nt});(globalThis.litElementVersions??=[]).push("4.1.1");var Up={attribute:!0,type:String,converter:Rr,reflect:!1,hasChanged:Ks},Xp=(i=Up,t,e)=>{let{kind:n,metadata:r}=e,s=globalThis.litPropertyMetadata.get(r);if(s===void 0&&globalThis.litPropertyMetadata.set(r,s=new Map),s.set(e.name,i),n==="accessor"){let{name:o}=e;return{set(a){let h=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,h,i)},init(a){return a!==void 0&&this.P(o,void 0,i),a}}}if(n==="setter"){let{name:o}=e;return function(a){let h=this[o];t.call(this,a),this.requestUpdate(o,h,i)}}throw Error("Unsupported decorator location: "+n)};function q(i){return(t,e)=>typeof e=="object"?Xp(i,t,e):((n,r,s)=>{let o=r.hasOwnProperty(s);return r.constructor.createProperty(s,o?{...n,wrapped:!0}:n),o?Object.getOwnPropertyDescriptor(r,s):void 0})(i,t,e)}var an=(i,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(i,t,e),e);function Bu(i,t){return(e,n,r)=>{let s=o=>o.renderRoot?.querySelector(i)??null;if(t){let{get:o,set:a}=typeof n=="object"?e:r??(()=>{let h=Symbol();return{get(){return this[h]},set(l){this[h]=l}}})();return an(e,n,{get(){let h=o.call(this);return h===void 0&&(h=s(this),(h!==null||this.hasUpdated)&&a.call(this,h)),h}})}return an(e,n,{get(){return s(this)}})}}var dt={ADD:"add",REMOVE:"remove"};var qu={LENGTH:"length"},jn=class extends bt{constructor(t,e,n){super(t),this.element=e,this.index=n}},za=class extends St{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t||[],this.unique_)for(let n=0,r=this.array_.length;n<r;++n)this.assertUnique_(this.array_[n],n);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,n=t.length;e<n;++e)this.push(t[e]);return this}forEach(t){let e=this.array_;for(let n=0,r=e.length;n<r;++n)t(e[n],n,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(qu.LENGTH)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new jn(dt.ADD,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){this.unique_&&this.assertUnique_(t);let e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){let e=this.array_;for(let n=0,r=e.length;n<r;++n)if(e[n]===t)return this.removeAt(n)}removeAt(t){if(t<0||t>=this.getLength())return;let e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new jn(dt.REMOVE,e,t)),e}setAt(t,e){let n=this.getLength();if(t>=n){this.insertAt(t,e);return}if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);let r=this.array_[t];this.array_[t]=e,this.dispatchEvent(new jn(dt.REMOVE,r,t)),this.dispatchEvent(new jn(dt.ADD,e,t))}updateLength_(){this.set(qu.LENGTH,this.array_.length)}assertUnique_(t,e){for(let n=0,r=this.array_.length;n<r;++n)if(this.array_[n]===t&&n!==e)throw new Vc(58)}},Pt=za;var xM=new Array(6);function Ft(){return[1,0,0,1,0,0]}function zp(i,t,e,n,r,s,o){return i[0]=t,i[1]=e,i[2]=n,i[3]=r,i[4]=s,i[5]=o,i}function Zu(i,t){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i[3]=t[3],i[4]=t[4],i[5]=t[5],i}function ft(i,t){let e=t[0],n=t[1];return t[0]=i[0]*e+i[2]*n+i[4],t[1]=i[1]*e+i[3]*n+i[5],t}function Hu(i,t,e){return zp(i,t,0,0,e,0,0)}function Ut(i,t,e,n,r,s,o,a){let h=Math.sin(s),l=Math.cos(s);return i[0]=n*l,i[1]=r*h,i[2]=-n*h,i[3]=r*l,i[4]=o*n*l-a*n*h+t,i[5]=o*r*h+a*r*l+e,i}function Un(i,t){let e=Wp(t);B(e!==0,32);let n=t[0],r=t[1],s=t[2],o=t[3],a=t[4],h=t[5];return i[0]=o/e,i[1]=-r/e,i[2]=-s/e,i[3]=n/e,i[4]=(s*h-o*a)/e,i[5]=-(n*h-r*a)/e,i}function Wp(i){return i[0]*i[3]-i[1]*i[2]}var Ku;function Hs(i){let t="matrix("+i.join(", ")+")";if(Qc)return t;let e=Ku||(Ku=document.createElement("div"));return e.style.transform=t,e.style.transform}var nt={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"};var Wa=class extends St{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;let e=Object.assign({},t);typeof t.properties=="object"&&(delete e.properties,Object.assign(e,t.properties)),e[nt.OPACITY]=t.opacity!==void 0?t.opacity:1,B(typeof e[nt.OPACITY]=="number",64),e[nt.VISIBLE]=t.visible!==void 0?t.visible:!0,e[nt.Z_INDEX]=t.zIndex,e[nt.MAX_RESOLUTION]=t.maxResolution!==void 0?t.maxResolution:1/0,e[nt.MIN_RESOLUTION]=t.minResolution!==void 0?t.minResolution:0,e[nt.MIN_ZOOM]=t.minZoom!==void 0?t.minZoom:-1/0,e[nt.MAX_ZOOM]=t.maxZoom!==void 0?t.maxZoom:1/0,this.className_=e.className!==void 0?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){let e=this.state_||{layer:this,managed:t===void 0?!0:t},n=this.getZIndex();return e.opacity=lt(Math.round(this.getOpacity()*100)/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=n===void 0&&!e.managed?1/0:n,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return W()}getLayerStatesArray(t){return W()}getExtent(){return this.get(nt.EXTENT)}getMaxResolution(){return this.get(nt.MAX_RESOLUTION)}getMinResolution(){return this.get(nt.MIN_RESOLUTION)}getMinZoom(){return this.get(nt.MIN_ZOOM)}getMaxZoom(){return this.get(nt.MAX_ZOOM)}getOpacity(){return this.get(nt.OPACITY)}getSourceState(){return W()}getVisible(){return this.get(nt.VISIBLE)}getZIndex(){return this.get(nt.Z_INDEX)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(nt.EXTENT,t)}setMaxResolution(t){this.set(nt.MAX_RESOLUTION,t)}setMinResolution(t){this.set(nt.MIN_RESOLUTION,t)}setMaxZoom(t){this.set(nt.MAX_ZOOM,t)}setMinZoom(t){this.set(nt.MIN_ZOOM,t)}setOpacity(t){B(typeof t=="number",64),this.set(nt.OPACITY,t)}setVisible(t){this.set(nt.VISIBLE,t)}setZIndex(t){this.set(nt.Z_INDEX,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},Vs=Wa;var Xt={PRERENDER:"prerender",POSTRENDER:"postrender",PRECOMPOSE:"precompose",POSTCOMPOSE:"postcompose",RENDERCOMPLETE:"rendercomplete"};var Et={ANIMATING:0,INTERACTING:1};var pe={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};var Pe={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937};var Ya=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=t.extent!==void 0?t.extent:null,this.worldExtent_=t.worldExtent!==void 0?t.worldExtent:null,this.axisOrientation_=t.axisOrientation!==void 0?t.axisOrientation:"enu",this.global_=t.global!==void 0?t.global:!1,this.canWrapX_=!!(this.global_&&this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||Pe[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!!(t&&this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!!(this.global_&&t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},Xn=Ya;var Lr=6378137,zn=Math.PI*Lr,Yp=[-zn,-zn,zn,zn],Bp=[-180,-85,180,85],$s=Lr*Math.log(Math.tan(Math.PI/2)),Oi=class extends Xn{constructor(t){super({code:t,units:"m",extent:Yp,global:!0,worldExtent:Bp,getPointResolution:function(e,n){return e/Math.cosh(n[1]/Lr)}})}},Ba=[new Oi("EPSG:3857"),new Oi("EPSG:102100"),new Oi("EPSG:102113"),new Oi("EPSG:900913"),new Oi("http://www.opengis.net/def/crs/EPSG/0/3857"),new Oi("http://www.opengis.net/gml/srs/epsg.xml#3857")];function Vu(i,t,e){let n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e){t[r]=zn*i[r]/180;let s=Lr*Math.log(Math.tan(Math.PI*(+i[r+1]+90)/360));s>$s?s=$s:s<-$s&&(s=-$s),t[r+1]=s}return t}function $u(i,t,e){let n=i.length;e=e>1?e:2,t===void 0&&(e>2?t=i.slice():t=new Array(n));for(let r=0;r<n;r+=e)t[r]=180*i[r]/zn,t[r+1]=360*Math.atan(Math.exp(i[r+1]/Lr))/Math.PI-90;return t}var qp=6378137,Ju=[-180,-90,180,90],Kp=Math.PI*qp/180,li=class extends Xn{constructor(t,e){super({code:t,units:"degrees",extent:Ju,axisOrientation:e,global:!0,metersPerUnit:Kp,worldExtent:Ju})}},qa=[new li("CRS:84"),new li("EPSG:4326","neu"),new li("urn:ogc:def:crs:OGC:1.3:CRS84"),new li("urn:ogc:def:crs:OGC:2:84"),new li("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new li("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new li("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];var Ka={};function Qu(i){return Ka[i]||Ka[i.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}function td(i,t){Ka[i]=t}var Wn={};function hn(i,t,e){let n=i.getCode(),r=t.getCode();n in Wn||(Wn[n]={}),Wn[n][r]=e}function Js(i,t){let e;return i in Wn&&t in Wn[i]&&(e=Wn[i][t]),e}function ed(i,t){return i[0]+=+t[0],i[1]+=+t[1],i}function ln(i,t){let e=!0;for(let n=i.length-1;n>=0;--n)if(i[n]!=t[n]){e=!1;break}return e}function Yn(i,t){let e=Math.cos(t),n=Math.sin(t),r=i[0]*e-i[1]*n,s=i[1]*e+i[0]*n;return i[0]=r,i[1]=s,i}function id(i,t){return i[0]*=t,i[1]*=t,i}function Qs(i,t){if(t.canWrapX()){let e=tt(t.getExtent()),n=Za(i,t,e);n&&(i[0]-=n*e)}return i}function Za(i,t,e){let n=t.getExtent(),r=0;return t.canWrapX()&&(i[0]<n[0]||i[0]>n[2])&&(e=e||tt(n),r=Math.floor((i[0]-n[0])/e)),r}var Zp=63710088e-1;function Ha(i,t,e){e=e||Zp;let n=On(i[1]),r=On(t[1]),s=(r-n)/2,o=On(t[0]-i[0])/2,a=Math.sin(s)*Math.sin(s)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(r);return 2*e*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}var nd={info:1,warn:2,error:3,none:4},Hp=nd.info;function to(...i){Hp>nd.warn||console.warn(...i)}var Va=!0;function $a(i){Va=!(i===void 0?!0:i)}function Ja(i,t){if(t!==void 0){for(let e=0,n=i.length;e<n;++e)t[e]=i[e];t=t}else t=i.slice();return t}function sd(i,t){if(t!==void 0&&i!==t){for(let e=0,n=i.length;e<n;++e)t[e]=i[e];i=t}return i}function Qa(i){td(i.getCode(),i),hn(i,i,Ja)}function Vp(i){i.forEach(Qa)}function V(i){return typeof i=="string"?Qu(i):i||null}function th(i,t,e,n){i=V(i);let r,s=i.getPointResolutionFunc();if(s){if(r=s(t,e),n&&n!==i.getUnits()){let o=i.getMetersPerUnit();o&&(r=r*o/Pe[n])}}else{let o=i.getUnits();if(o=="degrees"&&!n||n=="degrees")r=t;else{let a=Nr(i,V("EPSG:4326"));if(a===sd&&o!=="degrees")r=t*i.getMetersPerUnit();else{let l=[e[0]-t/2,e[1],e[0]+t/2,e[1],e[0],e[1]-t/2,e[0],e[1]+t/2];l=a(l,l,2);let c=Ha(l.slice(0,2),l.slice(2,4)),u=Ha(l.slice(4,6),l.slice(6,8));r=(c+u)/2}let h=n?Pe[n]:i.getMetersPerUnit();h!==void 0&&(r/=h)}}return r}function eo(i){Vp(i),i.forEach(function(t){i.forEach(function(e){t!==e&&hn(t,e,Ja)})})}function $p(i,t,e,n){i.forEach(function(r){t.forEach(function(s){hn(r,s,e),hn(s,r,n)})})}function io(i,t){return i?typeof i=="string"?V(i):i:V(t)}function rd(i){return function(t,e,n){let r=t.length;n=n!==void 0?n:2,e=e!==void 0?e:new Array(r);for(let s=0;s<r;s+=n){let o=i(t.slice(s,s+n)),a=o.length;for(let h=0,l=n;h<l;++h)e[s+h]=h>=a?t[s+h]:o[h]}return e}}function od(i,t,e,n){let r=V(i),s=V(t);hn(r,s,rd(e)),hn(s,r,rd(n))}function Or(i,t){return $a(),Bn(i,"EPSG:4326",t!==void 0?t:"EPSG:3857")}function ad(i,t){let e=Bn(i,t!==void 0?t:"EPSG:3857","EPSG:4326"),n=e[0];return(n<-180||n>180)&&(e[0]=we(n+180,360)-180),e}function he(i,t){if(i===t)return!0;let e=i.getUnits()===t.getUnits();return(i.getCode()===t.getCode()||Nr(i,t)===Ja)&&e}function Nr(i,t){let e=i.getCode(),n=t.getCode(),r=Js(e,n);return r||(r=sd),r}function cn(i,t){let e=V(i),n=V(t);return Nr(e,n)}function Bn(i,t,e){return cn(t,e)(i,void 0,i.length)}function Fr(i,t,e,n){let r=cn(t,e);return au(i,r,void 0,n)}var Ae=null;function no(){return Ae}function Dr(i,t){return Ae?Bn(i,t,Ae):i}function be(i,t){return Ae?Bn(i,Ae,t):(Va&&!ln(i,[0,0])&&i[0]>=-180&&i[0]<=180&&i[1]>=-90&&i[1]<=90&&(Va=!1,to("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),i)}function qn(i,t){return Ae?Fr(i,t,Ae):i}function Le(i,t){return Ae?Fr(i,Ae,t):i}function hd(i,t){if(!Ae)return i;let e=V(t).getUnits(),n=Ae.getUnits();return e&&n?i*Pe[e]/Pe[n]:i}function eh(i,t,e){return function(n){let r,s;if(i.canWrapX()){let o=i.getExtent(),a=tt(o);n=n.slice(0),s=Za(n,i,a),s&&(n[0]=n[0]-s*a),n[0]=lt(n[0],o[0],o[2]),n[1]=lt(n[1],o[1],o[3]),r=e(n)}else r=e(n);return s&&t.canWrapX()&&(r[0]+=s*tt(t.getExtent())),r}}function Jp(){eo(Ba),eo(qa),$p(qa,Ba,Vu,$u)}Jp();function ih(i,t,e){return function(n,r,s,o,a){if(!n)return;if(!r&&!t)return n;let h=t?0:s[0]*r,l=t?0:s[1]*r,c=a?a[0]:0,u=a?a[1]:0,d=i[0]+h/2+c,m=i[2]-h/2+c,p=i[1]+l/2+u,_=i[3]-l/2+u;d>m&&(d=(m+d)/2,m=d),p>_&&(p=(_+p)/2,_=p);let f=lt(n[0],d,m),g=lt(n[1],p,_);if(o&&e&&r){let x=30*r;f+=-x*Math.log(1+Math.max(0,d-n[0])/x)+x*Math.log(1+Math.max(0,n[0]-m)/x),g+=-x*Math.log(1+Math.max(0,p-n[1])/x)+x*Math.log(1+Math.max(0,n[1]-_)/x)}return[f,g]}}function ld(i){return i}function nh(i,t,e,n){let r=tt(t)/e[0],s=jt(t)/e[1];return n?Math.min(i,Math.max(r,s)):Math.min(i,Math.min(r,s))}function rh(i,t,e){let n=Math.min(i,t),r=50;return n*=Math.log(1+r*Math.max(0,i/t-1))/r+1,e&&(n=Math.max(n,e),n/=Math.log(1+r*Math.max(0,e/i-1))/r+1),lt(n,e/2,t*2)}function cd(i,t,e,n){return t=t!==void 0?t:!0,function(r,s,o,a){if(r!==void 0){let h=i[0],l=i[i.length-1],c=e?nh(h,e,o,n):h;if(a)return t?rh(r,c,l):lt(r,l,c);let u=Math.min(c,r),d=Math.floor(wn(i,u,s));return i[d]>c&&d<i.length-1?i[d+1]:i[d]}}}function ud(i,t,e,n,r,s){return n=n!==void 0?n:!0,e=e!==void 0?e:0,function(o,a,h,l){if(o!==void 0){let c=r?nh(t,r,h,s):t;if(l)return n?rh(o,c,e):lt(o,e,c);let u=1e-9,d=Math.ceil(Math.log(t/c)/Math.log(i)-u),m=-a*(.5-u)+.5,p=Math.min(c,o),_=Math.floor(Math.log(t/p)/Math.log(i)+m),f=Math.max(d,_),g=t/Math.pow(i,f);return lt(g,e,c)}}}function sh(i,t,e,n,r){return e=e!==void 0?e:!0,function(s,o,a,h){if(s!==void 0){let l=n?nh(i,n,a,r):i;return!e||!h?lt(s,t,l):rh(s,l,t)}}}function Kn(i){if(i!==void 0)return 0}function oh(i){if(i!==void 0)return i}function dd(i){let t=2*Math.PI/i;return function(e,n){if(n)return e;if(e!==void 0)return e=Math.floor(e/t+.5)*t,e}}function fd(i){return i=i||On(5),function(t,e){if(e)return t;if(t!==void 0)return Math.abs(t)<=i?0:t}}function ah(i){return Math.pow(i,3)}function _e(i){return 1-ah(1-i)}function md(i){return 3*i*i-2*i*i*i}function gd(i){return i}function xe(i,t,e,n,r,s){s=s||[];let o=0;for(let a=t;a<e;a+=n){let h=i[a],l=i[a+1];s[o++]=r[0]*h+r[2]*l+r[4],s[o++]=r[1]*h+r[3]*l+r[5]}return s&&s.length!=o&&(s.length=o),s}function ro(i,t,e,n,r,s,o){o=o||[];let a=Math.cos(r),h=Math.sin(r),l=s[0],c=s[1],u=0;for(let d=t;d<e;d+=n){let m=i[d]-l,p=i[d+1]-c;o[u++]=l+m*a-p*h,o[u++]=c+m*h+p*a;for(let _=d+2;_<d+n;++_)o[u++]=i[_]}return o&&o.length!=u&&(o.length=u),o}function pd(i,t,e,n,r,s,o,a){a=a||[];let h=o[0],l=o[1],c=0;for(let u=t;u<e;u+=n){let d=i[u]-h,m=i[u+1]-l;a[c++]=h+r*d,a[c++]=l+s*m;for(let p=u+2;p<u+n;++p)a[c++]=i[p]}return a&&a.length!=c&&(a.length=c),a}function _d(i,t,e,n,r,s,o){o=o||[];let a=0;for(let h=t;h<e;h+=n){o[a++]=i[h]+r,o[a++]=i[h+1]+s;for(let l=h+2;l<h+n;++l)o[a++]=i[l]}return o&&o.length!=a&&(o.length=a),o}var xd=Ft(),hh=class extends St{constructor(){super(),this.extent_=vt(),this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Zc(function(t,e,n){if(!n)return this.getSimplifiedGeometry(e);let r=this.clone();return r.applyTransform(n),r.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return W()}closestPointXY(t,e,n,r){return W()}containsXY(t,e){let n=this.getClosestPoint([t,e]);return n[0]===t&&n[1]===e}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return W()}getExtent(t){if(this.extentRevision_!=this.getRevision()){let e=this.computeExtent(this.extent_);(isNaN(e[0])||isNaN(e[1]))&&An(e),this.extentRevision_=this.getRevision()}return su(this.extent_,t)}rotate(t,e){W()}scale(t,e,n){W()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return W()}getType(){return W()}applyTransform(t){W()}intersectsExtent(t){return W()}translate(t,e){W()}transform(t,e){let n=V(t),r=n.getUnits()=="tile-pixels"?function(s,o,a){let h=n.getExtent(),l=n.getWorldExtent(),c=jt(l)/jt(h);return Ut(xd,l[0],l[3],c,-c,0,0,0),xe(s,0,s.length,a,xd,o),cn(n,e)(s,o,a)}:cn(n,e);return this.applyTransform(r),this}},so=hh;var lh=class extends so{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates=null}computeExtent(t){return Ds(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return W()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||this.simplifiedGeometryMaxMinSquaredTolerance!==0&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;let e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=yd(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){W()}setLayout(t,e,n){let r;if(t)r=yd(t);else{for(let s=0;s<n;++s){if(e.length===0){this.layout="XY",this.stride=2;return}e=e[0]}r=e.length,t=Qp(r)}this.layout=t,this.stride=r}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.stride),this.changed())}rotate(t,e){let n=this.getFlatCoordinates();if(n){let r=this.getStride();ro(n,0,n.length,r,t,e,n),this.changed()}}scale(t,e,n){e===void 0&&(e=t),n||(n=Re(this.getExtent()));let r=this.getFlatCoordinates();if(r){let s=this.getStride();pd(r,0,r.length,s,t,e,n,r),this.changed()}}translate(t,e){let n=this.getFlatCoordinates();if(n){let r=this.getStride();_d(n,0,n.length,r,t,e,n),this.changed()}}};function Qp(i){let t;return i==2?t="XY":i==3?t="XYZ":i==4&&(t="XYZM"),t}function yd(i){let t;return i=="XY"?t=2:i=="XYZ"||i=="XYM"?t=3:i=="XYZM"&&(t=4),t}function vd(i,t,e){let n=i.getFlatCoordinates();if(!n)return null;let r=i.getStride();return xe(n,0,n.length,r,t,e)}var $t=lh;function Ed(i,t,e,n,r,s,o){let a=i[t],h=i[t+1],l=i[e]-a,c=i[e+1]-h,u;if(l===0&&c===0)u=t;else{let d=((r-a)*l+(s-h)*c)/(l*l+c*c);if(d>1)u=e;else if(d>0){for(let m=0;m<n;++m)o[m]=It(i[t+m],i[e+m],d);o.length=n;return}else u=t}for(let d=0;d<n;++d)o[d]=i[u+d];o.length=n}function Gr(i,t,e,n,r){let s=i[t],o=i[t+1];for(t+=n;t<e;t+=n){let a=i[t],h=i[t+1],l=Xe(s,o,a,h);l>r&&(r=l),s=a,o=h}return r}function kr(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];r=Gr(i,t,a,n,r),t=a}return r}function Md(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];r=kr(i,t,a,n,r),t=a[a.length-1]}return r}function jr(i,t,e,n,r,s,o,a,h,l,c){if(t==e)return l;let u,d;if(r===0){if(d=Xe(o,a,i[t],i[t+1]),d<l){for(u=0;u<n;++u)h[u]=i[t+u];return h.length=n,d}return l}c=c||[NaN,NaN];let m=t+n;for(;m<e;)if(Ed(i,m-n,m,n,o,a,c),d=Xe(o,a,c[0],c[1]),d<l){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n,m+=n}else m+=n*Math.max((Math.sqrt(d)-Math.sqrt(l))/r|0,1);if(s&&(Ed(i,e-n,t,n,o,a,c),d=Xe(o,a,c[0],c[1]),d<l)){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n}return l}function Ur(i,t,e,n,r,s,o,a,h,l,c){c=c||[NaN,NaN];for(let u=0,d=e.length;u<d;++u){let m=e[u];l=jr(i,t,m,n,r,s,o,a,h,l,c),t=m}return l}function Cd(i,t,e,n,r,s,o,a,h,l,c){c=c||[NaN,NaN];for(let u=0,d=e.length;u<d;++u){let m=e[u];l=Ur(i,t,m,n,r,s,o,a,h,l,c),t=m[m.length-1]}return l}function Td(i,t,e,n){for(let r=0,s=e.length;r<s;++r)i[t++]=e[r];return t}function un(i,t,e,n){for(let r=0,s=e.length;r<s;++r){let o=e[r];for(let a=0;a<n;++a)i[t++]=o[a]}return t}function Xr(i,t,e,n,r){r=r||[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=un(i,t,e[o],n);r[s++]=h,t=h}return r.length=s,r}function Sd(i,t,e,n,r){r=r||[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=Xr(i,t,e[o],n,r[s]);h.length===0&&(h[0]=t),r[s++]=h,t=h[h.length-1]}return r.length=s,r}function zr(i,t,e,n,r,s,o){let a=(e-t)/n;if(a<3){for(;t<e;t+=n)s[o++]=i[t],s[o++]=i[t+1];return o}let h=new Array(a);h[0]=1,h[a-1]=1;let l=[t,e-n],c=0;for(;l.length>0;){let u=l.pop(),d=l.pop(),m=0,p=i[d],_=i[d+1],f=i[u],g=i[u+1];for(let x=d+n;x<u;x+=n){let y=i[x],v=i[x+1],E=cu(y,v,p,_,f,g);E>m&&(c=x,m=E)}m>r&&(h[(c-t)/n]=1,d+n<c&&l.push(d,c),c+n<u&&l.push(c,u))}for(let u=0;u<a;++u)h[u]&&(s[o++]=i[t+u*n],s[o++]=i[t+u*n+1]);return o}function Rd(i,t,e,n,r,s,o,a){for(let h=0,l=e.length;h<l;++h){let c=e[h];o=zr(i,t,c,n,r,s,o),a.push(o),t=c}return o}function Ni(i,t){return t*Math.round(i/t)}function t0(i,t,e,n,r,s,o){if(t==e)return o;let a=Ni(i[t],r),h=Ni(i[t+1],r);t+=n,s[o++]=a,s[o++]=h;let l,c;do if(l=Ni(i[t],r),c=Ni(i[t+1],r),t+=n,t==e)return s[o++]=l,s[o++]=c,o;while(l==a&&c==h);for(;t<e;){let u=Ni(i[t],r),d=Ni(i[t+1],r);if(t+=n,u==l&&d==c)continue;let m=l-a,p=c-h,_=u-a,f=d-h;if(m*f==p*_&&(m<0&&_<m||m==_||m>0&&_>m)&&(p<0&&f<p||p==f||p>0&&f>p)){l=u,c=d;continue}s[o++]=l,s[o++]=c,a=l,h=c,l=u,c=d}return s[o++]=l,s[o++]=c,o}function ch(i,t,e,n,r,s,o,a){for(let h=0,l=e.length;h<l;++h){let c=e[h];o=t0(i,t,c,n,r,s,o),a.push(o),t=c}return o}function wd(i,t,e,n,r,s,o,a){for(let h=0,l=e.length;h<l;++h){let c=e[h],u=[];o=ch(i,t,c,n,r,s,o,u),a.push(u),t=c[c.length-1]}return o}function ye(i,t,e,n,r){r=r!==void 0?r:[];let s=0;for(let o=t;o<e;o+=n)r[s++]=i.slice(o,o+n);return r.length=s,r}function Fi(i,t,e,n,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=e[o];r[s++]=ye(i,t,h,n,r[s]),t=h}return r.length=s,r}function Wr(i,t,e,n,r){r=r!==void 0?r:[];let s=0;for(let o=0,a=e.length;o<a;++o){let h=e[o];r[s++]=h.length===1&&h[0]===t?[]:Fi(i,t,h,n,r[s]),t=h[h.length-1]}return r.length=s,r}function uh(i,t,e,n){let r=0,s=i[e-n],o=i[e-n+1];for(;t<e;t+=n){let a=i[t],h=i[t+1];r+=o*a-s*h,s=a,o=h}return r/2}function dh(i,t,e,n){let r=0;for(let s=0,o=e.length;s<o;++s){let a=e[s];r+=uh(i,t,a,n),t=a}return r}function Id(i,t,e,n){let r=0;for(let s=0,o=e.length;s<o;++s){let a=e[s];r+=dh(i,t,a,n),t=a[a.length-1]}return r}var fh=class i extends $t{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,e!==void 0&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}clone(){return new i(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,n,r){return r<Zt(this.getExtent(),t,e)?r:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Gr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),jr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,n,r))}getArea(){return uh(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return ye(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){let e=[];return e.length=zr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new i(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=un(this.flatCoordinates,0,t,this.stride),this.changed()}},mh=fh;var gh=class i extends $t{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){let t=new i(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,n,r){let s=this.flatCoordinates,o=Xe(t,e,s[0],s[1]);if(o<r){let a=this.stride;for(let h=0;h<a;++h)n[h]=s[h];return n.length=a,o}return r}getCoordinates(){return this.flatCoordinates?this.flatCoordinates.slice():[]}computeExtent(t){return iu(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Fs(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=Td(this.flatCoordinates,0,t,this.stride),this.changed()}},ze=gh;function Pd(i,t,e,n,r){return!ks(r,function(o){return!Di(i,t,e,n,o[0],o[1])})}function Di(i,t,e,n,r,s){let o=0,a=i[e-n],h=i[e-n+1];for(;t<e;t+=n){let l=i[t],c=i[t+1];h<=s?c>s&&(l-a)*(s-h)-(r-a)*(c-h)>0&&o++:c<=s&&(l-a)*(s-h)-(r-a)*(c-h)<0&&o--,a=l,h=c}return o!==0}function Yr(i,t,e,n,r,s){if(e.length===0||!Di(i,t,e[0],n,r,s))return!1;for(let o=1,a=e.length;o<a;++o)if(Di(i,e[o-1],e[o],n,r,s))return!1;return!0}function Ad(i,t,e,n,r,s){if(e.length===0)return!1;for(let o=0,a=e.length;o<a;++o){let h=e[o];if(Yr(i,t,h,n,r,s))return!0;t=h[h.length-1]}return!1}function ph(i,t,e,n,r,s,o){let a,h,l,c,u,d,m,p=r[s+1],_=[];for(let x=0,y=e.length;x<y;++x){let v=e[x];for(c=i[v-n],d=i[v-n+1],a=t;a<v;a+=n)u=i[a],m=i[a+1],(p<=d&&m<=p||d<=p&&p<=m)&&(l=(p-d)/(m-d)*(u-c)+c,_.push(l)),c=u,d=m}let f=NaN,g=-1/0;for(_.sort(ri),c=_[0],a=1,h=_.length;a<h;++a){u=_[a];let x=Math.abs(u-c);x>g&&(l=(c+u)/2,Yr(i,t,e,n,l,p)&&(f=l,g=x)),c=u}return isNaN(f)&&(f=r[s]),o?(o.push(f,p,g),o):[f,p,g]}function bd(i,t,e,n,r){let s=[];for(let o=0,a=e.length;o<a;++o){let h=e[o];s=ph(i,t,h,n,r,2*o,s),t=h[h.length-1]}return s}function oo(i,t,e,n,r){let s;for(t+=n;t<e;t+=n)if(s=r(i.slice(t-n,t),i.slice(t,t+n)),s)return s;return!1}function Br(i,t,e,n,r){let s=nu(vt(),i,t,e,n);return _t(r,s)?Se(r,s)||s[0]>=r[0]&&s[2]<=r[2]||s[1]>=r[1]&&s[3]<=r[3]?!0:oo(i,t,e,n,function(o,a){return ou(r,o,a)}):!1}function Ld(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){if(Br(i,t,e[s],n,r))return!0;t=e[s]}return!1}function _h(i,t,e,n,r){return!!(Br(i,t,e,n,r)||Di(i,t,e,n,r[0],r[1])||Di(i,t,e,n,r[0],r[3])||Di(i,t,e,n,r[2],r[1])||Di(i,t,e,n,r[2],r[3]))}function xh(i,t,e,n,r){if(!_h(i,t,e[0],n,r))return!1;if(e.length===1)return!0;for(let s=1,o=e.length;s<o;++s)if(Pd(i,e[s-1],e[s],n,r)&&!Br(i,e[s-1],e[s],n,r))return!1;return!0}function Od(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];if(xh(i,t,a,n,r))return!0;t=a[a.length-1]}return!1}function Nd(i,t,e,n){for(;t<e-n;){for(let r=0;r<n;++r){let s=i[t+r];i[t+r]=i[e-n+r],i[e-n+r]=s}t+=n,e-=n}}function Fd(i,t,e,n){let r=0,s=i[e-n],o=i[e-n+1];for(;t<e;t+=n){let a=i[t],h=i[t+1];r+=(a-s)*(h+o),s=a,o=h}return r===0?void 0:r>0}function yh(i,t,e,n,r){r=r!==void 0?r:!1;for(let s=0,o=e.length;s<o;++s){let a=e[s],h=Fd(i,t,a,n);if(s===0){if(r&&h||!r&&!h)return!1}else if(r&&!h||!r&&h)return!1;t=a}return!0}function Dd(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s){let a=e[s];if(!yh(i,t,a,n,r))return!1;a.length&&(t=a[a.length-1])}return!0}function ao(i,t,e,n,r){r=r!==void 0?r:!1;for(let s=0,o=e.length;s<o;++s){let a=e[s],h=Fd(i,t,a,n);(s===0?r&&h||!r&&!h:r&&!h||!r&&h)&&Nd(i,t,a,n),t=a}return t}function vh(i,t,e,n,r){for(let s=0,o=e.length;s<o;++s)t=ao(i,t,e[s],n,r);return t}var ho=class i extends $t{constructor(t,e,n){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,e!==void 0&&n?(t