Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-22 20:09:19 +08:00
v3-admin-vite/static/index-42656b61.js

2 lines
30 KiB
JavaScript

import{d as e,r as t,g as a,a as l,w as n,s as r,b as s,u as o,c as i,e as c,f as u,o as d,h as p,i as f,j as h,k as m,T as v,l as g,m as b,n as w,K as y,_,p as k,q as x,F as C,t as E,v as S,x as V,y as A,z as T,E as I,A as R,B as F,C as P,D as M,G as D,H as z,I as L,J as O,L as q,M as N,N as j,O as W,P as H,Q as U,R as $,S as B,U as X,V as G,W as Y,X as J,Y as Z,Z as K,$ as Q,a0 as ee,a1 as te,a2 as ae,a3 as le,a4 as ne}from"./index-94c4eedc.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang-f9ae6648.js";var se=(e=>(e[e.Mobile=0]="Mobile",e[e.Desktop=1]="Desktop",e))(se||{});const oe="closed";const ie=e("app",(()=>{const e=t({opened:a()!==oe,withoutAnimation:!1}),s=l(se.Desktop);n((()=>e.opened),(e=>function(e){r(e?"opened":oe)}(e)));return{device:s,sidebar:e,toggleSidebar:t=>{e.opened=!e.opened,e.withoutAnimation=t},closeSidebar:t=>{e.opened=!1,e.withoutAnimation=t},toggleDevice:e=>{s.value=e}}})),ce={showSettings:!0,showTagsView:!0,fixedHeader:!0,showSidebarLogo:!0,showNotify:!0,showThemeSwitch:!0,showScreenfull:!0,showGreyMode:!1,showColorWeakness:!1},ue=e("settings",(()=>{const e={};for(const[t,a]of Object.entries(ce))e[t]=l(a);return e})),de={class:"app-main"},pe={class:"app-scrollbar"},fe=_(s({__name:"AppMain",setup(e){const t=o(),a=i(),l=c((()=>t.path));return(e,t)=>{const n=u("router-view");return d(),p("section",de,[f("div",pe,[h(n,null,{default:m((({Component:e})=>[h(v,{name:"el-fade-in",mode:"out-in"},{default:m((()=>[(d(),g(y,{include:w(a).cachedViews},[(d(),g(b(e),{key:l.value}))],1032,["include"]))])),_:2},1024)])),_:1})])])}}}),[["__scopeId","data-v-1f5f0253"]]);function he(e,t){void 0===t&&(t={});for(var a=function(e){for(var t=[],a=0;a<e.length;){var l=e[a];if("*"!==l&&"+"!==l&&"?"!==l)if("\\"!==l)if("{"!==l)if("}"!==l)if(":"!==l)if("("!==l)t.push({type:"CHAR",index:a,value:e[a++]});else{var n=1,r="";if("?"===e[o=a+1])throw new TypeError('Pattern cannot start with "?" at '.concat(o));for(;o<e.length;)if("\\"!==e[o]){if(")"===e[o]){if(0==--n){o++;break}}else if("("===e[o]&&(n++,"?"!==e[o+1]))throw new TypeError("Capturing groups are not allowed at ".concat(o));r+=e[o++]}else r+=e[o++]+e[o++];if(n)throw new TypeError("Unbalanced pattern at ".concat(a));if(!r)throw new TypeError("Missing pattern at ".concat(a));t.push({type:"PATTERN",index:a,value:r}),a=o}else{for(var s="",o=a+1;o<e.length;){var i=e.charCodeAt(o);if(!(i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122||95===i))break;s+=e[o++]}if(!s)throw new TypeError("Missing parameter name at ".concat(a));t.push({type:"NAME",index:a,value:s}),a=o}else t.push({type:"CLOSE",index:a,value:e[a++]});else t.push({type:"OPEN",index:a,value:e[a++]});else t.push({type:"ESCAPED_CHAR",index:a++,value:e[a++]});else t.push({type:"MODIFIER",index:a,value:e[a++]})}return t.push({type:"END",index:a,value:""}),t}(e),l=t.prefixes,n=void 0===l?"./":l,r="[^".concat(function(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}(t.delimiter||"/#?"),"]+?"),s=[],o=0,i=0,c="",u=function(e){if(i<a.length&&a[i].type===e)return a[i++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var l=a[i],n=l.type,r=l.index;throw new TypeError("Unexpected ".concat(n," at ").concat(r,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};i<a.length;){var f=u("CHAR"),h=u("NAME"),m=u("PATTERN");if(h||m){var v=f||"";-1===n.indexOf(v)&&(c+=v,v=""),c&&(s.push(c),c=""),s.push({name:h||o++,prefix:v,suffix:"",pattern:m||r,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)c+=g;else if(c&&(s.push(c),c=""),u("OPEN")){v=p();var b=u("NAME")||"",w=u("PATTERN")||"",y=p();d("CLOSE"),s.push({name:b||(w?o++:""),pattern:b&&!w?r:w,prefix:v,suffix:y,modifier:u("MODIFIER")||""})}else d("END")}}return s}function me(e,t){return function(e,t){void 0===t&&(t={});var a=function(e){return e&&e.sensitive?"":"i"}(t),l=t.encode,n=void 0===l?function(e){return e}:l,r=t.validate,s=void 0===r||r,o=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:".concat(e.pattern,")$"),a)}));return function(t){for(var a="",l=0;l<e.length;l++){var r=e[l];if("string"!=typeof r){var i=t?t[r.name]:void 0,c="?"===r.modifier||"*"===r.modifier,u="*"===r.modifier||"+"===r.modifier;if(Array.isArray(i)){if(!u)throw new TypeError('Expected "'.concat(r.name,'" to not repeat, but got an array'));if(0===i.length){if(c)continue;throw new TypeError('Expected "'.concat(r.name,'" to not be empty'))}for(var d=0;d<i.length;d++){var p=n(i[d],r);if(s&&!o[l].test(p))throw new TypeError('Expected all "'.concat(r.name,'" to match "').concat(r.pattern,'", but got "').concat(p,'"'));a+=r.prefix+p+r.suffix}}else if("string"!=typeof i&&"number"!=typeof i){if(!c){var f=u?"an array":"a string";throw new TypeError('Expected "'.concat(r.name,'" to be ').concat(f))}}else{p=n(String(i),r);if(s&&!o[l].test(p))throw new TypeError('Expected "'.concat(r.name,'" to match "').concat(r.pattern,'", but got "').concat(p,'"'));a+=r.prefix+p+r.suffix}}else a+=r}return a}}(he(e,t),t)}const ve={key:0,class:"no-redirect"},ge=["onClick"],be=_(s({__name:"index",setup(e){const t=o(),a=k(),r=l([]),s=()=>{r.value=t.matched.filter((e=>e.meta&&e.meta.title&&!1!==e.meta.breadcrumb))},i=e=>{const{redirect:l,path:n}=e;l?a.push(l):a.push((e=>{const{params:a}=t;return me(e)(a)})(n))};return n((()=>t.path),(e=>{e.startsWith("/redirect/")||s()})),s(),(e,t)=>{const a=u("el-breadcrumb-item"),l=u("el-breadcrumb");return d(),g(l,{class:"app-breadcrumb"},{default:m((()=>[(d(!0),p(C,null,x(r.value,((e,t)=>(d(),g(a,{key:e.path},{default:m((()=>["noRedirect"===e.redirect||t===r.value.length-1?(d(),p("span",ve,E(e.meta.title),1)):(d(),p("a",{key:1,onClick:S((t=>i(e)),["prevent"])},E(e.meta.title),9,ge))])),_:2},1024)))),128))])),_:1})}}}),[["__scopeId","data-v-8ff70186"]]),we=_(s({__name:"index",props:{isActive:{type:Boolean,default:!1}},emits:["toggleClick"],setup(e,{emit:t}){const a=e,l=()=>{t("toggleClick")};return(e,t)=>{const n=u("el-icon");return d(),p("div",{onClick:l},[h(n,{size:20,class:"icon"},{default:m((()=>[a.isActive?(d(),g(w(V),{key:0})):(d(),g(w(A),{key:1}))])),_:1})])}}}),[["__scopeId","data-v-4662adce"]]),ye=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],_e=(()=>{if("undefined"==typeof document)return!1;const e=ye[0],t={};for(const a of ye){if((null==a?void 0:a[1])in document){for(const[l,n]of a.entries())t[e[l]]=n;return t}}return!1})(),ke={change:_e.fullscreenchange,error:_e.fullscreenerror};let xe={request:(e=document.documentElement,t)=>new Promise(((a,l)=>{const n=()=>{xe.off("change",n),a()};xe.on("change",n);const r=e[_e.requestFullscreen](t);r instanceof Promise&&r.then(n).catch(l)})),exit:()=>new Promise(((e,t)=>{if(!xe.isFullscreen)return void e();const a=()=>{xe.off("change",a),e()};xe.on("change",a);const l=document[_e.exitFullscreen]();l instanceof Promise&&l.then(a).catch(t)})),toggle:(e,t)=>xe.isFullscreen?xe.exit():xe.request(e,t),onchange(e){xe.on("change",e)},onerror(e){xe.on("error",e)},on(e,t){const a=ke[e];a&&document.addEventListener(a,t,!1)},off(e,t){const a=ke[e];a&&document.removeEventListener(a,t,!1)},raw:_e};Object.defineProperties(xe,{isFullscreen:{get:()=>Boolean(document[_e.fullscreenElement])},element:{enumerable:!0,get:()=>document[_e.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>Boolean(document[_e.fullscreenEnabled])}}),_e||(xe={isEnabled:!1});const Ce=xe,Ee=_(s({__name:"index",props:{element:{type:String,default:"html"},openTips:{type:String,default:"全屏"},exitTips:{type:String,default:"退出全屏"}},setup(e){const t=e,a=l(t.openTips),n=l(!1),r=()=>{const e=document.querySelector(t.element)||void 0;Ce.isEnabled?Ce.toggle(e):I.warning("您的浏览器无法工作")},s=()=>{n.value=Ce.isFullscreen,a.value=Ce.isFullscreen?t.exitTips:t.openTips};return T((e=>{Ce.on("change",s),e((()=>{Ce.isEnabled&&Ce.off("change",s)}))})),(e,t)=>{const l=u("svg-icon"),s=u("el-tooltip");return d(),p("div",{onClick:r},[h(s,{effect:"dark",content:a.value,placement:"bottom"},{default:m((()=>[h(l,{name:n.value?"fullscreen-exit":"fullscreen"},null,8,["name"])])),_:1},8,["content"])])}}}),[["__scopeId","data-v-b8786e3f"]]),Se={class:"card-header"},Ve={class:"card-title"},Ae={class:"card-time"},Te={key:0,class:"card-avatar"},Ie=["src"],Re={class:"card-body"},Fe=_(s({__name:"NotifyList",props:{list:{type:Object,required:!0}},setup(e){const t=e;return(e,a)=>{const l=u("el-empty"),n=u("el-tag"),r=u("el-card");return 0===t.list.length?(d(),g(l,{key:0})):(d(!0),p(C,{key:1},x(t.list,((e,t)=>(d(),g(r,{key:t,shadow:"never",class:"card-container"},{header:m((()=>[f("div",Se,[f("div",null,[f("span",null,[f("span",Ve,E(e.title),1),e.extra?(d(),g(n,{key:0,type:e.status,effect:"plain",size:"small"},{default:m((()=>[R(E(e.extra),1)])),_:2},1032,["type"])):F("",!0)]),f("div",Ae,E(e.datetime),1)]),e.avatar?(d(),p("div",Te,[f("img",{src:e.avatar,width:"34"},null,8,Ie)])):F("",!0)])])),default:m((()=>[f("div",Re,E(e.description??"No Data"),1)])),_:2},1024)))),128))}}}),[["__scopeId","data-v-f3302799"]]),Pe=[{avatar:"https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png",title:"V3 Admin Vite 上线啦",datetime:"半年前",description:"一个免费开源的中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element Plus、Pinia 和 Vite 等主流技术"},{avatar:"https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png",title:"V3 Admin 上线啦",datetime:"一年前",description:"一个中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element Plus 和 Pinia"}],Me=[{avatar:"https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png",title:"来自楚门的世界",description:"如果再也不能见到你,祝你早安、午安和晚安",datetime:"1998-06-05"},{avatar:"https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png",title:"来自大话西游",description:"如果非要在这份爱上加上一个期限,我希望是一万年",datetime:"1995-02-04"},{avatar:"https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png",title:"来自龙猫",description:"心存善意,定能途遇天使",datetime:"1988-04-16"}],De=[{title:"任务名称",description:"这家伙很懒,什么都没留下",extra:"未开始",status:"info"},{title:"任务名称",description:"这家伙很懒,什么都没留下",extra:"进行中",status:""},{title:"任务名称",description:"这家伙很懒,什么都没留下",extra:"已超时",status:"danger"}],ze={class:"notify"},Le={class:"notify-history"},Oe=_(s({__name:"index",setup(e){const t=c((()=>n.value.reduce(((e,t)=>e+t.list.length),0))),a=l("通知"),n=l([{name:"通知",type:"primary",list:Pe},{name:"消息",type:"danger",list:Me},{name:"待办",type:"warning",list:De}]),r=()=>{I.success(`跳转到${a.value}历史页面`)};return(e,l)=>{const s=u("el-icon"),o=u("el-tooltip"),i=u("el-badge"),c=u("el-scrollbar"),v=u("el-tab-pane"),b=u("el-tabs"),y=u("el-button"),_=u("el-popover");return d(),p("div",ze,[h(_,{placement:"bottom",width:350,trigger:"click"},{reference:m((()=>[h(i,{value:t.value,max:99,hidden:0===t.value},{default:m((()=>[h(o,{effect:"dark",content:"消息通知",placement:"bottom"},{default:m((()=>[h(s,{size:20},{default:m((()=>[h(w(P))])),_:1})])),_:1})])),_:1},8,["value","hidden"])])),default:m((()=>[h(b,{modelValue:a.value,"onUpdate:modelValue":l[0]||(l[0]=e=>a.value=e),class:"demo-tabs",stretch:""},{default:m((()=>[(d(!0),p(C,null,x(n.value,((e,t)=>(d(),g(v,{name:e.name,key:t},{label:m((()=>[R(E(e.name)+" ",1),h(i,{value:e.list.length,max:99,type:e.type},null,8,["value","type"])])),default:m((()=>[h(c,{height:"400px"},{default:m((()=>[h(Fe,{list:e.list},null,8,["list"])])),_:2},1024)])),_:2},1032,["name"])))),128))])),_:1},8,["modelValue"]),f("div",Le,[h(y,{link:"",onClick:r},{default:m((()=>[R("查看"+E(a.value)+"历史",1)])),_:1})])])),_:1})])}}}),[["__scopeId","data-v-50089150"]]),qe={class:"navigation-bar"},Ne={class:"right-menu"},je={class:"right-menu-avatar"},We={target:"_blank",href:"https://juejin.cn/post/7089377403717287972"},He={target:"_blank",href:"https://github.com/un-pany/v3-admin-vite"},Ue={target:"_blank",href:"https://gitee.com/un-pany/v3-admin-vite"},$e=(e=>(z("data-v-ab7a6f93"),e=e(),L(),e))((()=>f("span",{style:{display:"block"}},"退出登录",-1))),Be=_(s({__name:"index",setup(e){const t=k(),a=ie(),l=ue(),n=M(),r=c((()=>a.sidebar)),s=c((()=>l.showNotify)),o=c((()=>l.showThemeSwitch)),i=c((()=>l.showScreenfull)),v=()=>{a.toggleSidebar(!1)},b=()=>{n.logout(),t.push("/login")};return(e,t)=>{const a=u("el-avatar"),l=u("el-dropdown-item"),c=u("el-dropdown-menu"),y=u("el-dropdown");return d(),p("div",qe,[h(we,{"is-active":r.value.opened,class:"hamburger",onToggleClick:v},null,8,["is-active"]),h(be,{class:"breadcrumb"}),f("div",Ne,[i.value?(d(),g(Ee,{key:0,class:"right-menu-item"})):F("",!0),o.value?(d(),g(re,{key:1,class:"right-menu-item"})):F("",!0),s.value?(d(),g(Oe,{key:2,class:"right-menu-item"})):F("",!0),h(y,{class:"right-menu-item"},{dropdown:m((()=>[h(c,null,{default:m((()=>[f("a",We,[h(l,null,{default:m((()=>[R("中文文档")])),_:1})]),f("a",He,[h(l,null,{default:m((()=>[R("GitHub")])),_:1})]),f("a",Ue,[h(l,null,{default:m((()=>[R("Gitee")])),_:1})]),h(l,{divided:"",onClick:b},{default:m((()=>[$e])),_:1})])),_:1})])),default:m((()=>[f("div",je,[h(a,{icon:w(D),size:30},null,8,["icon"]),f("span",null,E(w(n).username),1)])])),_:1})])])}}}),[["__scopeId","data-v-ab7a6f93"]]),Xe=e=>(z("data-v-711d466d"),e=e(),L(),e),Ge={class:"drawer-container"},Ye=Xe((()=>f("h3",{class:"drawer-title"},"系统布局配置",-1))),Je={class:"drawer-item"},Ze=Xe((()=>f("span",null,"显示标签栏",-1))),Ke={class:"drawer-item"},Qe=Xe((()=>f("span",null,"显示侧边栏 Logo",-1))),et={class:"drawer-item"},tt=Xe((()=>f("span",null,"固定 Header",-1))),at={class:"drawer-item"},lt=Xe((()=>f("span",null,"显示消息通知",-1))),nt={class:"drawer-item"},rt=Xe((()=>f("span",null,"显示切换主题按钮",-1))),st={class:"drawer-item"},ot=Xe((()=>f("span",null,"显示全屏按钮",-1))),it={class:"drawer-item"},ct=Xe((()=>f("span",null,"显示灰色模式",-1))),ut={class:"drawer-item"},dt=Xe((()=>f("span",null,"显示色弱模式",-1))),pt=_(s({__name:"index",setup(e){const t=ue();return(e,a)=>{const l=u("el-switch");return d(),p("div",Ge,[f("div",null,[Ye,f("div",Je,[Ze,h(l,{modelValue:w(t).showTagsView,"onUpdate:modelValue":a[0]||(a[0]=e=>w(t).showTagsView=e),class:"drawer-switch"},null,8,["modelValue"])]),f("div",Ke,[Qe,h(l,{modelValue:w(t).showSidebarLogo,"onUpdate:modelValue":a[1]||(a[1]=e=>w(t).showSidebarLogo=e),class:"drawer-switch"},null,8,["modelValue"])]),f("div",et,[tt,h(l,{modelValue:w(t).fixedHeader,"onUpdate:modelValue":a[2]||(a[2]=e=>w(t).fixedHeader=e),class:"drawer-switch"},null,8,["modelValue"])]),f("div",at,[lt,h(l,{modelValue:w(t).showNotify,"onUpdate:modelValue":a[3]||(a[3]=e=>w(t).showNotify=e),class:"drawer-switch"},null,8,["modelValue"])]),f("div",nt,[rt,h(l,{modelValue:w(t).showThemeSwitch,"onUpdate:modelValue":a[4]||(a[4]=e=>w(t).showThemeSwitch=e),class:"drawer-switch"},null,8,["modelValue"])]),f("div",st,[ot,h(l,{modelValue:w(t).showScreenfull,"onUpdate:modelValue":a[5]||(a[5]=e=>w(t).showScreenfull=e),class:"drawer-switch"},null,8,["modelValue"])]),f("div",it,[ct,h(l,{modelValue:w(t).showGreyMode,"onUpdate:modelValue":a[6]||(a[6]=e=>w(t).showGreyMode=e),class:"drawer-switch"},null,8,["modelValue"])]),f("div",ut,[dt,h(l,{modelValue:w(t).showColorWeakness,"onUpdate:modelValue":a[7]||(a[7]=e=>w(t).showColorWeakness=e),class:"drawer-switch"},null,8,["modelValue"])])])])}}}),[["__scopeId","data-v-711d466d"]]),ft=e=>/^(https?:|mailto:|tel:)/.test(e),ht=["href"],mt=s({__name:"SidebarItemLink",props:{to:{type:String,required:!0}},setup(e){const t=e;return(e,a)=>{const l=u("router-link");return w(ft)(t.to)?(d(),p("a",{key:0,href:t.to,target:"_blank",rel:"noopener"},[O(e.$slots,"default")],8,ht)):(d(),g(l,{key:1,to:t.to},{default:m((()=>[O(e.$slots,"default")])),_:3},8,["to"]))}}});function vt(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function gt(e,t){for(var a,l="",n=0,r=-1,s=0,o=0;o<=e.length;++o){if(o<e.length)a=e.charCodeAt(o);else{if(47===a)break;a=47}if(47===a){if(r===o-1||1===s);else if(r!==o-1&&2===s){if(l.length<2||2!==n||46!==l.charCodeAt(l.length-1)||46!==l.charCodeAt(l.length-2))if(l.length>2){var i=l.lastIndexOf("/");if(i!==l.length-1){-1===i?(l="",n=0):n=(l=l.slice(0,i)).length-1-l.lastIndexOf("/"),r=o,s=0;continue}}else if(2===l.length||1===l.length){l="",n=0,r=o,s=0;continue}t&&(l.length>0?l+="/..":l="..",n=2)}else l.length>0?l+="/"+e.slice(r+1,o):l=e.slice(r+1,o),n=o-r-1;r=o,s=0}else 46===a&&-1!==s?++s:s=-1}return l}var bt={resolve:function(){for(var e,t="",a=!1,l=arguments.length-1;l>=-1&&!a;l--){var n;l>=0?n=arguments[l]:(void 0===e&&(e=process.cwd()),n=e),vt(n),0!==n.length&&(t=n+"/"+t,a=47===n.charCodeAt(0))}return t=gt(t,!a),a?t.length>0?"/"+t:"/":t.length>0?t:"."},normalize:function(e){if(vt(e),0===e.length)return".";var t=47===e.charCodeAt(0),a=47===e.charCodeAt(e.length-1);return 0!==(e=gt(e,!t)).length||t||(e="."),e.length>0&&a&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return vt(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,t=0;t<arguments.length;++t){var a=arguments[t];vt(a),a.length>0&&(void 0===e?e=a:e+="/"+a)}return void 0===e?".":bt.normalize(e)},relative:function(e,t){if(vt(e),vt(t),e===t)return"";if((e=bt.resolve(e))===(t=bt.resolve(t)))return"";for(var a=1;a<e.length&&47===e.charCodeAt(a);++a);for(var l=e.length,n=l-a,r=1;r<t.length&&47===t.charCodeAt(r);++r);for(var s=t.length-r,o=n<s?n:s,i=-1,c=0;c<=o;++c){if(c===o){if(s>o){if(47===t.charCodeAt(r+c))return t.slice(r+c+1);if(0===c)return t.slice(r+c)}else n>o&&(47===e.charCodeAt(a+c)?i=c:0===c&&(i=0));break}var u=e.charCodeAt(a+c);if(u!==t.charCodeAt(r+c))break;47===u&&(i=c)}var d="";for(c=a+i+1;c<=l;++c)c!==l&&47!==e.charCodeAt(c)||(0===d.length?d+="..":d+="/..");return d.length>0?d+t.slice(r+i):(r+=i,47===t.charCodeAt(r)&&++r,t.slice(r))},_makeLong:function(e){return e},dirname:function(e){if(vt(e),0===e.length)return".";for(var t=e.charCodeAt(0),a=47===t,l=-1,n=!0,r=e.length-1;r>=1;--r)if(47===(t=e.charCodeAt(r))){if(!n){l=r;break}}else n=!1;return-1===l?a?"/":".":a&&1===l?"//":e.slice(0,l)},basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');vt(e);var a,l=0,n=-1,r=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var s=t.length-1,o=-1;for(a=e.length-1;a>=0;--a){var i=e.charCodeAt(a);if(47===i){if(!r){l=a+1;break}}else-1===o&&(r=!1,o=a+1),s>=0&&(i===t.charCodeAt(s)?-1==--s&&(n=a):(s=-1,n=o))}return l===n?n=o:-1===n&&(n=e.length),e.slice(l,n)}for(a=e.length-1;a>=0;--a)if(47===e.charCodeAt(a)){if(!r){l=a+1;break}}else-1===n&&(r=!1,n=a+1);return-1===n?"":e.slice(l,n)},extname:function(e){vt(e);for(var t=-1,a=0,l=-1,n=!0,r=0,s=e.length-1;s>=0;--s){var o=e.charCodeAt(s);if(47!==o)-1===l&&(n=!1,l=s+1),46===o?-1===t?t=s:1!==r&&(r=1):-1!==t&&(r=-1);else if(!n){a=s+1;break}}return-1===t||-1===l||0===r||1===r&&t===l-1&&t===a+1?"":e.slice(t,l)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var a=t.dir||t.root,l=t.base||(t.name||"")+(t.ext||"");return a?a===t.root?a+l:a+e+l:l}("/",e)},parse:function(e){vt(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;var a,l=e.charCodeAt(0),n=47===l;n?(t.root="/",a=1):a=0;for(var r=-1,s=0,o=-1,i=!0,c=e.length-1,u=0;c>=a;--c)if(47!==(l=e.charCodeAt(c)))-1===o&&(i=!1,o=c+1),46===l?-1===r?r=c:1!==u&&(u=1):-1!==r&&(u=-1);else if(!i){s=c+1;break}return-1===r||-1===o||0===u||1===u&&r===o-1&&r===s+1?-1!==o&&(t.base=t.name=0===s&&n?e.slice(1,o):e.slice(s,o)):(0===s&&n?(t.name=e.slice(1,r),t.base=e.slice(1,o)):(t.name=e.slice(s,r),t.base=e.slice(s,o)),t.ext=e.slice(r,o)),s>0?t.dir=e.slice(0,s-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};bt.posix=bt;const wt=q(bt),yt={key:2},_t=_(s({__name:"SidebarItem",props:{item:{type:Object,required:!0},isCollapse:{type:Boolean,default:!1},isFirstLevel:{type:Boolean,default:!0},basePath:{type:String,default:""}},setup(e){const t=e,a=c((()=>t.item.meta&&t.item.meta.alwaysShow)),l=c((()=>{if(t.item.children){return t.item.children.filter((e=>!(e.meta&&e.meta.hidden))).length}return 0})),n=c((()=>{if(l.value>1)return null;if(t.item.children)for(const e of t.item.children)if(!e.meta||!e.meta.hidden)return e;return{...t.item,path:""}})),r=e=>ft(e)?e:ft(t.basePath)?t.basePath:wt.resolve(t.basePath,e);return(e,l)=>{var s;const o=u("svg-icon"),i=u("el-menu-item"),c=u("sidebar-item",!0),f=u("el-sub-menu");return(null==(s=t.item.meta)?void 0:s.hidden)?F("",!0):(d(),p("div",{key:0,class:j({"simple-mode":t.isCollapse,"first-level":t.isFirstLevel})},[a.value||!n.value||n.value.children?(d(),g(f,{key:1,index:r(t.item.path),teleported:""},{title:m((()=>[t.item.meta&&t.item.meta.svgIcon?(d(),g(o,{key:0,name:t.item.meta.svgIcon},null,8,["name"])):t.item.meta&&t.item.meta.elIcon?(d(),g(b(t.item.meta.elIcon),{key:1,class:"el-icon"})):F("",!0),t.item.meta&&t.item.meta.title?(d(),p("span",yt,E(t.item.meta.title),1)):F("",!0)])),default:m((()=>[t.item.children?(d(!0),p(C,{key:0},x(t.item.children,(e=>(d(),g(c,{key:e.path,item:e,"is-collapse":t.isCollapse,"is-first-level":!1,"base-path":r(e.path)},null,8,["item","is-collapse","base-path"])))),128)):F("",!0)])),_:1},8,["index"])):(d(),p(C,{key:0},[n.value.meta?(d(),g(mt,{key:0,to:r(n.value.path)},{default:m((()=>[h(i,{index:r(n.value.path)},N({default:m((()=>[n.value.meta.svgIcon?(d(),g(o,{key:0,name:n.value.meta.svgIcon},null,8,["name"])):n.value.meta.elIcon?(d(),g(b(n.value.meta.elIcon),{key:1,class:"el-icon"})):F("",!0)])),_:2},[n.value.meta.title?{name:"title",fn:m((()=>[R(E(n.value.meta.title),1)])),key:"0"}:void 0]),1032,["index"])])),_:1},8,["to"])):F("",!0)],64))],2))}}}),[["__scopeId","data-v-b4c53ae2"]]),kt=e=>(z("data-v-7415e5ef"),e=e(),L(),e),xt=kt((()=>f("img",{src:"/v3-admin-vite/static/logo-cc70e06e.png",class:"sidebar-logo"},null,-1))),Ct=kt((()=>f("img",{src:"/v3-admin-vite/static/logo-text-1-b6b0364d.png",class:"sidebar-logo-text"},null,-1))),Et=_(s({__name:"SidebarLogo",props:{collapse:{type:Boolean,default:!0}},setup(e){const t=e;return(e,a)=>{const l=u("router-link");return d(),p("div",{class:j(["sidebar-logo-container",{collapse:t.collapse}])},[h(v,{name:"sidebar-logo-fade"},{default:m((()=>[t.collapse?(d(),g(l,{key:"collapse",to:"/"},{default:m((()=>[xt])),_:1})):(d(),g(l,{key:"expand",to:"/"},{default:m((()=>[Ct])),_:1}))])),_:1})],2)}}}),[["__scopeId","data-v-7415e5ef"]]),St=e=>{let t="";try{t=getComputedStyle(document.documentElement).getPropertyValue(e)}catch(a){console.error(a)}return t},Vt=_(s({__name:"index",setup(e){const t=St("--v3-sidebar-menu-bg-color"),a=St("--v3-sidebar-menu-text-color"),l=St("--v3-sidebar-menu-active-text-color"),n=o(),r=ie(),s=W(),i=ue(),{showSidebarLogo:f}=H(i),v=c((()=>{const{meta:e,path:t}=n;return(null==e?void 0:e.activeMenu)?e.activeMenu:t})),b=c((()=>!r.sidebar.opened));return(e,n)=>{const r=u("el-menu"),o=u("el-scrollbar");return d(),p("div",{class:j({"has-logo":w(f)})},[w(f)?(d(),g(Et,{key:0,collapse:b.value},null,8,["collapse"])):F("",!0),h(o,{"wrap-class":"scrollbar-wrapper"},{default:m((()=>[h(r,{"default-active":v.value,collapse:b.value,"background-color":w(t),"text-color":w(a),"active-text-color":w(l),"unique-opened":!0,"collapse-transition":!1,mode:"vertical"},{default:m((()=>[(d(!0),p(C,null,x(w(s).routes,(e=>(d(),g(_t,{key:e.path,item:e,"base-path":e.path,"is-collapse":b.value},null,8,["item","base-path","is-collapse"])))),128))])),_:1},8,["default-active","collapse","background-color","text-color","active-text-color"])])),_:1})],2)}}}),[["__scopeId","data-v-8eeb342c"]]),At={class:"scroll-container"},Tt=_(s({__name:"ScrollPane",props:{tagRefs:{type:Object,required:!0}},setup(e){const t=e,a=o(),r=ue(),s=l(),i=l();let v=0;const b=({scrollLeft:e})=>{v=e},y=({deltaY:e})=>{/^-/.test(e.toString())?k("left"):k("right")},_=()=>{const e=i.value.clientWidth,t=s.value.wrapRef.clientWidth;return{scrollbarContentRefWidth:e,scrollbarRefWidth:t,lastDistance:e-t-v}},k=(e,t=200)=>{let a=0;const{scrollbarContentRefWidth:l,scrollbarRefWidth:n,lastDistance:r}=_();n>l||(a="left"===e?Math.max(0,v-t):Math.min(v+t,v+r),s.value.setScrollLeft(a))},x=()=>{const e=t.tagRefs;for(let t=0;t<e.length;t++)if(a.path===e[t].$props.to.path){const a=e[t].$el,l=a.offsetWidth,n=a.offsetLeft,{scrollbarRefWidth:r}=_();if(n<v){return void k("left",v-n)}const s=r+v-l;if(n>s){return void k("right",n-s)}}};n(a,(()=>{U(x)}),{deep:!0});const C=c((()=>r.showScreenfull));return(e,t)=>{const a=u("el-icon");return d(),p("div",At,[h(a,{class:"arrow left",onClick:t[0]||(t[0]=e=>k("left"))},{default:m((()=>[h(w($))])),_:1}),h(w(B),{ref_key:"scrollbarRef",ref:s,onWheel:S(y,["prevent"]),onScroll:b},{default:m((()=>[f("div",{ref_key:"scrollbarContentRef",ref:i,class:"scrollbar-content"},[O(e.$slots,"default",{},void 0,!0)],512)])),_:3},8,["onWheel"]),h(a,{class:"arrow right",onClick:t[1]||(t[1]=e=>k("right"))},{default:m((()=>[h(w(X))])),_:1}),C.value?(d(),g(Ee,{key:0,element:".app-main","open-tips":"内容区全屏",class:"screenfull"})):F("",!0)])}}}),[["__scopeId","data-v-68eb9264"]]),It={class:"tags-view-container"},Rt=_(s({__name:"index",setup(e){const t=G(),a=k(),r=o(),s=i(),c=W(),v=l([]),b=l(!1),y=l(0),_=l(0),V=l({});let A=[];const T=e=>e.path===r.path,I=e=>{var t;return null==(t=e.meta)?void 0:t.affix},P=(e,t="/")=>{let a=[];return e.forEach((e=>{var l;if(null==(l=e.meta)?void 0:l.affix){const l=wt.resolve(t,e.path);a.push({fullPath:l,path:l,name:e.name,meta:{...e.meta}})}if(e.children){const t=P(e.children,e.path);t.length>=1&&(a=a.concat(t))}})),a},M=()=>{r.name&&(s.addVisitedView(r),s.addCachedView(r))},D=e=>{s.delVisitedView(e),s.delCachedView(e),T(e)&&L(s.visitedViews,e)},z=()=>{V.value.fullPath!==r.path&&void 0!==V.value.fullPath&&a.push(V.value.fullPath),s.delOthersVisitedViews(V.value),s.delOthersCachedViews(V.value)},L=(e,t)=>{const l=e.slice(-1)[0];void 0!==l&&void 0!==l.fullPath?a.push(l.fullPath):"Dashboard"===t.name?a.push({path:"/redirect"+t.path,query:t.query}):a.push("/")},O=()=>{b.value=!1};return n(r,(()=>{M()}),{deep:!0}),n(b,(e=>{e?document.body.addEventListener("click",O):document.body.removeEventListener("click",O)})),Y((()=>{(()=>{A=P(c.routes);for(const e of A)e.name&&s.addVisitedView(e)})(),M()})),(e,l)=>{const n=u("el-icon");return d(),p("div",It,[h(Tt,{class:"tags-view-wrapper","tag-refs":v.value},{default:m((()=>[(d(!0),p(C,null,x(w(s).visitedViews,(e=>(d(),g(w(Q),{ref_for:!0,ref_key:"tagRefs",ref:v,key:e.path,class:j([T(e)?"active":"","tags-view-item"]),to:{path:e.path,query:e.query},onMouseup:S((t=>I(e)?"":D(e)),["middle"]),onContextmenu:S((a=>((e,a)=>{const l=t.proxy.$el.getBoundingClientRect().left,n=t.proxy.$el.offsetWidth-105,r=a.clientX-l+15;_.value=r>n?n:r,y.value=a.clientY,b.value=!0,V.value=e})(e,a)),["prevent"])},{default:m((()=>{var t;return[R(E(null==(t=e.meta)?void 0:t.title)+" ",1),I(e)?F("",!0):(d(),g(n,{key:0,size:12,onClick:S((t=>D(e)),["prevent","stop"])},{default:m((()=>[h(w(ee))])),_:2},1032,["onClick"]))]})),_:2},1032,["class","to","onMouseup","onContextmenu"])))),128))])),_:1},8,["tag-refs"]),J(f("ul",{style:K({left:_.value+"px",top:y.value+"px"}),class:"contextmenu"},[f("li",{onClick:l[0]||(l[0]=e=>{return t=V.value,s.delCachedView(t),void a.replace({path:"/redirect"+t.path,query:t.query});var t})},"刷新"),I(V.value)?F("",!0):(d(),p("li",{key:0,onClick:l[1]||(l[1]=e=>D(V.value))},"关闭")),f("li",{onClick:z},"关闭其它"),f("li",{onClick:l[2]||(l[2]=e=>{return t=V.value,s.delAllVisitedViews(),s.delAllCachedViews(),void(A.some((e=>e.path===r.path))||L(s.visitedViews,t));var t})},"关闭所有")],4),[[Z,b.value]])])}}}),[["__scopeId","data-v-7ed7bf5f"]]),Ft=_(s({__name:"index",props:{buttonTop:{type:Number,default:350}},setup(e){const t=e;te((e=>({"8c501f28":a})));const a=t.buttonTop+"px",n=l(!1);return(e,t)=>{const a=u("el-icon"),l=u("el-drawer");return d(),p(C,null,[f("div",{class:"handle-button",onClick:t[0]||(t[0]=e=>n.value=!0)},[h(a,{size:24},{default:m((()=>[h(w(ae))])),_:1})]),h(l,{modelValue:n.value,"onUpdate:modelValue":t[1]||(t[1]=e=>n.value=e),size:"300px","with-header":!1},{default:m((()=>[O(e.$slots,"default",{},void 0,!0)])),_:3},8,["modelValue"])],64)}}}),[["__scopeId","data-v-038e37ce"]]),Pt=_(s({__name:"index",setup(e){const t=ie(),a=ue();(()=>{const e=o(),t=ie(),a=()=>document.body.getBoundingClientRect().width-1<992,l=()=>{if(!document.hidden){const e=a();t.toggleDevice(e?se.Mobile:se.Desktop),e&&t.closeSidebar(!0)}};n((()=>e.name),(()=>{t.device===se.Mobile&&t.sidebar.opened&&t.closeSidebar(!1)})),le((()=>{window.addEventListener("resize",l)})),Y((()=>{a()&&(t.toggleDevice(se.Mobile),t.closeSidebar(!0))})),ne((()=>{window.removeEventListener("resize",l)}))})();const l=c((()=>({hideSidebar:!t.sidebar.opened,openSidebar:t.sidebar.opened,withoutAnimation:t.sidebar.withoutAnimation,mobile:t.device===se.Mobile,showGreyMode:u.value,showColorWeakness:v.value}))),r=c((()=>a.showSettings)),s=c((()=>a.showTagsView)),i=c((()=>a.fixedHeader)),u=c((()=>a.showGreyMode)),v=c((()=>a.showColorWeakness)),b=()=>{t.closeSidebar(!1)};return(e,t)=>(d(),p("div",{class:j([l.value,"app-wrapper"])},[l.value.mobile&&l.value.openSidebar?(d(),p("div",{key:0,class:"drawer-bg",onClick:b})):F("",!0),h(w(Vt),{class:"sidebar-container"}),f("div",{class:j([{hasTagsView:s.value},"main-container"])},[f("div",{class:j({"fixed-header":i.value})},[h(w(Be)),J(h(w(Rt),null,null,512),[[Z,s.value]])],2),h(w(fe)),r.value?(d(),g(w(Ft),{key:0},{default:m((()=>[h(w(pt))])),_:1})):F("",!0)],2)],2))}}),[["__scopeId","data-v-8a41a21b"]]);export{Pt as default};