@anywayseo/tools 5.4.5 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/components/base/h1/index.d.ts +4 -0
  2. package/dist/components/base/h2/index.d.ts +4 -0
  3. package/dist/components/base/h3/index.d.ts +4 -0
  4. package/dist/components/base/index.d.ts +8 -0
  5. package/dist/components/base/link/index.d.ts +5 -1
  6. package/dist/components/base/link/utils.d.ts +1 -0
  7. package/dist/components/base/ol/index.d.ts +4 -0
  8. package/dist/components/base/p/index.d.ts +4 -0
  9. package/dist/components/base/ul/index.d.ts +4 -0
  10. package/dist/components/index.cjs +21 -9
  11. package/dist/components/index.d.ts +1 -3
  12. package/dist/components/index.mjs +27 -15
  13. package/dist/components/{contact-form → pages/contacts/contact-form}/index.d.ts +1 -1
  14. package/dist/components/pages/contacts/index.d.ts +3 -0
  15. package/dist/components/pages/cookie-policy/index.d.ts +3 -0
  16. package/dist/components/pages/index.d.ts +5 -0
  17. package/dist/components/pages/privacy-policy/index.d.ts +6 -0
  18. package/dist/components/pages/terms-and-conditions/index.d.ts +6 -0
  19. package/dist/hooks/index.cjs +1 -1
  20. package/dist/hooks/index.mjs +1 -1
  21. package/dist/i18n/index.cjs +10 -5
  22. package/dist/i18n/index.mjs +10 -5
  23. package/dist/i18n/resources/bg/index.d.ts +280 -0
  24. package/dist/i18n/resources/da/index.d.ts +280 -0
  25. package/dist/i18n/resources/de/index.d.ts +168 -0
  26. package/dist/i18n/resources/en/index.d.ts +168 -0
  27. package/dist/i18n/resources/fi/index.d.ts +280 -0
  28. package/dist/i18n/resources/fr/index.d.ts +168 -0
  29. package/dist/i18n/resources/it/index.d.ts +168 -0
  30. package/dist/i18n/resources/ka/index.d.ts +280 -0
  31. package/dist/i18n/resources/pt/index.d.ts +280 -0
  32. package/dist/i18n/resources/ru/index.d.ts +168 -0
  33. package/dist/{index-CAfBnNV6.js → index-5J1CqqcW.js} +1 -1
  34. package/dist/index-B1PwYYQt.mjs +24 -0
  35. package/dist/index-B6wz_B9_.js +145 -0
  36. package/dist/index-BEjKnOZA.mjs +28 -0
  37. package/dist/{index-BmaWfWLV.mjs → index-Bph7a3PR.mjs} +4 -0
  38. package/dist/index-C-ri0Fgy.js +23 -0
  39. package/dist/index-C2T70CMa.mjs +44 -0
  40. package/dist/index-COv56GyV.mjs +146 -0
  41. package/dist/{index-DZBLiQFh.js → index-CR5rM7at.js} +21 -6
  42. package/dist/index-CWMHJGbL.mjs +2957 -0
  43. package/dist/{index-BICcOaT7.js → index-CkRY_NXp.js} +0 -21
  44. package/dist/index-CyuHme_p.js +1059 -0
  45. package/dist/{index-BcFDxh8P.js → index-D4zJ5RBA.js} +13 -26
  46. package/dist/index-DDg_PkD2.js +27 -0
  47. package/dist/index-DMR4Ptkt.js +2956 -0
  48. package/dist/{index-tj12BA6U.mjs → index-DYS7zQW4.mjs} +1 -1
  49. package/dist/{index-At00w6EN.js → index-DgrIJs-a.js} +4 -0
  50. package/dist/{index-BCK4kr6V.mjs → index-Drz_7u2p.mjs} +3 -24
  51. package/dist/{index-8_-KtKsW.mjs → index-HLGPI9-S.mjs} +23 -8
  52. package/dist/{index-D4ilKDcB.mjs → index-JUwyHkmj.mjs} +284 -708
  53. package/dist/index.cjs +61 -45
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.mjs +52 -36
  56. package/dist/{components/layout → layout}/footer/navigation/index.d.ts +1 -1
  57. package/dist/layout/header/locale-switcher/icons/brazil/index.d.ts +2 -0
  58. package/dist/layout/header/locale-switcher/icons/bulgaria/index.d.ts +2 -0
  59. package/dist/layout/header/locale-switcher/icons/denmark/index.d.ts +2 -0
  60. package/dist/layout/header/locale-switcher/icons/finland/index.d.ts +2 -0
  61. package/dist/layout/header/locale-switcher/icons/france/index.d.ts +2 -0
  62. package/dist/layout/header/locale-switcher/icons/georgia/index.d.ts +2 -0
  63. package/dist/layout/header/locale-switcher/icons/germany/index.d.ts +2 -0
  64. package/dist/layout/header/locale-switcher/icons/globe/index.d.ts +2 -0
  65. package/dist/layout/header/locale-switcher/icons/index.d.ts +10 -0
  66. package/dist/layout/header/locale-switcher/icons/italy/index.d.ts +2 -0
  67. package/dist/layout/header/locale-switcher/icons/russia/index.d.ts +2 -0
  68. package/dist/{components/layout → layout}/header/locale-switcher/index.d.ts +1 -1
  69. package/dist/{components/layout → layout}/header/locale-switcher/utils.d.ts +1 -1
  70. package/dist/{components/layout → layout}/header/navigation/desktop/index.d.ts +1 -1
  71. package/dist/{components/layout → layout}/header/navigation/desktop/nav-list/index.d.ts +1 -1
  72. package/dist/{components/layout → layout}/header/navigation/index.d.ts +1 -1
  73. package/dist/{components/layout → layout}/header/navigation/mobile/index.d.ts +1 -1
  74. package/dist/{components/layout → layout}/header/navigation/mobile/nav-list/index.d.ts +1 -1
  75. package/dist/{components/layout → layout}/header/navigation/nav-link/index.d.ts +1 -1
  76. package/dist/{components/layout → layout}/hero/index.d.ts +1 -1
  77. package/dist/layout/index.cjs +596 -0
  78. package/dist/layout/index.mjs +597 -0
  79. package/dist/providers/index.cjs +2 -2
  80. package/dist/providers/index.mjs +2 -2
  81. package/dist/providers/mdx-provider/types.d.ts +3 -1
  82. package/dist/providers/mdx-provider/utils.d.ts +1 -2
  83. package/dist/types/components/game-card/index.d.ts +3 -3
  84. package/dist/types/components/strapi-component/index.d.ts +1 -1
  85. package/dist/types/i18n/index.d.ts +1 -1
  86. package/dist/utils/index.cjs +12 -10
  87. package/dist/utils/index.mjs +10 -8
  88. package/dist/utils/navigation/index.d.ts +1 -0
  89. package/package.json +7 -1
  90. package/dist/components/layout/header/locale-switcher/icons/earth/index.d.ts +0 -2
  91. package/dist/components/layout/header/locale-switcher/icons/france/index.d.ts +0 -2
  92. package/dist/components/layout/header/locale-switcher/icons/germany/index.d.ts +0 -2
  93. package/dist/components/layout/header/locale-switcher/icons/globe/index.d.ts +0 -2
  94. package/dist/components/layout/header/locale-switcher/icons/index.d.ts +0 -6
  95. package/dist/components/layout/header/locale-switcher/icons/italy/index.d.ts +0 -2
  96. package/dist/components/layout/header/locale-switcher/icons/russia/index.d.ts +0 -2
  97. package/dist/index-Bts2DBYS.mjs +0 -637
  98. package/dist/index-CJVr79Z2.js +0 -636
  99. package/dist/index-C_FekfFC.mjs +0 -57
  100. package/dist/index-soGlqT7d.js +0 -1483
  101. /package/dist/components/{layout → base}/container/index.d.ts +0 -0
  102. /package/dist/components/{layout → base}/logo/index.d.ts +0 -0
  103. /package/dist/components/{not-found → pages/not-found}/index.d.ts +0 -0
  104. /package/dist/{components/layout → layout}/content/index.d.ts +0 -0
  105. /package/dist/{components/layout → layout}/footer/brand/index.d.ts +0 -0
  106. /package/dist/{components/layout → layout}/footer/copyright/index.d.ts +0 -0
  107. /package/dist/{components/layout → layout}/footer/disclaimer/index.d.ts +0 -0
  108. /package/dist/{components/layout → layout}/footer/extra/index.d.ts +0 -0
  109. /package/dist/{components/layout → layout}/footer/index.d.ts +0 -0
  110. /package/dist/{components/layout → layout}/header/brand/index.d.ts +0 -0
  111. /package/dist/{components/layout → layout}/header/index.d.ts +0 -0
  112. /package/dist/{components/layout → layout}/header/theme-toggler/index.d.ts +0 -0
  113. /package/dist/{components/layout → layout}/index.d.ts +0 -0
  114. /package/dist/{components/layout → layout}/main/index.d.ts +0 -0
  115. /package/dist/{components/layout → layout}/scroll-to-top/index.d.ts +0 -0
@@ -1,1483 +0,0 @@
1
- "use strict";
2
- const jsxRuntime = require("react/jsx-runtime");
3
- const react = require("@chakra-ui/react");
4
- const reactI18next = require("react-i18next");
5
- require("react-medium-image-zoom");
6
- const index = require("./index-DZBLiQFh.js");
7
- const react$1 = require("react");
8
- const index$3 = require("./index-C6MG_f24.js");
9
- const index$5 = require("./index-CJVr79Z2.js");
10
- const react$2 = require("@mdx-js/react");
11
- const icons = require("@chakra-ui/icons");
12
- const index$4 = require("./index-BICcOaT7.js");
13
- const index$2 = require("./index-At00w6EN.js");
14
- const index$1 = require("./index-CAfBnNV6.js");
15
- const i18next = require("i18next");
16
- const Markdown = require("react-markdown");
17
- const FacebookIcon = (props) => {
18
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "Facebook", ...props, children: [
19
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "1", y: "1", width: "22", height: "22", rx: "5", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
20
- /* @__PURE__ */ jsxRuntime.jsx(
21
- "path",
22
- {
23
- d: "M13.5 8h2V6h-2c-2.2 0-3.5 1.3-3.5 3.5V11H8v2h2v5h2v-5h2l.5-2h-2v-1.3c0-.5.2-.7 1-.7Z",
24
- fill: "currentColor"
25
- }
26
- )
27
- ] });
28
- };
29
- const InstagramIcon = (props) => {
30
- return /* @__PURE__ */ jsxRuntime.jsxs(
31
- "svg",
32
- {
33
- xmlns: "http://www.w3.org/2000/svg",
34
- width: "24",
35
- height: "24",
36
- viewBox: "0 0 24 24",
37
- "aria-label": "Instagram",
38
- ...props,
39
- children: [
40
- /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "1", y: "1", width: "22", height: "22", rx: "5", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
41
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "12", cy: "12", r: "4", fill: "none", stroke: "currentColor", strokeWidth: "2" }),
42
- /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "17", cy: "7", r: "1.25", fill: "currentColor" })
43
- ]
44
- }
45
- );
46
- };
47
- const PinterestIcon = (props) => {
48
- return /* @__PURE__ */ jsxRuntime.jsx(
49
- "svg",
50
- {
51
- xmlns: "http://www.w3.org/2000/svg",
52
- width: "24",
53
- height: "24",
54
- viewBox: "0 0 24 24",
55
- "aria-label": "Pinterest",
56
- ...props,
57
- children: /* @__PURE__ */ jsxRuntime.jsx(
58
- "path",
59
- {
60
- fill: "currentColor",
61
- d: "M12 0C5.373 0 0 5.373 0 12c0 4.99 3.657 9.128 8.438 10.122-.117-.858-.222-2.178.047-3.116.242-.83 1.557-5.288 1.557-5.288s-.396-.792-.396-1.963c0-1.84 1.067-3.215 2.395-3.215 1.13 0 1.675.848 1.675 1.866 0 1.138-.724 2.842-1.097 4.421-.312 1.319.663 2.395 1.965 2.395 2.358 0 3.947-3.032 3.947-6.617 0-2.727-1.84-4.769-5.178-4.769-3.774 0-6.134 2.822-6.134 5.97 0 1.086.322 1.852.827 2.443.232.274.264.384.18.698-.06.23-.197.786-.256 1.007-.084.322-.34.437-.628.318-1.75-.714-2.564-2.63-2.564-4.785 0-3.555 2.998-7.817 8.946-7.817 4.782 0 7.923 3.454 7.923 7.168 0 4.924-2.74 8.6-6.781 8.6-1.356 0-2.63-.73-3.066-1.565l-.833 3.173c-.301 1.147-1.118 2.582-1.667 3.455C9.708 23.812 10.828 24 12 24c6.627 0 12-5.373 12-12S18.627 0 12 0z"
62
- }
63
- )
64
- }
65
- );
66
- };
67
- const XcomIcon = (props) => {
68
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "X", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
69
- "path",
70
- {
71
- fill: "currentColor",
72
- d: "M18.244 2H21l-6.57 7.498L22 22h-5.657l-4.403-5.808L6.06 22H3.302l7.02-8.006L2 2h5.822l3.983 5.293L18.244 2zM16.97 20h1.9L8.153 4h-1.9L16.97 20z"
73
- }
74
- ) });
75
- };
76
- const YoutubeIcon = (props) => {
77
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", "aria-label": "YouTube", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
78
- "path",
79
- {
80
- fill: "currentColor",
81
- d: "M23.498 6.186a2.974 2.974 0 0 0-2.095-2.107C19.505 3.5 12 3.5 12 3.5s-7.505 0-9.403.579A2.974 2.974 0 0 0 .502 6.186C0 8.09 0 12 0 12s0 3.91.502 5.814a2.974 2.974 0 0 0 2.095 2.107C4.495 20.5 12 20.5 12 20.5s7.505 0 9.403-.579a2.974 2.974 0 0 0 2.095-2.107C24 15.91 24 12 24 12s0-3.91-.502-5.814zM9.75 15.02V8.98L15.5 12l-5.75 3.02z"
82
- }
83
- ) });
84
- };
85
- const SocialNetworkMap = {
86
- facebook: FacebookIcon,
87
- instagram: InstagramIcon,
88
- pinterest: PinterestIcon,
89
- x: XcomIcon,
90
- youtube: YoutubeIcon
91
- };
92
- const SocialNetwork = ({ kind, url }) => {
93
- const Icon = SocialNetworkMap[kind];
94
- return /* @__PURE__ */ jsxRuntime.jsx(react.Link, { href: url, target: "_blank", rel: "noopener noreferrer nofollow", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) });
95
- };
96
- const SocialNetworks = ({ socialNetworks, ...flexProps }) => {
97
- const uniqueSocialNetworks = [...new Map(socialNetworks.map((item) => [item.kind, item])).values()];
98
- return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { gap: 2, ...flexProps, children: uniqueSocialNetworks.map((socialNetwork) => /* @__PURE__ */ jsxRuntime.jsx(SocialNetwork, { ...socialNetwork }, socialNetwork.kind)) });
99
- };
100
- const ONE_LINE_HEIGHT = 24;
101
- const Bio = ({ content, maxLines = 1 }) => {
102
- const ref = react$1.useRef(null);
103
- const [showToggle, setShowToggle] = react$1.useState(false);
104
- const [isExpanded, setIsExpanded] = react$1.useState(false);
105
- const { t } = reactI18next.useTranslation("author");
106
- react$1.useLayoutEffect(() => {
107
- if (ref.current) {
108
- const { scrollWidth, clientWidth, scrollHeight, clientHeight } = ref.current;
109
- const isClamped = scrollWidth > clientWidth || scrollHeight > clientHeight;
110
- setShowToggle(isClamped);
111
- }
112
- return () => {
113
- setShowToggle(false);
114
- };
115
- }, []);
116
- function handleClick() {
117
- setIsExpanded((prev) => !prev);
118
- }
119
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { children: [
120
- /* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, startingHeight: ONE_LINE_HEIGHT * maxLines, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { ref, fontSize: "md", noOfLines: isExpanded ? void 0 : maxLines, children: content }) }),
121
- showToggle && /* @__PURE__ */ jsxRuntime.jsx(react.Button, { size: "sm", variant: "link", colorScheme: "blue", onClick: handleClick, children: isExpanded ? t("action.collapse") : t("action.expand") })
122
- ] });
123
- };
124
- const Author = ({ author, variant }) => {
125
- const { name, role, bio, avatar, socialNetworks } = author;
126
- if (variant === "short") {
127
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { align: "center", gap: 4, children: [
128
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { w: 12, h: 12, children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: avatar, alt: name, rounded: "full" }) }),
129
- /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { fontWeight: "semibold", children: [
130
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: name }),
131
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "gray.500", children: role })
132
- ] })
133
- ] });
134
- }
135
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { direction: { base: "column", sm: "row" }, align: { base: "center", sm: "flex-start" }, gap: 4, children: [
136
- /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: 1, maxW: { base: 48, sm: 32 }, children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: avatar, alt: name, rounded: "full" }) }),
137
- /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: 1, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { children: [
138
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "lg", fontWeight: 600, children: [
139
- `${name}, `,
140
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", display: "inline-block", color: "gray.500", children: role })
141
- ] }),
142
- (socialNetworks == null ? void 0 : socialNetworks.length) && /* @__PURE__ */ jsxRuntime.jsx(SocialNetworks, { socialNetworks }),
143
- /* @__PURE__ */ jsxRuntime.jsx(Bio, { content: bio })
144
- ] }) })
145
- ] });
146
- };
147
- const Center = ({ children, ...boxProps }) => {
148
- return /* @__PURE__ */ jsxRuntime.jsx(react.Center, { ...boxProps, children });
149
- };
150
- const defaultColumns = { base: 1, sm: 2, md: 3, lg: 4, xl: 5 };
151
- const Grid = ({ items, columns = defaultColumns, gap, render, getKey, ...boxProps }) => {
152
- return /* @__PURE__ */ jsxRuntime.jsx(react.SimpleGrid, { as: "ul", columns, spacing: gap, p: 0, m: 0, listStyleType: "none", ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "li", children: render(item) }, getKey ? getKey(item) : index2)) });
153
- };
154
- const LinkButton = ({
155
- label,
156
- href,
157
- linkType = "redirect",
158
- size = "auto",
159
- width = "auto",
160
- textTransform,
161
- textDecoration,
162
- animation,
163
- onClick,
164
- ...boxProps
165
- }) => {
166
- var _a;
167
- const { config } = index.useSiteContext();
168
- const { color, invertedColor } = index$1.usePrimaryColors();
169
- const isInvertedColor = (_a = config == null ? void 0 : config.theme) == null ? void 0 : _a.isInvertedColor;
170
- const isRedirectLink = linkType === "redirect";
171
- const isInternalLink = index$2.isRelativePath(href);
172
- const LinkComponent = isInternalLink ? index.Link : react.Link;
173
- const hrefKey = isInternalLink ? "to" : "href";
174
- const hrefValue = isRedirectLink ? `/follow?to=${href}` : href;
175
- return /* @__PURE__ */ jsxRuntime.jsx(
176
- react.Button,
177
- {
178
- w: width,
179
- size: size === "auto" ? { base: "sm", md: "lg" } : size,
180
- bg: "brand.500",
181
- color: isInvertedColor ? invertedColor : color,
182
- animation: animation ? index$3.Animation[animation.type](animation.params) : void 0,
183
- textTransform,
184
- _hover: { textDecoration, bg: "brand.200" },
185
- _active: { transform: "scale(0.95)" },
186
- onClick,
187
- ...boxProps,
188
- ...href ? {
189
- as: LinkComponent,
190
- [hrefKey]: hrefValue,
191
- target: isRedirectLink ? "_blank" : "_self",
192
- rel: isInternalLink ? "" : "noopener noreferrer nofollow"
193
- } : {},
194
- children: label
195
- }
196
- );
197
- };
198
- const AuthorCard = ({ author, ...boxProps }) => {
199
- const { t } = reactI18next.useTranslation("author");
200
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "filled", ...boxProps, children: [
201
- /* @__PURE__ */ jsxRuntime.jsx(react.CardHeader, { pb: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { size: "md", children: t("title") }) }),
202
- /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { children: /* @__PURE__ */ jsxRuntime.jsx(Author, { author, variant: "full" }) })
203
- ] });
204
- };
205
- const BonusCardContent = ({ content, buttonColor }) => {
206
- const { t } = reactI18next.useTranslation("author");
207
- return /* @__PURE__ */ jsxRuntime.jsx(react.Popover, { autoFocus: false, isLazy: true, lazyBehavior: "keepMounted", children: ({ isOpen }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
208
- /* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Button, { size: "sm", variant: "link", color: buttonColor, children: isOpen ? t("action.collapse") : t("action.expand") }) }),
209
- /* @__PURE__ */ jsxRuntime.jsx(react.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverContent, { children: /* @__PURE__ */ jsxRuntime.jsx(react.PopoverBody, { children: Array.isArray(content) ? /* @__PURE__ */ jsxRuntime.jsx(react.Stack, { children: content.map((paragraph, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: paragraph }, index2)) }) : /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: content }) }) }) })
210
- ] }) });
211
- };
212
- const BonusCardTitle = ({ content, color, textColor }) => {
213
- return /* @__PURE__ */ jsxRuntime.jsx(
214
- react.Text,
215
- {
216
- as: "h3",
217
- display: "inline-block",
218
- py: 1,
219
- px: 2,
220
- borderRadius: "md",
221
- bg: color,
222
- fontSize: "md",
223
- fontWeight: "bold",
224
- color: textColor,
225
- children: content
226
- }
227
- );
228
- };
229
- const BonusCard = ({
230
- title,
231
- subtitle,
232
- content,
233
- link,
234
- image,
235
- color = "linear-gradient(90deg, #3b1f47, #731d58)",
236
- textColor = "whiteAlpha.900",
237
- titleColor = "yellow",
238
- titleTextColor = "black",
239
- className
240
- }) => {
241
- return /* @__PURE__ */ jsxRuntime.jsxs(
242
- react.Card,
243
- {
244
- as: "article",
245
- h: "full",
246
- color: textColor,
247
- bg: color,
248
- _before: image ? {
249
- content: '""',
250
- position: "absolute",
251
- top: 0,
252
- left: 0,
253
- w: "100%",
254
- h: "100%",
255
- bgImage: `url(${image})`,
256
- bgSize: "cover",
257
- bgPosition: "center",
258
- filter: "blur(0.05em) opacity(50%)",
259
- zIndex: 0
260
- } : void 0,
261
- className,
262
- children: [
263
- /* @__PURE__ */ jsxRuntime.jsxs(react.CardBody, { as: "section", pb: 0, flex: 1, children: [
264
- /* @__PURE__ */ jsxRuntime.jsx(BonusCardTitle, { content: title, color: titleColor, textColor: titleTextColor }),
265
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "2xl", fontWeight: "bold", my: 2, children: subtitle }),
266
- /* @__PURE__ */ jsxRuntime.jsx(BonusCardContent, { content, buttonColor: textColor })
267
- ] }),
268
- /* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { as: "footer", p: 4, children: /* @__PURE__ */ jsxRuntime.jsx(LinkButton, { ...link, width: "full", size: "md", textDecoration: "none" }) })
269
- ]
270
- }
271
- );
272
- };
273
- const BonusCardGrid = ({
274
- items,
275
- columns = { base: 1, md: 2, lg: 3 },
276
- gap = 4,
277
- cardCustomization,
278
- ...boxProps
279
- }) => {
280
- return /* @__PURE__ */ jsxRuntime.jsx(
281
- Grid,
282
- {
283
- items,
284
- columns,
285
- gap,
286
- render: (item) => /* @__PURE__ */ jsxRuntime.jsx(BonusCard, { ...item, ...cardCustomization }),
287
- ...boxProps
288
- }
289
- );
290
- };
291
- const ContactForm = ({ ...boxProps }) => {
292
- const toast = react.useToast();
293
- const { t } = reactI18next.useTranslation("contactForm");
294
- function handleSubmit(event) {
295
- event.preventDefault();
296
- const form = event.currentTarget;
297
- const formData = new FormData(form);
298
- const name = formData.get("name");
299
- const email = formData.get("email");
300
- const message = formData.get("message");
301
- if (name && email && message) {
302
- form.reset();
303
- toast({
304
- title: t("notification.title", { name }),
305
- description: t("notification.description", { email }),
306
- colorScheme: "brand",
307
- status: "success",
308
- duration: 5e3,
309
- isClosable: true
310
- });
311
- } else {
312
- console.error("Please fill out both fields");
313
- }
314
- }
315
- return /* @__PURE__ */ jsxRuntime.jsx(
316
- react.Box,
317
- {
318
- as: "form",
319
- borderRadius: "lg",
320
- p: 8,
321
- color: react.useColorModeValue("gray.700", "whiteAlpha.900"),
322
- bg: react.useColorModeValue("white", "gray.700"),
323
- shadow: "base",
324
- onSubmit: handleSubmit,
325
- ...boxProps,
326
- children: /* @__PURE__ */ jsxRuntime.jsxs(react.VStack, { spacing: 4, children: [
327
- /* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
328
- /* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.name.label") }),
329
- /* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { children: [
330
- /* @__PURE__ */ jsxRuntime.jsx(react.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(
331
- "svg",
332
- {
333
- xmlns: "http://www.w3.org/2000/svg",
334
- width: "16",
335
- height: "16",
336
- fill: "currentColor",
337
- className: "bi bi-person-fill",
338
- viewBox: "0 0 16 16",
339
- children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6" })
340
- }
341
- ) }),
342
- /* @__PURE__ */ jsxRuntime.jsx(react.Input, { type: "text", name: "name", placeholder: t("field.name.placeholder") })
343
- ] })
344
- ] }),
345
- /* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
346
- /* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.email.label") }),
347
- /* @__PURE__ */ jsxRuntime.jsxs(react.InputGroup, { children: [
348
- /* @__PURE__ */ jsxRuntime.jsx(react.InputLeftElement, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.EmailIcon, {}) }),
349
- /* @__PURE__ */ jsxRuntime.jsx(react.Input, { type: "email", name: "email", placeholder: t("field.email.placeholder") })
350
- ] })
351
- ] }),
352
- /* @__PURE__ */ jsxRuntime.jsxs(react.FormControl, { isRequired: true, children: [
353
- /* @__PURE__ */ jsxRuntime.jsx(react.FormLabel, { children: t("field.message.label") }),
354
- /* @__PURE__ */ jsxRuntime.jsx(react.Textarea, { name: "message", placeholder: t("field.message.placeholder"), rows: 6, resize: "none" })
355
- ] }),
356
- /* @__PURE__ */ jsxRuntime.jsx(react.Button, { type: "submit", colorScheme: "brand", width: "full", children: t("action.send") })
357
- ] })
358
- }
359
- );
360
- };
361
- const Faq = ({ items, ...boxProps }) => {
362
- const { bgColor, invertedColor } = index$1.usePrimaryColors();
363
- return /* @__PURE__ */ jsxRuntime.jsx(react.Accordion, { allowToggle: true, ...boxProps, children: items.map(({ question, answer }) => {
364
- return /* @__PURE__ */ jsxRuntime.jsxs(react.AccordionItem, { border: 0, children: [
365
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "h3", children: /* @__PURE__ */ jsxRuntime.jsxs(react.AccordionButton, { _hover: { color: invertedColor, bgColor }, children: [
366
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "span", flex: "1", textAlign: "left", fontWeight: "bold", children: question }),
367
- /* @__PURE__ */ jsxRuntime.jsx(react.AccordionIcon, {})
368
- ] }) }),
369
- /* @__PURE__ */ jsxRuntime.jsx(react.AccordionPanel, { children: answer })
370
- ] }, question);
371
- }) });
372
- };
373
- const FeatureCard = ({ title, description }) => {
374
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "outline", textAlign: "center", h: "100%", children: [
375
- /* @__PURE__ */ jsxRuntime.jsxs(react.CardHeader, { as: "header", display: "flex", alignItems: "center", justifyContent: "center", gap: 2, pb: 2, children: [
376
- /* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" }),
377
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 600, children: title }),
378
- /* @__PURE__ */ jsxRuntime.jsx(icons.StarIcon, { w: 8, h: 8, color: "yellow.400" })
379
- ] }),
380
- /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "section", pt: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { color: "gray.500", children: description }) })
381
- ] });
382
- };
383
- const FeatureCardGrid = ({
384
- items,
385
- columns = { base: 1, md: 2, lg: 3 },
386
- gap = 4,
387
- ...boxProps
388
- }) => {
389
- return /* @__PURE__ */ jsxRuntime.jsx(
390
- Grid,
391
- {
392
- items,
393
- columns,
394
- gap,
395
- getKey: ({ title }) => title,
396
- render: (item) => /* @__PURE__ */ jsxRuntime.jsx(FeatureCard, { ...item }),
397
- ...boxProps
398
- }
399
- );
400
- };
401
- const GameCard = ({ name, description, image, href, height = "auto" }) => {
402
- return /* @__PURE__ */ jsxRuntime.jsxs(
403
- react.LinkBox,
404
- {
405
- as: "article",
406
- rounded: "md",
407
- borderWidth: 1,
408
- transition: "transform 0.2s ease",
409
- cursor: href ? "pointer" : "default",
410
- overflow: "hidden",
411
- bg: "blackAlpha.200",
412
- height,
413
- _hover: { transform: "scale(1.05)" },
414
- children: [
415
- /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: image, alt: name, mode: "thumbnail" }),
416
- /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { as: "section", rounded: "md", p: 4, children: [
417
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", children: href ? /* @__PURE__ */ jsxRuntime.jsx(react.LinkOverlay, { href, children: name }) : name }),
418
- !!description && /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "sm", color: "gray.600", children: description })
419
- ] })
420
- ]
421
- }
422
- );
423
- };
424
- const GameCardGrid = ({
425
- items,
426
- columns = { base: 1, sm: 2, md: 3, lg: 4 },
427
- gap = 4,
428
- cardHeight = "full",
429
- order = "default",
430
- randomSeed,
431
- ...boxProps
432
- }) => {
433
- let sortedItems = items;
434
- if (order === "random") {
435
- sortedItems = [...items].sort(randomSeed ? index$4.getSeededRandomComparator(randomSeed) : index$4.randomComparator);
436
- }
437
- return /* @__PURE__ */ jsxRuntime.jsx(
438
- Grid,
439
- {
440
- items: sortedItems,
441
- columns,
442
- gap,
443
- render: (item) => /* @__PURE__ */ jsxRuntime.jsx(GameCard, { ...item, height: cardHeight }),
444
- ...boxProps
445
- }
446
- );
447
- };
448
- const GameDemoContent = ({
449
- src,
450
- isFullscreen,
451
- isLoaded,
452
- onLoad,
453
- onExit,
454
- onToggleFullscreen
455
- }) => {
456
- const { t } = reactI18next.useTranslation("gameDemo");
457
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
458
- /* @__PURE__ */ jsxRuntime.jsx(
459
- react.Box,
460
- {
461
- as: "iframe",
462
- src,
463
- sandbox: "allow-scripts allow-same-origin",
464
- loading: "lazy",
465
- w: "100%",
466
- h: "100%",
467
- allowFullScreen: true,
468
- onLoad,
469
- children: /* @__PURE__ */ jsxRuntime.jsx("p", { children: t("warning") })
470
- }
471
- ),
472
- /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { position: "absolute", top: 2, left: 2, gap: 2, children: [
473
- /* @__PURE__ */ jsxRuntime.jsx(
474
- react.IconButton,
475
- {
476
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: 3, h: 3 }),
477
- title: t("action.exit"),
478
- "aria-label": t("action.exit"),
479
- size: "sm",
480
- color: "white",
481
- variant: "ghost",
482
- disabled: !isLoaded,
483
- isRound: true,
484
- onClick: onExit
485
- }
486
- ),
487
- /* @__PURE__ */ jsxRuntime.jsx(
488
- react.IconButton,
489
- {
490
- icon: isFullscreen ? /* @__PURE__ */ jsxRuntime.jsx(icons.ViewOffIcon, { w: 3, h: 3 }) : /* @__PURE__ */ jsxRuntime.jsx(icons.ViewIcon, { w: 4, h: 4 }),
491
- title: t(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
492
- "aria-label": t(isFullscreen ? "action.deactivateFullscreen" : "action.activateFullscreen"),
493
- size: "sm",
494
- color: "white",
495
- variant: "ghost",
496
- disabled: !isLoaded,
497
- isRound: true,
498
- onClick: onToggleFullscreen
499
- }
500
- )
501
- ] }),
502
- /* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Spinner, { size: "xl", thickness: "0.6rem", display: isLoaded ? "none" : "block", color: "brand.100" }) })
503
- ] });
504
- };
505
- const GameDemoPreview = ({ image, alt, href, imageFit = "contain", onPlayDemo }) => {
506
- const { t } = reactI18next.useTranslation("gameDemo");
507
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
508
- /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: image, alt, objectFit: imageFit, w: "100%", h: "100%" }),
509
- /* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 4, children: [
510
- /* @__PURE__ */ jsxRuntime.jsx(
511
- LinkButton,
512
- {
513
- animation: { type: "pulse", params: { duration: 2, timingFunction: "ease-out", isInfinite: true } },
514
- ...href ? { label: t("action.playForReal"), href } : { label: t("action.playForFree"), onClick: onPlayDemo }
515
- }
516
- ),
517
- !!href && /* @__PURE__ */ jsxRuntime.jsx(
518
- react.Button,
519
- {
520
- variant: "solid",
521
- colorScheme: "brand",
522
- size: { base: "sm", md: "lg" },
523
- _active: { transform: "scale(0.95)" },
524
- onClick: onPlayDemo,
525
- children: t("action.playForFree")
526
- }
527
- )
528
- ] }) })
529
- ] });
530
- };
531
- const GameDemo = ({ name, src, href, previewImage, previewImageFit, ...boxProps }) => {
532
- const [isRunning, setIsRunning] = react$1.useState(false);
533
- const [isLoaded, setIsLoaded] = react$1.useState(false);
534
- const { isOpen: isFullscreen, onToggle, onClose } = react.useDisclosure({ defaultIsOpen: false });
535
- function handleLoad() {
536
- setIsLoaded(true);
537
- }
538
- function handleExit() {
539
- document.body.style.overflowY = "auto";
540
- onClose();
541
- setIsRunning(false);
542
- }
543
- function handleToggleFullscreen() {
544
- document.body.style.overflowY = isFullscreen ? "auto" : "hidden";
545
- onToggle();
546
- }
547
- function handlePlayDemo() {
548
- setIsRunning(true);
549
- }
550
- return /* @__PURE__ */ jsxRuntime.jsx(
551
- react.Box,
552
- {
553
- as: "article",
554
- display: "grid",
555
- w: "100%",
556
- aspectRatio: "16/9 auto",
557
- ...isFullscreen ? { zIndex: 100, inset: 0, position: "fixed", h: "100dvh" } : { position: "relative" },
558
- ...boxProps,
559
- children: isRunning ? /* @__PURE__ */ jsxRuntime.jsx(
560
- GameDemoContent,
561
- {
562
- src,
563
- isFullscreen,
564
- isLoaded,
565
- onLoad: handleLoad,
566
- onExit: handleExit,
567
- onToggleFullscreen: handleToggleFullscreen
568
- }
569
- ) : /* @__PURE__ */ jsxRuntime.jsx(
570
- GameDemoPreview,
571
- {
572
- image: previewImage,
573
- alt: name,
574
- href,
575
- imageFit: previewImageFit,
576
- onPlayDemo: handlePlayDemo
577
- }
578
- )
579
- }
580
- );
581
- };
582
- const GameInfoItem = ({ title, value }) => {
583
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { gap: 2, children: [
584
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { w: "50%", color: "gray.500", textTransform: "capitalize", children: [
585
- title,
586
- ":"
587
- ] }),
588
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { w: "50%", textTransform: "capitalize", children: value })
589
- ] });
590
- };
591
- const MAX_VISIBLE_LANGUAGE = 5;
592
- function stringifyHasFeature(value) {
593
- return i18next.t(`gameInfo:value.boolean.${value}`);
594
- }
595
- function stringifyVolatility(value) {
596
- return i18next.t(`gameInfo:value.volatility.${value}`);
597
- }
598
- function stringifyArray(array, max) {
599
- const safeMax = typeof max === "number" ? Math.max(max, 0) : null;
600
- if (safeMax && array.length > safeMax) {
601
- return `${array.slice(0, safeMax).join(", ")}, +${array.length - safeMax}`;
602
- }
603
- return array.join(", ");
604
- }
605
- function getGameInfoItemValue(key, value, locale) {
606
- let formattedValue = "";
607
- if (typeof value !== "string") {
608
- if (key === index$5.GameCharacteristic.Rtp) {
609
- formattedValue = index$4.formatNumber(value, { percent: "real", precision: 3 });
610
- }
611
- if (key === index$5.GameCharacteristic.MinBet || key === index$5.GameCharacteristic.MaxBet || key === index$5.GameCharacteristic.MaxWin) {
612
- formattedValue = index$4.formatNumber(value, { locale });
613
- }
614
- if (key === index$5.GameCharacteristic.Compatibility || key === index$5.GameCharacteristic.BonusFeatures) {
615
- formattedValue = stringifyArray(value);
616
- }
617
- if (key === index$5.GameCharacteristic.Languages) {
618
- formattedValue = stringifyArray(value, MAX_VISIBLE_LANGUAGE);
619
- }
620
- if (typeof value === "boolean") {
621
- formattedValue = stringifyHasFeature(value);
622
- }
623
- }
624
- if (key === index$5.GameCharacteristic.ReleaseDate) {
625
- formattedValue = index$4.formatDate({ value, locale, options: { year: "numeric", month: "long" } });
626
- }
627
- if (key === index$5.GameCharacteristic.Volatility) {
628
- formattedValue = stringifyVolatility(value);
629
- }
630
- if (!formattedValue) {
631
- formattedValue = value.toLocaleString();
632
- }
633
- return formattedValue;
634
- }
635
- const DEFAULT_CURRENCY = "$, €, £";
636
- function getGameInfoCurrency(currency, locale) {
637
- const currencies = Array.isArray(currency) ? currency.map((code) => index$4.getCurrencySymbol(code, locale)) : [index$4.getCurrencySymbol(currency, locale)];
638
- return stringifyArray(currencies);
639
- }
640
- const GameInfo = ({ info, currencies }) => {
641
- const { t } = reactI18next.useTranslation("gameInfo");
642
- const { currentLocale } = index.usePageContext();
643
- const currency = (currencies == null ? void 0 : currencies.length) ? getGameInfoCurrency(currencies, currentLocale.code) : DEFAULT_CURRENCY;
644
- return /* @__PURE__ */ jsxRuntime.jsx(
645
- react.Box,
646
- {
647
- as: "aside",
648
- float: { base: "none", lg: "right" },
649
- w: { base: "100%", lg: "xs" },
650
- ml: { base: 0, lg: 4 },
651
- mb: { base: 0, lg: 4 },
652
- children: /* @__PURE__ */ jsxRuntime.jsxs(react.Card, { as: "article", variant: "outline", h: "100%", p: 2, children: [
653
- /* @__PURE__ */ jsxRuntime.jsx(react.CardHeader, { as: "header", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h2", fontSize: "xl", children: t("title") }) }),
654
- /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "section", p: 0, children: Object.entries(info).map(([group, items]) => /* @__PURE__ */ jsxRuntime.jsxs(react$1.Fragment, { children: [
655
- /* @__PURE__ */ jsxRuntime.jsx(react.Divider, { my: 2 }),
656
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: "semibold", mb: 2, children: t(`group.${group}`) }),
657
- Object.entries(items).map(([itemKey, itemValue]) => {
658
- if (!itemValue) {
659
- return null;
660
- }
661
- const feature = itemKey;
662
- const value = getGameInfoItemValue(feature, itemValue, currentLocale.code);
663
- return /* @__PURE__ */ jsxRuntime.jsx(GameInfoItem, { title: t(`feature.${feature}`, { currency }), value }, itemKey);
664
- })
665
- ] }, group)) })
666
- ] })
667
- }
668
- );
669
- };
670
- const HowTo = ({ steps, ...boxProps }) => {
671
- const { bgColor, invertedColor } = index$1.usePrimaryColors();
672
- return /* @__PURE__ */ jsxRuntime.jsx(react.SimpleGrid, { as: "ol", columns: { base: 1, md: 2, lg: 3 }, gap: 4, p: 0, ...boxProps, children: steps.map(({ title, description, thumbnail }, index$12) => /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "li", alignItems: "flex-start", gap: 4, children: [
673
- /* @__PURE__ */ jsxRuntime.jsx(react.Circle, { size: 12, bgColor, color: invertedColor, fontSize: "lg", fontWeight: "bold", children: String(index$12 + 1) }),
674
- /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
675
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: "lg", fontWeight: "bold", children: title }),
676
- /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: thumbnail, alt: title, mode: "thumbnail", hasZoom: true }),
677
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { children: description })
678
- ] })
679
- ] }, index$12)) });
680
- };
681
- const Container = ({ children }) => {
682
- return /* @__PURE__ */ jsxRuntime.jsx(react.Container, { maxW: "container.xl", children });
683
- };
684
- const Content = ({ children }) => {
685
- return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", py: 4, children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children }) });
686
- };
687
- const Logo = () => {
688
- const { metadata } = index.useSiteContext();
689
- const { logo } = metadata;
690
- return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { display: "flex", h: { base: 10, md: 14 }, overflow: "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(index.Image, { src: logo, alt: "Logo", objectFit: "contain" }) });
691
- };
692
- const Brand$1 = ({ brand }) => {
693
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { position: "relative", my: 2, py: 8, children: [
694
- /* @__PURE__ */ jsxRuntime.jsx(react.Divider, {}),
695
- /* @__PURE__ */ jsxRuntime.jsx(react.AbsoluteCenter, { display: "flex", bgColor: react.useColorModeValue("gray.50", "gray.900"), children: /* @__PURE__ */ jsxRuntime.jsx(index.Link, { to: "/", children: brand }) })
696
- ] });
697
- };
698
- const Copyright = () => {
699
- const { metadata } = index.useSiteContext();
700
- const { t } = reactI18next.useTranslation("footer");
701
- const siteName = metadata.name;
702
- const lang = metadata.lang;
703
- return /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "small", colorScheme: "gray", display: "flex", align: "center", justifyContent: "center", children: t("copyright", { year: index$4.getCurrentYear(lang), siteName }) });
704
- };
705
- const Disclaimer = () => {
706
- const { metadata } = index.useSiteContext();
707
- const { t } = reactI18next.useTranslation("footer");
708
- const siteName = metadata.name;
709
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "small", colorScheme: "gray", fontSize: "sm", children: [
710
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", fontWeight: "bold", color: "red.600", children: t("disclaimer.title") }),
711
- t("disclaimer.description", { siteName })
712
- ] });
713
- };
714
- const Extra = ({ children }) => {
715
- return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", my: 2, children });
716
- };
717
- const Navigation$1 = ({ menu }) => {
718
- return /* @__PURE__ */ jsxRuntime.jsx(
719
- react.SimpleGrid,
720
- {
721
- as: "ul",
722
- columns: { base: 1, sm: 2, md: 4 },
723
- mt: 4,
724
- mb: 6,
725
- p: 0,
726
- spacing: 4,
727
- justifyItems: { base: "flex-start", md: "center" },
728
- justifyContent: "space-between",
729
- children: menu.map(({ slug, label }, index$12) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", children: /* @__PURE__ */ jsxRuntime.jsx(
730
- react.Text,
731
- {
732
- as: index.Link,
733
- to: slug,
734
- fontSize: "md",
735
- fontWeight: "semibold",
736
- colorScheme: "gray",
737
- _hover: { textDecoration: "none", color: "brand.400" },
738
- children: label
739
- }
740
- ) }, index$12))
741
- }
742
- );
743
- };
744
- const Footer = () => {
745
- const { metadata, navigation, config } = index.useSiteContext();
746
- const { currentLocale } = index.usePageContext();
747
- const menu = navigation.footer[currentLocale.code] ?? [];
748
- const socialNetworks = metadata.socialNetworks ?? [];
749
- const { extra, showDisclaimer = true } = (config == null ? void 0 : config.footer) ?? {};
750
- const hasNavigation = !!menu.length;
751
- const hasSocialNetworks = !!socialNetworks.length;
752
- const hasExtra = !!extra;
753
- return /* @__PURE__ */ jsxRuntime.jsx(
754
- react.Box,
755
- {
756
- as: "footer",
757
- bg: react.useColorModeValue("gray.50", "gray.900"),
758
- color: react.useColorModeValue("gray.700", "gray.200"),
759
- py: 4,
760
- children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { children: [
761
- hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(Navigation$1, { menu }),
762
- hasExtra && /* @__PURE__ */ jsxRuntime.jsx(Extra, { children: extra }),
763
- showDisclaimer && /* @__PURE__ */ jsxRuntime.jsx(Disclaimer, {}),
764
- /* @__PURE__ */ jsxRuntime.jsx(Brand$1, { brand: /* @__PURE__ */ jsxRuntime.jsx(Logo, {}) }),
765
- hasSocialNetworks && /* @__PURE__ */ jsxRuntime.jsx(SocialNetworks, { socialNetworks, justify: "center", my: 2 }),
766
- /* @__PURE__ */ jsxRuntime.jsx(Copyright, {})
767
- ] })
768
- }
769
- );
770
- };
771
- const Brand = ({ brand }) => {
772
- return /* @__PURE__ */ jsxRuntime.jsx(index.Link, { to: "/", children: brand });
773
- };
774
- const FranceIcon = (props) => {
775
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
776
- /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsFr0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
777
- /* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsFr0)", children: [
778
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z" }),
779
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#0052b4", d: "M0 0h167v512H0z" }),
780
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "M345 0h167v512H345z" })
781
- ] })
782
- ] });
783
- };
784
- const GermanyIcon = (props) => {
785
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
786
- /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsDe0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
787
- /* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsDe0)", children: [
788
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#ffda44", d: "m0 345l256.7-25.5L512 345v167H0z" }),
789
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "m0 167l255-23l257 23v178H0z" }),
790
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#333", d: "M0 0h512v167H0z" })
791
- ] })
792
- ] });
793
- };
794
- const GlobeIcon = (props) => {
795
- return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 496", width: "1em", height: "1em", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
796
- "path",
797
- {
798
- fill: "currentColor",
799
- d: "M336.5 160C322 70.7 287.8 8 248 8s-74 62.7-88.5 152zM152 256c0 22.2 1.2 43.5 3.3 64h185.3c2.1-20.5 3.3-41.8 3.3-64s-1.2-43.5-3.3-64H155.3c-2.1 20.5-3.3 41.8-3.3 64m324.7-96c-28.6-67.9-86.5-120.4-158-141.6c24.4 33.8 41.2 84.7 50 141.6zM177.2 18.4C105.8 39.6 47.8 92.1 19.3 160h108c8.7-56.9 25.5-107.8 49.9-141.6M487.4 192H372.7c2.1 21 3.3 42.5 3.3 64s-1.2 43-3.3 64h114.6c5.5-20.5 8.6-41.8 8.6-64s-3.1-43.5-8.5-64M120 256c0-21.5 1.2-43 3.3-64H8.6C3.2 212.5 0 233.8 0 256s3.2 43.5 8.6 64h114.6c-2-21-3.2-42.5-3.2-64m39.5 96c14.5 89.3 48.7 152 88.5 152s74-62.7 88.5-152zm159.3 141.6c71.4-21.2 129.4-73.7 158-141.6h-108c-8.8 56.9-25.6 107.8-50 141.6M19.3 352c28.6 67.9 86.5 120.4 158 141.6c-24.4-33.8-41.2-84.7-50-141.6z"
800
- }
801
- ) });
802
- };
803
- const ItalyIcon = (props) => {
804
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
805
- /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsIt0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
806
- /* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsIt0)", children: [
807
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M167 0h178l25.9 252.3L345 512H167l-29.8-253.4z" }),
808
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#6da544", d: "M0 0h167v512H0z" }),
809
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "M345 0h167v512H345z" })
810
- ] })
811
- ] });
812
- };
813
- const RussiaIcon = (props) => {
814
- return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: "1em", height: "1em", ...props, children: [
815
- /* @__PURE__ */ jsxRuntime.jsx("mask", { id: "circleFlagsRu0", children: /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "256", cy: "256", r: "256", fill: "#fff" }) }),
816
- /* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#circleFlagsRu0)", children: [
817
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#0052b4", d: "M512 170v172l-256 32L0 342V170l256-32z" }),
818
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#eee", d: "M512 0v170H0V0Z" }),
819
- /* @__PURE__ */ jsxRuntime.jsx("path", { fill: "#d80027", d: "M512 342v170H0V342Z" })
820
- ] })
821
- ] });
822
- };
823
- function getMappedIcon(code) {
824
- let icon = GlobeIcon;
825
- switch (code) {
826
- case "de":
827
- icon = GermanyIcon;
828
- break;
829
- case "it":
830
- icon = ItalyIcon;
831
- break;
832
- case "ru":
833
- icon = RussiaIcon;
834
- break;
835
- case "fr":
836
- icon = FranceIcon;
837
- break;
838
- case "en":
839
- default:
840
- icon = GlobeIcon;
841
- break;
842
- }
843
- return icon;
844
- }
845
- const LocaleSwitcher = ({ currentLocale, locales }) => {
846
- const localeCode = currentLocale.code;
847
- const localeIcon = getMappedIcon(localeCode);
848
- const localeMenuItems = react$1.useMemo(
849
- () => locales.map((locale) => ({ ...locale, icon: getMappedIcon(locale.code) })),
850
- [locales]
851
- );
852
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Menu, { placement: "bottom-end", children: [
853
- /* @__PURE__ */ jsxRuntime.jsx(
854
- react.MenuButton,
855
- {
856
- as: react.Button,
857
- rightIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronDownIcon, {}),
858
- w: { base: 20, md: "28" },
859
- px: { base: 1, md: 4 },
860
- size: { base: "sm", md: "lg" },
861
- children: /* @__PURE__ */ jsxRuntime.jsxs(react.HStack, { children: [
862
- /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: localeIcon }),
863
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: localeCode.toUpperCase() })
864
- ] })
865
- }
866
- ),
867
- /* @__PURE__ */ jsxRuntime.jsx(react.MenuList, { minW: "fit-content", children: localeMenuItems.map(({ code, name, icon }) => /* @__PURE__ */ jsxRuntime.jsx(react.MenuItem, { as: index.Link, to: `/${code}`, icon: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icon, w: 4, h: 4 }), children: name }, code)) })
868
- ] });
869
- };
870
- const NavLink = react$1.forwardRef(({ slug, label }, ref) => {
871
- return /* @__PURE__ */ jsxRuntime.jsx(
872
- react.Text,
873
- {
874
- ref,
875
- as: index.Link,
876
- to: slug,
877
- p: 2,
878
- fontWeight: "semibold",
879
- _hover: { textDecoration: "none", color: "brand.400" },
880
- children: label
881
- }
882
- );
883
- });
884
- NavLink.displayName = "NavLink";
885
- const NavList$1 = ({ slug, label, children }) => {
886
- const background = react.useColorModeValue("white", "gray.800");
887
- const backgroundHover = react.useColorModeValue("brand.50", "gray.900");
888
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Popover, { trigger: "hover", placement: "bottom-start", children: [
889
- /* @__PURE__ */ jsxRuntime.jsx(react.PopoverTrigger, { children: /* @__PURE__ */ jsxRuntime.jsx(
890
- react.Text,
891
- {
892
- p: 2,
893
- fontWeight: "semibold",
894
- cursor: "pointer",
895
- tabIndex: 0,
896
- _hover: { textDecoration: "none", color: "brand.400" },
897
- children: label
898
- }
899
- ) }),
900
- /* @__PURE__ */ jsxRuntime.jsx(
901
- react.PopoverContent,
902
- {
903
- p: 2,
904
- border: 0,
905
- minW: "sm",
906
- maxH: 300,
907
- overflowY: "auto",
908
- rounded: "xl",
909
- boxShadow: "xl",
910
- bg: background,
911
- children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 2, p: 0, children: children == null ? void 0 : children.map((child, index$12) => {
912
- return /* @__PURE__ */ jsxRuntime.jsx(react.ListItem, { rounded: "md", _hover: { bg: backgroundHover }, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: index.Link, to: index$2.buildPath(child.slug, slug), p: 2, role: "group", children: [
913
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontWeight: 500, transition: "all .3s ease", _groupHover: { color: "brand.400" }, children: child.label }),
914
- /* @__PURE__ */ jsxRuntime.jsx(
915
- react.Flex,
916
- {
917
- flex: 1,
918
- justify: "flex-end",
919
- align: "center",
920
- opacity: 0,
921
- transition: "all .3s ease",
922
- transform: "translateX(-10px)",
923
- _groupHover: { opacity: 1, transform: "translateX(0)" },
924
- children: /* @__PURE__ */ jsxRuntime.jsx(react.Icon, { as: icons.ChevronRightIcon, color: "brand.400", w: 5, h: 5 })
925
- }
926
- )
927
- ] }) }, index$12);
928
- }) })
929
- }
930
- )
931
- ] });
932
- };
933
- const DesktopNavigation = ({ menu }) => {
934
- return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "ul", role: "list", gap: 2, p: 0, display: { base: "none", md: "flex" }, children: menu.map((item, index2) => {
935
- var _a;
936
- return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx(NavList$1, { ...item }) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { ...item }) }, index2);
937
- }) });
938
- };
939
- const CHEVRON_DOWN_ICON_SIZE = "1.5rem";
940
- const NavList = ({ slug, label, children, isExpanded, onExpand }) => {
941
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { flex: 1, children: [
942
- /* @__PURE__ */ jsxRuntime.jsxs(
943
- react.Flex,
944
- {
945
- as: "button",
946
- p: 2,
947
- pr: "3px",
948
- align: "center",
949
- justifyContent: "space-between",
950
- _hover: { textDecoration: "none", color: "brand.400" },
951
- onClick: onExpand,
952
- children: [
953
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { isTruncated: true, fontWeight: 600, children: label }),
954
- /* @__PURE__ */ jsxRuntime.jsx(
955
- icons.ChevronDownIcon,
956
- {
957
- w: CHEVRON_DOWN_ICON_SIZE,
958
- h: CHEVRON_DOWN_ICON_SIZE,
959
- transform: isExpanded ? "rotate(180deg)" : "",
960
- transition: "all .25s ease-in-out"
961
- }
962
- )
963
- ]
964
- }
965
- ),
966
- /* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isExpanded, transition: { enter: { ease: "easeIn" }, exit: { duration: 0.2 } }, children: /* @__PURE__ */ jsxRuntime.jsx(
967
- react.List,
968
- {
969
- ml: 2,
970
- pl: 0,
971
- maxH: 300,
972
- overflowY: "auto",
973
- borderLeft: 1,
974
- borderStyle: "solid",
975
- borderColor: react.useColorModeValue("gray.200", "gray.700"),
976
- children: children == null ? void 0 : children.map((child, index$12) => /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: index.Link, to: index$2.buildPath(child.slug, slug), p: 2, fontSize: "sm", children: child.label }) }, index$12))
977
- }
978
- ) })
979
- ] });
980
- };
981
- const CLOSE_ICON_SIZE = "0.75rem";
982
- const HAMBURGER_ICON_SIZE = "1rem";
983
- const MobileNavigation = ({ menu }) => {
984
- const [expanded, setExpanded] = react$1.useState(null);
985
- const { isOpen, onToggle } = react.useDisclosure();
986
- const background = react.useColorModeValue("gray.50", "gray.900");
987
- function handleExpand(index2) {
988
- return () => {
989
- setExpanded((prev) => prev === index2 ? null : index2);
990
- };
991
- }
992
- function handleClick() {
993
- setExpanded(null);
994
- onToggle();
995
- }
996
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Box, { display: { base: "block", md: "none" }, children: [
997
- /* @__PURE__ */ jsxRuntime.jsx(
998
- react.IconButton,
999
- {
1000
- icon: isOpen ? /* @__PURE__ */ jsxRuntime.jsx(icons.CloseIcon, { w: CLOSE_ICON_SIZE, h: CLOSE_ICON_SIZE }) : /* @__PURE__ */ jsxRuntime.jsx(icons.HamburgerIcon, { w: HAMBURGER_ICON_SIZE, h: HAMBURGER_ICON_SIZE }),
1001
- size: "sm",
1002
- variant: "ghost",
1003
- "aria-label": `${isOpen ? "Close" : "Open"} navigation menu`,
1004
- "aria-expanded": isOpen,
1005
- onClick: handleClick
1006
- }
1007
- ),
1008
- /* @__PURE__ */ jsxRuntime.jsx(react.Collapse, { in: isOpen, animateOpacity: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.Box, { position: "absolute", top: 16, left: 0, right: 0, w: "100vw", px: 2, children: /* @__PURE__ */ jsxRuntime.jsx(
1009
- react.List,
1010
- {
1011
- spacing: 2,
1012
- p: 2,
1013
- boxShadow: "md",
1014
- borderWidth: "1px",
1015
- borderColor: react.useColorModeValue("gray.200", "gray.700"),
1016
- borderRadius: "md",
1017
- bg: background,
1018
- children: menu.map((item, index2) => {
1019
- var _a;
1020
- return /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { as: "li", role: "listitem", children: ((_a = item.children) == null ? void 0 : _a.length) ? /* @__PURE__ */ jsxRuntime.jsx(NavList, { ...item, isExpanded: index2 === expanded, onExpand: handleExpand(index2) }) : /* @__PURE__ */ jsxRuntime.jsx(NavLink, { ...item }) }, index2);
1021
- })
1022
- }
1023
- ) }) })
1024
- ] });
1025
- };
1026
- const Navigation = ({ menu }) => {
1027
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1028
- /* @__PURE__ */ jsxRuntime.jsx(DesktopNavigation, { menu }),
1029
- /* @__PURE__ */ jsxRuntime.jsx(MobileNavigation, { menu })
1030
- ] });
1031
- };
1032
- const Header = () => {
1033
- var _a;
1034
- const { navigation, localization, config } = index.useSiteContext();
1035
- const { currentLocale } = index.usePageContext();
1036
- const locales = localization.locales;
1037
- const menu = navigation.header[currentLocale.code] ?? [];
1038
- const toolbar = (_a = config == null ? void 0 : config.header) == null ? void 0 : _a.toolbar;
1039
- const isMultiLanguage = locales.length > 1;
1040
- const hasNavigation = !!menu.length;
1041
- const hasToolbar = !!toolbar || isMultiLanguage;
1042
- return /* @__PURE__ */ jsxRuntime.jsx(
1043
- react.Box,
1044
- {
1045
- as: "header",
1046
- position: "sticky",
1047
- top: 0,
1048
- bg: react.useColorModeValue("white", "gray.900"),
1049
- color: react.useColorModeValue("gray.700", "gray.200"),
1050
- boxShadow: "sm",
1051
- zIndex: 100,
1052
- children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "nav", gap: 2, py: 2, children: [
1053
- /* @__PURE__ */ jsxRuntime.jsx(Brand, { brand: /* @__PURE__ */ jsxRuntime.jsx(Logo, {}) }),
1054
- (hasNavigation || hasToolbar) && /* @__PURE__ */ jsxRuntime.jsxs(
1055
- react.Flex,
1056
- {
1057
- as: "section",
1058
- flex: 1,
1059
- flexDir: { base: "row-reverse", md: "row" },
1060
- justifyContent: "end",
1061
- align: "center",
1062
- gap: 2,
1063
- children: [
1064
- hasNavigation && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { flex: { base: 0, md: 1 }, children: /* @__PURE__ */ jsxRuntime.jsx(Navigation, { menu }) }),
1065
- hasToolbar && /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { gap: 2, flex: { base: 1, md: 0 }, justifyContent: "flex-end", children: [
1066
- !!toolbar && toolbar,
1067
- isMultiLanguage && /* @__PURE__ */ jsxRuntime.jsx(LocaleSwitcher, { currentLocale, locales })
1068
- ] })
1069
- ]
1070
- }
1071
- )
1072
- ] }) })
1073
- }
1074
- );
1075
- };
1076
- const Hero = ({ title, subtitle, content, link, image }) => {
1077
- return /* @__PURE__ */ jsxRuntime.jsx(react.Box, { as: "section", bg: "gray.900", children: /* @__PURE__ */ jsxRuntime.jsx(Container, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { direction: { base: "column", md: "row" }, children: [
1078
- /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { align: "center", justify: { base: "center", md: "flex-start" }, flex: 1, py: 8, pe: 8, children: /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 6, w: "full", maxW: "lg", children: [
1079
- /* @__PURE__ */ jsxRuntime.jsxs(react.Heading, { as: "h1", fontSize: { base: "3xl", md: "4xl", lg: "5xl" }, children: [
1080
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", display: "block", children: [
1081
- title,
1082
- " —"
1083
- ] }),
1084
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "span", display: "block", color: "brand.400", children: subtitle })
1085
- ] }),
1086
- /* @__PURE__ */ jsxRuntime.jsx(react.Text, { fontSize: { base: "md", lg: "lg" }, color: "gray.500", children: content }),
1087
- !!link && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { direction: { base: "column", md: "row" }, children: /* @__PURE__ */ jsxRuntime.jsx(LinkButton, { ...link, size: "md", textDecoration: "none" }) })
1088
- ] }) }),
1089
- image && /* @__PURE__ */ jsxRuntime.jsx(react.Flex, { display: { base: "none", md: "flex" }, flex: 1, children: image })
1090
- ] }) }) });
1091
- };
1092
- const Main = ({ children }) => {
1093
- return /* @__PURE__ */ jsxRuntime.jsx(
1094
- react.Flex,
1095
- {
1096
- as: "main",
1097
- direction: "column",
1098
- flexGrow: 1,
1099
- bg: react.useColorModeValue("white", "gray.800"),
1100
- color: react.useColorModeValue("gray.700", "gray.200"),
1101
- children
1102
- }
1103
- );
1104
- };
1105
- const ScrollToTop = () => {
1106
- const [isVisible, setIsVisible] = react$1.useState(false);
1107
- react$1.useEffect(() => {
1108
- const toggleVisibility = () => {
1109
- setIsVisible(window.scrollY > 300);
1110
- };
1111
- window.addEventListener("scroll", toggleVisibility);
1112
- return () => {
1113
- window.removeEventListener("scroll", toggleVisibility);
1114
- };
1115
- }, []);
1116
- function handleClick() {
1117
- window.scrollTo({
1118
- top: 0,
1119
- behavior: "smooth"
1120
- });
1121
- }
1122
- return /* @__PURE__ */ jsxRuntime.jsx(
1123
- react.Box,
1124
- {
1125
- position: "fixed",
1126
- bottom: { base: 4, md: 8, lg: 16 },
1127
- right: { base: 4, md: 8, lg: 16 },
1128
- zIndex: "1000",
1129
- opacity: isVisible ? 1 : 0,
1130
- transform: isVisible ? "translateY(0)" : "translateY(0.5rem)",
1131
- transition: "opacity 0.4s ease, transform 0.4s ease",
1132
- pointerEvents: isVisible ? "auto" : "none",
1133
- children: /* @__PURE__ */ jsxRuntime.jsx(
1134
- react.IconButton,
1135
- {
1136
- "aria-label": "Scroll to top",
1137
- icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ChevronUpIcon, { w: 6, h: 6 }),
1138
- size: "lg",
1139
- shadow: "lg",
1140
- colorScheme: "brand",
1141
- isRound: true,
1142
- onClick: handleClick
1143
- }
1144
- )
1145
- }
1146
- );
1147
- };
1148
- const Layout = ({ children }) => {
1149
- const content = typeof children === "function" ? children({ Hero, Content }) : /* @__PURE__ */ jsxRuntime.jsx(Content, { children });
1150
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { spacing: 0, position: "relative", w: "100%", minH: "100dvh", children: [
1151
- /* @__PURE__ */ jsxRuntime.jsx(Header, {}),
1152
- /* @__PURE__ */ jsxRuntime.jsx(Main, { children: content }),
1153
- /* @__PURE__ */ jsxRuntime.jsx(Footer, {}),
1154
- /* @__PURE__ */ jsxRuntime.jsx(ScrollToTop, {})
1155
- ] });
1156
- };
1157
- const List = ({ items, bullet = "—", render, ...boxProps }) => {
1158
- return /* @__PURE__ */ jsxRuntime.jsx(react.List, { pl: 0, ml: 2, ...boxProps, children: items.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { display: "flex", gap: 1, children: [
1159
- /* @__PURE__ */ jsxRuntime.jsx(react.Box, { children: bullet }),
1160
- render ? render(item) : item
1161
- ] }, index2)) });
1162
- };
1163
- const NotFound = () => {
1164
- const { t } = reactI18next.useTranslation("pageNotFound");
1165
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Stack, { gap: 4, children: [
1166
- /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h1", children: t("title") }),
1167
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontSize: "xl", children: [
1168
- t("description"),
1169
- " ",
1170
- /* @__PURE__ */ jsxRuntime.jsx(react.Button, { as: index.Link, to: "/", variant: "link", colorScheme: "brand", fontSize: "xl", children: t("action") })
1171
- ] })
1172
- ] });
1173
- };
1174
- const TitleMap = {
1175
- pros: "advantages",
1176
- cons: "disadvantages"
1177
- };
1178
- const IconMap = {
1179
- pros: icons.CheckCircleIcon,
1180
- cons: icons.WarningIcon
1181
- };
1182
- const IconColorMap = {
1183
- pros: "green.500",
1184
- cons: "red.500"
1185
- };
1186
- const BgColorMap = {
1187
- pros: "green",
1188
- cons: "red"
1189
- };
1190
- const ProsConsCard = ({ itemType, items }) => {
1191
- const { t } = reactI18next.useTranslation("prosCons");
1192
- return /* @__PURE__ */ jsxRuntime.jsxs(
1193
- react.Card,
1194
- {
1195
- as: "article",
1196
- flex: 1,
1197
- p: 2,
1198
- bgColor: react.useColorModeValue(`${BgColorMap[itemType]}.100`, `${BgColorMap[itemType]}.800`),
1199
- children: [
1200
- /* @__PURE__ */ jsxRuntime.jsx(
1201
- react.CardHeader,
1202
- {
1203
- as: "header",
1204
- p: 2,
1205
- borderTopRadius: "md",
1206
- bgColor: react.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
1207
- children: /* @__PURE__ */ jsxRuntime.jsx(react.Heading, { as: "h3", textTransform: "uppercase", fontSize: "xl", children: t(TitleMap[itemType]) })
1208
- }
1209
- ),
1210
- /* @__PURE__ */ jsxRuntime.jsx(
1211
- react.CardBody,
1212
- {
1213
- as: "section",
1214
- p: 2,
1215
- borderBottomRadius: "md",
1216
- bgColor: react.useColorModeValue("whiteAlpha.800", "blackAlpha.800"),
1217
- children: /* @__PURE__ */ jsxRuntime.jsx(react.List, { spacing: 4, p: 0, children: items.map(({ title, description }) => /* @__PURE__ */ jsxRuntime.jsxs(react.ListItem, { display: "flex", children: [
1218
- /* @__PURE__ */ jsxRuntime.jsx(react.ListIcon, { as: IconMap[itemType], w: 6, h: 6, color: IconColorMap[itemType] }),
1219
- /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { fontWeight: "semibold", fontSize: "md", children: [
1220
- title,
1221
- !!description && /* @__PURE__ */ jsxRuntime.jsxs(react.Text, { as: "span", fontWeight: "normal", children: [
1222
- ": ",
1223
- description
1224
- ] })
1225
- ] })
1226
- ] }, title)) })
1227
- }
1228
- )
1229
- ]
1230
- }
1231
- );
1232
- };
1233
- const ProsCons = ({ items, ...boxProps }) => {
1234
- const { pros, cons } = items;
1235
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Flex, { as: "section", direction: { base: "column", md: "row" }, gap: 4, ...boxProps, children: [
1236
- /* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "pros", items: pros }),
1237
- /* @__PURE__ */ jsxRuntime.jsx(ProsConsCard, { itemType: "cons", items: cons })
1238
- ] });
1239
- };
1240
- function replacePlaceholders(text, placeholders) {
1241
- Object.entries(placeholders).forEach(([placeholder, replacement]) => {
1242
- const regex = new RegExp(`{{${placeholder}}}`, "g");
1243
- text = text.replace(regex, replacement);
1244
- });
1245
- return text;
1246
- }
1247
- const Seo = ({ children, title, description, lang }) => {
1248
- const { metadata } = index.useSiteContext();
1249
- const { name: siteName, lang: defaultLang, seo } = metadata;
1250
- const { title: defaultTitle, description: defaultDescription } = seo;
1251
- const siteLang = lang || defaultLang;
1252
- const placeholders = react$1.useMemo(
1253
- () => ({
1254
- siteName,
1255
- currentYear: index$4.getCurrentYear(siteLang),
1256
- currentMonth: index$4.getCurrentMonth(siteLang)
1257
- }),
1258
- [siteName, siteLang]
1259
- );
1260
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1261
- /* @__PURE__ */ jsxRuntime.jsx("html", { lang: siteLang }),
1262
- /* @__PURE__ */ jsxRuntime.jsx("title", { children: title ? typeof title === "string" ? replacePlaceholders(title, placeholders) : title(placeholders) : defaultTitle }),
1263
- /* @__PURE__ */ jsxRuntime.jsx(
1264
- "meta",
1265
- {
1266
- name: "description",
1267
- content: description ? typeof description === "string" ? replacePlaceholders(description, placeholders) : description(placeholders) : defaultDescription
1268
- }
1269
- ),
1270
- children
1271
- ] });
1272
- };
1273
- const Table = ({
1274
- columnNumber,
1275
- items,
1276
- caption,
1277
- bordered = false,
1278
- striped = true,
1279
- scrollable,
1280
- ...boxProps
1281
- }) => {
1282
- const headerItems = items.slice(0, columnNumber);
1283
- const bodyItems = items.slice(columnNumber);
1284
- return /* @__PURE__ */ jsxRuntime.jsx(
1285
- react.TableContainer,
1286
- {
1287
- border: bordered ? void 0 : "none",
1288
- ...scrollable ? { maxH: "50vh", overflowY: "auto" } : {},
1289
- ...boxProps,
1290
- children: /* @__PURE__ */ jsxRuntime.jsxs(react.Table, { variant: striped ? "striped" : "simple", children: [
1291
- /* @__PURE__ */ jsxRuntime.jsx(react.Thead, { ...scrollable ? { position: "sticky", top: 0, zIndex: 1, bg: "gray.800" } : {}, children: /* @__PURE__ */ jsxRuntime.jsx(react.Tr, { children: headerItems.map((item, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Th, { children: item }, index2)) }) }),
1292
- /* @__PURE__ */ jsxRuntime.jsx(react.Tbody, { children: Array.from({ length: Math.ceil(bodyItems.length / columnNumber) }, (_, rowIndex) => /* @__PURE__ */ jsxRuntime.jsx(react.Tr, { children: Array.from({ length: columnNumber }, (_2, colIndex) => /* @__PURE__ */ jsxRuntime.jsx(react.Td, { children: bodyItems[rowIndex * columnNumber + colIndex] || "" }, colIndex)) }, rowIndex)) }),
1293
- !!caption && /* @__PURE__ */ jsxRuntime.jsx(react.TableCaption, { children: caption })
1294
- ] })
1295
- }
1296
- );
1297
- };
1298
- const Tip = ({ tip, author = null, ...boxProps }) => {
1299
- return /* @__PURE__ */ jsxRuntime.jsxs(
1300
- react.Card,
1301
- {
1302
- variant: "filled",
1303
- p: 4,
1304
- borderLeft: "4px solid gray",
1305
- gap: 4,
1306
- _before: {
1307
- content: '"❛❛"',
1308
- position: "absolute",
1309
- top: -8,
1310
- left: -2,
1311
- fontSize: "6rem",
1312
- fontStyle: "italic",
1313
- color: react.useColorModeValue("blackAlpha.300", "whiteAlpha.300")
1314
- },
1315
- ...boxProps,
1316
- children: [
1317
- /* @__PURE__ */ jsxRuntime.jsx(react.CardBody, { as: "blockquote", p: 0, fontStyle: "italic", children: tip }),
1318
- !!author && /* @__PURE__ */ jsxRuntime.jsx(react.CardFooter, { alignItems: "center", justify: "flex-end", p: 0, children: /* @__PURE__ */ jsxRuntime.jsx(Author, { author, variant: "short" }) })
1319
- ]
1320
- }
1321
- );
1322
- };
1323
- const ExternalImage = ({ image, component: ImageComponent, alt = "", ...imageProps }) => {
1324
- var _a, _b;
1325
- const imageData = (_b = (_a = image == null ? void 0 : image.localFile) == null ? void 0 : _a.childImageSharp) == null ? void 0 : _b.gatsbyImageData;
1326
- return imageData ? /* @__PURE__ */ jsxRuntime.jsx(ImageComponent, { image: imageData, alt, ...imageProps }) : null;
1327
- };
1328
- const RichText = ({ content }) => {
1329
- const components = react$2.useMDXComponents();
1330
- return /* @__PURE__ */ jsxRuntime.jsx(Markdown, { components, children: content });
1331
- };
1332
- function extractItemsFromJson(content) {
1333
- return content.strapi_json_value;
1334
- }
1335
- function extractCurrencies(currencyList) {
1336
- if (!currencyList) {
1337
- return [];
1338
- }
1339
- return [...new Set(currencyList.items.map(({ code }) => code))];
1340
- }
1341
- const StrapiComponent = ({ type, props, imageComponent }) => {
1342
- switch (type) {
1343
- case "STRAPI__COMPONENT_CONTENT_FAQ":
1344
- return /* @__PURE__ */ jsxRuntime.jsx(Faq, { items: props.items, mb: 4 });
1345
- case "STRAPI__COMPONENT_CONTENT_FEATURES":
1346
- return /* @__PURE__ */ jsxRuntime.jsx(FeatureCardGrid, { items: props.items, mb: 4 });
1347
- case "STRAPI__COMPONENT_CONTENT_GAME_DEMO":
1348
- return /* @__PURE__ */ jsxRuntime.jsx(
1349
- GameDemo,
1350
- {
1351
- name: props.name,
1352
- src: props.src,
1353
- href: props.href,
1354
- previewImage: /* @__PURE__ */ jsxRuntime.jsx(ExternalImage, { image: props.previewImage, alt: props.name, component: imageComponent }),
1355
- mb: 4
1356
- }
1357
- );
1358
- case "STRAPI__COMPONENT_CONTENT_GAME_INFO":
1359
- return /* @__PURE__ */ jsxRuntime.jsx(
1360
- GameInfo,
1361
- {
1362
- info: { general: props.general, features: props.features },
1363
- currencies: extractCurrencies(props.currency)
1364
- }
1365
- );
1366
- case "STRAPI__COMPONENT_CONTENT_HOW_TO":
1367
- return /* @__PURE__ */ jsxRuntime.jsx(
1368
- HowTo,
1369
- {
1370
- steps: props.steps.map((step) => {
1371
- return {
1372
- ...step,
1373
- thumbnail: /* @__PURE__ */ jsxRuntime.jsx(ExternalImage, { image: step.thumbnail, alt: step.title, component: imageComponent })
1374
- };
1375
- }),
1376
- mb: 4
1377
- }
1378
- );
1379
- case "STRAPI__COMPONENT_CONTENT_LIST":
1380
- return /* @__PURE__ */ jsxRuntime.jsx(List, { bullet: props.bullet, items: extractItemsFromJson(props.content), mb: 4 });
1381
- case "STRAPI__COMPONENT_CONTENT_MEDIA":
1382
- return /* @__PURE__ */ jsxRuntime.jsx(
1383
- index.Image,
1384
- {
1385
- src: /* @__PURE__ */ jsxRuntime.jsx(ExternalImage, { component: imageComponent, image: props.file, alt: props.alternativeText }),
1386
- mb: 4,
1387
- hasZoom: true
1388
- }
1389
- );
1390
- case "STRAPI__COMPONENT_CONTENT_PROS_CONS":
1391
- return /* @__PURE__ */ jsxRuntime.jsx(ProsCons, { items: { ...props }, mb: 4 });
1392
- case "STRAPI__COMPONENT_CONTENT_RICH_TEXT":
1393
- return /* @__PURE__ */ jsxRuntime.jsx(RichText, { content: props.content.data.content });
1394
- case "STRAPI__COMPONENT_CONTENT_TABLE":
1395
- return /* @__PURE__ */ jsxRuntime.jsx(
1396
- Table,
1397
- {
1398
- columnNumber: props.columnNumber,
1399
- items: extractItemsFromJson(props.content),
1400
- caption: props.caption,
1401
- bordered: props.bordered,
1402
- scrollable: props.scrollable,
1403
- striped: props.striped,
1404
- mb: 4
1405
- }
1406
- );
1407
- case "STRAPI__COMPONENT_CONTENT_TIP":
1408
- return /* @__PURE__ */ jsxRuntime.jsx(
1409
- Tip,
1410
- {
1411
- tip: props.tip,
1412
- author: props.author ? {
1413
- ...props.author,
1414
- avatar: /* @__PURE__ */ jsxRuntime.jsx(
1415
- ExternalImage,
1416
- {
1417
- component: imageComponent,
1418
- image: props.author.avatar,
1419
- alt: props.author.name,
1420
- style: { borderRadius: "50%" }
1421
- }
1422
- )
1423
- } : null,
1424
- mb: 4
1425
- }
1426
- );
1427
- default:
1428
- return null;
1429
- }
1430
- };
1431
- function isStrapiContent(array) {
1432
- return Array.isArray(array) && array.every(
1433
- (item) => typeof item === "object" && item !== null && "__typename" in item && typeof item.__typename === "string"
1434
- );
1435
- }
1436
- const StrapiContentRenderer = ({ content, imageComponent }) => {
1437
- if (!isStrapiContent(content)) {
1438
- return null;
1439
- }
1440
- return content.map(({ __typename: type, ...props }, index2) => /* @__PURE__ */ jsxRuntime.jsx(StrapiComponent, { type, props, imageComponent }, index2));
1441
- };
1442
- const Tabs = ({ items, render, ...boxProps }) => {
1443
- const { tabs, panels } = react$1.useMemo(() => {
1444
- const tabs2 = [];
1445
- const panels2 = [];
1446
- items.forEach(({ content, ...tab }) => {
1447
- tabs2.push(tab);
1448
- panels2.push(content);
1449
- });
1450
- return { tabs: tabs2, panels: panels2 };
1451
- }, []);
1452
- return /* @__PURE__ */ jsxRuntime.jsxs(react.Tabs, { overflow: "hidden", colorScheme: "brand", ...boxProps, children: [
1453
- /* @__PURE__ */ jsxRuntime.jsx(react.TabList, { overflow: "auto hidden", children: tabs.map(({ label, icon }, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.Tab, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Text, { as: "h3", isTruncated: true, children: icon ? `${icon} ${label}` : label }) }, index2)) }),
1454
- /* @__PURE__ */ jsxRuntime.jsx(react.TabPanels, { children: panels.map((panel, index2) => /* @__PURE__ */ jsxRuntime.jsx(react.TabPanel, { children: render ? render(panel) : panel }, index2)) })
1455
- ] });
1456
- };
1457
- exports.Author = Author;
1458
- exports.AuthorCard = AuthorCard;
1459
- exports.BonusCard = BonusCard;
1460
- exports.BonusCardGrid = BonusCardGrid;
1461
- exports.Center = Center;
1462
- exports.ContactForm = ContactForm;
1463
- exports.Faq = Faq;
1464
- exports.FeatureCard = FeatureCard;
1465
- exports.FeatureCardGrid = FeatureCardGrid;
1466
- exports.GameCard = GameCard;
1467
- exports.GameCardGrid = GameCardGrid;
1468
- exports.GameDemo = GameDemo;
1469
- exports.GameInfo = GameInfo;
1470
- exports.Grid = Grid;
1471
- exports.HowTo = HowTo;
1472
- exports.Layout = Layout;
1473
- exports.LinkButton = LinkButton;
1474
- exports.List = List;
1475
- exports.NotFound = NotFound;
1476
- exports.ProsCons = ProsCons;
1477
- exports.Seo = Seo;
1478
- exports.SocialNetwork = SocialNetwork;
1479
- exports.SocialNetworks = SocialNetworks;
1480
- exports.StrapiContentRenderer = StrapiContentRenderer;
1481
- exports.Table = Table;
1482
- exports.Tabs = Tabs;
1483
- exports.Tip = Tip;