@spectric/ui 0.0.6 → 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.
Files changed (110) hide show
  1. package/dist/components/Button.d.ts +8 -3
  2. package/dist/components/index.d.ts +2 -0
  3. package/dist/components/input.d.ts +3 -1
  4. package/dist/components/pagination/index.d.ts +1 -0
  5. package/dist/components/pagination/pagination.d.ts +60 -0
  6. package/dist/components/query_bar/QueryBar.d.ts +2 -3
  7. package/dist/components/table/body.d.ts +44 -0
  8. package/dist/components/table/cell.d.ts +53 -0
  9. package/dist/components/table/header.d.ts +42 -0
  10. package/dist/components/table/index.d.ts +1 -0
  11. package/dist/components/table/table.d.ts +90 -0
  12. package/dist/custom-elements.json +105 -6
  13. package/dist/index.es.js +1454 -1144
  14. package/dist/index.es.js.map +1 -1
  15. package/dist/index.umd.js +178 -72
  16. package/dist/index.umd.js.map +1 -1
  17. package/dist/style.css +1 -1
  18. package/package.json +2 -2
  19. package/src/components/Button.ts +12 -4
  20. package/src/components/button.css.ts +66 -0
  21. package/src/components/index.ts +3 -1
  22. package/src/components/input.ts +19 -2
  23. package/src/components/pagination/index.ts +1 -0
  24. package/src/components/pagination/pagination.css +10 -0
  25. package/src/components/pagination/pagination.ts +133 -0
  26. package/src/components/query_bar/QueryBar.ts +7 -21
  27. package/src/components/table/body.ts +69 -0
  28. package/src/components/table/cell.ts +117 -0
  29. package/src/components/table/header.ts +68 -0
  30. package/src/components/table/index.ts +1 -0
  31. package/src/components/table/table.css +36 -0
  32. package/src/components/table/table.ts +131 -0
  33. package/src/stories/Button.stories.ts +3 -2
  34. package/src/stories/QueryBar.stories.ts +7 -0
  35. package/src/stories/fixtures/data.ts +3 -0
  36. package/src/stories/pagination.stories.ts +63 -0
  37. package/src/stories/table.stories.ts +74 -0
  38. package/dist/assets/Banner-CZ3qKIQC.js +0 -172
  39. package/dist/assets/Banner.stories-BMf4MBpI.js +0 -19
  40. package/dist/assets/BitDisplay.stories-wztXxpxe.js +0 -18
  41. package/dist/assets/Bits-C_TSTjST.js +0 -1
  42. package/dist/assets/Button.stories-gHxjWwVf.js +0 -142
  43. package/dist/assets/Color-F6OSRLHC-AjFOL-zN.js +0 -1
  44. package/dist/assets/DocsRenderer-CFRXHY34-CvW79YxE.js +0 -761
  45. package/dist/assets/Header.stories-Bc09U6g1.js +0 -25
  46. package/dist/assets/Page.stories-DNJKhAFs.js +0 -114
  47. package/dist/assets/QueryBar.stories-Da5C-SV4.js +0 -17
  48. package/dist/assets/_commonjsHelpers-Cpj98o6Y.js +0 -1
  49. package/dist/assets/chunk-L4EGOTBX-AI5g0G5Z.js +0 -2
  50. package/dist/assets/data-CwENMT7L.js +0 -3
  51. package/dist/assets/dialog-CFHXbUTQ.js +0 -611
  52. package/dist/assets/directive-helpers-IbK5tOA8.js +0 -5
  53. package/dist/assets/entry-preview-Di-j0SPB.js +0 -4
  54. package/dist/assets/entry-preview-docs-CUBRpM7y.js +0 -1
  55. package/dist/assets/iframe-BQFuVTVZ.js +0 -2
  56. package/dist/assets/index-BCiKWbv6.js +0 -1
  57. package/dist/assets/index-BHYIh-Xd.js +0 -8
  58. package/dist/assets/index-DBGhiA-l.js +0 -1
  59. package/dist/assets/index-DrFu-skq.js +0 -6
  60. package/dist/assets/index-oFsFREWh.js +0 -9
  61. package/dist/assets/input.stories-Cgdv-5bN.js +0 -58
  62. package/dist/assets/lit-element-UdLzEcH-.js +0 -19
  63. package/dist/assets/preview-BWzBA1C2.js +0 -396
  64. package/dist/assets/preview-CGiTbRot.js +0 -2
  65. package/dist/assets/preview-D77C14du.js +0 -34
  66. package/dist/assets/preview-DEMzn_yN.js +0 -1
  67. package/dist/assets/preview-DFmD0pui.js +0 -1
  68. package/dist/assets/preview-DGUiP6tS.js +0 -7
  69. package/dist/assets/preview-DQVTHjv1.js +0 -182
  70. package/dist/assets/preview-aVwhiz9X.js +0 -1
  71. package/dist/assets/tiny-invariant-CopsF_GD.js +0 -1
  72. package/dist/components/input.css.d.ts +0 -2
  73. package/dist/favicon.svg +0 -1
  74. package/dist/iframe.html +0 -639
  75. package/dist/index.html +0 -190
  76. package/dist/index.json +0 -1
  77. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  78. package/dist/nunito-sans-bold.woff2 +0 -0
  79. package/dist/nunito-sans-italic.woff2 +0 -0
  80. package/dist/nunito-sans-regular.woff2 +0 -0
  81. package/dist/project.json +0 -1
  82. package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js +0 -333
  83. package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js.LEGAL.txt +0 -40
  84. package/dist/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  85. package/dist/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  86. package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
  87. package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  88. package/dist/sb-addons/essentials-controls-1/manager-bundle.js +0 -391
  89. package/dist/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -0
  90. package/dist/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
  91. package/dist/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
  92. package/dist/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
  93. package/dist/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
  94. package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
  95. package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
  96. package/dist/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
  97. package/dist/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
  98. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
  99. package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  100. package/dist/sb-common-assets/favicon.svg +0 -1
  101. package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  102. package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  103. package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  104. package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  105. package/dist/sb-manager/globals-module-info.js +0 -1028
  106. package/dist/sb-manager/globals-runtime.js +0 -40861
  107. package/dist/sb-manager/globals.js +0 -48
  108. package/dist/sb-manager/runtime.js +0 -13338
  109. package/dist/sb-preview/globals.js +0 -33
  110. package/dist/sb-preview/runtime.js +0 -7174
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 lt = globalThis, Xt = lt.ShadowRoot && (lt.ShadyCSS === void 0 || lt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Gt = Symbol(), fs = /* @__PURE__ */ new WeakMap();
7
- let Es = class {
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 !== Gt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
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 (Xt && r === void 0) {
15
+ if (sr && r === void 0) {
16
16
  const i = o !== void 0 && o.length === 1;
17
- i && (r = fs.get(o)), r === void 0 && ((this.o = r = new CSSStyleSheet()).replaceSync(this.cssText), i && fs.set(o, 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 Lo = (s) => new Es(typeof s == "string" ? s : s + "", void 0, Gt), K = (s, ...r) => {
26
- const o = s.length === 1 ? s[0] : r.reduce((i, c, t) => i + ((p) => {
27
- if (p._$cssResult$ === !0) return p.cssText;
28
- if (typeof p == "number") return p;
29
- throw Error("Value passed to 'css' function must be a 'css' function result: " + p + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
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 Es(o, s, Gt);
32
- }, No = (s, r) => {
33
- if (Xt) s.adoptedStyleSheets = r.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
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 = lt.litNonce;
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
- }, hs = Xt ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((r) => {
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 Lo(o);
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: Do, defineProperty: jo, getOwnPropertyDescriptor: Ro, getOwnPropertyNames: Bo, getOwnPropertySymbols: Uo, getPrototypeOf: Mo } = Object, oe = globalThis, bs = oe.trustedTypes, zo = bs ? bs.emptyScript : "", zt = oe.reactiveElementPolyfillSupport, Ue = (s, r) => s, dt = { toAttribute(s, r) {
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 ? zo : null;
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
- } }, Jt = (s, r) => !Do(s, r), gs = { attribute: !0, type: String, converter: dt, reflect: !1, hasChanged: Jt };
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 = gs) {
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 && jo(this.prototype, r, c);
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 } = Ro(this.prototype, r) ?? { get() {
92
+ const { get: c, set: t } = Wo(this.prototype, r) ?? { get() {
93
93
  return this[o];
94
- }, set(p) {
95
- this[o] = p;
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(p) {
100
- const b = c == null ? void 0 : c.call(this);
101
- t.call(this, p), this.requestUpdate(r, b, i);
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) ?? gs;
105
+ return this.elementProperties.get(r) ?? Ss;
106
106
  }
107
107
  static _$Ei() {
108
- if (this.hasOwnProperty(Ue("elementProperties"))) return;
109
- const r = Mo(this);
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(Ue("finalized"))) return;
114
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Ue("properties"))) {
115
- const o = this.properties, i = [...Bo(o), ...Uo(o)];
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(hs(c));
135
- } else r !== void 0 && o.push(hs(r));
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 No(r, this.constructor.elementStyles), r;
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 p = (((t = i.converter) == null ? void 0 : t.toAttribute) !== void 0 ? i.converter : dt).toAttribute(o, i.type);
190
- this._$Em = r, p == null ? this.removeAttribute(c) : this.setAttribute(c, p), this._$Em = null;
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 p = i.getPropertyOptions(c), b = typeof p.converter == "function" ? { fromAttribute: p.converter } : ((t = p.converter) == null ? void 0 : t.fromAttribute) !== void 0 ? p.converter : dt;
198
- this._$Em = c, this[c] = b.fromAttribute(o, p.type), this._$Em = null;
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 ?? Jt)(this[r], o)) return;
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, p] of this._$Ep) this[t] = p;
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, p] of c) p.wrapped !== !0 || this._$AL.has(t) || this[t] === void 0 || this.P(t, this[t], p);
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[Ue("elementProperties")] = /* @__PURE__ */ new Map(), ke[Ue("finalized")] = /* @__PURE__ */ new Map(), zt == null || zt({ ReactiveElement: ke }), (oe.reactiveElementVersions ?? (oe.reactiveElementVersions = [])).push("2.0.4");
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 Me = globalThis, ft = Me.trustedTypes, vs = ft ? ft.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Os = "$lit$", ie = `lit$${Math.random().toFixed(9).slice(2)}$`, Ts = "?" + ie, Fo = `<${Ts}>`, de = document, Fe = () => de.createComment(""), Qe = (s) => s === null || typeof s != "object" && typeof s != "function", Vt = Array.isArray, Qo = (s) => Vt(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Ft = `[
283
- \f\r]`, Be = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ys = /-->/g, ms = />/g, ue = RegExp(`>|${Ft}(?:([^\\s"'>=/]+)(${Ft}*=${Ft}*(?:[^
284
- \f\r"'\`<>=]|("|')|))|$)`, "g"), $s = /'/g, _s = /"/g, Ps = /^(?:script|style|textarea|title)$/i, Io = (s) => (r, ...o) => ({ _$litType$: s, strings: r, values: o }), A = Io(1), fe = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), ws = /* @__PURE__ */ new WeakMap(), pe = de.createTreeWalker(de, 129);
285
- function Ls(s, r) {
286
- if (!Vt(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
287
- return vs !== void 0 ? vs.createHTML(r) : r;
288
- }
289
- const Ho = (s, r) => {
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>" : "", p = Be;
292
- for (let b = 0; b < o; b++) {
293
- const g = s[b];
294
- let w, x, _ = -1, k = 0;
295
- for (; k < g.length && (p.lastIndex = k, x = p.exec(g), x !== null); ) k = p.lastIndex, p === Be ? x[1] === "!--" ? p = ys : x[1] !== void 0 ? p = ms : x[2] !== void 0 ? (Ps.test(x[2]) && (c = RegExp("</" + x[2], "g")), p = ue) : x[3] !== void 0 && (p = ue) : p === ue ? x[0] === ">" ? (p = c ?? Be, _ = -1) : x[1] === void 0 ? _ = -2 : (_ = p.lastIndex - x[2].length, w = x[1], p = x[3] === void 0 ? ue : x[3] === '"' ? _s : $s) : p === _s || p === $s ? p = ue : p === ys || p === ms ? p = Be : (p = ue, c = void 0);
296
- const S = p === ue && s[b + 1].startsWith("/>") ? " " : "";
297
- t += p === Be ? g + Fo : _ >= 0 ? (i.push(w), g.slice(0, _) + Os + g.slice(_) + ie + S) : g + ie + (_ === -2 ? b : S);
298
- }
299
- return [Ls(s, t + (s[o] || "<?>") + (r === 2 ? "</svg>" : r === 3 ? "</math>" : "")), i];
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 Ie {
301
+ class qe {
302
302
  constructor({ strings: r, _$litType$: o }, i) {
303
303
  let c;
304
304
  this.parts = [];
305
- let t = 0, p = 0;
306
- const b = r.length - 1, g = this.parts, [w, x] = Ho(r, o);
307
- if (this.el = Ie.createElement(w, i), pe.currentNode = this.el.content, o === 2 || o === 3) {
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 = pe.nextNode()) !== null && g.length < b; ) {
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(Os)) {
314
- const k = x[p++], S = c.getAttribute(_).split(ie), j = /([.?@])?(.*)/.exec(k);
315
- g.push({ type: 1, index: t, name: j[2], strings: S, ctor: j[1] === "." ? Wo : j[1] === "?" ? Yo : j[1] === "@" ? Ko : yt }), c.removeAttribute(_);
316
- } else _.startsWith(ie) && (g.push({ type: 6, index: t }), c.removeAttribute(_));
317
- if (Ps.test(c.tagName)) {
318
- const _ = c.textContent.split(ie), k = _.length - 1;
319
- if (k > 0) {
320
- c.textContent = ft ? ft.emptyScript : "";
321
- for (let S = 0; S < k; S++) c.append(_[S], Fe()), pe.nextNode(), g.push({ type: 2, index: ++t });
322
- c.append(_[k], Fe());
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 === Ts) g.push({ type: 2, index: t });
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; ) g.push({ type: 7, index: t }), _ += ie.length - 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 = de.createElement("template");
334
+ const i = fe.createElement("template");
335
335
  return i.innerHTML = r, i;
336
336
  }
337
337
  }
338
- function Ce(s, r, o = s, i) {
339
- var p, b;
340
- if (r === fe) return r;
341
- let c = i !== void 0 ? (p = o._$Co) == null ? void 0 : p[i] : o._$Cl;
342
- const t = Qe(r) ? void 0 : r._$litDirective$;
343
- return (c == null ? void 0 : c.constructor) !== t && ((b = c == null ? void 0 : c._$AO) == null || b.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 = Ce(s, c._$AS(s, r.values), c, i)), r;
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 qo {
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) ?? de).importNode(o, !0);
357
- pe.currentNode = c;
358
- let t = pe.nextNode(), p = 0, b = 0, g = i[0];
359
- for (; g !== void 0; ) {
360
- if (p === g.index) {
361
- let w;
362
- g.type === 2 ? w = new qe(t, t.nextSibling, this, r) : g.type === 1 ? w = new g.ctor(t, g.name, g.strings, this, r) : g.type === 6 && (w = new Zo(t, this, r)), this._$AV.push(w), g = i[++b];
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
- p !== (g == null ? void 0 : g.index) && (t = pe.nextNode(), p++);
364
+ u !== (b == null ? void 0 : b.index) && (t = de.nextNode(), u++);
365
365
  }
366
- return pe.currentNode = de, c;
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 qe {
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 = Ce(this, r, o), Qe(r) ? r === C || r == null || r === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : r !== this._$AH && r !== fe && this._(r) : r._$litType$ !== void 0 ? this.$(r) : r.nodeType !== void 0 ? this.T(r) : Qo(r) ? this.k(r) : this._(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 && Qe(this._$AH) ? this._$AA.nextSibling.data = r : this.T(de.createTextNode(r)), this._$AH = r;
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 = Ie.createElement(Ls(i.h, i.h[0]), this.options)), i);
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 p = new qo(c, this), b = p.u(this.options);
410
- p.p(o), this.T(b), this._$AH = p;
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 = ws.get(r.strings);
415
- return o === void 0 && ws.set(r.strings, o = new Ie(r)), o;
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
- Vt(this._$AH) || (this._$AH = [], this._$AR());
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 qe(this.O(Fe()), this.O(Fe()), this, this.options)) : i = o[c], i._$AI(t), c++;
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 yt {
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 p = !1;
449
- if (t === void 0) r = Ce(this, r, o, 0), p = !Qe(r) || r !== this._$AH && r !== fe, p && (this._$AH = 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 b = r;
452
- let g, w;
453
- for (r = t[0], g = 0; g < t.length - 1; g++) w = Ce(this, b[i + g], o, g), w === fe && (w = this._$AH[g]), p || (p = !Qe(w) || w !== this._$AH[g]), w === C ? r = C : r !== C && (r += (w ?? "") + t[g + 1]), this._$AH[g] = w;
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
- p && !c && this.j(r);
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 Wo extends yt {
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 Yo extends yt {
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 Ko extends yt {
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 = Ce(this, r, o, 0) ?? C) === fe) return;
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 Zo {
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
- Ce(this, r);
499
+ Ee(this, r);
500
500
  }
501
501
  }
502
- const Qt = Me.litHtmlPolyfillSupport;
503
- Qt == null || Qt(Ie, qe), (Me.litHtmlVersions ?? (Me.litHtmlVersions = [])).push("3.2.1");
504
- const Ns = (s, r, o) => {
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 qe(r.insertBefore(Fe(), t), t, void 0, o ?? {});
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 L = class extends ke {
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 = Ns(o, this.renderRoot, this.renderOptions);
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 fe;
540
+ return he;
541
541
  }
542
542
  };
543
- var Cs;
544
- L._$litElement$ = !0, L.finalized = !0, (Cs = globalThis.litElementHydrateSupport) == null || Cs.call(globalThis, { LitElement: L });
545
- const It = globalThis.litElementPolyfillSupport;
546
- It == null || It({ LitElement: L });
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 Ds = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, er = (s) => (...r) => ({ _$litDirective$: s, values: r });
554
- let js = class {
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 Rs = "important", Xo = " !" + Rs, Bs = er(class extends js {
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 !== Ds.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.");
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(Xo);
595
- i.includes("-") || t ? o.setProperty(i, t ? c.slice(0, -11) : c, t ? Rs : "") : o[i] = c;
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 fe;
598
+ return he;
599
599
  }
600
- }), Go = K`
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 I = (s) => (r, o) => {
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 Jo = { attribute: !0, type: String, converter: dt, reflect: !1, hasChanged: Jt }, Vo = (s = Jo, r, o) => {
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: p } = o;
779
- return { set(b) {
780
- const g = r.get.call(this);
781
- r.set.call(this, b), this.requestUpdate(p, g, s);
782
- }, init(b) {
783
- return b !== void 0 && this.P(p, void 0, s), b;
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: p } = o;
788
- return function(b) {
789
- const g = this[p];
790
- r.call(this, b), this.requestUpdate(p, g, s);
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" ? Vo(s, r, o) : ((i, c, t) => {
797
- const p = c.hasOwnProperty(t);
798
- return c.constructor.createProperty(t, p ? { ...i, wrapped: !0 } : i), p ? Object.getOwnPropertyDescriptor(c, t) : void 0;
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 mt(s) {
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 Us = (s, r, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof r != "object" && Object.defineProperty(s, r, o), o);
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 We(s, r) {
886
+ function Ze(s, r) {
821
887
  return (o, i, c) => {
822
- const t = (p) => {
823
- var b;
824
- return ((b = p.renderRoot) == null ? void 0 : b.querySelector(s)) ?? null;
888
+ const t = (u) => {
889
+ var g;
890
+ return ((g = u.renderRoot) == null ? void 0 : g.querySelector(s)) ?? null;
825
891
  };
826
- return Us(o, i, { get() {
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 $t(s) {
837
- return (r, o) => Us(r, o, { async get() {
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 en = Object.defineProperty, tn = Object.getOwnPropertyDescriptor, ge = (s, r, o, i) => {
843
- for (var c = i > 1 ? void 0 : i ? tn(r, o) : r, t = s.length - 1, p; t >= 0; t--)
844
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
845
- return i && c && en(r, o, c), c;
846
- }, rn = /* @__PURE__ */ ((s) => (s.large = "large", s.medium = "medium", s.small = "small", s))(rn || {}), sn = /* @__PURE__ */ ((s) => (s.primary = "primary", s.secondary = "secondary", s.text = "text", s))(sn || {});
847
- const on = {
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 J = class extends L {
918
+ let K = class extends O {
853
919
  constructor() {
854
- super(...arguments), this.variant = "primary", this.disabled = !1, this.size = "large", this.label = "", this.danger = !1, this._onClick = (s) => {
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 = on[this.variant] || "spectric-button--primary";
874
- return A`
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=${Bs({ backgroundColor: this.backgroundColor })}
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
- J.styles = Go;
888
- ge([
953
+ K.styles = cn;
954
+ ce([
889
955
  v({ type: String, reflect: !0 })
890
- ], J.prototype, "variant", 2);
891
- ge([
956
+ ], K.prototype, "variant", 2);
957
+ ce([
892
958
  v({ type: Boolean, reflect: !0 })
893
- ], J.prototype, "disabled", 2);
894
- ge([
959
+ ], K.prototype, "disabled", 2);
960
+ ce([
895
961
  v({ type: String, reflect: !0 })
896
- ], J.prototype, "backgroundColor", 2);
897
- ge([
962
+ ], K.prototype, "backgroundColor", 2);
963
+ ce([
898
964
  v({ type: String, reflect: !0 })
899
- ], J.prototype, "size", 2);
900
- ge([
965
+ ], K.prototype, "size", 2);
966
+ ce([
901
967
  v({ type: String, reflect: !0 })
902
- ], J.prototype, "label", 2);
903
- ge([
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
- ], J.prototype, "danger", 2);
906
- J = ge([
907
- I("spectric-button")
908
- ], J);
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 nn = (s) => s.strings === void 0;
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 ze = (s, r) => {
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), ze(c, r);
993
+ for (const c of o) (i = c._$AO) == null || i.call(c, r, !1), Ie(c, r);
925
994
  return !0;
926
- }, ht = (s) => {
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
- }, Ms = (s) => {
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), ln(r);
1006
+ o.add(s), mn(r);
938
1007
  }
939
1008
  };
940
- function an(s) {
941
- this._$AN !== void 0 ? (ht(this), this._$AM = s, Ms(this)) : this._$AM = s;
1009
+ function vn(s) {
1010
+ this._$AN !== void 0 ? (yt(this), this._$AM = s, Ks(this)) : this._$AM = s;
942
1011
  }
943
- function cn(s, r = !1, o = 0) {
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++) ze(i[t], !1), ht(i[t]);
946
- else i != null && (ze(i, !1), ht(i));
947
- else ze(this, s);
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 ln = (s) => {
950
- s.type == Ds.CHILD && (s._$AP ?? (s._$AP = cn), s._$AQ ?? (s._$AQ = an));
1018
+ const mn = (s) => {
1019
+ s.type == Qs.CHILD && (s._$AP ?? (s._$AP = yn), s._$AQ ?? (s._$AQ = vn));
951
1020
  };
952
- class zs extends js {
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), Ms(this), this.isConnected = r._$AU;
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 && (ze(this, r), ht(this));
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 (nn(this._$Ct)) this._$Ct._$AI(r, this);
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 ut = () => new un();
981
- class un {
1049
+ const ft = () => new $n();
1050
+ class $n {
982
1051
  }
983
- const Ht = /* @__PURE__ */ new WeakMap(), pt = er(class extends zs {
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 = Ht.get(r);
996
- o === void 0 && (o = /* @__PURE__ */ new WeakMap(), Ht.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);
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 = Ht.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.Y) : (r = this.Y) == null ? void 0 : r.value;
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
- }), pn = class {
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 xs {
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 Fs extends L {
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 xs(r, o, i));
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 xs(r, o, i));
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 Qs = (s) => {
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 dn = Object.defineProperty, fn = Object.getOwnPropertyDescriptor, ve = (s, r, o, i) => {
1088
- for (var c = i > 1 ? void 0 : i ? fn(r, o) : r, t = s.length - 1, p; t >= 0; t--)
1089
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
1090
- return i && c && dn(r, o, c), 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 hn = ["mousemove", "click", "dblclick", "mousedown", "mouseup", "contextmenu"], at = { width: 200, height: 200 }, bt = { width: 10, height: 10 };
1093
- let V = class extends Fs {
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: ut(),
1097
- canvas: ut(),
1098
- scrollDiv: ut()
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
- hn.forEach((o) => {
1116
- this.addDisposableListener(this._canvas, o, Qs(async (i) => {
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(), p = {
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
- }, b = this.canvasPositionToBit(p);
1123
- if (o === "mousemove" && r[o] == b)
1191
+ }, g = this.canvasPositionToBit(u);
1192
+ if (o === "mousemove" && r[o] == g)
1124
1193
  return;
1125
- r[o] = b;
1126
- let g = "bit" + String(o).charAt(0).toUpperCase() + String(o).slice(1);
1127
- if (b != -1) {
1128
- let w = new CustomEvent(g, {
1129
- detail: { bitIndex: b, position: p, nativeEvent: i }
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(w);
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 pn(this.arrayBuffer));
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 = at.width, height: i = at.height } = this, c = this.getPxPerBit(), t = this.refs.canvas.value.getContext("2d");
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 p = getComputedStyle(this);
1164
- t.fillStyle = p.color, t.clearRect(0, 0, o, i);
1165
- let b = 0;
1166
- for (let g = this.yStart * s + this.xStart, w = r.length; g < w; g++) {
1167
- let x = g % s - this.xStart;
1168
- if (!(x < 0)) {
1169
- if (Math.floor(x * c) > o) {
1170
- b++, g = b * s + this.yStart * s + this.xStart - 1;
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(b * c) > i)
1242
+ if (Math.floor(g * c) > i)
1174
1243
  break;
1175
- r.getBit(g) === 1 && t.fillRect(x, b, 1, 1), (g + 1) % s === 0 && g >= s - 1 && b++;
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 = at.height, width: r = at.width } = this;
1192
- return A`
1260
+ const { height: s = pt.height, width: r = pt.width } = this;
1261
+ return w`
1193
1262
  <div
1194
1263
  id="viewport"
1195
- ${pt(this.refs.viewport)}
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
- ${pt(this.refs.scrollDiv)}
1270
+ ${ht(this.refs.scrollDiv)}
1202
1271
  >
1203
1272
  </div>
1204
1273
  </div>
1205
1274
  <canvas
1206
- ${pt(this.refs.canvas)}
1207
- width=${r - bt.width}
1208
- height=${s - bt.height}
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 = K`
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: ${bt.height}px;
1238
- width: ${bt.width}px;
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
- ve([
1379
+ ye([
1311
1380
  v({ type: Object, attribute: !1 })
1312
1381
  ], V.prototype, "arrayBuffer", 2);
1313
- ve([
1382
+ ye([
1314
1383
  v({ type: Number })
1315
1384
  ], V.prototype, "frameWidth", 2);
1316
- ve([
1385
+ ye([
1317
1386
  v({ type: Number })
1318
1387
  ], V.prototype, "scale", 2);
1319
- ve([
1388
+ ye([
1320
1389
  v({ type: Number })
1321
1390
  ], V.prototype, "width", 2);
1322
- ve([
1391
+ ye([
1323
1392
  v({ type: Number })
1324
1393
  ], V.prototype, "height", 2);
1325
- ve([
1326
- $t("canvas")
1394
+ ye([
1395
+ kt("canvas")
1327
1396
  ], V.prototype, "_canvas", 2);
1328
- V = ve([
1329
- I("spectric-bit-display")
1397
+ V = ye([
1398
+ N("spectric-bit-display")
1330
1399
  ], V);
1331
- const bn = K`.spectric-header {
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 gn = Object.defineProperty, vn = Object.getOwnPropertyDescriptor, _t = (s, r, o, i) => {
1368
- for (var c = i > 1 ? void 0 : i ? vn(r, o) : r, t = s.length - 1, p; t >= 0; t--)
1369
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
1370
- return i && c && gn(r, o, c), 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 Ee = class extends L {
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 A`
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 ? A`
1472
+ ${this.showLoginButton !== !1 ? w`
1404
1473
  <div>
1405
- ${this.username && this.username !== "" ? A`<spectric-button variant="secondary" size="small" @click=${this.onLogout}>Log out</spectric-button>` : A`
1406
- ${this.showCreateAccount !== !1 ? A`<spectric-button variant="text" size="small" @click=${this.onCreateAccount}>Sign up</spectric-button>` : null}
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
- Ee.styles = bn;
1418
- _t([
1486
+ Oe.styles = Sn;
1487
+ Ct([
1419
1488
  v({ type: Boolean, reflect: !0 })
1420
- ], Ee.prototype, "showCreateAccount", 2);
1421
- _t([
1489
+ ], Oe.prototype, "showCreateAccount", 2);
1490
+ Ct([
1422
1491
  v({ type: Boolean, reflect: !0 })
1423
- ], Ee.prototype, "showLoginButton", 2);
1424
- _t([
1492
+ ], Oe.prototype, "showLoginButton", 2);
1493
+ Ct([
1425
1494
  v({ type: String, reflect: !0 })
1426
- ], Ee.prototype, "username", 2);
1427
- Ee = _t([
1428
- I("spectric-header")
1429
- ], Ee);
1430
- var yn = Object.defineProperty, mn = Object.getOwnPropertyDescriptor, Te = (s, r, o, i) => {
1431
- for (var c = i > 1 ? void 0 : i ? mn(r, o) : r, t = s.length - 1, p; t >= 0; t--)
1432
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
1433
- return i && c && yn(r, o, c), 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 $n = {
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 he = class extends L {
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 A`
1461
- <header style=${Bs({ ...$n, ...this.headerStyle })}>
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 ? A`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>` : null}
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
- ], he.prototype, "dismissable", 2);
1539
+ ], ge.prototype, "dismissable", 2);
1471
1540
  Te([
1472
1541
  v({ type: String, reflect: !0 })
1473
- ], he.prototype, "text", 2);
1542
+ ], ge.prototype, "text", 2);
1474
1543
  Te([
1475
1544
  v({ type: String, reflect: !0 })
1476
- ], he.prototype, "bannerId", 2);
1545
+ ], ge.prototype, "bannerId", 2);
1477
1546
  Te([
1478
1547
  v({ type: Object })
1479
- ], he.prototype, "headerStyle", 2);
1548
+ ], ge.prototype, "headerStyle", 2);
1480
1549
  Te([
1481
1550
  v({ state: !0, type: Boolean, attribute: !1 })
1482
- ], he.prototype, "_dismissed", 2);
1483
- he = Te([
1484
- I("spectric-banner")
1485
- ], he);
1486
- const _n = K`
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 Wt = (s) => s ?? C;
1649
- class wn extends zs {
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 qt = er(wn);
1676
- var Yt = /* @__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))(Yt || {});
1677
- const ct = {
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 xn = Object.defineProperty, An = Object.getOwnPropertyDescriptor, Z = (s, r, o, i) => {
1798
- for (var c = i > 1 ? void 0 : i ? An(r, o) : r, t = s.length - 1, p; t >= 0; t--)
1799
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
1800
- return i && c && xn(r, o, c), 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 L {
1871
+ let B = class extends O {
1803
1872
  constructor() {
1804
- super(...arguments), this.showHeader = !0, this.headerSticky = !0, this.classificationLevel = Yt.None, this.classificationText = "", this.notifications = [], this.showCreateAccount = !1, this.showLoginButton = !0, this.username = "";
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 && !ct[this.classificationLevel] && (console.warn("Unknown classification", this.classificationLevel), this.classificationLevel = Yt.None);
1811
- const s = this.classificationLevel ? this.classificationText || ct[this.classificationLevel].content : "", r = this.showHeader ? A`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${Wt(this.username)}>
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 A`
1818
- ${this.classificationLevel && s ? A`
1886
+ return w`
1887
+ ${this.classificationLevel && s ? w`
1819
1888
  <!-- Classification Banner -->
1820
- <spectric-banner ${qt({ text: s, headerStyle: ct[this.classificationLevel] })}></spectric-banner>
1889
+ <spectric-banner ${gt({ text: s, headerStyle: ut[this.classificationLevel] })}></spectric-banner>
1821
1890
  ` : null}
1822
- <spectric-theme theme=${Wt(this.theme)}>
1823
- ${this.notifications ? this.notifications.map((o) => A`<spectric-banner ${qt(o)} ></spectric-banner>`) : null}
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 ? A`<spectric-banner ${qt({ text: s, headerStyle: ct[this.classificationLevel] })}></spectric-banner>` : null}
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 = _n;
1839
- Z([
1907
+ B.styles = Tn;
1908
+ X([
1840
1909
  v({ type: Boolean, reflect: !0 })
1841
1910
  ], B.prototype, "showHeader", 2);
1842
- Z([
1911
+ X([
1843
1912
  v({ type: Boolean, reflect: !0 })
1844
1913
  ], B.prototype, "headerSticky", 2);
1845
- Z([
1914
+ X([
1846
1915
  v({ type: String, reflect: !0 })
1847
1916
  ], B.prototype, "classificationLevel", 2);
1848
- Z([
1917
+ X([
1849
1918
  v({ type: String, reflect: !0 })
1850
1919
  ], B.prototype, "classificationText", 2);
1851
- Z([
1920
+ X([
1852
1921
  v({ type: Array, reflect: !0 })
1853
1922
  ], B.prototype, "notifications", 2);
1854
- Z([
1923
+ X([
1855
1924
  v({ type: Boolean, reflect: !0 })
1856
1925
  ], B.prototype, "showCreateAccount", 2);
1857
- Z([
1926
+ X([
1858
1927
  v({ type: Boolean, reflect: !0 })
1859
1928
  ], B.prototype, "showLoginButton", 2);
1860
- Z([
1929
+ X([
1861
1930
  v({ type: String, reflect: !0 })
1862
1931
  ], B.prototype, "username", 2);
1863
- Z([
1932
+ X([
1864
1933
  v({ type: String, reflect: !0 })
1865
1934
  ], B.prototype, "theme", 2);
1866
- B = Z([
1867
- I("spectric-page")
1935
+ B = X([
1936
+ N("spectric-page")
1868
1937
  ], B);
1869
- var kn = Object.defineProperty, Sn = Object.getOwnPropertyDescriptor, O = (s, r, o, i) => {
1870
- for (var c = i > 1 ? void 0 : i ? Sn(r, o) : r, t = s.length - 1, p; t >= 0; t--)
1871
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
1872
- return i && c && kn(r, o, c), c;
1873
- }, Cn = /* @__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))(Cn || {});
1874
- let E = class extends L {
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;
@@ -1885,7 +1954,7 @@ let E = class extends L {
1885
1954
  return this;
1886
1955
  }
1887
1956
  get selectionStart() {
1888
- return this._input.selectionStart;
1957
+ return this._input ? this._input.selectionStart : null;
1889
1958
  }
1890
1959
  get value() {
1891
1960
  return this._input ? this.variant == "number" ? parseFloat(this._input.value) : this._input.value : this._value;
@@ -1894,8 +1963,14 @@ let E = class extends L {
1894
1963
  const r = this._value;
1895
1964
  this._value = s, this.requestUpdate("value", r), this._input && (this._input.value = String(s));
1896
1965
  }
1966
+ blur() {
1967
+ this._input && this._input.blur();
1968
+ }
1969
+ focus(s) {
1970
+ this._input && (this._input.blur(), this._input.focus(s));
1971
+ }
1897
1972
  setSelectionRange(s, r, o = "none") {
1898
- this._input.setSelectionRange(s, r, o);
1973
+ this._input && this._input.setSelectionRange(s, r, o);
1899
1974
  }
1900
1975
  render() {
1901
1976
  switch (this.variant) {
@@ -1907,7 +1982,7 @@ let E = class extends L {
1907
1982
  case "datetime-local":
1908
1983
  case "file":
1909
1984
  case "color":
1910
- return A`
1985
+ return w`
1911
1986
  <div class="inputWrapper">
1912
1987
  <div class="text-input__label-helper-wrapper">
1913
1988
  <div class="--text-input__label-wrapper">
@@ -1921,25 +1996,25 @@ let E = class extends L {
1921
1996
  ?disabled="${this.disabled}"
1922
1997
  aria-describedby="helper-text"
1923
1998
  id="input"
1924
- name="${Ae(this.name)}"
1925
- pattern="${Ae(this.pattern)}"
1926
- placeholder="${Ae(this.placeholder)}"
1927
- autocomplete="${Ae(this.autocomplete)}"
1999
+ name="${Se(this.name)}"
2000
+ pattern="${Se(this.pattern)}"
2001
+ placeholder="${Se(this.placeholder)}"
2002
+ autocomplete="${Se(this.autocomplete)}"
1928
2003
  ?readonly="${this.readonly}"
1929
2004
  ?required="${this.required}"
1930
- type="${Ae(
2005
+ type="${Se(
1931
2006
  this.variant !== "password" ? this.variant : this._showPassword ? "text" : "password"
1932
2007
  /* password */
1933
2008
  )}"
1934
2009
  .value="${this._value}"
1935
- maxlength="${Ae(this.maxCount > 0 ? this.maxCount : void 0)}"
2010
+ maxlength="${Se(this.maxCount > 0 ? this.maxCount : void 0)}"
1936
2011
  @input="${this._handleInput}"
1937
2012
  @change=${() => {
1938
2013
  this.dispatchEvent(new Event("change", { bubbles: !0 }));
1939
2014
  }}
1940
2015
  />
1941
2016
 
1942
- ${this.variant === "password" && this.showPasswordVisibilityToggle ? A`
2017
+ ${this.variant === "password" && this.showPasswordVisibilityToggle ? w`
1943
2018
  <spectric-button
1944
2019
  size="small"
1945
2020
  type="button"
@@ -1959,84 +2034,84 @@ let E = class extends L {
1959
2034
  </div>
1960
2035
  `;
1961
2036
  case "hidden":
1962
- return A`<input type="hidden"></input>`;
2037
+ return w`<input type="hidden"></input>`;
1963
2038
  }
1964
2039
  return `Not yet implemented ${this.variant}`;
1965
2040
  }
1966
2041
  };
1967
- O([
2042
+ P([
1968
2043
  v({ type: String, reflect: !0 })
1969
2044
  ], E.prototype, "placeholder", 2);
1970
- O([
2045
+ P([
1971
2046
  v({ type: Boolean, reflect: !0 })
1972
2047
  ], E.prototype, "readonly", 2);
1973
- O([
2048
+ P([
1974
2049
  v({ type: String, reflect: !0 })
1975
2050
  ], E.prototype, "variant", 2);
1976
- O([
2051
+ P([
1977
2052
  v({ type: Boolean, reflect: !0 })
1978
2053
  ], E.prototype, "disabled", 2);
1979
- O([
2054
+ P([
1980
2055
  v({ type: String, reflect: !0 })
1981
2056
  ], E.prototype, "label", 2);
1982
- O([
2057
+ P([
1983
2058
  v()
1984
2059
  ], E.prototype, "hidePasswordLabel", 2);
1985
- O([
2060
+ P([
1986
2061
  v()
1987
2062
  ], E.prototype, "showPasswordLabel", 2);
1988
- O([
2063
+ P([
1989
2064
  v({
1990
2065
  type: Boolean,
1991
2066
  reflect: !0
1992
2067
  })
1993
2068
  ], E.prototype, "showPasswordVisibilityToggle", 2);
1994
- O([
2069
+ P([
1995
2070
  v({ type: String, reflect: !0 })
1996
2071
  ], E.prototype, "helperText", 2);
1997
- O([
2072
+ P([
1998
2073
  v({ type: Boolean, reflect: !0 })
1999
2074
  ], E.prototype, "invalid", 2);
2000
- O([
2075
+ P([
2001
2076
  v({ type: Boolean, reflect: !0 })
2002
2077
  ], E.prototype, "required", 2);
2003
- O([
2078
+ P([
2004
2079
  v({ type: String, reflect: !0 })
2005
2080
  ], E.prototype, "invalidText", 2);
2006
- O([
2081
+ P([
2007
2082
  v()
2008
2083
  ], E.prototype, "name", 2);
2009
- O([
2084
+ P([
2010
2085
  v()
2011
2086
  ], E.prototype, "pattern", 2);
2012
- O([
2087
+ P([
2013
2088
  v({ type: Number, reflect: !0 })
2014
2089
  ], E.prototype, "maxCount", 2);
2015
- O([
2090
+ P([
2016
2091
  v({ reflect: !0 })
2017
2092
  ], E.prototype, "autocomplete", 2);
2018
- O([
2093
+ P([
2019
2094
  v({ reflect: !0 })
2020
2095
  ], E.prototype, "value", 1);
2021
- O([
2022
- We("input")
2096
+ P([
2097
+ Ze("input")
2023
2098
  ], E.prototype, "_input", 2);
2024
- E = O([
2025
- I("spectric-input")
2099
+ E = P([
2100
+ N("spectric-input")
2026
2101
  ], E);
2027
- const Ae = (s) => Wt(s === "" ? void 0 : s ?? void 0), En = "end of input", On = {
2102
+ const Se = (s) => Jt(s === "" ? void 0 : s ?? void 0), Bn = "end of input", Un = {
2028
2103
  fieldName: "field name",
2029
2104
  value: "value",
2030
2105
  literal: "literal",
2031
2106
  whitespace: "whitespace"
2032
2107
  };
2033
- class Is extends Error {
2108
+ class Js extends Error {
2034
2109
  constructor(r, o) {
2035
2110
  let i = r.message;
2036
2111
  if (r.expected) {
2037
- const p = r.expected.map((g) => On[g.description] || g.description).join(", ");
2038
- let b = r.found ? `"${r.found}"` : En;
2039
- i = `Expected ${p} but ${b} found.`;
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.`;
2040
2115
  }
2041
2116
  const c = [i, o, "-".repeat(r.location.start.offset) + "^"].join(
2042
2117
  `
@@ -2045,22 +2120,22 @@ class Is extends Error {
2045
2120
  super(c), this.name = "DQLSyntaxError", this.shortMessage = i;
2046
2121
  }
2047
2122
  }
2048
- function Se(s) {
2123
+ function Ce(s) {
2049
2124
  return {
2050
2125
  type: "literal",
2051
2126
  value: s
2052
2127
  };
2053
2128
  }
2054
- function tr(s) {
2129
+ function cr(s) {
2055
2130
  return s.value;
2056
2131
  }
2057
- const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2132
+ const Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2058
2133
  __proto__: null,
2059
- buildNode: Se,
2060
- toOpenSearchQuery: tr
2134
+ buildNode: Ce,
2135
+ toOpenSearchQuery: cr
2061
2136
  }, Symbol.toStringTag, { value: "Module" })), {
2062
- SyntaxError: nc,
2063
- parse: wt
2137
+ SyntaxError: Tc,
2138
+ parse: Et
2064
2139
  } = function() {
2065
2140
  function s(i, c) {
2066
2141
  function t() {
@@ -2068,32 +2143,32 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2068
2143
  }
2069
2144
  t.prototype = c.prototype, i.prototype = new t();
2070
2145
  }
2071
- function r(i, c, t, p) {
2072
- this.message = i, this.expected = c, this.found = t, this.location = p, this.name = "SyntaxError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, r);
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);
2073
2148
  }
2074
2149
  s(r, Error);
2075
2150
  function o(i) {
2076
- var c = arguments.length > 1 ? arguments[1] : {}, t = {}, p = { start: Kr, Literal: Bt }, b = Kr, g = function(e, n) {
2151
+ var c = arguments.length > 1 ? arguments[1] : {}, t = {}, u = { start: ss, Literal: Ht }, g = ss, b = function(e, n) {
2077
2152
  return n.type === "cursor" ? {
2078
2153
  ...n,
2079
2154
  suggestionTypes: ["conjunction"]
2080
- } : e !== null ? e : le.function.buildNode("is", "*", "*");
2081
- }, w = function() {
2082
- return ko;
2083
- }, x = function(e, n) {
2084
- const l = [e, n].find((u) => u.type === "cursor");
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");
2085
2160
  return l || Y("or", [e, n]);
2086
2161
  }, _ = function(e, n) {
2087
- const l = [e, n].find((u) => u.type === "cursor");
2162
+ const l = [e, n].find((p) => p.type === "cursor");
2088
2163
  return l || Y("and", [e, n]);
2089
- }, k = function(e) {
2164
+ }, S = function(e) {
2090
2165
  return e.type === "cursor" ? e : Y("not", [e]);
2091
- }, S = "(", j = { type: "literal", value: "(", description: '"("' }, Ye = ")", te = { type: "literal", value: ")", description: '")"' }, H = function(e, n) {
2166
+ }, k = "(", z = { type: "literal", value: "(", description: '"("' }, Xe = ")", te = { type: "literal", value: ")", description: '")"' }, H = function(e, n) {
2092
2167
  return n.type === "cursor" ? {
2093
2168
  ...n,
2094
2169
  suggestionTypes: ["conjunction"]
2095
2170
  } : e;
2096
- }, q = ":", R = { type: "literal", value: ":", description: '":"' }, ye = "{", xt = { type: "literal", value: "{", description: '"{"' }, At = "}", kt = { type: "literal", value: "}", description: '"}"' }, Gs = function(e, n, l) {
2171
+ }, q = ":", R = { type: "literal", value: ":", description: '":"' }, me = "{", Pt = { type: "literal", value: "{", description: '"{"' }, Tt = "}", Lt = { type: "literal", value: "}", description: '"}"' }, ai = function(e, n, l) {
2097
2172
  return n.type === "cursor" ? {
2098
2173
  ...n,
2099
2174
  nestedPath: n.nestedPath ? `${e.value}.${n.nestedPath}` : e.value
@@ -2101,21 +2176,21 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2101
2176
  ...l,
2102
2177
  suggestionTypes: ["conjunction"]
2103
2178
  } : Y("nested", [e, n]);
2104
- }, Js = { type: "other", description: "fieldName" }, Vs = function(e, n, l) {
2179
+ }, ci = { type: "other", description: "fieldName" }, li = function(e, n, l) {
2105
2180
  if (l.type === "cursor")
2106
2181
  return {
2107
2182
  ...l,
2108
2183
  suggestionTypes: ["conjunction"]
2109
2184
  };
2110
- const u = To(n, l);
2111
- return Y("range", [e, u]);
2112
- }, ei = function(e, n) {
2185
+ const p = Mo(n, l);
2186
+ return Y("range", [e, p]);
2187
+ }, pi = function(e, n) {
2113
2188
  return n.type === "cursor" ? {
2114
2189
  ...n,
2115
2190
  fieldName: e.value,
2116
2191
  suggestionTypes: ["value", "conjunction"]
2117
2192
  } : n(e);
2118
- }, ti = function(e) {
2193
+ }, ui = function(e) {
2119
2194
  if (e.type === "cursor") {
2120
2195
  const l = `${e.prefix}${e.suffix}`.trim();
2121
2196
  return {
@@ -2126,138 +2201,138 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2126
2201
  }
2127
2202
  const n = re(null);
2128
2203
  return e(n);
2129
- }, ri = function(e, n) {
2204
+ }, di = function(e, n) {
2130
2205
  return n.type === "cursor" ? {
2131
2206
  ...n,
2132
2207
  suggestionTypes: ["conjunction"]
2133
2208
  } : e;
2134
- }, si = function(e, n) {
2135
- const l = [e, n].find((u) => u.type === "cursor");
2209
+ }, fi = function(e, n) {
2210
+ const l = [e, n].find((p) => p.type === "cursor");
2136
2211
  return l ? {
2137
2212
  ...l,
2138
2213
  suggestionTypes: ["value"]
2139
- } : (u) => Y("or", [e(u), n(u)]);
2140
- }, ii = function(e, n) {
2141
- const l = [e, n].find((u) => u.type === "cursor");
2214
+ } : (p) => Y("or", [e(p), n(p)]);
2215
+ }, hi = function(e, n) {
2216
+ const l = [e, n].find((p) => p.type === "cursor");
2142
2217
  return l ? {
2143
2218
  ...l,
2144
2219
  suggestionTypes: ["value"]
2145
- } : (u) => Y("and", [e(u), n(u)]);
2146
- }, oi = function(e) {
2220
+ } : (p) => Y("and", [e(p), n(p)]);
2221
+ }, gi = function(e) {
2147
2222
  return e.type === "cursor" ? {
2148
2223
  ...list,
2149
2224
  suggestionTypes: ["value"]
2150
2225
  } : (n) => Y("not", [e(n)]);
2151
- }, ni = { type: "other", description: "value" }, ai = function(e) {
2226
+ }, bi = { type: "other", description: "value" }, vi = function(e) {
2152
2227
  if (e.type === "cursor") return e;
2153
2228
  const n = re(!0);
2154
2229
  return (l) => Y("is", [l, e, n]);
2155
- }, ci = function(e) {
2230
+ }, yi = function(e) {
2156
2231
  if (e.type === "cursor") return e;
2157
- !Eo && e.type === "wildcard" && le.wildcard.hasLeadingWildcard(e) && M("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");
2232
+ !Bo && e.type === "wildcard" && pe.wildcard.hasLeadingWildcard(e) && M("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");
2158
2233
  const n = re(!1);
2159
2234
  return (l) => Y("is", [l, e, n]);
2160
- }, li = { type: "other", description: "OR" }, nr = "or", ar = { type: "literal", value: "or", description: '"or"' }, ui = { type: "other", description: "AND" }, cr = "and", lr = { type: "literal", value: "and", description: '"and"' }, pi = { type: "other", description: "NOT" }, ur = "not", pr = { type: "literal", value: "not", description: '"not"' }, di = { type: "other", description: "literal" }, Pe = '"', Le = { type: "literal", value: '"', description: '"\\""' }, St = function(e, n, l) {
2161
- const { start: u, end: f } = ro();
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();
2162
2237
  return {
2163
2238
  type: "cursor",
2164
- start: u.offset,
2239
+ start: p.offset,
2165
2240
  end: f.offset - n.length,
2166
2241
  prefix: e.join(""),
2167
2242
  suffix: l.join(""),
2168
- text: to().replace(n, "")
2243
+ text: uo().replace(n, "")
2169
2244
  };
2170
- }, fi = function(e) {
2245
+ }, xi = function(e) {
2171
2246
  return re(e.join(""));
2172
- }, Ne = "\\", De = { type: "literal", value: "\\", description: '"\\\\"' }, hi = /^[\\"]/, bi = { type: "class", value: '[\\\\"]', description: '[\\\\"]' }, Ke = function(e) {
2247
+ }, je = "\\", ze = { type: "literal", value: "\\", description: '"\\\\"' }, Ai = /^[\\"]/, Si = { type: "class", value: '[\\\\"]', description: '[\\\\"]' }, Ge = function(e) {
2173
2248
  return e;
2174
- }, gi = /^[^"]/, vi = { type: "class", value: '[^"]', description: '[^"]' }, yi = function(e) {
2249
+ }, ki = /^[^"]/, Ci = { type: "class", value: '[^"]', description: '[^"]' }, Ei = function(e) {
2175
2250
  const n = e.join("").trim();
2176
- return n === "null" ? re(null) : n === "true" ? re(!0) : n === "false" ? re(!1) : e.includes(us) ? Oo(n) : re(
2251
+ return n === "null" ? re(null) : n === "true" ? re(!0) : n === "false" ? re(!1) : e.includes(ms) ? Uo(n) : re(
2177
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
2178
2253
  );
2179
- }, dr = { type: "any", description: "any character" }, Ze = "*", Xe = { type: "literal", value: "*", description: '"*"' }, mi = function() {
2180
- return us;
2181
- }, fr = "\\t", $i = { type: "literal", value: "\\t", description: '"\\\\t"' }, _i = function() {
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() {
2182
2257
  return " ";
2183
- }, hr = "\\r", wi = { type: "literal", value: "\\r", description: '"\\\\r"' }, xi = function() {
2258
+ }, xr = "\\r", Li = { type: "literal", value: "\\r", description: '"\\\\r"' }, Ni = function() {
2184
2259
  return "\r";
2185
- }, br = "\\n", Ai = { type: "literal", value: "\\n", description: '"\\\\n"' }, ki = function() {
2260
+ }, Ar = "\\n", Di = { type: "literal", value: "\\n", description: '"\\\\n"' }, ji = function() {
2186
2261
  return `
2187
2262
  `;
2188
- }, Si = function(e) {
2263
+ }, zi = function(e) {
2189
2264
  return e;
2190
- }, Ci = /^[\\():<>"*{}]/, Ei = { type: "class", value: '[\\\\():<>"*{}]', description: '[\\\\():<>"*{}]' }, gr = "<=", Oi = { type: "literal", value: "<=", description: '"<="' }, Ti = function() {
2265
+ }, Ri = /^[\\():<>"*{}]/, Bi = { type: "class", value: '[\\\\():<>"*{}]', description: '[\\\\():<>"*{}]' }, Sr = "<=", Ui = { type: "literal", value: "<=", description: '"<="' }, Mi = function() {
2191
2266
  return "lte";
2192
- }, vr = ">=", Pi = { type: "literal", value: ">=", description: '">="' }, Li = function() {
2267
+ }, kr = ">=", Fi = { type: "literal", value: ">=", description: '">="' }, Ii = function() {
2193
2268
  return "gte";
2194
- }, yr = "<", mr = { type: "literal", value: "<", description: '"<"' }, Ni = function() {
2269
+ }, Cr = "<", Er = { type: "literal", value: "<", description: '"<"' }, Qi = function() {
2195
2270
  return "lt";
2196
- }, $r = ">", _r = { type: "literal", value: ">", description: '">"' }, Di = function() {
2271
+ }, Or = ">", Pr = { type: "literal", value: ">", description: '">"' }, Hi = function() {
2197
2272
  return "gt";
2198
- }, ji = { type: "other", description: "whitespace" }, Ri = /^[ \t\r\n]/, Bi = { type: "class", value: "[\\ \\t\\r\\n]", description: "[\\ \\t\\r\\n]" }, Ui = function() {
2199
- return So;
2200
- }, wr = "@kuery-cursor@", Mi = { type: "literal", value: "@kuery-cursor@", description: '"@kuery-cursor@"' }, zi = function() {
2201
- return Co;
2202
- }, xr = "||", Fi = { type: "literal", value: "||", description: '"||"' }, Qi = function() {
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() {
2203
2278
  M("LuceneOr");
2204
- }, Ar = "&&", Ii = { type: "literal", value: "&&", description: '"&&"' }, kr = function() {
2279
+ }, Nr = "&&", Vi = { type: "literal", value: "&&", description: '"&&"' }, Dr = function() {
2205
2280
  M("LuceneAnd");
2206
- }, Sr = "+", Cr = { type: "literal", value: "+", description: '"+"' }, Er = "-", Or = { type: "literal", value: "-", description: '"-"' }, Tr = function() {
2281
+ }, jr = "+", zr = { type: "literal", value: "+", description: '"+"' }, Rr = "-", Br = { type: "literal", value: "-", description: '"-"' }, Ur = function() {
2207
2282
  M("LuceneNot");
2208
- }, Pr = "!", Lr = { type: "literal", value: "!", description: '"!"' }, Nr = "_exists_", Hi = { type: "literal", value: "_exists_", description: '"_exists_"' }, qi = function() {
2283
+ }, Mr = "!", Fr = { type: "literal", value: "!", description: '"!"' }, Ir = "_exists_", eo = { type: "literal", value: "_exists_", description: '"_exists_"' }, to = function() {
2209
2284
  M("LuceneExists");
2210
- }, Dr = function() {
2285
+ }, Qr = function() {
2211
2286
  M("LuceneRange");
2212
- }, jr = "?", Rr = { type: "literal", value: "?", description: '"?"' }, Wi = function() {
2287
+ }, Hr = "?", qr = { type: "literal", value: "?", description: '"?"' }, ro = function() {
2213
2288
  M("LuceneWildcard");
2214
- }, Ct = "/", Et = { type: "literal", value: "/", description: '"/"' }, Br = /^[^\/]/, Ur = { type: "class", value: "[^/]", description: "[^/]" }, Yi = function() {
2289
+ }, Dt = "/", jt = { type: "literal", value: "/", description: '"/"' }, Wr = /^[^\/]/, Yr = { type: "class", value: "[^/]", description: "[^/]" }, so = function() {
2215
2290
  M("LuceneRegex");
2216
- }, Ot = "~", Tt = { type: "literal", value: "~", description: '"~"' }, me = /^[0-9]/, $e = { type: "class", value: "[0-9]", description: "[0-9]" }, Ki = function() {
2291
+ }, zt = "~", Rt = { type: "literal", value: "~", description: '"~"' }, $e = /^[0-9]/, _e = { type: "class", value: "[0-9]", description: "[0-9]" }, io = function() {
2217
2292
  M("LuceneFuzzy");
2218
- }, Zi = function() {
2293
+ }, oo = function() {
2219
2294
  M("LuceneProximity");
2220
- }, Mr = "^", zr = { type: "literal", value: "^", description: '"^"' }, Xi = function() {
2295
+ }, Kr = "^", Zr = { type: "literal", value: "^", description: '"^"' }, no = function() {
2221
2296
  M("LuceneBoost");
2222
- }, Gi = function() {
2297
+ }, ao = function() {
2223
2298
  return char;
2224
- }, Ji = "=", Vi = { type: "literal", value: "=", description: '"="' }, Fr = "[", Qr = { type: "literal", value: "[", description: '"["' }, Ir = "]", Hr = { type: "literal", value: "]", description: '"]"' }, qr = "TO", eo = { type: "literal", value: "TO", description: '"TO"' }, a = 0, $ = 0, Ge = [{ line: 1, column: 1, seenCR: !1 }], W = 0, Pt = [], d = 0, Je;
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;
2225
2300
  if ("startRule" in c) {
2226
- if (!(c.startRule in p))
2301
+ if (!(c.startRule in u))
2227
2302
  throw new Error(`Can't start parsing from rule "` + c.startRule + '".');
2228
- b = p[c.startRule];
2303
+ g = u[c.startRule];
2229
2304
  }
2230
- function to() {
2305
+ function uo() {
2231
2306
  return i.substring($, a);
2232
2307
  }
2233
- function ro() {
2234
- return Ve($, a);
2308
+ function fo() {
2309
+ return rt($, a);
2235
2310
  }
2236
2311
  function M(e) {
2237
- throw Yr(
2312
+ throw rs(
2238
2313
  e,
2239
2314
  null,
2240
2315
  i.substring($, a),
2241
- Ve($, a)
2316
+ rt($, a)
2242
2317
  );
2243
2318
  }
2244
- function Wr(e) {
2245
- var n = Ge[e], l, u;
2319
+ function ts(e) {
2320
+ var n = et[e], l, p;
2246
2321
  if (n)
2247
2322
  return n;
2248
- for (l = e - 1; !Ge[l]; )
2323
+ for (l = e - 1; !et[l]; )
2249
2324
  l--;
2250
- for (n = Ge[l], n = {
2325
+ for (n = et[l], n = {
2251
2326
  line: n.line,
2252
2327
  column: n.column,
2253
2328
  seenCR: n.seenCR
2254
2329
  }; l < e; )
2255
- u = i.charAt(l), u === `
2256
- ` ? (n.seenCR || n.line++, n.column = 1, n.seenCR = !1) : u === "\r" || u === "\u2028" || u === "\u2029" ? (n.line++, n.column = 1, n.seenCR = !0) : (n.column++, n.seenCR = !1), l++;
2257
- return Ge[e] = n, n;
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;
2258
2333
  }
2259
- function Ve(e, n) {
2260
- var l = Wr(e), u = Wr(n);
2334
+ function rt(e, n) {
2335
+ var l = ts(e), p = ts(n);
2261
2336
  return {
2262
2337
  start: {
2263
2338
  offset: e,
@@ -2266,91 +2341,91 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2266
2341
  },
2267
2342
  end: {
2268
2343
  offset: n,
2269
- line: u.line,
2270
- column: u.column
2344
+ line: p.line,
2345
+ column: p.column
2271
2346
  }
2272
2347
  };
2273
2348
  }
2274
2349
  function h(e) {
2275
- a < W || (a > W && (W = a, Pt = []), Pt.push(e));
2350
+ a < W || (a > W && (W = a, Bt = []), Bt.push(e));
2276
2351
  }
2277
- function Yr(e, n, l, u) {
2352
+ function rs(e, n, l, p) {
2278
2353
  function f(T) {
2279
- var P = 1;
2280
- for (T.sort(function(se, z) {
2281
- return se.description < z.description ? -1 : se.description > z.description ? 1 : 0;
2282
- }); P < T.length; )
2283
- T[P - 1] === T[P] ? T.splice(P, 1) : P++;
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++;
2284
2359
  }
2285
- function m(T, P) {
2286
- function se(Po) {
2287
- function nt(G) {
2288
- return G.charCodeAt(0).toString(16).toUpperCase();
2360
+ function m(T, L) {
2361
+ function se(Fo) {
2362
+ function lt(J) {
2363
+ return J.charCodeAt(0).toString(16).toUpperCase();
2289
2364
  }
2290
- return Po.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(G) {
2291
- return "\\x0" + nt(G);
2292
- }).replace(/[\x10-\x1F\x80-\xFF]/g, function(G) {
2293
- return "\\x" + nt(G);
2294
- }).replace(/[\u0100-\u0FFF]/g, function(G) {
2295
- return "\\u0" + nt(G);
2296
- }).replace(/[\u1000-\uFFFF]/g, function(G) {
2297
- return "\\u" + nt(G);
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);
2298
2373
  });
2299
2374
  }
2300
- var z = new Array(T.length), ps, ds, Re;
2301
- for (Re = 0; Re < T.length; Re++)
2302
- z[Re] = T[Re].description;
2303
- return ps = T.length > 1 ? z.slice(0, -1).join(", ") + " or " + z[T.length - 1] : z[0], ds = P ? '"' + se(P) + '"' : "end of input", "Expected " + ps + " but " + ds + " found.";
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.";
2304
2379
  }
2305
2380
  return n !== null && f(n), new r(
2306
2381
  e !== null ? e : m(n, l),
2307
2382
  n,
2308
2383
  l,
2309
- u
2384
+ p
2310
2385
  );
2311
2386
  }
2312
- function Kr() {
2313
- var e, n, l, u;
2387
+ function ss() {
2388
+ var e, n, l, p;
2314
2389
  for (e = a, n = [], l = y(); l !== t; )
2315
2390
  n.push(l), l = y();
2316
- return n !== t ? (l = et(), l === t && (l = null), l !== t ? (u = it(), u !== t ? ($ = e, n = g(l, u), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e;
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;
2317
2392
  }
2318
- function et() {
2319
- var e, n, l, u;
2320
- return e = a, $ = a, n = w(), n ? n = void 0 : n = t, n !== t ? (l = fo(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = a, n = Lt(), n !== t ? (l = tt(), l !== t ? (u = et(), u !== t ? ($ = e, n = x(n, u), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Lt())), e;
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;
2321
2396
  }
2322
- function Lt() {
2323
- var e, n, l, u;
2324
- return e = a, n = Zr(), n !== t ? (l = rt(), l !== t ? (u = Lt(), u !== t ? ($ = e, n = _(n, u), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Zr()), e;
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;
2325
2400
  }
2326
- function Zr() {
2401
+ function is() {
2327
2402
  var e, n, l;
2328
- return e = a, n = Rt(), n !== t ? (l = Xr(), l !== t ? ($ = e, n = k(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Xr()), e;
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;
2329
2404
  }
2330
- function Xr() {
2331
- var e, n, l, u, f, m;
2332
- if (e = a, i.charCodeAt(a) === 40 ? (n = S, a++) : (n = t, d === 0 && h(j)), n !== t) {
2333
- for (l = [], u = y(); u !== t; )
2334
- l.push(u), u = y();
2335
- l !== t ? (u = et(), u !== t ? (f = it(), f !== t ? (i.charCodeAt(a) === 41 ? (m = Ye, a++) : (m = t, d === 0 && h(te)), m !== t ? ($ = e, n = H(u, f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = 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);
2336
2411
  } else
2337
2412
  a = e, e = t;
2338
- return e === t && (e = so()), e;
2413
+ return e === t && (e = ho()), e;
2339
2414
  }
2340
- function so() {
2341
- var e, n, l, u, f, m, T, P, se, z;
2342
- if (e = a, n = Nt(), n !== t) {
2343
- for (l = [], u = y(); u !== t; )
2344
- l.push(u), u = y();
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();
2345
2420
  if (l !== t)
2346
- if (i.charCodeAt(a) === 58 ? (u = q, a++) : (u = t, d === 0 && h(R)), u !== t) {
2421
+ if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
2347
2422
  for (f = [], m = y(); m !== t; )
2348
2423
  f.push(m), m = y();
2349
2424
  if (f !== t)
2350
- if (i.charCodeAt(a) === 123 ? (m = ye, a++) : (m = t, d === 0 && h(xt)), m !== t) {
2351
- for (T = [], P = y(); P !== t; )
2352
- T.push(P), P = y();
2353
- T !== t ? (P = et(), P !== t ? (se = it(), se !== t ? (i.charCodeAt(a) === 125 ? (z = At, a++) : (z = t, d === 0 && h(kt)), z !== t ? ($ = e, n = Gs(n, P, se), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = 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);
2354
2429
  } else
2355
2430
  a = e, e = t;
2356
2431
  else
@@ -2361,26 +2436,26 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2361
2436
  a = e, e = t;
2362
2437
  } else
2363
2438
  a = e, e = t;
2364
- return e === t && (e = io()), e;
2439
+ return e === t && (e = go()), e;
2365
2440
  }
2366
- function io() {
2441
+ function go() {
2367
2442
  var e;
2368
- return e = oo(), e === t && (e = no(), e === t && (e = ao())), e;
2443
+ return e = bo(), e === t && (e = vo(), e === t && (e = yo())), e;
2369
2444
  }
2370
- function Nt() {
2445
+ function Mt() {
2371
2446
  var e;
2372
- return d++, e = Bt(), d--, e === t && d === 0 && h(Js), e;
2447
+ return d++, e = Ht(), d--, e === t && d === 0 && h(ci), e;
2373
2448
  }
2374
- function oo() {
2375
- var e, n, l, u, f, m;
2376
- if (e = a, n = Nt(), n !== t) {
2377
- for (l = [], u = y(); u !== t; )
2378
- l.push(u), u = y();
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();
2379
2454
  if (l !== t)
2380
- if (u = rs(), u !== t) {
2455
+ if (p = us(), p !== t) {
2381
2456
  for (f = [], m = y(); m !== t; )
2382
2457
  f.push(m), m = y();
2383
- f !== t ? (m = Bt(), m !== t ? ($ = e, n = Vs(n, u, m), e = n) : (a = e, e = t)) : (a = e, e = t);
2458
+ f !== t ? (m = Ht(), m !== t ? ($ = e, n = li(n, p, m), e = n) : (a = e, e = t)) : (a = e, e = t);
2384
2459
  } else
2385
2460
  a = e, e = t;
2386
2461
  else
@@ -2389,16 +2464,16 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2389
2464
  a = e, e = t;
2390
2465
  return e;
2391
2466
  }
2392
- function no() {
2393
- var e, n, l, u, f, m;
2394
- if (e = a, n = Nt(), n !== t) {
2395
- for (l = [], u = y(); u !== t; )
2396
- l.push(u), u = y();
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();
2397
2472
  if (l !== t)
2398
- if (i.charCodeAt(a) === 58 ? (u = q, a++) : (u = t, d === 0 && h(R)), u !== t) {
2473
+ if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
2399
2474
  for (f = [], m = y(); m !== t; )
2400
2475
  f.push(m), m = y();
2401
- f !== t ? (m = Dt(), m !== t ? ($ = e, n = ei(n, m), e = n) : (a = e, e = t)) : (a = e, e = t);
2476
+ f !== t ? (m = Ft(), m !== t ? ($ = e, n = pi(n, m), e = n) : (a = e, e = t)) : (a = e, e = t);
2402
2477
  } else
2403
2478
  a = e, e = t;
2404
2479
  else
@@ -2407,105 +2482,105 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2407
2482
  a = e, e = t;
2408
2483
  return e;
2409
2484
  }
2410
- function ao() {
2485
+ function yo() {
2411
2486
  var e, n;
2412
- return e = a, n = Vr(), n !== t && ($ = e, n = ti(n)), e = n, e;
2487
+ return e = a, n = cs(), n !== t && ($ = e, n = ui(n)), e = n, e;
2413
2488
  }
2414
- function Dt() {
2415
- var e, n, l, u, f, m;
2416
- if (e = a, i.charCodeAt(a) === 40 ? (n = S, a++) : (n = t, d === 0 && h(j)), n !== t) {
2417
- for (l = [], u = y(); u !== t; )
2418
- l.push(u), u = y();
2419
- l !== t ? (u = Gr(), u !== t ? (f = it(), f !== t ? (i.charCodeAt(a) === 41 ? (m = Ye, a++) : (m = t, d === 0 && h(te)), m !== t ? ($ = e, n = ri(u, f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = 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);
2420
2495
  } else
2421
2496
  a = e, e = t;
2422
- return e === t && (e = Vr()), e;
2497
+ return e === t && (e = cs()), e;
2423
2498
  }
2424
- function Gr() {
2425
- var e, n, l, u;
2426
- return e = a, n = jt(), n !== t ? (l = tt(), l !== t ? (u = Gr(), u !== t ? ($ = e, n = si(n, u), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = jt()), e;
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;
2427
2502
  }
2428
- function jt() {
2429
- var e, n, l, u;
2430
- return e = a, n = Jr(), n !== t ? (l = rt(), l !== t ? (u = jt(), u !== t ? ($ = e, n = ii(n, u), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Jr()), e;
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;
2431
2506
  }
2432
- function Jr() {
2507
+ function as() {
2433
2508
  var e, n, l;
2434
- return e = a, n = Rt(), n !== t ? (l = Dt(), l !== t ? ($ = e, n = oi(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Dt()), e;
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;
2435
2510
  }
2436
- function Vr() {
2511
+ function cs() {
2437
2512
  var e, n;
2438
- return d++, e = a, n = st(), n !== t && ($ = e, n = ai(n)), e = n, e === t && (e = a, n = es(), n !== t && ($ = e, n = ci(n)), e = n), d--, e === t && (n = t, d === 0 && h(ni)), e;
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;
2439
2514
  }
2440
- function tt() {
2441
- var e, n, l, u, f;
2515
+ function it() {
2516
+ var e, n, l, p, f;
2442
2517
  if (d++, e = a, n = [], l = y(), l !== t)
2443
2518
  for (; l !== t; )
2444
2519
  n.push(l), l = y();
2445
2520
  else
2446
2521
  n = t;
2447
2522
  if (n !== t)
2448
- if (i.substr(a, 2).toLowerCase() === nr ? (l = i.substr(a, 2), a += 2) : (l = t, d === 0 && h(ar)), l !== t) {
2449
- if (u = [], f = y(), f !== t)
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)
2450
2525
  for (; f !== t; )
2451
- u.push(f), f = y();
2526
+ p.push(f), f = y();
2452
2527
  else
2453
- u = t;
2454
- u !== t ? (n = [n, l, u], e = n) : (a = e, e = t);
2528
+ p = t;
2529
+ p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
2455
2530
  } else
2456
2531
  a = e, e = t;
2457
2532
  else
2458
2533
  a = e, e = t;
2459
- return e === t && (e = a, $ = a, n = w(), n ? n = void 0 : n = t, n !== t ? (l = ss(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h(li)), e;
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;
2460
2535
  }
2461
- function rt() {
2462
- var e, n, l, u, f;
2536
+ function ot() {
2537
+ var e, n, l, p, f;
2463
2538
  if (d++, e = a, n = [], l = y(), l !== t)
2464
2539
  for (; l !== t; )
2465
2540
  n.push(l), l = y();
2466
2541
  else
2467
2542
  n = t;
2468
2543
  if (n !== t)
2469
- if (i.substr(a, 3).toLowerCase() === cr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h(lr)), l !== t) {
2470
- if (u = [], f = y(), f !== t)
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)
2471
2546
  for (; f !== t; )
2472
- u.push(f), f = y();
2547
+ p.push(f), f = y();
2473
2548
  else
2474
- u = t;
2475
- u !== t ? (n = [n, l, u], e = n) : (a = e, e = t);
2549
+ p = t;
2550
+ p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
2476
2551
  } else
2477
2552
  a = e, e = t;
2478
2553
  else
2479
2554
  a = e, e = t;
2480
- return e === t && (e = a, $ = a, n = w(), n ? n = void 0 : n = t, n !== t ? (l = is(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h(ui)), e;
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;
2481
2556
  }
2482
- function Rt() {
2483
- var e, n, l, u;
2484
- if (d++, e = a, i.substr(a, 3).toLowerCase() === ur ? (n = i.substr(a, 3), a += 3) : (n = t, d === 0 && h(pr)), n !== t) {
2485
- if (l = [], u = y(), u !== t)
2486
- for (; u !== t; )
2487
- l.push(u), u = y();
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();
2488
2563
  else
2489
2564
  l = t;
2490
2565
  l !== t ? (n = [n, l], e = n) : (a = e, e = t);
2491
2566
  } else
2492
2567
  a = e, e = t;
2493
- return e === t && (e = a, $ = a, n = w(), n ? n = void 0 : n = t, n !== t ? (l = os(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h(pi)), e;
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;
2494
2569
  }
2495
- function Bt() {
2570
+ function Ht() {
2496
2571
  var e;
2497
- return d++, e = st(), e === t && (e = es()), d--, e === t && d === 0 && h(di), e;
2572
+ return d++, e = nt(), e === t && (e = ls()), d--, e === t && d === 0 && h(wi), e;
2498
2573
  }
2499
- function st() {
2500
- var e, n, l, u, f, m;
2501
- if (e = a, i.charCodeAt(a) === 34 ? (n = Pe, a++) : (n = t, d === 0 && h(Le)), n !== t) {
2502
- for (l = [], u = _e(); u !== t; )
2503
- l.push(u), u = _e();
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();
2504
2579
  if (l !== t)
2505
- if (u = je(), u !== t) {
2506
- for (f = [], m = _e(); m !== t; )
2507
- f.push(m), m = _e();
2508
- f !== t ? (i.charCodeAt(a) === 34 ? (m = Pe, a++) : (m = t, d === 0 && h(Le)), m !== t ? ($ = e, n = St(l, u, f), e = n) : (a = e, e = t)) : (a = e, e = t);
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);
2509
2584
  } else
2510
2585
  a = e, e = t;
2511
2586
  else
@@ -2513,58 +2588,58 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2513
2588
  } else
2514
2589
  a = e, e = t;
2515
2590
  if (e === t)
2516
- if (e = a, i.charCodeAt(a) === 34 ? (n = Pe, a++) : (n = t, d === 0 && h(Le)), n !== t) {
2517
- for (l = [], u = _e(); u !== t; )
2518
- l.push(u), u = _e();
2519
- l !== t ? (i.charCodeAt(a) === 34 ? (u = Pe, a++) : (u = t, d === 0 && h(Le)), u !== t ? ($ = e, n = fi(l), e = n) : (a = e, e = t)) : (a = e, e = t);
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);
2520
2595
  } else
2521
2596
  a = e, e = t;
2522
2597
  return e;
2523
2598
  }
2524
- function _e() {
2599
+ function we() {
2525
2600
  var e, n, l;
2526
- return e = Ut(), e === t && (e = a, i.charCodeAt(a) === 92 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t ? (hi.test(i.charAt(a)) ? (l = i.charAt(a), a++) : (l = t, d === 0 && h(bi)), l !== t ? ($ = e, n = Ke(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = a, n = a, d++, l = je(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (gi.test(i.charAt(a)) ? (l = i.charAt(a), a++) : (l = t, d === 0 && h(vi)), l !== t ? ($ = e, n = Ke(l), e = n) : (a = e, e = t)) : (a = e, e = t))), 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;
2527
2602
  }
2528
- function es() {
2529
- var e, n, l, u, f;
2530
- for (e = a, n = [], l = we(); l !== t; )
2531
- n.push(l), l = we();
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();
2532
2607
  if (n !== t)
2533
- if (l = je(), l !== t) {
2534
- for (u = [], f = we(); f !== t; )
2535
- u.push(f), f = we();
2536
- u !== t ? ($ = e, n = St(n, l, u), e = n) : (a = e, e = t);
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);
2537
2612
  } else
2538
2613
  a = e, e = t;
2539
2614
  else
2540
2615
  a = e, e = t;
2541
2616
  if (e === t) {
2542
- if (e = a, n = [], l = we(), l !== t)
2617
+ if (e = a, n = [], l = xe(), l !== t)
2543
2618
  for (; l !== t; )
2544
- n.push(l), l = we();
2619
+ n.push(l), l = xe();
2545
2620
  else
2546
2621
  n = t;
2547
- n !== t && ($ = e, n = yi(n)), e = n;
2622
+ n !== t && ($ = e, n = Ei(n)), e = n;
2548
2623
  }
2549
2624
  return e;
2550
2625
  }
2551
- function we() {
2552
- var e, n, l, u, f;
2553
- return e = Ut(), e === t && (e = lo(), e === t && (e = uo(), e === t && (e = co(), e === t && (e = a, n = a, d++, l = ts(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (l = a, d++, u = po(), d--, u === t ? l = void 0 : (a = l, l = t), l !== t ? (u = a, d++, f = je(), d--, f === t ? u = void 0 : (a = u, u = t), u !== t ? (i.length > a ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(dr)), f !== t ? ($ = e, n = Ke(f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t))))), 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;
2554
2629
  }
2555
- function co() {
2630
+ function mo() {
2556
2631
  var e, n;
2557
- return e = a, i.charCodeAt(a) === 42 ? (n = Ze, a++) : (n = t, d === 0 && h(Xe)), n !== t && ($ = e, n = mi()), e = n, e;
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;
2558
2633
  }
2559
- function it() {
2560
- var e, n, l, u, f;
2634
+ function at() {
2635
+ var e, n, l, p, f;
2561
2636
  for (e = a, n = [], l = y(); l !== t; )
2562
2637
  n.push(l), l = y();
2563
2638
  if (n !== t)
2564
- if (l = je(), l !== t) {
2565
- for (u = [], f = y(); f !== t; )
2566
- u.push(f), f = y();
2567
- u !== t ? ($ = e, n = St(n, l, u), e = n) : (a = e, e = t);
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);
2568
2643
  } else
2569
2644
  a = e, e = t;
2570
2645
  else
@@ -2574,86 +2649,86 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2574
2649
  e.push(n), n = y();
2575
2650
  return e;
2576
2651
  }
2577
- function Ut() {
2652
+ function qt() {
2578
2653
  var e, n;
2579
- return e = a, i.substr(a, 2) === fr ? (n = fr, a += 2) : (n = t, d === 0 && h($i)), n !== t && ($ = e, n = _i()), e = n, e === t && (e = a, i.substr(a, 2) === hr ? (n = hr, a += 2) : (n = t, d === 0 && h(wi)), n !== t && ($ = e, n = xi()), e = n, e === t && (e = a, i.substr(a, 2) === br ? (n = br, a += 2) : (n = t, d === 0 && h(Ai)), n !== t && ($ = e, n = ki()), e = n)), e;
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;
2580
2655
  }
2581
- function lo() {
2656
+ function $o() {
2582
2657
  var e, n, l;
2583
- return e = a, i.charCodeAt(a) === 92 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t ? (l = ts(), l !== t ? ($ = e, n = Ke(l), e = n) : (a = e, e = t)) : (a = e, e = t), e;
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;
2584
2659
  }
2585
- function uo() {
2660
+ function _o() {
2586
2661
  var e, n, l;
2587
- return e = a, i.charCodeAt(a) === 92 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t ? (i.substr(a, 2).toLowerCase() === nr ? (l = i.substr(a, 2), a += 2) : (l = t, d === 0 && h(ar)), l === t && (i.substr(a, 3).toLowerCase() === cr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h(lr)), l === t && (i.substr(a, 3).toLowerCase() === ur ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h(pr)))), l !== t ? ($ = e, n = Si(l), e = n) : (a = e, e = t)) : (a = e, e = t), e;
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;
2588
2663
  }
2589
- function po() {
2664
+ function wo() {
2590
2665
  var e;
2591
- return e = tt(), e === t && (e = rt(), e === t && (e = Rt())), e;
2666
+ return e = it(), e === t && (e = ot(), e === t && (e = Qt())), e;
2592
2667
  }
2593
- function ts() {
2668
+ function ps() {
2594
2669
  var e;
2595
- return Ci.test(i.charAt(a)) ? (e = i.charAt(a), a++) : (e = t, d === 0 && h(Ei)), e;
2670
+ return Ri.test(i.charAt(a)) ? (e = i.charAt(a), a++) : (e = t, d === 0 && h(Bi)), e;
2596
2671
  }
2597
- function rs() {
2672
+ function us() {
2598
2673
  var e, n;
2599
- return e = a, i.substr(a, 2) === gr ? (n = gr, a += 2) : (n = t, d === 0 && h(Oi)), n !== t && ($ = e, n = Ti()), e = n, e === t && (e = a, i.substr(a, 2) === vr ? (n = vr, a += 2) : (n = t, d === 0 && h(Pi)), n !== t && ($ = e, n = Li()), e = n, e === t && (e = a, i.charCodeAt(a) === 60 ? (n = yr, a++) : (n = t, d === 0 && h(mr)), n !== t && ($ = e, n = Ni()), e = n, e === t && (e = a, i.charCodeAt(a) === 62 ? (n = $r, a++) : (n = t, d === 0 && h(_r)), n !== t && ($ = e, n = Di()), e = n))), e;
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;
2600
2675
  }
2601
2676
  function y() {
2602
2677
  var e;
2603
- return d++, Ri.test(i.charAt(a)) ? (e = i.charAt(a), a++) : (e = t, d === 0 && h(Bi)), d--, e === t && d === 0 && h(ji), e;
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;
2604
2679
  }
2605
- function je() {
2680
+ function Re() {
2606
2681
  var e, n, l;
2607
- return e = a, $ = a, n = Ui(), n ? n = void 0 : n = t, n !== t ? (i.substr(a, 14) === wr ? (l = wr, a += 14) : (l = t, d === 0 && h(Mi)), l !== t ? ($ = e, n = zi(), e = n) : (a = e, e = t)) : (a = e, e = t), e;
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;
2608
2683
  }
2609
- function ss() {
2610
- var e, n, l, u, f;
2684
+ function ds() {
2685
+ var e, n, l, p, f;
2611
2686
  for (e = a, n = [], l = y(); l !== t; )
2612
2687
  n.push(l), l = y();
2613
2688
  if (n !== t)
2614
- if (i.substr(a, 2) === xr ? (l = xr, a += 2) : (l = t, d === 0 && h(Fi)), l !== t) {
2615
- for (u = [], f = y(); f !== t; )
2616
- u.push(f), f = y();
2617
- u !== t ? ($ = e, n = Qi(), e = n) : (a = e, e = t);
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);
2618
2693
  } else
2619
2694
  a = e, e = t;
2620
2695
  else
2621
2696
  a = e, e = t;
2622
2697
  return e;
2623
2698
  }
2624
- function is() {
2625
- var e, n, l, u, f;
2699
+ function fs() {
2700
+ var e, n, l, p, f;
2626
2701
  for (e = a, n = [], l = y(); l !== t; )
2627
2702
  n.push(l), l = y();
2628
2703
  if (n !== t)
2629
- if (i.substr(a, 2) === Ar ? (l = Ar, a += 2) : (l = t, d === 0 && h(Ii)), l !== t) {
2630
- for (u = [], f = y(); f !== t; )
2631
- u.push(f), f = y();
2632
- u !== t ? ($ = e, n = kr(), e = n) : (a = e, e = t);
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);
2633
2708
  } else
2634
2709
  a = e, e = t;
2635
2710
  else
2636
2711
  a = e, e = t;
2637
- return e === t && (e = a, i.charCodeAt(a) === 43 ? (n = Sr, a++) : (n = t, d === 0 && h(Cr)), n !== t && ($ = e, n = kr()), e = n), e;
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;
2638
2713
  }
2639
- function os() {
2714
+ function hs() {
2640
2715
  var e, n;
2641
- return e = a, i.charCodeAt(a) === 45 ? (n = Er, a++) : (n = t, d === 0 && h(Or)), n !== t && ($ = e, n = Tr()), e = n, e === t && (e = a, i.charCodeAt(a) === 33 ? (n = Pr, a++) : (n = t, d === 0 && h(Lr)), n !== t && ($ = e, n = Tr()), e = n), e;
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;
2642
2717
  }
2643
- function fo() {
2718
+ function xo() {
2644
2719
  var e;
2645
- return e = ho(), e === t && (e = ns(), e === t && (e = bo())), e;
2720
+ return e = Ao(), e === t && (e = gs(), e === t && (e = So())), e;
2646
2721
  }
2647
- function ho() {
2648
- var e, n, l, u, f, m;
2649
- if (e = a, n = xe(), n !== t) {
2650
- for (l = [], u = y(); u !== t; )
2651
- l.push(u), u = y();
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();
2652
2727
  if (l !== t)
2653
- if (i.charCodeAt(a) === 58 ? (u = q, a++) : (u = t, d === 0 && h(R)), u !== t) {
2728
+ if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
2654
2729
  for (f = [], m = y(); m !== t; )
2655
2730
  f.push(m), m = y();
2656
- f !== t ? (m = ns(), m !== t ? (n = [n, l, u, f, m], e = n) : (a = e, e = t)) : (a = e, e = t);
2731
+ f !== t ? (m = gs(), m !== t ? (n = [n, l, p, f, m], e = n) : (a = e, e = t)) : (a = e, e = t);
2657
2732
  } else
2658
2733
  a = e, e = t;
2659
2734
  else
@@ -2662,20 +2737,20 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2662
2737
  a = e, e = t;
2663
2738
  return e;
2664
2739
  }
2665
- function ns() {
2740
+ function gs() {
2666
2741
  var e;
2667
- return e = go(), e === t && (e = Mt(), e === t && (e = vo(), e === t && (e = yo(), e === t && (e = mo(), e === t && (e = $o()))))), 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;
2668
2743
  }
2669
- function bo() {
2670
- var e, n, l, u, f, m;
2671
- if (e = a, i.substr(a, 8) === Nr ? (n = Nr, a += 8) : (n = t, d === 0 && h(Hi)), n !== t) {
2672
- for (l = [], u = y(); u !== t; )
2673
- l.push(u), u = y();
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();
2674
2749
  if (l !== t)
2675
- if (i.charCodeAt(a) === 58 ? (u = q, a++) : (u = t, d === 0 && h(R)), u !== t) {
2750
+ if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
2676
2751
  for (f = [], m = y(); m !== t; )
2677
2752
  f.push(m), m = y();
2678
- f !== t ? (m = xe(), m !== t ? ($ = e, n = qi(), e = n) : (a = e, e = t)) : (a = e, e = t);
2753
+ f !== t ? (m = Ae(), m !== t ? ($ = e, n = to(), e = n) : (a = e, e = t)) : (a = e, e = t);
2679
2754
  } else
2680
2755
  a = e, e = t;
2681
2756
  else
@@ -2684,296 +2759,296 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2684
2759
  a = e, e = t;
2685
2760
  return e;
2686
2761
  }
2687
- function go() {
2688
- var e, n, l, u, f, m, T;
2689
- if (e = a, n = rs(), n !== t) {
2690
- for (l = [], u = y(); u !== t; )
2691
- l.push(u), u = y();
2692
- l !== t ? (u = xe(), u !== t ? ($ = e, n = Dr(), e = n) : (a = e, e = t)) : (a = e, e = 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);
2693
2768
  } else
2694
2769
  a = e, e = t;
2695
2770
  if (e === t)
2696
- if (e = a, n = xo(), n !== t) {
2697
- for (l = [], u = y(); u !== t; )
2698
- l.push(u), u = y();
2699
- l !== t ? (u = xe(), u !== t ? (f = ls(), f !== t ? (m = xe(), m !== t ? (T = Ao(), T !== t ? ($ = e, n = Dr(), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = 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);
2700
2775
  } else
2701
2776
  a = e, e = t;
2702
2777
  return e;
2703
2778
  }
2704
- function Mt() {
2705
- var e, n, l, u, f;
2706
- for (e = a, n = [], l = ot(), l === t && (i.charCodeAt(a) === 42 ? (l = Ze, a++) : (l = t, d === 0 && h(Xe))); l !== t; )
2707
- n.push(l), l = ot(), l === t && (i.charCodeAt(a) === 42 ? (l = Ze, a++) : (l = t, d === 0 && h(Xe)));
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)));
2708
2783
  if (n !== t)
2709
- if (i.charCodeAt(a) === 63 ? (l = jr, a++) : (l = t, d === 0 && h(Rr)), l !== t) {
2710
- for (u = [], f = Mt(); f !== t; )
2711
- u.push(f), f = Mt();
2712
- u !== t ? ($ = e, n = Wi(), e = n) : (a = e, e = t);
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);
2713
2788
  } else
2714
2789
  a = e, e = t;
2715
2790
  else
2716
2791
  a = e, e = t;
2717
2792
  return e;
2718
2793
  }
2719
- function vo() {
2720
- var e, n, l, u;
2721
- if (e = a, i.charCodeAt(a) === 47 ? (n = Ct, a++) : (n = t, d === 0 && h(Et)), n !== t) {
2722
- for (l = [], Br.test(i.charAt(a)) ? (u = i.charAt(a), a++) : (u = t, d === 0 && h(Ur)); u !== t; )
2723
- l.push(u), Br.test(i.charAt(a)) ? (u = i.charAt(a), a++) : (u = t, d === 0 && h(Ur));
2724
- l !== t ? (i.charCodeAt(a) === 47 ? (u = Ct, a++) : (u = t, d === 0 && h(Et)), u !== t ? ($ = e, n = Yi(), e = n) : (a = e, e = t)) : (a = e, e = t);
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);
2725
2800
  } else
2726
2801
  a = e, e = t;
2727
2802
  return e;
2728
2803
  }
2729
- function yo() {
2730
- var e, n, l, u, f;
2731
- if (e = a, n = as(), n !== t)
2732
- if (i.charCodeAt(a) === 126 ? (l = Ot, a++) : (l = t, d === 0 && h(Tt)), l !== t) {
2733
- for (u = [], me.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h($e)); f !== t; )
2734
- u.push(f), me.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h($e));
2735
- u !== t ? ($ = e, n = Ki(), e = n) : (a = e, e = t);
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);
2736
2811
  } else
2737
2812
  a = e, e = t;
2738
2813
  else
2739
2814
  a = e, e = t;
2740
2815
  return e;
2741
2816
  }
2742
- function mo() {
2743
- var e, n, l, u, f;
2744
- if (e = a, n = st(), n !== t)
2745
- if (i.charCodeAt(a) === 126 ? (l = Ot, a++) : (l = t, d === 0 && h(Tt)), l !== t) {
2746
- for (u = [], me.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h($e)); f !== t; )
2747
- u.push(f), me.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h($e));
2748
- u !== t ? ($ = e, n = Zi(), e = n) : (a = e, e = t);
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);
2749
2824
  } else
2750
2825
  a = e, e = t;
2751
2826
  else
2752
2827
  a = e, e = t;
2753
2828
  return e;
2754
2829
  }
2755
- function $o() {
2756
- var e, n, l, u, f;
2757
- if (e = a, n = xe(), n !== t)
2758
- if (i.charCodeAt(a) === 94 ? (l = Mr, a++) : (l = t, d === 0 && h(zr)), l !== t) {
2759
- for (u = [], me.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h($e)); f !== t; )
2760
- u.push(f), me.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h($e));
2761
- u !== t ? ($ = e, n = Xi(), e = n) : (a = e, e = t);
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);
2762
2837
  } else
2763
2838
  a = e, e = t;
2764
2839
  else
2765
2840
  a = e, e = t;
2766
2841
  return e;
2767
2842
  }
2768
- function xe() {
2843
+ function Ae() {
2769
2844
  var e;
2770
- return e = st(), e === t && (e = as()), e;
2845
+ return e = nt(), e === t && (e = bs()), e;
2771
2846
  }
2772
- function as() {
2847
+ function bs() {
2773
2848
  var e, n;
2774
- if (e = [], n = ot(), n !== t)
2849
+ if (e = [], n = ct(), n !== t)
2775
2850
  for (; n !== t; )
2776
- e.push(n), n = ot();
2851
+ e.push(n), n = ct();
2777
2852
  else
2778
2853
  e = t;
2779
2854
  return e;
2780
2855
  }
2781
- function ot() {
2782
- var e, n, l, u;
2783
- return e = Ut(), e === t && (e = wo(), e === t && (e = a, n = a, d++, l = cs(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (l = a, d++, u = _o(), d--, u === t ? l = void 0 : (a = l, l = t), l !== t ? (i.length > a ? (u = i.charAt(a), a++) : (u = t, d === 0 && h(dr)), u !== t ? (n = [n, l, u], e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t))), 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;
2784
2859
  }
2785
- function _o() {
2860
+ function To() {
2786
2861
  var e;
2787
- return e = tt(), e === t && (e = rt(), e === t && (e = ss(), e === t && (e = is(), e === t && (e = os(), e === t && (e = ls()))))), 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;
2788
2863
  }
2789
- function wo() {
2864
+ function Lo() {
2790
2865
  var e, n, l;
2791
- return e = a, i.charCodeAt(a) === 92 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t ? (l = cs(), l !== t ? ($ = e, n = Gi(), e = n) : (a = e, e = t)) : (a = e, e = t), e;
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;
2792
2867
  }
2793
- function cs() {
2868
+ function vs() {
2794
2869
  var e;
2795
- return i.charCodeAt(a) === 43 ? (e = Sr, a++) : (e = t, d === 0 && h(Cr)), e === t && (i.charCodeAt(a) === 45 ? (e = Er, a++) : (e = t, d === 0 && h(Or)), e === t && (i.charCodeAt(a) === 61 ? (e = Ji, a++) : (e = t, d === 0 && h(Vi)), e === t && (i.charCodeAt(a) === 62 ? (e = $r, a++) : (e = t, d === 0 && h(_r)), e === t && (i.charCodeAt(a) === 60 ? (e = yr, a++) : (e = t, d === 0 && h(mr)), e === t && (i.charCodeAt(a) === 33 ? (e = Pr, a++) : (e = t, d === 0 && h(Lr)), e === t && (i.charCodeAt(a) === 40 ? (e = S, a++) : (e = t, d === 0 && h(j)), e === t && (i.charCodeAt(a) === 41 ? (e = Ye, a++) : (e = t, d === 0 && h(te)), e === t && (i.charCodeAt(a) === 123 ? (e = ye, a++) : (e = t, d === 0 && h(xt)), e === t && (i.charCodeAt(a) === 125 ? (e = At, a++) : (e = t, d === 0 && h(kt)), e === t && (i.charCodeAt(a) === 91 ? (e = Fr, a++) : (e = t, d === 0 && h(Qr)), e === t && (i.charCodeAt(a) === 93 ? (e = Ir, a++) : (e = t, d === 0 && h(Hr)), e === t && (i.charCodeAt(a) === 94 ? (e = Mr, a++) : (e = t, d === 0 && h(zr)), e === t && (i.charCodeAt(a) === 34 ? (e = Pe, a++) : (e = t, d === 0 && h(Le)), e === t && (i.charCodeAt(a) === 126 ? (e = Ot, a++) : (e = t, d === 0 && h(Tt)), e === t && (i.charCodeAt(a) === 42 ? (e = Ze, a++) : (e = t, d === 0 && h(Xe)), e === t && (i.charCodeAt(a) === 63 ? (e = jr, a++) : (e = t, d === 0 && h(Rr)), e === t && (i.charCodeAt(a) === 58 ? (e = q, a++) : (e = t, d === 0 && h(R)), e === t && (i.charCodeAt(a) === 92 ? (e = Ne, a++) : (e = t, d === 0 && h(De)), e === t && (i.charCodeAt(a) === 47 ? (e = Ct, a++) : (e = t, d === 0 && h(Et))))))))))))))))))))), 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;
2796
2871
  }
2797
- function ls() {
2798
- var e, n, l, u, f;
2872
+ function ys() {
2873
+ var e, n, l, p, f;
2799
2874
  if (e = a, n = [], l = y(), l !== t)
2800
2875
  for (; l !== t; )
2801
2876
  n.push(l), l = y();
2802
2877
  else
2803
2878
  n = t;
2804
2879
  if (n !== t)
2805
- if (i.substr(a, 2) === qr ? (l = qr, a += 2) : (l = t, d === 0 && h(eo)), l !== t) {
2806
- if (u = [], f = y(), f !== t)
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)
2807
2882
  for (; f !== t; )
2808
- u.push(f), f = y();
2883
+ p.push(f), f = y();
2809
2884
  else
2810
- u = t;
2811
- u !== t ? (n = [n, l, u], e = n) : (a = e, e = t);
2885
+ p = t;
2886
+ p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
2812
2887
  } else
2813
2888
  a = e, e = t;
2814
2889
  else
2815
2890
  a = e, e = t;
2816
2891
  return e;
2817
2892
  }
2818
- function xo() {
2893
+ function No() {
2819
2894
  var e;
2820
- return i.charCodeAt(a) === 91 ? (e = Fr, a++) : (e = t, d === 0 && h(Qr)), e === t && (i.charCodeAt(a) === 123 ? (e = ye, a++) : (e = t, d === 0 && h(xt))), 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;
2821
2896
  }
2822
- function Ao() {
2897
+ function Do() {
2823
2898
  var e;
2824
- return i.charCodeAt(a) === 93 ? (e = Ir, a++) : (e = t, d === 0 && h(Hr)), e === t && (i.charCodeAt(a) === 125 ? (e = At, a++) : (e = t, d === 0 && h(kt))), 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;
2825
2900
  }
2826
- const { errorOnLuceneSyntax: ko, parseCursor: So, cursorSymbol: Co, allowLeadingWildcards: Eo = !0, helpers: { nodeTypes: le } } = c, Y = le.function.buildNodeWithArgumentNodes, re = le.literal.buildNode, Oo = le.wildcard.buildNode, To = le.namedArg.buildNode, { wildcardSymbol: us } = le.wildcard;
2827
- if (Je = b(), Je !== t && a === i.length)
2828
- return Je;
2829
- throw Je !== t && a < i.length && h({ type: "end", description: "end of input" }), Yr(
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(
2830
2905
  null,
2831
- Pt,
2906
+ Bt,
2832
2907
  W < i.length ? i.charAt(W) : null,
2833
- W < i.length ? Ve(W, W + 1) : Ve(W, W)
2908
+ W < i.length ? rt(W, W + 1) : rt(W, W)
2834
2909
  );
2835
2910
  }
2836
2911
  return {
2837
2912
  SyntaxError: r,
2838
2913
  parse: o
2839
2914
  };
2840
- }(), rr = (s, r = {}, o = wt) => {
2915
+ }(), lr = (s, r = {}, o = Et) => {
2841
2916
  if (typeof s > "u")
2842
2917
  throw new Error("expression must be a string, got undefined instead");
2843
2918
  return o(s, { ...r, helpers: { nodeTypes: ne } });
2844
- }, Oe = (s, r = {}) => rr(
2919
+ }, Pe = (s, r = {}) => lr(
2845
2920
  s,
2846
2921
  {
2847
2922
  ...r,
2848
2923
  startRule: "Literal"
2849
2924
  },
2850
- wt
2851
- ), gt = (s, r = {}) => {
2925
+ Et
2926
+ ), $t = (s, r = {}) => {
2852
2927
  try {
2853
- return rr(s, r, wt);
2928
+ return lr(s, r, Et);
2854
2929
  } catch (o) {
2855
- throw o.name === "SyntaxError" ? new Is(o, s) : o;
2930
+ throw o.name === "SyntaxError" ? new Js(o, s) : o;
2856
2931
  }
2857
- }, Pn = (s) => {
2932
+ }, Fn = (s) => {
2858
2933
  try {
2859
- return rr(s, { errorOnLuceneSyntax: !0 }, wt), !1;
2934
+ return lr(s, { errorOnLuceneSyntax: !0 }, Et), !1;
2860
2935
  } catch (r) {
2861
2936
  return r.message.startsWith("Lucene");
2862
2937
  }
2863
- }, N = (s, r, o, i) => (r = void 0, !s || !s.type || !ne[s.type] ? N(ne.function.buildNode("and", []), r) : ne[s.type].toOpenSearchQuery(s, r, o, i)), ee = "@kuery-wildcard@";
2864
- function Ln(s) {
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) {
2865
2940
  return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2866
2941
  }
2867
- function Nn(s) {
2942
+ function Qn(s) {
2868
2943
  return s.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g, "\\$&");
2869
2944
  }
2870
- function Dn(s) {
2945
+ function Hn(s) {
2871
2946
  return s.includes(ee) ? {
2872
2947
  type: "wildcard",
2873
2948
  value: s
2874
- } : Oe(s);
2949
+ } : Pe(s);
2875
2950
  }
2876
- function Hs(s, r) {
2877
- const { value: o } = s, i = o.split(ee).map(Ln).join("[\\s\\S]*");
2951
+ function Vs(s, r) {
2952
+ const { value: o } = s, i = o.split(ee).map(In).join("[\\s\\S]*");
2878
2953
  return new RegExp(`^${i}$`).test(r);
2879
2954
  }
2880
- function jn(s) {
2955
+ function qn(s) {
2881
2956
  const { value: r } = s;
2882
2957
  return r.split(ee).join("*");
2883
2958
  }
2884
- function Kt(s) {
2959
+ function er(s) {
2885
2960
  const { value: r } = s;
2886
- return r.split(ee).map(Nn).join("*");
2961
+ return r.split(ee).map(Qn).join("*");
2887
2962
  }
2888
- function Rn(s) {
2963
+ function Wn(s) {
2889
2964
  const { value: r } = s;
2890
2965
  return r.startsWith(ee) && r.replace(ee, "").length > 0;
2891
2966
  }
2892
- const Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2967
+ const Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2893
2968
  __proto__: null,
2894
- buildNode: Dn,
2895
- hasLeadingWildcard: Rn,
2896
- test: Hs,
2897
- toOpenSearchQuery: jn,
2898
- toQueryStringQuery: Kt,
2969
+ buildNode: Hn,
2970
+ hasLeadingWildcard: Wn,
2971
+ test: Vs,
2972
+ toOpenSearchQuery: qn,
2973
+ toQueryStringQuery: er,
2899
2974
  wildcardSymbol: ee
2900
2975
  }, Symbol.toStringTag, { value: "Module" }));
2901
- function sr(s, r) {
2976
+ function pr(s, r) {
2902
2977
  if (!r) return [];
2903
2978
  if (s.type === "literal") {
2904
- const o = tr(s), i = r.fields.find((c) => c.name === o);
2979
+ const o = cr(s), i = r.fields.find((c) => c.name === o);
2905
2980
  return i ? [i] : [];
2906
2981
  } else if (s.type === "wildcard")
2907
- return r.fields.filter((i) => Hs(s, i.name));
2982
+ return r.fields.filter((i) => Vs(s, i.name));
2908
2983
  }
2909
- function qs(s, r, o) {
2984
+ function ei(s, r, o) {
2910
2985
  const i = {
2911
2986
  ...s,
2912
2987
  value: o ? `${o}.${s.value}` : s.value
2913
2988
  };
2914
2989
  if (!r || i.type === "wildcard" && !o)
2915
2990
  return i;
2916
- const t = sr(i, r).reduce((p, b) => {
2917
- const g = b.subType && b.subType.nested ? b.subType.nested.path : void 0;
2918
- return o && !g ? [
2919
- ...p,
2920
- `${b.name} is not a nested field but is in nested group "${o}" in the DQL expression.`
2921
- ] : g && !o ? [
2922
- ...p,
2923
- `${b.name} is a nested field, but is not in a nested group in the DQL expression.`
2924
- ] : g !== o ? [
2925
- ...p,
2926
- `Nested field ${b.name} is being queried with the incorrect nested path. The correct path is ${b.subType.nested.path}.`
2927
- ] : p;
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;
2928
3003
  }, []);
2929
3004
  if (t.length > 0)
2930
3005
  throw new Error(t.join(`
2931
3006
  `));
2932
3007
  return i;
2933
3008
  }
2934
- function Un(s, r, o = !1) {
3009
+ function Kn(s, r, o = !1) {
2935
3010
  if (s === void 0)
2936
3011
  throw new Error("fieldName is a required argument");
2937
3012
  if (r === void 0)
2938
3013
  throw new Error("value is a required argument");
2939
- const i = typeof s == "string" ? Oe(s) : Se(s), c = typeof r == "string" ? Oe(r) : Se(r), t = Se(o);
3014
+ const i = typeof s == "string" ? Pe(s) : Ce(s), c = typeof r == "string" ? Pe(r) : Ce(r), t = Ce(o);
2940
3015
  return {
2941
3016
  arguments: [i, c, t]
2942
3017
  };
2943
3018
  }
2944
- function Mn(s, r, o = {}, i = {}) {
3019
+ function Zn(s, r, o = {}, i = {}) {
2945
3020
  const {
2946
- arguments: [c, t, p]
2947
- } = s, b = qs(
3021
+ arguments: [c, t, u]
3022
+ } = s, g = ei(
2948
3023
  c,
2949
3024
  r,
2950
3025
  i != null && i.nested ? i.nested.path : void 0
2951
- ), g = N(b), w = t !== void 0 ? N(t) : t, x = p.value ? "phrase" : "best_fields";
2952
- if (b.value === null)
3026
+ ), b = D(g), x = t !== void 0 ? D(t) : t, A = u.value ? "phrase" : "best_fields";
3027
+ if (g.value === null)
2953
3028
  return t.type === "wildcard" ? {
2954
3029
  query_string: {
2955
- query: Kt(t)
3030
+ query: er(t)
2956
3031
  }
2957
3032
  } : {
2958
3033
  multi_match: {
2959
- type: x,
2960
- query: w,
3034
+ type: A,
3035
+ query: x,
2961
3036
  lenient: !0
2962
3037
  }
2963
3038
  };
2964
- const _ = r ? sr(b, r) : [];
3039
+ const _ = r ? pr(g, r) : [];
2965
3040
  _ && _.length === 0 && _.push({
2966
- name: N(b),
3041
+ name: D(g),
2967
3042
  scripted: !1,
2968
3043
  type: ""
2969
3044
  });
2970
- const k = t.type === "wildcard" && w === "*", S = b.type === "wildcard" && g === "*" || _ && r && _.length === r.fields.length;
2971
- return k && S ? { match_all: {} } : {
3045
+ const S = t.type === "wildcard" && x === "*", k = g.type === "wildcard" && b === "*" || _ && r && _.length === r.fields.length;
3046
+ return S && k ? { match_all: {} } : {
2972
3047
  bool: {
2973
3048
  should: _.reduce((te, H) => {
2974
3049
  const q = (R) => {
2975
- var ye;
2976
- return b.type !== "wildcard" || !((ye = H.subType) != null && ye.nested) || i != null && i.nested ? R : {
3050
+ var me;
3051
+ return g.type !== "wildcard" || !((me = H.subType) != null && me.nested) || i != null && i.nested ? R : {
2977
3052
  nested: {
2978
3053
  path: H.subType.nested.path,
2979
3054
  query: R,
@@ -2983,7 +3058,7 @@ function Mn(s, r, o = {}, i = {}) {
2983
3058
  };
2984
3059
  if (H.scripted)
2985
3060
  return [];
2986
- if (k)
3061
+ if (S)
2987
3062
  return [
2988
3063
  ...te,
2989
3064
  q({
@@ -2998,7 +3073,7 @@ function Mn(s, r, o = {}, i = {}) {
2998
3073
  q({
2999
3074
  query_string: {
3000
3075
  fields: [H.name],
3001
- query: Kt(t)
3076
+ query: er(t)
3002
3077
  }
3003
3078
  })
3004
3079
  ];
@@ -3009,20 +3084,20 @@ function Mn(s, r, o = {}, i = {}) {
3009
3084
  q({
3010
3085
  range: {
3011
3086
  [H.name]: {
3012
- gte: w,
3013
- lte: w,
3087
+ gte: x,
3088
+ lte: x,
3014
3089
  ...R
3015
3090
  }
3016
3091
  }
3017
3092
  })
3018
3093
  ];
3019
3094
  } else {
3020
- const R = x === "phrase" ? "match_phrase" : "match";
3095
+ const R = A === "phrase" ? "match_phrase" : "match";
3021
3096
  return [
3022
3097
  ...te,
3023
3098
  q({
3024
3099
  [R]: {
3025
- [H.name]: w
3100
+ [H.name]: x
3026
3101
  }
3027
3102
  })
3028
3103
  ];
@@ -3032,98 +3107,98 @@ function Mn(s, r, o = {}, i = {}) {
3032
3107
  }
3033
3108
  };
3034
3109
  }
3035
- const zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3110
+ const Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3036
3111
  __proto__: null,
3037
- buildNodeParams: Un,
3038
- toOpenSearchQuery: Mn
3112
+ buildNodeParams: Kn,
3113
+ toOpenSearchQuery: Zn
3039
3114
  }, Symbol.toStringTag, { value: "Module" }));
3040
- function Fn(s) {
3115
+ function Gn(s) {
3041
3116
  return {
3042
3117
  arguments: s
3043
3118
  };
3044
3119
  }
3045
- function Qn(s, r, o = {}, i = {}) {
3120
+ function Jn(s, r, o = {}, i = {}) {
3046
3121
  return {
3047
3122
  bool: {
3048
- filter: (s.arguments || []).map((t) => N(t, r, o, i))
3123
+ filter: (s.arguments || []).map((t) => D(t, r, o, i))
3049
3124
  }
3050
3125
  };
3051
3126
  }
3052
- const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3127
+ const Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3053
3128
  __proto__: null,
3054
- buildNodeParams: Fn,
3055
- toOpenSearchQuery: Qn
3129
+ buildNodeParams: Gn,
3130
+ toOpenSearchQuery: Jn
3056
3131
  }, Symbol.toStringTag, { value: "Module" }));
3057
- function Hn(s) {
3132
+ function ea(s) {
3058
3133
  return {
3059
3134
  arguments: s
3060
3135
  };
3061
3136
  }
3062
- function qn(s, r, o = {}, i = {}) {
3137
+ function ta(s, r, o = {}, i = {}) {
3063
3138
  return {
3064
3139
  bool: {
3065
- should: (s.arguments || []).map((t) => N(t, r, o, i)),
3140
+ should: (s.arguments || []).map((t) => D(t, r, o, i)),
3066
3141
  minimum_should_match: 1
3067
3142
  }
3068
3143
  };
3069
3144
  }
3070
- const Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3145
+ const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3071
3146
  __proto__: null,
3072
- buildNodeParams: Hn,
3073
- toOpenSearchQuery: qn
3147
+ buildNodeParams: ea,
3148
+ toOpenSearchQuery: ta
3074
3149
  }, Symbol.toStringTag, { value: "Module" }));
3075
- function Yn(s) {
3150
+ function sa(s) {
3076
3151
  return {
3077
3152
  arguments: [s]
3078
3153
  };
3079
3154
  }
3080
- function Kn(s, r, o = {}, i = {}) {
3155
+ function ia(s, r, o = {}, i = {}) {
3081
3156
  const [c] = s.arguments;
3082
3157
  return {
3083
3158
  bool: {
3084
- must_not: N(c, r, o, i)
3159
+ must_not: D(c, r, o, i)
3085
3160
  }
3086
3161
  };
3087
3162
  }
3088
- const Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3163
+ const oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3089
3164
  __proto__: null,
3090
- buildNodeParams: Yn,
3091
- toOpenSearchQuery: Kn
3165
+ buildNodeParams: sa,
3166
+ toOpenSearchQuery: ia
3092
3167
  }, Symbol.toStringTag, { value: "Module" }));
3093
- function Xn(s, ...r) {
3168
+ function na(s, ...r) {
3094
3169
  let o = {};
3095
3170
  for (let i of r)
3096
3171
  o[i] = s[i];
3097
3172
  return o;
3098
3173
  }
3099
- function Gn(s, r) {
3100
- const o = Xn(r, "gt", "lt", "gte", "lte", "format"), i = typeof s == "string" ? Oe(s) : ne.literal.buildNode(s), c = Object.entries(o).map((t) => {
3101
- let [p, b] = t;
3102
- return ne.namedArg.buildNode(p, b);
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);
3103
3178
  });
3104
3179
  return {
3105
3180
  arguments: [i, ...c]
3106
3181
  };
3107
3182
  }
3108
- function Jn(s, r, o = {}, i = {}) {
3109
- const [c, ...t] = s.arguments, p = qs(
3183
+ function ca(s, r, o = {}, i = {}) {
3184
+ const [c, ...t] = s.arguments, u = ei(
3110
3185
  c,
3111
3186
  r,
3112
3187
  i != null && i.nested ? i.nested.path : void 0
3113
- ), b = r ? sr(p, r) : [], g = Vn(t), w = Object.fromEntries(Object.entries(g).map(([_, k]) => [_, N(k)]));
3114
- return b && b.length === 0 && b.push({
3115
- name: N(p),
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),
3116
3191
  scripted: !1,
3117
3192
  type: ""
3118
3193
  }), {
3119
3194
  bool: {
3120
- should: b.map((_) => {
3121
- const k = (S) => {
3122
- var j;
3123
- return p.type !== "wildcard" || !((j = _.subType) != null && j.nested) || i.nested ? S : {
3195
+ should: g.map((_) => {
3196
+ const S = (k) => {
3197
+ var z;
3198
+ return u.type !== "wildcard" || !((z = _.subType) != null && z.nested) || i.nested ? k : {
3124
3199
  nested: {
3125
3200
  path: _.subType.nested.path,
3126
- query: S,
3201
+ query: k,
3127
3202
  score_mode: "none"
3128
3203
  }
3129
3204
  };
@@ -3131,19 +3206,19 @@ function Jn(s, r, o = {}, i = {}) {
3131
3206
  if (_.scripted)
3132
3207
  return {};
3133
3208
  if (_.type === "date") {
3134
- const S = o.dateFormatTZ ? { time_zone: o.dateFormatTZ } : {};
3135
- return k({
3209
+ const k = o.dateFormatTZ ? { time_zone: o.dateFormatTZ } : {};
3210
+ return S({
3136
3211
  range: {
3137
3212
  [_.name]: {
3138
- ...w,
3139
- ...S
3213
+ ...x,
3214
+ ...k
3140
3215
  }
3141
3216
  }
3142
3217
  });
3143
3218
  }
3144
- return k({
3219
+ return S({
3145
3220
  range: {
3146
- [_.name]: w
3221
+ [_.name]: x
3147
3222
  }
3148
3223
  });
3149
3224
  }),
@@ -3151,74 +3226,74 @@ function Jn(s, r, o = {}, i = {}) {
3151
3226
  }
3152
3227
  };
3153
3228
  }
3154
- function Vn(s) {
3229
+ function la(s) {
3155
3230
  if (s.gt && s.gte || s.lt && s.lte)
3156
3231
  throw new Error("range ends cannot be both inclusive and exclusive");
3157
3232
  const r = ["gte", "lte", "format"];
3158
3233
  return s.reduce((o, i, c) => (i.type === "namedArg" ? o[i.name] = i.value : o[r[c]] = i, o), {});
3159
3234
  }
3160
- const ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3235
+ const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3161
3236
  __proto__: null,
3162
- buildNodeParams: Gn,
3163
- toOpenSearchQuery: Jn
3237
+ buildNodeParams: aa,
3238
+ toOpenSearchQuery: ca
3164
3239
  }, Symbol.toStringTag, { value: "Module" }));
3165
- function ta(s) {
3240
+ function ua(s) {
3166
3241
  return {
3167
- arguments: [Se(s)]
3242
+ arguments: [Ce(s)]
3168
3243
  };
3169
3244
  }
3170
- function ra(s, r, o = {}, i = {}) {
3245
+ function da(s, r, o = {}, i = {}) {
3171
3246
  const {
3172
3247
  arguments: [c]
3173
3248
  } = s, t = {
3174
3249
  ...c,
3175
3250
  value: i != null && i.nested ? `${i.nested.path}.${c.value}` : c.value
3176
- }, p = tr(t), b = ((r == null ? void 0 : r.fields) || []).find((g) => g.name === p);
3177
- if (b && b.scripted)
3251
+ }, u = cr(t), g = ((r == null ? void 0 : r.fields) || []).find((b) => b.name === u);
3252
+ if (g && g.scripted)
3178
3253
  throw new Error("Exists query does not support scripted fields");
3179
3254
  return {
3180
- exists: { field: p }
3255
+ exists: { field: u }
3181
3256
  };
3182
3257
  }
3183
- const sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3258
+ const fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3184
3259
  __proto__: null,
3185
- buildNodeParams: ta,
3186
- toOpenSearchQuery: ra
3260
+ buildNodeParams: ua,
3261
+ toOpenSearchQuery: da
3187
3262
  }, Symbol.toStringTag, { value: "Module" }));
3188
- function ia(s, r) {
3263
+ function ha(s, r) {
3189
3264
  return {
3190
- arguments: [typeof s == "string" ? Oe(s) : Se(s), r]
3265
+ arguments: [typeof s == "string" ? Pe(s) : Ce(s), r]
3191
3266
  };
3192
3267
  }
3193
- function oa(s, r, o = {}, i = {}) {
3194
- var g;
3195
- const [c, t] = s.arguments, p = N(c), b = (g = i == null ? void 0 : i.nested) != null && g.path ? `${i.nested.path}.${p}` : p;
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;
3196
3271
  return {
3197
3272
  nested: {
3198
- path: b,
3199
- query: N(t, r, o, {
3273
+ path: g,
3274
+ query: D(t, r, o, {
3200
3275
  ...i,
3201
- nested: { path: b }
3276
+ nested: { path: g }
3202
3277
  }),
3203
3278
  score_mode: "none"
3204
3279
  }
3205
3280
  };
3206
3281
  }
3207
- const na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3282
+ const ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3208
3283
  __proto__: null,
3209
- buildNodeParams: ia,
3210
- toOpenSearchQuery: oa
3211
- }, Symbol.toStringTag, { value: "Module" })), ir = {
3212
- is: zn,
3213
- and: In,
3214
- or: Wn,
3215
- not: Zn,
3216
- range: ea,
3217
- exists: sa,
3218
- nested: na
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
3219
3294
  };
3220
- function aa(s, ...r) {
3221
- const o = ir[s];
3295
+ function va(s, ...r) {
3296
+ const o = ur[s];
3222
3297
  if (o === void 0)
3223
3298
  throw new Error(`Unknown function "${s}"`);
3224
3299
  return {
@@ -3229,8 +3304,8 @@ function aa(s, ...r) {
3229
3304
  ...o.buildNodeParams(...r)
3230
3305
  };
3231
3306
  }
3232
- function ca(s, r) {
3233
- if (ir[s] === void 0)
3307
+ function ya(s, r) {
3308
+ if (ur[s] === void 0)
3234
3309
  throw new Error(`Unknown function "${s}"`);
3235
3310
  return {
3236
3311
  type: "function",
@@ -3238,16 +3313,16 @@ function ca(s, r) {
3238
3313
  arguments: r
3239
3314
  };
3240
3315
  }
3241
- function la(s, r, o, i) {
3242
- return ir[s.function].toOpenSearchQuery(s, r, o, i);
3316
+ function ma(s, r, o, i) {
3317
+ return ur[s.function].toOpenSearchQuery(s, r, o, i);
3243
3318
  }
3244
- const ua = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3319
+ const $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3245
3320
  __proto__: null,
3246
- buildNode: aa,
3247
- buildNodeWithArgumentNodes: ca,
3248
- toOpenSearchQuery: la
3321
+ buildNode: va,
3322
+ buildNodeWithArgumentNodes: ya,
3323
+ toOpenSearchQuery: ma
3249
3324
  }, Symbol.toStringTag, { value: "Module" }));
3250
- function pa(s, r) {
3325
+ function _a(s, r) {
3251
3326
  const o = r.type === "literal" ? r : ne.literal.buildNode(r);
3252
3327
  return {
3253
3328
  type: "namedArg",
@@ -3255,125 +3330,125 @@ function pa(s, r) {
3255
3330
  value: o
3256
3331
  };
3257
3332
  }
3258
- function da(s) {
3259
- return N(s.value);
3333
+ function wa(s) {
3334
+ return D(s.value);
3260
3335
  }
3261
- const fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3336
+ const xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3262
3337
  __proto__: null,
3263
- buildNode: pa,
3264
- toOpenSearchQuery: da
3338
+ buildNode: _a,
3339
+ toOpenSearchQuery: wa
3265
3340
  }, Symbol.toStringTag, { value: "Module" })), ne = {
3266
3341
  // This requires better typing of the different typings and their return types.
3267
3342
  // @ts-ignore
3268
- function: ua,
3269
- literal: Tn,
3270
- namedArg: fa,
3271
- wildcard: Bn
3272
- }, ha = ee, ba = (s, r) => "(" + (s.arguments || []).map((i) => be(i, r)).join(" AND ") + ")", ga = (s, r) => {
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) => {
3273
3348
  var {
3274
3349
  arguments: [o, i, c]
3275
3350
  } = s;
3276
3351
  let t = "=";
3277
3352
  i.type === "wildcard" && (t = "");
3278
- let p = be(i);
3279
- c = c.value || typeof p == "string", i.type === "literal" && c && (p = `'${p}'`), i.type === "literal" && !c && (p = `${p}`);
3280
- let b = be(o);
3281
- return b == null ? r && c ? `(${r.filter((g) => g.type === "string").map((g) => `${g.name} ILIKE '%${i.value}%'`).join(" OR ")})` : r && !c && (i.value === !0 || i.value === !1) ? `(${r.filter((g) => g.type === "boolean").map((g) => `${g.name}=${i.value}`).join(" OR ")})` : "" : b + t + p;
3282
- }, va = (s, r) => "(" + (s.arguments || []).map((i) => be(i, r)).join(" OR ") + ")", ya = (s, r) => {
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) => {
3283
3358
  const [o] = s.arguments;
3284
3359
  return "NOT (" + be(o, r) + ")";
3285
- }, ma = {
3360
+ }, Oa = {
3286
3361
  gt: ">",
3287
3362
  lt: "<",
3288
3363
  gte: ">=",
3289
3364
  lte: "<="
3290
- }, $a = (s) => {
3365
+ }, Pa = (s) => {
3291
3366
  const [r, o] = s.arguments;
3292
3367
  let i = o.value;
3293
- const c = ma[o.name];
3368
+ const c = Oa[o.name];
3294
3369
  let t = be(i);
3295
3370
  return i.type === "literal" && (t = `${t}`), `${r.value} ${c} ${t}`;
3296
- }, _a = (s) => {
3371
+ }, Ta = (s) => {
3297
3372
  const [r] = s.arguments;
3298
3373
  return `${r.value} IS NOT NULL`;
3299
- }, wa = (s) => (console.warn("Nested types dont exist in CQL", s), ""), xa = {
3300
- is: ga,
3301
- and: ba,
3302
- or: va,
3303
- not: ya,
3304
- range: $a,
3305
- exists: _a,
3306
- nested: wa
3307
- }, Aa = {
3308
- function: (s, r) => xa[s.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),
3309
3384
  literal: (s) => s.value,
3310
3385
  wildcard: (s) => {
3311
3386
  const { value: r } = s;
3312
- return ` LIKE '${r.split(ha).join("%")}'`;
3387
+ return ` LIKE '${r.split(Aa).join("%")}'`;
3313
3388
  }
3314
3389
  }, be = (s, r) => {
3315
- const o = Aa[s.type];
3390
+ const o = Da[s.type];
3316
3391
  return o(s, r);
3317
- }, ka = ee, Sa = (s) => ({ $and: (s.arguments || []).map((i) => ae(i)) }), Ca = (s) => {
3392
+ }, ja = ee, za = (s) => ({ $and: (s.arguments || []).map((i) => ae(i)) }), Ra = (s) => {
3318
3393
  const {
3319
3394
  arguments: [r, o]
3320
3395
  } = s;
3321
3396
  let i = ae(o);
3322
3397
  if (o.type === "wildcard" && o.value === "@kuery-wildcard@")
3323
- return Ws(s);
3398
+ return ti(s);
3324
3399
  let t = {};
3325
3400
  return t[ae(r)] = { $eq: i }, t;
3326
- }, Ea = (s) => ({
3401
+ }, Ba = (s) => ({
3327
3402
  $or: (s.arguments || []).map((o) => ae(o))
3328
- }), Oa = (s) => {
3403
+ }), Ua = (s) => {
3329
3404
  const [r] = s.arguments;
3330
3405
  let o = {};
3331
3406
  return o = { $ne: ae(r) }, o;
3332
- }, Ta = {
3407
+ }, Ma = {
3333
3408
  gt: "$gt",
3334
3409
  lt: "$lt",
3335
3410
  gte: "$gte",
3336
3411
  lte: "$lte"
3337
- }, Pa = (s) => {
3412
+ }, Fa = (s) => {
3338
3413
  const [r, o] = s.arguments;
3339
3414
  let i = o.value;
3340
- const c = Ta[o.name];
3341
- let t = ae(i), p = {};
3342
- return p[r.value] = {}, p[r.value][c] = t, p;
3343
- }, Ws = (s) => {
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) => {
3344
3419
  const [r] = s.arguments;
3345
3420
  return { [ae(r)]: { $ne: null } };
3346
- }, La = (s) => (console.warn("TODO Implement nested search", s), ""), Na = {
3347
- is: Ca,
3348
- and: Sa,
3349
- or: Ea,
3350
- not: Oa,
3351
- range: Pa,
3352
- exists: Ws,
3353
- nested: La
3354
- }, Da = {
3355
- function: (s) => Na[s.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),
3356
3431
  literal: (s) => s.value,
3357
3432
  wildcard: (s) => {
3358
3433
  const { value: r } = s;
3359
- return `/${r.split(ka).join(".*")}/`;
3434
+ return `/${r.split(ja).join(".*")}/`;
3360
3435
  }
3361
3436
  }, ae = (s, r) => {
3362
- const o = Da[s.type];
3437
+ const o = Ha[s.type];
3363
3438
  return o(s, r);
3364
- }, ja = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3439
+ }, qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3365
3440
  __proto__: null,
3366
- DQLSyntaxError: Is,
3367
- doesKueryExpressionHaveLuceneSyntaxError: Pn,
3368
- fromKueryExpression: gt,
3369
- fromLiteralExpression: Oe,
3441
+ DQLSyntaxError: Js,
3442
+ doesKueryExpressionHaveLuceneSyntaxError: Fn,
3443
+ fromKueryExpression: $t,
3444
+ fromLiteralExpression: Pe,
3370
3445
  nodeTypes: ne,
3371
- parse: gt,
3446
+ parse: $t,
3372
3447
  toCql: be,
3373
- toDSL: N,
3448
+ toDSL: D,
3374
3449
  toMongo: ae,
3375
- toOpenSearchQuery: N
3376
- }, Symbol.toStringTag, { value: "Module" })), Ra = K`
3450
+ toOpenSearchQuery: D
3451
+ }, Symbol.toStringTag, { value: "Module" })), Wa = Z`
3377
3452
  :host {
3378
3453
  --dialog-padding: var(--spectric-dialog-padding, 5px);
3379
3454
  --dialog-background:var(--spectric-background,rgb(246, 249, 252));
@@ -3421,13 +3496,13 @@ spectric-button{
3421
3496
  top: 0;
3422
3497
  }
3423
3498
  `;
3424
- var Ba = Object.defineProperty, Ua = Object.getOwnPropertyDescriptor, ce = (s, r, o, i) => {
3425
- for (var c = i > 1 ? void 0 : i ? Ua(r, o) : r, t = s.length - 1, p; t >= 0; t--)
3426
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
3427
- return i && c && Ba(r, o, c), 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;
3428
3503
  };
3429
- const Ys = "spectric-dialog";
3430
- let F = class extends L {
3504
+ const ri = "spectric-dialog";
3505
+ let I = class extends O {
3431
3506
  constructor() {
3432
3507
  super(...arguments), this.open = !1, this.dismissable = !0, this.hideBackdrop = !1, this.title = "", this.closeOnEscape = !0, this.closeOnOutsideClick = !0, this.clickHandler = async (s) => {
3433
3508
  const r = await this.dialogElement;
@@ -3442,14 +3517,14 @@ let F = class extends L {
3442
3517
  };
3443
3518
  }
3444
3519
  static display(s, r) {
3445
- let o = document.createElement(Ys);
3520
+ let o = document.createElement(ri);
3446
3521
  o.addEventListener("close", () => {
3447
3522
  o.remove();
3448
3523
  });
3449
3524
  for (let c in s)
3450
3525
  o[c] = s[c];
3451
3526
  let i = document.createDocumentFragment();
3452
- return Ns(r, i), o.appendChild(i), o.open = !0, document.body.appendChild(o), o;
3527
+ return Is(r, i), o.appendChild(i), o.open = !0, document.body.appendChild(o), o;
3453
3528
  }
3454
3529
  connectedCallback() {
3455
3530
  super.connectedCallback(), this.dialogElement.then((s) => s.addEventListener("keydown", this._handleKeyDown));
@@ -3463,11 +3538,11 @@ let F = class extends L {
3463
3538
  });
3464
3539
  }
3465
3540
  render() {
3466
- return A`
3541
+ return w`
3467
3542
  <dialog class=${this.hideBackdrop ? "" : "backdrop"} @close=${this._onClose} @click=${this.clickHandler}>
3468
3543
  <spectric-panel>
3469
3544
  <div class="modal">
3470
- ${this.dismissable ? A`<spectric-button variant="text" size="small" @click=${() => {
3545
+ ${this.dismissable ? w`<spectric-button variant="text" size="small" @click=${() => {
3471
3546
  this.open = !1;
3472
3547
  }}>X</spectric-button>` : null}
3473
3548
  <h3 >
@@ -3484,66 +3559,66 @@ let F = class extends L {
3484
3559
  `;
3485
3560
  }
3486
3561
  };
3487
- F.styles = Ra;
3488
- ce([
3562
+ I.styles = Wa;
3563
+ le([
3489
3564
  v({ type: Boolean, reflect: !0 })
3490
- ], F.prototype, "open", 2);
3491
- ce([
3565
+ ], I.prototype, "open", 2);
3566
+ le([
3492
3567
  v({ type: Boolean, reflect: !0 })
3493
- ], F.prototype, "dismissable", 2);
3494
- ce([
3568
+ ], I.prototype, "dismissable", 2);
3569
+ le([
3495
3570
  v({ type: Boolean, reflect: !0 })
3496
- ], F.prototype, "hideBackdrop", 2);
3497
- ce([
3571
+ ], I.prototype, "hideBackdrop", 2);
3572
+ le([
3498
3573
  v({ type: String, reflect: !0 })
3499
- ], F.prototype, "title", 2);
3500
- ce([
3574
+ ], I.prototype, "title", 2);
3575
+ le([
3501
3576
  v({ type: Boolean, reflect: !0 })
3502
- ], F.prototype, "closeOnEscape", 2);
3503
- ce([
3577
+ ], I.prototype, "closeOnEscape", 2);
3578
+ le([
3504
3579
  v({ type: Boolean, reflect: !0 })
3505
- ], F.prototype, "closeOnOutsideClick", 2);
3506
- ce([
3507
- $t("dialog")
3508
- ], F.prototype, "dialogElement", 2);
3509
- F = ce([
3510
- I(Ys)
3511
- ], F);
3512
- var Ma = Object.defineProperty, za = Object.getOwnPropertyDescriptor, X = (s, r, o, i) => {
3513
- for (var c = i > 1 ? void 0 : i ? za(r, o) : r, t = s.length - 1, p; t >= 0; t--)
3514
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
3515
- return i && c && Ma(r, o, c), c;
3516
- }, Fa = /* @__PURE__ */ ((s) => (s.MONGO = "toMongo", s.CQL = "toCql", s.DSL = "toDSL", s.AST = "AST", s))(Fa || {});
3517
- const Ks = {
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 = {
3518
3593
  eq: { value: " : ", label: " equals some value" },
3519
3594
  gt: { value: " > ", label: " is greater than some value" },
3520
3595
  lt: { value: " < ", label: " is less than some value" },
3521
3596
  gte: { value: " >= ", label: " is greater than or equal to some value" },
3522
3597
  lte: { value: " <= ", label: " is less than or equal to some value" }
3523
- }, Qa = {
3598
+ }, Ja = {
3524
3599
  eq: { value: ": ", label: " equals some value" },
3525
3600
  exists: { value: ": *", label: " exists in any form" }
3526
- }, Ia = [
3601
+ }, Va = [
3527
3602
  { value: ": true", label: " value is true" },
3528
3603
  { value: ": false", label: "value is false" }
3529
- ], Ha = Object.fromEntries(Object.entries(Ks).map(([s, r]) => [s, { value: r.value, label: (r.label || "").replace("value", "date-time") }]));
3530
- let Q = class extends L {
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 {
3531
3606
  constructor() {
3532
- super(), this.placeholder = "", this._value = "", this.outputLanguage = "AST", this.completions = [], this.completionIndex = 0, this.fields = [], this._parseQuery = (s = void 0) => {
3607
+ super(), this.placeholder = "", this._value = "", this.value = "", this.outputLanguage = "AST", this.completions = [], this.completionIndex = 0, this.fields = [], this._parseQuery = (s = void 0) => {
3533
3608
  let r;
3534
- if (this.value == "")
3609
+ if (s && (s != null && s.currentTarget) && s.currentTarget.value && (this.value = s.currentTarget.value), this.value == "")
3535
3610
  return;
3536
3611
  try {
3537
3612
  s && s.data == "(" && (this.value = this.value + " )", this._input.setSelectionRange(this.value.length - 2, this.value.length - 2));
3538
3613
  let c = this.value;
3539
3614
  this._input.selectionStart !== null && (c = c.substring(0, this._input.selectionStart) + "@kuery-cursor@" + c.substring(this._input.selectionStart));
3540
- let t = gt(c, { parseCursor: !0, cursorSymbol: "@kuery-cursor@", allowLeadingWildcards: !1 });
3541
- this.autoComplete(t), r = gt(this.value, { allowLeadingWildcards: !1 });
3615
+ let t = $t(c, { parseCursor: !0, cursorSymbol: "@kuery-cursor@", allowLeadingWildcards: !1 });
3616
+ this.autoComplete(t), r = $t(this.value, { allowLeadingWildcards: !1 });
3542
3617
  } catch {
3543
3618
  return;
3544
3619
  }
3545
3620
  let o;
3546
- this.outputLanguage == "AST" ? o = r : o = ja[this.outputLanguage](r, this.fields);
3621
+ this.outputLanguage == "AST" ? o = r : o = qa[this.outputLanguage](r, this.fields);
3547
3622
  let i = new CustomEvent("change", { detail: o });
3548
3623
  this.dispatchEvent(i);
3549
3624
  }, this.getValuesForField = async (s, r) => (console.log("getValuesForField isn't set no values returned", s, r), []), this._selectCompletion = async () => {
@@ -3552,7 +3627,9 @@ let Q = class extends L {
3552
3627
  let s = this.completions[this.completionIndex], r = this.value.substring(0, s.start) + s.value, o = r.length, i = this.value.substring(s.end);
3553
3628
  if (s.value.includes(i) ? this.value = r : this.value = r + this.value.substring(s.end), this._input.setSelectionRange(o, o), s.onSelect) {
3554
3629
  let c = await s.onSelect();
3555
- c !== void 0 && (this.value += c);
3630
+ c !== void 0 && (this.value += c, setTimeout(() => {
3631
+ this._input.focus();
3632
+ }));
3556
3633
  }
3557
3634
  this.completionIndex = 0, this.completions = [], this._parseQuery();
3558
3635
  }, this._handleArrows = (s) => {
@@ -3566,13 +3643,6 @@ let Q = class extends L {
3566
3643
  createRenderRoot() {
3567
3644
  return this;
3568
3645
  }
3569
- get value() {
3570
- return this._input ? String(this._input.value) : this._value;
3571
- }
3572
- set value(s) {
3573
- const r = this._value;
3574
- this._value = s, this.requestUpdate("value", r), this._input && (this._input.value = String(s));
3575
- }
3576
3646
  async autoComplete(s) {
3577
3647
  if (this.completions = [], s.type !== "cursor")
3578
3648
  return;
@@ -3581,102 +3651,102 @@ let Q = class extends L {
3581
3651
  let { start: o, end: i } = s;
3582
3652
  for (let c of s.suggestionTypes) {
3583
3653
  if (c == "conjunction" && s.text.endsWith(" ") && r.push(...["and ", "or "].map((t) => ({ type: c, value: t, start: i, end: i }))), c === "field") {
3584
- let t = this.fields.filter((p) => p.name.includes(s.fieldName) || p.name.includes(s.prefix)).map((p) => [{ type: c, value: p.name, start: o, end: i }]).flat();
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();
3585
3655
  r.push(...t);
3586
3656
  }
3587
3657
  if (c === "operator") {
3588
- let t = this.fields.find((p) => p.name === s.fieldName);
3589
- t && (t.type === "number" ? r.push(...Object.values(Ks).map((p) => ({ type: c, ...p, start: i, end: i }))) : t.type === "string" ? t.format === "date-time" ? r.push(...Object.values(Ha).map((p) => ({
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) => ({
3590
3660
  type: c,
3591
- ...p,
3661
+ ...u,
3592
3662
  start: i,
3593
3663
  end: i,
3594
3664
  onSelect: async () => {
3595
- let b = await this.getValuesForField(s.fieldName, s.prefix);
3596
- b.length === 0 && (b = ["now-1m", "now-1d", "now-1M"]);
3597
- let g, w = ut();
3598
- return await new Promise((x) => {
3599
- let _ = F.display({}, A`
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`
3600
3670
  <div class="query-bar-date-quick-select">
3601
- ${b.map((k) => A`<a href="#" @click=${(S) => {
3602
- S.preventDefault(), g = `"${k}"`, x(g), _.open = !1;
3603
- }}>${k}</a>`)}
3671
+ ${g.map((S) => w`<a href="#" @click=${(k) => {
3672
+ k.preventDefault(), b = `"${S}"`, A(b), _.open = !1;
3673
+ }}>${S}</a>`)}
3604
3674
  </div>
3605
- <spectric-input variant="datetime-local" @change=${(k) => {
3606
- if (!k.target)
3675
+ <spectric-input variant="datetime-local" @change=${(S) => {
3676
+ if (!S.target)
3607
3677
  return;
3608
- g = `"${(/* @__PURE__ */ new Date(k.target.value + ":00.000Z")).toISOString()}"`, w.value.disabled = g === void 0;
3678
+ b = `"${(/* @__PURE__ */ new Date(S.target.value + ":00.000Z")).toISOString()}"`, x.value.disabled = b === void 0;
3609
3679
  }}></spectric-input>
3610
- <spectric-button ${pt(w)} .disabled=${!0} @click=${() => {
3611
- x(g), _.open = !1;
3680
+ <spectric-button ${ht(x)} .disabled=${!0} @click=${() => {
3681
+ A(b), _.open = !1;
3612
3682
  }}>Submit</spectric-button>
3613
3683
  `);
3614
- }), g;
3684
+ }), b;
3615
3685
  }
3616
- }))) : r.push(...Object.values(Qa).map((p) => ({ type: c, ...p, start: i, end: i }))) : t.type === "boolean" && r.push(...Ia.map((p) => ({ type: c, ...p, start: i, end: i }))));
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 }))));
3617
3687
  }
3618
3688
  if (c === "value") {
3619
- let t = this.fields.find((p) => p.name === s.fieldName);
3689
+ let t = this.fields.find((u) => u.name === s.fieldName);
3620
3690
  if (t && t.type == "boolean")
3621
3691
  r.push({ type: c, value: "true", start: o, end: i }, { type: c, value: "false", start: o, end: i });
3622
3692
  else {
3623
3693
  console.log(`invoke callback to get values for ${s.fieldName}`);
3624
- let p = await this.getValuesForField(s.fieldName, s.prefix);
3625
- (t == null ? void 0 : t.type) === "string" && (p = p.map((b) => `"${b}"`)), r.push(...p.map((b) => ({ type: c, value: b, start: o, end: i })));
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 })));
3626
3696
  }
3627
3697
  }
3628
3698
  }
3629
3699
  if (this.completions = r, this.completions.length && this._autocomplete) {
3630
- let { width: c, left: t, bottom: p } = this._input.getBoundingClientRect();
3631
- this._autocomplete.showPopover(), "anchorName" in document.documentElement.style || (this._autocomplete.style.left = `${t + 3.75}px`, this._autocomplete.style.top = `${p}px`), this._autocomplete.style.width = `${c - 15}px`;
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`;
3632
3702
  }
3633
3703
  }
3634
3704
  updated(s) {
3635
3705
  s.has("outputLanguage") && this._parseQuery();
3636
3706
  }
3637
3707
  render() {
3638
- return A`
3639
- <spectric-input .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${(s) => s.stopPropagation()}></spectric-input>
3708
+ return w`
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>
3640
3710
  <div class="autocomplete" popover style=${`position-anchor: --${this.uuid};`}>
3641
3711
  ${this.completions.map(
3642
- (s, r) => A`<div @click=${() => {
3712
+ (s, r) => w`<div @click=${() => {
3643
3713
  this.completionIndex = r, this._selectCompletion();
3644
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>`
3645
3715
  )}
3646
3716
  </div>`;
3647
3717
  }
3648
3718
  };
3649
- X([
3719
+ G([
3650
3720
  v({ type: String, reflect: !0 })
3651
3721
  ], Q.prototype, "placeholder", 2);
3652
- X([
3722
+ G([
3653
3723
  v({ type: String, reflect: !0 })
3654
- ], Q.prototype, "value", 1);
3655
- X([
3724
+ ], Q.prototype, "value", 2);
3725
+ G([
3656
3726
  v({ type: String, reflect: !0 })
3657
3727
  ], Q.prototype, "outputLanguage", 2);
3658
- X([
3659
- mt()
3728
+ G([
3729
+ St()
3660
3730
  ], Q.prototype, "completions", 2);
3661
- X([
3662
- mt()
3731
+ G([
3732
+ St()
3663
3733
  ], Q.prototype, "completionIndex", 2);
3664
- X([
3734
+ G([
3665
3735
  v({ type: Array, reflect: !0 })
3666
3736
  ], Q.prototype, "fields", 2);
3667
- X([
3668
- We(".autocomplete")
3737
+ G([
3738
+ Ze(".autocomplete")
3669
3739
  ], Q.prototype, "_autocomplete", 2);
3670
- X([
3671
- $t(".autocomplete")
3740
+ G([
3741
+ kt(".autocomplete")
3672
3742
  ], Q.prototype, "_asyncAutocomplete", 2);
3673
- X([
3674
- We("spectric-input")
3743
+ G([
3744
+ Ze("spectric-input")
3675
3745
  ], Q.prototype, "_input", 2);
3676
- Q = X([
3677
- I("spectric-query")
3746
+ Q = G([
3747
+ N("spectric-query")
3678
3748
  ], Q);
3679
- const As = K`
3749
+ const Ns = Z`
3680
3750
  border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
3681
3751
  background-color: var(--panel-color,#0b0b0b);
3682
3752
  --spectric-input-color: var(--spectric-background);
@@ -3684,7 +3754,7 @@ const As = K`
3684
3754
  --spectric-text-primary:var(--text-primary);
3685
3755
  --spectric-text-secondary:var(--text-secondary);
3686
3756
  filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
3687
- `, ks = K`
3757
+ `, Ds = Z`
3688
3758
  border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
3689
3759
  background-color: var(--panel-color-inverse,#0b0b0b);
3690
3760
  color:var(--text-primary,#3c4c5b);
@@ -3692,7 +3762,7 @@ const As = K`
3692
3762
  --spectric-text-primary:var(--text-secondary);
3693
3763
  --spectric-text-secondary:var(--text-primary);
3694
3764
  filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
3695
- `, qa = K`
3765
+ `, tc = Z`
3696
3766
  :host{
3697
3767
  display:block;
3698
3768
  border:2px solid black;
@@ -3702,26 +3772,26 @@ const As = K`
3702
3772
 
3703
3773
  }
3704
3774
  :host(spectric-panel[level='0']) {
3705
- ${As};
3775
+ ${Ns};
3706
3776
  }
3707
3777
 
3708
3778
  :host(spectric-panel[level='1']) {
3709
- ${ks};
3779
+ ${Ds};
3710
3780
  }
3711
3781
 
3712
3782
  :host(spectric-panel[level='2']) {
3713
- ${As};
3783
+ ${Ns};
3714
3784
  }
3715
3785
  :host(spectric-panel[level='3']) {
3716
- ${ks};
3786
+ ${Ds};
3717
3787
  }
3718
3788
  `;
3719
- var Wa = Object.defineProperty, Ya = Object.getOwnPropertyDescriptor, or = (s, r, o, i) => {
3720
- for (var c = i > 1 ? void 0 : i ? Ya(r, o) : r, t = s.length - 1, p; t >= 0; t--)
3721
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
3722
- return i && c && Wa(r, o, c), 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;
3723
3793
  };
3724
- let He = class extends L {
3794
+ let We = class extends O {
3725
3795
  constructor() {
3726
3796
  super(...arguments), this.level = 0;
3727
3797
  }
@@ -3746,25 +3816,25 @@ let He = class extends L {
3746
3816
  );
3747
3817
  }
3748
3818
  render() {
3749
- return A` <slot></slot> `;
3819
+ return w` <slot></slot> `;
3750
3820
  }
3751
3821
  };
3752
- He.styles = qa;
3753
- or([
3822
+ We.styles = tc;
3823
+ dr([
3754
3824
  v({ type: Number, reflect: !0 })
3755
- ], He.prototype, "level", 2);
3756
- or([
3825
+ ], We.prototype, "level", 2);
3826
+ dr([
3757
3827
  v({ attribute: !1 })
3758
- ], He.prototype, "layers", 2);
3759
- He = or([
3760
- I("spectric-panel")
3761
- ], He);
3762
- var Ka = Object.defineProperty, Za = Object.getOwnPropertyDescriptor, Zs = (s, r, o, i) => {
3763
- for (var c = i > 1 ? void 0 : i ? Za(r, o) : r, t = s.length - 1, p; t >= 0; t--)
3764
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
3765
- return i && c && Ka(r, o, c), 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;
3766
3836
  };
3767
- const ac = {
3837
+ const Lc = {
3768
3838
  "--primary": { control: "color" },
3769
3839
  "--secondary": { control: "color" },
3770
3840
  "--tertiary": { control: "color" },
@@ -3775,7 +3845,7 @@ const ac = {
3775
3845
  "--text-secondary": { control: "color" },
3776
3846
  "--text-on-color": { control: "color" },
3777
3847
  "--border-radius": { control: "text" }
3778
- }, Xs = {
3848
+ }, oi = {
3779
3849
  "--secondary": "#77878b",
3780
3850
  "--tertiary": "#c7c7c7",
3781
3851
  "--disabled": "#000000",
@@ -3784,20 +3854,20 @@ const ac = {
3784
3854
  "--text-on-color": "#ededed",
3785
3855
  "--background": "#181818",
3786
3856
  "--background-inverse": "#37373d"
3787
- }, Ss = {
3788
- ...Xs,
3857
+ }, js = {
3858
+ ...oi,
3789
3859
  "--primary": "#ffd45a",
3790
3860
  "--text-on-color": "#4f4f4f"
3791
- }, Zt = {
3861
+ }, tr = {
3792
3862
  undefined: {},
3793
3863
  light: {},
3794
- dark: Xs,
3795
- spectric: Ss,
3864
+ dark: oi,
3865
+ spectric: js,
3796
3866
  spectricFlat: {
3797
- ...Ss,
3867
+ ...js,
3798
3868
  "--border-radius": "1px"
3799
3869
  }
3800
- }, cc = Object.fromEntries(Object.keys(Zt).map((s) => [s, s])), Xa = `
3870
+ }, Nc = Object.fromEntries(Object.keys(tr).map((s) => [s, s])), nc = `
3801
3871
  --spectric-background: var(--background,#ffffff);
3802
3872
  --spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
3803
3873
  --spectric-background-inverse: var(--background-inverse,#f4f4f4);
@@ -3841,7 +3911,7 @@ const ac = {
3841
3911
  --spectric-button-disabled: #c6c6c6;
3842
3912
  color: var(--spectric-text-primary);
3843
3913
  `;
3844
- let vt = class extends L {
3914
+ let _t = class extends O {
3845
3915
  constructor() {
3846
3916
  super(...arguments), this.theme = "undefined";
3847
3917
  }
@@ -3855,15 +3925,15 @@ let vt = class extends L {
3855
3925
  }
3856
3926
  }
3857
3927
  render() {
3858
- let s = Object.keys(Zt).includes(this.theme) ? this.theme : "undefined", r = Object.entries(
3859
- Zt[s]
3928
+ let s = Object.keys(tr).includes(this.theme) ? this.theme : "undefined", r = Object.entries(
3929
+ tr[s]
3860
3930
  ).map((o) => `${o[0]}:${o[1]};`).join(`
3861
3931
  `);
3862
- return A`
3863
- ${this.theme && this.theme !== "light" ? A`
3932
+ return w`
3933
+ ${this.theme && this.theme !== "light" ? w`
3864
3934
  <style>:host{
3865
3935
  ${r};
3866
- ${Xa}
3936
+ ${nc}
3867
3937
  }
3868
3938
  /* Webkit psudo elements don't pick up variables defined by the host */
3869
3939
  ::-webkit-scrollbar-thumb {
@@ -3937,16 +4007,16 @@ let vt = class extends L {
3937
4007
  `;
3938
4008
  }
3939
4009
  };
3940
- vt.styles = K`:host{
4010
+ _t.styles = Z`:host{
3941
4011
  display:contents;
3942
4012
  }`;
3943
- Zs([
4013
+ ii([
3944
4014
  v({ reflect: !0 })
3945
- ], vt.prototype, "theme", 2);
3946
- vt = Zs([
3947
- I("spectric-theme")
3948
- ], vt);
3949
- const Ga = K`
4015
+ ], _t.prototype, "theme", 2);
4016
+ _t = ii([
4017
+ N("spectric-theme")
4018
+ ], _t);
4019
+ const ac = Z`
3950
4020
  :host {
3951
4021
  display: block;
3952
4022
  height: 100%;
@@ -4010,18 +4080,18 @@ const Ga = K`
4010
4080
  cursor: ew-resize;
4011
4081
  }
4012
4082
  `;
4013
- var Ja = Object.defineProperty, Va = Object.getOwnPropertyDescriptor, U = (s, r, o, i) => {
4014
- for (var c = i > 1 ? void 0 : i ? Va(r, o) : r, t = s.length - 1, p; t >= 0; t--)
4015
- (p = s[t]) && (c = (i ? p(r, o, c) : p(c)) || c);
4016
- return i && c && Ja(r, o, c), c;
4017
- }, ec = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(ec || {});
4018
- const tc = "spectric-splitview";
4019
- let D = class extends Fs {
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 {
4020
4090
  constructor() {
4021
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 = () => {
4022
- let { percentage: r, orientation: o, invisible: i, min: c, max: t, useSavedState: p } = this, b = this.getAttribute("id");
4023
- b && this.useSavedState && localStorage.setItem(`splitview-${b}`, String(r)), this.dispatchEvent(new CustomEvent("change", { detail: { orientation: o, percentage: r, invisible: i, min: c, max: t, useSavedState: p } }));
4024
- }, this._onMouseMove = Qs((r) => {
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) => {
4025
4095
  if (this.isDragging) {
4026
4096
  const o = this.getBoundingClientRect();
4027
4097
  let i, c;
@@ -4062,7 +4132,7 @@ let D = class extends Fs {
4062
4132
  s.has("percentage") && (this.percentage = Math.min(Math.max(Number(this.percentage), this.min), this.max));
4063
4133
  }
4064
4134
  render() {
4065
- return A`
4135
+ return w`
4066
4136
  <div class="split-view ${this.orientation} ${this._error ? "error" : ""} ${this.isDragging ? "active" : ""}" style="--split-percentage: ${this.percentage}%;">
4067
4137
  <span class="error-display">${this._error}</span>
4068
4138
  <div class="panel" style="${this.orientation === "horizontal" ? "flex: var(--split-percentage, 50%)" : "max-height: var(--split-percentage, 50%)"}">
@@ -4077,63 +4147,303 @@ let D = class extends Fs {
4077
4147
  `;
4078
4148
  }
4079
4149
  };
4080
- D.styles = Ga;
4150
+ j.styles = ac;
4081
4151
  U([
4082
4152
  v({ type: String })
4083
- ], D.prototype, "orientation", 2);
4153
+ ], j.prototype, "orientation", 2);
4084
4154
  U([
4085
4155
  v({ type: Number, reflect: !0 })
4086
- ], D.prototype, "percentage", 2);
4156
+ ], j.prototype, "percentage", 2);
4087
4157
  U([
4088
4158
  v({ type: Boolean })
4089
- ], D.prototype, "invisible", 2);
4159
+ ], j.prototype, "invisible", 2);
4090
4160
  U([
4091
4161
  v({ type: Number, reflect: !0 })
4092
- ], D.prototype, "min", 2);
4162
+ ], j.prototype, "min", 2);
4093
4163
  U([
4094
4164
  v({ type: Number, reflect: !0 })
4095
- ], D.prototype, "max", 2);
4165
+ ], j.prototype, "max", 2);
4096
4166
  U([
4097
4167
  v({ type: Boolean, reflect: !0 })
4098
- ], D.prototype, "useSavedState", 2);
4168
+ ], j.prototype, "useSavedState", 2);
4099
4169
  U([
4100
- mt()
4101
- ], D.prototype, "isDragging", 2);
4170
+ St()
4171
+ ], j.prototype, "isDragging", 2);
4102
4172
  U([
4103
- mt()
4104
- ], D.prototype, "_error", 2);
4173
+ St()
4174
+ ], j.prototype, "_error", 2);
4105
4175
  U([
4106
- $t(".splitter")
4107
- ], D.prototype, "_splitter", 2);
4176
+ kt(".splitter")
4177
+ ], j.prototype, "_splitter", 2);
4108
4178
  U([
4109
- We("slot[name='panel1']")
4110
- ], D.prototype, "_panel1", 2);
4179
+ Ze("slot[name='panel1']")
4180
+ ], j.prototype, "_panel1", 2);
4111
4181
  U([
4112
- We("slot[name='panel2']")
4113
- ], D.prototype, "_panel2", 2);
4114
- D = U([
4115
- I(tc)
4116
- ], D);
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);
4117
4423
  export {
4118
4424
  V as BitDisplayCanvas,
4119
- rn as ButtonSizes,
4120
- sn as ButtonVariants,
4121
- ac as CSSPropsControls,
4122
- F as DialogElement,
4123
- Ys as DialogElementTag,
4124
- tc as ElementTag,
4125
- Ee as Header,
4126
- Cn as InputVariants,
4127
- ec as Orientations,
4128
- J as SpectricButton,
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,
4129
4437
  E as SpectricInput,
4130
4438
  B as SpectricPage,
4131
- He as SpectricPanel,
4439
+ We as SpectricPanel,
4132
4440
  Q as SpectricQuery,
4133
- vt as SpectricThemeProvider,
4134
- D as SplitView,
4135
- Fa as SupportedLanguages,
4136
- cc as ThemeSelections,
4441
+ _t as SpectricThemeProvider,
4442
+ j as SplitView,
4443
+ Ga as SupportedLanguages,
4444
+ Ye as TableElement,
4445
+ kc as TableElementTag,
4446
+ Nc as ThemeSelections,
4137
4447
  ne as nodeTypes
4138
4448
  };
4139
4449
  //# sourceMappingURL=index.es.js.map