@eox/layercontrol 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/eox-layercontrol.js +917 -863
- package/dist/eox-layercontrol.umd.cjs +105 -86
- package/package.json +1 -1
package/dist/eox-layercontrol.js
CHANGED
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
var Sn = Object.defineProperty;
|
|
2
|
-
var Dn = (i, t, e) => t in i ? Sn(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
|
-
var C = (i, t, e) => (Dn(i, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
1
|
/**
|
|
5
2
|
* @license
|
|
6
3
|
* Copyright 2019 Google LLC
|
|
7
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
8
5
|
*/
|
|
9
|
-
const
|
|
6
|
+
const Bt = window, $e = Bt.ShadowRoot && (Bt.ShadyCSS === void 0 || Bt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Ze = Symbol(), Oe = /* @__PURE__ */ new WeakMap();
|
|
10
7
|
let $n = class {
|
|
11
8
|
constructor(t, e, n) {
|
|
12
|
-
if (this._$cssResult$ = !0, n !==
|
|
9
|
+
if (this._$cssResult$ = !0, n !== Ze)
|
|
13
10
|
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
14
11
|
this.cssText = t, this.t = e;
|
|
15
12
|
}
|
|
16
13
|
get styleSheet() {
|
|
17
14
|
let t = this.o;
|
|
18
15
|
const e = this.t;
|
|
19
|
-
if (
|
|
16
|
+
if ($e && t === void 0) {
|
|
20
17
|
const n = e !== void 0 && e.length === 1;
|
|
21
|
-
n && (t =
|
|
18
|
+
n && (t = Oe.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), n && Oe.set(e, t));
|
|
22
19
|
}
|
|
23
20
|
return t;
|
|
24
21
|
}
|
|
@@ -26,27 +23,27 @@ let $n = class {
|
|
|
26
23
|
return this.cssText;
|
|
27
24
|
}
|
|
28
25
|
};
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
const n = document.createElement("style"),
|
|
32
|
-
|
|
26
|
+
const wn = (i) => new $n(typeof i == "string" ? i : i + "", void 0, Ze), Cn = (i, t) => {
|
|
27
|
+
$e ? i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => {
|
|
28
|
+
const n = document.createElement("style"), r = Bt.litNonce;
|
|
29
|
+
r !== void 0 && n.setAttribute("nonce", r), n.textContent = e.cssText, i.appendChild(n);
|
|
33
30
|
});
|
|
34
|
-
},
|
|
31
|
+
}, xe = $e ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
|
|
35
32
|
let e = "";
|
|
36
33
|
for (const n of t.cssRules)
|
|
37
34
|
e += n.cssText;
|
|
38
|
-
return
|
|
35
|
+
return wn(e);
|
|
39
36
|
})(i) : i;
|
|
40
37
|
/**
|
|
41
38
|
* @license
|
|
42
39
|
* Copyright 2017 Google LLC
|
|
43
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
44
41
|
*/
|
|
45
|
-
var
|
|
46
|
-
const
|
|
42
|
+
var ne;
|
|
43
|
+
const Xt = window, Pe = Xt.trustedTypes, Sn = Pe ? Pe.emptyScript : "", Ie = Xt.reactiveElementPolyfillSupport, me = { toAttribute(i, t) {
|
|
47
44
|
switch (t) {
|
|
48
45
|
case Boolean:
|
|
49
|
-
i = i ?
|
|
46
|
+
i = i ? Sn : null;
|
|
50
47
|
break;
|
|
51
48
|
case Object:
|
|
52
49
|
case Array:
|
|
@@ -71,7 +68,7 @@ const Vt = window, Oe = Vt.trustedTypes, Tn = Oe ? Oe.emptyScript : "", Le = Vt.
|
|
|
71
68
|
}
|
|
72
69
|
}
|
|
73
70
|
return e;
|
|
74
|
-
} }, Ke = (i, t) => t !== i && (t == t || i == i),
|
|
71
|
+
} }, Ke = (i, t) => t !== i && (t == t || i == i), ie = { attribute: !0, type: String, converter: me, reflect: !1, hasChanged: Ke }, ve = "finalized";
|
|
75
72
|
let ht = class extends HTMLElement {
|
|
76
73
|
constructor() {
|
|
77
74
|
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this.u();
|
|
@@ -84,36 +81,36 @@ let ht = class extends HTMLElement {
|
|
|
84
81
|
this.finalize();
|
|
85
82
|
const t = [];
|
|
86
83
|
return this.elementProperties.forEach((e, n) => {
|
|
87
|
-
const
|
|
88
|
-
|
|
84
|
+
const r = this._$Ep(n, e);
|
|
85
|
+
r !== void 0 && (this._$Ev.set(r, n), t.push(r));
|
|
89
86
|
}), t;
|
|
90
87
|
}
|
|
91
|
-
static createProperty(t, e =
|
|
88
|
+
static createProperty(t, e = ie) {
|
|
92
89
|
if (e.state && (e.attribute = !1), this.finalize(), this.elementProperties.set(t, e), !e.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
93
|
-
const n = typeof t == "symbol" ? Symbol() : "__" + t,
|
|
94
|
-
|
|
90
|
+
const n = typeof t == "symbol" ? Symbol() : "__" + t, r = this.getPropertyDescriptor(t, n, e);
|
|
91
|
+
r !== void 0 && Object.defineProperty(this.prototype, t, r);
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
94
|
static getPropertyDescriptor(t, e, n) {
|
|
98
95
|
return { get() {
|
|
99
96
|
return this[e];
|
|
100
|
-
}, set(
|
|
101
|
-
const
|
|
102
|
-
this[e] =
|
|
97
|
+
}, set(r) {
|
|
98
|
+
const o = this[t];
|
|
99
|
+
this[e] = r, this.requestUpdate(t, o, n);
|
|
103
100
|
}, configurable: !0, enumerable: !0 };
|
|
104
101
|
}
|
|
105
102
|
static getPropertyOptions(t) {
|
|
106
|
-
return this.elementProperties.get(t) ||
|
|
103
|
+
return this.elementProperties.get(t) || ie;
|
|
107
104
|
}
|
|
108
105
|
static finalize() {
|
|
109
|
-
if (this.hasOwnProperty(
|
|
106
|
+
if (this.hasOwnProperty(ve))
|
|
110
107
|
return !1;
|
|
111
|
-
this[
|
|
108
|
+
this[ve] = !0;
|
|
112
109
|
const t = Object.getPrototypeOf(this);
|
|
113
110
|
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
114
111
|
const e = this.properties, n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
115
|
-
for (const
|
|
116
|
-
this.createProperty(
|
|
112
|
+
for (const r of n)
|
|
113
|
+
this.createProperty(r, e[r]);
|
|
117
114
|
}
|
|
118
115
|
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
119
116
|
}
|
|
@@ -121,10 +118,10 @@ let ht = class extends HTMLElement {
|
|
|
121
118
|
const e = [];
|
|
122
119
|
if (Array.isArray(t)) {
|
|
123
120
|
const n = new Set(t.flat(1 / 0).reverse());
|
|
124
|
-
for (const
|
|
125
|
-
e.unshift(
|
|
121
|
+
for (const r of n)
|
|
122
|
+
e.unshift(xe(r));
|
|
126
123
|
} else
|
|
127
|
-
t !== void 0 && e.push(
|
|
124
|
+
t !== void 0 && e.push(xe(t));
|
|
128
125
|
return e;
|
|
129
126
|
}
|
|
130
127
|
static _$Ep(t, e) {
|
|
@@ -151,7 +148,7 @@ let ht = class extends HTMLElement {
|
|
|
151
148
|
createRenderRoot() {
|
|
152
149
|
var t;
|
|
153
150
|
const e = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
154
|
-
return
|
|
151
|
+
return Cn(e, this.constructor.elementStyles), e;
|
|
155
152
|
}
|
|
156
153
|
connectedCallback() {
|
|
157
154
|
var t;
|
|
@@ -172,25 +169,25 @@ let ht = class extends HTMLElement {
|
|
|
172
169
|
attributeChangedCallback(t, e, n) {
|
|
173
170
|
this._$AK(t, n);
|
|
174
171
|
}
|
|
175
|
-
_$EO(t, e, n =
|
|
176
|
-
var
|
|
177
|
-
const
|
|
178
|
-
if (
|
|
179
|
-
const a = (((
|
|
180
|
-
this._$El = t, a == null ? this.removeAttribute(
|
|
172
|
+
_$EO(t, e, n = ie) {
|
|
173
|
+
var r;
|
|
174
|
+
const o = this.constructor._$Ep(t, n);
|
|
175
|
+
if (o !== void 0 && n.reflect === !0) {
|
|
176
|
+
const a = (((r = n.converter) === null || r === void 0 ? void 0 : r.toAttribute) !== void 0 ? n.converter : me).toAttribute(e, n.type);
|
|
177
|
+
this._$El = t, a == null ? this.removeAttribute(o) : this.setAttribute(o, a), this._$El = null;
|
|
181
178
|
}
|
|
182
179
|
}
|
|
183
180
|
_$AK(t, e) {
|
|
184
181
|
var n;
|
|
185
|
-
const
|
|
186
|
-
if (
|
|
187
|
-
const a =
|
|
188
|
-
this._$El =
|
|
182
|
+
const r = this.constructor, o = r._$Ev.get(t);
|
|
183
|
+
if (o !== void 0 && this._$El !== o) {
|
|
184
|
+
const a = r.getPropertyOptions(o), s = typeof a.converter == "function" ? { fromAttribute: a.converter } : ((n = a.converter) === null || n === void 0 ? void 0 : n.fromAttribute) !== void 0 ? a.converter : me;
|
|
185
|
+
this._$El = o, this[o] = s.fromAttribute(e, a.type), this._$El = null;
|
|
189
186
|
}
|
|
190
187
|
}
|
|
191
188
|
requestUpdate(t, e, n) {
|
|
192
|
-
let
|
|
193
|
-
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || Ke)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) :
|
|
189
|
+
let r = !0;
|
|
190
|
+
t !== void 0 && (((n = n || this.constructor.getPropertyOptions(t)).hasChanged || Ke)(this[t], e) ? (this._$AL.has(t) || this._$AL.set(t, e), n.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, n))) : r = !1), !this.isUpdatePending && r && (this._$E_ = this._$Ej());
|
|
194
191
|
}
|
|
195
192
|
async _$Ej() {
|
|
196
193
|
this.isUpdatePending = !0;
|
|
@@ -209,16 +206,16 @@ let ht = class extends HTMLElement {
|
|
|
209
206
|
var t;
|
|
210
207
|
if (!this.isUpdatePending)
|
|
211
208
|
return;
|
|
212
|
-
this.hasUpdated, this._$Ei && (this._$Ei.forEach((
|
|
209
|
+
this.hasUpdated, this._$Ei && (this._$Ei.forEach((r, o) => this[o] = r), this._$Ei = void 0);
|
|
213
210
|
let e = !1;
|
|
214
211
|
const n = this._$AL;
|
|
215
212
|
try {
|
|
216
|
-
e = this.shouldUpdate(n), e ? (this.willUpdate(n), (t = this._$ES) === null || t === void 0 || t.forEach((
|
|
217
|
-
var
|
|
218
|
-
return (
|
|
213
|
+
e = this.shouldUpdate(n), e ? (this.willUpdate(n), (t = this._$ES) === null || t === void 0 || t.forEach((r) => {
|
|
214
|
+
var o;
|
|
215
|
+
return (o = r.hostUpdate) === null || o === void 0 ? void 0 : o.call(r);
|
|
219
216
|
}), this.update(n)) : this._$Ek();
|
|
220
|
-
} catch (
|
|
221
|
-
throw e = !1, this._$Ek(),
|
|
217
|
+
} catch (r) {
|
|
218
|
+
throw e = !1, this._$Ek(), r;
|
|
222
219
|
}
|
|
223
220
|
e && this._$AE(n);
|
|
224
221
|
}
|
|
@@ -227,8 +224,8 @@ let ht = class extends HTMLElement {
|
|
|
227
224
|
_$AE(t) {
|
|
228
225
|
var e;
|
|
229
226
|
(e = this._$ES) === null || e === void 0 || e.forEach((n) => {
|
|
230
|
-
var
|
|
231
|
-
return (
|
|
227
|
+
var r;
|
|
228
|
+
return (r = n.hostUpdated) === null || r === void 0 ? void 0 : r.call(n);
|
|
232
229
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
233
230
|
}
|
|
234
231
|
_$Ek() {
|
|
@@ -251,91 +248,91 @@ let ht = class extends HTMLElement {
|
|
|
251
248
|
firstUpdated(t) {
|
|
252
249
|
}
|
|
253
250
|
};
|
|
254
|
-
ht[
|
|
251
|
+
ht[ve] = !0, ht.elementProperties = /* @__PURE__ */ new Map(), ht.elementStyles = [], ht.shadowRootOptions = { mode: "open" }, Ie == null || Ie({ ReactiveElement: ht }), ((ne = Xt.reactiveElementVersions) !== null && ne !== void 0 ? ne : Xt.reactiveElementVersions = []).push("1.6.2");
|
|
255
252
|
/**
|
|
256
253
|
* @license
|
|
257
254
|
* Copyright 2017 Google LLC
|
|
258
255
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
259
256
|
*/
|
|
260
257
|
var re;
|
|
261
|
-
const
|
|
262
|
-
\f\r]`,
|
|
263
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
258
|
+
const Wt = window, gt = Wt.trustedTypes, Ne = gt ? gt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, ye = "$lit$", G = `lit$${(Math.random() + "").slice(9)}$`, Je = "?" + G, An = `<${Je}>`, at = document, Ot = () => at.createComment(""), xt = (i) => i === null || typeof i != "object" && typeof i != "function", Qe = Array.isArray, Dn = (i) => Qe(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", oe = `[
|
|
259
|
+
\f\r]`, Ct = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Le = /-->/g, Me = />/g, et = RegExp(`>|${oe}(?:([^\\s"'>=/]+)(${oe}*=${oe}*(?:[^
|
|
260
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), He = /'/g, ke = /"/g, tn = /^(?:script|style|textarea|title)$/i, Tn = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), I = Tn(1), mt = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), Re = /* @__PURE__ */ new WeakMap(), ot = at.createTreeWalker(at, 129, null, !1), On = (i, t) => {
|
|
264
261
|
const e = i.length - 1, n = [];
|
|
265
|
-
let
|
|
266
|
-
for (let
|
|
267
|
-
const d = i[
|
|
268
|
-
let c,
|
|
269
|
-
for (;
|
|
270
|
-
|
|
271
|
-
const y = a ===
|
|
272
|
-
|
|
273
|
-
}
|
|
274
|
-
const
|
|
262
|
+
let r, o = t === 2 ? "<svg>" : "", a = Ct;
|
|
263
|
+
for (let l = 0; l < e; l++) {
|
|
264
|
+
const d = i[l];
|
|
265
|
+
let c, u, f = -1, _ = 0;
|
|
266
|
+
for (; _ < d.length && (a.lastIndex = _, u = a.exec(d), u !== null); )
|
|
267
|
+
_ = a.lastIndex, a === Ct ? u[1] === "!--" ? a = Le : u[1] !== void 0 ? a = Me : u[2] !== void 0 ? (tn.test(u[2]) && (r = RegExp("</" + u[2], "g")), a = et) : u[3] !== void 0 && (a = et) : a === et ? u[0] === ">" ? (a = r ?? Ct, f = -1) : u[1] === void 0 ? f = -2 : (f = a.lastIndex - u[2].length, c = u[1], a = u[3] === void 0 ? et : u[3] === '"' ? ke : He) : a === ke || a === He ? a = et : a === Le || a === Me ? a = Ct : (a = et, r = void 0);
|
|
268
|
+
const y = a === et && i[l + 1].startsWith("/>") ? " " : "";
|
|
269
|
+
o += a === Ct ? d + An : f >= 0 ? (n.push(c), d.slice(0, f) + ye + d.slice(f) + G + y) : d + G + (f === -2 ? (n.push(void 0), l) : y);
|
|
270
|
+
}
|
|
271
|
+
const s = o + (i[e] || "<?>") + (t === 2 ? "</svg>" : "");
|
|
275
272
|
if (!Array.isArray(i) || !i.hasOwnProperty("raw"))
|
|
276
273
|
throw Error("invalid template strings array");
|
|
277
|
-
return [
|
|
274
|
+
return [Ne !== void 0 ? Ne.createHTML(s) : s, n];
|
|
278
275
|
};
|
|
279
|
-
class
|
|
276
|
+
class Pt {
|
|
280
277
|
constructor({ strings: t, _$litType$: e }, n) {
|
|
281
|
-
let
|
|
278
|
+
let r;
|
|
282
279
|
this.parts = [];
|
|
283
|
-
let
|
|
284
|
-
const
|
|
285
|
-
if (this.el =
|
|
286
|
-
const
|
|
287
|
-
f.remove(),
|
|
280
|
+
let o = 0, a = 0;
|
|
281
|
+
const s = t.length - 1, l = this.parts, [d, c] = On(t, e);
|
|
282
|
+
if (this.el = Pt.createElement(d, n), ot.currentNode = this.el.content, e === 2) {
|
|
283
|
+
const u = this.el.content, f = u.firstChild;
|
|
284
|
+
f.remove(), u.append(...f.childNodes);
|
|
288
285
|
}
|
|
289
|
-
for (; (
|
|
290
|
-
if (
|
|
291
|
-
if (
|
|
292
|
-
const
|
|
293
|
-
for (const f of
|
|
294
|
-
if (f.endsWith(
|
|
295
|
-
const
|
|
296
|
-
if (
|
|
297
|
-
const y =
|
|
298
|
-
|
|
286
|
+
for (; (r = ot.nextNode()) !== null && l.length < s; ) {
|
|
287
|
+
if (r.nodeType === 1) {
|
|
288
|
+
if (r.hasAttributes()) {
|
|
289
|
+
const u = [];
|
|
290
|
+
for (const f of r.getAttributeNames())
|
|
291
|
+
if (f.endsWith(ye) || f.startsWith(G)) {
|
|
292
|
+
const _ = c[a++];
|
|
293
|
+
if (u.push(f), _ !== void 0) {
|
|
294
|
+
const y = r.getAttribute(_.toLowerCase() + ye).split(G), v = /([.?@])?(.*)/.exec(_);
|
|
295
|
+
l.push({ type: 1, index: o, name: v[2], strings: y, ctor: v[1] === "." ? Pn : v[1] === "?" ? Nn : v[1] === "@" ? Ln : Kt });
|
|
299
296
|
} else
|
|
300
|
-
|
|
297
|
+
l.push({ type: 6, index: o });
|
|
301
298
|
}
|
|
302
|
-
for (const f of
|
|
303
|
-
|
|
299
|
+
for (const f of u)
|
|
300
|
+
r.removeAttribute(f);
|
|
304
301
|
}
|
|
305
|
-
if (
|
|
306
|
-
const
|
|
302
|
+
if (tn.test(r.tagName)) {
|
|
303
|
+
const u = r.textContent.split(G), f = u.length - 1;
|
|
307
304
|
if (f > 0) {
|
|
308
|
-
|
|
309
|
-
for (let
|
|
310
|
-
|
|
311
|
-
|
|
305
|
+
r.textContent = gt ? gt.emptyScript : "";
|
|
306
|
+
for (let _ = 0; _ < f; _++)
|
|
307
|
+
r.append(u[_], Ot()), ot.nextNode(), l.push({ type: 2, index: ++o });
|
|
308
|
+
r.append(u[f], Ot());
|
|
312
309
|
}
|
|
313
310
|
}
|
|
314
|
-
} else if (
|
|
315
|
-
if (
|
|
316
|
-
|
|
311
|
+
} else if (r.nodeType === 8)
|
|
312
|
+
if (r.data === Je)
|
|
313
|
+
l.push({ type: 2, index: o });
|
|
317
314
|
else {
|
|
318
|
-
let
|
|
319
|
-
for (; (
|
|
320
|
-
|
|
315
|
+
let u = -1;
|
|
316
|
+
for (; (u = r.data.indexOf(G, u + 1)) !== -1; )
|
|
317
|
+
l.push({ type: 7, index: o }), u += G.length - 1;
|
|
321
318
|
}
|
|
322
|
-
|
|
319
|
+
o++;
|
|
323
320
|
}
|
|
324
321
|
}
|
|
325
322
|
static createElement(t, e) {
|
|
326
|
-
const n =
|
|
323
|
+
const n = at.createElement("template");
|
|
327
324
|
return n.innerHTML = t, n;
|
|
328
325
|
}
|
|
329
326
|
}
|
|
330
|
-
function
|
|
331
|
-
var
|
|
332
|
-
if (t ===
|
|
327
|
+
function vt(i, t, e = i, n) {
|
|
328
|
+
var r, o, a, s;
|
|
329
|
+
if (t === mt)
|
|
333
330
|
return t;
|
|
334
|
-
let
|
|
335
|
-
const d =
|
|
336
|
-
return (
|
|
331
|
+
let l = n !== void 0 ? (r = e._$Co) === null || r === void 0 ? void 0 : r[n] : e._$Cl;
|
|
332
|
+
const d = xt(t) ? void 0 : t._$litDirective$;
|
|
333
|
+
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 = vt(i, l._$AS(i, t.values), l, n)), t;
|
|
337
334
|
}
|
|
338
|
-
class
|
|
335
|
+
class xn {
|
|
339
336
|
constructor(t, e) {
|
|
340
337
|
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
341
338
|
}
|
|
@@ -347,17 +344,17 @@ class On {
|
|
|
347
344
|
}
|
|
348
345
|
u(t) {
|
|
349
346
|
var e;
|
|
350
|
-
const { el: { content: n }, parts:
|
|
351
|
-
|
|
352
|
-
let a =
|
|
347
|
+
const { el: { content: n }, parts: r } = this._$AD, o = ((e = t == null ? void 0 : t.creationScope) !== null && e !== void 0 ? e : at).importNode(n, !0);
|
|
348
|
+
ot.currentNode = o;
|
|
349
|
+
let a = ot.nextNode(), s = 0, l = 0, d = r[0];
|
|
353
350
|
for (; d !== void 0; ) {
|
|
354
|
-
if (
|
|
351
|
+
if (s === d.index) {
|
|
355
352
|
let c;
|
|
356
|
-
d.type === 2 ? c = new
|
|
353
|
+
d.type === 2 ? c = new It(a, a.nextSibling, this, t) : d.type === 1 ? c = new d.ctor(a, d.name, d.strings, this, t) : d.type === 6 && (c = new Mn(a, this, t)), this._$AV.push(c), d = r[++l];
|
|
357
354
|
}
|
|
358
|
-
|
|
355
|
+
s !== (d == null ? void 0 : d.index) && (a = ot.nextNode(), s++);
|
|
359
356
|
}
|
|
360
|
-
return
|
|
357
|
+
return ot.currentNode = at, o;
|
|
361
358
|
}
|
|
362
359
|
v(t) {
|
|
363
360
|
let e = 0;
|
|
@@ -365,10 +362,10 @@ class On {
|
|
|
365
362
|
n !== void 0 && (n.strings !== void 0 ? (n._$AI(t, n, e), e += n.strings.length - 2) : n._$AI(t[e])), e++;
|
|
366
363
|
}
|
|
367
364
|
}
|
|
368
|
-
class
|
|
369
|
-
constructor(t, e, n,
|
|
370
|
-
var
|
|
371
|
-
this.type = 2, this._$AH =
|
|
365
|
+
class It {
|
|
366
|
+
constructor(t, e, n, r) {
|
|
367
|
+
var o;
|
|
368
|
+
this.type = 2, this._$AH = E, 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;
|
|
372
369
|
}
|
|
373
370
|
get _$AU() {
|
|
374
371
|
var t, e;
|
|
@@ -386,7 +383,7 @@ class Ot {
|
|
|
386
383
|
return this._$AB;
|
|
387
384
|
}
|
|
388
385
|
_$AI(t, e = this) {
|
|
389
|
-
t =
|
|
386
|
+
t = vt(this, t, e), xt(t) ? t === E || t == null || t === "" ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== mt && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Dn(t) ? this.T(t) : this._(t);
|
|
390
387
|
}
|
|
391
388
|
k(t) {
|
|
392
389
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -395,35 +392,35 @@ class Ot {
|
|
|
395
392
|
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
396
393
|
}
|
|
397
394
|
_(t) {
|
|
398
|
-
this._$AH !==
|
|
395
|
+
this._$AH !== E && xt(this._$AH) ? this._$AA.nextSibling.data = t : this.$(at.createTextNode(t)), this._$AH = t;
|
|
399
396
|
}
|
|
400
397
|
g(t) {
|
|
401
398
|
var e;
|
|
402
|
-
const { values: n, _$litType$:
|
|
403
|
-
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) ===
|
|
399
|
+
const { values: n, _$litType$: r } = t, o = typeof r == "number" ? this._$AC(t) : (r.el === void 0 && (r.el = Pt.createElement(r.h, this.options)), r);
|
|
400
|
+
if (((e = this._$AH) === null || e === void 0 ? void 0 : e._$AD) === o)
|
|
404
401
|
this._$AH.v(n);
|
|
405
402
|
else {
|
|
406
|
-
const a = new
|
|
407
|
-
a.v(n), this.$(
|
|
403
|
+
const a = new xn(o, this), s = a.u(this.options);
|
|
404
|
+
a.v(n), this.$(s), this._$AH = a;
|
|
408
405
|
}
|
|
409
406
|
}
|
|
410
407
|
_$AC(t) {
|
|
411
|
-
let e =
|
|
412
|
-
return e === void 0 &&
|
|
408
|
+
let e = Re.get(t.strings);
|
|
409
|
+
return e === void 0 && Re.set(t.strings, e = new Pt(t)), e;
|
|
413
410
|
}
|
|
414
411
|
T(t) {
|
|
415
|
-
|
|
412
|
+
Qe(this._$AH) || (this._$AH = [], this._$AR());
|
|
416
413
|
const e = this._$AH;
|
|
417
|
-
let n,
|
|
418
|
-
for (const
|
|
419
|
-
|
|
420
|
-
|
|
414
|
+
let n, r = 0;
|
|
415
|
+
for (const o of t)
|
|
416
|
+
r === e.length ? e.push(n = new It(this.k(Ot()), this.k(Ot()), this, this.options)) : n = e[r], n._$AI(o), r++;
|
|
417
|
+
r < e.length && (this._$AR(n && n._$AB.nextSibling, r), e.length = r);
|
|
421
418
|
}
|
|
422
419
|
_$AR(t = this._$AA.nextSibling, e) {
|
|
423
420
|
var n;
|
|
424
421
|
for ((n = this._$AP) === null || n === void 0 || n.call(this, !1, !0, e); t && t !== this._$AB; ) {
|
|
425
|
-
const
|
|
426
|
-
t.remove(), t =
|
|
422
|
+
const r = t.nextSibling;
|
|
423
|
+
t.remove(), t = r;
|
|
427
424
|
}
|
|
428
425
|
}
|
|
429
426
|
setConnected(t) {
|
|
@@ -431,9 +428,9 @@ class Ot {
|
|
|
431
428
|
this._$AM === void 0 && (this._$Cp = t, (e = this._$AP) === null || e === void 0 || e.call(this, t));
|
|
432
429
|
}
|
|
433
430
|
}
|
|
434
|
-
class
|
|
435
|
-
constructor(t, e, n,
|
|
436
|
-
this.type = 1, this._$AH =
|
|
431
|
+
class Kt {
|
|
432
|
+
constructor(t, e, n, r, o) {
|
|
433
|
+
this.type = 1, this._$AH = E, 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 = E;
|
|
437
434
|
}
|
|
438
435
|
get tagName() {
|
|
439
436
|
return this.element.tagName;
|
|
@@ -441,57 +438,57 @@ class Jt {
|
|
|
441
438
|
get _$AU() {
|
|
442
439
|
return this._$AM._$AU;
|
|
443
440
|
}
|
|
444
|
-
_$AI(t, e = this, n,
|
|
445
|
-
const
|
|
441
|
+
_$AI(t, e = this, n, r) {
|
|
442
|
+
const o = this.strings;
|
|
446
443
|
let a = !1;
|
|
447
|
-
if (
|
|
448
|
-
t =
|
|
444
|
+
if (o === void 0)
|
|
445
|
+
t = vt(this, t, e, 0), a = !xt(t) || t !== this._$AH && t !== mt, a && (this._$AH = t);
|
|
449
446
|
else {
|
|
450
|
-
const
|
|
451
|
-
let
|
|
452
|
-
for (t =
|
|
453
|
-
d =
|
|
447
|
+
const s = t;
|
|
448
|
+
let l, d;
|
|
449
|
+
for (t = o[0], l = 0; l < o.length - 1; l++)
|
|
450
|
+
d = vt(this, s[n + l], e, l), d === mt && (d = this._$AH[l]), a || (a = !xt(d) || d !== this._$AH[l]), d === E ? t = E : t !== E && (t += (d ?? "") + o[l + 1]), this._$AH[l] = d;
|
|
454
451
|
}
|
|
455
|
-
a && !
|
|
452
|
+
a && !r && this.j(t);
|
|
456
453
|
}
|
|
457
454
|
j(t) {
|
|
458
|
-
t ===
|
|
455
|
+
t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
459
456
|
}
|
|
460
457
|
}
|
|
461
|
-
class
|
|
458
|
+
class Pn extends Kt {
|
|
462
459
|
constructor() {
|
|
463
460
|
super(...arguments), this.type = 3;
|
|
464
461
|
}
|
|
465
462
|
j(t) {
|
|
466
|
-
this.element[this.name] = t ===
|
|
463
|
+
this.element[this.name] = t === E ? void 0 : t;
|
|
467
464
|
}
|
|
468
465
|
}
|
|
469
|
-
const
|
|
470
|
-
class
|
|
466
|
+
const In = gt ? gt.emptyScript : "";
|
|
467
|
+
class Nn extends Kt {
|
|
471
468
|
constructor() {
|
|
472
469
|
super(...arguments), this.type = 4;
|
|
473
470
|
}
|
|
474
471
|
j(t) {
|
|
475
|
-
t && t !==
|
|
472
|
+
t && t !== E ? this.element.setAttribute(this.name, In) : this.element.removeAttribute(this.name);
|
|
476
473
|
}
|
|
477
474
|
}
|
|
478
|
-
class
|
|
479
|
-
constructor(t, e, n,
|
|
480
|
-
super(t, e, n,
|
|
475
|
+
class Ln extends Kt {
|
|
476
|
+
constructor(t, e, n, r, o) {
|
|
477
|
+
super(t, e, n, r, o), this.type = 5;
|
|
481
478
|
}
|
|
482
479
|
_$AI(t, e = this) {
|
|
483
480
|
var n;
|
|
484
|
-
if ((t = (n =
|
|
481
|
+
if ((t = (n = vt(this, t, e, 0)) !== null && n !== void 0 ? n : E) === mt)
|
|
485
482
|
return;
|
|
486
|
-
const
|
|
487
|
-
|
|
483
|
+
const r = this._$AH, o = t === E && r !== E || t.capture !== r.capture || t.once !== r.once || t.passive !== r.passive, a = t !== E && (r === E || o);
|
|
484
|
+
o && this.element.removeEventListener(this.name, this, r), a && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
488
485
|
}
|
|
489
486
|
handleEvent(t) {
|
|
490
487
|
var e, n;
|
|
491
488
|
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);
|
|
492
489
|
}
|
|
493
490
|
}
|
|
494
|
-
class
|
|
491
|
+
class Mn {
|
|
495
492
|
constructor(t, e, n) {
|
|
496
493
|
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = n;
|
|
497
494
|
}
|
|
@@ -499,18 +496,18 @@ class Un {
|
|
|
499
496
|
return this._$AM._$AU;
|
|
500
497
|
}
|
|
501
498
|
_$AI(t) {
|
|
502
|
-
|
|
499
|
+
vt(this, t);
|
|
503
500
|
}
|
|
504
501
|
}
|
|
505
|
-
const
|
|
506
|
-
|
|
502
|
+
const Be = Wt.litHtmlPolyfillSupport;
|
|
503
|
+
Be == null || Be(Pt, It), ((re = Wt.litHtmlVersions) !== null && re !== void 0 ? re : Wt.litHtmlVersions = []).push("2.7.4");
|
|
507
504
|
const Hn = (i, t, e) => {
|
|
508
|
-
var n,
|
|
509
|
-
const
|
|
510
|
-
let a =
|
|
505
|
+
var n, r;
|
|
506
|
+
const o = (n = e == null ? void 0 : e.renderBefore) !== null && n !== void 0 ? n : t;
|
|
507
|
+
let a = o._$litPart$;
|
|
511
508
|
if (a === void 0) {
|
|
512
|
-
const
|
|
513
|
-
|
|
509
|
+
const s = (r = e == null ? void 0 : e.renderBefore) !== null && r !== void 0 ? r : null;
|
|
510
|
+
o._$litPart$ = a = new It(t.insertBefore(Ot(), s), s, void 0, e ?? {});
|
|
514
511
|
}
|
|
515
512
|
return a._$AI(i), a;
|
|
516
513
|
};
|
|
@@ -519,8 +516,8 @@ const Hn = (i, t, e) => {
|
|
|
519
516
|
* Copyright 2017 Google LLC
|
|
520
517
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
521
518
|
*/
|
|
522
|
-
var
|
|
523
|
-
class
|
|
519
|
+
var ae, se;
|
|
520
|
+
class ft extends ht {
|
|
524
521
|
constructor() {
|
|
525
522
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
526
523
|
}
|
|
@@ -542,21 +539,21 @@ class pt extends ht {
|
|
|
542
539
|
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
543
540
|
}
|
|
544
541
|
render() {
|
|
545
|
-
return
|
|
542
|
+
return mt;
|
|
546
543
|
}
|
|
547
544
|
}
|
|
548
|
-
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
((
|
|
545
|
+
ft.finalized = !0, ft._$litElement$ = !0, (ae = globalThis.litElementHydrateSupport) === null || ae === void 0 || ae.call(globalThis, { LitElement: ft });
|
|
546
|
+
const Ue = globalThis.litElementPolyfillSupport;
|
|
547
|
+
Ue == null || Ue({ LitElement: ft });
|
|
548
|
+
((se = globalThis.litElementVersions) !== null && se !== void 0 ? se : globalThis.litElementVersions = []).push("3.3.2");
|
|
552
549
|
/**
|
|
553
550
|
* @license
|
|
554
551
|
* Copyright 2017 Google LLC
|
|
555
552
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
553
|
*/
|
|
557
|
-
const
|
|
558
|
-
const { kind:
|
|
559
|
-
return { kind:
|
|
554
|
+
const en = (i) => (t) => typeof t == "function" ? ((e, n) => (customElements.define(e, n), n))(i, t) : ((e, n) => {
|
|
555
|
+
const { kind: r, elements: o } = n;
|
|
556
|
+
return { kind: r, elements: o, finisher(a) {
|
|
560
557
|
customElements.define(e, a);
|
|
561
558
|
} };
|
|
562
559
|
})(i, t);
|
|
@@ -590,8 +587,8 @@ function _t(i) {
|
|
|
590
587
|
* Copyright 2021 Google LLC
|
|
591
588
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
592
589
|
*/
|
|
593
|
-
var
|
|
594
|
-
((
|
|
590
|
+
var le;
|
|
591
|
+
((le = window.HTMLSlotElement) === null || le === void 0 ? void 0 : le.prototype.assignedElements) != null;
|
|
595
592
|
/**
|
|
596
593
|
* @license
|
|
597
594
|
* Copyright 2021 Google LLC
|
|
@@ -609,7 +606,7 @@ function* _e(i, t) {
|
|
|
609
606
|
* Copyright 2021 Google LLC
|
|
610
607
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
611
608
|
*/
|
|
612
|
-
function
|
|
609
|
+
function nn(i, t, e) {
|
|
613
610
|
return i ? t() : e == null ? void 0 : e();
|
|
614
611
|
}
|
|
615
612
|
/**!
|
|
@@ -618,34 +615,34 @@ function be(i, t, e) {
|
|
|
618
615
|
* @author owenm <owen23355@gmail.com>
|
|
619
616
|
* @license MIT
|
|
620
617
|
*/
|
|
621
|
-
function
|
|
618
|
+
function Ve(i, t) {
|
|
622
619
|
var e = Object.keys(i);
|
|
623
620
|
if (Object.getOwnPropertySymbols) {
|
|
624
621
|
var n = Object.getOwnPropertySymbols(i);
|
|
625
|
-
t && (n = n.filter(function(
|
|
626
|
-
return Object.getOwnPropertyDescriptor(i,
|
|
622
|
+
t && (n = n.filter(function(r) {
|
|
623
|
+
return Object.getOwnPropertyDescriptor(i, r).enumerable;
|
|
627
624
|
})), e.push.apply(e, n);
|
|
628
625
|
}
|
|
629
626
|
return e;
|
|
630
627
|
}
|
|
631
|
-
function
|
|
628
|
+
function F(i) {
|
|
632
629
|
for (var t = 1; t < arguments.length; t++) {
|
|
633
630
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
634
|
-
t % 2 ?
|
|
631
|
+
t % 2 ? Ve(Object(e), !0).forEach(function(n) {
|
|
635
632
|
Bn(i, n, e[n]);
|
|
636
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) :
|
|
633
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(e)) : Ve(Object(e)).forEach(function(n) {
|
|
637
634
|
Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(e, n));
|
|
638
635
|
});
|
|
639
636
|
}
|
|
640
637
|
return i;
|
|
641
638
|
}
|
|
642
|
-
function
|
|
639
|
+
function Ut(i) {
|
|
643
640
|
"@babel/helpers - typeof";
|
|
644
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ?
|
|
641
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Ut = function(t) {
|
|
645
642
|
return typeof t;
|
|
646
|
-
} :
|
|
643
|
+
} : Ut = function(t) {
|
|
647
644
|
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
|
648
|
-
},
|
|
645
|
+
}, Ut(i);
|
|
649
646
|
}
|
|
650
647
|
function Bn(i, t, e) {
|
|
651
648
|
return t in i ? Object.defineProperty(i, t, {
|
|
@@ -655,51 +652,51 @@ function Bn(i, t, e) {
|
|
|
655
652
|
writable: !0
|
|
656
653
|
}) : i[t] = e, i;
|
|
657
654
|
}
|
|
658
|
-
function
|
|
659
|
-
return
|
|
655
|
+
function K() {
|
|
656
|
+
return K = Object.assign || function(i) {
|
|
660
657
|
for (var t = 1; t < arguments.length; t++) {
|
|
661
658
|
var e = arguments[t];
|
|
662
659
|
for (var n in e)
|
|
663
660
|
Object.prototype.hasOwnProperty.call(e, n) && (i[n] = e[n]);
|
|
664
661
|
}
|
|
665
662
|
return i;
|
|
666
|
-
},
|
|
663
|
+
}, K.apply(this, arguments);
|
|
667
664
|
}
|
|
668
|
-
function
|
|
665
|
+
function Un(i, t) {
|
|
669
666
|
if (i == null)
|
|
670
667
|
return {};
|
|
671
|
-
var e = {}, n = Object.keys(i),
|
|
672
|
-
for (
|
|
673
|
-
|
|
668
|
+
var e = {}, n = Object.keys(i), r, o;
|
|
669
|
+
for (o = 0; o < n.length; o++)
|
|
670
|
+
r = n[o], !(t.indexOf(r) >= 0) && (e[r] = i[r]);
|
|
674
671
|
return e;
|
|
675
672
|
}
|
|
676
|
-
function
|
|
673
|
+
function Vn(i, t) {
|
|
677
674
|
if (i == null)
|
|
678
675
|
return {};
|
|
679
|
-
var e =
|
|
676
|
+
var e = Un(i, t), n, r;
|
|
680
677
|
if (Object.getOwnPropertySymbols) {
|
|
681
|
-
var
|
|
682
|
-
for (
|
|
683
|
-
n = r
|
|
678
|
+
var o = Object.getOwnPropertySymbols(i);
|
|
679
|
+
for (r = 0; r < o.length; r++)
|
|
680
|
+
n = o[r], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(i, n) && (e[n] = i[n]);
|
|
684
681
|
}
|
|
685
682
|
return e;
|
|
686
683
|
}
|
|
687
684
|
var Fn = "1.15.0";
|
|
688
|
-
function
|
|
685
|
+
function X(i) {
|
|
689
686
|
if (typeof window < "u" && window.navigator)
|
|
690
687
|
return !!/* @__PURE__ */ navigator.userAgent.match(i);
|
|
691
688
|
}
|
|
692
|
-
var
|
|
689
|
+
var J = X(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Jt = X(/Edge/i), Fe = X(/firefox/i), Vt = X(/safari/i) && !X(/chrome/i) && !X(/android/i), rn = X(/iP(ad|od|hone)/i), on = X(/chrome/i) && X(/android/i), an = {
|
|
693
690
|
capture: !1,
|
|
694
691
|
passive: !1
|
|
695
692
|
};
|
|
696
|
-
function
|
|
697
|
-
i.addEventListener(t, e, !
|
|
693
|
+
function $(i, t, e) {
|
|
694
|
+
i.addEventListener(t, e, !J && an);
|
|
698
695
|
}
|
|
699
|
-
function
|
|
700
|
-
i.removeEventListener(t, e, !
|
|
696
|
+
function b(i, t, e) {
|
|
697
|
+
i.removeEventListener(t, e, !J && an);
|
|
701
698
|
}
|
|
702
|
-
function
|
|
699
|
+
function Yt(i, t) {
|
|
703
700
|
if (t) {
|
|
704
701
|
if (t[0] === ">" && (t = t.substring(1)), i)
|
|
705
702
|
try {
|
|
@@ -715,29 +712,29 @@ function Gt(i, t) {
|
|
|
715
712
|
return !1;
|
|
716
713
|
}
|
|
717
714
|
}
|
|
718
|
-
function
|
|
715
|
+
function jn(i) {
|
|
719
716
|
return i.host && i !== document && i.host.nodeType ? i.host : i.parentNode;
|
|
720
717
|
}
|
|
721
|
-
function
|
|
718
|
+
function V(i, t, e, n) {
|
|
722
719
|
if (i) {
|
|
723
720
|
e = e || document;
|
|
724
721
|
do {
|
|
725
|
-
if (t != null && (t[0] === ">" ? i.parentNode === e &&
|
|
722
|
+
if (t != null && (t[0] === ">" ? i.parentNode === e && Yt(i, t) : Yt(i, t)) || n && i === e)
|
|
726
723
|
return i;
|
|
727
724
|
if (i === e)
|
|
728
725
|
break;
|
|
729
|
-
} while (i =
|
|
726
|
+
} while (i = jn(i));
|
|
730
727
|
}
|
|
731
728
|
return null;
|
|
732
729
|
}
|
|
733
|
-
var
|
|
734
|
-
function
|
|
730
|
+
var je = /\s+/g;
|
|
731
|
+
function L(i, t, e) {
|
|
735
732
|
if (i && t)
|
|
736
733
|
if (i.classList)
|
|
737
734
|
i.classList[e ? "add" : "remove"](t);
|
|
738
735
|
else {
|
|
739
|
-
var n = (" " + i.className + " ").replace(
|
|
740
|
-
i.className = (n + (e ? " " + t : "")).replace(
|
|
736
|
+
var n = (" " + i.className + " ").replace(je, " ").replace(" " + t + " ", " ");
|
|
737
|
+
i.className = (n + (e ? " " + t : "")).replace(je, " ");
|
|
741
738
|
}
|
|
742
739
|
}
|
|
743
740
|
function p(i, t, e) {
|
|
@@ -748,7 +745,7 @@ function p(i, t, e) {
|
|
|
748
745
|
!(t in n) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), n[t] = e + (typeof e == "string" ? "" : "px");
|
|
749
746
|
}
|
|
750
747
|
}
|
|
751
|
-
function
|
|
748
|
+
function pt(i, t) {
|
|
752
749
|
var e = "";
|
|
753
750
|
if (typeof i == "string")
|
|
754
751
|
e = i;
|
|
@@ -757,93 +754,93 @@ function gt(i, t) {
|
|
|
757
754
|
var n = p(i, "transform");
|
|
758
755
|
n && n !== "none" && (e = n + " " + e);
|
|
759
756
|
} while (!t && (i = i.parentNode));
|
|
760
|
-
var
|
|
761
|
-
return
|
|
757
|
+
var r = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
758
|
+
return r && new r(e);
|
|
762
759
|
}
|
|
763
|
-
function
|
|
760
|
+
function sn(i, t, e) {
|
|
764
761
|
if (i) {
|
|
765
|
-
var n = i.getElementsByTagName(t),
|
|
762
|
+
var n = i.getElementsByTagName(t), r = 0, o = n.length;
|
|
766
763
|
if (e)
|
|
767
|
-
for (;
|
|
768
|
-
e(n[
|
|
764
|
+
for (; r < o; r++)
|
|
765
|
+
e(n[r], r);
|
|
769
766
|
return n;
|
|
770
767
|
}
|
|
771
768
|
return [];
|
|
772
769
|
}
|
|
773
|
-
function
|
|
770
|
+
function Z() {
|
|
774
771
|
var i = document.scrollingElement;
|
|
775
772
|
return i || document.documentElement;
|
|
776
773
|
}
|
|
777
|
-
function
|
|
774
|
+
function D(i, t, e, n, r) {
|
|
778
775
|
if (!(!i.getBoundingClientRect && i !== window)) {
|
|
779
|
-
var
|
|
780
|
-
if (i !== window && i.parentNode && i !==
|
|
776
|
+
var o, a, s, l, d, c, u;
|
|
777
|
+
if (i !== window && i.parentNode && i !== Z() ? (o = i.getBoundingClientRect(), a = o.top, s = o.left, l = o.bottom, d = o.right, c = o.height, u = o.width) : (a = 0, s = 0, l = window.innerHeight, d = window.innerWidth, c = window.innerHeight, u = window.innerWidth), (t || e) && i !== window && (r = r || i.parentNode, !J))
|
|
781
778
|
do
|
|
782
|
-
if (
|
|
783
|
-
var f =
|
|
784
|
-
a -= f.top + parseInt(p(
|
|
779
|
+
if (r && r.getBoundingClientRect && (p(r, "transform") !== "none" || e && p(r, "position") !== "static")) {
|
|
780
|
+
var f = r.getBoundingClientRect();
|
|
781
|
+
a -= f.top + parseInt(p(r, "border-top-width")), s -= f.left + parseInt(p(r, "border-left-width")), l = a + o.height, d = s + o.width;
|
|
785
782
|
break;
|
|
786
783
|
}
|
|
787
|
-
while (
|
|
784
|
+
while (r = r.parentNode);
|
|
788
785
|
if (n && i !== window) {
|
|
789
|
-
var
|
|
790
|
-
|
|
786
|
+
var _ = pt(r || i), y = _ && _.a, v = _ && _.d;
|
|
787
|
+
_ && (a /= v, s /= y, u /= y, c /= v, l = a + c, d = s + u);
|
|
791
788
|
}
|
|
792
789
|
return {
|
|
793
790
|
top: a,
|
|
794
|
-
left:
|
|
795
|
-
bottom:
|
|
791
|
+
left: s,
|
|
792
|
+
bottom: l,
|
|
796
793
|
right: d,
|
|
797
|
-
width:
|
|
794
|
+
width: u,
|
|
798
795
|
height: c
|
|
799
796
|
};
|
|
800
797
|
}
|
|
801
798
|
}
|
|
802
|
-
function
|
|
803
|
-
for (var n =
|
|
804
|
-
var
|
|
805
|
-
if (e === "top" || e === "left" ? a =
|
|
799
|
+
function ze(i, t, e) {
|
|
800
|
+
for (var n = We(i, !0), r = D(i)[t]; n; ) {
|
|
801
|
+
var o = D(n)[e], a = void 0;
|
|
802
|
+
if (e === "top" || e === "left" ? a = r >= o : a = r <= o, !a)
|
|
806
803
|
return n;
|
|
807
|
-
if (n ===
|
|
804
|
+
if (n === Z())
|
|
808
805
|
break;
|
|
809
|
-
n =
|
|
806
|
+
n = We(n, !1);
|
|
810
807
|
}
|
|
811
808
|
return !1;
|
|
812
809
|
}
|
|
813
|
-
function
|
|
814
|
-
for (var
|
|
815
|
-
if (a[
|
|
816
|
-
if (
|
|
817
|
-
return a[
|
|
818
|
-
|
|
810
|
+
function yt(i, t, e, n) {
|
|
811
|
+
for (var r = 0, o = 0, a = i.children; o < a.length; ) {
|
|
812
|
+
if (a[o].style.display !== "none" && a[o] !== g.ghost && (n || a[o] !== g.dragged) && V(a[o], e.draggable, i, !1)) {
|
|
813
|
+
if (r === t)
|
|
814
|
+
return a[o];
|
|
815
|
+
r++;
|
|
819
816
|
}
|
|
820
|
-
|
|
817
|
+
o++;
|
|
821
818
|
}
|
|
822
819
|
return null;
|
|
823
820
|
}
|
|
824
|
-
function
|
|
825
|
-
for (var e = i.lastElementChild; e && (e === g.ghost || p(e, "display") === "none" || t && !
|
|
821
|
+
function we(i, t) {
|
|
822
|
+
for (var e = i.lastElementChild; e && (e === g.ghost || p(e, "display") === "none" || t && !Yt(e, t)); )
|
|
826
823
|
e = e.previousElementSibling;
|
|
827
824
|
return e || null;
|
|
828
825
|
}
|
|
829
|
-
function
|
|
826
|
+
function R(i, t) {
|
|
830
827
|
var e = 0;
|
|
831
828
|
if (!i || !i.parentNode)
|
|
832
829
|
return -1;
|
|
833
830
|
for (; i = i.previousElementSibling; )
|
|
834
|
-
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== g.clone && (!t ||
|
|
831
|
+
i.nodeName.toUpperCase() !== "TEMPLATE" && i !== g.clone && (!t || Yt(i, t)) && e++;
|
|
835
832
|
return e;
|
|
836
833
|
}
|
|
837
834
|
function Xe(i) {
|
|
838
|
-
var t = 0, e = 0, n =
|
|
835
|
+
var t = 0, e = 0, n = Z();
|
|
839
836
|
if (i)
|
|
840
837
|
do {
|
|
841
|
-
var
|
|
842
|
-
t += i.scrollLeft *
|
|
838
|
+
var r = pt(i), o = r.a, a = r.d;
|
|
839
|
+
t += i.scrollLeft * o, e += i.scrollTop * a;
|
|
843
840
|
} while (i !== n && (i = i.parentNode));
|
|
844
841
|
return [t, e];
|
|
845
842
|
}
|
|
846
|
-
function
|
|
843
|
+
function zn(i, t) {
|
|
847
844
|
for (var e in i)
|
|
848
845
|
if (i.hasOwnProperty(e)) {
|
|
849
846
|
for (var n in t)
|
|
@@ -852,35 +849,35 @@ function Xn(i, t) {
|
|
|
852
849
|
}
|
|
853
850
|
return -1;
|
|
854
851
|
}
|
|
855
|
-
function
|
|
852
|
+
function We(i, t) {
|
|
856
853
|
if (!i || !i.getBoundingClientRect)
|
|
857
|
-
return
|
|
854
|
+
return Z();
|
|
858
855
|
var e = i, n = !1;
|
|
859
856
|
do
|
|
860
857
|
if (e.clientWidth < e.scrollWidth || e.clientHeight < e.scrollHeight) {
|
|
861
|
-
var
|
|
862
|
-
if (e.clientWidth < e.scrollWidth && (
|
|
858
|
+
var r = p(e);
|
|
859
|
+
if (e.clientWidth < e.scrollWidth && (r.overflowX == "auto" || r.overflowX == "scroll") || e.clientHeight < e.scrollHeight && (r.overflowY == "auto" || r.overflowY == "scroll")) {
|
|
863
860
|
if (!e.getBoundingClientRect || e === document.body)
|
|
864
|
-
return
|
|
861
|
+
return Z();
|
|
865
862
|
if (n || t)
|
|
866
863
|
return e;
|
|
867
864
|
n = !0;
|
|
868
865
|
}
|
|
869
866
|
}
|
|
870
867
|
while (e = e.parentNode);
|
|
871
|
-
return
|
|
868
|
+
return Z();
|
|
872
869
|
}
|
|
873
|
-
function
|
|
870
|
+
function Xn(i, t) {
|
|
874
871
|
if (i && t)
|
|
875
872
|
for (var e in t)
|
|
876
873
|
t.hasOwnProperty(e) && (i[e] = t[e]);
|
|
877
874
|
return i;
|
|
878
875
|
}
|
|
879
|
-
function
|
|
876
|
+
function de(i, t) {
|
|
880
877
|
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);
|
|
881
878
|
}
|
|
882
879
|
var he;
|
|
883
|
-
function
|
|
880
|
+
function Wn(i, t) {
|
|
884
881
|
return function() {
|
|
885
882
|
if (!he) {
|
|
886
883
|
var e = arguments, n = this;
|
|
@@ -890,32 +887,32 @@ function Zn(i, t) {
|
|
|
890
887
|
}
|
|
891
888
|
};
|
|
892
889
|
}
|
|
893
|
-
function
|
|
890
|
+
function Yn(i, t, e) {
|
|
894
891
|
i.scrollLeft += t, i.scrollTop += e;
|
|
895
892
|
}
|
|
896
|
-
function
|
|
893
|
+
function ln(i) {
|
|
897
894
|
var t = window.Polymer, e = window.jQuery || window.Zepto;
|
|
898
895
|
return t && t.dom ? t.dom(i).cloneNode(!0) : e ? e(i).clone(!0)[0] : i.cloneNode(!0);
|
|
899
896
|
}
|
|
900
|
-
var
|
|
901
|
-
function
|
|
897
|
+
var B = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
898
|
+
function Gn() {
|
|
902
899
|
var i = [], t;
|
|
903
900
|
return {
|
|
904
901
|
captureAnimationState: function() {
|
|
905
902
|
if (i = [], !!this.options.animation) {
|
|
906
903
|
var n = [].slice.call(this.el.children);
|
|
907
|
-
n.forEach(function(
|
|
908
|
-
if (!(p(
|
|
904
|
+
n.forEach(function(r) {
|
|
905
|
+
if (!(p(r, "display") === "none" || r === g.ghost)) {
|
|
909
906
|
i.push({
|
|
910
|
-
target:
|
|
911
|
-
rect:
|
|
907
|
+
target: r,
|
|
908
|
+
rect: D(r)
|
|
912
909
|
});
|
|
913
|
-
var
|
|
914
|
-
if (
|
|
915
|
-
var a =
|
|
916
|
-
a && (
|
|
910
|
+
var o = F({}, i[i.length - 1].rect);
|
|
911
|
+
if (r.thisAnimationDuration) {
|
|
912
|
+
var a = pt(r, !0);
|
|
913
|
+
a && (o.top -= a.f, o.left -= a.e);
|
|
917
914
|
}
|
|
918
|
-
|
|
915
|
+
r.fromRect = o;
|
|
919
916
|
}
|
|
920
917
|
});
|
|
921
918
|
}
|
|
@@ -924,236 +921,236 @@ function qn() {
|
|
|
924
921
|
i.push(n);
|
|
925
922
|
},
|
|
926
923
|
removeAnimationState: function(n) {
|
|
927
|
-
i.splice(
|
|
924
|
+
i.splice(zn(i, {
|
|
928
925
|
target: n
|
|
929
926
|
}), 1);
|
|
930
927
|
},
|
|
931
928
|
animateAll: function(n) {
|
|
932
|
-
var
|
|
929
|
+
var r = this;
|
|
933
930
|
if (!this.options.animation) {
|
|
934
931
|
clearTimeout(t), typeof n == "function" && n();
|
|
935
932
|
return;
|
|
936
933
|
}
|
|
937
|
-
var
|
|
938
|
-
i.forEach(function(
|
|
939
|
-
var
|
|
940
|
-
v && (
|
|
941
|
-
(y.top -
|
|
934
|
+
var o = !1, a = 0;
|
|
935
|
+
i.forEach(function(s) {
|
|
936
|
+
var l = 0, d = s.target, c = d.fromRect, u = D(d), f = d.prevFromRect, _ = d.prevToRect, y = s.rect, v = pt(d, !0);
|
|
937
|
+
v && (u.top -= v.f, u.left -= v.e), d.toRect = u, d.thisAnimationDuration && de(f, u) && !de(c, u) && // Make sure animatingRect is on line between toRect & fromRect
|
|
938
|
+
(y.top - u.top) / (y.left - u.left) === (c.top - u.top) / (c.left - u.left) && (l = Zn(y, f, _, r.options)), de(u, c) || (d.prevFromRect = c, d.prevToRect = u, l || (l = r.options.animation), r.animate(d, y, u, l)), l && (o = !0, a = Math.max(a, l), clearTimeout(d.animationResetTimer), d.animationResetTimer = setTimeout(function() {
|
|
942
939
|
d.animationTime = 0, d.prevFromRect = null, d.fromRect = null, d.prevToRect = null, d.thisAnimationDuration = null;
|
|
943
|
-
},
|
|
944
|
-
}), clearTimeout(t),
|
|
940
|
+
}, l), d.thisAnimationDuration = l);
|
|
941
|
+
}), clearTimeout(t), o ? t = setTimeout(function() {
|
|
945
942
|
typeof n == "function" && n();
|
|
946
943
|
}, a) : typeof n == "function" && n(), i = [];
|
|
947
944
|
},
|
|
948
|
-
animate: function(n,
|
|
945
|
+
animate: function(n, r, o, a) {
|
|
949
946
|
if (a) {
|
|
950
947
|
p(n, "transition", ""), p(n, "transform", "");
|
|
951
|
-
var
|
|
952
|
-
n.animatingX = !!c, n.animatingY = !!
|
|
948
|
+
var s = pt(this.el), l = s && s.a, d = s && s.d, c = (r.left - o.left) / (l || 1), u = (r.top - o.top) / (d || 1);
|
|
949
|
+
n.animatingX = !!c, n.animatingY = !!u, p(n, "transform", "translate3d(" + c + "px," + u + "px,0)"), this.forRepaintDummy = qn(n), p(n, "transition", "transform " + a + "ms" + (this.options.easing ? " " + this.options.easing : "")), p(n, "transform", "translate3d(0,0,0)"), typeof n.animated == "number" && clearTimeout(n.animated), n.animated = setTimeout(function() {
|
|
953
950
|
p(n, "transition", ""), p(n, "transform", ""), n.animated = !1, n.animatingX = !1, n.animatingY = !1;
|
|
954
951
|
}, a);
|
|
955
952
|
}
|
|
956
953
|
}
|
|
957
954
|
};
|
|
958
955
|
}
|
|
959
|
-
function
|
|
956
|
+
function qn(i) {
|
|
960
957
|
return i.offsetWidth;
|
|
961
958
|
}
|
|
962
|
-
function
|
|
959
|
+
function Zn(i, t, e, n) {
|
|
963
960
|
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;
|
|
964
961
|
}
|
|
965
|
-
var
|
|
962
|
+
var lt = [], ue = {
|
|
966
963
|
initializeByDefault: !0
|
|
967
|
-
},
|
|
964
|
+
}, Nt = {
|
|
968
965
|
mount: function(t) {
|
|
969
|
-
for (var e in
|
|
970
|
-
|
|
971
|
-
|
|
966
|
+
for (var e in ue)
|
|
967
|
+
ue.hasOwnProperty(e) && !(e in t) && (t[e] = ue[e]);
|
|
968
|
+
lt.forEach(function(n) {
|
|
972
969
|
if (n.pluginName === t.pluginName)
|
|
973
970
|
throw "Sortable: Cannot mount plugin ".concat(t.pluginName, " more than once");
|
|
974
|
-
}),
|
|
971
|
+
}), lt.push(t);
|
|
975
972
|
},
|
|
976
973
|
pluginEvent: function(t, e, n) {
|
|
977
|
-
var
|
|
974
|
+
var r = this;
|
|
978
975
|
this.eventCanceled = !1, n.cancel = function() {
|
|
979
|
-
|
|
976
|
+
r.eventCanceled = !0;
|
|
980
977
|
};
|
|
981
|
-
var
|
|
982
|
-
|
|
983
|
-
e[a.pluginName] && (e[a.pluginName][
|
|
978
|
+
var o = t + "Global";
|
|
979
|
+
lt.forEach(function(a) {
|
|
980
|
+
e[a.pluginName] && (e[a.pluginName][o] && e[a.pluginName][o](F({
|
|
984
981
|
sortable: e
|
|
985
|
-
}, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](
|
|
982
|
+
}, n)), e.options[a.pluginName] && e[a.pluginName][t] && e[a.pluginName][t](F({
|
|
986
983
|
sortable: e
|
|
987
984
|
}, n)));
|
|
988
985
|
});
|
|
989
986
|
},
|
|
990
|
-
initializePlugins: function(t, e, n,
|
|
991
|
-
|
|
992
|
-
var
|
|
993
|
-
if (!(!t.options[
|
|
994
|
-
var d = new
|
|
995
|
-
d.sortable = t, d.options = t.options, t[
|
|
987
|
+
initializePlugins: function(t, e, n, r) {
|
|
988
|
+
lt.forEach(function(s) {
|
|
989
|
+
var l = s.pluginName;
|
|
990
|
+
if (!(!t.options[l] && !s.initializeByDefault)) {
|
|
991
|
+
var d = new s(t, e, t.options);
|
|
992
|
+
d.sortable = t, d.options = t.options, t[l] = d, K(n, d.defaults);
|
|
996
993
|
}
|
|
997
994
|
});
|
|
998
|
-
for (var
|
|
999
|
-
if (t.options.hasOwnProperty(
|
|
1000
|
-
var a = this.modifyOption(t,
|
|
1001
|
-
typeof a < "u" && (t.options[
|
|
995
|
+
for (var o in t.options)
|
|
996
|
+
if (t.options.hasOwnProperty(o)) {
|
|
997
|
+
var a = this.modifyOption(t, o, t.options[o]);
|
|
998
|
+
typeof a < "u" && (t.options[o] = a);
|
|
1002
999
|
}
|
|
1003
1000
|
},
|
|
1004
1001
|
getEventProperties: function(t, e) {
|
|
1005
1002
|
var n = {};
|
|
1006
|
-
return
|
|
1007
|
-
typeof
|
|
1003
|
+
return lt.forEach(function(r) {
|
|
1004
|
+
typeof r.eventProperties == "function" && K(n, r.eventProperties.call(e[r.pluginName], t));
|
|
1008
1005
|
}), n;
|
|
1009
1006
|
},
|
|
1010
1007
|
modifyOption: function(t, e, n) {
|
|
1011
|
-
var
|
|
1012
|
-
return
|
|
1013
|
-
t[
|
|
1014
|
-
}),
|
|
1008
|
+
var r;
|
|
1009
|
+
return lt.forEach(function(o) {
|
|
1010
|
+
t[o.pluginName] && o.optionListeners && typeof o.optionListeners[e] == "function" && (r = o.optionListeners[e].call(t[o.pluginName], n));
|
|
1011
|
+
}), r;
|
|
1015
1012
|
}
|
|
1016
1013
|
};
|
|
1017
|
-
function
|
|
1018
|
-
var t = i.sortable, e = i.rootEl, n = i.name,
|
|
1019
|
-
if (t = t || e && e[
|
|
1020
|
-
var v,
|
|
1021
|
-
window.CustomEvent && !
|
|
1014
|
+
function Kn(i) {
|
|
1015
|
+
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, c = i.oldDraggableIndex, u = i.newDraggableIndex, f = i.originalEvent, _ = i.putSortable, y = i.extraEventProperties;
|
|
1016
|
+
if (t = t || e && e[B], !!t) {
|
|
1017
|
+
var v, j = t.options, Q = "on" + n.charAt(0).toUpperCase() + n.substr(1);
|
|
1018
|
+
window.CustomEvent && !J && !Jt ? v = new CustomEvent(n, {
|
|
1022
1019
|
bubbles: !0,
|
|
1023
1020
|
cancelable: !0
|
|
1024
|
-
}) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to = a || e, v.from =
|
|
1025
|
-
var
|
|
1026
|
-
for (var
|
|
1027
|
-
v[
|
|
1028
|
-
e && e.dispatchEvent(v),
|
|
1029
|
-
}
|
|
1030
|
-
}
|
|
1031
|
-
var
|
|
1032
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {},
|
|
1033
|
-
|
|
1034
|
-
dragEl:
|
|
1035
|
-
parentEl:
|
|
1021
|
+
}) : (v = document.createEvent("Event"), v.initEvent(n, !0, !0)), v.to = a || e, v.from = s || e, v.item = r || e, v.clone = o, v.oldIndex = l, v.newIndex = d, v.oldDraggableIndex = c, v.newDraggableIndex = u, v.originalEvent = f, v.pullMode = _ ? _.lastPutMode : void 0;
|
|
1022
|
+
var N = F(F({}, y), Nt.getEventProperties(n, t));
|
|
1023
|
+
for (var tt in N)
|
|
1024
|
+
v[tt] = N[tt];
|
|
1025
|
+
e && e.dispatchEvent(v), j[Q] && j[Q].call(t, v);
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
var Jn = ["evt"], P = function(t, e) {
|
|
1029
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, o = Vn(n, Jn);
|
|
1030
|
+
Nt.pluginEvent.bind(g)(t, e, F({
|
|
1031
|
+
dragEl: h,
|
|
1032
|
+
parentEl: S,
|
|
1036
1033
|
ghostEl: m,
|
|
1037
|
-
rootEl:
|
|
1034
|
+
rootEl: w,
|
|
1038
1035
|
nextEl: rt,
|
|
1039
|
-
lastDownEl:
|
|
1040
|
-
cloneEl:
|
|
1041
|
-
cloneHidden:
|
|
1042
|
-
dragStarted:
|
|
1043
|
-
putSortable:
|
|
1036
|
+
lastDownEl: Ft,
|
|
1037
|
+
cloneEl: C,
|
|
1038
|
+
cloneHidden: q,
|
|
1039
|
+
dragStarted: St,
|
|
1040
|
+
putSortable: T,
|
|
1044
1041
|
activeSortable: g.active,
|
|
1045
|
-
originalEvent:
|
|
1046
|
-
oldIndex:
|
|
1042
|
+
originalEvent: r,
|
|
1043
|
+
oldIndex: ct,
|
|
1047
1044
|
oldDraggableIndex: At,
|
|
1048
|
-
newIndex:
|
|
1049
|
-
newDraggableIndex:
|
|
1050
|
-
hideGhostForTarget:
|
|
1051
|
-
unhideGhostForTarget:
|
|
1045
|
+
newIndex: M,
|
|
1046
|
+
newDraggableIndex: Y,
|
|
1047
|
+
hideGhostForTarget: cn,
|
|
1048
|
+
unhideGhostForTarget: fn,
|
|
1052
1049
|
cloneNowHidden: function() {
|
|
1053
|
-
|
|
1050
|
+
q = !0;
|
|
1054
1051
|
},
|
|
1055
1052
|
cloneNowShown: function() {
|
|
1056
|
-
|
|
1053
|
+
q = !1;
|
|
1057
1054
|
},
|
|
1058
|
-
dispatchSortableEvent: function(
|
|
1059
|
-
|
|
1055
|
+
dispatchSortableEvent: function(s) {
|
|
1056
|
+
x({
|
|
1060
1057
|
sortable: e,
|
|
1061
|
-
name:
|
|
1062
|
-
originalEvent:
|
|
1058
|
+
name: s,
|
|
1059
|
+
originalEvent: r
|
|
1063
1060
|
});
|
|
1064
1061
|
}
|
|
1065
|
-
},
|
|
1062
|
+
}, o));
|
|
1066
1063
|
};
|
|
1067
|
-
function
|
|
1068
|
-
|
|
1069
|
-
putSortable:
|
|
1070
|
-
cloneEl:
|
|
1071
|
-
targetEl:
|
|
1072
|
-
rootEl:
|
|
1073
|
-
oldIndex:
|
|
1064
|
+
function x(i) {
|
|
1065
|
+
Kn(F({
|
|
1066
|
+
putSortable: T,
|
|
1067
|
+
cloneEl: C,
|
|
1068
|
+
targetEl: h,
|
|
1069
|
+
rootEl: w,
|
|
1070
|
+
oldIndex: ct,
|
|
1074
1071
|
oldDraggableIndex: At,
|
|
1075
|
-
newIndex:
|
|
1076
|
-
newDraggableIndex:
|
|
1072
|
+
newIndex: M,
|
|
1073
|
+
newDraggableIndex: Y
|
|
1077
1074
|
}, i));
|
|
1078
1075
|
}
|
|
1079
|
-
var
|
|
1080
|
-
if (
|
|
1081
|
-
if (
|
|
1076
|
+
var h, S, m, w, rt, Ft, C, q, ct, M, At, Y, Mt, T, ut = !1, Gt = !1, qt = [], nt, U, ce, fe, Ye, Ge, St, dt, Dt, Tt = !1, Ht = !1, jt, O, pe = [], be = !1, Zt = [], Qt = typeof document < "u", kt = rn, qe = Jt || J ? "cssFloat" : "float", Qn = Qt && !on && !rn && "draggable" in document.createElement("div"), dn = function() {
|
|
1077
|
+
if (Qt) {
|
|
1078
|
+
if (J)
|
|
1082
1079
|
return !1;
|
|
1083
1080
|
var i = document.createElement("x");
|
|
1084
1081
|
return i.style.cssText = "pointer-events:auto", i.style.pointerEvents === "auto";
|
|
1085
1082
|
}
|
|
1086
1083
|
}(), hn = function(t, e) {
|
|
1087
|
-
var n = p(t),
|
|
1084
|
+
var n = p(t), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), o = yt(t, 0, e), a = yt(t, 1, e), s = o && p(o), l = a && p(a), d = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + D(o).width, c = l && parseInt(l.marginLeft) + parseInt(l.marginRight) + D(a).width;
|
|
1088
1085
|
if (n.display === "flex")
|
|
1089
1086
|
return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
1090
1087
|
if (n.display === "grid")
|
|
1091
1088
|
return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
1092
|
-
if (
|
|
1093
|
-
var
|
|
1094
|
-
return a && (
|
|
1095
|
-
}
|
|
1096
|
-
return
|
|
1097
|
-
},
|
|
1098
|
-
var
|
|
1099
|
-
return
|
|
1100
|
-
},
|
|
1089
|
+
if (o && s.float && s.float !== "none") {
|
|
1090
|
+
var u = s.float === "left" ? "left" : "right";
|
|
1091
|
+
return a && (l.clear === "both" || l.clear === u) ? "vertical" : "horizontal";
|
|
1092
|
+
}
|
|
1093
|
+
return o && (s.display === "block" || s.display === "flex" || s.display === "table" || s.display === "grid" || d >= r && n[qe] === "none" || a && n[qe] === "none" && d + c > r) ? "vertical" : "horizontal";
|
|
1094
|
+
}, ti = function(t, e, n) {
|
|
1095
|
+
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;
|
|
1096
|
+
return r === s || o === l || r + a / 2 === s + d / 2;
|
|
1097
|
+
}, ei = function(t, e) {
|
|
1101
1098
|
var n;
|
|
1102
|
-
return
|
|
1103
|
-
var
|
|
1104
|
-
if (!(!
|
|
1105
|
-
var a =
|
|
1106
|
-
if (
|
|
1107
|
-
return n =
|
|
1099
|
+
return qt.some(function(r) {
|
|
1100
|
+
var o = r[B].options.emptyInsertThreshold;
|
|
1101
|
+
if (!(!o || we(r))) {
|
|
1102
|
+
var a = D(r), s = t >= a.left - o && t <= a.right + o, l = e >= a.top - o && e <= a.bottom + o;
|
|
1103
|
+
if (s && l)
|
|
1104
|
+
return n = r;
|
|
1108
1105
|
}
|
|
1109
1106
|
}), n;
|
|
1110
|
-
},
|
|
1111
|
-
function e(
|
|
1112
|
-
return function(
|
|
1113
|
-
var
|
|
1114
|
-
if (
|
|
1107
|
+
}, un = function(t) {
|
|
1108
|
+
function e(o, a) {
|
|
1109
|
+
return function(s, l, d, c) {
|
|
1110
|
+
var u = s.options.group.name && l.options.group.name && s.options.group.name === l.options.group.name;
|
|
1111
|
+
if (o == null && (a || u))
|
|
1115
1112
|
return !0;
|
|
1116
|
-
if (
|
|
1113
|
+
if (o == null || o === !1)
|
|
1117
1114
|
return !1;
|
|
1118
|
-
if (a &&
|
|
1119
|
-
return
|
|
1120
|
-
if (typeof
|
|
1121
|
-
return e(
|
|
1122
|
-
var f = (a ?
|
|
1123
|
-
return
|
|
1115
|
+
if (a && o === "clone")
|
|
1116
|
+
return o;
|
|
1117
|
+
if (typeof o == "function")
|
|
1118
|
+
return e(o(s, l, d, c), a)(s, l, d, c);
|
|
1119
|
+
var f = (a ? s : l).options.group.name;
|
|
1120
|
+
return o === !0 || typeof o == "string" && o === f || o.join && o.indexOf(f) > -1;
|
|
1124
1121
|
};
|
|
1125
1122
|
}
|
|
1126
|
-
var n = {},
|
|
1127
|
-
(!
|
|
1128
|
-
name:
|
|
1129
|
-
}), n.name =
|
|
1123
|
+
var n = {}, r = t.group;
|
|
1124
|
+
(!r || Ut(r) != "object") && (r = {
|
|
1125
|
+
name: r
|
|
1126
|
+
}), n.name = r.name, n.checkPull = e(r.pull, !0), n.checkPut = e(r.put), n.revertClone = r.revertClone, t.group = n;
|
|
1127
|
+
}, cn = function() {
|
|
1128
|
+
!dn && m && p(m, "display", "none");
|
|
1130
1129
|
}, fn = function() {
|
|
1131
|
-
!
|
|
1132
|
-
}, pn = function() {
|
|
1133
|
-
!un && m && p(m, "display", "");
|
|
1130
|
+
!dn && m && p(m, "display", "");
|
|
1134
1131
|
};
|
|
1135
|
-
|
|
1136
|
-
if (
|
|
1137
|
-
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(),
|
|
1132
|
+
Qt && !on && document.addEventListener("click", function(i) {
|
|
1133
|
+
if (Gt)
|
|
1134
|
+
return i.preventDefault(), i.stopPropagation && i.stopPropagation(), i.stopImmediatePropagation && i.stopImmediatePropagation(), Gt = !1, !1;
|
|
1138
1135
|
}, !0);
|
|
1139
|
-
var
|
|
1140
|
-
if (
|
|
1136
|
+
var it = function(t) {
|
|
1137
|
+
if (h) {
|
|
1141
1138
|
t = t.touches ? t.touches[0] : t;
|
|
1142
|
-
var e =
|
|
1139
|
+
var e = ei(t.clientX, t.clientY);
|
|
1143
1140
|
if (e) {
|
|
1144
1141
|
var n = {};
|
|
1145
|
-
for (var
|
|
1146
|
-
t.hasOwnProperty(
|
|
1147
|
-
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[
|
|
1142
|
+
for (var r in t)
|
|
1143
|
+
t.hasOwnProperty(r) && (n[r] = t[r]);
|
|
1144
|
+
n.target = n.rootEl = e, n.preventDefault = void 0, n.stopPropagation = void 0, e[B]._onDragOver(n);
|
|
1148
1145
|
}
|
|
1149
1146
|
}
|
|
1150
|
-
},
|
|
1151
|
-
|
|
1147
|
+
}, ni = function(t) {
|
|
1148
|
+
h && h.parentNode[B]._isOutsideThisEl(t.target);
|
|
1152
1149
|
};
|
|
1153
1150
|
function g(i, t) {
|
|
1154
1151
|
if (!(i && i.nodeType && i.nodeType === 1))
|
|
1155
1152
|
throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(i));
|
|
1156
|
-
this.el = i, this.options = t =
|
|
1153
|
+
this.el = i, this.options = t = K({}, t), i[B] = this;
|
|
1157
1154
|
var e = {
|
|
1158
1155
|
group: null,
|
|
1159
1156
|
sort: !0,
|
|
@@ -1179,8 +1176,8 @@ function g(i, t) {
|
|
|
1179
1176
|
preventOnFilter: !0,
|
|
1180
1177
|
animation: 0,
|
|
1181
1178
|
easing: null,
|
|
1182
|
-
setData: function(a,
|
|
1183
|
-
a.setData("Text",
|
|
1179
|
+
setData: function(a, s) {
|
|
1180
|
+
a.setData("Text", s.textContent);
|
|
1184
1181
|
},
|
|
1185
1182
|
dropBubble: !1,
|
|
1186
1183
|
dragoverBubble: !1,
|
|
@@ -1196,96 +1193,96 @@ function g(i, t) {
|
|
|
1196
1193
|
x: 0,
|
|
1197
1194
|
y: 0
|
|
1198
1195
|
},
|
|
1199
|
-
supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && !
|
|
1196
|
+
supportPointer: g.supportPointer !== !1 && "PointerEvent" in window && !Vt,
|
|
1200
1197
|
emptyInsertThreshold: 5
|
|
1201
1198
|
};
|
|
1202
|
-
|
|
1199
|
+
Nt.initializePlugins(this, i, e);
|
|
1203
1200
|
for (var n in e)
|
|
1204
1201
|
!(n in t) && (t[n] = e[n]);
|
|
1205
|
-
|
|
1206
|
-
for (var
|
|
1207
|
-
|
|
1208
|
-
this.nativeDraggable = t.forceFallback ? !1 :
|
|
1202
|
+
un(t);
|
|
1203
|
+
for (var r in this)
|
|
1204
|
+
r.charAt(0) === "_" && typeof this[r] == "function" && (this[r] = this[r].bind(this));
|
|
1205
|
+
this.nativeDraggable = t.forceFallback ? !1 : Qn, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? $(i, "pointerdown", this._onTapStart) : ($(i, "mousedown", this._onTapStart), $(i, "touchstart", this._onTapStart)), this.nativeDraggable && ($(i, "dragover", this), $(i, "dragenter", this)), qt.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), K(this, Gn());
|
|
1209
1206
|
}
|
|
1210
1207
|
g.prototype = /** @lends Sortable.prototype */
|
|
1211
1208
|
{
|
|
1212
1209
|
constructor: g,
|
|
1213
1210
|
_isOutsideThisEl: function(t) {
|
|
1214
|
-
!this.el.contains(t) && t !== this.el && (
|
|
1211
|
+
!this.el.contains(t) && t !== this.el && (dt = null);
|
|
1215
1212
|
},
|
|
1216
1213
|
_getDirection: function(t, e) {
|
|
1217
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e,
|
|
1214
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, t, e, h) : this.options.direction;
|
|
1218
1215
|
},
|
|
1219
1216
|
_onTapStart: function(t) {
|
|
1220
1217
|
if (t.cancelable) {
|
|
1221
|
-
var e = this, n = this.el,
|
|
1222
|
-
if (
|
|
1223
|
-
if (
|
|
1224
|
-
if (c.call(this, t,
|
|
1225
|
-
|
|
1218
|
+
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, c = r.filter;
|
|
1219
|
+
if (hi(n), !h && !(/mousedown|pointerdown/.test(a) && t.button !== 0 || r.disabled) && !d.isContentEditable && !(!this.nativeDraggable && Vt && l && l.tagName.toUpperCase() === "SELECT") && (l = V(l, r.draggable, n, !1), !(l && l.animated) && Ft !== l)) {
|
|
1220
|
+
if (ct = R(l), At = R(l, r.draggable), typeof c == "function") {
|
|
1221
|
+
if (c.call(this, t, l, this)) {
|
|
1222
|
+
x({
|
|
1226
1223
|
sortable: e,
|
|
1227
1224
|
rootEl: d,
|
|
1228
1225
|
name: "filter",
|
|
1229
|
-
targetEl:
|
|
1226
|
+
targetEl: l,
|
|
1230
1227
|
toEl: n,
|
|
1231
1228
|
fromEl: n
|
|
1232
|
-
}),
|
|
1229
|
+
}), P("filter", e, {
|
|
1233
1230
|
evt: t
|
|
1234
|
-
}),
|
|
1231
|
+
}), o && t.cancelable && t.preventDefault();
|
|
1235
1232
|
return;
|
|
1236
1233
|
}
|
|
1237
|
-
} else if (c && (c = c.split(",").some(function(
|
|
1238
|
-
if (
|
|
1239
|
-
return
|
|
1234
|
+
} else if (c && (c = c.split(",").some(function(u) {
|
|
1235
|
+
if (u = V(d, u.trim(), n, !1), u)
|
|
1236
|
+
return x({
|
|
1240
1237
|
sortable: e,
|
|
1241
|
-
rootEl:
|
|
1238
|
+
rootEl: u,
|
|
1242
1239
|
name: "filter",
|
|
1243
|
-
targetEl:
|
|
1240
|
+
targetEl: l,
|
|
1244
1241
|
fromEl: n,
|
|
1245
1242
|
toEl: n
|
|
1246
|
-
}),
|
|
1243
|
+
}), P("filter", e, {
|
|
1247
1244
|
evt: t
|
|
1248
1245
|
}), !0;
|
|
1249
1246
|
}), c)) {
|
|
1250
|
-
|
|
1247
|
+
o && t.cancelable && t.preventDefault();
|
|
1251
1248
|
return;
|
|
1252
1249
|
}
|
|
1253
|
-
|
|
1250
|
+
r.handle && !V(d, r.handle, n, !1) || this._prepareDragStart(t, s, l);
|
|
1254
1251
|
}
|
|
1255
1252
|
}
|
|
1256
1253
|
},
|
|
1257
1254
|
_prepareDragStart: function(t, e, n) {
|
|
1258
|
-
var
|
|
1259
|
-
if (n && !
|
|
1260
|
-
var d =
|
|
1261
|
-
if (
|
|
1262
|
-
target:
|
|
1255
|
+
var r = this, o = r.el, a = r.options, s = o.ownerDocument, l;
|
|
1256
|
+
if (n && !h && n.parentNode === o) {
|
|
1257
|
+
var d = D(n);
|
|
1258
|
+
if (w = o, h = n, S = h.parentNode, rt = h.nextSibling, Ft = n, Mt = a.group, g.dragged = h, nt = {
|
|
1259
|
+
target: h,
|
|
1263
1260
|
clientX: (e || t).clientX,
|
|
1264
1261
|
clientY: (e || t).clientY
|
|
1265
|
-
},
|
|
1266
|
-
if (
|
|
1262
|
+
}, Ye = nt.clientX - d.left, Ge = nt.clientY - d.top, this._lastX = (e || t).clientX, this._lastY = (e || t).clientY, h.style["will-change"] = "all", l = function() {
|
|
1263
|
+
if (P("delayEnded", r, {
|
|
1267
1264
|
evt: t
|
|
1268
1265
|
}), g.eventCanceled) {
|
|
1269
|
-
|
|
1266
|
+
r._onDrop();
|
|
1270
1267
|
return;
|
|
1271
1268
|
}
|
|
1272
|
-
|
|
1273
|
-
sortable:
|
|
1269
|
+
r._disableDelayedDragEvents(), !Fe && r.nativeDraggable && (h.draggable = !0), r._triggerDragStart(t, e), x({
|
|
1270
|
+
sortable: r,
|
|
1274
1271
|
name: "choose",
|
|
1275
1272
|
originalEvent: t
|
|
1276
|
-
}),
|
|
1273
|
+
}), L(h, a.chosenClass, !0);
|
|
1277
1274
|
}, a.ignore.split(",").forEach(function(c) {
|
|
1278
|
-
|
|
1279
|
-
}),
|
|
1275
|
+
sn(h, c.trim(), ge);
|
|
1276
|
+
}), $(s, "dragover", it), $(s, "mousemove", it), $(s, "touchmove", it), $(s, "mouseup", r._onDrop), $(s, "touchend", r._onDrop), $(s, "touchcancel", r._onDrop), Fe && this.nativeDraggable && (this.options.touchStartThreshold = 4, h.draggable = !0), P("delayStart", this, {
|
|
1280
1277
|
evt: t
|
|
1281
|
-
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(
|
|
1278
|
+
}), a.delay && (!a.delayOnTouchOnly || e) && (!this.nativeDraggable || !(Jt || J))) {
|
|
1282
1279
|
if (g.eventCanceled) {
|
|
1283
1280
|
this._onDrop();
|
|
1284
1281
|
return;
|
|
1285
1282
|
}
|
|
1286
|
-
|
|
1283
|
+
$(s, "mouseup", r._disableDelayedDrag), $(s, "touchend", r._disableDelayedDrag), $(s, "touchcancel", r._disableDelayedDrag), $(s, "mousemove", r._delayedDragTouchMoveHandler), $(s, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && $(s, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(l, a.delay);
|
|
1287
1284
|
} else
|
|
1288
|
-
|
|
1285
|
+
l();
|
|
1289
1286
|
}
|
|
1290
1287
|
},
|
|
1291
1288
|
_delayedDragTouchMoveHandler: function(t) {
|
|
@@ -1293,28 +1290,28 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1293
1290
|
Math.max(Math.abs(e.clientX - this._lastX), Math.abs(e.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
1294
1291
|
},
|
|
1295
1292
|
_disableDelayedDrag: function() {
|
|
1296
|
-
|
|
1293
|
+
h && ge(h), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
1297
1294
|
},
|
|
1298
1295
|
_disableDelayedDragEvents: function() {
|
|
1299
1296
|
var t = this.el.ownerDocument;
|
|
1300
|
-
|
|
1297
|
+
b(t, "mouseup", this._disableDelayedDrag), b(t, "touchend", this._disableDelayedDrag), b(t, "touchcancel", this._disableDelayedDrag), b(t, "mousemove", this._delayedDragTouchMoveHandler), b(t, "touchmove", this._delayedDragTouchMoveHandler), b(t, "pointermove", this._delayedDragTouchMoveHandler);
|
|
1301
1298
|
},
|
|
1302
1299
|
_triggerDragStart: function(t, e) {
|
|
1303
|
-
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ?
|
|
1300
|
+
e = e || t.pointerType == "touch" && t, !this.nativeDraggable || e ? this.options.supportPointer ? $(document, "pointermove", this._onTouchMove) : e ? $(document, "touchmove", this._onTouchMove) : $(document, "mousemove", this._onTouchMove) : ($(h, "dragend", this), $(w, "dragstart", this._onDragStart));
|
|
1304
1301
|
try {
|
|
1305
|
-
document.selection ?
|
|
1302
|
+
document.selection ? zt(function() {
|
|
1306
1303
|
document.selection.empty();
|
|
1307
1304
|
}) : window.getSelection().removeAllRanges();
|
|
1308
1305
|
} catch {
|
|
1309
1306
|
}
|
|
1310
1307
|
},
|
|
1311
1308
|
_dragStarted: function(t, e) {
|
|
1312
|
-
if (
|
|
1313
|
-
|
|
1309
|
+
if (ut = !1, w && h) {
|
|
1310
|
+
P("dragStarted", this, {
|
|
1314
1311
|
evt: e
|
|
1315
|
-
}), this.nativeDraggable &&
|
|
1312
|
+
}), this.nativeDraggable && $(document, "dragover", ni);
|
|
1316
1313
|
var n = this.options;
|
|
1317
|
-
!t &&
|
|
1314
|
+
!t && L(h, n.dragClass, !1), L(h, n.ghostClass, !0), g.active = this, t && this._appendGhost(), x({
|
|
1318
1315
|
sortable: this,
|
|
1319
1316
|
name: "start",
|
|
1320
1317
|
originalEvent: e
|
|
@@ -1323,17 +1320,17 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1323
1320
|
this._nulling();
|
|
1324
1321
|
},
|
|
1325
1322
|
_emulateDragOver: function() {
|
|
1326
|
-
if (
|
|
1327
|
-
this._lastX =
|
|
1328
|
-
for (var t = document.elementFromPoint(
|
|
1323
|
+
if (U) {
|
|
1324
|
+
this._lastX = U.clientX, this._lastY = U.clientY, cn();
|
|
1325
|
+
for (var t = document.elementFromPoint(U.clientX, U.clientY), e = t; t && t.shadowRoot && (t = t.shadowRoot.elementFromPoint(U.clientX, U.clientY), t !== e); )
|
|
1329
1326
|
e = t;
|
|
1330
|
-
if (
|
|
1327
|
+
if (h.parentNode[B]._isOutsideThisEl(t), e)
|
|
1331
1328
|
do {
|
|
1332
|
-
if (e[
|
|
1329
|
+
if (e[B]) {
|
|
1333
1330
|
var n = void 0;
|
|
1334
|
-
if (n = e[
|
|
1335
|
-
clientX:
|
|
1336
|
-
clientY:
|
|
1331
|
+
if (n = e[B]._onDragOver({
|
|
1332
|
+
clientX: U.clientX,
|
|
1333
|
+
clientY: U.clientY,
|
|
1337
1334
|
target: t,
|
|
1338
1335
|
rootEl: e
|
|
1339
1336
|
}), n && !this.options.dragoverBubble)
|
|
@@ -1341,213 +1338,213 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1341
1338
|
}
|
|
1342
1339
|
t = e;
|
|
1343
1340
|
} while (e = e.parentNode);
|
|
1344
|
-
|
|
1341
|
+
fn();
|
|
1345
1342
|
}
|
|
1346
1343
|
},
|
|
1347
1344
|
_onTouchMove: function(t) {
|
|
1348
|
-
if (
|
|
1349
|
-
var e = this.options, n = e.fallbackTolerance,
|
|
1350
|
-
if (!g.active && !
|
|
1351
|
-
if (n && Math.max(Math.abs(
|
|
1345
|
+
if (nt) {
|
|
1346
|
+
var e = this.options, n = e.fallbackTolerance, r = e.fallbackOffset, o = t.touches ? t.touches[0] : t, a = m && pt(m, !0), s = m && a && a.a, l = m && a && a.d, d = kt && O && Xe(O), c = (o.clientX - nt.clientX + r.x) / (s || 1) + (d ? d[0] - pe[0] : 0) / (s || 1), u = (o.clientY - nt.clientY + r.y) / (l || 1) + (d ? d[1] - pe[1] : 0) / (l || 1);
|
|
1347
|
+
if (!g.active && !ut) {
|
|
1348
|
+
if (n && Math.max(Math.abs(o.clientX - this._lastX), Math.abs(o.clientY - this._lastY)) < n)
|
|
1352
1349
|
return;
|
|
1353
1350
|
this._onDragStart(t, !0);
|
|
1354
1351
|
}
|
|
1355
1352
|
if (m) {
|
|
1356
|
-
a ? (a.e += c - (
|
|
1353
|
+
a ? (a.e += c - (ce || 0), a.f += u - (fe || 0)) : a = {
|
|
1357
1354
|
a: 1,
|
|
1358
1355
|
b: 0,
|
|
1359
1356
|
c: 0,
|
|
1360
1357
|
d: 1,
|
|
1361
1358
|
e: c,
|
|
1362
|
-
f:
|
|
1359
|
+
f: u
|
|
1363
1360
|
};
|
|
1364
1361
|
var f = "matrix(".concat(a.a, ",").concat(a.b, ",").concat(a.c, ",").concat(a.d, ",").concat(a.e, ",").concat(a.f, ")");
|
|
1365
|
-
p(m, "webkitTransform", f), p(m, "mozTransform", f), p(m, "msTransform", f), p(m, "transform", f),
|
|
1362
|
+
p(m, "webkitTransform", f), p(m, "mozTransform", f), p(m, "msTransform", f), p(m, "transform", f), ce = c, fe = u, U = o;
|
|
1366
1363
|
}
|
|
1367
1364
|
t.cancelable && t.preventDefault();
|
|
1368
1365
|
}
|
|
1369
1366
|
},
|
|
1370
1367
|
_appendGhost: function() {
|
|
1371
1368
|
if (!m) {
|
|
1372
|
-
var t = this.options.fallbackOnBody ? document.body :
|
|
1373
|
-
if (
|
|
1374
|
-
for (
|
|
1375
|
-
|
|
1376
|
-
|
|
1369
|
+
var t = this.options.fallbackOnBody ? document.body : w, e = D(h, !0, kt, !0, t), n = this.options;
|
|
1370
|
+
if (kt) {
|
|
1371
|
+
for (O = t; p(O, "position") === "static" && p(O, "transform") === "none" && O !== document; )
|
|
1372
|
+
O = O.parentNode;
|
|
1373
|
+
O !== document.body && O !== document.documentElement ? (O === document && (O = Z()), e.top += O.scrollTop, e.left += O.scrollLeft) : O = Z(), pe = Xe(O);
|
|
1377
1374
|
}
|
|
1378
|
-
m =
|
|
1375
|
+
m = h.cloneNode(!0), L(m, n.ghostClass, !1), L(m, n.fallbackClass, !0), L(m, n.dragClass, !0), p(m, "transition", ""), p(m, "transform", ""), p(m, "box-sizing", "border-box"), p(m, "margin", 0), p(m, "top", e.top), p(m, "left", e.left), p(m, "width", e.width), p(m, "height", e.height), p(m, "opacity", "0.8"), p(m, "position", kt ? "absolute" : "fixed"), p(m, "zIndex", "100000"), p(m, "pointerEvents", "none"), g.ghost = m, t.appendChild(m), p(m, "transform-origin", Ye / parseInt(m.style.width) * 100 + "% " + Ge / parseInt(m.style.height) * 100 + "%");
|
|
1379
1376
|
}
|
|
1380
1377
|
},
|
|
1381
1378
|
_onDragStart: function(t, e) {
|
|
1382
|
-
var n = this,
|
|
1383
|
-
if (
|
|
1379
|
+
var n = this, r = t.dataTransfer, o = n.options;
|
|
1380
|
+
if (P("dragStart", this, {
|
|
1384
1381
|
evt: t
|
|
1385
1382
|
}), g.eventCanceled) {
|
|
1386
1383
|
this._onDrop();
|
|
1387
1384
|
return;
|
|
1388
1385
|
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1386
|
+
P("setupClone", this), g.eventCanceled || (C = ln(h), C.removeAttribute("id"), C.draggable = !1, C.style["will-change"] = "", this._hideClone(), L(C, this.options.chosenClass, !1), g.clone = C), n.cloneId = zt(function() {
|
|
1387
|
+
P("clone", n), !g.eventCanceled && (n.options.removeCloneOnHide || w.insertBefore(C, h), n._hideClone(), x({
|
|
1391
1388
|
sortable: n,
|
|
1392
1389
|
name: "clone"
|
|
1393
1390
|
}));
|
|
1394
|
-
}), !e &&
|
|
1391
|
+
}), !e && L(h, o.dragClass, !0), e ? (Gt = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (b(document, "mouseup", n._onDrop), b(document, "touchend", n._onDrop), b(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", o.setData && o.setData.call(n, r, h)), $(document, "drop", n), p(h, "transform", "translateZ(0)")), ut = !0, n._dragStartId = zt(n._dragStarted.bind(n, e, t)), $(document, "selectstart", n), St = !0, Vt && p(document.body, "user-select", "none");
|
|
1395
1392
|
},
|
|
1396
1393
|
// Returns true - if no further action is needed (either inserted or another condition)
|
|
1397
1394
|
_onDragOver: function(t) {
|
|
1398
|
-
var e = this.el, n = t.target,
|
|
1399
|
-
if (
|
|
1395
|
+
var e = this.el, n = t.target, r, o, a, s = this.options, l = s.group, d = g.active, c = Mt === l, u = s.sort, f = T || d, _, y = this, v = !1;
|
|
1396
|
+
if (be)
|
|
1400
1397
|
return;
|
|
1401
|
-
function
|
|
1402
|
-
|
|
1398
|
+
function j(wt, bn) {
|
|
1399
|
+
P(wt, y, F({
|
|
1403
1400
|
evt: t,
|
|
1404
1401
|
isOwner: c,
|
|
1405
|
-
axis:
|
|
1402
|
+
axis: _ ? "vertical" : "horizontal",
|
|
1406
1403
|
revert: a,
|
|
1407
|
-
dragRect:
|
|
1408
|
-
targetRect:
|
|
1409
|
-
canSort:
|
|
1404
|
+
dragRect: r,
|
|
1405
|
+
targetRect: o,
|
|
1406
|
+
canSort: u,
|
|
1410
1407
|
fromSortable: f,
|
|
1411
1408
|
target: n,
|
|
1412
|
-
completed:
|
|
1413
|
-
onMove: function(
|
|
1414
|
-
return
|
|
1409
|
+
completed: N,
|
|
1410
|
+
onMove: function(Te, En) {
|
|
1411
|
+
return Rt(w, e, h, r, Te, D(Te), t, En);
|
|
1415
1412
|
},
|
|
1416
|
-
changed:
|
|
1413
|
+
changed: tt
|
|
1417
1414
|
}, bn));
|
|
1418
1415
|
}
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1416
|
+
function Q() {
|
|
1417
|
+
j("dragOverAnimationCapture"), y.captureAnimationState(), y !== f && f.captureAnimationState();
|
|
1421
1418
|
}
|
|
1422
|
-
function
|
|
1423
|
-
return
|
|
1424
|
-
insertion:
|
|
1425
|
-
}),
|
|
1426
|
-
|
|
1427
|
-
}), y !== f && (f.animateAll(), f._ignoreWhileAnimating = null)), (n ===
|
|
1419
|
+
function N(wt) {
|
|
1420
|
+
return j("dragOverCompleted", {
|
|
1421
|
+
insertion: wt
|
|
1422
|
+
}), wt && (c ? d._hideClone() : d._showClone(y), y !== f && (L(h, T ? T.options.ghostClass : d.options.ghostClass, !1), L(h, s.ghostClass, !0)), T !== y && y !== g.active ? T = y : y === g.active && T && (T = null), f === y && (y._ignoreWhileAnimating = n), y.animateAll(function() {
|
|
1423
|
+
j("dragOverAnimationComplete"), y._ignoreWhileAnimating = null;
|
|
1424
|
+
}), y !== f && (f.animateAll(), f._ignoreWhileAnimating = null)), (n === h && !h.animated || n === e && !n.animated) && (dt = null), !s.dragoverBubble && !t.rootEl && n !== document && (h.parentNode[B]._isOutsideThisEl(t.target), !wt && it(t)), !s.dragoverBubble && t.stopPropagation && t.stopPropagation(), v = !0;
|
|
1428
1425
|
}
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1426
|
+
function tt() {
|
|
1427
|
+
M = R(h), Y = R(h, s.draggable), x({
|
|
1431
1428
|
sortable: y,
|
|
1432
1429
|
name: "change",
|
|
1433
1430
|
toEl: e,
|
|
1434
|
-
newIndex:
|
|
1435
|
-
newDraggableIndex:
|
|
1431
|
+
newIndex: M,
|
|
1432
|
+
newDraggableIndex: Y,
|
|
1436
1433
|
originalEvent: t
|
|
1437
1434
|
});
|
|
1438
1435
|
}
|
|
1439
|
-
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n =
|
|
1436
|
+
if (t.preventDefault !== void 0 && t.cancelable && t.preventDefault(), n = V(n, s.draggable, e, !0), j("dragOver"), g.eventCanceled)
|
|
1440
1437
|
return v;
|
|
1441
|
-
if (
|
|
1442
|
-
return
|
|
1443
|
-
if (
|
|
1444
|
-
if (
|
|
1438
|
+
if (h.contains(t.target) || n.animated && n.animatingX && n.animatingY || y._ignoreWhileAnimating === n)
|
|
1439
|
+
return N(!1);
|
|
1440
|
+
if (Gt = !1, d && !s.disabled && (c ? u || (a = S !== w) : T === this || (this.lastPutMode = Mt.checkPull(this, d, h, t)) && l.checkPut(this, d, h, t))) {
|
|
1441
|
+
if (_ = this._getDirection(t, n) === "vertical", r = D(h), j("dragOverValid"), g.eventCanceled)
|
|
1445
1442
|
return v;
|
|
1446
1443
|
if (a)
|
|
1447
|
-
return
|
|
1448
|
-
var
|
|
1449
|
-
if (!
|
|
1450
|
-
if (
|
|
1451
|
-
return
|
|
1452
|
-
if (
|
|
1453
|
-
return
|
|
1454
|
-
} else if (
|
|
1455
|
-
var
|
|
1456
|
-
if (
|
|
1457
|
-
return
|
|
1458
|
-
if (n =
|
|
1459
|
-
return
|
|
1444
|
+
return S = w, Q(), this._hideClone(), j("revert"), g.eventCanceled || (rt ? w.insertBefore(h, rt) : w.appendChild(h)), N(!0);
|
|
1445
|
+
var z = we(e, s.draggable);
|
|
1446
|
+
if (!z || ai(t, _, this) && !z.animated) {
|
|
1447
|
+
if (z === h)
|
|
1448
|
+
return N(!1);
|
|
1449
|
+
if (z && e === t.target && (n = z), n && (o = D(n)), Rt(w, e, h, r, n, o, t, !!n) !== !1)
|
|
1450
|
+
return Q(), z && z.nextSibling ? e.insertBefore(h, z.nextSibling) : e.appendChild(h), S = e, tt(), N(!0);
|
|
1451
|
+
} else if (z && oi(t, _, this)) {
|
|
1452
|
+
var te = yt(e, 0, s, !0);
|
|
1453
|
+
if (te === h)
|
|
1454
|
+
return N(!1);
|
|
1455
|
+
if (n = te, o = D(n), Rt(w, e, h, r, n, o, t, !1) !== !1)
|
|
1456
|
+
return Q(), e.insertBefore(h, te), S = e, tt(), N(!0);
|
|
1460
1457
|
} else if (n.parentNode === e) {
|
|
1461
|
-
|
|
1462
|
-
var
|
|
1463
|
-
|
|
1464
|
-
var
|
|
1465
|
-
if (
|
|
1466
|
-
var
|
|
1458
|
+
o = D(n);
|
|
1459
|
+
var st = 0, ee, yn = h.parentNode !== e, Ce = !ti(h.animated && h.toRect || r, n.animated && n.toRect || o, _), Se = _ ? "top" : "left", bt = ze(n, "top", "top") || ze(h, "top", "top"), _n = bt ? bt.scrollTop : void 0;
|
|
1460
|
+
dt !== n && (ee = o[Se], Tt = !1, Ht = !Ce && s.invertSwap || yn), st = si(t, n, o, _, Ce ? 1 : s.swapThreshold, s.invertedSwapThreshold == null ? s.swapThreshold : s.invertedSwapThreshold, Ht, dt === n);
|
|
1461
|
+
var Et;
|
|
1462
|
+
if (st !== 0) {
|
|
1463
|
+
var Ae = R(h);
|
|
1467
1464
|
do
|
|
1468
|
-
|
|
1469
|
-
while (
|
|
1465
|
+
Ae -= st, Et = S.children[Ae];
|
|
1466
|
+
while (Et && (p(Et, "display") === "none" || Et === m));
|
|
1470
1467
|
}
|
|
1471
|
-
if (
|
|
1472
|
-
return
|
|
1473
|
-
|
|
1474
|
-
var
|
|
1475
|
-
|
|
1476
|
-
var
|
|
1477
|
-
if (
|
|
1478
|
-
return (
|
|
1468
|
+
if (st === 0 || Et === n)
|
|
1469
|
+
return N(!1);
|
|
1470
|
+
dt = n, Dt = st;
|
|
1471
|
+
var De = n.nextElementSibling, $t = !1;
|
|
1472
|
+
$t = st === 1;
|
|
1473
|
+
var Lt = Rt(w, e, h, r, n, o, t, $t);
|
|
1474
|
+
if (Lt !== !1)
|
|
1475
|
+
return (Lt === 1 || Lt === -1) && ($t = Lt === 1), be = !0, setTimeout(ri, 30), Q(), $t && !De ? e.appendChild(h) : n.parentNode.insertBefore(h, $t ? De : n), bt && Yn(bt, 0, _n - bt.scrollTop), S = h.parentNode, ee !== void 0 && !Ht && (jt = Math.abs(ee - D(n)[Se])), tt(), N(!0);
|
|
1479
1476
|
}
|
|
1480
|
-
if (e.contains(
|
|
1481
|
-
return
|
|
1477
|
+
if (e.contains(h))
|
|
1478
|
+
return N(!1);
|
|
1482
1479
|
}
|
|
1483
1480
|
return !1;
|
|
1484
1481
|
},
|
|
1485
1482
|
_ignoreWhileAnimating: null,
|
|
1486
1483
|
_offMoveEvents: function() {
|
|
1487
|
-
|
|
1484
|
+
b(document, "mousemove", this._onTouchMove), b(document, "touchmove", this._onTouchMove), b(document, "pointermove", this._onTouchMove), b(document, "dragover", it), b(document, "mousemove", it), b(document, "touchmove", it);
|
|
1488
1485
|
},
|
|
1489
1486
|
_offUpEvents: function() {
|
|
1490
1487
|
var t = this.el.ownerDocument;
|
|
1491
|
-
|
|
1488
|
+
b(t, "mouseup", this._onDrop), b(t, "touchend", this._onDrop), b(t, "pointerup", this._onDrop), b(t, "touchcancel", this._onDrop), b(document, "selectstart", this);
|
|
1492
1489
|
},
|
|
1493
1490
|
_onDrop: function(t) {
|
|
1494
1491
|
var e = this.el, n = this.options;
|
|
1495
|
-
if (
|
|
1492
|
+
if (M = R(h), Y = R(h, n.draggable), P("drop", this, {
|
|
1496
1493
|
evt: t
|
|
1497
|
-
}),
|
|
1494
|
+
}), S = h && h.parentNode, M = R(h), Y = R(h, n.draggable), g.eventCanceled) {
|
|
1498
1495
|
this._nulling();
|
|
1499
1496
|
return;
|
|
1500
1497
|
}
|
|
1501
|
-
|
|
1498
|
+
ut = !1, Ht = !1, Tt = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Ee(this.cloneId), Ee(this._dragStartId), this.nativeDraggable && (b(document, "drop", this), b(e, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Vt && p(document.body, "user-select", ""), p(h, "transform", ""), t && (St && (t.cancelable && t.preventDefault(), !n.dropBubble && t.stopPropagation()), m && m.parentNode && m.parentNode.removeChild(m), (w === S || T && T.lastPutMode !== "clone") && C && C.parentNode && C.parentNode.removeChild(C), h && (this.nativeDraggable && b(h, "dragend", this), ge(h), h.style["will-change"] = "", St && !ut && L(h, T ? T.options.ghostClass : this.options.ghostClass, !1), L(h, this.options.chosenClass, !1), x({
|
|
1502
1499
|
sortable: this,
|
|
1503
1500
|
name: "unchoose",
|
|
1504
|
-
toEl:
|
|
1501
|
+
toEl: S,
|
|
1505
1502
|
newIndex: null,
|
|
1506
1503
|
newDraggableIndex: null,
|
|
1507
1504
|
originalEvent: t
|
|
1508
|
-
}),
|
|
1509
|
-
rootEl:
|
|
1505
|
+
}), w !== S ? (M >= 0 && (x({
|
|
1506
|
+
rootEl: S,
|
|
1510
1507
|
name: "add",
|
|
1511
|
-
toEl:
|
|
1512
|
-
fromEl:
|
|
1508
|
+
toEl: S,
|
|
1509
|
+
fromEl: w,
|
|
1513
1510
|
originalEvent: t
|
|
1514
|
-
}),
|
|
1511
|
+
}), x({
|
|
1515
1512
|
sortable: this,
|
|
1516
1513
|
name: "remove",
|
|
1517
|
-
toEl:
|
|
1514
|
+
toEl: S,
|
|
1518
1515
|
originalEvent: t
|
|
1519
|
-
}),
|
|
1520
|
-
rootEl:
|
|
1516
|
+
}), x({
|
|
1517
|
+
rootEl: S,
|
|
1521
1518
|
name: "sort",
|
|
1522
|
-
toEl:
|
|
1523
|
-
fromEl:
|
|
1519
|
+
toEl: S,
|
|
1520
|
+
fromEl: w,
|
|
1524
1521
|
originalEvent: t
|
|
1525
|
-
}),
|
|
1522
|
+
}), x({
|
|
1526
1523
|
sortable: this,
|
|
1527
1524
|
name: "sort",
|
|
1528
|
-
toEl:
|
|
1525
|
+
toEl: S,
|
|
1529
1526
|
originalEvent: t
|
|
1530
|
-
})),
|
|
1527
|
+
})), T && T.save()) : M !== ct && M >= 0 && (x({
|
|
1531
1528
|
sortable: this,
|
|
1532
1529
|
name: "update",
|
|
1533
|
-
toEl:
|
|
1530
|
+
toEl: S,
|
|
1534
1531
|
originalEvent: t
|
|
1535
|
-
}),
|
|
1532
|
+
}), x({
|
|
1536
1533
|
sortable: this,
|
|
1537
1534
|
name: "sort",
|
|
1538
|
-
toEl:
|
|
1535
|
+
toEl: S,
|
|
1539
1536
|
originalEvent: t
|
|
1540
|
-
})), g.active && ((
|
|
1537
|
+
})), g.active && ((M == null || M === -1) && (M = ct, Y = At), x({
|
|
1541
1538
|
sortable: this,
|
|
1542
1539
|
name: "end",
|
|
1543
|
-
toEl:
|
|
1540
|
+
toEl: S,
|
|
1544
1541
|
originalEvent: t
|
|
1545
1542
|
}), this.save()))), this._nulling();
|
|
1546
1543
|
},
|
|
1547
1544
|
_nulling: function() {
|
|
1548
|
-
|
|
1545
|
+
P("nulling", this), w = h = S = m = rt = C = Ft = q = nt = U = St = M = Y = ct = At = dt = Dt = T = Mt = g.dragged = g.ghost = g.clone = g.active = null, Zt.forEach(function(t) {
|
|
1549
1546
|
t.checked = !0;
|
|
1550
|
-
}),
|
|
1547
|
+
}), Zt.length = ce = fe = 0;
|
|
1551
1548
|
},
|
|
1552
1549
|
handleEvent: function(t) {
|
|
1553
1550
|
switch (t.type) {
|
|
@@ -1557,7 +1554,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1557
1554
|
break;
|
|
1558
1555
|
case "dragenter":
|
|
1559
1556
|
case "dragover":
|
|
1560
|
-
|
|
1557
|
+
h && (this._onDragOver(t), ii(t));
|
|
1561
1558
|
break;
|
|
1562
1559
|
case "selectstart":
|
|
1563
1560
|
t.preventDefault();
|
|
@@ -1569,8 +1566,8 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1569
1566
|
* @returns {String[]}
|
|
1570
1567
|
*/
|
|
1571
1568
|
toArray: function() {
|
|
1572
|
-
for (var t = [], e, n = this.el.children,
|
|
1573
|
-
e = n[
|
|
1569
|
+
for (var t = [], e, n = this.el.children, r = 0, o = n.length, a = this.options; r < o; r++)
|
|
1570
|
+
e = n[r], V(e, a.draggable, this.el, !1) && t.push(e.getAttribute(a.dataIdAttr) || di(e));
|
|
1574
1571
|
return t;
|
|
1575
1572
|
},
|
|
1576
1573
|
/**
|
|
@@ -1578,12 +1575,12 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1578
1575
|
* @param {String[]} order order of the items
|
|
1579
1576
|
*/
|
|
1580
1577
|
sort: function(t, e) {
|
|
1581
|
-
var n = {},
|
|
1582
|
-
this.toArray().forEach(function(
|
|
1583
|
-
var
|
|
1584
|
-
|
|
1585
|
-
}, this), e && this.captureAnimationState(), t.forEach(function(
|
|
1586
|
-
n[
|
|
1578
|
+
var n = {}, r = this.el;
|
|
1579
|
+
this.toArray().forEach(function(o, a) {
|
|
1580
|
+
var s = r.children[a];
|
|
1581
|
+
V(s, this.options.draggable, r, !1) && (n[o] = s);
|
|
1582
|
+
}, this), e && this.captureAnimationState(), t.forEach(function(o) {
|
|
1583
|
+
n[o] && (r.removeChild(n[o]), r.appendChild(n[o]));
|
|
1587
1584
|
}), e && this.animateAll();
|
|
1588
1585
|
},
|
|
1589
1586
|
/**
|
|
@@ -1600,7 +1597,7 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1600
1597
|
* @returns {HTMLElement|null}
|
|
1601
1598
|
*/
|
|
1602
1599
|
closest: function(t, e) {
|
|
1603
|
-
return
|
|
1600
|
+
return V(t, e || this.options.draggable, this.el, !1);
|
|
1604
1601
|
},
|
|
1605
1602
|
/**
|
|
1606
1603
|
* Set/get option
|
|
@@ -1612,24 +1609,24 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1612
1609
|
var n = this.options;
|
|
1613
1610
|
if (e === void 0)
|
|
1614
1611
|
return n[t];
|
|
1615
|
-
var
|
|
1616
|
-
typeof
|
|
1612
|
+
var r = Nt.modifyOption(this, t, e);
|
|
1613
|
+
typeof r < "u" ? n[t] = r : n[t] = e, t === "group" && un(n);
|
|
1617
1614
|
},
|
|
1618
1615
|
/**
|
|
1619
1616
|
* Destroy
|
|
1620
1617
|
*/
|
|
1621
1618
|
destroy: function() {
|
|
1622
|
-
|
|
1619
|
+
P("destroy", this);
|
|
1623
1620
|
var t = this.el;
|
|
1624
|
-
t[
|
|
1621
|
+
t[B] = null, b(t, "mousedown", this._onTapStart), b(t, "touchstart", this._onTapStart), b(t, "pointerdown", this._onTapStart), this.nativeDraggable && (b(t, "dragover", this), b(t, "dragenter", this)), Array.prototype.forEach.call(t.querySelectorAll("[draggable]"), function(e) {
|
|
1625
1622
|
e.removeAttribute("draggable");
|
|
1626
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
1623
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), qt.splice(qt.indexOf(this.el), 1), this.el = t = null;
|
|
1627
1624
|
},
|
|
1628
1625
|
_hideClone: function() {
|
|
1629
|
-
if (!
|
|
1630
|
-
if (
|
|
1626
|
+
if (!q) {
|
|
1627
|
+
if (P("hideClone", this), g.eventCanceled)
|
|
1631
1628
|
return;
|
|
1632
|
-
p(
|
|
1629
|
+
p(C, "display", "none"), this.options.removeCloneOnHide && C.parentNode && C.parentNode.removeChild(C), q = !0;
|
|
1633
1630
|
}
|
|
1634
1631
|
},
|
|
1635
1632
|
_showClone: function(t) {
|
|
@@ -1637,95 +1634,95 @@ g.prototype = /** @lends Sortable.prototype */
|
|
|
1637
1634
|
this._hideClone();
|
|
1638
1635
|
return;
|
|
1639
1636
|
}
|
|
1640
|
-
if (
|
|
1641
|
-
if (
|
|
1637
|
+
if (q) {
|
|
1638
|
+
if (P("showClone", this), g.eventCanceled)
|
|
1642
1639
|
return;
|
|
1643
|
-
|
|
1640
|
+
h.parentNode == w && !this.options.group.revertClone ? w.insertBefore(C, h) : rt ? w.insertBefore(C, rt) : w.appendChild(C), this.options.group.revertClone && this.animate(h, C), p(C, "display", ""), q = !1;
|
|
1644
1641
|
}
|
|
1645
1642
|
}
|
|
1646
1643
|
};
|
|
1647
|
-
function
|
|
1644
|
+
function ii(i) {
|
|
1648
1645
|
i.dataTransfer && (i.dataTransfer.dropEffect = "move"), i.cancelable && i.preventDefault();
|
|
1649
1646
|
}
|
|
1650
|
-
function
|
|
1651
|
-
var
|
|
1652
|
-
return window.CustomEvent && !
|
|
1647
|
+
function Rt(i, t, e, n, r, o, a, s) {
|
|
1648
|
+
var l, d = i[B], c = d.options.onMove, u;
|
|
1649
|
+
return window.CustomEvent && !J && !Jt ? l = new CustomEvent("move", {
|
|
1653
1650
|
bubbles: !0,
|
|
1654
1651
|
cancelable: !0
|
|
1655
|
-
}) : (
|
|
1652
|
+
}) : (l = document.createEvent("Event"), l.initEvent("move", !0, !0)), l.to = t, l.from = i, l.dragged = e, l.draggedRect = n, l.related = r || t, l.relatedRect = o || D(t), l.willInsertAfter = s, l.originalEvent = a, i.dispatchEvent(l), c && (u = c.call(d, l, a)), u;
|
|
1656
1653
|
}
|
|
1657
|
-
function
|
|
1654
|
+
function ge(i) {
|
|
1658
1655
|
i.draggable = !1;
|
|
1659
1656
|
}
|
|
1660
|
-
function
|
|
1661
|
-
|
|
1657
|
+
function ri() {
|
|
1658
|
+
be = !1;
|
|
1662
1659
|
}
|
|
1663
|
-
function
|
|
1664
|
-
var n =
|
|
1665
|
-
return t ? i.clientX < n.left -
|
|
1660
|
+
function oi(i, t, e) {
|
|
1661
|
+
var n = D(yt(e.el, 0, e.options, !0)), r = 10;
|
|
1662
|
+
return t ? i.clientX < n.left - r || i.clientY < n.top && i.clientX < n.right : i.clientY < n.top - r || i.clientY < n.bottom && i.clientX < n.left;
|
|
1666
1663
|
}
|
|
1667
|
-
function
|
|
1668
|
-
var n =
|
|
1669
|
-
return t ? i.clientX > n.right +
|
|
1664
|
+
function ai(i, t, e) {
|
|
1665
|
+
var n = D(we(e.el, e.options.draggable)), r = 10;
|
|
1666
|
+
return t ? i.clientX > n.right + r || i.clientX <= n.right && i.clientY > n.bottom && i.clientX >= n.left : i.clientX > n.right && i.clientY > n.top || i.clientX <= n.right && i.clientY > n.bottom + r;
|
|
1670
1667
|
}
|
|
1671
|
-
function
|
|
1672
|
-
var
|
|
1668
|
+
function si(i, t, e, n, r, o, a, s) {
|
|
1669
|
+
var l = n ? i.clientY : i.clientX, d = n ? e.height : e.width, c = n ? e.top : e.left, u = n ? e.bottom : e.right, f = !1;
|
|
1673
1670
|
if (!a) {
|
|
1674
|
-
if (
|
|
1675
|
-
if (!
|
|
1671
|
+
if (s && jt < d * r) {
|
|
1672
|
+
if (!Tt && (Dt === 1 ? l > c + d * o / 2 : l < u - d * o / 2) && (Tt = !0), Tt)
|
|
1676
1673
|
f = !0;
|
|
1677
|
-
else if (
|
|
1678
|
-
return -
|
|
1679
|
-
} else if (
|
|
1680
|
-
return
|
|
1674
|
+
else if (Dt === 1 ? l < c + jt : l > u - jt)
|
|
1675
|
+
return -Dt;
|
|
1676
|
+
} else if (l > c + d * (1 - r) / 2 && l < u - d * (1 - r) / 2)
|
|
1677
|
+
return li(t);
|
|
1681
1678
|
}
|
|
1682
|
-
return f = f || a, f && (
|
|
1679
|
+
return f = f || a, f && (l < c + d * o / 2 || l > u - d * o / 2) ? l > c + d / 2 ? 1 : -1 : 0;
|
|
1683
1680
|
}
|
|
1684
|
-
function
|
|
1685
|
-
return
|
|
1681
|
+
function li(i) {
|
|
1682
|
+
return R(h) < R(i) ? 1 : -1;
|
|
1686
1683
|
}
|
|
1687
|
-
function
|
|
1684
|
+
function di(i) {
|
|
1688
1685
|
for (var t = i.tagName + i.className + i.src + i.href + i.textContent, e = t.length, n = 0; e--; )
|
|
1689
1686
|
n += t.charCodeAt(e);
|
|
1690
1687
|
return n.toString(36);
|
|
1691
1688
|
}
|
|
1692
|
-
function
|
|
1693
|
-
|
|
1689
|
+
function hi(i) {
|
|
1690
|
+
Zt.length = 0;
|
|
1694
1691
|
for (var t = i.getElementsByTagName("input"), e = t.length; e--; ) {
|
|
1695
1692
|
var n = t[e];
|
|
1696
|
-
n.checked &&
|
|
1693
|
+
n.checked && Zt.push(n);
|
|
1697
1694
|
}
|
|
1698
1695
|
}
|
|
1699
|
-
function
|
|
1696
|
+
function zt(i) {
|
|
1700
1697
|
return setTimeout(i, 0);
|
|
1701
1698
|
}
|
|
1702
|
-
function
|
|
1699
|
+
function Ee(i) {
|
|
1703
1700
|
return clearTimeout(i);
|
|
1704
1701
|
}
|
|
1705
|
-
|
|
1706
|
-
(g.active ||
|
|
1702
|
+
Qt && $(document, "touchmove", function(i) {
|
|
1703
|
+
(g.active || ut) && i.cancelable && i.preventDefault();
|
|
1707
1704
|
});
|
|
1708
1705
|
g.utils = {
|
|
1709
|
-
on:
|
|
1710
|
-
off:
|
|
1706
|
+
on: $,
|
|
1707
|
+
off: b,
|
|
1711
1708
|
css: p,
|
|
1712
|
-
find:
|
|
1709
|
+
find: sn,
|
|
1713
1710
|
is: function(t, e) {
|
|
1714
|
-
return !!
|
|
1711
|
+
return !!V(t, e, t, !1);
|
|
1715
1712
|
},
|
|
1716
|
-
extend:
|
|
1717
|
-
throttle:
|
|
1718
|
-
closest:
|
|
1719
|
-
toggleClass:
|
|
1720
|
-
clone:
|
|
1721
|
-
index:
|
|
1722
|
-
nextTick:
|
|
1723
|
-
cancelNextTick:
|
|
1713
|
+
extend: Xn,
|
|
1714
|
+
throttle: Wn,
|
|
1715
|
+
closest: V,
|
|
1716
|
+
toggleClass: L,
|
|
1717
|
+
clone: ln,
|
|
1718
|
+
index: R,
|
|
1719
|
+
nextTick: zt,
|
|
1720
|
+
cancelNextTick: Ee,
|
|
1724
1721
|
detectDirection: hn,
|
|
1725
|
-
getChild:
|
|
1722
|
+
getChild: yt
|
|
1726
1723
|
};
|
|
1727
1724
|
g.get = function(i) {
|
|
1728
|
-
return i[
|
|
1725
|
+
return i[B];
|
|
1729
1726
|
};
|
|
1730
1727
|
g.mount = function() {
|
|
1731
1728
|
for (var i = arguments.length, t = new Array(i), e = 0; e < i; e++)
|
|
@@ -1733,28 +1730,28 @@ g.mount = function() {
|
|
|
1733
1730
|
t[0].constructor === Array && (t = t[0]), t.forEach(function(n) {
|
|
1734
1731
|
if (!n.prototype || !n.prototype.constructor)
|
|
1735
1732
|
throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));
|
|
1736
|
-
n.utils && (g.utils =
|
|
1733
|
+
n.utils && (g.utils = F(F({}, g.utils), n.utils)), Nt.mount(n);
|
|
1737
1734
|
});
|
|
1738
1735
|
};
|
|
1739
1736
|
g.create = function(i, t) {
|
|
1740
1737
|
return new g(i, t);
|
|
1741
1738
|
};
|
|
1742
1739
|
g.version = Fn;
|
|
1743
|
-
var
|
|
1744
|
-
var e = t.originalEvent, n = t.putSortable,
|
|
1740
|
+
var pn = function(t) {
|
|
1741
|
+
var e = t.originalEvent, n = t.putSortable, r = t.dragEl, o = t.activeSortable, a = t.dispatchSortableEvent, s = t.hideGhostForTarget, l = t.unhideGhostForTarget;
|
|
1745
1742
|
if (e) {
|
|
1746
|
-
var d = n ||
|
|
1747
|
-
|
|
1748
|
-
var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e,
|
|
1749
|
-
|
|
1750
|
-
dragEl:
|
|
1743
|
+
var d = n || o;
|
|
1744
|
+
s();
|
|
1745
|
+
var c = e.changedTouches && e.changedTouches.length ? e.changedTouches[0] : e, u = document.elementFromPoint(c.clientX, c.clientY);
|
|
1746
|
+
l(), d && !d.el.contains(u) && (a("spill"), this.onSpill({
|
|
1747
|
+
dragEl: r,
|
|
1751
1748
|
putSortable: n
|
|
1752
1749
|
}));
|
|
1753
1750
|
}
|
|
1754
1751
|
};
|
|
1755
|
-
function
|
|
1752
|
+
function gn() {
|
|
1756
1753
|
}
|
|
1757
|
-
|
|
1754
|
+
gn.prototype = {
|
|
1758
1755
|
startIndex: null,
|
|
1759
1756
|
dragStart: function(t) {
|
|
1760
1757
|
var e = t.oldDraggableIndex;
|
|
@@ -1763,181 +1760,212 @@ mn.prototype = {
|
|
|
1763
1760
|
onSpill: function(t) {
|
|
1764
1761
|
var e = t.dragEl, n = t.putSortable;
|
|
1765
1762
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
1766
|
-
var
|
|
1767
|
-
|
|
1763
|
+
var r = yt(this.sortable.el, this.startIndex, this.options);
|
|
1764
|
+
r ? this.sortable.el.insertBefore(e, r) : this.sortable.el.appendChild(e), this.sortable.animateAll(), n && n.animateAll();
|
|
1768
1765
|
},
|
|
1769
|
-
drop:
|
|
1766
|
+
drop: pn
|
|
1770
1767
|
};
|
|
1771
|
-
|
|
1768
|
+
K(gn, {
|
|
1772
1769
|
pluginName: "revertOnSpill"
|
|
1773
1770
|
});
|
|
1774
|
-
function
|
|
1771
|
+
function mn() {
|
|
1775
1772
|
}
|
|
1776
|
-
|
|
1773
|
+
mn.prototype = {
|
|
1777
1774
|
onSpill: function(t) {
|
|
1778
|
-
var e = t.dragEl, n = t.putSortable,
|
|
1779
|
-
|
|
1775
|
+
var e = t.dragEl, n = t.putSortable, r = n || this.sortable;
|
|
1776
|
+
r.captureAnimationState(), e.parentNode && e.parentNode.removeChild(e), r.animateAll();
|
|
1780
1777
|
},
|
|
1781
|
-
drop:
|
|
1778
|
+
drop: pn
|
|
1782
1779
|
};
|
|
1783
|
-
|
|
1780
|
+
K(mn, {
|
|
1784
1781
|
pluginName: "removeOnSpill"
|
|
1785
1782
|
});
|
|
1786
|
-
const
|
|
1783
|
+
const vn = `
|
|
1787
1784
|
:host {
|
|
1788
1785
|
display: block;
|
|
1789
1786
|
}
|
|
1787
|
+
.layer {
|
|
1788
|
+
display: flex;
|
|
1789
|
+
justify-content: space-between;
|
|
1790
|
+
}
|
|
1791
|
+
.dragHandle {
|
|
1792
|
+
cursor: ns-resize;
|
|
1793
|
+
}
|
|
1794
|
+
ul[data-group] {
|
|
1795
|
+
padding-inline-start: 40px;
|
|
1796
|
+
}
|
|
1797
|
+
`, ui = `
|
|
1790
1798
|
ul {
|
|
1791
1799
|
padding: 0;
|
|
1792
1800
|
}
|
|
1793
1801
|
li {
|
|
1794
1802
|
list-style: none;
|
|
1795
1803
|
}
|
|
1796
|
-
li > .layer {
|
|
1797
|
-
display: flex;
|
|
1798
|
-
justify-content: space-between;
|
|
1799
|
-
}
|
|
1800
1804
|
li > .layer > label {
|
|
1801
1805
|
cursor: pointer;
|
|
1802
1806
|
display: flex;
|
|
1803
1807
|
align-items: center;
|
|
1804
1808
|
}
|
|
1805
|
-
li label >
|
|
1809
|
+
li label > input[type=checkbox] {
|
|
1810
|
+
appearance: none;
|
|
1811
|
+
margin: 0;
|
|
1812
|
+
}
|
|
1813
|
+
li label > input[type=checkbox]:after {
|
|
1814
|
+
display: block;
|
|
1815
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eeye-off-outline%3C/title%3E%3Cpath fill='%23004170' d='M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z' /%3E%3C/svg%3E");
|
|
1816
|
+
width: 24px;
|
|
1817
|
+
height: 24px;
|
|
1806
1818
|
margin-right: 4px;
|
|
1807
1819
|
}
|
|
1808
|
-
|
|
1809
|
-
|
|
1820
|
+
li label > input[type=checkbox]:checked:after {
|
|
1821
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Eeye%3C/title%3E%3Cpath fill='%23004170' d='M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z' /%3E%3C/svg%3E");
|
|
1810
1822
|
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1823
|
+
.dragHandle span {
|
|
1824
|
+
display: none;
|
|
1825
|
+
}
|
|
1826
|
+
.dragHandle {
|
|
1827
|
+
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ctitle%3Edrag%3C/title%3E%3Cpath fill='%23004170' d='M7,19V17H9V19H7M11,19V17H13V19H11M15,19V17H17V19H15M7,15V13H9V15H7M11,15V13H13V15H11M15,15V13H17V15H15M7,11V9H9V11H7M11,11V9H13V11H11M15,11V9H17V11H15M7,7V5H9V7H7M11,7V5H13V7H11M15,7V5H17V7H15Z' /%3E%3C/svg%3E");
|
|
1828
|
+
width: 24px;
|
|
1829
|
+
height: 24px;
|
|
1830
|
+
}
|
|
1831
|
+
`;
|
|
1832
|
+
var ci = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, A = (i, t, e, n) => {
|
|
1833
|
+
for (var r = n > 1 ? void 0 : n ? fi(t, e) : t, o = i.length - 1, a; o >= 0; o--)
|
|
1834
|
+
(a = i[o]) && (r = (n ? a(t, e, r) : a(r)) || r);
|
|
1835
|
+
return n && r && ci(t, e, r), r;
|
|
1816
1836
|
};
|
|
1817
|
-
let H = class extends
|
|
1837
|
+
let H = class extends ft {
|
|
1818
1838
|
constructor() {
|
|
1819
|
-
super(...arguments)
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
);
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
const e = {
|
|
1839
|
+
super(...arguments), this.layerIdentifier = "ol_uid", this.layerTitle = "title", this.sortBy = "layerOrder", this.layerConfig = ["opacity"], this.externalLayerConfig = void 0, this.filterLayers = (i, t, e) => {
|
|
1840
|
+
let n = [];
|
|
1841
|
+
const r = (o, a, s) => {
|
|
1842
|
+
n = [...n, ...o.filter((d) => d.get(a) === s)];
|
|
1843
|
+
const l = o.filter((d) => d.getLayers);
|
|
1844
|
+
return l.length > 0 && l.forEach(
|
|
1845
|
+
(d) => (
|
|
1846
|
+
// @ts-ignore
|
|
1847
|
+
r(d.getLayers().getArray(), a, s)
|
|
1848
|
+
)
|
|
1849
|
+
), n;
|
|
1850
|
+
};
|
|
1851
|
+
return r(i, t, e), n;
|
|
1852
|
+
}, this.findLayerById = (i, t) => this.filterLayers(i, "id", t)[0];
|
|
1853
|
+
}
|
|
1854
|
+
_updateControl(i) {
|
|
1855
|
+
this.layerCollection = i, this.optionalLayerArray = this.filterLayers(
|
|
1856
|
+
i.getArray(),
|
|
1857
|
+
"layerControlOptional",
|
|
1858
|
+
!0
|
|
1859
|
+
), this.requestUpdate();
|
|
1860
|
+
}
|
|
1861
|
+
_emitLayerconfig(i) {
|
|
1862
|
+
const t = {
|
|
1844
1863
|
detail: {
|
|
1845
|
-
layer:
|
|
1864
|
+
layer: i
|
|
1846
1865
|
},
|
|
1847
1866
|
bubbles: !0,
|
|
1848
1867
|
composed: !0
|
|
1849
1868
|
};
|
|
1850
|
-
this.dispatchEvent(new CustomEvent("layerconfig",
|
|
1869
|
+
this.dispatchEvent(new CustomEvent("layerconfig", t));
|
|
1851
1870
|
}
|
|
1852
|
-
changeOpacity(
|
|
1853
|
-
|
|
1871
|
+
changeOpacity(i, t) {
|
|
1872
|
+
i.setOpacity(t);
|
|
1854
1873
|
}
|
|
1855
|
-
changeStyleProperty(t, e
|
|
1856
|
-
|
|
1874
|
+
changeStyleProperty(i, t, e) {
|
|
1875
|
+
i.updateStyleVariables({
|
|
1857
1876
|
// @ts-ignore
|
|
1858
|
-
...
|
|
1859
|
-
[
|
|
1877
|
+
...i.style_,
|
|
1878
|
+
[t]: e
|
|
1860
1879
|
});
|
|
1861
1880
|
}
|
|
1881
|
+
preFilterLayers(i) {
|
|
1882
|
+
return [...i].filter(
|
|
1883
|
+
(t) => t.get("layerControlHide") !== !0 && t.get("layerControlOptional") !== !0
|
|
1884
|
+
);
|
|
1885
|
+
}
|
|
1862
1886
|
resetLayerConfig() {
|
|
1863
|
-
|
|
1864
|
-
|
|
1887
|
+
const i = this.layerConfig;
|
|
1888
|
+
this.layerConfig = [], this.hideList = !0, setTimeout(() => {
|
|
1889
|
+
this.layerConfig = i, this.hideList = !1, this.requestUpdate();
|
|
1865
1890
|
}, 0);
|
|
1866
1891
|
}
|
|
1867
1892
|
render() {
|
|
1868
|
-
var
|
|
1869
|
-
const
|
|
1870
|
-
|
|
1871
|
-
this._currentlySorting || this._updateControl(
|
|
1872
|
-
})
|
|
1893
|
+
var r;
|
|
1894
|
+
const i = document.querySelector(this.for), e = (i.map || i).getLayers();
|
|
1895
|
+
this._updateControl(e), e.on("change:length", () => {
|
|
1896
|
+
this._currentlySorting || this._updateControl(e);
|
|
1897
|
+
});
|
|
1898
|
+
const n = (o, a) => I`
|
|
1899
|
+
<ul data-group="${a ?? E}">
|
|
1900
|
+
${_e(
|
|
1901
|
+
o,
|
|
1902
|
+
(s) => I`
|
|
1903
|
+
<li
|
|
1904
|
+
data-layer="${//@ts-ignore
|
|
1905
|
+
s.get(this.layerIdentifier)}"
|
|
1906
|
+
data-disabled="${s.get("layerControlDisable") || E}"
|
|
1907
|
+
>
|
|
1908
|
+
<div class="layer">
|
|
1909
|
+
<label>
|
|
1910
|
+
<input
|
|
1911
|
+
type="checkbox"
|
|
1912
|
+
checked="${s.getVisible() || E}"
|
|
1913
|
+
@click=${() => {
|
|
1914
|
+
s.setVisible(!s.getVisible()), this.requestUpdate();
|
|
1915
|
+
}}
|
|
1916
|
+
/>
|
|
1917
|
+
<span class="title"
|
|
1918
|
+
>${s.get(this.layerTitle) || `layer ${// @ts-ignore
|
|
1919
|
+
s.get(this.layerIdentifier)}`}</span
|
|
1920
|
+
>
|
|
1921
|
+
</label>
|
|
1922
|
+
${this.sortBy === "layerOrder" && !s.get("layerControlDisable") ? I`<div class="dragHandle">
|
|
1923
|
+
<span>=</span>
|
|
1924
|
+
</div>` : E}
|
|
1925
|
+
</div>
|
|
1926
|
+
${this.layerConfig ? I`
|
|
1927
|
+
<eox-layerconfig
|
|
1928
|
+
.layerConfig="${this.layerConfig}"
|
|
1929
|
+
.layerControl="${this}"
|
|
1930
|
+
.layer=${s}
|
|
1931
|
+
.external=${this.externalLayerConfig}
|
|
1932
|
+
></eox-layerconfig>
|
|
1933
|
+
` : E}
|
|
1934
|
+
${// @ts-ignore
|
|
1935
|
+
this.externalLayerConfig && s.style_ ? I`
|
|
1936
|
+
<button
|
|
1937
|
+
@click=${() => this._emitLayerconfig(s)}
|
|
1938
|
+
>
|
|
1939
|
+
configure
|
|
1940
|
+
</button>
|
|
1941
|
+
` : E}
|
|
1942
|
+
${// @ts-ignore
|
|
1943
|
+
s.getLayers ? n(
|
|
1944
|
+
this.preFilterLayers(
|
|
1945
|
+
// @ts-ignore
|
|
1946
|
+
[...s.getLayers().getArray()].reverse()
|
|
1947
|
+
),
|
|
1948
|
+
s.get("id")
|
|
1949
|
+
) : E}
|
|
1950
|
+
</li>
|
|
1951
|
+
`
|
|
1952
|
+
)}
|
|
1953
|
+
</ul>
|
|
1954
|
+
`;
|
|
1955
|
+
return I`
|
|
1873
1956
|
<style>
|
|
1874
|
-
${
|
|
1957
|
+
${vn}
|
|
1958
|
+
${!this.unstyled && ui}
|
|
1875
1959
|
</style>
|
|
1876
1960
|
<div>
|
|
1877
1961
|
<slot></slot>
|
|
1878
|
-
<
|
|
1879
|
-
${
|
|
1880
|
-
this.
|
|
1881
|
-
(r) => I`
|
|
1882
|
-
<li
|
|
1883
|
-
layerid="${//@ts-ignore
|
|
1884
|
-
r.get(this.layerIdentifier)}"
|
|
1885
|
-
>
|
|
1886
|
-
<div class="layer">
|
|
1887
|
-
<label>
|
|
1888
|
-
${be(
|
|
1889
|
-
r.getVisible(),
|
|
1890
|
-
() => I`<img
|
|
1891
|
-
src="${pi}"
|
|
1892
|
-
width="24"
|
|
1893
|
-
height="24"
|
|
1894
|
-
/>`,
|
|
1895
|
-
() => I`<img
|
|
1896
|
-
src="${gi}"
|
|
1897
|
-
width="24"
|
|
1898
|
-
height="24"
|
|
1899
|
-
/>`
|
|
1900
|
-
)}
|
|
1901
|
-
<input
|
|
1902
|
-
type="checkbox"
|
|
1903
|
-
checked="${r.getVisible() || w}"
|
|
1904
|
-
style="display: none"
|
|
1905
|
-
@click=${() => {
|
|
1906
|
-
r.setVisible(!r.getVisible()), this.requestUpdate();
|
|
1907
|
-
}}
|
|
1908
|
-
/>
|
|
1909
|
-
<span class="title"
|
|
1910
|
-
>${r.get(this.layerTitle) || `layer ${// @ts-ignore
|
|
1911
|
-
r.get(this.layerIdentifier)}`}</span
|
|
1912
|
-
>
|
|
1913
|
-
</label>
|
|
1914
|
-
${this.sortBy === "layerOrder" ? I`<img
|
|
1915
|
-
class="dragHandle"
|
|
1916
|
-
src="${mi}"
|
|
1917
|
-
width="24"
|
|
1918
|
-
height="24"
|
|
1919
|
-
/>` : w}
|
|
1920
|
-
</div>
|
|
1921
|
-
${this.layerConfig && !this.hideConfigs ? I`
|
|
1922
|
-
<eox-layerconfig
|
|
1923
|
-
.layerConfig="${this.layerConfig}"
|
|
1924
|
-
.layerControl="${this}"
|
|
1925
|
-
.layer=${r}
|
|
1926
|
-
.external=${this.externalLayerConfig}
|
|
1927
|
-
></eox-layerconfig>
|
|
1928
|
-
` : w}
|
|
1929
|
-
${// @ts-ignore
|
|
1930
|
-
this.externalLayerConfig && r.style_ ? I`
|
|
1931
|
-
<button @click=${() => this._emitLayerconfig(r)}>
|
|
1932
|
-
configure
|
|
1933
|
-
</button>
|
|
1934
|
-
` : w}
|
|
1935
|
-
</li>
|
|
1936
|
-
`
|
|
1962
|
+
<div>
|
|
1963
|
+
${!this.hideList && n(
|
|
1964
|
+
this.preFilterLayers(e.getArray())
|
|
1937
1965
|
)}
|
|
1938
|
-
</
|
|
1939
|
-
${
|
|
1940
|
-
((
|
|
1966
|
+
</div>
|
|
1967
|
+
${nn(
|
|
1968
|
+
((r = this.optionalLayerArray) == null ? void 0 : r.length) > 0,
|
|
1941
1969
|
() => I`
|
|
1942
1970
|
<label for="optional">Optional layers</label>
|
|
1943
1971
|
|
|
@@ -1946,28 +1974,36 @@ let H = class extends pt {
|
|
|
1946
1974
|
-- select an optional layer to add --
|
|
1947
1975
|
</option>
|
|
1948
1976
|
${this.optionalLayerArray.map(
|
|
1949
|
-
(
|
|
1977
|
+
(o) => I`
|
|
1950
1978
|
<option
|
|
1951
1979
|
value="${// @ts-ignore
|
|
1952
|
-
|
|
1980
|
+
o.get(this.layerIdentifier)}"
|
|
1953
1981
|
>
|
|
1954
|
-
${
|
|
1955
|
-
|
|
1982
|
+
${o.get(this.layerTitle) || `layer ${// @ts-ignore
|
|
1983
|
+
o.get(this.layerIdentifier)}`}
|
|
1956
1984
|
</option>
|
|
1957
1985
|
`
|
|
1958
1986
|
)}
|
|
1959
1987
|
</select>
|
|
1960
1988
|
<button
|
|
1961
1989
|
@click="${() => {
|
|
1962
|
-
const
|
|
1990
|
+
const o = this.optionalLayerArray.find(
|
|
1963
1991
|
// @ts-ignore
|
|
1964
1992
|
(a) => a.get(this.layerIdentifier) === // @ts-ignore
|
|
1965
1993
|
this.shadowRoot.querySelector("select[name=optional]").value
|
|
1966
1994
|
);
|
|
1967
|
-
|
|
1968
|
-
this.
|
|
1969
|
-
|
|
1970
|
-
|
|
1995
|
+
if (o.get("group")) {
|
|
1996
|
+
const a = this.findLayerById(
|
|
1997
|
+
this.layerCollection.getArray(),
|
|
1998
|
+
o.get("group")
|
|
1999
|
+
);
|
|
2000
|
+
a.getLayers().remove(o), a.getLayers().insertAt(a.getLayers().getLength(), o);
|
|
2001
|
+
} else
|
|
2002
|
+
this.layerCollection.remove(o), this.layerCollection.insertAt(
|
|
2003
|
+
this.layerCollection.getLength(),
|
|
2004
|
+
o
|
|
2005
|
+
);
|
|
2006
|
+
o.set("layerControlOptional", !1), o.setVisible(!0), this.resetLayerConfig();
|
|
1971
2007
|
}}"
|
|
1972
2008
|
>
|
|
1973
2009
|
add
|
|
@@ -1978,25 +2014,48 @@ let H = class extends pt {
|
|
|
1978
2014
|
`;
|
|
1979
2015
|
}
|
|
1980
2016
|
updated() {
|
|
1981
|
-
this.sortBy == "layerOrder" &&
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
)
|
|
1993
|
-
|
|
1994
|
-
|
|
2017
|
+
this.sortBy == "layerOrder" && this.renderRoot.querySelectorAll("ul").forEach((t) => {
|
|
2018
|
+
const e = t.dataset.group;
|
|
2019
|
+
g.create(t, {
|
|
2020
|
+
handle: ".dragHandle",
|
|
2021
|
+
dataIdAttr: "data-layer",
|
|
2022
|
+
filter: "data-disabled",
|
|
2023
|
+
store: {
|
|
2024
|
+
get: () => e ? [
|
|
2025
|
+
...this.findLayerById(
|
|
2026
|
+
this.layerCollection.getArray(),
|
|
2027
|
+
e
|
|
2028
|
+
).getLayers().getArray().map((o) => o.get(this.layerIdentifier))
|
|
2029
|
+
].reverse() : [
|
|
2030
|
+
...this.layerCollection.getArray().map((n) => n.get(this.layerIdentifier))
|
|
2031
|
+
].reverse(),
|
|
2032
|
+
set: (n) => {
|
|
2033
|
+
var r = n.toArray().reverse();
|
|
2034
|
+
r.forEach((o, a) => {
|
|
2035
|
+
if (e) {
|
|
2036
|
+
const l = this.findLayerById(
|
|
2037
|
+
this.layerCollection.getArray(),
|
|
2038
|
+
e
|
|
2039
|
+
).getLayers(), d = this.findLayerById(
|
|
2040
|
+
l.getArray(),
|
|
2041
|
+
o
|
|
2042
|
+
);
|
|
2043
|
+
l.remove(d), l.insertAt(a, d);
|
|
2044
|
+
} else {
|
|
2045
|
+
const s = this.findLayerById(
|
|
2046
|
+
this.layerCollection.getArray(),
|
|
2047
|
+
o
|
|
2048
|
+
);
|
|
2049
|
+
this.layerCollection.remove(s), this.layerCollection.insertAt(a, s);
|
|
2050
|
+
}
|
|
2051
|
+
});
|
|
2052
|
+
}
|
|
2053
|
+
},
|
|
2054
|
+
onMove: (n) => !n.related.dataset.disabled,
|
|
2055
|
+
onSort: () => {
|
|
2056
|
+
this.resetLayerConfig();
|
|
1995
2057
|
}
|
|
1996
|
-
}
|
|
1997
|
-
onSort: () => {
|
|
1998
|
-
this.resetLayerConfig();
|
|
1999
|
-
}
|
|
2058
|
+
});
|
|
2000
2059
|
});
|
|
2001
2060
|
}
|
|
2002
2061
|
};
|
|
@@ -2030,90 +2089,85 @@ A([
|
|
|
2030
2089
|
A([
|
|
2031
2090
|
k({ type: Boolean })
|
|
2032
2091
|
], H.prototype, "externalLayerConfig", 2);
|
|
2092
|
+
A([
|
|
2093
|
+
k({ type: Boolean })
|
|
2094
|
+
], H.prototype, "unstyled", 2);
|
|
2033
2095
|
H = A([
|
|
2034
|
-
|
|
2096
|
+
en("eox-layercontrol")
|
|
2035
2097
|
], H);
|
|
2036
|
-
let
|
|
2098
|
+
let W = class extends ft {
|
|
2037
2099
|
constructor() {
|
|
2038
|
-
super(...arguments);
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
C(this, "layer");
|
|
2043
|
-
C(this, "external");
|
|
2044
|
-
C(this, "_layerControlElement");
|
|
2045
|
-
C(this, "_currentLayer");
|
|
2046
|
-
C(this, "_configList", {});
|
|
2047
|
-
}
|
|
2048
|
-
_handleInput(t, e) {
|
|
2049
|
-
e === "opacity" ? this._layerControlElement.changeOpacity(
|
|
2100
|
+
super(...arguments), this._configList = {};
|
|
2101
|
+
}
|
|
2102
|
+
_handleInput(i, t) {
|
|
2103
|
+
t === "opacity" ? this._layerControlElement.changeOpacity(
|
|
2050
2104
|
this._currentLayer,
|
|
2051
|
-
parseFloat(
|
|
2105
|
+
parseFloat(i.target.value)
|
|
2052
2106
|
) : this._layerControlElement.changeStyleProperty(
|
|
2053
2107
|
this._currentLayer,
|
|
2054
|
-
|
|
2055
|
-
parseFloat(
|
|
2108
|
+
t,
|
|
2109
|
+
parseFloat(i.target.value)
|
|
2056
2110
|
);
|
|
2057
2111
|
}
|
|
2058
|
-
_parseConfigs(
|
|
2059
|
-
if (!
|
|
2112
|
+
_parseConfigs(i) {
|
|
2113
|
+
if (!i)
|
|
2060
2114
|
return;
|
|
2061
|
-
const
|
|
2062
|
-
|
|
2115
|
+
const t = i.style_;
|
|
2116
|
+
t && t.color && t.color[0] === "array" && (this._configList = t.variables);
|
|
2063
2117
|
}
|
|
2064
2118
|
connectedCallback() {
|
|
2065
|
-
super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement && this._layerControlElement.addEventListener("layerconfig", (
|
|
2066
|
-
this._currentLayer =
|
|
2119
|
+
super.connectedCallback(), !this.layerConfig && !this.layerControl ? (this._layerControlElement = document.querySelector(this.for), this.layerConfig = this._layerControlElement.layerConfig, this._layerControlElement && this._layerControlElement.addEventListener("layerconfig", (i) => {
|
|
2120
|
+
this._currentLayer = i.detail.layer, this._parseConfigs(this._currentLayer), this.requestUpdate();
|
|
2067
2121
|
})) : (this._layerControlElement = this.layerControl, this._currentLayer = this.layer, this._parseConfigs(this._currentLayer));
|
|
2068
2122
|
}
|
|
2069
2123
|
render() {
|
|
2070
2124
|
return I`
|
|
2071
2125
|
<style>
|
|
2072
|
-
${
|
|
2126
|
+
${vn}
|
|
2073
2127
|
</style>
|
|
2074
|
-
${
|
|
2128
|
+
${nn(
|
|
2075
2129
|
this._currentLayer,
|
|
2076
2130
|
() => I`
|
|
2077
2131
|
<div>
|
|
2078
2132
|
<slot></slot>
|
|
2079
|
-
${this.for ? I`layer: ${this._currentLayer.get("name")}` :
|
|
2133
|
+
${this.for ? I`layer: ${this._currentLayer.get("name")}` : E}
|
|
2080
2134
|
${_e(
|
|
2081
2135
|
this.layerConfig.filter(
|
|
2082
|
-
(
|
|
2136
|
+
(i) => this.for ? i !== "opacity" : !0
|
|
2083
2137
|
),
|
|
2084
|
-
(
|
|
2085
|
-
<div>${
|
|
2138
|
+
(i) => I`
|
|
2139
|
+
<div>${i}</div>
|
|
2086
2140
|
<input
|
|
2087
2141
|
type="range"
|
|
2088
2142
|
min="0"
|
|
2089
2143
|
max="1"
|
|
2090
2144
|
step="0.01"
|
|
2091
2145
|
value="${this._currentLayer.getOpacity()}"
|
|
2092
|
-
@input=${(
|
|
2146
|
+
@input=${(t) => this._handleInput(t, i)}
|
|
2093
2147
|
/>
|
|
2094
2148
|
`
|
|
2095
2149
|
)}
|
|
2096
2150
|
${Object.keys(this._configList).length > 0 && !this.external ? I`
|
|
2097
|
-
<details open="${this.for ? !0 :
|
|
2151
|
+
<details open="${this.for ? !0 : E}">
|
|
2098
2152
|
<summary>Layer config</summary>
|
|
2099
2153
|
<ul>
|
|
2100
2154
|
${_e(
|
|
2101
2155
|
Object.keys(this._configList),
|
|
2102
|
-
(
|
|
2103
|
-
<div>${
|
|
2156
|
+
(i) => I` <li>
|
|
2157
|
+
<div>${i}</div>
|
|
2104
2158
|
<input
|
|
2105
2159
|
type="range"
|
|
2106
|
-
min="${["red", "green", "blue"].includes(
|
|
2107
|
-
max="${["red", "green", "blue"].includes(
|
|
2160
|
+
min="${["red", "green", "blue"].includes(i) ? 1 : 2e3}"
|
|
2161
|
+
max="${["red", "green", "blue"].includes(i) ? 4 : 5e3}"
|
|
2108
2162
|
value="${// @ts-ignore
|
|
2109
|
-
this._configList[
|
|
2110
|
-
@input=${(
|
|
2163
|
+
this._configList[i]}"
|
|
2164
|
+
@input=${(t) => this._handleInput(t, i)}
|
|
2111
2165
|
/>
|
|
2112
2166
|
</li>`
|
|
2113
2167
|
)}
|
|
2114
2168
|
</ul>
|
|
2115
2169
|
</details>
|
|
2116
|
-
` :
|
|
2170
|
+
` : E}
|
|
2117
2171
|
</div>
|
|
2118
2172
|
`
|
|
2119
2173
|
)}
|
|
@@ -2122,29 +2176,29 @@ let X = class extends pt {
|
|
|
2122
2176
|
};
|
|
2123
2177
|
A([
|
|
2124
2178
|
k()
|
|
2125
|
-
],
|
|
2179
|
+
], W.prototype, "for", 2);
|
|
2126
2180
|
A([
|
|
2127
2181
|
k({ type: Array })
|
|
2128
|
-
],
|
|
2182
|
+
], W.prototype, "layerConfig", 2);
|
|
2129
2183
|
A([
|
|
2130
2184
|
k({ type: Object, attribute: !1 })
|
|
2131
|
-
],
|
|
2185
|
+
], W.prototype, "layerControl", 2);
|
|
2132
2186
|
A([
|
|
2133
2187
|
k({ type: Object, attribute: !1 })
|
|
2134
|
-
],
|
|
2188
|
+
], W.prototype, "layer", 2);
|
|
2135
2189
|
A([
|
|
2136
2190
|
k({ type: Boolean })
|
|
2137
|
-
],
|
|
2191
|
+
], W.prototype, "external", 2);
|
|
2138
2192
|
A([
|
|
2139
2193
|
_t()
|
|
2140
|
-
],
|
|
2194
|
+
], W.prototype, "_currentLayer", 2);
|
|
2141
2195
|
A([
|
|
2142
2196
|
_t()
|
|
2143
|
-
],
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
],
|
|
2197
|
+
], W.prototype, "_configList", 2);
|
|
2198
|
+
W = A([
|
|
2199
|
+
en("eox-layerconfig")
|
|
2200
|
+
], W);
|
|
2147
2201
|
export {
|
|
2148
|
-
|
|
2202
|
+
W as EOxLayerConfig,
|
|
2149
2203
|
H as EOxLayerControl
|
|
2150
2204
|
};
|