@eox/layercontrol 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,51 +1,51 @@
1
- (function(v,P){typeof exports=="object"&&typeof module<"u"?P(exports):typeof define=="function"&&define.amd?define(["exports"],P):(v=typeof globalThis<"u"?globalThis:v||self,P(v["eox-layercontrol"]={}))})(this,function(v){"use strict";var pi=Object.defineProperty;var gi=(v,P,X)=>P in v?pi(v,P,{enumerable:!0,configurable:!0,writable:!0,value:X}):v[P]=X;var D=(v,P,X)=>(gi(v,typeof P!="symbol"?P+"":P,X),X);/**
1
+ (function(b,W){typeof exports=="object"&&typeof module<"u"?W(exports):typeof define=="function"&&define.amd?define(["exports"],W):(b=typeof globalThis<"u"?globalThis:b||self,W(b["eox-layercontrol"]={}))})(this,function(b){"use strict";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const P=window,X=P.ShadowRoot&&(P.ShadyCSS===void 0||P.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,wt=Symbol(),St=new WeakMap;let yn=class{constructor(e,t,n){if(this._$cssResult$=!0,n!==wt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(X&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=St.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&St.set(t,e))}return e}toString(){return this.cssText}};const _n=i=>new yn(typeof i=="string"?i:i+"",void 0,wt),bn=(i,e)=>{X?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),o=P.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=t.cssText,i.appendChild(n)})},At=X?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return _n(t)})(i):i;/**
5
+ */const W=window,Qt=W.ShadowRoot&&(W.ShadyCSS===void 0||W.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,$e=Symbol(),we=new WeakMap;let vn=class{constructor(t,e,n){if(this._$cssResult$=!0,n!==$e)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Qt&&t===void 0){const n=e!==void 0&&e.length===1;n&&(t=we.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&we.set(e,t))}return t}toString(){return this.cssText}};const yn=i=>new vn(typeof i=="string"?i:i+"",void 0,$e),_n=(i,t)=>{Qt?i.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{const n=document.createElement("style"),r=W.litNonce;r!==void 0&&n.setAttribute("nonce",r),n.textContent=e.cssText,i.appendChild(n)})},Se=Qt?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return yn(e)})(i):i;/**
6
6
  * @license
7
7
  * Copyright 2017 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */var tt;const He=window,Dt=He.trustedTypes,En=Dt?Dt.emptyScript:"",Ot=He.reactiveElementPolyfillSupport,nt={toAttribute(i,e){switch(e){case Boolean:i=i?En:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch{t=null}}return t}},Tt=(i,e)=>e!==i&&(e==e||i==i),it={attribute:!0,type:String,converter:nt,reflect:!1,hasChanged:Tt},ot="finalized";let de=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const o=this._$Ep(n,t);o!==void 0&&(this._$Ev.set(o,n),e.push(o))}),e}static createProperty(e,t=it){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,o=this.getPropertyDescriptor(e,n,t);o!==void 0&&Object.defineProperty(this.prototype,e,o)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(o){const r=this[e];this[t]=o,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||it}static finalize(){if(this.hasOwnProperty(ot))return!1;this[ot]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const o of n)this.createProperty(o,t[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const o of n)t.unshift(At(o))}else e!==void 0&&t.push(At(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}u(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return bn(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=it){var o;const r=this.constructor._$Ep(e,n);if(r!==void 0&&n.reflect===!0){const a=(((o=n.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?n.converter:nt).toAttribute(t,n.type);this._$El=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$El=null}}_$AK(e,t){var n;const o=this.constructor,r=o._$Ev.get(e);if(r!==void 0&&this._$El!==r){const a=o.getPropertyOptions(r),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?a.converter:nt;this._$El=r,this[r]=l.fromAttribute(t,a.type),this._$El=null}}requestUpdate(e,t,n){let o=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Tt)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,r)=>this[r]=o),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(o=>{var r;return(r=o.hostUpdate)===null||r===void 0?void 0:r.call(o)}),this.update(n)):this._$Ek()}catch(o){throw t=!1,this._$Ek(),o}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var o;return(o=n.hostUpdated)===null||o===void 0?void 0:o.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}};de[ot]=!0,de.elementProperties=new Map,de.elementStyles=[],de.shadowRootOptions={mode:"open"},Ot==null||Ot({ReactiveElement:de}),((tt=He.reactiveElementVersions)!==null&&tt!==void 0?tt:He.reactiveElementVersions=[]).push("1.6.2");/**
9
+ */var te;const Nt=window,Ae=Nt.trustedTypes,bn=Ae?Ae.emptyScript:"",De=Nt.reactiveElementPolyfillSupport,ee={toAttribute(i,t){switch(t){case Boolean:i=i?bn:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Oe=(i,t)=>t!==i&&(t==t||i==i),ne={attribute:!0,type:String,converter:ee,reflect:!1,hasChanged:Oe},ie="finalized";let st=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach((e,n)=>{const r=this._$Ep(n,e);r!==void 0&&(this._$Ev.set(r,n),t.push(r))}),t}static createProperty(t,e=ne){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n=typeof t=="symbol"?Symbol():"__"+t,r=this.getPropertyDescriptor(t,n,e);r!==void 0&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(r){const o=this[t];this[e]=r,this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||ne}static finalize(){if(this.hasOwnProperty(ie))return!1;this[ie]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const e=this.properties,n=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(const r of n)this.createProperty(r,e[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const r of n)e.unshift(Se(r))}else t!==void 0&&e.push(Se(t));return e}static _$Ep(t,e){const n=e.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,n;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((n=t.hostConnected)===null||n===void 0||n.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;const e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return _n(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostConnected)===null||n===void 0?void 0:n.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var n;return(n=e.hostDisconnected)===null||n===void 0?void 0:n.call(e)})}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=ne){var r;const o=this.constructor._$Ep(t,n);if(o!==void 0&&n.reflect===!0){const a=(((r=n.converter)===null||r===void 0?void 0:r.toAttribute)!==void 0?n.converter:ee).toAttribute(e,n.type);this._$El=t,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._$El=null}}_$AK(t,e){var n;const r=this.constructor,o=r._$Ev.get(t);if(o!==void 0&&this._$El!==o){const a=r.getPropertyOptions(o),l=typeof a.converter=="function"?{fromAttribute:a.converter}:((n=a.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?a.converter:ee;this._$El=o,this[o]=l.fromAttribute(e,a.type),this._$El=null}}requestUpdate(t,e,n){let r=!0;t!==void 0&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||Oe)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),n.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,n))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((r,o)=>this[o]=r),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(t=this._$ES)===null||t===void 0||t.forEach(r=>{var o;return(o=r.hostUpdate)===null||o===void 0?void 0:o.call(r)}),this.update(n)):this._$Ek()}catch(r){throw e=!1,this._$Ek(),r}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(n=>{var r;return(r=n.hostUpdated)===null||r===void 0?void 0:r.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,n)=>this._$EO(n,this[n],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};st[ie]=!0,st.elementProperties=new Map,st.elementStyles=[],st.shadowRootOptions={mode:"open"},De==null||De({ReactiveElement:st}),((te=Nt.reactiveElementVersions)!==null&&te!==void 0?te:Nt.reactiveElementVersions=[]).push("1.6.2");/**
10
10
  * @license
11
11
  * Copyright 2017 Google LLC
12
12
  * SPDX-License-Identifier: BSD-3-Clause
13
- */var rt;const ke=window,he=ke.trustedTypes,xt=he?he.createPolicy("lit-html",{createHTML:i=>i}):void 0,at="$lit$",q=`lit$${(Math.random()+"").slice(9)}$`,Pt="?"+q,Cn=`<${Pt}>`,te=document,Ce=()=>te.createComment(""),$e=i=>i===null||typeof i!="object"&&typeof i!="function",It=Array.isArray,$n=i=>It(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",st=`[
14
- \f\r]`,we=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Lt=/-->/g,Nt=/>/g,ne=RegExp(`>|${st}(?:([^\\s"'>=/]+)(${st}*=${st}*(?:[^
15
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Mt=/'/g,Ht=/"/g,kt=/^(?:script|style|textarea|title)$/i,wn=i=>(e,...t)=>({_$litType$:i,strings:e,values:t}),M=wn(1),ue=Symbol.for("lit-noChange"),$=Symbol.for("lit-nothing"),Rt=new WeakMap,ie=te.createTreeWalker(te,129,null,!1),Sn=(i,e)=>{const t=i.length-1,n=[];let o,r=e===2?"<svg>":"",a=we;for(let s=0;s<t;s++){const d=i[s];let c,u,f=-1,b=0;for(;b<d.length&&(a.lastIndex=b,u=a.exec(d),u!==null);)b=a.lastIndex,a===we?u[1]==="!--"?a=Lt:u[1]!==void 0?a=Nt:u[2]!==void 0?(kt.test(u[2])&&(o=RegExp("</"+u[2],"g")),a=ne):u[3]!==void 0&&(a=ne):a===ne?u[0]===">"?(a=o??we,f=-1):u[1]===void 0?f=-2:(f=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?ne:u[3]==='"'?Ht:Mt):a===Ht||a===Mt?a=ne:a===Lt||a===Nt?a=we:(a=ne,o=void 0);const _=a===ne&&i[s+1].startsWith("/>")?" ":"";r+=a===we?d+Cn:f>=0?(n.push(c),d.slice(0,f)+at+d.slice(f)+q+_):d+q+(f===-2?(n.push(void 0),s):_)}const l=r+(i[t]||"<?>")+(e===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[xt!==void 0?xt.createHTML(l):l,n]};class Se{constructor({strings:e,_$litType$:t},n){let o;this.parts=[];let r=0,a=0;const l=e.length-1,s=this.parts,[d,c]=Sn(e,t);if(this.el=Se.createElement(d,n),ie.currentNode=this.el.content,t===2){const u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(o=ie.nextNode())!==null&&s.length<l;){if(o.nodeType===1){if(o.hasAttributes()){const u=[];for(const f of o.getAttributeNames())if(f.endsWith(at)||f.startsWith(q)){const b=c[a++];if(u.push(f),b!==void 0){const _=o.getAttribute(b.toLowerCase()+at).split(q),y=/([.?@])?(.*)/.exec(b);s.push({type:1,index:r,name:y[2],strings:_,ctor:y[1]==="."?Dn:y[1]==="?"?Tn:y[1]==="@"?xn:Re})}else s.push({type:6,index:r})}for(const f of u)o.removeAttribute(f)}if(kt.test(o.tagName)){const u=o.textContent.split(q),f=u.length-1;if(f>0){o.textContent=he?he.emptyScript:"";for(let b=0;b<f;b++)o.append(u[b],Ce()),ie.nextNode(),s.push({type:2,index:++r});o.append(u[f],Ce())}}}else if(o.nodeType===8)if(o.data===Pt)s.push({type:2,index:r});else{let u=-1;for(;(u=o.data.indexOf(q,u+1))!==-1;)s.push({type:7,index:r}),u+=q.length-1}r++}}static createElement(e,t){const n=te.createElement("template");return n.innerHTML=e,n}}function ce(i,e,t=i,n){var o,r,a,l;if(e===ue)return e;let s=n!==void 0?(o=t._$Co)===null||o===void 0?void 0:o[n]:t._$Cl;const d=$e(e)?void 0:e._$litDirective$;return(s==null?void 0:s.constructor)!==d&&((r=s==null?void 0:s._$AO)===null||r===void 0||r.call(s,!1),d===void 0?s=void 0:(s=new d(i),s._$AT(i,t,n)),n!==void 0?((a=(l=t)._$Co)!==null&&a!==void 0?a:l._$Co=[])[n]=s:t._$Cl=s),s!==void 0&&(e=ce(i,s._$AS(i,e.values),s,n)),e}class An{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:o}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:te).importNode(n,!0);ie.currentNode=r;let a=ie.nextNode(),l=0,s=0,d=o[0];for(;d!==void 0;){if(l===d.index){let c;d.type===2?c=new Ae(a,a.nextSibling,this,e):d.type===1?c=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(c=new Pn(a,this,e)),this._$AV.push(c),d=o[++s]}l!==(d==null?void 0:d.index)&&(a=ie.nextNode(),l++)}return ie.currentNode=te,r}v(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class Ae{constructor(e,t,n,o){var r;this.type=2,this._$AH=$,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=o,this._$Cp=(r=o==null?void 0:o.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=ce(this,e,t),$e(e)?e===$||e==null||e===""?(this._$AH!==$&&this._$AR(),this._$AH=$):e!==this._$AH&&e!==ue&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):$n(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==$&&$e(this._$AH)?this._$AA.nextSibling.data=e:this.$(te.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:o}=e,r=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Se.createElement(o.h,this.options)),o);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(n);else{const a=new An(r,this),l=a.u(this.options);a.v(n),this.$(l),this._$AH=a}}_$AC(e){let t=Rt.get(e.strings);return t===void 0&&Rt.set(e.strings,t=new Se(e)),t}T(e){It(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,o=0;for(const r of e)o===t.length?t.push(n=new Ae(this.k(Ce()),this.k(Ce()),this,this.options)):n=t[o],n._$AI(r),o++;o<t.length&&(this._$AR(n&&n._$AB.nextSibling,o),t.length=o)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){const o=e.nextSibling;e.remove(),e=o}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class Re{constructor(e,t,n,o,r){this.type=1,this._$AH=$,this._$AN=void 0,this.element=e,this.name=t,this._$AM=o,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=$}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,o){const r=this.strings;let a=!1;if(r===void 0)e=ce(this,e,t,0),a=!$e(e)||e!==this._$AH&&e!==ue,a&&(this._$AH=e);else{const l=e;let s,d;for(e=r[0],s=0;s<r.length-1;s++)d=ce(this,l[n+s],t,s),d===ue&&(d=this._$AH[s]),a||(a=!$e(d)||d!==this._$AH[s]),d===$?e=$:e!==$&&(e+=(d??"")+r[s+1]),this._$AH[s]=d}a&&!o&&this.j(e)}j(e){e===$?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Dn extends Re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===$?void 0:e}}const On=he?he.emptyScript:"";class Tn extends Re{constructor(){super(...arguments),this.type=4}j(e){e&&e!==$?this.element.setAttribute(this.name,On):this.element.removeAttribute(this.name)}}class xn extends Re{constructor(e,t,n,o,r){super(e,t,n,o,r),this.type=5}_$AI(e,t=this){var n;if((e=(n=ce(this,e,t,0))!==null&&n!==void 0?n:$)===ue)return;const o=this._$AH,r=e===$&&o!==$||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==$&&(o===$||r);r&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}}class Pn{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){ce(this,e)}}const Bt=ke.litHtmlPolyfillSupport;Bt==null||Bt(Se,Ae),((rt=ke.litHtmlVersions)!==null&&rt!==void 0?rt:ke.litHtmlVersions=[]).push("2.7.4");const In=(i,e,t)=>{var n,o;const r=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let a=r._$litPart$;if(a===void 0){const l=(o=t==null?void 0:t.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=a=new Ae(e.insertBefore(Ce(),l),l,void 0,t??{})}return a._$AI(i),a};/**
13
+ */var re;const Mt=window,lt=Mt.trustedTypes,Te=lt?lt.createPolicy("lit-html",{createHTML:i=>i}):void 0,oe="$lit$",Y=`lit$${(Math.random()+"").slice(9)}$`,xe="?"+Y,En=`<${xe}>`,Q=document,bt=()=>Q.createComment(""),Et=i=>i===null||typeof i!="object"&&typeof i!="function",Le=Array.isArray,Cn=i=>Le(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",ae=`[
14
+ \f\r]`,Ct=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Pe=/-->/g,Ie=/>/g,tt=RegExp(`>|${ae}(?:([^\\s"'>=/]+)(${ae}*=${ae}*(?:[^
15
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Ne=/'/g,Me=/"/g,He=/^(?:script|style|textarea|title)$/i,$n=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),P=$n(1),dt=Symbol.for("lit-noChange"),C=Symbol.for("lit-nothing"),ke=new WeakMap,et=Q.createTreeWalker(Q,129,null,!1),wn=(i,t)=>{const e=i.length-1,n=[];let r,o=t===2?"<svg>":"",a=Ct;for(let s=0;s<e;s++){const d=i[s];let c,u,f=-1,_=0;for(;_<d.length&&(a.lastIndex=_,u=a.exec(d),u!==null);)_=a.lastIndex,a===Ct?u[1]==="!--"?a=Pe:u[1]!==void 0?a=Ie:u[2]!==void 0?(He.test(u[2])&&(r=RegExp("</"+u[2],"g")),a=tt):u[3]!==void 0&&(a=tt):a===tt?u[0]===">"?(a=r??Ct,f=-1):u[1]===void 0?f=-2:(f=a.lastIndex-u[2].length,c=u[1],a=u[3]===void 0?tt:u[3]==='"'?Me:Ne):a===Me||a===Ne?a=tt:a===Pe||a===Ie?a=Ct:(a=tt,r=void 0);const y=a===tt&&i[s+1].startsWith("/>")?" ":"";o+=a===Ct?d+En:f>=0?(n.push(c),d.slice(0,f)+oe+d.slice(f)+Y+y):d+Y+(f===-2?(n.push(void 0),s):y)}const l=o+(i[e]||"<?>")+(t===2?"</svg>":"");if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return[Te!==void 0?Te.createHTML(l):l,n]};class $t{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let o=0,a=0;const l=t.length-1,s=this.parts,[d,c]=wn(t,e);if(this.el=$t.createElement(d,n),et.currentNode=this.el.content,e===2){const u=this.el.content,f=u.firstChild;f.remove(),u.append(...f.childNodes)}for(;(r=et.nextNode())!==null&&s.length<l;){if(r.nodeType===1){if(r.hasAttributes()){const u=[];for(const f of r.getAttributeNames())if(f.endsWith(oe)||f.startsWith(Y)){const _=c[a++];if(u.push(f),_!==void 0){const y=r.getAttribute(_.toLowerCase()+oe).split(Y),v=/([.?@])?(.*)/.exec(_);s.push({type:1,index:o,name:v[2],strings:y,ctor:v[1]==="."?An:v[1]==="?"?On:v[1]==="@"?Tn:Ht})}else s.push({type:6,index:o})}for(const f of u)r.removeAttribute(f)}if(He.test(r.tagName)){const u=r.textContent.split(Y),f=u.length-1;if(f>0){r.textContent=lt?lt.emptyScript:"";for(let _=0;_<f;_++)r.append(u[_],bt()),et.nextNode(),s.push({type:2,index:++o});r.append(u[f],bt())}}}else if(r.nodeType===8)if(r.data===xe)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 n=Q.createElement("template");return n.innerHTML=t,n}}function ht(i,t,e=i,n){var r,o,a,l;if(t===dt)return t;let s=n!==void 0?(r=e._$Co)===null||r===void 0?void 0:r[n]:e._$Cl;const d=Et(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(i),s._$AT(i,e,n)),n!==void 0?((a=(l=e)._$Co)!==null&&a!==void 0?a:l._$Co=[])[n]=s:e._$Cl=s),s!==void 0&&(t=ht(i,s._$AS(i,t.values),s,n)),t}class Sn{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:n},parts:r}=this._$AD,o=((e=t==null?void 0:t.creationScope)!==null&&e!==void 0?e:Q).importNode(n,!0);et.currentNode=o;let a=et.nextNode(),l=0,s=0,d=r[0];for(;d!==void 0;){if(l===d.index){let c;d.type===2?c=new wt(a,a.nextSibling,this,t):d.type===1?c=new d.ctor(a,d.name,d.strings,this,t):d.type===6&&(c=new xn(a,this,t)),this._$AV.push(c),d=r[++s]}l!==(d==null?void 0:d.index)&&(a=et.nextNode(),l++)}return et.currentNode=Q,o}v(t){let e=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class wt{constructor(t,e,n,r){var o;this.type=2,this._$AH=C,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,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=ht(this,t,e),Et(t)?t===C||t==null||t===""?(this._$AH!==C&&this._$AR(),this._$AH=C):t!==this._$AH&&t!==dt&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):Cn(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!==C&&Et(this._$AH)?this._$AA.nextSibling.data=t:this.$(Q.createTextNode(t)),this._$AH=t}g(t){var e;const{values:n,_$litType$:r}=t,o=typeof r=="number"?this._$AC(t):(r.el===void 0&&(r.el=$t.createElement(r.h,this.options)),r);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===o)this._$AH.v(n);else{const a=new Sn(o,this),l=a.u(this.options);a.v(n),this.$(l),this._$AH=a}}_$AC(t){let e=ke.get(t.strings);return e===void 0&&ke.set(t.strings,e=new $t(t)),e}T(t){Le(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,r=0;for(const o of t)r===e.length?e.push(n=new wt(this.k(bt()),this.k(bt()),this,this.options)):n=e[r],n._$AI(o),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,e);t&&t!==this._$AB;){const r=t.nextSibling;t.remove(),t=r}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}}class Ht{constructor(t,e,n,r,o){this.type=1,this._$AH=C,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=o,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=C}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,r){const o=this.strings;let a=!1;if(o===void 0)t=ht(this,t,e,0),a=!Et(t)||t!==this._$AH&&t!==dt,a&&(this._$AH=t);else{const l=t;let s,d;for(t=o[0],s=0;s<o.length-1;s++)d=ht(this,l[n+s],e,s),d===dt&&(d=this._$AH[s]),a||(a=!Et(d)||d!==this._$AH[s]),d===C?t=C:t!==C&&(t+=(d??"")+o[s+1]),this._$AH[s]=d}a&&!r&&this.j(t)}j(t){t===C?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class An extends Ht{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===C?void 0:t}}const Dn=lt?lt.emptyScript:"";class On extends Ht{constructor(){super(...arguments),this.type=4}j(t){t&&t!==C?this.element.setAttribute(this.name,Dn):this.element.removeAttribute(this.name)}}class Tn extends Ht{constructor(t,e,n,r,o){super(t,e,n,r,o),this.type=5}_$AI(t,e=this){var n;if((t=(n=ht(this,t,e,0))!==null&&n!==void 0?n:C)===dt)return;const r=this._$AH,o=t===C&&r!==C||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,a=t!==C&&(r===C||o);o&&this.element.removeEventListener(this.name,this,r),a&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;typeof this._$AH=="function"?this._$AH.call((n=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&n!==void 0?n:this.element,t):this._$AH.handleEvent(t)}}class xn{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){ht(this,t)}}const Re=Mt.litHtmlPolyfillSupport;Re==null||Re($t,wt),((re=Mt.litHtmlVersions)!==null&&re!==void 0?re:Mt.litHtmlVersions=[]).push("2.7.4");const Ln=(i,t,e)=>{var n,r;const o=(n=e==null?void 0:e.renderBefore)!==null&&n!==void 0?n: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 wt(t.insertBefore(bt(),l),l,void 0,e??{})}return a._$AI(i),a};/**
16
16
  * @license
17
17
  * Copyright 2017 Google LLC
18
18
  * SPDX-License-Identifier: BSD-3-Clause
19
- */var lt,dt;class fe extends de{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=In(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return ue}}fe.finalized=!0,fe._$litElement$=!0,(lt=globalThis.litElementHydrateSupport)===null||lt===void 0||lt.call(globalThis,{LitElement:fe});const Ut=globalThis.litElementPolyfillSupport;Ut==null||Ut({LitElement:fe}),((dt=globalThis.litElementVersions)!==null&&dt!==void 0?dt:globalThis.litElementVersions=[]).push("3.3.2");/**
19
+ */var se,le;class ut extends st{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ln(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return dt}}ut.finalized=!0,ut._$litElement$=!0,(se=globalThis.litElementHydrateSupport)===null||se===void 0||se.call(globalThis,{LitElement:ut});const Be=globalThis.litElementPolyfillSupport;Be==null||Be({LitElement:ut}),((le=globalThis.litElementVersions)!==null&&le!==void 0?le:globalThis.litElementVersions=[]).push("3.3.2");/**
20
20
  * @license
21
21
  * Copyright 2017 Google LLC
22
22
  * SPDX-License-Identifier: BSD-3-Clause
23
- */const Vt=i=>e=>typeof e=="function"?((t,n)=>(customElements.define(t,n),n))(i,e):((t,n)=>{const{kind:o,elements:r}=n;return{kind:o,elements:r,finisher(a){customElements.define(t,a)}}})(i,e);/**
23
+ */const Ue=i=>t=>typeof t=="function"?((e,n)=>(customElements.define(e,n),n))(i,t):((e,n)=>{const{kind:r,elements:o}=n;return{kind:r,elements:o,finisher(a){customElements.define(e,a)}}})(i,t);/**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
- */const Ln=(i,e)=>e.kind==="method"&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(t){t.createProperty(e.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){typeof e.initializer=="function"&&(this[e.key]=e.initializer.call(this))},finisher(t){t.createProperty(e.key,i)}},Nn=(i,e,t)=>{e.constructor.createProperty(t,i)};function H(i){return(e,t)=>t!==void 0?Nn(i,e,t):Ln(i,e)}/**
27
+ */const Pn=(i,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,i)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,i)}},In=(i,t,e)=>{t.constructor.createProperty(e,i)};function N(i){return(t,e)=>e!==void 0?In(i,t,e):Pn(i,t)}/**
28
28
  * @license
29
29
  * Copyright 2017 Google LLC
30
30
  * SPDX-License-Identifier: BSD-3-Clause
31
- */function pe(i){return H({...i,state:!0})}/**
31
+ */function ct(i){return N({...i,state:!0})}/**
32
32
  * @license
33
33
  * Copyright 2021 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */var ht;((ht=window.HTMLSlotElement)===null||ht===void 0?void 0:ht.prototype.assignedElements)!=null;/**
35
+ */var de;((de=window.HTMLSlotElement)===null||de===void 0?void 0:de.prototype.assignedElements)!=null;/**
36
36
  * @license
37
37
  * Copyright 2021 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */function*ut(i,e){if(i!==void 0){let t=0;for(const n of i)yield e(n,t++)}}/**
39
+ */function*he(i,t){if(i!==void 0){let e=0;for(const n of i)yield t(n,e++)}}/**
40
40
  * @license
41
41
  * Copyright 2021 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */function jt(i,e,t){return i?e():t==null?void 0:t()}/**!
43
+ */function Ve(i,t,e){return i?t():e==null?void 0:e()}/**!
44
44
  * Sortable 1.15.0
45
45
  * @author RubaXa <trash@rubaxa.org>
46
46
  * @author owenm <owen23355@gmail.com>
47
47
  * @license MIT
48
- */function zt(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(i,o).enumerable})),t.push.apply(t,n)}return t}function z(i){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?zt(Object(t),!0).forEach(function(n){Mn(i,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(t)):zt(Object(t)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(t,n))})}return i}function Be(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Be=function(e){return typeof e}:Be=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Be(i)}function Mn(i,e,t){return e in i?Object.defineProperty(i,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):i[e]=t,i}function Z(){return Z=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i},Z.apply(this,arguments)}function Hn(i,e){if(i==null)return{};var t={},n=Object.keys(i),o,r;for(r=0;r<n.length;r++)o=n[r],!(e.indexOf(o)>=0)&&(t[o]=i[o]);return t}function kn(i,e){if(i==null)return{};var t=Hn(i,e),n,o;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(i);for(o=0;o<r.length;o++)n=r[o],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(t[n]=i[n])}return t}var Rn="1.15.0";function W(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var K=W(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Ue=W(/Edge/i),Ft=W(/firefox/i),Ve=W(/safari/i)&&!W(/chrome/i)&&!W(/android/i),Xt=W(/iP(ad|od|hone)/i),Wt=W(/chrome/i)&&W(/android/i),Yt={capture:!1,passive:!1};function C(i,e,t){i.addEventListener(e,t,!K&&Yt)}function E(i,e,t){i.removeEventListener(e,t,!K&&Yt)}function je(i,e){if(e){if(e[0]===">"&&(e=e.substring(1)),i)try{if(i.matches)return i.matches(e);if(i.msMatchesSelector)return i.msMatchesSelector(e);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(e)}catch{return!1}return!1}}function Bn(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function F(i,e,t,n){if(i){t=t||document;do{if(e!=null&&(e[0]===">"?i.parentNode===t&&je(i,e):je(i,e))||n&&i===t)return i;if(i===t)break}while(i=Bn(i))}return null}var Gt=/\s+/g;function k(i,e,t){if(i&&e)if(i.classList)i.classList[t?"add":"remove"](e);else{var n=(" "+i.className+" ").replace(Gt," ").replace(" "+e+" "," ");i.className=(n+(t?" "+e:"")).replace(Gt," ")}}function p(i,e,t){var n=i&&i.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(t=i.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function ge(i,e){var t="";if(typeof i=="string")t=i;else do{var n=p(i,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(i=i.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function qt(i,e,t){if(i){var n=i.getElementsByTagName(e),o=0,r=n.length;if(t)for(;o<r;o++)t(n[o],o);return n}return[]}function J(){var i=document.scrollingElement;return i||document.documentElement}function T(i,e,t,n,o){if(!(!i.getBoundingClientRect&&i!==window)){var r,a,l,s,d,c,u;if(i!==window&&i.parentNode&&i!==J()?(r=i.getBoundingClientRect(),a=r.top,l=r.left,s=r.bottom,d=r.right,c=r.height,u=r.width):(a=0,l=0,s=window.innerHeight,d=window.innerWidth,c=window.innerHeight,u=window.innerWidth),(e||t)&&i!==window&&(o=o||i.parentNode,!K))do if(o&&o.getBoundingClientRect&&(p(o,"transform")!=="none"||t&&p(o,"position")!=="static")){var f=o.getBoundingClientRect();a-=f.top+parseInt(p(o,"border-top-width")),l-=f.left+parseInt(p(o,"border-left-width")),s=a+r.height,d=l+r.width;break}while(o=o.parentNode);if(n&&i!==window){var b=ge(o||i),_=b&&b.a,y=b&&b.d;b&&(a/=y,l/=_,u/=_,c/=y,s=a+c,d=l+u)}return{top:a,left:l,bottom:s,right:d,width:u,height:c}}}function Zt(i,e,t){for(var n=Jt(i,!0),o=T(i)[e];n;){var r=T(n)[t],a=void 0;if(t==="top"||t==="left"?a=o>=r:a=o<=r,!a)return n;if(n===J())break;n=Jt(n,!1)}return!1}function me(i,e,t,n){for(var o=0,r=0,a=i.children;r<a.length;){if(a[r].style.display!=="none"&&a[r]!==g.ghost&&(n||a[r]!==g.dragged)&&F(a[r],t.draggable,i,!1)){if(o===e)return a[r];o++}r++}return null}function ct(i,e){for(var t=i.lastElementChild;t&&(t===g.ghost||p(t,"display")==="none"||e&&!je(t,e));)t=t.previousElementSibling;return t||null}function U(i,e){var t=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==g.clone&&(!e||je(i,e))&&t++;return t}function Kt(i){var e=0,t=0,n=J();if(i)do{var o=ge(i),r=o.a,a=o.d;e+=i.scrollLeft*r,t+=i.scrollTop*a}while(i!==n&&(i=i.parentNode));return[e,t]}function Un(i,e){for(var t in i)if(i.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===i[t][n])return Number(t)}return-1}function Jt(i,e){if(!i||!i.getBoundingClientRect)return J();var t=i,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=p(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return J();if(n||e)return t;n=!0}}while(t=t.parentNode);return J()}function Vn(i,e){if(i&&e)for(var t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function ft(i,e){return Math.round(i.top)===Math.round(e.top)&&Math.round(i.left)===Math.round(e.left)&&Math.round(i.height)===Math.round(e.height)&&Math.round(i.width)===Math.round(e.width)}var pt;function jn(i,e){return function(){if(!pt){var t=arguments,n=this;t.length===1?i.call(n,t[0]):i.apply(n,t),pt=setTimeout(function(){pt=void 0},e)}}}function zn(i,e,t){i.scrollLeft+=e,i.scrollTop+=t}function Qt(i){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(i).cloneNode(!0):t?t(i).clone(!0)[0]:i.cloneNode(!0)}var V="Sortable"+new Date().getTime();function Fn(){var i=[],e;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(p(o,"display")==="none"||o===g.ghost)){i.push({target:o,rect:T(o)});var r=z({},i[i.length-1].rect);if(o.thisAnimationDuration){var a=ge(o,!0);a&&(r.top-=a.f,r.left-=a.e)}o.fromRect=r}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(Un(i,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var r=!1,a=0;i.forEach(function(l){var s=0,d=l.target,c=d.fromRect,u=T(d),f=d.prevFromRect,b=d.prevToRect,_=l.rect,y=ge(d,!0);y&&(u.top-=y.f,u.left-=y.e),d.toRect=u,d.thisAnimationDuration&&ft(f,u)&&!ft(c,u)&&(_.top-u.top)/(_.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=Wn(_,f,b,o.options)),ft(u,c)||(d.prevFromRect=c,d.prevToRect=u,s||(s=o.options.animation),o.animate(d,_,u,s)),s&&(r=!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(e),r?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),i=[]},animate:function(n,o,r,a){if(a){p(n,"transition",""),p(n,"transform","");var l=ge(this.el),s=l&&l.a,d=l&&l.d,c=(o.left-r.left)/(s||1),u=(o.top-r.top)/(d||1);n.animatingX=!!c,n.animatingY=!!u,p(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=Xn(n),p(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),p(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){p(n,"transition",""),p(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function Xn(i){return i.offsetWidth}function Wn(i,e,t,n){return Math.sqrt(Math.pow(e.top-i.top,2)+Math.pow(e.left-i.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var ve=[],gt={initializeByDefault:!0},De={mount:function(e){for(var t in gt)gt.hasOwnProperty(t)&&!(t in e)&&(e[t]=gt[t]);ve.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),ve.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";ve.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][r]&&t[a.pluginName][r](z({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](z({sortable:t},n)))})},initializePlugins:function(e,t,n,o){ve.forEach(function(l){var s=l.pluginName;if(!(!e.options[s]&&!l.initializeByDefault)){var d=new l(e,t,e.options);d.sortable=e,d.options=e.options,e[s]=d,Z(n,d.defaults)}});for(var r in e.options)if(e.options.hasOwnProperty(r)){var a=this.modifyOption(e,r,e.options[r]);typeof a<"u"&&(e.options[r]=a)}},getEventProperties:function(e,t){var n={};return ve.forEach(function(o){typeof o.eventProperties=="function"&&Z(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return ve.forEach(function(r){e[r.pluginName]&&r.optionListeners&&typeof r.optionListeners[t]=="function"&&(o=r.optionListeners[t].call(e[r.pluginName],n))}),o}};function Yn(i){var e=i.sortable,t=i.rootEl,n=i.name,o=i.targetEl,r=i.cloneEl,a=i.toEl,l=i.fromEl,s=i.oldIndex,d=i.newIndex,c=i.oldDraggableIndex,u=i.newDraggableIndex,f=i.originalEvent,b=i.putSortable,_=i.extraEventProperties;if(e=e||t&&t[V],!!e){var y,Y=e.options,se="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!K&&!Ue?y=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(y=document.createEvent("Event"),y.initEvent(n,!0,!0)),y.to=a||t,y.from=l||t,y.item=o||t,y.clone=r,y.oldIndex=s,y.newIndex=d,y.oldDraggableIndex=c,y.newDraggableIndex=u,y.originalEvent=f,y.pullMode=b?b.lastPutMode:void 0;var B=z(z({},_),De.getEventProperties(n,e));for(var le in B)y[le]=B[le];t&&t.dispatchEvent(y),Y[se]&&Y[se].call(e,y)}}var Gn=["evt"],N=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,r=kn(n,Gn);De.pluginEvent.bind(g)(e,t,z({dragEl:h,parentEl:A,ghostEl:m,rootEl:w,nextEl:oe,lastDownEl:ze,cloneEl:S,cloneHidden:Q,dragStarted:Te,putSortable:x,activeSortable:g.active,originalEvent:o,oldIndex:ye,oldDraggableIndex:Oe,newIndex:R,newDraggableIndex:ee,hideGhostForTarget:sn,unhideGhostForTarget:ln,cloneNowHidden:function(){Q=!0},cloneNowShown:function(){Q=!1},dispatchSortableEvent:function(l){L({sortable:t,name:l,originalEvent:o})}},r))};function L(i){Yn(z({putSortable:x,cloneEl:S,targetEl:h,rootEl:w,oldIndex:ye,oldDraggableIndex:Oe,newIndex:R,newDraggableIndex:ee},i))}var h,A,m,w,oe,ze,S,Q,ye,R,Oe,ee,Fe,x,_e=!1,Xe=!1,We=[],re,j,mt,vt,en,tn,Te,be,xe,Pe=!1,Ye=!1,Ge,I,yt=[],_t=!1,qe=[],Ze=typeof document<"u",Ke=Xt,nn=Ue||K?"cssFloat":"float",qn=Ze&&!Wt&&!Xt&&"draggable"in document.createElement("div"),on=function(){if(Ze){if(K)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),rn=function(e,t){var n=p(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=me(e,0,t),a=me(e,1,t),l=r&&p(r),s=a&&p(a),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+T(r).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+T(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&l.float&&l.float!=="none"){var u=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===u)?"vertical":"horizontal"}return r&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||d>=o&&n[nn]==="none"||a&&n[nn]==="none"&&d+c>o)?"vertical":"horizontal"},Zn=function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,a=n?e.width:e.height,l=n?t.left:t.top,s=n?t.right:t.bottom,d=n?t.width:t.height;return o===l||r===s||o+a/2===l+d/2},Kn=function(e,t){var n;return We.some(function(o){var r=o[V].options.emptyInsertThreshold;if(!(!r||ct(o))){var a=T(o),l=e>=a.left-r&&e<=a.right+r,s=t>=a.top-r&&t<=a.bottom+r;if(l&&s)return n=o}}),n},an=function(e){function t(r,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(r==null&&(a||u))return!0;if(r==null||r===!1)return!1;if(a&&r==="clone")return r;if(typeof r=="function")return t(r(l,s,d,c),a)(l,s,d,c);var f=(a?l:s).options.group.name;return r===!0||typeof r=="string"&&r===f||r.join&&r.indexOf(f)>-1}}var n={},o=e.group;(!o||Be(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},sn=function(){!on&&m&&p(m,"display","none")},ln=function(){!on&&m&&p(m,"display","")};Ze&&!Wt&&document.addEventListener("click",function(i){if(Xe)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Xe=!1,!1},!0);var ae=function(e){if(h){e=e.touches?e.touches[0]:e;var t=Kn(e.clientX,e.clientY);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[V]._onDragOver(n)}}},Jn=function(e){h&&h.parentNode[V]._isOutsideThisEl(e.target)};function g(i,e){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=e=Z({},e),i[V]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return rn(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(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:g.supportPointer!==!1&&"PointerEvent"in window&&!Ve,emptyInsertThreshold:5};De.initializePlugins(this,i,t);for(var n in t)!(n in e)&&(e[n]=t[n]);an(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:qn,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?C(i,"pointerdown",this._onTapStart):(C(i,"mousedown",this._onTapStart),C(i,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(i,"dragover",this),C(i,"dragenter",this)),We.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Z(this,Fn())}g.prototype={constructor:g,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(be=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,h):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,d=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=o.filter;if(ai(n),!h&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||o.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Ve&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=F(s,o.draggable,n,!1),!(s&&s.animated)&&ze!==s)){if(ye=U(s),Oe=U(s,o.draggable),typeof c=="function"){if(c.call(this,e,s,this)){L({sortable:t,rootEl:d,name:"filter",targetEl:s,toEl:n,fromEl:n}),N("filter",t,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=F(d,u.trim(),n,!1),u)return L({sortable:t,rootEl:u,name:"filter",targetEl:s,fromEl:n,toEl:n}),N("filter",t,{evt:e}),!0}),c)){r&&e.cancelable&&e.preventDefault();return}o.handle&&!F(d,o.handle,n,!1)||this._prepareDragStart(e,l,s)}}},_prepareDragStart:function(e,t,n){var o=this,r=o.el,a=o.options,l=r.ownerDocument,s;if(n&&!h&&n.parentNode===r){var d=T(n);if(w=r,h=n,A=h.parentNode,oe=h.nextSibling,ze=n,Fe=a.group,g.dragged=h,re={target:h,clientX:(t||e).clientX,clientY:(t||e).clientY},en=re.clientX-d.left,tn=re.clientY-d.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,h.style["will-change"]="all",s=function(){if(N("delayEnded",o,{evt:e}),g.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!Ft&&o.nativeDraggable&&(h.draggable=!0),o._triggerDragStart(e,t),L({sortable:o,name:"choose",originalEvent:e}),k(h,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){qt(h,c.trim(),bt)}),C(l,"dragover",ae),C(l,"mousemove",ae),C(l,"touchmove",ae),C(l,"mouseup",o._onDrop),C(l,"touchend",o._onDrop),C(l,"touchcancel",o._onDrop),Ft&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),N("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(Ue||K))){if(g.eventCanceled){this._onDrop();return}C(l,"mouseup",o._disableDelayedDrag),C(l,"touchend",o._disableDelayedDrag),C(l,"touchcancel",o._disableDelayedDrag),C(l,"mousemove",o._delayedDragTouchMoveHandler),C(l,"touchmove",o._delayedDragTouchMoveHandler),a.supportPointer&&C(l,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){h&&bt(h),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._disableDelayedDrag),E(e,"touchend",this._disableDelayedDrag),E(e,"touchcancel",this._disableDelayedDrag),E(e,"mousemove",this._delayedDragTouchMoveHandler),E(e,"touchmove",this._delayedDragTouchMoveHandler),E(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):t?C(document,"touchmove",this._onTouchMove):C(document,"mousemove",this._onTouchMove):(C(h,"dragend",this),C(w,"dragstart",this._onDragStart));try{document.selection?Qe(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(_e=!1,w&&h){N("dragStarted",this,{evt:t}),this.nativeDraggable&&C(document,"dragover",Jn);var n=this.options;!e&&k(h,n.dragClass,!1),k(h,n.ghostClass,!0),g.active=this,e&&this._appendGhost(),L({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(j){this._lastX=j.clientX,this._lastY=j.clientY,sn();for(var e=document.elementFromPoint(j.clientX,j.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(j.clientX,j.clientY),e!==t);)t=e;if(h.parentNode[V]._isOutsideThisEl(e),t)do{if(t[V]){var n=void 0;if(n=t[V]._onDragOver({clientX:j.clientX,clientY:j.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=t.parentNode);ln()}},_onTouchMove:function(e){if(re){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,a=m&&ge(m,!0),l=m&&a&&a.a,s=m&&a&&a.d,d=Ke&&I&&Kt(I),c=(r.clientX-re.clientX+o.x)/(l||1)+(d?d[0]-yt[0]:0)/(l||1),u=(r.clientY-re.clientY+o.y)/(s||1)+(d?d[1]-yt[1]:0)/(s||1);if(!g.active&&!_e){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(m){a?(a.e+=c-(mt||0),a.f+=u-(vt||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var f="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");p(m,"webkitTransform",f),p(m,"mozTransform",f),p(m,"msTransform",f),p(m,"transform",f),mt=c,vt=u,j=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!m){var e=this.options.fallbackOnBody?document.body:w,t=T(h,!0,Ke,!0,e),n=this.options;if(Ke){for(I=e;p(I,"position")==="static"&&p(I,"transform")==="none"&&I!==document;)I=I.parentNode;I!==document.body&&I!==document.documentElement?(I===document&&(I=J()),t.top+=I.scrollTop,t.left+=I.scrollLeft):I=J(),yt=Kt(I)}m=h.cloneNode(!0),k(m,n.ghostClass,!1),k(m,n.fallbackClass,!0),k(m,n.dragClass,!0),p(m,"transition",""),p(m,"transform",""),p(m,"box-sizing","border-box"),p(m,"margin",0),p(m,"top",t.top),p(m,"left",t.left),p(m,"width",t.width),p(m,"height",t.height),p(m,"opacity","0.8"),p(m,"position",Ke?"absolute":"fixed"),p(m,"zIndex","100000"),p(m,"pointerEvents","none"),g.ghost=m,e.appendChild(m),p(m,"transform-origin",en/parseInt(m.style.width)*100+"% "+tn/parseInt(m.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;if(N("dragStart",this,{evt:e}),g.eventCanceled){this._onDrop();return}N("setupClone",this),g.eventCanceled||(S=Qt(h),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),k(S,this.options.chosenClass,!1),g.clone=S),n.cloneId=Qe(function(){N("clone",n),!g.eventCanceled&&(n.options.removeCloneOnHide||w.insertBefore(S,h),n._hideClone(),L({sortable:n,name:"clone"}))}),!t&&k(h,r.dragClass,!0),t?(Xe=!0,n._loopId=setInterval(n._emulateDragOver,50)):(E(document,"mouseup",n._onDrop),E(document,"touchend",n._onDrop),E(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,h)),C(document,"drop",n),p(h,"transform","translateZ(0)")),_e=!0,n._dragStartId=Qe(n._dragStarted.bind(n,t,e)),C(document,"selectstart",n),Te=!0,Ve&&p(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,o,r,a,l=this.options,s=l.group,d=g.active,c=Fe===s,u=l.sort,f=x||d,b,_=this,y=!1;if(_t)return;function Y(Me,ci){N(Me,_,z({evt:e,isOwner:c,axis:b?"vertical":"horizontal",revert:a,dragRect:o,targetRect:r,canSort:u,fromSortable:f,target:n,completed:B,onMove:function(vn,fi){return Je(w,t,h,o,vn,T(vn),e,fi)},changed:le},ci))}function se(){Y("dragOverAnimationCapture"),_.captureAnimationState(),_!==f&&f.captureAnimationState()}function B(Me){return Y("dragOverCompleted",{insertion:Me}),Me&&(c?d._hideClone():d._showClone(_),_!==f&&(k(h,x?x.options.ghostClass:d.options.ghostClass,!1),k(h,l.ghostClass,!0)),x!==_&&_!==g.active?x=_:_===g.active&&x&&(x=null),f===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){Y("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===t&&!n.animated)&&(be=null),!l.dragoverBubble&&!e.rootEl&&n!==document&&(h.parentNode[V]._isOutsideThisEl(e.target),!Me&&ae(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),y=!0}function le(){R=U(h),ee=U(h,l.draggable),L({sortable:_,name:"change",toEl:t,newIndex:R,newDraggableIndex:ee,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=F(n,l.draggable,t,!0),Y("dragOver"),g.eventCanceled)return y;if(h.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return B(!1);if(Xe=!1,d&&!l.disabled&&(c?u||(a=A!==w):x===this||(this.lastPutMode=Fe.checkPull(this,d,h,e))&&s.checkPut(this,d,h,e))){if(b=this._getDirection(e,n)==="vertical",o=T(h),Y("dragOverValid"),g.eventCanceled)return y;if(a)return A=w,se(),this._hideClone(),Y("revert"),g.eventCanceled||(oe?w.insertBefore(h,oe):w.appendChild(h)),B(!0);var G=ct(t,l.draggable);if(!G||ni(e,b,this)&&!G.animated){if(G===h)return B(!1);if(G&&t===e.target&&(n=G),n&&(r=T(n)),Je(w,t,h,o,n,r,e,!!n)!==!1)return se(),G&&G.nextSibling?t.insertBefore(h,G.nextSibling):t.appendChild(h),A=t,le(),B(!0)}else if(G&&ti(e,b,this)){var Ct=me(t,0,l,!0);if(Ct===h)return B(!1);if(n=Ct,r=T(n),Je(w,t,h,o,n,r,e,!1)!==!1)return se(),t.insertBefore(h,Ct),A=t,le(),B(!0)}else if(n.parentNode===t){r=T(n);var Ee=0,$t,hi=h.parentNode!==t,fn=!Zn(h.animated&&h.toRect||o,n.animated&&n.toRect||r,b),pn=b?"top":"left",Ie=Zt(n,"top","top")||Zt(h,"top","top"),ui=Ie?Ie.scrollTop:void 0;be!==n&&($t=r[pn],Pe=!1,Ye=!fn&&l.invertSwap||hi),Ee=ii(e,n,r,b,fn?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Ye,be===n);var Le;if(Ee!==0){var gn=U(h);do gn-=Ee,Le=A.children[gn];while(Le&&(p(Le,"display")==="none"||Le===m))}if(Ee===0||Le===n)return B(!1);be=n,xe=Ee;var mn=n.nextElementSibling,Ne=!1;Ne=Ee===1;var et=Je(w,t,h,o,n,r,e,Ne);if(et!==!1)return(et===1||et===-1)&&(Ne=et===1),_t=!0,setTimeout(ei,30),se(),Ne&&!mn?t.appendChild(h):n.parentNode.insertBefore(h,Ne?mn:n),Ie&&zn(Ie,0,ui-Ie.scrollTop),A=h.parentNode,$t!==void 0&&!Ye&&(Ge=Math.abs($t-T(n)[pn])),le(),B(!0)}if(t.contains(h))return B(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",ae),E(document,"mousemove",ae),E(document,"touchmove",ae)},_offUpEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._onDrop),E(e,"touchend",this._onDrop),E(e,"pointerup",this._onDrop),E(e,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(R=U(h),ee=U(h,n.draggable),N("drop",this,{evt:e}),A=h&&h.parentNode,R=U(h),ee=U(h,n.draggable),g.eventCanceled){this._nulling();return}_e=!1,Ye=!1,Pe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Et(this.cloneId),Et(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ve&&p(document.body,"user-select",""),p(h,"transform",""),e&&(Te&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(w===A||x&&x.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),h&&(this.nativeDraggable&&E(h,"dragend",this),bt(h),h.style["will-change"]="",Te&&!_e&&k(h,x?x.options.ghostClass:this.options.ghostClass,!1),k(h,this.options.chosenClass,!1),L({sortable:this,name:"unchoose",toEl:A,newIndex:null,newDraggableIndex:null,originalEvent:e}),w!==A?(R>=0&&(L({rootEl:A,name:"add",toEl:A,fromEl:w,originalEvent:e}),L({sortable:this,name:"remove",toEl:A,originalEvent:e}),L({rootEl:A,name:"sort",toEl:A,fromEl:w,originalEvent:e}),L({sortable:this,name:"sort",toEl:A,originalEvent:e})),x&&x.save()):R!==ye&&R>=0&&(L({sortable:this,name:"update",toEl:A,originalEvent:e}),L({sortable:this,name:"sort",toEl:A,originalEvent:e})),g.active&&((R==null||R===-1)&&(R=ye,ee=Oe),L({sortable:this,name:"end",toEl:A,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){N("nulling",this),w=h=A=m=oe=S=ze=Q=re=j=Te=R=ee=ye=Oe=be=xe=x=Fe=g.dragged=g.ghost=g.clone=g.active=null,qe.forEach(function(e){e.checked=!0}),qe.length=mt=vt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":h&&(this._onDragOver(e),Qn(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,o=0,r=n.length,a=this.options;o<r;o++)t=n[o],F(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||ri(t));return e},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(r,a){var l=o.children[a];F(l,this.options.draggable,o,!1)&&(n[r]=l)},this),t&&this.captureAnimationState(),e.forEach(function(r){n[r]&&(o.removeChild(n[r]),o.appendChild(n[r]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return F(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var o=De.modifyOption(this,e,t);typeof o<"u"?n[e]=o:n[e]=t,e==="group"&&an(n)},destroy:function(){N("destroy",this);var e=this.el;e[V]=null,E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart),E(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),We.splice(We.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Q){if(N("hideClone",this),g.eventCanceled)return;p(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),Q=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Q){if(N("showClone",this),g.eventCanceled)return;h.parentNode==w&&!this.options.group.revertClone?w.insertBefore(S,h):oe?w.insertBefore(S,oe):w.appendChild(S),this.options.group.revertClone&&this.animate(h,S),p(S,"display",""),Q=!1}}};function Qn(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function Je(i,e,t,n,o,r,a,l){var s,d=i[V],c=d.options.onMove,u;return window.CustomEvent&&!K&&!Ue?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=e,s.from=i,s.dragged=t,s.draggedRect=n,s.related=o||e,s.relatedRect=r||T(e),s.willInsertAfter=l,s.originalEvent=a,i.dispatchEvent(s),c&&(u=c.call(d,s,a)),u}function bt(i){i.draggable=!1}function ei(){_t=!1}function ti(i,e,t){var n=T(me(t.el,0,t.options,!0)),o=10;return e?i.clientX<n.left-o||i.clientY<n.top&&i.clientX<n.right:i.clientY<n.top-o||i.clientY<n.bottom&&i.clientX<n.left}function ni(i,e,t){var n=T(ct(t.el,t.options.draggable)),o=10;return e?i.clientX>n.right+o||i.clientX<=n.right&&i.clientY>n.bottom&&i.clientX>=n.left:i.clientX>n.right&&i.clientY>n.top||i.clientX<=n.right&&i.clientY>n.bottom+o}function ii(i,e,t,n,o,r,a,l){var s=n?i.clientY:i.clientX,d=n?t.height:t.width,c=n?t.top:t.left,u=n?t.bottom:t.right,f=!1;if(!a){if(l&&Ge<d*o){if(!Pe&&(xe===1?s>c+d*r/2:s<u-d*r/2)&&(Pe=!0),Pe)f=!0;else if(xe===1?s<c+Ge:s>u-Ge)return-xe}else if(s>c+d*(1-o)/2&&s<u-d*(1-o)/2)return oi(e)}return f=f||a,f&&(s<c+d*r/2||s>u-d*r/2)?s>c+d/2?1:-1:0}function oi(i){return U(h)<U(i)?1:-1}function ri(i){for(var e=i.tagName+i.className+i.src+i.href+i.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function ai(i){qe.length=0;for(var e=i.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&qe.push(n)}}function Qe(i){return setTimeout(i,0)}function Et(i){return clearTimeout(i)}Ze&&C(document,"touchmove",function(i){(g.active||_e)&&i.cancelable&&i.preventDefault()}),g.utils={on:C,off:E,css:p,find:qt,is:function(e,t){return!!F(e,t,e,!1)},extend:Vn,throttle:jn,closest:F,toggleClass:k,clone:Qt,index:U,nextTick:Qe,cancelNextTick:Et,detectDirection:rn,getChild:me},g.get=function(i){return i[V]},g.mount=function(){for(var i=arguments.length,e=new Array(i),t=0;t<i;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(g.utils=z(z({},g.utils),n.utils)),De.mount(n)})},g.create=function(i,e){return new g(i,e)},g.version=Rn;var dn=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(t){var d=n||r;l();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);s(),d&&!d.el.contains(u)&&(a("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function hn(){}hn.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=me(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:dn},Z(hn,{pluginName:"revertOnSpill"});function un(){}un.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,o=n||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:dn},Z(un,{pluginName:"removeOnSpill"});const cn=`
48
+ */function je(i,t){var e=Object.keys(i);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(i);t&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(i,r).enumerable})),e.push.apply(e,n)}return e}function V(i){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?je(Object(e),!0).forEach(function(n){Nn(i,n,e[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(e)):je(Object(e)).forEach(function(n){Object.defineProperty(i,n,Object.getOwnPropertyDescriptor(e,n))})}return i}function kt(i){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?kt=function(t){return typeof t}:kt=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kt(i)}function Nn(i,t,e){return t in i?Object.defineProperty(i,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):i[t]=e,i}function G(){return G=Object.assign||function(i){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n])}return i},G.apply(this,arguments)}function Mn(i,t){if(i==null)return{};var e={},n=Object.keys(i),r,o;for(o=0;o<n.length;o++)r=n[o],!(t.indexOf(r)>=0)&&(e[r]=i[r]);return e}function Hn(i,t){if(i==null)return{};var e=Mn(i,t),n,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(i);for(r=0;r<o.length;r++)n=o[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(i,n)&&(e[n]=i[n])}return e}var kn="1.15.0";function F(i){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(i)}var q=F(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Rt=F(/Edge/i),Fe=F(/firefox/i),Bt=F(/safari/i)&&!F(/chrome/i)&&!F(/android/i),ze=F(/iP(ad|od|hone)/i),Xe=F(/chrome/i)&&F(/android/i),We={capture:!1,passive:!1};function $(i,t,e){i.addEventListener(t,e,!q&&We)}function E(i,t,e){i.removeEventListener(t,e,!q&&We)}function Ut(i,t){if(t){if(t[0]===">"&&(t=t.substring(1)),i)try{if(i.matches)return i.matches(t);if(i.msMatchesSelector)return i.msMatchesSelector(t);if(i.webkitMatchesSelector)return i.webkitMatchesSelector(t)}catch{return!1}return!1}}function Rn(i){return i.host&&i!==document&&i.host.nodeType?i.host:i.parentNode}function j(i,t,e,n){if(i){e=e||document;do{if(t!=null&&(t[0]===">"?i.parentNode===e&&Ut(i,t):Ut(i,t))||n&&i===e)return i;if(i===e)break}while(i=Rn(i))}return null}var Ye=/\s+/g;function M(i,t,e){if(i&&t)if(i.classList)i.classList[e?"add":"remove"](t);else{var n=(" "+i.className+" ").replace(Ye," ").replace(" "+t+" "," ");i.className=(n+(e?" "+t:"")).replace(Ye," ")}}function p(i,t,e){var n=i&&i.style;if(n){if(e===void 0)return document.defaultView&&document.defaultView.getComputedStyle?e=document.defaultView.getComputedStyle(i,""):i.currentStyle&&(e=i.currentStyle),t===void 0?e:e[t];!(t in n)&&t.indexOf("webkit")===-1&&(t="-webkit-"+t),n[t]=e+(typeof e=="string"?"":"px")}}function ft(i,t){var e="";if(typeof i=="string")e=i;else do{var n=p(i,"transform");n&&n!=="none"&&(e=n+" "+e)}while(!t&&(i=i.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(e)}function Ge(i,t,e){if(i){var n=i.getElementsByTagName(t),r=0,o=n.length;if(e)for(;r<o;r++)e(n[r],r);return n}return[]}function Z(){var i=document.scrollingElement;return i||document.documentElement}function O(i,t,e,n,r){if(!(!i.getBoundingClientRect&&i!==window)){var o,a,l,s,d,c,u;if(i!==window&&i.parentNode&&i!==Z()?(o=i.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)&&i!==window&&(r=r||i.parentNode,!q))do if(r&&r.getBoundingClientRect&&(p(r,"transform")!=="none"||e&&p(r,"position")!=="static")){var f=r.getBoundingClientRect();a-=f.top+parseInt(p(r,"border-top-width")),l-=f.left+parseInt(p(r,"border-left-width")),s=a+o.height,d=l+o.width;break}while(r=r.parentNode);if(n&&i!==window){var _=ft(r||i),y=_&&_.a,v=_&&_.d;_&&(a/=v,l/=y,u/=y,c/=v,s=a+c,d=l+u)}return{top:a,left:l,bottom:s,right:d,width:u,height:c}}}function qe(i,t,e){for(var n=Ke(i,!0),r=O(i)[t];n;){var o=O(n)[e],a=void 0;if(e==="top"||e==="left"?a=r>=o:a=r<=o,!a)return n;if(n===Z())break;n=Ke(n,!1)}return!1}function pt(i,t,e,n){for(var r=0,o=0,a=i.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==g.ghost&&(n||a[o]!==g.dragged)&&j(a[o],e.draggable,i,!1)){if(r===t)return a[o];r++}o++}return null}function ue(i,t){for(var e=i.lastElementChild;e&&(e===g.ghost||p(e,"display")==="none"||t&&!Ut(e,t));)e=e.previousElementSibling;return e||null}function R(i,t){var e=0;if(!i||!i.parentNode)return-1;for(;i=i.previousElementSibling;)i.nodeName.toUpperCase()!=="TEMPLATE"&&i!==g.clone&&(!t||Ut(i,t))&&e++;return e}function Ze(i){var t=0,e=0,n=Z();if(i)do{var r=ft(i),o=r.a,a=r.d;t+=i.scrollLeft*o,e+=i.scrollTop*a}while(i!==n&&(i=i.parentNode));return[t,e]}function Bn(i,t){for(var e in i)if(i.hasOwnProperty(e)){for(var n in t)if(t.hasOwnProperty(n)&&t[n]===i[e][n])return Number(e)}return-1}function Ke(i,t){if(!i||!i.getBoundingClientRect)return Z();var e=i,n=!1;do if(e.clientWidth<e.scrollWidth||e.clientHeight<e.scrollHeight){var r=p(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 Z();if(n||t)return e;n=!0}}while(e=e.parentNode);return Z()}function Un(i,t){if(i&&t)for(var e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function ce(i,t){return Math.round(i.top)===Math.round(t.top)&&Math.round(i.left)===Math.round(t.left)&&Math.round(i.height)===Math.round(t.height)&&Math.round(i.width)===Math.round(t.width)}var fe;function Vn(i,t){return function(){if(!fe){var e=arguments,n=this;e.length===1?i.call(n,e[0]):i.apply(n,e),fe=setTimeout(function(){fe=void 0},t)}}}function jn(i,t,e){i.scrollLeft+=t,i.scrollTop+=e}function Je(i){var t=window.Polymer,e=window.jQuery||window.Zepto;return t&&t.dom?t.dom(i).cloneNode(!0):e?e(i).clone(!0)[0]:i.cloneNode(!0)}var B="Sortable"+new Date().getTime();function Fn(){var i=[],t;return{captureAnimationState:function(){if(i=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(r){if(!(p(r,"display")==="none"||r===g.ghost)){i.push({target:r,rect:O(r)});var o=V({},i[i.length-1].rect);if(r.thisAnimationDuration){var a=ft(r,!0);a&&(o.top-=a.f,o.left-=a.e)}r.fromRect=o}})}},addAnimationState:function(n){i.push(n)},removeAnimationState:function(n){i.splice(Bn(i,{target:n}),1)},animateAll:function(n){var r=this;if(!this.options.animation){clearTimeout(t),typeof n=="function"&&n();return}var o=!1,a=0;i.forEach(function(l){var s=0,d=l.target,c=d.fromRect,u=O(d),f=d.prevFromRect,_=d.prevToRect,y=l.rect,v=ft(d,!0);v&&(u.top-=v.f,u.left-=v.e),d.toRect=u,d.thisAnimationDuration&&ce(f,u)&&!ce(c,u)&&(y.top-u.top)/(y.left-u.left)===(c.top-u.top)/(c.left-u.left)&&(s=Xn(y,f,_,r.options)),ce(u,c)||(d.prevFromRect=c,d.prevToRect=u,s||(s=r.options.animation),r.animate(d,y,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 n=="function"&&n()},a):typeof n=="function"&&n(),i=[]},animate:function(n,r,o,a){if(a){p(n,"transition",""),p(n,"transform","");var l=ft(this.el),s=l&&l.a,d=l&&l.d,c=(r.left-o.left)/(s||1),u=(r.top-o.top)/(d||1);n.animatingX=!!c,n.animatingY=!!u,p(n,"transform","translate3d("+c+"px,"+u+"px,0)"),this.forRepaintDummy=zn(n),p(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),p(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){p(n,"transition",""),p(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function zn(i){return i.offsetWidth}function Xn(i,t,e,n){return Math.sqrt(Math.pow(t.top-i.top,2)+Math.pow(t.left-i.left,2))/Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))*n.animation}var gt=[],pe={initializeByDefault:!0},St={mount:function(t){for(var e in pe)pe.hasOwnProperty(e)&&!(e in t)&&(t[e]=pe[e]);gt.forEach(function(n){if(n.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),gt.push(t)},pluginEvent:function(t,e,n){var r=this;this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0};var o=t+"Global";gt.forEach(function(a){e[a.pluginName]&&(e[a.pluginName][o]&&e[a.pluginName][o](V({sortable:e},n)),e.options[a.pluginName]&&e[a.pluginName][t]&&e[a.pluginName][t](V({sortable:e},n)))})},initializePlugins:function(t,e,n,r){gt.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,G(n,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 n={};return gt.forEach(function(r){typeof r.eventProperties=="function"&&G(n,r.eventProperties.call(e[r.pluginName],t))}),n},modifyOption:function(t,e,n){var r;return gt.forEach(function(o){t[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[e]=="function"&&(r=o.optionListeners[e].call(t[o.pluginName],n))}),r}};function Wn(i){var t=i.sortable,e=i.rootEl,n=i.name,r=i.targetEl,o=i.cloneEl,a=i.toEl,l=i.fromEl,s=i.oldIndex,d=i.newIndex,c=i.oldDraggableIndex,u=i.newDraggableIndex,f=i.originalEvent,_=i.putSortable,y=i.extraEventProperties;if(t=t||e&&e[B],!!t){var v,z=t.options,ot="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!q&&!Rt?v=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(v=document.createEvent("Event"),v.initEvent(n,!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=f,v.pullMode=_?_.lastPutMode:void 0;var k=V(V({},y),St.getEventProperties(n,t));for(var at in k)v[at]=k[at];e&&e.dispatchEvent(v),z[ot]&&z[ot].call(t,v)}}var Yn=["evt"],I=function(t,e){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.evt,o=Hn(n,Yn);St.pluginEvent.bind(g)(t,e,V({dragEl:h,parentEl:A,ghostEl:m,rootEl:w,nextEl:nt,lastDownEl:Vt,cloneEl:S,cloneHidden:K,dragStarted:Dt,putSortable:T,activeSortable:g.active,originalEvent:r,oldIndex:mt,oldDraggableIndex:At,newIndex:H,newDraggableIndex:J,hideGhostForTarget:an,unhideGhostForTarget:sn,cloneNowHidden:function(){K=!0},cloneNowShown:function(){K=!1},dispatchSortableEvent:function(l){L({sortable:e,name:l,originalEvent:r})}},o))};function L(i){Wn(V({putSortable:T,cloneEl:S,targetEl:h,rootEl:w,oldIndex:mt,oldDraggableIndex:At,newIndex:H,newDraggableIndex:J},i))}var h,A,m,w,nt,Vt,S,K,mt,H,At,J,jt,T,vt=!1,Ft=!1,zt=[],it,U,ge,me,Qe,tn,Dt,yt,Ot,Tt=!1,Xt=!1,Wt,x,ve=[],ye=!1,Yt=[],Gt=typeof document<"u",qt=ze,en=Rt||q?"cssFloat":"float",Gn=Gt&&!Xe&&!ze&&"draggable"in document.createElement("div"),nn=function(){if(Gt){if(q)return!1;var i=document.createElement("x");return i.style.cssText="pointer-events:auto",i.style.pointerEvents==="auto"}}(),rn=function(t,e){var n=p(t),r=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=pt(t,0,e),a=pt(t,1,e),l=o&&p(o),s=a&&p(a),d=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+O(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+O(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&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&&n[en]==="none"||a&&n[en]==="none"&&d+c>r)?"vertical":"horizontal"},qn=function(t,e,n){var r=n?t.left:t.top,o=n?t.right:t.bottom,a=n?t.width:t.height,l=n?e.left:e.top,s=n?e.right:e.bottom,d=n?e.width:e.height;return r===l||o===s||r+a/2===l+d/2},Zn=function(t,e){var n;return zt.some(function(r){var o=r[B].options.emptyInsertThreshold;if(!(!o||ue(r))){var a=O(r),l=t>=a.left-o&&t<=a.right+o,s=e>=a.top-o&&e<=a.bottom+o;if(l&&s)return n=r}}),n},on=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 f=(a?l:s).options.group.name;return o===!0||typeof o=="string"&&o===f||o.join&&o.indexOf(f)>-1}}var n={},r=t.group;(!r||kt(r)!="object")&&(r={name:r}),n.name=r.name,n.checkPull=e(r.pull,!0),n.checkPut=e(r.put),n.revertClone=r.revertClone,t.group=n},an=function(){!nn&&m&&p(m,"display","none")},sn=function(){!nn&&m&&p(m,"display","")};Gt&&!Xe&&document.addEventListener("click",function(i){if(Ft)return i.preventDefault(),i.stopPropagation&&i.stopPropagation(),i.stopImmediatePropagation&&i.stopImmediatePropagation(),Ft=!1,!1},!0);var rt=function(t){if(h){t=t.touches?t.touches[0]:t;var e=Zn(t.clientX,t.clientY);if(e){var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[B]._onDragOver(n)}}},Kn=function(t){h&&h.parentNode[B]._isOutsideThisEl(t.target)};function g(i,t){if(!(i&&i.nodeType&&i.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));this.el=i,this.options=t=G({},t),i[B]=this;var e={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(i.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return rn(i,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(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:g.supportPointer!==!1&&"PointerEvent"in window&&!Bt,emptyInsertThreshold:5};St.initializePlugins(this,i,e);for(var n in e)!(n in t)&&(t[n]=e[n]);on(t);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=t.forceFallback?!1:Gn,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?$(i,"pointerdown",this._onTapStart):($(i,"mousedown",this._onTapStart),$(i,"touchstart",this._onTapStart)),this.nativeDraggable&&($(i,"dragover",this),$(i,"dragenter",this)),zt.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),G(this,Fn())}g.prototype={constructor:g,_isOutsideThisEl:function(t){!this.el.contains(t)&&t!==this.el&&(yt=null)},_getDirection:function(t,e){return typeof this.options.direction=="function"?this.options.direction.call(this,t,e,h):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=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(oi(n),!h&&!(/mousedown|pointerdown/.test(a)&&t.button!==0||r.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&Bt&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=j(s,r.draggable,n,!1),!(s&&s.animated)&&Vt!==s)){if(mt=R(s),At=R(s,r.draggable),typeof c=="function"){if(c.call(this,t,s,this)){L({sortable:e,rootEl:d,name:"filter",targetEl:s,toEl:n,fromEl:n}),I("filter",e,{evt:t}),o&&t.cancelable&&t.preventDefault();return}}else if(c&&(c=c.split(",").some(function(u){if(u=j(d,u.trim(),n,!1),u)return L({sortable:e,rootEl:u,name:"filter",targetEl:s,fromEl:n,toEl:n}),I("filter",e,{evt:t}),!0}),c)){o&&t.cancelable&&t.preventDefault();return}r.handle&&!j(d,r.handle,n,!1)||this._prepareDragStart(t,l,s)}}},_prepareDragStart:function(t,e,n){var r=this,o=r.el,a=r.options,l=o.ownerDocument,s;if(n&&!h&&n.parentNode===o){var d=O(n);if(w=o,h=n,A=h.parentNode,nt=h.nextSibling,Vt=n,jt=a.group,g.dragged=h,it={target:h,clientX:(e||t).clientX,clientY:(e||t).clientY},Qe=it.clientX-d.left,tn=it.clientY-d.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,h.style["will-change"]="all",s=function(){if(I("delayEnded",r,{evt:t}),g.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Fe&&r.nativeDraggable&&(h.draggable=!0),r._triggerDragStart(t,e),L({sortable:r,name:"choose",originalEvent:t}),M(h,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){Ge(h,c.trim(),_e)}),$(l,"dragover",rt),$(l,"mousemove",rt),$(l,"touchmove",rt),$(l,"mouseup",r._onDrop),$(l,"touchend",r._onDrop),$(l,"touchcancel",r._onDrop),Fe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,h.draggable=!0),I("delayStart",this,{evt:t}),a.delay&&(!a.delayOnTouchOnly||e)&&(!this.nativeDraggable||!(Rt||q))){if(g.eventCanceled){this._onDrop();return}$(l,"mouseup",r._disableDelayedDrag),$(l,"touchend",r._disableDelayedDrag),$(l,"touchcancel",r._disableDelayedDrag),$(l,"mousemove",r._delayedDragTouchMoveHandler),$(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&$(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;E(t,"mouseup",this._disableDelayedDrag),E(t,"touchend",this._disableDelayedDrag),E(t,"touchcancel",this._disableDelayedDrag),E(t,"mousemove",this._delayedDragTouchMoveHandler),E(t,"touchmove",this._delayedDragTouchMoveHandler),E(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||t.pointerType=="touch"&&t,!this.nativeDraggable||e?this.options.supportPointer?$(document,"pointermove",this._onTouchMove):e?$(document,"touchmove",this._onTouchMove):$(document,"mousemove",this._onTouchMove):($(h,"dragend",this),$(w,"dragstart",this._onDragStart));try{document.selection?Kt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(t,e){if(vt=!1,w&&h){I("dragStarted",this,{evt:e}),this.nativeDraggable&&$(document,"dragover",Kn);var n=this.options;!t&&M(h,n.dragClass,!1),M(h,n.ghostClass,!0),g.active=this,t&&this._appendGhost(),L({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(U){this._lastX=U.clientX,this._lastY=U.clientY,an();for(var t=document.elementFromPoint(U.clientX,U.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(U.clientX,U.clientY),t!==e);)e=t;if(h.parentNode[B]._isOutsideThisEl(t),e)do{if(e[B]){var n=void 0;if(n=e[B]._onDragOver({clientX:U.clientX,clientY:U.clientY,target:t,rootEl:e}),n&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);sn()}},_onTouchMove:function(t){if(it){var e=this.options,n=e.fallbackTolerance,r=e.fallbackOffset,o=t.touches?t.touches[0]:t,a=m&&ft(m,!0),l=m&&a&&a.a,s=m&&a&&a.d,d=qt&&x&&Ze(x),c=(o.clientX-it.clientX+r.x)/(l||1)+(d?d[0]-ve[0]:0)/(l||1),u=(o.clientY-it.clientY+r.y)/(s||1)+(d?d[1]-ve[1]:0)/(s||1);if(!g.active&&!vt){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(m){a?(a.e+=c-(ge||0),a.f+=u-(me||0)):a={a:1,b:0,c:0,d:1,e:c,f:u};var f="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");p(m,"webkitTransform",f),p(m,"mozTransform",f),p(m,"msTransform",f),p(m,"transform",f),ge=c,me=u,U=o}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!m){var t=this.options.fallbackOnBody?document.body:w,e=O(h,!0,qt,!0,t),n=this.options;if(qt){for(x=t;p(x,"position")==="static"&&p(x,"transform")==="none"&&x!==document;)x=x.parentNode;x!==document.body&&x!==document.documentElement?(x===document&&(x=Z()),e.top+=x.scrollTop,e.left+=x.scrollLeft):x=Z(),ve=Ze(x)}m=h.cloneNode(!0),M(m,n.ghostClass,!1),M(m,n.fallbackClass,!0),M(m,n.dragClass,!0),p(m,"transition",""),p(m,"transform",""),p(m,"box-sizing","border-box"),p(m,"margin",0),p(m,"top",e.top),p(m,"left",e.left),p(m,"width",e.width),p(m,"height",e.height),p(m,"opacity","0.8"),p(m,"position",qt?"absolute":"fixed"),p(m,"zIndex","100000"),p(m,"pointerEvents","none"),g.ghost=m,t.appendChild(m),p(m,"transform-origin",Qe/parseInt(m.style.width)*100+"% "+tn/parseInt(m.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,r=t.dataTransfer,o=n.options;if(I("dragStart",this,{evt:t}),g.eventCanceled){this._onDrop();return}I("setupClone",this),g.eventCanceled||(S=Je(h),S.removeAttribute("id"),S.draggable=!1,S.style["will-change"]="",this._hideClone(),M(S,this.options.chosenClass,!1),g.clone=S),n.cloneId=Kt(function(){I("clone",n),!g.eventCanceled&&(n.options.removeCloneOnHide||w.insertBefore(S,h),n._hideClone(),L({sortable:n,name:"clone"}))}),!e&&M(h,o.dragClass,!0),e?(Ft=!0,n._loopId=setInterval(n._emulateDragOver,50)):(E(document,"mouseup",n._onDrop),E(document,"touchend",n._onDrop),E(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(n,r,h)),$(document,"drop",n),p(h,"transform","translateZ(0)")),vt=!0,n._dragStartId=Kt(n._dragStarted.bind(n,e,t)),$(document,"selectstart",n),Dt=!0,Bt&&p(document.body,"user-select","none")},_onDragOver:function(t){var e=this.el,n=t.target,r,o,a,l=this.options,s=l.group,d=g.active,c=jt===s,u=l.sort,f=T||d,_,y=this,v=!1;if(ye)return;function z(It,ui){I(It,y,V({evt:t,isOwner:c,axis:_?"vertical":"horizontal",revert:a,dragRect:r,targetRect:o,canSort:u,fromSortable:f,target:n,completed:k,onMove:function(mn,ci){return Zt(w,e,h,r,mn,O(mn),t,ci)},changed:at},ui))}function ot(){z("dragOverAnimationCapture"),y.captureAnimationState(),y!==f&&f.captureAnimationState()}function k(It){return z("dragOverCompleted",{insertion:It}),It&&(c?d._hideClone():d._showClone(y),y!==f&&(M(h,T?T.options.ghostClass:d.options.ghostClass,!1),M(h,l.ghostClass,!0)),T!==y&&y!==g.active?T=y:y===g.active&&T&&(T=null),f===y&&(y._ignoreWhileAnimating=n),y.animateAll(function(){z("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(n===h&&!h.animated||n===e&&!n.animated)&&(yt=null),!l.dragoverBubble&&!t.rootEl&&n!==document&&(h.parentNode[B]._isOutsideThisEl(t.target),!It&&rt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),v=!0}function at(){H=R(h),J=R(h,l.draggable),L({sortable:y,name:"change",toEl:e,newIndex:H,newDraggableIndex:J,originalEvent:t})}if(t.preventDefault!==void 0&&t.cancelable&&t.preventDefault(),n=j(n,l.draggable,e,!0),z("dragOver"),g.eventCanceled)return v;if(h.contains(t.target)||n.animated&&n.animatingX&&n.animatingY||y._ignoreWhileAnimating===n)return k(!1);if(Ft=!1,d&&!l.disabled&&(c?u||(a=A!==w):T===this||(this.lastPutMode=jt.checkPull(this,d,h,t))&&s.checkPut(this,d,h,t))){if(_=this._getDirection(t,n)==="vertical",r=O(h),z("dragOverValid"),g.eventCanceled)return v;if(a)return A=w,ot(),this._hideClone(),z("revert"),g.eventCanceled||(nt?w.insertBefore(h,nt):w.appendChild(h)),k(!0);var X=ue(e,l.draggable);if(!X||ei(t,_,this)&&!X.animated){if(X===h)return k(!1);if(X&&e===t.target&&(n=X),n&&(o=O(n)),Zt(w,e,h,r,n,o,t,!!n)!==!1)return ot(),X&&X.nextSibling?e.insertBefore(h,X.nextSibling):e.appendChild(h),A=e,at(),k(!0)}else if(X&&ti(t,_,this)){var Ee=pt(e,0,l,!0);if(Ee===h)return k(!1);if(n=Ee,o=O(n),Zt(w,e,h,r,n,o,t,!1)!==!1)return ot(),e.insertBefore(h,Ee),A=e,at(),k(!0)}else if(n.parentNode===e){o=O(n);var _t=0,Ce,di=h.parentNode!==e,cn=!qn(h.animated&&h.toRect||r,n.animated&&n.toRect||o,_),fn=_?"top":"left",xt=qe(n,"top","top")||qe(h,"top","top"),hi=xt?xt.scrollTop:void 0;yt!==n&&(Ce=o[fn],Tt=!1,Xt=!cn&&l.invertSwap||di),_t=ni(t,n,o,_,cn?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Xt,yt===n);var Lt;if(_t!==0){var pn=R(h);do pn-=_t,Lt=A.children[pn];while(Lt&&(p(Lt,"display")==="none"||Lt===m))}if(_t===0||Lt===n)return k(!1);yt=n,Ot=_t;var gn=n.nextElementSibling,Pt=!1;Pt=_t===1;var Jt=Zt(w,e,h,r,n,o,t,Pt);if(Jt!==!1)return(Jt===1||Jt===-1)&&(Pt=Jt===1),ye=!0,setTimeout(Qn,30),ot(),Pt&&!gn?e.appendChild(h):n.parentNode.insertBefore(h,Pt?gn:n),xt&&jn(xt,0,hi-xt.scrollTop),A=h.parentNode,Ce!==void 0&&!Xt&&(Wt=Math.abs(Ce-O(n)[fn])),at(),k(!0)}if(e.contains(h))return k(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",rt),E(document,"mousemove",rt),E(document,"touchmove",rt)},_offUpEvents:function(){var t=this.el.ownerDocument;E(t,"mouseup",this._onDrop),E(t,"touchend",this._onDrop),E(t,"pointerup",this._onDrop),E(t,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;if(H=R(h),J=R(h,n.draggable),I("drop",this,{evt:t}),A=h&&h.parentNode,H=R(h),J=R(h,n.draggable),g.eventCanceled){this._nulling();return}vt=!1,Xt=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),be(this.cloneId),be(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Bt&&p(document.body,"user-select",""),p(h,"transform",""),t&&(Dt&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),m&&m.parentNode&&m.parentNode.removeChild(m),(w===A||T&&T.lastPutMode!=="clone")&&S&&S.parentNode&&S.parentNode.removeChild(S),h&&(this.nativeDraggable&&E(h,"dragend",this),_e(h),h.style["will-change"]="",Dt&&!vt&&M(h,T?T.options.ghostClass:this.options.ghostClass,!1),M(h,this.options.chosenClass,!1),L({sortable:this,name:"unchoose",toEl:A,newIndex:null,newDraggableIndex:null,originalEvent:t}),w!==A?(H>=0&&(L({rootEl:A,name:"add",toEl:A,fromEl:w,originalEvent:t}),L({sortable:this,name:"remove",toEl:A,originalEvent:t}),L({rootEl:A,name:"sort",toEl:A,fromEl:w,originalEvent:t}),L({sortable:this,name:"sort",toEl:A,originalEvent:t})),T&&T.save()):H!==mt&&H>=0&&(L({sortable:this,name:"update",toEl:A,originalEvent:t}),L({sortable:this,name:"sort",toEl:A,originalEvent:t})),g.active&&((H==null||H===-1)&&(H=mt,J=At),L({sortable:this,name:"end",toEl:A,originalEvent:t}),this.save()))),this._nulling()},_nulling:function(){I("nulling",this),w=h=A=m=nt=S=Vt=K=it=U=Dt=H=J=mt=At=yt=Ot=T=jt=g.dragged=g.ghost=g.clone=g.active=null,Yt.forEach(function(t){t.checked=!0}),Yt.length=ge=me=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":h&&(this._onDragOver(t),Jn(t));break;case"selectstart":t.preventDefault();break}},toArray:function(){for(var t=[],e,n=this.el.children,r=0,o=n.length,a=this.options;r<o;r++)e=n[r],j(e,a.draggable,this.el,!1)&&t.push(e.getAttribute(a.dataIdAttr)||ri(e));return t},sort:function(t,e){var n={},r=this.el;this.toArray().forEach(function(o,a){var l=r.children[a];j(l,this.options.draggable,r,!1)&&(n[o]=l)},this),e&&this.captureAnimationState(),t.forEach(function(o){n[o]&&(r.removeChild(n[o]),r.appendChild(n[o]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return j(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(e===void 0)return n[t];var r=St.modifyOption(this,t,e);typeof r<"u"?n[t]=r:n[t]=e,t==="group"&&on(n)},destroy:function(){I("destroy",this);var t=this.el;t[B]=null,E(t,"mousedown",this._onTapStart),E(t,"touchstart",this._onTapStart),E(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(t,"dragover",this),E(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),zt.splice(zt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!K){if(I("hideClone",this),g.eventCanceled)return;p(S,"display","none"),this.options.removeCloneOnHide&&S.parentNode&&S.parentNode.removeChild(S),K=!0}},_showClone:function(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(K){if(I("showClone",this),g.eventCanceled)return;h.parentNode==w&&!this.options.group.revertClone?w.insertBefore(S,h):nt?w.insertBefore(S,nt):w.appendChild(S),this.options.group.revertClone&&this.animate(h,S),p(S,"display",""),K=!1}}};function Jn(i){i.dataTransfer&&(i.dataTransfer.dropEffect="move"),i.cancelable&&i.preventDefault()}function Zt(i,t,e,n,r,o,a,l){var s,d=i[B],c=d.options.onMove,u;return window.CustomEvent&&!q&&!Rt?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=t,s.from=i,s.dragged=e,s.draggedRect=n,s.related=r||t,s.relatedRect=o||O(t),s.willInsertAfter=l,s.originalEvent=a,i.dispatchEvent(s),c&&(u=c.call(d,s,a)),u}function _e(i){i.draggable=!1}function Qn(){ye=!1}function ti(i,t,e){var n=O(pt(e.el,0,e.options,!0)),r=10;return t?i.clientX<n.left-r||i.clientY<n.top&&i.clientX<n.right:i.clientY<n.top-r||i.clientY<n.bottom&&i.clientX<n.left}function ei(i,t,e){var n=O(ue(e.el,e.options.draggable)),r=10;return t?i.clientX>n.right+r||i.clientX<=n.right&&i.clientY>n.bottom&&i.clientX>=n.left:i.clientX>n.right&&i.clientY>n.top||i.clientX<=n.right&&i.clientY>n.bottom+r}function ni(i,t,e,n,r,o,a,l){var s=n?i.clientY:i.clientX,d=n?e.height:e.width,c=n?e.top:e.left,u=n?e.bottom:e.right,f=!1;if(!a){if(l&&Wt<d*r){if(!Tt&&(Ot===1?s>c+d*o/2:s<u-d*o/2)&&(Tt=!0),Tt)f=!0;else if(Ot===1?s<c+Wt:s>u-Wt)return-Ot}else if(s>c+d*(1-r)/2&&s<u-d*(1-r)/2)return ii(t)}return f=f||a,f&&(s<c+d*o/2||s>u-d*o/2)?s>c+d/2?1:-1:0}function ii(i){return R(h)<R(i)?1:-1}function ri(i){for(var t=i.tagName+i.className+i.src+i.href+i.textContent,e=t.length,n=0;e--;)n+=t.charCodeAt(e);return n.toString(36)}function oi(i){Yt.length=0;for(var t=i.getElementsByTagName("input"),e=t.length;e--;){var n=t[e];n.checked&&Yt.push(n)}}function Kt(i){return setTimeout(i,0)}function be(i){return clearTimeout(i)}Gt&&$(document,"touchmove",function(i){(g.active||vt)&&i.cancelable&&i.preventDefault()}),g.utils={on:$,off:E,css:p,find:Ge,is:function(t,e){return!!j(t,e,t,!1)},extend:Un,throttle:Vn,closest:j,toggleClass:M,clone:Je,index:R,nextTick:Kt,cancelNextTick:be,detectDirection:rn,getChild:pt},g.get=function(i){return i[B]},g.mount=function(){for(var i=arguments.length,t=new Array(i),e=0;e<i;e++)t[e]=arguments[e];t[0].constructor===Array&&(t=t[0]),t.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(g.utils=V(V({},g.utils),n.utils)),St.mount(n)})},g.create=function(i,t){return new g(i,t)},g.version=kn;var ln=function(t){var e=t.originalEvent,n=t.putSortable,r=t.dragEl,o=t.activeSortable,a=t.dispatchSortableEvent,l=t.hideGhostForTarget,s=t.unhideGhostForTarget;if(e){var d=n||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:n}))}};function dn(){}dn.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var r=pt(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(e,r):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:ln},G(dn,{pluginName:"revertOnSpill"});function hn(){}hn.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable,r=n||this.sortable;r.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),r.animateAll()},drop:ln},G(hn,{pluginName:"removeOnSpill"});const un=`
49
49
  :host {
50
50
  display: block;
51
51
  }
@@ -56,7 +56,10 @@
56
56
  .dragHandle {
57
57
  cursor: ns-resize;
58
58
  }
59
- `,si=`
59
+ ul[data-group] {
60
+ padding-inline-start: 40px;
61
+ }
62
+ `,ai=`
60
63
  ul {
61
64
  padding: 0;
62
65
  }
@@ -90,57 +93,65 @@ li label > input[type=checkbox]:checked:after {
90
93
  width: 24px;
91
94
  height: 24px;
92
95
  }
93
- `;var li=Object.defineProperty,di=Object.getOwnPropertyDescriptor,O=(i,e,t,n)=>{for(var o=n>1?void 0:n?di(e,t):e,r=i.length-1,a;r>=0;r--)(a=i[r])&&(o=(n?a(e,t,o):a(o))||o);return n&&o&&li(e,t,o),o};v.EOxLayerControl=class extends fe{constructor(){super(...arguments);D(this,"_currentlySorting");D(this,"olMap");D(this,"layerCollection");D(this,"layerArray");D(this,"optionalLayerArray");D(this,"for");D(this,"layerIdentifier","ol_uid");D(this,"layerTitle","title");D(this,"sortBy","layerOrder");D(this,"layerConfig",["opacity"]);D(this,"externalLayerConfig");D(this,"unstyled");D(this,"hideConfigs",!1)}_updateControl(t){this.layerCollection=t;const n=[...t.getArray()].filter(a=>a.get("layerControlHide")!==!0&&a.get("layerControlOptional")!==!0),o=[...t.getArray()].filter(a=>a.get("layerControlOptional")===!0);this.getAttribute("sortBy")==="zIndex"?n.sort((a,l)=>a.get("zIndex")?a.get("zIndex")<l.get("zIndex")?1:-1:1):n.reverse(),this.layerArray=n,this.optionalLayerArray=o,this.requestUpdate()}_emitLayerconfig(t){const n={detail:{layer:t},bubbles:!0,composed:!0};this.dispatchEvent(new CustomEvent("layerconfig",n))}changeOpacity(t,n){t.setOpacity(n)}changeStyleProperty(t,n,o){t.updateStyleVariables({...t.style_,[n]:o})}resetLayerConfig(){this.hideConfigs=!0,setTimeout(()=>{this.hideConfigs=!1,this.requestUpdate()},0)}render(){var r;const t=document.querySelector(this.for),o=(t.map||t).getLayers();return this._updateControl(o),o.on("change:length",()=>{this._currentlySorting||this._updateControl(o)}),M`
96
+ `;var si=Object.defineProperty,li=Object.getOwnPropertyDescriptor,D=(i,t,e,n)=>{for(var r=n>1?void 0:n?li(t,e):t,o=i.length-1,a;o>=0;o--)(a=i[o])&&(r=(n?a(t,e,r):a(r))||r);return n&&r&&si(t,e,r),r};b.EOxLayerControl=class extends ut{constructor(){super(...arguments),this.layerIdentifier="ol_uid",this.layerTitle="title",this.sortBy="layerOrder",this.layerConfig=["opacity"],this.externalLayerConfig=void 0,this.filterLayers=(t,e,n)=>{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,n),r},this.findLayerById=(t,e)=>this.filterLayers(t,"id",e)[0]}_updateControl(t){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,n){t.updateStyleVariables({...t.style_,[e]:n})}preFilterLayers(t){return[...t].filter(e=>e.get("layerControlHide")!==!0&&e.get("layerControlOptional")!==!0)}resetLayerConfig(){const t=this.layerConfig;this.layerConfig=[],this.hideList=!0,setTimeout(()=>{this.layerConfig=t,this.hideList=!1,this.requestUpdate()},0)}render(){var o;const t=document.querySelector(this.for),n=(t.map||t).getLayers();this._updateControl(n),n.on("change:length",()=>{this._currentlySorting||this._updateControl(n)});const r=(a,l)=>P`
97
+ <ul data-group="${l??C}">
98
+ ${he(a,s=>P`
99
+ <li
100
+ data-layer="${s.get(this.layerIdentifier)}"
101
+ data-disabled="${s.get("layerControlDisable")||C}"
102
+ >
103
+ <div class="layer">
104
+ <label>
105
+ <input
106
+ type="checkbox"
107
+ checked="${s.getVisible()||C}"
108
+ @click=${()=>{s.setVisible(!s.getVisible()),this.requestUpdate()}}
109
+ />
110
+ <span class="title"
111
+ >${s.get(this.layerTitle)||`layer ${s.get(this.layerIdentifier)}`}</span
112
+ >
113
+ </label>
114
+ ${this.sortBy==="layerOrder"&&!s.get("layerControlDisable")?P`<div class="dragHandle">
115
+ <span>=</span>
116
+ </div>`:C}
117
+ </div>
118
+ ${this.layerConfig?P`
119
+ <eox-layerconfig
120
+ .layerConfig="${this.layerConfig}"
121
+ .layerControl="${this}"
122
+ .layer=${s}
123
+ .external=${this.externalLayerConfig}
124
+ ></eox-layerconfig>
125
+ `:C}
126
+ ${this.externalLayerConfig&&s.style_?P`
127
+ <button
128
+ @click=${()=>this._emitLayerconfig(s)}
129
+ >
130
+ configure
131
+ </button>
132
+ `:C}
133
+ ${s.getLayers?r(this.preFilterLayers([...s.getLayers().getArray()].reverse()),s.get("id")):C}
134
+ </li>
135
+ `)}
136
+ </ul>
137
+ `;return P`
94
138
  <style>
95
- ${cn}
96
- ${!this.unstyled&&si}
139
+ ${un}
140
+ ${!this.unstyled&&ai}
97
141
  </style>
98
142
  <div>
99
143
  <slot></slot>
100
- <ul>
101
- ${ut(this.layerArray,a=>M`
102
- <li
103
- layerid="${a.get(this.layerIdentifier)}"
104
- >
105
- <div class="layer">
106
- <label>
107
- <input
108
- type="checkbox"
109
- checked="${a.getVisible()||$}"
110
- @click=${()=>{a.setVisible(!a.getVisible()),this.requestUpdate()}}
111
- />
112
- <span class="title"
113
- >${a.get(this.layerTitle)||`layer ${a.get(this.layerIdentifier)}`}</span
114
- >
115
- </label>
116
- ${this.sortBy==="layerOrder"?M`<div class="dragHandle">
117
- <span>=</span>
118
- </div>`:$}
119
- </div>
120
- ${this.layerConfig&&!this.hideConfigs?M`
121
- <eox-layerconfig
122
- .layerConfig="${this.layerConfig}"
123
- .layerControl="${this}"
124
- .layer=${a}
125
- .external=${this.externalLayerConfig}
126
- ></eox-layerconfig>
127
- `:$}
128
- ${this.externalLayerConfig&&a.style_?M`
129
- <button @click=${()=>this._emitLayerconfig(a)}>
130
- configure
131
- </button>
132
- `:$}
133
- </li>
134
- `)}
135
- </ul>
136
- ${jt(((r=this.optionalLayerArray)==null?void 0:r.length)>0,()=>M`
144
+ <div>
145
+ ${!this.hideList&&r(this.preFilterLayers(n.getArray()))}
146
+ </div>
147
+ ${Ve(((o=this.optionalLayerArray)==null?void 0:o.length)>0,()=>P`
137
148
  <label for="optional">Optional layers</label>
138
149
 
139
150
  <select name="optional">
140
151
  <option disabled selected value>
141
152
  -- select an optional layer to add --
142
153
  </option>
143
- ${this.optionalLayerArray.map(a=>M`
154
+ ${this.optionalLayerArray.map(a=>P`
144
155
  <option
145
156
  value="${a.get(this.layerIdentifier)}"
146
157
  >
@@ -149,21 +160,21 @@ li label > input[type=checkbox]:checked:after {
149
160
  `)}
150
161
  </select>
151
162
  <button
152
- @click="${()=>{const a=this.optionalLayerArray.find(l=>l.get(this.layerIdentifier)===this.shadowRoot.querySelector("select[name=optional]").value);this.layerCollection.remove(a),this.layerCollection.insertAt(this.layerCollection.getLength(),a),a.set("layerControlOptional",!1),a.setVisible(!0),this.resetLayerConfig()}}"
163
+ @click="${()=>{const a=this.optionalLayerArray.find(l=>l.get(this.layerIdentifier)===this.shadowRoot.querySelector("select[name=optional]").value);if(a.get("group")){const l=this.findLayerById(this.layerCollection.getArray(),a.get("group"));l.getLayers().remove(a),l.getLayers().insertAt(l.getLayers().getLength(),a)}else this.layerCollection.remove(a),this.layerCollection.insertAt(this.layerCollection.getLength(),a);a.set("layerControlOptional",!1),a.setVisible(!0),this.resetLayerConfig()}}"
153
164
  >
154
165
  add
155
166
  </button>
156
167
  `)}
157
168
  </div>
158
- `}updated(){this.sortBy=="layerOrder"&&g.create(this.renderRoot.querySelector("ul"),{handle:".dragHandle",dataIdAttr:"layerId",store:{get:()=>this.layerCollection.getArray().map(t=>t.get(this.layerIdentifier)).reverse(),set:t=>{var n=t.toArray().reverse();n.forEach((o,r)=>{const a=this.layerCollection.getArray().find(l=>l.get(this.layerIdentifier)===o);this.layerCollection.remove(a),this.layerCollection.insertAt(r,a)})}},onSort:()=>{this.resetLayerConfig()}})}},O([pe()],v.EOxLayerControl.prototype,"olMap",2),O([pe()],v.EOxLayerControl.prototype,"layerCollection",2),O([pe()],v.EOxLayerControl.prototype,"layerArray",2),O([pe()],v.EOxLayerControl.prototype,"optionalLayerArray",2),O([H()],v.EOxLayerControl.prototype,"for",2),O([H()],v.EOxLayerControl.prototype,"layerIdentifier",2),O([H()],v.EOxLayerControl.prototype,"layerTitle",2),O([H()],v.EOxLayerControl.prototype,"sortBy",2),O([H({type:Array})],v.EOxLayerControl.prototype,"layerConfig",2),O([H({type:Boolean})],v.EOxLayerControl.prototype,"externalLayerConfig",2),O([H({type:Boolean})],v.EOxLayerControl.prototype,"unstyled",2),v.EOxLayerControl=O([Vt("eox-layercontrol")],v.EOxLayerControl),v.EOxLayerConfig=class extends fe{constructor(){super(...arguments);D(this,"for");D(this,"layerConfig");D(this,"layerControl");D(this,"layer");D(this,"external");D(this,"_layerControlElement");D(this,"_currentLayer");D(this,"_configList",{})}_handleInput(t,n){n==="opacity"?this._layerControlElement.changeOpacity(this._currentLayer,parseFloat(t.target.value)):this._layerControlElement.changeStyleProperty(this._currentLayer,n,parseFloat(t.target.value))}_parseConfigs(t){if(!t)return;const n=t.style_;n&&n.color&&n.color[0]==="array"&&(this._configList=n.variables)}connectedCallback(){super.connectedCallback(),!this.layerConfig&&!this.layerControl?(this._layerControlElement=document.querySelector(this.for),this.layerConfig=this._layerControlElement.layerConfig,this._layerControlElement&&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 M`
169
+ `}updated(){this.sortBy=="layerOrder"&&this.renderRoot.querySelectorAll("ul").forEach(e=>{const n=e.dataset.group;g.create(e,{handle:".dragHandle",dataIdAttr:"data-layer",filter:"data-disabled",store:{get:()=>n?[...this.findLayerById(this.layerCollection.getArray(),n).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(n){const d=this.findLayerById(this.layerCollection.getArray(),n).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,onSort:()=>{this.resetLayerConfig()}})})}},D([ct()],b.EOxLayerControl.prototype,"olMap",2),D([ct()],b.EOxLayerControl.prototype,"layerCollection",2),D([ct()],b.EOxLayerControl.prototype,"layerArray",2),D([ct()],b.EOxLayerControl.prototype,"optionalLayerArray",2),D([N()],b.EOxLayerControl.prototype,"for",2),D([N()],b.EOxLayerControl.prototype,"layerIdentifier",2),D([N()],b.EOxLayerControl.prototype,"layerTitle",2),D([N()],b.EOxLayerControl.prototype,"sortBy",2),D([N({type:Array})],b.EOxLayerControl.prototype,"layerConfig",2),D([N({type:Boolean})],b.EOxLayerControl.prototype,"externalLayerConfig",2),D([N({type:Boolean})],b.EOxLayerControl.prototype,"unstyled",2),b.EOxLayerControl=D([Ue("eox-layercontrol")],b.EOxLayerControl),b.EOxLayerConfig=class extends ut{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.layerConfig=this._layerControlElement.layerConfig,this._layerControlElement&&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 P`
159
170
  <style>
160
- ${cn}
171
+ ${un}
161
172
  </style>
162
- ${jt(this._currentLayer,()=>M`
173
+ ${Ve(this._currentLayer,()=>P`
163
174
  <div>
164
175
  <slot></slot>
165
- ${this.for?M`layer: ${this._currentLayer.get("name")}`:$}
166
- ${ut(this.layerConfig.filter(t=>this.for?t!=="opacity":!0),t=>M`
176
+ ${this.for?P`layer: ${this._currentLayer.get("name")}`:C}
177
+ ${he(this.layerConfig.filter(t=>this.for?t!=="opacity":!0),t=>P`
167
178
  <div>${t}</div>
168
179
  <input
169
180
  type="range"
@@ -171,26 +182,26 @@ li label > input[type=checkbox]:checked:after {
171
182
  max="1"
172
183
  step="0.01"
173
184
  value="${this._currentLayer.getOpacity()}"
174
- @input=${n=>this._handleInput(n,t)}
185
+ @input=${e=>this._handleInput(e,t)}
175
186
  />
176
187
  `)}
177
- ${Object.keys(this._configList).length>0&&!this.external?M`
178
- <details open="${this.for?!0:$}">
188
+ ${Object.keys(this._configList).length>0&&!this.external?P`
189
+ <details open="${this.for?!0:C}">
179
190
  <summary>Layer config</summary>
180
191
  <ul>
181
- ${ut(Object.keys(this._configList),t=>M` <li>
192
+ ${he(Object.keys(this._configList),t=>P` <li>
182
193
  <div>${t}</div>
183
194
  <input
184
195
  type="range"
185
196
  min="${["red","green","blue"].includes(t)?1:2e3}"
186
197
  max="${["red","green","blue"].includes(t)?4:5e3}"
187
198
  value="${this._configList[t]}"
188
- @input=${n=>this._handleInput(n,t)}
199
+ @input=${e=>this._handleInput(e,t)}
189
200
  />
190
201
  </li>`)}
191
202
  </ul>
192
203
  </details>
193
- `:$}
204
+ `:C}
194
205
  </div>
195
206
  `)}
196
- `}},O([H()],v.EOxLayerConfig.prototype,"for",2),O([H({type:Array})],v.EOxLayerConfig.prototype,"layerConfig",2),O([H({type:Object,attribute:!1})],v.EOxLayerConfig.prototype,"layerControl",2),O([H({type:Object,attribute:!1})],v.EOxLayerConfig.prototype,"layer",2),O([H({type:Boolean})],v.EOxLayerConfig.prototype,"external",2),O([pe()],v.EOxLayerConfig.prototype,"_currentLayer",2),O([pe()],v.EOxLayerConfig.prototype,"_configList",2),v.EOxLayerConfig=O([Vt("eox-layerconfig")],v.EOxLayerConfig),Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
207
+ `}},D([N()],b.EOxLayerConfig.prototype,"for",2),D([N({type:Array})],b.EOxLayerConfig.prototype,"layerConfig",2),D([N({type:Object,attribute:!1})],b.EOxLayerConfig.prototype,"layerControl",2),D([N({type:Object,attribute:!1})],b.EOxLayerConfig.prototype,"layer",2),D([N({type:Boolean})],b.EOxLayerConfig.prototype,"external",2),D([ct()],b.EOxLayerConfig.prototype,"_currentLayer",2),D([ct()],b.EOxLayerConfig.prototype,"_configList",2),b.EOxLayerConfig=D([Ue("eox-layerconfig")],b.EOxLayerConfig),Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eox/layercontrol",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@eox/eslint-config": "^1.0.0",