liuyao 0.4.1 → 0.4.2
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/liuyao-skill/SKILL.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"solarlunar";const t=[{name:`本宫卦`,nameEn:`Original Palace`},{name:`一世卦`,nameEn:`First Generation`},{name:`二世卦`,nameEn:`Second Generation`},{name:`三世卦`,nameEn:`Third Generation`},{name:`四世卦`,nameEn:`Fourth Generation`},{name:`五世卦`,nameEn:`Fifth Generation`},{name:`游魂卦`,nameEn:`Wandering Soul`},{name:`归魂卦`,nameEn:`Returning Soul`}],n=Object.freeze([{binary:`000000`,id:`坤为地`,sign:`䷁`,phase:`土`,palace:`坤`,palaceIndex:0,setupInfo:[{kin:`兄弟未土`},{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`应`},{kin:`兄弟丑土`},{kin:`妻财亥水`},{kin:`子孙酉金`,hostGuest:`世`}],yangCounts:[2,2,2,2,2,2]},{binary:`100000`,id:`地雷复`,sign:`䷗`,phase:`土`,palace:`坤`,palaceIndex:1,setupInfo:[{kin:`妻财子水`,hostGuest:`世`},{kin:`官鬼寅木`},{kin:`兄弟辰土`},{kin:`兄弟丑土`,hostGuest:`应`},{kin:`妻财亥水`},{kin:`子孙酉金`}],yangCounts:[1,2,2,2,2,2]},{binary:`010000`,id:`地水师`,sign:`䷆`,phase:`水`,palace:`坎`,palaceIndex:7,setupInfo:[{kin:`子孙寅木`},{kin:`官鬼辰土`},{kin:`妻财午火`,hostGuest:`世`},{kin:`官鬼丑土`},{kin:`兄弟亥水`},{kin:`父母酉金`,hostGuest:`应`}],yangCounts:[2,1,2,2,2,2]},{binary:`110000`,id:`地泽临`,sign:`䷒`,phase:`土`,palace:`坤`,palaceIndex:2,setupInfo:[{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`世`},{kin:`兄弟丑土`},{kin:`兄弟丑土`},{kin:`妻财亥水`,hostGuest:`应`},{kin:`子孙酉金`}],yangCounts:[1,1,2,2,2,2]},{binary:`001000`,id:`地山谦`,sign:`䷎`,phase:`土`,palace:`兑`,palaceIndex:5,setupInfo:[{kin:`父母辰土`},{kin:`官鬼午火`,hostGuest:`应`},{kin:`兄弟申金`},{kin:`父母丑土`},{kin:`子孙亥水`,hostGuest:`世`},{kin:`兄弟酉金`}],yangCounts:[2,2,1,2,2,2]},{binary:`101000`,id:`地火明夷`,sign:`䷣`,phase:`水`,palace:`坎`,palaceIndex:6,setupInfo:[{kin:`子孙卯木`,hostGuest:`应`},{kin:`官鬼丑土`},{kin:`兄弟亥水`},{kin:`官鬼丑土`,hostGuest:`世`},{kin:`兄弟亥水`},{kin:`父母酉金`}],yangCounts:[1,2,1,2,2,2]},{binary:`011000`,id:`地风升`,sign:`䷭`,phase:`木`,palace:`震`,palaceIndex:4,setupInfo:[{kin:`妻财丑土`,hostGuest:`应`},{kin:`父母亥水`},{kin:`官鬼酉金`},{kin:`妻财丑土`,hostGuest:`世`},{kin:`父母亥水`},{kin:`官鬼酉金`}],yangCounts:[2,1,1,2,2,2]},{binary:`111000`,id:`地天泰`,sign:`䷊`,phase:`土`,palace:`坤`,palaceIndex:3,setupInfo:[{kin:`妻财子水`},{kin:`官鬼寅木`},{kin:`兄弟辰土`,hostGuest:`世`},{kin:`兄弟丑土`},{kin:`妻财亥水`},{kin:`子孙酉金`,hostGuest:`应`}],yangCounts:[1,1,1,2,2,2]},{binary:`000100`,id:`雷地豫`,sign:`䷏`,phase:`木`,palace:`震`,palaceIndex:1,setupInfo:[{kin:`妻财未土`,hostGuest:`世`},{kin:`子孙巳火`},{kin:`兄弟卯木`},{kin:`子孙午火`,hostGuest:`应`},{kin:`官鬼申金`},{kin:`妻财戌土`}],yangCounts:[2,2,2,1,2,2]},{binary:`100100`,id:`震为雷`,sign:`䷲`,phase:`木`,palace:`震`,palaceIndex:0,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`应`},{kin:`子孙午火`},{kin:`官鬼申金`},{kin:`妻财戌土`,hostGuest:`世`}],yangCounts:[1,2,2,1,2,2]},{binary:`010100`,id:`雷水解`,sign:`䷧`,phase:`木`,palace:`震`,palaceIndex:2,setupInfo:[{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`世`},{kin:`子孙午火`},{kin:`子孙午火`},{kin:`官鬼申金`,hostGuest:`应`},{kin:`妻财戌土`}],yangCounts:[2,1,2,1,2,2]},{binary:`110100`,id:`雷泽归妹`,sign:`䷵`,phase:`金`,palace:`兑`,palaceIndex:7,setupInfo:[{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`父母丑土`,hostGuest:`世`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`父母戌土`,hostGuest:`应`}],yangCounts:[1,1,2,1,2,2]},{binary:`001100`,id:`雷山小过`,sign:`䷽`,phase:`金`,palace:`兑`,palaceIndex:6,setupInfo:[{kin:`父母辰土`,hostGuest:`应`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`官鬼午火`,hostGuest:`世`},{kin:`兄弟申金`},{kin:`父母戌土`}],yangCounts:[2,2,1,1,2,2]},{binary:`101100`,id:`雷火丰`,sign:`䷶`,phase:`水`,palace:`坎`,palaceIndex:5,setupInfo:[{kin:`子孙卯木`},{kin:`官鬼丑土`,hostGuest:`应`},{kin:`兄弟亥水`},{kin:`妻财午火`},{kin:`父母申金`,hostGuest:`世`},{kin:`官鬼戌土`}],yangCounts:[1,2,1,1,2,2]},{binary:`011100`,id:`雷风恒`,sign:`䷟`,phase:`木`,palace:`震`,palaceIndex:3,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`},{kin:`官鬼酉金`,hostGuest:`世`},{kin:`子孙午火`},{kin:`官鬼申金`},{kin:`妻财戌土`,hostGuest:`应`}],yangCounts:[2,1,1,1,2,2]},{binary:`111100`,id:`雷天大壮`,sign:`䷡`,phase:`土`,palace:`坤`,palaceIndex:4,setupInfo:[{kin:`妻财子水`,hostGuest:`应`},{kin:`官鬼寅木`},{kin:`兄弟辰土`},{kin:`父母午火`,hostGuest:`世`},{kin:`子孙申金`},{kin:`兄弟戌土`}],yangCounts:[1,1,1,1,2,2]},{binary:`000010`,id:`水地比`,sign:`䷇`,phase:`土`,palace:`坤`,palaceIndex:7,setupInfo:[{kin:`兄弟未土`},{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`世`},{kin:`子孙申金`},{kin:`兄弟戌土`},{kin:`妻财子水`,hostGuest:`应`}],yangCounts:[2,2,2,2,1,2]},{binary:`100010`,id:`水雷屯`,sign:`䷂`,phase:`水`,palace:`坎`,palaceIndex:2,setupInfo:[{kin:`兄弟子水`},{kin:`子孙寅木`,hostGuest:`世`},{kin:`官鬼辰土`},{kin:`父母申金`},{kin:`官鬼戌土`,hostGuest:`应`},{kin:`兄弟子水`}],yangCounts:[1,2,2,2,1,2]},{binary:`010010`,id:`坎为水`,sign:`䷜`,phase:`水`,palace:`坎`,palaceIndex:0,setupInfo:[{kin:`子孙寅木`},{kin:`官鬼辰土`},{kin:`妻财午火`,hostGuest:`应`},{kin:`父母申金`},{kin:`官鬼戌土`},{kin:`兄弟子水`,hostGuest:`世`}],yangCounts:[2,1,2,2,1,2]},{binary:`110010`,id:`水泽节`,sign:`䷻`,phase:`水`,palace:`坎`,palaceIndex:1,setupInfo:[{kin:`妻财巳火`,hostGuest:`世`},{kin:`子孙卯木`},{kin:`官鬼丑土`},{kin:`父母申金`,hostGuest:`应`},{kin:`官鬼戌土`},{kin:`兄弟子水`}],yangCounts:[1,1,2,2,1,2]},{binary:`001010`,id:`水山蹇`,sign:`䷦`,phase:`金`,palace:`兑`,palaceIndex:4,setupInfo:[{kin:`父母辰土`,hostGuest:`应`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`兄弟申金`,hostGuest:`世`},{kin:`父母戌土`},{kin:`子孙子水`}],yangCounts:[2,2,1,2,1,2]},{binary:`101010`,id:`水火既济`,sign:`䷾`,phase:`水`,palace:`坎`,palaceIndex:3,setupInfo:[{kin:`子孙卯木`},{kin:`官鬼丑土`},{kin:`兄弟亥水`,hostGuest:`世`},{kin:`父母申金`},{kin:`官鬼戌土`},{kin:`兄弟子水`,hostGuest:`应`}],yangCounts:[1,2,1,2,1,2]},{binary:`011010`,id:`水风井`,sign:`䷯`,phase:`木`,palace:`震`,palaceIndex:5,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`,hostGuest:`应`},{kin:`官鬼酉金`},{kin:`官鬼申金`},{kin:`妻财戌土`,hostGuest:`世`},{kin:`父母子水`}],yangCounts:[2,1,1,2,1,2]},{binary:`111010`,id:`水天需`,sign:`䷄`,phase:`土`,palace:`坤`,palaceIndex:6,setupInfo:[{kin:`妻财子水`,hostGuest:`应`},{kin:`官鬼寅木`},{kin:`兄弟辰土`},{kin:`子孙申金`,hostGuest:`世`},{kin:`兄弟戌土`},{kin:`妻财子水`}],yangCounts:[1,1,1,2,1,2]},{binary:`000110`,id:`泽地萃`,sign:`䷬`,phase:`金`,palace:`兑`,palaceIndex:2,setupInfo:[{kin:`父母未土`},{kin:`官鬼巳火`,hostGuest:`世`},{kin:`妻财卯木`},{kin:`子孙亥水`},{kin:`兄弟酉金`,hostGuest:`应`},{kin:`父母未土`}],yangCounts:[2,2,2,1,1,2]},{binary:`100110`,id:`泽雷随`,sign:`䷐`,phase:`木`,palace:`震`,palaceIndex:7,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`世`},{kin:`父母亥水`},{kin:`官鬼酉金`},{kin:`妻财未土`,hostGuest:`应`}],yangCounts:[1,2,2,1,1,2]},{binary:`010110`,id:`泽水困`,sign:`䷮`,phase:`金`,palace:`兑`,palaceIndex:1,setupInfo:[{kin:`妻财卯木`,hostGuest:`世`},{kin:`父母辰土`},{kin:`官鬼午火`},{kin:`子孙亥水`,hostGuest:`应`},{kin:`兄弟酉金`},{kin:`父母未土`}],yangCounts:[2,1,2,1,1,2]},{binary:`110110`,id:`兑为泽`,sign:`䷹`,phase:`金`,palace:`兑`,palaceIndex:0,setupInfo:[{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`父母丑土`,hostGuest:`应`},{kin:`子孙亥水`},{kin:`兄弟酉金`},{kin:`父母未土`,hostGuest:`世`}],yangCounts:[1,1,2,1,1,2]},{binary:`001110`,id:`泽山咸`,sign:`䷞`,phase:`金`,palace:`兑`,palaceIndex:3,setupInfo:[{kin:`父母辰土`},{kin:`官鬼午火`},{kin:`兄弟申金`,hostGuest:`世`},{kin:`子孙亥水`},{kin:`兄弟酉金`},{kin:`父母未土`,hostGuest:`应`}],yangCounts:[2,2,1,1,1,2]},{binary:`101110`,id:`泽火革`,sign:`䷰`,phase:`水`,palace:`坎`,palaceIndex:4,setupInfo:[{kin:`子孙卯木`,hostGuest:`应`},{kin:`官鬼丑土`},{kin:`兄弟亥水`},{kin:`兄弟亥水`,hostGuest:`世`},{kin:`父母酉金`},{kin:`官鬼未土`}],yangCounts:[1,2,1,1,1,2]},{binary:`011110`,id:`泽风大过`,sign:`䷛`,phase:`木`,palace:`震`,palaceIndex:6,setupInfo:[{kin:`妻财丑土`,hostGuest:`应`},{kin:`父母亥水`},{kin:`官鬼酉金`},{kin:`父母亥水`,hostGuest:`世`},{kin:`官鬼酉金`},{kin:`妻财未土`}],yangCounts:[2,1,1,1,1,2]},{binary:`111110`,id:`泽天夬`,sign:`䷪`,phase:`土`,palace:`坤`,palaceIndex:5,setupInfo:[{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`应`},{kin:`兄弟辰土`},{kin:`妻财亥水`},{kin:`子孙酉金`,hostGuest:`世`},{kin:`兄弟未土`}],yangCounts:[1,1,1,1,1,2]},{binary:`000001`,id:`山地剥`,sign:`䷖`,phase:`金`,palace:`乾`,palaceIndex:5,setupInfo:[{kin:`父母未土`},{kin:`官鬼巳火`,hostGuest:`应`},{kin:`妻财卯木`},{kin:`父母戌土`},{kin:`子孙子水`,hostGuest:`世`},{kin:`妻财卯木`}],yangCounts:[2,2,2,2,2,1]},{binary:`100001`,id:`山雷颐`,sign:`䷚`,phase:`木`,palace:`巽`,palaceIndex:6,setupInfo:[{kin:`父母子水`,hostGuest:`应`},{kin:`兄弟寅木`},{kin:`妻财辰土`},{kin:`妻财戌土`,hostGuest:`世`},{kin:`父母子水`},{kin:`兄弟寅木`}],yangCounts:[1,2,2,2,2,1]},{binary:`010001`,id:`山水蒙`,sign:`䷃`,phase:`火`,palace:`离`,palaceIndex:4,setupInfo:[{kin:`父母寅木`,hostGuest:`应`},{kin:`子孙辰土`},{kin:`兄弟午火`},{kin:`子孙戌土`,hostGuest:`世`},{kin:`官鬼子水`},{kin:`父母寅木`}],yangCounts:[2,1,2,2,2,1]},{binary:`110001`,id:`山泽损`,sign:`䷨`,phase:`土`,palace:`艮`,palaceIndex:3,setupInfo:[{kin:`父母巳火`},{kin:`官鬼卯木`},{kin:`兄弟丑土`,hostGuest:`世`},{kin:`兄弟戌土`},{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`应`}],yangCounts:[1,1,2,2,2,1]},{binary:`001001`,id:`艮为山`,sign:`䷳`,phase:`土`,palace:`艮`,palaceIndex:0,setupInfo:[{kin:`兄弟辰土`},{kin:`父母午火`},{kin:`子孙申金`,hostGuest:`应`},{kin:`兄弟戌土`},{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`世`}],yangCounts:[2,2,1,2,2,1]},{binary:`101001`,id:`山火贲`,sign:`䷕`,phase:`土`,palace:`艮`,palaceIndex:1,setupInfo:[{kin:`官鬼卯木`,hostGuest:`世`},{kin:`兄弟丑土`},{kin:`妻财亥水`},{kin:`兄弟戌土`,hostGuest:`应`},{kin:`妻财子水`},{kin:`官鬼寅木`}],yangCounts:[1,2,1,2,2,1]},{binary:`011001`,id:`山风蛊`,sign:`䷑`,phase:`木`,palace:`巽`,palaceIndex:7,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`},{kin:`官鬼酉金`,hostGuest:`世`},{kin:`妻财戌土`},{kin:`父母子水`},{kin:`兄弟寅木`,hostGuest:`应`}],yangCounts:[2,1,1,2,2,1]},{binary:`111001`,id:`山天大畜`,sign:`䷙`,phase:`土`,palace:`艮`,palaceIndex:2,setupInfo:[{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`世`},{kin:`兄弟辰土`},{kin:`兄弟戌土`},{kin:`妻财子水`,hostGuest:`应`},{kin:`官鬼寅木`}],yangCounts:[1,1,1,2,2,1]},{binary:`000101`,id:`火地晋`,sign:`䷢`,phase:`金`,palace:`乾`,palaceIndex:6,setupInfo:[{kin:`父母未土`,hostGuest:`应`},{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`兄弟酉金`,hostGuest:`世`},{kin:`父母未土`},{kin:`官鬼巳火`}],yangCounts:[2,2,2,1,2,1]},{binary:`100101`,id:`火雷噬嗑`,sign:`䷔`,phase:`木`,palace:`巽`,palaceIndex:5,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`,hostGuest:`应`},{kin:`妻财辰土`},{kin:`官鬼酉金`},{kin:`妻财未土`,hostGuest:`世`},{kin:`子孙巳火`}],yangCounts:[1,2,2,1,2,1]},{binary:`010101`,id:`火水未济`,sign:`䷿`,phase:`火`,palace:`离`,palaceIndex:3,setupInfo:[{kin:`父母寅木`},{kin:`子孙辰土`},{kin:`兄弟午火`,hostGuest:`世`},{kin:`妻财酉金`},{kin:`子孙未土`},{kin:`兄弟巳火`,hostGuest:`应`}],yangCounts:[2,1,2,1,2,1]},{binary:`110101`,id:`火泽睽`,sign:`䷥`,phase:`土`,palace:`艮`,palaceIndex:4,setupInfo:[{kin:`父母巳火`,hostGuest:`应`},{kin:`官鬼卯木`},{kin:`兄弟丑土`},{kin:`子孙酉金`,hostGuest:`世`},{kin:`兄弟未土`},{kin:`父母巳火`}],yangCounts:[1,1,2,1,2,1]},{binary:`001101`,id:`火山旅`,sign:`䷷`,phase:`火`,palace:`离`,palaceIndex:1,setupInfo:[{kin:`子孙辰土`,hostGuest:`世`},{kin:`兄弟午火`},{kin:`妻财申金`},{kin:`妻财酉金`,hostGuest:`应`},{kin:`子孙未土`},{kin:`兄弟巳火`}],yangCounts:[2,2,1,1,2,1]},{binary:`101101`,id:`离为火`,sign:`䷝`,phase:`火`,palace:`离`,palaceIndex:0,setupInfo:[{kin:`父母卯木`},{kin:`子孙丑土`},{kin:`官鬼亥水`,hostGuest:`应`},{kin:`妻财酉金`},{kin:`子孙未土`},{kin:`兄弟巳火`,hostGuest:`世`}],yangCounts:[1,2,1,1,2,1]},{binary:`011101`,id:`火风鼎`,sign:`䷱`,phase:`火`,palace:`离`,palaceIndex:2,setupInfo:[{kin:`子孙丑土`},{kin:`官鬼亥水`,hostGuest:`世`},{kin:`妻财酉金`},{kin:`妻财酉金`},{kin:`子孙未土`,hostGuest:`应`},{kin:`兄弟巳火`}],yangCounts:[2,1,1,1,2,1]},{binary:`111101`,id:`火天大有`,sign:`䷍`,phase:`金`,palace:`乾`,palaceIndex:7,setupInfo:[{kin:`子孙子水`},{kin:`妻财寅木`},{kin:`父母辰土`,hostGuest:`世`},{kin:`兄弟酉金`},{kin:`父母未土`},{kin:`官鬼巳火`,hostGuest:`应`}],yangCounts:[1,1,1,1,2,1]},{binary:`000011`,id:`风地观`,sign:`䷓`,phase:`金`,palace:`乾`,palaceIndex:4,setupInfo:[{kin:`父母未土`,hostGuest:`应`},{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`父母未土`,hostGuest:`世`},{kin:`官鬼巳火`},{kin:`妻财卯木`}],yangCounts:[2,2,2,2,1,1]},{binary:`100011`,id:`风雷益`,sign:`䷩`,phase:`木`,palace:`巽`,palaceIndex:3,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`世`},{kin:`妻财未土`},{kin:`子孙巳火`},{kin:`兄弟卯木`,hostGuest:`应`}],yangCounts:[1,2,2,2,1,1]},{binary:`010011`,id:`风水涣`,sign:`䷺`,phase:`火`,palace:`离`,palaceIndex:5,setupInfo:[{kin:`父母寅木`},{kin:`子孙辰土`,hostGuest:`应`},{kin:`兄弟午火`},{kin:`子孙未土`},{kin:`兄弟巳火`,hostGuest:`世`},{kin:`父母卯木`}],yangCounts:[2,1,2,2,1,1]},{binary:`110011`,id:`风泽中孚`,sign:`䷼`,phase:`土`,palace:`艮`,palaceIndex:6,setupInfo:[{kin:`父母巳火`,hostGuest:`应`},{kin:`官鬼卯木`},{kin:`兄弟丑土`},{kin:`兄弟未土`,hostGuest:`世`},{kin:`父母巳火`},{kin:`官鬼卯木`}],yangCounts:[1,1,2,2,1,1]},{binary:`001011`,id:`风山渐`,sign:`䷴`,phase:`土`,palace:`艮`,palaceIndex:7,setupInfo:[{kin:`兄弟辰土`},{kin:`父母午火`},{kin:`子孙申金`,hostGuest:`世`},{kin:`兄弟未土`},{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`应`}],yangCounts:[2,2,1,2,1,1]},{binary:`101011`,id:`风火家人`,sign:`䷤`,phase:`木`,palace:`巽`,palaceIndex:2,setupInfo:[{kin:`兄弟卯木`},{kin:`妻财丑土`,hostGuest:`世`},{kin:`父母亥水`},{kin:`妻财未土`},{kin:`子孙巳火`,hostGuest:`应`},{kin:`兄弟卯木`}],yangCounts:[1,2,1,2,1,1]},{binary:`011011`,id:`巽为风`,sign:`䷸`,phase:`木`,palace:`巽`,palaceIndex:0,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`},{kin:`官鬼酉金`,hostGuest:`应`},{kin:`妻财未土`},{kin:`子孙巳火`},{kin:`兄弟卯木`,hostGuest:`世`}],yangCounts:[2,1,1,2,1,1]},{binary:`111011`,id:`风天小畜`,sign:`䷈`,phase:`木`,palace:`巽`,palaceIndex:1,setupInfo:[{kin:`父母子水`,hostGuest:`世`},{kin:`兄弟寅木`},{kin:`妻财辰土`},{kin:`妻财未土`,hostGuest:`应`},{kin:`子孙巳火`},{kin:`兄弟卯木`}],yangCounts:[1,1,1,2,1,1]},{binary:`000111`,id:`天地否`,sign:`䷋`,phase:`金`,palace:`乾`,palaceIndex:3,setupInfo:[{kin:`父母未土`},{kin:`官鬼巳火`},{kin:`妻财卯木`,hostGuest:`世`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`父母戌土`,hostGuest:`应`}],yangCounts:[2,2,2,1,1,1]},{binary:`100111`,id:`天雷无妄`,sign:`䷘`,phase:`木`,palace:`巽`,palaceIndex:4,setupInfo:[{kin:`父母子水`,hostGuest:`应`},{kin:`兄弟寅木`},{kin:`妻财辰土`},{kin:`子孙午火`,hostGuest:`世`},{kin:`官鬼申金`},{kin:`妻财戌土`}],yangCounts:[1,2,2,1,1,1]},{binary:`010111`,id:`天水讼`,sign:`䷅`,phase:`火`,palace:`离`,palaceIndex:6,setupInfo:[{kin:`父母寅木`,hostGuest:`应`},{kin:`子孙辰土`},{kin:`兄弟午火`},{kin:`兄弟午火`,hostGuest:`世`},{kin:`妻财申金`},{kin:`子孙戌土`}],yangCounts:[2,1,2,1,1,1]},{binary:`110111`,id:`天泽履`,sign:`䷉`,phase:`土`,palace:`艮`,palaceIndex:5,setupInfo:[{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`应`},{kin:`兄弟丑土`},{kin:`父母午火`},{kin:`子孙申金`,hostGuest:`世`},{kin:`兄弟戌土`}],yangCounts:[1,1,2,1,1,1]},{binary:`001111`,id:`天山遁`,sign:`䷠`,phase:`金`,palace:`乾`,palaceIndex:2,setupInfo:[{kin:`父母辰土`},{kin:`官鬼午火`,hostGuest:`世`},{kin:`兄弟申金`},{kin:`官鬼午火`},{kin:`兄弟申金`,hostGuest:`应`},{kin:`父母戌土`}],yangCounts:[2,2,1,1,1,1]},{binary:`101111`,id:`天火同人`,sign:`䷌`,phase:`火`,palace:`离`,palaceIndex:7,setupInfo:[{kin:`父母寅木`},{kin:`子孙辰土`},{kin:`兄弟午火`,hostGuest:`世`},{kin:`子孙未土`},{kin:`父母巳火`},{kin:`子孙戌土`,hostGuest:`应`}],yangCounts:[1,2,1,1,1,1]},{binary:`011111`,id:`天风姤`,sign:`䷫`,phase:`金`,palace:`乾`,palaceIndex:1,setupInfo:[{kin:`父母丑土`,hostGuest:`世`},{kin:`子孙亥水`},{kin:`兄弟酉金`},{kin:`官鬼午火`,hostGuest:`应`},{kin:`兄弟申金`},{kin:`父母戌土`}],yangCounts:[2,1,1,1,1,1]},{binary:`111111`,id:`乾为天`,sign:`䷀`,phase:`金`,palace:`乾`,palaceIndex:0,setupInfo:[{kin:`子孙子水`},{kin:`妻财寅木`},{kin:`父母辰土`,hostGuest:`应`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`父母戌土`,hostGuest:`世`}],yangCounts:[1,1,1,1,1,1]}]),r=Object.freeze([{id:`坤`,binary:`000`,yangCount:0,represents:`地`,nameEn:`kun`,representsEn:`earth`,sign:`☷`},{id:`震`,binary:`100`,yangCount:1,represents:`雷`,nameEn:`zhen`,representsEn:`thunder`,sign:`☳`},{id:`坎`,binary:`010`,yangCount:1,represents:`水`,nameEn:`kan`,representsEn:`water`,sign:`☵`},{id:`兑`,binary:`110`,yangCount:2,represents:`泽`,nameEn:`dui`,representsEn:`lake`,sign:`☱`},{id:`艮`,binary:`001`,yangCount:1,represents:`山`,nameEn:`gen`,representsEn:`mountain`,sign:`☶`},{id:`离`,binary:`101`,yangCount:2,represents:`火`,nameEn:`li`,representsEn:`fire`,sign:`☲`},{id:`巽`,binary:`011`,yangCount:2,represents:`风`,nameEn:`xun`,representsEn:`wind`,sign:`☴`},{id:`乾`,binary:`111`,yangCount:3,represents:`天`,nameEn:`qian`,representsEn:`heaven`,sign:`☰`}]),i=[`老阴`,`少阳`,`少阴`,`老阳`],a=`交单拆重`,o=`×’”○`,s=[1,1,2,2],c=[0,1,0,1];function l(e){if(e!==0&&e!==1&&e!==2&&e!==3)throw Error(`Count of yang must be 0, 1, 2 or 3`)}var u=class e{static getName(e){return i[e]}static fromSymbol(t){let n=o.indexOf(t);return n===-1?null:new e(n)}static fromSymbolName(t){let n=a.indexOf(t);return n===-1?null:new e(n)}static fromName(t){let n=i.indexOf(t);return n===-1?null:new e(n)}static fromDigitString(t){let n=`0123`.indexOf(t);return n===-1?null:new e(n)}static fromTrigramField(t){let n=r.find(e=>e.id===t||e.yangCount===t||e.binary===t||e.nameEn===t||e.represents===t||e.representsEn===t||e.sign===t);return n?new e(n.yangCount):null}_yangCount;get yangCount(){return this._yangCount}get polar(){return c[this.yangCount]}get isDynamic(){return this.yangCount===0||this.yangCount===3}isChanged;get symbol(){return o[this.yangCount]}get symbolName(){return a[this.yangCount]}get name(){return i[this.yangCount]}constructor(e,t=!1){l(e),this._yangCount=e,this.isChanged=t}set(e){l(e),this._yangCount=e}clone(){return new e(this.yangCount,this.isChanged)}toChanged(){return this.isDynamic?new e(s[this.yangCount],!0):new e(this.yangCount,!1)}};const d=[`初爻`,`二爻`,`三爻`,`四爻`,`五爻`,`上爻`];var f=class e{static fromQuaternary(t){let n=t.split(``).map(u.fromDigitString);return n.every(e=>e!==null)?new e(n):null}static fromSymbolName(t){let n=t.split(``).map(u.fromSymbolName);return n.every(e=>e!==null)?new e(n):null}static fromYangCounts(t){try{return new e(t.map(e=>new u(e)))}catch{return null}}static fromId(t){let r=n.find(e=>e.id===t||e.id.slice(2)===t||e.id.startsWith(t)&&t.length>1);return r?e.fromYangCounts(r.yangCounts):null}static fromPalace(t){let r=n.find(e=>e.id[2]===t);return r?e.fromYangCounts(r.yangCounts):null}yaos;get info(){return n.find(e=>e.binary===this.yaos.map(e=>e.polar).join(``))}get palace(){let e=this.info;return`${e.palace}宫(${e.phase})${t[e.palaceIndex].name}`}get isDynamic(){return this.yaos.some(e=>e.isDynamic||e.isChanged)}get isChanged(){return this.yaos.some(e=>e.isChanged)}get dynamicOuter(){return this.yaos.slice(3).some(e=>e.isDynamic||e.isChanged)}get dynamicInner(){return this.yaos.slice(0,3).some(e=>e.isDynamic||e.isChanged)}constructor(e){if(e.length!==6)throw Error(`Array length mismatch, A Hexagram must be constructed with exactly 6 Yaos or 6 counts of yang`);if(e.every(e=>e instanceof u))this.yaos=e.map(e=>e.clone());else throw Error(`Invalid Arguments, Hexagram must be constructed with exactly 6 Yaos or 6 counts of yang`)}setYao(e,t){this.yaos[e].set(t)}toChanged(){if(!this.isDynamic)return null;if(this.isChanged)throw Error(`已经是变卦了,无法再变`);return new e(this.yaos.map(e=>e.toChanged()))}toDescription(){let e=this.info.setupInfo.findIndex(e=>e.hostGuest===`世`),t=this.info.setupInfo.findIndex(e=>e.hostGuest===`应`),n=[`本卦${this.info.id}`,`世爻为${d[e]}`,`应爻为${d[t]}`],r=this.toChanged();if(r){n.push(`${this.yaos.map((e,t)=>e.isDynamic?`${d[t]}`:null).filter(e=>e!==null).join(`、`)}是动爻`),n.push(`变卦为${r.info.id}`);let e=r.info.setupInfo.findIndex(e=>e.hostGuest===`世`);this.yaos[e].isDynamic?n.push(`变卦世爻为${d[e]}`):n.push(`未变出新的世爻`);let t=r.info.setupInfo.findIndex(e=>e.hostGuest===`应`);this.yaos[t].isDynamic?n.push(`变卦应爻为${d[t]}`):n.push(`未变出新的应爻`)}else n.push(`无动爻`);return n.join(`,`)}toAIReadable(){let e=this.info.setupInfo,t=this.toChanged(),n=t?.info.setupInfo,r=[];if(n){let e=this.yaos.map((e,t)=>e.isDynamic?t:null).filter(e=>e!==null);n.forEach((n,i)=>{e.includes(i)&&(n.hostGuest===`世`&&r.push(`新世爻为${t.info.id}的${d[i]}`),n.hostGuest===`应`&&r.push(`新应爻为${t.info.id}的${d[i]}`))})}else r.push(`没有新的世应爻出现,世应不变`);let i=(e,t,n)=>{let r={爻:this.yaos[n].name,六亲:t[n].kin,类型:t[n].hostGuest};return r.类型||delete r.类型,r};return{本卦:{上爻:i(this.yaos,e,5),五爻:i(this.yaos,e,4),四爻:i(this.yaos,e,3),三爻:i(this.yaos,e,2),二爻:i(this.yaos,e,1),初爻:i(this.yaos,e,0),卦名:this.info.id,宫:this.palace,变爻:this.isDynamic?this.yaos.map((e,t)=>e.isDynamic?d[t]:null).filter(e=>e!==null):void 0},变卦:n?{上爻:i(t.yaos,n,5),五爻:i(t.yaos,n,4),四爻:i(t.yaos,n,3),三爻:i(t.yaos,n,2),二爻:i(t.yaos,n,1),初爻:i(t.yaos,n,0),卦名:t.info.id,宫:t.palace}:`无`,世应变化:r.join(`,`)}}clone(){return new e(this.yaos)}toString(){return this.info.id}[Symbol.toPrimitive](){return this.info.id}};const p=Object.freeze([{heavenlyStem:`甲`,gods:[`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`]},{heavenlyStem:`乙`,gods:[`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`]},{heavenlyStem:`丙`,gods:[`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`,`青龙`]},{heavenlyStem:`丁`,gods:[`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`,`青龙`]},{heavenlyStem:`戊`,gods:[`勾陈`,`螣蛇`,`白虎`,`玄武`,`青龙`,`朱雀`]},{heavenlyStem:`己`,gods:[`螣蛇`,`白虎`,`玄武`,`青龙`,`朱雀`,`勾陈`]},{heavenlyStem:`庚`,gods:[`白虎`,`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`]},{heavenlyStem:`辛`,gods:[`白虎`,`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`]},{heavenlyStem:`壬`,gods:[`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`]},{heavenlyStem:`癸`,gods:[`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`]}]);function m(){let e=process.argv[2];if(!e)return null;let t=e.split(``).map(u.fromTrigramField);return t.every(e=>e!==null)&&t.length>=6?new f(t):f.fromQuaternary(e)||f.fromId(e)||f.fromSymbolName(e)}function h(e){return`子丑丑寅寅卯卯辰辰巳巳午午未未申申酉酉戌戌亥亥子`[e.getHours()]??`未知`}function g(){let t=process.argv[3],n=new Date(t);if(Number.isNaN(n.getTime()))return null;let r=e.solar2lunar(n.getFullYear(),n.getMonth()+1,n.getDate());if(r===-1)return null;let i=p.find(e=>e.heavenlyStem===r.gzDay[0]).gods;return{年:r.gzYear,月:r.gzMonth,日:r.gzDay,时:h(n),六神顺序:{上爻:i[5],五爻:i[4],四爻:i[3],三爻:i[2],二爻:i[1],初爻:i[0]}}}console.dir({version:`__VERSION__`,卦象:m()?.toAIReadable(),时辰:g()},{depth:6});export{};
|
|
1
|
+
import e from"solarlunar";const t=[{name:`本宫卦`,nameEn:`Original Palace`},{name:`一世卦`,nameEn:`First Generation`},{name:`二世卦`,nameEn:`Second Generation`},{name:`三世卦`,nameEn:`Third Generation`},{name:`四世卦`,nameEn:`Fourth Generation`},{name:`五世卦`,nameEn:`Fifth Generation`},{name:`游魂卦`,nameEn:`Wandering Soul`},{name:`归魂卦`,nameEn:`Returning Soul`}],n=Object.freeze([{binary:`000000`,id:`坤为地`,sign:`䷁`,phase:`土`,palace:`坤`,palaceIndex:0,setupInfo:[{kin:`兄弟未土`},{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`应`},{kin:`兄弟丑土`},{kin:`妻财亥水`},{kin:`子孙酉金`,hostGuest:`世`}],yangCounts:[2,2,2,2,2,2]},{binary:`100000`,id:`地雷复`,sign:`䷗`,phase:`土`,palace:`坤`,palaceIndex:1,setupInfo:[{kin:`妻财子水`,hostGuest:`世`},{kin:`官鬼寅木`},{kin:`兄弟辰土`},{kin:`兄弟丑土`,hostGuest:`应`},{kin:`妻财亥水`},{kin:`子孙酉金`}],yangCounts:[1,2,2,2,2,2]},{binary:`010000`,id:`地水师`,sign:`䷆`,phase:`水`,palace:`坎`,palaceIndex:7,setupInfo:[{kin:`子孙寅木`},{kin:`官鬼辰土`},{kin:`妻财午火`,hostGuest:`世`},{kin:`官鬼丑土`},{kin:`兄弟亥水`},{kin:`父母酉金`,hostGuest:`应`}],yangCounts:[2,1,2,2,2,2]},{binary:`110000`,id:`地泽临`,sign:`䷒`,phase:`土`,palace:`坤`,palaceIndex:2,setupInfo:[{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`世`},{kin:`兄弟丑土`},{kin:`兄弟丑土`},{kin:`妻财亥水`,hostGuest:`应`},{kin:`子孙酉金`}],yangCounts:[1,1,2,2,2,2]},{binary:`001000`,id:`地山谦`,sign:`䷎`,phase:`土`,palace:`兑`,palaceIndex:5,setupInfo:[{kin:`父母辰土`},{kin:`官鬼午火`,hostGuest:`应`},{kin:`兄弟申金`},{kin:`父母丑土`},{kin:`子孙亥水`,hostGuest:`世`},{kin:`兄弟酉金`}],yangCounts:[2,2,1,2,2,2]},{binary:`101000`,id:`地火明夷`,sign:`䷣`,phase:`水`,palace:`坎`,palaceIndex:6,setupInfo:[{kin:`子孙卯木`,hostGuest:`应`},{kin:`官鬼丑土`},{kin:`兄弟亥水`},{kin:`官鬼丑土`,hostGuest:`世`},{kin:`兄弟亥水`},{kin:`父母酉金`}],yangCounts:[1,2,1,2,2,2]},{binary:`011000`,id:`地风升`,sign:`䷭`,phase:`木`,palace:`震`,palaceIndex:4,setupInfo:[{kin:`妻财丑土`,hostGuest:`应`},{kin:`父母亥水`},{kin:`官鬼酉金`},{kin:`妻财丑土`,hostGuest:`世`},{kin:`父母亥水`},{kin:`官鬼酉金`}],yangCounts:[2,1,1,2,2,2]},{binary:`111000`,id:`地天泰`,sign:`䷊`,phase:`土`,palace:`坤`,palaceIndex:3,setupInfo:[{kin:`妻财子水`},{kin:`官鬼寅木`},{kin:`兄弟辰土`,hostGuest:`世`},{kin:`兄弟丑土`},{kin:`妻财亥水`},{kin:`子孙酉金`,hostGuest:`应`}],yangCounts:[1,1,1,2,2,2]},{binary:`000100`,id:`雷地豫`,sign:`䷏`,phase:`木`,palace:`震`,palaceIndex:1,setupInfo:[{kin:`妻财未土`,hostGuest:`世`},{kin:`子孙巳火`},{kin:`兄弟卯木`},{kin:`子孙午火`,hostGuest:`应`},{kin:`官鬼申金`},{kin:`妻财戌土`}],yangCounts:[2,2,2,1,2,2]},{binary:`100100`,id:`震为雷`,sign:`䷲`,phase:`木`,palace:`震`,palaceIndex:0,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`应`},{kin:`子孙午火`},{kin:`官鬼申金`},{kin:`妻财戌土`,hostGuest:`世`}],yangCounts:[1,2,2,1,2,2]},{binary:`010100`,id:`雷水解`,sign:`䷧`,phase:`木`,palace:`震`,palaceIndex:2,setupInfo:[{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`世`},{kin:`子孙午火`},{kin:`子孙午火`},{kin:`官鬼申金`,hostGuest:`应`},{kin:`妻财戌土`}],yangCounts:[2,1,2,1,2,2]},{binary:`110100`,id:`雷泽归妹`,sign:`䷵`,phase:`金`,palace:`兑`,palaceIndex:7,setupInfo:[{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`父母丑土`,hostGuest:`世`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`父母戌土`,hostGuest:`应`}],yangCounts:[1,1,2,1,2,2]},{binary:`001100`,id:`雷山小过`,sign:`䷽`,phase:`金`,palace:`兑`,palaceIndex:6,setupInfo:[{kin:`父母辰土`,hostGuest:`应`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`官鬼午火`,hostGuest:`世`},{kin:`兄弟申金`},{kin:`父母戌土`}],yangCounts:[2,2,1,1,2,2]},{binary:`101100`,id:`雷火丰`,sign:`䷶`,phase:`水`,palace:`坎`,palaceIndex:5,setupInfo:[{kin:`子孙卯木`},{kin:`官鬼丑土`,hostGuest:`应`},{kin:`兄弟亥水`},{kin:`妻财午火`},{kin:`父母申金`,hostGuest:`世`},{kin:`官鬼戌土`}],yangCounts:[1,2,1,1,2,2]},{binary:`011100`,id:`雷风恒`,sign:`䷟`,phase:`木`,palace:`震`,palaceIndex:3,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`},{kin:`官鬼酉金`,hostGuest:`世`},{kin:`子孙午火`},{kin:`官鬼申金`},{kin:`妻财戌土`,hostGuest:`应`}],yangCounts:[2,1,1,1,2,2]},{binary:`111100`,id:`雷天大壮`,sign:`䷡`,phase:`土`,palace:`坤`,palaceIndex:4,setupInfo:[{kin:`妻财子水`,hostGuest:`应`},{kin:`官鬼寅木`},{kin:`兄弟辰土`},{kin:`父母午火`,hostGuest:`世`},{kin:`子孙申金`},{kin:`兄弟戌土`}],yangCounts:[1,1,1,1,2,2]},{binary:`000010`,id:`水地比`,sign:`䷇`,phase:`土`,palace:`坤`,palaceIndex:7,setupInfo:[{kin:`兄弟未土`},{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`世`},{kin:`子孙申金`},{kin:`兄弟戌土`},{kin:`妻财子水`,hostGuest:`应`}],yangCounts:[2,2,2,2,1,2]},{binary:`100010`,id:`水雷屯`,sign:`䷂`,phase:`水`,palace:`坎`,palaceIndex:2,setupInfo:[{kin:`兄弟子水`},{kin:`子孙寅木`,hostGuest:`世`},{kin:`官鬼辰土`},{kin:`父母申金`},{kin:`官鬼戌土`,hostGuest:`应`},{kin:`兄弟子水`}],yangCounts:[1,2,2,2,1,2]},{binary:`010010`,id:`坎为水`,sign:`䷜`,phase:`水`,palace:`坎`,palaceIndex:0,setupInfo:[{kin:`子孙寅木`},{kin:`官鬼辰土`},{kin:`妻财午火`,hostGuest:`应`},{kin:`父母申金`},{kin:`官鬼戌土`},{kin:`兄弟子水`,hostGuest:`世`}],yangCounts:[2,1,2,2,1,2]},{binary:`110010`,id:`水泽节`,sign:`䷻`,phase:`水`,palace:`坎`,palaceIndex:1,setupInfo:[{kin:`妻财巳火`,hostGuest:`世`},{kin:`子孙卯木`},{kin:`官鬼丑土`},{kin:`父母申金`,hostGuest:`应`},{kin:`官鬼戌土`},{kin:`兄弟子水`}],yangCounts:[1,1,2,2,1,2]},{binary:`001010`,id:`水山蹇`,sign:`䷦`,phase:`金`,palace:`兑`,palaceIndex:4,setupInfo:[{kin:`父母辰土`,hostGuest:`应`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`兄弟申金`,hostGuest:`世`},{kin:`父母戌土`},{kin:`子孙子水`}],yangCounts:[2,2,1,2,1,2]},{binary:`101010`,id:`水火既济`,sign:`䷾`,phase:`水`,palace:`坎`,palaceIndex:3,setupInfo:[{kin:`子孙卯木`},{kin:`官鬼丑土`},{kin:`兄弟亥水`,hostGuest:`世`},{kin:`父母申金`},{kin:`官鬼戌土`},{kin:`兄弟子水`,hostGuest:`应`}],yangCounts:[1,2,1,2,1,2]},{binary:`011010`,id:`水风井`,sign:`䷯`,phase:`木`,palace:`震`,palaceIndex:5,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`,hostGuest:`应`},{kin:`官鬼酉金`},{kin:`官鬼申金`},{kin:`妻财戌土`,hostGuest:`世`},{kin:`父母子水`}],yangCounts:[2,1,1,2,1,2]},{binary:`111010`,id:`水天需`,sign:`䷄`,phase:`土`,palace:`坤`,palaceIndex:6,setupInfo:[{kin:`妻财子水`,hostGuest:`应`},{kin:`官鬼寅木`},{kin:`兄弟辰土`},{kin:`子孙申金`,hostGuest:`世`},{kin:`兄弟戌土`},{kin:`妻财子水`}],yangCounts:[1,1,1,2,1,2]},{binary:`000110`,id:`泽地萃`,sign:`䷬`,phase:`金`,palace:`兑`,palaceIndex:2,setupInfo:[{kin:`父母未土`},{kin:`官鬼巳火`,hostGuest:`世`},{kin:`妻财卯木`},{kin:`子孙亥水`},{kin:`兄弟酉金`,hostGuest:`应`},{kin:`父母未土`}],yangCounts:[2,2,2,1,1,2]},{binary:`100110`,id:`泽雷随`,sign:`䷐`,phase:`木`,palace:`震`,palaceIndex:7,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`世`},{kin:`父母亥水`},{kin:`官鬼酉金`},{kin:`妻财未土`,hostGuest:`应`}],yangCounts:[1,2,2,1,1,2]},{binary:`010110`,id:`泽水困`,sign:`䷮`,phase:`金`,palace:`兑`,palaceIndex:1,setupInfo:[{kin:`妻财卯木`,hostGuest:`世`},{kin:`父母辰土`},{kin:`官鬼午火`},{kin:`子孙亥水`,hostGuest:`应`},{kin:`兄弟酉金`},{kin:`父母未土`}],yangCounts:[2,1,2,1,1,2]},{binary:`110110`,id:`兑为泽`,sign:`䷹`,phase:`金`,palace:`兑`,palaceIndex:0,setupInfo:[{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`父母丑土`,hostGuest:`应`},{kin:`子孙亥水`},{kin:`兄弟酉金`},{kin:`父母未土`,hostGuest:`世`}],yangCounts:[1,1,2,1,1,2]},{binary:`001110`,id:`泽山咸`,sign:`䷞`,phase:`金`,palace:`兑`,palaceIndex:3,setupInfo:[{kin:`父母辰土`},{kin:`官鬼午火`},{kin:`兄弟申金`,hostGuest:`世`},{kin:`子孙亥水`},{kin:`兄弟酉金`},{kin:`父母未土`,hostGuest:`应`}],yangCounts:[2,2,1,1,1,2]},{binary:`101110`,id:`泽火革`,sign:`䷰`,phase:`水`,palace:`坎`,palaceIndex:4,setupInfo:[{kin:`子孙卯木`,hostGuest:`应`},{kin:`官鬼丑土`},{kin:`兄弟亥水`},{kin:`兄弟亥水`,hostGuest:`世`},{kin:`父母酉金`},{kin:`官鬼未土`}],yangCounts:[1,2,1,1,1,2]},{binary:`011110`,id:`泽风大过`,sign:`䷛`,phase:`木`,palace:`震`,palaceIndex:6,setupInfo:[{kin:`妻财丑土`,hostGuest:`应`},{kin:`父母亥水`},{kin:`官鬼酉金`},{kin:`父母亥水`,hostGuest:`世`},{kin:`官鬼酉金`},{kin:`妻财未土`}],yangCounts:[2,1,1,1,1,2]},{binary:`111110`,id:`泽天夬`,sign:`䷪`,phase:`土`,palace:`坤`,palaceIndex:5,setupInfo:[{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`应`},{kin:`兄弟辰土`},{kin:`妻财亥水`},{kin:`子孙酉金`,hostGuest:`世`},{kin:`兄弟未土`}],yangCounts:[1,1,1,1,1,2]},{binary:`000001`,id:`山地剥`,sign:`䷖`,phase:`金`,palace:`乾`,palaceIndex:5,setupInfo:[{kin:`父母未土`},{kin:`官鬼巳火`,hostGuest:`应`},{kin:`妻财卯木`},{kin:`父母戌土`},{kin:`子孙子水`,hostGuest:`世`},{kin:`妻财卯木`}],yangCounts:[2,2,2,2,2,1]},{binary:`100001`,id:`山雷颐`,sign:`䷚`,phase:`木`,palace:`巽`,palaceIndex:6,setupInfo:[{kin:`父母子水`,hostGuest:`应`},{kin:`兄弟寅木`},{kin:`妻财辰土`},{kin:`妻财戌土`,hostGuest:`世`},{kin:`父母子水`},{kin:`兄弟寅木`}],yangCounts:[1,2,2,2,2,1]},{binary:`010001`,id:`山水蒙`,sign:`䷃`,phase:`火`,palace:`离`,palaceIndex:4,setupInfo:[{kin:`父母寅木`,hostGuest:`应`},{kin:`子孙辰土`},{kin:`兄弟午火`},{kin:`子孙戌土`,hostGuest:`世`},{kin:`官鬼子水`},{kin:`父母寅木`}],yangCounts:[2,1,2,2,2,1]},{binary:`110001`,id:`山泽损`,sign:`䷨`,phase:`土`,palace:`艮`,palaceIndex:3,setupInfo:[{kin:`父母巳火`},{kin:`官鬼卯木`},{kin:`兄弟丑土`,hostGuest:`世`},{kin:`兄弟戌土`},{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`应`}],yangCounts:[1,1,2,2,2,1]},{binary:`001001`,id:`艮为山`,sign:`䷳`,phase:`土`,palace:`艮`,palaceIndex:0,setupInfo:[{kin:`兄弟辰土`},{kin:`父母午火`},{kin:`子孙申金`,hostGuest:`应`},{kin:`兄弟戌土`},{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`世`}],yangCounts:[2,2,1,2,2,1]},{binary:`101001`,id:`山火贲`,sign:`䷕`,phase:`土`,palace:`艮`,palaceIndex:1,setupInfo:[{kin:`官鬼卯木`,hostGuest:`世`},{kin:`兄弟丑土`},{kin:`妻财亥水`},{kin:`兄弟戌土`,hostGuest:`应`},{kin:`妻财子水`},{kin:`官鬼寅木`}],yangCounts:[1,2,1,2,2,1]},{binary:`011001`,id:`山风蛊`,sign:`䷑`,phase:`木`,palace:`巽`,palaceIndex:7,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`},{kin:`官鬼酉金`,hostGuest:`世`},{kin:`妻财戌土`},{kin:`父母子水`},{kin:`兄弟寅木`,hostGuest:`应`}],yangCounts:[2,1,1,2,2,1]},{binary:`111001`,id:`山天大畜`,sign:`䷙`,phase:`土`,palace:`艮`,palaceIndex:2,setupInfo:[{kin:`妻财子水`},{kin:`官鬼寅木`,hostGuest:`世`},{kin:`兄弟辰土`},{kin:`兄弟戌土`},{kin:`妻财子水`,hostGuest:`应`},{kin:`官鬼寅木`}],yangCounts:[1,1,1,2,2,1]},{binary:`000101`,id:`火地晋`,sign:`䷢`,phase:`金`,palace:`乾`,palaceIndex:6,setupInfo:[{kin:`父母未土`,hostGuest:`应`},{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`兄弟酉金`,hostGuest:`世`},{kin:`父母未土`},{kin:`官鬼巳火`}],yangCounts:[2,2,2,1,2,1]},{binary:`100101`,id:`火雷噬嗑`,sign:`䷔`,phase:`木`,palace:`巽`,palaceIndex:5,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`,hostGuest:`应`},{kin:`妻财辰土`},{kin:`官鬼酉金`},{kin:`妻财未土`,hostGuest:`世`},{kin:`子孙巳火`}],yangCounts:[1,2,2,1,2,1]},{binary:`010101`,id:`火水未济`,sign:`䷿`,phase:`火`,palace:`离`,palaceIndex:3,setupInfo:[{kin:`父母寅木`},{kin:`子孙辰土`},{kin:`兄弟午火`,hostGuest:`世`},{kin:`妻财酉金`},{kin:`子孙未土`},{kin:`兄弟巳火`,hostGuest:`应`}],yangCounts:[2,1,2,1,2,1]},{binary:`110101`,id:`火泽睽`,sign:`䷥`,phase:`土`,palace:`艮`,palaceIndex:4,setupInfo:[{kin:`父母巳火`,hostGuest:`应`},{kin:`官鬼卯木`},{kin:`兄弟丑土`},{kin:`子孙酉金`,hostGuest:`世`},{kin:`兄弟未土`},{kin:`父母巳火`}],yangCounts:[1,1,2,1,2,1]},{binary:`001101`,id:`火山旅`,sign:`䷷`,phase:`火`,palace:`离`,palaceIndex:1,setupInfo:[{kin:`子孙辰土`,hostGuest:`世`},{kin:`兄弟午火`},{kin:`妻财申金`},{kin:`妻财酉金`,hostGuest:`应`},{kin:`子孙未土`},{kin:`兄弟巳火`}],yangCounts:[2,2,1,1,2,1]},{binary:`101101`,id:`离为火`,sign:`䷝`,phase:`火`,palace:`离`,palaceIndex:0,setupInfo:[{kin:`父母卯木`},{kin:`子孙丑土`},{kin:`官鬼亥水`,hostGuest:`应`},{kin:`妻财酉金`},{kin:`子孙未土`},{kin:`兄弟巳火`,hostGuest:`世`}],yangCounts:[1,2,1,1,2,1]},{binary:`011101`,id:`火风鼎`,sign:`䷱`,phase:`火`,palace:`离`,palaceIndex:2,setupInfo:[{kin:`子孙丑土`},{kin:`官鬼亥水`,hostGuest:`世`},{kin:`妻财酉金`},{kin:`妻财酉金`},{kin:`子孙未土`,hostGuest:`应`},{kin:`兄弟巳火`}],yangCounts:[2,1,1,1,2,1]},{binary:`111101`,id:`火天大有`,sign:`䷍`,phase:`金`,palace:`乾`,palaceIndex:7,setupInfo:[{kin:`子孙子水`},{kin:`妻财寅木`},{kin:`父母辰土`,hostGuest:`世`},{kin:`兄弟酉金`},{kin:`父母未土`},{kin:`官鬼巳火`,hostGuest:`应`}],yangCounts:[1,1,1,1,2,1]},{binary:`000011`,id:`风地观`,sign:`䷓`,phase:`金`,palace:`乾`,palaceIndex:4,setupInfo:[{kin:`父母未土`,hostGuest:`应`},{kin:`官鬼巳火`},{kin:`妻财卯木`},{kin:`父母未土`,hostGuest:`世`},{kin:`官鬼巳火`},{kin:`妻财卯木`}],yangCounts:[2,2,2,2,1,1]},{binary:`100011`,id:`风雷益`,sign:`䷩`,phase:`木`,palace:`巽`,palaceIndex:3,setupInfo:[{kin:`父母子水`},{kin:`兄弟寅木`},{kin:`妻财辰土`,hostGuest:`世`},{kin:`妻财未土`},{kin:`子孙巳火`},{kin:`兄弟卯木`,hostGuest:`应`}],yangCounts:[1,2,2,2,1,1]},{binary:`010011`,id:`风水涣`,sign:`䷺`,phase:`火`,palace:`离`,palaceIndex:5,setupInfo:[{kin:`父母寅木`},{kin:`子孙辰土`,hostGuest:`应`},{kin:`兄弟午火`},{kin:`子孙未土`},{kin:`兄弟巳火`,hostGuest:`世`},{kin:`父母卯木`}],yangCounts:[2,1,2,2,1,1]},{binary:`110011`,id:`风泽中孚`,sign:`䷼`,phase:`土`,palace:`艮`,palaceIndex:6,setupInfo:[{kin:`父母巳火`,hostGuest:`应`},{kin:`官鬼卯木`},{kin:`兄弟丑土`},{kin:`兄弟未土`,hostGuest:`世`},{kin:`父母巳火`},{kin:`官鬼卯木`}],yangCounts:[1,1,2,2,1,1]},{binary:`001011`,id:`风山渐`,sign:`䷴`,phase:`土`,palace:`艮`,palaceIndex:7,setupInfo:[{kin:`兄弟辰土`},{kin:`父母午火`},{kin:`子孙申金`,hostGuest:`世`},{kin:`兄弟未土`},{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`应`}],yangCounts:[2,2,1,2,1,1]},{binary:`101011`,id:`风火家人`,sign:`䷤`,phase:`木`,palace:`巽`,palaceIndex:2,setupInfo:[{kin:`兄弟卯木`},{kin:`妻财丑土`,hostGuest:`世`},{kin:`父母亥水`},{kin:`妻财未土`},{kin:`子孙巳火`,hostGuest:`应`},{kin:`兄弟卯木`}],yangCounts:[1,2,1,2,1,1]},{binary:`011011`,id:`巽为风`,sign:`䷸`,phase:`木`,palace:`巽`,palaceIndex:0,setupInfo:[{kin:`妻财丑土`},{kin:`父母亥水`},{kin:`官鬼酉金`,hostGuest:`应`},{kin:`妻财未土`},{kin:`子孙巳火`},{kin:`兄弟卯木`,hostGuest:`世`}],yangCounts:[2,1,1,2,1,1]},{binary:`111011`,id:`风天小畜`,sign:`䷈`,phase:`木`,palace:`巽`,palaceIndex:1,setupInfo:[{kin:`父母子水`,hostGuest:`世`},{kin:`兄弟寅木`},{kin:`妻财辰土`},{kin:`妻财未土`,hostGuest:`应`},{kin:`子孙巳火`},{kin:`兄弟卯木`}],yangCounts:[1,1,1,2,1,1]},{binary:`000111`,id:`天地否`,sign:`䷋`,phase:`金`,palace:`乾`,palaceIndex:3,setupInfo:[{kin:`父母未土`},{kin:`官鬼巳火`},{kin:`妻财卯木`,hostGuest:`世`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`父母戌土`,hostGuest:`应`}],yangCounts:[2,2,2,1,1,1]},{binary:`100111`,id:`天雷无妄`,sign:`䷘`,phase:`木`,palace:`巽`,palaceIndex:4,setupInfo:[{kin:`父母子水`,hostGuest:`应`},{kin:`兄弟寅木`},{kin:`妻财辰土`},{kin:`子孙午火`,hostGuest:`世`},{kin:`官鬼申金`},{kin:`妻财戌土`}],yangCounts:[1,2,2,1,1,1]},{binary:`010111`,id:`天水讼`,sign:`䷅`,phase:`火`,palace:`离`,palaceIndex:6,setupInfo:[{kin:`父母寅木`,hostGuest:`应`},{kin:`子孙辰土`},{kin:`兄弟午火`},{kin:`兄弟午火`,hostGuest:`世`},{kin:`妻财申金`},{kin:`子孙戌土`}],yangCounts:[2,1,2,1,1,1]},{binary:`110111`,id:`天泽履`,sign:`䷉`,phase:`土`,palace:`艮`,palaceIndex:5,setupInfo:[{kin:`父母巳火`},{kin:`官鬼卯木`,hostGuest:`应`},{kin:`兄弟丑土`},{kin:`父母午火`},{kin:`子孙申金`,hostGuest:`世`},{kin:`兄弟戌土`}],yangCounts:[1,1,2,1,1,1]},{binary:`001111`,id:`天山遁`,sign:`䷠`,phase:`金`,palace:`乾`,palaceIndex:2,setupInfo:[{kin:`父母辰土`},{kin:`官鬼午火`,hostGuest:`世`},{kin:`兄弟申金`},{kin:`官鬼午火`},{kin:`兄弟申金`,hostGuest:`应`},{kin:`父母戌土`}],yangCounts:[2,2,1,1,1,1]},{binary:`101111`,id:`天火同人`,sign:`䷌`,phase:`火`,palace:`离`,palaceIndex:7,setupInfo:[{kin:`父母寅木`},{kin:`子孙辰土`},{kin:`兄弟午火`,hostGuest:`世`},{kin:`子孙未土`},{kin:`父母巳火`},{kin:`子孙戌土`,hostGuest:`应`}],yangCounts:[1,2,1,1,1,1]},{binary:`011111`,id:`天风姤`,sign:`䷫`,phase:`金`,palace:`乾`,palaceIndex:1,setupInfo:[{kin:`父母丑土`,hostGuest:`世`},{kin:`子孙亥水`},{kin:`兄弟酉金`},{kin:`官鬼午火`,hostGuest:`应`},{kin:`兄弟申金`},{kin:`父母戌土`}],yangCounts:[2,1,1,1,1,1]},{binary:`111111`,id:`乾为天`,sign:`䷀`,phase:`金`,palace:`乾`,palaceIndex:0,setupInfo:[{kin:`子孙子水`},{kin:`妻财寅木`},{kin:`父母辰土`,hostGuest:`应`},{kin:`官鬼午火`},{kin:`兄弟申金`},{kin:`父母戌土`,hostGuest:`世`}],yangCounts:[1,1,1,1,1,1]}]),r=Object.freeze([{id:`坤`,binary:`000`,yangCount:0,represents:`地`,nameEn:`kun`,representsEn:`earth`,sign:`☷`},{id:`震`,binary:`100`,yangCount:1,represents:`雷`,nameEn:`zhen`,representsEn:`thunder`,sign:`☳`},{id:`坎`,binary:`010`,yangCount:1,represents:`水`,nameEn:`kan`,representsEn:`water`,sign:`☵`},{id:`兑`,binary:`110`,yangCount:2,represents:`泽`,nameEn:`dui`,representsEn:`lake`,sign:`☱`},{id:`艮`,binary:`001`,yangCount:1,represents:`山`,nameEn:`gen`,representsEn:`mountain`,sign:`☶`},{id:`离`,binary:`101`,yangCount:2,represents:`火`,nameEn:`li`,representsEn:`fire`,sign:`☲`},{id:`巽`,binary:`011`,yangCount:2,represents:`风`,nameEn:`xun`,representsEn:`wind`,sign:`☴`},{id:`乾`,binary:`111`,yangCount:3,represents:`天`,nameEn:`qian`,representsEn:`heaven`,sign:`☰`}]),i=[`老阴`,`少阳`,`少阴`,`老阳`],a=`交单拆重`,o=`×’”○`,s=[1,1,2,2],c=[0,1,0,1];function l(e){if(e!==0&&e!==1&&e!==2&&e!==3)throw Error(`Count of yang must be 0, 1, 2 or 3`)}var u=class e{static getName(e){return i[e]}static fromSymbol(t){let n=o.indexOf(t);return n===-1?null:new e(n)}static fromSymbolName(t){let n=a.indexOf(t);return n===-1?null:new e(n)}static fromName(t){let n=i.indexOf(t);return n===-1?null:new e(n)}static fromDigitString(t){let n=`0123`.indexOf(t);return n===-1?null:new e(n)}static fromTrigramField(t){let n=r.find(e=>e.id===t||e.yangCount===t||e.binary===t||e.nameEn===t||e.represents===t||e.representsEn===t||e.sign===t);return n?new e(n.yangCount):null}_yangCount;get yangCount(){return this._yangCount}get polar(){return c[this.yangCount]}get isDynamic(){return this.yangCount===0||this.yangCount===3}isChanged;get symbol(){return o[this.yangCount]}get symbolName(){return a[this.yangCount]}get name(){return i[this.yangCount]}constructor(e,t=!1){l(e),this._yangCount=e,this.isChanged=t}set(e){l(e),this._yangCount=e}clone(){return new e(this.yangCount,this.isChanged)}toChanged(){return this.isDynamic?new e(s[this.yangCount],!0):new e(this.yangCount,!1)}};const d=[`初爻`,`二爻`,`三爻`,`四爻`,`五爻`,`上爻`];var f=class e{static fromQuaternary(t){let n=t.split(``).map(u.fromDigitString);return n.every(e=>e!==null)?new e(n):null}static fromSymbolName(t){let n=t.split(``).map(u.fromSymbolName);return n.every(e=>e!==null)?new e(n):null}static fromYangCounts(t){try{return new e(t.map(e=>new u(e)))}catch{return null}}static fromId(t){let r=n.find(e=>e.id===t||e.id.slice(2)===t||e.id.startsWith(t)&&t.length>1);return r?e.fromYangCounts(r.yangCounts):null}static fromPalace(t){let r=n.find(e=>e.id[2]===t);return r?e.fromYangCounts(r.yangCounts):null}yaos;get info(){return n.find(e=>e.binary===this.yaos.map(e=>e.polar).join(``))}get palace(){let e=this.info;return`${e.palace}宫(${e.phase})${t[e.palaceIndex].name}`}get isDynamic(){return this.yaos.some(e=>e.isDynamic||e.isChanged)}get isChanged(){return this.yaos.some(e=>e.isChanged)}get dynamicOuter(){return this.yaos.slice(3).some(e=>e.isDynamic||e.isChanged)}get dynamicInner(){return this.yaos.slice(0,3).some(e=>e.isDynamic||e.isChanged)}constructor(e){if(e.length!==6)throw Error(`Array length mismatch, A Hexagram must be constructed with exactly 6 Yaos or 6 counts of yang`);if(e.every(e=>e instanceof u))this.yaos=e.map(e=>e.clone());else throw Error(`Invalid Arguments, Hexagram must be constructed with exactly 6 Yaos or 6 counts of yang`)}setYao(e,t){this.yaos[e].set(t)}toChanged(){if(!this.isDynamic)return null;if(this.isChanged)throw Error(`已经是变卦了,无法再变`);return new e(this.yaos.map(e=>e.toChanged()))}toDescription(){let e=this.info.setupInfo.findIndex(e=>e.hostGuest===`世`),t=this.info.setupInfo.findIndex(e=>e.hostGuest===`应`),n=[`本卦${this.info.id}`,`世爻为${d[e]}`,`应爻为${d[t]}`],r=this.toChanged();if(r){n.push(`${this.yaos.map((e,t)=>e.isDynamic?`${d[t]}`:null).filter(e=>e!==null).join(`、`)}是动爻`),n.push(`变卦为${r.info.id}`);let e=r.info.setupInfo.findIndex(e=>e.hostGuest===`世`);this.yaos[e].isDynamic?n.push(`变卦世爻为${d[e]}`):n.push(`未变出新的世爻`);let t=r.info.setupInfo.findIndex(e=>e.hostGuest===`应`);this.yaos[t].isDynamic?n.push(`变卦应爻为${d[t]}`):n.push(`未变出新的应爻`)}else n.push(`无动爻`);return n.join(`,`)}toAIReadable(){let e=this.info.setupInfo,t=this.toChanged(),n=t?.info.setupInfo,r=[];if(n){let e=this.yaos.map((e,t)=>e.isDynamic?t:null).filter(e=>e!==null);n.forEach((n,i)=>{e.includes(i)&&(n.hostGuest===`世`&&r.push(`新世爻为${t.info.id}的${d[i]}`),n.hostGuest===`应`&&r.push(`新应爻为${t.info.id}的${d[i]}`))})}else r.push(`没有新的世应爻出现,世应不变`);let i=(e,t,n)=>{let r={爻:this.yaos[n].name,六亲:t[n].kin,类型:t[n].hostGuest};return r.类型||delete r.类型,r};return{本卦:{上爻:i(this.yaos,e,5),五爻:i(this.yaos,e,4),四爻:i(this.yaos,e,3),三爻:i(this.yaos,e,2),二爻:i(this.yaos,e,1),初爻:i(this.yaos,e,0),卦名:this.info.id,宫:this.palace,变爻:this.isDynamic?this.yaos.map((e,t)=>e.isDynamic?d[t]:null).filter(e=>e!==null):void 0},变卦:n?{上爻:i(t.yaos,n,5),五爻:i(t.yaos,n,4),四爻:i(t.yaos,n,3),三爻:i(t.yaos,n,2),二爻:i(t.yaos,n,1),初爻:i(t.yaos,n,0),卦名:t.info.id,宫:t.palace}:`无`,世应变化:r.join(`,`)}}clone(){return new e(this.yaos)}toString(){return this.info.id}[Symbol.toPrimitive](){return this.info.id}};const p=Object.freeze([{heavenlyStem:`甲`,gods:[`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`]},{heavenlyStem:`乙`,gods:[`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`]},{heavenlyStem:`丙`,gods:[`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`,`青龙`]},{heavenlyStem:`丁`,gods:[`朱雀`,`勾陈`,`螣蛇`,`白虎`,`玄武`,`青龙`]},{heavenlyStem:`戊`,gods:[`勾陈`,`螣蛇`,`白虎`,`玄武`,`青龙`,`朱雀`]},{heavenlyStem:`己`,gods:[`螣蛇`,`白虎`,`玄武`,`青龙`,`朱雀`,`勾陈`]},{heavenlyStem:`庚`,gods:[`白虎`,`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`]},{heavenlyStem:`辛`,gods:[`白虎`,`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`]},{heavenlyStem:`壬`,gods:[`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`]},{heavenlyStem:`癸`,gods:[`玄武`,`青龙`,`朱雀`,`勾陈`,`螣蛇`,`白虎`]}]);function m(){let e=process.argv[2];if(!e)return null;let t=e.split(``).map(u.fromTrigramField);return t.every(e=>e!==null)&&t.length>=6?new f(t):f.fromQuaternary(e)||f.fromId(e)||f.fromSymbolName(e)}function h(e){return`子丑丑寅寅卯卯辰辰巳巳午午未未申申酉酉戌戌亥亥子`[e.getHours()]??`未知`}function g(){let t=process.argv[3],n=new Date(t);if(Number.isNaN(n.getTime()))return null;let r=e.solar2lunar(n.getFullYear(),n.getMonth()+1,n.getDate());if(r===-1)return null;let i=p.find(e=>e.heavenlyStem===r.gzDay[0]).gods;return{年:r.gzYear,月:r.gzMonth,日:r.gzDay,时:h(n),六神顺序:{上爻:i[5],五爻:i[4],四爻:i[3],三爻:i[2],二爻:i[1],初爻:i[0]}}}console.dir({version:`0.4.2`,卦象:m()?.toAIReadable(),时辰:g()},{depth:6});export{};
|