PageSourceSearch

https://www.aibase.cn/_nuxt/CH4CyeNk.js

js aibase.cn collected 2026-10-06 04:01:19 UTC 17,405 bytes, 1 lines download raw bytes

1import{d as T,dG as ye,R as J,dH as Z,c9 as ee,dI as Ce,dJ as Ue,u as z,ay as se,g as le,h as re,aF as Q,j as w,a5 as B,m as n,dK as ne,L as k,s as C,q as X,t as U,H as q,P as b,r as I,w as N,C as E,o as Le,ax as ce,x as Ve,a8 as ke,l as s,aO as ue,dL as Re,e as H,aR as W,n as P,ak as r,aw as te,G as $e,k as D,F as Y,aK as Se,v as pe,ah as De,z as Ie,dM as oe,dN as Me,dO as Pe,_ as Ne,c5 as Be,ar as Ae,au as ae}from"./DJKRippi.js";import{a as Te}from"./ByXZVrCz.js";import{u as de}from"./_luRG1Rb.js";import{ensureDailyPoints as qe,getUnreadMessageCount as Fe}from"./DX-fYEBt.js";import{_ as fe}from"./CzEQXtll.js";import{_ as ie}from"./NocpQvBE.js";import{u as Ee}from"./DXfYgEfa.js";import{_ as Qe}from"./CfuOGt9g.js";const ze=Ce({...Ue,componentName:"NuxtLink"}),Oe=T({name:"SwitchLocalePathLink",props:{locale:{type:String,required:!0}},inheritAttrs:!1,setup(m,{slots:p,attrs:a}){const t=ye();return()=>[J(ee,`${Z}-[${m.locale}]`),J(ze,{...a,to:encodeURI(t(m.locale))},p.default),J(ee,`/${Z}`)]}}),je=T({__name:"LanguageSelector",emits:["change"],setup(m,{emit:p}){const a=p,{locale:t}=z(),e=I(!1),c=ne,l=I(null),o=q(),g=b(()=>ne.find(h=>h.code===t.value)),f=se(o.public.cookieKey,{domain:o.public.cookieDomain});function i(h){e.value=!e.value,f.value=h.code,a("change")}const L=h=>{l.value&&!l.value.contains(h.target)&&e.value&&(e.value=!1)};return le(()=>{document.addEventListener("click",L)}),re(()=>{document.removeEventListener("click",L)}),(h,S)=>{const V=Oe,R=Q("ALanguageSelector");return w(),B(R,{languages:n(c),"current-language":g.value,onLanguageChange:i},{"language-item":k(({language:$,isCurrent:_,onClick:y})=>[C(V,{locale:$.code,onClick:y},{default:k(()=>[X(U($.name),1)]),_:2},1032,["locale","onClick"])]),_:1},8,["languages","current-language"])}}}),Ke={class:"fixed inset-0 z-[99]"},He={class:"absolute inset-0"},We=["src"],Ge=T({__name:"IframeBridge",props:{src:{},visible:{type:Boolean,default:!1}},emits:["close","success","error","visible-request"],setup(m,{expose:p,emit:a}){const t=m,e=a,c=I(null),l=b(()=>t.src),{requestVipPay:o,requestVipUpgrade:g,requestVipRenew:f,requestNotify:i,requestBind:L,requestCoupon:h,onSuccess:S,onClose:V,onError:R,onVisibleRequest:$}=Te(l,c);S(y=>e("success",y)),V(()=>e("close")),R(y=>e("error",y)),$(y=>e("visible-request",y));function _(y){document.body.style.overflow=y?"hidden":""}return N(()=>t.visible,y=>{y?E(()=>_(!0)):_(!1)}),Le(()=>{_(!1)}),p({requestVipPay:o,requestVipUpgrade:g,requestVipRenew:f,requestNotify:i,requestBind:L,requestCoupon:h}),(y,O)=>(w(),B(ce,{to:"body"},[Ve(s("div",Ke,[s("div",He,[s("iframe",{ref_key:"iframeRef",ref:c,src:m.src,class:"w-full h-full border-0",frameborder:"0"},null,8,We)])],512),[[ke,m.visible]])]))}}),Je=()=>{const m=q(),p=ue(),{extractLanguageFromUrl:a}=Re();return{routeLocale:b(()=>
1a(p.path)||m.public.defaultLangCode||"zh")}},Ye=T({__name:"IframePopupManager",props:{isMainProject:{type:Boolean},onVipSuccess:{type:Function},onVipUpgradeSuccess:{type:Function},fetchQuota:{type:Boolean}},emits:["vip-success","vip-close","vip-upgrade-success","vip-upgrade-close","vip-renew-success","vip-renew-close","coupon-close"],setup(m,{emit:p}){const a=m,t=p,e=de(),c=H(),l=q(),{locale:o}=z(),{token:g}=W(c);N(()=>g.value,async u=>{if(u){e.fetchMe(),a.fetchQuota&&e.fetchQuotaUsage();try{const x=await qe()}catch(x){console.error("[IframePopupManager] ensureDailyPoints error:",x)}}},{immediate:!0});const{routeLocale:f}=Je();N(f,()=>{g.value&&(e.fetchMe(!0),a.fetchQuota&&e.fetchQuotaUsage(!0))});const i=b(()=>r(`${l.public.allDomain.wwwUrl}/m-vip-pay`,o.value,l.public.defaultLangCode)),L=b(()=>r(`${l.public.allDomain.wwwUrl}/m-vip-upgrade`,o.value,l.public.defaultLangCode)),h=b(()=>r(`${l.public.allDomain.wwwUrl}/m-coupon`,o.value,l.public.defaultLangCode)),S=b(()=>r(`${l.public.allDomain.wwwUrl}/m-notify`,o.value,l.public.defaultLangCode)),V=b(()=>r(`${l.public.allDomain.wwwUrl}/m-vip-renew`,o.value,l.public.defaultLangCode)),R=b(()=>e.vipVisible),$=b(()=>e.vipUpgradeVisible),_=b(()=>e.vipRenewVisible),y=b(()=>e.couponVisible),O=b(()=>e.notifyVisible),v=I(null),d=I(null),F=I(null),j=I(null),K=I(null);N(()=>e.vipTriggerAt,async u=>{var x;!u||!e.vipVisible||(await E(),(x=v.value)==null||x.requestVipPay({planId:e.vipPlanId,currentPlanName:e.planName||"免费版",currentPlanId:e.currentPlanId||""}))}),N(()=>e.vipUpgradeTriggerAt,async u=>{var x;!u||!e.vipUpgradeVisible||(await E(),(x=d.value)==null||x.requestVipUpgrade({planId:e.vipUpgradePlanId,lang:o.value}))}),N(()=>e.vipRenewTriggerAt,async u=>{var x;!u||!e.vipRenewVisible||(await E(),(x=K.value)==null||x.requestVipRenew({planId:e.vipRenewPlanId||e.currentPlanId,lang:o.value}))});async function G(){if(e.closeVip(),a.onVipSuccess)try{await a.onVipSuccess()}catch(u){console.error("[IframePopupManager] onVipSuccess callback error:",u)}else e.fetchMe(!0),a.fetchQuota&&e.fetchQuotaUsage(!0);t("vip-success")}function A(){e.closeVip(),t("vip-close")}async function me(){var x;if(e.closeVipUpgrade(),a.onVipUpgradeSuccess)try{await a.onVipUpgradeSuccess()}catch(M){console.error("[IframePopupManager] onVipUpgradeSuccess callback error:",M)}const u=await e.fetchMe(!0,{preserveCurrentPlanName:!0});if(a.fetchQuota&&e.fetchQuotaUsage(!0),u){const M=(x=e.membership)!=null&&x.expireTime?new Date(e.membership.expireTime).toLocaleDateString():"";e.openNotify("upgrade_success",{currentPlan:u.currentPlanName,newPlan:u.currentPlanName,previousPlan:u.previousPlanName,expireDate:
1M})}t("vip-upgrade-success")}function ge(){e.closeVipUpgrade(),t("vip-upgrade-close")}function he(u){e.setCouponVisible(u)}function ve(){e.setCouponVisible(!1),t("coupon-close")}N(()=>e.notifyTriggerAt,async u=>{!u||!e.notifyVisible||(await E(),setTimeout(()=>{var x;(x=j.value)==null||x.requestNotify({notifyType:e.notifyType,notifyData:e.notifyData})},100))});function xe(){e.closeNotify()}function we(u){e.setNotifyVisible(u)}async function be(){e.closeVipRenew(),e.fetchMe(!0),a.fetchQuota&&e.fetchQuotaUsage(!0),t("vip-renew-success")}function _e(){e.closeVipRenew(),t("vip-renew-close")}return(u,x)=>{const M=Ge;return w(),B(ce,{to:"body"},[C(M,{ref_key:"couponBridgeRef",ref:F,src:n(h),visible:n(y),onVisibleRequest:he,onClose:ve},null,8,["src","visible"]),C(M,{ref_key:"vipUpgradeBridgeRef",ref:d,src:n(L),visible:n($),onClose:ge,onSuccess:me},null,8,["src","visible"]),C(M,{ref_key:"vipBridgeRef",ref:v,src:n(i),visible:n(R),onClose:A,onSuccess:G},null,8,["src","visible"]),C(M,{ref_key:"notifyBridgeRef",ref:j,src:n(S),visible:n(O),onVisibleRequest:we,onClose:xe},null,8,["src","visible"]),m.isMainProject?(w(),B(M,{key:0,ref_key:"vipRenewBridgeRef",ref:K,src:n(V),visible:n(_),onClose:_e,onSuccess:be},null,8,["src","visible"])):P("",!0)])}}}),Xe=6e4;function Ze(){const m=I(0);let p=null;const a=b(()=>m.value>0),t=H(),{token:e}=W(t);async function c(){var f;if(e.value)try{const i=await Fe();m.value=((f=i==null?void 0:i.data)==null?void 0:f.unreadCount)??0}catch{}}function l(){o(),c(),p=$e(c,Xe)}function o(){p&&(clearInterval(p),p=null)}function g(){c()}return N(()=>e.value,f=>{f?l():(o(),m.value=0)},{immediate:!0}),re(()=>{o()}),{unreadCount:te(m),hasUnread:te(a),refresh:g,startPolling:l,stopPolling:o}}const en={class:"relative"},nn={class:"hidden md:block md:text-[14px] leading-[24px] text-[#306AF1] text-center cursor-pointer text-nowrap"},tn={class:"md:hidden md:text-[14px] flex items-center justify-center text-[16px] leading-[24px] font600 rounded-[5px] h-[50px] text-[#fff] bg-[#306AF1] text-center cursor-pointer text-nowrap"},on={key:2,class:"hidden relative group md:block"},an={class:"flex h-[40px] items-center gap-[4px] mainRadius group-hover:bg-[#F7F8FA] px-[4px] cursor-pointer"},sn={class:"relative"},ln={key:0,class:"absolute -top-[1px] -right-[1px] w-[8px] h-[8px] bg-[#f56c6c] rounded-full"},rn={class:"absolute hidden group-hover:block top-[40px] right-0 z-10 pt-[16px]"},cn={class:"shadow10 mainRadius bg-[#fff] min-w-[240px] w-max flex-col items-center px-[16px] pb-[16px] pt-[18px]"},un={class:"flex gap-[12px] items-center"},pn={class:"flex-1 min-w-0"},dn={class:"leading-[22px] text-[14px] font600 truncate text-left"},fn={class:"leading-[22px] text-[14px] flex items-center whitespace-nowrap"},mn={class:"text-[#8A8F99]"},gn={class:"text-[#306AF1]"},hn={class:"pt-[15px]"},vn={class:"text-[14px] leading-[22px] flex"},xn={class:"text-[#306AF1]"},wn={class:"text-[#8A8F99]"},bn={class:"flex flex-col leading-[22px]"},_n={class:"leading-[22px] text-[14px]"},yn={key:0,class:"ml-auto text-[12px] text-[#f56c6c]"},Cn={class:"text-[14px] leading-[22px]"},Un=T({__name:"UserBox",setup(m){const p=H(),a=de(),{t,locale:e}=z(),{token:c,userInfo:l,points:o}=W(p),{unreadCount:g,hasUnread:f}=Ze(),i=q(),L=b(()=>{var d;const v=(d=a.membership)==null?void 0:d.expireTime;return v?`${v}${t("menu.vipExpire")}`:""}),h=b(()=>[{name:t("user.account.title"),path:r(`${i.public.allDomain.wwwUrl}/user/account`,e.value,i.public.defaultLangCode),iconfont:"icon-gerenxinxi"},{name:t("user.submitManage"),path:r(`${i.public.allDomain.wwwUrl}/user/submitManage`,e.value,i.public.defaultLangCode),iconfont:"icon-shangchuan"},{name:t("user.history.title"),path:r(`${i.public.allDomain.wwwUrl}/user/history`,e.value,i.public.defaultLangCode),iconfont:"icon-lishi"},{name:t("user.order"),path:r(`${i.public.allDomain.wwwUrl}/user/order`,e.value,i.public.defaultLangCode),iconfont:"icon-MCP"},e.value==="zh"?{name:t("user.invoiceManagement"),path:r(`${i.public.allDomain.wwwUrl}/user/invoice`,e.value,i.public.defaultLangCode),iconfont:"icon-fapiao"}:null,{name:t("user.points"),path:r(`${i.public.allDomain.wwwUrl}/user/points`,e.value,i.public.defaultLangCode),iconfont:"icon-jifenmingxi"},{name:t("user.developer.title"),path:r(`${i.public.allDomain.wwwUrl}/user/developer`,e.value,i.public.defaultLangCode),iconfont:"icon-ceshi"},{name:t("user.coupon.title"),path:r(`${i.public.allDomain.wwwUrl}/user/coupon`,e.value,i.public.defaultLangCode),iconfont:"icon-youhuiquan"},{name:t("user.messageNotification"),path:r(`${i.public.allDomain.wwwUrl}/user/message`,e.value,i.public.defaultLangCode),iconfont:"icon-tixing",showUnread:!0}].filter(v=>v)),S=()=>{i.public.isCN==="true"?p.setLoginShow(!0):window.location.href=r(`${i.public.allDomain.wwwUrl}/auth/login`,e.value,i.public.defaultLangCode)},V=()=>{p.logout(!0),setTimeout(()=>{window==null||window.location.reload()},500)},R=ue(),$=()=>{var d;const v=se("token",{domain:i.public.cookieDomain});if(c.value||v.value){if((d=l==null?void 0:l.value)!=null&&d.id||oe(R.path))return;Pe().then(F=>{p.setUserInfo(F.data)}),p.setPoints()}},{siteCurrency:_,siteChannel:y}=Ee(),O=()=>{var v;if(!((v=l.value)!=null&&v.id)){i.public.isCN==="true"?p.setLoginShow(!0):window.location.href=r(`${i.public.allDomain.wwwUrl}/auth/login`,e.value,i.public.defaultLangCode);return}a.checkCurrencyMismatch(_.value,y.value)||(a.isVip&&!a.isLegacyUser?a.openVipRenew(a.currentPlanId):a.openVip())};return N(()=>c.value,v=>{$()}),le(()=>{$()}),(v,d)=>{const F=Se,j=De,K=Ye,G=fe;return w(),D("div",en,[n(l).id?P("",!0):(w(),D("div",{key:0,onClick:S},[s("div",nn,U(n(t)("login.login")),1),s("div",tn,U(n(t)("login.login")),1)])),n(l).id?(w(),D("button",{key:1,class:"bg-[#fff] md:hidden border-solid border-[#ebedf0] border-[1px] w-full flex items-center justify-center text-[16px] leading-[24px] font600 rounded-[5px] h-[50px] text-center cursor-pointer text-nowrap",onClick:V},U(n(t)("login.loginOut")),1)):P("",!0),n(l).id?(w(),D("div",on,[s("div",an,[s("div",sn,[d[0]||(d[0]=s("img",{src:ie,alt:"user",class:"min-w-[32px] w-[32px] h-[32px] rounded-full"},null,-1)),n(f)?(w(),D("span",ln)):P("",!0)]),d[1]||(d[1]=s("i",{class:"iconfont icon-xia1 dropdown-icon text-[12px] text-[#8A8F99] group-hover:rotate-[180deg] transition-transform"},null,-1))]),s("div",rn,[s("div",cn,[s("div",un,[d[2]||(d[2]=s("img",{src:ie,alt:"user",class:"w-[40px] h-[40p
1x] rounded-full flex-shrink-0"},null,-1)),s("div",pn,[s("div",dn,U(n(l).userName),1),s("div",fn,[s("span",mn,U(n(t)("user.accountPoints"))+" :",1),s("span",gn,U(n(o)),1)])])]),n(a).isVip?(w(),D(Y,{key:0},[d[3]||(d[3]=s("div",{class:"borderTop mt-[16px]"},null,-1)),s("div",hn,[s("div",vn,[s("span",xn,U(n(a).planName),1),s("span",wn,"("+U(n(L))+")",1)])])],64)):P("",!0),d[5]||(d[5]=s("div",{class:"borderTop mb-[12px] mt-[15px]"},null,-1)),C(F,{type:"primary",class:"w-full mb-[10px] !bg-[#306AF1] !hover:bg-[#409eff] h-[32px]",onClick:O},{default:k(()=>[X(U(n(a).isVip&&!n(a).isLegacyUser?n(t)("user.renew"):n(t)("user.becomeMember")),1)]),_:1}),s("div",bn,[(w(!0),D(Y,null,pe(n(h),A=>(w(),B(j,{key:A.name,to:A.path,class:"mx-[-8px] flex items-center text-[#061B40] gap-[8px] hover:text-[#306AF1] hover:bg-[#f7f8fa] mainRadius py-[6px] px-[8px]"},{default:k(()=>[s("i",{class:Ie(["iconfont","text-[20px]",A.iconfont])},null,2),s("span",_n,U(A.name),1),A.showUnread&&n(g)>0?(w(),D("span",yn," ("+U(n(g))+U(n(t)("user.unread"))+") ",1)):P("",!0)]),_:2},1032,["to"]))),128))]),d[6]||(d[6]=s("div",{class:"borderTop my-[10px]"},null,-1)),s("div",{class:"mx-[-8px] flex items-center text-[#061B40] gap-[8px] hover:text-[#306AF1] hover:bg-[#f7f8fa] mainRadius py-[6px] px-[8px] cursor-pointer",onClick:V},[d[4]||(d[4]=s("i",{class:"iconfont icon-dakai1 text-[20px]"},null,-1)),s("div",Cn,U(n(t)("login.loginOut")),1)])])])])):P("",!0),C(G,null,{default:k(()=>[!("isIframeWhiteListRoute"in v?v.isIframeWhiteListRoute:n(oe))(n(R).path)&&!("noIframeRoute"in v?v.noIframeRoute:n(Me))(n(R).path)?(w(),B(K,{key:0,isMainProject:!0})):P("",!0)]),_:1})])}}}),Ln=Ne(Un,[["__scopeId","data-v-7e6c5877"]]),Vn={key:0},kn=T({__name:"MobileUserBox",emits:["change"],setup(m,{emit:p}){const a=H(),{userInfo:t}=W(a),{t:e,locale:c}=z(),l=p,o=q(),g=()=>{l("change")},f=b(()=>[{title:e("user.account.title"),path:r(`${o.public.allDomain.wwwUrl}/user/account`,c.value,o.public.defaultLangCode),icon:"icon-gerenxinxi"},{title:e("user.submitManage"),path:r(`${o.public.allDomain.wwwUrl}/user/submitManage`,c.value,o.public.defaultLangCode),icon:"icon-shangchuan"},{title:e("user.history.title"),path:r(`${o.public.allDomain.wwwUrl}/user/history`,c.value,o.public.defaultLangCode),icon:"icon-lishi"},{title:e("user.order"),path:r(`${o.public.allDomain.wwwUrl}/user/order`,c.value,o.public.defaultLangCode),icon:"icon-MCP"},c.value==="zh"?{title:e("user.invoiceManagement"),path:r(`${o.public.allDomain.wwwUrl}/user/invoice`,c.value,o.public.defaultLangCode),icon:"icon-fapiao"}:null,{title:e("user.points"),path:r(`${o.public.allDomain.wwwUrl}/user/points`,c.value,o.public.defaultLangCode),icon:"icon-jifenmingxi"},{title:e("user.developer.title"),path:r(`${o.public.allDomain.wwwUrl}/user/developer`,c.value,o.public.defaultLangCode),icon:"icon-ceshi"},{title:e("user.coupon.title"),path:r(`${o.public.allDomain.wwwUrl}/user/coupon`,c.value,o.public.defaultLangCode),icon:"icon-youhuiquan"},{title:e("user.messageNotification"),path:r(`${o.public.allDomain.wwwUrl}/user/message`,c.value,o.public.defaultLangCode),icon:"icon-tixing"}].filter(L=>L)),i=b(()=>[{title:e("user.index"),path:"",langKey:"user.index",nameKey:"news",icon:"icon-youzhixinpin",children:f.value}]);return(L,h)=>{const S=Q("AMobileMenuUnified");return n(t).id?(w(),D("div",Vn,[h[0]||(h[0]=s("div",{class:"borderTop mb-[32px]"},null,-1)),(w(!0),D(Y,null,pe(n(i),V=>(w(),B(S,{key:V.path||V.title,item:V,onCloseMenu:g},null,8,["item"]))),128))])):P("",!0)}}}),Rn=""+new URL("headVip.DlYzLaxS.png",import.meta.url).href,$n={class:"hidden relative md:block"},Sn=["href"],Dn=["src"],In={class:"flex"},Mn={class:"md:hidden"},Pn={class:"hidden md:block"},zn=T({__name:"NewHeader",setup(m){const{$headerMenuList:p}=Be(),a=q(),{t,locale:e}=z();Ae();const c={src:Qe,alt:"AIBase",href:a.public.allDomain.wwwUrl},l=I(""),o=g=>{g.trim()&&(window==null||window.open(r(`${a.public.allDomain.wwwUrl}/search/${encodeURIComponent(g)}`,e.value,a.public.defaultLangCode),"_self"))};return(g,f)=>{const i=je,L=Ln,h=fe,S=Q("AMobileSearch"),V=Q("AExpandableSearch"),R=kn,$=Q("ANavigationBar");return w(),B($,{logoConfig:c,menuItems:n(p),showLanguageSelector:n(a).public.isCN!=="true"},{"language-selector":k(()=>[C(i)]),"user-area":k(()=>[C(h,null,{default:k(()=>[C(L)]),_:1})]),"right-area":k(()=>[s("div",$n,[s("a",{href:("addLanguageToUrl"in g?g.addLanguageToUrl:n(r))(`${n(a).public.allDomain.wwwUrl}/vip`,n(e),n(a).public.defaultLangCode),target:"_blank",class:"h-[32px] block text-nowrap bg-gradient-to-b from-[#ffe6cd] to-[#ffcc99] rounded-[2px] pl-[37px] pr-[8px] text-[#662200] text-[14px] leading-[22px] py-[5px]"},[s("img",{src:n(Rn),alt:"",class:"w-[31px] h-[31px] absolute top-[-6px] left-[6px]"}
1,null,8,Dn),X(" "+U(n(t)("menu.vipMember")),1)],8,Sn)]),s("div",In,[s("div",Mn,[C(S,{modelValue:n(l),"onUpdate:modelValue":f[0]||(f[0]=_=>ae(l)?l.value=_:null),placeholder:n(t)("search.placeholder"),onSearch:o},null,8,["modelValue","placeholder"])]),s("div",Pn,[C(V,{modelValue:n(l),"onUpdate:modelValue":f[1]||(f[1]=_=>ae(l)?l.value=_:null),placeholder:n(t)("search.placeholder"),onSearch:o},null,8,["modelValue","placeholder"])])])]),"left-menu-right":k(()=>[...f[2]||(f[2]=[s("div",{class:"mr-[16px]"},null,-1)])]),"mobile-language-selector":k(({closeMenu:_})=>[C(i,{onChange:_},null,8,["onChange"])]),"mobile-userCenter":k(({closeMenu:_})=>[C(R,{onChange:_},null,8,["onChange"])]),"mobile-user-area":k(()=>[C(h,null,{default:k(()=>[C(L)]),_:1})]),_:1},8,["menuItems","showLanguageSelector"])}}});export{zn as _};

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.