@eox/layercontrol 0.20.1-dev.1726221051.0 → 0.21.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 +1328 -1234
- package/dist/eox-layercontrol.umd.cjs +129 -129
- package/package.json +2 -2
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(T,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(T=typeof globalThis<"u"?globalThis:T||self,_(T["eox-layercontrol"]={}))})(this,function(T){"use strict";var Fa=Object.defineProperty;var Do=T=>{throw TypeError(T)};var ja=(T,_,B)=>_ in T?Fa(T,_,{enumerable:!0,configurable:!0,writable:!0,value:B}):T[_]=B;var k=(T,_,B)=>ja(T,typeof _!="symbol"?_+"":_,B),ti=(T,_,B)=>_.has(T)||Do("Cannot "+B);var D=(T,_,B)=>(ti(T,_,"read from private field"),B?B.call(T):_.get(T)),O=(T,_,B)=>_.has(T)?Do("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(T):_.set(T,B),_e=(T,_,B,Kt)=>(ti(T,_,"write to private field"),Kt?Kt.call(T,B):_.set(T,B),B),j=(T,_,B)=>(ti(T,_,"access private method"),B);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var
|
|
5
|
+
*/var Po,Gt,be,ve,we,ei,Ye,We,Ge,Mo,Je,Ke,xe,Qe,tn,en,nn,Tt,gn,Io,on,rn,sn,an,ln,un,dn,No,W,Ho,Lo,ni,Bo,Vo,mn,cn,hn,Pt,Jt,ko,Uo,pn;const _=globalThis,B=_.ShadowRoot&&(_.ShadyCSS===void 0||_.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Kt=Symbol(),ii=new WeakMap;let Fo=class{constructor(t,n,i){if(this._$cssResult$=!0,i!==Kt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=n}get styleSheet(){let t=this.o;const n=this.t;if(B&&t===void 0){const i=n!==void 0&&n.length===1;i&&(t=ii.get(n)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&ii.set(n,t))}return t}toString(){return this.cssText}};const jo=e=>new Fo(typeof e=="string"?e:e+"",void 0,Kt),Zo=(e,t)=>{if(B)e.adoptedStyleSheets=t.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of t){const i=document.createElement("style"),o=_.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=n.cssText,e.appendChild(i)}},oi=B?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let n="";for(const i of t.cssRules)n+=i.cssText;return jo(n)})(e):e;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:
|
|
9
|
+
*/const{is:zo,defineProperty:Xo,getOwnPropertyDescriptor:qo,getOwnPropertyNames:Yo,getOwnPropertySymbols:Wo,getPrototypeOf:Go}=Object,Et=globalThis,ri=Et.trustedTypes,Jo=ri?ri.emptyScript:"",yn=Et.reactiveElementPolyfillSupport,Qt=(e,t)=>e,bn={toAttribute(e,t){switch(t){case Boolean:e=e?Jo:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let n=e;switch(t){case Boolean:n=e!==null;break;case Number:n=e===null?null:Number(e);break;case Object:case Array:try{n=JSON.parse(e)}catch{n=null}}return n}},si=(e,t)=>!zo(e,t),ai={attribute:!0,type:String,converter:bn,reflect:!1,hasChanged:si};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),Et.litPropertyMetadata??(Et.litPropertyMetadata=new WeakMap);class Ft 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,n=ai){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(t,n),!n.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,n);o!==void 0&&Xo(this.prototype,t,o)}}static getPropertyDescriptor(t,n,i){const{get:o,set:r}=qo(this.prototype,t)??{get(){return this[n]},set(s){this[n]=s}};return{get(){return o==null?void 0:o.call(this)},set(s){const a=o==null?void 0:o.call(this);r.call(this,s),this.requestUpdate(t,a,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ai}static _$Ei(){if(this.hasOwnProperty(Qt("elementProperties")))return;const t=Go(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Qt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Qt("properties"))){const n=this.properties,i=[...Yo(n),...Wo(n)];for(const o of i)this.createProperty(o,n[o])}const t=this[Symbol.metadata];if(t!==null){const n=litPropertyMetadata.get(t);if(n!==void 0)for(const[i,o]of n)this.elementProperties.set(i,o)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const o=this._$Eu(n,i);o!==void 0&&this._$Eh.set(o,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const n=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)n.unshift(oi(o))}else t!==void 0&&n.push(oi(t));return n}static _$Eu(t,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i: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(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(n=>n(this))}addController(t){var n;(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)==null||n.call(t))}removeController(t){var n;(n=this._$EO)==null||n.delete(t)}_$E_(){const t=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Zo(t,this.constructor.elementStyles),t}connectedCallback(){var t;this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostConnected)==null?void 0:i.call(n)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(t,n,i){this._$AK(t,i)}_$EC(t,n){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const s=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:bn).toAttribute(n,i.type);this._$Em=t,s==null?this.removeAttribute(o):this.setAttribute(o,s),this._$Em=null}}_$AK(t,n){var r;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const s=i.getPropertyOptions(o),a=typeof s.converter=="function"?{fromAttribute:s.converter}:((r=s.converter)==null?void 0:r.fromAttribute)!==void 0?s.converter:bn;this._$Em=o,this[o]=a.fromAttribute(n,s.type),this._$Em=null}}requestUpdate(t,n,i){if(t!==void 0){if(i??(i=this.constructor.getPropertyOptions(t)),!(i.hasChanged??si)(this[t],n))return;this.P(t,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,n,i){this._$AL.has(t)||this._$AL.set(t,n),i.reflect===!0&&this._$Em!==t&&(this._$Ej??(this._$Ej=new Set)).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[r,s]of this._$Ep)this[r]=s;this._$Ep=void 0}const o=this.constructor.elementProperties;if(o.size>0)for(const[r,s]of o)s.wrapped!==!0||this._$AL.has(r)||this[r]===void 0||this.P(r,this[r],s)}let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(i=this._$EO)==null||i.forEach(o=>{var r;return(r=o.hostUpdate)==null?void 0:r.call(o)}),this.update(n)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(n)}willUpdate(t){}_$AE(t){var n;(n=this._$EO)==null||n.forEach(i=>{var o;return(o=i.hostUpdated)==null?void 0:o.call(i)}),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(n=>this._$EC(n,this[n]))),this._$EU()}updated(t){}firstUpdated(t){}}Ft.elementStyles=[],Ft.shadowRootOptions={mode:"open"},Ft[Qt("elementProperties")]=new Map,Ft[Qt("finalized")]=new Map,yn==null||yn({ReactiveElement:Ft}),(Et.reactiveElementVersions??(Et.reactiveElementVersions=[])).push("2.0.4");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const
|
|
14
|
-
\f\r]`,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
13
|
+
*/const te=globalThis,Ce=te.trustedTypes,li=Ce?Ce.createPolicy("lit-html",{createHTML:e=>e}):void 0,vn="$lit$",gt=`lit$${Math.random().toFixed(9).slice(2)}$`,wn="?"+gt,Ko=`<${wn}>`,Rt=document,ee=()=>Rt.createComment(""),ne=e=>e===null||typeof e!="object"&&typeof e!="function",xn=Array.isArray,ui=e=>xn(e)||typeof(e==null?void 0:e[Symbol.iterator])=="function",En=`[
|
|
14
|
+
\f\r]`,ie=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,di=/-->/g,ci=/>/g,Mt=RegExp(`>|${En}(?:([^\\s"'>=/]+)(${En}*=${En}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),hi=/'/g,pi=/"/g,fi=/^(?:script|style|textarea|title)$/i,Qo=e=>(t,...n)=>({_$litType$:e,strings:t,values:n}),E=Qo(1),ut=Symbol.for("lit-noChange"),P=Symbol.for("lit-nothing"),gi=new WeakMap,It=Rt.createTreeWalker(Rt,129);function mi(e,t){if(!xn(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return li!==void 0?li.createHTML(t):t}const yi=(e,t)=>{const n=e.length-1,i=[];let o,r=t===2?"<svg>":t===3?"<math>":"",s=ie;for(let a=0;a<n;a++){const l=e[a];let u,c,d=-1,p=0;for(;p<l.length&&(s.lastIndex=p,c=s.exec(l),c!==null);)p=s.lastIndex,s===ie?c[1]==="!--"?s=di:c[1]!==void 0?s=ci:c[2]!==void 0?(fi.test(c[2])&&(o=RegExp("</"+c[2],"g")),s=Mt):c[3]!==void 0&&(s=Mt):s===Mt?c[0]===">"?(s=o??ie,d=-1):c[1]===void 0?d=-2:(d=s.lastIndex-c[2].length,u=c[1],s=c[3]===void 0?Mt:c[3]==='"'?pi:hi):s===pi||s===hi?s=Mt:s===di||s===ci?s=ie:(s=Mt,o=void 0);const f=s===Mt&&e[a+1].startsWith("/>")?" ":"";r+=s===ie?l+Ko:d>=0?(i.push(u),l.slice(0,d)+vn+l.slice(d)+gt+f):l+gt+(d===-2?a:f)}return[mi(e,r+(e[n]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class oe{constructor({strings:t,_$litType$:n},i){let o;this.parts=[];let r=0,s=0;const a=t.length-1,l=this.parts,[u,c]=yi(t,n);if(this.el=oe.createElement(u,i),It.currentNode=this.el.content,n===2||n===3){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(o=It.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const d of o.getAttributeNames())if(d.endsWith(vn)){const p=c[s++],f=o.getAttribute(d).split(gt),g=/([.?@])?(.*)/.exec(p);l.push({type:1,index:r,name:g[2],strings:f,ctor:g[1]==="."?vi:g[1]==="?"?wi:g[1]==="@"?xi:re}),o.removeAttribute(d)}else d.startsWith(gt)&&(l.push({type:6,index:r}),o.removeAttribute(d));if(fi.test(o.tagName)){const d=o.textContent.split(gt),p=d.length-1;if(p>0){o.textContent=Ce?Ce.emptyScript:"";for(let f=0;f<p;f++)o.append(d[f],ee()),It.nextNode(),l.push({type:2,index:++r});o.append(d[p],ee())}}}else if(o.nodeType===8)if(o.data===wn)l.push({type:2,index:r});else{let d=-1;for(;(d=o.data.indexOf(gt,d+1))!==-1;)l.push({type:7,index:r}),d+=gt.length-1}r++}}static createElement(t,n){const i=Rt.createElement("template");return i.innerHTML=t,i}}function Nt(e,t,n=e,i){var s,a;if(t===ut)return t;let o=i!==void 0?(s=n.o)==null?void 0:s[i]:n.l;const r=ne(t)?void 0:t._$litDirective$;return(o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(e),o._$AT(e,n,i)),i!==void 0?(n.o??(n.o=[]))[i]=o:n.l=o),o!==void 0&&(t=Nt(e,o._$AS(e,t.values),o,i)),t}class bi{constructor(t,n){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:n},parts:i}=this._$AD,o=((t==null?void 0:t.creationScope)??Rt).importNode(n,!0);It.currentNode=o;let r=It.nextNode(),s=0,a=0,l=i[0];for(;l!==void 0;){if(s===l.index){let u;l.type===2?u=new Te(r,r.nextSibling,this,t):l.type===1?u=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(u=new Ei(r,this,t)),this._$AV.push(u),l=i[++a]}s!==(l==null?void 0:l.index)&&(r=It.nextNode(),s++)}return It.currentNode=Rt,o}p(t){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,n),n+=i.strings.length-2):i._$AI(t[n])),n++}}let Te=class Ro{get _$AU(){var t;return((t=this._$AM)==null?void 0:t._$AU)??this.v}constructor(t,n,i,o){this.type=2,this._$AH=P,this._$AN=void 0,this._$AA=t,this._$AB=n,this._$AM=i,this.options=o,this.v=(o==null?void 0:o.isConnected)??!0}get parentNode(){let t=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=n.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,n=this){t=Nt(this,t,n),ne(t)?t===P||t==null||t===""?(this._$AH!==P&&this._$AR(),this._$AH=P):t!==this._$AH&&t!==ut&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ui(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!==P&&ne(this._$AH)?this._$AA.nextSibling.data=t:this.T(Rt.createTextNode(t)),this._$AH=t}$(t){var r;const{values:n,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=oe.createElement(mi(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(n);else{const s=new bi(o,this),a=s.u(this.options);s.p(n),this.T(a),this._$AH=s}}_$AC(t){let n=gi.get(t.strings);return n===void 0&&gi.set(t.strings,n=new oe(t)),n}k(t){xn(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,o=0;for(const r of t)o===n.length?n.push(i=new Ro(this.O(ee()),this.O(ee()),this,this.options)):i=n[o],i._$AI(r),o++;o<n.length&&(this._$AR(i&&i._$AB.nextSibling,o),n.length=o)}_$AR(t=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o}}setConnected(t){var n;this._$AM===void 0&&(this.v=t,(n=this._$AP)==null||n.call(this,t))}};class re{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,n,i,o,r){this.type=1,this._$AH=P,this._$AN=void 0,this.element=t,this.name=n,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=P}_$AI(t,n=this,i,o){const r=this.strings;let s=!1;if(r===void 0)t=Nt(this,t,n,0),s=!ne(t)||t!==this._$AH&&t!==ut,s&&(this._$AH=t);else{const a=t;let l,u;for(t=r[0],l=0;l<r.length-1;l++)u=Nt(this,a[i+l],n,l),u===ut&&(u=this._$AH[l]),s||(s=!ne(u)||u!==this._$AH[l]),u===P?t=P:t!==P&&(t+=(u??"")+r[l+1]),this._$AH[l]=u}s&&!o&&this.j(t)}j(t){t===P?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class vi extends re{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===P?void 0:t}}class wi extends re{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==P)}}class xi extends re{constructor(t,n,i,o,r){super(t,n,i,o,r),this.type=5}_$AI(t,n=this){if((t=Nt(this,t,n,0)??P)===ut)return;const i=this._$AH,o=t===P&&i!==P||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==P&&(i===P||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var n;typeof this._$AH=="function"?this._$AH.call(((n=this.options)==null?void 0:n.host)??this.element,t):this._$AH.handleEvent(t)}}class Ei{constructor(t,n,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Nt(this,t)}}const tr={M:vn,P:gt,A:wn,C:1,L:yi,R:bi,D:ui,V:Nt,I:Te,H:re,N:wi,U:xi,B:vi,F:Ei},Sn=te.litHtmlPolyfillSupport;Sn==null||Sn(oe,Te),(te.litHtmlVersions??(te.litHtmlVersions=[])).push("3.2.0");const er=(e,t,n)=>{const i=(n==null?void 0:n.renderBefore)??t;let o=i._$litPart$;if(o===void 0){const r=(n==null?void 0:n.renderBefore)??null;i._$litPart$=o=new Te(t.insertBefore(ee(),r),r,void 0,n??{})}return o._$AI(e),o};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/class
|
|
19
|
+
*/class it extends Ft{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var n;const t=super.createRenderRoot();return(n=this.renderOptions).renderBefore??(n.renderBefore=t.firstChild),t}update(t){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=er(n,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this.o)==null||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this.o)==null||t.setConnected(!1)}render(){return ut}}it._$litElement$=!0,it.finalized=!0,(Po=globalThis.litElementHydrateSupport)==null||Po.call(globalThis,{LitElement:it});const $n=globalThis.litElementPolyfillSupport;$n==null||$n({LitElement:it}),(globalThis.litElementVersions??(globalThis.litElementVersions=[])).push("4.1.0");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2021 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/function
|
|
23
|
+
*/function K(e,t,n){return e?t(e):n==null?void 0:n(e)}/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const St={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6}
|
|
27
|
+
*/const St={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},An=e=>(...t)=>({_$litDirective$:e,values:t});class _n{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,n,i){this.t=t,this._$AM=n,this.i=i}_$AS(t,n){return this.update(t,n)}update(t,n){return this.render(...n)}}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2020 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/const{I:
|
|
31
|
+
*/const{I:nr}=tr,ir=e=>e.strings===void 0,Si=()=>document.createComment(""),se=(e,t,n)=>{var r;const i=e._$AA.parentNode,o=t===void 0?e._$AB:t._$AA;if(n===void 0){const s=i.insertBefore(Si(),o),a=i.insertBefore(Si(),o);n=new nr(s,a,e,e.options)}else{const s=n._$AB.nextSibling,a=n._$AM,l=a!==e;if(l){let u;(r=n._$AQ)==null||r.call(n,e),n._$AM=e,n._$AP!==void 0&&(u=e._$AU)!==a._$AU&&n._$AP(u)}if(s!==o||l){let u=n._$AA;for(;u!==s;){const c=u.nextSibling;i.insertBefore(u,o),u=c}}}return n},Ht=(e,t,n=e)=>(e._$AI(t,n),e),or={},$i=(e,t=or)=>e._$AH=t,rr=e=>e._$AH,Cn=e=>{var i;(i=e._$AP)==null||i.call(e,!1,!0);let t=e._$AA;const n=e._$AB.nextSibling;for(;t!==n;){const o=t.nextSibling;t.remove(),t=o}};/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const Ai=(e,t,n)=>{const i=new Map;for(let o=t;o<=n;o++)i.set(e[o],o);return i},sr=An(class extends _n{constructor(e){if(super(e),e.type!==St.CHILD)throw Error("repeat() can only be used in text expressions")}dt(e,t,n){let i;n===void 0?n=t:t!==void 0&&(i=t);const o=[],r=[];let s=0;for(const a of e)o[s]=i?i(a,s):s,r[s]=n(a,s),s++;return{values:r,keys:o}}render(e,t,n){return this.dt(e,t,n).values}update(e,[t,n,i]){const o=rr(e),{values:r,keys:s}=this.dt(t,n,i);if(!Array.isArray(o))return this.ut=s,r;const a=this.ut??(this.ut=[]),l=[];let u,c,d=0,p=o.length-1,f=0,g=r.length-1;for(;d<=p&&f<=g;)if(o[d]===null)d++;else if(o[p]===null)p--;else if(a[d]===s[f])l[f]=Ht(o[d],r[f]),d++,f++;else if(a[p]===s[g])l[g]=Ht(o[p],r[g]),p--,g--;else if(a[d]===s[g])l[g]=Ht(o[d],r[g]),se(e,l[g+1],o[d]),d++,g--;else if(a[p]===s[f])l[f]=Ht(o[p],r[f]),se(e,o[d],o[p]),p--,f++;else if(u===void 0&&(u=Ai(s,f,g),c=Ai(a,d,p)),u.has(a[d]))if(u.has(a[p])){const y=c.get(s[f]),R=y!==void 0?o[y]:null;if(R===null){const L=se(e,o[d]);Ht(L,r[f]),l[f]=L}else l[f]=Ht(R,r[f]),se(e,o[d],R),o[y]=null;f++}else Cn(o[p]),p--;else Cn(o[d]),d++;for(;f<=g;){const y=se(e,l[g+1]);Ht(y,r[f]),l[f++]=y}for(;d<=p;){const y=o[d++];y!==null&&Cn(y)}return this.ut=s,$i(e,l),ut}});/**
|
|
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 S=e=>e!==void 0,_i=(e,t,n)=>t in e?e[t]:e[t]=n;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 ar{constructor(t){this._parser=new t}toDocument(t){return this._parser.parseFromString(t,"application/xml")}getAllTextContent(t,n){return Pe(t,n).join("")}}function Pe(e,t){return Ci(e,t,[]).join("")}function Ci(e,t,n){if(e.nodeType===ae.CDATA_SECTION||e.nodeType===ae.TEXT)t?n.push(String(e.nodeValue).replace(/(\r\n|\r|\n)/g,"")):n.push(e.nodeValue);else{var i;for(i=e.firstChild;i;i=i.nextSibling)Ci(i,t,n)}return n}function lr(e,t,n,i){for(var o=ur(t);o;o=dr(o)){var r=o.namespaceURI||null,s=e[r];if(S(s)){var a=s[o.localName];S(a)&&a.call(i,o,n)}}}function ur(e){let t=e.firstElementChild||e.firstChild;for(;t&&t.nodeType!==ae.ELEMENT;)t=t.nextSibling;return t}function dr(e){let t=e.nextElementSibling||e.nextSibling;for(;t&&t.nodeType!==ae.ELEMENT;)t=t.nextSibling;return t}function X(e,t,n){return cr(e,t,n)}function cr(e,t,n){var i=S(n)?n:{},o,r;for(o=0,r=e.length;o<r;++o)i[e[o]]=t;return i}function Ti(e,t){return function(n,i){var o=e.call(S(t)?t:this,n,i);if(S(o)){var r=i[i.length-1];r.push(o)}}}function z(e,t,n,i,o){return i.push(e),lr(t,n,i,o),i.pop()}function m(e,t,n){return function(i,o){let r=e.call(S(n)?n:this,i,o);if(S(r)){var s=o[o.length-1],a=S(t)?t:i.localName;s[a]=r}}}function ot(e,t,n){return function(i,o){var r=e.call(S(n)?n:this,i,o);if(S(r)){var s=o[o.length-1],a=S(t)?t:i.localName,l=_i(s,a,[]);l.push(r)}}}const hr=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function pr(e){return e.replace(hr,"")}function Lt(e){const t=/^\s*(true|1)|(false|0)\s*$/.exec(e);if(t)return S(t[1])||!1}function jt(e){return mt(Pe(e,!1))}function mt(e){const t=/^\s*([+\-]?\d*\.?\d+(?:e[+\-]?\d+)?)\s*$/i.exec(e);if(t)return parseFloat(t[1])}function Tn(e){return Oe(Pe(e,!1))}function Oe(e){const t=/^\s*(\d+)\s*$/.exec(e);if(t)return parseInt(t[1],10)}function A(e){return pr(Pe(e,!1))}const fr="http://www.w3.org/1999/xlink";function Pn(e){return e.getAttributeNS(fr,"href")}function gr(e,t){return z({},Fr,e,t)}function Pi(e){return[mt(e.getAttribute("minx")),mt(e.getAttribute("miny")),mt(e.getAttribute("maxx")),mt(e.getAttribute("maxy"))]}function mr(e,t){const n=Pi(e),i=[mt(e.getAttribute("resx")),mt(e.getAttribute("resy"))];return{crs:e.getAttribute("CRS")||e.getAttribute("SRS"),extent:n,res:i}}function yr(e,t){const n=Pi(e);if(!(!S(n[0])||!S(n[1])||!S(n[2])||!S(n[3])))return n}function br(e,t){const n=parseFloat(e.getAttribute("min")),i=parseFloat(e.getAttribute("max"));return{min:n,max:i}}function vr(e,t){const n=z({},jr,e,t);if(!S(n))return;const i=n.westBoundLongitude,o=n.southBoundLatitude,r=n.eastBoundLongitude,s=n.northBoundLatitude;if(!(!S(i)||!S(o)||!S(r)||!S(s)))return[i,o,r,s]}function wr(e,t){return z({},Hr,e,t)}function xr(e,t){return z({},Lr,e,t)}function Er(e,t){return z({},Br,e,t)}function Sr(e,t){return z({},Vr,e,t)}function $r(e,t){return z({},kr,e,t)}function Ar(e,t){return z([],Ur,e,t)}function _r(e,t){const n=Lt(e.getAttribute("queryable"));return z({queryable:S(n)?n:!1},Ri,e,t)}function Cr(e,t){var n=t[t.length-1];const i=z({},Ri,e,t);if(!S(i))return;let o=Lt(e.getAttribute("queryable"));S(o)||(o=n.queryable),i.queryable=S(o)?o:!1;let r=Oe(e.getAttribute("cascaded"));S(r)||(r=n.cascaded),i.cascaded=r;let s=Lt(e.getAttribute("opaque"));S(s)||(s=n.opaque),i.opaque=S(s)?s:!1;let a=Lt(e.getAttribute("noSubsets"));S(a)||(a=n.noSubsets),i.noSubsets=S(a)?a:!1;let l=mt(e.getAttribute("fixedWidth"));S(l)||(l=n.fixedWidth),i.fixedWidth=l;let u=mt(e.getAttribute("fixedHeight"));S(u)||(u=n.fixedHeight),i.fixedHeight=u;const c=["Style","CRS","AuthorityURL"];for(let p=0,f=c.length;p<f;p++){const g=c[p],y=n[g];if(S(y)){let R=_i(i,g,[]);R=R.concat(y),i[g]=R}}const d=["EX_GeographicBoundingBox","BoundingBox","Dimension","Attribution","MinScaleDenominator","MaxScaleDenominator"];for(let p=0,f=d.length;p<f;p++){const g=d[p],y=i[g];if(!S(y)){const R=n[g];i[g]=R}}return i}function Tr(e,t){return{name:e.getAttribute("name"),units:e.getAttribute("units"),unitSymbol:e.getAttribute("unitSymbol"),default:e.getAttribute("default"),multipleValues:Lt(e.getAttribute("multipleValues")),nearestValue:Lt(e.getAttribute("nearestValue")),current:Lt(e.getAttribute("current")),values:A(e)}}function yt(e,t){return z({},Wr,e,t)}function Pr(e,t){return z({},Zr,e,t)}function Or(e,t){return z({},Xr,e,t)}function Dr(e,t){return z({},qr,e,t)}function On(e,t){return z({},zr,e,t)}function Oi(e,t){var n=yt(e,t);if(S(n)){const i=[Oe(e.getAttribute("width")),Oe(e.getAttribute("height"))];return n.size=i,n}}function Rr(e,t){var n=yt(e,t);if(S(n))return n.name=e.getAttribute("name"),n}function Mr(e,t){var n=yt(e,t);if(S(n))return n.type=e.getAttribute("type"),n}function Ir(e,t){return z({},Yr,e,t)}function Di(e,t){return z([],Gr,e,t)}const q=[null,"http://www.opengis.net/wms"],Nr=X(q,{Service:m(xr),Capability:m(wr)}),Hr=X(q,{Request:m(Pr),Exception:m(Ar),Layer:m(_r)}),Lr=X(q,{Name:m(A),Title:m(A),Abstract:m(A),KeywordList:m(Di),OnlineResource:m(Pn),ContactInformation:m(Er),Fees:m(A),AccessConstraints:m(A),LayerLimit:m(Tn),MaxWidth:m(Tn),MaxHeight:m(Tn)}),Br=X(q,{ContactPersonPrimary:m(Sr),ContactPosition:m(A),ContactAddress:m($r),ContactVoiceTelephone:m(A),ContactFacsimileTelephone:m(A),ContactElectronicMailAddress:m(A)}),Vr=X(q,{ContactPerson:m(A),ContactOrganization:m(A)}),kr=X(q,{AddressType:m(A),Address:m(A),City:m(A),StateOrProvince:m(A),PostCode:m(A),Country:m(A)}),Ur=X(q,{Format:Ti(A)}),Ri=X(q,{Name:m(A),Title:m(A),Abstract:m(A),KeywordList:m(Di),CRS:ot(A),SRS:ot(A),EX_GeographicBoundingBox:m(vr),LatLonBoundingBox:m(yr),BoundingBox:ot(mr),Dimension:ot(Tr),Attribution:m(gr),AuthorityURL:ot(Rr),Identifier:ot(A),MetadataURL:ot(Mr),DataURL:ot(yt),FeatureListURL:ot(yt),Style:ot(Ir),MinScaleDenominator:m(jt),MaxScaleDenominator:m(jt),ScaleHint:m(br),Layer:ot(Cr)}),Fr=X(q,{Title:m(A),OnlineResource:m(Pn),LogoURL:m(Oi)}),jr=X(q,{westBoundLongitude:m(jt),eastBoundLongitude:m(jt),southBoundLatitude:m(jt),northBoundLatitude:m(jt)}),Zr=X(q,{GetCapabilities:m(On),GetMap:m(On),GetFeatureInfo:m(On)}),zr=X(q,{Format:ot(A),DCPType:ot(Or)}),Xr=X(q,{HTTP:m(Dr)}),qr=X(q,{Get:m(yt),Post:m(yt)}),Yr=X(q,{Name:m(A),Title:m(A),Abstract:m(A),LegendURL:ot(Oi),StyleSheetURL:m(yt),StyleURL:m(yt)}),Wr=X(q,{Format:m(A),OnlineResource:m(Pn)}),Gr=X(q,{Keyword:Ti(A)});class Jr{constructor(t,n){!n&&typeof window<"u"&&(n=window.DOMParser),this.version=void 0,this._parser=new ar(n),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 n=t.firstChild;n;n=n.nextSibling)if(n.nodeType==ae.ELEMENT)return this.readFromNode(n);return null}readFromNode(t){return this.version=t.getAttribute("version"),z({version:this.version},Nr,t,[])||null}}async function Kr(e){let t=new URL(e),n=t.searchParams;n.set("SERVICE","WMS"),n.set("REQUEST","GetCapabilities");let i=t.toString();const o=await fetch(i);if(o.ok){const r=await o.text();return new Jr(r).toJSON()}else throw new Error(`Error: ${o.status}`)}function Dn(e){const t=/\b(?:wms|ows)\b/i,n=/{(?:z|x|y-?)}\/{(?:z|x|y-?)}\/{(?:z|x|y-?)}/i;return t.test(e)?"TileWMS":n.test(e)?"XYZ":!1}function Qr(e){const n=/^(?:(?:https?|ftp):\/\/|\/\/)?(?:localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|(?:\w+[\w-]*\.)+\w+)(?::\d+)?(?:\/\S*)?$/.test(e),i=Dn(e);return!!(e&&n&&i)}function Mi(e){return e.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:/g,'"$2": ').replace(/,\s*}/g,"}").replace(/,\s*]/g,"]").replace(/\s*(\{|}|\[|\]|,)\s*/g,"$1").replaceAll('": //',"://")}function ts(e){try{return JSON.parse(Mi(e)),!!e}catch{return!1}}function es(e,t){const n=new URL(e).searchParams;Object.entries(t).forEach(([s,a])=>{typeof a=="object"&&!Array.isArray(a)&&a!==null?Object.keys(a).forEach(l=>{n.set(l,a[l])}):n.set(s,a)});const i=e.split("?")[0],o=n.toString();return`${i}?${o}`}/**!
|
|
41
41
|
* Sortable 1.15.3
|
|
42
42
|
* @author RubaXa <trash@rubaxa.org>
|
|
43
43
|
* @author owenm <owen23355@gmail.com>
|
|
44
44
|
* @license MIT
|
|
45
|
-
*/function Oi(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),e.push.apply(e,i)}return e}function pt(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Oi(Object(e),!0).forEach(function(i){Gr(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Oi(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Pe(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Pe=function(t){return typeof t}:Pe=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pe(n)}function Gr(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function bt(){return bt=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n},bt.apply(this,arguments)}function Jr(n,t){if(n==null)return{};var e={},i=Object.keys(n),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(e[o]=n[o]);return e}function Kr(n,t){if(n==null)return{};var e=Jr(n,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var Qr="1.15.3";function vt(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var wt=vt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ae=vt(/Edge/i),Ri=vt(/firefox/i),le=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Mi=vt(/iP(ad|od|hone)/i),Ni=vt(/chrome/i)&&vt(/android/i),Ii={capture:!1,passive:!1};function A(n,t,e){n.addEventListener(t,e,!wt&&Ii)}function S(n,t,e){n.removeEventListener(t,e,!wt&&Ii)}function De(n,t){if(t){if(t[0]===">"&&(t=t.substring(1)),n)try{if(n.matches)return n.matches(t);if(n.msMatchesSelector)return n.msMatchesSelector(t);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(t)}catch{return!1}return!1}}function Hi(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function dt(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&De(n,t):De(n,t))||i&&n===e)return n;if(n===e)break}while(n=Hi(n))}return null}var Bi=/\s+/g;function ot(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(Bi," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(Bi," ")}}function b(n,t,e){var i=n&&n.style;if(i){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(e=n.currentStyle),t===void 0?e:e[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=e+(typeof e=="string"?"":"px")}}function jt(n,t){var e="";if(typeof n=="string")e=n;else do{var i=b(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(e)}function Vi(n,t,e){if(n){var i=n.getElementsByTagName(t),o=0,r=i.length;if(e)for(;o<r;o++)e(i[o],o);return i}return[]}function ft(){var n=document.scrollingElement;return n||document.documentElement}function V(n,t,e,i,o){if(!(!n.getBoundingClientRect&&n!==window)){var r,s,a,l,d,c,u;if(n!==window&&n.parentNode&&n!==ft()?(r=n.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,d=r.right,c=r.height,u=r.width):(s=0,a=0,l=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||e)&&n!==window&&(o=o||n.parentNode,!wt))do if(o&&o.getBoundingClientRect&&(b(o,"transform")!=="none"||e&&b(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(b(o,"border-top-width")),a-=p.left+parseInt(b(o,"border-left-width")),l=s+r.height,d=a+r.width;break}while(o=o.parentNode);if(i&&n!==window){var f=jt(o||n),g=f&&f.a,y=f&&f.d;f&&(s/=y,a/=g,u/=g,c/=y,l=s+c,d=a+u)}return{top:s,left:a,bottom:l,right:d,width:u,height:c}}}function Li(n,t,e){for(var i=$t(n,!0),o=V(n)[t];i;){var r=V(i)[e],s=void 0;if(s=o>=r,!s)return i;if(i===ft())break;i=$t(i,!1)}return!1}function Zt(n,t,e,i){for(var o=0,r=0,s=n.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==v.ghost&&(i||s[r]!==v.dragged)&&dt(s[r],e.draggable,n,!1)){if(o===t)return s[r];o++}r++}return null}function On(n,t){for(var e=n.lastElementChild;e&&(e===v.ghost||b(e,"display")==="none"||t&&!De(e,t));)e=e.previousElementSibling;return e||null}function lt(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==v.clone&&(!t||De(n,t))&&e++;return e}function Ui(n){var t=0,e=0,i=ft();if(n)do{var o=jt(n),r=o.a,s=o.d;t+=n.scrollLeft*r,e+=n.scrollTop*s}while(n!==i&&(n=n.parentNode));return[t,e]}function ts(n,t){for(var e in n)if(n.hasOwnProperty(e)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===n[e][i])return Number(e)}return-1}function $t(n,t){if(!n||!n.getBoundingClientRect)return ft();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var o=b(e);if(e.clientWidth<e.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return ft();if(i||t)return e;i=!0}}while(e=e.parentNode);return ft()}function es(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function Rn(n,t){return Math.round(n.top)===Math.round(t.top)&&Math.round(n.left)===Math.round(t.left)&&Math.round(n.height)===Math.round(t.height)&&Math.round(n.width)===Math.round(t.width)}var de;function ki(n,t){return function(){if(!de){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),de=setTimeout(function(){de=void 0},t)}}}function ns(){clearTimeout(de),de=void 0}function Fi(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function ji(n){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(n).cloneNode(!0):e?e(n).clone(!0)[0]:n.cloneNode(!0)}function Zi(n,t,e){var i={};return Array.from(n.children).forEach(function(o){var r,s,a,l;if(!(!dt(o,t.draggable,n,!1)||o.animated||o===e)){var d=V(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,d.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,d.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,d.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,d.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var nt="Sortable"+new Date().getTime();function is(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(b(o,"display")==="none"||o===v.ghost)){n.push({target:o,rect:V(o)});var r=pt({},n[n.length-1].rect);if(o.thisAnimationDuration){var s=jt(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(ts(n,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;n.forEach(function(a){var l=0,d=a.target,c=d.fromRect,u=V(d),p=d.prevFromRect,f=d.prevToRect,g=a.rect,y=jt(d,!0);y&&(u.top-=y.f,u.left-=y.e),d.toRect=u,d.thisAnimationDuration&&Rn(p,u)&&!Rn(c,u)&&(g.top-u.top)/(g.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(l=rs(g,p,f,o.options)),Rn(u,c)||(d.prevFromRect=c,d.prevToRect=u,l||(l=o.options.animation),o.animate(d,g,u,l)),l&&(r=!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),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),n=[]},animate:function(i,o,r,s){if(s){b(i,"transition",""),b(i,"transform","");var a=jt(this.el),l=a&&a.a,d=a&&a.d,c=(o.left-r.left)/(l||1),u=(o.top-r.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,b(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=os(i),b(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),b(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){b(i,"transition",""),b(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function os(n){return n.offsetWidth}function rs(n,t,e,i){return Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*i.animation}var zt=[],Mn={initializeByDefault:!0},ue={mount:function(t){for(var e in Mn)Mn.hasOwnProperty(e)&&!(e in t)&&(t[e]=Mn[e]);zt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),zt.push(t)},pluginEvent:function(t,e,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";zt.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][r]&&e[s.pluginName][r](pt({sortable:e},i)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](pt({sortable:e},i)))})},initializePlugins:function(t,e,i,o){zt.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,bt(i,d.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,e){var i={};return zt.forEach(function(o){typeof o.eventProperties=="function"&&bt(i,o.eventProperties.call(e[o.pluginName],t))}),i},modifyOption:function(t,e,i){var o;return zt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[e]=="function"&&(o=r.optionListeners[e].call(t[r.pluginName],i))}),o}};function ss(n){var t=n.sortable,e=n.rootEl,i=n.name,o=n.targetEl,r=n.cloneEl,s=n.toEl,a=n.fromEl,l=n.oldIndex,d=n.newIndex,c=n.oldDraggableIndex,u=n.newDraggableIndex,p=n.originalEvent,f=n.putSortable,g=n.extraEventProperties;if(t=t||e&&e[nt],!!t){var y,M=t.options,q="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!wt&&!ae?y=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(i,!0,!0)),y.to=s||e,y.from=a||e,y.item=o||e,y.clone=r,y.oldIndex=l,y.newIndex=d,y.oldDraggableIndex=c,y.newDraggableIndex=u,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var F=pt(pt({},g),ue.getEventProperties(i,t));for(var st in F)y[st]=F[st];e&&e.dispatchEvent(y),M[q]&&M[q].call(t,y)}}var as=["evt"],it=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=Kr(i,as);ue.pluginEvent.bind(v)(t,e,pt({dragEl:h,parentEl:I,ghostEl:w,rootEl:R,nextEl:Bt,lastDownEl:Oe,cloneEl:N,cloneHidden:_t,dragStarted:he,putSortable:z,activeSortable:v.active,originalEvent:o,oldIndex:Xt,oldDraggableIndex:ce,newIndex:rt,newDraggableIndex:At,hideGhostForTarget:Ji,unhideGhostForTarget:Ki,cloneNowHidden:function(){_t=!0},cloneNowShown:function(){_t=!1},dispatchSortableEvent:function(a){K({sortable:e,name:a,originalEvent:o})}},r))};function K(n){ss(pt({putSortable:z,cloneEl:N,targetEl:h,rootEl:R,oldIndex:Xt,oldDraggableIndex:ce,newIndex:rt,newDraggableIndex:At},n))}var h,I,w,R,Bt,Oe,N,_t,Xt,rt,ce,At,Re,z,qt=!1,Me=!1,Ne=[],Vt,ut,Nn,In,zi,Xi,he,Yt,pe,fe=!1,Ie=!1,He,W,Hn=[],Bn=!1,Be=[],Ve=typeof document<"u",Le=Mi,qi=ae||wt?"cssFloat":"float",ls=Ve&&!Ni&&!Mi&&"draggable"in document.createElement("div"),Yi=function(){if(Ve){if(wt)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Wi=function(t,e){var i=b(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=Zt(t,0,e),s=Zt(t,1,e),a=r&&b(r),l=s&&b(s),d=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+V(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+V(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var u=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===u)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||d>=o&&i[qi]==="none"||s&&i[qi]==="none"&&d+c>o)?"vertical":"horizontal"},ds=function(t,e,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,a=i?e.left:e.top,l=i?e.right:e.bottom,d=i?e.width:e.height;return o===a||r===l||o+s/2===a+d/2},us=function(t,e){var i;return Ne.some(function(o){var r=o[nt].options.emptyInsertThreshold;if(!(!r||On(o))){var s=V(o),a=t>=s.left-r&&t<=s.right+r,l=e>=s.top-r&&e<=s.bottom+r;if(a&&l)return i=o}}),i},Gi=function(t){function e(r,s){return function(a,l,d,c){var u=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||u))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return e(r(a,l,d,c),s)(a,l,d,c);var p=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||Pe(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=e(o.pull,!0),i.checkPut=e(o.put),i.revertClone=o.revertClone,t.group=i},Ji=function(){!Yi&&w&&b(w,"display","none")},Ki=function(){!Yi&&w&&b(w,"display","")};Ve&&!Ni&&document.addEventListener("click",function(n){if(Me)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Me=!1,!1},!0);var Lt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=us(t.clientX,t.clientY);if(e){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[nt]._onDragOver(i)}}},cs=function(t){h&&h.parentNode[nt]._isOutsideThisEl(t.target)};function v(n,t){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=t=bt({},t),n[nt]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Wi(n,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:v.supportPointer!==!1&&"PointerEvent"in window&&!le,emptyInsertThreshold:5};ue.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);Gi(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:ls,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?A(n,"pointerdown",this._onTapStart):(A(n,"mousedown",this._onTapStart),A(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(A(n,"dragover",this),A(n,"dragenter",this)),Ne.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,is())}v.prototype={constructor:v,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Yt=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,i=this.el,o=this.options,r=o.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,c=o.filter;if(vs(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&le&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=dt(l,o.draggable,i,!1),!(l&&l.animated)&&Oe!==l)){if(Xt=lt(l),ce=lt(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){K({sortable:e,rootEl:d,name:"filter",targetEl:l,toEl:i,fromEl:i}),it("filter",e,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=dt(d,u.trim(),i,!1),u)return K({sortable:e,rootEl:u,name:"filter",targetEl:l,fromEl:i,toEl:i}),it("filter",e,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!dt(d,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,e,i){var o=this,r=o.el,s=o.options,a=r.ownerDocument,l;if(i&&!h&&i.parentNode===r){var d=V(i);if(R=r,h=i,I=h.parentNode,Bt=h.nextSibling,Oe=i,Re=s.group,v.dragged=h,Vt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},zi=Vt.clientX-d.left,Xi=Vt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",l=function(){if(it("delayEnded",o,{evt:t}),v.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ri&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,e),K({sortable:o,name:"choose",originalEvent:t}),ot(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Vi(h,c.trim(),Vn)}),A(a,"dragover",Lt),A(a,"mousemove",Lt),A(a,"touchmove",Lt),A(a,"mouseup",o._onDrop),A(a,"touchend",o._onDrop),A(a,"touchcancel",o._onDrop),Ri&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),it("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(ae||wt))){if(v.eventCanceled){this._onDrop();return}A(a,"mouseup",o._disableDelayedDrag),A(a,"touchend",o._disableDelayedDrag),A(a,"touchcancel",o._disableDelayedDrag),A(a,"mousemove",o._delayedDragTouchMoveHandler),A(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&A(a,"pointermove",o._delayedDragTouchMoveHandler),o._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&&Vn(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._disableDelayedDrag),S(t,"touchend",this._disableDelayedDrag),S(t,"touchcancel",this._disableDelayedDrag),S(t,"mousemove",this._delayedDragTouchMoveHandler),S(t,"touchmove",this._delayedDragTouchMoveHandler),S(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?A(document,"pointermove",this._onTouchMove):e?A(document,"touchmove",this._onTouchMove):A(document,"mousemove",this._onTouchMove):(A(h,"dragend",this),A(R,"dragstart",this._onDragStart));try{document.selection?ke(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(qt=!1,R&&h){it("dragStarted",this,{evt:e}),this.nativeDraggable&&A(document,"dragover",cs);var i=this.options;!t&&ot(h,i.dragClass,!1),ot(h,i.ghostClass,!0),v.active=this,t&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ut){this._lastX=ut.clientX,this._lastY=ut.clientY,Ji();for(var t=document.elementFromPoint(ut.clientX,ut.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ut.clientX,ut.clientY),t!==e);)e=t;if(h.parentNode[nt]._isOutsideThisEl(t),e)do{if(e[nt]){var i=void 0;if(i=e[nt]._onDragOver({clientX:ut.clientX,clientY:ut.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=Hi(e));Ki()}},_onTouchMove:function(t){if(Vt){var e=this.options,i=e.fallbackTolerance,o=e.fallbackOffset,r=t.touches?t.touches[0]:t,s=w&&jt(w,!0),a=w&&s&&s.a,l=w&&s&&s.d,d=Le&&W&&Ui(W),c=(r.clientX-Vt.clientX+o.x)/(a||1)+(d?d[0]-Hn[0]:0)/(a||1),u=(r.clientY-Vt.clientY+o.y)/(l||1)+(d?d[1]-Hn[1]:0)/(l||1);if(!v.active&&!qt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(w){s?(s.e+=c-(Nn||0),s.f+=u-(In||0)):s={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");b(w,"webkitTransform",p),b(w,"mozTransform",p),b(w,"msTransform",p),b(w,"transform",p),Nn=c,In=u,ut=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!w){var t=this.options.fallbackOnBody?document.body:R,e=V(h,!0,Le,!0,t),i=this.options;if(Le){for(W=t;b(W,"position")==="static"&&b(W,"transform")==="none"&&W!==document;)W=W.parentNode;W!==document.body&&W!==document.documentElement?(W===document&&(W=ft()),e.top+=W.scrollTop,e.left+=W.scrollLeft):W=ft(),Hn=Ui(W)}w=h.cloneNode(!0),ot(w,i.ghostClass,!1),ot(w,i.fallbackClass,!0),ot(w,i.dragClass,!0),b(w,"transition",""),b(w,"transform",""),b(w,"box-sizing","border-box"),b(w,"margin",0),b(w,"top",e.top),b(w,"left",e.left),b(w,"width",e.width),b(w,"height",e.height),b(w,"opacity","0.8"),b(w,"position",Le?"absolute":"fixed"),b(w,"zIndex","100000"),b(w,"pointerEvents","none"),v.ghost=w,t.appendChild(w),b(w,"transform-origin",zi/parseInt(w.style.width)*100+"% "+Xi/parseInt(w.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,o=t.dataTransfer,r=i.options;if(it("dragStart",this,{evt:t}),v.eventCanceled){this._onDrop();return}it("setupClone",this),v.eventCanceled||(N=ji(h),N.removeAttribute("id"),N.draggable=!1,N.style["will-change"]="",this._hideClone(),ot(N,this.options.chosenClass,!1),v.clone=N),i.cloneId=ke(function(){it("clone",i),!v.eventCanceled&&(i.options.removeCloneOnHide||R.insertBefore(N,h),i._hideClone(),K({sortable:i,name:"clone"}))}),!e&&ot(h,r.dragClass,!0),e?(Me=!0,i._loopId=setInterval(i._emulateDragOver,50)):(S(document,"mouseup",i._onDrop),S(document,"touchend",i._onDrop),S(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,h)),A(document,"drop",i),b(h,"transform","translateZ(0)")),qt=!0,i._dragStartId=ke(i._dragStarted.bind(i,e,t)),A(document,"selectstart",i),he=!0,le&&b(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,o,r,s,a=this.options,l=a.group,d=v.active,c=Re===l,u=a.sort,p=z||d,f,g=this,y=!1;if(Bn)return;function M(Se,ma){it(Se,g,pt({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:u,fromSortable:p,target:i,completed:F,onMove:function(So,ya){return Ue(R,e,h,o,So,V(So),t,ya)},changed:st},ma))}function q(){M("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function F(Se){return M("dragOverCompleted",{insertion:Se}),Se&&(c?d._hideClone():d._showClone(g),g!==p&&(ot(h,z?z.options.ghostClass:d.options.ghostClass,!1),ot(h,a.ghostClass,!0)),z!==g&&g!==v.active?z=g:g===v.active&&z&&(z=null),p===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){M("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(Yt=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[nt]._isOutsideThisEl(t.target),!Se&&Lt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function st(){rt=lt(h),At=lt(h,a.draggable),K({sortable:g,name:"change",toEl:e,newIndex:rt,newDraggableIndex:At,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=dt(i,a.draggable,e,!0),M("dragOver"),v.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return F(!1);if(Me=!1,d&&!a.disabled&&(c?u||(s=I!==R):z===this||(this.lastPutMode=Re.checkPull(this,d,h,t))&&l.checkPut(this,d,h,t))){if(f=this._getDirection(t,i)==="vertical",o=V(h),M("dragOverValid"),v.eventCanceled)return y;if(s)return I=R,q(),this._hideClone(),M("revert"),v.eventCanceled||(Bt?R.insertBefore(h,Bt):R.appendChild(h)),F(!0);var Q=On(e,a.draggable);if(!Q||gs(t,f,this)&&!Q.animated){if(Q===h)return F(!1);if(Q&&e===t.target&&(i=Q),i&&(r=V(i)),Ue(R,e,h,o,i,r,t,!!i)!==!1)return q(),Q&&Q.nextSibling?e.insertBefore(h,Q.nextSibling):e.appendChild(h),I=e,st(),F(!0)}else if(Q&&fs(t,f,this)){var ct=Zt(e,0,a,!0);if(ct===h)return F(!1);if(i=ct,r=V(i),Ue(R,e,h,o,i,r,t,!1)!==!1)return q(),e.insertBefore(h,ct),I=e,st(),F(!0)}else if(i.parentNode===e){r=V(i);var P=0,G,ht=h.parentNode!==e,J=!ds(h.animated&&h.toRect||o,i.animated&&i.toRect||r,f),we=f?"top":"left",Pt=Li(i,"top","top")||Li(h,"top","top"),Ee=Pt?Pt.scrollTop:void 0;Yt!==i&&(G=r[we],fe=!1,Ie=!J&&a.invertSwap||ht),P=ms(t,i,r,f,J?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Ie,Yt===i);var Et;if(P!==0){var Ut=lt(h);do Ut-=P,Et=I.children[Ut];while(Et&&(b(Et,"display")==="none"||Et===w))}if(P===0||Et===i)return F(!1);Yt=i,pe=P;var xe=i.nextElementSibling,Dt=!1;Dt=P===1;var pn=Ue(R,e,h,o,i,r,t,Dt);if(pn!==!1)return(pn===1||pn===-1)&&(Dt=pn===1),Bn=!0,setTimeout(ps,30),q(),Dt&&!xe?e.appendChild(h):i.parentNode.insertBefore(h,Dt?xe:i),Pt&&Fi(Pt,0,Ee-Pt.scrollTop),I=h.parentNode,G!==void 0&&!Ie&&(He=Math.abs(G-V(i)[we])),st(),F(!0)}if(e.contains(h))return F(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){S(document,"mousemove",this._onTouchMove),S(document,"touchmove",this._onTouchMove),S(document,"pointermove",this._onTouchMove),S(document,"dragover",Lt),S(document,"mousemove",Lt),S(document,"touchmove",Lt)},_offUpEvents:function(){var t=this.el.ownerDocument;S(t,"mouseup",this._onDrop),S(t,"touchend",this._onDrop),S(t,"pointerup",this._onDrop),S(t,"touchcancel",this._onDrop),S(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(rt=lt(h),At=lt(h,i.draggable),it("drop",this,{evt:t}),I=h&&h.parentNode,rt=lt(h),At=lt(h,i.draggable),v.eventCanceled){this._nulling();return}qt=!1,Ie=!1,fe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ln(this.cloneId),Ln(this._dragStartId),this.nativeDraggable&&(S(document,"drop",this),S(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),le&&b(document.body,"user-select",""),b(h,"transform",""),t&&(he&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),w&&w.parentNode&&w.parentNode.removeChild(w),(R===I||z&&z.lastPutMode!=="clone")&&N&&N.parentNode&&N.parentNode.removeChild(N),h&&(this.nativeDraggable&&S(h,"dragend",this),Vn(h),h.style["will-change"]="",he&&!qt&&ot(h,z?z.options.ghostClass:this.options.ghostClass,!1),ot(h,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:I,newIndex:null,newDraggableIndex:null,originalEvent:t}),R!==I?(rt>=0&&(K({rootEl:I,name:"add",toEl:I,fromEl:R,originalEvent:t}),K({sortable:this,name:"remove",toEl:I,originalEvent:t}),K({rootEl:I,name:"sort",toEl:I,fromEl:R,originalEvent:t}),K({sortable:this,name:"sort",toEl:I,originalEvent:t})),z&&z.save()):rt!==Xt&&rt>=0&&(K({sortable:this,name:"update",toEl:I,originalEvent:t}),K({sortable:this,name:"sort",toEl:I,originalEvent:t})),v.active&&((rt==null||rt===-1)&&(rt=Xt,At=ce),K({sortable:this,name:"end",toEl:I,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){it("nulling",this),R=h=I=w=Bt=N=Oe=_t=Vt=ut=he=rt=At=Xt=ce=Yt=pe=z=Re=v.dragged=v.ghost=v.clone=v.active=null,Be.forEach(function(t){t.checked=!0}),Be.length=Nn=In=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),hs(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,o=0,r=i.length,s=this.options;o<r;o++)e=i[o],dt(e,s.draggable,this.el,!1)&&t.push(e.getAttribute(s.dataIdAttr)||bs(e));return t},sort:function(t,e){var i={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];dt(a,this.options.draggable,o,!1)&&(i[r]=a)},this),e&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(o.removeChild(i[r]),o.appendChild(i[r]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return dt(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var o=ue.modifyOption(this,t,e);typeof o<"u"?i[t]=o:i[t]=e,t==="group"&&Gi(i)},destroy:function(){it("destroy",this);var t=this.el;t[nt]=null,S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart),S(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Ne.splice(Ne.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!_t){if(it("hideClone",this),v.eventCanceled)return;b(N,"display","none"),this.options.removeCloneOnHide&&N.parentNode&&N.parentNode.removeChild(N),_t=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(_t){if(it("showClone",this),v.eventCanceled)return;h.parentNode==R&&!this.options.group.revertClone?R.insertBefore(N,h):Bt?R.insertBefore(N,Bt):R.appendChild(N),this.options.group.revertClone&&this.animate(h,N),b(N,"display",""),_t=!1}}};function hs(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function Ue(n,t,e,i,o,r,s,a){var l,d=n[nt],c=d.options.onMove,u;return window.CustomEvent&&!wt&&!ae?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=n,l.dragged=e,l.draggedRect=i,l.related=o||t,l.relatedRect=r||V(t),l.willInsertAfter=a,l.originalEvent=s,n.dispatchEvent(l),c&&(u=c.call(d,l,s)),u}function Vn(n){n.draggable=!1}function ps(){Bn=!1}function fs(n,t,e){var i=V(Zt(e.el,0,e.options,!0)),o=Zi(e.el,e.options,w),r=10;return t?n.clientX<o.left-r||n.clientY<i.top&&n.clientX<i.right:n.clientY<o.top-r||n.clientY<i.bottom&&n.clientX<i.left}function gs(n,t,e){var i=V(On(e.el,e.options.draggable)),o=Zi(e.el,e.options,w),r=10;return t?n.clientX>o.right+r||n.clientY>i.bottom&&n.clientX>i.left:n.clientY>o.bottom+r||n.clientX>i.right&&n.clientY>i.top}function ms(n,t,e,i,o,r,s,a){var l=i?n.clientY:n.clientX,d=i?e.height:e.width,c=i?e.top:e.left,u=i?e.bottom:e.right,p=!1;if(!s){if(a&&He<d*o){if(!fe&&(pe===1?l>c+d*r/2:l<u-d*r/2)&&(fe=!0),fe)p=!0;else if(pe===1?l<c+He:l>u-He)return-pe}else if(l>c+d*(1-o)/2&&l<u-d*(1-o)/2)return ys(t)}return p=p||s,p&&(l<c+d*r/2||l>u-d*r/2)?l>c+d/2?1:-1:0}function ys(n){return lt(h)<lt(n)?1:-1}function bs(n){for(var t=n.tagName+n.className+n.src+n.href+n.textContent,e=t.length,i=0;e--;)i+=t.charCodeAt(e);return i.toString(36)}function vs(n){Be.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&Be.push(i)}}function ke(n){return setTimeout(n,0)}function Ln(n){return clearTimeout(n)}Ve&&A(document,"touchmove",function(n){(v.active||qt)&&n.cancelable&&n.preventDefault()}),v.utils={on:A,off:S,css:b,find:Vi,is:function(t,e){return!!dt(t,e,t,!1)},extend:es,throttle:ki,closest:dt,toggleClass:ot,clone:ji,index:lt,nextTick:ke,cancelNextTick:Ln,detectDirection:Wi,getChild:Zt,expando:nt},v.get=function(n){return n[nt]},v.mount=function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(v.utils=pt(pt({},v.utils),i.utils)),ue.mount(i)})},v.create=function(n,t){return new v(n,t)},v.version=Qr;var L=[],ge,Un,kn=!1,Fn,jn,Fe,me;function ws(){function n(){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 n.prototype={dragStarted:function(e){var i=e.originalEvent;this.sortable.nativeDraggable?A(document,"dragover",this._handleAutoScroll):this.options.supportPointer?A(document,"pointermove",this._handleFallbackAutoScroll):i.touches?A(document,"touchmove",this._handleFallbackAutoScroll):A(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var i=e.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):(S(document,"pointermove",this._handleFallbackAutoScroll),S(document,"touchmove",this._handleFallbackAutoScroll),S(document,"mousemove",this._handleFallbackAutoScroll)),Qi(),je(),ns()},nulling:function(){Fe=Un=ge=kn=me=Fn=jn=null,L.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,i){var o=this,r=(e.touches?e.touches[0]:e).clientX,s=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(r,s);if(Fe=e,i||this.options.forceAutoScrollFallback||ae||wt||le){Zn(e,this.options,a,i);var l=$t(a,!0);kn&&(!me||r!==Fn||s!==jn)&&(me&&Qi(),me=setInterval(function(){var d=$t(document.elementFromPoint(r,s),!0);d!==l&&(l=d,je()),Zn(e,o.options,d,i)},10),Fn=r,jn=s)}else{if(!this.options.bubbleScroll||$t(a,!0)===ft()){je();return}Zn(e,this.options,$t(a,!1),!1)}}},bt(n,{pluginName:"scroll",initializeByDefault:!0})}function je(){L.forEach(function(n){clearInterval(n.pid)}),L=[]}function Qi(){clearInterval(me)}var Zn=ki(function(n,t,e,i){if(t.scroll){var o=(n.touches?n.touches[0]:n).clientX,r=(n.touches?n.touches[0]:n).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=ft(),d=!1,c;Un!==e&&(Un=e,je(),ge=t.scroll,c=t.scrollFn,ge===!0&&(ge=$t(e,!0)));var u=0,p=ge;do{var f=p,g=V(f),y=g.top,M=g.bottom,q=g.left,F=g.right,st=g.width,Q=g.height,ct=void 0,P=void 0,G=f.scrollWidth,ht=f.scrollHeight,J=b(f),we=f.scrollLeft,Pt=f.scrollTop;f===l?(ct=st<G&&(J.overflowX==="auto"||J.overflowX==="scroll"||J.overflowX==="visible"),P=Q<ht&&(J.overflowY==="auto"||J.overflowY==="scroll"||J.overflowY==="visible")):(ct=st<G&&(J.overflowX==="auto"||J.overflowX==="scroll"),P=Q<ht&&(J.overflowY==="auto"||J.overflowY==="scroll"));var Ee=ct&&(Math.abs(F-o)<=s&&we+st<G)-(Math.abs(q-o)<=s&&!!we),Et=P&&(Math.abs(M-r)<=s&&Pt+Q<ht)-(Math.abs(y-r)<=s&&!!Pt);if(!L[u])for(var Ut=0;Ut<=u;Ut++)L[Ut]||(L[Ut]={});(L[u].vx!=Ee||L[u].vy!=Et||L[u].el!==f)&&(L[u].el=f,L[u].vx=Ee,L[u].vy=Et,clearInterval(L[u].pid),(Ee!=0||Et!=0)&&(d=!0,L[u].pid=setInterval((function(){i&&this.layer===0&&v.active._onTouchMove(Fe);var xe=L[this.layer].vy?L[this.layer].vy*a:0,Dt=L[this.layer].vx?L[this.layer].vx*a:0;typeof c=="function"&&c.call(v.dragged.parentNode[nt],Dt,xe,n,Fe,L[this.layer].el)!=="continue"||Fi(L[this.layer].el,Dt,xe)}).bind({layer:u}),24))),u++}while(t.bubbleScroll&&p!==l&&(p=$t(p,!1)));kn=d}},30),to=function(t){var e=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var d=i||r;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),d&&!d.el.contains(u)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function zn(){}zn.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=Zt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:to},bt(zn,{pluginName:"revertOnSpill"});function Xn(){}Xn.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),o.animateAll()},drop:to},bt(Xn,{pluginName:"removeOnSpill"}),v.mount(new ws),v.mount(Xn,zn);const Es=n=>{const t=n.item;let e=Array.prototype.slice.call(t.parentNode.childNodes);return e=e.filter(i=>i.nodeType!=Node.ELEMENT_NODE||!i.classList.contains("sortable-fallback")),e},xs=(n,t,e,i,o,r)=>{const a=n.item.parentNode;for(const y of e)a.appendChild(y);if(n.oldIndex==n.newIndex)return;const l=i.getArray(),d=n.item.querySelector("eox-layercontrol-layer").layer.get(o),c=l.find(y=>y.get(o)===d),u=r.dataset.layer,p=l.find(y=>y.get(o)==u);let f,g;for(f=0;f<l.length;f++)if(l[f]==c){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?i.insertAt(g,c):i.insertAt(g+1,c);break}t.requestUpdate()};function Ss(n,t,e,i){let o=[],r=null;n._sortable=v.create(n,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>o=Es(s),onMove:s=>{r=s.related},onEnd:s=>xs(s,i,o,t,e,r)})}function $s(n,t,e,i){const o=n.getArray();let r=!1;o.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),r=!0),s.get(e)||(s.set(e,`layer ${a}`),r=!0),r&&i.requestUpdate()})}function qn(n,t,e){let i=[];const o=(r,s,a)=>{i=[...i,...r.filter(d=>d.get(s)===a)];const l=r.filter(d=>d.getLayers);return l.length>0&&l.forEach(d=>o(d.getLayers().getArray(),s,a)),i};return o(n,t,e),i}function _s(n,t,e){if(!n||!t)return!1;if(!eo(n,e))return!0;const i=n.get("minZoom"),o=n.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<o}function eo(n,t){const e=n.get("minZoom"),i=n.get("maxZoom");return!!(t&&(e!==-1/0||i!==1/0))}function As(n,t){var o,r,s;return!n||!t?void 0:n.getLayers?"group":((s=(o=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:o.ol_uid)==null?void 0:s.includes(n.getSource?(r=n.getSource())==null?void 0:r.ol_uid:void 0))?"draw":n.declutter_!==void 0?"vector":"raster"}function no(n,t){var i;let e={};for(const o in n){const r=n[o].type;if(r&&r!=="object")e[o]=r==="number"?Number(t[o]):t[o];else if(typeof n[o]=="object"&&((i=n[o])!=null&&i.properties)){const s=no(n[o].properties,t);Object.keys(s).length>0&&(e[o]=s)}}return e}function Cs(n,t){var r,s,a,l,d;if(!t)return null;let e={},i="updateStyleVariables"in n?(r=n.style_)==null?void 0:r.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&i)e=i;else if((l=(a=n.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const c=new URL(n.getSource().getTileUrlFunction()([0,0,0]));e=Object.fromEntries(c.searchParams.entries())}else return null;const o=no(((d=t.schema)==null?void 0:d.properties)||t.schema,e);return Object.keys(o).length?o:null}const Ts=(n,t)=>n==null?void 0:n.filter(e=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(e)),Ps=(n,t)=>n==null?void 0:n.filter(e=>{let i=!0;return["remove","sort"].includes(e)&&(i=!1),e==="info"&&(i=t.get("description")),e==="config"&&(i=t.get("layerConfig")),e==="datetime"&&(i=t.get("layerDatetime")),i}),Ds=(n,t)=>E`
|
|
46
|
-
<button slot="${
|
|
47
|
-
`,
|
|
45
|
+
*/function Ii(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,i)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ii(Object(n),!0).forEach(function(i){ns(e,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ii(Object(n)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(n,i))})}return e}function De(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?De=function(t){return typeof t}:De=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De(e)}function ns(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bt(){return bt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},bt.apply(this,arguments)}function is(e,t){if(e==null)return{};var n={},i=Object.keys(e),o,r;for(r=0;r<i.length;r++)o=i[r],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function os(e,t){if(e==null)return{};var n=is(e,t),i,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}var rs="1.15.3";function vt(e){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(e)}var wt=vt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),le=vt(/Edge/i),Ni=vt(/firefox/i),ue=vt(/safari/i)&&!vt(/chrome/i)&&!vt(/android/i),Hi=vt(/iP(ad|od|hone)/i),Li=vt(/chrome/i)&&vt(/android/i),Bi={capture:!1,passive:!1};function C(e,t,n){e.addEventListener(t,n,!wt&&Bi)}function $(e,t,n){e.removeEventListener(t,n,!wt&&Bi)}function Re(e,t){if(t){if(t[0]===">"&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch{return!1}return!1}}function Vi(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function ct(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Re(e,t):Re(e,t))||i&&e===n)return e;if(e===n)break}while(e=Vi(e))}return null}var ki=/\s+/g;function at(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var i=(" "+e.className+" ").replace(ki," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(ki," ")}}function v(e,t,n){var i=e&&e.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),t===void 0?n:n[t];!(t in i)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),i[t]=n+(typeof n=="string"?"":"px")}}function Zt(e,t){var n="";if(typeof e=="string")n=e;else do{var i=v(e,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!t&&(e=e.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(n)}function Ui(e,t,n){if(e){var i=e.getElementsByTagName(t),o=0,r=i.length;if(n)for(;o<r;o++)n(i[o],o);return i}return[]}function ft(){var e=document.scrollingElement;return e||document.documentElement}function U(e,t,n,i,o){if(!(!e.getBoundingClientRect&&e!==window)){var r,s,a,l,u,c,d;if(e!==window&&e.parentNode&&e!==ft()?(r=e.getBoundingClientRect(),s=r.top,a=r.left,l=r.bottom,u=r.right,c=r.height,d=r.width):(s=0,a=0,l=window.innerHeight,u=window.innerWidth,c=window.innerHeight,d=window.innerWidth),(t||n)&&e!==window&&(o=o||e.parentNode,!wt))do if(o&&o.getBoundingClientRect&&(v(o,"transform")!=="none"||n&&v(o,"position")!=="static")){var p=o.getBoundingClientRect();s-=p.top+parseInt(v(o,"border-top-width")),a-=p.left+parseInt(v(o,"border-left-width")),l=s+r.height,u=a+r.width;break}while(o=o.parentNode);if(i&&e!==window){var f=Zt(o||e),g=f&&f.a,y=f&&f.d;f&&(s/=y,a/=g,d/=g,c/=y,l=s+c,u=a+d)}return{top:s,left:a,bottom:l,right:u,width:d,height:c}}}function Fi(e,t,n){for(var i=$t(e,!0),o=U(e)[t];i;){var r=U(i)[n],s=void 0;if(s=o>=r,!s)return i;if(i===ft())break;i=$t(i,!1)}return!1}function zt(e,t,n,i){for(var o=0,r=0,s=e.children;r<s.length;){if(s[r].style.display!=="none"&&s[r]!==w.ghost&&(i||s[r]!==w.dragged)&&ct(s[r],n.draggable,e,!1)){if(o===t)return s[r];o++}r++}return null}function Rn(e,t){for(var n=e.lastElementChild;n&&(n===w.ghost||v(n,"display")==="none"||t&&!Re(n,t));)n=n.previousElementSibling;return n||null}function dt(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==w.clone&&(!t||Re(e,t))&&n++;return n}function ji(e){var t=0,n=0,i=ft();if(e)do{var o=Zt(e),r=o.a,s=o.d;t+=e.scrollLeft*r,n+=e.scrollTop*s}while(e!==i&&(e=e.parentNode));return[t,n]}function ss(e,t){for(var n in e)if(e.hasOwnProperty(n)){for(var i in t)if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}return-1}function $t(e,t){if(!e||!e.getBoundingClientRect)return ft();var n=e,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var o=v(n);if(n.clientWidth<n.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return ft();if(i||t)return n;i=!0}}while(n=n.parentNode);return ft()}function as(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function Mn(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var de;function Zi(e,t){return function(){if(!de){var n=arguments,i=this;n.length===1?e.call(i,n[0]):e.apply(i,n),de=setTimeout(function(){de=void 0},t)}}}function ls(){clearTimeout(de),de=void 0}function zi(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function Xi(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function qi(e,t,n){var i={};return Array.from(e.children).forEach(function(o){var r,s,a,l;if(!(!ct(o,t.draggable,e,!1)||o.animated||o===n)){var u=U(o);i.left=Math.min((r=i.left)!==null&&r!==void 0?r:1/0,u.left),i.top=Math.min((s=i.top)!==null&&s!==void 0?s:1/0,u.top),i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-1/0,u.right),i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-1/0,u.bottom)}}),i.width=i.right-i.left,i.height=i.bottom-i.top,i.x=i.left,i.y=i.top,i}var rt="Sortable"+new Date().getTime();function us(){var e=[],t;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(o){if(!(v(o,"display")==="none"||o===w.ghost)){e.push({target:o,rect:U(o)});var r=pt({},e[e.length-1].rect);if(o.thisAnimationDuration){var s=Zt(o,!0);s&&(r.top-=s.f,r.left-=s.e)}o.fromRect=r}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(ss(e,{target:i}),1)},animateAll:function(i){var o=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var r=!1,s=0;e.forEach(function(a){var l=0,u=a.target,c=u.fromRect,d=U(u),p=u.prevFromRect,f=u.prevToRect,g=a.rect,y=Zt(u,!0);y&&(d.top-=y.f,d.left-=y.e),u.toRect=d,u.thisAnimationDuration&&Mn(p,d)&&!Mn(c,d)&&(g.top-d.top)/(g.left-d.left)===(c.top-d.top)/(c.left-d.left)&&(l=cs(g,p,f,o.options)),Mn(d,c)||(u.prevFromRect=c,u.prevToRect=d,l||(l=o.options.animation),o.animate(u,g,d,l)),l&&(r=!0,s=Math.max(s,l),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},l),u.thisAnimationDuration=l)}),clearTimeout(t),r?t=setTimeout(function(){typeof i=="function"&&i()},s):typeof i=="function"&&i(),e=[]},animate:function(i,o,r,s){if(s){v(i,"transition",""),v(i,"transform","");var a=Zt(this.el),l=a&&a.a,u=a&&a.d,c=(o.left-r.left)/(l||1),d=(o.top-r.top)/(u||1);i.animatingX=!!c,i.animatingY=!!d,v(i,"transform","translate3d("+c+"px,"+d+"px,0)"),this.forRepaintDummy=ds(i),v(i,"transition","transform "+s+"ms"+(this.options.easing?" "+this.options.easing:"")),v(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){v(i,"transition",""),v(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},s)}}}}function ds(e){return e.offsetWidth}function cs(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var Xt=[],In={initializeByDefault:!0},ce={mount:function(t){for(var n in In)In.hasOwnProperty(n)&&!(n in t)&&(t[n]=In[n]);Xt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Xt.push(t)},pluginEvent:function(t,n,i){var o=this;this.eventCanceled=!1,i.cancel=function(){o.eventCanceled=!0};var r=t+"Global";Xt.forEach(function(s){n[s.pluginName]&&(n[s.pluginName][r]&&n[s.pluginName][r](pt({sortable:n},i)),n.options[s.pluginName]&&n[s.pluginName][t]&&n[s.pluginName][t](pt({sortable:n},i)))})},initializePlugins:function(t,n,i,o){Xt.forEach(function(a){var l=a.pluginName;if(!(!t.options[l]&&!a.initializeByDefault)){var u=new a(t,n,t.options);u.sortable=t,u.options=t.options,t[l]=u,bt(i,u.defaults)}});for(var r in t.options)if(t.options.hasOwnProperty(r)){var s=this.modifyOption(t,r,t.options[r]);typeof s<"u"&&(t.options[r]=s)}},getEventProperties:function(t,n){var i={};return Xt.forEach(function(o){typeof o.eventProperties=="function"&&bt(i,o.eventProperties.call(n[o.pluginName],t))}),i},modifyOption:function(t,n,i){var o;return Xt.forEach(function(r){t[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[n]=="function"&&(o=r.optionListeners[n].call(t[r.pluginName],i))}),o}};function hs(e){var t=e.sortable,n=e.rootEl,i=e.name,o=e.targetEl,r=e.cloneEl,s=e.toEl,a=e.fromEl,l=e.oldIndex,u=e.newIndex,c=e.oldDraggableIndex,d=e.newDraggableIndex,p=e.originalEvent,f=e.putSortable,g=e.extraEventProperties;if(t=t||n&&n[rt],!!t){var y,R=t.options,L="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!wt&&!le?y=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(i,!0,!0)),y.to=s||n,y.from=a||n,y.item=o||n,y.clone=r,y.oldIndex=l,y.newIndex=u,y.oldDraggableIndex=c,y.newDraggableIndex=d,y.originalEvent=p,y.pullMode=f?f.lastPutMode:void 0;var V=pt(pt({},g),ce.getEventProperties(i,t));for(var et in V)y[et]=V[et];n&&n.dispatchEvent(y),R[L]&&R[L].call(t,y)}}var ps=["evt"],st=function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=i.evt,r=os(i,ps);ce.pluginEvent.bind(w)(t,n,pt({dragEl:h,parentEl:H,ghostEl:x,rootEl:I,nextEl:Bt,lastDownEl:Me,cloneEl:N,cloneHidden:At,dragStarted:pe,putSortable:Y,activeSortable:w.active,originalEvent:o,oldIndex:qt,oldDraggableIndex:he,newIndex:lt,newDraggableIndex:_t,hideGhostForTarget:to,unhideGhostForTarget:eo,cloneNowHidden:function(){At=!0},cloneNowShown:function(){At=!1},dispatchSortableEvent:function(a){tt({sortable:n,name:a,originalEvent:o})}},r))};function tt(e){hs(pt({putSortable:Y,cloneEl:N,targetEl:h,rootEl:I,oldIndex:qt,oldDraggableIndex:he,newIndex:lt,newDraggableIndex:_t},e))}var h,H,x,I,Bt,Me,N,At,qt,lt,he,_t,Ie,Y,Yt=!1,Ne=!1,He=[],Vt,ht,Nn,Hn,Yi,Wi,pe,Wt,fe,ge=!1,Le=!1,Be,Q,Ln=[],Bn=!1,Ve=[],ke=typeof document<"u",Ue=Hi,Gi=le||wt?"cssFloat":"float",fs=ke&&!Li&&!Hi&&"draggable"in document.createElement("div"),Ji=function(){if(ke){if(wt)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),Ki=function(t,n){var i=v(t),o=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),r=zt(t,0,n),s=zt(t,1,n),a=r&&v(r),l=s&&v(s),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+U(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+U(s).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=o&&i[Gi]==="none"||s&&i[Gi]==="none"&&u+c>o)?"vertical":"horizontal"},gs=function(t,n,i){var o=i?t.left:t.top,r=i?t.right:t.bottom,s=i?t.width:t.height,a=i?n.left:n.top,l=i?n.right:n.bottom,u=i?n.width:n.height;return o===a||r===l||o+s/2===a+u/2},ms=function(t,n){var i;return He.some(function(o){var r=o[rt].options.emptyInsertThreshold;if(!(!r||Rn(o))){var s=U(o),a=t>=s.left-r&&t<=s.right+r,l=n>=s.top-r&&n<=s.bottom+r;if(a&&l)return i=o}}),i},Qi=function(t){function n(r,s){return function(a,l,u,c){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(s||d))return!0;if(r==null||r===!1)return!1;if(s&&r==="clone")return r;if(typeof r=="function")return n(r(a,l,u,c),s)(a,l,u,c);var p=(s?a:l).options.group.name;return r===!0||typeof r=="string"&&r===p||r.join&&r.indexOf(p)>-1}}var i={},o=t.group;(!o||De(o)!="object")&&(o={name:o}),i.name=o.name,i.checkPull=n(o.pull,!0),i.checkPut=n(o.put),i.revertClone=o.revertClone,t.group=i},to=function(){!Ji&&x&&v(x,"display","none")},eo=function(){!Ji&&x&&v(x,"display","")};ke&&!Li&&document.addEventListener("click",function(e){if(Ne)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Ne=!1,!1},!0);var kt=function(t){if(h){t=t.touches?t.touches[0]:t;var n=ms(t.clientX,t.clientY);if(n){var i={};for(var o in t)t.hasOwnProperty(o)&&(i[o]=t[o]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[rt]._onDragOver(i)}}},ys=function(t){h&&h.parentNode[rt]._isOutsideThisEl(t.target)};function w(e,t){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=bt({},t),e[rt]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ki(e,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:w.supportPointer!==!1&&"PointerEvent"in window&&!ue,emptyInsertThreshold:5};ce.initializePlugins(this,e,n);for(var i in n)!(i in t)&&(t[i]=n[i]);Qi(t);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=t.forceFallback?!1:fs,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?C(e,"pointerdown",this._onTapStart):(C(e,"mousedown",this._onTapStart),C(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(e,"dragover",this),C(e,"dragenter",this)),He.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),bt(this,us())}w.prototype={constructor:w,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(Wt=null)},_getDirection:function(t,n){return typeof this.options.direction=="function"?this.options.direction.call(this,t,n,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var n=this,i=this.el,o=this.options,r=o.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,c=o.filter;if(As(i),!h&&!(/mousedown|pointerdown/.test(s)&&t.button!==0||o.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&ue&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ct(l,o.draggable,i,!1),!(l&&l.animated)&&Me!==l)){if(qt=dt(l),he=dt(l,o.draggable),typeof c=="function"){if(c.call(this,t,l,this)){tt({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:i,fromEl:i}),st("filter",n,{evt:t}),r&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(d){if(d=ct(u,d.trim(),i,!1),d)return tt({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:i,toEl:i}),st("filter",n,{evt:t}),!0}),c)){r&&t.cancelable&&t.preventDefault();return}o.handle&&!ct(u,o.handle,i,!1)||this._prepareDragStart(t,a,l)}}},_prepareDragStart:function(t,n,i){var o=this,r=o.el,s=o.options,a=r.ownerDocument,l;if(i&&!h&&i.parentNode===r){var u=U(i);if(I=r,h=i,H=h.parentNode,Bt=h.nextSibling,Me=i,Ie=s.group,w.dragged=h,Vt={target:h,clientX:(n||t).clientX,clientY:(n||t).clientY},Yi=Vt.clientX-u.left,Wi=Vt.clientY-u.top,this._lastX=(n||t).clientX,this._lastY=(n||t).clientY,h.style["will-change"]="all",l=function(){if(st("delayEnded",o,{evt:t}),w.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ni&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(t,n),tt({sortable:o,name:"choose",originalEvent:t}),at(h,s.chosenClass,!0)},s.ignore.split(",").forEach(function(c){Ui(h,c.trim(),Vn)}),C(a,"dragover",kt),C(a,"mousemove",kt),C(a,"touchmove",kt),C(a,"mouseup",o._onDrop),C(a,"touchend",o._onDrop),C(a,"touchcancel",o._onDrop),Ni&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),st("delayStart",this,{evt:t}),s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(le||wt))){if(w.eventCanceled){this._onDrop();return}C(a,"mouseup",o._disableDelayedDrag),C(a,"touchend",o._disableDelayedDrag),C(a,"touchcancel",o._disableDelayedDrag),C(a,"mousemove",o._delayedDragTouchMoveHandler),C(a,"touchmove",o._delayedDragTouchMoveHandler),s.supportPointer&&C(a,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(l,s.delay)}else l()}},_delayedDragTouchMoveHandler:function(t){var n=t.touches?t.touches[0]:t;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&Vn(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;$(t,"mouseup",this._disableDelayedDrag),$(t,"touchend",this._disableDelayedDrag),$(t,"touchcancel",this._disableDelayedDrag),$(t,"mousemove",this._delayedDragTouchMoveHandler),$(t,"touchmove",this._delayedDragTouchMoveHandler),$(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,n){n=n||t.pointerType=="touch"&&t,!this.nativeDraggable||n?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):n?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(h,"dragend",this),C(I,"dragstart",this._onDragStart));try{document.selection?je(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,n){if(Yt=!1,I&&h){st("dragStarted",this,{evt:n}),this.nativeDraggable&&C(document,"dragover",ys);var i=this.options;!t&&at(h,i.dragClass,!1),at(h,i.ghostClass,!0),w.active=this,t&&this._appendGhost(),tt({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(ht){this._lastX=ht.clientX,this._lastY=ht.clientY,to();for(var t=document.elementFromPoint(ht.clientX,ht.clientY),n=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ht.clientX,ht.clientY),t!==n);)n=t;if(h.parentNode[rt]._isOutsideThisEl(t),n)do{if(n[rt]){var i=void 0;if(i=n[rt]._onDragOver({clientX:ht.clientX,clientY:ht.clientY,target:t,rootEl:n}),i&&!this.options.dragoverBubble)break}t=n}while(n=Vi(n));eo()}},_onTouchMove:function(t){if(Vt){var n=this.options,i=n.fallbackTolerance,o=n.fallbackOffset,r=t.touches?t.touches[0]:t,s=x&&Zt(x,!0),a=x&&s&&s.a,l=x&&s&&s.d,u=Ue&&Q&&ji(Q),c=(r.clientX-Vt.clientX+o.x)/(a||1)+(u?u[0]-Ln[0]:0)/(a||1),d=(r.clientY-Vt.clientY+o.y)/(l||1)+(u?u[1]-Ln[1]:0)/(l||1);if(!w.active&&!Yt){if(i&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(x){s?(s.e+=c-(Nn||0),s.f+=d-(Hn||0)):s={a:1,b:0,c:0,d:1,e:c,f:d};var p="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");v(x,"webkitTransform",p),v(x,"mozTransform",p),v(x,"msTransform",p),v(x,"transform",p),Nn=c,Hn=d,ht=r}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!x){var t=this.options.fallbackOnBody?document.body:I,n=U(h,!0,Ue,!0,t),i=this.options;if(Ue){for(Q=t;v(Q,"position")==="static"&&v(Q,"transform")==="none"&&Q!==document;)Q=Q.parentNode;Q!==document.body&&Q!==document.documentElement?(Q===document&&(Q=ft()),n.top+=Q.scrollTop,n.left+=Q.scrollLeft):Q=ft(),Ln=ji(Q)}x=h.cloneNode(!0),at(x,i.ghostClass,!1),at(x,i.fallbackClass,!0),at(x,i.dragClass,!0),v(x,"transition",""),v(x,"transform",""),v(x,"box-sizing","border-box"),v(x,"margin",0),v(x,"top",n.top),v(x,"left",n.left),v(x,"width",n.width),v(x,"height",n.height),v(x,"opacity","0.8"),v(x,"position",Ue?"absolute":"fixed"),v(x,"zIndex","100000"),v(x,"pointerEvents","none"),w.ghost=x,t.appendChild(x),v(x,"transform-origin",Yi/parseInt(x.style.width)*100+"% "+Wi/parseInt(x.style.height)*100+"%")}},_onDragStart:function(t,n){var i=this,o=t.dataTransfer,r=i.options;if(st("dragStart",this,{evt:t}),w.eventCanceled){this._onDrop();return}st("setupClone",this),w.eventCanceled||(N=Xi(h),N.removeAttribute("id"),N.draggable=!1,N.style["will-change"]="",this._hideClone(),at(N,this.options.chosenClass,!1),w.clone=N),i.cloneId=je(function(){st("clone",i),!w.eventCanceled&&(i.options.removeCloneOnHide||I.insertBefore(N,h),i._hideClone(),tt({sortable:i,name:"clone"}))}),!n&&at(h,r.dragClass,!0),n?(Ne=!0,i._loopId=setInterval(i._emulateDragOver,50)):($(document,"mouseup",i._onDrop),$(document,"touchend",i._onDrop),$(document,"touchcancel",i._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(i,o,h)),C(document,"drop",i),v(h,"transform","translateZ(0)")),Yt=!0,i._dragStartId=je(i._dragStarted.bind(i,n,t)),C(document,"selectstart",i),pe=!0,ue&&v(document.body,"user-select","none")},_onDragOver:function(t){var n=this.el,i=t.target,o,r,s,a=this.options,l=a.group,u=w.active,c=Ie===l,d=a.sort,p=Y||u,f,g=this,y=!1;if(Bn)return;function R(Ae,ka){st(Ae,g,pt({evt:t,isOwner:c,axis:f?"vertical":"horizontal",revert:s,dragRect:o,targetRect:r,canSort:d,fromSortable:p,target:i,completed:V,onMove:function(Oo,Ua){return Fe(I,n,h,o,Oo,U(Oo),t,Ua)},changed:et},ka))}function L(){R("dragOverAnimationCapture"),g.captureAnimationState(),g!==p&&p.captureAnimationState()}function V(Ae){return R("dragOverCompleted",{insertion:Ae}),Ae&&(c?u._hideClone():u._showClone(g),g!==p&&(at(h,Y?Y.options.ghostClass:u.options.ghostClass,!1),at(h,a.ghostClass,!0)),Y!==g&&g!==w.active?Y=g:g===w.active&&Y&&(Y=null),p===g&&(g._ignoreWhileAnimating=i),g.animateAll(function(){R("dragOverAnimationComplete"),g._ignoreWhileAnimating=null}),g!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===n&&!i.animated)&&(Wt=null),!a.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[rt]._isOutsideThisEl(t.target),!Ae&&kt(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),y=!0}function et(){lt=dt(h),_t=dt(h,a.draggable),tt({sortable:g,name:"change",toEl:n,newIndex:lt,newDraggableIndex:_t,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=ct(i,a.draggable,n,!0),R("dragOver"),w.eventCanceled)return y;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||g._ignoreWhileAnimating===i)return V(!1);if(Ne=!1,u&&!a.disabled&&(c?d||(s=H!==I):Y===this||(this.lastPutMode=Ie.checkPull(this,u,h,t))&&l.checkPut(this,u,h,t))){if(f=this._getDirection(t,i)==="vertical",o=U(h),R("dragOverValid"),w.eventCanceled)return y;if(s)return H=I,L(),this._hideClone(),R("revert"),w.eventCanceled||(Bt?I.insertBefore(h,Bt):I.appendChild(h)),V(!0);var G=Rn(n,a.draggable);if(!G||xs(t,f,this)&&!G.animated){if(G===h)return V(!1);if(G&&n===t.target&&(i=G),i&&(r=U(i)),Fe(I,n,h,o,i,r,t,!!i)!==!1)return L(),G&&G.nextSibling?n.insertBefore(h,G.nextSibling):n.appendChild(h),H=n,et(),V(!0)}else if(G&&ws(t,f,this)){var nt=zt(n,0,a,!0);if(nt===h)return V(!1);if(i=nt,r=U(i),Fe(I,n,h,o,i,r,t,!1)!==!1)return L(),n.insertBefore(h,nt),H=n,et(),V(!0)}else if(i.parentNode===n){r=U(i);var b=0,M,J=h.parentNode!==n,Z=!gs(h.animated&&h.toRect||o,i.animated&&i.toRect||r,f),Ee=f?"top":"left",Ot=Fi(i,"top","top")||Fi(h,"top","top"),Se=Ot?Ot.scrollTop:void 0;Wt!==i&&(M=r[Ee],ge=!1,Le=!Z&&a.invertSwap||J),b=Es(t,i,r,f,Z?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Le,Wt===i);var xt;if(b!==0){var Ut=dt(h);do Ut-=b,xt=H.children[Ut];while(xt&&(v(xt,"display")==="none"||xt===x))}if(b===0||xt===i)return V(!1);Wt=i,fe=b;var $e=i.nextElementSibling,Dt=!1;Dt=b===1;var fn=Fe(I,n,h,o,i,r,t,Dt);if(fn!==!1)return(fn===1||fn===-1)&&(Dt=fn===1),Bn=!0,setTimeout(vs,30),L(),Dt&&!$e?n.appendChild(h):i.parentNode.insertBefore(h,Dt?$e:i),Ot&&zi(Ot,0,Se-Ot.scrollTop),H=h.parentNode,M!==void 0&&!Le&&(Be=Math.abs(M-U(i)[Ee])),et(),V(!0)}if(n.contains(h))return V(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){$(document,"mousemove",this._onTouchMove),$(document,"touchmove",this._onTouchMove),$(document,"pointermove",this._onTouchMove),$(document,"dragover",kt),$(document,"mousemove",kt),$(document,"touchmove",kt)},_offUpEvents:function(){var t=this.el.ownerDocument;$(t,"mouseup",this._onDrop),$(t,"touchend",this._onDrop),$(t,"pointerup",this._onDrop),$(t,"touchcancel",this._onDrop),$(document,"selectstart",this)},_onDrop:function(t){var n=this.el,i=this.options;if(lt=dt(h),_t=dt(h,i.draggable),st("drop",this,{evt:t}),H=h&&h.parentNode,lt=dt(h),_t=dt(h,i.draggable),w.eventCanceled){this._nulling();return}Yt=!1,Le=!1,ge=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),kn(this.cloneId),kn(this._dragStartId),this.nativeDraggable&&($(document,"drop",this),$(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),ue&&v(document.body,"user-select",""),v(h,"transform",""),t&&(pe&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),x&&x.parentNode&&x.parentNode.removeChild(x),(I===H||Y&&Y.lastPutMode!=="clone")&&N&&N.parentNode&&N.parentNode.removeChild(N),h&&(this.nativeDraggable&&$(h,"dragend",this),Vn(h),h.style["will-change"]="",pe&&!Yt&&at(h,Y?Y.options.ghostClass:this.options.ghostClass,!1),at(h,this.options.chosenClass,!1),tt({sortable:this,name:"unchoose",toEl:H,newIndex:null,newDraggableIndex:null,originalEvent:t}),I!==H?(lt>=0&&(tt({rootEl:H,name:"add",toEl:H,fromEl:I,originalEvent:t}),tt({sortable:this,name:"remove",toEl:H,originalEvent:t}),tt({rootEl:H,name:"sort",toEl:H,fromEl:I,originalEvent:t}),tt({sortable:this,name:"sort",toEl:H,originalEvent:t})),Y&&Y.save()):lt!==qt&<>=0&&(tt({sortable:this,name:"update",toEl:H,originalEvent:t}),tt({sortable:this,name:"sort",toEl:H,originalEvent:t})),w.active&&((lt==null||lt===-1)&&(lt=qt,_t=he),tt({sortable:this,name:"end",toEl:H,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){st("nulling",this),I=h=H=x=Bt=N=Me=At=Vt=ht=pe=lt=_t=qt=he=Wt=fe=Y=Ie=w.dragged=w.ghost=w.clone=w.active=null,Ve.forEach(function(t){t.checked=!0}),Ve.length=Nn=Hn=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),bs(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],n,i=this.el.children,o=0,r=i.length,s=this.options;o<r;o++)n=i[o],ct(n,s.draggable,this.el,!1)&&t.push(n.getAttribute(s.dataIdAttr)||$s(n));return t},sort:function(t,n){var i={},o=this.el;this.toArray().forEach(function(r,s){var a=o.children[s];ct(a,this.options.draggable,o,!1)&&(i[r]=a)},this),n&&this.captureAnimationState(),t.forEach(function(r){i[r]&&(o.removeChild(i[r]),o.appendChild(i[r]))}),n&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,n){return ct(t,n||this.options.draggable,this.el,!1)},option:function(t,n){var i=this.options;if(n===void 0)return i[t];var o=ce.modifyOption(this,t,n);typeof o<"u"?i[t]=o:i[t]=n,t==="group"&&Qi(i)},destroy:function(){st("destroy",this);var t=this.el;t[rt]=null,$(t,"mousedown",this._onTapStart),$(t,"touchstart",this._onTapStart),$(t,"pointerdown",this._onTapStart),this.nativeDraggable&&($(t,"dragover",this),$(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),He.splice(He.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!At){if(st("hideClone",this),w.eventCanceled)return;v(N,"display","none"),this.options.removeCloneOnHide&&N.parentNode&&N.parentNode.removeChild(N),At=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(At){if(st("showClone",this),w.eventCanceled)return;h.parentNode==I&&!this.options.group.revertClone?I.insertBefore(N,h):Bt?I.insertBefore(N,Bt):I.appendChild(N),this.options.group.revertClone&&this.animate(h,N),v(N,"display",""),At=!1}}};function bs(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Fe(e,t,n,i,o,r,s,a){var l,u=e[rt],c=u.options.onMove,d;return window.CustomEvent&&!wt&&!le?l=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(l=document.createEvent("Event"),l.initEvent("move",!0,!0)),l.to=t,l.from=e,l.dragged=n,l.draggedRect=i,l.related=o||t,l.relatedRect=r||U(t),l.willInsertAfter=a,l.originalEvent=s,e.dispatchEvent(l),c&&(d=c.call(u,l,s)),d}function Vn(e){e.draggable=!1}function vs(){Bn=!1}function ws(e,t,n){var i=U(zt(n.el,0,n.options,!0)),o=qi(n.el,n.options,x),r=10;return t?e.clientX<o.left-r||e.clientY<i.top&&e.clientX<i.right:e.clientY<o.top-r||e.clientY<i.bottom&&e.clientX<i.left}function xs(e,t,n){var i=U(Rn(n.el,n.options.draggable)),o=qi(n.el,n.options,x),r=10;return t?e.clientX>o.right+r||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>o.bottom+r||e.clientX>i.right&&e.clientY>i.top}function Es(e,t,n,i,o,r,s,a){var l=i?e.clientY:e.clientX,u=i?n.height:n.width,c=i?n.top:n.left,d=i?n.bottom:n.right,p=!1;if(!s){if(a&&Be<u*o){if(!ge&&(fe===1?l>c+u*r/2:l<d-u*r/2)&&(ge=!0),ge)p=!0;else if(fe===1?l<c+Be:l>d-Be)return-fe}else if(l>c+u*(1-o)/2&&l<d-u*(1-o)/2)return Ss(t)}return p=p||s,p&&(l<c+u*r/2||l>d-u*r/2)?l>c+u/2?1:-1:0}function Ss(e){return dt(h)<dt(e)?1:-1}function $s(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;n--;)i+=t.charCodeAt(n);return i.toString(36)}function As(e){Ve.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var i=t[n];i.checked&&Ve.push(i)}}function je(e){return setTimeout(e,0)}function kn(e){return clearTimeout(e)}ke&&C(document,"touchmove",function(e){(w.active||Yt)&&e.cancelable&&e.preventDefault()}),w.utils={on:C,off:$,css:v,find:Ui,is:function(t,n){return!!ct(t,n,t,!1)},extend:as,throttle:Zi,closest:ct,toggleClass:at,clone:Xi,index:dt,nextTick:je,cancelNextTick:kn,detectDirection:Ki,getChild:zt,expando:rt},w.get=function(e){return e[rt]},w.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(w.utils=pt(pt({},w.utils),i.utils)),ce.mount(i)})},w.create=function(e,t){return new w(e,t)},w.version=rs;var F=[],me,Un,Fn=!1,jn,Zn,Ze,ye;function _s(){function e(){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 e.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?C(document,"dragover",this._handleAutoScroll):this.options.supportPointer?C(document,"pointermove",this._handleFallbackAutoScroll):i.touches?C(document,"touchmove",this._handleFallbackAutoScroll):C(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?$(document,"dragover",this._handleAutoScroll):($(document,"pointermove",this._handleFallbackAutoScroll),$(document,"touchmove",this._handleFallbackAutoScroll),$(document,"mousemove",this._handleFallbackAutoScroll)),no(),ze(),ls()},nulling:function(){Ze=Un=me=Fn=ye=jn=Zn=null,F.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var o=this,r=(n.touches?n.touches[0]:n).clientX,s=(n.touches?n.touches[0]:n).clientY,a=document.elementFromPoint(r,s);if(Ze=n,i||this.options.forceAutoScrollFallback||le||wt||ue){zn(n,this.options,a,i);var l=$t(a,!0);Fn&&(!ye||r!==jn||s!==Zn)&&(ye&&no(),ye=setInterval(function(){var u=$t(document.elementFromPoint(r,s),!0);u!==l&&(l=u,ze()),zn(n,o.options,u,i)},10),jn=r,Zn=s)}else{if(!this.options.bubbleScroll||$t(a,!0)===ft()){ze();return}zn(n,this.options,$t(a,!1),!1)}}},bt(e,{pluginName:"scroll",initializeByDefault:!0})}function ze(){F.forEach(function(e){clearInterval(e.pid)}),F=[]}function no(){clearInterval(ye)}var zn=Zi(function(e,t,n,i){if(t.scroll){var o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=ft(),u=!1,c;Un!==n&&(Un=n,ze(),me=t.scroll,c=t.scrollFn,me===!0&&(me=$t(n,!0)));var d=0,p=me;do{var f=p,g=U(f),y=g.top,R=g.bottom,L=g.left,V=g.right,et=g.width,G=g.height,nt=void 0,b=void 0,M=f.scrollWidth,J=f.scrollHeight,Z=v(f),Ee=f.scrollLeft,Ot=f.scrollTop;f===l?(nt=et<M&&(Z.overflowX==="auto"||Z.overflowX==="scroll"||Z.overflowX==="visible"),b=G<J&&(Z.overflowY==="auto"||Z.overflowY==="scroll"||Z.overflowY==="visible")):(nt=et<M&&(Z.overflowX==="auto"||Z.overflowX==="scroll"),b=G<J&&(Z.overflowY==="auto"||Z.overflowY==="scroll"));var Se=nt&&(Math.abs(V-o)<=s&&Ee+et<M)-(Math.abs(L-o)<=s&&!!Ee),xt=b&&(Math.abs(R-r)<=s&&Ot+G<J)-(Math.abs(y-r)<=s&&!!Ot);if(!F[d])for(var Ut=0;Ut<=d;Ut++)F[Ut]||(F[Ut]={});(F[d].vx!=Se||F[d].vy!=xt||F[d].el!==f)&&(F[d].el=f,F[d].vx=Se,F[d].vy=xt,clearInterval(F[d].pid),(Se!=0||xt!=0)&&(u=!0,F[d].pid=setInterval((function(){i&&this.layer===0&&w.active._onTouchMove(Ze);var $e=F[this.layer].vy?F[this.layer].vy*a:0,Dt=F[this.layer].vx?F[this.layer].vx*a:0;typeof c=="function"&&c.call(w.dragged.parentNode[rt],Dt,$e,e,Ze,F[this.layer].el)!=="continue"||zi(F[this.layer].el,Dt,$e)}).bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==l&&(p=$t(p,!1)));Fn=u}},30),io=function(t){var n=t.originalEvent,i=t.putSortable,o=t.dragEl,r=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(n){var u=i||r;a();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,d=document.elementFromPoint(c.clientX,c.clientY);l(),u&&!u.el.contains(d)&&(s("spill"),this.onSpill({dragEl:o,putSortable:i}))}};function Xn(){}Xn.prototype={startIndex:null,dragStart:function(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var o=zt(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(n,o):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:io},bt(Xn,{pluginName:"revertOnSpill"});function qn(){}qn.prototype={onSpill:function(t){var n=t.dragEl,i=t.putSortable,o=i||this.sortable;o.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),o.animateAll()},drop:io},bt(qn,{pluginName:"removeOnSpill"}),w.mount(new _s),w.mount(qn,Xn);const Cs=e=>{const t=e.item;let n=Array.prototype.slice.call(t.parentNode.childNodes);return n=n.filter(i=>i.nodeType!=Node.ELEMENT_NODE||!i.classList.contains("sortable-fallback")),n},Ts=(e,t,n,i,o,r)=>{const a=e.item.parentNode;for(const y of n)a.appendChild(y);if(e.oldIndex==e.newIndex)return;const l=i.getArray(),u=e.item.querySelector("eox-layercontrol-layer").layer.get(o),c=l.find(y=>y.get(o)===u),d=r.dataset.layer,p=l.find(y=>y.get(o)==d);let f,g;for(f=0;f<l.length;f++)if(l[f]==c){i.removeAt(f);break}for(g=0;g<l.length;g++)if(l[g]===p){f>g?i.insertAt(g,c):i.insertAt(g+1,c);break}t.requestUpdate()};function Ps(e,t,n,i){let o=[],r=null;e._sortable=w.create(e,{handle:".drag-handle",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",onStart:s=>o=Cs(s),onMove:s=>{r=s.related},onEnd:s=>Ts(s,i,o,t,n,r)})}function Os(e,t,n,i){const o=e.getArray();let r=!1;o.forEach(s=>{const a=s.ol_uid;s.get(t)||(s.set(t,a),r=!0),s.get(n)||(s.set(n,`layer ${a}`),r=!0),r&&i.requestUpdate()})}function Yn(e,t,n){let i=[];const o=(r,s,a)=>{i=[...i,...r.filter(u=>u.get(s)===a)];const l=r.filter(u=>u.getLayers);return l.length>0&&l.forEach(u=>o(u.getLayers().getArray(),s,a)),i};return o(e,t,n),i}function Ds(e,t,n){if(!e||!t)return!1;if(!oo(e,n))return!0;const i=e.get("minZoom"),o=e.get("maxZoom"),r=t.getView().getZoom();return r>i&&r<o}function oo(e,t){const n=e.get("minZoom"),i=e.get("maxZoom");return!!(t&&(n!==-1/0||i!==1/0))}function Rs(e,t){var o,r,s;return!e||!t?void 0:e.getLayers?"group":((s=(o=t.getInteractions().getArray().filter(a=>a.freehand_!==void 0).map(a=>a.source_))==null?void 0:o.ol_uid)==null?void 0:s.includes(e.getSource?(r=e.getSource())==null?void 0:r.ol_uid:void 0))?"draw":e.declutter_!==void 0?"vector":"raster"}function ro(e,t){var i;let n={};for(const o in e){const r=e[o].type;if(r&&r!=="object")n[o]=r==="number"?Number(t[o]):t[o];else if(typeof e[o]=="object"&&((i=e[o])!=null&&i.properties)){const s=ro(e[o].properties,t);Object.keys(s).length>0&&(n[o]=s)}}return n}function Ms(e,t){var r,s,a,l,u;if(!t)return null;let n={},i="updateStyleVariables"in e?(r=e.style_)==null?void 0:r.variables:(s=t.style)==null?void 0:s.variables;if((t.type==="style"||t.style)&&i)n=i;else if((l=(a=e.getSource())==null?void 0:a.getTileUrlFunction)!=null&&l.call(a)){const c=new URL(e.getSource().getTileUrlFunction()([0,0,0]));n=Object.fromEntries(c.searchParams.entries())}else return null;const o=ro(((u=t.schema)==null?void 0:u.properties)||t.schema,n);return Object.keys(o).length?o:null}const Is=(e,t)=>e==null?void 0:e.filter(n=>["remove","sort"].filter(i=>t!=null&&t.get("layerControlDisable")?i!=="sort":!0).includes(n)),Ns=(e,t)=>e==null?void 0:e.filter(n=>{let i=!0;return["remove","sort"].includes(n)&&(i=!1),n==="info"&&(i=t.get("description")),n==="config"&&(i=t.get("layerConfig")),n==="datetime"&&(i=t.get("layerDatetime")),i}),Hs=(e,t)=>E`
|
|
46
|
+
<button slot="${e}-icon" class="icon">${t?e:P}</button>
|
|
47
|
+
`,Ls=e=>E`
|
|
48
48
|
<button
|
|
49
49
|
class="remove-icon icon"
|
|
50
|
-
@click=${()=>{const{layer:t}=
|
|
50
|
+
@click=${()=>{const{layer:t}=e;t==null||t.set("layerControlOptional",!0),t==null||t.setVisible(!1),e.dispatchEvent(new CustomEvent("changed",{detail:t,bubbles:!0}))}}
|
|
51
51
|
>
|
|
52
|
-
${
|
|
52
|
+
${e.unstyled?"x":P}
|
|
53
53
|
</button>
|
|
54
|
-
`,
|
|
54
|
+
`,Bs=e=>E`
|
|
55
55
|
<span class="button sort-icon icon drag-handle">
|
|
56
|
-
${
|
|
56
|
+
${e?"═":P}
|
|
57
57
|
</span>
|
|
58
|
-
`,
|
|
58
|
+
`,so=e=>{var n;const t=["layerControlHide","layerControlOptional"];return(n=e==null?void 0:e.getArray())==null?void 0:n.filter(i=>t.every(o=>!i.get(o)))};/**
|
|
59
59
|
* @license
|
|
60
60
|
* Copyright 2020 Google LLC
|
|
61
61
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
-
*/const
|
|
62
|
+
*/const ao=An(class extends _n{constructor(e){if(super(e),e.type!==St.PROPERTY&&e.type!==St.ATTRIBUTE&&e.type!==St.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ir(e))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(e,[t]){if(t===ut||t===P)return t;const n=e.element,i=e.name;if(e.type===St.PROPERTY){if(t===n[i])return ut}else if(e.type===St.BOOLEAN_ATTRIBUTE){if(!!t===n.hasAttribute(i))return ut}else if(e.type===St.ATTRIBUTE&&n.getAttribute(i)===t+"")return ut;return $i(e),t}});/**
|
|
63
63
|
* @license
|
|
64
64
|
* Copyright 2017 Google LLC
|
|
65
65
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
66
|
-
*/class
|
|
66
|
+
*/class Wn extends _n{constructor(t){if(super(t),this.it=P,t.type!==St.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===P||t==null)return this._t=void 0,this.it=t;if(t===ut)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 n=[t];return n.raw=n,this._t={_$litType$:this.constructor.resultType,strings:n,values:[]}}}Wn.directiveName="unsafeHTML",Wn.resultType=1;const Vs=An(Wn);/**
|
|
67
67
|
* @license
|
|
68
68
|
* Copyright 2021 Google LLC
|
|
69
69
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
70
|
-
*/function*
|
|
70
|
+
*/function*Xe(e,t){if(e!==void 0){let n=0;for(const i of e)yield t(i,n++)}}const ks=(e,t,n)=>{let i=t;return n.layer.getSource().getTileUrlFunction()&&(i||(i=n.layer.getSource().getTileUrlFunction()),n.layer.getSource().setTileUrlFunction((...o)=>es(i(...o),e)),n.layer.getSource().setKey(new Date)),i};function Us(e,t,n){const i="updateStyleVariables"in t,o="setStyle"in t,r=i?t.style_:n.style;let s=r==null?void 0:r.variables;if(s){const a=lo(e);if(r.variables={...s,...a},i)t.updateStyleVariables(a);else if(o){const l=Fs(r);t.setStyle(l)}}}const lo=e=>{const t={};for(const n in e)if(typeof e[n]=="object"&&e[n]!==null){const i=lo(e[n]);for(const o in i)t[o]=i==null?void 0:i[o]}else t[n]=e==null?void 0:e[n];return t};function Fs(e){let t=e;if("variables"in e){let n=JSON.stringify(e);const{variables:i}=e;for(const o in i)typeof i[o]=="number"?n=n.replaceAll(`["var","${o}"]`,i[o]):n=n.replaceAll(`["var","${o}"]`,`"${i[o]}"`);t=JSON.parse(n)}return t}var Ct=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var co="Expected a function",ho=NaN,js="[object Symbol]",Zs=/^\s+|\s+$/g,zs=/^[-+]0x[0-9a-f]+$/i,Xs=/^0b[01]+$/i,qs=/^0o[0-7]+$/i,Ys=parseInt,Ws=typeof Ct=="object"&&Ct&&Ct.Object===Object&&Ct,Gs=typeof self=="object"&&self&&self.Object===Object&&self,Js=Ws||Gs||Function("return this")(),Ks=Object.prototype,Qs=Ks.toString,ta=Math.max,ea=Math.min,Gn=function(){return Js.Date.now()};function na(e,t,n){var i,o,r,s,a,l,u=0,c=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(co);t=po(t)||0,qe(n)&&(c=!!n.leading,d="maxWait"in n,r=d?ta(po(n.maxWait)||0,t):r,p="trailing"in n?!!n.trailing:p);function f(b){var M=i,J=o;return i=o=void 0,u=b,s=e.apply(J,M),s}function g(b){return u=b,a=setTimeout(L,t),c?f(b):s}function y(b){var M=b-l,J=b-u,Z=t-M;return d?ea(Z,r-J):Z}function R(b){var M=b-l,J=b-u;return l===void 0||M>=t||M<0||d&&J>=r}function L(){var b=Gn();if(R(b))return V(b);a=setTimeout(L,y(b))}function V(b){return a=void 0,p&&i?f(b):(i=o=void 0,s)}function et(){a!==void 0&&clearTimeout(a),u=0,i=l=o=a=void 0}function G(){return a===void 0?s:V(Gn())}function nt(){var b=Gn(),M=R(b);if(i=arguments,o=this,l=b,M){if(a===void 0)return g(l);if(d)return a=setTimeout(L,t),f(l)}return a===void 0&&(a=setTimeout(L,t)),s}return nt.cancel=et,nt.flush=G,nt}function ia(e,t,n){var i=!0,o=!0;if(typeof e!="function")throw new TypeError(co);return qe(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),na(e,t,{leading:i,maxWait:t,trailing:o})}function qe(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function oa(e){return!!e&&typeof e=="object"}function ra(e){return typeof e=="symbol"||oa(e)&&Qs.call(e)==js}function po(e){if(typeof e=="number")return e;if(ra(e))return ho;if(qe(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=qe(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Zs,"");var n=Xs.test(e);return n||qs.test(e)?Ys(e.slice(2),n?2:8):zs.test(e)?ho:+e}var sa=ia;const fo=uo(sa);class go extends it{constructor(){super();O(this,we);O(this,Gt,{});O(this,be,null);O(this,ve);O(this,Ye,"");O(this,We,"");this.layer=null,this.unstyled=!1,this.noShadow=!1,this.layerConfig=null,this.throttleDataChange=fo(j(this,we,ei),1e3)}updated(n){if(n.has("layerConfig")){const i=this.layerConfig.type==="style"||this.layerConfig.style?100:1e3;this.throttleDataChange=fo(j(this,we,ei),i),this.requestUpdate()}}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){_e(this,be,Ms(this.layer,this.layerConfig)),customElements.get("eox-jsonform")||console.error("Please import @eox/jsonform in order to use layerconfig");const n={disable_edit_json:!0,disable_collapse:!0,disable_properties:!0};return E`
|
|
71
71
|
<style>
|
|
72
|
-
${
|
|
73
|
-
${!this.unstyled&&
|
|
72
|
+
${D(this,Ye)}
|
|
73
|
+
${!this.unstyled&&D(this,We)}
|
|
74
74
|
</style>
|
|
75
|
-
${
|
|
75
|
+
${K(this.layerConfig,()=>E`
|
|
76
76
|
<!-- Render a JSON form for layer configuration -->
|
|
77
77
|
<eox-jsonform
|
|
78
78
|
.schema=${this.layerConfig.schema}
|
|
79
|
-
.value=${
|
|
80
|
-
.options=${
|
|
81
|
-
@change=${this.
|
|
79
|
+
.value=${D(this,be)}
|
|
80
|
+
.options=${n}
|
|
81
|
+
@change=${this.throttleDataChange}
|
|
82
82
|
></eox-jsonform>
|
|
83
83
|
`)}
|
|
84
|
-
`}}
|
|
84
|
+
`}}Gt=new WeakMap,be=new WeakMap,ve=new WeakMap,we=new WeakSet,ei=function(n){_e(this,Gt,n.detail),this.layerConfig.type==="style"||this.layerConfig.style?"setStyle"in this.layer||"updateStyleVariables"in this.layer?Us(D(this,Gt),this.layer,this.layerConfig):console.error(`Layer type ${this.layer.get("type")??""} does not support styles configuration`):(_e(this,ve,ks(D(this,Gt),D(this,ve),this)),this.requestUpdate())},Ye=new WeakMap,We=new WeakMap,k(go,"properties",{layer:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},layerConfig:{attribute:!1}}),customElements.define("eox-layercontrol-layerconfig",go);class mo extends it{constructor(){super();O(this,Ge);O(this,Je,"");O(this,Ke,"");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"),E`
|
|
85
85
|
<style>
|
|
86
|
-
${
|
|
87
|
-
${!this.unstyled&&
|
|
86
|
+
${D(this,Je)}
|
|
87
|
+
${!this.unstyled&&D(this,Ke)}
|
|
88
88
|
</style>
|
|
89
|
-
${
|
|
89
|
+
${K(this.layerDatetime,()=>E`
|
|
90
90
|
<!-- Render a Timecontrol for layer date time -->
|
|
91
91
|
<eox-timecontrol
|
|
92
92
|
?unstyled=${this.unstyled}
|
|
@@ -97,10 +97,10 @@
|
|
|
97
97
|
.controlValues=${this.layerDatetime.controlValues}
|
|
98
98
|
.controlProperty=${void 0}
|
|
99
99
|
current-step=${this.layerDatetime.currentStep}
|
|
100
|
-
@stepchange=${
|
|
100
|
+
@stepchange=${j(this,Ge,Mo)}
|
|
101
101
|
></eox-timecontrol>
|
|
102
102
|
`)}
|
|
103
|
-
`}}
|
|
103
|
+
`}}Ge=new WeakSet,Mo=function(n){this.dispatchEvent(new CustomEvent("datetime:updated",{bubbles:!0,detail:{datetime:n.detail.currentStep,layer:this.layer}})),this.layerDatetime.currentStep=n.detail.currentStep,this.requestUpdate()},Je=new WeakMap,Ke=new WeakMap,k(mo,"properties",{unstyled:{type:Boolean},noShadow:{type:Boolean},layerDatetime:{attribute:!1},layer:{attribute:!1}}),customElements.define("eox-layercontrol-layer-datetime",mo);class yo extends it{constructor(){super();O(this,xe,n=>(this.selectedTab===n||this.toolsAsList)&&"highlighted");O(this,Qe,`
|
|
104
104
|
.tabbed figure {
|
|
105
105
|
margin: 0;
|
|
106
106
|
}
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
.tabbed label.highlighted {
|
|
121
121
|
background: lightgrey;
|
|
122
122
|
}
|
|
123
|
-
`);
|
|
123
|
+
`);O(this,tn,`
|
|
124
124
|
.listed {
|
|
125
125
|
background: #ffffff !important;
|
|
126
126
|
display: flex;
|
|
@@ -146,21 +146,21 @@
|
|
|
146
146
|
background: #00417011;
|
|
147
147
|
border-top: 1px solid #0041701a;
|
|
148
148
|
}
|
|
149
|
-
`);this.actions=[],this.selectedTab=0,this.tabs=[],this.unstyled=!1,this.noShadow=!1,this.
|
|
149
|
+
`);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 n=this.tabs,i=this.actions,o=i.length+n.length>1;return E`
|
|
150
150
|
<style>
|
|
151
|
-
${
|
|
152
|
-
${!this.unstyled&&
|
|
151
|
+
${D(this,Qe)}
|
|
152
|
+
${!this.unstyled&&D(this,tn)}
|
|
153
153
|
</style>
|
|
154
154
|
<div class="tabbed">
|
|
155
155
|
<!-- Navigation for tabs and actions -->
|
|
156
|
-
${
|
|
156
|
+
${K(o,()=>E`
|
|
157
157
|
<nav>
|
|
158
|
-
${
|
|
158
|
+
${K(!this.toolsAsList,()=>E`
|
|
159
159
|
<div>
|
|
160
160
|
<!-- Labels for tabs -->
|
|
161
|
-
${
|
|
161
|
+
${Xe(n,(r,s)=>E`
|
|
162
162
|
<label
|
|
163
|
-
class=${
|
|
163
|
+
class=${D(this,xe).call(this,s)}
|
|
164
164
|
@click=${()=>this.selectedTab=s}
|
|
165
165
|
>
|
|
166
166
|
<!-- Customizable icon for each tab -->
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
</div>
|
|
171
171
|
<div>
|
|
172
172
|
<!-- Icons for actions -->
|
|
173
|
-
${
|
|
173
|
+
${Xe(i,r=>E`
|
|
174
174
|
<span>
|
|
175
175
|
<!-- Customizable icon for each action -->
|
|
176
176
|
<slot name=${`${r}-icon`}>${r}</slot>
|
|
@@ -182,21 +182,21 @@
|
|
|
182
182
|
`)}
|
|
183
183
|
<figure>
|
|
184
184
|
<!-- Content for each tab -->
|
|
185
|
-
${
|
|
186
|
-
${
|
|
185
|
+
${Xe(n,(r,s)=>E`
|
|
186
|
+
${K(this.toolsAsList,()=>E`
|
|
187
187
|
<label class="listed">
|
|
188
188
|
<!-- Customizable icon for each tab -->
|
|
189
189
|
<slot name=${`${r}-icon`}>${r}</slot>
|
|
190
190
|
</label>
|
|
191
191
|
`)}
|
|
192
|
-
<div class="tab ${
|
|
192
|
+
<div class="tab ${D(this,xe).call(this,s)}">
|
|
193
193
|
<!-- Content slot for each tab -->
|
|
194
194
|
<slot name=${`${r}-content`}>${r}</slot>
|
|
195
195
|
</div>
|
|
196
196
|
`)}
|
|
197
197
|
</figure>
|
|
198
198
|
</div>
|
|
199
|
-
`}}
|
|
199
|
+
`}}xe=new WeakMap,Qe=new WeakMap,tn=new WeakMap,k(yo,"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",yo);const aa=`
|
|
200
200
|
button,
|
|
201
201
|
.button {
|
|
202
202
|
/* TODO: why does this only work here and not from :root? */
|
|
@@ -320,7 +320,7 @@ button.smallest.icon::before {
|
|
|
320
320
|
width: 16px;
|
|
321
321
|
padding: 0px;
|
|
322
322
|
}
|
|
323
|
-
`,
|
|
323
|
+
`,la=`
|
|
324
324
|
input[type=radio] {
|
|
325
325
|
appearance: none;
|
|
326
326
|
-webkit-appearance: none;
|
|
@@ -348,7 +348,7 @@ input[type=radio]:checked:after {
|
|
|
348
348
|
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");
|
|
349
349
|
|
|
350
350
|
}
|
|
351
|
-
`,
|
|
351
|
+
`,bo=`
|
|
352
352
|
input[type=checkbox] {
|
|
353
353
|
appearance: none;
|
|
354
354
|
-webkit-appearance: none;
|
|
@@ -371,7 +371,7 @@ input[type=checkbox]:checked:after {
|
|
|
371
371
|
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");
|
|
372
372
|
|
|
373
373
|
}
|
|
374
|
-
`,
|
|
374
|
+
`,ua=`
|
|
375
375
|
input[type="range"] {
|
|
376
376
|
-webkit-appearance: none;
|
|
377
377
|
width: 90%;
|
|
@@ -448,13 +448,13 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
448
448
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
449
449
|
border: 0;
|
|
450
450
|
}
|
|
451
|
-
`;class
|
|
451
|
+
`;class vo extends it{constructor(){super();k(this,"_removeButton",()=>Ls(this));k(this,"_sortButton",()=>Bs(this.unstyled));k(this,"_button",n=>Hs(n,this.unstyled));k(this,"_getDefaultTools",()=>{var n;return E`
|
|
452
452
|
<div slot="info-content">
|
|
453
|
-
${
|
|
453
|
+
${Vs(this.layer.get("description"))}
|
|
454
454
|
</div>
|
|
455
455
|
<div slot="datetime-content">
|
|
456
456
|
<!-- Layer datetime -->
|
|
457
|
-
${
|
|
457
|
+
${K(this.layer.get("layerDatetime"),()=>E`
|
|
458
458
|
<eox-layercontrol-layer-datetime
|
|
459
459
|
slot="datetime-content"
|
|
460
460
|
.noShadow=${!0}
|
|
@@ -472,13 +472,13 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
472
472
|
min="0"
|
|
473
473
|
max="1"
|
|
474
474
|
step="0.01"
|
|
475
|
-
value=${
|
|
475
|
+
value=${ao((n=this.layer)==null?void 0:n.getOpacity())}
|
|
476
476
|
@input=${i=>this.layer.setOpacity(parseFloat(i.target.value))}
|
|
477
477
|
/>
|
|
478
478
|
</div>
|
|
479
479
|
<div slot="config-content">
|
|
480
480
|
<!-- Layer configuration -->
|
|
481
|
-
${
|
|
481
|
+
${K(this.layer.get("layerConfig"),()=>E`
|
|
482
482
|
<eox-layercontrol-layerconfig
|
|
483
483
|
slot="config-content"
|
|
484
484
|
.layer=${this.layer}
|
|
@@ -491,11 +491,11 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
491
491
|
</div>
|
|
492
492
|
<div slot="remove-icon">${this._removeButton()}</div>
|
|
493
493
|
<div slot="sort-icon">${this._sortButton()}</div>
|
|
494
|
-
`});
|
|
495
|
-
${
|
|
496
|
-
${
|
|
497
|
-
${
|
|
498
|
-
${
|
|
494
|
+
`});O(this,en,"");O(this,nn,`
|
|
495
|
+
${aa}
|
|
496
|
+
${la}
|
|
497
|
+
${bo}
|
|
498
|
+
${ua}
|
|
499
499
|
.drag-handle {
|
|
500
500
|
cursor: n-resize;
|
|
501
501
|
}
|
|
@@ -597,42 +597,42 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
597
597
|
[slot=opacity-content] {
|
|
598
598
|
padding: 12px 6px;
|
|
599
599
|
}
|
|
600
|
-
`);this.layer=null,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.
|
|
600
|
+
`);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 n=Is(this.tools,this.layer),i=Ns(this.tools,this.layer),o=this[`_${n==null?void 0:n[0]}Button`]?this[`_${n==null?void 0:n[0]}Button`]():P,r=((l=this.tools)==null?void 0:l.length)===1?`${this.tools[0]}-icon`:"",s=n==null?void 0:n.length,a=i==null?void 0:i.length;return E`
|
|
601
601
|
<style>
|
|
602
|
-
${
|
|
603
|
-
${!this.unstyled&&
|
|
602
|
+
${D(this,en)}
|
|
603
|
+
${!this.unstyled&&D(this,nn)}
|
|
604
604
|
</style>
|
|
605
|
-
${
|
|
606
|
-
${
|
|
605
|
+
${K(s+a>0,()=>E`
|
|
606
|
+
${K(s===1&&a===0,()=>E`
|
|
607
607
|
<div class="single-action-container">
|
|
608
608
|
<div class="single-action">${o}</div>
|
|
609
609
|
</div>
|
|
610
610
|
`,()=>E`
|
|
611
611
|
<details
|
|
612
612
|
class="tools"
|
|
613
|
-
open=${this.layer.get("layerControlToolsExpand")||
|
|
613
|
+
open=${this.layer.get("layerControlToolsExpand")||P}
|
|
614
614
|
>
|
|
615
615
|
<summary>
|
|
616
616
|
<button class="icon ${r}">Tools</button>
|
|
617
617
|
</summary>
|
|
618
618
|
<eox-layercontrol-tools-items
|
|
619
|
-
class="${this.
|
|
619
|
+
class="${this.toolsAsList?"tools-list":"tools-tab"}"
|
|
620
620
|
.noShadow=${!1}
|
|
621
|
-
.actions=${
|
|
621
|
+
.actions=${n}
|
|
622
622
|
.tabs=${i}
|
|
623
623
|
.unstyled=${this.unstyled}
|
|
624
|
-
.
|
|
624
|
+
.toolsAsList=${this.toolsAsList}
|
|
625
625
|
>
|
|
626
626
|
<!-- Rendering tabs and content -->
|
|
627
|
-
${
|
|
627
|
+
${Xe(i,u=>this._button(u))}
|
|
628
628
|
<!-- Including default tools -->
|
|
629
629
|
${this._getDefaultTools()}
|
|
630
630
|
</eox-layercontrol-tools-items>
|
|
631
631
|
</details>
|
|
632
632
|
`)}
|
|
633
633
|
`)}
|
|
634
|
-
`}}
|
|
635
|
-
${
|
|
634
|
+
`}}en=new WeakMap,nn=new WeakMap,k(vo,"properties",{layer:{attribute:!1},tools:{attribute:!1},unstyled:{type:Boolean},noShadow:{type:Boolean},toolsAsList:{type:Boolean}}),customElements.define("eox-layercontrol-layer-tools",vo);const da=e=>{const t=()=>{const n=Ds(e.layer,e.map,e.showLayerZoomState);let i=!1;!n&&e.currLayerVisibilityBasedOnZoom?(e.currLayerVisibilityBasedOnZoom=!1,i=!0):n&&!e.currLayerVisibilityBasedOnZoom&&(e.currLayerVisibilityBasedOnZoom=!0,i=!0),i&&(e.requestUpdate(),e.dispatchEvent(new CustomEvent("change:resolution",{bubbles:!0})))};oo(e.layer,e.showLayerZoomState)&&(t(),e.map.getView().on("change:resolution",()=>t()))},ca=(e,t)=>{const n=t.layer;n.setVisible(e.target.checked),e.target.checked&&n.get("layerControlExclusive")&&t.closest(".layers > ul").querySelectorAll("eox-layercontrol-layer").forEach(o=>{var r;o.layer!==n&&((r=o.layer)!=null&&r.get("layerControlExclusive"))&&(o.layer.setVisible(!1),o.requestUpdate())}),t.dispatchEvent(new CustomEvent("changed",{bubbles:!0,detail:n})),t.requestUpdate()};class wo extends it{constructor(){super();O(this,Tt);k(this,"currLayerVisibilityBasedOnZoom",!0);O(this,on,"");O(this,rn,`
|
|
635
|
+
${bo}
|
|
636
636
|
eox-layercontrol-layer {
|
|
637
637
|
width: 100%;
|
|
638
638
|
}
|
|
@@ -672,25 +672,25 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
672
672
|
[data-type=draw] .title::before {
|
|
673
673
|
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");
|
|
674
674
|
}
|
|
675
|
-
`);this.layer=null,this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.
|
|
675
|
+
`);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(){da(this)}render(){var l;const n=this.layer.getVisible(),i=n?"visible":"",o=this.currLayerVisibilityBasedOnZoom?"":"zoom-state-invisible",r=j(this,Tt,gn).call(this,"layerControlDisable")?"disabled":"",s=j(this,Tt,gn).call(this,"layerControlExclusive")?"radio":"checkbox",a=((l=this.tools)==null?void 0:l.length)>0;return E`
|
|
676
676
|
<style>
|
|
677
|
-
${
|
|
678
|
-
${!this.unstyled&&
|
|
677
|
+
${D(this,on)}
|
|
678
|
+
${!this.unstyled&&D(this,rn)}
|
|
679
679
|
</style>
|
|
680
|
-
${
|
|
680
|
+
${K(this.layer,()=>E`
|
|
681
681
|
<!-- Render the layer -->
|
|
682
682
|
<div class="layer ${i} ${o}">
|
|
683
683
|
<label class="drag-handle ${r}">
|
|
684
684
|
<!-- Input element for layer visibility -->
|
|
685
685
|
<input
|
|
686
686
|
type=${s}
|
|
687
|
-
.checked=${
|
|
688
|
-
@click=${
|
|
687
|
+
.checked=${ao(n)}
|
|
688
|
+
@click=${j(this,Tt,Io)}
|
|
689
689
|
/>
|
|
690
690
|
|
|
691
691
|
<!-- Layer title -->
|
|
692
|
-
<span class="title">${
|
|
693
|
-
${
|
|
692
|
+
<span class="title">${j(this,Tt,gn).call(this,this.titleProperty)}</span>
|
|
693
|
+
${K(a,()=>E`<span class="tools-placeholder"></span>`)}
|
|
694
694
|
</label>
|
|
695
695
|
</div>
|
|
696
696
|
|
|
@@ -700,10 +700,10 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
700
700
|
.layer=${this.layer}
|
|
701
701
|
.tools=${this.tools}
|
|
702
702
|
.unstyled=${this.unstyled}
|
|
703
|
-
.
|
|
703
|
+
.toolsAsList=${this.toolsAsList}
|
|
704
704
|
></eox-layercontrol-layer-tools>
|
|
705
705
|
`)}
|
|
706
|
-
`}}
|
|
706
|
+
`}}Tt=new WeakSet,gn=function(n){var i;return(i=this.layer)==null?void 0:i.get(n)},Io=function(n){ca(n,this)},on=new WeakMap,rn=new WeakMap,k(wo,"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",wo);class xo extends it{constructor(){super();O(this,sn,"");O(this,an,`
|
|
707
707
|
details summary {
|
|
708
708
|
cursor: pointer;
|
|
709
709
|
display: flex;
|
|
@@ -727,15 +727,15 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
727
727
|
details[data-children-length="0"] summary::before {
|
|
728
728
|
display: none;
|
|
729
729
|
}
|
|
730
|
-
`);this.group=null,this.idProperty="id",this.map=null,this.titleProperty="title",this.showLayerZoomState=!1,this.tools=[],this.unstyled=!1,this.noShadow=!1,this.
|
|
730
|
+
`);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 o,r;const n=!!((o=this.group)!=null&&o.get("layerControlExpand")),i=(r=so(this.group.getLayers()))==null?void 0:r.length;return E`
|
|
731
731
|
<style>
|
|
732
|
-
${
|
|
733
|
-
${!this.unstyled&&
|
|
732
|
+
${D(this,sn)}
|
|
733
|
+
${!this.unstyled&&D(this,an)}
|
|
734
734
|
</style>
|
|
735
|
-
${
|
|
735
|
+
${K(this.group,()=>E`
|
|
736
736
|
<!-- Render the details element with the layer control -->
|
|
737
737
|
<details
|
|
738
|
-
open=${
|
|
738
|
+
open=${n||P}
|
|
739
739
|
data-children-length=${i}
|
|
740
740
|
>
|
|
741
741
|
<summary>
|
|
@@ -748,7 +748,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
748
748
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
749
749
|
.tools=${this.tools}
|
|
750
750
|
.unstyled=${this.unstyled}
|
|
751
|
-
.
|
|
751
|
+
.toolsAsList=${this.toolsAsList}
|
|
752
752
|
@changed=${()=>this.requestUpdate()}
|
|
753
753
|
></eox-layercontrol-layer>
|
|
754
754
|
</summary>
|
|
@@ -763,12 +763,12 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
763
763
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
764
764
|
.tools=${this.tools}
|
|
765
765
|
.unstyled=${this.unstyled}
|
|
766
|
-
.
|
|
766
|
+
.toolsAsList=${this.toolsAsList}
|
|
767
767
|
@changed=${()=>this.requestUpdate()}
|
|
768
768
|
></eox-layercontrol-layer-list>
|
|
769
769
|
</details>
|
|
770
770
|
`)}
|
|
771
|
-
`}}
|
|
771
|
+
`}}sn=new WeakMap,an=new WeakMap,k(xo,"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",xo);var ha="Expected a function",Eo=NaN,pa="[object Symbol]",fa=/^\s+|\s+$/g,ga=/^[-+]0x[0-9a-f]+$/i,ma=/^0b[01]+$/i,ya=/^0o[0-7]+$/i,ba=parseInt,va=typeof Ct=="object"&&Ct&&Ct.Object===Object&&Ct,wa=typeof self=="object"&&self&&self.Object===Object&&self,xa=va||wa||Function("return this")(),Ea=Object.prototype,Sa=Ea.toString,$a=Math.max,Aa=Math.min,Jn=function(){return xa.Date.now()};function _a(e,t,n){var i,o,r,s,a,l,u=0,c=!1,d=!1,p=!0;if(typeof e!="function")throw new TypeError(ha);t=So(t)||0,Kn(n)&&(c=!!n.leading,d="maxWait"in n,r=d?$a(So(n.maxWait)||0,t):r,p="trailing"in n?!!n.trailing:p);function f(b){var M=i,J=o;return i=o=void 0,u=b,s=e.apply(J,M),s}function g(b){return u=b,a=setTimeout(L,t),c?f(b):s}function y(b){var M=b-l,J=b-u,Z=t-M;return d?Aa(Z,r-J):Z}function R(b){var M=b-l,J=b-u;return l===void 0||M>=t||M<0||d&&J>=r}function L(){var b=Jn();if(R(b))return V(b);a=setTimeout(L,y(b))}function V(b){return a=void 0,p&&i?f(b):(i=o=void 0,s)}function et(){a!==void 0&&clearTimeout(a),u=0,i=l=o=a=void 0}function G(){return a===void 0?s:V(Jn())}function nt(){var b=Jn(),M=R(b);if(i=arguments,o=this,l=b,M){if(a===void 0)return g(l);if(d)return a=setTimeout(L,t),f(l)}return a===void 0&&(a=setTimeout(L,t)),s}return nt.cancel=et,nt.flush=G,nt}function Kn(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ca(e){return!!e&&typeof e=="object"}function Ta(e){return typeof e=="symbol"||Ca(e)&&Sa.call(e)==pa}function So(e){if(typeof e=="number")return e;if(Ta(e))return Eo;if(Kn(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Kn(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(fa,"");var n=ma.test(e);return n||ya.test(e)?ba(e.slice(2),n?2:8):ga.test(e)?Eo:+e}var Pa=_a;const Oa=uo(Pa),Da=e=>{const{layers:t,idProperty:n,titleProperty:i,renderRoot:o}=e,r=Oa(()=>{e.requestUpdate(),e.dispatchEvent(new CustomEvent("changed",{bubbles:!0}))},50),s=()=>r();if(t&&(t.hasListener("change:length")&&(t==null||t.un("change:length",s)),t.on("change:length",s),t)){const a=o.querySelector("ul");Os(t,n,i,e),Ps(a,t,n,e)}};class $o extends it{constructor(){super();O(this,ln,"");O(this,un,`
|
|
772
772
|
ul {
|
|
773
773
|
padding: 0;
|
|
774
774
|
margin: 0;
|
|
@@ -796,17 +796,17 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
796
796
|
}
|
|
797
797
|
li.sortable-ghost {
|
|
798
798
|
}
|
|
799
|
-
`);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.
|
|
799
|
+
`);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(){Da(this)}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const n=this.layers?so(this.layers).reverse():[];return E`
|
|
800
800
|
<style>
|
|
801
|
-
${
|
|
802
|
-
${!this.unstyled&&
|
|
801
|
+
${D(this,ln)}
|
|
802
|
+
${!this.unstyled&&D(this,un)}
|
|
803
803
|
</style>
|
|
804
804
|
<ul>
|
|
805
|
-
${
|
|
806
|
-
${
|
|
805
|
+
${K(this.layers,()=>E`
|
|
806
|
+
${sr(n,i=>i,i=>E`
|
|
807
807
|
<li
|
|
808
808
|
data-layer="${i.get(this.idProperty)}"
|
|
809
|
-
data-type="${
|
|
809
|
+
data-type="${Rs(i,this.map)}"
|
|
810
810
|
>
|
|
811
811
|
${i.getLayers?E`
|
|
812
812
|
<eox-layercontrol-layer-group
|
|
@@ -818,7 +818,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
818
818
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
819
819
|
.tools=${this.tools}
|
|
820
820
|
.unstyled=${this.unstyled}
|
|
821
|
-
.
|
|
821
|
+
.toolsAsList=${this.toolsAsList}
|
|
822
822
|
@changed=${()=>this.requestUpdate()}
|
|
823
823
|
>
|
|
824
824
|
</eox-layercontrol-layer-group>
|
|
@@ -831,7 +831,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
831
831
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
832
832
|
.tools=${this.tools}
|
|
833
833
|
.unstyled=${this.unstyled}
|
|
834
|
-
.
|
|
834
|
+
.toolsAsList=${this.toolsAsList}
|
|
835
835
|
@changed=${()=>this.requestUpdate()}
|
|
836
836
|
></eox-layercontrol-layer>
|
|
837
837
|
`}
|
|
@@ -839,7 +839,7 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
839
839
|
`)}
|
|
840
840
|
`)}
|
|
841
841
|
</ul>
|
|
842
|
-
`}}
|
|
842
|
+
`}}ln=new WeakMap,un=new WeakMap,k($o,"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",$o);const Ra=e=>{const t=e.querySelector("select[name=optional]"),n=t?t.value:null,i=Yn(e.layers.getArray(),"layerControlOptional",!0).find(o=>(o.get(e.idProperty)||o.ol_uid)===n);i==null||i.set("layerControlOptional",!1),i==null||i.setVisible(!0),e.dispatchEvent(new CustomEvent("changed",{bubbles:!0})),e.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(o=>o.requestUpdate()),e.requestUpdate()};class Ao extends it{constructor(){super();O(this,dn);this.idProperty="id",this.layers=null,this.titleProperty="title",this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const n=Yn(this.layers.getArray(),"layerControlOptional",!0);return E`
|
|
843
843
|
<!-- Label for the dropdown -->
|
|
844
844
|
<label for="optional">Optional layers</label>
|
|
845
845
|
|
|
@@ -851,19 +851,19 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
851
851
|
</option>
|
|
852
852
|
|
|
853
853
|
<!-- Mapping through filtered layers list to generate dropdown options -->
|
|
854
|
-
${
|
|
854
|
+
${n.map(i=>{const o=i.get(this.idProperty)||i.ol_uid,r=i.get(this.titleProperty),s=`layer ${i.get(this.idProperty)}`;return E` <option value="${o}">${r||s}</option> `})}
|
|
855
855
|
</select>
|
|
856
856
|
|
|
857
857
|
<!-- Button to handle adding layers -->
|
|
858
|
-
<button @click="${
|
|
859
|
-
`}}dn=new WeakSet,
|
|
858
|
+
<button @click="${j(this,dn,No)}">add</button>
|
|
859
|
+
`}}dn=new WeakSet,No=function(){Ra(this)},k(Ao,"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",Ao);const Ma=(e,t)=>{t.jsonInput=e.target.value,t.requestUpdate()},_o=e=>{const t=JSON.parse(`{"data":${Mi(e.jsonInput)}}`);Array.isArray(t.data)?t.data.forEach(n=>{e.eoxMap.addOrUpdateLayer(n)}):e.eoxMap.addOrUpdateLayer(t.data),e.jsonInput=null,e.requestUpdate()},Ia=(e,t)=>{t.urlInput=e.target.value,t.requestUpdate()};async function Na(e){const t=e.urlInput;if(e.wmsCapabilities=null,e.searchLoad=!0,e.requestUpdate(),!t)return!1;if(Dn(t)==="XYZ")return{Name:t};try{const n=await Kr(t);e.wmsCapabilities=n}catch{}finally{e.searchLoad=!1,e.requestUpdate()}return!1}const Ha=(e,t)=>{const{Name:n}=e,i=Dn(t.urlInput)||"XYZ",o={type:"Tile",properties:{id:n,title:n},source:{type:i,url:t.urlInput,params:{LAYERS:n}}};t.jsonInput=JSON.stringify(o)},La=(e,t)=>{t.open=e||null,t.urlInput=null,t.jsonInput=null,t.wmsCapabilities=null,t.requestUpdate()};class Co extends it{constructor(){super();O(this,W);k(this,"urlInput",null);k(this,"jsonInput",null);k(this,"open",null);k(this,"searchLoad",!1);k(this,"wmsCapabilities",null);O(this,cn,`
|
|
860
860
|
.eox-add-layer-main .open {
|
|
861
861
|
position: relative;
|
|
862
862
|
}
|
|
863
863
|
.eox-add-layer-main .close {
|
|
864
864
|
display: none;
|
|
865
865
|
}
|
|
866
|
-
`);
|
|
866
|
+
`);O(this,hn,`
|
|
867
867
|
.eox-add {
|
|
868
868
|
background: #f0f2f5;
|
|
869
869
|
border-top: 1px solid #0041701a;
|
|
@@ -996,23 +996,23 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
996
996
|
font-weight: bold;
|
|
997
997
|
display: inline-block;
|
|
998
998
|
}
|
|
999
|
-
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const
|
|
999
|
+
`);this.eoxMap=null,this.unstyled=!1,this.noShadow=!1}createRenderRoot(){return this.noShadow?this:super.createRenderRoot()}render(){const n=this.open?"open":"close",i=this.open==="url",o=this.open==="json",r=!Qr(this.urlInput)||this.searchLoad?!0:P;return E`
|
|
1000
1000
|
<style>
|
|
1001
|
-
${
|
|
1002
|
-
${!this.unstyled&&
|
|
1001
|
+
${D(this,cn)}
|
|
1002
|
+
${!this.unstyled&&D(this,hn)}
|
|
1003
1003
|
</style>
|
|
1004
1004
|
<div class="eox-add-layer-main">
|
|
1005
1005
|
<div class="eox-add-layer-col">
|
|
1006
1006
|
<!-- Tabbed interface for URL and JSON -->
|
|
1007
|
-
<ul class="eox-add-layer-tab ${
|
|
1007
|
+
<ul class="eox-add-layer-tab ${n}">
|
|
1008
1008
|
<li
|
|
1009
|
-
@click=${()=>
|
|
1009
|
+
@click=${()=>j(this,W,mn).call(this,"url")}
|
|
1010
1010
|
class="${i?"active":""}"
|
|
1011
1011
|
>
|
|
1012
1012
|
URL
|
|
1013
1013
|
</li>
|
|
1014
1014
|
<li
|
|
1015
|
-
@click=${()=>
|
|
1015
|
+
@click=${()=>j(this,W,mn).call(this,"json")}
|
|
1016
1016
|
class="${o?"active":""}"
|
|
1017
1017
|
>
|
|
1018
1018
|
JSON
|
|
@@ -1022,12 +1022,12 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1022
1022
|
<!-- Button to toggle tabs -->
|
|
1023
1023
|
<button
|
|
1024
1024
|
class="add-icon icon"
|
|
1025
|
-
@click=${()=>
|
|
1025
|
+
@click=${()=>j(this,W,mn).call(this,this.open?null:"url")}
|
|
1026
1026
|
>
|
|
1027
1027
|
${this.unstyled?"Add Layer":""}
|
|
1028
1028
|
</button>
|
|
1029
1029
|
</div>
|
|
1030
|
-
<div class="eox-add ${
|
|
1030
|
+
<div class="eox-add ${n}">
|
|
1031
1031
|
${i?E`
|
|
1032
1032
|
<!-- Input field for URL -->
|
|
1033
1033
|
<div class="eox-add-layer-col">
|
|
@@ -1036,14 +1036,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1036
1036
|
class="add-url"
|
|
1037
1037
|
placeholder="Add URL (WMS/XYZ)"
|
|
1038
1038
|
.value="${this.urlInput}"
|
|
1039
|
-
@input=${
|
|
1039
|
+
@input=${j(this,W,Ho)}
|
|
1040
1040
|
>
|
|
1041
1041
|
</input>
|
|
1042
1042
|
<!-- Search button for URL -->
|
|
1043
1043
|
<button
|
|
1044
1044
|
class="search-icon"
|
|
1045
1045
|
disabled=${r}
|
|
1046
|
-
@click=${
|
|
1046
|
+
@click=${j(this,W,Lo)}
|
|
1047
1047
|
>
|
|
1048
1048
|
${this.unstyled?"Search":""}
|
|
1049
1049
|
</button>
|
|
@@ -1057,50 +1057,50 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1057
1057
|
<!-- Button to add layer -->
|
|
1058
1058
|
<button
|
|
1059
1059
|
class="add-layer-icon icon"
|
|
1060
|
-
@click=${()=>
|
|
1060
|
+
@click=${()=>j(this,W,ni).call(this,s)}
|
|
1061
1061
|
>
|
|
1062
1062
|
${this.unstyled?"+":""}
|
|
1063
1063
|
</button>
|
|
1064
1064
|
</li>
|
|
1065
1065
|
`})}
|
|
1066
|
-
</ul>`:
|
|
1066
|
+
</ul>`:P}
|
|
1067
1067
|
`:E`
|
|
1068
1068
|
<!-- Textarea for JSON input -->
|
|
1069
1069
|
<textarea
|
|
1070
1070
|
class="add-layer-input"
|
|
1071
1071
|
placeholder="Please put a valid eox-map layer JSON."
|
|
1072
|
-
@input=${
|
|
1072
|
+
@input=${j(this,W,Vo)}
|
|
1073
1073
|
.value=${this.jsonInput}
|
|
1074
1074
|
></textarea>
|
|
1075
1075
|
|
|
1076
1076
|
<!-- Button to add JSON layer -->
|
|
1077
1077
|
<button
|
|
1078
1078
|
class="add-layer-icon json-add-layer"
|
|
1079
|
-
disabled=${
|
|
1080
|
-
@click=${
|
|
1079
|
+
disabled=${ts(this.jsonInput)?P:!0}
|
|
1080
|
+
@click=${j(this,W,Bo)}
|
|
1081
1081
|
>
|
|
1082
1082
|
${this.unstyled?"Add JSON":""}
|
|
1083
1083
|
</button>
|
|
1084
1084
|
`}
|
|
1085
1085
|
</div>
|
|
1086
1086
|
</div>
|
|
1087
|
-
`}}
|
|
1087
|
+
`}}W=new WeakSet,Ho=function(n){Ia(n,this)},Lo=async function(){const n=await Na(this);n&&j(this,W,ni).call(this,n)},ni=function(n){Ha(n,this),_o(this)},Bo=function(){_o(this)},Vo=function(n){Ma(n,this)},mn=function(n){La(n,this)},cn=new WeakMap,hn=new WeakMap,k(Co,"properties",{eoxMap:{attribute:!1,state:!0},unstyled:{type:Boolean},noShadow:{type:Boolean}}),customElements.define("eox-layercontrol-add-layers",Co);const Ba=(e,t)=>{if(t.requestUpdate(),e.target.tagName==="EOX-LAYERCONTROL-LAYER-TOOLS"){const n=t.renderRoot.querySelector("eox-layercontrol-optional-list");n==null||n.requestUpdate()}},Va=e=>{let t;return typeof e=="string"?t=document.querySelector(e):t=e,t},To=e=>{const t=Va(e.for);return t&&t.map!==e.map&&(e.map=t.map),t};class Qn extends it{constructor(){super();O(this,Jt);O(this,Pt);O(this,pn,"* { font-family: Roboto, sans-serif; }");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=To(this)}updated(n){n.has("for")&&(this.eoxMap=To(this))}get eoxMap(){return D(this,Pt)}set eoxMap(n){const i=D(this,Pt);_e(this,Pt,n),this.requestUpdate("eoxMap",i)}render(){var o,r,s;const n=(o=this.map)==null?void 0:o.getLayers().getArray(),i=n&&((r=Yn(n,"layerControlOptional",!0))==null?void 0:r.length)>0;return E`
|
|
1088
1088
|
<style>
|
|
1089
|
-
${!this.unstyled&&
|
|
1089
|
+
${!this.unstyled&&D(this,pn)}
|
|
1090
1090
|
${this.styleOverride}
|
|
1091
1091
|
</style>
|
|
1092
1092
|
|
|
1093
1093
|
<!-- Conditional rendering of add layers component -->
|
|
1094
|
-
${
|
|
1094
|
+
${K(this.addExternalLayers&&((s=D(this,Pt))==null?void 0:s.addOrUpdateLayer),()=>E`
|
|
1095
1095
|
<eox-layercontrol-add-layers
|
|
1096
1096
|
.noShadow=${!0}
|
|
1097
|
-
.eoxMap=${
|
|
1097
|
+
.eoxMap=${D(this,Pt)}
|
|
1098
1098
|
.unstyled=${this.unstyled}
|
|
1099
1099
|
></eox-layercontrol-add-layers>
|
|
1100
1100
|
`)}
|
|
1101
1101
|
|
|
1102
1102
|
<!-- Conditional rendering of layer list component -->
|
|
1103
|
-
${
|
|
1103
|
+
${K(this.map,()=>E`
|
|
1104
1104
|
<eox-layercontrol-layer-list
|
|
1105
1105
|
.noShadow=${!0}
|
|
1106
1106
|
class="layers"
|
|
@@ -1111,14 +1111,14 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1111
1111
|
.showLayerZoomState=${this.showLayerZoomState}
|
|
1112
1112
|
.tools=${this.tools}
|
|
1113
1113
|
.unstyled=${this.unstyled}
|
|
1114
|
-
.
|
|
1115
|
-
@changed=${
|
|
1116
|
-
@datetime:updated=${
|
|
1114
|
+
.toolsAsList=${this.toolsAsList}
|
|
1115
|
+
@changed=${j(this,Jt,ko)}
|
|
1116
|
+
@datetime:updated=${j(this,Jt,Uo)}
|
|
1117
1117
|
></eox-layercontrol-layer-list>
|
|
1118
1118
|
`)}
|
|
1119
1119
|
|
|
1120
1120
|
<!-- Conditional rendering of optional list component -->
|
|
1121
|
-
${
|
|
1121
|
+
${K(i,()=>E`
|
|
1122
1122
|
<eox-layercontrol-optional-list
|
|
1123
1123
|
.noShadow=${!0}
|
|
1124
1124
|
.idProperty=${this.idProperty}
|
|
@@ -1127,4 +1127,4 @@ input::-moz-focus-inner, input::-moz-focus-outer {
|
|
|
1127
1127
|
@changed=${()=>this.requestUpdate()}
|
|
1128
1128
|
></eox-layercontrol-optional-list>
|
|
1129
1129
|
`)}
|
|
1130
|
-
`}}
|
|
1130
|
+
`}}Pt=new WeakMap,Jt=new WeakSet,ko=function(n){Ba(n,this),this.dispatchEvent(new CustomEvent("layerchange",{detail:n.detail}))},Uo=function(n){this.dispatchEvent(new CustomEvent("datetime:updated",{detail:n.detail}))},pn=new WeakMap,k(Qn,"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",Qn),T.EOxLayerControl=Qn,Object.defineProperty(T,Symbol.toStringTag,{value:"Module"})});
|