@eox/layercontrol 0.6.2 → 0.6.3

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.
@@ -10,9 +10,9 @@
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var le;const Bt=window,ct=Bt.trustedTypes,Me=ct?ct.createPolicy("lit-html",{createHTML:n=>n}):void 0,Rt="$lit$",Y=`lit$${(Math.random()+"").slice(9)}$`,de="?"+Y,Vi=`<${de}>`,et=document,Ct=()=>et.createComment(""),$t=n=>n===null||typeof n!="object"&&typeof n!="function",Ne=Array.isArray,ke=n=>Ne(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",he=`[
14
- \f\r]`,At=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ve=/-->/g,Be=/>/g,it=RegExp(`>|${he}(?:([^\\s"'>=/]+)(${he}*=${he}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Re=/'/g,Ue=/"/g,Fe=/^(?:script|style|textarea|title)$/i,Bi=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),O=Bi(1),U=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),ze=new WeakMap,nt=et.createTreeWalker(et,129,null,!1),je=(n,t)=>{const e=n.length-1,i=[];let r,o=t===2?"<svg>":"",a=At;for(let s=0;s<e;s++){const d=n[s];let c,u,p=-1,m=0;for(;m<d.length&&(a.lastIndex=m,u=a.exec(d),u!==null);)m=a.lastIndex,a===At?u[1]==="!--"?a=Ve:u[1]!==void 0?a=Be:u[2]!==void 0?(Fe.test(u[2])&&(r=RegExp("</"+u[2],"g")),a=it):u[3]!==void 0&&(a=it):a===it?u[0]===">"?(a=r??At,p=-1):u[1]===void 0?p=-2:(p=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?it:u[3]==='"'?Ue:Re):a===Ue||a===Re?a=it:a===Ve||a===Be?a=At:(a=it,r=void 0);const f=a===it&&n[s+1].startsWith("/>")?" ":"";o+=a===At?d+Vi:p>=0?(i.push(c),d.slice(0,p)+Rt+d.slice(p)+Y+f):d+Y+(p===-2?(i.push(void 0),s):f)}const l=o+(n[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Me!==void 0?Me.createHTML(l):l,i]};class xt{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,a=0;const l=t.length-1,s=this.parts,[d,c]=je(t,e);if(this.el=xt.createElement(d,i),nt.currentNode=this.el.content,e===2){const u=this.el.content,p=u.firstChild;p.remove(),u.append(...p.childNodes)}for(;(r=nt.nextNode())!==null&&s.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const u=[];for(const p of r.getAttributeNames())if(p.endsWith(Rt)||p.startsWith(Y)){const m=c[a++];if(u.push(p),m!==void 0){const f=r.getAttribute(m.toLowerCase()+Rt).split(Y),v=/([.?@])?(.*)/.exec(m);s.push({type:1,index:o,name:v[2],strings:f,ctor:v[1]==="."?Ye:v[1]==="?"?We:v[1]==="@"?Ge:St})}else s.push({type:6,index:o})}for(const p of u)r.removeAttribute(p)}if(Fe.test(r.tagName)){const u=r.textContent.split(Y),p=u.length-1;if(p>0){r.textContent=ct?ct.emptyScript:"";for(let m=0;m<p;m++)r.append(u[m],Ct()),nt.nextNode(),s.push({type:2,index:++o});r.append(u[p],Ct())}}}else if(r.nodeType===8)if(r.data===de)s.push({type:2,index:o});else{let u=-1;for(;(u=r.data.indexOf(Y,u+1))!==-1;)s.push({type:7,index:o}),u+=Y.length-1}o++}}static createElement(t,e){const i=et.createElement("template");return i.innerHTML=t,i}}function rt(n,t,e=n,i){var r,o,a,l;if(t===U)return t;let s=i!==void 0?(r=e._$Co)===null||r===void 0?void 0:r[i]:e._$Cl;const d=$t(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==d&&((o=s==null?void 0:s._$AO)===null||o===void 0||o.call(s,!1),d===void 0?s=void 0:(s=new d(n),s._$AT(n,e,i)),i!==void 0?((a=(l=e)._$Co)!==null&&a!==void 0?a:l._$Co=[])[i]=s:e._$Cl=s),s!==void 0&&(t=rt(n,s._$AS(n,t.values),s,i)),t}class Xe{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:r}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:et).importNode(i,!0);nt.currentNode=o;let a=nt.nextNode(),l=0,s=0,d=r[0];for(;d!==void 0;){if(l===d.index){let c;d.type===2?c=new pt(a,a.nextSibling,this,t):d.type===1?c=new d.ctor(a,d.name,d.strings,this,t):d.type===6&&(c=new Ze(a,this,t)),this._$AV.push(c),d=r[++s]}l!==(d==null?void 0:d.index)&&(a=nt.nextNode(),l++)}return nt.currentNode=et,o}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class pt{constructor(t,e,i,r){var o;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cp=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=rt(this,t,e),$t(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==U&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ke(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==_&&$t(this._$AH)?this._$AA.nextSibling.data=t:this.$(et.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=xt.createElement(r.h,this.options)),r);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const a=new Xe(o,this),l=a.u(this.options);a.v(i),this.$(l),this._$AH=a}}_$AC(t){let e=ze.get(t.strings);return e===void 0&&ze.set(t.strings,e=new xt(t)),e}T(t){Ne(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new pt(this.k(Ct()),this.k(Ct()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class St{constructor(t,e,i,r,o){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const o=this.strings;let a=!1;if(o===void 0)t=rt(this,t,e,0),a=!$t(t)||t!==this._$AH&&t!==U,a&&(this._$AH=t);else{const l=t;let s,d;for(t=o[0],s=0;s<o.length-1;s++)d=rt(this,l[i+s],e,s),d===U&&(d=this._$AH[s]),a||(a=!$t(d)||d!==this._$AH[s]),d===_?t=_:t!==_&&(t+=(d??"")+o[s+1]),this._$AH[s]=d}a&&!r&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ye extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const Ri=ct?ct.emptyScript:"";class We extends St{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,Ri):this.element.removeAttribute(this.name)}}class Ge extends St{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=rt(this,t,e,0))!==null&&i!==void 0?i:_)===U)return;const r=this._$AH,o=t===_&&r!==_||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==_&&(r===_||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Ze{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){rt(this,t)}}const Ui={O:Rt,P:Y,A:de,C:1,M:je,L:Xe,D:ke,R:rt,I:pt,V:St,H:We,N:Ge,U:Ye,F:Ze},qe=Bt.litHtmlPolyfillSupport;qe==null||qe(xt,pt),((le=Bt.litHtmlVersions)!==null&&le!==void 0?le:Bt.litHtmlVersions=[]).push("2.7.4");const Fi=(n,t,e)=>{var i,r;const o=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let a=o._$litPart$;if(a===void 0){const l=(r=e==null?void 0:e.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=a=new pt(t.insertBefore(Ct(),l),l,void 0,e??{})}return a._$AI(n),a};/**
13
+ */var le;const Bt=window,ct=Bt.trustedTypes,Me=ct?ct.createPolicy("lit-html",{createHTML:n=>n}):void 0,Rt="$lit$",Y=`lit$${(Math.random()+"").slice(9)}$`,de="?"+Y,Vi=`<${de}>`,et=document,Ct=()=>et.createComment(""),xt=n=>n===null||typeof n!="object"&&typeof n!="function",Ne=Array.isArray,ke=n=>Ne(n)||typeof(n==null?void 0:n[Symbol.iterator])=="function",he=`[
14
+ \f\r]`,$t=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ve=/-->/g,Be=/>/g,it=RegExp(`>|${he}(?:([^\\s"'>=/]+)(${he}*=${he}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Re=/'/g,Ue=/"/g,Fe=/^(?:script|style|textarea|title)$/i,Bi=n=>(t,...e)=>({_$litType$:n,strings:t,values:e}),O=Bi(1),U=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),ze=new WeakMap,nt=et.createTreeWalker(et,129,null,!1),je=(n,t)=>{const e=n.length-1,i=[];let r,o=t===2?"<svg>":"",a=$t;for(let s=0;s<e;s++){const d=n[s];let c,u,p=-1,m=0;for(;m<d.length&&(a.lastIndex=m,u=a.exec(d),u!==null);)m=a.lastIndex,a===$t?u[1]==="!--"?a=Ve:u[1]!==void 0?a=Be:u[2]!==void 0?(Fe.test(u[2])&&(r=RegExp("</"+u[2],"g")),a=it):u[3]!==void 0&&(a=it):a===it?u[0]===">"?(a=r??$t,p=-1):u[1]===void 0?p=-2:(p=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?it:u[3]==='"'?Ue:Re):a===Ue||a===Re?a=it:a===Ve||a===Be?a=$t:(a=it,r=void 0);const f=a===it&&n[s+1].startsWith("/>")?" ":"";o+=a===$t?d+Vi:p>=0?(i.push(c),d.slice(0,p)+Rt+d.slice(p)+Y+f):d+Y+(p===-2?(i.push(void 0),s):f)}const l=o+(n[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Me!==void 0?Me.createHTML(l):l,i]};class At{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let o=0,a=0;const l=t.length-1,s=this.parts,[d,c]=je(t,e);if(this.el=At.createElement(d,i),nt.currentNode=this.el.content,e===2){const u=this.el.content,p=u.firstChild;p.remove(),u.append(...p.childNodes)}for(;(r=nt.nextNode())!==null&&s.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const u=[];for(const p of r.getAttributeNames())if(p.endsWith(Rt)||p.startsWith(Y)){const m=c[a++];if(u.push(p),m!==void 0){const f=r.getAttribute(m.toLowerCase()+Rt).split(Y),v=/([.?@])?(.*)/.exec(m);s.push({type:1,index:o,name:v[2],strings:f,ctor:v[1]==="."?Ye:v[1]==="?"?We:v[1]==="@"?Ge:St})}else s.push({type:6,index:o})}for(const p of u)r.removeAttribute(p)}if(Fe.test(r.tagName)){const u=r.textContent.split(Y),p=u.length-1;if(p>0){r.textContent=ct?ct.emptyScript:"";for(let m=0;m<p;m++)r.append(u[m],Ct()),nt.nextNode(),s.push({type:2,index:++o});r.append(u[p],Ct())}}}else if(r.nodeType===8)if(r.data===de)s.push({type:2,index:o});else{let u=-1;for(;(u=r.data.indexOf(Y,u+1))!==-1;)s.push({type:7,index:o}),u+=Y.length-1}o++}}static createElement(t,e){const i=et.createElement("template");return i.innerHTML=t,i}}function rt(n,t,e=n,i){var r,o,a,l;if(t===U)return t;let s=i!==void 0?(r=e._$Co)===null||r===void 0?void 0:r[i]:e._$Cl;const d=xt(t)?void 0:t._$litDirective$;return(s==null?void 0:s.constructor)!==d&&((o=s==null?void 0:s._$AO)===null||o===void 0||o.call(s,!1),d===void 0?s=void 0:(s=new d(n),s._$AT(n,e,i)),i!==void 0?((a=(l=e)._$Co)!==null&&a!==void 0?a:l._$Co=[])[i]=s:e._$Cl=s),s!==void 0&&(t=rt(n,s._$AS(n,t.values),s,i)),t}class Xe{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:r}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:et).importNode(i,!0);nt.currentNode=o;let a=nt.nextNode(),l=0,s=0,d=r[0];for(;d!==void 0;){if(l===d.index){let c;d.type===2?c=new pt(a,a.nextSibling,this,t):d.type===1?c=new d.ctor(a,d.name,d.strings,this,t):d.type===6&&(c=new Ze(a,this,t)),this._$AV.push(c),d=r[++s]}l!==(d==null?void 0:d.index)&&(a=nt.nextNode(),l++)}return nt.currentNode=et,o}v(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class pt{constructor(t,e,i,r){var o;this.type=2,this._$AH=_,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cp=(o=r==null?void 0:r.isConnected)===null||o===void 0||o}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=rt(this,t,e),xt(t)?t===_||t==null||t===""?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==U&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):ke(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==_&&xt(this._$AH)?this._$AA.nextSibling.data=t:this.$(et.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=At.createElement(r.h,this.options)),r);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(i);else{const a=new Xe(o,this),l=a.u(this.options);a.v(i),this.$(l),this._$AH=a}}_$AC(t){let e=ze.get(t.strings);return e===void 0&&ze.set(t.strings,e=new At(t)),e}T(t){Ne(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const o of t)r===e.length?e.push(i=new pt(this.k(Ct()),this.k(Ct()),this,this.options)):i=e[r],i._$AI(o),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class St{constructor(t,e,i,r,o){this.type=1,this._$AH=_,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=_}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const o=this.strings;let a=!1;if(o===void 0)t=rt(this,t,e,0),a=!xt(t)||t!==this._$AH&&t!==U,a&&(this._$AH=t);else{const l=t;let s,d;for(t=o[0],s=0;s<o.length-1;s++)d=rt(this,l[i+s],e,s),d===U&&(d=this._$AH[s]),a||(a=!xt(d)||d!==this._$AH[s]),d===_?t=_:t!==_&&(t+=(d??"")+o[s+1]),this._$AH[s]=d}a&&!r&&this.j(t)}j(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Ye extends St{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===_?void 0:t}}const Ri=ct?ct.emptyScript:"";class We extends St{constructor(){super(...arguments),this.type=4}j(t){t&&t!==_?this.element.setAttribute(this.name,Ri):this.element.removeAttribute(this.name)}}class Ge extends St{constructor(t,e,i,r,o){super(t,e,i,r,o),this.type=5}_$AI(t,e=this){var i;if((t=(i=rt(this,t,e,0))!==null&&i!==void 0?i:_)===U)return;const r=this._$AH,o=t===_&&r!==_||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==_&&(r===_||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}}class Ze{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){rt(this,t)}}const Ui={O:Rt,P:Y,A:de,C:1,M:je,L:Xe,D:ke,R:rt,I:pt,V:St,H:We,N:Ge,U:Ye,F:Ze},qe=Bt.litHtmlPolyfillSupport;qe==null||qe(At,pt),((le=Bt.litHtmlVersions)!==null&&le!==void 0?le:Bt.litHtmlVersions=[]).push("2.7.4");const Fi=(n,t,e)=>{var i,r;const o=(i=e==null?void 0:e.renderBefore)!==null&&i!==void 0?i:t;let a=o._$litPart$;if(a===void 0){const l=(r=e==null?void 0:e.renderBefore)!==null&&r!==void 0?r:null;o._$litPart$=a=new pt(t.insertBefore(Ct(),l),l,void 0,e??{})}return a._$AI(n),a};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
@@ -57,7 +57,7 @@
57
57
  * @author RubaXa <trash@rubaxa.org>
58
58
  * @author owenm <owen23355@gmail.com>
59
59
  * @license MIT
60
- */function oi(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),e.push.apply(e,i)}return e}function j(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){Zi(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 Ut(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ut=function(t){return typeof t}:Ut=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(n)}function Zi(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function q(){return q=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},q.apply(this,arguments)}function qi(n,t){if(n==null)return{};var e={},i=Object.keys(n),r,o;for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&(e[r]=n[r]);return e}function Ki(n,t){if(n==null)return{};var e=qi(n,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var Ji="1.15.0";function W(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var K=W(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ft=W(/Edge/i),ai=W(/firefox/i),zt=W(/safari/i)&&!W(/chrome/i)&&!W(/android/i),si=W(/iP(ad|od|hone)/i),li=W(/chrome/i)&&W(/android/i),di={capture:!1,passive:!1};function C(n,t,e){n.addEventListener(t,e,!K&&di)}function w(n,t,e){n.removeEventListener(t,e,!K&&di)}function jt(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 Qi(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function X(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&jt(n,t):jt(n,t))||i&&n===e)return n;if(n===e)break}while(n=Qi(n))}return null}var hi=/\s+/g;function k(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(hi," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(hi," ")}}function g(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 mt(n,t){var e="";if(typeof n=="string")e=n;else do{var i=g(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function ui(n,t,e){if(n){var i=n.getElementsByTagName(t),r=0,o=i.length;if(e)for(;r<o;r++)e(i[r],r);return i}return[]}function J(){var n=document.scrollingElement;return n||document.documentElement}function T(n,t,e,i,r){if(!(!n.getBoundingClientRect&&n!==window)){var o,a,l,s,d,c,u;if(n!==window&&n.parentNode&&n!==J()?(o=n.getBoundingClientRect(),a=o.top,l=o.left,s=o.bottom,d=o.right,c=o.height,u=o.width):(a=0,l=0,s=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||e)&&n!==window&&(r=r||n.parentNode,!K))do if(r&&r.getBoundingClientRect&&(g(r,"transform")!=="none"||e&&g(r,"position")!=="static")){var p=r.getBoundingClientRect();a-=p.top+parseInt(g(r,"border-top-width")),l-=p.left+parseInt(g(r,"border-left-width")),s=a+o.height,d=l+o.width;break}while(r=r.parentNode);if(i&&n!==window){var m=mt(r||n),f=m&&m.a,v=m&&m.d;m&&(a/=v,l/=f,u/=f,c/=v,s=a+c,d=l+u)}return{top:a,left:l,bottom:s,right:d,width:u,height:c}}}function ci(n,t,e){for(var i=fi(n,!0),r=T(n)[t];i;){var o=T(i)[e],a=void 0;if(e==="top"||e==="left"?a=r>=o:a=r<=o,!a)return i;if(i===J())break;i=fi(i,!1)}return!1}function vt(n,t,e,i){for(var r=0,o=0,a=n.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==y.ghost&&(i||a[o]!==y.dragged)&&X(a[o],e.draggable,n,!1)){if(r===t)return a[o];r++}o++}return null}function ve(n,t){for(var e=n.lastElementChild;e&&(e===y.ghost||g(e,"display")==="none"||t&&!jt(e,t));)e=e.previousElementSibling;return e||null}function B(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==y.clone&&(!t||jt(n,t))&&e++;return e}function pi(n){var t=0,e=0,i=J();if(n)do{var r=mt(n),o=r.a,a=r.d;t+=n.scrollLeft*o,e+=n.scrollTop*a}while(n!==i&&(n=n.parentNode));return[t,e]}function tn(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 fi(n,t){if(!n||!n.getBoundingClientRect)return J();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=g(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return J();if(i||t)return e;i=!0}}while(e=e.parentNode);return J()}function en(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function ye(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 be;function nn(n,t){return function(){if(!be){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),be=setTimeout(function(){be=void 0},t)}}}function rn(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function gi(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)}var R="Sortable"+new Date().getTime();function on(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(g(r,"display")==="none"||r===y.ghost)){n.push({target:r,rect:T(r)});var o=j({},n[n.length-1].rect);if(r.thisAnimationDuration){var a=mt(r,!0);a&&(o.top-=a.f,o.left-=a.e)}r.fromRect=o}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(tn(n,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var o=!1,a=0;n.forEach(function(l){var s=0,d=l.target,c=d.fromRect,u=T(d),p=d.prevFromRect,m=d.prevToRect,f=l.rect,v=mt(d,!0);v&&(u.top-=v.f,u.left-=v.e),d.toRect=u,d.thisAnimationDuration&&ye(p,u)&&!ye(c,u)&&(f.top-u.top)/(f.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=sn(f,p,m,r.options)),ye(u,c)||(d.prevFromRect=c,d.prevToRect=u,s||(s=r.options.animation),r.animate(d,f,u,s)),s&&(o=!0,a=Math.max(a,s),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},s),d.thisAnimationDuration=s)}),clearTimeout(t),o?t=setTimeout(function(){typeof i=="function"&&i()},a):typeof i=="function"&&i(),n=[]},animate:function(i,r,o,a){if(a){g(i,"transition",""),g(i,"transform","");var l=mt(this.el),s=l&&l.a,d=l&&l.d,c=(r.left-o.left)/(s||1),u=(r.top-o.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,g(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=an(i),g(i,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),g(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){g(i,"transition",""),g(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},a)}}}}function an(n){return n.offsetWidth}function sn(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 yt=[],Ee={initializeByDefault:!0},Tt={mount:function(t){for(var e in Ee)Ee.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ee[e]);yt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),yt.push(t)},pluginEvent:function(t,e,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var o=t+"Global";yt.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][o]&&e[a.pluginName][o](j({sortable:e},i)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](j({sortable:e},i)))})},initializePlugins:function(t,e,i,r){yt.forEach(function(l){var s=l.pluginName;if(!(!t.options[s]&&!l.initializeByDefault)){var d=new l(t,e,t.options);d.sortable=t,d.options=t.options,t[s]=d,q(i,d.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var a=this.modifyOption(t,o,t.options[o]);typeof a<"u"&&(t.options[o]=a)}},getEventProperties:function(t,e){var i={};return yt.forEach(function(r){typeof r.eventProperties=="function"&&q(i,r.eventProperties.call(e[r.pluginName],t))}),i},modifyOption:function(t,e,i){var r;return yt.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[e]=="function"&&(r=o.optionListeners[e].call(t[o.pluginName],i))}),r}};function ln(n){var t=n.sortable,e=n.rootEl,i=n.name,r=n.targetEl,o=n.cloneEl,a=n.toEl,l=n.fromEl,s=n.oldIndex,d=n.newIndex,c=n.oldDraggableIndex,u=n.newDraggableIndex,p=n.originalEvent,m=n.putSortable,f=n.extraEventProperties;if(t=t||e&&e[R],!!t){var v,D=t.options,z="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!K&&!Ft?v=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(i,!0,!0)),v.to=a||e,v.from=l||e,v.item=r||e,v.clone=o,v.oldIndex=s,v.newIndex=d,v.oldDraggableIndex=c,v.newDraggableIndex=u,v.originalEvent=p,v.pullMode=m?m.lastPutMode:void 0;var P=j(j({},f),Tt.getEventProperties(i,t));for(var ht in P)v[ht]=P[ht];e&&e.dispatchEvent(v),D[z]&&D[z].call(t,v)}}var dn=["evt"],N=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,o=Ki(i,dn);Tt.pluginEvent.bind(y)(t,e,j({dragEl:h,parentEl:x,ghostEl:b,rootEl:$,nextEl:st,lastDownEl:Xt,cloneEl:A,cloneHidden:Q,dragStarted:Lt,putSortable:L,activeSortable:y.active,originalEvent:r,oldIndex:bt,oldDraggableIndex:Ot,newIndex:V,newDraggableIndex:tt,hideGhostForTarget:wi,unhideGhostForTarget:Ci,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(l){I({sortable:e,name:l,originalEvent:r})}},o))};function I(n){ln(j({putSortable:L,cloneEl:A,targetEl:h,rootEl:$,oldIndex:bt,oldDraggableIndex:Ot,newIndex:V,newDraggableIndex:tt},n))}var h,x,b,$,st,Xt,A,Q,bt,V,Ot,tt,Yt,L,Et=!1,Wt=!1,Gt=[],lt,F,_e,we,mi,vi,Lt,_t,Ht,Pt=!1,Zt=!1,qt,H,Ce=[],$e=!1,Kt=[],Jt=typeof document<"u",Qt=si,yi=Ft||K?"cssFloat":"float",hn=Jt&&!li&&!si&&"draggable"in document.createElement("div"),bi=function(){if(Jt){if(K)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Ei=function(t,e){var i=g(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=vt(t,0,e),a=vt(t,1,e),l=o&&g(o),s=a&&g(a),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).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(o&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=r&&i[yi]==="none"||a&&i[yi]==="none"&&d+c>r)?"vertical":"horizontal"},un=function(t,e,i){var r=i?t.left:t.top,o=i?t.right:t.bottom,a=i?t.width:t.height,l=i?e.left:e.top,s=i?e.right:e.bottom,d=i?e.width:e.height;return r===l||o===s||r+a/2===l+d/2},cn=function(t,e){var i;return Gt.some(function(r){var o=r[R].options.emptyInsertThreshold;if(!(!o||ve(r))){var a=T(r),l=t>=a.left-o&&t<=a.right+o,s=e>=a.top-o&&e<=a.bottom+o;if(l&&s)return i=r}}),i},_i=function(t){function e(o,a){return function(l,s,d,c){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(o==null&&(a||u))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return e(o(l,s,d,c),a)(l,s,d,c);var p=(a?l:s).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-1}}var i={},r=t.group;(!r||Ut(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=e(r.pull,!0),i.checkPut=e(r.put),i.revertClone=r.revertClone,t.group=i},wi=function(){!bi&&b&&g(b,"display","none")},Ci=function(){!bi&&b&&g(b,"display","")};Jt&&!li&&document.addEventListener("click",function(n){if(Wt)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Wt=!1,!1},!0);var dt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=cn(t.clientX,t.clientY);if(e){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[R]._onDragOver(i)}}},pn=function(t){h&&h.parentNode[R]._isOutsideThisEl(t.target)};function y(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=q({},t),n[R]=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 Ei(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(a,l){a.setData("Text",l.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:y.supportPointer!==!1&&"PointerEvent"in window&&!zt,emptyInsertThreshold:5};Tt.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);_i(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:hn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?C(n,"pointerdown",this._onTapStart):(C(n,"mousedown",this._onTapStart),C(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(n,"dragover",this),C(n,"dragenter",this)),Gt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),q(this,on())}y.prototype={constructor:y,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(_t=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,r=this.options,o=r.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=r.filter;if(_n(i),!h&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&zt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=X(s,r.draggable,i,!1),!(s&&s.animated)&&Xt!==s)){if(bt=B(s),Ot=B(s,r.draggable),typeof c=="function"){if(c.call(this,t,s,this)){I({sortable:e,rootEl:d,name:"filter",targetEl:s,toEl:i,fromEl:i}),N("filter",e,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=X(d,u.trim(),i,!1),u)return I({sortable:e,rootEl:u,name:"filter",targetEl:s,fromEl:i,toEl:i}),N("filter",e,{evt:t}),!0}),c)){o&&t.cancelable&&t.preventDefault();return}r.handle&&!X(d,r.handle,i,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,i){var r=this,o=r.el,a=r.options,l=o.ownerDocument,s;if(i&&!h&&i.parentNode===o){var d=T(i);if($=o,h=i,x=h.parentNode,st=h.nextSibling,Xt=i,Yt=a.group,y.dragged=h,lt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},mi=lt.clientX-d.left,vi=lt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",s=function(){if(N("delayEnded",r,{evt:t}),y.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ai&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(t,e),I({sortable:r,name:"choose",originalEvent:t}),k(h,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){ui(h,c.trim(),Ae)}),C(l,"dragover",dt),C(l,"mousemove",dt),C(l,"touchmove",dt),C(l,"mouseup",r._onDrop),C(l,"touchend",r._onDrop),C(l,"touchcancel",r._onDrop),ai&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ft||K))){if(y.eventCanceled){this._onDrop();return}C(l,"mouseup",r._disableDelayedDrag),C(l,"touchend",r._disableDelayedDrag),C(l,"touchcancel",r._disableDelayedDrag),C(l,"mousemove",r._delayedDragTouchMoveHandler),C(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&C(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_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&&Ae(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;w(t,"mouseup",this._disableDelayedDrag),w(t,"touchend",this._disableDelayedDrag),w(t,"touchcancel",this._disableDelayedDrag),w(t,"mousemove",this._delayedDragTouchMoveHandler),w(t,"touchmove",this._delayedDragTouchMoveHandler),w(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):e?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(h,"dragend",this),C($,"dragstart",this._onDragStart));try{document.selection?ee(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Et=!1,$&&h){N("dragStarted",this,{evt:e}),this.nativeDraggable&&C(document,"dragover",pn);var i=this.options;!t&&k(h,i.dragClass,!1),k(h,i.ghostClass,!0),y.active=this,t&&this._appendGhost(),I({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(F){this._lastX=F.clientX,this._lastY=F.clientY,wi();for(var t=document.elementFromPoint(F.clientX,F.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(F.clientX,F.clientY),t!==e);)e=t;if(h.parentNode[R]._isOutsideThisEl(t),e)do{if(e[R]){var i=void 0;if(i=e[R]._onDragOver({clientX:F.clientX,clientY:F.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Ci()}},_onTouchMove:function(t){if(lt){var e=this.options,i=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=b&&mt(b,!0),l=b&&a&&a.a,s=b&&a&&a.d,d=Qt&&H&&pi(H),c=(o.clientX-lt.clientX+r.x)/(l||1)+(d?d[0]-Ce[0]:0)/(l||1),u=(o.clientY-lt.clientY+r.y)/(s||1)+(d?d[1]-Ce[1]:0)/(s||1);if(!y.active&&!Et){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(b){a?(a.e+=c-(_e||0),a.f+=u-(we||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");g(b,"webkitTransform",p),g(b,"mozTransform",p),g(b,"msTransform",p),g(b,"transform",p),_e=c,we=u,F=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!b){var t=this.options.fallbackOnBody?document.body:$,e=T(h,!0,Qt,!0,t),i=this.options;if(Qt){for(H=t;g(H,"position")==="static"&&g(H,"transform")==="none"&&H!==document;)H=H.parentNode;H!==document.body&&H!==document.documentElement?(H===document&&(H=J()),e.top+=H.scrollTop,e.left+=H.scrollLeft):H=J(),Ce=pi(H)}b=h.cloneNode(!0),k(b,i.ghostClass,!1),k(b,i.fallbackClass,!0),k(b,i.dragClass,!0),g(b,"transition",""),g(b,"transform",""),g(b,"box-sizing","border-box"),g(b,"margin",0),g(b,"top",e.top),g(b,"left",e.left),g(b,"width",e.width),g(b,"height",e.height),g(b,"opacity","0.8"),g(b,"position",Qt?"absolute":"fixed"),g(b,"zIndex","100000"),g(b,"pointerEvents","none"),y.ghost=b,t.appendChild(b),g(b,"transform-origin",mi/parseInt(b.style.width)*100+"% "+vi/parseInt(b.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,r=t.dataTransfer,o=i.options;if(N("dragStart",this,{evt:t}),y.eventCanceled){this._onDrop();return}N("setupClone",this),y.eventCanceled||(A=gi(h),A.removeAttribute("id"),A.draggable=!1,A.style["will-change"]="",this._hideClone(),k(A,this.options.chosenClass,!1),y.clone=A),i.cloneId=ee(function(){N("clone",i),!y.eventCanceled&&(i.options.removeCloneOnHide||$.insertBefore(A,h),i._hideClone(),I({sortable:i,name:"clone"}))}),!e&&k(h,o.dragClass,!0),e?(Wt=!0,i._loopId=setInterval(i._emulateDragOver,50)):(w(document,"mouseup",i._onDrop),w(document,"touchend",i._onDrop),w(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(i,r,h)),C(document,"drop",i),g(h,"transform","translateZ(0)")),Et=!0,i._dragStartId=ee(i._dragStarted.bind(i,e,t)),C(document,"selectstart",i),Lt=!0,zt&&g(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,r,o,a,l=this.options,s=l.group,d=y.active,c=Yt===s,u=l.sort,p=L||d,m,f=this,v=!1;if($e)return;function D(kt,xn){N(kt,f,j({evt:t,isOwner:c,axis:m?"vertical":"horizontal",revert:a,dragRect:r,targetRect:o,canSort:u,fromSortable:p,target:i,completed:P,onMove:function(Pi,Sn){return te($,e,h,r,Pi,T(Pi),t,Sn)},changed:ht},xn))}function z(){D("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function P(kt){return D("dragOverCompleted",{insertion:kt}),kt&&(c?d._hideClone():d._showClone(f),f!==p&&(k(h,L?L.options.ghostClass:d.options.ghostClass,!1),k(h,l.ghostClass,!0)),L!==f&&f!==y.active?L=f:f===y.active&&L&&(L=null),p===f&&(f._ignoreWhileAnimating=i),f.animateAll(function(){D("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(_t=null),!l.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[R]._isOutsideThisEl(t.target),!kt&&dt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),v=!0}function ht(){V=B(h),tt=B(h,l.draggable),I({sortable:f,name:"change",toEl:e,newIndex:V,newDraggableIndex:tt,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=X(i,l.draggable,e,!0),D("dragOver"),y.eventCanceled)return v;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return P(!1);if(Wt=!1,d&&!l.disabled&&(c?u||(a=x!==$):L===this||(this.lastPutMode=Yt.checkPull(this,d,h,t))&&s.checkPut(this,d,h,t))){if(m=this._getDirection(t,i)==="vertical",r=T(h),D("dragOverValid"),y.eventCanceled)return v;if(a)return x=$,z(),this._hideClone(),D("revert"),y.eventCanceled||(st?$.insertBefore(h,st):$.appendChild(h)),P(!0);var G=ve(e,l.draggable);if(!G||vn(t,m,this)&&!G.animated){if(G===h)return P(!1);if(G&&e===t.target&&(i=G),i&&(o=T(i)),te($,e,h,r,i,o,t,!!i)!==!1)return z(),G&&G.nextSibling?e.insertBefore(h,G.nextSibling):e.appendChild(h),x=e,ht(),P(!0)}else if(G&&mn(t,m,this)){var Se=vt(e,0,l,!0);if(Se===h)return P(!1);if(i=Se,o=T(i),te($,e,h,r,i,o,t,!1)!==!1)return z(),e.insertBefore(h,Se),x=e,ht(),P(!0)}else if(i.parentNode===e){o=T(i);var wt=0,De,$n=h.parentNode!==e,Ti=!un(h.animated&&h.toRect||r,i.animated&&i.toRect||o,m),Oi=m?"top":"left",It=ci(i,"top","top")||ci(h,"top","top"),An=It?It.scrollTop:void 0;_t!==i&&(De=o[Oi],Pt=!1,Zt=!Ti&&l.invertSwap||$n),wt=yn(t,i,o,m,Ti?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Zt,_t===i);var Mt;if(wt!==0){var Li=B(h);do Li-=wt,Mt=x.children[Li];while(Mt&&(g(Mt,"display")==="none"||Mt===b))}if(wt===0||Mt===i)return P(!1);_t=i,Ht=wt;var Hi=i.nextElementSibling,Nt=!1;Nt=wt===1;var ie=te($,e,h,r,i,o,t,Nt);if(ie!==!1)return(ie===1||ie===-1)&&(Nt=ie===1),$e=!0,setTimeout(gn,30),z(),Nt&&!Hi?e.appendChild(h):i.parentNode.insertBefore(h,Nt?Hi:i),It&&rn(It,0,An-It.scrollTop),x=h.parentNode,De!==void 0&&!Zt&&(qt=Math.abs(De-T(i)[Oi])),ht(),P(!0)}if(e.contains(h))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){w(document,"mousemove",this._onTouchMove),w(document,"touchmove",this._onTouchMove),w(document,"pointermove",this._onTouchMove),w(document,"dragover",dt),w(document,"mousemove",dt),w(document,"touchmove",dt)},_offUpEvents:function(){var t=this.el.ownerDocument;w(t,"mouseup",this._onDrop),w(t,"touchend",this._onDrop),w(t,"pointerup",this._onDrop),w(t,"touchcancel",this._onDrop),w(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(V=B(h),tt=B(h,i.draggable),N("drop",this,{evt:t}),x=h&&h.parentNode,V=B(h),tt=B(h,i.draggable),y.eventCanceled){this._nulling();return}Et=!1,Zt=!1,Pt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),xe(this.cloneId),xe(this._dragStartId),this.nativeDraggable&&(w(document,"drop",this),w(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),zt&&g(document.body,"user-select",""),g(h,"transform",""),t&&(Lt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),b&&b.parentNode&&b.parentNode.removeChild(b),($===x||L&&L.lastPutMode!=="clone")&&A&&A.parentNode&&A.parentNode.removeChild(A),h&&(this.nativeDraggable&&w(h,"dragend",this),Ae(h),h.style["will-change"]="",Lt&&!Et&&k(h,L?L.options.ghostClass:this.options.ghostClass,!1),k(h,this.options.chosenClass,!1),I({sortable:this,name:"unchoose",toEl:x,newIndex:null,newDraggableIndex:null,originalEvent:t}),$!==x?(V>=0&&(I({rootEl:x,name:"add",toEl:x,fromEl:$,originalEvent:t}),I({sortable:this,name:"remove",toEl:x,originalEvent:t}),I({rootEl:x,name:"sort",toEl:x,fromEl:$,originalEvent:t}),I({sortable:this,name:"sort",toEl:x,originalEvent:t})),L&&L.save()):V!==bt&&V>=0&&(I({sortable:this,name:"update",toEl:x,originalEvent:t}),I({sortable:this,name:"sort",toEl:x,originalEvent:t})),y.active&&((V==null||V===-1)&&(V=bt,tt=Ot),I({sortable:this,name:"end",toEl:x,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),$=h=x=b=st=A=Xt=Q=lt=F=Lt=V=tt=bt=Ot=_t=Ht=L=Yt=y.dragged=y.ghost=y.clone=y.active=null,Kt.forEach(function(t){t.checked=!0}),Kt.length=_e=we=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),fn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,r=0,o=i.length,a=this.options;r<o;r++)e=i[r],X(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||En(e));return t},sort:function(t,e){var i={},r=this.el;this.toArray().forEach(function(o,a){var l=r.children[a];X(l,this.options.draggable,r,!1)&&(i[o]=l)},this),e&&this.captureAnimationState(),t.forEach(function(o){i[o]&&(r.removeChild(i[o]),r.appendChild(i[o]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return X(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var r=Tt.modifyOption(this,t,e);typeof r<"u"?i[t]=r:i[t]=e,t==="group"&&_i(i)},destroy:function(){N("destroy",this);var t=this.el;t[R]=null,w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart),w(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Gt.splice(Gt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Q){if(N("hideClone",this),y.eventCanceled)return;g(A,"display","none"),this.options.removeCloneOnHide&&A.parentNode&&A.parentNode.removeChild(A),Q=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),y.eventCanceled)return;h.parentNode==$&&!this.options.group.revertClone?$.insertBefore(A,h):st?$.insertBefore(A,st):$.appendChild(A),this.options.group.revertClone&&this.animate(h,A),g(A,"display",""),Q=!1}}};function fn(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function te(n,t,e,i,r,o,a,l){var s,d=n[R],c=d.options.onMove,u;return window.CustomEvent&&!K&&!Ft?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=n,s.dragged=e,s.draggedRect=i,s.related=r||t,s.relatedRect=o||T(t),s.willInsertAfter=l,s.originalEvent=a,n.dispatchEvent(s),c&&(u=c.call(d,s,a)),u}function Ae(n){n.draggable=!1}function gn(){$e=!1}function mn(n,t,e){var i=T(vt(e.el,0,e.options,!0)),r=10;return t?n.clientX<i.left-r||n.clientY<i.top&&n.clientX<i.right:n.clientY<i.top-r||n.clientY<i.bottom&&n.clientX<i.left}function vn(n,t,e){var i=T(ve(e.el,e.options.draggable)),r=10;return t?n.clientX>i.right+r||n.clientX<=i.right&&n.clientY>i.bottom&&n.clientX>=i.left:n.clientX>i.right&&n.clientY>i.top||n.clientX<=i.right&&n.clientY>i.bottom+r}function yn(n,t,e,i,r,o,a,l){var s=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(!a){if(l&&qt<d*r){if(!Pt&&(Ht===1?s>c+d*o/2:s<u-d*o/2)&&(Pt=!0),Pt)p=!0;else if(Ht===1?s<c+qt:s>u-qt)return-Ht}else if(s>c+d*(1-r)/2&&s<u-d*(1-r)/2)return bn(t)}return p=p||a,p&&(s<c+d*o/2||s>u-d*o/2)?s>c+d/2?1:-1:0}function bn(n){return B(h)<B(n)?1:-1}function En(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 _n(n){Kt.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&Kt.push(i)}}function ee(n){return setTimeout(n,0)}function xe(n){return clearTimeout(n)}Jt&&C(document,"touchmove",function(n){(y.active||Et)&&n.cancelable&&n.preventDefault()}),y.utils={on:C,off:w,css:g,find:ui,is:function(t,e){return!!X(t,e,t,!1)},extend:en,throttle:nn,closest:X,toggleClass:k,clone:gi,index:B,nextTick:ee,cancelNextTick:xe,detectDirection:Ei,getChild:vt},y.get=function(n){return n[R]},y.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&&(y.utils=j(j({},y.utils),i.utils)),Tt.mount(i)})},y.create=function(n,t){return new y(n,t)},y.version=Ji;var $i=function(t){var e=t.originalEvent,i=t.putSortable,r=t.dragEl,o=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var d=i||o;l();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);s(),d&&!d.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function Ai(){}Ai.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 r=vt(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:$i},q(Ai,{pluginName:"revertOnSpill"});function xi(){}xi.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,r=i||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:$i},q(xi,{pluginName:"removeOnSpill"});const Si=`
60
+ */function oi(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable})),e.push.apply(e,i)}return e}function j(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){Zi(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 Ut(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ut=function(t){return typeof t}:Ut=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ut(n)}function Zi(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function q(){return q=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},q.apply(this,arguments)}function qi(n,t){if(n==null)return{};var e={},i=Object.keys(n),r,o;for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&(e[r]=n[r]);return e}function Ki(n,t){if(n==null)return{};var e=qi(n,t),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);for(r=0;r<o.length;r++)i=o[r],!(t.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(e[i]=n[i])}return e}var Ji="1.15.0";function W(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var K=W(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ft=W(/Edge/i),ai=W(/firefox/i),zt=W(/safari/i)&&!W(/chrome/i)&&!W(/android/i),si=W(/iP(ad|od|hone)/i),li=W(/chrome/i)&&W(/android/i),di={capture:!1,passive:!1};function C(n,t,e){n.addEventListener(t,e,!K&&di)}function w(n,t,e){n.removeEventListener(t,e,!K&&di)}function jt(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 Qi(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function X(n,t,e,i){if(n){e=e||document;do{if(t!=null&&(t[0]===">"?n.parentNode===e&&jt(n,t):jt(n,t))||i&&n===e)return n;if(n===e)break}while(n=Qi(n))}return null}var hi=/\s+/g;function k(n,t,e){if(n&&t)if(n.classList)n.classList[e?"add":"remove"](t);else{var i=(" "+n.className+" ").replace(hi," ").replace(" "+t+" "," ");n.className=(i+(e?" "+t:"")).replace(hi," ")}}function g(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 mt(n,t){var e="";if(typeof n=="string")e=n;else do{var i=g(n,"transform");i&&i!=="none"&&(e=i+" "+e)}while(!t&&(n=n.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function ui(n,t,e){if(n){var i=n.getElementsByTagName(t),r=0,o=i.length;if(e)for(;r<o;r++)e(i[r],r);return i}return[]}function J(){var n=document.scrollingElement;return n||document.documentElement}function T(n,t,e,i,r){if(!(!n.getBoundingClientRect&&n!==window)){var o,a,l,s,d,c,u;if(n!==window&&n.parentNode&&n!==J()?(o=n.getBoundingClientRect(),a=o.top,l=o.left,s=o.bottom,d=o.right,c=o.height,u=o.width):(a=0,l=0,s=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(t||e)&&n!==window&&(r=r||n.parentNode,!K))do if(r&&r.getBoundingClientRect&&(g(r,"transform")!=="none"||e&&g(r,"position")!=="static")){var p=r.getBoundingClientRect();a-=p.top+parseInt(g(r,"border-top-width")),l-=p.left+parseInt(g(r,"border-left-width")),s=a+o.height,d=l+o.width;break}while(r=r.parentNode);if(i&&n!==window){var m=mt(r||n),f=m&&m.a,v=m&&m.d;m&&(a/=v,l/=f,u/=f,c/=v,s=a+c,d=l+u)}return{top:a,left:l,bottom:s,right:d,width:u,height:c}}}function ci(n,t,e){for(var i=fi(n,!0),r=T(n)[t];i;){var o=T(i)[e],a=void 0;if(e==="top"||e==="left"?a=r>=o:a=r<=o,!a)return i;if(i===J())break;i=fi(i,!1)}return!1}function vt(n,t,e,i){for(var r=0,o=0,a=n.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==y.ghost&&(i||a[o]!==y.dragged)&&X(a[o],e.draggable,n,!1)){if(r===t)return a[o];r++}o++}return null}function ve(n,t){for(var e=n.lastElementChild;e&&(e===y.ghost||g(e,"display")==="none"||t&&!jt(e,t));)e=e.previousElementSibling;return e||null}function B(n,t){var e=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==y.clone&&(!t||jt(n,t))&&e++;return e}function pi(n){var t=0,e=0,i=J();if(n)do{var r=mt(n),o=r.a,a=r.d;t+=n.scrollLeft*o,e+=n.scrollTop*a}while(n!==i&&(n=n.parentNode));return[t,e]}function tn(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 fi(n,t){if(!n||!n.getBoundingClientRect)return J();var e=n,i=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=g(e);if(e.clientWidth<e.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||e.clientHeight<e.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!e.getBoundingClientRect||e===document.body)return J();if(i||t)return e;i=!0}}while(e=e.parentNode);return J()}function en(n,t){if(n&&t)for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function ye(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 be;function nn(n,t){return function(){if(!be){var e=arguments,i=this;e.length===1?n.call(i,e[0]):n.apply(i,e),be=setTimeout(function(){be=void 0},t)}}}function rn(n,t,e){n.scrollLeft+=t,n.scrollTop+=e}function gi(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)}var R="Sortable"+new Date().getTime();function on(){var n=[],t;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(g(r,"display")==="none"||r===y.ghost)){n.push({target:r,rect:T(r)});var o=j({},n[n.length-1].rect);if(r.thisAnimationDuration){var a=mt(r,!0);a&&(o.top-=a.f,o.left-=a.e)}r.fromRect=o}})}},addAnimationState:function(i){n.push(i)},removeAnimationState:function(i){n.splice(tn(n,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(t),typeof i=="function"&&i();return}var o=!1,a=0;n.forEach(function(l){var s=0,d=l.target,c=d.fromRect,u=T(d),p=d.prevFromRect,m=d.prevToRect,f=l.rect,v=mt(d,!0);v&&(u.top-=v.f,u.left-=v.e),d.toRect=u,d.thisAnimationDuration&&ye(p,u)&&!ye(c,u)&&(f.top-u.top)/(f.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=sn(f,p,m,r.options)),ye(u,c)||(d.prevFromRect=c,d.prevToRect=u,s||(s=r.options.animation),r.animate(d,f,u,s)),s&&(o=!0,a=Math.max(a,s),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},s),d.thisAnimationDuration=s)}),clearTimeout(t),o?t=setTimeout(function(){typeof i=="function"&&i()},a):typeof i=="function"&&i(),n=[]},animate:function(i,r,o,a){if(a){g(i,"transition",""),g(i,"transform","");var l=mt(this.el),s=l&&l.a,d=l&&l.d,c=(r.left-o.left)/(s||1),u=(r.top-o.top)/(d||1);i.animatingX=!!c,i.animatingY=!!u,g(i,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=an(i),g(i,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),g(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){g(i,"transition",""),g(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},a)}}}}function an(n){return n.offsetWidth}function sn(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 yt=[],Ee={initializeByDefault:!0},Tt={mount:function(t){for(var e in Ee)Ee.hasOwnProperty(e)&&!(e in t)&&(t[e]=Ee[e]);yt.forEach(function(i){if(i.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),yt.push(t)},pluginEvent:function(t,e,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var o=t+"Global";yt.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][o]&&e[a.pluginName][o](j({sortable:e},i)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](j({sortable:e},i)))})},initializePlugins:function(t,e,i,r){yt.forEach(function(l){var s=l.pluginName;if(!(!t.options[s]&&!l.initializeByDefault)){var d=new l(t,e,t.options);d.sortable=t,d.options=t.options,t[s]=d,q(i,d.defaults)}});for(var o in t.options)if(t.options.hasOwnProperty(o)){var a=this.modifyOption(t,o,t.options[o]);typeof a<"u"&&(t.options[o]=a)}},getEventProperties:function(t,e){var i={};return yt.forEach(function(r){typeof r.eventProperties=="function"&&q(i,r.eventProperties.call(e[r.pluginName],t))}),i},modifyOption:function(t,e,i){var r;return yt.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[e]=="function"&&(r=o.optionListeners[e].call(t[o.pluginName],i))}),r}};function ln(n){var t=n.sortable,e=n.rootEl,i=n.name,r=n.targetEl,o=n.cloneEl,a=n.toEl,l=n.fromEl,s=n.oldIndex,d=n.newIndex,c=n.oldDraggableIndex,u=n.newDraggableIndex,p=n.originalEvent,m=n.putSortable,f=n.extraEventProperties;if(t=t||e&&e[R],!!t){var v,D=t.options,z="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!K&&!Ft?v=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(i,!0,!0)),v.to=a||e,v.from=l||e,v.item=r||e,v.clone=o,v.oldIndex=s,v.newIndex=d,v.oldDraggableIndex=c,v.newDraggableIndex=u,v.originalEvent=p,v.pullMode=m?m.lastPutMode:void 0;var P=j(j({},f),Tt.getEventProperties(i,t));for(var ht in P)v[ht]=P[ht];e&&e.dispatchEvent(v),D[z]&&D[z].call(t,v)}}var dn=["evt"],N=function(t,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,o=Ki(i,dn);Tt.pluginEvent.bind(y)(t,e,j({dragEl:h,parentEl:A,ghostEl:b,rootEl:x,nextEl:st,lastDownEl:Xt,cloneEl:$,cloneHidden:Q,dragStarted:Lt,putSortable:L,activeSortable:y.active,originalEvent:r,oldIndex:bt,oldDraggableIndex:Ot,newIndex:V,newDraggableIndex:tt,hideGhostForTarget:wi,unhideGhostForTarget:Ci,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(l){I({sortable:e,name:l,originalEvent:r})}},o))};function I(n){ln(j({putSortable:L,cloneEl:$,targetEl:h,rootEl:x,oldIndex:bt,oldDraggableIndex:Ot,newIndex:V,newDraggableIndex:tt},n))}var h,A,b,x,st,Xt,$,Q,bt,V,Ot,tt,Yt,L,Et=!1,Wt=!1,Gt=[],lt,F,_e,we,mi,vi,Lt,_t,Ht,Pt=!1,Zt=!1,qt,H,Ce=[],xe=!1,Kt=[],Jt=typeof document<"u",Qt=si,yi=Ft||K?"cssFloat":"float",hn=Jt&&!li&&!si&&"draggable"in document.createElement("div"),bi=function(){if(Jt){if(K)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),Ei=function(t,e){var i=g(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=vt(t,0,e),a=vt(t,1,e),l=o&&g(o),s=a&&g(a),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).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(o&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=r&&i[yi]==="none"||a&&i[yi]==="none"&&d+c>r)?"vertical":"horizontal"},un=function(t,e,i){var r=i?t.left:t.top,o=i?t.right:t.bottom,a=i?t.width:t.height,l=i?e.left:e.top,s=i?e.right:e.bottom,d=i?e.width:e.height;return r===l||o===s||r+a/2===l+d/2},cn=function(t,e){var i;return Gt.some(function(r){var o=r[R].options.emptyInsertThreshold;if(!(!o||ve(r))){var a=T(r),l=t>=a.left-o&&t<=a.right+o,s=e>=a.top-o&&e<=a.bottom+o;if(l&&s)return i=r}}),i},_i=function(t){function e(o,a){return function(l,s,d,c){var u=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(o==null&&(a||u))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return e(o(l,s,d,c),a)(l,s,d,c);var p=(a?l:s).options.group.name;return o===!0||typeof o=="string"&&o===p||o.join&&o.indexOf(p)>-1}}var i={},r=t.group;(!r||Ut(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=e(r.pull,!0),i.checkPut=e(r.put),i.revertClone=r.revertClone,t.group=i},wi=function(){!bi&&b&&g(b,"display","none")},Ci=function(){!bi&&b&&g(b,"display","")};Jt&&!li&&document.addEventListener("click",function(n){if(Wt)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),Wt=!1,!1},!0);var dt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=cn(t.clientX,t.clientY);if(e){var i={};for(var r in t)t.hasOwnProperty(r)&&(i[r]=t[r]);i.target=i.rootEl=e,i.preventDefault=void 0,i.stopPropagation=void 0,e[R]._onDragOver(i)}}},pn=function(t){h&&h.parentNode[R]._isOutsideThisEl(t.target)};function y(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=q({},t),n[R]=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 Ei(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(a,l){a.setData("Text",l.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:y.supportPointer!==!1&&"PointerEvent"in window&&!zt,emptyInsertThreshold:5};Tt.initializePlugins(this,n,e);for(var i in e)!(i in t)&&(t[i]=e[i]);_i(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:hn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?C(n,"pointerdown",this._onTapStart):(C(n,"mousedown",this._onTapStart),C(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(n,"dragover",this),C(n,"dragenter",this)),Gt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),q(this,on())}y.prototype={constructor:y,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(_t=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,r=this.options,o=r.preventOnFilter,a=t.type,l=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,s=(l||t).target,d=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||s,c=r.filter;if(_n(i),!h&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&zt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=X(s,r.draggable,i,!1),!(s&&s.animated)&&Xt!==s)){if(bt=B(s),Ot=B(s,r.draggable),typeof c=="function"){if(c.call(this,t,s,this)){I({sortable:e,rootEl:d,name:"filter",targetEl:s,toEl:i,fromEl:i}),N("filter",e,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=X(d,u.trim(),i,!1),u)return I({sortable:e,rootEl:u,name:"filter",targetEl:s,fromEl:i,toEl:i}),N("filter",e,{evt:t}),!0}),c)){o&&t.cancelable&&t.preventDefault();return}r.handle&&!X(d,r.handle,i,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,i){var r=this,o=r.el,a=r.options,l=o.ownerDocument,s;if(i&&!h&&i.parentNode===o){var d=T(i);if(x=o,h=i,A=h.parentNode,st=h.nextSibling,Xt=i,Yt=a.group,y.dragged=h,lt={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},mi=lt.clientX-d.left,vi=lt.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",s=function(){if(N("delayEnded",r,{evt:t}),y.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!ai&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(t,e),I({sortable:r,name:"choose",originalEvent:t}),k(h,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){ui(h,c.trim(),$e)}),C(l,"dragover",dt),C(l,"mousemove",dt),C(l,"touchmove",dt),C(l,"mouseup",r._onDrop),C(l,"touchend",r._onDrop),C(l,"touchcancel",r._onDrop),ai&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),N("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Ft||K))){if(y.eventCanceled){this._onDrop();return}C(l,"mouseup",r._disableDelayedDrag),C(l,"touchend",r._disableDelayedDrag),C(l,"touchcancel",r._disableDelayedDrag),C(l,"mousemove",r._delayedDragTouchMoveHandler),C(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&C(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_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&&$e(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;w(t,"mouseup",this._disableDelayedDrag),w(t,"touchend",this._disableDelayedDrag),w(t,"touchcancel",this._disableDelayedDrag),w(t,"mousemove",this._delayedDragTouchMoveHandler),w(t,"touchmove",this._delayedDragTouchMoveHandler),w(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):e?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(h,"dragend",this),C(x,"dragstart",this._onDragStart));try{document.selection?ee(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(Et=!1,x&&h){N("dragStarted",this,{evt:e}),this.nativeDraggable&&C(document,"dragover",pn);var i=this.options;!t&&k(h,i.dragClass,!1),k(h,i.ghostClass,!0),y.active=this,t&&this._appendGhost(),I({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(F){this._lastX=F.clientX,this._lastY=F.clientY,wi();for(var t=document.elementFromPoint(F.clientX,F.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(F.clientX,F.clientY),t!==e);)e=t;if(h.parentNode[R]._isOutsideThisEl(t),e)do{if(e[R]){var i=void 0;if(i=e[R]._onDragOver({clientX:F.clientX,clientY:F.clientY,target:t,rootEl:e}),i&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Ci()}},_onTouchMove:function(t){if(lt){var e=this.options,i=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=b&&mt(b,!0),l=b&&a&&a.a,s=b&&a&&a.d,d=Qt&&H&&pi(H),c=(o.clientX-lt.clientX+r.x)/(l||1)+(d?d[0]-Ce[0]:0)/(l||1),u=(o.clientY-lt.clientY+r.y)/(s||1)+(d?d[1]-Ce[1]:0)/(s||1);if(!y.active&&!Et){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(t,!0)}if(b){a?(a.e+=c-(_e||0),a.f+=u-(we||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var p="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");g(b,"webkitTransform",p),g(b,"mozTransform",p),g(b,"msTransform",p),g(b,"transform",p),_e=c,we=u,F=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!b){var t=this.options.fallbackOnBody?document.body:x,e=T(h,!0,Qt,!0,t),i=this.options;if(Qt){for(H=t;g(H,"position")==="static"&&g(H,"transform")==="none"&&H!==document;)H=H.parentNode;H!==document.body&&H!==document.documentElement?(H===document&&(H=J()),e.top+=H.scrollTop,e.left+=H.scrollLeft):H=J(),Ce=pi(H)}b=h.cloneNode(!0),k(b,i.ghostClass,!1),k(b,i.fallbackClass,!0),k(b,i.dragClass,!0),g(b,"transition",""),g(b,"transform",""),g(b,"box-sizing","border-box"),g(b,"margin",0),g(b,"top",e.top),g(b,"left",e.left),g(b,"width",e.width),g(b,"height",e.height),g(b,"opacity","0.8"),g(b,"position",Qt?"absolute":"fixed"),g(b,"zIndex","100000"),g(b,"pointerEvents","none"),y.ghost=b,t.appendChild(b),g(b,"transform-origin",mi/parseInt(b.style.width)*100+"% "+vi/parseInt(b.style.height)*100+"%")}},_onDragStart:function(t,e){var i=this,r=t.dataTransfer,o=i.options;if(N("dragStart",this,{evt:t}),y.eventCanceled){this._onDrop();return}N("setupClone",this),y.eventCanceled||($=gi(h),$.removeAttribute("id"),$.draggable=!1,$.style["will-change"]="",this._hideClone(),k($,this.options.chosenClass,!1),y.clone=$),i.cloneId=ee(function(){N("clone",i),!y.eventCanceled&&(i.options.removeCloneOnHide||x.insertBefore($,h),i._hideClone(),I({sortable:i,name:"clone"}))}),!e&&k(h,o.dragClass,!0),e?(Wt=!0,i._loopId=setInterval(i._emulateDragOver,50)):(w(document,"mouseup",i._onDrop),w(document,"touchend",i._onDrop),w(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(i,r,h)),C(document,"drop",i),g(h,"transform","translateZ(0)")),Et=!0,i._dragStartId=ee(i._dragStarted.bind(i,e,t)),C(document,"selectstart",i),Lt=!0,zt&&g(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,i=t.target,r,o,a,l=this.options,s=l.group,d=y.active,c=Yt===s,u=l.sort,p=L||d,m,f=this,v=!1;if(xe)return;function D(kt,An){N(kt,f,j({evt:t,isOwner:c,axis:m?"vertical":"horizontal",revert:a,dragRect:r,targetRect:o,canSort:u,fromSortable:p,target:i,completed:P,onMove:function(Pi,Sn){return te(x,e,h,r,Pi,T(Pi),t,Sn)},changed:ht},An))}function z(){D("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function P(kt){return D("dragOverCompleted",{insertion:kt}),kt&&(c?d._hideClone():d._showClone(f),f!==p&&(k(h,L?L.options.ghostClass:d.options.ghostClass,!1),k(h,l.ghostClass,!0)),L!==f&&f!==y.active?L=f:f===y.active&&L&&(L=null),p===f&&(f._ignoreWhileAnimating=i),f.animateAll(function(){D("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(i===h&&!h.animated||i===e&&!i.animated)&&(_t=null),!l.dragoverBubble&&!t.rootEl&&i!==document&&(h.parentNode[R]._isOutsideThisEl(t.target),!kt&&dt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),v=!0}function ht(){V=B(h),tt=B(h,l.draggable),I({sortable:f,name:"change",toEl:e,newIndex:V,newDraggableIndex:tt,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),i=X(i,l.draggable,e,!0),D("dragOver"),y.eventCanceled)return v;if(h.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||f._ignoreWhileAnimating===i)return P(!1);if(Wt=!1,d&&!l.disabled&&(c?u||(a=A!==x):L===this||(this.lastPutMode=Yt.checkPull(this,d,h,t))&&s.checkPut(this,d,h,t))){if(m=this._getDirection(t,i)==="vertical",r=T(h),D("dragOverValid"),y.eventCanceled)return v;if(a)return A=x,z(),this._hideClone(),D("revert"),y.eventCanceled||(st?x.insertBefore(h,st):x.appendChild(h)),P(!0);var G=ve(e,l.draggable);if(!G||vn(t,m,this)&&!G.animated){if(G===h)return P(!1);if(G&&e===t.target&&(i=G),i&&(o=T(i)),te(x,e,h,r,i,o,t,!!i)!==!1)return z(),G&&G.nextSibling?e.insertBefore(h,G.nextSibling):e.appendChild(h),A=e,ht(),P(!0)}else if(G&&mn(t,m,this)){var Se=vt(e,0,l,!0);if(Se===h)return P(!1);if(i=Se,o=T(i),te(x,e,h,r,i,o,t,!1)!==!1)return z(),e.insertBefore(h,Se),A=e,ht(),P(!0)}else if(i.parentNode===e){o=T(i);var wt=0,De,xn=h.parentNode!==e,Ti=!un(h.animated&&h.toRect||r,i.animated&&i.toRect||o,m),Oi=m?"top":"left",It=ci(i,"top","top")||ci(h,"top","top"),$n=It?It.scrollTop:void 0;_t!==i&&(De=o[Oi],Pt=!1,Zt=!Ti&&l.invertSwap||xn),wt=yn(t,i,o,m,Ti?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Zt,_t===i);var Mt;if(wt!==0){var Li=B(h);do Li-=wt,Mt=A.children[Li];while(Mt&&(g(Mt,"display")==="none"||Mt===b))}if(wt===0||Mt===i)return P(!1);_t=i,Ht=wt;var Hi=i.nextElementSibling,Nt=!1;Nt=wt===1;var ie=te(x,e,h,r,i,o,t,Nt);if(ie!==!1)return(ie===1||ie===-1)&&(Nt=ie===1),xe=!0,setTimeout(gn,30),z(),Nt&&!Hi?e.appendChild(h):i.parentNode.insertBefore(h,Nt?Hi:i),It&&rn(It,0,$n-It.scrollTop),A=h.parentNode,De!==void 0&&!Zt&&(qt=Math.abs(De-T(i)[Oi])),ht(),P(!0)}if(e.contains(h))return P(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){w(document,"mousemove",this._onTouchMove),w(document,"touchmove",this._onTouchMove),w(document,"pointermove",this._onTouchMove),w(document,"dragover",dt),w(document,"mousemove",dt),w(document,"touchmove",dt)},_offUpEvents:function(){var t=this.el.ownerDocument;w(t,"mouseup",this._onDrop),w(t,"touchend",this._onDrop),w(t,"pointerup",this._onDrop),w(t,"touchcancel",this._onDrop),w(document,"selectstart",this)},_onDrop:function(t){var e=this.el,i=this.options;if(V=B(h),tt=B(h,i.draggable),N("drop",this,{evt:t}),A=h&&h.parentNode,V=B(h),tt=B(h,i.draggable),y.eventCanceled){this._nulling();return}Et=!1,Zt=!1,Pt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ae(this.cloneId),Ae(this._dragStartId),this.nativeDraggable&&(w(document,"drop",this),w(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),zt&&g(document.body,"user-select",""),g(h,"transform",""),t&&(Lt&&(t.cancelable&&t.preventDefault(),!i.dropBubble&&t.stopPropagation()),b&&b.parentNode&&b.parentNode.removeChild(b),(x===A||L&&L.lastPutMode!=="clone")&&$&&$.parentNode&&$.parentNode.removeChild($),h&&(this.nativeDraggable&&w(h,"dragend",this),$e(h),h.style["will-change"]="",Lt&&!Et&&k(h,L?L.options.ghostClass:this.options.ghostClass,!1),k(h,this.options.chosenClass,!1),I({sortable:this,name:"unchoose",toEl:A,newIndex:null,newDraggableIndex:null,originalEvent:t}),x!==A?(V>=0&&(I({rootEl:A,name:"add",toEl:A,fromEl:x,originalEvent:t}),I({sortable:this,name:"remove",toEl:A,originalEvent:t}),I({rootEl:A,name:"sort",toEl:A,fromEl:x,originalEvent:t}),I({sortable:this,name:"sort",toEl:A,originalEvent:t})),L&&L.save()):V!==bt&&V>=0&&(I({sortable:this,name:"update",toEl:A,originalEvent:t}),I({sortable:this,name:"sort",toEl:A,originalEvent:t})),y.active&&((V==null||V===-1)&&(V=bt,tt=Ot),I({sortable:this,name:"end",toEl:A,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),x=h=A=b=st=$=Xt=Q=lt=F=Lt=V=tt=bt=Ot=_t=Ht=L=Yt=y.dragged=y.ghost=y.clone=y.active=null,Kt.forEach(function(t){t.checked=!0}),Kt.length=_e=we=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),fn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,i=this.el.children,r=0,o=i.length,a=this.options;r<o;r++)e=i[r],X(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||En(e));return t},sort:function(t,e){var i={},r=this.el;this.toArray().forEach(function(o,a){var l=r.children[a];X(l,this.options.draggable,r,!1)&&(i[o]=l)},this),e&&this.captureAnimationState(),t.forEach(function(o){i[o]&&(r.removeChild(i[o]),r.appendChild(i[o]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return X(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var i=this.options;if(e===void 0)return i[t];var r=Tt.modifyOption(this,t,e);typeof r<"u"?i[t]=r:i[t]=e,t==="group"&&_i(i)},destroy:function(){N("destroy",this);var t=this.el;t[R]=null,w(t,"mousedown",this._onTapStart),w(t,"touchstart",this._onTapStart),w(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(w(t,"dragover",this),w(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Gt.splice(Gt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Q){if(N("hideClone",this),y.eventCanceled)return;g($,"display","none"),this.options.removeCloneOnHide&&$.parentNode&&$.parentNode.removeChild($),Q=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),y.eventCanceled)return;h.parentNode==x&&!this.options.group.revertClone?x.insertBefore($,h):st?x.insertBefore($,st):x.appendChild($),this.options.group.revertClone&&this.animate(h,$),g($,"display",""),Q=!1}}};function fn(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function te(n,t,e,i,r,o,a,l){var s,d=n[R],c=d.options.onMove,u;return window.CustomEvent&&!K&&!Ft?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=n,s.dragged=e,s.draggedRect=i,s.related=r||t,s.relatedRect=o||T(t),s.willInsertAfter=l,s.originalEvent=a,n.dispatchEvent(s),c&&(u=c.call(d,s,a)),u}function $e(n){n.draggable=!1}function gn(){xe=!1}function mn(n,t,e){var i=T(vt(e.el,0,e.options,!0)),r=10;return t?n.clientX<i.left-r||n.clientY<i.top&&n.clientX<i.right:n.clientY<i.top-r||n.clientY<i.bottom&&n.clientX<i.left}function vn(n,t,e){var i=T(ve(e.el,e.options.draggable)),r=10;return t?n.clientX>i.right+r||n.clientX<=i.right&&n.clientY>i.bottom&&n.clientX>=i.left:n.clientX>i.right&&n.clientY>i.top||n.clientX<=i.right&&n.clientY>i.bottom+r}function yn(n,t,e,i,r,o,a,l){var s=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(!a){if(l&&qt<d*r){if(!Pt&&(Ht===1?s>c+d*o/2:s<u-d*o/2)&&(Pt=!0),Pt)p=!0;else if(Ht===1?s<c+qt:s>u-qt)return-Ht}else if(s>c+d*(1-r)/2&&s<u-d*(1-r)/2)return bn(t)}return p=p||a,p&&(s<c+d*o/2||s>u-d*o/2)?s>c+d/2?1:-1:0}function bn(n){return B(h)<B(n)?1:-1}function En(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 _n(n){Kt.length=0;for(var t=n.getElementsByTagName("input"),e=t.length;e--;){var i=t[e];i.checked&&Kt.push(i)}}function ee(n){return setTimeout(n,0)}function Ae(n){return clearTimeout(n)}Jt&&C(document,"touchmove",function(n){(y.active||Et)&&n.cancelable&&n.preventDefault()}),y.utils={on:C,off:w,css:g,find:ui,is:function(t,e){return!!X(t,e,t,!1)},extend:en,throttle:nn,closest:X,toggleClass:k,clone:gi,index:B,nextTick:ee,cancelNextTick:Ae,detectDirection:Ei,getChild:vt},y.get=function(n){return n[R]},y.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&&(y.utils=j(j({},y.utils),i.utils)),Tt.mount(i)})},y.create=function(n,t){return new y(n,t)},y.version=Ji;var xi=function(t){var e=t.originalEvent,i=t.putSortable,r=t.dragEl,o=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var d=i||o;l();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);s(),d&&!d.el.contains(u)&&(a("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function $i(){}$i.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 r=vt(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),i&&i.animateAll()},drop:xi},q($i,{pluginName:"revertOnSpill"});function Ai(){}Ai.prototype={onSpill:function(t){var e=t.dragEl,i=t.putSortable,r=i||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:xi},q(Ai,{pluginName:"removeOnSpill"});const Si=`
61
61
  :host {
62
62
  display: block;
63
63
  }
@@ -291,6 +291,67 @@ summary > .layer {
291
291
  margin-left: -1px;
292
292
  }
293
293
 
294
+ [data-layerconfig] button {
295
+ margin-left: 64px;
296
+ margin-bottom: 21px;
297
+ margin-top: 9px;
298
+ }
299
+
300
+ label[for=optional] {
301
+ font-size: 21px;
302
+ font-weight: 400;
303
+ margin-bottom: 9px;
304
+ display: block;
305
+ }
306
+ select[name=optional] {
307
+ margin-right: 6px;
308
+ margin-bottom: 18px;
309
+ height: 36px;
310
+ }
311
+
312
+ // Style adjacent button
313
+ select[name=optional] + button {
314
+ width: 20px;
315
+ }
316
+
317
+ .slider-control + details {
318
+ margin-left: 60px;
319
+ }
320
+
321
+ .slider-control + details summary {
322
+ color: #3B6289;
323
+ font-size: 14px;
324
+ display: flex;
325
+ flex-direction: row;
326
+ align-items: center;
327
+ font-weight: 500;
328
+ margin-bottom: 15px;
329
+ }
330
+
331
+ .slider-control + details li {
332
+ display: flex;
333
+ height: 30px;
334
+ flex-direction: row;
335
+ align-items: center;
336
+ border-top: none;
337
+ }
338
+
339
+ .slider-control + details li > div {
340
+ width: 124px;
341
+ }
342
+
343
+ .slider-control + details summary::before {
344
+ display: block;
345
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
346
+ font-size: 13px;
347
+ width: 24px;
348
+ height: 24px;
349
+ transform-origin: center;
350
+ }
351
+ .slider-control + details[open] > summary:before {
352
+ transform: rotate(90deg);
353
+ }
354
+
294
355
  [data-type=group] .title::before {
295
356
  content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236889A0' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-outline%3C/title%3E%3Cpath d='M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z' /%3E%3C/svg%3E");
296
357
  }
@@ -427,7 +488,7 @@ li.sortable-drag {
427
488
  }
428
489
  li.sortable-ghost {
429
490
  }
430
- `;var wn=Object.defineProperty,Cn=Object.getOwnPropertyDescriptor,S=(n,t,e,i)=>{for(var r=i>1?void 0:i?Cn(t,e):t,o=n.length-1,a;o>=0;o--)(a=n[o])&&(r=(i?a(t,e,r):a(r))||r);return i&&r&&wn(t,e,r),r};E.EOxLayerControl=class extends ft{constructor(){super(...arguments),this.for="eox-map",this.layerIdentifier="id",this.layerTitle="title",this.sortBy="layerOrder",this.layerConfig=["opacity"],this.externalLayerConfig=void 0,this.filterLayers=(t,e,i)=>{let r=[];const o=(a,l,s)=>{r=[...r,...a.filter(c=>c.get(l)===s)];const d=a.filter(c=>c.getLayers);return d.length>0&&d.forEach(c=>o(c.getLayers().getArray(),l,s)),r};return o(t,e,i),r},this.findLayerById=(t,e)=>this.filterLayers(t,"id",e)[0],this.getLayerType=(t,e)=>t.getLayers?"group":e.getInteractions().getArray().filter(i=>i.freehand_!==void 0).map(i=>i.source_.ol_uid).includes(t.getSource?t.getSource().ol_uid:!1)?"draw":t.declutter_!==void 0?"vector":"raster"}_updateControl(t){const e=i=>{i.forEach(r=>{r.get(this.layerIdentifier)||r.set(this.layerIdentifier,r.ol_uid),r.get(this.layerTitle)||r.set(this.layerTitle,`layer ${r.ol_uid}`),r.getLayers&&e(r.getLayers().getArray())})};e(t.getArray()),this.layerCollection=t,this.optionalLayerArray=this.filterLayers(t.getArray(),"layerControlOptional",!0),this.requestUpdate()}_emitLayerconfig(t){const e={detail:{layer:t},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("layerconfig",e))}changeOpacity(t,e){t.setOpacity(e)}changeStyleProperty(t,e,i){t.updateStyleVariables({...t.style_,[e]:i})}preFilterLayers(t){return[...t].filter(e=>e.get("layerControlHide")!==!0&&e.get("layerControlOptional")!==!0)}toggleLayerVisibility(t,e){if(t.setVisible(!t.getVisible()),t.get("layerControlExclusive")){let i=[];e?i=this.findLayerById(this.layerCollection.getArray(),e).getLayers().getArray().filter(o=>o.get(this.layerIdentifier)!==t.get(this.layerIdentifier)&&o.get("layerControlExclusive")):i=this.layerCollection.getArray().filter(r=>r.get(this.layerIdentifier)!==t.get(this.layerIdentifier)&&r.get("layerControlExclusive")),i.forEach(r=>{r.setVisible(!1)})}this.requestUpdate()}render(){var o;const t=document.querySelector(this.for);if(t&&(this.olMap=(t==null?void 0:t.map)||t),!this.olMap)return _;const e=this.olMap.getLayers();this._updateControl(e),e.on("change:length",()=>{this._currentlySorting||this._updateControl(e)});const i=(a,l)=>{var s;return O`
491
+ `;var wn=Object.defineProperty,Cn=Object.getOwnPropertyDescriptor,S=(n,t,e,i)=>{for(var r=i>1?void 0:i?Cn(t,e):t,o=n.length-1,a;o>=0;o--)(a=n[o])&&(r=(i?a(t,e,r):a(r))||r);return i&&r&&wn(t,e,r),r};E.EOxLayerControl=class extends ft{constructor(){super(...arguments),this.for="eox-map",this.layerIdentifier="id",this.layerTitle="title",this.sortBy="layerOrder",this.layerConfig=["opacity"],this.externalLayerConfig=void 0,this.filterLayers=(t,e,i)=>{let r=[];const o=(a,l,s)=>{r=[...r,...a.filter(c=>c.get(l)===s)];const d=a.filter(c=>c.getLayers);return d.length>0&&d.forEach(c=>o(c.getLayers().getArray(),l,s)),r};return o(t,e,i),r},this.findLayerById=(t,e)=>this.filterLayers(t,"id",e)[0],this.getLayerType=(t,e)=>{var i;return t.getLayers?"group":e.getInteractions().getArray().filter(r=>r.freehand_!==void 0).map(r=>{var o;return(o=r.source_)==null?void 0:o.ol_uid}).includes(t.getSource?(i=t.getSource())==null?void 0:i.ol_uid:!1)?"draw":t.declutter_!==void 0?"vector":"raster"}}_updateControl(t){const e=i=>{i.forEach(r=>{r.get(this.layerIdentifier)||r.set(this.layerIdentifier,r.ol_uid),r.get(this.layerTitle)||r.set(this.layerTitle,`layer ${r.ol_uid}`),r.getLayers&&e(r.getLayers().getArray())})};e(t.getArray()),this.layerCollection=t,this.optionalLayerArray=this.filterLayers(t.getArray(),"layerControlOptional",!0),this.requestUpdate()}_emitLayerconfig(t){const e={detail:{layer:t},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("layerconfig",e))}changeOpacity(t,e){t.setOpacity(e)}changeStyleProperty(t,e,i){t.updateStyleVariables({...t.style_,[e]:i})}preFilterLayers(t){return[...t].filter(e=>e.get("layerControlHide")!==!0&&e.get("layerControlOptional")!==!0)}toggleLayerVisibility(t,e){if(t.setVisible(!t.getVisible()),t.get("layerControlExclusive")){let i=[];e?i=this.findLayerById(this.layerCollection.getArray(),e).getLayers().getArray().filter(o=>o.get(this.layerIdentifier)!==t.get(this.layerIdentifier)&&o.get("layerControlExclusive")):i=this.layerCollection.getArray().filter(r=>r.get(this.layerIdentifier)!==t.get(this.layerIdentifier)&&r.get("layerControlExclusive")),i.forEach(r=>{r.setVisible(!1)})}this.requestUpdate()}render(){var o;const t=document.querySelector(this.for);if(t&&(this.olMap=(t==null?void 0:t.map)||t),!this.olMap)return _;const e=this.olMap.getLayers();this._updateControl(e),e.on("change:length",()=>{this._currentlySorting||this._updateControl(e)});const i=(a,l)=>{var s;return O`
431
492
  <details>
432
493
  <summary>
433
494
  <div class="layer">
@@ -495,7 +556,7 @@ li.sortable-ghost {
495
556
  ${ri(((o=this.optionalLayerArray)==null?void 0:o.length)>0,()=>O`
496
557
  <label for="optional">Optional layers</label>
497
558
 
498
- <select name="optional">
559
+ <select name="optional" data-cy="optionalLayers">
499
560
  <option disabled selected value>
500
561
  -- select an optional layer to add --
501
562
  </option>
@@ -514,7 +575,7 @@ li.sortable-ghost {
514
575
  </button>
515
576
  `)}
516
577
  </div>
517
- `}updated(){this.sortBy=="layerOrder"&&this.renderRoot.querySelectorAll("ul").forEach(e=>{const i=e.dataset.group;y.create(e,{handle:this.unstyled?"summary":".drag-handle",dataIdAttr:"data-layer",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",store:{get:()=>i?[...this.findLayerById(this.layerCollection.getArray(),i).getLayers().getArray().map(a=>a.get(this.layerIdentifier))].reverse():[...this.layerCollection.getArray().map(r=>r.get(this.layerIdentifier))].reverse(),set:r=>{var o=r.toArray().reverse();o.forEach((a,l)=>{if(i){const d=this.findLayerById(this.layerCollection.getArray(),i).getLayers(),c=this.findLayerById(d.getArray(),a);d.remove(c),d.insertAt(l,c)}else{const s=this.findLayerById(this.layerCollection.getArray(),a);this.layerCollection.remove(s),this.layerCollection.insertAt(l,s)}})}},onMove:r=>!r.related.dataset.disabled})})}},S([gt()],E.EOxLayerControl.prototype,"olMap",2),S([gt()],E.EOxLayerControl.prototype,"layerCollection",2),S([gt()],E.EOxLayerControl.prototype,"layerArray",2),S([gt()],E.EOxLayerControl.prototype,"optionalLayerArray",2),S([M()],E.EOxLayerControl.prototype,"for",2),S([M()],E.EOxLayerControl.prototype,"layerIdentifier",2),S([M()],E.EOxLayerControl.prototype,"layerTitle",2),S([M()],E.EOxLayerControl.prototype,"sortBy",2),S([M({type:Array})],E.EOxLayerControl.prototype,"layerConfig",2),S([M({type:Boolean})],E.EOxLayerControl.prototype,"externalLayerConfig",2),S([M({type:Boolean})],E.EOxLayerControl.prototype,"unstyled",2),E.EOxLayerControl=S([Je("eox-layercontrol")],E.EOxLayerControl),E.EOxLayerConfig=class extends ft{constructor(){super(...arguments),this._configList={}}_handleInput(t,e){e==="opacity"?this._layerControlElement.changeOpacity(this._currentLayer,parseFloat(t.target.value)):this._layerControlElement.changeStyleProperty(this._currentLayer,e,parseFloat(t.target.value))}_parseConfigs(t){if(!t)return;const e=t.style_;e&&e.color&&e.color[0]==="array"&&(this._configList=e.variables)}connectedCallback(){super.connectedCallback(),!this.layerConfig&&!this.layerControl?(this._layerControlElement=document.querySelector(this.for),this._layerControlElement&&(this.layerConfig=this._layerControlElement.layerConfig,this._layerControlElement.addEventListener("layerconfig",t=>{this._currentLayer=t.detail.layer,this._parseConfigs(this._currentLayer),this.requestUpdate()}))):(this._layerControlElement=this.layerControl,this._currentLayer=this.layer,this._parseConfigs(this._currentLayer))}render(){return O`
578
+ `}updated(){this.sortBy=="layerOrder"&&this.renderRoot.querySelectorAll("ul").forEach(e=>{const i=e.dataset.group;y.create(e,{handle:this.unstyled?"summary":".drag-handle",dataIdAttr:"data-layer",filter:".drag-handle.disabled",swapThreshold:.5,animation:150,easing:"cubic-bezier(1, 0, 0, 1)",store:{get:()=>i?[...this.findLayerById(this.layerCollection.getArray(),i).getLayers().getArray().map(a=>a.get(this.layerIdentifier))].reverse():[...this.layerCollection.getArray().map(r=>r.get(this.layerIdentifier))].reverse(),set:r=>{r.toArray().reverse().forEach((a,l)=>{if(i){const d=this.findLayerById(this.layerCollection.getArray(),i).getLayers(),c=this.findLayerById(d.getArray(),a);d.remove(c),d.insertAt(l,c)}else{const s=this.findLayerById(this.layerCollection.getArray(),a);this.layerCollection.remove(s),this.layerCollection.insertAt(l,s)}})}},onMove:r=>!r.related.dataset.disabled})})}},S([gt()],E.EOxLayerControl.prototype,"olMap",2),S([gt()],E.EOxLayerControl.prototype,"layerCollection",2),S([gt()],E.EOxLayerControl.prototype,"layerArray",2),S([gt()],E.EOxLayerControl.prototype,"optionalLayerArray",2),S([M()],E.EOxLayerControl.prototype,"for",2),S([M()],E.EOxLayerControl.prototype,"layerIdentifier",2),S([M()],E.EOxLayerControl.prototype,"layerTitle",2),S([M()],E.EOxLayerControl.prototype,"sortBy",2),S([M({type:Array})],E.EOxLayerControl.prototype,"layerConfig",2),S([M({type:Boolean})],E.EOxLayerControl.prototype,"externalLayerConfig",2),S([M({type:Boolean})],E.EOxLayerControl.prototype,"unstyled",2),E.EOxLayerControl=S([Je("eox-layercontrol")],E.EOxLayerControl),E.EOxLayerConfig=class extends ft{constructor(){super(...arguments),this._configList={}}_handleInput(t,e){e==="opacity"?this._layerControlElement.changeOpacity(this._currentLayer,parseFloat(t.target.value)):this._layerControlElement.changeStyleProperty(this._currentLayer,e,parseFloat(t.target.value))}_parseConfigs(t){if(!t)return;const e=t.style_;e&&e.color&&e.color[0]==="array"&&(this._configList=e.variables)}connectedCallback(){super.connectedCallback(),!this.layerConfig&&!this.layerControl?(this._layerControlElement=document.querySelector(this.for),this._layerControlElement&&(this.layerConfig=this._layerControlElement.layerConfig,this._layerControlElement.addEventListener("layerconfig",t=>{this._currentLayer=t.detail.layer,this._parseConfigs(this._currentLayer),this.requestUpdate()}))):(this._layerControlElement=this.layerControl,this._currentLayer=this.layer,this._parseConfigs(this._currentLayer))}render(){return O`
518
579
  <style>
519
580
  ${Si}
520
581
  ${!this.unstyled&&Di}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/layercontrol",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@eox/eslint-config": "^1.0.0",
@@ -0,0 +1,49 @@
1
+ const mockLayer = (layerId: number) =>
2
+ <{ [key: string]: any }>{
3
+ get(prop: string): any {
4
+ return this[prop];
5
+ },
6
+ getOpacity() {
7
+ return this.opacity;
8
+ },
9
+ getVisible() {
10
+ return this.visible;
11
+ },
12
+ title: `layer ${layerId}`,
13
+ id: layerId,
14
+ layerControlDisable: undefined,
15
+ layerControlExclusive: undefined,
16
+ layerControlHide: undefined,
17
+ layerControlOptional: undefined,
18
+ opacity: 1,
19
+ set: () => {},
20
+ setVisible(visible: boolean) {
21
+ this.visible = visible;
22
+ },
23
+ visible: true,
24
+ };
25
+
26
+ export class MockMap extends HTMLElement {
27
+ constructor() {
28
+ super();
29
+ }
30
+ layers: Array<any> = [];
31
+ events: { [key: string]: any } = {};
32
+ map = {
33
+ getInteractions: () => ({
34
+ getArray: () => [{}],
35
+ }),
36
+ getLayers: () => ({
37
+ getArray: () => this.layers,
38
+ on: (event: string, fun: Function) => (this.events[event] = fun),
39
+ }),
40
+ };
41
+ setLayers = (layers: Array<any>) => {
42
+ this.layers = layers.map((l, index) => ({
43
+ ...mockLayer(index),
44
+ ...l,
45
+ }));
46
+ this.events["change:length"]();
47
+ };
48
+ }
49
+ customElements.define("mock-map", MockMap);
@@ -0,0 +1,87 @@
1
+ import "../src/main";
2
+ import "./_mockMap";
3
+
4
+ describe("LayerControl", () => {
5
+ beforeEach(() => {
6
+ cy.mount("<mock-map></mock-map>").as("mock-map");
7
+ cy.mount(
8
+ `
9
+ <eox-layercontrol for="mock-map"></eox-layercontrol>`
10
+ ).as("eox-layercontrol");
11
+ });
12
+
13
+ it("loads the layercontrol", () => {
14
+ cy.get("eox-layercontrol").shadow();
15
+ });
16
+
17
+ it("displays the correct amount of layers", () => {
18
+ cy.get("mock-map").and(($el) => {
19
+ (<MockMap>$el[0]).setLayers([{ visible: true }, { visible: false }]);
20
+ });
21
+ cy.get("eox-layercontrol")
22
+ .shadow()
23
+ .within(() => {
24
+ cy.get(".layers").find("li").should("have.length", 2);
25
+ cy.get(".layers")
26
+ .find("input[type=checkbox]:checked")
27
+ .should("have.length", 1);
28
+ });
29
+ });
30
+
31
+ it("hides layers correctly", () => {
32
+ cy.get("mock-map").and(($el) => {
33
+ (<MockMap>$el[0]).setLayers([
34
+ { visible: true },
35
+ { layerControlHide: true },
36
+ ]);
37
+ });
38
+ cy.get("eox-layercontrol")
39
+ .shadow()
40
+ .within(() => {
41
+ cy.get("ul").find("li").should("have.length", 1);
42
+ });
43
+ });
44
+
45
+ it("renders the optional layer selection", () => {
46
+ cy.get("mock-map").and(($el) => {
47
+ (<MockMap>$el[0]).setLayers([
48
+ { visible: true },
49
+ { layerControlOptional: true },
50
+ ]);
51
+ });
52
+ cy.get("eox-layercontrol")
53
+ .shadow()
54
+ .within(() => {
55
+ cy.get("[data-cy='optionalLayers']").should("exist");
56
+ cy.get("[data-cy='optionalLayers']")
57
+ .find("option:not([disabled])")
58
+ .should("have.length", 1);
59
+ });
60
+ });
61
+
62
+ it("disables the drag handle of the disabled layer", () => {
63
+ cy.get("mock-map").and(($el) => {
64
+ (<MockMap>$el[0]).setLayers([
65
+ { visible: true },
66
+ { layerControlDisable: true },
67
+ ]);
68
+ });
69
+ cy.get("eox-layercontrol")
70
+ .shadow()
71
+ .within(() => {
72
+ cy.get(".drag-handle.disabled").should("have.length", 1);
73
+ });
74
+ });
75
+
76
+ it("shows the correct layer titles", () => {
77
+ cy.get("mock-map").and(($el) => {
78
+ (<MockMap>$el[0]).setLayers([{ title: "foo" }, { title: "bar" }]);
79
+ });
80
+ cy.get("eox-layercontrol")
81
+ .shadow()
82
+ .within(() => {
83
+ cy.get(".layer").find(".title").contains("foo");
84
+ cy.get(".layer").find(".title").contains("bar");
85
+ });
86
+ });
87
+ });
@@ -1,44 +0,0 @@
1
- import { EOxMap } from "../../map/main";
2
- import mapIntegrationJson from "./mapIntegration.json";
3
- import { Map } from "ol";
4
-
5
- describe("Layer Control", () => {
6
- beforeEach(() => {
7
- cy.visit("/elements/layercontrol/test/mapIntegration.html");
8
- });
9
-
10
- it("loads the layercontrol", () => {
11
- let eoxMap: EOxMap;
12
- let olMap: Map;
13
- cy.get("eox-map").should(($el) => {
14
- eoxMap = <EOxMap>$el[0];
15
- // @ts-ignore
16
- olMap = eoxMap.map;
17
- const applyLayers = () => {
18
- eoxMap.setLayers(mapIntegrationJson);
19
- olMap
20
- .getLayers()
21
- .getArray()
22
- .forEach((layer, index) => {
23
- layer.set("name", "Layer " + index);
24
- layer.set("id", "layer" + index);
25
- });
26
- };
27
- applyLayers();
28
- const layers = olMap.getLayers();
29
-
30
- setTimeout(() => {
31
- eoxMap.setLayers(layers.removeAt(layers.getArray().length - 1));
32
- }, 2000);
33
- setTimeout(() => {
34
- eoxMap.setLayers(layers.removeAt(layers.getArray().length - 1));
35
- }, 4000);
36
- setTimeout(() => {
37
- eoxMap.setLayers(layers.removeAt(layers.getArray().length - 1));
38
- }, 6000);
39
- setTimeout(() => {
40
- applyLayers();
41
- }, 8000);
42
- });
43
- });
44
- });
@@ -1,72 +0,0 @@
1
- import GeoTIFF from "ol/source/GeoTIFF.js";
2
- import TileLayer from "ol/layer/WebGLTile.js";
3
- import { EOxMap } from "../../map/main";
4
- import { Map } from "ol";
5
- import BaseLayer from "ol/layer/Base";
6
-
7
- // const channels = ['red', 'green', 'blue'];
8
-
9
- function getVariables() {
10
- // const variables = {};
11
- // for (const channel of channels) {
12
- // const selector = document.getElementById(channel);
13
- // variables[channel] = parseInt(selector.value, 10);
14
-
15
- // const inputId = `${channel}Max`;
16
- // const input = document.getElementById(inputId);
17
- // variables[inputId] = parseInt(input.value, 10);
18
- // }
19
- return {
20
- red: 1,
21
- green: 2,
22
- blue: 3,
23
- redMax: 3000,
24
- greenMax: 3000,
25
- blueMax: 3000,
26
- };
27
- // return variables;
28
- }
29
-
30
- const cogLayer = new TileLayer({
31
- style: {
32
- variables: getVariables(),
33
- color: [
34
- "array",
35
- ["/", ["band", ["var", "red"]], ["var", "redMax"]],
36
- ["/", ["band", ["var", "green"]], ["var", "greenMax"]],
37
- ["/", ["band", ["var", "blue"]], ["var", "blueMax"]],
38
- 1,
39
- ],
40
- },
41
- source: new GeoTIFF({
42
- normalize: false,
43
- sources: [
44
- {
45
- url: "https://s2downloads.eox.at/demo/EOxCloudless/2020/rgbnir/s2cloudless2020-16bits_sinlge-file_z0-4.tif",
46
- },
47
- ],
48
- }),
49
- });
50
-
51
- describe("Layer Control", () => {
52
- beforeEach(() => {
53
- cy.visit("/elements/layercontrol/test/mapIntegration.html");
54
- });
55
-
56
- it("loads the layercontrol", () => {
57
- let olMap: Map;
58
- cy.get("eox-map").should(($el) => {
59
- const eoxMap = <EOxMap>$el[0];
60
- // @ts-ignore
61
- olMap = eoxMap.map;
62
- olMap.addLayer(cogLayer);
63
- olMap
64
- .getLayers()
65
- .getArray()
66
- .forEach((layer: BaseLayer, index: number) => {
67
- layer.set("name", "Layer " + index);
68
- layer.set("id", "layer" + index);
69
- });
70
- });
71
- });
72
- });
@@ -1,35 +0,0 @@
1
- import { EOxMap } from "../../map/main";
2
- import mapIntegrationJson from "./mapIntegration.json";
3
-
4
- describe("Layer Control", () => {
5
- beforeEach(() => {
6
- cy.visit("/elements/layercontrol/test/mapIntegration.html");
7
- });
8
-
9
- it("loads the layercontrol", () => {
10
- let eoxMap: EOxMap;
11
- cy.get("eox-map").should(($el) => {
12
- eoxMap = <EOxMap>$el[0];
13
- // @ts-ignore
14
- const olMap = eoxMap.map;
15
- eoxMap.setLayers(mapIntegrationJson);
16
- olMap
17
- .getLayers()
18
- .getArray()
19
- .forEach((layer, index) => {
20
- layer.set("name", "Layer " + index);
21
- layer.set("id", "layer" + index);
22
- if (index === 0) {
23
- layer.set("baseLayer", true);
24
- }
25
- if (index === 1) {
26
- layer.set("extent", [-14000000, 2000000, -8000000, 7000000]);
27
- // layer.set("displayInLayerControl", false);
28
- }
29
- if (index === 2) {
30
- layer.setVisible(false);
31
- }
32
- });
33
- });
34
- });
35
- });