5 lines
26 KiB
JavaScript
5 lines
26 KiB
JavaScript
var fe=Object.defineProperty,ye=Object.defineProperties;var we=Object.getOwnPropertyDescriptors;var te=Object.getOwnPropertySymbols;var ke=Object.prototype.hasOwnProperty,$e=Object.prototype.propertyIsEnumerable;var ne=(e,t,s)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,b=(e,t)=>{for(var s in t||(t={}))ke.call(t,s)&&ne(e,s,t[s]);if(te)for(var s of te(t))$e.call(t,s)&&ne(e,s,t[s]);return e},P=(e,t)=>ye(e,we(t));var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var H=(e,t,s)=>new Promise((a,o)=>{var l=r=>{try{u(s.next(r))}catch(_){o(_)}},d=r=>{try{u(s.throw(r))}catch(_){o(_)}},u=r=>r.done?a(r.value):Promise.resolve(r.value).then(l,d);u((s=s.apply(e,t)).next())});import{d as F,r as f,w as be,v as xe,o as h,c as m,a as n,t as p,p as N,b as z,e as K,u as k,F as $,n as se,f as E,g as Ee,h as G,i as le,j as U,k as Fe,l as Se,m as D,q as L,s as Te}from"./vendor.js";var A1=Ce(X=>{const De=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const d of l.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function a(o){if(o.ep)return;o.ep=!0;const l=s(o);fetch(o.href,l)}};De();const x=window.L;var oe;const Be=((oe=window==null?void 0:window.ThemeDog)==null?void 0:oe.BaseURL)||"";var ae;const Me=((ae=window==null?void 0:window.ThemeDog)==null?void 0:ae.HostName)||"",ce=e=>Be+"/icons/"+e+".png",ie=()=>Me,re=()=>new Promise((e,t)=>{if(!x){t([]);return}x.require("ui").then(function(s){if(s.menu){window.onbeforeunload=o=>{s.menu.flushCache()};const a=(o,l,d)=>{let u=[],r=(d||0)+1,_=s.menu.getChildren(o);if(_.length==0||r>2)return[];for(let g=0;g<_.length;g++){let y={title:window._(_[g].title),name:_[g].name,href:window.L.url(l,_[g].name),level:r,paths:[],isActive:window.L.env.dispatchpath[r]==_[g].name,children:[]};y.paths.push(o.name,_[g].name),y.children=a(_[g],l+"/"+_[g].name,r),u.push(y)}return u};s.menu.load().then(function(){let o=s.menu.getChildren();for(let l=0;l<o.length;l++)if(o[l].order&&o[l].order,x.env.requestpath.length?o[l].name==x.env.requestpath[0]:l==0){const u=a(o[l],o[l].name,0);e(u)}})}else e([])})}),ue=()=>x.rpc.declare({object:"system",method:"board",expect:{}}),Ie=()=>x.rpc.declare({object:"system",method:"info",expect:{memory:{}}}),Le=()=>new Promise((e,t)=>{x.rpc.declare({object:"system",method:"info",expect:{localtime:0}})().then(a=>{e(a||0)}).catch(a=>{t(a)})}),Ne=()=>{window.L.network.getDevices().then(e=>{for(let t=0;t<e.length;t++)if(e[t].getCarrier())return!0;return!1})},ze=()=>new Promise((e,t)=>{try{window.L.network.getWANNetworks().then(s=>{for(let a=0;a<s.length;a++){const l=s[a].isUp();if(l){e(l);return}}e(!1)})}catch(s){t(s)}}),de=()=>window.L.rpc.declare({object:"system",method:"reboot"}),_e=()=>window.L.network.getHostHints(),Y=()=>new Promise((e,t)=>{try{x.require("network").then(s=>{s&&(s.getNetwork("wan").then(a=>{if(a){const o=a.getDevice();if(o)return e({up:o.getTXBytes(),down:o.getRXBytes()})}}),s.flushCache())})}catch(s){t(s)}});var Ae=Object.freeze(Object.defineProperty({__proto__:null,getIconBasePath:ce,getLOGO:ie,getNavMenus:re,getSystemInfoBoard:ue,getSystemInfoMemory:Ie,getSystemInfoLocaltime:Le,getNetworkDevices:Ne,getNetworksIsUp:ze,reboot:de,getNetworkHostHints:_e,getUpDownData:Y},Symbol.toStringTag,{value:"Module"}));const Oe=(e,t)=>H(X,null,function*(){return new Promise((s,a)=>H(X,null,function*(){try{const o=yield fetch(e,t),l=b({},o);l.data=yield o.json(),s(l)}catch(o){a(o)}}))}),J=(e,t)=>Oe(`/cgi-bin/luci/admin/themedog/api${e}`,t),ve={GET(){return J("/status",{method:"GET"})}},he={GET(){return J("/cpu",{method:"GET"})}},me={GET(){return J("/memory",{method:"GET"})}};var qe=Object.freeze(Object.defineProperty({__proto__:null,Status:ve,Cpu:he,Memory:me},Symbol.toStringTag,{value:"Module"}));b(b({},Ae),qe);var S=(e,t)=>{const s=e.__vccOpts||e;for(const[a,o]of t)s[a]=o;return s};const Q=e=>(N("data-v-20e97695"),e=e(),z(),e),Pe={class:"themedog-iframe"},He={class:"themedog-iframe_header"},je={class:"btns"},Ge=Q(()=>n("svg",{t:"1646852632231",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2159",width:"128",height:"128"},[n("path",{d:"M515.1 932C286 932 99.5 745.6 99.5 516.4c0-16.5 13.4-29.9 29.9-29.9s29.9 13.4 29.9 29.9c0 196.2 159.6 355.8 355.8 355.8 118.4 0 228.7-58.6 295-156.9 9.3-13.7 27.9-17.3 41.6-8.1 13.7 9.3 17.3 27.9 8.1 41.6C782.3 863.6 653.4 932 515.1 932zM900.9 546.3c-16.5 0-29.9-13.4-29.9-29.9 0-196.2-159.6-355.8-355.8-355.8-114 0-221.9 55.2-288.7 147.8-9.7 13.4-28.3 16.5-41.8 6.7-13.4-9.7-16.4-28.4-6.7-41.8 78-108 204-172.6 337.1-172.6 229.2 0 415.7 186.5 415.7 415.7 0 16.5-13.4 29.9-29.9 29.9z",fill:"#666666","p-id":"2160"}),n("path",{d:"M53 636c-5 0-10.1-1.3-14.7-3.9-14.4-8.2-19.4-26.4-11.3-40.8l69.2-121.9c4.5-7.9 12.4-13.4 21.4-14.8 9-1.5 18.2 1.3 24.9 7.5l108.3 99.2c12.2 11.2 13 30.1 1.8 42.3-11.2 12.2-30.1 13-42.3 1.8l-80.6-73.9L79 620.8c-5.5 9.7-15.6 15.2-26 15.2zM904.4 579.5c-7.4 0-14.6-2.7-20.1-7.8l-104.1-94.6c-12.2-11.1-13.1-30.1-2-42.3 11.1-12.2 30-13.1 42.3-2l76.3 69.3 47.4-84.2c8.1-14.4 26.3-19.6 40.8-11.4 14.4 8.1 19.5 26.4 11.4 40.8l-65.8 116.9c-4.5 8-12.3 13.4-21.3 14.9-1.7 0.3-3.3 0.4-4.9 0.4z",fill:"#666666","p-id":"2161"})],-1)),Ue=[Ge],We=Q(()=>n("svg",{t:"1646853987071",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3832",width:"128",height:"128"},[n("path",{d:"M864 448l-768 0C78.08 448 64 462.08 64 480 64 497.92 78.08 512 96 512l768 0C881.92 512 896 497.92 896 480 896 462.08 881.92 448 864 448z","p-id":"3833"})],-1)),Ve=[We],Re=Q(()=>n("svg",{t:"1646854000338",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3981",width:"128",height:"128"},[n("path",{d:"M557.312 513.248l265.28-263.904c12.544-12.48 12.608-32.704 0.128-45.248-12.512-12.576-32.704-12.608-45.248-0.128l-265.344 263.936-263.04-263.84C236.64 191.584 216.384 191.52 203.84 204 191.328 216.48 191.296 236.736 203.776 249.28l262.976 263.776L201.6 776.8c-12.544 12.48-12.608 32.704-0.128 45.248 6.24 6.272 14.464 9.44 22.688 9.44 8.16 0 16.32-3.104 22.56-9.312l265.216-263.808 265.44 266.24c6.24 6.272 14.432 9.408 22.656 9.408 8.192 0 16.352-3.136 22.592-9.344 12.512-12.48 12.544-32.704 0.064-45.248L557.312 513.248z","p-id":"3982"})],-1)),Ke=[Re],Ye={class:"themedog-iframe_body"},Xe=["src","task"],Je=F({props:{task:{type:Object,required:!0},i:{type:Number,required:!0},ontask:{type:String,required:!0},onHiddenTask:{type:Function,required:!0},onClearTask:{type:Function,required:!0},onOpenTask:{type:Function,required:!0}},setup(e){const t=e,s=f();f(!0);const a=f(0),o=d=>{if(s.value){const u=s.value;if(u.contentWindow){console.log(u.contentWindow);let r=document.createElement("style");r.setAttribute("rel","stylesheet"),r.innerHTML=`html,body{
|
|
background: none !important;
|
|
color-scheme: none !important;
|
|
}`,u.contentWindow.document.head.appendChild(r)}}if(t.task.href=="/cgi-bin/luci/admin/store"&&s.value){const u=s.value;u.contentWindow&&(u.contentWindow.onclick=r=>{l(r)})}},l=d=>{var u,r;if(d.target){const _=d.target;if(_.tagName=="A"&&_.className=="app-btn cbi-button cbi-button-apply"&&_.textContent=="\u6253\u5F00"){const g=d.composedPath();let y="",C="";const M=_.getAttribute("href")||"";if(g.length>2){const I=g[2];C=((u=I.querySelector(".app-title"))==null?void 0:u.getAttribute("title"))||"",y=((r=I.querySelector("span.app-name"))==null?void 0:r.textContent)||""}t.onOpenTask({title:y,name:C,href:M,paths:[],level:0,isActive:!1,children:[]}),d.preventDefault()}}};return(d,u)=>be((h(),m("div",Pe,[(h(),m("div",{class:"themedog-iframe_main",key:a.value},[n("div",He,[n("span",null,p(e.task.title),1),n("div",je,[n("button",{class:"btn-refresh",onClick:u[0]||(u[0]=r=>a.value++)},Ue),n("button",{class:"btn-full",onClick:u[1]||(u[1]=r=>e.onHiddenTask(e.i))},Ve),n("button",{class:"btn-close",onClick:u[2]||(u[2]=r=>e.onClearTask(e.i))},Ke)])]),n("div",Ye,[n("iframe",{class:"themedog-iframe_container",allowfullscreen:"true",mozallowfullscreen:"mozallowfullscreen",msallowfullscreen:"msallowfullscreen",oallowfullscreen:"oallowfullscreen",webkitallowfullscreen:"webkitallowfullscreen",src:e.task.href,task:e.task.href=="/cgi-bin/luci/admin/store",onLoad:o,ref_key:"el",ref:s},null,40,Xe)])]))],512)),[[xe,e.task.href==e.ontask]])}});var Qe=S(Je,[["__scopeId","data-v-20e97695"]]);const Ze=e=>{if(e)try{var t=new Date(Number(e)*1e3),s=t.getHours(),a=t.getMinutes();let o=t.getSeconds();return s<10&&(s=`0${s}`),a<10&&(a=`0${a}`),o<10&&(o=`0${o}`),`${s}:${a} ${o}`}catch(o){}return""},et=e=>{if(e)try{var t=new Date(Number(e)*1e3),s=t.getFullYear(),a=t.getMonth()+1,o=t.getDate();return s+"\u5E74"+a+"\u6708"+o+"\u65E5 "}catch(l){}return""},tt=e=>{if(e<1e3)return`${e}/B`;let s=1e3,a=0;for(let d=e/1e3;d>=1e3;d/=1e3)s*=1e3,a++;let o=["/KB","/MB","/GB","/TB","/PB","/EB"];return(e/100/(s/100)).toFixed(1)+o[a]},nt=e=>{if(e<1024)return""+e+"KB";let s=1024,a=0;for(let l=e/1024;l>=1024;l/=1024)s*=1024,a++;let o=["M","G","T","P","E"];return(e/100/(s/100)).toFixed(2)+o[a]};var st=Object.freeze(Object.defineProperty({__proto__:null,dateForm:Ze,dateYearDayForm:et,byteToSize:tt,numberToSize:nt},Symbol.toStringTag,{value:"Module"})),j=b({},st);const pe=e=>(N("data-v-38a7653c"),e=e(),z(),e),ot={class:"total"},at={class:"memory"},lt=pe(()=>n("span",null,"CPU",-1)),ct={class:"progress"},it={class:"memory"},rt=pe(()=>n("span",null,"\u5185\u5B58",-1)),ut={class:"progress"},dt={class:"up"},_t={class:"date"},vt=F({setup(e){const t=f(""),s=f(""),a=f(),o=f(),l=f(0),d=f(0),u=()=>{r(),_(),setInterval(()=>{_()},5e3)},r=()=>{ve.GET().then(c=>{var v;if(((v=c==null?void 0:c.data)==null?void 0:v.success)==!0){const i=c.data.result;if(i!=null){let w=i.locallTime||0;s.value=j.dateForm(`${w}`),t.value=j.dateYearDayForm(`${w}`),setInterval(()=>{s.value=j.dateForm(`${w++}`)},1e3)}}})},_=()=>H(this,null,function*(){he.GET().then(c=>{var v;if(((v=c==null?void 0:c.data)==null?void 0:v.success)==!0){const i=c.data.result;i!=null&&(a.value=i)}}),me.GET().then(c=>{var v;if(((v=c==null?void 0:c.data)==null?void 0:v.success)==!0){const i=c.data.result;i!=null&&(o.value=i)}});try{let c=0,v=0,i=0,w=0;const q=yield Y();q&&(c=q.up||0,v=q.down||0);const R=yield g();R&&(i=R.up||0,w=R.down||0);const Z=i-c,ee=w-v;Z>=0&&ee>=0?(l.value=Z,d.value=ee):(l.value=0,d.value=0)}catch(c){}}),g=()=>new Promise((c,v)=>{setTimeout(()=>{const i=Y();c(i)},1e3)});u();const y=K(()=>{if(o.value==null)return null;const c=o.value;return c.available!=null&&c.total!=null?(100-c.available/c.total*100).toFixed(2):0}),C=K(()=>{if(a.value==null)return null;const c=a.value;return c.available!=null&&c.total!=null?(100-c.available/c.total*100).toFixed(2):0}),M=j.byteToSize,I=c=>{let v={height:`${c}%`};return c>=80?v.background="#ff0000":c>=60?v.background="#ff9900":c>=40&&(v.background="#3eff08"),v};return(c,v)=>(h(),m("div",ot,[k(C)!=null?(h(),m($,{key:0},[n("div",at,[n("span",null,p(k(C))+"%",1),lt]),n("div",ct,[n("em",{style:se(I(k(C)))},null,4)])],64)):E("",!0),k(y)!=null?(h(),m($,{key:1},[n("div",it,[n("span",null,p(k(y))+"%",1),rt]),n("div",ut,[n("em",{style:se(I(k(y)))},null,4)])],64)):E("",!0),n("div",dt,[n("span",null,p(k(M)(l.value))+" | \u4E0A\u4F20",1),n("span",null,p(k(M)(d.value))+" | \u4E0B\u8F7D",1)]),n("div",_t,[n("span",null,p(s.value),1),n("span",null,p(t.value),1)])]))}});var ht=S(vt,[["__scopeId","data-v-38a7653c"]]);const mt={class:"themedog-action dialog-enter-active"},pt={class:"themedog-action_container"},gt=F({props:{Close:{type:Function,required:!0}},setup(e){return(t,s)=>(h(),m("div",mt,[n("div",{class:"themedog-action_bg",onClick:s[0]||(s[0]=a=>e.Close())}),n("div",pt,[Ee(t.$slots,"default",{},void 0,!0)])]))}});var ge=S(gt,[["__scopeId","data-v-e6901050"]]);const A=e=>(N("data-v-459235ec"),e=e(),z(),e),ft=A(()=>n("div",{class:"action_key"},"kernel:",-1)),yt={class:"action_value"},wt=A(()=>n("div",{class:"action_key"},"hostname:",-1)),kt={class:"action_value"},$t=A(()=>n("div",{class:"action_key"},"system:",-1)),Ct={class:"action_value"},bt=A(()=>n("div",{class:"action_key"},"model:",-1)),xt={class:"action_value"},Et=A(()=>n("div",{class:"action_key"},"board_name:",-1)),Ft={class:"action_value"},St=A(()=>n("div",{class:"action_key"},"release:",-1)),Tt={class:"action_value"},Dt=F({props:{Close:{type:Function,required:!0}},setup(e){const t=f();return(()=>{ue()().then(o=>{o&&(t.value=o)})})(),(a,o)=>(h(),G(ge,{Close:e.Close},{default:le(()=>{var l,d,u,r,_,g,y;return[n("li",null,[ft,n("div",yt,p((l=t.value)==null?void 0:l.kernel),1)]),n("li",null,[wt,n("div",kt,p((d=t.value)==null?void 0:d.hostname),1)]),n("li",null,[$t,n("div",Ct,p((u=t.value)==null?void 0:u.system),1)]),n("li",null,[bt,n("div",xt,p((r=t.value)==null?void 0:r.model),1)]),n("li",null,[Et,n("div",Ft,p((_=t.value)==null?void 0:_.board_name),1)]),n("li",null,[St,n("div",Tt,p((y=(g=t.value)==null?void 0:g.release)==null?void 0:y.description),1)])]}),_:1},8,["Close"]))}});var Bt=S(Dt,[["__scopeId","data-v-459235ec"]]),Mt=e=>{const t=document.createElement("div");document.body.appendChild(t);const s=U(Bt,P(b({},e),{Close:()=>{a()}}));s.mount(t);const a=()=>{s.unmount(),t.remove()};return{Close:a}};const W=e=>(N("data-v-2b644944"),e=e(),z(),e),It={key:0,class:"loading icon"},Lt=W(()=>n("svg",{t:"1631799919469",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3453",width:"128",height:"128"},[n("path",{d:"M522.695111 1.991111c-26.339556 0.170667-47.416889 21.475556-47.672889 48.753778-0.284444 26.453333-0.056889 52.963556-0.056889 79.445333 0 27.249778-0.369778 54.528 0.113778 81.777778 0.483556 27.050667 22.016 47.132444 49.351111 46.904889a47.786667 47.786667 0 0 0 47.729778-47.445333c0.284444-53.76 0.284444-107.52-0.028444-161.251556-0.170667-27.676444-21.902222-48.355556-49.436445-48.184889m-195.896889 88.092445c-8.334222-14.222222-21.646222-21.276444-38.314666-21.333334-35.128889 0-56.576 36.949333-38.968889 68.152889a11616.995556 11616.995556 0 0 0 78.961777 137.614222 44.942222 44.942222 0 0 0 61.838223 16.896c21.304889-12.202667 29.667556-38.968889 17.379555-60.871111-26.453333-47.104-53.560889-93.866667-80.896-140.458666m-228.693333 234.524444c44.316444 25.799111 88.746667 51.342222 133.176889 76.970667 6.712889 3.896889 13.681778 6.912 21.703111 6.428444 20.138667 0.142222 35.953778-11.946667 41.301333-31.573333 5.006222-18.261333-2.673778-36.721778-20.224-46.990222-44.629333-26.026667-89.372444-51.882667-134.115555-77.710223-22.528-12.999111-47.815111-7.025778-59.818667 13.909334-12.231111 21.248-4.977778 45.624889 17.948444 58.965333m34.161778 235.975111c26.396444 0 52.821333 0.199111 79.217778-0.085333 23.409778-0.256 39.139556-16.412444 38.798222-39.139556-0.341333-21.617778-16.924444-37.347556-39.594666-37.376-51.655111-0.056889-103.310222-0.056889-154.965334 0.028445-24.177778 0.056889-40.704 15.985778-40.561778 38.684444 0.142222 22.186667 16.583111 37.745778 40.192 37.859556 25.656889 0.142222 51.285333 0.028444 76.913778 0m151.722667 100.238222a34.247111 34.247111 0 0 0-46.876445-12.942222 13764.778667 13764.778667 0 0 0-139.008 80.583111c-11.093333 6.485333-16.327111 16.867556-16.497777 25.372444 0.085333 30.549333 27.249778 47.957333 50.403555 35.072 47.160889-26.197333 93.724444-53.475556 140.145778-80.924444 17.180444-10.154667 21.504-30.378667 11.832889-47.160889m91.875555 101.660444c-14.250667-4.067556-27.619556 1.422222-35.84 15.644445a24375.466667 24375.466667 0 0 0-77.312 134.485333c-10.012444 17.550222-5.859556 35.669333 9.784889 45.027556 16.014222 9.557333 34.247111 4.039111 44.714667-13.994667 25.543111-44.088889 50.915556-88.263111 76.373333-132.352 3.299556-5.745778 5.688889-11.690667 5.745778-14.933333 0-17.834667-9.272889-29.866667-23.466667-33.877334m147.456 44.288c-16.384 0.085333-27.306667 11.918222-27.448888 30.151111-0.142222 25.372444-0.028444 50.716444-0.028445 76.060445h-0.085333c0 26.112-0.113778 52.252444 0.056889 78.364444 0.113778 18.261333 11.064889 30.065778 27.448889 30.208 16.952889 0.142222 28.046222-11.832889 28.103111-30.748444 0.113778-51.086222 0.142222-102.172444 0.056889-153.258667 0-18.773333-11.207111-30.862222-28.103112-30.776889m177.208889-26.112c-7.509333-12.8-21.902222-16.014222-33.792-8.874666a23.722667 23.722667 0 0 0-8.533333 32.995555c26.282667 46.279111 52.906667 92.330667 79.644444 138.353778 4.494222 7.765333 11.633778 11.946667 20.906667 11.804444 18.545778-0.142222 30.520889-19.342222 21.219556-35.868444-26.026667-46.392889-52.650667-92.444444-79.473778-138.410667m239.957333-41.187555c-45.283556-26.254222-90.595556-52.48-135.964444-78.648889-4.693333-2.702222-9.728-4.323556-15.36-2.958222-9.102222 2.247111-14.933333 8.049778-16.497778 17.095111-1.877333 10.894222 3.84 18.204444 12.885333 23.438222 29.809778 17.180444 59.562667 34.417778 89.344 51.598222 15.217778 8.789333 30.236444 17.976889 45.738667 26.225778 14.677333 7.793778 31.061333-2.048 31.061333-18.033778-0.056889-8.448-4.096-14.592-11.207111-18.716444m48.867556-234.638222c-24.888889-0.085333-49.749333 0-74.609778 0v-0.085334c-25.258667 0-50.517333-0.056889-75.776 0.028445-13.425778 0.056889-20.963556 6.343111-21.162667 17.294222-0.199111 11.150222 7.082667 17.521778 20.679111 17.550222 50.488889 0.113778 100.977778 0.142222 151.495112 0.085333 13.368889 0 21.191111-6.485333 21.390222-17.152 0.227556-10.808889-8.106667-17.664-22.016-17.720888m-187.960889-127.146667c45.084444-26.026667 90.140444-52.110222 135.168-78.222222 4.864-2.844444 8.248889-6.855111 8.135111-12.942223-0.142222-11.036444-11.207111-17.436444-21.504-11.548444-45.511111 26.055111-90.851556 52.394667-136.135111 78.819556-7.68 4.494222-10.524444 11.52-5.575111 19.569777 4.835556 7.850667 12.088889 8.817778 19.911111 4.323556m-122.311111-115.114667c5.205333-0.256 8.220444-3.413333 10.609778-7.651555 4.920889-8.647111 10.040889-17.208889 14.990222-25.827556 20.48-35.555556 40.931556-71.025778 61.297778-106.609778 5.091556-8.874667 3.015111-16.668444-4.778667-18.517333-7.68-1.848889-10.894222 3.697778-14.051556 9.159111l-68.778666 119.495111c-2.844444 4.977778-6.030222 9.870222-8.305778 15.104-3.128889 7.196444 1.678222 14.648889 9.045333 14.848","p-id":"3454"})],-1)),Nt=[Lt],zt={key:1,class:"success icon"},At=W(()=>n("svg",{t:"1632451272305",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2204",width:"128",height:"128"},[n("path",{d:"M1001.305115 275.874141 431.461709 845.718571c-28.221762 28.221762-73.977875 28.221762-102.20066 0L22.661116 539.116591c-28.222785-28.221762-28.222785-73.979922 0-102.20066 28.221762-28.221762 73.977875-28.221762 102.20066 0l255.500115 255.502162 518.743588-518.743588c28.221762-28.221762 73.977875-28.221762 102.199637 0C1029.5279 201.89422 1029.5279 247.65238 1001.305115 275.874141z","p-id":"2205"})],-1)),Ot=[At],qt={key:2,class:"error icon"},Pt=W(()=>n("svg",{t:"1632451325789",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2204",width:"128",height:"128"},[n("path",{d:"M823.04 840.32 524.16 540.16l296.32-294.4c12.8-12.8 12.8-33.28 0-45.44-12.8-12.8-33.28-12.8-46.08 0L478.08 494.08 184.96 200.32c-12.8-12.8-33.28-12.8-45.44 0s-12.8 33.28 0 45.44l292.48 293.76-302.72 300.8c-12.8 12.8-12.8 33.28 0 45.44 12.8 12.8 33.28 12.8 46.08 0l302.72-300.16 299.52 300.16c12.8 12.8 33.28 12.8 45.44 0C835.2 873.6 835.2 853.12 823.04 840.32z","p-id":"2205"})],-1)),Ht=[Pt],jt={key:3,class:"warning icon"},Gt=W(()=>n("svg",{t:"1632451401172",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1638",width:"128",height:"128"},[n("path",{d:"M512 1021.45211835a60.32985613 60.32985613 0 1 1 60.32985613-60.32985611 60.32985613 60.32985613 0 0 1-60.32985613 60.32985611z m86.85823451-924.97400238L572.32985613 719.80283775a60.32985613 60.32985613 0 0 1-120.65971226 0l-26.52837838-623.32472178c-0.16758294-2.22885301-0.28489098-4.49122263-0.284891-6.78710881a87.14312551 87.14312551 0 0 1 174.28625102 0c0 2.2958862-0.11730806 4.5582558-0.284891 6.78710881z","p-id":"1639"})],-1)),Ut=[Gt],Wt=F({props:{type:String,message:String,Close:Function},setup(e){const t=e,s=f(!1);Fe(()=>{s.value=!0});const a=()=>{(t==null?void 0:t.type)!="loading"&&(s.value=!1,t.Close&&t.Close())};return(o,l)=>s.value?(h(),m("div",{key:0,class:"toast",onClick:l[1]||(l[1]=d=>a())},[e.type=="loading"?(h(),m("div",It,Nt)):e.type=="success"?(h(),m("div",zt,Ot)):e.type=="error"?(h(),m("div",qt,Ht)):e.type=="warning"?(h(),m("div",jt,Ut)):E("",!0),n("div",{class:"message",onClick:l[0]||(l[0]=Se(()=>{},["stop"]))},p(e.message),1)])):E("",!0)}});var Vt=S(Wt,[["__scopeId","data-v-2b644944"]]);const O=new Map,B=e=>{const t=U(Vt,P(b({},e),{Close:()=>{a()}})),s=document.createElement("div");document.body.append(s),t.mount(s);const a=()=>{s.remove(),O.get(t._uid)&&O.delete(t._uid)};return e.type=="loading"&&O.set(t._uid,{Close:a}),(e==null?void 0:e.duration)==0||((e==null?void 0:e.duration)>0?setTimeout(()=>{a()},e==null?void 0:e.duration):setTimeout(()=>{a()},3e3)),{Close:a}},T=e=>B(e);T.Loading=e=>B({type:"loading",message:e||"\u52A0\u8F7D\u4E2D...",duration:0});T.Success=e=>B({type:"success",message:e});T.Error=e=>B({type:"error",message:e});T.Warning=e=>B({type:"warning",message:e});T.Message=e=>B({message:e});T.Message=e=>B({message:e});T.Clear=()=>{O.forEach((e,t)=>{e.Close(),O.delete(t)})};const Rt={class:"action_key"},Kt={class:"action_value"},Yt=F({props:{Close:{type:Function,required:!0}},setup(e){const t=f(!1),s=f();return(()=>{try{_e().then(o=>{o.hosts&&(s.value=o.hosts),t.value=!0})}catch(o){T.Warning(`${o}`)}})(),(o,l)=>t.value?(h(),G(ge,{key:0,Close:e.Close},{default:le(()=>[(h(!0),m($,null,D(s.value,(d,u,r)=>(h(),m("li",null,[n("div",Rt,p(u),1),n("div",Kt,p(d),1)]))),256))]),_:1},8,["Close"])):E("",!0)}});var Xt=S(Yt,[["__scopeId","data-v-07c17f4b"]]),Jt=e=>{const t=document.createElement("div");document.body.appendChild(t);const s=U(Xt,P(b({},e),{Close:()=>{a()}}));s.mount(t);const a=()=>{s.unmount(),t.remove()};return{Close:a}};const Qt=e=>(N("data-v-1bac9a5a"),e=e(),z(),e),Zt={class:"system-tool_container"},e1={class:"system-tool_container-nav"},t1=["onClick"],n1={class:"system-tool_container-btns"},s1=Qt(()=>n("a",{href:"/cgi-bin/luci/admin/logout"},"\u6CE8\u9500\u767B\u5F55",-1)),o1=F({emits:["click"],setup(e,{emit:t}){const s=()=>{t("click")},a=f([{title:"\u7CFB\u7EDF\u4FE1\u606F",func:()=>{l()}},{title:"\u7F51\u7EDC\u53D1\u73B0",func:()=>{d()}}]),o=()=>{if(!confirm("\u662F\u5426\u91CD\u542F\u8BBE\u5907?"))return;de()().then(()=>{})},l=()=>{Mt({})},d=()=>{Jt({})};return(u,r)=>(h(),m("div",{class:"system-tool",onClick:r[1]||(r[1]=_=>s())},[n("div",Zt,[n("div",e1,[(h(!0),m($,null,D(a.value,_=>(h(),m("a",{onClick:_.func},p(_.title),9,t1))),256))]),n("div",n1,[n("a",{onClick:r[0]||(r[0]=_=>o())},"\u91CD\u542F\u8BBE\u5907"),s1])])]))}});var a1=S(o1,[["__scopeId","data-v-1bac9a5a"]]);const V=e=>(N("data-v-1062d47a"),e=e(),z(),e),l1={class:"themedog-main"},c1=V(()=>n("div",{class:"themedog-header"},null,-1)),i1={class:"themedog-body"},r1={class:"themedog-container"},u1={class:"themedog-container_nav"},d1={class:"nav-list_header"},_1={class:"nav-list_children"},v1=["onClick"],h1={class:"nav-list_item-icon"},m1=["src"],p1={class:"nav-list_item-text"},g1={class:"nav-list_header"},f1={class:"nav-list_children"},y1=["onClick"],w1={class:"nav-list_item-icon"},k1=["src"],$1={class:"nav-list_item-text"},C1=["onClick"],b1={class:"nav-list_item-icon"},x1=["src"],E1={class:"nav-list_item-text"},F1={class:"themedog-footer"},S1=V(()=>n("em",null,[n("i")],-1)),T1={class:"logo"},D1={class:"tasks"},B1=["title","onClick"],M1=V(()=>n("i",null,null,-1)),I1=V(()=>n("div",{class:"auto"},null,-1)),L1=F({setup(e){const t=f(ie()),s=f([]),a=f(!1),o=f([]),l=f(""),d=K(()=>{let c=[];for(let v=0;v<s.value.length;v++){const i=s.value[v];switch(i.name){case"quickstart":case"network_guide":case"store":c.push(i);break}}return{title:"\u5FEB\u901F\u4F7F\u7528",name:"use",href:"",paths:[],level:0,isActive:!1,children:c}}),u=c=>{switch(c.name){case"logout":return!0;case"quickstart":case"network_guide":case"store":return!0}return!1},r=ce,_=c=>{if(c.target){const v=c.target;v.src=r("app-icon")}},g=c=>{y(c)},y=c=>{for(let v=0;v<o.value.length;v++)if(c.href==o.value[v].href){l.value==c.href?l.value="":l.value=c.href;return}o.value.push(c),l.value=c.href},C=c=>{o.value[c],o.value.splice(c,1),l.value=""},M=c=>{l.value=""};return(()=>{re().then(c=>{s.value=c})})(),(c,v)=>(h(),m($,null,[n("div",l1,[c1,n("div",i1,[n("div",r1,[n("div",u1,[k(d).children.length>0?(h(),m("ul",{key:0,class:L(["nav-list",k(d).name])},[n("div",d1,p(k(d).title),1),n("div",_1,[(h(!0),m($,null,D(k(d).children,i=>(h(),m("a",{class:L(["nav-list_item",i.name]),onClick:w=>g(i)},[n("div",h1,[n("img",{src:k(r)(i.name),alt:"\u56FE\u6807\u8D70\u4E22\u4E86\uFF5E",onError:_},null,40,m1)]),n("div",p1,p(i.title),1)],10,v1))),256))])],2)):E("",!0),(h(!0),m($,null,D(s.value,i=>(h(),m($,null,[u(i)?E("",!0):(h(),m("ul",{key:0,class:L(["nav-list",i.name])},[n("div",g1,p(i.title),1),n("div",f1,[i.children!=null&&i.children.length>0?(h(!0),m($,{key:0},D(i.children,w=>(h(),m("a",{class:L(["nav-list_item",w.name]),onClick:q=>g(w)},[n("div",w1,[n("img",{src:k(r)(w.name),alt:"\u56FE\u6807\u8D70\u4E22\u4E86\uFF5E",onError:_},null,40,k1)]),n("div",$1,p(w.title),1)],10,y1))),256)):(h(),m("a",{key:1,class:L(["nav-list_item",i.name]),onClick:w=>g(i)},[n("div",b1,[n("img",{src:k(r)(i.name),alt:"\u56FE\u6807\u8D70\u4E22\u4E86\uFF5E",onError:_},null,40,x1)]),n("div",E1,p(i.title),1)],10,C1))])],2))],64))),256))])])]),a.value?(h(),G(a1,{key:0,onClick:v[0]||(v[0]=i=>a.value=!1)})):E("",!0),n("div",F1,[n("div",{class:"system",onClick:v[1]||(v[1]=i=>a.value=!a.value)},[S1,n("div",T1,p(t.value),1)]),n("div",D1,[(h(!0),m($,null,D(o.value,i=>(h(),m("a",{class:L({on:i.href==l.value}),title:i.title,onClick:w=>g(i)},[M1,n("span",null,p(i.title),1)],10,B1))),256))]),I1,Te(ht)])]),(h(!0),m($,null,D(o.value,(i,w)=>(h(),G(Qe,{task:i,i:w,onHiddenTask:M,onClearTask:C,onOpenTask:y,ontask:l.value},null,8,["task","i","ontask"]))),256))],64))}});var N1=S(L1,[["__scopeId","data-v-1062d47a"]]);const z1=()=>{const e=document.createElement("div");document.body.appendChild(e),e.id="themedog",U(N1).mount(e)};z1()});export default A1();
|