kaabalah 3.0.0 → 3.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/dist/chunk-3WVZRLPG.js +52 -0
- package/dist/chunk-3WVZRLPG.js.map +1 -0
- package/dist/{chunk-SHEGSIRU.js → chunk-4IMODQPK.js} +15 -8
- package/dist/chunk-4IMODQPK.js.map +1 -0
- package/dist/{chunk-VV2YT6RZ.mjs → chunk-6DHXZLYH.mjs} +15 -8
- package/dist/chunk-6DHXZLYH.mjs.map +1 -0
- package/dist/chunk-YTZCZRJG.mjs +50 -0
- package/dist/chunk-YTZCZRJG.mjs.map +1 -0
- package/dist/ifa/index.d.mts +8 -7
- package/dist/ifa/index.d.ts +8 -7
- package/dist/ifa/index.js +6 -47
- package/dist/ifa/index.js.map +1 -1
- package/dist/ifa/index.mjs +1 -49
- package/dist/ifa/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +21 -16
- package/dist/index.mjs +2 -1
- package/dist/numerology/index.d.mts +3 -2
- package/dist/numerology/index.d.ts +3 -2
- package/dist/numerology/index.js +16 -16
- package/dist/numerology/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-SHEGSIRU.js.map +0 -1
- package/dist/chunk-VV2YT6RZ.mjs.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/ifa/index.ts
|
|
4
|
+
function calculateOdu(date) {
|
|
5
|
+
const day = date.getDate().toString().padStart(2, "0");
|
|
6
|
+
const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
7
|
+
const year = date.getFullYear().toString();
|
|
8
|
+
const leftNumbers = [
|
|
9
|
+
parseInt(day[0]),
|
|
10
|
+
// First digit of day
|
|
11
|
+
parseInt(month[0]),
|
|
12
|
+
// First digit of month
|
|
13
|
+
parseInt(year[0]),
|
|
14
|
+
// First digit of year
|
|
15
|
+
parseInt(year[2])
|
|
16
|
+
// Third digit of year
|
|
17
|
+
];
|
|
18
|
+
const rightNumbers = [
|
|
19
|
+
parseInt(day[1]),
|
|
20
|
+
// Second digit of day
|
|
21
|
+
parseInt(month[1]),
|
|
22
|
+
// Second digit of month
|
|
23
|
+
parseInt(year[1]),
|
|
24
|
+
// Second digit of year
|
|
25
|
+
parseInt(year[3])
|
|
26
|
+
// Fourth digit of year
|
|
27
|
+
];
|
|
28
|
+
function reduceNumber(num) {
|
|
29
|
+
if (num <= 16) return num;
|
|
30
|
+
return reduceNumber(num.toString().split("").reduce((a, b) => a + parseInt(b), 0));
|
|
31
|
+
}
|
|
32
|
+
const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);
|
|
33
|
+
const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);
|
|
34
|
+
const north = reduceNumber(rawLeftSum);
|
|
35
|
+
const south = reduceNumber(rawRightSum);
|
|
36
|
+
const east = reduceNumber(north + south);
|
|
37
|
+
const west = reduceNumber(north + south + east);
|
|
38
|
+
const center = reduceNumber(north + south + east + west);
|
|
39
|
+
return {
|
|
40
|
+
leftNumbers,
|
|
41
|
+
rightNumbers,
|
|
42
|
+
north,
|
|
43
|
+
south,
|
|
44
|
+
east,
|
|
45
|
+
west,
|
|
46
|
+
center
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
exports.calculateOdu = calculateOdu;
|
|
51
|
+
//# sourceMappingURL=chunk-3WVZRLPG.js.map
|
|
52
|
+
//# sourceMappingURL=chunk-3WVZRLPG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ifa/index.ts"],"names":[],"mappings":";;;AAgBO,SAAS,aAAa,IAAwB,EAAA;AAEnD,EAAM,MAAA,GAAA,GAAM,KAAK,OAAQ,EAAA,CAAE,UAAW,CAAA,QAAA,CAAS,GAAG,GAAG,CAAA;AACrD,EAAM,MAAA,KAAA,GAAA,CAAS,KAAK,QA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C,EAAM,MAAA,KAAA,GAAQ,aAAa,WAAW,CAAA;AACtC,EAAM,MAAA,IAAA,GAAO,YAAa,CAAA,KAAA,GAAQ,KAAK,CAAA;AACvC,EAAA,MAAM,IAAO,GAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,GAAQ,IAAI,CAAA;AAC9C,EAAA,MAAM,MAAS,GAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,GAAQ,OAAO,IAAI,CAAA;AAEvD,EAAO,OAAA;AAAA,IACL,WAAA;AAAA,IACA,YAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-3WVZRLPG.js","sourcesContent":["\nexport type OduNumbers = {\n leftNumbers: number[],\n rightNumbers: number[],\n north: number,\n south: number,\n east: number,\n west: number,\n center: number\n}\n\n/**\n * Calculate the Odu numbers based on a date\n * @param date - Date object\n * @returns Odu numbers\n */\nexport function calculateOdu(date: Date): OduNumbers {\n // Format the date into DD/MM/YYYY\n const day = date.getDate().toString().padStart(2, '0');\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const year = date.getFullYear().toString();\n\n // Split into left and right columns\n const leftNumbers = [\n parseInt(day[0]), // First digit of day\n parseInt(month[0]), // First digit of month\n parseInt(year[0]), // First digit of year\n parseInt(year[2]) // Third digit of year\n ];\n\n const rightNumbers = [\n parseInt(day[1]), // Second digit of day\n parseInt(month[1]), // Second digit of month\n parseInt(year[1]), // Second digit of year\n parseInt(year[3]) // Fourth digit of year\n ];\n\n // Reduce numbers if they're greater than 16\n function reduceNumber(num: number): number {\n if (num <= 16) return num;\n return reduceNumber(num.toString().split('').reduce((a, b) => a + parseInt(b), 0));\n }\n\n // Calculate initial sums\n const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);\n const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);\n\n // Calculate and reduce each direction\n const north = reduceNumber(rawLeftSum);\n const south = reduceNumber(rawRightSum);\n const east = reduceNumber(north + south);\n const west = reduceNumber(north + south + east);\n const center = reduceNumber(north + south + east + west);\n\n return {\n leftNumbers,\n rightNumbers,\n north,\n south,\n east,\n west,\n center\n };\n}"]}
|
|
@@ -109,9 +109,11 @@ function calculateKaabalisticLifePath(birthDate) {
|
|
|
109
109
|
const isMasterLifePath = isMasterNumber(lifePath);
|
|
110
110
|
const personalMythologyNumbers = [
|
|
111
111
|
parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),
|
|
112
|
-
finalSynthesis
|
|
113
|
-
lifePath
|
|
112
|
+
finalSynthesis
|
|
114
113
|
];
|
|
114
|
+
if (finalSynthesis !== lifePath) {
|
|
115
|
+
personalMythologyNumbers.push(lifePath);
|
|
116
|
+
}
|
|
115
117
|
const reducedLifePath = reduceToSingle(lifePath);
|
|
116
118
|
if (isMasterLifePath) {
|
|
117
119
|
personalMythologyNumbers.push(reducedLifePath);
|
|
@@ -364,7 +366,11 @@ function calculateFibonacciCycle(birthDate, today) {
|
|
|
364
366
|
};
|
|
365
367
|
}
|
|
366
368
|
function calculateSoulNumber(firstName) {
|
|
367
|
-
|
|
369
|
+
const vowels = chunkJJ76YVMI_js.calculateGematria(firstName).vowels;
|
|
370
|
+
return {
|
|
371
|
+
reducedValue: vowels.finalValue,
|
|
372
|
+
reductionSteps: vowels.reductionSteps
|
|
373
|
+
};
|
|
368
374
|
}
|
|
369
375
|
function wrapMonth(month) {
|
|
370
376
|
const wrappedMonth = ((month - 1) % 12 + 12) % 12;
|
|
@@ -429,7 +435,7 @@ function calculatePersonalMonths(birthDate, personalYear, today) {
|
|
|
429
435
|
const { month } = parseDate(birthDate);
|
|
430
436
|
const firstPersonalMonth = parseInt(month, 10);
|
|
431
437
|
const personalMonths = [];
|
|
432
|
-
for (let i = 0; i <
|
|
438
|
+
for (let i = 0; i < 12; i++) {
|
|
433
439
|
const m = wrapMonth(firstPersonalMonth + i);
|
|
434
440
|
const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {
|
|
435
441
|
preserveMasters: true
|
|
@@ -451,7 +457,7 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
451
457
|
);
|
|
452
458
|
const { lifePath } = calculateKaabalisticLifePath(birthDate);
|
|
453
459
|
const soulNumber = calculateSoulNumber(firstName);
|
|
454
|
-
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber, currentAge);
|
|
460
|
+
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);
|
|
455
461
|
const {
|
|
456
462
|
personalMonths,
|
|
457
463
|
currentPersonalMonthIndex: currentPersonalMonth
|
|
@@ -465,7 +471,8 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
465
471
|
personalPeriods,
|
|
466
472
|
personalMonths,
|
|
467
473
|
currentPersonalPeriod,
|
|
468
|
-
currentPersonalMonth
|
|
474
|
+
currentPersonalMonth,
|
|
475
|
+
yearUsedOnCalculations: yearToUse
|
|
469
476
|
};
|
|
470
477
|
}
|
|
471
478
|
|
|
@@ -484,5 +491,5 @@ exports.getDateEnergies = getDateEnergies;
|
|
|
484
491
|
exports.isMasterNumber = isMasterNumber;
|
|
485
492
|
exports.reduceToSingle = reduceToSingle;
|
|
486
493
|
exports.reduceToSingleWithSteps = reduceToSingleWithSteps;
|
|
487
|
-
//# sourceMappingURL=chunk-
|
|
488
|
-
//# sourceMappingURL=chunk-
|
|
494
|
+
//# sourceMappingURL=chunk-4IMODQPK.js.map
|
|
495
|
+
//# sourceMappingURL=chunk-4IMODQPK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/numerology/index.ts"],"names":["calculateGematria"],"mappings":";;;;;AAWA,SAAS,UAAU,IAA0D,EAAA;AAC3E,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAM,MAAA,IAAI,MAAM,kBAAkB,CAAA;AAAA;AAGpC,EAAI,IA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AA,IACL,cAAA;AAAA,IACA;AAAA,GACF;AACF;AAEO,SAAS,wBACd,SACA,EAAA,KAAA,mBAAkB,IAAA,IAAA,IAClB,SACgB,EAAA;AAChB,EAAM,MAAA,SAAA,GAAY,mBAAoB,CAAA,SAAA,EAAW,KAAK,CAAA;AAEtD,EAAM,MAAA,YAAA,GAAe,qBAAsB,CAAA,SAAA,EAAW,KAAK,CAAA;AAE3D,EAAA,MAAM,UAAa,GAAA,YAAA;AAAA,IACjB,SAAA;AAAA,IACA,IAAI,KAAK,SAAW,EAAA,KAAA,CAAM,UAAY,EAAA,KAAA,CAAM,SAAS;AAAA,GACvD;AACA,EAAA,MAAM,EAAE,QAAA,EAAa,GAAA,4BAAA,CAA6B,SAAS,CAAA;AAC3D,EAAM,MAAA,UAAA,GAAa,oBAAoB,SAAS,CAAA;AAEhD,EAAA,MAAM,kBACJ,wBAAyB,CAAA,SAAA,EAAW,WAAW,QAAU,EAAA,UAAA,CAAW,cAAc,UAAU,CAAA;AAE9F,EAAM,MAAA;AAAA,IACJ,cAAA;AAAA,IACA,yBAA2B,EAAA;AAAA,GACzB,GAAA,uBAAA,CAAwB,SAAW,EAAA,YAAA,EAAc,KAAK,CAAA;AAG1D,EAAM,MAAA,qBAAA,GAAwB,KAAK,KAAM,CAAA,IAAA,CAAK,IAAI,oBAAsB,EAAA,EAAE,IAAI,CAAC,CAAA;AAE/E,EAAO,OAAA;AAAA,IACL,UAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA,oBAAA;AAAA,IACA,sBAAwB,EAAA;AAAA,GAC1B;AACF","file":"chunk-4IMODQPK.js","sourcesContent":["/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\n\nexport type ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\n};\n\nfunction parseDate(date: Date): { day: string; month: string; year: string } {\n if (!date) {\n throw new Error(\"Date is required\");\n }\n\n if (!(date instanceof Date)) {\n throw new Error(\"Date must be a Date object\");\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n\n if (formattedDate.length !== 10) {\n throw new Error(\"Date must be in the format YYYY-MM-DD or DD-MM-YYYY\");\n }\n\n const parts = formattedDate.split(/[-/]/).map((p) => p.trim());\n\n const isYYYYMMDD = parts[0].length === 4;\n\n if (isYYYYMMDD) {\n return { day: parts[2], month: parts[1], year: parts[0] };\n } else {\n return { day: parts[0], month: parts[1], year: parts[2] };\n }\n}\n\nfunction mapDatePartsToBlocksOfTwo({\n day,\n month,\n year,\n}: {\n day: string;\n month: string;\n year: string;\n}): { day: string; month: string; year1: string; year2: string } {\n return {\n day: day.padStart(2, \"0\"),\n month: month.padStart(2, \"0\"),\n year1: year.slice(0, 2),\n year2: year.slice(2),\n };\n}\n\nfunction digitSum(n: number): number {\n let s = 0;\n\n for (const ch of String(Math.abs(n))) {\n s += ch.charCodeAt(0) - 48;\n }\n\n return s;\n}\n\nexport const MASTER_NUMBERS = [11, 22, 33, 44];\n\nexport function isMasterNumber(n: number): boolean {\n return MASTER_NUMBERS.includes(n);\n}\n\nexport function reduceToSingle(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): number {\n // standard digital root with 0 allowed; never preserve masters here\n if (n === 0) {\n return 0;\n }\n\n let reduced = n;\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n }\n\n // optional tweak for exact \"00\" cases will be applied by caller, not here\n return reduced;\n}\n\nexport function reduceToSingleWithSteps(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): ReducedValueWithSteps {\n const steps = [n];\n\n if (n === 0) {\n return {\n reducedValue: 0,\n reductionSteps: steps,\n };\n }\n\n let reduced = n;\n\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n steps.push(reduced);\n }\n\n return {\n reducedValue: reduced,\n reductionSteps: steps,\n };\n}\n\nfunction reduceBlock(block: string): number {\n const n = [...block].reduce(\n (acc, curr) => acc + (curr.charCodeAt(0) - 48),\n 0\n );\n\n if (n === 0) {\n return 0;\n }\n\n return reduceToSingle(n);\n}\n\nexport type KaabalisticLifePathResult = {\n parts: {\n day: string;\n month: string;\n year1: string;\n year2: string;\n };\n reducedParts: {\n reducedDay: number;\n reducedMonth: number;\n reducedYear1: number;\n reducedYear2: number;\n };\n syntheses: {\n dayMonthSynthesis: number;\n yearSynthesis: number;\n reducedDayMonthSynthesis: number;\n reducedYearSynthesis: number;\n finalSynthesis: number;\n };\n lifePath: number;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\n/**\n * Calculate the Kaabalistic life path number based on a birth date.\n * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)\n */\nexport function calculateKaabalisticLifePath(\n birthDate: Date\n): KaabalisticLifePathResult {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const reducedDay = reduceBlock(day);\n const reducedMonth = reduceBlock(month);\n const reducedYear1 = reduceBlock(year1);\n const reducedYear2 = reduceBlock(year2);\n\n const dayMonthSynthesis = parseInt(`${reducedDay}${reducedMonth}`, 10);\n const yearSynthesis = parseInt(`${reducedYear1}${reducedYear2}`, 10);\n\n const reducedDayMonthSynthesis = reduceToSingle(dayMonthSynthesis);\n const reducedYearSynthesis = reduceToSingle(yearSynthesis);\n\n const finalSynthesis = parseInt(\n `${reducedDayMonthSynthesis}${reducedYearSynthesis}`,\n 10\n );\n\n const lifePath = reduceToSingle(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n ];\n\n if (finalSynthesis !== lifePath) {\n personalMythologyNumbers.push(lifePath);\n }\n\n const reducedLifePath = reduceToSingle(lifePath);\n if (isMasterLifePath) {\n personalMythologyNumbers.push(reducedLifePath);\n }\n\n return {\n parts: { day, month, year1, year2 },\n reducedParts: { reducedDay, reducedMonth, reducedYear1, reducedYear2 },\n syntheses: {\n dayMonthSynthesis,\n yearSynthesis,\n reducedDayMonthSynthesis,\n reducedYearSynthesis,\n finalSynthesis,\n },\n lifePath,\n personalMythologyNumbers,\n };\n}\n\nexport type StraightAcrossReductionLifePathResult = {\n lifePath: number;\n reductionSteps: number[];\n};\n\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): StraightAcrossReductionLifePathResult {\n const { day, month, year } = parseDate(birthDate);\n\n const result = reduceToSingleWithSteps(\n parseInt(`${day}${month}${year}`, 10),\n { preserveMasters: true }\n );\n\n return {\n lifePath: result.reducedValue,\n reductionSteps: result.reductionSteps,\n };\n}\n\nexport type DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n};\n\nexport function getDateEnergies(birthDate: Date): DateEnergies {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const dayEnergy = reduceToSingleWithSteps(parseInt(day, 10), {\n preserveMasters: true,\n });\n const monthEnergy = reduceToSingleWithSteps(parseInt(month, 10), {\n preserveMasters: true,\n });\n const yearEnergy = reduceToSingleWithSteps(parseInt(year1 + year2, 10), {\n preserveMasters: true,\n });\n\n return {\n dayEnergy,\n monthEnergy,\n yearEnergy,\n };\n}\n\nexport type Challenges = {\n day: number;\n month: number;\n year: number;\n mainChallenge: number;\n subChallenge1: number;\n subChallenge2: number;\n};\n\nexport function calculateChallenges(birthDate: Date): Challenges {\n const { day, month, year } = parseDate(birthDate);\n\n const reducedDay = reduceToSingle(parseInt(day, 10));\n const reducedMonth = reduceToSingle(parseInt(month, 10));\n const reducedYear = reduceToSingle(parseInt(year, 10));\n\n const subChallenge1 = Math.abs(reducedMonth - reducedDay);\n const subChallenge2 = Math.abs(reducedDay - reducedYear);\n const mainChallenge = Math.abs(subChallenge1 - subChallenge2);\n\n return {\n day: reducedDay,\n month: reducedMonth,\n year: reducedYear,\n mainChallenge,\n subChallenge1,\n subChallenge2,\n };\n}\n\nexport const CYCLE_MEANINGS = [\n {\n title: \"Learning\",\n shortDescription:\n \"A period for assertive action and learning through direct experience.\",\n personalDescription:\n \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n businessDescription:\n \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n astrologySign: \"Aries (Actions Have Consequences)\",\n },\n {\n title: \"Hard Work\",\n shortDescription:\n \"A time for diligent effort and adaptability to temporary changes.\",\n personalDescription:\n \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n businessDescription:\n \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n astrologySign: \"Taurus (Stop Being Stubborn)\",\n },\n {\n title: \"Friendship\",\n shortDescription:\n \"A dynamic phase for ambitious projects and strengthening relationships.\",\n personalDescription:\n \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n businessDescription:\n \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n astrologySign: \"Gemini (Communication is Power)\",\n },\n {\n title: \"Opportunities\",\n shortDescription:\n \"An intellectually fertile time for creativity and quick decision-making.\",\n personalDescription:\n \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n businessDescription:\n \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n astrologySign: \"Cancer (Nurture Mental Growth)\",\n },\n {\n title: \"Tears/Decision\",\n shortDescription:\n \"The most prosperous phase for financial resolution and spiritual advancement.\",\n personalDescription:\n \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n businessDescription:\n \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n astrologySign: \"Leo (Balance Ego and Generosity)\",\n },\n {\n title: \"Triple Blessing\",\n shortDescription:\n \"Perfect for pleasures, social activities, and creative pursuits.\",\n personalDescription:\n \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n businessDescription:\n \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n astrologySign: \"Virgo (Organize Your Pleasures)\",\n },\n {\n title: \"Rest\",\n shortDescription:\n \"A period of rest, introspection, and preparation for renewal.\",\n personalDescription:\n \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n businessDescription:\n \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n astrologySign: \"Libra (Seek Balance and Reconstruction)\",\n },\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nfunction addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\n// Find the most recent anniversary of the start date\nfunction getMostRecentStartDate(startDate: Date, today: Date): Date {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): CycleInfo {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(\n birthYear + i * 7,\n startDate.getMonth(),\n startDate.getDate()\n );\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n\n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7; // Start year of current age cycle\n const yearlyCycleStart = new Date(\n ageCycleStartYear + j,\n startDate.getMonth(),\n startDate.getDate()\n );\n const yearlyCycle = j + 1;\n\n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n\n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n\n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart =\n i < 6\n ? addDays(mostRecentStart, (i + 1) * cycleLength)\n : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle =\n Math.floor(\n (today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays =\n Math.floor(\n (today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays,\n };\n}\n\nfunction calculateAge(birthDate: Date, today: Date = new Date()): number {\n return today.getFullYear() - birthDate.getFullYear();\n}\n\nexport type FibonacciCycle = {\n currentAge: number;\n cycle1: ReducedValueWithSteps;\n cycle2: ReducedValueWithSteps;\n cycle3: ReducedValueWithSteps;\n cycle4: ReducedValueWithSteps;\n cycle5: ReducedValueWithSteps;\n cycle6: ReducedValueWithSteps;\n cycle7: ReducedValueWithSteps;\n};\n\nexport function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): FibonacciCycle {\n const currentAge = calculateAge(birthDate, today);\n\n const cycle1 = reduceToSingleWithSteps(currentAge);\n const cycle2 = reduceToSingleWithSteps(cycle1.reducedValue + 2);\n const cycle3 = reduceToSingleWithSteps(\n cycle1.reducedValue + cycle2.reductionSteps[0]\n );\n const cycle4 = reduceToSingleWithSteps(\n cycle2.reductionSteps[0] + cycle3.reductionSteps[0]\n );\n const cycle5 = reduceToSingleWithSteps(\n cycle3.reductionSteps[0] + cycle4.reductionSteps[0]\n );\n const cycle6 = reduceToSingleWithSteps(\n cycle4.reductionSteps[0] + cycle5.reductionSteps[0]\n );\n const cycle7 = reduceToSingleWithSteps(\n cycle5.reductionSteps[0] + cycle6.reductionSteps[0]\n );\n\n return {\n currentAge,\n cycle1,\n cycle2,\n cycle3,\n cycle4,\n cycle5,\n cycle6,\n cycle7,\n };\n}\n\nexport type PersonalPeriod = {\n startMonth: number;\n endMonth: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalMonth = {\n month: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalCycles = {\n personalYear: ReducedValueWithSteps;\n personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];\n personalMonths: [\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth\n ];\n currentPersonalPeriod: number;\n currentPersonalMonth: number;\n currentAge: number;\n lifePath: number;\n soulNumber?: ReducedValueWithSteps;\n yearUsedOnCalculations: number;\n};\n\nfunction calculateSoulNumber(firstName: string): ReducedValueWithSteps {\n const vowels = calculateGematria(firstName).vowels;\n\n return {\n reducedValue: vowels.finalValue,\n reductionSteps: vowels.reductionSteps,\n }\n}\n\n/**\n * This function wraps the month number to a 1-12 range.\n */\nfunction wrapMonth(month: number): number {\n const wrappedMonth = (((month - 1) % 12) + 12) % 12;\n\n return wrappedMonth + 1;\n}\n\n/**\n * Returns the year of the most recent birthday relative to today.\n */\nfunction getLastBirthdayYear(birthDate: Date, today: Date): number {\n const thisYearsBirthday = new Date(\n today.getFullYear(),\n birthDate.getMonth(),\n birthDate.getDate()\n );\n\n return today >= thisYearsBirthday\n ? today.getFullYear()\n : today.getFullYear() - 1;\n}\n\nexport function calculatePersonalYear(\n birthDate: Date,\n today: Date = new Date()\n): ReducedValueWithSteps {\n const { day, month } = parseDate(birthDate);\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n return reduceToSingleWithSteps(\n parseInt(day, 10) + parseInt(month, 10) + yearToUse,\n { preserveMasters: true }\n );\n}\n\nexport function calculatePersonalPeriods(\n birthDate: Date,\n yearToUse: number,\n lifePath: number,\n soulNumber: number,\n currentAge: number\n): [PersonalPeriod, PersonalPeriod, PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [PersonalPeriod, PersonalPeriod, PersonalPeriod] = [\n {\n startMonth: wrapMonth(birthMonth + 0),\n endMonth: wrapMonth(birthMonth + 3),\n value: reduceToSingleWithSteps(yearToUse + currentAge, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 4),\n endMonth: wrapMonth(birthMonth + 7),\n value: reduceToSingleWithSteps(yearToUse + lifePath, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 8),\n endMonth: wrapMonth(birthMonth + 11),\n value: reduceToSingleWithSteps(yearToUse + soulNumber, {\n preserveMasters: true,\n }),\n },\n ];\n\n return periods;\n}\n\nfunction diffInPersonalMonths(birthDate: Date, today: Date): number {\n const lastYear = getLastBirthdayYear(birthDate, today);\n const base = new Date(lastYear, birthDate.getMonth(), birthDate.getDate());\n\n let k =\n (today.getFullYear() - base.getFullYear()) * 12 +\n (today.getMonth() - base.getMonth());\n\n // Only advance to the next personal month on the birth *day* each month\n if (today.getDate() < birthDate.getDate()) {\n k -= 1;\n }\n\n if (k < 0) k = 0;\n if (k > 12) k = 12; \n\n return k;\n}\n\nexport function calculatePersonalMonths(\n birthDate: Date,\n personalYear: ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: PersonalMonth[] = [];\n for (let i = 0; i < 12; i++) {\n const m = wrapMonth(firstPersonalMonth + i);\n const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {\n preserveMasters: true,\n });\n personalMonths.push({ month: m, value });\n }\n\n const currentPersonalMonthIndex = diffInPersonalMonths(birthDate, today);\n\n return {\n personalMonths: personalMonths as PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): PersonalCycles {\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n const personalYear = calculatePersonalYear(birthDate, today);\n\n const currentAge = calculateAge(\n birthDate,\n new Date(yearToUse, today.getMonth(), today.getDate())\n );\n const { lifePath } = calculateKaabalisticLifePath(birthDate);\n const soulNumber = calculateSoulNumber(firstName);\n\n const personalPeriods =\n calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);\n\n const {\n personalMonths,\n currentPersonalMonthIndex: currentPersonalMonth,\n } = calculatePersonalMonths(birthDate, personalYear, today);\n \n // Derive the period from the month index (0–12). Clamp 12 to last period.\n const currentPersonalPeriod = Math.floor(Math.min(currentPersonalMonth, 11) / 4);\n\n return {\n currentAge,\n lifePath,\n soulNumber,\n personalYear,\n personalPeriods,\n personalMonths,\n currentPersonalPeriod,\n currentPersonalMonth,\n yearUsedOnCalculations: yearToUse,\n };\n}\n"]}
|
|
@@ -107,9 +107,11 @@ function calculateKaabalisticLifePath(birthDate) {
|
|
|
107
107
|
const isMasterLifePath = isMasterNumber(lifePath);
|
|
108
108
|
const personalMythologyNumbers = [
|
|
109
109
|
parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),
|
|
110
|
-
finalSynthesis
|
|
111
|
-
lifePath
|
|
110
|
+
finalSynthesis
|
|
112
111
|
];
|
|
112
|
+
if (finalSynthesis !== lifePath) {
|
|
113
|
+
personalMythologyNumbers.push(lifePath);
|
|
114
|
+
}
|
|
113
115
|
const reducedLifePath = reduceToSingle(lifePath);
|
|
114
116
|
if (isMasterLifePath) {
|
|
115
117
|
personalMythologyNumbers.push(reducedLifePath);
|
|
@@ -362,7 +364,11 @@ function calculateFibonacciCycle(birthDate, today) {
|
|
|
362
364
|
};
|
|
363
365
|
}
|
|
364
366
|
function calculateSoulNumber(firstName) {
|
|
365
|
-
|
|
367
|
+
const vowels = calculateGematria(firstName).vowels;
|
|
368
|
+
return {
|
|
369
|
+
reducedValue: vowels.finalValue,
|
|
370
|
+
reductionSteps: vowels.reductionSteps
|
|
371
|
+
};
|
|
366
372
|
}
|
|
367
373
|
function wrapMonth(month) {
|
|
368
374
|
const wrappedMonth = ((month - 1) % 12 + 12) % 12;
|
|
@@ -427,7 +433,7 @@ function calculatePersonalMonths(birthDate, personalYear, today) {
|
|
|
427
433
|
const { month } = parseDate(birthDate);
|
|
428
434
|
const firstPersonalMonth = parseInt(month, 10);
|
|
429
435
|
const personalMonths = [];
|
|
430
|
-
for (let i = 0; i <
|
|
436
|
+
for (let i = 0; i < 12; i++) {
|
|
431
437
|
const m = wrapMonth(firstPersonalMonth + i);
|
|
432
438
|
const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {
|
|
433
439
|
preserveMasters: true
|
|
@@ -449,7 +455,7 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
449
455
|
);
|
|
450
456
|
const { lifePath } = calculateKaabalisticLifePath(birthDate);
|
|
451
457
|
const soulNumber = calculateSoulNumber(firstName);
|
|
452
|
-
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber, currentAge);
|
|
458
|
+
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);
|
|
453
459
|
const {
|
|
454
460
|
personalMonths,
|
|
455
461
|
currentPersonalMonthIndex: currentPersonalMonth
|
|
@@ -463,10 +469,11 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
463
469
|
personalPeriods,
|
|
464
470
|
personalMonths,
|
|
465
471
|
currentPersonalPeriod,
|
|
466
|
-
currentPersonalMonth
|
|
472
|
+
currentPersonalMonth,
|
|
473
|
+
yearUsedOnCalculations: yearToUse
|
|
467
474
|
};
|
|
468
475
|
}
|
|
469
476
|
|
|
470
477
|
export { CYCLE_MEANINGS, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|
472
|
-
//# sourceMappingURL=chunk-
|
|
478
|
+
//# sourceMappingURL=chunk-6DHXZLYH.mjs.map
|
|
479
|
+
//# sourceMappingURL=chunk-6DHXZLYH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/numerology/index.ts"],"names":[],"mappings":";;;AAWA,SAAS,UAAU,IAA0D,EAAA;AAC3E,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAM,MAAA,IAAI,MAAM,kBAAkB,CAAA;AAAA;AAGp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O,OAAA;AAAA,IACL,cAAA;AAAA,IACA;AAAA,GACF;AACF;AAEO,SAAS,wBACd,SACA,EAAA,KAAA,mBAAkB,IAAA,IAAA,IAClB,SACgB,EAAA;AAChB,EAAM,MAAA,SAAA,GAAY,mBAAoB,CAAA,SAAA,EAAW,KAAK,CAAA;AAEtD,EAAM,MAAA,YAAA,GAAe,qBAAsB,CAAA,SAAA,EAAW,KAAK,CAAA;AAE3D,EAAA,MAAM,UAAa,GAAA,YAAA;AAAA,IACjB,SAAA;AAAA,IACA,IAAI,KAAK,SAAW,EAAA,KAAA,CAAM,UAAY,EAAA,KAAA,CAAM,SAAS;AAAA,GACvD;AACA,EAAA,MAAM,EAAE,QAAA,EAAa,GAAA,4BAAA,CAA6B,SAAS,CAAA;AAC3D,EAAM,MAAA,UAAA,GAAa,oBAAoB,SAAS,CAAA;AAEhD,EAAA,MAAM,kBACJ,wBAAyB,CAAA,SAAA,EAAW,WAAW,QAAU,EAAA,UAAA,CAAW,cAAc,UAAU,CAAA;AAE9F,EAAM,MAAA;AAAA,IACJ,cAAA;AAAA,IACA,yBAA2B,EAAA;AAAA,GACzB,GAAA,uBAAA,CAAwB,SAAW,EAAA,YAAA,EAAc,KAAK,CAAA;AAG1D,EAAM,MAAA,qBAAA,GAAwB,KAAK,KAAM,CAAA,IAAA,CAAK,IAAI,oBAAsB,EAAA,EAAE,IAAI,CAAC,CAAA;AAE/E,EAAO,OAAA;AAAA,IACL,UAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA,oBAAA;AAAA,IACA,sBAAwB,EAAA;AAAA,GAC1B;AACF","file":"chunk-6DHXZLYH.mjs","sourcesContent":["/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\n\nexport type ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\n};\n\nfunction parseDate(date: Date): { day: string; month: string; year: string } {\n if (!date) {\n throw new Error(\"Date is required\");\n }\n\n if (!(date instanceof Date)) {\n throw new Error(\"Date must be a Date object\");\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n\n if (formattedDate.length !== 10) {\n throw new Error(\"Date must be in the format YYYY-MM-DD or DD-MM-YYYY\");\n }\n\n const parts = formattedDate.split(/[-/]/).map((p) => p.trim());\n\n const isYYYYMMDD = parts[0].length === 4;\n\n if (isYYYYMMDD) {\n return { day: parts[2], month: parts[1], year: parts[0] };\n } else {\n return { day: parts[0], month: parts[1], year: parts[2] };\n }\n}\n\nfunction mapDatePartsToBlocksOfTwo({\n day,\n month,\n year,\n}: {\n day: string;\n month: string;\n year: string;\n}): { day: string; month: string; year1: string; year2: string } {\n return {\n day: day.padStart(2, \"0\"),\n month: month.padStart(2, \"0\"),\n year1: year.slice(0, 2),\n year2: year.slice(2),\n };\n}\n\nfunction digitSum(n: number): number {\n let s = 0;\n\n for (const ch of String(Math.abs(n))) {\n s += ch.charCodeAt(0) - 48;\n }\n\n return s;\n}\n\nexport const MASTER_NUMBERS = [11, 22, 33, 44];\n\nexport function isMasterNumber(n: number): boolean {\n return MASTER_NUMBERS.includes(n);\n}\n\nexport function reduceToSingle(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): number {\n // standard digital root with 0 allowed; never preserve masters here\n if (n === 0) {\n return 0;\n }\n\n let reduced = n;\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n }\n\n // optional tweak for exact \"00\" cases will be applied by caller, not here\n return reduced;\n}\n\nexport function reduceToSingleWithSteps(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): ReducedValueWithSteps {\n const steps = [n];\n\n if (n === 0) {\n return {\n reducedValue: 0,\n reductionSteps: steps,\n };\n }\n\n let reduced = n;\n\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n steps.push(reduced);\n }\n\n return {\n reducedValue: reduced,\n reductionSteps: steps,\n };\n}\n\nfunction reduceBlock(block: string): number {\n const n = [...block].reduce(\n (acc, curr) => acc + (curr.charCodeAt(0) - 48),\n 0\n );\n\n if (n === 0) {\n return 0;\n }\n\n return reduceToSingle(n);\n}\n\nexport type KaabalisticLifePathResult = {\n parts: {\n day: string;\n month: string;\n year1: string;\n year2: string;\n };\n reducedParts: {\n reducedDay: number;\n reducedMonth: number;\n reducedYear1: number;\n reducedYear2: number;\n };\n syntheses: {\n dayMonthSynthesis: number;\n yearSynthesis: number;\n reducedDayMonthSynthesis: number;\n reducedYearSynthesis: number;\n finalSynthesis: number;\n };\n lifePath: number;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\n/**\n * Calculate the Kaabalistic life path number based on a birth date.\n * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)\n */\nexport function calculateKaabalisticLifePath(\n birthDate: Date\n): KaabalisticLifePathResult {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const reducedDay = reduceBlock(day);\n const reducedMonth = reduceBlock(month);\n const reducedYear1 = reduceBlock(year1);\n const reducedYear2 = reduceBlock(year2);\n\n const dayMonthSynthesis = parseInt(`${reducedDay}${reducedMonth}`, 10);\n const yearSynthesis = parseInt(`${reducedYear1}${reducedYear2}`, 10);\n\n const reducedDayMonthSynthesis = reduceToSingle(dayMonthSynthesis);\n const reducedYearSynthesis = reduceToSingle(yearSynthesis);\n\n const finalSynthesis = parseInt(\n `${reducedDayMonthSynthesis}${reducedYearSynthesis}`,\n 10\n );\n\n const lifePath = reduceToSingle(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n ];\n\n if (finalSynthesis !== lifePath) {\n personalMythologyNumbers.push(lifePath);\n }\n\n const reducedLifePath = reduceToSingle(lifePath);\n if (isMasterLifePath) {\n personalMythologyNumbers.push(reducedLifePath);\n }\n\n return {\n parts: { day, month, year1, year2 },\n reducedParts: { reducedDay, reducedMonth, reducedYear1, reducedYear2 },\n syntheses: {\n dayMonthSynthesis,\n yearSynthesis,\n reducedDayMonthSynthesis,\n reducedYearSynthesis,\n finalSynthesis,\n },\n lifePath,\n personalMythologyNumbers,\n };\n}\n\nexport type StraightAcrossReductionLifePathResult = {\n lifePath: number;\n reductionSteps: number[];\n};\n\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): StraightAcrossReductionLifePathResult {\n const { day, month, year } = parseDate(birthDate);\n\n const result = reduceToSingleWithSteps(\n parseInt(`${day}${month}${year}`, 10),\n { preserveMasters: true }\n );\n\n return {\n lifePath: result.reducedValue,\n reductionSteps: result.reductionSteps,\n };\n}\n\nexport type DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n};\n\nexport function getDateEnergies(birthDate: Date): DateEnergies {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const dayEnergy = reduceToSingleWithSteps(parseInt(day, 10), {\n preserveMasters: true,\n });\n const monthEnergy = reduceToSingleWithSteps(parseInt(month, 10), {\n preserveMasters: true,\n });\n const yearEnergy = reduceToSingleWithSteps(parseInt(year1 + year2, 10), {\n preserveMasters: true,\n });\n\n return {\n dayEnergy,\n monthEnergy,\n yearEnergy,\n };\n}\n\nexport type Challenges = {\n day: number;\n month: number;\n year: number;\n mainChallenge: number;\n subChallenge1: number;\n subChallenge2: number;\n};\n\nexport function calculateChallenges(birthDate: Date): Challenges {\n const { day, month, year } = parseDate(birthDate);\n\n const reducedDay = reduceToSingle(parseInt(day, 10));\n const reducedMonth = reduceToSingle(parseInt(month, 10));\n const reducedYear = reduceToSingle(parseInt(year, 10));\n\n const subChallenge1 = Math.abs(reducedMonth - reducedDay);\n const subChallenge2 = Math.abs(reducedDay - reducedYear);\n const mainChallenge = Math.abs(subChallenge1 - subChallenge2);\n\n return {\n day: reducedDay,\n month: reducedMonth,\n year: reducedYear,\n mainChallenge,\n subChallenge1,\n subChallenge2,\n };\n}\n\nexport const CYCLE_MEANINGS = [\n {\n title: \"Learning\",\n shortDescription:\n \"A period for assertive action and learning through direct experience.\",\n personalDescription:\n \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n businessDescription:\n \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n astrologySign: \"Aries (Actions Have Consequences)\",\n },\n {\n title: \"Hard Work\",\n shortDescription:\n \"A time for diligent effort and adaptability to temporary changes.\",\n personalDescription:\n \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n businessDescription:\n \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n astrologySign: \"Taurus (Stop Being Stubborn)\",\n },\n {\n title: \"Friendship\",\n shortDescription:\n \"A dynamic phase for ambitious projects and strengthening relationships.\",\n personalDescription:\n \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n businessDescription:\n \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n astrologySign: \"Gemini (Communication is Power)\",\n },\n {\n title: \"Opportunities\",\n shortDescription:\n \"An intellectually fertile time for creativity and quick decision-making.\",\n personalDescription:\n \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n businessDescription:\n \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n astrologySign: \"Cancer (Nurture Mental Growth)\",\n },\n {\n title: \"Tears/Decision\",\n shortDescription:\n \"The most prosperous phase for financial resolution and spiritual advancement.\",\n personalDescription:\n \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n businessDescription:\n \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n astrologySign: \"Leo (Balance Ego and Generosity)\",\n },\n {\n title: \"Triple Blessing\",\n shortDescription:\n \"Perfect for pleasures, social activities, and creative pursuits.\",\n personalDescription:\n \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n businessDescription:\n \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n astrologySign: \"Virgo (Organize Your Pleasures)\",\n },\n {\n title: \"Rest\",\n shortDescription:\n \"A period of rest, introspection, and preparation for renewal.\",\n personalDescription:\n \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n businessDescription:\n \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n astrologySign: \"Libra (Seek Balance and Reconstruction)\",\n },\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nfunction addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\n// Find the most recent anniversary of the start date\nfunction getMostRecentStartDate(startDate: Date, today: Date): Date {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): CycleInfo {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(\n birthYear + i * 7,\n startDate.getMonth(),\n startDate.getDate()\n );\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n\n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7; // Start year of current age cycle\n const yearlyCycleStart = new Date(\n ageCycleStartYear + j,\n startDate.getMonth(),\n startDate.getDate()\n );\n const yearlyCycle = j + 1;\n\n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n\n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n\n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart =\n i < 6\n ? addDays(mostRecentStart, (i + 1) * cycleLength)\n : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle =\n Math.floor(\n (today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays =\n Math.floor(\n (today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays,\n };\n}\n\nfunction calculateAge(birthDate: Date, today: Date = new Date()): number {\n return today.getFullYear() - birthDate.getFullYear();\n}\n\nexport type FibonacciCycle = {\n currentAge: number;\n cycle1: ReducedValueWithSteps;\n cycle2: ReducedValueWithSteps;\n cycle3: ReducedValueWithSteps;\n cycle4: ReducedValueWithSteps;\n cycle5: ReducedValueWithSteps;\n cycle6: ReducedValueWithSteps;\n cycle7: ReducedValueWithSteps;\n};\n\nexport function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): FibonacciCycle {\n const currentAge = calculateAge(birthDate, today);\n\n const cycle1 = reduceToSingleWithSteps(currentAge);\n const cycle2 = reduceToSingleWithSteps(cycle1.reducedValue + 2);\n const cycle3 = reduceToSingleWithSteps(\n cycle1.reducedValue + cycle2.reductionSteps[0]\n );\n const cycle4 = reduceToSingleWithSteps(\n cycle2.reductionSteps[0] + cycle3.reductionSteps[0]\n );\n const cycle5 = reduceToSingleWithSteps(\n cycle3.reductionSteps[0] + cycle4.reductionSteps[0]\n );\n const cycle6 = reduceToSingleWithSteps(\n cycle4.reductionSteps[0] + cycle5.reductionSteps[0]\n );\n const cycle7 = reduceToSingleWithSteps(\n cycle5.reductionSteps[0] + cycle6.reductionSteps[0]\n );\n\n return {\n currentAge,\n cycle1,\n cycle2,\n cycle3,\n cycle4,\n cycle5,\n cycle6,\n cycle7,\n };\n}\n\nexport type PersonalPeriod = {\n startMonth: number;\n endMonth: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalMonth = {\n month: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalCycles = {\n personalYear: ReducedValueWithSteps;\n personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];\n personalMonths: [\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth\n ];\n currentPersonalPeriod: number;\n currentPersonalMonth: number;\n currentAge: number;\n lifePath: number;\n soulNumber?: ReducedValueWithSteps;\n yearUsedOnCalculations: number;\n};\n\nfunction calculateSoulNumber(firstName: string): ReducedValueWithSteps {\n const vowels = calculateGematria(firstName).vowels;\n\n return {\n reducedValue: vowels.finalValue,\n reductionSteps: vowels.reductionSteps,\n }\n}\n\n/**\n * This function wraps the month number to a 1-12 range.\n */\nfunction wrapMonth(month: number): number {\n const wrappedMonth = (((month - 1) % 12) + 12) % 12;\n\n return wrappedMonth + 1;\n}\n\n/**\n * Returns the year of the most recent birthday relative to today.\n */\nfunction getLastBirthdayYear(birthDate: Date, today: Date): number {\n const thisYearsBirthday = new Date(\n today.getFullYear(),\n birthDate.getMonth(),\n birthDate.getDate()\n );\n\n return today >= thisYearsBirthday\n ? today.getFullYear()\n : today.getFullYear() - 1;\n}\n\nexport function calculatePersonalYear(\n birthDate: Date,\n today: Date = new Date()\n): ReducedValueWithSteps {\n const { day, month } = parseDate(birthDate);\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n return reduceToSingleWithSteps(\n parseInt(day, 10) + parseInt(month, 10) + yearToUse,\n { preserveMasters: true }\n );\n}\n\nexport function calculatePersonalPeriods(\n birthDate: Date,\n yearToUse: number,\n lifePath: number,\n soulNumber: number,\n currentAge: number\n): [PersonalPeriod, PersonalPeriod, PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [PersonalPeriod, PersonalPeriod, PersonalPeriod] = [\n {\n startMonth: wrapMonth(birthMonth + 0),\n endMonth: wrapMonth(birthMonth + 3),\n value: reduceToSingleWithSteps(yearToUse + currentAge, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 4),\n endMonth: wrapMonth(birthMonth + 7),\n value: reduceToSingleWithSteps(yearToUse + lifePath, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 8),\n endMonth: wrapMonth(birthMonth + 11),\n value: reduceToSingleWithSteps(yearToUse + soulNumber, {\n preserveMasters: true,\n }),\n },\n ];\n\n return periods;\n}\n\nfunction diffInPersonalMonths(birthDate: Date, today: Date): number {\n const lastYear = getLastBirthdayYear(birthDate, today);\n const base = new Date(lastYear, birthDate.getMonth(), birthDate.getDate());\n\n let k =\n (today.getFullYear() - base.getFullYear()) * 12 +\n (today.getMonth() - base.getMonth());\n\n // Only advance to the next personal month on the birth *day* each month\n if (today.getDate() < birthDate.getDate()) {\n k -= 1;\n }\n\n if (k < 0) k = 0;\n if (k > 12) k = 12; \n\n return k;\n}\n\nexport function calculatePersonalMonths(\n birthDate: Date,\n personalYear: ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: PersonalMonth[] = [];\n for (let i = 0; i < 12; i++) {\n const m = wrapMonth(firstPersonalMonth + i);\n const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {\n preserveMasters: true,\n });\n personalMonths.push({ month: m, value });\n }\n\n const currentPersonalMonthIndex = diffInPersonalMonths(birthDate, today);\n\n return {\n personalMonths: personalMonths as PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): PersonalCycles {\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n const personalYear = calculatePersonalYear(birthDate, today);\n\n const currentAge = calculateAge(\n birthDate,\n new Date(yearToUse, today.getMonth(), today.getDate())\n );\n const { lifePath } = calculateKaabalisticLifePath(birthDate);\n const soulNumber = calculateSoulNumber(firstName);\n\n const personalPeriods =\n calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);\n\n const {\n personalMonths,\n currentPersonalMonthIndex: currentPersonalMonth,\n } = calculatePersonalMonths(birthDate, personalYear, today);\n \n // Derive the period from the month index (0–12). Clamp 12 to last period.\n const currentPersonalPeriod = Math.floor(Math.min(currentPersonalMonth, 11) / 4);\n\n return {\n currentAge,\n lifePath,\n soulNumber,\n personalYear,\n personalPeriods,\n personalMonths,\n currentPersonalPeriod,\n currentPersonalMonth,\n yearUsedOnCalculations: yearToUse,\n };\n}\n"]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// src/ifa/index.ts
|
|
2
|
+
function calculateOdu(date) {
|
|
3
|
+
const day = date.getDate().toString().padStart(2, "0");
|
|
4
|
+
const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
5
|
+
const year = date.getFullYear().toString();
|
|
6
|
+
const leftNumbers = [
|
|
7
|
+
parseInt(day[0]),
|
|
8
|
+
// First digit of day
|
|
9
|
+
parseInt(month[0]),
|
|
10
|
+
// First digit of month
|
|
11
|
+
parseInt(year[0]),
|
|
12
|
+
// First digit of year
|
|
13
|
+
parseInt(year[2])
|
|
14
|
+
// Third digit of year
|
|
15
|
+
];
|
|
16
|
+
const rightNumbers = [
|
|
17
|
+
parseInt(day[1]),
|
|
18
|
+
// Second digit of day
|
|
19
|
+
parseInt(month[1]),
|
|
20
|
+
// Second digit of month
|
|
21
|
+
parseInt(year[1]),
|
|
22
|
+
// Second digit of year
|
|
23
|
+
parseInt(year[3])
|
|
24
|
+
// Fourth digit of year
|
|
25
|
+
];
|
|
26
|
+
function reduceNumber(num) {
|
|
27
|
+
if (num <= 16) return num;
|
|
28
|
+
return reduceNumber(num.toString().split("").reduce((a, b) => a + parseInt(b), 0));
|
|
29
|
+
}
|
|
30
|
+
const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);
|
|
31
|
+
const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);
|
|
32
|
+
const north = reduceNumber(rawLeftSum);
|
|
33
|
+
const south = reduceNumber(rawRightSum);
|
|
34
|
+
const east = reduceNumber(north + south);
|
|
35
|
+
const west = reduceNumber(north + south + east);
|
|
36
|
+
const center = reduceNumber(north + south + east + west);
|
|
37
|
+
return {
|
|
38
|
+
leftNumbers,
|
|
39
|
+
rightNumbers,
|
|
40
|
+
north,
|
|
41
|
+
south,
|
|
42
|
+
east,
|
|
43
|
+
west,
|
|
44
|
+
center
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { calculateOdu };
|
|
49
|
+
//# sourceMappingURL=chunk-YTZCZRJG.mjs.map
|
|
50
|
+
//# sourceMappingURL=chunk-YTZCZRJG.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ifa/index.ts"],"names":[],"mappings":";AAgBO,SAAS,aAAa,IAAwB,EAAA;AAEnD,EAAM,MAAA,GAAA,GAAM,KAAK,OAAQ,EAAA,CAAE,UAAW,CAAA,QAAA,CAAS,GAAG,GAAG,CAAA;AACrD,EAAM,MAAA,KAAA,GAAA,CAAS,KAAK,QAAS,EAAA,GAAI,GAAG,QAAS,EAAA,CAAE,QAAS,CAAA,CAAA,EAAG,GAAG,CAAA;AAC9D,EAAA,MAAM,IAAO,GAAA,IAAA,CAAK,WAAY,EAAA,CAAE,QAAS,EAAA;AAGzC,EAAA,MAAM,WAAc,GAAA;AAAA,IAClB,QAAA,CAAS,GAAI,CAAA,CAAC,CAAC,CAAA;AAAA;AAAA,IACf,QAAA,CAAS,KAAM,CAAA,CAAC,CAAC,CAAA;AAAA;AAAA,IACjB,QAAA,CAAS,IAAK,CAAA,CAAC,CAAC,CAAA;AAAA;AAAA,IAChB,QAAA,CAAS,IAAK,CAAA,CAAC,CAAC;AAAA;AAAA,GAClB;AAEA,EAAA,MAAM,YAAe,GAAA;AAAA,IACnB,QAAA,CAAS,GAAI,CAAA,CAAC,CAAC,CAAA;AAAA;AAAA,IACf,QAAA,CAAS,KAAM,CAAA,CAAC,CAAC,CAAA;AAAA;AAAA,IACjB,QAAA,CAAS,IAAK,CAAA,CAAC,CAAC,CAAA;AAAA;AAAA,IAChB,QAAA,CAAS,IAAK,CAAA,CAAC,CAAC;AAAA;AAAA,GAClB;AAGA,EAAA,SAAS,aAAa,GAAqB,EAAA;AACzC,IAAI,IAAA,GAAA,IAAO,IAAW,OAAA,GAAA;AACtB,IAAA,OAAO,aAAa,GAAI,CAAA,QAAA,EAAW,CAAA,KAAA,CAAM,EAAE,CAAE,CAAA,MAAA,CAAO,CAAC,CAAA,EAAG,MAAM,CAAI,GAAA,QAAA,CAAS,CAAC,CAAA,EAAG,CAAC,CAAC,CAAA;AAAA;AAInF,EAAM,MAAA,UAAA,GAAa,YAAY,MAAO,CAAA,CAAC,GAAG,CAAM,KAAA,CAAA,GAAI,GAAG,CAAC,CAAA;AACxD,EAAM,MAAA,WAAA,GAAc,aAAa,MAAO,CAAA,CAAC,GAAG,CAAM,KAAA,CAAA,GAAI,GAAG,CAAC,CAAA;AAG1D,EAAM,MAAA,KAAA,GAAQ,aAAa,UAAU,CAAA;AACrC,EAAM,MAAA,KAAA,GAAQ,aAAa,WAAW,CAAA;AACtC,EAAM,MAAA,IAAA,GAAO,YAAa,CAAA,KAAA,GAAQ,KAAK,CAAA;AACvC,EAAA,MAAM,IAAO,GAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,GAAQ,IAAI,CAAA;AAC9C,EAAA,MAAM,MAAS,GAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,GAAQ,OAAO,IAAI,CAAA;AAEvD,EAAO,OAAA;AAAA,IACL,WAAA;AAAA,IACA,YAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-YTZCZRJG.mjs","sourcesContent":["\nexport type OduNumbers = {\n leftNumbers: number[],\n rightNumbers: number[],\n north: number,\n south: number,\n east: number,\n west: number,\n center: number\n}\n\n/**\n * Calculate the Odu numbers based on a date\n * @param date - Date object\n * @returns Odu numbers\n */\nexport function calculateOdu(date: Date): OduNumbers {\n // Format the date into DD/MM/YYYY\n const day = date.getDate().toString().padStart(2, '0');\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const year = date.getFullYear().toString();\n\n // Split into left and right columns\n const leftNumbers = [\n parseInt(day[0]), // First digit of day\n parseInt(month[0]), // First digit of month\n parseInt(year[0]), // First digit of year\n parseInt(year[2]) // Third digit of year\n ];\n\n const rightNumbers = [\n parseInt(day[1]), // Second digit of day\n parseInt(month[1]), // Second digit of month\n parseInt(year[1]), // Second digit of year\n parseInt(year[3]) // Fourth digit of year\n ];\n\n // Reduce numbers if they're greater than 16\n function reduceNumber(num: number): number {\n if (num <= 16) return num;\n return reduceNumber(num.toString().split('').reduce((a, b) => a + parseInt(b), 0));\n }\n\n // Calculate initial sums\n const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);\n const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);\n\n // Calculate and reduce each direction\n const north = reduceNumber(rawLeftSum);\n const south = reduceNumber(rawRightSum);\n const east = reduceNumber(north + south);\n const west = reduceNumber(north + south + east);\n const center = reduceNumber(north + south + east + west);\n\n return {\n leftNumbers,\n rightNumbers,\n north,\n south,\n east,\n west,\n center\n };\n}"]}
|
package/dist/ifa/index.d.mts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Calculate the Odu numbers based on a date
|
|
3
|
-
* @param date - Date object
|
|
4
|
-
* @returns Odu numbers
|
|
5
|
-
*/
|
|
6
|
-
declare function calculateOdu(date: Date): {
|
|
1
|
+
type OduNumbers = {
|
|
7
2
|
leftNumbers: number[];
|
|
8
3
|
rightNumbers: number[];
|
|
9
4
|
north: number;
|
|
@@ -12,5 +7,11 @@ declare function calculateOdu(date: Date): {
|
|
|
12
7
|
west: number;
|
|
13
8
|
center: number;
|
|
14
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Calculate the Odu numbers based on a date
|
|
12
|
+
* @param date - Date object
|
|
13
|
+
* @returns Odu numbers
|
|
14
|
+
*/
|
|
15
|
+
declare function calculateOdu(date: Date): OduNumbers;
|
|
15
16
|
|
|
16
|
-
export { calculateOdu };
|
|
17
|
+
export { type OduNumbers, calculateOdu };
|
package/dist/ifa/index.d.ts
CHANGED
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Calculate the Odu numbers based on a date
|
|
3
|
-
* @param date - Date object
|
|
4
|
-
* @returns Odu numbers
|
|
5
|
-
*/
|
|
6
|
-
declare function calculateOdu(date: Date): {
|
|
1
|
+
type OduNumbers = {
|
|
7
2
|
leftNumbers: number[];
|
|
8
3
|
rightNumbers: number[];
|
|
9
4
|
north: number;
|
|
@@ -12,5 +7,11 @@ declare function calculateOdu(date: Date): {
|
|
|
12
7
|
west: number;
|
|
13
8
|
center: number;
|
|
14
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* Calculate the Odu numbers based on a date
|
|
12
|
+
* @param date - Date object
|
|
13
|
+
* @returns Odu numbers
|
|
14
|
+
*/
|
|
15
|
+
declare function calculateOdu(date: Date): OduNumbers;
|
|
15
16
|
|
|
16
|
-
export { calculateOdu };
|
|
17
|
+
export { type OduNumbers, calculateOdu };
|
package/dist/ifa/index.js
CHANGED
|
@@ -1,54 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunk3WVZRLPG_js = require('../chunk-3WVZRLPG.js');
|
|
3
4
|
require('../chunk-2TUXWMP5.js');
|
|
4
5
|
|
|
5
|
-
// src/ifa/index.ts
|
|
6
|
-
function calculateOdu(date) {
|
|
7
|
-
const day = date.getDate().toString().padStart(2, "0");
|
|
8
|
-
const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
9
|
-
const year = date.getFullYear().toString();
|
|
10
|
-
const leftNumbers = [
|
|
11
|
-
parseInt(day[0]),
|
|
12
|
-
// First digit of day
|
|
13
|
-
parseInt(month[0]),
|
|
14
|
-
// First digit of month
|
|
15
|
-
parseInt(year[0]),
|
|
16
|
-
// First digit of year
|
|
17
|
-
parseInt(year[2])
|
|
18
|
-
// Third digit of year
|
|
19
|
-
];
|
|
20
|
-
const rightNumbers = [
|
|
21
|
-
parseInt(day[1]),
|
|
22
|
-
// Second digit of day
|
|
23
|
-
parseInt(month[1]),
|
|
24
|
-
// Second digit of month
|
|
25
|
-
parseInt(year[1]),
|
|
26
|
-
// Second digit of year
|
|
27
|
-
parseInt(year[3])
|
|
28
|
-
// Fourth digit of year
|
|
29
|
-
];
|
|
30
|
-
function reduceNumber(num) {
|
|
31
|
-
if (num <= 16) return num;
|
|
32
|
-
return reduceNumber(num.toString().split("").reduce((a, b) => a + parseInt(b), 0));
|
|
33
|
-
}
|
|
34
|
-
const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);
|
|
35
|
-
const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);
|
|
36
|
-
const north = reduceNumber(rawLeftSum);
|
|
37
|
-
const south = reduceNumber(rawRightSum);
|
|
38
|
-
const east = reduceNumber(north + south);
|
|
39
|
-
const west = reduceNumber(north + south + east);
|
|
40
|
-
const center = reduceNumber(north + south + east + west);
|
|
41
|
-
return {
|
|
42
|
-
leftNumbers,
|
|
43
|
-
rightNumbers,
|
|
44
|
-
north,
|
|
45
|
-
south,
|
|
46
|
-
east,
|
|
47
|
-
west,
|
|
48
|
-
center
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
6
|
|
|
52
|
-
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "calculateOdu", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunk3WVZRLPG_js.calculateOdu; }
|
|
11
|
+
});
|
|
53
12
|
//# sourceMappingURL=index.js.map
|
|
54
13
|
//# sourceMappingURL=index.js.map
|
package/dist/ifa/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/dist/ifa/index.mjs
CHANGED
|
@@ -1,52 +1,4 @@
|
|
|
1
|
+
export { calculateOdu } from '../chunk-YTZCZRJG.mjs';
|
|
1
2
|
import '../chunk-PY5SMMJB.mjs';
|
|
2
|
-
|
|
3
|
-
// src/ifa/index.ts
|
|
4
|
-
function calculateOdu(date) {
|
|
5
|
-
const day = date.getDate().toString().padStart(2, "0");
|
|
6
|
-
const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
7
|
-
const year = date.getFullYear().toString();
|
|
8
|
-
const leftNumbers = [
|
|
9
|
-
parseInt(day[0]),
|
|
10
|
-
// First digit of day
|
|
11
|
-
parseInt(month[0]),
|
|
12
|
-
// First digit of month
|
|
13
|
-
parseInt(year[0]),
|
|
14
|
-
// First digit of year
|
|
15
|
-
parseInt(year[2])
|
|
16
|
-
// Third digit of year
|
|
17
|
-
];
|
|
18
|
-
const rightNumbers = [
|
|
19
|
-
parseInt(day[1]),
|
|
20
|
-
// Second digit of day
|
|
21
|
-
parseInt(month[1]),
|
|
22
|
-
// Second digit of month
|
|
23
|
-
parseInt(year[1]),
|
|
24
|
-
// Second digit of year
|
|
25
|
-
parseInt(year[3])
|
|
26
|
-
// Fourth digit of year
|
|
27
|
-
];
|
|
28
|
-
function reduceNumber(num) {
|
|
29
|
-
if (num <= 16) return num;
|
|
30
|
-
return reduceNumber(num.toString().split("").reduce((a, b) => a + parseInt(b), 0));
|
|
31
|
-
}
|
|
32
|
-
const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);
|
|
33
|
-
const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);
|
|
34
|
-
const north = reduceNumber(rawLeftSum);
|
|
35
|
-
const south = reduceNumber(rawRightSum);
|
|
36
|
-
const east = reduceNumber(north + south);
|
|
37
|
-
const west = reduceNumber(north + south + east);
|
|
38
|
-
const center = reduceNumber(north + south + east + west);
|
|
39
|
-
return {
|
|
40
|
-
leftNumbers,
|
|
41
|
-
rightNumbers,
|
|
42
|
-
north,
|
|
43
|
-
south,
|
|
44
|
-
east,
|
|
45
|
-
west,
|
|
46
|
-
center
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export { calculateOdu };
|
|
51
3
|
//# sourceMappingURL=index.mjs.map
|
|
52
4
|
//# sourceMappingURL=index.mjs.map
|
package/dist/ifa/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
package/dist/index.d.mts
CHANGED
|
@@ -2,5 +2,6 @@ export { BirthChart, BirthChartOptions, CalcFlag, HouseSystem, Planet, closeSwis
|
|
|
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
4
|
export { calculateGematria } from './gematria/index.mjs';
|
|
5
|
-
export {
|
|
5
|
+
export { OduNumbers, calculateOdu } from './ifa/index.mjs';
|
|
6
|
+
export { CYCLE_MEANINGS, Challenges, Cycle, CycleInfo, DateEnergies, FibonacciCycle, KaabalisticLifePathResult, MASTER_NUMBERS, PersonalCycles, PersonalMonth, PersonalPeriod, ReducedValueWithSteps, StraightAcrossReductionLifePathResult, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './numerology/index.mjs';
|
|
6
7
|
export { ARKANNUS, Deck, MajorArcana, TarotCard, majorArcana, shuffleTarotDeck } from './tarot/index.mjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -2,5 +2,6 @@ export { BirthChart, BirthChartOptions, CalcFlag, HouseSystem, Planet, closeSwis
|
|
|
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
4
|
export { calculateGematria } from './gematria/index.js';
|
|
5
|
-
export {
|
|
5
|
+
export { OduNumbers, calculateOdu } from './ifa/index.js';
|
|
6
|
+
export { CYCLE_MEANINGS, Challenges, Cycle, CycleInfo, DateEnergies, FibonacciCycle, KaabalisticLifePathResult, MASTER_NUMBERS, PersonalCycles, PersonalMonth, PersonalPeriod, ReducedValueWithSteps, StraightAcrossReductionLifePathResult, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './numerology/index.js';
|
|
6
7
|
export { ARKANNUS, Deck, MajorArcana, TarotCard, majorArcana, shuffleTarotDeck } from './tarot/index.js';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkSZXDOHKV_js = require('./chunk-SZXDOHKV.js');
|
|
4
4
|
require('./chunk-AD7T42HJ.js');
|
|
5
|
-
var
|
|
5
|
+
var chunk3WVZRLPG_js = require('./chunk-3WVZRLPG.js');
|
|
6
|
+
var chunk4IMODQPK_js = require('./chunk-4IMODQPK.js');
|
|
6
7
|
var chunkJJ76YVMI_js = require('./chunk-JJ76YVMI.js');
|
|
7
8
|
var chunk7CAIYKIO_js = require('./chunk-7CAIYKIO.js');
|
|
8
9
|
var chunkUXQDJUG6_js = require('./chunk-UXQDJUG6.js');
|
|
@@ -42,65 +43,69 @@ Object.defineProperty(exports, "getZodiacPosition", {
|
|
|
42
43
|
enumerable: true,
|
|
43
44
|
get: function () { return chunkSZXDOHKV_js.getZodiacPosition; }
|
|
44
45
|
});
|
|
46
|
+
Object.defineProperty(exports, "calculateOdu", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return chunk3WVZRLPG_js.calculateOdu; }
|
|
49
|
+
});
|
|
45
50
|
Object.defineProperty(exports, "CYCLE_MEANINGS", {
|
|
46
51
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk4IMODQPK_js.CYCLE_MEANINGS; }
|
|
48
53
|
});
|
|
49
54
|
Object.defineProperty(exports, "MASTER_NUMBERS", {
|
|
50
55
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunk4IMODQPK_js.MASTER_NUMBERS; }
|
|
52
57
|
});
|
|
53
58
|
Object.defineProperty(exports, "calculateChallenges", {
|
|
54
59
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunk4IMODQPK_js.calculateChallenges; }
|
|
56
61
|
});
|
|
57
62
|
Object.defineProperty(exports, "calculateCycles", {
|
|
58
63
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunk4IMODQPK_js.calculateCycles; }
|
|
60
65
|
});
|
|
61
66
|
Object.defineProperty(exports, "calculateFibonacciCycle", {
|
|
62
67
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunk4IMODQPK_js.calculateFibonacciCycle; }
|
|
64
69
|
});
|
|
65
70
|
Object.defineProperty(exports, "calculateKaabalisticLifePath", {
|
|
66
71
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunk4IMODQPK_js.calculateKaabalisticLifePath; }
|
|
68
73
|
});
|
|
69
74
|
Object.defineProperty(exports, "calculatePersonalCycles", {
|
|
70
75
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalCycles; }
|
|
72
77
|
});
|
|
73
78
|
Object.defineProperty(exports, "calculatePersonalMonths", {
|
|
74
79
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalMonths; }
|
|
76
81
|
});
|
|
77
82
|
Object.defineProperty(exports, "calculatePersonalPeriods", {
|
|
78
83
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalPeriods; }
|
|
80
85
|
});
|
|
81
86
|
Object.defineProperty(exports, "calculatePersonalYear", {
|
|
82
87
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalYear; }
|
|
84
89
|
});
|
|
85
90
|
Object.defineProperty(exports, "calculateStraightAcrossReductionLifePath", {
|
|
86
91
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunk4IMODQPK_js.calculateStraightAcrossReductionLifePath; }
|
|
88
93
|
});
|
|
89
94
|
Object.defineProperty(exports, "getDateEnergies", {
|
|
90
95
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunk4IMODQPK_js.getDateEnergies; }
|
|
92
97
|
});
|
|
93
98
|
Object.defineProperty(exports, "isMasterNumber", {
|
|
94
99
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunk4IMODQPK_js.isMasterNumber; }
|
|
96
101
|
});
|
|
97
102
|
Object.defineProperty(exports, "reduceToSingle", {
|
|
98
103
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunk4IMODQPK_js.reduceToSingle; }
|
|
100
105
|
});
|
|
101
106
|
Object.defineProperty(exports, "reduceToSingleWithSteps", {
|
|
102
107
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunk4IMODQPK_js.reduceToSingleWithSteps; }
|
|
104
109
|
});
|
|
105
110
|
Object.defineProperty(exports, "calculateGematria", {
|
|
106
111
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { CalcFlag, HouseSystem, Planet, closeSwissEph, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition } from './chunk-AV7WBVPS.mjs';
|
|
2
2
|
import './chunk-RFSO3JRG.mjs';
|
|
3
|
-
export {
|
|
3
|
+
export { calculateOdu } from './chunk-YTZCZRJG.mjs';
|
|
4
|
+
export { CYCLE_MEANINGS, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from './chunk-6DHXZLYH.mjs';
|
|
4
5
|
export { calculateGematria } from './chunk-5ISXTWFX.mjs';
|
|
5
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-3LUQXNH6.mjs';
|
|
6
7
|
export { ARKANNUS, majorArcana, shuffleTarotDeck } from './chunk-Q4N3V34Y.mjs';
|
|
@@ -139,7 +139,8 @@ type PersonalCycles = {
|
|
|
139
139
|
currentPersonalMonth: number;
|
|
140
140
|
currentAge: number;
|
|
141
141
|
lifePath: number;
|
|
142
|
-
soulNumber?:
|
|
142
|
+
soulNumber?: ReducedValueWithSteps;
|
|
143
|
+
yearUsedOnCalculations: number;
|
|
143
144
|
};
|
|
144
145
|
declare function calculatePersonalYear(birthDate: Date, today?: Date): ReducedValueWithSteps;
|
|
145
146
|
declare function calculatePersonalPeriods(birthDate: Date, yearToUse: number, lifePath: number, soulNumber: number, currentAge: number): [PersonalPeriod, PersonalPeriod, PersonalPeriod];
|
|
@@ -149,4 +150,4 @@ declare function calculatePersonalMonths(birthDate: Date, personalYear: ReducedV
|
|
|
149
150
|
};
|
|
150
151
|
declare function calculatePersonalCycles(birthDate: Date, today: Date | undefined, firstName: string): PersonalCycles;
|
|
151
152
|
|
|
152
|
-
export { CYCLE_MEANINGS, type Cycle, type CycleInfo, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
|
|
153
|
+
export { CYCLE_MEANINGS, type Challenges, type Cycle, type CycleInfo, type DateEnergies, type FibonacciCycle, type KaabalisticLifePathResult, MASTER_NUMBERS, type PersonalCycles, type PersonalMonth, type PersonalPeriod, type ReducedValueWithSteps, type StraightAcrossReductionLifePathResult, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
|
|
@@ -139,7 +139,8 @@ type PersonalCycles = {
|
|
|
139
139
|
currentPersonalMonth: number;
|
|
140
140
|
currentAge: number;
|
|
141
141
|
lifePath: number;
|
|
142
|
-
soulNumber?:
|
|
142
|
+
soulNumber?: ReducedValueWithSteps;
|
|
143
|
+
yearUsedOnCalculations: number;
|
|
143
144
|
};
|
|
144
145
|
declare function calculatePersonalYear(birthDate: Date, today?: Date): ReducedValueWithSteps;
|
|
145
146
|
declare function calculatePersonalPeriods(birthDate: Date, yearToUse: number, lifePath: number, soulNumber: number, currentAge: number): [PersonalPeriod, PersonalPeriod, PersonalPeriod];
|
|
@@ -149,4 +150,4 @@ declare function calculatePersonalMonths(birthDate: Date, personalYear: ReducedV
|
|
|
149
150
|
};
|
|
150
151
|
declare function calculatePersonalCycles(birthDate: Date, today: Date | undefined, firstName: string): PersonalCycles;
|
|
151
152
|
|
|
152
|
-
export { CYCLE_MEANINGS, type Cycle, type CycleInfo, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
|
|
153
|
+
export { CYCLE_MEANINGS, type Challenges, type Cycle, type CycleInfo, type DateEnergies, type FibonacciCycle, type KaabalisticLifePathResult, MASTER_NUMBERS, type PersonalCycles, type PersonalMonth, type PersonalPeriod, type ReducedValueWithSteps, type StraightAcrossReductionLifePathResult, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
|
package/dist/numerology/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4IMODQPK_js = require('../chunk-4IMODQPK.js');
|
|
4
4
|
require('../chunk-JJ76YVMI.js');
|
|
5
5
|
require('../chunk-7CAIYKIO.js');
|
|
6
6
|
require('../chunk-2TUXWMP5.js');
|
|
@@ -9,63 +9,63 @@ require('../chunk-2TUXWMP5.js');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "CYCLE_MEANINGS", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunk4IMODQPK_js.CYCLE_MEANINGS; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "MASTER_NUMBERS", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunk4IMODQPK_js.MASTER_NUMBERS; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "calculateChallenges", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunk4IMODQPK_js.calculateChallenges; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "calculateCycles", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunk4IMODQPK_js.calculateCycles; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "calculateFibonacciCycle", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunk4IMODQPK_js.calculateFibonacciCycle; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "calculateKaabalisticLifePath", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunk4IMODQPK_js.calculateKaabalisticLifePath; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "calculatePersonalCycles", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalCycles; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "calculatePersonalMonths", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalMonths; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "calculatePersonalPeriods", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalPeriods; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "calculatePersonalYear", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunk4IMODQPK_js.calculatePersonalYear; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "calculateStraightAcrossReductionLifePath", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunk4IMODQPK_js.calculateStraightAcrossReductionLifePath; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "getDateEnergies", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunk4IMODQPK_js.getDateEnergies; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "isMasterNumber", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunk4IMODQPK_js.isMasterNumber; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "reduceToSingle", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunk4IMODQPK_js.reduceToSingle; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "reduceToSingleWithSteps", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunk4IMODQPK_js.reduceToSingleWithSteps; }
|
|
69
69
|
});
|
|
70
70
|
//# sourceMappingURL=index.js.map
|
|
71
71
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { CYCLE_MEANINGS, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from '../chunk-
|
|
1
|
+
export { CYCLE_MEANINGS, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps } from '../chunk-6DHXZLYH.mjs';
|
|
2
2
|
import '../chunk-5ISXTWFX.mjs';
|
|
3
3
|
import '../chunk-3LUQXNH6.mjs';
|
|
4
4
|
import '../chunk-PY5SMMJB.mjs';
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/numerology/index.ts"],"names":["calculateGematria"],"mappings":";;;;;AAWA,SAAS,UAAU,IAA0D,EAAA;AAC3E,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAM,MAAA,IAAI,MAAM,kBAAkB,CAAA;AAAA;AAGpC,EAAI,IAAA,EAAE,gBAAgB,IAAO,CAAA,EAAA;AAC3B,IAAM,MAAA,IAAI,MAAM,4BAA4B,CAAA;AAAA;AAG9C,EAAA,MAAM,gBAAgB,IAAK,CAAA,WAAA,GAAc,KAAM,CAAA,GAAG,EAAE,CAAC,CAAA;AAErD,EAAI,IAAA,aAAA,CAAc,WAAW,EAAI,EAAA;AAC/B,IAAM,MAAA,IAAI,MAAM,qDAAqD,CAAA;AAAA;AAGvE,EAAM,MAAA,KAAA,GAAQ,aAAc,CAAA,KAAA,CAAM,MAAM,CAAA,CAAE,IAAI,CAAC,CAAA,KAAM,CAAE,CAAA,IAAA,EAAM,CAAA;AAE7D,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,CAAC,CAAA,CAAE,MAAW,KAAA,CAAA;AAEvC,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,OAAO,EAAE,GAAA,EAAK,KAAM,CAAA,CAAC,CAAG,EAAA,KAAA,EAAO,KAAM,CAAA,CAAC,CAAG,EAAA,IAAA,EAAM,KAAM,CAAA,CAAC,CAAE,EAAA;AAAA,GACnD,MAAA;AACL,IAAA,OAAO,EAAE,GAAA,EAAK,KAAM,CAAA,CAAC,CAAG,EAAA,KAAA,EAA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A,YAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-SHEGSIRU.js","sourcesContent":["/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\n\ntype ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\n};\n\nfunction parseDate(date: Date): { day: string; month: string; year: string } {\n if (!date) {\n throw new Error(\"Date is required\");\n }\n\n if (!(date instanceof Date)) {\n throw new Error(\"Date must be a Date object\");\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n\n if (formattedDate.length !== 10) {\n throw new Error(\"Date must be in the format YYYY-MM-DD or DD-MM-YYYY\");\n }\n\n const parts = formattedDate.split(/[-/]/).map((p) => p.trim());\n\n const isYYYYMMDD = parts[0].length === 4;\n\n if (isYYYYMMDD) {\n return { day: parts[2], month: parts[1], year: parts[0] };\n } else {\n return { day: parts[0], month: parts[1], year: parts[2] };\n }\n}\n\nfunction mapDatePartsToBlocksOfTwo({\n day,\n month,\n year,\n}: {\n day: string;\n month: string;\n year: string;\n}): { day: string; month: string; year1: string; year2: string } {\n return {\n day: day.padStart(2, \"0\"),\n month: month.padStart(2, \"0\"),\n year1: year.slice(0, 2),\n year2: year.slice(2),\n };\n}\n\nfunction digitSum(n: number): number {\n let s = 0;\n\n for (const ch of String(Math.abs(n))) {\n s += ch.charCodeAt(0) - 48;\n }\n\n return s;\n}\n\nexport const MASTER_NUMBERS = [11, 22, 33, 44];\n\nexport function isMasterNumber(n: number): boolean {\n return MASTER_NUMBERS.includes(n);\n}\n\nexport function reduceToSingle(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): number {\n // standard digital root with 0 allowed; never preserve masters here\n if (n === 0) {\n return 0;\n }\n\n let reduced = n;\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n }\n\n // optional tweak for exact \"00\" cases will be applied by caller, not here\n return reduced;\n}\n\nexport function reduceToSingleWithSteps(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): ReducedValueWithSteps {\n const steps = [n];\n\n if (n === 0) {\n return {\n reducedValue: 0,\n reductionSteps: steps,\n };\n }\n\n let reduced = n;\n\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n steps.push(reduced);\n }\n\n return {\n reducedValue: reduced,\n reductionSteps: steps,\n };\n}\n\nfunction reduceBlock(block: string): number {\n const n = [...block].reduce(\n (acc, curr) => acc + (curr.charCodeAt(0) - 48),\n 0\n );\n\n if (n === 0) {\n return 0;\n }\n\n return reduceToSingle(n);\n}\n\ntype KaabalisticLifePathResult = {\n parts: {\n day: string;\n month: string;\n year1: string;\n year2: string;\n };\n reducedParts: {\n reducedDay: number;\n reducedMonth: number;\n reducedYear1: number;\n reducedYear2: number;\n };\n syntheses: {\n dayMonthSynthesis: number;\n yearSynthesis: number;\n reducedDayMonthSynthesis: number;\n reducedYearSynthesis: number;\n finalSynthesis: number;\n };\n lifePath: number;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\n/**\n * Calculate the Kaabalistic life path number based on a birth date.\n * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)\n */\nexport function calculateKaabalisticLifePath(\n birthDate: Date\n): KaabalisticLifePathResult {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const reducedDay = reduceBlock(day);\n const reducedMonth = reduceBlock(month);\n const reducedYear1 = reduceBlock(year1);\n const reducedYear2 = reduceBlock(year2);\n\n const dayMonthSynthesis = parseInt(`${reducedDay}${reducedMonth}`, 10);\n const yearSynthesis = parseInt(`${reducedYear1}${reducedYear2}`, 10);\n\n const reducedDayMonthSynthesis = reduceToSingle(dayMonthSynthesis);\n const reducedYearSynthesis = reduceToSingle(yearSynthesis);\n\n const finalSynthesis = parseInt(\n `${reducedDayMonthSynthesis}${reducedYearSynthesis}`,\n 10\n );\n\n const lifePath = reduceToSingle(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n lifePath,\n ];\n\n const reducedLifePath = reduceToSingle(lifePath);\n if (isMasterLifePath) {\n personalMythologyNumbers.push(reducedLifePath);\n }\n\n return {\n parts: { day, month, year1, year2 },\n reducedParts: { reducedDay, reducedMonth, reducedYear1, reducedYear2 },\n syntheses: {\n dayMonthSynthesis,\n yearSynthesis,\n reducedDayMonthSynthesis,\n reducedYearSynthesis,\n finalSynthesis,\n },\n lifePath,\n personalMythologyNumbers,\n };\n}\n\ntype StraightAcrossReductionLifePathResult = {\n lifePath: number;\n reductionSteps: number[];\n};\n\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): StraightAcrossReductionLifePathResult {\n const { day, month, year } = parseDate(birthDate);\n\n const result = reduceToSingleWithSteps(\n parseInt(`${day}${month}${year}`, 10),\n { preserveMasters: true }\n );\n\n return {\n lifePath: result.reducedValue,\n reductionSteps: result.reductionSteps,\n };\n}\n\ntype DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n};\n\nexport function getDateEnergies(birthDate: Date): DateEnergies {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const dayEnergy = reduceToSingleWithSteps(parseInt(day, 10), {\n preserveMasters: true,\n });\n const monthEnergy = reduceToSingleWithSteps(parseInt(month, 10), {\n preserveMasters: true,\n });\n const yearEnergy = reduceToSingleWithSteps(parseInt(year1 + year2, 10), {\n preserveMasters: true,\n });\n\n return {\n dayEnergy,\n monthEnergy,\n yearEnergy,\n };\n}\n\ntype Challenges = {\n day: number;\n month: number;\n year: number;\n mainChallenge: number;\n subChallenge1: number;\n subChallenge2: number;\n};\n\nexport function calculateChallenges(birthDate: Date): Challenges {\n const { day, month, year } = parseDate(birthDate);\n\n const reducedDay = reduceToSingle(parseInt(day, 10));\n const reducedMonth = reduceToSingle(parseInt(month, 10));\n const reducedYear = reduceToSingle(parseInt(year, 10));\n\n const subChallenge1 = Math.abs(reducedMonth - reducedDay);\n const subChallenge2 = Math.abs(reducedDay - reducedYear);\n const mainChallenge = Math.abs(subChallenge1 - subChallenge2);\n\n return {\n day: reducedDay,\n month: reducedMonth,\n year: reducedYear,\n mainChallenge,\n subChallenge1,\n subChallenge2,\n };\n}\n\nexport const CYCLE_MEANINGS = [\n {\n title: \"Learning\",\n shortDescription:\n \"A period for assertive action and learning through direct experience.\",\n personalDescription:\n \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n businessDescription:\n \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n astrologySign: \"Aries (Actions Have Consequences)\",\n },\n {\n title: \"Hard Work\",\n shortDescription:\n \"A time for diligent effort and adaptability to temporary changes.\",\n personalDescription:\n \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n businessDescription:\n \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n astrologySign: \"Taurus (Stop Being Stubborn)\",\n },\n {\n title: \"Friendship\",\n shortDescription:\n \"A dynamic phase for ambitious projects and strengthening relationships.\",\n personalDescription:\n \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n businessDescription:\n \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n astrologySign: \"Gemini (Communication is Power)\",\n },\n {\n title: \"Opportunities\",\n shortDescription:\n \"An intellectually fertile time for creativity and quick decision-making.\",\n personalDescription:\n \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n businessDescription:\n \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n astrologySign: \"Cancer (Nurture Mental Growth)\",\n },\n {\n title: \"Tears/Decision\",\n shortDescription:\n \"The most prosperous phase for financial resolution and spiritual advancement.\",\n personalDescription:\n \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n businessDescription:\n \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n astrologySign: \"Leo (Balance Ego and Generosity)\",\n },\n {\n title: \"Triple Blessing\",\n shortDescription:\n \"Perfect for pleasures, social activities, and creative pursuits.\",\n personalDescription:\n \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n businessDescription:\n \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n astrologySign: \"Virgo (Organize Your Pleasures)\",\n },\n {\n title: \"Rest\",\n shortDescription:\n \"A period of rest, introspection, and preparation for renewal.\",\n personalDescription:\n \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n businessDescription:\n \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n astrologySign: \"Libra (Seek Balance and Reconstruction)\",\n },\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nfunction addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\n// Find the most recent anniversary of the start date\nfunction getMostRecentStartDate(startDate: Date, today: Date): Date {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): CycleInfo {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(\n birthYear + i * 7,\n startDate.getMonth(),\n startDate.getDate()\n );\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n\n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7; // Start year of current age cycle\n const yearlyCycleStart = new Date(\n ageCycleStartYear + j,\n startDate.getMonth(),\n startDate.getDate()\n );\n const yearlyCycle = j + 1;\n\n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n\n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n\n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart =\n i < 6\n ? addDays(mostRecentStart, (i + 1) * cycleLength)\n : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle =\n Math.floor(\n (today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays =\n Math.floor(\n (today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays,\n };\n}\n\nfunction calculateAge(birthDate: Date, today: Date = new Date()): number {\n return today.getFullYear() - birthDate.getFullYear();\n}\n\ntype FibonacciCycle = {\n currentAge: number;\n cycle1: ReducedValueWithSteps;\n cycle2: ReducedValueWithSteps;\n cycle3: ReducedValueWithSteps;\n cycle4: ReducedValueWithSteps;\n cycle5: ReducedValueWithSteps;\n cycle6: ReducedValueWithSteps;\n cycle7: ReducedValueWithSteps;\n};\n\nexport function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): FibonacciCycle {\n const currentAge = calculateAge(birthDate, today);\n\n const cycle1 = reduceToSingleWithSteps(currentAge);\n const cycle2 = reduceToSingleWithSteps(cycle1.reducedValue + 2);\n const cycle3 = reduceToSingleWithSteps(\n cycle1.reducedValue + cycle2.reductionSteps[0]\n );\n const cycle4 = reduceToSingleWithSteps(\n cycle2.reductionSteps[0] + cycle3.reductionSteps[0]\n );\n const cycle5 = reduceToSingleWithSteps(\n cycle3.reductionSteps[0] + cycle4.reductionSteps[0]\n );\n const cycle6 = reduceToSingleWithSteps(\n cycle4.reductionSteps[0] + cycle5.reductionSteps[0]\n );\n const cycle7 = reduceToSingleWithSteps(\n cycle5.reductionSteps[0] + cycle6.reductionSteps[0]\n );\n\n return {\n currentAge,\n cycle1,\n cycle2,\n cycle3,\n cycle4,\n cycle5,\n cycle6,\n cycle7,\n };\n}\n\ntype PersonalPeriod = {\n startMonth: number;\n endMonth: number;\n value: ReducedValueWithSteps;\n};\n\ntype PersonalMonth = {\n month: number;\n value: ReducedValueWithSteps;\n};\n\ntype PersonalCycles = {\n personalYear: ReducedValueWithSteps;\n personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];\n personalMonths: [\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth\n ];\n currentPersonalPeriod: number;\n currentPersonalMonth: number;\n currentAge: number;\n lifePath: number;\n soulNumber?: number;\n};\n\nfunction calculateSoulNumber(firstName: string): number {\n return calculateGematria(firstName).vowels.finalValue;\n}\n\n/**\n * This function wraps the month number to a 1-12 range.\n */\nfunction wrapMonth(month: number): number {\n const wrappedMonth = (((month - 1) % 12) + 12) % 12;\n\n return wrappedMonth + 1;\n}\n\n/**\n * Returns the year of the most recent birthday relative to today.\n */\nfunction getLastBirthdayYear(birthDate: Date, today: Date): number {\n const thisYearsBirthday = new Date(\n today.getFullYear(),\n birthDate.getMonth(),\n birthDate.getDate()\n );\n\n return today >= thisYearsBirthday\n ? today.getFullYear()\n : today.getFullYear() - 1;\n}\n\nexport function calculatePersonalYear(\n birthDate: Date,\n today: Date = new Date()\n): ReducedValueWithSteps {\n const { day, month } = parseDate(birthDate);\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n return reduceToSingleWithSteps(\n parseInt(day, 10) + parseInt(month, 10) + yearToUse,\n { preserveMasters: true }\n );\n}\n\nexport function calculatePersonalPeriods(\n birthDate: Date,\n yearToUse: number,\n lifePath: number,\n soulNumber: number,\n currentAge: number\n): [PersonalPeriod, PersonalPeriod, PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [PersonalPeriod, PersonalPeriod, PersonalPeriod] = [\n {\n startMonth: wrapMonth(birthMonth + 0),\n endMonth: wrapMonth(birthMonth + 3),\n value: reduceToSingleWithSteps(yearToUse + currentAge, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 4),\n endMonth: wrapMonth(birthMonth + 7),\n value: reduceToSingleWithSteps(yearToUse + lifePath, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 8),\n endMonth: wrapMonth(birthMonth + 11),\n value: reduceToSingleWithSteps(yearToUse + soulNumber, {\n preserveMasters: true,\n }),\n },\n ];\n\n return periods;\n}\n\nfunction diffInPersonalMonths(birthDate: Date, today: Date): number {\n const lastYear = getLastBirthdayYear(birthDate, today);\n const base = new Date(lastYear, birthDate.getMonth(), birthDate.getDate());\n\n let k =\n (today.getFullYear() - base.getFullYear()) * 12 +\n (today.getMonth() - base.getMonth());\n\n // Only advance to the next personal month on the birth *day* each month\n if (today.getDate() < birthDate.getDate()) {\n k -= 1;\n }\n\n if (k < 0) k = 0;\n if (k > 12) k = 12; // 13th slot is the next birthday month\n return k;\n}\n\nexport function calculatePersonalMonths(\n birthDate: Date,\n personalYear: ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: PersonalMonth[] = [];\n for (let i = 0; i < 13; i++) {\n const m = wrapMonth(firstPersonalMonth + i);\n const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {\n preserveMasters: true,\n });\n personalMonths.push({ month: m, value });\n }\n\n const currentPersonalMonthIndex = diffInPersonalMonths(birthDate, today);\n\n return {\n personalMonths: personalMonths as PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): PersonalCycles {\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n const personalYear = calculatePersonalYear(birthDate, today);\n\n const currentAge = calculateAge(\n birthDate,\n new Date(yearToUse, today.getMonth(), today.getDate())\n );\n const { lifePath } = calculateKaabalisticLifePath(birthDate);\n const soulNumber = calculateSoulNumber(firstName);\n\n const personalPeriods =\n calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber, currentAge);\n\n const {\n personalMonths,\n currentPersonalMonthIndex: currentPersonalMonth,\n } = calculatePersonalMonths(birthDate, personalYear, today);\n \n // Derive the period from the month index (0–12). Clamp 12 to last period.\n const currentPersonalPeriod = Math.floor(Math.min(currentPersonalMonth, 11) / 4);\n\n return {\n currentAge,\n lifePath,\n soulNumber,\n personalYear,\n personalPeriods,\n personalMonths,\n currentPersonalPeriod,\n currentPersonalMonth,\n };\n}\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/numerology/index.ts"],"names":[],"mappings":";;;AAWA,SAAS,UAAU,IAA0D,EAAA;AAC3E,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAM,MAAA,IAAI,MAAM,kBAAkB,CAAA;AAAA;AAGpC,EAAI,IAAA,EAAE,gBAAgB,IAAO,CAAA,EAAA;AAC3B,IAAM,MAAA,IAAI,MAAM,4BAA4B,CAAA;AAAA;AAG9C,EAAA,MAAM,gBAAgB,IAAK,CAAA,WAAA,GAAc,KAAM,CAAA,GAAG,EAAE,CAAC,CAAA;AAErD,EAAI,IAAA,aAAA,CAAc,WAAW,EAAI,EAAA;AAC/B,IAAM,MAAA,IAAI,MAAM,qDAAqD,CAAA;AAAA;AAGvE,EAAM,MAAA,KAAA,GAAQ,aAAc,CAAA,KAAA,CAAM,MAAM,CAAA,CAAE,IAAI,CAAC,CAAA,KAAM,CAAE,CAAA,IAAA,EAAM,CAAA;AAE7D,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,CAAC,CAAA,CAAE,MAAW,KAAA,CAAA;AAEvC,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,OAAO,EAAE,GAAA,EAAK,KAAM,CAAA,CAAC,CAAG,EAAA,KAAA,EAAO,KAAM,CAAA,CAAC,CAAG,EAAA,IAAA,EAAM,KAAM,CAAA,CAAC,CAAE,EAAA;AAAA,GACnD,MAAA;AACL,IAAA,OAAO,EAAE,GAAA,EAAK,KAAM,CAAA,CAAC,CAAG,EAAA,KAAA,EAAO,KAAM,CAAA,CAAC,CAAG,EAAA,IAAA,EAA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AAA,IACA,qBAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-VV2YT6RZ.mjs","sourcesContent":["/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\n\ntype ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\n};\n\nfunction parseDate(date: Date): { day: string; month: string; year: string } {\n if (!date) {\n throw new Error(\"Date is required\");\n }\n\n if (!(date instanceof Date)) {\n throw new Error(\"Date must be a Date object\");\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n\n if (formattedDate.length !== 10) {\n throw new Error(\"Date must be in the format YYYY-MM-DD or DD-MM-YYYY\");\n }\n\n const parts = formattedDate.split(/[-/]/).map((p) => p.trim());\n\n const isYYYYMMDD = parts[0].length === 4;\n\n if (isYYYYMMDD) {\n return { day: parts[2], month: parts[1], year: parts[0] };\n } else {\n return { day: parts[0], month: parts[1], year: parts[2] };\n }\n}\n\nfunction mapDatePartsToBlocksOfTwo({\n day,\n month,\n year,\n}: {\n day: string;\n month: string;\n year: string;\n}): { day: string; month: string; year1: string; year2: string } {\n return {\n day: day.padStart(2, \"0\"),\n month: month.padStart(2, \"0\"),\n year1: year.slice(0, 2),\n year2: year.slice(2),\n };\n}\n\nfunction digitSum(n: number): number {\n let s = 0;\n\n for (const ch of String(Math.abs(n))) {\n s += ch.charCodeAt(0) - 48;\n }\n\n return s;\n}\n\nexport const MASTER_NUMBERS = [11, 22, 33, 44];\n\nexport function isMasterNumber(n: number): boolean {\n return MASTER_NUMBERS.includes(n);\n}\n\nexport function reduceToSingle(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): number {\n // standard digital root with 0 allowed; never preserve masters here\n if (n === 0) {\n return 0;\n }\n\n let reduced = n;\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n }\n\n // optional tweak for exact \"00\" cases will be applied by caller, not here\n return reduced;\n}\n\nexport function reduceToSingleWithSteps(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): ReducedValueWithSteps {\n const steps = [n];\n\n if (n === 0) {\n return {\n reducedValue: 0,\n reductionSteps: steps,\n };\n }\n\n let reduced = n;\n\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n steps.push(reduced);\n }\n\n return {\n reducedValue: reduced,\n reductionSteps: steps,\n };\n}\n\nfunction reduceBlock(block: string): number {\n const n = [...block].reduce(\n (acc, curr) => acc + (curr.charCodeAt(0) - 48),\n 0\n );\n\n if (n === 0) {\n return 0;\n }\n\n return reduceToSingle(n);\n}\n\ntype KaabalisticLifePathResult = {\n parts: {\n day: string;\n month: string;\n year1: string;\n year2: string;\n };\n reducedParts: {\n reducedDay: number;\n reducedMonth: number;\n reducedYear1: number;\n reducedYear2: number;\n };\n syntheses: {\n dayMonthSynthesis: number;\n yearSynthesis: number;\n reducedDayMonthSynthesis: number;\n reducedYearSynthesis: number;\n finalSynthesis: number;\n };\n lifePath: number;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\n/**\n * Calculate the Kaabalistic life path number based on a birth date.\n * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)\n */\nexport function calculateKaabalisticLifePath(\n birthDate: Date\n): KaabalisticLifePathResult {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const reducedDay = reduceBlock(day);\n const reducedMonth = reduceBlock(month);\n const reducedYear1 = reduceBlock(year1);\n const reducedYear2 = reduceBlock(year2);\n\n const dayMonthSynthesis = parseInt(`${reducedDay}${reducedMonth}`, 10);\n const yearSynthesis = parseInt(`${reducedYear1}${reducedYear2}`, 10);\n\n const reducedDayMonthSynthesis = reduceToSingle(dayMonthSynthesis);\n const reducedYearSynthesis = reduceToSingle(yearSynthesis);\n\n const finalSynthesis = parseInt(\n `${reducedDayMonthSynthesis}${reducedYearSynthesis}`,\n 10\n );\n\n const lifePath = reduceToSingle(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n lifePath,\n ];\n\n const reducedLifePath = reduceToSingle(lifePath);\n if (isMasterLifePath) {\n personalMythologyNumbers.push(reducedLifePath);\n }\n\n return {\n parts: { day, month, year1, year2 },\n reducedParts: { reducedDay, reducedMonth, reducedYear1, reducedYear2 },\n syntheses: {\n dayMonthSynthesis,\n yearSynthesis,\n reducedDayMonthSynthesis,\n reducedYearSynthesis,\n finalSynthesis,\n },\n lifePath,\n personalMythologyNumbers,\n };\n}\n\ntype StraightAcrossReductionLifePathResult = {\n lifePath: number;\n reductionSteps: number[];\n};\n\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): StraightAcrossReductionLifePathResult {\n const { day, month, year } = parseDate(birthDate);\n\n const result = reduceToSingleWithSteps(\n parseInt(`${day}${month}${year}`, 10),\n { preserveMasters: true }\n );\n\n return {\n lifePath: result.reducedValue,\n reductionSteps: result.reductionSteps,\n };\n}\n\ntype DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n};\n\nexport function getDateEnergies(birthDate: Date): DateEnergies {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const dayEnergy = reduceToSingleWithSteps(parseInt(day, 10), {\n preserveMasters: true,\n });\n const monthEnergy = reduceToSingleWithSteps(parseInt(month, 10), {\n preserveMasters: true,\n });\n const yearEnergy = reduceToSingleWithSteps(parseInt(year1 + year2, 10), {\n preserveMasters: true,\n });\n\n return {\n dayEnergy,\n monthEnergy,\n yearEnergy,\n };\n}\n\ntype Challenges = {\n day: number;\n month: number;\n year: number;\n mainChallenge: number;\n subChallenge1: number;\n subChallenge2: number;\n};\n\nexport function calculateChallenges(birthDate: Date): Challenges {\n const { day, month, year } = parseDate(birthDate);\n\n const reducedDay = reduceToSingle(parseInt(day, 10));\n const reducedMonth = reduceToSingle(parseInt(month, 10));\n const reducedYear = reduceToSingle(parseInt(year, 10));\n\n const subChallenge1 = Math.abs(reducedMonth - reducedDay);\n const subChallenge2 = Math.abs(reducedDay - reducedYear);\n const mainChallenge = Math.abs(subChallenge1 - subChallenge2);\n\n return {\n day: reducedDay,\n month: reducedMonth,\n year: reducedYear,\n mainChallenge,\n subChallenge1,\n subChallenge2,\n };\n}\n\nexport const CYCLE_MEANINGS = [\n {\n title: \"Learning\",\n shortDescription:\n \"A period for assertive action and learning through direct experience.\",\n personalDescription:\n \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n businessDescription:\n \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n astrologySign: \"Aries (Actions Have Consequences)\",\n },\n {\n title: \"Hard Work\",\n shortDescription:\n \"A time for diligent effort and adaptability to temporary changes.\",\n personalDescription:\n \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n businessDescription:\n \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n astrologySign: \"Taurus (Stop Being Stubborn)\",\n },\n {\n title: \"Friendship\",\n shortDescription:\n \"A dynamic phase for ambitious projects and strengthening relationships.\",\n personalDescription:\n \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n businessDescription:\n \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n astrologySign: \"Gemini (Communication is Power)\",\n },\n {\n title: \"Opportunities\",\n shortDescription:\n \"An intellectually fertile time for creativity and quick decision-making.\",\n personalDescription:\n \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n businessDescription:\n \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n astrologySign: \"Cancer (Nurture Mental Growth)\",\n },\n {\n title: \"Tears/Decision\",\n shortDescription:\n \"The most prosperous phase for financial resolution and spiritual advancement.\",\n personalDescription:\n \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n businessDescription:\n \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n astrologySign: \"Leo (Balance Ego and Generosity)\",\n },\n {\n title: \"Triple Blessing\",\n shortDescription:\n \"Perfect for pleasures, social activities, and creative pursuits.\",\n personalDescription:\n \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n businessDescription:\n \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n astrologySign: \"Virgo (Organize Your Pleasures)\",\n },\n {\n title: \"Rest\",\n shortDescription:\n \"A period of rest, introspection, and preparation for renewal.\",\n personalDescription:\n \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n businessDescription:\n \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n astrologySign: \"Libra (Seek Balance and Reconstruction)\",\n },\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nfunction addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\n// Find the most recent anniversary of the start date\nfunction getMostRecentStartDate(startDate: Date, today: Date): Date {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): CycleInfo {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(\n birthYear + i * 7,\n startDate.getMonth(),\n startDate.getDate()\n );\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n\n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7; // Start year of current age cycle\n const yearlyCycleStart = new Date(\n ageCycleStartYear + j,\n startDate.getMonth(),\n startDate.getDate()\n );\n const yearlyCycle = j + 1;\n\n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n\n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n\n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart =\n i < 6\n ? addDays(mostRecentStart, (i + 1) * cycleLength)\n : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle =\n Math.floor(\n (today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays =\n Math.floor(\n (today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays,\n };\n}\n\nfunction calculateAge(birthDate: Date, today: Date = new Date()): number {\n return today.getFullYear() - birthDate.getFullYear();\n}\n\ntype FibonacciCycle = {\n currentAge: number;\n cycle1: ReducedValueWithSteps;\n cycle2: ReducedValueWithSteps;\n cycle3: ReducedValueWithSteps;\n cycle4: ReducedValueWithSteps;\n cycle5: ReducedValueWithSteps;\n cycle6: ReducedValueWithSteps;\n cycle7: ReducedValueWithSteps;\n};\n\nexport function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): FibonacciCycle {\n const currentAge = calculateAge(birthDate, today);\n\n const cycle1 = reduceToSingleWithSteps(currentAge);\n const cycle2 = reduceToSingleWithSteps(cycle1.reducedValue + 2);\n const cycle3 = reduceToSingleWithSteps(\n cycle1.reducedValue + cycle2.reductionSteps[0]\n );\n const cycle4 = reduceToSingleWithSteps(\n cycle2.reductionSteps[0] + cycle3.reductionSteps[0]\n );\n const cycle5 = reduceToSingleWithSteps(\n cycle3.reductionSteps[0] + cycle4.reductionSteps[0]\n );\n const cycle6 = reduceToSingleWithSteps(\n cycle4.reductionSteps[0] + cycle5.reductionSteps[0]\n );\n const cycle7 = reduceToSingleWithSteps(\n cycle5.reductionSteps[0] + cycle6.reductionSteps[0]\n );\n\n return {\n currentAge,\n cycle1,\n cycle2,\n cycle3,\n cycle4,\n cycle5,\n cycle6,\n cycle7,\n };\n}\n\ntype PersonalPeriod = {\n startMonth: number;\n endMonth: number;\n value: ReducedValueWithSteps;\n};\n\ntype PersonalMonth = {\n month: number;\n value: ReducedValueWithSteps;\n};\n\ntype PersonalCycles = {\n personalYear: ReducedValueWithSteps;\n personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];\n personalMonths: [\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth\n ];\n currentPersonalPeriod: number;\n currentPersonalMonth: number;\n currentAge: number;\n lifePath: number;\n soulNumber?: number;\n};\n\nfunction calculateSoulNumber(firstName: string): number {\n return calculateGematria(firstName).vowels.finalValue;\n}\n\n/**\n * This function wraps the month number to a 1-12 range.\n */\nfunction wrapMonth(month: number): number {\n const wrappedMonth = (((month - 1) % 12) + 12) % 12;\n\n return wrappedMonth + 1;\n}\n\n/**\n * Returns the year of the most recent birthday relative to today.\n */\nfunction getLastBirthdayYear(birthDate: Date, today: Date): number {\n const thisYearsBirthday = new Date(\n today.getFullYear(),\n birthDate.getMonth(),\n birthDate.getDate()\n );\n\n return today >= thisYearsBirthday\n ? today.getFullYear()\n : today.getFullYear() - 1;\n}\n\nexport function calculatePersonalYear(\n birthDate: Date,\n today: Date = new Date()\n): ReducedValueWithSteps {\n const { day, month } = parseDate(birthDate);\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n return reduceToSingleWithSteps(\n parseInt(day, 10) + parseInt(month, 10) + yearToUse,\n { preserveMasters: true }\n );\n}\n\nexport function calculatePersonalPeriods(\n birthDate: Date,\n yearToUse: number,\n lifePath: number,\n soulNumber: number,\n currentAge: number\n): [PersonalPeriod, PersonalPeriod, PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [PersonalPeriod, PersonalPeriod, PersonalPeriod] = [\n {\n startMonth: wrapMonth(birthMonth + 0),\n endMonth: wrapMonth(birthMonth + 3),\n value: reduceToSingleWithSteps(yearToUse + currentAge, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 4),\n endMonth: wrapMonth(birthMonth + 7),\n value: reduceToSingleWithSteps(yearToUse + lifePath, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 8),\n endMonth: wrapMonth(birthMonth + 11),\n value: reduceToSingleWithSteps(yearToUse + soulNumber, {\n preserveMasters: true,\n }),\n },\n ];\n\n return periods;\n}\n\nfunction diffInPersonalMonths(birthDate: Date, today: Date): number {\n const lastYear = getLastBirthdayYear(birthDate, today);\n const base = new Date(lastYear, birthDate.getMonth(), birthDate.getDate());\n\n let k =\n (today.getFullYear() - base.getFullYear()) * 12 +\n (today.getMonth() - base.getMonth());\n\n // Only advance to the next personal month on the birth *day* each month\n if (today.getDate() < birthDate.getDate()) {\n k -= 1;\n }\n\n if (k < 0) k = 0;\n if (k > 12) k = 12; // 13th slot is the next birthday month\n return k;\n}\n\nexport function calculatePersonalMonths(\n birthDate: Date,\n personalYear: ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: PersonalMonth[] = [];\n for (let i = 0; i < 13; i++) {\n const m = wrapMonth(firstPersonalMonth + i);\n const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {\n preserveMasters: true,\n });\n personalMonths.push({ month: m, value });\n }\n\n const currentPersonalMonthIndex = diffInPersonalMonths(birthDate, today);\n\n return {\n personalMonths: personalMonths as PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): PersonalCycles {\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n const personalYear = calculatePersonalYear(birthDate, today);\n\n const currentAge = calculateAge(\n birthDate,\n new Date(yearToUse, today.getMonth(), today.getDate())\n );\n const { lifePath } = calculateKaabalisticLifePath(birthDate);\n const soulNumber = calculateSoulNumber(firstName);\n\n const personalPeriods =\n calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber, currentAge);\n\n const {\n personalMonths,\n currentPersonalMonthIndex: currentPersonalMonth,\n } = calculatePersonalMonths(birthDate, personalYear, today);\n \n // Derive the period from the month index (0–12). Clamp 12 to last period.\n const currentPersonalPeriod = Math.floor(Math.min(currentPersonalMonth, 11) / 4);\n\n return {\n currentAge,\n lifePath,\n soulNumber,\n personalYear,\n personalPeriods,\n personalMonths,\n currentPersonalPeriod,\n currentPersonalMonth,\n };\n}\n"]}
|