@mercurjs/vendor 2.3.2-canary.1 → 2.3.2-canary.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/{[id]-4VX7CTRZ.js → [id]-3RA6ZIRC.js} +2 -1
  2. package/dist/{[id]-HDVONF6C.js → [id]-4XDMVCJV.js} +5 -1
  3. package/dist/{[id]-QGZ26C6D.js → [id]-EJMM3KYO.js} +2 -1
  4. package/dist/{[id]-RAJUZUNH.js → [id]-FFMEP35K.js} +1 -1
  5. package/dist/{[id]-J7JU4NHO.js → [id]-FJGQEQUJ.js} +7 -2
  6. package/dist/{[id]-6FEVCKQU.js → [id]-GTZJPQTI.js} +7 -1
  7. package/dist/{[id]-VECAKEQ3.js → [id]-IA4BUZQV.js} +3 -1
  8. package/dist/{[id]-HAJ3735Z.js → [id]-MXOPY6G5.js} +9 -4
  9. package/dist/{[id]-Y4HRAAV2.js → [id]-R67KMXFA.js} +7 -3
  10. package/dist/{[id]-5FP6JZM3.js → [id]-SIY5USJF.js} +4 -4
  11. package/dist/{[id]-JXASIBQM.js → [id]-VJQTBSXS.js} +3 -1
  12. package/dist/{[id]-C7IFTDTJ.js → [id]-VQ4CWKQS.js} +2 -1
  13. package/dist/{[id]-S4XLEA36.js → [id]-ZJWTSRKB.js} +2 -1
  14. package/dist/{[location_id]-OXNC5E4F.js → [location_id]-LVDP4IEU.js} +7 -1
  15. package/dist/{[province_id]-VWN4OOGM.js → [province_id]-HO33KA4A.js} +3 -3
  16. package/dist/{add-LH5PQF7R.js → add-2ODITOAL.js} +2 -2
  17. package/dist/{add-Y66CX5EI.js → add-7S4M2PHD.js} +2 -2
  18. package/dist/{add-promotions-DOJS6CEE.js → add-promotions-QTNNFJBY.js} +3 -3
  19. package/dist/{campaigns-LIPKZKI7.js → campaigns-F5XONWHD.js} +2 -2
  20. package/dist/{chunk-XWDESNAO.js → chunk-2EKWWAVT.js} +1 -1
  21. package/dist/{chunk-X4G64W5Q.js → chunk-3SB6USNR.js} +6 -3
  22. package/dist/{chunk-K2DXXPNA.js → chunk-BPLFO6FP.js} +5 -2
  23. package/dist/{chunk-43AYUDTL.js → chunk-BY6UE2E6.js} +5 -2
  24. package/dist/{chunk-BDGZ4EQO.js → chunk-CWCR5ZLS.js} +26 -5
  25. package/dist/{chunk-RBWIHKUF.js → chunk-CXAOQF6T.js} +1 -1
  26. package/dist/{chunk-IV57G2CB.js → chunk-DIIC7A2J.js} +1 -1
  27. package/dist/{chunk-FPBXQIFJ.js → chunk-DJVF754Q.js} +3 -1
  28. package/dist/{chunk-4L7NRBQ7.js → chunk-FDOJFORY.js} +1 -1
  29. package/dist/{chunk-2UJ7T3TA.js → chunk-GGTWSLOP.js} +4 -3
  30. package/dist/{chunk-T37GBZ4L.js → chunk-GW7F5VY6.js} +1 -1
  31. package/dist/{chunk-SCJBJQCL.js → chunk-K3QSFT3Y.js} +6 -2
  32. package/dist/{chunk-XHWBTV72.js → chunk-KZT5KNCW.js} +1 -1
  33. package/dist/{chunk-C5HAUJN3.js → chunk-MGU666OW.js} +1 -1
  34. package/dist/{chunk-EWJTXSKI.js → chunk-O6URKGV5.js} +95 -0
  35. package/dist/{chunk-TII3PB6X.js → chunk-OKJAQM7X.js} +3 -1
  36. package/dist/{chunk-X44P463Q.js → chunk-PXCTLUC4.js} +5 -2
  37. package/dist/{chunk-IMIPUUZG.js → chunk-QWMMXTJS.js} +5 -2
  38. package/dist/{chunk-PEXMLTJX.js → chunk-R53PVMSJ.js} +2 -1
  39. package/dist/{chunk-GYLRZXWS.js → chunk-U24WZUI6.js} +4 -2
  40. package/dist/{chunk-3JWHERV7.js → chunk-W6JA4VGA.js} +5 -2
  41. package/dist/{chunk-ZSDHFX2Q.js → chunk-XAJCJEE7.js} +4 -2
  42. package/dist/{chunk-AQT2G6K2.js → chunk-YERPSW4L.js} +1 -1
  43. package/dist/{create-A6KZEZMH.js → create-DPBYLG6E.js} +1 -1
  44. package/dist/{create-NCVZ2JM7.js → create-HBAU3ASL.js} +2 -2
  45. package/dist/{create-RVZ5RLHX.js → create-NJXDBVXF.js} +5 -5
  46. package/dist/{create-ZVGYET6W.js → create-PVDPEIQA.js} +1 -1
  47. package/dist/{create-BTODQ4T4.js → create-SK7Z6MMJ.js} +1 -1
  48. package/dist/{customer-group-detail-QCPC2YWK.js → customer-group-detail-ORI5NZ2R.js} +2 -2
  49. package/dist/{customer-groups-6WGUNFHG.js → customer-groups-RN24OFMH.js} +6 -3
  50. package/dist/{edit-F34KMSTW.js → edit-MZKTHXEK.js} +2 -2
  51. package/dist/{edit-DRT6VOAA.js → edit-OFYBI6WM.js} +1 -1
  52. package/dist/index.css +3 -0
  53. package/dist/index.js +1162 -1033
  54. package/dist/{inventory-CMIRAJJY.js → inventory-BEJYYVQP.js} +2 -2
  55. package/dist/{locations-BN2BTULF.js → locations-V4K3ZW3T.js} +2 -2
  56. package/dist/{media-WVRRRAFL.js → media-46GUVY75.js} +3 -3
  57. package/dist/{offer-detail-page-AJG6TMJC.js → offer-detail-page-2MRU2HNQ.js} +5 -2
  58. package/dist/{offer-variant-detail-page-CEOS2MVM.js → offer-variant-detail-page-SOONG4U7.js} +4 -1
  59. package/dist/{offers-63CGN6AI.js → offers-4VCSQL3K.js} +3 -3
  60. package/dist/pages/index.js +17 -17
  61. package/dist/{price-lists-U5ASDHMI.js → price-lists-U4IR3425.js} +2 -2
  62. package/dist/{product-types-CMI33S32.js → product-types-SS7BPBQH.js} +2 -2
  63. package/dist/{product-variant-detail-D73ILATK.js → product-variant-detail-XIFGH55M.js} +4 -1
  64. package/dist/{products-ZZUYHZXZ.js → products-7KCMWKIU.js} +6 -6
  65. package/dist/{profile-EU46MXFW.js → profile-2M4KL5JF.js} +1 -1
  66. package/dist/{promotions-ALWQ7J7A.js → promotions-V5T5EY7U.js} +5 -5
  67. package/dist/{register-RCIO7QRB.js → register-T2YUB5NP.js} +1 -1
  68. package/dist/{reservations-C326XEVA.js → reservations-C7ZC7XPK.js} +5 -2
  69. package/dist/{reset-password-ASLKY3GK.js → reset-password-U335V424.js} +1 -1
  70. package/dist/{return-reasons-OJG5J6H2.js → return-reasons-EQULPT57.js} +5 -2
  71. package/dist/{sales-channels-LWEVGTY6.js → sales-channels-6MGHGQFY.js} +2 -2
  72. package/dist/{sales-channels-RJLPZDOZ.js → sales-channels-ZXJKYWQW.js} +2 -2
  73. package/dist/{settings-KDM7NZLY.js → settings-HUMLDZ2O.js} +4 -4
  74. package/dist/{shipping-profiles-647FLCNK.js → shipping-profiles-BHEAMDEX.js} +2 -2
  75. package/dist/{store-V3TTFWYV.js → store-6UZNHYJZ.js} +6 -2
  76. package/dist/{tax-regions-MKEWVKZ7.js → tax-regions-X3QJ7SHM.js} +3 -3
  77. package/dist/{team-WKBFUAGW.js → team-ZPOPUKOW.js} +1 -1
  78. package/package.json +9 -8
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  } from "./chunk-WJ5EU3KW.js";
9
9
  import {
10
10
  I18n
11
- } from "./chunk-EWJTXSKI.js";
11
+ } from "./chunk-O6URKGV5.js";
12
12
  import "./chunk-TKGWSUEI.js";
13
13
  import "./chunk-SITRHMZZ.js";
14
14
  import "./chunk-GDWBOQI5.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-INNFZYX2.js";
22
22
  import {
23
23
  ActionMenu
24
- } from "./chunk-BDGZ4EQO.js";
24
+ } from "./chunk-CWCR5ZLS.js";
25
25
  import {
26
26
  ConditionalTooltip
27
27
  } from "./chunk-LAVHRER2.js";
@@ -33,6 +33,7 @@ import {
33
33
  } from "./chunk-Y7QKP6QU.js";
34
34
  import {
35
35
  notificationQueryKeys,
36
+ useFeatureFlags,
36
37
  useNotifications,
37
38
  useProductTags
38
39
  } from "./chunk-6YQR2AWM.js";
@@ -91,7 +92,8 @@ import {
91
92
  } from "./chunk-RHKRREUU.js";
92
93
  import "./chunk-ZA2KFUFR.js";
93
94
  import {
94
- fetchQuery
95
+ fetchQuery,
96
+ sdk
95
97
  } from "./chunk-DTGEFKK4.js";
96
98
  import "./chunk-NBMM2TZK.js";
97
99
 
@@ -1453,18 +1455,58 @@ import { Outlet as Outlet4 } from "react-router-dom";
1453
1455
 
1454
1456
  // src/components/authentication/protected-route/protected-route.tsx
1455
1457
  import { Spinner as Spinner2 } from "@medusajs/icons";
1458
+ import { PermissionsProvider } from "@mercurjs/dashboard-shared";
1459
+ import { useMemo as useMemo4 } from "react";
1456
1460
  import { Navigate, Outlet, useLocation as useLocation3 } from "react-router-dom";
1461
+
1462
+ // src/hooks/api/rbac.tsx
1463
+ import { useQuery } from "@tanstack/react-query";
1464
+ var ME_PERMISSIONS_QUERY_KEY = ["vendor_rbac_me_permissions"];
1465
+ var mePermissionsQueryKey = ME_PERMISSIONS_QUERY_KEY;
1466
+ var useMePermissions = (options) => {
1467
+ return useQuery({
1468
+ queryFn: () => sdk.vendor.rbac.me.permissions.query(),
1469
+ queryKey: mePermissionsQueryKey,
1470
+ staleTime: 5 * 60 * 1e3,
1471
+ ...options
1472
+ });
1473
+ };
1474
+
1475
+ // src/components/authentication/protected-route/protected-route.tsx
1457
1476
  import { jsx as jsx6 } from "react/jsx-runtime";
1458
1477
  var ProtectedRoute = () => {
1459
1478
  const { seller_member, isLoading } = useMe();
1460
1479
  const location = useLocation3();
1480
+ const { feature_flags } = useFeatureFlags();
1481
+ const isRbacEnabled = !!feature_flags?.rbac;
1482
+ const { data: permissionsResponse, isLoading: isLoadingPermissions } = useMePermissions({
1483
+ // Don't fetch until a seller is resolved — the endpoint reads the role
1484
+ // from the membership the `x-seller-id` header selects.
1485
+ enabled: !!seller_member && isRbacEnabled
1486
+ });
1487
+ const policy = useMemo4(() => {
1488
+ if (!permissionsResponse) {
1489
+ return null;
1490
+ }
1491
+ return {
1492
+ permissions: permissionsResponse.permissions
1493
+ };
1494
+ }, [permissionsResponse]);
1461
1495
  if (isLoading) {
1462
1496
  return /* @__PURE__ */ jsx6("div", { className: "flex min-h-screen items-center justify-center", children: /* @__PURE__ */ jsx6(Spinner2, { className: "text-ui-fg-interactive animate-spin" }) });
1463
1497
  }
1464
1498
  if (!seller_member) {
1465
1499
  return /* @__PURE__ */ jsx6(Navigate, { to: "/login", state: { from: location }, replace: true });
1466
1500
  }
1467
- return /* @__PURE__ */ jsx6(SidebarProvider, { children: /* @__PURE__ */ jsx6(SearchProvider, { children: /* @__PURE__ */ jsx6(Outlet, {}) }) });
1501
+ return /* @__PURE__ */ jsx6(
1502
+ PermissionsProvider,
1503
+ {
1504
+ policy,
1505
+ isLoading: isLoadingPermissions,
1506
+ isRbacEnabled,
1507
+ children: /* @__PURE__ */ jsx6(SidebarProvider, { children: /* @__PURE__ */ jsx6(SearchProvider, { children: /* @__PURE__ */ jsx6(Outlet, {}) }) })
1508
+ }
1509
+ );
1468
1510
  };
1469
1511
 
1470
1512
  // src/components/layout/main-layout/main-layout.tsx
@@ -1483,6 +1525,7 @@ import {
1483
1525
  Users
1484
1526
  } from "@medusajs/icons";
1485
1527
  import { Avatar as Avatar2, Divider, DropdownMenu as DropdownMenu3, Text as Text5, clx as clx5 } from "@medusajs/ui";
1528
+ import { useMemo as useMemo5 } from "react";
1486
1529
  import { useTranslation as useTranslation8 } from "react-i18next";
1487
1530
 
1488
1531
  // src/components/layout/nav-item/nav-item.tsx
@@ -2249,7 +2292,8 @@ var UserItem = () => {
2249
2292
  import menuItemsModule from "virtual:mercur/menu-items";
2250
2293
  import {
2251
2294
  applyNavOverrides,
2252
- useExtension
2295
+ useExtension,
2296
+ usePermissions
2253
2297
  } from "@mercurjs/dashboard-shared";
2254
2298
 
2255
2299
  // src/components/utilities/error-boundary/error-boundary.tsx
@@ -2309,6 +2353,14 @@ var ErrorBoundary = () => {
2309
2353
  };
2310
2354
 
2311
2355
  // src/utils/routes.ts
2356
+ var filterMenuItemsByPermissions = (menuItems, { hasAnyPermission, hasAllPermissions }) => {
2357
+ return menuItems.filter((item) => {
2358
+ if (!item.permissions?.length) {
2359
+ return true;
2360
+ }
2361
+ return item.requireAll ? hasAllPermissions(item.permissions) : hasAnyPermission(item.permissions);
2362
+ });
2363
+ };
2312
2364
  var createBranchRoute = (segment) => ({
2313
2365
  path: segment,
2314
2366
  children: []
@@ -2448,6 +2500,34 @@ var getNestedMenuItems = (menuItems, parentPath) => {
2448
2500
  return menuItems.filter((item) => item.nested === parentPath).sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0));
2449
2501
  };
2450
2502
 
2503
+ // src/lib/permissions/route-permissions.ts
2504
+ var ROUTE_PERMISSIONS = {
2505
+ "/orders": "order:read",
2506
+ "/products": "product:read",
2507
+ "/offers": "offer:read",
2508
+ "/collections": "product_collection:read",
2509
+ "/categories": "product_category:read",
2510
+ "/inventory": "inventory_item:read",
2511
+ "/reservations": "reservation_item:read",
2512
+ "/customers": "customer:read",
2513
+ "/customer-groups": "customer_group:read",
2514
+ "/promotions": "promotion:read",
2515
+ "/campaigns": "campaign:read",
2516
+ "/price-lists": "price_list:read",
2517
+ "/reviews": "review:read",
2518
+ "/payouts": "payout:read",
2519
+ "/settings/store": "seller:read",
2520
+ "/settings/users": "seller_member:read",
2521
+ "/settings/locations": "stock_location:read",
2522
+ "/settings/product-tags": "product_tag:read",
2523
+ "/settings/product-types": "product_type:read",
2524
+ "/settings/return-reasons": "return_reason:read",
2525
+ "/settings/shipping-profiles": "shipping_profile:read",
2526
+ "/settings/tax-regions": "tax_region:read",
2527
+ "/settings/fulfillment-providers": "fulfillment_provider:read"
2528
+ };
2529
+ var getRoutePermission = (path) => ROUTE_PERMISSIONS[path];
2530
+
2451
2531
  // src/components/layout/main-layout/main-layout.tsx
2452
2532
  import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
2453
2533
  var navId = (to) => to.replace(/^\//, "");
@@ -2466,8 +2546,8 @@ var MainLayout = () => {
2466
2546
  return /* @__PURE__ */ jsx12(Shell, { children: /* @__PURE__ */ jsx12(MainSidebar, {}) });
2467
2547
  };
2468
2548
  var allMenuItems = menuItemsModule.menuItems ?? [];
2469
- var addNestedItems = (to, items) => {
2470
- const nestedItems = getNestedMenuItems(allMenuItems, to);
2549
+ var addNestedItems = (to, menuItems, items) => {
2550
+ const nestedItems = getNestedMenuItems(menuItems, to);
2471
2551
  if (nestedItems.length === 0) {
2472
2552
  return items;
2473
2553
  }
@@ -2481,13 +2561,27 @@ var addNestedItems = (to, items) => {
2481
2561
  var MainSidebar = () => {
2482
2562
  const coreRoutes = useCoreRoutes();
2483
2563
  const navOverrides = useExtension().getNavOverrides();
2484
- const customMenuItems = getMenuItemsByType(allMenuItems, "main");
2564
+ const { hasAnyPermission, hasAllPermissions, hasPermission } = usePermissions();
2565
+ const canReach = ({ to }) => {
2566
+ const permission = getRoutePermission(to);
2567
+ return !permission || hasPermission(permission);
2568
+ };
2569
+ const visibleMenuItems = useMemo5(
2570
+ () => filterMenuItemsByPermissions(allMenuItems, {
2571
+ hasAnyPermission,
2572
+ hasAllPermissions
2573
+ }),
2574
+ [hasAnyPermission, hasAllPermissions]
2575
+ );
2576
+ const customMenuItems = getMenuItemsByType(visibleMenuItems, "main");
2485
2577
  const routesWithNested = applyNavOverrides(
2486
2578
  coreRoutes.map(toCoreNavItem),
2487
2579
  navOverrides
2488
- ).map((route) => ({
2580
+ ).filter(canReach).map((route) => ({
2489
2581
  ...route,
2490
- items: addNestedItems(route.to, route.items)
2582
+ items: addNestedItems(route.to, visibleMenuItems, route.items)?.filter(
2583
+ canReach
2584
+ )
2491
2585
  }));
2492
2586
  const customRoutesWithNested = customMenuItems.sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0)).map((item) => {
2493
2587
  const Icon2 = item.icon;
@@ -2496,7 +2590,7 @@ var MainSidebar = () => {
2496
2590
  to: item.path,
2497
2591
  icon: Icon2 ? /* @__PURE__ */ jsx12(Icon2, {}) : void 0,
2498
2592
  translationNs: item.translationNs,
2499
- items: addNestedItems(item.path)
2593
+ items: addNestedItems(item.path, visibleMenuItems)
2500
2594
  };
2501
2595
  });
2502
2596
  return /* @__PURE__ */ jsx12("aside", { className: "flex flex-1 flex-col justify-between overflow-y-auto", children: /* @__PURE__ */ jsxs7("div", { className: "flex flex-1 flex-col", children: [
@@ -2784,24 +2878,37 @@ var PublicLayout = () => {
2784
2878
  import { ArrowUturnLeft as ArrowUturnLeft2, MinusMini } from "@medusajs/icons";
2785
2879
  import { clx as clx6, Divider as Divider2, IconButton as IconButton4, Text as Text6 } from "@medusajs/ui";
2786
2880
  import { Collapsible as RadixCollapsible2 } from "radix-ui";
2787
- import { useEffect as useEffect9, useMemo as useMemo4, useState as useState11 } from "react";
2881
+ import { useEffect as useEffect9, useMemo as useMemo6, useState as useState11 } from "react";
2788
2882
  import { useTranslation as useTranslation9 } from "react-i18next";
2789
2883
  import { Link as Link3, useLocation as useLocation9 } from "react-router-dom";
2790
2884
  import menuItemsModule2 from "virtual:mercur/menu-items";
2885
+ import { usePermissions as usePermissions2 } from "@mercurjs/dashboard-shared";
2791
2886
  import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
2792
2887
  var SettingsLayout = () => {
2793
2888
  return /* @__PURE__ */ jsx14(Shell, { children: /* @__PURE__ */ jsx14(SettingsSidebar, {}) });
2794
2889
  };
2795
2890
  var allMenuItems2 = menuItemsModule2.menuItems ?? [];
2796
- var customSettingsItems = getMenuItemsByType(allMenuItems2, "settings");
2797
- var extensionNavItems = customSettingsItems.sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0)).map((item) => ({
2798
- label: item.label,
2799
- to: item.path,
2800
- translationNs: item.translationNs
2801
- }));
2891
+ var useExtensionNavItems = () => {
2892
+ const { hasAnyPermission, hasAllPermissions } = usePermissions2();
2893
+ return useMemo6(
2894
+ () => getMenuItemsByType(
2895
+ filterMenuItemsByPermissions(allMenuItems2, {
2896
+ hasAnyPermission,
2897
+ hasAllPermissions
2898
+ }),
2899
+ "settings"
2900
+ ).sort((a, b) => (a.rank ?? 0) - (b.rank ?? 0)).map((item) => ({
2901
+ label: item.label,
2902
+ to: item.path,
2903
+ translationNs: item.translationNs
2904
+ })),
2905
+ [hasAnyPermission, hasAllPermissions]
2906
+ );
2907
+ };
2802
2908
  var useSettingRoutes = () => {
2803
2909
  const { t: t2 } = useTranslation9();
2804
- return useMemo4(
2910
+ const extensionNavItems = useExtensionNavItems();
2911
+ return useMemo6(
2805
2912
  () => [
2806
2913
  {
2807
2914
  label: t2("profile.domain"),
@@ -2829,7 +2936,7 @@ var useSettingRoutes = () => {
2829
2936
  },
2830
2937
  ...extensionNavItems
2831
2938
  ],
2832
- [t2]
2939
+ [t2, extensionNavItems]
2833
2940
  );
2834
2941
  };
2835
2942
  var getSafeFromValue = (from) => {
@@ -2839,7 +2946,12 @@ var getSafeFromValue = (from) => {
2839
2946
  return from;
2840
2947
  };
2841
2948
  var SettingsSidebar = () => {
2842
- const generalRoutes = useSettingRoutes();
2949
+ const { hasPermission } = usePermissions2();
2950
+ const canReach = ({ to }) => {
2951
+ const permission = getRoutePermission(to);
2952
+ return !permission || hasPermission(permission);
2953
+ };
2954
+ const generalRoutes = useSettingRoutes().filter(canReach);
2843
2955
  const { t: t2 } = useTranslation9();
2844
2956
  return /* @__PURE__ */ jsxs8("aside", { className: "relative flex flex-1 flex-col justify-between overflow-y-auto", children: [
2845
2957
  /* @__PURE__ */ jsxs8("div", { className: "bg-ui-bg-subtle sticky top-0", children: [
@@ -2904,6 +3016,7 @@ var UserSection = () => {
2904
3016
  };
2905
3017
 
2906
3018
  // src/get-route-map.tsx
3019
+ import { RoutePermissionGuard } from "@mercurjs/dashboard-shared";
2907
3020
  import { jsx as jsx15 } from "react/jsx-runtime";
2908
3021
  function mergeRoutes(baseRoutes, customRoutes2) {
2909
3022
  const result = baseRoutes.map((route) => ({ ...route }));
@@ -2939,116 +3052,50 @@ function getRouteMap({
2939
3052
  children: [
2940
3053
  {
2941
3054
  element: /* @__PURE__ */ jsx15(MainLayout, {}),
2942
- children: mergeRoutes(
2943
- [
2944
- {
2945
- path: "/",
2946
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
2947
- lazy: () => import("./home-I3OILW5Z.js")
2948
- },
2949
- {
2950
- path: "/products",
2951
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
2952
- handle: { breadcrumb: () => t("products.domain") },
2953
- children: [
3055
+ children: [
3056
+ {
3057
+ // Pathless wrapper so every route below — including extension
3058
+ // routes merged in from virtual:mercur/routes — is enforced
3059
+ // without each one wiring its own guard element.
3060
+ element: /* @__PURE__ */ jsx15(RoutePermissionGuard, {}),
3061
+ children: mergeRoutes(
3062
+ [
2954
3063
  {
2955
- path: "",
2956
- lazy: async () => {
2957
- const { productListLoader, ProductListPage } = await import("./products-ZZUYHZXZ.js");
2958
- return {
2959
- Component: ProductListPage,
2960
- loader: productListLoader
2961
- };
2962
- },
2963
- children: [
2964
- {
2965
- path: "create",
2966
- lazy: async () => {
2967
- const { ProductCreatePage } = await import("./create-RVZ5RLHX.js");
2968
- return {
2969
- Component: ProductCreatePage
2970
- };
2971
- }
2972
- }
2973
- ]
3064
+ path: "/",
3065
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3066
+ lazy: () => import("./home-I3OILW5Z.js")
2974
3067
  },
2975
3068
  {
2976
- path: ":id",
2977
- lazy: async () => {
2978
- const { loader } = await import("./[id]-J7JU4NHO.js");
2979
- const { Breadcrumb } = await import("./breadcrumb-CX5327S5.js");
2980
- return {
2981
- Component: Outlet4,
2982
- loader,
2983
- handle: {
2984
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
2985
- }
2986
- };
2987
- },
3069
+ path: "/products",
3070
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3071
+ handle: { breadcrumb: () => t("products.domain"), permissions: "product:read" },
2988
3072
  children: [
2989
3073
  {
2990
3074
  path: "",
2991
3075
  lazy: async () => {
2992
- const { ProductDetailPage } = await import("./[id]-J7JU4NHO.js");
3076
+ const { productListLoader, ProductListPage } = await import("./products-7KCMWKIU.js");
2993
3077
  return {
2994
- Component: ProductDetailPage
3078
+ Component: ProductListPage,
3079
+ loader: productListLoader
2995
3080
  };
2996
3081
  },
2997
3082
  children: [
2998
3083
  {
2999
- path: "edit",
3000
- lazy: () => import("./edit-KJPJW6OF.js")
3001
- },
3002
- {
3003
- path: "edit-variant",
3004
- lazy: () => import("./product-variant-edit-ZRKRQEDM.js")
3005
- },
3006
- {
3007
- path: "sales-channels",
3008
- lazy: () => import("./sales-channels-RJLPZDOZ.js")
3009
- },
3010
- {
3011
- path: "organization",
3012
- lazy: () => import("./organization-ZJPSTBIP.js")
3013
- },
3014
- {
3015
- path: "media",
3016
- lazy: () => import("./media-WVRRRAFL.js")
3017
- },
3018
- {
3019
- path: "attributes",
3020
- lazy: () => import("./attributes-6KZMMR7U.js")
3021
- },
3022
- {
3023
- path: "attributes/create",
3024
- lazy: () => import("./create-I4NRCSKA.js")
3025
- },
3026
- {
3027
- path: "attributes/add",
3028
- lazy: () => import("./add-LH5PQF7R.js")
3029
- },
3030
- {
3031
- path: "attributes/:attribute_id/edit",
3032
- lazy: () => import("./edit-ITLVTC2R.js")
3033
- },
3034
- {
3035
- path: "metadata",
3036
- lazy: () => import("./metadata-FRXIY35J.js")
3037
- },
3038
- {
3039
- path: "shipping-profile",
3040
- lazy: () => import("./shipping-profile-7P3RPEIJ.js")
3041
- },
3042
- {
3043
- path: "variants/create",
3044
- lazy: () => import("./create-5FJO5JTE.js")
3084
+ path: "create",
3085
+ lazy: async () => {
3086
+ const { ProductCreatePage } = await import("./create-NJXDBVXF.js");
3087
+ return {
3088
+ Component: ProductCreatePage
3089
+ };
3090
+ }
3045
3091
  }
3046
3092
  ]
3047
3093
  },
3048
3094
  {
3049
- path: "variants/:variant_id",
3095
+ path: ":id",
3050
3096
  lazy: async () => {
3051
- const { loader, Breadcrumb } = await import("./product-variant-detail-D73ILATK.js");
3097
+ const { loader } = await import("./[id]-FJGQEQUJ.js");
3098
+ const { Breadcrumb } = await import("./breadcrumb-CX5327S5.js");
3052
3099
  return {
3053
3100
  Component: Outlet4,
3054
3101
  loader,
@@ -3060,411 +3107,396 @@ function getRouteMap({
3060
3107
  children: [
3061
3108
  {
3062
3109
  path: "",
3063
- lazy: () => import("./product-variant-detail-D73ILATK.js"),
3110
+ lazy: async () => {
3111
+ const { ProductDetailPage } = await import("./[id]-FJGQEQUJ.js");
3112
+ return {
3113
+ Component: ProductDetailPage
3114
+ };
3115
+ },
3064
3116
  children: [
3065
3117
  {
3066
3118
  path: "edit",
3119
+ lazy: () => import("./edit-KJPJW6OF.js")
3120
+ },
3121
+ {
3122
+ path: "edit-variant",
3067
3123
  lazy: () => import("./product-variant-edit-ZRKRQEDM.js")
3068
3124
  },
3125
+ {
3126
+ path: "sales-channels",
3127
+ lazy: () => import("./sales-channels-ZXJKYWQW.js")
3128
+ },
3129
+ {
3130
+ path: "organization",
3131
+ lazy: () => import("./organization-ZJPSTBIP.js")
3132
+ },
3069
3133
  {
3070
3134
  path: "media",
3071
- lazy: () => import("./media-AZVZGDL2.js")
3135
+ lazy: () => import("./media-46GUVY75.js")
3136
+ },
3137
+ {
3138
+ path: "attributes",
3139
+ lazy: () => import("./attributes-6KZMMR7U.js")
3140
+ },
3141
+ {
3142
+ path: "attributes/create",
3143
+ lazy: () => import("./create-I4NRCSKA.js")
3144
+ },
3145
+ {
3146
+ path: "attributes/add",
3147
+ lazy: () => import("./add-2ODITOAL.js")
3148
+ },
3149
+ {
3150
+ path: "attributes/:attribute_id/edit",
3151
+ lazy: () => import("./edit-ITLVTC2R.js")
3152
+ },
3153
+ {
3154
+ path: "metadata",
3155
+ lazy: () => import("./metadata-FRXIY35J.js")
3156
+ },
3157
+ {
3158
+ path: "shipping-profile",
3159
+ lazy: () => import("./shipping-profile-7P3RPEIJ.js")
3160
+ },
3161
+ {
3162
+ path: "variants/create",
3163
+ lazy: () => import("./create-5FJO5JTE.js")
3164
+ }
3165
+ ]
3166
+ },
3167
+ {
3168
+ path: "variants/:variant_id",
3169
+ lazy: async () => {
3170
+ const { loader, Breadcrumb } = await import("./product-variant-detail-XIFGH55M.js");
3171
+ return {
3172
+ Component: Outlet4,
3173
+ loader,
3174
+ handle: {
3175
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3176
+ }
3177
+ };
3178
+ },
3179
+ children: [
3180
+ {
3181
+ path: "",
3182
+ lazy: () => import("./product-variant-detail-XIFGH55M.js"),
3183
+ children: [
3184
+ {
3185
+ path: "edit",
3186
+ lazy: () => import("./product-variant-edit-ZRKRQEDM.js")
3187
+ },
3188
+ {
3189
+ path: "media",
3190
+ lazy: () => import("./media-AZVZGDL2.js")
3191
+ }
3192
+ ]
3072
3193
  }
3073
3194
  ]
3074
3195
  }
3075
3196
  ]
3076
3197
  }
3077
3198
  ]
3078
- }
3079
- ]
3080
- },
3081
- // ORDERS
3082
- {
3083
- path: "/orders",
3084
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3085
- handle: { breadcrumb: () => t("orders.domain") },
3086
- children: [
3087
- {
3088
- path: "",
3089
- lazy: async () => {
3090
- const { OrderListPage } = await import("./orders-KNWJJEQH.js");
3091
- return { Component: OrderListPage };
3092
- }
3093
3199
  },
3200
+ // ORDERS
3094
3201
  {
3095
- path: ":id",
3096
- lazy: async () => {
3097
- const { loader } = await import("./[id]-RAJUZUNH.js");
3098
- const { Breadcrumb } = await import("./breadcrumb-RQ52GELM.js");
3099
- return {
3100
- Component: Outlet4,
3101
- loader,
3102
- handle: {
3103
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3104
- }
3105
- };
3106
- },
3202
+ path: "/orders",
3203
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3204
+ handle: { breadcrumb: () => t("orders.domain"), permissions: "order:read" },
3107
3205
  children: [
3108
3206
  {
3109
3207
  path: "",
3110
3208
  lazy: async () => {
3111
- const { OrderDetailPage } = await import("./[id]-RAJUZUNH.js");
3112
- return { Component: OrderDetailPage };
3209
+ const { OrderListPage } = await import("./orders-KNWJJEQH.js");
3210
+ return { Component: OrderListPage };
3211
+ }
3212
+ },
3213
+ {
3214
+ path: ":id",
3215
+ lazy: async () => {
3216
+ const { loader } = await import("./[id]-FFMEP35K.js");
3217
+ const { Breadcrumb } = await import("./breadcrumb-RQ52GELM.js");
3218
+ return {
3219
+ Component: Outlet4,
3220
+ loader,
3221
+ handle: {
3222
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3223
+ }
3224
+ };
3113
3225
  },
3114
3226
  children: [
3115
3227
  {
3116
- path: "fulfillment",
3117
- lazy: () => import("./fulfillment-DEGKZL42.js")
3118
- },
3119
- {
3120
- path: "allocate-items",
3121
- lazy: () => import("./allocate-items-QAYROQMK.js")
3122
- },
3123
- {
3124
- path: ":f_id/create-shipment",
3125
- lazy: () => import("./shipment-XOU6F7AS.js")
3126
- },
3127
- {
3128
- path: "returns/create",
3129
- lazy: () => import("./create-ZVGYET6W.js")
3130
- },
3131
- {
3132
- path: "returns/:return_id/receive",
3133
- lazy: () => import("./receive-RRZK3FP2.js")
3134
- },
3135
- {
3136
- path: "refund",
3137
- lazy: () => import("./refund-FLCZAMPR.js")
3138
- },
3139
- {
3140
- path: "edit",
3141
- lazy: () => import("./edit-DRT6VOAA.js")
3142
- },
3143
- {
3144
- path: "exchanges/create",
3145
- lazy: () => import("./create-BTODQ4T4.js")
3146
- },
3147
- {
3148
- path: "claims/create",
3149
- lazy: () => import("./create-A6KZEZMH.js")
3228
+ path: "",
3229
+ lazy: async () => {
3230
+ const { OrderDetailPage } = await import("./[id]-FFMEP35K.js");
3231
+ return { Component: OrderDetailPage };
3232
+ },
3233
+ children: [
3234
+ {
3235
+ path: "fulfillment",
3236
+ lazy: () => import("./fulfillment-DEGKZL42.js")
3237
+ },
3238
+ {
3239
+ path: "allocate-items",
3240
+ lazy: () => import("./allocate-items-QAYROQMK.js")
3241
+ },
3242
+ {
3243
+ path: ":f_id/create-shipment",
3244
+ lazy: () => import("./shipment-XOU6F7AS.js")
3245
+ },
3246
+ {
3247
+ path: "returns/create",
3248
+ lazy: () => import("./create-PVDPEIQA.js")
3249
+ },
3250
+ {
3251
+ path: "returns/:return_id/receive",
3252
+ lazy: () => import("./receive-RRZK3FP2.js")
3253
+ },
3254
+ {
3255
+ path: "refund",
3256
+ lazy: () => import("./refund-FLCZAMPR.js")
3257
+ },
3258
+ {
3259
+ path: "edit",
3260
+ lazy: () => import("./edit-OFYBI6WM.js")
3261
+ },
3262
+ {
3263
+ path: "exchanges/create",
3264
+ lazy: () => import("./create-SK7Z6MMJ.js")
3265
+ },
3266
+ {
3267
+ path: "claims/create",
3268
+ lazy: () => import("./create-DPBYLG6E.js")
3269
+ }
3270
+ ]
3150
3271
  }
3151
3272
  ]
3152
3273
  }
3153
3274
  ]
3154
- }
3155
- ]
3156
- },
3157
- // PAYOUTS
3158
- {
3159
- path: "/payouts",
3160
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3161
- handle: { breadcrumb: () => "Payouts" },
3162
- children: [
3163
- {
3164
- path: "",
3165
- lazy: async () => {
3166
- const { PayoutListPage } = await import("./payouts-26ZOYDRP.js");
3167
- return { Component: PayoutListPage };
3168
- }
3169
3275
  },
3276
+ // PAYOUTS
3170
3277
  {
3171
- path: ":id",
3172
- lazy: async () => {
3173
- const { Breadcrumb } = await import("./breadcrumb-75QGQDKN.js");
3174
- return {
3175
- Component: Outlet4,
3176
- handle: {
3177
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3178
- }
3179
- };
3180
- },
3278
+ path: "/payouts",
3279
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3280
+ handle: { breadcrumb: () => "Payouts", permissions: "payout:read" },
3181
3281
  children: [
3182
3282
  {
3183
3283
  path: "",
3184
3284
  lazy: async () => {
3185
- const { PayoutDetailPage } = await import("./[id]-QWI3RWE6.js");
3186
- return { Component: PayoutDetailPage };
3187
- }
3188
- }
3189
- ]
3190
- }
3191
- ]
3192
- },
3193
- // CATEGORIES
3194
- {
3195
- path: "/categories",
3196
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3197
- handle: { breadcrumb: () => t("categories.domain") },
3198
- children: [
3199
- {
3200
- path: "",
3201
- lazy: async () => {
3202
- const { CategoryListPage } = await import("./categories-D2U6VLH5.js");
3203
- return {
3204
- Component: CategoryListPage
3205
- };
3206
- },
3207
- children: [
3208
- {
3209
- path: "organize",
3210
- lazy: () => import("./organize-GZ5URDMH.js")
3211
- }
3212
- ]
3213
- },
3214
- {
3215
- path: ":id",
3216
- lazy: async () => {
3217
- const { loader } = await import("./[id]-VW7X7XUI.js");
3218
- const { Breadcrumb } = await import("./breadcrumb-HMW2K4DW.js");
3219
- return {
3220
- Component: Outlet4,
3221
- loader,
3222
- handle: {
3223
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3285
+ const { PayoutListPage } = await import("./payouts-26ZOYDRP.js");
3286
+ return { Component: PayoutListPage };
3224
3287
  }
3225
- };
3226
- },
3227
- children: [
3288
+ },
3228
3289
  {
3229
- path: "",
3290
+ path: ":id",
3230
3291
  lazy: async () => {
3231
- const { CategoryDetailPage } = await import("./[id]-VW7X7XUI.js");
3292
+ const { Breadcrumb } = await import("./breadcrumb-75QGQDKN.js");
3232
3293
  return {
3233
- Component: CategoryDetailPage
3294
+ Component: Outlet4,
3295
+ handle: {
3296
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3297
+ }
3234
3298
  };
3235
3299
  },
3236
3300
  children: [
3237
3301
  {
3238
- path: "products",
3239
- lazy: () => import("./products-6CQNULEY.js")
3240
- },
3241
- {
3242
- path: "organize",
3243
- lazy: () => import("./organize-F2KDXDHQ.js")
3244
- },
3245
- {
3246
- path: "metadata",
3247
- lazy: () => import("./metadata-E3BDAMIO.js")
3302
+ path: "",
3303
+ lazy: async () => {
3304
+ const { PayoutDetailPage } = await import("./[id]-QWI3RWE6.js");
3305
+ return { Component: PayoutDetailPage };
3306
+ }
3248
3307
  }
3249
3308
  ]
3250
3309
  }
3251
3310
  ]
3252
- }
3253
- ]
3254
- },
3255
- // COLLECTIONS
3256
- {
3257
- path: "/collections",
3258
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3259
- handle: { breadcrumb: () => t("collections.domain") },
3260
- children: [
3261
- {
3262
- path: "",
3263
- lazy: async () => {
3264
- const { CollectionListPage } = await import("./collections-XZZNTRDI.js");
3265
- return {
3266
- Component: CollectionListPage
3267
- };
3268
- }
3269
3311
  },
3312
+ // CATEGORIES
3270
3313
  {
3271
- path: ":id",
3272
- lazy: async () => {
3273
- const { loader } = await import("./[id]-S4XLEA36.js");
3274
- const { Breadcrumb } = await import("./breadcrumb-NBO7UIBV.js");
3275
- return {
3276
- Component: Outlet4,
3277
- loader,
3278
- handle: {
3279
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3280
- }
3281
- };
3282
- },
3314
+ path: "/categories",
3315
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3316
+ handle: { breadcrumb: () => t("categories.domain"), permissions: "product_category:read" },
3283
3317
  children: [
3284
3318
  {
3285
3319
  path: "",
3286
3320
  lazy: async () => {
3287
- const { CollectionDetailPage } = await import("./[id]-S4XLEA36.js");
3321
+ const { CategoryListPage } = await import("./categories-D2U6VLH5.js");
3288
3322
  return {
3289
- Component: CollectionDetailPage
3323
+ Component: CategoryListPage
3290
3324
  };
3291
3325
  },
3292
3326
  children: [
3293
3327
  {
3294
- path: "add-products",
3295
- lazy: () => import("./add-products-IHTR3E2E.js")
3296
- },
3297
- {
3298
- path: "metadata",
3299
- lazy: () => import("./metadata-ZZMJNWS3.js")
3328
+ path: "organize",
3329
+ lazy: () => import("./organize-GZ5URDMH.js")
3300
3330
  }
3301
3331
  ]
3302
- }
3303
- ]
3304
- }
3305
- ]
3306
- },
3307
- // CUSTOMERS
3308
- {
3309
- path: "/customers",
3310
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3311
- handle: { breadcrumb: () => t("customers.domain") },
3312
- children: [
3313
- {
3314
- path: "",
3315
- lazy: async () => {
3316
- const { CustomerListPage } = await import("./customers-7OGYQSGA.js");
3317
- return {
3318
- Component: CustomerListPage
3319
- };
3320
- }
3321
- },
3322
- {
3323
- path: ":id",
3324
- lazy: async () => {
3325
- const { loader } = await import("./[id]-4VX7CTRZ.js");
3326
- const { Breadcrumb } = await import("./breadcrumb-GLBWFHKW.js");
3327
- return {
3328
- Component: Outlet4,
3329
- loader,
3330
- handle: {
3331
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3332
- }
3333
- };
3334
- },
3335
- children: [
3332
+ },
3336
3333
  {
3337
- path: "",
3334
+ path: ":id",
3338
3335
  lazy: async () => {
3339
- const { CustomerDetailPage } = await import("./[id]-4VX7CTRZ.js");
3336
+ const { loader } = await import("./[id]-VW7X7XUI.js");
3337
+ const { Breadcrumb } = await import("./breadcrumb-HMW2K4DW.js");
3340
3338
  return {
3341
- Component: CustomerDetailPage
3339
+ Component: Outlet4,
3340
+ loader,
3341
+ handle: {
3342
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3343
+ }
3342
3344
  };
3343
3345
  },
3344
3346
  children: [
3345
3347
  {
3346
- path: "add-customer-groups",
3347
- lazy: () => import("./add-customer-groups-VJYI5J5Z.js")
3348
+ path: "",
3349
+ lazy: async () => {
3350
+ const { CategoryDetailPage } = await import("./[id]-VW7X7XUI.js");
3351
+ return {
3352
+ Component: CategoryDetailPage
3353
+ };
3354
+ },
3355
+ children: [
3356
+ {
3357
+ path: "products",
3358
+ lazy: () => import("./products-6CQNULEY.js")
3359
+ },
3360
+ {
3361
+ path: "organize",
3362
+ lazy: () => import("./organize-F2KDXDHQ.js")
3363
+ },
3364
+ {
3365
+ path: "metadata",
3366
+ lazy: () => import("./metadata-E3BDAMIO.js")
3367
+ }
3368
+ ]
3348
3369
  }
3349
3370
  ]
3350
3371
  }
3351
3372
  ]
3352
- }
3353
- ]
3354
- },
3355
- // CUSTOMER GROUPS
3356
- {
3357
- path: "/customer-groups",
3358
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3359
- handle: { breadcrumb: () => t("customerGroups.domain") },
3360
- children: [
3373
+ },
3374
+ // COLLECTIONS
3361
3375
  {
3362
- path: "",
3363
- lazy: async () => {
3364
- const { CustomerGroupListPage } = await import("./customer-groups-6WGUNFHG.js");
3365
- return {
3366
- Component: CustomerGroupListPage
3367
- };
3368
- },
3376
+ path: "/collections",
3377
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3378
+ handle: { breadcrumb: () => t("collections.domain"), permissions: "product_collection:read" },
3369
3379
  children: [
3370
3380
  {
3371
- path: "create",
3372
- lazy: () => import("./customer-group-create-L3H5REVP.js")
3373
- }
3374
- ]
3375
- },
3376
- {
3377
- path: ":id",
3378
- lazy: async () => {
3379
- const { loader } = await import("./customer-group-detail-QCPC2YWK.js");
3380
- const { Breadcrumb } = await import("./breadcrumb-4ZZFD3UH.js");
3381
- return {
3382
- Component: Outlet4,
3383
- loader,
3384
- handle: {
3385
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3381
+ path: "",
3382
+ lazy: async () => {
3383
+ const { CollectionListPage } = await import("./collections-XZZNTRDI.js");
3384
+ return {
3385
+ Component: CollectionListPage
3386
+ };
3386
3387
  }
3387
- };
3388
- },
3389
- children: [
3388
+ },
3390
3389
  {
3391
- path: "",
3390
+ path: ":id",
3392
3391
  lazy: async () => {
3393
- const { CustomerGroupDetailPage } = await import("./customer-group-detail-QCPC2YWK.js");
3392
+ const { loader } = await import("./[id]-ZJWTSRKB.js");
3393
+ const { Breadcrumb } = await import("./breadcrumb-NBO7UIBV.js");
3394
3394
  return {
3395
- Component: CustomerGroupDetailPage
3395
+ Component: Outlet4,
3396
+ loader,
3397
+ handle: {
3398
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3399
+ }
3396
3400
  };
3397
3401
  },
3398
3402
  children: [
3399
3403
  {
3400
- path: "edit",
3401
- lazy: () => import("./customer-group-edit-D6FJH5TK.js")
3402
- },
3403
- {
3404
- path: "add-customers",
3405
- lazy: () => import("./customer-group-add-customers-BSMUKWVO.js")
3404
+ path: "",
3405
+ lazy: async () => {
3406
+ const { CollectionDetailPage } = await import("./[id]-ZJWTSRKB.js");
3407
+ return {
3408
+ Component: CollectionDetailPage
3409
+ };
3410
+ },
3411
+ children: [
3412
+ {
3413
+ path: "add-products",
3414
+ lazy: () => import("./add-products-IHTR3E2E.js")
3415
+ },
3416
+ {
3417
+ path: "metadata",
3418
+ lazy: () => import("./metadata-ZZMJNWS3.js")
3419
+ }
3420
+ ]
3406
3421
  }
3407
3422
  ]
3408
3423
  }
3409
3424
  ]
3410
- }
3411
- ]
3412
- },
3413
- // OFFERS
3414
- {
3415
- path: "/offers",
3416
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3417
- handle: { breadcrumb: () => t("offers.domain") },
3418
- children: [
3425
+ },
3426
+ // CUSTOMERS
3419
3427
  {
3420
- path: "",
3421
- lazy: async () => {
3422
- const { OfferListPage } = await import("./offers-63CGN6AI.js");
3423
- return { Component: OfferListPage };
3424
- },
3428
+ path: "/customers",
3429
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3430
+ handle: { breadcrumb: () => t("customers.domain"), permissions: "customer:read" },
3425
3431
  children: [
3426
3432
  {
3427
- path: "create",
3428
- lazy: () => import("./offer-create-page-55YDL2OJ.js")
3433
+ path: "",
3434
+ lazy: async () => {
3435
+ const { CustomerListPage } = await import("./customers-7OGYQSGA.js");
3436
+ return {
3437
+ Component: CustomerListPage
3438
+ };
3439
+ }
3440
+ },
3441
+ {
3442
+ path: ":id",
3443
+ lazy: async () => {
3444
+ const { loader } = await import("./[id]-3RA6ZIRC.js");
3445
+ const { Breadcrumb } = await import("./breadcrumb-GLBWFHKW.js");
3446
+ return {
3447
+ Component: Outlet4,
3448
+ loader,
3449
+ handle: {
3450
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3451
+ }
3452
+ };
3453
+ },
3454
+ children: [
3455
+ {
3456
+ path: "",
3457
+ lazy: async () => {
3458
+ const { CustomerDetailPage } = await import("./[id]-3RA6ZIRC.js");
3459
+ return {
3460
+ Component: CustomerDetailPage
3461
+ };
3462
+ },
3463
+ children: [
3464
+ {
3465
+ path: "add-customer-groups",
3466
+ lazy: () => import("./add-customer-groups-VJYI5J5Z.js")
3467
+ }
3468
+ ]
3469
+ }
3470
+ ]
3429
3471
  }
3430
3472
  ]
3431
3473
  },
3474
+ // CUSTOMER GROUPS
3432
3475
  {
3433
- path: ":id",
3434
- lazy: async () => {
3435
- const { loader } = await import("./loader-3BXYSKPT.js");
3436
- const { Breadcrumb } = await import("./breadcrumb-WBUUK3AP.js");
3437
- return {
3438
- Component: Outlet4,
3439
- loader,
3440
- handle: {
3441
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3442
- }
3443
- };
3444
- },
3476
+ path: "/customer-groups",
3477
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3478
+ handle: { breadcrumb: () => t("customerGroups.domain"), permissions: "customer_group:read" },
3445
3479
  children: [
3446
3480
  {
3447
3481
  path: "",
3448
3482
  lazy: async () => {
3449
- const { OfferDetailPage } = await import("./offer-detail-page-AJG6TMJC.js");
3450
- return { Component: OfferDetailPage };
3483
+ const { CustomerGroupListPage } = await import("./customer-groups-RN24OFMH.js");
3484
+ return {
3485
+ Component: CustomerGroupListPage
3486
+ };
3451
3487
  },
3452
3488
  children: [
3453
3489
  {
3454
- path: "edit-price",
3455
- lazy: () => import("./edit-price-PW6NNJNM.js")
3456
- },
3457
- {
3458
- path: "edit-stock",
3459
- lazy: () => import("./edit-stock-XVFVYLGU.js")
3490
+ path: "create",
3491
+ lazy: () => import("./customer-group-create-L3H5REVP.js")
3460
3492
  }
3461
3493
  ]
3462
3494
  },
3463
3495
  {
3464
- path: "variants/:offer_id",
3496
+ path: ":id",
3465
3497
  lazy: async () => {
3466
- const { loader } = await import("./loader-CF54CDM6.js");
3467
- const { Breadcrumb } = await import("./breadcrumb-MH2L34OD.js");
3498
+ const { loader } = await import("./customer-group-detail-ORI5NZ2R.js");
3499
+ const { Breadcrumb } = await import("./breadcrumb-4ZZFD3UH.js");
3468
3500
  return {
3469
3501
  Component: Outlet4,
3470
3502
  loader,
@@ -3477,412 +3509,501 @@ function getRouteMap({
3477
3509
  {
3478
3510
  path: "",
3479
3511
  lazy: async () => {
3480
- const { OfferVariantDetailPage } = await import("./offer-variant-detail-page-CEOS2MVM.js");
3481
- return { Component: OfferVariantDetailPage };
3512
+ const { CustomerGroupDetailPage } = await import("./customer-group-detail-ORI5NZ2R.js");
3513
+ return {
3514
+ Component: CustomerGroupDetailPage
3515
+ };
3482
3516
  },
3483
3517
  children: [
3484
3518
  {
3485
3519
  path: "edit",
3486
- lazy: () => import("./edit-AK4E63X6.js")
3487
- },
3488
- {
3489
- path: "shipping",
3490
- lazy: () => import("./shipping-IMCP7UDV.js")
3491
- },
3492
- {
3493
- path: "pricing",
3494
- lazy: () => import("./pricing-E4YGL6C3.js")
3495
- },
3496
- {
3497
- path: "inventory",
3498
- lazy: () => import("./inventory-Q3I6Z7AT.js")
3520
+ lazy: () => import("./customer-group-edit-D6FJH5TK.js")
3499
3521
  },
3500
3522
  {
3501
- path: "manage-items",
3502
- lazy: () => import("./manage-items-63FPRK7Z.js")
3523
+ path: "add-customers",
3524
+ lazy: () => import("./customer-group-add-customers-BSMUKWVO.js")
3503
3525
  }
3504
3526
  ]
3505
3527
  }
3506
3528
  ]
3507
3529
  }
3508
3530
  ]
3509
- }
3510
- ]
3511
- },
3512
- // INVENTORY
3513
- {
3514
- path: "/inventory",
3515
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3516
- handle: { breadcrumb: () => t("inventory.domain") },
3517
- children: [
3531
+ },
3532
+ // OFFERS
3518
3533
  {
3519
- path: "",
3520
- lazy: async () => {
3521
- const { InventoryListPage } = await import("./inventory-CMIRAJJY.js");
3522
- return {
3523
- Component: InventoryListPage
3524
- };
3525
- },
3534
+ path: "/offers",
3535
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3536
+ handle: { breadcrumb: () => t("offers.domain"), permissions: "offer:read" },
3526
3537
  children: [
3527
3538
  {
3528
- path: "create",
3529
- lazy: () => import("./create-THJGKBWT.js")
3539
+ path: "",
3540
+ lazy: async () => {
3541
+ const { OfferListPage } = await import("./offers-4VCSQL3K.js");
3542
+ return { Component: OfferListPage };
3543
+ },
3544
+ children: [
3545
+ {
3546
+ path: "create",
3547
+ lazy: () => import("./offer-create-page-55YDL2OJ.js")
3548
+ }
3549
+ ]
3530
3550
  },
3531
3551
  {
3532
- path: "stock",
3533
- lazy: () => import("./stock-XCM7H6IW.js")
3552
+ path: ":id",
3553
+ lazy: async () => {
3554
+ const { loader } = await import("./loader-3BXYSKPT.js");
3555
+ const { Breadcrumb } = await import("./breadcrumb-WBUUK3AP.js");
3556
+ return {
3557
+ Component: Outlet4,
3558
+ loader,
3559
+ handle: {
3560
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3561
+ }
3562
+ };
3563
+ },
3564
+ children: [
3565
+ {
3566
+ path: "",
3567
+ lazy: async () => {
3568
+ const { OfferDetailPage } = await import("./offer-detail-page-2MRU2HNQ.js");
3569
+ return { Component: OfferDetailPage };
3570
+ },
3571
+ children: [
3572
+ {
3573
+ path: "edit-price",
3574
+ lazy: () => import("./edit-price-PW6NNJNM.js")
3575
+ },
3576
+ {
3577
+ path: "edit-stock",
3578
+ lazy: () => import("./edit-stock-XVFVYLGU.js")
3579
+ }
3580
+ ]
3581
+ },
3582
+ {
3583
+ path: "variants/:offer_id",
3584
+ lazy: async () => {
3585
+ const { loader } = await import("./loader-CF54CDM6.js");
3586
+ const { Breadcrumb } = await import("./breadcrumb-MH2L34OD.js");
3587
+ return {
3588
+ Component: Outlet4,
3589
+ loader,
3590
+ handle: {
3591
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3592
+ }
3593
+ };
3594
+ },
3595
+ children: [
3596
+ {
3597
+ path: "",
3598
+ lazy: async () => {
3599
+ const { OfferVariantDetailPage } = await import("./offer-variant-detail-page-SOONG4U7.js");
3600
+ return { Component: OfferVariantDetailPage };
3601
+ },
3602
+ children: [
3603
+ {
3604
+ path: "edit",
3605
+ lazy: () => import("./edit-AK4E63X6.js")
3606
+ },
3607
+ {
3608
+ path: "shipping",
3609
+ lazy: () => import("./shipping-IMCP7UDV.js")
3610
+ },
3611
+ {
3612
+ path: "pricing",
3613
+ lazy: () => import("./pricing-E4YGL6C3.js")
3614
+ },
3615
+ {
3616
+ path: "inventory",
3617
+ lazy: () => import("./inventory-Q3I6Z7AT.js")
3618
+ },
3619
+ {
3620
+ path: "manage-items",
3621
+ lazy: () => import("./manage-items-63FPRK7Z.js")
3622
+ }
3623
+ ]
3624
+ }
3625
+ ]
3626
+ }
3627
+ ]
3534
3628
  }
3535
3629
  ]
3536
3630
  },
3631
+ // INVENTORY
3537
3632
  {
3538
- path: ":id",
3539
- lazy: async () => {
3540
- const { loader } = await import("./[id]-6FEVCKQU.js");
3541
- const { Breadcrumb } = await import("./breadcrumb-7ZFC43R4.js");
3542
- return {
3543
- Component: Outlet4,
3544
- loader,
3545
- handle: {
3546
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3547
- }
3548
- };
3549
- },
3633
+ path: "/inventory",
3634
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3635
+ handle: { breadcrumb: () => t("inventory.domain"), permissions: "inventory_item:read" },
3550
3636
  children: [
3551
3637
  {
3552
3638
  path: "",
3553
3639
  lazy: async () => {
3554
- const { InventoryDetailPage } = await import("./[id]-6FEVCKQU.js");
3640
+ const { InventoryListPage } = await import("./inventory-BEJYYVQP.js");
3555
3641
  return {
3556
- Component: InventoryDetailPage
3642
+ Component: InventoryListPage
3557
3643
  };
3558
3644
  },
3559
3645
  children: [
3560
3646
  {
3561
- path: "edit",
3562
- lazy: () => import("./edit-inventory-item-D3WVCMS5.js")
3563
- },
3564
- {
3565
- path: "attributes",
3566
- lazy: () => import("./edit-inventory-item-attributes-4FTC6BAY.js")
3567
- },
3568
- {
3569
- path: "metadata",
3570
- lazy: () => import("./metadata-22BCBKVE.js")
3571
- },
3572
- {
3573
- path: "locations",
3574
- lazy: () => import("./manage-locations-ZCE7QN4T.js")
3647
+ path: "create",
3648
+ lazy: () => import("./create-THJGKBWT.js")
3575
3649
  },
3576
3650
  {
3577
- path: "locations/:location_id",
3578
- lazy: () => import("./adjust-inventory-QUOAKTI7.js")
3651
+ path: "stock",
3652
+ lazy: () => import("./stock-XCM7H6IW.js")
3579
3653
  }
3580
3654
  ]
3581
- }
3582
- ]
3583
- }
3584
- ]
3585
- },
3586
- // PROMOTIONS
3587
- {
3588
- path: "/promotions",
3589
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3590
- handle: { breadcrumb: () => t("promotions.domain") },
3591
- children: [
3592
- {
3593
- path: "",
3594
- lazy: async () => {
3595
- const { PromotionListPage } = await import("./promotions-ALWQ7J7A.js");
3596
- return {
3597
- Component: PromotionListPage
3598
- };
3599
- },
3600
- children: [
3655
+ },
3601
3656
  {
3602
- path: "create",
3603
- lazy: () => import("./create-GF76Z5I7.js")
3657
+ path: ":id",
3658
+ lazy: async () => {
3659
+ const { loader } = await import("./[id]-GTZJPQTI.js");
3660
+ const { Breadcrumb } = await import("./breadcrumb-7ZFC43R4.js");
3661
+ return {
3662
+ Component: Outlet4,
3663
+ loader,
3664
+ handle: {
3665
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3666
+ }
3667
+ };
3668
+ },
3669
+ children: [
3670
+ {
3671
+ path: "",
3672
+ lazy: async () => {
3673
+ const { InventoryDetailPage } = await import("./[id]-GTZJPQTI.js");
3674
+ return {
3675
+ Component: InventoryDetailPage
3676
+ };
3677
+ },
3678
+ children: [
3679
+ {
3680
+ path: "edit",
3681
+ lazy: () => import("./edit-inventory-item-D3WVCMS5.js")
3682
+ },
3683
+ {
3684
+ path: "attributes",
3685
+ lazy: () => import("./edit-inventory-item-attributes-4FTC6BAY.js")
3686
+ },
3687
+ {
3688
+ path: "metadata",
3689
+ lazy: () => import("./metadata-22BCBKVE.js")
3690
+ },
3691
+ {
3692
+ path: "locations",
3693
+ lazy: () => import("./manage-locations-ZCE7QN4T.js")
3694
+ },
3695
+ {
3696
+ path: "locations/:location_id",
3697
+ lazy: () => import("./adjust-inventory-QUOAKTI7.js")
3698
+ }
3699
+ ]
3700
+ }
3701
+ ]
3604
3702
  }
3605
3703
  ]
3606
3704
  },
3705
+ // PROMOTIONS
3607
3706
  {
3608
- path: ":id",
3609
- lazy: async () => {
3610
- const { loader } = await import("./[id]-Y4HRAAV2.js");
3611
- const { Breadcrumb } = await import("./breadcrumb-4O2P6XRS.js");
3612
- return {
3613
- Component: Outlet4,
3614
- loader,
3615
- handle: {
3616
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3617
- }
3618
- };
3619
- },
3707
+ path: "/promotions",
3708
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3709
+ handle: { breadcrumb: () => t("promotions.domain"), permissions: "promotion:read" },
3620
3710
  children: [
3621
3711
  {
3622
3712
  path: "",
3623
3713
  lazy: async () => {
3624
- const { PromotionDetailPage } = await import("./[id]-Y4HRAAV2.js");
3714
+ const { PromotionListPage } = await import("./promotions-V5T5EY7U.js");
3625
3715
  return {
3626
- Component: PromotionDetailPage
3716
+ Component: PromotionListPage
3627
3717
  };
3628
3718
  },
3629
3719
  children: [
3630
3720
  {
3631
- path: "edit",
3632
- lazy: () => import("./edit-EJ5NQJGS.js")
3633
- },
3634
- {
3635
- path: "add-to-campaign",
3636
- lazy: () => import("./add-to-campaign-FWHQHE76.js")
3637
- },
3638
- {
3639
- path: ":ruleType/edit",
3640
- lazy: () => import("./edit-IZUVXZAQ.js")
3721
+ path: "create",
3722
+ lazy: () => import("./create-GF76Z5I7.js")
3641
3723
  }
3642
3724
  ]
3643
- }
3644
- ]
3645
- }
3646
- ]
3647
- },
3648
- // CAMPAIGNS
3649
- {
3650
- path: "/campaigns",
3651
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3652
- handle: { breadcrumb: () => t("campaigns.domain") },
3653
- children: [
3654
- {
3655
- path: "",
3656
- lazy: async () => {
3657
- const { CampaignListPage } = await import("./campaigns-LIPKZKI7.js");
3658
- return {
3659
- Component: CampaignListPage
3660
- };
3661
- },
3662
- children: [
3725
+ },
3663
3726
  {
3664
- path: "create",
3665
- lazy: () => import("./create-WPN3OUJU.js")
3727
+ path: ":id",
3728
+ lazy: async () => {
3729
+ const { loader } = await import("./[id]-R67KMXFA.js");
3730
+ const { Breadcrumb } = await import("./breadcrumb-4O2P6XRS.js");
3731
+ return {
3732
+ Component: Outlet4,
3733
+ loader,
3734
+ handle: {
3735
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3736
+ }
3737
+ };
3738
+ },
3739
+ children: [
3740
+ {
3741
+ path: "",
3742
+ lazy: async () => {
3743
+ const { PromotionDetailPage } = await import("./[id]-R67KMXFA.js");
3744
+ return {
3745
+ Component: PromotionDetailPage
3746
+ };
3747
+ },
3748
+ children: [
3749
+ {
3750
+ path: "edit",
3751
+ lazy: () => import("./edit-EJ5NQJGS.js")
3752
+ },
3753
+ {
3754
+ path: "add-to-campaign",
3755
+ lazy: () => import("./add-to-campaign-FWHQHE76.js")
3756
+ },
3757
+ {
3758
+ path: ":ruleType/edit",
3759
+ lazy: () => import("./edit-IZUVXZAQ.js")
3760
+ }
3761
+ ]
3762
+ }
3763
+ ]
3666
3764
  }
3667
3765
  ]
3668
3766
  },
3767
+ // CAMPAIGNS
3669
3768
  {
3670
- path: ":id",
3671
- lazy: async () => {
3672
- const { loader } = await import("./[id]-HAJ3735Z.js");
3673
- const { Breadcrumb } = await import("./breadcrumb-WIB5IGST.js");
3674
- return {
3675
- Component: Outlet4,
3676
- loader,
3677
- handle: {
3678
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3679
- }
3680
- };
3681
- },
3769
+ path: "/campaigns",
3770
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3771
+ handle: { breadcrumb: () => t("campaigns.domain"), permissions: "campaign:read" },
3682
3772
  children: [
3683
3773
  {
3684
3774
  path: "",
3685
3775
  lazy: async () => {
3686
- const { CampaignDetailPage } = await import("./[id]-HAJ3735Z.js");
3776
+ const { CampaignListPage } = await import("./campaigns-F5XONWHD.js");
3687
3777
  return {
3688
- Component: CampaignDetailPage
3778
+ Component: CampaignListPage
3689
3779
  };
3690
3780
  },
3691
3781
  children: [
3692
3782
  {
3693
- path: "edit",
3694
- lazy: () => import("./edit-7T2JMZG3.js")
3695
- },
3696
- {
3697
- path: "configuration",
3698
- lazy: () => import("./configuration-QK2FW2CV.js")
3699
- },
3700
- {
3701
- path: "edit-budget",
3702
- lazy: () => import("./edit-budget-MOZETGZV.js")
3703
- },
3783
+ path: "create",
3784
+ lazy: () => import("./create-WPN3OUJU.js")
3785
+ }
3786
+ ]
3787
+ },
3788
+ {
3789
+ path: ":id",
3790
+ lazy: async () => {
3791
+ const { loader } = await import("./[id]-MXOPY6G5.js");
3792
+ const { Breadcrumb } = await import("./breadcrumb-WIB5IGST.js");
3793
+ return {
3794
+ Component: Outlet4,
3795
+ loader,
3796
+ handle: {
3797
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3798
+ }
3799
+ };
3800
+ },
3801
+ children: [
3704
3802
  {
3705
- path: "add-promotions",
3803
+ path: "",
3706
3804
  lazy: async () => {
3707
- const { AddPromotionsPage } = await import("./add-promotions-DOJS6CEE.js");
3805
+ const { CampaignDetailPage } = await import("./[id]-MXOPY6G5.js");
3708
3806
  return {
3709
- Component: AddPromotionsPage
3807
+ Component: CampaignDetailPage
3710
3808
  };
3711
- }
3809
+ },
3810
+ children: [
3811
+ {
3812
+ path: "edit",
3813
+ lazy: () => import("./edit-7T2JMZG3.js")
3814
+ },
3815
+ {
3816
+ path: "configuration",
3817
+ lazy: () => import("./configuration-QK2FW2CV.js")
3818
+ },
3819
+ {
3820
+ path: "edit-budget",
3821
+ lazy: () => import("./edit-budget-MOZETGZV.js")
3822
+ },
3823
+ {
3824
+ path: "add-promotions",
3825
+ lazy: async () => {
3826
+ const { AddPromotionsPage } = await import("./add-promotions-QTNNFJBY.js");
3827
+ return {
3828
+ Component: AddPromotionsPage
3829
+ };
3830
+ }
3831
+ }
3832
+ ]
3712
3833
  }
3713
3834
  ]
3714
3835
  }
3715
3836
  ]
3716
- }
3717
- ]
3718
- },
3719
- // PRICE LISTS
3720
- {
3721
- path: "/price-lists",
3722
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3723
- handle: { breadcrumb: () => t("priceLists.domain") },
3724
- children: [
3725
- {
3726
- path: "",
3727
- lazy: async () => {
3728
- const { PriceListListPage } = await import("./price-lists-U5ASDHMI.js");
3729
- return { Component: PriceListListPage };
3730
- },
3731
- children: [
3732
- {
3733
- path: "create",
3734
- lazy: () => import("./create-NCVZ2JM7.js")
3735
- }
3736
- ]
3737
3837
  },
3838
+ // PRICE LISTS
3738
3839
  {
3739
- path: ":id",
3740
- lazy: async () => {
3741
- const { loader } = await import("./[id]-HDVONF6C.js");
3742
- const { Breadcrumb } = await import("./breadcrumb-4I7MU2QY.js");
3743
- return {
3744
- Component: Outlet4,
3745
- loader,
3746
- handle: {
3747
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3748
- }
3749
- };
3750
- },
3840
+ path: "/price-lists",
3841
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3842
+ handle: { breadcrumb: () => t("priceLists.domain"), permissions: "price_list:read" },
3751
3843
  children: [
3752
3844
  {
3753
3845
  path: "",
3754
3846
  lazy: async () => {
3755
- const { PriceListDetailPage } = await import("./[id]-HDVONF6C.js");
3756
- return { Component: PriceListDetailPage };
3847
+ const { PriceListListPage } = await import("./price-lists-U4IR3425.js");
3848
+ return { Component: PriceListListPage };
3757
3849
  },
3758
3850
  children: [
3759
3851
  {
3760
- path: "edit",
3761
- lazy: () => import("./edit-OJ56OOTY.js")
3762
- },
3763
- {
3764
- path: "configuration",
3765
- lazy: () => import("./configuration-RYH3VUBV.js")
3766
- },
3767
- {
3768
- path: "customer-availability",
3769
- lazy: () => import("./customer-availability-VAOKKCTK.js")
3770
- },
3771
- {
3772
- path: "products/add",
3773
- lazy: () => import("./add-Y66CX5EI.js")
3774
- },
3775
- {
3776
- path: "products/edit",
3777
- lazy: () => import("./edit-LKAEGDF3.js")
3778
- },
3852
+ path: "create",
3853
+ lazy: () => import("./create-HBAU3ASL.js")
3854
+ }
3855
+ ]
3856
+ },
3857
+ {
3858
+ path: ":id",
3859
+ lazy: async () => {
3860
+ const { loader } = await import("./[id]-4XDMVCJV.js");
3861
+ const { Breadcrumb } = await import("./breadcrumb-4I7MU2QY.js");
3862
+ return {
3863
+ Component: Outlet4,
3864
+ loader,
3865
+ handle: {
3866
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3867
+ }
3868
+ };
3869
+ },
3870
+ children: [
3779
3871
  {
3780
- path: "products/:variant_id/edit",
3781
- lazy: () => import("./edit-MMW4V266.js")
3872
+ path: "",
3873
+ lazy: async () => {
3874
+ const { PriceListDetailPage } = await import("./[id]-4XDMVCJV.js");
3875
+ return { Component: PriceListDetailPage };
3876
+ },
3877
+ children: [
3878
+ {
3879
+ path: "edit",
3880
+ lazy: () => import("./edit-OJ56OOTY.js")
3881
+ },
3882
+ {
3883
+ path: "configuration",
3884
+ lazy: () => import("./configuration-RYH3VUBV.js")
3885
+ },
3886
+ {
3887
+ path: "customer-availability",
3888
+ lazy: () => import("./customer-availability-VAOKKCTK.js")
3889
+ },
3890
+ {
3891
+ path: "products/add",
3892
+ lazy: () => import("./add-7S4M2PHD.js")
3893
+ },
3894
+ {
3895
+ path: "products/edit",
3896
+ lazy: () => import("./edit-LKAEGDF3.js")
3897
+ },
3898
+ {
3899
+ path: "products/:variant_id/edit",
3900
+ lazy: () => import("./edit-MMW4V266.js")
3901
+ }
3902
+ ]
3782
3903
  }
3783
3904
  ]
3784
3905
  }
3785
3906
  ]
3786
- }
3787
- ]
3788
- },
3789
- // REVIEWS
3790
- {
3791
- path: "/reviews",
3792
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3793
- handle: { breadcrumb: () => t("reviews.domain") },
3794
- children: [
3795
- {
3796
- path: "",
3797
- lazy: async () => {
3798
- const { ReviewListPage } = await import("./reviews-LBLCFBRQ.js");
3799
- return {
3800
- Component: ReviewListPage
3801
- };
3802
- }
3803
3907
  },
3908
+ // REVIEWS
3804
3909
  {
3805
- path: ":id",
3806
- lazy: async () => {
3807
- const { loader } = await import("./[id]-3TCOLUQH.js");
3808
- const { Breadcrumb } = await import("./breadcrumb-XCPUUZUO.js");
3809
- return {
3810
- Component: Outlet4,
3811
- loader,
3812
- handle: {
3813
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3814
- }
3815
- };
3816
- },
3910
+ path: "/reviews",
3911
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3912
+ handle: { breadcrumb: () => t("reviews.domain"), permissions: "review:read" },
3817
3913
  children: [
3818
3914
  {
3819
3915
  path: "",
3820
3916
  lazy: async () => {
3821
- const { ReviewDetailPage } = await import("./[id]-3TCOLUQH.js");
3917
+ const { ReviewListPage } = await import("./reviews-LBLCFBRQ.js");
3918
+ return {
3919
+ Component: ReviewListPage
3920
+ };
3921
+ }
3922
+ },
3923
+ {
3924
+ path: ":id",
3925
+ lazy: async () => {
3926
+ const { loader } = await import("./[id]-3TCOLUQH.js");
3927
+ const { Breadcrumb } = await import("./breadcrumb-XCPUUZUO.js");
3822
3928
  return {
3823
- Component: ReviewDetailPage
3929
+ Component: Outlet4,
3930
+ loader,
3931
+ handle: {
3932
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3933
+ }
3824
3934
  };
3825
3935
  },
3826
3936
  children: [
3827
3937
  {
3828
- path: "respond",
3829
- lazy: () => import("./respond-IPRDCH57.js")
3938
+ path: "",
3939
+ lazy: async () => {
3940
+ const { ReviewDetailPage } = await import("./[id]-3TCOLUQH.js");
3941
+ return {
3942
+ Component: ReviewDetailPage
3943
+ };
3944
+ },
3945
+ children: [
3946
+ {
3947
+ path: "respond",
3948
+ lazy: () => import("./respond-IPRDCH57.js")
3949
+ }
3950
+ ]
3830
3951
  }
3831
3952
  ]
3832
3953
  }
3833
3954
  ]
3834
- }
3835
- ]
3836
- },
3837
- // RESERVATIONS
3838
- {
3839
- path: "/reservations",
3840
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3841
- handle: { breadcrumb: () => t("reservations.domain") },
3842
- children: [
3843
- {
3844
- path: "",
3845
- lazy: () => import("./reservations-C326XEVA.js"),
3846
- children: [
3847
- {
3848
- path: "create",
3849
- lazy: () => import("./create-ICCAEOSA.js")
3850
- }
3851
- ]
3852
3955
  },
3956
+ // RESERVATIONS
3853
3957
  {
3854
- path: ":id",
3855
- lazy: async () => {
3856
- const { Breadcrumb } = await import("./[id]-QGZ26C6D.js");
3857
- return {
3858
- Component: Outlet4,
3859
- handle: {
3860
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3861
- }
3862
- };
3863
- },
3958
+ path: "/reservations",
3959
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3960
+ handle: { breadcrumb: () => t("reservations.domain"), permissions: "reservation_item:read" },
3864
3961
  children: [
3865
3962
  {
3866
3963
  path: "",
3867
- lazy: () => import("./[id]-QGZ26C6D.js"),
3964
+ lazy: () => import("./reservations-C7ZC7XPK.js"),
3868
3965
  children: [
3869
3966
  {
3870
- path: "edit",
3871
- lazy: () => import("./edit-reservation-446DRAKQ.js")
3872
- },
3967
+ path: "create",
3968
+ lazy: () => import("./create-ICCAEOSA.js")
3969
+ }
3970
+ ]
3971
+ },
3972
+ {
3973
+ path: ":id",
3974
+ lazy: async () => {
3975
+ const { Breadcrumb } = await import("./[id]-EJMM3KYO.js");
3976
+ return {
3977
+ Component: Outlet4,
3978
+ handle: {
3979
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
3980
+ }
3981
+ };
3982
+ },
3983
+ children: [
3873
3984
  {
3874
- path: "metadata/edit",
3875
- lazy: () => import("./metadata-WN6Y35RV.js")
3985
+ path: "",
3986
+ lazy: () => import("./[id]-EJMM3KYO.js"),
3987
+ children: [
3988
+ {
3989
+ path: "edit",
3990
+ lazy: () => import("./edit-reservation-446DRAKQ.js")
3991
+ },
3992
+ {
3993
+ path: "metadata/edit",
3994
+ lazy: () => import("./metadata-WN6Y35RV.js")
3995
+ }
3996
+ ]
3876
3997
  }
3877
3998
  ]
3878
3999
  }
3879
4000
  ]
3880
4001
  }
3881
- ]
3882
- }
3883
- ],
3884
- customMainRoutes
3885
- )
4002
+ ],
4003
+ customMainRoutes
4004
+ )
4005
+ }
4006
+ ]
3886
4007
  }
3887
4008
  ]
3888
4009
  },
@@ -3893,126 +4014,164 @@ function getRouteMap({
3893
4014
  children: [
3894
4015
  {
3895
4016
  path: "/settings",
3896
- element: /* @__PURE__ */ jsx15(SettingsLayout, {}),
3897
- children: mergeRoutes(
3898
- [
3899
- {
3900
- index: true,
3901
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3902
- lazy: () => import("./settings-KDM7NZLY.js")
3903
- },
3904
- // PROFILE
3905
- {
3906
- path: "profile",
3907
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3908
- handle: {
3909
- breadcrumb: () => t("profile.domain")
3910
- },
3911
- children: [
3912
- {
3913
- path: "",
3914
- lazy: async () => {
3915
- const { ProfileDetailPage } = await import("./profile-EU46MXFW.js");
3916
- return { Component: ProfileDetailPage };
3917
- },
3918
- children: [
3919
- {
3920
- path: "edit",
3921
- lazy: async () => {
3922
- const { ProfileEdit } = await import("./profile-EU46MXFW.js");
3923
- return { Component: ProfileEdit };
3924
- }
3925
- }
3926
- ]
3927
- }
3928
- ]
3929
- },
3930
- // STORE
3931
- {
3932
- path: "store",
3933
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3934
- handle: {
3935
- breadcrumb: () => t("app.menus.store.label")
3936
- },
3937
- children: [
4017
+ element: /* @__PURE__ */ jsx15(SettingsLayout, {}),
4018
+ children: [
4019
+ {
4020
+ element: /* @__PURE__ */ jsx15(RoutePermissionGuard, {}),
4021
+ children: mergeRoutes(
4022
+ [
4023
+ {
4024
+ index: true,
4025
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4026
+ lazy: () => import("./settings-HUMLDZ2O.js")
4027
+ },
4028
+ // PROFILE
3938
4029
  {
3939
- path: "",
3940
- lazy: async () => {
3941
- const { StoreDetailPage } = await import("./store-V3TTFWYV.js");
3942
- return { Component: StoreDetailPage };
4030
+ path: "profile",
4031
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4032
+ handle: {
4033
+ breadcrumb: () => t("profile.domain")
3943
4034
  },
3944
4035
  children: [
3945
4036
  {
3946
- path: "edit",
3947
- lazy: () => import("./edit-F34KMSTW.js")
3948
- },
3949
- {
3950
- path: "address",
3951
- lazy: () => import("./address-X4TXBPUG.js")
3952
- },
3953
- {
3954
- path: "payment-details",
3955
- lazy: () => import("./payment-details-O57HNHWS.js")
3956
- },
3957
- {
3958
- path: "professional-details",
3959
- lazy: () => import("./professional-details-ZJT6YKZB.js")
3960
- },
3961
- {
3962
- path: "store-closure",
3963
- lazy: () => import("./store-closure-55EUSKE4.js")
4037
+ path: "",
4038
+ lazy: async () => {
4039
+ const { ProfileDetailPage } = await import("./profile-2M4KL5JF.js");
4040
+ return { Component: ProfileDetailPage };
4041
+ },
4042
+ children: [
4043
+ {
4044
+ path: "edit",
4045
+ lazy: async () => {
4046
+ const { ProfileEdit } = await import("./profile-2M4KL5JF.js");
4047
+ return { Component: ProfileEdit };
4048
+ }
4049
+ }
4050
+ ]
3964
4051
  }
3965
4052
  ]
3966
- }
3967
- ]
3968
- },
3969
- // LOCATIONS
3970
- {
3971
- path: "locations",
3972
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3973
- element: /* @__PURE__ */ jsx15(Outlet4, {}),
3974
- handle: { breadcrumb: () => t("locations.domain") },
3975
- children: [
4053
+ },
4054
+ // STORE
3976
4055
  {
3977
- path: "",
3978
- lazy: async () => {
3979
- const { LocationListPage } = await import("./locations-BN2BTULF.js");
3980
- return { Component: LocationListPage };
4056
+ path: "store",
4057
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4058
+ handle: {
4059
+ breadcrumb: () => t("app.menus.store.label"),
4060
+ permissions: "seller:read"
3981
4061
  },
3982
4062
  children: [
3983
4063
  {
3984
- path: "create",
3985
- lazy: () => import("./create-3TN2CT6M.js")
4064
+ path: "",
4065
+ lazy: async () => {
4066
+ const { StoreDetailPage } = await import("./store-6UZNHYJZ.js");
4067
+ return { Component: StoreDetailPage };
4068
+ },
4069
+ children: [
4070
+ {
4071
+ path: "edit",
4072
+ lazy: () => import("./edit-MZKTHXEK.js")
4073
+ },
4074
+ {
4075
+ path: "address",
4076
+ lazy: () => import("./address-X4TXBPUG.js")
4077
+ },
4078
+ {
4079
+ path: "payment-details",
4080
+ lazy: () => import("./payment-details-O57HNHWS.js")
4081
+ },
4082
+ {
4083
+ path: "professional-details",
4084
+ lazy: () => import("./professional-details-ZJT6YKZB.js")
4085
+ },
4086
+ {
4087
+ path: "store-closure",
4088
+ lazy: () => import("./store-closure-55EUSKE4.js")
4089
+ }
4090
+ ]
3986
4091
  }
3987
4092
  ]
3988
4093
  },
4094
+ // LOCATIONS
3989
4095
  {
3990
- path: "shipping-profiles",
4096
+ path: "locations",
4097
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
3991
4098
  element: /* @__PURE__ */ jsx15(Outlet4, {}),
3992
- handle: {
3993
- breadcrumb: () => t("shippingProfile.domain")
3994
- },
4099
+ handle: { breadcrumb: () => t("locations.domain"), permissions: "stock_location:read" },
3995
4100
  children: [
3996
4101
  {
3997
4102
  path: "",
3998
4103
  lazy: async () => {
3999
- const { ShippingProfileListPage } = await import("./shipping-profiles-647FLCNK.js");
4000
- return { Component: ShippingProfileListPage };
4104
+ const { LocationListPage } = await import("./locations-V4K3ZW3T.js");
4105
+ return { Component: LocationListPage };
4001
4106
  },
4002
4107
  children: [
4003
4108
  {
4004
4109
  path: "create",
4005
- lazy: () => import("./create-EKDZW233.js")
4110
+ lazy: () => import("./create-3TN2CT6M.js")
4111
+ }
4112
+ ]
4113
+ },
4114
+ {
4115
+ path: "shipping-profiles",
4116
+ element: /* @__PURE__ */ jsx15(Outlet4, {}),
4117
+ handle: {
4118
+ breadcrumb: () => t("shippingProfile.domain"),
4119
+ permissions: "shipping_profile:read"
4120
+ },
4121
+ children: [
4122
+ {
4123
+ path: "",
4124
+ lazy: async () => {
4125
+ const { ShippingProfileListPage } = await import("./shipping-profiles-BHEAMDEX.js");
4126
+ return { Component: ShippingProfileListPage };
4127
+ },
4128
+ children: [
4129
+ {
4130
+ path: "create",
4131
+ lazy: () => import("./create-EKDZW233.js")
4132
+ }
4133
+ ]
4134
+ },
4135
+ {
4136
+ path: ":shipping_profile_id",
4137
+ lazy: async () => {
4138
+ const { shippingProfileLoader: loader } = await import("./[id]-VQ4CWKQS.js");
4139
+ const {
4140
+ ShippingProfileDetailBreadcrumb: Breadcrumb
4141
+ } = await import("./breadcrumb-6VWM2EJF.js");
4142
+ return {
4143
+ Component: Outlet4,
4144
+ loader,
4145
+ handle: {
4146
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4147
+ }
4148
+ };
4149
+ },
4150
+ children: [
4151
+ {
4152
+ path: "",
4153
+ lazy: async () => {
4154
+ const { ShippingProfileDetailPage } = await import("./[id]-VQ4CWKQS.js");
4155
+ return {
4156
+ Component: ShippingProfileDetailPage
4157
+ };
4158
+ },
4159
+ children: [
4160
+ {
4161
+ path: "metadata/edit",
4162
+ lazy: () => import("./metadata-L6IA2Z26.js")
4163
+ }
4164
+ ]
4165
+ }
4166
+ ]
4006
4167
  }
4007
4168
  ]
4008
4169
  },
4009
4170
  {
4010
- path: ":shipping_profile_id",
4171
+ path: ":location_id",
4011
4172
  lazy: async () => {
4012
- const { shippingProfileLoader: loader } = await import("./[id]-C7IFTDTJ.js");
4013
- const {
4014
- ShippingProfileDetailBreadcrumb: Breadcrumb
4015
- } = await import("./breadcrumb-6VWM2EJF.js");
4173
+ const { loader } = await import("./[location_id]-LVDP4IEU.js");
4174
+ const { LocationDetailBreadcrumb: Breadcrumb } = await import("./breadcrumb-KZ5TSCXK.js");
4016
4175
  return {
4017
4176
  Component: Outlet4,
4018
4177
  loader,
@@ -4025,15 +4184,46 @@ function getRouteMap({
4025
4184
  {
4026
4185
  path: "",
4027
4186
  lazy: async () => {
4028
- const { ShippingProfileDetailPage } = await import("./[id]-C7IFTDTJ.js");
4029
- return {
4030
- Component: ShippingProfileDetailPage
4031
- };
4187
+ const { LocationDetailPage } = await import("./[location_id]-LVDP4IEU.js");
4188
+ return { Component: LocationDetailPage };
4032
4189
  },
4033
4190
  children: [
4034
4191
  {
4035
- path: "metadata/edit",
4036
- lazy: () => import("./metadata-L6IA2Z26.js")
4192
+ path: "edit",
4193
+ lazy: () => import("./edit-OWLUCJE4.js")
4194
+ },
4195
+ {
4196
+ path: "sales-channels",
4197
+ lazy: () => import("./sales-channels-6MGHGQFY.js")
4198
+ },
4199
+ {
4200
+ path: "fulfillment-providers",
4201
+ handle: { permissions: "fulfillment_provider:read" },
4202
+ lazy: () => import("./fulfillment-providers-6FTP7YEN.js")
4203
+ },
4204
+ {
4205
+ path: "fulfillment-set/:fset_id/service-zones/create",
4206
+ lazy: () => import("./create-5M66YUYY.js")
4207
+ },
4208
+ {
4209
+ path: "fulfillment-set/:fset_id/service-zone/:zone_id/edit",
4210
+ lazy: () => import("./edit-2DQZGXHT.js")
4211
+ },
4212
+ {
4213
+ path: "fulfillment-set/:fset_id/service-zone/:zone_id/areas",
4214
+ lazy: () => import("./areas-WQ44GWQO.js")
4215
+ },
4216
+ {
4217
+ path: "fulfillment-set/:fset_id/service-zone/:zone_id/shipping-option/create",
4218
+ lazy: () => import("./create-MVBURBUP.js")
4219
+ },
4220
+ {
4221
+ path: "fulfillment-set/:fset_id/service-zone/:zone_id/shipping-option/:so_id/edit",
4222
+ lazy: () => import("./edit-RO7VYRIZ.js")
4223
+ },
4224
+ {
4225
+ path: "fulfillment-set/:fset_id/service-zone/:zone_id/shipping-option/:so_id/pricing",
4226
+ lazy: () => import("./pricing-ABGKPJKM.js")
4037
4227
  }
4038
4228
  ]
4039
4229
  }
@@ -4041,123 +4231,27 @@ function getRouteMap({
4041
4231
  }
4042
4232
  ]
4043
4233
  },
4234
+ // TAX REGIONS
4044
4235
  {
4045
- path: ":location_id",
4046
- lazy: async () => {
4047
- const { loader } = await import("./[location_id]-OXNC5E4F.js");
4048
- const { LocationDetailBreadcrumb: Breadcrumb } = await import("./breadcrumb-KZ5TSCXK.js");
4049
- return {
4050
- Component: Outlet4,
4051
- loader,
4052
- handle: {
4053
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4054
- }
4055
- };
4056
- },
4236
+ path: "tax-regions",
4237
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4238
+ element: /* @__PURE__ */ jsx15(Outlet4, {}),
4239
+ handle: { breadcrumb: () => t("taxRegions.domain"), permissions: "tax_region:read" },
4057
4240
  children: [
4058
4241
  {
4059
4242
  path: "",
4060
- lazy: async () => {
4061
- const { LocationDetailPage } = await import("./[location_id]-OXNC5E4F.js");
4062
- return { Component: LocationDetailPage };
4063
- },
4243
+ lazy: () => import("./tax-regions-X3QJ7SHM.js"),
4064
4244
  children: [
4065
4245
  {
4066
- path: "edit",
4067
- lazy: () => import("./edit-OWLUCJE4.js")
4068
- },
4069
- {
4070
- path: "sales-channels",
4071
- lazy: () => import("./sales-channels-LWEVGTY6.js")
4072
- },
4073
- {
4074
- path: "fulfillment-providers",
4075
- lazy: () => import("./fulfillment-providers-6FTP7YEN.js")
4076
- },
4077
- {
4078
- path: "fulfillment-set/:fset_id/service-zones/create",
4079
- lazy: () => import("./create-5M66YUYY.js")
4080
- },
4081
- {
4082
- path: "fulfillment-set/:fset_id/service-zone/:zone_id/edit",
4083
- lazy: () => import("./edit-2DQZGXHT.js")
4084
- },
4085
- {
4086
- path: "fulfillment-set/:fset_id/service-zone/:zone_id/areas",
4087
- lazy: () => import("./areas-WQ44GWQO.js")
4088
- },
4089
- {
4090
- path: "fulfillment-set/:fset_id/service-zone/:zone_id/shipping-option/create",
4091
- lazy: () => import("./create-MVBURBUP.js")
4092
- },
4093
- {
4094
- path: "fulfillment-set/:fset_id/service-zone/:zone_id/shipping-option/:so_id/edit",
4095
- lazy: () => import("./edit-RO7VYRIZ.js")
4096
- },
4097
- {
4098
- path: "fulfillment-set/:fset_id/service-zone/:zone_id/shipping-option/:so_id/pricing",
4099
- lazy: () => import("./pricing-ABGKPJKM.js")
4246
+ path: "create",
4247
+ lazy: () => import("./create-ME43PNL6.js")
4100
4248
  }
4101
4249
  ]
4102
- }
4103
- ]
4104
- }
4105
- ]
4106
- },
4107
- // TAX REGIONS
4108
- {
4109
- path: "tax-regions",
4110
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4111
- element: /* @__PURE__ */ jsx15(Outlet4, {}),
4112
- handle: { breadcrumb: () => t("taxRegions.domain") },
4113
- children: [
4114
- {
4115
- path: "",
4116
- lazy: () => import("./tax-regions-MKEWVKZ7.js"),
4117
- children: [
4118
- {
4119
- path: "create",
4120
- lazy: () => import("./create-ME43PNL6.js")
4121
- }
4122
- ]
4123
- },
4124
- {
4125
- path: ":id",
4126
- lazy: async () => {
4127
- const { Component, Breadcrumb, loader } = await import("./[id]-5FP6JZM3.js");
4128
- return {
4129
- Component,
4130
- loader,
4131
- handle: {
4132
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4133
- }
4134
- };
4135
- },
4136
- children: [
4137
- {
4138
- path: "tax-rates/create",
4139
- lazy: () => import("./create-3SBSLZQO.js")
4140
- },
4141
- {
4142
- path: "tax-rates/:tax_rate_id/edit",
4143
- lazy: () => import("./edit-RRA6J5FW.js")
4144
- },
4145
- {
4146
- path: "tax-overrides/create",
4147
- lazy: () => import("./create-EEP4M2CF.js")
4148
- },
4149
- {
4150
- path: "tax-overrides/:tax_rate_id/edit",
4151
- lazy: () => import("./edit-34NNMGTU.js")
4152
- },
4153
- {
4154
- path: "provinces/create",
4155
- lazy: () => import("./create-T3KSWODJ.js")
4156
4250
  },
4157
4251
  {
4158
- path: "provinces/:province_id",
4252
+ path: ":id",
4159
4253
  lazy: async () => {
4160
- const { Component, Breadcrumb, loader } = await import("./[province_id]-VWN4OOGM.js");
4254
+ const { Component, Breadcrumb, loader } = await import("./[id]-SIY5USJF.js");
4161
4255
  return {
4162
4256
  Component,
4163
4257
  loader,
@@ -4182,162 +4276,197 @@ function getRouteMap({
4182
4276
  {
4183
4277
  path: "tax-overrides/:tax_rate_id/edit",
4184
4278
  lazy: () => import("./edit-34NNMGTU.js")
4279
+ },
4280
+ {
4281
+ path: "provinces/create",
4282
+ lazy: () => import("./create-T3KSWODJ.js")
4283
+ },
4284
+ {
4285
+ path: "provinces/:province_id",
4286
+ lazy: async () => {
4287
+ const { Component, Breadcrumb, loader } = await import("./[province_id]-HO33KA4A.js");
4288
+ return {
4289
+ Component,
4290
+ loader,
4291
+ handle: {
4292
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4293
+ }
4294
+ };
4295
+ },
4296
+ children: [
4297
+ {
4298
+ path: "tax-rates/create",
4299
+ lazy: () => import("./create-3SBSLZQO.js")
4300
+ },
4301
+ {
4302
+ path: "tax-rates/:tax_rate_id/edit",
4303
+ lazy: () => import("./edit-RRA6J5FW.js")
4304
+ },
4305
+ {
4306
+ path: "tax-overrides/create",
4307
+ lazy: () => import("./create-EEP4M2CF.js")
4308
+ },
4309
+ {
4310
+ path: "tax-overrides/:tax_rate_id/edit",
4311
+ lazy: () => import("./edit-34NNMGTU.js")
4312
+ }
4313
+ ]
4185
4314
  }
4186
4315
  ]
4187
4316
  }
4188
4317
  ]
4189
- }
4190
- ]
4191
- },
4192
- // PRODUCT TAGS
4193
- {
4194
- path: "product-tags",
4195
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4196
- element: /* @__PURE__ */ jsx15(Outlet4, {}),
4197
- handle: { breadcrumb: () => t("productTags.domain") },
4198
- children: [
4199
- {
4200
- path: "",
4201
- lazy: async () => {
4202
- const { ProductTagListPage } = await import("./product-tags-K2VTAAXN.js");
4203
- return { Component: ProductTagListPage };
4204
- }
4205
4318
  },
4319
+ // PRODUCT TAGS
4206
4320
  {
4207
- path: ":id",
4208
- lazy: async () => {
4209
- const { loader } = await import("./[id]-VECAKEQ3.js");
4210
- const { ProductTagDetailBreadcrumb: Breadcrumb } = await import("./breadcrumb-Q7FS3IDL.js");
4211
- return {
4212
- Component: Outlet4,
4213
- loader,
4214
- handle: {
4215
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4216
- }
4217
- };
4218
- },
4321
+ path: "product-tags",
4322
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4323
+ element: /* @__PURE__ */ jsx15(Outlet4, {}),
4324
+ handle: { breadcrumb: () => t("productTags.domain"), permissions: "product_tag:read" },
4219
4325
  children: [
4220
4326
  {
4221
4327
  path: "",
4222
4328
  lazy: async () => {
4223
- const { ProductTagDetailPage } = await import("./[id]-VECAKEQ3.js");
4224
- return { Component: ProductTagDetailPage };
4329
+ const { ProductTagListPage } = await import("./product-tags-K2VTAAXN.js");
4330
+ return { Component: ProductTagListPage };
4331
+ }
4332
+ },
4333
+ {
4334
+ path: ":id",
4335
+ lazy: async () => {
4336
+ const { loader } = await import("./[id]-IA4BUZQV.js");
4337
+ const { ProductTagDetailBreadcrumb: Breadcrumb } = await import("./breadcrumb-Q7FS3IDL.js");
4338
+ return {
4339
+ Component: Outlet4,
4340
+ loader,
4341
+ handle: {
4342
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4343
+ }
4344
+ };
4225
4345
  },
4226
4346
  children: [
4227
4347
  {
4228
- path: "edit",
4229
- lazy: () => import("./edit-PZN7UAJI.js")
4348
+ path: "",
4349
+ lazy: async () => {
4350
+ const { ProductTagDetailPage } = await import("./[id]-IA4BUZQV.js");
4351
+ return { Component: ProductTagDetailPage };
4352
+ },
4353
+ children: [
4354
+ {
4355
+ path: "edit",
4356
+ lazy: () => import("./edit-PZN7UAJI.js")
4357
+ }
4358
+ ]
4230
4359
  }
4231
4360
  ]
4232
4361
  }
4233
4362
  ]
4234
- }
4235
- ]
4236
- },
4237
- // USERS
4238
- {
4239
- path: "users",
4240
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4241
- element: /* @__PURE__ */ jsx15(Outlet4, {}),
4242
- handle: { breadcrumb: () => t("users.domain") },
4243
- children: [
4363
+ },
4364
+ // USERS
4244
4365
  {
4245
- path: "",
4246
- lazy: async () => {
4247
- const { TeamListPage } = await import("./team-WKBFUAGW.js");
4248
- return { Component: TeamListPage };
4249
- },
4366
+ path: "users",
4367
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4368
+ element: /* @__PURE__ */ jsx15(Outlet4, {}),
4369
+ handle: { breadcrumb: () => t("users.domain"), permissions: "seller_member:read" },
4250
4370
  children: [
4251
4371
  {
4252
- path: "invite",
4372
+ path: "",
4253
4373
  lazy: async () => {
4254
- const { TeamInvite } = await import("./invite-TZLNT4VS.js");
4255
- return { Component: TeamInvite };
4256
- }
4374
+ const { TeamListPage } = await import("./team-ZPOPUKOW.js");
4375
+ return { Component: TeamListPage };
4376
+ },
4377
+ children: [
4378
+ {
4379
+ path: "invite",
4380
+ lazy: async () => {
4381
+ const { TeamInvite } = await import("./invite-TZLNT4VS.js");
4382
+ return { Component: TeamInvite };
4383
+ }
4384
+ }
4385
+ ]
4257
4386
  }
4258
4387
  ]
4259
- }
4260
- ]
4261
- },
4262
- // PRODUCT TYPES
4263
- {
4264
- path: "product-types",
4265
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4266
- element: /* @__PURE__ */ jsx15(Outlet4, {}),
4267
- handle: { breadcrumb: () => t("productTypes.domain") },
4268
- children: [
4269
- {
4270
- path: "",
4271
- lazy: async () => {
4272
- const { ProductTypeListPage } = await import("./product-types-CMI33S32.js");
4273
- return { Component: ProductTypeListPage };
4274
- },
4275
- children: [
4276
- // TODO: Enable when request product type flow is implemented
4277
- // {
4278
- // path: "create",
4279
- // lazy: () =>
4280
- // import("./pages/settings/product-types/create"),
4281
- // },
4282
- ]
4283
4388
  },
4389
+ // PRODUCT TYPES
4284
4390
  {
4285
- path: ":id",
4286
- lazy: async () => {
4287
- const { productTypeLoader: loader } = await import("./[id]-JXASIBQM.js");
4288
- const { ProductTypeDetailBreadcrumb: Breadcrumb } = await import("./breadcrumb-Z2QUGZM3.js");
4289
- return {
4290
- Component: Outlet4,
4291
- loader,
4292
- handle: {
4293
- breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4294
- }
4295
- };
4296
- },
4391
+ path: "product-types",
4392
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4393
+ element: /* @__PURE__ */ jsx15(Outlet4, {}),
4394
+ handle: { breadcrumb: () => t("productTypes.domain"), permissions: "product_type:read" },
4297
4395
  children: [
4298
4396
  {
4299
4397
  path: "",
4300
4398
  lazy: async () => {
4301
- const { ProductTypeDetailPage } = await import("./[id]-JXASIBQM.js");
4302
- return { Component: ProductTypeDetailPage };
4399
+ const { ProductTypeListPage } = await import("./product-types-SS7BPBQH.js");
4400
+ return { Component: ProductTypeListPage };
4401
+ },
4402
+ children: [
4403
+ // TODO: Enable when request product type flow is implemented
4404
+ // {
4405
+ // path: "create",
4406
+ // lazy: () =>
4407
+ // import("./pages/settings/product-types/create"),
4408
+ // },
4409
+ ]
4410
+ },
4411
+ {
4412
+ path: ":id",
4413
+ lazy: async () => {
4414
+ const { productTypeLoader: loader } = await import("./[id]-VJQTBSXS.js");
4415
+ const { ProductTypeDetailBreadcrumb: Breadcrumb } = await import("./breadcrumb-Z2QUGZM3.js");
4416
+ return {
4417
+ Component: Outlet4,
4418
+ loader,
4419
+ handle: {
4420
+ breadcrumb: (match) => /* @__PURE__ */ jsx15(Breadcrumb, { ...match })
4421
+ }
4422
+ };
4303
4423
  },
4304
4424
  children: [
4305
4425
  {
4306
- path: "edit",
4307
- lazy: () => import("./edit-QPTRBYJQ.js")
4426
+ path: "",
4427
+ lazy: async () => {
4428
+ const { ProductTypeDetailPage } = await import("./[id]-VJQTBSXS.js");
4429
+ return { Component: ProductTypeDetailPage };
4430
+ },
4431
+ children: [
4432
+ {
4433
+ path: "edit",
4434
+ lazy: () => import("./edit-QPTRBYJQ.js")
4435
+ }
4436
+ ]
4308
4437
  }
4309
4438
  ]
4310
4439
  }
4311
4440
  ]
4312
- }
4313
- ]
4314
- },
4315
- // RETURN REASONS
4316
- {
4317
- path: "return-reasons",
4318
- errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4319
- element: /* @__PURE__ */ jsx15(Outlet4, {}),
4320
- handle: { breadcrumb: () => t("returnReasons.domain") },
4321
- children: [
4441
+ },
4442
+ // RETURN REASONS
4322
4443
  {
4323
- path: "",
4324
- lazy: () => import("./return-reasons-OJG5J6H2.js"),
4444
+ path: "return-reasons",
4445
+ errorElement: /* @__PURE__ */ jsx15(ErrorBoundary, {}),
4446
+ element: /* @__PURE__ */ jsx15(Outlet4, {}),
4447
+ handle: { breadcrumb: () => t("returnReasons.domain"), permissions: "return_reason:read" },
4325
4448
  children: [
4326
4449
  {
4327
- path: "create",
4328
- lazy: () => import("./create-EMU23LKH.js")
4329
- },
4330
- {
4331
- path: ":id/edit",
4332
- lazy: () => import("./edit-Q7KDO37A.js")
4450
+ path: "",
4451
+ lazy: () => import("./return-reasons-EQULPT57.js"),
4452
+ children: [
4453
+ {
4454
+ path: "create",
4455
+ lazy: () => import("./create-EMU23LKH.js")
4456
+ },
4457
+ {
4458
+ path: ":id/edit",
4459
+ lazy: () => import("./edit-Q7KDO37A.js")
4460
+ }
4461
+ ]
4333
4462
  }
4334
4463
  ]
4335
4464
  }
4336
- ]
4337
- }
4338
- ],
4339
- customSettingsRoutes?.[0]?.children || []
4340
- )
4465
+ ],
4466
+ customSettingsRoutes?.[0]?.children || []
4467
+ )
4468
+ }
4469
+ ]
4341
4470
  }
4342
4471
  ]
4343
4472
  },
@@ -4357,12 +4486,12 @@ function getRouteMap({
4357
4486
  },
4358
4487
  {
4359
4488
  path: "/reset-password",
4360
- lazy: () => import("./reset-password-ASLKY3GK.js")
4489
+ lazy: () => import("./reset-password-U335V424.js")
4361
4490
  },
4362
4491
  {
4363
4492
  path: "/register",
4364
4493
  lazy: async () => {
4365
- const { RegisterPage } = await import("./register-RCIO7QRB.js");
4494
+ const { RegisterPage } = await import("./register-T2YUB5NP.js");
4366
4495
  return { Component: RegisterPage };
4367
4496
  }
4368
4497
  },
@@ -4394,10 +4523,10 @@ function getRouteMap({
4394
4523
  }
4395
4524
 
4396
4525
  // src/app.tsx
4397
- import { useMemo as useMemo5 } from "react";
4526
+ import { useMemo as useMemo7 } from "react";
4398
4527
  import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
4399
4528
  function App() {
4400
- const routes = useMemo5(() => {
4529
+ const routes = useMemo7(() => {
4401
4530
  return {
4402
4531
  settingsRoutes: createRouteMap(getRoutesByType(customRoutes, "settings")),
4403
4532
  mainRoutes: createRouteMap(getRoutesByType(customRoutes, "main")),
@@ -4576,7 +4705,7 @@ var FileThumbnail = () => {
4576
4705
 
4577
4706
  // src/components/common/infinite-list/infinite-list.tsx
4578
4707
  import { useInfiniteQuery } from "@tanstack/react-query";
4579
- import { useEffect as useEffect10, useMemo as useMemo6, useRef as useRef2 } from "react";
4708
+ import { useEffect as useEffect10, useMemo as useMemo8, useRef as useRef2 } from "react";
4580
4709
  import { toast } from "@medusajs/ui";
4581
4710
  import { Spinner as Spinner4 } from "@medusajs/icons";
4582
4711
  import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
@@ -4618,7 +4747,7 @@ var InfiniteList = ({
4618
4747
  },
4619
4748
  ...queryOptions
4620
4749
  });
4621
- const items = useMemo6(() => {
4750
+ const items = useMemo8(() => {
4622
4751
  return data?.pages.flatMap((p) => p[responseKey]) ?? [];
4623
4752
  }, [data, responseKey]);
4624
4753
  const parentRef = useRef2(null);