kaabalah 6.16.0 → 6.18.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 (114) hide show
  1. package/README.md +19 -6
  2. package/dist/astrology/index.d.mts +3532 -151
  3. package/dist/astrology/index.d.ts +3532 -151
  4. package/dist/astrology/index.js +977 -59
  5. package/dist/astrology/index.mjs +4 -2
  6. package/dist/{chunk-MWLSSRHL.mjs → chunk-4BKDSA7L.mjs} +3 -4
  7. package/dist/chunk-4BKDSA7L.mjs.map +1 -0
  8. package/dist/{chunk-LQVHJ3VY.mjs → chunk-4RCPLGM2.mjs} +41 -41
  9. package/dist/{chunk-LQVHJ3VY.mjs.map → chunk-4RCPLGM2.mjs.map} +1 -1
  10. package/dist/chunk-4WVN4RMM.mjs +1139 -0
  11. package/dist/chunk-4WVN4RMM.mjs.map +1 -0
  12. package/dist/{chunk-J5Y325TG.mjs → chunk-4ZFY3GBP.mjs} +2210 -3
  13. package/dist/chunk-4ZFY3GBP.mjs.map +1 -0
  14. package/dist/chunk-66XGIFHW.js +23683 -0
  15. package/dist/chunk-66XGIFHW.js.map +1 -0
  16. package/dist/{chunk-PBBF5DKC.js → chunk-6SBCBVTZ.js} +21 -21
  17. package/dist/{chunk-CMXTZKWW.js → chunk-CHZUOTVW.js} +157 -157
  18. package/dist/{chunk-CMXTZKWW.js.map → chunk-CHZUOTVW.js.map} +1 -1
  19. package/dist/{chunk-WP5MRAYG.mjs → chunk-COEM6U4V.mjs} +3 -4
  20. package/dist/chunk-COEM6U4V.mjs.map +1 -0
  21. package/dist/chunk-CPXGTH2D.mjs +23395 -0
  22. package/dist/chunk-CPXGTH2D.mjs.map +1 -0
  23. package/dist/{chunk-3JMY4U4S.mjs → chunk-DBRPCQRR.mjs} +245 -211
  24. package/dist/chunk-DBRPCQRR.mjs.map +1 -0
  25. package/dist/{chunk-WRF3EORB.js → chunk-DCJYTCJZ.js} +16 -17
  26. package/dist/chunk-DCJYTCJZ.js.map +1 -0
  27. package/dist/{chunk-UO2RQQZO.mjs → chunk-DK2VS36Z.mjs} +2 -2
  28. package/dist/{chunk-HEZCZXQC.js → chunk-E353GPHE.js} +16 -16
  29. package/dist/{chunk-6LZOAU6E.js → chunk-GDJSVV46.js} +272 -241
  30. package/dist/chunk-GDJSVV46.js.map +1 -0
  31. package/dist/{chunk-Z3JZ5DZN.mjs → chunk-IZBM4CPN.mjs} +2 -2
  32. package/dist/{chunk-7OWGGDRF.js → chunk-JFRVH3TD.js} +2288 -80
  33. package/dist/chunk-JFRVH3TD.js.map +1 -0
  34. package/dist/chunk-MZBY6G5S.js +1182 -0
  35. package/dist/chunk-MZBY6G5S.js.map +1 -0
  36. package/dist/{chunk-7JWBIAUF.mjs → chunk-NS5AXNEW.mjs} +3 -3
  37. package/dist/{chunk-BKFHIKFY.js → chunk-XRSK74V5.js} +179 -180
  38. package/dist/chunk-XRSK74V5.js.map +1 -0
  39. package/dist/{chunk-2IC6H3FI.js → chunk-YVLKVB6W.js} +52 -52
  40. package/dist/cli.js +34679 -11579
  41. package/dist/cli.js.map +1 -1
  42. package/dist/core/index.js +56 -57
  43. package/dist/core/index.mjs +2 -3
  44. package/dist/core-B3_-9yli.d.mts +279 -0
  45. package/dist/core-cWIQtely.d.ts +279 -0
  46. package/dist/gematria/index.js +7 -8
  47. package/dist/gematria/index.mjs +2 -3
  48. package/dist/iching/index.d.mts +37 -37
  49. package/dist/iching/index.d.ts +37 -37
  50. package/dist/iching/index.js +46 -47
  51. package/dist/iching/index.mjs +3 -4
  52. package/dist/index.d.mts +139 -2
  53. package/dist/index.d.ts +139 -2
  54. package/dist/index.js +1652 -403
  55. package/dist/index.js.map +1 -1
  56. package/dist/index.mjs +190 -10
  57. package/dist/index.mjs.map +1 -1
  58. package/dist/numerology/index.d.mts +437 -252
  59. package/dist/numerology/index.d.ts +437 -252
  60. package/dist/numerology/index.js +108 -28
  61. package/dist/numerology/index.mjs +4 -4
  62. package/dist/schedule-types-DsR1_guG.d.mts +200 -0
  63. package/dist/schedule-types-DsR1_guG.d.ts +200 -0
  64. package/dist/semantic/index.d.mts +10 -9
  65. package/dist/semantic/index.d.ts +10 -9
  66. package/dist/semantic/index.js +41 -41
  67. package/dist/semantic/index.mjs +8 -8
  68. package/dist/swisseph.node-734BKSOZ.js +10 -0
  69. package/dist/swisseph.node-734BKSOZ.js.map +1 -0
  70. package/dist/swisseph.node-TDPYTBSS.mjs +8 -0
  71. package/dist/swisseph.node-TDPYTBSS.mjs.map +1 -0
  72. package/dist/tarot/index.js +30 -31
  73. package/dist/tarot/index.mjs +3 -4
  74. package/dist/visual/index.d.mts +1 -0
  75. package/dist/visual/index.d.ts +1 -0
  76. package/dist/visual/index.js +46 -47
  77. package/dist/visual/index.mjs +3 -4
  78. package/dist/wasm/build/swisseph.node-734BKSOZ.js +10 -0
  79. package/dist/wasm/build/swisseph.node-734BKSOZ.js.map +1 -0
  80. package/dist/wasm/build/swisseph.node-TDPYTBSS.mjs +8 -0
  81. package/dist/wasm/build/swisseph.node-TDPYTBSS.mjs.map +1 -0
  82. package/package.json +4 -2
  83. package/dist/chunk-3JMY4U4S.mjs.map +0 -1
  84. package/dist/chunk-3QN5V3DP.js +0 -4737
  85. package/dist/chunk-3QN5V3DP.js.map +0 -1
  86. package/dist/chunk-6LZOAU6E.js.map +0 -1
  87. package/dist/chunk-7OWGGDRF.js.map +0 -1
  88. package/dist/chunk-BKFHIKFY.js.map +0 -1
  89. package/dist/chunk-IT7GZ337.mjs +0 -4679
  90. package/dist/chunk-IT7GZ337.mjs.map +0 -1
  91. package/dist/chunk-J5Y325TG.mjs.map +0 -1
  92. package/dist/chunk-JY4QC6FR.js +0 -2214
  93. package/dist/chunk-JY4QC6FR.js.map +0 -1
  94. package/dist/chunk-MWLSSRHL.mjs.map +0 -1
  95. package/dist/chunk-RUE6NTVT.mjs +0 -2211
  96. package/dist/chunk-RUE6NTVT.mjs.map +0 -1
  97. package/dist/chunk-WP5MRAYG.mjs.map +0 -1
  98. package/dist/chunk-WRF3EORB.js.map +0 -1
  99. package/dist/swisseph.node-53QCJWTI.mjs +0 -3471
  100. package/dist/swisseph.node-53QCJWTI.mjs.map +0 -1
  101. package/dist/swisseph.node-CGBZTQ5N.js +0 -3473
  102. package/dist/swisseph.node-CGBZTQ5N.js.map +0 -1
  103. package/dist/swisseph.node-GPVFDOB6.wasm +0 -0
  104. package/dist/wasm/build/swisseph.node-53QCJWTI.mjs +0 -3471
  105. package/dist/wasm/build/swisseph.node-53QCJWTI.mjs.map +0 -1
  106. package/dist/wasm/build/swisseph.node-CGBZTQ5N.js +0 -3473
  107. package/dist/wasm/build/swisseph.node-CGBZTQ5N.js.map +0 -1
  108. package/dist/wasm/build/swisseph.node-GPVFDOB6.wasm +0 -0
  109. /package/dist/{chunk-PBBF5DKC.js.map → chunk-6SBCBVTZ.js.map} +0 -0
  110. /package/dist/{chunk-2IC6H3FI.js.map → chunk-DK2VS36Z.mjs.map} +0 -0
  111. /package/dist/{chunk-7JWBIAUF.mjs.map → chunk-E353GPHE.js.map} +0 -0
  112. /package/dist/{chunk-Z3JZ5DZN.mjs.map → chunk-IZBM4CPN.mjs.map} +0 -0
  113. /package/dist/{chunk-HEZCZXQC.js.map → chunk-NS5AXNEW.mjs.map} +0 -0
  114. /package/dist/{chunk-UO2RQQZO.mjs.map → chunk-YVLKVB6W.js.map} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../wasm/src/swisseph.ts","../src/astrology/swisseph.ts","../src/astrology/astrocartography.ts","../src/astrology/aspects.ts","../src/astrology/dignity.ts","../src/astrology/descriptions.json","../src/astrology/descriptions.ts","../src/astrology/decans.ts","../src/astrology/dodecatemoria.ts","../src/astrology/profections.ts","../src/astrology/firdaria.ts","../src/astrology/labels.json","../src/astrology/labels.ts","../src/astrology/index.ts"],"names":["Planet","VirtualNodes","HouseSystem","CalcFlag","RiseTransitFlag","bundledAssets"],"mappings":";;;;;;;;;;;;;;;;;AAmBO,IAAK,SAAL,kB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QAAQ,0BAA0B,QAAQ,MAAM;AAAA;AAAA;AAAA;AAAA,IAI7D,kBAAkB,EAAE,YAAY,KAAK;AAAA,EACvC,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,MAAM,QAAQ;AAAA,EAChB;AACF","sourcesContent":["/**\n * TypeScript wrapper for Swiss Ephemeris WebAssembly module\n */\n\nimport type {\n SweAzalt,\n SweCalcUt,\n SweClose,\n SweHousePos,\n SweHouses,\n SweJulDay,\n SweRiseTrans,\n SweSetEphePath,\n SweSetSidMode,\n SweSetTopo,\n SwissEphModule,\n} from \"./types\";\n\n// Exported planet constants\nexport enum Planet {\n SUN = 0,\n MOON = 1,\n MERCURY = 2,\n VENUS = 3,\n MARS = 4,\n JUPITER = 5,\n SATURN = 6,\n URANUS = 7,\n NEPTUNE = 8,\n PLUTO = 9,\n MEAN_NODE = 10,\n TRUE_NODE = 11,\n LILITH_MEAN = 12,\n LILITH_TRUE = 13,\n CHIRON = 15,\n}\n\nexport enum VirtualNodes {\n PARS_FORTUNAE = \"parsFortunae\",\n}\n\nexport const PLANET_AND_NODE_NAMES: Record<string, string> = {\n [Planet.SUN]: \"Sun\",\n [Planet.MOON]: \"Moon\",\n [Planet.MERCURY]: \"Mercury\",\n [Planet.VENUS]: \"Venus\",\n [Planet.MARS]: \"Mars\",\n [Planet.JUPITER]: \"Jupiter\",\n [Planet.SATURN]: \"Saturn\",\n [Planet.URANUS]: \"Uranus\",\n [Planet.NEPTUNE]: \"Neptune\",\n [Planet.PLUTO]: \"Pluto\",\n [Planet.MEAN_NODE]: \"Mean Node\",\n [Planet.TRUE_NODE]: \"True Node\",\n [Planet.LILITH_MEAN]: \"Lilith Mean\",\n [Planet.LILITH_TRUE]: \"Lilith True\",\n [Planet.CHIRON]: \"Chiron\",\n [VirtualNodes.PARS_FORTUNAE]: \"Wheel of Fortune\",\n} as const;\n\n// House systems\nexport enum HouseSystem {\n PLACIDUS = \"P\",\n KOCH = \"K\",\n PORPHYRIUS = \"O\",\n REGIOMONTANUS = \"R\",\n CAMPANUS = \"C\",\n EQUAL = \"E\",\n WHOLE_SIGN = \"W\",\n MERIDIAN = \"X\",\n MORINUS = \"M\",\n KRUSINSKI = \"U\",\n ALCABITIUS = \"B\",\n}\n\n// Calculation flag constants\nexport enum CalcFlag {\n JPL_EPH = 1,\n SWISS_EPH = 2,\n MOSHIER = 4,\n HELIOCENTRIC = 8,\n TRUE_POS = 16,\n J2000 = 32,\n NONUT = 64,\n SPEED3 = 128,\n SPEED = 256,\n EQUATORIAL = 2048,\n TOPOCTR = 32768,\n SIDEREAL = 65536,\n}\n\n// Rise/set/meridian transit flags for swe_rise_trans\nexport enum RiseTransitFlag {\n RISE = 1,\n SET = 2,\n UPPER_MERIDIAN = 4,\n LOWER_MERIDIAN = 8,\n DISC_CENTER = 256,\n NO_REFRACTION = 512,\n}\n\n// Azimuth/altitude result from swe_azalt\nexport interface AzaltResult {\n azimuth: number;\n trueAltitude: number;\n apparentAltitude: number;\n}\n\n// SE_ECL2HOR / SE_EQU2HOR constants for swe_azalt\nexport const SE_ECL2HOR = 0;\nexport const SE_EQU2HOR = 1;\n\n// Planet position result\nexport interface PlanetPosition {\n longitude: number;\n latitude: number;\n distance: number;\n longitudeSpeed?: number;\n latitudeSpeed?: number;\n distanceSpeed?: number;\n}\n\n// Houses calculation result\nexport interface Houses {\n ascendant: number;\n mc: number;\n houses: number[];\n // extras of ASCMC (useful for Vertex etc.)\n ascmc?: {\n armc: number;\n vertex: number;\n equasc: number;\n coasc1: number;\n coasc2: number;\n polasc: number;\n };\n}\n\n// Offset for asteroids (MPC)\nexport const SE_AST_OFFSET = 10000;\n\nexport const BODY = {\n MEAN_APOGEE: 12, // Lilith mean\n OSC_APOGEE: 13, // Lilith true\n PHOLUS: 16,\n CERES: 17,\n PALLAS: 18,\n JUNO: 19,\n VESTA: 20,\n} as const;\n\nexport const normalizeAngle = (deg: number) => ((deg % 360) + 360) % 360;\n\n// Swiss Ephemeris class\nexport class SwissEph {\n private module: SwissEphModule;\n private swe_julday: SweJulDay | null = null;\n private swe_calc_ut: SweCalcUt | null = null;\n private swe_houses: SweHouses | null = null;\n private swe_house_pos: SweHousePos | null = null;\n private swe_set_ephe_path: SweSetEphePath | null = null;\n private swe_close: SweClose | null = null;\n private swe_set_topo: SweSetTopo | null = null;\n private swe_set_sid_mode: SweSetSidMode | null = null;\n private swe_azalt_fn: SweAzalt | null = null;\n private swe_rise_trans_fn: SweRiseTrans | null = null;\n\n /**\n * Constructor that accepts a pre-initialized Swiss Ephemeris module\n */\n constructor(module: SwissEphModule) {\n this.module = module;\n\n // Create wrapped functions with specific types\n this.swe_julday = this.module.cwrap<SweJulDay>(\"swe_julday\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ]);\n this.swe_calc_ut = this.module.cwrap<SweCalcUt>(\"swe_calc_ut\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ]);\n this.swe_houses = this.module.cwrap<SweHouses>(\"swe_houses\", \"number\", [\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n \"number\",\n ]);\n this.swe_house_pos = this.module.cwrap<SweHousePos>(\n \"swe_house_pos\",\n \"number\",\n [\"number\", \"number\", \"number\", \"string\", \"number\", \"number\"]\n );\n this.swe_set_ephe_path = this.module.cwrap<SweSetEphePath>(\n \"swe_set_ephe_path\",\n null,\n [\"number\"]\n );\n this.swe_close = this.module.cwrap<SweClose>(\"swe_close\", null, []);\n this.swe_set_topo = this.module.cwrap<SweSetTopo>(\"swe_set_topo\", null, [\n \"number\",\n \"number\",\n \"number\",\n ]);\n this.swe_set_sid_mode = this.module.cwrap<SweSetSidMode>(\n \"swe_set_sid_mode\",\n null,\n [\"number\", \"number\", \"number\"]\n );\n this.swe_azalt_fn = this.module.cwrap<SweAzalt>(\n \"swe_azalt\",\n null,\n [\"number\", \"number\", \"number\", \"number\", \"number\", \"number\", \"number\"]\n );\n this.swe_rise_trans_fn = this.module.cwrap<SweRiseTrans>(\n \"swe_rise_trans\",\n \"number\",\n [\"number\", \"number\", \"number\", \"number\", \"number\", \"number\", \"number\", \"number\", \"number\", \"number\"]\n );\n }\n\n private checkInitialized(): void {\n if (!this.module) {\n throw new Error(\"Swiss Ephemeris module not available.\");\n }\n }\n\n /**\n * Sets the path to the ephemeris data files.\n * @param path - The path to the directory containing ephemeris files.\n */\n setEphemerisPath(path: string): void {\n this.checkInitialized();\n if (path && this.swe_set_ephe_path) {\n const pathPtr = this.module._malloc(path.length + 1);\n if (!pathPtr) {\n throw new Error(\"Failed to allocate memory for ephemeris path\");\n }\n this.module.stringToUTF8(path, pathPtr, path.length + 1);\n this.swe_set_ephe_path(pathPtr);\n this.module._free(pathPtr);\n }\n }\n\n /**\n * Calculate Julian day number for a given date and time\n */\n getJulianDay(date: Date): number {\n this.checkInitialized();\n if (!this.swe_julday) {\n throw new Error(\"Julian day calculation function not available\");\n }\n\n // Get UTC components\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth() + 1; // JavaScript months are 0-based\n const day = date.getUTCDate();\n const hour =\n date.getUTCHours() +\n date.getUTCMinutes() / 60 +\n date.getUTCSeconds() / 3600;\n\n // Use Gregorian calendar (flag = 1)\n return this.swe_julday(year, month, day, hour, 1);\n }\n\n /**\n * Calculate planet position at a given Julian day\n */\n calculatePlanetPosition(\n julday: number,\n planet: Planet | number,\n flags = CalcFlag.SWISS_EPH\n ): PlanetPosition {\n this.checkInitialized();\n if (!this.swe_calc_ut || !this.module) {\n throw new Error(\"Planet calculation function not available\");\n }\n\n const resultPtr = this.module._malloc(6 * 8);\n if (!resultPtr) {\n throw new Error(\"Failed to allocate memory for planet position\");\n }\n\n // allocate an error buffer for swe_calc_ut to write into\n const ERR_BYTES = 512;\n const errPtr = this.module._malloc(ERR_BYTES);\n if (!errPtr) {\n this.module._free(resultPtr);\n throw new Error(\"Failed to allocate memory for error buffer\");\n }\n // zero the buffer to ensure a clean C string\n this.module.HEAP8.fill(0, errPtr, errPtr + ERR_BYTES);\n\n try {\n let ret = this.swe_calc_ut(julday, planet, flags, resultPtr, errPtr);\n\n // // If Chiron via SE_CHIRON (15) fails, retry using MPC 2060 (asteroid id = offset + 2060)\n // if (ret < 0 && planet === Planet.CHIRON) {\n // const mpcPlanetId = SE_AST_OFFSET + 2060; // 2060 = Chiron\n // this.module.HEAP8.fill(0, errPtr, errPtr + ERR_BYTES);\n // ret = this.swe_calc_ut(julday, mpcPlanetId, flags, resultPtr, errPtr);\n // }\n\n if (ret < 0) {\n const msg = this.module.UTF8ToString(errPtr);\n throw new Error(msg && msg.length ? msg : `Swiss Ephemeris calculation failed with error code ${ret}`);\n }\n\n const position: PlanetPosition = {\n longitude: this.module.getValue(resultPtr, \"double\"),\n latitude: this.module.getValue(resultPtr + 8, \"double\"),\n distance: this.module.getValue(resultPtr + 16, \"double\"),\n };\n\n if (flags & CalcFlag.SPEED) {\n position.longitudeSpeed = this.module.getValue(resultPtr + 24, \"double\");\n position.latitudeSpeed = this.module.getValue(resultPtr + 32, \"double\");\n position.distanceSpeed = this.module.getValue(resultPtr + 40, \"double\");\n }\n\n return position;\n } finally {\n this.module._free(errPtr);\n this.module._free(resultPtr);\n }\n }\n\n /**\n * Calculate houses for a given date, location, and house system\n */\n calculateHouses(\n julday: number,\n latitude: number,\n longitude: number,\n hsys: HouseSystem = HouseSystem.PLACIDUS\n ): Houses {\n this.checkInitialized();\n if (!this.swe_houses || !this.module) {\n throw new Error(\"Houses calculation function not available\");\n }\n\n // Validate input parameters\n if (latitude < -90 || latitude > 90) {\n throw new Error(\"Latitude must be between -90 and 90 degrees\");\n }\n if (longitude < -180 || longitude > 180) {\n throw new Error(\"Longitude must be between -180 and 180 degrees\");\n }\n\n // Swiss Ephemeris: cusps[0..12] (0 not used), ascmc[0..9]\n const HOUSES_DOUBLES = 13;\n const ASCMC_DOUBLES = 10;\n const BYTES_PER_F64 = 8;\n\n // Create a single contiguous memory block for both houses and ascmc\n const totalBytes = (HOUSES_DOUBLES + ASCMC_DOUBLES) * BYTES_PER_F64;\n const memoryPtr = this.module._malloc(totalBytes);\n\n if (!memoryPtr) throw new Error(\"Memory allocation failed\");\n\n const housesPtr = memoryPtr; // 13 * f64\n const ascmcPtr = memoryPtr + HOUSES_DOUBLES * BYTES_PER_F64; // 10 * f64\n\n try {\n // Calculate houses\n // passar código do caractere (ex.: 'P' -> 80)\n const hsysCode = hsys.charCodeAt(0);\n const ret = this.swe_houses(\n julday,\n latitude,\n longitude,\n hsysCode,\n housesPtr,\n ascmcPtr\n );\n\n if (ret < 0) {\n throw new Error(`Houses calculation failed with error code ${ret}`);\n }\n\n // Extract all data before any memory operations\n const houses: number[] = new Array(HOUSES_DOUBLES);\n for (let i = 0; i < HOUSES_DOUBLES; i++) {\n houses[i] = this.module.getValue(\n housesPtr + i * BYTES_PER_F64,\n \"double\"\n );\n }\n\n const ascendant = this.module.getValue(\n ascmcPtr + 0 * BYTES_PER_F64,\n \"double\"\n ); // 0\n const mc = this.module.getValue(ascmcPtr + 1 * BYTES_PER_F64, \"double\"); // 1\n const armc = this.module.getValue(ascmcPtr + 2 * BYTES_PER_F64, \"double\"); // 2\n const vertex = this.module.getValue(\n ascmcPtr + 3 * BYTES_PER_F64,\n \"double\"\n ); // 3\n const equasc = this.module.getValue(\n ascmcPtr + 4 * BYTES_PER_F64,\n \"double\"\n ); // 4\n const coasc1 = this.module.getValue(\n ascmcPtr + 5 * BYTES_PER_F64,\n \"double\"\n ); // 5\n const coasc2 = this.module.getValue(\n ascmcPtr + 6 * BYTES_PER_F64,\n \"double\"\n ); // 6\n const polasc = this.module.getValue(\n ascmcPtr + 7 * BYTES_PER_F64,\n \"double\"\n ); // 7\n\n return {\n ascendant,\n mc,\n houses,\n ascmc: {\n armc,\n vertex,\n equasc,\n coasc1,\n coasc2,\n polasc,\n },\n };\n } finally {\n // Always free memory\n this.module._free(memoryPtr);\n }\n }\n\n /**\n * Clean up and close the Swiss Ephemeris\n */\n close(): void {\n this.checkInitialized();\n if (this.swe_close) {\n this.swe_close();\n }\n }\n\n /**\n * Set topocentric observer\n */\n setTopocentric(\n longitude: number,\n latitude: number,\n altitudeMeters = 0\n ): void {\n this.checkInitialized();\n\n if (!this.swe_set_topo) {\n throw new Error(\"Topocentric calculation function not available\");\n }\n\n this.swe_set_topo(longitude, latitude, altitudeMeters);\n }\n\n /**\n * Set sidereal mode\n * Ex.: mode=1 (Lahiri). See Swiss Ephemeris mode table.\n */\n setSiderealMode(mode: number, t0 = 0, ayan_t0 = 0): void {\n this.checkInitialized();\n this.swe_set_sid_mode?.(mode, t0, ayan_t0);\n }\n\n /**\n * Asteroid by MPC number\n */\n calculateAsteroidPosition(\n julday: number,\n mpcNumber: number,\n flags = CalcFlag.SWISS_EPH\n ): PlanetPosition {\n return this.calculatePlanetPosition(\n julday,\n SE_AST_OFFSET + mpcNumber,\n flags\n );\n }\n\n /**\n * Lilith mean (12) and true (13)\n */\n calculateLilith(\n julday: number,\n kind: \"mean\" | \"true\" = \"mean\",\n flags = CalcFlag.SWISS_EPH\n ): PlanetPosition {\n const id = kind === \"mean\" ? BODY.MEAN_APOGEE : BODY.OSC_APOGEE;\n return this.calculatePlanetPosition(julday, id, flags);\n }\n /**\n * Convert ecliptic (or equatorial) coordinates to horizon coordinates.\n * Returns azimuth (0=south, 90=west, 180=north, 270=east) and altitude.\n */\n azalt(\n julday: number,\n longitude: number,\n latitude: number,\n altitude: number,\n xinLon: number,\n xinLat: number,\n xinDist: number,\n fromEquatorial = false\n ): AzaltResult {\n this.checkInitialized();\n if (!this.swe_azalt_fn) {\n throw new Error(\"swe_azalt function not available\");\n }\n\n const BYTES = 8;\n const geoPtr = this.module._malloc(3 * BYTES);\n const xinPtr = this.module._malloc(3 * BYTES);\n const xazPtr = this.module._malloc(3 * BYTES);\n\n if (!geoPtr || !xinPtr || !xazPtr) {\n if (geoPtr) this.module._free(geoPtr);\n if (xinPtr) this.module._free(xinPtr);\n if (xazPtr) this.module._free(xazPtr);\n throw new Error(\"Memory allocation failed for azalt\");\n }\n\n try {\n this.module.setValue(geoPtr, longitude, \"double\");\n this.module.setValue(geoPtr + BYTES, latitude, \"double\");\n this.module.setValue(geoPtr + 2 * BYTES, altitude, \"double\");\n\n this.module.setValue(xinPtr, xinLon, \"double\");\n this.module.setValue(xinPtr + BYTES, xinLat, \"double\");\n this.module.setValue(xinPtr + 2 * BYTES, xinDist, \"double\");\n\n this.swe_azalt_fn(\n julday,\n fromEquatorial ? SE_EQU2HOR : SE_ECL2HOR,\n geoPtr,\n 0, // atpress (0 = default 1013.25 mbar)\n 0, // attemp (0 = default 15°C)\n xinPtr,\n xazPtr\n );\n\n return {\n azimuth: this.module.getValue(xazPtr, \"double\"),\n trueAltitude: this.module.getValue(xazPtr + BYTES, \"double\"),\n apparentAltitude: this.module.getValue(xazPtr + 2 * BYTES, \"double\"),\n };\n } finally {\n this.module._free(geoPtr);\n this.module._free(xinPtr);\n this.module._free(xazPtr);\n }\n }\n\n /**\n * Find the next rise, set, or meridian transit of a planet.\n * Returns the Julian day of the event.\n */\n riseTransit(\n julday: number,\n planet: Planet | number,\n rsmi: RiseTransitFlag,\n longitude: number,\n latitude: number,\n altitude = 0,\n flags = CalcFlag.SWISS_EPH\n ): number {\n this.checkInitialized();\n if (!this.swe_rise_trans_fn) {\n throw new Error(\"swe_rise_trans function not available\");\n }\n\n const BYTES = 8;\n const geoPtr = this.module._malloc(3 * BYTES);\n const tretPtr = this.module._malloc(BYTES);\n const ERR_BYTES = 512;\n const errPtr = this.module._malloc(ERR_BYTES);\n\n if (!geoPtr || !tretPtr || !errPtr) {\n if (geoPtr) this.module._free(geoPtr);\n if (tretPtr) this.module._free(tretPtr);\n if (errPtr) this.module._free(errPtr);\n throw new Error(\"Memory allocation failed for riseTransit\");\n }\n\n this.module.HEAP8.fill(0, errPtr, errPtr + ERR_BYTES);\n\n try {\n this.module.setValue(geoPtr, longitude, \"double\");\n this.module.setValue(geoPtr + BYTES, latitude, \"double\");\n this.module.setValue(geoPtr + 2 * BYTES, altitude, \"double\");\n\n const ret = this.swe_rise_trans_fn(\n julday,\n planet,\n 0, // starname pointer (0 = planet, not fixed star)\n flags,\n rsmi,\n geoPtr,\n 0, // atpress\n 0, // attemp\n tretPtr,\n errPtr\n );\n\n if (ret < 0) {\n const msg = this.module.UTF8ToString(errPtr);\n throw new Error(msg || `swe_rise_trans failed with code ${ret}`);\n }\n\n return this.module.getValue(tretPtr, \"double\");\n } finally {\n this.module._free(geoPtr);\n this.module._free(tretPtr);\n this.module._free(errPtr);\n }\n }\n}\n\n/**\n * Fortune part (in ecliptic longitude)\n */\nexport function parsFortunae(\n asc: number,\n sunLon: number,\n moonLon: number,\n diurnal: boolean\n): number {\n const val = diurnal ? asc + moonLon - sunLon : asc + sunLon - moonLon;\n return normalizeAngle(val);\n}\n","/**\n * Integration with the Swiss Ephemeris WebAssembly module\n */\nimport wasmPathNode from \"../../wasm/build/swisseph.node.wasm?url\";\nimport wasmPathWeb from \"../../wasm/build/swisseph.web.wasm?url\";\nimport type { SwissEphModule, SwissEphModuleFactory } from \"../../wasm/src/types\";\n\n// Note: In the production code, you'll need to include the compiled WASM files\n// and update the import path. This is a placeholder that would work once the\n// compilation is complete.\n\n// Import from the actual WASM wrapper\nimport {\n type AzaltResult,\n CalcFlag,\n Houses,\n HouseSystem,\n normalizeAngle,\n parsFortunae,\n Planet,\n PLANET_AND_NODE_NAMES,\n PlanetPosition,\n RiseTransitFlag,\n SwissEph,\n VirtualNodes,\n} from \"../../wasm/src/swisseph\";\n\n// We'll use this singleton pattern to manage the Swiss Ephemeris instance\nlet swissEph: SwissEph | null = null;\n\nconst DEFAULT_FLAGS = CalcFlag.SWISS_EPH | CalcFlag.SPEED;\nexport const REQUIRED_EPHE_FILES = [\"seas_18.se1\", \"semo_18.se1\", \"sepl_18.se1\"] as const;\n\nconst NODE_EPHE_MOUNT_POINT = \"/ephefs\";\nconst NODE_EPHE_MEMFS_PATH = \"/ephemem\";\n\nfunction emitRuntimeNotice(message: string): void {\n if (typeof process !== \"undefined\" && process.stderr && typeof process.stderr.write === \"function\") {\n process.stderr.write(`${message}\\n`);\n return;\n }\n\n console.info(message);\n}\n\ntype EmscriptenFs = NonNullable<SwissEphModule[\"FS\"]>;\n\ntype NodeEphemerisStrategy = \"nodefs-mount\" | \"host-path\" | \"memfs-copy\";\n\ninterface VirtualEphemerisCheck {\n rootExists: boolean | null;\n visibleEntries: string[];\n missingFiles: string[];\n}\n\ninterface ResolvedNodeEphemerisPath {\n path: string;\n strategy: NodeEphemerisStrategy;\n}\n\ninterface NodeFsLike {\n readFileSync(path: string): Uint8Array;\n}\n\ninterface PathModuleLike {\n join(...paths: string[]): string;\n}\n\ninterface ResolveNodeEphemerisPathOptions {\n nodeFs?: NodeFsLike;\n pathModule?: PathModuleLike;\n mountPoint?: string;\n memfsPath?: string;\n requiredFiles?: readonly string[];\n}\n\ntype RuntimeAssetSource = \"explicit\" | \"env\" | \"candidate\" | \"bundled\";\n\nexport interface SwissEphRuntimeAssetPaths {\n wasmPath: string;\n ephePath: string;\n wasmPathSource: RuntimeAssetSource;\n ephePathSource: RuntimeAssetSource;\n}\n\nexport interface ResolveSwissEphRuntimeAssetsOptions {\n wasmPath?: string;\n ephePath?: string;\n wasmPathCandidates?: string[];\n ephePathCandidates?: string[];\n env?: Record<string, string | undefined>;\n}\n\ninterface ResolveSwissEphRuntimeAssetsInternalOptions\n extends ResolveSwissEphRuntimeAssetsOptions {\n isBrowser?: boolean;\n existsSync?: (path: string) => boolean;\n nodePathResolve?: (...paths: string[]) => string;\n bundledNodeWasmPath?: string;\n bundledNodeEphePath?: string;\n bundledBrowserWasmPath?: string;\n bundledBrowserEphePath?: string;\n}\n\nconst SWISS_EPH_RUNTIME_WASM_ENV_KEYS = [\n \"KAABALAH_SWISSEPH_WASM_PATH\",\n \"KAABALAH_WASM_PATH\"\n] as const;\n\nconst SWISS_EPH_RUNTIME_EPHE_ENV_KEYS = [\n \"KAABALAH_SWISSEPH_EPHE_PATH\",\n \"KAABALAH_EPHE_PATH\"\n] as const;\n\nfunction getRuntimeEnv(\n env: ResolveSwissEphRuntimeAssetsOptions[\"env\"]\n): Record<string, string | undefined> {\n if (env) {\n return env;\n }\n\n if (typeof process !== \"undefined\" && process.env) {\n return process.env;\n }\n\n return {};\n}\n\nfunction firstDefinedEnvValue(\n env: Record<string, string | undefined>,\n keys: readonly string[]\n): string | undefined {\n for (const key of keys) {\n const value = env[key];\n if (typeof value === \"string\" && value.length > 0) {\n return value;\n }\n }\n\n return undefined;\n}\n\nfunction getBundledNodeSwissEphAssets(\n options: ResolveSwissEphRuntimeAssetsInternalOptions\n): { wasmPaths: string[]; ephePaths: string[] } {\n if (options.bundledNodeWasmPath && options.bundledNodeEphePath) {\n return {\n wasmPaths: [options.bundledNodeWasmPath],\n ephePaths: [options.bundledNodeEphePath]\n };\n }\n\n const resolvePath =\n options.nodePathResolve ??\n ((...paths: string[]) => (require(\"path\") as typeof import(\"path\")).resolve(...paths));\n\n return {\n wasmPaths: [\n options.bundledNodeWasmPath,\n resolvePath(__dirname, wasmPathNode),\n resolvePath(__dirname, \"../../wasm/build/swisseph.node.wasm\"),\n resolvePath(__dirname, \"../wasm/build/swisseph.node.wasm\")\n ].filter((value): value is string => typeof value === \"string\"),\n ephePaths: [\n options.bundledNodeEphePath,\n resolvePath(__dirname, \"../../ephe\"),\n resolvePath(__dirname, \"../ephe\")\n ].filter((value): value is string => typeof value === \"string\")\n };\n}\n\nfunction getBundledBrowserSwissEphAssets(\n options: ResolveSwissEphRuntimeAssetsInternalOptions\n): { wasmPath: string; ephePath: string } {\n return {\n wasmPath: options.bundledBrowserWasmPath ?? wasmPathWeb,\n ephePath: options.bundledBrowserEphePath ?? \"../ephe\"\n };\n}\n\nfunction formatCandidatePaths(paths: string[]): string {\n return paths.length > 0 ? paths.join(\", \") : \"(none)\";\n}\n\nfunction resolveBundledRuntimeAssetPath(\n label: \"wasmPath\" | \"ephePath\",\n bundledPaths: string[],\n existsSync: (path: string) => boolean\n): { path: string; source: RuntimeAssetSource } {\n for (const bundledPath of bundledPaths) {\n if (existsSync(bundledPath)) {\n return {\n path: bundledPath,\n source: \"bundled\"\n };\n }\n }\n\n throw new Error(\n `Unable to resolve Swiss Ephemeris ${label}. Bundled paths checked: ${formatCandidatePaths(\n bundledPaths\n )}.`\n );\n}\n\nfunction resolveRuntimeAssetPath(\n label: \"wasmPath\" | \"ephePath\",\n explicitPath: string | undefined,\n envPath: string | undefined,\n candidatePaths: string[],\n bundledPaths: string[],\n existsSync: (path: string) => boolean\n): { path: string; source: RuntimeAssetSource } {\n if (explicitPath) {\n if (!existsSync(explicitPath)) {\n throw new Error(\n `Swiss Ephemeris ${label} override does not exist: \"${explicitPath}\".`\n );\n }\n\n return {\n path: explicitPath,\n source: \"explicit\"\n };\n }\n\n if (envPath) {\n if (!existsSync(envPath)) {\n throw new Error(\n `Swiss Ephemeris ${label} from environment does not exist: \"${envPath}\".`\n );\n }\n\n return {\n path: envPath,\n source: \"env\"\n };\n }\n\n for (const candidatePath of candidatePaths) {\n if (existsSync(candidatePath)) {\n return {\n path: candidatePath,\n source: \"candidate\"\n };\n }\n }\n\n try {\n return resolveBundledRuntimeAssetPath(label, bundledPaths, existsSync);\n } catch (error) {\n throw new Error(\n `Unable to resolve Swiss Ephemeris ${label}. Checked candidate paths: ${formatCandidatePaths(\n candidatePaths\n )}. ${toError(error).message}`\n );\n }\n}\n\nfunction resolveSwissEphRuntimeAssetsInternal(\n options: ResolveSwissEphRuntimeAssetsInternalOptions = {}\n): SwissEphRuntimeAssetPaths {\n const isBrowser =\n options.isBrowser ?? typeof window !== \"undefined\";\n\n if (isBrowser) {\n const bundledAssets = getBundledBrowserSwissEphAssets(options);\n return {\n wasmPath: options.wasmPath ?? bundledAssets.wasmPath,\n ephePath: options.ephePath ?? bundledAssets.ephePath,\n wasmPathSource: options.wasmPath ? \"explicit\" : \"bundled\",\n ephePathSource: options.ephePath ? \"explicit\" : \"bundled\"\n };\n }\n\n const env = getRuntimeEnv(options.env);\n const existsSync =\n options.existsSync ??\n ((path: string) =>\n (require(\"fs\") as typeof import(\"fs\")).existsSync(path));\n const bundledAssets = getBundledNodeSwissEphAssets(options);\n const envWasmPath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_WASM_ENV_KEYS);\n const envEphePath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_EPHE_ENV_KEYS);\n const resolvedWasm = resolveRuntimeAssetPath(\n \"wasmPath\",\n options.wasmPath,\n envWasmPath,\n options.wasmPathCandidates ?? [],\n bundledAssets.wasmPaths,\n existsSync\n );\n const resolvedEphe = resolveRuntimeAssetPath(\n \"ephePath\",\n options.ephePath,\n envEphePath,\n options.ephePathCandidates ?? [],\n bundledAssets.ephePaths,\n existsSync\n );\n\n return {\n wasmPath: resolvedWasm.path,\n ephePath: resolvedEphe.path,\n wasmPathSource: resolvedWasm.source,\n ephePathSource: resolvedEphe.source\n };\n}\n\nexport function resolveSwissEphRuntimeAssets(\n options: ResolveSwissEphRuntimeAssetsOptions = {}\n): SwissEphRuntimeAssetPaths {\n return resolveSwissEphRuntimeAssetsInternal(options);\n}\n\nfunction normalizeVirtualPath(path: string): string {\n if (path === \"/\") {\n return path;\n }\n\n return path.replace(/\\/+$/, \"\") || \"/\";\n}\n\nfunction joinVirtualPath(rootPath: string, leaf: string): string {\n const normalizedRoot = normalizeVirtualPath(rootPath);\n return normalizedRoot === \"/\" ? `/${leaf}` : `${normalizedRoot}/${leaf}`;\n}\n\nfunction ensureVirtualDir(fs: EmscriptenFs, path: string): void {\n try {\n fs.mkdir(path);\n } catch {\n // Ignore existing directories and readonly mount roots.\n }\n}\n\nfunction safeAnalyzePath(fs: EmscriptenFs, path: string): boolean | null {\n if (!fs.analyzePath) {\n return null;\n }\n\n try {\n return fs.analyzePath(path).exists === true;\n } catch {\n return false;\n }\n}\n\nfunction safeReaddir(fs: EmscriptenFs, path: string): string[] {\n if (!fs.readdir) {\n return [];\n }\n\n try {\n return fs.readdir(path).filter((entry) => entry !== \".\" && entry !== \"..\");\n } catch {\n return [];\n }\n}\n\nexport function inspectVirtualEphemerisPath(\n fs: EmscriptenFs | undefined,\n rootPath: string,\n requiredFiles: readonly string[] = REQUIRED_EPHE_FILES\n): VirtualEphemerisCheck {\n if (!fs) {\n return {\n rootExists: null,\n visibleEntries: [],\n missingFiles: [...requiredFiles],\n };\n }\n\n const rootExists = safeAnalyzePath(fs, rootPath);\n const visibleEntries = safeReaddir(fs, rootPath);\n const missingFiles = requiredFiles.filter((file) => {\n const filePath = joinVirtualPath(rootPath, file);\n return !visibleEntries.includes(file) && safeAnalyzePath(fs, filePath) !== true;\n });\n\n return {\n rootExists,\n visibleEntries,\n missingFiles,\n };\n}\n\nfunction formatVirtualPathCheck(label: string, path: string, check: VirtualEphemerisCheck | null): string {\n if (!check) {\n return `${label} \"${path}\" could not be inspected.`;\n }\n\n const exists = check.rootExists == null ? \"unknown\" : check.rootExists ? \"yes\" : \"no\";\n const visibleEntries = check.visibleEntries.length > 0 ? check.visibleEntries.join(\", \") : \"(none)\";\n const missingFiles = check.missingFiles.length > 0 ? check.missingFiles.join(\", \") : \"(none)\";\n\n return `${label} \"${path}\" exists: ${exists}; visible entries: ${visibleEntries}; missing required files: ${missingFiles}.`;\n}\n\nfunction normalizeHostFileData(data: Uint8Array): Uint8Array {\n return data instanceof Uint8Array ? data : new Uint8Array(data);\n}\n\nfunction loadHostEphemerisFiles(\n ephePath: string,\n requiredFiles: readonly string[],\n nodeFs: NodeFsLike,\n pathModule: PathModuleLike\n): Map<string, Uint8Array> {\n const files = new Map<string, Uint8Array>();\n\n for (const file of requiredFiles) {\n files.set(file, normalizeHostFileData(nodeFs.readFileSync(pathModule.join(ephePath, file))));\n }\n\n return files;\n}\n\nfunction writeEphemerisFilesToMemfs(\n fs: EmscriptenFs,\n targetPath: string,\n files: Map<string, Uint8Array>\n): void {\n ensureVirtualDir(fs, targetPath);\n\n for (const [fileName, fileData] of files.entries()) {\n fs.writeFile(joinVirtualPath(targetPath, fileName), fileData);\n }\n}\n\nfunction toError(err: unknown): Error {\n return err instanceof Error ? err : new Error(String(err));\n}\n\nfunction buildEphemerisResolutionError(\n finalEphePath: string,\n requiredFiles: readonly string[],\n details: {\n mountAttempted: boolean;\n mountPoint: string;\n mountCheck: VirtualEphemerisCheck | null;\n mountError: Error | null;\n hostCheck: VirtualEphemerisCheck | null;\n memfsPath: string;\n memfsCheck: VirtualEphemerisCheck | null;\n hostReadError: Error | null;\n }\n): string {\n const parts = [\n `Unable to resolve Swiss Ephemeris data files. Expected ${requiredFiles.join(\", \")} under \"${finalEphePath}\".`,\n ];\n\n if (details.mountAttempted) {\n parts.push(\n `${formatVirtualPathCheck(\"Mounted ephemeris path\", details.mountPoint, details.mountCheck)} The NODEFS mount may have failed silently.`\n );\n }\n\n if (details.mountError) {\n parts.push(`Mounting the ephemeris directory failed: ${details.mountError.message}.`);\n }\n\n parts.push(formatVirtualPathCheck(\"Direct host ephemeris path\", finalEphePath, details.hostCheck));\n\n if (details.memfsCheck) {\n parts.push(formatVirtualPathCheck(\"MEMFS ephemeris copy\", details.memfsPath, details.memfsCheck));\n }\n\n if (details.hostReadError) {\n parts.push(`Reading host ephemeris files failed: ${details.hostReadError.message}.`);\n }\n\n parts.push(\n `Pass an explicit ephePath that contains ${requiredFiles.join(\", \")} or ensure the packaged ephemeris directory is readable.`\n );\n\n return parts.join(\" \");\n}\n\nexport function resolveNodeEphemerisPath(\n module: SwissEphModule,\n finalEphePath: string,\n options: ResolveNodeEphemerisPathOptions = {}\n): ResolvedNodeEphemerisPath {\n const fs = module.FS;\n const requiredFiles = options.requiredFiles ?? REQUIRED_EPHE_FILES;\n const mountPoint = options.mountPoint ?? NODE_EPHE_MOUNT_POINT;\n const memfsPath = options.memfsPath ?? NODE_EPHE_MEMFS_PATH;\n const nodeFs = options.nodeFs ?? (require(\"fs\") as NodeFsLike);\n const pathModule = options.pathModule ?? (require(\"path\") as PathModuleLike);\n\n let mountAttempted = false;\n let mountCheck: VirtualEphemerisCheck | null = null;\n let mountError: Error | null = null;\n let hostCheck: VirtualEphemerisCheck | null = null;\n let memfsCheck: VirtualEphemerisCheck | null = null;\n let hostReadError: Error | null = null;\n\n if (fs?.mount && fs.filesystems?.NODEFS) {\n mountAttempted = true;\n ensureVirtualDir(fs, mountPoint);\n\n try {\n fs.mount(fs.filesystems.NODEFS, { root: finalEphePath }, mountPoint);\n mountCheck = inspectVirtualEphemerisPath(fs, mountPoint, requiredFiles);\n\n if (mountCheck.missingFiles.length === 0) {\n return { path: mountPoint, strategy: \"nodefs-mount\" };\n }\n } catch (mountErr) {\n mountError = toError(mountErr);\n }\n }\n\n hostCheck = inspectVirtualEphemerisPath(fs, finalEphePath, requiredFiles);\n if (fs && hostCheck.missingFiles.length === 0) {\n return { path: finalEphePath, strategy: \"host-path\" };\n }\n\n let hostFiles: Map<string, Uint8Array> | null = null;\n try {\n hostFiles = loadHostEphemerisFiles(finalEphePath, requiredFiles, nodeFs, pathModule);\n } catch (err) {\n hostReadError = toError(err);\n }\n\n if (hostFiles && fs?.writeFile) {\n writeEphemerisFilesToMemfs(fs, memfsPath, hostFiles);\n memfsCheck = inspectVirtualEphemerisPath(fs, memfsPath, requiredFiles);\n\n if (memfsCheck.missingFiles.length === 0) {\n return { path: memfsPath, strategy: \"memfs-copy\" };\n }\n }\n\n if (hostFiles) {\n return { path: finalEphePath, strategy: \"host-path\" };\n }\n\n throw new Error(\n buildEphemerisResolutionError(finalEphePath, requiredFiles, {\n mountAttempted,\n mountPoint,\n mountCheck,\n mountError,\n hostCheck,\n memfsPath,\n memfsCheck,\n hostReadError,\n })\n );\n}\n\n/**\n * Initializes and returns the Swiss Ephemeris instance.\n * In a browser environment, assets are loaded relative to the script.\n * In Node.js, assets are loaded from the package's 'dist' directory.\n * @param options - Optional overrides for asset paths.\n * @param options.ephePath - Path to the directory containing ephemeris data files.\n * @param options.wasmPath - Path to the `swisseph.wasm` file.\n * @param options.onRuntimeNotice - Optional sink for path setup notices; defaults to stderr.\n */\nexport async function getSwissEph(\n options: { ephePath?: string; wasmPath?: string; onRuntimeNotice?: (message: string) => void } = {}\n): Promise<void> {\n if (swissEph) {\n return;\n }\n\n const notice = options.onRuntimeNotice ?? emitRuntimeNotice;\n try {\n const isBrowser = typeof window !== \"undefined\";\n const runtimeAssets = resolveSwissEphRuntimeAssets({\n wasmPath: options.wasmPath,\n ephePath: options.ephePath\n });\n const finalWasmPath = runtimeAssets.wasmPath;\n\n const moduleFactory: SwissEphModuleFactory = isBrowser\n ? (await import(\"../../wasm/build/swisseph.web.js\")).default as unknown as SwissEphModuleFactory\n : (await import(\"../../wasm/build/swisseph.node.js\")).default as unknown as SwissEphModuleFactory;\n\n const module = await moduleFactory({\n locateFile: () => finalWasmPath,\n });\n\n const instance = new SwissEph(module);\n\n const finalEphePath = runtimeAssets.ephePath;\n\n if (isBrowser) {\n // In the browser, synchronously fetch and write ephemeris files into MEMFS\n const epheFsPath = \"/ephe\";\n try {\n module.FS?.mkdir?.(epheFsPath);\n } catch {\n // ignore if exists\n }\n const files = [\"seas_18.se1\", \"semo_18.se1\", \"sepl_18.se1\"];\n await Promise.all(\n files.map(async (name) => {\n const url = `${finalEphePath}/${name}`;\n const res = await fetch(url);\n if (!res.ok) {\n throw new Error(`Failed to fetch ephemeris file: ${url}`);\n }\n const buf = await res.arrayBuffer();\n module.FS?.writeFile?.(\n `${epheFsPath}/${name}`,\n new Uint8Array(buf)\n );\n })\n );\n const browserCheck = inspectVirtualEphemerisPath(module.FS, epheFsPath, REQUIRED_EPHE_FILES);\n if (browserCheck.missingFiles.length > 0) {\n throw new Error(\n `Failed to materialize browser ephemeris files at \"${epheFsPath}\". Missing: ${browserCheck.missingFiles.join(\", \")}.`\n );\n }\n notice(`Setting ephemeris path to: ${epheFsPath}`);\n instance.setEphemerisPath(epheFsPath);\n } else {\n const resolution = resolveNodeEphemerisPath(module, finalEphePath);\n if (resolution.strategy === \"nodefs-mount\") {\n notice(`Setting ephemeris path to: ${resolution.path} (mounted from ${finalEphePath})`);\n } else if (resolution.strategy === \"memfs-copy\") {\n notice(`Setting ephemeris path to: ${resolution.path} (copied from ${finalEphePath})`);\n } else {\n notice(`Setting ephemeris path to: ${resolution.path}`);\n }\n instance.setEphemerisPath(resolution.path);\n }\n\n swissEph = instance;\n } catch (error) {\n console.error(\"Error initializing Swiss Ephemeris:\", error);\n throw error;\n }\n}\n\n/**\n * Calculate planetary positions for a given date\n */\n/**\n * Calculate the position of a single planet by its enum ID.\n * Much cheaper than calculatePlanetaryPositions when only one body is needed.\n */\nexport function calculateSinglePlanetPosition(\n date: Date,\n planet: Planet\n): PlanetPosition {\n checkInitialization();\n const julday = swissEph!.getJulianDay(date);\n return swissEph!.calculatePlanetPosition(julday, planet, DEFAULT_FLAGS);\n}\n\n/**\n * Calculate equatorial coordinates (Right Ascension / Declination) for a planet.\n * Uses the existing EQUATORIAL flag — RA is returned in the longitude field,\n * Dec in the latitude field by Swiss Ephemeris convention.\n */\nexport interface EquatorialPosition {\n rightAscension: number;\n declination: number;\n distance: number;\n}\n\nexport function calculateEquatorialPosition(\n date: Date,\n planet: Planet\n): EquatorialPosition {\n checkInitialization();\n const julday = swissEph!.getJulianDay(date);\n const pos = swissEph!.calculatePlanetPosition(\n julday,\n planet,\n CalcFlag.SWISS_EPH | CalcFlag.EQUATORIAL\n );\n return {\n rightAscension: pos.longitude,\n declination: pos.latitude,\n distance: pos.distance,\n };\n}\n\n/**\n * Get the Julian day for a Date (UTC).\n */\nexport function getJulianDay(date: Date): number {\n checkInitialization();\n return swissEph!.getJulianDay(date);\n}\n\n/**\n * Find the next rise, set, or meridian transit of a planet at a location.\n * Returns the Julian day of the event.\n */\nexport function calculateRiseTransit(\n date: Date,\n planet: Planet,\n latitude: number,\n longitude: number,\n event: RiseTransitFlag\n): number {\n checkInitialization();\n const julday = swissEph!.getJulianDay(date);\n return swissEph!.riseTransit(julday, planet, event, longitude, latitude);\n}\n\n/**\n * Convert ecliptic coordinates to horizon coordinates (azimuth/altitude).\n */\nexport function calculateAzalt(\n date: Date,\n latitude: number,\n longitude: number,\n eclLon: number,\n eclLat: number,\n dist: number\n): AzaltResult {\n checkInitialization();\n const julday = swissEph!.getJulianDay(date);\n return swissEph!.azalt(julday, longitude, latitude, 0, eclLon, eclLat, dist);\n}\n\nexport async function calculatePlanetaryPositions(\n date: Date\n): Promise<Record<Planet, PlanetPosition>> {\n try {\n checkInitialization();\n\n const julday = swissEph!.getJulianDay(date);\n const flags = DEFAULT_FLAGS;\n const planets: Record<string, Planet> = {\n sun: Planet.SUN,\n moon: Planet.MOON,\n mercury: Planet.MERCURY,\n venus: Planet.VENUS,\n mars: Planet.MARS,\n jupiter: Planet.JUPITER,\n saturn: Planet.SATURN,\n uranus: Planet.URANUS,\n neptune: Planet.NEPTUNE,\n pluto: Planet.PLUTO,\n meanNode: Planet.MEAN_NODE,\n trueNode: Planet.TRUE_NODE,\n chiron: Planet.CHIRON,\n lilithMean: Planet.LILITH_MEAN,\n lilithTrue: Planet.LILITH_TRUE,\n };\n\n const positions: Record<Planet, PlanetPosition> = {} as Record<\n Planet,\n PlanetPosition\n >;\n for (const id of Object.values(planets)) {\n try {\n positions[id] = swissEph!.calculatePlanetPosition(julday, id, flags);\n } catch (error) {\n throw new Error(\n `Failed to calculate position for ${PLANET_AND_NODE_NAMES[id]}: ${error}`\n );\n }\n }\n\n return positions;\n } catch (error) {\n console.error(\"Error calculating planetary positions:\", error);\n throw error;\n }\n}\n\n/**\n * Calculate houses for a given date and location\n */\nexport async function calculateHouses(\n date: Date | LocalDateTimeParts,\n latitude: number,\n longitude: number,\n houseSystem: HouseSystem,\n options: TimeZoneOptions = {}\n): Promise<Houses> {\n try {\n checkInitialization();\n\n // Interpret the provided date as local civil time by default.\n // For backward compatibility, allow callers to treat the date as UT.\n const dateForUt =\n options.treatAsUTC === true\n ? (date instanceof Date ? date : createUtcDateFromParts(buildLocalParts(date)))\n : await localToUtcDate(date, latitude, longitude, options);\n\n const julday = swissEph!.getJulianDay(dateForUt);\n return swissEph!.calculateHouses(\n julday,\n latitude,\n longitude,\n houseSystem\n );\n } catch (error) {\n console.error(\"Error calculating houses:\", error);\n throw error;\n }\n}\n/**\n * Calculate an asteroid by MPC number\n */\nexport async function calculateAsteroidPosition(\n date: Date,\n mpcNumber: number\n): Promise<PlanetPosition> {\n try {\n checkInitialization();\n\n const julday = swissEph!.getJulianDay(date);\n return swissEph!.calculateAsteroidPosition(\n julday,\n mpcNumber,\n DEFAULT_FLAGS\n );\n } catch (error) {\n console.error(\"Error calculating asteroid:\", error);\n throw error;\n }\n}\n\n/**\n * Fortune part utility (requires Asc, Sun, Moon and diurnal/nocturnal)\n * diurnal: Asc + Moon - Sun ; nocturnal: Asc + Sun - Moon\n */\nexport function calcParsFortunae(\n asc: number,\n sunLon: number,\n moonLon: number,\n isDiurnal: boolean\n): number {\n return parsFortunae(asc, sunLon, moonLon, isDiurnal);\n}\n\n/**\n * Clean up Swiss Ephemeris resources\n */\nexport function closeSwissEph(): void {\n if (swissEph) {\n try {\n swissEph.close();\n swissEph = null;\n } catch (error) {\n console.error(\"Error closing Swiss Ephemeris:\", error);\n throw error;\n }\n }\n}\n\nfunction checkInitialization(): void {\n if (!swissEph) {\n throw new Error(\n \"Swiss Ephemeris not initialized. Call getSwissEph() first.\"\n );\n }\n}\n\n// Re-export types and enums for convenience\nexport {\n type AzaltResult,\n CalcFlag,\n HouseSystem,\n normalizeAngle,\n Planet,\n PLANET_AND_NODE_NAMES,\n PlanetPosition,\n RiseTransitFlag,\n VirtualNodes\n};\n\n/**\n * Local civil time handling (DST-aware)\n * Convert a local date-time (given via IANA time zone, explicit UTC offset, or auto from lat/lon)\n * into a UTC Date for Swiss Ephemeris (which expects UT).\n */\nexport interface LocalDateTimeParts {\n year: number;\n month: number; // 1-12\n day: number; // 1-31\n hour?: number; // 0-23\n minute?: number; // 0-59\n second?: number; // 0-59\n}\n\nexport type TimeZoneOptions = {\n /**\n * IANA time zone\n * If provided, DST is handled automatically via Intl API.\n */\n timeZone?: string;\n /**\n * Explicit UTC offset in minutes for the local civil time.\n * Positive for east of Greenwich, negative for west (e.g., -180 for UTC-3).\n * If provided, overrides timeZone.\n */\n utcOffsetMinutes?: number;\n /**\n * Optional resolver to derive an IANA time zone from coordinates and date.\n * Use an external library (e.g., tz-lookup) and pass it here.\n */\n resolveTimeZone?: (latitude: number, longitude: number, local: LocalDateTimeParts) => string | undefined;\n /**\n * When true (default), try to auto-resolve the IANA time zone from lat/lon using tz-lookup\n * if no explicit offset/timeZone is provided.\n */\n autoTimeZone?: boolean;\n /**\n * When true, the date is treated as UTC instead of local civil time.\n */\n treatAsUTC?: boolean;\n};\n\nfunction buildLocalParts(date: Date | LocalDateTimeParts): LocalDateTimeParts {\n if (date instanceof Date) {\n return {\n year: date.getFullYear(),\n month: date.getMonth() + 1,\n day: date.getDate(),\n hour: date.getHours(),\n minute: date.getMinutes(),\n second: date.getSeconds(),\n };\n }\n return date;\n}\n\nfunction createUtcDateFromParts(parts: LocalDateTimeParts): Date {\n const { year, month, day, hour = 0, minute = 0, second = 0 } = parts;\n return new Date(Date.UTC(year, month - 1, day, hour, minute, second));\n}\n\n/**\n * Compute the time zone offset (in ms) for a given instant and IANA time zone.\n * Based on the approach used by date-fns-tz.\n */\nfunction getTimeZoneOffsetMs(instant: Date, timeZone: string): number {\n const dtf = new Intl.DateTimeFormat(\"en-US\", {\n timeZone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hour12: false,\n });\n const parts = dtf.formatToParts(instant);\n const map: Record<string, string> = {};\n for (const p of parts) {\n map[p.type] = p.value;\n }\n const asUTC = Date.UTC(\n Number(map.year),\n Number(map.month) - 1,\n Number(map.day),\n Number(map.hour),\n Number(map.minute),\n Number(map.second)\n );\n return asUTC - instant.getTime();\n}\n\n/**\n * Convert a local civil date-time to a UTC Date using either an explicit offset,\n * an IANA time zone (DST-aware), a custom resolver, or auto lat/lon resolution.\n * If no time zone information can be derived, throws.\n */\nasync function localToUtcDate(\n local: Date | LocalDateTimeParts,\n latitude?: number,\n longitude?: number,\n opts: TimeZoneOptions = {}\n): Promise<Date> {\n // Treat the date as already UTC — no conversion needed\n if (opts.treatAsUTC === true) {\n return local instanceof Date ? local : createUtcDateFromParts(buildLocalParts(local));\n }\n\n const parts = buildLocalParts(local);\n const auto = opts.autoTimeZone !== false;\n\n // 1) Explicit offset takes precedence\n if (typeof opts.utcOffsetMinutes === \"number\" && Number.isFinite(opts.utcOffsetMinutes)) {\n const utcMs = Date.UTC(\n parts.year,\n parts.month - 1,\n parts.day,\n parts.hour ?? 0,\n parts.minute ?? 0,\n parts.second ?? 0\n );\n return new Date(utcMs - opts.utcOffsetMinutes * 60_000);\n }\n\n // 2) IANA time zone provided\n if (opts.timeZone) {\n const naiveUtc = createUtcDateFromParts(parts);\n const offsetMs = getTimeZoneOffsetMs(naiveUtc, opts.timeZone);\n return new Date(naiveUtc.getTime() - offsetMs);\n }\n\n // 3) Custom resolver\n if (\n opts.resolveTimeZone &&\n typeof latitude === \"number\" &&\n typeof longitude === \"number\"\n ) {\n const tz = opts.resolveTimeZone(latitude, longitude, parts);\n if (tz) {\n const naiveUtc = createUtcDateFromParts(parts);\n const offsetMs = getTimeZoneOffsetMs(naiveUtc, tz);\n return new Date(naiveUtc.getTime() - offsetMs);\n }\n }\n\n // 4) Auto resolve with tz-lookup if allowed and coords available\n if (\n auto &&\n typeof latitude === \"number\" &&\n typeof longitude === \"number\"\n ) {\n\n const mod = await import(\"tz-lookup\");\n const lookup = mod.default ?? mod;\n const tz = lookup(latitude, longitude);\n if (tz) {\n const naiveUtc = createUtcDateFromParts(parts);\n const offsetMs = getTimeZoneOffsetMs(naiveUtc, tz);\n return new Date(naiveUtc.getTime() - offsetMs);\n }\n }\n\n throw new Error(\n \"Time zone information is required. Provide 'utcOffsetMinutes', 'timeZone', 'resolveTimeZone', or enable autoTimeZone with latitude/longitude.\"\n );\n}\n\n/**\n * Public helper to convert a local civil date-time to a UTC Date using the same\n * logic as house calculations.\n */\nexport async function toUtcDate(\n local: Date | LocalDateTimeParts,\n latitude?: number,\n longitude?: number,\n options: TimeZoneOptions = {}\n): Promise<Date> {\n return localToUtcDate(local, latitude, longitude, options);\n}\n","/**\n * Astro*Carto*Graphy (ACG) — locational astrology.\n *\n * Computes where each planet falls on the four angles (MC, IC, AC, DC)\n * across the globe, and queries a specific location for nearby lines\n * and paran crossings.\n *\n * MC/IC lines are pure math (GMST − RA). AC/DC lines require a latitude\n * sweep solving cos(H) = −tan(φ)·tan(δ).\n */\n\nimport {\n calculateEquatorialPosition,\n type EquatorialPosition,\n getJulianDay,\n normalizeAngle,\n Planet,\n PLANET_AND_NODE_NAMES,\n} from \"./swisseph\";\n\n// ─── Types ──────────────────────────────────────────────────────────────\n\nexport type AngleType = \"MC\" | \"IC\" | \"AC\" | \"DC\";\n\nexport interface AstrocartographyLineProximity {\n planet: string;\n angle: AngleType;\n /** Degrees of longitude separation (always positive, 0-180). */\n distance: number;\n /** True when distance ≤ orb. */\n active: boolean;\n /** The line's geographic longitude at the query latitude (-180..180). */\n longitude: number;\n}\n\nexport interface AstrocartographyParan {\n latitude: number;\n planetA: string;\n angleA: AngleType;\n longitudeA: number;\n planetB: string;\n angleB: AngleType;\n longitudeB: number;\n}\n\nexport interface AstrocartographyQueryResult {\n queryLatitude: number;\n queryLongitude: number;\n orb: number;\n lines: AstrocartographyLineProximity[];\n activeLines: AstrocartographyLineProximity[];\n parans: AstrocartographyParan[];\n}\n\nexport interface AstrocartographyMeridianLine {\n planet: string;\n angle: \"MC\" | \"IC\";\n /** Geographic longitude (-180..180). */\n longitude: number;\n}\n\nexport interface AstrocartographyHorizonPoint {\n latitude: number;\n longitude: number;\n}\n\nexport interface AstrocartographyHorizonLine {\n planet: string;\n angle: \"AC\" | \"DC\";\n points: AstrocartographyHorizonPoint[];\n}\n\nexport interface AstrocartographyMap {\n meridianLines: AstrocartographyMeridianLine[];\n horizonLines: AstrocartographyHorizonLine[];\n}\n\nexport interface AstrocartographyMapOptions {\n /** Degrees between latitude sample points (default 1). */\n latitudeStep?: number;\n /** Maximum latitude to sweep (default 66.5). */\n latitudeRange?: number;\n /** Planets to include (default: ASTROCARTOGRAPHY_DEFAULT_PLANETS). */\n planets?: Planet[];\n}\n\nexport interface AstrocartographyQueryOptions {\n latitude: number;\n longitude: number;\n /** Orb in degrees (default 2). */\n orb?: number;\n /** Planets to include (default: ASTROCARTOGRAPHY_DEFAULT_PLANETS). */\n planets?: Planet[];\n /** Paran orb in degrees (default 1). */\n paranOrb?: number;\n}\n\n// ─── Constants ──────────────────────────────────────────────────────────\n\n/** Default planet set for ACG (traditional + modern, no Lilith). */\nexport const ASTROCARTOGRAPHY_DEFAULT_PLANETS: Planet[] = [\n Planet.SUN,\n Planet.MOON,\n Planet.MERCURY,\n Planet.VENUS,\n Planet.MARS,\n Planet.JUPITER,\n Planet.SATURN,\n Planet.URANUS,\n Planet.NEPTUNE,\n Planet.PLUTO,\n Planet.CHIRON,\n Planet.TRUE_NODE,\n];\n\nconst DEG = Math.PI / 180;\n\n// ─── Pure math ──────────────────────────────────────────────────────────\n\n/**\n * Greenwich Mean Sidereal Time from Julian Day (degrees, 0-360).\n */\nexport function computeGMST(julianDay: number): number {\n return normalizeAngle(\n 280.46061837 + 360.98564736629 * (julianDay - 2451545.0)\n );\n}\n\n/**\n * Geographic longitude where a planet's MC line falls.\n * Returns value in -180..180.\n */\nexport function computeMCLongitude(gmst: number, ra: number): number {\n return toGeoLon(normalizeAngle(gmst - ra));\n}\n\n/**\n * Geographic longitude where a planet's IC line falls (opposite MC).\n */\nexport function computeICLongitude(gmst: number, ra: number): number {\n return toGeoLon(normalizeAngle(gmst - ra + 180));\n}\n\n/**\n * Geographic longitude where a planet rises (AC) or sets (DC)\n * at a given geographic latitude.\n *\n * Returns null if the planet is circumpolar or never rises at this latitude.\n */\nexport function computeHorizonLongitude(\n gmst: number,\n ra: number,\n dec: number,\n latitude: number,\n angle: \"AC\" | \"DC\"\n): number | null {\n const tanPhi = Math.tan(latitude * DEG);\n const tanDelta = Math.tan(dec * DEG);\n const cosH = -(tanPhi * tanDelta);\n\n // Circumpolar or never visible\n if (Math.abs(cosH) > 1) return null;\n\n const H = Math.acos(cosH) / DEG; // hour angle in degrees\n\n // AC (rising) = east of meridian = negative hour angle\n // DC (setting) = west of meridian = positive hour angle\n const lon =\n angle === \"AC\"\n ? normalizeAngle(gmst - ra - H)\n : normalizeAngle(gmst - ra + H);\n\n return toGeoLon(lon);\n}\n\n/**\n * Shortest angular distance between two geographic longitudes.\n * Returns 0..180.\n */\nexport function geographicAngularDifference(a: number, b: number): number {\n const d = normalizeAngle(a - b);\n return d > 180 ? 360 - d : d;\n}\n\n/**\n * Convert 0..360 ecliptic-style longitude to -180..180 geographic longitude.\n * 0-180 → 0 to 180 (east), 180-360 → -180 to 0 (west).\n */\nfunction toGeoLon(deg360: number): number {\n const n = normalizeAngle(deg360);\n return n > 180 ? n - 360 : n;\n}\n\n// ─── Equatorial position helpers ────────────────────────────────────────\n\nexport interface PlanetEquatorial {\n ra: number;\n dec: number;\n planetId: Planet;\n}\n\n/**\n * Compute equatorial positions (RA/Dec) for a set of planets at a UTC date.\n */\nexport function computeEquatorialPositions(\n date: Date,\n planets: Planet[] = ASTROCARTOGRAPHY_DEFAULT_PLANETS\n): Record<string, PlanetEquatorial> {\n const result: Record<string, PlanetEquatorial> = {};\n for (const p of planets) {\n const name = PLANET_AND_NODE_NAMES[p];\n const eq = calculateEquatorialPosition(date, p);\n result[name] = {\n ra: eq.rightAscension,\n dec: eq.declination,\n planetId: p,\n };\n }\n return result;\n}\n\n// ─── Paran detection ────────────────────────────────────────────────────\n\n/**\n * Find paran crossings at a given latitude.\n *\n * A paran exists when two different planet's angle-lines\n * pass through the same latitude within `paranOrb` degrees of longitude.\n */\nexport function findParansAtLatitude(\n equatorialPositions: Record<string, PlanetEquatorial>,\n gmst: number,\n latitude: number,\n paranOrb = 1\n): AstrocartographyParan[] {\n const ANGLES: AngleType[] = [\"MC\", \"IC\", \"AC\", \"DC\"];\n\n // Build all lines at this latitude\n interface LineAt {\n planet: string;\n angle: AngleType;\n longitude: number;\n }\n const lines: LineAt[] = [];\n\n for (const [name, eq] of Object.entries(equatorialPositions)) {\n for (const angle of ANGLES) {\n let lon: number | null;\n if (angle === \"MC\") lon = computeMCLongitude(gmst, eq.ra);\n else if (angle === \"IC\") lon = computeICLongitude(gmst, eq.ra);\n else lon = computeHorizonLongitude(gmst, eq.ra, eq.dec, latitude, angle);\n\n if (lon !== null) {\n lines.push({ planet: name, angle, longitude: lon });\n }\n }\n }\n\n // Compare all pairs from different planets\n const parans: AstrocartographyParan[] = [];\n for (let i = 0; i < lines.length; i++) {\n for (let j = i + 1; j < lines.length; j++) {\n const a = lines[i];\n const b = lines[j];\n if (a.planet === b.planet) continue; // same planet, skip\n if (a.angle === b.angle) continue; // same angle type, skip (not a crossing)\n\n const dist = geographicAngularDifference(a.longitude, b.longitude);\n if (dist <= paranOrb) {\n parans.push({\n latitude,\n planetA: a.planet,\n angleA: a.angle,\n longitudeA: a.longitude,\n planetB: b.planet,\n angleB: b.angle,\n longitudeB: b.longitude,\n });\n }\n }\n }\n return parans;\n}\n\n// ─── Query function (primary API) ───────────────────────────────────────\n\n/**\n * Query a specific location against a birth chart's ACG lines.\n *\n * Returns how close each planet's angle line is to the query location,\n * which lines are \"active\" (within orb), and paran crossings at the\n * query latitude.\n */\nexport function queryAstrocartographyLocation(\n date: Date,\n options: AstrocartographyQueryOptions\n): AstrocartographyQueryResult {\n const {\n latitude,\n longitude,\n orb = 2,\n planets = ASTROCARTOGRAPHY_DEFAULT_PLANETS,\n paranOrb = 1,\n } = options;\n\n const jd = getJulianDay(date);\n const gmst = computeGMST(jd);\n const positions = computeEquatorialPositions(date, planets);\n\n const lines: AstrocartographyLineProximity[] = [];\n const ANGLES: AngleType[] = [\"MC\", \"IC\", \"AC\", \"DC\"];\n\n for (const [name, eq] of Object.entries(positions)) {\n for (const angle of ANGLES) {\n let lineLon: number | null;\n if (angle === \"MC\") lineLon = computeMCLongitude(gmst, eq.ra);\n else if (angle === \"IC\") lineLon = computeICLongitude(gmst, eq.ra);\n else\n lineLon = computeHorizonLongitude(\n gmst,\n eq.ra,\n eq.dec,\n latitude,\n angle\n );\n\n if (lineLon === null) continue; // circumpolar, no line at this latitude\n\n const dist = geographicAngularDifference(longitude, lineLon);\n lines.push({\n planet: name,\n angle,\n distance: Math.round(dist * 1000) / 1000,\n active: dist <= orb,\n longitude: Math.round(lineLon * 1000) / 1000,\n });\n }\n }\n\n // Sort by distance ascending\n lines.sort((a, b) => a.distance - b.distance);\n\n const activeLines = lines.filter((l) => l.active);\n const parans = findParansAtLatitude(positions, gmst, latitude, paranOrb);\n\n return { queryLatitude: latitude, queryLongitude: longitude, orb, lines, activeLines, parans };\n}\n\n// ─── Full map generation ────────────────────────────────────────────────\n\n/**\n * Generate the full ACG map: MC/IC lines (constant longitudes) and\n * AC/DC lines (arrays of lat/lon points from a latitude sweep).\n */\nexport function computeAstrocartographyMap(\n date: Date,\n options: AstrocartographyMapOptions = {}\n): AstrocartographyMap {\n const {\n latitudeStep = 1,\n latitudeRange = 66.5,\n planets = ASTROCARTOGRAPHY_DEFAULT_PLANETS,\n } = options;\n\n const jd = getJulianDay(date);\n const gmst = computeGMST(jd);\n const positions = computeEquatorialPositions(date, planets);\n\n const meridianLines: AstrocartographyMeridianLine[] = [];\n const horizonLines: AstrocartographyHorizonLine[] = [];\n\n for (const [name, eq] of Object.entries(positions)) {\n // MC / IC — constant longitude lines\n meridianLines.push({\n planet: name,\n angle: \"MC\",\n longitude: Math.round(computeMCLongitude(gmst, eq.ra) * 1000) / 1000,\n });\n meridianLines.push({\n planet: name,\n angle: \"IC\",\n longitude: Math.round(computeICLongitude(gmst, eq.ra) * 1000) / 1000,\n });\n\n // AC / DC — sweep latitudes\n for (const angle of [\"AC\", \"DC\"] as const) {\n const points: AstrocartographyHorizonPoint[] = [];\n for (\n let lat = -latitudeRange;\n lat <= latitudeRange;\n lat += latitudeStep\n ) {\n const lon = computeHorizonLongitude(gmst, eq.ra, eq.dec, lat, angle);\n if (lon !== null) {\n points.push({\n latitude: Math.round(lat * 1000) / 1000,\n longitude: Math.round(lon * 1000) / 1000,\n });\n }\n }\n horizonLines.push({ planet: name, angle, points });\n }\n }\n\n return { meridianLines, horizonLines };\n}\n","import { normalizeAngle } from \"./swisseph\";\n\nexport type AspectName =\n | \"conjunction\"\n | \"duodecile\"\n | \"octile\"\n | \"sextile\"\n | \"square\"\n | \"trine\"\n | \"trioctile\"\n | \"quincunx\"\n | \"opposition\";\n\nexport interface AspectSpec {\n name: AspectName;\n angle: number;\n orb: number;\n}\n\nexport const DEFAULT_ASPECT_SPECS: AspectSpec[] = [\n { name: \"conjunction\", angle: 0, orb: 8 },\n { name: \"duodecile\", angle: 30, orb: 2 },\n { name: \"octile\", angle: 45, orb: 3 },\n { name: \"sextile\", angle: 60, orb: 5 },\n { name: \"square\", angle: 90, orb: 6 },\n { name: \"trine\", angle: 120, orb: 7 },\n { name: \"trioctile\", angle: 135, orb: 3 },\n { name: \"quincunx\", angle: 150, orb: 3 },\n { name: \"opposition\", angle: 180, orb: 8 },\n];\n\nexport interface AspectEdge {\n planetA: string;\n planetB: string;\n longitudeA: number;\n longitudeB: number;\n aspect: AspectName;\n aspectAngle: number;\n delta: number;\n orb: number;\n}\n\nexport function getAspectMatch(\n lonA: number,\n lonB: number,\n specs: AspectSpec[] = DEFAULT_ASPECT_SPECS\n): { spec: AspectSpec; orb: number; delta: number } | null {\n const a = normalizeAngle(lonA);\n const b = normalizeAngle(lonB);\n const delta = Math.min(\n normalizeAngle(b - a),\n normalizeAngle(a - b)\n );\n for (const spec of specs) {\n const orb = Math.abs(delta - spec.angle);\n if (orb <= spec.orb) {\n return { spec, orb, delta };\n }\n }\n return null;\n}\n\nexport function computeAspects(\n planets: Record<string, { longitude: number }>,\n specs: AspectSpec[] = DEFAULT_ASPECT_SPECS\n): AspectEdge[] {\n const keys = Object.keys(planets);\n const edges: AspectEdge[] = [];\n for (let i = 0; i < keys.length; i++) {\n for (let j = i + 1; j < keys.length; j++) {\n const a = planets[keys[i]];\n const b = planets[keys[j]];\n const match = getAspectMatch(a.longitude, b.longitude, specs);\n if (match) {\n edges.push({\n planetA: keys[i],\n planetB: keys[j],\n longitudeA: a.longitude,\n longitudeB: b.longitude,\n aspect: match.spec.name,\n aspectAngle: match.spec.angle,\n delta: match.delta,\n orb: match.orb,\n });\n }\n }\n }\n return edges;\n}\n\nexport function computeSynastryAspects(\n planetsA: Record<string, { longitude: number }>,\n planetsB: Record<string, { longitude: number }>,\n specs: AspectSpec[] = DEFAULT_ASPECT_SPECS\n): AspectEdge[] {\n const keysA = Object.keys(planetsA);\n const keysB = Object.keys(planetsB);\n const edges: AspectEdge[] = [];\n for (const kA of keysA) {\n for (const kB of keysB) {\n const a = planetsA[kA];\n const b = planetsB[kB];\n const match = getAspectMatch(a.longitude, b.longitude, specs);\n if (match) {\n edges.push({\n planetA: kA,\n planetB: kB,\n longitudeA: a.longitude,\n longitudeB: b.longitude,\n aspect: match.spec.name,\n aspectAngle: match.spec.angle,\n delta: match.delta,\n orb: match.orb,\n });\n }\n }\n }\n return edges;\n}\n\n/** Shorter-arc midpoint of two ecliptic longitudes. */\nexport function shorterArcMidpoint(a: number, b: number): number {\n let diff = b - a;\n if (diff > 180) diff -= 360;\n if (diff < -180) diff += 360;\n return normalizeAngle(a + diff / 2);\n}\n\nexport function computeMidpoints(\n planetsA: Record<string, { longitude: number }>,\n planetsB: Record<string, { longitude: number }>\n): Record<string, number> {\n const result: Record<string, number> = {};\n for (const key of Object.keys(planetsA)) {\n if (!(key in planetsB)) continue;\n result[key] = shorterArcMidpoint(planetsA[key].longitude, planetsB[key].longitude);\n }\n return result;\n}\n\n// ── Transit aspects ─────────────────────────────────────────────────────\n\nexport interface TransitAspectEdge extends AspectEdge {\n applying: boolean;\n retrograde: boolean;\n category: \"slow\" | \"fast\";\n}\n\nexport interface TransitAspectPoint {\n longitude: number;\n longitudeSpeed?: number;\n}\n\nexport const SLOW_PLANETS = new Set([\n \"pluto\", \"neptune\", \"uranus\", \"saturn\", \"jupiter\", \"chiron\",\n \"mean node\", \"true node\", \"lilith true\", \"lilith mean\",\n]);\n\n// Deferred transit features (future releases):\n// - Theme tagging: planet-pair -> archetypal theme (Mars-Pluto = POWER, Neptune-Mercury = DECEPTION, etc.)\n// - Ingress detection: transit planet crossing natal house cusp boundaries\n// - Multi-pass tracking: 3-hit retrograde patterns (direct, retrograde, direct exact dates)\n// - Secondary progressions (--progressed flag)\n// - Arabic parts / fixed stars / eclipses as transit targets\n// - Batch mode: multiple natal charts in one invocation\n\n/**\n * Compute transit-to-natal aspects with applying/separating, retrograde, and speed category.\n *\n * planetA = transit planet, planetB = natal planet/point.\n */\nexport function computeTransitAspects(\n transitPlanets: Record<string, TransitAspectPoint>,\n natalPlanets: Record<string, TransitAspectPoint>,\n specs: AspectSpec[] = DEFAULT_ASPECT_SPECS\n): TransitAspectEdge[] {\n const keysT = Object.keys(transitPlanets);\n const keysN = Object.keys(natalPlanets);\n const edges: TransitAspectEdge[] = [];\n\n for (const kT of keysT) {\n const t = transitPlanets[kT];\n for (const kN of keysN) {\n const n = natalPlanets[kN];\n const match = getAspectMatch(t.longitude, n.longitude, specs);\n if (!match) continue;\n\n const tSpeed = t.longitudeSpeed ?? 0;\n const nSpeed = n.longitudeSpeed ?? 0;\n\n // Epsilon projection: check if orb is decreasing (applying) or increasing (separating)\n const dt = 0.01; // ~14 minutes\n const tLonFuture = t.longitude + tSpeed * dt;\n const nLonFuture = n.longitude + nSpeed * dt;\n const futureMatch = getAspectMatch(tLonFuture, nLonFuture, [match.spec]);\n const applying = futureMatch != null ? futureMatch.orb < match.orb : false;\n\n edges.push({\n planetA: kT,\n planetB: kN,\n longitudeA: t.longitude,\n longitudeB: n.longitude,\n aspect: match.spec.name,\n aspectAngle: match.spec.angle,\n delta: match.delta,\n orb: match.orb,\n applying,\n retrograde: tSpeed < 0,\n category: SLOW_PLANETS.has(kT) ? \"slow\" : \"fast\",\n });\n }\n }\n return edges;\n}\n","/**\n * Essential Dignity Table — Traditional Hellenistic rulership data.\n * Pure math, no WASM dependency.\n */\n\nimport { SIGNS } from \"./index\";\n\nexport type Sign = (typeof SIGNS)[number];\n\nexport type TraditionalPlanet =\n | \"Sun\"\n | \"Moon\"\n | \"Mercury\"\n | \"Venus\"\n | \"Mars\"\n | \"Jupiter\"\n | \"Saturn\";\n\nexport interface EssentialDignityResult {\n domicile: boolean;\n exaltation: boolean;\n detriment: boolean;\n fall: boolean;\n domicileRuler: TraditionalPlanet;\n peregrine: boolean;\n}\n\nexport const DOMICILE_RULERS: Record<Sign, TraditionalPlanet> = {\n Aries: \"Mars\",\n Taurus: \"Venus\",\n Gemini: \"Mercury\",\n Cancer: \"Moon\",\n Leo: \"Sun\",\n Virgo: \"Mercury\",\n Libra: \"Venus\",\n Scorpio: \"Mars\",\n Sagittarius: \"Jupiter\",\n Capricorn: \"Saturn\",\n Aquarius: \"Saturn\",\n Pisces: \"Jupiter\",\n};\n\nexport const EXALTATIONS: Record<TraditionalPlanet, { sign: Sign; degree: number }> = {\n Sun: { sign: \"Aries\", degree: 19 },\n Moon: { sign: \"Taurus\", degree: 3 },\n Mercury: { sign: \"Virgo\", degree: 15 },\n Venus: { sign: \"Pisces\", degree: 27 },\n Mars: { sign: \"Capricorn\", degree: 28 },\n Jupiter: { sign: \"Cancer\", degree: 15 },\n Saturn: { sign: \"Libra\", degree: 21 },\n};\n\nexport function getDomicileRuler(sign: Sign): TraditionalPlanet {\n return DOMICILE_RULERS[sign];\n}\n\nexport function getExaltation(planet: TraditionalPlanet): { sign: Sign; degree: number } {\n return EXALTATIONS[planet];\n}\n\nexport function getOppositeSign(sign: Sign): Sign {\n const idx = SIGNS.indexOf(sign);\n return SIGNS[(idx + 6) % 12];\n}\n\n/** Signs where the planet is in detriment (opposite of its domicile signs). */\nexport function getDetriment(planet: TraditionalPlanet): Sign[] {\n const signs: Sign[] = [];\n for (const [sign, ruler] of Object.entries(DOMICILE_RULERS)) {\n if (ruler === planet) {\n signs.push(getOppositeSign(sign as Sign));\n }\n }\n return signs;\n}\n\n/** Sign where the planet is in fall (opposite of its exaltation sign). */\nexport function getFall(planet: TraditionalPlanet): Sign {\n return getOppositeSign(EXALTATIONS[planet].sign);\n}\n\nexport function getEssentialDignity(planet: TraditionalPlanet, sign: Sign): EssentialDignityResult {\n const domicile = DOMICILE_RULERS[sign] === planet;\n const exaltation = EXALTATIONS[planet].sign === sign;\n const detrimentSigns = getDetriment(planet);\n const detriment = detrimentSigns.includes(sign);\n const fallSign = getFall(planet);\n const fall = fallSign === sign;\n const domicileRuler = DOMICILE_RULERS[sign];\n const peregrine = !domicile && !exaltation && !detriment && !fall;\n\n return { domicile, exaltation, detriment, fall, domicileRuler, peregrine };\n}\n","{\n \"planetSigns\": {\n \"sun\": {\n \"Aries\": {\n \"pt\": \"você põe calor, entusiasmo e vontade nas suas iniciativas, com energia pra criar e abrir caminho. a liderança pode vir junto de impulsividade e obstinação, inclusive na tentativa de impor seu ponto de vista.\",\n \"en\": \"you bring warmth, enthusiasm and will to your initiatives, with energy to create and break new ground. leadership can come with impulsiveness and stubbornness, including attempts to impose your point of view.\",\n \"keywords\": {\n \"pt\": [\n \"iniciativa\",\n \"entusiasmo\",\n \"liderança\",\n \"impulsividade\"\n ],\n \"en\": [\n \"initiative\",\n \"enthusiasm\",\n \"leadership\",\n \"impulsiveness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 286,\n \"to\": 298\n }\n ],\n \"reviewNotes\": []\n },\n \"Taurus\": {\n \"pt\": \"você constrói com firmeza, paciência e reflexão, sustentando o que quer fazer com vontade e persistência. essa constância pode virar teimosia, e você também pode tender à inércia e à indiferença.\",\n \"en\": \"you build with steadiness, patience and reflection, sustaining what you want to do through will and persistence. that constancy can become stubbornness, and you can also tend toward inertia and indifference.\",\n \"keywords\": {\n \"pt\": [\n \"firmeza\",\n \"paciência\",\n \"reflexão\",\n \"teimosia\"\n ],\n \"en\": [\n \"steadiness\",\n \"patience\",\n \"reflection\",\n \"stubbornness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 310,\n \"to\": 317\n }\n ],\n \"reviewNotes\": []\n },\n \"Gemini\": {\n \"pt\": \"você se move pela curiosidade, pela troca e pelo gosto de raciocinar, com facilidade pra discernir, inventar e comunicar. a rotina e o tédio pesam, e a busca de experiências pode levar à dispersão, à superficialidade e ao afastamento das responsabilidades.\",\n \"en\": \"you are moved by curiosity, exchange and the pleasure of reasoning, with ease in discerning, inventing and communicating. routine and boredom weigh on you, and the search for experiences can lead to scattered attention, superficiality and avoidance of responsibilities.\",\n \"keywords\": {\n \"pt\": [\n \"curiosidade\",\n \"comunicação\",\n \"discernimento\",\n \"versatilidade\"\n ],\n \"en\": [\n \"curiosity\",\n \"communication\",\n \"discernment\",\n \"versatility\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 328,\n \"to\": 342\n }\n ],\n \"reviewNotes\": []\n },\n \"Cancer\": {\n \"pt\": \"você vive as coisas com sensibilidade, imaginação e uma reserva que pode conviver com a disposição de escutar e compreender. o conforto e a vida doméstica têm peso, mas o apego à família e ao passado pode se tornar excessivo.\",\n \"en\": \"you experience things with sensitivity, imagination and a reserve that can coexist with a willingness to listen and understand. comfort and home life carry weight, but attachment to family and the past can become excessive.\",\n \"keywords\": {\n \"pt\": [\n \"sensibilidade\",\n \"imaginação\",\n \"reserva\",\n \"vida doméstica\"\n ],\n \"en\": [\n \"sensitivity\",\n \"imagination\",\n \"reserve\",\n \"home life\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 356,\n \"to\": 370\n }\n ],\n \"reviewNotes\": []\n },\n \"Leo\": {\n \"pt\": \"você exterioriza ideias e sentimentos com calor e generosidade, buscando liderar, brilhar e ocupar uma posição de autoridade. essa autoridade pode vir com obstinação, vaidade e pouca percepção dos próprios defeitos, além da facilidade de se deixar levar pela bajulação.\",\n \"en\": \"you express ideas and feelings outwardly with warmth and generosity, seeking to lead, shine and hold a position of authority. that authority can come with stubbornness, vanity and little awareness of your own faults, as well as susceptibility to flattery.\",\n \"keywords\": {\n \"pt\": [\n \"expressão\",\n \"generosidade\",\n \"liderança\",\n \"reconhecimento\"\n ],\n \"en\": [\n \"expression\",\n \"generosity\",\n \"leadership\",\n \"recognition\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 377,\n \"to\": 379\n },\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 385,\n \"to\": 391\n }\n ],\n \"reviewNotes\": []\n },\n \"Virgo\": {\n \"pt\": \"você sente uma necessidade acentuada de se afirmar e conta com análise, observação e organização pra lidar com os detalhes. essa afirmação pode aumentar o egocentrismo, enquanto a atenção às minúcias pode dificultar a visão do todo e alimentar a crítica.\",\n \"en\": \"you feel a heightened need to assert yourself and draw on analysis, observation and organization to handle details. that self-assertion can increase self-centeredness, while attention to particulars can make it harder to see the whole and feed criticism.\",\n \"keywords\": {\n \"pt\": [\n \"afirmação\",\n \"análise\",\n \"organização\",\n \"minúcias\"\n ],\n \"en\": [\n \"self-assertion\",\n \"analysis\",\n \"organization\",\n \"particulars\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 402,\n \"to\": 403\n },\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 407,\n \"to\": 415\n }\n ],\n \"reviewNotes\": [\n \"Course OCR interleaves Virgo and Libra: Virgo uses 402-403 and 407-415; Libra 405-406 is excluded from this entry.\",\n \"Book 24375-24396 emphasizes service and modesty; course 402-403 explicitly emphasizes increased ego and self-assertion. Course emphasis is retained, not blended into the opposite claim.\"\n ]\n },\n \"Libra\": {\n \"pt\": \"você busca harmonia e conciliação, considerando os dois lados de uma questão e dando uma direção mais consciente aos impulsos sem perder o entusiasmo pela vida. essa disposição diplomática pode vir acompanhada de indecisão, embora a definição do que quer favoreça sua ação.\",\n \"en\": \"you seek harmony and reconciliation, considering both sides of an issue and giving impulses a more conscious direction while retaining enthusiasm for life. that diplomatic disposition can come with indecision, although defining what you want helps you act.\",\n \"keywords\": {\n \"pt\": [\n \"harmonia\",\n \"conciliação\",\n \"diplomacia\",\n \"indecisão\"\n ],\n \"en\": [\n \"harmony\",\n \"reconciliation\",\n \"diplomacy\",\n \"indecision\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 405,\n \"to\": 406\n },\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 420,\n \"to\": 425\n }\n ],\n \"reviewNotes\": []\n },\n \"Scorpio\": {\n \"pt\": \"você encontra mais facilidade pra se expressar e organizar sua força e agressividade, com vontade, persistência e gosto pela investigação. essa força mantém a resistência à autoridade e pode conviver com desconfiança e ciúme, mesmo quando você age com coragem e cautela.\",\n \"en\": \"you find greater ease in expressing yourself and organizing your strength and aggressiveness, with will, persistence and a taste for investigation. that strength retains resistance to authority and can coexist with suspicion and jealousy, even when you act with courage and caution.\",\n \"keywords\": {\n \"pt\": [\n \"vontade\",\n \"persistência\",\n \"investigação\",\n \"resistência à autoridade\"\n ],\n \"en\": [\n \"will\",\n \"persistence\",\n \"investigation\",\n \"resistance to authority\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 437,\n \"to\": 446\n }\n ],\n \"reviewNotes\": []\n },\n \"Sagittarius\": {\n \"pt\": \"você se expressa com calor e tende a centralizar as situações, valorizando a liberdade, a franqueza e o senso de justiça. o otimismo e a independência podem conviver com rebeldia, desperdício e dificuldade de receber críticas.\",\n \"en\": \"you express yourself with warmth and tend to centralize situations, valuing freedom, frankness and a sense of justice. optimism and independence can coexist with rebelliousness, wastefulness and difficulty receiving criticism.\",\n \"keywords\": {\n \"pt\": [\n \"otimismo\",\n \"liberdade\",\n \"franqueza\",\n \"justiça\"\n ],\n \"en\": [\n \"optimism\",\n \"freedom\",\n \"frankness\",\n \"justice\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 458,\n \"to\": 465\n }\n ],\n \"reviewNotes\": []\n },\n \"Capricorn\": {\n \"pt\": \"você sustenta suas ambições com disciplina, prudência e perseverança, e o Sol acrescenta calor humano que facilita o contato com os outros. a seriedade e o respeito pelo dever podem conviver com pessimismo, reserva e apego à tradição.\",\n \"en\": \"you sustain your ambitions with discipline, prudence and perseverance, and the Sun adds human warmth that eases contact with others. seriousness and respect for duty can coexist with pessimism, reserve and attachment to tradition.\",\n \"keywords\": {\n \"pt\": [\n \"ambição\",\n \"disciplina\",\n \"perseverança\",\n \"calor humano\"\n ],\n \"en\": [\n \"ambition\",\n \"discipline\",\n \"perseverance\",\n \"human warmth\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 476,\n \"to\": 486\n }\n ],\n \"reviewNotes\": []\n },\n \"Aquarius\": {\n \"pt\": \"você valoriza a liberdade, as reformas e o que é novo ou incomum, com criatividade e interesse humanitário. o Sol em exílio acentua a preocupação consigo, e a abertura à mudança pode conviver com imprevisibilidade e aversão à rotina.\",\n \"en\": \"you value freedom, reform and what is new or unusual, with creativity and humanitarian concern. the Sun in detriment heightens self-concern, and openness to change can coexist with unpredictability and aversion to routine.\",\n \"keywords\": {\n \"pt\": [\n \"liberdade\",\n \"reformas\",\n \"criatividade\",\n \"preocupação consigo\"\n ],\n \"en\": [\n \"freedom\",\n \"reform\",\n \"creativity\",\n \"self-concern\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 496,\n \"to\": 502\n }\n ],\n \"reviewNotes\": [\n \"Book 25785-25890 emphasizes contribution and emotional distance; course 496-497 explicitly adds self-concern with the Sun in detriment. Course emphasis is retained.\"\n ]\n },\n \"Pisces\": {\n \"pt\": \"você conta com a ação do Sol pra refletir antes de seguir o primeiro impulso, trazendo disciplina e equilíbrio à sensibilidade. a imaginação e a compaixão podem conviver com uma postura passiva e receptiva e com a tendência de buscar soluções místicas pras dificuldades.\",\n \"en\": \"you draw on the action of the Sun to reflect before following the first impulse, bringing discipline and balance to sensitivity. imagination and compassion can coexist with a passive, receptive stance and a tendency to seek mystical solutions to difficulties.\",\n \"keywords\": {\n \"pt\": [\n \"reflexão\",\n \"sensibilidade\",\n \"imaginação\",\n \"compaixão\"\n ],\n \"en\": [\n \"reflection\",\n \"sensitivity\",\n \"imagination\",\n \"compassion\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 3 modulo 4/aula-3.md\",\n \"from\": 514,\n \"to\": 521\n }\n ],\n \"reviewNotes\": [\n \"Book 26087-26104 emphasizes decisions by feeling and intuition; course 514-516 explicitly describes reflection before impulse, discipline and balance. Course emphasis is retained.\"\n ]\n }\n },\n \"moon\": {\n \"Aries\": {\n \"pt\": \"você reage com entusiasmo sincero e inteligência aguda, que pode ser instável, enquanto seu temperamento pode ser inconstante. o impulso de se colocar em primeiro lugar pode vir com obstinação, aversão às convenções e dificuldade de aceitar conselhos ou disciplina.\",\n \"en\": \"you react with sincere enthusiasm and a sharp mind that can be unsteady, while your temperament may be changeable. the impulse to put yourself first can come with stubbornness, aversion to convention and difficulty accepting advice or discipline.\",\n \"keywords\": {\n \"pt\": [\n \"entusiasmo\",\n \"inteligência aguda\",\n \"inconstância\",\n \"obstinação\"\n ],\n \"en\": [\n \"enthusiasm\",\n \"sharp mind\",\n \"changeability\",\n \"stubbornness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 5,\n \"to\": 9\n },\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 12,\n \"to\": 14\n }\n ],\n \"reviewNotes\": [\n \"Sharp intelligence retains the instability qualifier; omitted accident/health predictions and prescriptions to develop patience.\"\n ]\n },\n \"Taurus\": {\n \"pt\": \"você encontra estabilidade na persistência e na determinação, com responsabilidade prática, sociabilidade e gosto pelas artes. essa constância contrabalança a impulsividade e pode conviver com possessividade.\",\n \"en\": \"you find stability in persistence and determination, with practical responsibility, sociability and an appreciation of the arts. that steadiness counterbalances impulsiveness and can coexist with possessiveness.\",\n \"keywords\": {\n \"pt\": [\n \"persistência\",\n \"determinação\",\n \"sociabilidade\",\n \"possessividade\"\n ],\n \"en\": [\n \"persistence\",\n \"determination\",\n \"sociability\",\n \"possessiveness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 15,\n \"to\": 19\n },\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 21,\n \"to\": 22\n }\n ],\n \"reviewNotes\": [\n \"Preserved the difficult-aspect intensification of possessiveness; ambiguous maternal-inheritance wording, financial predictions and health claims omitted.\",\n \"Course 19-20 has an ambiguous antecedent in its maternal-inheritance and adverse-aspect clauses. The description retains possessiveness from 19 but does not infer what becomes severe under adverse aspects.\"\n ]\n },\n \"Gemini\": {\n \"pt\": \"você encontra estímulo em fazer várias coisas e trocar ideias, com vivacidade intelectual e necessidade de variedade. se faltar estabilidade nas outras áreas do mapa, você pode ter indecisão e agitação.\",\n \"en\": \"you find stimulation in doing several things and exchanging ideas, with intellectual liveliness and a need for variety. if other areas of the chart lack stability, you can experience indecision and restlessness.\",\n \"keywords\": {\n \"pt\": [\n \"variedade\",\n \"vivacidade intelectual\",\n \"troca de ideias\",\n \"indecisão\"\n ],\n \"en\": [\n \"variety\",\n \"intellectual liveliness\",\n \"exchange of ideas\",\n \"indecision\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 23,\n \"to\": 28\n },\n {\n \"file\": \"books/astrologia-hermetica/astrologia-hermetica.md\",\n \"from\": 28528,\n \"to\": 28537\n }\n ],\n \"reviewNotes\": [\n \"Instability is conditional on other chart areas, not an unconditional Moon trait; book supports exchange of ideas. Walking prescriptions and claims about children omitted.\"\n ]\n },\n \"Cancer\": {\n \"pt\": \"você sente uma forte necessidade de cuidar e proteger, com instinto familiar acentuado, sensibilidade ao ambiente, imaginação viva e emoções intensas. sua tenacidade pode atuar de forma negativa, e você pode superestimar a autoridade.\",\n \"en\": \"you feel a strong need to care and protect, with a strong family instinct, sensitivity to your surroundings, a vivid imagination and intense emotions. your tenacity can act negatively, and you may overestimate authority.\",\n \"keywords\": {\n \"pt\": [\n \"cuidado\",\n \"proteção\",\n \"sensibilidade\",\n \"tenacidade\"\n ],\n \"en\": [\n \"care\",\n \"protection\",\n \"sensitivity\",\n \"tenacity\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 35,\n \"to\": 41\n }\n ],\n \"reviewNotes\": [\n \"Kept the authority tension without promising parenting ability; book nostalgia was inspected but not added.\"\n ]\n },\n \"Leo\": {\n \"pt\": \"você organiza com autoconfiança e alegria, expressando afeição generosa e lealdade. essa capacidade pode virar autoritarismo e, quando a Lua recebe aspectos difíceis, dar lugar a presunção, vaidade, ostentação e arrogância.\",\n \"en\": \"you organize with self-confidence and joy, expressing generous affection and loyalty. that ability can turn into authoritarianism and, when the Moon receives difficult aspects, give way to presumptuousness, vanity, ostentation and arrogance.\",\n \"keywords\": {\n \"pt\": [\n \"organização\",\n \"generosidade\",\n \"lealdade\",\n \"autoritarismo\"\n ],\n \"en\": [\n \"organization\",\n \"generosity\",\n \"loyalty\",\n \"authoritarianism\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 42,\n \"to\": 47\n }\n ],\n \"reviewNotes\": [\n \"Authoritarianism is a general organizational tension; vanity/ostentation/arrogance retain the explicit difficult-aspect condition. No recognition requirement added from book.\"\n ]\n },\n \"Virgo\": {\n \"pt\": \"você conta com inteligência prática e analítica, boa memória e atenção meticulosa pra estudar e trabalhar com afinco. essa atenção pode se tornar excessiva, junto de preocupação acentuada, timidez e falta de autoconfiança.\",\n \"en\": \"you draw on practical, analytical intelligence, a good memory and meticulous attention to study and work diligently. that attention can become excessive, alongside pronounced worry, shyness and a lack of confidence.\",\n \"keywords\": {\n \"pt\": [\n \"análise\",\n \"memória\",\n \"atenção aos detalhes\",\n \"preocupação\"\n ],\n \"en\": [\n \"analysis\",\n \"memory\",\n \"attention to detail\",\n \"worry\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 51,\n \"to\": 51\n },\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 53,\n \"to\": 58\n }\n ],\n \"reviewNotes\": [\n \"Kept worry and low confidence alongside analytical strengths; omitted health claims and gendered occupational assignment.\"\n ]\n },\n \"Libra\": {\n \"pt\": \"você se aproxima com cortesia, encanto e vontade genuína de agradar, preferindo dividir a responsabilidade pelas decisões. a determinação pode faltar e, quando a Lua recebe aspectos difíceis, podem aparecer volubilidade e crítica excessiva.\",\n \"en\": \"you approach others with courtesy, charm and a genuine wish to please, preferring to share responsibility for decisions. determination may be lacking and, when the Moon receives difficult aspects, fickleness and excessive criticism can appear.\",\n \"keywords\": {\n \"pt\": [\n \"cortesia\",\n \"encanto\",\n \"decisões compartilhadas\",\n \"volubilidade\"\n ],\n \"en\": [\n \"courtesy\",\n \"charm\",\n \"shared decisions\",\n \"fickleness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 60,\n \"to\": 67\n }\n ],\n \"reviewNotes\": [\n \"Retained weak determination and the difficult-aspect condition for fickleness/criticism; omitted occupational assignment and relationship guarantees.\"\n ]\n },\n \"Scorpio\": {\n \"pt\": \"você vive emoções intensas, com magnetismo e determinação, e sua introversão às vezes encobre impetuosidade e excitação interiores. pode haver orgulho e obstinação e, quando a Lua recebe aspectos difíceis, podem surgir melancolia, ressentimento, possessividade e irritação.\",\n \"en\": \"you have intense emotions, magnetism and determination, and your introversion sometimes conceals inner impetuosity and excitement. pride and stubbornness may be present and, when the Moon receives difficult aspects, melancholy, resentment, possessiveness and irritation can arise.\",\n \"keywords\": {\n \"pt\": [\n \"intensidade\",\n \"magnetismo\",\n \"determinação\",\n \"possessividade\"\n ],\n \"en\": [\n \"intensity\",\n \"magnetism\",\n \"determination\",\n \"possessiveness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 68,\n \"to\": 73\n }\n ],\n \"reviewNotes\": [\n \"Introversion remains occasional and may mask inner excitement; difficult-aspect tensions stay conditional. No transformation/regeneration assignment from book.\"\n ]\n },\n \"Sagittarius\": {\n \"pt\": \"você tende ao otimismo e à conversa, com intuição desenvolvida e forte gosto pela independência e pela liberdade. essa disposição pode vir com inquietude, senso de urgência, imediatismo e, às vezes, imprudência.\",\n \"en\": \"you tend toward optimism and conversation, with developed intuition and a strong desire for independence and freedom. that disposition can come with restlessness, a sense of urgency, a tendency to want things right away and, at times, recklessness.\",\n \"keywords\": {\n \"pt\": [\n \"otimismo\",\n \"independência\",\n \"intuição\",\n \"inquietude\"\n ],\n \"en\": [\n \"optimism\",\n \"independence\",\n \"intuition\",\n \"restlessness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 74,\n \"to\": 76\n },\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 78,\n \"to\": 81\n }\n ],\n \"reviewNotes\": [\n \"Kept restlessness and occasional recklessness; omitted exercise prescriptions, residential predictions and prophetic labeling.\"\n ]\n },\n \"Capricorn\": {\n \"pt\": \"você assume responsabilidades com prudência, senso prático e dedicação persistente. sua reserva e cautela podem chegar ao excesso, trazendo austeridade, embora às vezes também apareça ostentação.\",\n \"en\": \"you take on responsibilities with prudence, practical sense and persistent dedication. your reserve and caution can become excessive, bringing austerity, although ostentation can sometimes appear as well.\",\n \"keywords\": {\n \"pt\": [\n \"prudência\",\n \"responsabilidade\",\n \"persistência\",\n \"austeridade\"\n ],\n \"en\": [\n \"prudence\",\n \"responsibility\",\n \"persistence\",\n \"austerity\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 82,\n \"to\": 85\n },\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 87,\n \"to\": 90\n }\n ],\n \"reviewNotes\": [\n \"Kept both excess caution/austerity and occasional opposite ostentation; omitted depression language and predicted career rank.\"\n ]\n },\n \"Aquarius\": {\n \"pt\": \"você valoriza a independência e a informalidade, com afabilidade, bondade e espírito inventivo. esse amor à autonomia pode vir com obstinação, imprevisibilidade e distanciamento emocional, às vezes tratado com indiferença.\",\n \"en\": \"you value independence and informality, with friendliness, kindness and an inventive spirit. that love of autonomy can come with stubbornness, unpredictability and emotional distance, sometimes met with indifference.\",\n \"keywords\": {\n \"pt\": [\n \"independência\",\n \"afabilidade\",\n \"inventividade\",\n \"imprevisibilidade\"\n ],\n \"en\": [\n \"independence\",\n \"friendliness\",\n \"inventiveness\",\n \"unpredictability\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 91,\n \"to\": 99\n }\n ],\n \"reviewNotes\": [\n \"Recast possible loneliness/relational failure as emotional distance without predicting outcomes; omitted nervous tension, control prescriptions and a collective mission.\"\n ]\n },\n \"Pisces\": {\n \"pt\": \"você tem uma natureza receptiva e gentil, com imaginação desenvolvida e possível talento artístico, embora possa faltar expressão coerente. quando a Lua recebe aspectos difíceis, podem surgir credulidade, pouca praticidade e mudanças de ideia que tornam as decisões conflituosas.\",\n \"en\": \"you have a receptive, gentle nature, with a developed imagination and possible artistic talent, although coherent expression may be lacking. when the Moon receives difficult aspects, credulity, impracticality and changes of mind can make decisions conflict-ridden.\",\n \"keywords\": {\n \"pt\": [\n \"receptividade\",\n \"imaginação\",\n \"talento artístico\",\n \"credulidade\"\n ],\n \"en\": [\n \"receptivity\",\n \"imagination\",\n \"artistic talent\",\n \"credulity\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 18 modulo 4/aula-18.md\",\n \"from\": 100,\n \"to\": 104\n }\n ],\n \"reviewNotes\": [\n \"Artistic talent remains possible and may lack coherent expression; credulity/impracticality/changes of mind retain the difficult-aspect condition. Remedial instructions omitted.\"\n ]\n }\n },\n \"mercury\": {\n \"Aries\": {\n \"pt\": \"você tem mente aberta e atenta, com rapidez e competência intelectual, além de ideias novas e metas bem definidas. também tende a ser confiável e sincero.\",\n \"en\": \"you have an open, attentive mind, with speed and intellectual ability, as well as new ideas and well-defined goals. you also tend to be reliable and sincere.\",\n \"keywords\": {\n \"pt\": [\n \"rapidez mental\",\n \"competência intelectual\",\n \"ideias novas\",\n \"confiabilidade\",\n \"sinceridade\"\n ],\n \"en\": [\n \"quick thinking\",\n \"intellectual ability\",\n \"new ideas\",\n \"reliability\",\n \"sincerity\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 7,\n \"to\": 8\n }\n ],\n \"reviewNotes\": [\n \"Used only the course claims; inspected book material on directness and impulsivity but left it unused.\"\n ]\n },\n \"Taurus\": {\n \"pt\": \"você tende a pensar devagar. sua mente se apoia mais na experiência do que na inteligência.\",\n \"en\": \"you tend to think slowly. your mind relies more on experience than on intelligence.\",\n \"keywords\": {\n \"pt\": [\n \"pensamento lento\",\n \"experiência\"\n ],\n \"en\": [\n \"slow thinking\",\n \"experience\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 9,\n \"to\": 9\n }\n ],\n \"reviewNotes\": [\n \"The book opening was inspected but its extracted text was too corrupted to range-map reliably, so it is unused; both sentences and keywords reflect only course line 9.\"\n ]\n },\n \"Gemini\": {\n \"pt\": \"você pode raciocinar com rapidez, ter ideias brilhantes, senso de humor apurado e imaginação aguçada. também há habilidade para discursos, junto de tendência a mentir.\",\n \"en\": \"you may reason quickly, have brilliant ideas, a keen sense of humor and a sharp imagination. you also have a gift for speaking, alongside a tendency to lie.\",\n \"keywords\": {\n \"pt\": [\n \"rapidez de raciocínio\",\n \"ideias brilhantes\",\n \"imaginação\",\n \"tendência a mentir\"\n ],\n \"en\": [\n \"quick reasoning\",\n \"brilliant ideas\",\n \"imagination\",\n \"tendency to lie\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 10,\n \"to\": 11\n }\n ],\n \"reviewNotes\": [\n \"Kept the course's explicit negative qualifier, ‘tendências a mentira’, rather than softening it. Book discussion of versatility, curiosity, and adaptation was not added because the course is primary and already supplies the sign's claims.\"\n ]\n },\n \"Cancer\": {\n \"pt\": \"você tem excelente memória, principalmente para fatos ligados às emoções. também pode haver ingenuidade e pouco senso de observação.\",\n \"en\": \"you have an excellent memory, especially for facts linked to emotions. there may also be naivety and limited powers of observation.\",\n \"keywords\": {\n \"pt\": [\n \"memória\",\n \"emoções\",\n \"ingenuidade\",\n \"pouco senso de observação\"\n ],\n \"en\": [\n \"memory\",\n \"emotions\",\n \"naivety\",\n \"limited powers of observation\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 12,\n \"to\": 13\n }\n ],\n \"reviewNotes\": [\n \"The course states these traits without conditional qualifiers. Supplemental book claims about emotional communication and intuition were omitted to keep the synthesis narrow and avoid adding generic filler.\"\n ]\n },\n \"Leo\": {\n \"pt\": \"você tem segurança nas próprias ideias e tende à alegria, ao otimismo e à generosidade. há risco de grosseria, preconceitos e vaidade exacerbada.\",\n \"en\": \"you feel confident in your own ideas and tend toward joy, optimism and generosity. there is a risk of rudeness, prejudice and excessive vanity.\",\n \"keywords\": {\n \"pt\": [\n \"segurança nas ideias\",\n \"otimismo\",\n \"generosidade\",\n \"vaidade\"\n ],\n \"en\": [\n \"confidence in ideas\",\n \"optimism\",\n \"generosity\",\n \"vanity\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 14,\n \"to\": 15\n }\n ],\n \"reviewNotes\": [\n \"Curso é conciso; o livro corrobora confiança e expressão criativa, mas não foi usado para acrescentar liderança, persuasão ou busca de reconhecimento.\"\n ]\n },\n \"Virgo\": {\n \"pt\": \"você tem grande capacidade para o trabalho intelectual, com versatilidade e seletividade. você pode se tornar muito crítico e pedante.\",\n \"en\": \"you have a strong capacity for intellectual work, with versatility and selectiveness. you can become highly critical and pedantic.\",\n \"keywords\": {\n \"pt\": [\n \"trabalho intelectual\",\n \"versatilidade\",\n \"seletividade\",\n \"criticismo\"\n ],\n \"en\": [\n \"intellectual work\",\n \"versatility\",\n \"selectiveness\",\n \"criticism\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 16,\n \"to\": 17\n }\n ],\n \"reviewNotes\": [\n \"Livro reforça análise, método e precisão, mas o resumo conserva a formulação mais estreita do curso e sua tensão explícita de crítica/pedantismo.\"\n ]\n },\n \"Libra\": {\n \"pt\": \"seu pensamento pode ser lento, mas você consegue pensar de modo equilibrado. seu intelecto mostra pouca inclinação à especulação, e falta tato.\",\n \"en\": \"your thinking may be slow, though you can think in a balanced way. your intellect shows little inclination toward speculation, and tact is lacking.\",\n \"keywords\": {\n \"pt\": [\n \"pensamento lento\",\n \"equilíbrio\",\n \"pouca especulação\",\n \"falta de tato\"\n ],\n \"en\": [\n \"slow thinking\",\n \"balance\",\n \"little speculation\",\n \"lack of tact\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 18,\n \"to\": 19\n }\n ],\n \"reviewNotes\": [\n \"O livro descreve diplomacia, equilíbrio e mediação, em tensão com a falta de tato e a lentidão do curso. A prioridade do curso foi mantida; o material suplementar não foi usado para inverter ou suavizar essas afirmações. OCR do livro está fragmentado.\"\n ]\n },\n \"Scorpio\": {\n \"pt\": \"você conta com inteligência e intuição muito desenvolvidas e grande poder de concentração. há risco de se tornar desconfiado e mentalmente cruel.\",\n \"en\": \"you have highly developed intelligence and intuition, along with strong powers of concentration. there is a risk of becoming suspicious and mentally cruel.\",\n \"keywords\": {\n \"pt\": [\n \"inteligência\",\n \"intuição\",\n \"concentração\",\n \"desconfiança\"\n ],\n \"en\": [\n \"intelligence\",\n \"intuition\",\n \"concentration\",\n \"suspicion\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 20,\n \"to\": 21\n }\n ],\n \"reviewNotes\": [\n \"O livro corrobora comunicação intensa, investigação e fala por vezes cortante; o curso, mais específico, sustenta a formulação final. Não se acrescentaram inferências sobre segredos ou intenções.\"\n ]\n },\n \"Sagittarius\": {\n \"pt\": \"você pode ter um senso crítico pouco desenvolvido e tender à superficialidade. seu intelecto pode se mostrar vulnerável, com falta de ideias próprias.\",\n \"en\": \"you may have an underdeveloped critical sense and tend toward superficiality. your intellect may prove vulnerable, with a lack of ideas of your own.\",\n \"keywords\": {\n \"pt\": [\n \"senso crítico pouco desenvolvido\",\n \"superficialidade\",\n \"vulnerabilidade intelectual\",\n \"falta de ideias próprias\"\n ],\n \"en\": [\n \"underdeveloped critical sense\",\n \"superficiality\",\n \"intellectual vulnerability\",\n \"lack of ideas of your own\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 22,\n \"to\": 23\n }\n ],\n \"reviewNotes\": [\n \"Course 22-23 gives only tensions; no flattering counterweight was added. The book opening at 34820-34825 instead emphasizes optimism, honesty and philosophical exploration; that divergent emphasis is not blended into the entry.\"\n ]\n },\n \"Capricorn\": {\n \"pt\": \"você pensa de modo racional, sério, frio e calculista, com boa memória. sua postura mental pode ser intransigente e recusar a fantasia e a imaginação.\",\n \"en\": \"you think in a rational, serious, cold and calculating way, with a good memory. your mental stance can be intransigent and reject fantasy and imagination.\",\n \"keywords\": {\n \"pt\": [\n \"racionalidade\",\n \"boa memória\",\n \"cálculo\",\n \"intransigência mental\"\n ],\n \"en\": [\n \"rationality\",\n \"good memory\",\n \"calculation\",\n \"mental intransigence\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 24,\n \"to\": 25\n }\n ],\n \"reviewNotes\": [\n \"Preserved cold/calculating intelligence and rejection of fantasy/imagination rather than substituting generic pragmatism. The interleaved book opening at 35037-35055 corroborates seriousness/calculation but its responsibility, organization and authority/tradition themes were not added.\"\n ]\n },\n \"Aquarius\": {\n \"pt\": \"você tem curiosidade e gosto pela pesquisa, com a mente voltada para o futuro e ideias originais. há também uma tendência à desonestidade.\",\n \"en\": \"you have curiosity and a taste for research, with a mind oriented toward the future and original ideas. there is also a tendency toward dishonesty.\",\n \"keywords\": {\n \"pt\": [\n \"curiosidade\",\n \"pesquisa\",\n \"ideias originais\",\n \"tendência à desonestidade\"\n ],\n \"en\": [\n \"curiosity\",\n \"research\",\n \"original ideas\",\n \"tendency toward dishonesty\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 26,\n \"to\": 27\n }\n ],\n \"reviewNotes\": [\n \"The explicit course tendency toward dishonesty is retained, not replaced with eccentricity. Book 35302-35312 supports original/futuristic thought but emphasizes friendly/open communication, social change and technology; those additions do not override the course tension.\"\n ]\n },\n \"Pisces\": {\n \"pt\": \"você tem muita imaginação e uma mente confusa, que pode chegar a ideias geniais. também há uma tendência à mentira.\",\n \"en\": \"you have a vivid imagination and a confused mind that can produce brilliant ideas. there is also a tendency toward lying.\",\n \"keywords\": {\n \"pt\": [\n \"imaginação\",\n \"confusão mental\",\n \"ideias geniais\",\n \"tendência à mentira\"\n ],\n \"en\": [\n \"imagination\",\n \"mental confusion\",\n \"brilliant ideas\",\n \"tendency toward lying\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 28,\n \"to\": 29\n }\n ],\n \"reviewNotes\": [\n \"The course madness/genius polarity is paraphrased without diagnostic labeling as confusion/brilliant ideas; its explicit tendency toward lying remains. The book opening at 35527 and 35539-35550 is interleaved and emphasizes intuition/empathy; 35565-35568 supports imagination. No missing passage was reconstructed and no empathic counterweight was added.\",\n \"Source review keeps confusion as the baseline rather than making it only one pole of an oscillation. The clinical madness label is not carried into the prose; the possible brilliant ideas and lying tendency remain.\"\n ]\n }\n },\n \"venus\": {\n \"Aries\": {\n \"pt\": \"você vive os sentimentos amorosos com bastante intensidade e paixão. sua sexualidade pode ser pouco convencional, com uma necessidade constante de satisfação.\",\n \"en\": \"you experience romantic feelings with considerable intensity and passion. your sexuality may be unconventional, with a constant need for fulfillment.\",\n \"keywords\": {\n \"pt\": [\n \"intensidade\",\n \"paixão\",\n \"sexualidade pouco convencional\",\n \"necessidade de satisfação\"\n ],\n \"en\": [\n \"intensity\",\n \"passion\",\n \"unconventional sexuality\",\n \"need for fulfillment\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 32,\n \"to\": 33\n }\n ],\n \"reviewNotes\": [\n \"The course's constant need for sexual satisfaction and unconventional sexuality are retained as needs/preferences, without predicting behavior or outcomes. The inspected book opening's romantic enthusiasm and fleeting passions were not used because they would shift the course emphasis.\"\n ]\n },\n \"Taurus\": {\n \"pt\": \"você demonstra grande sensualidade e alegria de viver, encarando o amor de um modo natural. você tende à fidelidade nos vínculos a dois.\",\n \"en\": \"you show great sensuality and joy in life, approaching love in a natural way. you tend toward fidelity in one-to-one relationships.\",\n \"keywords\": {\n \"pt\": [\n \"sensualidade\",\n \"alegria de viver\",\n \"amor natural\",\n \"fidelidade\"\n ],\n \"en\": [\n \"sensuality\",\n \"joy in life\",\n \"natural approach to love\",\n \"fidelity\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 34,\n \"to\": 35\n }\n ],\n \"reviewNotes\": [\n \"The course lists fidelity directly; phrased it as a possible relationship theme to avoid deterministic identity language. Book claims about stability, security, and reliability were inspected but not adopted because they are not in the course passage.\"\n ]\n },\n \"Gemini\": {\n \"pt\": \"você pode ter pouco senso de realidade e tendência ao flerte e à aventura. viagens ou pessoas estrangeiras podem fazer parte de suas histórias amorosas.\",\n \"en\": \"you may have little sense of reality and a tendency toward flirting and adventure. travel or people from other countries may feature in your romances.\",\n \"keywords\": {\n \"pt\": [\n \"pouco senso de realidade\",\n \"flerte\",\n \"aventura\",\n \"viagens ou pessoas estrangeiras\"\n ],\n \"en\": [\n \"limited sense of reality\",\n \"flirting\",\n \"adventure\",\n \"travel or foreign people\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 36,\n \"to\": 38\n }\n ],\n \"reviewNotes\": [\n \"Course claims about affairs during travel or with foreigners are cautiously recast as possible themes in romantic stories, not predicted outcomes. The course's outdated sexual-orientation claim is omitted. The inspected book's relational optimism and variety claims were not added.\"\n ]\n },\n \"Cancer\": {\n \"pt\": \"você pode viver o amor com romantismo e tendência a histórias pouco reais. também pode precisar de afeto permanente e ter gosto pela arte.\",\n \"en\": \"you may approach love romantically and tend toward stories that are not very realistic. you may also need constant affection and have an appreciation for art.\",\n \"keywords\": {\n \"pt\": [\n \"romantismo\",\n \"histórias pouco reais\",\n \"afeto permanente\",\n \"arte\"\n ],\n \"en\": [\n \"romanticism\",\n \"unrealistic stories\",\n \"constant affection\",\n \"art\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 39,\n \"to\": 40\n }\n ],\n \"reviewNotes\": [\n \"Kept the course's unrealistic-story tension instead of replacing it with the book's romantic optimism. The inspected book's emotional security, family bonds, and caregiving claims were not adopted because they are absent from the course lines.\"\n ]\n },\n \"Leo\": {\n \"pt\": \"você tende a viver o amor com liberdade e sem culpa, valorizando o que considera essencial. também gosta de arte.\",\n \"en\": \"you tend to experience love freely and without guilt, valuing what you consider essential. you also enjoy art.\",\n \"keywords\": {\n \"pt\": [\n \"liberdade no amor\",\n \"sem culpa\",\n \"essencial\",\n \"arte\"\n ],\n \"en\": [\n \"freedom in love\",\n \"without guilt\",\n \"essentials\",\n \"art\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 41,\n \"to\": 42\n }\n ],\n \"reviewNotes\": [\n \"O livro apresenta amor dramático e entusiasta, desejo de adoração e expressão grandiosa (37392-37407), em tensão com a liberdade sem culpa e o foco no essencial do curso. Mantida a formulação do curso; não foram acrescentados drama, necessidade de admiração ou promessa de generosidade no amor.\"\n ]\n },\n \"Virgo\": {\n \"pt\": \"você pode ter pouca sensualidade. seu senso crítico pode abafar a espontaneidade amorosa.\",\n \"en\": \"you may have little sensuality. your critical sense can stifle spontaneity in love.\",\n \"keywords\": {\n \"pt\": [\n \"pouca sensualidade\",\n \"senso crítico\",\n \"espontaneidade amorosa abafada\"\n ],\n \"en\": [\n \"little sensuality\",\n \"critical sense\",\n \"stifled spontaneity in love\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 43,\n \"to\": 44\n }\n ],\n \"reviewNotes\": [\n \"O curso também usa o termo assexualidade; ele não foi convertido em rótulo determinístico de identidade ou clínico, nem sua acepção histórica foi equiparada a categorias atuais. O livro descreve carinho prático e atencioso e atos de serviço (37637-37642, 37661-37671), mas não usei esse otimismo relacional para neutralizar a tensão negativa do curso.\"\n ]\n },\n \"Libra\": {\n \"pt\": \"você tende a sonhar acordado e pode sustentar por bastante tempo uma história sentimental. há também tendência à fidelidade.\",\n \"en\": \"you tend to daydream and may sustain a romantic attachment for a long time. there is also a tendency toward faithfulness.\",\n \"keywords\": {\n \"pt\": [\n \"devaneio\",\n \"história sentimental duradoura\",\n \"fidelidade\"\n ],\n \"en\": [\n \"daydreaming\",\n \"long-lasting romantic relationship\",\n \"faithfulness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 45,\n \"to\": 46\n }\n ],\n \"reviewNotes\": [\n \"O livro valoriza harmonia, equilíbrio e diplomacia, ausentes no trecho do curso; esses temas foram registrados como contraste e não acrescentados como contrapeso. A duração é apresentada como capacidade/tendência, sem garantir resultado para uma relação definida.\"\n ]\n },\n \"Scorpio\": {\n \"pt\": \"você pode ter grande dificuldade para amar e encarar o amor como um problema. pode haver forte erotismo ou fixação pelo sexo.\",\n \"en\": \"you may find it very difficult to love and experience love as a problem. there may be strong eroticism or fixation on sex.\",\n \"keywords\": {\n \"pt\": [\n \"dificuldade para amar\",\n \"amor como problema\",\n \"forte erotismo\",\n \"fixação pelo sexo\"\n ],\n \"en\": [\n \"difficulty loving\",\n \"love as a problem\",\n \"strong eroticism\",\n \"fixation on sex\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 47,\n \"to\": 48\n }\n ],\n \"reviewNotes\": [\n \"A afirmação sobre frigidez ou impotência foi omitida por ser diagnóstico/alegação de saúde. O livro descreve amor intenso e apaixonado, busca de conexões profundas e lealdade (38052-38060), em tensão com a dificuldade para amar e o amor como problema do curso. Curso mantido como autoridade, sem romantizar ou garantir transformação relacional.\"\n ]\n },\n \"Sagittarius\": {\n \"pt\": \"você pode viver a sexualidade com liberdade e ter aventuras afetivas durante viagens ou com pessoas de outros países. também pode haver uma tendência à infidelidade amorosa e sexual.\",\n \"en\": \"you may experience sexuality freely and have romantic adventures during travel or with people from other countries. there may also be a tendency toward romantic and sexual infidelity.\",\n \"keywords\": {\n \"pt\": [\n \"sexualidade livre\",\n \"aventuras afetivas\",\n \"viagens\",\n \"infidelidade amorosa e sexual\"\n ],\n \"en\": [\n \"sexual freedom\",\n \"romantic adventures\",\n \"travel\",\n \"romantic and sexual infidelity\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 49,\n \"to\": 50\n }\n ],\n \"reviewNotes\": [\n \"Course love during travel or with people from other countries is retained as a possibility rather than reduced to interest or presented as a guaranteed event; sexual freedom and infidelity are possibilities, not deterministic identity labels. The interleaved book opening at 38226-38236 and nearby psychological text at 38240-38248 and 38260-38267 emphasize freedom/adventure; its optimism, growth and enthusiasm are not added as a counterweight to course infidelity.\"\n ]\n },\n \"Capricorn\": {\n \"pt\": \"você pode ter sua espontaneidade afetiva abafada pela racionalidade. a expressão dos sentimentos pode ficar bloqueada, com frieza.\",\n \"en\": \"you may have your emotional spontaneity stifled by rationality. the expression of feelings can become blocked, with coldness.\",\n \"keywords\": {\n \"pt\": [\n \"racionalidade\",\n \"espontaneidade afetiva abafada\",\n \"expressão sentimental bloqueada\",\n \"frieza\"\n ],\n \"en\": [\n \"rationality\",\n \"stifled emotional spontaneity\",\n \"blocked expression of feelings\",\n \"coldness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 51,\n \"to\": 52\n }\n ],\n \"reviewNotes\": [\n \"Course total suppression of spontaneity and categorical inability to express feelings are recast as possible blockage, retaining coldness without assigning a permanent incapacity. Book 38452-38461 instead emphasizes respectful reserve, stable commitment and responsibility; no flattering dedication/commitment trait is imported.\"\n ]\n },\n \"Aquarius\": {\n \"pt\": \"você pode viver a sexualidade de modo livre e sentimental, alternando entre amor e amizade. pode haver dificuldade de manter vínculos fixos e estáveis.\",\n \"en\": \"you may approach sexuality with freedom and feeling, alternating between love and friendship. there may be difficulty maintaining fixed and stable bonds.\",\n \"keywords\": {\n \"pt\": [\n \"sexualidade livre\",\n \"sentimentalidade\",\n \"alternância entre amor e amizade\",\n \"dificuldade de manter vínculos estáveis\"\n ],\n \"en\": [\n \"sexual freedom\",\n \"sentimentality\",\n \"alternation between love and friendship\",\n \"difficulty maintaining stable bonds\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 53,\n \"to\": 54\n }\n ],\n \"reviewNotes\": [\n \"Course categorical inability to maintain fixed/stable relationships is recast as possible difficulty rather than predicted failure. Free/sentimental sexuality does not imply orientation. Book 38725-38737 emphasizes independence, intellectual connection and companionship; these are not used to erase or replace the course stability tension.\"\n ]\n },\n \"Pisces\": {\n \"pt\": \"você pode viver o afeto com grande sensualidade e romantismo. sua atitude em relação à pessoa amada pode ter um tom maternal, mas também pode haver traições.\",\n \"en\": \"you may experience affection with strong sensuality and romanticism. your attitude toward the person you love can have a maternal tone, but betrayals are also possible.\",\n \"keywords\": {\n \"pt\": [\n \"sensualidade\",\n \"romantismo\",\n \"atitude maternal\",\n \"possíveis traições\"\n ],\n \"en\": [\n \"sensuality\",\n \"romanticism\",\n \"maternal attitude\",\n \"possible betrayals\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 55,\n \"to\": 56\n }\n ],\n \"reviewNotes\": [\n \"Omitted the course gendered femininity assignment rather than infer identity or orientation. The maternal tendency describes an attitude toward the loved person, not an independent care behavior, fixed gender role or practice. Possible betrayals retains the source ambiguity about who betrays whom. Book 39088-39094 emphasizes empathy, sacrifice, spirituality and emotional fusion; none is added to cancel the course betrayal tension.\"\n ]\n }\n },\n \"mars\": {\n \"Aries\": {\n \"pt\": \"você tem força física e mental e espírito de liderança. sua agressividade e franqueza podem acompanhar um jeito direto e assertivo de agir.\",\n \"en\": \"you have physical and mental strength and a leadership spirit. aggression and frankness may accompany a direct, assertive way of acting.\",\n \"keywords\": {\n \"pt\": [\n \"força física\",\n \"força mental\",\n \"liderança\",\n \"agressividade\",\n \"franqueza\"\n ],\n \"en\": [\n \"physical strength\",\n \"mental strength\",\n \"leadership\",\n \"aggression\",\n \"frankness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 59,\n \"to\": 60\n },\n {\n \"file\": \"books/astrologia-hermetica/astrologia-hermetica.md\",\n \"from\": 40349,\n \"to\": 40364\n }\n ],\n \"reviewNotes\": [\n \"The course OCR phrases ‘afiar à independência’ and ‘sexualidade perante’ are unclear and were not reconstructed or used. Book opening supports direct/assertive action; leadership is independently stated in the course.\",\n \"Direct/assertive action was confirmed by the user in book 40349-40364 across OCR columns; only that narrow adopted passage is cited.\"\n ]\n },\n \"Taurus\": {\n \"pt\": \"você tem força de vontade e tende a não se curvar diante das dificuldades. essa firmeza pode virar obstinação, junto de sensualidade e afetividade.\",\n \"en\": \"you have willpower and tend not to bend in the face of difficulties. that firmness can become stubbornness, alongside sensuality and affection.\",\n \"keywords\": {\n \"pt\": [\n \"força de vontade\",\n \"persistência\",\n \"obstinação\",\n \"sensualidade\",\n \"afetividade\"\n ],\n \"en\": [\n \"willpower\",\n \"persistence\",\n \"stubbornness\",\n \"sensuality\",\n \"affection\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 61,\n \"to\": 62\n }\n ],\n \"reviewNotes\": [\n \"Persistence paraphrases the primary course's not bending before difficulties (61-62). The book was inspected at 40683-40732 but supplies no adopted extra claim and is not cited. No practical-goal, material-security or physical-endurance addition.\"\n ]\n },\n \"Gemini\": {\n \"pt\": \"você pode ter vigor intelectual, sobretudo em atividades ligadas à palavra, e tendência à tagarelice. também pode desperdiçar energia e buscar viagens e mudanças.\",\n \"en\": \"you may have intellectual vigor, especially in activities involving words, and a tendency to talk a lot. you may also waste energy and seek travel and change.\",\n \"keywords\": {\n \"pt\": [\n \"vigor intelectual\",\n \"palavra\",\n \"tagarelice\",\n \"desperdício de energia\",\n \"mudanças\"\n ],\n \"en\": [\n \"intellectual vigor\",\n \"words\",\n \"talkativeness\",\n \"wasted energy\",\n \"change\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 63,\n \"to\": 64\n }\n ],\n \"reviewNotes\": [\n \"The course's ‘viagens e mudanças’ is rendered as a tendency to seek them, not as a prediction. Book opening was inspected but adds quickness/versatility not necessary to the primary course synthesis.\"\n ]\n },\n \"Cancer\": {\n \"pt\": \"você pode ser inconstante e agressivo, com tensão no ambiente familiar. também há originalidade e sensualidade, além de forte intuição.\",\n \"en\": \"you may be changeable and aggressive, with tension in the family environment. there is also originality and sensuality, along with strong intuition.\",\n \"keywords\": {\n \"pt\": [\n \"inconstância\",\n \"agressividade\",\n \"tensão familiar\",\n \"originalidade\",\n \"sensualidade\",\n \"intuição\"\n ],\n \"en\": [\n \"changeability\",\n \"aggression\",\n \"family tension\",\n \"originality\",\n \"sensuality\",\n \"intuition\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 65,\n \"to\": 66\n }\n ],\n \"reviewNotes\": [\n \"Preserved the course's tension and aggression without turning them into predictions about family outcomes. The inspected book's protective, emotionally defensive framing was not used because the course does not state it.\"\n ]\n },\n \"Leo\": {\n \"pt\": \"você pode exercer liderança, força física e coragem sob controle da razão. a ambição pode vir com autoritarismo e tendência ao exagero.\",\n \"en\": \"you may show leadership, physical strength and courage guided by reason. ambition can come with authoritarianism and a tendency to exaggerate.\",\n \"keywords\": {\n \"pt\": [\n \"liderança\",\n \"força física\",\n \"coragem\",\n \"ambição\",\n \"autoritarismo\",\n \"exagero\"\n ],\n \"en\": [\n \"leadership\",\n \"physical strength\",\n \"courage\",\n \"ambition\",\n \"authoritarianism\",\n \"exaggeration\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 67,\n \"to\": 68\n }\n ],\n \"reviewNotes\": [\n \"O livro descreve força dramática/confiante, busca por liderança e orgulho (41340-41363); esses elementos não foram usados para deslocar a contenção racional e as tensões explicitadas pelo curso.\"\n ]\n },\n \"Virgo\": {\n \"pt\": \"sua visão crítica pode ser acentuada, com ironia e sarcasmo. suas ações podem ser movidas por provocações.\",\n \"en\": \"your critical outlook may be pronounced, with irony and sarcasm. your actions may be driven by provocation.\",\n \"keywords\": {\n \"pt\": [\n \"visão crítica\",\n \"ironia\",\n \"sarcasmo\",\n \"provocações\"\n ],\n \"en\": [\n \"critical outlook\",\n \"irony\",\n \"sarcasm\",\n \"provocation\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 69,\n \"to\": 70\n }\n ],\n \"reviewNotes\": [\n \"O rótulo da linha 69 aparece como VIAGEM, entre Leão e Libra; atribuição a Virgem é inferida apenas pela sequência canônica e permanece uma recuperação editorial incerta. Não se reconstruiu a leitura corrompida como Virgem no texto-fonte. O livro descreve energia meticulosa, prática e eficiente (41590-41602), mas não foi usado como contrapeso nem para completar a passagem do curso.\"\n ]\n },\n \"Libra\": {\n \"pt\": \"você pode ter pouca força de vontade e tender à hesitação, embora haja empenho artístico e afetivo. a expressão da sexualidade pode tender a extremos, entre ausência e exagero, e há também intuição.\",\n \"en\": \"you may have little willpower and tend toward hesitation, while showing artistic and affectionate commitment. sexuality may tend toward extremes, from absence to excess, and intuition is also present.\",\n \"keywords\": {\n \"pt\": [\n \"pouca força de vontade\",\n \"hesitação\",\n \"empenho artístico\",\n \"empenho afetivo\",\n \"extremos na expressão sexual\",\n \"intuição\"\n ],\n \"en\": [\n \"little willpower\",\n \"hesitation\",\n \"artistic commitment\",\n \"affectionate commitment\",\n \"extremes in sexual expression\",\n \"intuition\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 71,\n \"to\": 72\n }\n ],\n \"reviewNotes\": [\n \"O curso descreve a sexualidade como sem meios-termos, ausente ou exagerada; a redação mantém essa tensão sem converter em orientação ou identidade determinística. O livro favorece equilíbrio/diplomacia, mas também diz que pode haver combatividade diante de injustiça (41873-41888); curso prioritário mantido, sem esse contrapeso.\"\n ]\n },\n \"Scorpio\": {\n \"pt\": \"você pode ter força de vontade muito intensa e forte erotismo. também pode haver espírito vingativo e liderança.\",\n \"en\": \"you may have very intense willpower and strong eroticism. a vengeful spirit and leadership may also be present.\",\n \"keywords\": {\n \"pt\": [\n \"força de vontade intensa\",\n \"erotismo\",\n \"espírito vingativo\",\n \"liderança\"\n ],\n \"en\": [\n \"intense willpower\",\n \"eroticism\",\n \"vengeful spirit\",\n \"leadership\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 73,\n \"to\": 74\n }\n ],\n \"reviewNotes\": [\n \"A construção 'que pede até ser destrutiva' na linha 73 é gramaticalmente/OCR incerta; não inferi nem reconstruí o referente ou a relação causal. O livro descreve intensidade, confronto e força de vontade (42146-42153), sem necessidade de importar a afirmação de buscar a verdade oculta.\"\n ]\n },\n \"Sagittarius\": {\n \"pt\": \"você pode agir com espírito aventureiro, competitivo e entusiasmado, com inclinação para a arte e as atividades culturais. a energia sexual é enfatizada principalmente em pessoas do sexo masculino.\",\n \"en\": \"you may act with an adventurous, competitive and enthusiastic spirit, with an inclination toward art and cultural activities. sexual energy is emphasized especially in people of the male sex.\",\n \"keywords\": {\n \"pt\": [\n \"espírito aventureiro\",\n \"competitividade\",\n \"energia sexual, principalmente em pessoas do sexo masculino\",\n \"inclinações artísticas e culturais\"\n ],\n \"en\": [\n \"adventurous spirit\",\n \"competitiveness\",\n \"sexual energy, especially in people of the male sex\",\n \"artistic and cultural inclinations\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 75,\n \"to\": 77\n }\n ],\n \"reviewNotes\": [\n \"The course male-emphasis qualifier is retained explicitly in both prose and keyword languages without inferring the reader's sex/gender. Book 42409-42413 emphasizes exploration, optimism and freedom; those additions are not adopted.\"\n ]\n },\n \"Capricorn\": {\n \"pt\": \"você pode controlar sua força física pela razão e agir com perseverança. também podem estar presentes autoridade, poder e cólera.\",\n \"en\": \"you may control your physical strength through reason and act with perseverance. authority, power and anger may also be present.\",\n \"keywords\": {\n \"pt\": [\n \"força física controlada pela razão\",\n \"perseverança\",\n \"autoridade e poder\",\n \"cólera\"\n ],\n \"en\": [\n \"physical strength controlled by reason\",\n \"perseverance\",\n \"authority and power\",\n \"anger\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 78,\n \"to\": 79\n }\n ],\n \"reviewNotes\": [\n \"Omitted the course promise of success in public/private life. Authority, power and anger remain independent listed themes, not a mechanism expressing physical strength or a guaranteed position/career outcome. The interleaved book opening at 42627-42644 corroborates control but adds ambition, strategy and long-term goals; those additions are not adopted.\"\n ]\n },\n \"Aquarius\": {\n \"pt\": \"você pode sentir aversão a vínculos, com espírito libertário e forte energia para os estudos. sua iniciativa pode ser pioneira e impulsiva.\",\n \"en\": \"you may feel an aversion to bonds, with a libertarian spirit and strong energy for study. your initiative can be pioneering and impulsive.\",\n \"keywords\": {\n \"pt\": [\n \"aversão a vínculos\",\n \"espírito libertário\",\n \"energia para os estudos\",\n \"impulsividade\",\n \"espírito pioneiro\"\n ],\n \"en\": [\n \"aversion to bonds\",\n \"libertarian spirit\",\n \"energy for study\",\n \"impulsiveness\",\n \"pioneering spirit\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 80,\n \"to\": 81\n }\n ],\n \"reviewNotes\": [\n \"Preserved aversion to bonds rather than replacing it with a mild preference for independence. Book 42891-42896 emphasizes innovation, collective ideals and technology; none is added to soften the course aversion/impulsivity tension.\"\n ]\n },\n \"Pisces\": {\n \"pt\": \"você pode sentir sua força de vontade bloqueada e colocar energia a serviço de uma ideia ou de uma fé. também pode haver abnegação.\",\n \"en\": \"you may feel your willpower blocked and put energy at the service of an idea or a faith. there may also be self-denial.\",\n \"keywords\": {\n \"pt\": [\n \"força de vontade bloqueada\",\n \"energia a serviço de uma ideia\",\n \"energia a serviço de uma fé\",\n \"abnegação\"\n ],\n \"en\": [\n \"blocked willpower\",\n \"energy serving an idea\",\n \"energy serving a faith\",\n \"self-denial\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 82,\n \"to\": 83\n }\n ],\n \"reviewNotes\": [\n \"Omitted hidden enemies and continuous provocations as external/adversarial event claims; they are not converted into a diagnosis or imagined persecution. Abnegação is rendered as self-denial without inventing helping behavior. Book 43052-43059 emphasizes indirect expression, intuition, compassion and sacrifice; no extra compassionate counterweight is adopted.\"\n ]\n }\n },\n \"jupiter\": {\n \"Aries\": {\n \"pt\": \"você pode demonstrar generosidade e otimismo exagerados, além de autossuficiência e amor à independência. também pode haver extravagância, junto de potencial intelectual.\",\n \"en\": \"you may show excessive generosity and optimism, as well as self-sufficiency and a love of independence. extravagance may also be present, alongside intellectual potential.\",\n \"keywords\": {\n \"pt\": [\n \"generosidade exagerada\",\n \"otimismo exagerado\",\n \"autossuficiência\",\n \"independência\",\n \"extravagância\",\n \"potencial intelectual\"\n ],\n \"en\": [\n \"excessive generosity\",\n \"excessive optimism\",\n \"self-sufficiency\",\n \"independence\",\n \"extravagance\",\n \"intellectual potential\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 86,\n \"to\": 87\n }\n ],\n \"reviewNotes\": [\n \"Course gives excessive generosity and optimism; kept the excess qualifier. Book opening was inspected but its OCR is too disrupted to support supplementary claims, so none were adopted.\"\n ]\n },\n \"Taurus\": {\n \"pt\": \"você pode tender à indulgência e à autoindulgência, buscando prazer físico, conforto e facilidades materiais. também pode haver uma tendência ao conservadorismo.\",\n \"en\": \"you may tend toward indulgence and self-indulgence, seeking physical pleasure, comfort and material conveniences. there may also be a tendency toward conservatism.\",\n \"keywords\": {\n \"pt\": [\n \"indulgência\",\n \"autoindulgência\",\n \"prazer físico\",\n \"conservadorismo\",\n \"conforto material\"\n ],\n \"en\": [\n \"indulgence\",\n \"self-indulgence\",\n \"physical pleasure\",\n \"conservatism\",\n \"material comfort\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 88,\n \"to\": 89\n }\n ],\n \"reviewNotes\": [\n \"The course's ‘tendência’ qualifier on conservatism is preserved. Book OCR window was inspected but no supplemental claims were adopted.\"\n ]\n },\n \"Gemini\": {\n \"pt\": \"você pode demonstrar simpatia e versatilidade, embora também haja superficialidade e credulidade. existe ainda a possibilidade de muitas viagens.\",\n \"en\": \"you may show friendliness and versatility, though superficiality and credulity may also be present. there is also the possibility of many trips.\",\n \"keywords\": {\n \"pt\": [\n \"simpatia\",\n \"versatilidade\",\n \"superficialidade\",\n \"credulidade\",\n \"viagens\"\n ],\n \"en\": [\n \"friendliness\",\n \"versatility\",\n \"superficiality\",\n \"credulity\",\n \"travel\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 90,\n \"to\": 91\n }\n ],\n \"reviewNotes\": [\n \"The course's success in intellectual or commercial activity is omitted because it could read as a promised outcome; it was not converted into an invented aptitude. The possibility qualifier on numerous trips is retained. Book opening was inspected but its positive curiosity/communication themes were not used as a counterweight.\"\n ]\n },\n \"Cancer\": {\n \"pt\": \"você pode ter um temperamento bonachão e gentil. também pode tender ao conservadorismo e à indulgência.\",\n \"en\": \"you may have an easygoing, kind temperament. you may also tend toward conservatism and indulgence.\",\n \"keywords\": {\n \"pt\": [\n \"temperamento bonachão\",\n \"gentileza\",\n \"conservadorismo\",\n \"indulgência\"\n ],\n \"en\": [\n \"easygoing temperament\",\n \"kindness\",\n \"conservatism\",\n \"indulgence\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 92,\n \"to\": 94\n }\n ],\n \"reviewNotes\": [\n \"Course health claim (digestive problems) and guaranteed life-stage success claim are omitted from product text; they are noted here as excluded. Book opening's caregiving/family optimism was inspected but not added as a counterweight.\"\n ]\n },\n \"Leo\": {\n \"pt\": \"você demonstra afetuosidade e generosidade, junto de inteligência e ambição. o amor pelo luxo e por objetos de valor pode vir com liderança, exagero e arrogância.\",\n \"en\": \"you show affection and generosity, alongside intelligence and ambition. a love of luxury and valuables can come with leadership, exaggeration and arrogance.\",\n \"keywords\": {\n \"pt\": [\n \"afetuosidade\",\n \"generosidade\",\n \"inteligência\",\n \"ambição\",\n \"luxo\",\n \"exagero\",\n \"arrogância\"\n ],\n \"en\": [\n \"affection\",\n \"generosity\",\n \"intelligence\",\n \"ambition\",\n \"luxury\",\n \"exaggeration\",\n \"arrogance\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 95,\n \"to\": 96\n }\n ],\n \"reviewNotes\": [\n \"O livro acrescenta expansão criativa, carisma, reconhecimento e otimismo, mas a formulação não foi usada para neutralizar exagero/arrogância do curso. Seu trecho sobre generosidade aparece em 45570-45576 e 45589-45594; curso é a citação adotada.\"\n ]\n },\n \"Virgo\": {\n \"pt\": \"você tem visão crítica da realidade, mas pode faltar senso prático. também podem aparecer preocupação com higiene, mentalidade tacanha e detalhismo.\",\n \"en\": \"you have a critical view of reality, though practical sense may be lacking. concern with hygiene, narrow-mindedness and attention to detail may also appear.\",\n \"keywords\": {\n \"pt\": [\n \"visão crítica\",\n \"falta de senso prático\",\n \"higiene\",\n \"mentalidade tacanha\",\n \"detalhismo\"\n ],\n \"en\": [\n \"critical outlook\",\n \"lack of practical sense\",\n \"hygiene\",\n \"narrow-mindedness\",\n \"attention to detail\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 97,\n \"to\": 98\n }\n ],\n \"reviewNotes\": [\n \"O curso escreve cetismo na linha 98; por estar corrompido/ambíguo, foi omitido sem reconstrução. O livro oferece organização, eficiência e praticidade (45938-45955, 45969-45971), em contraste com a falta de senso prático do curso; esses atributos não foram acrescentados como contrapeso. A preocupação com higiene foi mantida como tema do curso, sem alegação clínica.\"\n ]\n },\n \"Libra\": {\n \"pt\": \"você pode demonstrar sabedoria, equilíbrio e moderação, com temperamento amável e talento artístico. também podem aparecer preguiça, vaidade e docilidade.\",\n \"en\": \"you may show wisdom, balance and moderation, with a kind temperament and artistic talent. laziness, vanity and docility may also appear.\",\n \"keywords\": {\n \"pt\": [\n \"sabedoria\",\n \"equilíbrio\",\n \"moderação\",\n \"temperamento amável\",\n \"talento artístico\",\n \"preguiça\",\n \"vaidade\",\n \"docilidade\"\n ],\n \"en\": [\n \"wisdom\",\n \"balance\",\n \"moderation\",\n \"kind temperament\",\n \"artistic talent\",\n \"laziness\",\n \"vanity\",\n \"docility\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 99,\n \"to\": 100\n }\n ],\n \"reviewNotes\": [\n \"A abertura do livro próximo ao hint foi inspecionada apenas em 46170-46230; o OCR intercalado impede recuperar com segurança um perfil psicológico contínuo, por isso não foi adotado. Não acrescentei a narrativa de harmonia/diplomacia do livro a este trecho do curso.\"\n ]\n },\n \"Scorpio\": {\n \"pt\": \"você pode ter ambição e desejo de poder, com capacidade de análise. também podem aparecer comodismo, desconfiança, vaidade, orgulho e paixões intensas.\",\n \"en\": \"you may have ambition and a desire for power, along with analytical ability. complacency, distrust, vanity, pride and intense passions may also appear.\",\n \"keywords\": {\n \"pt\": [\n \"ambição\",\n \"desejo de poder\",\n \"análise\",\n \"comodismo\",\n \"desconfiança\",\n \"vaidade\",\n \"orgulho\",\n \"paixões intensas\"\n ],\n \"en\": [\n \"ambition\",\n \"desire for power\",\n \"analysis\",\n \"complacency\",\n \"distrust\",\n \"vanity\",\n \"pride\",\n \"intense passions\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 101,\n \"to\": 102\n }\n ],\n \"reviewNotes\": [\n \"O livro associa expansão a transformação e tabus e descreve intensidade, intuição e regeneração (46543-46560), mas esses atributos não foram adotados para compensar comodismo/desconfiança do curso nem para prometer transformação.\"\n ]\n },\n \"Sagittarius\": {\n \"pt\": \"você pode perder a visão crítica e tender ao exagero em qualquer área da vida. também pode ter boa capacidade intelectual.\",\n \"en\": \"you may lose your critical outlook and tend toward exaggeration in any area of life. you may also have good intellectual ability.\",\n \"keywords\": {\n \"pt\": [\n \"perda de visão crítica\",\n \"exagero\",\n \"boa capacidade intelectual\"\n ],\n \"en\": [\n \"loss of critical outlook\",\n \"exaggeration\",\n \"good intellectual ability\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 103,\n \"to\": 104\n }\n ],\n \"reviewNotes\": [\n \"Omitted good luck as an outcome claim, without replacing it with an invented aptitude. The standalone source word jogador remains unresolved (player/gambler or another sense) and is omitted from prose and keywords rather than interpreted as games. The fragmented book material around 46817 emphasizes optimism/enthusiasm and philosophical breadth; no such counterweight is adopted and no missing opening is reconstructed.\"\n ]\n },\n \"Capricorn\": {\n \"pt\": \"você pode ter senso de responsabilidade, autocontrole e muita ambição. severidade, austeridade e intolerância também podem estar presentes.\",\n \"en\": \"you may have a sense of responsibility, self-control and strong ambition. severity, austerity and intolerance may also be present.\",\n \"keywords\": {\n \"pt\": [\n \"responsabilidade\",\n \"autocontrole\",\n \"muita ambição\",\n \"severidade\",\n \"austeridade\",\n \"intolerância\"\n ],\n \"en\": [\n \"responsibility\",\n \"self-control\",\n \"strong ambition\",\n \"severity\",\n \"austerity\",\n \"intolerance\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 105,\n \"to\": 106\n }\n ],\n \"reviewNotes\": [\n \"Omitted slow ascent as an outcome statement; it is not converted into persistence or an aptitude for advancement. Book 47108-47116 emphasizes success through discipline, administration/leadership and authority; those outcome claims and extra aptitudes are not adopted. The printed CAPRICORIO label is normalized to canonical Capricorn.\"\n ]\n },\n \"Aquarius\": {\n \"pt\": \"você pode ter intuição e espírito humanitário, com um comportamento pouco convencional. também pode haver grosseria.\",\n \"en\": \"you may have intuition and a humanitarian spirit, with unconventional behavior. rudeness may also be present.\",\n \"keywords\": {\n \"pt\": [\n \"intuição\",\n \"espírito humanitário\",\n \"comportamento pouco convencional\",\n \"grosseria\"\n ],\n \"en\": [\n \"intuition\",\n \"humanitarian spirit\",\n \"unconventional behavior\",\n \"rudeness\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 107,\n \"to\": 108\n }\n ],\n \"reviewNotes\": [\n \"Omitted protection by influential people and friends as an external support/outcome claim; it is not converted into networking or social ability. Book 47304-47309 emphasizes innovation, group prosperity and community leadership; none is adopted to soften the primary rudeness tension.\"\n ]\n },\n \"Pisces\": {\n \"pt\": \"você pode tender à autoindulgência excessiva e ao relaxamento. bom humor, bondade e abnegação podem conviver com identificação com o sofrimento.\",\n \"en\": \"you may tend toward excessive self-indulgence and relaxation. good humor, kindness and self-denial can coexist with identification with suffering.\",\n \"keywords\": {\n \"pt\": [\n \"autoindulgência excessiva\",\n \"relaxamento\",\n \"bom humor\",\n \"bondade\",\n \"abnegação\",\n \"identificação com o sofrimento\"\n ],\n \"en\": [\n \"excessive self-indulgence\",\n \"relaxation\",\n \"good humor\",\n \"kindness\",\n \"self-denial\",\n \"identification with suffering\"\n ]\n },\n \"src\": [\n {\n \"file\": \"modulo 4/aula 12 modulo 4/aula-12.md\",\n \"from\": 109,\n \"to\": 110\n }\n ],\n \"reviewNotes\": [\n \"Preserved excessive self-indulgence and identification with suffering without diagnosis, prescribed practice or invented helping behavior. Book 47561-47567 emphasizes spirituality/compassion and growth through helping/art; none is adopted. The second hint at 47634 leads to the sign heading and nonpsychological material, which is unused. Printed PEIXE is normalized to canonical Pisces.\"\n ]\n }\n }\n }\n}\n","import raw from \"./descriptions.json\";\nimport type { Sign } from \"./dignity\";\n\n/** Lowercase chart planet keys. Not every planet has authored descriptions yet. */\nexport type DescriptionPlanet =\n | \"sun\" | \"moon\" | \"mercury\" | \"venus\" | \"mars\"\n | \"jupiter\" | \"saturn\" | \"uranus\" | \"neptune\" | \"pluto\";\n\nexport interface PlanetSignDescriptionEntry {\n readonly pt: string;\n readonly en: string;\n readonly keywords: {\n readonly pt: readonly string[];\n readonly en: readonly string[];\n };\n readonly src: readonly {\n readonly file: string;\n readonly from: number;\n readonly to: number;\n }[];\n readonly reviewNotes: readonly string[];\n}\n\nexport interface AstrologyDescriptions {\n readonly planetSigns: Readonly<\n Partial<Record<DescriptionPlanet, Readonly<Partial<Record<Sign, PlanetSignDescriptionEntry>>>>>\n >;\n}\n\n/** Imported JSON is shared process-wide, including all nested metadata. */\nfunction freeze<T>(value: T): T {\n if (value !== null && typeof value === \"object\") {\n for (const child of Object.values(value)) freeze(child);\n Object.freeze(value);\n }\n return value;\n}\n\nexport const ASTROLOGY_DESCRIPTIONS: AstrologyDescriptions = freeze(raw);\n\n/** Return the immutable authored entry; inherited keys are never descriptions. */\nexport function getPlanetSignDescriptionEntry(\n planet: DescriptionPlanet,\n sign: Sign,\n): PlanetSignDescriptionEntry | undefined {\n const planets = ASTROLOGY_DESCRIPTIONS.planetSigns;\n if (!Object.prototype.hasOwnProperty.call(planets, planet)) return undefined;\n const signs = planets[planet];\n if (!signs) return undefined;\n if (!Object.prototype.hasOwnProperty.call(signs, sign)) return undefined;\n return signs[sign];\n}\n\n/** English by default; Portuguese for locale strings starting with `pt`. */\nexport function getPlanetSignDescription(\n planet: DescriptionPlanet,\n sign: Sign,\n language?: string,\n): string | undefined {\n const entry = getPlanetSignDescriptionEntry(planet, sign);\n return language?.startsWith(\"pt\") ? entry?.pt : entry?.en;\n}\n","/**\n * Decan (face) lookup — Chaldean rulers + Golden Dawn tarot correspondence.\n * Pure math, no WASM dependency.\n */\n\nimport { normalizeAngle } from \"./swisseph\";\nimport { SIGNS } from \"./index\";\nimport type { TraditionalPlanet } from \"./dignity\";\n\nexport interface DecanResult {\n sign: string;\n decanNumber: 1 | 2 | 3;\n ruler: TraditionalPlanet;\n tarotCard: string;\n startDegree: number;\n endDegree: number;\n degreeWithinSign: number;\n}\n\n/** Chaldean descent starting from Mars (Aries decan 1). */\nconst CHALDEAN_RULERS: TraditionalPlanet[] = [\n \"Mars\", \"Sun\", \"Venus\", \"Mercury\", \"Moon\", \"Saturn\", \"Jupiter\",\n];\n\n/** Element-to-suit mapping (Golden Dawn). */\nconst SIGN_SUITS: Record<string, string> = {\n Aries: \"Wands\",\n Taurus: \"Pentacles\",\n Gemini: \"Swords\",\n Cancer: \"Cups\",\n Leo: \"Wands\",\n Virgo: \"Pentacles\",\n Libra: \"Swords\",\n Scorpio: \"Cups\",\n Sagittarius: \"Wands\",\n Capricorn: \"Pentacles\",\n Aquarius: \"Swords\",\n Pisces: \"Cups\",\n};\n\nconst RANK_NAMES = [\"Two\", \"Three\", \"Four\", \"Five\", \"Six\", \"Seven\", \"Eight\", \"Nine\", \"Ten\"];\n\nexport function getDecan(longitude: number): DecanResult {\n const L = normalizeAngle(longitude);\n const signIndex = Math.floor(L / 30) % 12;\n const degreeWithinSign = L - signIndex * 30;\n const decanIndex = Math.min(Math.floor(degreeWithinSign / 10), 2);\n const globalDecanIndex = signIndex * 3 + decanIndex;\n\n const sign = SIGNS[signIndex];\n const ruler = CHALDEAN_RULERS[globalDecanIndex % 7];\n const suit = SIGN_SUITS[sign];\n const rank = RANK_NAMES[globalDecanIndex % 9];\n const tarotCard = `${rank} of ${suit}`;\n\n return {\n sign,\n decanNumber: (decanIndex + 1) as 1 | 2 | 3,\n ruler,\n tarotCard,\n startDegree: signIndex * 30 + decanIndex * 10,\n endDegree: signIndex * 30 + (decanIndex + 1) * 10,\n degreeWithinSign,\n };\n}\n","/**\n * Dodecatemoria (12th parts) — traditional Hellenistic technique.\n * Pure math, no WASM dependency.\n */\n\nimport { normalizeAngle } from \"./swisseph\";\nimport { SIGNS } from \"./index\";\n\nexport interface DodecatemoriaResult {\n originalSign: string;\n originalDegree: number;\n dodecatemoriaSign: string;\n dodecatemoriaIndex: number;\n}\n\nexport function getDodecatemoria(longitude: number): DodecatemoriaResult {\n const L = normalizeAngle(longitude);\n const signIndex = Math.floor(L / 30) % 12;\n const degreeWithinSign = L - signIndex * 30;\n const index = Math.min(Math.floor(degreeWithinSign / 2.5), 11);\n const dodecatemoriaSignIndex = (signIndex + index) % 12;\n\n return {\n originalSign: SIGNS[signIndex],\n originalDegree: degreeWithinSign,\n dodecatemoriaSign: SIGNS[dodecatemoriaSignIndex],\n dodecatemoriaIndex: index,\n };\n}\n","/**\n * Annual & Monthly Profections — traditional Hellenistic time-lord technique.\n * Pure math. Requires a whole-sign BirthChart for house sign lookup.\n */\n\nimport type { BirthChart } from \"./index\";\nimport { getDomicileRuler, type Sign, type TraditionalPlanet } from \"./dignity\";\nimport { SIGNS } from \"./index\";\n\nexport interface AnnualProfection {\n age: number;\n house: number;\n sign: string;\n ruler: TraditionalPlanet;\n targetYear: number;\n}\n\nexport interface MonthlyProfection {\n month: number;\n startDate: Date;\n sign: string;\n ruler: TraditionalPlanet;\n}\n\nexport interface MonthlyProfectionsResult {\n annualProfection: AnnualProfection;\n months: MonthlyProfection[];\n}\n\nexport function getAnnualProfection(\n natalChart: BirthChart,\n birthDate: Date,\n targetYear?: number\n): AnnualProfection {\n const year = targetYear ?? new Date().getFullYear();\n const birthYear = birthDate.getFullYear();\n const age = year - birthYear;\n if (age < 0) {\n throw new Error(`Target year (${year}) is before birth year (${birthYear}).`);\n }\n const house = (age % 12) + 1;\n const sign = natalChart.houses.houses[house - 1].sign as Sign;\n const ruler = getDomicileRuler(sign);\n\n return { age, house, sign, ruler, targetYear: year };\n}\n\nexport function getMonthlyProfections(\n natalChart: BirthChart,\n birthDate: Date,\n targetYear?: number\n): MonthlyProfectionsResult {\n const annualProfection = getAnnualProfection(natalChart, birthDate, targetYear);\n const annualSignIndex = SIGNS.indexOf(annualProfection.sign as Sign);\n\n const bdMonth = birthDate.getMonth();\n const bdDay = birthDate.getDate();\n const year = annualProfection.targetYear;\n\n const months: MonthlyProfection[] = [];\n for (let i = 0; i < 12; i++) {\n const monthDate = new Date(year, bdMonth + i, bdDay);\n // Handle day overflow (e.g. Feb 29 → Mar 1)\n if (monthDate.getDate() !== bdDay) {\n monthDate.setDate(0); // last day of previous month\n }\n const signIndex = (annualSignIndex + i) % 12;\n const sign = SIGNS[signIndex] as Sign;\n\n months.push({\n month: i + 1,\n startDate: monthDate,\n sign,\n ruler: getDomicileRuler(sign),\n });\n }\n\n return { annualProfection, months };\n}\n","/**\n * Firdaria — traditional planetary period system.\n * Pure math, no WASM dependency.\n */\n\nexport type FirdariaPlanet =\n | \"Sun\"\n | \"Moon\"\n | \"Mercury\"\n | \"Venus\"\n | \"Mars\"\n | \"Jupiter\"\n | \"Saturn\"\n | \"NorthNode\"\n | \"SouthNode\";\n\nexport interface FirdariaSubPeriod {\n planet: FirdariaPlanet;\n startDate: Date;\n endDate: Date;\n}\n\nexport interface FirdariaMajorPeriod {\n planet: FirdariaPlanet;\n years: number;\n startDate: Date;\n endDate: Date;\n subPeriods: FirdariaSubPeriod[];\n}\n\nexport interface FirdariaResult {\n sect: \"diurnal\" | \"nocturnal\";\n currentMajor: FirdariaMajorPeriod;\n currentSub: FirdariaSubPeriod;\n allPeriods: FirdariaMajorPeriod[];\n}\n\nexport interface FirdariaOptions {\n nodeSubPeriodStart?: \"jupiter-saturn\" | \"sun-mars\";\n}\n\ninterface SequenceEntry {\n planet: FirdariaPlanet;\n years: number;\n}\n\nconst DAY_SEQUENCE: SequenceEntry[] = [\n { planet: \"Sun\", years: 10 },\n { planet: \"Venus\", years: 8 },\n { planet: \"Mercury\", years: 13 },\n { planet: \"Moon\", years: 9 },\n { planet: \"Saturn\", years: 11 },\n { planet: \"Jupiter\", years: 12 },\n { planet: \"Mars\", years: 7 },\n { planet: \"NorthNode\", years: 3 },\n { planet: \"SouthNode\", years: 2 },\n];\n\nconst NIGHT_SEQUENCE: SequenceEntry[] = [\n { planet: \"Moon\", years: 9 },\n { planet: \"Saturn\", years: 11 },\n { planet: \"Jupiter\", years: 12 },\n { planet: \"Mars\", years: 7 },\n { planet: \"NorthNode\", years: 3 },\n { planet: \"SouthNode\", years: 2 },\n { planet: \"Sun\", years: 10 },\n { planet: \"Venus\", years: 8 },\n { planet: \"Mercury\", years: 13 },\n];\n\nconst CHALDEAN_ORDER: FirdariaPlanet[] = [\n \"Saturn\", \"Jupiter\", \"Mars\", \"Sun\", \"Venus\", \"Mercury\", \"Moon\",\n];\n\nfunction addYears(date: Date, years: number): Date {\n const ms = years * 365.25 * 24 * 60 * 60 * 1000;\n return new Date(date.getTime() + ms);\n}\n\nfunction getSubPeriodStart(\n planet: FirdariaPlanet,\n options?: FirdariaOptions\n): number {\n const mode = options?.nodeSubPeriodStart ?? \"jupiter-saturn\";\n\n if (planet === \"NorthNode\") {\n if (mode === \"sun-mars\") {\n return CHALDEAN_ORDER.indexOf(\"Sun\");\n }\n return CHALDEAN_ORDER.indexOf(\"Jupiter\");\n }\n if (planet === \"SouthNode\") {\n if (mode === \"sun-mars\") {\n return CHALDEAN_ORDER.indexOf(\"Mars\");\n }\n return CHALDEAN_ORDER.indexOf(\"Saturn\");\n }\n\n // For regular planets, find position in Chaldean order\n return CHALDEAN_ORDER.indexOf(planet);\n}\n\nfunction buildSubPeriods(\n major: SequenceEntry,\n majorStart: Date,\n majorEnd: Date,\n options?: FirdariaOptions\n): FirdariaSubPeriod[] {\n const startIdx = getSubPeriodStart(major.planet, options);\n const totalMs = majorEnd.getTime() - majorStart.getTime();\n const subMs = totalMs / 7;\n\n const subs: FirdariaSubPeriod[] = [];\n for (let i = 0; i < 7; i++) {\n const subPlanet = CHALDEAN_ORDER[(startIdx + i) % 7];\n const subStart = new Date(majorStart.getTime() + i * subMs);\n const subEnd = new Date(majorStart.getTime() + (i + 1) * subMs);\n subs.push({ planet: subPlanet, startDate: subStart, endDate: subEnd });\n }\n return subs;\n}\n\nexport function getFirdaria(\n birthDate: Date,\n isDiurnal: boolean,\n targetDate?: Date,\n options?: FirdariaOptions\n): FirdariaResult {\n const target = targetDate ?? new Date();\n const sequence = isDiurnal ? DAY_SEQUENCE : NIGHT_SEQUENCE;\n const sect = isDiurnal ? \"diurnal\" : \"nocturnal\";\n\n // Build periods, cycling the 75-year sequence\n const allPeriods: FirdariaMajorPeriod[] = [];\n let cursor = new Date(birthDate.getTime());\n let foundCurrent = false;\n\n // Generate enough cycles to cover target date (max 3 cycles = 225 years)\n for (let cycle = 0; cycle < 3 && !foundCurrent; cycle++) {\n for (const entry of sequence) {\n const start = new Date(cursor.getTime());\n const end = addYears(start, entry.years);\n const subPeriods = buildSubPeriods(entry, start, end, options);\n allPeriods.push({\n planet: entry.planet,\n years: entry.years,\n startDate: start,\n endDate: end,\n subPeriods,\n });\n cursor = end;\n\n if (target.getTime() >= start.getTime() && target.getTime() < end.getTime()) {\n foundCurrent = true;\n }\n }\n }\n\n // Find current major and sub\n const currentMajor = allPeriods.find(\n (p) => target.getTime() >= p.startDate.getTime() && target.getTime() < p.endDate.getTime()\n ) ?? allPeriods[0];\n\n const currentSub = currentMajor.subPeriods.find(\n (s) => target.getTime() >= s.startDate.getTime() && target.getTime() < s.endDate.getTime()\n ) ?? currentMajor.subPeriods[0];\n\n return { sect, currentMajor, currentSub, allPeriods };\n}\n","{\n \"Aries\": {\n \"en\": \"Aries\",\n \"pt\": \"Áries\"\n },\n \"Taurus\": {\n \"en\": \"Taurus\",\n \"pt\": \"Touro\"\n },\n \"Gemini\": {\n \"en\": \"Gemini\",\n \"pt\": \"Gêmeos\"\n },\n \"Cancer\": {\n \"en\": \"Cancer\",\n \"pt\": \"Câncer\"\n },\n \"Leo\": {\n \"en\": \"Leo\",\n \"pt\": \"Leão\"\n },\n \"Virgo\": {\n \"en\": \"Virgo\",\n \"pt\": \"Virgem\"\n },\n \"Libra\": {\n \"en\": \"Libra\",\n \"pt\": \"Libra\"\n },\n \"Scorpio\": {\n \"en\": \"Scorpio\",\n \"pt\": \"Escorpião\"\n },\n \"Sagittarius\": {\n \"en\": \"Sagittarius\",\n \"pt\": \"Sagitário\"\n },\n \"Capricorn\": {\n \"en\": \"Capricorn\",\n \"pt\": \"Capricórnio\"\n },\n \"Aquarius\": {\n \"en\": \"Aquarius\",\n \"pt\": \"Aquário\"\n },\n \"Pisces\": {\n \"en\": \"Pisces\",\n \"pt\": \"Peixes\"\n },\n \"Sun\": {\n \"en\": \"Sun\",\n \"pt\": \"Sol\"\n },\n \"Moon\": {\n \"en\": \"Moon\",\n \"pt\": \"Lua\"\n },\n \"Mercury\": {\n \"en\": \"Mercury\",\n \"pt\": \"Mercúrio\"\n },\n \"Venus\": {\n \"en\": \"Venus\",\n \"pt\": \"Vênus\"\n },\n \"Mars\": {\n \"en\": \"Mars\",\n \"pt\": \"Marte\"\n },\n \"Jupiter\": {\n \"en\": \"Jupiter\",\n \"pt\": \"Júpiter\"\n },\n \"Saturn\": {\n \"en\": \"Saturn\",\n \"pt\": \"Saturno\"\n },\n \"Uranus\": {\n \"en\": \"Uranus\",\n \"pt\": \"Urano\"\n },\n \"Neptune\": {\n \"en\": \"Neptune\",\n \"pt\": \"Netuno\"\n },\n \"Pluto\": {\n \"en\": \"Pluto\",\n \"pt\": \"Plutão\"\n },\n \"Earth\": {\n \"en\": \"Earth\",\n \"pt\": \"Terra\"\n },\n \"Chiron\": {\n \"en\": \"Chiron\",\n \"pt\": \"Quíron\"\n },\n \"ASC\": {\n \"en\": \"ASC\",\n \"pt\": \"ASC\"\n },\n \"MC\": {\n \"en\": \"MC\",\n \"pt\": \"MC\"\n },\n \"DC\": {\n \"en\": \"DC\",\n \"pt\": \"DC\"\n },\n \"IC\": {\n \"en\": \"IC\",\n \"pt\": \"IC\"\n },\n \"Vertex\": {\n \"en\": \"Vertex\",\n \"pt\": \"Vértice\"\n },\n \"Wheel of Fortune\": {\n \"en\": \"Wheel of Fortune\",\n \"pt\": \"Roda da Fortuna\"\n },\n \"Mean Node\": {\n \"en\": \"Mean Node\",\n \"pt\": \"Nodo médio\"\n },\n \"True Node\": {\n \"en\": \"True Node\",\n \"pt\": \"Nodo verdadeiro\"\n },\n \"Lilith Mean\": {\n \"en\": \"Lilith Mean\",\n \"pt\": \"Lilith média\"\n },\n \"Lilith True\": {\n \"en\": \"Lilith True\",\n \"pt\": \"Lilith verdadeira\"\n },\n \"Conjunction\": {\n \"en\": \"Conjunction\",\n \"pt\": \"Conjunção\"\n },\n \"Duodecile\": {\n \"en\": \"Duodecile\",\n \"pt\": \"Semissextil\"\n },\n \"Octile\": {\n \"en\": \"Octile\",\n \"pt\": \"Semiquadratura\"\n },\n \"Sextile\": {\n \"en\": \"Sextile\",\n \"pt\": \"Sextil\"\n },\n \"Square\": {\n \"en\": \"Square\",\n \"pt\": \"Quadratura\"\n },\n \"Trine\": {\n \"en\": \"Trine\",\n \"pt\": \"Trígono\"\n },\n \"Trioctile\": {\n \"en\": \"Trioctile\",\n \"pt\": \"Sesquiquadratura\"\n },\n \"Quincunx\": {\n \"en\": \"Quincunx\",\n \"pt\": \"Quincúncio\"\n },\n \"Opposition\": {\n \"en\": \"Opposition\",\n \"pt\": \"Oposição\"\n },\n \"NorthNode\": {\n \"en\": \"NorthNode\",\n \"pt\": \"Nodo norte\"\n },\n \"SouthNode\": {\n \"en\": \"SouthNode\",\n \"pt\": \"Nodo sul\"\n },\n \"diurnal\": {\n \"en\": \"diurnal\",\n \"pt\": \"Diurna\"\n },\n \"nocturnal\": {\n \"en\": \"nocturnal\",\n \"pt\": \"Noturna\"\n },\n \"domicile\": {\n \"en\": \"domicile\",\n \"pt\": \"Domicílio\"\n },\n \"exaltation\": {\n \"en\": \"exaltation\",\n \"pt\": \"Exaltação\"\n },\n \"detriment\": {\n \"en\": \"detriment\",\n \"pt\": \"Detrimento\"\n },\n \"fall\": {\n \"en\": \"fall\",\n \"pt\": \"Queda\"\n },\n \"peregrine\": {\n \"en\": \"peregrine\",\n \"pt\": \"Peregrino\"\n },\n \"Fire\": {\n \"en\": \"Fire\",\n \"pt\": \"Fogo\"\n },\n \"Air\": {\n \"en\": \"Air\",\n \"pt\": \"Ar\"\n },\n \"Water\": {\n \"en\": \"Water\",\n \"pt\": \"Água\"\n },\n \"Ether\": {\n \"en\": \"Ether\",\n \"pt\": \"Éter\"\n },\n \"Cardinal\": {\n \"en\": \"Cardinal\",\n \"pt\": \"Cardinal\"\n },\n \"Fixed\": {\n \"en\": \"Fixed\",\n \"pt\": \"Fixo\"\n },\n \"Mutable\": {\n \"en\": \"Mutable\",\n \"pt\": \"Mutável\"\n },\n \"Ascendant\": {\n \"en\": \"Ascendant\",\n \"pt\": \"Ascendente\"\n },\n \"Midheaven\": {\n \"en\": \"Midheaven\",\n \"pt\": \"Meio do céu\"\n },\n \"Descendant\": {\n \"en\": \"Descendant\",\n \"pt\": \"Descendente\"\n },\n \"Imum Coeli\": {\n \"en\": \"Imum Coeli\",\n \"pt\": \"Fundo do céu\"\n },\n \"conjunction\": {\n \"en\": \"conjunction\",\n \"pt\": \"conjunção\"\n },\n \"duodecile\": {\n \"en\": \"duodecile\",\n \"pt\": \"semissextil\"\n },\n \"octile\": {\n \"en\": \"octile\",\n \"pt\": \"semiquadratura\"\n },\n \"sextile\": {\n \"en\": \"sextile\",\n \"pt\": \"sextil\"\n },\n \"square\": {\n \"en\": \"square\",\n \"pt\": \"quadratura\"\n },\n \"trine\": {\n \"en\": \"trine\",\n \"pt\": \"trígono\"\n },\n \"trioctile\": {\n \"en\": \"trioctile\",\n \"pt\": \"sesquiquadratura\"\n },\n \"quincunx\": {\n \"en\": \"quincunx\",\n \"pt\": \"quincúncio\"\n },\n \"opposition\": {\n \"en\": \"opposition\",\n \"pt\": \"oposição\"\n }\n}\n","import raw from \"./labels.json\";\nimport { TAROT_CONTENT } from \"../core/tarot-content\";\nimport { freezeTextData } from \"../localization\";\n\n/** Names used by astrology calculations, including dignity, sect and lunar nodes. */\nexport const ASTROLOGY_LABELS: Readonly<Record<string, Readonly<{ en: string; pt: string }>>> = freezeTextData(raw);\nconst tarotNames = new Map(Object.values(TAROT_CONTENT).map(row => [row.en.PAPUS_KAABALISTIC.name, row.pt.PAPUS_KAABALISTIC.name]));\n\n/**\n * Display a sign, planet, node, dignity, sect, aspect or decan card name in the requested language.\n * English is the default. Calculation identifiers remain unchanged. Unknown names pass through.\n */\nexport function getAstrologyLabel(label: string, language?: string): string {\n if (!language?.startsWith(\"pt\")) return label;\n return ASTROLOGY_LABELS[label]?.pt ?? tarotNames.get(label) ?? label;\n}\n","/**\n * Astrological calculations using Swiss Ephemeris\n */\n\nimport {\n type AzaltResult,\n CalcFlag,\n calcParsFortunae,\n calculateHouses,\n calculatePlanetaryPositions,\n calculateSinglePlanetPosition,\n closeSwissEph,\n getSwissEph,\n resolveSwissEphRuntimeAssets,\n HouseSystem,\n normalizeAngle,\n Planet,\n PLANET_AND_NODE_NAMES,\n PlanetPosition,\n type LocalDateTimeParts,\n type ResolveSwissEphRuntimeAssetsOptions,\n RiseTransitFlag,\n type SwissEphRuntimeAssetPaths,\n TimeZoneOptions,\n toUtcDate,\n VirtualNodes,\n} from \"./swisseph\";\n\nexport {\n type AzaltResult,\n type LocalDateTimeParts,\n CalcFlag,\n closeSwissEph,\n getSwissEph,\n type ResolveSwissEphRuntimeAssetsOptions,\n type SwissEphRuntimeAssetPaths,\n resolveSwissEphRuntimeAssets,\n HouseSystem,\n normalizeAngle,\n Planet,\n PLANET_AND_NODE_NAMES,\n RiseTransitFlag,\n VirtualNodes\n};\n\nexport * from \"./astrocartography\";\nexport * from \"./aspects\";\nexport * from \"./dignity\";\nexport * from \"./descriptions\";\nexport * from \"./decans\";\nexport * from \"./dodecatemoria\";\nexport * from \"./profections\";\nexport * from \"./firdaria\";\nimport {\n computeAspects,\n computeSynastryAspects,\n computeTransitAspects,\n computeMidpoints,\n shorterArcMidpoint,\n DEFAULT_ASPECT_SPECS,\n SLOW_PLANETS,\n type AspectEdge,\n type AspectName,\n type AspectSpec,\n type TransitAspectEdge,\n type TransitAspectPoint,\n} from \"./aspects\";\n\nexport interface BirthChartOptions {\n /**\n * Local civil date-time for the chart moment.\n * Prefer `LocalDateTimeParts` when the source data comes from separate\n * date/time inputs so callers do not have to encode wall-clock parts into a\n * browser-local `Date`.\n */\n date: Date | LocalDateTimeParts;\n latitude: number;\n longitude: number;\n houseSystem?: HouseSystem;\n timeZoneSettings?: TimeZoneOptions;\n}\n\nexport type ZodiacPosition = {\n sign: string;\n decimalDegrees: number; // degrees within the sign (0–30)\n traditionalFormat: string; // \"D°MM'\"\n decimal: string; // \"D.dd°\"\n longitude: number;\n house: number;\n};\nexport type HydratedNode = ZodiacPosition & { id: VirtualNodes; name: string };\nexport type HydratedPlanet = PlanetPosition & {\n id: Planet;\n name: string;\n zodiacPosition: ZodiacPosition;\n};\nexport type Sect = \"diurnal\" | \"nocturnal\";\n\nexport interface BirthChart {\n dateUtc: Date;\n planets: Record<string, HydratedPlanet>;\n nodes: Record<string, HydratedNode>;\n houses: {\n ascendant: ZodiacPosition;\n mc: ZodiacPosition;\n dc: ZodiacPosition;\n ic: ZodiacPosition;\n houses: ZodiacPosition[];\n ascmc?: {\n armc?: ZodiacPosition;\n vertex?: ZodiacPosition;\n equasc?: ZodiacPosition;\n coasc1?: ZodiacPosition;\n coasc2?: ZodiacPosition;\n polasc?: ZodiacPosition;\n };\n };\n aspects: AspectEdge[];\n sect: Sect;\n}\n\n/**\n * Determines chart sect from the Sun's house position.\n * Houses 7-12 place the Sun above the horizon, matching the rule used by getBirthChart.\n */\nexport function getSect(sunHouse: number): Sect {\n return sunHouse >= 7 && sunHouse <= 12 ? \"diurnal\" : \"nocturnal\";\n}\n\nfunction isValidLocalDateTimeParts(date: LocalDateTimeParts): boolean {\n const hour = date.hour ?? 0;\n const minute = date.minute ?? 0;\n const second = date.second ?? 0;\n\n if (\n !Number.isInteger(date.year) ||\n !Number.isInteger(date.month) ||\n !Number.isInteger(date.day) ||\n !Number.isInteger(hour) ||\n !Number.isInteger(minute) ||\n !Number.isInteger(second)\n ) {\n return false;\n }\n\n if (\n date.month < 1 || date.month > 12 ||\n date.day < 1 || date.day > 31 ||\n hour < 0 || hour > 23 ||\n minute < 0 || minute > 59 ||\n second < 0 || second > 59\n ) {\n return false;\n }\n\n const utcDate = new Date(Date.UTC(date.year, date.month - 1, date.day, hour, minute, second));\n return (\n !Number.isNaN(utcDate.getTime()) &&\n utcDate.getUTCFullYear() === date.year &&\n utcDate.getUTCMonth() === date.month - 1 &&\n utcDate.getUTCDate() === date.day &&\n utcDate.getUTCHours() === hour &&\n utcDate.getUTCMinutes() === minute &&\n utcDate.getUTCSeconds() === second\n );\n}\n\nfunction getCivilMonthDay(date: Date | LocalDateTimeParts): { monthIndex: number; day: number } {\n if (date instanceof Date) {\n return {\n monthIndex: date.getMonth(),\n day: date.getDate(),\n };\n }\n\n return {\n monthIndex: date.month - 1,\n day: date.day,\n };\n}\n\nfunction validateInputs(options: BirthChartOptions): void {\n const { date } = options;\n\n if (date instanceof Date) {\n if (Number.isNaN(date.getTime())) {\n throw new Error(\"Invalid date provided\");\n }\n } else if (!isValidLocalDateTimeParts(date)) {\n throw new Error(\"Invalid date provided\");\n }\n\n if (\n typeof options.latitude !== \"number\" ||\n options.latitude < -90 ||\n options.latitude > 90\n ) {\n throw new Error(\"Invalid latitude: must be between -90 and 90 degrees\");\n }\n\n if (\n typeof options.longitude !== \"number\" ||\n options.longitude < -180 ||\n options.longitude > 180\n ) {\n throw new Error(\"Invalid longitude: must be between -180 and 180 degrees\");\n }\n}\n\nfunction hydratePlanet(\n id: Planet,\n position: PlanetPosition,\n houseCusps: number[]\n): HydratedPlanet {\n return {\n ...position,\n id,\n name: PLANET_AND_NODE_NAMES[id],\n zodiacPosition: getZodiacPosition(position.longitude, houseCusps),\n };\n}\n\n/**\n * Calculate a birth chart using Swiss Ephemeris\n *\n * @param options Chart calculation options\n * @returns Birth chart data\n */\nexport async function getBirthChart(\n options: BirthChartOptions\n): Promise<BirthChart> {\n try {\n // Validate inputs\n validateInputs(options);\n\n // Determine time zone strategy: default to auto from lat/lon\n const tzOptions: TimeZoneOptions = options.timeZoneSettings ?? { autoTimeZone: true };\n const utcDate = await toUtcDate(options.date, options.latitude, options.longitude, tzOptions);\n\n // Calculate planetary positions\n const planetPositions = await calculatePlanetaryPositions(utcDate);\n if (!planetPositions) {\n throw new Error(\"Failed to calculate planetary positions\");\n }\n\n // Calculate houses\n const housesPositions = await calculateHouses(\n utcDate,\n options.latitude,\n options.longitude,\n options.houseSystem || HouseSystem.PLACIDUS,\n { treatAsUTC: true }\n );\n if (!housesPositions) {\n throw new Error(\"Failed to calculate houses\");\n }\n\n // skipping the first house since swisseph uses it as dummy 0deg aries\n const houseCusps = housesPositions.houses.slice(1, 13).map(normalizeAngle);\n\n const planets: Record<string, HydratedPlanet> = {};\n for (const [planetId, position] of Object.entries(planetPositions)) {\n const id = planetId as unknown as Planet;\n const hydratedPlanet = hydratePlanet(id, position, houseCusps);\n planets[hydratedPlanet.name.toLocaleLowerCase()] = hydratedPlanet;\n }\n\n const houseCuspsPositions = houseCusps.map((lon) =>\n getZodiacPosition(lon, houseCusps)\n );\n\n const descendant = normalizeAngle(housesPositions.ascendant + 180);\n const imumCoeli = normalizeAngle(housesPositions.mc + 180);\n\n const ascendantSign = getZodiacPosition(\n housesPositions.ascendant,\n houseCusps\n );\n const midheavenSign = getZodiacPosition(housesPositions.mc, houseCusps);\n const descendantSign = getZodiacPosition(descendant, houseCusps);\n const imumCoeliSign = getZodiacPosition(imumCoeli, houseCusps);\n\n const houses: BirthChart[\"houses\"] = {\n ascendant: ascendantSign,\n mc: midheavenSign,\n dc: descendantSign,\n ic: imumCoeliSign,\n houses: houseCuspsPositions,\n ascmc: {\n armc: housesPositions.ascmc\n ? getZodiacPosition(housesPositions.ascmc.armc, houseCusps)\n : undefined,\n vertex: housesPositions.ascmc\n ? getZodiacPosition(housesPositions.ascmc.vertex, houseCusps)\n : undefined,\n equasc: housesPositions.ascmc\n ? getZodiacPosition(housesPositions.ascmc.equasc, houseCusps)\n : undefined,\n coasc1: housesPositions.ascmc\n ? getZodiacPosition(housesPositions.ascmc.coasc1, houseCusps)\n : undefined,\n coasc2: housesPositions.ascmc\n ? getZodiacPosition(housesPositions.ascmc.coasc2, houseCusps)\n : undefined,\n polasc: housesPositions.ascmc\n ? getZodiacPosition(housesPositions.ascmc.polasc, houseCusps)\n : undefined,\n },\n };\n\n const sect = getSect(planets.sun.zodiacPosition.house);\n const isDiurnal = sect === \"diurnal\";\n const wheelOfFortuneLongitude = calcParsFortunae(\n houses.ascendant.longitude,\n planets.sun.longitude,\n planets.moon.longitude,\n isDiurnal\n );\n\n const wheelOfFortune = getZodiacPosition(\n wheelOfFortuneLongitude,\n houseCusps\n );\n\n const nodes: Record<string, HydratedNode> = {\n [VirtualNodes.PARS_FORTUNAE]: {\n ...wheelOfFortune,\n id: VirtualNodes.PARS_FORTUNAE,\n name: PLANET_AND_NODE_NAMES[VirtualNodes.PARS_FORTUNAE],\n },\n };\n\n const aspects = computeAspects(getAspectPoints(planets, houses.ascendant.longitude, houses.mc.longitude));\n\n return {\n dateUtc: utcDate,\n planets,\n houses,\n nodes,\n aspects,\n sect,\n };\n } catch (error) {\n console.error(\"Error calculating birth chart:\", error);\n throw error;\n }\n}\n\nexport const SIGNS = [\n \"Aries\",\n \"Taurus\",\n \"Gemini\",\n \"Cancer\",\n \"Leo\",\n \"Virgo\",\n \"Libra\",\n \"Scorpio\",\n \"Sagittarius\",\n \"Capricorn\",\n \"Aquarius\",\n \"Pisces\",\n] as const;\n\n/**\n * Convert decimal degrees to degrees and minutes format\n *\n * @param decimalDegrees Decimal degrees (e.g., 9.8)\n * @returns Formatted string (e.g., \"9°48'\")\n */\nexport function formatDegreeMinutes(decimalDegrees: number): string {\n let deg = Math.floor(decimalDegrees);\n let min = Math.round((decimalDegrees - deg) * 60);\n if (min === 60) {\n min = 0;\n deg += 1;\n } // carry\n return `${deg}°${String(min).padStart(2, \"0\")}'`;\n}\n\n/**\n * Convert decimal degrees to zodiac position (sign and degrees)\n *\n * @param longitude Longitude in decimal degrees (0-360)\n * @returns Formatted zodiac position with both decimal and traditional format\n */\nexport function getZodiacPosition(\n longitude: number,\n houseCusps: number[]\n): ZodiacPosition {\n const L = normalizeAngle(longitude);\n const signIndex = Math.floor(L / 30) % 12;\n const within = L - signIndex * 30; // 0–<30\n const house = findHouseOf(L, houseCusps);\n\n return {\n sign: SIGNS[signIndex],\n decimalDegrees: within,\n traditionalFormat: formatDegreeMinutes(within),\n decimal: within.toFixed(2) + \"°\",\n longitude: L,\n house,\n };\n}\n\n// Find the house of a longitude (0–360) given the array of cusps (0–360)\nexport function findHouseOf(\n longitude: number,\n housePositions: number[]\n): number {\n const L = normalizeAngle(longitude);\n\n if (!housePositions || housePositions.length === 0) {\n throw new Error(\"House positions are required\");\n }\n\n const H = housePositions\n .map((c, i) => ({ i: i + 1, L: normalizeAngle(c) }))\n .sort((a, b) => a.L - b.L);\n for (let k = 0; k < H.length; k++) {\n const cur = H[k],\n nxt = H[(k + 1) % H.length];\n if (nxt.L < cur.L) {\n // wrap 360->0\n if (L >= cur.L || L < nxt.L) return cur.i;\n } else {\n if (L >= cur.L && L < nxt.L) return cur.i;\n }\n }\n return 1;\n}\n\nfunction getAspectPoints(\n planets: Record<string, { longitude: number }>,\n ascLon: number,\n mcLon: number\n): Record<string, { longitude: number }> {\n return { ...planets, ascendant: { longitude: ascLon }, mc: { longitude: mcLon } };\n}\n\n// ── Two-chart (synastry / composite) ──────────────────────────────────\n\nexport interface TwoChartOptions {\n chartA: BirthChartOptions;\n chartB: BirthChartOptions;\n aspectSpecs?: AspectSpec[];\n}\nexport type SynastryChartOptions = TwoChartOptions;\nexport type CompositeChartOptions = TwoChartOptions;\n\nexport interface SynastryChart {\n chartA: BirthChart;\n chartB: BirthChart;\n aspects: AspectEdge[];\n}\n\nexport interface CompositeChart {\n chartA: BirthChart;\n chartB: BirthChart;\n compositePlanets: Record<\n string,\n { name: string; longitude: number; zodiacPosition: ZodiacPosition }\n >;\n compositeHouses: ZodiacPosition[];\n aspects: AspectEdge[];\n}\n\nexport async function getSynastryChart(\n options: SynastryChartOptions\n): Promise<SynastryChart> {\n const [chartA, chartB] = await Promise.all([\n getBirthChart(options.chartA),\n getBirthChart(options.chartB),\n ]);\n const aspects = computeSynastryAspects(\n getAspectPoints(chartA.planets, chartA.houses.ascendant.longitude, chartA.houses.mc.longitude),\n getAspectPoints(chartB.planets, chartB.houses.ascendant.longitude, chartB.houses.mc.longitude),\n options.aspectSpecs\n );\n return { chartA, chartB, aspects };\n}\n\nexport async function getCompositeChart(\n options: CompositeChartOptions\n): Promise<CompositeChart> {\n const [chartA, chartB] = await Promise.all([\n getBirthChart(options.chartA),\n getBirthChart(options.chartB),\n ]);\n\n // Midpoint planets\n const midpointLongitudes = computeMidpoints(chartA.planets, chartB.planets);\n\n // Midpoint house cusps (shorter-arc midpoint of corresponding cusps)\n const cuspsA = chartA.houses.houses.map((h) => h.longitude);\n const cuspsB = chartB.houses.houses.map((h) => h.longitude);\n const compositeCusps = cuspsA.map((a, i) =>\n i < cuspsB.length ? shorterArcMidpoint(a, cuspsB[i]) : a\n );\n\n // Hydrate composite planets with zodiac positions using midpoint cusps\n const compositePlanets: CompositeChart[\"compositePlanets\"] = {};\n for (const [key, lon] of Object.entries(midpointLongitudes)) {\n compositePlanets[key] = {\n name: key,\n longitude: lon,\n zodiacPosition: getZodiacPosition(lon, compositeCusps),\n };\n }\n\n const compositeHouses = compositeCusps.map((lon) =>\n getZodiacPosition(lon, compositeCusps)\n );\n\n const aspects = computeAspects(compositePlanets, options.aspectSpecs);\n\n return {\n chartA,\n chartB,\n compositePlanets,\n compositeHouses,\n aspects,\n };\n}\n\n// ── Transits ────────────────────────────────────────────────────────────\n\nexport interface TransitChartOptions {\n natal: BirthChartOptions;\n transitDate: Date;\n transitLatitude?: number;\n transitLongitude?: number;\n transitTimeZoneSettings?: TimeZoneOptions;\n aspectSpecs?: AspectSpec[];\n maxOrb?: number;\n transitPlanets?: string[];\n natalPlanets?: string[];\n aspectFilter?: AspectName[];\n}\n\nexport interface TransitPlanet extends HydratedPlanet {\n retrograde: boolean;\n natalHouse: number;\n}\n\nexport interface TransitChart {\n natalChart: BirthChart;\n transitDateUtc: Date;\n transitPlanets: Record<string, TransitPlanet>;\n aspects: TransitAspectEdge[];\n}\n\nexport interface TransitRangeOptions extends Omit<TransitChartOptions, \"transitDate\"> {\n from: Date;\n to: Date;\n stepDays?: number;\n}\n\nexport interface AspectPerfection {\n transitPlanet: string;\n natalPlanet: string;\n aspect: AspectName;\n exactDate: Date;\n exactOrb: number;\n retrograde: boolean;\n category: \"slow\" | \"fast\";\n}\n\nexport interface TransitRangeResult {\n natalChart: BirthChart;\n from: Date;\n to: Date;\n perfections: AspectPerfection[];\n}\n\nfunction getTransitAspectPoints(\n planets: Record<string, HydratedPlanet>\n): Record<string, TransitAspectPoint> {\n const points: Record<string, TransitAspectPoint> = {};\n for (const [key, p] of Object.entries(planets)) {\n points[key] = { longitude: p.longitude, longitudeSpeed: p.longitudeSpeed };\n }\n return points;\n}\n\nfunction getNatalAspectPoints(\n planets: Record<string, HydratedPlanet>,\n ascLon: number,\n mcLon: number\n): Record<string, TransitAspectPoint> {\n // Natal positions are fixed targets — zero out speeds so applying/separating\n // is computed solely from transit planet motion.\n const points: Record<string, TransitAspectPoint> = {};\n for (const [key, p] of Object.entries(planets)) {\n points[key] = { longitude: p.longitude, longitudeSpeed: 0 };\n }\n points.ascendant = { longitude: ascLon, longitudeSpeed: 0 };\n points.mc = { longitude: mcLon, longitudeSpeed: 0 };\n return points;\n}\n\nfunction filterByNames(\n points: Record<string, TransitAspectPoint>,\n names?: string[]\n): Record<string, TransitAspectPoint> {\n if (!names || names.length === 0) return points;\n const allowed = new Set(names.map((n) => n.toLowerCase()));\n const result: Record<string, TransitAspectPoint> = {};\n for (const [key, val] of Object.entries(points)) {\n if (allowed.has(key)) result[key] = val;\n }\n return result;\n}\n\nexport async function getTransitChart(\n options: TransitChartOptions\n): Promise<TransitChart> {\n const natalChart = await getBirthChart(options.natal);\n\n const transitChart = await getBirthChart({\n date: options.transitDate,\n latitude: options.transitLatitude ?? options.natal.latitude,\n longitude: options.transitLongitude ?? options.natal.longitude,\n houseSystem: options.natal.houseSystem,\n timeZoneSettings: options.transitTimeZoneSettings ?? { autoTimeZone: true },\n });\n\n const natalCusps = natalChart.houses.houses.map((h) => h.longitude);\n\n // Place transit planets in natal houses\n const transitPlanets: Record<string, TransitPlanet> = {};\n for (const [key, planet] of Object.entries(transitChart.planets)) {\n const natalZodiac = getZodiacPosition(planet.longitude, natalCusps);\n transitPlanets[key] = {\n ...planet,\n retrograde: (planet.longitudeSpeed ?? 0) < 0,\n natalHouse: natalZodiac.house,\n zodiacPosition: {\n ...planet.zodiacPosition,\n house: natalZodiac.house,\n },\n };\n }\n\n // Build aspect points with filters\n let tPoints = getTransitAspectPoints(transitChart.planets);\n let nPoints = getNatalAspectPoints(\n natalChart.planets,\n natalChart.houses.ascendant.longitude,\n natalChart.houses.mc.longitude\n );\n tPoints = filterByNames(tPoints, options.transitPlanets);\n nPoints = filterByNames(nPoints, options.natalPlanets);\n\n let aspects = computeTransitAspects(tPoints, nPoints, options.aspectSpecs);\n\n if (options.maxOrb != null) {\n aspects = aspects.filter((a) => a.orb <= options.maxOrb!);\n }\n if (options.aspectFilter && options.aspectFilter.length > 0) {\n const allowed = new Set(options.aspectFilter);\n aspects = aspects.filter((a) => allowed.has(a.aspect));\n }\n\n return {\n natalChart,\n transitDateUtc: transitChart.dateUtc,\n transitPlanets,\n aspects,\n };\n}\n\nexport async function getTransitRange(\n options: TransitRangeOptions\n): Promise<TransitRangeResult> {\n const natalChart = await getBirthChart(options.natal);\n const natalCusps = natalChart.houses.houses.map((h) => h.longitude);\n\n const nPoints = filterByNames(\n getNatalAspectPoints(\n natalChart.planets,\n natalChart.houses.ascendant.longitude,\n natalChart.houses.mc.longitude\n ),\n options.natalPlanets\n );\n const natalKeys = Object.keys(nPoints);\n\n const rawStep = options.stepDays ?? 1;\n if (rawStep <= 0) throw new Error(\"stepDays must be greater than 0\");\n const fromMs = options.from.getTime();\n const toMs = options.to.getTime();\n const specs = options.aspectSpecs;\n\n // Collect positions at each step\n type StepData = {\n time: number;\n positions: Record<string, TransitAspectPoint>;\n };\n const steps: StepData[] = [];\n\n const transitLat = options.transitLatitude ?? options.natal.latitude;\n const transitLon = options.transitLongitude ?? options.natal.longitude;\n const transitTz = options.transitTimeZoneSettings ?? { autoTimeZone: true };\n\n // Auto-reduce step for fast planets (Moon moves ~13°/day, can enter and exit\n // an aspect between daily samples). Cap at 0.25 days (~6h) when fast planets\n // are in the transit set so we don't miss perfections.\n const FAST_PLANET_MAX_STEP = 0.25; // days\n let effectiveStepDays = rawStep;\n // Check if any requested transit planet is fast (not in SLOW_PLANETS)\n const requestedTransitPlanets = options.transitPlanets?.map((n) => n.toLowerCase());\n const hasFastPlanets = requestedTransitPlanets\n ? requestedTransitPlanets.some((n) => !SLOW_PLANETS.has(n))\n : true; // if no filter, assume fast planets present\n if (hasFastPlanets && effectiveStepDays > FAST_PLANET_MAX_STEP) {\n effectiveStepDays = FAST_PLANET_MAX_STEP;\n }\n const stepMs = effectiveStepDays * 86400000;\n\n // Scan one extra step beyond toMs so perfections near the boundary can be detected\n // (binary search needs two consecutive steps to spot the orb increase after a minimum).\n // Perfections are still filtered to [from, to] at the end.\n const scanEndMs = toMs + stepMs;\n for (let ms = fromMs; ms <= scanEndMs; ms += stepMs) {\n const date = new Date(ms);\n const utcDate = await toUtcDate(date, transitLat, transitLon, transitTz ?? { autoTimeZone: true });\n const positions = await calculatePlanetaryPositions(utcDate);\n if (!positions) continue;\n\n const points: Record<string, TransitAspectPoint> = {};\n for (const [planetId, pos] of Object.entries(positions)) {\n const id = planetId as unknown as Planet;\n const name = PLANET_AND_NODE_NAMES[id].toLowerCase();\n points[name] = { longitude: pos.longitude, longitudeSpeed: pos.longitudeSpeed };\n }\n steps.push({ time: ms, positions: filterByNames(points, options.transitPlanets) });\n }\n\n // Track orbs across steps and find perfections via binary search\n const perfections: AspectPerfection[] = [];\n const transitKeys = steps.length > 0 ? Object.keys(steps[0].positions) : [];\n\n for (const tKey of transitKeys) {\n for (const nKey of natalKeys) {\n let prevOrb: number | null = null;\n let prevDecreasing = false;\n let prevStep: StepData | null = null;\n\n for (const step of steps) {\n const tPos = step.positions[tKey];\n const nPos = nPoints[nKey];\n if (!tPos || !nPos) continue;\n\n // Check all aspect specs for the closest match\n const match = specs\n ? findClosestAspectOrb(tPos.longitude, nPos.longitude, specs)\n : findClosestAspectOrb(tPos.longitude, nPos.longitude);\n\n if (!match) {\n prevOrb = null;\n prevStep = step;\n continue;\n }\n\n const currentOrb = match.orb;\n if (prevOrb != null && prevStep) {\n const wasDecreasing = prevOrb > currentOrb;\n // Perfection: orb was decreasing and is now increasing\n if (prevDecreasing && !wasDecreasing && currentOrb <= (match.spec.orb)) {\n const exactResult = await binarySearchPerfection(\n tKey, nKey, match.spec,\n prevStep.time, step.time,\n nPos, transitLat, transitLon, transitTz\n );\n if (exactResult) perfections.push(exactResult);\n }\n prevDecreasing = wasDecreasing;\n } else {\n prevDecreasing = false;\n }\n prevOrb = currentOrb;\n prevStep = step;\n }\n }\n }\n\n // Filter perfections to the requested [from, to] range (scan extends beyond for detection)\n let filtered = perfections.filter((p) => {\n const t = p.exactDate.getTime();\n return t >= fromMs && t <= toMs;\n });\n if (options.maxOrb != null) {\n filtered = filtered.filter((p) => p.exactOrb <= options.maxOrb!);\n }\n if (options.aspectFilter && options.aspectFilter.length > 0) {\n const allowed = new Set(options.aspectFilter);\n filtered = filtered.filter((p) => allowed.has(p.aspect));\n }\n\n // Sort by date\n filtered.sort((a, b) => a.exactDate.getTime() - b.exactDate.getTime());\n\n return {\n natalChart,\n from: options.from,\n to: options.to,\n perfections: filtered,\n };\n}\n\nfunction findClosestAspectOrb(\n lonA: number,\n lonB: number,\n specs: AspectSpec[] = DEFAULT_ASPECT_SPECS\n): { spec: AspectSpec; orb: number; delta: number } | null {\n const a = normalizeAngle(lonA);\n const b = normalizeAngle(lonB);\n const delta = Math.min(normalizeAngle(b - a), normalizeAngle(a - b));\n\n let best: { spec: AspectSpec; orb: number; delta: number } | null = null;\n for (const spec of specs) {\n const orb = Math.abs(delta - spec.angle);\n // Use a generous search orb (spec.orb + 2) to catch approaching aspects\n if (orb <= spec.orb + 2) {\n if (!best || orb < best.orb) {\n best = { spec, orb, delta };\n }\n }\n }\n return best;\n}\n\nfunction computeOrbForAspect(\n transitLon: number,\n natalLon: number,\n aspectAngle: number\n): number {\n const delta = Math.min(\n normalizeAngle(transitLon - natalLon),\n normalizeAngle(natalLon - transitLon)\n );\n return Math.abs(delta - aspectAngle);\n}\n\n// Reverse map: lowercase name → Planet enum, built once\nconst NAME_TO_PLANET: Record<string, Planet> = {};\nfor (const [id, name] of Object.entries(PLANET_AND_NODE_NAMES)) {\n const numId = Number(id);\n if (!isNaN(numId)) NAME_TO_PLANET[name.toLowerCase()] = numId as Planet;\n}\n\nasync function getTransitLongitudeAt(\n ms: number,\n transitKey: string,\n transitLat: number,\n transitLon: number,\n transitTz: TimeZoneOptions\n): Promise<PlanetPosition | null> {\n const date = new Date(ms);\n const utc = await toUtcDate(date, transitLat, transitLon, transitTz);\n\n // Use single-planet calculation when possible (much cheaper than full ephemeris)\n const planetId = NAME_TO_PLANET[transitKey];\n if (planetId != null) {\n try {\n return calculateSinglePlanetPosition(utc, planetId);\n } catch {\n return null;\n }\n }\n\n // Fallback for non-standard names (shouldn't happen in practice)\n const positions = await calculatePlanetaryPositions(utc);\n if (!positions) return null;\n return findPlanetByName(positions, transitKey) ?? null;\n}\n\nasync function binarySearchPerfection(\n transitKey: string,\n natalKey: string,\n spec: AspectSpec,\n startMs: number,\n endMs: number,\n natalPoint: TransitAspectPoint,\n transitLat: number,\n transitLon: number,\n transitTz?: TimeZoneOptions\n): Promise<AspectPerfection | null> {\n const tz = transitTz ?? { autoTimeZone: true };\n const maxIterations = 30;\n\n // Ternary search: find the time that minimizes the orb (unimodal function)\n let lo = startMs;\n let hi = endMs;\n\n for (let i = 0; i < maxIterations; i++) {\n if (hi - lo < 60000) break; // < 1 minute precision\n\n const m1 = lo + Math.floor((hi - lo) / 3);\n const m2 = hi - Math.floor((hi - lo) / 3);\n\n const pos1 = await getTransitLongitudeAt(m1, transitKey, transitLat, transitLon, tz);\n const pos2 = await getTransitLongitudeAt(m2, transitKey, transitLat, transitLon, tz);\n if (!pos1 || !pos2) break;\n\n const orb1 = computeOrbForAspect(pos1.longitude, natalPoint.longitude, spec.angle);\n const orb2 = computeOrbForAspect(pos2.longitude, natalPoint.longitude, spec.angle);\n\n if (orb1 < orb2) {\n hi = m2;\n } else {\n lo = m1;\n }\n }\n\n // Final evaluation at converged point\n const finalMs = Math.floor((lo + hi) / 2);\n const finalPos = await getTransitLongitudeAt(finalMs, transitKey, transitLat, transitLon, tz);\n if (!finalPos) return null;\n\n const finalOrb = computeOrbForAspect(finalPos.longitude, natalPoint.longitude, spec.angle);\n\n // Reject near-miss local minima that never got close to exact\n if (finalOrb > spec.orb) return null;\n\n return {\n transitPlanet: transitKey,\n natalPlanet: natalKey,\n aspect: spec.name,\n exactDate: new Date(finalMs),\n exactOrb: finalOrb,\n retrograde: (finalPos.longitudeSpeed ?? 0) < 0,\n category: SLOW_PLANETS.has(transitKey) ? \"slow\" : \"fast\",\n };\n}\n\nfunction findPlanetByName(\n positions: Record<string, PlanetPosition>,\n name: string\n): PlanetPosition | undefined {\n for (const [planetId, pos] of Object.entries(positions)) {\n const id = planetId as unknown as Planet;\n if (PLANET_AND_NODE_NAMES[id].toLowerCase() === name) return pos;\n }\n return undefined;\n}\n\n// ── Solar Return ─────────────────────────────────────────────────────────\n\nexport interface SolarReturnOptions {\n natal: BirthChartOptions;\n year: number;\n solarReturnLatitude?: number;\n solarReturnLongitude?: number;\n solarReturnHouseSystem?: HouseSystem;\n}\n\nexport interface SolarReturnChart {\n natalChart: BirthChart;\n solarReturnChart: BirthChart;\n exactReturnDate: Date;\n natalSunLongitude: number;\n year: number;\n}\n\n/**\n * Get the Sun's ecliptic longitude at a given UTC millisecond timestamp.\n */\nasync function getSunLongitudeAtMs(ms: number): Promise<number> {\n const positions = await calculatePlanetaryPositions(new Date(ms));\n const sun = findPlanetByName(positions, \"sun\");\n if (!sun) throw new Error(\"Failed to compute Sun position\");\n return sun.longitude;\n}\n\n/**\n * Signed angular delta in (-180, 180].\n * Positive means `current` is ahead of `target` (Sun has passed the return point).\n */\nfunction signedAngularDelta(current: number, target: number): number {\n let d = normalizeAngle(current - target);\n if (d > 180) d -= 360;\n return d;\n}\n\n/**\n * Calculate a Solar Return chart — the moment the transiting Sun returns\n * to its natal longitude in the given year.\n */\nexport async function getSolarReturnChart(\n options: SolarReturnOptions\n): Promise<SolarReturnChart> {\n // 1. Compute natal chart to get natal Sun longitude\n const natalChart = await getBirthChart(options.natal);\n const natalSunLongitude = natalChart.planets.sun.longitude;\n\n // 2. Build search window: natal birthday in target year ± 2 days\n const natalDate = getCivilMonthDay(options.natal.date);\n const approxReturn = new Date(Date.UTC(\n options.year,\n natalDate.monthIndex,\n natalDate.day,\n 12, 0, 0\n ));\n let lo = approxReturn.getTime() - 2 * 86400000;\n let hi = approxReturn.getTime() + 2 * 86400000;\n\n // 3. Binary search (max 30 iterations, converge to < 60s)\n for (let i = 0; i < 30; i++) {\n if (hi - lo < 60000) break;\n\n const mid = Math.floor((lo + hi) / 2);\n const sunLon = await getSunLongitudeAtMs(mid);\n const delta = signedAngularDelta(sunLon, natalSunLongitude);\n\n if (delta < 0) {\n // Sun hasn't arrived yet → search forward\n lo = mid;\n } else {\n // Sun has passed → search backward\n hi = mid;\n }\n }\n\n const exactMs = Math.floor((lo + hi) / 2);\n const exactReturnDate = new Date(exactMs);\n\n // 4. Cast full BirthChart at converged timestamp using SR location\n const solarReturnChart = await getBirthChart({\n date: exactReturnDate,\n latitude: options.solarReturnLatitude ?? options.natal.latitude,\n longitude: options.solarReturnLongitude ?? options.natal.longitude,\n houseSystem: options.solarReturnHouseSystem ?? options.natal.houseSystem,\n // Always treatAsUTC: the binary search converged on a UTC millisecond timestamp.\n // Passing a caller timezone here would re-interpret the already-UTC instant as local,\n // shifting planetary positions by hours.\n timeZoneSettings: { treatAsUTC: true },\n });\n\n return {\n natalChart,\n solarReturnChart,\n exactReturnDate,\n natalSunLongitude,\n year: options.year,\n };\n}\n\nexport * from \"./labels\";\n"]}