@searchcraft/javascript-sdk 0.10.3 → 0.10.5

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 (65) hide show
  1. package/dist/components/index.d.ts +50 -20
  2. package/dist/components/index.js +4 -4
  3. package/dist/components/p-4dd1995c.js +193 -0
  4. package/dist/components/p-4dd1995c.js.map +1 -0
  5. package/dist/components/{p-6717ab82.js → p-6c471ee0.js} +3 -3
  6. package/dist/components/{p-6717ab82.js.map → p-6c471ee0.js.map} +1 -1
  7. package/dist/components/{p-d4558d44.js → p-7c10ca44.js} +273 -260
  8. package/dist/components/p-7c10ca44.js.map +1 -0
  9. package/dist/components/{p-da1fb5c0.js → p-8a4cfe99.js} +2 -2
  10. package/dist/components/{p-da1fb5c0.js.map → p-8a4cfe99.js.map} +1 -1
  11. package/dist/components/{p-508ee769.js → p-b72015a6.js} +2 -2
  12. package/dist/components/{p-508ee769.js.map → p-b72015a6.js.map} +1 -1
  13. package/dist/components/p-bb700499.js +338 -0
  14. package/dist/components/p-bb700499.js.map +1 -0
  15. package/dist/components/{p-5a4be632.js → p-bfad84c6.js} +13 -4
  16. package/dist/components/p-bfad84c6.js.map +1 -0
  17. package/dist/components/p-d54771ef.js +182 -0
  18. package/dist/components/p-d54771ef.js.map +1 -0
  19. package/dist/components/{p-fd564261.js → p-d9222264.js} +4 -4
  20. package/dist/components/{p-fd564261.js.map → p-d9222264.js.map} +1 -1
  21. package/dist/components/{p-ad569b01.js → p-f1afb299.js} +2 -2
  22. package/dist/components/{p-ad569b01.js.map → p-f1afb299.js.map} +1 -1
  23. package/dist/components/{p-06bac1fc.js → p-f4b0ff45.js} +3 -3
  24. package/dist/components/{p-06bac1fc.js.map → p-f4b0ff45.js.map} +1 -1
  25. package/dist/components/searchcraft-ad.js +1 -1
  26. package/dist/components/searchcraft-facet-list.js +1 -1
  27. package/dist/components/searchcraft-filter-panel.js +13 -18
  28. package/dist/components/searchcraft-filter-panel.js.map +1 -1
  29. package/dist/components/searchcraft-input-form.js +1 -1
  30. package/dist/components/searchcraft-pagination.js +1 -1
  31. package/dist/components/searchcraft-popover-button.js +1 -1
  32. package/dist/components/searchcraft-popover-footer.js +1 -1
  33. package/dist/components/searchcraft-popover-form.js +6 -6
  34. package/dist/components/searchcraft-popover-list-item.js +1 -1
  35. package/dist/components/searchcraft-popover-list-view.js +1 -1
  36. package/dist/components/searchcraft-results-info.js +2 -2
  37. package/dist/components/searchcraft-search-result.js +1 -1
  38. package/dist/components/searchcraft-search-results-per-page.js +1 -1
  39. package/dist/components/searchcraft-search-results.js +3 -3
  40. package/dist/components/searchcraft-slider.js +1 -1
  41. package/dist/components/searchcraft-theme.js +1 -1
  42. package/dist/components/searchcraft-theme.js.map +1 -1
  43. package/dist/components/searchcraft-toggle-button.js +1 -1
  44. package/dist/hydrate/index.js +613 -386
  45. package/dist/hydrate/index.mjs +613 -386
  46. package/dist/themes/hologram.css +1 -1
  47. package/dist/themes/hologram.css.map +1 -1
  48. package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +21 -13
  49. package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +2 -2
  50. package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +6 -0
  51. package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +10 -4
  52. package/dist/types/components.d.ts +23 -7
  53. package/dist/types/store/SearchcraftStore.types.d.ts +3 -2
  54. package/dist/types/utils/facets.d.ts +20 -3
  55. package/dist/types/utils/throttle.d.ts +14 -0
  56. package/dist/types/utils/units.d.ts +33 -0
  57. package/package.json +3 -3
  58. package/dist/components/p-4d37616e.js +0 -105
  59. package/dist/components/p-4d37616e.js.map +0 -1
  60. package/dist/components/p-53c795bd.js +0 -279
  61. package/dist/components/p-53c795bd.js.map +0 -1
  62. package/dist/components/p-5a4be632.js.map +0 -1
  63. package/dist/components/p-7c650118.js +0 -110
  64. package/dist/components/p-7c650118.js.map +0 -1
  65. package/dist/components/p-d4558d44.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  var B = Object.defineProperty;
2
2
  var N = (a, e, n) => e in a ? B(a, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : a[e] = n;
3
- var l = (a, e, n) => N(a, typeof e != "symbol" ? e + "" : e, n);
3
+ var h = (a, e, n) => N(a, typeof e != "symbol" ? e + "" : e, n);
4
4
  var O = /* @__PURE__ */ ((a) => (a[a.DEBUG = 0] = "DEBUG", a[a.INFO = 1] = "INFO", a[a.WARN = 2] = "WARN", a[a.ERROR = 3] = "ERROR", a))(O || {});
5
5
  class pe {
6
6
  constructor(e) {
7
- l(this, "logLevel");
8
- l(this, "logFormatter");
7
+ h(this, "logLevel");
8
+ h(this, "logFormatter");
9
9
  this.logLevel = e.logLevel || 1, this.logFormatter = e.logFormatter || this.defaultFormatter;
10
10
  }
11
11
  defaultFormatter(e, n) {
@@ -40,87 +40,87 @@ class pe {
40
40
  }
41
41
  }
42
42
  }
43
- function w(a, e, n, r) {
44
- return new (n || (n = Promise))(function(i, o) {
43
+ function y(a, e, n, r) {
44
+ return new (n || (n = Promise))(function(s, o) {
45
45
  function t(c) {
46
46
  try {
47
- h(r.next(c));
48
- } catch (s) {
49
- o(s);
47
+ d(r.next(c));
48
+ } catch (i) {
49
+ o(i);
50
50
  }
51
51
  }
52
52
  function u(c) {
53
53
  try {
54
- h(r.throw(c));
55
- } catch (s) {
56
- o(s);
54
+ d(r.throw(c));
55
+ } catch (i) {
56
+ o(i);
57
57
  }
58
58
  }
59
- function h(c) {
60
- var s;
61
- c.done ? i(c.value) : (s = c.value, s instanceof n ? s : new n(function(p) {
62
- p(s);
59
+ function d(c) {
60
+ var i;
61
+ c.done ? s(c.value) : (i = c.value, i instanceof n ? i : new n(function(p) {
62
+ p(i);
63
63
  })).then(t, u);
64
64
  }
65
- h((r = r.apply(a, [])).next());
65
+ d((r = r.apply(a, [])).next());
66
66
  });
67
67
  }
68
- function y(a, e) {
69
- var n, r, i, o, t = { label: 0, sent: function() {
70
- if (1 & i[0]) throw i[1];
71
- return i[1];
68
+ function w(a, e) {
69
+ var n, r, s, o, t = { label: 0, sent: function() {
70
+ if (1 & s[0]) throw s[1];
71
+ return s[1];
72
72
  }, trys: [], ops: [] };
73
73
  return o = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
74
74
  return this;
75
75
  }), o;
76
- function u(h) {
76
+ function u(d) {
77
77
  return function(c) {
78
- return function(s) {
78
+ return function(i) {
79
79
  if (n) throw new TypeError("Generator is already executing.");
80
- for (; o && (o = 0, s[0] && (t = 0)), t; ) try {
81
- if (n = 1, r && (i = 2 & s[0] ? r.return : s[0] ? r.throw || ((i = r.return) && i.call(r), 0) : r.next) && !(i = i.call(r, s[1])).done) return i;
82
- switch (r = 0, i && (s = [2 & s[0], i.value]), s[0]) {
80
+ for (; o && (o = 0, i[0] && (t = 0)), t; ) try {
81
+ if (n = 1, r && (s = 2 & i[0] ? r.return : i[0] ? r.throw || ((s = r.return) && s.call(r), 0) : r.next) && !(s = s.call(r, i[1])).done) return s;
82
+ switch (r = 0, s && (i = [2 & i[0], s.value]), i[0]) {
83
83
  case 0:
84
84
  case 1:
85
- i = s;
85
+ s = i;
86
86
  break;
87
87
  case 4:
88
- return t.label++, { value: s[1], done: !1 };
88
+ return t.label++, { value: i[1], done: !1 };
89
89
  case 5:
90
- t.label++, r = s[1], s = [0];
90
+ t.label++, r = i[1], i = [0];
91
91
  continue;
92
92
  case 7:
93
- s = t.ops.pop(), t.trys.pop();
93
+ i = t.ops.pop(), t.trys.pop();
94
94
  continue;
95
95
  default:
96
- if (i = t.trys, !((i = i.length > 0 && i[i.length - 1]) || s[0] !== 6 && s[0] !== 2)) {
96
+ if (s = t.trys, !((s = s.length > 0 && s[s.length - 1]) || i[0] !== 6 && i[0] !== 2)) {
97
97
  t = 0;
98
98
  continue;
99
99
  }
100
- if (s[0] === 3 && (!i || s[1] > i[0] && s[1] < i[3])) {
101
- t.label = s[1];
100
+ if (i[0] === 3 && (!s || i[1] > s[0] && i[1] < s[3])) {
101
+ t.label = i[1];
102
102
  break;
103
103
  }
104
- if (s[0] === 6 && t.label < i[1]) {
105
- t.label = i[1], i = s;
104
+ if (i[0] === 6 && t.label < s[1]) {
105
+ t.label = s[1], s = i;
106
106
  break;
107
107
  }
108
- if (i && t.label < i[2]) {
109
- t.label = i[2], t.ops.push(s);
108
+ if (s && t.label < s[2]) {
109
+ t.label = s[2], t.ops.push(i);
110
110
  break;
111
111
  }
112
- i[2] && t.ops.pop(), t.trys.pop();
112
+ s[2] && t.ops.pop(), t.trys.pop();
113
113
  continue;
114
114
  }
115
- s = e.call(a, t);
115
+ i = e.call(a, t);
116
116
  } catch (p) {
117
- s = [6, p], r = 0;
117
+ i = [6, p], r = 0;
118
118
  } finally {
119
- n = i = 0;
119
+ n = s = 0;
120
120
  }
121
- if (5 & s[0]) throw s[1];
122
- return { value: s[0] ? s[1] : void 0, done: !0 };
123
- }([h, c]);
121
+ if (5 & i[0]) throw i[1];
122
+ return { value: i[0] ? i[1] : void 0, done: !0 };
123
+ }([d, c]);
124
124
  };
125
125
  }
126
126
  }
@@ -141,82 +141,82 @@ var m = new Uint32Array([597399067, 2869860233, 951274213, 2716044179]);
141
141
  function g(a, e) {
142
142
  return a << e | a >>> 32 - e;
143
143
  }
144
- function I(a, e) {
144
+ function _(a, e) {
145
145
  var n;
146
146
  if (e === void 0 && (e = 0), e = e ? 0 | e : 0, typeof a == "string" && (n = a, a = new TextEncoder().encode(n).buffer), !(a instanceof ArrayBuffer)) throw new TypeError("Expected key to be ArrayBuffer or string");
147
147
  var r = new Uint32Array([e, e, e, e]);
148
148
  ((function(o, t) {
149
- for (var u = o.byteLength / 16 | 0, h = new Uint32Array(o, 0, 4 * u), c = 0; c < u; c++) {
150
- var s = h.subarray(4 * c, 4 * (c + 1));
151
- s[0] = Math.imul(s[0], m[0]), s[0] = g(s[0], 15), s[0] = Math.imul(s[0], m[1]), t[0] = t[0] ^ s[0], t[0] = g(t[0], 19), t[0] = t[0] + t[1], t[0] = Math.imul(t[0], 5) + 1444728091, s[1] = Math.imul(s[1], m[1]), s[1] = g(s[1], 16), s[1] = Math.imul(s[1], m[2]), t[1] = t[1] ^ s[1], t[1] = g(t[1], 17), t[1] = t[1] + t[2], t[1] = Math.imul(t[1], 5) + 197830471, s[2] = Math.imul(s[2], m[2]), s[2] = g(s[2], 17), s[2] = Math.imul(s[2], m[3]), t[2] = t[2] ^ s[2], t[2] = g(t[2], 15), t[2] = t[2] + t[3], t[2] = Math.imul(t[2], 5) + 2530024501, s[3] = Math.imul(s[3], m[3]), s[3] = g(s[3], 18), s[3] = Math.imul(s[3], m[0]), t[3] = t[3] ^ s[3], t[3] = g(t[3], 13), t[3] = t[3] + t[0], t[3] = Math.imul(t[3], 5) + 850148119;
149
+ for (var u = o.byteLength / 16 | 0, d = new Uint32Array(o, 0, 4 * u), c = 0; c < u; c++) {
150
+ var i = d.subarray(4 * c, 4 * (c + 1));
151
+ i[0] = Math.imul(i[0], m[0]), i[0] = g(i[0], 15), i[0] = Math.imul(i[0], m[1]), t[0] = t[0] ^ i[0], t[0] = g(t[0], 19), t[0] = t[0] + t[1], t[0] = Math.imul(t[0], 5) + 1444728091, i[1] = Math.imul(i[1], m[1]), i[1] = g(i[1], 16), i[1] = Math.imul(i[1], m[2]), t[1] = t[1] ^ i[1], t[1] = g(t[1], 17), t[1] = t[1] + t[2], t[1] = Math.imul(t[1], 5) + 197830471, i[2] = Math.imul(i[2], m[2]), i[2] = g(i[2], 17), i[2] = Math.imul(i[2], m[3]), t[2] = t[2] ^ i[2], t[2] = g(t[2], 15), t[2] = t[2] + t[3], t[2] = Math.imul(t[2], 5) + 2530024501, i[3] = Math.imul(i[3], m[3]), i[3] = g(i[3], 18), i[3] = Math.imul(i[3], m[0]), t[3] = t[3] ^ i[3], t[3] = g(t[3], 13), t[3] = t[3] + t[0], t[3] = Math.imul(t[3], 5) + 850148119;
152
152
  }
153
153
  }))(a, r), function(o, t) {
154
- var u = o.byteLength / 16 | 0, h = o.byteLength % 16, c = new Uint32Array(4), s = new Uint8Array(o, 16 * u, h);
155
- switch (h) {
154
+ var u = o.byteLength / 16 | 0, d = o.byteLength % 16, c = new Uint32Array(4), i = new Uint8Array(o, 16 * u, d);
155
+ switch (d) {
156
156
  case 15:
157
- c[3] = c[3] ^ s[14] << 16;
157
+ c[3] = c[3] ^ i[14] << 16;
158
158
  case 14:
159
- c[3] = c[3] ^ s[13] << 8;
159
+ c[3] = c[3] ^ i[13] << 8;
160
160
  case 13:
161
- c[3] = c[3] ^ s[12] << 0, c[3] = Math.imul(c[3], m[3]), c[3] = g(c[3], 18), c[3] = Math.imul(c[3], m[0]), t[3] = t[3] ^ c[3];
161
+ c[3] = c[3] ^ i[12] << 0, c[3] = Math.imul(c[3], m[3]), c[3] = g(c[3], 18), c[3] = Math.imul(c[3], m[0]), t[3] = t[3] ^ c[3];
162
162
  case 12:
163
- c[2] = c[2] ^ s[11] << 24;
163
+ c[2] = c[2] ^ i[11] << 24;
164
164
  case 11:
165
- c[2] = c[2] ^ s[10] << 16;
165
+ c[2] = c[2] ^ i[10] << 16;
166
166
  case 10:
167
- c[2] = c[2] ^ s[9] << 8;
167
+ c[2] = c[2] ^ i[9] << 8;
168
168
  case 9:
169
- c[2] = c[2] ^ s[8] << 0, c[2] = Math.imul(c[2], m[2]), c[2] = g(c[2], 17), c[2] = Math.imul(c[2], m[3]), t[2] = t[2] ^ c[2];
169
+ c[2] = c[2] ^ i[8] << 0, c[2] = Math.imul(c[2], m[2]), c[2] = g(c[2], 17), c[2] = Math.imul(c[2], m[3]), t[2] = t[2] ^ c[2];
170
170
  case 8:
171
- c[1] = c[1] ^ s[7] << 24;
171
+ c[1] = c[1] ^ i[7] << 24;
172
172
  case 7:
173
- c[1] = c[1] ^ s[6] << 16;
173
+ c[1] = c[1] ^ i[6] << 16;
174
174
  case 6:
175
- c[1] = c[1] ^ s[5] << 8;
175
+ c[1] = c[1] ^ i[5] << 8;
176
176
  case 5:
177
- c[1] = c[1] ^ s[4] << 0, c[1] = Math.imul(c[1], m[1]), c[1] = g(c[1], 16), c[1] = Math.imul(c[1], m[2]), t[1] = t[1] ^ c[1];
177
+ c[1] = c[1] ^ i[4] << 0, c[1] = Math.imul(c[1], m[1]), c[1] = g(c[1], 16), c[1] = Math.imul(c[1], m[2]), t[1] = t[1] ^ c[1];
178
178
  case 4:
179
- c[0] = c[0] ^ s[3] << 24;
179
+ c[0] = c[0] ^ i[3] << 24;
180
180
  case 3:
181
- c[0] = c[0] ^ s[2] << 16;
181
+ c[0] = c[0] ^ i[2] << 16;
182
182
  case 2:
183
- c[0] = c[0] ^ s[1] << 8;
183
+ c[0] = c[0] ^ i[1] << 8;
184
184
  case 1:
185
- c[0] = c[0] ^ s[0] << 0, c[0] = Math.imul(c[0], m[0]), c[0] = g(c[0], 15), c[0] = Math.imul(c[0], m[1]), t[0] = t[0] ^ c[0];
185
+ c[0] = c[0] ^ i[0] << 0, c[0] = Math.imul(c[0], m[0]), c[0] = g(c[0], 15), c[0] = Math.imul(c[0], m[1]), t[0] = t[0] ^ c[0];
186
186
  }
187
187
  }(a, r), function(o, t) {
188
188
  t[0] = t[0] ^ o.byteLength, t[1] = t[1] ^ o.byteLength, t[2] = t[2] ^ o.byteLength, t[3] = t[3] ^ o.byteLength, t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0, t[0] = T(t[0]), t[1] = T(t[1]), t[2] = T(t[2]), t[3] = T(t[3]), t[0] = t[0] + t[1] | 0, t[0] = t[0] + t[2] | 0, t[0] = t[0] + t[3] | 0, t[1] = t[1] + t[0] | 0, t[2] = t[2] + t[0] | 0, t[3] = t[3] + t[0] | 0;
189
189
  }(a, r);
190
- var i = new Uint8Array(r.buffer);
191
- return Array.from(i).map(function(o) {
190
+ var s = new Uint8Array(r.buffer);
191
+ return Array.from(s).map(function(o) {
192
192
  return o.toString(16).padStart(2, "0");
193
193
  }).join("");
194
194
  }
195
- function W(a, e) {
195
+ function V(a, e) {
196
196
  return new Promise(function(n) {
197
197
  setTimeout(function() {
198
198
  return n(e);
199
199
  }, a);
200
200
  });
201
201
  }
202
- function V(a, e, n) {
202
+ function W(a, e, n) {
203
203
  return Promise.all(a.map(function(r) {
204
- return Promise.race([r, W(e, n)]);
204
+ return Promise.race([r, V(e, n)]);
205
205
  }));
206
206
  }
207
207
  function $() {
208
- return w(this, void 0, void 0, function() {
209
- var a, e, n, r, i;
210
- return y(this, function(o) {
208
+ return y(this, void 0, void 0, function() {
209
+ var a, e, n, r, s;
210
+ return w(this, function(o) {
211
211
  switch (o.label) {
212
212
  case 0:
213
- return o.trys.push([0, 2, , 3]), a = G(), e = Object.keys(a), [4, V(Object.values(a), (S == null ? void 0 : S.timeout) || 1e3, j)];
213
+ return o.trys.push([0, 2, , 3]), a = G(), e = Object.keys(a), [4, W(Object.values(a), (S == null ? void 0 : S.timeout) || 1e3, j)];
214
214
  case 1:
215
215
  return n = o.sent(), r = n.filter(function(t) {
216
216
  return t !== void 0;
217
- }), i = {}, r.forEach(function(t, u) {
218
- i[e[u]] = t;
219
- }), [2, U(i, S.exclude || [])];
217
+ }), s = {}, r.forEach(function(t, u) {
218
+ s[e[u]] = t;
219
+ }), [2, U(s, S.exclude || [])];
220
220
  case 2:
221
221
  throw o.sent();
222
222
  case 3:
@@ -231,25 +231,25 @@ function U(a, e) {
231
231
  var t = a[o];
232
232
  if (typeof t != "object" || Array.isArray(t)) e.includes(o) || (n[o] = t);
233
233
  else {
234
- var u = U(t, e.map(function(h) {
235
- return h.startsWith(o + ".") ? h.slice(o.length + 1) : h;
234
+ var u = U(t, e.map(function(d) {
235
+ return d.startsWith(o + ".") ? d.slice(o.length + 1) : d;
236
236
  }));
237
237
  Object.keys(u).length > 0 && (n[o] = u);
238
238
  }
239
239
  }
240
240
  };
241
- for (var i in a) r(i);
241
+ for (var s in a) r(s);
242
242
  return n;
243
243
  }
244
244
  function z(a) {
245
- return w(this, void 0, void 0, function() {
245
+ return y(this, void 0, void 0, function() {
246
246
  var e, n;
247
- return y(this, function(r) {
247
+ return w(this, function(r) {
248
248
  switch (r.label) {
249
249
  case 0:
250
250
  return r.trys.push([0, 2, , 3]), [4, $()];
251
251
  case 1:
252
- return e = r.sent(), n = I(JSON.stringify(e)), [2, n.toString()];
252
+ return e = r.sent(), n = _(JSON.stringify(e)), [2, n.toString()];
253
253
  case 2:
254
254
  throw r.sent();
255
255
  case 3:
@@ -263,8 +263,8 @@ function H(a) {
263
263
  return e;
264
264
  }
265
265
  function L(a, e, n) {
266
- for (var r = [], i = 0; i < a[0].data.length; i++) {
267
- for (var o = [], t = 0; t < a.length; t++) o.push(a[t].data[i]);
266
+ for (var r = [], s = 0; s < a[0].data.length; s++) {
267
+ for (var o = [], t = 0; t < a.length; t++) o.push(a[t].data[s]);
268
268
  r.push(Q(o));
269
269
  }
270
270
  var u = new Uint8ClampedArray(r);
@@ -274,69 +274,69 @@ function Q(a) {
274
274
  if (a.length === 0) return 0;
275
275
  for (var e = {}, n = 0, r = a; n < r.length; n++)
276
276
  e[o = r[n]] = (e[o] || 0) + 1;
277
- var i = a[0];
278
- for (var o in e) e[o] > e[i] && (i = parseInt(o, 10));
279
- return i;
277
+ var s = a[0];
278
+ for (var o in e) e[o] > e[s] && (s = parseInt(o, 10));
279
+ return s;
280
280
  }
281
281
  function C() {
282
282
  if (typeof navigator > "u") return { name: "unknown", version: "unknown" };
283
283
  for (var a = navigator.userAgent, e = { Edg: "Edge", OPR: "Opera" }, n = 0, r = [/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/, /(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/, /(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/, /(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/]; n < r.length; n++) {
284
- var i = r[n], o = a.match(i);
284
+ var s = r[n], o = a.match(s);
285
285
  if (o && o.groups) return { name: e[o.groups.name] || o.groups.name, version: o.groups.version };
286
286
  }
287
287
  return { name: "unknown", version: "unknown" };
288
288
  }
289
289
  v("audio", function() {
290
- return w(this, void 0, void 0, function() {
291
- return y(this, function(a) {
290
+ return y(this, void 0, void 0, function() {
291
+ return w(this, function(a) {
292
292
  return [2, new Promise(function(e, n) {
293
293
  try {
294
- var r = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), i = r.createBufferSource(), o = r.createOscillator();
294
+ var r = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), s = r.createBufferSource(), o = r.createOscillator();
295
295
  o.frequency.value = 1e3;
296
296
  var t, u = r.createDynamicsCompressor();
297
- u.threshold.value = -50, u.knee.value = 40, u.ratio.value = 12, u.attack.value = 0, u.release.value = 0.2, o.connect(u), u.connect(r.destination), o.start(), r.oncomplete = function(h) {
298
- t = h.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: o.type, maxChannels: r.destination.maxChannelCount, channelCountMode: i.channelCountMode });
297
+ u.threshold.value = -50, u.knee.value = 40, u.ratio.value = 12, u.attack.value = 0, u.release.value = 0.2, o.connect(u), u.connect(r.destination), o.start(), r.oncomplete = function(d) {
298
+ t = d.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: o.type, maxChannels: r.destination.maxChannelCount, channelCountMode: s.channelCountMode });
299
299
  }, r.startRendering();
300
- } catch (h) {
301
- console.error("Error creating audio fingerprint:", h), n(h);
300
+ } catch (d) {
301
+ console.error("Error creating audio fingerprint:", d), n(d);
302
302
  }
303
303
  })];
304
304
  });
305
305
  });
306
306
  });
307
- var K = C().name !== "SamsungBrowser" ? 1 : 3, P = 280, k = 20;
307
+ var K = C().name !== "SamsungBrowser" ? 1 : 3, P = 280, F = 20;
308
308
  C().name != "Firefox" && v("canvas", function() {
309
309
  return document.createElement("canvas").getContext("2d"), new Promise(function(a) {
310
310
  var e = Array.from({ length: K }, function() {
311
311
  return function() {
312
312
  var n = document.createElement("canvas"), r = n.getContext("2d");
313
313
  if (!r) return new ImageData(1, 1);
314
- n.width = P, n.height = k;
315
- var i = r.createLinearGradient(0, 0, n.width, n.height);
316
- i.addColorStop(0, "red"), i.addColorStop(0.16666666666666666, "orange"), i.addColorStop(0.3333333333333333, "yellow"), i.addColorStop(0.5, "green"), i.addColorStop(0.6666666666666666, "blue"), i.addColorStop(0.8333333333333334, "indigo"), i.addColorStop(1, "violet"), r.fillStyle = i, r.fillRect(0, 0, n.width, n.height);
314
+ n.width = P, n.height = F;
315
+ var s = r.createLinearGradient(0, 0, n.width, n.height);
316
+ s.addColorStop(0, "red"), s.addColorStop(0.16666666666666666, "orange"), s.addColorStop(0.3333333333333333, "yellow"), s.addColorStop(0.5, "green"), s.addColorStop(0.6666666666666666, "blue"), s.addColorStop(0.8333333333333334, "indigo"), s.addColorStop(1, "violet"), r.fillStyle = s, r.fillRect(0, 0, n.width, n.height);
317
317
  var o = "Random Text WMwmil10Oo";
318
318
  r.font = "23.123px Arial", r.fillStyle = "black", r.fillText(o, -5, 15), r.fillStyle = "rgba(0, 0, 255, 0.5)", r.fillText(o, -3.3, 17.7), r.beginPath(), r.moveTo(0, 0), r.lineTo(2 * n.width / 7, n.height), r.strokeStyle = "white", r.lineWidth = 2, r.stroke();
319
319
  var t = r.getImageData(0, 0, n.width, n.height);
320
320
  return t;
321
321
  }();
322
322
  });
323
- a({ commonImageDataHash: I(L(e, P, k).data.toString()).toString() });
323
+ a({ commonImageDataHash: _(L(e, P, F).data.toString()).toString() });
324
324
  });
325
325
  });
326
- var A, X = ["Arial", "Arial Black", "Arial Narrow", "Arial Rounded MT", "Arimo", "Archivo", "Barlow", "Bebas Neue", "Bitter", "Bookman", "Calibri", "Cabin", "Candara", "Century", "Century Gothic", "Comic Sans MS", "Constantia", "Courier", "Courier New", "Crimson Text", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dosis", "Droid Sans", "Exo", "Fira Code", "Fira Sans", "Franklin Gothic Medium", "Garamond", "Geneva", "Georgia", "Gill Sans", "Helvetica", "Impact", "Inconsolata", "Indie Flower", "Inter", "Josefin Sans", "Karla", "Lato", "Lexend", "Lucida Bright", "Lucida Console", "Lucida Sans Unicode", "Manrope", "Merriweather", "Merriweather Sans", "Montserrat", "Myriad", "Noto Sans", "Nunito", "Nunito Sans", "Open Sans", "Optima", "Orbitron", "Oswald", "Pacifico", "Palatino", "Perpetua", "PT Sans", "PT Serif", "Poppins", "Prompt", "Public Sans", "Quicksand", "Rajdhani", "Recursive", "Roboto", "Roboto Condensed", "Rockwell", "Rubik", "Segoe Print", "Segoe Script", "Segoe UI", "Sora", "Source Sans Pro", "Space Mono", "Tahoma", "Taviraj", "Times", "Times New Roman", "Titillium Web", "Trebuchet MS", "Ubuntu", "Varela Round", "Verdana", "Work Sans"], J = ["monospace", "sans-serif", "serif"];
327
- function F(a, e) {
326
+ var I, X = ["Arial", "Arial Black", "Arial Narrow", "Arial Rounded MT", "Arimo", "Archivo", "Barlow", "Bebas Neue", "Bitter", "Bookman", "Calibri", "Cabin", "Candara", "Century", "Century Gothic", "Comic Sans MS", "Constantia", "Courier", "Courier New", "Crimson Text", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dosis", "Droid Sans", "Exo", "Fira Code", "Fira Sans", "Franklin Gothic Medium", "Garamond", "Geneva", "Georgia", "Gill Sans", "Helvetica", "Impact", "Inconsolata", "Indie Flower", "Inter", "Josefin Sans", "Karla", "Lato", "Lexend", "Lucida Bright", "Lucida Console", "Lucida Sans Unicode", "Manrope", "Merriweather", "Merriweather Sans", "Montserrat", "Myriad", "Noto Sans", "Nunito", "Nunito Sans", "Open Sans", "Optima", "Orbitron", "Oswald", "Pacifico", "Palatino", "Perpetua", "PT Sans", "PT Serif", "Poppins", "Prompt", "Public Sans", "Quicksand", "Rajdhani", "Recursive", "Roboto", "Roboto Condensed", "Rockwell", "Rubik", "Segoe Print", "Segoe Script", "Segoe UI", "Sora", "Source Sans Pro", "Space Mono", "Tahoma", "Taviraj", "Times", "Times New Roman", "Titillium Web", "Trebuchet MS", "Ubuntu", "Varela Round", "Verdana", "Work Sans"], J = ["monospace", "sans-serif", "serif"];
327
+ function k(a, e) {
328
328
  if (!a) throw new Error("Canvas context not supported");
329
329
  return a.font = "72px ".concat(e), a.measureText("WwMmLli0Oo").width;
330
330
  }
331
331
  function Y() {
332
332
  var a, e = document.createElement("canvas"), n = (a = e.getContext("webgl")) !== null && a !== void 0 ? a : e.getContext("experimental-webgl");
333
333
  if (n && "getParameter" in n) try {
334
- var r = (n.getParameter(n.VENDOR) || "").toString(), i = (n.getParameter(n.RENDERER) || "").toString(), o = { vendor: r, renderer: i, version: (n.getParameter(n.VERSION) || "").toString(), shadingLanguageVersion: (n.getParameter(n.SHADING_LANGUAGE_VERSION) || "").toString() };
335
- if (!i.length || !r.length) {
334
+ var r = (n.getParameter(n.VENDOR) || "").toString(), s = (n.getParameter(n.RENDERER) || "").toString(), o = { vendor: r, renderer: s, version: (n.getParameter(n.VERSION) || "").toString(), shadingLanguageVersion: (n.getParameter(n.SHADING_LANGUAGE_VERSION) || "").toString() };
335
+ if (!s.length || !r.length) {
336
336
  var t = n.getExtension("WEBGL_debug_renderer_info");
337
337
  if (t) {
338
- var u = (n.getParameter(t.UNMASKED_VENDOR_WEBGL) || "").toString(), h = (n.getParameter(t.UNMASKED_RENDERER_WEBGL) || "").toString();
339
- u && (o.vendorUnmasked = u), h && (o.rendererUnmasked = h);
338
+ var u = (n.getParameter(t.UNMASKED_VENDOR_WEBGL) || "").toString(), d = (n.getParameter(t.UNMASKED_RENDERER_WEBGL) || "").toString();
339
+ u && (o.vendorUnmasked = u), d && (o.rendererUnmasked = d);
340
340
  }
341
341
  }
342
342
  return o;
@@ -351,23 +351,23 @@ function Z() {
351
351
  function ee(a, e) {
352
352
  var n = {};
353
353
  return e.forEach(function(r) {
354
- var i = function(o) {
354
+ var s = function(o) {
355
355
  if (o.length === 0) return null;
356
356
  var t = {};
357
357
  o.forEach(function(c) {
358
- var s = String(c);
359
- t[s] = (t[s] || 0) + 1;
358
+ var i = String(c);
359
+ t[i] = (t[i] || 0) + 1;
360
360
  });
361
- var u = o[0], h = 1;
361
+ var u = o[0], d = 1;
362
362
  return Object.keys(t).forEach(function(c) {
363
- t[c] > h && (u = c, h = t[c]);
363
+ t[c] > d && (u = c, d = t[c]);
364
364
  }), u;
365
365
  }(a.map(function(o) {
366
366
  return r in o ? o[r] : void 0;
367
367
  }).filter(function(o) {
368
368
  return o !== void 0;
369
369
  }));
370
- i && (n[r] = i);
370
+ s && (n[r] = s);
371
371
  }), n;
372
372
  }
373
373
  function te() {
@@ -391,37 +391,37 @@ C().name != "Firefox" && v("fonts", function() {
391
391
  return new Promise(function(e, n) {
392
392
  try {
393
393
  (function(r) {
394
- var i;
395
- w(this, void 0, void 0, function() {
394
+ var s;
395
+ y(this, void 0, void 0, function() {
396
396
  var o, t, u;
397
- return y(this, function(h) {
398
- switch (h.label) {
397
+ return w(this, function(d) {
398
+ switch (d.label) {
399
399
  case 0:
400
400
  return document.body ? [3, 2] : [4, (c = 50, new Promise(function(p) {
401
- return setTimeout(p, c, s);
401
+ return setTimeout(p, c, i);
402
402
  }))];
403
403
  case 1:
404
- return h.sent(), [3, 0];
404
+ return d.sent(), [3, 0];
405
405
  case 2:
406
- if ((o = document.createElement("iframe")).setAttribute("frameBorder", "0"), (t = o.style).setProperty("position", "fixed"), t.setProperty("display", "block", "important"), t.setProperty("visibility", "visible"), t.setProperty("border", "0"), t.setProperty("opacity", "0"), o.src = "about:blank", document.body.appendChild(o), !(u = o.contentDocument || ((i = o.contentWindow) === null || i === void 0 ? void 0 : i.document))) throw new Error("Iframe document is not accessible");
406
+ if ((o = document.createElement("iframe")).setAttribute("frameBorder", "0"), (t = o.style).setProperty("position", "fixed"), t.setProperty("display", "block", "important"), t.setProperty("visibility", "visible"), t.setProperty("border", "0"), t.setProperty("opacity", "0"), o.src = "about:blank", document.body.appendChild(o), !(u = o.contentDocument || ((s = o.contentWindow) === null || s === void 0 ? void 0 : s.document))) throw new Error("Iframe document is not accessible");
407
407
  return r({ iframe: u }), setTimeout(function() {
408
408
  document.body.removeChild(o);
409
409
  }, 0), [2];
410
410
  }
411
- var c, s;
411
+ var c, i;
412
412
  });
413
413
  });
414
414
  })(function(r) {
415
- var i = r.iframe;
416
- return w(a, void 0, void 0, function() {
417
- var o, t, u, h;
418
- return y(this, function(c) {
419
- return o = i.createElement("canvas"), t = o.getContext("2d"), u = J.map(function(s) {
420
- return F(t, s);
421
- }), h = {}, X.forEach(function(s) {
422
- var p = F(t, s);
423
- u.includes(p) || (h[s] = p);
424
- }), e(h), [2];
415
+ var s = r.iframe;
416
+ return y(a, void 0, void 0, function() {
417
+ var o, t, u, d;
418
+ return w(this, function(c) {
419
+ return o = s.createElement("canvas"), t = o.getContext("2d"), u = J.map(function(i) {
420
+ return k(t, i);
421
+ }), d = {}, X.forEach(function(i) {
422
+ var p = k(t, i);
423
+ u.includes(p) || (d[i] = p);
424
+ }), e(d), [2];
425
425
  });
426
426
  });
427
427
  });
@@ -439,20 +439,20 @@ C().name != "Firefox" && v("fonts", function() {
439
439
  a({ languages: navigator.language, timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
440
440
  });
441
441
  }), v("permissions", function() {
442
- return w(this, void 0, void 0, function() {
442
+ return y(this, void 0, void 0, function() {
443
443
  var a;
444
- return y(this, function(e) {
445
- return A = (S == null ? void 0 : S.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], a = Array.from({ length: (S == null ? void 0 : S.retries) || 3 }, function() {
444
+ return w(this, function(e) {
445
+ return I = (S == null ? void 0 : S.permissions_to_check) || ["accelerometer", "accessibility", "accessibility-events", "ambient-light-sensor", "background-fetch", "background-sync", "bluetooth", "camera", "clipboard-read", "clipboard-write", "device-info", "display-capture", "gyroscope", "geolocation", "local-fonts", "magnetometer", "microphone", "midi", "nfc", "notifications", "payment-handler", "persistent-storage", "push", "speaker", "storage-access", "top-level-storage-access", "window-management", "query"], a = Array.from({ length: (S == null ? void 0 : S.retries) || 3 }, function() {
446
446
  return function() {
447
- return w(this, void 0, void 0, function() {
448
- var n, r, i, o, t;
449
- return y(this, function(u) {
447
+ return y(this, void 0, void 0, function() {
448
+ var n, r, s, o, t;
449
+ return w(this, function(u) {
450
450
  switch (u.label) {
451
451
  case 0:
452
- n = {}, r = 0, i = A, u.label = 1;
452
+ n = {}, r = 0, s = I, u.label = 1;
453
453
  case 1:
454
- if (!(r < i.length)) return [3, 6];
455
- o = i[r], u.label = 2;
454
+ if (!(r < s.length)) return [3, 6];
455
+ o = s[r], u.label = 2;
456
456
  case 2:
457
457
  return u.trys.push([2, 4, , 5]), [4, navigator.permissions.query({ name: o })];
458
458
  case 3:
@@ -468,7 +468,7 @@ C().name != "Firefox" && v("fonts", function() {
468
468
  });
469
469
  }();
470
470
  }), [2, Promise.all(a).then(function(n) {
471
- return ee(n, A);
471
+ return ee(n, I);
472
472
  })];
473
473
  });
474
474
  });
@@ -491,18 +491,18 @@ C().name != "Firefox" && v("fonts", function() {
491
491
  a({ platform: window.navigator.platform, cookieEnabled: window.navigator.cookieEnabled, productSub: navigator.productSub, product: navigator.product, useragent: navigator.userAgent, hardwareConcurrency: navigator.hardwareConcurrency, browser: { name: e.name, version: e.version }, applePayVersion: ne() });
492
492
  });
493
493
  });
494
- var f, re = C().name !== "SamsungBrowser" ? 1 : 3, d = null;
494
+ var f, re = C().name !== "SamsungBrowser" ? 1 : 3, l = null;
495
495
  v("webgl", function() {
496
- return w(this, void 0, void 0, function() {
496
+ return y(this, void 0, void 0, function() {
497
497
  var a;
498
- return y(this, function(e) {
499
- typeof document < "u" && ((f = document.createElement("canvas")).width = 200, f.height = 100, d = f.getContext("webgl"));
498
+ return w(this, function(e) {
499
+ typeof document < "u" && ((f = document.createElement("canvas")).width = 200, f.height = 100, l = f.getContext("webgl"));
500
500
  try {
501
- if (!d) throw new Error("WebGL not supported");
501
+ if (!l) throw new Error("WebGL not supported");
502
502
  return a = Array.from({ length: re }, function() {
503
503
  return function() {
504
504
  try {
505
- if (!d) throw new Error("WebGL not supported");
505
+ if (!l) throw new Error("WebGL not supported");
506
506
  var n = `
507
507
  attribute vec2 position;
508
508
  void main() {
@@ -513,31 +513,31 @@ v("webgl", function() {
513
513
  void main() {
514
514
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
515
515
  }
516
- `, i = d.createShader(d.VERTEX_SHADER), o = d.createShader(d.FRAGMENT_SHADER);
517
- if (!i || !o) throw new Error("Failed to create shaders");
518
- if (d.shaderSource(i, n), d.shaderSource(o, r), d.compileShader(i), !d.getShaderParameter(i, d.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + d.getShaderInfoLog(i));
519
- if (d.compileShader(o), !d.getShaderParameter(o, d.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + d.getShaderInfoLog(o));
520
- var t = d.createProgram();
516
+ `, s = l.createShader(l.VERTEX_SHADER), o = l.createShader(l.FRAGMENT_SHADER);
517
+ if (!s || !o) throw new Error("Failed to create shaders");
518
+ if (l.shaderSource(s, n), l.shaderSource(o, r), l.compileShader(s), !l.getShaderParameter(s, l.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + l.getShaderInfoLog(s));
519
+ if (l.compileShader(o), !l.getShaderParameter(o, l.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + l.getShaderInfoLog(o));
520
+ var t = l.createProgram();
521
521
  if (!t) throw new Error("Failed to create shader program");
522
- if (d.attachShader(t, i), d.attachShader(t, o), d.linkProgram(t), !d.getProgramParameter(t, d.LINK_STATUS)) throw new Error("Shader program linking failed: " + d.getProgramInfoLog(t));
523
- d.useProgram(t);
524
- for (var u = 137, h = new Float32Array(4 * u), c = 2 * Math.PI / u, s = 0; s < u; s++) {
525
- var p = s * c;
526
- h[4 * s] = 0, h[4 * s + 1] = 0, h[4 * s + 2] = Math.cos(p) * (f.width / 2), h[4 * s + 3] = Math.sin(p) * (f.height / 2);
522
+ if (l.attachShader(t, s), l.attachShader(t, o), l.linkProgram(t), !l.getProgramParameter(t, l.LINK_STATUS)) throw new Error("Shader program linking failed: " + l.getProgramInfoLog(t));
523
+ l.useProgram(t);
524
+ for (var u = 137, d = new Float32Array(4 * u), c = 2 * Math.PI / u, i = 0; i < u; i++) {
525
+ var p = i * c;
526
+ d[4 * i] = 0, d[4 * i + 1] = 0, d[4 * i + 2] = Math.cos(p) * (f.width / 2), d[4 * i + 3] = Math.sin(p) * (f.height / 2);
527
527
  }
528
- var q = d.createBuffer();
529
- d.bindBuffer(d.ARRAY_BUFFER, q), d.bufferData(d.ARRAY_BUFFER, h, d.STATIC_DRAW);
530
- var R = d.getAttribLocation(t, "position");
531
- d.enableVertexAttribArray(R), d.vertexAttribPointer(R, 2, d.FLOAT, !1, 0, 0), d.viewport(0, 0, f.width, f.height), d.clearColor(0, 0, 0, 1), d.clear(d.COLOR_BUFFER_BIT), d.drawArrays(d.LINES, 0, 2 * u);
528
+ var q = l.createBuffer();
529
+ l.bindBuffer(l.ARRAY_BUFFER, q), l.bufferData(l.ARRAY_BUFFER, d, l.STATIC_DRAW);
530
+ var R = l.getAttribLocation(t, "position");
531
+ l.enableVertexAttribArray(R), l.vertexAttribPointer(R, 2, l.FLOAT, !1, 0, 0), l.viewport(0, 0, f.width, f.height), l.clearColor(0, 0, 0, 1), l.clear(l.COLOR_BUFFER_BIT), l.drawArrays(l.LINES, 0, 2 * u);
532
532
  var x = new Uint8ClampedArray(f.width * f.height * 4);
533
- return d.readPixels(0, 0, f.width, f.height, d.RGBA, d.UNSIGNED_BYTE, x), new ImageData(x, f.width, f.height);
533
+ return l.readPixels(0, 0, f.width, f.height, l.RGBA, l.UNSIGNED_BYTE, x), new ImageData(x, f.width, f.height);
534
534
  } catch {
535
535
  return new ImageData(1, 1);
536
536
  } finally {
537
- d && (d.bindBuffer(d.ARRAY_BUFFER, null), d.useProgram(null), d.viewport(0, 0, d.drawingBufferWidth, d.drawingBufferHeight), d.clearColor(0, 0, 0, 0));
537
+ l && (l.bindBuffer(l.ARRAY_BUFFER, null), l.useProgram(null), l.viewport(0, 0, l.drawingBufferWidth, l.drawingBufferHeight), l.clearColor(0, 0, 0, 0));
538
538
  }
539
539
  }();
540
- }), [2, { commonImageHash: I(L(a, f.width, f.height).data.toString()).toString() }];
540
+ }), [2, { commonImageHash: _(L(a, f.width, f.height).data.toString()).toString() }];
541
541
  } catch {
542
542
  return [2, { webgl: "unsupported" }];
543
543
  }
@@ -546,13 +546,13 @@ v("webgl", function() {
546
546
  });
547
547
  });
548
548
  var b = function(a, e, n, r) {
549
- for (var i = (n - e) / r, o = 0, t = 0; t < r; t++)
550
- o += a(e + (t + 0.5) * i);
551
- return o * i;
549
+ for (var s = (n - e) / r, o = 0, t = 0; t < r; t++)
550
+ o += a(e + (t + 0.5) * s);
551
+ return o * s;
552
552
  };
553
553
  v("math", function() {
554
- return w(void 0, void 0, void 0, function() {
555
- return y(this, function(a) {
554
+ return y(void 0, void 0, void 0, function() {
555
+ return w(this, function(a) {
556
556
  return [2, { acos: Math.acos(0.5), asin: b(Math.asin, -1, 1, 97), atan: b(Math.atan, -1, 1, 97), cos: b(Math.cos, 0, Math.PI, 97), cosh: Math.cosh(9 / 7), e: Math.E, largeCos: Math.cos(1e20), largeSin: Math.sin(1e20), largeTan: Math.tan(1e20), log: Math.log(1e3), pi: Math.PI, sin: b(Math.sin, -Math.PI, Math.PI, 97), sinh: b(Math.sinh, -9 / 7, 7 / 9, 97), sqrt: Math.sqrt(2), tan: b(Math.tan, 0, 2 * Math.PI, 97), tanh: b(Math.tanh, -9 / 7, 7 / 9, 97) }];
557
557
  });
558
558
  });
@@ -566,7 +566,7 @@ let E = (a = 21) => {
566
566
  };
567
567
  class M {
568
568
  constructor(e) {
569
- l(this, "config");
569
+ h(this, "config");
570
570
  this.config = e;
571
571
  }
572
572
  async getAds(e) {
@@ -628,15 +628,15 @@ const se = 1e3;
628
628
  class ce extends M {
629
629
  constructor(n) {
630
630
  super(n);
631
- l(this, "adCallTimeout");
631
+ h(this, "adCallTimeout");
632
632
  this.addScriptTagToDocument();
633
633
  }
634
634
  async onQuerySubmitted(n) {
635
635
  this.addScriptTagToDocument();
636
636
  }
637
637
  async onQueryFetched(n, r) {
638
- var i;
639
- if ((((i = r.data.hits) == null ? void 0 : i.length) || 0) === 0) {
638
+ var s;
639
+ if ((((s = r.data.hits) == null ? void 0 : s.length) || 0) === 0) {
640
640
  this.removeScriptTagFromDocument();
641
641
  return;
642
642
  }
@@ -672,12 +672,12 @@ class ce extends M {
672
672
  const ue = 600;
673
673
  class de {
674
674
  constructor(e, n, r) {
675
- l(this, "measureRequestTimeout");
676
- l(this, "measureRequestsBatched", []);
677
- l(this, "config");
678
- l(this, "sdkInfo");
679
- l(this, "userId");
680
- l(this, "sessionId");
675
+ h(this, "measureRequestTimeout");
676
+ h(this, "measureRequestsBatched", []);
677
+ h(this, "config");
678
+ h(this, "sdkInfo");
679
+ h(this, "userId");
680
+ h(this, "sessionId");
681
681
  /**
682
682
  * Sends a measure event to the `/measure/event` endpoint for analytics purposes.
683
683
  *
@@ -685,8 +685,8 @@ class de {
685
685
  * @param {Partial<MeasureRequestProperties>} properties - Additional properties to send with the event.
686
686
  * @param {Partial<MeasureRequestUser>} user - Additional user properites to send with the event.
687
687
  */
688
- l(this, "sendMeasureEvent", async (e, n = {}, r = {}) => {
689
- const i = {
688
+ h(this, "sendMeasureEvent", async (e, n = {}, r = {}) => {
689
+ const s = {
690
690
  event_name: e,
691
691
  properties: {
692
692
  searchcraft_index_names: this.config.index,
@@ -699,7 +699,7 @@ class de {
699
699
  }
700
700
  };
701
701
  if (e === "document_clicked") {
702
- const o = JSON.stringify(i), t = `${this.baseMeasureUrl}/event`;
702
+ const o = JSON.stringify(s), t = `${this.baseMeasureUrl}/event`;
703
703
  try {
704
704
  const u = await fetch(t, {
705
705
  method: "POST",
@@ -720,7 +720,7 @@ class de {
720
720
  throw console.error("Error sending MeasureRequest:", u), u;
721
721
  }
722
722
  } else
723
- this.measureRequestsBatched.push(i), clearTimeout(this.measureRequestTimeout), this.measureRequestTimeout = setTimeout(async () => {
723
+ this.measureRequestsBatched.push(s), clearTimeout(this.measureRequestTimeout), this.measureRequestTimeout = setTimeout(async () => {
724
724
  const o = JSON.stringify({ items: this.measureRequestsBatched }), t = `${this.baseMeasureUrl}/batch`;
725
725
  try {
726
726
  const u = await fetch(t, {
@@ -767,7 +767,7 @@ class de {
767
767
  };
768
768
  }
769
769
  }
770
- const he = (a) => a.endsWith("/") ? a.slice(0, -1) : a, _ = (a) => {
770
+ const le = (a) => a.endsWith("/") ? a.slice(0, -1) : a, A = (a) => {
771
771
  let e = "";
772
772
  if (e = a.trim(), e = e.replace(/[‘’“”]/g, (r) => ({
773
773
  "‘": "'",
@@ -779,58 +779,61 @@ const he = (a) => a.endsWith("/") ? a.slice(0, -1) : a, _ = (a) => {
779
779
  "The search term contains an uneven number of quote characters."
780
780
  );
781
781
  return e;
782
- }, le = 500;
782
+ }, he = 500;
783
783
  class me {
784
784
  constructor(e, n, r) {
785
- l(this, "config");
786
- l(this, "userId");
787
- l(this, "parent");
788
- l(this, "searchCompletedEventTimeout");
785
+ h(this, "config");
786
+ h(this, "userId");
787
+ h(this, "parent");
788
+ h(this, "searchCompletedEventTimeout");
789
789
  /**
790
790
  * Make the request to get the search results.
791
791
  * @param {properties} properties - The properties for the search.
792
+ * @param sendTelemetry - Whether or not to emit measure and subscription events for this search.
792
793
  * @returns
793
794
  */
794
- l(this, "getSearchResponseItems", async (e) => {
795
- var i, o, t, u, h;
796
- let n;
797
- const r = typeof e == "string" ? e : e.searchTerm;
795
+ h(this, "getSearchResponseItems", async (e, n = !0) => {
796
+ var r, s, o, t, u;
798
797
  try {
799
- return (i = this.parent.measureClient) == null || i.sendMeasureEvent("search_requested", {
800
- search_term: r
798
+ let d, c = "";
799
+ return typeof e == "string" ? c = A(e) : (e.searchTerm = A(e.searchTerm), c = e.searchTerm), (r = this.parent.measureClient) == null || r.sendMeasureEvent("search_requested", {
800
+ search_term: c
801
801
  }), this.parent.emitEvent("query_submitted", {
802
802
  name: "query_submitted",
803
803
  data: {
804
- searchTerm: r
804
+ searchTerm: c
805
805
  }
806
- }), (o = this.parent.adClient) == null || o.onQuerySubmitted(
807
- typeof e == "string" ? { searchTerm: r, mode: "exact" } : e
808
- ), typeof e == "string" ? n = await this.handleGetSearchResponseItemsWithString(e) : n = await this.handleGetSearchResponseItemsWithObject(e), (t = this.parent.measureClient) == null || t.sendMeasureEvent("search_response_received", {
809
- search_term: r,
810
- number_of_documents: n.data.count
811
- }), clearTimeout(this.searchCompletedEventTimeout), this.searchCompletedEventTimeout = setTimeout(() => {
812
- var c;
813
- (c = this.parent.measureClient) == null || c.sendMeasureEvent("search_completed", {
814
- search_term: r,
815
- number_of_documents: n.data.count
806
+ }), (s = this.parent.adClient) == null || s.onQuerySubmitted(
807
+ typeof e == "string" ? { searchTerm: c, mode: "exact" } : e
808
+ ), typeof e == "string" ? d = await this.handleGetSearchResponseItemsWithString(c) : d = await this.handleGetSearchResponseItemsWithObject(e), n && ((o = this.parent.measureClient) == null || o.sendMeasureEvent(
809
+ "search_response_received",
810
+ {
811
+ search_term: c,
812
+ number_of_documents: d.data.count
813
+ }
814
+ ), clearTimeout(this.searchCompletedEventTimeout), this.searchCompletedEventTimeout = setTimeout(() => {
815
+ var i;
816
+ (i = this.parent.measureClient) == null || i.sendMeasureEvent("search_completed", {
817
+ search_term: c,
818
+ number_of_documents: d.data.count
816
819
  });
817
- }, le), this.parent.emitEvent("query_fetched", {
820
+ }, he), this.parent.emitEvent("query_fetched", {
818
821
  name: "query_fetched",
819
822
  data: {
820
- searchTerm: r
823
+ searchTerm: c
821
824
  }
822
- }), (((u = n.data.hits) == null ? void 0 : u.length) || 0) === 0 && this.parent.emitEvent("no_results_returned", {
825
+ }), (((t = d.data.hits) == null ? void 0 : t.length) || 0) === 0 && this.parent.emitEvent("no_results_returned", {
823
826
  name: "no_results_returned"
824
- }), (h = this.parent.adClient) == null || h.onQueryFetched(
825
- typeof e == "string" ? { searchTerm: r, mode: "exact" } : e,
826
- n
827
- ), n;
828
- } catch (c) {
829
- throw console.error("Error parsing response:", c), c;
827
+ }), (u = this.parent.adClient) == null || u.onQueryFetched(
828
+ typeof e == "string" ? { searchTerm: c, mode: "exact" } : e,
829
+ d
830
+ )), d;
831
+ } catch (d) {
832
+ throw console.error("Error parsing response:", d), d;
830
833
  }
831
834
  });
832
- l(this, "handleGetSearchResponseItemsWithString", async (e) => {
833
- var i;
835
+ h(this, "handleGetSearchResponseItemsWithString", async (e) => {
836
+ var s;
834
837
  let n;
835
838
  try {
836
839
  n = JSON.parse(e), n = {
@@ -846,7 +849,7 @@ class me {
846
849
  Authorization: this.config.readKey,
847
850
  "Content-Type": "application/json",
848
851
  "X-Sc-User-Id": this.userId,
849
- "X-Sc-Session-Id": ((i = this.parent.measureClient) == null ? void 0 : i.sessionId) || E()
852
+ "X-Sc-Session-Id": ((s = this.parent.measureClient) == null ? void 0 : s.sessionId) || E()
850
853
  },
851
854
  body: JSON.stringify(n)
852
855
  });
@@ -856,7 +859,7 @@ class me {
856
859
  );
857
860
  return await r.json();
858
861
  });
859
- l(this, "handleGetSearchResponseItemsWithObject", async (e) => {
862
+ h(this, "handleGetSearchResponseItemsWithObject", async (e) => {
860
863
  var n;
861
864
  try {
862
865
  const r = await fetch(this.baseSearchUrl, {
@@ -903,60 +906,68 @@ class me {
903
906
  */
904
907
  formatParamsForRequest(e) {
905
908
  const n = [];
906
- e.facetPathsForIndexFields && Object.keys(e.facetPathsForIndexFields).forEach((o) => {
907
- var u;
908
- const t = (u = e.facetPathsForIndexFields) == null ? void 0 : u[o];
909
- t && n.push({
909
+ let r = "should";
910
+ e.facetPathsForIndexFields && Object.keys(e.facetPathsForIndexFields).forEach((t) => {
911
+ var d;
912
+ const u = (d = e.facetPathsForIndexFields) == null ? void 0 : d[t];
913
+ u && (r = "must", n.push({
910
914
  occur: "must",
911
915
  exact: {
912
- ctx: _(t.value)
916
+ ctx: A(u.value)
913
917
  }
914
- });
915
- }), e.rangeValueForIndexFields && Object.keys(e.rangeValueForIndexFields).forEach((o) => {
916
- var u;
917
- const t = (u = e.rangeValueForIndexFields) == null ? void 0 : u[o];
918
- t && n.push({
918
+ }));
919
+ }), e.rangeValueForIndexFields && Object.keys(e.rangeValueForIndexFields).forEach((t) => {
920
+ var d;
921
+ const u = (d = e.rangeValueForIndexFields) == null ? void 0 : d[t];
922
+ u && (r = "must", n.push({
919
923
  occur: "must",
920
924
  exact: {
921
- ctx: _(t.value)
925
+ ctx: A(u.value)
922
926
  }
923
- });
927
+ }));
924
928
  });
925
- const r = _(e.searchTerm), i = e.mode === "fuzzy" ? { fuzzy: { ctx: r } } : {
929
+ const s = e.searchTerm, o = e.mode === "fuzzy" ? { fuzzy: { ctx: s } } : {
926
930
  exact: {
927
- ctx: `${r.startsWith('"') ? r : `"${r}"`}`
931
+ ctx: `${s.startsWith('"') ? s : `"${s}"`}`
928
932
  }
929
933
  };
930
934
  return n.push({
931
- occur: e.mode === "exact" ? "must" : "should",
935
+ occur: e.mode === "exact" ? "must" : r,
932
936
  // Valid, as 'occur' is a required property in SearchClientQuery
933
- ...i
937
+ ...o
934
938
  }), n;
935
939
  }
936
940
  }
937
941
  class ve {
938
942
  constructor(e, n) {
939
- l(this, "config");
940
- l(this, "measureClient");
941
- l(this, "searchClient");
942
- l(this, "adClient");
943
- l(this, "userId");
944
- l(this, "requestTimeout");
945
- l(this, "subscriptionEvents", {});
946
- l(this, "getResponseItems", (e, n, r) => {
947
- const i = async () => {
943
+ h(this, "config");
944
+ h(this, "measureClient");
945
+ h(this, "searchClient");
946
+ h(this, "adClient");
947
+ h(this, "userId");
948
+ h(this, "requestTimeout");
949
+ h(this, "subscriptionEvents", {});
950
+ h(this, "getResponseItems", (e, n, r) => {
951
+ const s = async () => {
948
952
  (async () => {
949
- var u;
950
- const o = await ((u = this == null ? void 0 : this.searchClient) == null ? void 0 : u.getSearchResponseItems(e));
953
+ var d, c;
954
+ const o = await ((d = this == null ? void 0 : this.searchClient) == null ? void 0 : d.getSearchResponseItems(e));
951
955
  if (!o)
952
956
  throw new Error("Search client was not initialized.");
953
- const t = (o.data.hits || []).filter((h) => !!h.doc).map((h) => ({
957
+ const t = (o.data.hits || []).filter((i) => !!i.doc).map((i) => ({
954
958
  id: E(),
955
- document: h.doc || { id: -1 },
956
- source_index: h.source_index,
959
+ document: i.doc || { id: -1 },
960
+ source_index: i.source_index,
957
961
  type: "SearchDocument"
958
962
  }));
959
- n(o, t);
963
+ let u;
964
+ if (typeof e == "object") {
965
+ const i = structuredClone(
966
+ e
967
+ );
968
+ i.facetPathsForIndexFields && Object.keys(i.facetPathsForIndexFields).length > 0 && i.rangeValueForIndexFields && Object.keys(i.rangeValueForIndexFields).length > 0 && (i.facetPathsForIndexFields = void 0, u = await ((c = this == null ? void 0 : this.searchClient) == null ? void 0 : c.getSearchResponseItems(i, !1)), o && console.log("Supplemental response:", u));
969
+ }
970
+ n(o, t, u);
960
971
  })(), (async () => {
961
972
  if (this.adClient && typeof e != "string") {
962
973
  const o = await this.adClient.getAds(e);
@@ -965,9 +976,9 @@ class ve {
965
976
  })();
966
977
  };
967
978
  clearTimeout(this.requestTimeout), this.config.searchDebounceDelay ? this.requestTimeout = setTimeout(
968
- i,
979
+ s,
969
980
  this.config.searchDebounceDelay
970
- ) : i();
981
+ ) : s();
971
982
  });
972
983
  if (!e.endpointURL || !e.index || !e.readKey)
973
984
  throw new Error(
@@ -976,7 +987,7 @@ class ve {
976
987
  this.config = {
977
988
  ...e,
978
989
  // Strips off the trailing '/' from an endpointURL if one is accidentally added
979
- endpointURL: he(e.endpointURL)
990
+ endpointURL: le(e.endpointURL)
980
991
  }, this.userId = "", typeof window < "u" && typeof customElements < "u" && n.sdkName === "@searchcraft/javascript-sdk" && globalThis.__scDefineCustomElements__ && globalThis.__scDefineCustomElements__(), typeof window < "u" && (this.initClients(this.config, n), this.initInputForms(), this.startObservingMutations());
981
992
  }
982
993
  initInputForms() {
@@ -994,12 +1005,12 @@ class ve {
994
1005
  */
995
1006
  startObservingMutations() {
996
1007
  new MutationObserver((n, r) => {
997
- let i = !1;
1008
+ let s = !1;
998
1009
  for (const o of n)
999
1010
  o.type === "childList" && o.addedNodes.forEach((t) => {
1000
- t.nodeType === 1 && (t.getAttribute("class") || "").toLowerCase() === "searchcraft-input-form" && (i = !0);
1011
+ t.nodeType === 1 && (t.getAttribute("class") || "").toLowerCase() === "searchcraft-input-form" && (s = !0);
1001
1012
  });
1002
- i && this.initInputForms();
1013
+ s && this.initInputForms();
1003
1014
  }).observe(document.body, { childList: !0, subtree: !0 });
1004
1015
  }
1005
1016
  initClients(e, n) {
@@ -1023,8 +1034,8 @@ class ve {
1023
1034
  }
1024
1035
  emitEvent(e, n) {
1025
1036
  var r;
1026
- (r = this.subscriptionEvents[e]) == null || r.forEach((i) => {
1027
- i(n);
1037
+ (r = this.subscriptionEvents[e]) == null || r.forEach((s) => {
1038
+ s(n);
1028
1039
  });
1029
1040
  }
1030
1041
  subscribe(e, n) {
@@ -1711,6 +1722,7 @@ const initialSearchcraftStateValues = {
1711
1722
  searchClientResponseItems: [],
1712
1723
  searchResponseTimeTaken: undefined,
1713
1724
  searchResponseFacetPrime: undefined,
1725
+ supplementalFacetPrime: undefined,
1714
1726
  searchResultsCount: 0,
1715
1727
  searchResultsPerPage: 20,
1716
1728
  searchResultsPage: 1,
@@ -1810,7 +1822,7 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1810
1822
  }, functions.setSearchClientResponseItemsFromResponse, functions.setAdClientResponseItems);
1811
1823
  },
1812
1824
  setAdClientResponseItems: (items) => functions.set({ adClientResponseItems: items }),
1813
- setSearchClientResponseItemsFromResponse: (response, items) => {
1825
+ setSearchClientResponseItemsFromResponse: (response, items, supplementalResponse) => {
1814
1826
  const { facets, count = 0, time_taken = 0 } = response.data;
1815
1827
  const state = functions.set((state) => {
1816
1828
  return {
@@ -1821,7 +1833,8 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1821
1833
  // Reset to first page when response count changes
1822
1834
  count === state.searchResultsCount ? state.searchResultsPage : 1,
1823
1835
  searchResultsCount: count,
1824
- ...(facets && { searchResponseFacetPrime: facets }),
1836
+ searchResponseFacetPrime: facets,
1837
+ supplementalFacetPrime: supplementalResponse?.data.facets,
1825
1838
  };
1826
1839
  });
1827
1840
  state.logger?.log(O.DEBUG, `Search results: ${JSON.stringify(items)}`);
@@ -1901,4 +1914,4 @@ const searchcraftStore = zustand.createStore((_set, get) => {
1901
1914
 
1902
1915
  export { searchcraftStore as s, ve as v };
1903
1916
 
1904
- //# sourceMappingURL=p-d4558d44.js.map
1917
+ //# sourceMappingURL=p-7c10ca44.js.map