@searchcraft/javascript-sdk 0.10.3 → 0.10.4

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 (41) hide show
  1. package/dist/components/index.d.ts +1 -1
  2. package/dist/components/index.js +4 -4
  3. package/dist/components/{p-53c795bd.js → p-163402fb.js} +14 -2
  4. package/dist/components/p-163402fb.js.map +1 -0
  5. package/dist/components/{p-508ee769.js → p-2d975f19.js} +2 -2
  6. package/dist/components/{p-508ee769.js.map → p-2d975f19.js.map} +1 -1
  7. package/dist/components/{p-ad569b01.js → p-35ee16e2.js} +2 -2
  8. package/dist/components/{p-ad569b01.js.map → p-35ee16e2.js.map} +1 -1
  9. package/dist/components/{p-da1fb5c0.js → p-4c610bc4.js} +2 -2
  10. package/dist/components/{p-da1fb5c0.js.map → p-4c610bc4.js.map} +1 -1
  11. package/dist/components/{p-5a4be632.js → p-6065aee1.js} +2 -2
  12. package/dist/components/{p-5a4be632.js.map → p-6065aee1.js.map} +1 -1
  13. package/dist/components/{p-d4558d44.js → p-60fd824d.js} +69 -68
  14. package/dist/components/p-60fd824d.js.map +1 -0
  15. package/dist/components/{p-fd564261.js → p-6ed5cca1.js} +4 -4
  16. package/dist/components/{p-fd564261.js.map → p-6ed5cca1.js.map} +1 -1
  17. package/dist/components/{p-6717ab82.js → p-9d2e55a7.js} +2 -2
  18. package/dist/components/{p-6717ab82.js.map → p-9d2e55a7.js.map} +1 -1
  19. package/dist/components/{p-06bac1fc.js → p-eb633481.js} +2 -2
  20. package/dist/components/{p-06bac1fc.js.map → p-eb633481.js.map} +1 -1
  21. package/dist/components/searchcraft-ad.js +1 -1
  22. package/dist/components/searchcraft-facet-list.js +1 -1
  23. package/dist/components/searchcraft-filter-panel.js +3 -3
  24. package/dist/components/searchcraft-input-form.js +1 -1
  25. package/dist/components/searchcraft-pagination.js +1 -1
  26. package/dist/components/searchcraft-popover-button.js +1 -1
  27. package/dist/components/searchcraft-popover-footer.js +1 -1
  28. package/dist/components/searchcraft-popover-form.js +6 -6
  29. package/dist/components/searchcraft-popover-list-item.js +1 -1
  30. package/dist/components/searchcraft-popover-list-view.js +1 -1
  31. package/dist/components/searchcraft-results-info.js +1 -1
  32. package/dist/components/searchcraft-search-result.js +1 -1
  33. package/dist/components/searchcraft-search-results-per-page.js +1 -1
  34. package/dist/components/searchcraft-search-results.js +3 -3
  35. package/dist/components/searchcraft-toggle-button.js +1 -1
  36. package/dist/hydrate/index.js +63 -51
  37. package/dist/hydrate/index.mjs +63 -51
  38. package/dist/types/store/SearchcraftStore.types.d.ts +1 -1
  39. package/package.json +3 -3
  40. package/dist/components/p-53c795bd.js.map +0 -1
  41. package/dist/components/p-d4558d44.js.map +0 -1
@@ -1,10 +1,10 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-5365011f.js';
2
- import { s as searchcraftStore } from './p-d4558d44.js';
2
+ import { s as searchcraftStore } from './p-60fd824d.js';
3
3
  import { g as getMillis } from './p-4d37616e.js';
4
4
  import './p-a64b4cba.js';
5
- import { d as defineCustomElement$4 } from './p-53c795bd.js';
5
+ import { d as defineCustomElement$4 } from './p-163402fb.js';
6
6
  import { d as defineCustomElement$3 } from './p-7c650118.js';
7
- import { d as defineCustomElement$2 } from './p-da1fb5c0.js';
7
+ import { d as defineCustomElement$2 } from './p-4c610bc4.js';
8
8
 
9
9
  const SearchcraftFilterPanel$1 = /*@__PURE__*/ proxyCustomElement(class SearchcraftFilterPanel extends H {
10
10
  constructor() {
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftInputForm$1, d as defineCustomElement$1 } from './p-5a4be632.js';
1
+ import { S as SearchcraftInputForm$1, d as defineCustomElement$1 } from './p-6065aee1.js';
2
2
 
3
3
  const SearchcraftInputForm = SearchcraftInputForm$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-5365011f.js';
2
- import { s as searchcraftStore } from './p-d4558d44.js';
2
+ import { s as searchcraftStore } from './p-60fd824d.js';
3
3
  import { c as classNames } from './p-5cdc6210.js';
4
4
  import { d as defineCustomElement$2 } from './p-acf23bab.js';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-5365011f.js';
2
- import { s as searchcraftStore } from './p-d4558d44.js';
2
+ import { s as searchcraftStore } from './p-60fd824d.js';
3
3
  import { h as html } from './p-810a7850.js';
4
4
 
5
5
  const SearchcraftPopoverButton$1 = /*@__PURE__*/ proxyCustomElement(class SearchcraftPopoverButton extends H {
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftPopoverFooter$1, d as defineCustomElement$1 } from './p-06bac1fc.js';
1
+ import { S as SearchcraftPopoverFooter$1, d as defineCustomElement$1 } from './p-eb633481.js';
2
2
 
3
3
  const SearchcraftPopoverFooter = SearchcraftPopoverFooter$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,14 +1,14 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-5365011f.js';
2
2
  import { c as classNames } from './p-5cdc6210.js';
3
- import { s as searchcraftStore } from './p-d4558d44.js';
4
- import { d as defineCustomElement$9 } from './p-ad569b01.js';
3
+ import { s as searchcraftStore } from './p-60fd824d.js';
4
+ import { d as defineCustomElement$9 } from './p-35ee16e2.js';
5
5
  import { d as defineCustomElement$8 } from './p-acf23bab.js';
6
6
  import { d as defineCustomElement$7 } from './p-f2585cdf.js';
7
- import { d as defineCustomElement$6 } from './p-5a4be632.js';
7
+ import { d as defineCustomElement$6 } from './p-6065aee1.js';
8
8
  import { d as defineCustomElement$5 } from './p-1adf78b9.js';
9
- import { d as defineCustomElement$4 } from './p-06bac1fc.js';
10
- import { d as defineCustomElement$3 } from './p-6717ab82.js';
11
- import { d as defineCustomElement$2 } from './p-fd564261.js';
9
+ import { d as defineCustomElement$4 } from './p-eb633481.js';
10
+ import { d as defineCustomElement$3 } from './p-9d2e55a7.js';
11
+ import { d as defineCustomElement$2 } from './p-6ed5cca1.js';
12
12
 
13
13
  const SearchcraftPopoverForm$1 = /*@__PURE__*/ proxyCustomElement(class SearchcraftPopoverForm extends H {
14
14
  constructor() {
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftPopoverListItem$1, d as defineCustomElement$1 } from './p-6717ab82.js';
1
+ import { S as SearchcraftPopoverListItem$1, d as defineCustomElement$1 } from './p-9d2e55a7.js';
2
2
 
3
3
  const SearchcraftPopoverListItem = SearchcraftPopoverListItem$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftPopoverListView$1, d as defineCustomElement$1 } from './p-fd564261.js';
1
+ import { S as SearchcraftPopoverListView$1, d as defineCustomElement$1 } from './p-6ed5cca1.js';
2
2
 
3
3
  const SearchcraftPopoverListView = SearchcraftPopoverListView$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-5365011f.js';
2
- import { s as searchcraftStore } from './p-d4558d44.js';
2
+ import { s as searchcraftStore } from './p-60fd824d.js';
3
3
  import { f as formatNumberWithCommas } from './p-4d37616e.js';
4
4
  import { h as html } from './p-810a7850.js';
5
5
 
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftSearchResult$1, d as defineCustomElement$1 } from './p-508ee769.js';
1
+ import { S as SearchcraftSearchResult$1, d as defineCustomElement$1 } from './p-2d975f19.js';
2
2
 
3
3
  const SearchcraftSearchResult = SearchcraftSearchResult$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-5365011f.js';
2
- import { s as searchcraftStore } from './p-d4558d44.js';
2
+ import { s as searchcraftStore } from './p-60fd824d.js';
3
3
  import { d as defineCustomElement$2 } from './p-73db9122.js';
4
4
 
5
5
  const SearchcraftSearchResultsPerPage$1 = /*@__PURE__*/ proxyCustomElement(class SearchcraftSearchResultsPerPage extends H {
@@ -1,8 +1,8 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-5365011f.js';
2
- import { n as nanoid, d as defineCustomElement$4 } from './p-ad569b01.js';
3
- import { s as searchcraftStore } from './p-d4558d44.js';
2
+ import { n as nanoid, d as defineCustomElement$4 } from './p-35ee16e2.js';
3
+ import { s as searchcraftStore } from './p-60fd824d.js';
4
4
  import { d as defineCustomElement$3 } from './p-f2585cdf.js';
5
- import { d as defineCustomElement$2 } from './p-508ee769.js';
5
+ import { d as defineCustomElement$2 } from './p-2d975f19.js';
6
6
 
7
7
  const SearchcraftSearchResults$1 = /*@__PURE__*/ proxyCustomElement(class SearchcraftSearchResults extends H {
8
8
  constructor() {
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftToggleButton$1, d as defineCustomElement$1 } from './p-da1fb5c0.js';
1
+ import { S as SearchcraftToggleButton$1, d as defineCustomElement$1 } from './p-4c610bc4.js';
2
2
 
3
3
  const SearchcraftToggleButton = SearchcraftToggleButton$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -339,7 +339,7 @@ var uniqueTime = (key, measureText) => {
339
339
  };
340
340
  }
341
341
  };
342
- var h = (nodeName, vnodeData, ...children) => {
342
+ var h$1 = (nodeName, vnodeData, ...children) => {
343
343
  let child = null;
344
344
  let key = null;
345
345
  let slotName = null;
@@ -441,7 +441,7 @@ var convertToPrivate = (node) => {
441
441
  if (node.vname) {
442
442
  vnodeData.name = node.vname;
443
443
  }
444
- return h(node.vtag, vnodeData, ...node.vchildren || []);
444
+ return h$1(node.vtag, vnodeData, ...node.vchildren || []);
445
445
  }
446
446
  const vnode = newVNode(node.vtag, node.vtext);
447
447
  vnode.$attrs$ = node.vattrs;
@@ -1279,7 +1279,7 @@ var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
1279
1279
  var _c, _d;
1280
1280
  const hostElm = hostRef.$hostElement$;
1281
1281
  const oldVNode = hostRef.$vnode$ || newVNode(null, null);
1282
- const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
1282
+ const rootVnode = isHost(renderFnResults) ? renderFnResults : h$1(null, null, renderFnResults);
1283
1283
  hostTagName = hostElm.tagName;
1284
1284
  if (isInitialLoad && rootVnode.$attrs$) {
1285
1285
  for (const key of Object.keys(rootVnode.$attrs$)) {
@@ -1951,14 +1951,14 @@ var hAsync = (nodeName, vnodeData, ...children) => {
1951
1951
  const flatChildren = children.flat(Infinity);
1952
1952
  if (flatChildren.some((child) => child instanceof Promise)) {
1953
1953
  return Promise.all(flatChildren).then((resolvedChildren) => {
1954
- return h(nodeName, vnodeData, ...resolvedChildren);
1954
+ return h$1(nodeName, vnodeData, ...resolvedChildren);
1955
1955
  }).catch((err2) => {
1956
- return h(nodeName, vnodeData);
1956
+ return h$1(nodeName, vnodeData);
1957
1957
  });
1958
1958
  }
1959
- return h(nodeName, vnodeData, ...flatChildren);
1959
+ return h$1(nodeName, vnodeData, ...flatChildren);
1960
1960
  }
1961
- return h(nodeName, vnodeData);
1961
+ return h$1(nodeName, vnodeData);
1962
1962
  };
1963
1963
  function proxyHostElement(elm, cstr) {
1964
1964
  const cmpMeta = cstr.cmpMeta;
@@ -3226,25 +3226,25 @@ function w(a, e, n, r) {
3226
3226
  return new (n || (n = Promise))(function(i, o) {
3227
3227
  function t(c) {
3228
3228
  try {
3229
- h(r.next(c));
3229
+ d(r.next(c));
3230
3230
  } catch (s) {
3231
3231
  o(s);
3232
3232
  }
3233
3233
  }
3234
3234
  function u(c) {
3235
3235
  try {
3236
- h(r.throw(c));
3236
+ d(r.throw(c));
3237
3237
  } catch (s) {
3238
3238
  o(s);
3239
3239
  }
3240
3240
  }
3241
- function h(c) {
3241
+ function d(c) {
3242
3242
  var s;
3243
3243
  c.done ? i(c.value) : (s = c.value, s instanceof n ? s : new n(function(p) {
3244
3244
  p(s);
3245
3245
  })).then(t, u);
3246
3246
  }
3247
- h((r = r.apply(a, [])).next());
3247
+ d((r = r.apply(a, [])).next());
3248
3248
  });
3249
3249
  }
3250
3250
  function y(a, e) {
@@ -3255,7 +3255,7 @@ function y(a, e) {
3255
3255
  return o = { next: u(0), throw: u(1), return: u(2) }, typeof Symbol == "function" && (o[Symbol.iterator] = function() {
3256
3256
  return this;
3257
3257
  }), o;
3258
- function u(h) {
3258
+ function u(d) {
3259
3259
  return function(c) {
3260
3260
  return function(s) {
3261
3261
  if (n) throw new TypeError("Generator is already executing.");
@@ -3302,7 +3302,7 @@ function y(a, e) {
3302
3302
  }
3303
3303
  if (5 & s[0]) throw s[1];
3304
3304
  return { value: s[0] ? s[1] : void 0, done: !0 };
3305
- }([h, c]);
3305
+ }([d, c]);
3306
3306
  };
3307
3307
  }
3308
3308
  }
@@ -3321,13 +3321,13 @@ function I(a, e) {
3321
3321
  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");
3322
3322
  var r = new Uint32Array([e, e, e, e]);
3323
3323
  (((function(o, t) {
3324
- for (var u = o.byteLength / 16 | 0, h = new Uint32Array(o, 0, 4 * u), c = 0; c < u; c++) {
3325
- var s = h.subarray(4 * c, 4 * (c + 1));
3324
+ for (var u = o.byteLength / 16 | 0, d = new Uint32Array(o, 0, 4 * u), c = 0; c < u; c++) {
3325
+ var s = d.subarray(4 * c, 4 * (c + 1));
3326
3326
  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;
3327
3327
  }
3328
3328
  })))(a, r), function(o, t) {
3329
- var u = o.byteLength / 16 | 0, h = o.byteLength % 16, c = new Uint32Array(4), s = new Uint8Array(o, 16 * u, h);
3330
- switch (h) {
3329
+ var u = o.byteLength / 16 | 0, d = o.byteLength % 16, c = new Uint32Array(4), s = new Uint8Array(o, 16 * u, d);
3330
+ switch (d) {
3331
3331
  case 15:
3332
3332
  c[3] = c[3] ^ s[14] << 16;
3333
3333
  case 14:
@@ -3403,11 +3403,11 @@ v("audio", function() {
3403
3403
  var r = new (window.OfflineAudioContext || window.webkitOfflineAudioContext)(1, 5e3, 44100), i = r.createBufferSource(), o = r.createOscillator();
3404
3404
  o.frequency.value = 1e3;
3405
3405
  var t, u = r.createDynamicsCompressor();
3406
- 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) {
3407
- t = h.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: o.type, maxChannels: r.destination.maxChannelCount, channelCountMode: i.channelCountMode });
3406
+ 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) {
3407
+ t = d.renderedBuffer.getChannelData(0), e({ sampleHash: H(t), oscillator: o.type, maxChannels: r.destination.maxChannelCount, channelCountMode: i.channelCountMode });
3408
3408
  }, r.startRendering();
3409
- } catch (h) {
3410
- console.error("Error creating audio fingerprint:", h), n(h);
3409
+ } catch (d) {
3410
+ console.error("Error creating audio fingerprint:", d), n(d);
3411
3411
  }
3412
3412
  })];
3413
3413
  });
@@ -3444,8 +3444,8 @@ function Y() {
3444
3444
  if (!i.length || !r.length) {
3445
3445
  var t = n.getExtension("WEBGL_debug_renderer_info");
3446
3446
  if (t) {
3447
- var u = (n.getParameter(t.UNMASKED_VENDOR_WEBGL) || "").toString(), h = (n.getParameter(t.UNMASKED_RENDERER_WEBGL) || "").toString();
3448
- u && (o.vendorUnmasked = u), h && (o.rendererUnmasked = h);
3447
+ var u = (n.getParameter(t.UNMASKED_VENDOR_WEBGL) || "").toString(), d = (n.getParameter(t.UNMASKED_RENDERER_WEBGL) || "").toString();
3448
+ u && (o.vendorUnmasked = u), d && (o.rendererUnmasked = d);
3449
3449
  }
3450
3450
  }
3451
3451
  return o;
@@ -3467,9 +3467,9 @@ function ee(a, e) {
3467
3467
  var s = String(c);
3468
3468
  t[s] = (t[s] || 0) + 1;
3469
3469
  });
3470
- var u = o[0], h = 1;
3470
+ var u = o[0], d = 1;
3471
3471
  return Object.keys(t).forEach(function(c) {
3472
- t[c] > h && (u = c, h = t[c]);
3472
+ t[c] > d && (u = c, d = t[c]);
3473
3473
  }), u;
3474
3474
  }(a.map(function(o) {
3475
3475
  return r in o ? o[r] : void 0;
@@ -3503,14 +3503,14 @@ C().name != "Firefox" && v("fonts", function() {
3503
3503
  var i;
3504
3504
  w(this, void 0, void 0, function() {
3505
3505
  var o, t, u;
3506
- return y(this, function(h) {
3507
- switch (h.label) {
3506
+ return y(this, function(d) {
3507
+ switch (d.label) {
3508
3508
  case 0:
3509
3509
  return document.body ? [3, 2] : [4, (c = 50, new Promise(function(p) {
3510
3510
  return setTimeout(p, c, s);
3511
3511
  }))];
3512
3512
  case 1:
3513
- return h.sent(), [3, 0];
3513
+ return d.sent(), [3, 0];
3514
3514
  case 2:
3515
3515
  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");
3516
3516
  return r({ iframe: u }), setTimeout(function() {
@@ -3523,14 +3523,14 @@ C().name != "Firefox" && v("fonts", function() {
3523
3523
  })(function(r) {
3524
3524
  var i = r.iframe;
3525
3525
  return w(a, void 0, void 0, function() {
3526
- var o, t, u, h;
3526
+ var o, t, u, d;
3527
3527
  return y(this, function(c) {
3528
3528
  return o = i.createElement("canvas"), t = o.getContext("2d"), u = J.map(function(s) {
3529
3529
  return F(t, s);
3530
- }), h = {}, X.forEach(function(s) {
3530
+ }), d = {}, X.forEach(function(s) {
3531
3531
  var p = F(t, s);
3532
- u.includes(p) || (h[s] = p);
3533
- }), e(h), [2];
3532
+ u.includes(p) || (d[s] = p);
3533
+ }), e(d), [2];
3534
3534
  });
3535
3535
  });
3536
3536
  });
@@ -3600,18 +3600,18 @@ C().name != "Firefox" && v("fonts", function() {
3600
3600
  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() });
3601
3601
  });
3602
3602
  });
3603
- var f, re = C().name !== "SamsungBrowser" ? 1 : 3, d = null;
3603
+ var f, re = C().name !== "SamsungBrowser" ? 1 : 3, h = null;
3604
3604
  v("webgl", function() {
3605
3605
  return w(this, void 0, void 0, function() {
3606
3606
  var a;
3607
3607
  return y(this, function(e) {
3608
- typeof document < "u" && ((f = document.createElement("canvas")).width = 200, f.height = 100, d = f.getContext("webgl"));
3608
+ typeof document < "u" && ((f = document.createElement("canvas")).width = 200, f.height = 100, h = f.getContext("webgl"));
3609
3609
  try {
3610
- if (!d) throw new Error("WebGL not supported");
3610
+ if (!h) throw new Error("WebGL not supported");
3611
3611
  return a = Array.from({ length: re }, function() {
3612
3612
  return function() {
3613
3613
  try {
3614
- if (!d) throw new Error("WebGL not supported");
3614
+ if (!h) throw new Error("WebGL not supported");
3615
3615
  var n = `
3616
3616
  attribute vec2 position;
3617
3617
  void main() {
@@ -3622,28 +3622,28 @@ v("webgl", function() {
3622
3622
  void main() {
3623
3623
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
3624
3624
  }
3625
- `, i = d.createShader(d.VERTEX_SHADER), o = d.createShader(d.FRAGMENT_SHADER);
3625
+ `, i = h.createShader(h.VERTEX_SHADER), o = h.createShader(h.FRAGMENT_SHADER);
3626
3626
  if (!i || !o) throw new Error("Failed to create shaders");
3627
- 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));
3628
- if (d.compileShader(o), !d.getShaderParameter(o, d.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + d.getShaderInfoLog(o));
3629
- var t = d.createProgram();
3627
+ if (h.shaderSource(i, n), h.shaderSource(o, r), h.compileShader(i), !h.getShaderParameter(i, h.COMPILE_STATUS)) throw new Error("Vertex shader compilation failed: " + h.getShaderInfoLog(i));
3628
+ if (h.compileShader(o), !h.getShaderParameter(o, h.COMPILE_STATUS)) throw new Error("Fragment shader compilation failed: " + h.getShaderInfoLog(o));
3629
+ var t = h.createProgram();
3630
3630
  if (!t) throw new Error("Failed to create shader program");
3631
- 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));
3632
- d.useProgram(t);
3633
- for (var u = 137, h = new Float32Array(4 * u), c = 2 * Math.PI / u, s = 0; s < u; s++) {
3631
+ if (h.attachShader(t, i), h.attachShader(t, o), h.linkProgram(t), !h.getProgramParameter(t, h.LINK_STATUS)) throw new Error("Shader program linking failed: " + h.getProgramInfoLog(t));
3632
+ h.useProgram(t);
3633
+ for (var u = 137, d = new Float32Array(4 * u), c = 2 * Math.PI / u, s = 0; s < u; s++) {
3634
3634
  var p = s * c;
3635
- 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);
3635
+ d[4 * s] = 0, d[4 * s + 1] = 0, d[4 * s + 2] = Math.cos(p) * (f.width / 2), d[4 * s + 3] = Math.sin(p) * (f.height / 2);
3636
3636
  }
3637
- var q = d.createBuffer();
3638
- d.bindBuffer(d.ARRAY_BUFFER, q), d.bufferData(d.ARRAY_BUFFER, h, d.STATIC_DRAW);
3639
- var R = d.getAttribLocation(t, "position");
3640
- 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);
3637
+ var q = h.createBuffer();
3638
+ h.bindBuffer(h.ARRAY_BUFFER, q), h.bufferData(h.ARRAY_BUFFER, d, h.STATIC_DRAW);
3639
+ var R = h.getAttribLocation(t, "position");
3640
+ h.enableVertexAttribArray(R), h.vertexAttribPointer(R, 2, h.FLOAT, !1, 0, 0), h.viewport(0, 0, f.width, f.height), h.clearColor(0, 0, 0, 1), h.clear(h.COLOR_BUFFER_BIT), h.drawArrays(h.LINES, 0, 2 * u);
3641
3641
  var x = new Uint8ClampedArray(f.width * f.height * 4);
3642
- return d.readPixels(0, 0, f.width, f.height, d.RGBA, d.UNSIGNED_BYTE, x), new ImageData(x, f.width, f.height);
3642
+ return h.readPixels(0, 0, f.width, f.height, h.RGBA, h.UNSIGNED_BYTE, x), new ImageData(x, f.width, f.height);
3643
3643
  } catch {
3644
3644
  return new ImageData(1, 1);
3645
3645
  } finally {
3646
- d && (d.bindBuffer(d.ARRAY_BUFFER, null), d.useProgram(null), d.viewport(0, 0, d.drawingBufferWidth, d.drawingBufferHeight), d.clearColor(0, 0, 0, 0));
3646
+ h && (h.bindBuffer(h.ARRAY_BUFFER, null), h.useProgram(null), h.viewport(0, 0, h.drawingBufferWidth, h.drawingBufferHeight), h.clearColor(0, 0, 0, 0));
3647
3647
  }
3648
3648
  }();
3649
3649
  }), [2, { commonImageHash: I(L(a, f.width, f.height).data.toString()).toString() }];
@@ -3794,7 +3794,7 @@ const searchcraftStore = zustand.createStore((_set, get) => {
3794
3794
  // Reset to first page when response count changes
3795
3795
  count === state.searchResultsCount ? state.searchResultsPage : 1,
3796
3796
  searchResultsCount: count,
3797
- ...(facets && { searchResponseFacetPrime: facets }),
3797
+ searchResponseFacetPrime: facets,
3798
3798
  };
3799
3799
  });
3800
3800
  state.logger?.log(O.DEBUG, `Search results: ${JSON.stringify(items)}`);
@@ -5514,6 +5514,10 @@ class SearchcraftFacetList {
5514
5514
  if (!this.fieldName) {
5515
5515
  return;
5516
5516
  }
5517
+ /** When the search term is empty, clear all facets from facetRoot */
5518
+ if (!state.searchTerm) {
5519
+ this.facetRoot = undefined;
5520
+ }
5517
5521
  /** Things to do when the state's search term has changed, but before the response received */
5518
5522
  if (state.searchTerm !== this.lastSearchTerm ||
5519
5523
  state.searchMode !== this.lastSearchMode) {
@@ -5535,6 +5539,14 @@ class SearchcraftFacetList {
5535
5539
  this.facetRoot = mergeFacetRoots(this.fieldName, this.baseFacetRoot, incomingFacetRoot);
5536
5540
  }
5537
5541
  }
5542
+ else if (!facetPrime && Object.keys(this.selectedPaths).length === 0) {
5543
+ /**
5544
+ * If there's not facetPrime returned from the search response,
5545
+ * and no facets are currently selected.
5546
+ * Clear all the displayed facets
5547
+ */
5548
+ this.facetRoot = undefined;
5549
+ }
5538
5550
  this.lastSearchTerm = state.searchTerm;
5539
5551
  this.lastSearchMode = state.searchMode;
5540
5552
  this.lastSortType = state.sortType;