@depict-ai/react-ui 1.5.3 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js DELETED
@@ -1,875 +0,0 @@
1
- import {add_to_version_info as $TZSbU$add_to_version_info, catchify as $TZSbU$catchify, queueMacroTask as $TZSbU$queueMacroTask, instant_exec_on_suspect_history_change as $TZSbU$instant_exec_on_suspect_history_change, derror as $TZSbU$derror} from "@depict-ai/utilishared";
2
- import {CategoryTitle as $43099132aad1ceb6$re_export$CategoryTitle, embedded_num_products as $43099132aad1ceb6$re_export$EmbeddedNumProducts, DepictAPI as $TZSbU$DepictAPI, ProductCardError as $TZSbU$ProductCardError, DepictSearch as $TZSbU$DepictSearch, DepictCategory as $TZSbU$DepictCategory, get_search_query_updating_blocked_signal as $TZSbU$get_search_query_updating_blocked_signal, SearchPage as $TZSbU$SearchPage, defaultColsAtSize as $TZSbU$defaultColsAtSize, defaultGridSpacing as $TZSbU$defaultGridSpacing, CategoryPage as $TZSbU$CategoryPage, defaultCategoryTitlePlugin as $TZSbU$defaultCategoryTitlePlugin, BreadCrumbs as $TZSbU$BreadCrumbs, QuickLinks as $TZSbU$QuickLinks, ImagePlaceholder as $TZSbU$ImagePlaceholder, TextPlaceholder as $TZSbU$TextPlaceholder, open_modal_with_alignment as $TZSbU$open_modal_with_alignment, SearchField as $TZSbU$SearchField, fetchDepictRecommendations as $TZSbU$fetchDepictRecommendations} from "@depict-ai/ui";
3
- import {untrack as $TZSbU$untrack, createRoot as $TZSbU$createRoot, createEffect as $TZSbU$createEffect, createMemo as $TZSbU$createMemo, createComponent as $TZSbU$createComponent, Show as $TZSbU$Show, getOwner as $TZSbU$getOwner, runWithOwner as $TZSbU$runWithOwner, onCleanup as $TZSbU$onCleanup, createSignal as $TZSbU$createSignal, createComputed as $TZSbU$createComputed} from "solid-js";
4
- import {createElement as $TZSbU$createElement, Fragment as $TZSbU$Fragment, useEffect as $TZSbU$useEffect, useState as $TZSbU$useState, useRef as $TZSbU$useRef, Component as $TZSbU$Component, forwardRef as $TZSbU$forwardRef, useCallback as $TZSbU$useCallback} from "react";
5
- import {defaultLocale as $TZSbU$defaultLocale} from "@depict-ai/ui/locales";
6
- import {render as $TZSbU$render, hydrate as $TZSbU$hydrate} from "solid-js/web";
7
- import {jsx as $TZSbU$jsx} from "react/jsx-runtime";
8
- import {createPortal as $TZSbU$createPortal} from "react-dom";
9
- import {createStore as $TZSbU$createStore, reconcile as $TZSbU$reconcile} from "solid-js/store";
10
- import {DPC as $TZSbU$DPC} from "@depict-ai/dpc";
11
-
12
- /*! Depict.ai search and product listing react SDK wrapper */ // This is where the actual source of your React stuff should live
13
- // Note, if you add an export here, also add one in src-server/main.ts
14
- const $c9c4d066f9a5b51b$export$83d89fbfd8236492 = "1.5.3";
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
- const $42858f023ef23dab$export$8e769ad4338a911e = {
27
- usedLocale: (0, $TZSbU$createSignal)((0, $TZSbU$defaultLocale)),
28
- search_instances: new Map(),
29
- category_instances: new Map(),
30
- api: null,
31
- dpc: null,
32
- merchant: (0, $TZSbU$createSignal)(),
33
- market: (0, $TZSbU$createSignal)(),
34
- userId: (0, $TZSbU$createSignal)(),
35
- sessionId: (0, $TZSbU$createSignal)(),
36
- known_category_paths: new Set(),
37
- search_page_path_: (0, $TZSbU$createSignal)(),
38
- search_page_in_dom: (0, $TZSbU$createSignal)(false),
39
- category_page_in_dom: (0, $TZSbU$createSignal)(false),
40
- provider_is_updating: (0, $TZSbU$createSignal)(false)
41
- };
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
- class $d5c9e1f3545b4984$export$d0f82e3ef89b1f22 extends (0, $TZSbU$Component) {
52
- constructor(props){
53
- super(props);
54
- this.state = {
55
- hasError: false
56
- };
57
- }
58
- static getDerivedStateFromError() {
59
- // Update state so the next render will show the fallback UI.
60
- return {
61
- hasError: true
62
- };
63
- }
64
- componentDidCatch(error) {
65
- this.props.on_error(error);
66
- }
67
- render() {
68
- if (this.state.hasError) // You can render any custom fallback UI
69
- return (0, $TZSbU$createElement)("div", {
70
- children: "Component failed"
71
- });
72
- return this.props.children;
73
- }
74
- }
75
-
76
-
77
-
78
- let $c83ba9ab79386687$var$run_on_href_change;
79
- let $c83ba9ab79386687$var$old_href = location.href;
80
- function $c83ba9ab79386687$export$74f3924c5027fe1d(cb) {
81
- $c83ba9ab79386687$var$run_on_href_change = cb;
82
- }
83
- (0, $TZSbU$instant_exec_on_suspect_history_change).add((0, $TZSbU$catchify)(()=>{
84
- const { href: href } = location;
85
- if ($c83ba9ab79386687$var$run_on_href_change && $c83ba9ab79386687$var$old_href !== href) $c83ba9ab79386687$var$run_on_href_change(href);
86
- $c83ba9ab79386687$var$old_href = href;
87
- }));
88
- const $c83ba9ab79386687$export$775e6b3892b5ad52 = (url = location)=>url.pathname == (0, $TZSbU$untrack)((0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_path_[0]); // might have changed therefore get it from globalState
89
- const $c83ba9ab79386687$export$30c8a12df09be0e4 = (url = location)=>(0, $42858f023ef23dab$export$8e769ad4338a911e).known_category_paths.has(url.pathname);
90
- function $c83ba9ab79386687$export$f6e64e17bd69eeef({ solid_component: solid_component, props: props, wrapper_type: wrapper_type = "div", wrapper_style: wrapper_style = {}, hydrate_function_when_ssr: hydrate_function_when_ssr }) {
91
- const [portals, set_portals] = (0, $TZSbU$useState)([]);
92
- const wrapper_element_ref = (0, $TZSbU$useRef)();
93
- const [[store, write_store]] = (0, $TZSbU$useState)(()=>(0, $TZSbU$createStore)(props));
94
- // Update store when props change
95
- write_store((0, $TZSbU$reconcile)(props));
96
- (0, $TZSbU$useEffect)(()=>{
97
- const wrapper_element = wrapper_element_ref.current;
98
- // 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
99
- // This can happen for HMR or when SSR capable components are only rendered on the client
100
- const render_function = hydrate_function_when_ssr && wrapper_element.childNodes.length ? hydrate_function_when_ssr : (0, $TZSbU$render);
101
- const dispose = render_function(()=>solid_component(store, set_portals), wrapper_element);
102
- return dispose;
103
- }, []);
104
- return (0, $TZSbU$createElement)((0, $TZSbU$Fragment), null, (0, $TZSbU$createElement)(wrapper_type, {
105
- ref: wrapper_element_ref,
106
- style: wrapper_style,
107
- ...hydrate_function_when_ssr ? {
108
- // We need this because on the server we put the solid SSR rendered string into html but it won't match on the client, luckily we can just suppress it
109
- suppressHydrationWarning: true,
110
- dangerouslySetInnerHTML: {
111
- __html: ""
112
- }
113
- } : {}
114
- }), ...portals);
115
- }
116
- function $c83ba9ab79386687$export$e5139bbbb9a05035(component, is_set) {
117
- return (...args)=>{
118
- const default_is_set = (0, $TZSbU$createMemo)(()=>!!((0, $42858f023ef23dab$export$8e769ad4338a911e).merchant[0]() && (0, $42858f023ef23dab$export$8e769ad4338a911e).market[0]())); // Apparently Show re-renders kids otherwise even if the falsiness of the condition doesn't change
119
- const should_show = (0, $TZSbU$createMemo)((prev)=>{
120
- if (!prev && (0, $42858f023ef23dab$export$8e769ad4338a911e).provider_is_updating[0]()) // If we weren't showing the component and the DepictProvider is currently updating, wait for it to have finished updating before showing the component
121
- // Otherwise as soon as tenant and market is set we render the CategoryPage, but we might not have a DepictCategory yet, see https://depictaiworkspace.slack.com/archives/C04UZ2Z0RNE/p1690895918347289?thread_ts=1688391305.529449&cid=C04UZ2Z0RNE
122
- return false;
123
- return (is_set || default_is_set)();
124
- });
125
- // @ts-ignore
126
- return (0, $TZSbU$createComponent)((0, $TZSbU$Show), {
127
- get when () {
128
- return should_show();
129
- },
130
- get children () {
131
- return component(...args);
132
- }
133
- });
134
- };
135
- }
136
- async function $c83ba9ab79386687$export$79c79419c1ef0081({ display: display, component_portals: component_portals, set_portals: set_portals, react_template: react_template }) {
137
- let set_react_has_ran_hooks;
138
- let was_cleaned_up = false;
139
- const react_has_ran_hooks = new Promise((r)=>set_react_has_ran_hooks = r);
140
- const solid_container = document.createElement("div");
141
- const owner = (0, $TZSbU$getOwner)();
142
- const reactProductCard = (0, $TZSbU$jsx)((props)=>{
143
- // Sneak in a hook into their product card component to know once react has finished rendering and running hooks
144
- (0, $TZSbU$useEffect)(set_react_has_ran_hooks, []);
145
- return react_template(props);
146
- }, {
147
- display: display
148
- });
149
- const reactProductCardInErrorBoundary = (0, $TZSbU$jsx)((0, $d5c9e1f3545b4984$export$d0f82e3ef89b1f22), {
150
- children: reactProductCard,
151
- on_error: (error)=>(0, $TZSbU$runWithOwner)(owner, ()=>{
152
- 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.
153
- throw new (0, $TZSbU$ProductCardError)(error);
154
- })
155
- });
156
- const portal = $TZSbU$createPortal(reactProductCardInErrorBoundary, solid_container);
157
- component_portals.add(portal);
158
- set_portals([
159
- ...component_portals
160
- ]);
161
- (0, $TZSbU$onCleanup)(()=>{
162
- was_cleaned_up = true;
163
- // 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
164
- component_portals.delete(portal);
165
- // Updating i.e. the merchant will cause a setState call while rendering the DepictProvider component which is illegal because it usually infinite loops react apps. In our case it doesn't though, so we just evade detection by doing it a microtask later. See also https://github.com/facebook/react/issues/18178#issuecomment-595846312
166
- queueMicrotask(()=>set_portals([
167
- ...component_portals
168
- ]));
169
- });
170
- await react_has_ran_hooks; // After react has created elements it still takes some time to actually connect the refs and run the hooks. We don't want to replace placeholders before then.
171
- return [
172
- solid_container
173
- ];
174
- }
175
-
176
-
177
-
178
-
179
- let $8071251ee4e9ffa1$var$set = false;
180
- let $8071251ee4e9ffa1$var$padding_animation;
181
- function $8071251ee4e9ffa1$export$6453cbc34515a94d() {
182
- const are_on_search_or_category_page = ()=>(0, $c83ba9ab79386687$export$775e6b3892b5ad52)() || (0, $c83ba9ab79386687$export$30c8a12df09be0e4)();
183
- if ($8071251ee4e9ffa1$var$set) return; // Just being safe
184
- $8071251ee4e9ffa1$var$set = true;
185
- // 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)
186
- // I don't know why we'd want to initialise it with false? The only reason I can see is in the hopes of scroll restoration working on initial page load, but it basically never does due to react rendering and executing our component too late
187
- let should_use_old_scroll = true;
188
- const old_scrollTo = window.scrollTo;
189
- const next_router_event_target = $8071251ee4e9ffa1$var$make_next_router_event_target(); // So we can use once: true
190
- window.scrollTo = (...args)=>{
191
- if (should_use_old_scroll || process.env.__NEXT_SCROLL_RESTORATION || !are_on_search_or_category_page() || history.scrollRestoration === "manual" // I.e. Chimi has manual scroll restoration that we don't want to block https://depictaiworkspace.slack.com/archives/C058KQ3MU8Z/p1686658007164019?thread_ts=1686134246.109689&cid=C058KQ3MU8Z
192
- ) return Reflect.apply(old_scrollTo, window, args);
193
- else should_use_old_scroll = true;
194
- };
195
- // 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
196
- addEventListener("popstate", (0, $TZSbU$catchify)(()=>{
197
- if (!are_on_search_or_category_page()) {
198
- $8071251ee4e9ffa1$var$removeLotsOfPadding(); // Just making sure
199
- return;
200
- }
201
- should_use_old_scroll = false;
202
- const [get_search_page_in_dom] = (0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_in_dom;
203
- const [get_category_page_in_dom] = (0, $42858f023ef23dab$export$8e769ad4338a911e).category_page_in_dom;
204
- const search_page_in_dom = (0, $TZSbU$untrack)(get_search_page_in_dom);
205
- const category_page_in_dom = (0, $TZSbU$untrack)(get_category_page_in_dom);
206
- const new_is_search = (0, $c83ba9ab79386687$export$775e6b3892b5ad52)();
207
- const new_is_category = (0, $c83ba9ab79386687$export$30c8a12df09be0e4)();
208
- let accessor_to_wait_for;
209
- if (search_page_in_dom && new_is_search || category_page_in_dom && new_is_category) {
210
- // Already on the page we're going to
211
- $8071251ee4e9ffa1$var$removeLotsOfPadding();
212
- return;
213
- }
214
- $8071251ee4e9ffa1$var$addLotsOfPadding();
215
- if (new_is_search && category_page_in_dom) accessor_to_wait_for = get_search_page_in_dom;
216
- else if (new_is_category && search_page_in_dom) accessor_to_wait_for = get_category_page_in_dom;
217
- else accessor_to_wait_for = new_is_search ? get_search_page_in_dom : get_category_page_in_dom;
218
- (0, $TZSbU$createRoot)((dispose)=>(0, $TZSbU$createEffect)(()=>{
219
- if (accessor_to_wait_for()) {
220
- $8071251ee4e9ffa1$var$removeLotsOfPadding();
221
- dispose();
222
- }
223
- }));
224
- }));
225
- window?.next?.router?.events?.on(// 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
226
- "routeChangeStart", (0, $TZSbU$catchify)(()=>{
227
- // this is for when we navigate to a new page (replaceState or pushState)
228
- // We need to ensure that the page doesn't get shorter before the new history entry has been pushed
229
- // 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
230
- // The challenge is knowing on routeChangeStart if we're in a popstate (back/forward) or a pushState/replaceState
231
- // We use the deprecated window.event property for that
232
- // This is catchified, so we should see in sentry when it starts failing if browsers ever remove it???
233
- if (window.event instanceof PopStateEvent) return;
234
- $8071251ee4e9ffa1$var$addLotsOfPadding();
235
- next_router_event_target.addEventListener("beforeHistoryChange", (0, $TZSbU$catchify)(()=>(0, $TZSbU$queueMacroTask)($8071251ee4e9ffa1$var$removeLotsOfPadding)), {
236
- once: true
237
- });
238
- }));
239
- }
240
- /*
241
- Here we want to be able to add padding that *definitely* gets applied and then be able to revert precisely to what was before.
242
- The best way to achieve this is using an animation that with the fill set to none. This is because animations have the absolute highest precedence in CSS, even higher than !important. Then, to revert to the old padding, we just play the animation which is 1ms long so, it immediately finishes and whatever was defined before takes precedence again.
243
- */ function $8071251ee4e9ffa1$var$addLotsOfPadding() {
244
- if ($8071251ee4e9ffa1$var$padding_animation) return; // We're already showing a bunch of padding
245
- $8071251ee4e9ffa1$var$padding_animation = document.body.animate({
246
- paddingBottom: (history.state?.search_scroll_restoration_data?.[0]?.min_results_loaded || 150) * 500 + "px",
247
- offset: 0
248
- }, 1);
249
- $8071251ee4e9ffa1$var$padding_animation.pause();
250
- }
251
- function $8071251ee4e9ffa1$var$removeLotsOfPadding() {
252
- if ($8071251ee4e9ffa1$var$padding_animation) {
253
- $8071251ee4e9ffa1$var$padding_animation.play();
254
- $8071251ee4e9ffa1$var$padding_animation = undefined;
255
- }
256
- }
257
- function $8071251ee4e9ffa1$var$make_next_router_event_target() {
258
- const next_router_event_target = new EventTarget();
259
- window?.next?.router?.events?.on("beforeHistoryChange", ()=>next_router_event_target.dispatchEvent(new CustomEvent("beforeHistoryChange")));
260
- return next_router_event_target;
261
- }
262
-
263
-
264
-
265
-
266
- const $7216ca4c8308a0f9$export$599d4515591ef232 = (relativeUrl, isReplace, scroll)=>{
267
- let Page;
268
- (function(Page) {
269
- Page[Page["OTHER"] = 0] = "OTHER";
270
- Page[Page["SEARCH"] = 1] = "SEARCH";
271
- Page[Page["CATEGORY"] = 2] = "CATEGORY";
272
- })(Page || (Page = {}));
273
- const current_page = (0, $c83ba9ab79386687$export$775e6b3892b5ad52)() ? Page.SEARCH : (0, $c83ba9ab79386687$export$30c8a12df09be0e4)() ? Page.CATEGORY : Page.OTHER;
274
- const target_u_o = new URL(relativeUrl, location.origin);
275
- const target_page = (0, $c83ba9ab79386687$export$775e6b3892b5ad52)(target_u_o) ? Page.SEARCH : (0, $c83ba9ab79386687$export$30c8a12df09be0e4)(target_u_o) ? Page.CATEGORY : Page.OTHER;
276
- window.next.router[isReplace ? "replace" : "push"](relativeUrl, undefined, {
277
- shallow: current_page === target_page && target_page !== Page.OTHER,
278
- scroll: // Can't go shallowly to other pages
279
- scroll
280
- });
281
- };
282
-
283
-
284
-
285
-
286
- const $a00d8f27abd5d0b0$export$38b98fae14bd1f64 = ()=>{
287
- if (!(0, $42858f023ef23dab$export$8e769ad4338a911e).dpc) throw new Error("Depict tracking is not configured. Wrap your app in a DepictProvider.");
288
- return {
289
- dpc: (0, $42858f023ef23dab$export$8e769ad4338a911e).dpc
290
- };
291
- };
292
- const $a00d8f27abd5d0b0$export$47e064413edabf36 = (merchant, market, userId, sessionId)=>{
293
- if (!merchant) return;
294
- try {
295
- let { dpc: dpc } = (0, $42858f023ef23dab$export$8e769ad4338a911e);
296
- if (!dpc) dpc = (0, $42858f023ef23dab$export$8e769ad4338a911e).dpc = new (0, $TZSbU$DPC)(merchant, {
297
- market: market
298
- });
299
- dpc.merchant = merchant;
300
- dpc.market = market;
301
- dpc.setUserId(userId);
302
- dpc.setSessionId(sessionId);
303
- } catch (e) {
304
- // Make sure to not break the users app if we throw
305
- queueMicrotask(()=>{
306
- throw e;
307
- });
308
- }
309
- };
310
-
311
-
312
-
313
-
314
-
315
- function $80202ccbe2ade418$export$bae2769a30719c48(disposable, stateKey) {
316
- const actual_function = (dispose)=>{
317
- const { usedLocale: [get_locale], merchant: [get_merchant], market: [get_market], search_query_url_param_name: search_query_url_param_name, search_page_path_: [get_search_page_path] } = (0, $42858f023ef23dab$export$8e769ad4338a911e);
318
- const instance = new (0, $TZSbU$DepictSearch)({
319
- api: (0, $42858f023ef23dab$export$8e769ad4338a911e).api,
320
- search_query_url_param_name: search_query_url_param_name,
321
- market: (0, $TZSbU$untrack)(get_market),
322
- // TODO: check if we can do this
323
- merchant: (0, $TZSbU$untrack)(get_merchant),
324
- enable_category_suggestions: (0, $42858f023ef23dab$export$8e769ad4338a911e).enableCategorySuggestions ?? false,
325
- // default category suggestions to false for @depict-ai/react-ui (https://linear.app/depictai/issue/FRO-401/default-enablecategorysuggestions-to-false)
326
- localization: (0, $TZSbU$untrack)(get_locale),
327
- url_transformer: (url)=>url.pathname = (0, $TZSbU$untrack)(get_search_page_path),
328
- on_navigation: (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation,
329
- unique_instance_key_for_state: stateKey
330
- });
331
- (0, $TZSbU$createComputed)(()=>{
332
- const new_merchant = get_merchant();
333
- if (new_merchant) instance.merchant = new_merchant;
334
- });
335
- (0, $TZSbU$createComputed)(()=>{
336
- const new_market = get_market();
337
- if (new_market) instance.market = new_market;
338
- });
339
- (0, $TZSbU$createComputed)(()=>instance.localization = get_locale());
340
- return {
341
- instance: instance,
342
- dispose: dispose,
343
- users: 0
344
- };
345
- };
346
- const function_length_0 = ()=>actual_function();
347
- const function_length_1 = (dispose)=>actual_function(dispose);
348
- return (0, $TZSbU$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
349
- }
350
-
351
-
352
-
353
-
354
-
355
- function $9145bcf81a0216ce$export$248b95d5073d5bab(disposable, stateKey) {
356
- const actual_function = (dispose)=>{
357
- const { usedLocale: [get_locale], merchant: [get_merchant], market: [get_market] } = (0, $42858f023ef23dab$export$8e769ad4338a911e);
358
- const instance = new (0, $TZSbU$DepictCategory)({
359
- api: (0, $42858f023ef23dab$export$8e769ad4338a911e).api,
360
- market: (0, $TZSbU$untrack)(get_market),
361
- // TODO: check if we can do this
362
- merchant: (0, $TZSbU$untrack)(get_merchant),
363
- localization: (0, $TZSbU$untrack)(get_locale),
364
- on_navigation: (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation,
365
- unique_instance_key_for_state: stateKey
366
- });
367
- (0, $TZSbU$createComputed)(()=>{
368
- const new_merchant = get_merchant();
369
- if (new_merchant) instance.merchant = new_merchant;
370
- });
371
- (0, $TZSbU$createComputed)(()=>{
372
- const new_market = get_market();
373
- if (new_market) instance.market = new_market;
374
- });
375
- (0, $TZSbU$createComputed)(()=>instance.localization = get_locale());
376
- return {
377
- instance: instance,
378
- dispose: dispose,
379
- users: 0
380
- };
381
- };
382
- const function_length_0 = ()=>actual_function();
383
- const function_length_1 = (dispose)=>actual_function(dispose);
384
- return (0, $TZSbU$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
385
- }
386
-
387
-
388
- let $5376eb2a386cd90d$var$provider_instances = 0;
389
- function $5376eb2a386cd90d$export$9fac37a9c21c2f3b(props) {
390
- (0, $42858f023ef23dab$export$8e769ad4338a911e).provider_is_updating[1](true);
391
- try {
392
- return $5376eb2a386cd90d$var$ActualDepictProvider(props);
393
- } finally{
394
- (0, $42858f023ef23dab$export$8e769ad4338a911e).provider_is_updating[1](false);
395
- }
396
- }
397
- function $5376eb2a386cd90d$var$ActualDepictProvider(props) {
398
- const { children: children, navigateFunction: navigateFunction, market: market, merchant: merchant, locale: locale, metaData: metaData, userId: userId, sessionId: sessionId } = props;
399
- const usedLocale = locale ?? (0, $TZSbU$defaultLocale);
400
- const { searchPagePath: searchPagePath, urlParamName: urlParamName, enableCategorySuggestions: enableCategorySuggestions } = props.search ?? {};
401
- $5376eb2a386cd90d$var$multiple_depictprovider_guard();
402
- // Will run on other prop changes, but harmless
403
- (0, $42858f023ef23dab$export$8e769ad4338a911e).userId[1](userId);
404
- (0, $42858f023ef23dab$export$8e769ad4338a911e).sessionId[1](sessionId);
405
- (0, $42858f023ef23dab$export$8e769ad4338a911e).usedLocale[1](usedLocale);
406
- (0, $42858f023ef23dab$export$8e769ad4338a911e).metaData = metaData;
407
- (0, $42858f023ef23dab$export$8e769ad4338a911e).search_query_url_param_name = urlParamName;
408
- (0, $42858f023ef23dab$export$8e769ad4338a911e).enableCategorySuggestions = enableCategorySuggestions;
409
- (0, $a00d8f27abd5d0b0$export$47e064413edabf36)(merchant, market, userId, sessionId);
410
- if (!market || !merchant) return (0, $TZSbU$createElement)((0, $TZSbU$Fragment), null, children);
411
- (0, $42858f023ef23dab$export$8e769ad4338a911e).market[1](market);
412
- (0, $42858f023ef23dab$export$8e769ad4338a911e).merchant[1](merchant);
413
- (0, $8071251ee4e9ffa1$export$6453cbc34515a94d)();
414
- try {
415
- const { search_instances: search_instances, category_instances: category_instances, api: api, search_page_path_: [, set_search_page_path] } = (0, $42858f023ef23dab$export$8e769ad4338a911e);
416
- if (typeof window?.next?.router === "undefined" && !navigateFunction) throw new Error("You must provide a navigateFunction when not using Next.js.");
417
- const on_navigation = ({ is_replace: is_replace, new_url: new_url, scroll: scroll })=>{
418
- const new_relative_url = new_url.origin === location.origin ? new_url.pathname + new_url.search + new_url.hash : new_url.href; // bail out of making URL relative if it's not possible
419
- if (navigateFunction) navigateFunction(new_relative_url, {
420
- replace: is_replace,
421
- scroll: scroll
422
- });
423
- else (0, $7216ca4c8308a0f9$export$599d4515591ef232)(new_relative_url, is_replace, scroll);
424
- };
425
- (0, $42858f023ef23dab$export$8e769ad4338a911e).on_navigation = on_navigation;
426
- if (!api) (0, $42858f023ef23dab$export$8e769ad4338a911e).api = new (0, $TZSbU$DepictAPI)({
427
- get_metadata: async ()=>(0, $42858f023ef23dab$export$8e769ad4338a911e).metaData,
428
- get_user_id: ()=>(0, $TZSbU$untrack)((0, $42858f023ef23dab$export$8e769ad4338a911e).userId[0]),
429
- get_session_id: ()=>(0, $TZSbU$untrack)((0, $42858f023ef23dab$export$8e769ad4338a911e).sessionId[0])
430
- });
431
- (0, $42858f023ef23dab$export$8e769ad4338a911e).api.page_url_creator = props.pageURLCreator;
432
- if (searchPagePath) set_search_page_path($5376eb2a386cd90d$var$ensure_correct_formatting(searchPagePath));
433
- if (!search_instances.get(undefined)) {
434
- // 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.
435
- // Also, it emulates the behavior pre-supporting multiple "depict blocks" on the same page
436
- const instance = (0, $80202ccbe2ade418$export$bae2769a30719c48)(false);
437
- search_instances.set(undefined, instance);
438
- }
439
- if (!category_instances.get(undefined)) {
440
- const instance = (0, $9145bcf81a0216ce$export$248b95d5073d5bab)(false);
441
- category_instances.set(undefined, instance);
442
- }
443
- } catch (e) {
444
- // Make sure to not break the users app if we throw
445
- queueMicrotask(()=>{
446
- throw e;
447
- });
448
- }
449
- return (0, $TZSbU$createElement)((0, $TZSbU$Fragment), null, children);
450
- }
451
- function $5376eb2a386cd90d$var$ensure_correct_formatting(path) {
452
- // Make sure the path starts with a slash as it always will and is_page will fail otherwise
453
- if (!path.startsWith("/")) return "/" + path;
454
- return path;
455
- }
456
- function $5376eb2a386cd90d$var$multiple_depictprovider_guard() {
457
- (0, $TZSbU$useEffect)(()=>{
458
- $5376eb2a386cd90d$var$provider_instances++;
459
- if ($5376eb2a386cd90d$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.");
460
- return ()=>{
461
- $5376eb2a386cd90d$var$provider_instances--;
462
- };
463
- }, []);
464
- }
465
-
466
-
467
-
468
- const $421f32789b6f111f$export$80e99ee6b29cadd2 = /*#__PURE__*/ (0, $TZSbU$forwardRef)((_, ref)=>{
469
- return /*#__PURE__*/ (0, $TZSbU$createElement)("div", {
470
- className: "depict aligner",
471
- style: {
472
- height: "100%"
473
- },
474
- ref: ref
475
- });
476
- });
477
-
478
-
479
-
480
-
481
-
482
-
483
-
484
-
485
-
486
-
487
-
488
- function $99489374cd4f601d$export$f4d89133c6985668(type, stateKey, componentName) {
489
- const instances = (0, $42858f023ef23dab$export$8e769ad4338a911e)[type + "_instances"];
490
- if (!instances.get(undefined)) throw Error(`${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.`);
491
- let instance = instances.get(stateKey);
492
- if (!instance) {
493
- instance = type === "search" ? (0, $80202ccbe2ade418$export$bae2769a30719c48)(true, stateKey) : (0, $9145bcf81a0216ce$export$248b95d5073d5bab)(true, stateKey);
494
- instances.set(stateKey, instance);
495
- }
496
- instance.users++;
497
- (0, $TZSbU$onCleanup)(()=>{
498
- instance.users--;
499
- if (!instance.users && instance?.dispose) {
500
- // main instance is not disposable, and shouldn't be deletable either
501
- instance.dispose();
502
- instances.delete(stateKey);
503
- }
504
- });
505
- return instance.instance;
506
- }
507
-
508
-
509
- const $4a678f0c87b12e78$var$rendered_components_with_state_key = new Set();
510
- function $4a678f0c87b12e78$export$a54ec244c8863715(props) {
511
- return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
512
- solid_component: (0, $c83ba9ab79386687$export$e5139bbbb9a05035)($4a678f0c87b12e78$var$SolidSearchPage),
513
- props: props
514
- });
515
- }
516
- function $4a678f0c87b12e78$var$SolidSearchPage(props, set_portals) {
517
- const depict_search = (0, $TZSbU$createMemo)(()=>{
518
- const instance = (0, $99489374cd4f601d$export$f4d89133c6985668)("search", props.stateKey, "SearchPage");
519
- (0, $TZSbU$onCleanup)(()=>{
520
- // Make sure we don't block the search query updating signal when we switch to a new provider instance
521
- (0, $TZSbU$get_search_query_updating_blocked_signal)(instance)?.[1](false);
522
- });
523
- return instance;
524
- });
525
- const update_updating_blocked_signal = ()=>{
526
- // if search instances changes, also re-check for good measure (otherwise would have untrack around depict_search)
527
- const signal = (0, $TZSbU$get_search_query_updating_blocked_signal)(depict_search());
528
- if (!signal) throw Error("No search_query_updating_blocked_signal when rendering SearchPage");
529
- const [, write_signal] = signal;
530
- // This causes a bug. To reproduce:
531
- // 1. Go to front page
532
- // 2. Make a search
533
- // 3. Press back button
534
- // 4. Open search modal
535
- // 5. Check the list of previous queries - the query just made isn't shown
536
- // 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
537
- // 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
538
- // EDIT: now that we're resetting this in the onCleanup of the memo above this might no longer be the case
539
- write_signal(!(0, $c83ba9ab79386687$export$775e6b3892b5ad52)(location));
540
- };
541
- const [, set_search_page_in_dom] = (0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_in_dom;
542
- const component_portals = new Set();
543
- // We should only get here once react already has a DOM node which means we should be in the DOM
544
- set_search_page_in_dom(true);
545
- (0, $TZSbU$onCleanup)(()=>set_search_page_in_dom(false));
546
- // 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
547
- (0, $c83ba9ab79386687$export$74f3924c5027fe1d)(update_updating_blocked_signal); // if we navigate, re-check
548
- (0, $TZSbU$createComputed)(()=>{
549
- (0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_path_[0](); // if react defined path changes, re-check
550
- update_updating_blocked_signal();
551
- });
552
- $4a678f0c87b12e78$var$search_page_path_checker();
553
- return (0, $TZSbU$createMemo)(()=>{
554
- const stateKey = (0, $TZSbU$untrack)(()=>props.stateKey);
555
- if ($4a678f0c87b12e78$var$rendered_components_with_state_key.has(stateKey)) throw new Error(`You have multiple SearchPage components with the same stateKey: ${stateKey}. Each SearchPage component must have a unique stateKey.`);
556
- $4a678f0c87b12e78$var$rendered_components_with_state_key.add(stateKey);
557
- (0, $TZSbU$onCleanup)(()=>$4a678f0c87b12e78$var$rendered_components_with_state_key.delete(stateKey));
558
- return (0, $TZSbU$SearchPage)({
559
- // Default config goes here
560
- get include_input_field () {
561
- return props.includeInputField;
562
- },
563
- get cols_at_size () {
564
- return props.columnsAtSize ?? (0, $TZSbU$defaultColsAtSize);
565
- },
566
- get grid_spacing () {
567
- return props.gridSpacing ?? (0, $TZSbU$defaultGridSpacing);
568
- },
569
- depict_search: depict_search(),
570
- product_card_template: (display)=>(0, $c83ba9ab79386687$export$79c79419c1ef0081)({
571
- display: display,
572
- react_template: (0, $TZSbU$untrack)(()=>props.productCard),
573
- component_portals: component_portals,
574
- set_portals: set_portals
575
- })
576
- });
577
- });
578
- }
579
- /**
580
- * Users often set the searchPagePath to something without the market which breaks everything using the searchPagePath internally, notably refining the search query. Add a warning for them.
581
- */ function $4a678f0c87b12e78$var$search_page_path_checker() {
582
- let has_warned = false;
583
- (0, $TZSbU$createEffect)(()=>{
584
- if (has_warned) return;
585
- const should_be_path = (0, $42858f023ef23dab$export$8e769ad4338a911e).search_page_path_[0]();
586
- const { pathname: pathname } = location;
587
- if (// allow some variability just to be sure
588
- should_be_path !== pathname && should_be_path + "/" !== pathname && should_be_path !== pathname + "/") {
589
- (0, $TZSbU$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.");
590
- has_warned = true;
591
- }
592
- });
593
- }
594
-
595
-
596
-
597
-
598
-
599
-
600
-
601
- const $48d7f568740a317d$var$rendered_components_with_state_key = new Set();
602
- function $48d7f568740a317d$export$f7d2f673fc2f091d(props) {
603
- return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
604
- // @ts-ignore
605
- solid_component: (0, $c83ba9ab79386687$export$e5139bbbb9a05035)($48d7f568740a317d$var$SolidCategoryPage),
606
- props: props,
607
- wrapper_type: "div",
608
- wrapper_style: {}
609
- });
610
- }
611
- function $48d7f568740a317d$var$SolidCategoryPage(props, set_portals) {
612
- const depict_category = (0, $TZSbU$createMemo)(()=>(0, $99489374cd4f601d$export$f4d89133c6985668)("category", props.stateKey, "CategoryPage") // stateKey can change
613
- );
614
- const [category_state_set, set_category_state_set] = (0, $TZSbU$createSignal)(false);
615
- const component_portals = new Set();
616
- const [, set_category_page_in_dom] = (0, $42858f023ef23dab$export$8e769ad4338a911e).category_page_in_dom;
617
- // We should only get here once react already has a DOM node which means we should be in the DOM
618
- set_category_page_in_dom(true);
619
- (0, $TZSbU$onCleanup)(()=>set_category_page_in_dom(false));
620
- (0, $TZSbU$createComputed)(()=>{
621
- const { categoryId: categoryId } = props;
622
- depict_category().category_id = categoryId;
623
- if (categoryId) {
624
- set_category_state_set(true);
625
- (0, $42858f023ef23dab$export$8e769ad4338a911e).known_category_paths.add(location.pathname);
626
- }
627
- });
628
- (0, $TZSbU$createComputed)(()=>depict_category().listing_type = props.listingType);
629
- const category = ()=>(0, $TZSbU$createMemo)(()=>{
630
- const stateKey = (0, $TZSbU$untrack)(()=>props.stateKey);
631
- if ($48d7f568740a317d$var$rendered_components_with_state_key.has(stateKey)) throw new Error(`You have multiple CategoryPage components with the same stateKey: ${stateKey}. Each CategoryPage component must have a unique stateKey.`);
632
- $48d7f568740a317d$var$rendered_components_with_state_key.add(stateKey);
633
- (0, $TZSbU$onCleanup)(()=>$48d7f568740a317d$var$rendered_components_with_state_key.delete(stateKey));
634
- return (0, $TZSbU$CategoryPage)({
635
- depict_category: depict_category(),
636
- get cols_at_size () {
637
- return props.columnsAtSize ?? (0, $TZSbU$defaultColsAtSize);
638
- },
639
- get grid_spacing () {
640
- return props.gridSpacing ?? (0, $TZSbU$defaultGridSpacing);
641
- },
642
- category_title: (0, $TZSbU$untrack)(()=>props.categoryTitlePlugin) || (0, $TZSbU$defaultCategoryTitlePlugin),
643
- get show_breadcrumbs () {
644
- return props.showBreadcrumbs;
645
- },
646
- get show_quicklinks () {
647
- return props.showQuicklinks;
648
- },
649
- product_card_template: (display)=>(0, $c83ba9ab79386687$export$79c79419c1ef0081)({
650
- display: display,
651
- react_template: (0, $TZSbU$untrack)(()=>props.productCard),
652
- component_portals: component_portals,
653
- set_portals: set_portals
654
- })
655
- });
656
- });
657
- return (0, $c83ba9ab79386687$export$e5139bbbb9a05035)(category, category_state_set);
658
- }
659
-
660
-
661
-
662
-
663
-
664
-
665
- function $f866f7ed9f751af4$export$5646050d516e06bc(react_props) {
666
- return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
667
- solid_component: (0, $c83ba9ab79386687$export$e5139bbbb9a05035)($f866f7ed9f751af4$var$vanilla_breadcrumbs),
668
- props: react_props
669
- });
670
- }
671
- function $f866f7ed9f751af4$var$vanilla_breadcrumbs(props) {
672
- // memo so stateKey can be dynamically changed
673
- return (0, $TZSbU$createMemo)(()=>{
674
- const depict_category = (0, $99489374cd4f601d$export$f4d89133c6985668)("category", props.stateKey, "BreadCrumbs");
675
- return (0, $TZSbU$BreadCrumbs)({
676
- depict_category: depict_category
677
- });
678
- });
679
- }
680
-
681
-
682
-
683
-
684
-
685
-
686
- function $b68a14248b7ef667$export$466cdc317043f6cb(react_props = {}) {
687
- return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
688
- solid_component: (0, $c83ba9ab79386687$export$e5139bbbb9a05035)($b68a14248b7ef667$var$vanilla_quick_links),
689
- props: react_props
690
- });
691
- }
692
- function $b68a14248b7ef667$var$vanilla_quick_links(props) {
693
- // memo so stateKey can be dynamically changed
694
- return (0, $TZSbU$createMemo)(()=>{
695
- const depict_category = (0, $99489374cd4f601d$export$f4d89133c6985668)("category", props.stateKey, "QuickLinks");
696
- return (0, $TZSbU$QuickLinks)({
697
- depict_category: depict_category
698
- });
699
- });
700
- }
701
-
702
-
703
-
704
-
705
-
706
- const $f446a84f85ba06f6$export$3f37af283f8fb843 = (raw_react_props)=>{
707
- const react_props = {
708
- class: raw_react_props.className,
709
- ...raw_react_props
710
- };
711
- return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
712
- solid_component: (props_store)=>(0, $TZSbU$ImagePlaceholder)(props_store),
713
- props: react_props,
714
- wrapper_type: "span",
715
- hydrate_function_when_ssr: (0, $TZSbU$hydrate)
716
- });
717
- };
718
-
719
-
720
-
721
-
722
-
723
- const $cbd250061abf11cb$export$89c6019e4baa40b1 = (raw_react_props)=>{
724
- const react_props = {
725
- class: raw_react_props.className,
726
- ...raw_react_props
727
- };
728
- return (0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
729
- solid_component: (props_store)=>(0, $TZSbU$TextPlaceholder)(props_store),
730
- props: react_props,
731
- wrapper_type: "span",
732
- hydrate_function_when_ssr: (0, $TZSbU$hydrate),
733
- wrapper_style: {
734
- "height": "100%"
735
- }
736
- });
737
- };
738
-
739
-
740
-
741
-
742
-
743
-
744
-
745
-
746
-
747
- const $41cab674edff4277$export$d69d8daa20eae175 = (createOpenModalParams)=>{
748
- const { location: location = "centered", alignerRef: alignerRef, stateKey: stateKey } = createOpenModalParams;
749
- let [deduped_variable, set_deduped_variable] = (0, $TZSbU$useState)();
750
- // When component using this hook unmounts, "untrack" our component and dispose the search instance if needed
751
- (0, $TZSbU$useEffect)(()=>deduped_variable?.[1]?.(), []);
752
- const openModal = ()=>{
753
- // Get the search instance and track this component, but only once (basically work around re-rendering)
754
- // We have to do this in the openModal function since people might call this hook before creating DepictProvider
755
- if (!deduped_variable) {
756
- deduped_variable = (0, $TZSbU$createRoot)((dispose)=>[
757
- (0, $99489374cd4f601d$export$f4d89133c6985668)("search", stateKey, "useSearchModal"),
758
- dispose
759
- ]);
760
- set_deduped_variable(deduped_variable);
761
- }
762
- const [search] = deduped_variable;
763
- if (location === "aligned" && alignerRef?.current) (0, $TZSbU$open_modal_with_alignment)({
764
- "element": alignerRef.current,
765
- "location": location,
766
- "search": search
767
- });
768
- else (0, $TZSbU$open_modal_with_alignment)({
769
- "location": "centered",
770
- "search": search
771
- });
772
- };
773
- return openModal;
774
- };
775
-
776
-
777
- function $70344e5e0d0fea06$export$912994940e660d32(params = {}) {
778
- const open = (0, $41cab674edff4277$export$d69d8daa20eae175)({
779
- globalState: $42858f023ef23dab$export$8e769ad4338a911e,
780
- ...params
781
- });
782
- return {
783
- open: open
784
- };
785
- }
786
-
787
-
788
-
789
-
790
-
791
-
792
-
793
- const $2b886cf548a4775c$export$9bb30bbe003b82e0 = (props = {})=>{
794
- // 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.
795
- // Create signal that persists across renders
796
- const [[get_aligner_signal_value, set_aligner_signal_value]] = (0, $TZSbU$useState)((0, $TZSbU$createSignal)());
797
- // Update signal value when alignerRef changes
798
- set_aligner_signal_value(props?.alignerRef);
799
- // Make sure react never re-renders the actual SearchField component
800
- const componentFunction = (0, $TZSbU$useCallback)(()=>(0, $c83ba9ab79386687$export$f6e64e17bd69eeef)({
801
- solid_component: (0, $c83ba9ab79386687$export$e5139bbbb9a05035)(()=>{
802
- return (0, $TZSbU$createMemo)(()=>{
803
- const depict_search = (0, $99489374cd4f601d$export$f4d89133c6985668)("search", props.stateKey, "useSearchField");
804
- return (0, $TZSbU$SearchField)({
805
- depict_search: depict_search,
806
- get aligner_ref () {
807
- // React mutates the object at some random time so only get the current value once it actually is requested
808
- return get_aligner_signal_value()?.current;
809
- }
810
- });
811
- });
812
- }),
813
- props: {}
814
- }), []);
815
- return {
816
- SearchField: componentFunction
817
- };
818
- };
819
-
820
-
821
-
822
-
823
-
824
-
825
- function $1bb4271dc44722e2$export$6501da23a2770fc() {
826
- return {
827
- fetchRecommendations: $1bb4271dc44722e2$var$fetchRecommendations
828
- };
829
- }
830
- function $1bb4271dc44722e2$var$fetchRecommendations(opts) {
831
- const { merchant: [get_merchant], market: [get_market], userId: [get_userId], sessionId: [get_sessionId] } = (0, $42858f023ef23dab$export$8e769ad4338a911e);
832
- const merchant = (0, $TZSbU$untrack)(get_merchant);
833
- const market = (0, $TZSbU$untrack)(get_market);
834
- if (!merchant || !market) throw new Error("Depict recommendations are not configured. Wrap your app in a DepictProvider.");
835
- return (0, $TZSbU$fetchDepictRecommendations)({
836
- merchant: merchant,
837
- market: market,
838
- userId: (0, $TZSbU$untrack)(get_userId),
839
- sessionId: (0, $TZSbU$untrack)(get_sessionId),
840
- ...opts
841
- });
842
- }
843
-
844
-
845
-
846
-
847
-
848
-
849
- const $a92aa2beb560b8af$export$804fac5697cfbe35 = (router)=>(relativeUrl, { scroll: scroll, replace: replace })=>{
850
- let Page;
851
- (function(Page) {
852
- Page[Page["OTHER"] = 0] = "OTHER";
853
- Page[Page["SEARCH"] = 1] = "SEARCH";
854
- Page[Page["CATEGORY"] = 2] = "CATEGORY";
855
- })(Page || (Page = {}));
856
- const current_page = (0, $c83ba9ab79386687$export$775e6b3892b5ad52)() ? Page.SEARCH : (0, $c83ba9ab79386687$export$30c8a12df09be0e4)() ? Page.CATEGORY : Page.OTHER;
857
- const target_u_o = new URL(relativeUrl, location.origin);
858
- const target_page = (0, $c83ba9ab79386687$export$775e6b3892b5ad52)(target_u_o) ? Page.SEARCH : (0, $c83ba9ab79386687$export$30c8a12df09be0e4)(target_u_o) ? Page.CATEGORY : Page.OTHER;
859
- router[replace ? "replace" : "push"](relativeUrl, undefined, {
860
- shallow: current_page === target_page && target_page !== Page.OTHER,
861
- scroll: // Can't go shallowly to other pages
862
- scroll
863
- });
864
- };
865
-
866
-
867
- const $97603d19204ec48d$export$b8a61e5c71402559 = {
868
- nextRouterNavigation: $a92aa2beb560b8af$export$804fac5697cfbe35
869
- };
870
-
871
-
872
- (0, $TZSbU$add_to_version_info)("react-ui", (0, $c9c4d066f9a5b51b$export$83d89fbfd8236492));
873
-
874
-
875
- export {$b68a14248b7ef667$export$466cdc317043f6cb as QuickLinks, $f866f7ed9f751af4$export$5646050d516e06bc as BreadCrumbs, $421f32789b6f111f$export$80e99ee6b29cadd2 as ComponentAligner, $5376eb2a386cd90d$export$9fac37a9c21c2f3b as DepictProvider, $48d7f568740a317d$export$f7d2f673fc2f091d as CategoryPage, $4a678f0c87b12e78$export$a54ec244c8863715 as SearchPage, $f446a84f85ba06f6$export$3f37af283f8fb843 as ImagePlaceholder, $cbd250061abf11cb$export$89c6019e4baa40b1 as TextPlaceholder, $70344e5e0d0fea06$export$912994940e660d32 as useSearchModal, $2b886cf548a4775c$export$9bb30bbe003b82e0 as useSearchField, $1bb4271dc44722e2$export$6501da23a2770fc as useFetchRecommendations, $a00d8f27abd5d0b0$export$38b98fae14bd1f64 as usePerformanceClient, $43099132aad1ceb6$re_export$CategoryTitle as CategoryTitle, $43099132aad1ceb6$re_export$EmbeddedNumProducts as EmbeddedNumProducts, $c9c4d066f9a5b51b$export$83d89fbfd8236492 as version, $97603d19204ec48d$export$b8a61e5c71402559 as Navigation};