@depict-ai/ui 2.0.5 → 2.0.6

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.
@@ -67,7 +67,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
67
67
  $parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
68
68
  $parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
69
69
  /*! Depict.ai search and product listing SDK */
70
- const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.5";
70
+ const $aa1938dec50d6c12$export$83d89fbfd8236492 = "2.0.6";
71
71
 
72
72
  /** @jsxImportSource solid-js */
73
73
 
@@ -1337,9 +1337,9 @@ function $d9239dad9a9d899b$export$430444115f70a734(_ref) {
1337
1337
  }
1338
1338
  })));
1339
1339
  }
1340
- const $0257c760a99bfacb$var$_tmpl$ = ["<div", ' class="range"><div class="input-group"><div class="field"><input type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--#-->", '<!--/--><div class="value-text"><span class="min"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", '<!--/--></span><span class="max"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div>"],
1340
+ const $0257c760a99bfacb$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--#-->", '<!--/--><div class="value-text"><span class="min"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", '<!--/--></span><span class="max"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div>"],
1341
1341
  $0257c760a99bfacb$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
1342
- $0257c760a99bfacb$var$_tmpl$3 = ["<div", ' class="range-group"><input type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
1342
+ $0257c760a99bfacb$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
1343
1343
  function $0257c760a99bfacb$export$e0d834a0ad870cda(_ref) {
1344
1344
  let {
1345
1345
  filter_: filter_,
@@ -1418,11 +1418,13 @@ function $0257c760a99bfacb$var$RangeSelector(_ref3) {
1418
1418
  const [get_current_range] = current_range_;
1419
1419
  const pre_price = $3hooq$solidjs.createMemo(() => price_formatting_().pre_);
1420
1420
  const post_price = $3hooq$solidjs.createMemo(() => price_formatting_().post_);
1421
- return $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[0], true), false), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[1], true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($0257c760a99bfacb$var$ExponentialSlider, {
1421
+ const should_be_disabled_ = $3hooq$solidjs.createMemo(() => Math.abs(min_() - max_()) < 2);
1422
+ return $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$, $3hooq$solidjsweb.ssrHydrationKey(), "range ".concat(min_() === max_() ? "disabled" : ""), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[0], true), false), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape(get_current_range()[1], true), false), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent($0257c760a99bfacb$var$ExponentialSlider, {
1422
1423
  max_: max_,
1423
1424
  min_: min_,
1424
1425
  current_range_: current_range_,
1425
- i18n_: i18n_
1426
+ i18n_: i18n_,
1427
+ should_be_disabled_: should_be_disabled_
1426
1428
  })), $3hooq$solidjsweb.escape(pre_price()), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $f38f2e64ebe2da86$export$a71e92cfbb498adc), {
1427
1429
  get price_() {
1428
1430
  return min_();
@@ -1444,7 +1446,8 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
1444
1446
  current_range_: current_range_,
1445
1447
  min_: min_,
1446
1448
  i18n_: i18n_,
1447
- max_: max_
1449
+ max_: max_,
1450
+ should_be_disabled_: should_be_disabled_
1448
1451
  } = _ref4;
1449
1452
  // inspired by https://observablehq.com/@mbostock/nonlinear-slider
1450
1453
  const transform_linear_to_nonlinear = _ref5 => {
@@ -1452,8 +1455,7 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
1452
1455
  return [Math.sqrt(smaller), Math.sqrt(larger)];
1453
1456
  };
1454
1457
  const [read_current_range, write_current_range] = current_range_;
1455
- const modified_range = $3hooq$solidjs.createSignal(transform_linear_to_nonlinear($3hooq$solidjs.untrack(read_current_range)));
1456
- const [read_modified_range, write_modified_range] = modified_range;
1458
+ const modified_range_accessor = $3hooq$solidjs.createMemo(() => transform_linear_to_nonlinear(read_current_range()));
1457
1459
  const modified_max = $3hooq$solidjs.createMemo(() => Math.sqrt(max_()));
1458
1460
  const modified_min = $3hooq$solidjs.createMemo(() => Math.sqrt(min_()));
1459
1461
  const offset_value_calculator_ = (value, how_many) => {
@@ -1461,36 +1463,39 @@ function $0257c760a99bfacb$var$ExponentialSlider(_ref4) {
1461
1463
  const changed = number_in_linear + how_many;
1462
1464
  return Math.sqrt(changed);
1463
1465
  };
1464
- $3hooq$solidjs.createComputed($3hooq$solidjs.on(read_current_range, new_range_from_above => {
1465
- // to prevent from infinite looping, don't write if it's around the same
1466
- const new_modified_range = transform_linear_to_nonlinear(new_range_from_above);
1467
- const current_modified_range = read_modified_range();
1468
- if (!current_modified_range.every((item, index) => Math.round(item) === Math.round(new_modified_range[index]))) write_modified_range(new_modified_range);
1469
- }, {
1470
- defer: true
1471
- }));
1472
- $3hooq$solidjs.createComputed($3hooq$solidjs.on(read_modified_range, _ref6 => {
1473
- let [smaller, larger] = _ref6;
1474
- return write_current_range([Math.round(smaller * smaller), Math.round(larger * larger)]);
1475
- }, {
1476
- defer: true
1477
- }));
1466
+ const convert_back = (smaller, larger) => [Math.round(smaller * smaller), Math.round(larger * larger)];
1467
+ const modified_range_setter = new_range_or_function => {
1468
+ const old_range = $3hooq$solidjs.untrack(modified_range_accessor);
1469
+ const new_range = typeof new_range_or_function === "function" ? new_range_or_function(old_range) : new_range_or_function;
1470
+ const [smaller, larger] = new_range;
1471
+ const [old_smaller, old_larger] = old_range;
1472
+ const new_range_converted = convert_back(smaller, larger);
1473
+ const old_range_converted = convert_back(old_smaller, old_larger);
1474
+ if (new_range_converted[0] === old_range_converted[0] && new_range_converted[1] === old_range_converted[1])
1475
+ // If the new value gets identical rounding errors to the old value when being converted back, don't write it to the signal since it would cause an infinite loop
1476
+ return new_range;
1477
+ write_current_range(new_range_converted);
1478
+ return new_range;
1479
+ };
1478
1480
  return $0257c760a99bfacb$var$LinearSlider({
1479
- current_range_: modified_range,
1481
+ current_range_: [modified_range_accessor, modified_range_setter],
1482
+ // "Lie" to the actual slider so we don't have to implement exponential handling in there
1480
1483
  min_: modified_min,
1481
1484
  max_: modified_max,
1482
1485
  offset_value_calculator_: offset_value_calculator_,
1483
- i18n_: i18n_
1486
+ i18n_: i18n_,
1487
+ should_be_disabled_: should_be_disabled_
1484
1488
  });
1485
1489
  }
1486
- function $0257c760a99bfacb$var$LinearSlider(_ref7) {
1490
+ function $0257c760a99bfacb$var$LinearSlider(_ref6) {
1487
1491
  let {
1488
1492
  max_: max_,
1489
1493
  min_: min_,
1490
1494
  current_range_: current_range_,
1491
1495
  offset_value_calculator_: offset_value_calculator_,
1492
- i18n_: i18n_
1493
- } = _ref7;
1496
+ i18n_: i18n_,
1497
+ should_be_disabled_: should_be_disabled_
1498
+ } = _ref6;
1494
1499
  let range_input_1;
1495
1500
  let range_input_2;
1496
1501
  let clickable_slider;
@@ -1499,6 +1504,7 @@ function $0257c760a99bfacb$var$LinearSlider(_ref7) {
1499
1504
  const min = min_();
1500
1505
  const span = max_() - min;
1501
1506
  const [start, end] = get_current_range();
1507
+ if (should_be_disabled_()) return "left:50%;right:50%";
1502
1508
  return "left:".concat((start - min) / span * 100, "%;right:").concat(100 - (end - min) / span * 100, "%");
1503
1509
  });
1504
1510
  const set_value = (el, index) => {
@@ -1512,13 +1518,13 @@ function $0257c760a99bfacb$var$LinearSlider(_ref7) {
1512
1518
  el.value = get_current_range()[index];
1513
1519
  });
1514
1520
  };
1515
- return [$3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(progress_styling())), $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
1521
+ return [$3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$2, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrStyle(progress_styling())), $3hooq$solidjsweb.ssr($0257c760a99bfacb$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey(), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false) + $3hooq$solidjsweb.ssrAttribute("value", $3hooq$solidjsweb.escape($3hooq$solidjs.createMemo(() => {
1516
1522
  min_();
1517
1523
  max_();
1518
1524
  return get_current_range()[0];
1519
1525
  }, undefined, {
1520
1526
  equals: false
1521
- })(), true), false), $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false))];
1527
+ })(), true), false), $3hooq$solidjsweb.ssrAttribute("disabled", should_be_disabled_(), true) + $3hooq$solidjsweb.ssrAttribute("aria-label", $3hooq$solidjsweb.escape(i18n_.range_filter_high_point_aria_label_(), true), false), $3hooq$solidjsweb.ssrAttribute("min", $3hooq$solidjsweb.escape(min_(), true), false) + $3hooq$solidjsweb.ssrAttribute("max", $3hooq$solidjsweb.escape(max_(), true), false))];
1522
1528
  }
1523
1529
  function $0257c760a99bfacb$var$set_range_with_sanitation(min_, max_, current_range_signal, index, target_el) {
1524
1530
  let get_offset_value = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : (value, how_many) => value + how_many;
@@ -1787,44 +1793,47 @@ function $9c1d49181fb3002a$var$render_stuff(data, existing_filter, i18n_) {
1787
1793
  return has_expandable();
1788
1794
  },
1789
1795
  get children() {
1790
- return $3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
1791
- get details_() {
1792
- return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey());
1793
- },
1794
- get summary_() {
1795
- var _value10, _value11;
1796
- return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), "count ".concat(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_) === 0 ? "count-0" : ""), $3hooq$solidjsweb.escape((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
1797
- i18n_: i18n_,
1798
- get expanded_() {
1799
- return $3hooq$solidjs.createMemo(() => {
1800
- var _value$is_expanded_$u, _value12, _value12$is_expanded_, _value12$is_expanded_2;
1801
- return (_value$is_expanded_$u = (_value12 = value()) === null || _value12 === void 0 ? void 0 : (_value12$is_expanded_ = _value12.is_expanded_) === null || _value12$is_expanded_ === void 0 ? void 0 : (_value12$is_expanded_2 = _value12$is_expanded_.ui_should_show_expanded_) === null || _value12$is_expanded_2 === void 0 ? void 0 : _value12$is_expanded_2.call(_value12$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
1802
- });
1796
+ return (() => {
1797
+ const is_open = $3hooq$solidjs.createMemo(() => {
1798
+ const v = value();
1799
+ if (!v)
1800
+ // only to prevent cleanup errors
1801
+ return $3hooq$solidjs.createSignal(false);
1802
+ const {
1803
+ is_expanded_: {
1804
+ ui_should_show_expanded_: ui_should_show_expanded_,
1805
+ set_user_expanded_: set_user_expanded_
1803
1806
  }
1804
- })));
1805
- },
1806
- get is_open_() {
1807
- return $3hooq$solidjs.createMemo(() => {
1808
- const v = value();
1809
- if (!v)
1810
- // only to prevent cleanup errors
1811
- return $3hooq$solidjs.createSignal(false);
1812
- const {
1813
- is_expanded_: {
1814
- ui_should_show_expanded_: ui_should_show_expanded_,
1815
- set_user_expanded_: set_user_expanded_
1807
+ } = v;
1808
+ return [ui_should_show_expanded_, set_user_expanded_];
1809
+ });
1810
+ return $3hooq$solidjsweb.createComponent((0, $4cfe8400ed3f92c4$export$6c6d7a51fa9aa15d), {
1811
+ get details_() {
1812
+ return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$3, $3hooq$solidjsweb.ssrHydrationKey());
1813
+ },
1814
+ get summary_() {
1815
+ var _value10, _value11;
1816
+ return $3hooq$solidjsweb.ssr($9c1d49181fb3002a$var$_tmpl$4, $3hooq$solidjsweb.ssrHydrationKey(), "count ".concat(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_) === 0 ? "count-0" : ""), $3hooq$solidjsweb.escape((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_), $3hooq$solidjsweb.escape($3hooq$solidjsweb.createComponent((0, $ac040bdfeed58ee4$export$e5c2828934226505), {
1817
+ i18n_: i18n_,
1818
+ get expanded_() {
1819
+ return $3hooq$solidjs.createMemo(() => {
1820
+ var _value$is_expanded_$u, _value12, _value12$is_expanded_, _value12$is_expanded_2;
1821
+ return (_value$is_expanded_$u = (_value12 = value()) === null || _value12 === void 0 ? void 0 : (_value12$is_expanded_ = _value12.is_expanded_) === null || _value12$is_expanded_ === void 0 ? void 0 : (_value12$is_expanded_2 = _value12$is_expanded_.ui_should_show_expanded_) === null || _value12$is_expanded_2 === void 0 ? void 0 : _value12$is_expanded_2.call(_value12$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
1822
+ });
1816
1823
  }
1817
- } = v;
1818
- return [ui_should_show_expanded_, set_user_expanded_];
1819
- })();
1820
- },
1821
- get children() {
1822
- return $9c1d49181fb3002a$var$render_stuff($3hooq$solidjs.createMemo(() => {
1823
- var _value13;
1824
- return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
1825
- }), existing_filter, i18n_);
1826
- }
1827
- });
1824
+ })));
1825
+ },
1826
+ get is_open_() {
1827
+ return is_open();
1828
+ },
1829
+ get children() {
1830
+ return $9c1d49181fb3002a$var$render_stuff($3hooq$solidjs.createMemo(() => {
1831
+ var _value13;
1832
+ return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
1833
+ }), existing_filter, i18n_);
1834
+ }
1835
+ });
1836
+ })();
1828
1837
  }
1829
1838
  })));
1830
1839
  })();
@@ -1889,7 +1898,7 @@ function $9c1d49181fb3002a$var$create_updating_signal(_ref3) {
1889
1898
  // wait for the children to have populated and us to have received the correct value_ and name_ values
1890
1899
  let updating_blocked = false;
1891
1900
  const index_of_us_in_selected_filter = existing_filter_ === null || existing_filter_ === void 0 ? void 0 : (_existing_filter_$dat = existing_filter_.data) === null || _existing_filter_$dat === void 0 ? void 0 : (_existing_filter_$dat2 = _existing_filter_$dat.findIndex) === null || _existing_filter_$dat2 === void 0 ? void 0 : _existing_filter_$dat2.call(_existing_filter_$dat, el => el.length === self_.value_.length && el.every((sub_el, index) => self_.value_[index] === sub_el));
1892
- signal_.push(...$3hooq$solidjs.createSignal(index_of_us_in_selected_filter >= 0 ? true : false));
1901
+ signal_.push(...$3hooq$solidjs.createSignal(index_of_us_in_selected_filter >= 0));
1893
1902
  const [read_checked, write_checked] = signal_;
1894
1903
  const child_objects = Object.values(self_.children_);
1895
1904
  const get_child_object_values = child_objects.map(_ref4 => {
@@ -7,7 +7,7 @@ import { CategorySuggestion, SearchSuggestionsResponse } from "@depict-ai/types/
7
7
  import { BaseSearchRequest } from "@depict-ai/types/api/BaseSearchRequest";
8
8
  import { SearchSuggestionsRequest } from "@depict-ai/types/api/SearchSuggestionsRequest";
9
9
  import { ProductListingRequest } from "@depict-ai/types/api/ProductListingRequest";
10
- export const version = "2.0.5";
10
+ export const version = "2.0.6";
11
11
  /**
12
12
  * Returns accessor with the size of the provided element, including padding and border (I think)
13
13
  */
@@ -8,7 +8,7 @@ import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
8
8
  /*! Depict.ai search and product listing SDK */
9
9
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
10
10
  register_es_version("ui", "ES10");
11
- const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.5";
11
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "2.0.6";
12
12
 
13
13
  /** @jsxImportSource solid-js */
14
14
 
@@ -1278,9 +1278,9 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
1278
1278
  }
1279
1279
  })));
1280
1280
  }
1281
- const $1e7465a8ffa97f6c$var$_tmpl$ = ["<div", ' class="range"><div class="input-group"><div class="field"><input type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--#-->", '<!--/--><div class="value-text"><span class="min"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", '<!--/--></span><span class="max"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div>"],
1281
+ const $1e7465a8ffa97f6c$var$_tmpl$ = ["<div", ' class="', '"><div class="input-group"><div class="field"><input', ' type="number"', '></div><div class="separator">-</div><div class="field"><input', ' type="number"', "></div></div><!--#-->", '<!--/--><div class="value-text"><span class="min"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", '<!--/--></span><span class="max"><!--#-->', "<!--/--><!--#-->", "<!--/--><!--#-->", "<!--/--></span></div></div>"],
1282
1282
  $1e7465a8ffa97f6c$var$_tmpl$2 = ["<div", ' class="slider"><div class="progress" style="', '"></div></div>'],
1283
- $1e7465a8ffa97f6c$var$_tmpl$3 = ["<div", ' class="range-group"><input type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
1283
+ $1e7465a8ffa97f6c$var$_tmpl$3 = ["<div", ' class="range-group"><input', ' type="range"', ' step="any"><input', ' type="range"', ' step="any"></div>'];
1284
1284
  function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
1285
1285
  let {
1286
1286
  filter_: filter_,
@@ -1359,11 +1359,13 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
1359
1359
  const [get_current_range] = current_range_;
1360
1360
  const pre_price = $b8hua$createMemo(() => price_formatting_().pre_);
1361
1361
  const post_price = $b8hua$createMemo(() => price_formatting_().post_);
1362
- return $b8hua$ssr($1e7465a8ffa97f6c$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(get_current_range()[0], true), false), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_high_point_aria_label_(), true), false), $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(get_current_range()[1], true), false), $b8hua$escape($b8hua$createComponent($1e7465a8ffa97f6c$var$ExponentialSlider, {
1362
+ const should_be_disabled_ = $b8hua$createMemo(() => Math.abs(min_() - max_()) < 2);
1363
+ return $b8hua$ssr($1e7465a8ffa97f6c$var$_tmpl$, $b8hua$ssrHydrationKey(), "range ".concat(min_() === max_() ? "disabled" : ""), $b8hua$ssrAttribute("disabled", should_be_disabled_(), true), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(get_current_range()[0], true), false), $b8hua$ssrAttribute("disabled", should_be_disabled_(), true) + $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_high_point_aria_label_(), true), false), $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(get_current_range()[1], true), false), $b8hua$escape($b8hua$createComponent($1e7465a8ffa97f6c$var$ExponentialSlider, {
1363
1364
  max_: max_,
1364
1365
  min_: min_,
1365
1366
  current_range_: current_range_,
1366
- i18n_: i18n_
1367
+ i18n_: i18n_,
1368
+ should_be_disabled_: should_be_disabled_
1367
1369
  })), $b8hua$escape(pre_price()), $b8hua$escape($b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
1368
1370
  get price_() {
1369
1371
  return min_();
@@ -1385,7 +1387,8 @@ function $1e7465a8ffa97f6c$var$ExponentialSlider(_ref4) {
1385
1387
  current_range_: current_range_,
1386
1388
  min_: min_,
1387
1389
  i18n_: i18n_,
1388
- max_: max_
1390
+ max_: max_,
1391
+ should_be_disabled_: should_be_disabled_
1389
1392
  } = _ref4;
1390
1393
  // inspired by https://observablehq.com/@mbostock/nonlinear-slider
1391
1394
  const transform_linear_to_nonlinear = _ref5 => {
@@ -1393,8 +1396,7 @@ function $1e7465a8ffa97f6c$var$ExponentialSlider(_ref4) {
1393
1396
  return [Math.sqrt(smaller), Math.sqrt(larger)];
1394
1397
  };
1395
1398
  const [read_current_range, write_current_range] = current_range_;
1396
- const modified_range = $b8hua$createSignal(transform_linear_to_nonlinear($b8hua$untrack(read_current_range)));
1397
- const [read_modified_range, write_modified_range] = modified_range;
1399
+ const modified_range_accessor = $b8hua$createMemo(() => transform_linear_to_nonlinear(read_current_range()));
1398
1400
  const modified_max = $b8hua$createMemo(() => Math.sqrt(max_()));
1399
1401
  const modified_min = $b8hua$createMemo(() => Math.sqrt(min_()));
1400
1402
  const offset_value_calculator_ = (value, how_many) => {
@@ -1402,36 +1404,39 @@ function $1e7465a8ffa97f6c$var$ExponentialSlider(_ref4) {
1402
1404
  const changed = number_in_linear + how_many;
1403
1405
  return Math.sqrt(changed);
1404
1406
  };
1405
- $b8hua$createComputed($b8hua$on(read_current_range, new_range_from_above => {
1406
- // to prevent from infinite looping, don't write if it's around the same
1407
- const new_modified_range = transform_linear_to_nonlinear(new_range_from_above);
1408
- const current_modified_range = read_modified_range();
1409
- if (!current_modified_range.every((item, index) => Math.round(item) === Math.round(new_modified_range[index]))) write_modified_range(new_modified_range);
1410
- }, {
1411
- defer: true
1412
- }));
1413
- $b8hua$createComputed($b8hua$on(read_modified_range, _ref6 => {
1414
- let [smaller, larger] = _ref6;
1415
- return write_current_range([Math.round(smaller * smaller), Math.round(larger * larger)]);
1416
- }, {
1417
- defer: true
1418
- }));
1407
+ const convert_back = (smaller, larger) => [Math.round(smaller * smaller), Math.round(larger * larger)];
1408
+ const modified_range_setter = new_range_or_function => {
1409
+ const old_range = $b8hua$untrack(modified_range_accessor);
1410
+ const new_range = typeof new_range_or_function === "function" ? new_range_or_function(old_range) : new_range_or_function;
1411
+ const [smaller, larger] = new_range;
1412
+ const [old_smaller, old_larger] = old_range;
1413
+ const new_range_converted = convert_back(smaller, larger);
1414
+ const old_range_converted = convert_back(old_smaller, old_larger);
1415
+ if (new_range_converted[0] === old_range_converted[0] && new_range_converted[1] === old_range_converted[1])
1416
+ // If the new value gets identical rounding errors to the old value when being converted back, don't write it to the signal since it would cause an infinite loop
1417
+ return new_range;
1418
+ write_current_range(new_range_converted);
1419
+ return new_range;
1420
+ };
1419
1421
  return $1e7465a8ffa97f6c$var$LinearSlider({
1420
- current_range_: modified_range,
1422
+ current_range_: [modified_range_accessor, modified_range_setter],
1423
+ // "Lie" to the actual slider so we don't have to implement exponential handling in there
1421
1424
  min_: modified_min,
1422
1425
  max_: modified_max,
1423
1426
  offset_value_calculator_: offset_value_calculator_,
1424
- i18n_: i18n_
1427
+ i18n_: i18n_,
1428
+ should_be_disabled_: should_be_disabled_
1425
1429
  });
1426
1430
  }
1427
- function $1e7465a8ffa97f6c$var$LinearSlider(_ref7) {
1431
+ function $1e7465a8ffa97f6c$var$LinearSlider(_ref6) {
1428
1432
  let {
1429
1433
  max_: max_,
1430
1434
  min_: min_,
1431
1435
  current_range_: current_range_,
1432
1436
  offset_value_calculator_: offset_value_calculator_,
1433
- i18n_: i18n_
1434
- } = _ref7;
1437
+ i18n_: i18n_,
1438
+ should_be_disabled_: should_be_disabled_
1439
+ } = _ref6;
1435
1440
  let range_input_1;
1436
1441
  let range_input_2;
1437
1442
  let clickable_slider;
@@ -1440,6 +1445,7 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref7) {
1440
1445
  const min = min_();
1441
1446
  const span = max_() - min;
1442
1447
  const [start, end] = get_current_range();
1448
+ if (should_be_disabled_()) return "left:50%;right:50%";
1443
1449
  return "left:".concat((start - min) / span * 100, "%;right:").concat(100 - (end - min) / span * 100, "%");
1444
1450
  });
1445
1451
  const set_value = (el, index) => {
@@ -1453,13 +1459,13 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref7) {
1453
1459
  el.value = get_current_range()[index];
1454
1460
  });
1455
1461
  };
1456
- return [$b8hua$ssr($1e7465a8ffa97f6c$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle(progress_styling())), $b8hua$ssr($1e7465a8ffa97f6c$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape($b8hua$createMemo(() => {
1462
+ return [$b8hua$ssr($1e7465a8ffa97f6c$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle(progress_styling())), $b8hua$ssr($1e7465a8ffa97f6c$var$_tmpl$3, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("disabled", should_be_disabled_(), true), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_low_point_aria_label_(), true), false) + $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape($b8hua$createMemo(() => {
1457
1463
  min_();
1458
1464
  max_();
1459
1465
  return get_current_range()[0];
1460
1466
  }, undefined, {
1461
1467
  equals: false
1462
- })(), true), false), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_high_point_aria_label_(), true), false), $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false))];
1468
+ })(), true), false), $b8hua$ssrAttribute("disabled", should_be_disabled_(), true) + $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.range_filter_high_point_aria_label_(), true), false), $b8hua$ssrAttribute("min", $b8hua$escape(min_(), true), false) + $b8hua$ssrAttribute("max", $b8hua$escape(max_(), true), false))];
1463
1469
  }
1464
1470
  function $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_signal, index, target_el) {
1465
1471
  let get_offset_value = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : (value, how_many) => value + how_many;
@@ -1728,44 +1734,47 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_) {
1728
1734
  return has_expandable();
1729
1735
  },
1730
1736
  get children() {
1731
- return $b8hua$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
1732
- get details_() {
1733
- return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$3, $b8hua$ssrHydrationKey());
1734
- },
1735
- get summary_() {
1736
- var _value10, _value11;
1737
- return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$4, $b8hua$ssrHydrationKey(), "count ".concat(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_) === 0 ? "count-0" : ""), $b8hua$escape((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_), $b8hua$escape($b8hua$createComponent((0, $457279ff15864cb9$export$e5c2828934226505), {
1738
- i18n_: i18n_,
1739
- get expanded_() {
1740
- return $b8hua$createMemo(() => {
1741
- var _value$is_expanded_$u, _value12, _value12$is_expanded_, _value12$is_expanded_2;
1742
- return (_value$is_expanded_$u = (_value12 = value()) === null || _value12 === void 0 ? void 0 : (_value12$is_expanded_ = _value12.is_expanded_) === null || _value12$is_expanded_ === void 0 ? void 0 : (_value12$is_expanded_2 = _value12$is_expanded_.ui_should_show_expanded_) === null || _value12$is_expanded_2 === void 0 ? void 0 : _value12$is_expanded_2.call(_value12$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
1743
- });
1737
+ return (() => {
1738
+ const is_open = $b8hua$createMemo(() => {
1739
+ const v = value();
1740
+ if (!v)
1741
+ // only to prevent cleanup errors
1742
+ return $b8hua$createSignal(false);
1743
+ const {
1744
+ is_expanded_: {
1745
+ ui_should_show_expanded_: ui_should_show_expanded_,
1746
+ set_user_expanded_: set_user_expanded_
1744
1747
  }
1745
- })));
1746
- },
1747
- get is_open_() {
1748
- return $b8hua$createMemo(() => {
1749
- const v = value();
1750
- if (!v)
1751
- // only to prevent cleanup errors
1752
- return $b8hua$createSignal(false);
1753
- const {
1754
- is_expanded_: {
1755
- ui_should_show_expanded_: ui_should_show_expanded_,
1756
- set_user_expanded_: set_user_expanded_
1748
+ } = v;
1749
+ return [ui_should_show_expanded_, set_user_expanded_];
1750
+ });
1751
+ return $b8hua$createComponent((0, $ad371564683947ab$export$6c6d7a51fa9aa15d), {
1752
+ get details_() {
1753
+ return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$3, $b8hua$ssrHydrationKey());
1754
+ },
1755
+ get summary_() {
1756
+ var _value10, _value11;
1757
+ return $b8hua$ssr($0ae614c5c7babb43$var$_tmpl$4, $b8hua$ssrHydrationKey(), "count ".concat(((_value10 = value()) === null || _value10 === void 0 ? void 0 : _value10.count_) === 0 ? "count-0" : ""), $b8hua$escape((_value11 = value()) === null || _value11 === void 0 ? void 0 : _value11.count_), $b8hua$escape($b8hua$createComponent((0, $457279ff15864cb9$export$e5c2828934226505), {
1758
+ i18n_: i18n_,
1759
+ get expanded_() {
1760
+ return $b8hua$createMemo(() => {
1761
+ var _value$is_expanded_$u, _value12, _value12$is_expanded_, _value12$is_expanded_2;
1762
+ return (_value$is_expanded_$u = (_value12 = value()) === null || _value12 === void 0 ? void 0 : (_value12$is_expanded_ = _value12.is_expanded_) === null || _value12$is_expanded_ === void 0 ? void 0 : (_value12$is_expanded_2 = _value12$is_expanded_.ui_should_show_expanded_) === null || _value12$is_expanded_2 === void 0 ? void 0 : _value12$is_expanded_2.call(_value12$is_expanded_)) !== null && _value$is_expanded_$u !== void 0 ? _value$is_expanded_$u : false;
1763
+ });
1757
1764
  }
1758
- } = v;
1759
- return [ui_should_show_expanded_, set_user_expanded_];
1760
- })();
1761
- },
1762
- get children() {
1763
- return $0ae614c5c7babb43$var$render_stuff($b8hua$createMemo(() => {
1764
- var _value13;
1765
- return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
1766
- }), existing_filter, i18n_);
1767
- }
1768
- });
1765
+ })));
1766
+ },
1767
+ get is_open_() {
1768
+ return is_open();
1769
+ },
1770
+ get children() {
1771
+ return $0ae614c5c7babb43$var$render_stuff($b8hua$createMemo(() => {
1772
+ var _value13;
1773
+ return ((_value13 = value()) === null || _value13 === void 0 ? void 0 : _value13.children_) || {};
1774
+ }), existing_filter, i18n_);
1775
+ }
1776
+ });
1777
+ })();
1769
1778
  }
1770
1779
  })));
1771
1780
  })();
@@ -1830,7 +1839,7 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
1830
1839
  // wait for the children to have populated and us to have received the correct value_ and name_ values
1831
1840
  let updating_blocked = false;
1832
1841
  const index_of_us_in_selected_filter = existing_filter_ === null || existing_filter_ === void 0 ? void 0 : (_existing_filter_$dat = existing_filter_.data) === null || _existing_filter_$dat === void 0 ? void 0 : (_existing_filter_$dat2 = _existing_filter_$dat.findIndex) === null || _existing_filter_$dat2 === void 0 ? void 0 : _existing_filter_$dat2.call(_existing_filter_$dat, el => el.length === self_.value_.length && el.every((sub_el, index) => self_.value_[index] === sub_el));
1833
- signal_.push(...$b8hua$createSignal(index_of_us_in_selected_filter >= 0 ? true : false));
1842
+ signal_.push(...$b8hua$createSignal(index_of_us_in_selected_filter >= 0));
1834
1843
  const [read_checked, write_checked] = signal_;
1835
1844
  const child_objects = Object.values(self_.children_);
1836
1845
  const get_child_object_values = child_objects.map(_ref4 => {