dirk-cfx-react 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,1256 @@
1
+ 'use strict';
2
+
3
+ var reactFontawesome = require('@fortawesome/react-fontawesome');
4
+ var core = require('@mantine/core');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var framerMotion = require('framer-motion');
7
+ var react = require('react');
8
+ var zustand = require('zustand');
9
+ require('@mantine/notifications/styles.css');
10
+ require('@mantine/core/styles.css');
11
+ require('@/styles/niceFont.css');
12
+ require('@/styles/scrollBar.css');
13
+ var fontawesomeSvgCore = require('@fortawesome/fontawesome-svg-core');
14
+ var freeBrandsSvgIcons = require('@fortawesome/free-brands-svg-icons');
15
+ var freeRegularSvgIcons = require('@fortawesome/free-regular-svg-icons');
16
+ var freeSolidSvgIcons = require('@fortawesome/free-solid-svg-icons');
17
+
18
+ // src/components/BorderedIcon.tsx
19
+
20
+ // src/utils/colorWithAlpha.ts
21
+ var colorNames = {
22
+ AliceBlue: { r: 240, g: 248, b: 255 },
23
+ AntiqueWhite: { r: 250, g: 235, b: 215 },
24
+ Aqua: { r: 0, g: 255, b: 255 },
25
+ Aquamarine: { r: 127, g: 255, b: 212 },
26
+ Azure: { r: 240, g: 255, b: 255 },
27
+ Beige: { r: 245, g: 245, b: 220 },
28
+ Bisque: { r: 255, g: 228, b: 196 },
29
+ Black: { r: 0, g: 0, b: 0 },
30
+ BlanchedAlmond: { r: 255, g: 235, b: 205 },
31
+ Blue: { r: 0, g: 0, b: 255 },
32
+ BlueViolet: { r: 138, g: 43, b: 226 },
33
+ Brown: { r: 165, g: 42, b: 42 },
34
+ BurlyWood: { r: 222, g: 184, b: 135 },
35
+ CadetBlue: { r: 95, g: 158, b: 160 },
36
+ Chartreuse: { r: 127, g: 255, b: 0 },
37
+ Chocolate: { r: 210, g: 105, b: 30 },
38
+ Coral: { r: 255, g: 127, b: 80 },
39
+ CornflowerBlue: { r: 100, g: 149, b: 237 },
40
+ Cornsilk: { r: 255, g: 248, b: 220 },
41
+ Crimson: { r: 220, g: 20, b: 60 },
42
+ Cyan: { r: 0, g: 255, b: 255 },
43
+ DarkBlue: { r: 0, g: 0, b: 139 },
44
+ DarkCyan: { r: 0, g: 139, b: 139 },
45
+ DarkGoldenRod: { r: 184, g: 134, b: 11 },
46
+ DarkGray: { r: 169, g: 169, b: 169 },
47
+ DarkGreen: { r: 0, g: 100, b: 0 },
48
+ DarkKhaki: { r: 189, g: 183, b: 107 },
49
+ DarkMagenta: { r: 139, g: 0, b: 139 },
50
+ DarkOliveGreen: { r: 85, g: 107, b: 47 },
51
+ DarkOrange: { r: 255, g: 140, b: 0 },
52
+ DarkOrchid: { r: 153, g: 50, b: 204 },
53
+ DarkRed: { r: 139, g: 0, b: 0 },
54
+ DarkSalmon: { r: 233, g: 150, b: 122 },
55
+ DarkSeaGreen: { r: 143, g: 188, b: 143 },
56
+ DarkSlateBlue: { r: 72, g: 61, b: 139 },
57
+ DarkSlateGray: { r: 47, g: 79, b: 79 },
58
+ DarkTurquoise: { r: 0, g: 206, b: 209 },
59
+ DarkViolet: { r: 148, g: 0, b: 211 },
60
+ DeepPink: { r: 255, g: 20, b: 147 },
61
+ DeepSkyBlue: { r: 0, g: 191, b: 255 },
62
+ DimGray: { r: 105, g: 105, b: 105 },
63
+ DodgerBlue: { r: 30, g: 144, b: 255 },
64
+ FireBrick: { r: 178, g: 34, b: 34 },
65
+ FloralWhite: { r: 255, g: 250, b: 240 },
66
+ ForestGreen: { r: 34, g: 139, b: 34 },
67
+ Fuchsia: { r: 255, g: 0, b: 255 },
68
+ Gainsboro: { r: 220, g: 220, b: 220 },
69
+ GhostWhite: { r: 248, g: 248, b: 255 },
70
+ Gold: { r: 255, g: 215, b: 0 },
71
+ GoldenRod: { r: 218, g: 165, b: 32 },
72
+ Gray: { r: 128, g: 128, b: 128 },
73
+ Green: { r: 0, g: 128, b: 0 },
74
+ GreenYellow: { r: 173, g: 255, b: 47 },
75
+ HoneyDew: { r: 240, g: 255, b: 240 },
76
+ HotPink: { r: 255, g: 105, b: 180 },
77
+ IndianRed: { r: 205, g: 92, b: 92 },
78
+ Indigo: { r: 75, g: 0, b: 130 },
79
+ Ivory: { r: 255, g: 255, b: 240 },
80
+ Khaki: { r: 240, g: 230, b: 140 },
81
+ Lavender: { r: 230, g: 230, b: 250 },
82
+ LavenderBlush: { r: 255, g: 240, b: 245 },
83
+ LawnGreen: { r: 124, g: 252, b: 0 },
84
+ LemonChiffon: { r: 255, g: 250, b: 205 },
85
+ LightBlue: { r: 173, g: 216, b: 230 },
86
+ LightCoral: { r: 240, g: 128, b: 128 },
87
+ LightCyan: { r: 224, g: 255, b: 255 },
88
+ LightGoldenRodYellow: { r: 250, g: 250, b: 210 },
89
+ LightGray: { r: 211, g: 211, b: 211 },
90
+ LightGreen: { r: 144, g: 238, b: 144 },
91
+ LightPink: { r: 255, g: 182, b: 193 },
92
+ LightSalmon: { r: 255, g: 160, b: 122 },
93
+ LightSeaGreen: { r: 32, g: 178, b: 170 },
94
+ LightSkyBlue: { r: 135, g: 206, b: 250 },
95
+ LightSlateGray: { r: 119, g: 136, b: 153 },
96
+ LightSteelBlue: { r: 176, g: 196, b: 222 },
97
+ LightYellow: { r: 255, g: 255, b: 224 },
98
+ Lime: { r: 0, g: 255, b: 0 },
99
+ LimeGreen: { r: 50, g: 205, b: 50 },
100
+ Linen: { r: 250, g: 240, b: 230 },
101
+ Magenta: { r: 255, g: 0, b: 255 },
102
+ Maroon: { r: 128, g: 0, b: 0 },
103
+ // Maroon
104
+ MediumAquaMarine: { r: 102, g: 205, b: 170 },
105
+ MediumBlue: { r: 0, g: 0, b: 205 },
106
+ MediumOrchid: { r: 186, g: 85, b: 211 },
107
+ MediumPurple: { r: 147, g: 112, b: 219 },
108
+ MediumSeaGreen: { r: 60, g: 179, b: 113 },
109
+ MediumSlateBlue: { r: 123, g: 104, b: 238 },
110
+ MediumSpringGreen: { r: 0, g: 250, b: 154 },
111
+ MediumTurquoise: { r: 72, g: 209, b: 204 },
112
+ MediumVioletRed: { r: 199, g: 21, b: 133 },
113
+ MidnightBlue: { r: 25, g: 25, b: 112 },
114
+ MintCream: { r: 245, g: 255, b: 250 },
115
+ MistyRose: { r: 255, g: 228, b: 225 },
116
+ Moccasin: { r: 255, g: 228, b: 181 },
117
+ NavajoWhite: { r: 255, g: 222, b: 173 },
118
+ Navy: { r: 0, g: 0, b: 128 },
119
+ OldLace: { r: 253, g: 245, b: 230 },
120
+ Olive: { r: 128, g: 128, b: 0 },
121
+ OliveDrab: { r: 107, g: 142, b: 35 },
122
+ Orange: { r: 255, g: 165, b: 0 },
123
+ OrangeRed: { r: 255, g: 69, b: 0 },
124
+ Orchid: { r: 218, g: 112, b: 214 },
125
+ PaleGoldenRod: { r: 238, g: 232, b: 170 },
126
+ PaleGreen: { r: 152, g: 251, b: 152 },
127
+ PaleTurquoise: { r: 175, g: 238, b: 238 },
128
+ PaleVioletRed: { r: 219, g: 112, b: 147 },
129
+ PapayaWhip: { r: 255, g: 239, b: 213 },
130
+ PeachPuff: { r: 255, g: 218, b: 185 },
131
+ Peru: { r: 205, g: 133, b: 63 },
132
+ Pink: { r: 255, g: 192, b: 203 },
133
+ Plum: { r: 221, g: 160, b: 221 },
134
+ PowderBlue: { r: 176, g: 224, b: 230 },
135
+ Purple: { r: 128, g: 0, b: 128 },
136
+ RebeccaPurple: { r: 102, g: 51, b: 153 },
137
+ Red: { r: 255, g: 0, b: 0 },
138
+ RosyBrown: { r: 188, g: 143, b: 143 },
139
+ RoyalBlue: { r: 65, g: 105, b: 225 },
140
+ SaddleBrown: { r: 139, g: 69, b: 19 },
141
+ Salmon: { r: 250, g: 128, b: 114 },
142
+ SandyBrown: { r: 244, g: 164, b: 96 },
143
+ SeaGreen: { r: 46, g: 139, b: 87 },
144
+ SeaShell: { r: 255, g: 245, b: 238 },
145
+ Sienna: { r: 160, g: 82, b: 45 },
146
+ Silver: { r: 192, g: 192, b: 192 },
147
+ SkyBlue: { r: 135, g: 206, b: 235 },
148
+ SlateBlue: { r: 106, g: 90, b: 205 },
149
+ SlateGray: { r: 112, g: 128, b: 144 },
150
+ Snow: { r: 255, g: 250, b: 250 },
151
+ SpringGreen: { r: 0, g: 255, b: 127 },
152
+ SteelBlue: { r: 70, g: 130, b: 180 },
153
+ Tan: { r: 210, g: 180, b: 140 },
154
+ Teal: { r: 0, g: 128, b: 128 },
155
+ Thistle: { r: 216, g: 191, b: 216 },
156
+ Tomato: { r: 255, g: 99, b: 71 },
157
+ Turquoise: { r: 64, g: 224, b: 208 },
158
+ Violet: { r: 238, g: 130, b: 238 },
159
+ Wheat: { r: 245, g: 222, b: 179 },
160
+ White: { r: 255, g: 255, b: 255 },
161
+ WhiteSmoke: { r: 245, g: 245, b: 245 },
162
+ Yellow: { r: 255, g: 255, b: 0 },
163
+ YellowGreen: { r: 154, g: 205, b: 50 }
164
+ };
165
+ function colorWithAlpha(color, alpha) {
166
+ const lowerCasedColor = color.toLowerCase();
167
+ if (colorNames[lowerCasedColor]) {
168
+ const rgb = colorNames[lowerCasedColor];
169
+ return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha})`;
170
+ }
171
+ if (/^#([A-Fa-f0-9]{6})$/.test(color)) {
172
+ const hex = color.slice(1);
173
+ const bigint = parseInt(hex, 16);
174
+ const r = bigint >> 16 & 255;
175
+ const g = bigint >> 8 & 255;
176
+ const b = bigint & 255;
177
+ return `rgba(${r}, ${g}, ${b}, ${alpha})`;
178
+ }
179
+ if (/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/.test(color)) {
180
+ const result = color.match(/^rgb\((\d{1,3}), (\d{1,3}), (\d{1,3})\)$/);
181
+ if (result) {
182
+ return `rgba(${result[1]}, ${result[2]}, ${result[3]}, ${alpha})`;
183
+ }
184
+ }
185
+ return color;
186
+ }
187
+ function BorderedIcon(props) {
188
+ const theme2 = core.useMantineTheme();
189
+ return /* @__PURE__ */ jsxRuntime.jsx(
190
+ reactFontawesome.FontAwesomeIcon,
191
+ {
192
+ icon: props.icon,
193
+ color: colorWithAlpha(props.color ? props.color : theme2.colors[theme2.primaryColor][theme2.primaryShade], props.hovered ? 0.9 : 0.9),
194
+ style: {
195
+ // backgroundColor: colorWithAlpha(props.color ? props.color : theme.colors[theme.primaryColor][7 as number], (props.hoverable ? (props.hovered ? 0.3 : 0.2) : 0.2)),
196
+ backgroundColor: "rgba(0, 0, 0, 0.5)",
197
+ padding: props.p || theme2.spacing.xs,
198
+ transition: "all 0.2s ease-in-out",
199
+ aspectRatio: "1/1",
200
+ fontSize: props.fontSize ? props.fontSize : "2.5vh",
201
+ borderRadius: theme2.radius.xs,
202
+ // border: `2px solid var(--mantine-primary-color-9)`,
203
+ outline: `0.2vh solid ${colorWithAlpha(props.color ? props.color : theme2.colors[theme2.primaryColor][9], 0.8)}`,
204
+ boxShadow: `inset 0 0 2vh ${colorWithAlpha(props.color ? props.color : theme2.colors[theme2.primaryColor][7], 0.5)}`
205
+ }
206
+ }
207
+ );
208
+ }
209
+ var MotionFlex = framerMotion.motion(core.Flex);
210
+ var MotionText = framerMotion.motion(core.Text);
211
+ var MotionIcon = framerMotion.motion(reactFontawesome.FontAwesomeIcon);
212
+ var MotionImage = framerMotion.motion(core.Image);
213
+ function Counter(props) {
214
+ return /* @__PURE__ */ jsxRuntime.jsx(framerMotion.AnimatePresence, { children: props.count > 0 && /* @__PURE__ */ jsxRuntime.jsx(
215
+ MotionFlex,
216
+ {
217
+ initial: { opacity: 0 },
218
+ animate: { opacity: 1 },
219
+ exit: { opacity: 0 },
220
+ fz: "1.25vh",
221
+ h: "1.75vh",
222
+ justify: "center",
223
+ align: "center",
224
+ bg: props.color || "rgba(0, 0, 0, 0.51)",
225
+ style: {
226
+ borderRadius: "50%",
227
+ aspectRatio: "1/1",
228
+ marginBottom: "0.3vh",
229
+ fontFamily: "Akrobat Bold",
230
+ boxShadow: "0 0 5px rgba(0, 0, 0, 0.3)"
231
+ },
232
+ children: props.count
233
+ },
234
+ "counter"
235
+ ) });
236
+ }
237
+ var FloatingParticles = ({
238
+ icons = [],
239
+ particleCount = 55,
240
+ color = "#00a552ff",
241
+ size = 32,
242
+ speed = "slow",
243
+ opacity = 0.3,
244
+ style = {},
245
+ mouseRepelDistance = 150,
246
+ mouseRepelStrength = 50,
247
+ backgroundColor = "transparent"
248
+ }) => {
249
+ const containerRef = react.useRef(null);
250
+ const [particles, setParticles] = react.useState([]);
251
+ const mouseX = framerMotion.useMotionValue(0);
252
+ const mouseY = framerMotion.useMotionValue(0);
253
+ const durationMap = {
254
+ slow: { base: 10, variance: 10 },
255
+ medium: { base: 2, variance: 2 },
256
+ fast: { base: 4, variance: 2 }
257
+ };
258
+ const duration = durationMap[speed];
259
+ const seededRandom = (seed) => {
260
+ const x = Math.sin(seed) * 1e4;
261
+ return x - Math.floor(x);
262
+ };
263
+ react.useEffect(() => {
264
+ if (!containerRef.current) return;
265
+ const bounds = containerRef.current.getBoundingClientRect();
266
+ const newParticles = [...Array(particleCount)].map((_, i) => {
267
+ const seedX = i * 123.456;
268
+ const seedY = i * 789.012;
269
+ const seedDuration = i * 345.678;
270
+ const baseX = seededRandom(seedX) * bounds.width;
271
+ const baseY = seededRandom(seedY) * bounds.height;
272
+ return {
273
+ id: i,
274
+ baseX,
275
+ baseY,
276
+ currentX: baseX,
277
+ currentY: baseY,
278
+ icon: icons.length > 0 ? icons[i % icons.length] : null,
279
+ animationDuration: duration.base + seededRandom(seedDuration) * duration.variance
280
+ };
281
+ });
282
+ setParticles(newParticles);
283
+ }, [particleCount, icons.length, duration.base, duration.variance]);
284
+ react.useEffect(() => {
285
+ if (!containerRef.current) return;
286
+ const handleMouseMove = (e) => {
287
+ const bounds = containerRef.current.getBoundingClientRect();
288
+ const x = e.clientX - bounds.left;
289
+ const y = e.clientY - bounds.top;
290
+ mouseX.set(x);
291
+ mouseY.set(y);
292
+ setParticles(
293
+ (prevParticles) => prevParticles.map((particle) => {
294
+ const dx = x - particle.baseX;
295
+ const dy = y - particle.baseY;
296
+ const distance = Math.sqrt(dx * dx + dy * dy);
297
+ if (distance < mouseRepelDistance && distance > 0) {
298
+ const force = (mouseRepelDistance - distance) / mouseRepelDistance;
299
+ const repelX = dx / distance * force * mouseRepelStrength * -1;
300
+ const repelY = dy / distance * force * mouseRepelStrength * -1;
301
+ return {
302
+ ...particle,
303
+ currentX: particle.baseX + repelX,
304
+ currentY: particle.baseY + repelY
305
+ };
306
+ } else {
307
+ return {
308
+ ...particle,
309
+ currentX: particle.baseX,
310
+ currentY: particle.baseY
311
+ };
312
+ }
313
+ })
314
+ );
315
+ };
316
+ const handleMouseLeave = () => {
317
+ setParticles(
318
+ (prevParticles) => prevParticles.map((particle) => ({
319
+ ...particle,
320
+ currentX: particle.baseX,
321
+ currentY: particle.baseY
322
+ }))
323
+ );
324
+ };
325
+ const container = containerRef.current;
326
+ container.addEventListener("mousemove", handleMouseMove);
327
+ container.addEventListener("mouseleave", handleMouseLeave);
328
+ return () => {
329
+ container.removeEventListener("mousemove", handleMouseMove);
330
+ container.removeEventListener("mouseleave", handleMouseLeave);
331
+ };
332
+ }, [mouseX, mouseY, mouseRepelDistance, mouseRepelStrength]);
333
+ react.useEffect(() => {
334
+ const handleResize = () => {
335
+ if (!containerRef.current) return;
336
+ const bounds = containerRef.current.getBoundingClientRect();
337
+ setParticles(
338
+ (prevParticles) => prevParticles.map((particle, i) => {
339
+ const seedX = i * 123.456 + bounds.width;
340
+ const seedY = i * 789.012 + bounds.height;
341
+ const newBaseX = seededRandom(seedX) * bounds.width;
342
+ const newBaseY = seededRandom(seedY) * bounds.height;
343
+ return {
344
+ ...particle,
345
+ baseX: newBaseX,
346
+ baseY: newBaseY,
347
+ currentX: newBaseX,
348
+ currentY: newBaseY
349
+ };
350
+ })
351
+ );
352
+ };
353
+ window.addEventListener("resize", handleResize);
354
+ return () => window.removeEventListener("resize", handleResize);
355
+ }, []);
356
+ return /* @__PURE__ */ jsxRuntime.jsx(
357
+ "div",
358
+ {
359
+ ref: containerRef,
360
+ style: {
361
+ position: "absolute",
362
+ overflow: "hidden",
363
+ width: "100%",
364
+ height: "100%",
365
+ zIndex: -1,
366
+ backgroundColor,
367
+ ...style
368
+ },
369
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: particles.map((particle) => /* @__PURE__ */ jsxRuntime.jsx(
370
+ framerMotion.motion.div,
371
+ {
372
+ style: {
373
+ position: "absolute",
374
+ width: size,
375
+ height: size,
376
+ color,
377
+ opacity,
378
+ left: 0,
379
+ top: 0
380
+ },
381
+ animate: {
382
+ x: particle.currentX,
383
+ y: particle.currentY,
384
+ scale: [0.8, 1.1, 0.8],
385
+ opacity: [opacity * 0.5, opacity, opacity * 0.5],
386
+ // random rotate between 0 and 360 so that not all particles rotate the same
387
+ rotate: particle.id % 2 === 0 ? [0, 360] : [360, 0]
388
+ },
389
+ transition: {
390
+ x: { type: "spring", stiffness: 150, damping: 20 },
391
+ y: { type: "spring", stiffness: 150, damping: 20 },
392
+ rotate: {
393
+ duration: particle.animationDuration,
394
+ repeat: Infinity,
395
+ ease: "linear"
396
+ },
397
+ scale: {
398
+ duration: particle.animationDuration,
399
+ repeat: Infinity,
400
+ delay: seededRandom(particle.id * 111.222) * 5,
401
+ ease: "easeInOut"
402
+ },
403
+ opacity: {
404
+ duration: particle.animationDuration,
405
+ repeat: Infinity,
406
+ delay: seededRandom(particle.id * 333.444) * 5,
407
+ ease: "easeInOut"
408
+ }
409
+ },
410
+ children: particle.icon ? /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsxRuntime.jsx(reactFontawesome.FontAwesomeIcon, { icon: particle.icon, style: { width: "70%", height: "70%" } }) }) : /* @__PURE__ */ jsxRuntime.jsx(
411
+ "div",
412
+ {
413
+ style: {
414
+ width: "100%",
415
+ height: "100%",
416
+ borderRadius: "50%",
417
+ backgroundColor: color
418
+ }
419
+ }
420
+ )
421
+ },
422
+ particle.id
423
+ )) })
424
+ }
425
+ );
426
+ };
427
+ function Icon(props) {
428
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {});
429
+ }
430
+ function InfoBox(props) {
431
+ const theme2 = core.useMantineTheme();
432
+ return /* @__PURE__ */ jsxRuntime.jsxs(
433
+ core.Flex,
434
+ {
435
+ w: "fit-content",
436
+ h: "fit-content",
437
+ style: {
438
+ borderRadius: theme2.radius.xs,
439
+ overflow: "hidden",
440
+ border: `0.2vh solid rgba(77,77,77,0.3)`
441
+ },
442
+ align: "center",
443
+ children: [
444
+ /* @__PURE__ */ jsxRuntime.jsx(
445
+ core.Flex,
446
+ {
447
+ miw: "4vh",
448
+ p: "xxs",
449
+ bg: "rgba(77,77,77,0.2)",
450
+ direction: "column",
451
+ justify: "center",
452
+ align: "center",
453
+ children: /* @__PURE__ */ jsxRuntime.jsx(
454
+ core.Text,
455
+ {
456
+ c: "lightgrey",
457
+ size: "xxs",
458
+ style: {
459
+ fontFamily: "Akrobat Bold",
460
+ letterSpacing: "0.05em",
461
+ textTransform: "uppercase"
462
+ },
463
+ children: props.leftSide
464
+ }
465
+ )
466
+ }
467
+ ),
468
+ /* @__PURE__ */ jsxRuntime.jsx(
469
+ core.Flex,
470
+ {
471
+ p: "xxs",
472
+ flex: 1,
473
+ miw: "4vh",
474
+ bg: "rgba(77,77,77,0.5)",
475
+ direction: "column",
476
+ align: "center",
477
+ justify: "center",
478
+ children: /* @__PURE__ */ jsxRuntime.jsx(
479
+ core.Text,
480
+ {
481
+ c: "lightgrey",
482
+ size: "xxs",
483
+ style: {
484
+ fontFamily: "Akrobat Bold",
485
+ letterSpacing: "0.05em",
486
+ textTransform: "uppercase"
487
+ },
488
+ children: props.rightSide
489
+ }
490
+ )
491
+ }
492
+ )
493
+ ]
494
+ }
495
+ );
496
+ }
497
+ function InputContainer(props) {
498
+ const theme2 = core.useMantineTheme();
499
+ return /* @__PURE__ */ jsxRuntime.jsxs(
500
+ MotionFlex,
501
+ {
502
+ w: props.w || "100%",
503
+ flex: props.flex,
504
+ direction: "column",
505
+ h: props.h,
506
+ gap: props.title ? "xs" : 0,
507
+ bg: props.bg || "rgba(69, 69, 69, 0.42)",
508
+ p: "sm",
509
+ style: {
510
+ borderRadius: theme2.radius.xs,
511
+ boxShadow: theme2.shadows.sm,
512
+ overflow: "hidden",
513
+ outline: props.error ? `1px solid rgba(255, 100, 100, 0.8)` : "none"
514
+ },
515
+ variants: props.variants,
516
+ children: [
517
+ /* @__PURE__ */ jsxRuntime.jsxs(
518
+ core.Flex,
519
+ {
520
+ align: "center",
521
+ gap: "xs",
522
+ children: [
523
+ /* @__PURE__ */ jsxRuntime.jsxs(
524
+ core.Flex,
525
+ {
526
+ direction: "column",
527
+ gap: "xxs",
528
+ children: [
529
+ props.title && /* @__PURE__ */ jsxRuntime.jsx(
530
+ core.Text,
531
+ {
532
+ size: "sm",
533
+ style: {
534
+ lineHeight: "1.25vh",
535
+ fontFamily: "Akrobat Bold",
536
+ letterSpacing: "0.05em",
537
+ textTransform: "uppercase"
538
+ },
539
+ children: props.title
540
+ }
541
+ ),
542
+ props.description && /* @__PURE__ */ jsxRuntime.jsx(
543
+ core.Text,
544
+ {
545
+ size: "xs",
546
+ c: "rgba(255, 255, 255, 0.8)",
547
+ fw: 400,
548
+ children: props.description
549
+ }
550
+ )
551
+ ]
552
+ }
553
+ ),
554
+ props.error && /* @__PURE__ */ jsxRuntime.jsx(
555
+ core.Text,
556
+ {
557
+ size: "xs",
558
+ c: theme2.colors.red[9],
559
+ fw: 600,
560
+ mb: "auto",
561
+ lh: "0.8",
562
+ children: props.error
563
+ }
564
+ ),
565
+ /* @__PURE__ */ jsxRuntime.jsx(
566
+ core.Flex,
567
+ {
568
+ ml: "auto",
569
+ children: props.rightSection
570
+ }
571
+ )
572
+ ]
573
+ }
574
+ ),
575
+ props.children
576
+ ]
577
+ }
578
+ );
579
+ }
580
+
581
+ // src/hooks/useAudio/click_sound.mp3
582
+ var click_sound_default = "./click_sound-PNCRRTM4.mp3";
583
+
584
+ // src/hooks/useAudio/hover_sound.mp3
585
+ var hover_sound_default = "./hover_sound-NBUA222C.mp3";
586
+
587
+ // src/hooks/useAudio/store.ts
588
+ var useAudio = zustand.create(() => {
589
+ const audioRefs = {};
590
+ const sounds = {
591
+ click: click_sound_default,
592
+ hover: hover_sound_default
593
+ };
594
+ for (const [key, src] of Object.entries(sounds)) {
595
+ audioRefs[key] = new Audio(src);
596
+ }
597
+ return {
598
+ play: (sound) => {
599
+ const audio = audioRefs[sound];
600
+ if (!audio) return console.warn(`Sound '${sound}' not found.`);
601
+ audio.currentTime = 0;
602
+ audio.volume = 0.1;
603
+ audio.play();
604
+ },
605
+ stop: (sound) => {
606
+ const audio = audioRefs[sound];
607
+ if (!audio) return console.warn(`Sound '${sound}' not found.`);
608
+ audio.pause();
609
+ audio.currentTime = 0;
610
+ }
611
+ };
612
+ });
613
+
614
+ // src/utils/misc.ts
615
+ var isEnvBrowser = () => !window.invokeNative;
616
+ var noop = () => {
617
+ };
618
+ var splitFAString = (faString) => {
619
+ const [prefix, newIcon] = faString.split("-");
620
+ if (!prefix || !newIcon) return { prefix: "fas", newIcon: "question" };
621
+ return { prefix, newIcon };
622
+ };
623
+ var numberToRoman = (num) => {
624
+ const romanNumerals = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX"];
625
+ return romanNumerals[num];
626
+ };
627
+ var copyToClipboard = (text) => {
628
+ const el = document.createElement("textarea");
629
+ el.value = text;
630
+ document.body.appendChild(el);
631
+ el.select();
632
+ document.execCommand("copy");
633
+ document.body.removeChild(el);
634
+ };
635
+ var openLink = (url) => {
636
+ if (isEnvBrowser()) {
637
+ window.open(url, "_blank");
638
+ } else {
639
+ window.invokeNative("openLink", url);
640
+ }
641
+ };
642
+
643
+ // src/utils/fetchNui.ts
644
+ async function fetchNui(eventName, data, mockData) {
645
+ const options = {
646
+ method: "post",
647
+ headers: {
648
+ "Content-Type": "application/json; charset=UTF-8"
649
+ },
650
+ body: JSON.stringify(data)
651
+ };
652
+ console.log("Mock Data:", mockData);
653
+ console.log("Is Env Browser:", isEnvBrowser());
654
+ if (isEnvBrowser() && mockData !== void 0) return mockData;
655
+ const resourceName = window.GetParentResourceName ? window.GetParentResourceName() : "nui-frame-app";
656
+ const resp = await fetch(`https://${resourceName}/${eventName}`, options);
657
+ const respFormatted = await resp.json();
658
+ return respFormatted;
659
+ }
660
+ function fetchOnLoad(eventName, data, mockData) {
661
+ return fetchNui(eventName, data, mockData).catch((err) => {
662
+ console.error(`[fetchOnLoad] Failed for ${eventName}:`, err);
663
+ throw err;
664
+ });
665
+ }
666
+ var fetchLuaTable = (tableName) => () => {
667
+ if (isEnvBrowser()) {
668
+ return Promise.resolve({});
669
+ }
670
+ return fetchNui("GET_LUA_TABLE", { tableName });
671
+ };
672
+
673
+ // src/utils/internalEvent.ts
674
+ var internalEvent = (events, timer = 1e3) => {
675
+ if (isEnvBrowser()) {
676
+ for (const event of events) {
677
+ setTimeout(() => {
678
+ window.dispatchEvent(
679
+ new MessageEvent("message", {
680
+ data: {
681
+ action: event.action,
682
+ data: event.data
683
+ }
684
+ })
685
+ );
686
+ }, timer);
687
+ }
688
+ }
689
+ };
690
+ var localeStore = zustand.create((set, get) => {
691
+ return {
692
+ locales: {
693
+ "OccupantsDesc": "Here you can view and manage the occupants of your traphouse. These occupants can be used mainly for selling drugs to the NPCs surrounding your traphouse. However they have other uses to so be careful who you add as an occupant."
694
+ },
695
+ locale: (key, ...args) => {
696
+ const exists = get().locales[key];
697
+ let translation = exists || key;
698
+ if (args.length) {
699
+ translation = translation.replace(/%s/g, () => String(args.shift() || ""));
700
+ }
701
+ return translation;
702
+ }
703
+ };
704
+ });
705
+ var locale = localeStore.getState().locale;
706
+ fetchOnLoad("GET_LOCALES").then((data) => {
707
+ localeStore.setState({ locales: data });
708
+ });
709
+ function SegmentedControl(props) {
710
+ const theme2 = core.useMantineTheme();
711
+ const play = useAudio((state) => state.play);
712
+ const handleChange = (newValue) => {
713
+ if (props.sounds) play("click");
714
+ if (props.onChange) {
715
+ props.onChange(newValue);
716
+ }
717
+ };
718
+ return /* @__PURE__ */ jsxRuntime.jsx(
719
+ core.Flex,
720
+ {
721
+ bg: "rgba(33, 33, 33, 0.6)",
722
+ w: props.w || "fit-content",
723
+ style: {
724
+ borderRadius: theme2.radius.xs,
725
+ overflow: "hidden"
726
+ },
727
+ ...props,
728
+ children: props.items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
729
+ framerMotion.motion.div,
730
+ {
731
+ initial: { x: -100, opacity: 0 },
732
+ animate: { x: 0, opacity: 1 },
733
+ transition: { duration: 0.3, delay: index * 0.1, ease: "easeInOut" },
734
+ style: {
735
+ display: "flex",
736
+ flexDirection: "row",
737
+ alignItems: "center",
738
+ flex: 1
739
+ },
740
+ children: /* @__PURE__ */ jsxRuntime.jsx(
741
+ Segment,
742
+ {
743
+ label: item.label,
744
+ value: item.value,
745
+ icon: item.icon,
746
+ rightSection: item.rightSection,
747
+ fz: props.fz,
748
+ selected: !props.multi ? props.value === item.value : Array.isArray(props.value) && props.value.includes(item.value),
749
+ onClick: () => {
750
+ if (props.multi) {
751
+ const newValue = Array.isArray(props.value) ? props.value.includes(item.value) ? props.value.filter((v) => v !== item.value) : [...props.value, item.value] : [item.value];
752
+ handleChange(newValue);
753
+ } else {
754
+ handleChange(item.value);
755
+ }
756
+ }
757
+ },
758
+ item.value
759
+ )
760
+ },
761
+ index
762
+ ))
763
+ }
764
+ );
765
+ }
766
+ function Segment(props) {
767
+ const theme2 = core.useMantineTheme();
768
+ return /* @__PURE__ */ jsxRuntime.jsxs(
769
+ MotionFlex,
770
+ {
771
+ onClick: props.onClick,
772
+ w: "100%",
773
+ direction: "column",
774
+ align: "center",
775
+ h: "100%",
776
+ bg: props.selected ? colorWithAlpha(theme2.colors[theme2.primaryColor][theme2.primaryShade], 0.2) : "transparent",
777
+ pos: "relative",
778
+ style: {
779
+ // position: "relative",
780
+ cursor: "pointer"
781
+ },
782
+ justify: "center",
783
+ whileHover: { scale: 1.05 },
784
+ whileTap: { scale: 0.95 },
785
+ children: [
786
+ /* @__PURE__ */ jsxRuntime.jsxs(
787
+ core.Flex,
788
+ {
789
+ align: "center",
790
+ gap: "xs",
791
+ p: "xs",
792
+ children: [
793
+ props.icon && /* @__PURE__ */ jsxRuntime.jsx(
794
+ MotionIcon,
795
+ {
796
+ icon: props.icon,
797
+ initial: {
798
+ color: props.selected ? theme2.colors[theme2.primaryColor][5] : "inherit"
799
+ },
800
+ animate: {
801
+ color: props.selected ? theme2.colors[theme2.primaryColor][5] : "inherit"
802
+ },
803
+ exit: {
804
+ color: "inherit"
805
+ },
806
+ style: {
807
+ fontSize: theme2.fontSizes.xs,
808
+ marginBottom: "0.2vh"
809
+ }
810
+ }
811
+ ),
812
+ /* @__PURE__ */ jsxRuntime.jsx(
813
+ MotionText,
814
+ {
815
+ size: props.fz || "xs",
816
+ initial: {
817
+ color: props.selected ? theme2.colors[theme2.primaryColor][5] : "inherit"
818
+ },
819
+ animate: {
820
+ color: props.selected ? theme2.colors[theme2.primaryColor][5] : "inherit"
821
+ },
822
+ exit: {
823
+ color: "inherit"
824
+ },
825
+ style: {
826
+ fontFamily: "Akrobat Bold",
827
+ letterSpacing: "0.1em",
828
+ textTransform: "uppercase"
829
+ },
830
+ children: props.label.toUpperCase()
831
+ }
832
+ ),
833
+ props.rightSection
834
+ ]
835
+ }
836
+ ),
837
+ /* @__PURE__ */ jsxRuntime.jsx(
838
+ framerMotion.motion.div,
839
+ {
840
+ initial: false,
841
+ animate: {
842
+ scaleX: props.selected ? 1 : 0,
843
+ opacity: props.selected ? 1 : 0
844
+ },
845
+ transition: {
846
+ duration: 0.3,
847
+ ease: [0.4, 0, 0.2, 1]
848
+ // Custom easing curve for smooth feel
849
+ },
850
+ style: {
851
+ position: "absolute",
852
+ bottom: 0,
853
+ left: 0,
854
+ right: 0,
855
+ height: "0.2vh",
856
+ backgroundColor: theme2.colors[theme2.primaryColor][5],
857
+ transformOrigin: "center"
858
+ }
859
+ }
860
+ )
861
+ ]
862
+ }
863
+ );
864
+ }
865
+ var NavigationContext = react.createContext(null);
866
+ function useNavigation(selector) {
867
+ const navigation = react.useContext(NavigationContext);
868
+ if (!navigation) {
869
+ throw new Error("useNavigation must be used within a NavigationProvider");
870
+ }
871
+ return zustand.useStore(navigation, selector);
872
+ }
873
+ function useNavigationStore() {
874
+ const navigation = react.useContext(NavigationContext);
875
+ if (!navigation) {
876
+ throw new Error("useNavigationStore must be used within a NavigationProvider");
877
+ }
878
+ return navigation;
879
+ }
880
+ function NavigationProvider({ children, defaultPage }) {
881
+ const storeRef = react.useRef(
882
+ zustand.create(() => ({
883
+ pageId: defaultPage || "home"
884
+ }))
885
+ );
886
+ return /* @__PURE__ */ jsxRuntime.jsx(NavigationContext.Provider, { value: storeRef.current, children });
887
+ }
888
+ function NavBar(props) {
889
+ const pageId = useNavigation((state) => state.pageId);
890
+ const store = useNavigationStore();
891
+ return /* @__PURE__ */ jsxRuntime.jsx(
892
+ SegmentedControl,
893
+ {
894
+ sounds: true,
895
+ w: "100%",
896
+ value: pageId,
897
+ items: props.items,
898
+ onChange: (value) => {
899
+ store.setState({ pageId: value });
900
+ }
901
+ }
902
+ );
903
+ }
904
+ var containerVariants = {
905
+ hidden: { opacity: 0 },
906
+ visible: {
907
+ opacity: 1,
908
+ transition: {
909
+ staggerChildren: 0.1,
910
+ delayChildren: 0.05
911
+ }
912
+ },
913
+ exit: {
914
+ opacity: 0,
915
+ transition: {
916
+ staggerChildren: 0.05,
917
+ staggerDirection: -1
918
+ }
919
+ }
920
+ };
921
+ var itemVariants = {
922
+ hidden: {
923
+ opacity: 0,
924
+ x: 20,
925
+ scale: 0.95
926
+ },
927
+ visible: {
928
+ opacity: 1,
929
+ x: 0,
930
+ scale: 1,
931
+ transition: {
932
+ type: "spring",
933
+ stiffness: 300,
934
+ damping: 24
935
+ }
936
+ },
937
+ exit: {
938
+ opacity: 0,
939
+ x: -10,
940
+ scale: 0.95,
941
+ transition: {
942
+ duration: 0.2
943
+ }
944
+ }
945
+ };
946
+ function SegmentedProgress(props) {
947
+ const progressPerSegment = 100 / props.segments;
948
+ const filledSegments = Math.floor(props.progress / progressPerSegment);
949
+ const partialFill = props.progress % progressPerSegment / progressPerSegment;
950
+ return /* @__PURE__ */ jsxRuntime.jsx(
951
+ MotionFlex,
952
+ {
953
+ w: "100%",
954
+ h: props.size || "1vh",
955
+ gap: "xs",
956
+ initial: "hidden",
957
+ animate: "visible",
958
+ variants: containerVariants,
959
+ children: [...Array(props.segments)].map((_, index) => {
960
+ const isFilled = index < filledSegments;
961
+ const isPartial = index === filledSegments;
962
+ return /* @__PURE__ */ jsxRuntime.jsx(
963
+ framerMotion.motion.div,
964
+ {
965
+ variants: itemVariants,
966
+ style: {
967
+ width: `${100 / props.segments}%`,
968
+ // Ensures equal width distribution
969
+ height: "100%",
970
+ background: isFilled ? "rgba(255, 255, 255, 0.8)" : isPartial ? `linear-gradient(to right, rgba(255, 255, 255, 0.8) ${partialFill * 100}%, rgba(255, 255, 255, 0.2) ${partialFill * 100}%)` : "rgba(255, 255, 255, 0.2)",
971
+ transition: "background 0.3s ease"
972
+ }
973
+ },
974
+ index
975
+ );
976
+ })
977
+ }
978
+ );
979
+ }
980
+ function Title(props) {
981
+ const theme2 = core.useMantineTheme();
982
+ return /* @__PURE__ */ jsxRuntime.jsx(
983
+ core.Flex,
984
+ {
985
+ mt: props.mt,
986
+ direction: "column",
987
+ bg: props.bg || "transparent",
988
+ gap: "xs",
989
+ w: props.w || "100%",
990
+ p: props.p || "0",
991
+ style: {
992
+ userSelect: "none",
993
+ borderBottom: props.removeBorder ? "none" : `0.2vh solid ${props.borderColor || colorWithAlpha(theme2.colors[theme2.primaryColor][9], 0.5)}`
994
+ },
995
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
996
+ core.Flex,
997
+ {
998
+ align: "center",
999
+ justify: "center",
1000
+ children: [
1001
+ /* @__PURE__ */ jsxRuntime.jsxs(
1002
+ core.Flex,
1003
+ {
1004
+ align: "center",
1005
+ gap: "sm",
1006
+ pr: "xs",
1007
+ children: [
1008
+ /* @__PURE__ */ jsxRuntime.jsx(
1009
+ BorderedIcon,
1010
+ {
1011
+ icon: props.icon,
1012
+ fontSize: theme2.fontSizes.md,
1013
+ color: props.iconColor
1014
+ }
1015
+ ),
1016
+ /* @__PURE__ */ jsxRuntime.jsxs(
1017
+ core.Flex,
1018
+ {
1019
+ direction: "column",
1020
+ gap: "0.25vh",
1021
+ children: [
1022
+ /* @__PURE__ */ jsxRuntime.jsx(core.Text, { p: "0", size: "sm", style: {
1023
+ lineHeight: theme2.fontSizes.md,
1024
+ fontFamily: "Akrobat Bold",
1025
+ letterSpacing: "0.05em",
1026
+ textTransform: "uppercase"
1027
+ }, children: props.title }),
1028
+ /* @__PURE__ */ jsxRuntime.jsx(
1029
+ core.Text,
1030
+ {
1031
+ size: "xs",
1032
+ c: "grey",
1033
+ style: { whiteSpace: "normal", wordWrap: "break-word" },
1034
+ children: props.description
1035
+ }
1036
+ )
1037
+ ]
1038
+ }
1039
+ )
1040
+ ]
1041
+ }
1042
+ ),
1043
+ /* @__PURE__ */ jsxRuntime.jsx(
1044
+ core.Flex,
1045
+ {
1046
+ ml: "auto",
1047
+ align: "center",
1048
+ gap: "xs",
1049
+ children: props.rightSection
1050
+ }
1051
+ )
1052
+ ]
1053
+ }
1054
+ )
1055
+ }
1056
+ );
1057
+ }
1058
+ var useNuiEvent = (action, handler) => {
1059
+ const savedHandler = react.useRef(noop);
1060
+ react.useEffect(() => {
1061
+ savedHandler.current = handler;
1062
+ }, [handler]);
1063
+ react.useEffect(() => {
1064
+ const eventListener = (event) => {
1065
+ const { action: eventAction, data } = event.data;
1066
+ if (savedHandler.current) {
1067
+ if (eventAction === action) {
1068
+ savedHandler.current(data);
1069
+ }
1070
+ }
1071
+ };
1072
+ window.addEventListener("message", eventListener);
1073
+ return () => window.removeEventListener("message", eventListener);
1074
+ }, [action]);
1075
+ };
1076
+ var theme = core.createTheme({
1077
+ primaryColor: "dirk",
1078
+ primaryShade: 9,
1079
+ defaultRadius: "xxs",
1080
+ fontFamily: "Akrobat Regular, sans-serif",
1081
+ radius: {
1082
+ xxs: "0.2vh",
1083
+ xs: "0.4vh",
1084
+ sm: "0.75vh",
1085
+ md: "1vh",
1086
+ lg: "1.5vh",
1087
+ xl: "2vh",
1088
+ xxl: "3vh"
1089
+ },
1090
+ fontSizes: {
1091
+ xxs: "1.2vh",
1092
+ xs: "1.5vh",
1093
+ sm: "1.8vh",
1094
+ md: "2.2vh",
1095
+ lg: "2.8vh",
1096
+ xl: "3.3vh",
1097
+ xxl: "3.8vh"
1098
+ },
1099
+ spacing: {
1100
+ xxs: "0.5vh",
1101
+ xs: "0.75vh",
1102
+ sm: "1.5vh",
1103
+ md: "2vh",
1104
+ lg: "3vh",
1105
+ xl: "4vh",
1106
+ xxl: "5vh"
1107
+ },
1108
+ components: {
1109
+ Progress: {
1110
+ styles: {
1111
+ root: {
1112
+ backgroundColor: "rgba(77, 77, 77, 0.4)"
1113
+ }
1114
+ }
1115
+ },
1116
+ Select: {
1117
+ styles: {
1118
+ dropdown: {
1119
+ borderRadius: "var(--mantine-radius-xxs)"
1120
+ },
1121
+ input: {
1122
+ padding: "var(--mantine-spacing-sm)"
1123
+ },
1124
+ item: {
1125
+ borderRadius: "var(--mantine-radius-xxs)"
1126
+ },
1127
+ wrapper: {
1128
+ borderRadius: "var(--mantine-radius-xxs)"
1129
+ },
1130
+ option: {
1131
+ borderRadius: "var(--mantine-radius-xxs)"
1132
+ }
1133
+ }
1134
+ },
1135
+ MultiSelect: {
1136
+ styles: {
1137
+ dropdown: {
1138
+ borderRadius: "var(--mantine-radius-xxs)"
1139
+ },
1140
+ pill: {
1141
+ borderRadius: "var(--mantine-radius-xxs)"
1142
+ },
1143
+ item: {
1144
+ borderRadius: "var(--mantine-radius-xxs)"
1145
+ },
1146
+ wrapper: {
1147
+ borderRadius: "var(--mantine-radius-xxs)"
1148
+ },
1149
+ option: {
1150
+ borderRadius: "var(--mantine-radius-xxs)"
1151
+ }
1152
+ }
1153
+ },
1154
+ TextInput: {
1155
+ styles: {
1156
+ section: {
1157
+ marginRight: "0.2vh"
1158
+ },
1159
+ input: {
1160
+ padding: "var(--mantine-spacing-sm)"
1161
+ }
1162
+ }
1163
+ }
1164
+ },
1165
+ colors: {
1166
+ dark: [
1167
+ "#ffffff",
1168
+ "#e2e2e2",
1169
+ "#c6c6c6",
1170
+ "#aaaaaa",
1171
+ "#8d8d8d",
1172
+ "#717171",
1173
+ "#555555",
1174
+ "#393939",
1175
+ "#1c1c1c",
1176
+ "#000000"
1177
+ ],
1178
+ dirk: [
1179
+ "#ffffff",
1180
+ "#f3fce9",
1181
+ "#dbf5bd",
1182
+ "#c3ee91",
1183
+ "#ace765",
1184
+ "#94e039",
1185
+ "#7ac61f",
1186
+ "#5f9a18",
1187
+ "#29420a",
1188
+ "#446e11"
1189
+ ]
1190
+ }
1191
+ });
1192
+ var theme_default = theme;
1193
+ fontawesomeSvgCore.library.add(freeSolidSvgIcons.fas, freeRegularSvgIcons.far, freeBrandsSvgIcons.fab);
1194
+ var useSettings = zustand.create((set) => ({
1195
+ game: "rdr3",
1196
+ primaryColor: "teal",
1197
+ primaryShade: 6,
1198
+ customTheme: {}
1199
+ }));
1200
+ function DirkProvider(props) {
1201
+ useSettings((data) => data.primaryColor);
1202
+ useSettings((data) => data.primaryShade);
1203
+ useSettings((data) => data.customTheme);
1204
+ return /* @__PURE__ */ jsxRuntime.jsx(core.MantineProvider, { theme: theme_default, defaultColorScheme: "dark", children: /* @__PURE__ */ jsxRuntime.jsx(Wrapper, { children: props.children }) });
1205
+ }
1206
+ function Wrapper({ children }) {
1207
+ const game = useSettings((data) => data.game);
1208
+ return isEnvBrowser() ? /* @__PURE__ */ jsxRuntime.jsx(
1209
+ core.BackgroundImage,
1210
+ {
1211
+ w: "100vw",
1212
+ h: "100vh",
1213
+ style: { overflow: "hidden" },
1214
+ src: game === "fivem" ? "https://i.ytimg.com/vi/TOxuNbXrO28/maxresdefault.jpg" : "https://raw.githubusercontent.com/Jump-On-Studios/RedM-jo_libs/refs/heads/main/source-repositories/Menu/public/assets/images/background_dev.jpg",
1215
+ children
1216
+ }
1217
+ ) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
1218
+ }
1219
+
1220
+ exports.BorderedIcon = BorderedIcon;
1221
+ exports.Counter = Counter;
1222
+ exports.DirkProvider = DirkProvider;
1223
+ exports.FloatingParticles = FloatingParticles;
1224
+ exports.Icon = Icon;
1225
+ exports.InfoBox = InfoBox;
1226
+ exports.InputContainer = InputContainer;
1227
+ exports.MotionFlex = MotionFlex;
1228
+ exports.MotionIcon = MotionIcon;
1229
+ exports.MotionImage = MotionImage;
1230
+ exports.MotionText = MotionText;
1231
+ exports.NavBar = NavBar;
1232
+ exports.NavigationContext = NavigationContext;
1233
+ exports.NavigationProvider = NavigationProvider;
1234
+ exports.Segment = Segment;
1235
+ exports.SegmentedControl = SegmentedControl;
1236
+ exports.SegmentedProgress = SegmentedProgress;
1237
+ exports.Title = Title;
1238
+ exports.colorWithAlpha = colorWithAlpha;
1239
+ exports.copyToClipboard = copyToClipboard;
1240
+ exports.fetchLuaTable = fetchLuaTable;
1241
+ exports.fetchNui = fetchNui;
1242
+ exports.fetchOnLoad = fetchOnLoad;
1243
+ exports.internalEvent = internalEvent;
1244
+ exports.isEnvBrowser = isEnvBrowser;
1245
+ exports.locale = locale;
1246
+ exports.localeStore = localeStore;
1247
+ exports.noop = noop;
1248
+ exports.numberToRoman = numberToRoman;
1249
+ exports.openLink = openLink;
1250
+ exports.splitFAString = splitFAString;
1251
+ exports.useNavigation = useNavigation;
1252
+ exports.useNavigationStore = useNavigationStore;
1253
+ exports.useNuiEvent = useNuiEvent;
1254
+ exports.useSettings = useSettings;
1255
+ //# sourceMappingURL=index.js.map
1256
+ //# sourceMappingURL=index.js.map