@eox/layercontrol 0.6.8 → 0.7.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,21 +1,32 @@
1
+ var an = Object.defineProperty;
2
+ var ln = (n, t, e) => t in n ? an(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
3
+ var L = (n, t, e) => (ln(n, typeof t != "symbol" ? t + "" : t, e), e), dn = (n, t, e) => {
4
+ if (!t.has(n))
5
+ throw TypeError("Cannot " + e);
6
+ };
7
+ var O = (n, t, e) => (dn(n, t, "read from private field"), e ? e.call(n) : t.get(n)), M = (n, t, e) => {
8
+ if (t.has(n))
9
+ throw TypeError("Cannot add the same private member more than once");
10
+ t instanceof WeakSet ? t.add(n) : t.set(n, e);
11
+ };
1
12
  /**
2
13
  * @license
3
14
  * Copyright 2019 Google LLC
4
15
  * SPDX-License-Identifier: BSD-3-Clause
5
16
  */
6
- const re = window, je = re.ShadowRoot && (re.ShadyCSS === void 0 || re.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, bi = Symbol(), qe = /* @__PURE__ */ new WeakMap();
7
- let Ji = class {
8
- constructor(t, e, n) {
9
- if (this._$cssResult$ = !0, n !== bi)
17
+ const te = window, ti = te.ShadowRoot && (te.ShadyCSS === void 0 || te.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Di = Symbol(), li = /* @__PURE__ */ new WeakMap();
18
+ let un = class {
19
+ constructor(t, e, i) {
20
+ if (this._$cssResult$ = !0, i !== Di)
10
21
  throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
11
22
  this.cssText = t, this.t = e;
12
23
  }
13
24
  get styleSheet() {
14
25
  let t = this.o;
15
26
  const e = this.t;
16
- if (je && t === void 0) {
17
- const n = e !== void 0 && e.length === 1;
18
- n && (t = qe.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && qe.set(e, t));
27
+ if (ti && t === void 0) {
28
+ const i = e !== void 0 && e.length === 1;
29
+ i && (t = li.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && li.set(e, t));
19
30
  }
20
31
  return t;
21
32
  }
@@ -23,53 +34,53 @@ let Ji = class {
23
34
  return this.cssText;
24
35
  }
25
36
  };
26
- const tn = (i) => new Ji(typeof i == "string" ? i : i + "", void 0, bi), en = (i, t) => {
27
- je ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
28
- const n = document.createElement("style"), r = re.litNonce;
29
- r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
37
+ const cn = (n) => new un(typeof n == "string" ? n : n + "", void 0, Di), hn = (n, t) => {
38
+ ti ? n.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
39
+ const i = document.createElement("style"), o = te.litNonce;
40
+ o !== void 0 && i.setAttribute("nonce", o), i.textContent = e.cssText, n.appendChild(i);
30
41
  });
31
- }, Ke = je ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
42
+ }, di = ti ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((t) => {
32
43
  let e = "";
33
- for (const n of t.cssRules)
34
- e += n.cssText;
35
- return tn(e);
36
- })(i) : i;
44
+ for (const i of t.cssRules)
45
+ e += i.cssText;
46
+ return cn(e);
47
+ })(n) : n;
37
48
  /**
38
49
  * @license
39
50
  * Copyright 2017 Google LLC
40
51
  * SPDX-License-Identifier: BSD-3-Clause
41
52
  */
42
- var be;
43
- const ue = window, Qe = ue.trustedTypes, nn = Qe ? Qe.emptyScript : "", Je = ue.reactiveElementPolyfillSupport, ke = { toAttribute(i, t) {
53
+ var Pe;
54
+ const ae = window, ui = ae.trustedTypes, pn = ui ? ui.emptyScript : "", ci = ae.reactiveElementPolyfillSupport, Ye = { toAttribute(n, t) {
44
55
  switch (t) {
45
56
  case Boolean:
46
- i = i ? nn : null;
57
+ n = n ? pn : null;
47
58
  break;
48
59
  case Object:
49
60
  case Array:
50
- i = i == null ? i : JSON.stringify(i);
61
+ n = n == null ? n : JSON.stringify(n);
51
62
  }
52
- return i;
53
- }, fromAttribute(i, t) {
54
- let e = i;
63
+ return n;
64
+ }, fromAttribute(n, t) {
65
+ let e = n;
55
66
  switch (t) {
56
67
  case Boolean:
57
- e = i !== null;
68
+ e = n !== null;
58
69
  break;
59
70
  case Number:
60
- e = i === null ? null : Number(i);
71
+ e = n === null ? null : Number(n);
61
72
  break;
62
73
  case Object:
63
74
  case Array:
64
75
  try {
65
- e = JSON.parse(i);
76
+ e = JSON.parse(n);
66
77
  } catch {
67
78
  e = null;
68
79
  }
69
80
  }
70
81
  return e;
71
- } }, _i = (i, t) => t !== i && (t == t || i == i), _e = { attribute: !0, type: String, converter: ke, reflect: !1, hasChanged: _i }, Ne = "finalized";
72
- let xt = class extends HTMLElement {
82
+ } }, Pi = (n, t) => t !== n && (t == t || n == n), He = { attribute: !0, type: String, converter: Ye, reflect: !1, hasChanged: Pi }, je = "finalized";
83
+ let _t = class extends HTMLElement {
73
84
  constructor() {
74
85
  super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
75
86
  }
@@ -80,61 +91,61 @@ let xt = class extends HTMLElement {
80
91
  static get observedAttributes() {
81
92
  this.finalize();
82
93
  const t = [];
83
- return this.elementProperties.forEach((e, n) => {
84
- const r = this._$Ep(n, e);
85
- r !== void 0 && (this._$Ev.set(r, n), t.push(r));
94
+ return this.elementProperties.forEach((e, i) => {
95
+ const o = this._$Ep(i, e);
96
+ o !== void 0 && (this._$Ev.set(o, i), t.push(o));
86
97
  }), t;
87
98
  }
88
- static createProperty(t, e = _e) {
99
+ static createProperty(t, e = He) {
89
100
  if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
90
- const n = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, n, e);
91
- r !== void 0 && Object.defineProperty(this.prototype, t, r);
101
+ const i = typeof t == "symbol" ? Symbol() : "__" + t, o = this.getPropertyDescriptor(t, i, e);
102
+ o !== void 0 && Object.defineProperty(this.prototype, t, o);
92
103
  }
93
104
  }
94
- static getPropertyDescriptor(t, e, n) {
105
+ static getPropertyDescriptor(t, e, i) {
95
106
  return { get() {
96
107
  return this[e];
97
- }, set(r) {
98
- const o = this[t];
99
- this[e] = r, this.requestUpdate(t, o, n);
108
+ }, set(o) {
109
+ const r = this[t];
110
+ this[e] = o, this.requestUpdate(t, r, i);
100
111
  }, configurable: !0, enumerable: !0 };
101
112
  }
102
113
  static getPropertyOptions(t) {
103
- return this.elementProperties.get(t) || _e;
114
+ return this.elementProperties.get(t) || He;
104
115
  }
105
116
  static finalize() {
106
- if (this.hasOwnProperty(Ne))
117
+ if (this.hasOwnProperty(je))
107
118
  return !1;
108
- this[Ne] = !0;
119
+ this[je] = !0;
109
120
  const t = Object.getPrototypeOf(this);
110
121
  if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
111
- const e = this.properties, n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
112
- for (const r of n)
113
- this.createProperty(r, e[r]);
122
+ const e = this.properties, i = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
123
+ for (const o of i)
124
+ this.createProperty(o, e[o]);
114
125
  }
115
126
  return this.elementStyles = this.finalizeStyles(this.styles), !0;
116
127
  }
117
128
  static finalizeStyles(t) {
118
129
  const e = [];
119
130
  if (Array.isArray(t)) {
120
- const n = new Set(t.flat(1 / 0).reverse());
121
- for (const r of n)
122
- e.unshift(Ke(r));
131
+ const i = new Set(t.flat(1 / 0).reverse());
132
+ for (const o of i)
133
+ e.unshift(di(o));
123
134
  } else
124
- t !== void 0 && e.push(Ke(t));
135
+ t !== void 0 && e.push(di(t));
125
136
  return e;
126
137
  }
127
138
  static _$Ep(t, e) {
128
- const n = e.attribute;
129
- return n === !1 ? void 0 : typeof n == "string" ? n : typeof t == "string" ? t.toLowerCase() : void 0;
139
+ const i = e.attribute;
140
+ return i === !1 ? void 0 : typeof i == "string" ? i : typeof t == "string" ? t.toLowerCase() : void 0;
130
141
  }
131
142
  u() {
132
143
  var t;
133
144
  this._$E_ = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((e) => e(this));
134
145
  }
135
146
  addController(t) {
136
- var e, n;
137
- ((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));
147
+ var e, i;
148
+ ((e = this._$ES) !== null && e !== void 0 ? e : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((i = t.hostConnected) === null || i === void 0 || i.call(t));
138
149
  }
139
150
  removeController(t) {
140
151
  var e;
@@ -148,13 +159,13 @@ let xt = class extends HTMLElement {
148
159
  createRenderRoot() {
149
160
  var t;
150
161
  const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
151
- return en(e, this.constructor.elementStyles), e;
162
+ return hn(e, this.constructor.elementStyles), e;
152
163
  }
153
164
  connectedCallback() {
154
165
  var t;
155
166
  this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
156
- var n;
157
- return (n = e.hostConnected) === null || n === void 0 ? void 0 : n.call(e);
167
+ var i;
168
+ return (i = e.hostConnected) === null || i === void 0 ? void 0 : i.call(e);
158
169
  });
159
170
  }
160
171
  enableUpdating(t) {
@@ -162,32 +173,32 @@ let xt = class extends HTMLElement {
162
173
  disconnectedCallback() {
163
174
  var t;
164
175
  (t = this._$ES) === null || t === void 0 || t.forEach((e) => {
165
- var n;
166
- return (n = e.hostDisconnected) === null || n === void 0 ? void 0 : n.call(e);
176
+ var i;
177
+ return (i = e.hostDisconnected) === null || i === void 0 ? void 0 : i.call(e);
167
178
  });
168
179
  }
169
- attributeChangedCallback(t, e, n) {
170
- this._$AK(t, n);
180
+ attributeChangedCallback(t, e, i) {
181
+ this._$AK(t, i);
171
182
  }
172
- _$EO(t, e, n = _e) {
173
- var r;
174
- const o = this.constructor._$Ep(t, n);
175
- if (o !== void 0 && n.reflect === !0) {
176
- const a = (((r = n.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? n.converter : ke).toAttribute(e, n.type);
177
- this._$El = t, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$El = null;
183
+ _$EO(t, e, i = He) {
184
+ var o;
185
+ const r = this.constructor._$Ep(t, i);
186
+ if (r !== void 0 && i.reflect === !0) {
187
+ const s = (((o = i.converter) === null || o === void 0 ? void 0 : o.toAttribute) !== void 0 ? i.converter : Ye).toAttribute(e, i.type);
188
+ this._$El = t, s == null ? this.removeAttribute(r) : this.setAttribute(r, s), this._$El = null;
178
189
  }
179
190
  }
180
191
  _$AK(t, e) {
181
- var n;
182
- const r = this.constructor, o = r._$Ev.get(t);
183
- if (o !== void 0 && this._$El !== o) {
184
- const a = r.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? a.converter : ke;
185
- this._$El = o, this[o] = s.fromAttribute(e, a.type), this._$El = null;
192
+ var i;
193
+ const o = this.constructor, r = o._$Ev.get(t);
194
+ if (r !== void 0 && this._$El !== r) {
195
+ const s = o.getPropertyOptions(r), l = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((i = s.converter) === null || i === void 0 ? void 0 : i.fromAttribute) !== void 0 ? s.converter : Ye;
196
+ this._$El = r, this[r] = l.fromAttribute(e, s.type), this._$El = null;
186
197
  }
187
198
  }
188
- requestUpdate(t, e, n) {
189
- let r = !0;
190
- t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || _i)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
199
+ requestUpdate(t, e, i) {
200
+ let o = !0;
201
+ t !== void 0 && (((i = i || this.constructor.getPropertyOptions(t)).hasChanged || Pi)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), i.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, i))) : o = !1), !this.isUpdatePending && o && (this._$E_ = this._$Ej());
191
202
  }
192
203
  async _$Ej() {
193
204
  this.isUpdatePending = !0;
@@ -206,26 +217,26 @@ let xt = class extends HTMLElement {
206
217
  var t;
207
218
  if (!this.isUpdatePending)
208
219
  return;
209
- this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, o) => this[o] = r), this._$Ei = void 0);
220
+ this.hasUpdated, this._$Ei && (this._$Ei.forEach((o, r) => this[r] = o), this._$Ei = void 0);
210
221
  let e = !1;
211
- const n = this._$AL;
222
+ const i = this._$AL;
212
223
  try {
213
- e = this.shouldUpdate(n), e ? (this.willUpdate(n), (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
214
- var o;
215
- return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
216
- }), this.update(n)) : this._$Ek();
217
- } catch (r) {
218
- throw e = !1, this._$Ek(), r;
224
+ e = this.shouldUpdate(i), e ? (this.willUpdate(i), (t = this._$ES) === null || t === void 0 || t.forEach((o) => {
225
+ var r;
226
+ return (r = o.hostUpdate) === null || r === void 0 ? void 0 : r.call(o);
227
+ }), this.update(i)) : this._$Ek();
228
+ } catch (o) {
229
+ throw e = !1, this._$Ek(), o;
219
230
  }
220
- e && this._$AE(n);
231
+ e && this._$AE(i);
221
232
  }
222
233
  willUpdate(t) {
223
234
  }
224
235
  _$AE(t) {
225
236
  var e;
226
- (e = this._$ES) === null || e === void 0 || e.forEach((n) => {
227
- var r;
228
- return (r = n.hostUpdated) === null || r === void 0 ? void 0 : r.call(n);
237
+ (e = this._$ES) === null || e === void 0 || e.forEach((i) => {
238
+ var o;
239
+ return (o = i.hostUpdated) === null || o === void 0 ? void 0 : o.call(i);
229
240
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
230
241
  }
231
242
  _$Ek() {
@@ -241,101 +252,101 @@ let xt = class extends HTMLElement {
241
252
  return !0;
242
253
  }
243
254
  update(t) {
244
- this._$EC !== void 0 && (this._$EC.forEach((e, n) => this._$EO(n, this[n], e)), this._$EC = void 0), this._$Ek();
255
+ this._$EC !== void 0 && (this._$EC.forEach((e, i) => this._$EO(i, this[i], e)), this._$EC = void 0), this._$Ek();
245
256
  }
246
257
  updated(t) {
247
258
  }
248
259
  firstUpdated(t) {
249
260
  }
250
261
  };
251
- xt[Ne] = !0, xt.elementProperties = /* @__PURE__ */ new Map(), xt.elementStyles = [], xt.shadowRootOptions = { mode: "open" }, Je == null || Je({ ReactiveElement: xt }), ((be = ue.reactiveElementVersions) !== null && be !== void 0 ? be : ue.reactiveElementVersions = []).push("1.6.2");
262
+ _t[je] = !0, _t.elementProperties = /* @__PURE__ */ new Map(), _t.elementStyles = [], _t.shadowRootOptions = { mode: "open" }, ci == null || ci({ ReactiveElement: _t }), ((Pe = ae.reactiveElementVersions) !== null && Pe !== void 0 ? Pe : ae.reactiveElementVersions = []).push("1.6.2");
252
263
  /**
253
264
  * @license
254
265
  * Copyright 2017 Google LLC
255
266
  * SPDX-License-Identifier: BSD-3-Clause
256
267
  */
257
- var Ee;
258
- const ce = window, Dt = ce.trustedTypes, ti = Dt ? Dt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, he = "$lit$", tt = `lit$${(Math.random() + "").slice(9)}$`, Ye = "?" + tt, rn = `<${Ye}>`, bt = document, Xt = () => bt.createComment(""), Wt = (i) => i === null || typeof i != "object" && typeof i != "function", Ei = Array.isArray, wi = (i) => Ei(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", we = `[
259
- \f\r]`, kt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ei = /-->/g, ii = />/g, ht = RegExp(`>|${we}(?:([^\\s"'>=/]+)(${we}*=${we}*(?:[^
260
- \f\r"'\`<>=]|("|')|))|$)`, "g"), ni = /'/g, ri = /"/g, xi = /^(?:script|style|textarea|title)$/i, on = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), H = on(1), W = Symbol.for("lit-noChange"), w = Symbol.for("lit-nothing"), oi = /* @__PURE__ */ new WeakMap(), yt = bt.createTreeWalker(bt, 129, null, !1);
261
- function Ai(i, t) {
262
- if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
268
+ var Oe;
269
+ const le = window, Ct = le.trustedTypes, hi = Ct ? Ct.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, qe = "$lit$", at = `lit$${(Math.random() + "").slice(9)}$`, Hi = "?" + at, fn = `<${Hi}>`, bt = document, zt = () => bt.createComment(""), Xt = (n) => n === null || typeof n != "object" && typeof n != "function", Oi = Array.isArray, gn = (n) => Oi(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", Me = `[
270
+ \f\r]`, Nt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, pi = /-->/g, fi = />/g, pt = RegExp(`>|${Me}(?:([^\\s"'>=/]+)(${Me}*=${Me}*(?:[^
271
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), gi = /'/g, mi = /"/g, Mi = /^(?:script|style|textarea|title)$/i, mn = (n) => (t, ...e) => ({ _$litType$: n, strings: t, values: e }), _ = mn(1), q = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), vi = /* @__PURE__ */ new WeakMap(), yt = bt.createTreeWalker(bt, 129, null, !1);
272
+ function Ni(n, t) {
273
+ if (!Array.isArray(n) || !n.hasOwnProperty("raw"))
263
274
  throw Error("invalid template strings array");
264
- return ti !== void 0 ? ti.createHTML(t) : t;
265
- }
266
- const Ci = (i, t) => {
267
- const e = i.length - 1, n = [];
268
- let r, o = t === 2 ? "<svg>" : "", a = kt;
269
- for (let s = 0; s < e; s++) {
270
- const l = i[s];
271
- let d, u, c = -1, p = 0;
272
- for (; p < l.length && (a.lastIndex = p, u = a.exec(l), u !== null); )
273
- p = a.lastIndex, a === kt ? u[1] === "!--" ? a = ei : u[1] !== void 0 ? a = ii : u[2] !== void 0 ? (xi.test(u[2]) && (r = RegExp("</" + u[2], "g")), a = ht) : u[3] !== void 0 && (a = ht) : a === ht ? u[0] === ">" ? (a = r ?? kt, c = -1) : u[1] === void 0 ? c = -2 : (c = a.lastIndex - u[2].length, d = u[1], a = u[3] === void 0 ? ht : u[3] === '"' ? ri : ni) : a === ri || a === ni ? a = ht : a === ei || a === ii ? a = kt : (a = ht, r = void 0);
274
- const f = a === ht && i[s + 1].startsWith("/>") ? " " : "";
275
- o += a === kt ? l + rn : c >= 0 ? (n.push(d), l.slice(0, c) + he + l.slice(c) + tt + f) : l + tt + (c === -2 ? (n.push(void 0), s) : f);
276
- }
277
- return [Ai(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "")), n];
275
+ return hi !== void 0 ? hi.createHTML(t) : t;
276
+ }
277
+ const vn = (n, t) => {
278
+ const e = n.length - 1, i = [];
279
+ let o, r = t === 2 ? "<svg>" : "", s = Nt;
280
+ for (let l = 0; l < e; l++) {
281
+ const a = n[l];
282
+ let d, h, u = -1, p = 0;
283
+ for (; p < a.length && (s.lastIndex = p, h = s.exec(a), h !== null); )
284
+ p = s.lastIndex, s === Nt ? h[1] === "!--" ? s = pi : h[1] !== void 0 ? s = fi : h[2] !== void 0 ? (Mi.test(h[2]) && (o = RegExp("</" + h[2], "g")), s = pt) : h[3] !== void 0 && (s = pt) : s === pt ? h[0] === ">" ? (s = o ?? Nt, u = -1) : h[1] === void 0 ? u = -2 : (u = s.lastIndex - h[2].length, d = h[1], s = h[3] === void 0 ? pt : h[3] === '"' ? mi : gi) : s === mi || s === gi ? s = pt : s === pi || s === fi ? s = Nt : (s = pt, o = void 0);
285
+ const v = s === pt && n[l + 1].startsWith("/>") ? " " : "";
286
+ r += s === Nt ? a + fn : u >= 0 ? (i.push(d), a.slice(0, u) + qe + a.slice(u) + at + v) : a + at + (u === -2 ? (i.push(void 0), l) : v);
287
+ }
288
+ return [Ni(n, r + (n[e] || "<?>") + (t === 2 ? "</svg>" : "")), i];
278
289
  };
279
- class Gt {
280
- constructor({ strings: t, _$litType$: e }, n) {
281
- let r;
290
+ class Yt {
291
+ constructor({ strings: t, _$litType$: e }, i) {
292
+ let o;
282
293
  this.parts = [];
283
- let o = 0, a = 0;
284
- const s = t.length - 1, l = this.parts, [d, u] = Ci(t, e);
285
- if (this.el = Gt.createElement(d, n), yt.currentNode = this.el.content, e === 2) {
286
- const c = this.el.content, p = c.firstChild;
287
- p.remove(), c.append(...p.childNodes);
288
- }
289
- for (; (r = yt.nextNode()) !== null && l.length < s; ) {
290
- if (r.nodeType === 1) {
291
- if (r.hasAttributes()) {
292
- const c = [];
293
- for (const p of r.getAttributeNames())
294
- if (p.endsWith(he) || p.startsWith(tt)) {
295
- const f = u[a++];
296
- if (c.push(p), f !== void 0) {
297
- const g = r.getAttribute(f.toLowerCase() + he).split(tt), m = /([.?@])?(.*)/.exec(f);
298
- l.push({ type: 1, index: o, name: m[2], strings: g, ctor: m[1] === "." ? Si : m[1] === "?" ? Di : m[1] === "@" ? Ti : Zt });
294
+ let r = 0, s = 0;
295
+ const l = t.length - 1, a = this.parts, [d, h] = vn(t, e);
296
+ if (this.el = Yt.createElement(d, i), yt.currentNode = this.el.content, e === 2) {
297
+ const u = this.el.content, p = u.firstChild;
298
+ p.remove(), u.append(...p.childNodes);
299
+ }
300
+ for (; (o = yt.nextNode()) !== null && a.length < l; ) {
301
+ if (o.nodeType === 1) {
302
+ if (o.hasAttributes()) {
303
+ const u = [];
304
+ for (const p of o.getAttributeNames())
305
+ if (p.endsWith(qe) || p.startsWith(at)) {
306
+ const v = h[s++];
307
+ if (u.push(p), v !== void 0) {
308
+ const y = o.getAttribute(v.toLowerCase() + qe).split(at), b = /([.?@])?(.*)/.exec(v);
309
+ a.push({ type: 1, index: r, name: b[2], strings: y, ctor: b[1] === "." ? bn : b[1] === "?" ? wn : b[1] === "@" ? _n : Te });
299
310
  } else
300
- l.push({ type: 6, index: o });
311
+ a.push({ type: 6, index: r });
301
312
  }
302
- for (const p of c)
303
- r.removeAttribute(p);
313
+ for (const p of u)
314
+ o.removeAttribute(p);
304
315
  }
305
- if (xi.test(r.tagName)) {
306
- const c = r.textContent.split(tt), p = c.length - 1;
316
+ if (Mi.test(o.tagName)) {
317
+ const u = o.textContent.split(at), p = u.length - 1;
307
318
  if (p > 0) {
308
- r.textContent = Dt ? Dt.emptyScript : "";
309
- for (let f = 0; f < p; f++)
310
- r.append(c[f], Xt()), yt.nextNode(), l.push({ type: 2, index: ++o });
311
- r.append(c[p], Xt());
319
+ o.textContent = Ct ? Ct.emptyScript : "";
320
+ for (let v = 0; v < p; v++)
321
+ o.append(u[v], zt()), yt.nextNode(), a.push({ type: 2, index: ++r });
322
+ o.append(u[p], zt());
312
323
  }
313
324
  }
314
- } else if (r.nodeType === 8)
315
- if (r.data === Ye)
316
- l.push({ type: 2, index: o });
325
+ } else if (o.nodeType === 8)
326
+ if (o.data === Hi)
327
+ a.push({ type: 2, index: r });
317
328
  else {
318
- let c = -1;
319
- for (; (c = r.data.indexOf(tt, c + 1)) !== -1; )
320
- l.push({ type: 7, index: o }), c += tt.length - 1;
329
+ let u = -1;
330
+ for (; (u = o.data.indexOf(at, u + 1)) !== -1; )
331
+ a.push({ type: 7, index: r }), u += at.length - 1;
321
332
  }
322
- o++;
333
+ r++;
323
334
  }
324
335
  }
325
336
  static createElement(t, e) {
326
- const n = bt.createElement("template");
327
- return n.innerHTML = t, n;
337
+ const i = bt.createElement("template");
338
+ return i.innerHTML = t, i;
328
339
  }
329
340
  }
330
- function _t(i, t, e = i, n) {
331
- var r, o, a, s;
332
- if (t === W)
341
+ function St(n, t, e = n, i) {
342
+ var o, r, s, l;
343
+ if (t === q)
333
344
  return t;
334
- let l = n !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[n] : e._$Cl;
335
- const d = Wt(t) ? void 0 : t._$litDirective$;
336
- return (l == null ? void 0 : l.constructor) !== d && ((o = l == null ? void 0 : l._$AO) === null || o === void 0 || o.call(l, !1), d === void 0 ? l = void 0 : (l = new d(i), l._$AT(i, e, n)), n !== void 0 ? ((a = (s = e)._$Co) !== null && a !== void 0 ? a : s._$Co = [])[n] = l : e._$Cl = l), l !== void 0 && (t = _t(i, l._$AS(i, t.values), l, n)), t;
345
+ let a = i !== void 0 ? (o = e._$Co) === null || o === void 0 ? void 0 : o[i] : e._$Cl;
346
+ const d = Xt(t) ? void 0 : t._$litDirective$;
347
+ return (a == null ? void 0 : a.constructor) !== d && ((r = a == null ? void 0 : a._$AO) === null || r === void 0 || r.call(a, !1), d === void 0 ? a = void 0 : (a = new d(n), a._$AT(n, e, i)), i !== void 0 ? ((s = (l = e)._$Co) !== null && s !== void 0 ? s : l._$Co = [])[i] = a : e._$Cl = a), a !== void 0 && (t = St(n, a._$AS(n, t.values), a, i)), t;
337
348
  }
338
- class $i {
349
+ class yn {
339
350
  constructor(t, e) {
340
351
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
341
352
  }
@@ -347,28 +358,28 @@ class $i {
347
358
  }
348
359
  u(t) {
349
360
  var e;
350
- const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : bt).importNode(n, !0);
351
- yt.currentNode = o;
352
- let a = yt.nextNode(), s = 0, l = 0, d = r[0];
361
+ const { el: { content: i }, parts: o } = this._$AD, r = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : bt).importNode(i, !0);
362
+ yt.currentNode = r;
363
+ let s = yt.nextNode(), l = 0, a = 0, d = o[0];
353
364
  for (; d !== void 0; ) {
354
- if (s === d.index) {
355
- let u;
356
- d.type === 2 ? u = new Ot(a, a.nextSibling, this, t) : d.type === 1 ? u = new d.ctor(a, d.name, d.strings, this, t) : d.type === 6 && (u = new Oi(a, this, t)), this._$AV.push(u), d = r[++l];
365
+ if (l === d.index) {
366
+ let h;
367
+ d.type === 2 ? h = new jt(s, s.nextSibling, this, t) : d.type === 1 ? h = new d.ctor(s, d.name, d.strings, this, t) : d.type === 6 && (h = new $n(s, this, t)), this._$AV.push(h), d = o[++a];
357
368
  }
358
- s !== (d == null ? void 0 : d.index) && (a = yt.nextNode(), s++);
369
+ l !== (d == null ? void 0 : d.index) && (s = yt.nextNode(), l++);
359
370
  }
360
- return yt.currentNode = bt, o;
371
+ return yt.currentNode = bt, r;
361
372
  }
362
373
  v(t) {
363
374
  let e = 0;
364
- for (const n of this._$AV)
365
- n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
375
+ for (const i of this._$AV)
376
+ i !== void 0 && (i.strings !== void 0 ? (i._$AI(t, i, e), e += i.strings.length - 2) : i._$AI(t[e])), e++;
366
377
  }
367
378
  }
368
- class Ot {
369
- constructor(t, e, n, r) {
370
- var o;
371
- this.type = 2, this._$AH = w, 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;
379
+ class jt {
380
+ constructor(t, e, i, o) {
381
+ var r;
382
+ this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = i, this.options = o, this._$Cp = (r = o == null ? void 0 : o.isConnected) === null || r === void 0 || r;
372
383
  }
373
384
  get _$AU() {
374
385
  var t, e;
@@ -386,7 +397,7 @@ class Ot {
386
397
  return this._$AB;
387
398
  }
388
399
  _$AI(t, e = this) {
389
- t = _t(this, t, e), Wt(t) ? t === w || t == null || t === "" ? (this._$AH !== w && this._$AR(), this._$AH = w) : t !== this._$AH && t !== W && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : wi(t) ? this.T(t) : this._(t);
400
+ t = St(this, t, e), Xt(t) ? t === A || t == null || t === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : t !== this._$AH && t !== q && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : gn(t) ? this.T(t) : this._(t);
390
401
  }
391
402
  k(t) {
392
403
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -395,35 +406,35 @@ class Ot {
395
406
  this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
396
407
  }
397
408
  _(t) {
398
- this._$AH !== w && Wt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(bt.createTextNode(t)), this._$AH = t;
409
+ this._$AH !== A && Xt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(bt.createTextNode(t)), this._$AH = t;
399
410
  }
400
411
  g(t) {
401
412
  var e;
402
- const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Gt.createElement(Ai(r.h, r.h[0]), this.options)), r);
403
- if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
404
- this._$AH.v(n);
413
+ const { values: i, _$litType$: o } = t, r = typeof o == "number" ? this._$AC(t) : (o.el === void 0 && (o.el = Yt.createElement(Ni(o.h, o.h[0]), this.options)), o);
414
+ if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === r)
415
+ this._$AH.v(i);
405
416
  else {
406
- const a = new $i(o, this), s = a.u(this.options);
407
- a.v(n), this.$(s), this._$AH = a;
417
+ const s = new yn(r, this), l = s.u(this.options);
418
+ s.v(i), this.$(l), this._$AH = s;
408
419
  }
409
420
  }
410
421
  _$AC(t) {
411
- let e = oi.get(t.strings);
412
- return e === void 0 && oi.set(t.strings, e = new Gt(t)), e;
422
+ let e = vi.get(t.strings);
423
+ return e === void 0 && vi.set(t.strings, e = new Yt(t)), e;
413
424
  }
414
425
  T(t) {
415
- Ei(this._$AH) || (this._$AH = [], this._$AR());
426
+ Oi(this._$AH) || (this._$AH = [], this._$AR());
416
427
  const e = this._$AH;
417
- let n, r = 0;
418
- for (const o of t)
419
- r === e.length ? e.push(n = new Ot(this.k(Xt()), this.k(Xt()), this, this.options)) : n = e[r], n._$AI(o), r++;
420
- r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
428
+ let i, o = 0;
429
+ for (const r of t)
430
+ o === e.length ? e.push(i = new jt(this.k(zt()), this.k(zt()), this, this.options)) : i = e[o], i._$AI(r), o++;
431
+ o < e.length && (this._$AR(i && i._$AB.nextSibling, o), e.length = o);
421
432
  }
422
433
  _$AR(t = this._$AA.nextSibling, e) {
423
- var n;
424
- for ((n = this._$AP) === null || n === void 0 || n.call(this, !1, !0, e); t && t !== this._$AB; ) {
425
- const r = t.nextSibling;
426
- t.remove(), t = r;
434
+ var i;
435
+ for ((i = this._$AP) === null || i === void 0 || i.call(this, !1, !0, e); t && t !== this._$AB; ) {
436
+ const o = t.nextSibling;
437
+ t.remove(), t = o;
427
438
  }
428
439
  }
429
440
  setConnected(t) {
@@ -431,9 +442,9 @@ class Ot {
431
442
  this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
432
443
  }
433
444
  }
434
- class Zt {
435
- constructor(t, e, n, r, o) {
436
- this.type = 1, this._$AH = w, 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 = w;
445
+ class Te {
446
+ constructor(t, e, i, o, r) {
447
+ this.type = 1, this._$AH = A, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = r, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = A;
437
448
  }
438
449
  get tagName() {
439
450
  return this.element.tagName;
@@ -441,97 +452,97 @@ class Zt {
441
452
  get _$AU() {
442
453
  return this._$AM._$AU;
443
454
  }
444
- _$AI(t, e = this, n, r) {
445
- const o = this.strings;
446
- let a = !1;
447
- if (o === void 0)
448
- t = _t(this, t, e, 0), a = !Wt(t) || t !== this._$AH && t !== W, a && (this._$AH = t);
455
+ _$AI(t, e = this, i, o) {
456
+ const r = this.strings;
457
+ let s = !1;
458
+ if (r === void 0)
459
+ t = St(this, t, e, 0), s = !Xt(t) || t !== this._$AH && t !== q, s && (this._$AH = t);
449
460
  else {
450
- const s = t;
451
- let l, d;
452
- for (t = o[0], l = 0; l < o.length - 1; l++)
453
- d = _t(this, s[n + l], e, l), d === W && (d = this._$AH[l]), a || (a = !Wt(d) || d !== this._$AH[l]), d === w ? t = w : t !== w && (t += (d ?? "") + o[l + 1]), this._$AH[l] = d;
461
+ const l = t;
462
+ let a, d;
463
+ for (t = r[0], a = 0; a < r.length - 1; a++)
464
+ d = St(this, l[i + a], e, a), d === q && (d = this._$AH[a]), s || (s = !Xt(d) || d !== this._$AH[a]), d === A ? t = A : t !== A && (t += (d ?? "") + r[a + 1]), this._$AH[a] = d;
454
465
  }
455
- a && !r && this.j(t);
466
+ s && !o && this.j(t);
456
467
  }
457
468
  j(t) {
458
- t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
469
+ t === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
459
470
  }
460
471
  }
461
- class Si extends Zt {
472
+ class bn extends Te {
462
473
  constructor() {
463
474
  super(...arguments), this.type = 3;
464
475
  }
465
476
  j(t) {
466
- this.element[this.name] = t === w ? void 0 : t;
477
+ this.element[this.name] = t === A ? void 0 : t;
467
478
  }
468
479
  }
469
- const an = Dt ? Dt.emptyScript : "";
470
- class Di extends Zt {
480
+ const En = Ct ? Ct.emptyScript : "";
481
+ class wn extends Te {
471
482
  constructor() {
472
483
  super(...arguments), this.type = 4;
473
484
  }
474
485
  j(t) {
475
- t && t !== w ? this.element.setAttribute(this.name, an) : this.element.removeAttribute(this.name);
486
+ t && t !== A ? this.element.setAttribute(this.name, En) : this.element.removeAttribute(this.name);
476
487
  }
477
488
  }
478
- class Ti extends Zt {
479
- constructor(t, e, n, r, o) {
480
- super(t, e, n, r, o), this.type = 5;
489
+ class _n extends Te {
490
+ constructor(t, e, i, o, r) {
491
+ super(t, e, i, o, r), this.type = 5;
481
492
  }
482
493
  _$AI(t, e = this) {
483
- var n;
484
- if ((t = (n = _t(this, t, e, 0)) !== null && n !== void 0 ? n : w) === W)
494
+ var i;
495
+ if ((t = (i = St(this, t, e, 0)) !== null && i !== void 0 ? i : A) === q)
485
496
  return;
486
- const r = this._$AH, o = t === w && r !== w || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, a = t !== w && (r === w || o);
487
- o && this.element.removeEventListener(this.name, this, r), a && this.element.addEventListener(this.name, this, t), this._$AH = t;
497
+ const o = this._$AH, r = t === A && o !== A || t.capture !== o.capture || t.once !== o.once || t.passive !== o.passive, s = t !== A && (o === A || r);
498
+ r && this.element.removeEventListener(this.name, this, o), s && this.element.addEventListener(this.name, this, t), this._$AH = t;
488
499
  }
489
500
  handleEvent(t) {
490
- var e, n;
491
- 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);
501
+ var e, i;
502
+ typeof this._$AH == "function" ? this._$AH.call((i = (e = this.options) === null || e === void 0 ? void 0 : e.host) !== null && i !== void 0 ? i : this.element, t) : this._$AH.handleEvent(t);
492
503
  }
493
504
  }
494
- class Oi {
495
- constructor(t, e, n) {
496
- this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
505
+ class $n {
506
+ constructor(t, e, i) {
507
+ this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = i;
497
508
  }
498
509
  get _$AU() {
499
510
  return this._$AM._$AU;
500
511
  }
501
512
  _$AI(t) {
502
- _t(this, t);
513
+ St(this, t);
503
514
  }
504
515
  }
505
- const sn = { O: he, P: tt, A: Ye, C: 1, M: Ci, L: $i, R: wi, D: _t, I: Ot, V: Zt, H: Di, N: Ti, U: Si, F: Oi }, ai = ce.litHtmlPolyfillSupport;
506
- ai == null || ai(Gt, Ot), ((Ee = ce.litHtmlVersions) !== null && Ee !== void 0 ? Ee : ce.litHtmlVersions = []).push("2.8.0");
507
- const ln = (i, t, e) => {
508
- var n, r;
509
- const o = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
510
- let a = o._$litPart$;
511
- if (a === void 0) {
512
- const s = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
513
- o._$litPart$ = a = new Ot(t.insertBefore(Xt(), s), s, void 0, e ?? {});
516
+ const yi = le.litHtmlPolyfillSupport;
517
+ yi == null || yi(Yt, jt), ((Oe = le.litHtmlVersions) !== null && Oe !== void 0 ? Oe : le.litHtmlVersions = []).push("2.8.0");
518
+ const xn = (n, t, e) => {
519
+ var i, o;
520
+ const r = (i = e == null ? void 0 : e.renderBefore) !== null && i !== void 0 ? i : t;
521
+ let s = r._$litPart$;
522
+ if (s === void 0) {
523
+ const l = (o = e == null ? void 0 : e.renderBefore) !== null && o !== void 0 ? o : null;
524
+ r._$litPart$ = s = new jt(t.insertBefore(zt(), l), l, void 0, e ?? {});
514
525
  }
515
- return a._$AI(i), a;
526
+ return s._$AI(n), s;
516
527
  };
517
528
  /**
518
529
  * @license
519
530
  * Copyright 2017 Google LLC
520
531
  * SPDX-License-Identifier: BSD-3-Clause
521
532
  */
522
- var xe, Ae;
523
- let $t = class extends xt {
533
+ var Ne, ke;
534
+ let z = class extends _t {
524
535
  constructor() {
525
536
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
526
537
  }
527
538
  createRenderRoot() {
528
539
  var t, e;
529
- const n = super.createRenderRoot();
530
- return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = n.firstChild), n;
540
+ const i = super.createRenderRoot();
541
+ return (t = (e = this.renderOptions).renderBefore) !== null && t !== void 0 || (e.renderBefore = i.firstChild), i;
531
542
  }
532
543
  update(t) {
533
544
  const e = this.render();
534
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ln(e, this.renderRoot, this.renderOptions);
545
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = xn(e, this.renderRoot, this.renderOptions);
535
546
  }
536
547
  connectedCallback() {
537
548
  var t;
@@ -542,70 +553,35 @@ let $t = class extends xt {
542
553
  super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
543
554
  }
544
555
  render() {
545
- return W;
556
+ return q;
546
557
  }
547
558
  };
548
- $t.finalized = !0, $t._$litElement$ = !0, (xe = globalThis.litElementHydrateSupport) === null || xe === void 0 || xe.call(globalThis, { LitElement: $t });
549
- const si = globalThis.litElementPolyfillSupport;
550
- si == null || si({ LitElement: $t });
551
- ((Ae = globalThis.litElementVersions) !== null && Ae !== void 0 ? Ae : globalThis.litElementVersions = []).push("3.3.2");
552
- /**
553
- * @license
554
- * Copyright 2017 Google LLC
555
- * SPDX-License-Identifier: BSD-3-Clause
556
- */
557
- const Li = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => {
558
- const { kind: r, elements: o } = n;
559
- return { kind: r, elements: o, finisher(a) {
560
- customElements.define(e, a);
561
- } };
562
- })(i, t);
563
- /**
564
- * @license
565
- * Copyright 2017 Google LLC
566
- * SPDX-License-Identifier: BSD-3-Clause
567
- */
568
- const dn = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
569
- e.createProperty(t.key, i);
570
- } } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
571
- typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
572
- }, finisher(e) {
573
- e.createProperty(t.key, i);
574
- } }, un = (i, t, e) => {
575
- t.constructor.createProperty(e, i);
576
- };
577
- function k(i) {
578
- return (t, e) => e !== void 0 ? un(i, t, e) : dn(i, t);
579
- }
580
- /**
581
- * @license
582
- * Copyright 2017 Google LLC
583
- * SPDX-License-Identifier: BSD-3-Clause
584
- */
585
- function qt(i) {
586
- return k({ ...i, state: !0 });
587
- }
559
+ z.finalized = !0, z._$litElement$ = !0, (Ne = globalThis.litElementHydrateSupport) === null || Ne === void 0 || Ne.call(globalThis, { LitElement: z });
560
+ const bi = globalThis.litElementPolyfillSupport;
561
+ bi == null || bi({ LitElement: z });
562
+ ((ke = globalThis.litElementVersions) !== null && ke !== void 0 ? ke : globalThis.litElementVersions = []).push("3.3.2");
588
563
  /**
589
564
  * @license
590
565
  * Copyright 2021 Google LLC
591
566
  * SPDX-License-Identifier: BSD-3-Clause
592
567
  */
593
- var Ce;
594
- ((Ce = window.HTMLSlotElement) === null || Ce === void 0 ? void 0 : Ce.prototype.assignedElements) != null;
568
+ function et(n, t, e) {
569
+ return n ? t() : e == null ? void 0 : e();
570
+ }
595
571
  /**
596
572
  * @license
597
573
  * Copyright 2017 Google LLC
598
574
  * SPDX-License-Identifier: BSD-3-Clause
599
575
  */
600
- const mt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, Hi = (i) => (...t) => ({ _$litDirective$: i, values: t });
601
- class Ii {
576
+ const mt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ei = (n) => (...t) => ({ _$litDirective$: n, values: t });
577
+ let ii = class {
602
578
  constructor(t) {
603
579
  }
604
580
  get _$AU() {
605
581
  return this._$AM._$AU;
606
582
  }
607
- _$AT(t, e, n) {
608
- this._$Ct = t, this._$AM = e, this._$Ci = n;
583
+ _$AT(t, e, i) {
584
+ this._$Ct = t, this._$AM = e, this._$Ci = i;
609
585
  }
610
586
  _$AS(t, e) {
611
587
  return this.update(t, e);
@@ -613,704 +589,581 @@ class Ii {
613
589
  update(t, e) {
614
590
  return this.render(...e);
615
591
  }
616
- }
617
- /**
618
- * @license
619
- * Copyright 2020 Google LLC
620
- * SPDX-License-Identifier: BSD-3-Clause
621
- */
622
- const { I: cn } = sn, hn = (i) => i.strings === void 0, li = () => document.createComment(""), Nt = (i, t, e) => {
623
- var n;
624
- const r = i._$AA.parentNode, o = t === void 0 ? i._$AB : t._$AA;
625
- if (e === void 0) {
626
- const a = r.insertBefore(li(), o), s = r.insertBefore(li(), o);
627
- e = new cn(a, s, i, i.options);
628
- } else {
629
- const a = e._$AB.nextSibling, s = e._$AM, l = s !== i;
630
- if (l) {
631
- let d;
632
- (n = e._$AQ) === null || n === void 0 || n.call(e, i), e._$AM = i, e._$AP !== void 0 && (d = i._$AU) !== s._$AU && e._$AP(d);
633
- }
634
- if (a !== o || l) {
635
- let d = e._$AA;
636
- for (; d !== a; ) {
637
- const u = d.nextSibling;
638
- r.insertBefore(d, o), d = u;
639
- }
640
- }
641
- }
642
- return e;
643
- }, pt = (i, t, e = i) => (i._$AI(t, e), i), pn = {}, Mi = (i, t = pn) => i._$AH = t, fn = (i) => i._$AH, $e = (i) => {
644
- var t;
645
- (t = i._$AP) === null || t === void 0 || t.call(i, !1, !0);
646
- let e = i._$AA;
647
- const n = i._$AB.nextSibling;
648
- for (; e !== n; ) {
649
- const r = e.nextSibling;
650
- e.remove(), e = r;
651
- }
652
592
  };
653
593
  /**
654
594
  * @license
655
- * Copyright 2017 Google LLC
595
+ * Copyright 2020 Google LLC
656
596
  * SPDX-License-Identifier: BSD-3-Clause
657
597
  */
658
- const di = (i, t, e) => {
659
- const n = /* @__PURE__ */ new Map();
660
- for (let r = t; r <= e; r++)
661
- n.set(i[r], r);
662
- return n;
663
- }, Ve = Hi(class extends Ii {
664
- constructor(i) {
665
- if (super(i), i.type !== mt.CHILD)
666
- throw Error("repeat() can only be used in text expressions");
667
- }
668
- ct(i, t, e) {
669
- let n;
670
- e === void 0 ? e = t : t !== void 0 && (n = t);
671
- const r = [], o = [];
672
- let a = 0;
673
- for (const s of i)
674
- r[a] = n ? n(s, a) : a, o[a] = e(s, a), a++;
675
- return { values: o, keys: r };
676
- }
677
- render(i, t, e) {
678
- return this.ct(i, t, e).values;
679
- }
680
- update(i, [t, e, n]) {
681
- var r;
682
- const o = fn(i), { values: a, keys: s } = this.ct(t, e, n);
683
- if (!Array.isArray(o))
684
- return this.ut = s, a;
685
- const l = (r = this.ut) !== null && r !== void 0 ? r : this.ut = [], d = [];
686
- let u, c, p = 0, f = o.length - 1, g = 0, m = a.length - 1;
687
- for (; p <= f && g <= m; )
688
- if (o[p] === null)
689
- p++;
690
- else if (o[f] === null)
691
- f--;
692
- else if (l[p] === s[g])
693
- d[g] = pt(o[p], a[g]), p++, g++;
694
- else if (l[f] === s[m])
695
- d[m] = pt(o[f], a[m]), f--, m--;
696
- else if (l[p] === s[m])
697
- d[m] = pt(o[p], a[m]), Nt(i, d[m + 1], o[p]), p++, m--;
698
- else if (l[f] === s[g])
699
- d[g] = pt(o[f], a[g]), Nt(i, o[p], o[f]), f--, g++;
700
- else if (u === void 0 && (u = di(s, g, m), c = di(l, p, f)), u.has(l[p]))
701
- if (u.has(l[f])) {
702
- const $ = c.get(s[g]), N = $ !== void 0 ? o[$] : null;
703
- if (N === null) {
704
- const O = Nt(i, o[p]);
705
- pt(O, a[g]), d[g] = O;
706
- } else
707
- d[g] = pt(N, a[g]), Nt(i, o[p], N), o[$] = null;
708
- g++;
709
- } else
710
- $e(o[f]), f--;
711
- else
712
- $e(o[p]), p++;
713
- for (; g <= m; ) {
714
- const $ = Nt(i, d[m + 1]);
715
- pt($, a[g]), d[g++] = $;
716
- }
717
- for (; p <= f; ) {
718
- const $ = o[p++];
719
- $ !== null && $e($);
720
- }
721
- return this.ut = s, Mi(i, d), W;
722
- }
723
- });
598
+ const An = (n) => n.strings === void 0, Cn = {}, ki = (n, t = Cn) => n._$AH = t;
724
599
  /**
725
600
  * @license
726
- * Copyright 2020 Google LLC
601
+ * Copyright 2021 Google LLC
727
602
  * SPDX-License-Identifier: BSD-3-Clause
728
603
  */
729
- const Be = Hi(class extends Ii {
730
- constructor(i) {
731
- if (super(i), i.type !== mt.PROPERTY && i.type !== mt.ATTRIBUTE && i.type !== mt.BOOLEAN_ATTRIBUTE)
732
- throw Error("The `live` directive is not allowed on child or event bindings");
733
- if (!hn(i))
734
- throw Error("`live` bindings can only contain a single expression");
604
+ const Sn = ei(class extends ii {
605
+ constructor() {
606
+ super(...arguments), this.key = A;
735
607
  }
736
- render(i) {
737
- return i;
608
+ render(n, t) {
609
+ return this.key = n, t;
738
610
  }
739
- update(i, [t]) {
740
- if (t === W || t === w)
741
- return t;
742
- const e = i.element, n = i.name;
743
- if (i.type === mt.PROPERTY) {
744
- if (t === e[n])
745
- return W;
746
- } else if (i.type === mt.BOOLEAN_ATTRIBUTE) {
747
- if (!!t === e.hasAttribute(n))
748
- return W;
749
- } else if (i.type === mt.ATTRIBUTE && e.getAttribute(n) === t + "")
750
- return W;
751
- return Mi(i), t;
611
+ update(n, [t, e]) {
612
+ return t !== this.key && (ki(n), this.key = t), e;
752
613
  }
753
614
  });
754
- /**
755
- * @license
756
- * Copyright 2021 Google LLC
757
- * SPDX-License-Identifier: BSD-3-Clause
758
- */
759
- function Pi(i, t, e) {
760
- return i ? t() : e == null ? void 0 : e();
761
- }
762
615
  /**!
763
616
  * Sortable 1.15.0
764
617
  * @author RubaXa <trash@rubaxa.org>
765
618
  * @author owenm <owen23355@gmail.com>
766
619
  * @license MIT
767
620
  */
768
- function ui(i, t) {
769
- var e = Object.keys(i);
621
+ function Ei(n, t) {
622
+ var e = Object.keys(n);
770
623
  if (Object.getOwnPropertySymbols) {
771
- var n = Object.getOwnPropertySymbols(i);
772
- t && (n = n.filter(function(r) {
773
- return Object.getOwnPropertyDescriptor(i, r).enumerable;
774
- })), e.push.apply(e, n);
624
+ var i = Object.getOwnPropertySymbols(n);
625
+ t && (i = i.filter(function(o) {
626
+ return Object.getOwnPropertyDescriptor(n, o).enumerable;
627
+ })), e.push.apply(e, i);
775
628
  }
776
629
  return e;
777
630
  }
778
- function K(i) {
631
+ function K(n) {
779
632
  for (var t = 1; t < arguments.length; t++) {
780
633
  var e = arguments[t] != null ? arguments[t] : {};
781
- t % 2 ? ui(Object(e), !0).forEach(function(n) {
782
- gn(i, n, e[n]);
783
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : ui(Object(e)).forEach(function(n) {
784
- Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
634
+ t % 2 ? Ei(Object(e), !0).forEach(function(i) {
635
+ Tn(n, i, e[i]);
636
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(e)) : Ei(Object(e)).forEach(function(i) {
637
+ Object.defineProperty(n, i, Object.getOwnPropertyDescriptor(e, i));
785
638
  });
786
639
  }
787
- return i;
640
+ return n;
788
641
  }
789
- function oe(i) {
642
+ function ee(n) {
790
643
  "@babel/helpers - typeof";
791
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? oe = function(t) {
644
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? ee = function(t) {
792
645
  return typeof t;
793
- } : oe = function(t) {
646
+ } : ee = function(t) {
794
647
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
795
- }, oe(i);
648
+ }, ee(n);
796
649
  }
797
- function gn(i, t, e) {
798
- return t in i ? Object.defineProperty(i, t, {
650
+ function Tn(n, t, e) {
651
+ return t in n ? Object.defineProperty(n, t, {
799
652
  value: e,
800
653
  enumerable: !0,
801
654
  configurable: !0,
802
655
  writable: !0
803
- }) : i[t] = e, i;
656
+ }) : n[t] = e, n;
804
657
  }
805
658
  function it() {
806
- return it = Object.assign || function(i) {
659
+ return it = Object.assign || function(n) {
807
660
  for (var t = 1; t < arguments.length; t++) {
808
661
  var e = arguments[t];
809
- for (var n in e)
810
- Object.prototype.hasOwnProperty.call(e, n) && (i[n] = e[n]);
662
+ for (var i in e)
663
+ Object.prototype.hasOwnProperty.call(e, i) && (n[i] = e[i]);
811
664
  }
812
- return i;
665
+ return n;
813
666
  }, it.apply(this, arguments);
814
667
  }
815
- function mn(i, t) {
816
- if (i == null)
668
+ function Dn(n, t) {
669
+ if (n == null)
817
670
  return {};
818
- var e = {}, n = Object.keys(i), r, o;
819
- for (o = 0; o < n.length; o++)
820
- r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
671
+ var e = {}, i = Object.keys(n), o, r;
672
+ for (r = 0; r < i.length; r++)
673
+ o = i[r], !(t.indexOf(o) >= 0) && (e[o] = n[o]);
821
674
  return e;
822
675
  }
823
- function vn(i, t) {
824
- if (i == null)
676
+ function Pn(n, t) {
677
+ if (n == null)
825
678
  return {};
826
- var e = mn(i, t), n, r;
679
+ var e = Dn(n, t), i, o;
827
680
  if (Object.getOwnPropertySymbols) {
828
- var o = Object.getOwnPropertySymbols(i);
829
- for (r = 0; r < o.length; r++)
830
- n = o[r], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(i, n) && (e[n] = i[n]);
681
+ var r = Object.getOwnPropertySymbols(n);
682
+ for (o = 0; o < r.length; o++)
683
+ i = r[o], !(t.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(n, i) && (e[i] = n[i]);
831
684
  }
832
685
  return e;
833
686
  }
834
- var yn = "1.15.0";
835
- function et(i) {
687
+ var Hn = "1.15.0";
688
+ function tt(n) {
836
689
  if (typeof window < "u" && window.navigator)
837
- return !!/* @__PURE__ */ navigator.userAgent.match(i);
690
+ return !!/* @__PURE__ */ navigator.userAgent.match(n);
838
691
  }
839
- var nt = et(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Kt = et(/Edge/i), ci = et(/firefox/i), Ft = et(/safari/i) && !et(/chrome/i) && !et(/android/i), ki = et(/iP(ad|od|hone)/i), Ni = et(/chrome/i) && et(/android/i), Vi = {
692
+ var nt = tt(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), qt = tt(/Edge/i), wi = tt(/firefox/i), Lt = tt(/safari/i) && !tt(/chrome/i) && !tt(/android/i), Ii = tt(/iP(ad|od|hone)/i), Vi = tt(/chrome/i) && tt(/android/i), Li = {
840
693
  capture: !1,
841
694
  passive: !1
842
695
  };
843
- function E(i, t, e) {
844
- i.addEventListener(t, e, !nt && Vi);
696
+ function w(n, t, e) {
697
+ n.addEventListener(t, e, !nt && Li);
845
698
  }
846
- function _(i, t, e) {
847
- i.removeEventListener(t, e, !nt && Vi);
699
+ function E(n, t, e) {
700
+ n.removeEventListener(t, e, !nt && Li);
848
701
  }
849
- function pe(i, t) {
702
+ function de(n, t) {
850
703
  if (t) {
851
- if (t[0] === ">" && (t = t.substring(1)), i)
704
+ if (t[0] === ">" && (t = t.substring(1)), n)
852
705
  try {
853
- if (i.matches)
854
- return i.matches(t);
855
- if (i.msMatchesSelector)
856
- return i.msMatchesSelector(t);
857
- if (i.webkitMatchesSelector)
858
- return i.webkitMatchesSelector(t);
706
+ if (n.matches)
707
+ return n.matches(t);
708
+ if (n.msMatchesSelector)
709
+ return n.msMatchesSelector(t);
710
+ if (n.webkitMatchesSelector)
711
+ return n.webkitMatchesSelector(t);
859
712
  } catch {
860
713
  return !1;
861
714
  }
862
715
  return !1;
863
716
  }
864
717
  }
865
- function bn(i) {
866
- return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
718
+ function On(n) {
719
+ return n.host && n !== document && n.host.nodeType ? n.host : n.parentNode;
867
720
  }
868
- function Z(i, t, e, n) {
869
- if (i) {
721
+ function Z(n, t, e, i) {
722
+ if (n) {
870
723
  e = e || document;
871
724
  do {
872
- if (t != null && (t[0] === ">" ? i.parentNode === e && pe(i, t) : pe(i, t)) || n && i === e)
873
- return i;
874
- if (i === e)
725
+ if (t != null && (t[0] === ">" ? n.parentNode === e && de(n, t) : de(n, t)) || i && n === e)
726
+ return n;
727
+ if (n === e)
875
728
  break;
876
- } while (i = bn(i));
729
+ } while (n = On(n));
877
730
  }
878
731
  return null;
879
732
  }
880
- var hi = /\s+/g;
881
- function R(i, t, e) {
882
- if (i && t)
883
- if (i.classList)
884
- i.classList[e ? "add" : "remove"](t);
733
+ var _i = /\s+/g;
734
+ function B(n, t, e) {
735
+ if (n && t)
736
+ if (n.classList)
737
+ n.classList[e ? "add" : "remove"](t);
885
738
  else {
886
- var n = (" " + i.className + " ").replace(hi, " ").replace(" " + t + " ", " ");
887
- i.className = (n + (e ? " " + t : "")).replace(hi, " ");
739
+ var i = (" " + n.className + " ").replace(_i, " ").replace(" " + t + " ", " ");
740
+ n.className = (i + (e ? " " + t : "")).replace(_i, " ");
888
741
  }
889
742
  }
890
- function v(i, t, e) {
891
- var n = i && i.style;
892
- if (n) {
743
+ function f(n, t, e) {
744
+ var i = n && n.style;
745
+ if (i) {
893
746
  if (e === void 0)
894
- return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(i, "") : i.currentStyle && (e = i.currentStyle), t === void 0 ? e : e[t];
895
- !(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
747
+ return document.defaultView && document.defaultView.getComputedStyle ? e = document.defaultView.getComputedStyle(n, "") : n.currentStyle && (e = n.currentStyle), t === void 0 ? e : e[t];
748
+ !(t in i) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), i[t] = e + (typeof e == "string" ? "" : "px");
896
749
  }
897
750
  }
898
- function St(i, t) {
751
+ function At(n, t) {
899
752
  var e = "";
900
- if (typeof i == "string")
901
- e = i;
753
+ if (typeof n == "string")
754
+ e = n;
902
755
  else
903
756
  do {
904
- var n = v(i, "transform");
905
- n && n !== "none" && (e = n + " " + e);
906
- } while (!t && (i = i.parentNode));
907
- var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
908
- return r && new r(e);
757
+ var i = f(n, "transform");
758
+ i && i !== "none" && (e = i + " " + e);
759
+ } while (!t && (n = n.parentNode));
760
+ var o = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
761
+ return o && new o(e);
909
762
  }
910
- function Bi(i, t, e) {
911
- if (i) {
912
- var n = i.getElementsByTagName(t), r = 0, o = n.length;
763
+ function Bi(n, t, e) {
764
+ if (n) {
765
+ var i = n.getElementsByTagName(t), o = 0, r = i.length;
913
766
  if (e)
914
- for (; r < o; r++)
915
- e(n[r], r);
916
- return n;
767
+ for (; o < r; o++)
768
+ e(i[o], o);
769
+ return i;
917
770
  }
918
771
  return [];
919
772
  }
920
- function q() {
921
- var i = document.scrollingElement;
922
- return i || document.documentElement;
773
+ function G() {
774
+ var n = document.scrollingElement;
775
+ return n || document.documentElement;
923
776
  }
924
- function T(i, t, e, n, r) {
925
- if (!(!i.getBoundingClientRect && i !== window)) {
926
- var o, a, s, l, d, u, c;
927
- if (i !== window && i.parentNode && i !== q() ? (o = i.getBoundingClientRect(), a = o.top, s = o.left, l = o.bottom, d = o.right, u = o.height, c = o.width) : (a = 0, s = 0, l = window.innerHeight, d = window.innerWidth, u = window.innerHeight, c = window.innerWidth), (t || e) && i !== window && (r = r || i.parentNode, !nt))
777
+ function T(n, t, e, i, o) {
778
+ if (!(!n.getBoundingClientRect && n !== window)) {
779
+ var r, s, l, a, d, h, u;
780
+ if (n !== window && n.parentNode && n !== G() ? (r = n.getBoundingClientRect(), s = r.top, l = r.left, a = r.bottom, d = r.right, h = r.height, u = r.width) : (s = 0, l = 0, a = window.innerHeight, d = window.innerWidth, h = window.innerHeight, u = window.innerWidth), (t || e) && n !== window && (o = o || n.parentNode, !nt))
928
781
  do
929
- if (r && r.getBoundingClientRect && (v(r, "transform") !== "none" || e && v(r, "position") !== "static")) {
930
- var p = r.getBoundingClientRect();
931
- a -= p.top + parseInt(v(r, "border-top-width")), s -= p.left + parseInt(v(r, "border-left-width")), l = a + o.height, d = s + o.width;
782
+ if (o && o.getBoundingClientRect && (f(o, "transform") !== "none" || e && f(o, "position") !== "static")) {
783
+ var p = o.getBoundingClientRect();
784
+ s -= p.top + parseInt(f(o, "border-top-width")), l -= p.left + parseInt(f(o, "border-left-width")), a = s + r.height, d = l + r.width;
932
785
  break;
933
786
  }
934
- while (r = r.parentNode);
935
- if (n && i !== window) {
936
- var f = St(r || i), g = f && f.a, m = f && f.d;
937
- f && (a /= m, s /= g, c /= g, u /= m, l = a + u, d = s + c);
787
+ while (o = o.parentNode);
788
+ if (i && n !== window) {
789
+ var v = At(o || n), y = v && v.a, b = v && v.d;
790
+ v && (s /= b, l /= y, u /= y, h /= b, a = s + h, d = l + u);
938
791
  }
939
792
  return {
940
- top: a,
941
- left: s,
942
- bottom: l,
793
+ top: s,
794
+ left: l,
795
+ bottom: a,
943
796
  right: d,
944
- width: c,
945
- height: u
797
+ width: u,
798
+ height: h
946
799
  };
947
800
  }
948
801
  }
949
- function pi(i, t, e) {
950
- for (var n = lt(i, !0), r = T(i)[t]; n; ) {
951
- var o = T(n)[e], a = void 0;
952
- if (e === "top" || e === "left" ? a = r >= o : a = r <= o, !a)
953
- return n;
954
- if (n === q())
802
+ function $i(n, t, e) {
803
+ for (var i = dt(n, !0), o = T(n)[t]; i; ) {
804
+ var r = T(i)[e], s = void 0;
805
+ if (e === "top" || e === "left" ? s = o >= r : s = o <= r, !s)
806
+ return i;
807
+ if (i === G())
955
808
  break;
956
- n = lt(n, !1);
809
+ i = dt(i, !1);
957
810
  }
958
811
  return !1;
959
812
  }
960
- function Tt(i, t, e, n) {
961
- for (var r = 0, o = 0, a = i.children; o < a.length; ) {
962
- if (a[o].style.display !== "none" && a[o] !== y.ghost && (n || a[o] !== y.dragged) && Z(a[o], e.draggable, i, !1)) {
963
- if (r === t)
964
- return a[o];
965
- r++;
813
+ function Tt(n, t, e, i) {
814
+ for (var o = 0, r = 0, s = n.children; r < s.length; ) {
815
+ if (s[r].style.display !== "none" && s[r] !== g.ghost && (i || s[r] !== g.dragged) && Z(s[r], e.draggable, n, !1)) {
816
+ if (o === t)
817
+ return s[r];
818
+ o++;
966
819
  }
967
- o++;
820
+ r++;
968
821
  }
969
822
  return null;
970
823
  }
971
- function Xe(i, t) {
972
- for (var e = i.lastElementChild; e && (e === y.ghost || v(e, "display") === "none" || t && !pe(e, t)); )
824
+ function ni(n, t) {
825
+ for (var e = n.lastElementChild; e && (e === g.ghost || f(e, "display") === "none" || t && !de(e, t)); )
973
826
  e = e.previousElementSibling;
974
827
  return e || null;
975
828
  }
976
- function z(i, t) {
829
+ function F(n, t) {
977
830
  var e = 0;
978
- if (!i || !i.parentNode)
831
+ if (!n || !n.parentNode)
979
832
  return -1;
980
- for (; i = i.previousElementSibling; )
981
- i.nodeName.toUpperCase() !== "TEMPLATE" && i !== y.clone && (!t || pe(i, t)) && e++;
833
+ for (; n = n.previousElementSibling; )
834
+ n.nodeName.toUpperCase() !== "TEMPLATE" && n !== g.clone && (!t || de(n, t)) && e++;
982
835
  return e;
983
836
  }
984
- function fi(i) {
985
- var t = 0, e = 0, n = q();
986
- if (i)
837
+ function xi(n) {
838
+ var t = 0, e = 0, i = G();
839
+ if (n)
987
840
  do {
988
- var r = St(i), o = r.a, a = r.d;
989
- t += i.scrollLeft * o, e += i.scrollTop * a;
990
- } while (i !== n && (i = i.parentNode));
841
+ var o = At(n), r = o.a, s = o.d;
842
+ t += n.scrollLeft * r, e += n.scrollTop * s;
843
+ } while (n !== i && (n = n.parentNode));
991
844
  return [t, e];
992
845
  }
993
- function _n(i, t) {
994
- for (var e in i)
995
- if (i.hasOwnProperty(e)) {
996
- for (var n in t)
997
- if (t.hasOwnProperty(n) && t[n] === i[e][n])
846
+ function Mn(n, t) {
847
+ for (var e in n)
848
+ if (n.hasOwnProperty(e)) {
849
+ for (var i in t)
850
+ if (t.hasOwnProperty(i) && t[i] === n[e][i])
998
851
  return Number(e);
999
852
  }
1000
853
  return -1;
1001
854
  }
1002
- function lt(i, t) {
1003
- if (!i || !i.getBoundingClientRect)
1004
- return q();
1005
- var e = i, n = !1;
855
+ function dt(n, t) {
856
+ if (!n || !n.getBoundingClientRect)
857
+ return G();
858
+ var e = n, i = !1;
1006
859
  do
1007
860
  if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
1008
- var r = v(e);
1009
- if (e.clientWidth < e.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
861
+ var o = f(e);
862
+ if (e.clientWidth < e.scrollWidth && (o.overflowX == "auto" || o.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (o.overflowY == "auto" || o.overflowY == "scroll")) {
1010
863
  if (!e.getBoundingClientRect || e === document.body)
1011
- return q();
1012
- if (n || t)
864
+ return G();
865
+ if (i || t)
1013
866
  return e;
1014
- n = !0;
867
+ i = !0;
1015
868
  }
1016
869
  }
1017
870
  while (e = e.parentNode);
1018
- return q();
871
+ return G();
1019
872
  }
1020
- function En(i, t) {
1021
- if (i && t)
873
+ function Nn(n, t) {
874
+ if (n && t)
1022
875
  for (var e in t)
1023
- t.hasOwnProperty(e) && (i[e] = t[e]);
1024
- return i;
876
+ t.hasOwnProperty(e) && (n[e] = t[e]);
877
+ return n;
1025
878
  }
1026
- function Se(i, t) {
1027
- 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);
879
+ function Ie(n, t) {
880
+ return Math.round(n.top) === Math.round(t.top) && Math.round(n.left) === Math.round(t.left) && Math.round(n.height) === Math.round(t.height) && Math.round(n.width) === Math.round(t.width);
1028
881
  }
1029
- var Ut;
1030
- function Ri(i, t) {
882
+ var Bt;
883
+ function Ri(n, t) {
1031
884
  return function() {
1032
- if (!Ut) {
1033
- var e = arguments, n = this;
1034
- e.length === 1 ? i.call(n, e[0]) : i.apply(n, e), Ut = setTimeout(function() {
1035
- Ut = void 0;
885
+ if (!Bt) {
886
+ var e = arguments, i = this;
887
+ e.length === 1 ? n.call(i, e[0]) : n.apply(i, e), Bt = setTimeout(function() {
888
+ Bt = void 0;
1036
889
  }, t);
1037
890
  }
1038
891
  };
1039
892
  }
1040
- function wn() {
1041
- clearTimeout(Ut), Ut = void 0;
893
+ function kn() {
894
+ clearTimeout(Bt), Bt = void 0;
1042
895
  }
1043
- function Fi(i, t, e) {
1044
- i.scrollLeft += t, i.scrollTop += e;
896
+ function Ui(n, t, e) {
897
+ n.scrollLeft += t, n.scrollTop += e;
1045
898
  }
1046
- function Ui(i) {
899
+ function Fi(n) {
1047
900
  var t = window.Polymer, e = window.jQuery || window.Zepto;
1048
- return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
901
+ return t && t.dom ? t.dom(n).cloneNode(!0) : e ? e(n).clone(!0)[0] : n.cloneNode(!0);
1049
902
  }
1050
903
  var U = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
1051
- function xn() {
1052
- var i = [], t;
904
+ function In() {
905
+ var n = [], t;
1053
906
  return {
1054
907
  captureAnimationState: function() {
1055
- if (i = [], !!this.options.animation) {
1056
- var n = [].slice.call(this.el.children);
1057
- n.forEach(function(r) {
1058
- if (!(v(r, "display") === "none" || r === y.ghost)) {
1059
- i.push({
1060
- target: r,
1061
- rect: T(r)
908
+ if (n = [], !!this.options.animation) {
909
+ var i = [].slice.call(this.el.children);
910
+ i.forEach(function(o) {
911
+ if (!(f(o, "display") === "none" || o === g.ghost)) {
912
+ n.push({
913
+ target: o,
914
+ rect: T(o)
1062
915
  });
1063
- var o = K({}, i[i.length - 1].rect);
1064
- if (r.thisAnimationDuration) {
1065
- var a = St(r, !0);
1066
- a && (o.top -= a.f, o.left -= a.e);
916
+ var r = K({}, n[n.length - 1].rect);
917
+ if (o.thisAnimationDuration) {
918
+ var s = At(o, !0);
919
+ s && (r.top -= s.f, r.left -= s.e);
1067
920
  }
1068
- r.fromRect = o;
921
+ o.fromRect = r;
1069
922
  }
1070
923
  });
1071
924
  }
1072
925
  },
1073
- addAnimationState: function(n) {
1074
- i.push(n);
926
+ addAnimationState: function(i) {
927
+ n.push(i);
1075
928
  },
1076
- removeAnimationState: function(n) {
1077
- i.splice(_n(i, {
1078
- target: n
929
+ removeAnimationState: function(i) {
930
+ n.splice(Mn(n, {
931
+ target: i
1079
932
  }), 1);
1080
933
  },
1081
- animateAll: function(n) {
1082
- var r = this;
934
+ animateAll: function(i) {
935
+ var o = this;
1083
936
  if (!this.options.animation) {
1084
- clearTimeout(t), typeof n == "function" && n();
937
+ clearTimeout(t), typeof i == "function" && i();
1085
938
  return;
1086
939
  }
1087
- var o = !1, a = 0;
1088
- i.forEach(function(s) {
1089
- var l = 0, d = s.target, u = d.fromRect, c = T(d), p = d.prevFromRect, f = d.prevToRect, g = s.rect, m = St(d, !0);
1090
- m && (c.top -= m.f, c.left -= m.e), d.toRect = c, d.thisAnimationDuration && Se(p, c) && !Se(u, c) && // Make sure animatingRect is on line between toRect & fromRect
1091
- (g.top - c.top) / (g.left - c.left) === (u.top - c.top) / (u.left - c.left) && (l = Cn(g, p, f, r.options)), Se(c, u) || (d.prevFromRect = u, d.prevToRect = c, l || (l = r.options.animation), r.animate(d, g, c, l)), l && (o = !0, a = Math.max(a, l), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
940
+ var r = !1, s = 0;
941
+ n.forEach(function(l) {
942
+ var a = 0, d = l.target, h = d.fromRect, u = T(d), p = d.prevFromRect, v = d.prevToRect, y = l.rect, b = At(d, !0);
943
+ b && (u.top -= b.f, u.left -= b.e), d.toRect = u, d.thisAnimationDuration && Ie(p, u) && !Ie(h, u) && // Make sure animatingRect is on line between toRect & fromRect
944
+ (y.top - u.top) / (y.left - u.left) === (h.top - u.top) / (h.left - u.left) && (a = Ln(y, p, v, o.options)), Ie(u, h) || (d.prevFromRect = h, d.prevToRect = u, a || (a = o.options.animation), o.animate(d, y, u, a)), a && (r = !0, s = Math.max(s, a), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
1092
945
  d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
1093
- }, l), d.thisAnimationDuration = l);
1094
- }), clearTimeout(t), o ? t = setTimeout(function() {
1095
- typeof n == "function" && n();
1096
- }, a) : typeof n == "function" && n(), i = [];
946
+ }, a), d.thisAnimationDuration = a);
947
+ }), clearTimeout(t), r ? t = setTimeout(function() {
948
+ typeof i == "function" && i();
949
+ }, s) : typeof i == "function" && i(), n = [];
1097
950
  },
1098
- animate: function(n, r, o, a) {
1099
- if (a) {
1100
- v(n, "transition", ""), v(n, "transform", "");
1101
- var s = St(this.el), l = s && s.a, d = s && s.d, u = (r.left - o.left) / (l || 1), c = (r.top - o.top) / (d || 1);
1102
- n.animatingX = !!u, n.animatingY = !!c, v(n, "transform", "translate3d(" + u + "px," + c + "px,0)"), this.forRepaintDummy = An(n), v(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), v(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
1103
- v(n, "transition", ""), v(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
1104
- }, a);
951
+ animate: function(i, o, r, s) {
952
+ if (s) {
953
+ f(i, "transition", ""), f(i, "transform", "");
954
+ var l = At(this.el), a = l && l.a, d = l && l.d, h = (o.left - r.left) / (a || 1), u = (o.top - r.top) / (d || 1);
955
+ i.animatingX = !!h, i.animatingY = !!u, f(i, "transform", "translate3d(" + h + "px," + u + "px,0)"), this.forRepaintDummy = Vn(i), f(i, "transition", "transform " + s + "ms" + (this.options.easing ? " " + this.options.easing : "")), f(i, "transform", "translate3d(0,0,0)"), typeof i.animated == "number" && clearTimeout(i.animated), i.animated = setTimeout(function() {
956
+ f(i, "transition", ""), f(i, "transform", ""), i.animated = !1, i.animatingX = !1, i.animatingY = !1;
957
+ }, s);
1105
958
  }
1106
959
  }
1107
960
  };
1108
961
  }
1109
- function An(i) {
1110
- return i.offsetWidth;
962
+ function Vn(n) {
963
+ return n.offsetWidth;
1111
964
  }
1112
- function Cn(i, t, e, n) {
1113
- 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;
965
+ function Ln(n, t, e, i) {
966
+ return Math.sqrt(Math.pow(t.top - n.top, 2) + Math.pow(t.left - n.left, 2)) / Math.sqrt(Math.pow(t.top - e.top, 2) + Math.pow(t.left - e.left, 2)) * i.animation;
1114
967
  }
1115
- var Et = [], De = {
968
+ var Et = [], Ve = {
1116
969
  initializeByDefault: !0
1117
- }, Qt = {
970
+ }, Wt = {
1118
971
  mount: function(t) {
1119
- for (var e in De)
1120
- De.hasOwnProperty(e) && !(e in t) && (t[e] = De[e]);
1121
- Et.forEach(function(n) {
1122
- if (n.pluginName === t.pluginName)
972
+ for (var e in Ve)
973
+ Ve.hasOwnProperty(e) && !(e in t) && (t[e] = Ve[e]);
974
+ Et.forEach(function(i) {
975
+ if (i.pluginName === t.pluginName)
1123
976
  throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
1124
977
  }), Et.push(t);
1125
978
  },
1126
- pluginEvent: function(t, e, n) {
1127
- var r = this;
1128
- this.eventCanceled = !1, n.cancel = function() {
1129
- r.eventCanceled = !0;
979
+ pluginEvent: function(t, e, i) {
980
+ var o = this;
981
+ this.eventCanceled = !1, i.cancel = function() {
982
+ o.eventCanceled = !0;
1130
983
  };
1131
- var o = t + "Global";
1132
- Et.forEach(function(a) {
1133
- e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](K({
984
+ var r = t + "Global";
985
+ Et.forEach(function(s) {
986
+ e[s.pluginName] && (e[s.pluginName][r] && e[s.pluginName][r](K({
1134
987
  sortable: e
1135
- }, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](K({
988
+ }, i)), e.options[s.pluginName] && e[s.pluginName][t] && e[s.pluginName][t](K({
1136
989
  sortable: e
1137
- }, n)));
990
+ }, i)));
1138
991
  });
1139
992
  },
1140
- initializePlugins: function(t, e, n, r) {
1141
- Et.forEach(function(s) {
1142
- var l = s.pluginName;
1143
- if (!(!t.options[l] && !s.initializeByDefault)) {
1144
- var d = new s(t, e, t.options);
1145
- d.sortable = t, d.options = t.options, t[l] = d, it(n, d.defaults);
993
+ initializePlugins: function(t, e, i, o) {
994
+ Et.forEach(function(l) {
995
+ var a = l.pluginName;
996
+ if (!(!t.options[a] && !l.initializeByDefault)) {
997
+ var d = new l(t, e, t.options);
998
+ d.sortable = t, d.options = t.options, t[a] = d, it(i, d.defaults);
1146
999
  }
1147
1000
  });
1148
- for (var o in t.options)
1149
- if (t.options.hasOwnProperty(o)) {
1150
- var a = this.modifyOption(t, o, t.options[o]);
1151
- typeof a < "u" && (t.options[o] = a);
1001
+ for (var r in t.options)
1002
+ if (t.options.hasOwnProperty(r)) {
1003
+ var s = this.modifyOption(t, r, t.options[r]);
1004
+ typeof s < "u" && (t.options[r] = s);
1152
1005
  }
1153
1006
  },
1154
1007
  getEventProperties: function(t, e) {
1155
- var n = {};
1156
- return Et.forEach(function(r) {
1157
- typeof r.eventProperties == "function" && it(n, r.eventProperties.call(e[r.pluginName], t));
1158
- }), n;
1159
- },
1160
- modifyOption: function(t, e, n) {
1161
- var r;
1008
+ var i = {};
1162
1009
  return Et.forEach(function(o) {
1163
- t[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (r = o.optionListeners[e].call(t[o.pluginName], n));
1164
- }), r;
1010
+ typeof o.eventProperties == "function" && it(i, o.eventProperties.call(e[o.pluginName], t));
1011
+ }), i;
1012
+ },
1013
+ modifyOption: function(t, e, i) {
1014
+ var o;
1015
+ return Et.forEach(function(r) {
1016
+ t[r.pluginName] && r.optionListeners && typeof r.optionListeners[e] == "function" && (o = r.optionListeners[e].call(t[r.pluginName], i));
1017
+ }), o;
1165
1018
  }
1166
1019
  };
1167
- function $n(i) {
1168
- var t = i.sortable, e = i.rootEl, n = i.name, r = i.targetEl, o = i.cloneEl, a = i.toEl, s = i.fromEl, l = i.oldIndex, d = i.newIndex, u = i.oldDraggableIndex, c = i.newDraggableIndex, p = i.originalEvent, f = i.putSortable, g = i.extraEventProperties;
1020
+ function Bn(n) {
1021
+ var t = n.sortable, e = n.rootEl, i = n.name, o = n.targetEl, r = n.cloneEl, s = n.toEl, l = n.fromEl, a = n.oldIndex, d = n.newIndex, h = n.oldDraggableIndex, u = n.newDraggableIndex, p = n.originalEvent, v = n.putSortable, y = n.extraEventProperties;
1169
1022
  if (t = t || e && e[U], !!t) {
1170
- var m, $ = t.options, N = "on" + n.charAt(0).toUpperCase() + n.substr(1);
1171
- window.CustomEvent && !nt && !Kt ? m = new CustomEvent(n, {
1023
+ var b, X = t.options, J = "on" + i.charAt(0).toUpperCase() + i.substr(1);
1024
+ window.CustomEvent && !nt && !qt ? b = new CustomEvent(i, {
1172
1025
  bubbles: !0,
1173
1026
  cancelable: !0
1174
- }) : (m = document.createEvent("Event"), m.initEvent(n, !0, !0)), m.to = a || e, m.from = s || e, m.item = r || e, m.clone = o, m.oldIndex = l, m.newIndex = d, m.oldDraggableIndex = u, m.newDraggableIndex = c, m.originalEvent = p, m.pullMode = f ? f.lastPutMode : void 0;
1175
- var O = K(K({}, g), Qt.getEventProperties(n, t));
1176
- for (var Y in O)
1177
- m[Y] = O[Y];
1178
- e && e.dispatchEvent(m), $[N] && $[N].call(t, m);
1027
+ }) : (b = document.createEvent("Event"), b.initEvent(i, !0, !0)), b.to = s || e, b.from = l || e, b.item = o || e, b.clone = r, b.oldIndex = a, b.newIndex = d, b.oldDraggableIndex = h, b.newDraggableIndex = u, b.originalEvent = p, b.pullMode = v ? v.lastPutMode : void 0;
1028
+ var H = K(K({}, y), Wt.getEventProperties(i, t));
1029
+ for (var Y in H)
1030
+ b[Y] = H[Y];
1031
+ e && e.dispatchEvent(b), X[J] && X[J].call(t, b);
1179
1032
  }
1180
1033
  }
1181
- var Sn = ["evt"], P = function(t, e) {
1182
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = vn(n, Sn);
1183
- Qt.pluginEvent.bind(y)(t, e, K({
1184
- dragEl: h,
1034
+ var Rn = ["evt"], k = function(t, e) {
1035
+ var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, o = i.evt, r = Pn(i, Rn);
1036
+ Wt.pluginEvent.bind(g)(t, e, K({
1037
+ dragEl: c,
1185
1038
  parentEl: C,
1186
- ghostEl: b,
1187
- rootEl: x,
1039
+ ghostEl: m,
1040
+ rootEl: $,
1188
1041
  nextEl: vt,
1189
- lastDownEl: ae,
1190
- cloneEl: A,
1191
- cloneHidden: st,
1192
- dragStarted: Vt,
1193
- putSortable: L,
1194
- activeSortable: y.active,
1195
- originalEvent: r,
1196
- oldIndex: Ct,
1197
- oldDraggableIndex: zt,
1198
- newIndex: F,
1199
- newDraggableIndex: at,
1200
- hideGhostForTarget: Xi,
1201
- unhideGhostForTarget: Wi,
1042
+ lastDownEl: ie,
1043
+ cloneEl: x,
1044
+ cloneHidden: lt,
1045
+ dragStarted: kt,
1046
+ putSortable: D,
1047
+ activeSortable: g.active,
1048
+ originalEvent: o,
1049
+ oldIndex: xt,
1050
+ oldDraggableIndex: Rt,
1051
+ newIndex: R,
1052
+ newDraggableIndex: st,
1053
+ hideGhostForTarget: ji,
1054
+ unhideGhostForTarget: qi,
1202
1055
  cloneNowHidden: function() {
1203
- st = !0;
1056
+ lt = !0;
1204
1057
  },
1205
1058
  cloneNowShown: function() {
1206
- st = !1;
1059
+ lt = !1;
1207
1060
  },
1208
- dispatchSortableEvent: function(s) {
1209
- M({
1061
+ dispatchSortableEvent: function(l) {
1062
+ N({
1210
1063
  sortable: e,
1211
- name: s,
1212
- originalEvent: r
1064
+ name: l,
1065
+ originalEvent: o
1213
1066
  });
1214
1067
  }
1215
- }, o));
1068
+ }, r));
1216
1069
  };
1217
- function M(i) {
1218
- $n(K({
1219
- putSortable: L,
1220
- cloneEl: A,
1221
- targetEl: h,
1222
- rootEl: x,
1223
- oldIndex: Ct,
1224
- oldDraggableIndex: zt,
1225
- newIndex: F,
1226
- newDraggableIndex: at
1227
- }, i));
1228
- }
1229
- var h, C, b, x, vt, ae, A, st, Ct, F, zt, at, te, L, At = !1, fe = !1, ge = [], ft, X, Te, Oe, gi, mi, Vt, wt, jt, Yt = !1, ee = !1, se, I, Le = [], Re = !1, me = [], ye = typeof document < "u", ie = ki, vi = Kt || nt ? "cssFloat" : "float", Dn = ye && !Ni && !ki && "draggable" in document.createElement("div"), zi = function() {
1230
- if (ye) {
1070
+ function N(n) {
1071
+ Bn(K({
1072
+ putSortable: D,
1073
+ cloneEl: x,
1074
+ targetEl: c,
1075
+ rootEl: $,
1076
+ oldIndex: xt,
1077
+ oldDraggableIndex: Rt,
1078
+ newIndex: R,
1079
+ newDraggableIndex: st
1080
+ }, n));
1081
+ }
1082
+ var c, C, m, $, vt, ie, x, lt, xt, R, Rt, st, Gt, D, $t = !1, ue = !1, ce = [], ft, j, Le, Be, Ai, Ci, kt, wt, Ut, Ft = !1, Kt = !1, ne, P, Re = [], We = !1, he = [], De = typeof document < "u", Jt = Ii, Si = qt || nt ? "cssFloat" : "float", Un = De && !Vi && !Ii && "draggable" in document.createElement("div"), zi = function() {
1083
+ if (De) {
1231
1084
  if (nt)
1232
1085
  return !1;
1233
- var i = document.createElement("x");
1234
- return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
1235
- }
1236
- }(), ji = function(t, e) {
1237
- var n = v(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = Tt(t, 0, e), a = Tt(t, 1, e), s = o && v(o), l = a && v(a), d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + T(o).width, u = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(a).width;
1238
- if (n.display === "flex")
1239
- return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
1240
- if (n.display === "grid")
1241
- return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
1242
- if (o && s.float && s.float !== "none") {
1243
- var c = s.float === "left" ? "left" : "right";
1244
- return a && (l.clear === "both" || l.clear === c) ? "vertical" : "horizontal";
1245
- }
1246
- return o && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || d >= r && n[vi] === "none" || a && n[vi] === "none" && d + u > r) ? "vertical" : "horizontal";
1247
- }, Tn = function(t, e, n) {
1248
- var r = n ? t.left : t.top, o = n ? t.right : t.bottom, a = n ? t.width : t.height, s = n ? e.left : e.top, l = n ? e.right : e.bottom, d = n ? e.width : e.height;
1249
- return r === s || o === l || r + a / 2 === s + d / 2;
1250
- }, On = function(t, e) {
1251
- var n;
1252
- return ge.some(function(r) {
1253
- var o = r[U].options.emptyInsertThreshold;
1254
- if (!(!o || Xe(r))) {
1255
- var a = T(r), s = t >= a.left - o && t <= a.right + o, l = e >= a.top - o && e <= a.bottom + o;
1256
- if (s && l)
1257
- return n = r;
1258
- }
1259
- }), n;
1086
+ var n = document.createElement("x");
1087
+ return n.style.cssText = "pointer-events:auto", n.style.pointerEvents === "auto";
1088
+ }
1089
+ }(), Xi = function(t, e) {
1090
+ var i = f(t), o = parseInt(i.width) - parseInt(i.paddingLeft) - parseInt(i.paddingRight) - parseInt(i.borderLeftWidth) - parseInt(i.borderRightWidth), r = Tt(t, 0, e), s = Tt(t, 1, e), l = r && f(r), a = s && f(s), d = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + T(r).width, h = a && parseInt(a.marginLeft) + parseInt(a.marginRight) + T(s).width;
1091
+ if (i.display === "flex")
1092
+ return i.flexDirection === "column" || i.flexDirection === "column-reverse" ? "vertical" : "horizontal";
1093
+ if (i.display === "grid")
1094
+ return i.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
1095
+ if (r && l.float && l.float !== "none") {
1096
+ var u = l.float === "left" ? "left" : "right";
1097
+ return s && (a.clear === "both" || a.clear === u) ? "vertical" : "horizontal";
1098
+ }
1099
+ return r && (l.display === "block" || l.display === "flex" || l.display === "table" || l.display === "grid" || d >= o && i[Si] === "none" || s && i[Si] === "none" && d + h > o) ? "vertical" : "horizontal";
1100
+ }, Fn = function(t, e, i) {
1101
+ var o = i ? t.left : t.top, r = i ? t.right : t.bottom, s = i ? t.width : t.height, l = i ? e.left : e.top, a = i ? e.right : e.bottom, d = i ? e.width : e.height;
1102
+ return o === l || r === a || o + s / 2 === l + d / 2;
1103
+ }, zn = function(t, e) {
1104
+ var i;
1105
+ return ce.some(function(o) {
1106
+ var r = o[U].options.emptyInsertThreshold;
1107
+ if (!(!r || ni(o))) {
1108
+ var s = T(o), l = t >= s.left - r && t <= s.right + r, a = e >= s.top - r && e <= s.bottom + r;
1109
+ if (l && a)
1110
+ return i = o;
1111
+ }
1112
+ }), i;
1260
1113
  }, Yi = function(t) {
1261
- function e(o, a) {
1262
- return function(s, l, d, u) {
1263
- var c = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
1264
- if (o == null && (a || c))
1114
+ function e(r, s) {
1115
+ return function(l, a, d, h) {
1116
+ var u = l.options.group.name && a.options.group.name && l.options.group.name === a.options.group.name;
1117
+ if (r == null && (s || u))
1265
1118
  return !0;
1266
- if (o == null || o === !1)
1119
+ if (r == null || r === !1)
1267
1120
  return !1;
1268
- if (a && o === "clone")
1269
- return o;
1270
- if (typeof o == "function")
1271
- return e(o(s, l, d, u), a)(s, l, d, u);
1272
- var p = (a ? s : l).options.group.name;
1273
- return o === !0 || typeof o == "string" && o === p || o.join && o.indexOf(p) > -1;
1121
+ if (s && r === "clone")
1122
+ return r;
1123
+ if (typeof r == "function")
1124
+ return e(r(l, a, d, h), s)(l, a, d, h);
1125
+ var p = (s ? l : a).options.group.name;
1126
+ return r === !0 || typeof r == "string" && r === p || r.join && r.indexOf(p) > -1;
1274
1127
  };
1275
1128
  }
1276
- var n = {}, r = t.group;
1277
- (!r || oe(r) != "object") && (r = {
1278
- name: r
1279
- }), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
1280
- }, Xi = function() {
1281
- !zi && b && v(b, "display", "none");
1282
- }, Wi = function() {
1283
- !zi && b && v(b, "display", "");
1129
+ var i = {}, o = t.group;
1130
+ (!o || ee(o) != "object") && (o = {
1131
+ name: o
1132
+ }), i.name = o.name, i.checkPull = e(o.pull, !0), i.checkPut = e(o.put), i.revertClone = o.revertClone, t.group = i;
1133
+ }, ji = function() {
1134
+ !zi && m && f(m, "display", "none");
1135
+ }, qi = function() {
1136
+ !zi && m && f(m, "display", "");
1284
1137
  };
1285
- ye && !Ni && document.addEventListener("click", function(i) {
1286
- if (fe)
1287
- return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), fe = !1, !1;
1138
+ De && !Vi && document.addEventListener("click", function(n) {
1139
+ if (ue)
1140
+ return n.preventDefault(), n.stopPropagation && n.stopPropagation(), n.stopImmediatePropagation && n.stopImmediatePropagation(), ue = !1, !1;
1288
1141
  }, !0);
1289
1142
  var gt = function(t) {
1290
- if (h) {
1143
+ if (c) {
1291
1144
  t = t.touches ? t.touches[0] : t;
1292
- var e = On(t.clientX, t.clientY);
1145
+ var e = zn(t.clientX, t.clientY);
1293
1146
  if (e) {
1294
- var n = {};
1295
- for (var r in t)
1296
- t.hasOwnProperty(r) && (n[r] = t[r]);
1297
- n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[U]._onDragOver(n);
1147
+ var i = {};
1148
+ for (var o in t)
1149
+ t.hasOwnProperty(o) && (i[o] = t[o]);
1150
+ i.target = i.rootEl = e, i.preventDefault = void 0, i.stopPropagation = void 0, e[U]._onDragOver(i);
1298
1151
  }
1299
1152
  }
1300
- }, Ln = function(t) {
1301
- h && h.parentNode[U]._isOutsideThisEl(t.target);
1153
+ }, Xn = function(t) {
1154
+ c && c.parentNode[U]._isOutsideThisEl(t.target);
1302
1155
  };
1303
- function y(i, t) {
1304
- if (!(i && i.nodeType && i.nodeType === 1))
1305
- throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));
1306
- this.el = i, this.options = t = it({}, t), i[U] = this;
1156
+ function g(n, t) {
1157
+ if (!(n && n.nodeType && n.nodeType === 1))
1158
+ throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));
1159
+ this.el = n, this.options = t = it({}, t), n[U] = this;
1307
1160
  var e = {
1308
1161
  group: null,
1309
1162
  sort: !0,
1310
1163
  disabled: !1,
1311
1164
  store: null,
1312
1165
  handle: null,
1313
- draggable: /^[uo]l$/i.test(i.nodeName) ? ">li" : ">*",
1166
+ draggable: /^[uo]l$/i.test(n.nodeName) ? ">li" : ">*",
1314
1167
  swapThreshold: 1,
1315
1168
  // percentage; 0 <= x <= 1
1316
1169
  invertSwap: !1,
@@ -1319,7 +1172,7 @@ function y(i, t) {
1319
1172
  // will be set to same as swapThreshold if default
1320
1173
  removeCloneOnHide: !0,
1321
1174
  direction: function() {
1322
- return ji(i, this.options);
1175
+ return Xi(n, this.options);
1323
1176
  },
1324
1177
  ghostClass: "sortable-ghost",
1325
1178
  chosenClass: "sortable-chosen",
@@ -1329,8 +1182,8 @@ function y(i, t) {
1329
1182
  preventOnFilter: !0,
1330
1183
  animation: 0,
1331
1184
  easing: null,
1332
- setData: function(a, s) {
1333
- a.setData("Text", s.textContent);
1185
+ setData: function(s, l) {
1186
+ s.setData("Text", l.textContent);
1334
1187
  },
1335
1188
  dropBubble: !1,
1336
1189
  dragoverBubble: !1,
@@ -1346,96 +1199,96 @@ function y(i, t) {
1346
1199
  x: 0,
1347
1200
  y: 0
1348
1201
  },
1349
- supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && !Ft,
1202
+ supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && !Lt,
1350
1203
  emptyInsertThreshold: 5
1351
1204
  };
1352
- Qt.initializePlugins(this, i, e);
1353
- for (var n in e)
1354
- !(n in t) && (t[n] = e[n]);
1205
+ Wt.initializePlugins(this, n, e);
1206
+ for (var i in e)
1207
+ !(i in t) && (t[i] = e[i]);
1355
1208
  Yi(t);
1356
- for (var r in this)
1357
- r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
1358
- this.nativeDraggable = t.forceFallback ? !1 : Dn, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? E(i, "pointerdown", this._onTapStart) : (E(i, "mousedown", this._onTapStart), E(i, "touchstart", this._onTapStart)), this.nativeDraggable && (E(i, "dragover", this), E(i, "dragenter", this)), ge.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), it(this, xn());
1209
+ for (var o in this)
1210
+ o.charAt(0) === "_" && typeof this[o] == "function" && (this[o] = this[o].bind(this));
1211
+ this.nativeDraggable = t.forceFallback ? !1 : Un, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? w(n, "pointerdown", this._onTapStart) : (w(n, "mousedown", this._onTapStart), w(n, "touchstart", this._onTapStart)), this.nativeDraggable && (w(n, "dragover", this), w(n, "dragenter", this)), ce.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), it(this, In());
1359
1212
  }
1360
- y.prototype = /** @lends Sortable.prototype */
1213
+ g.prototype = /** @lends Sortable.prototype */
1361
1214
  {
1362
- constructor: y,
1215
+ constructor: g,
1363
1216
  _isOutsideThisEl: function(t) {
1364
1217
  !this.el.contains(t) && t !== this.el && (wt = null);
1365
1218
  },
1366
1219
  _getDirection: function(t, e) {
1367
- return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, h) : this.options.direction;
1220
+ return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, c) : this.options.direction;
1368
1221
  },
1369
1222
  _onTapStart: function(t) {
1370
1223
  if (t.cancelable) {
1371
- var e = this, n = this.el, r = this.options, o = r.preventOnFilter, a = t.type, s = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, l = (s || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || l, u = r.filter;
1372
- if (Bn(n), !h && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Ft && l && l.tagName.toUpperCase() === "SELECT") && (l = Z(l, r.draggable, n, !1), !(l && l.animated) && ae !== l)) {
1373
- if (Ct = z(l), zt = z(l, r.draggable), typeof u == "function") {
1374
- if (u.call(this, t, l, this)) {
1375
- M({
1224
+ var e = this, i = this.el, o = this.options, r = o.preventOnFilter, s = t.type, l = t.touches && t.touches[0] || t.pointerType && t.pointerType === "touch" && t, a = (l || t).target, d = t.target.shadowRoot && (t.path && t.path[0] || t.composedPath && t.composedPath()[0]) || a, h = o.filter;
1225
+ if (Jn(i), !c && !(/mousedown|pointerdown/.test(s) && t.button !== 0 || o.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Lt && a && a.tagName.toUpperCase() === "SELECT") && (a = Z(a, o.draggable, i, !1), !(a && a.animated) && ie !== a)) {
1226
+ if (xt = F(a), Rt = F(a, o.draggable), typeof h == "function") {
1227
+ if (h.call(this, t, a, this)) {
1228
+ N({
1376
1229
  sortable: e,
1377
1230
  rootEl: d,
1378
1231
  name: "filter",
1379
- targetEl: l,
1380
- toEl: n,
1381
- fromEl: n
1382
- }), P("filter", e, {
1232
+ targetEl: a,
1233
+ toEl: i,
1234
+ fromEl: i
1235
+ }), k("filter", e, {
1383
1236
  evt: t
1384
- }), o && t.cancelable && t.preventDefault();
1237
+ }), r && t.cancelable && t.preventDefault();
1385
1238
  return;
1386
1239
  }
1387
- } else if (u && (u = u.split(",").some(function(c) {
1388
- if (c = Z(d, c.trim(), n, !1), c)
1389
- return M({
1240
+ } else if (h && (h = h.split(",").some(function(u) {
1241
+ if (u = Z(d, u.trim(), i, !1), u)
1242
+ return N({
1390
1243
  sortable: e,
1391
- rootEl: c,
1244
+ rootEl: u,
1392
1245
  name: "filter",
1393
- targetEl: l,
1394
- fromEl: n,
1395
- toEl: n
1396
- }), P("filter", e, {
1246
+ targetEl: a,
1247
+ fromEl: i,
1248
+ toEl: i
1249
+ }), k("filter", e, {
1397
1250
  evt: t
1398
1251
  }), !0;
1399
- }), u)) {
1400
- o && t.cancelable && t.preventDefault();
1252
+ }), h)) {
1253
+ r && t.cancelable && t.preventDefault();
1401
1254
  return;
1402
1255
  }
1403
- r.handle && !Z(d, r.handle, n, !1) || this._prepareDragStart(t, s, l);
1256
+ o.handle && !Z(d, o.handle, i, !1) || this._prepareDragStart(t, l, a);
1404
1257
  }
1405
1258
  }
1406
1259
  },
1407
- _prepareDragStart: function(t, e, n) {
1408
- var r = this, o = r.el, a = r.options, s = o.ownerDocument, l;
1409
- if (n && !h && n.parentNode === o) {
1410
- var d = T(n);
1411
- if (x = o, h = n, C = h.parentNode, vt = h.nextSibling, ae = n, te = a.group, y.dragged = h, ft = {
1412
- target: h,
1260
+ _prepareDragStart: function(t, e, i) {
1261
+ var o = this, r = o.el, s = o.options, l = r.ownerDocument, a;
1262
+ if (i && !c && i.parentNode === r) {
1263
+ var d = T(i);
1264
+ if ($ = r, c = i, C = c.parentNode, vt = c.nextSibling, ie = i, Gt = s.group, g.dragged = c, ft = {
1265
+ target: c,
1413
1266
  clientX: (e || t).clientX,
1414
1267
  clientY: (e || t).clientY
1415
- }, gi = ft.clientX - d.left, mi = ft.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, h.style["will-change"] = "all", l = function() {
1416
- if (P("delayEnded", r, {
1268
+ }, Ai = ft.clientX - d.left, Ci = ft.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, c.style["will-change"] = "all", a = function() {
1269
+ if (k("delayEnded", o, {
1417
1270
  evt: t
1418
- }), y.eventCanceled) {
1419
- r._onDrop();
1271
+ }), g.eventCanceled) {
1272
+ o._onDrop();
1420
1273
  return;
1421
1274
  }
1422
- r._disableDelayedDragEvents(), !ci && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(t, e), M({
1423
- sortable: r,
1275
+ o._disableDelayedDragEvents(), !wi && o.nativeDraggable && (c.draggable = !0), o._triggerDragStart(t, e), N({
1276
+ sortable: o,
1424
1277
  name: "choose",
1425
1278
  originalEvent: t
1426
- }), R(h, a.chosenClass, !0);
1427
- }, a.ignore.split(",").forEach(function(u) {
1428
- Bi(h, u.trim(), He);
1429
- }), E(s, "dragover", gt), E(s, "mousemove", gt), E(s, "touchmove", gt), E(s, "mouseup", r._onDrop), E(s, "touchend", r._onDrop), E(s, "touchcancel", r._onDrop), ci && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), P("delayStart", this, {
1279
+ }), B(c, s.chosenClass, !0);
1280
+ }, s.ignore.split(",").forEach(function(h) {
1281
+ Bi(c, h.trim(), Ue);
1282
+ }), w(l, "dragover", gt), w(l, "mousemove", gt), w(l, "touchmove", gt), w(l, "mouseup", o._onDrop), w(l, "touchend", o._onDrop), w(l, "touchcancel", o._onDrop), wi && this.nativeDraggable && (this.options.touchStartThreshold = 4, c.draggable = !0), k("delayStart", this, {
1430
1283
  evt: t
1431
- }), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Kt || nt))) {
1432
- if (y.eventCanceled) {
1284
+ }), s.delay && (!s.delayOnTouchOnly || e) && (!this.nativeDraggable || !(qt || nt))) {
1285
+ if (g.eventCanceled) {
1433
1286
  this._onDrop();
1434
1287
  return;
1435
1288
  }
1436
- E(s, "mouseup", r._disableDelayedDrag), E(s, "touchend", r._disableDelayedDrag), E(s, "touchcancel", r._disableDelayedDrag), E(s, "mousemove", r._delayedDragTouchMoveHandler), E(s, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && E(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, a.delay);
1289
+ w(l, "mouseup", o._disableDelayedDrag), w(l, "touchend", o._disableDelayedDrag), w(l, "touchcancel", o._disableDelayedDrag), w(l, "mousemove", o._delayedDragTouchMoveHandler), w(l, "touchmove", o._delayedDragTouchMoveHandler), s.supportPointer && w(l, "pointermove", o._delayedDragTouchMoveHandler), o._dragStartTimer = setTimeout(a, s.delay);
1437
1290
  } else
1438
- l();
1291
+ a();
1439
1292
  }
1440
1293
  },
1441
1294
  _delayedDragTouchMoveHandler: function(t) {
@@ -1443,28 +1296,28 @@ y.prototype = /** @lends Sortable.prototype */
1443
1296
  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();
1444
1297
  },
1445
1298
  _disableDelayedDrag: function() {
1446
- h && He(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
1299
+ c && Ue(c), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
1447
1300
  },
1448
1301
  _disableDelayedDragEvents: function() {
1449
1302
  var t = this.el.ownerDocument;
1450
- _(t, "mouseup", this._disableDelayedDrag), _(t, "touchend", this._disableDelayedDrag), _(t, "touchcancel", this._disableDelayedDrag), _(t, "mousemove", this._delayedDragTouchMoveHandler), _(t, "touchmove", this._delayedDragTouchMoveHandler), _(t, "pointermove", this._delayedDragTouchMoveHandler);
1303
+ 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);
1451
1304
  },
1452
1305
  _triggerDragStart: function(t, e) {
1453
- e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? E(document, "pointermove", this._onTouchMove) : e ? E(document, "touchmove", this._onTouchMove) : E(document, "mousemove", this._onTouchMove) : (E(h, "dragend", this), E(x, "dragstart", this._onDragStart));
1306
+ e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? w(document, "pointermove", this._onTouchMove) : e ? w(document, "touchmove", this._onTouchMove) : w(document, "mousemove", this._onTouchMove) : (w(c, "dragend", this), w($, "dragstart", this._onDragStart));
1454
1307
  try {
1455
- document.selection ? le(function() {
1308
+ document.selection ? oe(function() {
1456
1309
  document.selection.empty();
1457
1310
  }) : window.getSelection().removeAllRanges();
1458
1311
  } catch {
1459
1312
  }
1460
1313
  },
1461
1314
  _dragStarted: function(t, e) {
1462
- if (At = !1, x && h) {
1463
- P("dragStarted", this, {
1315
+ if ($t = !1, $ && c) {
1316
+ k("dragStarted", this, {
1464
1317
  evt: e
1465
- }), this.nativeDraggable && E(document, "dragover", Ln);
1466
- var n = this.options;
1467
- !t && R(h, n.dragClass, !1), R(h, n.ghostClass, !0), y.active = this, t && this._appendGhost(), M({
1318
+ }), this.nativeDraggable && w(document, "dragover", Xn);
1319
+ var i = this.options;
1320
+ !t && B(c, i.dragClass, !1), B(c, i.ghostClass, !0), g.active = this, t && this._appendGhost(), N({
1468
1321
  sortable: this,
1469
1322
  name: "start",
1470
1323
  originalEvent: e
@@ -1473,221 +1326,221 @@ y.prototype = /** @lends Sortable.prototype */
1473
1326
  this._nulling();
1474
1327
  },
1475
1328
  _emulateDragOver: function() {
1476
- if (X) {
1477
- this._lastX = X.clientX, this._lastY = X.clientY, Xi();
1478
- for (var t = document.elementFromPoint(X.clientX, X.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(X.clientX, X.clientY), t !== e); )
1329
+ if (j) {
1330
+ this._lastX = j.clientX, this._lastY = j.clientY, ji();
1331
+ for (var t = document.elementFromPoint(j.clientX, j.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(j.clientX, j.clientY), t !== e); )
1479
1332
  e = t;
1480
- if (h.parentNode[U]._isOutsideThisEl(t), e)
1333
+ if (c.parentNode[U]._isOutsideThisEl(t), e)
1481
1334
  do {
1482
1335
  if (e[U]) {
1483
- var n = void 0;
1484
- if (n = e[U]._onDragOver({
1485
- clientX: X.clientX,
1486
- clientY: X.clientY,
1336
+ var i = void 0;
1337
+ if (i = e[U]._onDragOver({
1338
+ clientX: j.clientX,
1339
+ clientY: j.clientY,
1487
1340
  target: t,
1488
1341
  rootEl: e
1489
- }), n && !this.options.dragoverBubble)
1342
+ }), i && !this.options.dragoverBubble)
1490
1343
  break;
1491
1344
  }
1492
1345
  t = e;
1493
1346
  } while (e = e.parentNode);
1494
- Wi();
1347
+ qi();
1495
1348
  }
1496
1349
  },
1497
1350
  _onTouchMove: function(t) {
1498
1351
  if (ft) {
1499
- var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = b && St(b, !0), s = b && a && a.a, l = b && a && a.d, d = ie && I && fi(I), u = (o.clientX - ft.clientX + r.x) / (s || 1) + (d ? d[0] - Le[0] : 0) / (s || 1), c = (o.clientY - ft.clientY + r.y) / (l || 1) + (d ? d[1] - Le[1] : 0) / (l || 1);
1500
- if (!y.active && !At) {
1501
- if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
1352
+ var e = this.options, i = e.fallbackTolerance, o = e.fallbackOffset, r = t.touches ? t.touches[0] : t, s = m && At(m, !0), l = m && s && s.a, a = m && s && s.d, d = Jt && P && xi(P), h = (r.clientX - ft.clientX + o.x) / (l || 1) + (d ? d[0] - Re[0] : 0) / (l || 1), u = (r.clientY - ft.clientY + o.y) / (a || 1) + (d ? d[1] - Re[1] : 0) / (a || 1);
1353
+ if (!g.active && !$t) {
1354
+ if (i && Math.max(Math.abs(r.clientX - this._lastX), Math.abs(r.clientY - this._lastY)) < i)
1502
1355
  return;
1503
1356
  this._onDragStart(t, !0);
1504
1357
  }
1505
- if (b) {
1506
- a ? (a.e += u - (Te || 0), a.f += c - (Oe || 0)) : a = {
1358
+ if (m) {
1359
+ s ? (s.e += h - (Le || 0), s.f += u - (Be || 0)) : s = {
1507
1360
  a: 1,
1508
1361
  b: 0,
1509
1362
  c: 0,
1510
1363
  d: 1,
1511
- e: u,
1512
- f: c
1364
+ e: h,
1365
+ f: u
1513
1366
  };
1514
- var p = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
1515
- v(b, "webkitTransform", p), v(b, "mozTransform", p), v(b, "msTransform", p), v(b, "transform", p), Te = u, Oe = c, X = o;
1367
+ var p = "matrix(".concat(s.a, ",").concat(s.b, ",").concat(s.c, ",").concat(s.d, ",").concat(s.e, ",").concat(s.f, ")");
1368
+ f(m, "webkitTransform", p), f(m, "mozTransform", p), f(m, "msTransform", p), f(m, "transform", p), Le = h, Be = u, j = r;
1516
1369
  }
1517
1370
  t.cancelable && t.preventDefault();
1518
1371
  }
1519
1372
  },
1520
1373
  _appendGhost: function() {
1521
- if (!b) {
1522
- var t = this.options.fallbackOnBody ? document.body : x, e = T(h, !0, ie, !0, t), n = this.options;
1523
- if (ie) {
1524
- for (I = t; v(I, "position") === "static" && v(I, "transform") === "none" && I !== document; )
1525
- I = I.parentNode;
1526
- I !== document.body && I !== document.documentElement ? (I === document && (I = q()), e.top += I.scrollTop, e.left += I.scrollLeft) : I = q(), Le = fi(I);
1374
+ if (!m) {
1375
+ var t = this.options.fallbackOnBody ? document.body : $, e = T(c, !0, Jt, !0, t), i = this.options;
1376
+ if (Jt) {
1377
+ for (P = t; f(P, "position") === "static" && f(P, "transform") === "none" && P !== document; )
1378
+ P = P.parentNode;
1379
+ P !== document.body && P !== document.documentElement ? (P === document && (P = G()), e.top += P.scrollTop, e.left += P.scrollLeft) : P = G(), Re = xi(P);
1527
1380
  }
1528
- b = h.cloneNode(!0), R(b, n.ghostClass, !1), R(b, n.fallbackClass, !0), R(b, n.dragClass, !0), v(b, "transition", ""), v(b, "transform", ""), v(b, "box-sizing", "border-box"), v(b, "margin", 0), v(b, "top", e.top), v(b, "left", e.left), v(b, "width", e.width), v(b, "height", e.height), v(b, "opacity", "0.8"), v(b, "position", ie ? "absolute" : "fixed"), v(b, "zIndex", "100000"), v(b, "pointerEvents", "none"), y.ghost = b, t.appendChild(b), v(b, "transform-origin", gi / parseInt(b.style.width) * 100 + "% " + mi / parseInt(b.style.height) * 100 + "%");
1381
+ m = c.cloneNode(!0), B(m, i.ghostClass, !1), B(m, i.fallbackClass, !0), B(m, i.dragClass, !0), f(m, "transition", ""), f(m, "transform", ""), f(m, "box-sizing", "border-box"), f(m, "margin", 0), f(m, "top", e.top), f(m, "left", e.left), f(m, "width", e.width), f(m, "height", e.height), f(m, "opacity", "0.8"), f(m, "position", Jt ? "absolute" : "fixed"), f(m, "zIndex", "100000"), f(m, "pointerEvents", "none"), g.ghost = m, t.appendChild(m), f(m, "transform-origin", Ai / parseInt(m.style.width) * 100 + "% " + Ci / parseInt(m.style.height) * 100 + "%");
1529
1382
  }
1530
1383
  },
1531
1384
  _onDragStart: function(t, e) {
1532
- var n = this, r = t.dataTransfer, o = n.options;
1533
- if (P("dragStart", this, {
1385
+ var i = this, o = t.dataTransfer, r = i.options;
1386
+ if (k("dragStart", this, {
1534
1387
  evt: t
1535
- }), y.eventCanceled) {
1388
+ }), g.eventCanceled) {
1536
1389
  this._onDrop();
1537
1390
  return;
1538
1391
  }
1539
- P("setupClone", this), y.eventCanceled || (A = Ui(h), A.removeAttribute("id"), A.draggable = !1, A.style["will-change"] = "", this._hideClone(), R(A, this.options.chosenClass, !1), y.clone = A), n.cloneId = le(function() {
1540
- P("clone", n), !y.eventCanceled && (n.options.removeCloneOnHide || x.insertBefore(A, h), n._hideClone(), M({
1541
- sortable: n,
1392
+ k("setupClone", this), g.eventCanceled || (x = Fi(c), x.removeAttribute("id"), x.draggable = !1, x.style["will-change"] = "", this._hideClone(), B(x, this.options.chosenClass, !1), g.clone = x), i.cloneId = oe(function() {
1393
+ k("clone", i), !g.eventCanceled && (i.options.removeCloneOnHide || $.insertBefore(x, c), i._hideClone(), N({
1394
+ sortable: i,
1542
1395
  name: "clone"
1543
1396
  }));
1544
- }), !e && R(h, o.dragClass, !0), e ? (fe = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (_(document, "mouseup", n._onDrop), _(document, "touchend", n._onDrop), _(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, h)), E(document, "drop", n), v(h, "transform", "translateZ(0)")), At = !0, n._dragStartId = le(n._dragStarted.bind(n, e, t)), E(document, "selectstart", n), Vt = !0, Ft && v(document.body, "user-select", "none");
1397
+ }), !e && B(c, r.dragClass, !0), e ? (ue = !0, i._loopId = setInterval(i._emulateDragOver, 50)) : (E(document, "mouseup", i._onDrop), E(document, "touchend", i._onDrop), E(document, "touchcancel", i._onDrop), o && (o.effectAllowed = "move", r.setData && r.setData.call(i, o, c)), w(document, "drop", i), f(c, "transform", "translateZ(0)")), $t = !0, i._dragStartId = oe(i._dragStarted.bind(i, e, t)), w(document, "selectstart", i), kt = !0, Lt && f(document.body, "user-select", "none");
1545
1398
  },
1546
1399
  // Returns true - if no further action is needed (either inserted or another condition)
1547
1400
  _onDragOver: function(t) {
1548
- var e = this.el, n = t.target, r, o, a, s = this.options, l = s.group, d = y.active, u = te === l, c = s.sort, p = L || d, f, g = this, m = !1;
1549
- if (Re)
1401
+ var e = this.el, i = t.target, o, r, s, l = this.options, a = l.group, d = g.active, h = Gt === a, u = l.sort, p = D || d, v, y = this, b = !1;
1402
+ if (We)
1550
1403
  return;
1551
- function $(Pt, Ki) {
1552
- P(Pt, g, K({
1404
+ function X(Mt, rn) {
1405
+ k(Mt, y, K({
1553
1406
  evt: t,
1554
- isOwner: u,
1555
- axis: f ? "vertical" : "horizontal",
1556
- revert: a,
1557
- dragRect: r,
1558
- targetRect: o,
1559
- canSort: c,
1407
+ isOwner: h,
1408
+ axis: v ? "vertical" : "horizontal",
1409
+ revert: s,
1410
+ dragRect: o,
1411
+ targetRect: r,
1412
+ canSort: u,
1560
1413
  fromSortable: p,
1561
- target: n,
1562
- completed: O,
1563
- onMove: function(Ze, Qi) {
1564
- return ne(x, e, h, r, Ze, T(Ze), t, Qi);
1414
+ target: i,
1415
+ completed: H,
1416
+ onMove: function(ai, sn) {
1417
+ return Qt($, e, c, o, ai, T(ai), t, sn);
1565
1418
  },
1566
1419
  changed: Y
1567
- }, Ki));
1420
+ }, rn));
1568
1421
  }
1569
- function N() {
1570
- $("dragOverAnimationCapture"), g.captureAnimationState(), g !== p && p.captureAnimationState();
1422
+ function J() {
1423
+ X("dragOverAnimationCapture"), y.captureAnimationState(), y !== p && p.captureAnimationState();
1571
1424
  }
1572
- function O(Pt) {
1573
- return $("dragOverCompleted", {
1574
- insertion: Pt
1575
- }), Pt && (u ? d._hideClone() : d._showClone(g), g !== p && (R(h, L ? L.options.ghostClass : d.options.ghostClass, !1), R(h, s.ghostClass, !0)), L !== g && g !== y.active ? L = g : g === y.active && L && (L = null), p === g && (g._ignoreWhileAnimating = n), g.animateAll(function() {
1576
- $("dragOverAnimationComplete"), g._ignoreWhileAnimating = null;
1577
- }), g !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (wt = null), !s.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[U]._isOutsideThisEl(t.target), !Pt && gt(t)), !s.dragoverBubble && t.stopPropagation && t.stopPropagation(), m = !0;
1425
+ function H(Mt) {
1426
+ return X("dragOverCompleted", {
1427
+ insertion: Mt
1428
+ }), Mt && (h ? d._hideClone() : d._showClone(y), y !== p && (B(c, D ? D.options.ghostClass : d.options.ghostClass, !1), B(c, l.ghostClass, !0)), D !== y && y !== g.active ? D = y : y === g.active && D && (D = null), p === y && (y._ignoreWhileAnimating = i), y.animateAll(function() {
1429
+ X("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
1430
+ }), y !== p && (p.animateAll(), p._ignoreWhileAnimating = null)), (i === c && !c.animated || i === e && !i.animated) && (wt = null), !l.dragoverBubble && !t.rootEl && i !== document && (c.parentNode[U]._isOutsideThisEl(t.target), !Mt && gt(t)), !l.dragoverBubble && t.stopPropagation && t.stopPropagation(), b = !0;
1578
1431
  }
1579
1432
  function Y() {
1580
- F = z(h), at = z(h, s.draggable), M({
1581
- sortable: g,
1433
+ R = F(c), st = F(c, l.draggable), N({
1434
+ sortable: y,
1582
1435
  name: "change",
1583
1436
  toEl: e,
1584
- newIndex: F,
1585
- newDraggableIndex: at,
1437
+ newIndex: R,
1438
+ newDraggableIndex: st,
1586
1439
  originalEvent: t
1587
1440
  });
1588
1441
  }
1589
- if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = Z(n, s.draggable, e, !0), $("dragOver"), y.eventCanceled)
1590
- return m;
1591
- if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || g._ignoreWhileAnimating === n)
1592
- return O(!1);
1593
- if (fe = !1, d && !s.disabled && (u ? c || (a = C !== x) : L === this || (this.lastPutMode = te.checkPull(this, d, h, t)) && l.checkPut(this, d, h, t))) {
1594
- if (f = this._getDirection(t, n) === "vertical", r = T(h), $("dragOverValid"), y.eventCanceled)
1595
- return m;
1596
- if (a)
1597
- return C = x, N(), this._hideClone(), $("revert"), y.eventCanceled || (vt ? x.insertBefore(h, vt) : x.appendChild(h)), O(!0);
1598
- var V = Xe(e, s.draggable);
1599
- if (!V || Pn(t, f, this) && !V.animated) {
1600
- if (V === h)
1601
- return O(!1);
1602
- if (V && e === t.target && (n = V), n && (o = T(n)), ne(x, e, h, r, n, o, t, !!n) !== !1)
1603
- return N(), V && V.nextSibling ? e.insertBefore(h, V.nextSibling) : e.appendChild(h), C = e, Y(), O(!0);
1604
- } else if (V && Mn(t, f, this)) {
1605
- var dt = Tt(e, 0, s, !0);
1606
- if (dt === h)
1607
- return O(!1);
1608
- if (n = dt, o = T(n), ne(x, e, h, r, n, o, t, !1) !== !1)
1609
- return N(), e.insertBefore(h, dt), C = e, Y(), O(!0);
1610
- } else if (n.parentNode === e) {
1611
- o = T(n);
1612
- var G = 0, ut, Lt = h.parentNode !== e, B = !Tn(h.animated && h.toRect || r, n.animated && n.toRect || o, f), Ht = f ? "top" : "left", rt = pi(n, "top", "top") || pi(h, "top", "top"), It = rt ? rt.scrollTop : void 0;
1613
- wt !== n && (ut = o[Ht], Yt = !1, ee = !B && s.invertSwap || Lt), G = kn(t, n, o, f, B ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, ee, wt === n);
1614
- var J;
1615
- if (G !== 0) {
1616
- var ct = z(h);
1442
+ if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), i = Z(i, l.draggable, e, !0), X("dragOver"), g.eventCanceled)
1443
+ return b;
1444
+ if (c.contains(t.target) || i.animated && i.animatingX && i.animatingY || y._ignoreWhileAnimating === i)
1445
+ return H(!1);
1446
+ if (ue = !1, d && !l.disabled && (h ? u || (s = C !== $) : D === this || (this.lastPutMode = Gt.checkPull(this, d, c, t)) && a.checkPut(this, d, c, t))) {
1447
+ if (v = this._getDirection(t, i) === "vertical", o = T(c), X("dragOverValid"), g.eventCanceled)
1448
+ return b;
1449
+ if (s)
1450
+ return C = $, J(), this._hideClone(), X("revert"), g.eventCanceled || (vt ? $.insertBefore(c, vt) : $.appendChild(c)), H(!0);
1451
+ var I = ni(e, l.draggable);
1452
+ if (!I || Wn(t, v, this) && !I.animated) {
1453
+ if (I === c)
1454
+ return H(!1);
1455
+ if (I && e === t.target && (i = I), i && (r = T(i)), Qt($, e, c, o, i, r, t, !!i) !== !1)
1456
+ return J(), I && I.nextSibling ? e.insertBefore(c, I.nextSibling) : e.appendChild(c), C = e, Y(), H(!0);
1457
+ } else if (I && qn(t, v, this)) {
1458
+ var ut = Tt(e, 0, l, !0);
1459
+ if (ut === c)
1460
+ return H(!1);
1461
+ if (i = ut, r = T(i), Qt($, e, c, o, i, r, t, !1) !== !1)
1462
+ return J(), e.insertBefore(c, ut), C = e, Y(), H(!0);
1463
+ } else if (i.parentNode === e) {
1464
+ r = T(i);
1465
+ var W = 0, ct, Dt = c.parentNode !== e, V = !Fn(c.animated && c.toRect || o, i.animated && i.toRect || r, v), Pt = v ? "top" : "left", ot = $i(i, "top", "top") || $i(c, "top", "top"), Ht = ot ? ot.scrollTop : void 0;
1466
+ wt !== i && (ct = r[Pt], Ft = !1, Kt = !V && l.invertSwap || Dt), W = Zn(t, i, r, v, V ? 1 : l.swapThreshold, l.invertedSwapThreshold == null ? l.swapThreshold : l.invertedSwapThreshold, Kt, wt === i);
1467
+ var Q;
1468
+ if (W !== 0) {
1469
+ var ht = F(c);
1617
1470
  do
1618
- ct -= G, J = C.children[ct];
1619
- while (J && (v(J, "display") === "none" || J === b));
1471
+ ht -= W, Q = C.children[ht];
1472
+ while (Q && (f(Q, "display") === "none" || Q === m));
1620
1473
  }
1621
- if (G === 0 || J === n)
1622
- return O(!1);
1623
- wt = n, jt = G;
1624
- var Mt = n.nextElementSibling, ot = !1;
1625
- ot = G === 1;
1626
- var Jt = ne(x, e, h, r, n, o, t, ot);
1627
- if (Jt !== !1)
1628
- return (Jt === 1 || Jt === -1) && (ot = Jt === 1), Re = !0, setTimeout(In, 30), N(), ot && !Mt ? e.appendChild(h) : n.parentNode.insertBefore(h, ot ? Mt : n), rt && Fi(rt, 0, It - rt.scrollTop), C = h.parentNode, ut !== void 0 && !ee && (se = Math.abs(ut - T(n)[Ht])), Y(), O(!0);
1474
+ if (W === 0 || Q === i)
1475
+ return H(!1);
1476
+ wt = i, Ut = W;
1477
+ var Ot = i.nextElementSibling, rt = !1;
1478
+ rt = W === 1;
1479
+ var Zt = Qt($, e, c, o, i, r, t, rt);
1480
+ if (Zt !== !1)
1481
+ return (Zt === 1 || Zt === -1) && (rt = Zt === 1), We = !0, setTimeout(jn, 30), J(), rt && !Ot ? e.appendChild(c) : i.parentNode.insertBefore(c, rt ? Ot : i), ot && Ui(ot, 0, Ht - ot.scrollTop), C = c.parentNode, ct !== void 0 && !Kt && (ne = Math.abs(ct - T(i)[Pt])), Y(), H(!0);
1629
1482
  }
1630
- if (e.contains(h))
1631
- return O(!1);
1483
+ if (e.contains(c))
1484
+ return H(!1);
1632
1485
  }
1633
1486
  return !1;
1634
1487
  },
1635
1488
  _ignoreWhileAnimating: null,
1636
1489
  _offMoveEvents: function() {
1637
- _(document, "mousemove", this._onTouchMove), _(document, "touchmove", this._onTouchMove), _(document, "pointermove", this._onTouchMove), _(document, "dragover", gt), _(document, "mousemove", gt), _(document, "touchmove", gt);
1490
+ E(document, "mousemove", this._onTouchMove), E(document, "touchmove", this._onTouchMove), E(document, "pointermove", this._onTouchMove), E(document, "dragover", gt), E(document, "mousemove", gt), E(document, "touchmove", gt);
1638
1491
  },
1639
1492
  _offUpEvents: function() {
1640
1493
  var t = this.el.ownerDocument;
1641
- _(t, "mouseup", this._onDrop), _(t, "touchend", this._onDrop), _(t, "pointerup", this._onDrop), _(t, "touchcancel", this._onDrop), _(document, "selectstart", this);
1494
+ E(t, "mouseup", this._onDrop), E(t, "touchend", this._onDrop), E(t, "pointerup", this._onDrop), E(t, "touchcancel", this._onDrop), E(document, "selectstart", this);
1642
1495
  },
1643
1496
  _onDrop: function(t) {
1644
- var e = this.el, n = this.options;
1645
- if (F = z(h), at = z(h, n.draggable), P("drop", this, {
1497
+ var e = this.el, i = this.options;
1498
+ if (R = F(c), st = F(c, i.draggable), k("drop", this, {
1646
1499
  evt: t
1647
- }), C = h && h.parentNode, F = z(h), at = z(h, n.draggable), y.eventCanceled) {
1500
+ }), C = c && c.parentNode, R = F(c), st = F(c, i.draggable), g.eventCanceled) {
1648
1501
  this._nulling();
1649
1502
  return;
1650
1503
  }
1651
- At = !1, ee = !1, Yt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Fe(this.cloneId), Fe(this._dragStartId), this.nativeDraggable && (_(document, "drop", this), _(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ft && v(document.body, "user-select", ""), v(h, "transform", ""), t && (Vt && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), b && b.parentNode && b.parentNode.removeChild(b), (x === C || L && L.lastPutMode !== "clone") && A && A.parentNode && A.parentNode.removeChild(A), h && (this.nativeDraggable && _(h, "dragend", this), He(h), h.style["will-change"] = "", Vt && !At && R(h, L ? L.options.ghostClass : this.options.ghostClass, !1), R(h, this.options.chosenClass, !1), M({
1504
+ $t = !1, Kt = !1, Ft = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ze(this.cloneId), Ze(this._dragStartId), this.nativeDraggable && (E(document, "drop", this), E(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Lt && f(document.body, "user-select", ""), f(c, "transform", ""), t && (kt && (t.cancelable && t.preventDefault(), !i.dropBubble && t.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), ($ === C || D && D.lastPutMode !== "clone") && x && x.parentNode && x.parentNode.removeChild(x), c && (this.nativeDraggable && E(c, "dragend", this), Ue(c), c.style["will-change"] = "", kt && !$t && B(c, D ? D.options.ghostClass : this.options.ghostClass, !1), B(c, this.options.chosenClass, !1), N({
1652
1505
  sortable: this,
1653
1506
  name: "unchoose",
1654
1507
  toEl: C,
1655
1508
  newIndex: null,
1656
1509
  newDraggableIndex: null,
1657
1510
  originalEvent: t
1658
- }), x !== C ? (F >= 0 && (M({
1511
+ }), $ !== C ? (R >= 0 && (N({
1659
1512
  rootEl: C,
1660
1513
  name: "add",
1661
1514
  toEl: C,
1662
- fromEl: x,
1515
+ fromEl: $,
1663
1516
  originalEvent: t
1664
- }), M({
1517
+ }), N({
1665
1518
  sortable: this,
1666
1519
  name: "remove",
1667
1520
  toEl: C,
1668
1521
  originalEvent: t
1669
- }), M({
1522
+ }), N({
1670
1523
  rootEl: C,
1671
1524
  name: "sort",
1672
1525
  toEl: C,
1673
- fromEl: x,
1526
+ fromEl: $,
1674
1527
  originalEvent: t
1675
- }), M({
1528
+ }), N({
1676
1529
  sortable: this,
1677
1530
  name: "sort",
1678
1531
  toEl: C,
1679
1532
  originalEvent: t
1680
- })), L && L.save()) : F !== Ct && F >= 0 && (M({
1533
+ })), D && D.save()) : R !== xt && R >= 0 && (N({
1681
1534
  sortable: this,
1682
1535
  name: "update",
1683
1536
  toEl: C,
1684
1537
  originalEvent: t
1685
- }), M({
1538
+ }), N({
1686
1539
  sortable: this,
1687
1540
  name: "sort",
1688
1541
  toEl: C,
1689
1542
  originalEvent: t
1690
- })), y.active && ((F == null || F === -1) && (F = Ct, at = zt), M({
1543
+ })), g.active && ((R == null || R === -1) && (R = xt, st = Rt), N({
1691
1544
  sortable: this,
1692
1545
  name: "end",
1693
1546
  toEl: C,
@@ -1695,9 +1548,9 @@ y.prototype = /** @lends Sortable.prototype */
1695
1548
  }), this.save()))), this._nulling();
1696
1549
  },
1697
1550
  _nulling: function() {
1698
- P("nulling", this), x = h = C = b = vt = A = ae = st = ft = X = Vt = F = at = Ct = zt = wt = jt = L = te = y.dragged = y.ghost = y.clone = y.active = null, me.forEach(function(t) {
1551
+ k("nulling", this), $ = c = C = m = vt = x = ie = lt = ft = j = kt = R = st = xt = Rt = wt = Ut = D = Gt = g.dragged = g.ghost = g.clone = g.active = null, he.forEach(function(t) {
1699
1552
  t.checked = !0;
1700
- }), me.length = Te = Oe = 0;
1553
+ }), he.length = Le = Be = 0;
1701
1554
  },
1702
1555
  handleEvent: function(t) {
1703
1556
  switch (t.type) {
@@ -1707,7 +1560,7 @@ y.prototype = /** @lends Sortable.prototype */
1707
1560
  break;
1708
1561
  case "dragenter":
1709
1562
  case "dragover":
1710
- h && (this._onDragOver(t), Hn(t));
1563
+ c && (this._onDragOver(t), Yn(t));
1711
1564
  break;
1712
1565
  case "selectstart":
1713
1566
  t.preventDefault();
@@ -1719,8 +1572,8 @@ y.prototype = /** @lends Sortable.prototype */
1719
1572
  * @returns {String[]}
1720
1573
  */
1721
1574
  toArray: function() {
1722
- for (var t = [], e, n = this.el.children, r = 0, o = n.length, a = this.options; r < o; r++)
1723
- e = n[r], Z(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || Vn(e));
1575
+ for (var t = [], e, i = this.el.children, o = 0, r = i.length, s = this.options; o < r; o++)
1576
+ e = i[o], Z(e, s.draggable, this.el, !1) && t.push(e.getAttribute(s.dataIdAttr) || Kn(e));
1724
1577
  return t;
1725
1578
  },
1726
1579
  /**
@@ -1728,12 +1581,12 @@ y.prototype = /** @lends Sortable.prototype */
1728
1581
  * @param {String[]} order order of the items
1729
1582
  */
1730
1583
  sort: function(t, e) {
1731
- var n = {}, r = this.el;
1732
- this.toArray().forEach(function(o, a) {
1733
- var s = r.children[a];
1734
- Z(s, this.options.draggable, r, !1) && (n[o] = s);
1735
- }, this), e && this.captureAnimationState(), t.forEach(function(o) {
1736
- n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
1584
+ var i = {}, o = this.el;
1585
+ this.toArray().forEach(function(r, s) {
1586
+ var l = o.children[s];
1587
+ Z(l, this.options.draggable, o, !1) && (i[r] = l);
1588
+ }, this), e && this.captureAnimationState(), t.forEach(function(r) {
1589
+ i[r] && (o.removeChild(i[r]), o.appendChild(i[r]));
1737
1590
  }), e && this.animateAll();
1738
1591
  },
1739
1592
  /**
@@ -1759,27 +1612,27 @@ y.prototype = /** @lends Sortable.prototype */
1759
1612
  * @returns {*}
1760
1613
  */
1761
1614
  option: function(t, e) {
1762
- var n = this.options;
1615
+ var i = this.options;
1763
1616
  if (e === void 0)
1764
- return n[t];
1765
- var r = Qt.modifyOption(this, t, e);
1766
- typeof r < "u" ? n[t] = r : n[t] = e, t === "group" && Yi(n);
1617
+ return i[t];
1618
+ var o = Wt.modifyOption(this, t, e);
1619
+ typeof o < "u" ? i[t] = o : i[t] = e, t === "group" && Yi(i);
1767
1620
  },
1768
1621
  /**
1769
1622
  * Destroy
1770
1623
  */
1771
1624
  destroy: function() {
1772
- P("destroy", this);
1625
+ k("destroy", this);
1773
1626
  var t = this.el;
1774
- t[U] = null, _(t, "mousedown", this._onTapStart), _(t, "touchstart", this._onTapStart), _(t, "pointerdown", this._onTapStart), this.nativeDraggable && (_(t, "dragover", this), _(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
1627
+ t[U] = 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) {
1775
1628
  e.removeAttribute("draggable");
1776
- }), this._onDrop(), this._disableDelayedDragEvents(), ge.splice(ge.indexOf(this.el), 1), this.el = t = null;
1629
+ }), this._onDrop(), this._disableDelayedDragEvents(), ce.splice(ce.indexOf(this.el), 1), this.el = t = null;
1777
1630
  },
1778
1631
  _hideClone: function() {
1779
- if (!st) {
1780
- if (P("hideClone", this), y.eventCanceled)
1632
+ if (!lt) {
1633
+ if (k("hideClone", this), g.eventCanceled)
1781
1634
  return;
1782
- v(A, "display", "none"), this.options.removeCloneOnHide && A.parentNode && A.parentNode.removeChild(A), st = !0;
1635
+ f(x, "display", "none"), this.options.removeCloneOnHide && x.parentNode && x.parentNode.removeChild(x), lt = !0;
1783
1636
  }
1784
1637
  },
1785
1638
  _showClone: function(t) {
@@ -1787,112 +1640,112 @@ y.prototype = /** @lends Sortable.prototype */
1787
1640
  this._hideClone();
1788
1641
  return;
1789
1642
  }
1790
- if (st) {
1791
- if (P("showClone", this), y.eventCanceled)
1643
+ if (lt) {
1644
+ if (k("showClone", this), g.eventCanceled)
1792
1645
  return;
1793
- h.parentNode == x && !this.options.group.revertClone ? x.insertBefore(A, h) : vt ? x.insertBefore(A, vt) : x.appendChild(A), this.options.group.revertClone && this.animate(h, A), v(A, "display", ""), st = !1;
1646
+ c.parentNode == $ && !this.options.group.revertClone ? $.insertBefore(x, c) : vt ? $.insertBefore(x, vt) : $.appendChild(x), this.options.group.revertClone && this.animate(c, x), f(x, "display", ""), lt = !1;
1794
1647
  }
1795
1648
  }
1796
1649
  };
1797
- function Hn(i) {
1798
- i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
1650
+ function Yn(n) {
1651
+ n.dataTransfer && (n.dataTransfer.dropEffect = "move"), n.cancelable && n.preventDefault();
1799
1652
  }
1800
- function ne(i, t, e, n, r, o, a, s) {
1801
- var l, d = i[U], u = d.options.onMove, c;
1802
- return window.CustomEvent && !nt && !Kt ? l = new CustomEvent("move", {
1653
+ function Qt(n, t, e, i, o, r, s, l) {
1654
+ var a, d = n[U], h = d.options.onMove, u;
1655
+ return window.CustomEvent && !nt && !qt ? a = new CustomEvent("move", {
1803
1656
  bubbles: !0,
1804
1657
  cancelable: !0
1805
- }) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = i, l.dragged = e, l.draggedRect = n, l.related = r || t, l.relatedRect = o || T(t), l.willInsertAfter = s, l.originalEvent = a, i.dispatchEvent(l), u && (c = u.call(d, l, a)), c;
1658
+ }) : (a = document.createEvent("Event"), a.initEvent("move", !0, !0)), a.to = t, a.from = n, a.dragged = e, a.draggedRect = i, a.related = o || t, a.relatedRect = r || T(t), a.willInsertAfter = l, a.originalEvent = s, n.dispatchEvent(a), h && (u = h.call(d, a, s)), u;
1806
1659
  }
1807
- function He(i) {
1808
- i.draggable = !1;
1660
+ function Ue(n) {
1661
+ n.draggable = !1;
1809
1662
  }
1810
- function In() {
1811
- Re = !1;
1663
+ function jn() {
1664
+ We = !1;
1812
1665
  }
1813
- function Mn(i, t, e) {
1814
- var n = T(Tt(e.el, 0, e.options, !0)), r = 10;
1815
- 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;
1666
+ function qn(n, t, e) {
1667
+ var i = T(Tt(e.el, 0, e.options, !0)), o = 10;
1668
+ return t ? n.clientX < i.left - o || n.clientY < i.top && n.clientX < i.right : n.clientY < i.top - o || n.clientY < i.bottom && n.clientX < i.left;
1816
1669
  }
1817
- function Pn(i, t, e) {
1818
- var n = T(Xe(e.el, e.options.draggable)), r = 10;
1819
- 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;
1670
+ function Wn(n, t, e) {
1671
+ var i = T(ni(e.el, e.options.draggable)), o = 10;
1672
+ return t ? n.clientX > i.right + o || n.clientX <= i.right && n.clientY > i.bottom && n.clientX >= i.left : n.clientX > i.right && n.clientY > i.top || n.clientX <= i.right && n.clientY > i.bottom + o;
1820
1673
  }
1821
- function kn(i, t, e, n, r, o, a, s) {
1822
- var l = n ? i.clientY : i.clientX, d = n ? e.height : e.width, u = n ? e.top : e.left, c = n ? e.bottom : e.right, p = !1;
1823
- if (!a) {
1824
- if (s && se < d * r) {
1825
- if (!Yt && (jt === 1 ? l > u + d * o / 2 : l < c - d * o / 2) && (Yt = !0), Yt)
1674
+ function Zn(n, t, e, i, o, r, s, l) {
1675
+ var a = i ? n.clientY : n.clientX, d = i ? e.height : e.width, h = i ? e.top : e.left, u = i ? e.bottom : e.right, p = !1;
1676
+ if (!s) {
1677
+ if (l && ne < d * o) {
1678
+ if (!Ft && (Ut === 1 ? a > h + d * r / 2 : a < u - d * r / 2) && (Ft = !0), Ft)
1826
1679
  p = !0;
1827
- else if (jt === 1 ? l < u + se : l > c - se)
1828
- return -jt;
1829
- } else if (l > u + d * (1 - r) / 2 && l < c - d * (1 - r) / 2)
1830
- return Nn(t);
1680
+ else if (Ut === 1 ? a < h + ne : a > u - ne)
1681
+ return -Ut;
1682
+ } else if (a > h + d * (1 - o) / 2 && a < u - d * (1 - o) / 2)
1683
+ return Gn(t);
1831
1684
  }
1832
- return p = p || a, p && (l < u + d * o / 2 || l > c - d * o / 2) ? l > u + d / 2 ? 1 : -1 : 0;
1685
+ return p = p || s, p && (a < h + d * r / 2 || a > u - d * r / 2) ? a > h + d / 2 ? 1 : -1 : 0;
1833
1686
  }
1834
- function Nn(i) {
1835
- return z(h) < z(i) ? 1 : -1;
1687
+ function Gn(n) {
1688
+ return F(c) < F(n) ? 1 : -1;
1836
1689
  }
1837
- function Vn(i) {
1838
- for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
1839
- n += t.charCodeAt(e);
1840
- return n.toString(36);
1690
+ function Kn(n) {
1691
+ for (var t = n.tagName + n.className + n.src + n.href + n.textContent, e = t.length, i = 0; e--; )
1692
+ i += t.charCodeAt(e);
1693
+ return i.toString(36);
1841
1694
  }
1842
- function Bn(i) {
1843
- me.length = 0;
1844
- for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
1845
- var n = t[e];
1846
- n.checked && me.push(n);
1695
+ function Jn(n) {
1696
+ he.length = 0;
1697
+ for (var t = n.getElementsByTagName("input"), e = t.length; e--; ) {
1698
+ var i = t[e];
1699
+ i.checked && he.push(i);
1847
1700
  }
1848
1701
  }
1849
- function le(i) {
1850
- return setTimeout(i, 0);
1702
+ function oe(n) {
1703
+ return setTimeout(n, 0);
1851
1704
  }
1852
- function Fe(i) {
1853
- return clearTimeout(i);
1705
+ function Ze(n) {
1706
+ return clearTimeout(n);
1854
1707
  }
1855
- ye && E(document, "touchmove", function(i) {
1856
- (y.active || At) && i.cancelable && i.preventDefault();
1708
+ De && w(document, "touchmove", function(n) {
1709
+ (g.active || $t) && n.cancelable && n.preventDefault();
1857
1710
  });
1858
- y.utils = {
1859
- on: E,
1860
- off: _,
1861
- css: v,
1711
+ g.utils = {
1712
+ on: w,
1713
+ off: E,
1714
+ css: f,
1862
1715
  find: Bi,
1863
1716
  is: function(t, e) {
1864
1717
  return !!Z(t, e, t, !1);
1865
1718
  },
1866
- extend: En,
1719
+ extend: Nn,
1867
1720
  throttle: Ri,
1868
1721
  closest: Z,
1869
- toggleClass: R,
1870
- clone: Ui,
1871
- index: z,
1872
- nextTick: le,
1873
- cancelNextTick: Fe,
1874
- detectDirection: ji,
1722
+ toggleClass: B,
1723
+ clone: Fi,
1724
+ index: F,
1725
+ nextTick: oe,
1726
+ cancelNextTick: Ze,
1727
+ detectDirection: Xi,
1875
1728
  getChild: Tt
1876
1729
  };
1877
- y.get = function(i) {
1878
- return i[U];
1730
+ g.get = function(n) {
1731
+ return n[U];
1879
1732
  };
1880
- y.mount = function() {
1881
- for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
1733
+ g.mount = function() {
1734
+ for (var n = arguments.length, t = new Array(n), e = 0; e < n; e++)
1882
1735
  t[e] = arguments[e];
1883
- t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
1884
- if (!n.prototype || !n.prototype.constructor)
1885
- throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
1886
- n.utils && (y.utils = K(K({}, y.utils), n.utils)), Qt.mount(n);
1736
+ t[0].constructor === Array && (t = t[0]), t.forEach(function(i) {
1737
+ if (!i.prototype || !i.prototype.constructor)
1738
+ throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));
1739
+ i.utils && (g.utils = K(K({}, g.utils), i.utils)), Wt.mount(i);
1887
1740
  });
1888
1741
  };
1889
- y.create = function(i, t) {
1890
- return new y(i, t);
1742
+ g.create = function(n, t) {
1743
+ return new g(n, t);
1891
1744
  };
1892
- y.version = yn;
1893
- var S = [], Bt, Ue, ze = !1, Ie, Me, ve, Rt;
1894
- function Rn() {
1895
- function i() {
1745
+ g.version = Hn;
1746
+ var S = [], It, Ge, Ke = !1, Fe, ze, pe, Vt;
1747
+ function Qn() {
1748
+ function n() {
1896
1749
  this.defaults = {
1897
1750
  scroll: !0,
1898
1751
  forceAutoScrollFallback: !1,
@@ -1903,135 +1756,395 @@ function Rn() {
1903
1756
  for (var t in this)
1904
1757
  t.charAt(0) === "_" && typeof this[t] == "function" && (this[t] = this[t].bind(this));
1905
1758
  }
1906
- return i.prototype = {
1759
+ return n.prototype = {
1907
1760
  dragStarted: function(e) {
1908
- var n = e.originalEvent;
1909
- this.sortable.nativeDraggable ? E(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? E(document, "pointermove", this._handleFallbackAutoScroll) : n.touches ? E(document, "touchmove", this._handleFallbackAutoScroll) : E(document, "mousemove", this._handleFallbackAutoScroll);
1761
+ var i = e.originalEvent;
1762
+ this.sortable.nativeDraggable ? w(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? w(document, "pointermove", this._handleFallbackAutoScroll) : i.touches ? w(document, "touchmove", this._handleFallbackAutoScroll) : w(document, "mousemove", this._handleFallbackAutoScroll);
1910
1763
  },
1911
1764
  dragOverCompleted: function(e) {
1912
- var n = e.originalEvent;
1913
- !this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
1765
+ var i = e.originalEvent;
1766
+ !this.options.dragOverBubble && !i.rootEl && this._handleAutoScroll(i);
1914
1767
  },
1915
1768
  drop: function() {
1916
- this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : (_(document, "pointermove", this._handleFallbackAutoScroll), _(document, "touchmove", this._handleFallbackAutoScroll), _(document, "mousemove", this._handleFallbackAutoScroll)), yi(), de(), wn();
1769
+ this.sortable.nativeDraggable ? E(document, "dragover", this._handleAutoScroll) : (E(document, "pointermove", this._handleFallbackAutoScroll), E(document, "touchmove", this._handleFallbackAutoScroll), E(document, "mousemove", this._handleFallbackAutoScroll)), Ti(), re(), kn();
1917
1770
  },
1918
1771
  nulling: function() {
1919
- ve = Ue = Bt = ze = Rt = Ie = Me = null, S.length = 0;
1772
+ pe = Ge = It = Ke = Vt = Fe = ze = null, S.length = 0;
1920
1773
  },
1921
1774
  _handleFallbackAutoScroll: function(e) {
1922
1775
  this._handleAutoScroll(e, !0);
1923
1776
  },
1924
- _handleAutoScroll: function(e, n) {
1925
- var r = this, o = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, s = document.elementFromPoint(o, a);
1926
- if (ve = e, n || this.options.forceAutoScrollFallback || Kt || nt || Ft) {
1927
- Pe(e, this.options, s, n);
1928
- var l = lt(s, !0);
1929
- ze && (!Rt || o !== Ie || a !== Me) && (Rt && yi(), Rt = setInterval(function() {
1930
- var d = lt(document.elementFromPoint(o, a), !0);
1931
- d !== l && (l = d, de()), Pe(e, r.options, d, n);
1932
- }, 10), Ie = o, Me = a);
1777
+ _handleAutoScroll: function(e, i) {
1778
+ var o = this, r = (e.touches ? e.touches[0] : e).clientX, s = (e.touches ? e.touches[0] : e).clientY, l = document.elementFromPoint(r, s);
1779
+ if (pe = e, i || this.options.forceAutoScrollFallback || qt || nt || Lt) {
1780
+ Xe(e, this.options, l, i);
1781
+ var a = dt(l, !0);
1782
+ Ke && (!Vt || r !== Fe || s !== ze) && (Vt && Ti(), Vt = setInterval(function() {
1783
+ var d = dt(document.elementFromPoint(r, s), !0);
1784
+ d !== a && (a = d, re()), Xe(e, o.options, d, i);
1785
+ }, 10), Fe = r, ze = s);
1933
1786
  } else {
1934
- if (!this.options.bubbleScroll || lt(s, !0) === q()) {
1935
- de();
1787
+ if (!this.options.bubbleScroll || dt(l, !0) === G()) {
1788
+ re();
1936
1789
  return;
1937
1790
  }
1938
- Pe(e, this.options, lt(s, !1), !1);
1791
+ Xe(e, this.options, dt(l, !1), !1);
1939
1792
  }
1940
1793
  }
1941
- }, it(i, {
1794
+ }, it(n, {
1942
1795
  pluginName: "scroll",
1943
1796
  initializeByDefault: !0
1944
1797
  });
1945
1798
  }
1946
- function de() {
1947
- S.forEach(function(i) {
1948
- clearInterval(i.pid);
1799
+ function re() {
1800
+ S.forEach(function(n) {
1801
+ clearInterval(n.pid);
1949
1802
  }), S = [];
1950
1803
  }
1951
- function yi() {
1952
- clearInterval(Rt);
1804
+ function Ti() {
1805
+ clearInterval(Vt);
1953
1806
  }
1954
- var Pe = Ri(function(i, t, e, n) {
1807
+ var Xe = Ri(function(n, t, e, i) {
1955
1808
  if (t.scroll) {
1956
- var r = (i.touches ? i.touches[0] : i).clientX, o = (i.touches ? i.touches[0] : i).clientY, a = t.scrollSensitivity, s = t.scrollSpeed, l = q(), d = !1, u;
1957
- Ue !== e && (Ue = e, de(), Bt = t.scroll, u = t.scrollFn, Bt === !0 && (Bt = lt(e, !0)));
1958
- var c = 0, p = Bt;
1809
+ var o = (n.touches ? n.touches[0] : n).clientX, r = (n.touches ? n.touches[0] : n).clientY, s = t.scrollSensitivity, l = t.scrollSpeed, a = G(), d = !1, h;
1810
+ Ge !== e && (Ge = e, re(), It = t.scroll, h = t.scrollFn, It === !0 && (It = dt(e, !0)));
1811
+ var u = 0, p = It;
1959
1812
  do {
1960
- var f = p, g = T(f), m = g.top, $ = g.bottom, N = g.left, O = g.right, Y = g.width, V = g.height, dt = void 0, G = void 0, ut = f.scrollWidth, Lt = f.scrollHeight, B = v(f), Ht = f.scrollLeft, rt = f.scrollTop;
1961
- f === l ? (dt = Y < ut && (B.overflowX === "auto" || B.overflowX === "scroll" || B.overflowX === "visible"), G = V < Lt && (B.overflowY === "auto" || B.overflowY === "scroll" || B.overflowY === "visible")) : (dt = Y < ut && (B.overflowX === "auto" || B.overflowX === "scroll"), G = V < Lt && (B.overflowY === "auto" || B.overflowY === "scroll"));
1962
- var It = dt && (Math.abs(O - r) <= a && Ht + Y < ut) - (Math.abs(N - r) <= a && !!Ht), J = G && (Math.abs($ - o) <= a && rt + V < Lt) - (Math.abs(m - o) <= a && !!rt);
1963
- if (!S[c])
1964
- for (var ct = 0; ct <= c; ct++)
1965
- S[ct] || (S[ct] = {});
1966
- (S[c].vx != It || S[c].vy != J || S[c].el !== f) && (S[c].el = f, S[c].vx = It, S[c].vy = J, clearInterval(S[c].pid), (It != 0 || J != 0) && (d = !0, S[c].pid = setInterval(function() {
1967
- n && this.layer === 0 && y.active._onTouchMove(ve);
1968
- var Mt = S[this.layer].vy ? S[this.layer].vy * s : 0, ot = S[this.layer].vx ? S[this.layer].vx * s : 0;
1969
- typeof u == "function" && u.call(y.dragged.parentNode[U], ot, Mt, i, ve, S[this.layer].el) !== "continue" || Fi(S[this.layer].el, ot, Mt);
1970
- }.bind({
1971
- layer: c
1972
- }), 24))), c++;
1973
- } while (t.bubbleScroll && p !== l && (p = lt(p, !1)));
1974
- ze = d;
1975
- }
1976
- }, 30), Gi = function(t) {
1977
- var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, a = t.dispatchSortableEvent, s = t.hideGhostForTarget, l = t.unhideGhostForTarget;
1813
+ var v = p, y = T(v), b = y.top, X = y.bottom, J = y.left, H = y.right, Y = y.width, I = y.height, ut = void 0, W = void 0, ct = v.scrollWidth, Dt = v.scrollHeight, V = f(v), Pt = v.scrollLeft, ot = v.scrollTop;
1814
+ v === a ? (ut = Y < ct && (V.overflowX === "auto" || V.overflowX === "scroll" || V.overflowX === "visible"), W = I < Dt && (V.overflowY === "auto" || V.overflowY === "scroll" || V.overflowY === "visible")) : (ut = Y < ct && (V.overflowX === "auto" || V.overflowX === "scroll"), W = I < Dt && (V.overflowY === "auto" || V.overflowY === "scroll"));
1815
+ var Ht = ut && (Math.abs(H - o) <= s && Pt + Y < ct) - (Math.abs(J - o) <= s && !!Pt), Q = W && (Math.abs(X - r) <= s && ot + I < Dt) - (Math.abs(b - r) <= s && !!ot);
1816
+ if (!S[u])
1817
+ for (var ht = 0; ht <= u; ht++)
1818
+ S[ht] || (S[ht] = {});
1819
+ (S[u].vx != Ht || S[u].vy != Q || S[u].el !== v) && (S[u].el = v, S[u].vx = Ht, S[u].vy = Q, clearInterval(S[u].pid), (Ht != 0 || Q != 0) && (d = !0, S[u].pid = setInterval((function() {
1820
+ i && this.layer === 0 && g.active._onTouchMove(pe);
1821
+ var Ot = S[this.layer].vy ? S[this.layer].vy * l : 0, rt = S[this.layer].vx ? S[this.layer].vx * l : 0;
1822
+ typeof h == "function" && h.call(g.dragged.parentNode[U], rt, Ot, n, pe, S[this.layer].el) !== "continue" || Ui(S[this.layer].el, rt, Ot);
1823
+ }).bind({
1824
+ layer: u
1825
+ }), 24))), u++;
1826
+ } while (t.bubbleScroll && p !== a && (p = dt(p, !1)));
1827
+ Ke = d;
1828
+ }
1829
+ }, 30), Wi = function(t) {
1830
+ var e = t.originalEvent, i = t.putSortable, o = t.dragEl, r = t.activeSortable, s = t.dispatchSortableEvent, l = t.hideGhostForTarget, a = t.unhideGhostForTarget;
1978
1831
  if (e) {
1979
- var d = n || o;
1980
- s();
1981
- var u = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, c = document.elementFromPoint(u.clientX, u.clientY);
1982
- l(), d && !d.el.contains(c) && (a("spill"), this.onSpill({
1983
- dragEl: r,
1984
- putSortable: n
1832
+ var d = i || r;
1833
+ l();
1834
+ var h = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, u = document.elementFromPoint(h.clientX, h.clientY);
1835
+ a(), d && !d.el.contains(u) && (s("spill"), this.onSpill({
1836
+ dragEl: o,
1837
+ putSortable: i
1985
1838
  }));
1986
1839
  }
1987
1840
  };
1988
- function We() {
1841
+ function oi() {
1989
1842
  }
1990
- We.prototype = {
1843
+ oi.prototype = {
1991
1844
  startIndex: null,
1992
1845
  dragStart: function(t) {
1993
1846
  var e = t.oldDraggableIndex;
1994
1847
  this.startIndex = e;
1995
1848
  },
1996
1849
  onSpill: function(t) {
1997
- var e = t.dragEl, n = t.putSortable;
1998
- this.sortable.captureAnimationState(), n && n.captureAnimationState();
1999
- var r = Tt(this.sortable.el, this.startIndex, this.options);
2000
- r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
1850
+ var e = t.dragEl, i = t.putSortable;
1851
+ this.sortable.captureAnimationState(), i && i.captureAnimationState();
1852
+ var o = Tt(this.sortable.el, this.startIndex, this.options);
1853
+ o ? this.sortable.el.insertBefore(e, o) : this.sortable.el.appendChild(e), this.sortable.animateAll(), i && i.animateAll();
2001
1854
  },
2002
- drop: Gi
1855
+ drop: Wi
2003
1856
  };
2004
- it(We, {
1857
+ it(oi, {
2005
1858
  pluginName: "revertOnSpill"
2006
1859
  });
2007
- function Ge() {
1860
+ function ri() {
2008
1861
  }
2009
- Ge.prototype = {
1862
+ ri.prototype = {
2010
1863
  onSpill: function(t) {
2011
- var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
2012
- r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
1864
+ var e = t.dragEl, i = t.putSortable, o = i || this.sortable;
1865
+ o.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), o.animateAll();
2013
1866
  },
2014
- drop: Gi
1867
+ drop: Wi
2015
1868
  };
2016
- it(Ge, {
1869
+ it(ri, {
2017
1870
  pluginName: "removeOnSpill"
2018
1871
  });
2019
- y.mount(new Rn());
2020
- y.mount(Ge, We);
2021
- const Zi = `
2022
- :host {
2023
- display: block;
2024
- overflow-y: auto;
2025
- height: 100%;
1872
+ g.mount(new Qn());
1873
+ g.mount(ri, oi);
1874
+ const to = (n, t, e) => {
1875
+ let i = [];
1876
+ n._sortable = g.create(n, {
1877
+ handle: ".drag-handle",
1878
+ filter: ".drag-handle.disabled",
1879
+ swapThreshold: 0.5,
1880
+ animation: 150,
1881
+ easing: "cubic-bezier(1, 0, 0, 1)",
1882
+ onStart: (o) => {
1883
+ const r = o.item;
1884
+ i = Array.prototype.slice.call(r.parentNode.childNodes), i = i.filter(
1885
+ (s) => s.nodeType != Node.ELEMENT_NODE || !s.classList.contains("sortable-fallback")
1886
+ );
1887
+ },
1888
+ onEnd: (o) => {
1889
+ const s = o.item.parentNode;
1890
+ for (const a of i)
1891
+ s.appendChild(a);
1892
+ if (o.oldIndex == o.newIndex)
1893
+ return;
1894
+ const l = t.getArray().find(
1895
+ (a) => (
1896
+ // @ts-ignore
1897
+ a.ol_uid === /** @type Element & {layer: import("ol/layer").Layer} */
1898
+ o.item.querySelector("eox-layercontrol-layer").layer.ol_uid
1899
+ )
1900
+ );
1901
+ t.remove(l), t.insertAt(t.getLength() - o.newIndex, l), e.requestUpdate();
1902
+ }
1903
+ });
1904
+ }, Je = (n, t, e) => {
1905
+ let i = [];
1906
+ const o = (r, s, l) => {
1907
+ i = [...i, ...r.filter((d) => d.get(s) === l)];
1908
+ const a = r.filter((d) => d.getLayers);
1909
+ return a.length > 0 && a.forEach(
1910
+ (d) => o(d.getLayers().getArray(), s, l)
1911
+ ), i;
1912
+ };
1913
+ return o(n, t, e), i;
1914
+ }, eo = (n, t) => {
1915
+ var e, i, o;
1916
+ if (!(!n || !t))
1917
+ return (
1918
+ /** @type {import("ol/layer").Group} */
1919
+ n.getLayers ? "group" : (o = (e = t.getInteractions().getArray().filter((r) => r.freehand_ !== void 0).map((r) => r.source_)) == null ? void 0 : e.ol_uid) != null && o.includes(
1920
+ // @ts-ignore
1921
+ n.getSource ? (i = n.getSource()) == null ? void 0 : i.ol_uid : void 0
1922
+ ) ? "draw" : (
1923
+ // @ts-ignore
1924
+ n.declutter_ !== void 0 ? "vector" : "raster"
1925
+ )
1926
+ );
1927
+ };
1928
+ /**
1929
+ * @license
1930
+ * Copyright 2020 Google LLC
1931
+ * SPDX-License-Identifier: BSD-3-Clause
1932
+ */
1933
+ const si = ei(class extends ii {
1934
+ constructor(n) {
1935
+ if (super(n), n.type !== mt.PROPERTY && n.type !== mt.ATTRIBUTE && n.type !== mt.BOOLEAN_ATTRIBUTE)
1936
+ throw Error("The `live` directive is not allowed on child or event bindings");
1937
+ if (!An(n))
1938
+ throw Error("`live` bindings can only contain a single expression");
1939
+ }
1940
+ render(n) {
1941
+ return n;
1942
+ }
1943
+ update(n, [t]) {
1944
+ if (t === q || t === A)
1945
+ return t;
1946
+ const e = n.element, i = n.name;
1947
+ if (n.type === mt.PROPERTY) {
1948
+ if (t === e[i])
1949
+ return q;
1950
+ } else if (n.type === mt.BOOLEAN_ATTRIBUTE) {
1951
+ if (!!t === e.hasAttribute(i))
1952
+ return q;
1953
+ } else if (n.type === mt.ATTRIBUTE && e.getAttribute(i) === t + "")
1954
+ return q;
1955
+ return ki(n), t;
1956
+ }
1957
+ });
1958
+ /**
1959
+ * @license
1960
+ * Copyright 2017 Google LLC
1961
+ * SPDX-License-Identifier: BSD-3-Clause
1962
+ */
1963
+ class Qe extends ii {
1964
+ constructor(t) {
1965
+ if (super(t), this.et = A, t.type !== mt.CHILD)
1966
+ throw Error(this.constructor.directiveName + "() can only be used in child bindings");
1967
+ }
1968
+ render(t) {
1969
+ if (t === A || t == null)
1970
+ return this.ft = void 0, this.et = t;
1971
+ if (t === q)
1972
+ return t;
1973
+ if (typeof t != "string")
1974
+ throw Error(this.constructor.directiveName + "() called with a non-string value");
1975
+ if (t === this.et)
1976
+ return this.ft;
1977
+ this.et = t;
1978
+ const e = [t];
1979
+ return e.raw = e, this.ft = { _$litType$: this.constructor.resultType, strings: e, values: [] };
1980
+ }
2026
1981
  }
2027
- .layer {
2028
- display: inline-flex;
2029
- justify-content: space-between;
1982
+ Qe.directiveName = "unsafeHTML", Qe.resultType = 1;
1983
+ const io = ei(Qe);
1984
+ /**
1985
+ * @license
1986
+ * Copyright 2021 Google LLC
1987
+ * SPDX-License-Identifier: BSD-3-Clause
1988
+ */
1989
+ function* se(n, t) {
1990
+ if (n !== void 0) {
1991
+ let e = 0;
1992
+ for (const i of n)
1993
+ yield t(i, e++);
1994
+ }
1995
+ }
1996
+ var fe, ge;
1997
+ class Zi extends z {
1998
+ constructor() {
1999
+ super();
2000
+ M(this, fe, "");
2001
+ M(this, ge, "");
2002
+ this.layer = null, this.unstyled = !1;
2003
+ }
2004
+ render() {
2005
+ var e;
2006
+ return _`
2007
+ <style>
2008
+ ${O(this, fe)}
2009
+ ${!this.unstyled && O(this, ge)}
2010
+ </style>
2011
+ <input
2012
+ type="range"
2013
+ min="0"
2014
+ max="1"
2015
+ step="0.01"
2016
+ value=${si((e = this.layer) == null ? void 0 : e.getOpacity())}
2017
+ @input=${(i) => this.layer.setOpacity(parseFloat(i.target.value))}
2018
+ />
2019
+ <button
2020
+ class="delete"
2021
+ @click=${() => {
2022
+ var i, o;
2023
+ (i = this.layer) == null || i.set("layerControlOptional", !0), (o = this.layer) == null || o.setVisible(!1), this.dispatchEvent(
2024
+ new CustomEvent("changed", { detail: this.layer, bubbles: !0 })
2025
+ );
2026
+ }}
2027
+ >
2028
+ x
2029
+ </button>
2030
+ `;
2031
+ }
2030
2032
  }
2031
- ul[data-group] {
2032
- padding-inline-start: 40px;
2033
+ fe = new WeakMap(), ge = new WeakMap(), L(Zi, "properties", {
2034
+ layer: { attribute: !1 },
2035
+ unstyled: { type: Boolean }
2036
+ });
2037
+ customElements.define(
2038
+ "eox-layercontrol-layerconfig",
2039
+ Zi
2040
+ );
2041
+ var me, ve;
2042
+ class Gi extends z {
2043
+ constructor() {
2044
+ super();
2045
+ M(this, me, `
2046
+ .tabbed figure {
2047
+ margin: 0;
2048
+ }
2049
+ .tabbed nav {
2050
+ display: flex;
2051
+ justify-content: space-between;
2052
+ }
2053
+ .tabbed nav div {
2054
+ display: flex;
2055
+ }
2056
+ .tabbed .tab {
2057
+ display: none;
2058
+ }
2059
+ .tabbed .tab.highlighted {
2060
+ display: block;
2061
+ }
2062
+ .tabbed label.highlighted {
2063
+ background: lightgrey;
2064
+ }
2065
+ `);
2066
+ M(this, ve, `
2067
+ .tabbed {
2068
+ font-size: small;
2069
+ }
2070
+ .tabbed label.highlighted {
2071
+ background: #00417011;
2072
+ }
2073
+ nav div label,
2074
+ nav div span {
2075
+ width: 20px;
2076
+ height: 20px;
2077
+ display: flex;
2078
+ align-items: center;
2079
+ justify-content: center;
2080
+ cursor: pointer;
2081
+ }
2082
+ figure {
2083
+ background: #00417011;
2084
+ border-top: 1px solid #0041701a;
2085
+ }
2086
+ `);
2087
+ this.actions = [], this.selectedTab = 0, this.tabs = [], this.unstyled = !1;
2088
+ }
2089
+ render() {
2090
+ return _`
2091
+ <style>
2092
+ ${O(this, me)}
2093
+ ${!this.unstyled && O(this, ve)}
2094
+ </style>
2095
+ <div class="tabbed">
2096
+ ${et(
2097
+ this.actions.length + this.tabs.length > 1,
2098
+ () => _`
2099
+ <nav>
2100
+ <div>
2101
+ ${se(
2102
+ this.tabs,
2103
+ (e, i) => _`
2104
+ <label
2105
+ class=${this.selectedTab === i && "highlighted"}
2106
+ @click=${() => this.selectedTab = i}
2107
+ >
2108
+ <slot name=${e + "-icon"}>${e}</slot>
2109
+ </label>
2110
+ `
2111
+ )}
2112
+ </div>
2113
+ <div>
2114
+ ${se(
2115
+ this.actions,
2116
+ (e) => _`
2117
+ <span>
2118
+ <slot name=${e + "-icon"}>${e}</slot>
2119
+ </span>
2120
+ `
2121
+ )}
2122
+ </div>
2123
+ </nav>
2124
+ `
2125
+ )}
2126
+ <figure>
2127
+ ${se(
2128
+ this.tabs,
2129
+ (e, i) => _`
2130
+ <div class="tab ${this.selectedTab === i && "highlighted"}">
2131
+ <slot name=${e + "-content"}>${e}</slot>
2132
+ </div>
2133
+ `
2134
+ )}
2135
+ </figure>
2136
+ </div>
2137
+ `;
2138
+ }
2033
2139
  }
2034
- `, Fn = `
2140
+ me = new WeakMap(), ve = new WeakMap(), L(Gi, "properties", {
2141
+ actions: { attribute: !1 },
2142
+ selectedTab: { state: !0 },
2143
+ tabs: { attribute: !1 },
2144
+ unstyled: { type: Boolean }
2145
+ });
2146
+ customElements.define("eox-layercontrol-tabs", Gi);
2147
+ const no = `
2035
2148
  button {
2036
2149
  /* TODO: why does this only work here and not from :root? */
2037
2150
  --primary-color: #004170;
@@ -2086,6 +2199,7 @@ button.icon {
2086
2199
  padding: 0;
2087
2200
  border-radius: 50%;
2088
2201
  width: 24px;
2202
+ text-indent: -9999px;
2089
2203
  }
2090
2204
 
2091
2205
  button.icon-text {
@@ -2114,7 +2228,58 @@ button.small {
2114
2228
  padding: 12.4px;
2115
2229
  font-size: .75rem;
2116
2230
  }
2117
- `, Un = `
2231
+ `, oo = `
2232
+ input[type=radio] {
2233
+ appearance: none;
2234
+ -webkit-appearance: none;
2235
+ margin: 0;
2236
+ cursor: pointer;
2237
+ display: flex;
2238
+ flex-direction: row;
2239
+ align-items: center;
2240
+ width: 24px;
2241
+ height: 24px;
2242
+ }
2243
+
2244
+ label span {
2245
+ font-size: small;
2246
+ }
2247
+
2248
+ input[type=radio]:after {
2249
+ display: block;
2250
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-blank%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z' /%3E%3C/svg%3E");
2251
+ width: 20px;
2252
+ height: 20px;
2253
+ margin-right: 4px;
2254
+ }
2255
+ input[type=radio]:checked:after {
2256
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
2257
+
2258
+ }
2259
+ `, Ki = `
2260
+ input[type=checkbox] {
2261
+ appearance: none;
2262
+ -webkit-appearance: none;
2263
+ margin: 0;
2264
+ cursor: pointer;
2265
+ display: flex;
2266
+ flex-direction: row;
2267
+ align-items: center;
2268
+ width: 24px;
2269
+ height: 24px;
2270
+ }
2271
+ input[type=checkbox]:after {
2272
+ display: block;
2273
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-blank-outline%3C/title%3E%3Cpath d='M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z' /%3E%3C/svg%3E");
2274
+ width: 20px;
2275
+ height: 20px;
2276
+ margin-right: 4px;
2277
+ }
2278
+ input[type=checkbox]:checked:after {
2279
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
2280
+
2281
+ }
2282
+ `, ro = `
2118
2283
  input[type="range"] {
2119
2284
  -webkit-appearance: none;
2120
2285
  width: 90%;
@@ -2191,779 +2356,654 @@ input[type="range"]:focus::-webkit-slider-thumb {
2191
2356
  input::-moz-focus-inner, input::-moz-focus-outer {
2192
2357
  border: 0;
2193
2358
  }
2194
- `, zn = `
2195
- input[type=radio] {
2196
- appearance: none;
2197
- -webkit-appearance: none;
2198
- margin: 0;
2199
- cursor: pointer;
2200
- display: flex;
2201
- flex-direction: row;
2202
- align-items: center;
2203
- width: 24px;
2204
- height: 24px;
2205
- }
2359
+ `;
2360
+ var ye, be;
2361
+ class Ji extends z {
2362
+ constructor() {
2363
+ super();
2364
+ /**
2365
+ *
2366
+ * @param {Array<string>} tools
2367
+ */
2368
+ L(this, "_parseActions", (e) => e == null ? void 0 : e.filter(
2369
+ (i) => ["remove", "sort"].filter(
2370
+ (o) => {
2371
+ var r;
2372
+ return (r = this.layer) != null && r.get("layerControlDisable") ? o !== "sort" : !0;
2373
+ }
2374
+ ).includes(i)
2375
+ ));
2376
+ /**
2377
+ *
2378
+ * @param {Array<string>} tools
2379
+ */
2380
+ L(this, "_parseTools", (e) => e == null ? void 0 : e.filter((i) => {
2381
+ var r;
2382
+ let o = !0;
2383
+ return ["remove", "sort"].includes(i) && (o = !1), i === "info" && (o = this.layer.get("description")), i === "config" && (o = (r = this.layer.style_) == null ? void 0 : r.color), o;
2384
+ }));
2385
+ L(this, "_removeButton", _`
2386
+ <button
2387
+ class="remove-icon icon"
2388
+ @click=${() => {
2389
+ var e, i;
2390
+ (e = this.layer) == null || e.set("layerControlOptional", !0), (i = this.layer) == null || i.setVisible(!1), this.dispatchEvent(
2391
+ new CustomEvent("changed", {
2392
+ detail: this.layer,
2393
+ bubbles: !0
2394
+ })
2395
+ );
2396
+ }}
2397
+ >
2398
+ x
2399
+ </button>
2400
+ `);
2401
+ L(this, "_sortButton", _`
2402
+ <button class="sort-icon icon drag-handle">sort</button>
2403
+ `);
2404
+ M(this, ye, "");
2405
+ M(this, be, `
2406
+ ${no}
2407
+ ${oo}
2408
+ ${Ki}
2409
+ ${ro}
2410
+ button.icon.drag-handle {
2411
+ cursor: n-resize;
2412
+ }
2413
+ .single-action-container,
2414
+ details.tools {
2415
+ position: relative;
2416
+ }
2417
+ eox-layercontrol-layer details summary::before {
2418
+ content: "";
2419
+ }
2420
+ details.tools[open] {
2421
+ /*border-top: 1px solid #0041703a;*/
2422
+ }
2423
+ .single-action {
2424
+ position: relative;
2425
+ }
2426
+ details.tools summary .icon {
2427
+ pointer-events: none;
2428
+ }
2429
+ .single-action,
2430
+ details.tools summary {
2431
+ position: absolute;
2432
+ right: 0;
2433
+ top: -24px;
2434
+ display: flex;
2435
+ border-radius: 4px;
2436
+ cursor: pointer;
2437
+ }
2438
+ .single-action .icon::before,
2439
+ details.tools summary .icon::before {
2440
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Edots-vertical%3C/title%3E%3Cpath d='M12,16A2,2 0 0,1 14,18A2,2 0 0,1 12,20A2,2 0 0,1 10,18A2,2 0 0,1 12,16M12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12A2,2 0 0,1 12,10M12,4A2,2 0 0,1 14,6A2,2 0 0,1 12,8A2,2 0 0,1 10,6A2,2 0 0,1 12,4Z' /%3E%3C/svg%3E");
2441
+ }
2442
+ .single-action,
2443
+ details.tools summary,
2444
+ eox-layercontrol-tabs button.icon {
2445
+ transition: opacity .2s;
2446
+ }
2447
+ .single-action,
2448
+ details.tools summary {
2449
+ opacity: .5;
2450
+ }
2451
+ eox-layercontrol-tabs button.icon {
2452
+ opacity: .7;
2453
+ }
2454
+ .single-action:hover,
2455
+ details.tools summary:hover,
2456
+ eox-layercontrol-tabs button.icon:hover {
2457
+ opacity: 1;
2458
+ }
2459
+ .tools-placeholder,
2460
+ .single-action .icon,
2461
+ .single-action .icon::before,
2462
+ details.tools summary .icon,
2463
+ details.tools summary .icon::before {
2464
+ height: 16px;
2465
+ width: 16px;
2466
+ }
2467
+ eox-layercontrol-tabs button.icon {
2468
+ display: flex;
2469
+ justify-content: center;
2470
+ }
2471
+ eox-layercontrol-tabs .icon::before {
2472
+ width: 16px;
2473
+ height: 16px;
2474
+ }
2475
+ details.tools summary .info-icon,
2476
+ button.icon[slot=info-icon]::before {
2477
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Einformation-outline%3C/title%3E%3Cpath d='M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z' /%3E%3C/svg%3E");
2478
+ }
2479
+ details.tools summary .opacity-icon,
2480
+ button.icon[slot=opacity-icon]::before {
2481
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eopacity%3C/title%3E%3Cpath d='M17.66,8L12,2.35L6.34,8C4.78,9.56 4,11.64 4,13.64C4,15.64 4.78,17.75 6.34,19.31C7.9,20.87 9.95,21.66 12,21.66C14.05,21.66 16.1,20.87 17.66,19.31C19.22,17.75 20,15.64 20,13.64C20,11.64 19.22,9.56 17.66,8M6,14C6,12 6.62,10.73 7.76,9.6L12,5.27L16.24,9.65C17.38,10.77 18,12 18,14H6Z' /%3E%3C/svg%3E");
2482
+ }
2483
+ details.tools summary .config-icon,
2484
+ button.icon[slot=config-icon]::before {
2485
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Etune%3C/title%3E%3Cpath d='M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z' /%3E%3C/svg%3E");
2486
+ }
2487
+ .single-action .remove-icon::before,
2488
+ [slot=remove-icon] button.icon::before {
2489
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23ff0000' viewBox='0 0 24 24'%3E%3Ctitle%3Edelete-outline%3C/title%3E%3Cpath d='M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z' /%3E%3C/svg%3E");
2490
+ }
2491
+ .single-action .sort-icon::before,
2492
+ [slot=sort-icon] button.icon::before {
2493
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag-horizontal-variant%3C/title%3E%3Cpath d='M21 11H3V9H21V11M21 13H3V15H21V13Z' /%3E%3C/svg%3E");
2494
+ }
2495
+ [slot=info-content],
2496
+ [slot=opacity-content] {
2497
+ padding: 12px 6px;
2498
+ }
2499
+ `);
2500
+ this.layer = null, this.tools = [], this.unstyled = !1;
2501
+ }
2502
+ createRenderRoot() {
2503
+ return this;
2504
+ }
2505
+ render() {
2506
+ var e, i;
2507
+ return _`
2508
+ <style>
2509
+ ${O(this, ye)}
2510
+ ${!this.unstyled && O(this, be)}
2511
+ </style>
2512
+ ${et(
2513
+ ((e = this._parseActions(this.tools)) == null ? void 0 : e.length) + ((i = this._parseTools(this.tools)) == null ? void 0 : i.length) > 0,
2514
+ () => {
2515
+ var o, r;
2516
+ return _`
2517
+ ${et(
2518
+ ((o = this._parseActions(this.tools)) == null ? void 0 : o.length) === 1 && ((r = this._parseTools(this.tools)) == null ? void 0 : r.length) === 0,
2519
+ () => _`
2520
+ <div class="single-action-container">
2521
+ <div class="single-action">
2522
+ ${// @ts-ignore
2523
+ this[`_${this._parseActions(this.tools)[0]}Button`]}
2524
+ </div>
2525
+ </div>
2526
+ `,
2527
+ () => {
2528
+ var s;
2529
+ return _`
2530
+ <details class="tools">
2531
+ <summary>
2532
+ <button
2533
+ class="icon ${this.tools.length === 1 ? `${this.tools[0]}-icon` : ""}"
2534
+ >
2535
+ Tools
2536
+ </button>
2537
+ </summary>
2538
+ <eox-layercontrol-tabs
2539
+ .actions=${this._parseActions(this.tools)}
2540
+ .tabs=${this._parseTools(this.tools)}
2541
+ .unstyled=${this.unstyled}
2542
+ >
2543
+ ${se(
2544
+ this._parseTools(this.tools),
2545
+ (l) => _`
2546
+ <button slot="${l}-icon" class="icon">${l}</button>
2547
+ `
2548
+ )}
2206
2549
 
2207
- label span {
2208
- font-size: small;
2209
- }
2210
-
2211
- input[type=radio]:after {
2212
- display: block;
2213
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-blank%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z' /%3E%3C/svg%3E");
2214
- width: 20px;
2215
- height: 20px;
2216
- margin-right: 4px;
2217
- }
2218
- input[type=radio]:checked:after {
2219
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Eradiobox-marked%3C/title%3E%3Cpath d='M12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7Z' /%3E%3C/svg%3E");
2220
-
2221
- }
2222
- `, jn = `
2223
- input[type=checkbox] {
2224
- appearance: none;
2225
- -webkit-appearance: none;
2226
- margin: 0;
2227
- cursor: pointer;
2228
- display: flex;
2229
- flex-direction: row;
2230
- align-items: center;
2231
- width: 24px;
2232
- height: 24px;
2233
- }
2234
- input[type=checkbox]:after {
2235
- display: block;
2236
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-blank-outline%3C/title%3E%3Cpath d='M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z' /%3E%3C/svg%3E");
2237
- width: 20px;
2238
- height: 20px;
2239
- margin-right: 4px;
2240
- }
2241
- input[type=checkbox]:checked:after {
2242
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckbox-marked%3C/title%3E%3Cpath d='M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z' /%3E%3C/svg%3E");
2243
-
2244
- }
2245
- `, qi = `
2246
- * {
2247
- font-family: Roboto, sans-serif;
2248
- }
2249
-
2250
- ${Fn}
2251
- ${Un}
2252
- ${zn}
2253
- ${jn}
2254
-
2255
- summary > .layer {
2256
- min-height: 36px;
2257
- display: flex;
2258
- align-items: flex-start;
2259
- padding-right: 12px;
2260
- padding-top: 0px;
2261
- }
2262
-
2263
- ul[data-group] {
2264
- overflow-y: auto;
2265
- }
2266
-
2267
- [data-type=group] .title {
2268
- display: flex;
2269
- align-items: flex-start;
2270
- font-style: italic;
2271
- line-height: 1.3rem;
2272
- }
2273
-
2274
- [data-type] .title span {
2275
- margin-bottom: 8px;
2276
- }
2277
-
2278
-
2279
- [data-type] .title::before {
2280
- width: 24px;
2281
- min-width: 24px;
2282
- height: 24px;
2283
- margin-right: 6px;
2284
- margin-left: -1px;
2285
- transform: translateY(-2px);
2286
- }
2287
-
2288
- [data-layerconfig] button {
2289
- margin-left: 64px;
2290
- margin-bottom: 21px;
2291
- margin-top: 9px;
2292
- }
2293
-
2294
- button.delete {
2295
- height: 24px;
2296
- width: 32px;
2297
- padding: 0;
2298
- display: flex;
2299
- justify-content: center;
2300
- font-size: 13px;
2301
- margin-left: 5%;
2302
- background: #fdd;
2303
- color: white;
2304
- }
2305
-
2306
- button.delete::before {
2307
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23a22' viewBox='0 0 24 24'%3E%3Ctitle%3Edelete-outline%3C/title%3E%3Cpath d='M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8,9H16V19H8V9M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z' /%3E%3C/svg%3E");
2308
- height: 20px;
2309
- width: 20px;
2310
- }
2311
-
2312
- label[for=optional] {
2313
- font-size: 21px;
2314
- font-weight: 400;
2315
- margin-bottom: 9px;
2316
- display: block;
2317
- }
2318
- select[name=optional] {
2319
- margin-right: 6px;
2320
- margin-bottom: 18px;
2321
- height: 36px;
2322
- }
2323
-
2324
- // Style adjacent button
2325
- select[name=optional] + button {
2326
- width: 20px;
2327
- }
2328
-
2329
- .slider-control + details {
2330
- margin-left: 60px;
2331
- }
2332
-
2333
- .slider-control + details summary {
2334
- color: #3B6289;
2335
- font-size: 14px;
2336
- display: flex;
2337
- flex-direction: row;
2338
- align-items: center;
2339
- font-weight: 500;
2340
- margin-bottom: 15px;
2341
- }
2342
-
2343
- .slider-control + details li {
2344
- display: flex;
2345
- height: 30px;
2346
- flex-direction: row;
2347
- align-items: center;
2348
- border-top: none;
2349
- }
2350
-
2351
- .slider-control + details li > div {
2352
- width: 124px;
2353
- }
2354
-
2355
- .slider-control + details summary::before {
2356
- display: block;
2357
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
2358
- font-size: 13px;
2359
- width: 24px;
2360
- height: 24px;
2361
- transform-origin: center;
2362
- }
2363
- .slider-control + details[open] > summary:before {
2364
- transform: rotate(90deg);
2365
- }
2366
-
2367
- [data-type=group] .title::before {
2368
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236889A0' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-outline%3C/title%3E%3Cpath d='M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z' /%3E%3C/svg%3E");
2369
- }
2370
-
2371
- li[data-type=raster] .title::before {
2372
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236889A0' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckerboard%3C/title%3E%3Cpath d='M2 2V22H22V2H2M20 12H16V16H20V20H16V16H12V20H8V16H4V12H8V8H4V4H8V8H12V4H16V8H20V12M16 8V12H12V8H16M12 12V16H8V12H12Z' /%3E%3C/svg%3E");
2373
- }
2374
-
2375
- li[data-type=vector] .title::before {
2376
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236889A0' viewBox='0 0 24 24'%3E%3Ctitle%3Eshape-outline%3C/title%3E%3Cpath d='M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z' /%3E%3C/svg%3E");
2377
- }
2378
-
2379
- li[data-type=draw] .title::before {
2380
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%236889A0' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
2381
- }
2382
-
2383
- [data-type]:not([data-type=group]) .title {
2384
- font-style: normal;
2385
- }
2386
-
2387
- details summary { list-style-type: none; } /* Firefox */
2388
- details summary::-webkit-details-marker { display: none; } /* Chrome */
2389
- details summary::marker { display: none; }
2390
-
2391
- .layers > ul > li {
2392
- background: #F1F5F900;
2393
- }
2394
-
2395
- summary {
2396
- position: relative;
2397
- }
2398
- summary details, summary li, summary ul {
2399
- width: 100%;
2400
- }
2401
-
2402
- input[type="text"] {
2403
- --search-padding-left: 32px;
2404
- width: calc(100% - var(--search-padding-left) - 4px);
2405
- height: 32px;
2406
- padding-left: var(--search-padding-left);
2407
- font-size: 15px;
2408
- }
2409
-
2410
- input[type="text"]::before {
2411
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Emagnify%3C/title%3E%3Cpath d='M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z' /%3E%3C/svg%3E");
2412
- }
2413
-
2414
- ul {
2415
- padding: 0;
2416
- background: #D7E2EE;
2417
- background: #CFDDEB00;
2418
- }
2419
- li {
2420
- list-style: none;
2421
- cursor: pointer;
2422
- background: #CFDDEB00;
2423
- border-top: 1px solid #00417033;
2424
- }
2425
- li summary {
2426
- display: flex;
2427
- }
2428
-
2429
- .slider-control {
2430
- display: flex;
2431
- flex-direction: row;
2432
- align-items: center;
2433
- margin-top: 9px;
2434
- margin-left: 64px;
2435
- margin-bottom: 12px;
2436
- }
2437
-
2438
- .slider-control input[type=range] {
2439
- max-width: 120px;
2440
- }
2441
-
2442
- .slider-control .slider-property {
2443
- width: 80px;
2444
- color: #3B6289;
2445
- font-size: 14px;
2446
- }
2447
-
2448
- .slider-control > * {
2449
- text-transform: capitalize;
2450
- }
2451
-
2452
- /* Expansible Section Chevron */
2453
- li summary:before {
2454
- content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
2455
- font-size: 13px;
2456
- width: 24px;
2457
- height: 24px;
2458
- margin-right: 6px;
2459
- margin-left: -1px;
2460
-
2461
- margin-top: 5px;
2462
- }
2463
- li details[open] > summary:before {
2464
- transform: rotate(90deg);
2465
- }
2466
- li[data-layerconfig=false]:not([data-type=group]) summary:before {
2467
- display: none;
2468
- }
2469
- li .layer {
2470
- width: 100%;
2471
- }
2472
- li .layer .left,
2473
- li .layer .right {
2474
- display: flex;
2475
- align-items: flex-start;
2476
- }
2477
- li .layer .left .title {
2478
- cursor: pointer;
2479
- display: flex;
2480
- margin-left: 6px;
2481
- }
2482
- li .layer .left {
2483
- margin-top: 7px;
2484
- }
2485
- li .layer .right {
2486
- margin-top: 5px;
2487
- }
2488
- .drag-handle span {
2489
- display: none;
2490
- }
2491
- .drag-handle {
2492
- cursor: ns-resize;
2493
- background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag%3C/title%3E%3Cpath fill='%23004170' d='M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z' /%3E%3C/svg%3E");
2494
- width: 24px;
2495
- height: 24px;
2496
- }
2497
- .drag-handle.disabled {
2498
- cursor: not-allowed;
2499
- opacity: 0.3;
2500
- }
2501
- li.sortable-chosen {
2502
- background: #eeea;
2503
- }
2504
- li.sortable-drag {
2505
- opacity: 0;
2506
- }
2507
- li.sortable-ghost {
2550
+ <div slot="info-content">
2551
+ ${io(this.layer.get("description"))}
2552
+ </div>
2553
+ <div slot="opacity-content">
2554
+ <input
2555
+ type="range"
2556
+ min="0"
2557
+ max="1"
2558
+ step="0.01"
2559
+ value=${si((s = this.layer) == null ? void 0 : s.getOpacity())}
2560
+ @input=${(l) => this.layer.setOpacity(parseFloat(l.target.value))}
2561
+ />
2562
+ </div>
2563
+ <div slot="config-content"></div>
2564
+ <!--<eox-layercontrol-layerconfig
2565
+ slot="config-content"
2566
+ .layer=${this.layer}
2567
+ .unstyled=${this.unstyled}
2568
+ @changed=${() => this.requestUpdate()}
2569
+ ></eox-layercontrol-layerconfig>-->
2570
+ <div slot="remove-icon">${this._removeButton}</div>
2571
+ <div slot="sort-icon">${this._sortButton}</div>
2572
+ </eox-layercontrol-tabs>
2573
+ </details>
2574
+ `;
2575
+ }
2576
+ )}
2577
+ `;
2578
+ }
2579
+ )}
2580
+ `;
2581
+ }
2508
2582
  }
2509
- `;
2510
- var Yn = Object.defineProperty, Xn = Object.getOwnPropertyDescriptor, D = (i, t, e, n) => {
2511
- for (var r = n > 1 ? void 0 : n ? Xn(t, e) : t, o = i.length - 1, a; o >= 0; o--)
2512
- (a = i[o]) && (r = (n ? a(t, e, r) : a(r)) || r);
2513
- return n && r && Yn(t, e, r), r;
2514
- };
2515
- let j = class extends $t {
2583
+ ye = new WeakMap(), be = new WeakMap(), L(Ji, "properties", {
2584
+ layer: { attribute: !1 },
2585
+ tools: { attribute: !1 },
2586
+ unstyled: { type: Boolean }
2587
+ });
2588
+ customElements.define(
2589
+ "eox-layercontrol-layer-tools",
2590
+ Ji
2591
+ );
2592
+ var Ee, we;
2593
+ class Qi extends z {
2516
2594
  constructor() {
2517
- super(...arguments), this.for = "eox-map", this.layerIdentifier = "id", this.layerTitle = "title", this.sortBy = "layerOrder", this.layerConfig = ["opacity"], this.externalLayerConfig = void 0, this.filterLayers = (i, t, e) => {
2518
- let n = [];
2519
- const r = (o, a, s) => {
2520
- n = [...n, ...o.filter((d) => d.get(a) === s)];
2521
- const l = o.filter((d) => d.getLayers);
2522
- return l.length > 0 && l.forEach(
2523
- (d) => r(d.getLayers().getArray(), a, s)
2524
- ), n;
2525
- };
2526
- return r(i, t, e), n;
2527
- }, this.findLayerById = (i, t) => this.filterLayers(i, "id", t)[0], this.getLayerType = (i, t) => {
2528
- var e;
2529
- return i.getLayers ? "group" : t.getInteractions().getArray().filter(
2530
- (n) => n.freehand_ !== void 0
2531
- ).map(
2532
- (n) => {
2533
- var r;
2534
- return (r = n.source_) == null ? void 0 : r.ol_uid;
2535
- }
2536
- ).includes(
2537
- i.getSource ? (e = i.getSource()) == null ? void 0 : e.ol_uid : void 0
2538
- ) ? "draw" : i.declutter_ !== void 0 ? "vector" : "raster";
2539
- };
2595
+ super();
2596
+ M(this, Ee, "");
2597
+ M(this, we, `
2598
+ ${Ki}
2599
+ eox-layercontrol-layer {
2600
+ width: 100%;
2601
+ }
2602
+ .layer {
2603
+ width: 100%;
2604
+ align-items: center;
2605
+ justify-content: space-between;
2606
+ padding: 4px 0;
2607
+ }
2608
+ label, span {
2609
+ display: flex;
2610
+ align-items: center;
2611
+ cursor: pointer;
2612
+ }
2613
+ [data-type] .title::before {
2614
+ width: 20px;
2615
+ min-width: 20px;
2616
+ height: 20px;
2617
+ margin-right: 6px;
2618
+ }
2619
+ [data-type=group] .title::before {
2620
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-outline%3C/title%3E%3Cpath d='M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z' /%3E%3C/svg%3E");
2621
+ }
2622
+ [data-type=group] > eox-layercontrol-layer-group > details[open] > summary > eox-layercontrol-layer > .layer > label > .title::before {
2623
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Efolder-open-outline%3C/title%3E%3Cpath d='M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z' /%3E%3C/svg%3E");
2624
+ }
2625
+ [data-type=raster] .title::before {
2626
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Echeckerboard%3C/title%3E%3Cpath d='M2 2V22H22V2H2M20 12H16V16H20V20H16V16H12V20H8V16H4V12H8V8H4V4H8V8H12V4H16V8H20V12M16 8V12H12V8H16M12 12V16H8V12H12Z' /%3E%3C/svg%3E");
2627
+ }
2628
+ [data-type=vector] .title::before {
2629
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Eshape-outline%3C/title%3E%3Cpath d='M11,13.5V21.5H3V13.5H11M9,15.5H5V19.5H9V15.5M12,2L17.5,11H6.5L12,2M12,5.86L10.08,9H13.92L12,5.86M17.5,13C20,13 22,15 22,17.5C22,20 20,22 17.5,22C15,22 13,20 13,17.5C13,15 15,13 17.5,13M17.5,15A2.5,2.5 0 0,0 15,17.5A2.5,2.5 0 0,0 17.5,20A2.5,2.5 0 0,0 20,17.5A2.5,2.5 0 0,0 17.5,15Z' /%3E%3C/svg%3E");
2630
+ }
2631
+ [data-type=draw] .title::before {
2632
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%230041703a' viewBox='0 0 24 24'%3E%3Ctitle%3Evector-square-edit%3C/title%3E%3Cpath d='M22.7 14.4L21.7 15.4L19.6 13.3L20.6 12.3C20.8 12.1 21.2 12.1 21.4 12.3L22.7 13.6C22.9 13.8 22.9 14.1 22.7 14.4M13 19.9L19.1 13.8L21.2 15.9L15.1 22H13V19.9M11 19.9V19.1L11.6 18.5L12.1 18H8V16H6V8H8V6H16V8H18V12.1L19.1 11L19.3 10.8C19.5 10.6 19.8 10.4 20.1 10.3V8H22.1V2H16.1V4H8V2H2V8H4V16H2V22H8V20L11 19.9M18 4H20V6H18V4M4 4H6V6H4V4M6 20H4V18H6V20Z' /%3E%3C/svg%3E");
2633
+ }
2634
+ `);
2635
+ this.layer = null, this.titleProperty = "title", this.tools = [], this.unstyled = !1;
2540
2636
  }
2541
- _updateControl(i) {
2542
- const t = (e, n) => {
2543
- e.forEach((r) => {
2544
- n && r.set("_group_id", n), r.get(this.layerIdentifier) || r.set(this.layerIdentifier, r.ol_uid), r.get(this.layerTitle) || r.set(this.layerTitle, `layer ${r.ol_uid}`), r.getLayers && t(
2545
- r.getLayers().getArray(),
2546
- r.get("id") || r.ol_uid
2547
- );
2548
- });
2549
- };
2550
- t(i.getArray()), this.layerCollection = i, this.optionalLayerArray = this.filterLayers(
2551
- i.getArray(),
2552
- "layerControlOptional",
2553
- !0
2554
- );
2637
+ createRenderRoot() {
2638
+ return this;
2555
2639
  }
2556
- _emitLayerconfig(i) {
2557
- const t = {
2558
- detail: {
2559
- layer: i
2560
- },
2561
- bubbles: !0,
2562
- composed: !0
2563
- };
2564
- this.dispatchEvent(new CustomEvent("layerconfig", t));
2640
+ render() {
2641
+ return _`
2642
+ <style>
2643
+ ${O(this, Ee)}
2644
+ ${!this.unstyled && O(this, we)}
2645
+ </style>
2646
+ ${et(
2647
+ this.layer,
2648
+ () => {
2649
+ var e;
2650
+ return _`
2651
+ <div class="layer ${this.layer.getVisible() ? "visible" : ""}">
2652
+ <label
2653
+ class="${this.layer.get("layerControlDisable") ? "disabled" : ""}"
2654
+ >
2655
+ <input
2656
+ type=${this.layer.get("layerControlExclusive") ? "radio" : "checkbox"}
2657
+ .checked=${si(this.layer.getVisible())}
2658
+ @click=${(i) => {
2659
+ this.layer.setVisible(i.target.checked), i.target.checked && this.layer.get("layerControlExclusive") && this.parentNode.parentNode.querySelectorAll(
2660
+ "li > eox-layercontrol-layer"
2661
+ ).forEach((r) => {
2662
+ var s;
2663
+ r.layer !== this.layer && ((s = r.layer) != null && s.get("layerControlExclusive")) && (r.layer.setVisible(!1), r.requestUpdate());
2664
+ }), this.dispatchEvent(
2665
+ new CustomEvent("changed", { bubbles: !0 })
2666
+ ), this.requestUpdate();
2667
+ }}
2668
+ />
2669
+ <span class="title">${this.layer.get(this.titleProperty)}</span>
2670
+ ${et(
2671
+ ((e = this.tools) == null ? void 0 : e.length) > 0,
2672
+ () => _`<span class="tools-placeholder"></span>`
2673
+ )}
2674
+ </label>
2675
+ </div>
2676
+ <eox-layercontrol-layer-tools
2677
+ .layer=${this.layer}
2678
+ .tools=${this.tools}
2679
+ .unstyled=${this.unstyled}
2680
+ ></eox-layercontrol-layer-tools>
2681
+ `;
2682
+ }
2683
+ )}
2684
+ `;
2565
2685
  }
2566
- changeOpacity(i, t) {
2567
- i.setOpacity(t);
2686
+ }
2687
+ Ee = new WeakMap(), we = new WeakMap(), L(Qi, "properties", {
2688
+ layer: { attribute: !1 },
2689
+ titleProperty: { attribute: "title-property", type: String },
2690
+ tools: { attribute: !1 },
2691
+ unstyled: { type: Boolean }
2692
+ });
2693
+ customElements.define("eox-layercontrol-layer", Qi);
2694
+ var _e, $e;
2695
+ class tn extends z {
2696
+ constructor() {
2697
+ super();
2698
+ M(this, _e, "");
2699
+ M(this, $e, `
2700
+ details summary {
2701
+ cursor: pointer;
2702
+ display: flex;
2703
+ }
2704
+ details summary { list-style-type: none; } /* Firefox */
2705
+ details summary::-webkit-details-marker { display: none; } /* Chrome */
2706
+ details summary::marker { display: none; }
2707
+ details summary::before {
2708
+ display: block;
2709
+ content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23004170' viewBox='0 0 24 24'%3E%3Ctitle%3Echevron-right%3C/title%3E%3Cpath d='M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z' /%3E%3C/svg%3E");
2710
+ font-size: 13px;
2711
+ width: 24px;
2712
+ height: 24px;
2713
+ margin: 4px 0;
2714
+ transform-origin: center;
2715
+ transition: transform 0.1s ease-in-out;
2716
+ }
2717
+ details[open] > summary:before {
2718
+ transform: rotate(90deg);
2719
+ }
2720
+ `);
2721
+ this.group = null, this.idProperty = "id", this.map = null, this.titleProperty = "title", this.tools = [], this.unstyled = !1;
2568
2722
  }
2569
- changeStyleProperty(i, t, e) {
2570
- i.updateStyleVariables({
2571
- ...i.style_,
2572
- [t]: e
2573
- });
2723
+ createRenderRoot() {
2724
+ return this;
2574
2725
  }
2575
- preFilterLayers(i) {
2576
- return [...i].filter(
2577
- (t) => t.get("layerControlHide") !== !0 && t.get("layerControlOptional") !== !0
2578
- );
2726
+ render() {
2727
+ return _`
2728
+ <style>
2729
+ ${O(this, _e)}
2730
+ ${!this.unstyled && O(this, $e)}
2731
+ </style>
2732
+ ${et(
2733
+ this.group,
2734
+ () => _`
2735
+ <details open=${this.group.get("layerControlExpand") || A}>
2736
+ <summary>
2737
+ <eox-layercontrol-layer
2738
+ .layer=${this.group}
2739
+ .titleProperty=${this.titleProperty}
2740
+ .tools=${this.tools}
2741
+ .unstyled=${this.unstyled}
2742
+ @changed=${() => this.requestUpdate()}
2743
+ ></eox-layercontrol-layer>
2744
+ </summary>
2745
+ <eox-layercontrol-layer-list
2746
+ .idProperty=${this.idProperty}
2747
+ .layers=${this.group.getLayers()}
2748
+ .map=${this.map}
2749
+ .titleProperty=${this.titleProperty}
2750
+ .tools=${this.tools}
2751
+ .unstyled=${this.unstyled}
2752
+ @changed=${() => this.requestUpdate()}
2753
+ ></eox-layercontrol-layer-list>
2754
+ </details>
2755
+ `
2756
+ )}
2757
+ `;
2579
2758
  }
2580
- toggleLayerVisibility(i, t) {
2581
- if (i.setVisible(!i.getVisible()), i.get("layerControlExclusive")) {
2582
- let e = [];
2583
- t ? e = this.findLayerById(
2584
- this.layerCollection.getArray(),
2585
- t
2586
- ).getLayers().getArray().filter(
2587
- (r) => r.get(this.layerIdentifier) !== i.get(this.layerIdentifier) && r.get("layerControlExclusive")
2588
- ) : e = this.layerCollection.getArray().filter(
2589
- (n) => n.get(this.layerIdentifier) !== i.get(this.layerIdentifier) && n.get("layerControlExclusive")
2590
- ), e.forEach((n) => {
2591
- n.setVisible(!1);
2592
- }), this.requestUpdate();
2759
+ }
2760
+ _e = new WeakMap(), $e = new WeakMap(), L(tn, "properties", {
2761
+ group: { attribute: !1 },
2762
+ idProperty: { attribute: "id-property" },
2763
+ map: { attribute: !1, state: !0 },
2764
+ titleProperty: { attribute: "title-property", type: String },
2765
+ tools: { attribute: !1 },
2766
+ unstyled: { type: Boolean }
2767
+ });
2768
+ customElements.define(
2769
+ "eox-layercontrol-layer-group",
2770
+ tn
2771
+ );
2772
+ var xe, Ae;
2773
+ class en extends z {
2774
+ constructor() {
2775
+ super();
2776
+ M(this, xe, "");
2777
+ M(this, Ae, `
2778
+ ul {
2779
+ padding: 0;
2593
2780
  }
2781
+ ul ul {
2782
+ padding-left: 48px;
2783
+ }
2784
+ li {
2785
+ list-style: none;
2786
+ }
2787
+ li {
2788
+ border-bottom: 1px solid #0041703a;
2789
+ }
2790
+ li:first-child {
2791
+ border-top: 1px solid #0041703a;
2792
+ }
2793
+ li:last-child {
2794
+ border: none;
2795
+ }
2796
+ li.sortable-chosen {
2797
+ background: #eeea;
2798
+ }
2799
+ li.sortable-drag {
2800
+ opacity: 0;
2801
+ }
2802
+ li.sortable-ghost {
2803
+ }
2804
+ `);
2805
+ this.idProperty = "id", this.layers = null, this.map = null, this.tools = void 0, this.titleProperty = "title", this.unstyled = !1;
2806
+ }
2807
+ updated() {
2808
+ this.layers && (this.layers.on("change:length", () => {
2809
+ this.requestUpdate(), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 }));
2810
+ }), to(this.renderRoot.querySelector("ul"), this.layers, this));
2811
+ }
2812
+ createRenderRoot() {
2813
+ return this;
2594
2814
  }
2595
2815
  render() {
2596
- var a;
2597
- const i = document.querySelector(this.for);
2598
- if (i && (i.map ? this.olMap = i.map : this.olMap = i), !this.olMap)
2599
- return w;
2600
- const t = this.olMap.getLayers();
2601
- this._updateControl(t);
2602
- const e = (s) => {
2603
- s.on("change:length", () => {
2604
- this._currentlySorting || setTimeout(() => {
2605
- this._updateControl(s);
2606
- });
2607
- });
2608
- };
2609
- e(t);
2610
- const n = (s) => {
2611
- s.getArray().forEach((l) => {
2612
- if (l.getLayers) {
2613
- const d = l.getLayers();
2614
- e(d), n(d);
2615
- }
2616
- });
2617
- };
2618
- n(t);
2619
- const r = (s, l, d) => {
2620
- var u;
2621
- return H`
2622
- <details open="${s.get("layerControlExpand") ? !0 : w}">
2623
- <summary>
2624
- <div class="layer">
2625
- <div class="left">
2626
- <input
2627
- type="${s.get("layerControlExclusive") ? "radio" : "checkbox"}"
2628
- .checked="${Be(s.getVisible())}"
2629
- @click=${() => {
2630
- this.toggleLayerVisibility(s, l);
2631
- }}
2632
- />
2633
- <span class="title"
2634
- ><span
2635
- >${s.get(this.layerTitle) || `${s.get(this.layerIdentifier)}`}</span
2636
- >
2637
- </span>
2638
- </div>
2639
- <div class="right">
2640
- ${this.sortBy === "layerOrder" && !this.unstyled ? H` <div
2641
- class="drag-handle ${s.get("layerControlDisable") ? "disabled" : ""}"
2642
- >
2643
- <span>=</span>
2644
- </div>` : w}
2645
- </div>
2646
- </div>
2647
- </summary>
2648
- ${this.layerConfig ? H`
2649
- <eox-layerconfig
2650
- .layerConfig="${this.layerConfig}"
2651
- .layerControl="${this}"
2652
- .layer=${s}
2653
- .external=${this.externalLayerConfig}
2654
- .unstyled="${this.unstyled}"
2655
- @removeLayer=${() => {
2656
- var p;
2657
- ((p = this.optionalLayerArray) == null ? void 0 : p.length) > 0 ? (s.set("layerControlOptional", !0), s.setVisible(!1), this.requestUpdate()) : d.remove(s);
2658
- const c = this.renderRoot.querySelector(
2659
- `[data-layer='${s.get(this.layerIdentifier)}'`
2660
- );
2661
- c.parentNode.removeChild(c);
2662
- }}
2663
- ></eox-layerconfig>
2664
- ` : w}
2665
- ${this.externalLayerConfig && ((u = s.style_) != null && u.color) ? H`
2666
- <button @click=${() => this._emitLayerconfig(s)}>
2667
- configure
2668
- </button>
2669
- ` : w}
2670
- ${s.getLayers ? H`
2671
- ${o(
2672
- this.preFilterLayers(
2673
- [
2674
- ...s.getLayers().getArray()
2675
- ].reverse()
2676
- ),
2677
- s.get(this.layerIdentifier),
2678
- s.getLayers()
2816
+ return _`
2817
+ <style>
2818
+ ${O(this, xe)}
2819
+ ${!this.unstyled && O(this, Ae)}
2820
+ </style>
2821
+ <ul>
2822
+ ${et(
2823
+ this.layers,
2824
+ () => _`
2825
+ ${this.layers.getArray().filter(
2826
+ (e) => !e.get("layerControlHide") && !e.get("layerControlOptional")
2827
+ ).reverse().map(
2828
+ (e) => Sn(
2829
+ e.get(this.idProperty),
2830
+ _`
2831
+ <li
2832
+ data-layer="${e.get(this.idProperty)}"
2833
+ data-type="${eo(e, this.map)}"
2834
+ >
2835
+ ${/** @type {import("ol/layer").Group} */
2836
+ e.getLayers ? _`
2837
+ <eox-layercontrol-layer-group
2838
+ .group=${e}
2839
+ .idProperty=${this.idProperty}
2840
+ .map=${this.map}
2841
+ .titleProperty=${this.titleProperty}
2842
+ .tools=${this.tools}
2843
+ .unstyled=${this.unstyled}
2844
+ @changed=${() => this.requestUpdate()}
2845
+ >
2846
+ </eox-layercontrol-layer-group>
2847
+ ` : _`
2848
+ <eox-layercontrol-layer
2849
+ .layer=${e}
2850
+ .titleProperty=${this.titleProperty}
2851
+ .tools=${this.tools}
2852
+ .unstyled=${this.unstyled}
2853
+ @changed=${() => {
2854
+ this.requestUpdate();
2855
+ }}
2856
+ ></eox-layercontrol-layer>
2857
+ `}
2858
+ </li>
2859
+ `
2860
+ )
2679
2861
  )}
2680
- ` : w}
2681
- </details>
2682
- `;
2683
- }, o = (s, l, d) => H`
2684
- <ul data-group="${l ?? w}">
2685
- ${Ve(
2686
- s,
2687
- (u) => u.get(this.layerIdentifier),
2688
- (u) => {
2689
- var c;
2690
- return H`
2691
- <li
2692
- data-layer="${u.get(this.layerIdentifier)}"
2693
- data-disabled="${u.get("layerControlDisable") || w}"
2694
- data-type="${this.getLayerType(u, this.olMap)}"
2695
- data-layerconfig="${((c = this.layerConfig) == null ? void 0 : c.length) > 0}"
2696
- >
2697
- ${r(u, l, d)}
2698
- </li>
2699
- `;
2700
- }
2862
+ `
2701
2863
  )}
2702
2864
  </ul>
2703
2865
  `;
2704
- return H`
2705
- <style>
2706
- ${Zi}
2707
- ${!this.unstyled && qi}
2708
- </style>
2709
- <div>
2710
- <slot></slot>
2711
- ${this.layerCollection.getArray().length > 10 ? H`<input type="text" placeholder="Find layer" />` : w}
2712
- <div class="layers">
2713
- ${o(
2714
- this.preFilterLayers(t.getArray()),
2715
- null,
2716
- this.layerCollection
2717
- )}
2718
- </div>
2719
- ${Pi(
2720
- ((a = this.optionalLayerArray) == null ? void 0 : a.length) > 0,
2721
- () => H`
2722
- <label for="optional">Optional layers</label>
2866
+ }
2867
+ }
2868
+ xe = new WeakMap(), Ae = new WeakMap(), L(en, "properties", {
2869
+ idProperty: { attribute: "id-property" },
2870
+ layers: { attribute: !1 },
2871
+ map: { attribute: !1, state: !0 },
2872
+ titleProperty: { attribute: "title-property", type: String },
2873
+ tools: { attribute: !1 },
2874
+ unstyled: { type: Boolean }
2875
+ });
2876
+ customElements.define("eox-layercontrol-layer-list", en);
2877
+ class nn extends z {
2878
+ constructor() {
2879
+ super(), this.idProperty = "id", this.layers = null, this.titleProperty = "title", this.unstyled = !1;
2880
+ }
2881
+ createRenderRoot() {
2882
+ return this;
2883
+ }
2884
+ render() {
2885
+ return _`
2886
+ <label for="optional">Optional layers</label>
2723
2887
 
2724
- <select name="optional" data-cy="optionalLayers">
2725
- <option disabled selected value>
2726
- -- select an optional layer to add --
2727
- </option>
2728
- ${this.optionalLayerArray.map(
2729
- (s) => H`
2730
- <option value="${s.get(this.layerIdentifier)}">
2731
- ${s.get(this.layerTitle) || `layer ${s.get(this.layerIdentifier)}`}
2732
- </option>
2733
- `
2734
- )}
2735
- </select>
2736
- <button
2737
- @click="${() => {
2738
- const s = this.optionalLayerArray.find(
2739
- (l) => l.get(this.layerIdentifier) === this.shadowRoot.querySelector("select[name=optional]").value
2740
- );
2741
- if (s.get("_group_id")) {
2742
- const l = this.findLayerById(
2743
- this.layerCollection.getArray(),
2744
- s.get("_group_id")
2745
- );
2746
- l.getLayers().remove(s), l.getLayers().insertAt(l.getLayers().getLength(), s);
2747
- } else
2748
- this.layerCollection.remove(s), this.layerCollection.insertAt(
2749
- this.layerCollection.getLength(),
2750
- s
2751
- );
2752
- s.set("layerControlOptional", !1), s.setVisible(!0);
2753
- }}"
2888
+ <select name="optional" data-cy="optionalLayers">
2889
+ <option disabled selected value>
2890
+ -- select an optional layer to add --
2891
+ </option>
2892
+ ${Je(
2893
+ this.layers.getArray(),
2894
+ "layerControlOptional",
2895
+ !0
2896
+ ).map(
2897
+ (t) => _`
2898
+ <option
2899
+ value="${// @ts-ignore
2900
+ t.get(this.idProperty) || t.ol_uid}"
2754
2901
  >
2755
- add
2756
- </button>
2902
+ ${t.get(this.titleProperty) || `layer ${t.get(this.idProperty)}`}
2903
+ </option>
2757
2904
  `
2758
2905
  )}
2759
- </div>
2906
+ </select>
2907
+ <button
2908
+ @click="${() => {
2909
+ const t = Je(
2910
+ this.layers.getArray(),
2911
+ "layerControlOptional",
2912
+ !0
2913
+ ).find((e) => (
2914
+ // @ts-ignore
2915
+ (e.get(this.idProperty) || e.ol_uid) === /** @type HTMLInputElement*/
2916
+ this.querySelector("select[name=optional]").value
2917
+ ));
2918
+ t == null || t.set("layerControlOptional", !1), t == null || t.setVisible(!0), this.dispatchEvent(new CustomEvent("changed", { bubbles: !0 })), this.renderRoot.parentNode.querySelectorAll("eox-layercontrol-layer-list").forEach(
2919
+ (e) => (
2920
+ /** @type {import("lit").LitElement} */
2921
+ e.requestUpdate()
2922
+ )
2923
+ ), this.requestUpdate();
2924
+ }}"
2925
+ >
2926
+ add
2927
+ </button>
2760
2928
  `;
2761
2929
  }
2762
- updated() {
2763
- this.sortBy == "layerOrder" && this.renderRoot.querySelectorAll("ul").forEach((t) => {
2764
- const e = t.dataset.group;
2765
- y.create(t, {
2766
- handle: this.unstyled ? "summary" : ".drag-handle",
2767
- dataIdAttr: "data-layer",
2768
- filter: ".drag-handle.disabled",
2769
- swapThreshold: 0.5,
2770
- animation: 150,
2771
- easing: "cubic-bezier(1, 0, 0, 1)",
2772
- store: {
2773
- get: () => {
2774
- if (e) {
2775
- const n = this.findLayerById(
2776
- this.layerCollection.getArray(),
2777
- e
2778
- );
2779
- return n ? [
2780
- ...n.getLayers().getArray().map((o) => o.get(this.layerIdentifier))
2781
- ].reverse() : void 0;
2782
- } else
2783
- return [
2784
- ...this.layerCollection.getArray().map((n) => n.get(this.layerIdentifier))
2785
- ].reverse();
2786
- },
2787
- set: (n) => {
2788
- n.toArray().reverse().forEach((o, a) => {
2789
- if (e) {
2790
- const s = this.findLayerById(
2791
- this.layerCollection.getArray(),
2792
- e
2793
- );
2794
- if (!s)
2795
- return;
2796
- const l = s.getLayers(), d = this.findLayerById(
2797
- l.getArray(),
2798
- o
2799
- );
2800
- l.remove(d), l.insertAt(a, d);
2801
- } else {
2802
- const s = this.findLayerById(
2803
- this.layerCollection.getArray(),
2804
- o
2805
- );
2806
- this.layerCollection.remove(s), this.layerCollection.insertAt(a, s);
2807
- }
2808
- });
2809
- }
2810
- },
2811
- onMove: (n) => !n.related.dataset.disabled
2812
- });
2813
- });
2814
- }
2815
- };
2816
- D([
2817
- qt()
2818
- ], j.prototype, "olMap", 2);
2819
- D([
2820
- qt()
2821
- ], j.prototype, "layerCollection", 2);
2822
- D([
2823
- qt()
2824
- ], j.prototype, "optionalLayerArray", 2);
2825
- D([
2826
- k()
2827
- ], j.prototype, "for", 2);
2828
- D([
2829
- k()
2830
- ], j.prototype, "layerIdentifier", 2);
2831
- D([
2832
- k()
2833
- ], j.prototype, "layerTitle", 2);
2834
- D([
2835
- k()
2836
- ], j.prototype, "sortBy", 2);
2837
- D([
2838
- k({ type: Array })
2839
- ], j.prototype, "layerConfig", 2);
2840
- D([
2841
- k({ type: Boolean })
2842
- ], j.prototype, "externalLayerConfig", 2);
2843
- D([
2844
- k({ type: Boolean })
2845
- ], j.prototype, "unstyled", 2);
2846
- j = D([
2847
- Li("eox-layercontrol")
2848
- ], j);
2849
- let Q = class extends $t {
2930
+ }
2931
+ L(nn, "properties", {
2932
+ idProperty: { attribute: "id-property" },
2933
+ layers: { attribute: !1 },
2934
+ titleProperty: { attribute: "title-property", type: String },
2935
+ unstyled: { type: Boolean }
2936
+ });
2937
+ customElements.define(
2938
+ "eox-layercontrol-optional-list",
2939
+ nn
2940
+ );
2941
+ var Ce, Se;
2942
+ class on extends z {
2850
2943
  constructor() {
2851
- super(...arguments), this._configList = {};
2852
- }
2853
- _handleInput(i, t) {
2854
- t === "opacity" ? this._layerControlElement.changeOpacity(
2855
- this._currentLayer,
2856
- parseFloat(i.target.value)
2857
- ) : this._layerControlElement.changeStyleProperty(
2858
- this._currentLayer,
2859
- t,
2860
- parseFloat(i.target.value)
2861
- );
2862
- }
2863
- _parseConfigs(i) {
2864
- if (!i)
2865
- return;
2866
- const t = i.style_;
2867
- t && t.color && t.color[0] === "array" && (this._configList = t.variables);
2944
+ super();
2945
+ M(this, Ce, "");
2946
+ M(this, Se, `
2947
+ * {
2948
+ font-family: Roboto, sans-serif;
2949
+ }
2950
+ `);
2951
+ this.for = "eox-map", this.idProperty = "id", this.map = null, this.titleProperty = "title", this.tools = ["info", "opacity", "remove", "sort"], this.unstyled = !1;
2868
2952
  }
2869
- connectedCallback() {
2870
- super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this._layerControlElement && (this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement.addEventListener("layerconfig", (i) => {
2871
- this._currentLayer = i.detail.layer, this._parseConfigs(this._currentLayer), this.requestUpdate();
2872
- }))) : (this._layerControlElement = this.layerControl, this._currentLayer = this.layer, this._parseConfigs(this._currentLayer));
2953
+ updated() {
2954
+ const e = document.querySelector(this.for);
2955
+ e && (this.map = e.map);
2873
2956
  }
2874
2957
  render() {
2875
- return H`
2958
+ var e;
2959
+ return _`
2876
2960
  <style>
2877
- ${Zi}
2878
- ${!this.unstyled && qi}
2961
+ ${O(this, Ce)}
2962
+ ${!this.unstyled && O(this, Se)}
2879
2963
  </style>
2880
- ${Pi(
2881
- this._currentLayer,
2882
- () => H`
2883
- <div>
2884
- <slot></slot>
2885
- <div class="slider-control">
2886
- <div class="slider-property">Remove</div>
2887
- <button
2888
- class="delete"
2889
- @click="${() => this.dispatchEvent(new CustomEvent("removeLayer"))}"
2890
- ></button>
2891
- </div>
2892
- ${this.for ? H`layer: ${this._currentLayer.get("name")}` : w}
2893
- ${Ve(
2894
- this.layerConfig.filter(
2895
- (i) => this.for ? i !== "opacity" : !0
2896
- ),
2897
- (i) => i,
2898
- (i) => H`
2899
- <div class="slider-control">
2900
- <div class="slider-property">${i}</div>
2901
- <input
2902
- type="range"
2903
- min="0"
2904
- max="1"
2905
- step="0.01"
2906
- value="${Be(this._currentLayer.getOpacity())}"
2907
- @input=${(t) => this._handleInput(t, i)}
2908
- />
2909
- </div>
2910
- `
2911
- )}
2912
- ${Object.keys(this._configList).length > 0 && !this.external ? H`
2913
- <details open="${this.for ? !0 : w}">
2914
- <summary>Layer config</summary>
2915
- <ul>
2916
- ${Ve(
2917
- Object.keys(this._configList),
2918
- (i) => i,
2919
- (i) => H` <li>
2920
- <div>${i}</div>
2921
- <input
2922
- type="range"
2923
- min="${["red", "green", "blue"].includes(i) ? 1 : 2e3}"
2924
- max="${["red", "green", "blue"].includes(i) ? 4 : 5e3}"
2925
- value="${Be(this._configList[i])}"
2926
- @input=${(t) => this._handleInput(t, i)}
2927
- />
2928
- </li>`
2929
- )}
2930
- </ul>
2931
- </details>
2932
- ` : w}
2933
- </div>
2964
+ ${et(
2965
+ this.map,
2966
+ () => _`
2967
+ <eox-layercontrol-layer-list
2968
+ class="layers"
2969
+ .idProperty=${this.idProperty}
2970
+ .layers=${this.map.getLayers()}
2971
+ .map=${this.map}
2972
+ .titleProperty=${this.titleProperty}
2973
+ .tools=${this.tools}
2974
+ .unstyled=${this.unstyled}
2975
+ @changed=${() => this.requestUpdate()}
2976
+ ></eox-layercontrol-layer-list>
2977
+ `
2978
+ )}
2979
+ ${et(
2980
+ this.map && ((e = Je(
2981
+ // @ts-ignore
2982
+ this.map.getLayers().getArray(),
2983
+ "layerControlOptional",
2984
+ !0
2985
+ )) == null ? void 0 : e.length) > 0,
2986
+ () => _`
2987
+ <eox-layercontrol-optional-list
2988
+ .idProperty=${this.idProperty}
2989
+ .layers=${this.map.getLayers()}
2990
+ .titleProperty=${this.titleProperty}
2991
+ @changed=${() => this.requestUpdate()}
2992
+ ></eox-layercontrol-optional-list>
2934
2993
  `
2935
2994
  )}
2936
2995
  `;
2937
2996
  }
2938
- };
2939
- D([
2940
- k()
2941
- ], Q.prototype, "for", 2);
2942
- D([
2943
- k({ type: Array })
2944
- ], Q.prototype, "layerConfig", 2);
2945
- D([
2946
- k({ type: Object, attribute: !1 })
2947
- ], Q.prototype, "layerControl", 2);
2948
- D([
2949
- k({ type: Object, attribute: !1 })
2950
- ], Q.prototype, "layer", 2);
2951
- D([
2952
- k({ type: Boolean })
2953
- ], Q.prototype, "external", 2);
2954
- D([
2955
- k({ type: Boolean })
2956
- ], Q.prototype, "unstyled", 2);
2957
- D([
2958
- qt()
2959
- ], Q.prototype, "_currentLayer", 2);
2960
- D([
2961
- qt()
2962
- ], Q.prototype, "_configList", 2);
2963
- Q = D([
2964
- Li("eox-layerconfig")
2965
- ], Q);
2997
+ }
2998
+ Ce = new WeakMap(), Se = new WeakMap(), L(on, "properties", {
2999
+ for: { type: String },
3000
+ idProperty: { attribute: "id-property" },
3001
+ map: { attribute: !1, state: !0 },
3002
+ titleProperty: { attribute: "title-property", type: String },
3003
+ tools: { attribute: !1 },
3004
+ unstyled: { type: Boolean }
3005
+ });
3006
+ customElements.define("eox-layercontrol", on);
2966
3007
  export {
2967
- Q as EOxLayerConfig,
2968
- j as EOxLayerControl
3008
+ on as EOxLayerControl
2969
3009
  };