@eox/layercontrol 0.28.2-dev.1736966655.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +1028 -1018
- package/dist/eox-layercontrol.umd.cjs +131 -144
- package/package.json +1 -1
- package/src/components/layer-config.js +5 -5
- package/src/components/layer-legend.js +60 -50
- package/src/helpers/get-legend-config.js +50 -27
- package/types/layercontrol/src/components/layer-config.d.ts +10 -12
- package/types/layercontrol/src/components/layer-config.d.ts.map +1 -1
- package/types/layercontrol/src/components/layer-legend.d.ts +8 -7
- package/types/layercontrol/src/components/layer-legend.d.ts.map +1 -1
- package/types/layercontrol/src/helpers/get-legend-config.d.ts +1 -1
- package/types/layercontrol/src/helpers/get-legend-config.d.ts.map +1 -1
|
@@ -1,77 +1,80 @@
|
|
|
1
|
-
(function(R
|
|
1
|
+
(function(L,R){typeof exports=="object"&&typeof module<"u"?R(exports):typeof define=="function"&&define.amd?define(["exports"],R):(L=typeof globalThis<"u"?globalThis:L||self,R(L["eox-layercontrol"]={}))})(this,function(L){"use strict";var Ea=Object.defineProperty;var zr=L=>{throw TypeError(L)};var $a=(L,R,X)=>R in L?Ea(L,R,{enumerable:!0,configurable:!0,writable:!0,value:X}):L[R]=X;var q=(L,R,X)=>$a(L,typeof R!="symbol"?R+"":R,X),mn=(L,R,X)=>R.has(L)||zr("Cannot "+X);var S=(L,R,X)=>(mn(L,R,"read from private field"),X?X.call(L):R.get(L)),O=(L,R,X)=>R.has(L)?zr("Cannot add the same private member more than once"):R instanceof WeakSet?R.add(L):R.set(L,X),Ht=(L,R,X,oe)=>(mn(L,R,"write to private field"),oe?oe.call(L,X):R.set(L,X),X),j=(L,R,X)=>(mn(L,R,"access private method"),X);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var Fr,$t,si,ai,It,ge,Ne,He,yn,li,di,ci,Zr,ui,hi,Ve,pi,fi,gi,mi,Tt,me,qr,yi,bi,vi,wi,xi,Ei,$i,Xr,st,Yr,Wr,bn,Gr,Jr,Di,Si,Ai,zt,Zt,Kr,Qr,to,Ci;const R=globalThis,X=R.ShadowRoot&&(R.ShadyCSS===void 0||R.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,oe=Symbol(),vn=new WeakMap;let wn=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==oe)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(X&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=vn.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&vn.set(e,t))}return t}toString(){return this.cssText}};const eo=i=>new wn(typeof i=="string"?i:i+"",void 0,oe),xn=(i,...t)=>{const e=i.length===1?i[0]:t.reduce((n,r,o)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+i[o+1],i[0]);return new wn(e,i,oe)},io=(i,t)=>{if(X)i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const n=document.createElement("style"),r=R.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=e.cssText,i.appendChild(n)}},En=X?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return eo(e)})(i):i;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:no,defineProperty:ro,getOwnPropertyDescriptor:oo,getOwnPropertyNames:so,getOwnPropertySymbols:ao,getPrototypeOf:lo}=Object,Vt=globalThis,$n=Vt.trustedTypes,co=$n?$n.emptyScript:"",Pi=Vt.reactiveElementPolyfillSupport,ye=(i,t)=>i,Oi={toAttribute(i,t){switch(t){case Boolean:i=i?co: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}},Sn=(i,t)=>!no(i,t),An={attribute:!0,type:String,converter:Oi,reflect:!1,hasChanged:Sn};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Vt.litPropertyMetadata??(Vt.litPropertyMetadata=new WeakMap);class se extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=An){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const n=Symbol(),r=this.getPropertyDescriptor(t,n,e);r!==void 0&&ro(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){const{get:r,set:o}=oo(this.prototype,t)??{get(){return this[e]},set(s){this[e]=s}};return{get(){return r==null?void 0:r.call(this)},set(s){const a=r==null?void 0:r.call(this);o.call(this,s),this.requestUpdate(t,a,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??An}static _$Ei(){if(this.hasOwnProperty(ye("elementProperties")))return;const t=lo(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(ye("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(ye("properties"))){const e=this.properties,n=[...so(e),...ao(e)];for(const r of n)this.createProperty(r,e[r])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[n,r]of e)this.elementProperties.set(n,r)}this._$Eh=new Map;for(const[e,n]of this.elementProperties){const r=this._$Eu(e,n);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const r of n)e.unshift(En(r))}else t!==void 0&&e.push(En(t));return e}static _$Eu(t,e){const 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(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((e=t.hostConnected)==null||e.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const n of e.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return io(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(e=>{var n;return(n=e.hostConnected)==null?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var n;return(n=e.hostDisconnected)==null?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EC(t,e){var o;const n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(r!==void 0&&n.reflect===!0){const s=(((o=n.converter)==null?void 0:o.toAttribute)!==void 0?n.converter:Oi).toAttribute(e,n.type);this._$Em=t,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(t,e){var o;const n=this.constructor,r=n._$Eh.get(t);if(r!==void 0&&this._$Em!==r){const s=n.getPropertyOptions(r),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((o=s.converter)==null?void 0:o.fromAttribute)!==void 0?s.converter:Oi;this._$Em=r,this[r]=a.fromAttribute(e,s.type),this._$Em=null}}requestUpdate(t,e,n){if(t!==void 0){if(n??(n=this.constructor.getPropertyOptions(t)),!(n.hasChanged??Sn)(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??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,s]of this._$Ep)this[o]=s;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[o,s]of r)s.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],s)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(n=this._$EO)==null||n.forEach(r=>{var o;return(o=r.hostUpdate)==null?void 0:o.call(r)}),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(n=>{var r;return(r=n.hostUpdated)==null?void 0:r.call(n)}),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=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}}se.elementStyles=[],se.shadowRootOptions={mode:"open"},se[ye("elementProperties")]=new Map,se[ye("finalized")]=new Map,Pi==null||Pi({ReactiveElement:se}),(Vt.reactiveElementVersions??(Vt.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const be=globalThis,Be=be.trustedTypes,
|
|
14
|
-
\f\r]`,xe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const be=globalThis,Be=be.trustedTypes,Cn=Be?Be.createPolicy("lit-html",{createHTML:i=>i}):void 0,Ri="$lit$",Dt=`lit$${Math.random().toFixed(9).slice(2)}$`,Li="?"+Dt,uo=`<${Li}>`,Xt=document,ve=()=>Xt.createComment(""),we=i=>i===null||typeof i!="object"&&typeof i!="function",Mi=Array.isArray,_n=i=>Mi(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Ii=`[
|
|
14
|
+
\f\r]`,xe=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Tn=/-->/g,Dn=/>/g,Yt=RegExp(`>|${Ii}(?:([^\\s"'>=/]+)(${Ii}*=${Ii}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Pn=/'/g,On=/"/g,Rn=/^(?:script|style|textarea|title)$/i,ho=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),v=ho(1),xt=Symbol.for("lit-noChange"),D=Symbol.for("lit-nothing"),Ln=new WeakMap,Wt=Xt.createTreeWalker(Xt,129);function Mn(i,t){if(!Mi(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return Cn!==void 0?Cn.createHTML(t):t}const In=(i,t)=>{const e=i.length-1,n=[];let r,o=t===2?"<svg>":t===3?"<math>":"",s=xe;for(let a=0;a<e;a++){const l=i[a];let d,u,c=-1,p=0;for(;p<l.length&&(s.lastIndex=p,u=s.exec(l),u!==null);)p=s.lastIndex,s===xe?u[1]==="!--"?s=Tn:u[1]!==void 0?s=Dn:u[2]!==void 0?(Rn.test(u[2])&&(r=RegExp("</"+u[2],"g")),s=Yt):u[3]!==void 0&&(s=Yt):s===Yt?u[0]===">"?(s=r??xe,c=-1):u[1]===void 0?c=-2:(c=s.lastIndex-u[2].length,d=u[1],s=u[3]===void 0?Yt:u[3]==='"'?On:Pn):s===On||s===Pn?s=Yt:s===Tn||s===Dn?s=xe:(s=Yt,r=void 0);const f=s===Yt&&i[a+1].startsWith("/>")?" ":"";o+=s===xe?l+uo:c>=0?(n.push(d),l.slice(0,c)+Ri+l.slice(c)+Dt+f):l+Dt+(c===-2?a:f)}return[Mn(i,o+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),n]};class Ee{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,s=0;const a=t.length-1,l=this.parts,[d,u]=In(t,e);if(this.el=Ee.createElement(d,n),Wt.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=Wt.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(const c of r.getAttributeNames())if(c.endsWith(Ri)){const p=u[s++],f=r.getAttribute(c).split(Dt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:o,name:g[2],strings:f,ctor:g[1]==="."?Hn:g[1]==="?"?Vn:g[1]==="@"?kn:$e}),r.removeAttribute(c)}else c.startsWith(Dt)&&(l.push({type:6,index:o}),r.removeAttribute(c));if(Rn.test(r.tagName)){const c=r.textContent.split(Dt),p=c.length-1;if(p>0){r.textContent=Be?Be.emptyScript:"";for(let f=0;f<p;f++)r.append(c[f],ve()),Wt.nextNode(),l.push({type:2,index:++o});r.append(c[p],ve())}}}else if(r.nodeType===8)if(r.data===Li)l.push({type:2,index:o});else{let c=-1;for(;(c=r.data.indexOf(Dt,c+1))!==-1;)l.push({type:7,index:o}),c+=Dt.length-1}o++}}static createElement(t,e){const n=Xt.createElement("template");return n.innerHTML=t,n}}function Gt(i,t,e=i,n){var s,a;if(t===xt)return t;let r=n!==void 0?(s=e._$Co)==null?void 0:s[n]:e._$Cl;const o=we(t)?void 0:t._$litDirective$;return(r==null?void 0:r.constructor)!==o&&((a=r==null?void 0:r._$AO)==null||a.call(r,!1),o===void 0?r=void 0:(r=new o(i),r._$AT(i,e,n)),n!==void 0?(e._$Co??(e._$Co=[]))[n]=r:e._$Cl=r),r!==void 0&&(t=Gt(i,r._$AS(i,t.values),r,n)),t}let Nn=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){const{el:{content:e},parts:n}=this._$AD,r=((t==null?void 0:t.creationScope)??Xt).importNode(e,!0);Wt.currentNode=r;let o=Wt.nextNode(),s=0,a=0,l=n[0];for(;l!==void 0;){if(s===l.index){let d;l.type===2?d=new ae(o,o.nextSibling,this,t):l.type===1?d=new l.ctor(o,l.name,l.strings,this,t):l.type===6&&(d=new Bn(o,this,t)),this._$AV.push(d),l=n[++a]}s!==(l==null?void 0:l.index)&&(o=Wt.nextNode(),s++)}return Wt.currentNode=Xt,r}p(t){let e=0;for(const 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++}};class ae{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=D,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=(r==null?void 0:r.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Gt(this,t,e),we(t)?t===D||t==null||t===""?(this._$AH!==D&&this._$AR(),this._$AH=D):t!==this._$AH&&t!==xt&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):_n(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!==D&&we(this._$AH)?this._$AA.nextSibling.data=t:this.T(Xt.createTextNode(t)),this._$AH=t}$(t){var o;const{values:e,_$litType$:n}=t,r=typeof n=="number"?this._$AC(t):(n.el===void 0&&(n.el=Ee.createElement(Mn(n.h,n.h[0]),this.options)),n);if(((o=this._$AH)==null?void 0:o._$AD)===r)this._$AH.p(e);else{const s=new Nn(r,this),a=s.u(this.options);s.p(e),this.T(a),this._$AH=s}}_$AC(t){let e=Ln.get(t.strings);return e===void 0&&Ln.set(t.strings,e=new Ee(t)),e}k(t){Mi(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const o of t)r===e.length?e.push(n=new ae(this.O(ve()),this.O(ve()),this,this.options)):n=e[r],n._$AI(o),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)==null?void 0:n.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t))}}class $e{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,o){this.type=1,this._$AH=D,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=D}_$AI(t,e=this,n,r){const o=this.strings;let s=!1;if(o===void 0)t=Gt(this,t,e,0),s=!we(t)||t!==this._$AH&&t!==xt,s&&(this._$AH=t);else{const a=t;let l,d;for(t=o[0],l=0;l<o.length-1;l++)d=Gt(this,a[n+l],e,l),d===xt&&(d=this._$AH[l]),s||(s=!we(d)||d!==this._$AH[l]),d===D?t=D:t!==D&&(t+=(d??"")+o[l+1]),this._$AH[l]=d}s&&!r&&this.j(t)}j(t){t===D?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Hn extends $e{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===D?void 0:t}}class Vn extends $e{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==D)}}class kn extends $e{constructor(t,e,n,r,o){super(t,e,n,r,o),this.type=5}_$AI(t,e=this){if((t=Gt(this,t,e,0)??D)===xt)return;const n=this._$AH,r=t===D&&n!==D||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,o=t!==D&&(n===D||r);r&&this.element.removeEventListener(this.name,this,n),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e;typeof this._$AH=="function"?this._$AH.call(((e=this.options)==null?void 0:e.host)??this.element,t):this._$AH.handleEvent(t)}}class Bn{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){Gt(this,t)}}const po={M:Ri,P:Dt,A:Li,C:1,L:In,R:Nn,D:_n,V:Gt,I:ae,H:$e,N:Vn,U:kn,B:Hn,F:Bn},Ni=be.litHtmlPolyfillSupport;Ni==null||Ni(Ee,ae),(be.litHtmlVersions??(be.litHtmlVersions=[])).push("3.2.1");const fo=(i,t,e)=>{const n=(e==null?void 0:e.renderBefore)??t;let r=n._$litPart$;if(r===void 0){const o=(e==null?void 0:e.renderBefore)??null;n._$litPart$=r=new ae(t.insertBefore(ve(),o),o,void 0,e??{})}return r._$AI(i),r};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/let dt=class extends
|
|
19
|
+
*/let dt=class extends se{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=fo(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1)}render(){return xt}};dt._$litElement$=!0,dt.finalized=!0,(Fr=globalThis.litElementHydrateSupport)==null||Fr.call(globalThis,{LitElement:dt});const Hi=globalThis.litElementPolyfillSupport;Hi==null||Hi({LitElement:dt}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function
|
|
23
|
+
*/function Q(i,t,e){return i?t(i):e==null?void 0:e(i)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const
|
|
27
|
+
*/const kt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Vi=i=>(...t)=>({_$litDirective$:i,values:t});class ki{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{I:
|
|
31
|
+
*/const{I:go}=po,mo=i=>i.strings===void 0,Un=()=>document.createComment(""),Se=(i,t,e)=>{var o;const n=i._$AA.parentNode,r=t===void 0?i._$AB:t._$AA;if(e===void 0){const s=n.insertBefore(Un(),r),a=n.insertBefore(Un(),r);e=new go(s,a,i,i.options)}else{const s=e._$AB.nextSibling,a=e._$AM,l=a!==i;if(l){let d;(o=e._$AQ)==null||o.call(e,i),e._$AM=i,e._$AP!==void 0&&(d=i._$AU)!==a._$AU&&e._$AP(d)}if(s!==r||l){let d=e._$AA;for(;d!==s;){const u=d.nextSibling;n.insertBefore(d,r),d=u}}}return e},Jt=(i,t,e=i)=>(i._$AI(t,e),i),yo={},Fn=(i,t=yo)=>i._$AH=t,bo=i=>i._$AH,Bi=i=>{var n;(n=i._$AP)==null||n.call(i,!1,!0);let t=i._$AA;const e=i._$AB.nextSibling;for(;t!==e;){const r=t.nextSibling;t.remove(),t=r}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const jn=(i,t,e)=>{const n=new Map;for(let r=t;r<=e;r++)n.set(i[r],r);return n},vo=Vi(class extends ki{constructor(i){if(super(i),i.type!==kt.CHILD)throw Error("repeat() can only be used in text expressions")}dt(i,t,e){let n;e===void 0?e=t:t!==void 0&&(n=t);const r=[],o=[];let s=0;for(const a of i)r[s]=n?n(a,s):s,o[s]=e(a,s),s++;return{values:o,keys:r}}render(i,t,e){return this.dt(i,t,e).values}update(i,[t,e,n]){const r=bo(i),{values:o,keys:s}=this.dt(t,e,n);if(!Array.isArray(r))return this.ut=s,o;const a=this.ut??(this.ut=[]),l=[];let d,u,c=0,p=r.length-1,f=0,g=o.length-1;for(;c<=p&&f<=g;)if(r[c]===null)c++;else if(r[p]===null)p--;else if(a[c]===s[f])l[f]=Jt(r[c],o[f]),c++,f++;else if(a[p]===s[g])l[g]=Jt(r[p],o[g]),p--,g--;else if(a[c]===s[g])l[g]=Jt(r[c],o[g]),Se(i,l[g+1],r[c]),c++,g--;else if(a[p]===s[f])l[f]=Jt(r[p],o[f]),Se(i,r[c],r[p]),p--,f++;else if(d===void 0&&(d=jn(s,f,g),u=jn(a,c,p)),d.has(a[c]))if(d.has(a[p])){const b=u.get(s[f]),V=b!==void 0?r[b]:null;if(V===null){const et=Se(i,r[c]);Jt(et,o[f]),l[f]=et}else l[f]=Jt(V,o[f]),Se(i,r[c],V),r[b]=null;f++}else Bi(r[p]),p--;else Bi(r[c]),c++;for(;f<=g;){const b=Se(i,l[g+1]);Jt(b,o[f]),l[f++]=b}for(;c<=p;){const b=r[c++];b!==null&&Bi(b)}return this.ut=s,Fn(i,l),xt}});/**
|
|
36
36
|
* wms-capabilities @0.6.0
|
|
37
37
|
* @description WMS service Capabilities > JSON, based on openlayers
|
|
38
38
|
* @license BSD-2-Clause
|
|
39
39
|
* @preserve
|
|
40
|
-
*/var
|
|
40
|
+
*/var A=i=>i!==void 0,zn=(i,t,e)=>t in i?i[t]:i[t]=e;const Ae={ELEMENT:1,ATTRIBUTE:2,TEXT:3,CDATA_SECTION:4,ENTITY_REFERENCE:5,ENTITY:6,PROCESSING_INSTRUCTION:7,COMMENT:8,DOCUMENT:9,DOCUMENT_TYPE:10,DOCUMENT_FRAGMENT:11,NOTATION:12};class wo{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,e){return Ue(t,e).join("")}}function Ue(i,t){return Zn(i,t,[]).join("")}function Zn(i,t,e){if(i.nodeType===Ae.CDATA_SECTION||i.nodeType===Ae.TEXT)t?e.push(String(i.nodeValue).replace(/(\r\n|\r|\n)/g,"")):e.push(i.nodeValue);else{var n;for(n=i.firstChild;n;n=n.nextSibling)Zn(n,t,e)}return e}function xo(i,t,e,n){for(var r=Eo(t);r;r=$o(r)){var o=r.namespaceURI||null,s=i[o];if(A(s)){var a=s[r.localName];A(a)&&a.call(n,r,e)}}}function Eo(i){let t=i.firstElementChild||i.firstChild;for(;t&&t.nodeType!==Ae.ELEMENT;)t=t.nextSibling;return t}function $o(i){let t=i.nextElementSibling||i.nextSibling;for(;t&&t.nodeType!==Ae.ELEMENT;)t=t.nextSibling;return t}function nt(i,t,e){return So(i,t,e)}function So(i,t,e){var n=A(e)?e:{},r,o;for(r=0,o=i.length;r<o;++r)n[i[r]]=t;return n}function qn(i,t){return function(e,n){var r=i.call(A(t)?t:this,e,n);if(A(r)){var o=n[n.length-1];o.push(r)}}}function tt(i,t,e,n,r){return n.push(i),xo(t,e,n,r),n.pop()}function y(i,t,e){return function(n,r){let o=i.call(A(e)?e:this,n,r);if(A(o)){var s=r[r.length-1],a=A(t)?t:n.localName;s[a]=o}}}function ht(i,t,e){return function(n,r){var o=i.call(A(e)?e:this,n,r);if(A(o)){var s=r[r.length-1],a=A(t)?t:n.localName,l=zn(s,a,[]);l.push(o)}}}const Ao=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function Co(i){return i.replace(Ao,"")}function Kt(i){const t=/^\s*(true|1)|(false|0)\s*$/.exec(i);if(t)return A(t[1])||!1}function le(i){return Pt(Ue(i,!1))}function Pt(i){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(i);if(t)return parseFloat(t[1])}function Ui(i){return Fe(Ue(i,!1))}function Fe(i){const t=/^\s*(\d+)\s*$/.exec(i);if(t)return parseInt(t[1],10)}function P(i){return Co(Ue(i,!1))}const _o="http://www.w3.org/1999/xlink";function Fi(i){return i.getAttributeNS(_o,"href")}function To(i,t){return tt({},es,i,t)}function Xn(i){return[Pt(i.getAttribute("minx")),Pt(i.getAttribute("miny")),Pt(i.getAttribute("maxx")),Pt(i.getAttribute("maxy"))]}function Do(i,t){const e=Xn(i),n=[Pt(i.getAttribute("resx")),Pt(i.getAttribute("resy"))];return{crs:i.getAttribute("CRS")||i.getAttribute("SRS"),extent:e,res:n}}function Po(i,t){const e=Xn(i);if(!(!A(e[0])||!A(e[1])||!A(e[2])||!A(e[3])))return e}function Oo(i,t){const e=parseFloat(i.getAttribute("min")),n=parseFloat(i.getAttribute("max"));return{min:e,max:n}}function Ro(i,t){const e=tt({},is,i,t);if(!A(e))return;const n=e.westBoundLongitude,r=e.southBoundLatitude,o=e.eastBoundLongitude,s=e.northBoundLatitude;if(!(!A(n)||!A(r)||!A(o)||!A(s)))return[n,r,o,s]}function Lo(i,t){return tt({},Wo,i,t)}function Mo(i,t){return tt({},Go,i,t)}function Io(i,t){return tt({},Jo,i,t)}function No(i,t){return tt({},Ko,i,t)}function Ho(i,t){return tt({},Qo,i,t)}function Vo(i,t){return tt([],ts,i,t)}function ko(i,t){const e=Kt(i.getAttribute("queryable"));return tt({queryable:A(e)?e:!1},Gn,i,t)}function Bo(i,t){var e=t[t.length-1];const n=tt({},Gn,i,t);if(!A(n))return;let r=Kt(i.getAttribute("queryable"));A(r)||(r=e.queryable),n.queryable=A(r)?r:!1;let o=Fe(i.getAttribute("cascaded"));A(o)||(o=e.cascaded),n.cascaded=o;let s=Kt(i.getAttribute("opaque"));A(s)||(s=e.opaque),n.opaque=A(s)?s:!1;let a=Kt(i.getAttribute("noSubsets"));A(a)||(a=e.noSubsets),n.noSubsets=A(a)?a:!1;let l=Pt(i.getAttribute("fixedWidth"));A(l)||(l=e.fixedWidth),n.fixedWidth=l;let d=Pt(i.getAttribute("fixedHeight"));A(d)||(d=e.fixedHeight),n.fixedHeight=d;const u=["Style","CRS","AuthorityURL"];for(let p=0,f=u.length;p<f;p++){const g=u[p],b=e[g];if(A(b)){let V=zn(n,g,[]);V=V.concat(b),n[g]=V}}const c=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let p=0,f=c.length;p<f;p++){const g=c[p],b=n[g];if(!A(b)){const V=e[g];n[g]=V}}return n}function Uo(i,t){return{name:i.getAttribute("name"),units:i.getAttribute("units"),unitSymbol:i.getAttribute("unitSymbol"),default:i.getAttribute("default"),multipleValues:Kt(i.getAttribute("multipleValues")),nearestValue:Kt(i.getAttribute("nearestValue")),current:Kt(i.getAttribute("current")),values:P(i)}}function Ot(i,t){return tt({},ls,i,t)}function Fo(i,t){return tt({},ns,i,t)}function jo(i,t){return tt({},os,i,t)}function zo(i,t){return tt({},ss,i,t)}function ji(i,t){return tt({},rs,i,t)}function Yn(i,t){var e=Ot(i,t);if(A(e)){const n=[Fe(i.getAttribute("width")),Fe(i.getAttribute("height"))];return e.size=n,e}}function Zo(i,t){var e=Ot(i,t);if(A(e))return e.name=i.getAttribute("name"),e}function qo(i,t){var e=Ot(i,t);if(A(e))return e.type=i.getAttribute("type"),e}function Xo(i,t){return tt({},as,i,t)}function Wn(i,t){return tt([],ds,i,t)}const rt=[null,"http://www.opengis.net/wms"],Yo=nt(rt,{Service:y(Mo),Capability:y(Lo)}),Wo=nt(rt,{Request:y(Fo),Exception:y(Vo),Layer:y(ko)}),Go=nt(rt,{Name:y(P),Title:y(P),Abstract:y(P),KeywordList:y(Wn),OnlineResource:y(Fi),ContactInformation:y(Io),Fees:y(P),AccessConstraints:y(P),LayerLimit:y(Ui),MaxWidth:y(Ui),MaxHeight:y(Ui)}),Jo=nt(rt,{ContactPersonPrimary:y(No),ContactPosition:y(P),ContactAddress:y(Ho),ContactVoiceTelephone:y(P),ContactFacsimileTelephone:y(P),ContactElectronicMailAddress:y(P)}),Ko=nt(rt,{ContactPerson:y(P),ContactOrganization:y(P)}),Qo=nt(rt,{AddressType:y(P),Address:y(P),City:y(P),StateOrProvince:y(P),PostCode:y(P),Country:y(P)}),ts=nt(rt,{Format:qn(P)}),Gn=nt(rt,{Name:y(P),Title:y(P),Abstract:y(P),KeywordList:y(Wn),CRS:ht(P),SRS:ht(P),EX_GeographicBoundingBox:y(Ro),LatLonBoundingBox:y(Po),BoundingBox:ht(Do),Dimension:ht(Uo),Attribution:y(To),AuthorityURL:ht(Zo),Identifier:ht(P),MetadataURL:ht(qo),DataURL:ht(Ot),FeatureListURL:ht(Ot),Style:ht(Xo),MinScaleDenominator:y(le),MaxScaleDenominator:y(le),ScaleHint:y(Oo),Layer:ht(Bo)}),es=nt(rt,{Title:y(P),OnlineResource:y(Fi),LogoURL:y(Yn)}),is=nt(rt,{westBoundLongitude:y(le),eastBoundLongitude:y(le),southBoundLatitude:y(le),northBoundLatitude:y(le)}),ns=nt(rt,{GetCapabilities:y(ji),GetMap:y(ji),GetFeatureInfo:y(ji)}),rs=nt(rt,{Format:ht(P),DCPType:ht(jo)}),os=nt(rt,{HTTP:y(zo)}),ss=nt(rt,{Get:y(Ot),Post:y(Ot)}),as=nt(rt,{Name:y(P),Title:y(P),Abstract:y(P),LegendURL:ht(Yn),StyleSheetURL:y(Ot),StyleURL:y(Ot)}),ls=nt(rt,{Format:y(P),OnlineResource:y(Fi)}),ds=nt(rt,{Keyword:qn(P)});class cs{constructor(t,e){!e&&typeof window<"u"&&(e=window.DOMParser),this.version=void 0,this._parser=new wo(e),this._data=t}data(t){return this._data=t,this}toJSON(t){return t=t||this._data,this.parse(t)}parse(t){return this.readFromDocument(this._parser.toDocument(t))}readFromDocument(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType==Ae.ELEMENT)return this.readFromNode(e);return null}readFromNode(t){return this.version=t.getAttribute("version"),tt({version:this.version},Yo,t,[])||null}}async function us(i){let t=new URL(i),e=t.searchParams;e.set("SERVICE","WMS"),e.set("REQUEST","GetCapabilities");let n=t.toString();const r=await fetch(n);if(r.ok){const o=await r.text();return new cs(o).toJSON()}else throw new Error(`Error: ${r.status}`)}function zi(i){const t=/\b(?:wms|ows)\b/i,e=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(i)?"TileWMS":e.test(i)?"XYZ":!1}function hs(i){const e=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(i),n=zi(i);return!!(i&&e&&n)}function Jn(i){return i.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function ps(i){try{return JSON.parse(Jn(i)),!!i}catch{return!1}}function fs(i,t){const e=new URL(i).searchParams;Object.entries(t).forEach(([s,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{e.set(l,a[l])}):e.set(s,a)});const n=i.split("?")[0],r=e.toString();return`${n}?${r}`}/**!
|
|
41
41
|
* Sortable 1.15.6
|
|
42
42
|
* @author RubaXa <trash@rubaxa.org>
|
|
43
43
|
* @author owenm <owen23355@gmail.com>
|
|
44
44
|
* @license MIT
|
|
45
|
-
*/function Jn(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),e.push.apply(e,n)}return e}function At(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Jn(Object(e),!0).forEach(function(n){fs(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):Jn(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}function je(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(t){return typeof t}:je=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},je(i)}function fs(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function Lt(){return Lt=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},Lt.apply(this,arguments)}function gs(i,t){if(i==null)return{};var e={},n=Object.keys(i),r,o;for(o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&(e[r]=i[r]);return e}function ms(i,t){if(i==null)return{};var e=gs(i,t),n,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}var ys="1.15.6";function Ot(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var Rt=Ot(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),_e=Ot(/Edge/i),Kn=Ot(/firefox/i),Ce=Ot(/safari/i)&&!Ot(/chrome/i)&&!Ot(/android/i),zi=Ot(/iP(ad|od|hone)/i),Qn=Ot(/chrome/i)&&Ot(/android/i),tr={capture:!1,passive:!1};function C(i,t,e){i.addEventListener(t,e,!Rt&&tr)}function A(i,t,e){i.removeEventListener(t,e,!Rt&&tr)}function ze(i,t){if(t){if(t[0]===">"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function er(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function Et(i,t,e,n){if(i){e=e||document;do{if(t!=null&&(t[0]===">"?i.parentNode===e&&ze(i,t):ze(i,t))||n&&i===e)return i;if(i===e)break}while(i=er(i))}return null}var ir=/\s+/g;function bt(i,t,e){if(i&&t)if(i.classList)i.classList[e?"add":"remove"](t);else{var n=(" "+i.className+" ").replace(ir," ").replace(" "+t+" "," ");i.className=(n+(e?" "+t:"")).replace(ir," ")}}function w(i,t,e){var n=i&&i.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(e=i.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function le(i,t){var e="";if(typeof i=="string")e=i;else do{var n=w(i,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function nr(i,t,e){if(i){var n=i.getElementsByTagName(t),r=0,o=n.length;if(e)for(;r<o;r++)e(n[r],r);return n}return[]}function _t(){var i=document.scrollingElement;return i||document.documentElement}function G(i,t,e,n,r){if(!(!i.getBoundingClientRect&&i!==window)){var o,s,a,l,d,u,c;if(i!==window&&i.parentNode&&i!==_t()?(o=i.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,d=o.right,u=o.height,c=o.width):(s=0,a=0,l=window.innerHeight,d=window.innerWidth,u=window.innerHeight,c=window.innerWidth),(t||e)&&i!==window&&(r=r||i.parentNode,!Rt))do if(r&&r.getBoundingClientRect&&(w(r,"transform")!=="none"||e&&w(r,"position")!=="static")){var p=r.getBoundingClientRect();s-=p.top+parseInt(w(r,"border-top-width")),a-=p.left+parseInt(w(r,"border-left-width")),l=s+o.height,d=a+o.width;break}while(r=r.parentNode);if(n&&i!==window){var f=le(r||i),g=f&&f.a,b=f&&f.d;f&&(s/=b,a/=g,c/=g,u/=b,l=s+u,d=a+c)}return{top:s,left:a,bottom:l,right:d,width:c,height:u}}}function rr(i,t,e){for(var n=kt(i,!0),r=G(i)[t];n;){var o=G(n)[e],s=void 0;if(s=r>=o,!s)return n;if(n===_t())break;n=kt(n,!1)}return!1}function de(i,t,e,n){for(var r=0,o=0,s=i.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==x.ghost&&(n||s[o]!==x.dragged)&&Et(s[o],e.draggable,i,!1)){if(r===t)return s[o];r++}o++}return null}function Zi(i,t){for(var e=i.lastElementChild;e&&(e===x.ghost||w(e,"display")==="none"||t&&!ze(e,t));)e=e.previousElementSibling;return e||null}function $t(i,t){var e=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==x.clone&&(!t||ze(i,t))&&e++;return e}function or(i){var t=0,e=0,n=_t();if(i)do{var r=le(i),o=r.a,s=r.d;t+=i.scrollLeft*o,e+=i.scrollTop*s}while(i!==n&&(i=i.parentNode));return[t,e]}function bs(i,t){for(var e in i)if(i.hasOwnProperty(e)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===i[e][n])return Number(e)}return-1}function kt(i,t){if(!i||!i.getBoundingClientRect)return _t();var e=i,n=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=w(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return _t();if(n||t)return e;n=!0}}while(e=e.parentNode);return _t()}function vs(i,t){if(i&&t)for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function qi(i,t){return Math.round(i.top)===Math.round(t.top)&&Math.round(i.left)===Math.round(t.left)&&Math.round(i.height)===Math.round(t.height)&&Math.round(i.width)===Math.round(t.width)}var Te;function sr(i,t){return function(){if(!Te){var e=arguments,n=this;e.length===1?i.call(n,e[0]):i.apply(n,e),Te=setTimeout(function(){Te=void 0},t)}}}function ws(){clearTimeout(Te),Te=void 0}function ar(i,t,e){i.scrollLeft+=t,i.scrollTop+=e}function lr(i){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(i).cloneNode(!0):e?e(i).clone(!0)[0]:i.cloneNode(!0)}function dr(i,t,e){var n={};return Array.from(i.children).forEach(function(r){var o,s,a,l;if(!(!Et(r,t.draggable,i,!1)||r.animated||r===e)){var d=G(r);n.left=Math.min((o=n.left)!==null&&o!==void 0?o:1/0,d.left),n.top=Math.min((s=n.top)!==null&&s!==void 0?s:1/0,d.top),n.right=Math.max((a=n.right)!==null&&a!==void 0?a:-1/0,d.right),n.bottom=Math.max((l=n.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var pt="Sortable"+new Date().getTime();function xs(){var i=[],t;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(w(r,"display")==="none"||r===x.ghost)){i.push({target:r,rect:G(r)});var o=At({},i[i.length-1].rect);if(r.thisAnimationDuration){var s=le(r,!0);s&&(o.top-=s.f,o.left-=s.e)}r.fromRect=o}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(bs(i,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var o=!1,s=0;i.forEach(function(a){var l=0,d=a.target,u=d.fromRect,c=G(d),p=d.prevFromRect,f=d.prevToRect,g=a.rect,b=le(d,!0);b&&(c.top-=b.f,c.left-=b.e),d.toRect=c,d.thisAnimationDuration&&qi(p,c)&&!qi(u,c)&&(g.top-c.top)/(g.left-c.left)===(u.top-c.top)/(u.left-c.left)&&(l=Es(g,p,f,r.options)),qi(c,u)||(d.prevFromRect=u,d.prevToRect=c,l||(l=r.options.animation),r.animate(d,g,c,l)),l&&(o=!0,s=Math.max(s,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),o?t=setTimeout(function(){typeof n=="function"&&n()},s):typeof n=="function"&&n(),i=[]},animate:function(n,r,o,s){if(s){w(n,"transition",""),w(n,"transform","");var a=le(this.el),l=a&&a.a,d=a&&a.d,u=(r.left-o.left)/(l||1),c=(r.top-o.top)/(d||1);n.animatingX=!!u,n.animatingY=!!c,w(n,"transform","translate3d("+u+"px,"+c+"px,0)"),this.forRepaintDummy=$s(n),w(n,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),w(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){w(n,"transition",""),w(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},s)}}}}function $s(i){return i.offsetWidth}function Es(i,t,e,n){return Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*n.animation}var ce=[],Xi={initializeByDefault:!0},De={mount:function(t){for(var e in Xi)Xi.hasOwnProperty(e)&&!(e in t)&&(t[e]=Xi[e]);ce.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),ce.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";ce.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][o]&&e[s.pluginName][o](At({sortable:e},n)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](At({sortable:e},n)))})},initializePlugins:function(t,e,n,r){ce.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,e,t.options);d.sortable=t,d.options=t.options,t[l]=d,Lt(n,d.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);typeof s<"u"&&(t.options[o]=s)}},getEventProperties:function(t,e){var n={};return ce.forEach(function(r){typeof r.eventProperties=="function"&&Lt(n,r.eventProperties.call(e[r.pluginName],t))}),n},modifyOption:function(t,e,n){var r;return ce.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[e]=="function"&&(r=o.optionListeners[e].call(t[o.pluginName],n))}),r}};function Ss(i){var t=i.sortable,e=i.rootEl,n=i.name,r=i.targetEl,o=i.cloneEl,s=i.toEl,a=i.fromEl,l=i.oldIndex,d=i.newIndex,u=i.oldDraggableIndex,c=i.newDraggableIndex,p=i.originalEvent,f=i.putSortable,g=i.extraEventProperties;if(t=t||e&&e[pt],!!t){var b,k=t.options,et="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Rt&&!_e?b=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(n,!0,!0)),b.to=s||e,b.from=a||e,b.item=r||e,b.clone=o,b.oldIndex=l,b.newIndex=d,b.oldDraggableIndex=u,b.newDraggableIndex=c,b.originalEvent=p,b.pullMode=f?f.lastPutMode:void 0;var Z=At(At({},g),De.getEventProperties(n,t));for(var ut in Z)b[ut]=Z[ut];e&&e.dispatchEvent(b),k[et]&&k[et].call(t,b)}}var As=["evt"],ft=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=ms(n,As);De.pluginEvent.bind(x)(t,e,At({dragEl:h,parentEl:z,ghostEl:$,rootEl:V,nextEl:Kt,lastDownEl:Ze,cloneEl:U,cloneHidden:Vt,dragStarted:Le,putSortable:ot,activeSortable:x.active,originalEvent:r,oldIndex:ue,oldDraggableIndex:Pe,newIndex:vt,newDraggableIndex:Bt,hideGhostForTarget:mr,unhideGhostForTarget:yr,cloneNowHidden:function(){Vt=!0},cloneNowShown:function(){Vt=!1},dispatchSortableEvent:function(a){ct({sortable:e,name:a,originalEvent:r})}},o))};function ct(i){Ss(At({putSortable:ot,cloneEl:U,targetEl:h,rootEl:V,oldIndex:ue,oldDraggableIndex:Pe,newIndex:vt,newDraggableIndex:Bt},i))}var h,z,$,V,Kt,Ze,U,Vt,ue,vt,Pe,Bt,qe,ot,he=!1,Xe=!1,Ye=[],Qt,St,Yi,Wi,cr,ur,Le,pe,Oe,Re=!1,We=!1,Ge,lt,Gi=[],Ji=!1,Je=[],Ke=typeof document<"u",Qe=zi,hr=_e||Rt?"cssFloat":"float",_s=Ke&&!Qn&&!zi&&"draggable"in document.createElement("div"),pr=function(){if(Ke){if(Rt)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),fr=function(t,e){var n=w(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=de(t,0,e),s=de(t,1,e),a=o&&w(o),l=s&&w(s),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+G(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+G(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var c=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=r&&n[hr]==="none"||s&&n[hr]==="none"&&d+u>r)?"vertical":"horizontal"},Cs=function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,s=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,d=n?e.width:e.height;return r===a||o===l||r+s/2===a+d/2},Ts=function(t,e){var n;return Ye.some(function(r){var o=r[pt].options.emptyInsertThreshold;if(!(!o||Zi(r))){var s=G(r),a=t>=s.left-o&&t<=s.right+o,l=e>=s.top-o&&e<=s.bottom+o;if(a&&l)return n=r}}),n},gr=function(t){function e(o,s){return function(a,l,d,u){var c=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(o==null&&(s||c))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return e(o(a,l,d,u),s)(a,l,d,u);var p=(s?a:l).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-1}}var n={},r=t.group;(!r||je(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},mr=function(){!pr&&$&&w($,"display","none")},yr=function(){!pr&&$&&w($,"display","")};Ke&&!Qn&&document.addEventListener("click",function(i){if(Xe)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Xe=!1,!1},!0);var te=function(t){if(h){t=t.touches?t.touches[0]:t;var e=Ts(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[pt]._onDragOver(n)}}},Ds=function(t){h&&h.parentNode[pt]._isOutsideThisEl(t.target)};function x(i,t){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=t=Lt({},t),i[pt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return fr(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:x.supportPointer!==!1&&"PointerEvent"in window&&(!Ce||zi),emptyInsertThreshold:5};De.initializePlugins(this,i,e);for(var n in e)!(n in t)&&(t[n]=e[n]);gr(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:_s,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?C(i,"pointerdown",this._onTapStart):(C(i,"mousedown",this._onTapStart),C(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(i,"dragover",this),C(i,"dragenter",this)),Ye.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Lt(this,xs())}x.prototype={constructor:x,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(pe=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=r.filter;if(Hs(n),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ce&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=Et(l,r.draggable,n,!1),!(l&&l.animated)&&Ze!==l)){if(ue=$t(l),Pe=$t(l,r.draggable),typeof u=="function"){if(u.call(this,t,l,this)){ct({sortable:e,rootEl:d,name:"filter",targetEl:l,toEl:n,fromEl:n}),ft("filter",e,{evt:t}),o&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=Et(d,c.trim(),n,!1),c)return ct({sortable:e,rootEl:c,name:"filter",targetEl:l,fromEl:n,toEl:n}),ft("filter",e,{evt:t}),!0}),u)){o&&t.preventDefault();return}r.handle&&!Et(d,r.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var r=this,o=r.el,s=r.options,a=o.ownerDocument,l;if(n&&!h&&n.parentNode===o){var d=G(n);if(V=o,h=n,z=h.parentNode,Kt=h.nextSibling,Ze=n,qe=s.group,x.dragged=h,Qt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},cr=Qt.clientX-d.left,ur=Qt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(ft("delayEnded",r,{evt:t}),x.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Kn&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(t,e),ct({sortable:r,name:"choose",originalEvent:t}),bt(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(u){nr(h,u.trim(),Ki)}),C(a,"dragover",te),C(a,"mousemove",te),C(a,"touchmove",te),s.supportPointer?(C(a,"pointerup",r._onDrop),!this.nativeDraggable&&C(a,"pointercancel",r._onDrop)):(C(a,"mouseup",r._onDrop),C(a,"touchend",r._onDrop),C(a,"touchcancel",r._onDrop)),Kn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),ft("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(_e||Rt))){if(x.eventCanceled){this._onDrop();return}s.supportPointer?(C(a,"pointerup",r._disableDelayedDrag),C(a,"pointercancel",r._disableDelayedDrag)):(C(a,"mouseup",r._disableDelayedDrag),C(a,"touchend",r._disableDelayedDrag),C(a,"touchcancel",r._disableDelayedDrag)),C(a,"mousemove",r._delayedDragTouchMoveHandler),C(a,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&C(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Ki(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;A(t,"mouseup",this._disableDelayedDrag),A(t,"touchend",this._disableDelayedDrag),A(t,"touchcancel",this._disableDelayedDrag),A(t,"pointerup",this._disableDelayedDrag),A(t,"pointercancel",this._disableDelayedDrag),A(t,"mousemove",this._delayedDragTouchMoveHandler),A(t,"touchmove",this._delayedDragTouchMoveHandler),A(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):e?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(h,"dragend",this),C(V,"dragstart",this._onDragStart));try{document.selection?ei(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(he=!1,V&&h){ft("dragStarted",this,{evt:e}),this.nativeDraggable&&C(document,"dragover",Ds);var n=this.options;!t&&bt(h,n.dragClass,!1),bt(h,n.ghostClass,!0),x.active=this,t&&this._appendGhost(),ct({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(St){this._lastX=St.clientX,this._lastY=St.clientY,mr();for(var t=document.elementFromPoint(St.clientX,St.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(St.clientX,St.clientY),t!==e);)e=t;if(h.parentNode[pt]._isOutsideThisEl(t),e)do{if(e[pt]){var n=void 0;if(n=e[pt]._onDragOver({clientX:St.clientX,clientY:St.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=er(e));yr()}},_onTouchMove:function(t){if(Qt){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,s=$&&le($,!0),a=$&&s&&s.a,l=$&&s&&s.d,d=Qe&<&&or(lt),u=(o.clientX-Qt.clientX+r.x)/(a||1)+(d?d[0]-Gi[0]:0)/(a||1),c=(o.clientY-Qt.clientY+r.y)/(l||1)+(d?d[1]-Gi[1]:0)/(l||1);if(!x.active&&!he){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if($){s?(s.e+=u-(Yi||0),s.f+=c-(Wi||0)):s={a:1,b:0,c:0,d:1,e:u,f:c};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");w($,"webkitTransform",p),w($,"mozTransform",p),w($,"msTransform",p),w($,"transform",p),Yi=u,Wi=c,St=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!$){var t=this.options.fallbackOnBody?document.body:V,e=G(h,!0,Qe,!0,t),n=this.options;if(Qe){for(lt=t;w(lt,"position")==="static"&&w(lt,"transform")==="none"&<!==document;)lt=lt.parentNode;lt!==document.body&<!==document.documentElement?(lt===document&&(lt=_t()),e.top+=lt.scrollTop,e.left+=lt.scrollLeft):lt=_t(),Gi=or(lt)}$=h.cloneNode(!0),bt($,n.ghostClass,!1),bt($,n.fallbackClass,!0),bt($,n.dragClass,!0),w($,"transition",""),w($,"transform",""),w($,"box-sizing","border-box"),w($,"margin",0),w($,"top",e.top),w($,"left",e.left),w($,"width",e.width),w($,"height",e.height),w($,"opacity","0.8"),w($,"position",Qe?"absolute":"fixed"),w($,"zIndex","100000"),w($,"pointerEvents","none"),x.ghost=$,t.appendChild($),w($,"transform-origin",cr/parseInt($.style.width)*100+"% "+ur/parseInt($.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;if(ft("dragStart",this,{evt:t}),x.eventCanceled){this._onDrop();return}ft("setupClone",this),x.eventCanceled||(U=lr(h),U.removeAttribute("id"),U.draggable=!1,U.style["will-change"]="",this._hideClone(),bt(U,this.options.chosenClass,!1),x.clone=U),n.cloneId=ei(function(){ft("clone",n),!x.eventCanceled&&(n.options.removeCloneOnHide||V.insertBefore(U,h),n._hideClone(),ct({sortable:n,name:"clone"}))}),!e&&bt(h,o.dragClass,!0),e?(Xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(A(document,"mouseup",n._onDrop),A(document,"touchend",n._onDrop),A(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,h)),C(document,"drop",n),w(h,"transform","translateZ(0)")),he=!0,n._dragStartId=ei(n._dragStarted.bind(n,e,t)),C(document,"selectstart",n),Le=!0,window.getSelection().removeAllRanges(),Ce&&w(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,r,o,s,a=this.options,l=a.group,d=x.active,u=qe===l,c=a.sort,p=ot||d,f,g=this,b=!1;if(Ji)return;function k(wt,ee){ft(wt,g,At({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:s,dragRect:r,targetRect:o,canSort:c,fromSortable:p,target:n,completed:Z,onMove:function(ie,It){return ti(V,e,h,r,ie,G(ie),t,It)},changed:ut},ee))}function et(){k("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function Z(wt){return k("dragOverCompleted",{insertion:wt}),wt&&(u?d._hideClone():d._showClone(g),g!==p&&(bt(h,ot?ot.options.ghostClass:d.options.ghostClass,!1),bt(h,a.ghostClass,!0)),ot!==g&&g!==x.active?ot=g:g===x.active&&ot&&(ot=null),p===g&&(g._ignoreWhileAnimating=n),g.animateAll(function(){k("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===e&&!n.animated)&&(pe=null),!a.dragoverBubble&&!t.rootEl&&n!==document&&(h.parentNode[pt]._isOutsideThisEl(t.target),!wt&&te(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),b=!0}function ut(){vt=$t(h),Bt=$t(h,a.draggable),ct({sortable:g,name:"change",toEl:e,newIndex:vt,newDraggableIndex:Bt,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=Et(n,a.draggable,e,!0),k("dragOver"),x.eventCanceled)return b;if(h.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||g._ignoreWhileAnimating===n)return Z(!1);if(Xe=!1,d&&!a.disabled&&(u?c||(s=z!==V):ot===this||(this.lastPutMode=qe.checkPull(this,d,h,t))&&l.checkPut(this,d,h,t))){if(f=this._getDirection(t,n)==="vertical",r=G(h),k("dragOverValid"),x.eventCanceled)return b;if(s)return z=V,et(),this._hideClone(),k("revert"),x.eventCanceled||(Kt?V.insertBefore(h,Kt):V.appendChild(h)),Z(!0);var it=Zi(e,a.draggable);if(!it||Rs(t,f,this)&&!it.animated){if(it===h)return Z(!1);if(it&&e===t.target&&(n=it),n&&(o=G(n)),ti(V,e,h,r,n,o,t,!!n)!==!1)return et(),it&&it.nextSibling?e.insertBefore(h,it.nextSibling):e.appendChild(h),z=e,ut(),Z(!0)}else if(it&&Os(t,f,this)){var E=de(e,0,a,!0);if(E===h)return Z(!1);if(n=E,o=G(n),ti(V,e,h,r,n,o,t,!1)!==!1)return et(),e.insertBefore(h,E),z=e,ut(),Z(!0)}else if(n.parentNode===e){o=G(n);var m=0,_,N=h.parentNode!==e,M=!Cs(h.animated&&h.toRect||r,n.animated&&n.toRect||o,f),K=f?"top":"left",Q=rr(n,"top","top")||rr(h,"top","top"),B=Q?Q.scrollTop:void 0;pe!==n&&(_=o[K],Re=!1,We=!M&&a.invertSwap||N),m=Ms(t,n,o,f,M?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,We,pe===n);var I;if(m!==0){var Y=$t(h);do Y-=m,I=z.children[Y];while(I&&(w(I,"display")==="none"||I===$))}if(m===0||I===n)return Z(!1);pe=n,Oe=m;var gt=n.nextElementSibling,at=!1;at=m===1;var mt=ti(V,e,h,r,n,o,t,at);if(mt!==!1)return(mt===1||mt===-1)&&(at=mt===1),Ji=!0,setTimeout(Ls,30),et(),at&&!gt?e.appendChild(h):n.parentNode.insertBefore(h,at?gt:n),Q&&ar(Q,0,B-Q.scrollTop),z=h.parentNode,_!==void 0&&!We&&(Ge=Math.abs(_-G(n)[K])),ut(),Z(!0)}if(e.contains(h))return Z(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){A(document,"mousemove",this._onTouchMove),A(document,"touchmove",this._onTouchMove),A(document,"pointermove",this._onTouchMove),A(document,"dragover",te),A(document,"mousemove",te),A(document,"touchmove",te)},_offUpEvents:function(){var t=this.el.ownerDocument;A(t,"mouseup",this._onDrop),A(t,"touchend",this._onDrop),A(t,"pointerup",this._onDrop),A(t,"pointercancel",this._onDrop),A(t,"touchcancel",this._onDrop),A(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(vt=$t(h),Bt=$t(h,n.draggable),ft("drop",this,{evt:t}),z=h&&h.parentNode,vt=$t(h),Bt=$t(h,n.draggable),x.eventCanceled){this._nulling();return}he=!1,We=!1,Re=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Qi(this.cloneId),Qi(this._dragStartId),this.nativeDraggable&&(A(document,"drop",this),A(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ce&&w(document.body,"user-select",""),w(h,"transform",""),t&&(Le&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),$&&$.parentNode&&$.parentNode.removeChild($),(V===z||ot&&ot.lastPutMode!=="clone")&&U&&U.parentNode&&U.parentNode.removeChild(U),h&&(this.nativeDraggable&&A(h,"dragend",this),Ki(h),h.style["will-change"]="",Le&&!he&&bt(h,ot?ot.options.ghostClass:this.options.ghostClass,!1),bt(h,this.options.chosenClass,!1),ct({sortable:this,name:"unchoose",toEl:z,newIndex:null,newDraggableIndex:null,originalEvent:t}),V!==z?(vt>=0&&(ct({rootEl:z,name:"add",toEl:z,fromEl:V,originalEvent:t}),ct({sortable:this,name:"remove",toEl:z,originalEvent:t}),ct({rootEl:z,name:"sort",toEl:z,fromEl:V,originalEvent:t}),ct({sortable:this,name:"sort",toEl:z,originalEvent:t})),ot&&ot.save()):vt!==ue&&vt>=0&&(ct({sortable:this,name:"update",toEl:z,originalEvent:t}),ct({sortable:this,name:"sort",toEl:z,originalEvent:t})),x.active&&((vt==null||vt===-1)&&(vt=ue,Bt=Pe),ct({sortable:this,name:"end",toEl:z,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ft("nulling",this),V=h=z=$=Kt=U=Ze=Vt=Qt=St=Le=vt=Bt=ue=Pe=pe=Oe=ot=qe=x.dragged=x.ghost=x.clone=x.active=null,Je.forEach(function(t){t.checked=!0}),Je.length=Yi=Wi=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),Ps(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,r=0,o=n.length,s=this.options;r<o;r++)e=n[r],Et(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||Ns(e));return t},sort:function(t,e){var n={},r=this.el;this.toArray().forEach(function(o,s){var a=r.children[s];Et(a,this.options.draggable,r,!1)&&(n[o]=a)},this),e&&this.captureAnimationState(),t.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return Et(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var r=De.modifyOption(this,t,e);typeof r<"u"?n[t]=r:n[t]=e,t==="group"&&gr(n)},destroy:function(){ft("destroy",this);var t=this.el;t[pt]=null,A(t,"mousedown",this._onTapStart),A(t,"touchstart",this._onTapStart),A(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(A(t,"dragover",this),A(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ye.splice(Ye.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Vt){if(ft("hideClone",this),x.eventCanceled)return;w(U,"display","none"),this.options.removeCloneOnHide&&U.parentNode&&U.parentNode.removeChild(U),Vt=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Vt){if(ft("showClone",this),x.eventCanceled)return;h.parentNode==V&&!this.options.group.revertClone?V.insertBefore(U,h):Kt?V.insertBefore(U,Kt):V.appendChild(U),this.options.group.revertClone&&this.animate(h,U),w(U,"display",""),Vt=!1}}};function Ps(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function ti(i,t,e,n,r,o,s,a){var l,d=i[pt],u=d.options.onMove,c;return window.CustomEvent&&!Rt&&!_e?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=i,l.dragged=e,l.draggedRect=n,l.related=r||t,l.relatedRect=o||G(t),l.willInsertAfter=a,l.originalEvent=s,i.dispatchEvent(l),u&&(c=u.call(d,l,s)),c}function Ki(i){i.draggable=!1}function Ls(){Ji=!1}function Os(i,t,e){var n=G(de(e.el,0,e.options,!0)),r=dr(e.el,e.options,$),o=10;return t?i.clientX<r.left-o||i.clientY<n.top&&i.clientX<n.right:i.clientY<r.top-o||i.clientY<n.bottom&&i.clientX<n.left}function Rs(i,t,e){var n=G(Zi(e.el,e.options.draggable)),r=dr(e.el,e.options,$),o=10;return t?i.clientX>r.right+o||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>r.bottom+o||i.clientX>n.right&&i.clientY>n.top}function Ms(i,t,e,n,r,o,s,a){var l=n?i.clientY:i.clientX,d=n?e.height:e.width,u=n?e.top:e.left,c=n?e.bottom:e.right,p=!1;if(!s){if(a&&Ge<d*r){if(!Re&&(Oe===1?l>u+d*o/2:l<c-d*o/2)&&(Re=!0),Re)p=!0;else if(Oe===1?l<u+Ge:l>c-Ge)return-Oe}else if(l>u+d*(1-r)/2&&l<c-d*(1-r)/2)return Is(t)}return p=p||s,p&&(l<u+d*o/2||l>c-d*o/2)?l>u+d/2?1:-1:0}function Is(i){return $t(h)<$t(i)?1:-1}function Ns(i){for(var t=i.tagName+i.className+i.src+i.href+i.textContent,e=t.length,n=0;e--;)n+=t.charCodeAt(e);return n.toString(36)}function Hs(i){Je.length=0;for(var t=i.getElementsByTagName("input"),e=t.length;e--;){var n=t[e];n.checked&&Je.push(n)}}function ei(i){return setTimeout(i,0)}function Qi(i){return clearTimeout(i)}Ke&&C(document,"touchmove",function(i){(x.active||he)&&i.cancelable&&i.preventDefault()}),x.utils={on:C,off:A,css:w,find:nr,is:function(t,e){return!!Et(t,e,t,!1)},extend:vs,throttle:sr,closest:Et,toggleClass:bt,clone:lr,index:$t,nextTick:ei,cancelNextTick:Qi,detectDirection:fr,getChild:de,expando:pt},x.get=function(i){return i[pt]},x.mount=function(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(x.utils=At(At({},x.utils),n.utils)),De.mount(n)})},x.create=function(i,t){return new x(i,t)},x.version=ys;var J=[],Me,tn,en=!1,nn,rn,ii,Ie;function ks(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return i.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?C(document,"dragover",this._handleAutoScroll):this.options.supportPointer?C(document,"pointermove",this._handleFallbackAutoScroll):n.touches?C(document,"touchmove",this._handleFallbackAutoScroll):C(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):(A(document,"pointermove",this._handleFallbackAutoScroll),A(document,"touchmove",this._handleFallbackAutoScroll),A(document,"mousemove",this._handleFallbackAutoScroll)),br(),ni(),ws()},nulling:function(){ii=tn=Me=en=Ie=nn=rn=null,J.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var r=this,o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(o,s);if(ii=e,n||this.options.forceAutoScrollFallback||_e||Rt||Ce){on(e,this.options,a,n);var l=kt(a,!0);en&&(!Ie||o!==nn||s!==rn)&&(Ie&&br(),Ie=setInterval(function(){var d=kt(document.elementFromPoint(o,s),!0);d!==l&&(l=d,ni()),on(e,r.options,d,n)},10),nn=o,rn=s)}else{if(!this.options.bubbleScroll||kt(a,!0)===_t()){ni();return}on(e,this.options,kt(a,!1),!1)}}},Lt(i,{pluginName:"scroll",initializeByDefault:!0})}function ni(){J.forEach(function(i){clearInterval(i.pid)}),J=[]}function br(){clearInterval(Ie)}var on=sr(function(i,t,e,n){if(t.scroll){var r=(i.touches?i.touches[0]:i).clientX,o=(i.touches?i.touches[0]:i).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=_t(),d=!1,u;tn!==e&&(tn=e,ni(),Me=t.scroll,u=t.scrollFn,Me===!0&&(Me=kt(e,!0)));var c=0,p=Me;do{var f=p,g=G(f),b=g.top,k=g.bottom,et=g.left,Z=g.right,ut=g.width,it=g.height,E=void 0,m=void 0,_=f.scrollWidth,N=f.scrollHeight,M=w(f),K=f.scrollLeft,Q=f.scrollTop;f===l?(E=ut<_&&(M.overflowX==="auto"||M.overflowX==="scroll"||M.overflowX==="visible"),m=it<N&&(M.overflowY==="auto"||M.overflowY==="scroll"||M.overflowY==="visible")):(E=ut<_&&(M.overflowX==="auto"||M.overflowX==="scroll"),m=it<N&&(M.overflowY==="auto"||M.overflowY==="scroll"));var B=E&&(Math.abs(Z-r)<=s&&K+ut<_)-(Math.abs(et-r)<=s&&!!K),I=m&&(Math.abs(k-o)<=s&&Q+it<N)-(Math.abs(b-o)<=s&&!!Q);if(!J[c])for(var Y=0;Y<=c;Y++)J[Y]||(J[Y]={});(J[c].vx!=B||J[c].vy!=I||J[c].el!==f)&&(J[c].el=f,J[c].vx=B,J[c].vy=I,clearInterval(J[c].pid),(B!=0||I!=0)&&(d=!0,J[c].pid=setInterval((function(){n&&this.layer===0&&x.active._onTouchMove(ii);var gt=J[this.layer].vy?J[this.layer].vy*a:0,at=J[this.layer].vx?J[this.layer].vx*a:0;typeof u=="function"&&u.call(x.dragged.parentNode[pt],at,gt,i,ii,J[this.layer].el)!=="continue"||ar(J[this.layer].el,at,gt)}).bind({layer:c}),24))),c++}while(t.bubbleScroll&&p!==l&&(p=kt(p,!1)));en=d}},30),vr=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var d=n||o;a();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);l(),d&&!d.el.contains(c)&&(s("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function sn(){}sn.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=de(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:vr},Lt(sn,{pluginName:"revertOnSpill"});function an(){}an.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:vr},Lt(an,{pluginName:"removeOnSpill"}),x.mount(new ks),x.mount(an,sn);const Vs=i=>{const t=i.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(n=>n.nodeType!=Node.ELEMENT_NODE||!n.classList.contains("sortable-fallback")),e},Bs=(i,t,e,n,r,o)=>{const a=i.item.parentNode;for(const b of e)a.appendChild(b);if(i.oldIndex==i.newIndex)return;const l=n.getArray(),d=i.item.querySelector("eox-layercontrol-layer").layer.get(r),u=l.find(b=>b.get(r)===d),c=o.dataset.layer,p=l.find(b=>b.get(r)==c);let f,g;for(f=0;f<l.length;f++)if(l[f]==u){n.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?n.insertAt(g,u):n.insertAt(g+1,u);break}t.requestUpdate()};function Us(i,t,e,n){let r=[],o=null;i._sortable=x.create(i,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>r=Vs(s),onMove:s=>{o=s.related},onEnd:s=>Bs(s,n,r,t,e,o)})}function Fs(i,t,e,n){const r=i.getArray();let o=!1;r.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),o=!0),s.get(e)||(s.set(e,`layer ${a}`),o=!0),o&&n.requestUpdate()})}function ln(i,t,e){let n=[];const r=(o,s,a)=>{n=[...n,...o.filter(d=>d.get(s)===a)];const l=o.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>r(d.getLayers().getArray(),s,a)),n};return r(i,t,e),n}function js(i,t,e){if(!i||!t)return!1;if(!wr(i,e))return!0;const n=i.get("minZoom"),r=i.get("maxZoom"),o=t.getView().getZoom();return o>n&&o<r}function wr(i,t){const e=i.get("minZoom"),n=i.get("maxZoom");return!!(t&&(e!==-1/0||n!==1/0))}function zs(i,t){var r,o,s;return!i||!t?void 0:i.getLayers?"group":((s=(r=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:r.ol_uid)==null?void 0:s.includes(i.getSource?(o=i.getSource())==null?void 0:o.ol_uid:void 0))?"draw":i.declutter_!==void 0?"vector":"raster"}const Zs=(i,t,e)=>{let n=t;return e.layer.getSource().getTileUrlFunction()&&(n||(n=e.layer.getSource().getTileUrlFunction()),e.layer.getSource().setTileUrlFunction((...r)=>ps(n(...r),i)),e.layer.getSource().setKey(new Date)),n};function qs(i,t,e){const n="updateStyleVariables"in t,r="setStyle"in t,o=n?t.style_:e.style;let s=o==null?void 0:o.variables;if(s){const a=dn(i);if(o.variables={...s,...a},n)t.updateStyleVariables(a);else if(r){const l=Xs(o);t.setStyle(l)}}}const dn=i=>{const t={};for(const e in i)if(typeof i[e]=="object"&&i[e]!==null){const n=dn(i[e]);for(const r in n)t[r]=n==null?void 0:n[r]}else t[e]=i==null?void 0:i[e];return t};function Xs(i){let t=i;if("variables"in i){let e=JSON.stringify(i);const{variables:n}=i;for(const r in n)typeof n[r]=="number"?e=e.replaceAll(`["var","${r}"]`,n[r]):e=e.replaceAll(`["var","${r}"]`,`"${n[r]}"`);t=JSON.parse(e)}return t}const Ys=(i,t)=>{if(!i)return;let e;const n=dn(t);return Array.isArray(i)&&i.length?(e=i.find(r=>{const o=r.boundTo.key,s=r.boundTo.value;return n[o]==s}),e||(e=i)):e=i,Array.isArray(e)||(e=[e]),e.map(r=>{var o;return!("domainProperties"in r)||"domain"in r?{...r}:(o=Object.keys(r))==null?void 0:o.reduce((s,a)=>(a==="domainProperties"?s.domain=r[a].map(l=>n[l]):s[a]=r[a],s),{})})};function xr(i,t){var n;let e={};for(const r in i){const o=i[r].type;if(o&&o!=="object")e[r]=o==="number"?Number(t[r]):t[r];else if(typeof i[r]=="object"&&((n=i[r])!=null&&n.properties)){const s=xr(i[r].properties,t);Object.keys(s).length>0&&(e[r]=s)}}return e}function Ws(i,t){var o,s,a,l,d;if(!t)return null;let e={},n="updateStyleVariables"in i?(o=i.style_)==null?void 0:o.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&n)e=n;else if((l=(a=i.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const u=new URL(i.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(u.searchParams.entries())}else return null;const r=xr(((d=t.schema)==null?void 0:d.properties)||t.schema,e);return Object.keys(r).length?r:null}const Gs=(i,t)=>i==null?void 0:i.filter(e=>["remove","sort"].filter(n=>t!=null&&t.get("layerControlDisable")?n!=="sort":!0).includes(e)),Js=(i,t)=>i==null?void 0:i.filter(e=>{let n=!0;return["remove","sort"].includes(e)&&(n=!1),e==="info"&&(n=t.get("description")),e==="config"&&(n=t.get("layerConfig")),e==="datetime"&&(n=t.get("layerDatetime")),e==="legend"&&(n=t.get("layerLegend")),n}),Ks=(i,t)=>v`
|
|
46
|
-
<button slot="${i}-icon" class="icon">${t?i:
|
|
47
|
-
`,
|
|
45
|
+
*/function Kn(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),e.push.apply(e,n)}return e}function Ct(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Kn(Object(e),!0).forEach(function(n){gs(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):Kn(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}function je(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?je=function(t){return typeof t}:je=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},je(i)}function gs(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function Rt(){return Rt=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},Rt.apply(this,arguments)}function ms(i,t){if(i==null)return{};var e={},n=Object.keys(i),r,o;for(o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&(e[r]=i[r]);return e}function ys(i,t){if(i==null)return{};var e=ms(i,t),n,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}var bs="1.15.6";function Lt(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var Mt=Lt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ce=Lt(/Edge/i),Qn=Lt(/firefox/i),_e=Lt(/safari/i)&&!Lt(/chrome/i)&&!Lt(/android/i),Zi=Lt(/iP(ad|od|hone)/i),tr=Lt(/chrome/i)&&Lt(/android/i),er={capture:!1,passive:!1};function T(i,t,e){i.addEventListener(t,e,!Mt&&er)}function C(i,t,e){i.removeEventListener(t,e,!Mt&&er)}function ze(i,t){if(t){if(t[0]===">"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function ir(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function St(i,t,e,n){if(i){e=e||document;do{if(t!=null&&(t[0]===">"?i.parentNode===e&&ze(i,t):ze(i,t))||n&&i===e)return i;if(i===e)break}while(i=ir(i))}return null}var nr=/\s+/g;function bt(i,t,e){if(i&&t)if(i.classList)i.classList[e?"add":"remove"](t);else{var n=(" "+i.className+" ").replace(nr," ").replace(" "+t+" "," ");i.className=(n+(e?" "+t:"")).replace(nr," ")}}function w(i,t,e){var n=i&&i.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(e=i.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function de(i,t){var e="";if(typeof i=="string")e=i;else do{var n=w(i,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function rr(i,t,e){if(i){var n=i.getElementsByTagName(t),r=0,o=n.length;if(e)for(;r<o;r++)e(n[r],r);return n}return[]}function _t(){var i=document.scrollingElement;return i||document.documentElement}function W(i,t,e,n,r){if(!(!i.getBoundingClientRect&&i!==window)){var o,s,a,l,d,u,c;if(i!==window&&i.parentNode&&i!==_t()?(o=i.getBoundingClientRect(),s=o.top,a=o.left,l=o.bottom,d=o.right,u=o.height,c=o.width):(s=0,a=0,l=window.innerHeight,d=window.innerWidth,u=window.innerHeight,c=window.innerWidth),(t||e)&&i!==window&&(r=r||i.parentNode,!Mt))do if(r&&r.getBoundingClientRect&&(w(r,"transform")!=="none"||e&&w(r,"position")!=="static")){var p=r.getBoundingClientRect();s-=p.top+parseInt(w(r,"border-top-width")),a-=p.left+parseInt(w(r,"border-left-width")),l=s+o.height,d=a+o.width;break}while(r=r.parentNode);if(n&&i!==window){var f=de(r||i),g=f&&f.a,b=f&&f.d;f&&(s/=b,a/=g,c/=g,u/=b,l=s+u,d=a+c)}return{top:s,left:a,bottom:l,right:d,width:c,height:u}}}function or(i,t,e){for(var n=Bt(i,!0),r=W(i)[t];n;){var o=W(n)[e],s=void 0;if(s=r>=o,!s)return n;if(n===_t())break;n=Bt(n,!1)}return!1}function ce(i,t,e,n){for(var r=0,o=0,s=i.children;o<s.length;){if(s[o].style.display!=="none"&&s[o]!==x.ghost&&(n||s[o]!==x.dragged)&&St(s[o],e.draggable,i,!1)){if(r===t)return s[o];r++}o++}return null}function qi(i,t){for(var e=i.lastElementChild;e&&(e===x.ghost||w(e,"display")==="none"||t&&!ze(e,t));)e=e.previousElementSibling;return e||null}function Et(i,t){var e=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==x.clone&&(!t||ze(i,t))&&e++;return e}function sr(i){var t=0,e=0,n=_t();if(i)do{var r=de(i),o=r.a,s=r.d;t+=i.scrollLeft*o,e+=i.scrollTop*s}while(i!==n&&(i=i.parentNode));return[t,e]}function vs(i,t){for(var e in i)if(i.hasOwnProperty(e)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===i[e][n])return Number(e)}return-1}function Bt(i,t){if(!i||!i.getBoundingClientRect)return _t();var e=i,n=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=w(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return _t();if(n||t)return e;n=!0}}while(e=e.parentNode);return _t()}function ws(i,t){if(i&&t)for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function Xi(i,t){return Math.round(i.top)===Math.round(t.top)&&Math.round(i.left)===Math.round(t.left)&&Math.round(i.height)===Math.round(t.height)&&Math.round(i.width)===Math.round(t.width)}var Te;function ar(i,t){return function(){if(!Te){var e=arguments,n=this;e.length===1?i.call(n,e[0]):i.apply(n,e),Te=setTimeout(function(){Te=void 0},t)}}}function xs(){clearTimeout(Te),Te=void 0}function lr(i,t,e){i.scrollLeft+=t,i.scrollTop+=e}function dr(i){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(i).cloneNode(!0):e?e(i).clone(!0)[0]:i.cloneNode(!0)}function cr(i,t,e){var n={};return Array.from(i.children).forEach(function(r){var o,s,a,l;if(!(!St(r,t.draggable,i,!1)||r.animated||r===e)){var d=W(r);n.left=Math.min((o=n.left)!==null&&o!==void 0?o:1/0,d.left),n.top=Math.min((s=n.top)!==null&&s!==void 0?s:1/0,d.top),n.right=Math.max((a=n.right)!==null&&a!==void 0?a:-1/0,d.right),n.bottom=Math.max((l=n.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var pt="Sortable"+new Date().getTime();function Es(){var i=[],t;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(w(r,"display")==="none"||r===x.ghost)){i.push({target:r,rect:W(r)});var o=Ct({},i[i.length-1].rect);if(r.thisAnimationDuration){var s=de(r,!0);s&&(o.top-=s.f,o.left-=s.e)}r.fromRect=o}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(vs(i,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var o=!1,s=0;i.forEach(function(a){var l=0,d=a.target,u=d.fromRect,c=W(d),p=d.prevFromRect,f=d.prevToRect,g=a.rect,b=de(d,!0);b&&(c.top-=b.f,c.left-=b.e),d.toRect=c,d.thisAnimationDuration&&Xi(p,c)&&!Xi(u,c)&&(g.top-c.top)/(g.left-c.left)===(u.top-c.top)/(u.left-c.left)&&(l=Ss(g,p,f,r.options)),Xi(c,u)||(d.prevFromRect=u,d.prevToRect=c,l||(l=r.options.animation),r.animate(d,g,c,l)),l&&(o=!0,s=Math.max(s,l),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},l),d.thisAnimationDuration=l)}),clearTimeout(t),o?t=setTimeout(function(){typeof n=="function"&&n()},s):typeof n=="function"&&n(),i=[]},animate:function(n,r,o,s){if(s){w(n,"transition",""),w(n,"transform","");var a=de(this.el),l=a&&a.a,d=a&&a.d,u=(r.left-o.left)/(l||1),c=(r.top-o.top)/(d||1);n.animatingX=!!u,n.animatingY=!!c,w(n,"transform","translate3d("+u+"px,"+c+"px,0)"),this.forRepaintDummy=$s(n),w(n,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),w(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){w(n,"transition",""),w(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},s)}}}}function $s(i){return i.offsetWidth}function Ss(i,t,e,n){return Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*n.animation}var ue=[],Yi={initializeByDefault:!0},De={mount:function(t){for(var e in Yi)Yi.hasOwnProperty(e)&&!(e in t)&&(t[e]=Yi[e]);ue.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),ue.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";ue.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][o]&&e[s.pluginName][o](Ct({sortable:e},n)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](Ct({sortable:e},n)))})},initializePlugins:function(t,e,n,r){ue.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var d=new a(t,e,t.options);d.sortable=t,d.options=t.options,t[l]=d,Rt(n,d.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var s=this.modifyOption(t,o,t.options[o]);typeof s<"u"&&(t.options[o]=s)}},getEventProperties:function(t,e){var n={};return ue.forEach(function(r){typeof r.eventProperties=="function"&&Rt(n,r.eventProperties.call(e[r.pluginName],t))}),n},modifyOption:function(t,e,n){var r;return ue.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[e]=="function"&&(r=o.optionListeners[e].call(t[o.pluginName],n))}),r}};function As(i){var t=i.sortable,e=i.rootEl,n=i.name,r=i.targetEl,o=i.cloneEl,s=i.toEl,a=i.fromEl,l=i.oldIndex,d=i.newIndex,u=i.oldDraggableIndex,c=i.newDraggableIndex,p=i.originalEvent,f=i.putSortable,g=i.extraEventProperties;if(t=t||e&&e[pt],!!t){var b,V=t.options,et="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Mt&&!Ce?b=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(b=document.createEvent("Event"),b.initEvent(n,!0,!0)),b.to=s||e,b.from=a||e,b.item=r||e,b.clone=o,b.oldIndex=l,b.newIndex=d,b.oldDraggableIndex=u,b.newDraggableIndex=c,b.originalEvent=p,b.pullMode=f?f.lastPutMode:void 0;var Z=Ct(Ct({},g),De.getEventProperties(n,t));for(var ut in Z)b[ut]=Z[ut];e&&e.dispatchEvent(b),V[et]&&V[et].call(t,b)}}var Cs=["evt"],ft=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=ys(n,Cs);De.pluginEvent.bind(x)(t,e,Ct({dragEl:h,parentEl:z,ghostEl:E,rootEl:k,nextEl:Qt,lastDownEl:Ze,cloneEl:U,cloneHidden:Ut,dragStarted:Oe,putSortable:ot,activeSortable:x.active,originalEvent:r,oldIndex:he,oldDraggableIndex:Pe,newIndex:vt,newDraggableIndex:Ft,hideGhostForTarget:yr,unhideGhostForTarget:br,cloneNowHidden:function(){Ut=!0},cloneNowShown:function(){Ut=!1},dispatchSortableEvent:function(a){ct({sortable:e,name:a,originalEvent:r})}},o))};function ct(i){As(Ct({putSortable:ot,cloneEl:U,targetEl:h,rootEl:k,oldIndex:he,oldDraggableIndex:Pe,newIndex:vt,newDraggableIndex:Ft},i))}var h,z,E,k,Qt,Ze,U,Ut,he,vt,Pe,Ft,qe,ot,pe=!1,Xe=!1,Ye=[],te,At,Wi,Gi,ur,hr,Oe,fe,Re,Le=!1,We=!1,Ge,lt,Ji=[],Ki=!1,Je=[],Ke=typeof document<"u",Qe=Zi,pr=Ce||Mt?"cssFloat":"float",_s=Ke&&!tr&&!Zi&&"draggable"in document.createElement("div"),fr=function(){if(Ke){if(Mt)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),gr=function(t,e){var n=w(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=ce(t,0,e),s=ce(t,1,e),a=o&&w(o),l=s&&w(s),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+W(o).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+W(s).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&a.float&&a.float!=="none"){var c=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=r&&n[pr]==="none"||s&&n[pr]==="none"&&d+u>r)?"vertical":"horizontal"},Ts=function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,s=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,d=n?e.width:e.height;return r===a||o===l||r+s/2===a+d/2},Ds=function(t,e){var n;return Ye.some(function(r){var o=r[pt].options.emptyInsertThreshold;if(!(!o||qi(r))){var s=W(r),a=t>=s.left-o&&t<=s.right+o,l=e>=s.top-o&&e<=s.bottom+o;if(a&&l)return n=r}}),n},mr=function(t){function e(o,s){return function(a,l,d,u){var c=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(o==null&&(s||c))return!0;if(o==null||o===!1)return!1;if(s&&o==="clone")return o;if(typeof o=="function")return e(o(a,l,d,u),s)(a,l,d,u);var p=(s?a:l).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-1}}var n={},r=t.group;(!r||je(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},yr=function(){!fr&&E&&w(E,"display","none")},br=function(){!fr&&E&&w(E,"display","")};Ke&&!tr&&document.addEventListener("click",function(i){if(Xe)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Xe=!1,!1},!0);var ee=function(t){if(h){t=t.touches?t.touches[0]:t;var e=Ds(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[pt]._onDragOver(n)}}},Ps=function(t){h&&h.parentNode[pt]._isOutsideThisEl(t.target)};function x(i,t){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=t=Rt({},t),i[pt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return gr(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(s,a){s.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:x.supportPointer!==!1&&"PointerEvent"in window&&(!_e||Zi),emptyInsertThreshold:5};De.initializePlugins(this,i,e);for(var n in e)!(n in t)&&(t[n]=e[n]);mr(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:_s,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?T(i,"pointerdown",this._onTapStart):(T(i,"mousedown",this._onTapStart),T(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(T(i,"dragover",this),T(i,"dragenter",this)),Ye.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),Rt(this,Es())}x.prototype={constructor:x,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(fe=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,r=this.options,o=r.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,u=r.filter;if(Vs(n),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&_e&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=St(l,r.draggable,n,!1),!(l&&l.animated)&&Ze!==l)){if(he=Et(l),Pe=Et(l,r.draggable),typeof u=="function"){if(u.call(this,t,l,this)){ct({sortable:e,rootEl:d,name:"filter",targetEl:l,toEl:n,fromEl:n}),ft("filter",e,{evt:t}),o&&t.preventDefault();return}}else if(u&&(u=u.split(",").some(function(c){if(c=St(d,c.trim(),n,!1),c)return ct({sortable:e,rootEl:c,name:"filter",targetEl:l,fromEl:n,toEl:n}),ft("filter",e,{evt:t}),!0}),u)){o&&t.preventDefault();return}r.handle&&!St(d,r.handle,n,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,n){var r=this,o=r.el,s=r.options,a=o.ownerDocument,l;if(n&&!h&&n.parentNode===o){var d=W(n);if(k=o,h=n,z=h.parentNode,Qt=h.nextSibling,Ze=n,qe=s.group,x.dragged=h,te={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},ur=te.clientX-d.left,hr=te.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(ft("delayEnded",r,{evt:t}),x.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Qn&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(t,e),ct({sortable:r,name:"choose",originalEvent:t}),bt(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(u){rr(h,u.trim(),Qi)}),T(a,"dragover",ee),T(a,"mousemove",ee),T(a,"touchmove",ee),s.supportPointer?(T(a,"pointerup",r._onDrop),!this.nativeDraggable&&T(a,"pointercancel",r._onDrop)):(T(a,"mouseup",r._onDrop),T(a,"touchend",r._onDrop),T(a,"touchcancel",r._onDrop)),Qn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),ft("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ce||Mt))){if(x.eventCanceled){this._onDrop();return}s.supportPointer?(T(a,"pointerup",r._disableDelayedDrag),T(a,"pointercancel",r._disableDelayedDrag)):(T(a,"mouseup",r._disableDelayedDrag),T(a,"touchend",r._disableDelayedDrag),T(a,"touchcancel",r._disableDelayedDrag)),T(a,"mousemove",r._delayedDragTouchMoveHandler),T(a,"touchmove",r._delayedDragTouchMoveHandler),s.supportPointer&&T(a,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Qi(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._disableDelayedDrag),C(t,"touchend",this._disableDelayedDrag),C(t,"touchcancel",this._disableDelayedDrag),C(t,"pointerup",this._disableDelayedDrag),C(t,"pointercancel",this._disableDelayedDrag),C(t,"mousemove",this._delayedDragTouchMoveHandler),C(t,"touchmove",this._delayedDragTouchMoveHandler),C(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?T(document,"pointermove",this._onTouchMove):e?T(document,"touchmove",this._onTouchMove):T(document,"mousemove",this._onTouchMove):(T(h,"dragend",this),T(k,"dragstart",this._onDragStart));try{document.selection?ei(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(pe=!1,k&&h){ft("dragStarted",this,{evt:e}),this.nativeDraggable&&T(document,"dragover",Ps);var n=this.options;!t&&bt(h,n.dragClass,!1),bt(h,n.ghostClass,!0),x.active=this,t&&this._appendGhost(),ct({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(At){this._lastX=At.clientX,this._lastY=At.clientY,yr();for(var t=document.elementFromPoint(At.clientX,At.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(At.clientX,At.clientY),t!==e);)e=t;if(h.parentNode[pt]._isOutsideThisEl(t),e)do{if(e[pt]){var n=void 0;if(n=e[pt]._onDragOver({clientX:At.clientX,clientY:At.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=ir(e));br()}},_onTouchMove:function(t){if(te){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,s=E&&de(E,!0),a=E&&s&&s.a,l=E&&s&&s.d,d=Qe&<&&sr(lt),u=(o.clientX-te.clientX+r.x)/(a||1)+(d?d[0]-Ji[0]:0)/(a||1),c=(o.clientY-te.clientY+r.y)/(l||1)+(d?d[1]-Ji[1]:0)/(l||1);if(!x.active&&!pe){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(E){s?(s.e+=u-(Wi||0),s.f+=c-(Gi||0)):s={a:1,b:0,c:0,d:1,e:u,f:c};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");w(E,"webkitTransform",p),w(E,"mozTransform",p),w(E,"msTransform",p),w(E,"transform",p),Wi=u,Gi=c,At=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!E){var t=this.options.fallbackOnBody?document.body:k,e=W(h,!0,Qe,!0,t),n=this.options;if(Qe){for(lt=t;w(lt,"position")==="static"&&w(lt,"transform")==="none"&<!==document;)lt=lt.parentNode;lt!==document.body&<!==document.documentElement?(lt===document&&(lt=_t()),e.top+=lt.scrollTop,e.left+=lt.scrollLeft):lt=_t(),Ji=sr(lt)}E=h.cloneNode(!0),bt(E,n.ghostClass,!1),bt(E,n.fallbackClass,!0),bt(E,n.dragClass,!0),w(E,"transition",""),w(E,"transform",""),w(E,"box-sizing","border-box"),w(E,"margin",0),w(E,"top",e.top),w(E,"left",e.left),w(E,"width",e.width),w(E,"height",e.height),w(E,"opacity","0.8"),w(E,"position",Qe?"absolute":"fixed"),w(E,"zIndex","100000"),w(E,"pointerEvents","none"),x.ghost=E,t.appendChild(E),w(E,"transform-origin",ur/parseInt(E.style.width)*100+"% "+hr/parseInt(E.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;if(ft("dragStart",this,{evt:t}),x.eventCanceled){this._onDrop();return}ft("setupClone",this),x.eventCanceled||(U=dr(h),U.removeAttribute("id"),U.draggable=!1,U.style["will-change"]="",this._hideClone(),bt(U,this.options.chosenClass,!1),x.clone=U),n.cloneId=ei(function(){ft("clone",n),!x.eventCanceled&&(n.options.removeCloneOnHide||k.insertBefore(U,h),n._hideClone(),ct({sortable:n,name:"clone"}))}),!e&&bt(h,o.dragClass,!0),e?(Xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(C(document,"mouseup",n._onDrop),C(document,"touchend",n._onDrop),C(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,h)),T(document,"drop",n),w(h,"transform","translateZ(0)")),pe=!0,n._dragStartId=ei(n._dragStarted.bind(n,e,t)),T(document,"selectstart",n),Oe=!0,window.getSelection().removeAllRanges(),_e&&w(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,r,o,s,a=this.options,l=a.group,d=x.active,u=qe===l,c=a.sort,p=ot||d,f,g=this,b=!1;if(Ki)return;function V(wt,ie){ft(wt,g,Ct({evt:t,isOwner:u,axis:f?"vertical":"horizontal",revert:s,dragRect:r,targetRect:o,canSort:c,fromSortable:p,target:n,completed:Z,onMove:function(ne,Nt){return ti(k,e,h,r,ne,W(ne),t,Nt)},changed:ut},ie))}function et(){V("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function Z(wt){return V("dragOverCompleted",{insertion:wt}),wt&&(u?d._hideClone():d._showClone(g),g!==p&&(bt(h,ot?ot.options.ghostClass:d.options.ghostClass,!1),bt(h,a.ghostClass,!0)),ot!==g&&g!==x.active?ot=g:g===x.active&&ot&&(ot=null),p===g&&(g._ignoreWhileAnimating=n),g.animateAll(function(){V("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===e&&!n.animated)&&(fe=null),!a.dragoverBubble&&!t.rootEl&&n!==document&&(h.parentNode[pt]._isOutsideThisEl(t.target),!wt&&ee(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),b=!0}function ut(){vt=Et(h),Ft=Et(h,a.draggable),ct({sortable:g,name:"change",toEl:e,newIndex:vt,newDraggableIndex:Ft,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=St(n,a.draggable,e,!0),V("dragOver"),x.eventCanceled)return b;if(h.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||g._ignoreWhileAnimating===n)return Z(!1);if(Xe=!1,d&&!a.disabled&&(u?c||(s=z!==k):ot===this||(this.lastPutMode=qe.checkPull(this,d,h,t))&&l.checkPut(this,d,h,t))){if(f=this._getDirection(t,n)==="vertical",r=W(h),V("dragOverValid"),x.eventCanceled)return b;if(s)return z=k,et(),this._hideClone(),V("revert"),x.eventCanceled||(Qt?k.insertBefore(h,Qt):k.appendChild(h)),Z(!0);var it=qi(e,a.draggable);if(!it||Ms(t,f,this)&&!it.animated){if(it===h)return Z(!1);if(it&&e===t.target&&(n=it),n&&(o=W(n)),ti(k,e,h,r,n,o,t,!!n)!==!1)return et(),it&&it.nextSibling?e.insertBefore(h,it.nextSibling):e.appendChild(h),z=e,ut(),Z(!0)}else if(it&&Ls(t,f,this)){var $=ce(e,0,a,!0);if($===h)return Z(!1);if(n=$,o=W(n),ti(k,e,h,r,n,o,t,!1)!==!1)return et(),e.insertBefore(h,$),z=e,ut(),Z(!0)}else if(n.parentNode===e){o=W(n);var m=0,_,N=h.parentNode!==e,M=!Ts(h.animated&&h.toRect||r,n.animated&&n.toRect||o,f),J=f?"top":"left",K=or(n,"top","top")||or(h,"top","top"),B=K?K.scrollTop:void 0;fe!==n&&(_=o[J],Le=!1,We=!M&&a.invertSwap||N),m=Is(t,n,o,f,M?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,We,fe===n);var I;if(m!==0){var Y=Et(h);do Y-=m,I=z.children[Y];while(I&&(w(I,"display")==="none"||I===E))}if(m===0||I===n)return Z(!1);fe=n,Re=m;var gt=n.nextElementSibling,at=!1;at=m===1;var mt=ti(k,e,h,r,n,o,t,at);if(mt!==!1)return(mt===1||mt===-1)&&(at=mt===1),Ki=!0,setTimeout(Rs,30),et(),at&&!gt?e.appendChild(h):n.parentNode.insertBefore(h,at?gt:n),K&&lr(K,0,B-K.scrollTop),z=h.parentNode,_!==void 0&&!We&&(Ge=Math.abs(_-W(n)[J])),ut(),Z(!0)}if(e.contains(h))return Z(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){C(document,"mousemove",this._onTouchMove),C(document,"touchmove",this._onTouchMove),C(document,"pointermove",this._onTouchMove),C(document,"dragover",ee),C(document,"mousemove",ee),C(document,"touchmove",ee)},_offUpEvents:function(){var t=this.el.ownerDocument;C(t,"mouseup",this._onDrop),C(t,"touchend",this._onDrop),C(t,"pointerup",this._onDrop),C(t,"pointercancel",this._onDrop),C(t,"touchcancel",this._onDrop),C(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(vt=Et(h),Ft=Et(h,n.draggable),ft("drop",this,{evt:t}),z=h&&h.parentNode,vt=Et(h),Ft=Et(h,n.draggable),x.eventCanceled){this._nulling();return}pe=!1,We=!1,Le=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),tn(this.cloneId),tn(this._dragStartId),this.nativeDraggable&&(C(document,"drop",this),C(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),_e&&w(document.body,"user-select",""),w(h,"transform",""),t&&(Oe&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),E&&E.parentNode&&E.parentNode.removeChild(E),(k===z||ot&&ot.lastPutMode!=="clone")&&U&&U.parentNode&&U.parentNode.removeChild(U),h&&(this.nativeDraggable&&C(h,"dragend",this),Qi(h),h.style["will-change"]="",Oe&&!pe&&bt(h,ot?ot.options.ghostClass:this.options.ghostClass,!1),bt(h,this.options.chosenClass,!1),ct({sortable:this,name:"unchoose",toEl:z,newIndex:null,newDraggableIndex:null,originalEvent:t}),k!==z?(vt>=0&&(ct({rootEl:z,name:"add",toEl:z,fromEl:k,originalEvent:t}),ct({sortable:this,name:"remove",toEl:z,originalEvent:t}),ct({rootEl:z,name:"sort",toEl:z,fromEl:k,originalEvent:t}),ct({sortable:this,name:"sort",toEl:z,originalEvent:t})),ot&&ot.save()):vt!==he&&vt>=0&&(ct({sortable:this,name:"update",toEl:z,originalEvent:t}),ct({sortable:this,name:"sort",toEl:z,originalEvent:t})),x.active&&((vt==null||vt===-1)&&(vt=he,Ft=Pe),ct({sortable:this,name:"end",toEl:z,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){ft("nulling",this),k=h=z=E=Qt=U=Ze=Ut=te=At=Oe=vt=Ft=he=Pe=fe=Re=ot=qe=x.dragged=x.ghost=x.clone=x.active=null,Je.forEach(function(t){t.checked=!0}),Je.length=Wi=Gi=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),Os(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,r=0,o=n.length,s=this.options;r<o;r++)e=n[r],St(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||Hs(e));return t},sort:function(t,e){var n={},r=this.el;this.toArray().forEach(function(o,s){var a=r.children[s];St(a,this.options.draggable,r,!1)&&(n[o]=a)},this),e&&this.captureAnimationState(),t.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return St(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var r=De.modifyOption(this,t,e);typeof r<"u"?n[t]=r:n[t]=e,t==="group"&&mr(n)},destroy:function(){ft("destroy",this);var t=this.el;t[pt]=null,C(t,"mousedown",this._onTapStart),C(t,"touchstart",this._onTapStart),C(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(C(t,"dragover",this),C(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ye.splice(Ye.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Ut){if(ft("hideClone",this),x.eventCanceled)return;w(U,"display","none"),this.options.removeCloneOnHide&&U.parentNode&&U.parentNode.removeChild(U),Ut=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ut){if(ft("showClone",this),x.eventCanceled)return;h.parentNode==k&&!this.options.group.revertClone?k.insertBefore(U,h):Qt?k.insertBefore(U,Qt):k.appendChild(U),this.options.group.revertClone&&this.animate(h,U),w(U,"display",""),Ut=!1}}};function Os(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function ti(i,t,e,n,r,o,s,a){var l,d=i[pt],u=d.options.onMove,c;return window.CustomEvent&&!Mt&&!Ce?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=i,l.dragged=e,l.draggedRect=n,l.related=r||t,l.relatedRect=o||W(t),l.willInsertAfter=a,l.originalEvent=s,i.dispatchEvent(l),u&&(c=u.call(d,l,s)),c}function Qi(i){i.draggable=!1}function Rs(){Ki=!1}function Ls(i,t,e){var n=W(ce(e.el,0,e.options,!0)),r=cr(e.el,e.options,E),o=10;return t?i.clientX<r.left-o||i.clientY<n.top&&i.clientX<n.right:i.clientY<r.top-o||i.clientY<n.bottom&&i.clientX<n.left}function Ms(i,t,e){var n=W(qi(e.el,e.options.draggable)),r=cr(e.el,e.options,E),o=10;return t?i.clientX>r.right+o||i.clientY>n.bottom&&i.clientX>n.left:i.clientY>r.bottom+o||i.clientX>n.right&&i.clientY>n.top}function Is(i,t,e,n,r,o,s,a){var l=n?i.clientY:i.clientX,d=n?e.height:e.width,u=n?e.top:e.left,c=n?e.bottom:e.right,p=!1;if(!s){if(a&&Ge<d*r){if(!Le&&(Re===1?l>u+d*o/2:l<c-d*o/2)&&(Le=!0),Le)p=!0;else if(Re===1?l<u+Ge:l>c-Ge)return-Re}else if(l>u+d*(1-r)/2&&l<c-d*(1-r)/2)return Ns(t)}return p=p||s,p&&(l<u+d*o/2||l>c-d*o/2)?l>u+d/2?1:-1:0}function Ns(i){return Et(h)<Et(i)?1:-1}function Hs(i){for(var t=i.tagName+i.className+i.src+i.href+i.textContent,e=t.length,n=0;e--;)n+=t.charCodeAt(e);return n.toString(36)}function Vs(i){Je.length=0;for(var t=i.getElementsByTagName("input"),e=t.length;e--;){var n=t[e];n.checked&&Je.push(n)}}function ei(i){return setTimeout(i,0)}function tn(i){return clearTimeout(i)}Ke&&T(document,"touchmove",function(i){(x.active||pe)&&i.cancelable&&i.preventDefault()}),x.utils={on:T,off:C,css:w,find:rr,is:function(t,e){return!!St(t,e,t,!1)},extend:ws,throttle:ar,closest:St,toggleClass:bt,clone:dr,index:Et,nextTick:ei,cancelNextTick:tn,detectDirection:gr,getChild:ce,expando:pt},x.get=function(i){return i[pt]},x.mount=function(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(x.utils=Ct(Ct({},x.utils),n.utils)),De.mount(n)})},x.create=function(i,t){return new x(i,t)},x.version=bs;var G=[],Me,en,nn=!1,rn,on,ii,Ie;function ks(){function i(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var t in this)t.charAt(0)==="_"&&typeof this[t]=="function"&&(this[t]=this[t].bind(this))}return i.prototype={dragStarted:function(e){var n=e.originalEvent;this.sortable.nativeDraggable?T(document,"dragover",this._handleAutoScroll):this.options.supportPointer?T(document,"pointermove",this._handleFallbackAutoScroll):n.touches?T(document,"touchmove",this._handleFallbackAutoScroll):T(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var n=e.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?C(document,"dragover",this._handleAutoScroll):(C(document,"pointermove",this._handleFallbackAutoScroll),C(document,"touchmove",this._handleFallbackAutoScroll),C(document,"mousemove",this._handleFallbackAutoScroll)),vr(),ni(),xs()},nulling:function(){ii=en=Me=nn=Ie=rn=on=null,G.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,n){var r=this,o=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(o,s);if(ii=e,n||this.options.forceAutoScrollFallback||Ce||Mt||_e){sn(e,this.options,a,n);var l=Bt(a,!0);nn&&(!Ie||o!==rn||s!==on)&&(Ie&&vr(),Ie=setInterval(function(){var d=Bt(document.elementFromPoint(o,s),!0);d!==l&&(l=d,ni()),sn(e,r.options,d,n)},10),rn=o,on=s)}else{if(!this.options.bubbleScroll||Bt(a,!0)===_t()){ni();return}sn(e,this.options,Bt(a,!1),!1)}}},Rt(i,{pluginName:"scroll",initializeByDefault:!0})}function ni(){G.forEach(function(i){clearInterval(i.pid)}),G=[]}function vr(){clearInterval(Ie)}var sn=ar(function(i,t,e,n){if(t.scroll){var r=(i.touches?i.touches[0]:i).clientX,o=(i.touches?i.touches[0]:i).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=_t(),d=!1,u;en!==e&&(en=e,ni(),Me=t.scroll,u=t.scrollFn,Me===!0&&(Me=Bt(e,!0)));var c=0,p=Me;do{var f=p,g=W(f),b=g.top,V=g.bottom,et=g.left,Z=g.right,ut=g.width,it=g.height,$=void 0,m=void 0,_=f.scrollWidth,N=f.scrollHeight,M=w(f),J=f.scrollLeft,K=f.scrollTop;f===l?($=ut<_&&(M.overflowX==="auto"||M.overflowX==="scroll"||M.overflowX==="visible"),m=it<N&&(M.overflowY==="auto"||M.overflowY==="scroll"||M.overflowY==="visible")):($=ut<_&&(M.overflowX==="auto"||M.overflowX==="scroll"),m=it<N&&(M.overflowY==="auto"||M.overflowY==="scroll"));var B=$&&(Math.abs(Z-r)<=s&&J+ut<_)-(Math.abs(et-r)<=s&&!!J),I=m&&(Math.abs(V-o)<=s&&K+it<N)-(Math.abs(b-o)<=s&&!!K);if(!G[c])for(var Y=0;Y<=c;Y++)G[Y]||(G[Y]={});(G[c].vx!=B||G[c].vy!=I||G[c].el!==f)&&(G[c].el=f,G[c].vx=B,G[c].vy=I,clearInterval(G[c].pid),(B!=0||I!=0)&&(d=!0,G[c].pid=setInterval((function(){n&&this.layer===0&&x.active._onTouchMove(ii);var gt=G[this.layer].vy?G[this.layer].vy*a:0,at=G[this.layer].vx?G[this.layer].vx*a:0;typeof u=="function"&&u.call(x.dragged.parentNode[pt],at,gt,i,ii,G[this.layer].el)!=="continue"||lr(G[this.layer].el,at,gt)}).bind({layer:c}),24))),c++}while(t.bubbleScroll&&p!==l&&(p=Bt(p,!1)));nn=d}},30),wr=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var d=n||o;a();var u=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,c=document.elementFromPoint(u.clientX,u.clientY);l(),d&&!d.el.contains(c)&&(s("spill"),this.onSpill({dragEl:r,putSortable:n}))}};function an(){}an.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=ce(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:wr},Rt(an,{pluginName:"revertOnSpill"});function ln(){}ln.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:wr},Rt(ln,{pluginName:"removeOnSpill"}),x.mount(new ks),x.mount(ln,an);const Bs=i=>{const t=i.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(n=>n.nodeType!=Node.ELEMENT_NODE||!n.classList.contains("sortable-fallback")),e},Us=(i,t,e,n,r,o)=>{const a=i.item.parentNode;for(const b of e)a.appendChild(b);if(i.oldIndex==i.newIndex)return;const l=n.getArray(),d=i.item.querySelector("eox-layercontrol-layer").layer.get(r),u=l.find(b=>b.get(r)===d),c=o.dataset.layer,p=l.find(b=>b.get(r)==c);let f,g;for(f=0;f<l.length;f++)if(l[f]==u){n.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?n.insertAt(g,u):n.insertAt(g+1,u);break}t.requestUpdate()};function Fs(i,t,e,n){let r=[],o=null;i._sortable=x.create(i,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>r=Bs(s),onMove:s=>{o=s.related},onEnd:s=>Us(s,n,r,t,e,o)})}function js(i,t,e,n){const r=i.getArray();let o=!1;r.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),o=!0),s.get(e)||(s.set(e,`layer ${a}`),o=!0),o&&n.requestUpdate()})}function dn(i,t,e){let n=[];const r=(o,s,a)=>{n=[...n,...o.filter(d=>d.get(s)===a)];const l=o.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>r(d.getLayers().getArray(),s,a)),n};return r(i,t,e),n}function zs(i,t,e){if(!i||!t)return!1;if(!xr(i,e))return!0;const n=i.get("minZoom"),r=i.get("maxZoom"),o=t.getView().getZoom();return o>n&&o<r}function xr(i,t){const e=i.get("minZoom"),n=i.get("maxZoom");return!!(t&&(e!==-1/0||n!==1/0))}function Zs(i,t){var r,o,s;return!i||!t?void 0:i.getLayers?"group":((s=(r=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:r.ol_uid)==null?void 0:s.includes(i.getSource?(o=i.getSource())==null?void 0:o.ol_uid:void 0))?"draw":i.declutter_!==void 0?"vector":"raster"}const qs=(i,t,e)=>{let n=t;return e.layer.getSource().getTileUrlFunction()&&(n||(n=e.layer.getSource().getTileUrlFunction()),e.layer.getSource().setTileUrlFunction((...r)=>fs(n(...r),i)),e.layer.getSource().setKey(new Date)),n};function Xs(i,t,e){const n="updateStyleVariables"in t,r="setStyle"in t,o=n?t.style_:e.style;let s=o==null?void 0:o.variables;if(s){const a=cn(i);if(o.variables={...s,...a},n)t.updateStyleVariables(a);else if(r){const l=Ys(o);t.setStyle(l)}}}const cn=i=>{const t={};for(const e in i)if(typeof i[e]=="object"&&i[e]!==null){const n=cn(i[e]);for(const r in n)t[r]=n==null?void 0:n[r]}else t[e]=i==null?void 0:i[e];return t};function Ys(i){let t=i;if("variables"in i){let e=JSON.stringify(i);const{variables:n}=i;for(const r in n)typeof n[r]=="number"?e=e.replaceAll(`["var","${r}"]`,n[r]):e=e.replaceAll(`["var","${r}"]`,`"${n[r]}"`);t=JSON.parse(e)}return t}const Ws=(i,t)=>{if(!i)return;const e=cn(t);let n,r;return Array.isArray(i)?r=structuredClone(i):r=[structuredClone(i)],n=r.filter(o=>{if(!("boundTo"in o))return!0;const s=o.boundTo.key,a=o.boundTo.value;return!(s in e)||e[s]==a}),n.length||(n=r),n.map(o=>{var s;return delete o.boundTo,!("domainProperties"in o)||"domain"in o?o:(s=Object.keys(o))==null?void 0:s.reduce((a,l)=>(l==="domainProperties"?a.domain=o[l].map(d=>e[d]):a[l]=o[l],a),{})})};function Er(i,t){var n;let e={};for(const r in i){const o=i[r].type;if(o&&o!=="object")e[r]=o==="number"?Number(t[r]):t[r];else if(typeof i[r]=="object"&&((n=i[r])!=null&&n.properties)){const s=Er(i[r].properties,t);Object.keys(s).length>0&&(e[r]=s)}}return e}function Gs(i,t){var o,s,a,l,d;if(!t)return null;let e={},n="updateStyleVariables"in i?(o=i.style_)==null?void 0:o.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&n)e=n;else if((l=(a=i.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const u=new URL(i.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(u.searchParams.entries())}else return null;const r=Er(((d=t.schema)==null?void 0:d.properties)||t.schema,e);return Object.keys(r).length?r:null}const Js=(i,t)=>i==null?void 0:i.filter(e=>["remove","sort"].filter(n=>t!=null&&t.get("layerControlDisable")?n!=="sort":!0).includes(e)),Ks=(i,t)=>i==null?void 0:i.filter(e=>{let n=!0;return["remove","sort"].includes(e)&&(n=!1),e==="info"&&(n=t.get("description")),e==="config"&&(n=t.get("layerConfig")),e==="datetime"&&(n=t.get("layerDatetime")),e==="legend"&&(n=t.get("layerLegend")),n}),Qs=(i,t)=>v`
|
|
46
|
+
<button slot="${i}-icon" class="icon">${t?i:D}</button>
|
|
47
|
+
`,ta=i=>v`
|
|
48
48
|
<button
|
|
49
49
|
class="remove-icon icon"
|
|
50
50
|
@click=${()=>{const{layer:t}=i;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),i.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
|
|
51
51
|
>
|
|
52
|
-
${i.unstyled?"x":
|
|
52
|
+
${i.unstyled?"x":D}
|
|
53
53
|
</button>
|
|
54
|
-
`,
|
|
54
|
+
`,ea=i=>v`
|
|
55
55
|
<span class="button sort-icon icon drag-handle">
|
|
56
|
-
${i?"═":
|
|
56
|
+
${i?"═":D}
|
|
57
57
|
</span>
|
|
58
58
|
`,$r=i=>{var e;const t=["layerControlHide","layerControlOptional"];return(e=i==null?void 0:i.getArray())==null?void 0:e.filter(n=>t.every(r=>!n.get(r)))};/**
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2020 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
-
*/const
|
|
62
|
+
*/const Sr=Vi(class extends ki{constructor(i){if(super(i),i.type!==kt.PROPERTY&&i.type!==kt.ATTRIBUTE&&i.type!==kt.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!mo(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[t]){if(t===xt||t===D)return t;const e=i.element,n=i.name;if(i.type===kt.PROPERTY){if(t===e[n])return xt}else if(i.type===kt.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(n))return xt}else if(i.type===kt.ATTRIBUTE&&e.getAttribute(n)===t+"")return xt;return Fn(i),t}});/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/class
|
|
66
|
+
*/class un extends ki{constructor(t){if(super(t),this.it=D,t.type!==kt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===D||t==null)return this._t=void 0,this.it=t;if(t===xt)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;const e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}}un.directiveName="unsafeHTML",un.resultType=1;const ia=Vi(un);/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/function*ri(i,t){if(i!==void 0){let e=0;for(const n of i)yield t(n,e++)}}var
|
|
70
|
+
*/function*ri(i,t){if(i!==void 0){let e=0;for(const n of i)yield t(n,e++)}}var jt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ar(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var hn,Cr;function na(){if(Cr)return hn;Cr=1;var i="Expected a function",t=NaN,e="[object Symbol]",n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l=typeof jt=="object"&&jt&&jt.Object===Object&&jt,d=typeof self=="object"&&self&&self.Object===Object&&self,u=l||d||Function("return this")(),c=Object.prototype,p=c.toString,f=Math.max,g=Math.min,b=function(){return u.Date.now()};function V(m,_,N){var M,J,K,B,I,Y,gt=0,at=!1,mt=!1,wt=!0;if(typeof m!="function")throw new TypeError(i);_=$(_)||0,Z(N)&&(at=!!N.leading,mt="maxWait"in N,K=mt?f($(N.maxWait)||0,_):K,wt="trailing"in N?!!N.trailing:wt);function ie(H){var yt=M,qt=J;return M=J=void 0,gt=H,B=m.apply(qt,yt),B}function _i(H){return gt=H,I=setTimeout(re,_),at?ie(H):B}function ne(H){var yt=H-Y,qt=H-gt,jr=_-yt;return mt?g(jr,K-qt):jr}function Nt(H){var yt=H-Y,qt=H-gt;return Y===void 0||yt>=_||yt<0||mt&&qt>=K}function re(){var H=b();if(Nt(H))return Ti(H);I=setTimeout(re,ne(H))}function Ti(H){return I=void 0,wt&&M?ie(H):(M=J=void 0,B)}function gn(){I!==void 0&&clearTimeout(I),gt=0,M=Y=J=I=void 0}function ke(){return I===void 0?B:Ti(b())}function F(){var H=b(),yt=Nt(H);if(M=arguments,J=this,Y=H,yt){if(I===void 0)return _i(Y);if(mt)return I=setTimeout(re,_),ie(Y)}return I===void 0&&(I=setTimeout(re,_)),B}return F.cancel=gn,F.flush=ke,F}function et(m,_,N){var M=!0,J=!0;if(typeof m!="function")throw new TypeError(i);return Z(N)&&(M="leading"in N?!!N.leading:M,J="trailing"in N?!!N.trailing:J),V(m,_,{leading:M,maxWait:_,trailing:J})}function Z(m){var _=typeof m;return!!m&&(_=="object"||_=="function")}function ut(m){return!!m&&typeof m=="object"}function it(m){return typeof m=="symbol"||ut(m)&&p.call(m)==e}function $(m){if(typeof m=="number")return m;if(it(m))return t;if(Z(m)){var _=typeof m.valueOf=="function"?m.valueOf():m;m=Z(_)?_+"":_}if(typeof m!="string")return m===0?m:+m;m=m.replace(n,"");var N=o.test(m);return N||s.test(m)?a(m.slice(2),N?2:8):r.test(m)?t:+m}return hn=et,hn}var ra=na();const _r=Ar(ra);/**
|
|
71
71
|
* @license
|
|
72
72
|
* Copyright 2018 Google LLC
|
|
73
73
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
74
|
-
*/const
|
|
74
|
+
*/const oi=i=>i??D;class Tr extends dt{constructor(){super();O(this,$t,[]);O(this,si,xn`
|
|
75
|
+
.separator {
|
|
76
|
+
margin: 0 0 24px 0;
|
|
77
|
+
}
|
|
75
78
|
color-legend {
|
|
76
79
|
--cle-background: transparent;
|
|
77
80
|
--cle-font-family: inherit;
|
|
@@ -80,51 +83,35 @@
|
|
|
80
83
|
--cle-letter-spacing-title: inherit;
|
|
81
84
|
--cle-padding: 0;
|
|
82
85
|
}
|
|
83
|
-
`);O(this,
|
|
86
|
+
`);O(this,ai,"");this.unstyled=!1,this.noShadow=!1,this.layer=null}get layerLegend(){return S(this,$t)?S(this,$t).length>1?S(this,$t):S(this,$t)[0]:null}set layerLegend(e){var n;Array.isArray(e)?Ht(this,$t,e.map((r,o)=>{var s;return{id:(((s=this.layer)==null?void 0:s.get("id"))??"")+o,...r}})):Ht(this,$t,[{id:(((n=this.layer)==null?void 0:n.get("id"))??"")+0,...e}])}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){this.layerLegend&&new ResizeObserver(()=>{var e;Ht(this,$t,(e=S(this,$t))==null?void 0:e.map(n=>(this.offsetWidth!==n.width&&(n.width=this.offsetWidth),{...n}))),this.requestUpdate()}).observe(this.renderRoot.querySelector(".legend-container"))}render(){return customElements.get("color-legend")||console.error("Please import `color-legend-element` in order to use layerLegend"),v`
|
|
84
87
|
<style>
|
|
85
|
-
${
|
|
86
|
-
${!this.unstyled&&
|
|
88
|
+
${S(this,si)}
|
|
89
|
+
${!this.unstyled&&S(this,ai)}
|
|
87
90
|
</style>
|
|
88
|
-
${
|
|
91
|
+
${Q(this.layerLegend,()=>v`
|
|
89
92
|
<div class="legend-container">
|
|
90
93
|
<!-- Render color-legend-->
|
|
91
|
-
${
|
|
92
|
-
<color-legend
|
|
93
|
-
id="${this.layer.get("id")+n}"
|
|
94
|
-
width=${e.width??325}
|
|
95
|
-
scaleType="${Ft(e.scaleType)}"
|
|
96
|
-
markType="${Ft(e.markType)}"
|
|
97
|
-
titleText="${Ft(e.title)}"
|
|
98
|
-
.range=${e.range}
|
|
99
|
-
.domain=${e.domain}
|
|
100
|
-
tickFormat="${Ft(e.tickFormat)}"
|
|
101
|
-
.ticks=${e.ticks??5}
|
|
102
|
-
.tickValues=${e.tickValues}
|
|
103
|
-
.marginLeft=${0}
|
|
104
|
-
.marginRight=${0}
|
|
105
|
-
>
|
|
106
|
-
</color-legend>
|
|
107
|
-
<div></div>
|
|
108
|
-
`),()=>v`
|
|
94
|
+
${S(this,$t).map((e,n,r)=>v`
|
|
109
95
|
<color-legend
|
|
110
|
-
id="${
|
|
111
|
-
width=${
|
|
112
|
-
scaleType="${
|
|
113
|
-
markType="${
|
|
114
|
-
titleText="${
|
|
115
|
-
.range=${
|
|
116
|
-
.domain=${
|
|
117
|
-
tickFormat="${
|
|
118
|
-
.ticks=${
|
|
119
|
-
.tickValues=${
|
|
96
|
+
id="${e.id}"
|
|
97
|
+
width=${e.width??325}
|
|
98
|
+
scaleType="${oi(e.scaleType)}"
|
|
99
|
+
markType="${oi(e.markType)}"
|
|
100
|
+
titleText="${oi(e.title)}"
|
|
101
|
+
.range=${e.range}
|
|
102
|
+
.domain=${e.domain}
|
|
103
|
+
tickFormat="${oi(e.tickFormat)}"
|
|
104
|
+
.ticks=${e.ticks??5}
|
|
105
|
+
.tickValues=${e.tickValues}
|
|
120
106
|
.marginLeft=${0}
|
|
121
107
|
.marginRight=${0}
|
|
122
108
|
>
|
|
123
109
|
</color-legend>
|
|
110
|
+
${n!==r.length-1?v`<div class="separator"></div>`:D}
|
|
124
111
|
`)}
|
|
125
112
|
</div>
|
|
126
113
|
`)}
|
|
127
|
-
`}}
|
|
114
|
+
`}}$t=new WeakMap,si=new WeakMap,ai=new WeakMap,q(Tr,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerLegend:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-legend",Tr);class Dr extends dt{constructor(){super();O(this,He);O(this,It,{});O(this,ge,null);O(this,Ne);O(this,li,xn`
|
|
128
115
|
color-legend {
|
|
129
116
|
--cle-background: transparent;
|
|
130
117
|
--cle-font-family: inherit;
|
|
@@ -132,34 +119,34 @@
|
|
|
132
119
|
--cle-font-weight: inherit --cle-letter-spacing: inherit;
|
|
133
120
|
--cle-letter-spacing-title: inherit;
|
|
134
121
|
}
|
|
135
|
-
`);O(this,
|
|
122
|
+
`);O(this,di,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.throttleDataChange=_r(j(this,He,yn),1e3)}updated(e){if(e.has("layerConfig")){const n=this.layerConfig.type==="style"||this.layerConfig.style?100:1e3;this.throttleDataChange=_r(j(this,He,yn),n),this.requestUpdate()}}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){Ht(this,ge,Gs(this.layer,this.layerConfig)),Object.keys(S(this,It)).length!==0&&Ht(this,ge,S(this,It)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const e={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return v`
|
|
136
123
|
<style>
|
|
137
|
-
${
|
|
138
|
-
${!this.unstyled&&
|
|
124
|
+
${S(this,li)}
|
|
125
|
+
${!this.unstyled&&S(this,di)}
|
|
139
126
|
</style>
|
|
140
|
-
${
|
|
141
|
-
${
|
|
127
|
+
${Q(this.layerConfig,()=>v`
|
|
128
|
+
${Q(this.layerConfig.legend,()=>v`
|
|
142
129
|
<eox-layercontrol-layer-legend
|
|
143
130
|
.noShadow=${!0}
|
|
144
131
|
.unstyled=${this.unstyled}
|
|
145
132
|
.layer=${this.layer}
|
|
146
|
-
.layerLegend=${
|
|
133
|
+
.layerLegend=${Ws(this.layerConfig.legend,S(this,It))}
|
|
147
134
|
></eox-layercontrol-layer-legend>
|
|
148
135
|
`)}
|
|
149
136
|
<!-- Render a JSON form for layer configuration -->
|
|
150
137
|
<eox-jsonform
|
|
151
138
|
.schema=${this.layerConfig.schema}
|
|
152
|
-
.value=${
|
|
139
|
+
.value=${S(this,ge)}
|
|
153
140
|
.options=${e}
|
|
154
141
|
@change=${this.throttleDataChange}
|
|
155
142
|
></eox-jsonform>
|
|
156
143
|
`)}
|
|
157
|
-
`}}
|
|
144
|
+
`}}It=new WeakMap,ge=new WeakMap,Ne=new WeakMap,He=new WeakSet,yn=function(e){Ht(this,It,e.detail),this.layerConfig.type==="style"||this.layerConfig.style?"setStyle"in this.layer||"updateStyleVariables"in this.layer?Xs(S(this,It),this.layer,this.layerConfig):console.error(`Layer type ${this.layer.get("type")??""} does not support styles configuration`):Ht(this,Ne,qs(S(this,It),S(this,Ne),this)),this.dispatchEvent(new CustomEvent("layerConfig:change",{bubbles:!0,detail:{jsonformValue:e.detail,layer:this.layer}})),this.requestUpdate()},li=new WeakMap,di=new WeakMap,q(Dr,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",Dr);class Pr extends dt{constructor(){super();O(this,ci);O(this,ui,"");O(this,hi,"");this.unstyled=!1,this.noShadow=!1,this.layerDatetime=null,this.layer=null}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){return customElements.get("eox-timecontrol")||console.error("Please import @eox/timecontrol in order to use layerDatetime"),v`
|
|
158
145
|
<style>
|
|
159
|
-
${
|
|
160
|
-
${!this.unstyled&&
|
|
146
|
+
${S(this,ui)}
|
|
147
|
+
${!this.unstyled&&S(this,hi)}
|
|
161
148
|
</style>
|
|
162
|
-
${
|
|
149
|
+
${Q(this.layerDatetime,()=>v`
|
|
163
150
|
<!-- Render a Timecontrol for layer date time -->
|
|
164
151
|
<eox-timecontrol
|
|
165
152
|
?unstyled=${this.unstyled}
|
|
@@ -172,10 +159,10 @@
|
|
|
172
159
|
.controlProperty=${void 0}
|
|
173
160
|
current-step=${this.layerDatetime.currentStep}
|
|
174
161
|
.displayFormat=${this.layerDatetime.displayFormat}
|
|
175
|
-
@stepchange=${j(this,
|
|
162
|
+
@stepchange=${j(this,ci,Zr)}
|
|
176
163
|
></eox-timecontrol>
|
|
177
164
|
`)}
|
|
178
|
-
`}}
|
|
165
|
+
`}}ci=new WeakSet,Zr=function(e){this.dispatchEvent(new CustomEvent("datetime:updated",{bubbles:!0,detail:{datetime:e.detail.currentStep,layer:this.layer}})),this.layerDatetime.currentStep=e.detail.currentStep,this.requestUpdate()},ui=new WeakMap,hi=new WeakMap,q(Pr,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerDatetime:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-datetime",Pr);class Or extends dt{constructor(){super();O(this,Ve,e=>(this.selectedTab===e||this.toolsAsList)&&"highlighted");O(this,pi,`
|
|
179
166
|
.tabbed figure,
|
|
180
167
|
.listed figure {
|
|
181
168
|
margin: 0;
|
|
@@ -197,7 +184,7 @@
|
|
|
197
184
|
.listed .tab.highlighted {
|
|
198
185
|
display: block;
|
|
199
186
|
}
|
|
200
|
-
`);O(this,
|
|
187
|
+
`);O(this,fi,`
|
|
201
188
|
.listed label {
|
|
202
189
|
display: flex;
|
|
203
190
|
justify-content: start;
|
|
@@ -237,19 +224,19 @@
|
|
|
237
224
|
}
|
|
238
225
|
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.tabs,n=this.actions,r=n.length+e.length>1;return v`
|
|
239
226
|
<style>
|
|
240
|
-
${
|
|
241
|
-
${!this.unstyled&&
|
|
227
|
+
${S(this,pi)}
|
|
228
|
+
${!this.unstyled&&S(this,fi)}
|
|
242
229
|
</style>
|
|
243
230
|
<div class="${this.toolsAsList?"listed":"tabbed"}">
|
|
244
231
|
<!-- Navigation for tabs and actions -->
|
|
245
|
-
${
|
|
232
|
+
${Q(r,()=>v`
|
|
246
233
|
<nav>
|
|
247
|
-
${
|
|
234
|
+
${Q(!this.toolsAsList,()=>v`
|
|
248
235
|
<div>
|
|
249
236
|
<!-- Labels for tabs -->
|
|
250
237
|
${ri(e,(o,s)=>v`
|
|
251
238
|
<label
|
|
252
|
-
class=${
|
|
239
|
+
class=${S(this,Ve).call(this,s)}
|
|
253
240
|
@click=${()=>this.selectedTab=s}
|
|
254
241
|
>
|
|
255
242
|
<!-- Customizable icon for each tab -->
|
|
@@ -272,23 +259,23 @@
|
|
|
272
259
|
<figure>
|
|
273
260
|
<!-- Content for each tab -->
|
|
274
261
|
${ri(e,(o,s)=>v`
|
|
275
|
-
${
|
|
262
|
+
${Q(this.toolsAsList,()=>v`
|
|
276
263
|
<label>
|
|
277
264
|
<!-- Customizable icon for each tab -->
|
|
278
265
|
<slot name=${`${o}-icon`}>${o}</slot>
|
|
279
266
|
<span>${o}</span>
|
|
280
267
|
</label>
|
|
281
268
|
`)}
|
|
282
|
-
<div class="tab ${
|
|
269
|
+
<div class="tab ${S(this,Ve).call(this,s)}">
|
|
283
270
|
<!-- Content slot for each tab -->
|
|
284
271
|
<slot name=${`${o}-content`}>${o}</slot>
|
|
285
272
|
</div>
|
|
286
273
|
`)}
|
|
287
274
|
</figure>
|
|
288
275
|
</div>
|
|
289
|
-
`}}
|
|
276
|
+
`}}Ve=new WeakMap,pi=new WeakMap,fi=new WeakMap,q(Or,"properties",{actions:{attribute:!1},selectedTab:{state:!0},tabs:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-tools-items",Or);const oa="button,.button { /* TODO: why does this only work here and not from :root? */ --primary-color: #004170; --primary-color-hover: #004170cc; --error-color: #ff5252; display: inline-flex; position: relative; align-items: center; color: #fff; border-width: 0; outline: none; border-radius: 4px; padding: 16px; height: 36px; cursor: pointer; font-family: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 1.25px; font-weight: 500; box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12); transition-property: box-shadow, transform, opacity, background; transition-duration: 0.28s; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);}button:hover:not([disabled]):not(.icon),.button:hover:not([disabled]):not(.icon) { box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12); background: var(--primary-color-hover);}button,button:active,.button,.button:active { background: var(--primary-color);}button[disabled],.button[disabled] { opacity: 0.5; cursor: not-allowed;}button.block,.button.block { display: block;}button.outline,.button.outline { background: transparent; box-shadow: none; color: var(--primary-color); outline: 1px solid var(--primary-color);}button.outline:hover,.button.outline:hover { background: transparent;}button.icon,.button.icon { background: transparent; border: none; box-shadow: none; padding: 0; border-radius: 50%; width: 24px; height: 24px; text-indent: -9999px;}button.icon-text,.button.icon-text { text-indent: 26px;}button.icon-text.block,.button.icon-text.block { text-indent: 20px;}button.icon:before,button.icon-text:before,.button.icon:before,.button.icon-text:before { position: absolute; text-indent: 0; line-height: initial;}button.icon-text.block:before,.button.icon-text.block:before { text-indent: -54px;}button.icon:before,.button.icon:before { width: 24px; height: 24px; margin-right: 0;}button.icon-text:before,.button.icon-text:before { width: 18px; height: 18px;}button.small,.button.small { height: 28px; padding: 12.4px; font-size: 0.75rem;}button.smallest.icon,button.smallest.icon::before { height: 16px; width: 16px; padding: 0px;}",sa=`input[type="radio"] { appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer; display: flex; flex-direction: row; align-items: center; width: 24px; height: 24px;}label span { font-size: small;}input[type="radio"]:after { display: block; content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-blank%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z' /%3E%3C/svg%3E"); width: 20px; height: 20px; margin-right: 4px;}input[type="radio"]:checked:after { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");}`,Rr=`input[type="checkbox"] { appearance: none; -webkit-appearance: none; margin: 0; cursor: pointer; display: flex; flex-direction: row; align-items: center; width: 24px; height: 24px;}input[type="checkbox"]:after { display: block; content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-blank-outline%3C/title%3E%3Cpath d='M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z' /%3E%3C/svg%3E"); width: 20px; height: 20px; margin-right: 4px;}input[type="checkbox"]:checked:after { content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");}`,aa=':root,:host { --range-slider-height: 6px; --range-slider-thumb-size: 15px; --range-slider-thumb-border-radius: 50%; --range-slider-color: #004170; --range-slider-track-color: #d7dcdf; --range-slider-track-border-radius: 0;}input[type="range"] { -webkit-appearance: none; border: none; color: var(--range-slider-color); overflow: hidden; padding-left: 0; margin-left: 7px;}/*webkit*/input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: var(--range-slider-thumb-size); height: var(--range-slider-thumb-size); border-radius: var(--range-slider-thumb-border-radius); background: var(--range-slider-color); border: none; box-shadow: none; margin-top: calc( var(--range-slider-height) * 0.5 - var(--range-slider-thumb-size) * 0.5 );}input[type="range"]::-webkit-slider-runnable-track { height: var(--range-slider-height); border: none; border-radius: var(--range-slider-track-border-radius); background: var(--range-slider-track-color); box-shadow: none;}input[type="range"]::-webkit-slider-thumb { cursor: grab; --clip-edges: 4px; --clip-top: calc( (var(--range-slider-thumb-size) - var(--range-slider-height)) * 0.5 ); --clip-bottom: calc(var(--range-slider-thumb-size) - var(--clip-top)); --clip-further: calc(100% + 1px); --box-fill: calc( -100vmax - var(--range-slider-thumb-size, var(--range-slider-thumb-size)) + 1px ) 0 0 100vmax currentColor; background: linear-gradient(currentColor 0 0) scroll no-repeat left center / 50% calc(var(--range-slider-height) + 1px); background-color: currentColor; box-shadow: var(--box-fill); border-radius: var(--range-slider-thumb-size, var(--range-slider-thumb-size)); filter: brightness(100%); clip-path: polygon( 100% -1px, var(--clip-edges) -1px, 0 var(--clip-top), -100vmax var(--clip-top), -100vmax var(--clip-bottom), 0 var(--clip-bottom), var(--clip-edges) 100%, var(--clip-further) var(--clip-further) );}/*mozilla*/input[type="range"]::-moz-range-thumb { width: var(--range-slider-thumb-size); height: var(--range-slider-thumb-size); border-radius: var(--range-slider-thumb-border-radius); background: var(--range-slider-color); border: none; box-shadow: none; cursor: grab;}input[type="range"]::-moz-range-track { border: none; border-radius: var(--range-slider-track-border-radius); background: var(--range-slider-track-color); box-shadow: none;}input[type="range"]::-moz-range-progress { appearance: none; background: currentColor; transition-delay: 30ms;}input[type="range"]::-moz-range-track,input[type="range"]::-moz-range-progress { height: calc(var(--range-slider-height)); border-radius: var(--range-slider-track-border-radius);}/*toolcool slider*/tc-range-slider { --height: var(--range-slider-height); --panel-bg: var(--range-slider-track-color); --panel-bg-hover: var(--range-slider-track-color); --panel-bg-fill: var(--range-slider-color); --panel-bg-border-radius: var(--range-slider-track-border-radius); --pointer-bg: var(--range-slider-color); --pointer-bg-hover: var(--range-slider-color); --pointer-bg-focus: var(--range-slider-color); --pointer-width: var(--range-slider-thumb-size); --pointer-height: var(--range-slider-thumb-size); --pointer-shadow: none; --pointer-shadow-hover: none; --pointer-shadow-focus: none; --pointer-border: none; --pointer-border-hover: 0; --pointer-border-focus: 0; --pointer-border-radius: var(--range-slider-thumb-border-radius);}';class Lr extends dt{constructor(){super();q(this,"_removeButton",()=>ta(this));q(this,"_sortButton",()=>ea(this.unstyled));q(this,"_button",e=>Qs(e,this.unstyled));q(this,"_getDefaultTools",()=>{var e;return v`
|
|
290
277
|
<div slot="info-content">
|
|
291
|
-
${
|
|
278
|
+
${ia(this.layer.get("description"))}
|
|
292
279
|
</div>
|
|
293
280
|
<div slot="opacity-content">
|
|
294
281
|
<!-- Input for opacity -->
|
|
@@ -297,13 +284,13 @@
|
|
|
297
284
|
min="0"
|
|
298
285
|
max="1"
|
|
299
286
|
step="0.01"
|
|
300
|
-
value=${
|
|
287
|
+
value=${Sr((e=this.layer)==null?void 0:e.getOpacity())}
|
|
301
288
|
@input=${n=>this.layer.setOpacity(parseFloat(n.target.value))}
|
|
302
289
|
/>
|
|
303
290
|
</div>
|
|
304
291
|
<div slot="config-content">
|
|
305
292
|
<!-- Layer configuration -->
|
|
306
|
-
${
|
|
293
|
+
${Q(this.layer.get("layerConfig"),()=>v`
|
|
307
294
|
<eox-layercontrol-layerconfig
|
|
308
295
|
slot="config-content"
|
|
309
296
|
.layer=${this.layer}
|
|
@@ -316,7 +303,7 @@
|
|
|
316
303
|
</div>
|
|
317
304
|
<div slot="datetime-content">
|
|
318
305
|
<!-- Layer datetime -->
|
|
319
|
-
${
|
|
306
|
+
${Q(this.layer.get("layerDatetime"),()=>v`
|
|
320
307
|
<eox-layercontrol-layer-datetime
|
|
321
308
|
slot="datetime-content"
|
|
322
309
|
.noShadow=${!0}
|
|
@@ -329,7 +316,7 @@
|
|
|
329
316
|
</div>
|
|
330
317
|
<div slot="legend-content">
|
|
331
318
|
<!-- Layer legend -->
|
|
332
|
-
${
|
|
319
|
+
${Q(this.layer.get("layerLegend"),()=>v`
|
|
333
320
|
<eox-layercontrol-layer-legend
|
|
334
321
|
slot="legend-content"
|
|
335
322
|
.noShadow=${!0}
|
|
@@ -342,11 +329,11 @@
|
|
|
342
329
|
</div>
|
|
343
330
|
<div slot="remove-icon">${this._removeButton()}</div>
|
|
344
331
|
<div slot="sort-icon">${this._sortButton()}</div>
|
|
345
|
-
`});O(this,
|
|
346
|
-
${
|
|
347
|
-
${oa}
|
|
348
|
-
${Lr}
|
|
332
|
+
`});O(this,gi,"");O(this,mi,`
|
|
333
|
+
${oa}
|
|
349
334
|
${sa}
|
|
335
|
+
${Rr}
|
|
336
|
+
${aa}
|
|
350
337
|
.drag-handle {
|
|
351
338
|
cursor: n-resize;
|
|
352
339
|
}
|
|
@@ -463,20 +450,20 @@
|
|
|
463
450
|
[slot=info-content] * {
|
|
464
451
|
max-width: 100%;
|
|
465
452
|
}
|
|
466
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=
|
|
453
|
+
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var l;const e=Js(this.tools,this.layer),n=Ks(this.tools,this.layer),r=this[`_${e==null?void 0:e[0]}Button`]?this[`_${e==null?void 0:e[0]}Button`]():D,o=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",s=e==null?void 0:e.length,a=n==null?void 0:n.length;return v`
|
|
467
454
|
<style>
|
|
468
|
-
${
|
|
469
|
-
${!this.unstyled&&
|
|
455
|
+
${S(this,gi)}
|
|
456
|
+
${!this.unstyled&&S(this,mi)}
|
|
470
457
|
</style>
|
|
471
|
-
${
|
|
472
|
-
${
|
|
458
|
+
${Q(s+a>0,()=>v`
|
|
459
|
+
${Q(s===1&&a===0,()=>v`
|
|
473
460
|
<div class="single-action-container">
|
|
474
461
|
<div class="single-action">${r}</div>
|
|
475
462
|
</div>
|
|
476
463
|
`,()=>v`
|
|
477
464
|
<details
|
|
478
465
|
class="tools"
|
|
479
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
466
|
+
open=${this.layer.get("layerControlToolsExpand")||D}
|
|
480
467
|
>
|
|
481
468
|
<summary>
|
|
482
469
|
<button class="icon ${o}">Tools</button>
|
|
@@ -497,8 +484,8 @@
|
|
|
497
484
|
</details>
|
|
498
485
|
`)}
|
|
499
486
|
`)}
|
|
500
|
-
`}}
|
|
501
|
-
${
|
|
487
|
+
`}}gi=new WeakMap,mi=new WeakMap,q(Lr,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",Lr);const la=i=>{const t=()=>{const e=zs(i.layer,i.map,i.showLayerZoomState);let n=!1;!e&&i.currLayerVisibilityBasedOnZoom?(i.currLayerVisibilityBasedOnZoom=!1,n=!0):e&&!i.currLayerVisibilityBasedOnZoom&&(i.currLayerVisibilityBasedOnZoom=!0,n=!0),n&&(i.requestUpdate(),i.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};xr(i.layer,i.showLayerZoomState)&&(t(),i.map.getView().on("change:resolution",()=>t()))},da=(i,t)=>{const e=t.layer;e.setVisible(i.target.checked),i.target.checked&&e.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(r=>{var o;r.layer!==e&&((o=r.layer)!=null&&o.get("layerControlExclusive"))&&(r.layer.setVisible(!1),r.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:e})),t.requestUpdate()};class Mr extends dt{constructor(){super();O(this,Tt);q(this,"currLayerVisibilityBasedOnZoom",!0);O(this,yi,"");O(this,bi,`
|
|
488
|
+
${Rr}
|
|
502
489
|
eox-layercontrol-layer {
|
|
503
490
|
width: 100%;
|
|
504
491
|
position: relative;
|
|
@@ -556,30 +543,30 @@
|
|
|
556
543
|
[data-type=draw] .title::before {
|
|
557
544
|
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
|
|
558
545
|
}
|
|
559
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){
|
|
546
|
+
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}firstUpdated(){la(this)}render(){var l;const e=this.layer.getVisible(),n=e?"visible":"",r=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",o=j(this,Tt,me).call(this,"layerControlDisable")?"disabled":"",s=j(this,Tt,me).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return v`
|
|
560
547
|
<style>
|
|
561
|
-
${
|
|
562
|
-
${!this.unstyled&&
|
|
548
|
+
${S(this,yi)}
|
|
549
|
+
${!this.unstyled&&S(this,bi)}
|
|
563
550
|
</style>
|
|
564
|
-
${
|
|
551
|
+
${Q(this.layer,()=>v`
|
|
565
552
|
<!-- Render the layer -->
|
|
566
553
|
<div class="layer ${n} ${r}">
|
|
567
554
|
<label class="drag-handle ${o}">
|
|
568
555
|
<!-- Input element for layer visibility -->
|
|
569
556
|
<input
|
|
570
557
|
type=${s}
|
|
571
|
-
.checked=${
|
|
572
|
-
@click=${j(this,
|
|
558
|
+
.checked=${Sr(e)}
|
|
559
|
+
@click=${j(this,Tt,qr)}
|
|
573
560
|
/>
|
|
574
561
|
|
|
575
562
|
<!-- Layer title -->
|
|
576
563
|
<span
|
|
577
|
-
class="title ${j(this,
|
|
578
|
-
style="--layer-color: ${j(this,
|
|
564
|
+
class="title ${j(this,Tt,me).call(this,"color")?"color-swatch":""}"
|
|
565
|
+
style="--layer-color: ${j(this,Tt,me).call(this,"color")}"
|
|
579
566
|
>
|
|
580
|
-
${j(this,
|
|
567
|
+
${j(this,Tt,me).call(this,this.titleProperty)}
|
|
581
568
|
</span>
|
|
582
|
-
${
|
|
569
|
+
${Q(a,()=>v`<span class="tools-placeholder"></span>`)}
|
|
583
570
|
</label>
|
|
584
571
|
</div>
|
|
585
572
|
|
|
@@ -592,7 +579,7 @@
|
|
|
592
579
|
.toolsAsList=${this.toolsAsList}
|
|
593
580
|
></eox-layercontrol-layer-tools>
|
|
594
581
|
`)}
|
|
595
|
-
`}}
|
|
582
|
+
`}}Tt=new WeakSet,me=function(e){var n;return(n=this.layer)==null?void 0:n.get(e)},qr=function(e){da(e,this)},yi=new WeakMap,bi=new WeakMap,q(Mr,"properties",{layer:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer",Mr);class Ir extends dt{constructor(){super();O(this,vi,"");O(this,wi,`
|
|
596
583
|
details summary {
|
|
597
584
|
cursor: pointer;
|
|
598
585
|
display: var(--layer-summary-visibility);
|
|
@@ -618,13 +605,13 @@
|
|
|
618
605
|
}
|
|
619
606
|
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){var r,o;const e=!!((r=this.group)!=null&&r.get("layerControlExpand")),n=(o=$r(this.group.getLayers()))==null?void 0:o.length;return v`
|
|
620
607
|
<style>
|
|
621
|
-
${
|
|
622
|
-
${!this.unstyled&&
|
|
608
|
+
${S(this,vi)}
|
|
609
|
+
${!this.unstyled&&S(this,wi)}
|
|
623
610
|
</style>
|
|
624
|
-
${
|
|
611
|
+
${Q(this.group,()=>v`
|
|
625
612
|
<!-- Render the details element with the layer control -->
|
|
626
613
|
<details
|
|
627
|
-
open=${e||
|
|
614
|
+
open=${e||D}
|
|
628
615
|
data-children-length=${n}
|
|
629
616
|
>
|
|
630
617
|
<summary>
|
|
@@ -657,7 +644,7 @@
|
|
|
657
644
|
></eox-layercontrol-layer-list>
|
|
658
645
|
</details>
|
|
659
646
|
`)}
|
|
660
|
-
`}}
|
|
647
|
+
`}}vi=new WeakMap,wi=new WeakMap,q(Ir,"properties",{group:{attribute:!1},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-group",Ir);var pn,Nr;function ca(){if(Nr)return pn;Nr=1;var i="Expected a function",t=NaN,e="[object Symbol]",n=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,s=/^0o[0-7]+$/i,a=parseInt,l=typeof jt=="object"&&jt&&jt.Object===Object&&jt,d=typeof self=="object"&&self&&self.Object===Object&&self,u=l||d||Function("return this")(),c=Object.prototype,p=c.toString,f=Math.max,g=Math.min,b=function(){return u.Date.now()};function V($,m,_){var N,M,J,K,B,I,Y=0,gt=!1,at=!1,mt=!0;if(typeof $!="function")throw new TypeError(i);m=it(m)||0,et(_)&&(gt=!!_.leading,at="maxWait"in _,J=at?f(it(_.maxWait)||0,m):J,mt="trailing"in _?!!_.trailing:mt);function wt(F){var H=N,yt=M;return N=M=void 0,Y=F,K=$.apply(yt,H),K}function ie(F){return Y=F,B=setTimeout(Nt,m),gt?wt(F):K}function _i(F){var H=F-I,yt=F-Y,qt=m-H;return at?g(qt,J-yt):qt}function ne(F){var H=F-I,yt=F-Y;return I===void 0||H>=m||H<0||at&&yt>=J}function Nt(){var F=b();if(ne(F))return re(F);B=setTimeout(Nt,_i(F))}function re(F){return B=void 0,mt&&N?wt(F):(N=M=void 0,K)}function Ti(){B!==void 0&&clearTimeout(B),Y=0,N=I=M=B=void 0}function gn(){return B===void 0?K:re(b())}function ke(){var F=b(),H=ne(F);if(N=arguments,M=this,I=F,H){if(B===void 0)return ie(I);if(at)return B=setTimeout(Nt,m),wt(I)}return B===void 0&&(B=setTimeout(Nt,m)),K}return ke.cancel=Ti,ke.flush=gn,ke}function et($){var m=typeof $;return!!$&&(m=="object"||m=="function")}function Z($){return!!$&&typeof $=="object"}function ut($){return typeof $=="symbol"||Z($)&&p.call($)==e}function it($){if(typeof $=="number")return $;if(ut($))return t;if(et($)){var m=typeof $.valueOf=="function"?$.valueOf():$;$=et(m)?m+"":m}if(typeof $!="string")return $===0?$:+$;$=$.replace(n,"");var _=o.test($);return _||s.test($)?a($.slice(2),_?2:8):r.test($)?t:+$}return pn=V,pn}var ua=ca();const ha=Ar(ua),pa=i=>{const{layers:t,idProperty:e,titleProperty:n,renderRoot:r}=i,o=ha(()=>{i.requestUpdate(),i.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),s=()=>o();if(t&&(t.hasListener("change:length")&&(t==null||t.un("change:length",s)),t.on("change:length",s),t)){const a=r.querySelector("ul");js(t,e,n,i),Fs(a,t,e,i)}};class Hr extends dt{constructor(){super();O(this,xi,"");O(this,Ei,`
|
|
661
648
|
ul {
|
|
662
649
|
padding: 0;
|
|
663
650
|
margin: 0;
|
|
@@ -684,17 +671,17 @@
|
|
|
684
671
|
}
|
|
685
672
|
li.sortable-ghost {
|
|
686
673
|
}
|
|
687
|
-
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}firstUpdated(){
|
|
674
|
+
`);this.idProperty="id",this.layers=null,this.map=null,this.tools=void 0,this.titleProperty="title",this.showLayerZoomState=!1,this.unstyled=!1,this.noShadow=!1,this.toolsAsList=!1}firstUpdated(){pa(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.layers?$r(this.layers).reverse():[];return v`
|
|
688
675
|
<style>
|
|
689
|
-
${
|
|
690
|
-
${!this.unstyled&&
|
|
676
|
+
${S(this,xi)}
|
|
677
|
+
${!this.unstyled&&S(this,Ei)}
|
|
691
678
|
</style>
|
|
692
679
|
<ul>
|
|
693
|
-
${
|
|
694
|
-
${
|
|
680
|
+
${Q(this.layers,()=>v`
|
|
681
|
+
${vo(e,n=>n,n=>v`
|
|
695
682
|
<li
|
|
696
683
|
data-layer="${n.get(this.idProperty)}"
|
|
697
|
-
data-type="${
|
|
684
|
+
data-type="${Zs(n,this.map)}"
|
|
698
685
|
>
|
|
699
686
|
${n.getLayers?v`
|
|
700
687
|
<eox-layercontrol-layer-group
|
|
@@ -727,7 +714,7 @@
|
|
|
727
714
|
`)}
|
|
728
715
|
`)}
|
|
729
716
|
</ul>
|
|
730
|
-
`}}
|
|
717
|
+
`}}xi=new WeakMap,Ei=new WeakMap,q(Hr,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-list",Hr);const fa=i=>{const t=i.querySelector("select[name=optional]"),e=t?t.value:null,n=dn(i.layers.getArray(),"layerControlOptional",!0).find(r=>(r.get(i.idProperty)||r.ol_uid)===e);n==null||n.set("layerControlOptional",!1),n==null||n.setVisible(!0),i.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),i.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(r=>r.requestUpdate()),i.requestUpdate()};class Vr extends dt{constructor(){super();O(this,$i);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=dn(this.layers.getArray(),"layerControlOptional",!0);return v`
|
|
731
718
|
<!-- Label for the dropdown -->
|
|
732
719
|
<label for="optional">Optional layers</label>
|
|
733
720
|
|
|
@@ -743,15 +730,15 @@
|
|
|
743
730
|
</select>
|
|
744
731
|
|
|
745
732
|
<!-- Button to handle adding layers -->
|
|
746
|
-
<button @click="${j(this,$i,
|
|
747
|
-
`}}$i=new WeakSet,
|
|
733
|
+
<button @click="${j(this,$i,Xr)}">add</button>
|
|
734
|
+
`}}$i=new WeakSet,Xr=function(){fa(this)},q(Vr,"properties",{idProperty:{attribute:"id-property"},layers:{attribute:!1},titleProperty:{attribute:"title-property",type:String},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-optional-list",Vr);const ga=(i,t)=>{t.jsonInput=i.target.value,t.requestUpdate()},kr=i=>{const t=JSON.parse(`{"data":${Jn(i.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(e=>{i.eoxMap.addOrUpdateLayer(e)}):i.eoxMap.addOrUpdateLayer(t.data),i.jsonInput=null,i.requestUpdate()},ma=(i,t)=>{t.urlInput=i.target.value,t.requestUpdate()};async function ya(i){const t=i.urlInput;if(i.wmsCapabilities=null,i.searchLoad=!0,i.requestUpdate(),!t)return!1;if(zi(t)==="XYZ")return{Name:t};try{const e=await us(t);i.wmsCapabilities=e}catch{}finally{i.searchLoad=!1,i.requestUpdate()}return!1}const ba=(i,t)=>{const{Name:e}=i,n=zi(t.urlInput)||"XYZ",r={type:"Tile",properties:{id:e,title:e},source:{type:n,url:t.urlInput,params:{LAYERS:e}}};t.jsonInput=JSON.stringify(r)},va=(i,t)=>{t.open=i||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class Br extends dt{constructor(){super();O(this,st);q(this,"urlInput",null);q(this,"jsonInput",null);q(this,"open",null);q(this,"searchLoad",!1);q(this,"wmsCapabilities",null);O(this,Si,`
|
|
748
735
|
.eox-add-layer-main .open {
|
|
749
736
|
position: relative;
|
|
750
737
|
}
|
|
751
738
|
.eox-add-layer-main .close {
|
|
752
739
|
display: none;
|
|
753
740
|
}
|
|
754
|
-
`);O(this,
|
|
741
|
+
`);O(this,Ai,`
|
|
755
742
|
.eox-add {
|
|
756
743
|
background: #f0f2f5;
|
|
757
744
|
border-top: 1px solid #0041701a;
|
|
@@ -884,23 +871,23 @@
|
|
|
884
871
|
font-weight: bold;
|
|
885
872
|
display: inline-block;
|
|
886
873
|
}
|
|
887
|
-
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",n=this.open==="url",r=this.open==="json",o=!
|
|
874
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const e=this.open?"open":"close",n=this.open==="url",r=this.open==="json",o=!hs(this.urlInput)||this.searchLoad?!0:D;return v`
|
|
888
875
|
<style>
|
|
889
|
-
${
|
|
890
|
-
${!this.unstyled&&
|
|
876
|
+
${S(this,Si)}
|
|
877
|
+
${!this.unstyled&&S(this,Ai)}
|
|
891
878
|
</style>
|
|
892
879
|
<div class="eox-add-layer-main">
|
|
893
880
|
<div class="eox-add-layer-col">
|
|
894
881
|
<!-- Tabbed interface for URL and JSON -->
|
|
895
882
|
<ul class="eox-add-layer-tab ${e}">
|
|
896
883
|
<li
|
|
897
|
-
@click=${()=>j(this,st,
|
|
884
|
+
@click=${()=>j(this,st,Di).call(this,"url")}
|
|
898
885
|
class="${n?"active":""}"
|
|
899
886
|
>
|
|
900
887
|
URL
|
|
901
888
|
</li>
|
|
902
889
|
<li
|
|
903
|
-
@click=${()=>j(this,st,
|
|
890
|
+
@click=${()=>j(this,st,Di).call(this,"json")}
|
|
904
891
|
class="${r?"active":""}"
|
|
905
892
|
>
|
|
906
893
|
JSON
|
|
@@ -910,7 +897,7 @@
|
|
|
910
897
|
<!-- Button to toggle tabs -->
|
|
911
898
|
<button
|
|
912
899
|
class="add-icon icon"
|
|
913
|
-
@click=${()=>j(this,st,
|
|
900
|
+
@click=${()=>j(this,st,Di).call(this,this.open?null:"url")}
|
|
914
901
|
>
|
|
915
902
|
${this.unstyled?"Add Layer":""}
|
|
916
903
|
</button>
|
|
@@ -924,14 +911,14 @@
|
|
|
924
911
|
class="add-url"
|
|
925
912
|
placeholder="Add URL (WMS/XYZ)"
|
|
926
913
|
.value="${this.urlInput}"
|
|
927
|
-
@input=${j(this,st,
|
|
914
|
+
@input=${j(this,st,Yr)}
|
|
928
915
|
>
|
|
929
916
|
</input>
|
|
930
917
|
<!-- Search button for URL -->
|
|
931
918
|
<button
|
|
932
919
|
class="search-icon"
|
|
933
920
|
disabled=${o}
|
|
934
|
-
@click=${j(this,st,
|
|
921
|
+
@click=${j(this,st,Wr)}
|
|
935
922
|
>
|
|
936
923
|
${this.unstyled?"Search":""}
|
|
937
924
|
</button>
|
|
@@ -945,34 +932,34 @@
|
|
|
945
932
|
<!-- Button to add layer -->
|
|
946
933
|
<button
|
|
947
934
|
class="add-layer-icon icon"
|
|
948
|
-
@click=${()=>j(this,st,
|
|
935
|
+
@click=${()=>j(this,st,bn).call(this,s)}
|
|
949
936
|
>
|
|
950
937
|
${this.unstyled?"+":""}
|
|
951
938
|
</button>
|
|
952
939
|
</li>
|
|
953
940
|
`})}
|
|
954
|
-
</ul>`:
|
|
941
|
+
</ul>`:D}
|
|
955
942
|
`:v`
|
|
956
943
|
<!-- Textarea for JSON input -->
|
|
957
944
|
<textarea
|
|
958
945
|
class="add-layer-input"
|
|
959
946
|
placeholder="Please put a valid eox-map layer JSON."
|
|
960
|
-
@input=${j(this,st,
|
|
947
|
+
@input=${j(this,st,Jr)}
|
|
961
948
|
.value=${this.jsonInput}
|
|
962
949
|
></textarea>
|
|
963
950
|
|
|
964
951
|
<!-- Button to add JSON layer -->
|
|
965
952
|
<button
|
|
966
953
|
class="add-layer-icon json-add-layer"
|
|
967
|
-
disabled=${
|
|
968
|
-
@click=${j(this,st,
|
|
954
|
+
disabled=${ps(this.jsonInput)?D:!0}
|
|
955
|
+
@click=${j(this,st,Gr)}
|
|
969
956
|
>
|
|
970
957
|
${this.unstyled?"Add JSON":""}
|
|
971
958
|
</button>
|
|
972
959
|
`}
|
|
973
960
|
</div>
|
|
974
961
|
</div>
|
|
975
|
-
`}}st=new WeakSet,
|
|
962
|
+
`}}st=new WeakSet,Yr=function(e){ma(e,this)},Wr=async function(){const e=await ya(this);e&&j(this,st,bn).call(this,e)},bn=function(e){ba(e,this),kr(this)},Gr=function(){kr(this)},Jr=function(e){ga(e,this)},Di=function(e){va(e,this)},Si=new WeakMap,Ai=new WeakMap,q(Br,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",Br);const wa=(i,t)=>{if(t.requestUpdate(),i.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const e=t.renderRoot.querySelector("eox-layercontrol-optional-list");e==null||e.requestUpdate()}},xa=i=>{let t;return typeof i=="string"?t=document.querySelector(i):t=i,t},Ur=i=>{const t=xa(i.for);return t&&t.map!==i.map&&(i.map=t.map),t};class fn extends dt{constructor(){super();O(this,Zt);O(this,zt);O(this,Ci,`
|
|
976
963
|
:host, :root {
|
|
977
964
|
font-family: Roboto, sans-serif;
|
|
978
965
|
--padding: 0.5rem;
|
|
@@ -993,23 +980,23 @@
|
|
|
993
980
|
select {
|
|
994
981
|
background-color: var(--background-color);
|
|
995
982
|
}
|
|
996
|
-
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","datetime","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride="",this.toolsAsList=!1}firstUpdated(){this.eoxMap=
|
|
983
|
+
`);this.for="eox-map",this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=["info","opacity","datetime","config","remove","sort"],this.addExternalLayers=!1,this.unstyled=!1,this.styleOverride="",this.toolsAsList=!1}firstUpdated(){this.eoxMap=Ur(this)}updated(e){e.has("for")&&(this.eoxMap=Ur(this))}get eoxMap(){return S(this,zt)}set eoxMap(e){const n=S(this,zt);Ht(this,zt,e),this.requestUpdate("eoxMap",n)}render(){var r,o,s;const e=(r=this.map)==null?void 0:r.getLayers().getArray(),n=e&&((o=dn(e,"layerControlOptional",!0))==null?void 0:o.length)>0;return v`
|
|
997
984
|
<style>
|
|
998
|
-
${!this.unstyled&&
|
|
985
|
+
${!this.unstyled&&S(this,Ci)}
|
|
999
986
|
${this.styleOverride}
|
|
1000
987
|
</style>
|
|
1001
988
|
|
|
1002
989
|
<!-- Conditional rendering of add layers component -->
|
|
1003
|
-
${
|
|
990
|
+
${Q(this.addExternalLayers&&((s=S(this,zt))==null?void 0:s.addOrUpdateLayer),()=>v`
|
|
1004
991
|
<eox-layercontrol-add-layers
|
|
1005
992
|
.noShadow=${!0}
|
|
1006
|
-
.eoxMap=${
|
|
993
|
+
.eoxMap=${S(this,zt)}
|
|
1007
994
|
.unstyled=${this.unstyled}
|
|
1008
995
|
></eox-layercontrol-add-layers>
|
|
1009
996
|
`)}
|
|
1010
997
|
|
|
1011
998
|
<!-- Conditional rendering of layer list component -->
|
|
1012
|
-
${
|
|
999
|
+
${Q(this.map,()=>v`
|
|
1013
1000
|
<eox-layercontrol-layer-list
|
|
1014
1001
|
.noShadow=${!0}
|
|
1015
1002
|
class="layers"
|
|
@@ -1021,14 +1008,14 @@
|
|
|
1021
1008
|
.tools=${this.tools}
|
|
1022
1009
|
.unstyled=${this.unstyled}
|
|
1023
1010
|
.toolsAsList=${this.toolsAsList}
|
|
1024
|
-
@changed=${j(this,
|
|
1025
|
-
@datetime:updated=${j(this,
|
|
1026
|
-
@layerConfig:change=${j(this,
|
|
1011
|
+
@changed=${j(this,Zt,Kr)}
|
|
1012
|
+
@datetime:updated=${j(this,Zt,Qr)}
|
|
1013
|
+
@layerConfig:change=${j(this,Zt,to)}
|
|
1027
1014
|
></eox-layercontrol-layer-list>
|
|
1028
1015
|
`)}
|
|
1029
1016
|
|
|
1030
1017
|
<!-- Conditional rendering of optional list component -->
|
|
1031
|
-
${
|
|
1018
|
+
${Q(n,()=>v`
|
|
1032
1019
|
<eox-layercontrol-optional-list
|
|
1033
1020
|
.noShadow=${!0}
|
|
1034
1021
|
.idProperty=${this.idProperty}
|
|
@@ -1037,4 +1024,4 @@
|
|
|
1037
1024
|
@changed=${()=>this.requestUpdate()}
|
|
1038
1025
|
></eox-layercontrol-optional-list>
|
|
1039
1026
|
`)}
|
|
1040
|
-
`}}
|
|
1027
|
+
`}}zt=new WeakMap,Zt=new WeakSet,Kr=function(e){wa(e,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:e.detail}))},Qr=function(e){this.dispatchEvent(new CustomEvent("datetime:updated",{detail:e.detail}))},to=function(e){this.dispatchEvent(new CustomEvent("layerConfig:change",{detail:e.detail}))},Ci=new WeakMap,q(fn,"properties",{for:{type:String},idProperty:{attribute:"id-property"},map:{attribute:!1,state:!0},titleProperty:{attribute:"title-property",type:String},showLayerZoomState:{attribute:"show-layer-zoom-state",type:Boolean},tools:{attribute:!1},addExternalLayers:{attribute:!1},unstyled:{type:Boolean},styleOverride:{type:String},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol",fn),L.EOxLayerControl=fn,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|