kaabalah 6.6.4 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/astrology/index.js +54 -54
  2. package/dist/astrology/index.js.map +1 -1
  3. package/dist/astrology/index.mjs +3 -3
  4. package/dist/astrology/index.mjs.map +1 -1
  5. package/dist/chunk-2WCC2KCJ.js +1 -1
  6. package/dist/chunk-2WCC2KCJ.js.map +1 -1
  7. package/dist/{chunk-XTE5DSDO.js → chunk-36XZ5WR2.js} +23 -23
  8. package/dist/chunk-36XZ5WR2.js.map +1 -0
  9. package/dist/{chunk-6P2CJUTH.mjs → chunk-3UJPBUY4.mjs} +8 -6
  10. package/dist/chunk-3UJPBUY4.mjs.map +1 -0
  11. package/dist/{chunk-FM7WUVZV.js → chunk-4337NVKS.js} +8 -4
  12. package/dist/chunk-4337NVKS.js.map +1 -0
  13. package/dist/{chunk-3TBUVMHV.mjs → chunk-5HXSHALQ.mjs} +1210 -272
  14. package/dist/chunk-5HXSHALQ.mjs.map +1 -0
  15. package/dist/{chunk-EFZUZI22.mjs → chunk-5K4OQ4UB.mjs} +5 -4
  16. package/dist/chunk-5K4OQ4UB.mjs.map +1 -0
  17. package/dist/{chunk-ZKIJAZ6B.mjs → chunk-6N5YC2WD.mjs} +338 -10
  18. package/dist/chunk-6N5YC2WD.mjs.map +1 -0
  19. package/dist/{chunk-PWYOHULD.mjs → chunk-7YU7TRCG.mjs} +80 -42
  20. package/dist/chunk-7YU7TRCG.mjs.map +1 -0
  21. package/dist/{chunk-6O7MTBZN.js → chunk-BEFGGHIJ.js} +84 -46
  22. package/dist/chunk-BEFGGHIJ.js.map +1 -0
  23. package/dist/{chunk-MTI2SOQ6.mjs → chunk-ITESL6GR.mjs} +4 -4
  24. package/dist/chunk-ITESL6GR.mjs.map +1 -0
  25. package/dist/{chunk-UG6HZK3Z.js → chunk-K33NFXSD.js} +109 -109
  26. package/dist/chunk-K33NFXSD.js.map +1 -0
  27. package/dist/{chunk-OKZUVGA3.js → chunk-LQX6PW35.js} +349 -15
  28. package/dist/chunk-LQX6PW35.js.map +1 -0
  29. package/dist/{chunk-WY6NIR2V.mjs → chunk-NPQZ2DOY.mjs} +8 -4
  30. package/dist/chunk-NPQZ2DOY.mjs.map +1 -0
  31. package/dist/{chunk-WIKUOEOB.mjs → chunk-QS5XAAAG.mjs} +31 -19
  32. package/dist/chunk-QS5XAAAG.mjs.map +1 -0
  33. package/dist/{chunk-UN7QMOMX.mjs → chunk-SHKAAZHT.mjs} +8 -8
  34. package/dist/chunk-SHKAAZHT.mjs.map +1 -0
  35. package/dist/{chunk-COPYH3O2.js → chunk-SYLFUBAB.js} +51 -39
  36. package/dist/chunk-SYLFUBAB.js.map +1 -0
  37. package/dist/chunk-URDMOQRN.mjs +1 -1
  38. package/dist/chunk-URDMOQRN.mjs.map +1 -1
  39. package/dist/{chunk-PAKYKIZH.js → chunk-UZ42PN5T.js} +10 -8
  40. package/dist/chunk-UZ42PN5T.js.map +1 -0
  41. package/dist/{chunk-S6KNERP7.js → chunk-VJ6RW5H4.js} +8 -7
  42. package/dist/chunk-VJ6RW5H4.js.map +1 -0
  43. package/dist/{chunk-NRAAMI6I.js → chunk-WLML6SVX.js} +1228 -275
  44. package/dist/chunk-WLML6SVX.js.map +1 -0
  45. package/dist/cli.js +2367 -657
  46. package/dist/cli.js.map +1 -1
  47. package/dist/core/index.d.mts +1 -0
  48. package/dist/core/index.d.ts +1 -0
  49. package/dist/core/index.js +69 -45
  50. package/dist/core/index.js.map +1 -1
  51. package/dist/core/index.mjs +4 -4
  52. package/dist/core/index.mjs.map +1 -1
  53. package/dist/gematria/index.js +7 -7
  54. package/dist/gematria/index.js.map +1 -1
  55. package/dist/gematria/index.mjs +4 -4
  56. package/dist/gematria/index.mjs.map +1 -1
  57. package/dist/ifa/index.js +2 -2
  58. package/dist/ifa/index.js.map +1 -1
  59. package/dist/ifa/index.mjs +2 -2
  60. package/dist/ifa/index.mjs.map +1 -1
  61. package/dist/index.d.mts +2 -1
  62. package/dist/index.d.ts +2 -1
  63. package/dist/index.js +314 -230
  64. package/dist/index.js.map +1 -1
  65. package/dist/index.mjs +10 -10
  66. package/dist/index.mjs.map +1 -1
  67. package/dist/numerology/index.js +20 -20
  68. package/dist/numerology/index.js.map +1 -1
  69. package/dist/numerology/index.mjs +5 -5
  70. package/dist/numerology/index.mjs.map +1 -1
  71. package/dist/semantic/index.js +28 -28
  72. package/dist/semantic/index.js.map +1 -1
  73. package/dist/semantic/index.mjs +9 -9
  74. package/dist/semantic/index.mjs.map +1 -1
  75. package/dist/{wasm/build/swisseph.node-6H4ISR7M.mjs → swisseph.node-2PWBQLWG.mjs} +270 -156
  76. package/dist/swisseph.node-2PWBQLWG.mjs.map +1 -0
  77. package/dist/{wasm/build/swisseph.node-UD2JYYLE.js → swisseph.node-NWM75JF3.js} +283 -169
  78. package/dist/swisseph.node-NWM75JF3.js.map +1 -0
  79. package/dist/{wasm/build/swisseph.web-TSFJI7DQ.mjs → swisseph.web-CK57WSU3.mjs} +264 -153
  80. package/dist/swisseph.web-CK57WSU3.mjs.map +1 -0
  81. package/dist/{wasm/build/swisseph.web-MXYBWOOS.js → swisseph.web-GPTWPXKT.js} +277 -166
  82. package/dist/swisseph.web-GPTWPXKT.js.map +1 -0
  83. package/dist/tarot/index.js +25 -25
  84. package/dist/tarot/index.js.map +1 -1
  85. package/dist/tarot/index.mjs +5 -5
  86. package/dist/tarot/index.mjs.map +1 -1
  87. package/dist/topology-Bbgniegh.d.ts +102 -0
  88. package/dist/topology-CSSfYL2c.d.mts +102 -0
  89. package/dist/visual/index.d.mts +177 -2
  90. package/dist/visual/index.d.ts +177 -2
  91. package/dist/visual/index.js +91 -31
  92. package/dist/visual/index.js.map +1 -1
  93. package/dist/visual/index.mjs +5 -5
  94. package/dist/visual/index.mjs.map +1 -1
  95. package/dist/{swisseph.node-6H4ISR7M.mjs → wasm/build/swisseph.node-2PWBQLWG.mjs} +270 -156
  96. package/dist/wasm/build/swisseph.node-2PWBQLWG.mjs.map +1 -0
  97. package/dist/{swisseph.node-UD2JYYLE.js → wasm/build/swisseph.node-NWM75JF3.js} +283 -169
  98. package/dist/wasm/build/swisseph.node-NWM75JF3.js.map +1 -0
  99. package/dist/{swisseph.web-TSFJI7DQ.mjs → wasm/build/swisseph.web-CK57WSU3.mjs} +264 -153
  100. package/dist/wasm/build/swisseph.web-CK57WSU3.mjs.map +1 -0
  101. package/dist/{swisseph.web-MXYBWOOS.js → wasm/build/swisseph.web-GPTWPXKT.js} +277 -166
  102. package/dist/wasm/build/swisseph.web-GPTWPXKT.js.map +1 -0
  103. package/package.json +9 -8
  104. package/dist/chunk-3TBUVMHV.mjs.map +0 -1
  105. package/dist/chunk-6O7MTBZN.js.map +0 -1
  106. package/dist/chunk-6P2CJUTH.mjs.map +0 -1
  107. package/dist/chunk-COPYH3O2.js.map +0 -1
  108. package/dist/chunk-EFZUZI22.mjs.map +0 -1
  109. package/dist/chunk-FM7WUVZV.js.map +0 -1
  110. package/dist/chunk-MTI2SOQ6.mjs.map +0 -1
  111. package/dist/chunk-NRAAMI6I.js.map +0 -1
  112. package/dist/chunk-OKZUVGA3.js.map +0 -1
  113. package/dist/chunk-PAKYKIZH.js.map +0 -1
  114. package/dist/chunk-PWYOHULD.mjs.map +0 -1
  115. package/dist/chunk-S6KNERP7.js.map +0 -1
  116. package/dist/chunk-UG6HZK3Z.js.map +0 -1
  117. package/dist/chunk-UN7QMOMX.mjs.map +0 -1
  118. package/dist/chunk-WIKUOEOB.mjs.map +0 -1
  119. package/dist/chunk-WY6NIR2V.mjs.map +0 -1
  120. package/dist/chunk-XTE5DSDO.js.map +0 -1
  121. package/dist/chunk-ZKIJAZ6B.mjs.map +0 -1
  122. package/dist/swisseph.node-6H4ISR7M.mjs.map +0 -1
  123. package/dist/swisseph.node-UD2JYYLE.js.map +0 -1
  124. package/dist/swisseph.web-MXYBWOOS.js.map +0 -1
  125. package/dist/swisseph.web-TSFJI7DQ.mjs.map +0 -1
  126. package/dist/wasm/build/swisseph.node-6H4ISR7M.mjs.map +0 -1
  127. package/dist/wasm/build/swisseph.node-UD2JYYLE.js.map +0 -1
  128. package/dist/wasm/build/swisseph.web-MXYBWOOS.js.map +0 -1
  129. package/dist/wasm/build/swisseph.web-TSFJI7DQ.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/gematria/data.ts","../src/gematria/index.ts"],"names":["GematriaNumbersWithMeaning","step","isEnding","latinLetterId","mapping","useWhenEndingValue"],"mappings":";;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,IAAM,0BAA0B,CAAC,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,EAAE;AA+EnE,IAAM,WAAW,oBAAI,IAAY;AAAA,EACtC,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAChB,CAAC;AA8BM,IAAK,6BAAL,kBAAKA,gCAAL;AACL,EAAAA,wDAAA,SAAM,KAAN;AACA,EAAAA,wDAAA,SAAM,KAAN;AACA,EAAAA,wDAAA,WAAQ,KAAR;AACA,EAAAA,wDAAA,UAAO,KAAP;AACA,EAAAA,wDAAA,UAAO,KAAP;AACA,EAAAA,wDAAA,SAAM,KAAN;AACA,EAAAA,wDAAA,WAAQ,KAAR;AACA,EAAAA,wDAAA,WAAQ,KAAR;AACA,EAAAA,wDAAA,UAAO,KAAP;AACA,EAAAA,wDAAA,YAAS,MAAT;AACA,EAAAA,wDAAA,eAAY,MAAZ;AACA,EAAAA,wDAAA,iBAAc,MAAd;AACA,EAAAA,wDAAA,eAAY,MAAZ;AAbU,SAAAA;AAAA,GAAA;AAgBL,IAAM,gCAA4E;AAAA,EACvF,CAAC,WAA8B,GAAG;AAAA,EAClC,CAAC,WAA8B,GAAG;AAAA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AAAA,IACvD,oBAAoB;AAAA,IACpB,wBAAwB;AAAA,IACxB,SAAS,CAAC;AAAA,EACZ;AAEA,MAAI,SAAS,aAAa;AACxB,wBAAoB,MAAM,OAAwC,CAAC,KAAK,SAAS;AAC/E,aAAO,2BAA2B,MAAM,iBAAiB,GAAG;AAAA,IAC9D,GAAG,iBAAiB;AAAA,EACtB;AAEA,QAAM,kBAAkB,6BAA6B,WAAW,SAAS;AACzE,QAAM,sBAAsB;AAAA,IAC1B,WAAW;AAAA,EACb;AACA,QAAM,qBAAqB;AAAA,IACzB,mBAAmB,gBAAgB,KAAK,IAAI,mBAAmB,oBAAoB,KAAK;AAAA,EAC1F;AAEA,QAAM,wBAAwB,SAAS,UACnC,yBAAyB,iBAAiB,WAAW,sBAAsB,IAC3E;AAEJ,SAAO;AAAA,IACL,QAAQ;AAAA,MACN,aAAa,WAAW;AAAA,MACxB,gBAAgB,gBAAgB;AAAA,MAChC,YAAY,gBAAgB;AAAA,IAC9B;AAAA,IACA,YAAY;AAAA,MACV,aAAa,WAAW;AAAA,MACxB,gBAAgB,oBAAoB;AAAA,MACpC,YAAY,oBAAoB;AAAA,IAClC;AAAA,IACA,WAAW;AAAA,MACT,aAAa,WAAW,YAAY,WAAW;AAAA,MAC/C,gBAAgB,mBAAmB;AAAA,MACnC,YAAY,mBAAmB;AAAA,IACjC;AAAA,IACA,iBAAiB,WAAW;AAAA,IAC5B;AAAA,IACA,mBAAmB,SAAS,cAAc,oBAAoB;AAAA,EAChE;AACF","sourcesContent":["import { LATIN_LETTERS } from \"../core/constants\";\nimport { LetterTypes, NodeId } from \"../core/types\";\n\n// =============================================================================\n// Reverse Gematria Types\n// =============================================================================\n\n/**\n * Extended master numbers used in gematria reduction.\n * Includes traditional master numbers (11, 22, 33, 44) and extended ones (55, 66, 77, 88, 99).\n */\nexport const EXTENDED_MASTER_NUMBERS = [11, 22, 33, 44, 55, 66, 77, 88, 99] as const;\n\n/**\n * Information about how a number was reduced, including all reduction steps\n * and any master number found in the reduction path.\n */\nexport type ReductionInfo = {\n /** The original sum before any reduction */\n originalSum: number;\n /** All steps in the reduction path, e.g., [289, 19, 10, 1] */\n reductionSteps: number[];\n /** The final reduced value (1-9, or a master number if preserved) */\n finalValue: number;\n /** The master number found in the reduction path, if any */\n masterNumber?: number;\n};\n\nexport type ReverseGematriaOptions = {\n /** Target individuality (vowels sum) */\n targetVowels?: number;\n /** Target personality (consonants sum) */\n targetConsonants?: number;\n /** Target synthesis (total) */\n targetSynthesis?: number;\n /** Minimum letters (default: 1) */\n minLength?: number;\n /** Maximum letters (default: 8) */\n maxLength?: number;\n /** Maximum results (default: 100) */\n maxResults?: number;\n /** Include digraphs like PH, SH, etc. (default: true) */\n includeDigraphs?: boolean;\n /** Maximum times a single letter/digraph can repeat (e.g., 2 = \"AAB\" ok, \"AAAB\" filtered) */\n maxLetterRepeat?: number;\n /** Source text to derive results from */\n suggestionText?: string;\n /** How to use the suggestion text: \"subsequence\" preserves order, \"anagram\" allows reordering */\n suggestionMode?: \"subsequence\" | \"anagram\";\n /**\n * When true, target values match any step in the reduction path.\n * e.g., targetConsonants: 19 matches a result with consonantsSum: 289\n * because 289 reduces to [289, 19, 10, 1].\n * Default: true\n */\n matchReductionStep?: boolean;\n /**\n * Master numbers to preserve during reduction.\n * Default: [11, 22, 33, 44, 55, 66, 77, 88, 99]\n */\n masterNumbers?: number[];\n};\n\nexport type ReverseGematriaResult = {\n letters: string;\n letterDetails: LetterResult[];\n /** @deprecated Use vowels.originalSum instead */\n vowelsSum: number;\n /** @deprecated Use consonants.originalSum instead */\n consonantsSum: number;\n /** @deprecated Use synthesis.originalSum instead */\n synthesisSum: number;\n /** Reduction info for vowels (individuality) */\n vowels: ReductionInfo;\n /** Reduction info for consonants (personality) */\n consonants: ReductionInfo;\n /** Reduction info for synthesis (total) */\n synthesis: ReductionInfo;\n};\n\nexport type ReverseGematriaOutput = {\n results: ReverseGematriaResult[];\n hasMore: boolean;\n totalFound: number;\n};\n\n// =============================================================================\n// Existing Types\n// =============================================================================\n\nexport const DIGRAPHS = new Set<string>([\n LATIN_LETTERS.PH,\n LATIN_LETTERS.TS,\n LATIN_LETTERS.TZ,\n LATIN_LETTERS.SH,\n LATIN_LETTERS.CH,\n LATIN_LETTERS.TH,\n LATIN_LETTERS.KH,\n]);\n\nexport type LetterResult = {\n latinLetterId: NodeId<LetterTypes.LATIN_LETTER>;\n value: number;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n hebrewCharacter: string;\n isVowel: boolean;\n}\n\nexport type WordResult = {\n letters: LetterResult[];\n vowelsSum: number;\n consonantsSum: number;\n includedGematriaValues: Set<number>;\n}\n\nexport type GematriaState = {\n includedLetters: LetterResult[];\n vowelsSum: number;\n consonantsSum: number;\n includedGematriaValues: Set<number>;\n}\n\nexport type LetterPercentages = {\n percentageOfVowels: number;\n percentageOfConsonants: number;\n letters: Record<string, number>;\n}\n\nexport enum GematriaNumbersWithMeaning {\n One = 1,\n Two = 2,\n Three = 3,\n Four = 4,\n Five = 5,\n Six = 6,\n Seven = 7,\n Eight = 8,\n Nine = 9,\n Eleven = 11,\n TwentyTwo = 22,\n ThirtyThree = 33,\n FortyFour = 44,\n}\n\nexport const INDIVIDUALITY_NUMBER_MEANINGS: Record<GematriaNumbersWithMeaning, string> = {\n [GematriaNumbersWithMeaning.One]: \"The leadership gained in past lives now brings the desire to continue striving for a higher consciousness. This person is independent when it comes to their beliefs. Their longing for free and independent thought remains their deepest inner drive. They should not allow this strong impulse to obstruct the achievement of practical goals in their present life. They will always be aware of their inner strength and find it difficult to accept a secondary position among their peers. If marriage or partnership is involved, they should explore their partner's inner aspirations in order to safeguard a successful relationship. If their individuality becomes too strong, it may manifest as authoritarianism and prove detrimental to their personal happiness. So firm is the intensity of their focus, and so strong the memory of past glory, that they are able to hold to their convictions even when this means breaking off important relationships. Their inner strength gives them something to rely on when situations are tense, and they can be an inspiration to others in difficult times. In terms of individuality, this number is one of the best indications. It denotes a person who is aware of their own importance, yet at the same time appreciates the rights and opinions of others. They ask for other people's point of view, using it as a way to refine their own opinions, which are formed on the basis of genuine knowledge.\",\n [GematriaNumbersWithMeaning.Two]: \"Strong desire for peace and harmony. They are attentive and diplomatic, adaptable and gentle. They are more of a follower than a leader. Discernment is a strong point of their character; for this reason, they make a good mediator or go-between, helping to bring peace to opposing forces. They avoid hurting other people's feelings, to the point of submitting to their wishes. As a result, they can appear shy and lacking in self-confidence. They should try to overcome indecision, because while they hesitate, others may step forward and claim what should have been theirs. They must encourage themselves to do what they feel is right and not let emotions block their purpose. Their sensitivity can be positive when used to attune to the balancing forces of the universe and to express truths that help everyone gain understanding. As an individuality number, this indicates a person full of tact and diplomacy, non-aggressive, who does not try to impose their opinions, and who listens to other people's ideas before expressing their own.\",\n [GematriaNumbersWithMeaning.Three]: \"Very conscientious about duty. They understand well the law of the trinity and know that inspiration and imagination bring the best results when used to help others. This can become their life philosophy. They should satisfy their urge to create and to expand activities related to their interests. They seek happiness and find it by making others happy. When someone is depressed, a visit from them brings hope and courage. They should expand their ideals by dedicating themselves to expressing good humor and optimism. They should commit to making their dreams come true, but not to the point where they become impractical. Love is important to them, both in giving and receiving – but they should try to keep a sense of reason in their romantic expansions. They will be happy and well-adjusted when they are bringing happiness to others. As an individuality number, this is one of the best, unless the Personality number is very adverse and prevents these qualities from being expressed. This person has highly developed philosophical and moral qualities and always tries to act for the greater good. Wherever they are, they will exert a strong positive influence, seeking to comfort and brighten the lives of those who are less fortunate. When the Personality is not favorable, the individual may become very selfish, vain, sensual, and concerned only with themselves. This happens especially when the Personality number is 8 or 9. The best combinations for the number 3 occur when the Personality number is 1 or 6, forming a harmonious and powerful nature.\",\n [GematriaNumbersWithMeaning.Four]: \"Highly organized, a quality that can bring them material success. The practical side permeates their whole being. Others could model themselves on their well-organized life plan. Their loyalty, balance, and reliability mean a great deal to those around them. People know where they stand with them in all things, and feel that any dealings with them will be handled honestly. They approach matters seriously, in business or in love, and for this reason they can make their dreams real in a planned and practical way. As an individuality number, this produces some of the strongest characters, individuals who rise in life through their genius and willpower. They are distinctly optimistic and face obstacles bravely. They do not fear venturing into the unknown. When the Personality allows a suitable individual expression, they can become a true benefactor of humanity. However, if the Personality is expressed by a weak or disharmonic number, they may become overly eccentric and incomprehensible, prone to mental imbalance and the danger of madness. Personality numbers 2 or 9 are the most harmful combinations for a 4 in Individuality.\",\n [GematriaNumbersWithMeaning.Five]: \"They claim the right to freedom and do not allow any restrictions on their ideals or way of thinking. Variety in self-expression is absolutely essential. They would feel inert and indifferent without the stimulus of change and new perspectives. Travel is one of the desires of their soul, as they see it as educational and as something that broadens their horizons. Pettiness is not tolerated. If they feel themselves slipping into routine, a journey, a new occupation, or a holiday can shift the vibrations for the better and open new paths for continued inner growth. This number is weak as an individuality number, promising little progress in life and favoring mainly the extension of experience, which will be as varied as possible. When the personal character is expressed by a powerful, steady number, the inner struggles and mobility of ideas and feelings do not show much on the surface, and the person can still progress in life and attain a position that matches their talent. However, if the Personality is also weak, the person will drift through life like a butterfly.\",\n [GematriaNumbersWithMeaning.Six]: \"Strongly responsive to beauty, harmony, and peace. Affectionate, kind, and loyal to those they love. Their mission could be to teach others how to maintain peace and harmony in their lives and to spread the ideal of moral conduct. They work hard to keep domestic harmony through their ideal way of life. Of all the love vibrations of the numbers, this one is the most likely to create a suffocating love, so deep is their desire to live for their immediate family. They must learn to allow family members to express their own desires in life, even when they do not agree with their choices. As an individuality number, it indicates a deeply benevolent and kind nature, but its outer expression depends greatly on the Personality and the Synthesis. This number is strongly limited by prejudices and mistaken ideas, which can expand into malice and even vandalism if it is linked with 8 or 9 in the Personality or in the Synthesis. It easily tends toward extremes, depending on how it combines with the other numbers in the chart.\",\n [GematriaNumbersWithMeaning.Seven]: \"Calm and reserved, a good thinker, analyst, and mediator. They need a peaceful environment and become irritated in noisy surroundings. Refined, sensitive, withdrawn, and often psychic. They may live alone and remain single, or become celibate and join one of humanity's higher mystical orders. Their true nature is to be calm, to develop depth of character, and thus to benefit humanity through philosophy. As an individuality number, it is very variable in its effects, everything depending on the individual's moral development. When supported by harmonious numbers in the Personality and in the Synthesis, its influence is among the best and most beneficial for humanity, giving rise to great philanthropy.\",\n [GematriaNumbersWithMeaning.Eight]: \"Ambition is their key word. They believe in achievement and do not let any obstacle stop them from reaching their goals. Their number is not an easy one to handle, but their efforts will be rewarded. They are someone who undertakes great works in order to stand out from the crowd and reach the heights. They have the ability to organize large groups and enterprises successfully. Psychology would help them understand the masses they may work with. Others expect more from them than from the average person, and for this reason they must trust their inner Self to guide them in remaining in a position of leadership. This is the number of high-performance athletes. As an individuality number, this gives one of the strongest and most enterprising characters. The person has great willpower, concentration, and the ability to carry their undertakings through. When they are morally developed, these qualities place them on the highest levels of life.\",\n [GematriaNumbersWithMeaning.Nine]: \"Intuition is strongly active in their life. They are sensitive, imaginative, and able to think in abstract terms. Though they may sometimes seem vague, they are extremely impressionable, compassionate, and generous. They need both to give and to receive love. They are gentle and merciful, with an expansive consciousness dedicated to the upliftment of humanity. This could be the number of a master or adept from a previous life. The influence of this number in individuality is very strong and can produce remarkable results, both for good and for ill. In a morally developed person, the magnetic power becomes very great, and they possess notable healing abilities. When the Personality is weak, the individual becomes a victim of misfortune and adverse events, through lack of control over their passions.\",\n [GematriaNumbersWithMeaning.Eleven]: \"Has been on the spiritual path for a long time, probably for more than one incarnation. Through spiritual evolution they have learned many of the mysteries of life and death. They have courage, talent, and leadership ability; they are understanding, wise, intuitive and, often, clairvoyant, with extremely sensitive extrasensory perception and strong spiritual inclinations. They also possess the courage to face many changes and unexpected upheavals.\",\n [GematriaNumbersWithMeaning.TwentyTwo]: \"With the power of 22, you carry the urge to continue the tangible achievements of past lives. You seek material accomplishment. You are the master builder. Your ambitious soul leaves the world a tangibly better place for your having been here; for this reason, you need to maintain mental balance while expressing your ideals in a practical way.\",\n [GematriaNumbersWithMeaning.ThirtyThree]: \"You are willing to make sacrifices for humanity. You have a clear vision of future world conditions and feel ready to help in every way you can to bring peace to all humankind. At times, the vibrations of your Life Lesson (birth date) may be at odds with the longings of your soul. In spite of this, you will strive to practice generosity and to consider other people's point of view. This circumstance may temporarily force you into a background position, but it does not destroy your hope of one day holding a place from which you can promote your ideals. You are always ready to help others.\",\n [GematriaNumbersWithMeaning.FortyFour]: \"Universal concepts are part of your consciousness; they now express themselves as inner impulses to bring about great advances in world culture. Whether by uniting the practical with the global sphere, a governmental chamber or even the UN may offer you the opportunity to promote these ideals among all peoples. You are willing to take on great responsibilities. Your inner Self recognizes that you are an adept; now the challenge is how to manifest this to the outer world. You trust that your soul will guide you toward fields where your great ideals can be advanced. You have an innate ability to solve everyday problems and can work with others to help them organize their lives.\",\n}\n\nexport const PERSONALITY_NUMBER_MEANINGS: Record<GematriaNumbersWithMeaning, string> = {\n [GematriaNumbersWithMeaning.One]: \"You present to the world an image of someone independent and capable, the executive type. Others see you as a unique individual, set apart from the ordinary crowd – perhaps something of a loner in some respects, but definitely different. They expect you to be able to take control of any situation and to manage an organization or a club effectively. People look to you to get the job done, because you appear to be the leader, the pioneer, the person with ideas who always knows where to go and what to do. Creating the right image comes first in your mind, and you rely on the strength of your personality, as if it were your identity card, to gain entry into social circles. You may sometimes appear too aggressive or domineering. In that case, the selfish need to assert your individuality is fulfilled at the expense of the free expression of those around you. As a number 1 person, you like to dress to be at the forefront of fashion. You enjoy exclusive styles. On the negative side, you may even dress in an eccentric way, or in a way that goes beyond the boundaries of good taste. As an indicator of Personality, this number is rarely favorable, as it almost always denotes selfishness, disregard for the opinion of others, a tendency to interfere in other people's lives, and a desire to dominate those around. A person under this influence likes to give their opinion without being asked, insists that their method is always the best, and does not respect the feelings of others. Only when it is in perfect harmony with the Individuality number does the number 1 become favorable.\",\n [GematriaNumbersWithMeaning.Two]: \"You appear calm and modest and seem to need a peaceful environment in which to live. You are demanding about details; neatness and cleanliness are a must. Instead of making a grand entrance, you prefer to stay in the background, working behind the scenes or in cooperation with others. You are attractive and popular with the opposite sex. This is partly due to your desire for companionship and harmony, which makes you tolerant of others. You seem incomplete in yourself. You may appear restless and dissatisfied with circumstances because of the constant weighing and balancing you do in every situation. You may have difficulty making decisions, as both sides often seem very clear to you. At times, you can show bad temper and use sharp words. You dress with care and discretion, preferring a balanced and pleasant appearance. You should choose clothes of a lighter style, reflecting your more passive and artistic nature. As a Personality number, 2 is not very favorable, producing a nervous, irritable, flattering, and scheming disposition. It makes countless promises, but almost never carries them out, always looking for excuses.\",\n [GematriaNumbersWithMeaning.Three]: \"Extremely charming, pleasant, and sociable. You act in an attractive way, seeking pleasure and joy. Loyalty and honesty strengthen your idealistic nature. Communication is a vital part of your personality, and you find it very easy to express yourself. As an avid conversationalist, you shine in any group. You are like the sun, lighting up the world of those you meet, spreading brightness and optimism wherever you go. Others naturally gather around your warmth. Your outgoing personality can become so large that it leads to your downfall, through prejudice and envy. In such cases, your gift of speech tends to degenerate into gossip, exaggeration, and frivolity. If you are a woman, you may be beautiful and have an attractive body. You will enjoy personal adornments – jewelry, necklaces, makeup – and have an artistic flair for choosing clothes. On the negative side, you may become carelessly dressed, neglecting both style and the way you look after your wardrobe. As a Personality number, 3 gives pleasant manners, a sensitive and compassionate nature, public appeal, and popularity. When Individuality is occupied by a disharmonic number, 3 in Personality produces a demanding, critical person, inclined to arguments, vain, and impatient. Your selfishness will be greatly increased by the presence of 8 or 9 in Individuality, producing someone who will only be useful to themselves.\",\n [GematriaNumbersWithMeaning.Four]: \"You show the world a determined and well-directed attitude. You appear conservative, self-disciplined, and practical. You dream of an orderly existence through which your skill in both physical and mental application will produce conventional and even useful results. You are the honest, hard-working type, who respects values and effort. You like the land, nature, home, and your country. You may become so disciplined that you have no time for leisure, which can eventually isolate you from others. Extremely careful and frugal, you tend to become defensive and stingy. Roughness and bad temper can drive you even further away from social contact. Or, as a reaction in the opposite direction, you may appear completely undisciplined and lazy. Good sportswear appeals to you because it is durable and needs little care. You choose your work clothes carefully, insist on good quality, and often have them made to measure. You like to appear clean and well-groomed at all times. You are conservative both in the way you dress and in your behavior. Except in cases where Individuality is expressed by a strong and powerful number, such as 1, 3, 4, or 8, this number is harmful on the Personality level. In fact, when Individuality is not strong enough to hold the reins of the fiery vibrational impulses of 4 in Personality, the result is a very impulsive, violent, hasty, and inconstant disposition that can never bring good results in life. Numbers 2 and 5 in Individuality are too weak to contain the vibrations of 4, and 9 is too violent, increasing its effect.\",\n [GematriaNumbersWithMeaning.Five]: \"You like to talk, and you are intelligent, witty, and sharp; for this reason, you will have wide interaction with groups of people. You have strong magnetism with the opposite sex and powerful sexual appetites. Because change and freedom are so essential to you, your relationships may shift quickly. You enjoy constant activity, variety, and change, and you believe that change is progress. You are able to do anything, when and how you wish, in order to perform according to your abilities. You have a natural curiosity and are willing to take risks. Others see you as a born salesperson, publicist, or promoter. Overindulgence in social interaction and sensual pleasures can lead you to excess in food, drink, drugs/medication, or sexual contacts. You may become fickle, restless, and uncertain. You like to be among the 10 best-dressed people, or at least to be ahead of the curve in style, wearing brightly colored clothes with good taste. As a Personality number, 5 is quite favorable, as long as the other factors are not antagonistic. Personality expressed by the number 5 finds it easy to manifest its inner qualities and to adapt readily to the demands of the outer environment.\",\n [GematriaNumbersWithMeaning.Six]: \"You radiate a protective vibration and a strong sense of responsibility for others. People are drawn to you for advice, learning, and healing, because you have a maternal or paternal presence that conveys comfort and safety. Home seems very important to you. You are optimistic, cheerful, and reliable. You appear to love beauty and everything connected with the arts. You have a good sense of balance and symmetry; for this reason, you can see all the pieces individually and at the same time as part of a whole. Your social conscience drives you to seek truth and justice. You may become a slave to others, especially in the home, and your sense of social responsibility may degenerate into social irresponsibility or interference in other people's affairs. You are careful in choosing your clothes and show artistic talent, preserving color harmony in whatever combinations you choose. You prefer comfortable styles rather than exclusive fashions, although you are meticulous in choosing soft, harmonious fabrics. On the negative side, you may be a somewhat careless homemaker and neglectful in the way you dress. Personality number 6 gives a tendency toward luxury, great care with clothing, and concern with physical beauty. It inclines you strongly toward the opposite sex and sensual pleasures. You may often be dominated by the intensity of your passions and may have numerous unions in life.\",\n [GematriaNumbersWithMeaning.Seven]: \"You appear to be a loner who enjoys moments of solitude, completely removed from the crowd. Nature and regular walks in the countryside, or time spent at the beach, provide the right environment for your philosophical temperament. An air of mystery and secrecy surrounds you. You seem to be a philosopher, a mystic, a poet, a thinker, a scientist, and a researcher, whose temporary withdrawals from the world are occasions for further meditation. A sharp power of observation helps you mentally analyze any situation. You show an aristocratic air, personal dignity, and refined behavior, seeming to have an unshakable faith in the future. When you get involved in materialism, you find only disappointment, lose your composure, and become frustrated, sad, and withdrawn. Confusion, fear, and pessimism then take hold of you. You are neat, well put-together, and inclined to wear pastel or dark colors. You avoid light or bright colors and dress with good taste. When you become discontented, you grow indifferent to your appearance, neglecting so-called trivial details of color, harmony, and combination. Personality number 7 gives very attractive qualities and the ability to win much sympathy in social life. However, if moral development is not great, there will be a tendency to abuse these qualities.\",\n [GematriaNumbersWithMeaning.Eight]: \"You have a dynamic personality, and people recognize your authority because you appear affluent and self-controlled. There is an executive air about you, capable of directing large enterprises and business affairs. You radiate power and personal strength that commands recognition wherever you go. You seem authoritative, impartial, and ethical, and you appear to possess an inexhaustible source of strength and physical endurance. Your personal power may lead you into situations where you are tempted to abuse that power. Materialism can override your higher judgment, and you may become negative and cruel when provoked. A successful appearance is your standard; hence your insistence on well-made, high-quality clothing. You would never choose cheap items. Taken to extremes, you become flamboyant, wasteful, or a show-off, seeking to impress others through brightly colored clothes and the display of large amounts of money. A woman with this vibration may flaunt excessive jewelry and wear expensive clothes, even if bought on sale. As a Personality number, 8 is not very favorable, as it gives a coarse, imperious, and demanding disposition. Under this influence, a person easily becomes disliked because of their manner and appearance.\",\n [GematriaNumbersWithMeaning.Nine]: \"You seem to possess a broad range of understanding, as well as a personal magnetism that is universal in scope. Your cordial, friendly, and charming manner pleases everyone you come into contact with, and the selflessness that emanates from you makes you loved by many. You show tolerance and compassion for others, which allows you to forgive and forget easily. You are generous toward those in need and show genuine humanitarian concern. Others see you as romantic and emotional, an idealist who believes that the progress of the world justifies personal sacrifice. Sentimentality can take hold of you, and then you become susceptible to every sad story you hear. At that point you scatter your energies and emotions, and as a consequence you may become bitter. You dress in an artistic way, with a touch of drama, while still wanting your clothes to be well-fitted and comfortable. You tend to be good-looking, both in face and figure; and if you take care of your skin and maintain good posture, you may look young for a long time. As a Personality number, 9 has more or less the same meaning as it has in Individuality, with the distinction that here it is more material and somewhat coarser in its expression.\",\n [GematriaNumbersWithMeaning.Eleven]: \"You inspire others, leading them to see in you refinement and an artistic genius capable of moving souls. Avant-garde art is your favorite; you seem to synthesize unusual and innovative techniques. Recognition and fame may be granted to you through artistic or humanitarian efforts. You appear to be a visionary who believes in equal opportunities for all, regardless of sex, race, creed, or color. Your idealism can degenerate into egocentrism, in which case your many talents are wasted or left unused. Your mind then seeks harmful outlets for your genius, which may bring you notoriety. Your eyes shine with a spiritual light that can inspire others to reach their own potential when they witness what you have created. Your clothing style is original, and you may even design your own own models, as you have the artistic talent for it and prefer to be different.\",\n [GematriaNumbersWithMeaning.TwentyTwo]: \"You appear to be the masterful, diplomatic type, capable of handling all situations in a practical and efficient way. You seem to have control over the material world and the ability to bring about profound changes that could alter the course of history. You are a powerhouse who readily releases funds for charitable purposes and for organizations that benefit large groups of people. Your power can reach an international level, and you are meant to perform material services for the world. The unprecedented strength placed in your hands can eventually make you thirsty for power and, instead of serving others, you may come to exploit them out of greed. You then become indifferent to the needs of those around you and may be capable of dishonest acts to achieve your aims. You are usually careful with your clothing, choosing high-quality fabrics and conservative styles. Clothes fit you as if they were made especially for you. You wear your clothes; they do not wear you.\",\n [GematriaNumbersWithMeaning.ThirtyThree]: \"You impress others by your modesty, humility, and charity. You always seem to be drawn to places where your presence is needed and where you give more than you receive. Generous in all circumstances, you do not look for rewards; you appear to be a natural giver. You love children and animals and express kindness and tenderness toward them. People feel they can tell you their problems and that you will understand. Your sensitivity to the suffering of others tends to lead you into futile self-sacrifice, devoting yourself to people who often have no real intention of improving. In such cases, your martyrdom is useless, falling on barren ground. You dress in dignified styles, choosing your clothes with great care. Your manners are refined.\",\n [GematriaNumbersWithMeaning.FortyFour]: \"You have a disciplined, almost military bearing, walking upright with your shoulders back. This inspires confidence in you wherever you go. You seem to know where you are going, what you are going to do, and how you are going to do it. There is a practical, down-to-earth quality about you, and this reassures others. They feel that your common sense can solve their everyday problems and bring order into their material world. In time, you may become so focused on worldly problems that you bog yourself down in heavy work and burdensome responsibilities. You then lose sight of the source from which you came, and at that point your spiritual progress suffers. You like to wear military-style clothing and often buy tailored garments. You may add a military touch with braids, sashes, or distinctive buttons in order to make an impression.\",\n}\n\nexport const SYNTHESIS_NUMBER_MEANINGS: Record<GematriaNumbersWithMeaning, string> = {\n [GematriaNumbersWithMeaning.One]: \"It is the true I AM. You are aware of yourself as the center of the world, concerned with your own desires and seeking self-preservation above all. You use your resources for your own pleasure and have little interest in the needs of others. You are in this incarnation to develop the Self, but you must not allow this to be carried to the extreme of self-love. Leadership is your key word, and you need to accept the challenge of leading while others follow you. You have independent initiative that helps you succeed through the determination to stand by your beliefs, even under pressure. You show self-confidence and the ability to win, which will make you successful under all circumstances. In the Synthesis, the number 1 is generally beneficial and favorable to triumph. It promises high social positions and success in politics and governmental occupations. The person finds a social environment favorable to their advancement, has many friends, and enjoys great prestige in the circle in which they live.\",\n [GematriaNumbersWithMeaning.Two]: \"Desire for peace places you in the role of peacemaker. Your destiny could lead you to act as an ambassador of goodwill in foreign nations, thus bringing countless benefits to humanity. You must use your innate tact and discipline to deal with life's difficult situations. You have a keen sense of opposites, which allows you to develop your talents along creative lines. By expanding this awareness, you not only maximize your artistic potential, but also strengthen your abilities as a mediator and a helpful companion. You tend to become an integral part of any organization or group to which you belong. In the Synthesis, this number indicates little capacity for accomplishment and results of small importance in your undertakings.\",\n [GematriaNumbersWithMeaning.Three]: \"Talents that allow you to choose occupations or pastimes where you can inspire others and help them rise in life. You should play a leading role and develop your gift for expression and communication through drama or foreign languages. You should explore the arts and study the religions of the world, since this gives a constructive outlet for your energies and you have a natural inclination toward spiritual philosophies. Your occupation could include therapy and the treatment of others, as well as ongoing self-improvement. To be successful, you must use your time intelligently, not wasting your energies in too many directions at once and thus delaying the fulfillment of a valuable destiny. You should promote friendship among your peers by being a true friend when called upon. You spread joy and light through your talent for self-expression. You should keep optimism as your personal trademark. In the Synthesis, the number 3 is always a good sign and promises social progress, success in undertakings, and the achievement of wide-ranging ambitions. A person under this influence has great moral stature, a pleasant character, a sociable nature, and an interest in philanthropic movements.\",\n [GematriaNumbersWithMeaning.Four]: \"Need to see what you've built. Well organized in your thoughts, you can run your enterprise efficiently. You convey an air of stability and, as a result, others will trust you to get the job done in an efficient and proper way. You handle money well and, because of this, may see the financial world as fertile ground for your talents. Your key words are impatience, honesty, determination, and reliability. You demand obedience and practice self-denial in order to fulfill your duties, whether real or imagined. With a sharp sense of values, you dislike mediocrity and know that anything worth having is worth waiting for. Number 4 in the Synthesis is truly favorable only when it results from 1 and 3, for in this case both the individual character and the personality are strong and harmonize with the outer vibrations of the 4. A person with this combination will have great energy, capacity for achievement, and social qualities. When formed from numbers 4 and 9 in Individuality and Personality, 4 in the Synthesis is too violent and impulsive to produce good results. It can, however, be favorable for great explorers, military leaders, and all those who devote themselves to tasks that demand exceptional physical and moral energy.\",\n [GematriaNumbersWithMeaning.Five]: \"Many changes occur in your life, and your mission could well be to promote progress through your willingness to accept change. You are definitely not tied to old patterns, outdated ideas, or rigidly established principles. You are ready to accept new concepts and other points of view, and you claim the freedom to suggest new ways of doing things. You have the ability to present new ideas in logical, acceptable terms. You turn changes into springboards and intelligently transform them into growth experiences. However, you do not forget conventions, for in truth you are not a rebel; you simply have the courage to leave the old behind and try the new. You are quite fluent and expressive with words and may find that writing, teaching, or selling are perfect outlets for these talents. In the Synthesis, number 5, when it is the expression of 5 and 9 or 6 and 8, is not favorable, as it brings many troubles through lack of reflection, producing restrictions and numerous obstacles. In other cases, this number is more or less beneficial and depends on the individual's moral development.\",\n [GematriaNumbersWithMeaning.Six]: \"You love home and family life. You are the marital type, with family as your main focus. Morally good, respectable, reliable, and generous, you enjoy comfort and the pleasures of life. Very sociable and a good host, you communicate with everyone at a social gathering. Proud of your possessions, you like to show them and to display your family's talents and achievements. You need to train your artistic talents so that you can share your sense of beauty and appreciation of the aesthetic with others. This is a vibration of artists who work by fully expressing their deep and constant love for others through their own creations. In the Synthesis, it gives a philanthropic nature and brings success through the opposite sex. It is an excellent vibration for popularity and social success, but it does not favor the financial side very much, as money is easily spent on pleasures, entertainments, and so on.\",\n [GematriaNumbersWithMeaning.Seven]: \"You physically separate truth from falsehood and can discover and reveal some of life’s mysteries to a waiting world. You should become anything whose field is the mind (a thinker, for example). People may consider you strange and hard to understand, but they will follow your teachings and seek your advice when they are in difficulties. Your example and public image can benefit the whole community and, eventually, the world. You find strength in solitude and wisdom in moments of silence, as well as strength in your own knowledge. You should develop your mental powers. Number 7 is rarely favorable in the Synthesis, for it is beneficial only to those who have high aspirations and a well-developed moral character. In such cases, it brings extraordinary success and great popularity.\",\n [GematriaNumbersWithMeaning.Eight]: \"Possessing magnificent courage and strength, you will reach your goals through effort. Recognition, success, and wealth are your rightful destiny. Perseverance in your career and long hours of intensive work, supported by ambition, lead you to the highest executive position in your chosen field. No lesser position will satisfy you. You need to unite your material strength with the spiritual and achieve self-mastery before you can attain and maintain the position you envision as the work of your life. Even if you choose the field of athletics, there is a tendency to end your life in the world of commerce. In the Synthesis, number 8 indicates that a person fulfills their aspirations through energy and authority. You can rise to high positions because of your ambition and ability, but if the Individuality and Personality numbers are not strong and favorable, you will suffer loss of position. The number 8 is always a sign of elevation, but it almost always brings loss of status through excessive ambition.\",\n [GematriaNumbersWithMeaning.Nine]: \"Perfection is your goal, even though you rarely attain it. Your mission is charity. You have a tendency to face many tests and adversities, but the lesson of forgiveness will bring moderation to these situations. The more you evolve, the more trials you will be able to face; therefore, take care not to lose your balance. You strive to live an ideal life, hoping to inspire others to do the same. Wanting to improve the world through philosophy and philanthropy, you become impatient when results are slow to appear. You need to realize that evolution takes place only over long cycles of time. Your breadth of thought impresses others. You must learn not to cling to old relationships. You should not remain limited to a small group, since your broad philosophy is meant to touch and clarify the lives of many. In the Synthesis, the number 9 denotes people of great physical activity – explorers, aviators, and captains of industry. It is a number of physical expansion, military activity, and authority. When the other numbers are in harmony, there is the possibility of great triumphs.\",\n [GematriaNumbersWithMeaning.Eleven]: \"You may become a leader in public or civil affairs in your community and help provide a better standard of living for the less fortunate. Your career aspirations could express themselves on stage or screen, as a preacher, or as a dynamic teacher. Your standard of conduct should be higher than average. In some way, you are meant to attain fame or recognition, and since this vibration confers great creative potential, the arts or inventive professions are your most likely and favorable choices. You have the ability to unstop the creative source and to infuse your work with an inspired touch that will affect the souls of all who come into contact with what you create.\",\n [GematriaNumbersWithMeaning.TwentyTwo]: \"You trust in your leadership ability and therefore naturally take on great responsibilities. This fulfills your longing for important achievements. Once you have assumed a position of great power and fortune, you will want to take part in new mass movements and major civic and community projects. You are a super-materialist whose influence can become worldwide. On the material plane you are a builder; you create on a grand scale. Bridges, hospitals, museums, and other such structures are the kind of works you tend to leave to the world – works that help and enlighten humanity. Because your influence reaches so far, you must guard carefully against motives that run contrary to ethics, for in time they will affect many lives. Serve well, and you will be rewarded in direct proportion.\",\n [GematriaNumbersWithMeaning.ThirtyThree]: \"You tend toward self-sacrifice and service to others. There is a tendency to crucify your emotions and to suffer the pains of the world. Your actions are tempered by compassion, grounded in your understanding of right and justice. You often notice that you must live impersonally, with a detached yet protective attitude, and you recognize that the way you handle the burdens placed upon you is a supreme example for others. People sense your understanding nature and are naturally drawn to you in search of comfort and help. By responding to the needs of others, you will find the fulfillment that this master number demands of you. If you do not live in accordance with this master number, you may live as a 6 instead. In that case, you will develop a martyr complex and receive little recognition for your sacrifices.\",\n [GematriaNumbersWithMeaning.FortyFour]: \"This vibration demands great discipline and perseverance, and the ability to make the best of any situation that arises. You are quite resourceful, drawing on your strong reserves of common sense and logic to solve whatever problems appear. Your destiny is to serve the material needs of the world through productive, wholesome methods. You are meant to gain complete mastery over your mind and body while on Earth. Your desire should be that others share in universal prosperity, and you must establish conditions in which this becomes possible. You seek to improve the world in its physical aspect.\",\n}","import { HEBREW_LETTERS } from \"../core/constants\";\nimport { createTree } from \"../core/factory\";\nimport { SYSTEM as KAABALAH_SYSTEM } from \"../core/systems/kaabalah\";\nimport { TreeOfLife } from \"../core/tree-of-life\";\nimport { id, LetterTypes, Node, NodeId, parseId } from \"../core/types\";\nimport type * as GematriaTypes from \"./data\";\nimport * as GematriaData from \"./data\";\n\nconst reduceToSingleDigitWithSteps = (num: number) => {\n const steps = [num];\n let currentNum = num;\n\n while (currentNum > 9) {\n currentNum = String(currentNum)\n .split(\"\")\n .reduce((acc, digit) => acc + parseInt(digit), 0);\n steps.push(currentNum);\n }\n\n return {\n steps,\n finalValue: currentNum,\n };\n};\n\n/**\n * Reduce a number to a single digit, preserving master numbers.\n * Tracks all reduction steps and detects master numbers in the path.\n *\n * @param num - The number to reduce\n * @param masterNumbers - Master numbers to preserve (default: EXTENDED_MASTER_NUMBERS)\n * @returns ReductionInfo with originalSum, reductionSteps, finalValue, and optional masterNumber\n */\nconst reduceWithMasterNumbers = (\n num: number,\n masterNumbers: readonly number[] | number[] = GematriaData.EXTENDED_MASTER_NUMBERS\n): GematriaTypes.ReductionInfo => {\n const steps = [num];\n let current = num;\n let masterNumber: number | undefined;\n\n while (current > 9) {\n // Check if current is a master number\n if (masterNumbers.includes(current)) {\n masterNumber = current;\n break;\n }\n // Reduce by summing digits\n current = String(current)\n .split(\"\")\n .reduce((acc, digit) => acc + parseInt(digit), 0);\n steps.push(current);\n }\n\n // Continue reducing past master number to get finalValue (1-9)\n let finalValue = current;\n if (masterNumber && finalValue > 9) {\n while (finalValue > 9) {\n finalValue = String(finalValue)\n .split(\"\")\n .reduce((acc, d) => acc + parseInt(d), 0);\n steps.push(finalValue);\n }\n }\n\n return {\n originalSum: num,\n reductionSteps: steps,\n finalValue: masterNumber ?? steps[steps.length - 1],\n masterNumber,\n };\n};\n\nconst getLastArkAnnuStep = (steps: number[]) => {\n if (steps.length === 0) return 0;\n\n // reverse sort to get the last step\n const step = steps.sort((a, b) => b - a).find((step) => step <= 22);\n\n return step ?? steps.at(-1) ?? 0;\n}\n\nfunction normalizeLetter(letter: string): string {\n if (letter.toUpperCase() === \"Ã\") return \"Ã\";\n if (letter.toUpperCase() === \"Ç\") return \"Ç\";\n\n return letter.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n}\n\nfunction getLetterMapping({\n tree,\n letterId,\n isStarting,\n}: {\n tree: TreeOfLife;\n letterId: NodeId<LetterTypes.LATIN_LETTER>;\n isStarting: boolean;\n}): Node<LetterTypes.HEBREW_LETTER> | undefined {\n if (isStarting && parseId(letterId) === \"O\") {\n return tree.getNode(id(LetterTypes.HEBREW_LETTER, HEBREW_LETTERS.AYIN));\n }\n\n return tree.walk(letterId, 2, LetterTypes.HEBREW_LETTER).at(0);\n}\n\nfunction processLetter(\n tree: TreeOfLife,\n letters: string[],\n i: number\n): { result?: GematriaTypes.LetterResult; skipNext: boolean } {\n const letter = normalizeLetter(letters[i]).toLocaleUpperCase();\n const nextLetter = letters[i + 1]\n ? normalizeLetter(letters[i + 1]).toLocaleLowerCase()\n : \"\";\n const combinedLetter = letter + nextLetter;\n\n if (GematriaData.DIGRAPHS.has(combinedLetter)) {\n const isEnding = i > 0 && i === letters.length - 2;\n const latinLetterId = id(LetterTypes.LATIN_LETTER, combinedLetter);\n const mapping = getLetterMapping({\n tree,\n letterId: latinLetterId,\n isStarting: false,\n });\n\n if (!mapping?.data) {\n return { skipNext: false };\n }\n\n const useWhenEndingValue =\n isEnding &&\n mapping.data.gematriaValueWhenEnding !== undefined &&\n mapping.data.characterWhenEnding !== undefined;\n\n return {\n result: {\n latinLetterId,\n value: useWhenEndingValue\n ? mapping.data.gematriaValueWhenEnding!\n : mapping.data.gematriaValue,\n hebrewCharacter: useWhenEndingValue\n ? mapping.data.characterWhenEnding!\n : mapping.data.character,\n hebrewLetterId: mapping.id,\n isVowel: false,\n },\n skipNext: true,\n };\n }\n\n const isStarting = i === 0;\n const latinLetterId = id(LetterTypes.LATIN_LETTER, letter);\n const mapping = getLetterMapping({\n tree,\n letterId: latinLetterId,\n isStarting,\n });\n\n if (!mapping?.data) {\n return { skipNext: false };\n }\n\n const isEnding = i > 0 && i === letters.length - 1;\n const latinLetter = tree.getNode(latinLetterId);\n const useWhenEndingValue =\n isEnding &&\n mapping.data.gematriaValueWhenEnding !== undefined &&\n mapping.data.characterWhenEnding !== undefined;\n\n return {\n result: {\n latinLetterId,\n value: useWhenEndingValue\n ? mapping.data.gematriaValueWhenEnding!\n : mapping.data.gematriaValue,\n hebrewCharacter: useWhenEndingValue\n ? mapping.data.characterWhenEnding!\n : mapping.data.character,\n hebrewLetterId: mapping.id,\n isVowel: latinLetter?.data?.isVowel ?? false,\n },\n skipNext: false,\n };\n}\n\nfunction processWord(word: string, tree: TreeOfLife): GematriaTypes.WordResult {\n const letters = word.split(\"\");\n let i = 0;\n\n let wordState: GematriaTypes.WordResult = {\n letters: [],\n vowelsSum: 0,\n consonantsSum: 0,\n includedGematriaValues: new Set(),\n };\n\n while (i < letters.length) {\n const { result, skipNext } = processLetter(tree, letters, i);\n\n if (result) {\n wordState = {\n letters: [...wordState.letters, result],\n vowelsSum: wordState.vowelsSum + (result.isVowel ? result.value : 0),\n consonantsSum:\n wordState.consonantsSum + (result.isVowel ? 0 : result.value),\n includedGematriaValues: new Set([\n ...wordState.includedGematriaValues,\n result.value,\n ]),\n };\n }\n\n i += skipNext ? 2 : 1;\n }\n\n return wordState;\n}\n\nfunction calculateLetterPercentages(\n word: string,\n tree: TreeOfLife,\n prev: GematriaTypes.LetterPercentages\n): GematriaTypes.LetterPercentages {\n const letters = word.split(\"\");\n const letterCount = letters.length;\n\n let vowelsCount = 0;\n let consonantsCount = 0;\n\n const newLetters = { ...prev.letters };\n\n for (const letter of new Set(letters)) {\n const occurrences = letters.filter((l) => l === letter).length;\n const latinLetter = tree.getNode(id(LetterTypes.LATIN_LETTER, letter));\n newLetters[letter] = (occurrences / letterCount) * 100;\n\n if (latinLetter?.data?.isVowel) {\n vowelsCount += occurrences;\n } else {\n consonantsCount += occurrences;\n }\n }\n return {\n percentageOfVowels: (vowelsCount / letterCount) * 100,\n percentageOfConsonants: (consonantsCount / letterCount) * 100,\n letters: newLetters,\n };\n}\n\nfunction getMissingGematriaValues(\n tree: TreeOfLife,\n includedGematriaValues: Set<number>\n) {\n const missingGematriaValues: {\n value: number;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n whenEnding: boolean;\n }[] = [];\n\n for (const hebrewLetter of Object.values(HEBREW_LETTERS)) {\n const hebrewLetterId = id(LetterTypes.HEBREW_LETTER, hebrewLetter);\n const hebrewLetterNode = tree.getNode(hebrewLetterId);\n\n if (!hebrewLetterNode?.data) continue;\n\n if (!includedGematriaValues.has(hebrewLetterNode.data.gematriaValue)) {\n missingGematriaValues.push({\n value: hebrewLetterNode.data.gematriaValue,\n hebrewLetterId,\n whenEnding: false,\n });\n }\n\n if (\n hebrewLetterNode.data.gematriaValueWhenEnding &&\n !includedGematriaValues.has(hebrewLetterNode.data.gematriaValueWhenEnding)\n ) {\n missingGematriaValues.push({\n value: hebrewLetterNode.data.gematriaValueWhenEnding,\n hebrewLetterId,\n whenEnding: true,\n });\n }\n }\n\n missingGematriaValues.sort((a, b) => a.value - b.value);\n\n return missingGematriaValues;\n}\n\n/**\n * Internal type for letter info used in reverse gematria\n */\ntype LetterInfo = {\n letter: string;\n normalValue: number;\n endingValue?: number;\n isVowel: boolean;\n isDigraph: boolean;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n hebrewCharacter: string;\n hebrewCharacterWhenEnding?: string;\n};\n\n/**\n * Build letter info from the tree for a given latin letter\n */\nfunction buildLetterInfo(\n tree: TreeOfLife,\n letter: string,\n isStarting: boolean\n): LetterInfo | undefined {\n const latinLetterId = id(LetterTypes.LATIN_LETTER, letter);\n const latinLetterNode = tree.getNode(latinLetterId);\n\n if (!latinLetterNode?.data) return undefined;\n\n const mapping = getLetterMapping({ tree, letterId: latinLetterId, isStarting });\n if (!mapping?.data) return undefined;\n\n return {\n letter,\n normalValue: mapping.data.gematriaValue,\n endingValue: mapping.data.gematriaValueWhenEnding,\n isVowel: latinLetterNode.data.isVowel,\n isDigraph: GematriaData.DIGRAPHS.has(letter),\n hebrewLetterId: mapping.id,\n hebrewCharacter: mapping.data.character,\n hebrewCharacterWhenEnding: mapping.data.characterWhenEnding,\n };\n}\n\n/**\n * Get all available letters for reverse gematria from the tree\n */\nfunction getAvailableLetters(tree: TreeOfLife, includeDigraphs: boolean): string[] {\n const singleLetters = [\n \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\",\n \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"\n ];\n\n // Digraphs use mixed case in LATIN_LETTERS (e.g., \"Sh\", \"Ph\", \"Th\")\n const digraphs = includeDigraphs\n ? Array.from(GematriaData.DIGRAPHS)\n : [];\n\n return [...singleLetters, ...digraphs];\n}\n\n/**\n * Parse a suggestion text into letter units (handling digraphs)\n */\nfunction parseSuggestionToLetterUnits(text: string): string[] {\n const upper = text.toUpperCase();\n const units: string[] = [];\n let i = 0;\n\n while (i < upper.length) {\n const char = upper[i];\n\n // Check for digraphs (two-character combinations)\n if (i + 1 < upper.length) {\n const twoChar = char + upper[i + 1].toLowerCase();\n if (GematriaData.DIGRAPHS.has(twoChar)) {\n units.push(twoChar);\n i += 2;\n continue;\n }\n }\n\n // Single character (including spaces)\n units.push(char);\n i += 1;\n }\n\n return units;\n}\n\n/**\n * Count occurrences of each letter unit in an array\n */\nfunction countLetterUnits(units: string[]): Map<string, number> {\n const counts = new Map<string, number>();\n for (const unit of units) {\n counts.set(unit, (counts.get(unit) || 0) + 1);\n }\n return counts;\n}\n\n/**\n * Reverse gematria - find letter combinations that match target values\n */\nexport const reverseGematria = (\n options: GematriaTypes.ReverseGematriaOptions,\n tree?: TreeOfLife\n): GematriaTypes.ReverseGematriaOutput => {\n const {\n targetVowels,\n targetConsonants,\n targetSynthesis,\n minLength = 1,\n maxLength = 8,\n maxResults = 100,\n includeDigraphs = true,\n maxLetterRepeat,\n suggestionText,\n suggestionMode = \"subsequence\",\n matchReductionStep = true,\n masterNumbers = GematriaData.EXTENDED_MASTER_NUMBERS as unknown as number[],\n } = options;\n\n // Validate that at least one target is specified\n if (targetVowels === undefined && targetConsonants === undefined && targetSynthesis === undefined) {\n return { results: [], hasMore: false, totalFound: 0 };\n }\n\n if (!tree) {\n tree = createTree({ system: KAABALAH_SYSTEM, parts: [] });\n }\n\n // If suggestionText is provided, use the appropriate mode\n if (suggestionText !== undefined) {\n if (suggestionMode === \"subsequence\") {\n return reverseGematriaFromSubsequence(options, tree);\n } else {\n return reverseGematriaAnagram(options, tree);\n }\n }\n\n const results: GematriaTypes.ReverseGematriaResult[] = [];\n let totalFound = 0;\n let hasMore = false;\n\n const availableLetters = getAvailableLetters(tree, includeDigraphs);\n\n // Cache letter info for performance (but still using tree as source of truth)\n const letterInfoCache = new Map<string, LetterInfo | undefined>();\n\n const getLetterInfoCached = (letter: string, isStarting: boolean): LetterInfo | undefined => {\n const cacheKey = `${letter}-${isStarting}`;\n\n if (!letterInfoCache.has(cacheKey)) {\n letterInfoCache.set(cacheKey, buildLetterInfo(tree!, letter, isStarting));\n }\n\n return letterInfoCache.get(cacheKey);\n };\n\n // Backtracking search\n // We track running sums using \"middle\" values (non-ending)\n // When checking a complete combination, we calculate the actual sums with ending values\n const backtrack = (\n currentLetters: string[],\n currentInfos: LetterInfo[],\n runningVowelsSum: number, // Sum using non-ending values\n runningConsonantsSum: number,\n letterCounts: Map<string, number> // Track letter repetition counts\n ) => {\n // Early termination if we have enough results\n if (results.length >= maxResults) {\n hasMore = true;\n return;\n }\n\n const currentLength = currentLetters.length;\n\n // Check if current combination is valid (considering ending values)\n if (currentLength >= minLength && currentLength <= maxLength) {\n // Calculate actual sums with ending value for last letter\n let actualVowelsSum = runningVowelsSum;\n let actualConsonantsSum = runningConsonantsSum;\n\n // Adjust for ending value if the last letter has one and there's more than one letter\n if (currentLength > 1) {\n const lastInfo = currentInfos[currentLength - 1];\n if (lastInfo.endingValue !== undefined) {\n const diff = lastInfo.endingValue - lastInfo.normalValue;\n if (lastInfo.isVowel) {\n actualVowelsSum += diff;\n } else {\n actualConsonantsSum += diff;\n }\n }\n }\n\n // Calculate reduction info for matching\n const vowelsReduction = reduceWithMasterNumbers(actualVowelsSum, masterNumbers);\n const consonantsReduction = reduceWithMasterNumbers(actualConsonantsSum, masterNumbers);\n // Synthesis uses Arkannu steps for reduction (same as calculateGematria)\n const synthesisArkannuSum = getLastArkAnnuStep(vowelsReduction.reductionSteps) +\n getLastArkAnnuStep(consonantsReduction.reductionSteps);\n const synthesisReduction = reduceWithMasterNumbers(synthesisArkannuSum, masterNumbers);\n // Raw sum for backward compatibility (matches calculateGematria.synthesis.originalSum)\n const actualSynthesisSum = actualVowelsSum + actualConsonantsSum;\n\n // Match against reduction steps if enabled, otherwise exact match\n const matchesVowels = targetVowels === undefined ||\n (matchReductionStep\n ? vowelsReduction.reductionSteps.includes(targetVowels)\n : actualVowelsSum === targetVowels);\n const matchesConsonants = targetConsonants === undefined ||\n (matchReductionStep\n ? consonantsReduction.reductionSteps.includes(targetConsonants)\n : actualConsonantsSum === targetConsonants);\n const matchesSynthesis = targetSynthesis === undefined ||\n (matchReductionStep\n ? synthesisReduction.reductionSteps.includes(targetSynthesis)\n : actualSynthesisSum === targetSynthesis);\n\n if (matchesVowels && matchesConsonants && matchesSynthesis) {\n totalFound++;\n if (results.length < maxResults) {\n // Build letter details with correct ending values\n const letterDetails: GematriaTypes.LetterResult[] = currentInfos.map((info, idx) => {\n const isEnding = idx === currentLength - 1 && currentLength > 1;\n const useEndingValue = isEnding && info.endingValue !== undefined;\n\n return {\n latinLetterId: id(LetterTypes.LATIN_LETTER, info.letter),\n value: useEndingValue ? info.endingValue! : info.normalValue,\n hebrewLetterId: info.hebrewLetterId,\n hebrewCharacter: useEndingValue && info.hebrewCharacterWhenEnding\n ? info.hebrewCharacterWhenEnding\n : info.hebrewCharacter,\n isVowel: info.isVowel,\n };\n });\n\n results.push({\n letters: currentLetters.join(\"\").toUpperCase(),\n letterDetails,\n vowelsSum: actualVowelsSum,\n consonantsSum: actualConsonantsSum,\n synthesisSum: actualSynthesisSum,\n vowels: vowelsReduction,\n consonants: consonantsReduction,\n synthesis: synthesisReduction,\n });\n } else {\n hasMore = true;\n }\n }\n }\n\n // Stop if we've reached max length\n if (currentLength >= maxLength) {\n return;\n }\n\n // Pruning: if running sums already exceed targets, no point continuing\n // Note: only prune when not using reduction step matching\n if (!matchReductionStep) {\n if (targetVowels !== undefined && runningVowelsSum > targetVowels) {\n return;\n }\n if (targetConsonants !== undefined && runningConsonantsSum > targetConsonants) {\n return;\n }\n if (targetSynthesis !== undefined && runningVowelsSum + runningConsonantsSum > targetSynthesis) {\n return;\n }\n }\n\n // Try adding each letter\n for (const letter of availableLetters) {\n const isStarting = currentLength === 0;\n\n const letterInfo = getLetterInfoCached(letter, isStarting);\n if (!letterInfo) continue;\n\n // Check maxLetterRepeat constraint\n if (maxLetterRepeat !== undefined) {\n const currentCount = letterCounts.get(letter) || 0;\n if (currentCount >= maxLetterRepeat) {\n continue;\n }\n }\n\n const value = letterInfo.normalValue;\n const newVowelsSum = runningVowelsSum + (letterInfo.isVowel ? value : 0);\n const newConsonantsSum = runningConsonantsSum + (letterInfo.isVowel ? 0 : value);\n\n // Pruning - only prune when not using reduction step matching\n if (!matchReductionStep) {\n if (targetVowels !== undefined && newVowelsSum > targetVowels) {\n continue;\n }\n if (targetConsonants !== undefined && newConsonantsSum > targetConsonants) {\n continue;\n }\n if (targetSynthesis !== undefined && newVowelsSum + newConsonantsSum > targetSynthesis) {\n continue;\n }\n }\n\n currentLetters.push(letter);\n currentInfos.push(letterInfo);\n letterCounts.set(letter, (letterCounts.get(letter) || 0) + 1);\n\n backtrack(currentLetters, currentInfos, newVowelsSum, newConsonantsSum, letterCounts);\n\n currentLetters.pop();\n currentInfos.pop();\n letterCounts.set(letter, letterCounts.get(letter)! - 1);\n\n if (results.length >= maxResults) {\n // We found maxResults and there may be more - set hasMore\n hasMore = true;\n return;\n }\n }\n };\n\n backtrack([], [], 0, 0, new Map());\n\n return {\n results,\n hasMore,\n totalFound,\n };\n};\n\n/**\n * Reverse gematria from anagram mode - use letters from suggestion as a pool\n */\nfunction reverseGematriaAnagram(\n options: GematriaTypes.ReverseGematriaOptions,\n tree: TreeOfLife\n): GematriaTypes.ReverseGematriaOutput {\n const {\n targetVowels,\n targetConsonants,\n targetSynthesis,\n minLength = 1,\n maxLength = 8,\n maxResults = 100,\n maxLetterRepeat,\n suggestionText = \"\",\n matchReductionStep = true,\n masterNumbers = GematriaData.EXTENDED_MASTER_NUMBERS as unknown as number[],\n } = options;\n\n const results: GematriaTypes.ReverseGematriaResult[] = [];\n let totalFound = 0;\n let hasMore = false;\n\n // Parse suggestion into letter units\n const suggestionUnits = parseSuggestionToLetterUnits(suggestionText);\n\n // Separate spaces from letters\n const letterUnits = suggestionUnits.filter((u) => u !== \" \");\n const maxSpaces = suggestionUnits.filter((u) => u === \" \").length;\n\n // Build available letter pool with counts\n const availablePool = countLetterUnits(letterUnits);\n\n // Get unique letters from the pool\n const availableLetters = Array.from(availablePool.keys());\n\n // Cache letter info\n const letterInfoCache = new Map<string, LetterInfo | undefined>();\n\n const getLetterInfoCached = (letter: string, isStarting: boolean): LetterInfo | undefined => {\n const cacheKey = `${letter}-${isStarting}`;\n if (!letterInfoCache.has(cacheKey)) {\n letterInfoCache.set(cacheKey, buildLetterInfo(tree, letter, isStarting));\n }\n return letterInfoCache.get(cacheKey);\n };\n\n // Track which results we've already seen (to avoid duplicates from space insertion)\n const seenResults = new Set<string>();\n\n const backtrack = (\n currentLetters: string[],\n currentInfos: LetterInfo[],\n runningVowelsSum: number,\n runningConsonantsSum: number,\n letterCounts: Map<string, number>,\n usedFromPool: Map<string, number>,\n spacesUsed: number\n ) => {\n if (results.length >= maxResults) {\n hasMore = true;\n return;\n }\n\n const letterOnlyLength = currentLetters.filter((l) => l !== \" \").length;\n\n // Check if current combination is valid\n if (letterOnlyLength >= minLength && letterOnlyLength <= maxLength) {\n let actualVowelsSum = runningVowelsSum;\n let actualConsonantsSum = runningConsonantsSum;\n\n // Adjust for ending value\n if (currentInfos.length > 1) {\n const lastInfo = currentInfos[currentInfos.length - 1];\n if (lastInfo.endingValue !== undefined) {\n const diff = lastInfo.endingValue - lastInfo.normalValue;\n if (lastInfo.isVowel) {\n actualVowelsSum += diff;\n } else {\n actualConsonantsSum += diff;\n }\n }\n }\n\n // Calculate reduction info for matching\n const vowelsReduction = reduceWithMasterNumbers(actualVowelsSum, masterNumbers);\n const consonantsReduction = reduceWithMasterNumbers(actualConsonantsSum, masterNumbers);\n // Synthesis uses Arkannu steps for reduction (same as calculateGematria)\n const synthesisArkannuSum = getLastArkAnnuStep(vowelsReduction.reductionSteps) +\n getLastArkAnnuStep(consonantsReduction.reductionSteps);\n const synthesisReduction = reduceWithMasterNumbers(synthesisArkannuSum, masterNumbers);\n // Raw sum for backward compatibility (matches calculateGematria.synthesis.originalSum)\n const actualSynthesisSum = actualVowelsSum + actualConsonantsSum;\n\n // Match against reduction steps if enabled, otherwise exact match\n const matchesVowels = targetVowels === undefined ||\n (matchReductionStep\n ? vowelsReduction.reductionSteps.includes(targetVowels)\n : actualVowelsSum === targetVowels);\n const matchesConsonants = targetConsonants === undefined ||\n (matchReductionStep\n ? consonantsReduction.reductionSteps.includes(targetConsonants)\n : actualConsonantsSum === targetConsonants);\n const matchesSynthesis = targetSynthesis === undefined ||\n (matchReductionStep\n ? synthesisReduction.reductionSteps.includes(targetSynthesis)\n : actualSynthesisSum === targetSynthesis);\n\n if (matchesVowels && matchesConsonants && matchesSynthesis) {\n const lettersStr = currentLetters.join(\"\").toUpperCase();\n\n if (!seenResults.has(lettersStr)) {\n seenResults.add(lettersStr);\n totalFound++;\n\n if (results.length < maxResults) {\n const letterDetails: GematriaTypes.LetterResult[] = currentInfos.map((info, idx) => {\n const isEnding = idx === currentInfos.length - 1 && currentInfos.length > 1;\n const useEndingValue = isEnding && info.endingValue !== undefined;\n\n return {\n latinLetterId: id(LetterTypes.LATIN_LETTER, info.letter),\n value: useEndingValue ? info.endingValue! : info.normalValue,\n hebrewLetterId: info.hebrewLetterId,\n hebrewCharacter: useEndingValue && info.hebrewCharacterWhenEnding\n ? info.hebrewCharacterWhenEnding\n : info.hebrewCharacter,\n isVowel: info.isVowel,\n };\n });\n\n results.push({\n letters: lettersStr,\n letterDetails,\n vowelsSum: actualVowelsSum,\n consonantsSum: actualConsonantsSum,\n synthesisSum: actualSynthesisSum,\n vowels: vowelsReduction,\n consonants: consonantsReduction,\n synthesis: synthesisReduction,\n });\n } else {\n hasMore = true;\n }\n }\n }\n }\n\n // Stop if we've reached max letter length\n if (letterOnlyLength >= maxLength) {\n return;\n }\n\n // Pruning - only prune if not using reduction step matching\n // (with reduction matching, we can't prune based on sum since we need all reduction steps)\n if (!matchReductionStep) {\n if (targetVowels !== undefined && runningVowelsSum > targetVowels) {\n return;\n }\n if (targetConsonants !== undefined && runningConsonantsSum > targetConsonants) {\n return;\n }\n if (targetSynthesis !== undefined && runningVowelsSum + runningConsonantsSum > targetSynthesis) {\n return;\n }\n }\n\n // Try adding a space (if we have spaces available and have at least one letter)\n if (spacesUsed < maxSpaces && currentLetters.length > 0 && currentLetters[currentLetters.length - 1] !== \" \") {\n currentLetters.push(\" \");\n backtrack(\n currentLetters,\n currentInfos,\n runningVowelsSum,\n runningConsonantsSum,\n letterCounts,\n usedFromPool,\n spacesUsed + 1\n );\n currentLetters.pop();\n\n if (results.length >= maxResults) {\n hasMore = true;\n return;\n }\n }\n\n // Try adding each available letter\n for (const letter of availableLetters) {\n const poolLimit = availablePool.get(letter) || 0;\n const usedCount = usedFromPool.get(letter) || 0;\n\n // Check pool limit\n if (usedCount >= poolLimit) {\n continue;\n }\n\n // Check maxLetterRepeat constraint\n if (maxLetterRepeat !== undefined) {\n const currentCount = letterCounts.get(letter) || 0;\n if (currentCount >= maxLetterRepeat) {\n continue;\n }\n }\n\n const isStarting = currentInfos.length === 0;\n const letterInfo = getLetterInfoCached(letter, isStarting);\n if (!letterInfo) continue;\n\n const value = letterInfo.normalValue;\n const newVowelsSum = runningVowelsSum + (letterInfo.isVowel ? value : 0);\n const newConsonantsSum = runningConsonantsSum + (letterInfo.isVowel ? 0 : value);\n\n // Pruning - only prune when not using reduction step matching\n if (!matchReductionStep) {\n if (targetVowels !== undefined && newVowelsSum > targetVowels) {\n continue;\n }\n if (targetConsonants !== undefined && newConsonantsSum > targetConsonants) {\n continue;\n }\n if (targetSynthesis !== undefined && newVowelsSum + newConsonantsSum > targetSynthesis) {\n continue;\n }\n }\n\n currentLetters.push(letter);\n currentInfos.push(letterInfo);\n letterCounts.set(letter, (letterCounts.get(letter) || 0) + 1);\n usedFromPool.set(letter, usedCount + 1);\n\n backtrack(\n currentLetters,\n currentInfos,\n newVowelsSum,\n newConsonantsSum,\n letterCounts,\n usedFromPool,\n spacesUsed\n );\n\n currentLetters.pop();\n currentInfos.pop();\n letterCounts.set(letter, letterCounts.get(letter)! - 1);\n usedFromPool.set(letter, usedCount);\n\n if (results.length >= maxResults) {\n hasMore = true;\n return;\n }\n }\n };\n\n backtrack([], [], 0, 0, new Map(), new Map(), 0);\n\n return {\n results,\n hasMore,\n totalFound,\n };\n}\n\n/**\n * Reverse gematria from subsequence mode - preserve letter order from suggestion\n */\nfunction reverseGematriaFromSubsequence(\n options: GematriaTypes.ReverseGematriaOptions,\n tree: TreeOfLife\n): GematriaTypes.ReverseGematriaOutput {\n const {\n targetVowels,\n targetConsonants,\n targetSynthesis,\n minLength = 1,\n maxLength = 8,\n maxResults = 100,\n maxLetterRepeat,\n suggestionText = \"\",\n matchReductionStep = true,\n masterNumbers = GematriaData.EXTENDED_MASTER_NUMBERS as unknown as number[],\n } = options;\n\n const results: GematriaTypes.ReverseGematriaResult[] = [];\n let totalFound = 0;\n let hasMore = false;\n\n // Parse suggestion into letter units\n const suggestionUnits = parseSuggestionToLetterUnits(suggestionText);\n\n // Separate spaces from letters but track original positions\n const letterUnitsWithPositions: { unit: string; isSpace: boolean; originalIndex: number }[] = [];\n for (let i = 0; i < suggestionUnits.length; i++) {\n letterUnitsWithPositions.push({\n unit: suggestionUnits[i],\n isSpace: suggestionUnits[i] === \" \",\n originalIndex: i,\n });\n }\n\n const letterOnlyUnits = letterUnitsWithPositions.filter((u) => !u.isSpace);\n const maxSpaces = letterUnitsWithPositions.filter((u) => u.isSpace).length;\n\n // Cache letter info\n const letterInfoCache = new Map<string, LetterInfo | undefined>();\n\n const getLetterInfoCached = (letter: string, isStarting: boolean): LetterInfo | undefined => {\n const cacheKey = `${letter}-${isStarting}`;\n if (!letterInfoCache.has(cacheKey)) {\n letterInfoCache.set(cacheKey, buildLetterInfo(tree, letter, isStarting));\n }\n return letterInfoCache.get(cacheKey);\n };\n\n // Track seen results to avoid duplicates\n const seenResults = new Set<string>();\n\n // Generate subsequences by choosing which letters to include (preserving order)\n // Also handle flexible space placement\n const generateSubsequences = (\n index: number,\n currentLetters: string[],\n currentInfos: LetterInfo[],\n runningVowelsSum: number,\n runningConsonantsSum: number,\n letterCounts: Map<string, number>,\n spacesUsed: number\n ) => {\n if (results.length >= maxResults) {\n hasMore = true;\n return;\n }\n\n const letterOnlyLength = currentLetters.filter((l) => l !== \" \").length;\n\n // Check if current combination is valid\n if (letterOnlyLength >= minLength && letterOnlyLength <= maxLength) {\n let actualVowelsSum = runningVowelsSum;\n let actualConsonantsSum = runningConsonantsSum;\n\n // Adjust for ending value\n if (currentInfos.length > 1) {\n const lastInfo = currentInfos[currentInfos.length - 1];\n if (lastInfo.endingValue !== undefined) {\n const diff = lastInfo.endingValue - lastInfo.normalValue;\n if (lastInfo.isVowel) {\n actualVowelsSum += diff;\n } else {\n actualConsonantsSum += diff;\n }\n }\n }\n\n // Calculate reduction info for matching\n const vowelsReduction = reduceWithMasterNumbers(actualVowelsSum, masterNumbers);\n const consonantsReduction = reduceWithMasterNumbers(actualConsonantsSum, masterNumbers);\n // Synthesis uses Arkannu steps for reduction (same as calculateGematria)\n const synthesisArkannuSum = getLastArkAnnuStep(vowelsReduction.reductionSteps) +\n getLastArkAnnuStep(consonantsReduction.reductionSteps);\n const synthesisReduction = reduceWithMasterNumbers(synthesisArkannuSum, masterNumbers);\n // Raw sum for backward compatibility (matches calculateGematria.synthesis.originalSum)\n const actualSynthesisSum = actualVowelsSum + actualConsonantsSum;\n\n // Match against reduction steps if enabled, otherwise exact match\n const matchesVowels = targetVowels === undefined ||\n (matchReductionStep\n ? vowelsReduction.reductionSteps.includes(targetVowels)\n : actualVowelsSum === targetVowels);\n const matchesConsonants = targetConsonants === undefined ||\n (matchReductionStep\n ? consonantsReduction.reductionSteps.includes(targetConsonants)\n : actualConsonantsSum === targetConsonants);\n const matchesSynthesis = targetSynthesis === undefined ||\n (matchReductionStep\n ? synthesisReduction.reductionSteps.includes(targetSynthesis)\n : actualSynthesisSum === targetSynthesis);\n\n if (matchesVowels && matchesConsonants && matchesSynthesis) {\n const lettersStr = currentLetters.join(\"\").toUpperCase();\n\n if (!seenResults.has(lettersStr)) {\n seenResults.add(lettersStr);\n totalFound++;\n\n if (results.length < maxResults) {\n const letterDetails: GematriaTypes.LetterResult[] = currentInfos.map((info, idx) => {\n const isEnding = idx === currentInfos.length - 1 && currentInfos.length > 1;\n const useEndingValue = isEnding && info.endingValue !== undefined;\n\n return {\n latinLetterId: id(LetterTypes.LATIN_LETTER, info.letter),\n value: useEndingValue ? info.endingValue! : info.normalValue,\n hebrewLetterId: info.hebrewLetterId,\n hebrewCharacter: useEndingValue && info.hebrewCharacterWhenEnding\n ? info.hebrewCharacterWhenEnding\n : info.hebrewCharacter,\n isVowel: info.isVowel,\n };\n });\n\n results.push({\n letters: lettersStr,\n letterDetails,\n vowelsSum: actualVowelsSum,\n consonantsSum: actualConsonantsSum,\n synthesisSum: actualSynthesisSum,\n vowels: vowelsReduction,\n consonants: consonantsReduction,\n synthesis: synthesisReduction,\n });\n } else {\n hasMore = true;\n }\n }\n }\n }\n\n // Stop if we've processed all letters or reached max length\n if (index >= letterOnlyUnits.length || letterOnlyLength >= maxLength) {\n return;\n }\n\n // Pruning - only prune if not using reduction step matching\n if (!matchReductionStep) {\n if (targetVowels !== undefined && runningVowelsSum > targetVowels) {\n return;\n }\n if (targetConsonants !== undefined && runningConsonantsSum > targetConsonants) {\n return;\n }\n if (targetSynthesis !== undefined && runningVowelsSum + runningConsonantsSum > targetSynthesis) {\n return;\n }\n }\n\n // Option 1: Skip the current letter\n generateSubsequences(\n index + 1,\n currentLetters,\n currentInfos,\n runningVowelsSum,\n runningConsonantsSum,\n letterCounts,\n spacesUsed\n );\n\n if (results.length >= maxResults) {\n hasMore = true;\n return;\n }\n\n // Option 2: Include the current letter (optionally with a space before it)\n const letter = letterOnlyUnits[index].unit;\n\n // Check maxLetterRepeat constraint\n if (maxLetterRepeat !== undefined) {\n const currentCount = letterCounts.get(letter) || 0;\n if (currentCount >= maxLetterRepeat) {\n return;\n }\n }\n\n const isStarting = currentInfos.length === 0;\n const letterInfo = getLetterInfoCached(letter, isStarting);\n if (!letterInfo) return;\n\n const value = letterInfo.normalValue;\n const newVowelsSum = runningVowelsSum + (letterInfo.isVowel ? value : 0);\n const newConsonantsSum = runningConsonantsSum + (letterInfo.isVowel ? 0 : value);\n\n // Pruning - only prune when not using reduction step matching\n if (!matchReductionStep) {\n if (targetVowels !== undefined && newVowelsSum > targetVowels) {\n return;\n }\n if (targetConsonants !== undefined && newConsonantsSum > targetConsonants) {\n return;\n }\n if (targetSynthesis !== undefined && newVowelsSum + newConsonantsSum > targetSynthesis) {\n return;\n }\n }\n\n // Include without space\n currentLetters.push(letter);\n currentInfos.push(letterInfo);\n letterCounts.set(letter, (letterCounts.get(letter) || 0) + 1);\n\n generateSubsequences(\n index + 1,\n currentLetters,\n currentInfos,\n newVowelsSum,\n newConsonantsSum,\n letterCounts,\n spacesUsed\n );\n\n currentLetters.pop();\n currentInfos.pop();\n letterCounts.set(letter, letterCounts.get(letter)! - 1);\n\n if (results.length >= maxResults) {\n hasMore = true;\n return;\n }\n\n // Include with space before (if we have spaces available and it's not the first letter)\n if (spacesUsed < maxSpaces && currentLetters.length > 0 && currentLetters[currentLetters.length - 1] !== \" \") {\n currentLetters.push(\" \");\n currentLetters.push(letter);\n currentInfos.push(letterInfo);\n letterCounts.set(letter, (letterCounts.get(letter) || 0) + 1);\n\n generateSubsequences(\n index + 1,\n currentLetters,\n currentInfos,\n newVowelsSum,\n newConsonantsSum,\n letterCounts,\n spacesUsed + 1\n );\n\n currentLetters.pop();\n currentLetters.pop();\n currentInfos.pop();\n letterCounts.set(letter, letterCounts.get(letter)! - 1);\n }\n };\n\n generateSubsequences(0, [], [], 0, 0, new Map(), 0);\n\n return {\n results,\n hasMore,\n totalFound,\n };\n}\n\nfunction ensureTreeExists(tree?: TreeOfLife): TreeOfLife {\n if (!tree) return createTree({ system: KAABALAH_SYSTEM, parts: [] });\n\n return tree;\n}\n\nexport const calculateGematria = (\n phrase: string,\n options: {\n missing?: boolean;\n percentages?: boolean;\n } = {\n missing: false,\n percentages: false,\n },\n tree?: TreeOfLife\n) => {\n const treeForMappings = ensureTreeExists(tree);\n\n const words = phrase.toUpperCase().trim().split(\" \");\n\n const initialState: GematriaTypes.GematriaState = {\n includedLetters: [],\n vowelsSum: 0,\n consonantsSum: 0,\n includedGematriaValues: new Set(),\n };\n\n const finalState = words.reduce<GematriaTypes.GematriaState>((state, word) => {\n const wordResult = processWord(word, treeForMappings);\n\n return {\n includedLetters: [...state.includedLetters, ...wordResult.letters],\n vowelsSum: state.vowelsSum + wordResult.vowelsSum,\n consonantsSum: state.consonantsSum + wordResult.consonantsSum,\n includedGematriaValues: new Set([\n ...Array.from(state.includedGematriaValues),\n ...Array.from(wordResult.includedGematriaValues),\n ]),\n };\n }, initialState);\n\n let letterPercentages: GematriaTypes.LetterPercentages = {\n percentageOfVowels: 0,\n percentageOfConsonants: 0,\n letters: {},\n };\n\n if (options?.percentages) {\n letterPercentages = words.reduce<GematriaTypes.LetterPercentages>((acc, word) => {\n return calculateLetterPercentages(word, treeForMappings, acc);\n }, letterPercentages);\n }\n\n const vowelsReduction = reduceToSingleDigitWithSteps(finalState.vowelsSum);\n const consonantsReduction = reduceToSingleDigitWithSteps(\n finalState.consonantsSum\n );\n const synthesisReduction = reduceToSingleDigitWithSteps(\n getLastArkAnnuStep(vowelsReduction.steps) + getLastArkAnnuStep(consonantsReduction.steps)\n );\n\n const missingGematriaValues = options?.missing\n ? getMissingGematriaValues(treeForMappings, finalState.includedGematriaValues)\n : undefined;\n\n return {\n vowels: {\n originalSum: finalState.vowelsSum,\n reductionSteps: vowelsReduction.steps,\n finalValue: vowelsReduction.finalValue,\n },\n consonants: {\n originalSum: finalState.consonantsSum,\n reductionSteps: consonantsReduction.steps,\n finalValue: consonantsReduction.finalValue,\n },\n synthesis: {\n originalSum: finalState.vowelsSum + finalState.consonantsSum,\n reductionSteps: synthesisReduction.steps,\n finalValue: synthesisReduction.finalValue,\n },\n includedLetters: finalState.includedLetters,\n missingGematriaValues,\n letterPercentages: options?.percentages ? letterPercentages : undefined,\n };\n};\n\nexport { GematriaData };\n"]}
@@ -70,5 +70,5 @@ function calculateOdu(date) {
70
70
  }
71
71
 
72
72
  export { calculateOdu };
73
- //# sourceMappingURL=chunk-URDMOQRN.mjs.map
73
+ //# sourceMappingURL=out.js.map
74
74
  //# sourceMappingURL=chunk-URDMOQRN.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ifa/index.ts"],"names":[],"mappings":";AAWA,SAAS,UAAA,CAAW,MAAY,IAAgC,EAAA;AAC9D,EAAA,IAAI,SAAS,KAAO,EAAA;AAClB,IAAA,OACE,IAAK,CAAA,WAAA,EAAkB,KAAA,CAAA,IACvB,KAAK,aAAc,EAAA,KAAM,CACzB,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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-URDMOQRN.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\nfunction isMidnight(date: Date, mode: \"local\" | \"utc\"): boolean {\n if (mode === \"utc\") {\n return (\n date.getUTCHours() === 0 &&\n date.getUTCMinutes() === 0 &&\n date.getUTCSeconds() === 0 &&\n date.getUTCMilliseconds() === 0\n );\n }\n\n return (\n date.getHours() === 0 &&\n date.getMinutes() === 0 &&\n date.getSeconds() === 0 &&\n date.getMilliseconds() === 0\n );\n}\n\nfunction extractDateParts(date: Date): { day: string; month: string; year: string } {\n if (!(date instanceof Date) || Number.isNaN(date.getTime())) {\n throw new Error(\"Date must be a valid Date object\");\n }\n\n const useLocalDate = isMidnight(date, \"local\") && !isMidnight(date, \"utc\");\n\n if (useLocalDate) {\n return {\n day: date.getDate().toString().padStart(2, \"0\"),\n month: (date.getMonth() + 1).toString().padStart(2, \"0\"),\n year: date.getFullYear().toString().padStart(4, \"0\"),\n };\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n const [year, month, day] = formattedDate.split(\"-\");\n\n return { day, month, year };\n}\n\nfunction reduceNumber(num: number): number {\n if (num <= 16) {\n return num;\n }\n\n return reduceNumber(\n num\n .toString()\n .split(\"\")\n .reduce((sum, digit) => sum + Number.parseInt(digit, 10), 0)\n );\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 const { day, month, year } = extractDateParts(date);\n\n // Split into left and right columns\n const leftNumbers = [\n Number.parseInt(day[0], 10), // First digit of day\n Number.parseInt(month[0], 10), // First digit of month\n Number.parseInt(year[0], 10), // First digit of year\n Number.parseInt(year[2], 10) // Third digit of year\n ];\n\n const rightNumbers = [\n Number.parseInt(day[1], 10), // Second digit of day\n Number.parseInt(month[1], 10), // Second digit of month\n Number.parseInt(year[1], 10), // Second digit of year\n Number.parseInt(year[3], 10) // Fourth digit of year\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}\n"]}
1
+ {"version":3,"sources":["../src/ifa/index.ts"],"names":[],"mappings":";AAWA,SAAS,WAAW,MAAY,MAAgC;AAC9D,MAAI,SAAS,OAAO;AAClB,WACE,KAAK,YAAY,MAAM,KACvB,KAAK,cAAc,MAAM,KACzB,KAAK,cAAc,MAAM,KACzB,KAAK,mBAAmB,MAAM;AAAA,EAElC;AAEA,SACE,KAAK,SAAS,MAAM,KACpB,KAAK,WAAW,MAAM,KACtB,KAAK,WAAW,MAAM,KACtB,KAAK,gBAAgB,MAAM;AAE/B;AAEA,SAAS,iBAAiB,MAA0D;AAClF,MAAI,EAAE,gBAAgB,SAAS,OAAO,MAAM,KAA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;AAAA,IAC5B,OAAO,SAAS,KAAK,CAAC,GAAG,EAAE;AAAA;AAAA,IAC3B,OAAO,SAAS,KAAK,CAAC,GAAG,EAAE;AAAA;AAAA,EAC7B;AAGA,QAAM,aAAa,YAAY,OAAO,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC;AACxD,QAAM,cAAc,aAAa,OAAO,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC;AAG1D,QAAM,QAAQ,aAAa,UAAU;AACrC,QAAM,QAAQ,aAAa,WAAW;AACtC,QAAM,OAAO,aAAa,QAAQ,KAAK;AACvC,QAAM,OAAO,aAAa,QAAQ,QAAQ,IAAI;AAC9C,QAAM,SAAS,aAAa,QAAQ,QAAQ,OAAO,IAAI;AAEvD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF","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\nfunction isMidnight(date: Date, mode: \"local\" | \"utc\"): boolean {\n if (mode === \"utc\") {\n return (\n date.getUTCHours() === 0 &&\n date.getUTCMinutes() === 0 &&\n date.getUTCSeconds() === 0 &&\n date.getUTCMilliseconds() === 0\n );\n }\n\n return (\n date.getHours() === 0 &&\n date.getMinutes() === 0 &&\n date.getSeconds() === 0 &&\n date.getMilliseconds() === 0\n );\n}\n\nfunction extractDateParts(date: Date): { day: string; month: string; year: string } {\n if (!(date instanceof Date) || Number.isNaN(date.getTime())) {\n throw new Error(\"Date must be a valid Date object\");\n }\n\n const useLocalDate = isMidnight(date, \"local\") && !isMidnight(date, \"utc\");\n\n if (useLocalDate) {\n return {\n day: date.getDate().toString().padStart(2, \"0\"),\n month: (date.getMonth() + 1).toString().padStart(2, \"0\"),\n year: date.getFullYear().toString().padStart(4, \"0\"),\n };\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n const [year, month, day] = formattedDate.split(\"-\");\n\n return { day, month, year };\n}\n\nfunction reduceNumber(num: number): number {\n if (num <= 16) {\n return num;\n }\n\n return reduceNumber(\n num\n .toString()\n .split(\"\")\n .reduce((sum, digit) => sum + Number.parseInt(digit, 10), 0)\n );\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 const { day, month, year } = extractDateParts(date);\n\n // Split into left and right columns\n const leftNumbers = [\n Number.parseInt(day[0], 10), // First digit of day\n Number.parseInt(month[0], 10), // First digit of month\n Number.parseInt(year[0], 10), // First digit of year\n Number.parseInt(year[2], 10) // Third digit of year\n ];\n\n const rightNumbers = [\n Number.parseInt(day[1], 10), // Second digit of day\n Number.parseInt(month[1], 10), // Second digit of month\n Number.parseInt(year[1], 10), // Second digit of year\n Number.parseInt(year[3], 10) // Fourth digit of year\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}\n"]}
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkCOPYH3O2_js = require('./chunk-COPYH3O2.js');
4
- var chunkFM7WUVZV_js = require('./chunk-FM7WUVZV.js');
3
+ var chunkSYLFUBAB_js = require('./chunk-SYLFUBAB.js');
4
+ var chunk4337NVKS_js = require('./chunk-4337NVKS.js');
5
5
 
6
6
  // src/numerology/data.ts
7
7
  var data_exports = {};
8
- chunkFM7WUVZV_js.__export(data_exports, {
8
+ chunk4337NVKS_js.__export(data_exports, {
9
9
  CHALLENGE_HEALTH_MEANING: () => CHALLENGE_HEALTH_MEANING,
10
10
  CHALLENGE_MEANING: () => CHALLENGE_MEANING,
11
11
  CYCLE_MEANINGS: () => CYCLE_MEANINGS,
@@ -704,7 +704,7 @@ function calculateFibonacciCycle(birthDate, today) {
704
704
  };
705
705
  }
706
706
  function calculateSoulNumber(firstName) {
707
- const vowels = chunkCOPYH3O2_js.calculateGematria(firstName).vowels;
707
+ const vowels = chunkSYLFUBAB_js.calculateGematria(firstName).vowels;
708
708
  return {
709
709
  reducedValue: vowels.finalValue,
710
710
  reductionSteps: vowels.reductionSteps
@@ -765,8 +765,10 @@ function diffInPersonalMonths(birthDate, today) {
765
765
  if (today.getDate() < birthDate.getDate()) {
766
766
  k -= 1;
767
767
  }
768
- if (k < 0) k = 0;
769
- if (k > 12) k = 12;
768
+ if (k < 0)
769
+ k = 0;
770
+ if (k > 12)
771
+ k = 12;
770
772
  return k;
771
773
  }
772
774
  function calculatePersonalMonths(birthDate, personalYear, today) {
@@ -834,5 +836,5 @@ exports.getDateEnergies = getDateEnergies;
834
836
  exports.isMasterNumber = isMasterNumber;
835
837
  exports.reduceToSingle = reduceToSingle;
836
838
  exports.reduceToSingleWithSteps = reduceToSingleWithSteps;
837
- //# sourceMappingURL=chunk-PAKYKIZH.js.map
838
- //# sourceMappingURL=chunk-PAKYKIZH.js.map
839
+ //# sourceMappingURL=out.js.map
840
+ //# sourceMappingURL=chunk-UZ42PN5T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/numerology/data.ts","../src/numerology/index.ts"],"names":["HeptadCycles","NumerologyValues","DayOfBirth","ChallengeNumbers"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,eAAL,kBAAKA,kBAAL;AACL,EAAAA,4BAAA,WAAQ,KAAR;AACA,EAAAA,4BAAA,YAAS,KAAT;AACA,EAAAA,4BAAA,WAAQ,KAAR;AACA,EAAAA,4BAAA,YAAS,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,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,wBAAwB;AAAA,EAC1B;AACF","sourcesContent":["export enum HeptadCycles {\n First = 1,\n Second = 2,\n Third = 3,\n Fourth = 4,\n Fifth = 5,\n Sixth = 6,\n Seventh = 7,\n}\n\nexport type CycleMeaning = {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n}\n\nexport type Cycle = {\n number: number;\n description: CycleMeaning;\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport type 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\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: ReducedValueWithSteps;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\nexport type StraightAcrossReductionLifePathResult = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n lifePath: ReducedValueWithSteps;\n};\n\nexport type DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\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 type ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\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 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: ReducedValueWithSteps;\n soulNumber?: ReducedValueWithSteps;\n yearUsedOnCalculations: number;\n};\n\nexport const CYCLE_MEANINGS: Record<HeptadCycles, CycleMeaning> = {\n [HeptadCycles.First]: {\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 },\n [HeptadCycles.Second]: {\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 },\n [HeptadCycles.Third]: {\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 },\n [HeptadCycles.Fourth]: {\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 },\n [HeptadCycles.Fifth]: {\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 },\n [HeptadCycles.Sixth]: {\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 },\n [HeptadCycles.Seventh]: {\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 },\n};\n\nexport enum NumerologyValues {\n One = 1,\n Two = 2,\n Three = 3,\n Four = 4,\n Five = 5,\n Six = 6,\n Seven = 7,\n Eight = 8,\n Nine = 9,\n Eleven = 11,\n TwentyTwo = 22,\n ThirtyThree = 33,\n FortyFour = 44,\n}\n\n// todo: translate to english and improve keywords\nexport const NUMEROLOGY_KEYWORDS: Record<NumerologyValues, string[]> = {\n [NumerologyValues.One]: [\"Initiative\", \"Courage\", \"Leadership\"],\n [NumerologyValues.Two]: [\"Sensitivity\", \"Cooperation\", \"Diplomacy\"],\n [NumerologyValues.Three]: [\"Creativity\", \"Expression\", \"Joy\"],\n [NumerologyValues.Four]: [\"Stability\", \"Structure\", \"Reliability\"],\n [NumerologyValues.Five]: [\"Freedom\", \"Adaptability\", \"Adventure\"],\n [NumerologyValues.Six]: [\"Service\", \"Responsibility\", \"Harmony\"],\n [NumerologyValues.Seven]: [\"Intuition\", \"Introspection\", \"Wisdom\"],\n [NumerologyValues.Eight]: [\"Power\", \"Ambition\", \"Material Success\"],\n [NumerologyValues.Nine]: [\"Compassion\", \"Universal Vision\", \"Humanitarianism\"],\n [NumerologyValues.Eleven]: [\"Intuition\", \"Illumination\", \"Spiritual Messenger\"],\n [NumerologyValues.TwentyTwo]: [\"Vision\", \"Master Builder\", \"Manifestation\"],\n [NumerologyValues.ThirtyThree]: [\"Unconditional Love\", \"Master Teacher\", \"Healing Service\"],\n [NumerologyValues.FortyFour]: [\"Material Mastery\", \"Strategic Leadership\", \"Legacy Building\"],\n}\n\nexport enum DayOfBirth {\n First = 1,\n Second = 2,\n Third = 3,\n Fourth = 4,\n Fifth = 5,\n Sixth = 6,\n Seventh = 7,\n Eighth = 8,\n Ninth = 9,\n Tenth = 10,\n Eleventh = 11,\n Twelfth = 12,\n Thirteenth = 13,\n Fourteenth = 14,\n Fifteenth = 15,\n Sixteenth = 16,\n Seventeenth = 17,\n Eighteenth = 18,\n Nineteenth = 19,\n Twentieth = 20,\n TwentyFirst = 21,\n TwentySecond = 22,\n TwentyThird = 23,\n TwentyFourth = 24,\n TwentyFifth = 25,\n TwentySixth = 26,\n TwentySeventh = 27,\n TwentyEighth = 28,\n TwentyNinth = 29,\n Thirtieth = 30,\n ThirtyFirst = 31,\n};\n\nexport type DayOfBirthMeaning = {\n description: string;\n}\n\nexport const DAY_OF_BIRTH_MEANING: Record<DayOfBirth, DayOfBirthMeaning> = {\n [DayOfBirth.First]: {\n description: \"Independence, creativity and initiative. Tendency to put others in charge of finishing what they start. Stubbornness and inventiveness. Leadership. Ability to do things on their own. Once decided, capable of going to any extreme to win. Enjoys a good challenge.\",\n },\n [DayOfBirth.Second]: {\n description: \"Sensitivity, emotionality and adaptability. Does not need to be aggressive, as they are capable of conquering everything they need. Yearns for attention and affection, enjoying collecting friendships and objects. Must stay active and think positively to avoid depression. Finds pleasure through music.\",\n },\n [DayOfBirth.Third]: {\n description: \"Talent, sociability and imagination. Places great value on friendships, therefore needs to be kind. Being restless and optimistic, makes life a game in which they are the main player. Possesses great personality.\",\n },\n [DayOfBirth.Fourth]: {\n description: \"If they follow the rules, they profit. Practical, organized and loyal. Self-disciplined, stubbornly attached to their habits. Should not demand so much from themselves. Should reserve more time to enjoy nature and family.\",\n },\n [DayOfBirth.Fifth]: {\n description: \"Enjoys new experiences and learns from them. Versatile, insightful and bold, detests moments of boredom. For their happiness it is essential to have freedom to travel, good company and unusual things or events.\",\n },\n [DayOfBirth.Sixth]: {\n description: \"Great idealist, with professorial tendencies, inclined to impose their praiseworthy viewpoints on other people. Being the target of criticism makes them very irritated. Affectionate, adaptable to domestic life and responsible, feels the need for security and to put down roots. For their happiness they need intellectual harmony.\",\n },\n [DayOfBirth.Seventh]: {\n description: \"Be guided by your intuition. Being the intellectual, analytical and sensitive type, should not accept any advice that goes against their principles and judgment. Should guarantee themselves a good education, specializing, and learning to enjoy their own company. Things will come to them if they can be patient and not take risks.\",\n },\n [DayOfBirth.Eighth]: {\n description: \"Interests in managing finances, in progressing and accumulating material goods. An organizer who sets things in motion. Vision and imagination for business. Should be tolerant and fair with the less efficient and determined. Vocation for executive positions.\",\n },\n [DayOfBirth.Ninth]: {\n description: \"Tolerant, apt for the arts and resolute, likes general things. Not interested in details, but rather in world problems. If well educated, could become a public figure. Capable of giving the shirt off their back to someone in difficulties, but appears to have no awareness of the needs of those around them.\",\n },\n [DayOfBirth.Tenth]: {\n description: \"Being capable of managing several things at the same time, enjoys diversity. Their type is intellectual, possessive and not very domestic. Has aptitude for art and vocation for business. Enthusiasm and creativity when developing projects.\",\n },\n [DayOfBirth.Eleventh]: {\n description: \"Despite being insecure and somewhat inhibited, is brilliant and inspired for thought and action. Those who possess this Master number have the gift of visionary intuition. Will only find pleasure through financial gains if they are serving the needs of others.\",\n },\n [DayOfBirth.Twelfth]: {\n description: \"Ability to achieve promotions and can both lead and work in a team. Inclination for the arts, diplomacy and good verbal skills. Needs to stay active besides finishing everything they start.\",\n },\n [DayOfBirth.Thirteenth]: {\n description: \"Certain feeling that their creativity is limited by attachment to order. This tends to bring a certain emotional conflict. Considered temperamental, tends to be misinterpreted very frequently. Feels happy building, buying and selling things.\",\n },\n [DayOfBirth.Fourteenth]: {\n description: \"Needs variety in physical and intellectual activities. Active, insightful, emotional and likes to take risks. Perseverance is as important as the variety of life experiences they yearn for. Needs not to overdo it.\",\n },\n [DayOfBirth.Fifteenth]: {\n description: \"Generous, expansive, domestic and protective. Enjoys music and feels they need to help others. Despite their stubbornness, manages to attract people and opportunities.\",\n },\n [DayOfBirth.Sixteenth]: {\n description: \"Tendency to be constantly disappointed by yearning for affection and doing nothing to obtain it. Withdrawn, introspective, inventive and analytical. Their nervousness makes their life more difficult than it really is. You are a complicated person and family ties are very important.\",\n },\n [DayOfBirth.Seventeenth]: {\n description: \"Hesitation between the desire to organize and to analyze. Can do both things. Should be their own boss and carefully choose their partners (if they need to have them). Seeks knowledge, has a knack for business and talent for any technical or scientific activity.\",\n },\n [DayOfBirth.Eighteenth]: {\n description: \"Lives for love, not having been made to stay with just one person. Strong vibrations for writing, public speaking and theatrical arts. Can be organized and efficient, if they want to. Would feel happy if their attitudes were accepted without restrictions.\",\n },\n [DayOfBirth.Nineteenth]: {\n description: \"May have an excess of responsibility, since it is composed of all numbers, from 1 to 9. Averse to conventions, worries about their public image. Should be a leader, preparing to adapt to the needs of others and fly high.\",\n },\n [DayOfBirth.Twentieth]: {\n description: \"In a group gives stability to joint effort. Friendly, cooperative and sympathetic, is a natural diplomat. Needs protection, thus needs a strong partner. Someone they can count on at all times.\",\n },\n [DayOfBirth.TwentyFirst]: {\n description: \"Talented, sociable and owner of a unique personality, places great importance on their love. Fertile imagination. Should use it positively, avoiding feelings of jealousy and controlling their tendency to distrust others.\",\n },\n [DayOfBirth.TwentySecond]: {\n description: \"Their first impressions are highly reliable, trust them. Their personal ambition should be based on motivation for the common good. Using their integrity, should organize their activities. Has creativity and capacity for initiative. This is a Master number of unlimited potential. It is the vibration of the visionary with practical sense.\",\n },\n [DayOfBirth.TwentyThird]: {\n description: \"Self-sufficiency, taste for social contacts and adaptability. Sensitivity and capacity for understanding that make them help others. Willingness to take on many responsibilities due to their superior faculties and practical mental character.\",\n },\n [DayOfBirth.TwentyFourth]: {\n description: \"Without activity, wastes their energies making a storm in a teacup. Despite being quite individualistic, enjoys domestic life. Ability to learn through observation. Even when retired, needs to continue being active.\",\n },\n [DayOfBirth.TwentyFifth]: {\n description: \"Appearance of an eternal dreamer, with their head in the clouds. Tendency to be misunderstood. Artistic talent, naturally intuitive and idealistic. Obstacles in their life: laziness, melancholy and dispersion of their energies. Needs to pay attention to day-to-day matters, avoiding being criticized for being so intellectual.\",\n },\n [DayOfBirth.TwentySixth]: {\n description: \"Enjoys physical and domestic comfort. Generosity with third parties. Knows how to reconcile professional career, marriage, and artistic abilities with ease. Introspective, has a tendency to live in the past, failing to enjoy the present.\",\n },\n [DayOfBirth.TwentySeventh]: {\n description: \"Natural leader, despite being somewhat erratic, is subtly convincing. Their strength lies in abstract thinking and philosophy. Gets resentful if they feel watched, or with the need to account for every movement. Quite cautious with their family relationships.\",\n },\n [DayOfBirth.TwentyEighth]: {\n description: \"Unconventional, loves freedom and likes to do things their own way. Should not bend to accommodate the system. Tendency to create new trends. Careful not to be overly sensitive. Should combat the laziness that lies behind the habit of daydreaming. If they don't do this, their ambitions will be greatly harmed.\",\n },\n [DayOfBirth.TwentyNinth]: {\n description: \"Intellectual, always ready for action, capable of great achievements. Has the ability to identify and solve the problems of the masses. Should have Master number 11 as their guiding vibration since 2 + 9 = 11. Radical in everything they do, experiences intense emotions.\",\n },\n [DayOfBirth.Thirtieth]: {\n description: \"Endowed with hypnotic charm, enjoys the cheerful side of life, is a great optimist. Full of imagination, detests routine and has a knack for fashion and decoration. Very lucky! Knowing how to use their oratory skills well and with a little experience, will go far.\",\n },\n [DayOfBirth.ThirtyFirst]: {\n description: \"If they can organize themselves and define a direction for their life, they will be successful in their high dreams. Talented for business, will feel comfortable in artistic and literary fields. The routine of domestic life is not very bearable but needs responsibility and companionship.\",\n },\n};\n\nexport type LifePathMeaning = {\n description: string;\n goal: string;\n positiveTraits: string[];\n negativeTraits: string[];\n}\n\nexport const LIFEPATH_MEANING: Record<NumerologyValues, LifePathMeaning> = {\n [NumerologyValues.One]: {\n description: \"Must learn to be original, have more willpower, be more creative and innovative. Needs to have courage and use impulse to penetrate new fields of expression as a pioneer. Works better when alone despite being a good executive. Doesn't like limitations and can be stubborn and dominating. Organized and efficient, by nature not homely. Generally likes sports and athletics. Takes pleasure in victories. Sophisticated, not emotionally romantic, always appears prominently in social or commercial groups. If they learn the lessons, they will become intimately familiar with Divine Energy, the independent spark that probes, searches and moves all creation. Is creative on the physical plane because their pioneering spirit precedes everyone else's, expressing their unique individuality.\",\n goal: \"The mission of path 1 is to undertake. It characterizes people with visionary spirit, who are ahead of their time and who, even alone, can achieve great revolutions and build great accomplishments.\",\n positiveTraits: [\"independence\", \"leadership\", \"ease in opening their own path\"],\n negativeTraits: [\"arrogance\", \"pretension\", \"imposition\", \"authoritarianism\"],\n },\n [NumerologyValues.Two]: {\n description: \"If you support those in leadership, helping them find their life goals, staying behind the scenes, this will help you in business. Those who will benefit from your talents will help you make use of your abilities. Must have consideration for others, bringing people together around a common cause. Will find the lessons to be learned in this life in partnerships and groups. Persuasive. Various career options, with success practically assured.\",\n goal: \"Path 2 has intuition as its mission. They are creative and intuitive spirits who have great ability for reflection and perception of the material and spiritual world. They develop their interior easily and possess great critical sense, in addition to constantly receiving information from the spiritual universe, managing to anticipate situations and make better decisions.\",\n positiveTraits: [\"understanding\", \"collaboration\", \"sensitivity\", \"flexibility\"],\n negativeTraits: [\"inaction\", \"laziness\", \"cowardice\", \"excessive dependence\"],\n },\n [NumerologyValues.Three]: {\n description: \"Superiority in intellectual, artistic or creative occupations. Need for expression, manifestation and to see the result of their work. Needs to have ambition and pride, reaching a position of authority. Needs to be careful not to be dispersive, should specialize. Averse to restriction, cannot limit themselves to routine. To achieve good results needs to work alone. Partnerships are not recommended. Should always follow their inspiration and intuition using their creative talents.\",\n goal: \"The great mission of path 3 is communication. They are communicative and extroverted spirits who may have facility for leadership, teaching and sharing information and knowledge. They are usually great teachers, thinkers, religious leaders or writers. Or even any other profession built around communication.\",\n positiveTraits: [\"communicability\", \"creativity\", \"ease in making friends\"],\n negativeTraits: [\"uncontrolled and frivolous use of communication\", \"childishness\", \"lack of commitment\"],\n },\n [NumerologyValues.Four]: {\n description: \"Needs a solid foundation to base their life on, based on a well-organized system of conduct and morals, should become a diligent worker and achieve success with honesty. Should not take risks in financial areas. Always wanting things for yesterday, will need to strive with patience and perseverance. Must learn to see reality by striving to reason in a healthy and practical way.\",\n goal: \"The mission of this path, the 4, is leadership. People on this path have a great inclination to occupy leadership roles, both professionally and in family or even in social relationships. It's possible they have a tendency to care too much for others, sometimes suffering the impact when the negative faces of leadership appear.\",\n positiveTraits: [\"willpower\", \"discipline\", \"disposition for work\", \"organization\"],\n negativeTraits: [\"blockage\", \"repression\", \"prejudice\", \"limitation\"],\n },\n [NumerologyValues.Five]: {\n description: \"Needs freedom to produce. Facility to learn through travel and experiences. Needs to avoid monotony in their life. Is in this life to learn and experience the value of freedom, but should not become too attached. Innate talents for oratory and dealing with the public.\",\n goal: \"Path 5 brings the mission of religion. They are spirits who, not necessarily, have a religion, but who need spiritual construction to find comfort and give meaning to their existence.\",\n positiveTraits: [\"freedom\", \"adaptability\", \"joviality\", \"good humor\"],\n negativeTraits: [\"inconsequence\", \"irresponsibility\", \"frivolity\", \"hedonism\"],\n },\n [NumerologyValues.Six]: {\n description: \"Learning about the sense of responsibility towards family and community. Has a wide range of professional options ahead. Needs to acquire a refined sense of balance to be able to equalize injustices. Artistic abilities and judicial talents. In order to relieve the burden of those who are naturally attracted to you, must develop compassion and understanding.\",\n goal: \"Path 6 has family as its main mission. They create and need very strong loving bonds and generate great spiritual return when they constitute family and build a harmonious home. Any external problem can be neutralized by the strong vibration of unconditional family love and has inclination to find meaning in the concepts of marriage, fatherhood or motherhood.\",\n positiveTraits: [\"family bonds\", \"community balance\", \"compassion\", \"solicitude\"],\n negativeTraits: [\"invasion of privacy\", \"hypocrisy\", \"jealousy\", \"indecision\"],\n },\n [NumerologyValues.Seven]: {\n description: \"Needs to use and develop their mind. When speaking, their words should be wise. Will often need to rely on the strength of their spirit to solve difficult problems. Tendency towards mysterious and occult research. Must learn the value of solitude in order to get in touch with their HIGHER SELF and their deepest thoughts. Since their destiny is to use the mind.\",\n goal: \"The 7th path has conquest as its mission. It is a strong and powerful mission, as it requires the spirit to hold the reins of destiny in their hands. Nothing comes easy for these people, as the ability to conquer and build is the aspect they must work on. With effort, dedication and patience, they can move mountains and materialize miracles.\",\n positiveTraits: [\"intelligence\", \"introspection\", \"study\", \"common sense\", \"depth\"],\n negativeTraits: [\"isolation\", \"coldness\", \"mordacity\", \"melancholy\"],\n },\n [NumerologyValues.Eight]: {\n description: \"Number of power and ambition, of the executive, of the boss, who lives by brain and physical strength. Motivates people to be successful. Needs to lead by showing through examples how to profit in business. Needs to learn to deal with power, authority and money. To build a commercial empire (which is quite likely), needs to work towards this. Opportunities in the athletic and artistic fields.\",\n goal: \"Brings the mission of justice and makes this the permanent and constant value for spirits who have it as their mission. Any type of situation involving justice (or even injustice) requires the life experience of those born under the influence of path 8. They are spirits who seek balance in general, and can be great lawyers or judges.\",\n positiveTraits: [\"sense of justice\", \"material ability\", \"haughtiness\", \"ambition\"],\n negativeTraits: [\"greed\", \"cupidity\", \"tendency to own the truth\", \"materialism\"],\n },\n [NumerologyValues.Nine]: {\n description: \"Patience, kindness and understanding are attributes that need to be cultivated. You know that personal happiness is intimately linked with the capacity to give happiness to others. Material goods will come with some ease and despite adversities, the tendency is to always be successful. Areas linked to diplomacy will be favorable to you.\",\n goal: \"Path 9 refers to the mission of patience. They are spirits who want to improve the world and usually have facility in exercising faith and patience in the face of the most complicated situations. They possess an almost unalterable balance and great resilience. However, when they face much restlessness and a pattern of experiences that harm serenity, they should use the strength of patience for spiritual evolution and conflict resolution.\",\n positiveTraits: [\"democratic sense\", \"speed of thought\", \"openness to evolution\"],\n negativeTraits: [\"anxiety\", \"lack of control\", \"haste\", \"impulsiveness\"],\n },\n [NumerologyValues.Eleven]: {\n description: \"The key here is altruism and community. Must practice loving your neighbor as yourself. Must use their strong intuitions to achieve wisdom and inspiration. The patterns of 11 are very high and constant, therefore, it is one of the most difficult vibrations. Must learn to have patience and also to make quick decisions. Must seek balance between material and physical life, between the life of inspiration and the spiritual. May be successful in the field of sciences, new inventions, electronics. Possesses originality and creativity and can very well make use of inspired oratory. The number 11 is an esoteric master number, of spiritual importance. Gives courage, power and talent, with strong feelings for leadership. Will need to be careful that power doesn't go to their head. Fame and recognition are probable in their life, but should recognize that true mastery is service.\",\n goal: \"The 11th path has intelligence as its mission, favoring the entire intellectual side and presenting situations that require clear ideas to be resolved. They are questioning spirits, regarding life and the paths they want to follow and only convince themselves of something when they can rationalize the subject by themselves.\",\n positiveTraits: [\"far-reaching vision\", \"innate spirituality\", \"absence of prejudice\", \"pioneering\"],\n negativeTraits: [\"obsession\", \"feeling of displacement (doesn't fit into any group)\"],\n },\n [NumerologyValues.TwentyTwo]: {\n description: \"Need to express a basic desire for development, complete things in a full way and work with large groups or commercial organizations. Enjoying long trips, may do very well in import/export trade. This number promises success. Needs to be challenged in their power of achievement. Needs to learn to take care of large companies and corporations in addition to dealing efficiently and usefully with money, for the benefit of large groups of people.\",\n goal: \"Path 21 brings realization as its mission. It brings good results for those who are born under this influence. They are spirits who can build, create and materialize things and situations with ease, using their inner energy to reach their goals. They possess a high level of appreciation and are determined spirits.\",\n positiveTraits: [\"creativity\", \"development of ideas\", \"utilization of experiences\"],\n negativeTraits: [\"anxiety\", \"haste\", \"excessive agility\"],\n },\n [NumerologyValues.ThirtyThree]: {\n description: \"Needs to be firm and reliable, developing a strong desire to protect others. Taste for natural life, which leads them not to work in areas that are harmful to humanity. Tendency to need to sacrifice their own desires for the benefit of others' needs, in order to fulfill the vibration of their Life Lesson. The consciousness of this number almost surpasses that of humanity, being similar to that of Christ in expression.\",\n goal: \"The mission of path 33 is to embody unconditional love and act as a master-healer and master-teacher, elevating people's consciousness through example, care, inspiration and practical teachings. It is not a path focused on personal gains, but on alleviating suffering, nurturing, forgiving and organizing life around service to the collective, manifesting in daily life the energy of compassion and healing.\",\n positiveTraits: [\"unconditional love\", \"healing and welcoming\", \"master / spiritual guide\"],\n negativeTraits: [\"self-sacrifice\", \"emotional exhaustion\", \"savior complex\"],\n },\n [NumerologyValues.FortyFour]: {\n description: \"Represents strength and complete mastery of the mind over their life while on Earth. Asks for discipline in every sector of life, in order to collaborate for the promotion of the world's material advancement. Needs to train their mind to let superior forces act in it, keeping their body and environment in order, to be ready for any opportunity to achieve the same results for others. Must use their enormous evolutionary energy to help others put their lives in order. Needs to try to promote better ethics and justice in the business world. Will have to recognize reality, and then use what they learned to alleviate the physical burdens of other people. You can be the instrument and channel through which this change can happen. May serve as an example to others, demonstrating bravery, resourcefulness, courage and discipline.\",\n goal: \"The mission of path 44 is to be a \\\"master builder\\\" on the material plane: erecting structures, companies, systems and solid projects that unite efficiency, prosperity and service to the collective. It is the vibration that combines organizing power, discipline and long-term vision to manifest on a large scale, with ethics and responsibility, integrating spiritual wisdom and concrete results in the world.\",\n positiveTraits: [\"discipline and focus\", \"master material builder\", \"responsible leadership\"],\n negativeTraits: [\"workaholic and rigidity\", \"obsession with results\", \"coldness and internal pressure\"],\n },\n}\n\nexport enum ChallengeNumbers {\n Zero = 0,\n One = 1,\n Two = 2,\n Three = 3,\n Four = 4,\n Five = 5,\n Six = 6,\n Seven = 7,\n Eight = 8,\n}\n\nexport const CHALLENGE_MEANING: Record<ChallengeNumbers, string> = {\n [ChallengeNumbers.Zero]: \"Can be said to function as no challenge and all other challenges together. It is a difficult challenge, as it suffers the emotional reactions of all numbers, but the person knows what their problems are and must learn to face them, one at a time.\",\n [ChallengeNumbers.One]: \"Swings between maximum independence and lack of initiative. Can act both with arrogance and with weakness. Difficulty making decisions. Must learn not to waver. There may be a very strong connection with the father. Exaggerated reactions.\",\n [ChallengeNumbers.Two]: \"Tendency to get lost in minutiae or to ignore details. Must fight against the tendency toward excessive submission and being grumpy, complaining about everything and everyone, without justification. Oscillation between extreme sensitivity and a total refusal to be influenced by emotions. May not have received enough love from the mother or still have an excessively strong connection with her. Tendency to have problems with women. Should not always take things personally.\",\n [ChallengeNumbers.Three]: \"Excessive attention to external appearance and indifference toward social interaction rules. Ability to speak at the wrong time. Waste of energy. Must develop perceptive capacity. Avoid talking too much or staying silent when it's time to speak. Should measure words more carefully.\",\n [ChallengeNumbers.Four]: \"Can present either as a severe self-disciplinarian or with extreme lack of organization. Either does everything or does nothing. Always oscillates between extremes. Must develop perceptive capacity.\",\n [ChallengeNumbers.Five]: \"Periods of exhaustion and boredom. Can either jump from experience to experience or cling to the security of a pre-established routine. Sex and material pleasures should not be so important in their life. Needs to be more responsible, leaving impulsiveness aside as it will only bring suffering. Must learn to restrain themselves.\",\n [ChallengeNumbers.Six]: \"Desire to impose opinions on others and be enslaved by the people they love. Can either assume responsibilities that don't concern them or have no responsibility at all. Needs to learn not to meddle in what is not their business, in addition to knowing how to adapt to new situations. Must learn to accept and listen to others' opinions. Idealism that can transform into hypocrisy.\",\n [ChallengeNumbers.Seven]: \"Oscillation between naive behavior and total lack of trust in others. Arrogance or lack of self-love. Lacking faith, they fear being rejected, loneliness, poverty and life's realities. Should not be afraid to share their thoughts and emotions.\",\n [ChallengeNumbers.Eight]: \"Stinginess or dissipation. Can worry excessively about material life or show total carelessness. Has thirst for power, but lacks ambition. Needs to use common sense and play fair. Should not evaluate everything in terms of material value.\",\n}\n\nexport const CHALLENGE_HEALTH_MEANING: Record<ChallengeNumbers | NumerologyValues, string> = {\n [ChallengeNumbers.Zero]: \"There is no illness associated with the number zero.\",\n [ChallengeNumbers.One]: \"Prone to diseases in the head, headaches, sinusitis, allergies, injuries to the eyes, ears and head.\",\n [ChallengeNumbers.Two]: \"Tendency to retain fluids in the body. Delicate nervous system and kidneys.\",\n [ChallengeNumbers.Three]: \"May suffer from diseases that affect the throat, liver and glands.\",\n [ChallengeNumbers.Four]: \"Prone to chronic diseases and problems with teeth, bones, intestines, digestion and circulation.\",\n [ChallengeNumbers.Five]: \"Nervous or prone to accidents. May have problems with reproductive organs.\",\n [ChallengeNumbers.Six]: \"May suffer from chronic diseases or have circulatory and spinal problems.\",\n [ChallengeNumbers.Seven]: \"Propensity for congestion, infections and nervous problems.\",\n [ChallengeNumbers.Eight]: \"May have excess weight, high blood pressure, undergo surgical interventions. Propensity for problems with digestion, pancreas, stomach and nerves.\",\n [NumerologyValues.Nine]: \"Energy of deeply rooted attachment especially with diseases, can generate hypochondria.\",\n [NumerologyValues.Eleven]: \"Can bring much dispersion or lack of care with health, has difficulties doing preventive exams.\",\n [NumerologyValues.TwentyTwo]: \"Has tendencies to increase diseases and their impacts.\",\n [NumerologyValues.ThirtyThree]: \"Finds difficulties seeking help when necessary due to the master's energy.\",\n [NumerologyValues.FortyFour]: \"Has a tendency to be very efficient including in health treatments.\",\n}\n\nexport const PERSONAL_CYCLE_KEYWORDS: Record<NumerologyValues, string[]> = {\n [NumerologyValues.One]: [\"new beginnings\", \"action\", \"originality\", \"decision making\"],\n [NumerologyValues.Two]: [\"harmony\", \"cooperation\", \"mediation\", \"passivity\"],\n [NumerologyValues.Three]: [\"dispersion\", \"freedom\", \"entertainment\", \"self expression\"],\n [NumerologyValues.Four]: [\"practical nature\", \"work\", \"order\", \"foundation building\"],\n [NumerologyValues.Five]: [\"change\", \"freedom\", \"new intellectual interests\", \"travel\"],\n [NumerologyValues.Six]: [\"family\", \"health\", \"assistance\", \"attention to others' problems\"],\n [NumerologyValues.Seven]: [\"self-analysis\", \"achievement\", \"health problems\"],\n [NumerologyValues.Eight]: [\"business\", \"power\", \"responsibility\", \"money\"],\n [NumerologyValues.Nine]: [\"self-denial\", \"endings\", \"service\"],\n [NumerologyValues.Eleven]: [\"notoriety\", \"inspiration\", \"religion\"],\n [NumerologyValues.TwentyTwo]: [\"materialism\", \"great endeavors\"],\n [NumerologyValues.ThirtyThree]: [\"sacrifice\", \"compassion for others\"],\n [NumerologyValues.FortyFour]: [\"helping solve others' daily problems\", \"counseling\"],\n}\n\nexport const PERSONAL_YEAR_DESCRIPTIONS: Record<NumerologyValues, string> = {\n [NumerologyValues.One]: \"Put yourself into action. Use your initiative and set things in motion. The seeds planted now will have a greater chance of surviving throughout the entire cycle. Good time to start a new relationship, move to a new address, make a career change, and dedicate yourself to a new hobby. Develop your ideas, be positive, and don't hesitate to remain true to your decisions. Using your creative energy will allow you to achieve everything you desire.\",\n [NumerologyValues.Two]: \"This is a year of many emotions. You may fall in love and fall out of love. The seeds you plant now will germinate this year. Water them well. Pay attention to details, but be careful not to overdo it. Accumulate knowledge, meet new people, and acquire things. Assimilate, be receptive. Cooperate, be kind even when you feel like giving a sharp response. Patience, tact, and diplomacy will bring you everything you desire.\",\n [NumerologyValues.Three]: \"This is a year for you to have fun. Enjoy it! The seeds you planted in year 1 will bear fruit now. Expand your circle of friends, take good care of yourself, and make yourself noticed. Don't get involved in anything that could restrict your freedom. Develop the skills necessary to express your ideas and feelings. It will be worthwhile to speak in public or write. Social contacts will help you achieve everything you desire.\",\n [NumerologyValues.Four]: \"This is the year to build the foundations of your future and work hard. The vibration of 4 is about routine and organization. Systematize, be practical, and keep your feet on the ground. Cultivate solid relationships. It's a good time to organize your home. And since the body is the soul's shelter, exercise and diet are also important. By focusing on organization, you will obtain everything you want, this year and the next.\",\n [NumerologyValues.Five]: \"This is your year to renew yourself, travel, take on fewer responsibilities, and meet people. You will mature in a new way. Expect the unexpected. Let yourself be carried by your inner strength and the vibration of freedom. Be receptive to what is new. Free yourself from what is boring or limiting. Enjoy the pleasures of food, drink, and sex (without excess, of course). This is the year to reap the rewards for everything you accomplished in the previous year. The vibration of freedom will give you everything you desire.\",\n [NumerologyValues.Six]: \"This year you will be more settled than in the previous year, and your responsibilities will also be greater. Your commitments will be firmer; it's a good time to think about marriage as the vibration of 6 favors lasting relationships. Love and you will be loved, protect and you will be protected. You will have to adapt to others, you will have to act with more awareness regarding anything or anyone important in your life. Reconciliation will help you achieve what you want.\",\n [NumerologyValues.Seven]: \"Don't force decisions. Make only the unavoidable changes. If you start a romance now, you may be forced to share your new love with a third person. If the relationship doesn't change by the end of the year, it will most likely continue stable. It's a good year to write, study, and engage in deeper reflections. Rest, spend some hours alone every day, take vacations somewhere near water, and trust your intuition. You can achieve everything you want by letting things come to you: this year is for inner development; the following year for material gains.\",\n [NumerologyValues.Eight]: \"This is the best year to improve your business and the state of your finances. Money comes, money goes. Focus your attention on finances and material values. Get that raise, that promotion, and the greater power that comes with it. Organize your time. This year you will make a sensation. What remained hidden in year 7 will manifest now. Take care of your health by getting an annual check-up. Using common sense, everything will work out satisfactorily.\",\n [NumerologyValues.Nine]: \"This is your year to conclude things. Clean out the closets, finish your projects. Eliminate that blacklist of yours. What's done is done. Although changes that are coming in the next few years are already in the air, it's unlikely that anything you start this year will last very long. Either it will end before the year is over, or it will change again. The vibration of 9 will bring you nostalgia. You may have an exaggerated reaction and become temperamental. This year your family is the world. Keeping an open mind and broad perspective will help you achieve what you want.\",\n [NumerologyValues.Eleven]: \"Material matters occupy a secondary position this year. You may be absorbed by your own idealism and end up discovering that you don't always have your feet on the ground. Refine your tastes, expand your consciousness, and share your talents. This is an especially creative year for writers and artists. For people working in commercial activities, this is the year of diplomacy and gratitude. For spiritually oriented people, this is a year of illumination. Following this visionary vibration will help you obtain what you long for.\",\n [NumerologyValues.TwentyTwo]: \"This is your year to have an idea and make it concrete. Now you are a visionary who transforms an idea into reality. The highest master vibration is within you this year. Plan your activities, structure your dreams, serve others, and you will see that this will be a very successful year. Maintain balance and guard against radicalism and nervous tension. Working with this powerful practical vibration, you will achieve what you desire.\",\n [NumerologyValues.ThirtyThree]: \"This is a year that intensifies themes of love, family, and emotional responsibility. The energy calls for compassion, healing, and service: people may seek you out for support, guidance, or comfort, and your sensitivity tends to become more acute. Use your creative and spiritual talents to uplift and help others, but without taking on the role of savior or martyr. Take care of your boundaries, practice self-care, and let unconditional love manifest through concrete gestures. Living this vibration of service with balance, you can have deeply meaningful experiences and transform important bonds in your life.\",\n [NumerologyValues.FortyFour]: \"This is a year that enhances material achievements and the ability to build something great and lasting. The energy favors concrete accomplishments, professional expansion, and long-term structural projects, where your leadership and sense of responsibility become evident. Organization, discipline, and strategic vision will be essential to make the most of this cycle. Keep your feet on the ground, manage time and finances well, and don't sacrifice health or emotional life for success. Using this power ethically and in balance, you can consolidate very prosperous foundations and positively influence your surroundings.\",\n};","/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\nimport type * as NumerologyModuleTypes from \"./data\";\nimport * as NumerologyData from \"./data\";\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): NumerologyModuleTypes.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\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): NumerologyModuleTypes.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 = reduceToSingleWithSteps(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath.reducedValue);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n ];\n\n if (finalSynthesis !== lifePath.reducedValue) {\n personalMythologyNumbers.push(lifePath.reducedValue);\n }\n\n const reducedLifePath = reduceToSingle(lifePath.reducedValue);\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\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): NumerologyModuleTypes.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 dayEnergy: reduceToSingleWithSteps(parseInt(day, 10), { preserveMasters: true }),\n monthEnergy: reduceToSingleWithSteps(parseInt(month, 10), { preserveMasters: true }),\n yearEnergy: reduceToSingleWithSteps(parseInt(year, 10), { preserveMasters: true }),\n lifePath: result,\n };\n}\n\nexport function getDateEnergies(birthDate: Date): NumerologyModuleTypes.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 function calculateChallenges(birthDate: Date): NumerologyModuleTypes.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\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\nfunction numberToHeptadCycle(number: number): NumerologyModuleTypes.HeptadCycles {\n if (number < 1 || number > 7) {\n throw new Error(\"Number must be between 1 and 7\");\n }\n\n return number as NumerologyModuleTypes.HeptadCycles;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): NumerologyModuleTypes.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: NumerologyModuleTypes.CycleInfo[\"ageCycles\"] = [];\n const yearlyCycles: NumerologyModuleTypes.CycleInfo[\"yearlyCycles\"] = [];\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: NumerologyData.CYCLE_MEANINGS[numberToHeptadCycle(yearlyCycle)],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: NumerologyData.CYCLE_MEANINGS[numberToHeptadCycle(cycle)],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: NumerologyModuleTypes.CycleInfo[\"monthlyCycles\"] = [];\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: NumerologyData.CYCLE_MEANINGS[numberToHeptadCycle(i + 1)],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle: NumerologyModuleTypes.CycleInfo[\"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 function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): NumerologyModuleTypes.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\nfunction calculateSoulNumber(firstName: string): NumerologyModuleTypes.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): NumerologyModuleTypes.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): [NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.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: NumerologyModuleTypes.ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: NumerologyModuleTypes.PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: NumerologyModuleTypes.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 NumerologyModuleTypes.PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): NumerologyModuleTypes.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 = calculatePersonalPeriods(\n birthDate,\n yearToUse,\n lifePath.reducedValue,\n soulNumber.reducedValue,\n currentAge\n );\n\n const { personalMonths, 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(\n Math.min(currentPersonalMonth, 11) / 4\n );\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\nexport { NumerologyData };\nexport type { NumerologyModuleTypes };\n\n"]}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFM7WUVZV_js = require('./chunk-FM7WUVZV.js');
3
+ var chunk4337NVKS_js = require('./chunk-4337NVKS.js');
4
4
 
5
5
  // src/core/constants.ts
6
6
  var FOUR_WORLDS = {
@@ -2455,7 +2455,7 @@ var BaseNode = class {
2455
2455
 
2456
2456
  // src/core/systems/kaabalah.ts
2457
2457
  var kaabalah_exports = {};
2458
- chunkFM7WUVZV_js.__export(kaabalah_exports, {
2458
+ chunk4337NVKS_js.__export(kaabalah_exports, {
2459
2459
  BRIDGES: () => BRIDGES,
2460
2460
  LOADERS: () => LOADERS,
2461
2461
  SYSTEM: () => SYSTEM,
@@ -4861,7 +4861,7 @@ var BRIDGES = [
4861
4861
 
4862
4862
  // src/core/systems/hermetic-qabalah.ts
4863
4863
  var hermetic_qabalah_exports = {};
4864
- chunkFM7WUVZV_js.__export(hermetic_qabalah_exports, {
4864
+ chunk4337NVKS_js.__export(hermetic_qabalah_exports, {
4865
4865
  BRIDGES: () => BRIDGES2,
4866
4866
  LOADERS: () => LOADERS2,
4867
4867
  SYSTEM: () => SYSTEM2,
@@ -6213,7 +6213,7 @@ var BRIDGES2 = [
6213
6213
 
6214
6214
  // src/core/systems/lurianic-kabbalah.ts
6215
6215
  var lurianic_kabbalah_exports = {};
6216
- chunkFM7WUVZV_js.__export(lurianic_kabbalah_exports, {
6216
+ chunk4337NVKS_js.__export(lurianic_kabbalah_exports, {
6217
6217
  BRIDGES: () => BRIDGES3,
6218
6218
  LOADERS: () => LOADERS3,
6219
6219
  SYSTEM: () => SYSTEM3,
@@ -7153,7 +7153,8 @@ var TreeOfLife = class {
7153
7153
  * @param id - the id of the node to remove
7154
7154
  */
7155
7155
  removeNode(id2) {
7156
- if (!this.nodes.has(id2)) return;
7156
+ if (!this.nodes.has(id2))
7157
+ return;
7157
7158
  const neighbors = this.adjacent.get(id2);
7158
7159
  if (neighbors) {
7159
7160
  for (const neighbor of neighbors) {
@@ -7375,5 +7376,5 @@ exports.createTree = createTree;
7375
7376
  exports.id = id;
7376
7377
  exports.makeCorrespondenceId = makeCorrespondenceId;
7377
7378
  exports.parseId = parseId;
7378
- //# sourceMappingURL=chunk-S6KNERP7.js.map
7379
- //# sourceMappingURL=chunk-S6KNERP7.js.map
7379
+ //# sourceMappingURL=out.js.map
7380
+ //# sourceMappingURL=chunk-VJ6RW5H4.js.map