@salesgenterp/ui-components 0.4.564 → 0.4.566

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.
@@ -1,10 +1,10 @@
1
- import { Skeleton as Skeleton$1, CircularProgress, TextField, Button, IconButton, Stack, Typography, Grid, InputAdornment, Popover, TableHead, TableRow, TableSortLabel, Paper, TableContainer as TableContainer$4, Table, TableBody, TableCell, TablePagination, Dialog, DialogTitle as DialogTitle$1, DialogContent, DialogActions, RadioGroup, Radio, FormControlLabel, FormLabel, FormControl, FormHelperText, Select as Select$1, InputLabel, MenuItem, Checkbox, CardMedia, Divider, Tabs, Box, Tab, CardContent, ListItemIcon, ListItem, Collapse, List, ListItemText, Card as Card$1, CardHeader as CardHeader$1, CssBaseline, Toolbar, Drawer, useMediaQuery as useMediaQuery$1, Tooltip, Pagination, CardActionArea, Avatar as Avatar$1, alpha, Stepper, Step, StepLabel, StepContent, Container as Container$4 } from '@mui/material';
2
- import { styled as styled$1 } from '@mui/material/styles';
1
+ import { Skeleton as Skeleton$1, CircularProgress, TextField, Button, IconButton, Stack, Typography, Grid, InputAdornment, Popover, TableHead, TableRow, TableSortLabel, Paper, TableContainer as TableContainer$4, Table, TableBody, TableCell, TablePagination, Dialog, DialogTitle as DialogTitle$1, DialogContent, DialogActions, RadioGroup, Radio, FormControlLabel, FormLabel, FormControl, FormHelperText, Select as Select$1, InputLabel, MenuItem, Checkbox, CardMedia, Divider, Tabs, Box, Tab, CardContent, ListItemIcon, ListItem, Collapse, List, ListItemText, Card as Card$1, CardHeader as CardHeader$1, CssBaseline, Toolbar, Drawer, useMediaQuery as useMediaQuery$1, Tooltip, Pagination, ClickAwayListener, CardActionArea, Avatar as Avatar$1, alpha, Stepper, Step, StepLabel, StepContent, Container as Container$4, Slider as Slider$1 } from '@mui/material';
2
+ import { styled as styled$1, alpha as alpha$1 } from '@mui/material/styles';
3
3
  import useMediaQuery from '@mui/material/useMediaQuery';
4
- import React__default, { useState, useEffect, forwardRef, useRef, memo, useMemo, createElement, useCallback, Fragment as Fragment$1 } from 'react';
4
+ import React__default, { useState, useEffect, forwardRef, useRef, memo, useMemo, createElement, useCallback, Fragment as Fragment$1, useContext } from 'react';
5
5
  import { MdVisibilityOff, MdVisibility, MdPrint, MdClose, MdMonetizationOn, MdOutlineStorefront, MdRemoveRedEye, MdOutlineFileDownload, MdPersonOutline, MdOutlineCall, MdMailOutline, MdExpandMore, MdExpandLess, MdStore, MdOutlineMenuOpen, MdMenu, MdDarkMode, MdOutlineDarkMode, MdLocalOffer, MdDelete, MdCheckCircle, MdArrowBack, MdOutlineCircle, MdOutlineStickyNote2, MdOutlineNumbers, MdDateRange, MdOutlineWarehouse } from 'react-icons/md';
6
- import styled, { css, ThemeProvider, keyframes } from 'styled-components';
7
- import { isEmpty, isString, toNumber, includes, reduce, concat, omit, replace, template, isArray, some, toLower, isPlainObject, values, cloneDeep, filter, sortBy, isObject, sumBy, get, isNumber, remove } from 'lodash';
6
+ import styled, { css, ThemeProvider, keyframes, ThemeContext } from 'styled-components';
7
+ import { isEmpty, isString, toNumber, includes, reduce, concat, omit, replace, template, isArray, some, toLower, isPlainObject, values, cloneDeep, filter, sortBy, isObject, sumBy, get, isNumber } from 'lodash';
8
8
  import axios from 'axios';
9
9
  import moment from 'moment';
10
10
  import qs from 'qs';
@@ -12,7 +12,7 @@ import Cookies from 'js-cookie';
12
12
  import Alert from '@mui/material/Alert';
13
13
  import AlertTitle from '@mui/material/AlertTitle';
14
14
  import { Controller, useForm } from 'react-hook-form';
15
- import { AiOutlinePlus, AiOutlineRise, AiOutlineShoppingCart, AiOutlineCreditCard, AiOutlineLeft, AiOutlineRight, AiOutlineMinus, AiOutlineDelete, AiOutlineHome, AiOutlineShop, AiOutlineCheckCircle, AiOutlineCheck, AiFillEyeInvisible, AiFillEye } from 'react-icons/ai';
15
+ import { AiOutlinePlus, AiOutlineRise, AiOutlineShoppingCart, AiOutlineCreditCard, AiOutlineLeft, AiOutlineRight, AiOutlineMinus, AiOutlineDelete, AiOutlineInfoCircle, AiOutlineHome, AiOutlineShop, AiOutlineCheckCircle, AiOutlineCheck, AiFillEyeInvisible, AiFillEye } from 'react-icons/ai';
16
16
  import { FaRegUser, FaFacebookF, FaInstagram, FaTwitter, FaLinkedinIn, FaYoutube, FaCalendarCheck, FaUserAlt, FaLock, FaTools } from 'react-icons/fa';
17
17
  import { GiCardboardBoxClosed } from 'react-icons/gi';
18
18
  import { GrStackOverflow, GrClose, GrRadialSelected } from 'react-icons/gr';
@@ -12153,36 +12153,69 @@ var AsyncSelect = function AsyncSelect(_ref3) {
12153
12153
  return /*#__PURE__*/React__default.createElement(AsyncSelectField, props);
12154
12154
  };
12155
12155
 
12156
- var _templateObject$F;
12156
+ var _templateObject$F, _templateObject2$u, _templateObject3$o, _templateObject4$j, _templateObject5$f, _templateObject6$d, _templateObject7$a, _templateObject8$8;
12157
+ var DEFAULT_PRIMARY = '#424242';
12158
+ var getPrimary = function getPrimary(props) {
12159
+ var _props$theme;
12160
+ return (props === null || props === void 0 ? void 0 : (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : _props$theme.primaryColor) || DEFAULT_PRIMARY;
12161
+ };
12157
12162
  var Container$2 = styled.div(_templateObject$F || (_templateObject$F = _taggedTemplateLiteralLoose([""])));
12163
+ var TopBar = styled.div(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 12px;\n .search {\n flex: 1;\n min-width: 0;\n }\n @media only screen and (max-width: 600px) {\n flex-wrap: wrap;\n .search {\n flex-basis: 100%;\n }\n }\n"])));
12164
+ var LastOrderedWrapper = styled.div(_templateObject3$o || (_templateObject3$o = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 6px;\n margin-left: auto;\n flex-shrink: 0;\n"])));
12165
+ var LastOrderedButton = styled.button(_templateObject4$j || (_templateObject4$j = _taggedTemplateLiteralLoose(["\n height: 38px;\n padding: 0 16px;\n border: none;\n border-radius: 4px;\n cursor: pointer;\n white-space: nowrap;\n font-weight: 500;\n color: #fff;\n background: ", ";\n transition: opacity 0.2s;\n &:hover {\n opacity: 0.9;\n }\n"])), function (props) {
12166
+ var _props$theme2;
12167
+ return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : _props$theme2.primaryColor) || '#424242';
12168
+ });
12169
+ var InfoIcon = styled.span(_templateObject5$f || (_templateObject5$f = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n font-size: 1.25em;\n color: #6b6b6b;\n cursor: pointer;\n"])));
12170
+ var DialogFooterButton = styled.button(_templateObject6$d || (_templateObject6$d = _taggedTemplateLiteralLoose(["\n height: 38px;\n min-width: 100px;\n padding: 0 18px;\n border-radius: 4px;\n cursor: pointer;\n font-weight: 500;\n white-space: nowrap;\n border: 1px solid ", ";\n color: ", ";\n background: ", ";\n transition: opacity 0.2s;\n &:hover:not(:disabled) {\n opacity: 0.9;\n }\n &:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n"])), function (props) {
12171
+ var _props$theme3;
12172
+ return ((_props$theme3 = props.theme) === null || _props$theme3 === void 0 ? void 0 : _props$theme3.primaryColor) || '#424242';
12173
+ }, function (props) {
12174
+ var _props$theme4;
12175
+ return props.variant === 'outlined' ? ((_props$theme4 = props.theme) === null || _props$theme4 === void 0 ? void 0 : _props$theme4.primaryColor) || '#424242' : '#fff';
12176
+ }, function (props) {
12177
+ var _props$theme5;
12178
+ return props.variant === 'outlined' ? '#fff' : ((_props$theme5 = props.theme) === null || _props$theme5 === void 0 ? void 0 : _props$theme5.primaryColor) || '#424242';
12179
+ });
12180
+ var DialogLoadMore = styled.div(_templateObject7$a || (_templateObject7$a = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n padding: 16px 0 4px;\n color: #6b6b6b;\n"])));
12181
+ var DialogFooter = styled.div(_templateObject8$8 || (_templateObject8$8 = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n .pagination {\n display: flex;\n align-items: center;\n gap: 12px;\n flex-wrap: wrap;\n }\n .count {\n font-size: 0.85em;\n color: #6b6b6b;\n white-space: nowrap;\n }\n .buttons {\n display: flex;\n gap: 8px;\n margin-left: auto;\n }\n"])));
12158
12182
 
12159
- var _templateObject$G, _templateObject2$u, _templateObject3$o, _templateObject4$j, _templateObject5$f, _templateObject6$d;
12183
+ var _templateObject$G, _templateObject2$v, _templateObject3$p, _templateObject4$k, _templateObject5$g, _templateObject6$e;
12160
12184
  var ProductImage$1 = styled.img.attrs(function (props) {
12161
12185
  return {
12162
12186
  loading: props.loading || 'lazy',
12163
12187
  decoding: 'async'
12164
12188
  };
12165
- })(_templateObject$G || (_templateObject$G = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 50px;\n object-fit: contain;\n @media only screen and (max-width: 600px) {\n margin: 0.5em 0;\n padding-right: 0.5em;\n }\n"])));
12166
- var ProductName$1 = styled.h6(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n padding: 0;\n line-height: 1.3em;\n max-height: ", ";\n height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n height: fit-content;\n"])), function (props) {
12189
+ })(_templateObject$G || (_templateObject$G = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 50px;\n object-fit: contain;\n"])));
12190
+ var ProductName$1 = styled.h6(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n padding: 0;\n line-height: 1.3em;\n max-height: ", ";\n height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n height: fit-content;\n"])), function (props) {
12167
12191
  return props.size || '1em';
12168
12192
  }, function (props) {
12169
12193
  return props.maxHeight ? props.maxHeight + "em" : '2.75em';
12170
12194
  }, function (props) {
12171
12195
  return props.maxHeight ? props.maxHeight + "em" : '2.80em';
12172
12196
  });
12173
- var CartTableRow$1 = styled(TableRow)(_templateObject3$o || (_templateObject3$o = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: 0.3s;\n background: white;\n /* &:hover {\n td:first-child,\n td:last-child {\n border-left-style: solid;\n border-top-style: solid;\n border-top-right-radius: 10px;\n }\n } */\n .outOfStock {\n font-size: 0.75em;\n color: red;\n text-transform: uppercase;\n font-weight: 500;\n }\n .price {\n font-size: ", ";\n font-weight: bold;\n color: #323232;\n /* font-size: 1.15em; */\n }\n .borderLeft {\n height: 100%;\n background: ", ";\n transition: 0.2s;\n width: 0px;\n position: absolute;\n left: 0;\n top: 0;\n border-top-left-radius: 10px;\n display: none;\n border-bottom-left-radius: 10px;\n }\n .cartCheckBox {\n &.Mui-checked {\n svg {\n color: ", ";\n }\n }\n }\n &:hover {\n background: white !important;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);\n border-radius: 10px;\n /* opacity: 1;\n box-shadow: 1px 2px 6px 2px rgba(0, 0, 0, 0.2); */\n z-index: 2;\n /* border-radius: 20px; */\n .borderLeft {\n width: 12px;\n display: inline-block;\n }\n }\n @media only screen and (max-width: 600px) {\n .CartnoPaddingSm {\n padding: 0 !important;\n }\n .price {\n font-size: 0.8em;\n }\n margin: 0.5em 0;\n .cartCheckBox {\n .css-i4bv87-MuiSvgIcon-root {\n font-size: 10px !important;\n }\n }\n }\n"])), function (props) {
12197
+ var CartTableRow$1 = styled(TableRow)(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n position: relative;\n transition: 0.3s;\n background: ", ";\n cursor: pointer;\n /* &:hover {\n td:first-child,\n td:last-child {\n border-left-style: solid;\n border-top-style: solid;\n border-top-right-radius: 10px;\n }\n } */\n .outOfStock {\n font-size: 0.75em;\n color: red;\n text-transform: uppercase;\n font-weight: 500;\n }\n .price {\n font-size: ", ";\n font-weight: bold;\n color: #323232;\n /* font-size: 1.15em; */\n }\n .borderLeft {\n height: 100%;\n background: ", ";\n transition: 0.2s;\n width: ", ";\n position: absolute;\n left: 0;\n top: 0;\n border-top-left-radius: 10px;\n display: ", ";\n border-bottom-left-radius: 10px;\n }\n .cartCheckBox {\n &.Mui-checked {\n svg {\n color: ", ";\n }\n }\n }\n &:hover {\n background: ", " !important;\n box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);\n border-radius: 10px;\n /* opacity: 1;\n box-shadow: 1px 2px 6px 2px rgba(0, 0, 0, 0.2); */\n z-index: 2;\n /* border-radius: 20px; */\n .borderLeft {\n width: 12px;\n display: inline-block;\n }\n }\n .mobileLabel {\n display: none;\n }\n .stock {\n font-size: 0.95em;\n font-weight: 600;\n color: #2e7d32;\n }\n .stock-out {\n color: #d32f2f;\n }\n /* Small screens: each row becomes a card.\n [check] [img] name ............ [delete]\n $price each\n [- qty +] Subtotal $x */\n @media only screen and (max-width: 768px) {\n display: grid;\n grid-template-columns: 32px 56px minmax(0, 1fr) auto;\n grid-template-areas:\n 'check img name delete'\n 'check img price stock'\n 'check qty qty subtotal';\n column-gap: 10px;\n row-gap: 6px;\n align-items: center;\n padding: 12px 10px;\n margin: 0 0 10px;\n border: 1px solid #ececec;\n border-radius: 10px;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);\n &:hover {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);\n .borderLeft {\n display: none;\n }\n }\n > td,\n > th {\n display: block;\n width: auto;\n padding: 0 !important;\n text-align: left;\n }\n .cell-check {\n grid-area: check;\n align-self: start;\n }\n .cell-img {\n grid-area: img;\n align-self: start;\n img {\n width: 56px;\n height: 56px;\n margin: 0;\n padding: 0;\n }\n }\n .cell-name {\n grid-area: name;\n align-self: start;\n h6 {\n font-size: 0.9em;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n p {\n font-size: 0.8em;\n margin-top: 2px;\n }\n }\n .cell-price {\n grid-area: price;\n .price {\n font-size: 0.85em;\n font-weight: 500;\n color: #6b6b6b;\n }\n }\n .cell-stock {\n grid-area: stock;\n text-align: right;\n .stock {\n font-size: 0.8em;\n }\n }\n .cell-qty {\n grid-area: qty;\n justify-self: start;\n }\n .cell-subtotal {\n grid-area: subtotal;\n text-align: right;\n .price {\n font-size: 0.95em;\n }\n }\n .cell-delete {\n grid-area: delete;\n align-self: start;\n }\n .mobileLabel {\n display: inline;\n font-weight: 400;\n color: #6b6b6b;\n font-size: 0.85em;\n }\n .cartCheckBox {\n padding: 0;\n }\n }\n"])), function (props) {
12198
+ return props.$selected ? '#f7f8fa' : 'white';
12199
+ }, function (props) {
12174
12200
  return props.size || '1.19em';
12175
12201
  }, function (prop) {
12176
- return prop.bg;
12202
+ return prop.bg || getPrimary(prop);
12203
+ }, function (props) {
12204
+ return props.$selected ? '4px' : '0px';
12205
+ }, function (props) {
12206
+ return props.$selected ? 'inline-block' : 'none';
12177
12207
  }, function (prop) {
12178
- return prop.bg;
12208
+ return prop.bg || getPrimary(prop);
12209
+ }, function (props) {
12210
+ return props.$selected ? '#f7f8fa' : 'white';
12179
12211
  });
12180
- var CartTableCell$2 = styled(TableCell)(_templateObject4$j || (_templateObject4$j = _taggedTemplateLiteralLoose(["\n && {\n border: none !important;\n font-size: 1em;\n }\n"])));
12181
- var QuantityBox$1 = styled.div(_templateObject5$f || (_templateObject5$f = _taggedTemplateLiteralLoose(["\n height: 1.7em;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n div {\n /* width:30px; */\n min-height: 100%;\n aspect-ratio: 1.15/1;\n display: grid;\n place-items: center;\n font-size: 0.65em;\n color: white;\n background-color: #323232;\n cursor: pointer;\n }\n .price {\n background: transparent;\n cursor: auto;\n background: #ffffff;\n border: 1px solid #ebebeb;\n p {\n color: #5e5c5c;\n font-size: 0.685em;\n font-weight: 500;\n }\n }\n .add {\n background-color: #ebebeb;\n color: #323232;\n }\n"])));
12182
- var DeleteBtn$1 = styled.div(_templateObject6$d || (_templateObject6$d = _taggedTemplateLiteralLoose(["\n display: grid;\n place-items: center;\n cursor: pointer;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n background: #eef1f4;\n color: #393f48;\n font-size: 0.75em;\n transition: 0.4s;\n &:hover {\n background: red;\n color: white;\n }\n"])));
12212
+ var CartTableCell$2 = styled(TableCell)(_templateObject4$k || (_templateObject4$k = _taggedTemplateLiteralLoose(["\n && {\n border: none !important;\n font-size: 1em;\n }\n"])));
12213
+ var QuantityBox$1 = styled.div(_templateObject5$g || (_templateObject5$g = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: stretch;\n height: 36px;\n border: 1px solid #dcdfe4;\n border-radius: 8px;\n overflow: hidden;\n background: #fff;\n transition: border-color 0.2s, box-shadow 0.2s;\n &:focus-within {\n border-color: ", ";\n box-shadow: 0 0 0 1px ", ";\n }\n .stepBtn {\n position: relative;\n isolation: isolate;\n width: 34px;\n display: grid;\n place-items: center;\n padding: 0;\n border: none;\n background: #fff;\n color: ", ";\n font-size: 14px;\n cursor: pointer;\n transition: color 0.15s;\n /* Light tint: the primary color at low opacity, behind the icon. */\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n background: ", ";\n opacity: 0.1;\n transition: opacity 0.15s;\n }\n &:hover:not(:disabled) {\n color: #fff;\n &::before {\n opacity: 1;\n }\n }\n &:active:not(:disabled) {\n transform: scale(0.94);\n }\n &:disabled {\n cursor: not-allowed;\n color: #b8bcc4;\n background: #f4f5f7;\n &::before {\n display: none;\n }\n }\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: -2px;\n }\n }\n input {\n width: 48px;\n border: none;\n border-left: 1px solid #dcdfe4;\n border-right: 1px solid #dcdfe4;\n outline: none;\n text-align: center;\n font-size: 14px;\n font-weight: 600;\n color: #2b2b2b;\n background: #fff;\n -moz-appearance: textfield;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n &:disabled {\n color: #9aa0a6;\n }\n }\n @media only screen and (max-width: 768px) {\n height: 38px;\n .stepBtn {\n width: 38px;\n }\n }\n"])), getPrimary, getPrimary, getPrimary, getPrimary, getPrimary);
12214
+ var DeleteBtn$1 = styled.button(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n display: grid;\n place-items: center;\n cursor: pointer;\n border: none;\n border-radius: 8px;\n width: 32px;\n height: 32px;\n padding: 0;\n background: #f4f5f7;\n color: #6b7280;\n font-size: 16px;\n transition: background 0.2s, color 0.2s;\n &:hover {\n background: #fdecec;\n color: #d32f2f;\n }\n &:focus-visible {\n outline: 2px solid #d32f2f;\n outline-offset: 2px;\n }\n"])));
12183
12215
  var CardRow$1 = function CardRow(_ref) {
12184
- var _styles$price, _styles$Btn, _row$standardPrice, _row$subtotal;
12216
+ var _styles$price, _row$availableQuantit;
12185
12217
  var row = _ref.row,
12218
+ index = _ref.index,
12186
12219
  isItemSelected = _ref.isItemSelected,
12187
12220
  handleClick = _ref.handleClick,
12188
12221
  imgnotfoundUrl = _ref.imgnotfoundUrl,
@@ -12192,9 +12225,60 @@ var CardRow$1 = function CardRow(_ref) {
12192
12225
  imgSize = _ref.imgSize,
12193
12226
  styles = _ref.styles,
12194
12227
  _ref$allowToProcessIn = _ref.allowToProcessInvoiceForOutOfStockProductsEcommerce,
12195
- allowToProcessInvoiceForOutOfStockProductsEcommerce = _ref$allowToProcessIn === void 0 ? false : _ref$allowToProcessIn;
12228
+ allowToProcessInvoiceForOutOfStockProductsEcommerce = _ref$allowToProcessIn === void 0 ? false : _ref$allowToProcessIn,
12229
+ _ref$hideDelete = _ref.hideDelete,
12230
+ hideDelete = _ref$hideDelete === void 0 ? false : _ref$hideDelete,
12231
+ _ref$hideStock = _ref.hideStock,
12232
+ hideStock = _ref$hideStock === void 0 ? false : _ref$hideStock;
12196
12233
  var imgnotfoundUrlcommon = noImgAvailable;
12197
12234
  if (imgnotfoundUrl && imgnotfoundUrl !== 'null') imgnotfoundUrlcommon = imgnotfoundUrl;
12235
+ var onChangeQuantity = function onChangeQuantity(product) {
12236
+ if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || !allowToProcessInvoiceForOutOfStockProductsEcommerce && (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
12237
+ return handleRemoveProduct(product, index);
12238
+ }
12239
+ handleIncrementDecrement(product);
12240
+ };
12241
+ var timer = useRef();
12242
+ var _useState = useState(row === null || row === void 0 ? void 0 : row.quantity),
12243
+ quantity = _useState[0],
12244
+ setQuantity = _useState[1];
12245
+ useEffect(function () {
12246
+ setQuantity(row === null || row === void 0 ? void 0 : row.quantity);
12247
+ }, [row === null || row === void 0 ? void 0 : row.quantity]);
12248
+ useEffect(function () {
12249
+ return function () {
12250
+ return clearTimeout(timer.current);
12251
+ };
12252
+ }, []);
12253
+ var onChangeInput = function onChangeInput(e) {
12254
+ var value = e.target.value;
12255
+ setQuantity(value);
12256
+ clearTimeout(timer.current);
12257
+ if (value === '') return;
12258
+ timer.current = setTimeout(function () {
12259
+ var typedQty = parseInt(value, 10);
12260
+ if (!(typedQty > 0)) {
12261
+ handleRemoveProduct(row, index);
12262
+ setQuantity(row === null || row === void 0 ? void 0 : row.quantity);
12263
+ return;
12264
+ }
12265
+ var validQty = checkMinMaxQty({
12266
+ quantity: typedQty,
12267
+ product: row,
12268
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce
12269
+ });
12270
+ setQuantity(validQty);
12271
+ onChangeQuantity(_extends({}, row, {
12272
+ quantity: validQty
12273
+ }));
12274
+ }, 500);
12275
+ };
12276
+ var onBlurInput = function onBlurInput() {
12277
+ if (quantity === '' || quantity === undefined) {
12278
+ clearTimeout(timer.current);
12279
+ setQuantity(row === null || row === void 0 ? void 0 : row.quantity);
12280
+ }
12281
+ };
12198
12282
  return /*#__PURE__*/React__default.createElement(CartTableRow$1, {
12199
12283
  onClick: function onClick(event) {
12200
12284
  return handleClick(event, row);
@@ -12202,11 +12286,13 @@ var CardRow$1 = function CardRow(_ref) {
12202
12286
  role: "checkbox",
12203
12287
  "aria-checked": isItemSelected,
12204
12288
  tabIndex: -1,
12205
- key: row.ProductId,
12289
+ key: row === null || row === void 0 ? void 0 : row.rowId,
12206
12290
  size: styles === null || styles === void 0 ? void 0 : (_styles$price = styles.price) === null || _styles$price === void 0 ? void 0 : _styles$price.size,
12207
- bg: (styles === null || styles === void 0 ? void 0 : styles.borderLeft) || (styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background)
12291
+ bg: styles === null || styles === void 0 ? void 0 : styles.borderLeft,
12292
+ $selected: isItemSelected
12208
12293
  }, /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12209
12294
  padding: "checkbox",
12295
+ className: "cell-check",
12210
12296
  style: {
12211
12297
  position: 'relative'
12212
12298
  }
@@ -12221,9 +12307,9 @@ var CardRow$1 = function CardRow(_ref) {
12221
12307
  },
12222
12308
  className: "cartCheckBox"
12223
12309
  })), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12224
- className: "CartnoPaddingSm"
12310
+ className: "cell-img"
12225
12311
  }, /*#__PURE__*/React__default.createElement(ProductImage$1, {
12226
- src: row.imageUrl && row.imageUrl !== 'null' ? row.imageUrl : imgnotfoundUrlcommon,
12312
+ src: row !== null && row !== void 0 && row.imageUrl && (row === null || row === void 0 ? void 0 : row.imageUrl) !== 'null' ? row === null || row === void 0 ? void 0 : row.imageUrl : imgnotfoundUrlcommon,
12227
12313
  alt: 'img',
12228
12314
  width: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.width) || 50,
12229
12315
  height: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.height) || 50
@@ -12231,60 +12317,93 @@ var CardRow$1 = function CardRow(_ref) {
12231
12317
  component: "th",
12232
12318
  id: row === null || row === void 0 ? void 0 : row.labelId,
12233
12319
  scope: "row",
12234
- padding: "none"
12235
- }, /*#__PURE__*/React__default.createElement(ProductName$1, null, row.productName), !allowToProcessInvoiceForOutOfStockProductsEcommerce ? (row.quantity > row.availableQuantity || row.availableQuantity <= 0) && /*#__PURE__*/React__default.createElement("p", {
12320
+ padding: "none",
12321
+ className: "cell-name"
12322
+ }, /*#__PURE__*/React__default.createElement(ProductName$1, null, row === null || row === void 0 ? void 0 : row.productName), !allowToProcessInvoiceForOutOfStockProductsEcommerce ? ((row === null || row === void 0 ? void 0 : row.quantity) > (row === null || row === void 0 ? void 0 : row.availableQuantity) || (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) && /*#__PURE__*/React__default.createElement("p", {
12236
12323
  style: {
12237
12324
  color: 'red',
12238
12325
  fontWeight: 500
12239
12326
  }
12240
- }, "Maximum available quantity is ", row.availableQuantity) : /*#__PURE__*/React__default.createElement("div", null)), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12327
+ }, "Maximum available quantity is ", row === null || row === void 0 ? void 0 : row.availableQuantity) : /*#__PURE__*/React__default.createElement("div", null)), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12241
12328
  align: "center",
12242
- className: "CartnoBelowSm"
12329
+ className: "cell-price"
12243
12330
  }, /*#__PURE__*/React__default.createElement("p", {
12244
12331
  className: "price"
12245
- }, "$", row === null || row === void 0 ? void 0 : (_row$standardPrice = row.standardPrice) === null || _row$standardPrice === void 0 ? void 0 : _row$standardPrice.toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12246
- align: "center"
12247
- }, /*#__PURE__*/React__default.createElement(QuantityBox$1, null, /*#__PURE__*/React__default.createElement("div", {
12332
+ }, "$", (Number(row === null || row === void 0 ? void 0 : row.standardPrice) || 0).toFixed(2), /*#__PURE__*/React__default.createElement("span", {
12333
+ className: "mobileLabel"
12334
+ }, " each"))), !hideStock && /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12335
+ align: "center",
12336
+ className: "cell-stock"
12337
+ }, /*#__PURE__*/React__default.createElement("p", {
12338
+ className: "stock " + (Number(row === null || row === void 0 ? void 0 : row.availableQuantity) > 0 ? '' : 'stock-out')
12339
+ }, /*#__PURE__*/React__default.createElement("span", {
12340
+ className: "mobileLabel"
12341
+ }, "Stock: "), (_row$availableQuantit = row === null || row === void 0 ? void 0 : row.availableQuantity) != null ? _row$availableQuantit : '-')), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12342
+ align: "center",
12343
+ className: "cell-qty"
12344
+ }, /*#__PURE__*/React__default.createElement(QuantityBox$1, {
12345
+ onClick: function onClick(e) {
12346
+ return e.stopPropagation();
12347
+ }
12348
+ }, /*#__PURE__*/React__default.createElement("button", {
12349
+ type: "button",
12350
+ className: "stepBtn",
12351
+ "aria-label": "Decrease quantity",
12352
+ disabled: loading || hideDelete && (row === null || row === void 0 ? void 0 : row.quantity) <= 1,
12248
12353
  onClick: function onClick(e) {
12249
12354
  e.stopPropagation();
12250
12355
  if (loading) return;
12251
- if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) {
12356
+ if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0 || (row === null || row === void 0 ? void 0 : row.quantity) === 1) {
12252
12357
  return handleRemoveProduct(row, index);
12253
12358
  }
12254
- handleIncrementDecrement('decrement', _extends({}, row, {
12255
- quantity: (row === null || row === void 0 ? void 0 : row.quantity) > (row === null || row === void 0 ? void 0 : row.availableQuantity) ? row === null || row === void 0 ? void 0 : row.availableQuantity : row === null || row === void 0 ? void 0 : row.quantity
12359
+ onChangeQuantity(_extends({}, row, {
12360
+ quantity: checkMinMaxQty({
12361
+ quantity: (row === null || row === void 0 ? void 0 : row.quantity) - 1,
12362
+ product: row,
12363
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce
12364
+ })
12256
12365
  }));
12257
12366
  }
12258
- }, /*#__PURE__*/React__default.createElement(AiOutlineMinus, {
12259
- style: {
12260
- fontSize: 'inherit'
12261
- }
12262
- })), /*#__PURE__*/React__default.createElement("div", {
12263
- className: "price"
12264
- }, /*#__PURE__*/React__default.createElement("p", null, row === null || row === void 0 ? void 0 : row.quantity)), /*#__PURE__*/React__default.createElement("div", {
12265
- className: "add",
12367
+ }, /*#__PURE__*/React__default.createElement(AiOutlineMinus, null)), /*#__PURE__*/React__default.createElement("input", {
12368
+ type: "number",
12369
+ min: 1,
12370
+ inputMode: "numeric",
12371
+ value: quantity,
12372
+ disabled: loading,
12373
+ onChange: onChangeInput,
12374
+ onBlur: onBlurInput,
12375
+ onFocus: function onFocus(e) {
12376
+ return e.target.select();
12377
+ },
12378
+ "aria-label": "Quantity"
12379
+ }), /*#__PURE__*/React__default.createElement("button", {
12380
+ type: "button",
12381
+ className: "stepBtn",
12382
+ "aria-label": "Increase quantity",
12383
+ disabled: loading,
12266
12384
  onClick: function onClick(e) {
12267
12385
  e.stopPropagation();
12268
12386
  if (loading) return;
12269
- if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) {
12270
- return handleRemoveProduct(row, index);
12271
- }
12272
- handleIncrementDecrement('increment', _extends({}, row, {
12273
- quantity: (row === null || row === void 0 ? void 0 : row.quantity) > (row === null || row === void 0 ? void 0 : row.availableQuantity) ? row === null || row === void 0 ? void 0 : row.availableQuantity : row === null || row === void 0 ? void 0 : row.quantity
12387
+ onChangeQuantity(_extends({}, row, {
12388
+ quantity: checkMinMaxQty({
12389
+ quantity: (row === null || row === void 0 ? void 0 : row.quantity) + 1,
12390
+ product: row,
12391
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce
12392
+ })
12274
12393
  }));
12275
12394
  }
12276
- }, /*#__PURE__*/React__default.createElement(AiOutlinePlus, {
12277
- style: {
12278
- fontSize: 'inherit'
12279
- }
12280
- })))), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12281
- alig: "center",
12282
- className: "CartnoPaddingSm"
12395
+ }, /*#__PURE__*/React__default.createElement(AiOutlinePlus, null)))), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12396
+ className: "cell-subtotal"
12283
12397
  }, /*#__PURE__*/React__default.createElement("p", {
12284
12398
  className: "price"
12285
- }, "$", (_row$subtotal = row.subtotal) === null || _row$subtotal === void 0 ? void 0 : _row$subtotal.toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12286
- alig: "center"
12399
+ }, /*#__PURE__*/React__default.createElement("span", {
12400
+ className: "mobileLabel"
12401
+ }, "Subtotal "), "$", (Number(row === null || row === void 0 ? void 0 : row.subtotal) || 0).toFixed(2))), !hideDelete && /*#__PURE__*/React__default.createElement(CartTableCell$2, {
12402
+ className: "cell-delete"
12287
12403
  }, /*#__PURE__*/React__default.createElement(DeleteBtn$1, {
12404
+ type: "button",
12405
+ "aria-label": "Remove product",
12406
+ title: "Remove",
12288
12407
  onClick: function onClick(e) {
12289
12408
  e.stopPropagation();
12290
12409
  if (loading) return;
@@ -12297,13 +12416,13 @@ var CardRow$1 = function CardRow(_ref) {
12297
12416
  }))));
12298
12417
  };
12299
12418
 
12300
- var _templateObject$H, _templateObject2$v, _templateObject3$p, _templateObject4$k, _templateObject5$g, _templateObject6$e, _templateObject7$a, _templateObject8$8, _templateObject9$6;
12419
+ var _templateObject$H, _templateObject2$w, _templateObject3$q, _templateObject4$l, _templateObject5$h, _templateObject6$f, _templateObject7$b, _templateObject8$9, _templateObject9$6, _templateObject10$5;
12301
12420
  var CartPageSection$1 = styled.section(_templateObject$H || (_templateObject$H = _taggedTemplateLiteralLoose(["\n background: ", ";\n max-width: 100%;\n width: fit-content;\n background: ", ";\n overflow: hidden;\n border-radius: 28px;\n\n @media screen and (max-width: 1200px) {\n padding: 0 1em;\n }\n @media screen and (max-width: 600px) {\n padding: 0 1em;\n }\n"])), function (props) {
12302
12421
  return props.bg;
12303
12422
  }, function (props) {
12304
12423
  return props.bg || '#FAE8E5';
12305
12424
  });
12306
- var CartPageContainer$1 = styled.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n max-width: ", ";\n width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n border-radius: 28px 28px 28px 14px;\n padding: 2em 2.5em;\n padding-bottom: 3em;\n border-radius: 28px;\n opacity: ", ";\n .scrollDiv {\n width: 68%;\n max-height: 630px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n\n margin-right: 0.3em;\n &::-webkit-scrollbar {\n width: 10px;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: ", ";\n\n border-radius: 16px;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 16px;\n border: 2px solid;\n }\n /* box-shadow: 0px 20px 35px rgba(0, 0, 0, 0.05); */\n }\n table {\n border-collapse: separate;\n border-spacing: 0 4px;\n row-gap: 4px;\n }\n\n td {\n /* border: solid 1px #000; */\n border-style: none solid solid none;\n /* padding: 10px; */\n /* margin-bottom:5px; */\n }\n\n tr:first-child td:first-child {\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-top-right-radius: 10px;\n border-bottom-right-radius: 10px;\n }\n\n tr td:first-child {\n border-bottom-left-radius: 10px;\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-bottom-right-radius: 10px;\n }\n\n tr td {\n border-top-style: solid;\n }\n tr td:first-child {\n border-left-style: solid;\n }\n\n @media only screen and (max-width: 1200px) {\n flex-direction: column;\n align-items: center;\n padding: 0.5em;\n .scrollDiv {\n width: 100%;\n margin: 0;\n margin-bottom: 2em;\n padding: 0 0.4em;\n }\n }\n"])), function (props) {
12425
+ var CartPageContainer$1 = styled.div(_templateObject2$w || (_templateObject2$w = _taggedTemplateLiteralLoose(["\n max-width: ", ";\n width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n border-radius: 28px 28px 28px 14px;\n padding: 2em 2.5em;\n padding-bottom: 3em;\n border-radius: 28px;\n opacity: ", ";\n .scrollDiv {\n width: 68%;\n max-height: 630px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n\n margin-right: 0.3em;\n &::-webkit-scrollbar {\n width: 10px;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: ", ";\n\n border-radius: 16px;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 16px;\n border: 2px solid;\n }\n /* box-shadow: 0px 20px 35px rgba(0, 0, 0, 0.05); */\n }\n table {\n border-collapse: separate;\n border-spacing: 0 4px;\n row-gap: 4px;\n }\n\n td {\n /* border: solid 1px #000; */\n border-style: none solid solid none;\n /* padding: 10px; */\n /* margin-bottom:5px; */\n }\n\n tr:first-child td:first-child {\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-top-right-radius: 10px;\n border-bottom-right-radius: 10px;\n }\n\n tr td:first-child {\n border-bottom-left-radius: 10px;\n border-top-left-radius: 10px;\n }\n tr td:last-child {\n border-bottom-right-radius: 10px;\n }\n\n tr td {\n border-top-style: solid;\n }\n tr td:first-child {\n border-left-style: solid;\n }\n\n @media only screen and (max-width: 1200px) {\n flex-direction: column;\n align-items: center;\n padding: 0.5em;\n .scrollDiv {\n width: 100%;\n margin: 0;\n margin-bottom: 2em;\n padding: 0 0.4em;\n }\n }\n"])), function (props) {
12307
12426
  return props.maxWidth || '1600px';
12308
12427
  }, function (props) {
12309
12428
  return "min(" + (props.maxWidth || '1600px') + ",100%)";
@@ -12314,35 +12433,34 @@ var CartPageContainer$1 = styled.div(_templateObject2$v || (_templateObject2$v =
12314
12433
  }, function (props) {
12315
12434
  return props.color || '#BFC3CA';
12316
12435
  });
12317
- var CardsBox$1 = styled.div(_templateObject3$p || (_templateObject3$p = _taggedTemplateLiteralLoose(["\n width: 100%;\n /* min-height: 1000px; */\n position: relative;\n max-width: 860px;\n margin-right: auto;\n padding: 1em 2em;\n display: ", ";\n grid-template-columns: 1fr 1fr;\n flex-direction: column;\n align-items: flex-start;\n grid-gap: 1em;\n justify-content: flex-start;\n align-items: center;\n border-radius: 20px;\n @media only screen and (max-width: 900px) {\n display: flex;\n }\n @media only screen and (max-width: 600px) {\n padding: 1em 0.2em;\n }\n"])), function (props) {
12436
+ var CardsBox$1 = styled.div(_templateObject3$q || (_templateObject3$q = _taggedTemplateLiteralLoose(["\n width: 100%;\n /* min-height: 1000px; */\n position: relative;\n max-width: 860px;\n margin-right: auto;\n padding: 1em 2em;\n display: ", ";\n grid-template-columns: 1fr 1fr;\n flex-direction: column;\n align-items: flex-start;\n grid-gap: 1em;\n justify-content: flex-start;\n align-items: center;\n border-radius: 20px;\n @media only screen and (max-width: 900px) {\n display: flex;\n }\n @media only screen and (max-width: 600px) {\n padding: 1em 0.2em;\n }\n"])), function (props) {
12318
12437
  return props.retail ? 'grid' : 'flex';
12319
12438
  });
12320
- var CartHeading$1 = styled.div(_templateObject4$k || (_templateObject4$k = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n /* margin-bottom: 2em; */\n margin-left: 2.3em;\n margin-top: 2em;\n\n color: ", ";\n h1 {\n font-weight: 600;\n font-size: 2.0375em;\n text-transform: capitalize;\n color: ", ";\n /* margin-bottom: 1em; */\n }\n p {\n font-size: 0.875em;\n color: inherit;\n margin-top: 0.5em;\n }\n"])), function (props) {
12439
+ var CartHeading$1 = styled.div(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n /* margin-bottom: 2em; */\n margin-left: 2.3em;\n margin-top: 2em;\n\n color: ", ";\n h1 {\n font-weight: 600;\n font-size: 2.0375em;\n text-transform: capitalize;\n color: ", ";\n /* margin-bottom: 1em; */\n }\n p {\n font-size: 0.875em;\n color: inherit;\n margin-top: 0.5em;\n }\n"])), function (props) {
12321
12440
  return props.color || 'black';
12322
12441
  }, function (props) {
12323
12442
  return props.h1 || 'inherit';
12324
12443
  });
12325
- var Loader$2 = styled.div(_templateObject5$g || (_templateObject5$g = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 40%;\n left: 47%;\n display: grid;\n place-items: center;\n z-index: 3;\n"])));
12326
- var CartTableCell$3 = styled(TableCell)(_templateObject6$e || (_templateObject6$e = _taggedTemplateLiteralLoose(["\n && {\n padding-bottom: 1em !important;\n // border: none !important;\n /* font-size: 0.75em; */\n font-size: 1em;\n color: rgba(98, 95, 95, 1);\n // background: ", ";\n color: ", ";\n }\n &.bg-transparent {\n // background-color: transparent !important;\n text-transform: uppercase;\n span {\n font-size: 0.75em;\n font-weight: 600;\n }\n svg {\n color: ", ";\n }\n .MuiTableSortLabel-root {\n color: ", "!important;\n }\n }\n"])), function (props) {
12444
+ var Loader$2 = styled.div(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 40%;\n left: 47%;\n display: grid;\n place-items: center;\n z-index: 3;\n"])));
12445
+ var CartTableCell$3 = styled(TableCell)(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteralLoose(["\n && {\n padding-bottom: 1em !important;\n // border: none !important;\n /* font-size: 0.75em; */\n font-size: 1em;\n color: rgba(98, 95, 95, 1);\n // background: ", ";\n color: ", ";\n }\n &.bg-transparent {\n // background-color: transparent !important;\n text-transform: uppercase;\n letter-spacing: 0.4px;\n span {\n font-size: 0.75em;\n font-weight: 600;\n color: ", ";\n }\n .MuiTableSortLabel-root:hover,\n .MuiTableSortLabel-root:hover svg {\n color: ", " !important;\n }\n svg {\n color: ", ";\n }\n .MuiTableSortLabel-root {\n color: ", "!important;\n }\n }\n"])), function (props) {
12327
12446
  return "" + props.bg;
12328
12447
  }, function (props) {
12329
12448
  return "" + props.color || 'inherit';
12330
12449
  }, function (props) {
12450
+ return props.color || '#6b7280';
12451
+ }, getPrimary, function (props) {
12331
12452
  return "" + props.color || 'inherit';
12332
12453
  }, function (props) {
12333
12454
  return "" + props.color || 'inherit';
12334
12455
  });
12335
- var CartTableContainer$1 = styled(TableContainer$4)(_templateObject7$a || (_templateObject7$a = _taggedTemplateLiteralLoose(["\n max-height: 580px;\n padding-right: 1.5em;\n overflow: inherit !important;\n &::-webkit-scrollbar {\n width: 10px;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: ", ";\n border-radius: 16px;\n width: 100%;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n border-radius: 16px;\n margin: 5px 2px;\n background: ", ";\n }\n @media screen and (max-width: 768px) {\n padding: 0;\n }\n"])), function (props) {
12456
+ var CartTableContainer$1 = styled(TableContainer$4)(_templateObject7$b || (_templateObject7$b = _taggedTemplateLiteralLoose(["\n max-height: 580px;\n padding-right: 1.5em;\n overflow: inherit !important;\n &::-webkit-scrollbar {\n width: 10px;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n background: ", ";\n border-radius: 16px;\n width: 100%;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n border-radius: 16px;\n margin: 5px 2px;\n background: ", ";\n }\n @media screen and (max-width: 768px) {\n padding: 0;\n }\n"])), function (props) {
12336
12457
  return props.bg || '#fdccc480';
12337
12458
  }, function (props) {
12338
12459
  return props.color || 'red';
12339
12460
  });
12340
- var CartButtonsRow$1 = styled.div(_templateObject8$8 || (_templateObject8$8 = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding-right: 1.85em;\n button {\n display: flex;\n align-items: center;\n background: ", ";\n color: ", ";\n padding: 0.5em 1em;\n margin-left: 1em;\n font-size: 0.85em;\n text-transform: uppercase;\n border: none;\n cursor: pointer;\n transition: 0.4s;\n font-size: 1rem;\n font-weight: 600;\n svg {\n margin-right: 0.4rem;\n }\n &:hover {\n transform: scale(0.95);\n }\n }\n"])), function (props) {
12341
- return props.bg || 'rgba(107, 106, 106, 1)';
12342
- }, function (props) {
12343
- return props.color || 'white';
12344
- });
12345
- var CartPageBox$1 = styled.div(_templateObject9$6 || (_templateObject9$6 = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n @media only screen and (max-width: 768px) {\n margin-right: 0;\n .CartnoBelowSm {\n display: none;\n }\n }\n"])));
12461
+ var CartButtonsRow$1 = styled.div(_templateObject8$9 || (_templateObject8$9 = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n padding-right: 1.5em;\n button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n height: 42px;\n padding: 0 20px;\n border-radius: 8px;\n border: 1.5px solid ", ";\n font-size: 0.95rem;\n font-weight: 600;\n letter-spacing: 0.2px;\n white-space: nowrap;\n cursor: pointer;\n transition: background 0.2s, color 0.2s, box-shadow 0.2s, opacity 0.2s;\n svg {\n font-size: 1.1em;\n }\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 2px;\n }\n &:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n }\n }\n .outlined {\n position: relative;\n isolation: isolate;\n background: #fff;\n color: ", ";\n /* Hover tint: the primary color at low opacity, behind the label. */\n &::before {\n content: '';\n position: absolute;\n inset: 0;\n z-index: -1;\n border-radius: inherit;\n background: ", ";\n opacity: 0;\n transition: opacity 0.2s;\n }\n &:hover:not(:disabled)::before {\n opacity: 0.08;\n }\n }\n .filled {\n background: ", ";\n color: #fff;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);\n &:hover:not(:disabled) {\n box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);\n opacity: 0.92;\n }\n }\n @media only screen and (max-width: 768px) {\n padding-right: 0;\n }\n @media only screen and (max-width: 600px) {\n button {\n flex: 1;\n height: 44px;\n padding: 0 12px;\n font-size: 0.875rem;\n }\n }\n"])), getPrimary, getPrimary, getPrimary, getPrimary, getPrimary);
12462
+ var CartPageBox$1 = styled.div(_templateObject9$6 || (_templateObject9$6 = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n @media only screen and (max-width: 768px) {\n margin-right: 0;\n .CartnoBelowSm {\n display: none;\n }\n /* Rows become stacked cards (see CardRow), so the table/body are blocks. */\n table,\n tbody {\n display: block;\n width: 100%;\n }\n }\n"])));
12463
+ var MobileSelectBar = styled.div(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteralLoose(["\n display: none;\n @media only screen and (max-width: 768px) {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 0 2px 8px;\n font-size: 0.9em;\n color: #555;\n label {\n display: flex;\n align-items: center;\n cursor: pointer;\n font-weight: 500;\n }\n .count {\n font-size: 0.9em;\n color: #888;\n }\n }\n"])));
12346
12464
 
12347
12465
  var headCells$1 = [{
12348
12466
  id: 'image',
@@ -12363,6 +12481,13 @@ var headCells$1 = [{
12363
12481
  label: 'price',
12364
12482
  filter: true,
12365
12483
  noBelowSm: true
12484
+ }, {
12485
+ id: 'availableQuantity',
12486
+ numeric: true,
12487
+ disablePadding: false,
12488
+ label: 'stock',
12489
+ filter: true,
12490
+ noBelowSm: true
12366
12491
  }, {
12367
12492
  id: 'quantity',
12368
12493
  numeric: true,
@@ -12384,14 +12509,17 @@ var headCells$1 = [{
12384
12509
  noBelowSm: true
12385
12510
  }];
12386
12511
  function EnhancedTableHead$1(props) {
12387
- var _styles$cartSummary, _styles$cartSummary2;
12512
+ var _React$useContext, _styles$cartSummary, _styles$cartSummary2;
12388
12513
  var onSelectAllClick = props.onSelectAllClick,
12389
12514
  order = props.order,
12390
12515
  orderBy = props.orderBy,
12391
12516
  numSelected = props.numSelected,
12392
12517
  rowCount = props.rowCount,
12393
12518
  onRequestSort = props.onRequestSort,
12394
- styles = props.styles;
12519
+ styles = props.styles,
12520
+ hideDelete = props.hideDelete,
12521
+ hideStock = props.hideStock;
12522
+ var primaryColor = ((_React$useContext = useContext(ThemeContext)) === null || _React$useContext === void 0 ? void 0 : _React$useContext.primaryColor) || DEFAULT_PRIMARY;
12395
12523
  var createSortHandler = function createSortHandler(property) {
12396
12524
  return function (event) {
12397
12525
  onRequestSort(event, property);
@@ -12418,8 +12546,14 @@ function EnhancedTableHead$1(props) {
12418
12546
  svg: {
12419
12547
  color: styles === null || styles === void 0 ? void 0 : (_styles$cartSummary2 = styles.cartSummary) === null || _styles$cartSummary2 === void 0 ? void 0 : _styles$cartSummary2.color
12420
12548
  }
12549
+ }, {
12550
+ '&.Mui-checked, &.MuiCheckbox-indeterminate': {
12551
+ color: primaryColor
12552
+ }
12421
12553
  })
12422
- })), headCells$1.map(function (headCell) {
12554
+ })), headCells$1.filter(function (headCell) {
12555
+ return !(hideDelete && headCell.id === 'delete') && !(hideStock && headCell.id === 'availableQuantity');
12556
+ }).map(function (headCell) {
12423
12557
  var _styles$cartSummary3;
12424
12558
  return /*#__PURE__*/createElement(CartTableCell$3, {
12425
12559
  key: headCell.id,
@@ -12449,19 +12583,31 @@ EnhancedTableHead$1.propTypes = {
12449
12583
  rowCount: propTypes.number.isRequired
12450
12584
  };
12451
12585
  function ProductTable(_ref) {
12452
- var _styles$scroll, _styles$scroll2, _sortBy, _styles$Btn, _styles$Btn2;
12586
+ var _React$useContext2, _styles$scroll, _styles$scroll2, _sortBy;
12453
12587
  var cartData = _ref.cartData,
12454
12588
  loading = _ref.loading,
12455
12589
  imgnotfoundUrl = _ref.imgnotfoundUrl,
12456
12590
  handleIncrementDecrement = _ref.handleIncrementDecrement,
12457
12591
  handleRemoveProduct = _ref.handleRemoveProduct,
12458
12592
  handleRemoveAll = _ref.handleRemoveAll,
12459
- styles = _ref.styles;
12460
- var cartList = cartData === null || cartData === void 0 ? void 0 : cartData.map(function (li) {
12593
+ handleAddToCart = _ref.handleAddToCart,
12594
+ styles = _ref.styles,
12595
+ _ref$allowToProcessIn = _ref.allowToProcessInvoiceForOutOfStockProductsEcommerce,
12596
+ allowToProcessInvoiceForOutOfStockProductsEcommerce = _ref$allowToProcessIn === void 0 ? false : _ref$allowToProcessIn,
12597
+ selectedIds = _ref.selectedIds,
12598
+ onSelectedIdsChange = _ref.onSelectedIdsChange,
12599
+ _ref$hideActions = _ref.hideActions,
12600
+ hideActions = _ref$hideActions === void 0 ? false : _ref$hideActions,
12601
+ _ref$hideDelete = _ref.hideDelete,
12602
+ hideDelete = _ref$hideDelete === void 0 ? false : _ref$hideDelete,
12603
+ _ref$hideStock = _ref.hideStock,
12604
+ hideStock = _ref$hideStock === void 0 ? false : _ref$hideStock;
12605
+ var cartList = (Array.isArray(cartData) ? cartData : []).filter(Boolean).map(function (li) {
12461
12606
  return _extends({}, li, {
12462
- subtotal: li.standardPrice * li.quantity
12607
+ subtotal: (Number(li === null || li === void 0 ? void 0 : li.standardPrice) || 0) * (Number(li === null || li === void 0 ? void 0 : li.quantity) || 0)
12463
12608
  });
12464
12609
  });
12610
+ var primaryColor = ((_React$useContext2 = useContext(ThemeContext)) === null || _React$useContext2 === void 0 ? void 0 : _React$useContext2.primaryColor) || DEFAULT_PRIMARY;
12465
12611
  var _React$useState = useState('asc'),
12466
12612
  order = _React$useState[0],
12467
12613
  setOrder = _React$useState[1];
@@ -12469,8 +12615,14 @@ function ProductTable(_ref) {
12469
12615
  orderBy = _React$useState2[0],
12470
12616
  setOrderBy = _React$useState2[1];
12471
12617
  var _React$useState3 = useState([]),
12472
- selected = _React$useState3[0],
12473
- setSelected = _React$useState3[1];
12618
+ internalSelected = _React$useState3[0],
12619
+ setInternalSelected = _React$useState3[1];
12620
+ var selected = selectedIds != null ? selectedIds : internalSelected;
12621
+ var setSelected = function setSelected(updater) {
12622
+ var next = typeof updater === 'function' ? updater(selected) : updater;
12623
+ if (next === selected) return;
12624
+ if (onSelectedIdsChange) onSelectedIdsChange(next);else setInternalSelected(next);
12625
+ };
12474
12626
  var _React$useState4 = useState(cartList || []),
12475
12627
  cartArray = _React$useState4[0],
12476
12628
  setCartArray = _React$useState4[1];
@@ -12496,44 +12648,71 @@ function ProductTable(_ref) {
12496
12648
  setOrder(isAsc ? 'desc' : 'asc');
12497
12649
  setOrderBy(property);
12498
12650
  };
12499
- var handleSelectAllClick = function handleSelectAllClick(event) {
12500
- if ((selected === null || selected === void 0 ? void 0 : selected.length) < (cartArray === null || cartArray === void 0 ? void 0 : cartArray.length)) {
12501
- var newSelected = [];
12502
- cartArray === null || cartArray === void 0 ? void 0 : cartArray.map(function (n) {
12503
- return newSelected.push(n);
12504
- });
12505
- setSelected(newSelected);
12506
- return;
12507
- }
12508
- setSelected([]);
12651
+ var handleSelectAllClick = function handleSelectAllClick() {
12652
+ var allIds = cartList.map(function (p) {
12653
+ return p === null || p === void 0 ? void 0 : p.rowId;
12654
+ });
12655
+ setSelected(function (prev) {
12656
+ return prev.length < allIds.length ? allIds : [];
12657
+ });
12509
12658
  };
12510
12659
  var handleClick = function handleClick(event, product) {
12511
- var includes = selected.includes(product);
12512
- if (includes) {
12513
- var removedId = selected.filter(function (item, i) {
12514
- return item.index !== i;
12515
- });
12516
- setSelected(removedId);
12517
- } else {
12518
- setSelected([].concat(selected, [product]));
12519
- }
12660
+ var id = product === null || product === void 0 ? void 0 : product.rowId;
12661
+ setSelected(function (prev) {
12662
+ return prev.includes(id) ? prev.filter(function (x) {
12663
+ return x !== id;
12664
+ }) : [].concat(prev, [id]);
12665
+ });
12520
12666
  };
12521
- var isSelected = function isSelected(name) {
12522
- return selected.includes(name);
12667
+ var isSelected = function isSelected(product) {
12668
+ return selected.includes(product === null || product === void 0 ? void 0 : product.rowId);
12669
+ };
12670
+ var handleRemoveSelected = function handleRemoveSelected() {
12671
+ if (loading) return;
12672
+ if (!selected.length) {
12673
+ alert('Please select at least one product to remove.');
12674
+ return;
12675
+ }
12676
+ handleRemoveAll(selected);
12523
12677
  };
12524
12678
  useEffect(function () {
12525
12679
  setCartArray(cartList);
12680
+ var ids = new Set(cartList.map(function (p) {
12681
+ return p === null || p === void 0 ? void 0 : p.rowId;
12682
+ }));
12683
+ setSelected(function (prev) {
12684
+ var next = prev.filter(function (id) {
12685
+ return ids.has(id);
12686
+ });
12687
+ return next.length === prev.length ? prev : next;
12688
+ });
12526
12689
  }, [cartData]);
12527
12690
  return /*#__PURE__*/createElement(CartPageBox$1, null, loading && /*#__PURE__*/createElement(Loader$2, null, /*#__PURE__*/createElement(BounceLoader, {
12528
12691
  size: 40,
12529
- color: styles.Btn.background,
12692
+ color: primaryColor,
12530
12693
  loading: true
12531
12694
  })), /*#__PURE__*/createElement(Box$1, {
12532
12695
  sx: {
12533
12696
  width: '100%'
12534
12697
  },
12535
12698
  paddingBottom: "2em"
12536
- }, /*#__PURE__*/createElement(CartTableContainer$1, {
12699
+ }, /*#__PURE__*/createElement(MobileSelectBar, null, /*#__PURE__*/createElement("label", null, /*#__PURE__*/createElement(Checkbox, {
12700
+ size: "small",
12701
+ indeterminate: (selected === null || selected === void 0 ? void 0 : selected.length) > 0 && (selected === null || selected === void 0 ? void 0 : selected.length) < (cartArray === null || cartArray === void 0 ? void 0 : cartArray.length),
12702
+ checked: (cartArray === null || cartArray === void 0 ? void 0 : cartArray.length) > 0 && (selected === null || selected === void 0 ? void 0 : selected.length) === (cartArray === null || cartArray === void 0 ? void 0 : cartArray.length),
12703
+ onChange: handleSelectAllClick,
12704
+ inputProps: {
12705
+ 'aria-label': 'select all products'
12706
+ },
12707
+ sx: {
12708
+ pl: 0,
12709
+ '&.Mui-checked, &.MuiCheckbox-indeterminate': {
12710
+ color: primaryColor
12711
+ }
12712
+ }
12713
+ }), "Select all"), (selected === null || selected === void 0 ? void 0 : selected.length) > 0 && /*#__PURE__*/createElement("span", {
12714
+ className: "count"
12715
+ }, selected.length, " selected")), /*#__PURE__*/createElement(CartTableContainer$1, {
12537
12716
  bg: styles === null || styles === void 0 ? void 0 : (_styles$scroll = styles.scroll) === null || _styles$scroll === void 0 ? void 0 : _styles$scroll.bg,
12538
12717
  color: styles === null || styles === void 0 ? void 0 : (_styles$scroll2 = styles.scroll) === null || _styles$scroll2 === void 0 ? void 0 : _styles$scroll2.color
12539
12718
  }, /*#__PURE__*/createElement(Table$1, {
@@ -12547,12 +12726,15 @@ function ProductTable(_ref) {
12547
12726
  onSelectAllClick: handleSelectAllClick,
12548
12727
  onRequestSort: handleRequestSort,
12549
12728
  rowCount: cartArray === null || cartArray === void 0 ? void 0 : cartArray.length,
12550
- styles: styles
12729
+ styles: styles,
12730
+ hideDelete: hideDelete,
12731
+ hideStock: hideStock
12551
12732
  }), /*#__PURE__*/createElement(TableBody$1, null, (_sortBy = sortBy(cartArray, function (o) {
12552
12733
  return !((o === null || o === void 0 ? void 0 : o.quantity) > (o === null || o === void 0 ? void 0 : o.availableQuantity));
12553
12734
  })) === null || _sortBy === void 0 ? void 0 : _sortBy.map(function (row, index) {
12554
12735
  var isItemSelected = isSelected(row);
12555
12736
  return /*#__PURE__*/createElement(CardRow$1, {
12737
+ key: (row === null || row === void 0 ? void 0 : row.rowId) || index,
12556
12738
  row: row,
12557
12739
  index: index,
12558
12740
  isItemSelected: isItemSelected,
@@ -12561,66 +12743,365 @@ function ProductTable(_ref) {
12561
12743
  cartData: cartData,
12562
12744
  loading: loading,
12563
12745
  styles: styles,
12746
+ hideDelete: hideDelete,
12747
+ hideStock: hideStock,
12564
12748
  handleIncrementDecrement: handleIncrementDecrement,
12565
- handleRemoveProduct: handleRemoveProduct
12749
+ handleRemoveProduct: handleRemoveProduct,
12750
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce
12566
12751
  });
12567
- }))))), /*#__PURE__*/createElement(CartButtonsRow$1, {
12568
- bg: styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background,
12569
- color: styles === null || styles === void 0 ? void 0 : (_styles$Btn2 = styles.Btn) === null || _styles$Btn2 === void 0 ? void 0 : _styles$Btn2.color
12570
- }, /*#__PURE__*/createElement("button", {
12752
+ }))))), !hideActions && /*#__PURE__*/createElement(CartButtonsRow$1, null, /*#__PURE__*/createElement("button", {
12753
+ type: "button",
12754
+ className: "outlined",
12755
+ onClick: handleRemoveSelected,
12756
+ disabled: loading || !(selected !== null && selected !== void 0 && selected.length)
12757
+ }, /*#__PURE__*/createElement(AiOutlineDelete, null), "Remove selected", selected !== null && selected !== void 0 && selected.length ? " (" + selected.length + ")" : ''), /*#__PURE__*/createElement("button", {
12758
+ type: "button",
12759
+ className: "filled",
12760
+ disabled: loading || !(cartArray !== null && cartArray !== void 0 && cartArray.length),
12571
12761
  onClick: function onClick() {
12572
- new Promise(function (resolve, reject) {
12573
- if (loading) return;
12574
- handleRemoveAll(selected);
12575
- resolve();
12576
- });
12577
- setSelected([]);
12762
+ if (loading) return;
12763
+ handleAddToCart && handleAddToCart(selected);
12578
12764
  }
12579
- }, /*#__PURE__*/createElement(AiOutlineDelete, null), " remove selected"), /*#__PURE__*/createElement("button", null, /*#__PURE__*/createElement(AiOutlinePlus, null), "Add to cart")));
12765
+ }, /*#__PURE__*/createElement(AiOutlinePlus, null), loading ? 'Adding...' : selected !== null && selected !== void 0 && selected.length ? "Add selected to cart (" + selected.length + ")" : 'Add all to cart')));
12580
12766
  }
12581
12767
 
12582
- var QuickOrder = function QuickOrder(_ref) {
12583
- var _ref$colors = _ref.colors,
12584
- colors = _ref$colors === void 0 ? {
12585
- primaryColor: '#424242'
12586
- } : _ref$colors,
12768
+ var PAGE_SIZE = 20;
12769
+ var getInitialQuantity = function getInitialQuantity(product) {
12770
+ return (product === null || product === void 0 ? void 0 : product.minQuantityToSale) > 1 ? product.minQuantityToSale : 1;
12771
+ };
12772
+ var getRowId = function getRowId(product) {
12773
+ return "recent-" + (product === null || product === void 0 ? void 0 : product.productId);
12774
+ };
12775
+ var LastOrderedProductsDialog = function LastOrderedProductsDialog(_ref) {
12776
+ var open = _ref.open,
12777
+ onClose = _ref.onClose,
12778
+ onAdd = _ref.onAdd,
12587
12779
  apiEndPoint = _ref.apiEndPoint,
12588
12780
  token = _ref.token,
12589
12781
  imgnotfoundUrl = _ref.imgnotfoundUrl,
12590
- styles = _ref.styles;
12591
- var _useState = useState([]),
12592
- storeData = _useState[0],
12593
- setStoreData = _useState[1];
12594
- var storeIdList = Array.isArray(storeData) && (storeData === null || storeData === void 0 ? void 0 : storeData.length) > 0 ? storeData === null || storeData === void 0 ? void 0 : storeData.join(',') : '1';
12782
+ styles = _ref.styles,
12783
+ allowToProcessInvoiceForOutOfStockProductsEcommerce = _ref.allowToProcessInvoiceForOutOfStockProductsEcommerce,
12784
+ _ref$hideStock = _ref.hideStock,
12785
+ hideStock = _ref$hideStock === void 0 ? false : _ref$hideStock;
12786
+ var theme = useContext(ThemeContext);
12787
+ var primaryColor = (theme === null || theme === void 0 ? void 0 : theme.primaryColor) || '#424242';
12788
+ var isSmallScreen = useMediaQuery$1('(max-width:600px)');
12789
+ var _useState = useState({}),
12790
+ rowsById = _useState[0],
12791
+ setRowsById = _useState[1];
12595
12792
  var _useState2 = useState([]),
12596
- products = _useState2[0],
12597
- setProducts = _useState2[1];
12598
- useEffect(function () {
12599
- (function () {
12600
- try {
12601
- var _temp = _catch(function () {
12793
+ pageRowIds = _useState2[0],
12794
+ setPageRowIds = _useState2[1];
12795
+ var _useState3 = useState([]),
12796
+ selectedIds = _useState3[0],
12797
+ setSelectedIds = _useState3[1];
12798
+ var _useState4 = useState(false),
12799
+ loading = _useState4[0],
12800
+ setLoading = _useState4[1];
12801
+ var _useState5 = useState(0),
12802
+ page = _useState5[0],
12803
+ setPage = _useState5[1];
12804
+ var _useState6 = useState(0),
12805
+ totalPages = _useState6[0],
12806
+ setTotalPages = _useState6[1];
12807
+ var _useState7 = useState(0),
12808
+ totalElements = _useState7[0],
12809
+ setTotalElements = _useState7[1];
12810
+ var requestId = useRef(0);
12811
+ var contentRef = useRef();
12812
+ var loadPage = function loadPage(pageToLoad) {
12813
+ try {
12814
+ var currentRequest = ++requestId.current;
12815
+ setLoading(true);
12816
+ return Promise.resolve(_finallyRethrows(function () {
12817
+ return _catch(function () {
12602
12818
  return Promise.resolve(API({
12603
12819
  apiEndPoint: apiEndPoint,
12604
12820
  token: token,
12605
- url: "store/store-ids"
12606
- })).then(function (data) {
12607
- setStoreData(data);
12821
+ url: '/ecommerce/product/recently-ordered',
12822
+ queryParams: {
12823
+ page: pageToLoad,
12824
+ size: PAGE_SIZE
12825
+ }
12826
+ })).then(function (result) {
12827
+ if (currentRequest !== requestId.current) return;
12828
+ var content = (Array.isArray(result === null || result === void 0 ? void 0 : result.content) ? result.content : []).filter(function (p) {
12829
+ return p && (p === null || p === void 0 ? void 0 : p.productId) != null;
12830
+ });
12831
+ setRowsById(function (prev) {
12832
+ var next = _extends({}, prev);
12833
+ content.forEach(function (p) {
12834
+ var rowId = getRowId(p);
12835
+ next[rowId] = prev[rowId] ? _extends({}, p, {
12836
+ quantity: prev[rowId].quantity,
12837
+ rowId: rowId
12838
+ }) : _extends({}, p, {
12839
+ quantity: getInitialQuantity(p),
12840
+ rowId: rowId
12841
+ });
12842
+ });
12843
+ return next;
12844
+ });
12845
+ setPageRowIds(content.map(getRowId));
12846
+ setPage(pageToLoad);
12847
+ setTotalPages((result === null || result === void 0 ? void 0 : result.totalPages) || 0);
12848
+ setTotalElements((result === null || result === void 0 ? void 0 : result.totalElements) || 0);
12849
+ if (contentRef.current) contentRef.current.scrollTop = 0;
12608
12850
  });
12609
12851
  }, function () {});
12610
- return _temp && _temp.then ? _temp.then(function () {}) : void 0;
12611
- } catch (e) {
12612
- Promise.reject(e);
12852
+ }, function (_wasThrown, _result) {
12853
+ if (currentRequest === requestId.current) setLoading(false);
12854
+ if (_wasThrown) throw _result;
12855
+ return _result;
12856
+ }));
12857
+ } catch (e) {
12858
+ return Promise.reject(e);
12859
+ }
12860
+ };
12861
+ useEffect(function () {
12862
+ if (!open) return;
12863
+ setRowsById({});
12864
+ setPageRowIds([]);
12865
+ setSelectedIds([]);
12866
+ setPage(0);
12867
+ setTotalPages(0);
12868
+ setTotalElements(0);
12869
+ loadPage(0);
12870
+ }, [open]);
12871
+ var pageRows = pageRowIds.map(function (id) {
12872
+ return rowsById[id];
12873
+ }).filter(Boolean);
12874
+ var pageIdSet = new Set(pageRows.map(function (p) {
12875
+ return p.rowId;
12876
+ }));
12877
+ var pageSelectedIds = selectedIds.filter(function (id) {
12878
+ return pageIdSet.has(id);
12879
+ });
12880
+ var handlePageSelectionChange = function handlePageSelectionChange(nextPageSelected) {
12881
+ setSelectedIds(function (prev) {
12882
+ return [].concat(prev.filter(function (id) {
12883
+ return !pageIdSet.has(id);
12884
+ }), nextPageSelected);
12885
+ });
12886
+ };
12887
+ var handleIncrementDecrement = function handleIncrementDecrement(data) {
12888
+ if (!(data !== null && data !== void 0 && data.rowId)) return;
12889
+ setRowsById(function (prev) {
12890
+ var _extends2;
12891
+ return prev[data.rowId] ? _extends({}, prev, (_extends2 = {}, _extends2[data.rowId] = _extends({}, prev[data.rowId], {
12892
+ quantity: data.quantity
12893
+ }), _extends2)) : prev;
12894
+ });
12895
+ setSelectedIds(function (prev) {
12896
+ return prev.includes(data.rowId) ? prev : [].concat(prev, [data.rowId]);
12897
+ });
12898
+ };
12899
+ var handleRemoveProduct = function handleRemoveProduct() {};
12900
+ var handlePageChange = function handlePageChange(event, value) {
12901
+ var nextPage = value - 1;
12902
+ if (nextPage === page || loading) return;
12903
+ loadPage(nextPage);
12904
+ };
12905
+ var handleAdd = function handleAdd() {
12906
+ if (!selectedIds.length) {
12907
+ alert('Please select at least one product to add.');
12908
+ return;
12909
+ }
12910
+ onAdd(selectedIds.map(function (id) {
12911
+ return rowsById[id];
12912
+ }).filter(Boolean));
12913
+ onClose();
12914
+ };
12915
+ return /*#__PURE__*/React__default.createElement(Dialog, {
12916
+ open: open,
12917
+ onClose: onClose,
12918
+ fullWidth: true,
12919
+ fullScreen: isSmallScreen,
12920
+ maxWidth: "lg",
12921
+ scroll: "paper"
12922
+ }, /*#__PURE__*/React__default.createElement(DialogTitle$1, {
12923
+ sx: {
12924
+ m: 0,
12925
+ p: 2,
12926
+ pr: 6
12927
+ }
12928
+ }, "Last Ordered Products", /*#__PURE__*/React__default.createElement(IconButton, {
12929
+ "aria-label": "close",
12930
+ onClick: onClose,
12931
+ sx: {
12932
+ position: 'absolute',
12933
+ right: 8,
12934
+ top: 8,
12935
+ '& svg': {
12936
+ fontSize: 20
12613
12937
  }
12614
- })();
12615
- }, []);
12938
+ }
12939
+ }, /*#__PURE__*/React__default.createElement(MdClose, null))), /*#__PURE__*/React__default.createElement(DialogContent, {
12940
+ dividers: true,
12941
+ ref: contentRef,
12942
+ sx: {
12943
+ px: {
12944
+ xs: 1.5,
12945
+ sm: 3
12946
+ }
12947
+ }
12948
+ }, pageRows.length > 0 ? /*#__PURE__*/React__default.createElement(ProductTable, {
12949
+ cartData: pageRows,
12950
+ loading: loading,
12951
+ imgnotfoundUrl: imgnotfoundUrl,
12952
+ styles: styles,
12953
+ handleRemoveProduct: handleRemoveProduct,
12954
+ handleIncrementDecrement: handleIncrementDecrement,
12955
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce,
12956
+ hideStock: hideStock,
12957
+ selectedIds: pageSelectedIds,
12958
+ onSelectedIdsChange: handlePageSelectionChange,
12959
+ hideActions: true,
12960
+ hideDelete: true
12961
+ }) : loading ? /*#__PURE__*/React__default.createElement(DialogLoadMore, null, "Loading products...") : /*#__PURE__*/React__default.createElement(NoData, null)), /*#__PURE__*/React__default.createElement(DialogActions, {
12962
+ sx: {
12963
+ p: 2
12964
+ }
12965
+ }, /*#__PURE__*/React__default.createElement(DialogFooter, null, /*#__PURE__*/React__default.createElement("div", {
12966
+ className: "pagination"
12967
+ }, totalPages > 1 && /*#__PURE__*/React__default.createElement(Pagination, {
12968
+ count: totalPages,
12969
+ page: page + 1,
12970
+ onChange: handlePageChange,
12971
+ disabled: loading,
12972
+ shape: "rounded",
12973
+ size: "small",
12974
+ sx: {
12975
+ '& .MuiPaginationItem-root.Mui-selected': {
12976
+ backgroundColor: primaryColor,
12977
+ color: '#fff'
12978
+ },
12979
+ '& .MuiPaginationItem-root.Mui-selected:hover': {
12980
+ backgroundColor: primaryColor,
12981
+ opacity: 0.9
12982
+ }
12983
+ }
12984
+ }), totalElements > 0 && /*#__PURE__*/React__default.createElement("span", {
12985
+ className: "count"
12986
+ }, page * PAGE_SIZE + 1, "\u2013", Math.min((page + 1) * PAGE_SIZE, totalElements), " of", ' ', totalElements)), /*#__PURE__*/React__default.createElement("div", {
12987
+ className: "buttons"
12988
+ }, /*#__PURE__*/React__default.createElement(DialogFooterButton, {
12989
+ type: "button",
12990
+ variant: "outlined",
12991
+ onClick: onClose
12992
+ }, "Cancel"), /*#__PURE__*/React__default.createElement(DialogFooterButton, {
12993
+ type: "button",
12994
+ onClick: handleAdd,
12995
+ disabled: !selectedIds.length
12996
+ }, "Add", selectedIds.length ? " (" + selectedIds.length + ")" : '')))));
12997
+ };
12998
+
12999
+ var _excluded$7 = ["rowId"];
13000
+ var QuickOrder = function QuickOrder(_ref) {
13001
+ var _erCookieStorage$getI;
13002
+ var _ref$colors = _ref.colors,
13003
+ colors = _ref$colors === void 0 ? {
13004
+ primaryColor: '#424242'
13005
+ } : _ref$colors,
13006
+ apiEndPoint = _ref.apiEndPoint,
13007
+ token = _ref.token,
13008
+ imgnotfoundUrl = _ref.imgnotfoundUrl,
13009
+ styles = _ref.styles,
13010
+ onAddToCart = _ref.onAddToCart,
13011
+ _ref$doNotShowStock = _ref.doNotShowStock,
13012
+ doNotShowStock = _ref$doNotShowStock === void 0 ? false : _ref$doNotShowStock;
13013
+ var _useAllSystemFeatureV = useAllSystemFeatureValues({
13014
+ apiEndPoint: apiEndPoint,
13015
+ token: token
13016
+ }),
13017
+ _useAllSystemFeatureV2 = _useAllSystemFeatureV.allowToProcessInvoiceForOutOfStockProductsEcommerce,
13018
+ allowToProcessInvoiceForOutOfStockProductsEcommerce = _useAllSystemFeatureV2 === void 0 ? false : _useAllSystemFeatureV2;
13019
+ var hideStock = !!allowToProcessInvoiceForOutOfStockProductsEcommerce || !!doNotShowStock;
13020
+ var storeId = (erCookieStorage === null || erCookieStorage === void 0 ? void 0 : (_erCookieStorage$getI = erCookieStorage.getItem) === null || _erCookieStorage$getI === void 0 ? void 0 : _erCookieStorage$getI.call(erCookieStorage, 'storeId')) || 2;
13021
+ var _useState = useState([]),
13022
+ products = _useState[0],
13023
+ setProducts = _useState[1];
13024
+ var _useState2 = useState(false),
13025
+ infoOpen = _useState2[0],
13026
+ setInfoOpen = _useState2[1];
13027
+ var _useState3 = useState(false),
13028
+ lastOrderedOpen = _useState3[0],
13029
+ setLastOrderedOpen = _useState3[1];
13030
+ var _useState4 = useState(false),
13031
+ addingToCart = _useState4[0],
13032
+ setAddingToCart = _useState4[1];
13033
+ var handleLastOrderedProducts = function handleLastOrderedProducts() {
13034
+ setLastOrderedOpen(true);
13035
+ };
13036
+ var isOutOfStock = function isOutOfStock(product) {
13037
+ var availableQuantity = product === null || product === void 0 ? void 0 : product.availableQuantity;
13038
+ return !allowToProcessInvoiceForOutOfStockProductsEcommerce && (1 > availableQuantity || availableQuantity <= 0);
13039
+ };
13040
+ var getProductKey = function getProductKey(product) {
13041
+ var _product$productId;
13042
+ return (_product$productId = product === null || product === void 0 ? void 0 : product.productId) != null ? _product$productId : product === null || product === void 0 ? void 0 : product.id;
13043
+ };
13044
+ var makeRowId = function makeRowId(product) {
13045
+ var _getProductKey;
13046
+ return ((_getProductKey = getProductKey(product)) != null ? _getProductKey : 'p') + "-" + Date.now() + "-" + Math.random();
13047
+ };
13048
+ var addProductsToList = function addProductsToList(newProducts) {
13049
+ if (newProducts === void 0) {
13050
+ newProducts = [];
13051
+ }
13052
+ if (!Array.isArray(newProducts)) return;
13053
+ var outOfStockNames = [];
13054
+ var next = [].concat(products || []);
13055
+ var added = [];
13056
+ newProducts.forEach(function (product) {
13057
+ if (!product) return;
13058
+ if (isOutOfStock(product)) {
13059
+ outOfStockNames.push((product === null || product === void 0 ? void 0 : product.productName) || '');
13060
+ return;
13061
+ }
13062
+ var key = getProductKey(product);
13063
+ var addQty = (product === null || product === void 0 ? void 0 : product.quantity) > 0 ? product.quantity : 1;
13064
+ var existing = key !== undefined && key !== null ? next.find(function (p) {
13065
+ return getProductKey(p) === key;
13066
+ }) : undefined;
13067
+ if (existing) {
13068
+ var quantity = checkMinMaxQty({
13069
+ quantity: (Number(existing === null || existing === void 0 ? void 0 : existing.quantity) || 0) + addQty,
13070
+ product: existing,
13071
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce
13072
+ });
13073
+ next = next.map(function (p) {
13074
+ return (p === null || p === void 0 ? void 0 : p.rowId) === (existing === null || existing === void 0 ? void 0 : existing.rowId) ? _extends({}, p, {
13075
+ quantity: quantity
13076
+ }) : p;
13077
+ });
13078
+ } else {
13079
+ var row = _extends({}, product, {
13080
+ quantity: addQty,
13081
+ rowId: makeRowId(product)
13082
+ });
13083
+ added.push(row);
13084
+ next.push(row);
13085
+ }
13086
+ });
13087
+ if (outOfStockNames.length) {
13088
+ alert(outOfStockNames.length === 1 ? "This product is out of stock: " + outOfStockNames[0] : "These products are out of stock:\n" + outOfStockNames.join('\n'));
13089
+ }
13090
+ var addedIds = new Set(added.map(function (p) {
13091
+ return p === null || p === void 0 ? void 0 : p.rowId;
13092
+ }));
13093
+ setProducts([].concat(added.slice().reverse(), next.filter(function (p) {
13094
+ return p && !addedIds.has(p === null || p === void 0 ? void 0 : p.rowId);
13095
+ })));
13096
+ };
12616
13097
  var searchProductAPIData = function searchProductAPIData() {
12617
13098
  return Object.freeze({
12618
13099
  apiEndPoint: apiEndPoint,
12619
13100
  token: token,
12620
- url: "/ecommerce/product/searchByProductOrCategory",
12621
- scanUrl: "/product/scan?storeIds=" + storeIdList,
13101
+ url: "/ecommerce/product/searchByProductOrCategory?storeIds=" + storeId,
13102
+ scanUrl: "/product/scan?storeIds=" + storeId,
12622
13103
  labelKey: function labelKey(option) {
12623
- return option.productName + " " + (option.upc ? "(" + option.upc + ")" : '');
13104
+ return ((option === null || option === void 0 ? void 0 : option.productName) || '') + " " + (option !== null && option !== void 0 && option.upc ? "(" + (option === null || option === void 0 ? void 0 : option.upc) + ")" : '');
12624
13105
  },
12625
13106
  getQueryParams: function getQueryParams(value) {
12626
13107
  var queryParams = {
@@ -12643,46 +13124,157 @@ var QuickOrder = function QuickOrder(_ref) {
12643
13124
  };
12644
13125
  var onUpdate = function onUpdate(searchedProduct, clearInput) {
12645
13126
  try {
12646
- clearInput();
12647
- setProducts([_extends({}, searchedProduct, {
13127
+ clearInput === null || clearInput === void 0 ? void 0 : clearInput();
13128
+ if (!searchedProduct) return Promise.resolve();
13129
+ addProductsToList([_extends({}, searchedProduct, {
12648
13130
  quantity: 1
12649
- })].concat(products));
13131
+ })]);
12650
13132
  return Promise.resolve();
12651
13133
  } catch (e) {
12652
13134
  return Promise.reject(e);
12653
13135
  }
12654
13136
  };
12655
- var handleRemoveProduct = function handleRemoveProduct(data, index) {
12656
- var response = confirm('Are you sure, do you want to delete this items?');
12657
- if (response) {
12658
- var filterProduct = products === null || products === void 0 ? void 0 : products.filter(function (_, i) {
12659
- return i !== index;
13137
+ var handleRemoveProduct = function handleRemoveProduct(data) {
13138
+ var response = confirm('Are you sure, do you want to delete this items?');
13139
+ if (response) {
13140
+ setProducts(function (prev) {
13141
+ return (prev || []).filter(function (p) {
13142
+ return (p === null || p === void 0 ? void 0 : p.rowId) !== (data === null || data === void 0 ? void 0 : data.rowId);
13143
+ });
13144
+ });
13145
+ }
13146
+ };
13147
+ var handleIncrementDecrement = function handleIncrementDecrement(data) {
13148
+ if (!(data !== null && data !== void 0 && data.rowId)) return;
13149
+ setProducts(function (prev) {
13150
+ return (prev || []).map(function (p) {
13151
+ return (p === null || p === void 0 ? void 0 : p.rowId) === (data === null || data === void 0 ? void 0 : data.rowId) ? _extends({}, p, {
13152
+ quantity: data === null || data === void 0 ? void 0 : data.quantity
13153
+ }) : p;
13154
+ });
13155
+ });
13156
+ };
13157
+ var handleAddToCart = function handleAddToCart(selectedIds) {
13158
+ if (selectedIds === void 0) {
13159
+ selectedIds = [];
13160
+ }
13161
+ try {
13162
+ if (typeof onAddToCart !== 'function' || addingToCart) return Promise.resolve();
13163
+ var safeSelectedIds = Array.isArray(selectedIds) ? selectedIds : [];
13164
+ var ids = new Set(safeSelectedIds);
13165
+ var allRows = (products || []).filter(Boolean);
13166
+ var rowsToAdd = safeSelectedIds.length ? allRows.filter(function (p) {
13167
+ return ids.has(p === null || p === void 0 ? void 0 : p.rowId);
13168
+ }) : allRows;
13169
+ var items = rowsToAdd.map(function (_ref2) {
13170
+ var rowId = _ref2.rowId,
13171
+ product = _objectWithoutPropertiesLoose(_ref2, _excluded$7);
13172
+ return product;
13173
+ });
13174
+ if (!items.length) return Promise.resolve();
13175
+ setAddingToCart(true);
13176
+ var _temp = _finallyRethrows(function () {
13177
+ return _catch(function () {
13178
+ return Promise.resolve(onAddToCart(items)).then(function (isAdded) {
13179
+ if (isAdded) {
13180
+ var addedIds = new Set(rowsToAdd.map(function (p) {
13181
+ return p === null || p === void 0 ? void 0 : p.rowId;
13182
+ }));
13183
+ setProducts(function (prev) {
13184
+ return (prev || []).filter(function (p) {
13185
+ return !addedIds.has(p === null || p === void 0 ? void 0 : p.rowId);
13186
+ });
13187
+ });
13188
+ }
13189
+ });
13190
+ }, function () {});
13191
+ }, function (_wasThrown, _result) {
13192
+ setAddingToCart(false);
13193
+ if (_wasThrown) throw _result;
13194
+ return _result;
13195
+ });
13196
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
13197
+ } catch (e) {
13198
+ return Promise.reject(e);
13199
+ }
13200
+ };
13201
+ var handleRemoveAll = function handleRemoveAll(selectedIds) {
13202
+ if (selectedIds === void 0) {
13203
+ selectedIds = [];
13204
+ }
13205
+ if (!Array.isArray(selectedIds) || !selectedIds.length) return;
13206
+ if (confirm("Are you sure you want to remove " + selectedIds.length + " selected item(s)?")) {
13207
+ var ids = new Set(selectedIds);
13208
+ setProducts(function (prev) {
13209
+ return (prev || []).filter(function (p) {
13210
+ return !ids.has(p === null || p === void 0 ? void 0 : p.rowId);
13211
+ });
12660
13212
  });
12661
- setProducts([].concat(filterProduct));
12662
- }
12663
- };
12664
- var handleIncrementDecrement = function handleIncrementDecrement(data) {};
12665
- var handleRemoveAll = function handleRemoveAll(data) {
12666
- if (confirm('Are you sure, do you wan to delete items?')) {
12667
- var _data = remove(products, function (n) {});
12668
13213
  }
12669
13214
  };
12670
13215
  return /*#__PURE__*/React__default.createElement(ThemeProvider, {
12671
- theme: colors
12672
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(CssBaseline, null), /*#__PURE__*/React__default.createElement(Container$2, null, /*#__PURE__*/React__default.createElement(AsyncSelect, {
13216
+ theme: colors || {
13217
+ primaryColor: '#424242'
13218
+ }
13219
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(CssBaseline, null), /*#__PURE__*/React__default.createElement(Container$2, null, /*#__PURE__*/React__default.createElement(TopBar, null, /*#__PURE__*/React__default.createElement("div", {
13220
+ className: "search"
13221
+ }, /*#__PURE__*/React__default.createElement(AsyncSelect, {
12673
13222
  placeholder: 'Search Product',
12674
13223
  minSearchChar: 3,
12675
13224
  apiData: searchProductAPIData(),
12676
13225
  onUpdate: onUpdate,
12677
13226
  autoFocus: true
12678
- }), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ProductTable, {
13227
+ })), /*#__PURE__*/React__default.createElement(LastOrderedWrapper, null, /*#__PURE__*/React__default.createElement(LastOrderedButton, {
13228
+ type: "button",
13229
+ onClick: handleLastOrderedProducts
13230
+ }, "Last Ordered Products"), /*#__PURE__*/React__default.createElement(ClickAwayListener, {
13231
+ onClickAway: function onClickAway() {
13232
+ return setInfoOpen(false);
13233
+ }
13234
+ }, /*#__PURE__*/React__default.createElement(Tooltip, {
13235
+ title: "It will show the products from invoices from the last three months.",
13236
+ placement: "top",
13237
+ arrow: true,
13238
+ open: infoOpen,
13239
+ onOpen: function onOpen() {
13240
+ return setInfoOpen(true);
13241
+ },
13242
+ onClose: function onClose() {
13243
+ return setInfoOpen(false);
13244
+ }
13245
+ }, /*#__PURE__*/React__default.createElement(InfoIcon, {
13246
+ role: "button",
13247
+ tabIndex: 0,
13248
+ "aria-label": "Last ordered products info",
13249
+ onClick: function onClick() {
13250
+ return setInfoOpen(function (prev) {
13251
+ return !prev;
13252
+ });
13253
+ }
13254
+ }, /*#__PURE__*/React__default.createElement(AiOutlineInfoCircle, null)))))), (products === null || products === void 0 ? void 0 : products.length) > 0 ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(ProductTable, {
13255
+ handleAddToCart: handleAddToCart,
13256
+ loading: addingToCart,
12679
13257
  cartData: products,
12680
13258
  imgnotfoundUrl: imgnotfoundUrl,
12681
13259
  styles: styles,
12682
13260
  handleRemoveProduct: handleRemoveProduct,
12683
13261
  handleIncrementDecrement: handleIncrementDecrement,
12684
- handleRemoveAll: handleRemoveAll
12685
- })) : /*#__PURE__*/React__default.createElement(NoData, null))));
13262
+ handleRemoveAll: handleRemoveAll,
13263
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce,
13264
+ hideStock: hideStock
13265
+ })) : /*#__PURE__*/React__default.createElement(NoData, null), /*#__PURE__*/React__default.createElement(LastOrderedProductsDialog, {
13266
+ open: lastOrderedOpen,
13267
+ onClose: function onClose() {
13268
+ return setLastOrderedOpen(false);
13269
+ },
13270
+ onAdd: addProductsToList,
13271
+ apiEndPoint: apiEndPoint,
13272
+ token: token,
13273
+ imgnotfoundUrl: imgnotfoundUrl,
13274
+ styles: styles,
13275
+ allowToProcessInvoiceForOutOfStockProductsEcommerce: allowToProcessInvoiceForOutOfStockProductsEcommerce,
13276
+ hideStock: hideStock
13277
+ }))));
12686
13278
  };
12687
13279
 
12688
13280
  var RenderTawk = function RenderTawk(_ref) {
@@ -12747,7 +13339,7 @@ var SnowfallComponent = function SnowfallComponent(_ref) {
12747
13339
  }) : null;
12748
13340
  };
12749
13341
 
12750
- var _templateObject$I, _templateObject2$w;
13342
+ var _templateObject$I, _templateObject2$x;
12751
13343
  var ContactUsForm = function ContactUsForm(_ref) {
12752
13344
  var apiEndPoint = _ref.apiEndPoint,
12753
13345
  serviceApiEndPoint = _ref.serviceApiEndPoint,
@@ -12875,7 +13467,7 @@ var ContactUsForm = function ContactUsForm(_ref) {
12875
13467
  var TypographyContainer$8 = styled(Typography)(_templateObject$I || (_templateObject$I = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n font-size: 1.2rem !important;\n align-items: center;\n"])), function (props) {
12876
13468
  return props.fontColor;
12877
13469
  });
12878
- var RootContainer$3 = styled(Stack)(_templateObject2$w || (_templateObject2$w = _taggedTemplateLiteralLoose(["\n background-color: ", " !important;\n border-radius: 14px !important;\n padding: 1.3rem;\n margin-bottom: 1rem;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n p {\n margin: 0 !important;\n }\n"])), function (props) {
13470
+ var RootContainer$3 = styled(Stack)(_templateObject2$x || (_templateObject2$x = _taggedTemplateLiteralLoose(["\n background-color: ", " !important;\n border-radius: 14px !important;\n padding: 1.3rem;\n margin-bottom: 1rem;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n p {\n margin: 0 !important;\n }\n"])), function (props) {
12879
13471
  return props.secondaryColor;
12880
13472
  });
12881
13473
 
@@ -13277,7 +13869,7 @@ var StaticPageList = function StaticPageList(_ref) {
13277
13869
  };
13278
13870
  var TitleContainer$2 = styled.div(_templateObject$N || (_templateObject$N = _taggedTemplateLiteralLoose(["\n padding: 1.2rem;\n cursor: pointer;\n color: #323232;\n img {\n max-width: 100%;\n }\n &:hover {\n img {\n transform: scale(1.01);\n }\n }\n"])));
13279
13871
 
13280
- var _excluded$7 = ["userName", "children", "style"];
13872
+ var _excluded$8 = ["userName", "children", "style"];
13281
13873
  var colors$1 = ['#FFB900', '#D83B01', '#B50E0E', '#E81123', '#B4009E', '#5C2D91', '#0078D7', '#00B4FF', '#008272', '#107C10'];
13282
13874
  var getRandomColor = function getRandomColor(userName) {
13283
13875
  return colors$1[(userName === null || userName === void 0 ? void 0 : userName.length) % (colors$1 === null || colors$1 === void 0 ? void 0 : colors$1.length)];
@@ -13296,7 +13888,7 @@ var Avatar = function Avatar(_ref) {
13296
13888
  var userName = _ref.userName,
13297
13889
  children = _ref.children,
13298
13890
  style = _ref.style,
13299
- props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
13891
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
13300
13892
  var backgroundColor = '#1f62ff';
13301
13893
  if (userName) {
13302
13894
  backgroundColor = getRandomColor(userName);
@@ -13311,7 +13903,7 @@ var Avatar = function Avatar(_ref) {
13311
13903
  }));
13312
13904
  };
13313
13905
 
13314
- var _templateObject$O, _templateObject2$x;
13906
+ var _templateObject$O, _templateObject2$y;
13315
13907
  var SwitchUser = function SwitchUser(_ref) {
13316
13908
  var _customerData$filter, _customerData$filter$;
13317
13909
  var apiEndPoint = _ref.apiEndPoint,
@@ -13399,13 +13991,13 @@ var SwitchUser = function SwitchUser(_ref) {
13399
13991
  }))));
13400
13992
  };
13401
13993
  var RootContainer$4 = styled.div(_templateObject$O || (_templateObject$O = _taggedTemplateLiteralLoose(["\n margin: auto;\n padding: 2.4rem;\n max-width: 1920px;\n"])));
13402
- var CustomerContainer = styled.div(_templateObject2$x || (_templateObject2$x = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n transition: all 0.5s;\n padding: 1.1rem;\n border-radius: 1rem;\n box-shadow: 2px 2px 6px 0px #00000020;\n &:hover {\n transform: scale(1.05);\n }\n .name {\n color: ", ";\n font-size: 2.5rem;\n font-weight: 700;\n }\n .infoDetails {\n font-size: 1.1rem;\n color: #46464680;\n margin: 1rem 0;\n display: flex;\n align-items: center;\n svg {\n color: ", ";\n font-size: 1.5rem;\n margin-right: 0.5rem;\n }\n }\n"])), function (props) {
13994
+ var CustomerContainer = styled.div(_templateObject2$y || (_templateObject2$y = _taggedTemplateLiteralLoose(["\n cursor: pointer;\n transition: all 0.5s;\n padding: 1.1rem;\n border-radius: 1rem;\n box-shadow: 2px 2px 6px 0px #00000020;\n &:hover {\n transform: scale(1.05);\n }\n .name {\n color: ", ";\n font-size: 2.5rem;\n font-weight: 700;\n }\n .infoDetails {\n font-size: 1.1rem;\n color: #46464680;\n margin: 1rem 0;\n display: flex;\n align-items: center;\n svg {\n color: ", ";\n font-size: 1.5rem;\n margin-right: 0.5rem;\n }\n }\n"])), function (props) {
13403
13995
  return props.theme.primaryColor || '#000000d9';
13404
13996
  }, function (props) {
13405
13997
  return props.theme.primaryColor || '#000000d9';
13406
13998
  });
13407
13999
 
13408
- var _templateObject$P, _templateObject2$y;
14000
+ var _templateObject$P, _templateObject2$z;
13409
14001
  var ThankYou = function ThankYou(_ref) {
13410
14002
  var _ref$id = _ref.id,
13411
14003
  id = _ref$id === void 0 ? 0 : _ref$id,
@@ -13465,7 +14057,7 @@ var ThankYou = function ThankYou(_ref) {
13465
14057
  }, /*#__PURE__*/React__default.createElement("p", null, "Continue Shopping"))))))));
13466
14058
  };
13467
14059
  var Root$d = styled(Box)(_templateObject$P || (_templateObject$P = _taggedTemplateLiteralLoose([""])));
13468
- var StyledButton = styled.button(_templateObject2$y || (_templateObject2$y = _taggedTemplateLiteralLoose(["\n outline: none;\n border: 1px solid;\n border-color: ", ";\n background: none;\n border-radius: 14px;\n padding: 10px 20px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: background 0.5s ease;\n width: 200px;\n color: ", ";\n text-transform: uppercase;\n &:hover {\n cursor: pointer;\n background: ", ";\n color: #fff;\n }\n"])), function (props) {
14060
+ var StyledButton = styled.button(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n outline: none;\n border: 1px solid;\n border-color: ", ";\n background: none;\n border-radius: 14px;\n padding: 10px 20px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n transition: background 0.5s ease;\n width: 200px;\n color: ", ";\n text-transform: uppercase;\n &:hover {\n cursor: pointer;\n background: ", ";\n color: #fff;\n }\n"])), function (props) {
13469
14061
  return props.theme.primaryColor;
13470
14062
  }, function (props) {
13471
14063
  return props.theme.primaryColor;
@@ -13619,38 +14211,38 @@ var DiscountSummaryModal = function DiscountSummaryModal(_ref) {
13619
14211
  }, "Okay"))));
13620
14212
  };
13621
14213
 
13622
- var _templateObject$Q, _templateObject2$z, _templateObject3$q, _templateObject4$l, _templateObject5$h, _templateObject6$f, _templateObject7$b, _templateObject8$9;
14214
+ var _templateObject$Q, _templateObject2$A, _templateObject3$r, _templateObject4$m, _templateObject5$i, _templateObject6$g, _templateObject7$c, _templateObject8$a;
13623
14215
  var CheckoutRootContainer = styled.div(_templateObject$Q || (_templateObject$Q = _taggedTemplateLiteralLoose(["\n width: 100%;\n padding: 2rem;\n background-color: ", ";\n font-size: 16px;\n\n div,\n button,\n span {\n font-size: 16px;\n }\n @media only screen and (max-width: 1600px) {\n padding: 3em 0.5em;\n }\n @media screen and (max-width: 900px) {\n div,\n button,\n span {\n font-size: 12px;\n }\n padding: 2rem 0.5rem;\n }\n"])), function (props) {
13624
14216
  return props.bg;
13625
14217
  });
13626
- var CheckoutPageContainer = styled.div(_templateObject2$z || (_templateObject2$z = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n background-color: ", ";\n margin: 0 auto;\n padding: 2em;\n padding-left: min(4.5em, 2.5vw);\n color: rgba(50, 50, 50, 1);\n /* max-height: 90vh; */\n overflow: hidden;\n /* background: gainsboro; */\n border-radius: 28px;\n /* background-color: #fff8f6; */\n @media only screen and (max-width: 1200px) {\n flex-direction: column;\n align-items: center;\n max-height: max-content;\n }\n @media only screen and (max-width: 768px) {\n padding: 1em 0.5em;\n }\n .icon {\n font-size: 12px;\n }\n ////////////checkout and cart fonts\n /////////////////\n /* /////remove arrows from number input */\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n /* //////mui inputs */\n\n .Mui-checked {\n color: ", ";\n }\n\n .MuiOutlinedInput-notchedOutline {\n border: none;\n outline: none;\n }\n\n .MuiInputBase-root .MuiOutlinedInput-root,\n .MuiInputBase-colorPrimary,\n .MuiInputBase-fullWidth,\n .MuiInputBase-formControl {\n border-radius: 10px;\n }\n // /* /////stepper length */\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 60px !important;\n }\n\n @media only screen and (max-width: 900px) {\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 40px !important;\n }\n }\n"])), function (props) {
14218
+ var CheckoutPageContainer = styled.div(_templateObject2$A || (_templateObject2$A = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n background-color: ", ";\n margin: 0 auto;\n padding: 2em;\n padding-left: min(4.5em, 2.5vw);\n color: rgba(50, 50, 50, 1);\n /* max-height: 90vh; */\n overflow: hidden;\n /* background: gainsboro; */\n border-radius: 28px;\n /* background-color: #fff8f6; */\n @media only screen and (max-width: 1200px) {\n flex-direction: column;\n align-items: center;\n max-height: max-content;\n }\n @media only screen and (max-width: 768px) {\n padding: 1em 0.5em;\n }\n .icon {\n font-size: 12px;\n }\n ////////////checkout and cart fonts\n /////////////////\n /* /////remove arrows from number input */\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n /* //////mui inputs */\n\n .Mui-checked {\n color: ", ";\n }\n\n .MuiOutlinedInput-notchedOutline {\n border: none;\n outline: none;\n }\n\n .MuiInputBase-root .MuiOutlinedInput-root,\n .MuiInputBase-colorPrimary,\n .MuiInputBase-fullWidth,\n .MuiInputBase-formControl {\n border-radius: 10px;\n }\n // /* /////stepper length */\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 60px !important;\n }\n\n @media only screen and (max-width: 900px) {\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 40px !important;\n }\n }\n"])), function (props) {
13627
14219
  return props.maxWidth || '1605px';
13628
14220
  }, function (props) {
13629
14221
  return props.bg || '#fff8f6';
13630
14222
  }, function (props) {
13631
14223
  return props.primaryColor || 'rgba(50, 50, 50, 1)';
13632
14224
  });
13633
- var Row = styled.div(_templateObject3$q || (_templateObject3$q = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n"])));
13634
- var CheckoutMainWithHeader = styled(Stack)(_templateObject4$l || (_templateObject4$l = _taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
13635
- var CheckoutMain = styled.div(_templateObject5$h || (_templateObject5$h = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 1008px;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n margin-right: 2em;\n max-height: 65vh;\n padding-right: 2em;\n overflow-y: auto;\n position: relative;\n padding-top: 2em;\n padding-bottom: 3em;\n /* width */\n ::-webkit-scrollbar {\n width: 10px;\n background: ", ";\n border-radius: 16px;\n }\n\n /* Track */\n ::-webkit-scrollbar-track {\n background: ", ";\n border-radius: 16px;\n }\n\n /* Handle */\n ::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 16px;\n }\n @media only screen and (max-width: 1200px) {\n margin-bottom: 3em;\n min-height: max-content;\n max-height: max-content;\n margin-right: 0;\n overflow: visible;\n }\n @media only screen and (max-width: 768px) {\n // max-width: 100vw;\n padding-right: 0;\n // width: 98vw;\n // min-width: 90vw;\n padding-top: 1em;\n }\n /* overflow: hidden; */\n"])), function (props) {
14225
+ var Row = styled.div(_templateObject3$r || (_templateObject3$r = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n"])));
14226
+ var CheckoutMainWithHeader = styled(Stack)(_templateObject4$m || (_templateObject4$m = _taggedTemplateLiteralLoose(["\n width: 100%;\n"])));
14227
+ var CheckoutMain = styled.div(_templateObject5$i || (_templateObject5$i = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 1008px;\n display: flex;\n flex-direction: column;\n align-items: flex-end;\n margin-right: 2em;\n max-height: 65vh;\n padding-right: 2em;\n overflow-y: auto;\n position: relative;\n padding-top: 2em;\n padding-bottom: 3em;\n /* width */\n ::-webkit-scrollbar {\n width: 10px;\n background: ", ";\n border-radius: 16px;\n }\n\n /* Track */\n ::-webkit-scrollbar-track {\n background: ", ";\n border-radius: 16px;\n }\n\n /* Handle */\n ::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 16px;\n }\n @media only screen and (max-width: 1200px) {\n margin-bottom: 3em;\n min-height: max-content;\n max-height: max-content;\n margin-right: 0;\n overflow: visible;\n }\n @media only screen and (max-width: 768px) {\n // max-width: 100vw;\n padding-right: 0;\n // width: 98vw;\n // min-width: 90vw;\n padding-top: 1em;\n }\n /* overflow: hidden; */\n"])), function (props) {
13636
14228
  return props.bg || 'rgba(102,112,128,0.5)';
13637
14229
  }, function (props) {
13638
14230
  return props.bg || 'rgba(102,112,128,0.5)';
13639
14231
  }, function (props) {
13640
14232
  return props.color;
13641
14233
  });
13642
- var CheckoutHeading = styled.div(_templateObject6$f || (_templateObject6$f = _taggedTemplateLiteralLoose(["\n margin-left: 2.5em;\n margin-bottom: 2em;\n h5 {\n font-size: 2.3em;\n font-weight: 600;\n text-transform: capitalize;\n }\n p {\n font-size: 0.875em;\n margin-top: 0.5em;\n }\n @media only screen and (max-width: 768px) {\n margin-left: 0;\n padding-left: 1em;\n }\n"])));
13643
- var CheckoutHeader = styled(Row)(_templateObject7$b || (_templateObject7$b = _taggedTemplateLiteralLoose(["\n width: 100%;\n overflow: auto;\n justify-content: space-around;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: sticky;\n top: 0;\n background-color: white;\n z-index: 1;\n justify-content: flex-start;\n min-height: 4em;\n max-height: 4em;\n max-width: 60em;\n background: #ffffff;\n border-radius: 20px;\n color: #7d7b7b;\n padding: 0 2em;\n margin: 0 2em 1em 1em;\n .row {\n display: flex;\n color: inherit;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n text-transform: capitalize;\n margin-right: 2.4%;\n .icon {\n font-size: 14px;\n font-weight: 400;\n display: grid;\n place-items: center;\n margin-right: 6px;\n color: inherit;\n }\n p,\n span {\n font-size: 0.95em;\n color: inherit;\n }\n }\n .checked {\n p,\n span {\n color: #323232;\n }\n .icon {\n color: #249937;\n }\n }\n @media only screen and (max-width: 1200px) {\n margin-right: 0em;\n }\n @media only screen and (max-width: 768px) {\n width: 100%;\n padding: 2em 1em;\n margin: 1.4em 0;\n .row {\n margin-right: 4.5%;\n p {\n font-size: 12px;\n }\n span {\n display: none;\n }\n }\n }\n"])));
13644
- var CheckoutStepIcon = styled.div(_templateObject8$9 || (_templateObject8$9 = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n border-radius: 50%;\n font-size: 5px;\n display: grid;\n place-items: center;\n margin: auto;\n padding: 0;\n margin-left: 2px;\n .circle {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n font-size: 5px;\n display: grid;\n place-items: center;\n margin: auto;\n padding: 0;\n }\n .ic {\n font-size: 8px;\n }\n"])));
14234
+ var CheckoutHeading = styled.div(_templateObject6$g || (_templateObject6$g = _taggedTemplateLiteralLoose(["\n margin-left: 2.5em;\n margin-bottom: 2em;\n h5 {\n font-size: 2.3em;\n font-weight: 600;\n text-transform: capitalize;\n }\n p {\n font-size: 0.875em;\n margin-top: 0.5em;\n }\n @media only screen and (max-width: 768px) {\n margin-left: 0;\n padding-left: 1em;\n }\n"])));
14235
+ var CheckoutHeader = styled(Row)(_templateObject7$c || (_templateObject7$c = _taggedTemplateLiteralLoose(["\n width: 100%;\n overflow: auto;\n justify-content: space-around;\n display: flex;\n flex-direction: row;\n align-items: center;\n position: sticky;\n top: 0;\n background-color: white;\n z-index: 1;\n justify-content: flex-start;\n min-height: 4em;\n max-height: 4em;\n max-width: 60em;\n background: #ffffff;\n border-radius: 20px;\n color: #7d7b7b;\n padding: 0 2em;\n margin: 0 2em 1em 1em;\n .row {\n display: flex;\n color: inherit;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n text-transform: capitalize;\n margin-right: 2.4%;\n .icon {\n font-size: 14px;\n font-weight: 400;\n display: grid;\n place-items: center;\n margin-right: 6px;\n color: inherit;\n }\n p,\n span {\n font-size: 0.95em;\n color: inherit;\n }\n }\n .checked {\n p,\n span {\n color: #323232;\n }\n .icon {\n color: #249937;\n }\n }\n @media only screen and (max-width: 1200px) {\n margin-right: 0em;\n }\n @media only screen and (max-width: 768px) {\n width: 100%;\n padding: 2em 1em;\n margin: 1.4em 0;\n .row {\n margin-right: 4.5%;\n p {\n font-size: 12px;\n }\n span {\n display: none;\n }\n }\n }\n"])));
14236
+ var CheckoutStepIcon = styled.div(_templateObject8$a || (_templateObject8$a = _taggedTemplateLiteralLoose(["\n width: 20px;\n height: 20px;\n border-radius: 50%;\n font-size: 5px;\n display: grid;\n place-items: center;\n margin: auto;\n padding: 0;\n margin-left: 2px;\n .circle {\n width: 16px;\n height: 16px;\n border-radius: 50%;\n font-size: 5px;\n display: grid;\n place-items: center;\n margin: auto;\n padding: 0;\n }\n .ic {\n font-size: 8px;\n }\n"])));
13645
14237
 
13646
- var _templateObject$R, _templateObject2$A, _templateObject3$r;
14238
+ var _templateObject$R, _templateObject2$B, _templateObject3$s;
13647
14239
  var CheckoutSummaryContainer = styled.div(_templateObject$R || (_templateObject$R = _taggedTemplateLiteralLoose(["\n background: ", ";\n color: ", ";\n border-radius: 20px;\n padding: max(1.5em, 30px);\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n max-width: 25rem;\n min-width: min(25rem, 95%);\n font-size: 16px;\n margin-top: 6.15em;\n @media only screen and (max-width: 1200px) {\n margin-top: 0;\n }\n"])), function (props) {
13648
14240
  return props.bg || 'rgba(255, 240, 236, 1)';
13649
14241
  }, function (props) {
13650
14242
  return props.color || ' rgba(50, 50, 50, 1)';
13651
14243
  });
13652
- var TextRow = styled.div(_templateObject2$A || (_templateObject2$A = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n max-width: 90%;\n margin-bottom: 0.8rem;\n padding-bottom: 0.8rem;\n width: 90%;\n border-bottom: 1px solid #f7f7f7;\n .text {\n font-size: 1.1em;\n text-transform: capitalize;\n }\n .total {\n font-size: 1.65em;\n font-weight: 800;\n }\n"])));
13653
- var FilledInfo = styled.div(_templateObject3$r || (_templateObject3$r = _taggedTemplateLiteralLoose(["\n margin-bottom: 2em;\n .heading {\n font-size: 1.25em;\n font-weight: 800;\n margin-bottom: 0.8em;\n }\n\n p {\n font-size: 0.875em;\n text-transform: capitalize;\n max-width: 60%;\n }\n .bold {\n font-weight: 700;\n margin-bottom: 0.8em;\n max-width: 300px;\n width: fit-content;\n }\n .payment {\n width: 70px;\n height: 48px;\n background: #ffffff;\n border-radius: 15.875px;\n display: grid;\n place-items: center;\n overflow: hidden;\n }\n .blank {\n opacity: 0;\n }\n"])));
14244
+ var TextRow = styled.div(_templateObject2$B || (_templateObject2$B = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n max-width: 90%;\n margin-bottom: 0.8rem;\n padding-bottom: 0.8rem;\n width: 90%;\n border-bottom: 1px solid #f7f7f7;\n .text {\n font-size: 1.1em;\n text-transform: capitalize;\n }\n .total {\n font-size: 1.65em;\n font-weight: 800;\n }\n"])));
14245
+ var FilledInfo = styled.div(_templateObject3$s || (_templateObject3$s = _taggedTemplateLiteralLoose(["\n margin-bottom: 2em;\n .heading {\n font-size: 1.25em;\n font-weight: 800;\n margin-bottom: 0.8em;\n }\n\n p {\n font-size: 0.875em;\n text-transform: capitalize;\n max-width: 60%;\n }\n .bold {\n font-weight: 700;\n margin-bottom: 0.8em;\n max-width: 300px;\n width: fit-content;\n }\n .payment {\n width: 70px;\n height: 48px;\n background: #ffffff;\n border-radius: 15.875px;\n display: grid;\n place-items: center;\n overflow: hidden;\n }\n .blank {\n opacity: 0;\n }\n"])));
13654
14246
 
13655
14247
  var CheckoutSummary = function CheckoutSummary(_ref) {
13656
14248
  var billingInformation = _ref.billingInformation,
@@ -13722,14 +14314,14 @@ var CheckoutSummary = function CheckoutSummary(_ref) {
13722
14314
  }, renderMoney(orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.adjustmentValue))));
13723
14315
  };
13724
14316
 
13725
- var _templateObject$S, _templateObject2$B, _templateObject3$s, _templateObject4$m, _templateObject5$i, _templateObject6$g, _templateObject7$c, _templateObject8$a, _templateObject9$7, _templateObject10$5, _templateObject11$4, _templateObject12$3, _templateObject13$3, _templateObject14$3, _templateObject15$3, _templateObject16$3, _templateObject17$3, _templateObject18$3;
14317
+ var _templateObject$S, _templateObject2$C, _templateObject3$t, _templateObject4$n, _templateObject5$j, _templateObject6$h, _templateObject7$d, _templateObject8$b, _templateObject9$7, _templateObject10$6, _templateObject11$4, _templateObject12$3, _templateObject13$3, _templateObject14$3, _templateObject15$3, _templateObject16$3, _templateObject17$3, _templateObject18$3;
13726
14318
  var StepContainer = styled.div(_templateObject$S || (_templateObject$S = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 60em;\n background: white;\n padding: 1em 2em;\n background: #ffffff;\n border-radius: 20px;\n margin-left: 2em;\n margin-top: -2em;\n margin-bottom: 1em;\n // @media screen and (max-width: 1200px) {\n // width: 80vw;\n // min-width: 0;\n // }\n @media screen and (max-width: 768px) {\n // width: 96%;\n margin-left: 1em;\n padding: 0.8em;\n }\n @media screen and (max-width: 600px) {\n // width: 94%;\n margin-left: 1.2em;\n }\n"])));
13727
- var StepsContent = styled.div(_templateObject2$B || (_templateObject2$B = _taggedTemplateLiteralLoose(["\n padding-left: 1.565em;\n min-height: max-content;\n .MuiOutlinedInput-root {\n background: ", ";\n }\n\n p {\n font-size: 0.75em;\n }\n .bold {\n text-transform: uppercase;\n word-spacing: 5px;\n margin-top: 0.95em;\n span {\n font-weight: 600;\n cursor: pointer;\n font-size: 0.94rem;\n }\n .red {\n color: ", ";\n }\n }\n @media screen and (max-width: 768px) {\n padding: 0;\n width: 100%;\n }\n"])), function (props) {
14319
+ var StepsContent = styled.div(_templateObject2$C || (_templateObject2$C = _taggedTemplateLiteralLoose(["\n padding-left: 1.565em;\n min-height: max-content;\n .MuiOutlinedInput-root {\n background: ", ";\n }\n\n p {\n font-size: 0.75em;\n }\n .bold {\n text-transform: uppercase;\n word-spacing: 5px;\n margin-top: 0.95em;\n span {\n font-weight: 600;\n cursor: pointer;\n font-size: 0.94rem;\n }\n .red {\n color: ", ";\n }\n }\n @media screen and (max-width: 768px) {\n padding: 0;\n width: 100%;\n }\n"])), function (props) {
13728
14320
  return 'transparent' + '!important';
13729
14321
  }, function (props) {
13730
14322
  return props.bg || 'red';
13731
14323
  });
13732
- var StepsHeaderContainer = styled.div(_templateObject3$s || (_templateObject3$s = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n color: #323232;\n /* padding: ", "; */\n margin-bottom: ", ";\n margin-top: ", ";\n margin-left: ", ";\n /* color: grey; */\n border-bottom: 1px solid #f6f6f6;\n background: #ffffff;\n border-radius: 20px;\n // max-width: 900px;\n min-height: 4.35em;\n max-height: 4.35em;\n padding: ", ";\n h5 {\n font-size: 16px;\n font-weight: 600;\n text-transform: capitalize;\n margin-left: 0.6em;\n }\n .icon {\n font-size: 1.3em;\n margin-right: 8px;\n }\n .dropIcon {\n font-size: 1.4em;\n cursor: pointer;\n transform: rotate(-90deg);\n transition: 0.3s;\n color: rgba(50, 50, 50, 0.75);\n cursor: ", ";\n }\n .red {\n font-weight: 600;\n color: #fd0015;\n font-size: inherit;\n }\n @media screen and (max-width: 768px) {\n max-width: 97%;\n margin-left: 0.5em;\n padding-right: 1em;\n h5 {\n font-size: 12px;\n }\n }\n"])), function (props) {
14324
+ var StepsHeaderContainer = styled.div(_templateObject3$t || (_templateObject3$t = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: flex-start;\n color: #323232;\n /* padding: ", "; */\n margin-bottom: ", ";\n margin-top: ", ";\n margin-left: ", ";\n /* color: grey; */\n border-bottom: 1px solid #f6f6f6;\n background: #ffffff;\n border-radius: 20px;\n // max-width: 900px;\n min-height: 4.35em;\n max-height: 4.35em;\n padding: ", ";\n h5 {\n font-size: 16px;\n font-weight: 600;\n text-transform: capitalize;\n margin-left: 0.6em;\n }\n .icon {\n font-size: 1.3em;\n margin-right: 8px;\n }\n .dropIcon {\n font-size: 1.4em;\n cursor: pointer;\n transform: rotate(-90deg);\n transition: 0.3s;\n color: rgba(50, 50, 50, 0.75);\n cursor: ", ";\n }\n .red {\n font-weight: 600;\n color: #fd0015;\n font-size: inherit;\n }\n @media screen and (max-width: 768px) {\n max-width: 97%;\n margin-left: 0.5em;\n padding-right: 1em;\n h5 {\n font-size: 12px;\n }\n }\n"])), function (props) {
13733
14325
  return props.single ? '1.8em 2em' : '1em 0';
13734
14326
  }, function (props) {
13735
14327
  return props.single ? '-1.56em' : '1em';
@@ -13742,11 +14334,11 @@ var StepsHeaderContainer = styled.div(_templateObject3$s || (_templateObject3$s
13742
14334
  }, function (props) {
13743
14335
  return props.username ? 'not-allowed' : 'pointer';
13744
14336
  });
13745
- var TextFeildContainer = styled.div(_templateObject4$m || (_templateObject4$m = _taggedTemplateLiteralLoose(["\n label {\n color: rgba(107, 106, 106, 0.6) !important;\n }\n background: ", ";\n border-radius: 10px;\n && {\n input {\n font-size: 0.875em !important;\n color: black;\n &::placeholder {\n font-size: 0.975em !important;\n }\n }\n .icon {\n color: black;\n font-size: 1em;\n }\n }\n"])), function (props) {
14337
+ var TextFeildContainer = styled.div(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n label {\n color: rgba(107, 106, 106, 0.6) !important;\n }\n background: ", ";\n border-radius: 10px;\n && {\n input {\n font-size: 0.875em !important;\n color: black;\n &::placeholder {\n font-size: 0.975em !important;\n }\n }\n .icon {\n color: black;\n font-size: 1em;\n }\n }\n"])), function (props) {
13746
14338
  var _props$theme, _props$theme$input;
13747
14339
  return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$input = _props$theme.input) === null || _props$theme$input === void 0 ? void 0 : _props$theme$input.bg) || 'transparent';
13748
14340
  });
13749
- var CommonCheckoutBtn = styled.button(_templateObject5$i || (_templateObject5$i = _taggedTemplateLiteralLoose(["\n border: none;\n outline: none;\n width: ", ";\n height: ", ";\n background: ", ";\n display: grid;\n place-items: center;\n color: white;\n margin: 0 1em;\n font-weight: 500;\n letter-spacing: 1px;\n text-transform: ", ";\n transition: 0.4s;\n cursor: ", ";\n &:hover,\n &:focus {\n opacity: 0.7;\n }\n"])), function (props) {
14341
+ var CommonCheckoutBtn = styled.button(_templateObject5$j || (_templateObject5$j = _taggedTemplateLiteralLoose(["\n border: none;\n outline: none;\n width: ", ";\n height: ", ";\n background: ", ";\n display: grid;\n place-items: center;\n color: white;\n margin: 0 1em;\n font-weight: 500;\n letter-spacing: 1px;\n text-transform: ", ";\n transition: 0.4s;\n cursor: ", ";\n &:hover,\n &:focus {\n opacity: 0.7;\n }\n"])), function (props) {
13750
14342
  return props.width || '8.05em';
13751
14343
  }, function (props) {
13752
14344
  return props.height || '2.25em';
@@ -13759,7 +14351,7 @@ var CommonCheckoutBtn = styled.button(_templateObject5$i || (_templateObject5$i
13759
14351
  });
13760
14352
  var Select = styled.div.attrs({
13761
14353
  className: 'checkout-input'
13762
- })(_templateObject6$g || (_templateObject6$g = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 54px;\n border-radius: 10px;\n background: ", ";\n outline: none;\n border: none;\n padding: 0 1em;\n cursor: pointer;\n select {\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n padding: 0.5em 0;\n color: rgba(107, 106, 106, 0.6);\n background: ", ";\n }\n"])), function (props) {
14354
+ })(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 54px;\n border-radius: 10px;\n background: ", ";\n outline: none;\n border: none;\n padding: 0 1em;\n cursor: pointer;\n select {\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n padding: 0.5em 0;\n color: rgba(107, 106, 106, 0.6);\n background: ", ";\n }\n"])), function (props) {
13763
14355
  var _props$theme2, _props$theme2$input;
13764
14356
  return ((_props$theme2 = props.theme) === null || _props$theme2 === void 0 ? void 0 : (_props$theme2$input = _props$theme2.input) === null || _props$theme2$input === void 0 ? void 0 : _props$theme2$input.bg) || 'transparent';
13765
14357
  }, function (props) {
@@ -13767,12 +14359,12 @@ var Select = styled.div.attrs({
13767
14359
  });
13768
14360
  var SaveButton = styled.button.attrs({
13769
14361
  className: 'checkout-btn'
13770
- })(_templateObject7$c || (_templateObject7$c = _taggedTemplateLiteralLoose(["\n border: none;\n outline: none;\n font-size: 0.8125em;\n text-transform: uppercase;\n font-weight: 600;\n border-radius: 7px;\n padding: 0.55em 1em;\n background: ", ";\n display: grid;\n place-items: center;\n color: white;\n margin: 1em 0;\n letter-spacing: 1px;\n transition: 0.4s;\n cursor: ", ";\n &:hover,\n &:focus {\n opacity: 0.7;\n }\n"])), function (props) {
14362
+ })(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n border: none;\n outline: none;\n font-size: 0.8125em;\n text-transform: uppercase;\n font-weight: 600;\n border-radius: 7px;\n padding: 0.55em 1em;\n background: ", ";\n display: grid;\n place-items: center;\n color: white;\n margin: 1em 0;\n letter-spacing: 1px;\n transition: 0.4s;\n cursor: ", ";\n &:hover,\n &:focus {\n opacity: 0.7;\n }\n"])), function (props) {
13771
14363
  return props.color || '#FD0015';
13772
14364
  }, function (props) {
13773
14365
  return props.disabled ? 'not-allowed' : 'pointer';
13774
14366
  });
13775
- var ButtonRowContainer = styled.div(_templateObject8$a || (_templateObject8$a = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n button {\n width: 4.862em;\n height: 1.96em;\n border-radius: 0.43em;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n letter-spacing: 1px;\n color: white;\n opacity: ", ";\n background-color: ", ";\n border: 2px solid\n ", ";\n cursor: ", ";\n }\n .back {\n font-size: 0.875em;\n font-weight: 500;\n justify-content: flex-start;\n margin-right: 0.2em;\n color: #323232;\n background: transparent;\n border: none;\n cursor: ", ";\n font-size: 0.8em;\n transition: 0.4s;\n opacity: 1;\n .icon {\n font-size: 1.2em;\n margin-right: 2px;\n }\n &:hover,\n &:focus {\n letter-spacing: 1px;\n outline: none;\n }\n }\n"])), function (props) {
14367
+ var ButtonRowContainer = styled.div(_templateObject8$b || (_templateObject8$b = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n flex-direction: row;\n justify-content: flex-end;\n align-items: center;\n button {\n width: 4.862em;\n height: 1.96em;\n border-radius: 0.43em;\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n font-weight: 600;\n letter-spacing: 1px;\n color: white;\n opacity: ", ";\n background-color: ", ";\n border: 2px solid\n ", ";\n cursor: ", ";\n }\n .back {\n font-size: 0.875em;\n font-weight: 500;\n justify-content: flex-start;\n margin-right: 0.2em;\n color: #323232;\n background: transparent;\n border: none;\n cursor: ", ";\n font-size: 0.8em;\n transition: 0.4s;\n opacity: 1;\n .icon {\n font-size: 1.2em;\n margin-right: 2px;\n }\n &:hover,\n &:focus {\n letter-spacing: 1px;\n outline: none;\n }\n }\n"])), function (props) {
13776
14368
  return props.disabledNext && '0.5';
13777
14369
  }, function (props) {
13778
14370
  return props.color || '#fd0015';
@@ -13794,7 +14386,7 @@ var CheckBoxRow = styled.div(_templateObject9$7 || (_templateObject9$7 = _tagged
13794
14386
  }, function (prop) {
13795
14387
  return prop.colorText || 'red';
13796
14388
  });
13797
- var CreditCardFextField = styled.div(_templateObject10$5 || (_templateObject10$5 = _taggedTemplateLiteralLoose(["\n label {\n color: rgba(107, 106, 106, 0.6) !important;\n }\n .MuiOutlinedInput-root {\n background: ", ";\n }\n .save-btn {\n background: ", ";\n }\n"])), function (prop) {
14389
+ var CreditCardFextField = styled.div(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n label {\n color: rgba(107, 106, 106, 0.6) !important;\n }\n .MuiOutlinedInput-root {\n background: ", ";\n }\n .save-btn {\n background: ", ";\n }\n"])), function (prop) {
13798
14390
  return prop.bgInput + '!important' || '';
13799
14391
  }, function (prop) {
13800
14392
  return prop.btnBg + '!important' || '';
@@ -15296,7 +15888,7 @@ var erSessionStorage = {
15296
15888
  }
15297
15889
  };
15298
15890
 
15299
- var _templateObject$T, _templateObject2$C;
15891
+ var _templateObject$T, _templateObject2$D;
15300
15892
  var ConsentForm = function ConsentForm(_ref) {
15301
15893
  var apiEndPoint = _ref.apiEndPoint,
15302
15894
  token = _ref.token,
@@ -15475,7 +16067,7 @@ var InfoItem = function InfoItem(_ref3) {
15475
16067
  item: true
15476
16068
  }, /*#__PURE__*/React__default.createElement("p", null, value))));
15477
16069
  };
15478
- var InfoItemContainer = styled.div(_templateObject2$C || (_templateObject2$C = _taggedTemplateLiteralLoose(["\n background: #00000010;\n padding: 0.5rem;\n"])));
16070
+ var InfoItemContainer = styled.div(_templateObject2$D || (_templateObject2$D = _taggedTemplateLiteralLoose(["\n background: #00000010;\n padding: 0.5rem;\n"])));
15479
16071
 
15480
16072
  var PaypalComponent = function PaypalComponent(_ref) {
15481
16073
  var apiEndPoint = _ref.apiEndPoint,
@@ -16864,7 +17456,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref9) {
16864
17456
  }, props)));
16865
17457
  };
16866
17458
 
16867
- var _templateObject$U, _templateObject2$D, _templateObject3$t;
17459
+ var _templateObject$U, _templateObject2$E, _templateObject3$u;
16868
17460
  var columns$1 = [{
16869
17461
  id: 'id',
16870
17462
  label: 'Id',
@@ -16980,10 +17572,10 @@ var PurchaseOrderList = function PurchaseOrderList(_ref) {
16980
17572
  })));
16981
17573
  };
16982
17574
  var TableContainer$3 = styled.div(_templateObject$U || (_templateObject$U = _taggedTemplateLiteralLoose(["\n margin: 0.5rem;\n border-radius: 14px;\n"])));
16983
- var TypographyContainer$9 = styled(Typography)(_templateObject2$D || (_templateObject2$D = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
17575
+ var TypographyContainer$9 = styled(Typography)(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
16984
17576
  return props.fontColor;
16985
17577
  });
16986
- var TitleContainer$3 = styled.h4(_templateObject3$t || (_templateObject3$t = _taggedTemplateLiteralLoose(["\n font-size: 2.7rem;\n span {\n color: '#000';\n font-weight: 500;\n }\n b {\n color: ", ";\n }\n @media only screen and (max-width: 608px) {\n font-size: 2.2rem;\n }\n"])), function (props) {
17578
+ var TitleContainer$3 = styled.h4(_templateObject3$u || (_templateObject3$u = _taggedTemplateLiteralLoose(["\n font-size: 2.7rem;\n span {\n color: '#000';\n font-weight: 500;\n }\n b {\n color: ", ";\n }\n @media only screen and (max-width: 608px) {\n font-size: 2.2rem;\n }\n"])), function (props) {
16987
17579
  return props.primaryColor;
16988
17580
  });
16989
17581
 
@@ -17554,7 +18146,7 @@ var VendorInventory = function VendorInventory(_ref) {
17554
18146
  })));
17555
18147
  };
17556
18148
 
17557
- var _templateObject$V, _templateObject2$E, _templateObject3$u, _templateObject4$n, _templateObject5$j, _templateObject6$h, _templateObject7$d, _templateObject8$b;
18149
+ var _templateObject$V, _templateObject2$F, _templateObject3$v, _templateObject4$o, _templateObject5$k, _templateObject6$i, _templateObject7$e, _templateObject8$c;
17558
18150
  var VendorLogin = function VendorLogin(_ref) {
17559
18151
  var primaryColor = _ref.primaryColor,
17560
18152
  API_BASE_URL = _ref.API_BASE_URL;
@@ -17661,15 +18253,15 @@ var VendorLogin = function VendorLogin(_ref) {
17661
18253
  }) : 'sign in'))))));
17662
18254
  };
17663
18255
  var Container$3 = styled.div(_templateObject$V || (_templateObject$V = _taggedTemplateLiteralLoose(["\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: rgb(255, 255, 255);\n font-size: 16px !important;\n padding: 1rem;\n @media only screen and (max-width: 640px) {\n font-size: 14px !important;\n }\n"])));
17664
- var StyledLogin = styled.div(_templateObject2$E || (_templateObject2$E = _taggedTemplateLiteralLoose(["\n height: 70%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 1em;\n align-items: center;\n"])));
17665
- var StyledCard = styled(Card$1)(_templateObject3$u || (_templateObject3$u = _taggedTemplateLiteralLoose(["\n width: min(100%, 489px);\n height: 100%;\n max-height: 450px;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid #cac8c8;\n flex-direction: column;\n background: white;\n // min-height: 500px;\n h4 {\n font-size: 1.5em;\n margin-bottom: 1em;\n margin-top: -2em;\n text-transform: uppercase;\n font-weight: 500;\n }\n button {\n text-transform: capitalize;\n letter-spacing: 1px;\n font-size: 1em;\n font-weight: 500;\n }\n"])));
17666
- var H1 = styled(Typography)(_templateObject4$n || (_templateObject4$n = _taggedTemplateLiteralLoose(["\n margin-top: 1rem;\n"])));
17667
- var StyleInputBx = styled.div(_templateObject5$j || (_templateObject5$j = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid rgb(202, 200, 200);\n // padding:.5em;\n min-width: min(80vw, 360px);\n // border-radius: 20px;\n overflow: hidden;\n margin: 0.6em 0;\n // padding:.2em 0;\n .icon {\n border-right: 1px solid rgb(202, 200, 200);\n height: 100%;\n padding: 1em;\n display: grid;\n place-items: center;\n width: 15%;\n box-sizing: border-box;\n color: grey;\n }\n input {\n width: 85%;\n height: 100%;\n outline: none;\n padding: 0 1em;\n font-size: 1.1em;\n border: none;\n &:focus,\n &:hover {\n outline: none !important;\n }\n }\n"])));
17668
- var ShowPassBtn = styled.span(_templateObject6$h || (_templateObject6$h = _taggedTemplateLiteralLoose(["\n padding-right: 0.4em;\n display: grid;\n place-items: center;\n font-size: 25px;\n color: grey;\n cursor: pointer;\n"])));
17669
- var ButtonContianer = styled.span(_templateObject7$d || (_templateObject7$d = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 360px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n // @include flexRow(space-between);\n margin-top: 1em;\n @media only screen and (max-width: 640px) {\n padding: 0 1em;\n }\n"])));
17670
- var StyledButton$1 = styled(Button)(_templateObject8$b || (_templateObject8$b = _taggedTemplateLiteralLoose(["\n width: 100px;\n height: 46px;\n box-sizing: border-box;\n\n span {\n padding: 0.5em;\n }\n @media only screen and (max-width: 640px) {\n height: 35px;\n }\n"])));
18256
+ var StyledLogin = styled.div(_templateObject2$F || (_templateObject2$F = _taggedTemplateLiteralLoose(["\n height: 70%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 1em;\n align-items: center;\n"])));
18257
+ var StyledCard = styled(Card$1)(_templateObject3$v || (_templateObject3$v = _taggedTemplateLiteralLoose(["\n width: min(100%, 489px);\n height: 100%;\n max-height: 450px;\n display: flex;\n justify-content: center;\n align-items: center;\n border: 1px solid #cac8c8;\n flex-direction: column;\n background: white;\n // min-height: 500px;\n h4 {\n font-size: 1.5em;\n margin-bottom: 1em;\n margin-top: -2em;\n text-transform: uppercase;\n font-weight: 500;\n }\n button {\n text-transform: capitalize;\n letter-spacing: 1px;\n font-size: 1em;\n font-weight: 500;\n }\n"])));
18258
+ var H1 = styled(Typography)(_templateObject4$o || (_templateObject4$o = _taggedTemplateLiteralLoose(["\n margin-top: 1rem;\n"])));
18259
+ var StyleInputBx = styled.div(_templateObject5$k || (_templateObject5$k = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n align-items: center;\n border: 1px solid rgb(202, 200, 200);\n // padding:.5em;\n min-width: min(80vw, 360px);\n // border-radius: 20px;\n overflow: hidden;\n margin: 0.6em 0;\n // padding:.2em 0;\n .icon {\n border-right: 1px solid rgb(202, 200, 200);\n height: 100%;\n padding: 1em;\n display: grid;\n place-items: center;\n width: 15%;\n box-sizing: border-box;\n color: grey;\n }\n input {\n width: 85%;\n height: 100%;\n outline: none;\n padding: 0 1em;\n font-size: 1.1em;\n border: none;\n &:focus,\n &:hover {\n outline: none !important;\n }\n }\n"])));
18260
+ var ShowPassBtn = styled.span(_templateObject6$i || (_templateObject6$i = _taggedTemplateLiteralLoose(["\n padding-right: 0.4em;\n display: grid;\n place-items: center;\n font-size: 25px;\n color: grey;\n cursor: pointer;\n"])));
18261
+ var ButtonContianer = styled.span(_templateObject7$e || (_templateObject7$e = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: 360px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n // @include flexRow(space-between);\n margin-top: 1em;\n @media only screen and (max-width: 640px) {\n padding: 0 1em;\n }\n"])));
18262
+ var StyledButton$1 = styled(Button)(_templateObject8$c || (_templateObject8$c = _taggedTemplateLiteralLoose(["\n width: 100px;\n height: 46px;\n box-sizing: border-box;\n\n span {\n padding: 0.5em;\n }\n @media only screen and (max-width: 640px) {\n height: 35px;\n }\n"])));
17671
18263
 
17672
- var _templateObject$W, _templateObject2$F, _templateObject3$v, _templateObject4$o;
18264
+ var _templateObject$W, _templateObject2$G, _templateObject3$w, _templateObject4$p;
17673
18265
  var menuItems = [{
17674
18266
  name: 'My Account',
17675
18267
  Icon: RiAccountBoxLine,
@@ -17878,7 +18470,7 @@ var VendorAccountDetails = function VendorAccountDetails(_ref) {
17878
18470
  }) : /*#__PURE__*/React__default.createElement(Fragment$1, null, API_BASE_URL && token && renderListItemComponent(tabValue)))))));
17879
18471
  };
17880
18472
  var Root$e = styled(Box)(_templateObject$W || (_templateObject$W = _taggedTemplateLiteralLoose(["\n padding: 1.4rem;\n background-color: #fff;\n @media only screen and (max-width: 608px) {\n padding: 0.5rem;\n }\n"])));
17881
- var MainContainer$4 = styled.div(_templateObject2$F || (_templateObject2$F = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: auto;\n min-height: 100vh;\n background-color: #fff;\n max-width: ", ";\n padding: 2rem;\n border-radius: 14px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n @media only screen and (max-width: 608px) {\n padding: 0.5rem;\n }\n"])), function (props) {
18473
+ var MainContainer$4 = styled.div(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n display: flex;\n justify-content: center;\n margin: auto;\n min-height: 100vh;\n background-color: #fff;\n max-width: ", ";\n padding: 2rem;\n border-radius: 14px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n @media only screen and (max-width: 608px) {\n padding: 0.5rem;\n }\n"])), function (props) {
17882
18474
  return props.open ? '1800px' : '1600px';
17883
18475
  });
17884
18476
  var Main$1 = styled$1('main', {
@@ -17911,12 +18503,12 @@ var Main$1 = styled$1('main', {
17911
18503
  overflow: 'auto'
17912
18504
  });
17913
18505
  });
17914
- var ContainerDrawer$1 = styled(Drawer)(_templateObject3$v || (_templateObject3$v = _taggedTemplateLiteralLoose(["\n // height: 100%;\n margin-right: ", ";\n .MuiDrawer-paper {\n padding: 1rem;\n position: relative;\n z-index: 1;\n background: ", ";\n border-radius: 14px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n }\n"])), function (props) {
18506
+ var ContainerDrawer$1 = styled(Drawer)(_templateObject3$w || (_templateObject3$w = _taggedTemplateLiteralLoose(["\n // height: 100%;\n margin-right: ", ";\n .MuiDrawer-paper {\n padding: 1rem;\n position: relative;\n z-index: 1;\n background: ", ";\n border-radius: 14px;\n box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px 0px;\n }\n"])), function (props) {
17915
18507
  return props.open && '2rem';
17916
18508
  }, function (props) {
17917
18509
  return props.primaryColor || transparent;
17918
18510
  });
17919
- var TypographyContainer$a = styled(Typography)(_templateObject4$o || (_templateObject4$o = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
18511
+ var TypographyContainer$a = styled(Typography)(_templateObject4$p || (_templateObject4$p = _taggedTemplateLiteralLoose(["\n color: ", ";\n display: flex;\n align-items: center;\n"])), function (props) {
17920
18512
  return props.fontColor;
17921
18513
  });
17922
18514
 
@@ -18282,7 +18874,7 @@ var ReStockedItem = function ReStockedItem(_ref) {
18282
18874
  })))))));
18283
18875
  };
18284
18876
 
18285
- var _excluded$8 = ["children", "value", "index"];
18877
+ var _excluded$9 = ["children", "value", "index"];
18286
18878
  var NewArrivalPage = function NewArrivalPage(_ref) {
18287
18879
  var apiEndPoint = _ref.apiEndPoint,
18288
18880
  token = _ref.token,
@@ -18390,7 +18982,7 @@ function CustomTabPanel(props) {
18390
18982
  var children = props.children,
18391
18983
  value = props.value,
18392
18984
  index = props.index,
18393
- other = _objectWithoutPropertiesLoose(props, _excluded$8);
18985
+ other = _objectWithoutPropertiesLoose(props, _excluded$9);
18394
18986
  return /*#__PURE__*/React__default.createElement("div", _extends({
18395
18987
  role: "tabpanel",
18396
18988
  hidden: value !== index,
@@ -18532,17 +19124,17 @@ var moveToCart = function moveToCart(_ref3) {
18532
19124
  }
18533
19125
  };
18534
19126
 
18535
- var _templateObject$Y, _templateObject2$G, _templateObject3$w, _templateObject4$p, _templateObject5$k, _templateObject6$i, _templateObject7$e, _templateObject8$c, _templateObject9$8, _templateObject10$6, _templateObject11$5;
19127
+ var _templateObject$Y, _templateObject2$H, _templateObject3$x, _templateObject4$q, _templateObject5$l, _templateObject6$j, _templateObject7$f, _templateObject8$d, _templateObject9$8, _templateObject10$7, _templateObject11$5;
18536
19128
  var EmptyStateText = styled.p(_templateObject$Y || (_templateObject$Y = _taggedTemplateLiteralLoose(["\n font-size: 16px;\n color: #4b4b4b;\n margin: 16px 0;\n"])));
18537
- var ProductCardWrapper = styled.div(_templateObject2$G || (_templateObject2$G = _taggedTemplateLiteralLoose(["\n position: relative;\n background-color: #ffffff;\n border: 1px solid #d3d3d3;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 10px;\n gap: 10px;\n cursor: pointer;\n"])));
18538
- var TopBar = styled.div(_templateObject3$w || (_templateObject3$w = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n"])));
18539
- var SearchWrapper = styled(Box)(_templateObject4$p || (_templateObject4$p = _taggedTemplateLiteralLoose(["\n && {\n margin-bottom: 24px;\n max-width: 400px;\n width: 100%;\n }\n"])));
18540
- var TotalItemsText = styled.div(_templateObject5$k || (_templateObject5$k = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 500;\n color: #4b4b4b;\n margin-bottom: 24px;\n white-space: nowrap;\n"])));
18541
- var DeleteButton = styled.button(_templateObject6$i || (_templateObject6$i = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 8px;\n right: 8px;\n opacity: 1;\n pointer-events: auto;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n color: #ff0000;\n"])));
18542
- var PriceContainer = styled.div(_templateObject7$e || (_templateObject7$e = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
18543
- var DiscountPriceRow = styled.div(_templateObject8$c || (_templateObject8$c = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n"])));
19129
+ var ProductCardWrapper = styled.div(_templateObject2$H || (_templateObject2$H = _taggedTemplateLiteralLoose(["\n position: relative;\n background-color: #ffffff;\n border: 1px solid #d3d3d3;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 10px;\n gap: 10px;\n cursor: pointer;\n"])));
19130
+ var TopBar$1 = styled.div(_templateObject3$x || (_templateObject3$x = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n"])));
19131
+ var SearchWrapper = styled(Box)(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n && {\n margin-bottom: 24px;\n max-width: 400px;\n width: 100%;\n }\n"])));
19132
+ var TotalItemsText = styled.div(_templateObject5$l || (_templateObject5$l = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 500;\n color: #4b4b4b;\n margin-bottom: 24px;\n white-space: nowrap;\n"])));
19133
+ var DeleteButton = styled.button(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 8px;\n right: 8px;\n opacity: 1;\n pointer-events: auto;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n color: #ff0000;\n"])));
19134
+ var PriceContainer = styled.div(_templateObject7$f || (_templateObject7$f = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
19135
+ var DiscountPriceRow = styled.div(_templateObject8$d || (_templateObject8$d = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n"])));
18544
19136
  var ProductName$2 = styled.div(_templateObject9$8 || (_templateObject9$8 = _taggedTemplateLiteralLoose(["\n font-size: 16px;\n font-weight: 500;\n color: #000000;\n text-align: center;\n height: 40px;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis;\n white-space: pre-wrap;\n"])));
18545
- var ProductActionButton = styled(Button)(_templateObject10$6 || (_templateObject10$6 = _taggedTemplateLiteralLoose(["\n && {\n background-color: ", ";\n color: #ffffff;\n border-radius: 10px;\n font-weight: 500;\n }\n"])), function (_ref) {
19137
+ var ProductActionButton = styled(Button)(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteralLoose(["\n && {\n background-color: ", ";\n color: #ffffff;\n border-radius: 10px;\n font-weight: 500;\n }\n"])), function (_ref) {
18546
19138
  var primaryColor = _ref.primaryColor;
18547
19139
  return primaryColor != null ? primaryColor : '#000000';
18548
19140
  });
@@ -18612,7 +19204,7 @@ var WishlistContent = function WishlistContent(_ref) {
18612
19204
  width: '100%',
18613
19205
  height: '100%'
18614
19206
  }
18615
- }, /*#__PURE__*/React__default.createElement(TopBar, {
19207
+ }, /*#__PURE__*/React__default.createElement(TopBar$1, {
18616
19208
  style: getStyleOverride(styleOverrides, 'topBar', 'TopBar')
18617
19209
  }, /*#__PURE__*/React__default.createElement(SearchWrapper, {
18618
19210
  style: getStyleOverride(styleOverrides, 'searchWrapper', 'SearchWrapper')
@@ -19022,17 +19614,17 @@ var moveToCartFromFavoriteItems = function moveToCartFromFavoriteItems(_ref3) {
19022
19614
  }
19023
19615
  };
19024
19616
 
19025
- var _templateObject$Z, _templateObject2$H, _templateObject3$x, _templateObject4$q, _templateObject5$l, _templateObject6$j, _templateObject7$f, _templateObject8$d, _templateObject9$9, _templateObject10$7, _templateObject11$6;
19617
+ var _templateObject$Z, _templateObject2$I, _templateObject3$y, _templateObject4$r, _templateObject5$m, _templateObject6$k, _templateObject7$g, _templateObject8$e, _templateObject9$9, _templateObject10$8, _templateObject11$6;
19026
19618
  var EmptyStateText$1 = styled.p(_templateObject$Z || (_templateObject$Z = _taggedTemplateLiteralLoose(["\n font-size: 16px;\n color: #4b4b4b;\n margin: 16px 0;\n"])));
19027
- var ProductCardWrapper$1 = styled.div(_templateObject2$H || (_templateObject2$H = _taggedTemplateLiteralLoose(["\n position: relative;\n background-color: #ffffff;\n border: 1px solid #d3d3d3;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 10px;\n gap: 10px;\n cursor: pointer;\n"])));
19028
- var TopBar$1 = styled.div(_templateObject3$x || (_templateObject3$x = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n"])));
19029
- var SearchWrapper$1 = styled(Box)(_templateObject4$q || (_templateObject4$q = _taggedTemplateLiteralLoose(["\n && {\n margin-bottom: 24px;\n max-width: 400px;\n width: 100%;\n }\n"])));
19030
- var TotalItemsText$1 = styled.div(_templateObject5$l || (_templateObject5$l = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 500;\n color: #4b4b4b;\n margin-bottom: 24px;\n white-space: nowrap;\n"])));
19031
- var DeleteButton$1 = styled.button(_templateObject6$j || (_templateObject6$j = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 8px;\n right: 8px;\n opacity: 1;\n pointer-events: auto;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n color: #ff0000;\n"])));
19032
- var PriceContainer$1 = styled.div(_templateObject7$f || (_templateObject7$f = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
19033
- var DiscountPriceRow$1 = styled.div(_templateObject8$d || (_templateObject8$d = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n"])));
19619
+ var ProductCardWrapper$1 = styled.div(_templateObject2$I || (_templateObject2$I = _taggedTemplateLiteralLoose(["\n position: relative;\n background-color: #ffffff;\n border: 1px solid #d3d3d3;\n border-radius: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n padding: 10px;\n gap: 10px;\n cursor: pointer;\n"])));
19620
+ var TopBar$2 = styled.div(_templateObject3$y || (_templateObject3$y = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n gap: 12px;\n"])));
19621
+ var SearchWrapper$1 = styled(Box)(_templateObject4$r || (_templateObject4$r = _taggedTemplateLiteralLoose(["\n && {\n margin-bottom: 24px;\n max-width: 400px;\n width: 100%;\n }\n"])));
19622
+ var TotalItemsText$1 = styled.div(_templateObject5$m || (_templateObject5$m = _taggedTemplateLiteralLoose(["\n font-size: 14px;\n font-weight: 500;\n color: #4b4b4b;\n margin-bottom: 24px;\n white-space: nowrap;\n"])));
19623
+ var DeleteButton$1 = styled.button(_templateObject6$k || (_templateObject6$k = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 8px;\n right: 8px;\n opacity: 1;\n pointer-events: auto;\n z-index: 2;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n padding: 0;\n border: none;\n border-radius: 50%;\n background-color: #ffffff;\n box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);\n cursor: pointer;\n color: #ff0000;\n"])));
19624
+ var PriceContainer$1 = styled.div(_templateObject7$g || (_templateObject7$g = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n"])));
19625
+ var DiscountPriceRow$1 = styled.div(_templateObject8$e || (_templateObject8$e = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n"])));
19034
19626
  var ProductName$3 = styled.div(_templateObject9$9 || (_templateObject9$9 = _taggedTemplateLiteralLoose(["\n font-size: 16px;\n font-weight: 500;\n color: #000000;\n text-align: center;\n height: 40px;\n overflow: hidden;\n width: 100%;\n text-overflow: ellipsis;\n white-space: pre-wrap;\n"])));
19035
- var ProductActionButton$1 = styled(Button)(_templateObject10$7 || (_templateObject10$7 = _taggedTemplateLiteralLoose(["\n && {\n background-color: ", ";\n color: #ffffff;\n border-radius: 10px;\n font-weight: 500;\n }\n"])), function (_ref) {
19627
+ var ProductActionButton$1 = styled(Button)(_templateObject10$8 || (_templateObject10$8 = _taggedTemplateLiteralLoose(["\n && {\n background-color: ", ";\n color: #ffffff;\n border-radius: 10px;\n font-weight: 500;\n }\n"])), function (_ref) {
19036
19628
  var primaryColor = _ref.primaryColor;
19037
19629
  return primaryColor != null ? primaryColor : '#000000';
19038
19630
  });
@@ -19096,7 +19688,7 @@ var FavoriteItemsContent = function FavoriteItemsContent(_ref) {
19096
19688
  width: '100%',
19097
19689
  height: '100%'
19098
19690
  }
19099
- }, /*#__PURE__*/React__default.createElement(TopBar$1, {
19691
+ }, /*#__PURE__*/React__default.createElement(TopBar$2, {
19100
19692
  style: getStyleOverride$1(styleOverrides, 'topBar', 'TopBar')
19101
19693
  }, /*#__PURE__*/React__default.createElement(SearchWrapper$1, {
19102
19694
  style: getStyleOverride$1(styleOverrides, 'searchWrapper', 'SearchWrapper')
@@ -19377,5 +19969,811 @@ var ProductCard$1 = function ProductCard(_ref4) {
19377
19969
  }, "Out Of stock")));
19378
19970
  };
19379
19971
 
19380
- export { APIStaticPage, AccountDetails, BrandList, BrandStock, Breakpoint, CartDrawer, CartPageComponent, CheckoutPageComponent, ContactUsForm, FavoriteItemsComponent as FavoriteItems, GTagManager, HomeBanner, MaintenancePage, NewArrivalPage, OutOfStock, QuickOrder, RenderTawk, SingleBanner, SnowfallComponent as Snowfall, StaticPage, StaticPageList, SwitchUser, ThankYou, Variant, VendorAccountDetails as VendorAccount, WishlistComponent as Wishlist, useGridSize, useWindowSize };
19972
+ var getFilters = function getFilters(_ref) {
19973
+ var apiEndPoint = _ref.apiEndPoint,
19974
+ token = _ref.token,
19975
+ queryParams = _ref.queryParams;
19976
+ try {
19977
+ return Promise.resolve(API({
19978
+ apiEndPoint: apiEndPoint,
19979
+ token: token,
19980
+ method: 'GET',
19981
+ queryParams: queryParams,
19982
+ url: "/ecommerce/product/filter-data",
19983
+ hideErrorMessage: true
19984
+ }));
19985
+ } catch (e) {
19986
+ return Promise.reject(e);
19987
+ }
19988
+ };
19989
+ var getBrandList = function getBrandList(_ref2) {
19990
+ var apiEndPoint = _ref2.apiEndPoint,
19991
+ token = _ref2.token,
19992
+ businessTypeId = _ref2.businessTypeId;
19993
+ try {
19994
+ return Promise.resolve(API({
19995
+ apiEndPoint: apiEndPoint,
19996
+ token: token,
19997
+ method: 'GET',
19998
+ queryParams: _extends({
19999
+ size: 999
20000
+ }, businessTypeId != null && {
20001
+ businessTypeId: businessTypeId
20002
+ }),
20003
+ url: "/ecommerce/brand/list",
20004
+ hideErrorMessage: true
20005
+ })).then(function (data) {
20006
+ return (data === null || data === void 0 ? void 0 : data.content) || [];
20007
+ });
20008
+ } catch (e) {
20009
+ return Promise.reject(e);
20010
+ }
20011
+ };
20012
+
20013
+ var _templateObject$_, _templateObject2$J, _templateObject3$z, _templateObject4$s, _templateObject5$n, _templateObject6$l, _templateObject7$h, _templateObject8$f, _templateObject9$a, _templateObject10$9, _templateObject11$7, _templateObject12$4, _templateObject13$4, _templateObject14$4, _templateObject15$4, _templateObject16$4, _templateObject17$4, _templateObject18$4, _templateObject19$3, _templateObject20$2, _templateObject21$2, _templateObject22$2, _templateObject23$2, _templateObject24$2, _templateObject25$2, _templateObject26$2, _templateObject27$2;
20014
+ var DEFAULT_PRIMARY$1 = '#424242';
20015
+ var primary = function primary(p) {
20016
+ var _p$theme;
20017
+ return (p === null || p === void 0 ? void 0 : (_p$theme = p.theme) === null || _p$theme === void 0 ? void 0 : _p$theme.dfPrimary) || DEFAULT_PRIMARY$1;
20018
+ };
20019
+ var tint = function tint(color, amount) {
20020
+ try {
20021
+ return alpha$1(color, amount);
20022
+ } catch (e) {
20023
+ return "color-mix(in srgb, " + color + " " + Math.round(amount * 100) + "%, transparent)";
20024
+ }
20025
+ };
20026
+ var primaryTint = function primaryTint(amount) {
20027
+ return function (p) {
20028
+ return tint(primary(p), amount);
20029
+ };
20030
+ };
20031
+ var TEXT = '#1f2329';
20032
+ var MUTED = '#6b7280';
20033
+ var BORDER = '#e8eaee';
20034
+ var FiltersWrapper = styled.div(_templateObject$_ || (_templateObject$_ = _taggedTemplateLiteralLoose(["\n position: relative;\n width: 100%;\n box-sizing: border-box;\n background: #fff;\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: 0 4px 18px rgba(17, 24, 39, 0.05);\n font-size: 14px;\n color: ", ";\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n /* Inside the mobile dialog the dialog itself is the card. */\n ", "\n"])), BORDER, TEXT, function (p) {
20035
+ return p.inDialog && css(_templateObject2$J || (_templateObject2$J = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n min-height: 100%;\n border: none;\n border-radius: 0;\n box-shadow: none;\n ", " {\n flex: 1;\n }\n ", " {\n position: sticky;\n top: 0;\n z-index: 1;\n background: #fff;\n }\n ", " {\n border-radius: 0;\n padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));\n }\n ", " {\n border-radius: 0;\n }\n "])), SectionsArea, PanelHeader, ActionBar, LoadingOverlay);
20036
+ });
20037
+ var HeaderActions = styled.div(_templateObject3$z || (_templateObject3$z = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 4px;\n"])));
20038
+ var CloseButton$1 = styled.button(_templateObject4$s || (_templateObject4$s = _taggedTemplateLiteralLoose(["\n all: unset;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 32px;\n height: 32px;\n border-radius: 50%;\n cursor: pointer;\n color: ", ";\n &:hover {\n background: ", ";\n color: ", ";\n }\n &:focus-visible {\n outline: 2px solid ", ";\n }\n"])), MUTED, primaryTint(0.08), primary, primaryTint(0.4));
20039
+ var MobileFilterButton = styled.button(_templateObject5$n || (_templateObject5$n = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n gap: 8px;\n height: 40px;\n padding: 0 16px;\n border: 1.5px solid\n ", ";\n border-radius: 20px;\n background: ", ";\n color: ", ";\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.15s ease, border-color 0.15s ease;\n &:hover {\n background: ", ";\n border-color: ", ";\n }\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 3px ", ";\n }\n"])), function (p) {
20040
+ return p.active ? primary(p) : primaryTint(0.35)(p);
20041
+ }, function (p) {
20042
+ return p.active ? primaryTint(0.06)(p) : '#fff';
20043
+ }, primary, primaryTint(0.08), primary, primaryTint(0.3));
20044
+ var PanelHeader = styled.div(_templateObject6$l || (_templateObject6$l = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 16px 18px;\n border-bottom: 1px solid ", ";\n"])), BORDER);
20045
+ var PanelTitle = styled.div(_templateObject7$h || (_templateObject7$h = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 16px;\n font-weight: 700;\n color: ", ";\n svg {\n color: ", ";\n }\n"])), TEXT, primary);
20046
+ var CountBadge = styled.span(_templateObject8$f || (_templateObject8$f = _taggedTemplateLiteralLoose(["\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 20px;\n height: 20px;\n padding: 0 6px;\n border-radius: 10px;\n font-size: 11px;\n font-weight: 700;\n line-height: 1;\n ", "\n"])), function (p) {
20047
+ return p.soft ? css(_templateObject9$a || (_templateObject9$a = _taggedTemplateLiteralLoose(["\n background: ", ";\n color: ", ";\n "])), primaryTint(0.12), primary) : css(_templateObject10$9 || (_templateObject10$9 = _taggedTemplateLiteralLoose(["\n background: ", ";\n color: #fff;\n "])), primary);
20048
+ });
20049
+ var ClearAllButton = styled.button(_templateObject11$7 || (_templateObject11$7 = _taggedTemplateLiteralLoose(["\n all: unset;\n cursor: pointer;\n font-size: 13px;\n font-weight: 600;\n color: ", ";\n padding: 4px 6px;\n border-radius: 6px;\n &:hover {\n background: ", ";\n }\n &:focus-visible {\n outline: 2px solid ", ";\n }\n"])), primary, primaryTint(0.08), primaryTint(0.4));
20050
+ var SectionsArea = styled.div(_templateObject12$4 || (_templateObject12$4 = _taggedTemplateLiteralLoose(["\n padding: 0 18px;\n"])));
20051
+ var Section = styled.div(_templateObject13$4 || (_templateObject13$4 = _taggedTemplateLiteralLoose(["\n padding: 14px 0;\n border-bottom: 1px solid ", ";\n &:last-child {\n border-bottom: none;\n }\n"])), BORDER);
20052
+ var SectionHeader$1 = styled.button(_templateObject14$4 || (_templateObject14$4 = _taggedTemplateLiteralLoose(["\n all: unset;\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n cursor: pointer;\n font-size: 12.5px;\n font-weight: 700;\n letter-spacing: 0.6px;\n text-transform: uppercase;\n color: ", ";\n .title {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n .chevron {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n color: ", ";\n transition: background 0.15s ease, color 0.15s ease;\n svg {\n transition: transform 0.2s ease;\n transform: rotate(", ");\n }\n }\n &:hover .chevron {\n background: ", ";\n color: ", ";\n }\n &:focus-visible {\n outline: 2px solid ", ";\n outline-offset: 4px;\n border-radius: 4px;\n }\n"])), TEXT, MUTED, function (p) {
20053
+ return p.open ? '0deg' : '180deg';
20054
+ }, primaryTint(0.08), primary, primaryTint(0.4));
20055
+ var SectionBody = styled.div(_templateObject15$4 || (_templateObject15$4 = _taggedTemplateLiteralLoose(["\n margin-top: 12px;\n"])));
20056
+ var SearchBox = styled.div(_templateObject16$4 || (_templateObject16$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 8px;\n height: 36px;\n padding: 0 12px;\n margin-bottom: 10px;\n border: 1px solid ", ";\n border-radius: 18px;\n background: #f7f8fa;\n color: #9aa1ab;\n transition: border-color 0.15s ease, box-shadow 0.15s ease,\n background 0.15s ease;\n &:focus-within {\n background: #fff;\n border-color: ", ";\n box-shadow: 0 0 0 3px ", ";\n color: ", ";\n }\n input {\n flex: 1;\n min-width: 0;\n border: none;\n outline: none;\n background: transparent;\n font-size: 13.5px;\n color: ", ";\n &::placeholder {\n color: #9aa1ab;\n }\n }\n"])), BORDER, primary, primaryTint(0.12), primary, TEXT);
20057
+ var OptionList = styled.div(_templateObject17$4 || (_templateObject17$4 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: 252px;\n overflow-y: auto;\n margin: 0 -8px;\n padding: 0 2px;\n scrollbar-width: thin;\n scrollbar-color: #d5d9df transparent;\n &::-webkit-scrollbar {\n width: 6px;\n }\n &::-webkit-scrollbar-thumb {\n background: #d5d9df;\n border-radius: 3px;\n }\n"])));
20058
+ var OptionRow = styled.label(_templateObject18$4 || (_templateObject18$4 = _taggedTemplateLiteralLoose(["\n position: relative;\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 7px 8px;\n border-radius: 8px;\n cursor: pointer;\n user-select: none;\n color: ", ";\n font-weight: ", ";\n background: ", ";\n transition: background 0.15s ease;\n &:hover {\n background: ", ";\n }\n\n /* Native input kept for accessibility, visually hidden. */\n input {\n position: absolute;\n opacity: 0;\n width: 1px;\n height: 1px;\n margin: 0;\n pointer-events: none;\n }\n input:focus-visible + .control {\n box-shadow: 0 0 0 3px ", ";\n }\n\n .control {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 18px;\n height: 18px;\n border: 1.5px solid ", ";\n border-radius: ", ";\n background: ", ";\n color: #fff;\n transition: all 0.15s ease;\n }\n &:hover .control {\n border-color: ", ";\n }\n .dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: ", ";\n }\n\n .label {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n }\n"])), function (p) {
20059
+ return p.checked ? TEXT : '#3f4650';
20060
+ }, function (p) {
20061
+ return p.checked ? 600 : 400;
20062
+ }, function (p) {
20063
+ return p.checked ? primaryTint(0.06)(p) : 'transparent';
20064
+ }, primaryTint(0.08), primaryTint(0.25), function (p) {
20065
+ return p.checked ? primary(p) : '#c5cbd3';
20066
+ }, function (p) {
20067
+ return p.radio ? '50%' : '5px';
20068
+ }, function (p) {
20069
+ return p.checked && !p.radio ? primary(p) : '#fff';
20070
+ }, primary, primary);
20071
+ var EmptyText = styled.div(_templateObject19$3 || (_templateObject19$3 = _taggedTemplateLiteralLoose(["\n padding: 6px 8px;\n color: #9aa1ab;\n font-size: 13px;\n"])));
20072
+ var SliderWrapper = styled.div(_templateObject20$2 || (_templateObject20$2 = _taggedTemplateLiteralLoose(["\n padding: 4px 10px 0;\n"])));
20073
+ var PriceRow = styled.div(_templateObject21$2 || (_templateObject21$2 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n gap: 10px;\n margin-top: 4px;\n .dash {\n color: #9aa1ab;\n }\n"])));
20074
+ var PriceBox = styled.div(_templateObject22$2 || (_templateObject22$2 = _taggedTemplateLiteralLoose(["\n flex: 1;\n padding: 7px 10px;\n border: 1px solid ", ";\n border-radius: 8px;\n background: #f7f8fa;\n .caption {\n display: block;\n font-size: 11px;\n color: ", ";\n margin-bottom: 2px;\n }\n .amount {\n font-size: 14px;\n font-weight: 600;\n color: ", ";\n }\n"])), BORDER, MUTED, TEXT);
20075
+ var ActionBar = styled.div(_templateObject23$2 || (_templateObject23$2 = _taggedTemplateLiteralLoose(["\n position: sticky;\n bottom: 0;\n z-index: 1;\n display: flex;\n gap: 10px;\n padding: 14px 18px;\n background: #fff;\n border-top: 1px solid ", ";\n border-radius: 0 0 14px 14px;\n"])), BORDER);
20076
+ var BaseButton = styled.button(_templateObject24$2 || (_templateObject24$2 = _taggedTemplateLiteralLoose(["\n flex: 1;\n height: 42px;\n padding: 0 16px;\n border-radius: 10px;\n font-size: 14px;\n font-weight: 600;\n cursor: pointer;\n transition: background 0.15s ease, box-shadow 0.15s ease,\n transform 0.05s ease;\n &:active:not(:disabled) {\n transform: translateY(1px);\n }\n &:disabled {\n opacity: 0.55;\n cursor: not-allowed;\n }\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 3px ", ";\n }\n"])), primaryTint(0.3));
20077
+ var ResetButton = styled(BaseButton)(_templateObject25$2 || (_templateObject25$2 = _taggedTemplateLiteralLoose(["\n background: #fff;\n color: ", ";\n border: 1.5px solid ", ";\n &:hover:not(:disabled) {\n background: ", ";\n border-color: ", ";\n }\n"])), primary, primaryTint(0.35), primaryTint(0.06), primary);
20078
+ var ApplyButton = styled(BaseButton)(_templateObject26$2 || (_templateObject26$2 = _taggedTemplateLiteralLoose(["\n background: ", ";\n color: #fff;\n border: 1.5px solid ", ";\n box-shadow: 0 4px 12px ", ";\n &:hover:not(:disabled) {\n box-shadow: 0 6px 16px ", ";\n }\n"])), primary, primary, primaryTint(0.25), primaryTint(0.35));
20079
+ var LoadingOverlay = styled.div(_templateObject27$2 || (_templateObject27$2 = _taggedTemplateLiteralLoose(["\n position: absolute;\n inset: 0;\n z-index: 2;\n display: flex;\n justify-content: center;\n padding-top: 90px;\n border-radius: 14px;\n background: rgba(255, 255, 255, 0.55);\n backdrop-filter: blur(1px);\n opacity: ", ";\n pointer-events: ", ";\n transition: opacity 0.2s ease;\n"])), function (p) {
20080
+ return p.visible ? 1 : 0;
20081
+ }, function (p) {
20082
+ return p.visible ? 'auto' : 'none';
20083
+ });
20084
+
20085
+ var _excluded$a = ["inStock"];
20086
+ var STOCK_OPTIONS = [{
20087
+ id: 'true',
20088
+ name: 'In Stock'
20089
+ }, {
20090
+ id: 'false',
20091
+ name: 'Out of Stock'
20092
+ }];
20093
+ var toSubmitPayload = function toSubmitPayload(_temp) {
20094
+ var _ref = _temp === void 0 ? {} : _temp,
20095
+ inStock = _ref.inStock,
20096
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded$a);
20097
+ var payload = {};
20098
+ Object.entries(rest || {}).forEach(function (_ref2) {
20099
+ var key = _ref2[0],
20100
+ value = _ref2[1];
20101
+ if (value !== '' && value != null) payload[key] = value;
20102
+ });
20103
+ if (inStock !== '') payload.inStock = inStock === 'true';
20104
+ return payload;
20105
+ };
20106
+ var INITIAL_FILTER_STATE = {
20107
+ inStock: '',
20108
+ brandIdList: '',
20109
+ tagIds: '',
20110
+ variantLabelId: '',
20111
+ variantValueIds: '',
20112
+ minPrice: '',
20113
+ maxPrice: ''
20114
+ };
20115
+ var toFilterState = function toFilterState(initialFilters) {
20116
+ var _toList;
20117
+ var state = _extends({}, INITIAL_FILTER_STATE);
20118
+ if (!initialFilters) return state;
20119
+ var asList = function asList(value) {
20120
+ return Array.isArray(value) ? value.join(',') : value != null ? String(value) : '';
20121
+ };
20122
+ var asNumber = function asNumber(value) {
20123
+ var num = Number(value);
20124
+ return value === '' || value == null || !Number.isFinite(num) ? '' : num;
20125
+ };
20126
+ ['brandIdList', 'tagIds', 'variantValueIds'].forEach(function (key) {
20127
+ state[key] = asList(initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters[key]);
20128
+ });
20129
+ state.variantLabelId = ((_toList = toList(asList(initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.variantLabelId))) === null || _toList === void 0 ? void 0 : _toList[0]) || '';
20130
+ state.minPrice = asNumber(initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.minPrice);
20131
+ state.maxPrice = asNumber(initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.maxPrice);
20132
+ var inStock = initialFilters === null || initialFilters === void 0 ? void 0 : initialFilters.inStock;
20133
+ if (inStock === true || inStock === 'true') state.inStock = 'true';
20134
+ if (inStock === false || inStock === 'false') state.inStock = 'false';
20135
+ return state;
20136
+ };
20137
+ var SINGLE_SELECT_KEYS = ['variantLabelId', 'inStock'];
20138
+ var toList = function toList(value) {
20139
+ return value ? String(value).split(',').filter(Boolean) : [];
20140
+ };
20141
+ var toggleInList = function toggleInList(value, id) {
20142
+ if (value === void 0) {
20143
+ value = '';
20144
+ }
20145
+ var list = toList(value);
20146
+ var key = String(id);
20147
+ var next = list.includes(key) ? list.filter(function (item) {
20148
+ return item !== key;
20149
+ }) : [].concat(list, [key]);
20150
+ return next.join(',');
20151
+ };
20152
+ var countActiveFilters = function countActiveFilters(state) {
20153
+ var _state$minPrice, _state$maxPrice;
20154
+ return (state !== null && state !== void 0 && state.inStock ? 1 : 0) + toList(state === null || state === void 0 ? void 0 : state.brandIdList).length + toList(state === null || state === void 0 ? void 0 : state.tagIds).length + toList(state === null || state === void 0 ? void 0 : state.variantValueIds).length + (((_state$minPrice = state === null || state === void 0 ? void 0 : state.minPrice) != null ? _state$minPrice : '') !== '' || ((_state$maxPrice = state === null || state === void 0 ? void 0 : state.maxPrice) != null ? _state$maxPrice : '') !== '' ? 1 : 0);
20155
+ };
20156
+ var asArray = function asArray(value) {
20157
+ return Array.isArray(value) ? value.filter(Boolean) : [];
20158
+ };
20159
+ var ChevronIcon = function ChevronIcon() {
20160
+ return /*#__PURE__*/React__default.createElement("svg", {
20161
+ width: "14",
20162
+ height: "14",
20163
+ viewBox: "0 0 24 24",
20164
+ fill: "none"
20165
+ }, /*#__PURE__*/React__default.createElement("path", {
20166
+ d: "M6 15l6-6 6 6",
20167
+ stroke: "currentColor",
20168
+ strokeWidth: "2.2",
20169
+ strokeLinecap: "round",
20170
+ strokeLinejoin: "round"
20171
+ }));
20172
+ };
20173
+ var SearchIcon = function SearchIcon() {
20174
+ return /*#__PURE__*/React__default.createElement("svg", {
20175
+ width: "15",
20176
+ height: "15",
20177
+ viewBox: "0 0 24 24",
20178
+ fill: "none"
20179
+ }, /*#__PURE__*/React__default.createElement("circle", {
20180
+ cx: "11",
20181
+ cy: "11",
20182
+ r: "7",
20183
+ stroke: "currentColor",
20184
+ strokeWidth: "2"
20185
+ }), /*#__PURE__*/React__default.createElement("path", {
20186
+ d: "M20 20l-3.5-3.5",
20187
+ stroke: "currentColor",
20188
+ strokeWidth: "2",
20189
+ strokeLinecap: "round"
20190
+ }));
20191
+ };
20192
+ var FilterIcon = function FilterIcon() {
20193
+ return /*#__PURE__*/React__default.createElement("svg", {
20194
+ width: "18",
20195
+ height: "18",
20196
+ viewBox: "0 0 24 24",
20197
+ fill: "none"
20198
+ }, /*#__PURE__*/React__default.createElement("path", {
20199
+ d: "M4 6h16M7 12h10M10 18h4",
20200
+ stroke: "currentColor",
20201
+ strokeWidth: "2.2",
20202
+ strokeLinecap: "round"
20203
+ }));
20204
+ };
20205
+ var CloseIcon = function CloseIcon() {
20206
+ return /*#__PURE__*/React__default.createElement("svg", {
20207
+ width: "18",
20208
+ height: "18",
20209
+ viewBox: "0 0 24 24",
20210
+ fill: "none"
20211
+ }, /*#__PURE__*/React__default.createElement("path", {
20212
+ d: "M6 6l12 12M18 6L6 18",
20213
+ stroke: "currentColor",
20214
+ strokeWidth: "2.2",
20215
+ strokeLinecap: "round"
20216
+ }));
20217
+ };
20218
+ var CheckIcon = function CheckIcon() {
20219
+ return /*#__PURE__*/React__default.createElement("svg", {
20220
+ width: "12",
20221
+ height: "12",
20222
+ viewBox: "0 0 24 24",
20223
+ fill: "none"
20224
+ }, /*#__PURE__*/React__default.createElement("path", {
20225
+ d: "M5 12.5l4.5 4.5L19 7.5",
20226
+ stroke: "currentColor",
20227
+ strokeWidth: "3",
20228
+ strokeLinecap: "round",
20229
+ strokeLinejoin: "round"
20230
+ }));
20231
+ };
20232
+ var FilterSection = function FilterSection(_ref3) {
20233
+ var title = _ref3.title,
20234
+ count = _ref3.count,
20235
+ children = _ref3.children,
20236
+ _ref3$defaultOpen = _ref3.defaultOpen,
20237
+ defaultOpen = _ref3$defaultOpen === void 0 ? true : _ref3$defaultOpen;
20238
+ var _useState = useState(defaultOpen),
20239
+ open = _useState[0],
20240
+ setOpen = _useState[1];
20241
+ return /*#__PURE__*/React__default.createElement(Section, null, /*#__PURE__*/React__default.createElement(SectionHeader$1, {
20242
+ type: "button",
20243
+ open: open,
20244
+ onClick: function onClick() {
20245
+ return setOpen(function (prev) {
20246
+ return !prev;
20247
+ });
20248
+ },
20249
+ "aria-expanded": open
20250
+ }, /*#__PURE__*/React__default.createElement("span", {
20251
+ className: "title"
20252
+ }, title), count > 0 && /*#__PURE__*/React__default.createElement(CountBadge, {
20253
+ soft: true
20254
+ }, count), /*#__PURE__*/React__default.createElement("span", {
20255
+ className: "chevron"
20256
+ }, /*#__PURE__*/React__default.createElement(ChevronIcon, null))), open && /*#__PURE__*/React__default.createElement(SectionBody, null, children));
20257
+ };
20258
+ var SearchInput = function SearchInput(_ref4) {
20259
+ var value = _ref4.value,
20260
+ _onChange = _ref4.onChange,
20261
+ placeholder = _ref4.placeholder;
20262
+ return /*#__PURE__*/React__default.createElement(SearchBox, null, /*#__PURE__*/React__default.createElement(SearchIcon, null), /*#__PURE__*/React__default.createElement("input", {
20263
+ type: "text",
20264
+ placeholder: placeholder || 'Search',
20265
+ value: value,
20266
+ onChange: function onChange(e) {
20267
+ var _e$target$value, _e$target;
20268
+ return _onChange === null || _onChange === void 0 ? void 0 : _onChange((_e$target$value = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value) != null ? _e$target$value : '');
20269
+ }
20270
+ }));
20271
+ };
20272
+ var filterByName = function filterByName(items, search) {
20273
+ return search ? items.filter(function (item) {
20274
+ var _item$name;
20275
+ return String((_item$name = item === null || item === void 0 ? void 0 : item.name) != null ? _item$name : '').toLowerCase().includes(String(search).toLowerCase());
20276
+ }) : items;
20277
+ };
20278
+ var OptionFilter = function OptionFilter(_ref5) {
20279
+ var title = _ref5.title,
20280
+ rawItems = _ref5.items,
20281
+ selected = _ref5.selected,
20282
+ onToggle = _ref5.onToggle,
20283
+ searchable = _ref5.searchable,
20284
+ single = _ref5.single;
20285
+ var _useState2 = useState(''),
20286
+ search = _useState2[0],
20287
+ setSearch = _useState2[1];
20288
+ var items = asArray(rawItems).filter(function (item) {
20289
+ return (item === null || item === void 0 ? void 0 : item.id) != null;
20290
+ });
20291
+ if (!items.length) return null;
20292
+ var selectedList = toList(selected);
20293
+ var visibleItems = filterByName(items, search);
20294
+ var showSearch = searchable && items.length > 6;
20295
+ return /*#__PURE__*/React__default.createElement(FilterSection, {
20296
+ title: title,
20297
+ count: selectedList.length
20298
+ }, showSearch && /*#__PURE__*/React__default.createElement(SearchInput, {
20299
+ value: search,
20300
+ onChange: setSearch,
20301
+ placeholder: "Search " + String(title != null ? title : '').toLowerCase()
20302
+ }), /*#__PURE__*/React__default.createElement(OptionList, {
20303
+ role: single ? 'radiogroup' : 'group'
20304
+ }, visibleItems.map(function (item) {
20305
+ var _item$name2, _item$name3;
20306
+ var checked = selectedList.includes(String(item === null || item === void 0 ? void 0 : item.id));
20307
+ return /*#__PURE__*/React__default.createElement(OptionRow, {
20308
+ key: item === null || item === void 0 ? void 0 : item.id,
20309
+ checked: checked,
20310
+ radio: single
20311
+ }, /*#__PURE__*/React__default.createElement("input", {
20312
+ type: "checkbox",
20313
+ role: single ? 'radio' : undefined,
20314
+ checked: checked,
20315
+ onChange: function onChange() {
20316
+ return onToggle === null || onToggle === void 0 ? void 0 : onToggle(item === null || item === void 0 ? void 0 : item.id);
20317
+ }
20318
+ }), /*#__PURE__*/React__default.createElement("span", {
20319
+ className: "control",
20320
+ "aria-hidden": "true"
20321
+ }, checked && (single ? /*#__PURE__*/React__default.createElement("span", {
20322
+ className: "dot"
20323
+ }) : /*#__PURE__*/React__default.createElement(CheckIcon, null))), /*#__PURE__*/React__default.createElement("span", {
20324
+ className: "label",
20325
+ title: (_item$name2 = item === null || item === void 0 ? void 0 : item.name) != null ? _item$name2 : ''
20326
+ }, (_item$name3 = item === null || item === void 0 ? void 0 : item.name) != null ? _item$name3 : ''));
20327
+ }), !visibleItems.length && /*#__PURE__*/React__default.createElement(EmptyText, null, "No results found")));
20328
+ };
20329
+ var formatPrice$1 = function formatPrice(value) {
20330
+ return "$" + Number(value || 0).toLocaleString(undefined, {
20331
+ maximumFractionDigits: 2
20332
+ });
20333
+ };
20334
+ var PriceFilter = function PriceFilter(_ref6) {
20335
+ var min = _ref6.min,
20336
+ max = _ref6.max,
20337
+ selectedMin = _ref6.selectedMin,
20338
+ selectedMax = _ref6.selectedMax,
20339
+ onCommit = _ref6.onCommit,
20340
+ primaryColor = _ref6.primaryColor;
20341
+ var _useState3 = useState([selectedMin === '' ? min : selectedMin, selectedMax === '' ? max : selectedMax]),
20342
+ range = _useState3[0],
20343
+ setRange = _useState3[1];
20344
+ var hasRange = Number.isFinite(min) && Number.isFinite(max) && max > min;
20345
+ if (!hasRange) return null;
20346
+ var isSet = selectedMin !== '' || selectedMax !== '';
20347
+ return /*#__PURE__*/React__default.createElement(FilterSection, {
20348
+ title: "Price",
20349
+ count: isSet ? 1 : 0
20350
+ }, /*#__PURE__*/React__default.createElement(SliderWrapper, null, /*#__PURE__*/React__default.createElement(Slider$1, {
20351
+ value: range,
20352
+ min: min,
20353
+ max: max,
20354
+ step: max - min > 1000 ? 10 : 1,
20355
+ onChange: function onChange(_, value) {
20356
+ return setRange(value);
20357
+ },
20358
+ onChangeCommitted: function onChangeCommitted(_, value) {
20359
+ return onCommit === null || onCommit === void 0 ? void 0 : onCommit(value);
20360
+ },
20361
+ valueLabelDisplay: "auto",
20362
+ valueLabelFormat: formatPrice$1,
20363
+ disableSwap: true,
20364
+ getAriaLabel: function getAriaLabel(index) {
20365
+ return index === 0 ? 'Minimum price' : 'Maximum price';
20366
+ },
20367
+ sx: {
20368
+ color: primaryColor,
20369
+ height: 4,
20370
+ '& .MuiSlider-rail': {
20371
+ backgroundColor: '#e5e7eb',
20372
+ opacity: 1
20373
+ },
20374
+ '& .MuiSlider-track': {
20375
+ border: 'none'
20376
+ },
20377
+ '& .MuiSlider-thumb': {
20378
+ width: 18,
20379
+ height: 18,
20380
+ backgroundColor: '#fff',
20381
+ border: "2px solid " + primaryColor,
20382
+ '&:hover, &.Mui-focusVisible, &.Mui-active': {
20383
+ boxShadow: "0 0 0 6px " + tint(primaryColor, 0.16)
20384
+ }
20385
+ },
20386
+ '& .MuiSlider-valueLabel': {
20387
+ backgroundColor: primaryColor,
20388
+ borderRadius: '6px',
20389
+ fontSize: 12,
20390
+ fontWeight: 600
20391
+ }
20392
+ }
20393
+ })), /*#__PURE__*/React__default.createElement(PriceRow, null, /*#__PURE__*/React__default.createElement(PriceBox, null, /*#__PURE__*/React__default.createElement("span", {
20394
+ className: "caption"
20395
+ }, "Min"), /*#__PURE__*/React__default.createElement("span", {
20396
+ className: "amount"
20397
+ }, formatPrice$1(range === null || range === void 0 ? void 0 : range[0]))), /*#__PURE__*/React__default.createElement("span", {
20398
+ className: "dash"
20399
+ }, "\u2013"), /*#__PURE__*/React__default.createElement(PriceBox, null, /*#__PURE__*/React__default.createElement("span", {
20400
+ className: "caption"
20401
+ }, "Max"), /*#__PURE__*/React__default.createElement("span", {
20402
+ className: "amount"
20403
+ }, formatPrice$1(range === null || range === void 0 ? void 0 : range[1])))));
20404
+ };
20405
+ var normalizeVariantValues = function normalizeVariantValues(variantValues) {
20406
+ return asArray(variantValues).map(function (item) {
20407
+ var _ref7, _item$value, _item$labelId;
20408
+ return {
20409
+ id: item === null || item === void 0 ? void 0 : item.id,
20410
+ name: String((_ref7 = (_item$value = item === null || item === void 0 ? void 0 : item.value) != null ? _item$value : item === null || item === void 0 ? void 0 : item.name) != null ? _ref7 : '').trim(),
20411
+ variantLabelId: (_item$labelId = item === null || item === void 0 ? void 0 : item.labelId) != null ? _item$labelId : item === null || item === void 0 ? void 0 : item.variantLabelId
20412
+ };
20413
+ });
20414
+ };
20415
+ var groupVariantValues = function groupVariantValues(variantLabels, rawVariantValues) {
20416
+ var variantValues = normalizeVariantValues(rawVariantValues);
20417
+ var groups = asArray(variantLabels).map(function (label) {
20418
+ return {
20419
+ id: label === null || label === void 0 ? void 0 : label.id,
20420
+ name: label === null || label === void 0 ? void 0 : label.name,
20421
+ values: variantValues.filter(function (value) {
20422
+ return String(value === null || value === void 0 ? void 0 : value.variantLabelId) === String(label === null || label === void 0 ? void 0 : label.id);
20423
+ })
20424
+ };
20425
+ }).filter(function (group) {
20426
+ var _group$values;
20427
+ return group === null || group === void 0 ? void 0 : (_group$values = group.values) === null || _group$values === void 0 ? void 0 : _group$values.length;
20428
+ });
20429
+ var groupedIds = new Set(groups.flatMap(function (group) {
20430
+ return ((group === null || group === void 0 ? void 0 : group.values) || []).map(function (value) {
20431
+ return String(value === null || value === void 0 ? void 0 : value.id);
20432
+ });
20433
+ }));
20434
+ var ungrouped = variantValues.filter(function (value) {
20435
+ return !groupedIds.has(String(value === null || value === void 0 ? void 0 : value.id));
20436
+ });
20437
+ if (ungrouped.length) {
20438
+ groups.push({
20439
+ id: 'ungrouped',
20440
+ name: 'Variant Values',
20441
+ values: ungrouped
20442
+ });
20443
+ }
20444
+ return groups;
20445
+ };
20446
+ var FiltersContent = function FiltersContent(_ref8) {
20447
+ var _filterState$minPrice, _filterState$maxPrice;
20448
+ var data = _ref8.data,
20449
+ _ref8$brands = _ref8.brands,
20450
+ brands = _ref8$brands === void 0 ? [] : _ref8$brands,
20451
+ filterState = _ref8.filterState,
20452
+ primaryColor = _ref8.primaryColor,
20453
+ toggleFilter = _ref8.toggleFilter,
20454
+ updatePrice = _ref8.updatePrice,
20455
+ loading = _ref8.loading,
20456
+ resetCount = _ref8.resetCount,
20457
+ onApply = _ref8.onApply,
20458
+ onReset = _ref8.onReset,
20459
+ inDialog = _ref8.inDialog,
20460
+ onClose = _ref8.onClose;
20461
+ var productTags = asArray(data === null || data === void 0 ? void 0 : data.productTags);
20462
+ var variantLabels = asArray(data === null || data === void 0 ? void 0 : data.variantLabels);
20463
+ var minPrice = data === null || data === void 0 ? void 0 : data.minPrice;
20464
+ var maxPrice = data === null || data === void 0 ? void 0 : data.maxPrice;
20465
+ var variantGroups = groupVariantValues(variantLabels, data === null || data === void 0 ? void 0 : data.variantValues);
20466
+ var activeCount = countActiveFilters(filterState);
20467
+ return /*#__PURE__*/React__default.createElement(FiltersWrapper, {
20468
+ "aria-busy": loading,
20469
+ inDialog: inDialog
20470
+ }, /*#__PURE__*/React__default.createElement(LoadingOverlay, {
20471
+ visible: loading
20472
+ }, loading && /*#__PURE__*/React__default.createElement(CircularProgress, {
20473
+ size: 28,
20474
+ sx: {
20475
+ color: primaryColor
20476
+ }
20477
+ })), /*#__PURE__*/React__default.createElement(PanelHeader, null, /*#__PURE__*/React__default.createElement(PanelTitle, {
20478
+ id: inDialog ? 'dynamic-filters-title' : undefined
20479
+ }, /*#__PURE__*/React__default.createElement(FilterIcon, null), "Filters", activeCount > 0 && /*#__PURE__*/React__default.createElement(CountBadge, null, activeCount)), /*#__PURE__*/React__default.createElement(HeaderActions, null, activeCount > 0 && /*#__PURE__*/React__default.createElement(ClearAllButton, {
20480
+ type: "button",
20481
+ onClick: onReset,
20482
+ disabled: loading
20483
+ }, "Clear all"), inDialog && /*#__PURE__*/React__default.createElement(CloseButton$1, {
20484
+ type: "button",
20485
+ onClick: function onClick() {
20486
+ return onClose === null || onClose === void 0 ? void 0 : onClose();
20487
+ },
20488
+ "aria-label": "Close filters"
20489
+ }, /*#__PURE__*/React__default.createElement(CloseIcon, null)))), /*#__PURE__*/React__default.createElement(SectionsArea, null, /*#__PURE__*/React__default.createElement(OptionFilter, {
20490
+ title: "Availability",
20491
+ items: STOCK_OPTIONS,
20492
+ selected: filterState === null || filterState === void 0 ? void 0 : filterState.inStock,
20493
+ onToggle: function onToggle(id) {
20494
+ return toggleFilter('inStock', id);
20495
+ },
20496
+ single: true
20497
+ }), /*#__PURE__*/React__default.createElement(OptionFilter, {
20498
+ title: "Brands",
20499
+ items: brands,
20500
+ selected: filterState === null || filterState === void 0 ? void 0 : filterState.brandIdList,
20501
+ onToggle: function onToggle(id) {
20502
+ return toggleFilter('brandIdList', id);
20503
+ },
20504
+ searchable: true
20505
+ }), /*#__PURE__*/React__default.createElement(OptionFilter, {
20506
+ title: "Product Tags",
20507
+ items: productTags,
20508
+ selected: filterState === null || filterState === void 0 ? void 0 : filterState.tagIds,
20509
+ onToggle: function onToggle(id) {
20510
+ return toggleFilter('tagIds', id);
20511
+ },
20512
+ searchable: true
20513
+ }), /*#__PURE__*/React__default.createElement(OptionFilter, {
20514
+ title: "Variants",
20515
+ items: variantLabels,
20516
+ selected: filterState === null || filterState === void 0 ? void 0 : filterState.variantLabelId,
20517
+ onToggle: function onToggle(id) {
20518
+ return toggleFilter('variantLabelId', id);
20519
+ },
20520
+ searchable: true,
20521
+ single: true
20522
+ }), variantGroups.map(function (group) {
20523
+ return /*#__PURE__*/React__default.createElement(OptionFilter, {
20524
+ key: group === null || group === void 0 ? void 0 : group.id,
20525
+ title: group === null || group === void 0 ? void 0 : group.name,
20526
+ items: group === null || group === void 0 ? void 0 : group.values,
20527
+ selected: filterState === null || filterState === void 0 ? void 0 : filterState.variantValueIds,
20528
+ onToggle: function onToggle(id) {
20529
+ return toggleFilter('variantValueIds', id);
20530
+ },
20531
+ searchable: true
20532
+ });
20533
+ }), /*#__PURE__*/React__default.createElement(PriceFilter, {
20534
+ key: minPrice + "-" + maxPrice + "-" + resetCount,
20535
+ min: minPrice,
20536
+ max: maxPrice,
20537
+ selectedMin: (_filterState$minPrice = filterState === null || filterState === void 0 ? void 0 : filterState.minPrice) != null ? _filterState$minPrice : '',
20538
+ selectedMax: (_filterState$maxPrice = filterState === null || filterState === void 0 ? void 0 : filterState.maxPrice) != null ? _filterState$maxPrice : '',
20539
+ onCommit: updatePrice,
20540
+ primaryColor: primaryColor
20541
+ })), /*#__PURE__*/React__default.createElement(ActionBar, null, /*#__PURE__*/React__default.createElement(ResetButton, {
20542
+ type: "button",
20543
+ onClick: onReset,
20544
+ disabled: loading
20545
+ }, "Reset"), /*#__PURE__*/React__default.createElement(ApplyButton, {
20546
+ type: "button",
20547
+ onClick: onApply,
20548
+ disabled: loading
20549
+ }, "Apply", activeCount > 0 ? " (" + activeCount + ")" : '')));
20550
+ };
20551
+ var DynamicFilters = function DynamicFilters(_ref9) {
20552
+ var token = _ref9.token,
20553
+ apiEndPoint = _ref9.apiEndPoint,
20554
+ primaryColor = _ref9.primaryColor,
20555
+ onFilterSubmit = _ref9.onFilterSubmit,
20556
+ brandId = _ref9.brandId,
20557
+ categoryId = _ref9.categoryId,
20558
+ businessTypeId = _ref9.businessTypeId,
20559
+ initialFilters = _ref9.initialFilters,
20560
+ _ref9$mobileBreakpoin = _ref9.mobileBreakpoint,
20561
+ mobileBreakpoint = _ref9$mobileBreakpoin === void 0 ? 1280 : _ref9$mobileBreakpoin;
20562
+ var color = primaryColor || DEFAULT_PRIMARY$1;
20563
+ var breakpoint = Number(mobileBreakpoint) || 1280;
20564
+ var isMobile = useMediaQuery$1("(max-width:" + (breakpoint - 0.02) + "px)", {
20565
+ noSsr: true
20566
+ });
20567
+ var isPhone = useMediaQuery$1('(max-width:599.98px)', {
20568
+ noSsr: true
20569
+ });
20570
+ var _useState4 = useState(false),
20571
+ dialogOpen = _useState4[0],
20572
+ setDialogOpen = _useState4[1];
20573
+ var _useState5 = useState([]),
20574
+ brands = _useState5[0],
20575
+ setBrands = _useState5[1];
20576
+ useEffect(function () {
20577
+ var cancelled = false;
20578
+ (function () {
20579
+ try {
20580
+ var _temp2 = _catch(function () {
20581
+ return Promise.resolve(getBrandList({
20582
+ apiEndPoint: apiEndPoint,
20583
+ token: token,
20584
+ businessTypeId: businessTypeId
20585
+ })).then(function (list) {
20586
+ if (!cancelled) setBrands(asArray(list));
20587
+ });
20588
+ }, function () {
20589
+ if (!cancelled) setBrands([]);
20590
+ });
20591
+ return _temp2 && _temp2.then ? _temp2.then(function () {}) : void 0;
20592
+ } catch (e) {
20593
+ Promise.reject(e);
20594
+ }
20595
+ })();
20596
+ return function () {
20597
+ cancelled = true;
20598
+ };
20599
+ }, [apiEndPoint, token, businessTypeId]);
20600
+ var _useState6 = useState(function () {
20601
+ return toFilterState(initialFilters);
20602
+ }),
20603
+ filterState = _useState6[0],
20604
+ setFilterState = _useState6[1];
20605
+ var _useState7 = useState(function () {
20606
+ return toFilterState(initialFilters);
20607
+ }),
20608
+ appliedState = _useState7[0],
20609
+ setAppliedState = _useState7[1];
20610
+ var _useState8 = useState(null),
20611
+ data = _useState8[0],
20612
+ setData = _useState8[1];
20613
+ var _useState9 = useState('loading'),
20614
+ status = _useState9[0],
20615
+ setStatus = _useState9[1];
20616
+ var _useState10 = useState(0),
20617
+ resetCount = _useState10[0],
20618
+ setResetCount = _useState10[1];
20619
+ var initialFiltersKey = JSON.stringify(toFilterState(initialFilters));
20620
+ var lastInitialKey = useRef(initialFiltersKey);
20621
+ useEffect(function () {
20622
+ if ((lastInitialKey === null || lastInitialKey === void 0 ? void 0 : lastInitialKey.current) === initialFiltersKey) return;
20623
+ lastInitialKey.current = initialFiltersKey;
20624
+ var restored = toFilterState(initialFilters);
20625
+ setFilterState(restored);
20626
+ setAppliedState(restored);
20627
+ setResetCount(function (count) {
20628
+ return count + 1;
20629
+ });
20630
+ }, [initialFiltersKey]);
20631
+ var filterStateRef = useRef(filterState);
20632
+ filterStateRef.current = filterState;
20633
+ var handleApply = function handleApply() {
20634
+ var current = filterState || INITIAL_FILTER_STATE;
20635
+ setAppliedState(current);
20636
+ setDialogOpen(false);
20637
+ onFilterSubmit === null || onFilterSubmit === void 0 ? void 0 : onFilterSubmit(toSubmitPayload(current));
20638
+ };
20639
+ var handleReset = function handleReset() {
20640
+ setFilterState(INITIAL_FILTER_STATE);
20641
+ setAppliedState(INITIAL_FILTER_STATE);
20642
+ setResetCount(function (count) {
20643
+ return count + 1;
20644
+ });
20645
+ setDialogOpen(false);
20646
+ onFilterSubmit === null || onFilterSubmit === void 0 ? void 0 : onFilterSubmit(toSubmitPayload(INITIAL_FILTER_STATE));
20647
+ };
20648
+ var handleDialogDismiss = function handleDialogDismiss() {
20649
+ setDialogOpen(false);
20650
+ var applied = appliedState || INITIAL_FILTER_STATE;
20651
+ if (JSON.stringify(filterState != null ? filterState : {}) !== JSON.stringify(applied)) {
20652
+ setFilterState(applied);
20653
+ setResetCount(function (count) {
20654
+ return count + 1;
20655
+ });
20656
+ }
20657
+ };
20658
+ useEffect(function () {
20659
+ if (!isMobile && dialogOpen) setDialogOpen(false);
20660
+ }, [isMobile, dialogOpen]);
20661
+ var toggleFilter = function toggleFilter(key, id) {
20662
+ var _extends2;
20663
+ if (id == null) return;
20664
+ var isSingle = SINGLE_SELECT_KEYS.includes(key);
20665
+ var nextValue = isSingle ? String(filterState === null || filterState === void 0 ? void 0 : filterState[key]) === String(id) ? '' : String(id) : toggleInList(filterState === null || filterState === void 0 ? void 0 : filterState[key], id);
20666
+ setFilterState(_extends({}, filterState || INITIAL_FILTER_STATE, (_extends2 = {}, _extends2[key] = nextValue, _extends2)));
20667
+ };
20668
+ var updatePrice = function updatePrice(range) {
20669
+ if (!Array.isArray(range)) return;
20670
+ var min = range[0],
20671
+ max = range[1];
20672
+ setFilterState(_extends({}, filterState || INITIAL_FILTER_STATE, {
20673
+ minPrice: min != null ? min : '',
20674
+ maxPrice: max != null ? max : ''
20675
+ }));
20676
+ };
20677
+ var variantLabelId = filterState === null || filterState === void 0 ? void 0 : filterState.variantLabelId;
20678
+ useEffect(function () {
20679
+ var cancelled = false;
20680
+ var queryParams = _extends({}, categoryId != null && {
20681
+ categoryId: categoryId
20682
+ }, brandId != null && {
20683
+ brandId: brandId
20684
+ }, variantLabelId && {
20685
+ variantLabelId: variantLabelId
20686
+ });
20687
+ (function () {
20688
+ try {
20689
+ return _catch(function () {
20690
+ setStatus('loading');
20691
+ return Promise.resolve(getFilters({
20692
+ apiEndPoint: apiEndPoint,
20693
+ token: token,
20694
+ queryParams: queryParams
20695
+ })).then(function (result) {
20696
+ var _current$variantValue;
20697
+ if (cancelled) return;
20698
+ setData(result || {});
20699
+ setStatus('success');
20700
+ var current = filterStateRef.current || INITIAL_FILTER_STATE;
20701
+ var availableIds = new Set(asArray(result === null || result === void 0 ? void 0 : result.variantValues).map(function (value) {
20702
+ return String(value === null || value === void 0 ? void 0 : value.id);
20703
+ }));
20704
+ var keptIds = toList(current === null || current === void 0 ? void 0 : current.variantValueIds).filter(function (id) {
20705
+ return availableIds.has(id);
20706
+ }).join(',');
20707
+ if (keptIds !== ((_current$variantValue = current === null || current === void 0 ? void 0 : current.variantValueIds) != null ? _current$variantValue : '')) {
20708
+ setFilterState(_extends({}, current, {
20709
+ variantValueIds: keptIds
20710
+ }));
20711
+ }
20712
+ });
20713
+ }, function () {
20714
+ if (!cancelled) setStatus('error');
20715
+ });
20716
+ } catch (e) {
20717
+ Promise.reject(e);
20718
+ }
20719
+ })();
20720
+ return function () {
20721
+ cancelled = true;
20722
+ };
20723
+ }, [apiEndPoint, token, categoryId, brandId, variantLabelId]);
20724
+ var renderPanel = function renderPanel(inDialog) {
20725
+ if (!data) {
20726
+ if (status === 'error') return /*#__PURE__*/React__default.createElement(EmptyText, null, "Unable to load filters");
20727
+ return /*#__PURE__*/React__default.createElement(Loader, {
20728
+ skeleton: 300,
20729
+ height: 300
20730
+ });
20731
+ }
20732
+ return /*#__PURE__*/React__default.createElement(FiltersContent, {
20733
+ data: data,
20734
+ brands: brandId != null ? [] : brands,
20735
+ filterState: filterState,
20736
+ primaryColor: color,
20737
+ toggleFilter: toggleFilter,
20738
+ updatePrice: updatePrice,
20739
+ loading: status === 'loading',
20740
+ resetCount: resetCount,
20741
+ onApply: handleApply,
20742
+ onReset: handleReset,
20743
+ inDialog: inDialog,
20744
+ onClose: handleDialogDismiss
20745
+ });
20746
+ };
20747
+ var appliedCount = countActiveFilters(appliedState);
20748
+ return /*#__PURE__*/React__default.createElement(ThemeProvider, {
20749
+ theme: {
20750
+ dfPrimary: color
20751
+ }
20752
+ }, isMobile ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(MobileFilterButton, {
20753
+ type: "button",
20754
+ active: appliedCount > 0,
20755
+ onClick: function onClick() {
20756
+ return setDialogOpen(true);
20757
+ },
20758
+ "aria-haspopup": "dialog",
20759
+ "aria-label": appliedCount > 0 ? "Filters, " + appliedCount + " applied" : 'Filters'
20760
+ }, /*#__PURE__*/React__default.createElement(FilterIcon, null), "Filters", appliedCount > 0 && /*#__PURE__*/React__default.createElement(CountBadge, null, appliedCount)), /*#__PURE__*/React__default.createElement(Dialog, {
20761
+ open: dialogOpen,
20762
+ onClose: handleDialogDismiss,
20763
+ fullScreen: isPhone,
20764
+ fullWidth: true,
20765
+ maxWidth: "xs",
20766
+ scroll: "paper",
20767
+ "aria-labelledby": "dynamic-filters-title",
20768
+ PaperProps: {
20769
+ sx: {
20770
+ borderRadius: isPhone ? 0 : '14px',
20771
+ overflowY: 'auto',
20772
+ maxHeight: isPhone ? '100%' : 'calc(100% - 64px)'
20773
+ }
20774
+ }
20775
+ }, renderPanel(true))) : renderPanel(false));
20776
+ };
20777
+
20778
+ export { APIStaticPage, AccountDetails, BrandList, BrandStock, Breakpoint, CartDrawer, CartPageComponent, CheckoutPageComponent, ContactUsForm, DynamicFilters, FavoriteItemsComponent as FavoriteItems, GTagManager, HomeBanner, MaintenancePage, NewArrivalPage, OutOfStock, QuickOrder, RenderTawk, SingleBanner, SnowfallComponent as Snowfall, StaticPage, StaticPageList, SwitchUser, ThankYou, Variant, VendorAccountDetails as VendorAccount, WishlistComponent as Wishlist, useGridSize, useWindowSize };
19381
20779
  //# sourceMappingURL=index.modern.js.map