dsh-metaphysics 0.62.5 → 0.64.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/CHANGELOG.md +147 -3
- package/client.almanac.js +49 -49
- package/client.chart.js +222 -0
- package/client.chenggu.js +57 -57
- package/client.convert.js +50 -50
- package/client.daliuren.js +116 -105
- package/client.fengshui.js +44 -44
- package/client.js +394 -273
- package/client.liuyao.js +112 -101
- package/client.mbti.js +50 -50
- package/client.name.js +51 -51
- package/client.numerology.js +50 -50
- package/client.qimen.js +110 -99
- package/client.star.js +66 -66
- package/client.tarot.js +113 -102
- package/client.xiaoliuren.js +51 -51
- package/client.zeri.js +50 -50
- package/engine/diff.js +14 -0
- package/engine/index.js +33 -5
- package/engine/interpret.js +37 -4
- package/engine/structure.js +1 -1
- package/engine/xiaoliuren.js +6 -2
- package/engine/ziwei.js +114 -19
- package/index.js +22 -2
- package/package.json +1 -1
- package//345/221/275/347/220/206/346/216/222/347/233/230.html +464 -70
- package/client.bazi.js +0 -211
- package/client.hepan.js +0 -210
- package/client.trend.js +0 -202
- package/client.ziwei.js +0 -211
|
@@ -362,7 +362,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
|
|
|
362
362
|
<div class="wrap">
|
|
363
363
|
<header>
|
|
364
364
|
<div class="brand-row">
|
|
365
|
-
<div class="brand"><span class="seal" aria-hidden="true">命</span><span class="brand-txt">命理排盘<span class="ver">v0.
|
|
365
|
+
<div class="brand"><span class="seal" aria-hidden="true">命</span><span class="brand-txt">命理排盘<span class="ver">v0.64.0</span><small>八字 · 紫微 · 六爻 · 梅花 · 六壬 · 奇门 · 合盘 · 塔罗 全部在本机计算</small></span></div>
|
|
366
366
|
<div class="view-switch">
|
|
367
367
|
<span class="hint">熟练了可以换回平铺</span>
|
|
368
368
|
<span class="seg" role="group" aria-label="首屏样式">
|
|
@@ -653,7 +653,7 @@ h3::after{content:"";flex:1;height:1px;background:linear-gradient(90deg,var(--li
|
|
|
653
653
|
<h3>对拍:把典籍当期望值</h3>
|
|
654
654
|
<ul><li>六爻:京房八宫卦序与世应,64 卦全表;旬空六旬表</li><li>六壬:日干寄宫、中气换将;紫微:纳音定五行局、紫微天府相照</li><li>卦例:《增删卜易》9 条 +《卜筮正宗》128 条(93 成对 + 35 静卦),核本变卦 / 动爻数 / 卦宫 / 缺爻 / 旬空</li><li>奇门:20 个时辰 × 9 宫,核四柱 / 局数 / 值符 / 值使 / 星门神 / 天盘干</li></ul>
|
|
655
655
|
<h3>工程验证</h3>
|
|
656
|
-
<ul><li>测试:
|
|
656
|
+
<ul><li>测试:164 个测试文件 / 8891 条断言;七道闸(回归 · 断言基线 · 测试可失败自检 · HTML 注入面 · 工程约定 · 产物宿主形态 · 随机扫射)</li><li>可复现:seed / asOf 显式;同一输入同一输出</li><li>口径:晚子时、真太阳时、奇门三流派、闰月归月都可切换,并有字段级差异对照</li></ul>
|
|
657
657
|
|
|
658
658
|
<h3>已知边界(不猜)</h3>
|
|
659
659
|
<ul><li>六爻应期(具体哪天应验)不做;卦例只录动爻个数,不录爻位</li><li>财富/健康只给结构判断与档位,不给金额区间、不作诊断</li><li>紫微飞星已做「单一支化逐宫追到成环」与「三方四正 16 条按落宫归堆」,但都未叠大限流年四化、不折吉凶;八字交运日已能算到日/时,但未与第三方排盘案例批量对拍</li></ul>
|
|
@@ -1224,9 +1224,23 @@ const CALIBER_SWITCHES = {
|
|
|
1224
1224
|
ziweiSchoolSwitch('shenzhuSchool', '身主:子午皆火星 / 子铃午火', '身主', 'common', 'verse', {
|
|
1225
1225
|
common: '子午皆火星', verse: '子铃午火(安身主诀逐字)',
|
|
1226
1226
|
}),
|
|
1227
|
+
ziweiSchoolSwitch('mingzhuSchool', '命主取法:命宫地支 / 生年年支', '命主取法', 'soul-branch', 'year-branch', {
|
|
1228
|
+
'soul-branch': '命宫地支(通行本)', 'year-branch': '生年年支(中州派)',
|
|
1229
|
+
}),
|
|
1227
1230
|
ziweiSchoolSwitch('zuoyaoSchool', '杂曜:49 颗简盘 / 61 颗全表', '杂曜全表', 'minimal', 'full', {
|
|
1228
1231
|
minimal: '49 颗(简盘)', full: '61 颗(加十二颗杂曜)',
|
|
1229
1232
|
}),
|
|
1233
|
+
ziweiSchoolSwitch('liunianSihua', '流年四化取干:流年天干 / 流年命宫宫干', '流年四化取干', 'year-stem', 'life-palace-stem', {
|
|
1234
|
+
'year-stem': '流年天干', 'life-palace-stem': '流年命宫宫干',
|
|
1235
|
+
}),
|
|
1236
|
+
// 十干四化变体有十一档,口径卡只拿「甲干廉破曲阳」当对照样本:
|
|
1237
|
+
// 甲年换成文曲化科、太阳化忌这一档,与本插件默认的武曲化科最近、最能看出整表在动。
|
|
1238
|
+
ziweiSchoolSwitch('sihuaVariant', '十干四化:通行表 / 变体整表替换', '十干四化变体', 'default', '廉破曲阳', {
|
|
1239
|
+
default: '各干通行表', 廉破曲阳: '甲干 廉破曲阳',
|
|
1240
|
+
贪阴阳机: '戊干 贪阴阳机', 阳武同阴: '庚干 阳武同阴', 阳武府同: '庚干 阳武府同',
|
|
1241
|
+
阳武府相: '庚干 阳武府相', 阳武同相: '庚干 阳武同相', 巨阳武昌: '辛干 巨阳武昌',
|
|
1242
|
+
梁紫府武: '壬干 梁紫府武', 梁紫相武: '壬干 梁紫相武', 破巨阳贪: '癸干 破巨阳贪',
|
|
1243
|
+
}),
|
|
1230
1244
|
],
|
|
1231
1245
|
qimen: [
|
|
1232
1246
|
{
|
|
@@ -5000,7 +5014,7 @@ __mods.structure = (function () {
|
|
|
5000
5014
|
// 八大地支结构(炳祥课堂口径)
|
|
5001
5015
|
//
|
|
5002
5016
|
// 定位:只做「静态结构 + 宫位权重」的只读标注,不改旺衰、不改喜忌。
|
|
5003
|
-
//
|
|
5017
|
+
// 课堂口径来源:炳祥八字课程笔记(内部资料,不随包发布);
|
|
5004
5018
|
// 这里把「四个地支落在身强阵营还是身弱阵营」按年支定 A 档(年支那一档记 A,另一档记 B),
|
|
5005
5019
|
// 于是八种排布可以写成 AAAA / ABBB / AAAB / AABA / ABAA / AABB / ABAB / ABBA,
|
|
5006
5020
|
// 再从「异类那一支的宫位权重」读出静态从格概率:
|
|
@@ -9558,7 +9572,10 @@ const ZIWEI_SCHOOL_DEFAULTS = Object.freeze({
|
|
|
9558
9572
|
changshengSchool: 'yin-yang-shun-ni',
|
|
9559
9573
|
lateZishi: 'current-day',
|
|
9560
9574
|
shenzhuSchool: 'common',
|
|
9575
|
+
mingzhuSchool: 'soul-branch',
|
|
9561
9576
|
zuoyaoSchool: 'minimal',
|
|
9577
|
+
liunianSihua: 'year-stem',
|
|
9578
|
+
sihuaVariant: 'default',
|
|
9562
9579
|
});
|
|
9563
9580
|
|
|
9564
9581
|
const ZIWEI_SCHOOL_OPTIONS = Object.freeze({
|
|
@@ -9572,7 +9589,18 @@ const ZIWEI_SCHOOL_OPTIONS = Object.freeze({
|
|
|
9572
9589
|
changshengSchool: ['yin-yang-shun-ni', 'shui-tu', 'huo-tu'],
|
|
9573
9590
|
lateZishi: ['current-day', 'next-day', 'all-current', 'day-cur-time-next'],
|
|
9574
9591
|
shenzhuSchool: ['common', 'verse'],
|
|
9592
|
+
// 命主取法:两派共用同一张十二支→命主星的表(贪狼子、巨门丑亥、禄存寅戌、文曲卯酉、
|
|
9593
|
+
// 廉贞辰申、武曲巳未、破军午),分歧只在「拿哪个地支去查」——
|
|
9594
|
+
// soul-branch(默认,通行本 /《紫微斗数全书》卷二「安命主」):按命宫地支
|
|
9595
|
+
// year-branch(中州派,王亭之整理):按生年年支
|
|
9596
|
+
// 实测命宫地支与生年年支重合的只占约 8%,两派约九成的人的命主不同。
|
|
9597
|
+
mingzhuSchool: ['soul-branch', 'year-branch'],
|
|
9575
9598
|
zuoyaoSchool: ['minimal', 'full'],
|
|
9599
|
+
liunianSihua: ['year-stem', 'life-palace-stem'],
|
|
9600
|
+
// 十干四化变体:default 表示各干用本插件原有通行表;其余按文墨变体名整表替换。
|
|
9601
|
+
// 只列与 default 不同的那一档(default 之外全是「换掉某一干」的显式选择)。
|
|
9602
|
+
sihuaVariant: ['default', '廉破曲阳', '贪阴阳机', '阳武同阴', '阳武府同', '阳武府相',
|
|
9603
|
+
'阳武同相', '巨阳武昌', '梁紫府武', '梁紫相武', '破巨阳贪'],
|
|
9576
9604
|
});
|
|
9577
9605
|
|
|
9578
9606
|
function ziweiSchoolsOf(input = {}) {
|
|
@@ -9684,11 +9712,67 @@ const GENG_MUTAGEN = {
|
|
|
9684
9712
|
GYWTX: { 太阳: '禄', 武曲: '权', 天同: '科', 天相: '忌' },
|
|
9685
9713
|
};
|
|
9686
9714
|
|
|
9715
|
+
// 十干四化变体全表(文墨天机「十干四化」,2026-11 从 WMTJ-Pro64-2.5.26 的 App.swf 常量表挖出)。
|
|
9716
|
+
// 变体名一律取文墨原文四字,按「禄 权 科 忌」的顺序念,所以名字本身就是这张表:
|
|
9717
|
+
// 「廉破曲阳」= 廉贞化禄、破军化权、文曲化科、太阳化忌。
|
|
9718
|
+
// 每干第一个是与本插件原有默认表完全一致的那一档,乙丙丁己四干文墨没有变体。
|
|
9719
|
+
// 这张表和 gengYearSihua 不是一回事:gengYearSihua 只换生年四化里庚年那一支,
|
|
9720
|
+
// sihuaVariant 换的是整张十干四化表(生年、宫干自化、大限宫干、飞星、流年一起走)。
|
|
9721
|
+
const SIHUA_VARIANTS = Object.freeze({
|
|
9722
|
+
廉破武阳: { stem: '甲', table: MUTAGEN.甲 },
|
|
9723
|
+
廉破曲阳: { stem: '甲', table: Object.freeze({ 廉贞: '禄', 破军: '权', 文曲: '科', 太阳: '忌' }) },
|
|
9724
|
+
贪阴右机: { stem: '戊', table: MUTAGEN.戊 },
|
|
9725
|
+
贪阴阳机: { stem: '戊', table: Object.freeze({ 贪狼: '禄', 太阴: '权', 太阳: '科', 天机: '忌' }) },
|
|
9726
|
+
阳武阴同: { stem: '庚', table: GENG_MUTAGEN.GYWYT },
|
|
9727
|
+
阳武同阴: { stem: '庚', table: GENG_MUTAGEN.GYWTY },
|
|
9728
|
+
阳武府同: { stem: '庚', table: GENG_MUTAGEN.GYWFT },
|
|
9729
|
+
阳武府相: { stem: '庚', table: GENG_MUTAGEN.GYWFX },
|
|
9730
|
+
阳武同相: { stem: '庚', table: GENG_MUTAGEN.GYWTX },
|
|
9731
|
+
巨阳曲昌: { stem: '辛', table: MUTAGEN.辛 },
|
|
9732
|
+
巨阳武昌: { stem: '辛', table: Object.freeze({ 巨门: '禄', 太阳: '权', 武曲: '科', 文昌: '忌' }) },
|
|
9733
|
+
梁紫辅武: { stem: '壬', table: MUTAGEN.壬 },
|
|
9734
|
+
梁紫府武: { stem: '壬', table: Object.freeze({ 天梁: '禄', 紫微: '权', 天府: '科', 武曲: '忌' }) },
|
|
9735
|
+
梁紫相武: { stem: '壬', table: Object.freeze({ 天梁: '禄', 紫微: '权', 天相: '科', 武曲: '忌' }) },
|
|
9736
|
+
破巨阴贪: { stem: '癸', table: MUTAGEN.癸 },
|
|
9737
|
+
破巨阳贪: { stem: '癸', table: Object.freeze({ 破军: '禄', 巨门: '权', 太阳: '科', 贪狼: '忌' }) },
|
|
9738
|
+
});
|
|
9739
|
+
|
|
9687
9740
|
function mutagenOf(stem, schools) {
|
|
9688
9741
|
if (stem === '庚') return GENG_MUTAGEN[schools.gengYearSihua] || MUTAGEN.庚;
|
|
9689
9742
|
return MUTAGEN[stem] ?? {};
|
|
9690
9743
|
}
|
|
9691
9744
|
|
|
9745
|
+
/**
|
|
9746
|
+
* 取某一干的四化表(宫干自化、大限宫干、飞星、流年都用这张)。
|
|
9747
|
+
* 只认 `sihuaVariant`——`gengYearSihua` 按既有约定只管生年四化那一支,
|
|
9748
|
+
* 不能让它顺带改掉宫干自化(那是另一套断法,混了就是两派口径串味)。
|
|
9749
|
+
* 变体名所属天干对不上这一干时不生效,直接落回该干通行表,不会把甲的表套到乙上。
|
|
9750
|
+
* @param {string} stem 天干
|
|
9751
|
+
* @param {object} [schools] 流派开关
|
|
9752
|
+
* @returns {Record<string,string>} 星名 → 禄/权/科/忌
|
|
9753
|
+
*/
|
|
9754
|
+
function sihuaTableOf(stem, schools) {
|
|
9755
|
+
const variant = schools && schools.sihuaVariant;
|
|
9756
|
+
if (variant && variant !== 'default') {
|
|
9757
|
+
const v = SIHUA_VARIANTS[variant];
|
|
9758
|
+
if (v && v.stem === stem) return v.table;
|
|
9759
|
+
}
|
|
9760
|
+
return MUTAGEN[stem] ?? {};
|
|
9761
|
+
}
|
|
9762
|
+
|
|
9763
|
+
/**
|
|
9764
|
+
* 生年四化专用的取表:先看 `sihuaVariant`,没命中该干再让 `gengYearSihua` 生效。
|
|
9765
|
+
* 两项同时指向庚干时以 `sihuaVariant` 为准——它说的是「整张表长这样」,比单点覆盖更明确。
|
|
9766
|
+
* @param {string} stem 年干
|
|
9767
|
+
* @param {object} [schools] 流派开关
|
|
9768
|
+
* @returns {Record<string,string>} 星名 → 禄/权/科/忌
|
|
9769
|
+
*/
|
|
9770
|
+
function natalSihuaTableOf(stem, schools) {
|
|
9771
|
+
const table = sihuaTableOf(stem, schools);
|
|
9772
|
+
if (table === MUTAGEN[stem]) return mutagenOf(stem, schools || {});
|
|
9773
|
+
return table;
|
|
9774
|
+
}
|
|
9775
|
+
|
|
9692
9776
|
// 安魁钺三派:差异集中在庚辛壬癸年(「网络派」与 qs1 同表,不单列)
|
|
9693
9777
|
const KUI_YUE_SCHOOLS = {
|
|
9694
9778
|
qs2: {
|
|
@@ -9719,7 +9803,7 @@ const KUI_YUE = {
|
|
|
9719
9803
|
};
|
|
9720
9804
|
KUI_YUE_SCHOOLS.qs1 = KUI_YUE;
|
|
9721
9805
|
|
|
9722
|
-
/**
|
|
9806
|
+
/** 命主:按地支查表。两派共用这张表,分歧在拿哪个地支 —— 见 mingzhuSchool。 */
|
|
9723
9807
|
const MING_ZHU = {
|
|
9724
9808
|
子: '贪狼', 丑: '巨门', 寅: '禄存', 卯: '文曲', 辰: '廉贞', 巳: '武曲',
|
|
9725
9809
|
午: '破军', 未: '武曲', 申: '廉贞', 酉: '文曲', 戌: '禄存', 亥: '巨门',
|
|
@@ -10027,7 +10111,7 @@ function buildZiwei(input) {
|
|
|
10027
10111
|
}
|
|
10028
10112
|
|
|
10029
10113
|
// 生年四化(庚干按所选变体)
|
|
10030
|
-
const mutagenMap =
|
|
10114
|
+
const mutagenMap = natalSihuaTableOf(yearStem, schools);
|
|
10031
10115
|
for (const list of starsByBranch) {
|
|
10032
10116
|
for (const star of list) {
|
|
10033
10117
|
if (mutagenMap[star.name]) star.mutagen = mutagenMap[star.name];
|
|
@@ -10063,7 +10147,7 @@ function buildZiwei(input) {
|
|
|
10063
10147
|
const stepIndex = forward ? fix(branch - soulIndex) : fix(soulIndex - branch);
|
|
10064
10148
|
const dxStart = startAge + stepIndex * 10;
|
|
10065
10149
|
const gz = STEMS[stem] + BRANCHES[branch];
|
|
10066
|
-
const pal =
|
|
10150
|
+
const pal = sihuaTableOf(STEMS[stem], schools);
|
|
10067
10151
|
const selfHua = starsByBranch[branch]
|
|
10068
10152
|
.filter((s) => pal[s.name])
|
|
10069
10153
|
.map((s) => ({ star: s.name, type: pal[s.name] }));
|
|
@@ -10081,7 +10165,7 @@ function buildZiwei(input) {
|
|
|
10081
10165
|
start: dxStart,
|
|
10082
10166
|
end: dxStart + 9,
|
|
10083
10167
|
stem: STEMS[stem],
|
|
10084
|
-
mutagen: Object.entries(
|
|
10168
|
+
mutagen: Object.entries(sihuaTableOf(STEMS[stem], schools)).map(([s, k]) => `${s}化${k}`),
|
|
10085
10169
|
},
|
|
10086
10170
|
xiaoxian: { age: xiaoxianAge(branch, triad, gender) },
|
|
10087
10171
|
sanfang: [branch, branch + 4, branch + 8, branch + 6]
|
|
@@ -10145,10 +10229,21 @@ function buildZiwei(input) {
|
|
|
10145
10229
|
const xxAge = ((age - 1) % 12) + 1;
|
|
10146
10230
|
const xxPalace = palaces.find((p) => p.xiaoxian.age === xxAge);
|
|
10147
10231
|
const dxPalace = palaces.find((p) => age >= p.daxian.start && age <= p.daxian.end);
|
|
10232
|
+
// 流年四化取干:默认按流年天干;liunianSihua: life-palace-stem 改按该年命宫
|
|
10233
|
+
// 的宫干(文墨设置树里的「依据流年命宫天干」)。这两干各依不同的表:年干随年份走,
|
|
10234
|
+
// 命宫宫干由五虎遁从出生年干起,所以实测十二年会换掉十二次,不是只差个别年。
|
|
10235
|
+
// 取哪一干必须随盘回显,否则用户看不出四颗化星是被哪张表定的。
|
|
10236
|
+
const lnStemOf = (() => {
|
|
10237
|
+
if (schools.liunianSihua !== 'life-palace-stem') return gz.stem;
|
|
10238
|
+
const lp = palaces.find((p) => p.branch === gz.branch);
|
|
10239
|
+
return lp ? lp.stem : gz.stem;
|
|
10240
|
+
})();
|
|
10148
10241
|
liunian.push({
|
|
10149
10242
|
year: y,
|
|
10150
10243
|
ganzhi: gz.name,
|
|
10151
10244
|
age,
|
|
10245
|
+
sihuaStem: lnStemOf,
|
|
10246
|
+
sihuaStemFrom: schools.liunianSihua === 'life-palace-stem' ? '流年命宫天干' : '流年天干',
|
|
10152
10247
|
lifePalace: { branch: gz.branch, palace: palaceNames[b] },
|
|
10153
10248
|
doujun: BRANCHES[fix(b - (lunarMonth - 1) + hb)],
|
|
10154
10249
|
sanfang: [fix(b), fix(b + 4), fix(b + 8), fix(b + 6)].map((x) => palaceNames[x]),
|
|
@@ -10157,7 +10252,7 @@ function buildZiwei(input) {
|
|
|
10157
10252
|
liutuo: BRANCHES[fix(lu - 1)],
|
|
10158
10253
|
liukui: BRANCHES[kuiyueTable[gz.stem][0]],
|
|
10159
10254
|
liuyue: BRANCHES[kuiyueTable[gz.stem][1]],
|
|
10160
|
-
mutagen: Object.entries(
|
|
10255
|
+
mutagen: Object.entries(sihuaTableOf(lnStemOf, schools)).map(([s, k]) => `${s}化${k}`),
|
|
10161
10256
|
daxian: dxPalace
|
|
10162
10257
|
? { palace: dxPalace.palace, start: dxPalace.daxian.start, end: dxPalace.daxian.end }
|
|
10163
10258
|
: null,
|
|
@@ -10210,7 +10305,20 @@ function buildZiwei(input) {
|
|
|
10210
10305
|
nayin: soulNayin.name,
|
|
10211
10306
|
},
|
|
10212
10307
|
body: { palace: '身宫', branch: BRANCHES[bodyIndex], lands: palaceNames[bodyIndex] },
|
|
10213
|
-
lifeMaster: MING_ZHU[BRANCHES[soulIndex]],
|
|
10308
|
+
lifeMaster: MING_ZHU[schools.mingzhuSchool === 'year-branch' ? BRANCHES[yb] : BRANCHES[soulIndex]],
|
|
10309
|
+
lifeMasterSchool: schools.mingzhuSchool,
|
|
10310
|
+
...((() => {
|
|
10311
|
+
// 两派取的地支不同时,把另一派的结果一并回显——不然用户切档后只看到命主变了一个字,
|
|
10312
|
+
// 无从判断是取法变了还是排盘出了问题。
|
|
10313
|
+
const bySoul = MING_ZHU[BRANCHES[soulIndex]];
|
|
10314
|
+
const byYear = MING_ZHU[BRANCHES[yb]];
|
|
10315
|
+
if (bySoul === byYear) return {};
|
|
10316
|
+
return {
|
|
10317
|
+
lifeMasterNote: schools.mingzhuSchool === 'year-branch'
|
|
10318
|
+
? `中州派按生年年支${BRANCHES[yb]}取${byYear};通行本按命宫地支${BRANCHES[soulIndex]}取${bySoul}`
|
|
10319
|
+
: `通行本按命宫地支${BRANCHES[soulIndex]}取${bySoul};中州派按生年年支${BRANCHES[yb]}取${byYear}`,
|
|
10320
|
+
};
|
|
10321
|
+
})()),
|
|
10214
10322
|
bodyMaster: SHEN_ZHU[schools.shenzhuSchool][BRANCHES[yb]],
|
|
10215
10323
|
bodyMasterSchool: schools.shenzhuSchool,
|
|
10216
10324
|
...((yb === 0 || yb === 6) ? {
|
|
@@ -10257,15 +10365,15 @@ function buildZiwei(input) {
|
|
|
10257
10365
|
rules: {
|
|
10258
10366
|
ziweiPlacement: '借数法:局数除日数取商,商数自寅宫顺行,借数奇逆偶顺',
|
|
10259
10367
|
mutagen: '生年四化用中州派常用表;庚干可按流派切换(默认阳武阴同,另有同科阴忌、府科、府科相忌、同科相忌)',
|
|
10260
|
-
schools: `流派开关:亮度 ${schools.brightnessSchool}、庚干四化 ${schools.gengYearSihua}、天马 ${schools.tianmaSchool}、天空 ${schools.tiankongSchool}、截空 ${schools.jiekongSchool}、魁钺 ${schools.kuiyueSchool}、天伤天使 ${schools.tianshiTianshang}、长生 ${schools.changshengSchool}、晚子时 ${schools.lateZishi}、身主 ${schools.shenzhuSchool}(common 子午皆火星 / verse
|
|
10368
|
+
schools: `流派开关:亮度 ${schools.brightnessSchool}、庚干四化 ${schools.gengYearSihua}、天马 ${schools.tianmaSchool}、天空 ${schools.tiankongSchool}、截空 ${schools.jiekongSchool}、魁钺 ${schools.kuiyueSchool}、天伤天使 ${schools.tianshiTianshang}、长生 ${schools.changshengSchool}、晚子时 ${schools.lateZishi}、身主 ${schools.shenzhuSchool}(common 子午皆火星 / verse 子铃午火)、命主 ${schools.mingzhuSchool}(soul-branch 按命宫地支 / year-branch 按生年年支)、杂曜 ${schools.zuoyaoSchool}(minimal 49 颗 / full 61 颗)、流年四化取干 ${schools.liunianSihua}(year-stem 按流年天干 / life-palace-stem 按流年命宫宫干)、十干四化 ${schools.sihuaVariant}(default 各干通行表,其余为文墨变体整表替换);庚干四化只作用于生年四化,sihuaVariant 换的是宫干自化、大限宫干、飞星与流年共用的那张表`,
|
|
10261
10369
|
zuoyao: schools.zuoyaoSchool === 'full'
|
|
10262
10370
|
? `全表十二颗已安:生月 解神、天巫、天月、阴煞;生年干 天官、天福、天厨;生年支 蜚廉、天德、年解;命宫+生年支 天才、身宫+生年支 天寿。蜚廉与博士十二神的飞廉同名异星,年解与月解(解神)分列,天德与岁前十二神的天德同名异宫。`
|
|
10263
10371
|
: `本盘按 49 颗的通行简盘安星,未排全表杂曜。开 zuoyaoSchool: "full" 追加十二颗:解神、天巫、天月、阴煞(生月)、天官、天福、天厨(生年干)、蜚廉、天德、年解(生年支)、天才(命宫+生年支)、天寿(身宫+生年支),每颗都带安星诀。`,
|
|
10264
10372
|
leapMonth: '闰月默认按日切分(1–15 归本月、16 起归次月,主流排盘口径);可传 leapMonth: next(整月归次月)或 prev(整月归本月),leapAsNext: true 等同 next',
|
|
10265
10373
|
auxStars: '火铃按年支三合起点顺数至生时;羊陀夹禄存;魁钺按年干;地空亥起子时逆行、地劫顺行;三台八座随辅弼;恩光天贵随昌曲退一位;台辅封诰按时支',
|
|
10266
10374
|
shensha: '长生、博士随大限顺逆;将前、岁前恒顺行;天伤恒在交友、天使恒在疾厄',
|
|
10267
|
-
masters: '
|
|
10268
|
-
liunian: '流年命宫取该年地支宫;三方四正为本宫与 +4/+8/+6
|
|
10375
|
+
masters: '命主按 mingzhuSchool 取地支再查表(soul-branch 命宫地支 / year-branch 生年年支),身主按生年地支;两派共用同一张十二支命主表,只换查表用的地支',
|
|
10376
|
+
liunian: '流年命宫取该年地支宫;三方四正为本宫与 +4/+8/+6;并给该年所属大限与小限;四化取干按 liunianSihua 口径,sihuaStem 回显实际用的那一干',
|
|
10269
10377
|
flyComposite: '三方四正取本宫、对宫与两个三合宫共四宫,四宫宫干各化禄权科忌共 16 条,按落宫归堆标会聚(双忌会、禄忌同宫、三化会、自化);只描会照,不折吉凶',
|
|
10270
10378
|
changqu: '昌曲落宫只由时支决定,故与丑未的关系(夹/三合/同宫/无关)是结构性结论;absorb 的「清/杂」是启发式标记,依据昌曲化忌与会煞,不是断语',
|
|
10271
10379
|
},
|
|
@@ -10564,7 +10672,7 @@ function daxianList(chart) {
|
|
|
10564
10672
|
selfHua: p.selfHua,
|
|
10565
10673
|
sanfang: p.sanfang,
|
|
10566
10674
|
mainStars: mainOf(p.sanfang),
|
|
10567
|
-
mutagenHits: Object.entries(
|
|
10675
|
+
mutagenHits: Object.entries(sihuaTableOf(p.stem, chart.schools)).map(([star, type]) => {
|
|
10568
10676
|
const b = starBranchOf(chart, star);
|
|
10569
10677
|
return { star, type, branch: b >= 0 ? BRANCHES[b] : null, palace: b >= 0 ? chart.palaces.find((x) => x.branch === BRANCHES[b])?.palace ?? null : null };
|
|
10570
10678
|
}),
|
|
@@ -10581,9 +10689,10 @@ function daxianList(chart) {
|
|
|
10581
10689
|
const FLY_TYPES = ['禄', '权', '科', '忌'];
|
|
10582
10690
|
|
|
10583
10691
|
// 某天干下某一化的星曜;表里没有就返回 null(不会凭印象补)
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10692
|
+
// 第三参 schools 选填:给了就按该盘的十干四化变体取表,不给沿用通行表(旧调用零漂移)
|
|
10693
|
+
function flyStarOf(stem, type, schools) {
|
|
10694
|
+
const map = sihuaTableOf(stem, schools || {});
|
|
10695
|
+
if (!map || !Object.keys(map).length) return null;
|
|
10587
10696
|
for (const [star, t] of Object.entries(map)) if (t === type) return star;
|
|
10588
10697
|
return null;
|
|
10589
10698
|
}
|
|
@@ -10596,7 +10705,7 @@ function flyStars(chart) {
|
|
|
10596
10705
|
branch: p.branch,
|
|
10597
10706
|
stem: p.stem,
|
|
10598
10707
|
flies: FLY_TYPES.map((type) => {
|
|
10599
|
-
const star = flyStarOf(p.stem, type);
|
|
10708
|
+
const star = flyStarOf(p.stem, type, chart.schools);
|
|
10600
10709
|
const b = star ? starBranchOf(chart, star) : -1;
|
|
10601
10710
|
const target = b >= 0 ? palaces.find((x) => x.branch === BRANCHES[b]) : null;
|
|
10602
10711
|
return {
|
|
@@ -10622,7 +10731,7 @@ function flyChain(chart, { from = '命宫', type = '忌', maxSteps = 12 } = {})
|
|
|
10622
10731
|
let cur = start;
|
|
10623
10732
|
let ended = 'max';
|
|
10624
10733
|
for (let i = 0; i < Math.max(1, maxSteps); i++) {
|
|
10625
|
-
const star = flyStarOf(cur.stem, type);
|
|
10734
|
+
const star = flyStarOf(cur.stem, type, chart.schools);
|
|
10626
10735
|
if (!star) { ended = 'no-star'; break; }
|
|
10627
10736
|
const b = starBranchOf(chart, star);
|
|
10628
10737
|
if (b < 0) { ended = 'off-chart'; break; }
|
|
@@ -10672,7 +10781,7 @@ function flyComposite(chart, { from = '命宫' } = {}) {
|
|
|
10672
10781
|
branch: p.branch,
|
|
10673
10782
|
stem: p.stem,
|
|
10674
10783
|
flies: FLY_TYPES.map((type) => {
|
|
10675
|
-
const star = flyStarOf(p.stem, type);
|
|
10784
|
+
const star = flyStarOf(p.stem, type, chart.schools);
|
|
10676
10785
|
const b = star ? starBranchOf(chart, star) : -1;
|
|
10677
10786
|
const target = b >= 0 ? palaces.find((x) => x.branch === BRANCHES[b]) : null;
|
|
10678
10787
|
return {
|
|
@@ -10749,8 +10858,8 @@ function flyComposite(chart, { from = '命宫' } = {}) {
|
|
|
10749
10858
|
|
|
10750
10859
|
function enrichLiunian(chart) {
|
|
10751
10860
|
for (const ln of chart.liunian) {
|
|
10752
|
-
const stem = ln.ganzhi[0];
|
|
10753
|
-
ln.mutagenHits = Object.entries(
|
|
10861
|
+
const stem = ln.sihuaStem || ln.ganzhi[0];
|
|
10862
|
+
ln.mutagenHits = Object.entries(sihuaTableOf(stem, chart.schools)).map(([star, type]) => {
|
|
10754
10863
|
const b = starBranchOf(chart, star);
|
|
10755
10864
|
return {
|
|
10756
10865
|
star,
|
|
@@ -10812,7 +10921,7 @@ function flowOf(chart, asOf) {
|
|
|
10812
10921
|
const p = chart.palaces.find((x) => x.branch === br);
|
|
10813
10922
|
const stem = p ? p.stem : null;
|
|
10814
10923
|
const mutagenHits = stem
|
|
10815
|
-
? Object.entries(
|
|
10924
|
+
? Object.entries(sihuaTableOf(stem, chart.schools)).map(([star, type]) => {
|
|
10816
10925
|
const b = starBranchOf(chart, star);
|
|
10817
10926
|
return {
|
|
10818
10927
|
star,
|
|
@@ -10855,7 +10964,7 @@ function flowOf(chart, asOf) {
|
|
|
10855
10964
|
};
|
|
10856
10965
|
}
|
|
10857
10966
|
|
|
10858
|
-
return { PALACE_NAMES, BRIGHTNESS, MUTAGEN, ZIWEI_SCHOOL_DEFAULTS, ZIWEI_SCHOOL_OPTIONS, ziweiSchoolsOf, BRIGHTNESS_SCHOOLS, schoolBrightness, KUI_YUE_SCHOOLS, LUCUN, KUI_YUE, MING_ZHU, SHEN_ZHU, triadOf, HUO_START, LING_START, TIANMA, XIANCHI, HUAGAI, JIANGXING, GUCHEN, GUASU, posuIndex, XIAOXIAN_START, CHANGSHENG_NAMES, BOSHI_NAMES, JIANGQIAN_NAMES, SUIQI_NAMES, CHANGSHENG_START, hourBranchIndex, ziweiTianfuIndex, xiaoxianAge, LEAP_POLICIES, leapPolicyOf, effectiveLunarMonth, buildZiwei, detectPatterns, PATTERN_BREAK_RULES, PATTERN_TONE, daxianList, FLY_TYPES, flyStarOf, flyStars, flyChain, flyChains, flyComposite, enrichLiunian, asOfParts, flowOf };
|
|
10967
|
+
return { PALACE_NAMES, BRIGHTNESS, MUTAGEN, ZIWEI_SCHOOL_DEFAULTS, ZIWEI_SCHOOL_OPTIONS, ziweiSchoolsOf, BRIGHTNESS_SCHOOLS, schoolBrightness, SIHUA_VARIANTS, sihuaTableOf, natalSihuaTableOf, KUI_YUE_SCHOOLS, LUCUN, KUI_YUE, MING_ZHU, SHEN_ZHU, triadOf, HUO_START, LING_START, TIANMA, XIANCHI, HUAGAI, JIANGXING, GUCHEN, GUASU, posuIndex, XIAOXIAN_START, CHANGSHENG_NAMES, BOSHI_NAMES, JIANGQIAN_NAMES, SUIQI_NAMES, CHANGSHENG_START, hourBranchIndex, ziweiTianfuIndex, xiaoxianAge, LEAP_POLICIES, leapPolicyOf, effectiveLunarMonth, buildZiwei, detectPatterns, PATTERN_BREAK_RULES, PATTERN_TONE, daxianList, FLY_TYPES, flyStarOf, flyStars, flyChain, flyChains, flyComposite, enrichLiunian, asOfParts, flowOf };
|
|
10859
10968
|
})();
|
|
10860
10969
|
|
|
10861
10970
|
__mods['tarot-cards'] = (function () {
|
|
@@ -17580,10 +17689,14 @@ function buildXiaoliuren(input) {
|
|
|
17580
17689
|
const info = PALACES[p3];
|
|
17581
17690
|
return {
|
|
17582
17691
|
system: 'xiaoliuren',
|
|
17583
|
-
|
|
17692
|
+
// question 放在顶层,不放进 meta:句柄按设计不收 question(它不影响盘面),
|
|
17693
|
+
// 放进 meta 会让「句柄回放」与「原始调用」的 meta 不一致(回放后变 null),
|
|
17694
|
+
// 看起来像盘变了。其余体系也都是把 question 挂顶层。
|
|
17695
|
+
meta: { mode: mode === 'time' ? '时间起课' : '报数起课', originText },
|
|
17696
|
+
question: input.question || null,
|
|
17584
17697
|
steps: [p1, p2, p3],
|
|
17585
17698
|
result: { palace: p3, luck: info.luck, text: info.text },
|
|
17586
|
-
sources: ['
|
|
17699
|
+
sources: ['掌诀口径:通行马前口诀(白话提炼,非原文照录)'],
|
|
17587
17700
|
disclaimer: '小六壬为轻量快占,属民俗娱乐参考;重要事项请综合现实信息判断。',
|
|
17588
17701
|
};
|
|
17589
17702
|
}
|
|
@@ -22038,7 +22151,7 @@ __mods.interpret = (function () {
|
|
|
22038
22151
|
|
|
22039
22152
|
const { HEX64, HEX_BY_CORE, TRIGRAM, YAO_POSITION, MOVING_NATURE, ZIWEI_STARS, WUXING_INDUSTRY, WUXING_ORGAN, TENGOD_STYLE, LIUREN_JIANG, TAROT_ELEMENT_FOCUS, DISCLAIMER } = (__mods['interpret-data'] || {});
|
|
22040
22153
|
// 生年四化要按年干反查四颗星,四化表只在紫微引擎里定义了一份,这里直接复用,避免两处维护打架
|
|
22041
|
-
const {
|
|
22154
|
+
const { natalSihuaTableOf } = (__mods.ziwei || {});
|
|
22042
22155
|
// 紫微的词库单列一处:宫位取象、主星细节、双星、煞星辅星、四化措辞、庙旺语气、格局读法
|
|
22043
22156
|
const { palaceFieldOf, starExtraOf, starPairOf, brightRead, huaInLine, shaLineOf, shaNatureOf, fuLineOf, patternReadOf, MAIN_SHA } = (__mods['ziwei-words'] || {});
|
|
22044
22157
|
// 八字的画像词库:日主取象、十神画像、命局基调与地支关系说法
|
|
@@ -22451,7 +22564,12 @@ function baziInterpret(r) {
|
|
|
22451
22564
|
const jiaoLine = r.dayun && r.dayun.jiao && r.dayun.jiao.at
|
|
22452
22565
|
? `起运交运时刻 ${r.dayun.jiao.at}(${r.dayun.jiao.frame};三日折一年,距${r.dayun.jiao.from.name} ${r.dayun.jiao.spanDays} 天)。每步大运在同月同日同时刻换,逐年日期见下方大运表「交运」列。\n`
|
|
22453
22566
|
: '';
|
|
22454
|
-
|
|
22567
|
+
// 精确起运岁:与「几岁几个月」的口语写法并列。对上第三方排盘时差的就是日、时这两位。
|
|
22568
|
+
const sae = r.dayun && r.dayun.startAgeExact;
|
|
22569
|
+
const exactLine = sae && Number.isInteger(sae.years)
|
|
22570
|
+
? `起运岁精确值:${sae.years} 年 ${sae.months} 个月 ${sae.days} 天 ${sae.hours} 小时(${sae.caliber})。与摘要「${r.dayun.startAge.years}岁${r.dayun.startAge.months}个月」同源:后者四舍五入到月,差一个月的边界常出在这里——第三方给到日/时的,按这一行核对。\n`
|
|
22571
|
+
: '';
|
|
22572
|
+
return `${jiaoLine}${exactLine}当前大运:${pick(cur, 'ganzhi', '—')}(${curSpan})。后续两步:${nextTwo}。\n近五年流年:${years || '—'}。\n读法:大运管"这十年的大环境",流年管"今年的具体天气";两者打架时,以能否动到用神为准。`;
|
|
22455
22573
|
})(),
|
|
22456
22574
|
},
|
|
22457
22575
|
{ key: 'years', label: '流年时间轴', text: yearsText },
|
|
@@ -22538,6 +22656,33 @@ function baziInterpret(r) {
|
|
|
22538
22656
|
key: 'xianshen', label: '闲神',
|
|
22539
22657
|
text: `【${frame.xianshen.level}】${frame.xianshen.detail}\n口径:${frame.xianshen.method}`,
|
|
22540
22658
|
}] : []),
|
|
22659
|
+
// 八大地支结构:与旺衰分并列的第二套静态视图。算出来却没人看得见的字段等于没做,
|
|
22660
|
+
// 所以这里单独给一节,写清「它是什么、跟上面旺衰分的区别、能不能据此断从格」。
|
|
22661
|
+
...(r.strength && r.strength.branchStructure ? [{
|
|
22662
|
+
key: 'structure', label: '地支结构',
|
|
22663
|
+
text: (() => {
|
|
22664
|
+
const b = r.strength.branchStructure;
|
|
22665
|
+
const cols = b.branches.map((x) => `${x.label}支${x.branch}(${x.support}·${x.camp} 档 ${x.weight} 分${b.placeholderHour && x.key === 'hour' ? '·占位' : ''})`).join(';');
|
|
22666
|
+
const odd = b.odd && b.odd.length ? `异类:${b.odd.map((x) => `${x.label}支${x.branch}(${x.weight} 分)`).join('、')}。` : '四支二对二或同党,无异类。';
|
|
22667
|
+
const bal = b.balance || {};
|
|
22668
|
+
return `【${b.code}】${b.detail}\n`
|
|
22669
|
+
+ `逐支:${cols}\n`
|
|
22670
|
+
+ `${odd}${b.halfSupported && b.halfSupported.length ? `半得地:${b.halfSupported.join('、')}(按 0.2–0.5 折算,不计入身强阵营)。` : ''}\n`
|
|
22671
|
+
+ `地支 身强 ${bal.branch ? bal.branch.A : '—'} : 身弱 ${bal.branch ? bal.branch.B : '—'},加天干后 ${bal.total ? `${bal.total.A}:${bal.total.B}` : '—'}(宫位权重年 11 / 月 36 / 日 27 / 时 16)。\n`
|
|
22672
|
+
+ `${b.word}${b.congProb != null ? `——静态从格概率 ${b.congRange}。` : '。'}\n`
|
|
22673
|
+
+ `口径:${b.method}\n`
|
|
22674
|
+
+ `与「日主强弱」的关系:这是并列的第二套静态视图,不改上面的旺衰评分,也不参与取格与喜忌——两者是同一组四支的两种读法,不是先后两步。\n`
|
|
22675
|
+
+ `边界:${b.note}`;
|
|
22676
|
+
})(),
|
|
22677
|
+
}] : []),
|
|
22678
|
+
// 暗合:另列不并。这一条最容易被人当成「合」读进旺衰,所以把边界写在节里。
|
|
22679
|
+
...(r.relations && Array.isArray(r.relations.anhe) && r.relations.anhe.length ? [{
|
|
22680
|
+
key: 'anhe', label: '暗合',
|
|
22681
|
+
text: `${r.relations.anhe.join('\n')}\n`
|
|
22682
|
+
+ `口径:${r.relations.anheNote || '暗合只作取象,不参与旺衰与格局。'}\n`
|
|
22683
|
+
+ `边界:暗合与上面的「地支关系」(三合、三会、六合、六冲、刑、害)是两条线,本插件不把它们合并计分;`
|
|
22684
|
+
+ `${r.relations.anhe.length === 1 ? '本盘只出现一对,按课里口径可以直接忽略。' : `本盘共 ${r.relations.anhe.length} 对,可作取象参考,但仍不折旺衰。`}`,
|
|
22685
|
+
}] : []),
|
|
22541
22686
|
(() => {
|
|
22542
22687
|
const ss = r.shensha;
|
|
22543
22688
|
const cols = { year: '年', month: '月', day: '日', hour: '时' };
|
|
@@ -22657,9 +22802,10 @@ function zwNatalSihua(r) {
|
|
|
22657
22802
|
}
|
|
22658
22803
|
|
|
22659
22804
|
// 年干四化表:用来补齐「盘上没有落点」的那几颗,以及保证输出顺序
|
|
22805
|
+
// 该盘若选了十干四化变体,这张表也要跟着换,否则文案里的四化与盘面标的不是同一张
|
|
22660
22806
|
const ganzhi = pick(r, 'yearGanzhi', '');
|
|
22661
22807
|
const yearStem = typeof ganzhi === 'string' ? ganzhi.slice(0, 1) : '';
|
|
22662
|
-
const table =
|
|
22808
|
+
const table = natalSihuaTableOf(yearStem, r?.schools);
|
|
22663
22809
|
const starOfType = {};
|
|
22664
22810
|
for (const [star, type] of Object.entries(table)) starOfType[type] = star;
|
|
22665
22811
|
|
|
@@ -22861,7 +23007,7 @@ function ziweiInterpret(r) {
|
|
|
22861
23007
|
soulPair ? `${soulPair.gist};要留意的是${soulPair.watch}。` : '',
|
|
22862
23008
|
bodyLands ? `身宫寄在${bodyLands}——${bodyField ? `${bodyField.field}是后天更容易使上劲的地方` : '这是后天着力点'},中年以后会越来越明显。` : '',
|
|
22863
23009
|
`五行局为${pick(r.bureau, 'name', '—')},${pick(r.daxian, 'startAge', '—')}岁起运:局定的是节奏(几步起、十年一换),不是好坏。`,
|
|
22864
|
-
`命主${pick(r, 'lifeMaster', '—')}、身主${pick(r, 'bodyMaster', '—')}
|
|
23010
|
+
`命主${pick(r, 'lifeMaster', '—')}、身主${pick(r, 'bodyMaster', '—')}:传统把这两颗当作整张盘的定调星,命主看底色,身主看后半程的着力点。${r.lifeMasterNote ? '(本盘' + r.lifeMasterNote + '。)' : ''}`,
|
|
22865
23011
|
].filter(Boolean).join('\n');
|
|
22866
23012
|
|
|
22867
23013
|
// ── 逐宫分析:十二宫各一行清单 + 一句读法 ────────────────────
|
|
@@ -27127,7 +27273,7 @@ function requireGender(value, who = '') {
|
|
|
27127
27273
|
const ZIWEI_SCHOOL_KEYS = [
|
|
27128
27274
|
'brightnessSchool', 'gengYearSihua', 'tianmaSchool', 'tiankongSchool', 'jiekongSchool',
|
|
27129
27275
|
'kuiyueSchool', 'tianshiTianshang', 'changshengSchool', 'lateZishi', 'shenzhuSchool',
|
|
27130
|
-
'zuoyaoSchool',
|
|
27276
|
+
'mingzhuSchool', 'zuoyaoSchool', 'liunianSihua', 'sihuaVariant',
|
|
27131
27277
|
];
|
|
27132
27278
|
|
|
27133
27279
|
/** 紫微流派参数原样透传;非法值交给引擎按默认口径回退 */
|
|
@@ -27159,6 +27305,13 @@ function baziText(r) {
|
|
|
27159
27305
|
const jiao = r.dayun.jiao && r.dayun.jiao.at
|
|
27160
27306
|
? `;交运 ${r.dayun.jiao.at}(${r.dayun.jiao.frame},距${r.dayun.jiao.from.name} ${r.dayun.jiao.spanDays} 天,三日折一年)`
|
|
27161
27307
|
: '';
|
|
27308
|
+
// 起运岁精确值(截断到年月日时):上面 startAge 是四舍五入到月的口语写法,两者同源、并列给出。
|
|
27309
|
+
// 第三方对拍里截断到月 23/23 全中、四舍五入只有 15/23——差别就在这串日时上,所以必须看得见。
|
|
27310
|
+
const sae = r.dayun.startAgeExact;
|
|
27311
|
+
const startAgeExactLine = sae && Number.isInteger(sae.years)
|
|
27312
|
+
? `起运岁(精确):${sae.years} 年 ${sae.months} 个月 ${sae.days} 天 ${sae.hours} 小时`
|
|
27313
|
+
+ `(${sae.caliber};上面「${r.dayun.startAge.years}岁${r.dayun.startAge.months}个月」是四舍五入到月,两者同源)`
|
|
27314
|
+
: '';
|
|
27162
27315
|
// 阈值 20 分钟:与 NAOJ 历要项对拍实测,本引擎节气最多偏早 13.5 分钟(Meeus 低精度上限约 14 分钟)
|
|
27163
27316
|
const near = r.jieqi.nearBoundaryMinutes < 20
|
|
27164
27317
|
? `\n⚠ 出生时刻距「节」仅 ${r.jieqi.nearBoundaryMinutes} 分钟,而节气时刻本身有最多约 14 分钟的偏差,月柱与年柱建议人工复核。`
|
|
@@ -27191,6 +27344,22 @@ function baziText(r) {
|
|
|
27191
27344
|
(r.frame.yongshen.qt ? ` 穷通:${r.frame.yongshen.qt.month}${r.frame.yongshen.qt.stem}取${r.frame.yongshen.qt.yong.join('、')}(首取${r.frame.yongshen.qt.primary})` : ''),
|
|
27192
27345
|
`十神权重:${Object.entries(r.frame.godStats.groups).map(([k, v]) => `${k}${v}`).join(' ')}`,
|
|
27193
27346
|
] : [];
|
|
27347
|
+
// 八大地支结构(炳祥课静态口径):算得出但没有输出通道的字段等于没做,这里补一行摘要。
|
|
27348
|
+
// 只报「哪几支成党、异类是哪支、静态从格概率」,与上面旺衰分是两套并列口径,不互相覆盖。
|
|
27349
|
+
// 三柱模式第四支是正午占位:照实标「占位」,不把它说成实有的时支。
|
|
27350
|
+
const bs = r.strength && r.strength.branchStructure;
|
|
27351
|
+
const bsCols = bs ? bs.branches.map((b) => `${b.label}${b.branch}${b.camp}${bs.placeholderHour && b.key === 'hour' ? '·占位' : ''}`).join('、') : '';
|
|
27352
|
+
// 注意 bs.word 本身已含三柱说明(bazi.js 的 hourUnknown 分支会改写它),这里不重复追加
|
|
27353
|
+
const bsTail = bs && !bs.placeholderHour && !bs.complete ? ' 时柱暂缺,只列三支' : '';
|
|
27354
|
+
const branchStructureLine = bs
|
|
27355
|
+
? `地支结构:${bs.placeholderHour ? '三支+占位' : '四支'} ${bs.code}(${bsCols}) `
|
|
27356
|
+
+ `${bs.word}${bs.congProb != null ? `(静态从格 ${bs.congRange})` : ''}${bsTail}`
|
|
27357
|
+
: '';
|
|
27358
|
+
// 暗合:另列不并入合冲刑害。只出现一对时按课里口径「可忽略」,所以照实写出来但不升级为断语。
|
|
27359
|
+
const anhe = (r.relations && Array.isArray(r.relations.anhe)) ? r.relations.anhe : [];
|
|
27360
|
+
const anheLine = anhe.length
|
|
27361
|
+
? `暗合:${anhe.join(' ')}(另列,不并入上面的合冲刑害;${anhe.length === 1 ? '只一对,按口径可忽略' : `共 ${anhe.length} 对`})`
|
|
27362
|
+
: '';
|
|
27194
27363
|
const hourMissing = r.hourUnknown === true || !P.hour;
|
|
27195
27364
|
return [
|
|
27196
27365
|
`【四柱】${P.year.ganzhi} ${P.month.ganzhi} ${P.day.ganzhi}${P.hour ? ` ${P.hour.ganzhi}` : '(时柱暂缺)'}`,
|
|
@@ -27200,14 +27369,17 @@ function baziText(r) {
|
|
|
27200
27369
|
`五行:${wuxing}`,
|
|
27201
27370
|
...(palaces ? [palaces] : []),
|
|
27202
27371
|
`日主强弱:${r.strength.level}(${r.strength.score}) ${r.strength.detail}`,
|
|
27372
|
+
...(branchStructureLine ? [branchStructureLine] : []),
|
|
27203
27373
|
...gejuLine,
|
|
27204
27374
|
`天干关系:${(r.relations && r.relations.stems.length) ? r.relations.stems.join(' ') : '—'}`,
|
|
27205
27375
|
`地支关系:${(r.relations && r.relations.branches.length) ? r.relations.branches.join(' ') : '—'}`,
|
|
27376
|
+
...(anheLine ? [anheLine] : []),
|
|
27206
27377
|
shenshaLine,
|
|
27207
27378
|
`真太阳时:${r.solarTime.trueSolarText}(${r.input.geo ? r.input.geo.note + ';' : ''}${r.solarTime.note}) 晚子时:${r.input.lateZi ? '23:00 后算次日' : '23:00 后仍算当日'}`,
|
|
27208
27379
|
`节气:上一节 ${r.jieqi.previous.name} ${r.jieqi.previous.time} 下一节 ${r.jieqi.next.name} ${r.jieqi.next.time}`,
|
|
27209
27380
|
...(renyuanLine ? [renyuanLine] : []),
|
|
27210
27381
|
`大运:${r.dayun.rule}(${r.dayun.direction}),${r.dayun.startAge.years}岁${r.dayun.startAge.months}个月起运${jiao}`,
|
|
27382
|
+
...(startAgeExactLine ? [startAgeExactLine] : []),
|
|
27211
27383
|
` ${dayun}`,
|
|
27212
27384
|
`流年:${r.liunian.slice(0, 10).map((l) => `${l.year}${l.ganzhi}(${l.stemTenGod})${l.luck ? `·${l.luck.tier}` : ''}`).join(' ')}`,
|
|
27213
27385
|
(() => {
|
|
@@ -27234,8 +27406,8 @@ function ziweiText(r) {
|
|
|
27234
27406
|
const labels = {
|
|
27235
27407
|
brightnessSchool: '亮度', gengYearSihua: '庚干四化', tianmaSchool: '天马', tiankongSchool: '天空',
|
|
27236
27408
|
jiekongSchool: '截空', kuiyueSchool: '魁钺', tianshiTianshang: '天伤天使',
|
|
27237
|
-
changshengSchool: '长生', lateZishi: '晚子时', shenzhuSchool: '身主',
|
|
27238
|
-
zuoyaoSchool: '杂曜全表',
|
|
27409
|
+
changshengSchool: '长生', lateZishi: '晚子时', shenzhuSchool: '身主', mingzhuSchool: '命主取法',
|
|
27410
|
+
zuoyaoSchool: '杂曜全表', liunianSihua: '流年四化取干', sihuaVariant: '十干四化变体',
|
|
27239
27411
|
};
|
|
27240
27412
|
const diff = Object.entries(labels)
|
|
27241
27413
|
.filter(([key]) => r.schools[key] && r.schools[key] !== ZIWEI_SCHOOL_DEFAULTS[key])
|
|
@@ -27290,7 +27462,7 @@ function ziweiText(r) {
|
|
|
27290
27462
|
`【农历】${lunarText}(月首 ${r.lunar.monthStart}) 时支:${r.hourBranch} 年干支:${r.yearGanzhi}`,
|
|
27291
27463
|
`【时刻】${r.solarTime ? `${r.solarTime.civilText} → 真太阳时 ${r.solarTime.trueSolarText}${r.input.geo ? '(' + r.input.geo.note + ')' : ''}` : ''}`,
|
|
27292
27464
|
`【命宫】${r.soul.branch}(${r.soul.ganzhi}·${r.soul.nayin}) 【身宫】${r.body.branch}(落${r.body.lands}) 【五行局】${r.bureau.name}`,
|
|
27293
|
-
`【紫微】${r.ziwei} 【天府】${r.tianfu} 【命主】${r.lifeMaster} 【身主】${r.bodyMaster}${r.bodyMasterNote ? `(${r.bodyMasterSchool === 'common' ? '子午皆火星' : '子铃午火'})` : ''}`,
|
|
27465
|
+
`【紫微】${r.ziwei} 【天府】${r.tianfu} 【命主】${r.lifeMaster} 【身主】${r.bodyMaster}${r.bodyMasterNote ? `(${r.bodyMasterSchool === 'common' ? '子午皆火星' : '子铃午火'})` : ''}${r.lifeMasterNote ? `(${r.lifeMasterNote})` : ''}`,
|
|
27294
27466
|
`【大限】${r.daxian.rule},${r.daxian.startAge}岁起 【小限】${r.xiaoxianRule.direction}`,
|
|
27295
27467
|
schoolLine,
|
|
27296
27468
|
`【昌曲】文昌${r.changqu.wenchang.branch}(${r.changqu.wenchang.palace}${r.changqu.wenchang.mutagen ? '·化' + r.changqu.wenchang.mutagen : ''}) 文曲${r.changqu.wenqu.branch}(${r.changqu.wenqu.palace}${r.changqu.wenqu.mutagen ? '·化' + r.changqu.wenqu.mutagen : ''})`,
|
|
@@ -28834,8 +29006,10 @@ function chengguText(r) {
|
|
|
28834
29006
|
|
|
28835
29007
|
/** 小六壬文本 */
|
|
28836
29008
|
function xiaoliurenText(r) {
|
|
29009
|
+
// 所问从顶层读(引擎把 question 挂顶层,不进 meta——meta 要能被句柄完整复现)
|
|
29010
|
+
const q = r.question || (r.meta && r.meta.question) || null;
|
|
28837
29011
|
return [
|
|
28838
|
-
`【小六壬·${r.meta.mode}】${
|
|
29012
|
+
`【小六壬·${r.meta.mode}】${q ? `所问:${q}` : ''}`,
|
|
28839
29013
|
r.meta.originText,
|
|
28840
29014
|
`落宫:${r.steps.join(' → ')}`,
|
|
28841
29015
|
`断语:${r.result.palace}(${r.result.luck}) ${r.result.text}`,
|
|
@@ -29135,7 +29309,7 @@ return { interpret, DIRECTIONS, DIRECTION_DEFAULT, BRIGHTNESS, flowOf, parseDate
|
|
|
29135
29309
|
})();
|
|
29136
29310
|
|
|
29137
29311
|
window.Engine = __mods.index;
|
|
29138
|
-
window.__MP_VER = "0.
|
|
29312
|
+
window.__MP_VER = "0.64.0";
|
|
29139
29313
|
</script>
|
|
29140
29314
|
<script>
|
|
29141
29315
|
// 两个 UI 共用的表单规则:宿主面板(src/app.js)与独立页(src/web-ui.js)。
|
|
@@ -29251,16 +29425,22 @@ window.__MP_VER = "0.62.5";
|
|
|
29251
29425
|
--line:#c8c1b2;--dimline:#b9b2a4;--hair:#e9e2d3;
|
|
29252
29426
|
/* 底色略沉作「桌面」,--card 跳到近白:原先 bg 与 card 只差 1/255,卡片感等于零。
|
|
29253
29427
|
同一色相里塞 9 个几乎相等的浅色,谁都浮不起来。 */
|
|
29254
|
-
--
|
|
29255
|
-
--
|
|
29256
|
-
--
|
|
29257
|
-
--
|
|
29428
|
+
/* 水墨风:宣纸白为底、淡墨分层;米黄系整体降饱和,纸感靠 --band 的微暖留一点 */
|
|
29429
|
+
--bg:#f4f2ec;--card:#fdfdfb;--band:#f7f5ef;--hover:#eeece5;--hover2:#e6e4dc;
|
|
29430
|
+
--tri:#eef0ea;--soul:#f7ece9;--sel:#f5efe9;--link:#f0efe9;
|
|
29431
|
+
--red:#a02c26;--red-rgb:160,44,38;--lu:#3d5a52;--lu-rgb:61,90,82;
|
|
29432
|
+
--quan:#6e5a2e;--quan-rgb:110,90,46;--ke:#3a5568;--ke-rgb:58,85,104;--ji:#a02c26;
|
|
29258
29433
|
--br-good:#4c7a5c;--br-bad:#9c5b56;--on-accent:#fff;--wx-metal:#8a6b1f;
|
|
29259
|
-
--tg-bi:#
|
|
29434
|
+
--tg-bi:#4e5d6b;--tg-shi:#55685c;--tg-cai:#6e5a2e;--tg-guan:#8a4a42;--tg-yin:#5d5570;
|
|
29260
29435
|
/* 之前 mp-cli / mp-qt / mp-cl / 起名卡里引用了 --ink3、--fx、--sans,却从未定义:
|
|
29261
29436
|
var() 取不到值 → 整条声明作废,字色与字形全靠继承,楷体、弱化灰都成了摆设。 */
|
|
29262
29437
|
--ink3:#8a8378;--fx:"Kaiti SC",KaiTi,"STKaiti","Songti SC",serif;--sans:system-ui,-apple-system,"Microsoft YaHei",sans-serif;--kai:"Kaiti SC",KaiTi,"STKaiti",serif;
|
|
29263
|
-
--shadow:0 1px 2px rgba(35,28,18,.05),0 18px 40px -30px rgba(35,28,18,.42)
|
|
29438
|
+
--shadow:0 1px 2px rgba(35,28,18,.05),0 18px 40px -30px rgba(35,28,18,.42),
|
|
29439
|
+
/* 动效与圆角令牌:全站同一节奏(借鉴 wallpaper-engine 的 --we-dur/--we-ease 约定),
|
|
29440
|
+
reduced-motion 时整体关停,见文件尾的全局 @media。 */
|
|
29441
|
+
--dur:150ms;--dur-fast:100ms;--ease:cubic-bezier(.32,.72,.24,1);
|
|
29442
|
+
--r-sm:6px;--r-md:10px;--r-lg:14px;
|
|
29443
|
+
--glow:0 0 0 1px rgba(var(--lu-rgb),.25),0 0 12px rgba(var(--lu-rgb),.12)}
|
|
29264
29444
|
/* 变量与 .mp-it 共享 —— 「解析与详解」是 .pp 的兄弟节点、不在 .pp 内部,
|
|
29265
29445
|
变量只挂在 .pp 上时它拿不到 --card/--muted/--red,头部底色会变透明、边框会退回黑色。 */
|
|
29266
29446
|
.pp{border:1px solid var(--line);background:var(--bg);color:var(--ink);font-family:"Songti SC","SimSun","Microsoft YaHei",serif;font-size:12.5px;line-height:1.55;
|
|
@@ -29271,42 +29451,57 @@ window.__MP_VER = "0.62.5";
|
|
|
29271
29451
|
.pp,.mp-it,.mp-al,.mp-cg,.mp-cl,.mp-cli,.mp-kline,.mp-mb,.mp-mb-paper,.mp-nm,.mp-quick,.mp-cdiff,.mp-shadow,.mp-trace-card,.mp-trace-layer,.mp-prof{--ink:#eae5d9;--ink2:#d5cfc2;--muted:#aca598;--label:#a49c8e;--faint:#928b7e;
|
|
29272
29452
|
--line:#514a3e;--dimline:#5f5849;--hair:#2f2b23;
|
|
29273
29453
|
/* 与浅色同理:底更沉、卡片更亮,让层级在深底上也能立起来 */
|
|
29274
|
-
|
|
29275
|
-
--
|
|
29276
|
-
--
|
|
29277
|
-
--
|
|
29454
|
+
/* 暗色水墨:墨底宣纸灰字,降暖提灰 */
|
|
29455
|
+
--bg:#131311;--card:#1f1f1c;--band:#26261f;--hover:#2c2c26;--hover2:#35352c;
|
|
29456
|
+
--tri:#2a2e28;--soul:#332521;--sel:#322d27;--link:#2c2b25;
|
|
29457
|
+
--red:#e08a7a;--red-rgb:224,138,122;--lu:#8fb8a8;--lu-rgb:143,184,168;
|
|
29458
|
+
--quan:#c9a96a;--quan-rgb:201,169,106;--ke:#8aadc0;--ke-rgb:138,173,192;--ji:#e08a7a;
|
|
29278
29459
|
--br-good:#79c79a;--br-bad:#e09a8c;--on-accent:#14130f;--wx-metal:#dcb273;
|
|
29279
29460
|
--tg-bi:#93b7cf;--tg-shi:#8fbb9d;--tg-cai:#d3ae62;--tg-guan:#d98d84;--tg-yin:#b4a4d0;
|
|
29280
|
-
--ink3:#8b8478
|
|
29461
|
+
--ink3:#8b8478;
|
|
29462
|
+
--dur:150ms;--dur-fast:100ms;--ease:cubic-bezier(.32,.72,.24,1);
|
|
29463
|
+
--r-sm:6px;--r-md:10px;--r-lg:14px;
|
|
29464
|
+
--glow:0 0 0 1px rgba(var(--lu-rgb),.3),0 0 14px rgba(var(--lu-rgb),.16);
|
|
29465
|
+
--shadow:0 1px 2px rgba(0,0,0,.5),0 18px 40px -30px rgba(0,0,0,.9)}
|
|
29281
29466
|
}
|
|
29282
29467
|
.pp *{box-sizing:border-box}
|
|
29283
29468
|
.pp-grid{display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(4,minmax(150px,auto));gap:0;border:1px solid var(--line)}
|
|
29284
|
-
.pp-cell{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:7px 8px;display:flex;flex-direction:column;position:relative;min-height:150px;background:var(--bg)
|
|
29469
|
+
.pp-cell{border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:7px 8px;display:flex;flex-direction:column;position:relative;min-height:150px;background:var(--bg);
|
|
29470
|
+
transition:background var(--dur) var(--ease),box-shadow var(--dur) var(--ease)}
|
|
29471
|
+
.pp-cell:hover,.pp-cell:focus-visible{background:var(--card);box-shadow:var(--glow);z-index:1}
|
|
29472
|
+
/* 命宫:双环选中态(借鉴 wallpaper-engine 色板的「发丝内环 + accent 外环」,比裸描边读得清) */
|
|
29473
|
+
.pp-soul{box-shadow:inset 0 0 0 2px rgba(var(--red-rgb),.35);background:linear-gradient(180deg,rgba(var(--red-rgb),.05),transparent 60%)}
|
|
29474
|
+
.pp-soul:hover,.pp-soul:focus-visible{background:var(--card);box-shadow:inset 0 0 0 2px rgba(var(--red-rgb),.4),var(--glow)}
|
|
29285
29475
|
/* 右边框按「视觉列」去,不能按 nth-child:格子用 grid-column 绝对定位,DOM 顺序不等于列序 */
|
|
29286
29476
|
.pp-cell.pp-lastcol{border-right:none}
|
|
29287
29477
|
.pp-cell.pp-lastrow{border-bottom:none}
|
|
29288
|
-
.pp-center{grid-column:2/4;grid-row:2/4;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:16px 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;
|
|
29478
|
+
.pp-center{grid-column:2/4;grid-row:2/4;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:16px 18px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;text-align:center;position:relative;
|
|
29479
|
+
background:var(--bg)}
|
|
29480
|
+
.pp-center::before{content:"";position:absolute;inset:12px 16px;border:1px solid var(--hair);border-radius:var(--r-md);pointer-events:none}
|
|
29481
|
+
.pp-center::after{content:"";position:absolute;inset:13px 17px;border:1px solid var(--line);border-radius:var(--r-md);opacity:.4;pointer-events:none}
|
|
29289
29482
|
.pp-center .ct-t1{font-size:17px;font-weight:700;letter-spacing:.05em;margin-bottom:6px}
|
|
29290
29483
|
.pp-center .ct-t2{font-size:12.5px;color:var(--ink)}
|
|
29291
29484
|
.pp-center .ct-t3{font-size:14px;letter-spacing:.35em;margin:6px 0;font-weight:600}
|
|
29292
29485
|
.pp-center .ct-t4{font-size:12.5px;color:var(--muted)}
|
|
29293
29486
|
.pp-stars{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:0 6px;font-size:13px;line-height:1.6;min-height:36px}
|
|
29294
29487
|
.pp-st{white-space:nowrap}
|
|
29295
|
-
.pp-st.main{font-weight:700}
|
|
29488
|
+
.pp-st.main{font-weight:700;font-size:13px;letter-spacing:.04em;text-shadow:0 0 .5px currentColor}
|
|
29296
29489
|
.pp-st.good{color:var(--lu)}
|
|
29297
29490
|
.pp-st.bad{color:var(--ji)}
|
|
29298
|
-
.pp-st.
|
|
29491
|
+
.pp-st.bad::before{content:"·";font-weight:900;margin-right:1px}
|
|
29492
|
+
.pp-st.aux{color:var(--muted);font-size:11.5px}
|
|
29299
29493
|
.pp-m{display:inline-block;font-style:normal;font-size:12px;line-height:1;padding:0 2px;border-radius:2px;color:var(--on-accent);margin-left:1px;vertical-align:1px}
|
|
29300
29494
|
.pp-m.lu{background:var(--lu)}.pp-m.quan{background:var(--quan)}.pp-m.ke{background:var(--ke)}.pp-m.ji{background:var(--ji)}
|
|
29301
29495
|
/* 大限/流年四化:只留色框不填充,与生年四化的实心块区分 */
|
|
29302
29496
|
.pp-m.view{background:transparent;box-shadow:inset 0 0 0 1px currentColor}
|
|
29303
29497
|
.pp-m.view.lu{color:var(--lu)}.pp-m.view.quan{color:var(--quan)}.pp-m.view.ke{color:var(--ke)}.pp-m.view.ji{color:var(--ji)}
|
|
29304
|
-
/*
|
|
29305
|
-
.pp-m.self
|
|
29306
|
-
.pp-m.self.lu{color:var(--lu)}.pp-m.self.quan{color:var(--quan)}.pp-m.self.ke{color:var(--ke)}.pp-m.self.ji{color:var(--ji)}
|
|
29498
|
+
/* 自化:宫干化回本宫。0.64.0 起不再用徽章,改在星名后画彩色小箭头(见 .pp-zha),
|
|
29499
|
+
与生年实心块、大限/流年空心框分成三层——所以这里不再保留 .pp-m.self 样式 */
|
|
29307
29500
|
/* 庙旺得利平不陷:星名后的等级小字。刻意压低视觉权重(灰为主、陷才微红),
|
|
29308
29501
|
避免与四化的实心彩色方块抢层次 */
|
|
29309
|
-
.pp-b{font-style:normal;font-size:
|
|
29502
|
+
.pp-b{font-style:normal;font-size:10px;margin-left:3px;padding:0 3px;border-radius:999px;color:var(--muted);letter-spacing:0;opacity:.92;background:var(--band)}
|
|
29503
|
+
.pp-b.good{color:var(--br-good)}
|
|
29504
|
+
.pp-b.bad{color:var(--br-bad)}
|
|
29310
29505
|
.pp-b.good{color:var(--br-good)}
|
|
29311
29506
|
.pp-b.mid{color:var(--muted)}
|
|
29312
29507
|
.pp-b.bad{color:var(--br-bad)}
|
|
@@ -29369,6 +29564,12 @@ window.__MP_VER = "0.62.5";
|
|
|
29369
29564
|
.pp-str{margin-top:10px;font-size:13px;line-height:1.8}
|
|
29370
29565
|
.pp-str b{color:var(--red);font-size:15px;margin:0 4px}
|
|
29371
29566
|
.pp-drel{font-style:normal;color:var(--red);font-size:12px}
|
|
29567
|
+
/* 八大地支结构:与日主强弱并列的第二套口径,用中性色,不与主结论抢色 */
|
|
29568
|
+
.pp-struct{margin-top:6px;font-size:12.5px;line-height:1.75;color:var(--ink2)}
|
|
29569
|
+
.pp-struct .pp-st-code{font-weight:700;letter-spacing:.06em;color:var(--ink);margin-right:6px}
|
|
29570
|
+
.pp-struct .pp-st-odd{color:var(--quan)}
|
|
29571
|
+
.pp-anhe{margin-top:6px;font-size:12.5px;line-height:1.75;color:var(--ink2)}
|
|
29572
|
+
.pp-anhe b{color:var(--muted);font-weight:400;margin-right:8px}
|
|
29372
29573
|
.pp-dim{color:var(--muted)}
|
|
29373
29574
|
/* 岁运提示下的原文:比正文再轻一档,只做出处,不抢结论 */
|
|
29374
29575
|
.pp-sy-src{margin-top:6px;font-size:11.5px;line-height:1.55}
|
|
@@ -29385,7 +29586,49 @@ window.__MP_VER = "0.62.5";
|
|
|
29385
29586
|
#ppm-ben:checked~.pp-modes label[for="ppm-ben"],#ppm-da:checked~.pp-modes label[for="ppm-da"],#ppm-ln:checked~.pp-modes label[for="ppm-ln"]{background:var(--red);color:var(--on-accent)}
|
|
29386
29587
|
.pp-tri{background:var(--tri)}
|
|
29387
29588
|
.pp-soul{background:var(--soul)}
|
|
29388
|
-
|
|
29589
|
+
/* 三视图切换(学文墨天机:飞星/三合/四化)——真分派,不是同一张盘的显隐开关:
|
|
29590
|
+
四化派(默认):生年四化实心 + 大限/流年空心 + 自化 + 飞星链 chips;
|
|
29591
|
+
飞星派:每宫格内显示「宫干四化飞出」逐条(禄→某宫…),图例藏大限/流年四化;
|
|
29592
|
+
三合派:只看星曜庙旺与宫位结构,所有四化徽章(含生年)、自化、飞星链全部藏起。 */
|
|
29593
|
+
.pp-schools{border-top:none}
|
|
29594
|
+
.pp-schools label{min-height:38px;padding:2px 16px;font-size:12px}
|
|
29595
|
+
#ppm-sc-sihe:checked~.pp-schools label[for="ppm-sc-sihe"],
|
|
29596
|
+
#ppm-sc-feixing:checked~.pp-schools label[for="ppm-sc-feixing"],
|
|
29597
|
+
#ppm-sc-sanhe:checked~.pp-schools label[for="ppm-sc-sanhe"]{background:var(--lu);color:var(--on-accent)}
|
|
29598
|
+
/* 飞星派专属:宫内宫干四化行,只在飞星模式展开 */
|
|
29599
|
+
.pp-fx{display:none;margin-top:3px;font-size:10.5px;line-height:1.55;color:var(--muted);border-top:1px dashed var(--hair);padding-top:2px}
|
|
29600
|
+
.pp-fx i{font-style:normal;white-space:nowrap;margin-right:4px}
|
|
29601
|
+
.pp-fx i em{font-style:normal;color:var(--faint)}
|
|
29602
|
+
#ppm-sc-feixing:checked~.pp-body .pp-fx{display:block}
|
|
29603
|
+
#ppm-sc-feixing:checked~.pp-body .pp-m.view,
|
|
29604
|
+
#ppm-sc-feixing:checked~.pp-body .pp-viewhua{display:none}
|
|
29605
|
+
/* 三合派:四化信息整体退场(生年/自化/大限流年/图例/飞星链 chips/自化箭头) */
|
|
29606
|
+
#ppm-sc-sanhe:checked~.pp-body .pp-m,
|
|
29607
|
+
#ppm-sc-sanhe:checked~.pp-body .pp-zha,
|
|
29608
|
+
#ppm-sc-sanhe:checked~.pp-body .pp-viewhua,
|
|
29609
|
+
#ppm-sc-sanhe:checked~.pp-flywrap{display:none}
|
|
29610
|
+
/* 自化箭头(学文墨天机):自化是「宫干化回本宫」,箭头画在星名左边、箭头尖顶住星名,
|
|
29611
|
+
由左向右弧着落回这颗星——读成「这笔化飞出去又落回自己」。
|
|
29612
|
+
为什么必须放星名左边:放右边箭头就朝外,视觉上成了「从本宫飞出去」,意思正好反了。
|
|
29613
|
+
为什么 inline 在星名旁而不是绝对定位:宫格左侧会被满星曜的宫撞上(实测压住「紫微 庙」)。 */
|
|
29614
|
+
.pp-zha{display:inline-block;margin-right:3px;vertical-align:-1px;line-height:0;cursor:help}
|
|
29615
|
+
.pp-zha .z-a{width:19px;height:8px;display:block;overflow:visible}
|
|
29616
|
+
.pp-zha .z-shaft{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
|
|
29617
|
+
.pp-zha .z-head{fill:currentColor;stroke:none}
|
|
29618
|
+
.pp-zha.lu{color:var(--lu)}.pp-zha.quan{color:var(--quan)}
|
|
29619
|
+
.pp-zha.ke{color:var(--ke)}.pp-zha.ji{color:var(--ji)}
|
|
29620
|
+
#ppm-sc-sihe:checked~.pp-flywrap{display:block}
|
|
29621
|
+
#ppm-sc-feixing:checked~.pp-flywrap{display:block}
|
|
29622
|
+
/* 自化图示(文墨式图例行):箭头颜色跟四化色走 */
|
|
29623
|
+
.pp-zhlegend{display:flex;gap:10px;align-items:center;justify-content:center;font-size:12px;color:var(--muted);margin-top:4px}
|
|
29624
|
+
.pp-zhlegend i{font-style:normal;font-weight:600}
|
|
29625
|
+
.pp-zhlegend .z-lu{color:var(--lu)}.pp-zhlegend .z-quan{color:var(--quan)}
|
|
29626
|
+
.pp-zhlegend .z-ke{color:var(--ke)}.pp-zhlegend .z-ji{color:var(--ji)}
|
|
29627
|
+
/* 纸纹:feTurbulence 纤维噪点叠加在盘面底色上,浅色偏灰纤维、暗色同用(低透明度不抢字) */
|
|
29628
|
+
.pp-paper{position:relative}
|
|
29629
|
+
.pp::before{content:"";position:absolute;inset:0;pointer-events:none;z-index:0;opacity:.5;
|
|
29630
|
+
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0.32 0 0 0 0 0.29 0 0 0 0 0.24 0 0 0 0.10 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23p)'/%3E%3C/svg%3E")}
|
|
29631
|
+
.pp>*{position:relative;z-index:1}
|
|
29389
29632
|
.pp-borrow{font-size:9.5px;color:var(--muted);margin-top:1px;letter-spacing:.02em}
|
|
29390
29633
|
|
|
29391
29634
|
/* —— 宫位点击展开详情 + 三方四正联动 ——
|
|
@@ -29395,9 +29638,13 @@ window.__MP_VER = "0.62.5";
|
|
|
29395
29638
|
.pp-cell:hover{background:var(--hover)}
|
|
29396
29639
|
/* 键盘可达:宫格是 div+tabindex,焦点必须看得见(原先把 outline 关了却没补替代) */
|
|
29397
29640
|
.pp-cell:focus-visible{box-shadow:inset 0 0 0 2px var(--red)}
|
|
29398
|
-
.pp-cell.pp-sel{background:var(--sel);box-shadow:inset 0 0 0 2px rgba(var(--red-rgb),.
|
|
29641
|
+
.pp-cell.pp-sel{background:var(--sel);box-shadow:inset 0 0 0 2px rgba(var(--red-rgb),.55)}
|
|
29642
|
+
/* 三方四正虚线:ink 色细虚线,端点宫由 pp-sel/pp-link 底色呼应 */
|
|
29643
|
+
.pp-sf{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:2}
|
|
29644
|
+
.pp-sf line{stroke:var(--ink);stroke-width:1.2px;stroke-dasharray:3 2.4;opacity:.38;vector-effect:non-scaling-stroke}
|
|
29645
|
+
.pp-sf circle{fill:var(--ink);opacity:.45}
|
|
29399
29646
|
/* 选中宫的财帛/官禄/迁移三宫:能一眼看出命宫牵着哪几宫 */
|
|
29400
|
-
.pp-cell.pp-link{background:var(--link);box-shadow:inset 0 0 0 1.5px rgba(var(--red-rgb),.
|
|
29647
|
+
.pp-cell.pp-link{background:var(--link);box-shadow:inset 0 0 0 1.5px rgba(var(--red-rgb),.3)}
|
|
29401
29648
|
.pp-detail{display:none;border-top:1px solid var(--line);background:var(--card);padding:11px 14px 13px;font-family:system-ui,sans-serif}
|
|
29402
29649
|
.pp-detail.open{display:block}
|
|
29403
29650
|
.pp-detail .dt-dh{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;padding-bottom:6px;margin-bottom:7px;border-bottom:1px dashed var(--line)}
|
|
@@ -29422,6 +29669,7 @@ window.__MP_VER = "0.62.5";
|
|
|
29422
29669
|
.pp-detail .dt-tri em{font-style:normal;color:var(--muted);font-size:12px;margin-left:5px}
|
|
29423
29670
|
.pp-detail .dt-tri em::before{content:"·";margin-right:3px}
|
|
29424
29671
|
.pp-detail .dt-empty{color:var(--faint);font-size:12.5px}
|
|
29672
|
+
.pp-detail .dt-self{margin-right:10px;white-space:nowrap}
|
|
29425
29673
|
.pp-detail .hint{color:var(--faint);font-size:11.5px;margin-top:6px}
|
|
29426
29674
|
.pp-ss{display:flex;flex-wrap:wrap;gap:0 7px;font-size:12.5px;line-height:1.6}
|
|
29427
29675
|
.pp-bz .pp-ss{flex-direction:column;align-items:center;gap:0;font-size:11.5px;line-height:1.5}
|
|
@@ -30590,6 +30838,16 @@ window.__MP_VER = "0.62.5";
|
|
|
30590
30838
|
.mp-prof-bar button.ghost{background:transparent;color:var(--muted);border-color:var(--line)}
|
|
30591
30839
|
.mp-prof-bar .mp-prof-tip{font-size:11.5px;color:var(--muted)}
|
|
30592
30840
|
@media (max-width:360px){.mp-prof-list{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}}
|
|
30841
|
+
|
|
30842
|
+
/* 减少动态效果偏好:本面板所有过渡一律退化为即时(不覆盖用户系统设置) */
|
|
30843
|
+
@media (prefers-reduced-motion: reduce){
|
|
30844
|
+
.pp *,.mp-it *,.mp-al *,.mp-btn,.mp-chip{transition:none!important;animation:none!important}
|
|
30845
|
+
}
|
|
30846
|
+
/* 大表行 hover:只提底色不加位移,行高稳定不被打断 */
|
|
30847
|
+
.pp table tbody tr{transition:background var(--dur-fast) var(--ease)}
|
|
30848
|
+
.pp table tbody tr:hover{background:var(--hover)}
|
|
30849
|
+
/* 结果卡阴影分层:默认最轻,hover 时浮起一档(只对可交互的卡,避免整页抖动) */
|
|
30850
|
+
.pp{transition:box-shadow var(--dur) var(--ease)}
|
|
30593
30851
|
`;
|
|
30594
30852
|
const pp = (window.__PP = window.__PP || {});
|
|
30595
30853
|
pp.CSS = CSS;
|
|
@@ -30663,7 +30921,7 @@ window.__MP_VER = "0.62.5";
|
|
|
30663
30921
|
pp._wxIcon = wxIcon;
|
|
30664
30922
|
pp._triGlyph = triGlyph;
|
|
30665
30923
|
|
|
30666
|
-
function starsHTML(stars, viewHua) {
|
|
30924
|
+
function starsHTML(stars, viewHua, selfHuaMap) {
|
|
30667
30925
|
if (!stars || !stars.length) return '';
|
|
30668
30926
|
return stars.map((s) => {
|
|
30669
30927
|
const cls = TYPE_CLASS[s.type] || 'aux';
|
|
@@ -30674,9 +30932,13 @@ window.__MP_VER = "0.62.5";
|
|
|
30674
30932
|
const b = s.brightness ? `<em class="pp-b ${BR_CLASS[s.brightness] || 'mid'}">${s.brightness}</em>` : '';
|
|
30675
30933
|
// 全表杂曜的入庙标记(天官/天福只有四宫入庙,来路是庙地专论,不是十四主星那张亮度表)
|
|
30676
30934
|
const tm = s.inTemple ? '<em class="pp-b good">庙</em>' : '';
|
|
30677
|
-
//
|
|
30935
|
+
// 自化(宫干化回本宫)画成箭头,箭头尖顶在星名前——«化» 从宫干飞出去又落回这颗星,
|
|
30936
|
+
// 所以读作「←这笔化飞回本宫」而不是「从这颗星飞出去」。放星名前是关键:
|
|
30937
|
+
// 放星名后箭头朝右,视觉上就成了「飞出本宫」,意思正好反了
|
|
30938
|
+
const zh = (selfHuaMap && selfHuaMap[s.name]) ? zhaMark(selfHuaMap[s.name], s.name) : '';
|
|
30939
|
+
// 顺序:自化箭头 → 星名 → 亮度灰字 → 四化色块。灰字紧贴星名变成一体,彩色实心框独立在末尾,
|
|
30678
30940
|
// 避免两者字号差导致视觉叠压(试过 星名→四化→亮度,10px 字形会压住 8.5px 的框)
|
|
30679
|
-
return `<span class="pp-st ${cls}">${s.name}${b}${tm}${m}${vm}</span>`;
|
|
30941
|
+
return `<span class="pp-st ${cls}">${zh}${s.name}${b}${tm}${m}${vm}</span>`;
|
|
30680
30942
|
}).join('');
|
|
30681
30943
|
}
|
|
30682
30944
|
|
|
@@ -30691,7 +30953,7 @@ window.__MP_VER = "0.62.5";
|
|
|
30691
30953
|
const fx = (n) => ((n % 12) + 12) % 12;
|
|
30692
30954
|
const isTrine = (b, m) => b !== m && [fx(m + 4), fx(m + 8), fx(m + 6)].includes(b);
|
|
30693
30955
|
|
|
30694
|
-
function cellHTML(p, soulIdx, view, allPalaces, viewHua) {
|
|
30956
|
+
function cellHTML(p, soulIdx, view, allPalaces, viewHua, flyByBranch) {
|
|
30695
30957
|
const pos = POS[p.branch] || [1, 1];
|
|
30696
30958
|
const b = BR.indexOf(p.branch);
|
|
30697
30959
|
const cls = ['pp-cell'];
|
|
@@ -30702,8 +30964,6 @@ window.__MP_VER = "0.62.5";
|
|
|
30702
30964
|
if (pos[1] === 4) cls.push('pp-lastcol');
|
|
30703
30965
|
const ss = p.shensha || {};
|
|
30704
30966
|
const pname = NAMES[fx(soulIdx - b)];
|
|
30705
|
-
const zh = (p.selfHua && p.selfHua.length)
|
|
30706
|
-
? `<span class="pp-zh">${p.selfHua.map((x) => `<i class="pp-m self ${MUT[x.type]}" title="自化:宫干化回本宫">${x.type}</i>`).join('')}</span>` : '';
|
|
30707
30967
|
// 命无正曜:命宫无十四主星时,传统要借对宫(迁移宫)主星来看
|
|
30708
30968
|
let borrow = '';
|
|
30709
30969
|
if (b === soulIdx && allPalaces) {
|
|
@@ -30717,9 +30977,10 @@ window.__MP_VER = "0.62.5";
|
|
|
30717
30977
|
}
|
|
30718
30978
|
}
|
|
30719
30979
|
return `<div class="${cls.join(' ')}" data-pi="${b}" data-view="${view}" role="button" tabindex="0" aria-expanded="false" style="grid-row:${pos[0]};grid-column:${pos[1]}">
|
|
30720
|
-
<div class="pp-stars">${starsHTML(p.stars, viewHua)}
|
|
30980
|
+
<div class="pp-stars">${starsHTML(p.stars, viewHua, selfHuaMapOf(p))}</div>
|
|
30721
30981
|
${borrow}
|
|
30722
30982
|
<div class="pp-ages">${agesHTML(p.xiaoxian.age)}</div>
|
|
30983
|
+
${fxLineHTML(p, flyByBranch)}
|
|
30723
30984
|
<div class="pp-foot">
|
|
30724
30985
|
<div class="ft-l">
|
|
30725
30986
|
<span class="ft-dx">${ss.boshi} ${p.daxian.start}-${p.daxian.end}</span>
|
|
@@ -30735,6 +30996,40 @@ window.__MP_VER = "0.62.5";
|
|
|
30735
30996
|
</div>`;
|
|
30736
30997
|
}
|
|
30737
30998
|
|
|
30999
|
+
/* 自化箭头(文墨天机式):自化的定义是「宫干化回本宫」,箭头从左侧弧进来、箭头尖顶住星名,
|
|
31000
|
+
读成「这笔化飞出去又落回本宫」,不是「从这颗星飞出去」。
|
|
31001
|
+
几何按 22×9 画:左侧起笔 → 弧线上行 → 右侧箭头尖落在星名左边缘。
|
|
31002
|
+
stroke 跟 currentColor 走,颜色由 .pp-zha.lu/.quan/.ke/.ji 决定。
|
|
31003
|
+
位置:星名左边 inline,不绝对定位——宫格左侧常被满星曜占满,绝对定位会压住星名(实测压「紫微 庙」);
|
|
31004
|
+
也不能放星名右边,那样箭头朝外,语义正好反了。 */
|
|
31005
|
+
function zhaMark(type, star) {
|
|
31006
|
+
return `<span class="pp-zha ${MUT[type]}" title="自化${esc(type)}:${esc(star)}·宫干化回本宫"><svg class="z-a" viewBox="0 0 22 9" role="img" aria-label="自化${esc(type)}">
|
|
31007
|
+
<path class="z-shaft" d="M1 7C6.6 7 11.4 5.6 17.2 3.2"/>
|
|
31008
|
+
<path class="z-head" d="M20.2 2 17.8 4.9 16.6 1.9Z"/>
|
|
31009
|
+
</svg></span>`;
|
|
31010
|
+
}
|
|
31011
|
+
pp._zhaMark = zhaMark;
|
|
31012
|
+
|
|
31013
|
+
/* selfHua → { 星名: 化类型 },供 starsHTML 把箭头贴到对应星上。
|
|
31014
|
+
同一颗星一般只被一种化命中;万一多条,取第一条(数据层已按四化顺序排)。 */
|
|
31015
|
+
function selfHuaMapOf(p) {
|
|
31016
|
+
const map = {};
|
|
31017
|
+
for (const x of p.selfHua || []) {
|
|
31018
|
+
if (!x || !x.star || !MUT[x.type]) continue;
|
|
31019
|
+
if (!map[x.star]) map[x.star] = x.type;
|
|
31020
|
+
}
|
|
31021
|
+
return map;
|
|
31022
|
+
}
|
|
31023
|
+
|
|
31024
|
+
/* 飞星派专属:本宫宫干四化飞到哪一宫,逐条摊在宫格内(只此模式展开,CSS 控显隐)。
|
|
31025
|
+
宫数据不带 mutagenHits,从 r.daxianList 借:同一宫干,飞化等价。 */
|
|
31026
|
+
function fxLineHTML(p, flyByBranch) {
|
|
31027
|
+
const hits = (flyByBranch && flyByBranch[p.branch]) || [];
|
|
31028
|
+
if (!hits.length) return '';
|
|
31029
|
+
const items = hits.map((m) => `<i class="${MUT[m.type] || ''}" title="${esc(m.star)}化${esc(m.type)}">${esc(m.type)}<em>→${esc(m.palace || '未上盘')}</em></i>`).join('');
|
|
31030
|
+
return `<div class="pp-fx">${esc(p.ganzhi)}宫干 ${items}</div>`;
|
|
31031
|
+
}
|
|
31032
|
+
|
|
30738
31033
|
function sizhuOf(r) {
|
|
30739
31034
|
try {
|
|
30740
31035
|
const E = window.Engine || (window.__PP && window.__PP.Engine);
|
|
@@ -30765,7 +31060,9 @@ window.__MP_VER = "0.62.5";
|
|
|
30765
31060
|
const dxObj = (r.daxianList || []).find((d) => d.branch === dxPalace.branch) || null;
|
|
30766
31061
|
const huaByView = { da: huaMap(dxObj && dxObj.mutagenHits), ln: huaMap(ln && ln.mutagenHits) };
|
|
30767
31062
|
|
|
30768
|
-
const
|
|
31063
|
+
const flyByBranch = {};
|
|
31064
|
+
for (const d of r.daxianList || []) flyByBranch[d.branch] = d.mutagenHits || [];
|
|
31065
|
+
const grid = (m, kind) => r.palaces.map((p) => cellHTML(p, m, kind, r.palaces, huaByView[kind] || null, flyByBranch)).join('');
|
|
30769
31066
|
const center = (m, kind) => {
|
|
30770
31067
|
const mode = kind === 'da'
|
|
30771
31068
|
? `<div class="ct-t1">大限 ${dxPalace.ganzhi} ${dxPalace.daxian.start}-${dxPalace.daxian.end}岁</div>`
|
|
@@ -30777,14 +31074,14 @@ window.__MP_VER = "0.62.5";
|
|
|
30777
31074
|
<div class="ct-t2">公历 ${r.input.year}-${String(r.input.month).padStart(2, '0')}-${String(r.input.day).padStart(2, '0')} ${String(r.input.hour).padStart(2, '0')}:${String(r.input.minute).padStart(2, '0')}</div>
|
|
30778
31075
|
<div class="ct-t2">农历 ${r.lunar.year}年${r.lunar.isLeap ? `闰${r.lunar.monthRaw || r.lunar.month}` : r.lunar.month}月${r.lunar.day}日${r.hourBranch}时${r.lunar.isLeap && r.lunar.monthRaw && r.lunar.month !== r.lunar.monthRaw ? `(按${r.lunar.month}月起盘)` : ''}</div>
|
|
30779
31076
|
${sizhuOf(r) ? `<div class="ct-t3">${sizhuOf(r)}</div>` : ''}
|
|
30780
|
-
<div class="ct-t4">命主 ${r.lifeMaster} 身主 ${r.bodyMaster}${r.bodyMasterNote ? `<span class="pp-dim" title="${esc(r.bodyMasterNote)}">*</span>` : ''}</div>
|
|
31077
|
+
<div class="ct-t4">命主 ${r.lifeMaster}${r.lifeMasterNote ? `<span class="pp-dim" title="${esc(r.lifeMasterNote)}">*</span>` : ''} 身主 ${r.bodyMaster}${r.bodyMasterNote ? `<span class="pp-dim" title="${esc(r.bodyMasterNote)}">*</span>` : ''}</div>
|
|
30781
31078
|
<div class="ct-t4">命宫 ${r.soul.branch} 身宫 ${r.body.branch} 五行局 ${r.bureau.name}</div>
|
|
30782
31079
|
<div class="ct-t4">子年斗君 ${r.doujun ? r.doujun.zinian : '—'} 流年斗君 ${ln && ln.doujun ? ln.doujun : '—'}</div>
|
|
30783
31080
|
<div class="ct-t4">紫微 ${r.ziwei} 天府 ${r.tianfu} ${kind === 'da' ? '大限命宫 ' + BR[dxIdx] : kind === 'ln' ? '流年命宫 ' + BR[lnIdx] : '本命命宫 ' + r.soul.branch}</div>
|
|
30784
31081
|
${kind === 'da' || kind === 'ln' ? `<div class="ct-t4 pp-viewhua">${kind === 'da' ? '大限' : '流年'}四化 ${(kind === 'da' ? huaByView.da : huaByView.ln) && Object.keys(kind === 'da' ? huaByView.da : huaByView.ln).length
|
|
30785
31082
|
? Object.entries(kind === 'da' ? huaByView.da : huaByView.ln).map(([s2, t]) => `${s2}化${t}`).join(' ')
|
|
30786
31083
|
: '<span class="pp-dim">未飞四化</span>'}</div>` : ''}
|
|
30787
|
-
<div class="pp-legend"><span class="pp-m lu">禄</span><span class="pp-m quan">权</span><span class="pp-m ke">科</span><span class="pp-m ji">忌</span><span>实心=生年四化 空心=大限/流年四化
|
|
31084
|
+
<div class="pp-legend"><span class="pp-m lu">禄</span><span class="pp-m quan">权</span><span class="pp-m ke">科</span><span class="pp-m ji">忌</span><span>实心=生年四化 空心=大限/流年四化 箭头=自化 红框=命宫 浅底=三方四正</span></div>
|
|
30788
31085
|
</div>`;
|
|
30789
31086
|
};
|
|
30790
31087
|
|
|
@@ -30863,14 +31160,22 @@ window.__MP_VER = "0.62.5";
|
|
|
30863
31160
|
<input type="radio" name="ppm" id="ppm-ben" class="pp-r" checked>
|
|
30864
31161
|
<input type="radio" name="ppm" id="ppm-da" class="pp-r">
|
|
30865
31162
|
<input type="radio" name="ppm" id="ppm-ln" class="pp-r">
|
|
31163
|
+
<input type="radio" name="ppm-sc" id="ppm-sc-sihe" class="pp-r" checked>
|
|
31164
|
+
<input type="radio" name="ppm-sc" id="ppm-sc-feixing" class="pp-r">
|
|
31165
|
+
<input type="radio" name="ppm-sc" id="ppm-sc-sanhe" class="pp-r">
|
|
30866
31166
|
<div class="pp-modes">
|
|
30867
31167
|
<label for="ppm-ben">本命</label><label for="ppm-da">大限</label><label for="ppm-ln">流年</label>
|
|
30868
31168
|
<span class="pp-soon">点任一宫位看详情</span>
|
|
30869
31169
|
</div>
|
|
31170
|
+
<div class="pp-modes pp-schools">
|
|
31171
|
+
<label for="ppm-sc-sihe">四化</label><label for="ppm-sc-feixing">飞星</label><label for="ppm-sc-sanhe">三合</label>
|
|
31172
|
+
</div>
|
|
30870
31173
|
${body('ben', soulIdx, 'ben')}
|
|
30871
31174
|
${body('da', dxIdx, 'da')}
|
|
30872
31175
|
${body('ln', lnIdx, 'ln')}
|
|
30873
|
-
|
|
31176
|
+
<div class="pp-zhlegend">自化图示 <span class="z-lu">${pp._zhaMark('禄', '本宫')}禄</span><span class="z-quan">${pp._zhaMark('权', '本宫')}权</span><span class="z-ke">${pp._zhaMark('科', '本宫')}科</span><span class="z-ji">${pp._zhaMark('忌', '本宫')}忌</span></div>
|
|
31177
|
+
<div class="pp-flywrap">${flyHTML}${flyCompositeHTML}</div>
|
|
31178
|
+
</div>${flowHTML}${chips}${pats}${dxs}${lnHit}${zyHTML}`;
|
|
30874
31179
|
};
|
|
30875
31180
|
|
|
30876
31181
|
// ── 宫位详情 ────────────────────────────────────────────────
|
|
@@ -30900,8 +31205,9 @@ window.__MP_VER = "0.62.5";
|
|
|
30900
31205
|
const auxes = p.stars.filter((s) => s.type === '吉星' || s.type === '辅星');
|
|
30901
31206
|
const bads = p.stars.filter((s) => s.type === '煞星');
|
|
30902
31207
|
const misc = p.stars.filter((s) => !['主星', '吉星', '辅星', '煞星'].includes(s.type));
|
|
31208
|
+
// 自化与盘面统一用箭头:详情里额外标出被化那颗星(盘面靠位置,这里靠文字)
|
|
30903
31209
|
const selfHua = (p.selfHua || []).length
|
|
30904
|
-
? p.selfHua.map((x) => `<
|
|
31210
|
+
? p.selfHua.map((x) => `<span class="dt-self">${zhaMark(x.type, x.star || '本宫')}${esc(x.star || '')}</span>`).join('')
|
|
30905
31211
|
: '<span class="dt-empty">无</span>';
|
|
30906
31212
|
// 三方四正:三合(+4/+8)与对宫(+6)
|
|
30907
31213
|
const tri = [fx(b + 4), fx(b + 8), fx(b + 6)].map((idx) => {
|
|
@@ -30945,6 +31251,69 @@ window.__MP_VER = "0.62.5";
|
|
|
30945
31251
|
body.querySelectorAll('.pp-cell[aria-expanded="true"]').forEach((c) => c.setAttribute('aria-expanded', 'false'));
|
|
30946
31252
|
}
|
|
30947
31253
|
|
|
31254
|
+
/* 三方四正连线(文墨天机式):点击宫位后,把本宫—对宫—财帛—官禄四点连成虚线。
|
|
31255
|
+
实现是纯 SVG overlay:绝对定位在 .pp-body 里、pointer-events:none 不挡点击,
|
|
31256
|
+
线段端点由宫位格在 grid 上的行列号换算成百分比坐标,窗口缩放自动跟随。 */
|
|
31257
|
+
const SF_POS = { /* 与十二宫 POS 同构:地支 → [row, col](1-based,含中宫 2/3) */ };
|
|
31258
|
+
function drawSanfang(body, pi) {
|
|
31259
|
+
clearSanfang(body);
|
|
31260
|
+
const grid = body.querySelector('.pp-grid');
|
|
31261
|
+
if (!grid) return;
|
|
31262
|
+
const targets = [pi, (pi + 6) % 12, (pi + 4) % 12, (pi + 8) % 12];
|
|
31263
|
+
/* 文墨式连线:线只走中宫,不穿周边宫位。
|
|
31264
|
+
每个宫往中宫一侧的「边中点」取锚:上排宫取下边中点、下排宫取上边中点,
|
|
31265
|
+
左列宫取右边中点、右列宫取左边中点。中宫占 col 2~3 / row 2~3(即 25%~75%),
|
|
31266
|
+
锚点恰好落在中宫边界上,折线自然被中宫「接住」。 */
|
|
31267
|
+
const anchorOf = (b) => {
|
|
31268
|
+
const cell = body.querySelector('.pp-cell[data-pi="' + b + '"]');
|
|
31269
|
+
if (!cell) return null;
|
|
31270
|
+
const r = Number(cell.style.gridRow), c = Number(cell.style.gridColumn);
|
|
31271
|
+
/* 锚点 = 该宫「朝中宫的那条竖边」上的点:
|
|
31272
|
+
x 永远落在中宫边界(25 或 75),y 取该宫行的中心。
|
|
31273
|
+
这样线段从中宫边界出发,全部活动范围被限制在中宫矩形内,
|
|
31274
|
+
不会横穿左右两侧的宫位(文墨的线也只在中间那块动)。 */
|
|
31275
|
+
// 左右两列宫:x 取中宫左右边界,y 取该宫行的中心(row 2/3 → y 37.5/62.5,都在中宫内)
|
|
31276
|
+
// 上排/下排的角宫(row 1/4)按所属左右列同样处理——y 可能越界,
|
|
31277
|
+
// 所以统一把 y 压回中宫范围(25~75 的 1/4、3/4 分位)。
|
|
31278
|
+
const yy = Math.min(75, Math.max(25, (r - 0.5) * 25));
|
|
31279
|
+
if (c === 1) return [25, yy];
|
|
31280
|
+
return [75, yy];
|
|
31281
|
+
};
|
|
31282
|
+
const pts = targets.map(anchorOf);
|
|
31283
|
+
if (pts.some((x) => !x)) return;
|
|
31284
|
+
const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
31285
|
+
svg.setAttribute("class", "pp-sf");
|
|
31286
|
+
svg.setAttribute("viewBox", "0 0 100 100");
|
|
31287
|
+
svg.setAttribute("preserveAspectRatio", "none");
|
|
31288
|
+
const mk = (x1, y1, x2, y2) => {
|
|
31289
|
+
const l = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
31290
|
+
l.setAttribute("x1", x1); l.setAttribute("y1", y1);
|
|
31291
|
+
l.setAttribute("x2", x2); l.setAttribute("y2", y2);
|
|
31292
|
+
svg.appendChild(l);
|
|
31293
|
+
};
|
|
31294
|
+
/* 文墨的三角/菱形画法:四个锚点首尾相连成闭环——
|
|
31295
|
+
本宫 → 对宫(对角线,过中心)→ 三合1 → 三合2 → 回本宫。
|
|
31296
|
+
两条对角交叉线 + 两条边线,落在中宫的形状就是一个斜菱形,
|
|
31297
|
+
视觉上与文墨天机的三角形连线一致。 */
|
|
31298
|
+
mk(pts[0][0], pts[0][1], pts[1][0], pts[1][1]);
|
|
31299
|
+
mk(pts[1][0], pts[1][1], pts[2][0], pts[2][1]);
|
|
31300
|
+
mk(pts[2][0], pts[2][1], pts[3][0], pts[3][1]);
|
|
31301
|
+
mk(pts[3][0], pts[3][1], pts[0][0], pts[0][1]);
|
|
31302
|
+
// 端点小圆点:本宫用实心红点,其余三方用墨点
|
|
31303
|
+
for (let i = 0; i < 4; i++) {
|
|
31304
|
+
const c = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
31305
|
+
c.setAttribute("cx", pts[i][0]); c.setAttribute("cy", pts[i][1]); c.setAttribute("r", i === 0 ? 0.9 : 0.7);
|
|
31306
|
+
if (i === 0) c.setAttribute("style", "fill:var(--red);opacity:.85");
|
|
31307
|
+
svg.appendChild(c);
|
|
31308
|
+
}
|
|
31309
|
+
grid.style.position = "relative";
|
|
31310
|
+
grid.appendChild(svg);
|
|
31311
|
+
}
|
|
31312
|
+
function clearSanfang(body) {
|
|
31313
|
+
const old = body.querySelector("svg.pp-sf");
|
|
31314
|
+
if (old) old.remove();
|
|
31315
|
+
}
|
|
31316
|
+
|
|
30948
31317
|
// 全局委托:面板与独立页都不需要额外初始化,panel-kit 一加载就生效
|
|
30949
31318
|
function bindZiwei() {
|
|
30950
31319
|
if (bindZiwei.done || typeof document === 'undefined' || !document.addEventListener) return;
|
|
@@ -30957,6 +31326,7 @@ window.__MP_VER = "0.62.5";
|
|
|
30957
31326
|
// 再点同一宫 → 收起
|
|
30958
31327
|
if (cell.classList.contains('pp-sel')) {
|
|
30959
31328
|
clearMarks(body);
|
|
31329
|
+
clearSanfang(body);
|
|
30960
31330
|
detail.classList.remove('open');
|
|
30961
31331
|
detail.innerHTML = '';
|
|
30962
31332
|
return;
|
|
@@ -30964,6 +31334,7 @@ window.__MP_VER = "0.62.5";
|
|
|
30964
31334
|
clearMarks(body);
|
|
30965
31335
|
const pi = Number(cell.dataset.pi);
|
|
30966
31336
|
const soulIdx = Number(body.dataset.soul);
|
|
31337
|
+
drawSanfang(body, pi);
|
|
30967
31338
|
const sel = body.querySelectorAll('.pp-cell');
|
|
30968
31339
|
sel.forEach((c) => {
|
|
30969
31340
|
const ci = Number(c.dataset.pi);
|
|
@@ -30980,6 +31351,7 @@ window.__MP_VER = "0.62.5";
|
|
|
30980
31351
|
const body = t.closest('.pp-body');
|
|
30981
31352
|
if (body) {
|
|
30982
31353
|
clearMarks(body);
|
|
31354
|
+
clearSanfang(body);
|
|
30983
31355
|
const d = body.querySelector('.pp-detail');
|
|
30984
31356
|
if (d) { d.classList.remove('open'); d.innerHTML = ''; }
|
|
30985
31357
|
return;
|
|
@@ -31991,6 +32363,25 @@ window.__MP_VER = "0.62.5";
|
|
|
31991
32363
|
const syRow = sy.length ? `<div class="pp-tl pp-dim">岁运提示(只标干支变动,不判吉凶)</div><div class="pp-chips">${sy.map((l) =>
|
|
31992
32364
|
`<span class="pp-chip" title="${esc(`${l.suiyun.signals.map((x) => x.detail).join(';')}|${l.suiyun.note || ''}`)}">${l.year} ${esc(l.suiyun.signals.map((x) => `${x.type}${(x.type.startsWith('流年') || x.type.startsWith('大运')) && x.target ? `·${x.target}` : ''}`).join('/'))}</span>`).join('')}</div>${sySrc}` : '';
|
|
31993
32365
|
const str = r.strength ? `<div class="pp-str">日主强弱:<b>${r.strength.level}</b>${r.strength.score} <span class="pp-dim">${r.strength.detail}</span></div>` : '';
|
|
32366
|
+
// 八大地支结构:只读标注,与上面旺衰分并列。算出来却没人看得见等于没做,所以面板必须给这一行。
|
|
32367
|
+
const bs = r.strength && r.strength.branchStructure;
|
|
32368
|
+
const structHTML = bs ? (() => {
|
|
32369
|
+
const cols = bs.branches.map((b) => `${esc(b.label)}${esc(b.branch)}<i class="pp-drel">·${esc(b.camp)}</i>${bs.placeholderHour && b.key === 'hour' ? '<span class="pp-dim">占位</span>' : ''}`).join(' ');
|
|
32370
|
+
const odd = bs.odd && bs.odd.length ? `<span class="pp-st-odd">异类 ${bs.odd.map((x) => `${esc(x.label)}${esc(x.branch)}(${x.weight}分)`).join('、')}</span>` : '<span class="pp-st-odd">无异类</span>';
|
|
32371
|
+
const prob = bs.congProb != null ? ` 从格 ${esc(bs.congRange)}` : ' 不套从格概率';
|
|
32372
|
+
const bal = bs.balance || {};
|
|
32373
|
+
const balText = bal.branch ? ` 支 ${bal.branch.A}:${bal.branch.B} 合干 ${bal.total ? `${bal.total.A}:${bal.total.B}` : '—'}` : '';
|
|
32374
|
+
return `<div class="pp-struct" title="${esc(`${bs.method};${bs.note}`)}">`
|
|
32375
|
+
+ `<span class="pp-st-code">${esc(bs.code)}</span>${cols} ${odd}${prob}${balText}`
|
|
32376
|
+
+ `<span class="pp-dim"> 静态结构,只作标注,不改上面的旺衰评分</span>`
|
|
32377
|
+
+ `</div>`;
|
|
32378
|
+
})() : '';
|
|
32379
|
+
// 暗合:另列不并。一对时照课里口径标「可忽略」,不让它看起来像有效合局。
|
|
32380
|
+
const anheList = (r.relations && Array.isArray(r.relations.anhe)) ? r.relations.anhe : [];
|
|
32381
|
+
const anheHTML = anheList.length
|
|
32382
|
+
? `<div class="pp-anhe" title="${esc(r.relations.anheNote || '')}"><b>暗合</b>${anheList.map((x) => esc(x)).join(' ')}`
|
|
32383
|
+
+ `<span class="pp-dim"> 另列,不并入上面的合冲刑害;${anheList.length === 1 ? '只一对,按口径可忽略' : `共 ${anheList.length} 对`}</span></div>`
|
|
32384
|
+
: '';
|
|
31994
32385
|
const ssGroups = (r.shensha && r.shensha.groups) || [];
|
|
31995
32386
|
const ssx = ssGroups.length ? `
|
|
31996
32387
|
<div class="pp-ssx">
|
|
@@ -32004,6 +32395,8 @@ window.__MP_VER = "0.62.5";
|
|
|
32004
32395
|
<div class="pp-rel"><div><b>天干</b>${(r.relations && r.relations.stems.length) ? r.relations.stems.join(' · ') : '—'}</div>
|
|
32005
32396
|
<div><b>地支</b>${(r.relations && r.relations.branches.length) ? r.relations.branches.join(' · ') : '—'}</div></div>
|
|
32006
32397
|
${str}
|
|
32398
|
+
${structHTML}
|
|
32399
|
+
${anheHTML}
|
|
32007
32400
|
${sect('格局', gj)}
|
|
32008
32401
|
${sect('用神', ys)}
|
|
32009
32402
|
${cliCard}
|
|
@@ -32026,7 +32419,8 @@ window.__MP_VER = "0.62.5";
|
|
|
32026
32419
|
${(!r.palaces.minggong || !r.palaces.shengong) ? '<span class="pp-chip" title="命宫与身宫由生月与生时支合数定宫;时柱暂缺,这两宫不排">命宫·身宫 时柱暂缺不排</span>' : ''}
|
|
32027
32420
|
</div>`) : ''}
|
|
32028
32421
|
${ssx}
|
|
32029
|
-
<div style="margin-top:8px;font-size:12px;color:var(--muted)">上一节 ${r.jieqi.previous.name} ${r.jieqi.previous.time} 下一节 ${r.jieqi.next.name} ${r.jieqi.next.time} ${r.dayun.rule},${r.dayun.startAge.years}岁起运${(r.dayun.jiao && r.dayun.jiao.at) ? `(交运 ${r.dayun.jiao.at},${r.dayun.jiao.frame})` : ''}
|
|
32422
|
+
<div style="margin-top:8px;font-size:12px;color:var(--muted)">上一节 ${r.jieqi.previous.name} ${r.jieqi.previous.time} 下一节 ${r.jieqi.next.name} ${r.jieqi.next.time} ${r.dayun.rule},${r.dayun.startAge.years}岁起运${(r.dayun.jiao && r.dayun.jiao.at) ? `(交运 ${r.dayun.jiao.at},${r.dayun.jiao.frame})` : ''}${(r.dayun.startAgeExact && Number.isInteger(r.dayun.startAgeExact.years))
|
|
32423
|
+
? ` 精确 ${r.dayun.startAgeExact.years}年${r.dayun.startAgeExact.months}月${r.dayun.startAgeExact.days}天${r.dayun.startAgeExact.hours}时(截断到日时;上面是四舍五入到月)` : ''}</div>
|
|
32030
32424
|
</div>`;
|
|
32031
32425
|
};
|
|
32032
32426
|
|