kaabalah 4.1.1 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-433ZCKTJ.js +311 -0
- package/dist/chunk-433ZCKTJ.js.map +1 -0
- package/dist/{chunk-UJIU7AGD.js → chunk-Q3H5PZSV.js} +4 -4
- package/dist/{chunk-UJIU7AGD.js.map → chunk-Q3H5PZSV.js.map} +1 -1
- package/dist/chunk-VJZK3WE2.mjs +308 -0
- package/dist/chunk-VJZK3WE2.mjs.map +1 -0
- package/dist/{chunk-OLFOA5JV.mjs → chunk-VZYMDLIK.mjs} +3 -3
- package/dist/{chunk-OLFOA5JV.mjs.map → chunk-VZYMDLIK.mjs.map} +1 -1
- package/dist/gematria/index.d.mts +51 -5
- package/dist/gematria/index.d.ts +51 -5
- package/dist/gematria/index.js +6 -2
- package/dist/gematria/index.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -18
- package/dist/index.mjs +2 -2
- package/dist/numerology/index.d.mts +1 -1
- package/dist/numerology/index.d.ts +1 -1
- package/dist/numerology/index.js +17 -17
- package/dist/numerology/index.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-4GW52TEP.js +0 -238
- package/dist/chunk-4GW52TEP.js.map +0 -1
- package/dist/chunk-MAK5YPPE.mjs +0 -236
- package/dist/chunk-MAK5YPPE.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BirthChart, BirthChartOptions, CalcFlag, HouseSystem, HydratedNode, HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, ZodiacPosition, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle } from './astrology/index.mjs';
|
|
2
2
|
export { _ as BaseNode, B as Bridge, u as COLORS, v as COLORS_DATA, C as ColorData, F as FOUR_WORLDS, b as FOUR_WORLDS_DATA, m as HEBREW_LETTERS, n as HEBREW_LETTERS_DATA, H as HebrewLetterData, K as KaabalahTypes, k as LATIN_LETTERS, l as LATIN_LETTERS_DATA, j as LURIANIC_PATHS, L as LatinLetterData, E as LetterTypes, A as Loader, i as MELKITZEDEKI_PATHS, s as MUSICAL_NOTES, t as MUSICAL_NOTES_DATA, O as MiscTypes, M as MusicalNoteData, Z as Node, Y as NodeData, R as NodeId, Q as NodeType, N as NumerologyTypes, e as PLANETS, z as PartKey, P as PathData, c as SPHERES, d as SPHERES_DATA, x as SYSTEMS, S as SphereData, w as System, y as SystemKey, p as TAROT_ARKANNUS, r as TAROT_ARKANNUS_DATA, q as TAROT_DECKS, o as TAROT_SUITS, J as TantraTypes, T as TarotArkAnnuData, I as TarotTypes, D as TreeOfLife, U as Unloader, g as WESTERN_ELEMENTS, f as WESTERN_ZODIAC_SIGNS, h as WESTERN_ZODIAC_SIGNS_DATA, G as WesternAstrologyTypes, a as WesternZodiacSignData, W as WorldData, V as id, X as parseId } from './registry-BoqJvsPr.mjs';
|
|
3
3
|
export { TreeOptions, createTree } from './core/index.mjs';
|
|
4
|
-
export { calculateGematria } from './gematria/index.mjs';
|
|
4
|
+
export { GematriaData, calculateGematria } from './gematria/index.mjs';
|
|
5
5
|
export { OduNumbers, calculateOdu } from './ifa/index.mjs';
|
|
6
6
|
export { MASTER_NUMBERS, NumerologyData, NumerologyData as NumerologyModuleTypes, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './numerology/index.mjs';
|
|
7
7
|
export { ARKANNUS, Deck, MajorArcana, TarotCard, majorArcana, shuffleTarotDeck } from './tarot/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BirthChart, BirthChartOptions, CalcFlag, HouseSystem, HydratedNode, HydratedPlanet, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, ZodiacPosition, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle } from './astrology/index.js';
|
|
2
2
|
export { _ as BaseNode, B as Bridge, u as COLORS, v as COLORS_DATA, C as ColorData, F as FOUR_WORLDS, b as FOUR_WORLDS_DATA, m as HEBREW_LETTERS, n as HEBREW_LETTERS_DATA, H as HebrewLetterData, K as KaabalahTypes, k as LATIN_LETTERS, l as LATIN_LETTERS_DATA, j as LURIANIC_PATHS, L as LatinLetterData, E as LetterTypes, A as Loader, i as MELKITZEDEKI_PATHS, s as MUSICAL_NOTES, t as MUSICAL_NOTES_DATA, O as MiscTypes, M as MusicalNoteData, Z as Node, Y as NodeData, R as NodeId, Q as NodeType, N as NumerologyTypes, e as PLANETS, z as PartKey, P as PathData, c as SPHERES, d as SPHERES_DATA, x as SYSTEMS, S as SphereData, w as System, y as SystemKey, p as TAROT_ARKANNUS, r as TAROT_ARKANNUS_DATA, q as TAROT_DECKS, o as TAROT_SUITS, J as TantraTypes, T as TarotArkAnnuData, I as TarotTypes, D as TreeOfLife, U as Unloader, g as WESTERN_ELEMENTS, f as WESTERN_ZODIAC_SIGNS, h as WESTERN_ZODIAC_SIGNS_DATA, G as WesternAstrologyTypes, a as WesternZodiacSignData, W as WorldData, V as id, X as parseId } from './registry-BoqJvsPr.js';
|
|
3
3
|
export { TreeOptions, createTree } from './core/index.js';
|
|
4
|
-
export { calculateGematria } from './gematria/index.js';
|
|
4
|
+
export { GematriaData, calculateGematria } from './gematria/index.js';
|
|
5
5
|
export { OduNumbers, calculateOdu } from './ifa/index.js';
|
|
6
6
|
export { MASTER_NUMBERS, NumerologyData, NumerologyData as NumerologyModuleTypes, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './numerology/index.js';
|
|
7
7
|
export { ARKANNUS, Deck, MajorArcana, TarotCard, majorArcana, shuffleTarotDeck } from './tarot/index.js';
|
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var chunkCGCEKFLD_js = require('./chunk-CGCEKFLD.js');
|
|
4
4
|
require('./chunk-AD7T42HJ.js');
|
|
5
5
|
var chunk3WVZRLPG_js = require('./chunk-3WVZRLPG.js');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var chunkQ3H5PZSV_js = require('./chunk-Q3H5PZSV.js');
|
|
7
|
+
var chunk433ZCKTJ_js = require('./chunk-433ZCKTJ.js');
|
|
8
8
|
var chunkLWX4YXES_js = require('./chunk-LWX4YXES.js');
|
|
9
9
|
var chunkUXQDJUG6_js = require('./chunk-UXQDJUG6.js');
|
|
10
10
|
require('./chunk-FM7WUVZV.js');
|
|
@@ -69,67 +69,71 @@ Object.defineProperty(exports, "calculateOdu", {
|
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "MASTER_NUMBERS", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkQ3H5PZSV_js.MASTER_NUMBERS; }
|
|
73
73
|
});
|
|
74
74
|
Object.defineProperty(exports, "NumerologyData", {
|
|
75
75
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkQ3H5PZSV_js.data_exports; }
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "calculateChallenges", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkQ3H5PZSV_js.calculateChallenges; }
|
|
81
81
|
});
|
|
82
82
|
Object.defineProperty(exports, "calculateCycles", {
|
|
83
83
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkQ3H5PZSV_js.calculateCycles; }
|
|
85
85
|
});
|
|
86
86
|
Object.defineProperty(exports, "calculateFibonacciCycle", {
|
|
87
87
|
enumerable: true,
|
|
88
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkQ3H5PZSV_js.calculateFibonacciCycle; }
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "calculateKaabalisticLifePath", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkQ3H5PZSV_js.calculateKaabalisticLifePath; }
|
|
93
93
|
});
|
|
94
94
|
Object.defineProperty(exports, "calculatePersonalCycles", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalCycles; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "calculatePersonalMonths", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalMonths; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "calculatePersonalPeriods", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalPeriods; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "calculatePersonalYear", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalYear; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "calculateStraightAcrossReductionLifePath", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkQ3H5PZSV_js.calculateStraightAcrossReductionLifePath; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "getDateEnergies", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkQ3H5PZSV_js.getDateEnergies; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "isMasterNumber", {
|
|
119
119
|
enumerable: true,
|
|
120
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkQ3H5PZSV_js.isMasterNumber; }
|
|
121
121
|
});
|
|
122
122
|
Object.defineProperty(exports, "reduceToSingle", {
|
|
123
123
|
enumerable: true,
|
|
124
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkQ3H5PZSV_js.reduceToSingle; }
|
|
125
125
|
});
|
|
126
126
|
Object.defineProperty(exports, "reduceToSingleWithSteps", {
|
|
127
127
|
enumerable: true,
|
|
128
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkQ3H5PZSV_js.reduceToSingleWithSteps; }
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(exports, "GematriaData", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () { return chunk433ZCKTJ_js.data_exports; }
|
|
129
133
|
});
|
|
130
134
|
Object.defineProperty(exports, "calculateGematria", {
|
|
131
135
|
enumerable: true,
|
|
132
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunk433ZCKTJ_js.calculateGematria; }
|
|
133
137
|
});
|
|
134
138
|
Object.defineProperty(exports, "BaseNode", {
|
|
135
139
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { CalcFlag, HouseSystem, PLANET_AND_NODE_NAMES, Planet, SIGNS, VirtualNodes, closeSwissEph, findHouseOf, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle } from './chunk-P7VAKSJY.mjs';
|
|
2
2
|
import './chunk-RFSO3JRG.mjs';
|
|
3
3
|
export { calculateOdu } from './chunk-YTZCZRJG.mjs';
|
|
4
|
-
export { MASTER_NUMBERS, data_exports as NumerologyData, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './chunk-
|
|
5
|
-
export { calculateGematria } from './chunk-
|
|
4
|
+
export { MASTER_NUMBERS, data_exports as NumerologyData, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './chunk-VZYMDLIK.mjs';
|
|
5
|
+
export { data_exports as GematriaData, calculateGematria } from './chunk-VJZK3WE2.mjs';
|
|
6
6
|
export { BaseNode, COLORS, COLORS_DATA, FOUR_WORLDS, FOUR_WORLDS_DATA, HEBREW_LETTERS, HEBREW_LETTERS_DATA, KaabalahTypes, LATIN_LETTERS, LATIN_LETTERS_DATA, LURIANIC_PATHS, LetterTypes, MELKITZEDEKI_PATHS, MUSICAL_NOTES, MUSICAL_NOTES_DATA, MiscTypes, NumerologyTypes, PLANETS, SPHERES, SPHERES_DATA, SYSTEMS, TAROT_ARKANNUS, TAROT_ARKANNUS_DATA, TAROT_DECKS, TAROT_SUITS, TantraTypes, TarotTypes, TreeOfLife, WESTERN_ELEMENTS, WESTERN_ZODIAC_SIGNS, WESTERN_ZODIAC_SIGNS_DATA, WesternAstrologyTypes, createTree, id, parseId } from './chunk-XQ6PO4OP.mjs';
|
|
7
7
|
export { ARKANNUS, majorArcana, shuffleTarotDeck } from './chunk-Q4N3V34Y.mjs';
|
|
8
8
|
import './chunk-WY6NIR2V.mjs';
|
|
@@ -193,7 +193,7 @@ declare enum ChallengeNumbers {
|
|
|
193
193
|
Eight = 8
|
|
194
194
|
}
|
|
195
195
|
declare const CHALLENGE_MEANING: Record<ChallengeNumbers, string>;
|
|
196
|
-
declare const CHALLENGE_HEALTH_MEANING: Record<ChallengeNumbers
|
|
196
|
+
declare const CHALLENGE_HEALTH_MEANING: Record<ChallengeNumbers | NumerologyValues, string>;
|
|
197
197
|
declare const PERSONAL_CYCLE_KEYWORDS: Record<NumerologyValues, string[]>;
|
|
198
198
|
declare const PERSONAL_YEAR_DESCRIPTIONS: Record<NumerologyValues, string>;
|
|
199
199
|
|
|
@@ -193,7 +193,7 @@ declare enum ChallengeNumbers {
|
|
|
193
193
|
Eight = 8
|
|
194
194
|
}
|
|
195
195
|
declare const CHALLENGE_MEANING: Record<ChallengeNumbers, string>;
|
|
196
|
-
declare const CHALLENGE_HEALTH_MEANING: Record<ChallengeNumbers
|
|
196
|
+
declare const CHALLENGE_HEALTH_MEANING: Record<ChallengeNumbers | NumerologyValues, string>;
|
|
197
197
|
declare const PERSONAL_CYCLE_KEYWORDS: Record<NumerologyValues, string[]>;
|
|
198
198
|
declare const PERSONAL_YEAR_DESCRIPTIONS: Record<NumerologyValues, string>;
|
|
199
199
|
|
package/dist/numerology/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkQ3H5PZSV_js = require('../chunk-Q3H5PZSV.js');
|
|
4
|
+
require('../chunk-433ZCKTJ.js');
|
|
5
5
|
require('../chunk-LWX4YXES.js');
|
|
6
6
|
require('../chunk-FM7WUVZV.js');
|
|
7
7
|
|
|
@@ -9,63 +9,63 @@ require('../chunk-FM7WUVZV.js');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "MASTER_NUMBERS", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkQ3H5PZSV_js.MASTER_NUMBERS; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "NumerologyData", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkQ3H5PZSV_js.data_exports; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "calculateChallenges", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkQ3H5PZSV_js.calculateChallenges; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "calculateCycles", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkQ3H5PZSV_js.calculateCycles; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "calculateFibonacciCycle", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkQ3H5PZSV_js.calculateFibonacciCycle; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "calculateKaabalisticLifePath", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkQ3H5PZSV_js.calculateKaabalisticLifePath; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "calculatePersonalCycles", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalCycles; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "calculatePersonalMonths", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalMonths; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "calculatePersonalPeriods", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalPeriods; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "calculatePersonalYear", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkQ3H5PZSV_js.calculatePersonalYear; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "calculateStraightAcrossReductionLifePath", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkQ3H5PZSV_js.calculateStraightAcrossReductionLifePath; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "getDateEnergies", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkQ3H5PZSV_js.getDateEnergies; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "isMasterNumber", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkQ3H5PZSV_js.isMasterNumber; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "reduceToSingle", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkQ3H5PZSV_js.reduceToSingle; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "reduceToSingleWithSteps", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkQ3H5PZSV_js.reduceToSingleWithSteps; }
|
|
69
69
|
});
|
|
70
70
|
//# sourceMappingURL=index.js.map
|
|
71
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { MASTER_NUMBERS, data_exports as NumerologyData, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { MASTER_NUMBERS, data_exports as NumerologyData, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from '../chunk-VZYMDLIK.mjs';
|
|
2
|
+
import '../chunk-VJZK3WE2.mjs';
|
|
3
3
|
import '../chunk-XQ6PO4OP.mjs';
|
|
4
4
|
import '../chunk-WY6NIR2V.mjs';
|
|
5
5
|
//# sourceMappingURL=index.mjs.map
|
package/package.json
CHANGED
package/dist/chunk-4GW52TEP.js
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkLWX4YXES_js = require('./chunk-LWX4YXES.js');
|
|
4
|
-
|
|
5
|
-
// src/gematria/index.ts
|
|
6
|
-
var DIGRAPHS = /* @__PURE__ */ new Set([
|
|
7
|
-
chunkLWX4YXES_js.LATIN_LETTERS.PH,
|
|
8
|
-
chunkLWX4YXES_js.LATIN_LETTERS.TS,
|
|
9
|
-
chunkLWX4YXES_js.LATIN_LETTERS.TZ,
|
|
10
|
-
chunkLWX4YXES_js.LATIN_LETTERS.SH,
|
|
11
|
-
chunkLWX4YXES_js.LATIN_LETTERS.CH,
|
|
12
|
-
chunkLWX4YXES_js.LATIN_LETTERS.TH,
|
|
13
|
-
chunkLWX4YXES_js.LATIN_LETTERS.KH
|
|
14
|
-
]);
|
|
15
|
-
var reduceToSingleDigitWithSteps = (num) => {
|
|
16
|
-
const steps = [num];
|
|
17
|
-
let currentNum = num;
|
|
18
|
-
while (currentNum > 9) {
|
|
19
|
-
currentNum = String(currentNum).split("").reduce((acc, digit) => acc + parseInt(digit), 0);
|
|
20
|
-
steps.push(currentNum);
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
steps,
|
|
24
|
-
finalValue: currentNum
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
var getLastArkAnnuStep = (steps) => {
|
|
28
|
-
if (steps.length === 0) return 0;
|
|
29
|
-
const step = steps.sort((a, b) => b - a).find((step2) => step2 <= 22);
|
|
30
|
-
return step ?? steps.at(-1) ?? 0;
|
|
31
|
-
};
|
|
32
|
-
function normalizeLetter(letter) {
|
|
33
|
-
if (letter.toUpperCase() === "\xC3") return "\xC3";
|
|
34
|
-
if (letter.toUpperCase() === "\xC7") return "\xC7";
|
|
35
|
-
return letter.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
|
|
36
|
-
}
|
|
37
|
-
function getLetterMapping({
|
|
38
|
-
tree,
|
|
39
|
-
letterId,
|
|
40
|
-
isStarting
|
|
41
|
-
}) {
|
|
42
|
-
if (isStarting && chunkLWX4YXES_js.parseId(letterId) === "O") {
|
|
43
|
-
return tree.getNode(chunkLWX4YXES_js.id("hebrewLetter" /* HEBREW_LETTER */, chunkLWX4YXES_js.HEBREW_LETTERS.AYIN));
|
|
44
|
-
}
|
|
45
|
-
return tree.walk(letterId, 2, "hebrewLetter" /* HEBREW_LETTER */).at(0);
|
|
46
|
-
}
|
|
47
|
-
function processLetter(tree, letters, i) {
|
|
48
|
-
const letter = normalizeLetter(letters[i]).toLocaleUpperCase();
|
|
49
|
-
const nextLetter = letters[i + 1] ? normalizeLetter(letters[i + 1]).toLocaleLowerCase() : "";
|
|
50
|
-
const combinedLetter = letter + nextLetter;
|
|
51
|
-
if (DIGRAPHS.has(combinedLetter)) {
|
|
52
|
-
const isEnding2 = i > 0 && i === letters.length - 2;
|
|
53
|
-
const latinLetterId2 = chunkLWX4YXES_js.id("latinLetter" /* LATIN_LETTER */, combinedLetter);
|
|
54
|
-
const mapping2 = getLetterMapping({
|
|
55
|
-
tree,
|
|
56
|
-
letterId: latinLetterId2,
|
|
57
|
-
isStarting: false
|
|
58
|
-
});
|
|
59
|
-
if (!mapping2?.data) {
|
|
60
|
-
return { skipNext: false };
|
|
61
|
-
}
|
|
62
|
-
const useWhenEndingValue2 = isEnding2 && mapping2.data.gematriaValueWhenEnding !== void 0 && mapping2.data.characterWhenEnding !== void 0;
|
|
63
|
-
return {
|
|
64
|
-
result: {
|
|
65
|
-
latinLetterId: latinLetterId2,
|
|
66
|
-
value: useWhenEndingValue2 ? mapping2.data.gematriaValueWhenEnding : mapping2.data.gematriaValue,
|
|
67
|
-
hebrewCharacter: useWhenEndingValue2 ? mapping2.data.characterWhenEnding : mapping2.data.character,
|
|
68
|
-
hebrewLetterId: mapping2.id,
|
|
69
|
-
isVowel: false
|
|
70
|
-
},
|
|
71
|
-
skipNext: true
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
const isStarting = i === 0;
|
|
75
|
-
const latinLetterId = chunkLWX4YXES_js.id("latinLetter" /* LATIN_LETTER */, letter);
|
|
76
|
-
const mapping = getLetterMapping({
|
|
77
|
-
tree,
|
|
78
|
-
letterId: latinLetterId,
|
|
79
|
-
isStarting
|
|
80
|
-
});
|
|
81
|
-
if (!mapping?.data) {
|
|
82
|
-
return { skipNext: false };
|
|
83
|
-
}
|
|
84
|
-
const isEnding = i > 0 && i === letters.length - 1;
|
|
85
|
-
const latinLetter = tree.getNode(latinLetterId);
|
|
86
|
-
const useWhenEndingValue = isEnding && mapping.data.gematriaValueWhenEnding !== void 0 && mapping.data.characterWhenEnding !== void 0;
|
|
87
|
-
return {
|
|
88
|
-
result: {
|
|
89
|
-
latinLetterId,
|
|
90
|
-
value: useWhenEndingValue ? mapping.data.gematriaValueWhenEnding : mapping.data.gematriaValue,
|
|
91
|
-
hebrewCharacter: useWhenEndingValue ? mapping.data.characterWhenEnding : mapping.data.character,
|
|
92
|
-
hebrewLetterId: mapping.id,
|
|
93
|
-
isVowel: latinLetter?.data?.isVowel ?? false
|
|
94
|
-
},
|
|
95
|
-
skipNext: false
|
|
96
|
-
};
|
|
97
|
-
}
|
|
98
|
-
function processWord(word, tree) {
|
|
99
|
-
const letters = word.split("");
|
|
100
|
-
let i = 0;
|
|
101
|
-
let wordState = {
|
|
102
|
-
letters: [],
|
|
103
|
-
vowelsSum: 0,
|
|
104
|
-
consonantsSum: 0,
|
|
105
|
-
includedGematriaValues: /* @__PURE__ */ new Set()
|
|
106
|
-
};
|
|
107
|
-
while (i < letters.length) {
|
|
108
|
-
const { result, skipNext } = processLetter(tree, letters, i);
|
|
109
|
-
if (result) {
|
|
110
|
-
wordState = {
|
|
111
|
-
letters: [...wordState.letters, result],
|
|
112
|
-
vowelsSum: wordState.vowelsSum + (result.isVowel ? result.value : 0),
|
|
113
|
-
consonantsSum: wordState.consonantsSum + (result.isVowel ? 0 : result.value),
|
|
114
|
-
includedGematriaValues: /* @__PURE__ */ new Set([
|
|
115
|
-
...wordState.includedGematriaValues,
|
|
116
|
-
result.value
|
|
117
|
-
])
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
i += skipNext ? 2 : 1;
|
|
121
|
-
}
|
|
122
|
-
return wordState;
|
|
123
|
-
}
|
|
124
|
-
function calculateLetterPercentages(word, tree, prev) {
|
|
125
|
-
const letters = word.split("");
|
|
126
|
-
const letterCount = letters.length;
|
|
127
|
-
let vowelsCount = 0;
|
|
128
|
-
let consonantsCount = 0;
|
|
129
|
-
const newLetters = { ...prev.letters };
|
|
130
|
-
for (const letter of new Set(letters)) {
|
|
131
|
-
const occurrences = letters.filter((l) => l === letter).length;
|
|
132
|
-
const latinLetter = tree.getNode(chunkLWX4YXES_js.id("latinLetter" /* LATIN_LETTER */, letter));
|
|
133
|
-
newLetters[letter] = occurrences / letterCount * 100;
|
|
134
|
-
if (latinLetter?.data?.isVowel) {
|
|
135
|
-
vowelsCount += occurrences;
|
|
136
|
-
} else {
|
|
137
|
-
consonantsCount += occurrences;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
percentageOfVowels: vowelsCount / letterCount * 100,
|
|
142
|
-
percentageOfConsonants: consonantsCount / letterCount * 100,
|
|
143
|
-
letters: newLetters
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
function getMissingGematriaValues(tree, includedGematriaValues) {
|
|
147
|
-
const missingGematriaValues = [];
|
|
148
|
-
for (const hebrewLetter of Object.values(chunkLWX4YXES_js.HEBREW_LETTERS)) {
|
|
149
|
-
const hebrewLetterId = chunkLWX4YXES_js.id("hebrewLetter" /* HEBREW_LETTER */, hebrewLetter);
|
|
150
|
-
const hebrewLetterNode = tree.getNode(hebrewLetterId);
|
|
151
|
-
if (!hebrewLetterNode?.data) continue;
|
|
152
|
-
if (!includedGematriaValues.has(hebrewLetterNode.data.gematriaValue)) {
|
|
153
|
-
missingGematriaValues.push({
|
|
154
|
-
value: hebrewLetterNode.data.gematriaValue,
|
|
155
|
-
hebrewLetterId,
|
|
156
|
-
whenEnding: false
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
if (hebrewLetterNode.data.gematriaValueWhenEnding && !includedGematriaValues.has(hebrewLetterNode.data.gematriaValueWhenEnding)) {
|
|
160
|
-
missingGematriaValues.push({
|
|
161
|
-
value: hebrewLetterNode.data.gematriaValueWhenEnding,
|
|
162
|
-
hebrewLetterId,
|
|
163
|
-
whenEnding: true
|
|
164
|
-
});
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
missingGematriaValues.sort((a, b) => a.value - b.value);
|
|
168
|
-
return missingGematriaValues;
|
|
169
|
-
}
|
|
170
|
-
var calculateGematria = (phrase, options = {
|
|
171
|
-
missing: false,
|
|
172
|
-
percentages: false
|
|
173
|
-
}, tree) => {
|
|
174
|
-
if (!tree) {
|
|
175
|
-
tree = chunkLWX4YXES_js.createTree({ system: chunkLWX4YXES_js.SYSTEM, parts: [] });
|
|
176
|
-
}
|
|
177
|
-
const words = phrase.toUpperCase().trim().split(" ");
|
|
178
|
-
const initialState = {
|
|
179
|
-
includedLetters: [],
|
|
180
|
-
vowelsSum: 0,
|
|
181
|
-
consonantsSum: 0,
|
|
182
|
-
includedGematriaValues: /* @__PURE__ */ new Set()
|
|
183
|
-
};
|
|
184
|
-
const finalState = words.reduce((state, word) => {
|
|
185
|
-
const wordResult = processWord(word, tree);
|
|
186
|
-
return {
|
|
187
|
-
includedLetters: [...state.includedLetters, ...wordResult.letters],
|
|
188
|
-
vowelsSum: state.vowelsSum + wordResult.vowelsSum,
|
|
189
|
-
consonantsSum: state.consonantsSum + wordResult.consonantsSum,
|
|
190
|
-
includedGematriaValues: /* @__PURE__ */ new Set([
|
|
191
|
-
...Array.from(state.includedGematriaValues),
|
|
192
|
-
...Array.from(wordResult.includedGematriaValues)
|
|
193
|
-
])
|
|
194
|
-
};
|
|
195
|
-
}, initialState);
|
|
196
|
-
let letterPercentages = {
|
|
197
|
-
percentageOfVowels: 0,
|
|
198
|
-
percentageOfConsonants: 0,
|
|
199
|
-
letters: {}
|
|
200
|
-
};
|
|
201
|
-
if (options?.percentages) {
|
|
202
|
-
letterPercentages = words.reduce((acc, word) => {
|
|
203
|
-
return calculateLetterPercentages(word, tree, acc);
|
|
204
|
-
}, letterPercentages);
|
|
205
|
-
}
|
|
206
|
-
const vowelsReduction = reduceToSingleDigitWithSteps(finalState.vowelsSum);
|
|
207
|
-
const consonantsReduction = reduceToSingleDigitWithSteps(
|
|
208
|
-
finalState.consonantsSum
|
|
209
|
-
);
|
|
210
|
-
const synthesisReduction = reduceToSingleDigitWithSteps(
|
|
211
|
-
getLastArkAnnuStep(vowelsReduction.steps) + getLastArkAnnuStep(consonantsReduction.steps)
|
|
212
|
-
);
|
|
213
|
-
const missingGematriaValues = options?.missing ? getMissingGematriaValues(tree, finalState.includedGematriaValues) : void 0;
|
|
214
|
-
return {
|
|
215
|
-
vowels: {
|
|
216
|
-
originalSum: finalState.vowelsSum,
|
|
217
|
-
reductionSteps: vowelsReduction.steps,
|
|
218
|
-
finalValue: vowelsReduction.finalValue
|
|
219
|
-
},
|
|
220
|
-
consonants: {
|
|
221
|
-
originalSum: finalState.consonantsSum,
|
|
222
|
-
reductionSteps: consonantsReduction.steps,
|
|
223
|
-
finalValue: consonantsReduction.finalValue
|
|
224
|
-
},
|
|
225
|
-
synthesis: {
|
|
226
|
-
originalSum: finalState.vowelsSum + finalState.consonantsSum,
|
|
227
|
-
reductionSteps: synthesisReduction.steps,
|
|
228
|
-
finalValue: synthesisReduction.finalValue
|
|
229
|
-
},
|
|
230
|
-
includedLetters: finalState.includedLetters,
|
|
231
|
-
missingGematriaValues,
|
|
232
|
-
letterPercentages: options?.percentages ? letterPercentages : void 0
|
|
233
|
-
};
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
exports.calculateGematria = calculateGematria;
|
|
237
|
-
//# sourceMappingURL=chunk-4GW52TEP.js.map
|
|
238
|
-
//# sourceMappingURL=chunk-4GW52TEP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/gematria/index.ts"],"names":["LATIN_LETTERS","step","parseId","id","HEBREW_LETTERS","isEnding","latinLetterId","mapping","useWhenEndingValue","createTree","SYSTEM"],"mappings":";;;;;AAMA,IAAM,QAAA,uBAAe,GAAY,CAAA;AAAA,EAC/BA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA,EAAA;AAAA,EACdA,8BAAc,CAAA;AAChB,CAAC,CAAA;AAED,IAAM,4BAAA,GAA+B,CAAC,GAAgB,KAAA;AACpD,EAAM,MAAA,KAAA,GAAQ,CAAC,GAAG,CAAA;AAClB,EAAA,IAAI,UAAa,GAAA,GAAA;AAEjB,EAAA,OAAO,aAAa,CAAG,EAAA;AACrB,IAAA,UAAA,GAAa,MAAO,CAAA,UAAU,CAC3B,CAAA,KAAA,CAAM,EAAE,CACR,CAAA,MAAA,CAAO,CAAC,GAAA,EAAK,KAAU,KAAA,GAAA,GAAM,QAAS,CAAA,KAAK,GAAG,CAAC,CAAA;AAClD,IAAA,KAAA,CAAM,KAAK,UAAU,CAAA;AAAA;AAGvB,EAAO,OAAA;AAAA,IACL,KAAA;AAAA,IACA,UAAY,EAAA;AAAA,GACd;AACF,CAAA;AAEA,IAAM,kBAAA,GAAqB,CAAC,KAAoB,KA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BAAoB,GAAA;AAAA,GAChE;AACF","file":"chunk-4GW52TEP.js","sourcesContent":["import { HEBREW_LETTERS, LATIN_LETTERS } from \"../core/constants\";\nimport { createTree } from \"../core/factory\";\nimport { SYSTEM as KAABALAH_SYSTEM } from \"../core/systems/kaabalah\";\nimport { TreeOfLife } from \"../core/tree-of-life\";\nimport { id, LetterTypes, Node, NodeId, parseId } from \"../core/types\";\n\nconst DIGRAPHS = new Set<string>([\n LATIN_LETTERS.PH,\n LATIN_LETTERS.TS,\n LATIN_LETTERS.TZ,\n LATIN_LETTERS.SH,\n LATIN_LETTERS.CH,\n LATIN_LETTERS.TH,\n LATIN_LETTERS.KH,\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 getLastArkAnnuStep = (steps: number[]) => {\n if (steps.length === 0) return 0;\n\n // reverse sort to get the last step\n const step = steps.sort((a, b) => b - a).find((step) => step <= 22);\n\n return step ?? steps.at(-1) ?? 0;\n}\n\ninterface LetterResult {\n latinLetterId: NodeId<LetterTypes.LATIN_LETTER>;\n value: number;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n hebrewCharacter: string;\n isVowel: boolean;\n}\n\ninterface WordResult {\n letters: LetterResult[];\n vowelsSum: number;\n consonantsSum: number;\n includedGematriaValues: Set<number>;\n}\n\ninterface GematriaState {\n includedLetters: LetterResult[];\n vowelsSum: number;\n consonantsSum: number;\n includedGematriaValues: Set<number>;\n}\n\ninterface LetterPercentages {\n percentageOfVowels: number;\n percentageOfConsonants: number;\n letters: Record<string, number>;\n}\n\nfunction normalizeLetter(letter: string): string {\n if (letter.toUpperCase() === \"Ã\") return \"Ã\";\n if (letter.toUpperCase() === \"Ç\") return \"Ç\";\n\n return letter.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\n\nfunction getLetterMapping({\n tree,\n letterId,\n isStarting,\n}: {\n tree: TreeOfLife;\n letterId: NodeId<LetterTypes.LATIN_LETTER>;\n isStarting: boolean;\n}): Node<LetterTypes.HEBREW_LETTER> | undefined {\n if (isStarting && parseId(letterId) === \"O\") {\n return tree.getNode(id(LetterTypes.HEBREW_LETTER, HEBREW_LETTERS.AYIN));\n }\n\n return tree.walk(letterId, 2, LetterTypes.HEBREW_LETTER).at(0);\n}\n\nfunction processLetter(\n tree: TreeOfLife,\n letters: string[],\n i: number\n): { result?: LetterResult; skipNext: boolean } {\n const letter = normalizeLetter(letters[i]).toLocaleUpperCase();\n const nextLetter = letters[i + 1]\n ? normalizeLetter(letters[i + 1]).toLocaleLowerCase()\n : \"\";\n const combinedLetter = letter + nextLetter;\n\n if (DIGRAPHS.has(combinedLetter)) {\n const isEnding = i > 0 && i === letters.length - 2;\n const latinLetterId = id(LetterTypes.LATIN_LETTER, combinedLetter);\n const mapping = getLetterMapping({\n tree,\n letterId: latinLetterId,\n isStarting: false,\n });\n\n if (!mapping?.data) {\n return { skipNext: false };\n }\n\n const useWhenEndingValue =\n isEnding &&\n mapping.data.gematriaValueWhenEnding !== undefined &&\n mapping.data.characterWhenEnding !== undefined;\n\n return {\n result: {\n latinLetterId,\n value: useWhenEndingValue\n ? mapping.data.gematriaValueWhenEnding!\n : mapping.data.gematriaValue,\n hebrewCharacter: useWhenEndingValue\n ? mapping.data.characterWhenEnding!\n : mapping.data.character,\n hebrewLetterId: mapping.id,\n isVowel: false,\n },\n skipNext: true,\n };\n }\n\n const isStarting = i === 0;\n const latinLetterId = id(LetterTypes.LATIN_LETTER, letter);\n const mapping = getLetterMapping({\n tree,\n letterId: latinLetterId,\n isStarting,\n });\n\n if (!mapping?.data) {\n return { skipNext: false };\n }\n\n const isEnding = i > 0 && i === letters.length - 1;\n const latinLetter = tree.getNode(latinLetterId);\n const useWhenEndingValue =\n isEnding &&\n mapping.data.gematriaValueWhenEnding !== undefined &&\n mapping.data.characterWhenEnding !== undefined;\n\n return {\n result: {\n latinLetterId,\n value: useWhenEndingValue\n ? mapping.data.gematriaValueWhenEnding!\n : mapping.data.gematriaValue,\n hebrewCharacter: useWhenEndingValue\n ? mapping.data.characterWhenEnding!\n : mapping.data.character,\n hebrewLetterId: mapping.id,\n isVowel: latinLetter?.data?.isVowel ?? false,\n },\n skipNext: false,\n };\n}\n\nfunction processWord(word: string, tree: TreeOfLife): WordResult {\n const letters = word.split(\"\");\n let i = 0;\n\n let wordState: WordResult = {\n letters: [],\n vowelsSum: 0,\n consonantsSum: 0,\n includedGematriaValues: new Set(),\n };\n\n while (i < letters.length) {\n const { result, skipNext } = processLetter(tree, letters, i);\n\n if (result) {\n wordState = {\n letters: [...wordState.letters, result],\n vowelsSum: wordState.vowelsSum + (result.isVowel ? result.value : 0),\n consonantsSum:\n wordState.consonantsSum + (result.isVowel ? 0 : result.value),\n includedGematriaValues: new Set([\n ...wordState.includedGematriaValues,\n result.value,\n ]),\n };\n }\n\n i += skipNext ? 2 : 1;\n }\n\n return wordState;\n}\n\nfunction calculateLetterPercentages(\n word: string,\n tree: TreeOfLife,\n prev: LetterPercentages\n): LetterPercentages {\n const letters = word.split(\"\");\n const letterCount = letters.length;\n\n let vowelsCount = 0;\n let consonantsCount = 0;\n\n const newLetters = { ...prev.letters };\n\n for (const letter of new Set(letters)) {\n const occurrences = letters.filter((l) => l === letter).length;\n const latinLetter = tree.getNode(id(LetterTypes.LATIN_LETTER, letter));\n newLetters[letter] = (occurrences / letterCount) * 100;\n\n if (latinLetter?.data?.isVowel) {\n vowelsCount += occurrences;\n } else {\n consonantsCount += occurrences;\n }\n }\n return {\n percentageOfVowels: (vowelsCount / letterCount) * 100,\n percentageOfConsonants: (consonantsCount / letterCount) * 100,\n letters: newLetters,\n };\n}\n\nfunction getMissingGematriaValues(\n tree: TreeOfLife,\n includedGematriaValues: Set<number>\n) {\n const missingGematriaValues: {\n value: number;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n whenEnding: boolean;\n }[] = [];\n\n for (const hebrewLetter of Object.values(HEBREW_LETTERS)) {\n const hebrewLetterId = id(LetterTypes.HEBREW_LETTER, hebrewLetter);\n const hebrewLetterNode = tree.getNode(hebrewLetterId);\n\n if (!hebrewLetterNode?.data) continue;\n\n if (!includedGematriaValues.has(hebrewLetterNode.data.gematriaValue)) {\n missingGematriaValues.push({\n value: hebrewLetterNode.data.gematriaValue,\n hebrewLetterId,\n whenEnding: false,\n });\n }\n\n if (\n hebrewLetterNode.data.gematriaValueWhenEnding &&\n !includedGematriaValues.has(hebrewLetterNode.data.gematriaValueWhenEnding)\n ) {\n missingGematriaValues.push({\n value: hebrewLetterNode.data.gematriaValueWhenEnding,\n hebrewLetterId,\n whenEnding: true,\n });\n }\n }\n\n missingGematriaValues.sort((a, b) => a.value - b.value);\n\n return missingGematriaValues;\n}\n\nexport const calculateGematria = (\n phrase: string,\n options: {\n missing?: boolean;\n percentages?: boolean;\n } = {\n missing: false,\n percentages: false,\n },\n tree?: TreeOfLife\n) => {\n if (!tree) {\n // todo: study the possibility of pre-calculating the mappings\n tree = createTree({ system: KAABALAH_SYSTEM, parts: [] });\n }\n const words = phrase.toUpperCase().trim().split(\" \");\n\n const initialState: GematriaState = {\n includedLetters: [],\n vowelsSum: 0,\n consonantsSum: 0,\n includedGematriaValues: new Set(),\n };\n\n const finalState = words.reduce<GematriaState>((state, word) => {\n const wordResult = processWord(word, tree);\n\n return {\n includedLetters: [...state.includedLetters, ...wordResult.letters],\n vowelsSum: state.vowelsSum + wordResult.vowelsSum,\n consonantsSum: state.consonantsSum + wordResult.consonantsSum,\n includedGematriaValues: new Set([\n ...Array.from(state.includedGematriaValues),\n ...Array.from(wordResult.includedGematriaValues),\n ]),\n };\n }, initialState);\n\n let letterPercentages: LetterPercentages = {\n percentageOfVowels: 0,\n percentageOfConsonants: 0,\n letters: {},\n };\n\n if (options?.percentages) {\n letterPercentages = words.reduce<LetterPercentages>((acc, word) => {\n return calculateLetterPercentages(word, tree, acc);\n }, letterPercentages);\n }\n\n const vowelsReduction = reduceToSingleDigitWithSteps(finalState.vowelsSum);\n const consonantsReduction = reduceToSingleDigitWithSteps(\n finalState.consonantsSum\n );\n const synthesisReduction = reduceToSingleDigitWithSteps(\n getLastArkAnnuStep(vowelsReduction.steps) + getLastArkAnnuStep(consonantsReduction.steps)\n );\n\n const missingGematriaValues = options?.missing\n ? getMissingGematriaValues(tree, finalState.includedGematriaValues)\n : undefined;\n\n return {\n vowels: {\n originalSum: finalState.vowelsSum,\n reductionSteps: vowelsReduction.steps,\n finalValue: vowelsReduction.finalValue,\n },\n consonants: {\n originalSum: finalState.consonantsSum,\n reductionSteps: consonantsReduction.steps,\n finalValue: consonantsReduction.finalValue,\n },\n synthesis: {\n originalSum: finalState.vowelsSum + finalState.consonantsSum,\n reductionSteps: synthesisReduction.steps,\n finalValue: synthesisReduction.finalValue,\n },\n includedLetters: finalState.includedLetters,\n missingGematriaValues,\n letterPercentages: options?.percentages ? letterPercentages : undefined,\n };\n};\n"]}
|