mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-16 10:35:34 +08:00
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
2 lines
59 KiB
JavaScript
2 lines
59 KiB
JavaScript
import{az as St,Z as Ht,r as z,b as se,E as Zt,d as Ae,z as Qe,l as O,aA as Ne,aB as Gt,e as w,m as d,p as C,F as Q,a7 as te,V as Ce,U as xe,u as _,M as E,P as ge,c as kt,R as K,aC as re,ag as x,q as T,O as h,W as wt,aD as Qt,T as v,Q as B,I as Z,aE as be,X as It,H as Oe,J as Ye,S as ve,a9 as Yt,n as he,aF as At,w as Be,a2 as ie,a8 as Ie,aG as Xe,aH as je,aI as Xt}from"./vue-tssh-6K7.js";import{g as jt,a as en,s as dt,b as ft,u as De,c as tn,d as et,_ as U,e as ce,f as nn,C as de,h as Ct,i as on,j as xt,k as Mt,r as Ft,l as an,m as Et,n as Pe,o as Lt,$ as H,p as sn,M as vt,q as Ee,t as rn,v as ln,w as cn,x as un,S as dn,y as fn,z as vn,A as mn,B as mt}from"./index-3FoHnkP0.js";import{d as Le,e as Ze,E as _e,s as Tt,f as $t,t as pn,a as _n,h as hn,j as gn,k as Nt,l as bn,n as yn,u as Sn,r as kn,o as wn,p as In,q as An}from"./element-2cKDr3_0.js";var fe=(n=>(n[n.Mobile=0]="Mobile",n[n.Desktop=1]="Desktop",n))(fe||{});const Cn="opened",zt="closed";function xn(n){n?dt(Cn):dt(zt)}const ye=St("app",()=>{const n=Ht({opened:jt()!==zt,withoutAnimation:!1,isMeun:en()}),e=z(fe.Desktop);return se(()=>n.opened,c=>xn(c)),{device:e,sidebar:n,toggleSidebar:c=>{n.opened=!n.opened,n.withoutAnimation=c},closeSidebar:c=>{n.opened=!1,n.withoutAnimation=c},toggleDevice:c=>{e.value=c},toggleMeun:()=>{n.isMeun=!n.isMeun,ft(n.isMeun)},closeMeun:()=>{n.isMeun=!1,ft(!1)},openSidebar:()=>{n.opened=!0}}}),Mn=992,Fn=()=>{const n=ye(),{listenerRouteChange:e}=De(),t=()=>document.body.getBoundingClientRect().width-1<Mn,o=()=>{if(!document.hidden){const a=t();n.toggleDevice(a?fe.Mobile:fe.Desktop),a&&(n.closeSidebar(!0),n.closeMeun())}};e(()=>{n.device===fe.Mobile&&n.sidebar.opened&&(n.closeSidebar(!1),n.closeMeun())}),Zt(()=>{window.addEventListener("resize",o)}),Ae(()=>{t()&&(n.toggleDevice(fe.Mobile),n.closeSidebar(!0))}),Qe(()=>{window.removeEventListener("resize",o)})},En={defense:!0,color:"#c0c4cc",opacity:.5,size:16,family:"serif",angle:-20,width:300,height:200},pt=z(document.body);function Ln(n=pt){let e,t,o=null;const a={watermarkElMutationObserver:void 0,parentElMutationObserver:void 0,parentElResizeObserver:void 0},s=(l,p={})=>{if(!n.value){console.warn("请在 DOM 挂载完成后再调用 setWatermark 方法设置水印");return}e=l,t={...En,...p},o?i():r(),u(n.value)},r=()=>{const l=n.value.tagName.toLowerCase()===pt.value.tagName.toLowerCase(),p=l?"fixed":"absolute",b=l?"":"relative";o=document.createElement("div"),o.style.pointerEvents="none",o.style.top="0",o.style.left="0",o.style.position=p,o.style.zIndex="99999";const{clientWidth:f,clientHeight:L}=n.value;i({width:f,height:L}),n.value.style.position=b,n.value.appendChild(o)},i=(l={})=>{o&&(e&&(o.style.background=`url(${c()}) left top repeat`),l.width&&(o.style.width=`${l.width}px`),l.height&&(o.style.height=`${l.height}px`))},c=()=>{const{color:l,opacity:p,size:b,family:f,angle:L,width:R,height:V}=t,G=document.createElement("canvas");G.width=R,G.height=V;const y=G.getContext("2d");return y&&(y.fillStyle=l,y.globalAlpha=p,y.font=`${b}px ${f}`,y.rotate(Math.PI/180*L),y.fillText(e,0,V/2)),G.toDataURL()},m=()=>{if(!(!n.value||!o)){I();try{n.value.removeChild(o)}catch{console.warn("水印元素已不存在,请重新创建")}finally{o=null}}},S=Le(()=>{m(),r(),u(n.value)},100),u=l=>{t.defense?!a.watermarkElMutationObserver&&!a.parentElMutationObserver&&k(l):I("mutation"),a.parentElResizeObserver||A(l)},I=(l="all")=>{var p,b,f;(l==="mutation"||l==="all")&&((p=a.watermarkElMutationObserver)==null||p.disconnect(),a.watermarkElMutationObserver=void 0,(b=a.parentElMutationObserver)==null||b.disconnect(),a.parentElMutationObserver=void 0),(l==="resize"||l==="all")&&((f=a.parentElResizeObserver)==null||f.disconnect(),a.parentElResizeObserver=void 0)},k=l=>{const p=Le(b=>{b.forEach(Le(f=>{switch(f.type){case"attributes":f.target===o&&S();break;case"childList":f.removedNodes.forEach(L=>{L===o&&l.appendChild(o)});break}},100))},100);a.watermarkElMutationObserver=new MutationObserver(p),a.parentElMutationObserver=new MutationObserver(p),a.watermarkElMutationObserver.observe(o,{attributes:!0,childList:!1,subtree:!1}),a.parentElMutationObserver.observe(l,{attributes:!1,childList:!0,subtree:!1})},A=l=>{const p=Le(()=>{const{clientWidth:b,clientHeight:f}=l;i({width:b,height:f})},500);a.parentElResizeObserver=new ResizeObserver(p),a.parentElResizeObserver.observe(l)};return Qe(()=>{m()}),{setWatermark:s,clearWatermark:m}}const Tn={class:"iframe-container"},$n=O({name:"IFrameContainer",__name:"index",setup(n){console.log("iframe组件已经加载等待跳转"),window.addEventListener("message",u=>{console.log("监听子页面传递过来的数据",u),u.data.location&&location.replace(u.data.location)});const t=kt().appContext.app,o=Ne(),a=z([]),s=tn(),r=et();se(()=>r,()=>{i.value.forEach(u=>{r.visitedViews.find(k=>k.path===u.path)||(u.hasOpen=!1)})},{deep:!0}),Ae(()=>{const u=S();u.forEach(I=>{t.component(I.name,Gt(()=>I.component()))}),a.value=u,c()});const i=w(()=>{const u=a.value.filter(I=>I.hasOpen);return console.log("filters",u),u});se(()=>o.path,c);function c(){const u=a.value.find(I=>I.path===o.path);u&&!u.hasOpen&&(u.hasOpen=!0)}function m(u,I=[]){return u.forEach(k=>{const{meta:A={},name:l,path:p,component:b}=k;if(A.isIframe){const f={name:l,path:p,hasOpen:!1,component:b};I.push(f)}k.children&&k.children.length&&m(k.children,I)}),I}function S(){const u=s.routes;return m(u)}return(u,I)=>(d(),C("div",Tn,[(d(!0),C(Q,null,te(i.value,k=>Ce((d(),E(ge(k.name),{key:k.name})),[[xe,k.path===_(o).path]])),128))]))}}),Nn=U($n,[["__scopeId","data-v-b399dccf"]]),zn={class:"layout-footer"},Rn=O({__name:"index",setup(n){const e="智能运营中台";return(t,o)=>(d(),C("footer",zn,"footer "+K(_(e)),1))}}),Vn=U(Rn,[["__scopeId","data-v-7c3be2e2"]]),Pn={class:"app-scrollbar"},On=O({__name:"AppMain",setup(n){const e=et(),t=ce(),o=Ne(),a=ye(),{sidebar:s}=re(a);return(r,i)=>{var S,u;const c=x("router-view"),m=x("el-backtop");return d(),C("section",{class:Z(["app-main",{"menu-main":_(s).isMeun}])},[T("div",Pn,[(S=_(o))!=null&&S.meta.isIframe?B("",!0):(d(),E(c,{key:0},{default:h(({Component:I})=>[v(wt,{name:"el-fade-in",mode:"out-in"},{default:h(()=>[(d(),E(Qt,{include:_(e).cachedViews},[(d(),E(ge(I),{key:_(o).path,class:"app-container-grow"}))],1032,["include"]))]),_:2},1024)]),_:1})),Ce(v(Nn,null,null,512),[[xe,(u=_(o))==null?void 0:u.meta.isIframe]]),_(t).showFooter?(d(),E(Vn,{key:1})):B("",!0)]),v(m),v(m,{target:".app-scrollbar"})],2)}}}),tt=U(On,[["__scopeId","data-v-8b663c29"]]),Bn={key:0,class:"iconfont icon-suojin"},Wn={key:1,class:"iconfont icon-zhankai3"},Dn=O({__name:"index",props:{isActive:{type:Boolean,default:!1}},emits:["toggleClick"],setup(n,{emit:e}){const t=n,o=e,a=()=>{o("toggleClick")};return(s,r)=>{const i=x("el-icon");return d(),C("div",{onClick:a},[v(i,{size:20,class:"icon"},{default:h(()=>[t.isActive?(d(),C("i",Bn)):(d(),C("i",Wn))]),_:1})])}}}),Un=U(Dn,[["__scopeId","data-v-b6c5016f"]]),qn=O({__name:"index",setup(n){const e=Ne();be();const{listenerRouteChange:t}=De(),o=z([]),a=()=>{o.value=e.matched.filter(s=>{var r,i;return((r=s.meta)==null?void 0:r.title)&&((i=s.meta)==null?void 0:i.breadcrumb)!==!1})};return t(s=>{s.path.startsWith("/redirect/")||a()},!0),(s,r)=>{const i=x("el-breadcrumb-item"),c=x("el-breadcrumb");return d(),E(c,{class:"app-breadcrumb"},{default:h(()=>[(d(!0),C(Q,null,te(o.value,m=>(d(),E(i,{key:m.path},{default:h(()=>[T("span",null,K(m.meta.title),1)]),_:2},1024))),128))]),_:1})}}}),Jn=U(qn,[["__scopeId","data-v-0dabc4f1"]]),Kn="/assets/static/logo-5ckfAmJf.png",Hn=["src"],Zn=["src"],Gn=O({__name:"index",props:{collapse:{type:Boolean,default:!0}},setup(n){const e=n,t=ce(),{layoutMode:o}=re(t),a=z(),s=z();Ae(async()=>{const i=await nn();a.value=i.logoUrl,s.value=i.menuVer;const c=localStorage.getItem(de.VERSION);if(c){if(c!==s.value){if(Ze.close(),!await Ze.confirm("检测到系统可能已更新,需要重新登录才能正常访问页面,是否立刻登录","提示"))return;window.localStorage.clear(),localStorage.setItem(de.VERSION,s.value);const S=Ct();location.replace(`${S}/index.php?ctl=passport&act=logout`)}}else localStorage.setItem(de.VERSION,s.value)});const r=w(()=>a.value?a.value:Kn);return(i,c)=>{const m=x("router-link");return d(),C("div",{class:Z(["layout-logo-container",{collapse:e.collapse,"layout-mode-top":_(o)==="top"}])},[v(wt,{name:"layout-logo-fade"},{default:h(()=>[e.collapse?(d(),E(m,{key:"collapse",to:"/"},{default:h(()=>[T("img",{src:r.value,class:"layout-logo"},null,8,Hn)]),_:1})):(d(),E(m,{key:"expand",to:"/"},{default:h(()=>[T("img",{src:r.value,class:"layout-logo-text"},null,8,Zn)]),_:1}))]),_:1})],2)}}}),nt=U(Gn,[["__scopeId","data-v-2a4dbcda"]]),$e=n=>/^(https?:|mailto:|tel:)/.test(n),Te=36,ot="anonymous";let Rt=ot;const _t=n=>{const e=n==null?void 0:n.trim();Rt=e&&e.length>0?e:ot},Ke=()=>Rt,Qn=(n,e)=>{const t=(n==null?void 0:n.trim())||(e==null?void 0:e.trim()),o=(e==null?void 0:e.trim())||(n==null?void 0:n.trim());return!t&&!o?null:{id:t||"",title:o||""}},Yn=(n,e,t)=>{if(!Array.isArray(n)||n.length===0){const o=Qn(t,e);return o?[o]:[]}return n.map(o=>{var r;if(typeof o=="string")return{id:o,title:e||o};const a=((r=o.id)==null?void 0:r.toString())||t||o.title||"",s=typeof o.title=="string"&&o.title.length>0?o.title:e||a;return{id:a,title:s}})},Ge=n=>{const e=n.favoriteId??n.id,t=n.path??n.path;if(!e||!t)return null;const o=n.meta?{...n.meta}:void 0,a=Yn(n.levels,(o==null?void 0:o.title)??"",String(e));return{favoriteId:String(e),routeName:n.routeName??null,path:t,meta:o,levels:a}},Xn=n=>{if(!n)return[];try{const e=JSON.parse(n),t=Array.isArray(e)?e:e==null?void 0:e.favorites;return Array.isArray(t)?t.map(o=>Ge(o)).filter(o=>!!o):[]}catch{return[]}},jn=()=>({getItem:()=>{const n=Mt(Ke());return JSON.stringify({favorites:n})},setItem:(n,e)=>{const t=Xn(e);xt(t,Ke())},removeItem:()=>{Ft(Ke())}}),eo=n=>n.length<=Te?n:n.slice(0,Te),at=n=>{var t,o;const e=n.levels.map(a=>{var s;return(s=a.title)==null?void 0:s.trim()}).filter(a=>!!(a&&a.length>0));if(!e.length){const a=((o=(t=n.meta)==null?void 0:t.title)==null?void 0:o.trim())||n.path;a&&e.push(a)}return e.join(" / ")},to=n=>{var e,t;return{elIcon:(e=n.meta)==null?void 0:e.elIcon,iconFont:(t=n.meta)==null?void 0:t.iconFont}},st=(n=[])=>{const e=new Map,t=(o,a=[])=>{o.forEach(s=>{var c,m;const r={id:String(s.id),title:((c=s.meta)==null?void 0:c.title)??""},i=[...a,r];e.set(String(s.id),{favoriteId:String(s.id),routeName:s.routeName??null,path:s.path,meta:s.meta?{...s.meta}:void 0,levels:i}),(m=s.children)!=null&&m.length&&t(s.children,i)})};return t(n),e},no=St("favorites",()=>{const n=on(),e=w(()=>{const l=n.userInfo,p=[l==null?void 0:l.login_account,l==null?void 0:l.account,l==null?void 0:l.login_name,n.username];for(const b of p)if(typeof b=="string"&&b.trim().length>0)return b.trim();return ot});_t(e.value);const t=l=>eo(Mt(l).map(p=>Ge(p)).filter(p=>!!p)),o=z(t(e.value));se(o,l=>{xt(l,e.value)},{deep:!0}),se(e,(l,p)=>{l!==p&&(_t(l),o.value=t(l))},{immediate:!1});const a=w(()=>new Set(o.value.map(l=>l.favoriteId))),s=w(()=>{const l=new Map;return o.value.forEach(p=>{l.set(p.favoriteId,at(p))}),l}),r=w(()=>{const l=new Map;return o.value.forEach(p=>{l.set(p.favoriteId,to(p))}),l}),i=w(()=>o.value.map(l=>({...l,breadcrumb:s.value.get(l.favoriteId)??"",icon:r.value.get(l.favoriteId)??{}})));return{favorites:o,maxFavorites:Te,favoriteSet:a,favoriteDisplayItems:i,favoriteBreadcrumbMap:s,favoriteIconMap:r,getBreadcrumbById:l=>s.value.get(l)??"",getIconById:l=>r.value.get(l),syncWithMenus:l=>{if(!l||l.length===0)return;const p=st(l),b=[];o.value.forEach(f=>{const L=p.get(f.favoriteId);L&&b.push({...L,routeName:f.routeName??L.routeName??null})}),(b.length!==o.value.length||b.some((f,L)=>{var R;return f.path!==((R=o.value[L])==null?void 0:R.path)}))&&(o.value=b)},toggleFavorite:l=>{console.log("[favorites] toggleFavorite called",{candidate:l});const p=l.favoriteId??l.id;if(console.log("[favorites] favoriteId computed:",{favoriteId:p,type:typeof p}),!p){console.warn("[favorites] ❌ early return - no favoriteId");return}const b=String(p),f=o.value.findIndex(R=>R.favoriteId===b);if(console.log("[favorites] existingIndex:",f,"current favorites count:",o.value.length),f!==-1){o.value.splice(f,1),console.log("[favorites] ✅ removed favorite, new count:",o.value.length);return}if(o.value.length>=Te){_e.warning(`最多只能收藏 ${Te} 个菜单`);return}const L=Ge({...l,favoriteId:b});console.log("[favorites] normalized:",L),L?(o.value.push(L),console.log("[favorites] ✅ added favorite, new count:",o.value.length)):console.warn("[favorites] ❌ normalized is null, cannot add")},removeFavorite:l=>{const p=o.value.findIndex(b=>b.favoriteId===l);p!==-1&&o.value.splice(p,1)},clearFavorites:()=>{o.value=[],Ft(e.value)},isFavorite:l=>a.value.has(l)}},{persist:{key:de.FAVORITES,storage:jn(),paths:["favorites"]}});function Vt(){return no(an)}const Pt=36,rt=n=>Array.isArray(n)?n:[],ht=n=>{const e=rt(n);if(!e.length)return"";const t=st(e);return Array.from(t.values()).map(o=>`${o.favoriteId}|${o.path}`).sort().join(";")},Ot=n=>rt(n).length>0,Bt=(n,e=Pt)=>{const t=n.trim();return t?t.length<=e?{display:t,tooltip:t}:{display:`${t.slice(0,Math.max(1,e-1))}…`,tooltip:t}:{display:"",tooltip:""}},Wt=n=>{var a;const e=n.favoriteId??n.id;if(e!=null&&`${e}`.length>0)return String(e);const t=n.routeName!=null?String(n.routeName):"",o=((a=n.path)==null?void 0:a.trim())??"";return t&&o?`${t}@${o}`:o||t||null},oo=(n,e)=>{const t=rt(n),o=st(t),a=(e==null?void 0:e.maxBreadcrumbLength)??Pt;return Array.from(o.values()).map(s=>{const r=at(s);return{...s,breadcrumb:r,breadcrumbDisplay:Bt(r,a)}})},Dt=(n,e,t)=>at({favoriteId:"__temp__",path:t??"",meta:e?{title:e}:void 0,levels:n}),ao=n=>{const e=(n==null?void 0:n.favoritesStore)??Vt(),t=(n==null?void 0:n.menuStore)??(n!=null&&n.menusRef?void 0:Et()),o=t?It(t,"menus"):void 0,a=(n==null?void 0:n.menusRef)??o;if(!a)throw new Error("watchMenuFavoritesSync requires either menuStore or menusRef");const s=a,r=(n==null?void 0:n.immediate)??!0;let i="";const c=m=>{Ot(m)&&e.syncWithMenus(m)};if(r){const m=s.value;i=ht(m),i&&c(m)}return se(s,m=>{const S=ht(m);if(!S||S===i){i=S;return}i=S,c(m)},{deep:!0})};function Ue(n){const e=(n==null?void 0:n.favoritesStore)??Vt(),t=(n==null?void 0:n.menuStore)??Et(),o=It(t,"menus"),a=n==null?void 0:n.maxBreadcrumbLength,s=w(()=>oo(o.value,{maxBreadcrumbLength:a})),r=S=>{const u=S??o.value;Ot(u)&&e.syncWithMenus(u)};let i=null;const c=()=>(i==null||i(),i=ao({favoritesStore:e,menuStore:t}),i);return((n==null?void 0:n.autoSync)??!0)&&c(),{favoritesStore:e,menuStore:t,flattenedMenus:s,syncFavorites:r,startSync:c,stopSync:()=>{i==null||i(),i=null}}}const so=["href"],ro={class:"sidebar-item-link__label"},lo={class:"sidebar-item-link__label"},io=["title","aria-label","aria-pressed"],co=O({__name:"SidebarItemLink",props:{to:{},pdlf:{default:"30px"},menuItem:{default:null},parentLevels:{default:()=>[]}},setup(n){const e=n;se(()=>e.menuItem,l=>{console.log("[SidebarItemLink] menuItem changed:",l)},{immediate:!0});const t=w(()=>$e(e.to)),{favoritesStore:o}=Ue({autoSync:!1}),a=w(()=>{var b,f,L,R;const l=(e.parentLevels??[]).map(V=>({id:V.id,title:V.title??V.id})),p=((b=e.menuItem)==null?void 0:b.favoriteId)??((f=e.menuItem)==null?void 0:f.id);if(p!=null){const V=String(p);l.some(y=>y.id===V)||l.push({id:V,title:((R=(L=e.menuItem)==null?void 0:L.meta)==null?void 0:R.title)??V})}return l}),s=w(()=>{var l,p,b,f;return Wt({favoriteId:((l=e.menuItem)==null?void 0:l.favoriteId)??((p=e.menuItem)==null?void 0:p.id),path:((b=e.menuItem)==null?void 0:b.path)??e.to,routeName:((f=e.menuItem)==null?void 0:f.routeName)??null})}),r=w(()=>!t.value&&!!s.value),i=w(()=>!r.value||!s.value?!1:o.isFavorite(s.value)),c=w(()=>{var l,p,b;return Dt(a.value,(p=(l=e.menuItem)==null?void 0:l.meta)==null?void 0:p.title,((b=e.menuItem)==null?void 0:b.path)??e.to)}),m=w(()=>i.value?"取消收藏":"收藏"),S=w(()=>{const l=c.value?`:${c.value}`:"";return`${m.value}${l}`}),u=w(()=>i.value?Tt:$t),I=()=>{if(!r.value||!s.value||!e.menuItem)return console.log("[SidebarItemLink] buildFavoritePayload returning null",{shouldShowFavoriteControl:r.value,favoriteId:s.value,menuItem:e.menuItem}),null;const l=e.menuItem.path??e.to;if(!l)return console.warn("[SidebarItemLink] ❌ path is falsy:",l),null;const p={favoriteId:s.value,path:l,routeName:e.menuItem.routeName??null,meta:e.menuItem.meta?{...e.menuItem.meta}:void 0,levels:a.value.map(b=>({...b}))};return console.log("[SidebarItemLink] ✅ buildFavoritePayload:",p),p},k=pn(()=>{const l=I();l&&o.toggleFavorite(l)},400,{leading:!0,trailing:!1}),A=l=>{l.preventDefault(),l.stopPropagation(),k()};return(l,p)=>{const b=x("router-link");return t.value?(d(),C("a",{key:0,href:e.to,target:"_blank",rel:"noopener",class:"sidebar-item-link"},[T("span",ro,[Oe(l.$slots,"default",{},void 0,!0)])],8,so)):(d(),E(b,{key:1,to:e.to,style:Ye({paddingLeft:e.pdlf}),class:Z(["sidebar-item-link",{"sidebar-item-link--with-favorite":r.value}])},{default:h(()=>[T("span",lo,[Oe(l.$slots,"default",{},void 0,!0)]),r.value?(d(),C("button",{key:0,class:Z(["sidebar-item-link__favorite",{"is-active":i.value}]),type:"button",title:S.value,"aria-label":S.value,"aria-pressed":i.value,onClick:A},[(d(),E(ge(u.value),{class:"sidebar-item-link__favorite-icon"}))],10,io)):B("",!0)]),_:3},8,["to","style","class"]))}}}),We=U(co,[["__scopeId","data-v-6298b2e3"]]);function ue(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}function gt(n,e){for(var t="",o=0,a=-1,s=0,r,i=0;i<=n.length;++i){if(i<n.length)r=n.charCodeAt(i);else{if(r===47)break;r=47}if(r===47){if(!(a===i-1||s===1))if(a!==i-1&&s===2){if(t.length<2||o!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){var c=t.lastIndexOf("/");if(c!==t.length-1){c===-1?(t="",o=0):(t=t.slice(0,c),o=t.length-1-t.lastIndexOf("/")),a=i,s=0;continue}}else if(t.length===2||t.length===1){t="",o=0,a=i,s=0;continue}}e&&(t.length>0?t+="/..":t="..",o=2)}else t.length>0?t+="/"+n.slice(a+1,i):t=n.slice(a+1,i),o=i-a-1;a=i,s=0}else r===46&&s!==-1?++s:s=-1}return t}function uo(n,e){var t=e.dir||e.root,o=e.base||(e.name||"")+(e.ext||"");return t?t===e.root?t+o:t+n+o:o}var we={resolve:function(){for(var e="",t=!1,o,a=arguments.length-1;a>=-1&&!t;a--){var s;a>=0?s=arguments[a]:(o===void 0&&(o=process.cwd()),s=o),ue(s),s.length!==0&&(e=s+"/"+e,t=s.charCodeAt(0)===47)}return e=gt(e,!t),t?e.length>0?"/"+e:"/":e.length>0?e:"."},normalize:function(e){if(ue(e),e.length===0)return".";var t=e.charCodeAt(0)===47,o=e.charCodeAt(e.length-1)===47;return e=gt(e,!t),e.length===0&&!t&&(e="."),e.length>0&&o&&(e+="/"),t?"/"+e:e},isAbsolute:function(e){return ue(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var e,t=0;t<arguments.length;++t){var o=arguments[t];ue(o),o.length>0&&(e===void 0?e=o:e+="/"+o)}return e===void 0?".":we.normalize(e)},relative:function(e,t){if(ue(e),ue(t),e===t||(e=we.resolve(e),t=we.resolve(t),e===t))return"";for(var o=1;o<e.length&&e.charCodeAt(o)===47;++o);for(var a=e.length,s=a-o,r=1;r<t.length&&t.charCodeAt(r)===47;++r);for(var i=t.length,c=i-r,m=s<c?s:c,S=-1,u=0;u<=m;++u){if(u===m){if(c>m){if(t.charCodeAt(r+u)===47)return t.slice(r+u+1);if(u===0)return t.slice(r+u)}else s>m&&(e.charCodeAt(o+u)===47?S=u:u===0&&(S=0));break}var I=e.charCodeAt(o+u),k=t.charCodeAt(r+u);if(I!==k)break;I===47&&(S=u)}var A="";for(u=o+S+1;u<=a;++u)(u===a||e.charCodeAt(u)===47)&&(A.length===0?A+="..":A+="/..");return A.length>0?A+t.slice(r+S):(r+=S,t.charCodeAt(r)===47&&++r,t.slice(r))},_makeLong:function(e){return e},dirname:function(e){if(ue(e),e.length===0)return".";for(var t=e.charCodeAt(0),o=t===47,a=-1,s=!0,r=e.length-1;r>=1;--r)if(t=e.charCodeAt(r),t===47){if(!s){a=r;break}}else s=!1;return a===-1?o?"/":".":o&&a===1?"//":e.slice(0,a)},basename:function(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ue(e);var o=0,a=-1,s=!0,r;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return"";var i=t.length-1,c=-1;for(r=e.length-1;r>=0;--r){var m=e.charCodeAt(r);if(m===47){if(!s){o=r+1;break}}else c===-1&&(s=!1,c=r+1),i>=0&&(m===t.charCodeAt(i)?--i===-1&&(a=r):(i=-1,a=c))}return o===a?a=c:a===-1&&(a=e.length),e.slice(o,a)}else{for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!s){o=r+1;break}}else a===-1&&(s=!1,a=r+1);return a===-1?"":e.slice(o,a)}},extname:function(e){ue(e);for(var t=-1,o=0,a=-1,s=!0,r=0,i=e.length-1;i>=0;--i){var c=e.charCodeAt(i);if(c===47){if(!s){o=i+1;break}continue}a===-1&&(s=!1,a=i+1),c===46?t===-1?t=i:r!==1&&(r=1):t!==-1&&(r=-1)}return t===-1||a===-1||r===0||r===1&&t===a-1&&t===o+1?"":e.slice(t,a)},format:function(e){if(e===null||typeof e!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return uo("/",e)},parse:function(e){ue(e);var t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;var o=e.charCodeAt(0),a=o===47,s;a?(t.root="/",s=1):s=0;for(var r=-1,i=0,c=-1,m=!0,S=e.length-1,u=0;S>=s;--S){if(o=e.charCodeAt(S),o===47){if(!m){i=S+1;break}continue}c===-1&&(m=!1,c=S+1),o===46?r===-1?r=S:u!==1&&(u=1):r!==-1&&(u=-1)}return r===-1||c===-1||u===0||u===1&&r===c-1&&r===i+1?c!==-1&&(i===0&&a?t.base=t.name=e.slice(1,c):t.base=t.name=e.slice(i,c)):(i===0&&a?(t.name=e.slice(1,r),t.base=e.slice(1,c)):(t.name=e.slice(i,r),t.base=e.slice(i,c)),t.ext=e.slice(r,c)),i>0?t.dir=e.slice(0,i-1):a&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};we.posix=we;var fo=we;const lt=_n(fo),vo={key:2,style:{"margin-left":"8px"}},mo={key:3,style:{"margin-left":"12px"}},po={class:"meun-span"},_o={class:"multi-level-content container"},ho={class:"submenu-title"},go=O({__name:"SidebarItemAsp",props:{item:{},isCollapse:{type:Boolean,default:!1},isTop:{type:Boolean,default:!1},isFirstLevel:{type:Boolean,default:!0},basePath:{default:""},keyIdx:{default:0}},setup(n,{expose:e}){const t=n;w(()=>{var u;return(u=t.item.meta)==null?void 0:u.alwaysShow});const o=w(()=>{var u;return((u=t.item.children)==null?void 0:u.filter(I=>{var k;return!((k=I.meta)!=null&&k.hidden)}))??[]}),a=w(()=>o.value.length),s=w(()=>{const u=a.value;switch(!0){case u>1:return null;default:return{...t.item,path:""}}}),r=z(null),i=z(0);function c(u){const I=u.children;if(I.length===0)return 0;const k=new Set,A=u.getBoundingClientRect();return Array.from(I).forEach(l=>{const p=l==null?void 0:l.getBoundingClientRect(),b=(p==null?void 0:p.left)-(A==null?void 0:A.left);k.add(Math.round(b))}),k.size}const m=()=>{he(()=>{const I=document.querySelectorAll(".container")[t.keyIdx],k=c(I);i.value=k*200})},S=u=>{switch(!0){case $e(u):return u;case $e(t.basePath):return t.basePath;default:return lt.resolve(t.basePath,u)}};return e({open:m}),(u,I)=>{var p;const k=x("SvgIcon"),A=x("el-menu-item"),l=x("el-sub-menu");return(p=t.item.meta)!=null&&p.hidden?B("",!0):(d(),C("div",{key:0,class:Z({"simple-mode":t.isCollapse&&!u.isTop,"first-level":t.isFirstLevel})},[u.item.children?(d(),E(l,{key:1,index:t.item.id},{title:h(()=>{var b,f;return[(b=t.item.meta)!=null&&b.svgIcon?(d(),E(k,{key:0,name:t.item.meta.svgIcon},null,8,["name"])):(f=t.item.meta)!=null&&f.elIcon?(d(),E(ge(t.item.meta.elIcon),{key:1,class:"el-icon"})):t.item.meta.iconFont?(d(),C("i",{key:2,class:Z(t.item.meta.iconFont)},null,2)):(d(),C("i",mo)),T("span",po,K(t.item.meta.title),1)]}),default:h(()=>[t.item.children?(d(),C("div",{key:0,class:"multi-hover",style:Ye({width:i.value+"px"}),ref_key:"hoverRef",ref:r},[T("div",_o,[(d(!0),C(Q,null,te(t.item.children,b=>(d(),C("div",{key:b.path,class:"submenu-group"},[T("div",ho,K(b.meta.title),1),(d(!0),C(Q,null,te(b.children,f=>(d(),E(A,{class:"collapse-meun",key:f.path,index:f.id},{default:h(()=>[v(We,{pdlf:"15px",to:S(f.path),"menu-item":f},{default:h(()=>[ve(K(f.meta.title),1)]),_:2},1032,["to","menu-item"])]),_:2},1032,["index"]))),128))]))),128))])],4)):B("",!0)]),_:1},8,["index"])):(d(),C(Q,{key:0},[s.value.meta?(d(),E(We,{key:0,pdlf:"15px",to:S(s.value.path),"menu-item":s.value},{default:h(()=>[v(A,{index:t.item.id},Yt({default:h(()=>[s.value.meta.svgIcon?(d(),E(k,{key:0,name:s.value.meta.svgIcon},null,8,["name"])):s.value.meta.elIcon?(d(),E(ge(s.value.meta.elIcon),{key:1,class:"el-icon"})):(d(),C("i",vo))]),_:2},[s.value.meta.title?{name:"title",fn:h(()=>[ve(K(s.value.meta.title),1)]),key:"0"}:void 0]),1032,["index"])]),_:1},8,["to","menu-item"])):B("",!0)],64))],2))}}}),bo=U(go,[["__scopeId","data-v-b522cf1c"]]),yo={key:3,style:{"margin-left":"12px"}},So={key:1,class:"sub-menu-container"},ko={class:"sub-menu-container-scoll"},wo={class:"sub-menu-title"},Io=O({__name:"index",setup(n){At($=>({e61f2ebe:me.value,"07a8ba6a":Se.value,"58a4ec6a":q.value,"0f1b8cb3":ae.value,"3f8af674":ne.value,"8c3ba20c":A.value}));const e=Pe("--v3-sidebar-menu-bg-color"),t=Pe("--v3-sidebar-menu-text-color"),o=Pe("--v3-sidebar-menu-active-text-color"),a=be(),s=ye(),r=Lt(),i=ce(),c=z([]),m=z(""),S=z([]),u=z(""),I=z(""),k=z(null),A=z("#409eff"),{sidebar:l,device:p}=re(s),{layoutMode:b,showLogo:f}=re(i),L=w(()=>a.currentRoute.value.name),R=w(()=>!l.value.opened),V=w(()=>b.value==="left"),G=w(()=>b.value==="top"),y=w(()=>!l.value.isMeun),N=w(()=>p.value===fe.Mobile),ee=w(()=>V.value&&f.value),W=w(()=>V.value?e:void 0),X=w(()=>V.value?t:void 0),ne=w(()=>V.value?o:void 0),q=w(()=>b.value!=="top"?"var(--v3-sidebar-menu-item-height)":"var(--v3-navigationbar-height)"),ae=w(()=>b.value!=="top"?"var(--v3-sidebar-menu-hover-bg-color)":"transparent"),me=w(()=>b.value!=="top"?"2px":"0px");se(()=>a.currentRoute.value,$=>{const F=$.matched[0].name;m.value=F;const P=r.menus.find(D=>D.id===F);c.value=(P==null?void 0:P.children)||[],localStorage.setItem(de.ACTIVE,F),he(()=>{var Y;const D=c.value.map(j=>j.id);S.value=D;for(let j=0;j<D.length;j++)(Y=k.value)==null||Y.open(D[j])})});const Se=w(()=>b.value==="top"?"none":"block"),Me=()=>{if(a.currentRoute.value.path==="/home"){const D=r.menus[0];m.value=D.id,c.value=(D==null?void 0:D.children)||[];const Y=c.value.map(j=>j.id);localStorage.setItem(de.ACTIVE,""),S.value=Y;return}const F=localStorage.getItem(de.ACTIVE)||"";m.value=F;const P=r.menus.find(D=>D.id===F);c.value=(P==null?void 0:P.children)||[],I.value=localStorage.getItem(de.ACTIVE)||"",he(()=>{var Y;const D=c.value.map(j=>j.id);S.value=D;for(let j=0;j<D.length;j++)(Y=k.value)==null||Y.open(D[j])})};se(()=>l.value.isMeun,$=>{$&&Me()},{immediate:!0}),se(c,$=>{console.log("[Sidebar] currentSubMenus changed, count:",$.length),$.length>0&&(console.log("[Sidebar] first subMenu keys:",Object.keys($[0])),console.log("[Sidebar] first subMenu:",$[0]),$[0].children&&$[0].children.length>0&&console.log("[Sidebar] first child:",$[0].children[0]))},{immediate:!0,deep:!0});const ze=z(null),qe=$=>{he(()=>{const F=r.menus.findIndex(P=>P.id===$);ze.value[F].open()})},Re=($,F)=>{c.value=[],I.value=F[0];const P=r.menus.find(D=>D.id===$);m.value=$,he(()=>{c.value=(P==null?void 0:P.children)||[];const D=c.value.map(Y=>Y.id);S.value=[$,...D]})},Ve=($,F)=>{switch(!0){case $e($):return $;case $e(F):return F;default:return lt.resolve(F,$)}},Fe=($,F)=>{localStorage.setItem(de.ACTIVE,F[0])},g=$=>{u.value=$},M=()=>{localStorage.setItem(de.ACTIVE,I.value)};return($,F)=>{const P=x("el-menu"),D=x("SvgIcon"),Y=x("el-menu-item"),j=x("el-scrollbar"),Kt=x("el-sub-menu");return d(),C("div",{class:Z({"has-logo":ee.value})},[ee.value?(d(),E(nt,{key:0,collapse:R.value},null,8,["collapse"])):B("",!0),v(j,{"wrap-class":"scrollbar-wrapper"},{default:h(()=>[y.value?(d(),E(P,{key:0,"default-active":L.value,collapse:!0,"background-color":W.value,"text-color":X.value,"active-text-color":ne.value,"unique-opened":!0,"collapse-transition":!1,onOpen:qe,onSelect:Fe,mode:G.value&&!N.value?"horizontal":"vertical"},{default:h(()=>[(d(!0),C(Q,null,te(_(r).menus,(J,le)=>(d(),E(bo,{key:le,keyIdx:Number(le),item:J,ref_for:!0,ref_key:"siderbarRef",ref:ze,"base-path":J.path,"is-collapse":R.value,"is-top":G.value},null,8,["keyIdx","item","base-path","is-collapse","is-top"]))),128))]),_:1},8,["default-active","background-color","text-color","active-text-color","mode"])):(d(),E(P,{key:1,class:"menu-new","default-active":m.value,"background-color":W.value,"text-color":X.value,"active-text-color":A.value,"unique-opened":!0,"collapse-transition":!1,onSelect:Re},{default:h(()=>[(d(!0),C(Q,null,te(_(r).menus,J=>(d(),E(Y,{index:J.id,key:J.id},{default:h(()=>{var le,Je;return[(le=J.meta)!=null&&le.svgIcon?(d(),E(D,{key:0,name:J.meta.svgIcon},null,8,["name"])):(Je=J.meta)!=null&&Je.elIcon?(d(),E(ge(J.meta.elIcon),{key:1,class:"el-icon"})):J.meta.iconFont?(d(),C("i",{key:2,class:Z(J.meta.iconFont)},null,2)):(d(),C("i",yo)),T("span",null,K(J.meta.title),1)]}),_:2},1032,["index"]))),128))]),_:1},8,["default-active","background-color","text-color","active-text-color"]))]),_:1}),!y.value&&c.value.length>0?(d(),C("div",So,[T("div",ko,[v(P,{"default-active":L.value,onSelect:g,"background-color":W.value,"text-color":X.value,ref_key:"subMenuRef",ref:k,"default-openeds":S.value,"active-text-color":A.value},{default:h(()=>[(d(!0),C(Q,null,te(c.value,J=>(d(),C(Q,{key:J.id},[J.children&&J.children.length?(d(),E(Kt,{key:J.id,index:J.id},{title:h(()=>[T("span",wo,K(J.meta.title),1)]),default:h(()=>[(d(!0),C(Q,null,te(J.children,le=>(d(),E(Y,{key:le.id,onClick:F[0]||(F[0]=Je=>M()),index:le.id},{default:h(()=>[v(We,{pdlf:"30px",to:Ve(le.path,m.value),"menu-item":le},{default:h(()=>[ve(K(le.meta.title),1)]),_:2},1032,["to","menu-item"])]),_:2},1032,["index"]))),128))]),_:2},1032,["index"])):(d(),E(Y,{key:J.id,index:J.id},{default:h(()=>[v(We,{pdlf:"30px",to:Ve(J.path,m.value),"menu-item":J},{default:h(()=>[ve(K(J.meta.title),1)]),_:2},1032,["to","menu-item"])]),_:2},1032,["index"]))],64))),128))]),_:1},8,["default-active","background-color","text-color","default-openeds","active-text-color"])])])):B("",!0)],2)}}}),it=U(Io,[["__scopeId","data-v-0b961138"]]),Ao={class:"notify"},Co=99,xo=O({__name:"index",setup(n){const e=be(),t=w(()=>o.value.reduce((s,r)=>s+r.list.length,0)),o=z([]),a=()=>{e.push({path:"/notify"})};return(s,r)=>{const i=x("el-icon"),c=x("el-tooltip"),m=x("el-badge");return d(),C("div",Ao,[v(m,{value:t.value,max:Co,hidden:t.value===0,onClick:a},{default:h(()=>[v(c,{effect:"dark",content:_(H)("Notify.index.721841-3"),placement:"bottom"},{default:h(()=>[v(i,{size:20},{default:h(()=>[v(_(hn))]),_:1})]),_:1},8,["content"])]),_:1},8,["value","hidden"])])}}}),Mo=U(xo,[["__scopeId","data-v-1edab37d"]]),Fo=O({__name:"index",setup(n){const{themeList:e,activeThemeName:t,setTheme:o}=sn();return(a,s)=>{const r=x("el-icon"),i=x("el-tooltip"),c=x("el-dropdown-item"),m=x("el-dropdown-menu"),S=x("el-dropdown");return d(),E(S,{trigger:"click",onCommand:_(o)},{dropdown:h(()=>[v(m,null,{default:h(()=>[(d(!0),C(Q,null,te(_(e),(u,I)=>(d(),E(c,{key:I,disabled:_(t)===u.name,command:u.name},{default:h(()=>[T("span",null,K(u.title),1)]),_:2},1032,["disabled","command"]))),128))]),_:1})]),default:h(()=>[T("div",null,[v(i,{effect:"dark",content:"主题模式",placement:"bottom"},{default:h(()=>[v(r,{size:20},{default:h(()=>[v(_(gn))]),_:1})]),_:1})])]),_:1},8,["onCommand"])}}}),bt=[["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"]],pe=(()=>{if(typeof document>"u")return!1;const n=bt[0],e={};for(const t of bt)if((t==null?void 0:t[1])in document){for(const[a,s]of t.entries())e[n[a]]=s;return e}return!1})(),yt={change:pe.fullscreenchange,error:pe.fullscreenerror};let oe={request(n=document.documentElement,e){return new Promise((t,o)=>{const a=()=>{oe.off("change",a),t()};oe.on("change",a);const s=n[pe.requestFullscreen](e);s instanceof Promise&&s.then(a).catch(o)})},exit(){return new Promise((n,e)=>{if(!oe.isFullscreen){n();return}const t=()=>{oe.off("change",t),n()};oe.on("change",t);const o=document[pe.exitFullscreen]();o instanceof Promise&&o.then(t).catch(e)})},toggle(n,e){return oe.isFullscreen?oe.exit():oe.request(n,e)},onchange(n){oe.on("change",n)},onerror(n){oe.on("error",n)},on(n,e){const t=yt[n];t&&document.addEventListener(t,e,!1)},off(n,e){const t=yt[n];t&&document.removeEventListener(t,e,!1)},raw:pe};Object.defineProperties(oe,{isFullscreen:{get:()=>!!document[pe.fullscreenElement]},element:{enumerable:!0,get:()=>document[pe.fullscreenElement]??void 0},isEnabled:{enumerable:!0,get:()=>!!document[pe.fullscreenEnabled]}});pe||(oe={isEnabled:!1});const ke=oe,Eo=O({__name:"index",props:{element:{default:"html"},openTips:{default:"全屏"},exitTips:{default:"退出全屏"},content:{type:Boolean,default:!1}},setup(n){const e=n,t=z(!1),o=w(()=>t.value?e.exitTips:e.openTips),a=w(()=>t.value?"fullscreen-exit":"fullscreen"),s=()=>{const u=document.querySelector(e.element)||void 0;ke.isEnabled?ke.toggle(u):_e.warning("您的浏览器无法工作")},r=()=>{t.value=ke.isFullscreen};Be(u=>{ke.on("change",r),u(()=>{ke.isEnabled&&ke.off("change",r)})});const i=z(!1),c=w(()=>i.value?"内容区复原":"内容区放大"),m=w(()=>i.value?"fullscreen-exit":"fullscreen"),S=()=>{document.body.className=i.value?"":"content-large",i.value=!i.value};return(u,I)=>{const k=x("SvgIcon"),A=x("el-tooltip"),l=x("el-dropdown-item"),p=x("el-dropdown-menu"),b=x("el-dropdown");return d(),C("div",null,[u.content?(d(),E(b,{key:1},{dropdown:h(()=>[v(p,null,{default:h(()=>[v(l,{onClick:S},{default:h(()=>[ve(K(c.value),1)]),_:1}),v(l,{onClick:s,disabled:t.value},{default:h(()=>[ve("内容区全屏")]),_:1},8,["disabled"])]),_:1})]),default:h(()=>[v(k,{name:m.value},null,8,["name"])]),_:1})):(d(),E(A,{key:0,effect:"dark",content:o.value,placement:"bottom"},{default:h(()=>[v(k,{name:a.value,onClick:s},null,8,["name"])]),_:1},8,["content"]))])}}}),Ut=U(Eo,[["__scopeId","data-v-9e7c36e4"]]),Lo=O({name:"Language",components:{},setup(){const n=z(localStorage.getItem(vt)||Ee.ZH),e=w(()=>({"icon-a-yuyanzhongwen":n.value===Ee.ZH,"icon-a-yuyanyingwen":n.value===Ee.EN,"icon-jp":n.value===Ee.JP}));return{MUL_LAN_OPTIONS:rn,currentLanguage:n,MUL_LAN_ENUM:Ee,iconfontClass:e,handleChangeLang:async o=>{n.value!==o&&(n.value=o,localStorage.setItem(vt,o),ln(cn[o]),await Lt().clearMenus(),location.reload())}}}});function To(n,e,t,o,a,s){const r=x("el-dropdown-item"),i=x("el-dropdown-menu"),c=x("el-dropdown");return d(),C("div",null,[v(c,{onCommand:n.handleChangeLang},{dropdown:h(()=>[v(i,null,{default:h(()=>[(d(!0),C(Q,null,te(n.MUL_LAN_OPTIONS,m=>(d(),E(r,{key:m.value,command:m.value},{default:h(()=>[ve(K(m.label),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:h(()=>[T("i",{class:Z(["iconfont",n.iconfontClass])},null,2)]),_:1},8,["onCommand"])])}const $o=U(Lo,[["render",To],["__scopeId","data-v-2480523d"]]),No={class:"search-menu-option"},zo={class:"search-menu-option__label"},Ro=["aria-label","aria-pressed","onClick","onKeydown"],Vo=O({__name:"index",setup(n){const e=be(),t=z(),o=z([]),{favoritesStore:a,flattenedMenus:s}=Ue(),r=w(()=>s.value),i=f=>!!(f!=null&&f.isIframe),c=f=>({label:f.breadcrumb,value:f.routeName??f.favoriteId??f.path,path:f.path,routeName:f.routeName??null,favoriteId:f.favoriteId??null,breadcrumb:f.breadcrumb,levels:f.levels.map(L=>({...L})),meta:f.meta?{...f.meta}:void 0}),m=Le(f=>{const L=f==null?void 0:f.toLocaleLowerCase().trim();if(!L){o.value=[];return}o.value=r.value.filter(R=>R.breadcrumb.toLocaleLowerCase().includes(L)).map(R=>c(R))},500),S=f=>{f?m(f):o.value=[]},u=f=>o.value.find(L=>L.value===f),I=f=>{if(!f){_e.warning(H("SearchMenu.index.273193-0"));return}const L=u(f);if(!L){_e.warning(H("SearchMenu.index.273193-0"));return}try{L.routeName?e.push({name:L.routeName}):e.push({path:L.path})}catch{_e.error(H("SearchMenu.index.273193-1"))}},k=f=>!!f.favoriteId&&!i(f.meta),A=f=>f.favoriteId?a.isFavorite(f.favoriteId):!1,l=f=>{const L=A(f)?H("favorites.action.remove"):H("favorites.action.add");return H("favorites.tooltip",{action:L,target:f.breadcrumb})},p=f=>{if(!f.favoriteId)return null;const L=f.meta?{...f.meta}:void 0;return{favoriteId:f.favoriteId,path:f.path,routeName:f.routeName,meta:L,levels:f.levels.map(R=>({...R}))}},b=f=>{if(!k(f))return;const L=p(f);L&&a.toggleFavorite(L)};return(f,L)=>{const R=x("el-tooltip"),V=x("el-option"),G=x("el-select");return d(),C("div",null,[v(G,{modelValue:t.value,"onUpdate:modelValue":L[0]||(L[0]=y=>t.value=y),filterable:"",remote:"",placeholder:_(H)("SearchMenu.index.273193-2"),"remote-method":S,onChange:I},{default:h(()=>[(d(!0),C(Q,null,te(o.value,y=>(d(),E(V,{key:y.value,label:y.label,value:y.value},{default:h(()=>[T("div",No,[T("span",zo,K(y.label),1),k(y)?(d(),E(R,{key:0,content:l(y),placement:"left"},{default:h(()=>[T("button",{type:"button",class:Z(["search-menu-option__favorite",{"is-active":A(y)}]),"aria-label":l(y),"aria-pressed":A(y),onClick:ie(N=>b(y),["stop"]),onKeydown:[Ie(ie(N=>b(y),["prevent","stop"]),["enter"]),Ie(ie(N=>b(y),["prevent","stop"]),["space"])]},[(d(),E(ge(A(y)?_(Tt):_($t)),{class:"search-menu-option__favorite-icon"}))],42,Ro)]),_:2},1032,["content"])):B("",!0)])]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])}}}),Po=U(Vo,[["__scopeId","data-v-213ced3c"]]),Oo={class:"fillAssistant"},Bo=O({__name:"index",setup(n){const e=z({nps:{npsNodeIdLv1:"CJ_LISTEN_JM_ISV",npsNodeIdLv2:"CJ_LISTEN_JM_ISV_SPOMS",token:"",npsStatus:!1}}),t=async()=>{var o,a,s,r,i;try{const c=await un(),m=((o=c==null?void 0:c.data)==null?void 0:o.depToken)??(c==null?void 0:c.depToken)??((a=c==null?void 0:c.data)==null?void 0:a.token)??(c==null?void 0:c.token);if(!m){_e.error((c==null?void 0:c.msg)??((s=c==null?void 0:c.data)==null?void 0:s.message)??"获取 Token 失败");return}e.value={nps:{npsNodeIdLv1:"CJ_LISTEN_JM_ISV",npsNodeIdLv2:"CJ_LISTEN_JM_ISV_SPOMS",token:m,npsStatus:!0}}}catch(c){_e.error(((i=(r=c==null?void 0:c.response)==null?void 0:r.data)==null?void 0:i.msg)??(c==null?void 0:c.message)??"获取 Token 失败")}};return Ae(()=>{var o;(o=window.JM_SHOP_MENU)==null||o.on("handleNpsStatus",a=>{console.log(a),_e.success(H("FillAssistant.index.262300-1"))})}),(o,a)=>{const s=x("chat-line-square"),r=x("el-icon"),i=x("el-tooltip"),c=x("shop-common-components");return d(),C("div",Oo,[v(i,{effect:"dark",content:_(H)("FillAssistant.index.262300-0"),placement:"bottom"},{default:h(()=>[v(r,{size:20,onClick:t},{default:h(()=>[v(s)]),_:1})]),_:1},8,["content"]),v(c,{customParams:e.value,type:"NPS"},null,8,["customParams"])])}}}),Wo="data:image/png;base64,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",Do={class:"auth-icon"},Uo=["src"],qo=O({__name:"index",setup(n){return(e,t)=>(d(),C("div",Do,[T("img",{src:_(Wo)},null,8,Uo),T("div",null,K(e.$t("Auth.index.773439-0")),1)]))}}),Jo=U(qo,[["__scopeId","data-v-49d552e1"]]),Ko=n=>(Xe("data-v-f0af1951"),n=n(),je(),n),Ho={class:"favorites-quick-entry"},Zo=["aria-label","aria-expanded"],Go=Ko(()=>T("span",{class:"favorites-quick-entry__icon iconfont icon-kuaijiecaozuo-01","aria-hidden":"true"},null,-1)),Qo={class:"favorites-popover__header"},Yo={class:"favorites-popover__title"},Xo={class:"favorites-popover__subtitle"},jo={key:0,class:"favorites-popover__list",role:"listbox","aria-multiselectable":!1},ea=["onClick"],ta=["title"],na=["title"],oa=["aria-label","title","onClick"],aa={key:1,class:"favorites-popover__empty"},sa={class:"favorites-popover__footer"},ra=O({__name:"FavoritesQuickEntry",setup(n){const{favoritesStore:e}=Ue(),t=be(),o=z(!1),a=`favorites-popover-${Math.random().toString(36).slice(2)}`,s=`favorites-popover-trigger-${Math.random().toString(36).slice(2)}`,r=w(()=>_(e.favoriteDisplayItems)??[]),i=y=>{var ne,q,ae,me,Se;const N=(q=(ne=y.meta)==null?void 0:ne.title)==null?void 0:q.trim();if(N)return N;const ee=(ae=y.levels)!=null&&ae.length?y.levels[y.levels.length-1]:null,W=(me=ee==null?void 0:ee.title)==null?void 0:me.trim();if(W)return W;const X=(Se=y.breadcrumb)==null?void 0:Se.trim();return X||y.path},c=y=>{var X,ne,q,ae,me;const N=(X=y.breadcrumb)==null?void 0:X.trim();if(N)return N;const ee=(q=(ne=y.breadcrumbDisplay)==null?void 0:ne.tooltip)==null?void 0:q.trim();if(ee)return ee;const W=(me=(ae=y.breadcrumbDisplay)==null?void 0:ae.display)==null?void 0:me.trim();return W||y.path},m=w(()=>r.value.map(y=>{const N=Bt(y.breadcrumb,48);return{...y,breadcrumbDisplay:N,titleDisplay:i(y),descriptionDisplay:c({...y,breadcrumbDisplay:N})}})),S=w(()=>m.value.length),u=w(()=>e.maxFavorites),I=w(()=>m.value.slice(0,u.value)),k=w(()=>S.value>0),A=w(()=>S.value.toString());let l=null;t!=null&&t.afterEach&&(l=t.afterEach(()=>{o.value=!1})),Qe(()=>{l==null||l(),l=null});const p=()=>{o.value=!1};se(o,async y=>{if(y){await he();const N=document.querySelector(".favorites-popover");N&&N.getAttribute("aria-hidden")==="true"&&N.removeAttribute("aria-hidden")}});const b=y=>{const N=y.meta;return!!(N!=null&&N.isIframe)},f=y=>{const N=y.meta;return N!=null&&N.url&&N.url.trim().length>0?`${window.location.origin}/index.php?${N.url}`:null},L=async y=>{try{if(b(y)){const N=f(y);N?window.open(N,"_blank"):y.path&&await t.push({path:y.path})}else y.routeName?await t.push({name:y.routeName}):y.path&&await t.push({path:y.path});p()}catch{}},R=y=>{L(y)},V=y=>{e.removeFavorite(y)},G=async()=>{if(k.value)try{await Ze.confirm(H("favorites.drawer.clearConfirm"),H("favorites.drawer.clearTitle"),{type:"warning"}),e.clearFavorites()}catch{}};return(y,N)=>{const ee=x("el-badge"),W=x("el-icon"),X=x("el-button"),ne=x("el-popover");return d(),C("div",Ho,[v(ne,{visible:o.value,"onUpdate:visible":N[3]||(N[3]=q=>o.value=q),placement:"bottom",trigger:"hover","show-after":100,"hide-after":150,"popper-class":"favorites-popover",width:620},{reference:h(()=>[T("button",{id:s,type:"button",class:"favorites-quick-entry__button","aria-label":_(H)("favorites.drawer.triggerTooltip"),"aria-haspopup":"dialog","aria-expanded":o.value?"true":"false","aria-controls":a,onKeydown:[N[0]||(N[0]=Ie(ie(q=>o.value=!0,["prevent"]),["enter"])),N[1]||(N[1]=Ie(ie(q=>o.value=!0,["prevent"]),["space"]))],onFocus:N[2]||(N[2]=q=>o.value=!0),onBlur:p},[v(ee,{value:A.value,class:"favorites-quick-entry__badge"},{default:h(()=>[Go]),_:1},8,["value"])],40,Zo)]),default:h(()=>[T("section",{class:"favorites-popover__panel",id:a,role:"dialog","aria-labelledby":s},[T("header",Qo,[T("p",Yo,K(_(H)("favorites.drawer.title")),1),T("p",Xo,K(_(H)("favorites.drawer.subtitle")),1)]),k.value?(d(),C("div",jo,[(d(!0),C(Q,null,te(I.value,q=>(d(),C("article",{key:q.favoriteId,class:"favorites-popover__item"},[T("button",{type:"button",class:"favorites-popover__link",onClick:ae=>R(q)},[T("span",{class:"favorites-popover__name",title:q.titleDisplay},K(q.titleDisplay),9,ta),T("span",{class:"favorites-popover__breadcrumb",title:q.descriptionDisplay},K(q.descriptionDisplay),9,na)],8,ea),T("button",{type:"button",class:"favorites-popover__remove","aria-label":_(H)("favorites.drawer.remove"),title:_(H)("favorites.drawer.remove"),onClick:ie(ae=>V(q.favoriteId),["stop"])},[v(W,{size:"14"},{default:h(()=>[v(_(Nt))]),_:1})],8,oa)]))),128))])):(d(),C("div",aa,[v(dn,{name:"empty",class:"favorites-popover__empty-icon"}),T("p",null,K(_(H)("favorites.drawer.empty")),1)])),T("footer",sa,[v(X,{type:"danger",link:"",size:"small",class:"favorites-popover__clear",disabled:!k.value,onClick:G},{default:h(()=>[ve(K(_(H)("favorites.drawer.clearAll")),1)]),_:1},8,["disabled"])])])]),_:1},8,["visible"])])}}}),la=U(ra,[["__scopeId","data-v-f0af1951"]]),ia=O({__name:"index",props:{isActive:{type:Boolean,default:!1}},emits:["toggleClick"],setup(n,{emit:e}){const t=n,o=e,a=()=>{o("toggleClick")};return(s,r)=>{const i=x("el-icon");return d(),C("div",{onClick:a},[v(i,{size:20,class:"icon"},{default:h(()=>[t.isActive?(d(),E(_(bn),{key:0})):(d(),E(_(yn),{key:1}))]),_:1})])}}}),ca=U(ia,[["__scopeId","data-v-7b0e0588"]]),qt=n=>(Xe("data-v-d924d72e"),n=n(),je(),n),ua={class:"navigation-bar"},da={class:"right-menu"},fa={class:"right-menu-avatar"},va=qt(()=>T("span",{style:{display:"block"}},"退出登录",-1)),ma=qt(()=>T("span",{style:{display:"block"}},"修改密码",-1)),pa=O({__name:"index",setup(n){const e=z({login_name:""}),t=be();Ae(async()=>{const f=await fn();e.value.login_name=f.login_name});const o=ye(),a=ce(),{sidebar:s,device:r}=re(o),{layoutMode:i,showNotify:c,showThemeSwitch:m,showScreenfull:S,showSearchMenu:u}=re(a),I=w(()=>i.value==="top"),k=w(()=>r.value===fe.Mobile),A=()=>{o.toggleSidebar(!1),o.closeMeun()},l=()=>{o.toggleMeun(),o.openSidebar()},p=()=>{window.localStorage.clear();const f=Ct();location.replace(`${f}/index.php?ctl=passport&act=logout`)},b=()=>{t.push({path:"/update-password"})};return(f,L)=>{const R=x("el-avatar"),V=x("el-dropdown-item"),G=x("el-dropdown-menu"),y=x("el-dropdown");return d(),C("div",ua,[!I.value||k.value?(d(),E(Un,{key:0,"is-active":_(s).opened,class:"hamburger",onToggleClick:A},null,8,["is-active"])):B("",!0),!I.value||k.value?(d(),E(ca,{key:1,"is-active":_(s).isMeun,class:"hamburger",onToggleClick:l},null,8,["is-active"])):B("",!0),!I.value||k.value?(d(),E(Jn,{key:2,class:"breadcrumb"})):B("",!0),I.value&&!k.value?(d(),E(it,{key:3,class:"sidebar"})):B("",!0),T("div",da,[_(u)?(d(),E(Po,{key:0,class:"right-menu-item"})):B("",!0),v(la,{class:"right-menu-item"}),v($o,{class:"right-menu-item"}),v(Bo,{class:"right-menu-item"}),_(S)?(d(),E(Ut,{key:1,class:"right-menu-item"})):B("",!0),_(m)?(d(),E(Fo,{key:2,class:"right-menu-item"})):B("",!0),_(c)?(d(),E(Mo,{key:3,class:"right-menu-item"})):B("",!0),v(Jo,{class:"right-menu-item"}),v(y,{class:"right-menu-item"},{dropdown:h(()=>[v(G,null,{default:h(()=>[v(V,{divided:"",onClick:p},{default:h(()=>[va]),_:1}),v(V,{divided:"",onClick:b},{default:h(()=>[ma]),_:1})]),_:1})]),default:h(()=>[T("div",fa,[v(R,{icon:_(Sn),size:30},null,8,["icon"]),T("span",null,K(e.value.login_name),1)])]),_:1})])])}}}),ct=U(pa,[["__scopeId","data-v-d924d72e"]]),_a={class:"select-layout-mode"},ha=O({__name:"SelectLayoutMode",setup(n){const e=ce(),{layoutMode:t}=re(e),o=w(()=>t.value==="left"),a=w(()=>t.value==="top"),s=w(()=>t.value==="left-top");return(r,i)=>{const c=x("el-aside"),m=x("el-header"),S=x("el-main"),u=x("el-container"),I=x("el-tooltip");return d(),C("div",_a,[v(I,{content:"左侧模式"},{default:h(()=>[v(u,{class:Z(["layout-mode left",{active:o.value}]),onClick:i[0]||(i[0]=k=>t.value="left")},{default:h(()=>[v(c),v(u,null,{default:h(()=>[v(m),v(S)]),_:1})]),_:1},8,["class"])]),_:1}),v(I,{content:"顶部模式"},{default:h(()=>[v(u,{class:Z(["layout-mode top",{active:a.value}]),onClick:i[1]||(i[1]=k=>t.value="top")},{default:h(()=>[v(m),v(S)]),_:1},8,["class"])]),_:1}),v(I,{content:"混合模式"},{default:h(()=>[v(u,{class:Z(["layout-mode left-top",{active:s.value}]),onClick:i[2]||(i[2]=k=>t.value="left-top")},{default:h(()=>[v(m),v(u,null,{default:h(()=>[v(c),v(S)]),_:1})]),_:1},8,["class"])]),_:1})])}}}),ga=U(ha,[["__scopeId","data-v-e7938886"]]),Jt=n=>(Xe("data-v-317305d5"),n=n(),je(),n),ba={class:"setting-container"},ya=Jt(()=>T("h4",null,"布局配置",-1)),Sa=Jt(()=>T("h4",null,"功能配置",-1)),ka={class:"setting-name"},wa=O({__name:"index",setup(n){const e=ce(),{layoutMode:t,showTagsView:o,showLogo:a,fixedHeader:s,showFooter:r,showNotify:i,showThemeSwitch:c,showScreenfull:m,showSearchMenu:S,cacheTagsView:u,showWatermark:I,showGreyMode:k,showColorWeakness:A}=re(e),l={显示标签栏:o,"显示 Logo":a,"固定 Header":s,"显示页脚 Footer":r,显示消息通知:i,显示切换主题按钮:c,显示全屏按钮:m,显示搜索按钮:S,是否缓存标签栏:u,开启系统水印:I,显示灰色模式:k,显示色弱模式:A};return Be(()=>{t.value!=="left"&&(s.value=!0)}),(p,b)=>{const f=x("el-divider"),L=x("el-switch"),R=x("el-button");return d(),C("div",ba,[ya,v(ga),v(f),Sa,(d(),C(Q,null,te(l,(V,G,y)=>T("div",{class:"setting-item",key:y},[T("span",ka,K(G),1),v(L,{modelValue:V.value,"onUpdate:modelValue":N=>V.value=N,disabled:_(t)!=="left"&&G==="固定 Header"},null,8,["modelValue","onUpdate:modelValue","disabled"])])),64)),v(R,{type:"danger",icon:_(kn),onClick:_(vn)},{default:h(()=>[ve("重 置")]),_:1},8,["icon","onClick"])])}}}),Ia=U(wa,[["__scopeId","data-v-317305d5"]]),Aa={class:"scroll-container"},Ca=200,xa=O({__name:"ScrollPane",props:{tagRefs:{}},setup(n){const e=n,t=Ne(),o=ce(),{listenerRouteChange:a}=De(),s=z(),r=z();let i=0;const c=({scrollLeft:k})=>{i=k},m=({deltaY:k})=>{/^-/.test(k.toString())?u("left"):u("right")},S=()=>{const k=r.value.clientWidth,A=s.value.wrapRef.clientWidth,l=k-A-i;return{scrollbarContentRefWidth:k,scrollbarRefWidth:A,lastDistance:l}},u=(k,A=Ca)=>{let l=0;const{scrollbarContentRefWidth:p,scrollbarRefWidth:b,lastDistance:f}=S();b>p||(k==="left"?l=Math.max(0,i-A):l=Math.min(i+A,i+f),s.value.setScrollLeft(l))},I=()=>{const k=e.tagRefs;for(let A=0;A<k.length;A++)if(t.path===k[A].$props.to.path){const l=k[A].$el,p=l.offsetWidth,b=l.offsetLeft,{scrollbarRefWidth:f}=S();if(b<i){const R=i-b;u("left",R);return}const L=f+i-p;if(b>L){const R=b-L;u("right",R);return}}};return a(()=>{he(I)}),(k,A)=>{const l=x("el-icon");return d(),C("div",Aa,[v(l,{class:"arrow left",onClick:A[0]||(A[0]=p=>u("left"))},{default:h(()=>[v(_(wn))]),_:1}),v(_(In),{ref_key:"scrollbarRef",ref:s,onWheelPassive:m,onScroll:c},{default:h(()=>[T("div",{ref_key:"scrollbarContentRef",ref:r,class:"scrollbar-content"},[Oe(k.$slots,"default",{},void 0,!0)],512)]),_:3},512),v(l,{class:"arrow right",onClick:A[1]||(A[1]=p=>u("right"))},{default:h(()=>[v(_(An))]),_:1}),_(o).showScreenfull?(d(),E(Ut,{key:0,element:".app-main",content:!0,class:"screenfull"})):B("",!0)])}}}),Ma=U(xa,[["__scopeId","data-v-519b3baa"]]),Fa={class:"tags-view-container"},Ea=["aria-label","onKeydown"],La=O({__name:"index",setup(n){const e=kt(),t=be(),o=Ne(),a=et(),s=mn(),{listenerRouteChange:r}=De(),{favoritesStore:i,flattenedMenus:c}=Ue(),m=w(()=>{const g=new Map;return c.value.forEach(M=>{g.set(M.path,M),M.routeName&&g.set(`name:${String(M.routeName)}`,M),g.set(M.favoriteId,M)}),g}),S=w(()=>{const g=W.value;if(!g)return null;const M=g.path??g.fullPath??"",$=typeof g.name=="string"?`name:${g.name}`:null;return M&&m.value.get(M)||($?m.value.get($):null)}),u=w(()=>{var F;const g=W.value;if(!g)return[];const M=((F=g.meta)==null?void 0:F.title)??g.path??g.fullPath??"",$=A.value??M;return M?[{id:$,title:M}]:[]}),I=w(()=>{var g;return((g=S.value)==null?void 0:g.levels)??u.value}),k=w(()=>{var g,M;return!!((M=(g=W.value)==null?void 0:g.meta)!=null&&M.isIframe)}),A=w(()=>{var $,F;const g=S.value;if(g)return g.favoriteId;const M=W.value;return M?Wt({favoriteId:(($=M.meta)==null?void 0:$.favoriteId)??null,id:((F=M.meta)==null?void 0:F.id)??null,path:M.path??M.fullPath??void 0,routeName:M.name??null}):null}),l=w(()=>{var M,$;if((M=S.value)!=null&&M.breadcrumb)return S.value.breadcrumb;const g=W.value;return g?Dt(I.value,(($=g.meta)==null?void 0:$.title)??void 0,g.path??g.fullPath??void 0):""}),p=w(()=>!(!A.value||!W.value||k.value)),b=w(()=>!p.value||!A.value?!1:i.isFavorite(A.value)),f=w(()=>b.value?H("favorites.action.remove"):H("favorites.action.add")),L=w(()=>{const g=l.value;return g?H("favorites.tooltip",{action:f.value,target:g}):f.value}),R=()=>{const g=S.value;if(g)return{favoriteId:g.favoriteId,routeName:g.routeName??null,path:g.path,meta:g.meta?{...g.meta}:void 0,levels:g.levels.map(F=>({...F}))};const M=W.value;if(!M||!A.value||!M.path)return null;const $=M.meta?{...M.meta}:void 0;return{favoriteId:A.value,routeName:M.name??null,path:M.path,meta:$,levels:I.value.map(F=>({...F}))}},V=()=>{if(!p.value)return;const g=R();g&&(i.toggleFavorite(g),Fe())},G=z([]),y=z(!1),N=z(0),ee=z(0),W=z({});let X=[];const ne=g=>g.path===o.path,q=g=>{var M;return(M=g.meta)==null?void 0:M.affix},ae=(g,M="/")=>{const $=[];return g.forEach(F=>{if(q(F)){const P=lt.resolve(M,F.path);$.push({fullPath:P,path:P,name:F.name,meta:{...F.meta}})}if(F.children){const P=ae(F.children,F.path);$.push(...P)}}),$},me=()=>{X=ae(s.routes);for(const g of X)g.name&&a.addVisitedView(g)},Se=g=>{g.name&&(a.addVisitedView(g),a.addCachedView(g))},Me=g=>{a.delVisitedView(g),a.delCachedView(g),ne(g)&&Re(a.visitedViews,g)},ze=()=>{const g=W.value.fullPath;g!==o.path&&g!==void 0&&t.push(g),a.delOthersVisitedViews(W.value),a.delOthersCachedViews(W.value)},qe=g=>{a.delAllVisitedViews(),a.delAllCachedViews(),!X.some(M=>M.path===o.path)&&Re(a.visitedViews,g)},Re=(g,M)=>{const $=g.slice(-1)[0],F=$==null?void 0:$.fullPath;F!==void 0?t.push(F):M.name==="Dashboard"?t.push({path:"/redirect"+M.path,query:M.query}):t.push("/")},Ve=(g,M)=>{const F=e.proxy.$el.getBoundingClientRect().left,D=e.proxy.$el.offsetWidth-105,Y=M.clientX-F+15;ee.value=Y>D?D:Y,N.value=M.clientY,y.value=!0,W.value=g},Fe=()=>{y.value=!1};return se(y,g=>{g?document.body.addEventListener("click",Fe):document.body.removeEventListener("click",Fe)}),Ae(()=>{me(),r(async g=>{Se(g)},!0)}),(g,M)=>{const $=x("el-icon");return d(),C("div",Fa,[v(Ma,{class:"tags-view-wrapper","tag-refs":G.value},{default:h(()=>[(d(!0),C(Q,null,te(_(a).visitedViews,F=>(d(),E(_(Xt),{ref_for:!0,ref_key:"tagRefs",ref:G,key:F.path,class:Z([{active:ne(F)},"tags-view-item"]),to:{path:F.path,query:F.query},onMouseup:ie(P=>!q(F)&&Me(F),["middle"]),onContextmenu:ie(P=>Ve(F,P),["prevent"])},{default:h(()=>{var P;return[ve(K((P=F.meta)==null?void 0:P.title)+" ",1),q(F)?B("",!0):(d(),E($,{key:0,size:12,onClick:ie(D=>Me(F),["prevent","stop"])},{default:h(()=>[v(_(Nt))]),_:2},1032,["onClick"]))]}),_:2},1032,["class","to","onMouseup","onContextmenu"]))),128))]),_:1},8,["tag-refs"]),Ce(T("ul",{class:"contextmenu",role:"menu",style:Ye({left:ee.value+"px",top:N.value+"px"})},[p.value?(d(),C("li",{key:0,class:"contextmenu__item contextmenu__item--favorite",role:"menuitem",tabindex:"0","aria-label":L.value,onClick:V,onKeydown:[Ie(ie(V,["prevent"]),["enter"]),Ie(ie(V,["prevent"]),["space"])]},K(f.value),41,Ea)):B("",!0),q(W.value)?B("",!0):(d(),C("li",{key:1,role:"menuitem",tabindex:"0",onClick:M[0]||(M[0]=F=>Me(W.value))},"关闭")),T("li",{role:"menuitem",tabindex:"0",onClick:ze},"关闭其它"),T("li",{role:"menuitem",tabindex:"0",onClick:M[1]||(M[1]=F=>qe(W.value))},"关闭所有")],4),[[xe,y.value]])])}}}),ut=U(La,[["__scopeId","data-v-64ed8af9"]]),Ta=O({__name:"index",props:{buttonTop:{default:350}},setup(n){At(a=>({62325099:t}));const t=n.buttonTop+"px",o=z(!1);return(a,s)=>{x("el-icon");const r=x("el-drawer");return d(),C(Q,null,[B("",!0),v(r,{modelValue:o.value,"onUpdate:modelValue":s[1]||(s[1]=i=>o.value=i),size:"300px","with-header":!1},{default:h(()=>[Oe(a.$slots,"default",{},void 0,!0)]),_:3},8,["modelValue"])],64)}}}),$a=U(Ta,[["__scopeId","data-v-8d38f349"]]),Na=O({__name:"LeftMode",setup(n){const e=ye(),t=ce(),{showTagsView:o,fixedHeader:a}=re(t),s=w(()=>({hideSidebar:!e.sidebar.opened,openSidebar:e.sidebar.opened,withoutAnimation:e.sidebar.withoutAnimation,mobile:e.device===fe.Mobile})),r=()=>{e.closeSidebar(!1)};return(i,c)=>(d(),C("div",{class:Z([s.value,"app-wrapper"])},[s.value.mobile&&s.value.openSidebar?(d(),C("div",{key:0,class:"drawer-bg",onClick:r})):B("",!0),v(_(it),{class:"sidebar-container"}),T("div",{class:Z([{hasTagsView:_(o)},"main-container"])},[T("div",{class:Z([{"fixed-header":_(a)},"layout-header"])},[v(_(ct)),Ce(v(_(ut),null,null,512),[[xe,_(o)]])],2),v(_(tt),{class:"app-main"})],2)],2))}}),za=U(Na,[["__scopeId","data-v-e4c77bfc"]]),Ra={class:"app-wrapper"},Va={class:"fixed-header layout-header"},Pa={class:"content"},Oa=O({__name:"TopMode",setup(n){const e=ce(),{showTagsView:t,showLogo:o}=re(e);return(a,s)=>(d(),C("div",Ra,[T("div",Va,[T("div",Pa,[_(o)?(d(),E(_(nt),{key:0,collapse:!1,class:"logo"})):B("",!0),v(_(ct),{class:"navigation-bar"})]),Ce(v(_(ut),null,null,512),[[xe,_(t)]])]),T("div",{class:Z([{hasTagsView:_(t)},"main-container"])},[v(_(tt),{class:"app-main"})],2)]))}}),Ba=U(Oa,[["__scopeId","data-v-5a9c676b"]]),Wa={class:"fixed-header layout-header"},Da={class:"content"},Ua=O({__name:"LeftTopMode",setup(n){const e=ye(),t=ce(),{showTagsView:o,showLogo:a}=re(t),s=w(()=>({hideSidebar:!e.sidebar.opened}));return(r,i)=>(d(),C("div",{class:Z([s.value,"app-wrapper"])},[T("div",Wa,[_(a)?(d(),E(_(nt),{key:0,collapse:!1,class:"logo"})):B("",!0),T("div",Da,[v(_(ct)),Ce(v(_(ut),null,null,512),[[xe,_(o)]])])]),T("div",{class:Z([{hasTagsView:_(o)},"main-container"])},[v(_(it),{class:"sidebar-container"}),v(_(tt),{class:"app-main"})],2)],2))}}),qa=U(Ua,[["__scopeId","data-v-73d109f7"]]),He="--v3-tagsview-height",Ja=O({__name:"index",setup(n){Fn();const{setWatermark:e,clearWatermark:t}=Ln(),o=ye(),a=ce(),{showSettings:s,layoutMode:r,showTagsView:i,showWatermark:c,showGreyMode:m,showColorWeakness:S}=re(a),u=w(()=>({showGreyMode:m.value,showColorWeakness:S.value})),I=Pe(He);return Be(()=>{i.value?mt(He,I):mt(He,"0px")}),Be(()=>{c.value?e("智能运营中台"):t()}),(k,A)=>(d(),C("div",{class:Z(u.value)},[_(r)==="left"||_(o).device===_(fe).Mobile?(d(),E(za,{key:0})):_(r)==="top"?(d(),E(Ba,{key:1})):_(r)==="left-top"?(d(),E(qa,{key:2})):B("",!0),_(s)?(d(),E(_($a),{key:3},{default:h(()=>[v(_(Ia))]),_:1})):B("",!0)],2))}}),Ga=U(Ja,[["__scopeId","data-v-45f3bd78"]]);export{Ga as default};
|