kaabalah 6.7.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrology/index.js +54 -54
- package/dist/astrology/index.js.map +1 -1
- package/dist/astrology/index.mjs +3 -3
- package/dist/astrology/index.mjs.map +1 -1
- package/dist/chunk-2WCC2KCJ.js +1 -1
- package/dist/chunk-2WCC2KCJ.js.map +1 -1
- package/dist/{chunk-XTE5DSDO.js → chunk-36XZ5WR2.js} +23 -23
- package/dist/chunk-36XZ5WR2.js.map +1 -0
- package/dist/{chunk-6P2CJUTH.mjs → chunk-3UJPBUY4.mjs} +8 -6
- package/dist/chunk-3UJPBUY4.mjs.map +1 -0
- package/dist/{chunk-FM7WUVZV.js → chunk-4337NVKS.js} +8 -4
- package/dist/chunk-4337NVKS.js.map +1 -0
- package/dist/{chunk-SFUCT6I2.mjs → chunk-5HXSHALQ.mjs} +49 -43
- package/dist/chunk-5HXSHALQ.mjs.map +1 -0
- package/dist/{chunk-EFZUZI22.mjs → chunk-5K4OQ4UB.mjs} +5 -4
- package/dist/chunk-5K4OQ4UB.mjs.map +1 -0
- package/dist/{chunk-ZKIJAZ6B.mjs → chunk-6N5YC2WD.mjs} +338 -10
- package/dist/chunk-6N5YC2WD.mjs.map +1 -0
- package/dist/{chunk-PWYOHULD.mjs → chunk-7YU7TRCG.mjs} +80 -42
- package/dist/chunk-7YU7TRCG.mjs.map +1 -0
- package/dist/{chunk-6O7MTBZN.js → chunk-BEFGGHIJ.js} +84 -46
- package/dist/chunk-BEFGGHIJ.js.map +1 -0
- package/dist/{chunk-MTI2SOQ6.mjs → chunk-ITESL6GR.mjs} +4 -4
- package/dist/chunk-ITESL6GR.mjs.map +1 -0
- package/dist/{chunk-UG6HZK3Z.js → chunk-K33NFXSD.js} +109 -109
- package/dist/chunk-K33NFXSD.js.map +1 -0
- package/dist/{chunk-OKZUVGA3.js → chunk-LQX6PW35.js} +349 -15
- package/dist/chunk-LQX6PW35.js.map +1 -0
- package/dist/{chunk-WY6NIR2V.mjs → chunk-NPQZ2DOY.mjs} +8 -4
- package/dist/chunk-NPQZ2DOY.mjs.map +1 -0
- package/dist/{chunk-WIKUOEOB.mjs → chunk-QS5XAAAG.mjs} +31 -19
- package/dist/chunk-QS5XAAAG.mjs.map +1 -0
- package/dist/{chunk-UN7QMOMX.mjs → chunk-SHKAAZHT.mjs} +8 -8
- package/dist/chunk-SHKAAZHT.mjs.map +1 -0
- package/dist/{chunk-COPYH3O2.js → chunk-SYLFUBAB.js} +51 -39
- package/dist/chunk-SYLFUBAB.js.map +1 -0
- package/dist/chunk-URDMOQRN.mjs +1 -1
- package/dist/chunk-URDMOQRN.mjs.map +1 -1
- package/dist/{chunk-PAKYKIZH.js → chunk-UZ42PN5T.js} +10 -8
- package/dist/chunk-UZ42PN5T.js.map +1 -0
- package/dist/{chunk-S6KNERP7.js → chunk-VJ6RW5H4.js} +8 -7
- package/dist/chunk-VJ6RW5H4.js.map +1 -0
- package/dist/{chunk-WCOGJKT7.js → chunk-WLML6SVX.js} +53 -47
- package/dist/chunk-WLML6SVX.js.map +1 -0
- package/dist/cli.js +1175 -420
- package/dist/cli.js.map +1 -1
- package/dist/core/index.d.mts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +69 -45
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +4 -4
- package/dist/core/index.mjs.map +1 -1
- package/dist/gematria/index.js +7 -7
- package/dist/gematria/index.js.map +1 -1
- package/dist/gematria/index.mjs +4 -4
- package/dist/gematria/index.mjs.map +1 -1
- package/dist/ifa/index.js +2 -2
- package/dist/ifa/index.js.map +1 -1
- package/dist/ifa/index.mjs +2 -2
- package/dist/ifa/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +377 -353
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/numerology/index.js +20 -20
- package/dist/numerology/index.js.map +1 -1
- package/dist/numerology/index.mjs +5 -5
- package/dist/numerology/index.mjs.map +1 -1
- package/dist/semantic/index.js +28 -28
- package/dist/semantic/index.js.map +1 -1
- package/dist/semantic/index.mjs +9 -9
- package/dist/semantic/index.mjs.map +1 -1
- package/dist/{swisseph.node-6H4ISR7M.mjs → swisseph.node-2PWBQLWG.mjs} +270 -156
- package/dist/swisseph.node-2PWBQLWG.mjs.map +1 -0
- package/dist/{wasm/build/swisseph.node-UD2JYYLE.js → swisseph.node-NWM75JF3.js} +283 -169
- package/dist/swisseph.node-NWM75JF3.js.map +1 -0
- package/dist/{swisseph.web-TSFJI7DQ.mjs → swisseph.web-CK57WSU3.mjs} +264 -153
- package/dist/swisseph.web-CK57WSU3.mjs.map +1 -0
- package/dist/{wasm/build/swisseph.web-MXYBWOOS.js → swisseph.web-GPTWPXKT.js} +277 -166
- package/dist/swisseph.web-GPTWPXKT.js.map +1 -0
- package/dist/tarot/index.js +25 -25
- package/dist/tarot/index.js.map +1 -1
- package/dist/tarot/index.mjs +5 -5
- package/dist/tarot/index.mjs.map +1 -1
- package/dist/topology-Bbgniegh.d.ts +102 -0
- package/dist/topology-CSSfYL2c.d.mts +102 -0
- package/dist/visual/index.d.mts +2 -1
- package/dist/visual/index.d.ts +2 -1
- package/dist/visual/index.js +46 -46
- package/dist/visual/index.js.map +1 -1
- package/dist/visual/index.mjs +5 -5
- package/dist/visual/index.mjs.map +1 -1
- package/dist/wasm/build/{swisseph.node-6H4ISR7M.mjs → swisseph.node-2PWBQLWG.mjs} +270 -156
- package/dist/wasm/build/swisseph.node-2PWBQLWG.mjs.map +1 -0
- package/dist/{swisseph.node-UD2JYYLE.js → wasm/build/swisseph.node-NWM75JF3.js} +283 -169
- package/dist/wasm/build/swisseph.node-NWM75JF3.js.map +1 -0
- package/dist/wasm/build/{swisseph.web-TSFJI7DQ.mjs → swisseph.web-CK57WSU3.mjs} +264 -153
- package/dist/wasm/build/swisseph.web-CK57WSU3.mjs.map +1 -0
- package/dist/{swisseph.web-MXYBWOOS.js → wasm/build/swisseph.web-GPTWPXKT.js} +277 -166
- package/dist/wasm/build/swisseph.web-GPTWPXKT.js.map +1 -0
- package/package.json +7 -7
- package/dist/chunk-6O7MTBZN.js.map +0 -1
- package/dist/chunk-6P2CJUTH.mjs.map +0 -1
- package/dist/chunk-COPYH3O2.js.map +0 -1
- package/dist/chunk-EFZUZI22.mjs.map +0 -1
- package/dist/chunk-FM7WUVZV.js.map +0 -1
- package/dist/chunk-MTI2SOQ6.mjs.map +0 -1
- package/dist/chunk-OKZUVGA3.js.map +0 -1
- package/dist/chunk-PAKYKIZH.js.map +0 -1
- package/dist/chunk-PWYOHULD.mjs.map +0 -1
- package/dist/chunk-S6KNERP7.js.map +0 -1
- package/dist/chunk-SFUCT6I2.mjs.map +0 -1
- package/dist/chunk-UG6HZK3Z.js.map +0 -1
- package/dist/chunk-UN7QMOMX.mjs.map +0 -1
- package/dist/chunk-WCOGJKT7.js.map +0 -1
- package/dist/chunk-WIKUOEOB.mjs.map +0 -1
- package/dist/chunk-WY6NIR2V.mjs.map +0 -1
- package/dist/chunk-XTE5DSDO.js.map +0 -1
- package/dist/chunk-ZKIJAZ6B.mjs.map +0 -1
- package/dist/swisseph.node-6H4ISR7M.mjs.map +0 -1
- package/dist/swisseph.node-UD2JYYLE.js.map +0 -1
- package/dist/swisseph.web-MXYBWOOS.js.map +0 -1
- package/dist/swisseph.web-TSFJI7DQ.mjs.map +0 -1
- package/dist/wasm/build/swisseph.node-6H4ISR7M.mjs.map +0 -1
- package/dist/wasm/build/swisseph.node-UD2JYYLE.js.map +0 -1
- package/dist/wasm/build/swisseph.web-MXYBWOOS.js.map +0 -1
- package/dist/wasm/build/swisseph.web-TSFJI7DQ.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __require } from './chunk-
|
|
1
|
+
import { __require } from './chunk-NPQZ2DOY.mjs';
|
|
2
2
|
|
|
3
3
|
// wasm/build/swisseph.node.wasm?url
|
|
4
4
|
var swisseph_node_default = "./swisseph.node-2K5IHMKE.wasm?url";
|
|
@@ -258,7 +258,8 @@ var SwissEph = class {
|
|
|
258
258
|
const BYTES_PER_F64 = 8;
|
|
259
259
|
const totalBytes = (HOUSES_DOUBLES + ASCMC_DOUBLES) * BYTES_PER_F64;
|
|
260
260
|
const memoryPtr = this.module._malloc(totalBytes);
|
|
261
|
-
if (!memoryPtr)
|
|
261
|
+
if (!memoryPtr)
|
|
262
|
+
throw new Error("Memory allocation failed");
|
|
262
263
|
const housesPtr = memoryPtr;
|
|
263
264
|
const ascmcPtr = memoryPtr + HOUSES_DOUBLES * BYTES_PER_F64;
|
|
264
265
|
try {
|
|
@@ -382,9 +383,12 @@ var SwissEph = class {
|
|
|
382
383
|
const xinPtr = this.module._malloc(3 * BYTES);
|
|
383
384
|
const xazPtr = this.module._malloc(3 * BYTES);
|
|
384
385
|
if (!geoPtr || !xinPtr || !xazPtr) {
|
|
385
|
-
if (geoPtr)
|
|
386
|
-
|
|
387
|
-
if (
|
|
386
|
+
if (geoPtr)
|
|
387
|
+
this.module._free(geoPtr);
|
|
388
|
+
if (xinPtr)
|
|
389
|
+
this.module._free(xinPtr);
|
|
390
|
+
if (xazPtr)
|
|
391
|
+
this.module._free(xazPtr);
|
|
388
392
|
throw new Error("Memory allocation failed for azalt");
|
|
389
393
|
}
|
|
390
394
|
try {
|
|
@@ -431,9 +435,12 @@ var SwissEph = class {
|
|
|
431
435
|
const ERR_BYTES = 512;
|
|
432
436
|
const errPtr = this.module._malloc(ERR_BYTES);
|
|
433
437
|
if (!geoPtr || !tretPtr || !errPtr) {
|
|
434
|
-
if (geoPtr)
|
|
435
|
-
|
|
436
|
-
if (
|
|
438
|
+
if (geoPtr)
|
|
439
|
+
this.module._free(geoPtr);
|
|
440
|
+
if (tretPtr)
|
|
441
|
+
this.module._free(tretPtr);
|
|
442
|
+
if (errPtr)
|
|
443
|
+
this.module._free(errPtr);
|
|
437
444
|
throw new Error("Memory allocation failed for riseTransit");
|
|
438
445
|
}
|
|
439
446
|
this.module.HEAP8.fill(0, errPtr, errPtr + ERR_BYTES);
|
|
@@ -820,7 +827,7 @@ async function getSwissEph(options = {}) {
|
|
|
820
827
|
ephePath: options.ephePath
|
|
821
828
|
});
|
|
822
829
|
const finalWasmPath = runtimeAssets.wasmPath;
|
|
823
|
-
const moduleFactory = isBrowser ? (await import('./swisseph.web-
|
|
830
|
+
const moduleFactory = isBrowser ? (await import('./swisseph.web-CK57WSU3.mjs')).default : (await import('./swisseph.node-2PWBQLWG.mjs')).default;
|
|
824
831
|
const module = await moduleFactory({
|
|
825
832
|
locateFile: () => finalWasmPath
|
|
826
833
|
});
|
|
@@ -1092,7 +1099,8 @@ function computeHorizonLongitude(gmst, ra, dec, latitude, angle) {
|
|
|
1092
1099
|
const tanPhi = Math.tan(latitude * DEG);
|
|
1093
1100
|
const tanDelta = Math.tan(dec * DEG);
|
|
1094
1101
|
const cosH = -(tanPhi * tanDelta);
|
|
1095
|
-
if (Math.abs(cosH) > 1)
|
|
1102
|
+
if (Math.abs(cosH) > 1)
|
|
1103
|
+
return null;
|
|
1096
1104
|
const H = Math.acos(cosH) / DEG;
|
|
1097
1105
|
const lon = angle === "AC" ? normalizeAngle(gmst - ra - H) : normalizeAngle(gmst - ra + H);
|
|
1098
1106
|
return toGeoLon(lon);
|
|
@@ -1124,9 +1132,12 @@ function findParansAtLatitude(equatorialPositions, gmst, latitude, paranOrb = 1)
|
|
|
1124
1132
|
for (const [name, eq] of Object.entries(equatorialPositions)) {
|
|
1125
1133
|
for (const angle of ANGLES) {
|
|
1126
1134
|
let lon;
|
|
1127
|
-
if (angle === "MC")
|
|
1128
|
-
|
|
1129
|
-
else
|
|
1135
|
+
if (angle === "MC")
|
|
1136
|
+
lon = computeMCLongitude(gmst, eq.ra);
|
|
1137
|
+
else if (angle === "IC")
|
|
1138
|
+
lon = computeICLongitude(gmst, eq.ra);
|
|
1139
|
+
else
|
|
1140
|
+
lon = computeHorizonLongitude(gmst, eq.ra, eq.dec, latitude, angle);
|
|
1130
1141
|
if (lon !== null) {
|
|
1131
1142
|
lines.push({ planet: name, angle, longitude: lon });
|
|
1132
1143
|
}
|
|
@@ -1137,8 +1148,10 @@ function findParansAtLatitude(equatorialPositions, gmst, latitude, paranOrb = 1)
|
|
|
1137
1148
|
for (let j = i + 1; j < lines.length; j++) {
|
|
1138
1149
|
const a = lines[i];
|
|
1139
1150
|
const b = lines[j];
|
|
1140
|
-
if (a.planet === b.planet)
|
|
1141
|
-
|
|
1151
|
+
if (a.planet === b.planet)
|
|
1152
|
+
continue;
|
|
1153
|
+
if (a.angle === b.angle)
|
|
1154
|
+
continue;
|
|
1142
1155
|
const dist = geographicAngularDifference(a.longitude, b.longitude);
|
|
1143
1156
|
if (dist <= paranOrb) {
|
|
1144
1157
|
parans.push({
|
|
@@ -1171,8 +1184,10 @@ function queryAstrocartographyLocation(date, options) {
|
|
|
1171
1184
|
for (const [name, eq] of Object.entries(positions)) {
|
|
1172
1185
|
for (const angle of ANGLES) {
|
|
1173
1186
|
let lineLon;
|
|
1174
|
-
if (angle === "MC")
|
|
1175
|
-
|
|
1187
|
+
if (angle === "MC")
|
|
1188
|
+
lineLon = computeMCLongitude(gmst, eq.ra);
|
|
1189
|
+
else if (angle === "IC")
|
|
1190
|
+
lineLon = computeICLongitude(gmst, eq.ra);
|
|
1176
1191
|
else
|
|
1177
1192
|
lineLon = computeHorizonLongitude(
|
|
1178
1193
|
gmst,
|
|
@@ -1181,7 +1196,8 @@ function queryAstrocartographyLocation(date, options) {
|
|
|
1181
1196
|
latitude,
|
|
1182
1197
|
angle
|
|
1183
1198
|
);
|
|
1184
|
-
if (lineLon === null)
|
|
1199
|
+
if (lineLon === null)
|
|
1200
|
+
continue;
|
|
1185
1201
|
const dist = geographicAngularDifference(longitude, lineLon);
|
|
1186
1202
|
lines.push({
|
|
1187
1203
|
planet: name,
|
|
@@ -1314,14 +1330,17 @@ function computeSynastryAspects(planetsA, planetsB, specs = DEFAULT_ASPECT_SPECS
|
|
|
1314
1330
|
}
|
|
1315
1331
|
function shorterArcMidpoint(a, b) {
|
|
1316
1332
|
let diff = b - a;
|
|
1317
|
-
if (diff > 180)
|
|
1318
|
-
|
|
1333
|
+
if (diff > 180)
|
|
1334
|
+
diff -= 360;
|
|
1335
|
+
if (diff < -180)
|
|
1336
|
+
diff += 360;
|
|
1319
1337
|
return normalizeAngle(a + diff / 2);
|
|
1320
1338
|
}
|
|
1321
1339
|
function computeMidpoints(planetsA, planetsB) {
|
|
1322
1340
|
const result = {};
|
|
1323
1341
|
for (const key of Object.keys(planetsA)) {
|
|
1324
|
-
if (!(key in planetsB))
|
|
1342
|
+
if (!(key in planetsB))
|
|
1343
|
+
continue;
|
|
1325
1344
|
result[key] = shorterArcMidpoint(planetsA[key].longitude, planetsB[key].longitude);
|
|
1326
1345
|
}
|
|
1327
1346
|
return result;
|
|
@@ -1347,7 +1366,8 @@ function computeTransitAspects(transitPlanets, natalPlanets, specs = DEFAULT_ASP
|
|
|
1347
1366
|
for (const kN of keysN) {
|
|
1348
1367
|
const n = natalPlanets[kN];
|
|
1349
1368
|
const match = getAspectMatch(t.longitude, n.longitude, specs);
|
|
1350
|
-
if (!match)
|
|
1369
|
+
if (!match)
|
|
1370
|
+
continue;
|
|
1351
1371
|
const tSpeed = t.longitudeSpeed ?? 0;
|
|
1352
1372
|
const nSpeed = n.longitudeSpeed ?? 0;
|
|
1353
1373
|
const dt = 0.01;
|
|
@@ -1810,9 +1830,11 @@ function findHouseOf(longitude, housePositions) {
|
|
|
1810
1830
|
for (let k = 0; k < H.length; k++) {
|
|
1811
1831
|
const cur = H[k], nxt = H[(k + 1) % H.length];
|
|
1812
1832
|
if (nxt.L < cur.L) {
|
|
1813
|
-
if (L >= cur.L || L < nxt.L)
|
|
1833
|
+
if (L >= cur.L || L < nxt.L)
|
|
1834
|
+
return cur.i;
|
|
1814
1835
|
} else {
|
|
1815
|
-
if (L >= cur.L && L < nxt.L)
|
|
1836
|
+
if (L >= cur.L && L < nxt.L)
|
|
1837
|
+
return cur.i;
|
|
1816
1838
|
}
|
|
1817
1839
|
}
|
|
1818
1840
|
return 1;
|
|
@@ -1880,11 +1902,13 @@ function getNatalAspectPoints(planets, ascLon, mcLon) {
|
|
|
1880
1902
|
return points;
|
|
1881
1903
|
}
|
|
1882
1904
|
function filterByNames(points, names) {
|
|
1883
|
-
if (!names || names.length === 0)
|
|
1905
|
+
if (!names || names.length === 0)
|
|
1906
|
+
return points;
|
|
1884
1907
|
const allowed = new Set(names.map((n) => n.toLowerCase()));
|
|
1885
1908
|
const result = {};
|
|
1886
1909
|
for (const [key, val] of Object.entries(points)) {
|
|
1887
|
-
if (allowed.has(key))
|
|
1910
|
+
if (allowed.has(key))
|
|
1911
|
+
result[key] = val;
|
|
1888
1912
|
}
|
|
1889
1913
|
return result;
|
|
1890
1914
|
}
|
|
@@ -1947,7 +1971,8 @@ async function getTransitRange(options) {
|
|
|
1947
1971
|
);
|
|
1948
1972
|
const natalKeys = Object.keys(nPoints);
|
|
1949
1973
|
const rawStep = options.stepDays ?? 1;
|
|
1950
|
-
if (rawStep <= 0)
|
|
1974
|
+
if (rawStep <= 0)
|
|
1975
|
+
throw new Error("stepDays must be greater than 0");
|
|
1951
1976
|
const fromMs = options.from.getTime();
|
|
1952
1977
|
const toMs = options.to.getTime();
|
|
1953
1978
|
const specs = options.aspectSpecs;
|
|
@@ -1968,7 +1993,8 @@ async function getTransitRange(options) {
|
|
|
1968
1993
|
const date = new Date(ms);
|
|
1969
1994
|
const utcDate = await toUtcDate(date, transitLat, transitLon, transitTz ?? { autoTimeZone: true });
|
|
1970
1995
|
const positions = await calculatePlanetaryPositions(utcDate);
|
|
1971
|
-
if (!positions)
|
|
1996
|
+
if (!positions)
|
|
1997
|
+
continue;
|
|
1972
1998
|
const points = {};
|
|
1973
1999
|
for (const [planetId, pos] of Object.entries(positions)) {
|
|
1974
2000
|
const id = planetId;
|
|
@@ -1987,7 +2013,8 @@ async function getTransitRange(options) {
|
|
|
1987
2013
|
for (const step of steps) {
|
|
1988
2014
|
const tPos = step.positions[tKey];
|
|
1989
2015
|
const nPos = nPoints[nKey];
|
|
1990
|
-
if (!tPos || !nPos)
|
|
2016
|
+
if (!tPos || !nPos)
|
|
2017
|
+
continue;
|
|
1991
2018
|
const match = specs ? findClosestAspectOrb(tPos.longitude, nPos.longitude, specs) : findClosestAspectOrb(tPos.longitude, nPos.longitude);
|
|
1992
2019
|
if (!match) {
|
|
1993
2020
|
prevOrb = null;
|
|
@@ -2009,7 +2036,8 @@ async function getTransitRange(options) {
|
|
|
2009
2036
|
transitLon,
|
|
2010
2037
|
transitTz
|
|
2011
2038
|
);
|
|
2012
|
-
if (exactResult)
|
|
2039
|
+
if (exactResult)
|
|
2040
|
+
perfections.push(exactResult);
|
|
2013
2041
|
}
|
|
2014
2042
|
prevDecreasing = wasDecreasing;
|
|
2015
2043
|
} else {
|
|
@@ -2064,7 +2092,8 @@ function computeOrbForAspect(transitLon, natalLon, aspectAngle) {
|
|
|
2064
2092
|
var NAME_TO_PLANET = {};
|
|
2065
2093
|
for (const [id, name] of Object.entries(PLANET_AND_NODE_NAMES)) {
|
|
2066
2094
|
const numId = Number(id);
|
|
2067
|
-
if (!isNaN(numId))
|
|
2095
|
+
if (!isNaN(numId))
|
|
2096
|
+
NAME_TO_PLANET[name.toLowerCase()] = numId;
|
|
2068
2097
|
}
|
|
2069
2098
|
async function getTransitLongitudeAt(ms, transitKey, transitLat, transitLon, transitTz) {
|
|
2070
2099
|
const date = new Date(ms);
|
|
@@ -2078,7 +2107,8 @@ async function getTransitLongitudeAt(ms, transitKey, transitLat, transitLon, tra
|
|
|
2078
2107
|
}
|
|
2079
2108
|
}
|
|
2080
2109
|
const positions = await calculatePlanetaryPositions(utc);
|
|
2081
|
-
if (!positions)
|
|
2110
|
+
if (!positions)
|
|
2111
|
+
return null;
|
|
2082
2112
|
return findPlanetByName(positions, transitKey) ?? null;
|
|
2083
2113
|
}
|
|
2084
2114
|
async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs, natalPoint, transitLat, transitLon, transitTz) {
|
|
@@ -2087,12 +2117,14 @@ async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs
|
|
|
2087
2117
|
let lo = startMs;
|
|
2088
2118
|
let hi = endMs;
|
|
2089
2119
|
for (let i = 0; i < maxIterations; i++) {
|
|
2090
|
-
if (hi - lo < 6e4)
|
|
2120
|
+
if (hi - lo < 6e4)
|
|
2121
|
+
break;
|
|
2091
2122
|
const m1 = lo + Math.floor((hi - lo) / 3);
|
|
2092
2123
|
const m2 = hi - Math.floor((hi - lo) / 3);
|
|
2093
2124
|
const pos1 = await getTransitLongitudeAt(m1, transitKey, transitLat, transitLon, tz);
|
|
2094
2125
|
const pos2 = await getTransitLongitudeAt(m2, transitKey, transitLat, transitLon, tz);
|
|
2095
|
-
if (!pos1 || !pos2)
|
|
2126
|
+
if (!pos1 || !pos2)
|
|
2127
|
+
break;
|
|
2096
2128
|
const orb1 = computeOrbForAspect(pos1.longitude, natalPoint.longitude, spec.angle);
|
|
2097
2129
|
const orb2 = computeOrbForAspect(pos2.longitude, natalPoint.longitude, spec.angle);
|
|
2098
2130
|
if (orb1 < orb2) {
|
|
@@ -2103,9 +2135,11 @@ async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs
|
|
|
2103
2135
|
}
|
|
2104
2136
|
const finalMs = Math.floor((lo + hi) / 2);
|
|
2105
2137
|
const finalPos = await getTransitLongitudeAt(finalMs, transitKey, transitLat, transitLon, tz);
|
|
2106
|
-
if (!finalPos)
|
|
2138
|
+
if (!finalPos)
|
|
2139
|
+
return null;
|
|
2107
2140
|
const finalOrb = computeOrbForAspect(finalPos.longitude, natalPoint.longitude, spec.angle);
|
|
2108
|
-
if (finalOrb > spec.orb)
|
|
2141
|
+
if (finalOrb > spec.orb)
|
|
2142
|
+
return null;
|
|
2109
2143
|
return {
|
|
2110
2144
|
transitPlanet: transitKey,
|
|
2111
2145
|
natalPlanet: natalKey,
|
|
@@ -2119,19 +2153,22 @@ async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs
|
|
|
2119
2153
|
function findPlanetByName(positions, name) {
|
|
2120
2154
|
for (const [planetId, pos] of Object.entries(positions)) {
|
|
2121
2155
|
const id = planetId;
|
|
2122
|
-
if (PLANET_AND_NODE_NAMES[id].toLowerCase() === name)
|
|
2156
|
+
if (PLANET_AND_NODE_NAMES[id].toLowerCase() === name)
|
|
2157
|
+
return pos;
|
|
2123
2158
|
}
|
|
2124
2159
|
return void 0;
|
|
2125
2160
|
}
|
|
2126
2161
|
async function getSunLongitudeAtMs(ms) {
|
|
2127
2162
|
const positions = await calculatePlanetaryPositions(new Date(ms));
|
|
2128
2163
|
const sun = findPlanetByName(positions, "sun");
|
|
2129
|
-
if (!sun)
|
|
2164
|
+
if (!sun)
|
|
2165
|
+
throw new Error("Failed to compute Sun position");
|
|
2130
2166
|
return sun.longitude;
|
|
2131
2167
|
}
|
|
2132
2168
|
function signedAngularDelta(current, target) {
|
|
2133
2169
|
let d = normalizeAngle(current - target);
|
|
2134
|
-
if (d > 180)
|
|
2170
|
+
if (d > 180)
|
|
2171
|
+
d -= 360;
|
|
2135
2172
|
return d;
|
|
2136
2173
|
}
|
|
2137
2174
|
async function getSolarReturnChart(options) {
|
|
@@ -2149,7 +2186,8 @@ async function getSolarReturnChart(options) {
|
|
|
2149
2186
|
let lo = approxReturn.getTime() - 2 * 864e5;
|
|
2150
2187
|
let hi = approxReturn.getTime() + 2 * 864e5;
|
|
2151
2188
|
for (let i = 0; i < 30; i++) {
|
|
2152
|
-
if (hi - lo < 6e4)
|
|
2189
|
+
if (hi - lo < 6e4)
|
|
2190
|
+
break;
|
|
2153
2191
|
const mid = Math.floor((lo + hi) / 2);
|
|
2154
2192
|
const sunLon = await getSunLongitudeAtMs(mid);
|
|
2155
2193
|
const delta = signedAngularDelta(sunLon, natalSunLongitude);
|
|
@@ -2181,5 +2219,5 @@ async function getSolarReturnChart(options) {
|
|
|
2181
2219
|
}
|
|
2182
2220
|
|
|
2183
2221
|
export { ASTROCARTOGRAPHY_DEFAULT_PLANETS, CalcFlag, DEFAULT_ASPECT_SPECS, DOMICILE_RULERS, EXALTATIONS, HouseSystem, PLANET_AND_NODE_NAMES, Planet, RiseTransitFlag, SIGNS, SLOW_PLANETS, VirtualNodes, closeSwissEph, computeAspects, computeAstrocartographyMap, computeEquatorialPositions, computeGMST, computeHorizonLongitude, computeICLongitude, computeMCLongitude, computeMidpoints, computeSynastryAspects, computeTransitAspects, findHouseOf, findParansAtLatitude, formatDegreeMinutes, geographicAngularDifference, getAnnualProfection, getAspectMatch, getBirthChart, getCompositeChart, getDecan, getDetriment, getDodecatemoria, getDomicileRuler, getEssentialDignity, getExaltation, getFall, getFirdaria, getMonthlyProfections, getOppositeSign, getSolarReturnChart, getSwissEph, getSynastryChart, getTransitChart, getTransitRange, getZodiacPosition, normalizeAngle, queryAstrocartographyLocation, resolveSwissEphRuntimeAssets, shorterArcMidpoint };
|
|
2184
|
-
//# sourceMappingURL=
|
|
2185
|
-
//# sourceMappingURL=chunk-
|
|
2222
|
+
//# sourceMappingURL=out.js.map
|
|
2223
|
+
//# sourceMappingURL=chunk-7YU7TRCG.mjs.map
|