app/assets/chunks/theme.DIQpIyPS.js

26 lines
81 KiB
JavaScript
Raw Normal View History

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/VPLocalSearchBox.oW4Nqtwr.js","assets/chunks/framework.C4_mTacX.js"])))=>i.map(i=>d[i]);
import{u as Me,d as g,o as i,c as p,r as f,n as D,a as J,t as V,b as w,w as h,e as b,T as Ee,_ as $,i as Nt,f as Ct,g as Be,h as I,j as u,k as r,p as R,l as j,m as ae,q as Ve,s as N,v as Y,x as ge,y as te,z as ue,A as Oe,B as At,C as Mt,D as re,F as x,E as z,G as Ze,H as be,I as S,J as W,K as et,L as ke,M as ee,N as de,O as Et,P as ye,Q as Te,R as Bt,S as tt,U as $e,V as Ot,W as Ht,X as xt,Y as ot,Z as nt,$ as Dt,a0 as Ft,a1 as Rt,a2 as st,a3 as jt,a4 as Ut,a5 as zt,a6 as ne,a7 as se,a8 as Ie}from"./framework.C4_mTacX.js";const Gt={en:{stats:"Stats",online:"Online",offline:"Offline",total:"Total",fetching:"Fetching",stars:"Stars",forks:"Forks",issues:"Issues",prs:"Pull Requests",visitors:"Visitors",size:"Size",plugins:"Plugins",resources:"Resources",pluginStore:"Plugin Store",pluginStoreDesc:"Content from the LightSnow Plugin Store, LightSnow supports NoneBot through the lpnonebot plugin, and references some NoneBot plugins",liteyukiOnly:"Liteyuki Only",search:"Search",resourceStore:"Resources Store",thx_contributors:"Thanks the following contributors!",easterEgg:"Congratulations on finding the Easter egg!",publishPlugin:"Publish Plugin",publishRes:"Publish Resource",closeButtonText:"Close",submitButtonText:"Submit",resName:"Name",resDesc:"Description",resAuthor:"Author",resLink:"Download Link",resHomepage:"Homepage",resNameText:"Example: Kawaii Style Theme",resDescText:"Example: A kawaii style and color theme",resAuthorText:"Usually the github username, Example: yanyongyu",resLinkText:"Direct download link, usually zip package link",resHomepageText:'Optional, can be the name of the git platform repository"'},zh:{stats:"统计信息",online:"在线",offline:"离线",total:"实例",fetching:"获取中",stars:"星星",forks:"分叉",issues:"议题",prs:"拉取请求",visitors:"访客",size:"大小",plugins:"插件",resources:"主题资源",store:"商店",pluginStore:"插件商店",pluginStoreDesc:"内容来自轻雪插件商店轻雪通过lpnonebot插件对NoneBot实现支持引用了部分NoneBot插件",liteyukiOnly:"仅轻雪",search:"搜索",resourceStore:"资源商店",thx_contributors:"感谢以下贡献者!",easterEgg:"恭喜你发现了彩蛋!",publishPlugin:"发布插件",publishRes:"发布资源",closeButtonText:"关闭",submitButtonText:"提交",resName:"名称",resDesc:"描述",resAuthor:"作者",resLink:"下载链接",resHomepage:"主页",resNameText:"示例:可爱风格主题",resDescText:"示例:一个可爱风格和配色的主题",resAuthorText:"通常为github用户名示例yanyongyu",resLinkText:"直接下载链接通常为zip包链接",resHomepageText:"可选可为git平台仓库名"}};let _e={};function at(t,e){return t=He(t),Gt[t][e]}function He(t){return t.includes("-")?t.split("-")[0]:t}function Kt(){const t=He(Me().site.value.lang);for(let e in _e)_e[e].value=at(t,e)}function F(t){const e=He(Me().site.value.lang);return _e[t]=at(e,t),_e[t]||t}const Wt=g({__name:"VPBadge",props:{text:{},type:{default:"tip"}},setup(t){return(e,o)=>(i(),p("span",{class:D(["VPBadge",e.type])},[f(e.$slots,"default",{},()=>[J(V(e.text),1)])],2))}}),qt={key:0,class:"VPBackdrop"},Jt=g({__name:"VPBackdrop",props:{show:{type:Boolean}},setup(t){return(e,o)=>(i(),w(Ee,{name:"fade"},{default:h(()=>[e.show?(i(),p("div",qt)):b("",!0)]),_:1}))}}),Yt=$(Jt,[["__scopeId","data-v-7e9fed24"]]),O=Me;function Xt(t,e){let o,s=!1;return()=>{o&&clearTimeout(o),s?o=setTimeout(t,e):(t(),(s=!0)&&setTimeout(()=>s=!1,e))}}function Ne(t){return/^\//.test(t)?t:`/${t}`}function xe(t){const{pathname:e,search:o,hash:s,protocol:n}=new URL(t,"http://a.com");if(Nt(t)||t.startsWith("#")||!n.startsWith("http")||!Ct(e))return t;const{site:a}=O(),c=e.endsWith("/")||e.endsWith(".html")?t:t.replace(/(?:(^\.+)\/)?.*$/,`$1${e.replace(/(\.md)?$/,a.value.cleanUrls?"":".html")}${o}${s}`);return Be(c)}function pe({correspondingLink:t=!1}={}){const{site:e,localeIndex:o,page:s,theme:n,hash:a}=O(),c=I(()=>{var d,v;return{label:(d=e.value.locales[o.value])==null?void 0:d.label,link:((v=e.value.locales[o.value])==null?void 0:v.link)||(o.value==
* vue-router v4.4.3
* (c) 2024 Eduardo San Martin Morote
* @license MIT
*/var Je;(function(t){t.pop="pop",t.push="push"})(Je||(Je={}));var Ye;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Ye||(Ye={}));var Xe;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(Xe||(Xe={}));const ki=Symbol("");function yi(t,e,o){const s=()=>{t[e].delete(o)};ue(s),Ut(s),zt(()=>{t[e].add(o)}),t[e].add(o)}function $i(t){const e=de(ki,{}).value;e&&yi(e,"updateGuards",t)}const Si=t=>(R("data-v-2391887b"),t=t(),j(),t),wi={class:"stats-bar-content"},Pi={class:"stats-bar"},Li={class:"stats-info"},Vi={class:"stats-title"},Ti={class:"sections"},Ii=["href"],Ni={class:"section-tab"},Ci={class:"text"},Ai={class:"number"},Mi=Si(()=>u("div",{class:"starmap"},[u("iframe",{src:"https://starmap.liteyuki.icu/",width:"100%",height:"300px",class:"gamma"})],-1)),Ei=g({__name:"StatsBar",setup(t){const{Layout:e}=mt;let o=null;const s={total:{name:"total",color:"#00a6ff",value:N(-1),link:qe},online:{name:"online",color:"#7eff7e",value:N(-1),link:qe},stars:{name:"stars",color:"#ffcc00",value:N(-1),link:`${le}/stargazers`},forks:{name:"forks",color:"#ff6600",value:N(-1),link:`${le}/forks`},issues:{name:"issues",color:"#ff0000",value:N(-1),link:`${le}/issues`},prs:{name:"prs",color:"#f15df1",value:N(-1),link:`${le}/pulls`},plugins:{name:"plugins",color:"#a766ff",value:N(-1),link:"./store/plugin"},resources:{name:"resources",color:"#5a54fa",value:N(-1),link:"./store/resource"},visitors:{name:"visitors",color:"#00a6ff",value:N(-1),link:le}};async function n(){[s.online.value.value,s.total.value.value,s.plugins.value.value,s.resources.value.value,s.visitors.value.value,o]=await Promise.all([ie.getOnline(),ie.getTotal(),ie.getPluginNum(),ie.getResourceNum(),ie.getVisitCount(),ie.getGithubStats()]),s.stars.value.value=(o==null?void 0:o.stars)||0,s.forks.value.value=(o==null?void 0:o.forks)||0,s.issues.value.value=(o==null?void 0:o.issues)||0,s.prs.value.value=(o==null?void 0:o.prs)||0}function a(c){return c.value.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}return te(()=>{const c=setInterval(n,1e4);n(),gi(),ue(()=>{clearInterval(c)})}),$i(()=>{Kt()}),console.log(` _ _ _ _ _ ____ _
| | (_) | | | (_) _ \\ | |
| | _| |_ ___ _ _ _ _| | ___| |_) | ___ | |_
| | | | __/ _ \\ | | | | | | |/ / | _ < / _ \\| __|
| |____| | || __/ |_| | |_| | <| | |_) | (_) | |_
|______|_|\\__\\___|\\__, |\\__,_|_|\\_\\_|____/ \\___/ \\__|
__/ |
|___/ `),console.log(F("easterEgg")),(c,l)=>(i(),w(r(e),null,{"home-features-before":h(()=>[u("div",wi,[u("div",Pi,[u("div",Li,[u("div",Vi,V(r(F)("stats")),1),u("div",Ti,[(i(!0),p(x,null,z(Object.values(s),d=>(i(),p("div",{key:d.name,class:"section"},[u("a",{href:d.link,target:"_blank"},[u("div",Ni,[u("span",{class:"dot",style:ye({backgroundColor:d.color})},null,4),u("span",Ci,V(r(F)(d.name)),1)]),u("div",Ai,V(a(d.value)),1)],8,Ii)]))),128))])]),Mi])])]),_:1}))}}),Qe=$(Ei,[["__scopeId","data-v-2391887b"]]);var Bi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gt={exports:{}};/*!
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/(function(t,e){(function(s,n){t.exports=n()})(Bi,function(){return function(){var o={686:function(a,c,l){l.d(c,{default:function(){return It}});var d=l(279),v=l.n(d),m=l(370),_=l.n(m),k=l(817),C=l.n(k);function T(B){try{return document.execCommand(B)}catch{return!1}}var M=function(L){var P=C()(L);return T("cut"),P},y=M;function U(B){var L=document.documentElement.getAttribute("dir")==="rtl",P=document.createElement("textarea");P.style.fontSize="12pt",P.style.border="0",P.style.padding="0",P.style.margin="0",P.style.position="absolute",P.style[L?"right":"left"]="-9999px";var A=window.pageYOffset||document.documentElement.scrollTop;return P.style.top="".concat(A,"px"),P.setAttribute("readonly",""),P.value=B,P}var G=function(L,P){var A=U(L);P.container.appendChild(A);var E=C()(A);return T("copy"),A.remove(),E},Q=function(L){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},A="";return typeof L=="string"?A=G(L,P):L instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(L==null?void 0:L.type)?A=G(L.value,P):(A=C()(L),T("copy")),A},oe=Q;function Z(B){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Z=function(P){return typeof P}:Z=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},Z(B)}var bt=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},P=L.action,A=P===void 0?"copy":P,E=L.container,H=L.target,K=L.text;if(A!=="copy"&&A!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(H!==void 0)if(H&&Z(H)==="object"&&H.nodeType===1){if(A==="copy"&&H.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(A==="cut"&&(H.hasAttribute("readonly")||H.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(K)return oe(K,{container:E});if(H)return A==="cut"?y(H):oe(H,{container:E})},kt=bt;function ce(B){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ce=function(P){return typeof P}:ce=function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},ce(B)}function yt(B,L){if(!(B instanceof L))throw new TypeError("Cannot call a class as a function")}function Ke(B,L){for(var P=0;P<L.length;P++){var A=L[P];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(B,A.key,A)}}function $t(B,L,P){return L&&Ke(B.prototype,L),P&&Ke(B,P),B}function St(B,L){if(typeof L!="function"&&L!==null)throw new TypeError("Super expression must either be null or a function");B.prototype=Object.create(L&&L.prototype,{constructor:{value:B,writable:!0,configurable:!0}}),L&&we(B,L)}function we(B,L){return we=Object.setPrototypeOf||function(A,E){return A.__proto__=E,A},we(B,L)}function wt(B){var L=Vt();return function(){var A=fe(B),E;if(L){var H=fe(this).constructor;E=Reflect.construct(A,arguments,H)}else E=A.apply(this,arguments);return Pt(this,E)}}function Pt(B,L){return L&&(ce(L)==="object"||typeof L=="function")?L:Lt(B)}function Lt(B){if(B===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return B}function Vt(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function fe(B){return fe=Object.setPrototypeOf?Object.getPrototypeOf:function(P){return P.__proto__||Object.getPrototypeOf(P)},fe(B)}function Pe(B,L){var P="data-clipboard-".concat(B);if(L.hasAttribute(P))return L.getAttribute(P)}var Tt=function(B){St(P,B);var L=wt(P);function P(A,E){var H;return yt(this,P),H=L.call(this),H.resolveOptions(E),H.listenClick(A),H}return $t(P,[{key:"resolveOptions",value:function(){var E=argume
name: ${a.value.name}
desc: ${a.value.desc}
author: ${a.value.author}
homepage: ${a.value.homepage}
link: ${a.value.link}
---
`);const _=`${le}/issues/new?title=${v}&body=${m}`;window.open(_,"_blank")};return(v,m)=>(i(),p("div",Cl,[u("h1",null,V(r(F)("resourceStore")),1),u("div",Al,[ne(u("input",{class:"item-search-box",type:"text",placeholder:r(F)("search"),"onUpdate:modelValue":m[0]||(m[0]=_=>Ie(s)?s.value=_:s=_)},null,8,Ml),[[se,r(s)]])]),u("div",El,[u("button",{class:"store-button publish-button",onClick:c},V(r(F)("publishRes")),1)]),u("div",Bl,[(i(!0),p(x,null,z(r(e),_=>(i(),w(Pl,{key:_.id,item:_},null,8,["item"]))),128))]),S(Il,{class:"pub-window","is-visible":n.value},{default:h(()=>[u("h2",null,V(r(F)("publishRes")),1),u("form",{onSubmit:st(d,["prevent"])},[u("label",Ol,V(r(F)("resName")),1),ne(u("input",{type:"text",id:"name","onUpdate:modelValue":m[1]||(m[1]=_=>r(a).name=_),placeholder:r(F)("resNameText")},null,8,Hl),[[se,r(a).name]]),u("label",xl,V(r(F)("resDesc")),1),ne(u("input",{type:"text",id:"desc","onUpdate:modelValue":m[2]||(m[2]=_=>r(a).desc=_),placeholder:r(F)("resDescText")},null,8,Dl),[[se,r(a).desc]]),u("label",Fl,V(r(F)("resAuthor")),1),ne(u("input",{type:"text",id:"author","onUpdate:modelValue":m[3]||(m[3]=_=>r(a).author=_),placeholder:r(F)("resAuthorText")},null,8,Rl),[[se,r(a).author]]),u("label",jl,V(r(F)("resLink")),1),ne(u("input",{type:"text",id:"link","onUpdate:modelValue":m[4]||(m[4]=_=>r(a).link=_),placeholder:r(F)("resLinkText")},null,8,Ul),[[se,r(a).link]]),u("label",zl,V(r(F)("resHomepage")),1),ne(u("input",{type:"text",id:"homepage","onUpdate:modelValue":m[5]||(m[5]=_=>r(a).homepage=_),placeholder:r(F)("resHomepageText")},null,8,Gl),[[se,r(a).homepage]]),u("div",Kl,[u("button",{class:"pub-option close",type:"button",onClick:l},V(r(F)("closeButtonText")),1),u("button",Wl,V(r(F)("submitButtonText")),1)])],32)]),_:1},8,["is-visible"])]))}}),Jl=$(ql,[["__scopeId","data-v-3e2a2e07"]]),Ql={extends:mt,enhanceApp({app:t}){t.component("StatsBar",Qe),t.component("PluginStore",pl),t.component("ResStore",Jl)},Layout:Qe};export{Ql as R,Ma as c,F as g,O as u};