@anywayseo/tools 4.0.1 → 4.0.2
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/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/{index-CNKZLV-n.mjs → index-BZBc-e28.mjs} +2 -2
- package/dist/{index-Bw7vqsyw.js → index-CpjGjVVj.js} +6 -8
- package/dist/{index-DLy2LYCD.mjs → index-Db-ZIQ0A.mjs} +6 -8
- package/dist/{index-BIs07X4D.js → index-DmOT7IZT.js} +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/utils/index.cjs +2 -2
- package/dist/utils/index.mjs +2 -2
- package/dist/utils/sorting/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../index-
|
|
3
|
+
const index = require("../index-DmOT7IZT.js");
|
|
4
4
|
exports.Author = index.Author;
|
|
5
5
|
exports.AuthorCard = index.AuthorCard;
|
|
6
6
|
exports.BonusCard = index.BonusCard;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, o, S, h, T, i, j } from "../index-
|
|
1
|
+
import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, o, S, h, T, i, j } from "../index-BZBc-e28.mjs";
|
|
2
2
|
export {
|
|
3
3
|
k as Author,
|
|
4
4
|
A as AuthorCard,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Box, Collapse, Text, Button, Flex, Stack, Image, Center as Center$1, SimpleGrid, Link, Card, CardHeader, Heading, CardBody, Popover, PopoverTrigger, Portal, PopoverContent, PopoverBody, CardFooter, useToast, useColorModeValue, VStack, FormControl, FormLabel, InputGroup, InputLeftElement, Input, Textarea, Accordion, AccordionItem, AccordionButton, AccordionIcon, AccordionPanel, LinkBox, LinkOverlay, IconButton, AbsoluteCenter, Spinner, useDisclosure, Divider, Circle, Container as Container$1, List as List$1, ListItem, Icon, ListIcon, TableContainer, Table as Table$1, Thead, Tr, Th, Tbody, Td, TableCaption, Tabs as Tabs$1, TabList, Tab, TabPanels, TabPanel } from "@chakra-ui/react";
|
|
3
3
|
import { useTranslation } from "react-i18next";
|
|
4
|
-
import { A as Animation, e as
|
|
4
|
+
import { A as Animation, e as getSeededRandomComparator, d as randomComparator, b as formatNumber, c as getCurrencySymbol, f as formatDate, g as getCurrentYear, a as getCurrentMonth } from "./index-Db-ZIQ0A.mjs";
|
|
5
5
|
import { a as GameCharacteristic } from "./index-DoBCANwf.mjs";
|
|
6
6
|
import "@ctrl/tinycolor";
|
|
7
7
|
import { useRef, useState, useLayoutEffect, Fragment as Fragment$1, forwardRef, useEffect, useMemo } from "react";
|
|
@@ -347,7 +347,7 @@ const GameCardGrid = ({
|
|
|
347
347
|
}) => {
|
|
348
348
|
let sortedItems = items;
|
|
349
349
|
if (order === "random") {
|
|
350
|
-
sortedItems = [...items].sort(randomSeed ?
|
|
350
|
+
sortedItems = [...items].sort(randomSeed ? getSeededRandomComparator(randomSeed) : randomComparator);
|
|
351
351
|
}
|
|
352
352
|
return /* @__PURE__ */ jsx(
|
|
353
353
|
Grid,
|
|
@@ -94,15 +94,13 @@ function getCurrencySymbol(currencyCode) {
|
|
|
94
94
|
function randomComparator() {
|
|
95
95
|
return Math.random() - 0.5;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
const c = 1013904223;
|
|
100
|
-
const m = 2 ** 31;
|
|
101
|
-
return (a * seed + c) % m / m;
|
|
97
|
+
function seededRandom(seed) {
|
|
98
|
+
return Math.abs(Math.sin(seed));
|
|
102
99
|
}
|
|
103
|
-
function
|
|
100
|
+
function getSeededRandomComparator(seed) {
|
|
104
101
|
const safeSeed = Math.abs(seed) % Number.MAX_SAFE_INTEGER;
|
|
105
|
-
|
|
102
|
+
let index = 0;
|
|
103
|
+
return () => seededRandom(safeSeed + index++) - 0.5;
|
|
106
104
|
}
|
|
107
105
|
exports.Animation = Animation;
|
|
108
106
|
exports.formatDate = formatDate;
|
|
@@ -110,7 +108,7 @@ exports.formatNumber = formatNumber;
|
|
|
110
108
|
exports.getCurrencySymbol = getCurrencySymbol;
|
|
111
109
|
exports.getCurrentMonth = getCurrentMonth;
|
|
112
110
|
exports.getCurrentYear = getCurrentYear;
|
|
113
|
-
exports.
|
|
111
|
+
exports.getSeededRandomComparator = getSeededRandomComparator;
|
|
114
112
|
exports.parseNumber = parseNumber;
|
|
115
113
|
exports.randomComparator = randomComparator;
|
|
116
114
|
exports.round = round;
|
|
@@ -93,15 +93,13 @@ function getCurrencySymbol(currencyCode) {
|
|
|
93
93
|
function randomComparator() {
|
|
94
94
|
return Math.random() - 0.5;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
|
|
98
|
-
const c = 1013904223;
|
|
99
|
-
const m = 2 ** 31;
|
|
100
|
-
return (a * seed + c) % m / m;
|
|
96
|
+
function seededRandom(seed) {
|
|
97
|
+
return Math.abs(Math.sin(seed));
|
|
101
98
|
}
|
|
102
|
-
function
|
|
99
|
+
function getSeededRandomComparator(seed) {
|
|
103
100
|
const safeSeed = Math.abs(seed) % Number.MAX_SAFE_INTEGER;
|
|
104
|
-
|
|
101
|
+
let index = 0;
|
|
102
|
+
return () => seededRandom(safeSeed + index++) - 0.5;
|
|
105
103
|
}
|
|
106
104
|
export {
|
|
107
105
|
Animation as A,
|
|
@@ -109,7 +107,7 @@ export {
|
|
|
109
107
|
formatNumber as b,
|
|
110
108
|
getCurrencySymbol as c,
|
|
111
109
|
randomComparator as d,
|
|
112
|
-
|
|
110
|
+
getSeededRandomComparator as e,
|
|
113
111
|
formatDate as f,
|
|
114
112
|
getCurrentYear as g,
|
|
115
113
|
parseNumber as p,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const jsxRuntime = require("react/jsx-runtime");
|
|
3
3
|
const react$1 = require("@chakra-ui/react");
|
|
4
4
|
const reactI18next = require("react-i18next");
|
|
5
|
-
const index = require("./index-
|
|
5
|
+
const index = require("./index-CpjGjVVj.js");
|
|
6
6
|
const i18n = require("./index-Biz1dDqA.js");
|
|
7
7
|
require("@ctrl/tinycolor");
|
|
8
8
|
const react = require("react");
|
|
@@ -348,7 +348,7 @@ const GameCardGrid = ({
|
|
|
348
348
|
}) => {
|
|
349
349
|
let sortedItems = items;
|
|
350
350
|
if (order === "random") {
|
|
351
|
-
sortedItems = [...items].sort(randomSeed ? index.
|
|
351
|
+
sortedItems = [...items].sort(randomSeed ? index.getSeededRandomComparator(randomSeed) : index.randomComparator);
|
|
352
352
|
}
|
|
353
353
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
354
354
|
Grid,
|
package/dist/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-DmOT7IZT.js");
|
|
4
4
|
const index$1 = require("./index-IpSV-c71.js");
|
|
5
5
|
const i18n$1 = require("./index-Biz1dDqA.js");
|
|
6
6
|
const index$2 = require("./index-d3V0A4lN.js");
|
|
7
7
|
const index$3 = require("./index-BhsXlbd8.js");
|
|
8
|
-
const index$4 = require("./index-
|
|
8
|
+
const index$4 = require("./index-CpjGjVVj.js");
|
|
9
9
|
const index$5 = require("./index-NsIHOkeN.js");
|
|
10
10
|
const i18n = require("i18next");
|
|
11
11
|
exports.Author = index.Author;
|
|
@@ -47,7 +47,7 @@ exports.formatNumber = index$4.formatNumber;
|
|
|
47
47
|
exports.getCurrencySymbol = index$4.getCurrencySymbol;
|
|
48
48
|
exports.getCurrentMonth = index$4.getCurrentMonth;
|
|
49
49
|
exports.getCurrentYear = index$4.getCurrentYear;
|
|
50
|
-
exports.
|
|
50
|
+
exports.getSeededRandomComparator = index$4.getSeededRandomComparator;
|
|
51
51
|
exports.parseNumber = index$4.parseNumber;
|
|
52
52
|
exports.randomComparator = index$4.randomComparator;
|
|
53
53
|
exports.round = index$4.round;
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, o, S, h, T, i, j } from "./index-
|
|
1
|
+
import { k, A, B, a, l, C, F, b, c, G, d, e, f, m, H, L, n, g, N, P, o, S, h, T, i, j } from "./index-BZBc-e28.mjs";
|
|
2
2
|
import { u } from "./index-xuSxvz5z.mjs";
|
|
3
3
|
import { a as a2, G as G2, r } from "./index-DoBCANwf.mjs";
|
|
4
4
|
import { M } from "./index-Bx3B21Dh.mjs";
|
|
5
5
|
import { S as S2, u as u2 } from "./index-BNb-P8a6.mjs";
|
|
6
|
-
import { A as A2, f as f2, b as b2, c as c2, a as a3, g as g2, e as e2, p, d as d2, r as r2, t } from "./index-
|
|
6
|
+
import { A as A2, f as f2, b as b2, c as c2, a as a3, g as g2, e as e2, p, d as d2, r as r2, t } from "./index-Db-ZIQ0A.mjs";
|
|
7
7
|
import { e as e3, g as g3, t as t2 } from "./index-DzEvPZny.mjs";
|
|
8
8
|
import { default as default2 } from "i18next";
|
|
9
9
|
export {
|
|
@@ -45,7 +45,7 @@ export {
|
|
|
45
45
|
c2 as getCurrencySymbol,
|
|
46
46
|
a3 as getCurrentMonth,
|
|
47
47
|
g2 as getCurrentYear,
|
|
48
|
-
e2 as
|
|
48
|
+
e2 as getSeededRandomComparator,
|
|
49
49
|
default2 as i18n,
|
|
50
50
|
p as parseNumber,
|
|
51
51
|
d2 as randomComparator,
|
package/dist/utils/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("../index-
|
|
3
|
+
const index = require("../index-CpjGjVVj.js");
|
|
4
4
|
const index$1 = require("../index-NsIHOkeN.js");
|
|
5
5
|
exports.Animation = index.Animation;
|
|
6
6
|
exports.formatDate = index.formatDate;
|
|
@@ -8,7 +8,7 @@ exports.formatNumber = index.formatNumber;
|
|
|
8
8
|
exports.getCurrencySymbol = index.getCurrencySymbol;
|
|
9
9
|
exports.getCurrentMonth = index.getCurrentMonth;
|
|
10
10
|
exports.getCurrentYear = index.getCurrentYear;
|
|
11
|
-
exports.
|
|
11
|
+
exports.getSeededRandomComparator = index.getSeededRandomComparator;
|
|
12
12
|
exports.parseNumber = index.parseNumber;
|
|
13
13
|
exports.randomComparator = index.randomComparator;
|
|
14
14
|
exports.round = index.round;
|
package/dist/utils/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A, f, b, c, a, g, e, p, d, r, t } from "../index-
|
|
1
|
+
import { A, f, b, c, a, g, e, p, d, r, t } from "../index-Db-ZIQ0A.mjs";
|
|
2
2
|
import { e as e2, g as g2, t as t2 } from "../index-DzEvPZny.mjs";
|
|
3
3
|
export {
|
|
4
4
|
A as Animation,
|
|
@@ -9,7 +9,7 @@ export {
|
|
|
9
9
|
c as getCurrencySymbol,
|
|
10
10
|
a as getCurrentMonth,
|
|
11
11
|
g as getCurrentYear,
|
|
12
|
-
e as
|
|
12
|
+
e as getSeededRandomComparator,
|
|
13
13
|
p as parseNumber,
|
|
14
14
|
d as randomComparator,
|
|
15
15
|
r as round,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare function randomComparator(): number;
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function getSeededRandomComparator(seed: number): () => number;
|