@depict-ai/react-ui 1.5.17 → 1.5.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ES10/index.cjs CHANGED
@@ -35,25 +35,25 @@ $parcel$export(module.exports, "version", () => $efbdd2dab4314170$export$83d89fb
35
35
  $parcel$export(module.exports, "Navigation", () => $0d3a2413fdeb34b9$export$b8a61e5c71402559);
36
36
  /*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
37
37
  // Note, if you add an export here, also add one in src-server/main.ts
38
- const $efbdd2dab4314170$export$83d89fbfd8236492 = "1.5.17";
38
+ const $efbdd2dab4314170$export$83d89fbfd8236492 = "1.5.19";
39
39
  const $ef516b1f92253963$export$8e769ad4338a911e = {
40
- usedLocale: (0, $2kiy7$solidjs.createSignal)((0, $2kiy7$depictaiuilocales.defaultLocale)),
40
+ usedLocale: $2kiy7$solidjs.createSignal((0, $2kiy7$depictaiuilocales.defaultLocale)),
41
41
  search_instances: new Map(),
42
42
  category_instances: new Map(),
43
43
  api: null,
44
44
  dpc: null,
45
- merchant: (0, $2kiy7$solidjs.createSignal)(),
46
- market: (0, $2kiy7$solidjs.createSignal)(),
47
- userId: (0, $2kiy7$solidjs.createSignal)(),
48
- sessionId: (0, $2kiy7$solidjs.createSignal)(),
45
+ merchant: $2kiy7$solidjs.createSignal(),
46
+ market: $2kiy7$solidjs.createSignal(),
47
+ userId: $2kiy7$solidjs.createSignal(),
48
+ sessionId: $2kiy7$solidjs.createSignal(),
49
49
  known_category_paths: new Set(),
50
- search_page_path_: (0, $2kiy7$solidjs.createSignal)(),
51
- search_page_in_dom: (0, $2kiy7$solidjs.createSignal)(false),
52
- category_page_in_dom: (0, $2kiy7$solidjs.createSignal)(false),
53
- provider_is_updating: (0, $2kiy7$solidjs.createSignal)(false),
54
- enable_content_search: (0, $2kiy7$solidjs.createSignal)(),
55
- category_meta_title_suffix: (0, $2kiy7$solidjs.createSignal)(),
56
- disable_override_query_id: (0, $2kiy7$solidjs.createSignal)()
50
+ search_page_path_: $2kiy7$solidjs.createSignal(),
51
+ search_page_in_dom: $2kiy7$solidjs.createSignal(false),
52
+ category_page_in_dom: $2kiy7$solidjs.createSignal(false),
53
+ provider_is_updating: $2kiy7$solidjs.createSignal(false),
54
+ enable_content_search: $2kiy7$solidjs.createSignal(),
55
+ category_meta_title_suffix: $2kiy7$solidjs.createSignal(),
56
+ disable_override_query_id: $2kiy7$solidjs.createSignal()
57
57
  };
58
58
  class $e9048b15cf1e8792$export$d0f82e3ef89b1f22 extends (0, $2kiy7$react.Component) {
59
59
  constructor(props) {
@@ -74,7 +74,7 @@ class $e9048b15cf1e8792$export$d0f82e3ef89b1f22 extends (0, $2kiy7$react.Compone
74
74
  render() {
75
75
  if (this.state.hasError)
76
76
  // You can render any custom fallback UI
77
- return (0, $2kiy7$react.createElement)("div", {
77
+ return $2kiy7$react.createElement("div", {
78
78
  children: "Component failed"
79
79
  });
80
80
  return this.props.children;
@@ -85,7 +85,7 @@ let $e7ba61a7074c02d3$var$old_href = location.href;
85
85
  function $e7ba61a7074c02d3$export$74f3924c5027fe1d(cb) {
86
86
  $e7ba61a7074c02d3$var$run_on_href_change = cb;
87
87
  }
88
- (0, $2kiy7$depictaiutilishared.instant_exec_on_suspect_history_change).add((0, $2kiy7$depictaiutilishared.catchify)(() => {
88
+ (0, $2kiy7$depictaiutilishared.instant_exec_on_suspect_history_change).add($2kiy7$depictaiutilishared.catchify(() => {
89
89
  const {
90
90
  href: href
91
91
  } = location;
@@ -94,7 +94,7 @@ function $e7ba61a7074c02d3$export$74f3924c5027fe1d(cb) {
94
94
  }));
95
95
  const $e7ba61a7074c02d3$export$775e6b3892b5ad52 = function () {
96
96
  let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location;
97
- return url.pathname == (0, $2kiy7$solidjs.untrack)((0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_path_[0]);
97
+ return url.pathname == $2kiy7$solidjs.untrack((0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_path_[0]);
98
98
  }; // might have changed therefore get it from globalState
99
99
  const $e7ba61a7074c02d3$export$30c8a12df09be0e4 = function () {
100
100
  let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : location;
@@ -108,12 +108,12 @@ function $e7ba61a7074c02d3$export$f6e64e17bd69eeef(_ref) {
108
108
  wrapper_style = {},
109
109
  hydrate_function_when_ssr: hydrate_function_when_ssr
110
110
  } = _ref;
111
- const [portals, set_portals] = (0, $2kiy7$react.useState)([]);
112
- const wrapper_element_ref = (0, $2kiy7$react.useRef)();
113
- const [[store, write_store]] = (0, $2kiy7$react.useState)(() => (0, $2kiy7$solidjsstore.createStore)(props));
111
+ const [portals, set_portals] = $2kiy7$react.useState([]);
112
+ const wrapper_element_ref = $2kiy7$react.useRef();
113
+ const [[store, write_store]] = $2kiy7$react.useState(() => $2kiy7$solidjsstore.createStore(props));
114
114
  // Update store when props change
115
- write_store((0, $2kiy7$solidjsstore.reconcile)(props));
116
- (0, $2kiy7$react.useEffect)(() => {
115
+ write_store($2kiy7$solidjsstore.reconcile(props));
116
+ $2kiy7$react.useEffect(() => {
117
117
  const wrapper_element = wrapper_element_ref.current;
118
118
  // If someone only rendered a solid component on the client that *could* be hydrated (no childNodes) then we fall back to `render` to avoid solid complaining about not being able to hydrate or crashing because the result of generateHydrationScript hasn't run at all
119
119
  // This can happen for HMR or when SSR capable components are only rendered on the client
@@ -121,7 +121,7 @@ function $e7ba61a7074c02d3$export$f6e64e17bd69eeef(_ref) {
121
121
  const dispose = render_function(() => solid_component(store, set_portals), wrapper_element);
122
122
  return dispose;
123
123
  }, []);
124
- return (0, $2kiy7$react.createElement)((0, $2kiy7$react.Fragment), null, (0, $2kiy7$react.createElement)(wrapper_type, {
124
+ return $2kiy7$react.createElement((0, $2kiy7$react.Fragment), null, $2kiy7$react.createElement(wrapper_type, {
125
125
  ref: wrapper_element_ref,
126
126
  style: wrapper_style,
127
127
  ...(hydrate_function_when_ssr ? {
@@ -136,8 +136,8 @@ function $e7ba61a7074c02d3$export$f6e64e17bd69eeef(_ref) {
136
136
  function $e7ba61a7074c02d3$export$e5139bbbb9a05035(component, is_set) {
137
137
  return function () {
138
138
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
139
- const default_is_set = (0, $2kiy7$solidjs.createMemo)(() => !!((0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[0]() && (0, $ef516b1f92253963$export$8e769ad4338a911e).market[0]())); // Apparently Show re-renders kids otherwise even if the falsiness of the condition doesn't change
140
- const should_show = (0, $2kiy7$solidjs.createMemo)(prev => {
139
+ const default_is_set = $2kiy7$solidjs.createMemo(() => !!((0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[0]() && (0, $ef516b1f92253963$export$8e769ad4338a911e).market[0]())); // Apparently Show re-renders kids otherwise even if the falsiness of the condition doesn't change
140
+ const should_show = $2kiy7$solidjs.createMemo(prev => {
141
141
  if (!prev && (0, $ef516b1f92253963$export$8e769ad4338a911e).provider_is_updating[0]())
142
142
  // Why `!prev`? See https://gitlab.com/depict-ai/depict.ai/-/merge_requests/7854#note_1495776987
143
143
  // If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
@@ -146,7 +146,7 @@ function $e7ba61a7074c02d3$export$e5139bbbb9a05035(component, is_set) {
146
146
  return (is_set || default_is_set)();
147
147
  });
148
148
  // @ts-ignore
149
- return (0, $2kiy7$solidjs.createComponent)((0, $2kiy7$solidjs.Show), {
149
+ return $2kiy7$solidjs.createComponent((0, $2kiy7$solidjs.Show), {
150
150
  get when() {
151
151
  return should_show();
152
152
  },
@@ -167,17 +167,17 @@ async function $e7ba61a7074c02d3$export$79c79419c1ef0081(_ref2) {
167
167
  let was_cleaned_up = false;
168
168
  const react_has_ran_hooks = new Promise(r => set_react_has_ran_hooks = r);
169
169
  const solid_container = document.createElement("div");
170
- const owner = (0, $2kiy7$solidjs.getOwner)();
171
- const reactProductCard = (0, $2kiy7$reactjsxruntime.jsx)(props => {
170
+ const owner = $2kiy7$solidjs.getOwner();
171
+ const reactProductCard = $2kiy7$reactjsxruntime.jsx(props => {
172
172
  // Sneak in a hook into their product card component to know once react has finished rendering and running hooks
173
- (0, $2kiy7$react.useEffect)(set_react_has_ran_hooks, []);
173
+ $2kiy7$react.useEffect(set_react_has_ran_hooks, []);
174
174
  return react_template(props);
175
175
  }, {
176
176
  display: display
177
177
  });
178
- const reactProductCardInErrorBoundary = (0, $2kiy7$reactjsxruntime.jsx)((0, $e9048b15cf1e8792$export$d0f82e3ef89b1f22), {
178
+ const reactProductCardInErrorBoundary = $2kiy7$reactjsxruntime.jsx((0, $e9048b15cf1e8792$export$d0f82e3ef89b1f22), {
179
179
  children: reactProductCard,
180
- on_error: error => (0, $2kiy7$solidjs.runWithOwner)(owner, () => {
180
+ on_error: error => $2kiy7$solidjs.runWithOwner(owner, () => {
181
181
  if (was_cleaned_up) return; // Would infinite loop if we'd throw after we've already been cleaned up. That is because the `ErrorBoundary` won't be "registered" with the cleaned-up owner anymore so react would hear about the throw and attempt to re-render the error boundary or something which would throw again, etc.
182
182
  throw new (0, $2kiy7$depictaiui.ProductCardError)(error);
183
183
  })
@@ -185,7 +185,7 @@ async function $e7ba61a7074c02d3$export$79c79419c1ef0081(_ref2) {
185
185
  const portal = $2kiy7$reactdom.createPortal(reactProductCardInErrorBoundary, solid_container);
186
186
  component_portals.add(portal);
187
187
  set_portals([...component_portals]);
188
- (0, $2kiy7$solidjs.onCleanup)(() => {
188
+ $2kiy7$solidjs.onCleanup(() => {
189
189
  was_cleaned_up = true;
190
190
  // this will stop working after any await so be careful to not await before this, or you'll have to carry the owner over with getOwner and runWithOwner
191
191
  component_portals.delete(portal);
@@ -199,7 +199,7 @@ let $abe6528d061993d2$var$set = false;
199
199
  let $abe6528d061993d2$var$padding_animation;
200
200
  function $abe6528d061993d2$export$6453cbc34515a94d() {
201
201
  var _window, _window$next, _window$next$router, _window$next$router$e;
202
- const are_on_search_or_category_page = () => (0, $e7ba61a7074c02d3$export$775e6b3892b5ad52)() || (0, $e7ba61a7074c02d3$export$30c8a12df09be0e4)();
202
+ const are_on_search_or_category_page = () => $e7ba61a7074c02d3$export$775e6b3892b5ad52() || $e7ba61a7074c02d3$export$30c8a12df09be0e4();
203
203
  if ($abe6528d061993d2$var$set) return; // Just being safe
204
204
  $abe6528d061993d2$var$set = true;
205
205
  // We used to initialise this variable with false which in some cases (scroll to top button in FloatingButtons) would cause the scroll to be blocked when it shouldn't (see https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686141321127089?thread_ts=1686134246.109689&cid=C058KQ3MU8Z)
@@ -215,7 +215,7 @@ function $abe6528d061993d2$export$6453cbc34515a94d() {
215
215
  } else should_use_old_scroll = true;
216
216
  };
217
217
  // When popping state, add padding in the same event as the "popstate" event (required) and then remove it once our stuff is in the DOM
218
- addEventListener("popstate", (0, $2kiy7$depictaiutilishared.catchify)(() => {
218
+ addEventListener("popstate", $2kiy7$depictaiutilishared.catchify(() => {
219
219
  if (!are_on_search_or_category_page()) {
220
220
  $abe6528d061993d2$var$removeLotsOfPadding(); // Just making sure
221
221
  return;
@@ -223,10 +223,10 @@ function $abe6528d061993d2$export$6453cbc34515a94d() {
223
223
  should_use_old_scroll = false;
224
224
  const [get_search_page_in_dom] = (0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_in_dom;
225
225
  const [get_category_page_in_dom] = (0, $ef516b1f92253963$export$8e769ad4338a911e).category_page_in_dom;
226
- const search_page_in_dom = (0, $2kiy7$solidjs.untrack)(get_search_page_in_dom);
227
- const category_page_in_dom = (0, $2kiy7$solidjs.untrack)(get_category_page_in_dom);
228
- const new_is_search = (0, $e7ba61a7074c02d3$export$775e6b3892b5ad52)();
229
- const new_is_category = (0, $e7ba61a7074c02d3$export$30c8a12df09be0e4)();
226
+ const search_page_in_dom = $2kiy7$solidjs.untrack(get_search_page_in_dom);
227
+ const category_page_in_dom = $2kiy7$solidjs.untrack(get_category_page_in_dom);
228
+ const new_is_search = $e7ba61a7074c02d3$export$775e6b3892b5ad52();
229
+ const new_is_category = $e7ba61a7074c02d3$export$30c8a12df09be0e4();
230
230
  let accessor_to_wait_for;
231
231
  if (search_page_in_dom && new_is_search || category_page_in_dom && new_is_category) {
232
232
  // Already on the page we're going to
@@ -235,7 +235,7 @@ function $abe6528d061993d2$export$6453cbc34515a94d() {
235
235
  }
236
236
  $abe6528d061993d2$var$addLotsOfPadding();
237
237
  if (new_is_search && category_page_in_dom) accessor_to_wait_for = get_search_page_in_dom;else if (new_is_category && search_page_in_dom) accessor_to_wait_for = get_category_page_in_dom;else accessor_to_wait_for = new_is_search ? get_search_page_in_dom : get_category_page_in_dom;
238
- (0, $2kiy7$solidjs.createRoot)(dispose => (0, $2kiy7$solidjs.createEffect)(() => {
238
+ $2kiy7$solidjs.createRoot(dispose => $2kiy7$solidjs.createEffect(() => {
239
239
  if (accessor_to_wait_for()) {
240
240
  $abe6528d061993d2$var$removeLotsOfPadding();
241
241
  dispose();
@@ -244,7 +244,7 @@ function $abe6528d061993d2$export$6453cbc34515a94d() {
244
244
  }));
245
245
  (_window = window) === null || _window === void 0 || (_window$next = _window.next) === null || _window$next === void 0 || (_window$next$router = _window$next.router) === null || _window$next$router === void 0 || (_window$next$router$e = _window$next$router.events) === null || _window$next$router$e === void 0 || _window$next$router$e.on(
246
246
  // We have to use the actual next router here, if we'd use next_router_event_target for this window.event wouldn't be the popstate anymore
247
- "routeChangeStart", (0, $2kiy7$depictaiutilishared.catchify)(() => {
247
+ "routeChangeStart", $2kiy7$depictaiutilishared.catchify(() => {
248
248
  // this is for when we navigate to a new page (replaceState or pushState)
249
249
  // We need to ensure that the page doesn't get shorter before the new history entry has been pushed
250
250
  // There is beforeHistoryChange which fires literally the line of code before the history API is called, so we make the page long until a task after that
@@ -253,7 +253,7 @@ function $abe6528d061993d2$export$6453cbc34515a94d() {
253
253
  // This is catchified, so we should see in sentry when it starts failing if browsers ever remove it???
254
254
  if (window.event instanceof PopStateEvent) return;
255
255
  $abe6528d061993d2$var$addLotsOfPadding();
256
- next_router_event_target.addEventListener("beforeHistoryChange", (0, $2kiy7$depictaiutilishared.catchify)(() => (0, $2kiy7$depictaiutilishared.queueMacroTask)($abe6528d061993d2$var$removeLotsOfPadding)), {
256
+ next_router_event_target.addEventListener("beforeHistoryChange", $2kiy7$depictaiutilishared.catchify(() => $2kiy7$depictaiutilishared.queueMacroTask($abe6528d061993d2$var$removeLotsOfPadding)), {
257
257
  once: true
258
258
  });
259
259
  }));
@@ -290,9 +290,9 @@ const $4a695f491f8300eb$export$599d4515591ef232 = (relativeUrl, isReplace, scrol
290
290
  Page[Page["SEARCH"] = 1] = "SEARCH";
291
291
  Page[Page["CATEGORY"] = 2] = "CATEGORY";
292
292
  })(Page || (Page = {}));
293
- const current_page = (0, $e7ba61a7074c02d3$export$775e6b3892b5ad52)() ? Page.SEARCH : (0, $e7ba61a7074c02d3$export$30c8a12df09be0e4)() ? Page.CATEGORY : Page.OTHER;
293
+ const current_page = $e7ba61a7074c02d3$export$775e6b3892b5ad52() ? Page.SEARCH : $e7ba61a7074c02d3$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
294
294
  const target_u_o = new URL(relativeUrl, location.origin);
295
- const target_page = (0, $e7ba61a7074c02d3$export$775e6b3892b5ad52)(target_u_o) ? Page.SEARCH : (0, $e7ba61a7074c02d3$export$30c8a12df09be0e4)(target_u_o) ? Page.CATEGORY : Page.OTHER;
295
+ const target_page = $e7ba61a7074c02d3$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $e7ba61a7074c02d3$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
296
296
  window.next.router[isReplace ? "replace" : "push"](relativeUrl, undefined, {
297
297
  shallow: current_page === target_page && target_page !== Page.OTHER,
298
298
  scroll:
@@ -340,27 +340,27 @@ function $50b0315f34679db4$export$bae2769a30719c48(disposable, stateKey) {
340
340
  const instance = new (0, $2kiy7$depictaiui.DepictSearch)({
341
341
  api: (0, $ef516b1f92253963$export$8e769ad4338a911e).api,
342
342
  search_query_url_param_name: search_query_url_param_name,
343
- market: (0, $2kiy7$solidjs.untrack)(get_market),
343
+ market: $2kiy7$solidjs.untrack(get_market),
344
344
  // TODO: check if we can do this
345
- merchant: (0, $2kiy7$solidjs.untrack)(get_merchant),
345
+ merchant: $2kiy7$solidjs.untrack(get_merchant),
346
346
  enable_category_suggestions: (_globalState$enableCa = (0, $ef516b1f92253963$export$8e769ad4338a911e).enableCategorySuggestions) !== null && _globalState$enableCa !== void 0 ? _globalState$enableCa : false,
347
347
  // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
348
- localization: (0, $2kiy7$solidjs.untrack)(get_locale),
349
- url_transformer: url => url.pathname = (0, $2kiy7$solidjs.untrack)(get_search_page_path),
348
+ localization: $2kiy7$solidjs.untrack(get_locale),
349
+ url_transformer: url => url.pathname = $2kiy7$solidjs.untrack(get_search_page_path),
350
350
  on_navigation: (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation,
351
351
  unique_instance_key_for_state: stateKey,
352
- enable_content_search: (0, $2kiy7$solidjs.untrack)(get_enable_content_search)
352
+ enable_content_search: $2kiy7$solidjs.untrack(get_enable_content_search)
353
353
  });
354
- (0, $2kiy7$solidjs.createComputed)(() => {
354
+ $2kiy7$solidjs.createComputed(() => {
355
355
  const new_merchant = get_merchant();
356
356
  if (new_merchant) instance.merchant = new_merchant;
357
357
  });
358
- (0, $2kiy7$solidjs.createComputed)(() => {
358
+ $2kiy7$solidjs.createComputed(() => {
359
359
  const new_market = get_market();
360
360
  if (new_market) instance.market = new_market;
361
361
  });
362
- (0, $2kiy7$solidjs.createComputed)(() => instance.localization = get_locale());
363
- (0, $2kiy7$solidjs.createComputed)(() => instance.enable_content_search = get_enable_content_search());
362
+ $2kiy7$solidjs.createComputed(() => instance.localization = get_locale());
363
+ $2kiy7$solidjs.createComputed(() => instance.enable_content_search = get_enable_content_search());
364
364
  return {
365
365
  instance: instance,
366
366
  dispose: dispose,
@@ -369,7 +369,7 @@ function $50b0315f34679db4$export$bae2769a30719c48(disposable, stateKey) {
369
369
  };
370
370
  const function_length_0 = () => actual_function();
371
371
  const function_length_1 = dispose => actual_function(dispose);
372
- return (0, $2kiy7$solidjs.createRoot)(disposable ? function_length_1 : function_length_0); // solid-js creates roots differently based on if it can detect a dispose argument, with function.length. That's why this is written like this
372
+ return $2kiy7$solidjs.createRoot(disposable ? function_length_1 : function_length_0); // solid-js creates roots differently based on if it can detect a dispose argument, with function.length. That's why this is written like this
373
373
  }
374
374
 
375
375
  function $d944107b1e0acdae$export$248b95d5073d5bab(disposable, stateKey) {
@@ -383,24 +383,24 @@ function $d944107b1e0acdae$export$248b95d5073d5bab(disposable, stateKey) {
383
383
  } = (0, $ef516b1f92253963$export$8e769ad4338a911e);
384
384
  const instance = new (0, $2kiy7$depictaiui.DepictCategory)({
385
385
  api: (0, $ef516b1f92253963$export$8e769ad4338a911e).api,
386
- market: (0, $2kiy7$solidjs.untrack)(get_market),
386
+ market: $2kiy7$solidjs.untrack(get_market),
387
387
  // TODO: check if we can do this
388
- merchant: (0, $2kiy7$solidjs.untrack)(get_merchant),
389
- localization: (0, $2kiy7$solidjs.untrack)(get_locale),
388
+ merchant: $2kiy7$solidjs.untrack(get_merchant),
389
+ localization: $2kiy7$solidjs.untrack(get_locale),
390
390
  on_navigation: (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation,
391
391
  unique_instance_key_for_state: stateKey
392
392
  });
393
- (0, $2kiy7$solidjs.createComputed)(() => {
393
+ $2kiy7$solidjs.createComputed(() => {
394
394
  const new_merchant = get_merchant();
395
395
  if (new_merchant) instance.merchant = new_merchant;
396
396
  });
397
- (0, $2kiy7$solidjs.createComputed)(() => {
397
+ $2kiy7$solidjs.createComputed(() => {
398
398
  const new_market = get_market();
399
399
  if (new_market) instance.market = new_market;
400
400
  });
401
- (0, $2kiy7$solidjs.createComputed)(() => instance.localization = get_locale());
402
- (0, $2kiy7$solidjs.createComputed)(() => instance.meta_title_suffix = get_category_meta_title_suffix());
403
- (0, $2kiy7$solidjs.createComputed)(() => instance.disable_override_query_id = get_disable_override_query_id());
401
+ $2kiy7$solidjs.createComputed(() => instance.localization = get_locale());
402
+ $2kiy7$solidjs.createComputed(() => instance.meta_title_suffix = get_category_meta_title_suffix());
403
+ $2kiy7$solidjs.createComputed(() => instance.disable_override_query_id = get_disable_override_query_id());
404
404
  return {
405
405
  instance: instance,
406
406
  dispose: dispose,
@@ -409,7 +409,7 @@ function $d944107b1e0acdae$export$248b95d5073d5bab(disposable, stateKey) {
409
409
  };
410
410
  const function_length_0 = () => actual_function();
411
411
  const function_length_1 = dispose => actual_function(dispose);
412
- return (0, $2kiy7$solidjs.createRoot)(disposable ? function_length_1 : function_length_0); // solid-js creates roots differently based on if it can detect a dispose argument, with function.length. That's why this is written like this
412
+ return $2kiy7$solidjs.createRoot(disposable ? function_length_1 : function_length_0); // solid-js creates roots differently based on if it can detect a dispose argument, with function.length. That's why this is written like this
413
413
  }
414
414
 
415
415
  let $6f994ff16ce375bb$var$provider_instances = 0;
@@ -451,11 +451,11 @@ function $6f994ff16ce375bb$var$ActualDepictProvider(props) {
451
451
  (0, $ef516b1f92253963$export$8e769ad4338a911e).enableCategorySuggestions = enableCategorySuggestions;
452
452
  (0, $ef516b1f92253963$export$8e769ad4338a911e).category_meta_title_suffix[1]((_props$category = props.category) === null || _props$category === void 0 ? void 0 : _props$category.metaTitleSuffix);
453
453
  (0, $ef516b1f92253963$export$8e769ad4338a911e).disable_override_query_id[1]((_props$category2 = props.category) === null || _props$category2 === void 0 ? void 0 : _props$category2.disableOverrideQueryId);
454
- (0, $18f442be2cc59de2$export$47e064413edabf36)(merchant, market, userId, sessionId);
455
- if (!market || !merchant) return (0, $2kiy7$react.createElement)((0, $2kiy7$react.Fragment), null, children);
454
+ $18f442be2cc59de2$export$47e064413edabf36(merchant, market, userId, sessionId);
455
+ if (!market || !merchant) return $2kiy7$react.createElement((0, $2kiy7$react.Fragment), null, children);
456
456
  (0, $ef516b1f92253963$export$8e769ad4338a911e).market[1](market);
457
457
  (0, $ef516b1f92253963$export$8e769ad4338a911e).merchant[1](merchant);
458
- (0, $abe6528d061993d2$export$6453cbc34515a94d)();
458
+ $abe6528d061993d2$export$6453cbc34515a94d();
459
459
  try {
460
460
  var _window, _window$next;
461
461
  const {
@@ -474,13 +474,13 @@ function $6f994ff16ce375bb$var$ActualDepictProvider(props) {
474
474
  if (navigateFunction) navigateFunction(new_relative_url, {
475
475
  replace: is_replace,
476
476
  scroll: scroll
477
- });else (0, $4a695f491f8300eb$export$599d4515591ef232)(new_relative_url, is_replace, scroll);
477
+ });else $4a695f491f8300eb$export$599d4515591ef232(new_relative_url, is_replace, scroll);
478
478
  };
479
479
  (0, $ef516b1f92253963$export$8e769ad4338a911e).on_navigation = on_navigation;
480
480
  (0, $ef516b1f92253963$export$8e769ad4338a911e).api || ((0, $ef516b1f92253963$export$8e769ad4338a911e).api = new (0, $2kiy7$depictaiui.DepictAPI)({
481
481
  get_metadata: async () => (0, $ef516b1f92253963$export$8e769ad4338a911e).metaData,
482
- get_user_id: () => (0, $2kiy7$solidjs.untrack)((0, $ef516b1f92253963$export$8e769ad4338a911e).userId[0]),
483
- get_session_id: () => (0, $2kiy7$solidjs.untrack)((0, $ef516b1f92253963$export$8e769ad4338a911e).sessionId[0])
482
+ get_user_id: () => $2kiy7$solidjs.untrack((0, $ef516b1f92253963$export$8e769ad4338a911e).userId[0]),
483
+ get_session_id: () => $2kiy7$solidjs.untrack((0, $ef516b1f92253963$export$8e769ad4338a911e).sessionId[0])
484
484
  }));
485
485
  (0, $ef516b1f92253963$export$8e769ad4338a911e).api.page_url_creator = props.pageURLCreator;
486
486
  (0, $ef516b1f92253963$export$8e769ad4338a911e).api.display_transformers = props.displayTransformers;
@@ -488,11 +488,11 @@ function $6f994ff16ce375bb$var$ActualDepictProvider(props) {
488
488
  if (!search_instances.get(undefined)) {
489
489
  // Create initial search instance which always exists. It i.e. gards against the state getting deleted from history.state by someone pushing to it with an empty object, which commonly people copy from code snippets.
490
490
  // Also, it emulates the behavior pre-supporting multiple "depict blocks" on the same page
491
- const instance = (0, $50b0315f34679db4$export$bae2769a30719c48)(false);
491
+ const instance = $50b0315f34679db4$export$bae2769a30719c48(false);
492
492
  search_instances.set(undefined, instance);
493
493
  }
494
494
  if (!category_instances.get(undefined)) {
495
- const instance = (0, $d944107b1e0acdae$export$248b95d5073d5bab)(false);
495
+ const instance = $d944107b1e0acdae$export$248b95d5073d5bab(false);
496
496
  category_instances.set(undefined, instance);
497
497
  }
498
498
  } catch (e) {
@@ -501,7 +501,7 @@ function $6f994ff16ce375bb$var$ActualDepictProvider(props) {
501
501
  throw e;
502
502
  });
503
503
  }
504
- return (0, $2kiy7$react.createElement)((0, $2kiy7$react.Fragment), null, children);
504
+ return $2kiy7$react.createElement((0, $2kiy7$react.Fragment), null, children);
505
505
  }
506
506
  function $6f994ff16ce375bb$var$ensure_correct_formatting(path) {
507
507
  // Make sure the path starts with a slash as it always will and is_page will fail otherwise
@@ -509,7 +509,7 @@ function $6f994ff16ce375bb$var$ensure_correct_formatting(path) {
509
509
  return path;
510
510
  }
511
511
  function $6f994ff16ce375bb$var$multiple_depictprovider_guard() {
512
- (0, $2kiy7$react.useEffect)(() => {
512
+ $2kiy7$react.useEffect(() => {
513
513
  $6f994ff16ce375bb$var$provider_instances++;
514
514
  if ($6f994ff16ce375bb$var$provider_instances > 1) throw new Error("You are using multiple DepictProviders. This is not supported and will lead to unexpected behavior. You can create multiple SearchPage and CategoryPage components, but only one DepictProvider.");
515
515
  return () => {
@@ -517,8 +517,8 @@ function $6f994ff16ce375bb$var$multiple_depictprovider_guard() {
517
517
  };
518
518
  }, []);
519
519
  }
520
- const $6d02bf18967c1604$export$80e99ee6b29cadd2 = /*#__PURE__*/(0, $2kiy7$react.forwardRef)((_, ref) => {
521
- return /*#__PURE__*/(0, $2kiy7$react.createElement)("div", {
520
+ const $6d02bf18967c1604$export$80e99ee6b29cadd2 = /*#__PURE__*/$2kiy7$react.forwardRef((_, ref) => {
521
+ return /*#__PURE__*/$2kiy7$react.createElement("div", {
522
522
  className: "depict aligner",
523
523
  style: {
524
524
  height: "100%"
@@ -531,11 +531,11 @@ function $fe70497a7dcbe63d$export$f4d89133c6985668(type, stateKey, componentName
531
531
  if (!instances.get(undefined)) throw Error("".concat(componentName, ": State not set up. Did you forget to wrap your app in DepictProvider? Also make sure you've provided a merchant and a market."));
532
532
  let instance = instances.get(stateKey);
533
533
  if (!instance) {
534
- instance = type === "search" ? (0, $50b0315f34679db4$export$bae2769a30719c48)(true, stateKey) : (0, $d944107b1e0acdae$export$248b95d5073d5bab)(true, stateKey);
534
+ instance = type === "search" ? $50b0315f34679db4$export$bae2769a30719c48(true, stateKey) : $d944107b1e0acdae$export$248b95d5073d5bab(true, stateKey);
535
535
  instances.set(stateKey, instance);
536
536
  }
537
537
  instance.users++;
538
- (0, $2kiy7$solidjs.onCleanup)(() => {
538
+ $2kiy7$solidjs.onCleanup(() => {
539
539
  var _instance;
540
540
  instance.users--;
541
541
  if (!instance.users && (_instance = instance) !== null && _instance !== void 0 && _instance.dispose) {
@@ -548,24 +548,24 @@ function $fe70497a7dcbe63d$export$f4d89133c6985668(type, stateKey, componentName
548
548
  }
549
549
  const $735104b46c50160f$var$rendered_components_with_state_key = new Set();
550
550
  function $735104b46c50160f$export$a54ec244c8863715(props) {
551
- return (0, $e7ba61a7074c02d3$export$f6e64e17bd69eeef)({
552
- solid_component: (0, $e7ba61a7074c02d3$export$e5139bbbb9a05035)($735104b46c50160f$var$SolidSearchPage),
551
+ return $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
552
+ solid_component: $e7ba61a7074c02d3$export$e5139bbbb9a05035($735104b46c50160f$var$SolidSearchPage),
553
553
  props: props
554
554
  });
555
555
  }
556
556
  function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
557
- const depict_search = (0, $2kiy7$solidjs.createMemo)(() => {
558
- const instance = (0, $fe70497a7dcbe63d$export$f4d89133c6985668)("search", props.stateKey, "SearchPage");
559
- (0, $2kiy7$solidjs.onCleanup)(() => {
557
+ const depict_search = $2kiy7$solidjs.createMemo(() => {
558
+ const instance = $fe70497a7dcbe63d$export$f4d89133c6985668("search", props.stateKey, "SearchPage");
559
+ $2kiy7$solidjs.onCleanup(() => {
560
560
  var _get_search_query_upd;
561
561
  // Make sure we don't block the search query updating signal when we switch to a new provider instance
562
- (_get_search_query_upd = (0, $2kiy7$depictaiui.get_search_query_updating_blocked_signal)(instance)) === null || _get_search_query_upd === void 0 || _get_search_query_upd[1](false);
562
+ (_get_search_query_upd = $2kiy7$depictaiui.get_search_query_updating_blocked_signal(instance)) === null || _get_search_query_upd === void 0 || _get_search_query_upd[1](false);
563
563
  });
564
564
  return instance;
565
565
  });
566
566
  const update_updating_blocked_signal = () => {
567
567
  // if search instances changes, also re-check for good measure (otherwise would have untrack around depict_search)
568
- const signal = (0, $2kiy7$depictaiui.get_search_query_updating_blocked_signal)(depict_search());
568
+ const signal = $2kiy7$depictaiui.get_search_query_updating_blocked_signal(depict_search());
569
569
  if (!signal) throw Error("No search_query_updating_blocked_signal when rendering SearchPage");
570
570
  const [, write_signal] = signal;
571
571
  // This causes a bug. To reproduce:
@@ -577,26 +577,26 @@ function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
577
577
  // This is because on the front page the search_query updating is blocked because it's not the search page, and that means that `filtered_previous_searches` in Autocomplete.tsx doesn't filter out the current search query
578
578
  // Because it's so minor and would be quite hard to fix (one would need a second "actual search query" signal just for this purpose) it's wontfix for now
579
579
  // EDIT: now that we're resetting this in the onCleanup of the memo above this might no longer be the case
580
- write_signal(!(0, $e7ba61a7074c02d3$export$775e6b3892b5ad52)(location));
580
+ write_signal(!$e7ba61a7074c02d3$export$775e6b3892b5ad52(location));
581
581
  };
582
582
  const [, set_search_page_in_dom] = (0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_in_dom;
583
583
  const component_portals = new Set();
584
584
  // We should only get here once react already has a DOM node which means we should be in the DOM
585
585
  set_search_page_in_dom(true);
586
- (0, $2kiy7$solidjs.onCleanup)(() => set_search_page_in_dom(false));
586
+ $2kiy7$solidjs.onCleanup(() => set_search_page_in_dom(false));
587
587
  // react is really slow with disposing components, we want to avoid a flash of another search query when you click on a product and navigate away
588
- (0, $e7ba61a7074c02d3$export$74f3924c5027fe1d)(update_updating_blocked_signal); // if we navigate, re-check
589
- (0, $2kiy7$solidjs.createComputed)(() => {
588
+ $e7ba61a7074c02d3$export$74f3924c5027fe1d(update_updating_blocked_signal); // if we navigate, re-check
589
+ $2kiy7$solidjs.createComputed(() => {
590
590
  (0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_path_[0](); // if react defined path changes, re-check
591
591
  update_updating_blocked_signal();
592
592
  });
593
593
  $735104b46c50160f$var$search_page_path_checker();
594
- return (0, $2kiy7$solidjs.createMemo)(() => {
595
- const stateKey = (0, $2kiy7$solidjs.untrack)(() => props.stateKey);
594
+ return $2kiy7$solidjs.createMemo(() => {
595
+ const stateKey = $2kiy7$solidjs.untrack(() => props.stateKey);
596
596
  if ($735104b46c50160f$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple SearchPage components with the same stateKey: ".concat(stateKey, ". Each SearchPage component must have a unique stateKey."));
597
597
  $735104b46c50160f$var$rendered_components_with_state_key.add(stateKey);
598
- (0, $2kiy7$solidjs.onCleanup)(() => $735104b46c50160f$var$rendered_components_with_state_key.delete(stateKey));
599
- return (0, $2kiy7$depictaiui.SearchPage)({
598
+ $2kiy7$solidjs.onCleanup(() => $735104b46c50160f$var$rendered_components_with_state_key.delete(stateKey));
599
+ return $2kiy7$depictaiui.SearchPage({
600
600
  // Default config goes here
601
601
  get include_input_field() {
602
602
  return props.includeInputField;
@@ -610,9 +610,9 @@ function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
610
610
  return (_props$gridSpacing = props.gridSpacing) !== null && _props$gridSpacing !== void 0 ? _props$gridSpacing : (0, $2kiy7$depictaiui.defaultGridSpacing);
611
611
  },
612
612
  depict_search: depict_search(),
613
- product_card_template: display => (0, $e7ba61a7074c02d3$export$79c79419c1ef0081)({
613
+ product_card_template: display => $e7ba61a7074c02d3$export$79c79419c1ef0081({
614
614
  display: display,
615
- react_template: (0, $2kiy7$solidjs.untrack)(() => props.productCard),
615
+ react_template: $2kiy7$solidjs.untrack(() => props.productCard),
616
616
  component_portals: component_portals,
617
617
  set_portals: set_portals
618
618
  })
@@ -624,7 +624,7 @@ function $735104b46c50160f$var$SolidSearchPage(props, set_portals) {
624
624
  */
625
625
  function $735104b46c50160f$var$search_page_path_checker() {
626
626
  let has_warned = false;
627
- (0, $2kiy7$solidjs.createEffect)(() => {
627
+ $2kiy7$solidjs.createEffect(() => {
628
628
  if (has_warned) return;
629
629
  const should_be_path = (0, $ef516b1f92253963$export$8e769ad4338a911e).search_page_path_[0]();
630
630
  const {
@@ -633,32 +633,32 @@ function $735104b46c50160f$var$search_page_path_checker() {
633
633
  if (
634
634
  // allow some variability just to be sure
635
635
  should_be_path !== pathname && should_be_path + "/" !== pathname && should_be_path !== pathname + "/") {
636
- (0, $2kiy7$depictaiutilishared.derror)("searchPagePath is set to", should_be_path, "but the SearchPage is rendered at", pathname, ". Please double-check your searchPagePath is where the SearchPage component ends up being rendered, after all redirects, unless you're sure this is intentional.");
636
+ $2kiy7$depictaiutilishared.derror("searchPagePath is set to", should_be_path, "but the SearchPage is rendered at", pathname, ". Please double-check your searchPagePath is where the SearchPage component ends up being rendered, after all redirects, unless you're sure this is intentional.");
637
637
  has_warned = true;
638
638
  }
639
639
  });
640
640
  }
641
641
  const $15691268d8df90a9$var$rendered_components_with_state_key = new Set();
642
642
  function $15691268d8df90a9$export$f7d2f673fc2f091d(props) {
643
- return (0, $e7ba61a7074c02d3$export$f6e64e17bd69eeef)({
643
+ return $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
644
644
  // @ts-ignore
645
- solid_component: (0, $e7ba61a7074c02d3$export$e5139bbbb9a05035)($15691268d8df90a9$var$SolidCategoryPage),
645
+ solid_component: $e7ba61a7074c02d3$export$e5139bbbb9a05035($15691268d8df90a9$var$SolidCategoryPage),
646
646
  props: props,
647
647
  wrapper_type: "div",
648
648
  wrapper_style: {}
649
649
  });
650
650
  }
651
651
  function $15691268d8df90a9$var$SolidCategoryPage(props, set_portals) {
652
- const depict_category = (0, $2kiy7$solidjs.createMemo)(() => (0, $fe70497a7dcbe63d$export$f4d89133c6985668)("category", props.stateKey, "CategoryPage") // stateKey can change
652
+ const depict_category = $2kiy7$solidjs.createMemo(() => $fe70497a7dcbe63d$export$f4d89133c6985668("category", props.stateKey, "CategoryPage") // stateKey can change
653
653
  );
654
654
 
655
- const [category_state_set, set_category_state_set] = (0, $2kiy7$solidjs.createSignal)(false);
655
+ const [category_state_set, set_category_state_set] = $2kiy7$solidjs.createSignal(false);
656
656
  const component_portals = new Set();
657
657
  const [, set_category_page_in_dom] = (0, $ef516b1f92253963$export$8e769ad4338a911e).category_page_in_dom;
658
658
  // We should only get here once react already has a DOM node which means we should be in the DOM
659
659
  set_category_page_in_dom(true);
660
- (0, $2kiy7$solidjs.onCleanup)(() => set_category_page_in_dom(false));
661
- (0, $2kiy7$solidjs.createComputed)(() => {
660
+ $2kiy7$solidjs.onCleanup(() => set_category_page_in_dom(false));
661
+ $2kiy7$solidjs.createComputed(() => {
662
662
  const {
663
663
  categoryId: categoryId
664
664
  } = props;
@@ -668,13 +668,13 @@ function $15691268d8df90a9$var$SolidCategoryPage(props, set_portals) {
668
668
  (0, $ef516b1f92253963$export$8e769ad4338a911e).known_category_paths.add(location.pathname);
669
669
  }
670
670
  });
671
- (0, $2kiy7$solidjs.createComputed)(() => depict_category().listing_type = props.listingType);
672
- const category = () => (0, $2kiy7$solidjs.createMemo)(() => {
673
- const stateKey = (0, $2kiy7$solidjs.untrack)(() => props.stateKey);
671
+ $2kiy7$solidjs.createComputed(() => depict_category().listing_type = props.listingType);
672
+ const category = () => $2kiy7$solidjs.createMemo(() => {
673
+ const stateKey = $2kiy7$solidjs.untrack(() => props.stateKey);
674
674
  if ($15691268d8df90a9$var$rendered_components_with_state_key.has(stateKey)) throw new Error("You have multiple CategoryPage components with the same stateKey: ".concat(stateKey, ". Each CategoryPage component must have a unique stateKey."));
675
675
  $15691268d8df90a9$var$rendered_components_with_state_key.add(stateKey);
676
- (0, $2kiy7$solidjs.onCleanup)(() => $15691268d8df90a9$var$rendered_components_with_state_key.delete(stateKey));
677
- return (0, $2kiy7$depictaiui.CategoryPage)({
676
+ $2kiy7$solidjs.onCleanup(() => $15691268d8df90a9$var$rendered_components_with_state_key.delete(stateKey));
677
+ return $2kiy7$depictaiui.CategoryPage({
678
678
  depict_category: depict_category(),
679
679
  get cols_at_size() {
680
680
  var _props$columnsAtSize;
@@ -684,50 +684,50 @@ function $15691268d8df90a9$var$SolidCategoryPage(props, set_portals) {
684
684
  var _props$gridSpacing;
685
685
  return (_props$gridSpacing = props.gridSpacing) !== null && _props$gridSpacing !== void 0 ? _props$gridSpacing : (0, $2kiy7$depictaiui.defaultGridSpacing);
686
686
  },
687
- category_title: (0, $2kiy7$solidjs.untrack)(() => props.categoryTitlePlugin) || (0, $2kiy7$depictaiui.defaultCategoryTitlePlugin),
687
+ category_title: $2kiy7$solidjs.untrack(() => props.categoryTitlePlugin) || (0, $2kiy7$depictaiui.defaultCategoryTitlePlugin),
688
688
  get show_breadcrumbs() {
689
689
  return props.showBreadcrumbs;
690
690
  },
691
691
  get show_quicklinks() {
692
692
  return props.showQuicklinks;
693
693
  },
694
- product_card_template: display => (0, $e7ba61a7074c02d3$export$79c79419c1ef0081)({
694
+ product_card_template: display => $e7ba61a7074c02d3$export$79c79419c1ef0081({
695
695
  display: display,
696
- react_template: (0, $2kiy7$solidjs.untrack)(() => props.productCard),
696
+ react_template: $2kiy7$solidjs.untrack(() => props.productCard),
697
697
  component_portals: component_portals,
698
698
  set_portals: set_portals
699
699
  })
700
700
  });
701
701
  });
702
- return (0, $e7ba61a7074c02d3$export$e5139bbbb9a05035)(category, category_state_set);
702
+ return $e7ba61a7074c02d3$export$e5139bbbb9a05035(category, category_state_set);
703
703
  }
704
704
  function $5f792cc5817de4b4$export$5646050d516e06bc(react_props) {
705
- return (0, $e7ba61a7074c02d3$export$f6e64e17bd69eeef)({
706
- solid_component: (0, $e7ba61a7074c02d3$export$e5139bbbb9a05035)($5f792cc5817de4b4$var$vanilla_breadcrumbs),
705
+ return $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
706
+ solid_component: $e7ba61a7074c02d3$export$e5139bbbb9a05035($5f792cc5817de4b4$var$vanilla_breadcrumbs),
707
707
  props: react_props
708
708
  });
709
709
  }
710
710
  function $5f792cc5817de4b4$var$vanilla_breadcrumbs(props) {
711
711
  // memo so stateKey can be dynamically changed
712
- return (0, $2kiy7$solidjs.createMemo)(() => {
713
- const depict_category = (0, $fe70497a7dcbe63d$export$f4d89133c6985668)("category", props.stateKey, "BreadCrumbs");
714
- return (0, $2kiy7$depictaiui.BreadCrumbs)({
712
+ return $2kiy7$solidjs.createMemo(() => {
713
+ const depict_category = $fe70497a7dcbe63d$export$f4d89133c6985668("category", props.stateKey, "BreadCrumbs");
714
+ return $2kiy7$depictaiui.BreadCrumbs({
715
715
  depict_category: depict_category
716
716
  });
717
717
  });
718
718
  }
719
719
  function $df17258939eea14f$export$466cdc317043f6cb() {
720
720
  let react_props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
721
- return (0, $e7ba61a7074c02d3$export$f6e64e17bd69eeef)({
722
- solid_component: (0, $e7ba61a7074c02d3$export$e5139bbbb9a05035)($df17258939eea14f$var$vanilla_quick_links),
721
+ return $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
722
+ solid_component: $e7ba61a7074c02d3$export$e5139bbbb9a05035($df17258939eea14f$var$vanilla_quick_links),
723
723
  props: react_props
724
724
  });
725
725
  }
726
726
  function $df17258939eea14f$var$vanilla_quick_links(props) {
727
727
  // memo so stateKey can be dynamically changed
728
- return (0, $2kiy7$solidjs.createMemo)(() => {
729
- const depict_category = (0, $fe70497a7dcbe63d$export$f4d89133c6985668)("category", props.stateKey, "QuickLinks");
730
- return (0, $2kiy7$depictaiui.QuickLinks)({
728
+ return $2kiy7$solidjs.createMemo(() => {
729
+ const depict_category = $fe70497a7dcbe63d$export$f4d89133c6985668("category", props.stateKey, "QuickLinks");
730
+ return $2kiy7$depictaiui.QuickLinks({
731
731
  depict_category: depict_category
732
732
  });
733
733
  });
@@ -737,8 +737,8 @@ const $95af6193353bea10$export$3f37af283f8fb843 = raw_react_props => {
737
737
  class: raw_react_props.className,
738
738
  ...raw_react_props
739
739
  };
740
- return (0, $e7ba61a7074c02d3$export$f6e64e17bd69eeef)({
741
- solid_component: props_store => (0, $2kiy7$depictaiui.ImagePlaceholder)(props_store),
740
+ return $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
741
+ solid_component: props_store => $2kiy7$depictaiui.ImagePlaceholder(props_store),
742
742
  props: react_props,
743
743
  wrapper_type: "span",
744
744
  hydrate_function_when_ssr: (0, $2kiy7$solidjsweb.hydrate)
@@ -749,8 +749,8 @@ const $07e1b96355935829$export$89c6019e4baa40b1 = raw_react_props => {
749
749
  class: raw_react_props.className,
750
750
  ...raw_react_props
751
751
  };
752
- return (0, $e7ba61a7074c02d3$export$f6e64e17bd69eeef)({
753
- solid_component: props_store => (0, $2kiy7$depictaiui.TextPlaceholder)(props_store),
752
+ return $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
753
+ solid_component: props_store => $2kiy7$depictaiui.TextPlaceholder(props_store),
754
754
  props: react_props,
755
755
  wrapper_type: "span",
756
756
  hydrate_function_when_ssr: (0, $2kiy7$solidjsweb.hydrate),
@@ -765,9 +765,9 @@ const $205fe657e57228d5$export$d69d8daa20eae175 = createOpenModalParams => {
765
765
  alignerRef: alignerRef,
766
766
  stateKey: stateKey
767
767
  } = createOpenModalParams;
768
- let [deduped_variable, set_deduped_variable] = (0, $2kiy7$react.useState)();
768
+ let [deduped_variable, set_deduped_variable] = $2kiy7$react.useState();
769
769
  // When component using this hook unmounts, "untrack" our component and dispose the search instance if needed
770
- (0, $2kiy7$react.useEffect)(() => {
770
+ $2kiy7$react.useEffect(() => {
771
771
  var _deduped_variable, _deduped_variable$;
772
772
  return (_deduped_variable = deduped_variable) === null || _deduped_variable === void 0 ? void 0 : (_deduped_variable$ = _deduped_variable[1]) === null || _deduped_variable$ === void 0 ? void 0 : _deduped_variable$.call(_deduped_variable);
773
773
  }, []);
@@ -775,15 +775,15 @@ const $205fe657e57228d5$export$d69d8daa20eae175 = createOpenModalParams => {
775
775
  // Get the search instance and track this component, but only once (basically work around re-rendering)
776
776
  // We have to do this in the openModal function since people might call this hook before creating DepictProvider
777
777
  if (!deduped_variable) {
778
- deduped_variable = (0, $2kiy7$solidjs.createRoot)(dispose => [(0, $fe70497a7dcbe63d$export$f4d89133c6985668)("search", stateKey, "useSearchModal"), dispose]);
778
+ deduped_variable = $2kiy7$solidjs.createRoot(dispose => [$fe70497a7dcbe63d$export$f4d89133c6985668("search", stateKey, "useSearchModal"), dispose]);
779
779
  set_deduped_variable(deduped_variable);
780
780
  }
781
781
  const [search] = deduped_variable;
782
- if (location === "aligned" && alignerRef !== null && alignerRef !== void 0 && alignerRef.current) (0, $2kiy7$depictaiui.open_modal_with_alignment)({
782
+ if (location === "aligned" && alignerRef !== null && alignerRef !== void 0 && alignerRef.current) $2kiy7$depictaiui.open_modal_with_alignment({
783
783
  "element": alignerRef.current,
784
784
  "location": location,
785
785
  "search": search
786
- });else (0, $2kiy7$depictaiui.open_modal_with_alignment)({
786
+ });else $2kiy7$depictaiui.open_modal_with_alignment({
787
787
  "location": "centered",
788
788
  "search": search
789
789
  });
@@ -792,7 +792,7 @@ const $205fe657e57228d5$export$d69d8daa20eae175 = createOpenModalParams => {
792
792
  };
793
793
  function $0991f250194bf9f3$export$912994940e660d32() {
794
794
  let params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
795
- const open = (0, $205fe657e57228d5$export$d69d8daa20eae175)({
795
+ const open = $205fe657e57228d5$export$d69d8daa20eae175({
796
796
  globalState: $ef516b1f92253963$export$8e769ad4338a911e,
797
797
  ...params
798
798
  });
@@ -804,15 +804,15 @@ const $fea6ed5be1bf2b27$export$9bb30bbe003b82e0 = function () {
804
804
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
805
805
  // We should just export a plain SearchField component here, not a weird hook thing, but I don't want to make a breaking change. Just fixing the re-rendering issue for now.
806
806
  // Create signal that persists across renders
807
- const [[get_aligner_signal_value, set_aligner_signal_value]] = (0, $2kiy7$react.useState)((0, $2kiy7$solidjs.createSignal)());
807
+ const [[get_aligner_signal_value, set_aligner_signal_value]] = $2kiy7$react.useState($2kiy7$solidjs.createSignal());
808
808
  // Update signal value when alignerRef changes
809
809
  set_aligner_signal_value(props === null || props === void 0 ? void 0 : props.alignerRef);
810
810
  // Make sure react never re-renders the actual SearchField component
811
- const componentFunction = (0, $2kiy7$react.useCallback)(() => (0, $e7ba61a7074c02d3$export$f6e64e17bd69eeef)({
812
- solid_component: (0, $e7ba61a7074c02d3$export$e5139bbbb9a05035)(() => {
813
- return (0, $2kiy7$solidjs.createMemo)(() => {
814
- const depict_search = (0, $fe70497a7dcbe63d$export$f4d89133c6985668)("search", props.stateKey, "useSearchField");
815
- return (0, $2kiy7$depictaiui.SearchField)({
811
+ const componentFunction = $2kiy7$react.useCallback(() => $e7ba61a7074c02d3$export$f6e64e17bd69eeef({
812
+ solid_component: $e7ba61a7074c02d3$export$e5139bbbb9a05035(() => {
813
+ return $2kiy7$solidjs.createMemo(() => {
814
+ const depict_search = $fe70497a7dcbe63d$export$f4d89133c6985668("search", props.stateKey, "useSearchField");
815
+ return $2kiy7$depictaiui.SearchField({
816
816
  depict_search: depict_search,
817
817
  get aligner_ref() {
818
818
  var _get_aligner_signal_v;
@@ -840,14 +840,14 @@ function $2ea1d71b29581906$var$fetchRecommendations(opts) {
840
840
  userId: [get_userId],
841
841
  sessionId: [get_sessionId]
842
842
  } = (0, $ef516b1f92253963$export$8e769ad4338a911e);
843
- const merchant = (0, $2kiy7$solidjs.untrack)(get_merchant);
844
- const market = (0, $2kiy7$solidjs.untrack)(get_market);
843
+ const merchant = $2kiy7$solidjs.untrack(get_merchant);
844
+ const market = $2kiy7$solidjs.untrack(get_market);
845
845
  if (!merchant || !market) throw new Error("Depict recommendations are not configured. Wrap your app in a DepictProvider.");
846
- return (0, $2kiy7$depictaiui.fetchDepictRecommendations)({
846
+ return $2kiy7$depictaiui.fetchDepictRecommendations({
847
847
  merchant: merchant,
848
848
  market: market,
849
- userId: (0, $2kiy7$solidjs.untrack)(get_userId),
850
- sessionId: (0, $2kiy7$solidjs.untrack)(get_sessionId),
849
+ userId: $2kiy7$solidjs.untrack(get_userId),
850
+ sessionId: $2kiy7$solidjs.untrack(get_sessionId),
851
851
  ...opts
852
852
  });
853
853
  }
@@ -862,9 +862,9 @@ const $6bf91538dbdf0252$export$804fac5697cfbe35 = router => (relativeUrl, _ref)
862
862
  Page[Page["SEARCH"] = 1] = "SEARCH";
863
863
  Page[Page["CATEGORY"] = 2] = "CATEGORY";
864
864
  })(Page || (Page = {}));
865
- const current_page = (0, $e7ba61a7074c02d3$export$775e6b3892b5ad52)() ? Page.SEARCH : (0, $e7ba61a7074c02d3$export$30c8a12df09be0e4)() ? Page.CATEGORY : Page.OTHER;
865
+ const current_page = $e7ba61a7074c02d3$export$775e6b3892b5ad52() ? Page.SEARCH : $e7ba61a7074c02d3$export$30c8a12df09be0e4() ? Page.CATEGORY : Page.OTHER;
866
866
  const target_u_o = new URL(relativeUrl, location.origin);
867
- const target_page = (0, $e7ba61a7074c02d3$export$775e6b3892b5ad52)(target_u_o) ? Page.SEARCH : (0, $e7ba61a7074c02d3$export$30c8a12df09be0e4)(target_u_o) ? Page.CATEGORY : Page.OTHER;
867
+ const target_page = $e7ba61a7074c02d3$export$775e6b3892b5ad52(target_u_o) ? Page.SEARCH : $e7ba61a7074c02d3$export$30c8a12df09be0e4(target_u_o) ? Page.CATEGORY : Page.OTHER;
868
868
  router[replace ? "replace" : "push"](relativeUrl, undefined, {
869
869
  shallow: current_page === target_page && target_page !== Page.OTHER,
870
870
  scroll:
@@ -875,4 +875,4 @@ const $6bf91538dbdf0252$export$804fac5697cfbe35 = router => (relativeUrl, _ref)
875
875
  const $0d3a2413fdeb34b9$export$b8a61e5c71402559 = {
876
876
  nextRouterNavigation: $6bf91538dbdf0252$export$804fac5697cfbe35
877
877
  };
878
- (0, $2kiy7$depictaiutilishared.add_to_version_info)("react-ui", (0, $efbdd2dab4314170$export$83d89fbfd8236492));
878
+ $2kiy7$depictaiutilishared.add_to_version_info("react-ui", (0, $efbdd2dab4314170$export$83d89fbfd8236492));