kaabalah 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +88 -0
- package/dist/astrology/index.d.mts +104 -0
- package/dist/astrology/index.d.ts +104 -0
- package/dist/astrology/index.js +3476 -0
- package/dist/astrology/index.js.map +1 -0
- package/dist/astrology/index.mjs +3461 -0
- package/dist/astrology/index.mjs.map +1 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +4844 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +4820 -0
- package/dist/index.mjs.map +1 -0
- package/dist/kaabalah/index.d.mts +22 -0
- package/dist/kaabalah/index.d.ts +22 -0
- package/dist/kaabalah/index.js +419 -0
- package/dist/kaabalah/index.js.map +1 -0
- package/dist/kaabalah/index.mjs +394 -0
- package/dist/kaabalah/index.mjs.map +1 -0
- package/dist/numerology/index.d.mts +41 -0
- package/dist/numerology/index.d.ts +41 -0
- package/dist/numerology/index.js +188 -0
- package/dist/numerology/index.js.map +1 -0
- package/dist/numerology/index.mjs +161 -0
- package/dist/numerology/index.mjs.map +1 -0
- package/dist/tarot/index.d.mts +29 -0
- package/dist/tarot/index.d.ts +29 -0
- package/dist/tarot/index.js +829 -0
- package/dist/tarot/index.js.map +1 -0
- package/dist/tarot/index.mjs +802 -0
- package/dist/tarot/index.mjs.map +1 -0
- package/ephe/seas_18.se1 +0 -0
- package/ephe/semo_18.se1 +0 -0
- package/ephe/sepl_18.se1 +0 -0
- package/package.json +86 -0
- package/wasm/build/swisseph.d.ts +12 -0
- package/wasm/build/swisseph.js +30 -0
- package/wasm/build/swisseph.wasm +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kaabalah-related functions
|
|
3
|
+
*/
|
|
4
|
+
declare const calculateGematria: (word: string) => {
|
|
5
|
+
vowels: {
|
|
6
|
+
originalSum: number;
|
|
7
|
+
reductionSteps: number[];
|
|
8
|
+
finalValue: number;
|
|
9
|
+
};
|
|
10
|
+
consonants: {
|
|
11
|
+
originalSum: number;
|
|
12
|
+
reductionSteps: number[];
|
|
13
|
+
finalValue: number;
|
|
14
|
+
};
|
|
15
|
+
synthesis: {
|
|
16
|
+
originalSum: number;
|
|
17
|
+
reductionSteps: number[];
|
|
18
|
+
finalValue: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { calculateGematria };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Kaabalah-related functions
|
|
3
|
+
*/
|
|
4
|
+
declare const calculateGematria: (word: string) => {
|
|
5
|
+
vowels: {
|
|
6
|
+
originalSum: number;
|
|
7
|
+
reductionSteps: number[];
|
|
8
|
+
finalValue: number;
|
|
9
|
+
};
|
|
10
|
+
consonants: {
|
|
11
|
+
originalSum: number;
|
|
12
|
+
reductionSteps: number[];
|
|
13
|
+
finalValue: number;
|
|
14
|
+
};
|
|
15
|
+
synthesis: {
|
|
16
|
+
originalSum: number;
|
|
17
|
+
reductionSteps: number[];
|
|
18
|
+
finalValue: number;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export { calculateGematria };
|
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/kaabalah/index.ts
|
|
21
|
+
var kaabalah_exports = {};
|
|
22
|
+
__export(kaabalah_exports, {
|
|
23
|
+
calculateGematria: () => calculateGematria
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(kaabalah_exports);
|
|
26
|
+
var hebrewLetterMapping = /* @__PURE__ */ new Map([
|
|
27
|
+
[
|
|
28
|
+
"A",
|
|
29
|
+
{
|
|
30
|
+
letter: "A",
|
|
31
|
+
hebrewName: "Aleph",
|
|
32
|
+
hebrewCharacter: "\u05D0",
|
|
33
|
+
numericValue: 1,
|
|
34
|
+
majorArcana: 1
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
[
|
|
38
|
+
"B",
|
|
39
|
+
{
|
|
40
|
+
letter: "B",
|
|
41
|
+
hebrewName: "Beth",
|
|
42
|
+
hebrewCharacter: "\u05D1",
|
|
43
|
+
numericValue: 2,
|
|
44
|
+
majorArcana: 2
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"G",
|
|
49
|
+
{
|
|
50
|
+
letter: "G",
|
|
51
|
+
hebrewName: "Gimel",
|
|
52
|
+
hebrewCharacter: "\u05D2",
|
|
53
|
+
numericValue: 3,
|
|
54
|
+
majorArcana: 3
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
"D",
|
|
59
|
+
{
|
|
60
|
+
letter: "D",
|
|
61
|
+
hebrewName: "Daleth",
|
|
62
|
+
hebrewCharacter: "\u05D3",
|
|
63
|
+
numericValue: 4,
|
|
64
|
+
majorArcana: 4
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
[
|
|
68
|
+
"E",
|
|
69
|
+
{
|
|
70
|
+
letter: "E",
|
|
71
|
+
hebrewName: "He",
|
|
72
|
+
hebrewCharacter: "\u05D4",
|
|
73
|
+
numericValue: 5,
|
|
74
|
+
majorArcana: 5
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"V",
|
|
79
|
+
{
|
|
80
|
+
letter: "V",
|
|
81
|
+
hebrewName: "Vav",
|
|
82
|
+
hebrewCharacter: "\u05D5",
|
|
83
|
+
numericValue: 6,
|
|
84
|
+
majorArcana: 6
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"U",
|
|
89
|
+
{
|
|
90
|
+
letter: "U",
|
|
91
|
+
hebrewName: "Vav",
|
|
92
|
+
hebrewCharacter: "\u05D5",
|
|
93
|
+
numericValue: 6,
|
|
94
|
+
majorArcana: 6
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
[
|
|
98
|
+
"W",
|
|
99
|
+
{
|
|
100
|
+
letter: "W",
|
|
101
|
+
hebrewName: "Vav",
|
|
102
|
+
hebrewCharacter: "\u05D5",
|
|
103
|
+
numericValue: 6,
|
|
104
|
+
majorArcana: 6
|
|
105
|
+
}
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"Z",
|
|
109
|
+
{
|
|
110
|
+
letter: "Z",
|
|
111
|
+
hebrewName: "Zayin",
|
|
112
|
+
hebrewCharacter: "\u05D6",
|
|
113
|
+
numericValue: 7,
|
|
114
|
+
majorArcana: 7
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
"H",
|
|
119
|
+
{
|
|
120
|
+
letter: "H",
|
|
121
|
+
hebrewName: "Cheth",
|
|
122
|
+
hebrewCharacter: "\u05D7",
|
|
123
|
+
numericValue: 8,
|
|
124
|
+
majorArcana: 8
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"T",
|
|
129
|
+
{
|
|
130
|
+
letter: "T",
|
|
131
|
+
hebrewName: "Teth",
|
|
132
|
+
hebrewCharacter: "\u05D8",
|
|
133
|
+
numericValue: 9,
|
|
134
|
+
majorArcana: 9
|
|
135
|
+
}
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
"TH",
|
|
139
|
+
{
|
|
140
|
+
letter: "Th",
|
|
141
|
+
hebrewName: "Tav",
|
|
142
|
+
hebrewCharacter: "\u05EA",
|
|
143
|
+
numericValue: 400,
|
|
144
|
+
majorArcana: 22
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
"TZ",
|
|
149
|
+
{
|
|
150
|
+
letter: "Tz",
|
|
151
|
+
hebrewName: "Tzaddi",
|
|
152
|
+
hebrewCharacter: "\u05E6",
|
|
153
|
+
numericValue: 90,
|
|
154
|
+
numericValueWhenEnding: 900,
|
|
155
|
+
majorArcana: 18
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
[
|
|
159
|
+
"I",
|
|
160
|
+
{
|
|
161
|
+
letter: "I",
|
|
162
|
+
hebrewName: "Yod",
|
|
163
|
+
hebrewCharacter: "\u05D9",
|
|
164
|
+
numericValue: 10,
|
|
165
|
+
majorArcana: 10
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
[
|
|
169
|
+
"J",
|
|
170
|
+
{
|
|
171
|
+
letter: "J",
|
|
172
|
+
hebrewName: "Yod",
|
|
173
|
+
hebrewCharacter: "\u05D9",
|
|
174
|
+
numericValue: 10,
|
|
175
|
+
majorArcana: 10
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
[
|
|
179
|
+
"Y",
|
|
180
|
+
{
|
|
181
|
+
letter: "Y",
|
|
182
|
+
hebrewName: "Yod",
|
|
183
|
+
hebrewCharacter: "\u05D9",
|
|
184
|
+
numericValue: 10,
|
|
185
|
+
majorArcana: 10
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
[
|
|
189
|
+
"C",
|
|
190
|
+
{
|
|
191
|
+
letter: "C",
|
|
192
|
+
hebrewName: "Kaph",
|
|
193
|
+
hebrewCharacter: "\u05DB",
|
|
194
|
+
numericValue: 20,
|
|
195
|
+
numericValueWhenEnding: 500,
|
|
196
|
+
majorArcana: 11
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
[
|
|
200
|
+
"L",
|
|
201
|
+
{
|
|
202
|
+
letter: "L",
|
|
203
|
+
hebrewName: "Lamed",
|
|
204
|
+
hebrewCharacter: "\u05DC",
|
|
205
|
+
numericValue: 30,
|
|
206
|
+
majorArcana: 12
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
[
|
|
210
|
+
"M",
|
|
211
|
+
{
|
|
212
|
+
letter: "M",
|
|
213
|
+
hebrewName: "Mem",
|
|
214
|
+
hebrewCharacter: "\u05DE",
|
|
215
|
+
numericValue: 40,
|
|
216
|
+
numericValueWhenEnding: 600,
|
|
217
|
+
majorArcana: 13
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
"N",
|
|
222
|
+
{
|
|
223
|
+
letter: "N",
|
|
224
|
+
hebrewName: "Nun",
|
|
225
|
+
hebrewCharacter: "\u05E0",
|
|
226
|
+
numericValue: 50,
|
|
227
|
+
numericValueWhenEnding: 700,
|
|
228
|
+
majorArcana: 14
|
|
229
|
+
}
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
"S",
|
|
233
|
+
{
|
|
234
|
+
letter: "S",
|
|
235
|
+
hebrewName: "Samekh",
|
|
236
|
+
hebrewCharacter: "\u05E1",
|
|
237
|
+
numericValue: 60,
|
|
238
|
+
majorArcana: 15
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
[
|
|
242
|
+
"SH",
|
|
243
|
+
{
|
|
244
|
+
letter: "Sh",
|
|
245
|
+
hebrewName: "Shin",
|
|
246
|
+
hebrewCharacter: "\u05E9",
|
|
247
|
+
numericValue: 300,
|
|
248
|
+
majorArcana: 21
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
[
|
|
252
|
+
"\xC7",
|
|
253
|
+
{
|
|
254
|
+
letter: "\xC7",
|
|
255
|
+
hebrewName: "Samekh",
|
|
256
|
+
hebrewCharacter: "\u05E1",
|
|
257
|
+
numericValue: 60,
|
|
258
|
+
majorArcana: 15
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
[
|
|
262
|
+
"O",
|
|
263
|
+
{
|
|
264
|
+
letter: "O",
|
|
265
|
+
hebrewName: "Ayin",
|
|
266
|
+
hebrewCharacter: "\u05E2",
|
|
267
|
+
numericValue: 6,
|
|
268
|
+
numericValueWhenStarting: 70,
|
|
269
|
+
majorArcana: 16
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
[
|
|
273
|
+
"P",
|
|
274
|
+
{
|
|
275
|
+
letter: "P",
|
|
276
|
+
hebrewName: "Pe",
|
|
277
|
+
hebrewCharacter: "\u05E4",
|
|
278
|
+
numericValue: 80,
|
|
279
|
+
numericValueWhenEnding: 800,
|
|
280
|
+
majorArcana: 17
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
[
|
|
284
|
+
"PH",
|
|
285
|
+
{
|
|
286
|
+
letter: "Ph",
|
|
287
|
+
hebrewName: "Pe",
|
|
288
|
+
hebrewCharacter: "\u05E4",
|
|
289
|
+
numericValue: 80,
|
|
290
|
+
majorArcana: 17
|
|
291
|
+
}
|
|
292
|
+
],
|
|
293
|
+
[
|
|
294
|
+
"K",
|
|
295
|
+
{
|
|
296
|
+
letter: "K",
|
|
297
|
+
hebrewName: "Qoph",
|
|
298
|
+
hebrewCharacter: "\u05E7",
|
|
299
|
+
numericValue: 100,
|
|
300
|
+
majorArcana: 19
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
[
|
|
304
|
+
"KH",
|
|
305
|
+
{
|
|
306
|
+
letter: "Kh",
|
|
307
|
+
hebrewName: "Qoph",
|
|
308
|
+
hebrewCharacter: "\u05E7",
|
|
309
|
+
numericValue: 100,
|
|
310
|
+
majorArcana: 19
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
[
|
|
314
|
+
"Q",
|
|
315
|
+
{
|
|
316
|
+
letter: "Q",
|
|
317
|
+
hebrewName: "Qoph",
|
|
318
|
+
hebrewCharacter: "\u05E7",
|
|
319
|
+
numericValue: 100,
|
|
320
|
+
majorArcana: 19
|
|
321
|
+
}
|
|
322
|
+
],
|
|
323
|
+
[
|
|
324
|
+
"R",
|
|
325
|
+
{
|
|
326
|
+
letter: "R",
|
|
327
|
+
hebrewName: "Resh",
|
|
328
|
+
hebrewCharacter: "\u05E8",
|
|
329
|
+
numericValue: 200,
|
|
330
|
+
majorArcana: 20
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
[
|
|
334
|
+
"X",
|
|
335
|
+
{
|
|
336
|
+
letter: "X",
|
|
337
|
+
hebrewName: "Shin",
|
|
338
|
+
hebrewCharacter: "\u05E9",
|
|
339
|
+
numericValue: 300,
|
|
340
|
+
majorArcana: 21
|
|
341
|
+
}
|
|
342
|
+
]
|
|
343
|
+
]);
|
|
344
|
+
var reduceToSingleDigitWithSteps = (num) => {
|
|
345
|
+
const steps = [num];
|
|
346
|
+
let currentNum = num;
|
|
347
|
+
while (currentNum > 9) {
|
|
348
|
+
currentNum = String(currentNum).split("").reduce((acc, digit) => acc + parseInt(digit), 0);
|
|
349
|
+
steps.push(currentNum);
|
|
350
|
+
}
|
|
351
|
+
return {
|
|
352
|
+
steps,
|
|
353
|
+
finalValue: currentNum
|
|
354
|
+
};
|
|
355
|
+
};
|
|
356
|
+
var isVowel = (letter) => {
|
|
357
|
+
return ["A", "E", "I", "O", "U", "Y"].includes(letter);
|
|
358
|
+
};
|
|
359
|
+
var calculateGematria = (word) => {
|
|
360
|
+
const letters = word.toUpperCase().split("");
|
|
361
|
+
let vowelsSum = 0;
|
|
362
|
+
let consonantsSum = 0;
|
|
363
|
+
for (let i = 0; i < letters.length; i++) {
|
|
364
|
+
const letter = letters[i];
|
|
365
|
+
const nextLetter = letters[i + 1] || "";
|
|
366
|
+
const isStarting = i === 0;
|
|
367
|
+
const isEnding = i > 0 && i === letters.length - 1;
|
|
368
|
+
if (["P", "T", "K", "S"].includes(letter) && nextLetter) {
|
|
369
|
+
const combinedLetter = (letter + nextLetter).toUpperCase();
|
|
370
|
+
if (hebrewLetterMapping.has(combinedLetter)) {
|
|
371
|
+
const value = hebrewLetterMapping.get(combinedLetter).numericValue;
|
|
372
|
+
consonantsSum += value;
|
|
373
|
+
i++;
|
|
374
|
+
continue;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
const mapping = hebrewLetterMapping.get(letter);
|
|
378
|
+
if (mapping) {
|
|
379
|
+
let value = mapping.numericValue;
|
|
380
|
+
if (isStarting && mapping.numericValueWhenStarting !== void 0) {
|
|
381
|
+
value = mapping.numericValueWhenStarting;
|
|
382
|
+
} else if (isEnding && mapping.numericValueWhenEnding !== void 0) {
|
|
383
|
+
value = mapping.numericValueWhenEnding;
|
|
384
|
+
}
|
|
385
|
+
if (isVowel(letter)) {
|
|
386
|
+
vowelsSum += value;
|
|
387
|
+
} else {
|
|
388
|
+
consonantsSum += value;
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
const vowelsReduction = reduceToSingleDigitWithSteps(vowelsSum);
|
|
393
|
+
const consonantsReduction = reduceToSingleDigitWithSteps(consonantsSum);
|
|
394
|
+
const synthesisReduction = reduceToSingleDigitWithSteps(
|
|
395
|
+
vowelsReduction.finalValue + consonantsReduction.finalValue
|
|
396
|
+
);
|
|
397
|
+
return {
|
|
398
|
+
vowels: {
|
|
399
|
+
originalSum: vowelsSum,
|
|
400
|
+
reductionSteps: vowelsReduction.steps,
|
|
401
|
+
finalValue: vowelsReduction.finalValue
|
|
402
|
+
},
|
|
403
|
+
consonants: {
|
|
404
|
+
originalSum: consonantsSum,
|
|
405
|
+
reductionSteps: consonantsReduction.steps,
|
|
406
|
+
finalValue: consonantsReduction.finalValue
|
|
407
|
+
},
|
|
408
|
+
synthesis: {
|
|
409
|
+
originalSum: vowelsReduction.finalValue + consonantsReduction.finalValue,
|
|
410
|
+
reductionSteps: synthesisReduction.steps,
|
|
411
|
+
finalValue: synthesisReduction.finalValue
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
416
|
+
0 && (module.exports = {
|
|
417
|
+
calculateGematria
|
|
418
|
+
});
|
|
419
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/kaabalah/index.ts"],"sourcesContent":["/**\n * Kaabalah-related functions\n */\n\nconst hebrewLetterMapping = new Map([\n [\n \"A\",\n {\n letter: \"A\",\n hebrewName: \"Aleph\",\n hebrewCharacter: \"א\",\n numericValue: 1,\n majorArcana: 1\n }\n ],\n [\n \"B\",\n {\n letter: \"B\",\n hebrewName: \"Beth\",\n hebrewCharacter: \"ב\",\n numericValue: 2,\n majorArcana: 2\n }\n ],\n [\n \"G\",\n {\n letter: \"G\",\n hebrewName: \"Gimel\",\n hebrewCharacter: \"ג\",\n numericValue: 3,\n majorArcana: 3\n }\n ],\n [\n \"D\",\n {\n letter: \"D\",\n hebrewName: \"Daleth\",\n hebrewCharacter: \"ד\",\n numericValue: 4,\n majorArcana: 4\n }\n ],\n [\n \"E\",\n {\n letter: \"E\",\n hebrewName: \"He\",\n hebrewCharacter: \"ה\",\n numericValue: 5,\n majorArcana: 5\n }\n ],\n [\n \"V\",\n {\n letter: \"V\",\n hebrewName: \"Vav\",\n hebrewCharacter: \"ו\",\n numericValue: 6,\n majorArcana: 6\n }\n ],\n [\n \"U\",\n {\n letter: \"U\",\n hebrewName: \"Vav\",\n hebrewCharacter: \"ו\",\n numericValue: 6,\n majorArcana: 6\n }\n ],\n [\n \"W\",\n {\n letter: \"W\",\n hebrewName: \"Vav\",\n hebrewCharacter: \"ו\",\n numericValue: 6,\n majorArcana: 6\n }\n ],\n [\n \"Z\",\n {\n letter: \"Z\",\n hebrewName: \"Zayin\",\n hebrewCharacter: \"ז\",\n numericValue: 7,\n majorArcana: 7\n }\n ],\n [\n \"H\",\n {\n letter: \"H\",\n hebrewName: \"Cheth\",\n hebrewCharacter: \"ח\",\n numericValue: 8,\n majorArcana: 8\n }\n ],\n [\n \"T\",\n {\n letter: \"T\",\n hebrewName: \"Teth\",\n hebrewCharacter: \"ט\",\n numericValue: 9,\n majorArcana: 9\n }\n ],\n [\n \"TH\",\n {\n letter: \"Th\",\n hebrewName: \"Tav\",\n hebrewCharacter: \"ת\",\n numericValue: 400,\n majorArcana: 22\n }\n ],\n [\n \"TZ\",\n {\n letter: \"Tz\",\n hebrewName: \"Tzaddi\",\n hebrewCharacter: \"צ\",\n numericValue: 90,\n numericValueWhenEnding: 900,\n majorArcana: 18\n }\n ],\n [\n \"I\",\n {\n letter: \"I\",\n hebrewName: \"Yod\",\n hebrewCharacter: \"י\",\n numericValue: 10,\n majorArcana: 10\n }\n ],\n [\n \"J\",\n {\n letter: \"J\",\n hebrewName: \"Yod\",\n hebrewCharacter: \"י\",\n numericValue: 10,\n majorArcana: 10\n }\n ],\n [\n \"Y\",\n {\n letter: \"Y\",\n hebrewName: \"Yod\",\n hebrewCharacter: \"י\",\n numericValue: 10,\n majorArcana: 10\n }\n ],\n [\n \"C\",\n {\n letter: \"C\",\n hebrewName: \"Kaph\",\n hebrewCharacter: \"כ\",\n numericValue: 20,\n numericValueWhenEnding: 500,\n majorArcana: 11\n }\n ],\n [\n \"L\",\n {\n letter: \"L\",\n hebrewName: \"Lamed\",\n hebrewCharacter: \"ל\",\n numericValue: 30,\n majorArcana: 12\n }\n ],\n [\n \"M\",\n {\n letter: \"M\",\n hebrewName: \"Mem\",\n hebrewCharacter: \"מ\",\n numericValue: 40,\n numericValueWhenEnding: 600,\n majorArcana: 13\n }\n ],\n [\n \"N\",\n {\n letter: \"N\",\n hebrewName: \"Nun\",\n hebrewCharacter: \"נ\",\n numericValue: 50,\n numericValueWhenEnding: 700,\n majorArcana: 14\n }\n ],\n [\n \"S\",\n {\n letter: \"S\",\n hebrewName: \"Samekh\",\n hebrewCharacter: \"ס\",\n numericValue: 60,\n majorArcana: 15\n }\n ],\n [\n \"SH\",\n {\n letter: \"Sh\",\n hebrewName: \"Shin\",\n hebrewCharacter: \"ש\",\n numericValue: 300,\n majorArcana: 21\n }\n ],\n [\n \"\\u00C7\",\n {\n letter: \"\\u00C7\",\n hebrewName: \"Samekh\",\n hebrewCharacter: \"ס\",\n numericValue: 60,\n majorArcana: 15\n }\n ],\n [\n \"O\",\n {\n letter: \"O\",\n hebrewName: \"Ayin\",\n hebrewCharacter: \"ע\",\n numericValue: 6,\n numericValueWhenStarting: 70,\n majorArcana: 16\n }\n ],\n [\n \"P\",\n {\n letter: \"P\",\n hebrewName: \"Pe\",\n hebrewCharacter: \"פ\",\n numericValue: 80,\n numericValueWhenEnding: 800,\n majorArcana: 17\n }\n ],\n [\n \"PH\",\n {\n letter: \"Ph\",\n hebrewName: \"Pe\",\n hebrewCharacter: \"פ\",\n numericValue: 80,\n majorArcana: 17\n }\n ],\n [\n \"K\",\n {\n letter: \"K\",\n hebrewName: \"Qoph\",\n hebrewCharacter: \"ק\",\n numericValue: 100,\n majorArcana: 19\n }\n ],\n [\n \"KH\",\n {\n letter: \"Kh\",\n hebrewName: \"Qoph\",\n hebrewCharacter: \"ק\",\n numericValue: 100,\n majorArcana: 19\n }\n ],\n [\n \"Q\",\n {\n letter: \"Q\",\n hebrewName: \"Qoph\",\n hebrewCharacter: \"ק\",\n numericValue: 100,\n majorArcana: 19\n }\n ],\n [\n \"R\",\n {\n letter: \"R\",\n hebrewName: \"Resh\",\n hebrewCharacter: \"ר\",\n numericValue: 200,\n majorArcana: 20\n }\n ],\n [\n \"X\",\n {\n letter: \"X\",\n hebrewName: \"Shin\",\n hebrewCharacter: \"ש\",\n numericValue: 300,\n majorArcana: 21\n }\n ]\n])\n\nconst reduceToSingleDigitWithSteps = (num: number) => {\n const steps = [num]\n let currentNum = num\n\n while (currentNum > 9) {\n currentNum = String(currentNum)\n .split(\"\")\n .reduce((acc, digit) => acc + parseInt(digit), 0)\n steps.push(currentNum)\n }\n\n return {\n steps,\n finalValue: currentNum\n }\n}\n\nconst isVowel = (letter: string) => {\n return [\"A\", \"E\", \"I\", \"O\", \"U\", \"Y\"].includes(letter)\n}\n\nexport const calculateGematria = (word: string) => {\n const letters = word.toUpperCase().split(\"\")\n let vowelsSum = 0\n let consonantsSum = 0\n\n for (let i = 0; i < letters.length; i++) {\n const letter = letters[i]\n const nextLetter = letters[i + 1] || \"\"\n const isStarting = i === 0\n const isEnding = i > 0 && i === letters.length - 1\n\n if ([\"P\", \"T\", \"K\", \"S\"].includes(letter) && nextLetter) {\n const combinedLetter = (letter + nextLetter).toUpperCase()\n\n if (hebrewLetterMapping.has(combinedLetter)) {\n const value = hebrewLetterMapping.get(combinedLetter)!.numericValue\n consonantsSum += value\n i++\n continue\n }\n }\n\n const mapping = hebrewLetterMapping.get(letter)\n\n if (mapping) {\n let value = mapping.numericValue\n if (isStarting && mapping.numericValueWhenStarting !== undefined) {\n value = mapping.numericValueWhenStarting\n } else if (isEnding && mapping.numericValueWhenEnding !== undefined) {\n value = mapping.numericValueWhenEnding\n }\n if (isVowel(letter)) {\n vowelsSum += value\n } else {\n consonantsSum += value\n }\n }\n }\n\n const vowelsReduction = reduceToSingleDigitWithSteps(vowelsSum)\n const consonantsReduction = reduceToSingleDigitWithSteps(consonantsSum)\n const synthesisReduction = reduceToSingleDigitWithSteps(\n vowelsReduction.finalValue + consonantsReduction.finalValue\n )\n\n return {\n vowels: {\n originalSum: vowelsSum,\n reductionSteps: vowelsReduction.steps,\n finalValue: vowelsReduction.finalValue\n },\n consonants: {\n originalSum: consonantsSum,\n reductionSteps: consonantsReduction.steps,\n finalValue: consonantsReduction.finalValue\n },\n synthesis: {\n originalSum: vowelsReduction.finalValue + consonantsReduction.finalValue,\n reductionSteps: synthesisReduction.steps,\n finalValue: synthesisReduction.finalValue\n }\n }\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,IAAM,sBAAsB,oBAAI,IAAI;AAAA,EAClC;AAAA,IACE;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAAA,MACE,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,cAAc;AAAA,MACd,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA;AAAA,IACE;AAAA,IACA;AAA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