@lanaco/lnc-react-ui 4.0.172 → 4.0.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion.cjs +1 -1
- package/dist/Accordion.js +1 -1
- package/dist/AccordionSummary.cjs +1 -1
- package/dist/AccordionSummary.js +1 -1
- package/dist/ActionsToolbar.cjs +1 -1
- package/dist/ActionsToolbar.js +1 -1
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Badge.cjs +1 -1
- package/dist/Badge.js +1 -1
- package/dist/BannerSectionSimple.cjs +1 -1
- package/dist/BannerSectionSimple.js +1 -1
- package/dist/BannerSectionWithList.cjs +1 -1
- package/dist/BannerSectionWithList.js +1 -1
- package/dist/BlogCardsSponsoredSection.cjs +1 -1
- package/dist/BlogCardsSponsoredSection.js +3 -3
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogExploreSection.cjs +1 -1
- package/dist/BlogExploreSection.js +2 -2
- package/dist/BlogListSection.cjs +1 -1
- package/dist/BlogListSection.js +3 -3
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +1 -1
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +1 -1
- package/dist/BlogsSectionDetailed.js +3 -3
- package/dist/BlogsSectionLarge.cjs +1 -1
- package/dist/BlogsSectionLarge.js +1 -1
- package/dist/BlogsSectionSimple.cjs +1 -1
- package/dist/BlogsSectionSimple.js +3 -3
- package/dist/BlogsSectionSimpleCentered.cjs +1 -1
- package/dist/BlogsSectionSimpleCentered.js +2 -2
- package/dist/BlogsSectionWithFilters.cjs +1 -1
- package/dist/BlogsSectionWithFilters.js +4 -4
- package/dist/BrandHitsSection.cjs +1 -1
- package/dist/BrandHitsSection.js +1 -1
- package/dist/Breadcrumbs.cjs +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/Button.cjs +1 -1
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.cjs +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/CalorieCalculatorSection.cjs +1 -1
- package/dist/CalorieCalculatorSection.js +1 -1
- package/dist/{CategorySimpleCard-laAY-RUT.js → CategorySimpleCard-BA0S7TaN.js} +1 -1
- package/dist/{CategorySimpleCard-Qe5QStrs.cjs → CategorySimpleCard-BNYjZQTH.cjs} +1 -1
- package/dist/CheckBoxInput.cjs +1 -1
- package/dist/CheckBoxInput.js +1 -1
- package/dist/Chip.cjs +1 -1
- package/dist/Chip.js +1 -1
- package/dist/ColorInput.cjs +1 -1
- package/dist/ColorInput.js +1 -1
- package/dist/ConfirmationForm.cjs +1 -1
- package/dist/ConfirmationForm.js +1 -1
- package/dist/CustomLoanMapSection.cjs +1 -1
- package/dist/CustomLoanMapSection.js +1 -1
- package/dist/{CustomStyles-ArAVZsIj.js → CustomStyles-6WboE3g5.js} +1 -1
- package/dist/{CustomStyles-Q6et9atl.cjs → CustomStyles-C86XQqBE.cjs} +1 -1
- package/dist/DateInput.cjs +1 -1
- package/dist/DateInput.js +1 -1
- package/dist/DecimalInput.cjs +1 -1
- package/dist/DecimalInput.js +1 -1
- package/dist/DecimalInputV2.cjs +1 -1
- package/dist/DecimalInputV2.js +1 -1
- package/dist/DetailedProductsInfinitiveSection.cjs +3 -3
- package/dist/DetailedProductsInfinitiveSection.js +23 -22
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +4 -4
- package/dist/DetailsView.cjs +1 -1
- package/dist/DetailsView.js +1 -1
- package/dist/DoubleRangeSlider.cjs +1 -1
- package/dist/DoubleRangeSlider.js +1 -1
- package/dist/DragAndDropFile.cjs +1 -1
- package/dist/DragAndDropFile.js +1 -1
- package/dist/DragDropFiles.cjs +1 -1
- package/dist/DragDropFiles.js +1 -1
- package/dist/Drawer.cjs +1 -1
- package/dist/Drawer.js +1 -1
- package/dist/Dropdown.cjs +1 -1
- package/dist/Dropdown.js +2 -2
- package/dist/DropdownItem.cjs +1 -1
- package/dist/DropdownItem.js +1 -1
- package/dist/DropdownLookup.cjs +1 -1
- package/dist/DropdownLookup.js +1 -1
- package/dist/DropdownMenu.cjs +1 -1
- package/dist/DropdownMenu.js +1 -1
- package/dist/EditableTable.cjs +1 -1
- package/dist/EditableTable.js +1 -1
- package/dist/FeedbackSection.cjs +1 -1
- package/dist/FeedbackSection.js +1 -1
- package/dist/FieldOfInterestsMasonrySection.cjs +1 -1
- package/dist/FieldOfInterestsMasonrySection.js +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +2 -2
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +1 -1
- package/dist/FieldOfInterestsWithTagsCardsSection.js +1 -1
- package/dist/FileInput.cjs +1 -1
- package/dist/FileInput.js +1 -1
- package/dist/FlexGridItem.cjs +1 -1
- package/dist/FlexGridItem.js +1 -1
- package/dist/FormField.cjs +1 -1
- package/dist/FormField.js +1 -1
- package/dist/FormView.cjs +1 -1
- package/dist/FormView.js +1 -1
- package/dist/GeneralWithTagsCardsSection.cjs +1 -1
- package/dist/GeneralWithTagsCardsSection.js +1 -1
- package/dist/GiftCardsSection.cjs +1 -1
- package/dist/GiftCardsSection.js +2 -2
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.js +1 -1
- package/dist/IconButton.cjs +1 -1
- package/dist/IconButton.js +1 -1
- package/dist/Kanban.cjs +1 -1
- package/dist/Kanban.js +1 -1
- package/dist/KanbanActionsToolbar.cjs +1 -1
- package/dist/KanbanActionsToolbar.js +1 -1
- package/dist/KanbanView.cjs +1 -1
- package/dist/KanbanView.js +1 -1
- package/dist/Link.cjs +1 -1
- package/dist/Link.js +1 -1
- package/dist/LoanCalculatorSection.cjs +1 -1
- package/dist/LoanCalculatorSection.js +1 -1
- package/dist/LocationFinderSection.cjs +1 -1
- package/dist/LocationFinderSection.js +1 -1
- package/dist/LocationSearchSection.cjs +1 -1
- package/dist/LocationSearchSection.js +1 -1
- package/dist/MasonryGeneralCardsSection.cjs +1 -1
- package/dist/MasonryGeneralCardsSection.js +1 -1
- package/dist/MenuItem.cjs +1 -1
- package/dist/MenuItem.js +1 -1
- package/dist/Modal.cjs +1 -1
- package/dist/Modal.js +1 -1
- package/dist/MultiSelectDropdown.cjs +1 -1
- package/dist/MultiSelectDropdown.js +1 -1
- package/dist/MultiSelectDropdownLookup.cjs +1 -1
- package/dist/MultiSelectDropdownLookup.js +1 -1
- package/dist/NestedDropdownItem.cjs +1 -1
- package/dist/NestedDropdownItem.js +1 -1
- package/dist/NestedMenuItem.cjs +1 -1
- package/dist/NestedMenuItem.js +1 -1
- package/dist/NotificationContainer.cjs +1 -1
- package/dist/NotificationContainer.js +1 -1
- package/dist/NotificationMessage.cjs +1 -1
- package/dist/NotificationMessage.js +1 -1
- package/dist/NumberInput.cjs +1 -1
- package/dist/NumberInput.js +1 -1
- package/dist/PasswordInput.cjs +1 -1
- package/dist/PasswordInput.js +1 -1
- package/dist/PopoverContent.cjs +1 -1
- package/dist/PopoverContent.js +1 -1
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +3 -3
- package/dist/ProgressBar.cjs +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/QuattroCardsSection.cjs +1 -1
- package/dist/QuattroCardsSection.js +1 -1
- package/dist/QuizSection.cjs +1 -1
- package/dist/QuizSection.js +1 -1
- package/dist/RadioInput.cjs +1 -1
- package/dist/RadioInput.js +1 -1
- package/dist/RangeSlider.cjs +1 -1
- package/dist/RangeSlider.js +1 -1
- package/dist/ReviewsSection.cjs +1 -1
- package/dist/ReviewsSection.js +2 -2
- package/dist/SalesCampaignsSection.cjs +25 -25
- package/dist/SalesCampaignsSection.js +317 -322
- package/dist/Separator.cjs +1 -1
- package/dist/Separator.js +1 -1
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +2 -2
- package/dist/Sidebar.cjs +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +3 -3
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +1 -1
- package/dist/Spinner.cjs +1 -1
- package/dist/Spinner.js +1 -1
- package/dist/StatsSection.cjs +1 -1
- package/dist/StatsSection.js +1 -1
- package/dist/Surface.cjs +1 -1
- package/dist/Surface.js +1 -1
- package/dist/SwipeableDrawer.cjs +1 -1
- package/dist/SwipeableDrawer.js +1 -1
- package/dist/TabItem.cjs +1 -1
- package/dist/TabItem.js +1 -1
- package/dist/Table.cjs +1 -1
- package/dist/Table.js +67 -67
- package/dist/TableView.cjs +1 -1
- package/dist/TableView.js +1 -1
- package/dist/TextAreaInput.cjs +1 -1
- package/dist/TextAreaInput.js +1 -1
- package/dist/TextInput.cjs +1 -1
- package/dist/TextInput.js +1 -1
- package/dist/ThemeProvider.cjs +1 -1
- package/dist/ThemeProvider.js +1 -1
- package/dist/TimeInput.cjs +1 -1
- package/dist/TimeInput.js +1 -1
- package/dist/Toggle.cjs +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/TreeMenuSeparator.cjs +1 -1
- package/dist/TreeMenuSeparator.js +1 -1
- package/dist/UploadedFile.cjs +1 -1
- package/dist/UploadedFile.js +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{index-D8KPbcUf.js → index-8quQ_PZS.js} +1 -1
- package/dist/{index-BPntOicE.js → index-B8I1mHMA.js} +2 -2
- package/dist/{index-CsEmnNEh.cjs → index-BD-qUr5R.cjs} +1 -1
- package/dist/{index-BMOLVn8O.js → index-BGiZlEQt.js} +1 -1
- package/dist/{index-DFdPWO4O.js → index-Bhfq_YpE.js} +2 -2
- package/dist/{index-CfT9e5O9.cjs → index-BnYqZk-h.cjs} +1 -1
- package/dist/{index-BvQx3xAm.cjs → index-CSNxZFTX.cjs} +1 -1
- package/dist/{index-BbltNcou.js → index-C_NnINik.js} +1 -1
- package/dist/{index-ELUMKl0N.cjs → index-D0JDnm9b.cjs} +1 -1
- package/dist/{index-D69SKc-n.cjs → index-D55MR8tU.cjs} +1 -1
- package/dist/{index-G6ucyCg3.js → index-DMnFESGw.js} +2 -2
- package/dist/{index-XYs5Cuh5.js → index-DWLKvVyZ.js} +2 -2
- package/dist/{index-C5r__0lD.cjs → index-DoKMLSVY.cjs} +1 -1
- package/dist/{index-BueKsXT8.cjs → index-uwl7BjRF.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{style-D3pIrH3v.js → style-C7FUSHmS.js} +1 -1
- package/dist/{style-Db3VFbfP.cjs → style-CkcozOY6.cjs} +1 -1
- package/dist/{utils-DHfRApMf.js → utils-Dc5zIpaz.js} +138 -96
- package/dist/{utils-Dl9xPH4c.cjs → utils-RnrgDDZP.cjs} +10 -10
- package/package.json +1 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
var
|
|
4
|
-
},
|
|
5
|
-
return
|
|
1
|
+
import { jsxs as m, Fragment as D } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useEffect as C, cloneElement as B, isValidElement as h, Children as s } from "react";
|
|
3
|
+
var N = function() {
|
|
4
|
+
}, E = typeof window < "u", A = function(e, t) {
|
|
5
|
+
return E ? window.matchMedia(e).matches : (process.env.NODE_ENV !== "production" && console.warn("`useMedia` When server side rendering, defaultState should be defined to prevent a hydration mismatches."), !1);
|
|
6
6
|
}, x = function(e, t) {
|
|
7
|
-
var a =
|
|
8
|
-
return
|
|
9
|
-
var r = !0,
|
|
10
|
-
r && n(!!
|
|
7
|
+
var a = w(A(e)), o = a[0], n = a[1];
|
|
8
|
+
return C(function() {
|
|
9
|
+
var r = !0, c = window.matchMedia(e), b = function() {
|
|
10
|
+
r && n(!!c.matches);
|
|
11
11
|
};
|
|
12
|
-
return
|
|
13
|
-
r = !1,
|
|
12
|
+
return c.addEventListener("change", b), n(c.matches), function() {
|
|
13
|
+
r = !1, c.removeEventListener("change", b);
|
|
14
14
|
};
|
|
15
15
|
}, [e]), o;
|
|
16
16
|
};
|
|
@@ -3457,7 +3457,7 @@ const k = {
|
|
|
3457
3457
|
tooltip: 1500,
|
|
3458
3458
|
popover: 1299
|
|
3459
3459
|
}
|
|
3460
|
-
},
|
|
3460
|
+
}, T = {
|
|
3461
3461
|
name: "Lanaco Dark",
|
|
3462
3462
|
class: "lnc-dark",
|
|
3463
3463
|
colorContext: {
|
|
@@ -6912,7 +6912,7 @@ const k = {
|
|
|
6912
6912
|
tooltip: 1500,
|
|
6913
6913
|
popover: 1299
|
|
6914
6914
|
}
|
|
6915
|
-
},
|
|
6915
|
+
}, S = {
|
|
6916
6916
|
name: "Lanaco E-Commerce",
|
|
6917
6917
|
class: "lnc-e-comm",
|
|
6918
6918
|
colorContext: {
|
|
@@ -10272,7 +10272,7 @@ const k = {
|
|
|
10272
10272
|
tooltip: 1500,
|
|
10273
10273
|
popover: 1299
|
|
10274
10274
|
}
|
|
10275
|
-
},
|
|
10275
|
+
}, K = [k, T, S], P = {
|
|
10276
10276
|
SUCCESS: k.palette.green[500],
|
|
10277
10277
|
ERROR: k.palette.red[500],
|
|
10278
10278
|
WARNING: k.palette.yellow[500],
|
|
@@ -10280,7 +10280,7 @@ const k = {
|
|
|
10280
10280
|
SECONDARY: k.palette.blue[500],
|
|
10281
10281
|
DISABLED: k.palette.gray[300],
|
|
10282
10282
|
NONE: "white"
|
|
10283
|
-
},
|
|
10283
|
+
}, u = {
|
|
10284
10284
|
XS: {
|
|
10285
10285
|
type: "XS",
|
|
10286
10286
|
mediaQuery: "(max-width: 480px)"
|
|
@@ -10301,12 +10301,12 @@ const k = {
|
|
|
10301
10301
|
type: "XL",
|
|
10302
10302
|
mediaQuery: "(min-width: 1281px)"
|
|
10303
10303
|
}
|
|
10304
|
-
},
|
|
10305
|
-
var a =
|
|
10306
|
-
return a &&
|
|
10307
|
-
},
|
|
10304
|
+
}, U = (e, t) => {
|
|
10305
|
+
var a = R(e, t);
|
|
10306
|
+
return a && h(a) ? { current: a } : { current: null };
|
|
10307
|
+
}, R = (e = "", t) => {
|
|
10308
10308
|
if (t && e) {
|
|
10309
|
-
var a =
|
|
10309
|
+
var a = s.toArray(t).reverse().find(
|
|
10310
10310
|
(o) => {
|
|
10311
10311
|
var n, r;
|
|
10312
10312
|
return ((n = o.props) == null ? void 0 : n.__TYPE__) === e || ((r = o.type) == null ? void 0 : r.displayName) === e;
|
|
@@ -10315,27 +10315,27 @@ const k = {
|
|
|
10315
10315
|
if (a) return a;
|
|
10316
10316
|
}
|
|
10317
10317
|
return null;
|
|
10318
|
-
},
|
|
10319
|
-
var o =
|
|
10320
|
-
return o &&
|
|
10321
|
-
},
|
|
10318
|
+
}, _ = (e, t, a) => {
|
|
10319
|
+
var o = z(e, t, a);
|
|
10320
|
+
return o && h(o) ? { current: o } : { current: null };
|
|
10321
|
+
}, z = (e = "", t, a) => {
|
|
10322
10322
|
if (a && e) {
|
|
10323
|
-
var o =
|
|
10323
|
+
var o = s.toArray(a).reverse().find(
|
|
10324
10324
|
(n) => {
|
|
10325
|
-
var r,
|
|
10326
|
-
return (((r = n.props) == null ? void 0 : r.__TYPE__) === e || ((
|
|
10325
|
+
var r, c, b, d;
|
|
10326
|
+
return (((r = n.props) == null ? void 0 : r.__TYPE__) === e || ((c = n.type) == null ? void 0 : c.displayName) === e) && (t ? ((b = n.props) == null ? void 0 : b.id) === t : !((d = n.props) != null && d.id));
|
|
10327
10327
|
}
|
|
10328
10328
|
);
|
|
10329
10329
|
if (o) return o;
|
|
10330
10330
|
}
|
|
10331
10331
|
return null;
|
|
10332
|
-
},
|
|
10333
|
-
const e = x(
|
|
10334
|
-
return e ?
|
|
10335
|
-
},
|
|
10332
|
+
}, G = () => {
|
|
10333
|
+
const e = x(u.XS.mediaQuery), t = x(u.S.mediaQuery), a = x(u.M.mediaQuery), o = x(u.L.mediaQuery), n = x(u.XL.mediaQuery);
|
|
10334
|
+
return e ? u.XS.type : t ? u.S.type : a ? u.M.type : o ? u.L.type : n ? u.XL.type : u.M.type;
|
|
10335
|
+
}, Q = (e, t, a = null, o = !1) => e.current !== null ? (t.children = a !== null ? o == !0 ? /* @__PURE__ */ m(D, { children: [
|
|
10336
10336
|
e.current.props.children,
|
|
10337
10337
|
a
|
|
10338
|
-
] }) : a : e.current.props.children,
|
|
10338
|
+
] }) : a : e.current.props.children, B(e.current, t)) : null, y = (e, t) => {
|
|
10339
10339
|
var a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
|
10340
10340
|
let o = a ? {
|
|
10341
10341
|
r: parseInt(a[1], 16),
|
|
@@ -10344,40 +10344,40 @@ const k = {
|
|
|
10344
10344
|
a: t
|
|
10345
10345
|
} : null;
|
|
10346
10346
|
return o ? `rgba(${o.r}, ${o.g}, ${o.b}, ${o.a})` : null;
|
|
10347
|
-
},
|
|
10348
|
-
var
|
|
10349
|
-
const
|
|
10350
|
-
return
|
|
10351
|
-
},
|
|
10347
|
+
}, V = (e, t, a, o, n, r) => {
|
|
10348
|
+
var f, v;
|
|
10349
|
+
const c = e.colorContext[a], b = e.components[t].default, d = (v = (f = e.components[t]) == null ? void 0 : f[c]) == null ? void 0 : v[o], g = d == null ? void 0 : d[n], i = b[o][n], l = d == null ? void 0 : d[r], O = b[o][r], F = g || g == 0 ? e.palette[c][g] : e.palette[b.palette][i], W = l || l == 0 ? e.palette.opacity[l] : e.palette.opacity[O];
|
|
10350
|
+
return y(F, W ?? "100%");
|
|
10351
|
+
}, X = (e, t, a, o, n) => {
|
|
10352
10352
|
var i, l;
|
|
10353
|
-
const r = e.colorContext[a],
|
|
10354
|
-
return
|
|
10355
|
-
},
|
|
10353
|
+
const r = e.colorContext[a], c = e.components[t].default, b = (l = (i = e.components[t]) == null ? void 0 : i[r]) == null ? void 0 : l[o], d = b == null ? void 0 : b[n], g = c[o][n];
|
|
10354
|
+
return d || d == 0 ? d : g;
|
|
10355
|
+
}, Y = (e, t) => e.sizes[t], Z = (e, t, a, o) => `
|
|
10356
10356
|
font-weight: ${e.components[t].default[o].fontWeight};
|
|
10357
10357
|
font-size: ${e.typography.component[a].fontSize};
|
|
10358
10358
|
line-height: ${e.typography.component[a].lineHeight};
|
|
10359
|
-
`,
|
|
10359
|
+
`, q = (e, t) => e.borderRadius[t], j = (e, t) => e.boxShadow[t], J = (e, t) => {
|
|
10360
10360
|
const a = e.colorContext[e.palette.outline.context], o = e.palette[a][e.palette.outline.weight];
|
|
10361
10361
|
return `
|
|
10362
10362
|
outline: ${e.palette.outline.width} ${e.palette.outline.style} ${o};
|
|
10363
10363
|
${`outline-offset: ${e.palette.outline.offset}`};
|
|
10364
10364
|
`;
|
|
10365
|
-
},
|
|
10365
|
+
}, e0 = (e) => {
|
|
10366
10366
|
const t = e.palette.disabled.color, a = e.palette[t][e.palette.disabled.background], o = e.palette[t][e.palette.disabled.text], n = e.palette.opacity[e.palette.disabled.opacity];
|
|
10367
10367
|
return `
|
|
10368
|
-
background-color: ${
|
|
10368
|
+
background-color: ${y(a, n ?? "100%")};
|
|
10369
10369
|
color: ${o};
|
|
10370
10370
|
`;
|
|
10371
|
-
},
|
|
10371
|
+
}, t0 = (e) => {
|
|
10372
10372
|
const t = e.palette.disabled.color, a = e.palette[t][e.palette.disabled.background], o = e.palette.opacity[e.palette.disabled.opacity];
|
|
10373
10373
|
return `
|
|
10374
|
-
background-color: ${
|
|
10374
|
+
background-color: ${y(a, o ?? "100%")};
|
|
10375
10375
|
`;
|
|
10376
|
-
},
|
|
10376
|
+
}, M = () => `
|
|
10377
10377
|
white-space: nowrap;
|
|
10378
10378
|
overflow: hidden;
|
|
10379
10379
|
text-overflow: ellipsis;
|
|
10380
|
-
`,
|
|
10380
|
+
`, a0 = (e) => e == null || e == 0 || e == 1 ? M() : `
|
|
10381
10381
|
overflow: hidden;
|
|
10382
10382
|
text-overflow: ellipsis;
|
|
10383
10383
|
overflow-wrap: anywhere;
|
|
@@ -10391,7 +10391,7 @@ const k = {
|
|
|
10391
10391
|
-webkit-line-clamp: ${e};
|
|
10392
10392
|
-webkit-box-orient: vertical;
|
|
10393
10393
|
}
|
|
10394
|
-
`,
|
|
10394
|
+
`, o0 = (e = "-45deg", t = "500% 500%", a = "#b3b9c4", o = "#e5e9f1") => `
|
|
10395
10395
|
@keyframes gradient {
|
|
10396
10396
|
0% {
|
|
10397
10397
|
background-position: 0% 0%;
|
|
@@ -10411,7 +10411,7 @@ const k = {
|
|
|
10411
10411
|
background: linear-gradient(${e}, ${a}, ${o});
|
|
10412
10412
|
background-size: ${t};
|
|
10413
10413
|
animation: gradient 1s linear infinite alternate;
|
|
10414
|
-
`,
|
|
10414
|
+
`, n0 = (e) => e != null && e !== "", r0 = (e) => e != null, d0 = (e) => new Intl.NumberFormat("de-DE", {
|
|
10415
10415
|
minimumFractionDigits: 2,
|
|
10416
10416
|
maximumFractionDigits: 2
|
|
10417
10417
|
}).format(e), H = {
|
|
@@ -10455,8 +10455,8 @@ const k = {
|
|
|
10455
10455
|
GHS: "₵",
|
|
10456
10456
|
KES: "KSh",
|
|
10457
10457
|
TZS: "TSh"
|
|
10458
|
-
},
|
|
10459
|
-
function
|
|
10458
|
+
}, c0 = (e) => H[e] || "";
|
|
10459
|
+
function I(e, t = { carbs: 0.5, protein: 0.25, fat: 0.25 }) {
|
|
10460
10460
|
const a = t.carbs + t.protein + t.fat;
|
|
10461
10461
|
if (Math.abs(a - 1) > 0.01)
|
|
10462
10462
|
throw new Error("Ratios must add up to 1.");
|
|
@@ -10467,7 +10467,7 @@ function M(e, t = { carbs: 0.5, protein: 0.25, fat: 0.25 }) {
|
|
|
10467
10467
|
fat: Math.round(e * t.fat / o.fat)
|
|
10468
10468
|
};
|
|
10469
10469
|
}
|
|
10470
|
-
const
|
|
10470
|
+
const b0 = ({
|
|
10471
10471
|
gender: e,
|
|
10472
10472
|
age: t,
|
|
10473
10473
|
heightCm: a,
|
|
@@ -10475,14 +10475,14 @@ const c0 = ({
|
|
|
10475
10475
|
activityLevel: n,
|
|
10476
10476
|
goal: r
|
|
10477
10477
|
}) => {
|
|
10478
|
-
let
|
|
10478
|
+
let c;
|
|
10479
10479
|
if (e === "male")
|
|
10480
|
-
|
|
10480
|
+
c = 10 * +o + 6.25 * +a - 5 * +t + 5;
|
|
10481
10481
|
else if (e === "female")
|
|
10482
|
-
|
|
10482
|
+
c = 10 * +o + 6.25 * +a - 5 * +t - 161;
|
|
10483
10483
|
else
|
|
10484
10484
|
throw new Error("Invalid gender. Use 'male' or 'female'.");
|
|
10485
|
-
const
|
|
10485
|
+
const d = {
|
|
10486
10486
|
// sedentary: 1.2,
|
|
10487
10487
|
// light: 1.375,
|
|
10488
10488
|
// moderate: 1.55,
|
|
@@ -10492,68 +10492,110 @@ const c0 = ({
|
|
|
10492
10492
|
moderate: 1.55,
|
|
10493
10493
|
veryactive: 1.9
|
|
10494
10494
|
}[n.toLowerCase()];
|
|
10495
|
-
if (!
|
|
10495
|
+
if (!d)
|
|
10496
10496
|
throw new Error("Invalid activity level");
|
|
10497
|
-
const
|
|
10497
|
+
const g = c * d;
|
|
10498
10498
|
let i;
|
|
10499
10499
|
switch (r.toLowerCase()) {
|
|
10500
10500
|
case "loseweight":
|
|
10501
|
-
i =
|
|
10501
|
+
i = g - 500;
|
|
10502
10502
|
break;
|
|
10503
10503
|
case "maintaining":
|
|
10504
|
-
i =
|
|
10504
|
+
i = g;
|
|
10505
10505
|
break;
|
|
10506
10506
|
case "gainmuscle":
|
|
10507
|
-
i =
|
|
10507
|
+
i = g + 500;
|
|
10508
10508
|
break;
|
|
10509
10509
|
default:
|
|
10510
10510
|
throw new Error("Invalid goal. Use: 'lose', 'maintain', or 'gain'.");
|
|
10511
10511
|
}
|
|
10512
|
-
const l =
|
|
10512
|
+
const l = I(i);
|
|
10513
10513
|
return {
|
|
10514
10514
|
calories: Math.round(i),
|
|
10515
10515
|
...l
|
|
10516
10516
|
};
|
|
10517
|
-
},
|
|
10517
|
+
}, g0 = (e) => {
|
|
10518
10518
|
const t = String(Math.floor(e / 60)).padStart(2, "0"), a = String(e % 60).padStart(2, "0");
|
|
10519
10519
|
return `${t}:${a}`;
|
|
10520
|
-
},
|
|
10520
|
+
}, i0 = (e, ...t) => e.replace(/{(\d+)}/g, function(a, o) {
|
|
10521
10521
|
return typeof t[o] < "u" ? t[o] : a;
|
|
10522
|
-
}),
|
|
10522
|
+
}), u0 = (e) => (e = e || 0, e > 999 ? Math.round(e / 1e3).toLocaleString() + "K" : e.toLocaleString()), l0 = (e) => {
|
|
10523
10523
|
const t = new Date(e);
|
|
10524
10524
|
let a = t.getDate(), o = t.getMonth() + 1, n = t.getFullYear();
|
|
10525
10525
|
return `${a}. ${o}. ${n}`;
|
|
10526
|
+
}, p = (e) => {
|
|
10527
|
+
if (!e) return null;
|
|
10528
|
+
if (e instanceof Date)
|
|
10529
|
+
return e.toISOString();
|
|
10530
|
+
const t = String(e);
|
|
10531
|
+
return t.endsWith("Z") || /[+-]\d{2}:\d{2}$/.test(t) ? t : t + "Z";
|
|
10532
|
+
}, k0 = (e, t) => {
|
|
10533
|
+
const a = p(e), o = p(t), n = a ? new Date(a) : null, r = o ? new Date(o) : null, c = /* @__PURE__ */ new Date();
|
|
10534
|
+
if (!n || !r)
|
|
10535
|
+
return -1;
|
|
10536
|
+
const b = r.getTime() - n.getTime(), d = c.getTime() - n.getTime(), g = b / (1e3 * 60 * 60 * 24), i = d / (1e3 * 60 * 60 * 24);
|
|
10537
|
+
return d < 0 ? -1 : d >= b ? {
|
|
10538
|
+
day: Math.ceil(g),
|
|
10539
|
+
totalDays: Math.ceil(g),
|
|
10540
|
+
isEnded: !0
|
|
10541
|
+
} : {
|
|
10542
|
+
day: Math.floor(i),
|
|
10543
|
+
// Make it 1-based (Day 1, 2, 3, 4 instead of 0, 1, 2, 3)
|
|
10544
|
+
totalDays: Math.ceil(g),
|
|
10545
|
+
isEnded: !1,
|
|
10546
|
+
// Additional precision info for progress calculations
|
|
10547
|
+
dayProgress: i / g,
|
|
10548
|
+
// 0 to 1 progress within current day
|
|
10549
|
+
totalProgress: d / b
|
|
10550
|
+
// 0 to 1 overall progress
|
|
10551
|
+
};
|
|
10552
|
+
}, x0 = (e) => {
|
|
10553
|
+
if (!e) return null;
|
|
10554
|
+
const t = p(e), a = t ? new Date(t) : null, o = /* @__PURE__ */ new Date();
|
|
10555
|
+
if (!a) return null;
|
|
10556
|
+
const n = a.getTime() - o.getTime(), r = 24 * 60 * 60 * 1e3;
|
|
10557
|
+
return Math.ceil(n / r);
|
|
10558
|
+
}, p0 = (e) => {
|
|
10559
|
+
if (!e) return null;
|
|
10560
|
+
const t = p(e), a = t ? new Date(t) : null, o = /* @__PURE__ */ new Date();
|
|
10561
|
+
if (!a) return null;
|
|
10562
|
+
const n = a.getTime() - o.getTime(), r = 24 * 60 * 60 * 1e3;
|
|
10563
|
+
return Math.ceil(n / r);
|
|
10526
10564
|
};
|
|
10527
10565
|
export {
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
r0 as
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10566
|
+
p0 as A,
|
|
10567
|
+
x0 as B,
|
|
10568
|
+
p as C,
|
|
10569
|
+
_ as D,
|
|
10570
|
+
E,
|
|
10571
|
+
N as F,
|
|
10572
|
+
c0 as G,
|
|
10573
|
+
P as H,
|
|
10574
|
+
u as I,
|
|
10575
|
+
q as a,
|
|
10576
|
+
V as b,
|
|
10577
|
+
Z as c,
|
|
10578
|
+
Y as d,
|
|
10579
|
+
J as e,
|
|
10580
|
+
t0 as f,
|
|
10581
|
+
X as g,
|
|
10582
|
+
e0 as h,
|
|
10583
|
+
U as i,
|
|
10584
|
+
j,
|
|
10585
|
+
n0 as k,
|
|
10586
|
+
r0 as l,
|
|
10587
|
+
y as m,
|
|
10588
|
+
K as n,
|
|
10589
|
+
a0 as o,
|
|
10590
|
+
d0 as p,
|
|
10591
|
+
l0 as q,
|
|
10592
|
+
Q as r,
|
|
10593
|
+
i0 as s,
|
|
10594
|
+
M as t,
|
|
10595
|
+
G as u,
|
|
10596
|
+
u0 as v,
|
|
10597
|
+
o0 as w,
|
|
10598
|
+
g0 as x,
|
|
10599
|
+
b0 as y,
|
|
10600
|
+
k0 as z
|
|
10559
10601
|
};
|