PageSourceSearch

https://fortunetell.ai/_next/static/chunks/3853.b1e13315905054a8.js

js fortunetell.ai collected 2026-10-05 12:07:42 UTC 8,426 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="14ce3e74-a3fc-48ec-853f-25492ddc32fc",e._sentryDebugIdIdentifier="sentry-dbid-14ce3e74-a3fc-48ec-853f-25492ddc32fc")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3853],{8466:(e,t,a)=>{a.d(t,{A:()=>i});let i=(0,a(33725).A)("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]])},63853:(e,t,a)=>{a.r(t),a.d(t,{YearlyTab:()=>_});var i=a(69006),l=a(1982),r=a(7996),n=a(30703),s=a(29697),o=a(8466),c=a(20259),d=a(35576),m=a(80489),h=a(40696),u=a(65156),x=a(89585),y=a(17664),g=a(9981),f=a(57955),p=a(292),b=a(68512),w=a(36051);let v=f.AH;function _(e){let{chart:t,preloadedRecords:a}=e,{t:f,language:_}=(0,d.ok)(),{user:N}=(0,m.A)(),{coinInfo:j,fetchCoinInfo:z}=(0,h.z)({serviceKey:"ziwei_yearly",autoFetch:!0}),I=new Date().getFullYear(),[k,S]=(0,l.useState)(I),[D,C]=(0,l.useState)(null),[M,A]=(0,l.useState)(!1),[B,R]=(0,l.useState)(!1),[E,T]=(0,l.useState)(null),[q,L]=(0,l.useState)(null),F=t.birthInfo.year,K=Math.max(I+10,t.birthInfo.year+100),Q=(0,l.useMemo)(()=>{let e=Math.max(F,I-5);return Array.from({length:Math.min(K,I+10)-e+1},(t,a)=>e+a)},[I,F,K]),U=(0,l.useMemo)(()=>t.chartData?(0,r.W1)(t.chartData,k):null,[t.chartData,k]),W=(0,l.useMemo)(()=>t.chartData?(0,r._$)(t.chartData,k):[],[t.chartData,k]),X=["化禄","化权","化科","化忌"];f("ziwei.mutagen.hua_lu"),f("ziwei.mutagen.hua_quan"),f("ziwei.mutagen.hua_ke"),f("ziwei.mutagen.hua_ji");let Y=[f("ziwei.mutagen.lu_short"),f("ziwei.mutagen.quan_short"),f("ziwei.mutagen.ke_short"),f("ziwei.mutagen.ji_short")],$=(0,l.useMemo)(()=>{let e=t.birthInfo;return"ziwei_yearly_".concat(v,"_").concat(_,"_").concat(e.year,"_").concat(e.month,"_").concat(e.day,"_").concat(e.hour,"_").concat(e.minute,"_").concat(e.gender,"_").concat(k)},[t.birthInfo,k,_]);(0,l.useLayoutEffect)(()=>{try{let e=sessionStorage.getItem($);e?(C(e),R(!0)):(C(null),R(!1))}catch(e){C(null),R(!1)}let e=null==a?void 0:a.find(e=>e.yearly_year===k);T((null==e?void 0:e.id)||null)},[$,a,k]);let G=(0,l.useCallback)(async()=>{if(!N)return void p.oR.error(f("ziwei.ai.please_login"));if(!(null==j?void 0:j.canUse))return void p.oR.error(f("ziwei.ai.insufficient_need",{cost:(null==j?void 0:j.cost)||0}));A(!0),C(null),R(!1);try{let e=(0,x.$K)(t),a=await (0,u.apiPost)("/api/ziwei/interpret",{chartData:e,birthInfo:t.birthInfo,palacesData:t.palaces,language:_,birthInfoId:t.profileId,title:"".concat(t.profileName||""," - ").concat(f("ziwei.yearly.ai_title")," ").concat(k),mode:"yearly",yearlyData:{year:k,heavenlyStem:(null==U?void 0:U.heavenlyStem)||"",earthlyBranch:(null==U?void 0:U.earthlyBranch)||"",mutagen:(null==U?void 0:U.mutagen)||[],palaceNames:(null==U?void 0:U.palaceNames)||[]}});C(a.interpretation),a.recordId&&T(a.recordId),L(a.timestamp||new Date().toISOString()),z();try{sessionStorage.setItem($,a.interpretation)}catch(e){}}catch(e){((null==e?void 0:e.message)||"").includes("insufficient_coins")?p.oR.error(f("ziwei.ai.insufficient")):p.oR.error(f("ziwei.ai.failed"))}finally{A(!1)}},[N,j,t,_,k,U,$,f,z]);return(0,i.jsxs)("div",{className:"space-y-6",children:[(0,i.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,i.jsx)("button",{onClick:()=>S(e=>Math.max(F,e-1)),disabled:k<=F,className:"p-2 rounded-lg hover:bg-gray-100 transition-colors flex-shrink-0 disabled:opacity-30 disabled:cursor-not-allowed",children:(0,i.jsx)(o.A,{className:"w-4 h-4 text-gray-500"})}),(0,i.jsx)("div",{className:"flex-1 overflow-x-auto scrollbar-hide",children:(0,i.jsx)("div",{className:"flex gap-1 min-w-max px-0.5",children:Q.map(e=>(0,i.jsxs)("button",{onClick:()=>S(e),className:(0,n.cn)("px-3 md:px-4 py-2 rounded-lg text-xs md:text-sm font-medium transition-all relative min-w-[52px]",e===k?"bg-[#2c3a6e] text-white shadow-sm":e===I?"bg-[#eef1f8] text-[#2c3a6e] hover:bg-[#e4e8f4] ring-1 ring-[#2c3a6e]/15":e<I?"text-gray-400 hover:bg-white/70":"text-gray-600 hover:bg-white/70"),children:[e,e===I&&e!==k&&(0,i.jsx)("span",{className:"absolute -top-1 -right-1 w-1.5 h-1.5 rounded-full bg-[#2c3a6e]"})]},e))})}),(0,i.jsx)("button",{onClick:()=>S(e=>Math.min(K,e+1)),disabled:k>=K,className:"p-2 rounded-lg hover:bg-gray-100 transition-colors flex-shrink-0 disabled:opacity-30 disabled:cursor-not-allowed",children:(0,i.jsx)(c.A,{className:"w-4 h-4 text-gray-500"})}),k!==I&&(0,i.jsx)("button",{onClick:()=>S(I),className:"px-2 py-1.5 rounded-lg bg-[#eef1f8] text-[#2c3a6e] text-[10px] font-medium hover:bg-[#e4e8f4] flex-shrink-0",children:f("ziwei.button.this_year")})]}),U&&(0,i.jsxs)("div",{className:"bg-white/60 backdrop-blur-sm rounded-2xl border border-[#c4a882]/20 p-5 shadow-sm",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,i.jsx)("h3",{className:"text-base font-bold text-gray-900",children:f("ziwei.yearly.title",{year:k})}),(0,i.jsxs)("span",{className:"text-xs font-mono text-gray-400",children:[U.heavenlyStem,U.earthlyBranch]})]}),U.mutagen.length>0&&(0,i.jsxs)("div",{className:"mb-4",children:[(0,i.jsx)("h4",{className:"text-xs font-medium text-gray-400 mb-2",children:f("ziwei.yearly.mutagen_title")}),(0,i.jsx)("div",{className:"flex gap-2",children:U.mutagen.map((e,t)=>(0,i.jsxs)("span",{className:(0,n.cn)("text-xs font-medium px-2.5 py-1 rounded-full",(0,s.X7)(X[t]||"")),children:[e," ",Y[t]||""]},t))})]}),U.palaceNames.length>0&&(0,i.jsxs)("div",{children:[(0,i.jsx)("h4",{className:"text-xs font-medium text-gray-400 mb-2",children:f("ziwei.yearly.palaces_title")}),(0,i.jsx)("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-[11px] text-gray-500",children:U.palaceNames.map((e,t)=>(0,i.jsxs)("span",{children:[0===t?(0,i.jsxs)("span",{className:"text-[#2c3a6e] font-medium",children:[e,(0,i.jsx)("span",{className:"text-[9px] text-[#2c3a6e]/50 ml-0.5",children:f("ziwei.symbol.life")})]}):e,t<U.palaceNames.length-1&&(0,i.jsx)("span",{className:"text-gray-200 ml-3",children:"\xb7"})]},t))})]})]}),W.length>0&&(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:f("ziwei.section.monthly_fortune")}),(0,i.jsx)("div",{className:"grid grid-cols-3 md:grid-cols-4 gap-2",children:W.map(e=>{var t;return(0,i.jsxs)("div",{className:"bg-white/60 backdrop-blur-sm rounded-xl border border-[#c4a882]/15 p-3 hover:shadow-sm hover:shadow-sm transition-all",children:[(0,i.jsxs)("div",{className:"flex items-center justify-between mb-1.5",children:[(0,i.jsxs)("span",{className:"text-xs font-bold text-gray-800",children:[e.month,f("ziwei.unit.month")]}),(0,i.jsxs)("span",{className:"text-[9px] text-gray-400 font-mono",children:[e.heavenlyStem,e.earthlyBranch]})]}),e.mutagen.length>0&&(0,i.jsx)("div",{className:"flex flex-wrap gap-0.5",children:e.mutagen.map((e,t)=>{let a=[f("ziwei.mutagen.lu_short"),f("ziwei.mutagen.quan_short"),f("ziwei.mutagen.ke_short"),f("ziwei.mutagen.ji_short")];return(0,i.jsxs)("span",{className:(0,n.cn)("text-[9px] font-bold",["text-amber-600","text-red-500","text-blue-500","text-gray-400"][t]||"text-gray-400"),children:[e.replace(/化[禄权科忌]?/,""),a[t]||""]},t)})}),(0,i.jsxs)("div",{className:"text-[10px] text-gray-400 mt-1",children:[f("ziwei.yearly.monthly_palace"),(null==(t=e.palaceNames)?void 0:t[0])||"-"]})]},e.month)})})]}),!U&&(0,i.jsx)("div",{className:"text-center py-12",children:(0,i.jsx)("p",{className:"text-sm text-gray-400",children:f("ziwei.error.
1no_yearly_data",{year:k})})}),U&&(D?(()=>{let e=(0,g.cW)(t);return(0,i.jsx)(b.Q,{interpretation:D,fromCache:B,recordId:E,generatedAt:q||void 0,title:f("ziwei.yearly.ai_title"),followUpTitle:f("ziwei.yearly.follow_up_title"),introMessage:"\xb7 ".concat(f("ziwei.yearly.title",{year:k}),"\n\xb7 ").concat(U.heavenlyStem).concat(U.earthlyBranch,"\n\xb7 ").concat(null==D?void 0:D.substring(0,150),"..."),onReinterpret:G,reinterpretLoading:M,reinterpretCost:null==j?void 0:j.cost,guideTip:f("ziwei.guide.after_yearly"),shareSlot:e?(0,i.jsx)(y.Q,{persona:e,userName:t.profileName,className:"!text-white !bg-[#2c3a6e] hover:!bg-[#3a4a7e] !rounded-full !px-4 !h-9"}):void 0})})():(0,i.jsx)(w.X,{title:f("ziwei.yearly.ai_title"),description:f("ziwei.yearly.ai_desc_short"),coinInfo:j,loading:M,onGenerate:G,buttonText:f("ziwei.yearly.ai_start",{cost:(null==j?void 0:j.cost)||0})}))]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.