@vielzeug/illusionist 2.3.1 → 3.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/README.md +2 -50
- package/dist/_helpers/boolean.cjs +1 -1
- package/dist/_helpers/boolean.cjs.map +1 -1
- package/dist/_helpers/boolean.d.ts +1 -1
- package/dist/_helpers/boolean.d.ts.map +1 -1
- package/dist/_helpers/boolean.js +4 -3
- package/dist/_helpers/boolean.js.map +1 -1
- package/dist/_helpers/float.cjs +1 -1
- package/dist/_helpers/float.cjs.map +1 -1
- package/dist/_helpers/float.d.ts +1 -1
- package/dist/_helpers/float.d.ts.map +1 -1
- package/dist/_helpers/float.js +6 -7
- package/dist/_helpers/float.js.map +1 -1
- package/dist/_helpers/int.cjs +1 -1
- package/dist/_helpers/int.cjs.map +1 -1
- package/dist/_helpers/int.d.ts +1 -1
- package/dist/_helpers/int.d.ts.map +1 -1
- package/dist/_helpers/int.js +1 -1
- package/dist/_helpers/int.js.map +1 -1
- package/dist/_helpers/next-float.d.ts +2 -0
- package/dist/_helpers/next-float.d.ts.map +1 -0
- package/dist/_helpers/next-float.js +2 -0
- package/dist/_helpers/string.cjs +1 -1
- package/dist/_helpers/string.cjs.map +1 -1
- package/dist/_helpers/string.d.ts +2 -2
- package/dist/_helpers/string.d.ts.map +1 -1
- package/dist/_helpers/string.js +18 -27
- package/dist/_helpers/string.js.map +1 -1
- package/dist/date/date.cjs +1 -1
- package/dist/date/date.cjs.map +1 -1
- package/dist/date/date.d.ts.map +1 -1
- package/dist/date/date.js +24 -24
- package/dist/date/date.js.map +1 -1
- package/dist/factory.cjs +1 -1
- package/dist/factory.cjs.map +1 -1
- package/dist/factory.d.ts +0 -5
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +12 -22
- package/dist/factory.js.map +1 -1
- package/dist/finance/finance.cjs +1 -1
- package/dist/finance/finance.cjs.map +1 -1
- package/dist/finance/finance.js +4 -4
- package/dist/finance/finance.js.map +1 -1
- package/dist/illusionist.cjs +3 -3
- package/dist/illusionist.cjs.map +1 -1
- package/dist/illusionist.iife.js +3 -3
- package/dist/illusionist.iife.js.map +1 -1
- package/dist/illusionist.js +3 -3
- package/dist/illusionist.js.map +1 -1
- package/dist/internet/internet.cjs +1 -1
- package/dist/internet/internet.cjs.map +1 -1
- package/dist/internet/internet.js +11 -10
- package/dist/internet/internet.js.map +1 -1
- package/dist/location/location.cjs +1 -1
- package/dist/location/location.cjs.map +1 -1
- package/dist/location/location.d.ts.map +1 -1
- package/dist/location/location.js +31 -30
- package/dist/location/location.js.map +1 -1
- package/dist/seed/create-seed.cjs +1 -1
- package/dist/seed/create-seed.cjs.map +1 -1
- package/dist/seed/create-seed.d.ts +2 -2
- package/dist/seed/create-seed.d.ts.map +1 -1
- package/dist/seed/create-seed.js +10 -11
- package/dist/seed/create-seed.js.map +1 -1
- package/dist/seed/mulberry32.cjs.map +1 -1
- package/dist/seed/mulberry32.d.ts +1 -1
- package/dist/seed/mulberry32.d.ts.map +1 -1
- package/dist/seed/mulberry32.js.map +1 -1
- package/dist/system/system.cjs +1 -1
- package/dist/system/system.cjs.map +1 -1
- package/dist/system/system.d.ts.map +1 -1
- package/dist/system/system.js +23 -24
- package/dist/system/system.js.map +1 -1
- package/dist/types.d.ts +2 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +10 -10
- package/dist/_dev.d.ts +0 -2
- package/dist/_dev.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# @vielzeug/illusionist
|
|
2
2
|
|
|
3
|
-
> Typed, deterministic, locale-aware fake data generator with seeded PRNG
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@vielzeug/illusionist) [](https://opensource.org/licenses/MIT)
|
|
3
|
+
> Typed, deterministic, locale-aware fake data generator with seeded PRNG
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
@@ -28,53 +26,6 @@ illusion.finance.iban(); // "IT0649896243786776403271206"
|
|
|
28
26
|
illusion.location.city(); // "Denver"
|
|
29
27
|
illusion.lorem.paragraph(); // "Dolor in fugiat anim dolor aute officia irure sunt..."
|
|
30
28
|
illusion.system.semver(); // "7.4.0"
|
|
31
|
-
|
|
32
|
-
illusion.dispose(); // [Symbol.dispose]() also works
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Entry Points
|
|
36
|
-
|
|
37
|
-
- `@vielzeug/illusionist` — curated root exports + `createIllusion` factory
|
|
38
|
-
- `@vielzeug/illusionist/person` — names, genders, job titles
|
|
39
|
-
- `@vielzeug/illusionist/internet` — emails, URLs, IPs, user agents
|
|
40
|
-
- `@vielzeug/illusionist/commerce` — product names, prices, departments
|
|
41
|
-
- `@vielzeug/illusionist/date` — past/future dates, birthdays, weekdays
|
|
42
|
-
- `@vielzeug/illusionist/finance` — IBANs, credit cards, crypto addresses
|
|
43
|
-
- `@vielzeug/illusionist/location` — cities, streets, coordinates
|
|
44
|
-
- `@vielzeug/illusionist/lorem` — lorem ipsum text generation
|
|
45
|
-
- `@vielzeug/illusionist/system` — file paths, semver, UUIDs, cron
|
|
46
|
-
- `@vielzeug/illusionist/seed` — `createSeed`, `mulberry32` PRNG
|
|
47
|
-
- `@vielzeug/illusionist/locales` — locale objects (`en`, `de`); tree-shakeable, import only what you use
|
|
48
|
-
|
|
49
|
-
## Seeded Determinism
|
|
50
|
-
|
|
51
|
-
Pass a `seed` for reproducible output — same seed always produces the same sequence across all categories. Omit `seed` for cryptographic randomness via `crypto.getRandomValues`.
|
|
52
|
-
|
|
53
|
-
```ts
|
|
54
|
-
const a = createIllusion({ seed: 'test-fixture', locale: en });
|
|
55
|
-
const b = createIllusion({ seed: 'test-fixture', locale: en });
|
|
56
|
-
|
|
57
|
-
a.person.fullName() === b.person.fullName(); // true
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Locale Support
|
|
61
|
-
|
|
62
|
-
Initial locales are explicit, tree-shakeable objects exported from `@vielzeug/illusionist/locales`. Locale data ships only for locales you import; the root package includes no default locale.
|
|
63
|
-
|
|
64
|
-
```ts
|
|
65
|
-
import { de } from '@vielzeug/illusionist/locales';
|
|
66
|
-
|
|
67
|
-
const illusion = createIllusion({ seed: 42, locale: de });
|
|
68
|
-
|
|
69
|
-
illusion.person.firstName(); // "Mathilda"
|
|
70
|
-
illusion.location.city(); // "Bielefeld"
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
For dynamic app switching, load the locale before creating the synchronous instance:
|
|
74
|
-
|
|
75
|
-
```ts
|
|
76
|
-
const { de } = await import('@vielzeug/illusionist/locales');
|
|
77
|
-
const illusion = createIllusion({ locale: de });
|
|
78
29
|
```
|
|
79
30
|
|
|
80
31
|
## Documentation
|
|
@@ -83,6 +34,7 @@ const illusion = createIllusion({ locale: de });
|
|
|
83
34
|
- [Usage Guide](https://vielzeug.dev/illusionist/usage)
|
|
84
35
|
- [API Reference](https://vielzeug.dev/illusionist/api)
|
|
85
36
|
- [Examples](https://vielzeug.dev/illusionist/examples)
|
|
37
|
+
- [Migration Guide](https://vielzeug.dev/illusionist/migration)
|
|
86
38
|
|
|
87
39
|
## License
|
|
88
40
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let e=require("@vielzeug/arsenal");function t(t,n=.5){return(0,e.randomFloat)(t)<n}exports.boolean=t;
|
|
2
2
|
//# sourceMappingURL=boolean.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.cjs","names":[],"sources":["../../src/_helpers/boolean.ts"],"sourcesContent":["import type { RandomSource } from '
|
|
1
|
+
{"version":3,"file":"boolean.cjs","names":[],"sources":["../../src/_helpers/boolean.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\nimport { nextFloat } from './next-float';\n\n/** Generates a random boolean with an optional probability bias (0–1, default 0.5). */\nexport function boolean(source?: RandomSource, probability = 0.5): boolean {\n return nextFloat(source) < probability;\n}\n"],"mappings":"mCAKA,SAAgB,EAAQ,EAAuB,EAAc,GAAc,CACzE,OAAA,EAAO,EAAA,YAAA,CAAU,CAAM,EAAI,CAC7B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RandomSource } from '
|
|
1
|
+
import type { RandomSource } from '../types';
|
|
2
2
|
/** Generates a random boolean with an optional probability bias (0–1, default 0.5). */
|
|
3
3
|
export declare function boolean(source?: RandomSource, probability?: number): boolean;
|
|
4
4
|
//# sourceMappingURL=boolean.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src/_helpers/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../src/_helpers/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,uFAAuF;AACvF,wBAAgB,OAAO,CAAC,MAAM,CAAC,EAAE,YAAY,EAAE,WAAW,SAAM,GAAG,OAAO,CAEzE"}
|
package/dist/_helpers/boolean.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { nextFloat as e } from "./next-float.js";
|
|
1
2
|
//#region src/_helpers/boolean.ts
|
|
2
|
-
function
|
|
3
|
-
return
|
|
3
|
+
function t(t, n = .5) {
|
|
4
|
+
return e(t) < n;
|
|
4
5
|
}
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { t as boolean };
|
|
7
8
|
|
|
8
9
|
//# sourceMappingURL=boolean.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"boolean.js","names":[],"sources":["../../src/_helpers/boolean.ts"],"sourcesContent":["import type { RandomSource } from '
|
|
1
|
+
{"version":3,"file":"boolean.js","names":[],"sources":["../../src/_helpers/boolean.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\nimport { nextFloat } from './next-float';\n\n/** Generates a random boolean with an optional probability bias (0–1, default 0.5). */\nexport function boolean(source?: RandomSource, probability = 0.5): boolean {\n return nextFloat(source) < probability;\n}\n"],"mappings":";;AAKA,SAAgB,EAAQ,GAAuB,IAAc,IAAc;CACzE,OAAO,EAAU,CAAM,IAAI;AAC7B"}
|
package/dist/_helpers/float.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let e=require("@vielzeug/arsenal");function t(t,n,r){return t>n?t:t+(0,e.randomFloat)(r)*(n-t)}function n(e,n,r=2,i){let a=10**r,o=t(e*a,n*a,i);return Math.round(o)/a}exports.float=t,exports.floatFixed=n;
|
|
2
2
|
//# sourceMappingURL=float.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float.cjs","names":[],"sources":["../../src/_helpers/float.ts"],"sourcesContent":["import type { RandomSource } from '
|
|
1
|
+
{"version":3,"file":"float.cjs","names":[],"sources":["../../src/_helpers/float.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\nimport { nextFloat } from './next-float';\n\n/**\n * Generates a random float in `[min, max)`.\n * Pass `min` = `max` for a constant; the result is still `min` (not `max`).\n */\nexport function float(min: number, max: number, source?: RandomSource): number {\n if (min > max) return min;\n\n return min + nextFloat(source) * (max - min);\n}\n\n/** Generates a random float with a fixed number of decimal places. */\nexport function floatFixed(min: number, max: number, decimals = 2, source?: RandomSource): number {\n const factor = 10 ** decimals;\n const scaled = float(min * factor, max * factor, source);\n\n return Math.round(scaled) / factor;\n}\n"],"mappings":"mCAQA,SAAgB,EAAM,EAAa,EAAa,EAA+B,CAG7E,OAFI,EAAM,EAAY,EAEf,GAAA,EAAM,EAAA,YAAA,CAAU,CAAM,GAAK,EAAM,EAC1C,CAGA,SAAgB,EAAW,EAAa,EAAa,EAAW,EAAG,EAA+B,CAChG,IAAM,EAAS,IAAM,EACf,EAAS,EAAM,EAAM,EAAQ,EAAM,EAAQ,CAAM,EAEvD,OAAO,KAAK,MAAM,CAAM,EAAI,CAC9B"}
|
package/dist/_helpers/float.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float.d.ts","sourceRoot":"","sources":["../../src/_helpers/float.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"float.d.ts","sourceRoot":"","sources":["../../src/_helpers/float.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C;;;GAGG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAI7E;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,SAAI,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAKhG"}
|
package/dist/_helpers/float.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
+
import { nextFloat as e } from "./next-float.js";
|
|
1
2
|
//#region src/_helpers/float.ts
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
let r = t - e;
|
|
5
|
-
return e + (n?.next() ?? crypto.getRandomValues(/* @__PURE__ */ new Uint32Array(1))[0] / 4294967296) * r;
|
|
3
|
+
function t(t, n, r) {
|
|
4
|
+
return t > n ? t : t + e(r) * (n - t);
|
|
6
5
|
}
|
|
7
|
-
function
|
|
8
|
-
let a = 10 ** r, o = e
|
|
6
|
+
function n(e, n, r = 2, i) {
|
|
7
|
+
let a = 10 ** r, o = t(e * a, n * a, i);
|
|
9
8
|
return Math.round(o) / a;
|
|
10
9
|
}
|
|
11
10
|
//#endregion
|
|
12
|
-
export {
|
|
11
|
+
export { t as float, n as floatFixed };
|
|
13
12
|
|
|
14
13
|
//# sourceMappingURL=float.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"float.js","names":[],"sources":["../../src/_helpers/float.ts"],"sourcesContent":["import type { RandomSource } from '
|
|
1
|
+
{"version":3,"file":"float.js","names":[],"sources":["../../src/_helpers/float.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\nimport { nextFloat } from './next-float';\n\n/**\n * Generates a random float in `[min, max)`.\n * Pass `min` = `max` for a constant; the result is still `min` (not `max`).\n */\nexport function float(min: number, max: number, source?: RandomSource): number {\n if (min > max) return min;\n\n return min + nextFloat(source) * (max - min);\n}\n\n/** Generates a random float with a fixed number of decimal places. */\nexport function floatFixed(min: number, max: number, decimals = 2, source?: RandomSource): number {\n const factor = 10 ** decimals;\n const scaled = float(min * factor, max * factor, source);\n\n return Math.round(scaled) / factor;\n}\n"],"mappings":";;AAQA,SAAgB,EAAM,GAAa,GAAa,GAA+B;CAG7E,OAFI,IAAM,IAAY,IAEf,IAAM,EAAU,CAAM,KAAK,IAAM;AAC1C;AAGA,SAAgB,EAAW,GAAa,GAAa,IAAW,GAAG,GAA+B;CAChG,IAAM,IAAS,MAAM,GACf,IAAS,EAAM,IAAM,GAAQ,IAAM,GAAQ,CAAM;CAEvD,OAAO,KAAK,MAAM,CAAM,IAAI;AAC9B"}
|
package/dist/_helpers/int.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=require("@vielzeug/arsenal
|
|
1
|
+
let e=require("@vielzeug/arsenal");function t(t,n,r){return(0,e.random)(t,n,r)}exports.int=t;
|
|
2
2
|
//# sourceMappingURL=int.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"int.cjs","names":[],"sources":["../../src/_helpers/int.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"int.cjs","names":[],"sources":["../../src/_helpers/int.ts"],"sourcesContent":["import { random } from '@vielzeug/arsenal';\n\nimport type { RandomSource } from '../types';\n\n/** Generates a random integer in `[min, max]` (inclusive). */\nexport function int(min: number, max: number, source?: RandomSource): number {\n return random(min, max, source);\n}\n"],"mappings":"mCAKA,SAAgB,EAAI,EAAa,EAAa,EAA+B,CAC3E,OAAA,EAAO,EAAA,OAAA,CAAO,EAAK,EAAK,CAAM,CAChC"}
|
package/dist/_helpers/int.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RandomSource } from '
|
|
1
|
+
import type { RandomSource } from '../types';
|
|
2
2
|
/** Generates a random integer in `[min, max]` (inclusive). */
|
|
3
3
|
export declare function int(min: number, max: number, source?: RandomSource): number;
|
|
4
4
|
//# sourceMappingURL=int.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"int.d.ts","sourceRoot":"","sources":["../../src/_helpers/int.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"int.d.ts","sourceRoot":"","sources":["../../src/_helpers/int.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,8DAA8D;AAC9D,wBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAE3E"}
|
package/dist/_helpers/int.js
CHANGED
package/dist/_helpers/int.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"int.js","names":[],"sources":["../../src/_helpers/int.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"int.js","names":[],"sources":["../../src/_helpers/int.ts"],"sourcesContent":["import { random } from '@vielzeug/arsenal';\n\nimport type { RandomSource } from '../types';\n\n/** Generates a random integer in `[min, max]` (inclusive). */\nexport function int(min: number, max: number, source?: RandomSource): number {\n return random(min, max, source);\n}\n"],"mappings":";;AAKA,SAAgB,EAAI,GAAa,GAAa,GAA+B;CAC3E,OAAO,EAAO,GAAK,GAAK,CAAM;AAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-float.d.ts","sourceRoot":"","sources":["../../src/_helpers/next-float.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,IAAI,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/_helpers/string.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
let e=require("@vielzeug/arsenal
|
|
1
|
+
let e=require("@vielzeug/arsenal");function t(t,n){return t.length===0?void 0:t[Math.floor((0,e.randomFloat)(n)*t.length)]}function n(t,n){let r=``;for(let i=0;i<t;i++)r+=Math.floor((0,e.randomFloat)(n)*10);return r}function r(t,n){let r=``;for(let i=0;i<t;i++)r+=`0123456789abcdef`[Math.floor((0,e.randomFloat)(n)*16)];return r}function i(t,n){let r=``;for(let i=0;i<t;i++)r+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[Math.floor((0,e.randomFloat)(n)*62)];return r}function a(t,n){let r=``;for(let i=0;i<t;i++)r+=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`[Math.floor((0,e.randomFloat)(n)*58)];return r}exports.alphanumeric=i,exports.base58String=a,exports.hexString=r,exports.numericString=n,exports.pick=t;
|
|
2
2
|
//# sourceMappingURL=string.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.cjs","names":[],"sources":["../../src/_helpers/string.ts"],"sourcesContent":["import type { RandomSource } from '
|
|
1
|
+
{"version":3,"file":"string.cjs","names":[],"sources":["../../src/_helpers/string.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\nimport { nextFloat } from './next-float';\n\n/** Picks a random element from a readonly array. Returns `undefined` for empty arrays. */\nexport function pick<T>(array: readonly T[], source?: RandomSource): T | undefined {\n return array.length === 0 ? undefined : array[Math.floor(nextFloat(source) * array.length)];\n}\n\n/** Generates a string of random digits with a fixed length. */\nexport function numericString(length: number, source?: RandomSource): string {\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += Math.floor(nextFloat(source) * 10);\n }\n\n return result;\n}\n\n/** Generates a random hex string of the given length. */\nexport function hexString(length: number, source?: RandomSource): string {\n const chars = '0123456789abcdef';\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.floor(nextFloat(source) * 16)];\n }\n\n return result;\n}\n\n/** Generates a random alphanumeric string of the given length. */\nexport function alphanumeric(length: number, source?: RandomSource): string {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.floor(nextFloat(source) * chars.length)];\n }\n\n return result;\n}\n\n/** Generates a random Base58 string (no 0, O, I, l) — used for Bitcoin-style addresses. */\nexport function base58String(length: number, source?: RandomSource): string {\n const chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.floor(nextFloat(source) * chars.length)];\n }\n\n return result;\n}\n"],"mappings":"mCAKA,SAAgB,EAAQ,EAAqB,EAAsC,CACjF,OAAO,EAAM,SAAW,EAAI,IAAA,GAAY,EAAM,KAAK,OAAA,EAAM,EAAA,YAAA,CAAU,CAAM,EAAI,EAAM,MAAM,EAC3F,CAGA,SAAgB,EAAc,EAAgB,EAA+B,CAC3E,IAAI,EAAS,GAEb,IAAK,IAAI,EAAI,EAAG,EAAI,EAAQ,IAC1B,GAAU,KAAK,OAAA,EAAM,EAAA,YAAA,CAAU,CAAM,EAAI,EAAE,EAG7C,OAAO,CACT,CAGA,SAAgB,EAAU,EAAgB,EAA+B,CACvE,IACI,EAAS,GAEb,IAAK,IAAI,EAAI,EAAG,EAAI,EAAQ,IAC1B,GAAU,mBAAM,KAAK,OAAA,EAAM,EAAA,YAAA,CAAU,CAAM,EAAI,EAAE,GAGnD,OAAO,CACT,CAGA,SAAgB,EAAa,EAAgB,EAA+B,CAC1E,IACI,EAAS,GAEb,IAAK,IAAI,EAAI,EAAG,EAAI,EAAQ,IAC1B,GAAU,iEAAM,KAAK,OAAA,EAAM,EAAA,YAAA,CAAU,CAAM,EAAI,EAAY,GAG7D,OAAO,CACT,CAGA,SAAgB,EAAa,EAAgB,EAA+B,CAC1E,IACI,EAAS,GAEb,IAAK,IAAI,EAAI,EAAG,EAAI,EAAQ,IAC1B,GAAU,6DAAM,KAAK,OAAA,EAAM,EAAA,YAAA,CAAU,CAAM,EAAI,EAAY,GAG7D,OAAO,CACT"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RandomSource } from '
|
|
2
|
-
/** Picks a random element from
|
|
1
|
+
import type { RandomSource } from '../types';
|
|
2
|
+
/** Picks a random element from a readonly array. Returns `undefined` for empty arrays. */
|
|
3
3
|
export declare function pick<T>(array: readonly T[], source?: RandomSource): T | undefined;
|
|
4
4
|
/** Generates a string of random digits with a fixed length. */
|
|
5
5
|
export declare function numericString(length: number, source?: RandomSource): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/_helpers/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/_helpers/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI7C,0FAA0F;AAC1F,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,CAAC,GAAG,SAAS,CAEjF;AAED,+DAA+D;AAC/D,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAQ3E;AAED,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CASvE;AAED,kEAAkE;AAClE,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAS1E;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,GAAG,MAAM,CAS1E"}
|
package/dist/_helpers/string.js
CHANGED
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { nextFloat as e } from "./next-float.js";
|
|
2
2
|
//#region src/_helpers/string.ts
|
|
3
3
|
function t(t, n) {
|
|
4
|
-
return e(
|
|
4
|
+
return t.length === 0 ? void 0 : t[Math.floor(e(n) * t.length)];
|
|
5
5
|
}
|
|
6
|
-
function n(
|
|
7
|
-
let
|
|
8
|
-
for (let
|
|
9
|
-
return
|
|
6
|
+
function n(t, n) {
|
|
7
|
+
let r = "";
|
|
8
|
+
for (let i = 0; i < t; i++) r += Math.floor(e(n) * 10);
|
|
9
|
+
return r;
|
|
10
10
|
}
|
|
11
|
-
function r(
|
|
12
|
-
let
|
|
13
|
-
for (let
|
|
14
|
-
|
|
15
|
-
n += "0123456789abcdef"[e];
|
|
16
|
-
}
|
|
17
|
-
return n;
|
|
11
|
+
function r(t, n) {
|
|
12
|
+
let r = "";
|
|
13
|
+
for (let i = 0; i < t; i++) r += "0123456789abcdef"[Math.floor(e(n) * 16)];
|
|
14
|
+
return r;
|
|
18
15
|
}
|
|
19
|
-
function i(
|
|
20
|
-
let
|
|
21
|
-
for (let
|
|
22
|
-
|
|
23
|
-
n += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[e];
|
|
24
|
-
}
|
|
25
|
-
return n;
|
|
16
|
+
function i(t, n) {
|
|
17
|
+
let r = "";
|
|
18
|
+
for (let i = 0; i < t; i++) r += "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[Math.floor(e(n) * 62)];
|
|
19
|
+
return r;
|
|
26
20
|
}
|
|
27
|
-
function a(
|
|
28
|
-
let
|
|
29
|
-
for (let
|
|
30
|
-
|
|
31
|
-
n += "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"[e];
|
|
32
|
-
}
|
|
33
|
-
return n;
|
|
21
|
+
function a(t, n) {
|
|
22
|
+
let r = "";
|
|
23
|
+
for (let i = 0; i < t; i++) r += "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"[Math.floor(e(n) * 58)];
|
|
24
|
+
return r;
|
|
34
25
|
}
|
|
35
26
|
//#endregion
|
|
36
27
|
export { i as alphanumeric, a as base58String, r as hexString, n as numericString, t as pick };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"string.js","names":[],"sources":["../../src/_helpers/string.ts"],"sourcesContent":["import type { RandomSource } from '
|
|
1
|
+
{"version":3,"file":"string.js","names":[],"sources":["../../src/_helpers/string.ts"],"sourcesContent":["import type { RandomSource } from '../types';\n\nimport { nextFloat } from './next-float';\n\n/** Picks a random element from a readonly array. Returns `undefined` for empty arrays. */\nexport function pick<T>(array: readonly T[], source?: RandomSource): T | undefined {\n return array.length === 0 ? undefined : array[Math.floor(nextFloat(source) * array.length)];\n}\n\n/** Generates a string of random digits with a fixed length. */\nexport function numericString(length: number, source?: RandomSource): string {\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += Math.floor(nextFloat(source) * 10);\n }\n\n return result;\n}\n\n/** Generates a random hex string of the given length. */\nexport function hexString(length: number, source?: RandomSource): string {\n const chars = '0123456789abcdef';\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.floor(nextFloat(source) * 16)];\n }\n\n return result;\n}\n\n/** Generates a random alphanumeric string of the given length. */\nexport function alphanumeric(length: number, source?: RandomSource): string {\n const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.floor(nextFloat(source) * chars.length)];\n }\n\n return result;\n}\n\n/** Generates a random Base58 string (no 0, O, I, l) — used for Bitcoin-style addresses. */\nexport function base58String(length: number, source?: RandomSource): string {\n const chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';\n let result = '';\n\n for (let i = 0; i < length; i++) {\n result += chars[Math.floor(nextFloat(source) * chars.length)];\n }\n\n return result;\n}\n"],"mappings":";;AAKA,SAAgB,EAAQ,GAAqB,GAAsC;CACjF,OAAO,EAAM,WAAW,IAAI,KAAA,IAAY,EAAM,KAAK,MAAM,EAAU,CAAM,IAAI,EAAM,MAAM;AAC3F;AAGA,SAAgB,EAAc,GAAgB,GAA+B;CAC3E,IAAI,IAAS;CAEb,KAAK,IAAI,IAAI,GAAG,IAAI,GAAQ,KAC1B,KAAU,KAAK,MAAM,EAAU,CAAM,IAAI,EAAE;CAG7C,OAAO;AACT;AAGA,SAAgB,EAAU,GAAgB,GAA+B;CACvE,IACI,IAAS;CAEb,KAAK,IAAI,IAAI,GAAG,IAAI,GAAQ,KAC1B,KAAU,mBAAM,KAAK,MAAM,EAAU,CAAM,IAAI,EAAE;CAGnD,OAAO;AACT;AAGA,SAAgB,EAAa,GAAgB,GAA+B;CAC1E,IACI,IAAS;CAEb,KAAK,IAAI,IAAI,GAAG,IAAI,GAAQ,KAC1B,KAAU,iEAAM,KAAK,MAAM,EAAU,CAAM,IAAI,EAAY;CAG7D,OAAO;AACT;AAGA,SAAgB,EAAa,GAAgB,GAA+B;CAC1E,IACI,IAAS;CAEb,KAAK,IAAI,IAAI,GAAG,IAAI,GAAQ,KAC1B,KAAU,6DAAM,KAAK,MAAM,EAAU,CAAM,IAAI,EAAY;CAG7D,OAAO;AACT"}
|
package/dist/date/date.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/int.cjs");let n=require("@vielzeug/tempo");var r=e.__exportAll({between:()=>c,birthday:()=>l,future:()=>o,month:()=>d,past:()=>a,recent:()=>s,weekday:()=>u});function i(e){return e??n.Temporal.Now.zonedDateTimeISO(`UTC`)}function a(e,
|
|
1
|
+
const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/int.cjs");let n=require("@vielzeug/tempo");var r=e.__exportAll({between:()=>c,birthday:()=>l,future:()=>o,month:()=>d,past:()=>a,recent:()=>s,weekday:()=>u});function i(e){return e??n.Temporal.Now.zonedDateTimeISO(`UTC`)}function a(e,n){let r=i(n?.ref),a=(n?.years??1)*365*24*60*60;return r.add({seconds:-t.int(1,a,e.source)})}function o(e,n){let r=i(n?.ref),a=(n?.years??1)*365*24*60*60;return r.add({seconds:t.int(1,a,e.source)})}function s(e,n){let r=i(n?.ref),a=(n?.days??1)*24*60*60;return r.add({seconds:-t.int(1,a,e.source)})}function c(e,t,n){let r=t.toInstant().epochNanoseconds,i=n.toInstant().epochNanoseconds;if(r>i)return t;let a=i-r,o=Number(a/1000000000n),s=Math.floor(e.source.next()*o);return t.add({seconds:s})}function l(e,n){let r=i(n?.ref),a=n?.minAge??18,o=n?.maxAge??80,s=t.int(a,o,e.source),c=t.int(1,12,e.source),l=t.int(1,28,e.source);return r.toPlainDate().subtract({years:s}).with({day:l,month:c})}function u(e,n){return((n??e.locale.code)===`de`?[`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`,`Sonntag`]:[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`])[t.int(0,6,e.source)]}function d(e,n){return((n??e.locale.code)===`de`?[`Januar`,`Februar`,`März`,`April`,`Mai`,`Juni`,`Juli`,`August`,`September`,`Oktober`,`November`,`Dezember`]:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`])[t.int(0,11,e.source)]}exports.between=c,exports.birthday=l,Object.defineProperty(exports,"date_exports",{enumerable:!0,get:function(){return r}}),exports.future=o,exports.month=d,exports.past=a,exports.recent=s,exports.weekday=u;
|
|
2
2
|
//# sourceMappingURL=date.cjs.map
|
package/dist/date/date.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.cjs","names":[],"sources":["../../src/date/date.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"date.cjs","names":[],"sources":["../../src/date/date.ts"],"sourcesContent":["import { Temporal } from '@vielzeug/tempo';\n\nimport { int } from '../_helpers/int';\nimport type { IllusionistContext } from '../types';\n\ntype DateOptions = {\n years?: number;\n ref?: Temporal.ZonedDateTime;\n};\n\nfunction resolveRef(ref?: Temporal.ZonedDateTime): Temporal.ZonedDateTime {\n return ref ?? Temporal.Now.zonedDateTimeISO('UTC');\n}\n\n/**\n * Generates a past date within the given number of years from `ref` (default: now).\n */\nexport function past(ctx: IllusionistContext, options?: DateOptions): Temporal.ZonedDateTime {\n const ref = resolveRef(options?.ref);\n const years = options?.years ?? 1;\n const maxSeconds = years * 365 * 24 * 60 * 60;\n const minSeconds = 1;\n\n return ref.add({ seconds: -int(minSeconds, maxSeconds, ctx.source) });\n}\n\n/**\n * Generates a future date within the given number of years from `ref` (default: now).\n */\nexport function future(ctx: IllusionistContext, options?: DateOptions): Temporal.ZonedDateTime {\n const ref = resolveRef(options?.ref);\n const years = options?.years ?? 1;\n const maxSeconds = years * 365 * 24 * 60 * 60;\n\n return ref.add({ seconds: int(1, maxSeconds, ctx.source) });\n}\n\n/**\n * Generates a recent date within the given number of days from `ref` (default: now).\n */\nexport function recent(\n ctx: IllusionistContext,\n options?: { days?: number; ref?: Temporal.ZonedDateTime },\n): Temporal.ZonedDateTime {\n const ref = resolveRef(options?.ref);\n const days = options?.days ?? 1;\n const maxSeconds = days * 24 * 60 * 60;\n\n return ref.add({ seconds: -int(1, maxSeconds, ctx.source) });\n}\n\n/**\n * Generates a date between `from` and `to`.\n */\nexport function between(\n ctx: IllusionistContext,\n from: Temporal.ZonedDateTime,\n to: Temporal.ZonedDateTime,\n): Temporal.ZonedDateTime {\n const fromNs = from.toInstant().epochNanoseconds;\n const toNs = to.toInstant().epochNanoseconds;\n\n if (fromNs > toNs) {\n return from;\n }\n\n const spanNs = toNs - fromNs;\n const spanSeconds = Number(spanNs / 1_000_000_000n);\n const offsetSeconds = Math.floor(ctx.source.next() * spanSeconds);\n\n return from.add({ seconds: offsetSeconds });\n}\n\n/**\n * Generates a random birthday — a date with a random year (default 18-80 years ago) and random month/day.\n */\nexport function birthday(\n ctx: IllusionistContext,\n options?: { minAge?: number; maxAge?: number; ref?: Temporal.ZonedDateTime },\n): Temporal.PlainDate {\n const ref = resolveRef(options?.ref);\n const minAge = options?.minAge ?? 18;\n const maxAge = options?.maxAge ?? 80;\n const age = int(minAge, maxAge, ctx.source);\n const month = int(1, 12, ctx.source);\n const day = int(1, 28, ctx.source);\n\n return ref.toPlainDate().subtract({ years: age }).with({ day, month });\n}\n\n/**\n * Returns a random weekday name.\n */\nexport function weekday(ctx: IllusionistContext, locale?: string): string {\n const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];\n const loc = locale ?? ctx.locale.code;\n const localized =\n loc === 'de' ? ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] : days;\n\n return localized[int(0, 6, ctx.source)]!;\n}\n\n/**\n * Returns a random month name.\n */\nexport function month(ctx: IllusionistContext, locale?: string): string {\n const months = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ];\n const loc = locale ?? ctx.locale.code;\n const localized =\n loc === 'de'\n ? [\n 'Januar',\n 'Februar',\n 'März',\n 'April',\n 'Mai',\n 'Juni',\n 'Juli',\n 'August',\n 'September',\n 'Oktober',\n 'November',\n 'Dezember',\n ]\n : months;\n\n return localized[int(0, 11, ctx.source)]!;\n}\n"],"mappings":"0OAUA,SAAS,EAAW,EAAsD,CACxE,OAAO,GAAO,EAAA,SAAS,IAAI,iBAAiB,KAAK,CACnD,CAKA,SAAgB,EAAK,EAAyB,EAA+C,CAC3F,IAAM,EAAM,EAAW,GAAS,GAAG,EAE7B,GADQ,GAAS,OAAS,GACL,IAAM,GAAK,GAAK,GAG3C,OAAO,EAAI,IAAI,CAAE,QAAS,CAAC,EAAA,IAAI,EAAY,EAAY,EAAI,MAAM,CAAE,CAAC,CACtE,CAKA,SAAgB,EAAO,EAAyB,EAA+C,CAC7F,IAAM,EAAM,EAAW,GAAS,GAAG,EAE7B,GADQ,GAAS,OAAS,GACL,IAAM,GAAK,GAAK,GAE3C,OAAO,EAAI,IAAI,CAAE,QAAS,EAAA,IAAI,EAAG,EAAY,EAAI,MAAM,CAAE,CAAC,CAC5D,CAKA,SAAgB,EACd,EACA,EACwB,CACxB,IAAM,EAAM,EAAW,GAAS,GAAG,EAE7B,GADO,GAAS,MAAQ,GACJ,GAAK,GAAK,GAEpC,OAAO,EAAI,IAAI,CAAE,QAAS,CAAC,EAAA,IAAI,EAAG,EAAY,EAAI,MAAM,CAAE,CAAC,CAC7D,CAKA,SAAgB,EACd,EACA,EACA,EACwB,CACxB,IAAM,EAAS,EAAK,UAAU,CAAC,CAAC,iBAC1B,EAAO,EAAG,UAAU,CAAC,CAAC,iBAE5B,GAAI,EAAS,EACX,OAAO,EAGT,IAAM,EAAS,EAAO,EAChB,EAAc,OAAO,EAAS,WAAc,EAC5C,EAAgB,KAAK,MAAM,EAAI,OAAO,KAAK,EAAI,CAAW,EAEhE,OAAO,EAAK,IAAI,CAAE,QAAS,CAAc,CAAC,CAC5C,CAKA,SAAgB,EACd,EACA,EACoB,CACpB,IAAM,EAAM,EAAW,GAAS,GAAG,EAC7B,EAAS,GAAS,QAAU,GAC5B,EAAS,GAAS,QAAU,GAC5B,EAAM,EAAA,IAAI,EAAQ,EAAQ,EAAI,MAAM,EACpC,EAAQ,EAAA,IAAI,EAAG,GAAI,EAAI,MAAM,EAC7B,EAAM,EAAA,IAAI,EAAG,GAAI,EAAI,MAAM,EAEjC,OAAO,EAAI,YAAY,CAAC,CAAC,SAAS,CAAE,MAAO,CAAI,CAAC,CAAC,CAAC,KAAK,CAAE,MAAK,OAAM,CAAC,CACvE,CAKA,SAAgB,EAAQ,EAAyB,EAAyB,CAMxE,QAJY,GAAU,EAAI,OAAO,QAEvB,KAAO,CAAC,SAAU,WAAY,WAAY,aAAc,UAAW,UAAW,SAAS,EAAI,CAHvF,SAAU,UAAW,YAAa,WAAY,SAAU,WAAY,QAGmB,EAAA,CAEpF,EAAA,IAAI,EAAG,EAAG,EAAI,MAAM,EACvC,CAKA,SAAgB,EAAM,EAAyB,EAAyB,CAkCtE,QAnBY,GAAU,EAAI,OAAO,QAEvB,KACJ,CACE,SACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,UACF,EACA,CA9BJ,UACA,WACA,QACA,QACA,MACA,OACA,OACA,SACA,YACA,UACA,WACA,UAmBI,EAAA,CAEW,EAAA,IAAI,EAAG,GAAI,EAAI,MAAM,EACxC"}
|
package/dist/date/date.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/date/date.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/date/date.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,KAAK,WAAW,GAAG;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC;CAC9B,CAAC;AAMF;;GAEG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC,aAAa,CAO3F;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC,aAAa,CAM7F;AAED;;GAEG;AACH,wBAAgB,MAAM,CACpB,GAAG,EAAE,kBAAkB,EACvB,OAAO,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAA;CAAE,GACxD,QAAQ,CAAC,aAAa,CAMxB;AAED;;GAEG;AACH,wBAAgB,OAAO,CACrB,GAAG,EAAE,kBAAkB,EACvB,IAAI,EAAE,QAAQ,CAAC,aAAa,EAC5B,EAAE,EAAE,QAAQ,CAAC,aAAa,GACzB,QAAQ,CAAC,aAAa,CAaxB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,kBAAkB,EACvB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAA;CAAE,GAC3E,QAAQ,CAAC,SAAS,CASpB;AAED;;GAEG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAOxE;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAmCtE"}
|
package/dist/date/date.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
|
|
2
2
|
import { int as t } from "../_helpers/int.js";
|
|
3
|
-
import { Temporal as n
|
|
3
|
+
import { Temporal as n } from "@vielzeug/tempo";
|
|
4
4
|
//#region src/date/date.ts
|
|
5
|
-
var
|
|
6
|
-
between: () =>
|
|
7
|
-
birthday: () =>
|
|
8
|
-
future: () =>
|
|
9
|
-
month: () =>
|
|
10
|
-
past: () =>
|
|
11
|
-
recent: () =>
|
|
12
|
-
weekday: () =>
|
|
5
|
+
var r = /* @__PURE__ */ e({
|
|
6
|
+
between: () => c,
|
|
7
|
+
birthday: () => l,
|
|
8
|
+
future: () => o,
|
|
9
|
+
month: () => d,
|
|
10
|
+
past: () => a,
|
|
11
|
+
recent: () => s,
|
|
12
|
+
weekday: () => u
|
|
13
13
|
});
|
|
14
|
-
function
|
|
14
|
+
function i(e) {
|
|
15
15
|
return e ?? n.Now.zonedDateTimeISO("UTC");
|
|
16
16
|
}
|
|
17
|
+
function a(e, n) {
|
|
18
|
+
let r = i(n?.ref), a = (n?.years ?? 1) * 365 * 24 * 60 * 60;
|
|
19
|
+
return r.add({ seconds: -t(1, a, e.source) });
|
|
20
|
+
}
|
|
17
21
|
function o(e, n) {
|
|
18
|
-
let
|
|
19
|
-
return r(
|
|
22
|
+
let r = i(n?.ref), a = (n?.years ?? 1) * 365 * 24 * 60 * 60;
|
|
23
|
+
return r.add({ seconds: t(1, a, e.source) });
|
|
20
24
|
}
|
|
21
25
|
function s(e, n) {
|
|
22
|
-
let
|
|
23
|
-
return r(
|
|
24
|
-
}
|
|
25
|
-
function c(e, n) {
|
|
26
|
-
let i = a(n?.ref), o = (n?.days ?? 1) * 24 * 60 * 60;
|
|
27
|
-
return r(i, { seconds: -t(1, o, e.source) });
|
|
26
|
+
let r = i(n?.ref), a = (n?.days ?? 1) * 24 * 60 * 60;
|
|
27
|
+
return r.add({ seconds: -t(1, a, e.source) });
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function c(e, t, n) {
|
|
30
30
|
let r = t.toInstant().epochNanoseconds, i = n.toInstant().epochNanoseconds;
|
|
31
31
|
if (r > i) return t;
|
|
32
32
|
let a = i - r, o = Number(a / 1000000000n), s = Math.floor(e.source.next() * o);
|
|
33
33
|
return t.add({ seconds: s });
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
let r =
|
|
35
|
+
function l(e, n) {
|
|
36
|
+
let r = i(n?.ref), a = n?.minAge ?? 18, o = n?.maxAge ?? 80, s = t(a, o, e.source), c = t(1, 12, e.source), l = t(1, 28, e.source);
|
|
37
37
|
return r.toPlainDate().subtract({ years: s }).with({
|
|
38
38
|
day: l,
|
|
39
39
|
month: c
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function u(e, n) {
|
|
43
43
|
return ((n ?? e.locale.code) === "de" ? [
|
|
44
44
|
"Montag",
|
|
45
45
|
"Dienstag",
|
|
@@ -58,7 +58,7 @@ function d(e, n) {
|
|
|
58
58
|
"Sunday"
|
|
59
59
|
])[t(0, 6, e.source)];
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function d(e, n) {
|
|
62
62
|
return ((n ?? e.locale.code) === "de" ? [
|
|
63
63
|
"Januar",
|
|
64
64
|
"Februar",
|
|
@@ -88,6 +88,6 @@ function f(e, n) {
|
|
|
88
88
|
])[t(0, 11, e.source)];
|
|
89
89
|
}
|
|
90
90
|
//#endregion
|
|
91
|
-
export {
|
|
91
|
+
export { c as between, l as birthday, r as date_exports, o as future, d as month, a as past, s as recent, u as weekday };
|
|
92
92
|
|
|
93
93
|
//# sourceMappingURL=date.js.map
|
package/dist/date/date.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date.js","names":[],"sources":["../../src/date/date.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"date.js","names":[],"sources":["../../src/date/date.ts"],"sourcesContent":["import { Temporal } from '@vielzeug/tempo';\n\nimport { int } from '../_helpers/int';\nimport type { IllusionistContext } from '../types';\n\ntype DateOptions = {\n years?: number;\n ref?: Temporal.ZonedDateTime;\n};\n\nfunction resolveRef(ref?: Temporal.ZonedDateTime): Temporal.ZonedDateTime {\n return ref ?? Temporal.Now.zonedDateTimeISO('UTC');\n}\n\n/**\n * Generates a past date within the given number of years from `ref` (default: now).\n */\nexport function past(ctx: IllusionistContext, options?: DateOptions): Temporal.ZonedDateTime {\n const ref = resolveRef(options?.ref);\n const years = options?.years ?? 1;\n const maxSeconds = years * 365 * 24 * 60 * 60;\n const minSeconds = 1;\n\n return ref.add({ seconds: -int(minSeconds, maxSeconds, ctx.source) });\n}\n\n/**\n * Generates a future date within the given number of years from `ref` (default: now).\n */\nexport function future(ctx: IllusionistContext, options?: DateOptions): Temporal.ZonedDateTime {\n const ref = resolveRef(options?.ref);\n const years = options?.years ?? 1;\n const maxSeconds = years * 365 * 24 * 60 * 60;\n\n return ref.add({ seconds: int(1, maxSeconds, ctx.source) });\n}\n\n/**\n * Generates a recent date within the given number of days from `ref` (default: now).\n */\nexport function recent(\n ctx: IllusionistContext,\n options?: { days?: number; ref?: Temporal.ZonedDateTime },\n): Temporal.ZonedDateTime {\n const ref = resolveRef(options?.ref);\n const days = options?.days ?? 1;\n const maxSeconds = days * 24 * 60 * 60;\n\n return ref.add({ seconds: -int(1, maxSeconds, ctx.source) });\n}\n\n/**\n * Generates a date between `from` and `to`.\n */\nexport function between(\n ctx: IllusionistContext,\n from: Temporal.ZonedDateTime,\n to: Temporal.ZonedDateTime,\n): Temporal.ZonedDateTime {\n const fromNs = from.toInstant().epochNanoseconds;\n const toNs = to.toInstant().epochNanoseconds;\n\n if (fromNs > toNs) {\n return from;\n }\n\n const spanNs = toNs - fromNs;\n const spanSeconds = Number(spanNs / 1_000_000_000n);\n const offsetSeconds = Math.floor(ctx.source.next() * spanSeconds);\n\n return from.add({ seconds: offsetSeconds });\n}\n\n/**\n * Generates a random birthday — a date with a random year (default 18-80 years ago) and random month/day.\n */\nexport function birthday(\n ctx: IllusionistContext,\n options?: { minAge?: number; maxAge?: number; ref?: Temporal.ZonedDateTime },\n): Temporal.PlainDate {\n const ref = resolveRef(options?.ref);\n const minAge = options?.minAge ?? 18;\n const maxAge = options?.maxAge ?? 80;\n const age = int(minAge, maxAge, ctx.source);\n const month = int(1, 12, ctx.source);\n const day = int(1, 28, ctx.source);\n\n return ref.toPlainDate().subtract({ years: age }).with({ day, month });\n}\n\n/**\n * Returns a random weekday name.\n */\nexport function weekday(ctx: IllusionistContext, locale?: string): string {\n const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];\n const loc = locale ?? ctx.locale.code;\n const localized =\n loc === 'de' ? ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Sonntag'] : days;\n\n return localized[int(0, 6, ctx.source)]!;\n}\n\n/**\n * Returns a random month name.\n */\nexport function month(ctx: IllusionistContext, locale?: string): string {\n const months = [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ];\n const loc = locale ?? ctx.locale.code;\n const localized =\n loc === 'de'\n ? [\n 'Januar',\n 'Februar',\n 'März',\n 'April',\n 'Mai',\n 'Juni',\n 'Juli',\n 'August',\n 'September',\n 'Oktober',\n 'November',\n 'Dezember',\n ]\n : months;\n\n return localized[int(0, 11, ctx.source)]!;\n}\n"],"mappings":";;;;;;;;;;;;;AAUA,SAAS,EAAW,GAAsD;CACxE,OAAO,KAAO,EAAS,IAAI,iBAAiB,KAAK;AACnD;AAKA,SAAgB,EAAK,GAAyB,GAA+C;CAC3F,IAAM,IAAM,EAAW,GAAS,GAAG,GAE7B,KADQ,GAAS,SAAS,KACL,MAAM,KAAK,KAAK;CAG3C,OAAO,EAAI,IAAI,EAAE,SAAS,CAAC,EAAI,GAAY,GAAY,EAAI,MAAM,EAAE,CAAC;AACtE;AAKA,SAAgB,EAAO,GAAyB,GAA+C;CAC7F,IAAM,IAAM,EAAW,GAAS,GAAG,GAE7B,KADQ,GAAS,SAAS,KACL,MAAM,KAAK,KAAK;CAE3C,OAAO,EAAI,IAAI,EAAE,SAAS,EAAI,GAAG,GAAY,EAAI,MAAM,EAAE,CAAC;AAC5D;AAKA,SAAgB,EACd,GACA,GACwB;CACxB,IAAM,IAAM,EAAW,GAAS,GAAG,GAE7B,KADO,GAAS,QAAQ,KACJ,KAAK,KAAK;CAEpC,OAAO,EAAI,IAAI,EAAE,SAAS,CAAC,EAAI,GAAG,GAAY,EAAI,MAAM,EAAE,CAAC;AAC7D;AAKA,SAAgB,EACd,GACA,GACA,GACwB;CACxB,IAAM,IAAS,EAAK,UAAU,CAAC,CAAC,kBAC1B,IAAO,EAAG,UAAU,CAAC,CAAC;CAE5B,IAAI,IAAS,GACX,OAAO;CAGT,IAAM,IAAS,IAAO,GAChB,IAAc,OAAO,IAAS,WAAc,GAC5C,IAAgB,KAAK,MAAM,EAAI,OAAO,KAAK,IAAI,CAAW;CAEhE,OAAO,EAAK,IAAI,EAAE,SAAS,EAAc,CAAC;AAC5C;AAKA,SAAgB,EACd,GACA,GACoB;CACpB,IAAM,IAAM,EAAW,GAAS,GAAG,GAC7B,IAAS,GAAS,UAAU,IAC5B,IAAS,GAAS,UAAU,IAC5B,IAAM,EAAI,GAAQ,GAAQ,EAAI,MAAM,GACpC,IAAQ,EAAI,GAAG,IAAI,EAAI,MAAM,GAC7B,IAAM,EAAI,GAAG,IAAI,EAAI,MAAM;CAEjC,OAAO,EAAI,YAAY,CAAC,CAAC,SAAS,EAAE,OAAO,EAAI,CAAC,CAAC,CAAC,KAAK;EAAE;EAAK;CAAM,CAAC;AACvE;AAKA,SAAgB,EAAQ,GAAyB,GAAyB;CAMxE,SAJY,KAAU,EAAI,OAAO,UAEvB,OAAO;EAAC;EAAU;EAAY;EAAY;EAAc;EAAW;EAAW;CAAS,IAAI;EAHvF;EAAU;EAAW;EAAa;EAAY;EAAU;EAAY;CAGmB,EAAA,CAEpF,EAAI,GAAG,GAAG,EAAI,MAAM;AACvC;AAKA,SAAgB,EAAM,GAAyB,GAAyB;CAkCtE,SAnBY,KAAU,EAAI,OAAO,UAEvB,OACJ;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,IACA;EA9BJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CAmBI,EAAA,CAEW,EAAI,GAAG,IAAI,EAAI,MAAM;AACxC"}
|
package/dist/factory.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./commerce/commerce.cjs"),t=require("./date/date.cjs"),n=require("./finance/finance.cjs"),r=require("./internet/internet.cjs"),i=require("./location/location.cjs"),a=require("./lorem/lorem.cjs"),o=require("./person/person.cjs"),s=require("./seed/create-seed.cjs"),c=require("./system/system.cjs");function l(l){let{locale:u,seed:d}=l,f=
|
|
1
|
+
const e=require("./commerce/commerce.cjs"),t=require("./date/date.cjs"),n=require("./finance/finance.cjs"),r=require("./internet/internet.cjs"),i=require("./location/location.cjs"),a=require("./lorem/lorem.cjs"),o=require("./person/person.cjs"),s=require("./seed/create-seed.cjs"),c=require("./system/system.cjs");function l(l){let{locale:u,seed:d}=l,f={locale:u,source:s.createSeed(d)},p=e=>{let t={};for(let[n,r]of Object.entries(e))typeof r==`function`&&(t[n]=(...e)=>r(f,...e));return t};return{commerce:p(e.commerce_exports),date:p(t.date_exports),finance:p(n.finance_exports),internet:p(r.internet_exports),locale:u,location:p(i.location_exports),lorem:p(a.lorem_exports),person:p(o.person_exports),seed:d,system:p(c.system_exports)}}exports.createIllusion=l;
|
|
2
2
|
//# sourceMappingURL=factory.cjs.map
|
package/dist/factory.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.cjs","names":[],"sources":["../src/factory.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"factory.cjs","names":[],"sources":["../src/factory.ts"],"sourcesContent":["import * as commerceApi from './commerce/commerce';\nimport * as dateApi from './date/date';\nimport * as financeApi from './finance/finance';\nimport * as internetApi from './internet/internet';\nimport * as locationApi from './location/location';\nimport * as loremApi from './lorem/lorem';\nimport * as personApi from './person/person';\nimport { createSeed } from './seed/create-seed';\nimport * as systemApi from './system/system';\nimport type { IllusionistContext, IllusionistLocale, IllusionistOptions, RandomSource } from './types';\n\nexport type { IllusionistOptions } from './types';\n\n/** Strips the leading `IllusionistContext` parameter from a function type. */\ntype Bound<F> = F extends (ctx: IllusionistContext, ...args: infer A) => infer R ? (...args: A) => R : F;\n\n/** Maps a module of `(ctx, ...args) => R` functions to `(...args) => R`. */\ntype BoundApi<T> = { readonly [K in keyof T]: Bound<T[K]> };\n\nexport type Illusionist = {\n readonly person: BoundApi<typeof personApi>;\n readonly internet: BoundApi<typeof internetApi>;\n readonly commerce: BoundApi<typeof commerceApi>;\n readonly date: BoundApi<typeof dateApi>;\n readonly finance: BoundApi<typeof financeApi>;\n readonly location: BoundApi<typeof locationApi>;\n readonly lorem: BoundApi<typeof loremApi>;\n readonly system: BoundApi<typeof systemApi>;\n\n /** The seed used to initialize this instance, or `undefined` for cryptographic randomness. */\n readonly seed: number | string | undefined;\n /** The active locale data. */\n readonly locale: IllusionistLocale;\n};\n\n/**\n * Creates a bound illusionist instance with all categories sharing a single seeded\n * random source and locale.\n *\n * @example\n * ```ts\n * import { en } from '@vielzeug/illusionist/locales';\n *\n * const illusion = createIllusion({ seed: 12345, locale: en });\n *\n * illusion.person.fullName(); // deterministic — same seed → same result\n * illusion.internet.email();\n * illusion.commerce.price();\n * ```\n */\nexport function createIllusion(options: IllusionistOptions): Illusionist {\n const { locale, seed } = options;\n const source: RandomSource = createSeed(seed);\n\n const ctx: IllusionistContext = { locale, source };\n\n const bind = <T extends Record<string, (ctx: IllusionistContext, ...args: never[]) => unknown>>(\n api: T,\n ): BoundApi<T> => {\n const bound = {} as Record<string, (...args: never[]) => unknown>;\n\n for (const [key, fn] of Object.entries(api)) {\n if (typeof fn === 'function') {\n bound[key] = (...args: never[]) => (fn as (ctx: IllusionistContext, ...args: never[]) => unknown)(ctx, ...args);\n }\n }\n\n return bound as unknown as BoundApi<T>;\n };\n\n return {\n commerce: bind(commerceApi),\n date: bind(dateApi),\n finance: bind(financeApi),\n internet: bind(internetApi),\n locale,\n location: bind(locationApi),\n lorem: bind(loremApi),\n person: bind(personApi),\n seed,\n system: bind(systemApi),\n };\n}\n"],"mappings":"0TAkDA,SAAgB,EAAe,EAA0C,CACvE,GAAM,CAAE,SAAQ,QAAS,EAGnB,EAA0B,CAAE,SAAQ,OAFb,EAAA,WAAW,CAEE,CAAO,EAE3C,EACJ,GACgB,CAChB,IAAM,EAAQ,CAAC,EAEf,IAAK,GAAM,CAAC,EAAK,KAAO,OAAO,QAAQ,CAAG,EACpC,OAAO,GAAO,aAChB,EAAM,IAAQ,GAAG,IAAmB,EAA8D,EAAK,GAAG,CAAI,GAIlH,OAAO,CACT,EAEA,MAAO,CACL,SAAU,EAAK,EAAA,gBAAW,EAC1B,KAAM,EAAK,EAAA,YAAO,EAClB,QAAS,EAAK,EAAA,eAAU,EACxB,SAAU,EAAK,EAAA,gBAAW,EAC1B,SACA,SAAU,EAAK,EAAA,gBAAW,EAC1B,MAAO,EAAK,EAAA,aAAQ,EACpB,OAAQ,EAAK,EAAA,cAAS,EACtB,OACA,OAAQ,EAAK,EAAA,cAAS,CACxB,CACF"}
|
package/dist/factory.d.ts
CHANGED
|
@@ -27,10 +27,6 @@ export type Illusionist = {
|
|
|
27
27
|
readonly seed: number | string | undefined;
|
|
28
28
|
/** The active locale data. */
|
|
29
29
|
readonly locale: IllusionistLocale;
|
|
30
|
-
dispose(): void;
|
|
31
|
-
readonly disposed: boolean;
|
|
32
|
-
readonly disposalSignal: AbortSignal;
|
|
33
|
-
[Symbol.dispose](): void;
|
|
34
30
|
};
|
|
35
31
|
/**
|
|
36
32
|
* Creates a bound illusionist instance with all categories sharing a single seeded
|
|
@@ -45,7 +41,6 @@ export type Illusionist = {
|
|
|
45
41
|
* illusion.person.fullName(); // deterministic — same seed → same result
|
|
46
42
|
* illusion.internet.email();
|
|
47
43
|
* illusion.commerce.price();
|
|
48
|
-
* illusion.dispose(); // [Symbol.dispose]() also works
|
|
49
44
|
* ```
|
|
50
45
|
*/
|
|
51
46
|
export declare function createIllusion(options: IllusionistOptions): Illusionist;
|
package/dist/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,OAAO,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAE7C,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AAEvG,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,8EAA8E;AAC9E,KAAK,KAAK,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;AAEzG,4EAA4E;AAC5E,KAAK,QAAQ,CAAC,CAAC,IAAI;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAE5D,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;IAChD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;IAChD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;IAChD,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;IAC1C,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;IAE5C,8FAA8F;IAC9F,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC3C,8BAA8B;IAC9B,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CAgCvE"}
|