@eox/layercontrol 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +494 -457
- package/dist/eox-layercontrol.umd.cjs +99 -62
- package/package.json +2 -3
- package/test/_mockMap.ts +23 -7
- package/test/general.cy.ts +3 -45
- package/test/layersUpdate.cy.ts +171 -0
package/dist/eox-layercontrol.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
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
|
|
7
|
+
let Ji = class {
|
|
8
8
|
constructor(t, e, n) {
|
|
9
9
|
if (this._$cssResult$ = !0, n !== bi)
|
|
10
10
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
@@ -23,7 +23,7 @@ let Qi = class {
|
|
|
23
23
|
return this.cssText;
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
|
-
const
|
|
26
|
+
const tn = (i) => new Ji(typeof i == "string" ? i : i + "", void 0, bi), en = (i, t) => {
|
|
27
27
|
je ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
28
28
|
const n = document.createElement("style"), r = re.litNonce;
|
|
29
29
|
r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
|
|
@@ -32,7 +32,7 @@ const Ji = (i) => new Qi(typeof i == "string" ? i : i + "", void 0, bi), tn = (i
|
|
|
32
32
|
let e = "";
|
|
33
33
|
for (const n of t.cssRules)
|
|
34
34
|
e += n.cssText;
|
|
35
|
-
return
|
|
35
|
+
return tn(e);
|
|
36
36
|
})(i) : i;
|
|
37
37
|
/**
|
|
38
38
|
* @license
|
|
@@ -40,10 +40,10 @@ const Ji = (i) => new Qi(typeof i == "string" ? i : i + "", void 0, bi), tn = (i
|
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
41
|
*/
|
|
42
42
|
var be;
|
|
43
|
-
const
|
|
43
|
+
const ue = window, Qe = ue.trustedTypes, nn = Qe ? Qe.emptyScript : "", Je = ue.reactiveElementPolyfillSupport, ke = { toAttribute(i, t) {
|
|
44
44
|
switch (t) {
|
|
45
45
|
case Boolean:
|
|
46
|
-
i = i ?
|
|
46
|
+
i = i ? nn : null;
|
|
47
47
|
break;
|
|
48
48
|
case Object:
|
|
49
49
|
case Array:
|
|
@@ -69,7 +69,7 @@ const ce = window, Qe = ce.trustedTypes, en = Qe ? Qe.emptyScript : "", Je = ce.
|
|
|
69
69
|
}
|
|
70
70
|
return e;
|
|
71
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
|
|
72
|
+
let xt = class extends HTMLElement {
|
|
73
73
|
constructor() {
|
|
74
74
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
75
75
|
}
|
|
@@ -148,7 +148,7 @@ let At = class extends HTMLElement {
|
|
|
148
148
|
createRenderRoot() {
|
|
149
149
|
var t;
|
|
150
150
|
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
151
|
-
return
|
|
151
|
+
return en(e, this.constructor.elementStyles), e;
|
|
152
152
|
}
|
|
153
153
|
connectedCallback() {
|
|
154
154
|
var t;
|
|
@@ -248,38 +248,41 @@ let At = class extends HTMLElement {
|
|
|
248
248
|
firstUpdated(t) {
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
|
|
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");
|
|
252
252
|
/**
|
|
253
253
|
* @license
|
|
254
254
|
* Copyright 2017 Google LLC
|
|
255
255
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
256
256
|
*/
|
|
257
257
|
var Ee;
|
|
258
|
-
const
|
|
259
|
-
\f\r]`,
|
|
260
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), ni = /'/g, ri = /"/g, xi = /^(?:script|style|textarea|title)$/i,
|
|
261
|
-
|
|
262
|
-
let r, o = t === 2 ? "<svg>" : "", a = Nt;
|
|
263
|
-
for (let l = 0; l < e; l++) {
|
|
264
|
-
const d = i[l];
|
|
265
|
-
let u, c, p = -1, g = 0;
|
|
266
|
-
for (; g < d.length && (a.lastIndex = g, c = a.exec(d), c !== null); )
|
|
267
|
-
g = a.lastIndex, a === Nt ? c[1] === "!--" ? a = ei : c[1] !== void 0 ? a = ii : c[2] !== void 0 ? (xi.test(c[2]) && (r = RegExp("</" + c[2], "g")), a = ut) : c[3] !== void 0 && (a = ut) : a === ut ? c[0] === ">" ? (a = r ?? Nt, p = -1) : c[1] === void 0 ? p = -2 : (p = a.lastIndex - c[2].length, u = c[1], a = c[3] === void 0 ? ut : c[3] === '"' ? ri : ni) : a === ri || a === ni ? a = ut : a === ei || a === ii ? a = Nt : (a = ut, r = void 0);
|
|
268
|
-
const f = a === ut && i[l + 1].startsWith("/>") ? " " : "";
|
|
269
|
-
o += a === Nt ? d + nn : p >= 0 ? (n.push(u), d.slice(0, p) + ue + d.slice(p) + tt + f) : d + tt + (p === -2 ? (n.push(void 0), l) : f);
|
|
270
|
-
}
|
|
271
|
-
const s = o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
|
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) {
|
|
272
262
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
273
263
|
throw Error("invalid template strings array");
|
|
274
|
-
return
|
|
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
278
|
};
|
|
276
|
-
class
|
|
279
|
+
class Gt {
|
|
277
280
|
constructor({ strings: t, _$litType$: e }, n) {
|
|
278
281
|
let r;
|
|
279
282
|
this.parts = [];
|
|
280
283
|
let o = 0, a = 0;
|
|
281
|
-
const s = t.length - 1, l = this.parts, [d, u] =
|
|
282
|
-
if (this.el =
|
|
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) {
|
|
283
286
|
const c = this.el.content, p = c.firstChild;
|
|
284
287
|
p.remove(), c.append(...p.childNodes);
|
|
285
288
|
}
|
|
@@ -288,11 +291,11 @@ class Zt {
|
|
|
288
291
|
if (r.hasAttributes()) {
|
|
289
292
|
const c = [];
|
|
290
293
|
for (const p of r.getAttributeNames())
|
|
291
|
-
if (p.endsWith(
|
|
292
|
-
const
|
|
293
|
-
if (c.push(p),
|
|
294
|
-
const
|
|
295
|
-
l.push({ type: 1, index: o, name: m[2], strings:
|
|
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 });
|
|
296
299
|
} else
|
|
297
300
|
l.push({ type: 6, index: o });
|
|
298
301
|
}
|
|
@@ -302,10 +305,10 @@ class Zt {
|
|
|
302
305
|
if (xi.test(r.tagName)) {
|
|
303
306
|
const c = r.textContent.split(tt), p = c.length - 1;
|
|
304
307
|
if (p > 0) {
|
|
305
|
-
r.textContent =
|
|
306
|
-
for (let
|
|
307
|
-
r.append(c[
|
|
308
|
-
r.append(c[p],
|
|
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());
|
|
309
312
|
}
|
|
310
313
|
}
|
|
311
314
|
} else if (r.nodeType === 8)
|
|
@@ -329,10 +332,10 @@ function _t(i, t, e = i, n) {
|
|
|
329
332
|
if (t === W)
|
|
330
333
|
return t;
|
|
331
334
|
let l = n !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[n] : e._$Cl;
|
|
332
|
-
const d =
|
|
335
|
+
const d = Wt(t) ? void 0 : t._$litDirective$;
|
|
333
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;
|
|
334
337
|
}
|
|
335
|
-
class
|
|
338
|
+
class $i {
|
|
336
339
|
constructor(t, e) {
|
|
337
340
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
338
341
|
}
|
|
@@ -350,7 +353,7 @@ class Ci {
|
|
|
350
353
|
for (; d !== void 0; ) {
|
|
351
354
|
if (s === d.index) {
|
|
352
355
|
let u;
|
|
353
|
-
d.type === 2 ? u = new
|
|
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];
|
|
354
357
|
}
|
|
355
358
|
s !== (d == null ? void 0 : d.index) && (a = yt.nextNode(), s++);
|
|
356
359
|
}
|
|
@@ -362,7 +365,7 @@ class Ci {
|
|
|
362
365
|
n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
|
|
363
366
|
}
|
|
364
367
|
}
|
|
365
|
-
class
|
|
368
|
+
class Ot {
|
|
366
369
|
constructor(t, e, n, r) {
|
|
367
370
|
var o;
|
|
368
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;
|
|
@@ -383,7 +386,7 @@ class Lt {
|
|
|
383
386
|
return this._$AB;
|
|
384
387
|
}
|
|
385
388
|
_$AI(t, e = this) {
|
|
386
|
-
t = _t(this, t, e),
|
|
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);
|
|
387
390
|
}
|
|
388
391
|
k(t) {
|
|
389
392
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -392,28 +395,28 @@ class Lt {
|
|
|
392
395
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
393
396
|
}
|
|
394
397
|
_(t) {
|
|
395
|
-
this._$AH !== w &&
|
|
398
|
+
this._$AH !== w && Wt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(bt.createTextNode(t)), this._$AH = t;
|
|
396
399
|
}
|
|
397
400
|
g(t) {
|
|
398
401
|
var e;
|
|
399
|
-
const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el =
|
|
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);
|
|
400
403
|
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
|
|
401
404
|
this._$AH.v(n);
|
|
402
405
|
else {
|
|
403
|
-
const a = new
|
|
406
|
+
const a = new $i(o, this), s = a.u(this.options);
|
|
404
407
|
a.v(n), this.$(s), this._$AH = a;
|
|
405
408
|
}
|
|
406
409
|
}
|
|
407
410
|
_$AC(t) {
|
|
408
411
|
let e = oi.get(t.strings);
|
|
409
|
-
return e === void 0 && oi.set(t.strings, e = new
|
|
412
|
+
return e === void 0 && oi.set(t.strings, e = new Gt(t)), e;
|
|
410
413
|
}
|
|
411
414
|
T(t) {
|
|
412
415
|
Ei(this._$AH) || (this._$AH = [], this._$AR());
|
|
413
416
|
const e = this._$AH;
|
|
414
417
|
let n, r = 0;
|
|
415
418
|
for (const o of t)
|
|
416
|
-
r === e.length ? e.push(n = new
|
|
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++;
|
|
417
420
|
r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
|
|
418
421
|
}
|
|
419
422
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
@@ -428,7 +431,7 @@ class Lt {
|
|
|
428
431
|
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
429
432
|
}
|
|
430
433
|
}
|
|
431
|
-
class
|
|
434
|
+
class Zt {
|
|
432
435
|
constructor(t, e, n, r, o) {
|
|
433
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;
|
|
434
437
|
}
|
|
@@ -442,12 +445,12 @@ class qt {
|
|
|
442
445
|
const o = this.strings;
|
|
443
446
|
let a = !1;
|
|
444
447
|
if (o === void 0)
|
|
445
|
-
t = _t(this, t, e, 0), a = !
|
|
448
|
+
t = _t(this, t, e, 0), a = !Wt(t) || t !== this._$AH && t !== W, a && (this._$AH = t);
|
|
446
449
|
else {
|
|
447
450
|
const s = t;
|
|
448
451
|
let l, d;
|
|
449
452
|
for (t = o[0], l = 0; l < o.length - 1; l++)
|
|
450
|
-
d = _t(this, s[n + l], e, l), d === W && (d = this._$AH[l]), a || (a = !
|
|
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;
|
|
451
454
|
}
|
|
452
455
|
a && !r && this.j(t);
|
|
453
456
|
}
|
|
@@ -455,7 +458,7 @@ class qt {
|
|
|
455
458
|
t === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
456
459
|
}
|
|
457
460
|
}
|
|
458
|
-
class
|
|
461
|
+
class Si extends Zt {
|
|
459
462
|
constructor() {
|
|
460
463
|
super(...arguments), this.type = 3;
|
|
461
464
|
}
|
|
@@ -463,16 +466,16 @@ class $i extends qt {
|
|
|
463
466
|
this.element[this.name] = t === w ? void 0 : t;
|
|
464
467
|
}
|
|
465
468
|
}
|
|
466
|
-
const
|
|
467
|
-
class
|
|
469
|
+
const an = Dt ? Dt.emptyScript : "";
|
|
470
|
+
class Di extends Zt {
|
|
468
471
|
constructor() {
|
|
469
472
|
super(...arguments), this.type = 4;
|
|
470
473
|
}
|
|
471
474
|
j(t) {
|
|
472
|
-
t && t !== w ? this.element.setAttribute(this.name,
|
|
475
|
+
t && t !== w ? this.element.setAttribute(this.name, an) : this.element.removeAttribute(this.name);
|
|
473
476
|
}
|
|
474
477
|
}
|
|
475
|
-
class
|
|
478
|
+
class Ti extends Zt {
|
|
476
479
|
constructor(t, e, n, r, o) {
|
|
477
480
|
super(t, e, n, r, o), this.type = 5;
|
|
478
481
|
}
|
|
@@ -488,7 +491,7 @@ class Di extends qt {
|
|
|
488
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);
|
|
489
492
|
}
|
|
490
493
|
}
|
|
491
|
-
class
|
|
494
|
+
class Oi {
|
|
492
495
|
constructor(t, e, n) {
|
|
493
496
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
|
|
494
497
|
}
|
|
@@ -499,15 +502,15 @@ class Ti {
|
|
|
499
502
|
_t(this, t);
|
|
500
503
|
}
|
|
501
504
|
}
|
|
502
|
-
const
|
|
503
|
-
ai == null || ai(
|
|
504
|
-
const
|
|
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) => {
|
|
505
508
|
var n, r;
|
|
506
509
|
const o = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
|
|
507
510
|
let a = o._$litPart$;
|
|
508
511
|
if (a === void 0) {
|
|
509
512
|
const s = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
|
|
510
|
-
o._$litPart$ = a = new
|
|
513
|
+
o._$litPart$ = a = new Ot(t.insertBefore(Xt(), s), s, void 0, e ?? {});
|
|
511
514
|
}
|
|
512
515
|
return a._$AI(i), a;
|
|
513
516
|
};
|
|
@@ -517,7 +520,7 @@ const sn = (i, t, e) => {
|
|
|
517
520
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
518
521
|
*/
|
|
519
522
|
var xe, Ae;
|
|
520
|
-
let
|
|
523
|
+
let $t = class extends xt {
|
|
521
524
|
constructor() {
|
|
522
525
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
523
526
|
}
|
|
@@ -528,7 +531,7 @@ let St = class extends At {
|
|
|
528
531
|
}
|
|
529
532
|
update(t) {
|
|
530
533
|
const e = this.render();
|
|
531
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do =
|
|
534
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ln(e, this.renderRoot, this.renderOptions);
|
|
532
535
|
}
|
|
533
536
|
connectedCallback() {
|
|
534
537
|
var t;
|
|
@@ -542,16 +545,16 @@ let St = class extends At {
|
|
|
542
545
|
return W;
|
|
543
546
|
}
|
|
544
547
|
};
|
|
545
|
-
|
|
548
|
+
$t.finalized = !0, $t._$litElement$ = !0, (xe = globalThis.litElementHydrateSupport) === null || xe === void 0 || xe.call(globalThis, { LitElement: $t });
|
|
546
549
|
const si = globalThis.litElementPolyfillSupport;
|
|
547
|
-
si == null || si({ LitElement:
|
|
550
|
+
si == null || si({ LitElement: $t });
|
|
548
551
|
((Ae = globalThis.litElementVersions) !== null && Ae !== void 0 ? Ae : globalThis.litElementVersions = []).push("3.3.2");
|
|
549
552
|
/**
|
|
550
553
|
* @license
|
|
551
554
|
* Copyright 2017 Google LLC
|
|
552
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
553
556
|
*/
|
|
554
|
-
const
|
|
557
|
+
const Li = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => {
|
|
555
558
|
const { kind: r, elements: o } = n;
|
|
556
559
|
return { kind: r, elements: o, finisher(a) {
|
|
557
560
|
customElements.define(e, a);
|
|
@@ -562,25 +565,25 @@ const Oi = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.def
|
|
|
562
565
|
* Copyright 2017 Google LLC
|
|
563
566
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
564
567
|
*/
|
|
565
|
-
const
|
|
568
|
+
const dn = (i, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? { ...t, finisher(e) {
|
|
566
569
|
e.createProperty(t.key, i);
|
|
567
570
|
} } : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
568
571
|
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
569
572
|
}, finisher(e) {
|
|
570
573
|
e.createProperty(t.key, i);
|
|
571
|
-
} },
|
|
574
|
+
} }, un = (i, t, e) => {
|
|
572
575
|
t.constructor.createProperty(e, i);
|
|
573
576
|
};
|
|
574
|
-
function
|
|
575
|
-
return (t, e) => e !== void 0 ?
|
|
577
|
+
function k(i) {
|
|
578
|
+
return (t, e) => e !== void 0 ? un(i, t, e) : dn(i, t);
|
|
576
579
|
}
|
|
577
580
|
/**
|
|
578
581
|
* @license
|
|
579
582
|
* Copyright 2017 Google LLC
|
|
580
583
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
581
584
|
*/
|
|
582
|
-
function
|
|
583
|
-
return
|
|
585
|
+
function qt(i) {
|
|
586
|
+
return k({ ...i, state: !0 });
|
|
584
587
|
}
|
|
585
588
|
/**
|
|
586
589
|
* @license
|
|
@@ -594,8 +597,8 @@ var Ce;
|
|
|
594
597
|
* Copyright 2017 Google LLC
|
|
595
598
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
596
599
|
*/
|
|
597
|
-
const mt = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 },
|
|
598
|
-
class
|
|
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 {
|
|
599
602
|
constructor(t) {
|
|
600
603
|
}
|
|
601
604
|
get _$AU() {
|
|
@@ -616,7 +619,7 @@ class Hi {
|
|
|
616
619
|
* Copyright 2020 Google LLC
|
|
617
620
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
618
621
|
*/
|
|
619
|
-
const { I: cn } =
|
|
622
|
+
const { I: cn } = sn, hn = (i) => i.strings === void 0, li = () => document.createComment(""), Nt = (i, t, e) => {
|
|
620
623
|
var n;
|
|
621
624
|
const r = i._$AA.parentNode, o = t === void 0 ? i._$AB : t._$AA;
|
|
622
625
|
if (e === void 0) {
|
|
@@ -637,7 +640,7 @@ const { I: cn } = an, hn = (i) => i.strings === void 0, li = () => document.crea
|
|
|
637
640
|
}
|
|
638
641
|
}
|
|
639
642
|
return e;
|
|
640
|
-
}, pt = (i, t, e = i) => (i._$AI(t, e), i),
|
|
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) => {
|
|
641
644
|
var t;
|
|
642
645
|
(t = i._$AP) === null || t === void 0 || t.call(i, !1, !0);
|
|
643
646
|
let e = i._$AA;
|
|
@@ -657,12 +660,12 @@ const di = (i, t, e) => {
|
|
|
657
660
|
for (let r = t; r <= e; r++)
|
|
658
661
|
n.set(i[r], r);
|
|
659
662
|
return n;
|
|
660
|
-
}, Ve =
|
|
663
|
+
}, Ve = Hi(class extends Ii {
|
|
661
664
|
constructor(i) {
|
|
662
665
|
if (super(i), i.type !== mt.CHILD)
|
|
663
666
|
throw Error("repeat() can only be used in text expressions");
|
|
664
667
|
}
|
|
665
|
-
|
|
668
|
+
ct(i, t, e) {
|
|
666
669
|
let n;
|
|
667
670
|
e === void 0 ? e = t : t !== void 0 && (n = t);
|
|
668
671
|
const r = [], o = [];
|
|
@@ -672,50 +675,50 @@ const di = (i, t, e) => {
|
|
|
672
675
|
return { values: o, keys: r };
|
|
673
676
|
}
|
|
674
677
|
render(i, t, e) {
|
|
675
|
-
return this.
|
|
678
|
+
return this.ct(i, t, e).values;
|
|
676
679
|
}
|
|
677
680
|
update(i, [t, e, n]) {
|
|
678
681
|
var r;
|
|
679
|
-
const o =
|
|
682
|
+
const o = fn(i), { values: a, keys: s } = this.ct(t, e, n);
|
|
680
683
|
if (!Array.isArray(o))
|
|
681
|
-
return this.
|
|
682
|
-
const l = (r = this.
|
|
683
|
-
let u, c, p = 0,
|
|
684
|
-
for (; p <=
|
|
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; )
|
|
685
688
|
if (o[p] === null)
|
|
686
689
|
p++;
|
|
687
|
-
else if (o[
|
|
688
|
-
|
|
689
|
-
else if (l[p] === s[
|
|
690
|
-
d[
|
|
691
|
-
else if (l[
|
|
692
|
-
d[m] = pt(o[
|
|
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--;
|
|
693
696
|
else if (l[p] === s[m])
|
|
694
|
-
d[m] = pt(o[p], a[m]),
|
|
695
|
-
else if (l[
|
|
696
|
-
d[
|
|
697
|
-
else if (u === void 0 && (u = di(s,
|
|
698
|
-
if (u.has(l[
|
|
699
|
-
const
|
|
700
|
-
if (
|
|
701
|
-
const O =
|
|
702
|
-
pt(O, a[
|
|
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;
|
|
703
706
|
} else
|
|
704
|
-
d[
|
|
705
|
-
|
|
707
|
+
d[g] = pt(N, a[g]), Nt(i, o[p], N), o[$] = null;
|
|
708
|
+
g++;
|
|
706
709
|
} else
|
|
707
|
-
$e(o[
|
|
710
|
+
$e(o[f]), f--;
|
|
708
711
|
else
|
|
709
712
|
$e(o[p]), p++;
|
|
710
|
-
for (;
|
|
711
|
-
const
|
|
712
|
-
pt(
|
|
713
|
+
for (; g <= m; ) {
|
|
714
|
+
const $ = Nt(i, d[m + 1]);
|
|
715
|
+
pt($, a[g]), d[g++] = $;
|
|
713
716
|
}
|
|
714
|
-
for (; p <=
|
|
715
|
-
const
|
|
716
|
-
|
|
717
|
+
for (; p <= f; ) {
|
|
718
|
+
const $ = o[p++];
|
|
719
|
+
$ !== null && $e($);
|
|
717
720
|
}
|
|
718
|
-
return this.
|
|
721
|
+
return this.ut = s, Mi(i, d), W;
|
|
719
722
|
}
|
|
720
723
|
});
|
|
721
724
|
/**
|
|
@@ -723,7 +726,7 @@ const di = (i, t, e) => {
|
|
|
723
726
|
* Copyright 2020 Google LLC
|
|
724
727
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
725
728
|
*/
|
|
726
|
-
const Be =
|
|
729
|
+
const Be = Hi(class extends Ii {
|
|
727
730
|
constructor(i) {
|
|
728
731
|
if (super(i), i.type !== mt.PROPERTY && i.type !== mt.ATTRIBUTE && i.type !== mt.BOOLEAN_ATTRIBUTE)
|
|
729
732
|
throw Error("The `live` directive is not allowed on child or event bindings");
|
|
@@ -745,7 +748,7 @@ const Be = Li(class extends Hi {
|
|
|
745
748
|
return W;
|
|
746
749
|
} else if (i.type === mt.ATTRIBUTE && e.getAttribute(n) === t + "")
|
|
747
750
|
return W;
|
|
748
|
-
return
|
|
751
|
+
return Mi(i), t;
|
|
749
752
|
}
|
|
750
753
|
});
|
|
751
754
|
/**
|
|
@@ -762,7 +765,7 @@ function Pi(i, t, e) {
|
|
|
762
765
|
* @author owenm <owen23355@gmail.com>
|
|
763
766
|
* @license MIT
|
|
764
767
|
*/
|
|
765
|
-
function
|
|
768
|
+
function ui(i, t) {
|
|
766
769
|
var e = Object.keys(i);
|
|
767
770
|
if (Object.getOwnPropertySymbols) {
|
|
768
771
|
var n = Object.getOwnPropertySymbols(i);
|
|
@@ -775,9 +778,9 @@ function ci(i, t) {
|
|
|
775
778
|
function K(i) {
|
|
776
779
|
for (var t = 1; t < arguments.length; t++) {
|
|
777
780
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
778
|
-
t % 2 ?
|
|
779
|
-
|
|
780
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) :
|
|
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) {
|
|
781
784
|
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
|
|
782
785
|
});
|
|
783
786
|
}
|
|
@@ -791,7 +794,7 @@ function oe(i) {
|
|
|
791
794
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
792
795
|
}, oe(i);
|
|
793
796
|
}
|
|
794
|
-
function
|
|
797
|
+
function gn(i, t, e) {
|
|
795
798
|
return t in i ? Object.defineProperty(i, t, {
|
|
796
799
|
value: e,
|
|
797
800
|
enumerable: !0,
|
|
@@ -809,7 +812,7 @@ function it() {
|
|
|
809
812
|
return i;
|
|
810
813
|
}, it.apply(this, arguments);
|
|
811
814
|
}
|
|
812
|
-
function
|
|
815
|
+
function mn(i, t) {
|
|
813
816
|
if (i == null)
|
|
814
817
|
return {};
|
|
815
818
|
var e = {}, n = Object.keys(i), r, o;
|
|
@@ -817,10 +820,10 @@ function gn(i, t) {
|
|
|
817
820
|
r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
|
|
818
821
|
return e;
|
|
819
822
|
}
|
|
820
|
-
function
|
|
823
|
+
function vn(i, t) {
|
|
821
824
|
if (i == null)
|
|
822
825
|
return {};
|
|
823
|
-
var e =
|
|
826
|
+
var e = mn(i, t), n, r;
|
|
824
827
|
if (Object.getOwnPropertySymbols) {
|
|
825
828
|
var o = Object.getOwnPropertySymbols(i);
|
|
826
829
|
for (r = 0; r < o.length; r++)
|
|
@@ -828,20 +831,20 @@ function mn(i, t) {
|
|
|
828
831
|
}
|
|
829
832
|
return e;
|
|
830
833
|
}
|
|
831
|
-
var
|
|
834
|
+
var yn = "1.15.0";
|
|
832
835
|
function et(i) {
|
|
833
836
|
if (typeof window < "u" && window.navigator)
|
|
834
837
|
return !!/* @__PURE__ */ navigator.userAgent.match(i);
|
|
835
838
|
}
|
|
836
|
-
var nt = et(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Kt = et(/Edge/i),
|
|
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 = {
|
|
837
840
|
capture: !1,
|
|
838
841
|
passive: !1
|
|
839
842
|
};
|
|
840
843
|
function E(i, t, e) {
|
|
841
|
-
i.addEventListener(t, e, !nt &&
|
|
844
|
+
i.addEventListener(t, e, !nt && Vi);
|
|
842
845
|
}
|
|
843
846
|
function _(i, t, e) {
|
|
844
|
-
i.removeEventListener(t, e, !nt &&
|
|
847
|
+
i.removeEventListener(t, e, !nt && Vi);
|
|
845
848
|
}
|
|
846
849
|
function pe(i, t) {
|
|
847
850
|
if (t) {
|
|
@@ -859,7 +862,7 @@ function pe(i, t) {
|
|
|
859
862
|
return !1;
|
|
860
863
|
}
|
|
861
864
|
}
|
|
862
|
-
function
|
|
865
|
+
function bn(i) {
|
|
863
866
|
return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
|
|
864
867
|
}
|
|
865
868
|
function Z(i, t, e, n) {
|
|
@@ -870,18 +873,18 @@ function Z(i, t, e, n) {
|
|
|
870
873
|
return i;
|
|
871
874
|
if (i === e)
|
|
872
875
|
break;
|
|
873
|
-
} while (i =
|
|
876
|
+
} while (i = bn(i));
|
|
874
877
|
}
|
|
875
878
|
return null;
|
|
876
879
|
}
|
|
877
|
-
var
|
|
878
|
-
function
|
|
880
|
+
var hi = /\s+/g;
|
|
881
|
+
function R(i, t, e) {
|
|
879
882
|
if (i && t)
|
|
880
883
|
if (i.classList)
|
|
881
884
|
i.classList[e ? "add" : "remove"](t);
|
|
882
885
|
else {
|
|
883
|
-
var n = (" " + i.className + " ").replace(
|
|
884
|
-
i.className = (n + (e ? " " + t : "")).replace(
|
|
886
|
+
var n = (" " + i.className + " ").replace(hi, " ").replace(" " + t + " ", " ");
|
|
887
|
+
i.className = (n + (e ? " " + t : "")).replace(hi, " ");
|
|
885
888
|
}
|
|
886
889
|
}
|
|
887
890
|
function v(i, t, e) {
|
|
@@ -892,7 +895,7 @@ function v(i, t, e) {
|
|
|
892
895
|
!(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
|
|
893
896
|
}
|
|
894
897
|
}
|
|
895
|
-
function
|
|
898
|
+
function St(i, t) {
|
|
896
899
|
var e = "";
|
|
897
900
|
if (typeof i == "string")
|
|
898
901
|
e = i;
|
|
@@ -904,7 +907,7 @@ function Dt(i, t) {
|
|
|
904
907
|
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
905
908
|
return r && new r(e);
|
|
906
909
|
}
|
|
907
|
-
function
|
|
910
|
+
function Bi(i, t, e) {
|
|
908
911
|
if (i) {
|
|
909
912
|
var n = i.getElementsByTagName(t), r = 0, o = n.length;
|
|
910
913
|
if (e)
|
|
@@ -930,8 +933,8 @@ function T(i, t, e, n, r) {
|
|
|
930
933
|
}
|
|
931
934
|
while (r = r.parentNode);
|
|
932
935
|
if (n && i !== window) {
|
|
933
|
-
var
|
|
934
|
-
|
|
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);
|
|
935
938
|
}
|
|
936
939
|
return {
|
|
937
940
|
top: a,
|
|
@@ -954,7 +957,7 @@ function pi(i, t, e) {
|
|
|
954
957
|
}
|
|
955
958
|
return !1;
|
|
956
959
|
}
|
|
957
|
-
function
|
|
960
|
+
function Tt(i, t, e, n) {
|
|
958
961
|
for (var r = 0, o = 0, a = i.children; o < a.length; ) {
|
|
959
962
|
if (a[o].style.display !== "none" && a[o] !== y.ghost && (n || a[o] !== y.dragged) && Z(a[o], e.draggable, i, !1)) {
|
|
960
963
|
if (r === t)
|
|
@@ -970,7 +973,7 @@ function Xe(i, t) {
|
|
|
970
973
|
e = e.previousElementSibling;
|
|
971
974
|
return e || null;
|
|
972
975
|
}
|
|
973
|
-
function
|
|
976
|
+
function z(i, t) {
|
|
974
977
|
var e = 0;
|
|
975
978
|
if (!i || !i.parentNode)
|
|
976
979
|
return -1;
|
|
@@ -982,12 +985,12 @@ function fi(i) {
|
|
|
982
985
|
var t = 0, e = 0, n = q();
|
|
983
986
|
if (i)
|
|
984
987
|
do {
|
|
985
|
-
var r =
|
|
988
|
+
var r = St(i), o = r.a, a = r.d;
|
|
986
989
|
t += i.scrollLeft * o, e += i.scrollTop * a;
|
|
987
990
|
} while (i !== n && (i = i.parentNode));
|
|
988
991
|
return [t, e];
|
|
989
992
|
}
|
|
990
|
-
function
|
|
993
|
+
function _n(i, t) {
|
|
991
994
|
for (var e in i)
|
|
992
995
|
if (i.hasOwnProperty(e)) {
|
|
993
996
|
for (var n in t)
|
|
@@ -1014,7 +1017,7 @@ function lt(i, t) {
|
|
|
1014
1017
|
while (e = e.parentNode);
|
|
1015
1018
|
return q();
|
|
1016
1019
|
}
|
|
1017
|
-
function
|
|
1020
|
+
function En(i, t) {
|
|
1018
1021
|
if (i && t)
|
|
1019
1022
|
for (var e in t)
|
|
1020
1023
|
t.hasOwnProperty(e) && (i[e] = t[e]);
|
|
@@ -1023,29 +1026,29 @@ function _n(i, t) {
|
|
|
1023
1026
|
function Se(i, t) {
|
|
1024
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);
|
|
1025
1028
|
}
|
|
1026
|
-
var
|
|
1027
|
-
function
|
|
1029
|
+
var Ut;
|
|
1030
|
+
function Ri(i, t) {
|
|
1028
1031
|
return function() {
|
|
1029
|
-
if (!
|
|
1032
|
+
if (!Ut) {
|
|
1030
1033
|
var e = arguments, n = this;
|
|
1031
|
-
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e),
|
|
1032
|
-
|
|
1034
|
+
e.length === 1 ? i.call(n, e[0]) : i.apply(n, e), Ut = setTimeout(function() {
|
|
1035
|
+
Ut = void 0;
|
|
1033
1036
|
}, t);
|
|
1034
1037
|
}
|
|
1035
1038
|
};
|
|
1036
1039
|
}
|
|
1037
|
-
function
|
|
1038
|
-
clearTimeout(
|
|
1040
|
+
function wn() {
|
|
1041
|
+
clearTimeout(Ut), Ut = void 0;
|
|
1039
1042
|
}
|
|
1040
|
-
function
|
|
1043
|
+
function Fi(i, t, e) {
|
|
1041
1044
|
i.scrollLeft += t, i.scrollTop += e;
|
|
1042
1045
|
}
|
|
1043
|
-
function
|
|
1046
|
+
function Ui(i) {
|
|
1044
1047
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
1045
1048
|
return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
|
|
1046
1049
|
}
|
|
1047
|
-
var
|
|
1048
|
-
function
|
|
1050
|
+
var U = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
1051
|
+
function xn() {
|
|
1049
1052
|
var i = [], t;
|
|
1050
1053
|
return {
|
|
1051
1054
|
captureAnimationState: function() {
|
|
@@ -1059,7 +1062,7 @@ function wn() {
|
|
|
1059
1062
|
});
|
|
1060
1063
|
var o = K({}, i[i.length - 1].rect);
|
|
1061
1064
|
if (r.thisAnimationDuration) {
|
|
1062
|
-
var a =
|
|
1065
|
+
var a = St(r, !0);
|
|
1063
1066
|
a && (o.top -= a.f, o.left -= a.e);
|
|
1064
1067
|
}
|
|
1065
1068
|
r.fromRect = o;
|
|
@@ -1071,7 +1074,7 @@ function wn() {
|
|
|
1071
1074
|
i.push(n);
|
|
1072
1075
|
},
|
|
1073
1076
|
removeAnimationState: function(n) {
|
|
1074
|
-
i.splice(
|
|
1077
|
+
i.splice(_n(i, {
|
|
1075
1078
|
target: n
|
|
1076
1079
|
}), 1);
|
|
1077
1080
|
},
|
|
@@ -1083,9 +1086,9 @@ function wn() {
|
|
|
1083
1086
|
}
|
|
1084
1087
|
var o = !1, a = 0;
|
|
1085
1088
|
i.forEach(function(s) {
|
|
1086
|
-
var l = 0, d = s.target, u = d.fromRect, c = T(d), p = d.prevFromRect,
|
|
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);
|
|
1087
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
|
|
1088
|
-
(
|
|
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() {
|
|
1089
1092
|
d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
|
|
1090
1093
|
}, l), d.thisAnimationDuration = l);
|
|
1091
1094
|
}), clearTimeout(t), o ? t = setTimeout(function() {
|
|
@@ -1095,30 +1098,30 @@ function wn() {
|
|
|
1095
1098
|
animate: function(n, r, o, a) {
|
|
1096
1099
|
if (a) {
|
|
1097
1100
|
v(n, "transition", ""), v(n, "transform", "");
|
|
1098
|
-
var s =
|
|
1099
|
-
n.animatingX = !!u, n.animatingY = !!c, v(n, "transform", "translate3d(" + u + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
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() {
|
|
1100
1103
|
v(n, "transition", ""), v(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
1101
1104
|
}, a);
|
|
1102
1105
|
}
|
|
1103
1106
|
}
|
|
1104
1107
|
};
|
|
1105
1108
|
}
|
|
1106
|
-
function
|
|
1109
|
+
function An(i) {
|
|
1107
1110
|
return i.offsetWidth;
|
|
1108
1111
|
}
|
|
1109
|
-
function
|
|
1112
|
+
function Cn(i, t, e, n) {
|
|
1110
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;
|
|
1111
1114
|
}
|
|
1112
|
-
var
|
|
1115
|
+
var Et = [], De = {
|
|
1113
1116
|
initializeByDefault: !0
|
|
1114
1117
|
}, Qt = {
|
|
1115
1118
|
mount: function(t) {
|
|
1116
1119
|
for (var e in De)
|
|
1117
1120
|
De.hasOwnProperty(e) && !(e in t) && (t[e] = De[e]);
|
|
1118
|
-
|
|
1121
|
+
Et.forEach(function(n) {
|
|
1119
1122
|
if (n.pluginName === t.pluginName)
|
|
1120
1123
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
1121
|
-
}),
|
|
1124
|
+
}), Et.push(t);
|
|
1122
1125
|
},
|
|
1123
1126
|
pluginEvent: function(t, e, n) {
|
|
1124
1127
|
var r = this;
|
|
@@ -1126,7 +1129,7 @@ var wt = [], De = {
|
|
|
1126
1129
|
r.eventCanceled = !0;
|
|
1127
1130
|
};
|
|
1128
1131
|
var o = t + "Global";
|
|
1129
|
-
|
|
1132
|
+
Et.forEach(function(a) {
|
|
1130
1133
|
e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](K({
|
|
1131
1134
|
sortable: e
|
|
1132
1135
|
}, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](K({
|
|
@@ -1135,7 +1138,7 @@ var wt = [], De = {
|
|
|
1135
1138
|
});
|
|
1136
1139
|
},
|
|
1137
1140
|
initializePlugins: function(t, e, n, r) {
|
|
1138
|
-
|
|
1141
|
+
Et.forEach(function(s) {
|
|
1139
1142
|
var l = s.pluginName;
|
|
1140
1143
|
if (!(!t.options[l] && !s.initializeByDefault)) {
|
|
1141
1144
|
var d = new s(t, e, t.options);
|
|
@@ -1150,33 +1153,33 @@ var wt = [], De = {
|
|
|
1150
1153
|
},
|
|
1151
1154
|
getEventProperties: function(t, e) {
|
|
1152
1155
|
var n = {};
|
|
1153
|
-
return
|
|
1156
|
+
return Et.forEach(function(r) {
|
|
1154
1157
|
typeof r.eventProperties == "function" && it(n, r.eventProperties.call(e[r.pluginName], t));
|
|
1155
1158
|
}), n;
|
|
1156
1159
|
},
|
|
1157
1160
|
modifyOption: function(t, e, n) {
|
|
1158
1161
|
var r;
|
|
1159
|
-
return
|
|
1162
|
+
return Et.forEach(function(o) {
|
|
1160
1163
|
t[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (r = o.optionListeners[e].call(t[o.pluginName], n));
|
|
1161
1164
|
}), r;
|
|
1162
1165
|
}
|
|
1163
1166
|
};
|
|
1164
|
-
function
|
|
1165
|
-
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,
|
|
1166
|
-
if (t = t || e && e[
|
|
1167
|
-
var m,
|
|
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;
|
|
1169
|
+
if (t = t || e && e[U], !!t) {
|
|
1170
|
+
var m, $ = t.options, N = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
1168
1171
|
window.CustomEvent && !nt && !Kt ? m = new CustomEvent(n, {
|
|
1169
1172
|
bubbles: !0,
|
|
1170
1173
|
cancelable: !0
|
|
1171
|
-
}) : (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 =
|
|
1172
|
-
var O = K(K({},
|
|
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));
|
|
1173
1176
|
for (var Y in O)
|
|
1174
1177
|
m[Y] = O[Y];
|
|
1175
|
-
e && e.dispatchEvent(m),
|
|
1178
|
+
e && e.dispatchEvent(m), $[N] && $[N].call(t, m);
|
|
1176
1179
|
}
|
|
1177
1180
|
}
|
|
1178
|
-
var
|
|
1179
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o =
|
|
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);
|
|
1180
1183
|
Qt.pluginEvent.bind(y)(t, e, K({
|
|
1181
1184
|
dragEl: h,
|
|
1182
1185
|
parentEl: C,
|
|
@@ -1186,16 +1189,16 @@ var $n = ["evt"], M = function(t, e) {
|
|
|
1186
1189
|
lastDownEl: ae,
|
|
1187
1190
|
cloneEl: A,
|
|
1188
1191
|
cloneHidden: st,
|
|
1189
|
-
dragStarted:
|
|
1192
|
+
dragStarted: Vt,
|
|
1190
1193
|
putSortable: L,
|
|
1191
1194
|
activeSortable: y.active,
|
|
1192
1195
|
originalEvent: r,
|
|
1193
|
-
oldIndex:
|
|
1194
|
-
oldDraggableIndex:
|
|
1195
|
-
newIndex:
|
|
1196
|
+
oldIndex: Ct,
|
|
1197
|
+
oldDraggableIndex: zt,
|
|
1198
|
+
newIndex: F,
|
|
1196
1199
|
newDraggableIndex: at,
|
|
1197
|
-
hideGhostForTarget:
|
|
1198
|
-
unhideGhostForTarget:
|
|
1200
|
+
hideGhostForTarget: Xi,
|
|
1201
|
+
unhideGhostForTarget: Wi,
|
|
1199
1202
|
cloneNowHidden: function() {
|
|
1200
1203
|
st = !0;
|
|
1201
1204
|
},
|
|
@@ -1203,7 +1206,7 @@ var $n = ["evt"], M = function(t, e) {
|
|
|
1203
1206
|
st = !1;
|
|
1204
1207
|
},
|
|
1205
1208
|
dispatchSortableEvent: function(s) {
|
|
1206
|
-
|
|
1209
|
+
M({
|
|
1207
1210
|
sortable: e,
|
|
1208
1211
|
name: s,
|
|
1209
1212
|
originalEvent: r
|
|
@@ -1211,27 +1214,27 @@ var $n = ["evt"], M = function(t, e) {
|
|
|
1211
1214
|
}
|
|
1212
1215
|
}, o));
|
|
1213
1216
|
};
|
|
1214
|
-
function
|
|
1215
|
-
|
|
1217
|
+
function M(i) {
|
|
1218
|
+
$n(K({
|
|
1216
1219
|
putSortable: L,
|
|
1217
1220
|
cloneEl: A,
|
|
1218
1221
|
targetEl: h,
|
|
1219
1222
|
rootEl: x,
|
|
1220
|
-
oldIndex:
|
|
1221
|
-
oldDraggableIndex:
|
|
1222
|
-
newIndex:
|
|
1223
|
+
oldIndex: Ct,
|
|
1224
|
+
oldDraggableIndex: zt,
|
|
1225
|
+
newIndex: F,
|
|
1223
1226
|
newDraggableIndex: at
|
|
1224
1227
|
}, i));
|
|
1225
1228
|
}
|
|
1226
|
-
var h, C, b, x, vt, ae, A, st,
|
|
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() {
|
|
1227
1230
|
if (ye) {
|
|
1228
1231
|
if (nt)
|
|
1229
1232
|
return !1;
|
|
1230
1233
|
var i = document.createElement("x");
|
|
1231
1234
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
1232
1235
|
}
|
|
1233
|
-
}(),
|
|
1234
|
-
var n = v(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o =
|
|
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;
|
|
1235
1238
|
if (n.display === "flex")
|
|
1236
1239
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1237
1240
|
if (n.display === "grid")
|
|
@@ -1241,20 +1244,20 @@ var h, C, b, x, vt, ae, A, st, $t, U, jt, at, te, L, Ct = !1, fe = !1, ge = [],
|
|
|
1241
1244
|
return a && (l.clear === "both" || l.clear === c) ? "vertical" : "horizontal";
|
|
1242
1245
|
}
|
|
1243
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";
|
|
1244
|
-
},
|
|
1247
|
+
}, Tn = function(t, e, n) {
|
|
1245
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;
|
|
1246
1249
|
return r === s || o === l || r + a / 2 === s + d / 2;
|
|
1247
|
-
},
|
|
1250
|
+
}, On = function(t, e) {
|
|
1248
1251
|
var n;
|
|
1249
1252
|
return ge.some(function(r) {
|
|
1250
|
-
var o = r[
|
|
1253
|
+
var o = r[U].options.emptyInsertThreshold;
|
|
1251
1254
|
if (!(!o || Xe(r))) {
|
|
1252
1255
|
var a = T(r), s = t >= a.left - o && t <= a.right + o, l = e >= a.top - o && e <= a.bottom + o;
|
|
1253
1256
|
if (s && l)
|
|
1254
1257
|
return n = r;
|
|
1255
1258
|
}
|
|
1256
1259
|
}), n;
|
|
1257
|
-
},
|
|
1260
|
+
}, Yi = function(t) {
|
|
1258
1261
|
function e(o, a) {
|
|
1259
1262
|
return function(s, l, d, u) {
|
|
1260
1263
|
var c = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
|
|
@@ -1274,33 +1277,33 @@ var h, C, b, x, vt, ae, A, st, $t, U, jt, at, te, L, Ct = !1, fe = !1, ge = [],
|
|
|
1274
1277
|
(!r || oe(r) != "object") && (r = {
|
|
1275
1278
|
name: r
|
|
1276
1279
|
}), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
|
|
1277
|
-
}, Yi = function() {
|
|
1278
|
-
!Ui && b && v(b, "display", "none");
|
|
1279
1280
|
}, Xi = function() {
|
|
1280
|
-
!
|
|
1281
|
+
!zi && b && v(b, "display", "none");
|
|
1282
|
+
}, Wi = function() {
|
|
1283
|
+
!zi && b && v(b, "display", "");
|
|
1281
1284
|
};
|
|
1282
|
-
ye && !
|
|
1285
|
+
ye && !Ni && document.addEventListener("click", function(i) {
|
|
1283
1286
|
if (fe)
|
|
1284
1287
|
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), fe = !1, !1;
|
|
1285
1288
|
}, !0);
|
|
1286
1289
|
var gt = function(t) {
|
|
1287
1290
|
if (h) {
|
|
1288
1291
|
t = t.touches ? t.touches[0] : t;
|
|
1289
|
-
var e =
|
|
1292
|
+
var e = On(t.clientX, t.clientY);
|
|
1290
1293
|
if (e) {
|
|
1291
1294
|
var n = {};
|
|
1292
1295
|
for (var r in t)
|
|
1293
1296
|
t.hasOwnProperty(r) && (n[r] = t[r]);
|
|
1294
|
-
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[
|
|
1297
|
+
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[U]._onDragOver(n);
|
|
1295
1298
|
}
|
|
1296
1299
|
}
|
|
1297
|
-
},
|
|
1298
|
-
h && h.parentNode[
|
|
1300
|
+
}, Ln = function(t) {
|
|
1301
|
+
h && h.parentNode[U]._isOutsideThisEl(t.target);
|
|
1299
1302
|
};
|
|
1300
1303
|
function y(i, t) {
|
|
1301
1304
|
if (!(i && i.nodeType && i.nodeType === 1))
|
|
1302
1305
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));
|
|
1303
|
-
this.el = i, this.options = t = it({}, t), i[
|
|
1306
|
+
this.el = i, this.options = t = it({}, t), i[U] = this;
|
|
1304
1307
|
var e = {
|
|
1305
1308
|
group: null,
|
|
1306
1309
|
sort: !0,
|
|
@@ -1316,7 +1319,7 @@ function y(i, t) {
|
|
|
1316
1319
|
// will be set to same as swapThreshold if default
|
|
1317
1320
|
removeCloneOnHide: !0,
|
|
1318
1321
|
direction: function() {
|
|
1319
|
-
return
|
|
1322
|
+
return ji(i, this.options);
|
|
1320
1323
|
},
|
|
1321
1324
|
ghostClass: "sortable-ghost",
|
|
1322
1325
|
chosenClass: "sortable-chosen",
|
|
@@ -1343,22 +1346,22 @@ function y(i, t) {
|
|
|
1343
1346
|
x: 0,
|
|
1344
1347
|
y: 0
|
|
1345
1348
|
},
|
|
1346
|
-
supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1349
|
+
supportPointer: y.supportPointer !== !1 && "PointerEvent" in window && !Ft,
|
|
1347
1350
|
emptyInsertThreshold: 5
|
|
1348
1351
|
};
|
|
1349
1352
|
Qt.initializePlugins(this, i, e);
|
|
1350
1353
|
for (var n in e)
|
|
1351
1354
|
!(n in t) && (t[n] = e[n]);
|
|
1352
|
-
|
|
1355
|
+
Yi(t);
|
|
1353
1356
|
for (var r in this)
|
|
1354
1357
|
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
1355
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
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());
|
|
1356
1359
|
}
|
|
1357
1360
|
y.prototype = /** @lends Sortable.prototype */
|
|
1358
1361
|
{
|
|
1359
1362
|
constructor: y,
|
|
1360
1363
|
_isOutsideThisEl: function(t) {
|
|
1361
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1364
|
+
!this.el.contains(t) && t !== this.el && (wt = null);
|
|
1362
1365
|
},
|
|
1363
1366
|
_getDirection: function(t, e) {
|
|
1364
1367
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, h) : this.options.direction;
|
|
@@ -1366,31 +1369,31 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1366
1369
|
_onTapStart: function(t) {
|
|
1367
1370
|
if (t.cancelable) {
|
|
1368
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;
|
|
1369
|
-
if (
|
|
1370
|
-
if (
|
|
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") {
|
|
1371
1374
|
if (u.call(this, t, l, this)) {
|
|
1372
|
-
|
|
1375
|
+
M({
|
|
1373
1376
|
sortable: e,
|
|
1374
1377
|
rootEl: d,
|
|
1375
1378
|
name: "filter",
|
|
1376
1379
|
targetEl: l,
|
|
1377
1380
|
toEl: n,
|
|
1378
1381
|
fromEl: n
|
|
1379
|
-
}),
|
|
1382
|
+
}), P("filter", e, {
|
|
1380
1383
|
evt: t
|
|
1381
1384
|
}), o && t.cancelable && t.preventDefault();
|
|
1382
1385
|
return;
|
|
1383
1386
|
}
|
|
1384
1387
|
} else if (u && (u = u.split(",").some(function(c) {
|
|
1385
1388
|
if (c = Z(d, c.trim(), n, !1), c)
|
|
1386
|
-
return
|
|
1389
|
+
return M({
|
|
1387
1390
|
sortable: e,
|
|
1388
1391
|
rootEl: c,
|
|
1389
1392
|
name: "filter",
|
|
1390
1393
|
targetEl: l,
|
|
1391
1394
|
fromEl: n,
|
|
1392
1395
|
toEl: n
|
|
1393
|
-
}),
|
|
1396
|
+
}), P("filter", e, {
|
|
1394
1397
|
evt: t
|
|
1395
1398
|
}), !0;
|
|
1396
1399
|
}), u)) {
|
|
@@ -1410,20 +1413,20 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1410
1413
|
clientX: (e || t).clientX,
|
|
1411
1414
|
clientY: (e || t).clientY
|
|
1412
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() {
|
|
1413
|
-
if (
|
|
1416
|
+
if (P("delayEnded", r, {
|
|
1414
1417
|
evt: t
|
|
1415
1418
|
}), y.eventCanceled) {
|
|
1416
1419
|
r._onDrop();
|
|
1417
1420
|
return;
|
|
1418
1421
|
}
|
|
1419
|
-
r._disableDelayedDragEvents(), !
|
|
1422
|
+
r._disableDelayedDragEvents(), !ci && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(t, e), M({
|
|
1420
1423
|
sortable: r,
|
|
1421
1424
|
name: "choose",
|
|
1422
1425
|
originalEvent: t
|
|
1423
|
-
}),
|
|
1426
|
+
}), R(h, a.chosenClass, !0);
|
|
1424
1427
|
}, a.ignore.split(",").forEach(function(u) {
|
|
1425
|
-
|
|
1426
|
-
}), 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),
|
|
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, {
|
|
1427
1430
|
evt: t
|
|
1428
1431
|
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Kt || nt))) {
|
|
1429
1432
|
if (y.eventCanceled) {
|
|
@@ -1456,12 +1459,12 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1456
1459
|
}
|
|
1457
1460
|
},
|
|
1458
1461
|
_dragStarted: function(t, e) {
|
|
1459
|
-
if (
|
|
1460
|
-
|
|
1462
|
+
if (At = !1, x && h) {
|
|
1463
|
+
P("dragStarted", this, {
|
|
1461
1464
|
evt: e
|
|
1462
|
-
}), this.nativeDraggable && E(document, "dragover",
|
|
1465
|
+
}), this.nativeDraggable && E(document, "dragover", Ln);
|
|
1463
1466
|
var n = this.options;
|
|
1464
|
-
!t &&
|
|
1467
|
+
!t && R(h, n.dragClass, !1), R(h, n.ghostClass, !0), y.active = this, t && this._appendGhost(), M({
|
|
1465
1468
|
sortable: this,
|
|
1466
1469
|
name: "start",
|
|
1467
1470
|
originalEvent: e
|
|
@@ -1471,14 +1474,14 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1471
1474
|
},
|
|
1472
1475
|
_emulateDragOver: function() {
|
|
1473
1476
|
if (X) {
|
|
1474
|
-
this._lastX = X.clientX, this._lastY = X.clientY,
|
|
1477
|
+
this._lastX = X.clientX, this._lastY = X.clientY, Xi();
|
|
1475
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); )
|
|
1476
1479
|
e = t;
|
|
1477
|
-
if (h.parentNode[
|
|
1480
|
+
if (h.parentNode[U]._isOutsideThisEl(t), e)
|
|
1478
1481
|
do {
|
|
1479
|
-
if (e[
|
|
1482
|
+
if (e[U]) {
|
|
1480
1483
|
var n = void 0;
|
|
1481
|
-
if (n = e[
|
|
1484
|
+
if (n = e[U]._onDragOver({
|
|
1482
1485
|
clientX: X.clientX,
|
|
1483
1486
|
clientY: X.clientY,
|
|
1484
1487
|
target: t,
|
|
@@ -1488,13 +1491,13 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1488
1491
|
}
|
|
1489
1492
|
t = e;
|
|
1490
1493
|
} while (e = e.parentNode);
|
|
1491
|
-
|
|
1494
|
+
Wi();
|
|
1492
1495
|
}
|
|
1493
1496
|
},
|
|
1494
1497
|
_onTouchMove: function(t) {
|
|
1495
1498
|
if (ft) {
|
|
1496
|
-
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = b &&
|
|
1497
|
-
if (!y.active && !
|
|
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) {
|
|
1498
1501
|
if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
|
|
1499
1502
|
return;
|
|
1500
1503
|
this._onDragStart(t, !0);
|
|
@@ -1522,34 +1525,34 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1522
1525
|
I = I.parentNode;
|
|
1523
1526
|
I !== document.body && I !== document.documentElement ? (I === document && (I = q()), e.top += I.scrollTop, e.left += I.scrollLeft) : I = q(), Le = fi(I);
|
|
1524
1527
|
}
|
|
1525
|
-
b = h.cloneNode(!0),
|
|
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 + "%");
|
|
1526
1529
|
}
|
|
1527
1530
|
},
|
|
1528
1531
|
_onDragStart: function(t, e) {
|
|
1529
1532
|
var n = this, r = t.dataTransfer, o = n.options;
|
|
1530
|
-
if (
|
|
1533
|
+
if (P("dragStart", this, {
|
|
1531
1534
|
evt: t
|
|
1532
1535
|
}), y.eventCanceled) {
|
|
1533
1536
|
this._onDrop();
|
|
1534
1537
|
return;
|
|
1535
1538
|
}
|
|
1536
|
-
|
|
1537
|
-
|
|
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({
|
|
1538
1541
|
sortable: n,
|
|
1539
1542
|
name: "clone"
|
|
1540
1543
|
}));
|
|
1541
|
-
}), !e &&
|
|
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");
|
|
1542
1545
|
},
|
|
1543
1546
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1544
1547
|
_onDragOver: function(t) {
|
|
1545
|
-
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,
|
|
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;
|
|
1546
1549
|
if (Re)
|
|
1547
1550
|
return;
|
|
1548
|
-
function
|
|
1549
|
-
|
|
1551
|
+
function $(Pt, Ki) {
|
|
1552
|
+
P(Pt, g, K({
|
|
1550
1553
|
evt: t,
|
|
1551
1554
|
isOwner: u,
|
|
1552
|
-
axis:
|
|
1555
|
+
axis: f ? "vertical" : "horizontal",
|
|
1553
1556
|
revert: a,
|
|
1554
1557
|
dragRect: r,
|
|
1555
1558
|
targetRect: o,
|
|
@@ -1557,72 +1560,72 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1557
1560
|
fromSortable: p,
|
|
1558
1561
|
target: n,
|
|
1559
1562
|
completed: O,
|
|
1560
|
-
onMove: function(Ze,
|
|
1561
|
-
return ne(x, e, h, r, Ze, T(Ze), t,
|
|
1563
|
+
onMove: function(Ze, Qi) {
|
|
1564
|
+
return ne(x, e, h, r, Ze, T(Ze), t, Qi);
|
|
1562
1565
|
},
|
|
1563
1566
|
changed: Y
|
|
1564
|
-
},
|
|
1567
|
+
}, Ki));
|
|
1565
1568
|
}
|
|
1566
|
-
function
|
|
1567
|
-
|
|
1569
|
+
function N() {
|
|
1570
|
+
$("dragOverAnimationCapture"), g.captureAnimationState(), g !== p && p.captureAnimationState();
|
|
1568
1571
|
}
|
|
1569
|
-
function O(
|
|
1570
|
-
return
|
|
1571
|
-
insertion:
|
|
1572
|
-
}),
|
|
1573
|
-
|
|
1574
|
-
}),
|
|
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;
|
|
1575
1578
|
}
|
|
1576
1579
|
function Y() {
|
|
1577
|
-
|
|
1578
|
-
sortable:
|
|
1580
|
+
F = z(h), at = z(h, s.draggable), M({
|
|
1581
|
+
sortable: g,
|
|
1579
1582
|
name: "change",
|
|
1580
1583
|
toEl: e,
|
|
1581
|
-
newIndex:
|
|
1584
|
+
newIndex: F,
|
|
1582
1585
|
newDraggableIndex: at,
|
|
1583
1586
|
originalEvent: t
|
|
1584
1587
|
});
|
|
1585
1588
|
}
|
|
1586
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = Z(n, s.draggable, e, !0),
|
|
1589
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = Z(n, s.draggable, e, !0), $("dragOver"), y.eventCanceled)
|
|
1587
1590
|
return m;
|
|
1588
|
-
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY ||
|
|
1591
|
+
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || g._ignoreWhileAnimating === n)
|
|
1589
1592
|
return O(!1);
|
|
1590
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))) {
|
|
1591
|
-
if (
|
|
1594
|
+
if (f = this._getDirection(t, n) === "vertical", r = T(h), $("dragOverValid"), y.eventCanceled)
|
|
1592
1595
|
return m;
|
|
1593
1596
|
if (a)
|
|
1594
|
-
return C = x,
|
|
1595
|
-
var
|
|
1596
|
-
if (!
|
|
1597
|
-
if (
|
|
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)
|
|
1598
1601
|
return O(!1);
|
|
1599
|
-
if (
|
|
1600
|
-
return
|
|
1601
|
-
} else if (
|
|
1602
|
-
var dt =
|
|
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);
|
|
1603
1606
|
if (dt === h)
|
|
1604
1607
|
return O(!1);
|
|
1605
1608
|
if (n = dt, o = T(n), ne(x, e, h, r, n, o, t, !1) !== !1)
|
|
1606
|
-
return
|
|
1609
|
+
return N(), e.insertBefore(h, dt), C = e, Y(), O(!0);
|
|
1607
1610
|
} else if (n.parentNode === e) {
|
|
1608
1611
|
o = T(n);
|
|
1609
|
-
var G = 0,
|
|
1610
|
-
|
|
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);
|
|
1611
1614
|
var J;
|
|
1612
1615
|
if (G !== 0) {
|
|
1613
|
-
var
|
|
1616
|
+
var ct = z(h);
|
|
1614
1617
|
do
|
|
1615
|
-
|
|
1618
|
+
ct -= G, J = C.children[ct];
|
|
1616
1619
|
while (J && (v(J, "display") === "none" || J === b));
|
|
1617
1620
|
}
|
|
1618
1621
|
if (G === 0 || J === n)
|
|
1619
1622
|
return O(!1);
|
|
1620
|
-
|
|
1623
|
+
wt = n, jt = G;
|
|
1621
1624
|
var Mt = n.nextElementSibling, ot = !1;
|
|
1622
1625
|
ot = G === 1;
|
|
1623
1626
|
var Jt = ne(x, e, h, r, n, o, t, ot);
|
|
1624
1627
|
if (Jt !== !1)
|
|
1625
|
-
return (Jt === 1 || Jt === -1) && (ot = Jt === 1), Re = !0, setTimeout(
|
|
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);
|
|
1626
1629
|
}
|
|
1627
1630
|
if (e.contains(h))
|
|
1628
1631
|
return O(!1);
|
|
@@ -1639,52 +1642,52 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1639
1642
|
},
|
|
1640
1643
|
_onDrop: function(t) {
|
|
1641
1644
|
var e = this.el, n = this.options;
|
|
1642
|
-
if (
|
|
1645
|
+
if (F = z(h), at = z(h, n.draggable), P("drop", this, {
|
|
1643
1646
|
evt: t
|
|
1644
|
-
}), C = h && h.parentNode,
|
|
1647
|
+
}), C = h && h.parentNode, F = z(h), at = z(h, n.draggable), y.eventCanceled) {
|
|
1645
1648
|
this._nulling();
|
|
1646
1649
|
return;
|
|
1647
1650
|
}
|
|
1648
|
-
|
|
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({
|
|
1649
1652
|
sortable: this,
|
|
1650
1653
|
name: "unchoose",
|
|
1651
1654
|
toEl: C,
|
|
1652
1655
|
newIndex: null,
|
|
1653
1656
|
newDraggableIndex: null,
|
|
1654
1657
|
originalEvent: t
|
|
1655
|
-
}), x !== C ? (
|
|
1658
|
+
}), x !== C ? (F >= 0 && (M({
|
|
1656
1659
|
rootEl: C,
|
|
1657
1660
|
name: "add",
|
|
1658
1661
|
toEl: C,
|
|
1659
1662
|
fromEl: x,
|
|
1660
1663
|
originalEvent: t
|
|
1661
|
-
}),
|
|
1664
|
+
}), M({
|
|
1662
1665
|
sortable: this,
|
|
1663
1666
|
name: "remove",
|
|
1664
1667
|
toEl: C,
|
|
1665
1668
|
originalEvent: t
|
|
1666
|
-
}),
|
|
1669
|
+
}), M({
|
|
1667
1670
|
rootEl: C,
|
|
1668
1671
|
name: "sort",
|
|
1669
1672
|
toEl: C,
|
|
1670
1673
|
fromEl: x,
|
|
1671
1674
|
originalEvent: t
|
|
1672
|
-
}),
|
|
1675
|
+
}), M({
|
|
1673
1676
|
sortable: this,
|
|
1674
1677
|
name: "sort",
|
|
1675
1678
|
toEl: C,
|
|
1676
1679
|
originalEvent: t
|
|
1677
|
-
})), L && L.save()) :
|
|
1680
|
+
})), L && L.save()) : F !== Ct && F >= 0 && (M({
|
|
1678
1681
|
sortable: this,
|
|
1679
1682
|
name: "update",
|
|
1680
1683
|
toEl: C,
|
|
1681
1684
|
originalEvent: t
|
|
1682
|
-
}),
|
|
1685
|
+
}), M({
|
|
1683
1686
|
sortable: this,
|
|
1684
1687
|
name: "sort",
|
|
1685
1688
|
toEl: C,
|
|
1686
1689
|
originalEvent: t
|
|
1687
|
-
})), y.active && ((
|
|
1690
|
+
})), y.active && ((F == null || F === -1) && (F = Ct, at = zt), M({
|
|
1688
1691
|
sortable: this,
|
|
1689
1692
|
name: "end",
|
|
1690
1693
|
toEl: C,
|
|
@@ -1692,7 +1695,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1692
1695
|
}), this.save()))), this._nulling();
|
|
1693
1696
|
},
|
|
1694
1697
|
_nulling: function() {
|
|
1695
|
-
|
|
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) {
|
|
1696
1699
|
t.checked = !0;
|
|
1697
1700
|
}), me.length = Te = Oe = 0;
|
|
1698
1701
|
},
|
|
@@ -1704,7 +1707,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1704
1707
|
break;
|
|
1705
1708
|
case "dragenter":
|
|
1706
1709
|
case "dragover":
|
|
1707
|
-
h && (this._onDragOver(t),
|
|
1710
|
+
h && (this._onDragOver(t), Hn(t));
|
|
1708
1711
|
break;
|
|
1709
1712
|
case "selectstart":
|
|
1710
1713
|
t.preventDefault();
|
|
@@ -1717,7 +1720,7 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1717
1720
|
*/
|
|
1718
1721
|
toArray: function() {
|
|
1719
1722
|
for (var t = [], e, n = this.el.children, r = 0, o = n.length, a = this.options; r < o; r++)
|
|
1720
|
-
e = n[r], Z(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) ||
|
|
1723
|
+
e = n[r], Z(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || Vn(e));
|
|
1721
1724
|
return t;
|
|
1722
1725
|
},
|
|
1723
1726
|
/**
|
|
@@ -1760,21 +1763,21 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1760
1763
|
if (e === void 0)
|
|
1761
1764
|
return n[t];
|
|
1762
1765
|
var r = Qt.modifyOption(this, t, e);
|
|
1763
|
-
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" &&
|
|
1766
|
+
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" && Yi(n);
|
|
1764
1767
|
},
|
|
1765
1768
|
/**
|
|
1766
1769
|
* Destroy
|
|
1767
1770
|
*/
|
|
1768
1771
|
destroy: function() {
|
|
1769
|
-
|
|
1772
|
+
P("destroy", this);
|
|
1770
1773
|
var t = this.el;
|
|
1771
|
-
t[
|
|
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) {
|
|
1772
1775
|
e.removeAttribute("draggable");
|
|
1773
1776
|
}), this._onDrop(), this._disableDelayedDragEvents(), ge.splice(ge.indexOf(this.el), 1), this.el = t = null;
|
|
1774
1777
|
},
|
|
1775
1778
|
_hideClone: function() {
|
|
1776
1779
|
if (!st) {
|
|
1777
|
-
if (
|
|
1780
|
+
if (P("hideClone", this), y.eventCanceled)
|
|
1778
1781
|
return;
|
|
1779
1782
|
v(A, "display", "none"), this.options.removeCloneOnHide && A.parentNode && A.parentNode.removeChild(A), st = !0;
|
|
1780
1783
|
}
|
|
@@ -1785,17 +1788,17 @@ y.prototype = /** @lends Sortable.prototype */
|
|
|
1785
1788
|
return;
|
|
1786
1789
|
}
|
|
1787
1790
|
if (st) {
|
|
1788
|
-
if (
|
|
1791
|
+
if (P("showClone", this), y.eventCanceled)
|
|
1789
1792
|
return;
|
|
1790
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;
|
|
1791
1794
|
}
|
|
1792
1795
|
}
|
|
1793
1796
|
};
|
|
1794
|
-
function
|
|
1797
|
+
function Hn(i) {
|
|
1795
1798
|
i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
|
|
1796
1799
|
}
|
|
1797
1800
|
function ne(i, t, e, n, r, o, a, s) {
|
|
1798
|
-
var l, d = i[
|
|
1801
|
+
var l, d = i[U], u = d.options.onMove, c;
|
|
1799
1802
|
return window.CustomEvent && !nt && !Kt ? l = new CustomEvent("move", {
|
|
1800
1803
|
bubbles: !0,
|
|
1801
1804
|
cancelable: !0
|
|
@@ -1804,39 +1807,39 @@ function ne(i, t, e, n, r, o, a, s) {
|
|
|
1804
1807
|
function He(i) {
|
|
1805
1808
|
i.draggable = !1;
|
|
1806
1809
|
}
|
|
1807
|
-
function
|
|
1810
|
+
function In() {
|
|
1808
1811
|
Re = !1;
|
|
1809
1812
|
}
|
|
1810
|
-
function
|
|
1811
|
-
var n = T(
|
|
1813
|
+
function Mn(i, t, e) {
|
|
1814
|
+
var n = T(Tt(e.el, 0, e.options, !0)), r = 10;
|
|
1812
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;
|
|
1813
1816
|
}
|
|
1814
1817
|
function Pn(i, t, e) {
|
|
1815
1818
|
var n = T(Xe(e.el, e.options.draggable)), r = 10;
|
|
1816
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;
|
|
1817
1820
|
}
|
|
1818
|
-
function
|
|
1821
|
+
function kn(i, t, e, n, r, o, a, s) {
|
|
1819
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;
|
|
1820
1823
|
if (!a) {
|
|
1821
1824
|
if (s && se < d * r) {
|
|
1822
|
-
if (!
|
|
1825
|
+
if (!Yt && (jt === 1 ? l > u + d * o / 2 : l < c - d * o / 2) && (Yt = !0), Yt)
|
|
1823
1826
|
p = !0;
|
|
1824
|
-
else if (
|
|
1825
|
-
return -
|
|
1827
|
+
else if (jt === 1 ? l < u + se : l > c - se)
|
|
1828
|
+
return -jt;
|
|
1826
1829
|
} else if (l > u + d * (1 - r) / 2 && l < c - d * (1 - r) / 2)
|
|
1827
|
-
return
|
|
1830
|
+
return Nn(t);
|
|
1828
1831
|
}
|
|
1829
1832
|
return p = p || a, p && (l < u + d * o / 2 || l > c - d * o / 2) ? l > u + d / 2 ? 1 : -1 : 0;
|
|
1830
1833
|
}
|
|
1831
|
-
function kn(i) {
|
|
1832
|
-
return j(h) < j(i) ? 1 : -1;
|
|
1833
|
-
}
|
|
1834
1834
|
function Nn(i) {
|
|
1835
|
+
return z(h) < z(i) ? 1 : -1;
|
|
1836
|
+
}
|
|
1837
|
+
function Vn(i) {
|
|
1835
1838
|
for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
|
|
1836
1839
|
n += t.charCodeAt(e);
|
|
1837
1840
|
return n.toString(36);
|
|
1838
1841
|
}
|
|
1839
|
-
function
|
|
1842
|
+
function Bn(i) {
|
|
1840
1843
|
me.length = 0;
|
|
1841
1844
|
for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1842
1845
|
var n = t[e];
|
|
@@ -1850,29 +1853,29 @@ function Fe(i) {
|
|
|
1850
1853
|
return clearTimeout(i);
|
|
1851
1854
|
}
|
|
1852
1855
|
ye && E(document, "touchmove", function(i) {
|
|
1853
|
-
(y.active ||
|
|
1856
|
+
(y.active || At) && i.cancelable && i.preventDefault();
|
|
1854
1857
|
});
|
|
1855
1858
|
y.utils = {
|
|
1856
1859
|
on: E,
|
|
1857
1860
|
off: _,
|
|
1858
1861
|
css: v,
|
|
1859
|
-
find:
|
|
1862
|
+
find: Bi,
|
|
1860
1863
|
is: function(t, e) {
|
|
1861
1864
|
return !!Z(t, e, t, !1);
|
|
1862
1865
|
},
|
|
1863
|
-
extend:
|
|
1864
|
-
throttle:
|
|
1866
|
+
extend: En,
|
|
1867
|
+
throttle: Ri,
|
|
1865
1868
|
closest: Z,
|
|
1866
|
-
toggleClass:
|
|
1867
|
-
clone:
|
|
1868
|
-
index:
|
|
1869
|
+
toggleClass: R,
|
|
1870
|
+
clone: Ui,
|
|
1871
|
+
index: z,
|
|
1869
1872
|
nextTick: le,
|
|
1870
1873
|
cancelNextTick: Fe,
|
|
1871
|
-
detectDirection:
|
|
1872
|
-
getChild:
|
|
1874
|
+
detectDirection: ji,
|
|
1875
|
+
getChild: Tt
|
|
1873
1876
|
};
|
|
1874
1877
|
y.get = function(i) {
|
|
1875
|
-
return i[
|
|
1878
|
+
return i[U];
|
|
1876
1879
|
};
|
|
1877
1880
|
y.mount = function() {
|
|
1878
1881
|
for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
|
|
@@ -1886,9 +1889,9 @@ y.mount = function() {
|
|
|
1886
1889
|
y.create = function(i, t) {
|
|
1887
1890
|
return new y(i, t);
|
|
1888
1891
|
};
|
|
1889
|
-
y.version =
|
|
1890
|
-
var
|
|
1891
|
-
function
|
|
1892
|
+
y.version = yn;
|
|
1893
|
+
var S = [], Bt, Ue, ze = !1, Ie, Me, ve, Rt;
|
|
1894
|
+
function Rn() {
|
|
1892
1895
|
function i() {
|
|
1893
1896
|
this.defaults = {
|
|
1894
1897
|
scroll: !0,
|
|
@@ -1910,29 +1913,29 @@ function Bn() {
|
|
|
1910
1913
|
!this.options.dragOverBubble && !n.rootEl && this._handleAutoScroll(n);
|
|
1911
1914
|
},
|
|
1912
1915
|
drop: function() {
|
|
1913
|
-
this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : (_(document, "pointermove", this._handleFallbackAutoScroll), _(document, "touchmove", this._handleFallbackAutoScroll), _(document, "mousemove", this._handleFallbackAutoScroll)), yi(), de(),
|
|
1916
|
+
this.sortable.nativeDraggable ? _(document, "dragover", this._handleAutoScroll) : (_(document, "pointermove", this._handleFallbackAutoScroll), _(document, "touchmove", this._handleFallbackAutoScroll), _(document, "mousemove", this._handleFallbackAutoScroll)), yi(), de(), wn();
|
|
1914
1917
|
},
|
|
1915
1918
|
nulling: function() {
|
|
1916
|
-
ve = Ue =
|
|
1919
|
+
ve = Ue = Bt = ze = Rt = Ie = Me = null, S.length = 0;
|
|
1917
1920
|
},
|
|
1918
1921
|
_handleFallbackAutoScroll: function(e) {
|
|
1919
1922
|
this._handleAutoScroll(e, !0);
|
|
1920
1923
|
},
|
|
1921
1924
|
_handleAutoScroll: function(e, n) {
|
|
1922
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);
|
|
1923
|
-
if (ve = e, n || this.options.forceAutoScrollFallback || Kt || nt ||
|
|
1924
|
-
|
|
1926
|
+
if (ve = e, n || this.options.forceAutoScrollFallback || Kt || nt || Ft) {
|
|
1927
|
+
Pe(e, this.options, s, n);
|
|
1925
1928
|
var l = lt(s, !0);
|
|
1926
|
-
ze && (!
|
|
1929
|
+
ze && (!Rt || o !== Ie || a !== Me) && (Rt && yi(), Rt = setInterval(function() {
|
|
1927
1930
|
var d = lt(document.elementFromPoint(o, a), !0);
|
|
1928
|
-
d !== l && (l = d, de()),
|
|
1929
|
-
}, 10), Ie = o,
|
|
1931
|
+
d !== l && (l = d, de()), Pe(e, r.options, d, n);
|
|
1932
|
+
}, 10), Ie = o, Me = a);
|
|
1930
1933
|
} else {
|
|
1931
1934
|
if (!this.options.bubbleScroll || lt(s, !0) === q()) {
|
|
1932
1935
|
de();
|
|
1933
1936
|
return;
|
|
1934
1937
|
}
|
|
1935
|
-
|
|
1938
|
+
Pe(e, this.options, lt(s, !1), !1);
|
|
1936
1939
|
}
|
|
1937
1940
|
}
|
|
1938
1941
|
}, it(i, {
|
|
@@ -1941,36 +1944,36 @@ function Bn() {
|
|
|
1941
1944
|
});
|
|
1942
1945
|
}
|
|
1943
1946
|
function de() {
|
|
1944
|
-
|
|
1947
|
+
S.forEach(function(i) {
|
|
1945
1948
|
clearInterval(i.pid);
|
|
1946
|
-
}),
|
|
1949
|
+
}), S = [];
|
|
1947
1950
|
}
|
|
1948
1951
|
function yi() {
|
|
1949
|
-
clearInterval(
|
|
1952
|
+
clearInterval(Rt);
|
|
1950
1953
|
}
|
|
1951
|
-
var
|
|
1954
|
+
var Pe = Ri(function(i, t, e, n) {
|
|
1952
1955
|
if (t.scroll) {
|
|
1953
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;
|
|
1954
|
-
Ue !== e && (Ue = e, de(),
|
|
1955
|
-
var c = 0, p =
|
|
1957
|
+
Ue !== e && (Ue = e, de(), Bt = t.scroll, u = t.scrollFn, Bt === !0 && (Bt = lt(e, !0)));
|
|
1958
|
+
var c = 0, p = Bt;
|
|
1956
1959
|
do {
|
|
1957
|
-
var
|
|
1958
|
-
|
|
1959
|
-
var
|
|
1960
|
-
if (!
|
|
1961
|
-
for (var
|
|
1962
|
-
|
|
1963
|
-
(
|
|
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() {
|
|
1964
1967
|
n && this.layer === 0 && y.active._onTouchMove(ve);
|
|
1965
|
-
var Mt =
|
|
1966
|
-
typeof u == "function" && u.call(y.dragged.parentNode[
|
|
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);
|
|
1967
1970
|
}.bind({
|
|
1968
1971
|
layer: c
|
|
1969
1972
|
}), 24))), c++;
|
|
1970
1973
|
} while (t.bubbleScroll && p !== l && (p = lt(p, !1)));
|
|
1971
1974
|
ze = d;
|
|
1972
1975
|
}
|
|
1973
|
-
}, 30),
|
|
1976
|
+
}, 30), Gi = function(t) {
|
|
1974
1977
|
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, a = t.dispatchSortableEvent, s = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
1975
1978
|
if (e) {
|
|
1976
1979
|
var d = n || o;
|
|
@@ -1993,10 +1996,10 @@ We.prototype = {
|
|
|
1993
1996
|
onSpill: function(t) {
|
|
1994
1997
|
var e = t.dragEl, n = t.putSortable;
|
|
1995
1998
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1996
|
-
var r =
|
|
1999
|
+
var r = Tt(this.sortable.el, this.startIndex, this.options);
|
|
1997
2000
|
r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
|
|
1998
2001
|
},
|
|
1999
|
-
drop:
|
|
2002
|
+
drop: Gi
|
|
2000
2003
|
};
|
|
2001
2004
|
it(We, {
|
|
2002
2005
|
pluginName: "revertOnSpill"
|
|
@@ -2008,14 +2011,14 @@ Ge.prototype = {
|
|
|
2008
2011
|
var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
|
|
2009
2012
|
r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
|
|
2010
2013
|
},
|
|
2011
|
-
drop:
|
|
2014
|
+
drop: Gi
|
|
2012
2015
|
};
|
|
2013
2016
|
it(Ge, {
|
|
2014
2017
|
pluginName: "removeOnSpill"
|
|
2015
2018
|
});
|
|
2016
|
-
y.mount(new
|
|
2019
|
+
y.mount(new Rn());
|
|
2017
2020
|
y.mount(Ge, We);
|
|
2018
|
-
const
|
|
2021
|
+
const Zi = `
|
|
2019
2022
|
:host {
|
|
2020
2023
|
display: block;
|
|
2021
2024
|
overflow-y: auto;
|
|
@@ -2028,7 +2031,7 @@ const Gi = `
|
|
|
2028
2031
|
ul[data-group] {
|
|
2029
2032
|
padding-inline-start: 40px;
|
|
2030
2033
|
}
|
|
2031
|
-
`,
|
|
2034
|
+
`, Fn = `
|
|
2032
2035
|
button {
|
|
2033
2036
|
/* TODO: why does this only work here and not from :root? */
|
|
2034
2037
|
--primary-color: #004170;
|
|
@@ -2036,6 +2039,7 @@ button {
|
|
|
2036
2039
|
--error-color: #FF5252;
|
|
2037
2040
|
|
|
2038
2041
|
display: inline-flex;
|
|
2042
|
+
position: relative;
|
|
2039
2043
|
align-items: center;
|
|
2040
2044
|
color: #fff;
|
|
2041
2045
|
border-width: 0;
|
|
@@ -2110,7 +2114,7 @@ button.small {
|
|
|
2110
2114
|
padding: 12.4px;
|
|
2111
2115
|
font-size: .75rem;
|
|
2112
2116
|
}
|
|
2113
|
-
`,
|
|
2117
|
+
`, Un = `
|
|
2114
2118
|
input[type="range"] {
|
|
2115
2119
|
-webkit-appearance: none;
|
|
2116
2120
|
width: 90%;
|
|
@@ -2187,15 +2191,23 @@ input[type="range"]:focus::-webkit-slider-thumb {
|
|
|
2187
2191
|
input::-moz-focus-inner, input::-moz-focus-outer {
|
|
2188
2192
|
border: 0;
|
|
2189
2193
|
}
|
|
2190
|
-
`,
|
|
2194
|
+
`, zn = `
|
|
2191
2195
|
input[type=radio] {
|
|
2192
2196
|
appearance: none;
|
|
2197
|
+
-webkit-appearance: none;
|
|
2193
2198
|
margin: 0;
|
|
2194
2199
|
cursor: pointer;
|
|
2195
2200
|
display: flex;
|
|
2196
2201
|
flex-direction: row;
|
|
2197
2202
|
align-items: center;
|
|
2203
|
+
width: 24px;
|
|
2204
|
+
height: 24px;
|
|
2205
|
+
}
|
|
2206
|
+
|
|
2207
|
+
label span {
|
|
2208
|
+
font-size: small;
|
|
2198
2209
|
}
|
|
2210
|
+
|
|
2199
2211
|
input[type=radio]:after {
|
|
2200
2212
|
display: block;
|
|
2201
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");
|
|
@@ -2207,14 +2219,17 @@ input[type=radio]:checked:after {
|
|
|
2207
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");
|
|
2208
2220
|
|
|
2209
2221
|
}
|
|
2210
|
-
`,
|
|
2222
|
+
`, jn = `
|
|
2211
2223
|
input[type=checkbox] {
|
|
2212
2224
|
appearance: none;
|
|
2225
|
+
-webkit-appearance: none;
|
|
2213
2226
|
margin: 0;
|
|
2214
2227
|
cursor: pointer;
|
|
2215
2228
|
display: flex;
|
|
2216
2229
|
flex-direction: row;
|
|
2217
2230
|
align-items: center;
|
|
2231
|
+
width: 24px;
|
|
2232
|
+
height: 24px;
|
|
2218
2233
|
}
|
|
2219
2234
|
input[type=checkbox]:after {
|
|
2220
2235
|
display: block;
|
|
@@ -2227,15 +2242,15 @@ input[type=checkbox]:checked:after {
|
|
|
2227
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");
|
|
2228
2243
|
|
|
2229
2244
|
}
|
|
2230
|
-
`,
|
|
2245
|
+
`, qi = `
|
|
2231
2246
|
* {
|
|
2232
2247
|
font-family: Roboto, sans-serif;
|
|
2233
2248
|
}
|
|
2234
2249
|
|
|
2235
|
-
${Rn}
|
|
2236
2250
|
${Fn}
|
|
2237
2251
|
${Un}
|
|
2238
2252
|
${zn}
|
|
2253
|
+
${jn}
|
|
2239
2254
|
|
|
2240
2255
|
summary > .layer {
|
|
2241
2256
|
min-height: 36px;
|
|
@@ -2247,7 +2262,6 @@ summary > .layer {
|
|
|
2247
2262
|
|
|
2248
2263
|
ul[data-group] {
|
|
2249
2264
|
overflow-y: auto;
|
|
2250
|
-
max-height: calc(var(--container-height) * 0.3);
|
|
2251
2265
|
}
|
|
2252
2266
|
|
|
2253
2267
|
[data-type=group] .title {
|
|
@@ -2277,6 +2291,24 @@ ul[data-group] {
|
|
|
2277
2291
|
margin-top: 9px;
|
|
2278
2292
|
}
|
|
2279
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
|
+
|
|
2280
2312
|
label[for=optional] {
|
|
2281
2313
|
font-size: 21px;
|
|
2282
2314
|
font-weight: 400;
|
|
@@ -2475,12 +2507,12 @@ li.sortable-drag {
|
|
|
2475
2507
|
li.sortable-ghost {
|
|
2476
2508
|
}
|
|
2477
2509
|
`;
|
|
2478
|
-
var
|
|
2479
|
-
for (var r = n > 1 ? void 0 : n ?
|
|
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--)
|
|
2480
2512
|
(a = i[o]) && (r = (n ? a(t, e, r) : a(r)) || r);
|
|
2481
|
-
return n && r &&
|
|
2513
|
+
return n && r && Yn(t, e, r), r;
|
|
2482
2514
|
};
|
|
2483
|
-
let
|
|
2515
|
+
let j = class extends $t {
|
|
2484
2516
|
constructor() {
|
|
2485
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) => {
|
|
2486
2518
|
let n = [];
|
|
@@ -2507,16 +2539,19 @@ let k = class extends St {
|
|
|
2507
2539
|
};
|
|
2508
2540
|
}
|
|
2509
2541
|
_updateControl(i) {
|
|
2510
|
-
const t = (e) => {
|
|
2511
|
-
e.forEach((
|
|
2512
|
-
n.get(this.layerIdentifier) ||
|
|
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
|
+
);
|
|
2513
2548
|
});
|
|
2514
2549
|
};
|
|
2515
2550
|
t(i.getArray()), this.layerCollection = i, this.optionalLayerArray = this.filterLayers(
|
|
2516
2551
|
i.getArray(),
|
|
2517
2552
|
"layerControlOptional",
|
|
2518
2553
|
!0
|
|
2519
|
-
)
|
|
2554
|
+
);
|
|
2520
2555
|
}
|
|
2521
2556
|
_emitLayerconfig(i) {
|
|
2522
2557
|
const t = {
|
|
@@ -2554,23 +2589,8 @@ let k = class extends St {
|
|
|
2554
2589
|
(n) => n.get(this.layerIdentifier) !== i.get(this.layerIdentifier) && n.get("layerControlExclusive")
|
|
2555
2590
|
), e.forEach((n) => {
|
|
2556
2591
|
n.setVisible(!1);
|
|
2557
|
-
});
|
|
2592
|
+
}), this.requestUpdate();
|
|
2558
2593
|
}
|
|
2559
|
-
this.requestUpdate();
|
|
2560
|
-
}
|
|
2561
|
-
// Set up Resize Observer
|
|
2562
|
-
firstUpdated() {
|
|
2563
|
-
this.resizeObserver = new ResizeObserver((i) => {
|
|
2564
|
-
for (let t of i)
|
|
2565
|
-
t.target === this && (this.style.setProperty(
|
|
2566
|
-
"--container-height",
|
|
2567
|
-
`${t.contentRect.height}px`
|
|
2568
|
-
), this.requestUpdate());
|
|
2569
|
-
}), this.resizeObserver.observe(this);
|
|
2570
|
-
}
|
|
2571
|
-
// Deinitialize Resize Observer
|
|
2572
|
-
disconnectedCallback() {
|
|
2573
|
-
this.resizeObserver && (this.resizeObserver.disconnect(), this.resizeObserver = null), super.disconnectedCallback();
|
|
2574
2594
|
}
|
|
2575
2595
|
render() {
|
|
2576
2596
|
var a;
|
|
@@ -2581,7 +2601,9 @@ let k = class extends St {
|
|
|
2581
2601
|
this._updateControl(t);
|
|
2582
2602
|
const e = (s) => {
|
|
2583
2603
|
s.on("change:length", () => {
|
|
2584
|
-
this._currentlySorting ||
|
|
2604
|
+
this._currentlySorting || setTimeout(() => {
|
|
2605
|
+
this._updateControl(s);
|
|
2606
|
+
});
|
|
2585
2607
|
});
|
|
2586
2608
|
};
|
|
2587
2609
|
e(t);
|
|
@@ -2594,10 +2616,10 @@ let k = class extends St {
|
|
|
2594
2616
|
});
|
|
2595
2617
|
};
|
|
2596
2618
|
n(t);
|
|
2597
|
-
const r = (s, l) => {
|
|
2598
|
-
var
|
|
2619
|
+
const r = (s, l, d) => {
|
|
2620
|
+
var u;
|
|
2599
2621
|
return H`
|
|
2600
|
-
<details open="${s.get("
|
|
2622
|
+
<details open="${s.get("layerControlExpand") ? !0 : w}">
|
|
2601
2623
|
<summary>
|
|
2602
2624
|
<div class="layer">
|
|
2603
2625
|
<div class="left">
|
|
@@ -2630,9 +2652,17 @@ let k = class extends St {
|
|
|
2630
2652
|
.layer=${s}
|
|
2631
2653
|
.external=${this.externalLayerConfig}
|
|
2632
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
|
+
}}
|
|
2633
2663
|
></eox-layerconfig>
|
|
2634
2664
|
` : w}
|
|
2635
|
-
${this.externalLayerConfig && ((
|
|
2665
|
+
${this.externalLayerConfig && ((u = s.style_) != null && u.color) ? H`
|
|
2636
2666
|
<button @click=${() => this._emitLayerconfig(s)}>
|
|
2637
2667
|
configure
|
|
2638
2668
|
</button>
|
|
@@ -2644,26 +2674,27 @@ let k = class extends St {
|
|
|
2644
2674
|
...s.getLayers().getArray()
|
|
2645
2675
|
].reverse()
|
|
2646
2676
|
),
|
|
2647
|
-
s.get(this.layerIdentifier)
|
|
2677
|
+
s.get(this.layerIdentifier),
|
|
2678
|
+
s.getLayers()
|
|
2648
2679
|
)}
|
|
2649
2680
|
` : w}
|
|
2650
2681
|
</details>
|
|
2651
2682
|
`;
|
|
2652
|
-
}, o = (s, l) => H`
|
|
2683
|
+
}, o = (s, l, d) => H`
|
|
2653
2684
|
<ul data-group="${l ?? w}">
|
|
2654
2685
|
${Ve(
|
|
2655
2686
|
s,
|
|
2656
|
-
(
|
|
2657
|
-
(
|
|
2658
|
-
var
|
|
2687
|
+
(u) => u.get(this.layerIdentifier),
|
|
2688
|
+
(u) => {
|
|
2689
|
+
var c;
|
|
2659
2690
|
return H`
|
|
2660
2691
|
<li
|
|
2661
|
-
data-layer="${
|
|
2662
|
-
data-disabled="${
|
|
2663
|
-
data-type="${this.getLayerType(
|
|
2664
|
-
data-layerconfig="${((
|
|
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}"
|
|
2665
2696
|
>
|
|
2666
|
-
${r(
|
|
2697
|
+
${r(u, l, d)}
|
|
2667
2698
|
</li>
|
|
2668
2699
|
`;
|
|
2669
2700
|
}
|
|
@@ -2672,15 +2703,17 @@ let k = class extends St {
|
|
|
2672
2703
|
`;
|
|
2673
2704
|
return H`
|
|
2674
2705
|
<style>
|
|
2675
|
-
${
|
|
2676
|
-
${!this.unstyled &&
|
|
2706
|
+
${Zi}
|
|
2707
|
+
${!this.unstyled && qi}
|
|
2677
2708
|
</style>
|
|
2678
2709
|
<div>
|
|
2679
2710
|
<slot></slot>
|
|
2680
2711
|
${this.layerCollection.getArray().length > 10 ? H`<input type="text" placeholder="Find layer" />` : w}
|
|
2681
2712
|
<div class="layers">
|
|
2682
2713
|
${o(
|
|
2683
|
-
this.preFilterLayers(t.getArray())
|
|
2714
|
+
this.preFilterLayers(t.getArray()),
|
|
2715
|
+
null,
|
|
2716
|
+
this.layerCollection
|
|
2684
2717
|
)}
|
|
2685
2718
|
</div>
|
|
2686
2719
|
${Pi(
|
|
@@ -2705,10 +2738,10 @@ let k = class extends St {
|
|
|
2705
2738
|
const s = this.optionalLayerArray.find(
|
|
2706
2739
|
(l) => l.get(this.layerIdentifier) === this.shadowRoot.querySelector("select[name=optional]").value
|
|
2707
2740
|
);
|
|
2708
|
-
if (s.get("
|
|
2741
|
+
if (s.get("_group_id")) {
|
|
2709
2742
|
const l = this.findLayerById(
|
|
2710
2743
|
this.layerCollection.getArray(),
|
|
2711
|
-
s.get("
|
|
2744
|
+
s.get("_group_id")
|
|
2712
2745
|
);
|
|
2713
2746
|
l.getLayers().remove(s), l.getLayers().insertAt(l.getLayers().getLength(), s);
|
|
2714
2747
|
} else
|
|
@@ -2742,9 +2775,9 @@ let k = class extends St {
|
|
|
2742
2775
|
const n = this.findLayerById(
|
|
2743
2776
|
this.layerCollection.getArray(),
|
|
2744
2777
|
e
|
|
2745
|
-
)
|
|
2746
|
-
return
|
|
2747
|
-
...
|
|
2778
|
+
);
|
|
2779
|
+
return n ? [
|
|
2780
|
+
...n.getLayers().getArray().map((o) => o.get(this.layerIdentifier))
|
|
2748
2781
|
].reverse() : void 0;
|
|
2749
2782
|
} else
|
|
2750
2783
|
return [
|
|
@@ -2754,10 +2787,13 @@ let k = class extends St {
|
|
|
2754
2787
|
set: (n) => {
|
|
2755
2788
|
n.toArray().reverse().forEach((o, a) => {
|
|
2756
2789
|
if (e) {
|
|
2757
|
-
const
|
|
2790
|
+
const s = this.findLayerById(
|
|
2758
2791
|
this.layerCollection.getArray(),
|
|
2759
2792
|
e
|
|
2760
|
-
)
|
|
2793
|
+
);
|
|
2794
|
+
if (!s)
|
|
2795
|
+
return;
|
|
2796
|
+
const l = s.getLayers(), d = this.findLayerById(
|
|
2761
2797
|
l.getArray(),
|
|
2762
2798
|
o
|
|
2763
2799
|
);
|
|
@@ -2777,46 +2813,40 @@ let k = class extends St {
|
|
|
2777
2813
|
});
|
|
2778
2814
|
}
|
|
2779
2815
|
};
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
],
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
],
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
],
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
],
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
],
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
],
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
],
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
],
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
],
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
],
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
],
|
|
2813
|
-
$
|
|
2814
|
-
N({ type: Boolean })
|
|
2815
|
-
], k.prototype, "unstyled", 2);
|
|
2816
|
-
k = $([
|
|
2817
|
-
Oi("eox-layercontrol")
|
|
2818
|
-
], k);
|
|
2819
|
-
let Q = class extends St {
|
|
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 {
|
|
2820
2850
|
constructor() {
|
|
2821
2851
|
super(...arguments), this._configList = {};
|
|
2822
2852
|
}
|
|
@@ -2844,14 +2874,21 @@ let Q = class extends St {
|
|
|
2844
2874
|
render() {
|
|
2845
2875
|
return H`
|
|
2846
2876
|
<style>
|
|
2847
|
-
${
|
|
2848
|
-
${!this.unstyled &&
|
|
2877
|
+
${Zi}
|
|
2878
|
+
${!this.unstyled && qi}
|
|
2849
2879
|
</style>
|
|
2850
2880
|
${Pi(
|
|
2851
2881
|
this._currentLayer,
|
|
2852
2882
|
() => H`
|
|
2853
2883
|
<div>
|
|
2854
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>
|
|
2855
2892
|
${this.for ? H`layer: ${this._currentLayer.get("name")}` : w}
|
|
2856
2893
|
${Ve(
|
|
2857
2894
|
this.layerConfig.filter(
|
|
@@ -2899,34 +2936,34 @@ let Q = class extends St {
|
|
|
2899
2936
|
`;
|
|
2900
2937
|
}
|
|
2901
2938
|
};
|
|
2902
|
-
|
|
2903
|
-
|
|
2939
|
+
D([
|
|
2940
|
+
k()
|
|
2904
2941
|
], Q.prototype, "for", 2);
|
|
2905
|
-
|
|
2906
|
-
|
|
2942
|
+
D([
|
|
2943
|
+
k({ type: Array })
|
|
2907
2944
|
], Q.prototype, "layerConfig", 2);
|
|
2908
|
-
|
|
2909
|
-
|
|
2945
|
+
D([
|
|
2946
|
+
k({ type: Object, attribute: !1 })
|
|
2910
2947
|
], Q.prototype, "layerControl", 2);
|
|
2911
|
-
|
|
2912
|
-
|
|
2948
|
+
D([
|
|
2949
|
+
k({ type: Object, attribute: !1 })
|
|
2913
2950
|
], Q.prototype, "layer", 2);
|
|
2914
|
-
|
|
2915
|
-
|
|
2951
|
+
D([
|
|
2952
|
+
k({ type: Boolean })
|
|
2916
2953
|
], Q.prototype, "external", 2);
|
|
2917
|
-
|
|
2918
|
-
|
|
2954
|
+
D([
|
|
2955
|
+
k({ type: Boolean })
|
|
2919
2956
|
], Q.prototype, "unstyled", 2);
|
|
2920
|
-
|
|
2921
|
-
|
|
2957
|
+
D([
|
|
2958
|
+
qt()
|
|
2922
2959
|
], Q.prototype, "_currentLayer", 2);
|
|
2923
|
-
|
|
2924
|
-
|
|
2960
|
+
D([
|
|
2961
|
+
qt()
|
|
2925
2962
|
], Q.prototype, "_configList", 2);
|
|
2926
|
-
Q =
|
|
2927
|
-
|
|
2963
|
+
Q = D([
|
|
2964
|
+
Li("eox-layerconfig")
|
|
2928
2965
|
], Q);
|
|
2929
2966
|
export {
|
|
2930
2967
|
Q as EOxLayerConfig,
|
|
2931
|
-
|
|
2968
|
+
j as EOxLayerControl
|
|
2932
2969
|
};
|