@spectric/ui 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Button.d.ts +8 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +60 -0
- package/dist/components/table/body.d.ts +44 -0
- package/dist/components/table/cell.d.ts +53 -0
- package/dist/components/table/header.d.ts +42 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/table.d.ts +90 -0
- package/dist/custom-elements.json +103 -4
- package/dist/index.es.js +1439 -1130
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +180 -74
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Button.ts +12 -4
- package/src/components/button.css.ts +66 -0
- package/src/components/index.ts +3 -1
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/pagination.css +10 -0
- package/src/components/pagination/pagination.ts +133 -0
- package/src/components/table/body.ts +69 -0
- package/src/components/table/cell.ts +117 -0
- package/src/components/table/header.ts +68 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/table.css +36 -0
- package/src/components/table/table.ts +131 -0
- package/src/stories/Button.stories.ts +3 -2
- package/src/stories/pagination.stories.ts +63 -0
- package/src/stories/table.stories.ts +74 -0
package/dist/index.es.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const dt = globalThis, sr = dt.ShadowRoot && (dt.ShadyCSS === void 0 || dt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ir = Symbol(), ws = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let Rs = class {
|
|
8
8
|
constructor(r, o, i) {
|
|
9
|
-
if (this._$cssResult$ = !0, i !==
|
|
9
|
+
if (this._$cssResult$ = !0, i !== ir) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = r, this.t = o;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let r = this.o;
|
|
14
14
|
const o = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (sr && r === void 0) {
|
|
16
16
|
const i = o !== void 0 && o.length === 1;
|
|
17
|
-
i && (r =
|
|
17
|
+
i && (r = ws.get(o)), r === void 0 && ((this.o = r = new CSSStyleSheet()).replaceSync(this.cssText), i && ws.set(o, r));
|
|
18
18
|
}
|
|
19
19
|
return r;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let Es = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
const o = s.length === 1 ? s[0] : r.reduce((i, c, t) => i + ((
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
25
|
+
const Io = (s) => new Rs(typeof s == "string" ? s : s + "", void 0, ir), Z = (s, ...r) => {
|
|
26
|
+
const o = s.length === 1 ? s[0] : r.reduce((i, c, t) => i + ((u) => {
|
|
27
|
+
if (u._$cssResult$ === !0) return u.cssText;
|
|
28
|
+
if (typeof u == "number") return u;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + u + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(c) + s[t + 1], s[0]);
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
31
|
+
return new Rs(o, s, ir);
|
|
32
|
+
}, Qo = (s, r) => {
|
|
33
|
+
if (sr) s.adoptedStyleSheets = r.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
|
|
34
34
|
else for (const o of r) {
|
|
35
|
-
const i = document.createElement("style"), c =
|
|
35
|
+
const i = document.createElement("style"), c = dt.litNonce;
|
|
36
36
|
c !== void 0 && i.setAttribute("nonce", c), i.textContent = o.cssText, s.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, xs = sr ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((r) => {
|
|
39
39
|
let o = "";
|
|
40
40
|
for (const i of r.cssRules) o += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Io(o);
|
|
42
42
|
})(s) : s;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Ho, defineProperty: qo, getOwnPropertyDescriptor: Wo, getOwnPropertyNames: Yo, getOwnPropertySymbols: Ko, getPrototypeOf: Zo } = Object, oe = globalThis, As = oe.trustedTypes, Xo = As ? As.emptyScript : "", Yt = oe.reactiveElementPolyfillSupport, Me = (s, r) => s, bt = { toAttribute(s, r) {
|
|
49
49
|
switch (r) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
s = s ?
|
|
51
|
+
s = s ? Xo : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,7 +73,7 @@ const { is: Do, defineProperty: jo, getOwnPropertyDescriptor: Ro, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return o;
|
|
76
|
-
} },
|
|
76
|
+
} }, or = (s, r) => !Ho(s, r), Ss = { attribute: !0, type: String, converter: bt, reflect: !1, hasChanged: or };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), oe.litPropertyMetadata ?? (oe.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
class ke extends HTMLElement {
|
|
79
79
|
static addInitializer(r) {
|
|
@@ -82,37 +82,37 @@ class ke extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(r, o =
|
|
85
|
+
static createProperty(r, o = Ss) {
|
|
86
86
|
if (o.state && (o.attribute = !1), this._$Ei(), this.elementProperties.set(r, o), !o.noAccessor) {
|
|
87
87
|
const i = Symbol(), c = this.getPropertyDescriptor(r, i, o);
|
|
88
|
-
c !== void 0 &&
|
|
88
|
+
c !== void 0 && qo(this.prototype, r, c);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(r, o, i) {
|
|
92
|
-
const { get: c, set: t } =
|
|
92
|
+
const { get: c, set: t } = Wo(this.prototype, r) ?? { get() {
|
|
93
93
|
return this[o];
|
|
94
|
-
}, set(
|
|
95
|
-
this[o] =
|
|
94
|
+
}, set(u) {
|
|
95
|
+
this[o] = u;
|
|
96
96
|
} };
|
|
97
97
|
return { get() {
|
|
98
98
|
return c == null ? void 0 : c.call(this);
|
|
99
|
-
}, set(
|
|
100
|
-
const
|
|
101
|
-
t.call(this,
|
|
99
|
+
}, set(u) {
|
|
100
|
+
const g = c == null ? void 0 : c.call(this);
|
|
101
|
+
t.call(this, u), this.requestUpdate(r, g, i);
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
104
104
|
static getPropertyOptions(r) {
|
|
105
|
-
return this.elementProperties.get(r) ??
|
|
105
|
+
return this.elementProperties.get(r) ?? Ss;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const r =
|
|
108
|
+
if (this.hasOwnProperty(Me("elementProperties"))) return;
|
|
109
|
+
const r = Zo(this);
|
|
110
110
|
r.finalize(), r.l !== void 0 && (this.l = [...r.l]), this.elementProperties = new Map(r.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
115
|
-
const o = this.properties, i = [...
|
|
113
|
+
if (this.hasOwnProperty(Me("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Me("properties"))) {
|
|
115
|
+
const o = this.properties, i = [...Yo(o), ...Ko(o)];
|
|
116
116
|
for (const c of i) this.createProperty(c, o[c]);
|
|
117
117
|
}
|
|
118
118
|
const r = this[Symbol.metadata];
|
|
@@ -131,8 +131,8 @@ class ke extends HTMLElement {
|
|
|
131
131
|
const o = [];
|
|
132
132
|
if (Array.isArray(r)) {
|
|
133
133
|
const i = new Set(r.flat(1 / 0).reverse());
|
|
134
|
-
for (const c of i) o.unshift(
|
|
135
|
-
} else r !== void 0 && o.push(
|
|
134
|
+
for (const c of i) o.unshift(xs(c));
|
|
135
|
+
} else r !== void 0 && o.push(xs(r));
|
|
136
136
|
return o;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(r, o) {
|
|
@@ -161,7 +161,7 @@ class ke extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const r = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return Qo(r, this.constructor.elementStyles), r;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var r;
|
|
@@ -186,21 +186,21 @@ class ke extends HTMLElement {
|
|
|
186
186
|
var t;
|
|
187
187
|
const i = this.constructor.elementProperties.get(r), c = this.constructor._$Eu(r, i);
|
|
188
188
|
if (c !== void 0 && i.reflect === !0) {
|
|
189
|
-
const
|
|
190
|
-
this._$Em = r,
|
|
189
|
+
const u = (((t = i.converter) == null ? void 0 : t.toAttribute) !== void 0 ? i.converter : bt).toAttribute(o, i.type);
|
|
190
|
+
this._$Em = r, u == null ? this.removeAttribute(c) : this.setAttribute(c, u), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
_$AK(r, o) {
|
|
194
194
|
var t;
|
|
195
195
|
const i = this.constructor, c = i._$Eh.get(r);
|
|
196
196
|
if (c !== void 0 && this._$Em !== c) {
|
|
197
|
-
const
|
|
198
|
-
this._$Em = c, this[c] =
|
|
197
|
+
const u = i.getPropertyOptions(c), g = typeof u.converter == "function" ? { fromAttribute: u.converter } : ((t = u.converter) == null ? void 0 : t.fromAttribute) !== void 0 ? u.converter : bt;
|
|
198
|
+
this._$Em = c, this[c] = g.fromAttribute(o, u.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(r, o, i) {
|
|
202
202
|
if (r !== void 0) {
|
|
203
|
-
if (i ?? (i = this.constructor.getPropertyOptions(r)), !(i.hasChanged ??
|
|
203
|
+
if (i ?? (i = this.constructor.getPropertyOptions(r)), !(i.hasChanged ?? or)(this[r], o)) return;
|
|
204
204
|
this.P(r, o, i);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -226,11 +226,11 @@ class ke extends HTMLElement {
|
|
|
226
226
|
if (!this.isUpdatePending) return;
|
|
227
227
|
if (!this.hasUpdated) {
|
|
228
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
229
|
-
for (const [t,
|
|
229
|
+
for (const [t, u] of this._$Ep) this[t] = u;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
232
|
const c = this.constructor.elementProperties;
|
|
233
|
-
if (c.size > 0) for (const [t,
|
|
233
|
+
if (c.size > 0) for (const [t, u] of c) u.wrapped !== !0 || this._$AL.has(t) || this[t] === void 0 || this.P(t, this[t], u);
|
|
234
234
|
}
|
|
235
235
|
let r = !1;
|
|
236
236
|
const o = this._$AL;
|
|
@@ -273,76 +273,76 @@ class ke extends HTMLElement {
|
|
|
273
273
|
firstUpdated(r) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
ke.elementStyles = [], ke.shadowRootOptions = { mode: "open" }, ke[
|
|
276
|
+
ke.elementStyles = [], ke.shadowRootOptions = { mode: "open" }, ke[Me("elementProperties")] = /* @__PURE__ */ new Map(), ke[Me("finalized")] = /* @__PURE__ */ new Map(), Yt == null || Yt({ ReactiveElement: ke }), (oe.reactiveElementVersions ?? (oe.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
288
|
-
}
|
|
289
|
-
const
|
|
282
|
+
const Fe = globalThis, vt = Fe.trustedTypes, ks = vt ? vt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Bs = "$lit$", ie = `lit$${Math.random().toFixed(9).slice(2)}$`, Us = "?" + ie, Go = `<${Us}>`, fe = document, Qe = () => fe.createComment(""), He = (s) => s === null || typeof s != "object" && typeof s != "function", nr = Array.isArray, Jo = (s) => nr(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Kt = `[
|
|
283
|
+
\f\r]`, Ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Cs = /-->/g, Es = />/g, ue = RegExp(`>|${Kt}(?:([^\\s"'>=/]+)(${Kt}*=${Kt}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Os = /'/g, Ps = /"/g, Ms = /^(?:script|style|textarea|title)$/i, Vo = (s) => (r, ...o) => ({ _$litType$: s, strings: r, values: o }), w = Vo(1), he = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), Ts = /* @__PURE__ */ new WeakMap(), de = fe.createTreeWalker(fe, 129);
|
|
285
|
+
function Fs(s, r) {
|
|
286
|
+
if (!nr(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
+
return ks !== void 0 ? ks.createHTML(r) : r;
|
|
288
|
+
}
|
|
289
|
+
const en = (s, r) => {
|
|
290
290
|
const o = s.length - 1, i = [];
|
|
291
|
-
let c, t = r === 2 ? "<svg>" : r === 3 ? "<math>" : "",
|
|
292
|
-
for (let
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
for (;
|
|
296
|
-
const
|
|
297
|
-
t +=
|
|
298
|
-
}
|
|
299
|
-
return [
|
|
291
|
+
let c, t = r === 2 ? "<svg>" : r === 3 ? "<math>" : "", u = Ue;
|
|
292
|
+
for (let g = 0; g < o; g++) {
|
|
293
|
+
const b = s[g];
|
|
294
|
+
let x, A, _ = -1, S = 0;
|
|
295
|
+
for (; S < b.length && (u.lastIndex = S, A = u.exec(b), A !== null); ) S = u.lastIndex, u === Ue ? A[1] === "!--" ? u = Cs : A[1] !== void 0 ? u = Es : A[2] !== void 0 ? (Ms.test(A[2]) && (c = RegExp("</" + A[2], "g")), u = ue) : A[3] !== void 0 && (u = ue) : u === ue ? A[0] === ">" ? (u = c ?? Ue, _ = -1) : A[1] === void 0 ? _ = -2 : (_ = u.lastIndex - A[2].length, x = A[1], u = A[3] === void 0 ? ue : A[3] === '"' ? Ps : Os) : u === Ps || u === Os ? u = ue : u === Cs || u === Es ? u = Ue : (u = ue, c = void 0);
|
|
296
|
+
const k = u === ue && s[g + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
t += u === Ue ? b + Go : _ >= 0 ? (i.push(x), b.slice(0, _) + Bs + b.slice(_) + ie + k) : b + ie + (_ === -2 ? g : k);
|
|
298
|
+
}
|
|
299
|
+
return [Fs(s, t + (s[o] || "<?>") + (r === 2 ? "</svg>" : r === 3 ? "</math>" : "")), i];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
301
|
+
class qe {
|
|
302
302
|
constructor({ strings: r, _$litType$: o }, i) {
|
|
303
303
|
let c;
|
|
304
304
|
this.parts = [];
|
|
305
|
-
let t = 0,
|
|
306
|
-
const
|
|
307
|
-
if (this.el =
|
|
305
|
+
let t = 0, u = 0;
|
|
306
|
+
const g = r.length - 1, b = this.parts, [x, A] = en(r, o);
|
|
307
|
+
if (this.el = qe.createElement(x, i), de.currentNode = this.el.content, o === 2 || o === 3) {
|
|
308
308
|
const _ = this.el.content.firstChild;
|
|
309
309
|
_.replaceWith(..._.childNodes);
|
|
310
310
|
}
|
|
311
|
-
for (; (c =
|
|
311
|
+
for (; (c = de.nextNode()) !== null && b.length < g; ) {
|
|
312
312
|
if (c.nodeType === 1) {
|
|
313
|
-
if (c.hasAttributes()) for (const _ of c.getAttributeNames()) if (_.endsWith(
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
} else _.startsWith(ie) && (
|
|
317
|
-
if (
|
|
318
|
-
const _ = c.textContent.split(ie),
|
|
319
|
-
if (
|
|
320
|
-
c.textContent =
|
|
321
|
-
for (let
|
|
322
|
-
c.append(_[
|
|
313
|
+
if (c.hasAttributes()) for (const _ of c.getAttributeNames()) if (_.endsWith(Bs)) {
|
|
314
|
+
const S = A[u++], k = c.getAttribute(_).split(ie), z = /([.?@])?(.*)/.exec(S);
|
|
315
|
+
b.push({ type: 1, index: t, name: z[2], strings: k, ctor: z[1] === "." ? rn : z[1] === "?" ? sn : z[1] === "@" ? on : At }), c.removeAttribute(_);
|
|
316
|
+
} else _.startsWith(ie) && (b.push({ type: 6, index: t }), c.removeAttribute(_));
|
|
317
|
+
if (Ms.test(c.tagName)) {
|
|
318
|
+
const _ = c.textContent.split(ie), S = _.length - 1;
|
|
319
|
+
if (S > 0) {
|
|
320
|
+
c.textContent = vt ? vt.emptyScript : "";
|
|
321
|
+
for (let k = 0; k < S; k++) c.append(_[k], Qe()), de.nextNode(), b.push({ type: 2, index: ++t });
|
|
322
|
+
c.append(_[S], Qe());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (c.nodeType === 8) if (c.data ===
|
|
325
|
+
} else if (c.nodeType === 8) if (c.data === Us) b.push({ type: 2, index: t });
|
|
326
326
|
else {
|
|
327
327
|
let _ = -1;
|
|
328
|
-
for (; (_ = c.data.indexOf(ie, _ + 1)) !== -1; )
|
|
328
|
+
for (; (_ = c.data.indexOf(ie, _ + 1)) !== -1; ) b.push({ type: 7, index: t }), _ += ie.length - 1;
|
|
329
329
|
}
|
|
330
330
|
t++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
static createElement(r, o) {
|
|
334
|
-
const i =
|
|
334
|
+
const i = fe.createElement("template");
|
|
335
335
|
return i.innerHTML = r, i;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
var
|
|
340
|
-
if (r ===
|
|
341
|
-
let c = i !== void 0 ? (
|
|
342
|
-
const t =
|
|
343
|
-
return (c == null ? void 0 : c.constructor) !== t && ((
|
|
338
|
+
function Ee(s, r, o = s, i) {
|
|
339
|
+
var u, g;
|
|
340
|
+
if (r === he) return r;
|
|
341
|
+
let c = i !== void 0 ? (u = o._$Co) == null ? void 0 : u[i] : o._$Cl;
|
|
342
|
+
const t = He(r) ? void 0 : r._$litDirective$;
|
|
343
|
+
return (c == null ? void 0 : c.constructor) !== t && ((g = c == null ? void 0 : c._$AO) == null || g.call(c, !1), t === void 0 ? c = void 0 : (c = new t(s), c._$AT(s, o, i)), i !== void 0 ? (o._$Co ?? (o._$Co = []))[i] = c : o._$Cl = c), c !== void 0 && (r = Ee(s, c._$AS(s, r.values), c, i)), r;
|
|
344
344
|
}
|
|
345
|
-
class
|
|
345
|
+
class tn {
|
|
346
346
|
constructor(r, o) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = r, this._$AM = o;
|
|
348
348
|
}
|
|
@@ -353,24 +353,24 @@ class qo {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(r) {
|
|
356
|
-
const { el: { content: o }, parts: i } = this._$AD, c = ((r == null ? void 0 : r.creationScope) ??
|
|
357
|
-
|
|
358
|
-
let t =
|
|
359
|
-
for (;
|
|
360
|
-
if (
|
|
361
|
-
let
|
|
362
|
-
|
|
356
|
+
const { el: { content: o }, parts: i } = this._$AD, c = ((r == null ? void 0 : r.creationScope) ?? fe).importNode(o, !0);
|
|
357
|
+
de.currentNode = c;
|
|
358
|
+
let t = de.nextNode(), u = 0, g = 0, b = i[0];
|
|
359
|
+
for (; b !== void 0; ) {
|
|
360
|
+
if (u === b.index) {
|
|
361
|
+
let x;
|
|
362
|
+
b.type === 2 ? x = new Ke(t, t.nextSibling, this, r) : b.type === 1 ? x = new b.ctor(t, b.name, b.strings, this, r) : b.type === 6 && (x = new nn(t, this, r)), this._$AV.push(x), b = i[++g];
|
|
363
363
|
}
|
|
364
|
-
|
|
364
|
+
u !== (b == null ? void 0 : b.index) && (t = de.nextNode(), u++);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return de.currentNode = fe, c;
|
|
367
367
|
}
|
|
368
368
|
p(r) {
|
|
369
369
|
let o = 0;
|
|
370
370
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(r, i, o), o += i.strings.length - 2) : i._$AI(r[o])), o++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class Ke {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var r;
|
|
376
376
|
return ((r = this._$AM) == null ? void 0 : r._$AU) ?? this._$Cv;
|
|
@@ -390,7 +390,7 @@ class qe {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(r, o = this) {
|
|
393
|
-
r =
|
|
393
|
+
r = Ee(this, r, o), He(r) ? r === C || r == null || r === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : r !== this._$AH && r !== he && this._(r) : r._$litType$ !== void 0 ? this.$(r) : r.nodeType !== void 0 ? this.T(r) : Jo(r) ? this.k(r) : this._(r);
|
|
394
394
|
}
|
|
395
395
|
O(r) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(r, this._$AB);
|
|
@@ -399,26 +399,26 @@ class qe {
|
|
|
399
399
|
this._$AH !== r && (this._$AR(), this._$AH = this.O(r));
|
|
400
400
|
}
|
|
401
401
|
_(r) {
|
|
402
|
-
this._$AH !== C &&
|
|
402
|
+
this._$AH !== C && He(this._$AH) ? this._$AA.nextSibling.data = r : this.T(fe.createTextNode(r)), this._$AH = r;
|
|
403
403
|
}
|
|
404
404
|
$(r) {
|
|
405
405
|
var t;
|
|
406
|
-
const { values: o, _$litType$: i } = r, c = typeof i == "number" ? this._$AC(r) : (i.el === void 0 && (i.el =
|
|
406
|
+
const { values: o, _$litType$: i } = r, c = typeof i == "number" ? this._$AC(r) : (i.el === void 0 && (i.el = qe.createElement(Fs(i.h, i.h[0]), this.options)), i);
|
|
407
407
|
if (((t = this._$AH) == null ? void 0 : t._$AD) === c) this._$AH.p(o);
|
|
408
408
|
else {
|
|
409
|
-
const
|
|
410
|
-
|
|
409
|
+
const u = new tn(c, this), g = u.u(this.options);
|
|
410
|
+
u.p(o), this.T(g), this._$AH = u;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(r) {
|
|
414
|
-
let o =
|
|
415
|
-
return o === void 0 &&
|
|
414
|
+
let o = Ts.get(r.strings);
|
|
415
|
+
return o === void 0 && Ts.set(r.strings, o = new qe(r)), o;
|
|
416
416
|
}
|
|
417
417
|
k(r) {
|
|
418
|
-
|
|
418
|
+
nr(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const o = this._$AH;
|
|
420
420
|
let i, c = 0;
|
|
421
|
-
for (const t of r) c === o.length ? o.push(i = new
|
|
421
|
+
for (const t of r) c === o.length ? o.push(i = new Ke(this.O(Qe()), this.O(Qe()), this, this.options)) : i = o[c], i._$AI(t), c++;
|
|
422
422
|
c < o.length && (this._$AR(i && i._$AB.nextSibling, c), o.length = c);
|
|
423
423
|
}
|
|
424
424
|
_$AR(r = this._$AA.nextSibling, o) {
|
|
@@ -433,7 +433,7 @@ class qe {
|
|
|
433
433
|
this._$AM === void 0 && (this._$Cv = r, (o = this._$AP) == null || o.call(this, r));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class At {
|
|
437
437
|
get tagName() {
|
|
438
438
|
return this.element.tagName;
|
|
439
439
|
}
|
|
@@ -445,20 +445,20 @@ class yt {
|
|
|
445
445
|
}
|
|
446
446
|
_$AI(r, o = this, i, c) {
|
|
447
447
|
const t = this.strings;
|
|
448
|
-
let
|
|
449
|
-
if (t === void 0) r =
|
|
448
|
+
let u = !1;
|
|
449
|
+
if (t === void 0) r = Ee(this, r, o, 0), u = !He(r) || r !== this._$AH && r !== he, u && (this._$AH = r);
|
|
450
450
|
else {
|
|
451
|
-
const
|
|
452
|
-
let
|
|
453
|
-
for (r = t[0],
|
|
451
|
+
const g = r;
|
|
452
|
+
let b, x;
|
|
453
|
+
for (r = t[0], b = 0; b < t.length - 1; b++) x = Ee(this, g[i + b], o, b), x === he && (x = this._$AH[b]), u || (u = !He(x) || x !== this._$AH[b]), x === C ? r = C : r !== C && (r += (x ?? "") + t[b + 1]), this._$AH[b] = x;
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
u && !c && this.j(r);
|
|
456
456
|
}
|
|
457
457
|
j(r) {
|
|
458
458
|
r === C ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, r ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class rn extends At {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ class Wo extends yt {
|
|
|
466
466
|
this.element[this.name] = r === C ? void 0 : r;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class
|
|
469
|
+
class sn extends At {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,12 +474,12 @@ class Yo extends yt {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!r && r !== C);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class on extends At {
|
|
478
478
|
constructor(r, o, i, c, t) {
|
|
479
479
|
super(r, o, i, c, t), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(r, o = this) {
|
|
482
|
-
if ((r =
|
|
482
|
+
if ((r = Ee(this, r, o, 0) ?? C) === he) return;
|
|
483
483
|
const i = this._$AH, c = r === C && i !== C || r.capture !== i.capture || r.once !== i.once || r.passive !== i.passive, t = r !== C && (i === C || c);
|
|
484
484
|
c && this.element.removeEventListener(this.name, this, i), t && this.element.addEventListener(this.name, this, r), this._$AH = r;
|
|
485
485
|
}
|
|
@@ -488,7 +488,7 @@ class Ko extends yt {
|
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, r) : this._$AH.handleEvent(r);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
class
|
|
491
|
+
class nn {
|
|
492
492
|
constructor(r, o, i) {
|
|
493
493
|
this.element = r, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = i;
|
|
494
494
|
}
|
|
@@ -496,17 +496,17 @@ class Zo {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(r) {
|
|
499
|
-
|
|
499
|
+
Ee(this, r);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const Zt = Fe.litHtmlPolyfillSupport;
|
|
503
|
+
Zt == null || Zt(qe, Ke), (Fe.litHtmlVersions ?? (Fe.litHtmlVersions = [])).push("3.2.1");
|
|
504
|
+
const Is = (s, r, o) => {
|
|
505
505
|
const i = (o == null ? void 0 : o.renderBefore) ?? r;
|
|
506
506
|
let c = i._$litPart$;
|
|
507
507
|
if (c === void 0) {
|
|
508
508
|
const t = (o == null ? void 0 : o.renderBefore) ?? null;
|
|
509
|
-
i._$litPart$ = c = new
|
|
509
|
+
i._$litPart$ = c = new Ke(r.insertBefore(Qe(), t), t, void 0, o ?? {});
|
|
510
510
|
}
|
|
511
511
|
return c._$AI(s), c;
|
|
512
512
|
};
|
|
@@ -515,7 +515,7 @@ const Ns = (s, r, o) => {
|
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let
|
|
518
|
+
let O = class extends ke {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -526,7 +526,7 @@ let L = class extends ke {
|
|
|
526
526
|
}
|
|
527
527
|
update(r) {
|
|
528
528
|
const o = this.render();
|
|
529
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(r), this._$Do =
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(r), this._$Do = Is(o, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var r;
|
|
@@ -537,21 +537,21 @@ let L = class extends ke {
|
|
|
537
537
|
super.disconnectedCallback(), (r = this._$Do) == null || r.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return he;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
|
|
543
|
+
var zs;
|
|
544
|
+
O._$litElement$ = !0, O.finalized = !0, (zs = globalThis.litElementHydrateSupport) == null || zs.call(globalThis, { LitElement: O });
|
|
545
|
+
const Xt = globalThis.litElementPolyfillSupport;
|
|
546
|
+
Xt == null || Xt({ LitElement: O });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
const
|
|
554
|
-
let
|
|
553
|
+
const Qs = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ar = (s) => (...r) => ({ _$litDirective$: s, values: r });
|
|
554
|
+
let Hs = class {
|
|
555
555
|
constructor(r) {
|
|
556
556
|
}
|
|
557
557
|
get _$AU() {
|
|
@@ -572,10 +572,10 @@ let js = class {
|
|
|
572
572
|
* Copyright 2018 Google LLC
|
|
573
573
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
574
574
|
*/
|
|
575
|
-
const
|
|
575
|
+
const qs = "important", an = " !" + qs, Ws = ar(class extends Hs {
|
|
576
576
|
constructor(s) {
|
|
577
577
|
var r;
|
|
578
|
-
if (super(s), s.type !==
|
|
578
|
+
if (super(s), s.type !== Qs.ATTRIBUTE || s.name !== "style" || ((r = s.strings) == null ? void 0 : r.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
579
579
|
}
|
|
580
580
|
render(s) {
|
|
581
581
|
return Object.keys(s).reduce((r, o) => {
|
|
@@ -591,13 +591,13 @@ const Rs = "important", Xo = " !" + Rs, Bs = er(class extends js {
|
|
|
591
591
|
const c = r[i];
|
|
592
592
|
if (c != null) {
|
|
593
593
|
this.ft.add(i);
|
|
594
|
-
const t = typeof c == "string" && c.endsWith(
|
|
595
|
-
i.includes("-") || t ? o.setProperty(i, t ? c.slice(0, -11) : c, t ?
|
|
594
|
+
const t = typeof c == "string" && c.endsWith(an);
|
|
595
|
+
i.includes("-") || t ? o.setProperty(i, t ? c.slice(0, -11) : c, t ? qs : "") : o[i] = c;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
return
|
|
598
|
+
return he;
|
|
599
599
|
}
|
|
600
|
-
}),
|
|
600
|
+
}), cn = Z`
|
|
601
601
|
:host{
|
|
602
602
|
display: inline-block;
|
|
603
603
|
--text-on-color: var(--spectric-text-on-color, #ffffff);
|
|
@@ -676,6 +676,53 @@ const Rs = "important", Xo = " !" + Rs, Bs = er(class extends js {
|
|
|
676
676
|
box-shadow: 0 0 30px white inset;
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
+
:host([icon]) .spectric-button {
|
|
680
|
+
padding: unset;
|
|
681
|
+
display: flex;
|
|
682
|
+
align-items: center;
|
|
683
|
+
justify-content: center;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/* :host([icon][size="small"]){
|
|
687
|
+
height:12px;
|
|
688
|
+
width:12px;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
:host([icon][size="medium"]){
|
|
692
|
+
height:14px;
|
|
693
|
+
width:14px;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
:host([icon][size="large"]){
|
|
697
|
+
width: 48px;
|
|
698
|
+
height: 48px;
|
|
699
|
+
} */
|
|
700
|
+
:host([icon][size="tiny"]) .spectric-button{
|
|
701
|
+
width: 10px;
|
|
702
|
+
height: 10px;
|
|
703
|
+
}
|
|
704
|
+
:host([icon][size="xxsmall"]) .spectric-button{
|
|
705
|
+
width: 20px;
|
|
706
|
+
height: 20px;
|
|
707
|
+
}
|
|
708
|
+
:host([icon][size="xsmall"]) .spectric-button{
|
|
709
|
+
width: 28px;
|
|
710
|
+
height: 28px;
|
|
711
|
+
}
|
|
712
|
+
:host([icon][size="small"]) .spectric-button{
|
|
713
|
+
width: 34px;
|
|
714
|
+
height: 34px;
|
|
715
|
+
}
|
|
716
|
+
:host([icon][size="medium"]) .spectric-button{
|
|
717
|
+
width: 40px;
|
|
718
|
+
height: 40px;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
:host([icon][size="large"]) .spectric-button{
|
|
722
|
+
width: 48px;
|
|
723
|
+
height: 48px;
|
|
724
|
+
}
|
|
725
|
+
|
|
679
726
|
.spectric-button:disabled{
|
|
680
727
|
cursor: not-allowed;
|
|
681
728
|
pointer-events: none;
|
|
@@ -743,6 +790,25 @@ opacity:1
|
|
|
743
790
|
background-color: transparent;
|
|
744
791
|
color: var(--text-secondary);
|
|
745
792
|
}
|
|
793
|
+
.spectric-button--tiny {
|
|
794
|
+
font-size: 10px;
|
|
795
|
+
line-height: 10px;
|
|
796
|
+
height: 10px;
|
|
797
|
+
display: flex;
|
|
798
|
+
align-content: center;
|
|
799
|
+
align-items: center;
|
|
800
|
+
}
|
|
801
|
+
.spectric-button--xxsmall {
|
|
802
|
+
padding: 5px 6px;
|
|
803
|
+
font-size: 10px;
|
|
804
|
+
line-height: 8px;
|
|
805
|
+
}
|
|
806
|
+
.spectric-button--xsmall {
|
|
807
|
+
padding: 5px 8px;
|
|
808
|
+
font-size: 10px;
|
|
809
|
+
font-size: 12px;
|
|
810
|
+
line-height: 14px;
|
|
811
|
+
}
|
|
746
812
|
.spectric-button--small {
|
|
747
813
|
padding: 5px 10px;
|
|
748
814
|
font-size: 12px;
|
|
@@ -761,7 +827,7 @@ opacity:1
|
|
|
761
827
|
* Copyright 2017 Google LLC
|
|
762
828
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
763
829
|
*/
|
|
764
|
-
const
|
|
830
|
+
const N = (s) => (r, o) => {
|
|
765
831
|
o !== void 0 ? o.addInitializer(() => {
|
|
766
832
|
customElements.define(s, r);
|
|
767
833
|
}) : customElements.define(s, r);
|
|
@@ -771,31 +837,31 @@ const I = (s) => (r, o) => {
|
|
|
771
837
|
* Copyright 2017 Google LLC
|
|
772
838
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
773
839
|
*/
|
|
774
|
-
const
|
|
840
|
+
const ln = { attribute: !0, type: String, converter: bt, reflect: !1, hasChanged: or }, pn = (s = ln, r, o) => {
|
|
775
841
|
const { kind: i, metadata: c } = o;
|
|
776
842
|
let t = globalThis.litPropertyMetadata.get(c);
|
|
777
843
|
if (t === void 0 && globalThis.litPropertyMetadata.set(c, t = /* @__PURE__ */ new Map()), t.set(o.name, s), i === "accessor") {
|
|
778
|
-
const { name:
|
|
779
|
-
return { set(
|
|
780
|
-
const
|
|
781
|
-
r.set.call(this,
|
|
782
|
-
}, init(
|
|
783
|
-
return
|
|
844
|
+
const { name: u } = o;
|
|
845
|
+
return { set(g) {
|
|
846
|
+
const b = r.get.call(this);
|
|
847
|
+
r.set.call(this, g), this.requestUpdate(u, b, s);
|
|
848
|
+
}, init(g) {
|
|
849
|
+
return g !== void 0 && this.P(u, void 0, s), g;
|
|
784
850
|
} };
|
|
785
851
|
}
|
|
786
852
|
if (i === "setter") {
|
|
787
|
-
const { name:
|
|
788
|
-
return function(
|
|
789
|
-
const
|
|
790
|
-
r.call(this,
|
|
853
|
+
const { name: u } = o;
|
|
854
|
+
return function(g) {
|
|
855
|
+
const b = this[u];
|
|
856
|
+
r.call(this, g), this.requestUpdate(u, b, s);
|
|
791
857
|
};
|
|
792
858
|
}
|
|
793
859
|
throw Error("Unsupported decorator location: " + i);
|
|
794
860
|
};
|
|
795
861
|
function v(s) {
|
|
796
|
-
return (r, o) => typeof o == "object" ?
|
|
797
|
-
const
|
|
798
|
-
return c.constructor.createProperty(t,
|
|
862
|
+
return (r, o) => typeof o == "object" ? pn(s, r, o) : ((i, c, t) => {
|
|
863
|
+
const u = c.hasOwnProperty(t);
|
|
864
|
+
return c.constructor.createProperty(t, u ? { ...i, wrapped: !0 } : i), u ? Object.getOwnPropertyDescriptor(c, t) : void 0;
|
|
799
865
|
})(s, r, o);
|
|
800
866
|
}
|
|
801
867
|
/**
|
|
@@ -803,7 +869,7 @@ function v(s) {
|
|
|
803
869
|
* Copyright 2017 Google LLC
|
|
804
870
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
805
871
|
*/
|
|
806
|
-
function
|
|
872
|
+
function St(s) {
|
|
807
873
|
return v({ ...s, state: !0, attribute: !1 });
|
|
808
874
|
}
|
|
809
875
|
/**
|
|
@@ -811,19 +877,19 @@ function mt(s) {
|
|
|
811
877
|
* Copyright 2017 Google LLC
|
|
812
878
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
813
879
|
*/
|
|
814
|
-
const
|
|
880
|
+
const Ys = (s, r, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof r != "object" && Object.defineProperty(s, r, o), o);
|
|
815
881
|
/**
|
|
816
882
|
* @license
|
|
817
883
|
* Copyright 2017 Google LLC
|
|
818
884
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
819
885
|
*/
|
|
820
|
-
function
|
|
886
|
+
function Ze(s, r) {
|
|
821
887
|
return (o, i, c) => {
|
|
822
|
-
const t = (
|
|
823
|
-
var
|
|
824
|
-
return ((
|
|
888
|
+
const t = (u) => {
|
|
889
|
+
var g;
|
|
890
|
+
return ((g = u.renderRoot) == null ? void 0 : g.querySelector(s)) ?? null;
|
|
825
891
|
};
|
|
826
|
-
return
|
|
892
|
+
return Ys(o, i, { get() {
|
|
827
893
|
return t(this);
|
|
828
894
|
} });
|
|
829
895
|
};
|
|
@@ -833,25 +899,25 @@ function We(s, r) {
|
|
|
833
899
|
* Copyright 2017 Google LLC
|
|
834
900
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
835
901
|
*/
|
|
836
|
-
function
|
|
837
|
-
return (r, o) =>
|
|
902
|
+
function kt(s) {
|
|
903
|
+
return (r, o) => Ys(r, o, { async get() {
|
|
838
904
|
var i;
|
|
839
905
|
return await this.updateComplete, ((i = this.renderRoot) == null ? void 0 : i.querySelector(s)) ?? null;
|
|
840
906
|
} });
|
|
841
907
|
}
|
|
842
|
-
var
|
|
843
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
844
|
-
(
|
|
845
|
-
return i && c &&
|
|
846
|
-
},
|
|
847
|
-
const
|
|
908
|
+
var un = Object.defineProperty, dn = Object.getOwnPropertyDescriptor, ce = (s, r, o, i) => {
|
|
909
|
+
for (var c = i > 1 ? void 0 : i ? dn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
910
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
911
|
+
return i && c && un(r, o, c), c;
|
|
912
|
+
}, fn = /* @__PURE__ */ ((s) => (s.large = "large", s.medium = "medium", s.small = "small", s.xsmall = "xsmall", s.xxsmall = "xxsmall", s.tiny = "tiny", s))(fn || {}), hn = /* @__PURE__ */ ((s) => (s.primary = "primary", s.secondary = "secondary", s.text = "text", s))(hn || {});
|
|
913
|
+
const gn = {
|
|
848
914
|
primary: "spectric-button--primary",
|
|
849
915
|
secondary: "spectric-button--secondary",
|
|
850
916
|
text: "spectric-button--text"
|
|
851
917
|
};
|
|
852
|
-
let
|
|
918
|
+
let K = class extends O {
|
|
853
919
|
constructor() {
|
|
854
|
-
super(...arguments), this.variant = "primary", this.disabled = !1, this.size = "
|
|
920
|
+
super(...arguments), this.variant = "primary", this.disabled = !1, this.size = "small", this.label = "", this.danger = !1, this.icon = !1, this._onClick = (s) => {
|
|
855
921
|
if (s instanceof CustomEvent)
|
|
856
922
|
return;
|
|
857
923
|
s.preventDefault(), s.stopImmediatePropagation(), s.stopPropagation();
|
|
@@ -864,19 +930,19 @@ let J = class extends L {
|
|
|
864
930
|
};
|
|
865
931
|
}
|
|
866
932
|
connectedCallback() {
|
|
867
|
-
super.connectedCallback(), this.addEventListener("click", this._onClick);
|
|
933
|
+
super.connectedCallback(), this.addEventListener("click", this._onClick, { capture: !0 });
|
|
868
934
|
}
|
|
869
935
|
disconnectedCallback() {
|
|
870
936
|
super.disconnectedCallback(), this.removeEventListener("click", this._onClick);
|
|
871
937
|
}
|
|
872
938
|
render() {
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
939
|
+
const s = gn[this.variant] || "spectric-button--primary";
|
|
940
|
+
return w`
|
|
875
941
|
<button
|
|
876
942
|
type="button"
|
|
877
943
|
?disabled=${this.disabled}
|
|
878
944
|
class=${["spectric-button", `spectric-button-danger--${this.danger || !1}`, `spectric-button--${this.size || "medium"}`, s].join(" ")}
|
|
879
|
-
style=${
|
|
945
|
+
style=${Ws({ backgroundColor: this.backgroundColor })}
|
|
880
946
|
>
|
|
881
947
|
<span class="animation"></span>
|
|
882
948
|
<slot>${this.label}</slot>
|
|
@@ -884,84 +950,87 @@ let J = class extends L {
|
|
|
884
950
|
`;
|
|
885
951
|
}
|
|
886
952
|
};
|
|
887
|
-
|
|
888
|
-
|
|
953
|
+
K.styles = cn;
|
|
954
|
+
ce([
|
|
889
955
|
v({ type: String, reflect: !0 })
|
|
890
|
-
],
|
|
891
|
-
|
|
956
|
+
], K.prototype, "variant", 2);
|
|
957
|
+
ce([
|
|
892
958
|
v({ type: Boolean, reflect: !0 })
|
|
893
|
-
],
|
|
894
|
-
|
|
959
|
+
], K.prototype, "disabled", 2);
|
|
960
|
+
ce([
|
|
895
961
|
v({ type: String, reflect: !0 })
|
|
896
|
-
],
|
|
897
|
-
|
|
962
|
+
], K.prototype, "backgroundColor", 2);
|
|
963
|
+
ce([
|
|
898
964
|
v({ type: String, reflect: !0 })
|
|
899
|
-
],
|
|
900
|
-
|
|
965
|
+
], K.prototype, "size", 2);
|
|
966
|
+
ce([
|
|
901
967
|
v({ type: String, reflect: !0 })
|
|
902
|
-
],
|
|
903
|
-
|
|
968
|
+
], K.prototype, "label", 2);
|
|
969
|
+
ce([
|
|
970
|
+
v({ type: Boolean, reflect: !0 })
|
|
971
|
+
], K.prototype, "danger", 2);
|
|
972
|
+
ce([
|
|
904
973
|
v({ type: Boolean, reflect: !0 })
|
|
905
|
-
],
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
],
|
|
974
|
+
], K.prototype, "icon", 2);
|
|
975
|
+
K = ce([
|
|
976
|
+
N("spectric-button")
|
|
977
|
+
], K);
|
|
909
978
|
/**
|
|
910
979
|
* @license
|
|
911
980
|
* Copyright 2020 Google LLC
|
|
912
981
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
913
982
|
*/
|
|
914
|
-
const
|
|
983
|
+
const bn = (s) => s.strings === void 0;
|
|
915
984
|
/**
|
|
916
985
|
* @license
|
|
917
986
|
* Copyright 2017 Google LLC
|
|
918
987
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
919
988
|
*/
|
|
920
|
-
const
|
|
989
|
+
const Ie = (s, r) => {
|
|
921
990
|
var i;
|
|
922
991
|
const o = s._$AN;
|
|
923
992
|
if (o === void 0) return !1;
|
|
924
|
-
for (const c of o) (i = c._$AO) == null || i.call(c, r, !1),
|
|
993
|
+
for (const c of o) (i = c._$AO) == null || i.call(c, r, !1), Ie(c, r);
|
|
925
994
|
return !0;
|
|
926
|
-
},
|
|
995
|
+
}, yt = (s) => {
|
|
927
996
|
let r, o;
|
|
928
997
|
do {
|
|
929
998
|
if ((r = s._$AM) === void 0) break;
|
|
930
999
|
o = r._$AN, o.delete(s), s = r;
|
|
931
1000
|
} while ((o == null ? void 0 : o.size) === 0);
|
|
932
|
-
},
|
|
1001
|
+
}, Ks = (s) => {
|
|
933
1002
|
for (let r; r = s._$AM; s = r) {
|
|
934
1003
|
let o = r._$AN;
|
|
935
1004
|
if (o === void 0) r._$AN = o = /* @__PURE__ */ new Set();
|
|
936
1005
|
else if (o.has(s)) break;
|
|
937
|
-
o.add(s),
|
|
1006
|
+
o.add(s), mn(r);
|
|
938
1007
|
}
|
|
939
1008
|
};
|
|
940
|
-
function
|
|
941
|
-
this._$AN !== void 0 ? (
|
|
1009
|
+
function vn(s) {
|
|
1010
|
+
this._$AN !== void 0 ? (yt(this), this._$AM = s, Ks(this)) : this._$AM = s;
|
|
942
1011
|
}
|
|
943
|
-
function
|
|
1012
|
+
function yn(s, r = !1, o = 0) {
|
|
944
1013
|
const i = this._$AH, c = this._$AN;
|
|
945
|
-
if (c !== void 0 && c.size !== 0) if (r) if (Array.isArray(i)) for (let t = o; t < i.length; t++)
|
|
946
|
-
else i != null && (
|
|
947
|
-
else
|
|
1014
|
+
if (c !== void 0 && c.size !== 0) if (r) if (Array.isArray(i)) for (let t = o; t < i.length; t++) Ie(i[t], !1), yt(i[t]);
|
|
1015
|
+
else i != null && (Ie(i, !1), yt(i));
|
|
1016
|
+
else Ie(this, s);
|
|
948
1017
|
}
|
|
949
|
-
const
|
|
950
|
-
s.type ==
|
|
1018
|
+
const mn = (s) => {
|
|
1019
|
+
s.type == Qs.CHILD && (s._$AP ?? (s._$AP = yn), s._$AQ ?? (s._$AQ = vn));
|
|
951
1020
|
};
|
|
952
|
-
class
|
|
1021
|
+
class Zs extends Hs {
|
|
953
1022
|
constructor() {
|
|
954
1023
|
super(...arguments), this._$AN = void 0;
|
|
955
1024
|
}
|
|
956
1025
|
_$AT(r, o, i) {
|
|
957
|
-
super._$AT(r, o, i),
|
|
1026
|
+
super._$AT(r, o, i), Ks(this), this.isConnected = r._$AU;
|
|
958
1027
|
}
|
|
959
1028
|
_$AO(r, o = !0) {
|
|
960
1029
|
var i, c;
|
|
961
|
-
r !== this.isConnected && (this.isConnected = r, r ? (i = this.reconnected) == null || i.call(this) : (c = this.disconnected) == null || c.call(this)), o && (
|
|
1030
|
+
r !== this.isConnected && (this.isConnected = r, r ? (i = this.reconnected) == null || i.call(this) : (c = this.disconnected) == null || c.call(this)), o && (Ie(this, r), yt(this));
|
|
962
1031
|
}
|
|
963
1032
|
setValue(r) {
|
|
964
|
-
if (
|
|
1033
|
+
if (bn(this._$Ct)) this._$Ct._$AI(r, this);
|
|
965
1034
|
else {
|
|
966
1035
|
const o = [...this._$Ct._$AH];
|
|
967
1036
|
o[this._$Ci] = r, this._$Ct._$AI(o, this, 0);
|
|
@@ -977,10 +1046,10 @@ class zs extends js {
|
|
|
977
1046
|
* Copyright 2020 Google LLC
|
|
978
1047
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
979
1048
|
*/
|
|
980
|
-
const
|
|
981
|
-
class
|
|
1049
|
+
const ft = () => new $n();
|
|
1050
|
+
class $n {
|
|
982
1051
|
}
|
|
983
|
-
const
|
|
1052
|
+
const Gt = /* @__PURE__ */ new WeakMap(), ht = ar(class extends Zs {
|
|
984
1053
|
render(s) {
|
|
985
1054
|
return C;
|
|
986
1055
|
}
|
|
@@ -992,13 +1061,13 @@ const Ht = /* @__PURE__ */ new WeakMap(), pt = er(class extends zs {
|
|
|
992
1061
|
rt(s) {
|
|
993
1062
|
if (this.isConnected || (s = void 0), typeof this.Y == "function") {
|
|
994
1063
|
const r = this.ht ?? globalThis;
|
|
995
|
-
let o =
|
|
996
|
-
o === void 0 && (o = /* @__PURE__ */ new WeakMap(),
|
|
1064
|
+
let o = Gt.get(r);
|
|
1065
|
+
o === void 0 && (o = /* @__PURE__ */ new WeakMap(), Gt.set(r, o)), o.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), o.set(this.Y, s), s !== void 0 && this.Y.call(this.ht, s);
|
|
997
1066
|
} else this.Y.value = s;
|
|
998
1067
|
}
|
|
999
1068
|
get lt() {
|
|
1000
1069
|
var s, r;
|
|
1001
|
-
return typeof this.Y == "function" ? (s =
|
|
1070
|
+
return typeof this.Y == "function" ? (s = Gt.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.Y) : (r = this.Y) == null ? void 0 : r.value;
|
|
1002
1071
|
}
|
|
1003
1072
|
disconnected() {
|
|
1004
1073
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1006,7 +1075,7 @@ const Ht = /* @__PURE__ */ new WeakMap(), pt = er(class extends zs {
|
|
|
1006
1075
|
reconnected() {
|
|
1007
1076
|
this.rt(this.ct);
|
|
1008
1077
|
}
|
|
1009
|
-
}),
|
|
1078
|
+
}), _n = class {
|
|
1010
1079
|
constructor(r) {
|
|
1011
1080
|
return this.buffer = r, this.u8 = new Uint8Array(r), new Proxy(this, {
|
|
1012
1081
|
get(o, i) {
|
|
@@ -1037,7 +1106,7 @@ const Ht = /* @__PURE__ */ new WeakMap(), pt = er(class extends zs {
|
|
|
1037
1106
|
return i;
|
|
1038
1107
|
}
|
|
1039
1108
|
};
|
|
1040
|
-
class
|
|
1109
|
+
class Ls {
|
|
1041
1110
|
constructor(r, o, i, c) {
|
|
1042
1111
|
this.__target = r, this._handler = i, this._type = o, this._handler = i, this._options = c || !1, r instanceof Promise ? r.then((t) => {
|
|
1043
1112
|
this._handler && (this._node = t, this._node.addEventListener(this._type, this._handler, this._options));
|
|
@@ -1047,7 +1116,7 @@ class xs {
|
|
|
1047
1116
|
this._handler && (this._node && (console.log(`removing event ${this._type} from `, this._node, this.__target instanceof Promise), this._node.removeEventListener(this._type, this._handler, this._options)), this.__target = void 0, this._node = void 0, this._handler = void 0);
|
|
1048
1117
|
}
|
|
1049
1118
|
}
|
|
1050
|
-
class
|
|
1119
|
+
class Xs extends O {
|
|
1051
1120
|
constructor() {
|
|
1052
1121
|
super(...arguments), this._disposables = /* @__PURE__ */ new Set(), this._isDisposed = !1, this._disposableListeners = [], this._connected = !1;
|
|
1053
1122
|
}
|
|
@@ -1056,7 +1125,7 @@ class Fs extends L {
|
|
|
1056
1125
|
console.warn("Event handler already exists best practice is to add the this in the constructor");
|
|
1057
1126
|
return;
|
|
1058
1127
|
}
|
|
1059
|
-
this._disposableListeners.push({ target: r, event: o, handler: i }), this._connected && this.registerDisposable(new
|
|
1128
|
+
this._disposableListeners.push({ target: r, event: o, handler: i }), this._connected && this.registerDisposable(new Ls(r, o, i));
|
|
1060
1129
|
}
|
|
1061
1130
|
registerDisposable(r) {
|
|
1062
1131
|
if (!r)
|
|
@@ -1067,7 +1136,7 @@ class Fs extends L {
|
|
|
1067
1136
|
}
|
|
1068
1137
|
connectedCallback() {
|
|
1069
1138
|
super.connectedCallback(), this._connected = !0, this._isDisposed = !1, this._disposableListeners.forEach(({ target: r, event: o, handler: i }) => {
|
|
1070
|
-
this.registerDisposable(new
|
|
1139
|
+
this.registerDisposable(new Ls(r, o, i));
|
|
1071
1140
|
});
|
|
1072
1141
|
}
|
|
1073
1142
|
disconnectedCallback() {
|
|
@@ -1076,7 +1145,7 @@ class Fs extends L {
|
|
|
1076
1145
|
}), this._isDisposed = !0;
|
|
1077
1146
|
}
|
|
1078
1147
|
}
|
|
1079
|
-
const
|
|
1148
|
+
const Gs = (s) => {
|
|
1080
1149
|
var r;
|
|
1081
1150
|
return (...o) => {
|
|
1082
1151
|
r && cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
@@ -1084,18 +1153,18 @@ const Qs = (s) => {
|
|
|
1084
1153
|
});
|
|
1085
1154
|
};
|
|
1086
1155
|
};
|
|
1087
|
-
var
|
|
1088
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1089
|
-
(
|
|
1090
|
-
return i && c &&
|
|
1156
|
+
var wn = Object.defineProperty, xn = Object.getOwnPropertyDescriptor, ye = (s, r, o, i) => {
|
|
1157
|
+
for (var c = i > 1 ? void 0 : i ? xn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1158
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1159
|
+
return i && c && wn(r, o, c), c;
|
|
1091
1160
|
};
|
|
1092
|
-
const
|
|
1093
|
-
let V = class extends
|
|
1161
|
+
const An = ["mousemove", "click", "dblclick", "mousedown", "mouseup", "contextmenu"], pt = { width: 200, height: 200 }, mt = { width: 10, height: 10 };
|
|
1162
|
+
let V = class extends Xs {
|
|
1094
1163
|
constructor() {
|
|
1095
1164
|
super(), this.arrayBuffer = new ArrayBuffer(0), this.frameWidth = 100, this.scale = 1, this.width = 200, this.height = 200, this.state = {}, this.yStart = 0, this.xStart = 0, this.refs = {
|
|
1096
|
-
viewport:
|
|
1097
|
-
canvas:
|
|
1098
|
-
scrollDiv:
|
|
1165
|
+
viewport: ft(),
|
|
1166
|
+
canvas: ft(),
|
|
1167
|
+
scrollDiv: ft()
|
|
1099
1168
|
}, this.color = "#000000", this.onThemeChange = () => {
|
|
1100
1169
|
let o = getComputedStyle(this);
|
|
1101
1170
|
this.color != o.color && (this.color = o.color, this.paint());
|
|
@@ -1112,23 +1181,23 @@ let V = class extends Fs {
|
|
|
1112
1181
|
this.resizeObserver.disconnect();
|
|
1113
1182
|
}, this.resizeObserver = s, this.addDisposableListener(document.body, "theme-change", this.onThemeChange);
|
|
1114
1183
|
var r = {};
|
|
1115
|
-
|
|
1116
|
-
this.addDisposableListener(this._canvas, o,
|
|
1184
|
+
An.forEach((o) => {
|
|
1185
|
+
this.addDisposableListener(this._canvas, o, Gs(async (i) => {
|
|
1117
1186
|
i.stopImmediatePropagation(), i.stopPropagation(), i.preventDefault();
|
|
1118
1187
|
var c = await this._canvas;
|
|
1119
|
-
let t = c.getBoundingClientRect(),
|
|
1188
|
+
let t = c.getBoundingClientRect(), u = {
|
|
1120
1189
|
x: Math.floor(Math.abs(i.clientX - t.left)),
|
|
1121
1190
|
y: Math.floor(Math.abs(i.clientY - t.top))
|
|
1122
|
-
},
|
|
1123
|
-
if (o === "mousemove" && r[o] ==
|
|
1191
|
+
}, g = this.canvasPositionToBit(u);
|
|
1192
|
+
if (o === "mousemove" && r[o] == g)
|
|
1124
1193
|
return;
|
|
1125
|
-
r[o] =
|
|
1126
|
-
let
|
|
1127
|
-
if (
|
|
1128
|
-
let
|
|
1129
|
-
detail: { bitIndex:
|
|
1194
|
+
r[o] = g;
|
|
1195
|
+
let b = "bit" + String(o).charAt(0).toUpperCase() + String(o).slice(1);
|
|
1196
|
+
if (g != -1) {
|
|
1197
|
+
let x = new CustomEvent(b, {
|
|
1198
|
+
detail: { bitIndex: g, position: u, nativeEvent: i }
|
|
1130
1199
|
});
|
|
1131
|
-
this.dispatchEvent(
|
|
1200
|
+
this.dispatchEvent(x);
|
|
1132
1201
|
}
|
|
1133
1202
|
}));
|
|
1134
1203
|
});
|
|
@@ -1137,7 +1206,7 @@ let V = class extends Fs {
|
|
|
1137
1206
|
this.onResize(), super.connectedCallback(), this.registerDisposable(this.resizeObserver), this.resizeObserver.observe(this);
|
|
1138
1207
|
}
|
|
1139
1208
|
updated(s) {
|
|
1140
|
-
s.has("arrayBuffer") && this.arrayBuffer && (this._bitArray = new
|
|
1209
|
+
s.has("arrayBuffer") && this.arrayBuffer && (this._bitArray = new _n(this.arrayBuffer));
|
|
1141
1210
|
const r = ["arrayBuffer", "scale", "frameWidth", "width", "height"];
|
|
1142
1211
|
for (const o of r)
|
|
1143
1212
|
if (s.has(o)) {
|
|
@@ -1156,23 +1225,23 @@ let V = class extends Fs {
|
|
|
1156
1225
|
if (s <= 0)
|
|
1157
1226
|
return;
|
|
1158
1227
|
this.calculateViewport();
|
|
1159
|
-
const { width: o =
|
|
1228
|
+
const { width: o = pt.width, height: i = pt.height } = this, c = this.getPxPerBit(), t = this.refs.canvas.value.getContext("2d");
|
|
1160
1229
|
if (!t)
|
|
1161
1230
|
return;
|
|
1162
1231
|
this.state.scale != c && (t.reset(), t.scale(c, c));
|
|
1163
|
-
let
|
|
1164
|
-
t.fillStyle =
|
|
1165
|
-
let
|
|
1166
|
-
for (let
|
|
1167
|
-
let
|
|
1168
|
-
if (!(
|
|
1169
|
-
if (Math.floor(
|
|
1170
|
-
|
|
1232
|
+
let u = getComputedStyle(this);
|
|
1233
|
+
t.fillStyle = u.color, t.clearRect(0, 0, o, i);
|
|
1234
|
+
let g = 0;
|
|
1235
|
+
for (let b = this.yStart * s + this.xStart, x = r.length; b < x; b++) {
|
|
1236
|
+
let A = b % s - this.xStart;
|
|
1237
|
+
if (!(A < 0)) {
|
|
1238
|
+
if (Math.floor(A * c) > o) {
|
|
1239
|
+
g++, b = g * s + this.yStart * s + this.xStart - 1;
|
|
1171
1240
|
continue;
|
|
1172
1241
|
}
|
|
1173
|
-
if (Math.floor(
|
|
1242
|
+
if (Math.floor(g * c) > i)
|
|
1174
1243
|
break;
|
|
1175
|
-
r.getBit(
|
|
1244
|
+
r.getBit(b) === 1 && t.fillRect(A, g, 1, 1), (b + 1) % s === 0 && b >= s - 1 && g++;
|
|
1176
1245
|
}
|
|
1177
1246
|
}
|
|
1178
1247
|
}
|
|
@@ -1188,29 +1257,29 @@ let V = class extends Fs {
|
|
|
1188
1257
|
}
|
|
1189
1258
|
}
|
|
1190
1259
|
render() {
|
|
1191
|
-
const { height: s =
|
|
1192
|
-
return
|
|
1260
|
+
const { height: s = pt.height, width: r = pt.width } = this;
|
|
1261
|
+
return w`
|
|
1193
1262
|
<div
|
|
1194
1263
|
id="viewport"
|
|
1195
|
-
${
|
|
1264
|
+
${ht(this.refs.viewport)}
|
|
1196
1265
|
@scroll=${this.handleScroll}
|
|
1197
1266
|
style=${`width:${r}px;height:${s}px;overflow:auto;position:relative`}
|
|
1198
1267
|
>
|
|
1199
1268
|
<div
|
|
1200
1269
|
id="fakescrolldiv"
|
|
1201
|
-
${
|
|
1270
|
+
${ht(this.refs.scrollDiv)}
|
|
1202
1271
|
>
|
|
1203
1272
|
</div>
|
|
1204
1273
|
</div>
|
|
1205
1274
|
<canvas
|
|
1206
|
-
${
|
|
1207
|
-
width=${r -
|
|
1208
|
-
height=${s -
|
|
1275
|
+
${ht(this.refs.canvas)}
|
|
1276
|
+
width=${r - mt.width}
|
|
1277
|
+
height=${s - mt.height}
|
|
1209
1278
|
></canvas>
|
|
1210
1279
|
`;
|
|
1211
1280
|
}
|
|
1212
1281
|
};
|
|
1213
|
-
V.styles =
|
|
1282
|
+
V.styles = Z`
|
|
1214
1283
|
:host{
|
|
1215
1284
|
position: relative;
|
|
1216
1285
|
--border-radius: var(--spectric-border-radius,4em);
|
|
@@ -1234,8 +1303,8 @@ V.styles = K`
|
|
|
1234
1303
|
background-color:var(--background-color);
|
|
1235
1304
|
}
|
|
1236
1305
|
::-webkit-scrollbar {
|
|
1237
|
-
height: ${
|
|
1238
|
-
width: ${
|
|
1306
|
+
height: ${mt.height}px;
|
|
1307
|
+
width: ${mt.width}px;
|
|
1239
1308
|
|
|
1240
1309
|
}
|
|
1241
1310
|
|
|
@@ -1307,28 +1376,28 @@ V.styles = K`
|
|
|
1307
1376
|
}
|
|
1308
1377
|
|
|
1309
1378
|
`;
|
|
1310
|
-
|
|
1379
|
+
ye([
|
|
1311
1380
|
v({ type: Object, attribute: !1 })
|
|
1312
1381
|
], V.prototype, "arrayBuffer", 2);
|
|
1313
|
-
|
|
1382
|
+
ye([
|
|
1314
1383
|
v({ type: Number })
|
|
1315
1384
|
], V.prototype, "frameWidth", 2);
|
|
1316
|
-
|
|
1385
|
+
ye([
|
|
1317
1386
|
v({ type: Number })
|
|
1318
1387
|
], V.prototype, "scale", 2);
|
|
1319
|
-
|
|
1388
|
+
ye([
|
|
1320
1389
|
v({ type: Number })
|
|
1321
1390
|
], V.prototype, "width", 2);
|
|
1322
|
-
|
|
1391
|
+
ye([
|
|
1323
1392
|
v({ type: Number })
|
|
1324
1393
|
], V.prototype, "height", 2);
|
|
1325
|
-
|
|
1326
|
-
|
|
1394
|
+
ye([
|
|
1395
|
+
kt("canvas")
|
|
1327
1396
|
], V.prototype, "_canvas", 2);
|
|
1328
|
-
V =
|
|
1329
|
-
|
|
1397
|
+
V = ye([
|
|
1398
|
+
N("spectric-bit-display")
|
|
1330
1399
|
], V);
|
|
1331
|
-
const
|
|
1400
|
+
const Sn = Z`.spectric-header {
|
|
1332
1401
|
display: flex;
|
|
1333
1402
|
justify-content: space-between;
|
|
1334
1403
|
align-items: center;
|
|
@@ -1364,12 +1433,12 @@ const bn = K`.spectric-header {
|
|
|
1364
1433
|
font-size: 14px;
|
|
1365
1434
|
}
|
|
1366
1435
|
`;
|
|
1367
|
-
var
|
|
1368
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1369
|
-
(
|
|
1370
|
-
return i && c &&
|
|
1436
|
+
var kn = Object.defineProperty, Cn = Object.getOwnPropertyDescriptor, Ct = (s, r, o, i) => {
|
|
1437
|
+
for (var c = i > 1 ? void 0 : i ? Cn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1438
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1439
|
+
return i && c && kn(r, o, c), c;
|
|
1371
1440
|
};
|
|
1372
|
-
let
|
|
1441
|
+
let Oe = class extends O {
|
|
1373
1442
|
constructor() {
|
|
1374
1443
|
super(...arguments), this.showCreateAccount = !1, this.showLoginButton = !1, this.username = "", this.onLogout = () => {
|
|
1375
1444
|
const s = {
|
|
@@ -1392,7 +1461,7 @@ let Ee = class extends L {
|
|
|
1392
1461
|
};
|
|
1393
1462
|
}
|
|
1394
1463
|
render() {
|
|
1395
|
-
return
|
|
1464
|
+
return w`
|
|
1396
1465
|
<header>
|
|
1397
1466
|
<div class="spectric-header">
|
|
1398
1467
|
<div style="flex-grow:1;">
|
|
@@ -1400,10 +1469,10 @@ let Ee = class extends L {
|
|
|
1400
1469
|
<h1><slot name="name"></slot></h1>
|
|
1401
1470
|
<slot name="center"></slot>
|
|
1402
1471
|
</div>
|
|
1403
|
-
${this.showLoginButton !== !1 ?
|
|
1472
|
+
${this.showLoginButton !== !1 ? w`
|
|
1404
1473
|
<div>
|
|
1405
|
-
${this.username && this.username !== "" ?
|
|
1406
|
-
${this.showCreateAccount !== !1 ?
|
|
1474
|
+
${this.username && this.username !== "" ? w`<spectric-button variant="secondary" size="small" @click=${this.onLogout}>Log out</spectric-button>` : w`
|
|
1475
|
+
${this.showCreateAccount !== !1 ? w`<spectric-button variant="text" size="small" @click=${this.onCreateAccount}>Sign up</spectric-button>` : null}
|
|
1407
1476
|
<spectric-button variant="primary" size="small" @click=${this.onLogin}>Log in</spectric-button>`}
|
|
1408
1477
|
|
|
1409
1478
|
|
|
@@ -1414,32 +1483,32 @@ let Ee = class extends L {
|
|
|
1414
1483
|
`;
|
|
1415
1484
|
}
|
|
1416
1485
|
};
|
|
1417
|
-
|
|
1418
|
-
|
|
1486
|
+
Oe.styles = Sn;
|
|
1487
|
+
Ct([
|
|
1419
1488
|
v({ type: Boolean, reflect: !0 })
|
|
1420
|
-
],
|
|
1421
|
-
|
|
1489
|
+
], Oe.prototype, "showCreateAccount", 2);
|
|
1490
|
+
Ct([
|
|
1422
1491
|
v({ type: Boolean, reflect: !0 })
|
|
1423
|
-
],
|
|
1424
|
-
|
|
1492
|
+
], Oe.prototype, "showLoginButton", 2);
|
|
1493
|
+
Ct([
|
|
1425
1494
|
v({ type: String, reflect: !0 })
|
|
1426
|
-
],
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
],
|
|
1430
|
-
var
|
|
1431
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1432
|
-
(
|
|
1433
|
-
return i && c &&
|
|
1495
|
+
], Oe.prototype, "username", 2);
|
|
1496
|
+
Oe = Ct([
|
|
1497
|
+
N("spectric-header")
|
|
1498
|
+
], Oe);
|
|
1499
|
+
var En = Object.defineProperty, On = Object.getOwnPropertyDescriptor, Te = (s, r, o, i) => {
|
|
1500
|
+
for (var c = i > 1 ? void 0 : i ? On(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1501
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1502
|
+
return i && c && En(r, o, c), c;
|
|
1434
1503
|
};
|
|
1435
|
-
const
|
|
1504
|
+
const Pn = {
|
|
1436
1505
|
display: "flex",
|
|
1437
1506
|
alignItems: "center",
|
|
1438
1507
|
backgroundColor: "black",
|
|
1439
1508
|
color: "white",
|
|
1440
1509
|
textAlign: "center"
|
|
1441
1510
|
};
|
|
1442
|
-
let
|
|
1511
|
+
let ge = class extends O {
|
|
1443
1512
|
constructor() {
|
|
1444
1513
|
super(...arguments), this.dismissable = !1, this.text = "", this.bannerId = "", this.headerStyle = {}, this._dismissed = !1, this.onDismiss = (s) => {
|
|
1445
1514
|
s.preventDefault(), s.stopPropagation();
|
|
@@ -1457,33 +1526,33 @@ let he = class extends L {
|
|
|
1457
1526
|
}
|
|
1458
1527
|
render() {
|
|
1459
1528
|
if (!this._dismissed)
|
|
1460
|
-
return
|
|
1461
|
-
<header style=${
|
|
1529
|
+
return w`
|
|
1530
|
+
<header style=${Ws({ ...Pn, ...this.headerStyle })}>
|
|
1462
1531
|
<div style="flex-grow:1"><slot name="text">${this.text}</slot><slot></slot></div>
|
|
1463
|
-
${this.dismissable ?
|
|
1532
|
+
${this.dismissable ? w`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>` : null}
|
|
1464
1533
|
</header>
|
|
1465
1534
|
`;
|
|
1466
1535
|
}
|
|
1467
1536
|
};
|
|
1468
1537
|
Te([
|
|
1469
1538
|
v({ type: Boolean, reflect: !0 })
|
|
1470
|
-
],
|
|
1539
|
+
], ge.prototype, "dismissable", 2);
|
|
1471
1540
|
Te([
|
|
1472
1541
|
v({ type: String, reflect: !0 })
|
|
1473
|
-
],
|
|
1542
|
+
], ge.prototype, "text", 2);
|
|
1474
1543
|
Te([
|
|
1475
1544
|
v({ type: String, reflect: !0 })
|
|
1476
|
-
],
|
|
1545
|
+
], ge.prototype, "bannerId", 2);
|
|
1477
1546
|
Te([
|
|
1478
1547
|
v({ type: Object })
|
|
1479
|
-
],
|
|
1548
|
+
], ge.prototype, "headerStyle", 2);
|
|
1480
1549
|
Te([
|
|
1481
1550
|
v({ state: !0, type: Boolean, attribute: !1 })
|
|
1482
|
-
],
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
],
|
|
1486
|
-
const
|
|
1551
|
+
], ge.prototype, "_dismissed", 2);
|
|
1552
|
+
ge = Te([
|
|
1553
|
+
N("spectric-banner")
|
|
1554
|
+
], ge);
|
|
1555
|
+
const Tn = Z`
|
|
1487
1556
|
|
|
1488
1557
|
:host {
|
|
1489
1558
|
height:100vh;
|
|
@@ -1645,8 +1714,8 @@ article{
|
|
|
1645
1714
|
* Copyright 2018 Google LLC
|
|
1646
1715
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1647
1716
|
*/
|
|
1648
|
-
const
|
|
1649
|
-
class
|
|
1717
|
+
const Jt = (s) => s ?? C;
|
|
1718
|
+
class Ln extends Zs {
|
|
1650
1719
|
constructor() {
|
|
1651
1720
|
super(...arguments), this.prevData = {};
|
|
1652
1721
|
}
|
|
@@ -1672,9 +1741,9 @@ class wn extends zs {
|
|
|
1672
1741
|
(!r || !(c in r) && i[c] === o[c]) && (i[c] = void 0);
|
|
1673
1742
|
}
|
|
1674
1743
|
}
|
|
1675
|
-
const
|
|
1676
|
-
var
|
|
1677
|
-
const
|
|
1744
|
+
const gt = ar(Ln);
|
|
1745
|
+
var Vt = /* @__PURE__ */ ((s) => (s.None = "none", s.Uscui = "us.cui", s.Usclassified = "us.classified", s.Usunclassified = "us.unclassified", s.Usconfidential = "us.confidential", s.Ussecret = "us.secret", s.Ustopsecret = "us.topsecret", s.UstopsecretSi = "us.topsecret.si", s.Uknotset = "uk.notset", s.Ukofficial = "uk.official", s.Uksecret = "uk.secret", s.Uktopsecret = "uk.topsecret", s.Caprotected_a = "ca.protected_a", s.Caprotected_b = "ca.protected_b", s.Caprotected_c = "ca.protected_c", s.Caconfidential = "ca.confidential", s.Casecret = "ca.secret", s.Catopsecret = "ca.topsecret", s.Auunofficial = "au.unofficial", s.Auofficial = "au.official", s.Auofficialsensitive = "au.officialsensitive", s.Auconfidential = "au.confidential", s.Ausecret = "au.secret", s.Autopsecret = "au.topsecret", s))(Vt || {});
|
|
1746
|
+
const ut = {
|
|
1678
1747
|
none: {},
|
|
1679
1748
|
//US Department of Defense spec CFR-2002-title31-vol1-sec2-7
|
|
1680
1749
|
"us.cui": {
|
|
@@ -1794,33 +1863,33 @@ const ct = {
|
|
|
1794
1863
|
content: "Top Secret"
|
|
1795
1864
|
}
|
|
1796
1865
|
};
|
|
1797
|
-
var
|
|
1798
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1799
|
-
(
|
|
1800
|
-
return i && c &&
|
|
1866
|
+
var Nn = Object.defineProperty, Dn = Object.getOwnPropertyDescriptor, X = (s, r, o, i) => {
|
|
1867
|
+
for (var c = i > 1 ? void 0 : i ? Dn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1868
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1869
|
+
return i && c && Nn(r, o, c), c;
|
|
1801
1870
|
};
|
|
1802
|
-
let B = class extends
|
|
1871
|
+
let B = class extends O {
|
|
1803
1872
|
constructor() {
|
|
1804
|
-
super(...arguments), this.showHeader = !0, this.headerSticky = !0, this.classificationLevel =
|
|
1873
|
+
super(...arguments), this.showHeader = !0, this.headerSticky = !0, this.classificationLevel = Vt.None, this.classificationText = "", this.notifications = [], this.showCreateAccount = !1, this.showLoginButton = !0, this.username = "";
|
|
1805
1874
|
}
|
|
1806
1875
|
// protected createRenderRoot(): HTMLElement | DocumentFragment {
|
|
1807
1876
|
// return this
|
|
1808
1877
|
// }
|
|
1809
1878
|
render() {
|
|
1810
|
-
this.classificationLevel && !
|
|
1811
|
-
const s = this.classificationLevel ? this.classificationText ||
|
|
1879
|
+
this.classificationLevel && !ut[this.classificationLevel] && (console.warn("Unknown classification", this.classificationLevel), this.classificationLevel = Vt.None);
|
|
1880
|
+
const s = this.classificationLevel ? this.classificationText || ut[this.classificationLevel].content : "", r = this.showHeader ? w`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${Jt(this.username)}>
|
|
1812
1881
|
<slot name="branding" slot="branding"></slot>
|
|
1813
1882
|
<slot name="name" slot="name"></slot>
|
|
1814
1883
|
<slot name="center" slot="center"></slot>
|
|
1815
1884
|
<slot name="end" slot="end"></slot>
|
|
1816
1885
|
</spectric-header>` : null;
|
|
1817
|
-
return
|
|
1818
|
-
${this.classificationLevel && s ?
|
|
1886
|
+
return w`
|
|
1887
|
+
${this.classificationLevel && s ? w`
|
|
1819
1888
|
<!-- Classification Banner -->
|
|
1820
|
-
<spectric-banner ${
|
|
1889
|
+
<spectric-banner ${gt({ text: s, headerStyle: ut[this.classificationLevel] })}></spectric-banner>
|
|
1821
1890
|
` : null}
|
|
1822
|
-
<spectric-theme theme=${
|
|
1823
|
-
${this.notifications ? this.notifications.map((o) =>
|
|
1891
|
+
<spectric-theme theme=${Jt(this.theme)}>
|
|
1892
|
+
${this.notifications ? this.notifications.map((o) => w`<spectric-banner ${gt(o)} ></spectric-banner>`) : null}
|
|
1824
1893
|
${this.headerSticky ? r : null}
|
|
1825
1894
|
<article>
|
|
1826
1895
|
${this.headerSticky ? null : r}
|
|
@@ -1830,48 +1899,48 @@ let B = class extends L {
|
|
|
1830
1899
|
</section>
|
|
1831
1900
|
</article>
|
|
1832
1901
|
</spectric-theme>
|
|
1833
|
-
${this.classificationLevel && s ?
|
|
1902
|
+
${this.classificationLevel && s ? w`<spectric-banner ${gt({ text: s, headerStyle: ut[this.classificationLevel] })}></spectric-banner>` : null}
|
|
1834
1903
|
|
|
1835
1904
|
`;
|
|
1836
1905
|
}
|
|
1837
1906
|
};
|
|
1838
|
-
B.styles =
|
|
1839
|
-
|
|
1907
|
+
B.styles = Tn;
|
|
1908
|
+
X([
|
|
1840
1909
|
v({ type: Boolean, reflect: !0 })
|
|
1841
1910
|
], B.prototype, "showHeader", 2);
|
|
1842
|
-
|
|
1911
|
+
X([
|
|
1843
1912
|
v({ type: Boolean, reflect: !0 })
|
|
1844
1913
|
], B.prototype, "headerSticky", 2);
|
|
1845
|
-
|
|
1914
|
+
X([
|
|
1846
1915
|
v({ type: String, reflect: !0 })
|
|
1847
1916
|
], B.prototype, "classificationLevel", 2);
|
|
1848
|
-
|
|
1917
|
+
X([
|
|
1849
1918
|
v({ type: String, reflect: !0 })
|
|
1850
1919
|
], B.prototype, "classificationText", 2);
|
|
1851
|
-
|
|
1920
|
+
X([
|
|
1852
1921
|
v({ type: Array, reflect: !0 })
|
|
1853
1922
|
], B.prototype, "notifications", 2);
|
|
1854
|
-
|
|
1923
|
+
X([
|
|
1855
1924
|
v({ type: Boolean, reflect: !0 })
|
|
1856
1925
|
], B.prototype, "showCreateAccount", 2);
|
|
1857
|
-
|
|
1926
|
+
X([
|
|
1858
1927
|
v({ type: Boolean, reflect: !0 })
|
|
1859
1928
|
], B.prototype, "showLoginButton", 2);
|
|
1860
|
-
|
|
1929
|
+
X([
|
|
1861
1930
|
v({ type: String, reflect: !0 })
|
|
1862
1931
|
], B.prototype, "username", 2);
|
|
1863
|
-
|
|
1932
|
+
X([
|
|
1864
1933
|
v({ type: String, reflect: !0 })
|
|
1865
1934
|
], B.prototype, "theme", 2);
|
|
1866
|
-
B =
|
|
1867
|
-
|
|
1935
|
+
B = X([
|
|
1936
|
+
N("spectric-page")
|
|
1868
1937
|
], B);
|
|
1869
|
-
var
|
|
1870
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1871
|
-
(
|
|
1872
|
-
return i && c &&
|
|
1873
|
-
},
|
|
1874
|
-
let E = class extends
|
|
1938
|
+
var jn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, P = (s, r, o, i) => {
|
|
1939
|
+
for (var c = i > 1 ? void 0 : i ? zn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1940
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1941
|
+
return i && c && jn(r, o, c), c;
|
|
1942
|
+
}, Rn = /* @__PURE__ */ ((s) => (s.Text = "text", s.TextArea = "text-area", s.number = "number", s.color = "color", s.date = "date", s.datetime = "datetime-local", s.email = "email", s.file = "file", s.hidden = "hidden", s.password = "password", s))(Rn || {});
|
|
1943
|
+
let E = class extends O {
|
|
1875
1944
|
constructor() {
|
|
1876
1945
|
super(...arguments), this.placeholder = "", this.readonly = !1, this.variant = "text", this.disabled = !1, this.label = "", this.hidePasswordLabel = "Hide", this.showPasswordLabel = "Show", this.showPasswordVisibilityToggle = !0, this.helperText = "", this.invalid = !1, this.required = !1, this.invalidText = "", this.name = "", this.pattern = "", this.maxCount = 0, this._value = "", this._showPassword = !1, this.autocomplete = "", this._handleInput = ({ target: s }) => {
|
|
1877
1946
|
const r = s;
|
|
@@ -1913,7 +1982,7 @@ let E = class extends L {
|
|
|
1913
1982
|
case "datetime-local":
|
|
1914
1983
|
case "file":
|
|
1915
1984
|
case "color":
|
|
1916
|
-
return
|
|
1985
|
+
return w`
|
|
1917
1986
|
<div class="inputWrapper">
|
|
1918
1987
|
<div class="text-input__label-helper-wrapper">
|
|
1919
1988
|
<div class="--text-input__label-wrapper">
|
|
@@ -1927,25 +1996,25 @@ let E = class extends L {
|
|
|
1927
1996
|
?disabled="${this.disabled}"
|
|
1928
1997
|
aria-describedby="helper-text"
|
|
1929
1998
|
id="input"
|
|
1930
|
-
name="${
|
|
1931
|
-
pattern="${
|
|
1932
|
-
placeholder="${
|
|
1933
|
-
autocomplete="${
|
|
1999
|
+
name="${Se(this.name)}"
|
|
2000
|
+
pattern="${Se(this.pattern)}"
|
|
2001
|
+
placeholder="${Se(this.placeholder)}"
|
|
2002
|
+
autocomplete="${Se(this.autocomplete)}"
|
|
1934
2003
|
?readonly="${this.readonly}"
|
|
1935
2004
|
?required="${this.required}"
|
|
1936
|
-
type="${
|
|
2005
|
+
type="${Se(
|
|
1937
2006
|
this.variant !== "password" ? this.variant : this._showPassword ? "text" : "password"
|
|
1938
2007
|
/* password */
|
|
1939
2008
|
)}"
|
|
1940
2009
|
.value="${this._value}"
|
|
1941
|
-
maxlength="${
|
|
2010
|
+
maxlength="${Se(this.maxCount > 0 ? this.maxCount : void 0)}"
|
|
1942
2011
|
@input="${this._handleInput}"
|
|
1943
2012
|
@change=${() => {
|
|
1944
2013
|
this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1945
2014
|
}}
|
|
1946
2015
|
/>
|
|
1947
2016
|
|
|
1948
|
-
${this.variant === "password" && this.showPasswordVisibilityToggle ?
|
|
2017
|
+
${this.variant === "password" && this.showPasswordVisibilityToggle ? w`
|
|
1949
2018
|
<spectric-button
|
|
1950
2019
|
size="small"
|
|
1951
2020
|
type="button"
|
|
@@ -1965,84 +2034,84 @@ let E = class extends L {
|
|
|
1965
2034
|
</div>
|
|
1966
2035
|
`;
|
|
1967
2036
|
case "hidden":
|
|
1968
|
-
return
|
|
2037
|
+
return w`<input type="hidden"></input>`;
|
|
1969
2038
|
}
|
|
1970
2039
|
return `Not yet implemented ${this.variant}`;
|
|
1971
2040
|
}
|
|
1972
2041
|
};
|
|
1973
|
-
|
|
2042
|
+
P([
|
|
1974
2043
|
v({ type: String, reflect: !0 })
|
|
1975
2044
|
], E.prototype, "placeholder", 2);
|
|
1976
|
-
|
|
2045
|
+
P([
|
|
1977
2046
|
v({ type: Boolean, reflect: !0 })
|
|
1978
2047
|
], E.prototype, "readonly", 2);
|
|
1979
|
-
|
|
2048
|
+
P([
|
|
1980
2049
|
v({ type: String, reflect: !0 })
|
|
1981
2050
|
], E.prototype, "variant", 2);
|
|
1982
|
-
|
|
2051
|
+
P([
|
|
1983
2052
|
v({ type: Boolean, reflect: !0 })
|
|
1984
2053
|
], E.prototype, "disabled", 2);
|
|
1985
|
-
|
|
2054
|
+
P([
|
|
1986
2055
|
v({ type: String, reflect: !0 })
|
|
1987
2056
|
], E.prototype, "label", 2);
|
|
1988
|
-
|
|
2057
|
+
P([
|
|
1989
2058
|
v()
|
|
1990
2059
|
], E.prototype, "hidePasswordLabel", 2);
|
|
1991
|
-
|
|
2060
|
+
P([
|
|
1992
2061
|
v()
|
|
1993
2062
|
], E.prototype, "showPasswordLabel", 2);
|
|
1994
|
-
|
|
2063
|
+
P([
|
|
1995
2064
|
v({
|
|
1996
2065
|
type: Boolean,
|
|
1997
2066
|
reflect: !0
|
|
1998
2067
|
})
|
|
1999
2068
|
], E.prototype, "showPasswordVisibilityToggle", 2);
|
|
2000
|
-
|
|
2069
|
+
P([
|
|
2001
2070
|
v({ type: String, reflect: !0 })
|
|
2002
2071
|
], E.prototype, "helperText", 2);
|
|
2003
|
-
|
|
2072
|
+
P([
|
|
2004
2073
|
v({ type: Boolean, reflect: !0 })
|
|
2005
2074
|
], E.prototype, "invalid", 2);
|
|
2006
|
-
|
|
2075
|
+
P([
|
|
2007
2076
|
v({ type: Boolean, reflect: !0 })
|
|
2008
2077
|
], E.prototype, "required", 2);
|
|
2009
|
-
|
|
2078
|
+
P([
|
|
2010
2079
|
v({ type: String, reflect: !0 })
|
|
2011
2080
|
], E.prototype, "invalidText", 2);
|
|
2012
|
-
|
|
2081
|
+
P([
|
|
2013
2082
|
v()
|
|
2014
2083
|
], E.prototype, "name", 2);
|
|
2015
|
-
|
|
2084
|
+
P([
|
|
2016
2085
|
v()
|
|
2017
2086
|
], E.prototype, "pattern", 2);
|
|
2018
|
-
|
|
2087
|
+
P([
|
|
2019
2088
|
v({ type: Number, reflect: !0 })
|
|
2020
2089
|
], E.prototype, "maxCount", 2);
|
|
2021
|
-
|
|
2090
|
+
P([
|
|
2022
2091
|
v({ reflect: !0 })
|
|
2023
2092
|
], E.prototype, "autocomplete", 2);
|
|
2024
|
-
|
|
2093
|
+
P([
|
|
2025
2094
|
v({ reflect: !0 })
|
|
2026
2095
|
], E.prototype, "value", 1);
|
|
2027
|
-
|
|
2028
|
-
|
|
2096
|
+
P([
|
|
2097
|
+
Ze("input")
|
|
2029
2098
|
], E.prototype, "_input", 2);
|
|
2030
|
-
E =
|
|
2031
|
-
|
|
2099
|
+
E = P([
|
|
2100
|
+
N("spectric-input")
|
|
2032
2101
|
], E);
|
|
2033
|
-
const
|
|
2102
|
+
const Se = (s) => Jt(s === "" ? void 0 : s ?? void 0), Bn = "end of input", Un = {
|
|
2034
2103
|
fieldName: "field name",
|
|
2035
2104
|
value: "value",
|
|
2036
2105
|
literal: "literal",
|
|
2037
2106
|
whitespace: "whitespace"
|
|
2038
2107
|
};
|
|
2039
|
-
class
|
|
2108
|
+
class Js extends Error {
|
|
2040
2109
|
constructor(r, o) {
|
|
2041
2110
|
let i = r.message;
|
|
2042
2111
|
if (r.expected) {
|
|
2043
|
-
const
|
|
2044
|
-
let
|
|
2045
|
-
i = `Expected ${
|
|
2112
|
+
const u = r.expected.map((b) => Un[b.description] || b.description).join(", ");
|
|
2113
|
+
let g = r.found ? `"${r.found}"` : Bn;
|
|
2114
|
+
i = `Expected ${u} but ${g} found.`;
|
|
2046
2115
|
}
|
|
2047
2116
|
const c = [i, o, "-".repeat(r.location.start.offset) + "^"].join(
|
|
2048
2117
|
`
|
|
@@ -2051,22 +2120,22 @@ class Is extends Error {
|
|
|
2051
2120
|
super(c), this.name = "DQLSyntaxError", this.shortMessage = i;
|
|
2052
2121
|
}
|
|
2053
2122
|
}
|
|
2054
|
-
function
|
|
2123
|
+
function Ce(s) {
|
|
2055
2124
|
return {
|
|
2056
2125
|
type: "literal",
|
|
2057
2126
|
value: s
|
|
2058
2127
|
};
|
|
2059
2128
|
}
|
|
2060
|
-
function
|
|
2129
|
+
function cr(s) {
|
|
2061
2130
|
return s.value;
|
|
2062
2131
|
}
|
|
2063
|
-
const
|
|
2132
|
+
const Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2064
2133
|
__proto__: null,
|
|
2065
|
-
buildNode:
|
|
2066
|
-
toOpenSearchQuery:
|
|
2134
|
+
buildNode: Ce,
|
|
2135
|
+
toOpenSearchQuery: cr
|
|
2067
2136
|
}, Symbol.toStringTag, { value: "Module" })), {
|
|
2068
|
-
SyntaxError:
|
|
2069
|
-
parse:
|
|
2137
|
+
SyntaxError: Tc,
|
|
2138
|
+
parse: Et
|
|
2070
2139
|
} = function() {
|
|
2071
2140
|
function s(i, c) {
|
|
2072
2141
|
function t() {
|
|
@@ -2074,32 +2143,32 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2074
2143
|
}
|
|
2075
2144
|
t.prototype = c.prototype, i.prototype = new t();
|
|
2076
2145
|
}
|
|
2077
|
-
function r(i, c, t,
|
|
2078
|
-
this.message = i, this.expected = c, this.found = t, this.location =
|
|
2146
|
+
function r(i, c, t, u) {
|
|
2147
|
+
this.message = i, this.expected = c, this.found = t, this.location = u, this.name = "SyntaxError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, r);
|
|
2079
2148
|
}
|
|
2080
2149
|
s(r, Error);
|
|
2081
2150
|
function o(i) {
|
|
2082
|
-
var c = arguments.length > 1 ? arguments[1] : {}, t = {},
|
|
2151
|
+
var c = arguments.length > 1 ? arguments[1] : {}, t = {}, u = { start: ss, Literal: Ht }, g = ss, b = function(e, n) {
|
|
2083
2152
|
return n.type === "cursor" ? {
|
|
2084
2153
|
...n,
|
|
2085
2154
|
suggestionTypes: ["conjunction"]
|
|
2086
|
-
} : e !== null ? e :
|
|
2087
|
-
},
|
|
2088
|
-
return
|
|
2089
|
-
},
|
|
2090
|
-
const l = [e, n].find((
|
|
2155
|
+
} : e !== null ? e : pe.function.buildNode("is", "*", "*");
|
|
2156
|
+
}, x = function() {
|
|
2157
|
+
return jo;
|
|
2158
|
+
}, A = function(e, n) {
|
|
2159
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2091
2160
|
return l || Y("or", [e, n]);
|
|
2092
2161
|
}, _ = function(e, n) {
|
|
2093
|
-
const l = [e, n].find((
|
|
2162
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2094
2163
|
return l || Y("and", [e, n]);
|
|
2095
|
-
},
|
|
2164
|
+
}, S = function(e) {
|
|
2096
2165
|
return e.type === "cursor" ? e : Y("not", [e]);
|
|
2097
|
-
},
|
|
2166
|
+
}, k = "(", z = { type: "literal", value: "(", description: '"("' }, Xe = ")", te = { type: "literal", value: ")", description: '")"' }, H = function(e, n) {
|
|
2098
2167
|
return n.type === "cursor" ? {
|
|
2099
2168
|
...n,
|
|
2100
2169
|
suggestionTypes: ["conjunction"]
|
|
2101
2170
|
} : e;
|
|
2102
|
-
}, q = ":", R = { type: "literal", value: ":", description: '":"' },
|
|
2171
|
+
}, q = ":", R = { type: "literal", value: ":", description: '":"' }, me = "{", Pt = { type: "literal", value: "{", description: '"{"' }, Tt = "}", Lt = { type: "literal", value: "}", description: '"}"' }, ai = function(e, n, l) {
|
|
2103
2172
|
return n.type === "cursor" ? {
|
|
2104
2173
|
...n,
|
|
2105
2174
|
nestedPath: n.nestedPath ? `${e.value}.${n.nestedPath}` : e.value
|
|
@@ -2107,21 +2176,21 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2107
2176
|
...l,
|
|
2108
2177
|
suggestionTypes: ["conjunction"]
|
|
2109
2178
|
} : Y("nested", [e, n]);
|
|
2110
|
-
},
|
|
2179
|
+
}, ci = { type: "other", description: "fieldName" }, li = function(e, n, l) {
|
|
2111
2180
|
if (l.type === "cursor")
|
|
2112
2181
|
return {
|
|
2113
2182
|
...l,
|
|
2114
2183
|
suggestionTypes: ["conjunction"]
|
|
2115
2184
|
};
|
|
2116
|
-
const
|
|
2117
|
-
return Y("range", [e,
|
|
2118
|
-
},
|
|
2185
|
+
const p = Mo(n, l);
|
|
2186
|
+
return Y("range", [e, p]);
|
|
2187
|
+
}, pi = function(e, n) {
|
|
2119
2188
|
return n.type === "cursor" ? {
|
|
2120
2189
|
...n,
|
|
2121
2190
|
fieldName: e.value,
|
|
2122
2191
|
suggestionTypes: ["value", "conjunction"]
|
|
2123
2192
|
} : n(e);
|
|
2124
|
-
},
|
|
2193
|
+
}, ui = function(e) {
|
|
2125
2194
|
if (e.type === "cursor") {
|
|
2126
2195
|
const l = `${e.prefix}${e.suffix}`.trim();
|
|
2127
2196
|
return {
|
|
@@ -2132,138 +2201,138 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2132
2201
|
}
|
|
2133
2202
|
const n = re(null);
|
|
2134
2203
|
return e(n);
|
|
2135
|
-
},
|
|
2204
|
+
}, di = function(e, n) {
|
|
2136
2205
|
return n.type === "cursor" ? {
|
|
2137
2206
|
...n,
|
|
2138
2207
|
suggestionTypes: ["conjunction"]
|
|
2139
2208
|
} : e;
|
|
2140
|
-
},
|
|
2141
|
-
const l = [e, n].find((
|
|
2209
|
+
}, fi = function(e, n) {
|
|
2210
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2142
2211
|
return l ? {
|
|
2143
2212
|
...l,
|
|
2144
2213
|
suggestionTypes: ["value"]
|
|
2145
|
-
} : (
|
|
2146
|
-
},
|
|
2147
|
-
const l = [e, n].find((
|
|
2214
|
+
} : (p) => Y("or", [e(p), n(p)]);
|
|
2215
|
+
}, hi = function(e, n) {
|
|
2216
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2148
2217
|
return l ? {
|
|
2149
2218
|
...l,
|
|
2150
2219
|
suggestionTypes: ["value"]
|
|
2151
|
-
} : (
|
|
2152
|
-
},
|
|
2220
|
+
} : (p) => Y("and", [e(p), n(p)]);
|
|
2221
|
+
}, gi = function(e) {
|
|
2153
2222
|
return e.type === "cursor" ? {
|
|
2154
2223
|
...list,
|
|
2155
2224
|
suggestionTypes: ["value"]
|
|
2156
2225
|
} : (n) => Y("not", [e(n)]);
|
|
2157
|
-
},
|
|
2226
|
+
}, bi = { type: "other", description: "value" }, vi = function(e) {
|
|
2158
2227
|
if (e.type === "cursor") return e;
|
|
2159
2228
|
const n = re(!0);
|
|
2160
2229
|
return (l) => Y("is", [l, e, n]);
|
|
2161
|
-
},
|
|
2230
|
+
}, yi = function(e) {
|
|
2162
2231
|
if (e.type === "cursor") return e;
|
|
2163
|
-
!
|
|
2232
|
+
!Bo && e.type === "wildcard" && pe.wildcard.hasLeadingWildcard(e) && M("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");
|
|
2164
2233
|
const n = re(!1);
|
|
2165
2234
|
return (l) => Y("is", [l, e, n]);
|
|
2166
|
-
},
|
|
2167
|
-
const { start:
|
|
2235
|
+
}, mi = { type: "other", description: "OR" }, gr = "or", br = { type: "literal", value: "or", description: '"or"' }, $i = { type: "other", description: "AND" }, vr = "and", yr = { type: "literal", value: "and", description: '"and"' }, _i = { type: "other", description: "NOT" }, mr = "not", $r = { type: "literal", value: "not", description: '"not"' }, wi = { type: "other", description: "literal" }, Ne = '"', De = { type: "literal", value: '"', description: '"\\""' }, Nt = function(e, n, l) {
|
|
2236
|
+
const { start: p, end: f } = fo();
|
|
2168
2237
|
return {
|
|
2169
2238
|
type: "cursor",
|
|
2170
|
-
start:
|
|
2239
|
+
start: p.offset,
|
|
2171
2240
|
end: f.offset - n.length,
|
|
2172
2241
|
prefix: e.join(""),
|
|
2173
2242
|
suffix: l.join(""),
|
|
2174
|
-
text:
|
|
2243
|
+
text: uo().replace(n, "")
|
|
2175
2244
|
};
|
|
2176
|
-
},
|
|
2245
|
+
}, xi = function(e) {
|
|
2177
2246
|
return re(e.join(""));
|
|
2178
|
-
},
|
|
2247
|
+
}, je = "\\", ze = { type: "literal", value: "\\", description: '"\\\\"' }, Ai = /^[\\"]/, Si = { type: "class", value: '[\\\\"]', description: '[\\\\"]' }, Ge = function(e) {
|
|
2179
2248
|
return e;
|
|
2180
|
-
},
|
|
2249
|
+
}, ki = /^[^"]/, Ci = { type: "class", value: '[^"]', description: '[^"]' }, Ei = function(e) {
|
|
2181
2250
|
const n = e.join("").trim();
|
|
2182
|
-
return n === "null" ? re(null) : n === "true" ? re(!0) : n === "false" ? re(!1) : e.includes(
|
|
2251
|
+
return n === "null" ? re(null) : n === "true" ? re(!0) : n === "false" ? re(!1) : e.includes(ms) ? Uo(n) : re(
|
|
2183
2252
|
/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(n) ? isFinite(n) && (n > Number.MAX_SAFE_INTEGER || n < Number.MIN_SAFE_INTEGER) ? BigInt(n) : Number(n) : n
|
|
2184
2253
|
);
|
|
2185
|
-
},
|
|
2186
|
-
return
|
|
2187
|
-
},
|
|
2254
|
+
}, _r = { type: "any", description: "any character" }, Je = "*", Ve = { type: "literal", value: "*", description: '"*"' }, Oi = function() {
|
|
2255
|
+
return ms;
|
|
2256
|
+
}, wr = "\\t", Pi = { type: "literal", value: "\\t", description: '"\\\\t"' }, Ti = function() {
|
|
2188
2257
|
return " ";
|
|
2189
|
-
},
|
|
2258
|
+
}, xr = "\\r", Li = { type: "literal", value: "\\r", description: '"\\\\r"' }, Ni = function() {
|
|
2190
2259
|
return "\r";
|
|
2191
|
-
},
|
|
2260
|
+
}, Ar = "\\n", Di = { type: "literal", value: "\\n", description: '"\\\\n"' }, ji = function() {
|
|
2192
2261
|
return `
|
|
2193
2262
|
`;
|
|
2194
|
-
},
|
|
2263
|
+
}, zi = function(e) {
|
|
2195
2264
|
return e;
|
|
2196
|
-
},
|
|
2265
|
+
}, Ri = /^[\\():<>"*{}]/, Bi = { type: "class", value: '[\\\\():<>"*{}]', description: '[\\\\():<>"*{}]' }, Sr = "<=", Ui = { type: "literal", value: "<=", description: '"<="' }, Mi = function() {
|
|
2197
2266
|
return "lte";
|
|
2198
|
-
},
|
|
2267
|
+
}, kr = ">=", Fi = { type: "literal", value: ">=", description: '">="' }, Ii = function() {
|
|
2199
2268
|
return "gte";
|
|
2200
|
-
},
|
|
2269
|
+
}, Cr = "<", Er = { type: "literal", value: "<", description: '"<"' }, Qi = function() {
|
|
2201
2270
|
return "lt";
|
|
2202
|
-
},
|
|
2271
|
+
}, Or = ">", Pr = { type: "literal", value: ">", description: '">"' }, Hi = function() {
|
|
2203
2272
|
return "gt";
|
|
2204
|
-
},
|
|
2205
|
-
return
|
|
2206
|
-
},
|
|
2207
|
-
return
|
|
2208
|
-
},
|
|
2273
|
+
}, qi = { type: "other", description: "whitespace" }, Wi = /^[ \t\r\n]/, Yi = { type: "class", value: "[\\ \\t\\r\\n]", description: "[\\ \\t\\r\\n]" }, Ki = function() {
|
|
2274
|
+
return zo;
|
|
2275
|
+
}, Tr = "@kuery-cursor@", Zi = { type: "literal", value: "@kuery-cursor@", description: '"@kuery-cursor@"' }, Xi = function() {
|
|
2276
|
+
return Ro;
|
|
2277
|
+
}, Lr = "||", Gi = { type: "literal", value: "||", description: '"||"' }, Ji = function() {
|
|
2209
2278
|
M("LuceneOr");
|
|
2210
|
-
},
|
|
2279
|
+
}, Nr = "&&", Vi = { type: "literal", value: "&&", description: '"&&"' }, Dr = function() {
|
|
2211
2280
|
M("LuceneAnd");
|
|
2212
|
-
},
|
|
2281
|
+
}, jr = "+", zr = { type: "literal", value: "+", description: '"+"' }, Rr = "-", Br = { type: "literal", value: "-", description: '"-"' }, Ur = function() {
|
|
2213
2282
|
M("LuceneNot");
|
|
2214
|
-
},
|
|
2283
|
+
}, Mr = "!", Fr = { type: "literal", value: "!", description: '"!"' }, Ir = "_exists_", eo = { type: "literal", value: "_exists_", description: '"_exists_"' }, to = function() {
|
|
2215
2284
|
M("LuceneExists");
|
|
2216
|
-
},
|
|
2285
|
+
}, Qr = function() {
|
|
2217
2286
|
M("LuceneRange");
|
|
2218
|
-
},
|
|
2287
|
+
}, Hr = "?", qr = { type: "literal", value: "?", description: '"?"' }, ro = function() {
|
|
2219
2288
|
M("LuceneWildcard");
|
|
2220
|
-
},
|
|
2289
|
+
}, Dt = "/", jt = { type: "literal", value: "/", description: '"/"' }, Wr = /^[^\/]/, Yr = { type: "class", value: "[^/]", description: "[^/]" }, so = function() {
|
|
2221
2290
|
M("LuceneRegex");
|
|
2222
|
-
},
|
|
2291
|
+
}, zt = "~", Rt = { type: "literal", value: "~", description: '"~"' }, $e = /^[0-9]/, _e = { type: "class", value: "[0-9]", description: "[0-9]" }, io = function() {
|
|
2223
2292
|
M("LuceneFuzzy");
|
|
2224
|
-
},
|
|
2293
|
+
}, oo = function() {
|
|
2225
2294
|
M("LuceneProximity");
|
|
2226
|
-
},
|
|
2295
|
+
}, Kr = "^", Zr = { type: "literal", value: "^", description: '"^"' }, no = function() {
|
|
2227
2296
|
M("LuceneBoost");
|
|
2228
|
-
},
|
|
2297
|
+
}, ao = function() {
|
|
2229
2298
|
return char;
|
|
2230
|
-
},
|
|
2299
|
+
}, co = "=", lo = { type: "literal", value: "=", description: '"="' }, Xr = "[", Gr = { type: "literal", value: "[", description: '"["' }, Jr = "]", Vr = { type: "literal", value: "]", description: '"]"' }, es = "TO", po = { type: "literal", value: "TO", description: '"TO"' }, a = 0, $ = 0, et = [{ line: 1, column: 1, seenCR: !1 }], W = 0, Bt = [], d = 0, tt;
|
|
2231
2300
|
if ("startRule" in c) {
|
|
2232
|
-
if (!(c.startRule in
|
|
2301
|
+
if (!(c.startRule in u))
|
|
2233
2302
|
throw new Error(`Can't start parsing from rule "` + c.startRule + '".');
|
|
2234
|
-
|
|
2303
|
+
g = u[c.startRule];
|
|
2235
2304
|
}
|
|
2236
|
-
function
|
|
2305
|
+
function uo() {
|
|
2237
2306
|
return i.substring($, a);
|
|
2238
2307
|
}
|
|
2239
|
-
function
|
|
2240
|
-
return
|
|
2308
|
+
function fo() {
|
|
2309
|
+
return rt($, a);
|
|
2241
2310
|
}
|
|
2242
2311
|
function M(e) {
|
|
2243
|
-
throw
|
|
2312
|
+
throw rs(
|
|
2244
2313
|
e,
|
|
2245
2314
|
null,
|
|
2246
2315
|
i.substring($, a),
|
|
2247
|
-
|
|
2316
|
+
rt($, a)
|
|
2248
2317
|
);
|
|
2249
2318
|
}
|
|
2250
|
-
function
|
|
2251
|
-
var n =
|
|
2319
|
+
function ts(e) {
|
|
2320
|
+
var n = et[e], l, p;
|
|
2252
2321
|
if (n)
|
|
2253
2322
|
return n;
|
|
2254
|
-
for (l = e - 1; !
|
|
2323
|
+
for (l = e - 1; !et[l]; )
|
|
2255
2324
|
l--;
|
|
2256
|
-
for (n =
|
|
2325
|
+
for (n = et[l], n = {
|
|
2257
2326
|
line: n.line,
|
|
2258
2327
|
column: n.column,
|
|
2259
2328
|
seenCR: n.seenCR
|
|
2260
2329
|
}; l < e; )
|
|
2261
|
-
|
|
2262
|
-
` ? (n.seenCR || n.line++, n.column = 1, n.seenCR = !1) :
|
|
2263
|
-
return
|
|
2330
|
+
p = i.charAt(l), p === `
|
|
2331
|
+
` ? (n.seenCR || n.line++, n.column = 1, n.seenCR = !1) : p === "\r" || p === "\u2028" || p === "\u2029" ? (n.line++, n.column = 1, n.seenCR = !0) : (n.column++, n.seenCR = !1), l++;
|
|
2332
|
+
return et[e] = n, n;
|
|
2264
2333
|
}
|
|
2265
|
-
function
|
|
2266
|
-
var l =
|
|
2334
|
+
function rt(e, n) {
|
|
2335
|
+
var l = ts(e), p = ts(n);
|
|
2267
2336
|
return {
|
|
2268
2337
|
start: {
|
|
2269
2338
|
offset: e,
|
|
@@ -2272,91 +2341,91 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2272
2341
|
},
|
|
2273
2342
|
end: {
|
|
2274
2343
|
offset: n,
|
|
2275
|
-
line:
|
|
2276
|
-
column:
|
|
2344
|
+
line: p.line,
|
|
2345
|
+
column: p.column
|
|
2277
2346
|
}
|
|
2278
2347
|
};
|
|
2279
2348
|
}
|
|
2280
2349
|
function h(e) {
|
|
2281
|
-
a < W || (a > W && (W = a,
|
|
2350
|
+
a < W || (a > W && (W = a, Bt = []), Bt.push(e));
|
|
2282
2351
|
}
|
|
2283
|
-
function
|
|
2352
|
+
function rs(e, n, l, p) {
|
|
2284
2353
|
function f(T) {
|
|
2285
|
-
var
|
|
2286
|
-
for (T.sort(function(se,
|
|
2287
|
-
return se.description <
|
|
2288
|
-
});
|
|
2289
|
-
T[
|
|
2354
|
+
var L = 1;
|
|
2355
|
+
for (T.sort(function(se, F) {
|
|
2356
|
+
return se.description < F.description ? -1 : se.description > F.description ? 1 : 0;
|
|
2357
|
+
}); L < T.length; )
|
|
2358
|
+
T[L - 1] === T[L] ? T.splice(L, 1) : L++;
|
|
2290
2359
|
}
|
|
2291
|
-
function m(T,
|
|
2292
|
-
function se(
|
|
2293
|
-
function
|
|
2294
|
-
return
|
|
2360
|
+
function m(T, L) {
|
|
2361
|
+
function se(Fo) {
|
|
2362
|
+
function lt(J) {
|
|
2363
|
+
return J.charCodeAt(0).toString(16).toUpperCase();
|
|
2295
2364
|
}
|
|
2296
|
-
return
|
|
2297
|
-
return "\\x0" +
|
|
2298
|
-
}).replace(/[\x10-\x1F\x80-\xFF]/g, function(
|
|
2299
|
-
return "\\x" +
|
|
2300
|
-
}).replace(/[\u0100-\u0FFF]/g, function(
|
|
2301
|
-
return "\\u0" +
|
|
2302
|
-
}).replace(/[\u1000-\uFFFF]/g, function(
|
|
2303
|
-
return "\\u" +
|
|
2365
|
+
return Fo.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\x08/g, "\\b").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\f/g, "\\f").replace(/\r/g, "\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(J) {
|
|
2366
|
+
return "\\x0" + lt(J);
|
|
2367
|
+
}).replace(/[\x10-\x1F\x80-\xFF]/g, function(J) {
|
|
2368
|
+
return "\\x" + lt(J);
|
|
2369
|
+
}).replace(/[\u0100-\u0FFF]/g, function(J) {
|
|
2370
|
+
return "\\u0" + lt(J);
|
|
2371
|
+
}).replace(/[\u1000-\uFFFF]/g, function(J) {
|
|
2372
|
+
return "\\u" + lt(J);
|
|
2304
2373
|
});
|
|
2305
2374
|
}
|
|
2306
|
-
var
|
|
2307
|
-
for (
|
|
2308
|
-
|
|
2309
|
-
return
|
|
2375
|
+
var F = new Array(T.length), $s, _s, Be;
|
|
2376
|
+
for (Be = 0; Be < T.length; Be++)
|
|
2377
|
+
F[Be] = T[Be].description;
|
|
2378
|
+
return $s = T.length > 1 ? F.slice(0, -1).join(", ") + " or " + F[T.length - 1] : F[0], _s = L ? '"' + se(L) + '"' : "end of input", "Expected " + $s + " but " + _s + " found.";
|
|
2310
2379
|
}
|
|
2311
2380
|
return n !== null && f(n), new r(
|
|
2312
2381
|
e !== null ? e : m(n, l),
|
|
2313
2382
|
n,
|
|
2314
2383
|
l,
|
|
2315
|
-
|
|
2384
|
+
p
|
|
2316
2385
|
);
|
|
2317
2386
|
}
|
|
2318
|
-
function
|
|
2319
|
-
var e, n, l,
|
|
2387
|
+
function ss() {
|
|
2388
|
+
var e, n, l, p;
|
|
2320
2389
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2321
2390
|
n.push(l), l = y();
|
|
2322
|
-
return n !== t ? (l =
|
|
2391
|
+
return n !== t ? (l = st(), l === t && (l = null), l !== t ? (p = at(), p !== t ? ($ = e, n = b(l, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2323
2392
|
}
|
|
2324
|
-
function
|
|
2325
|
-
var e, n, l,
|
|
2326
|
-
return e = a, $ = a, n =
|
|
2393
|
+
function st() {
|
|
2394
|
+
var e, n, l, p;
|
|
2395
|
+
return e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = xo(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = a, n = Ut(), n !== t ? (l = it(), l !== t ? (p = st(), p !== t ? ($ = e, n = A(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Ut())), e;
|
|
2327
2396
|
}
|
|
2328
|
-
function
|
|
2329
|
-
var e, n, l,
|
|
2330
|
-
return e = a, n =
|
|
2397
|
+
function Ut() {
|
|
2398
|
+
var e, n, l, p;
|
|
2399
|
+
return e = a, n = is(), n !== t ? (l = ot(), l !== t ? (p = Ut(), p !== t ? ($ = e, n = _(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = is()), e;
|
|
2331
2400
|
}
|
|
2332
|
-
function
|
|
2401
|
+
function is() {
|
|
2333
2402
|
var e, n, l;
|
|
2334
|
-
return e = a, n =
|
|
2403
|
+
return e = a, n = Qt(), n !== t ? (l = os(), l !== t ? ($ = e, n = S(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = os()), e;
|
|
2335
2404
|
}
|
|
2336
|
-
function
|
|
2337
|
-
var e, n, l,
|
|
2338
|
-
if (e = a, i.charCodeAt(a) === 40 ? (n =
|
|
2339
|
-
for (l = [],
|
|
2340
|
-
l.push(
|
|
2341
|
-
l !== t ? (
|
|
2405
|
+
function os() {
|
|
2406
|
+
var e, n, l, p, f, m;
|
|
2407
|
+
if (e = a, i.charCodeAt(a) === 40 ? (n = k, a++) : (n = t, d === 0 && h(z)), n !== t) {
|
|
2408
|
+
for (l = [], p = y(); p !== t; )
|
|
2409
|
+
l.push(p), p = y();
|
|
2410
|
+
l !== t ? (p = st(), p !== t ? (f = at(), f !== t ? (i.charCodeAt(a) === 41 ? (m = Xe, a++) : (m = t, d === 0 && h(te)), m !== t ? ($ = e, n = H(p, f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2342
2411
|
} else
|
|
2343
2412
|
a = e, e = t;
|
|
2344
|
-
return e === t && (e =
|
|
2413
|
+
return e === t && (e = ho()), e;
|
|
2345
2414
|
}
|
|
2346
|
-
function
|
|
2347
|
-
var e, n, l,
|
|
2348
|
-
if (e = a, n =
|
|
2349
|
-
for (l = [],
|
|
2350
|
-
l.push(
|
|
2415
|
+
function ho() {
|
|
2416
|
+
var e, n, l, p, f, m, T, L, se, F;
|
|
2417
|
+
if (e = a, n = Mt(), n !== t) {
|
|
2418
|
+
for (l = [], p = y(); p !== t; )
|
|
2419
|
+
l.push(p), p = y();
|
|
2351
2420
|
if (l !== t)
|
|
2352
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2421
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2353
2422
|
for (f = [], m = y(); m !== t; )
|
|
2354
2423
|
f.push(m), m = y();
|
|
2355
2424
|
if (f !== t)
|
|
2356
|
-
if (i.charCodeAt(a) === 123 ? (m =
|
|
2357
|
-
for (T = [],
|
|
2358
|
-
T.push(
|
|
2359
|
-
T !== t ? (
|
|
2425
|
+
if (i.charCodeAt(a) === 123 ? (m = me, a++) : (m = t, d === 0 && h(Pt)), m !== t) {
|
|
2426
|
+
for (T = [], L = y(); L !== t; )
|
|
2427
|
+
T.push(L), L = y();
|
|
2428
|
+
T !== t ? (L = st(), L !== t ? (se = at(), se !== t ? (i.charCodeAt(a) === 125 ? (F = Tt, a++) : (F = t, d === 0 && h(Lt)), F !== t ? ($ = e, n = ai(n, L, se), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2360
2429
|
} else
|
|
2361
2430
|
a = e, e = t;
|
|
2362
2431
|
else
|
|
@@ -2367,26 +2436,26 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2367
2436
|
a = e, e = t;
|
|
2368
2437
|
} else
|
|
2369
2438
|
a = e, e = t;
|
|
2370
|
-
return e === t && (e =
|
|
2439
|
+
return e === t && (e = go()), e;
|
|
2371
2440
|
}
|
|
2372
|
-
function
|
|
2441
|
+
function go() {
|
|
2373
2442
|
var e;
|
|
2374
|
-
return e =
|
|
2443
|
+
return e = bo(), e === t && (e = vo(), e === t && (e = yo())), e;
|
|
2375
2444
|
}
|
|
2376
|
-
function
|
|
2445
|
+
function Mt() {
|
|
2377
2446
|
var e;
|
|
2378
|
-
return d++, e =
|
|
2447
|
+
return d++, e = Ht(), d--, e === t && d === 0 && h(ci), e;
|
|
2379
2448
|
}
|
|
2380
|
-
function
|
|
2381
|
-
var e, n, l,
|
|
2382
|
-
if (e = a, n =
|
|
2383
|
-
for (l = [],
|
|
2384
|
-
l.push(
|
|
2449
|
+
function bo() {
|
|
2450
|
+
var e, n, l, p, f, m;
|
|
2451
|
+
if (e = a, n = Mt(), n !== t) {
|
|
2452
|
+
for (l = [], p = y(); p !== t; )
|
|
2453
|
+
l.push(p), p = y();
|
|
2385
2454
|
if (l !== t)
|
|
2386
|
-
if (
|
|
2455
|
+
if (p = us(), p !== t) {
|
|
2387
2456
|
for (f = [], m = y(); m !== t; )
|
|
2388
2457
|
f.push(m), m = y();
|
|
2389
|
-
f !== t ? (m =
|
|
2458
|
+
f !== t ? (m = Ht(), m !== t ? ($ = e, n = li(n, p, m), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2390
2459
|
} else
|
|
2391
2460
|
a = e, e = t;
|
|
2392
2461
|
else
|
|
@@ -2395,16 +2464,16 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2395
2464
|
a = e, e = t;
|
|
2396
2465
|
return e;
|
|
2397
2466
|
}
|
|
2398
|
-
function
|
|
2399
|
-
var e, n, l,
|
|
2400
|
-
if (e = a, n =
|
|
2401
|
-
for (l = [],
|
|
2402
|
-
l.push(
|
|
2467
|
+
function vo() {
|
|
2468
|
+
var e, n, l, p, f, m;
|
|
2469
|
+
if (e = a, n = Mt(), n !== t) {
|
|
2470
|
+
for (l = [], p = y(); p !== t; )
|
|
2471
|
+
l.push(p), p = y();
|
|
2403
2472
|
if (l !== t)
|
|
2404
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2473
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2405
2474
|
for (f = [], m = y(); m !== t; )
|
|
2406
2475
|
f.push(m), m = y();
|
|
2407
|
-
f !== t ? (m =
|
|
2476
|
+
f !== t ? (m = Ft(), m !== t ? ($ = e, n = pi(n, m), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2408
2477
|
} else
|
|
2409
2478
|
a = e, e = t;
|
|
2410
2479
|
else
|
|
@@ -2413,105 +2482,105 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2413
2482
|
a = e, e = t;
|
|
2414
2483
|
return e;
|
|
2415
2484
|
}
|
|
2416
|
-
function
|
|
2485
|
+
function yo() {
|
|
2417
2486
|
var e, n;
|
|
2418
|
-
return e = a, n =
|
|
2487
|
+
return e = a, n = cs(), n !== t && ($ = e, n = ui(n)), e = n, e;
|
|
2419
2488
|
}
|
|
2420
|
-
function
|
|
2421
|
-
var e, n, l,
|
|
2422
|
-
if (e = a, i.charCodeAt(a) === 40 ? (n =
|
|
2423
|
-
for (l = [],
|
|
2424
|
-
l.push(
|
|
2425
|
-
l !== t ? (
|
|
2489
|
+
function Ft() {
|
|
2490
|
+
var e, n, l, p, f, m;
|
|
2491
|
+
if (e = a, i.charCodeAt(a) === 40 ? (n = k, a++) : (n = t, d === 0 && h(z)), n !== t) {
|
|
2492
|
+
for (l = [], p = y(); p !== t; )
|
|
2493
|
+
l.push(p), p = y();
|
|
2494
|
+
l !== t ? (p = ns(), p !== t ? (f = at(), f !== t ? (i.charCodeAt(a) === 41 ? (m = Xe, a++) : (m = t, d === 0 && h(te)), m !== t ? ($ = e, n = di(p, f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2426
2495
|
} else
|
|
2427
2496
|
a = e, e = t;
|
|
2428
|
-
return e === t && (e =
|
|
2497
|
+
return e === t && (e = cs()), e;
|
|
2429
2498
|
}
|
|
2430
|
-
function
|
|
2431
|
-
var e, n, l,
|
|
2432
|
-
return e = a, n =
|
|
2499
|
+
function ns() {
|
|
2500
|
+
var e, n, l, p;
|
|
2501
|
+
return e = a, n = It(), n !== t ? (l = it(), l !== t ? (p = ns(), p !== t ? ($ = e, n = fi(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = It()), e;
|
|
2433
2502
|
}
|
|
2434
|
-
function
|
|
2435
|
-
var e, n, l,
|
|
2436
|
-
return e = a, n =
|
|
2503
|
+
function It() {
|
|
2504
|
+
var e, n, l, p;
|
|
2505
|
+
return e = a, n = as(), n !== t ? (l = ot(), l !== t ? (p = It(), p !== t ? ($ = e, n = hi(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = as()), e;
|
|
2437
2506
|
}
|
|
2438
|
-
function
|
|
2507
|
+
function as() {
|
|
2439
2508
|
var e, n, l;
|
|
2440
|
-
return e = a, n =
|
|
2509
|
+
return e = a, n = Qt(), n !== t ? (l = Ft(), l !== t ? ($ = e, n = gi(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Ft()), e;
|
|
2441
2510
|
}
|
|
2442
|
-
function
|
|
2511
|
+
function cs() {
|
|
2443
2512
|
var e, n;
|
|
2444
|
-
return d++, e = a, n =
|
|
2513
|
+
return d++, e = a, n = nt(), n !== t && ($ = e, n = vi(n)), e = n, e === t && (e = a, n = ls(), n !== t && ($ = e, n = yi(n)), e = n), d--, e === t && (n = t, d === 0 && h(bi)), e;
|
|
2445
2514
|
}
|
|
2446
|
-
function
|
|
2447
|
-
var e, n, l,
|
|
2515
|
+
function it() {
|
|
2516
|
+
var e, n, l, p, f;
|
|
2448
2517
|
if (d++, e = a, n = [], l = y(), l !== t)
|
|
2449
2518
|
for (; l !== t; )
|
|
2450
2519
|
n.push(l), l = y();
|
|
2451
2520
|
else
|
|
2452
2521
|
n = t;
|
|
2453
2522
|
if (n !== t)
|
|
2454
|
-
if (i.substr(a, 2).toLowerCase() ===
|
|
2455
|
-
if (
|
|
2523
|
+
if (i.substr(a, 2).toLowerCase() === gr ? (l = i.substr(a, 2), a += 2) : (l = t, d === 0 && h(br)), l !== t) {
|
|
2524
|
+
if (p = [], f = y(), f !== t)
|
|
2456
2525
|
for (; f !== t; )
|
|
2457
|
-
|
|
2526
|
+
p.push(f), f = y();
|
|
2458
2527
|
else
|
|
2459
|
-
|
|
2460
|
-
|
|
2528
|
+
p = t;
|
|
2529
|
+
p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
|
|
2461
2530
|
} else
|
|
2462
2531
|
a = e, e = t;
|
|
2463
2532
|
else
|
|
2464
2533
|
a = e, e = t;
|
|
2465
|
-
return e === t && (e = a, $ = a, n =
|
|
2534
|
+
return e === t && (e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = ds(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h(mi)), e;
|
|
2466
2535
|
}
|
|
2467
|
-
function
|
|
2468
|
-
var e, n, l,
|
|
2536
|
+
function ot() {
|
|
2537
|
+
var e, n, l, p, f;
|
|
2469
2538
|
if (d++, e = a, n = [], l = y(), l !== t)
|
|
2470
2539
|
for (; l !== t; )
|
|
2471
2540
|
n.push(l), l = y();
|
|
2472
2541
|
else
|
|
2473
2542
|
n = t;
|
|
2474
2543
|
if (n !== t)
|
|
2475
|
-
if (i.substr(a, 3).toLowerCase() ===
|
|
2476
|
-
if (
|
|
2544
|
+
if (i.substr(a, 3).toLowerCase() === vr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h(yr)), l !== t) {
|
|
2545
|
+
if (p = [], f = y(), f !== t)
|
|
2477
2546
|
for (; f !== t; )
|
|
2478
|
-
|
|
2547
|
+
p.push(f), f = y();
|
|
2479
2548
|
else
|
|
2480
|
-
|
|
2481
|
-
|
|
2549
|
+
p = t;
|
|
2550
|
+
p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
|
|
2482
2551
|
} else
|
|
2483
2552
|
a = e, e = t;
|
|
2484
2553
|
else
|
|
2485
2554
|
a = e, e = t;
|
|
2486
|
-
return e === t && (e = a, $ = a, n =
|
|
2555
|
+
return e === t && (e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = fs(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h($i)), e;
|
|
2487
2556
|
}
|
|
2488
|
-
function
|
|
2489
|
-
var e, n, l,
|
|
2490
|
-
if (d++, e = a, i.substr(a, 3).toLowerCase() ===
|
|
2491
|
-
if (l = [],
|
|
2492
|
-
for (;
|
|
2493
|
-
l.push(
|
|
2557
|
+
function Qt() {
|
|
2558
|
+
var e, n, l, p;
|
|
2559
|
+
if (d++, e = a, i.substr(a, 3).toLowerCase() === mr ? (n = i.substr(a, 3), a += 3) : (n = t, d === 0 && h($r)), n !== t) {
|
|
2560
|
+
if (l = [], p = y(), p !== t)
|
|
2561
|
+
for (; p !== t; )
|
|
2562
|
+
l.push(p), p = y();
|
|
2494
2563
|
else
|
|
2495
2564
|
l = t;
|
|
2496
2565
|
l !== t ? (n = [n, l], e = n) : (a = e, e = t);
|
|
2497
2566
|
} else
|
|
2498
2567
|
a = e, e = t;
|
|
2499
|
-
return e === t && (e = a, $ = a, n =
|
|
2568
|
+
return e === t && (e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = hs(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h(_i)), e;
|
|
2500
2569
|
}
|
|
2501
|
-
function
|
|
2570
|
+
function Ht() {
|
|
2502
2571
|
var e;
|
|
2503
|
-
return d++, e =
|
|
2572
|
+
return d++, e = nt(), e === t && (e = ls()), d--, e === t && d === 0 && h(wi), e;
|
|
2504
2573
|
}
|
|
2505
|
-
function
|
|
2506
|
-
var e, n, l,
|
|
2507
|
-
if (e = a, i.charCodeAt(a) === 34 ? (n =
|
|
2508
|
-
for (l = [],
|
|
2509
|
-
l.push(
|
|
2574
|
+
function nt() {
|
|
2575
|
+
var e, n, l, p, f, m;
|
|
2576
|
+
if (e = a, i.charCodeAt(a) === 34 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t) {
|
|
2577
|
+
for (l = [], p = we(); p !== t; )
|
|
2578
|
+
l.push(p), p = we();
|
|
2510
2579
|
if (l !== t)
|
|
2511
|
-
if (
|
|
2512
|
-
for (f = [], m =
|
|
2513
|
-
f.push(m), m =
|
|
2514
|
-
f !== t ? (i.charCodeAt(a) === 34 ? (m =
|
|
2580
|
+
if (p = Re(), p !== t) {
|
|
2581
|
+
for (f = [], m = we(); m !== t; )
|
|
2582
|
+
f.push(m), m = we();
|
|
2583
|
+
f !== t ? (i.charCodeAt(a) === 34 ? (m = Ne, a++) : (m = t, d === 0 && h(De)), m !== t ? ($ = e, n = Nt(l, p, f), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2515
2584
|
} else
|
|
2516
2585
|
a = e, e = t;
|
|
2517
2586
|
else
|
|
@@ -2519,58 +2588,58 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2519
2588
|
} else
|
|
2520
2589
|
a = e, e = t;
|
|
2521
2590
|
if (e === t)
|
|
2522
|
-
if (e = a, i.charCodeAt(a) === 34 ? (n =
|
|
2523
|
-
for (l = [],
|
|
2524
|
-
l.push(
|
|
2525
|
-
l !== t ? (i.charCodeAt(a) === 34 ? (
|
|
2591
|
+
if (e = a, i.charCodeAt(a) === 34 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t) {
|
|
2592
|
+
for (l = [], p = we(); p !== t; )
|
|
2593
|
+
l.push(p), p = we();
|
|
2594
|
+
l !== t ? (i.charCodeAt(a) === 34 ? (p = Ne, a++) : (p = t, d === 0 && h(De)), p !== t ? ($ = e, n = xi(l), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2526
2595
|
} else
|
|
2527
2596
|
a = e, e = t;
|
|
2528
2597
|
return e;
|
|
2529
2598
|
}
|
|
2530
|
-
function
|
|
2599
|
+
function we() {
|
|
2531
2600
|
var e, n, l;
|
|
2532
|
-
return e =
|
|
2601
|
+
return e = qt(), e === t && (e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (Ai.test(i.charAt(a)) ? (l = i.charAt(a), a++) : (l = t, d === 0 && h(Si)), l !== t ? ($ = e, n = Ge(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = a, n = a, d++, l = Re(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (ki.test(i.charAt(a)) ? (l = i.charAt(a), a++) : (l = t, d === 0 && h(Ci)), l !== t ? ($ = e, n = Ge(l), e = n) : (a = e, e = t)) : (a = e, e = t))), e;
|
|
2533
2602
|
}
|
|
2534
|
-
function
|
|
2535
|
-
var e, n, l,
|
|
2536
|
-
for (e = a, n = [], l =
|
|
2537
|
-
n.push(l), l =
|
|
2603
|
+
function ls() {
|
|
2604
|
+
var e, n, l, p, f;
|
|
2605
|
+
for (e = a, n = [], l = xe(); l !== t; )
|
|
2606
|
+
n.push(l), l = xe();
|
|
2538
2607
|
if (n !== t)
|
|
2539
|
-
if (l =
|
|
2540
|
-
for (
|
|
2541
|
-
|
|
2542
|
-
|
|
2608
|
+
if (l = Re(), l !== t) {
|
|
2609
|
+
for (p = [], f = xe(); f !== t; )
|
|
2610
|
+
p.push(f), f = xe();
|
|
2611
|
+
p !== t ? ($ = e, n = Nt(n, l, p), e = n) : (a = e, e = t);
|
|
2543
2612
|
} else
|
|
2544
2613
|
a = e, e = t;
|
|
2545
2614
|
else
|
|
2546
2615
|
a = e, e = t;
|
|
2547
2616
|
if (e === t) {
|
|
2548
|
-
if (e = a, n = [], l =
|
|
2617
|
+
if (e = a, n = [], l = xe(), l !== t)
|
|
2549
2618
|
for (; l !== t; )
|
|
2550
|
-
n.push(l), l =
|
|
2619
|
+
n.push(l), l = xe();
|
|
2551
2620
|
else
|
|
2552
2621
|
n = t;
|
|
2553
|
-
n !== t && ($ = e, n =
|
|
2622
|
+
n !== t && ($ = e, n = Ei(n)), e = n;
|
|
2554
2623
|
}
|
|
2555
2624
|
return e;
|
|
2556
2625
|
}
|
|
2557
|
-
function
|
|
2558
|
-
var e, n, l,
|
|
2559
|
-
return e =
|
|
2626
|
+
function xe() {
|
|
2627
|
+
var e, n, l, p, f;
|
|
2628
|
+
return e = qt(), e === t && (e = $o(), e === t && (e = _o(), e === t && (e = mo(), e === t && (e = a, n = a, d++, l = ps(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (l = a, d++, p = wo(), d--, p === t ? l = void 0 : (a = l, l = t), l !== t ? (p = a, d++, f = Re(), d--, f === t ? p = void 0 : (a = p, p = t), p !== t ? (i.length > a ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_r)), f !== t ? ($ = e, n = Ge(f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t))))), e;
|
|
2560
2629
|
}
|
|
2561
|
-
function
|
|
2630
|
+
function mo() {
|
|
2562
2631
|
var e, n;
|
|
2563
|
-
return e = a, i.charCodeAt(a) === 42 ? (n =
|
|
2632
|
+
return e = a, i.charCodeAt(a) === 42 ? (n = Je, a++) : (n = t, d === 0 && h(Ve)), n !== t && ($ = e, n = Oi()), e = n, e;
|
|
2564
2633
|
}
|
|
2565
|
-
function
|
|
2566
|
-
var e, n, l,
|
|
2634
|
+
function at() {
|
|
2635
|
+
var e, n, l, p, f;
|
|
2567
2636
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2568
2637
|
n.push(l), l = y();
|
|
2569
2638
|
if (n !== t)
|
|
2570
|
-
if (l =
|
|
2571
|
-
for (
|
|
2572
|
-
|
|
2573
|
-
|
|
2639
|
+
if (l = Re(), l !== t) {
|
|
2640
|
+
for (p = [], f = y(); f !== t; )
|
|
2641
|
+
p.push(f), f = y();
|
|
2642
|
+
p !== t ? ($ = e, n = Nt(n, l, p), e = n) : (a = e, e = t);
|
|
2574
2643
|
} else
|
|
2575
2644
|
a = e, e = t;
|
|
2576
2645
|
else
|
|
@@ -2580,86 +2649,86 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2580
2649
|
e.push(n), n = y();
|
|
2581
2650
|
return e;
|
|
2582
2651
|
}
|
|
2583
|
-
function
|
|
2652
|
+
function qt() {
|
|
2584
2653
|
var e, n;
|
|
2585
|
-
return e = a, i.substr(a, 2) ===
|
|
2654
|
+
return e = a, i.substr(a, 2) === wr ? (n = wr, a += 2) : (n = t, d === 0 && h(Pi)), n !== t && ($ = e, n = Ti()), e = n, e === t && (e = a, i.substr(a, 2) === xr ? (n = xr, a += 2) : (n = t, d === 0 && h(Li)), n !== t && ($ = e, n = Ni()), e = n, e === t && (e = a, i.substr(a, 2) === Ar ? (n = Ar, a += 2) : (n = t, d === 0 && h(Di)), n !== t && ($ = e, n = ji()), e = n)), e;
|
|
2586
2655
|
}
|
|
2587
|
-
function
|
|
2656
|
+
function $o() {
|
|
2588
2657
|
var e, n, l;
|
|
2589
|
-
return e = a, i.charCodeAt(a) === 92 ? (n =
|
|
2658
|
+
return e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (l = ps(), l !== t ? ($ = e, n = Ge(l), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2590
2659
|
}
|
|
2591
|
-
function
|
|
2660
|
+
function _o() {
|
|
2592
2661
|
var e, n, l;
|
|
2593
|
-
return e = a, i.charCodeAt(a) === 92 ? (n =
|
|
2662
|
+
return e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (i.substr(a, 2).toLowerCase() === gr ? (l = i.substr(a, 2), a += 2) : (l = t, d === 0 && h(br)), l === t && (i.substr(a, 3).toLowerCase() === vr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h(yr)), l === t && (i.substr(a, 3).toLowerCase() === mr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h($r)))), l !== t ? ($ = e, n = zi(l), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2594
2663
|
}
|
|
2595
|
-
function
|
|
2664
|
+
function wo() {
|
|
2596
2665
|
var e;
|
|
2597
|
-
return e =
|
|
2666
|
+
return e = it(), e === t && (e = ot(), e === t && (e = Qt())), e;
|
|
2598
2667
|
}
|
|
2599
|
-
function
|
|
2668
|
+
function ps() {
|
|
2600
2669
|
var e;
|
|
2601
|
-
return
|
|
2670
|
+
return Ri.test(i.charAt(a)) ? (e = i.charAt(a), a++) : (e = t, d === 0 && h(Bi)), e;
|
|
2602
2671
|
}
|
|
2603
|
-
function
|
|
2672
|
+
function us() {
|
|
2604
2673
|
var e, n;
|
|
2605
|
-
return e = a, i.substr(a, 2) ===
|
|
2674
|
+
return e = a, i.substr(a, 2) === Sr ? (n = Sr, a += 2) : (n = t, d === 0 && h(Ui)), n !== t && ($ = e, n = Mi()), e = n, e === t && (e = a, i.substr(a, 2) === kr ? (n = kr, a += 2) : (n = t, d === 0 && h(Fi)), n !== t && ($ = e, n = Ii()), e = n, e === t && (e = a, i.charCodeAt(a) === 60 ? (n = Cr, a++) : (n = t, d === 0 && h(Er)), n !== t && ($ = e, n = Qi()), e = n, e === t && (e = a, i.charCodeAt(a) === 62 ? (n = Or, a++) : (n = t, d === 0 && h(Pr)), n !== t && ($ = e, n = Hi()), e = n))), e;
|
|
2606
2675
|
}
|
|
2607
2676
|
function y() {
|
|
2608
2677
|
var e;
|
|
2609
|
-
return d++,
|
|
2678
|
+
return d++, Wi.test(i.charAt(a)) ? (e = i.charAt(a), a++) : (e = t, d === 0 && h(Yi)), d--, e === t && d === 0 && h(qi), e;
|
|
2610
2679
|
}
|
|
2611
|
-
function
|
|
2680
|
+
function Re() {
|
|
2612
2681
|
var e, n, l;
|
|
2613
|
-
return e = a, $ = a, n =
|
|
2682
|
+
return e = a, $ = a, n = Ki(), n ? n = void 0 : n = t, n !== t ? (i.substr(a, 14) === Tr ? (l = Tr, a += 14) : (l = t, d === 0 && h(Zi)), l !== t ? ($ = e, n = Xi(), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2614
2683
|
}
|
|
2615
|
-
function
|
|
2616
|
-
var e, n, l,
|
|
2684
|
+
function ds() {
|
|
2685
|
+
var e, n, l, p, f;
|
|
2617
2686
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2618
2687
|
n.push(l), l = y();
|
|
2619
2688
|
if (n !== t)
|
|
2620
|
-
if (i.substr(a, 2) ===
|
|
2621
|
-
for (
|
|
2622
|
-
|
|
2623
|
-
|
|
2689
|
+
if (i.substr(a, 2) === Lr ? (l = Lr, a += 2) : (l = t, d === 0 && h(Gi)), l !== t) {
|
|
2690
|
+
for (p = [], f = y(); f !== t; )
|
|
2691
|
+
p.push(f), f = y();
|
|
2692
|
+
p !== t ? ($ = e, n = Ji(), e = n) : (a = e, e = t);
|
|
2624
2693
|
} else
|
|
2625
2694
|
a = e, e = t;
|
|
2626
2695
|
else
|
|
2627
2696
|
a = e, e = t;
|
|
2628
2697
|
return e;
|
|
2629
2698
|
}
|
|
2630
|
-
function
|
|
2631
|
-
var e, n, l,
|
|
2699
|
+
function fs() {
|
|
2700
|
+
var e, n, l, p, f;
|
|
2632
2701
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2633
2702
|
n.push(l), l = y();
|
|
2634
2703
|
if (n !== t)
|
|
2635
|
-
if (i.substr(a, 2) ===
|
|
2636
|
-
for (
|
|
2637
|
-
|
|
2638
|
-
|
|
2704
|
+
if (i.substr(a, 2) === Nr ? (l = Nr, a += 2) : (l = t, d === 0 && h(Vi)), l !== t) {
|
|
2705
|
+
for (p = [], f = y(); f !== t; )
|
|
2706
|
+
p.push(f), f = y();
|
|
2707
|
+
p !== t ? ($ = e, n = Dr(), e = n) : (a = e, e = t);
|
|
2639
2708
|
} else
|
|
2640
2709
|
a = e, e = t;
|
|
2641
2710
|
else
|
|
2642
2711
|
a = e, e = t;
|
|
2643
|
-
return e === t && (e = a, i.charCodeAt(a) === 43 ? (n =
|
|
2712
|
+
return e === t && (e = a, i.charCodeAt(a) === 43 ? (n = jr, a++) : (n = t, d === 0 && h(zr)), n !== t && ($ = e, n = Dr()), e = n), e;
|
|
2644
2713
|
}
|
|
2645
|
-
function
|
|
2714
|
+
function hs() {
|
|
2646
2715
|
var e, n;
|
|
2647
|
-
return e = a, i.charCodeAt(a) === 45 ? (n =
|
|
2716
|
+
return e = a, i.charCodeAt(a) === 45 ? (n = Rr, a++) : (n = t, d === 0 && h(Br)), n !== t && ($ = e, n = Ur()), e = n, e === t && (e = a, i.charCodeAt(a) === 33 ? (n = Mr, a++) : (n = t, d === 0 && h(Fr)), n !== t && ($ = e, n = Ur()), e = n), e;
|
|
2648
2717
|
}
|
|
2649
|
-
function
|
|
2718
|
+
function xo() {
|
|
2650
2719
|
var e;
|
|
2651
|
-
return e =
|
|
2720
|
+
return e = Ao(), e === t && (e = gs(), e === t && (e = So())), e;
|
|
2652
2721
|
}
|
|
2653
|
-
function
|
|
2654
|
-
var e, n, l,
|
|
2655
|
-
if (e = a, n =
|
|
2656
|
-
for (l = [],
|
|
2657
|
-
l.push(
|
|
2722
|
+
function Ao() {
|
|
2723
|
+
var e, n, l, p, f, m;
|
|
2724
|
+
if (e = a, n = Ae(), n !== t) {
|
|
2725
|
+
for (l = [], p = y(); p !== t; )
|
|
2726
|
+
l.push(p), p = y();
|
|
2658
2727
|
if (l !== t)
|
|
2659
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2728
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2660
2729
|
for (f = [], m = y(); m !== t; )
|
|
2661
2730
|
f.push(m), m = y();
|
|
2662
|
-
f !== t ? (m =
|
|
2731
|
+
f !== t ? (m = gs(), m !== t ? (n = [n, l, p, f, m], e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2663
2732
|
} else
|
|
2664
2733
|
a = e, e = t;
|
|
2665
2734
|
else
|
|
@@ -2668,20 +2737,20 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2668
2737
|
a = e, e = t;
|
|
2669
2738
|
return e;
|
|
2670
2739
|
}
|
|
2671
|
-
function
|
|
2740
|
+
function gs() {
|
|
2672
2741
|
var e;
|
|
2673
|
-
return e =
|
|
2742
|
+
return e = ko(), e === t && (e = Wt(), e === t && (e = Co(), e === t && (e = Eo(), e === t && (e = Oo(), e === t && (e = Po()))))), e;
|
|
2674
2743
|
}
|
|
2675
|
-
function
|
|
2676
|
-
var e, n, l,
|
|
2677
|
-
if (e = a, i.substr(a, 8) ===
|
|
2678
|
-
for (l = [],
|
|
2679
|
-
l.push(
|
|
2744
|
+
function So() {
|
|
2745
|
+
var e, n, l, p, f, m;
|
|
2746
|
+
if (e = a, i.substr(a, 8) === Ir ? (n = Ir, a += 8) : (n = t, d === 0 && h(eo)), n !== t) {
|
|
2747
|
+
for (l = [], p = y(); p !== t; )
|
|
2748
|
+
l.push(p), p = y();
|
|
2680
2749
|
if (l !== t)
|
|
2681
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2750
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2682
2751
|
for (f = [], m = y(); m !== t; )
|
|
2683
2752
|
f.push(m), m = y();
|
|
2684
|
-
f !== t ? (m =
|
|
2753
|
+
f !== t ? (m = Ae(), m !== t ? ($ = e, n = to(), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2685
2754
|
} else
|
|
2686
2755
|
a = e, e = t;
|
|
2687
2756
|
else
|
|
@@ -2690,296 +2759,296 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2690
2759
|
a = e, e = t;
|
|
2691
2760
|
return e;
|
|
2692
2761
|
}
|
|
2693
|
-
function
|
|
2694
|
-
var e, n, l,
|
|
2695
|
-
if (e = a, n =
|
|
2696
|
-
for (l = [],
|
|
2697
|
-
l.push(
|
|
2698
|
-
l !== t ? (
|
|
2762
|
+
function ko() {
|
|
2763
|
+
var e, n, l, p, f, m, T;
|
|
2764
|
+
if (e = a, n = us(), n !== t) {
|
|
2765
|
+
for (l = [], p = y(); p !== t; )
|
|
2766
|
+
l.push(p), p = y();
|
|
2767
|
+
l !== t ? (p = Ae(), p !== t ? ($ = e, n = Qr(), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2699
2768
|
} else
|
|
2700
2769
|
a = e, e = t;
|
|
2701
2770
|
if (e === t)
|
|
2702
|
-
if (e = a, n =
|
|
2703
|
-
for (l = [],
|
|
2704
|
-
l.push(
|
|
2705
|
-
l !== t ? (
|
|
2771
|
+
if (e = a, n = No(), n !== t) {
|
|
2772
|
+
for (l = [], p = y(); p !== t; )
|
|
2773
|
+
l.push(p), p = y();
|
|
2774
|
+
l !== t ? (p = Ae(), p !== t ? (f = ys(), f !== t ? (m = Ae(), m !== t ? (T = Do(), T !== t ? ($ = e, n = Qr(), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2706
2775
|
} else
|
|
2707
2776
|
a = e, e = t;
|
|
2708
2777
|
return e;
|
|
2709
2778
|
}
|
|
2710
|
-
function
|
|
2711
|
-
var e, n, l,
|
|
2712
|
-
for (e = a, n = [], l =
|
|
2713
|
-
n.push(l), l =
|
|
2779
|
+
function Wt() {
|
|
2780
|
+
var e, n, l, p, f;
|
|
2781
|
+
for (e = a, n = [], l = ct(), l === t && (i.charCodeAt(a) === 42 ? (l = Je, a++) : (l = t, d === 0 && h(Ve))); l !== t; )
|
|
2782
|
+
n.push(l), l = ct(), l === t && (i.charCodeAt(a) === 42 ? (l = Je, a++) : (l = t, d === 0 && h(Ve)));
|
|
2714
2783
|
if (n !== t)
|
|
2715
|
-
if (i.charCodeAt(a) === 63 ? (l =
|
|
2716
|
-
for (
|
|
2717
|
-
|
|
2718
|
-
|
|
2784
|
+
if (i.charCodeAt(a) === 63 ? (l = Hr, a++) : (l = t, d === 0 && h(qr)), l !== t) {
|
|
2785
|
+
for (p = [], f = Wt(); f !== t; )
|
|
2786
|
+
p.push(f), f = Wt();
|
|
2787
|
+
p !== t ? ($ = e, n = ro(), e = n) : (a = e, e = t);
|
|
2719
2788
|
} else
|
|
2720
2789
|
a = e, e = t;
|
|
2721
2790
|
else
|
|
2722
2791
|
a = e, e = t;
|
|
2723
2792
|
return e;
|
|
2724
2793
|
}
|
|
2725
|
-
function
|
|
2726
|
-
var e, n, l,
|
|
2727
|
-
if (e = a, i.charCodeAt(a) === 47 ? (n =
|
|
2728
|
-
for (l = [],
|
|
2729
|
-
l.push(
|
|
2730
|
-
l !== t ? (i.charCodeAt(a) === 47 ? (
|
|
2794
|
+
function Co() {
|
|
2795
|
+
var e, n, l, p;
|
|
2796
|
+
if (e = a, i.charCodeAt(a) === 47 ? (n = Dt, a++) : (n = t, d === 0 && h(jt)), n !== t) {
|
|
2797
|
+
for (l = [], Wr.test(i.charAt(a)) ? (p = i.charAt(a), a++) : (p = t, d === 0 && h(Yr)); p !== t; )
|
|
2798
|
+
l.push(p), Wr.test(i.charAt(a)) ? (p = i.charAt(a), a++) : (p = t, d === 0 && h(Yr));
|
|
2799
|
+
l !== t ? (i.charCodeAt(a) === 47 ? (p = Dt, a++) : (p = t, d === 0 && h(jt)), p !== t ? ($ = e, n = so(), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2731
2800
|
} else
|
|
2732
2801
|
a = e, e = t;
|
|
2733
2802
|
return e;
|
|
2734
2803
|
}
|
|
2735
|
-
function
|
|
2736
|
-
var e, n, l,
|
|
2737
|
-
if (e = a, n =
|
|
2738
|
-
if (i.charCodeAt(a) === 126 ? (l =
|
|
2739
|
-
for (
|
|
2740
|
-
|
|
2741
|
-
|
|
2804
|
+
function Eo() {
|
|
2805
|
+
var e, n, l, p, f;
|
|
2806
|
+
if (e = a, n = bs(), n !== t)
|
|
2807
|
+
if (i.charCodeAt(a) === 126 ? (l = zt, a++) : (l = t, d === 0 && h(Rt)), l !== t) {
|
|
2808
|
+
for (p = [], $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e)); f !== t; )
|
|
2809
|
+
p.push(f), $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e));
|
|
2810
|
+
p !== t ? ($ = e, n = io(), e = n) : (a = e, e = t);
|
|
2742
2811
|
} else
|
|
2743
2812
|
a = e, e = t;
|
|
2744
2813
|
else
|
|
2745
2814
|
a = e, e = t;
|
|
2746
2815
|
return e;
|
|
2747
2816
|
}
|
|
2748
|
-
function
|
|
2749
|
-
var e, n, l,
|
|
2750
|
-
if (e = a, n =
|
|
2751
|
-
if (i.charCodeAt(a) === 126 ? (l =
|
|
2752
|
-
for (
|
|
2753
|
-
|
|
2754
|
-
|
|
2817
|
+
function Oo() {
|
|
2818
|
+
var e, n, l, p, f;
|
|
2819
|
+
if (e = a, n = nt(), n !== t)
|
|
2820
|
+
if (i.charCodeAt(a) === 126 ? (l = zt, a++) : (l = t, d === 0 && h(Rt)), l !== t) {
|
|
2821
|
+
for (p = [], $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e)); f !== t; )
|
|
2822
|
+
p.push(f), $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e));
|
|
2823
|
+
p !== t ? ($ = e, n = oo(), e = n) : (a = e, e = t);
|
|
2755
2824
|
} else
|
|
2756
2825
|
a = e, e = t;
|
|
2757
2826
|
else
|
|
2758
2827
|
a = e, e = t;
|
|
2759
2828
|
return e;
|
|
2760
2829
|
}
|
|
2761
|
-
function
|
|
2762
|
-
var e, n, l,
|
|
2763
|
-
if (e = a, n =
|
|
2764
|
-
if (i.charCodeAt(a) === 94 ? (l =
|
|
2765
|
-
for (
|
|
2766
|
-
|
|
2767
|
-
|
|
2830
|
+
function Po() {
|
|
2831
|
+
var e, n, l, p, f;
|
|
2832
|
+
if (e = a, n = Ae(), n !== t)
|
|
2833
|
+
if (i.charCodeAt(a) === 94 ? (l = Kr, a++) : (l = t, d === 0 && h(Zr)), l !== t) {
|
|
2834
|
+
for (p = [], $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e)); f !== t; )
|
|
2835
|
+
p.push(f), $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e));
|
|
2836
|
+
p !== t ? ($ = e, n = no(), e = n) : (a = e, e = t);
|
|
2768
2837
|
} else
|
|
2769
2838
|
a = e, e = t;
|
|
2770
2839
|
else
|
|
2771
2840
|
a = e, e = t;
|
|
2772
2841
|
return e;
|
|
2773
2842
|
}
|
|
2774
|
-
function
|
|
2843
|
+
function Ae() {
|
|
2775
2844
|
var e;
|
|
2776
|
-
return e =
|
|
2845
|
+
return e = nt(), e === t && (e = bs()), e;
|
|
2777
2846
|
}
|
|
2778
|
-
function
|
|
2847
|
+
function bs() {
|
|
2779
2848
|
var e, n;
|
|
2780
|
-
if (e = [], n =
|
|
2849
|
+
if (e = [], n = ct(), n !== t)
|
|
2781
2850
|
for (; n !== t; )
|
|
2782
|
-
e.push(n), n =
|
|
2851
|
+
e.push(n), n = ct();
|
|
2783
2852
|
else
|
|
2784
2853
|
e = t;
|
|
2785
2854
|
return e;
|
|
2786
2855
|
}
|
|
2787
|
-
function
|
|
2788
|
-
var e, n, l,
|
|
2789
|
-
return e =
|
|
2856
|
+
function ct() {
|
|
2857
|
+
var e, n, l, p;
|
|
2858
|
+
return e = qt(), e === t && (e = Lo(), e === t && (e = a, n = a, d++, l = vs(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (l = a, d++, p = To(), d--, p === t ? l = void 0 : (a = l, l = t), l !== t ? (i.length > a ? (p = i.charAt(a), a++) : (p = t, d === 0 && h(_r)), p !== t ? (n = [n, l, p], e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t))), e;
|
|
2790
2859
|
}
|
|
2791
|
-
function
|
|
2860
|
+
function To() {
|
|
2792
2861
|
var e;
|
|
2793
|
-
return e =
|
|
2862
|
+
return e = it(), e === t && (e = ot(), e === t && (e = ds(), e === t && (e = fs(), e === t && (e = hs(), e === t && (e = ys()))))), e;
|
|
2794
2863
|
}
|
|
2795
|
-
function
|
|
2864
|
+
function Lo() {
|
|
2796
2865
|
var e, n, l;
|
|
2797
|
-
return e = a, i.charCodeAt(a) === 92 ? (n =
|
|
2866
|
+
return e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (l = vs(), l !== t ? ($ = e, n = ao(), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2798
2867
|
}
|
|
2799
|
-
function
|
|
2868
|
+
function vs() {
|
|
2800
2869
|
var e;
|
|
2801
|
-
return i.charCodeAt(a) === 43 ? (e =
|
|
2870
|
+
return i.charCodeAt(a) === 43 ? (e = jr, a++) : (e = t, d === 0 && h(zr)), e === t && (i.charCodeAt(a) === 45 ? (e = Rr, a++) : (e = t, d === 0 && h(Br)), e === t && (i.charCodeAt(a) === 61 ? (e = co, a++) : (e = t, d === 0 && h(lo)), e === t && (i.charCodeAt(a) === 62 ? (e = Or, a++) : (e = t, d === 0 && h(Pr)), e === t && (i.charCodeAt(a) === 60 ? (e = Cr, a++) : (e = t, d === 0 && h(Er)), e === t && (i.charCodeAt(a) === 33 ? (e = Mr, a++) : (e = t, d === 0 && h(Fr)), e === t && (i.charCodeAt(a) === 40 ? (e = k, a++) : (e = t, d === 0 && h(z)), e === t && (i.charCodeAt(a) === 41 ? (e = Xe, a++) : (e = t, d === 0 && h(te)), e === t && (i.charCodeAt(a) === 123 ? (e = me, a++) : (e = t, d === 0 && h(Pt)), e === t && (i.charCodeAt(a) === 125 ? (e = Tt, a++) : (e = t, d === 0 && h(Lt)), e === t && (i.charCodeAt(a) === 91 ? (e = Xr, a++) : (e = t, d === 0 && h(Gr)), e === t && (i.charCodeAt(a) === 93 ? (e = Jr, a++) : (e = t, d === 0 && h(Vr)), e === t && (i.charCodeAt(a) === 94 ? (e = Kr, a++) : (e = t, d === 0 && h(Zr)), e === t && (i.charCodeAt(a) === 34 ? (e = Ne, a++) : (e = t, d === 0 && h(De)), e === t && (i.charCodeAt(a) === 126 ? (e = zt, a++) : (e = t, d === 0 && h(Rt)), e === t && (i.charCodeAt(a) === 42 ? (e = Je, a++) : (e = t, d === 0 && h(Ve)), e === t && (i.charCodeAt(a) === 63 ? (e = Hr, a++) : (e = t, d === 0 && h(qr)), e === t && (i.charCodeAt(a) === 58 ? (e = q, a++) : (e = t, d === 0 && h(R)), e === t && (i.charCodeAt(a) === 92 ? (e = je, a++) : (e = t, d === 0 && h(ze)), e === t && (i.charCodeAt(a) === 47 ? (e = Dt, a++) : (e = t, d === 0 && h(jt))))))))))))))))))))), e;
|
|
2802
2871
|
}
|
|
2803
|
-
function
|
|
2804
|
-
var e, n, l,
|
|
2872
|
+
function ys() {
|
|
2873
|
+
var e, n, l, p, f;
|
|
2805
2874
|
if (e = a, n = [], l = y(), l !== t)
|
|
2806
2875
|
for (; l !== t; )
|
|
2807
2876
|
n.push(l), l = y();
|
|
2808
2877
|
else
|
|
2809
2878
|
n = t;
|
|
2810
2879
|
if (n !== t)
|
|
2811
|
-
if (i.substr(a, 2) ===
|
|
2812
|
-
if (
|
|
2880
|
+
if (i.substr(a, 2) === es ? (l = es, a += 2) : (l = t, d === 0 && h(po)), l !== t) {
|
|
2881
|
+
if (p = [], f = y(), f !== t)
|
|
2813
2882
|
for (; f !== t; )
|
|
2814
|
-
|
|
2883
|
+
p.push(f), f = y();
|
|
2815
2884
|
else
|
|
2816
|
-
|
|
2817
|
-
|
|
2885
|
+
p = t;
|
|
2886
|
+
p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
|
|
2818
2887
|
} else
|
|
2819
2888
|
a = e, e = t;
|
|
2820
2889
|
else
|
|
2821
2890
|
a = e, e = t;
|
|
2822
2891
|
return e;
|
|
2823
2892
|
}
|
|
2824
|
-
function
|
|
2893
|
+
function No() {
|
|
2825
2894
|
var e;
|
|
2826
|
-
return i.charCodeAt(a) === 91 ? (e =
|
|
2895
|
+
return i.charCodeAt(a) === 91 ? (e = Xr, a++) : (e = t, d === 0 && h(Gr)), e === t && (i.charCodeAt(a) === 123 ? (e = me, a++) : (e = t, d === 0 && h(Pt))), e;
|
|
2827
2896
|
}
|
|
2828
|
-
function
|
|
2897
|
+
function Do() {
|
|
2829
2898
|
var e;
|
|
2830
|
-
return i.charCodeAt(a) === 93 ? (e =
|
|
2899
|
+
return i.charCodeAt(a) === 93 ? (e = Jr, a++) : (e = t, d === 0 && h(Vr)), e === t && (i.charCodeAt(a) === 125 ? (e = Tt, a++) : (e = t, d === 0 && h(Lt))), e;
|
|
2831
2900
|
}
|
|
2832
|
-
const { errorOnLuceneSyntax:
|
|
2833
|
-
if (
|
|
2834
|
-
return
|
|
2835
|
-
throw
|
|
2901
|
+
const { errorOnLuceneSyntax: jo, parseCursor: zo, cursorSymbol: Ro, allowLeadingWildcards: Bo = !0, helpers: { nodeTypes: pe } } = c, Y = pe.function.buildNodeWithArgumentNodes, re = pe.literal.buildNode, Uo = pe.wildcard.buildNode, Mo = pe.namedArg.buildNode, { wildcardSymbol: ms } = pe.wildcard;
|
|
2902
|
+
if (tt = g(), tt !== t && a === i.length)
|
|
2903
|
+
return tt;
|
|
2904
|
+
throw tt !== t && a < i.length && h({ type: "end", description: "end of input" }), rs(
|
|
2836
2905
|
null,
|
|
2837
|
-
|
|
2906
|
+
Bt,
|
|
2838
2907
|
W < i.length ? i.charAt(W) : null,
|
|
2839
|
-
W < i.length ?
|
|
2908
|
+
W < i.length ? rt(W, W + 1) : rt(W, W)
|
|
2840
2909
|
);
|
|
2841
2910
|
}
|
|
2842
2911
|
return {
|
|
2843
2912
|
SyntaxError: r,
|
|
2844
2913
|
parse: o
|
|
2845
2914
|
};
|
|
2846
|
-
}(),
|
|
2915
|
+
}(), lr = (s, r = {}, o = Et) => {
|
|
2847
2916
|
if (typeof s > "u")
|
|
2848
2917
|
throw new Error("expression must be a string, got undefined instead");
|
|
2849
2918
|
return o(s, { ...r, helpers: { nodeTypes: ne } });
|
|
2850
|
-
},
|
|
2919
|
+
}, Pe = (s, r = {}) => lr(
|
|
2851
2920
|
s,
|
|
2852
2921
|
{
|
|
2853
2922
|
...r,
|
|
2854
2923
|
startRule: "Literal"
|
|
2855
2924
|
},
|
|
2856
|
-
|
|
2857
|
-
),
|
|
2925
|
+
Et
|
|
2926
|
+
), $t = (s, r = {}) => {
|
|
2858
2927
|
try {
|
|
2859
|
-
return
|
|
2928
|
+
return lr(s, r, Et);
|
|
2860
2929
|
} catch (o) {
|
|
2861
|
-
throw o.name === "SyntaxError" ? new
|
|
2930
|
+
throw o.name === "SyntaxError" ? new Js(o, s) : o;
|
|
2862
2931
|
}
|
|
2863
|
-
},
|
|
2932
|
+
}, Fn = (s) => {
|
|
2864
2933
|
try {
|
|
2865
|
-
return
|
|
2934
|
+
return lr(s, { errorOnLuceneSyntax: !0 }, Et), !1;
|
|
2866
2935
|
} catch (r) {
|
|
2867
2936
|
return r.message.startsWith("Lucene");
|
|
2868
2937
|
}
|
|
2869
|
-
},
|
|
2870
|
-
function
|
|
2938
|
+
}, D = (s, r, o, i) => (r = void 0, !s || !s.type || !ne[s.type] ? D(ne.function.buildNode("and", []), r) : ne[s.type].toOpenSearchQuery(s, r, o, i)), ee = "@kuery-wildcard@";
|
|
2939
|
+
function In(s) {
|
|
2871
2940
|
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2872
2941
|
}
|
|
2873
|
-
function
|
|
2942
|
+
function Qn(s) {
|
|
2874
2943
|
return s.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g, "\\$&");
|
|
2875
2944
|
}
|
|
2876
|
-
function
|
|
2945
|
+
function Hn(s) {
|
|
2877
2946
|
return s.includes(ee) ? {
|
|
2878
2947
|
type: "wildcard",
|
|
2879
2948
|
value: s
|
|
2880
|
-
} :
|
|
2949
|
+
} : Pe(s);
|
|
2881
2950
|
}
|
|
2882
|
-
function
|
|
2883
|
-
const { value: o } = s, i = o.split(ee).map(
|
|
2951
|
+
function Vs(s, r) {
|
|
2952
|
+
const { value: o } = s, i = o.split(ee).map(In).join("[\\s\\S]*");
|
|
2884
2953
|
return new RegExp(`^${i}$`).test(r);
|
|
2885
2954
|
}
|
|
2886
|
-
function
|
|
2955
|
+
function qn(s) {
|
|
2887
2956
|
const { value: r } = s;
|
|
2888
2957
|
return r.split(ee).join("*");
|
|
2889
2958
|
}
|
|
2890
|
-
function
|
|
2959
|
+
function er(s) {
|
|
2891
2960
|
const { value: r } = s;
|
|
2892
|
-
return r.split(ee).map(
|
|
2961
|
+
return r.split(ee).map(Qn).join("*");
|
|
2893
2962
|
}
|
|
2894
|
-
function
|
|
2963
|
+
function Wn(s) {
|
|
2895
2964
|
const { value: r } = s;
|
|
2896
2965
|
return r.startsWith(ee) && r.replace(ee, "").length > 0;
|
|
2897
2966
|
}
|
|
2898
|
-
const
|
|
2967
|
+
const Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2899
2968
|
__proto__: null,
|
|
2900
|
-
buildNode:
|
|
2901
|
-
hasLeadingWildcard:
|
|
2902
|
-
test:
|
|
2903
|
-
toOpenSearchQuery:
|
|
2904
|
-
toQueryStringQuery:
|
|
2969
|
+
buildNode: Hn,
|
|
2970
|
+
hasLeadingWildcard: Wn,
|
|
2971
|
+
test: Vs,
|
|
2972
|
+
toOpenSearchQuery: qn,
|
|
2973
|
+
toQueryStringQuery: er,
|
|
2905
2974
|
wildcardSymbol: ee
|
|
2906
2975
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2907
|
-
function
|
|
2976
|
+
function pr(s, r) {
|
|
2908
2977
|
if (!r) return [];
|
|
2909
2978
|
if (s.type === "literal") {
|
|
2910
|
-
const o =
|
|
2979
|
+
const o = cr(s), i = r.fields.find((c) => c.name === o);
|
|
2911
2980
|
return i ? [i] : [];
|
|
2912
2981
|
} else if (s.type === "wildcard")
|
|
2913
|
-
return r.fields.filter((i) =>
|
|
2982
|
+
return r.fields.filter((i) => Vs(s, i.name));
|
|
2914
2983
|
}
|
|
2915
|
-
function
|
|
2984
|
+
function ei(s, r, o) {
|
|
2916
2985
|
const i = {
|
|
2917
2986
|
...s,
|
|
2918
2987
|
value: o ? `${o}.${s.value}` : s.value
|
|
2919
2988
|
};
|
|
2920
2989
|
if (!r || i.type === "wildcard" && !o)
|
|
2921
2990
|
return i;
|
|
2922
|
-
const t =
|
|
2923
|
-
const
|
|
2924
|
-
return o && !
|
|
2925
|
-
...
|
|
2926
|
-
`${
|
|
2927
|
-
] :
|
|
2928
|
-
...
|
|
2929
|
-
`${
|
|
2930
|
-
] :
|
|
2931
|
-
...
|
|
2932
|
-
`Nested field ${
|
|
2933
|
-
] :
|
|
2991
|
+
const t = pr(i, r).reduce((u, g) => {
|
|
2992
|
+
const b = g.subType && g.subType.nested ? g.subType.nested.path : void 0;
|
|
2993
|
+
return o && !b ? [
|
|
2994
|
+
...u,
|
|
2995
|
+
`${g.name} is not a nested field but is in nested group "${o}" in the DQL expression.`
|
|
2996
|
+
] : b && !o ? [
|
|
2997
|
+
...u,
|
|
2998
|
+
`${g.name} is a nested field, but is not in a nested group in the DQL expression.`
|
|
2999
|
+
] : b !== o ? [
|
|
3000
|
+
...u,
|
|
3001
|
+
`Nested field ${g.name} is being queried with the incorrect nested path. The correct path is ${g.subType.nested.path}.`
|
|
3002
|
+
] : u;
|
|
2934
3003
|
}, []);
|
|
2935
3004
|
if (t.length > 0)
|
|
2936
3005
|
throw new Error(t.join(`
|
|
2937
3006
|
`));
|
|
2938
3007
|
return i;
|
|
2939
3008
|
}
|
|
2940
|
-
function
|
|
3009
|
+
function Kn(s, r, o = !1) {
|
|
2941
3010
|
if (s === void 0)
|
|
2942
3011
|
throw new Error("fieldName is a required argument");
|
|
2943
3012
|
if (r === void 0)
|
|
2944
3013
|
throw new Error("value is a required argument");
|
|
2945
|
-
const i = typeof s == "string" ?
|
|
3014
|
+
const i = typeof s == "string" ? Pe(s) : Ce(s), c = typeof r == "string" ? Pe(r) : Ce(r), t = Ce(o);
|
|
2946
3015
|
return {
|
|
2947
3016
|
arguments: [i, c, t]
|
|
2948
3017
|
};
|
|
2949
3018
|
}
|
|
2950
|
-
function
|
|
3019
|
+
function Zn(s, r, o = {}, i = {}) {
|
|
2951
3020
|
const {
|
|
2952
|
-
arguments: [c, t,
|
|
2953
|
-
} = s,
|
|
3021
|
+
arguments: [c, t, u]
|
|
3022
|
+
} = s, g = ei(
|
|
2954
3023
|
c,
|
|
2955
3024
|
r,
|
|
2956
3025
|
i != null && i.nested ? i.nested.path : void 0
|
|
2957
|
-
),
|
|
2958
|
-
if (
|
|
3026
|
+
), b = D(g), x = t !== void 0 ? D(t) : t, A = u.value ? "phrase" : "best_fields";
|
|
3027
|
+
if (g.value === null)
|
|
2959
3028
|
return t.type === "wildcard" ? {
|
|
2960
3029
|
query_string: {
|
|
2961
|
-
query:
|
|
3030
|
+
query: er(t)
|
|
2962
3031
|
}
|
|
2963
3032
|
} : {
|
|
2964
3033
|
multi_match: {
|
|
2965
|
-
type:
|
|
2966
|
-
query:
|
|
3034
|
+
type: A,
|
|
3035
|
+
query: x,
|
|
2967
3036
|
lenient: !0
|
|
2968
3037
|
}
|
|
2969
3038
|
};
|
|
2970
|
-
const _ = r ?
|
|
3039
|
+
const _ = r ? pr(g, r) : [];
|
|
2971
3040
|
_ && _.length === 0 && _.push({
|
|
2972
|
-
name:
|
|
3041
|
+
name: D(g),
|
|
2973
3042
|
scripted: !1,
|
|
2974
3043
|
type: ""
|
|
2975
3044
|
});
|
|
2976
|
-
const
|
|
2977
|
-
return
|
|
3045
|
+
const S = t.type === "wildcard" && x === "*", k = g.type === "wildcard" && b === "*" || _ && r && _.length === r.fields.length;
|
|
3046
|
+
return S && k ? { match_all: {} } : {
|
|
2978
3047
|
bool: {
|
|
2979
3048
|
should: _.reduce((te, H) => {
|
|
2980
3049
|
const q = (R) => {
|
|
2981
|
-
var
|
|
2982
|
-
return
|
|
3050
|
+
var me;
|
|
3051
|
+
return g.type !== "wildcard" || !((me = H.subType) != null && me.nested) || i != null && i.nested ? R : {
|
|
2983
3052
|
nested: {
|
|
2984
3053
|
path: H.subType.nested.path,
|
|
2985
3054
|
query: R,
|
|
@@ -2989,7 +3058,7 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
2989
3058
|
};
|
|
2990
3059
|
if (H.scripted)
|
|
2991
3060
|
return [];
|
|
2992
|
-
if (
|
|
3061
|
+
if (S)
|
|
2993
3062
|
return [
|
|
2994
3063
|
...te,
|
|
2995
3064
|
q({
|
|
@@ -3004,7 +3073,7 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
3004
3073
|
q({
|
|
3005
3074
|
query_string: {
|
|
3006
3075
|
fields: [H.name],
|
|
3007
|
-
query:
|
|
3076
|
+
query: er(t)
|
|
3008
3077
|
}
|
|
3009
3078
|
})
|
|
3010
3079
|
];
|
|
@@ -3015,20 +3084,20 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
3015
3084
|
q({
|
|
3016
3085
|
range: {
|
|
3017
3086
|
[H.name]: {
|
|
3018
|
-
gte:
|
|
3019
|
-
lte:
|
|
3087
|
+
gte: x,
|
|
3088
|
+
lte: x,
|
|
3020
3089
|
...R
|
|
3021
3090
|
}
|
|
3022
3091
|
}
|
|
3023
3092
|
})
|
|
3024
3093
|
];
|
|
3025
3094
|
} else {
|
|
3026
|
-
const R =
|
|
3095
|
+
const R = A === "phrase" ? "match_phrase" : "match";
|
|
3027
3096
|
return [
|
|
3028
3097
|
...te,
|
|
3029
3098
|
q({
|
|
3030
3099
|
[R]: {
|
|
3031
|
-
[H.name]:
|
|
3100
|
+
[H.name]: x
|
|
3032
3101
|
}
|
|
3033
3102
|
})
|
|
3034
3103
|
];
|
|
@@ -3038,98 +3107,98 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
3038
3107
|
}
|
|
3039
3108
|
};
|
|
3040
3109
|
}
|
|
3041
|
-
const
|
|
3110
|
+
const Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3042
3111
|
__proto__: null,
|
|
3043
|
-
buildNodeParams:
|
|
3044
|
-
toOpenSearchQuery:
|
|
3112
|
+
buildNodeParams: Kn,
|
|
3113
|
+
toOpenSearchQuery: Zn
|
|
3045
3114
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3046
|
-
function
|
|
3115
|
+
function Gn(s) {
|
|
3047
3116
|
return {
|
|
3048
3117
|
arguments: s
|
|
3049
3118
|
};
|
|
3050
3119
|
}
|
|
3051
|
-
function
|
|
3120
|
+
function Jn(s, r, o = {}, i = {}) {
|
|
3052
3121
|
return {
|
|
3053
3122
|
bool: {
|
|
3054
|
-
filter: (s.arguments || []).map((t) =>
|
|
3123
|
+
filter: (s.arguments || []).map((t) => D(t, r, o, i))
|
|
3055
3124
|
}
|
|
3056
3125
|
};
|
|
3057
3126
|
}
|
|
3058
|
-
const
|
|
3127
|
+
const Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3059
3128
|
__proto__: null,
|
|
3060
|
-
buildNodeParams:
|
|
3061
|
-
toOpenSearchQuery:
|
|
3129
|
+
buildNodeParams: Gn,
|
|
3130
|
+
toOpenSearchQuery: Jn
|
|
3062
3131
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3063
|
-
function
|
|
3132
|
+
function ea(s) {
|
|
3064
3133
|
return {
|
|
3065
3134
|
arguments: s
|
|
3066
3135
|
};
|
|
3067
3136
|
}
|
|
3068
|
-
function
|
|
3137
|
+
function ta(s, r, o = {}, i = {}) {
|
|
3069
3138
|
return {
|
|
3070
3139
|
bool: {
|
|
3071
|
-
should: (s.arguments || []).map((t) =>
|
|
3140
|
+
should: (s.arguments || []).map((t) => D(t, r, o, i)),
|
|
3072
3141
|
minimum_should_match: 1
|
|
3073
3142
|
}
|
|
3074
3143
|
};
|
|
3075
3144
|
}
|
|
3076
|
-
const
|
|
3145
|
+
const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3077
3146
|
__proto__: null,
|
|
3078
|
-
buildNodeParams:
|
|
3079
|
-
toOpenSearchQuery:
|
|
3147
|
+
buildNodeParams: ea,
|
|
3148
|
+
toOpenSearchQuery: ta
|
|
3080
3149
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3081
|
-
function
|
|
3150
|
+
function sa(s) {
|
|
3082
3151
|
return {
|
|
3083
3152
|
arguments: [s]
|
|
3084
3153
|
};
|
|
3085
3154
|
}
|
|
3086
|
-
function
|
|
3155
|
+
function ia(s, r, o = {}, i = {}) {
|
|
3087
3156
|
const [c] = s.arguments;
|
|
3088
3157
|
return {
|
|
3089
3158
|
bool: {
|
|
3090
|
-
must_not:
|
|
3159
|
+
must_not: D(c, r, o, i)
|
|
3091
3160
|
}
|
|
3092
3161
|
};
|
|
3093
3162
|
}
|
|
3094
|
-
const
|
|
3163
|
+
const oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3095
3164
|
__proto__: null,
|
|
3096
|
-
buildNodeParams:
|
|
3097
|
-
toOpenSearchQuery:
|
|
3165
|
+
buildNodeParams: sa,
|
|
3166
|
+
toOpenSearchQuery: ia
|
|
3098
3167
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3099
|
-
function
|
|
3168
|
+
function na(s, ...r) {
|
|
3100
3169
|
let o = {};
|
|
3101
3170
|
for (let i of r)
|
|
3102
3171
|
o[i] = s[i];
|
|
3103
3172
|
return o;
|
|
3104
3173
|
}
|
|
3105
|
-
function
|
|
3106
|
-
const o =
|
|
3107
|
-
let [
|
|
3108
|
-
return ne.namedArg.buildNode(
|
|
3174
|
+
function aa(s, r) {
|
|
3175
|
+
const o = na(r, "gt", "lt", "gte", "lte", "format"), i = typeof s == "string" ? Pe(s) : ne.literal.buildNode(s), c = Object.entries(o).map((t) => {
|
|
3176
|
+
let [u, g] = t;
|
|
3177
|
+
return ne.namedArg.buildNode(u, g);
|
|
3109
3178
|
});
|
|
3110
3179
|
return {
|
|
3111
3180
|
arguments: [i, ...c]
|
|
3112
3181
|
};
|
|
3113
3182
|
}
|
|
3114
|
-
function
|
|
3115
|
-
const [c, ...t] = s.arguments,
|
|
3183
|
+
function ca(s, r, o = {}, i = {}) {
|
|
3184
|
+
const [c, ...t] = s.arguments, u = ei(
|
|
3116
3185
|
c,
|
|
3117
3186
|
r,
|
|
3118
3187
|
i != null && i.nested ? i.nested.path : void 0
|
|
3119
|
-
),
|
|
3120
|
-
return
|
|
3121
|
-
name:
|
|
3188
|
+
), g = r ? pr(u, r) : [], b = la(t), x = Object.fromEntries(Object.entries(b).map(([_, S]) => [_, D(S)]));
|
|
3189
|
+
return g && g.length === 0 && g.push({
|
|
3190
|
+
name: D(u),
|
|
3122
3191
|
scripted: !1,
|
|
3123
3192
|
type: ""
|
|
3124
3193
|
}), {
|
|
3125
3194
|
bool: {
|
|
3126
|
-
should:
|
|
3127
|
-
const
|
|
3128
|
-
var
|
|
3129
|
-
return
|
|
3195
|
+
should: g.map((_) => {
|
|
3196
|
+
const S = (k) => {
|
|
3197
|
+
var z;
|
|
3198
|
+
return u.type !== "wildcard" || !((z = _.subType) != null && z.nested) || i.nested ? k : {
|
|
3130
3199
|
nested: {
|
|
3131
3200
|
path: _.subType.nested.path,
|
|
3132
|
-
query:
|
|
3201
|
+
query: k,
|
|
3133
3202
|
score_mode: "none"
|
|
3134
3203
|
}
|
|
3135
3204
|
};
|
|
@@ -3137,19 +3206,19 @@ function Jn(s, r, o = {}, i = {}) {
|
|
|
3137
3206
|
if (_.scripted)
|
|
3138
3207
|
return {};
|
|
3139
3208
|
if (_.type === "date") {
|
|
3140
|
-
const
|
|
3141
|
-
return
|
|
3209
|
+
const k = o.dateFormatTZ ? { time_zone: o.dateFormatTZ } : {};
|
|
3210
|
+
return S({
|
|
3142
3211
|
range: {
|
|
3143
3212
|
[_.name]: {
|
|
3144
|
-
...
|
|
3145
|
-
...
|
|
3213
|
+
...x,
|
|
3214
|
+
...k
|
|
3146
3215
|
}
|
|
3147
3216
|
}
|
|
3148
3217
|
});
|
|
3149
3218
|
}
|
|
3150
|
-
return
|
|
3219
|
+
return S({
|
|
3151
3220
|
range: {
|
|
3152
|
-
[_.name]:
|
|
3221
|
+
[_.name]: x
|
|
3153
3222
|
}
|
|
3154
3223
|
});
|
|
3155
3224
|
}),
|
|
@@ -3157,74 +3226,74 @@ function Jn(s, r, o = {}, i = {}) {
|
|
|
3157
3226
|
}
|
|
3158
3227
|
};
|
|
3159
3228
|
}
|
|
3160
|
-
function
|
|
3229
|
+
function la(s) {
|
|
3161
3230
|
if (s.gt && s.gte || s.lt && s.lte)
|
|
3162
3231
|
throw new Error("range ends cannot be both inclusive and exclusive");
|
|
3163
3232
|
const r = ["gte", "lte", "format"];
|
|
3164
3233
|
return s.reduce((o, i, c) => (i.type === "namedArg" ? o[i.name] = i.value : o[r[c]] = i, o), {});
|
|
3165
3234
|
}
|
|
3166
|
-
const
|
|
3235
|
+
const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3167
3236
|
__proto__: null,
|
|
3168
|
-
buildNodeParams:
|
|
3169
|
-
toOpenSearchQuery:
|
|
3237
|
+
buildNodeParams: aa,
|
|
3238
|
+
toOpenSearchQuery: ca
|
|
3170
3239
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3171
|
-
function
|
|
3240
|
+
function ua(s) {
|
|
3172
3241
|
return {
|
|
3173
|
-
arguments: [
|
|
3242
|
+
arguments: [Ce(s)]
|
|
3174
3243
|
};
|
|
3175
3244
|
}
|
|
3176
|
-
function
|
|
3245
|
+
function da(s, r, o = {}, i = {}) {
|
|
3177
3246
|
const {
|
|
3178
3247
|
arguments: [c]
|
|
3179
3248
|
} = s, t = {
|
|
3180
3249
|
...c,
|
|
3181
3250
|
value: i != null && i.nested ? `${i.nested.path}.${c.value}` : c.value
|
|
3182
|
-
},
|
|
3183
|
-
if (
|
|
3251
|
+
}, u = cr(t), g = ((r == null ? void 0 : r.fields) || []).find((b) => b.name === u);
|
|
3252
|
+
if (g && g.scripted)
|
|
3184
3253
|
throw new Error("Exists query does not support scripted fields");
|
|
3185
3254
|
return {
|
|
3186
|
-
exists: { field:
|
|
3255
|
+
exists: { field: u }
|
|
3187
3256
|
};
|
|
3188
3257
|
}
|
|
3189
|
-
const
|
|
3258
|
+
const fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3190
3259
|
__proto__: null,
|
|
3191
|
-
buildNodeParams:
|
|
3192
|
-
toOpenSearchQuery:
|
|
3260
|
+
buildNodeParams: ua,
|
|
3261
|
+
toOpenSearchQuery: da
|
|
3193
3262
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3194
|
-
function
|
|
3263
|
+
function ha(s, r) {
|
|
3195
3264
|
return {
|
|
3196
|
-
arguments: [typeof s == "string" ?
|
|
3265
|
+
arguments: [typeof s == "string" ? Pe(s) : Ce(s), r]
|
|
3197
3266
|
};
|
|
3198
3267
|
}
|
|
3199
|
-
function
|
|
3200
|
-
var
|
|
3201
|
-
const [c, t] = s.arguments,
|
|
3268
|
+
function ga(s, r, o = {}, i = {}) {
|
|
3269
|
+
var b;
|
|
3270
|
+
const [c, t] = s.arguments, u = D(c), g = (b = i == null ? void 0 : i.nested) != null && b.path ? `${i.nested.path}.${u}` : u;
|
|
3202
3271
|
return {
|
|
3203
3272
|
nested: {
|
|
3204
|
-
path:
|
|
3205
|
-
query:
|
|
3273
|
+
path: g,
|
|
3274
|
+
query: D(t, r, o, {
|
|
3206
3275
|
...i,
|
|
3207
|
-
nested: { path:
|
|
3276
|
+
nested: { path: g }
|
|
3208
3277
|
}),
|
|
3209
3278
|
score_mode: "none"
|
|
3210
3279
|
}
|
|
3211
3280
|
};
|
|
3212
3281
|
}
|
|
3213
|
-
const
|
|
3282
|
+
const ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3214
3283
|
__proto__: null,
|
|
3215
|
-
buildNodeParams:
|
|
3216
|
-
toOpenSearchQuery:
|
|
3217
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3218
|
-
is:
|
|
3219
|
-
and:
|
|
3220
|
-
or:
|
|
3221
|
-
not:
|
|
3222
|
-
range:
|
|
3223
|
-
exists:
|
|
3224
|
-
nested:
|
|
3284
|
+
buildNodeParams: ha,
|
|
3285
|
+
toOpenSearchQuery: ga
|
|
3286
|
+
}, Symbol.toStringTag, { value: "Module" })), ur = {
|
|
3287
|
+
is: Xn,
|
|
3288
|
+
and: Vn,
|
|
3289
|
+
or: ra,
|
|
3290
|
+
not: oa,
|
|
3291
|
+
range: pa,
|
|
3292
|
+
exists: fa,
|
|
3293
|
+
nested: ba
|
|
3225
3294
|
};
|
|
3226
|
-
function
|
|
3227
|
-
const o =
|
|
3295
|
+
function va(s, ...r) {
|
|
3296
|
+
const o = ur[s];
|
|
3228
3297
|
if (o === void 0)
|
|
3229
3298
|
throw new Error(`Unknown function "${s}"`);
|
|
3230
3299
|
return {
|
|
@@ -3235,8 +3304,8 @@ function aa(s, ...r) {
|
|
|
3235
3304
|
...o.buildNodeParams(...r)
|
|
3236
3305
|
};
|
|
3237
3306
|
}
|
|
3238
|
-
function
|
|
3239
|
-
if (
|
|
3307
|
+
function ya(s, r) {
|
|
3308
|
+
if (ur[s] === void 0)
|
|
3240
3309
|
throw new Error(`Unknown function "${s}"`);
|
|
3241
3310
|
return {
|
|
3242
3311
|
type: "function",
|
|
@@ -3244,16 +3313,16 @@ function ca(s, r) {
|
|
|
3244
3313
|
arguments: r
|
|
3245
3314
|
};
|
|
3246
3315
|
}
|
|
3247
|
-
function
|
|
3248
|
-
return
|
|
3316
|
+
function ma(s, r, o, i) {
|
|
3317
|
+
return ur[s.function].toOpenSearchQuery(s, r, o, i);
|
|
3249
3318
|
}
|
|
3250
|
-
const
|
|
3319
|
+
const $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3251
3320
|
__proto__: null,
|
|
3252
|
-
buildNode:
|
|
3253
|
-
buildNodeWithArgumentNodes:
|
|
3254
|
-
toOpenSearchQuery:
|
|
3321
|
+
buildNode: va,
|
|
3322
|
+
buildNodeWithArgumentNodes: ya,
|
|
3323
|
+
toOpenSearchQuery: ma
|
|
3255
3324
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3256
|
-
function
|
|
3325
|
+
function _a(s, r) {
|
|
3257
3326
|
const o = r.type === "literal" ? r : ne.literal.buildNode(r);
|
|
3258
3327
|
return {
|
|
3259
3328
|
type: "namedArg",
|
|
@@ -3261,125 +3330,125 @@ function pa(s, r) {
|
|
|
3261
3330
|
value: o
|
|
3262
3331
|
};
|
|
3263
3332
|
}
|
|
3264
|
-
function
|
|
3265
|
-
return
|
|
3333
|
+
function wa(s) {
|
|
3334
|
+
return D(s.value);
|
|
3266
3335
|
}
|
|
3267
|
-
const
|
|
3336
|
+
const xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3268
3337
|
__proto__: null,
|
|
3269
|
-
buildNode:
|
|
3270
|
-
toOpenSearchQuery:
|
|
3338
|
+
buildNode: _a,
|
|
3339
|
+
toOpenSearchQuery: wa
|
|
3271
3340
|
}, Symbol.toStringTag, { value: "Module" })), ne = {
|
|
3272
3341
|
// This requires better typing of the different typings and their return types.
|
|
3273
3342
|
// @ts-ignore
|
|
3274
|
-
function:
|
|
3275
|
-
literal:
|
|
3276
|
-
namedArg:
|
|
3277
|
-
wildcard:
|
|
3278
|
-
},
|
|
3343
|
+
function: $a,
|
|
3344
|
+
literal: Mn,
|
|
3345
|
+
namedArg: xa,
|
|
3346
|
+
wildcard: Yn
|
|
3347
|
+
}, Aa = ee, Sa = (s, r) => "(" + (s.arguments || []).map((i) => be(i, r)).join(" AND ") + ")", ka = (s, r) => {
|
|
3279
3348
|
var {
|
|
3280
3349
|
arguments: [o, i, c]
|
|
3281
3350
|
} = s;
|
|
3282
3351
|
let t = "=";
|
|
3283
3352
|
i.type === "wildcard" && (t = "");
|
|
3284
|
-
let
|
|
3285
|
-
c = c.value || typeof
|
|
3286
|
-
let
|
|
3287
|
-
return
|
|
3288
|
-
},
|
|
3353
|
+
let u = be(i);
|
|
3354
|
+
c = c.value || typeof u == "string", i.type === "literal" && c && (u = `'${u}'`), i.type === "literal" && !c && (u = `${u}`);
|
|
3355
|
+
let g = be(o);
|
|
3356
|
+
return g == null ? r && c ? `(${r.filter((b) => b.type === "string").map((b) => `${b.name} ILIKE '%${i.value}%'`).join(" OR ")})` : r && !c && (i.value === !0 || i.value === !1) ? `(${r.filter((b) => b.type === "boolean").map((b) => `${b.name}=${i.value}`).join(" OR ")})` : "" : g + t + u;
|
|
3357
|
+
}, Ca = (s, r) => "(" + (s.arguments || []).map((i) => be(i, r)).join(" OR ") + ")", Ea = (s, r) => {
|
|
3289
3358
|
const [o] = s.arguments;
|
|
3290
3359
|
return "NOT (" + be(o, r) + ")";
|
|
3291
|
-
},
|
|
3360
|
+
}, Oa = {
|
|
3292
3361
|
gt: ">",
|
|
3293
3362
|
lt: "<",
|
|
3294
3363
|
gte: ">=",
|
|
3295
3364
|
lte: "<="
|
|
3296
|
-
},
|
|
3365
|
+
}, Pa = (s) => {
|
|
3297
3366
|
const [r, o] = s.arguments;
|
|
3298
3367
|
let i = o.value;
|
|
3299
|
-
const c =
|
|
3368
|
+
const c = Oa[o.name];
|
|
3300
3369
|
let t = be(i);
|
|
3301
3370
|
return i.type === "literal" && (t = `${t}`), `${r.value} ${c} ${t}`;
|
|
3302
|
-
},
|
|
3371
|
+
}, Ta = (s) => {
|
|
3303
3372
|
const [r] = s.arguments;
|
|
3304
3373
|
return `${r.value} IS NOT NULL`;
|
|
3305
|
-
},
|
|
3306
|
-
is:
|
|
3307
|
-
and:
|
|
3308
|
-
or:
|
|
3309
|
-
not:
|
|
3310
|
-
range:
|
|
3311
|
-
exists:
|
|
3312
|
-
nested:
|
|
3313
|
-
},
|
|
3314
|
-
function: (s, r) =>
|
|
3374
|
+
}, La = (s) => (console.warn("Nested types dont exist in CQL", s), ""), Na = {
|
|
3375
|
+
is: ka,
|
|
3376
|
+
and: Sa,
|
|
3377
|
+
or: Ca,
|
|
3378
|
+
not: Ea,
|
|
3379
|
+
range: Pa,
|
|
3380
|
+
exists: Ta,
|
|
3381
|
+
nested: La
|
|
3382
|
+
}, Da = {
|
|
3383
|
+
function: (s, r) => Na[s.function](s, r),
|
|
3315
3384
|
literal: (s) => s.value,
|
|
3316
3385
|
wildcard: (s) => {
|
|
3317
3386
|
const { value: r } = s;
|
|
3318
|
-
return ` LIKE '${r.split(
|
|
3387
|
+
return ` LIKE '${r.split(Aa).join("%")}'`;
|
|
3319
3388
|
}
|
|
3320
3389
|
}, be = (s, r) => {
|
|
3321
|
-
const o =
|
|
3390
|
+
const o = Da[s.type];
|
|
3322
3391
|
return o(s, r);
|
|
3323
|
-
},
|
|
3392
|
+
}, ja = ee, za = (s) => ({ $and: (s.arguments || []).map((i) => ae(i)) }), Ra = (s) => {
|
|
3324
3393
|
const {
|
|
3325
3394
|
arguments: [r, o]
|
|
3326
3395
|
} = s;
|
|
3327
3396
|
let i = ae(o);
|
|
3328
3397
|
if (o.type === "wildcard" && o.value === "@kuery-wildcard@")
|
|
3329
|
-
return
|
|
3398
|
+
return ti(s);
|
|
3330
3399
|
let t = {};
|
|
3331
3400
|
return t[ae(r)] = { $eq: i }, t;
|
|
3332
|
-
},
|
|
3401
|
+
}, Ba = (s) => ({
|
|
3333
3402
|
$or: (s.arguments || []).map((o) => ae(o))
|
|
3334
|
-
}),
|
|
3403
|
+
}), Ua = (s) => {
|
|
3335
3404
|
const [r] = s.arguments;
|
|
3336
3405
|
let o = {};
|
|
3337
3406
|
return o = { $ne: ae(r) }, o;
|
|
3338
|
-
},
|
|
3407
|
+
}, Ma = {
|
|
3339
3408
|
gt: "$gt",
|
|
3340
3409
|
lt: "$lt",
|
|
3341
3410
|
gte: "$gte",
|
|
3342
3411
|
lte: "$lte"
|
|
3343
|
-
},
|
|
3412
|
+
}, Fa = (s) => {
|
|
3344
3413
|
const [r, o] = s.arguments;
|
|
3345
3414
|
let i = o.value;
|
|
3346
|
-
const c =
|
|
3347
|
-
let t = ae(i),
|
|
3348
|
-
return
|
|
3349
|
-
},
|
|
3415
|
+
const c = Ma[o.name];
|
|
3416
|
+
let t = ae(i), u = {};
|
|
3417
|
+
return u[r.value] = {}, u[r.value][c] = t, u;
|
|
3418
|
+
}, ti = (s) => {
|
|
3350
3419
|
const [r] = s.arguments;
|
|
3351
3420
|
return { [ae(r)]: { $ne: null } };
|
|
3352
|
-
},
|
|
3353
|
-
is:
|
|
3354
|
-
and:
|
|
3355
|
-
or:
|
|
3356
|
-
not:
|
|
3357
|
-
range:
|
|
3358
|
-
exists:
|
|
3359
|
-
nested:
|
|
3360
|
-
},
|
|
3361
|
-
function: (s) =>
|
|
3421
|
+
}, Ia = (s) => (console.warn("TODO Implement nested search", s), ""), Qa = {
|
|
3422
|
+
is: Ra,
|
|
3423
|
+
and: za,
|
|
3424
|
+
or: Ba,
|
|
3425
|
+
not: Ua,
|
|
3426
|
+
range: Fa,
|
|
3427
|
+
exists: ti,
|
|
3428
|
+
nested: Ia
|
|
3429
|
+
}, Ha = {
|
|
3430
|
+
function: (s) => Qa[s.function](s),
|
|
3362
3431
|
literal: (s) => s.value,
|
|
3363
3432
|
wildcard: (s) => {
|
|
3364
3433
|
const { value: r } = s;
|
|
3365
|
-
return `/${r.split(
|
|
3434
|
+
return `/${r.split(ja).join(".*")}/`;
|
|
3366
3435
|
}
|
|
3367
3436
|
}, ae = (s, r) => {
|
|
3368
|
-
const o =
|
|
3437
|
+
const o = Ha[s.type];
|
|
3369
3438
|
return o(s, r);
|
|
3370
|
-
},
|
|
3439
|
+
}, qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3371
3440
|
__proto__: null,
|
|
3372
|
-
DQLSyntaxError:
|
|
3373
|
-
doesKueryExpressionHaveLuceneSyntaxError:
|
|
3374
|
-
fromKueryExpression:
|
|
3375
|
-
fromLiteralExpression:
|
|
3441
|
+
DQLSyntaxError: Js,
|
|
3442
|
+
doesKueryExpressionHaveLuceneSyntaxError: Fn,
|
|
3443
|
+
fromKueryExpression: $t,
|
|
3444
|
+
fromLiteralExpression: Pe,
|
|
3376
3445
|
nodeTypes: ne,
|
|
3377
|
-
parse:
|
|
3446
|
+
parse: $t,
|
|
3378
3447
|
toCql: be,
|
|
3379
|
-
toDSL:
|
|
3448
|
+
toDSL: D,
|
|
3380
3449
|
toMongo: ae,
|
|
3381
|
-
toOpenSearchQuery:
|
|
3382
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3450
|
+
toOpenSearchQuery: D
|
|
3451
|
+
}, Symbol.toStringTag, { value: "Module" })), Wa = Z`
|
|
3383
3452
|
:host {
|
|
3384
3453
|
--dialog-padding: var(--spectric-dialog-padding, 5px);
|
|
3385
3454
|
--dialog-background:var(--spectric-background,rgb(246, 249, 252));
|
|
@@ -3427,13 +3496,13 @@ spectric-button{
|
|
|
3427
3496
|
top: 0;
|
|
3428
3497
|
}
|
|
3429
3498
|
`;
|
|
3430
|
-
var
|
|
3431
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3432
|
-
(
|
|
3433
|
-
return i && c &&
|
|
3499
|
+
var Ya = Object.defineProperty, Ka = Object.getOwnPropertyDescriptor, le = (s, r, o, i) => {
|
|
3500
|
+
for (var c = i > 1 ? void 0 : i ? Ka(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3501
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3502
|
+
return i && c && Ya(r, o, c), c;
|
|
3434
3503
|
};
|
|
3435
|
-
const
|
|
3436
|
-
let
|
|
3504
|
+
const ri = "spectric-dialog";
|
|
3505
|
+
let I = class extends O {
|
|
3437
3506
|
constructor() {
|
|
3438
3507
|
super(...arguments), this.open = !1, this.dismissable = !0, this.hideBackdrop = !1, this.title = "", this.closeOnEscape = !0, this.closeOnOutsideClick = !0, this.clickHandler = async (s) => {
|
|
3439
3508
|
const r = await this.dialogElement;
|
|
@@ -3448,14 +3517,14 @@ let F = class extends L {
|
|
|
3448
3517
|
};
|
|
3449
3518
|
}
|
|
3450
3519
|
static display(s, r) {
|
|
3451
|
-
let o = document.createElement(
|
|
3520
|
+
let o = document.createElement(ri);
|
|
3452
3521
|
o.addEventListener("close", () => {
|
|
3453
3522
|
o.remove();
|
|
3454
3523
|
});
|
|
3455
3524
|
for (let c in s)
|
|
3456
3525
|
o[c] = s[c];
|
|
3457
3526
|
let i = document.createDocumentFragment();
|
|
3458
|
-
return
|
|
3527
|
+
return Is(r, i), o.appendChild(i), o.open = !0, document.body.appendChild(o), o;
|
|
3459
3528
|
}
|
|
3460
3529
|
connectedCallback() {
|
|
3461
3530
|
super.connectedCallback(), this.dialogElement.then((s) => s.addEventListener("keydown", this._handleKeyDown));
|
|
@@ -3469,11 +3538,11 @@ let F = class extends L {
|
|
|
3469
3538
|
});
|
|
3470
3539
|
}
|
|
3471
3540
|
render() {
|
|
3472
|
-
return
|
|
3541
|
+
return w`
|
|
3473
3542
|
<dialog class=${this.hideBackdrop ? "" : "backdrop"} @close=${this._onClose} @click=${this.clickHandler}>
|
|
3474
3543
|
<spectric-panel>
|
|
3475
3544
|
<div class="modal">
|
|
3476
|
-
${this.dismissable ?
|
|
3545
|
+
${this.dismissable ? w`<spectric-button variant="text" size="small" @click=${() => {
|
|
3477
3546
|
this.open = !1;
|
|
3478
3547
|
}}>X</spectric-button>` : null}
|
|
3479
3548
|
<h3 >
|
|
@@ -3490,50 +3559,50 @@ let F = class extends L {
|
|
|
3490
3559
|
`;
|
|
3491
3560
|
}
|
|
3492
3561
|
};
|
|
3493
|
-
|
|
3494
|
-
|
|
3562
|
+
I.styles = Wa;
|
|
3563
|
+
le([
|
|
3495
3564
|
v({ type: Boolean, reflect: !0 })
|
|
3496
|
-
],
|
|
3497
|
-
|
|
3565
|
+
], I.prototype, "open", 2);
|
|
3566
|
+
le([
|
|
3498
3567
|
v({ type: Boolean, reflect: !0 })
|
|
3499
|
-
],
|
|
3500
|
-
|
|
3568
|
+
], I.prototype, "dismissable", 2);
|
|
3569
|
+
le([
|
|
3501
3570
|
v({ type: Boolean, reflect: !0 })
|
|
3502
|
-
],
|
|
3503
|
-
|
|
3571
|
+
], I.prototype, "hideBackdrop", 2);
|
|
3572
|
+
le([
|
|
3504
3573
|
v({ type: String, reflect: !0 })
|
|
3505
|
-
],
|
|
3506
|
-
|
|
3574
|
+
], I.prototype, "title", 2);
|
|
3575
|
+
le([
|
|
3507
3576
|
v({ type: Boolean, reflect: !0 })
|
|
3508
|
-
],
|
|
3509
|
-
|
|
3577
|
+
], I.prototype, "closeOnEscape", 2);
|
|
3578
|
+
le([
|
|
3510
3579
|
v({ type: Boolean, reflect: !0 })
|
|
3511
|
-
],
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
],
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
],
|
|
3518
|
-
var
|
|
3519
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3520
|
-
(
|
|
3521
|
-
return i && c &&
|
|
3522
|
-
},
|
|
3523
|
-
const
|
|
3580
|
+
], I.prototype, "closeOnOutsideClick", 2);
|
|
3581
|
+
le([
|
|
3582
|
+
kt("dialog")
|
|
3583
|
+
], I.prototype, "dialogElement", 2);
|
|
3584
|
+
I = le([
|
|
3585
|
+
N(ri)
|
|
3586
|
+
], I);
|
|
3587
|
+
var Za = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, G = (s, r, o, i) => {
|
|
3588
|
+
for (var c = i > 1 ? void 0 : i ? Xa(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3589
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3590
|
+
return i && c && Za(r, o, c), c;
|
|
3591
|
+
}, Ga = /* @__PURE__ */ ((s) => (s.MONGO = "toMongo", s.CQL = "toCql", s.DSL = "toDSL", s.AST = "AST", s))(Ga || {});
|
|
3592
|
+
const si = {
|
|
3524
3593
|
eq: { value: " : ", label: " equals some value" },
|
|
3525
3594
|
gt: { value: " > ", label: " is greater than some value" },
|
|
3526
3595
|
lt: { value: " < ", label: " is less than some value" },
|
|
3527
3596
|
gte: { value: " >= ", label: " is greater than or equal to some value" },
|
|
3528
3597
|
lte: { value: " <= ", label: " is less than or equal to some value" }
|
|
3529
|
-
},
|
|
3598
|
+
}, Ja = {
|
|
3530
3599
|
eq: { value: ": ", label: " equals some value" },
|
|
3531
3600
|
exists: { value: ": *", label: " exists in any form" }
|
|
3532
|
-
},
|
|
3601
|
+
}, Va = [
|
|
3533
3602
|
{ value: ": true", label: " value is true" },
|
|
3534
3603
|
{ value: ": false", label: "value is false" }
|
|
3535
|
-
],
|
|
3536
|
-
let Q = class extends
|
|
3604
|
+
], ec = Object.fromEntries(Object.entries(si).map(([s, r]) => [s, { value: r.value, label: (r.label || "").replace("value", "date-time") }]));
|
|
3605
|
+
let Q = class extends O {
|
|
3537
3606
|
constructor() {
|
|
3538
3607
|
super(), this.placeholder = "", this._value = "", this.value = "", this.outputLanguage = "AST", this.completions = [], this.completionIndex = 0, this.fields = [], this._parseQuery = (s = void 0) => {
|
|
3539
3608
|
let r;
|
|
@@ -3543,13 +3612,13 @@ let Q = class extends L {
|
|
|
3543
3612
|
s && s.data == "(" && (this.value = this.value + " )", this._input.setSelectionRange(this.value.length - 2, this.value.length - 2));
|
|
3544
3613
|
let c = this.value;
|
|
3545
3614
|
this._input.selectionStart !== null && (c = c.substring(0, this._input.selectionStart) + "@kuery-cursor@" + c.substring(this._input.selectionStart));
|
|
3546
|
-
let t =
|
|
3547
|
-
this.autoComplete(t), r =
|
|
3615
|
+
let t = $t(c, { parseCursor: !0, cursorSymbol: "@kuery-cursor@", allowLeadingWildcards: !1 });
|
|
3616
|
+
this.autoComplete(t), r = $t(this.value, { allowLeadingWildcards: !1 });
|
|
3548
3617
|
} catch {
|
|
3549
3618
|
return;
|
|
3550
3619
|
}
|
|
3551
3620
|
let o;
|
|
3552
|
-
this.outputLanguage == "AST" ? o = r : o =
|
|
3621
|
+
this.outputLanguage == "AST" ? o = r : o = qa[this.outputLanguage](r, this.fields);
|
|
3553
3622
|
let i = new CustomEvent("change", { detail: o });
|
|
3554
3623
|
this.dispatchEvent(i);
|
|
3555
3624
|
}, this.getValuesForField = async (s, r) => (console.log("getValuesForField isn't set no values returned", s, r), []), this._selectCompletion = async () => {
|
|
@@ -3582,102 +3651,102 @@ let Q = class extends L {
|
|
|
3582
3651
|
let { start: o, end: i } = s;
|
|
3583
3652
|
for (let c of s.suggestionTypes) {
|
|
3584
3653
|
if (c == "conjunction" && s.text.endsWith(" ") && r.push(...["and ", "or "].map((t) => ({ type: c, value: t, start: i, end: i }))), c === "field") {
|
|
3585
|
-
let t = this.fields.filter((
|
|
3654
|
+
let t = this.fields.filter((u) => u.name.includes(s.fieldName) || u.name.includes(s.prefix)).map((u) => [{ type: c, value: u.name, start: o, end: i }]).flat();
|
|
3586
3655
|
r.push(...t);
|
|
3587
3656
|
}
|
|
3588
3657
|
if (c === "operator") {
|
|
3589
|
-
let t = this.fields.find((
|
|
3590
|
-
t && (t.type === "number" ? r.push(...Object.values(
|
|
3658
|
+
let t = this.fields.find((u) => u.name === s.fieldName);
|
|
3659
|
+
t && (t.type === "number" ? r.push(...Object.values(si).map((u) => ({ type: c, ...u, start: i, end: i }))) : t.type === "string" ? t.format === "date-time" ? r.push(...Object.values(ec).map((u) => ({
|
|
3591
3660
|
type: c,
|
|
3592
|
-
...
|
|
3661
|
+
...u,
|
|
3593
3662
|
start: i,
|
|
3594
3663
|
end: i,
|
|
3595
3664
|
onSelect: async () => {
|
|
3596
|
-
let
|
|
3597
|
-
|
|
3598
|
-
let
|
|
3599
|
-
return await new Promise((
|
|
3600
|
-
let _ =
|
|
3665
|
+
let g = await this.getValuesForField(s.fieldName, s.prefix);
|
|
3666
|
+
g.length === 0 && (g = ["now-1m", "now-1d", "now-1M"]);
|
|
3667
|
+
let b, x = ft();
|
|
3668
|
+
return await new Promise((A) => {
|
|
3669
|
+
let _ = I.display({}, w`
|
|
3601
3670
|
<div class="query-bar-date-quick-select">
|
|
3602
|
-
${
|
|
3603
|
-
|
|
3604
|
-
}}>${
|
|
3671
|
+
${g.map((S) => w`<a href="#" @click=${(k) => {
|
|
3672
|
+
k.preventDefault(), b = `"${S}"`, A(b), _.open = !1;
|
|
3673
|
+
}}>${S}</a>`)}
|
|
3605
3674
|
</div>
|
|
3606
|
-
<spectric-input variant="datetime-local" @change=${(
|
|
3607
|
-
if (!
|
|
3675
|
+
<spectric-input variant="datetime-local" @change=${(S) => {
|
|
3676
|
+
if (!S.target)
|
|
3608
3677
|
return;
|
|
3609
|
-
|
|
3678
|
+
b = `"${(/* @__PURE__ */ new Date(S.target.value + ":00.000Z")).toISOString()}"`, x.value.disabled = b === void 0;
|
|
3610
3679
|
}}></spectric-input>
|
|
3611
|
-
<spectric-button ${
|
|
3612
|
-
|
|
3680
|
+
<spectric-button ${ht(x)} .disabled=${!0} @click=${() => {
|
|
3681
|
+
A(b), _.open = !1;
|
|
3613
3682
|
}}>Submit</spectric-button>
|
|
3614
3683
|
`);
|
|
3615
|
-
}),
|
|
3684
|
+
}), b;
|
|
3616
3685
|
}
|
|
3617
|
-
}))) : r.push(...Object.values(
|
|
3686
|
+
}))) : r.push(...Object.values(Ja).map((u) => ({ type: c, ...u, start: i, end: i }))) : t.type === "boolean" && r.push(...Va.map((u) => ({ type: c, ...u, start: i, end: i }))));
|
|
3618
3687
|
}
|
|
3619
3688
|
if (c === "value") {
|
|
3620
|
-
let t = this.fields.find((
|
|
3689
|
+
let t = this.fields.find((u) => u.name === s.fieldName);
|
|
3621
3690
|
if (t && t.type == "boolean")
|
|
3622
3691
|
r.push({ type: c, value: "true", start: o, end: i }, { type: c, value: "false", start: o, end: i });
|
|
3623
3692
|
else {
|
|
3624
3693
|
console.log(`invoke callback to get values for ${s.fieldName}`);
|
|
3625
|
-
let
|
|
3626
|
-
(t == null ? void 0 : t.type) === "string" && (
|
|
3694
|
+
let u = await this.getValuesForField(s.fieldName, s.prefix);
|
|
3695
|
+
(t == null ? void 0 : t.type) === "string" && (u = u.map((g) => `"${g}"`)), r.push(...u.map((g) => ({ type: c, value: g, start: o, end: i })));
|
|
3627
3696
|
}
|
|
3628
3697
|
}
|
|
3629
3698
|
}
|
|
3630
3699
|
if (this.completions = r, this.completions.length && this._autocomplete) {
|
|
3631
|
-
let { width: c, left: t, bottom:
|
|
3632
|
-
this._autocomplete.showPopover(), "anchorName" in document.documentElement.style || (this._autocomplete.style.left = `${t + 3.75}px`, this._autocomplete.style.top = `${
|
|
3700
|
+
let { width: c, left: t, bottom: u } = this._input.getBoundingClientRect();
|
|
3701
|
+
this._autocomplete.showPopover(), "anchorName" in document.documentElement.style || (this._autocomplete.style.left = `${t + 3.75}px`, this._autocomplete.style.top = `${u}px`), this._autocomplete.style.width = `${c - 15}px`;
|
|
3633
3702
|
}
|
|
3634
3703
|
}
|
|
3635
3704
|
updated(s) {
|
|
3636
3705
|
s.has("outputLanguage") && this._parseQuery();
|
|
3637
3706
|
}
|
|
3638
3707
|
render() {
|
|
3639
|
-
return
|
|
3708
|
+
return w`
|
|
3640
3709
|
<spectric-input .value=${this.value} .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${(s) => s.stopPropagation()}></spectric-input>
|
|
3641
3710
|
<div class="autocomplete" popover style=${`position-anchor: --${this.uuid};`}>
|
|
3642
3711
|
${this.completions.map(
|
|
3643
|
-
(s, r) =>
|
|
3712
|
+
(s, r) => w`<div @click=${() => {
|
|
3644
3713
|
this.completionIndex = r, this._selectCompletion();
|
|
3645
3714
|
}} class=${this.completionIndex == r ? "option active" : "option"}><span class="optiontype ${s.type}">${s.type}</span> <span class="value">${s.value}</span> <span class="label">${s.label}</span></span> </div></div>`
|
|
3646
3715
|
)}
|
|
3647
3716
|
</div>`;
|
|
3648
3717
|
}
|
|
3649
3718
|
};
|
|
3650
|
-
|
|
3719
|
+
G([
|
|
3651
3720
|
v({ type: String, reflect: !0 })
|
|
3652
3721
|
], Q.prototype, "placeholder", 2);
|
|
3653
|
-
|
|
3722
|
+
G([
|
|
3654
3723
|
v({ type: String, reflect: !0 })
|
|
3655
3724
|
], Q.prototype, "value", 2);
|
|
3656
|
-
|
|
3725
|
+
G([
|
|
3657
3726
|
v({ type: String, reflect: !0 })
|
|
3658
3727
|
], Q.prototype, "outputLanguage", 2);
|
|
3659
|
-
|
|
3660
|
-
|
|
3728
|
+
G([
|
|
3729
|
+
St()
|
|
3661
3730
|
], Q.prototype, "completions", 2);
|
|
3662
|
-
|
|
3663
|
-
|
|
3731
|
+
G([
|
|
3732
|
+
St()
|
|
3664
3733
|
], Q.prototype, "completionIndex", 2);
|
|
3665
|
-
|
|
3734
|
+
G([
|
|
3666
3735
|
v({ type: Array, reflect: !0 })
|
|
3667
3736
|
], Q.prototype, "fields", 2);
|
|
3668
|
-
|
|
3669
|
-
|
|
3737
|
+
G([
|
|
3738
|
+
Ze(".autocomplete")
|
|
3670
3739
|
], Q.prototype, "_autocomplete", 2);
|
|
3671
|
-
|
|
3672
|
-
|
|
3740
|
+
G([
|
|
3741
|
+
kt(".autocomplete")
|
|
3673
3742
|
], Q.prototype, "_asyncAutocomplete", 2);
|
|
3674
|
-
|
|
3675
|
-
|
|
3743
|
+
G([
|
|
3744
|
+
Ze("spectric-input")
|
|
3676
3745
|
], Q.prototype, "_input", 2);
|
|
3677
|
-
Q =
|
|
3678
|
-
|
|
3746
|
+
Q = G([
|
|
3747
|
+
N("spectric-query")
|
|
3679
3748
|
], Q);
|
|
3680
|
-
const
|
|
3749
|
+
const Ns = Z`
|
|
3681
3750
|
border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
|
|
3682
3751
|
background-color: var(--panel-color,#0b0b0b);
|
|
3683
3752
|
--spectric-input-color: var(--spectric-background);
|
|
@@ -3685,7 +3754,7 @@ const As = K`
|
|
|
3685
3754
|
--spectric-text-primary:var(--text-primary);
|
|
3686
3755
|
--spectric-text-secondary:var(--text-secondary);
|
|
3687
3756
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
|
|
3688
|
-
`,
|
|
3757
|
+
`, Ds = Z`
|
|
3689
3758
|
border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
|
|
3690
3759
|
background-color: var(--panel-color-inverse,#0b0b0b);
|
|
3691
3760
|
color:var(--text-primary,#3c4c5b);
|
|
@@ -3693,7 +3762,7 @@ const As = K`
|
|
|
3693
3762
|
--spectric-text-primary:var(--text-secondary);
|
|
3694
3763
|
--spectric-text-secondary:var(--text-primary);
|
|
3695
3764
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
|
|
3696
|
-
`,
|
|
3765
|
+
`, tc = Z`
|
|
3697
3766
|
:host{
|
|
3698
3767
|
display:block;
|
|
3699
3768
|
border:2px solid black;
|
|
@@ -3703,26 +3772,26 @@ const As = K`
|
|
|
3703
3772
|
|
|
3704
3773
|
}
|
|
3705
3774
|
:host(spectric-panel[level='0']) {
|
|
3706
|
-
${
|
|
3775
|
+
${Ns};
|
|
3707
3776
|
}
|
|
3708
3777
|
|
|
3709
3778
|
:host(spectric-panel[level='1']) {
|
|
3710
|
-
${
|
|
3779
|
+
${Ds};
|
|
3711
3780
|
}
|
|
3712
3781
|
|
|
3713
3782
|
:host(spectric-panel[level='2']) {
|
|
3714
|
-
${
|
|
3783
|
+
${Ns};
|
|
3715
3784
|
}
|
|
3716
3785
|
:host(spectric-panel[level='3']) {
|
|
3717
|
-
${
|
|
3786
|
+
${Ds};
|
|
3718
3787
|
}
|
|
3719
3788
|
`;
|
|
3720
|
-
var
|
|
3721
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3722
|
-
(
|
|
3723
|
-
return i && c &&
|
|
3789
|
+
var rc = Object.defineProperty, sc = Object.getOwnPropertyDescriptor, dr = (s, r, o, i) => {
|
|
3790
|
+
for (var c = i > 1 ? void 0 : i ? sc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3791
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3792
|
+
return i && c && rc(r, o, c), c;
|
|
3724
3793
|
};
|
|
3725
|
-
let
|
|
3794
|
+
let We = class extends O {
|
|
3726
3795
|
constructor() {
|
|
3727
3796
|
super(...arguments), this.level = 0;
|
|
3728
3797
|
}
|
|
@@ -3747,25 +3816,25 @@ let He = class extends L {
|
|
|
3747
3816
|
);
|
|
3748
3817
|
}
|
|
3749
3818
|
render() {
|
|
3750
|
-
return
|
|
3819
|
+
return w` <slot></slot> `;
|
|
3751
3820
|
}
|
|
3752
3821
|
};
|
|
3753
|
-
|
|
3754
|
-
|
|
3822
|
+
We.styles = tc;
|
|
3823
|
+
dr([
|
|
3755
3824
|
v({ type: Number, reflect: !0 })
|
|
3756
|
-
],
|
|
3757
|
-
|
|
3825
|
+
], We.prototype, "level", 2);
|
|
3826
|
+
dr([
|
|
3758
3827
|
v({ attribute: !1 })
|
|
3759
|
-
],
|
|
3760
|
-
|
|
3761
|
-
|
|
3762
|
-
],
|
|
3763
|
-
var
|
|
3764
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3765
|
-
(
|
|
3766
|
-
return i && c &&
|
|
3828
|
+
], We.prototype, "layers", 2);
|
|
3829
|
+
We = dr([
|
|
3830
|
+
N("spectric-panel")
|
|
3831
|
+
], We);
|
|
3832
|
+
var ic = Object.defineProperty, oc = Object.getOwnPropertyDescriptor, ii = (s, r, o, i) => {
|
|
3833
|
+
for (var c = i > 1 ? void 0 : i ? oc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3834
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3835
|
+
return i && c && ic(r, o, c), c;
|
|
3767
3836
|
};
|
|
3768
|
-
const
|
|
3837
|
+
const Lc = {
|
|
3769
3838
|
"--primary": { control: "color" },
|
|
3770
3839
|
"--secondary": { control: "color" },
|
|
3771
3840
|
"--tertiary": { control: "color" },
|
|
@@ -3776,7 +3845,7 @@ const ac = {
|
|
|
3776
3845
|
"--text-secondary": { control: "color" },
|
|
3777
3846
|
"--text-on-color": { control: "color" },
|
|
3778
3847
|
"--border-radius": { control: "text" }
|
|
3779
|
-
},
|
|
3848
|
+
}, oi = {
|
|
3780
3849
|
"--secondary": "#77878b",
|
|
3781
3850
|
"--tertiary": "#c7c7c7",
|
|
3782
3851
|
"--disabled": "#000000",
|
|
@@ -3785,20 +3854,20 @@ const ac = {
|
|
|
3785
3854
|
"--text-on-color": "#ededed",
|
|
3786
3855
|
"--background": "#181818",
|
|
3787
3856
|
"--background-inverse": "#37373d"
|
|
3788
|
-
},
|
|
3789
|
-
...
|
|
3857
|
+
}, js = {
|
|
3858
|
+
...oi,
|
|
3790
3859
|
"--primary": "#ffd45a",
|
|
3791
3860
|
"--text-on-color": "#4f4f4f"
|
|
3792
|
-
},
|
|
3861
|
+
}, tr = {
|
|
3793
3862
|
undefined: {},
|
|
3794
3863
|
light: {},
|
|
3795
|
-
dark:
|
|
3796
|
-
spectric:
|
|
3864
|
+
dark: oi,
|
|
3865
|
+
spectric: js,
|
|
3797
3866
|
spectricFlat: {
|
|
3798
|
-
...
|
|
3867
|
+
...js,
|
|
3799
3868
|
"--border-radius": "1px"
|
|
3800
3869
|
}
|
|
3801
|
-
},
|
|
3870
|
+
}, Nc = Object.fromEntries(Object.keys(tr).map((s) => [s, s])), nc = `
|
|
3802
3871
|
--spectric-background: var(--background,#ffffff);
|
|
3803
3872
|
--spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
|
|
3804
3873
|
--spectric-background-inverse: var(--background-inverse,#f4f4f4);
|
|
@@ -3842,7 +3911,7 @@ const ac = {
|
|
|
3842
3911
|
--spectric-button-disabled: #c6c6c6;
|
|
3843
3912
|
color: var(--spectric-text-primary);
|
|
3844
3913
|
`;
|
|
3845
|
-
let
|
|
3914
|
+
let _t = class extends O {
|
|
3846
3915
|
constructor() {
|
|
3847
3916
|
super(...arguments), this.theme = "undefined";
|
|
3848
3917
|
}
|
|
@@ -3856,15 +3925,15 @@ let vt = class extends L {
|
|
|
3856
3925
|
}
|
|
3857
3926
|
}
|
|
3858
3927
|
render() {
|
|
3859
|
-
let s = Object.keys(
|
|
3860
|
-
|
|
3928
|
+
let s = Object.keys(tr).includes(this.theme) ? this.theme : "undefined", r = Object.entries(
|
|
3929
|
+
tr[s]
|
|
3861
3930
|
).map((o) => `${o[0]}:${o[1]};`).join(`
|
|
3862
3931
|
`);
|
|
3863
|
-
return
|
|
3864
|
-
${this.theme && this.theme !== "light" ?
|
|
3932
|
+
return w`
|
|
3933
|
+
${this.theme && this.theme !== "light" ? w`
|
|
3865
3934
|
<style>:host{
|
|
3866
3935
|
${r};
|
|
3867
|
-
${
|
|
3936
|
+
${nc}
|
|
3868
3937
|
}
|
|
3869
3938
|
/* Webkit psudo elements don't pick up variables defined by the host */
|
|
3870
3939
|
::-webkit-scrollbar-thumb {
|
|
@@ -3938,16 +4007,16 @@ let vt = class extends L {
|
|
|
3938
4007
|
`;
|
|
3939
4008
|
}
|
|
3940
4009
|
};
|
|
3941
|
-
|
|
4010
|
+
_t.styles = Z`:host{
|
|
3942
4011
|
display:contents;
|
|
3943
4012
|
}`;
|
|
3944
|
-
|
|
4013
|
+
ii([
|
|
3945
4014
|
v({ reflect: !0 })
|
|
3946
|
-
],
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
],
|
|
3950
|
-
const
|
|
4015
|
+
], _t.prototype, "theme", 2);
|
|
4016
|
+
_t = ii([
|
|
4017
|
+
N("spectric-theme")
|
|
4018
|
+
], _t);
|
|
4019
|
+
const ac = Z`
|
|
3951
4020
|
:host {
|
|
3952
4021
|
display: block;
|
|
3953
4022
|
height: 100%;
|
|
@@ -4011,18 +4080,18 @@ const Ga = K`
|
|
|
4011
4080
|
cursor: ew-resize;
|
|
4012
4081
|
}
|
|
4013
4082
|
`;
|
|
4014
|
-
var
|
|
4015
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
4016
|
-
(
|
|
4017
|
-
return i && c &&
|
|
4018
|
-
},
|
|
4019
|
-
const
|
|
4020
|
-
let
|
|
4083
|
+
var cc = Object.defineProperty, lc = Object.getOwnPropertyDescriptor, U = (s, r, o, i) => {
|
|
4084
|
+
for (var c = i > 1 ? void 0 : i ? lc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4085
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4086
|
+
return i && c && cc(r, o, c), c;
|
|
4087
|
+
}, pc = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(pc || {});
|
|
4088
|
+
const uc = "spectric-splitview";
|
|
4089
|
+
let j = class extends Xs {
|
|
4021
4090
|
constructor() {
|
|
4022
4091
|
super(), this.orientation = "horizontal", this.percentage = 50, this.invisible = !1, this.min = 10, this.max = 90, this.useSavedState = !0, this.isDragging = !1, this._error = !1, this._emitChange = () => {
|
|
4023
|
-
let { percentage: r, orientation: o, invisible: i, min: c, max: t, useSavedState:
|
|
4024
|
-
|
|
4025
|
-
}, this._onMouseMove =
|
|
4092
|
+
let { percentage: r, orientation: o, invisible: i, min: c, max: t, useSavedState: u } = this, g = this.getAttribute("id");
|
|
4093
|
+
g && this.useSavedState && localStorage.setItem(`splitview-${g}`, String(r)), this.dispatchEvent(new CustomEvent("change", { detail: { orientation: o, percentage: r, invisible: i, min: c, max: t, useSavedState: u } }));
|
|
4094
|
+
}, this._onMouseMove = Gs((r) => {
|
|
4026
4095
|
if (this.isDragging) {
|
|
4027
4096
|
const o = this.getBoundingClientRect();
|
|
4028
4097
|
let i, c;
|
|
@@ -4063,7 +4132,7 @@ let D = class extends Fs {
|
|
|
4063
4132
|
s.has("percentage") && (this.percentage = Math.min(Math.max(Number(this.percentage), this.min), this.max));
|
|
4064
4133
|
}
|
|
4065
4134
|
render() {
|
|
4066
|
-
return
|
|
4135
|
+
return w`
|
|
4067
4136
|
<div class="split-view ${this.orientation} ${this._error ? "error" : ""} ${this.isDragging ? "active" : ""}" style="--split-percentage: ${this.percentage}%;">
|
|
4068
4137
|
<span class="error-display">${this._error}</span>
|
|
4069
4138
|
<div class="panel" style="${this.orientation === "horizontal" ? "flex: var(--split-percentage, 50%)" : "max-height: var(--split-percentage, 50%)"}">
|
|
@@ -4078,63 +4147,303 @@ let D = class extends Fs {
|
|
|
4078
4147
|
`;
|
|
4079
4148
|
}
|
|
4080
4149
|
};
|
|
4081
|
-
|
|
4150
|
+
j.styles = ac;
|
|
4082
4151
|
U([
|
|
4083
4152
|
v({ type: String })
|
|
4084
|
-
],
|
|
4153
|
+
], j.prototype, "orientation", 2);
|
|
4085
4154
|
U([
|
|
4086
4155
|
v({ type: Number, reflect: !0 })
|
|
4087
|
-
],
|
|
4156
|
+
], j.prototype, "percentage", 2);
|
|
4088
4157
|
U([
|
|
4089
4158
|
v({ type: Boolean })
|
|
4090
|
-
],
|
|
4159
|
+
], j.prototype, "invisible", 2);
|
|
4091
4160
|
U([
|
|
4092
4161
|
v({ type: Number, reflect: !0 })
|
|
4093
|
-
],
|
|
4162
|
+
], j.prototype, "min", 2);
|
|
4094
4163
|
U([
|
|
4095
4164
|
v({ type: Number, reflect: !0 })
|
|
4096
|
-
],
|
|
4165
|
+
], j.prototype, "max", 2);
|
|
4097
4166
|
U([
|
|
4098
4167
|
v({ type: Boolean, reflect: !0 })
|
|
4099
|
-
],
|
|
4168
|
+
], j.prototype, "useSavedState", 2);
|
|
4100
4169
|
U([
|
|
4101
|
-
|
|
4102
|
-
],
|
|
4170
|
+
St()
|
|
4171
|
+
], j.prototype, "isDragging", 2);
|
|
4103
4172
|
U([
|
|
4104
|
-
|
|
4105
|
-
],
|
|
4173
|
+
St()
|
|
4174
|
+
], j.prototype, "_error", 2);
|
|
4106
4175
|
U([
|
|
4107
|
-
|
|
4108
|
-
],
|
|
4176
|
+
kt(".splitter")
|
|
4177
|
+
], j.prototype, "_splitter", 2);
|
|
4109
4178
|
U([
|
|
4110
|
-
|
|
4111
|
-
],
|
|
4179
|
+
Ze("slot[name='panel1']")
|
|
4180
|
+
], j.prototype, "_panel1", 2);
|
|
4112
4181
|
U([
|
|
4113
|
-
|
|
4114
|
-
],
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
],
|
|
4182
|
+
Ze("slot[name='panel2']")
|
|
4183
|
+
], j.prototype, "_panel2", 2);
|
|
4184
|
+
j = U([
|
|
4185
|
+
N(uc)
|
|
4186
|
+
], j);
|
|
4187
|
+
var dc = Object.defineProperty, fc = Object.getOwnPropertyDescriptor, Le = (s, r, o, i) => {
|
|
4188
|
+
for (var c = i > 1 ? void 0 : i ? fc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4189
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4190
|
+
return i && c && dc(r, o, c), c;
|
|
4191
|
+
};
|
|
4192
|
+
const hc = "spectric-pagination";
|
|
4193
|
+
console.log("Pagination");
|
|
4194
|
+
let ve = class extends O {
|
|
4195
|
+
constructor() {
|
|
4196
|
+
super(...arguments), this.page = 1, this.pageSize = 10, this.pageSizeOptions = [10, 20, 50, 100, 1e3], this.size = "small", this._handlePageUp = () => {
|
|
4197
|
+
this.page += 1, this._emitChange();
|
|
4198
|
+
}, this._handlePageDown = () => {
|
|
4199
|
+
this.page -= 1, this._emitChange();
|
|
4200
|
+
}, this._handleSizeChange = (s) => {
|
|
4201
|
+
let r = parseInt(s.target.value);
|
|
4202
|
+
this.pageSize = r, this._emitChange();
|
|
4203
|
+
}, this._emitChange = () => {
|
|
4204
|
+
let { page: s, pageSize: r } = this;
|
|
4205
|
+
this.dispatchEvent(new CustomEvent("change", { detail: { page: s, pageSize: r } }));
|
|
4206
|
+
};
|
|
4207
|
+
}
|
|
4208
|
+
createRenderRoot() {
|
|
4209
|
+
return this;
|
|
4210
|
+
}
|
|
4211
|
+
updated(s) {
|
|
4212
|
+
s.has("pageSize") && !this.pageSizeOptions.includes(this.pageSize) && (this.pageSizeOptions = [...this.pageSizeOptions, this.pageSize].sort((r, o) => r - o));
|
|
4213
|
+
}
|
|
4214
|
+
render() {
|
|
4215
|
+
let s = this.page * this.pageSize, r = !0;
|
|
4216
|
+
this.totalItems && s < this.totalItems && (r = !1);
|
|
4217
|
+
let o = "";
|
|
4218
|
+
return this.totalItems && (o = `${this.page} of ${Math.ceil(this.totalItems / this.pageSize)}`), w`
|
|
4219
|
+
<div class="spectric-pagination-container">
|
|
4220
|
+
<div>
|
|
4221
|
+
<!-- TODO/FIXME Make a select component and use it for cross browser styling-->
|
|
4222
|
+
<select @change=${this._handleSizeChange} .value=${String(this.pageSize)}>
|
|
4223
|
+
${this.pageSizeOptions.map((i) => w`<option .value=${String(i)} class=${String(i) === String(this.pageSize) ? "selected" : ""}>${i}</option>`)}
|
|
4224
|
+
</select>
|
|
4225
|
+
</div>
|
|
4226
|
+
${this.totalItems ? w`
|
|
4227
|
+
<div class="spectric-pagination-text">${`Items ${(this.page - 1) * this.pageSize}-${Math.min(this.page * this.pageSize, this.totalItems)} of ${this.totalItems}`}</div>
|
|
4228
|
+
<div class="spectric-pagination-container">
|
|
4229
|
+
<div>
|
|
4230
|
+
${o}
|
|
4231
|
+
</div>
|
|
4232
|
+
<div>
|
|
4233
|
+
<spectric-button size=${this.size} ?disabled=${this.page === 1} @click=${this._handlePageDown}><</spectric-button>
|
|
4234
|
+
<spectric-button size=${this.size} ?disabled=${r} @click=${this._handlePageUp}>></spectric-button>
|
|
4235
|
+
</div>
|
|
4236
|
+
</div>
|
|
4237
|
+
` : null}
|
|
4238
|
+
</div>
|
|
4239
|
+
`;
|
|
4240
|
+
}
|
|
4241
|
+
};
|
|
4242
|
+
Le([
|
|
4243
|
+
v({ type: Number, reflect: !0 })
|
|
4244
|
+
], ve.prototype, "page", 2);
|
|
4245
|
+
Le([
|
|
4246
|
+
v({ type: Number, reflect: !0 })
|
|
4247
|
+
], ve.prototype, "pageSize", 2);
|
|
4248
|
+
Le([
|
|
4249
|
+
v({ type: Number, reflect: !0 })
|
|
4250
|
+
], ve.prototype, "totalItems", 2);
|
|
4251
|
+
Le([
|
|
4252
|
+
v({ type: Array })
|
|
4253
|
+
], ve.prototype, "pageSizeOptions", 2);
|
|
4254
|
+
Le([
|
|
4255
|
+
v({ type: String, reflect: !0 })
|
|
4256
|
+
], ve.prototype, "size", 2);
|
|
4257
|
+
ve = Le([
|
|
4258
|
+
N(hc)
|
|
4259
|
+
], ve);
|
|
4260
|
+
var gc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor, ni = (s, r, o, i) => {
|
|
4261
|
+
for (var c = i > 1 ? void 0 : i ? bc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4262
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4263
|
+
return i && c && gc(r, o, c), c;
|
|
4264
|
+
};
|
|
4265
|
+
const vc = "spectric-table-header";
|
|
4266
|
+
let rr = class extends O {
|
|
4267
|
+
constructor() {
|
|
4268
|
+
super(...arguments), this.columns = [];
|
|
4269
|
+
}
|
|
4270
|
+
createRenderRoot() {
|
|
4271
|
+
return this;
|
|
4272
|
+
}
|
|
4273
|
+
render() {
|
|
4274
|
+
return w`
|
|
4275
|
+
<tr>
|
|
4276
|
+
${this.columns.map((s) => {
|
|
4277
|
+
let r = ["header-contents"];
|
|
4278
|
+
return s.filterable, w`<td><div class=${r.join(" ")}>${s.title || s.key}</div></td>`;
|
|
4279
|
+
})}
|
|
4280
|
+
</tr>
|
|
4281
|
+
`;
|
|
4282
|
+
}
|
|
4283
|
+
};
|
|
4284
|
+
ni([
|
|
4285
|
+
v({ type: Array, attribute: !1 })
|
|
4286
|
+
], rr.prototype, "columns", 2);
|
|
4287
|
+
rr = ni([
|
|
4288
|
+
N(vc)
|
|
4289
|
+
], rr);
|
|
4290
|
+
var yc = Object.defineProperty, mc = Object.getOwnPropertyDescriptor, fr = (s, r, o, i) => {
|
|
4291
|
+
for (var c = i > 1 ? void 0 : i ? mc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4292
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4293
|
+
return i && c && yc(r, o, c), c;
|
|
4294
|
+
};
|
|
4295
|
+
const $c = "spectric-table-cell";
|
|
4296
|
+
let wt = class extends O {
|
|
4297
|
+
constructor() {
|
|
4298
|
+
super(...arguments), this._handleFilterOut = () => {
|
|
4299
|
+
let s;
|
|
4300
|
+
this.column.key && typeof this.row == "object" && (s = this.row[this.column.key]), this.dispatchEvent(new CustomEvent("filter", {
|
|
4301
|
+
composed: !0,
|
|
4302
|
+
bubbles: !0,
|
|
4303
|
+
detail: {
|
|
4304
|
+
include: !1,
|
|
4305
|
+
row: this.row,
|
|
4306
|
+
value: s,
|
|
4307
|
+
column: this.column
|
|
4308
|
+
}
|
|
4309
|
+
}));
|
|
4310
|
+
}, this._handleFilterFor = () => {
|
|
4311
|
+
let s;
|
|
4312
|
+
this.column.key && typeof this.row == "object" && (s = this.row[this.column.key]), this.dispatchEvent(new CustomEvent("filter", {
|
|
4313
|
+
composed: !0,
|
|
4314
|
+
bubbles: !0,
|
|
4315
|
+
detail: {
|
|
4316
|
+
include: !0,
|
|
4317
|
+
row: this.row,
|
|
4318
|
+
value: s,
|
|
4319
|
+
column: this.column
|
|
4320
|
+
}
|
|
4321
|
+
}));
|
|
4322
|
+
};
|
|
4323
|
+
}
|
|
4324
|
+
createRenderRoot() {
|
|
4325
|
+
return this;
|
|
4326
|
+
}
|
|
4327
|
+
render() {
|
|
4328
|
+
let s;
|
|
4329
|
+
this.column.render ? s = this.column.render(this.row, this.table) : this.column.key && typeof this.row == "object" ? s = this.row[this.column.key] : s = w`error`;
|
|
4330
|
+
let r = ["cell-contents"];
|
|
4331
|
+
this.column.filterable && r.push("filterable");
|
|
4332
|
+
let o = w`<div class="table-cell-actions"><spectric-button @click=${this._handleFilterOut} size="tiny" variant="text" icon>-</spectric-button><spectric-button @click=${this._handleFilterFor} size="tiny" variant="text" icon>+</spectric-button></div>`;
|
|
4333
|
+
return w`
|
|
4334
|
+
<td>
|
|
4335
|
+
${this.column.filterable ? o : null}
|
|
4336
|
+
<div class=${r.join(" ")}>${s}</div>
|
|
4337
|
+
</td>
|
|
4338
|
+
`;
|
|
4339
|
+
}
|
|
4340
|
+
};
|
|
4341
|
+
fr([
|
|
4342
|
+
v({ type: Object, attribute: !1 })
|
|
4343
|
+
], wt.prototype, "row", 2);
|
|
4344
|
+
fr([
|
|
4345
|
+
v({ type: Object, attribute: !1 })
|
|
4346
|
+
], wt.prototype, "column", 2);
|
|
4347
|
+
wt = fr([
|
|
4348
|
+
N($c)
|
|
4349
|
+
], wt);
|
|
4350
|
+
var _c = Object.defineProperty, wc = Object.getOwnPropertyDescriptor, hr = (s, r, o, i) => {
|
|
4351
|
+
for (var c = i > 1 ? void 0 : i ? wc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4352
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4353
|
+
return i && c && _c(r, o, c), c;
|
|
4354
|
+
};
|
|
4355
|
+
const xc = "spectric-table-body";
|
|
4356
|
+
let xt = class extends O {
|
|
4357
|
+
constructor() {
|
|
4358
|
+
super(...arguments), this.data = [], this.columns = [];
|
|
4359
|
+
}
|
|
4360
|
+
createRenderRoot() {
|
|
4361
|
+
return this;
|
|
4362
|
+
}
|
|
4363
|
+
render() {
|
|
4364
|
+
return w`
|
|
4365
|
+
<body>
|
|
4366
|
+
${this.data.map((s) => w`<tr>${this.columns.map((r) => w`<spectric-table-cell .column=${r} .row=${s}></spectric-table-cell>`)}</tr>`)}
|
|
4367
|
+
</body>
|
|
4368
|
+
`;
|
|
4369
|
+
}
|
|
4370
|
+
};
|
|
4371
|
+
hr([
|
|
4372
|
+
v({ type: Array, attribute: !1 })
|
|
4373
|
+
], xt.prototype, "data", 2);
|
|
4374
|
+
hr([
|
|
4375
|
+
v({ type: Array, attribute: !1 })
|
|
4376
|
+
], xt.prototype, "columns", 2);
|
|
4377
|
+
xt = hr([
|
|
4378
|
+
N(xc)
|
|
4379
|
+
], xt);
|
|
4380
|
+
var Ac = Object.defineProperty, Sc = Object.getOwnPropertyDescriptor, Ot = (s, r, o, i) => {
|
|
4381
|
+
for (var c = i > 1 ? void 0 : i ? Sc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4382
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4383
|
+
return i && c && Ac(r, o, c), c;
|
|
4384
|
+
};
|
|
4385
|
+
const kc = "spectric-table";
|
|
4386
|
+
let Ye = class extends O {
|
|
4387
|
+
constructor() {
|
|
4388
|
+
super(...arguments), this.data = [], this.columns = [], this._handlePaginationChange = (s) => {
|
|
4389
|
+
s.preventDefault(), s.stopPropagation(), this.pagination && (this.pagination.size, this.pagination = { ...this.pagination, ...s.detail }), this._emitChange();
|
|
4390
|
+
}, this._emitChange = () => {
|
|
4391
|
+
let { pagination: s } = this;
|
|
4392
|
+
this.dispatchEvent(new CustomEvent("change", { detail: { pagination: s } }));
|
|
4393
|
+
}, this.__DO_NOT_USE_filter = () => {
|
|
4394
|
+
this.dispatchEvent(new CustomEvent("filter"));
|
|
4395
|
+
};
|
|
4396
|
+
}
|
|
4397
|
+
createRenderRoot() {
|
|
4398
|
+
return this;
|
|
4399
|
+
}
|
|
4400
|
+
render() {
|
|
4401
|
+
let s = this.columns.filter((r) => !r.hidden);
|
|
4402
|
+
return w`
|
|
4403
|
+
<div role="table">
|
|
4404
|
+
<spectric-table-header .columns=${s}></spectric-table-header>
|
|
4405
|
+
<spectric-table-body .columns=${s} .data=${this.data} .table=${this}></spectric-table-body>
|
|
4406
|
+
</div>
|
|
4407
|
+
${this.pagination ? w`<spectric-pagination ${gt(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>` : null}
|
|
4408
|
+
`;
|
|
4409
|
+
}
|
|
4410
|
+
};
|
|
4411
|
+
Ot([
|
|
4412
|
+
v({ type: Array, attribute: !1 })
|
|
4413
|
+
], Ye.prototype, "data", 2);
|
|
4414
|
+
Ot([
|
|
4415
|
+
v({ type: Object, attribute: !1 })
|
|
4416
|
+
], Ye.prototype, "pagination", 2);
|
|
4417
|
+
Ot([
|
|
4418
|
+
v({ attribute: !1 })
|
|
4419
|
+
], Ye.prototype, "columns", 2);
|
|
4420
|
+
Ye = Ot([
|
|
4421
|
+
N(kc)
|
|
4422
|
+
], Ye);
|
|
4118
4423
|
export {
|
|
4119
4424
|
V as BitDisplayCanvas,
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4425
|
+
fn as ButtonSizes,
|
|
4426
|
+
hn as ButtonVariants,
|
|
4427
|
+
Lc as CSSPropsControls,
|
|
4428
|
+
I as DialogElement,
|
|
4429
|
+
ri as DialogElementTag,
|
|
4430
|
+
uc as ElementTag,
|
|
4431
|
+
Oe as Header,
|
|
4432
|
+
Rn as InputVariants,
|
|
4433
|
+
pc as Orientations,
|
|
4434
|
+
ve as PaginationElement,
|
|
4435
|
+
hc as PaginationElementTag,
|
|
4436
|
+
K as SpectricButton,
|
|
4130
4437
|
E as SpectricInput,
|
|
4131
4438
|
B as SpectricPage,
|
|
4132
|
-
|
|
4439
|
+
We as SpectricPanel,
|
|
4133
4440
|
Q as SpectricQuery,
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4441
|
+
_t as SpectricThemeProvider,
|
|
4442
|
+
j as SplitView,
|
|
4443
|
+
Ga as SupportedLanguages,
|
|
4444
|
+
Ye as TableElement,
|
|
4445
|
+
kc as TableElementTag,
|
|
4446
|
+
Nc as ThemeSelections,
|
|
4138
4447
|
ne as nodeTypes
|
|
4139
4448
|
};
|
|
4140
4449
|
//# sourceMappingURL=index.es.js.map
|