@vielzeug/illusionist 3.0.0 → 26.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/_helpers/boolean.cjs +1 -1
  2. package/dist/_helpers/boolean.cjs.map +1 -1
  3. package/dist/_helpers/boolean.js +1 -8
  4. package/dist/_helpers/boolean.js.map +1 -1
  5. package/dist/_helpers/float.cjs +1 -1
  6. package/dist/_helpers/float.cjs.map +1 -1
  7. package/dist/_helpers/float.js +1 -12
  8. package/dist/_helpers/float.js.map +1 -1
  9. package/dist/_helpers/int.cjs +1 -1
  10. package/dist/_helpers/int.cjs.map +1 -1
  11. package/dist/_helpers/int.js +1 -8
  12. package/dist/_helpers/int.js.map +1 -1
  13. package/dist/_helpers/next-float.js +1 -2
  14. package/dist/_helpers/string.cjs +1 -1
  15. package/dist/_helpers/string.cjs.map +1 -1
  16. package/dist/_helpers/string.js +1 -28
  17. package/dist/_helpers/string.js.map +1 -1
  18. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  19. package/dist/_virtual/_rolldown/runtime.js +1 -11
  20. package/dist/commerce/commerce.cjs +1 -1
  21. package/dist/commerce/commerce.cjs.map +1 -1
  22. package/dist/commerce/commerce.js +1 -50
  23. package/dist/commerce/commerce.js.map +1 -1
  24. package/dist/commerce/data.js +1 -82
  25. package/dist/commerce/data.js.map +1 -1
  26. package/dist/date/date.cjs +1 -1
  27. package/dist/date/date.cjs.map +1 -1
  28. package/dist/date/date.js +1 -92
  29. package/dist/date/date.js.map +1 -1
  30. package/dist/errors.cjs +1 -1
  31. package/dist/errors.cjs.map +1 -1
  32. package/dist/errors.js +1 -9
  33. package/dist/errors.js.map +1 -1
  34. package/dist/factory.cjs +1 -1
  35. package/dist/factory.cjs.map +1 -1
  36. package/dist/factory.js +1 -35
  37. package/dist/factory.js.map +1 -1
  38. package/dist/finance/data.js +1 -59
  39. package/dist/finance/data.js.map +1 -1
  40. package/dist/finance/finance.cjs +1 -1
  41. package/dist/finance/finance.cjs.map +1 -1
  42. package/dist/finance/finance.js +1 -89
  43. package/dist/finance/finance.js.map +1 -1
  44. package/dist/illusionist.cjs +3 -3
  45. package/dist/illusionist.cjs.map +1 -1
  46. package/dist/illusionist.iife.js +3 -3
  47. package/dist/illusionist.iife.js.map +1 -1
  48. package/dist/illusionist.js +3 -3
  49. package/dist/illusionist.js.map +1 -1
  50. package/dist/index.cjs +1 -1
  51. package/dist/index.js +1 -12
  52. package/dist/internet/data.js +1 -83
  53. package/dist/internet/data.js.map +1 -1
  54. package/dist/internet/internet.cjs +1 -1
  55. package/dist/internet/internet.cjs.map +1 -1
  56. package/dist/internet/internet.js +1 -121
  57. package/dist/internet/internet.js.map +1 -1
  58. package/dist/locales/de.js +1 -11
  59. package/dist/locales/de.js.map +1 -1
  60. package/dist/locales/en.js +1 -11
  61. package/dist/locales/en.js.map +1 -1
  62. package/dist/locales/index.js +1 -3
  63. package/dist/location/data/de.js +1 -81
  64. package/dist/location/data/de.js.map +1 -1
  65. package/dist/location/data/en.js +1 -64
  66. package/dist/location/data/en.js.map +1 -1
  67. package/dist/location/location.cjs +1 -1
  68. package/dist/location/location.cjs.map +1 -1
  69. package/dist/location/location.js +1 -56
  70. package/dist/location/location.js.map +1 -1
  71. package/dist/lorem/data.js +1 -5
  72. package/dist/lorem/data.js.map +1 -1
  73. package/dist/lorem/lorem.cjs +3 -3
  74. package/dist/lorem/lorem.cjs.map +1 -1
  75. package/dist/lorem/lorem.js +3 -53
  76. package/dist/lorem/lorem.js.map +1 -1
  77. package/dist/person/data/de.js +1 -61
  78. package/dist/person/data/de.js.map +1 -1
  79. package/dist/person/data/en.js +1 -69
  80. package/dist/person/data/en.js.map +1 -1
  81. package/dist/person/person.cjs +1 -1
  82. package/dist/person/person.cjs.map +1 -1
  83. package/dist/person/person.js +1 -43
  84. package/dist/person/person.js.map +1 -1
  85. package/dist/seed/create-seed.cjs +1 -1
  86. package/dist/seed/create-seed.cjs.map +1 -1
  87. package/dist/seed/create-seed.js +1 -21
  88. package/dist/seed/create-seed.js.map +1 -1
  89. package/dist/seed/mulberry32.cjs +1 -1
  90. package/dist/seed/mulberry32.cjs.map +1 -1
  91. package/dist/seed/mulberry32.js +1 -12
  92. package/dist/seed/mulberry32.js.map +1 -1
  93. package/dist/system/data.js +1 -75
  94. package/dist/system/data.js.map +1 -1
  95. package/dist/system/system.cjs +1 -1
  96. package/dist/system/system.cjs.map +1 -1
  97. package/dist/system/system.js +1 -68
  98. package/dist/system/system.js.map +1 -1
  99. package/package.json +7 -79
  100. package/dist/commerce/index.cjs +0 -1
  101. package/dist/commerce/index.d.ts +0 -2
  102. package/dist/commerce/index.d.ts.map +0 -1
  103. package/dist/commerce/index.js +0 -2
  104. package/dist/date/index.cjs +0 -1
  105. package/dist/date/index.d.ts +0 -2
  106. package/dist/date/index.d.ts.map +0 -1
  107. package/dist/date/index.js +0 -2
  108. package/dist/finance/index.cjs +0 -1
  109. package/dist/finance/index.d.ts +0 -2
  110. package/dist/finance/index.d.ts.map +0 -1
  111. package/dist/finance/index.js +0 -2
  112. package/dist/internet/index.cjs +0 -1
  113. package/dist/internet/index.d.ts +0 -2
  114. package/dist/internet/index.d.ts.map +0 -1
  115. package/dist/internet/index.js +0 -2
  116. package/dist/location/index.cjs +0 -1
  117. package/dist/location/index.d.ts +0 -2
  118. package/dist/location/index.d.ts.map +0 -1
  119. package/dist/location/index.js +0 -2
  120. package/dist/lorem/index.cjs +0 -1
  121. package/dist/lorem/index.d.ts +0 -2
  122. package/dist/lorem/index.d.ts.map +0 -1
  123. package/dist/lorem/index.js +0 -2
  124. package/dist/person/index.cjs +0 -1
  125. package/dist/person/index.d.ts +0 -2
  126. package/dist/person/index.d.ts.map +0 -1
  127. package/dist/person/index.js +0 -2
  128. package/dist/seed/index.cjs +0 -1
  129. package/dist/seed/index.d.ts +0 -3
  130. package/dist/seed/index.d.ts.map +0 -1
  131. package/dist/seed/index.js +0 -3
  132. package/dist/system/index.cjs +0 -1
  133. package/dist/system/index.d.ts +0 -2
  134. package/dist/system/index.d.ts.map +0 -1
  135. package/dist/system/index.js +0 -2
package/dist/errors.js CHANGED
@@ -1,10 +1,2 @@
1
- //#region src/errors.ts
2
- var e = class extends Error {
3
- constructor(e, t) {
4
- super(e, t), this.name = new.target.name, Object.setPrototypeOf(this, new.target.prototype);
5
- }
6
- }, t = class extends e {};
7
- //#endregion
8
- export { e as IllusionistError, t as IllusionistSeedError };
9
-
1
+ var IllusionistError=class extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}},IllusionistSeedError=class extends IllusionistError{};export{IllusionistError,IllusionistSeedError};
10
2
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","names":[],"sources":["../src/errors.ts"],"sourcesContent":["/** Base class for all illusionist errors. Use `instanceof IllusionistError` to catch any illusionist-originated error. */\nexport class IllusionistError extends Error {\n constructor(message: string, opts?: ErrorOptions) {\n super(message, opts);\n this.name = new.target.name;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/** Thrown when the seeded random source produces an invalid value. */\nexport class IllusionistSeedError extends IllusionistError {}\n"],"mappings":";AACA,IAAa,IAAb,cAAsC,MAAM;CAC1C,YAAY,GAAiB,GAAqB;EAGhD,AAFA,MAAM,GAAS,CAAI,GACnB,KAAK,OAAO,WAAW,MACvB,OAAO,eAAe,MAAM,WAAW,SAAS;CAClD;AACF,GAGa,IAAb,cAA0C,EAAiB,CAAC"}
1
+ {"version":3,"file":"errors.js","names":[],"sources":["../src/errors.ts"],"sourcesContent":["/** Base class for all illusionist errors. Use `instanceof IllusionistError` to catch any illusionist-originated error. */\nexport class IllusionistError extends Error {\n constructor(message: string, opts?: ErrorOptions) {\n super(message, opts);\n this.name = new.target.name;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n/** Thrown when the seeded random source produces an invalid value. */\nexport class IllusionistSeedError extends IllusionistError {}\n"],"mappings":"AACA,IAAa,iBAAb,cAAsC,KAAM,CAC1C,YAAY,EAAiB,EAAqB,CAChD,MAAM,EAAS,CAAI,EACnB,KAAK,KAAO,WAAW,KACvB,OAAO,eAAe,KAAM,WAAW,SAAS,CAClD,CACF,EAGa,qBAAb,cAA0C,gBAAiB,CAAC"}
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={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;
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 createIllusion(l){let{locale:u,seed:d}=l,f={locale:u,source:s.createSeed(d)},bind=e=>{let t={};for(let[n,r]of Object.entries(e))typeof r==`function`&&(t[n]=(...e)=>r(f,...e));return t};return{commerce:bind(e.commerce_exports),date:bind(t.date_exports),finance:bind(n.finance_exports),internet:bind(r.internet_exports),locale:u,location:bind(i.location_exports),lorem:bind(a.lorem_exports),person:bind(o.person_exports),seed:d,system:bind(c.system_exports)}}exports.createIllusion=createIllusion;
2
2
  //# sourceMappingURL=factory.cjs.map
@@ -1 +1 @@
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"}
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,KACJ,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,KAAK,EAAA,gBAAW,EAC1B,KAAM,KAAK,EAAA,YAAO,EAClB,QAAS,KAAK,EAAA,eAAU,EACxB,SAAU,KAAK,EAAA,gBAAW,EAC1B,SACA,SAAU,KAAK,EAAA,gBAAW,EAC1B,MAAO,KAAK,EAAA,aAAQ,EACpB,OAAQ,KAAK,EAAA,cAAS,EACtB,OACA,OAAQ,KAAK,EAAA,cAAS,CACxB,CACF"}
package/dist/factory.js CHANGED
@@ -1,36 +1,2 @@
1
- import { commerce_exports as e } from "./commerce/commerce.js";
2
- import { date_exports as t } from "./date/date.js";
3
- import { finance_exports as n } from "./finance/finance.js";
4
- import { internet_exports as r } from "./internet/internet.js";
5
- import { location_exports as i } from "./location/location.js";
6
- import { lorem_exports as a } from "./lorem/lorem.js";
7
- import { person_exports as o } from "./person/person.js";
8
- import { createSeed as s } from "./seed/create-seed.js";
9
- import { system_exports as c } from "./system/system.js";
10
- //#region src/factory.ts
11
- function l(l) {
12
- let { locale: u, seed: d } = l, f = {
13
- locale: u,
14
- source: s(d)
15
- }, p = (e) => {
16
- let t = {};
17
- for (let [n, r] of Object.entries(e)) typeof r == "function" && (t[n] = (...e) => r(f, ...e));
18
- return t;
19
- };
20
- return {
21
- commerce: p(e),
22
- date: p(t),
23
- finance: p(n),
24
- internet: p(r),
25
- locale: u,
26
- location: p(i),
27
- lorem: p(a),
28
- person: p(o),
29
- seed: d,
30
- system: p(c)
31
- };
32
- }
33
- //#endregion
34
- export { l as createIllusion };
35
-
1
+ import{commerce_exports as e}from"./commerce/commerce.js";import{date_exports as t}from"./date/date.js";import{finance_exports as n}from"./finance/finance.js";import{internet_exports as r}from"./internet/internet.js";import{location_exports as i}from"./location/location.js";import{lorem_exports as a}from"./lorem/lorem.js";import{person_exports as o}from"./person/person.js";import{createSeed as s}from"./seed/create-seed.js";import{system_exports as c}from"./system/system.js";function createIllusion(l){let{locale:u,seed:d}=l,f={locale:u,source:s(d)},bind=e=>{let t={};for(let[n,r]of Object.entries(e))typeof r==`function`&&(t[n]=(...e)=>r(f,...e));return t};return{commerce:bind(e),date:bind(t),finance:bind(n),internet:bind(r),locale:u,location:bind(i),lorem:bind(a),person:bind(o),seed:d,system:bind(c)}}export{createIllusion};
36
2
  //# sourceMappingURL=factory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","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":";;;;;;;;;;AAkDA,SAAgB,EAAe,GAA0C;CACvE,IAAM,EAAE,WAAQ,YAAS,GAGnB,IAA0B;EAAE;EAAQ,QAFb,EAAW,CAEE;CAAO,GAE3C,KACJ,MACgB;EAChB,IAAM,IAAQ,CAAC;EAEf,KAAK,IAAM,CAAC,GAAK,MAAO,OAAO,QAAQ,CAAG,GACxC,AAAI,OAAO,KAAO,eAChB,EAAM,MAAQ,GAAG,MAAmB,EAA8D,GAAK,GAAG,CAAI;EAIlH,OAAO;CACT;CAEA,OAAO;EACL,UAAU,EAAK,CAAW;EAC1B,MAAM,EAAK,CAAO;EAClB,SAAS,EAAK,CAAU;EACxB,UAAU,EAAK,CAAW;EAC1B;EACA,UAAU,EAAK,CAAW;EAC1B,OAAO,EAAK,CAAQ;EACpB,QAAQ,EAAK,CAAS;EACtB;EACA,QAAQ,EAAK,CAAS;CACxB;AACF"}
1
+ {"version":3,"file":"factory.js","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":"+dAkDA,SAAgB,eAAe,EAA0C,CACvE,GAAM,CAAE,SAAQ,QAAS,EAGnB,EAA0B,CAAE,SAAQ,OAFb,EAAW,CAEE,CAAO,EAE3C,KACJ,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,KAAK,CAAW,EAC1B,KAAM,KAAK,CAAO,EAClB,QAAS,KAAK,CAAU,EACxB,SAAU,KAAK,CAAW,EAC1B,SACA,SAAU,KAAK,CAAW,EAC1B,MAAO,KAAK,CAAQ,EACpB,OAAQ,KAAK,CAAS,EACtB,OACA,OAAQ,KAAK,CAAS,CACxB,CACF"}
@@ -1,60 +1,2 @@
1
- //#region src/finance/data.ts
2
- var e = {
3
- banks: [
4
- "Deutsche Bank",
5
- "Commerzbank",
6
- "Sparkasse",
7
- "Barclays",
8
- "HSBC",
9
- "BNP Paribas",
10
- "Santander",
11
- "ING",
12
- "UniCredit",
13
- "UBS"
14
- ],
15
- creditCardIins: {
16
- amex: ["34", "37"],
17
- mastercard: [
18
- "51",
19
- "52",
20
- "53",
21
- "54",
22
- "55"
23
- ],
24
- visa: ["4"]
25
- },
26
- ibanCountryCodes: {
27
- AT: "AT",
28
- BE: "BE",
29
- CH: "CH",
30
- DE: "DE",
31
- ES: "ES",
32
- FR: "FR",
33
- GB: "GB",
34
- IT: "IT",
35
- NL: "NL"
36
- },
37
- ibanLengths: {
38
- AT: 20,
39
- BE: 16,
40
- CH: 21,
41
- DE: 22,
42
- ES: 24,
43
- FR: 27,
44
- GB: 22,
45
- IT: 27,
46
- NL: 18
47
- },
48
- transactionTypes: [
49
- "payment",
50
- "transfer",
51
- "deposit",
52
- "withdrawal",
53
- "refund",
54
- "fee"
55
- ]
56
- };
57
- //#endregion
58
- export { e as FINANCE_DATA };
59
-
1
+ var e={banks:[`Deutsche Bank`,`Commerzbank`,`Sparkasse`,`Barclays`,`HSBC`,`BNP Paribas`,`Santander`,`ING`,`UniCredit`,`UBS`],creditCardIins:{amex:[`34`,`37`],mastercard:[`51`,`52`,`53`,`54`,`55`],visa:[`4`]},ibanCountryCodes:{AT:`AT`,BE:`BE`,CH:`CH`,DE:`DE`,ES:`ES`,FR:`FR`,GB:`GB`,IT:`IT`,NL:`NL`},ibanLengths:{AT:20,BE:16,CH:21,DE:22,ES:24,FR:27,GB:22,IT:27,NL:18},transactionTypes:[`payment`,`transfer`,`deposit`,`withdrawal`,`refund`,`fee`]};export{e as FINANCE_DATA};
60
2
  //# sourceMappingURL=data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","names":[],"sources":["../../src/finance/data.ts"],"sourcesContent":["export const FINANCE_DATA = {\n banks: [\n 'Deutsche Bank',\n 'Commerzbank',\n 'Sparkasse',\n 'Barclays',\n 'HSBC',\n 'BNP Paribas',\n 'Santander',\n 'ING',\n 'UniCredit',\n 'UBS',\n ],\n creditCardIins: { amex: ['34', '37'], mastercard: ['51', '52', '53', '54', '55'], visa: ['4'] },\n ibanCountryCodes: { AT: 'AT', BE: 'BE', CH: 'CH', DE: 'DE', ES: 'ES', FR: 'FR', GB: 'GB', IT: 'IT', NL: 'NL' },\n ibanLengths: { AT: 20, BE: 16, CH: 21, DE: 22, ES: 24, FR: 27, GB: 22, IT: 27, NL: 18 },\n transactionTypes: ['payment', 'transfer', 'deposit', 'withdrawal', 'refund', 'fee'],\n} as const;\n"],"mappings":";AAAA,IAAa,IAAe;CAC1B,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,gBAAgB;EAAE,MAAM,CAAC,MAAM,IAAI;EAAG,YAAY;GAAC;GAAM;GAAM;GAAM;GAAM;EAAI;EAAG,MAAM,CAAC,GAAG;CAAE;CAC9F,kBAAkB;EAAE,IAAI;EAAM,IAAI;EAAM,IAAI;EAAM,IAAI;EAAM,IAAI;EAAM,IAAI;EAAM,IAAI;EAAM,IAAI;EAAM,IAAI;CAAK;CAC7G,aAAa;EAAE,IAAI;EAAI,IAAI;EAAI,IAAI;EAAI,IAAI;EAAI,IAAI;EAAI,IAAI;EAAI,IAAI;EAAI,IAAI;EAAI,IAAI;CAAG;CACtF,kBAAkB;EAAC;EAAW;EAAY;EAAW;EAAc;EAAU;CAAK;AACpF"}
1
+ {"version":3,"file":"data.js","names":[],"sources":["../../src/finance/data.ts"],"sourcesContent":["export const FINANCE_DATA = {\n banks: [\n 'Deutsche Bank',\n 'Commerzbank',\n 'Sparkasse',\n 'Barclays',\n 'HSBC',\n 'BNP Paribas',\n 'Santander',\n 'ING',\n 'UniCredit',\n 'UBS',\n ],\n creditCardIins: { amex: ['34', '37'], mastercard: ['51', '52', '53', '54', '55'], visa: ['4'] },\n ibanCountryCodes: { AT: 'AT', BE: 'BE', CH: 'CH', DE: 'DE', ES: 'ES', FR: 'FR', GB: 'GB', IT: 'IT', NL: 'NL' },\n ibanLengths: { AT: 20, BE: 16, CH: 21, DE: 22, ES: 24, FR: 27, GB: 22, IT: 27, NL: 18 },\n transactionTypes: ['payment', 'transfer', 'deposit', 'withdrawal', 'refund', 'fee'],\n} as const;\n"],"mappings":"AAAA,IAAa,EAAe,CAC1B,MAAO,CACL,gBACA,cACA,YACA,WACA,OACA,cACA,YACA,MACA,YACA,KACF,EACA,eAAgB,CAAE,KAAM,CAAC,KAAM,IAAI,EAAG,WAAY,CAAC,KAAM,KAAM,KAAM,KAAM,IAAI,EAAG,KAAM,CAAC,GAAG,CAAE,EAC9F,iBAAkB,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,IAAK,EAC7G,YAAa,CAAE,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,EAAG,EACtF,iBAAkB,CAAC,UAAW,WAAY,UAAW,aAAc,SAAU,KAAK,CACpF"}
@@ -1,2 +1,2 @@
1
- const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/float.cjs"),n=require("../_helpers/int.cjs"),r=require("../_helpers/string.cjs"),i=require("./data.cjs");let a=require("@vielzeug/coins");var o=e.__exportAll({amount:()=>h,bank:()=>C,bic:()=>_,bitcoinAddress:()=>b,creditCardCVV:()=>y,creditCardNumber:()=>v,ethereumAddress:()=>x,iban:()=>g,transactionType:()=>S}),s={EUR:a.EUR,GBP:a.GBP,USD:a.USD},c=[`visa`,`mastercard`,`amex`],l=Object.keys(i.FINANCE_DATA.ibanCountryCodes),u=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function d(e,t){let n=[];for(let i=0;i<e;i++)n.push(r.pick(u,t.source));return n.join(``)}function f(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function p(e,t){return(98-f(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function m(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function h(e,n={}){let r=n.min??100,i=n.max??1e4,o=n.currency??`USD`,c=t.floatFixed(r,i,2,e.source);return(0,a.money)(c.toFixed(2),s[o])}function g(e,t){let n=t??r.pick(l,e.source);if(!(n in i.FINANCE_DATA.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${l.join(`, `)}`);let a=i.FINANCE_DATA.ibanLengths[n]-4,o=r.numericString(a,e.source);return`${n}${p(n,o)}${o}`}function _(e){return`${d(4,e)}${d(2,e)}${r.alphanumeric(2,e.source).toUpperCase()}${n.int(0,1,e.source)===1?r.alphanumeric(3,e.source).toUpperCase():``}`}function v(e,t){let n=t??r.pick(c,e.source),a=r.pick(i.FINANCE_DATA.creditCardIins[n],e.source),o=a+r.numericString((n===`amex`?15:16)-a.length-1,e.source);return`${o}${m(o)}`}function y(e,t){let n=(t??r.pick(c,e.source))===`amex`?4:3;return r.numericString(n,e.source)}function b(e){let t=r.pick([`1`,`3`,`bc1`],e.source),i=n.int(25,34,e.source);return`${t}${r.base58String(i,e.source)}`}function x(e){return`0x${r.hexString(40,e.source)}`}function S(e){return r.pick(i.FINANCE_DATA.transactionTypes,e.source)}function C(e){return r.pick(i.FINANCE_DATA.banks,e.source)}exports.amount=h,exports.bank=C,exports.bic=_,exports.bitcoinAddress=b,exports.creditCardCVV=y,exports.creditCardNumber=v,exports.ethereumAddress=x,Object.defineProperty(exports,"finance_exports",{enumerable:!0,get:function(){return o}}),exports.iban=g,exports.transactionType=S;
1
+ const e=require("../_virtual/_rolldown/runtime.cjs"),t=require("../_helpers/float.cjs"),n=require("../_helpers/int.cjs"),r=require("../_helpers/string.cjs"),i=require("./data.cjs");let a=require("@vielzeug/coins");var o=e.__exportAll({amount:()=>amount,bank:()=>bank,bic:()=>bic,bitcoinAddress:()=>bitcoinAddress,creditCardCVV:()=>creditCardCVV,creditCardNumber:()=>creditCardNumber,ethereumAddress:()=>ethereumAddress,iban:()=>iban,transactionType:()=>transactionType}),s={EUR:a.EUR,GBP:a.GBP,USD:a.USD},c=[`visa`,`mastercard`,`amex`],l=Object.keys(i.FINANCE_DATA.ibanCountryCodes),u=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function letters(e,t){let n=[];for(let i=0;i<e;i++)n.push(r.pick(u,t.source));return n.join(``)}function mod97(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function ibanCheckDigits(e,t){return(98-mod97(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function luhnCheckDigit(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function amount(e,n={}){let r=n.min??100,i=n.max??1e4,o=n.currency??`USD`,c=t.floatFixed(r,i,2,e.source);return(0,a.money)(c.toFixed(2),s[o])}function iban(e,t){let n=t??r.pick(l,e.source);if(!(n in i.FINANCE_DATA.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${l.join(`, `)}`);let a=i.FINANCE_DATA.ibanLengths[n]-4,o=r.numericString(a,e.source);return`${n}${ibanCheckDigits(n,o)}${o}`}function bic(e){return`${letters(4,e)}${letters(2,e)}${r.alphanumeric(2,e.source).toUpperCase()}${n.int(0,1,e.source)===1?r.alphanumeric(3,e.source).toUpperCase():``}`}function creditCardNumber(e,t){let n=t??r.pick(c,e.source),a=r.pick(i.FINANCE_DATA.creditCardIins[n],e.source),o=a+r.numericString((n===`amex`?15:16)-a.length-1,e.source);return`${o}${luhnCheckDigit(o)}`}function creditCardCVV(e,t){let n=(t??r.pick(c,e.source))===`amex`?4:3;return r.numericString(n,e.source)}function bitcoinAddress(e){let t=r.pick([`1`,`3`,`bc1`],e.source),i=n.int(25,34,e.source);return`${t}${r.base58String(i,e.source)}`}function ethereumAddress(e){return`0x${r.hexString(40,e.source)}`}function transactionType(e){return r.pick(i.FINANCE_DATA.transactionTypes,e.source)}function bank(e){return r.pick(i.FINANCE_DATA.banks,e.source)}exports.amount=amount,exports.bank=bank,exports.bic=bic,exports.bitcoinAddress=bitcoinAddress,exports.creditCardCVV=creditCardCVV,exports.creditCardNumber=creditCardNumber,exports.ethereumAddress=ethereumAddress,Object.defineProperty(exports,"finance_exports",{enumerable:!0,get:function(){return o}}),exports.iban=iban,exports.transactionType=transactionType;
2
2
  //# sourceMappingURL=finance.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"finance.cjs","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n const out: string[] = [];\n\n for (let i = 0; i < count; i++) {\n out.push(pick(LETTERS, ctx.source)!);\n }\n\n return out.join('');\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"finance.cjs","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n const out: string[] = [];\n\n for (let i = 0; i < count; i++) {\n out.push(pick(LETTERS, ctx.source)!);\n }\n\n return out.join('');\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":"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"}
@@ -1,90 +1,2 @@
1
- import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
- import { floatFixed as t } from "../_helpers/float.js";
3
- import { int as n } from "../_helpers/int.js";
4
- import { alphanumeric as r, base58String as i, hexString as a, numericString as o, pick as s } from "../_helpers/string.js";
5
- import { FINANCE_DATA as c } from "./data.js";
6
- import { EUR as l, GBP as u, USD as d, money as f } from "@vielzeug/coins";
7
- //#region src/finance/finance.ts
8
- var p = /* @__PURE__ */ e({
9
- amount: () => S,
10
- bank: () => A,
11
- bic: () => w,
12
- bitcoinAddress: () => D,
13
- creditCardCVV: () => E,
14
- creditCardNumber: () => T,
15
- ethereumAddress: () => O,
16
- iban: () => C,
17
- transactionType: () => k
18
- }), m = {
19
- EUR: l,
20
- GBP: u,
21
- USD: d
22
- }, h = [
23
- "visa",
24
- "mastercard",
25
- "amex"
26
- ], g = Object.keys(c.ibanCountryCodes), _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");
27
- function v(e, t) {
28
- let n = [];
29
- for (let r = 0; r < e; r++) n.push(s(_, t.source));
30
- return n.join("");
31
- }
32
- function y(e) {
33
- let t = 0;
34
- for (let n of e) t = (t * 10 + Number(n)) % 97;
35
- return t;
36
- }
37
- function b(e, t) {
38
- return (98 - y(`${t}${e}00`.replace(/[A-Z]/g, (e) => String(e.charCodeAt(0) - 55)))).toString().padStart(2, "0");
39
- }
40
- function x(e) {
41
- let t = e.split("").map(Number), n = 0, r = !0;
42
- for (let e = t.length - 1; e >= 0; e--) {
43
- let i = t[e];
44
- r && (i *= 2, i > 9 && (i -= 9)), n += i, r = !r;
45
- }
46
- let i = (10 - n % 10) % 10;
47
- return String(i);
48
- }
49
- function S(e, n = {}) {
50
- let r = n.min ?? 100, i = n.max ?? 1e4, a = n.currency ?? "USD", o = t(r, i, 2, e.source);
51
- return f(o.toFixed(2), m[a]);
52
- }
53
- function C(e, t) {
54
- let n = t ?? s(g, e.source);
55
- if (!(n in c.ibanLengths)) throw RangeError(`iban: unsupported country code "${t}". Supported: ${g.join(", ")}`);
56
- let r = c.ibanLengths[n] - 4, i = o(r, e.source);
57
- return `${n}${b(n, i)}${i}`;
58
- }
59
- function w(e) {
60
- return `${v(4, e)}${v(2, e)}${r(2, e.source).toUpperCase()}${n(0, 1, e.source) === 1 ? r(3, e.source).toUpperCase() : ""}`;
61
- }
62
- function T(e, t) {
63
- let n = t ?? s(h, e.source), r = s(c.creditCardIins[n], e.source), i = r + o((n === "amex" ? 15 : 16) - r.length - 1, e.source);
64
- return `${i}${x(i)}`;
65
- }
66
- function E(e, t) {
67
- let n = (t ?? s(h, e.source)) === "amex" ? 4 : 3;
68
- return o(n, e.source);
69
- }
70
- function D(e) {
71
- let t = s([
72
- "1",
73
- "3",
74
- "bc1"
75
- ], e.source), r = n(25, 34, e.source);
76
- return `${t}${i(r, e.source)}`;
77
- }
78
- function O(e) {
79
- return `0x${a(40, e.source)}`;
80
- }
81
- function k(e) {
82
- return s(c.transactionTypes, e.source);
83
- }
84
- function A(e) {
85
- return s(c.banks, e.source);
86
- }
87
- //#endregion
88
- export { S as amount, A as bank, w as bic, D as bitcoinAddress, E as creditCardCVV, T as creditCardNumber, O as ethereumAddress, p as finance_exports, C as iban, k as transactionType };
89
-
1
+ import{__exportAll as e}from"../_virtual/_rolldown/runtime.js";import{floatFixed as t}from"../_helpers/float.js";import{int as n}from"../_helpers/int.js";import{alphanumeric as r,base58String as i,hexString as a,numericString as o,pick as s}from"../_helpers/string.js";import{FINANCE_DATA as c}from"./data.js";import{EUR as l,GBP as u,USD as d,money as f}from"@vielzeug/coins";var p=e({amount:()=>amount,bank:()=>bank,bic:()=>bic,bitcoinAddress:()=>bitcoinAddress,creditCardCVV:()=>creditCardCVV,creditCardNumber:()=>creditCardNumber,ethereumAddress:()=>ethereumAddress,iban:()=>iban,transactionType:()=>transactionType}),m={EUR:l,GBP:u,USD:d},h=[`visa`,`mastercard`,`amex`],g=Object.keys(c.ibanCountryCodes),_=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function letters(e,t){let n=[];for(let r=0;r<e;r++)n.push(s(_,t.source));return n.join(``)}function mod97(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function ibanCheckDigits(e,t){return(98-mod97(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function luhnCheckDigit(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function amount(e,n={}){let r=n.min??100,i=n.max??1e4,a=n.currency??`USD`,o=t(r,i,2,e.source);return f(o.toFixed(2),m[a])}function iban(e,t){let n=t??s(g,e.source);if(!(n in c.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${g.join(`, `)}`);let r=c.ibanLengths[n]-4,i=o(r,e.source);return`${n}${ibanCheckDigits(n,i)}${i}`}function bic(e){return`${letters(4,e)}${letters(2,e)}${r(2,e.source).toUpperCase()}${n(0,1,e.source)===1?r(3,e.source).toUpperCase():``}`}function creditCardNumber(e,t){let n=t??s(h,e.source),r=s(c.creditCardIins[n],e.source),i=r+o((n===`amex`?15:16)-r.length-1,e.source);return`${i}${luhnCheckDigit(i)}`}function creditCardCVV(e,t){let n=(t??s(h,e.source))===`amex`?4:3;return o(n,e.source)}function bitcoinAddress(e){let t=s([`1`,`3`,`bc1`],e.source),r=n(25,34,e.source);return`${t}${i(r,e.source)}`}function ethereumAddress(e){return`0x${a(40,e.source)}`}function transactionType(e){return s(c.transactionTypes,e.source)}function bank(e){return s(c.banks,e.source)}export{amount,bank,bic,bitcoinAddress,creditCardCVV,creditCardNumber,ethereumAddress,p as finance_exports,iban,transactionType};
90
2
  //# sourceMappingURL=finance.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"finance.js","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n const out: string[] = [];\n\n for (let i = 0; i < count; i++) {\n out.push(pick(LETTERS, ctx.source)!);\n }\n\n return out.join('');\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;IAQM,IAAsD;CAAE;CAAK;CAAK;AAAI,GAEtE,IAAoB;CAAC;CAAQ;CAAc;AAAM,GAGjD,IAAiB,OAAO,KAAK,EAAa,gBAAgB,GAE1D,IAAU,6BAA6B,MAAM,EAAE;AAErD,SAAS,EAAQ,GAAe,GAAiC;CAC/D,IAAM,IAAgB,CAAC;CAEvB,KAAK,IAAI,IAAI,GAAG,IAAI,GAAO,KACzB,EAAI,KAAK,EAAK,GAAS,EAAI,MAAM,CAAE;CAGrC,OAAO,EAAI,KAAK,EAAE;AACpB;AAGA,SAAS,EAAM,GAAyB;CACtC,IAAI,IAAY;CAEhB,KAAK,IAAM,KAAM,GACf,KAAa,IAAY,KAAK,OAAO,CAAE,KAAK;CAG9C,OAAO;AACT;AAGA,SAAS,EAAgB,GAAiB,GAAsB;CAK9D,QAFc,KAAK,EADH,GADM,IAAO,EAAQ,IACV,QAAQ,WAAW,MAAM,OAAO,EAAE,WAAW,CAAC,IAAI,EAAE,CACtD,CAAO,EAAA,CAEnB,SAAS,CAAC,CAAC,SAAS,GAAG,GAAG;AACzC;AAGA,SAAS,EAAe,GAAyB;CAC/C,IAAM,IAAS,EAAQ,MAAM,EAAE,CAAC,CAAC,IAAI,MAAM,GACvC,IAAM,GACN,IAAS;CAEb,KAAK,IAAI,IAAI,EAAO,SAAS,GAAG,KAAK,GAAG,KAAK;EAC3C,IAAI,IAAI,EAAO;EAQf,AANI,MACF,KAAK,GACD,IAAI,MAAG,KAAK,KAGlB,KAAO,GACP,IAAS,CAAC;CACZ;CAEA,IAAM,KAAS,KAAM,IAAM,MAAO;CAElC,OAAO,OAAO,CAAK;AACrB;AAQA,SAAgB,EAAO,GAAyB,IAAsB,CAAC,GAAU;CAC/E,IAAM,IAAM,EAAK,OAAO,KAClB,IAAM,EAAK,OAAO,KAClB,IAAO,EAAK,YAAY,OACxB,IAAQ,EAAW,GAAK,GAAK,GAAG,EAAI,MAAM;CAEhD,OAAO,EAAM,EAAM,QAAQ,CAAC,GAAG,EAAW,EAAK;AACjD;AAEA,SAAgB,EAAK,GAAyB,GAA8B;CAC1E,IAAM,IAAW,KAAe,EAAK,GAAgB,EAAI,MAAM;CAE/D,IAAI,EAAE,KAAW,EAAa,cAC5B,MAAU,WAAW,mCAAmC,EAAY,gBAAgB,EAAe,KAAK,IAAI,GAAG;CAIjH,IAAM,IADc,EAAa,YAAY,KACZ,GAC3B,IAAO,EAAc,GAAY,EAAI,MAAM;CAGjD,OAAO,GAAG,IAFU,EAAgB,GAAS,CAEzB,IAAc;AACpC;AAEA,SAAgB,EAAI,GAAiC;CAOnD,OAAO,GANU,EAAQ,GAAG,CAMlB,IALM,EAAQ,GAAG,CAKN,IAJJ,EAAa,GAAG,EAAI,MAAM,CAAC,CAAC,YAId,IAHb,EAAI,GAAG,GAAG,EAAI,MAAM,MAAM,IACjB,EAAa,GAAG,EAAI,MAAM,CAAC,CAAC,YAAY,IAAI;AAGzE;AAEA,SAAgB,EAAiB,GAAyB,GAA+B;CACvF,IAAM,IAAW,KAAQ,EAAK,GAAmB,EAAI,MAAM,GACrD,IAAM,EAAK,EAAa,eAAe,IAAW,EAAI,MAAM,GAE5D,IAAU,IAAM,GADF,MAAa,SAAS,KAAK,MACG,EAAI,SAAS,GAAG,EAAI,MAAM;CAG5E,OAAO,GAAG,IAFS,EAAe,CAEd;AACtB;AAEA,SAAgB,EAAc,GAAyB,GAA+B;CAEpF,IAAM,KADW,KAAQ,EAAK,GAAmB,EAAI,MAAM,OAC/B,SAAS,IAAI;CAEzC,OAAO,EAAc,GAAQ,EAAI,MAAM;AACzC;AAEA,SAAgB,EAAe,GAAiC;CAC9D,IAAM,IAAS,EAAK;EAAC;EAAK;EAAK;CAAK,GAAG,EAAI,MAAM,GAC3C,IAAe,EAAI,IAAI,IAAI,EAAI,MAAM;CAE3C,OAAO,GAAG,IAAS,EAAa,GAAc,EAAI,MAAM;AAC1D;AAEA,SAAgB,EAAgB,GAAiC;CAC/D,OAAO,KAAK,EAAU,IAAI,EAAI,MAAM;AACtC;AAEA,SAAgB,EAAgB,GAAiC;CAC/D,OAAO,EAAK,EAAa,kBAAkB,EAAI,MAAM;AACvD;AAEA,SAAgB,EAAK,GAAiC;CACpD,OAAO,EAAK,EAAa,OAAO,EAAI,MAAM;AAC5C"}
1
+ {"version":3,"file":"finance.js","names":[],"sources":["../../src/finance/finance.ts"],"sourcesContent":["import { type Currency, EUR, GBP, type Money, money, USD } from '@vielzeug/coins';\n\nimport { floatFixed } from '../_helpers/float';\nimport { int } from '../_helpers/int';\nimport { alphanumeric, base58String, hexString, numericString, pick } from '../_helpers/string';\nimport type { IllusionistContext } from '../types';\nimport { FINANCE_DATA } from './data';\n\nconst CURRENCIES: Record<'USD' | 'EUR' | 'GBP', Currency> = { EUR, GBP, USD };\n\nconst CREDIT_CARD_TYPES = ['visa', 'mastercard', 'amex'] as const;\ntype CreditCardType = (typeof CREDIT_CARD_TYPES)[number];\n\nconst IBAN_COUNTRIES = Object.keys(FINANCE_DATA.ibanCountryCodes) as (keyof typeof FINANCE_DATA.ibanCountryCodes)[];\n\nconst LETTERS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split('');\n\nfunction letters(count: number, ctx: IllusionistContext): string {\n const out: string[] = [];\n\n for (let i = 0; i < count; i++) {\n out.push(pick(LETTERS, ctx.source)!);\n }\n\n return out.join('');\n}\n\n/** Computes `n mod 97` for an arbitrarily long numeric string. */\nfunction mod97(numeric: string): number {\n let remainder = 0;\n\n for (const ch of numeric) {\n remainder = (remainder * 10 + Number(ch)) % 97;\n }\n\n return remainder;\n}\n\n/** Computes the two IBAN check digits so the resulting IBAN passes the mod-97 validation. */\nfunction ibanCheckDigits(country: string, bban: string): string {\n const rearranged = `${bban}${country}00`;\n const numeric = rearranged.replace(/[A-Z]/g, (c) => String(c.charCodeAt(0) - 55));\n const check = 98 - mod97(numeric);\n\n return check.toString().padStart(2, '0');\n}\n\n/** Computes the Luhn check digit for a partial card number (the final digit is appended). */\nfunction luhnCheckDigit(partial: string): string {\n const digits = partial.split('').map(Number);\n let sum = 0;\n let double = true;\n\n for (let i = digits.length - 1; i >= 0; i--) {\n let d = digits[i]!;\n\n if (double) {\n d *= 2;\n if (d > 9) d -= 9;\n }\n\n sum += d;\n double = !double;\n }\n\n const check = (10 - (sum % 10)) % 10;\n\n return String(check);\n}\n\nexport type AmountOptions = {\n readonly min?: number;\n readonly max?: number;\n readonly currency?: 'USD' | 'EUR' | 'GBP';\n};\n\nexport function amount(ctx: IllusionistContext, opts: AmountOptions = {}): Money {\n const min = opts.min ?? 100;\n const max = opts.max ?? 10000;\n const code = opts.currency ?? 'USD';\n const value = floatFixed(min, max, 2, ctx.source);\n\n return money(value.toFixed(2), CURRENCIES[code]);\n}\n\nexport function iban(ctx: IllusionistContext, countryCode?: string): string {\n const country = (countryCode ?? pick(IBAN_COUNTRIES, ctx.source)!) as keyof typeof FINANCE_DATA.ibanLengths;\n\n if (!(country in FINANCE_DATA.ibanLengths)) {\n throw new RangeError(`iban: unsupported country code \"${countryCode}\". Supported: ${IBAN_COUNTRIES.join(', ')}`);\n }\n\n const totalLength = FINANCE_DATA.ibanLengths[country];\n const bbanLength = totalLength - 4;\n const bban = numericString(bbanLength, ctx.source);\n const checkDigits = ibanCheckDigits(country, bban);\n\n return `${country}${checkDigits}${bban}`;\n}\n\nexport function bic(ctx: IllusionistContext): string {\n const bankCode = letters(4, ctx);\n const country = letters(2, ctx);\n const location = alphanumeric(2, ctx.source).toUpperCase();\n const useBranch = int(0, 1, ctx.source) === 1;\n const branch = useBranch ? alphanumeric(3, ctx.source).toUpperCase() : '';\n\n return `${bankCode}${country}${location}${branch}`;\n}\n\nexport function creditCardNumber(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const iin = pick(FINANCE_DATA.creditCardIins[cardType], ctx.source)!;\n const totalLength = cardType === 'amex' ? 15 : 16;\n const partial = iin + numericString(totalLength - iin.length - 1, ctx.source);\n const checkDigit = luhnCheckDigit(partial);\n\n return `${partial}${checkDigit}`;\n}\n\nexport function creditCardCVV(ctx: IllusionistContext, type?: CreditCardType): string {\n const cardType = type ?? pick(CREDIT_CARD_TYPES, ctx.source)!;\n const length = cardType === 'amex' ? 4 : 3;\n\n return numericString(length, ctx.source);\n}\n\nexport function bitcoinAddress(ctx: IllusionistContext): string {\n const prefix = pick(['1', '3', 'bc1'], ctx.source)!;\n const suffixLength = int(25, 34, ctx.source);\n\n return `${prefix}${base58String(suffixLength, ctx.source)}`;\n}\n\nexport function ethereumAddress(ctx: IllusionistContext): string {\n return `0x${hexString(40, ctx.source)}`;\n}\n\nexport function transactionType(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.transactionTypes, ctx.source)!;\n}\n\nexport function bank(ctx: IllusionistContext): string {\n return pick(FINANCE_DATA.banks, ctx.source)!;\n}\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let n=require("@vielzeug/coins"),r=require("@vielzeug/arsenal"),i=require("@vielzeug/tempo");function a(e,t,n){return e>t?e:e+(0,r.randomFloat)(n)*(t-e)}function o(e,t,n=2,r){let i=10**n,o=a(e*i,t*i,r);return Math.round(o)/i}function s(e,t,n){return(0,r.random)(e,t,n)}function c(e,t){return e.length===0?void 0:e[Math.floor((0,r.randomFloat)(t)*e.length)]}function l(e,t){let n=``;for(let i=0;i<e;i++)n+=Math.floor((0,r.randomFloat)(t)*10);return n}function u(e,t){let n=``;for(let i=0;i<e;i++)n+=`0123456789abcdef`[Math.floor((0,r.randomFloat)(t)*16)];return n}function d(e,t){let n=``;for(let i=0;i<e;i++)n+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[Math.floor((0,r.randomFloat)(t)*62)];return n}function f(e,t){let n=``;for(let i=0;i<e;i++)n+=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`[Math.floor((0,r.randomFloat)(t)*58)];return n}var p={departments:[`Books`,`Movies`,`Music`,`Games`,`Electronics`,`Computers`,`Home`,`Garden`,`Tools`,`Grocery`,`Health`,`Beauty`,`Toys`,`Kids`,`Baby`,`Clothing`,`Shoes`,`Jewelry`,`Sports`,`Outdoors`,`Automotive`],productAdjectives:[`Small`,`Ergonomic`,`Rustic`,`Intelligent`,`Gorgeous`,`Incredible`,`Fantastic`,`Practical`,`Sleek`,`Awesome`,`Generic`,`Handmade`,`Licensed`,`Refined`,`Unbranded`,`Tasty`],productMaterials:[`Steel`,`Wooden`,`Concrete`,`Plastic`,`Cotton`,`Granite`,`Rubber`,`Metal`,`Soft`,`Fresh`,`Frozen`],productNouns:[`Chair`,`Car`,`Computer`,`Gloves`,`Pants`,`Shirt`,`Table`,`Shoes`,`Hat`,`Plate`,`Knife`,`Bottle`,`Coat`,`Lamp`,`Keyboard`,`Bag`,`Bench`,`Clock`,`Watch`,`Wallet`]},ee=t({department:()=>v,price:()=>ne,productAdjective:()=>m,productDescription:()=>re,productMaterial:()=>h,productName:()=>_,productNoun:()=>g}),te={EUR:n.EUR,GBP:n.GBP,USD:n.USD};function m(e){return c(p.productAdjectives,e.source)}function h(e){return c(p.productMaterials,e.source)}function g(e){return c(p.productNouns,e.source)}function _(e){return`${m(e)} ${h(e)} ${g(e)}`}function v(e){return c(p.departments,e.source)}function ne(e,t={}){let r=t.min??.01,i=t.max??1e3,a=t.currency??`USD`,s=o(r,i,2,e.source);return(0,n.money)(s.toFixed(2),te[a])}function re(e){let t=s(1,2,e.source),n=[];for(let r=0;r<t;r++){let t=c(p.productAdjectives,e.source),r=c(p.productMaterials,e.source),i=c(p.productNouns,e.source),a=c(p.departments,e.source);n.push(`The ${t.toLowerCase()} ${r.toLowerCase()} ${i.toLowerCase()} is a great choice for your ${a.toLowerCase()} needs.`)}return n.join(` `)}var ie=t({between:()=>ce,birthday:()=>le,future:()=>oe,month:()=>de,past:()=>ae,recent:()=>se,weekday:()=>ue});function y(e){return e??i.Temporal.Now.zonedDateTimeISO(`UTC`)}function ae(e,t){let n=y(t?.ref),r=(t?.years??1)*365*24*60*60;return n.add({seconds:-s(1,r,e.source)})}function oe(e,t){let n=y(t?.ref),r=(t?.years??1)*365*24*60*60;return n.add({seconds:s(1,r,e.source)})}function se(e,t){let n=y(t?.ref),r=(t?.days??1)*24*60*60;return n.add({seconds:-s(1,r,e.source)})}function ce(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 le(e,t){let n=y(t?.ref),r=s(t?.minAge??18,t?.maxAge??80,e.source),i=s(1,12,e.source),a=s(1,28,e.source);return n.toPlainDate().subtract({years:r}).with({day:a,month:i})}function ue(e,t){return((t??e.locale.code)===`de`?[`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`,`Sonntag`]:[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`])[s(0,6,e.source)]}function de(e,t){return((t??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`])[s(0,11,e.source)]}var fe=class extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}},pe=class extends fe{},b={banks:[`Deutsche Bank`,`Commerzbank`,`Sparkasse`,`Barclays`,`HSBC`,`BNP Paribas`,`Santander`,`ING`,`UniCredit`,`UBS`],creditCardIins:{amex:[`34`,`37`],mastercard:[`51`,`52`,`53`,`54`,`55`],visa:[`4`]},ibanCountryCodes:{AT:`AT`,BE:`BE`,CH:`CH`,DE:`DE`,ES:`ES`,FR:`FR`,GB:`GB`,IT:`IT`,NL:`NL`},ibanLengths:{AT:20,BE:16,CH:21,DE:22,ES:24,FR:27,GB:22,IT:27,NL:18},transactionTypes:[`payment`,`transfer`,`deposit`,`withdrawal`,`refund`,`fee`]},me=t({amount:()=>C,bank:()=>j,bic:()=>T,bitcoinAddress:()=>O,creditCardCVV:()=>D,creditCardNumber:()=>E,ethereumAddress:()=>k,iban:()=>w,transactionType:()=>A}),he={EUR:n.EUR,GBP:n.GBP,USD:n.USD},ge=[`visa`,`mastercard`,`amex`],x=Object.keys(b.ibanCountryCodes),_e=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function S(e,t){let n=[];for(let r=0;r<e;r++)n.push(c(_e,t.source));return n.join(``)}function ve(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function ye(e,t){return(98-ve(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function be(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function C(e,t={}){let r=t.min??100,i=t.max??1e4,a=t.currency??`USD`,s=o(r,i,2,e.source);return(0,n.money)(s.toFixed(2),he[a])}function w(e,t){let n=t??c(x,e.source);if(!(n in b.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${x.join(`, `)}`);let r=l(b.ibanLengths[n]-4,e.source);return`${n}${ye(n,r)}${r}`}function T(e){return`${S(4,e)}${S(2,e)}${d(2,e.source).toUpperCase()}${s(0,1,e.source)===1?d(3,e.source).toUpperCase():``}`}function E(e,t){let n=t??c(ge,e.source),r=c(b.creditCardIins[n],e.source),i=r+l((n===`amex`?15:16)-r.length-1,e.source);return`${i}${be(i)}`}function D(e,t){return l((t??c(ge,e.source))===`amex`?4:3,e.source)}function O(e){return`${c([`1`,`3`,`bc1`],e.source)}${f(s(25,34,e.source),e.source)}`}function k(e){return`0x${u(40,e.source)}`}function A(e){return c(b.transactionTypes,e.source)}function j(e){return c(b.banks,e.source)}var M={domains:[`example`,`test`,`demo`,`mail`,`web`,`tech`,`app`,`cloud`,`dev`,`info`],httpMethods:[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`,`OPTIONS`],mimeTypes:[`text/plain`,`text/html`,`application/json`,`application/xml`,`application/octet-stream`,`image/png`,`image/jpeg`,`image/gif`,`image/svg+xml`,`application/pdf`,`audio/mpeg`,`video/mp4`],protocols:[`https`,`http`],statusCodes:[200,201,204,301,302,304,400,401,403,404,405,409,418,422,429,500,502,503],tlds:[`com`,`org`,`net`,`io`,`dev`,`co`,`app`,`tech`,`cloud`,`ai`],userAgents:[`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0`,`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15`,`Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1`,`Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36`]},xe=t({domainName:()=>R,email:()=>P,httpMethod:()=>Ee,ip:()=>Ce,mac:()=>we,mimeType:()=>Oe,password:()=>I,statusCode:()=>De,url:()=>L,userAgent:()=>Te,username:()=>F}),N=`!@#$%^&*()_+-=[]{}|;:,.<>?`,Se=[`api`,`v1`,`v2`,`users`,`posts`,`comments`,`articles`,`products`,`orders`,`items`,`search`,`auth`,`login`,`logout`,`profile`,`settings`,`dashboard`,`files`,`images`,`assets`,`static`,`public`,`private`,`admin`,`reports`];function P(e){return`${(c(e.locale.person.firstNameFemale,e.source)??c(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(c(e.locale.person.lastName,e.source)??`name`).toLowerCase()}@${c(M.domains,e.source)??`example`}.${c(M.tlds,e.source)??`com`}`}function F(e){return s(0,1,e.source)===0?d(s(6,12,e.source),e.source):`${(c(e.locale.person.firstNameFemale,e.source)??c(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(c(e.locale.person.lastName,e.source)??`name`).toLowerCase()}`}function I(e,t={}){let n=t.length??12;if(t.memorable){let t=(c(e.locale.person.firstNameFemale,e.source)??c(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase(),r=(c(e.locale.person.lastName,e.source)??`name`).toLowerCase(),i=String(s(10,99,e.source)),a=c(N.split(``),e.source)??`!`,o=`${t}${r}${i}${a}`;if(o.length<=n)return o+d(n-o.length,e.source);let l=`${i}${a}`,u=n-l.length,f=l+(u>0?(t+r).slice(0,u):``);return f.length<n?f+d(n-f.length,e.source):f.slice(0,n)}let r=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,i=`abcdefghijklmnopqrstuvwxyz`,a=`0123456789`,o=[r,i,a,N],l=[];for(let t of o)l.push(c(t.split(``),e.source));let u=r+i+a+N;for(;l.length<n;)l.push(c(u.split(``),e.source));for(let t=l.length-1;t>0;t--){let n=s(0,t,e.source);[l[t],l[n]]=[l[n],l[t]]}return l.slice(0,n).join(``)}function L(e){let t=c(M.protocols,e.source)??`https`,n=`${c([`www`,`api`,`app`,`mail`,`static`,`cdn`],e.source)??`www`}.${c(M.domains,e.source)??`example`}.${c(M.tlds,e.source)??`com`}`,r=s(1,4,e.source),i=[];for(let t=0;t<r;t++){let t=c(Se,e.source)??`api`;s(0,2,e.source)===0?i.push(`${t}-${d(s(2,5),e.source).toLowerCase()}`):i.push(t)}return`${t}://${n}/${i.join(`/`)}`}function R(e){return`${c(M.domains,e.source)??`example`}.${c(M.tlds,e.source)??`com`}`}function Ce(e,t=4){if(t===6){let t=[];for(let n=0;n<8;n++)t.push(u(4,e.source));return t.join(`:`)}let n=[];for(let t=0;t<4;t++)n.push(s(0,255,e.source));return n.join(`.`)}function we(e){let t=[];for(let n=0;n<6;n++)t.push(u(2,e.source));return t.join(`:`)}function Te(e){return c(M.userAgents,e.source)??M.userAgents[0]}function Ee(e){return c(M.httpMethods,e.source)??`GET`}function De(e){return c(M.statusCodes,e.source)??200}function Oe(e){return c(M.mimeTypes,e.source)??`text/plain`}var ke=t({city:()=>Ae,country:()=>Pe,latitude:()=>V,longitude:()=>H,nearbyGPSCoordinate:()=>Fe,state:()=>Ne,street:()=>B,streetAddress:()=>je,zipCode:()=>Me});function z(e){return e.locale.location}function Ae(e){return c(z(e).cities,e.source)}function B(e){return c(z(e).streets,e.source)}function je(e){return`${Math.floor(a(1,1e3,e.source))} ${B(e)}`}function Me(e){return z(e).zipPattern.replace(/#/g,()=>String(Math.floor((0,r.randomFloat)(e.source)*10)))}function Ne(e){return c(z(e).states,e.source)}function Pe(e){return c(z(e).countries,e.source)}function V(e){return a(-90,90,e.source)}function H(e){return a(-180,180,e.source)}function Fe(e,t){let n=t??{lat:V(e),lng:H(e)};return{lat:a(n.lat-1,n.lat+1,e.source),lng:a(n.lng-1,n.lng+1,e.source)}}var Ie={words:`lorem.ipsum.dolor.sit.amet.consectetur.adipiscing.elit.sed.do.eiusmod.tempor.incididunt.ut.labore.et.dolore.magna.aliqua.enim.ad.minim.veniam.quis.nostrud.exercitation.ullamco.laboris.nisi.aliquip.ex.ea.commodo.consequat.duis.aute.irure.in.reprehenderit.voluptate.velit.esse.cillum.fugiat.nulla.pariatur.excepteur.sint.occaecat.cupidatat.non.proident.sunt.culpa.qui.officia.deserunt.mollit.anim.id.est.laborum`.split(`.`)},Le=t({lines:()=>Be,paragraph:()=>q,paragraphs:()=>Re,sentence:()=>G,sentences:()=>K,slug:()=>ze,word:()=>U,words:()=>W});function U(e){return c(Ie.words,e.source)}function W(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(U(e));return n.join(` `)}function G(e,t){let n=W(e,t??Math.floor(a(6,13,e.source)));return`${n.charAt(0).toUpperCase()}${n.slice(1)}.`}function K(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(G(e));return n.join(` `)}function q(e,t){return K(e,t??Math.floor(a(3,8,e.source)))}function Re(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(q(e));return n.join(`
2
- `)}function ze(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(U(e));return n.join(`-`)}function Be(e,t=5){let n=[];for(let r=0;r<t;r++)n.push(G(e));return n.join(`
3
- `)}function Ve(e,t=.5){return(0,r.randomFloat)(e)<t}var He=t({firstName:()=>Y,fullName:()=>Ue,gender:()=>We,jobTitle:()=>qe,lastName:()=>X,prefix:()=>Ge,suffix:()=>Ke});function J(e){return e.locale.person}function Y(e){let t=J(e);return c(Ve(e.source)?t.firstNameMale:t.firstNameFemale,e.source)}function X(e){return c(J(e).lastName,e.source)}function Ue(e){return`${Y(e)} ${X(e)}`}function We(e){return c(J(e).gender,e.source)}function Ge(e){return c(J(e).prefix,e.source)}function Ke(e){let t=J(e);return t.suffix.length===0?``:c(t.suffix,e.source)}function qe(e){let t=J(e);return`${c(t.jobAreas,e.source)} ${c(t.jobTypes,e.source)}`}function Z(e){let t=e>>>0;return{next(){t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}}function Je(e){if(e==null)return Ye();if(typeof e==`number`){if(!Number.isFinite(e))throw new pe(`createSeed: numeric seed must be finite, got ${e}`);return Z(Math.trunc(e))}let t=JSON.stringify(e),n=0;for(let e=0;e<t.length;e++)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return Z(n)}function Ye(){return{next(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967296}}}var Q={cronExpressions:[`0 * * * *`,`0 0 * * *`,`0 0 * * 0`,`*/5 * * * *`,`0 12 * * 1-5`,`0 0 1 * *`,`0 0 1 1 *`,`0 3 * * *`,`30 7 * * 1-5`,`0 18 * * 5`],directories:[`src`,`dist`,`build`,`lib`,`test`,`docs`,`config`,`assets`,`public`,`private`,`tmp`,`cache`,`var`,`opt`,`etc`],fileExtensions:`txt.pdf.doc.docx.xls.xlsx.ppt.pptx.jpg.png.gif.svg.webp.ico.mp3.wav.flac.ogg.mp4.avi.mkv.webm.zip.tar.gz.rar.7z.js.ts.json.xml.html.css.md.py.java.go.rs.c.cpp`.split(`.`),fileNames:[`document`,`report`,`summary`,`notes`,`draft`,`config`,`readme`,`index`,`main`,`app`,`data`,`backup`,`export`,`import`,`log`],mimeTypes:{avi:`video/x-msvideo`,css:`text/css`,gif:`image/gif`,gz:`application/gzip`,html:`text/html`,jpeg:`image/jpeg`,jpg:`image/jpeg`,js:`application/javascript`,json:`application/json`,mp3:`audio/mpeg`,mp4:`video/mp4`,pdf:`application/pdf`,png:`image/png`,svg:`image/svg+xml`,tar:`application/x-tar`,txt:`text/plain`,wav:`audio/wav`,webp:`image/webp`,xml:`application/xml`,zip:`application/zip`}},Xe=t({cron:()=>rt,fileExtension:()=>Ze,fileName:()=>$,filePath:()=>Qe,mimeType:()=>$e,port:()=>nt,process:()=>it,semver:()=>et,uuid:()=>tt});function Ze(e){return c(Q.fileExtensions,e.source)}function $(e){return`${c(Q.fileNames,e.source)}.${Ze(e)}`}function Qe(e){let t=s(1,4,e.source),n=[];for(let r=0;r<t;r++)n.push(c(Q.directories,e.source));return`${n.join(`/`)}/${$(e)}`}function $e(e){return c(Object.values(Q.mimeTypes),e.source)}function et(e,t){let n=`${s(0,t?.maxMajor??20,e.source)}.${s(0,20,e.source)}.${s(0,99,e.source)}`;if(t?.includePrerelease&&e.source.next()<.3){let t=c([`alpha`,`beta`,`rc`,`next`],e.source),r=s(1,10,e.source);n+=`-${t}.${r}`}return n}function tt(){return crypto.randomUUID()}function nt(e,t){return s(t?.min??1024,t?.max??65535,e.source)}function rt(e){return c(Q.cronExpressions,e.source)}function it(e){return`${c([`node`,`python`,`ruby`,`java`,`go`,`rust`,`bash`],e.source)}_${d(s(3,8,e.source),e.source)}`}function at(e){let{locale:t,seed:n}=e,r={locale:t,source:Je(n)},i=e=>{let t={};for(let[n,i]of Object.entries(e))typeof i==`function`&&(t[n]=(...e)=>i(r,...e));return t};return{commerce:i(ee),date:i(ie),finance:i(me),internet:i(xe),locale:t,location:i(ke),lorem:i(Le),person:i(He),seed:n,system:i(Xe)}}var ot={code:`de`,location:{cities:[`Berlin`,`Hamburg`,`München`,`Köln`,`Frankfurt am Main`,`Stuttgart`,`Düsseldorf`,`Leipzig`,`Dortmund`,`Essen`,`Bremen`,`Dresden`,`Hannover`,`Nürnberg`,`Duisburg`,`Bochum`,`Wuppertal`,`Bielefeld`,`Bonn`,`Münster`],countries:[`Deutschland`,`Österreich`,`Schweiz`,`Frankreich`,`Italien`,`Spanien`,`Niederlande`,`Belgien`,`Polen`,`Tschechien`,`Dänemark`,`Schweden`,`Norwegen`,`Finnland`,`Portugal`],states:[`Baden-Württemberg`,`Bayern`,`Berlin`,`Brandenburg`,`Bremen`,`Hamburg`,`Hessen`,`Mecklenburg-Vorpommern`,`Niedersachsen`,`Nordrhein-Westfalen`,`Rheinland-Pfalz`,`Saarland`,`Sachsen`,`Sachsen-Anhalt`,`Schleswig-Holstein`,`Thüringen`],streets:[`Hauptstraße`,`Schulstraße`,`Bahnhofstraße`,`Gartenstraße`,`Bergstraße`,`Dorfstraße`,`Lindenstraße`,`Goethestraße`,`Schillerstraße`,`Mozartstraße`,`Bahnhofplatz`,`Marktplatz`,`Kirchplatz`,`Schlossplatz`,`Waldrand`],zipPattern:`#####`},person:{firstNameFemale:`Mia.Emma.Sophia.Hannah.Emilia.Lina.Ella.Marie.Clara.Lena.Lea.Lilly.Anna.Ida.Mila.Luisa.Nora.Greta.Frieda.Johanna.Lotte.Charlotte.Mathilda.Lara.Sarah.Julia.Laura.Lisa.Katharina.Sabine.Andrea.Petra.Susanne.Nicole.Stefanie.Christina.Tanja.Birgit.Monika.Ursula.Helga.Ingrid.Brigitte.Gisela.Renate.Angelika.Claudia.Sandra.Beate.Klara`.split(`.`),firstNameMale:`Ben.Paul.Leon.Finn.Elias.Jonas.Felix.Maximilian.Max.Luca.Noah.Henry.Lukas.Moritz.David.Niklas.Philipp.Julian.Tim.Tom.Simon.Alexander.Liam.Emil.Daniel.Sebastian.Matteo.Fabian.Jakob.Tobias.Florian.Marvin.Anton.Johannes.Stefan.Andreas.Michael.Thomas.Christian.Klaus.Peter.Wolfgang.Jürgen.Frank.Hans.Martin.Rolf.Bernd.Uwe.Karl`.split(`.`),gender:[`Männlich`,`Weiblich`,`Nicht-binär`,`Divers`],jobAreas:[`Finanzen`,`IT`,`Marketing`,`Vertrieb`,`Personalwesen`,`Betrieb`,`Ingenieurwesen`,`Forschung`,`Design`,`Recht`,`Kundenservice`,`Produkt`,`Logistik`,`Buchhaltung`,`Öffentlichkeitsarbeit`,`Qualitätssicherung`,`Daten`,`Sicherheit`,`Kommunikation`,`Verwaltung`],jobTypes:[`Ingenieur`,`Manager`,`Analyst`,`Spezialist`,`Koordinator`,`Direktor`,`Berater`,`Entwickler`,`Architekt`,`Administrator`,`Beamter`,`Mitarbeiter`,`Aufseher`,`Techniker`,`Assistent`],lastName:`Müller.Schmidt.Schneider.Fischer.Weber.Meyer.Wagner.Becker.Schulz.Hoffmann.Schäfer.Koch.Bauer.Richter.Klein.Wolf.Schröder.Neumann.Schwarz.Zimmermann.Braun.Krüger.Hofmann.Hartmann.Lange.Schmitt.Werner.Krause.Lehmann.Schmid.Schulze.Maier.Köhler.Herrmann.König.Walter.Mayer.Huber.Kaiser.Fuchs.Peters.Lang.Scholz.Möller.Weiß.Jung.Hahn.Schubert.Vogel.Friedrich`.split(`.`),prefix:[`Herr`,`Frau`,`Dr.`,`Prof.`],suffix:[]}},st={code:`en`,location:{cities:[`New York`,`Los Angeles`,`Chicago`,`Houston`,`Phoenix`,`Philadelphia`,`San Antonio`,`San Diego`,`Dallas`,`San Jose`,`Austin`,`Jacksonville`,`Fort Worth`,`Columbus`,`Charlotte`,`San Francisco`,`Indianapolis`,`Seattle`,`Denver`,`Boston`],countries:[`United States`,`United Kingdom`,`Germany`,`France`,`Italy`,`Spain`,`Netherlands`,`Belgium`,`Switzerland`,`Austria`,`Canada`,`Australia`,`Japan`,`Brazil`,`India`],states:`Alabama.Alaska.Arizona.Arkansas.California.Colorado.Connecticut.Delaware.Florida.Georgia.Hawaii.Idaho.Illinois.Indiana.Iowa.Kansas.Kentucky.Louisiana.Maine.Maryland.Massachusetts.Michigan.Minnesota.Mississippi.Missouri.Montana.Nebraska.Nevada.New Hampshire.New Jersey.New Mexico.New York.North Carolina.North Dakota.Ohio.Oklahoma.Oregon.Pennsylvania.Rhode Island.South Carolina.South Dakota.Tennessee.Texas.Utah.Vermont.Virginia.Washington.West Virginia.Wisconsin.Wyoming`.split(`.`),streets:[`Main St`,`Oak Ave`,`Maple Dr`,`Cedar Ln`,`Pine Rd`,`Elm St`,`Washington Blvd`,`Park Ave`,`Lake Dr`,`Hill Rd`,`River Rd`,`Spring St`,`Forest Dr`,`Sunset Blvd`,`Highland Ave`],zipPattern:`#####`},person:{firstNameFemale:`Mary.Patricia.Jennifer.Linda.Elizabeth.Barbara.Susan.Jessica.Sarah.Karen.Lisa.Nancy.Betty.Margaret.Sandra.Ashley.Kimberly.Emily.Donna.Michelle.Carol.Amanda.Dorothy.Melissa.Deborah.Stephanie.Rebecca.Sharon.Laura.Cynthia.Kathleen.Amy.Shirley.Angela.Helen.Anna.Brenda.Pamela.Nicole.Emma.Samantha.Katherine.Christine.Debra.Rachel.Catherine.Carolyn.Janet.Ruth.Maria`.split(`.`),firstNameMale:`James.John.Robert.Michael.William.David.Richard.Joseph.Thomas.Charles.Christopher.Daniel.Matthew.Anthony.Mark.Donald.Steven.Paul.Andrew.Joshua.Kenneth.Kevin.Brian.George.Edward.Ronald.Timothy.Jason.Jeffrey.Ryan.Jacob.Gary.Nicholas.Eric.Jonathan.Stephen.Larry.Justin.Scott.Brandon.Benjamin.Samuel.Gregory.Frank.Alexander.Raymond.Patrick.Jack.Dennis.Jerry`.split(`.`),gender:[`Male`,`Female`,`Non-binary`,`Other`],jobAreas:[`Finance`,`IT`,`Marketing`,`Sales`,`Human Resources`,`Operations`,`Engineering`,`Research`,`Design`,`Legal`,`Customer Support`,`Product`,`Logistics`,`Accounting`,`Public Relations`,`Quality Assurance`,`Data`,`Security`,`Communications`,`Administration`],jobTypes:[`Engineer`,`Manager`,`Analyst`,`Specialist`,`Coordinator`,`Director`,`Consultant`,`Developer`,`Architect`,`Administrator`,`Officer`,`Representative`,`Supervisor`,`Technician`,`Assistant`],lastName:`Smith.Johnson.Williams.Brown.Jones.Garcia.Miller.Davis.Rodriguez.Martinez.Hernandez.Lopez.Gonzalez.Wilson.Anderson.Thomas.Taylor.Moore.Jackson.Martin.Lee.Perez.Thompson.White.Harris.Sanchez.Clark.Ramirez.Lewis.Robinson.Walker.Young.Allen.King.Wright.Scott.Torres.Nguyen.Hill.Flores.Green.Adams.Nelson.Baker.Hall.Rivera.Campbell.Mitchell.Carter.Roberts`.split(`.`),prefix:[`Mr.`,`Mrs.`,`Ms.`,`Dr.`,`Prof.`],suffix:[`Jr.`,`Sr.`,`II`,`III`,`IV`,`PhD`]}};exports.IllusionistError=fe,exports.IllusionistSeedError=pe,exports.amount=C,exports.bank=j,exports.between=ce,exports.bic=T,exports.birthday=le,exports.bitcoinAddress=O,exports.city=Ae,exports.country=Pe,exports.createIllusion=at,exports.createSeed=Je,exports.creditCardCVV=D,exports.creditCardNumber=E,exports.de=ot,exports.department=v,exports.domainName=R,exports.email=P,exports.en=st,exports.ethereumAddress=k,exports.firstName=Y,exports.fullName=Ue,exports.future=oe,exports.gender=We,exports.httpMethod=Ee,exports.iban=w,exports.ip=Ce,exports.jobTitle=qe,exports.lastName=X,exports.latitude=V,exports.lines=Be,exports.longitude=H,exports.mac=we,exports.mimeType=Oe,exports.month=de,exports.mulberry32=Z,exports.nearbyGPSCoordinate=Fe,exports.paragraph=q,exports.paragraphs=Re,exports.password=I,exports.past=ae,exports.prefix=Ge,exports.price=ne,exports.productAdjective=m,exports.productDescription=re,exports.productMaterial=h,exports.productName=_,exports.productNoun=g,exports.recent=se,exports.sentence=G,exports.sentences=K,exports.slug=ze,exports.state=Ne,exports.statusCode=De,exports.street=B,exports.streetAddress=je,exports.suffix=Ke,exports.transactionType=A,exports.url=L,exports.userAgent=Te,exports.username=F,exports.weekday=ue,exports.word=U,exports.words=W,exports.zipCode=Me;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.defineProperty,__exportAll=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r};let t=require("@vielzeug/coins"),n=require("@vielzeug/arsenal"),r=require("@vielzeug/tempo");function float(e,t,r){return e>t?e:e+(0,n.randomFloat)(r)*(t-e)}function floatFixed(e,t,n=2,r){let i=10**n,a=float(e*i,t*i,r);return Math.round(a)/i}function int(e,t,r){return(0,n.random)(e,t,r)}function pick(e,t){return e.length===0?void 0:e[Math.floor((0,n.randomFloat)(t)*e.length)]}function numericString(e,t){let r=``;for(let i=0;i<e;i++)r+=Math.floor((0,n.randomFloat)(t)*10);return r}function hexString(e,t){let r=``;for(let i=0;i<e;i++)r+=`0123456789abcdef`[Math.floor((0,n.randomFloat)(t)*16)];return r}function alphanumeric(e,t){let r=``;for(let i=0;i<e;i++)r+=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789`[Math.floor((0,n.randomFloat)(t)*62)];return r}function base58String(e,t){let r=``;for(let i=0;i<e;i++)r+=`123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz`[Math.floor((0,n.randomFloat)(t)*58)];return r}var i={departments:[`Books`,`Movies`,`Music`,`Games`,`Electronics`,`Computers`,`Home`,`Garden`,`Tools`,`Grocery`,`Health`,`Beauty`,`Toys`,`Kids`,`Baby`,`Clothing`,`Shoes`,`Jewelry`,`Sports`,`Outdoors`,`Automotive`],productAdjectives:[`Small`,`Ergonomic`,`Rustic`,`Intelligent`,`Gorgeous`,`Incredible`,`Fantastic`,`Practical`,`Sleek`,`Awesome`,`Generic`,`Handmade`,`Licensed`,`Refined`,`Unbranded`,`Tasty`],productMaterials:[`Steel`,`Wooden`,`Concrete`,`Plastic`,`Cotton`,`Granite`,`Rubber`,`Metal`,`Soft`,`Fresh`,`Frozen`],productNouns:[`Chair`,`Car`,`Computer`,`Gloves`,`Pants`,`Shirt`,`Table`,`Shoes`,`Hat`,`Plate`,`Knife`,`Bottle`,`Coat`,`Lamp`,`Keyboard`,`Bag`,`Bench`,`Clock`,`Watch`,`Wallet`]},a=__exportAll({department:()=>department,price:()=>price,productAdjective:()=>productAdjective,productDescription:()=>productDescription,productMaterial:()=>productMaterial,productName:()=>productName,productNoun:()=>productNoun}),o={EUR:t.EUR,GBP:t.GBP,USD:t.USD};function productAdjective(e){return pick(i.productAdjectives,e.source)}function productMaterial(e){return pick(i.productMaterials,e.source)}function productNoun(e){return pick(i.productNouns,e.source)}function productName(e){return`${productAdjective(e)} ${productMaterial(e)} ${productNoun(e)}`}function department(e){return pick(i.departments,e.source)}function price(e,n={}){let r=n.min??.01,i=n.max??1e3,a=n.currency??`USD`,s=floatFixed(r,i,2,e.source);return(0,t.money)(s.toFixed(2),o[a])}function productDescription(e){let t=int(1,2,e.source),n=[];for(let r=0;r<t;r++){let t=pick(i.productAdjectives,e.source),r=pick(i.productMaterials,e.source),a=pick(i.productNouns,e.source),o=pick(i.departments,e.source);n.push(`The ${t.toLowerCase()} ${r.toLowerCase()} ${a.toLowerCase()} is a great choice for your ${o.toLowerCase()} needs.`)}return n.join(` `)}var s=__exportAll({between:()=>between,birthday:()=>birthday,future:()=>future,month:()=>month,past:()=>past,recent:()=>recent,weekday:()=>weekday});function resolveRef(e){return e??r.Temporal.Now.zonedDateTimeISO(`UTC`)}function past(e,t){let n=resolveRef(t?.ref),r=(t?.years??1)*365*24*60*60;return n.add({seconds:-int(1,r,e.source)})}function future(e,t){let n=resolveRef(t?.ref),r=(t?.years??1)*365*24*60*60;return n.add({seconds:int(1,r,e.source)})}function recent(e,t){let n=resolveRef(t?.ref),r=(t?.days??1)*24*60*60;return n.add({seconds:-int(1,r,e.source)})}function between(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 birthday(e,t){let n=resolveRef(t?.ref),r=int(t?.minAge??18,t?.maxAge??80,e.source),i=int(1,12,e.source),a=int(1,28,e.source);return n.toPlainDate().subtract({years:r}).with({day:a,month:i})}function weekday(e,t){return((t??e.locale.code)===`de`?[`Montag`,`Dienstag`,`Mittwoch`,`Donnerstag`,`Freitag`,`Samstag`,`Sonntag`]:[`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`,`Sunday`])[int(0,6,e.source)]}function month(e,t){return((t??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`])[int(0,11,e.source)]}var IllusionistError=class extends Error{constructor(e,t){super(e,t),this.name=new.target.name,Object.setPrototypeOf(this,new.target.prototype)}},IllusionistSeedError=class extends IllusionistError{},c={banks:[`Deutsche Bank`,`Commerzbank`,`Sparkasse`,`Barclays`,`HSBC`,`BNP Paribas`,`Santander`,`ING`,`UniCredit`,`UBS`],creditCardIins:{amex:[`34`,`37`],mastercard:[`51`,`52`,`53`,`54`,`55`],visa:[`4`]},ibanCountryCodes:{AT:`AT`,BE:`BE`,CH:`CH`,DE:`DE`,ES:`ES`,FR:`FR`,GB:`GB`,IT:`IT`,NL:`NL`},ibanLengths:{AT:20,BE:16,CH:21,DE:22,ES:24,FR:27,GB:22,IT:27,NL:18},transactionTypes:[`payment`,`transfer`,`deposit`,`withdrawal`,`refund`,`fee`]},l=__exportAll({amount:()=>amount,bank:()=>bank,bic:()=>bic,bitcoinAddress:()=>bitcoinAddress,creditCardCVV:()=>creditCardCVV,creditCardNumber:()=>creditCardNumber,ethereumAddress:()=>ethereumAddress,iban:()=>iban,transactionType:()=>transactionType}),u={EUR:t.EUR,GBP:t.GBP,USD:t.USD},d=[`visa`,`mastercard`,`amex`],f=Object.keys(c.ibanCountryCodes),p=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`.split(``);function letters(e,t){let n=[];for(let r=0;r<e;r++)n.push(pick(p,t.source));return n.join(``)}function mod97(e){let t=0;for(let n of e)t=(t*10+Number(n))%97;return t}function ibanCheckDigits(e,t){return(98-mod97(`${t}${e}00`.replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))).toString().padStart(2,`0`)}function luhnCheckDigit(e){let t=e.split(``).map(Number),n=0,r=!0;for(let e=t.length-1;e>=0;e--){let i=t[e];r&&(i*=2,i>9&&(i-=9)),n+=i,r=!r}let i=(10-n%10)%10;return String(i)}function amount(e,n={}){let r=n.min??100,i=n.max??1e4,a=n.currency??`USD`,o=floatFixed(r,i,2,e.source);return(0,t.money)(o.toFixed(2),u[a])}function iban(e,t){let n=t??pick(f,e.source);if(!(n in c.ibanLengths))throw RangeError(`iban: unsupported country code "${t}". Supported: ${f.join(`, `)}`);let r=numericString(c.ibanLengths[n]-4,e.source);return`${n}${ibanCheckDigits(n,r)}${r}`}function bic(e){return`${letters(4,e)}${letters(2,e)}${alphanumeric(2,e.source).toUpperCase()}${int(0,1,e.source)===1?alphanumeric(3,e.source).toUpperCase():``}`}function creditCardNumber(e,t){let n=t??pick(d,e.source),r=pick(c.creditCardIins[n],e.source),i=r+numericString((n===`amex`?15:16)-r.length-1,e.source);return`${i}${luhnCheckDigit(i)}`}function creditCardCVV(e,t){return numericString((t??pick(d,e.source))===`amex`?4:3,e.source)}function bitcoinAddress(e){return`${pick([`1`,`3`,`bc1`],e.source)}${base58String(int(25,34,e.source),e.source)}`}function ethereumAddress(e){return`0x${hexString(40,e.source)}`}function transactionType(e){return pick(c.transactionTypes,e.source)}function bank(e){return pick(c.banks,e.source)}var m={domains:[`example`,`test`,`demo`,`mail`,`web`,`tech`,`app`,`cloud`,`dev`,`info`],httpMethods:[`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`,`OPTIONS`],mimeTypes:[`text/plain`,`text/html`,`application/json`,`application/xml`,`application/octet-stream`,`image/png`,`image/jpeg`,`image/gif`,`image/svg+xml`,`application/pdf`,`audio/mpeg`,`video/mp4`],protocols:[`https`,`http`],statusCodes:[200,201,204,301,302,304,400,401,403,404,405,409,418,422,429,500,502,503],tlds:[`com`,`org`,`net`,`io`,`dev`,`co`,`app`,`tech`,`cloud`,`ai`],userAgents:[`Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36`,`Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0`,`Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15`,`Mozilla/5.0 (iPhone; CPU iPhone OS 17_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Mobile/15E148 Safari/604.1`,`Mozilla/5.0 (Linux; Android 14; Pixel 8) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36`]},h=__exportAll({domainName:()=>domainName,email:()=>email,httpMethod:()=>httpMethod,ip:()=>ip,mac:()=>mac,mimeType:()=>mimeType,password:()=>password,statusCode:()=>statusCode,url:()=>url,userAgent:()=>userAgent,username:()=>username}),g=`!@#$%^&*()_+-=[]{}|;:,.<>?`,_=[`api`,`v1`,`v2`,`users`,`posts`,`comments`,`articles`,`products`,`orders`,`items`,`search`,`auth`,`login`,`logout`,`profile`,`settings`,`dashboard`,`files`,`images`,`assets`,`static`,`public`,`private`,`admin`,`reports`];function email(e){return`${(pick(e.locale.person.firstNameFemale,e.source)??pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(pick(e.locale.person.lastName,e.source)??`name`).toLowerCase()}@${pick(m.domains,e.source)??`example`}.${pick(m.tlds,e.source)??`com`}`}function username(e){return int(0,1,e.source)===0?alphanumeric(int(6,12,e.source),e.source):`${(pick(e.locale.person.firstNameFemale,e.source)??pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase()}.${(pick(e.locale.person.lastName,e.source)??`name`).toLowerCase()}`}function password(e,t={}){let n=t.length??12;if(t.memorable){let t=(pick(e.locale.person.firstNameFemale,e.source)??pick(e.locale.person.firstNameMale,e.source)??`user`).toLowerCase(),r=(pick(e.locale.person.lastName,e.source)??`name`).toLowerCase(),i=String(int(10,99,e.source)),a=pick(g.split(``),e.source)??`!`,o=`${t}${r}${i}${a}`;if(o.length<=n)return o+alphanumeric(n-o.length,e.source);let s=`${i}${a}`,c=n-s.length,l=s+(c>0?(t+r).slice(0,c):``);return l.length<n?l+alphanumeric(n-l.length,e.source):l.slice(0,n)}let r=`ABCDEFGHIJKLMNOPQRSTUVWXYZ`,i=`abcdefghijklmnopqrstuvwxyz`,a=`0123456789`,o=[r,i,a,g],s=[];for(let t of o)s.push(pick(t.split(``),e.source));let c=r+i+a+g;for(;s.length<n;)s.push(pick(c.split(``),e.source));for(let t=s.length-1;t>0;t--){let n=int(0,t,e.source);[s[t],s[n]]=[s[n],s[t]]}return s.slice(0,n).join(``)}function url(e){let t=pick(m.protocols,e.source)??`https`,n=`${pick([`www`,`api`,`app`,`mail`,`static`,`cdn`],e.source)??`www`}.${pick(m.domains,e.source)??`example`}.${pick(m.tlds,e.source)??`com`}`,r=int(1,4,e.source),i=[];for(let t=0;t<r;t++){let t=pick(_,e.source)??`api`;int(0,2,e.source)===0?i.push(`${t}-${alphanumeric(int(2,5),e.source).toLowerCase()}`):i.push(t)}return`${t}://${n}/${i.join(`/`)}`}function domainName(e){return`${pick(m.domains,e.source)??`example`}.${pick(m.tlds,e.source)??`com`}`}function ip(e,t=4){if(t===6){let t=[];for(let n=0;n<8;n++)t.push(hexString(4,e.source));return t.join(`:`)}let n=[];for(let t=0;t<4;t++)n.push(int(0,255,e.source));return n.join(`.`)}function mac(e){let t=[];for(let n=0;n<6;n++)t.push(hexString(2,e.source));return t.join(`:`)}function userAgent(e){return pick(m.userAgents,e.source)??m.userAgents[0]}function httpMethod(e){return pick(m.httpMethods,e.source)??`GET`}function statusCode(e){return pick(m.statusCodes,e.source)??200}function mimeType(e){return pick(m.mimeTypes,e.source)??`text/plain`}var v=__exportAll({city:()=>city,country:()=>country,latitude:()=>latitude,longitude:()=>longitude,nearbyGPSCoordinate:()=>nearbyGPSCoordinate,state:()=>state,street:()=>street,streetAddress:()=>streetAddress,zipCode:()=>zipCode});function data$1(e){return e.locale.location}function city(e){return pick(data$1(e).cities,e.source)}function street(e){return pick(data$1(e).streets,e.source)}function streetAddress(e){return`${Math.floor(float(1,1e3,e.source))} ${street(e)}`}function zipCode(e){return data$1(e).zipPattern.replace(/#/g,()=>String(Math.floor((0,n.randomFloat)(e.source)*10)))}function state(e){return pick(data$1(e).states,e.source)}function country(e){return pick(data$1(e).countries,e.source)}function latitude(e){return float(-90,90,e.source)}function longitude(e){return float(-180,180,e.source)}function nearbyGPSCoordinate(e,t){let n=t??{lat:latitude(e),lng:longitude(e)};return{lat:float(n.lat-1,n.lat+1,e.source),lng:float(n.lng-1,n.lng+1,e.source)}}var y={words:`lorem.ipsum.dolor.sit.amet.consectetur.adipiscing.elit.sed.do.eiusmod.tempor.incididunt.ut.labore.et.dolore.magna.aliqua.enim.ad.minim.veniam.quis.nostrud.exercitation.ullamco.laboris.nisi.aliquip.ex.ea.commodo.consequat.duis.aute.irure.in.reprehenderit.voluptate.velit.esse.cillum.fugiat.nulla.pariatur.excepteur.sint.occaecat.cupidatat.non.proident.sunt.culpa.qui.officia.deserunt.mollit.anim.id.est.laborum`.split(`.`)},b=__exportAll({lines:()=>lines,paragraph:()=>paragraph,paragraphs:()=>paragraphs,sentence:()=>sentence,sentences:()=>sentences,slug:()=>slug,word:()=>word,words:()=>words});function word(e){return pick(y.words,e.source)}function words(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(word(e));return n.join(` `)}function sentence(e,t){let n=words(e,t??Math.floor(float(6,13,e.source)));return`${n.charAt(0).toUpperCase()}${n.slice(1)}.`}function sentences(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(sentence(e));return n.join(` `)}function paragraph(e,t){return sentences(e,t??Math.floor(float(3,8,e.source)))}function paragraphs(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(paragraph(e));return n.join(`
2
+ `)}function slug(e,t=3){let n=[];for(let r=0;r<t;r++)n.push(word(e));return n.join(`-`)}function lines(e,t=5){let n=[];for(let r=0;r<t;r++)n.push(sentence(e));return n.join(`
3
+ `)}function boolean(e,t=.5){return(0,n.randomFloat)(e)<t}var x=__exportAll({firstName:()=>firstName,fullName:()=>fullName,gender:()=>gender,jobTitle:()=>jobTitle,lastName:()=>lastName,prefix:()=>prefix,suffix:()=>suffix});function data(e){return e.locale.person}function firstName(e){let t=data(e);return pick(boolean(e.source)?t.firstNameMale:t.firstNameFemale,e.source)}function lastName(e){return pick(data(e).lastName,e.source)}function fullName(e){return`${firstName(e)} ${lastName(e)}`}function gender(e){return pick(data(e).gender,e.source)}function prefix(e){return pick(data(e).prefix,e.source)}function suffix(e){let t=data(e);return t.suffix.length===0?``:pick(t.suffix,e.source)}function jobTitle(e){let t=data(e);return`${pick(t.jobAreas,e.source)} ${pick(t.jobTypes,e.source)}`}function mulberry32(e){let t=e>>>0;return{next(){t=t+1831565813>>>0;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}}function createSeed(e){if(e==null)return cryptoSource();if(typeof e==`number`){if(!Number.isFinite(e))throw new IllusionistSeedError(`createSeed: numeric seed must be finite, got ${e}`);return mulberry32(Math.trunc(e))}let t=JSON.stringify(e),n=0;for(let e=0;e<t.length;e++)n=Math.imul(n,31)+t.charCodeAt(e)>>>0;return mulberry32(n)}function cryptoSource(){return{next(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967296}}}var S={cronExpressions:[`0 * * * *`,`0 0 * * *`,`0 0 * * 0`,`*/5 * * * *`,`0 12 * * 1-5`,`0 0 1 * *`,`0 0 1 1 *`,`0 3 * * *`,`30 7 * * 1-5`,`0 18 * * 5`],directories:[`src`,`dist`,`build`,`lib`,`test`,`docs`,`config`,`assets`,`public`,`private`,`tmp`,`cache`,`var`,`opt`,`etc`],fileExtensions:`txt.pdf.doc.docx.xls.xlsx.ppt.pptx.jpg.png.gif.svg.webp.ico.mp3.wav.flac.ogg.mp4.avi.mkv.webm.zip.tar.gz.rar.7z.js.ts.json.xml.html.css.md.py.java.go.rs.c.cpp`.split(`.`),fileNames:[`document`,`report`,`summary`,`notes`,`draft`,`config`,`readme`,`index`,`main`,`app`,`data`,`backup`,`export`,`import`,`log`],mimeTypes:{avi:`video/x-msvideo`,css:`text/css`,gif:`image/gif`,gz:`application/gzip`,html:`text/html`,jpeg:`image/jpeg`,jpg:`image/jpeg`,js:`application/javascript`,json:`application/json`,mp3:`audio/mpeg`,mp4:`video/mp4`,pdf:`application/pdf`,png:`image/png`,svg:`image/svg+xml`,tar:`application/x-tar`,txt:`text/plain`,wav:`audio/wav`,webp:`image/webp`,xml:`application/xml`,zip:`application/zip`}},C=__exportAll({cron:()=>cron,fileExtension:()=>fileExtension,fileName:()=>fileName,filePath:()=>filePath,mimeType:()=>mimeType$1,port:()=>port,process:()=>process,semver:()=>semver,uuid:()=>uuid});function fileExtension(e){return pick(S.fileExtensions,e.source)}function fileName(e){return`${pick(S.fileNames,e.source)}.${fileExtension(e)}`}function filePath(e){let t=int(1,4,e.source),n=[];for(let r=0;r<t;r++)n.push(pick(S.directories,e.source));return`${n.join(`/`)}/${fileName(e)}`}function mimeType$1(e){return pick(Object.values(S.mimeTypes),e.source)}function semver(e,t){let n=`${int(0,t?.maxMajor??20,e.source)}.${int(0,20,e.source)}.${int(0,99,e.source)}`;if(t?.includePrerelease&&e.source.next()<.3){let t=pick([`alpha`,`beta`,`rc`,`next`],e.source),r=int(1,10,e.source);n+=`-${t}.${r}`}return n}function uuid(){return crypto.randomUUID()}function port(e,t){return int(t?.min??1024,t?.max??65535,e.source)}function cron(e){return pick(S.cronExpressions,e.source)}function process(e){return`${pick([`node`,`python`,`ruby`,`java`,`go`,`rust`,`bash`],e.source)}_${alphanumeric(int(3,8,e.source),e.source)}`}function createIllusion(e){let{locale:t,seed:n}=e,r={locale:t,source:createSeed(n)},bind=e=>{let t={};for(let[n,i]of Object.entries(e))typeof i==`function`&&(t[n]=(...e)=>i(r,...e));return t};return{commerce:bind(a),date:bind(s),finance:bind(l),internet:bind(h),locale:t,location:bind(v),lorem:bind(b),person:bind(x),seed:n,system:bind(C)}}var w={code:`de`,location:{cities:[`Berlin`,`Hamburg`,`München`,`Köln`,`Frankfurt am Main`,`Stuttgart`,`Düsseldorf`,`Leipzig`,`Dortmund`,`Essen`,`Bremen`,`Dresden`,`Hannover`,`Nürnberg`,`Duisburg`,`Bochum`,`Wuppertal`,`Bielefeld`,`Bonn`,`Münster`],countries:[`Deutschland`,`Österreich`,`Schweiz`,`Frankreich`,`Italien`,`Spanien`,`Niederlande`,`Belgien`,`Polen`,`Tschechien`,`Dänemark`,`Schweden`,`Norwegen`,`Finnland`,`Portugal`],states:[`Baden-Württemberg`,`Bayern`,`Berlin`,`Brandenburg`,`Bremen`,`Hamburg`,`Hessen`,`Mecklenburg-Vorpommern`,`Niedersachsen`,`Nordrhein-Westfalen`,`Rheinland-Pfalz`,`Saarland`,`Sachsen`,`Sachsen-Anhalt`,`Schleswig-Holstein`,`Thüringen`],streets:[`Hauptstraße`,`Schulstraße`,`Bahnhofstraße`,`Gartenstraße`,`Bergstraße`,`Dorfstraße`,`Lindenstraße`,`Goethestraße`,`Schillerstraße`,`Mozartstraße`,`Bahnhofplatz`,`Marktplatz`,`Kirchplatz`,`Schlossplatz`,`Waldrand`],zipPattern:`#####`},person:{firstNameFemale:`Mia.Emma.Sophia.Hannah.Emilia.Lina.Ella.Marie.Clara.Lena.Lea.Lilly.Anna.Ida.Mila.Luisa.Nora.Greta.Frieda.Johanna.Lotte.Charlotte.Mathilda.Lara.Sarah.Julia.Laura.Lisa.Katharina.Sabine.Andrea.Petra.Susanne.Nicole.Stefanie.Christina.Tanja.Birgit.Monika.Ursula.Helga.Ingrid.Brigitte.Gisela.Renate.Angelika.Claudia.Sandra.Beate.Klara`.split(`.`),firstNameMale:`Ben.Paul.Leon.Finn.Elias.Jonas.Felix.Maximilian.Max.Luca.Noah.Henry.Lukas.Moritz.David.Niklas.Philipp.Julian.Tim.Tom.Simon.Alexander.Liam.Emil.Daniel.Sebastian.Matteo.Fabian.Jakob.Tobias.Florian.Marvin.Anton.Johannes.Stefan.Andreas.Michael.Thomas.Christian.Klaus.Peter.Wolfgang.Jürgen.Frank.Hans.Martin.Rolf.Bernd.Uwe.Karl`.split(`.`),gender:[`Männlich`,`Weiblich`,`Nicht-binär`,`Divers`],jobAreas:[`Finanzen`,`IT`,`Marketing`,`Vertrieb`,`Personalwesen`,`Betrieb`,`Ingenieurwesen`,`Forschung`,`Design`,`Recht`,`Kundenservice`,`Produkt`,`Logistik`,`Buchhaltung`,`Öffentlichkeitsarbeit`,`Qualitätssicherung`,`Daten`,`Sicherheit`,`Kommunikation`,`Verwaltung`],jobTypes:[`Ingenieur`,`Manager`,`Analyst`,`Spezialist`,`Koordinator`,`Direktor`,`Berater`,`Entwickler`,`Architekt`,`Administrator`,`Beamter`,`Mitarbeiter`,`Aufseher`,`Techniker`,`Assistent`],lastName:`Müller.Schmidt.Schneider.Fischer.Weber.Meyer.Wagner.Becker.Schulz.Hoffmann.Schäfer.Koch.Bauer.Richter.Klein.Wolf.Schröder.Neumann.Schwarz.Zimmermann.Braun.Krüger.Hofmann.Hartmann.Lange.Schmitt.Werner.Krause.Lehmann.Schmid.Schulze.Maier.Köhler.Herrmann.König.Walter.Mayer.Huber.Kaiser.Fuchs.Peters.Lang.Scholz.Möller.Weiß.Jung.Hahn.Schubert.Vogel.Friedrich`.split(`.`),prefix:[`Herr`,`Frau`,`Dr.`,`Prof.`],suffix:[]}},T={code:`en`,location:{cities:[`New York`,`Los Angeles`,`Chicago`,`Houston`,`Phoenix`,`Philadelphia`,`San Antonio`,`San Diego`,`Dallas`,`San Jose`,`Austin`,`Jacksonville`,`Fort Worth`,`Columbus`,`Charlotte`,`San Francisco`,`Indianapolis`,`Seattle`,`Denver`,`Boston`],countries:[`United States`,`United Kingdom`,`Germany`,`France`,`Italy`,`Spain`,`Netherlands`,`Belgium`,`Switzerland`,`Austria`,`Canada`,`Australia`,`Japan`,`Brazil`,`India`],states:`Alabama.Alaska.Arizona.Arkansas.California.Colorado.Connecticut.Delaware.Florida.Georgia.Hawaii.Idaho.Illinois.Indiana.Iowa.Kansas.Kentucky.Louisiana.Maine.Maryland.Massachusetts.Michigan.Minnesota.Mississippi.Missouri.Montana.Nebraska.Nevada.New Hampshire.New Jersey.New Mexico.New York.North Carolina.North Dakota.Ohio.Oklahoma.Oregon.Pennsylvania.Rhode Island.South Carolina.South Dakota.Tennessee.Texas.Utah.Vermont.Virginia.Washington.West Virginia.Wisconsin.Wyoming`.split(`.`),streets:[`Main St`,`Oak Ave`,`Maple Dr`,`Cedar Ln`,`Pine Rd`,`Elm St`,`Washington Blvd`,`Park Ave`,`Lake Dr`,`Hill Rd`,`River Rd`,`Spring St`,`Forest Dr`,`Sunset Blvd`,`Highland Ave`],zipPattern:`#####`},person:{firstNameFemale:`Mary.Patricia.Jennifer.Linda.Elizabeth.Barbara.Susan.Jessica.Sarah.Karen.Lisa.Nancy.Betty.Margaret.Sandra.Ashley.Kimberly.Emily.Donna.Michelle.Carol.Amanda.Dorothy.Melissa.Deborah.Stephanie.Rebecca.Sharon.Laura.Cynthia.Kathleen.Amy.Shirley.Angela.Helen.Anna.Brenda.Pamela.Nicole.Emma.Samantha.Katherine.Christine.Debra.Rachel.Catherine.Carolyn.Janet.Ruth.Maria`.split(`.`),firstNameMale:`James.John.Robert.Michael.William.David.Richard.Joseph.Thomas.Charles.Christopher.Daniel.Matthew.Anthony.Mark.Donald.Steven.Paul.Andrew.Joshua.Kenneth.Kevin.Brian.George.Edward.Ronald.Timothy.Jason.Jeffrey.Ryan.Jacob.Gary.Nicholas.Eric.Jonathan.Stephen.Larry.Justin.Scott.Brandon.Benjamin.Samuel.Gregory.Frank.Alexander.Raymond.Patrick.Jack.Dennis.Jerry`.split(`.`),gender:[`Male`,`Female`,`Non-binary`,`Other`],jobAreas:[`Finance`,`IT`,`Marketing`,`Sales`,`Human Resources`,`Operations`,`Engineering`,`Research`,`Design`,`Legal`,`Customer Support`,`Product`,`Logistics`,`Accounting`,`Public Relations`,`Quality Assurance`,`Data`,`Security`,`Communications`,`Administration`],jobTypes:[`Engineer`,`Manager`,`Analyst`,`Specialist`,`Coordinator`,`Director`,`Consultant`,`Developer`,`Architect`,`Administrator`,`Officer`,`Representative`,`Supervisor`,`Technician`,`Assistant`],lastName:`Smith.Johnson.Williams.Brown.Jones.Garcia.Miller.Davis.Rodriguez.Martinez.Hernandez.Lopez.Gonzalez.Wilson.Anderson.Thomas.Taylor.Moore.Jackson.Martin.Lee.Perez.Thompson.White.Harris.Sanchez.Clark.Ramirez.Lewis.Robinson.Walker.Young.Allen.King.Wright.Scott.Torres.Nguyen.Hill.Flores.Green.Adams.Nelson.Baker.Hall.Rivera.Campbell.Mitchell.Carter.Roberts`.split(`.`),prefix:[`Mr.`,`Mrs.`,`Ms.`,`Dr.`,`Prof.`],suffix:[`Jr.`,`Sr.`,`II`,`III`,`IV`,`PhD`]}};exports.IllusionistError=IllusionistError,exports.IllusionistSeedError=IllusionistSeedError,exports.amount=amount,exports.bank=bank,exports.between=between,exports.bic=bic,exports.birthday=birthday,exports.bitcoinAddress=bitcoinAddress,exports.city=city,exports.country=country,exports.createIllusion=createIllusion,exports.createSeed=createSeed,exports.creditCardCVV=creditCardCVV,exports.creditCardNumber=creditCardNumber,exports.de=w,exports.department=department,exports.domainName=domainName,exports.email=email,exports.en=T,exports.ethereumAddress=ethereumAddress,exports.firstName=firstName,exports.fullName=fullName,exports.future=future,exports.gender=gender,exports.httpMethod=httpMethod,exports.iban=iban,exports.ip=ip,exports.jobTitle=jobTitle,exports.lastName=lastName,exports.latitude=latitude,exports.lines=lines,exports.longitude=longitude,exports.mac=mac,exports.mimeType=mimeType,exports.month=month,exports.mulberry32=mulberry32,exports.nearbyGPSCoordinate=nearbyGPSCoordinate,exports.paragraph=paragraph,exports.paragraphs=paragraphs,exports.password=password,exports.past=past,exports.prefix=prefix,exports.price=price,exports.productAdjective=productAdjective,exports.productDescription=productDescription,exports.productMaterial=productMaterial,exports.productName=productName,exports.productNoun=productNoun,exports.recent=recent,exports.sentence=sentence,exports.sentences=sentences,exports.slug=slug,exports.state=state,exports.statusCode=statusCode,exports.street=street,exports.streetAddress=streetAddress,exports.suffix=suffix,exports.transactionType=transactionType,exports.url=url,exports.userAgent=userAgent,exports.username=username,exports.weekday=weekday,exports.word=word,exports.words=words,exports.zipCode=zipCode;
4
4
  //# sourceMappingURL=illusionist.cjs.map