@simpleapps-com/augur-hooks 2.0.22 → 2.1.0

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/index.cjs CHANGED
@@ -5,70 +5,21 @@
5
5
 
6
6
 
7
7
 
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
- var _chunkH7OXSAHPcjs = require('./chunk-H7OXSAHP.cjs');
47
-
48
-
49
- var _chunkAXCNTEABcjs = require('./chunk-AXCNTEAB.cjs');
8
+ var _chunkQ5YH4HDRcjs = require('./chunk-Q5YH4HDR.cjs');
50
9
 
51
10
  // src/provider.tsx
52
11
  var _react = require('react');
53
12
  var _augurcore = require('@simpleapps-com/augur-core');
54
13
  var _jsxruntime = require('react/jsx-runtime');
55
14
  var AugurApiContext = _react.createContext.call(void 0, null);
56
- var AugurCallbacksContext = _react.createContext.call(void 0, void 0);
57
15
  var AugurAuthReactContext = _react.createContext.call(void 0, void 0);
58
16
  var AugurCacheContext = _react.createContext.call(void 0, void 0);
59
17
  var AugurOptionsContext = _react.createContext.call(void 0, null);
60
18
  var AugurSiteContext = _react.createContext.call(void 0, void 0);
61
- function AugurHooksProvider({
62
- api,
63
- callbacks,
64
- auth,
65
- cache,
66
- site,
67
- children
68
- }) {
69
- if (process.env["NODE_ENV"] === "development" && !api && !callbacks) {
19
+ function AugurHooksProvider({ api, auth, cache, site, children }) {
20
+ if (process.env["NODE_ENV"] === "development" && !api) {
70
21
  console.warn(
71
- "AugurHooksProvider: neither `api` nor `callbacks` provided. Hooks will fail at runtime unless every hook receives a queryFn override."
22
+ "AugurHooksProvider: no `api` provided. Hooks will fail at runtime unless every hook receives a queryFn override."
72
23
  );
73
24
  }
74
25
  const proxyConfig = cache ? { cache: { static: cache.static, semiStatic: cache.semiStatic } } : void 0;
@@ -77,7 +28,7 @@ function AugurHooksProvider({
77
28
  // eslint-disable-next-line react-hooks/exhaustive-deps
78
29
  [api]
79
30
  );
80
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurApiContext.Provider, { value: _nullishCoalesce(api, () => ( null)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurCallbacksContext.Provider, { value: callbacks, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurAuthReactContext.Provider, { value: auth, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurCacheContext.Provider, { value: cache, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurSiteContext.Provider, { value: site, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurOptionsContext.Provider, { value: options, children }) }) }) }) }) });
31
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurApiContext.Provider, { value: _nullishCoalesce(api, () => ( null)), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurAuthReactContext.Provider, { value: auth, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurCacheContext.Provider, { value: cache, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurSiteContext.Provider, { value: site, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AugurOptionsContext.Provider, { value: options, children }) }) }) }) });
81
32
  }
82
33
  function useAugurOptions() {
83
34
  const options = _react.useContext.call(void 0, AugurOptionsContext);
@@ -100,9 +51,6 @@ function useAugurApi() {
100
51
  }
101
52
  return api;
102
53
  }
103
- function useAugurCallbacks() {
104
- return _react.useContext.call(void 0, AugurCallbacksContext);
105
- }
106
54
  function useAugurAuth() {
107
55
  return _react.useContext.call(void 0, AugurAuthReactContext);
108
56
  }
@@ -226,121 +174,15 @@ function useFormatPrice(optionsOrLocale, legacyCurrency) {
226
174
  return { formatPrice };
227
175
  }
228
176
 
229
- // src/hooks/use-item-price.ts
177
+ // src/hooks/use-stock.ts
230
178
 
231
179
  var _reactquery = require('@tanstack/react-query');
232
180
  var _augurutils = require('@simpleapps-com/augur-utils');
233
- function useItemPrice(itemId, customerId, quantity = 1, options = {}) {
234
- const api = useAugurApiOptional();
235
- const callbacks = useAugurCallbacks();
236
- const auth = useAugurAuth();
237
- const cache = useAugurCache();
238
- const site = useAugurSite();
239
- const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _8 => _8.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _9 => _9.defaults, 'optionalAccess', _10 => _10.customerId])));
240
- const defaultOptions = _chunkH7OXSAHPcjs.getItemPriceOptions.call(void 0, api, itemId, effectiveCustomerId, quantity, cache);
241
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _11 => _11.getItemPrice]) ? () => callbacks.getItemPrice(itemId, effectiveCustomerId, quantity) : void 0)));
242
- const query = _reactquery.useQuery.call(void 0, {
243
- ...defaultOptions,
244
- ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
245
- enabled: _nullishCoalesce(options.enabled, () => ( (Boolean(itemId) && Boolean(effectiveCustomerId)))),
246
- retry: 3
247
- });
248
- const derived = _react.useMemo.call(void 0,
249
- () => _augurutils.derivePrice.call(void 0, { priceData: query.data, quantity }),
250
- [query.data, quantity]
251
- );
252
- return { ...query, derived };
253
- }
254
-
255
- // src/hooks/use-inv-mast-doc.ts
256
-
257
- function useInvMastDoc(invMastUid, itemId, options = {}) {
258
- const api = useAugurApiOptional();
259
- const callbacks = useAugurCallbacks();
260
- const cache = useAugurCache();
261
- const queryOpts = _chunkH7OXSAHPcjs.getInvMastDocOptions.call(void 0,
262
- api,
263
- invMastUid,
264
- itemId,
265
- _nullishCoalesce(options.includePricing, () => ( "N")),
266
- cache
267
- );
268
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
269
- ...queryOpts,
270
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _12 => _12.getInvMastDoc]))) ? {
271
- queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMastDoc(invMastUid, itemId, _nullishCoalesce(options.includePricing, () => ( "N"))))))
272
- } : {},
273
- enabled: _nullishCoalesce(options.enabled, () => ( true)),
274
- initialData: options.initialData
275
- });
276
- return { item: data, isLoading, error };
277
- }
278
-
279
- // src/hooks/use-item-category.ts
280
-
281
- function useItemCategory(itemCategoryUid, options = {}) {
282
- const api = useAugurApiOptional();
283
- const callbacks = useAugurCallbacks();
284
- const cache = useAugurCache();
285
- const queryOpts = _chunkH7OXSAHPcjs.getItemCategoryOptions.call(void 0, api, itemCategoryUid, options.apiOptions, cache);
286
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
287
- ...queryOpts,
288
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _13 => _13.getItemCategory]))) ? {
289
- queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemCategory(itemCategoryUid, options.apiOptions))))
290
- } : {},
291
- enabled: _nullishCoalesce(options.enabled, () => ( true))
292
- });
293
- return { category: data, isLoading, error };
294
- }
295
-
296
- // src/hooks/use-inv-mast.ts
297
-
298
- function useInvMast(invMastUid, itemId, options = {}) {
299
- const api = useAugurApiOptional();
300
- const callbacks = useAugurCallbacks();
301
- const cache = useAugurCache();
302
- const queryOpts = _chunkH7OXSAHPcjs.getInvMastOptions.call(void 0, api, invMastUid, itemId, cache);
303
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
304
- ...queryOpts,
305
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _14 => _14.getInvMast]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMast(invMastUid, itemId)))) } : {},
306
- enabled: _nullishCoalesce(options.enabled, () => ( true))
307
- });
308
- return { item: data, isLoading, error };
309
- }
310
-
311
- // src/hooks/use-inv-mast-stock.ts
312
-
313
- function useInvMastStock(invMastUid, options = {}) {
314
- const api = useAugurApiOptional();
315
- const callbacks = useAugurCallbacks();
316
- const cache = useAugurCache();
317
- const queryOpts = _chunkH7OXSAHPcjs.getInvMastStockOptions.call(void 0, api, invMastUid, cache);
318
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
319
- ...queryOpts,
320
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _15 => _15.getInvMastStock]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getInvMastStock(invMastUid)))) } : {},
321
- enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!invMastUid,
322
- retry: 3,
323
- /* v8 ignore start */
324
- retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
325
- /* v8 ignore stop */
326
- });
327
- return {
328
- qtyOnHand: _nullishCoalesce(data, () => ( null)),
329
- loading: isLoading,
330
- error
331
- };
332
- }
333
-
334
- // src/hooks/use-stock.ts
335
-
336
-
337
-
338
181
  function useStock(invMastUid, options = {}) {
339
182
  const api = useAugurApiOptional();
340
- const callbacks = useAugurCallbacks();
341
183
  const cache = useAugurCache();
342
- const queryOpts = _chunkH7OXSAHPcjs.getStockOptions.call(void 0, api, invMastUid, cache);
343
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _16 => _16.getStock]) ? () => callbacks.getStock(invMastUid) : void 0)));
184
+ const queryOpts = _chunkQ5YH4HDRcjs.getStockOptions.call(void 0, api, invMastUid, cache);
185
+ const resolvedQueryFn = options.queryFn;
344
186
  const query = _reactquery.useQuery.call(void 0, {
345
187
  ...queryOpts,
346
188
  ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
@@ -374,186 +216,6 @@ function useStock(invMastUid, options = {}) {
374
216
  };
375
217
  }
376
218
 
377
- // src/hooks/use-batch-inv-mast-doc.ts
378
-
379
- function useBatchInvMastDoc(params, options = {}) {
380
- const api = useAugurApiOptional();
381
- const callbacks = useAugurCallbacks();
382
- const cache = useAugurCache();
383
- const queryClient = _reactquery.useQueryClient.call(void 0, );
384
- const includePricing = _nullishCoalesce(options.includePricing, () => ( "N"));
385
- const batchOpts = _chunkH7OXSAHPcjs.getBatchInvMastDocOptions.call(void 0, api, params, includePricing, cache);
386
- const resolveFetchItems = (uncached) => {
387
- if (options.queryFn) {
388
- return options.queryFn(uncached, includePricing);
389
- }
390
- if (_optionalChain([callbacks, 'optionalAccess', _17 => _17.batchGetInvMastDocs])) {
391
- return callbacks.batchGetInvMastDocs(uncached, includePricing);
392
- }
393
- const fallbackOpts = _chunkH7OXSAHPcjs.getBatchInvMastDocOptions.call(void 0, api, uncached, includePricing, cache);
394
- return fallbackOpts.queryFn();
395
- };
396
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
397
- queryKey: batchOpts.queryKey,
398
- queryFn: () => _chunkH7OXSAHPcjs.executeBatchQuery.call(void 0, {
399
- params,
400
- queryClient,
401
- getItemKey: (p) => _chunkH7OXSAHPcjs.getInvMastDocKey.call(void 0, p.invMastUid, p.itemId, includePricing),
402
- getResultKey: (p) => p.itemId.toUpperCase(),
403
- fetchItems: resolveFetchItems,
404
- getSeedKey: (_key, doc) => _chunkH7OXSAHPcjs.getInvMastDocKey.call(void 0, doc.invMastUid, doc.itemId, includePricing)
405
- }),
406
- staleTime: batchOpts.staleTime,
407
- gcTime: batchOpts.gcTime,
408
- enabled: params.length > 0 && (_nullishCoalesce(options.enabled, () => ( true)))
409
- });
410
- return { items: _nullishCoalesce(data, () => ( {})), isLoading, error: _nullishCoalesce(error, () => ( null)) };
411
- }
412
-
413
- // src/hooks/use-product-category.ts
414
-
415
- function resolveData(data) {
416
- return {
417
- childrenTotal: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _18 => _18.childrenTotal]), () => ( 0)),
418
- itemCategoryDesc: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _19 => _19.itemCategoryDesc]), () => ( "")),
419
- productCategories: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _20 => _20.children]), () => ( null)),
420
- productCategoryImage: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _21 => _21.categoryImage]), () => ( null))
421
- };
422
- }
423
- function useProductCategory(itemCategoryUid, options = {}) {
424
- const api = useAugurApiOptional();
425
- const callbacks = useAugurCallbacks();
426
- const cache = useAugurCache();
427
- const baseOptions = itemCategoryUid ? _chunkH7OXSAHPcjs.getProductCategoryOptions.call(void 0, api, itemCategoryUid, cache) : {
428
- queryKey: _chunkH7OXSAHPcjs.getProductCategoryKey.call(void 0, null),
429
- /* v8 ignore next */
430
- queryFn: () => Promise.reject()
431
- };
432
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _22 => _22.getProductCategory]) ? () => callbacks.getProductCategory(itemCategoryUid) : void 0)));
433
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
434
- ...baseOptions,
435
- ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
436
- enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemCategoryUid,
437
- retry: 3,
438
- /* v8 ignore start */
439
- retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
440
- /* v8 ignore stop */
441
- });
442
- return {
443
- ...resolveData(data),
444
- loading: isLoading,
445
- error
446
- };
447
- }
448
-
449
- // src/hooks/use-item-details.ts
450
-
451
- function useItemDetails(itemId, options = {}) {
452
- const api = useAugurApiOptional();
453
- const callbacks = useAugurCallbacks();
454
- const cache = useAugurCache();
455
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
456
- ...itemId ? _chunkH7OXSAHPcjs.getItemDetailsOptions.call(void 0, api, itemId, cache) : {
457
- queryKey: _chunkH7OXSAHPcjs.getItemDetailsKey.call(void 0, ""),
458
- /* v8 ignore next */
459
- queryFn: () => Promise.reject()
460
- },
461
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _23 => _23.getItemDetails]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemDetails(itemId)))) } : {},
462
- enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemId,
463
- retry: 3,
464
- /* v8 ignore start */
465
- retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
466
- /* v8 ignore stop */
467
- });
468
- const categoryList = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _24 => _24.categoryList]), () => ( []));
469
- return {
470
- itemCategoryUid: categoryList.length > 0 ? categoryList[categoryList.length - 1] : null,
471
- itemDetails: _nullishCoalesce(data, () => ( null)),
472
- loading: isLoading,
473
- error
474
- };
475
- }
476
-
477
- // src/hooks/use-item-attributes.ts
478
-
479
- function useItemAttributes(itemCategoryUid, options = {}) {
480
- const api = useAugurApiOptional();
481
- const callbacks = useAugurCallbacks();
482
- const cache = useAugurCache();
483
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
484
- ...itemCategoryUid ? _chunkH7OXSAHPcjs.getItemAttributesOptions.call(void 0, api, itemCategoryUid, cache) : {
485
- queryKey: _chunkH7OXSAHPcjs.getItemAttributesKey.call(void 0, null),
486
- /* v8 ignore next */
487
- queryFn: () => Promise.reject()
488
- },
489
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _25 => _25.getItemAttributes]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getItemAttributes(itemCategoryUid)))) } : {},
490
- enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!itemCategoryUid,
491
- retry: 3,
492
- /* v8 ignore start */
493
- retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
494
- /* v8 ignore stop */
495
- });
496
- return {
497
- attributes: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _26 => _26.attributes]), () => ( null)),
498
- loading: isLoading,
499
- error
500
- };
501
- }
502
-
503
- // src/hooks/use-product-search.ts
504
-
505
- function useProductSearch(pageData, options = {}) {
506
- const api = useAugurApiOptional();
507
- const callbacks = useAugurCallbacks();
508
- const cache = useAugurCache();
509
- const defaultOptions = _chunkH7OXSAHPcjs.getProductSearchOptions.call(void 0, api, pageData, cache);
510
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
511
- ...defaultOptions,
512
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _27 => _27.getProductSearch]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getProductSearch(pageData)))) } : {},
513
- retry: 3,
514
- /* v8 ignore start */
515
- retryDelay: (attemptIndex) => Math.min(1e3 * 2 ** attemptIndex, 1e4)
516
- /* v8 ignore stop */
517
- });
518
- return {
519
- productItems: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _28 => _28.items]), () => ( null)),
520
- total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _29 => _29.totalResults]), () => ( 0)),
521
- result: data,
522
- loading: isLoading,
523
- error
524
- };
525
- }
526
-
527
- // src/hooks/use-search-suggestions.ts
528
-
529
- function useSearchSuggestions(query, options = {}) {
530
- const api = useAugurApiOptional();
531
- const callbacks = useAugurCallbacks();
532
- const cache = useAugurCache();
533
- const limit = _nullishCoalesce(options.limit, () => ( 10));
534
- const offset = _nullishCoalesce(options.offset, () => ( 0));
535
- const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && query.trim().length > 0;
536
- const defaultOptions = _chunkH7OXSAHPcjs.getSearchSuggestionsOptions.call(void 0, api, query, limit, offset, cache);
537
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
538
- ...defaultOptions,
539
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _30 => _30.getSearchSuggestions]))) ? {
540
- queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getSearchSuggestions(query, limit, offset))))
541
- } : {},
542
- enabled
543
- });
544
- return {
545
- suggestions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _31 => _31.data]), () => ( [])),
546
- total: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _32 => _32.total]), () => ( 0)),
547
- count: _optionalChain([data, 'optionalAccess', _33 => _33.count]),
548
- totalResults: _optionalChain([data, 'optionalAccess', _34 => _34.totalResults]),
549
- message: _optionalChain([data, 'optionalAccess', _35 => _35.message]),
550
- status: _optionalChain([data, 'optionalAccess', _36 => _36.status]),
551
- result: data,
552
- isLoading,
553
- error
554
- };
555
- }
556
-
557
219
  // src/hooks/use-cart-actions.ts
558
220
 
559
221
 
@@ -613,17 +275,17 @@ function useCartActions(callbacks) {
613
275
  ]);
614
276
  if (!success) throw new Error("Failed to add item to cart");
615
277
  invalidateCartCache();
616
- if (showToast && _optionalChain([notify, 'optionalAccess', _37 => _37.info])) {
278
+ if (showToast && _optionalChain([notify, 'optionalAccess', _8 => _8.info])) {
617
279
  notify.info(`${item.quantity} x ${itemId || "Item"} added to cart`);
618
280
  }
619
- _optionalChain([onSuccess, 'optionalCall', _38 => _38()]);
281
+ _optionalChain([onSuccess, 'optionalCall', _9 => _9()]);
620
282
  return true;
621
283
  } catch (error) {
622
284
  setCartLines(previousCartLines);
623
- if (showToast && _optionalChain([notify, 'optionalAccess', _39 => _39.error])) {
285
+ if (showToast && _optionalChain([notify, 'optionalAccess', _10 => _10.error])) {
624
286
  notify.error("Failed to add item to cart. Please try again.");
625
287
  }
626
- _optionalChain([onError, 'optionalCall', _40 => _40(error)]);
288
+ _optionalChain([onError, 'optionalCall', _11 => _11(error)]);
627
289
  return false;
628
290
  }
629
291
  },
@@ -642,14 +304,14 @@ function useCartActions(callbacks) {
642
304
  const success = await callbacks.updateCartLines(uid, updatedLines);
643
305
  if (!success) throw new Error("Failed to update quantity");
644
306
  invalidateCartCache();
645
- _optionalChain([onSuccess, 'optionalCall', _41 => _41()]);
307
+ _optionalChain([onSuccess, 'optionalCall', _12 => _12()]);
646
308
  return true;
647
309
  } catch (error) {
648
310
  setCartLines(previousCartLines);
649
- if (showToast && _optionalChain([notify, 'optionalAccess', _42 => _42.error])) {
311
+ if (showToast && _optionalChain([notify, 'optionalAccess', _13 => _13.error])) {
650
312
  notify.error("Failed to update quantity. Please try again.");
651
313
  }
652
- _optionalChain([onError, 'optionalCall', _43 => _43(error)]);
314
+ _optionalChain([onError, 'optionalCall', _14 => _14(error)]);
653
315
  return false;
654
316
  }
655
317
  },
@@ -668,17 +330,17 @@ function useCartActions(callbacks) {
668
330
  const success = await callbacks.updateCartLines(uid, zeroedLines);
669
331
  if (!success) throw new Error("Failed to remove item");
670
332
  invalidateCartCache();
671
- if (showToast && _optionalChain([notify, 'optionalAccess', _44 => _44.info])) {
333
+ if (showToast && _optionalChain([notify, 'optionalAccess', _15 => _15.info])) {
672
334
  notify.info(`${itemId || "Item"} removed from cart`);
673
335
  }
674
- _optionalChain([onSuccess, 'optionalCall', _45 => _45()]);
336
+ _optionalChain([onSuccess, 'optionalCall', _16 => _16()]);
675
337
  return true;
676
338
  } catch (error) {
677
339
  setCartLines(previousCartLines);
678
- if (showToast && _optionalChain([notify, 'optionalAccess', _46 => _46.error])) {
340
+ if (showToast && _optionalChain([notify, 'optionalAccess', _17 => _17.error])) {
679
341
  notify.error("Failed to remove item. Please try again.");
680
342
  }
681
- _optionalChain([onError, 'optionalCall', _47 => _47(error)]);
343
+ _optionalChain([onError, 'optionalCall', _18 => _18(error)]);
682
344
  return false;
683
345
  }
684
346
  },
@@ -694,17 +356,17 @@ function useCartActions(callbacks) {
694
356
  const success = await callbacks.deleteItemsFromCart(uid);
695
357
  if (!success) throw new Error("Failed to clear cart");
696
358
  invalidateCartCache();
697
- if (showToast && _optionalChain([notify, 'optionalAccess', _48 => _48.info])) {
359
+ if (showToast && _optionalChain([notify, 'optionalAccess', _19 => _19.info])) {
698
360
  notify.info("Cart cleared");
699
361
  }
700
- _optionalChain([onSuccess, 'optionalCall', _49 => _49()]);
362
+ _optionalChain([onSuccess, 'optionalCall', _20 => _20()]);
701
363
  return true;
702
364
  } catch (error) {
703
365
  setCartLines(previousCartLines);
704
- if (showToast && _optionalChain([notify, 'optionalAccess', _50 => _50.error])) {
366
+ if (showToast && _optionalChain([notify, 'optionalAccess', _21 => _21.error])) {
705
367
  notify.error("Failed to clear cart. Please try again.");
706
368
  }
707
- _optionalChain([onError, 'optionalCall', _51 => _51(error)]);
369
+ _optionalChain([onError, 'optionalCall', _22 => _22(error)]);
708
370
  return false;
709
371
  }
710
372
  },
@@ -718,7 +380,7 @@ function useCartActions(callbacks) {
718
380
  );
719
381
  const getItemQuantity = _react.useCallback.call(void 0,
720
382
  (invMastUid) => {
721
- return _nullishCoalesce(_optionalChain([cartLines, 'access', _52 => _52.find, 'call', _53 => _53((line) => line.invMastUid === invMastUid), 'optionalAccess', _54 => _54.quantity]), () => ( 0));
383
+ return _nullishCoalesce(_optionalChain([cartLines, 'access', _23 => _23.find, 'call', _24 => _24((line) => line.invMastUid === invMastUid), 'optionalAccess', _25 => _25.quantity]), () => ( 0));
722
384
  },
723
385
  [cartLines]
724
386
  );
@@ -760,38 +422,38 @@ function usePaymentFlow({
760
422
  try {
761
423
  const result = await callbacks.transactionSetup({ customerId: String(customerId) });
762
424
  if (!result) {
763
- _optionalChain([callbacks, 'access', _55 => _55.toast, 'optionalAccess', _56 => _56.error, 'optionalCall', _57 => _57("Unable to initialize payment. Please try again.")]);
425
+ _optionalChain([callbacks, 'access', _26 => _26.toast, 'optionalAccess', _27 => _27.error, 'optionalCall', _28 => _28("Unable to initialize payment. Please try again.")]);
764
426
  return;
765
427
  }
766
428
  setUnified(result);
767
429
  } catch (error) {
768
430
  console.error("transactionSetup failed:", error);
769
- _optionalChain([callbacks, 'access', _58 => _58.toast, 'optionalAccess', _59 => _59.error, 'optionalCall', _60 => _60("Unable to initialize payment. Please try again.")]);
431
+ _optionalChain([callbacks, 'access', _29 => _29.toast, 'optionalAccess', _30 => _30.error, 'optionalCall', _31 => _31("Unable to initialize payment. Please try again.")]);
770
432
  }
771
433
  }, [customerId, callbacks]);
772
434
  const getCardInfo = _react.useCallback.call(void 0, async () => {
773
- if (!_optionalChain([unified, 'optionalAccess', _61 => _61.transactionSetupId])) return;
435
+ if (!_optionalChain([unified, 'optionalAccess', _32 => _32.transactionSetupId])) return;
774
436
  try {
775
437
  const result = await callbacks.cardInfo({ transactionSetupId: unified.transactionSetupId });
776
438
  if (!result) {
777
- _optionalChain([callbacks, 'access', _62 => _62.toast, 'optionalAccess', _63 => _63.error, 'optionalCall', _64 => _64("Unable to verify card details. Please try again.")]);
439
+ _optionalChain([callbacks, 'access', _33 => _33.toast, 'optionalAccess', _34 => _34.error, 'optionalCall', _35 => _35("Unable to verify card details. Please try again.")]);
778
440
  return;
779
441
  }
780
442
  setUnifiedCc(result);
781
443
  } catch (error) {
782
444
  console.error("cardInfo failed:", error);
783
- _optionalChain([callbacks, 'access', _65 => _65.toast, 'optionalAccess', _66 => _66.error, 'optionalCall', _67 => _67("Unable to verify card details. Please try again.")]);
445
+ _optionalChain([callbacks, 'access', _36 => _36.toast, 'optionalAccess', _37 => _37.error, 'optionalCall', _38 => _38("Unable to verify card details. Please try again.")]);
784
446
  }
785
447
  }, [unified, callbacks]);
786
448
  const verifyUnified = _react.useCallback.call(void 0, async () => {
787
- if (!_optionalChain([unified, 'optionalAccess', _68 => _68.transactionSetupId]) || !customerId) return;
449
+ if (!_optionalChain([unified, 'optionalAccess', _39 => _39.transactionSetupId]) || !customerId) return;
788
450
  try {
789
451
  const result = await callbacks.validatePayment({
790
452
  transactionSetupId: unified.transactionSetupId,
791
453
  customerId: String(customerId)
792
454
  });
793
455
  if (!result) {
794
- _optionalChain([callbacks, 'access', _69 => _69.toast, 'optionalAccess', _70 => _70.error, 'optionalCall', _71 => _71("Payment verification failed. Please try again.")]);
456
+ _optionalChain([callbacks, 'access', _40 => _40.toast, 'optionalAccess', _41 => _41.error, 'optionalCall', _42 => _42("Payment verification failed. Please try again.")]);
795
457
  return;
796
458
  }
797
459
  setUnifiedResponse(result.valid);
@@ -800,29 +462,29 @@ function usePaymentFlow({
800
462
  }
801
463
  } catch (error) {
802
464
  console.error("validatePayment failed:", error);
803
- _optionalChain([callbacks, 'access', _72 => _72.toast, 'optionalAccess', _73 => _73.error, 'optionalCall', _74 => _74("Payment verification failed. Please try again.")]);
465
+ _optionalChain([callbacks, 'access', _43 => _43.toast, 'optionalAccess', _44 => _44.error, 'optionalCall', _45 => _45("Payment verification failed. Please try again.")]);
804
466
  }
805
467
  }, [unified, customerId, getCardInfo, callbacks]);
806
468
  const getUnifiedPayment = _react.useCallback.call(void 0, async () => {
807
- if (!_optionalChain([unified, 'optionalAccess', _75 => _75.transactionSetupId]) || !customerId) return;
469
+ if (!_optionalChain([unified, 'optionalAccess', _46 => _46.transactionSetupId]) || !customerId) return;
808
470
  try {
809
471
  const result = await callbacks.accountQuery({
810
472
  transactionSetupId: unified.transactionSetupId,
811
473
  customerId: String(customerId)
812
474
  });
813
475
  if (!result) {
814
- _optionalChain([callbacks, 'access', _76 => _76.toast, 'optionalAccess', _77 => _77.error, 'optionalCall', _78 => _78("Unable to retrieve payment account. Please try again.")]);
476
+ _optionalChain([callbacks, 'access', _47 => _47.toast, 'optionalAccess', _48 => _48.error, 'optionalCall', _49 => _49("Unable to retrieve payment account. Please try again.")]);
815
477
  return;
816
478
  }
817
479
  const payment = capturedBin && !result.Bin ? { ...result, Bin: capturedBin } : result;
818
480
  setUnifiedPayment(payment);
819
481
  } catch (error) {
820
482
  console.error("accountQuery failed:", error);
821
- _optionalChain([callbacks, 'access', _79 => _79.toast, 'optionalAccess', _80 => _80.error, 'optionalCall', _81 => _81("Unable to retrieve payment account. Please try again.")]);
483
+ _optionalChain([callbacks, 'access', _50 => _50.toast, 'optionalAccess', _51 => _51.error, 'optionalCall', _52 => _52("Unable to retrieve payment account. Please try again.")]);
822
484
  }
823
485
  }, [unified, customerId, capturedBin, callbacks]);
824
486
  const updateUnifiedBilling = _react.useCallback.call(void 0, async () => {
825
- if (!_optionalChain([unified, 'optionalAccess', _82 => _82.transactionSetupId]) || !billingAddress) return;
487
+ if (!_optionalChain([unified, 'optionalAccess', _53 => _53.transactionSetupId]) || !billingAddress) return;
826
488
  try {
827
489
  const result = await callbacks.billingUpdate({
828
490
  transactionSetupId: unified.transactionSetupId,
@@ -833,14 +495,14 @@ function usePaymentFlow({
833
495
  zip: billingAddress.postalCode
834
496
  });
835
497
  if (!result) {
836
- _optionalChain([callbacks, 'access', _83 => _83.toast, 'optionalAccess', _84 => _84.error, 'optionalCall', _85 => _85("Billing update failed. Please try again.")]);
498
+ _optionalChain([callbacks, 'access', _54 => _54.toast, 'optionalAccess', _55 => _55.error, 'optionalCall', _56 => _56("Billing update failed. Please try again.")]);
837
499
  return;
838
500
  }
839
501
  setUnifiedBilling(true);
840
502
  void getUnifiedPayment();
841
503
  } catch (error) {
842
504
  console.error("billingUpdate failed:", error);
843
- _optionalChain([callbacks, 'access', _86 => _86.toast, 'optionalAccess', _87 => _87.error, 'optionalCall', _88 => _88("Billing update failed. Please try again.")]);
505
+ _optionalChain([callbacks, 'access', _57 => _57.toast, 'optionalAccess', _58 => _58.error, 'optionalCall', _59 => _59("Billing update failed. Please try again.")]);
844
506
  }
845
507
  }, [unified, billingAddress, getUnifiedPayment, callbacks]);
846
508
  _react.useEffect.call(void 0, () => {
@@ -859,13 +521,13 @@ function usePaymentFlow({
859
521
  }
860
522
  }, [isOpen, unified, shippingAccepted, paymentMethod, verifyUnified]);
861
523
  _react.useEffect.call(void 0, () => {
862
- if (unifiedResponse && billingAddress !== void 0 && _optionalChain([unifiedCc, 'optionalAccess', _89 => _89.transactionSetupId]) && paymentMethod === "credit-card") {
524
+ if (unifiedResponse && billingAddress !== void 0 && _optionalChain([unifiedCc, 'optionalAccess', _60 => _60.transactionSetupId]) && paymentMethod === "credit-card") {
863
525
  void updateUnifiedBilling();
864
526
  }
865
527
  }, [
866
528
  unifiedResponse,
867
529
  billingAddress,
868
- _optionalChain([unifiedCc, 'optionalAccess', _90 => _90.transactionSetupId]),
530
+ _optionalChain([unifiedCc, 'optionalAccess', _61 => _61.transactionSetupId]),
869
531
  updateUnifiedBilling,
870
532
  paymentMethod
871
533
  ]);
@@ -914,8 +576,8 @@ function useCartInitialization(session, callbacks) {
914
576
  const clearCart = useClearCart();
915
577
  const queryClient = _reactquery.useQueryClient.call(void 0, );
916
578
  const effectiveStatus = session.status;
917
- const effectiveUserId = _nullishCoalesce(session.userId, () => ( _optionalChain([auth, 'optionalAccess', _91 => _91.userId])));
918
- const effectiveCartHdrUid = _nullishCoalesce(session.cartHdrUid, () => ( _optionalChain([auth, 'optionalAccess', _92 => _92.cartHdrUid])));
579
+ const effectiveUserId = _nullishCoalesce(session.userId, () => ( _optionalChain([auth, 'optionalAccess', _62 => _62.userId])));
580
+ const effectiveCartHdrUid = _nullishCoalesce(session.cartHdrUid, () => ( _optionalChain([auth, 'optionalAccess', _63 => _63.cartHdrUid])));
919
581
  const effectiveSession = _react.useMemo.call(void 0,
920
582
  () => ({ status: effectiveStatus, userId: effectiveUserId, cartHdrUid: effectiveCartHdrUid }),
921
583
  [effectiveStatus, effectiveUserId, effectiveCartHdrUid]
@@ -1007,22 +669,21 @@ function useCartInitialization(session, callbacks) {
1007
669
 
1008
670
  function useCartPricing(options = {}) {
1009
671
  const api = useAugurApiOptional();
1010
- const callbacks = useAugurCallbacks();
1011
672
  const auth = useAugurAuth();
1012
673
  const cache = useAugurCache();
1013
674
  const site = useAugurSite();
1014
675
  const cartLines = useCartLines();
1015
- const customerId = _nullishCoalesce(_nullishCoalesce(options.customerId, () => ( _optionalChain([auth, 'optionalAccess', _93 => _93.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _94 => _94.defaults, 'optionalAccess', _95 => _95.customerId])));
1016
- const priceFn = _nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _96 => _96.getItemPrice])));
676
+ const customerId = _nullishCoalesce(_nullishCoalesce(options.customerId, () => ( _optionalChain([auth, 'optionalAccess', _64 => _64.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _65 => _65.defaults, 'optionalAccess', _66 => _66.customerId])));
677
+ const priceFn = options.queryFn;
1017
678
  const priceQueries = _reactquery.useQueries.call(void 0, {
1018
679
  queries: cartLines.map((line) => {
1019
680
  const base = priceFn ? {
1020
- queryKey: _chunkH7OXSAHPcjs.getItemPriceKey.call(void 0, line.itemId, customerId, line.quantity),
681
+ queryKey: _chunkQ5YH4HDRcjs.getItemPriceKey.call(void 0, line.itemId, customerId, line.quantity),
1021
682
  queryFn: () => priceFn(line.itemId, customerId, line.quantity),
1022
683
  refetchOnReconnect: true,
1023
684
  refetchOnWindowFocus: false,
1024
685
  meta: { persist: true }
1025
- } : _chunkH7OXSAHPcjs.getItemPriceOptions.call(void 0, api, line.itemId, customerId, line.quantity, cache);
686
+ } : _chunkQ5YH4HDRcjs.getItemPriceOptions.call(void 0, api, line.itemId, customerId, line.quantity, cache);
1026
687
  return {
1027
688
  ...base,
1028
689
  enabled: !!customerId && !!line.itemId
@@ -1033,7 +694,7 @@ function useCartPricing(options = {}) {
1033
694
  const map = {};
1034
695
  cartLines.forEach((line, index) => {
1035
696
  const queryResult = priceQueries[index];
1036
- if (_optionalChain([queryResult, 'optionalAccess', _97 => _97.data])) {
697
+ if (_optionalChain([queryResult, 'optionalAccess', _67 => _67.data])) {
1037
698
  const derived = _augurutils.derivePrice.call(void 0, { priceData: queryResult.data, quantity: line.quantity });
1038
699
  map[line.itemId.toUpperCase()] = {
1039
700
  unitPrice: derived.unitPrice,
@@ -1045,7 +706,7 @@ function useCartPricing(options = {}) {
1045
706
  }, [cartLines, priceQueries]);
1046
707
  const getUnitPrice = _react.useMemo.call(void 0, () => {
1047
708
  return (itemId) => {
1048
- return _nullishCoalesce(_optionalChain([prices, 'access', _98 => _98[_optionalChain([itemId, 'optionalAccess', _99 => _99.toUpperCase, 'call', _100 => _100()])], 'optionalAccess', _101 => _101.unitPrice]), () => ( 0));
709
+ return _nullishCoalesce(_optionalChain([prices, 'access', _68 => _68[_optionalChain([itemId, 'optionalAccess', _69 => _69.toUpperCase, 'call', _70 => _70()])], 'optionalAccess', _71 => _71.unitPrice]), () => ( 0));
1049
710
  };
1050
711
  }, [prices]);
1051
712
  const getItemTotal = _react.useMemo.call(void 0, () => {
@@ -1055,7 +716,7 @@ function useCartPricing(options = {}) {
1055
716
  }, [getUnitPrice]);
1056
717
  const subtotal = _react.useMemo.call(void 0, () => {
1057
718
  return cartLines.reduce((sum, line) => {
1058
- const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access', _102 => _102[line.itemId.toUpperCase()], 'optionalAccess', _103 => _103.unitPrice]), () => ( 0));
719
+ const unitPrice = _nullishCoalesce(_optionalChain([prices, 'access', _72 => _72[line.itemId.toUpperCase()], 'optionalAccess', _73 => _73.unitPrice]), () => ( 0));
1059
720
  return sum + unitPrice * line.quantity;
1060
721
  }, 0);
1061
722
  }, [cartLines, prices]);
@@ -1116,368 +777,6 @@ var usePaginationPrefetch = ({
1116
777
  };
1117
778
  };
1118
779
 
1119
- // src/hooks/use-category-items-infinite.ts
1120
-
1121
- function useCategoryItemsInfinite(itemCategoryUid, itemsFilters, options = {}) {
1122
- const api = useAugurApiOptional();
1123
- const callbacks = useAugurCallbacks();
1124
- const cache = useAugurCache();
1125
- const { enabled = true } = options;
1126
- const defaultOptions = _chunkH7OXSAHPcjs.getCategoryItemsInfiniteOptions.call(void 0, api, itemCategoryUid, itemsFilters, cache);
1127
- const cb = _optionalChain([callbacks, 'optionalAccess', _104 => _104.getCategoryItemsInfinite]);
1128
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (cb ? ({ pageParam }) => cb({
1129
- itemCategoryUid,
1130
- itemsFilters,
1131
- /* v8 ignore next */
1132
- pageParam: _nullishCoalesce(pageParam, () => ( 0))
1133
- }) : void 0)));
1134
- return _reactquery.useInfiniteQuery.call(void 0, {
1135
- ...defaultOptions,
1136
- ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
1137
- enabled: enabled && !!itemCategoryUid
1138
- });
1139
- }
1140
-
1141
- // src/hooks/use-item-search-infinite.ts
1142
-
1143
- function useItemSearchInfinite(itemsFilters, itemCategoryUid, options = {}) {
1144
- const api = useAugurApiOptional();
1145
- const callbacks = useAugurCallbacks();
1146
- const cache = useAugurCache();
1147
- const { enabled = true } = options;
1148
- const defaultOptions = _chunkH7OXSAHPcjs.getItemSearchInfiniteOptions.call(void 0, api, itemsFilters, itemCategoryUid, cache);
1149
- const cb = _optionalChain([callbacks, 'optionalAccess', _105 => _105.getItemSearchInfinite]);
1150
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (cb ? ({ pageParam }) => cb({
1151
- itemsFilters,
1152
- itemCategoryUid,
1153
- /* v8 ignore next */
1154
- pageParam: _nullishCoalesce(pageParam, () => ( 0))
1155
- }) : void 0)));
1156
- return _reactquery.useInfiniteQuery.call(void 0, {
1157
- ...defaultOptions,
1158
- ...resolvedQueryFn ? { queryFn: resolvedQueryFn } : {},
1159
- enabled: enabled && !!itemsFilters.q
1160
- });
1161
- }
1162
-
1163
- // src/hooks/use-joomla-content.ts
1164
-
1165
- function useJoomlaContent(articleId, options = {}) {
1166
- const api = useAugurApiOptional();
1167
- const callbacks = useAugurCallbacks();
1168
- const cache = useAugurCache();
1169
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1170
- ...articleId ? _chunkH7OXSAHPcjs.getJoomlaContentOptions.call(void 0, api, articleId, cache) : {
1171
- queryKey: _chunkH7OXSAHPcjs.getJoomlaContentKey.call(void 0, ""),
1172
- /* v8 ignore next */
1173
- queryFn: () => Promise.reject()
1174
- },
1175
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _106 => _106.getJoomlaContent]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaContent(articleId)))) } : {},
1176
- enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!articleId
1177
- });
1178
- return {
1179
- article: _nullishCoalesce(data, () => ( null)),
1180
- isLoading,
1181
- error
1182
- };
1183
- }
1184
-
1185
- // src/hooks/use-joomla-content-list.ts
1186
-
1187
- var EMPTY_LIST = { data: [], total: 0 };
1188
- function useJoomlaContentList(categoryId, options = {}) {
1189
- const api = useAugurApiOptional();
1190
- const callbacks = useAugurCallbacks();
1191
- const cache = useAugurCache();
1192
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1193
- ...categoryId ? _chunkH7OXSAHPcjs.getJoomlaContentListOptions.call(void 0, api, categoryId, options.filters, cache) : {
1194
- queryKey: _chunkH7OXSAHPcjs.getJoomlaContentListKey.call(void 0, ""),
1195
- /* v8 ignore next */
1196
- queryFn: () => Promise.reject()
1197
- },
1198
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _107 => _107.getJoomlaContentList]))) ? {
1199
- queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaContentList(categoryId, options.filters))))
1200
- } : {},
1201
- enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!categoryId
1202
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1203
- });
1204
- const result = data || EMPTY_LIST;
1205
- return {
1206
- articles: result.data,
1207
- total: result.total,
1208
- count: result.count,
1209
- totalResults: result.totalResults,
1210
- message: result.message,
1211
- status: result.status,
1212
- result,
1213
- isLoading,
1214
- error
1215
- };
1216
- }
1217
-
1218
- // src/hooks/use-joomla-menu.ts
1219
-
1220
- var EMPTY_LIST2 = { data: [], total: 0 };
1221
- function useJoomlaMenu(options = {}) {
1222
- const api = useAugurApiOptional();
1223
- const callbacks = useAugurCallbacks();
1224
- const cache = useAugurCache();
1225
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1226
- ..._chunkH7OXSAHPcjs.getJoomlaMenuOptions.call(void 0, api, options.filters, cache),
1227
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _108 => _108.getJoomlaMenu]))) ? {
1228
- queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaMenu(options.filters))))
1229
- } : {},
1230
- enabled: _nullishCoalesce(options.enabled, () => ( true))
1231
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1232
- });
1233
- const result = data || EMPTY_LIST2;
1234
- return {
1235
- menuItems: result.data,
1236
- total: result.total,
1237
- count: result.count,
1238
- totalResults: result.totalResults,
1239
- message: result.message,
1240
- status: result.status,
1241
- result,
1242
- isLoading,
1243
- error
1244
- };
1245
- }
1246
-
1247
- // src/hooks/use-joomla-menu-doc.ts
1248
-
1249
- function useJoomlaMenuDoc(menuId, options = {}) {
1250
- const api = useAugurApiOptional();
1251
- const callbacks = useAugurCallbacks();
1252
- const cache = useAugurCache();
1253
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1254
- ...menuId ? _chunkH7OXSAHPcjs.getJoomlaMenuDocOptions.call(void 0, api, menuId, cache) : {
1255
- queryKey: _chunkH7OXSAHPcjs.getJoomlaMenuDocKey.call(void 0, ""),
1256
- /* v8 ignore next */
1257
- queryFn: () => Promise.reject()
1258
- },
1259
- ..._nullishCoalesce(options.queryFn, () => ( _optionalChain([callbacks, 'optionalAccess', _109 => _109.getJoomlaMenuDoc]))) ? { queryFn: _nullishCoalesce(options.queryFn, () => ( (() => callbacks.getJoomlaMenuDoc(menuId)))) } : {},
1260
- enabled: (_nullishCoalesce(options.enabled, () => ( true))) && !!menuId
1261
- });
1262
- return {
1263
- menuItem: _nullishCoalesce(data, () => ( null)),
1264
- isLoading,
1265
- error
1266
- };
1267
- }
1268
-
1269
- // src/hooks/use-customer-orders.ts
1270
-
1271
- var EMPTY_LIST3 = { data: [], total: 0 };
1272
- function useCustomerOrders(customerId, params, options = {}) {
1273
- const callbacks = useAugurCallbacks();
1274
- const auth = useAugurAuth();
1275
- const site = useAugurSite();
1276
- const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _110 => _110.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _111 => _111.defaults, 'optionalAccess', _112 => _112.customerId])));
1277
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _113 => _113.getCustomerOrders]) ? () => callbacks.getCustomerOrders(effectiveCustomerId, params) : void 0)));
1278
- const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!resolvedQueryFn;
1279
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1280
- queryKey: _chunkH7OXSAHPcjs.getCustomerOrdersKey.call(void 0, effectiveCustomerId, params),
1281
- queryFn: resolvedQueryFn,
1282
- enabled
1283
- });
1284
- const result = data || EMPTY_LIST3;
1285
- return {
1286
- orders: result.data,
1287
- total: result.total,
1288
- count: result.count,
1289
- totalResults: result.totalResults,
1290
- message: result.message,
1291
- status: result.status,
1292
- result,
1293
- isLoading,
1294
- error
1295
- };
1296
- }
1297
- function useOrderDetail(customerId, orderId, options = {}) {
1298
- const callbacks = useAugurCallbacks();
1299
- const auth = useAugurAuth();
1300
- const site = useAugurSite();
1301
- const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _114 => _114.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _115 => _115.defaults, 'optionalAccess', _116 => _116.customerId])));
1302
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _117 => _117.getCustomerOrderDetail]) ? () => callbacks.getCustomerOrderDetail(effectiveCustomerId, orderId) : void 0)));
1303
- const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!orderId && !!resolvedQueryFn;
1304
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1305
- queryKey: _chunkH7OXSAHPcjs.getCustomerOrderDetailKey.call(void 0, effectiveCustomerId, orderId),
1306
- queryFn: resolvedQueryFn,
1307
- enabled
1308
- });
1309
- return {
1310
- order: data || null,
1311
- isLoading,
1312
- error
1313
- };
1314
- }
1315
-
1316
- // src/hooks/use-customer-invoices.ts
1317
-
1318
- var EMPTY_LIST4 = { data: [], total: 0 };
1319
- function useCustomerInvoices(customerId, params, options = {}) {
1320
- const callbacks = useAugurCallbacks();
1321
- const auth = useAugurAuth();
1322
- const site = useAugurSite();
1323
- const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _118 => _118.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _119 => _119.defaults, 'optionalAccess', _120 => _120.customerId])));
1324
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _121 => _121.getCustomerInvoices]) ? () => callbacks.getCustomerInvoices(effectiveCustomerId, params) : void 0)));
1325
- const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!resolvedQueryFn;
1326
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1327
- queryKey: _chunkH7OXSAHPcjs.getCustomerInvoicesKey.call(void 0, effectiveCustomerId, params),
1328
- queryFn: resolvedQueryFn,
1329
- enabled
1330
- });
1331
- const result = data || EMPTY_LIST4;
1332
- return {
1333
- invoices: result.data,
1334
- total: result.total,
1335
- count: result.count,
1336
- totalResults: result.totalResults,
1337
- message: result.message,
1338
- status: result.status,
1339
- result,
1340
- isLoading,
1341
- error
1342
- };
1343
- }
1344
- function useInvoiceDetail(customerId, invoiceNo, options = {}) {
1345
- const callbacks = useAugurCallbacks();
1346
- const auth = useAugurAuth();
1347
- const site = useAugurSite();
1348
- const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _122 => _122.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _123 => _123.defaults, 'optionalAccess', _124 => _124.customerId])));
1349
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _125 => _125.getCustomerInvoiceDetail]) ? () => callbacks.getCustomerInvoiceDetail(effectiveCustomerId, invoiceNo) : void 0)));
1350
- const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!invoiceNo && !!resolvedQueryFn;
1351
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1352
- queryKey: _chunkH7OXSAHPcjs.getCustomerInvoiceDetailKey.call(void 0, effectiveCustomerId, invoiceNo),
1353
- queryFn: resolvedQueryFn,
1354
- enabled
1355
- });
1356
- return {
1357
- invoice: data || null,
1358
- isLoading,
1359
- error
1360
- };
1361
- }
1362
-
1363
- // src/hooks/use-customer-quotes.ts
1364
-
1365
- var EMPTY_LIST5 = { data: [], total: 0 };
1366
- function useCustomerQuotes(customerId, params, options = {}) {
1367
- const callbacks = useAugurCallbacks();
1368
- const auth = useAugurAuth();
1369
- const site = useAugurSite();
1370
- const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _126 => _126.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _127 => _127.defaults, 'optionalAccess', _128 => _128.customerId])));
1371
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _129 => _129.getCustomerQuotes]) ? () => callbacks.getCustomerQuotes(effectiveCustomerId, params) : void 0)));
1372
- const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!resolvedQueryFn;
1373
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1374
- queryKey: _chunkH7OXSAHPcjs.getCustomerQuotesKey.call(void 0, effectiveCustomerId, params),
1375
- queryFn: resolvedQueryFn,
1376
- enabled
1377
- });
1378
- const result = data || EMPTY_LIST5;
1379
- return {
1380
- quotes: result.data,
1381
- total: result.total,
1382
- count: result.count,
1383
- totalResults: result.totalResults,
1384
- message: result.message,
1385
- status: result.status,
1386
- result,
1387
- isLoading,
1388
- error
1389
- };
1390
- }
1391
- function useQuoteDetail(customerId, quoteNo, options = {}) {
1392
- const callbacks = useAugurCallbacks();
1393
- const auth = useAugurAuth();
1394
- const site = useAugurSite();
1395
- const effectiveCustomerId = _nullishCoalesce(_nullishCoalesce(customerId, () => ( _optionalChain([auth, 'optionalAccess', _130 => _130.customerId]))), () => ( _optionalChain([site, 'optionalAccess', _131 => _131.defaults, 'optionalAccess', _132 => _132.customerId])));
1396
- const resolvedQueryFn = _nullishCoalesce(options.queryFn, () => ( (_optionalChain([callbacks, 'optionalAccess', _133 => _133.getCustomerQuoteDetail]) ? () => callbacks.getCustomerQuoteDetail(effectiveCustomerId, quoteNo) : void 0)));
1397
- const enabled = (_nullishCoalesce(options.enabled, () => ( true))) && !!effectiveCustomerId && !!quoteNo && !!resolvedQueryFn;
1398
- const { data, isLoading, error } = _reactquery.useQuery.call(void 0, {
1399
- queryKey: _chunkH7OXSAHPcjs.getCustomerQuoteDetailKey.call(void 0, effectiveCustomerId, quoteNo),
1400
- queryFn: resolvedQueryFn,
1401
- enabled
1402
- });
1403
- return {
1404
- quote: data || null,
1405
- isLoading,
1406
- error
1407
- };
1408
- }
1409
-
1410
- // src/create-site-hooks.ts
1411
-
1412
- function createSiteHooks(config = {}) {
1413
- const { callbacks, defaultCustomerId, cache, imageConfig } = config;
1414
- function Provider({ api, auth, children }) {
1415
- const mergedAuth = {
1416
- status: _nullishCoalesce(_optionalChain([auth, 'optionalAccess', _134 => _134.status]), () => ( "unauthenticated")),
1417
- customerId: _optionalChain([auth, 'optionalAccess', _135 => _135.customerId]),
1418
- userId: _optionalChain([auth, 'optionalAccess', _136 => _136.userId]),
1419
- cartHdrUid: _optionalChain([auth, 'optionalAccess', _137 => _137.cartHdrUid])
1420
- };
1421
- return _react.createElement.call(void 0, AugurHooksProvider, {
1422
- api,
1423
- callbacks,
1424
- auth: mergedAuth,
1425
- cache,
1426
- site: defaultCustomerId ? { name: "", defaults: { customerId: defaultCustomerId } } : void 0,
1427
- children
1428
- });
1429
- }
1430
- Provider.displayName = "AugurSiteProvider";
1431
- return {
1432
- Provider,
1433
- // Hooks -- pricing
1434
- useItemPrice,
1435
- useCartPricing,
1436
- // Hooks -- inventory
1437
- useInvMast,
1438
- useInvMastDoc,
1439
- useBatchInvMastDoc,
1440
- useInvMastStock,
1441
- // Hooks -- items & categories
1442
- useItemCategory,
1443
- useProductCategory,
1444
- useItemDetails,
1445
- useItemAttributes,
1446
- // Hooks -- search
1447
- useProductSearch,
1448
- useSearchSuggestions,
1449
- // Hooks -- cart
1450
- useCartActions,
1451
- useCartInitialization,
1452
- // Hooks -- pagination & infinite scroll
1453
- usePaginationPrefetch,
1454
- useCategoryItemsInfinite,
1455
- useItemSearchInfinite,
1456
- // Hooks -- Joomla
1457
- useJoomlaContent,
1458
- useJoomlaContentList,
1459
- useJoomlaMenu,
1460
- useJoomlaMenuDoc,
1461
- // Hooks -- customer
1462
- useCustomerOrders,
1463
- useOrderDetail,
1464
- useCustomerInvoices,
1465
- useInvoiceDetail,
1466
- useCustomerQuotes,
1467
- useQuoteDetail,
1468
- // Hooks -- utilities
1469
- useDebounce,
1470
- useFormatPrice,
1471
- // Hooks -- images
1472
- useImageWithFallback: (imagePath, options) => {
1473
- if (!imageConfig) {
1474
- throw new Error("useImageWithFallback requires imageConfig in createSiteHooks config");
1475
- }
1476
- return _chunkAXCNTEABcjs.useImageWithFallback.call(void 0, imageConfig, imagePath, options);
1477
- }
1478
- };
1479
- }
1480
-
1481
780
  // src/persistence/use-persistence.ts
1482
781
 
1483
782
 
@@ -1494,7 +793,7 @@ function deserialize(data) {
1494
793
 
1495
794
  // src/persistence/apply-limits.ts
1496
795
  function applyLimits(data, limits) {
1497
- const queries = _optionalChain([data, 'access', _138 => _138.clientState, 'optionalAccess', _139 => _139.queries]);
796
+ const queries = _optionalChain([data, 'access', _74 => _74.clientState, 'optionalAccess', _75 => _75.queries]);
1498
797
  if (!queries || Object.keys(limits).length === 0) return data;
1499
798
  const entries = queries;
1500
799
  const unlimited = [];
@@ -1595,7 +894,7 @@ function useStorageMonitor(config) {
1595
894
  const raw = storage.getItem(key);
1596
895
  if (!raw) return;
1597
896
  const parsed = JSON.parse(raw);
1598
- if (!_optionalChain([parsed, 'access', _140 => _140.clientState, 'optionalAccess', _141 => _141.queries])) return;
897
+ if (!_optionalChain([parsed, 'access', _76 => _76.clientState, 'optionalAccess', _77 => _77.queries])) return;
1599
898
  parsed.clientState.queries = parsed.clientState.queries.filter(
1600
899
  (q) => {
1601
900
  if (!Array.isArray(q.queryKey)) return true;
@@ -1622,7 +921,7 @@ function useAugurPersistence(config) {
1622
921
  setIsMounted(true);
1623
922
  }, []);
1624
923
  useStorageMonitor(config);
1625
- const isDev = typeof process !== "undefined" && _optionalChain([process, 'access', _142 => _142.env, 'optionalAccess', _143 => _143["NODE_ENV"]]) === "development";
924
+ const isDev = typeof process !== "undefined" && _optionalChain([process, 'access', _78 => _78.env, 'optionalAccess', _79 => _79["NODE_ENV"]]) === "development";
1626
925
  const { persistableKeys } = config;
1627
926
  const dehydrateOptions = _react.useMemo.call(void 0,
1628
927
  () => ({
@@ -1672,69 +971,5 @@ function useAugurPersistence(config) {
1672
971
 
1673
972
 
1674
973
 
1675
-
1676
-
1677
-
1678
-
1679
-
1680
-
1681
-
1682
-
1683
-
1684
-
1685
-
1686
-
1687
-
1688
-
1689
-
1690
-
1691
-
1692
-
1693
-
1694
-
1695
-
1696
-
1697
-
1698
-
1699
-
1700
-
1701
-
1702
-
1703
-
1704
-
1705
-
1706
-
1707
-
1708
-
1709
-
1710
-
1711
-
1712
-
1713
-
1714
-
1715
-
1716
-
1717
-
1718
-
1719
-
1720
-
1721
-
1722
-
1723
-
1724
-
1725
-
1726
-
1727
-
1728
-
1729
-
1730
-
1731
-
1732
-
1733
-
1734
-
1735
-
1736
-
1737
-
1738
-
1739
- exports.AugurHooksProvider = AugurHooksProvider; exports.createSiteHooks = createSiteHooks; exports.executeBatchQuery = _chunkH7OXSAHPcjs.executeBatchQuery; exports.getBatchInvMastDocKey = _chunkH7OXSAHPcjs.getBatchInvMastDocKey; exports.getBatchInvMastDocOptions = _chunkH7OXSAHPcjs.getBatchInvMastDocOptions; exports.getCartPricingQueryOptions = _chunkH7OXSAHPcjs.getCartPricingQueryOptions; exports.getCategoryItemsInfiniteKey = _chunkH7OXSAHPcjs.getCategoryItemsInfiniteKey; exports.getCategoryItemsInfiniteOptions = _chunkH7OXSAHPcjs.getCategoryItemsInfiniteOptions; exports.getCustomerInvoiceDetailKey = _chunkH7OXSAHPcjs.getCustomerInvoiceDetailKey; exports.getCustomerInvoicesKey = _chunkH7OXSAHPcjs.getCustomerInvoicesKey; exports.getCustomerOrderDetailKey = _chunkH7OXSAHPcjs.getCustomerOrderDetailKey; exports.getCustomerOrdersKey = _chunkH7OXSAHPcjs.getCustomerOrdersKey; exports.getCustomerQuoteDetailKey = _chunkH7OXSAHPcjs.getCustomerQuoteDetailKey; exports.getCustomerQuotesKey = _chunkH7OXSAHPcjs.getCustomerQuotesKey; exports.getInvMastDocKey = _chunkH7OXSAHPcjs.getInvMastDocKey; exports.getInvMastDocOptions = _chunkH7OXSAHPcjs.getInvMastDocOptions; exports.getInvMastKey = _chunkH7OXSAHPcjs.getInvMastKey; exports.getInvMastOptions = _chunkH7OXSAHPcjs.getInvMastOptions; exports.getInvMastStockKey = _chunkH7OXSAHPcjs.getInvMastStockKey; exports.getInvMastStockOptions = _chunkH7OXSAHPcjs.getInvMastStockOptions; exports.getItemAttributesKey = _chunkH7OXSAHPcjs.getItemAttributesKey; exports.getItemAttributesOptions = _chunkH7OXSAHPcjs.getItemAttributesOptions; exports.getItemCategoryKey = _chunkH7OXSAHPcjs.getItemCategoryKey; exports.getItemCategoryOptions = _chunkH7OXSAHPcjs.getItemCategoryOptions; exports.getItemDetailsKey = _chunkH7OXSAHPcjs.getItemDetailsKey; exports.getItemDetailsOptions = _chunkH7OXSAHPcjs.getItemDetailsOptions; exports.getItemPriceKey = _chunkH7OXSAHPcjs.getItemPriceKey; exports.getItemPriceOptions = _chunkH7OXSAHPcjs.getItemPriceOptions; exports.getItemSearchInfiniteKey = _chunkH7OXSAHPcjs.getItemSearchInfiniteKey; exports.getItemSearchInfiniteOptions = _chunkH7OXSAHPcjs.getItemSearchInfiniteOptions; exports.getJoomlaContentKey = _chunkH7OXSAHPcjs.getJoomlaContentKey; exports.getJoomlaContentListKey = _chunkH7OXSAHPcjs.getJoomlaContentListKey; exports.getJoomlaContentListOptions = _chunkH7OXSAHPcjs.getJoomlaContentListOptions; exports.getJoomlaContentOptions = _chunkH7OXSAHPcjs.getJoomlaContentOptions; exports.getJoomlaMenuDocKey = _chunkH7OXSAHPcjs.getJoomlaMenuDocKey; exports.getJoomlaMenuDocOptions = _chunkH7OXSAHPcjs.getJoomlaMenuDocOptions; exports.getJoomlaMenuKey = _chunkH7OXSAHPcjs.getJoomlaMenuKey; exports.getJoomlaMenuOptions = _chunkH7OXSAHPcjs.getJoomlaMenuOptions; exports.getProductCategoryKey = _chunkH7OXSAHPcjs.getProductCategoryKey; exports.getProductCategoryOptions = _chunkH7OXSAHPcjs.getProductCategoryOptions; exports.getProductSearchKey = _chunkH7OXSAHPcjs.getProductSearchKey; exports.getProductSearchOptions = _chunkH7OXSAHPcjs.getProductSearchOptions; exports.getSearchSuggestionsKey = _chunkH7OXSAHPcjs.getSearchSuggestionsKey; exports.getSearchSuggestionsOptions = _chunkH7OXSAHPcjs.getSearchSuggestionsOptions; exports.getStockKey = _chunkH7OXSAHPcjs.getStockKey; exports.getStockOptions = _chunkH7OXSAHPcjs.getStockOptions; exports.useAugurApi = useAugurApi; exports.useAugurApiOptional = useAugurApiOptional; exports.useAugurAuth = useAugurAuth; exports.useAugurCache = useAugurCache; exports.useAugurOptions = useAugurOptions; exports.useAugurPersistence = useAugurPersistence; exports.useAugurSite = useAugurSite; exports.useBatchInvMastDoc = useBatchInvMastDoc; exports.useCartActions = useCartActions; exports.useCartHdrUid = useCartHdrUid; exports.useCartInitialization = useCartInitialization; exports.useCartLineCount = useCartLineCount; exports.useCartLines = useCartLines; exports.useCartPricing = useCartPricing; exports.useCartQuantityTotal = useCartQuantityTotal; exports.useCartStore = useCartStore; exports.useCategoryItemsInfinite = useCategoryItemsInfinite; exports.useClearCart = useClearCart; exports.useCustomerInvoices = useCustomerInvoices; exports.useCustomerOrders = useCustomerOrders; exports.useCustomerQuotes = useCustomerQuotes; exports.useDebounce = useDebounce; exports.useFormatPrice = useFormatPrice; exports.useInvMast = useInvMast; exports.useInvMastDoc = useInvMastDoc; exports.useInvMastStock = useInvMastStock; exports.useInvoiceDetail = useInvoiceDetail; exports.useItemAttributes = useItemAttributes; exports.useItemCategory = useItemCategory; exports.useItemDetails = useItemDetails; exports.useItemFiltersStore = useItemFiltersStore; exports.useItemPrice = useItemPrice; exports.useItemSearchInfinite = useItemSearchInfinite; exports.useJoomlaContent = useJoomlaContent; exports.useJoomlaContentList = useJoomlaContentList; exports.useJoomlaMenu = useJoomlaMenu; exports.useJoomlaMenuDoc = useJoomlaMenuDoc; exports.useOrderDetail = useOrderDetail; exports.usePaginationPrefetch = usePaginationPrefetch; exports.usePaymentFlow = usePaymentFlow; exports.useProductCategory = useProductCategory; exports.useProductSearch = useProductSearch; exports.useQuoteDetail = useQuoteDetail; exports.useSearchSuggestions = useSearchSuggestions; exports.useSetCartHdrUid = useSetCartHdrUid; exports.useSetCartLines = useSetCartLines; exports.useStock = useStock;
974
+ exports.AugurHooksProvider = AugurHooksProvider; exports.executeBatchQuery = _chunkQ5YH4HDRcjs.executeBatchQuery; exports.getCartPricingQueryOptions = _chunkQ5YH4HDRcjs.getCartPricingQueryOptions; exports.getStockKey = _chunkQ5YH4HDRcjs.getStockKey; exports.getStockOptions = _chunkQ5YH4HDRcjs.getStockOptions; exports.useAugurApi = useAugurApi; exports.useAugurApiOptional = useAugurApiOptional; exports.useAugurAuth = useAugurAuth; exports.useAugurCache = useAugurCache; exports.useAugurOptions = useAugurOptions; exports.useAugurPersistence = useAugurPersistence; exports.useAugurSite = useAugurSite; exports.useCartActions = useCartActions; exports.useCartHdrUid = useCartHdrUid; exports.useCartInitialization = useCartInitialization; exports.useCartLineCount = useCartLineCount; exports.useCartLines = useCartLines; exports.useCartPricing = useCartPricing; exports.useCartQuantityTotal = useCartQuantityTotal; exports.useCartStore = useCartStore; exports.useClearCart = useClearCart; exports.useDebounce = useDebounce; exports.useFormatPrice = useFormatPrice; exports.useItemFiltersStore = useItemFiltersStore; exports.usePaginationPrefetch = usePaginationPrefetch; exports.usePaymentFlow = usePaymentFlow; exports.useSetCartHdrUid = useSetCartHdrUid; exports.useSetCartLines = useSetCartLines; exports.useStock = useStock;
1740
975
  //# sourceMappingURL=index.cjs.map