mirror of
https://github.com/vastxie/99AI.git
synced 2025-09-19 18:16:39 +08:00
13 lines
39 KiB
JavaScript
13 lines
39 KiB
JavaScript
|
|
/**
|
|
* 由 Fantastic-admin 提供技术支持
|
|
* Powered by Fantastic-admin
|
|
* https://fantastic-admin.github.io
|
|
*/
|
|
|
|
import{aH as At,aI as Ft,aJ as Lt,aK as zt,aL as Dt,aM as $t,aN as Kt,F as je,af as Ut,aO as Yt,aP as Gt,aQ as Xt,a3 as Zt,aR as qt,aS as Qt,ad as Jt,ag as He,aT as en,aU as tn,aV as nn,aW as on,aX as an,aY as ln,aZ as sn,a1 as rn,a_ as un,p as Ae,a$ as cn,z as Fe,A as Me,c as re,e as ue,b0 as dn,b1 as fn,b2 as mn,b3 as pn,b4 as vn,b5 as hn,h as Le,b as Ie,b6 as bn,b7 as Cn,d as ze,b8 as kn,b9 as xn,ba as gn,bb as yn,bc as Sn,bd as Mn,be as In,bf as Bn,bg as wn,bh as Pn,bi as Rn,aG as Wn,bj as En,bk as On,au as Nn,a4 as Tn,bl as _n,bm as Vn,bn as jn,bo as Hn,bp as An,$ as Fn,bq as Ln,br as zn,bs as Dn,bt as $n,D as Kn,bu as Un,bv as Yn,a9 as Gn,bw as Xn,bx as Zn,av as qn,X as Qn,G as Jn,Q as De,at as eo,R as to,by as no,bz as oo,a0 as ao,ah as $e,bA as lo,bB as so,a as Ke,bC as io,bD as ro,bE as uo,bF as co,S as Ue,bG as fo,g as se,U as Ye,a7 as mo,bH as po,T as Ge,bI as vo,m as ho,bJ as bo,r as me,bK as Co,bL as ko,s as Xe,P as xo,n as go,q as yo,ae as So,bM as Mo,bN as Io,bO as Bo,bP as wo,bQ as Po,bR as Ro,bS as Wo,a2 as Ze,bT as Eo,bU as Oo,bV as No,t as Be,bW as To,bX as _o,bY as Vo,a8 as jo,bZ as Ho,b_ as Ao,b$ as Fo,c0 as Lo,i as le,W as zo,c1 as Do,c2 as $o,aw as Ko,c3 as Uo,O as Yo,c4 as Go,c5 as Xo,c6 as Zo,c7 as qo,c8 as Qo,am as Jo,M as qe,c9 as ea,ca as ta,Z as Qe,cb as na,cc as oa,cd as aa,ce as la,w as Je,cf as sa,y as et,v as ia,cg as ra,x as we,ch as ua,ci as ca,cj as da,a6 as fa,ck as ma,aa as pa,N as tt,f as nt,as as Pe,u as va,ac as Ve,j as ha,l as ba}from"./index-DEc4xym2.js";import{b as Ca}from"./index-DmaX5UJ_.js";import{u as ka}from"./useMainPage-qAU7S-kt.js";/**
|
|
* vue v3.4.27
|
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
* @license MIT
|
|
**/const xa=()=>{},ga=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:At,BaseTransitionPropsValidators:Ft,Comment:Lt,DeprecationTypes:zt,EffectScope:Dt,ErrorCodes:$t,ErrorTypeStrings:Kt,Fragment:je,KeepAlive:Ut,ReactiveEffect:Yt,Static:Gt,Suspense:Xt,Teleport:Zt,Text:qt,TrackOpTypes:Qt,Transition:Jt,TransitionGroup:He,TriggerOpTypes:en,VueElement:tn,assertNumber:nn,callWithAsyncErrorHandling:on,callWithErrorHandling:an,camelize:ln,capitalize:sn,cloneVNode:rn,compatUtils:un,compile:xa,computed:Ae,createApp:cn,createBlock:Fe,createCommentVNode:Me,createElementBlock:re,createElementVNode:ue,createHydrationRenderer:dn,createPropsRestProxy:fn,createRenderer:mn,createSSRApp:pn,createSlots:vn,createStaticVNode:hn,createTextVNode:Le,createVNode:Ie,customRef:bn,defineAsyncComponent:Cn,defineComponent:ze,defineCustomElement:kn,defineEmits:xn,defineExpose:gn,defineModel:yn,defineOptions:Sn,defineProps:Mn,defineSSRCustomElement:In,defineSlots:Bn,devtools:wn,effect:Pn,effectScope:Rn,getCurrentInstance:Wn,getCurrentScope:En,getTransitionRawChildren:On,guardReactiveProps:Nn,h:Tn,handleError:_n,hasInjectionContext:Vn,hydrate:jn,initCustomFormatter:Hn,initDirectivesForSSR:An,inject:Fn,isMemoSame:Ln,isProxy:zn,isReactive:Dn,isReadonly:$n,isRef:Kn,isRuntimeOnly:Un,isShallow:Yn,isVNode:Gn,markRaw:Xn,mergeDefaults:Zn,mergeModels:qn,mergeProps:Qn,nextTick:Jn,normalizeClass:De,normalizeProps:eo,normalizeStyle:to,onActivated:no,onBeforeMount:oo,onBeforeUnmount:ao,onBeforeUpdate:$e,onDeactivated:lo,onErrorCaptured:so,onMounted:Ke,onRenderTracked:io,onRenderTriggered:ro,onScopeDispose:uo,onServerPrefetch:co,onUnmounted:Ue,onUpdated:fo,openBlock:se,popScopeId:Ye,provide:mo,proxyRefs:po,pushScopeId:Ge,queuePostFlushCb:vo,reactive:ho,readonly:bo,ref:me,registerRuntimeCompiler:Co,render:ko,renderList:Xe,renderSlot:xo,resolveComponent:go,resolveDirective:yo,resolveDynamicComponent:So,resolveFilter:Mo,resolveTransitionHooks:Io,setBlockTracking:Bo,setDevtoolsHook:wo,setTransitionHooks:Po,shallowReactive:Ro,shallowReadonly:Wo,shallowRef:Ze,ssrContextKey:Eo,ssrUtils:Oo,stop:No,toDisplayString:Be,toHandlerKey:To,toHandlers:_o,toRaw:Vo,toRef:jo,toRefs:Ho,toValue:Ao,transformVNodeArgs:Fo,triggerRef:Lo,unref:le,useAttrs:zo,useCssModule:Do,useCssVars:$o,useModel:Ko,useSSRContext:Uo,useSlots:Yo,useTransitionState:Go,vModelCheckbox:Xo,vModelDynamic:Zo,vModelRadio:qo,vModelSelect:Qo,vModelText:Jo,vShow:qe,version:ea,warn:ta,watch:Qe,watchEffect:na,watchPostEffect:oa,watchSyncEffect:aa,withAsyncContext:la,withCtx:Je,withDefaults:sa,withDirectives:et,withKeys:ia,withMemo:ra,withModifiers:we,withScopeId:ua},Symbol.toStringTag,{value:"Module"}));var Re={exports:{}};const ya=ca(ga);(function(q,M){(function(l,e){e(M,ya)})(da,function(l,e){let P=null;function L(){return P!==null}function ne(t){P&&D(),P=t}function ae(t){t===P&&(P=null)}function D(){P&&(P.closeMenu(),P=null)}const k={defaultDirection:"br",defaultMinWidth:100,defaultMaxWidth:600,defaultZindex:100,defaultAdjustPadding:{x:0,y:10}};function R(t,n){let r=t.offsetTop;return t.offsetParent!=null&&t.offsetParent!=n&&(r-=t.offsetParent.scrollTop,r+=R(t.offsetParent,n)),r}function f(t,n){let r=t.offsetLeft;return t.offsetParent!=null&&t.offsetParent!=n&&(r-=t.offsetParent.scrollLeft,r+=f(t.offsetParent,n)),r}function V(t,n,r,p){return{x:f(t,p)+n,y:R(t,p)+r}}const x="mx-menu-default-container",a="mx-menu-container-";let m=0;function u(t){const{getContainer:n,zIndex:r}=t;if(n){const g=typeof n=="function"?n():n;if(g){let I=g.getAttribute("id");return I||(I=a+m++,g.setAttribute("id",I)),{eleId:I,container:g,isNew:!1}}}let p=document.getElementById(x);return p||(p=document.createElement("div"),p.setAttribute("id",x),p.setAttribute("class","mx-menu-ghost-host fullscreen"),document.body.appendChild(p)),p.style.zIndex=(r==null?void 0:r.toString())||k.defaultZindex.toString(),{eleId:x,container:p,isNew:!0}}function h(t){return typeof t=="number"?`${t}px`:t}const v=e.defineComponent({props:{vnode:{type:null},data:{type:null,default:null}},setup(t){const{vnode:n,data:r}=e.toRefs(t);return()=>typeof n.value=="function"?n.value(r.value):n.value}}),S=(t,n)=>{const r=t.__vccOpts||t;for(const[p,g]of n)r[p]=g;return r},Q={},oe={class:"mx-checked-mark","aria-hidden":"true",viewBox:"0 0 1024 1024"},lt=[e.createElementVNode("path",{d:"M129.3,428.6L52,512l345,372.5l575-620.8l-69.5-75L400.4,718.2L129.3,428.6z"},null,-1)];function st(t,n){return e.openBlock(),e.createElementBlock("svg",oe,lt)}const it=S(Q,[["render",st]]),rt={},ut={class:"mx-right-arrow","aria-hidden":"true",viewBox:"0 0 1024 1024"},ct=[e.createElementVNode("path",{d:"M307.018 49.445c11.517 0 23.032 4.394 31.819 13.18L756.404 480.18c8.439 8.438 13.181 19.885 13.181 31.82s-4.741 23.38-13.181 31.82L338.838 961.376c-17.574 17.573-46.065 17.573-63.64-0.001-17.573-17.573-17.573-46.065 0.001-63.64L660.944 512 275.198 126.265c-17.574-17.573-17.574-46.066-0.001-63.64C283.985 53.839 295.501 49.445 307.018 49.445z"},null,-1)];function dt(t,n){return e.openBlock(),e.createElementBlock("svg",ut,ct)}const We=S(rt,[["render",dt]]),ft={class:"mx-item-row"},mt=["xlink:href"],pt={key:1,class:"label"},vt={class:"mx-item-row"},ht={class:"mx-shortcut"},pe=e.defineComponent({__name:"ContextMenuItem",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},customRender:{type:Function,default:null},customClass:{type:String,default:""},clickHandler:{type:Function,default:null},label:{type:[String,Object,Function],default:""},icon:{type:[String,Object,Function],default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},hasChildren:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},clickableWhenHasChildren:{type:Boolean,default:!1},rawMenuItem:{type:Object,default:void 0}},emits:["click","subMenuOpen","subMenuClose"],setup(t,{expose:n,emit:r}){const p=t,g=r,{clickHandler:I,clickClose:s,clickableWhenHasChildren:H,disabled:E,hidden:b,label:o,icon:z,iconFontClass:F,showRightArrow:G,shortcut:j,hasChildren:B}=e.toRefs(p),w=e.ref(!1),C=e.ref(!1),d=e.ref(),y=e.inject("globalOptions"),O=e.inject("globalHasSlot"),c=e.inject("globalRenderSlot"),A=e.inject("globalCloseMenu"),_=e.inject("menuContext"),$={showSubMenu:()=>w.value?(_.markActiveMenuItem($,!0),!0):B.value?(J(),!0):!1,isDisabledOrHidden:()=>E.value||b.value,getElement:()=>d.value,focus:()=>C.value=!0,blur:()=>C.value=!1,click:X};e.onMounted(()=>{_.isMenuItemDataCollectedFlag()?e.nextTick(()=>{let W=0;const Z=_.getElement();if(Z){let ee=0;for(let N=0;N<Z.children.length;N++){const te=Z.children[N];if(te.getAttribute("data-type")==="ContextMenuItem"){if(te===d.value){W=ee;break}ee++}}}_.addChildMenuItem($,W)}):_.addChildMenuItem($)}),e.onBeforeUnmount(()=>{_.removeChildMenuItem($)});function X(W){if(!E.value){if(W){const Z=W.target;if(Z.classList.contains("mx-context-no-clickable")||y.value.ignoreClickClassName&&Z.classList.contains(y.value.ignoreClickClassName))return;if(y.value.clickCloseClassName&&Z.classList.contains(y.value.clickCloseClassName)){W.stopPropagation(),A(p.rawMenuItem);return}}B.value?H.value?(typeof I.value=="function"&&I.value(W),g("click",W)):w.value||J():(typeof I.value=="function"&&I.value(W),g("click",W),s.value&&A(p.rawMenuItem))}}function J(W){C.value=!1,_.checkCloseOtherSubMenuTimeOut()||_.closeOtherSubMenu(),E.value||(_.markActiveMenuItem($),B.value&&(W||_.markThisOpenedByKeyBoard(),_.addOpenedSubMenu(()=>{C.value=!1,w.value=!1,g("subMenuClose")}),w.value=!0,g("subMenuOpen")))}function Y(){return{disabled:E.value,label:o.value,icon:z.value,iconFontClass:F.value,showRightArrow:G.value,clickClose:s.value,clickableWhenHasChildren:H.value,shortcut:j.value,theme:y.value.theme,isOpen:w,hasChildren:B,onClick:X,onMouseEnter:J,closeMenu:A}}return n({showSubMenu:w,keyBoardFocusMenu:C}),(W,Z)=>e.unref(b)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"mx-context-menu-item-wrapper",ref_key:"menuItemRef",ref:d,"data-type":"ContextMenuItem"},[e.unref(O)("itemRender")?(e.openBlock(),e.createBlock(e.unref(v),{key:0,vnode:()=>e.unref(c)("itemRender",Y())},null,8,["vnode"])):t.customRender?(e.openBlock(),e.createBlock(e.unref(v),{key:1,vnode:t.customRender,data:Y()},null,8,["vnode","data"])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["mx-context-menu-item",e.unref(E)?"disabled":"",C.value?"keyboard-focus":"",t.customClass?" "+t.customClass:"",w.value?"open":""]),onClick:X,onMouseenter:J},[e.renderSlot(W.$slots,"default",{},()=>[e.createElementVNode("div",ft,[e.createElementVNode("div",{class:e.normalizeClass(["mx-icon-placeholder",t.preserveIconWidth?"preserve-width":""])},[e.renderSlot(W.$slots,"icon",{},()=>[e.unref(O)("itemIconRender")?(e.openBlock(),e.createBlock(e.unref(v),{key:0,vnode:()=>e.unref(c)("itemIconRender",Y())},null,8,["vnode"])):typeof t.svgIcon=="string"&&t.svgIcon?(e.openBlock(),e.createElementBlock("svg",e.mergeProps({key:1,class:"icon svg"},t.svgProps),[e.createElementVNode("use",{"xlink:href":t.svgIcon},null,8,mt)],16)):typeof e.unref(z)!="string"?(e.openBlock(),e.createBlock(e.unref(v),{key:2,vnode:e.unref(z),data:e.unref(z)},null,8,["vnode","data"])):typeof e.unref(z)=="string"&&e.unref(z)!==""?(e.openBlock(),e.createElementBlock("i",{key:3,class:e.normalizeClass(e.unref(z)+" icon "+e.unref(F)+" "+e.unref(y).iconFontClass)},null,2)):e.createCommentVNode("",!0)]),t.checked?e.renderSlot(W.$slots,"check",{key:0},()=>[e.unref(O)("itemCheckRender")?(e.openBlock(),e.createBlock(e.unref(v),{key:0,vnode:()=>e.unref(c)("itemCheckRender",Y())},null,8,["vnode"])):e.createCommentVNode("",!0),e.createVNode(it)]):e.createCommentVNode("",!0)],2),e.renderSlot(W.$slots,"label",{},()=>[e.unref(O)("itemLabelRender")?(e.openBlock(),e.createBlock(e.unref(v),{key:0,vnode:()=>e.unref(c)("itemLabelRender",Y())},null,8,["vnode"])):typeof e.unref(o)=="string"?(e.openBlock(),e.createElementBlock("span",pt,e.toDisplayString(e.unref(o)),1)):(e.openBlock(),e.createBlock(e.unref(v),{key:2,vnode:e.unref(o),data:e.unref(o)},null,8,["vnode","data"]))])]),e.createElementVNode("div",vt,[e.unref(j)?e.renderSlot(W.$slots,"shortcut",{key:0},()=>[e.unref(O)("itemShortcutRender")?(e.openBlock(),e.createBlock(e.unref(v),{key:0,vnode:()=>e.unref(c)("itemShortcutRender",Y())},null,8,["vnode"])):e.createCommentVNode("",!0),e.createElementVNode("span",ht,e.toDisplayString(e.unref(j)),1)]):e.createCommentVNode("",!0),e.unref(G)?e.renderSlot(W.$slots,"rightArrow",{key:1},()=>[e.unref(O)("itemRightArrowRender")?(e.openBlock(),e.createBlock(e.unref(v),{key:0,vnode:()=>e.unref(c)("itemRightArrowRender",Y())},null,8,["vnode"])):e.createCommentVNode("",!0),e.createVNode(We)]):e.createCommentVNode("",!0)])])],34)),e.unref(y).menuTransitionProps?(e.openBlock(),e.createBlock(e.Transition,e.normalizeProps(e.mergeProps({key:3},e.unref(y).menuTransitionProps)),{default:e.withCtx(()=>[w.value?e.renderSlot(W.$slots,"submenu",{key:0}):e.createCommentVNode("",!0)]),_:3},16)):w.value?e.renderSlot(W.$slots,"submenu",{key:4}):e.createCommentVNode("",!0)],512))}}),bt=e.defineComponent({name:"ContextMenuSperator",components:{VNodeRender:v},setup(){const t=e.inject("globalHasSlot"),n=e.inject("globalRenderSlot");return{globalHasSlot:t,globalRenderSlot:n}}}),Ct={key:1,class:"mx-context-menu-item-sperator mx-context-no-clickable"};function kt(t,n,r,p,g,I){const s=e.resolveComponent("VNodeRender");return t.globalHasSlot("separatorRender")?(e.openBlock(),e.createBlock(s,{key:0,vnode:()=>t.globalRenderSlot("separatorRender",{})},null,8,["vnode"])):(e.openBlock(),e.createElementBlock("div",Ct))}const ve=S(bt,[["render",kt]]),xt=e.defineComponent({name:"ContextSubMenu",components:{ContextMenuItem:pe,ContextMenuSeparator:ve,ContextMenuIconRight:We},props:{items:{type:Object,default:null},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0},adjustPosition:{type:Boolean,default:!0},direction:{type:String,default:"br"}},setup(t){const n=e.inject("menuContext"),r=e.inject("globalOptions"),p=e.inject("globalHasSlot"),g=e.inject("globalRenderSlot"),{zIndex:I,getParentWidth:s,getParentHeight:H}=n,{adjustPosition:E}=e.toRefs(t),b=e.ref(),o=e.ref(),z=e.ref(),F=[],G=e.inject("globalSetCurrentSubMenu"),j=[];let B=null,w=0;function C(){B&&B.blur()}function d(i,T){if(i){for(let K=T!==void 0?T:0;K<j.length;K++)if(!j[K].isDisabledOrHidden()){y(K);break}}else for(let K=T!==void 0?T:j.length-1;K>=0;K--)if(!j[K].isDisabledOrHidden()){y(K);break}}function y(i){if(B&&C(),i!==void 0&&(B=j[Math.max(0,Math.min(i,j.length-1))]),!!B&&(B.focus(),ee.value)){const T=B.getElement();T&&(X.value=Math.min(Math.max(-J.value,-T.offsetTop-T.offsetHeight+te.value),0))}}function O(){G(c)}const c={isTopLevel:()=>n.getParentContext()===null,closeSelfAndActiveParent:()=>{const i=$.getParentContext();if(i){i.closeOtherSubMenu();const T=i.getSubMenuInstanceContext();if(T)return T.focusCurrentItem(),!0}return!1},closeCurrentSubMenu:()=>{var i;return(i=$.getParentContext())==null?void 0:i.closeOtherSubMenu()},moveCurrentItemFirst:()=>d(!0),moveCurrentItemLast:()=>d(!1),moveCurrentItemDown:()=>d(!0,B?j.indexOf(B)+1:0),moveCurrentItemUp:()=>d(!1,B?j.indexOf(B)-1:0),focusCurrentItem:()=>y(),openCurrentItemSubMenu:()=>B?B==null?void 0:B.showSubMenu():!1,triggerCurrentItemClick:i=>B==null?void 0:B.click(i)};let A=!1,_=!1;const $={zIndex:I+1,container:n.container,adjustPadding:r.value.adjustPadding||k.defaultAdjustPadding,getParentWidth:()=>{var i;return((i=b.value)==null?void 0:i.offsetWidth)||0},getParentHeight:()=>{var i;return((i=b.value)==null?void 0:i.offsetHeight)||0},getParentX:()=>N.value.x,getParentY:()=>N.value.y,getParentAbsX:()=>b.value?f(b.value,n.container):0,getParentAbsY:()=>b.value?R(b.value,n.container):0,getPositon:()=>[0,0],addOpenedSubMenu(i){F.push(i)},closeOtherSubMenu(){F.forEach(i=>i()),F.splice(0,F.length),G(c)},checkCloseOtherSubMenuTimeOut(){return w?(clearTimeout(w),w=0,!0):!1},closeOtherSubMenuWithTimeOut(){w=setTimeout(()=>{w=0,this.closeOtherSubMenu()},200)},addChildMenuItem:(i,T)=>{T===void 0?j.push(i):j.splice(T,0,i)},removeChildMenuItem:i=>{j.splice(j.indexOf(i),1)},markActiveMenuItem:(i,T=!1)=>{C(),B=i,T&&y()},markThisOpenedByKeyBoard:()=>{A=!0},isOpenedByKeyBoardFlag:()=>A?(A=!1,!0):!1,isMenuItemDataCollectedFlag:()=>_,getElement:()=>b.value||null,getParentContext:()=>n,getSubMenuInstanceContext:()=>c};e.provide("menuContext",$);const X=e.ref(0),J=e.ref(0);function Y(i){i?X.value=Math.min(Math.max(X.value-50,-J.value),0):X.value=Math.min(X.value+50,0)}function W(i){i.preventDefault(),i.stopPropagation(),Y(i.deltaY>0)}function Z(i){r.value.mouseScroll&&(i.preventDefault(),i.stopPropagation(),Y(i.deltaY>0))}const ee=e.ref(!1),N=e.ref({x:0,y:0}),te=e.ref(0);return e.onMounted(()=>{const i=n.getPositon();N.value={x:i[0]??r.value.xOffset??0,y:i[1]??r.value.yOffset??0},G(c),e.nextTick(()=>{var T,K;const U=b.value;if(U&&o.value){const{container:ie}=n,xe=(s==null?void 0:s())??0,Tt=(H==null?void 0:H())??0,be=typeof n.adjustPadding=="number"?n.adjustPadding:((T=n.adjustPadding)==null?void 0:T.x)??0,Ce=typeof n.adjustPadding=="number"?n.adjustPadding:((K=n.adjustPadding)==null?void 0:K.y)??0,ce=Tt>0?Ce:0,_t=document.documentElement.scrollHeight,Vt=document.documentElement.scrollWidth,jt=Math.min(Vt,ie.offsetWidth),ge=Math.min(_t,ie.offsetHeight);let ye=f(U,ie),Se=R(U,ie);t.direction.includes("l")?N.value.x-=U.offsetWidth+be:t.direction.includes("r")?N.value.x+=xe+be:(N.value.x+=xe/2,N.value.x-=(U.offsetWidth+be)/2),t.direction.includes("t")?N.value.y-=U.offsetHeight+Ce*2:t.direction.includes("b")?N.value.y-=Ce:N.value.y-=(U.offsetHeight+Ce)/2,E.value&&e.nextTick(()=>{ye=f(U,ie),Se=R(U,ie);const Ht=ye+U.offsetWidth-jt,_e=Se+U.offsetHeight+ce*2-ge;if(ee.value=_e>0,J.value=U.offsetHeight-ge+ce*2,Ht>0){const de=xe+U.offsetWidth-be,fe=ye;de>fe?N.value.x-=fe:N.value.x-=de}if(ee.value){const de=_e,fe=Se;de>fe?N.value.y-=fe-ce:N.value.y-=de-ce,te.value=ge-ce*2}else te.value=0})}U==null||U.focus({preventScroll:!0}),n.isOpenedByKeyBoardFlag()&&d(!0),_=!0})}),{menu:b,scroll:o,options:r,zIndex:I,constOptions:k,scrollValue:X,upScrollButton:z,overflow:ee,position:N,scrollHeight:J,maxHeight:te,globalHasSlot:p,globalRenderSlot:g,onScroll:Y,onSubMenuBodyClick:O,onMouseWhell:Z,onMouseWhellMx:W,solveNumberOrStringSize:h}}}),gt={key:0,class:"mx-context-menu-updown placeholder"},yt={key:1,class:"mx-context-menu-updown placeholder"},St={class:"mx-context-menu-scroll",ref:"scroll"};function Mt(t,n,r,p,g,I){const s=e.resolveComponent("ContextMenuSeparator"),H=e.resolveComponent("ContextSubMenu",!0),E=e.resolveComponent("ContextMenuItem"),b=e.resolveComponent("ContextMenuIconRight");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-context-menu",t.options.customClass?t.options.customClass:"",t.options.theme??""]),style:e.normalizeStyle({maxWidth:t.maxWidth?t.solveNumberOrStringSize(t.maxWidth):`${t.constOptions.defaultMaxWidth}px`,minWidth:t.minWidth?t.solveNumberOrStringSize(t.minWidth):`${t.constOptions.defaultMinWidth}px`,maxHeight:t.overflow&&t.maxHeight>0?`${t.maxHeight}px`:void 0,zIndex:t.zIndex,left:`${t.position.x}px`,top:`${t.position.y}px`}),"data-type":"ContextSubMenu",onClick:n[4]||(n[4]=(...o)=>t.onSubMenuBodyClick&&t.onSubMenuBodyClick(...o)),onWheel:n[5]||(n[5]=(...o)=>t.onMouseWhell&&t.onMouseWhell(...o))},[e.createElementVNode("div",{class:e.normalizeClass(["mx-context-menu-items"]),ref:"menu",style:e.normalizeStyle({top:`${t.scrollValue}px`})},[e.renderSlot(t.$slots,"default",{},()=>[t.overflow&&t.options.updownButtonSpaceholder?(e.openBlock(),e.createElementBlock("div",gt)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(o,z)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:z},[o.hidden!==!0&&o.divided==="up"?(e.openBlock(),e.createBlock(s,{key:0})):e.createCommentVNode("",!0),o.hidden!==!0&&o.divided==="self"?(e.openBlock(),e.createBlock(s,{key:1})):(e.openBlock(),e.createBlock(E,{key:2,clickHandler:o.onClick?F=>o.onClick(F):void 0,disabled:o.disabled,hidden:o.hidden,icon:o.icon,iconFontClass:o.iconFontClass,svgIcon:o.svgIcon,svgProps:o.svgProps,label:o.label,customRender:o.customRender,customClass:o.customClass,checked:o.checked,shortcut:o.shortcut,clickClose:o.clickClose,clickableWhenHasChildren:o.clickableWhenHasChildren,preserveIconWidth:o.preserveIconWidth!==void 0?o.preserveIconWidth:t.options.preserveIconWidth,showRightArrow:o.children&&o.children.length>0,hasChildren:o.children&&o.children.length>0,rawMenuItem:o,onSubMenuOpen:o.onSubMenuOpen,onSubMenuClose:o.onSubMenuClose},e.createSlots({_:2},[o.children&&o.children.length>0?{name:"submenu",fn:e.withCtx(()=>[e.createVNode(H,{items:o.children,maxWidth:o.maxWidth,minWidth:o.minWidth,adjustPosition:o.adjustSubMenuPosition!==void 0?o.adjustSubMenuPosition:t.options.adjustPosition,direction:o.direction!==void 0?o.direction:t.options.direction},null,8,["items","maxWidth","minWidth","adjustPosition","direction"])]),key:"0"}:void 0]),1032,["clickHandler","disabled","hidden","icon","iconFontClass","svgIcon","svgProps","label","customRender","customClass","checked","shortcut","clickClose","clickableWhenHasChildren","preserveIconWidth","showRightArrow","hasChildren","rawMenuItem","onSubMenuOpen","onSubMenuClose"])),o.hidden!==!0&&(o.divided==="down"||o.divided===!0)?(e.openBlock(),e.createBlock(s,{key:3})):e.createCommentVNode("",!0)],64))),128)),t.overflow&&t.options.updownButtonSpaceholder?(e.openBlock(),e.createElementBlock("div",yt)):e.createCommentVNode("",!0)])],4),e.createElementVNode("div",St,[e.withDirectives(e.createElementVNode("div",{ref:"upScrollButton",class:e.normalizeClass("mx-context-menu-updown mx-context-no-clickable up"+(t.overflow&&t.scrollValue<0?"":" disabled")),onClick:n[0]||(n[0]=o=>t.onScroll(!1)),onWheel:n[1]||(n[1]=(...o)=>t.onMouseWhellMx&&t.onMouseWhellMx(...o))},[e.createVNode(b)],34),[[e.vShow,t.overflow]]),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass("mx-context-menu-updown mx-context-no-clickable down"+(t.overflow&&t.scrollValue>-t.scrollHeight?"":" disabled")),onClick:n[2]||(n[2]=o=>t.onScroll(!0)),onWheel:n[3]||(n[3]=(...o)=>t.onMouseWhellMx&&t.onMouseWhellMx(...o))},[e.createVNode(b)],34),[[e.vShow,t.overflow]])],512)],38)}const he=S(xt,[["render",Mt]]),It={class:"mx-menu-ghost-host"},Ee=e.defineComponent({__name:"ContextSubMenuWrapper",props:{options:{type:Object,default:null},show:{type:Object,default:null},container:{type:Object,default:null},isFullScreenContainer:{type:Boolean,default:!0}},emits:["close","closeAnimFinished"],setup(t,{expose:n,emit:r}){const p=t,g=r,I=e.useSlots(),{options:s,show:H,container:E}=e.toRefs(p);e.onMounted(()=>{H.value&&z()}),e.onBeforeUnmount(()=>{B()}),e.watch(H,c=>{c?z():(ae(b),B())});const b={closeMenu:F,isClosed:G};let o=!1;function z(){j(),ne(b)}function F(c){o=!0,g("close",c),s.value.menuTransitionProps||g("closeAnimFinished"),ae(b)}function G(){return o}function j(){setTimeout(()=>{document.addEventListener("click",y,!0),document.addEventListener("contextmenu",y,!0),document.addEventListener("scroll",d,!0),!p.isFullScreenContainer&&E.value&&E.value.addEventListener("scroll",d,!0),s.value.keyboardControl!==!1&&document.addEventListener("keydown",C)},50)}function B(){document.removeEventListener("contextmenu",y,!0),document.removeEventListener("click",y,!0),document.removeEventListener("scroll",d,!0),!p.isFullScreenContainer&&E.value&&E.value.removeEventListener("scroll",d,!0),s.value.keyboardControl!==!1&&document.removeEventListener("keydown",C)}const w=e.ref();e.provide("globalSetCurrentSubMenu",c=>w.value=c);function C(c){var A,_,$,X,J,Y,W,Z,ee,N,te,i,T;let K=!0;switch(c.key){case"Escape":{((A=w.value)==null?void 0:A.isTopLevel())===!1?(_=w.value)==null||_.closeCurrentSubMenu():F();break}case"ArrowDown":($=w.value)==null||$.moveCurrentItemDown();break;case"ArrowUp":(X=w.value)==null||X.moveCurrentItemUp();break;case"Home":(J=w.value)==null||J.moveCurrentItemFirst();break;case"End":(Y=w.value)==null||Y.moveCurrentItemLast();break;case"ArrowLeft":{(W=w.value)!=null&&W.closeSelfAndActiveParent()||(ee=(Z=s.value).onKeyFocusMoveLeft)==null||ee.call(Z);break}case"ArrowRight":(N=w.value)!=null&&N.openCurrentItemSubMenu()||(i=(te=s.value).onKeyFocusMoveRight)==null||i.call(te);break;case"Enter":(T=w.value)==null||T.triggerCurrentItemClick(c);break;default:K=!1;break}K&&w.value&&(c.stopPropagation(),c.preventDefault())}function d(){s.value.closeWhenScroll!==!1&&F()}function y(c){O(c.target,c)}function O(c,A){for(var _,$;c;){if(c.classList&&c.classList.contains("mx-menu-host"))return;c=c.parentNode}s.value.clickCloseOnOutside!==!1?(B(),F()):($=(_=s.value).onClickOnOutside)==null||$.call(_,A)}return e.provide("globalOptions",s),e.provide("globalCloseMenu",F),e.provide("globalIsFullScreenContainer",p.isFullScreenContainer),e.provide("globalHasSlot",c=>I[c]!==void 0),e.provide("globalRenderSlot",(c,A)=>e.renderSlot(I,c,{...A},()=>[e.h("span","Render slot failed")],!1)),e.provide("menuContext",{zIndex:s.value.zIndex||k.defaultZindex,container:E.value,adjustPadding:{x:0,y:0},getParentAbsY:()=>s.value.x,getParentAbsX:()=>s.value.y,getParentX:()=>0,getParentY:()=>0,getParentWidth:()=>0,getParentHeight:()=>0,getPositon:()=>[s.value.x,s.value.y],closeOtherSubMenuWithTimeOut:()=>{},checkCloseOtherSubMenuTimeOut:()=>!1,addOpenedSubMenu:()=>{},closeOtherSubMenu:()=>{},getParentContext:()=>null,getSubMenuInstanceContext:()=>null,getElement:()=>null,addChildMenuItem:()=>{},removeChildMenuItem:()=>{},markActiveMenuItem:()=>{},markThisOpenedByKeyBoard:()=>{},isOpenedByKeyBoardFlag:()=>!1,isMenuItemDataCollectedFlag:()=>!1}),n(b),(c,A)=>(e.openBlock(),e.createElementBlock("div",It,[e.unref(s).menuTransitionProps?(e.openBlock(),e.createBlock(e.Transition,e.mergeProps({key:0,appear:""},e.unref(s).menuTransitionProps,{onAfterLeave:A[0]||(A[0]=_=>g("closeAnimFinished"))}),{default:e.withCtx(()=>[e.unref(H)?(e.openBlock(),e.createBlock(he,{key:0,class:"mx-menu-host",items:e.unref(s).items,adjustPosition:e.unref(s).adjustPosition,maxWidth:e.unref(s).maxWidth||e.unref(k).defaultMaxWidth,minWidth:e.unref(s).minWidth||e.unref(k).defaultMinWidth,direction:e.unref(s).direction||e.unref(k).defaultDirection},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):e.createCommentVNode("",!0)]),_:3},16)):e.unref(H)?(e.openBlock(),e.createBlock(he,{key:1,class:"mx-menu-host",items:e.unref(s).items,adjustPosition:e.unref(s).adjustPosition,maxWidth:e.unref(s).maxWidth||e.unref(k).defaultMaxWidth,minWidth:e.unref(s).minWidth||e.unref(k).defaultMinWidth,direction:e.unref(s).direction||e.unref(k).defaultDirection},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default")]),_:3},8,["items","adjustPosition","maxWidth","minWidth","direction"])):e.createCommentVNode("",!0)]))}}),Oe=e.defineComponent({name:"ContextMenu",emits:["update:show","close"],props:{options:{type:Object,default:null},show:{type:Boolean,default:!1}},setup(t,n){const{options:r,show:p}=e.toRefs(t);return n.expose({closeMenu:()=>n.emit("update:show",!1),isClosed:()=>!p.value}),()=>{const{isNew:g,container:I,eleId:s}=u(r.value);return[e.h(e.Teleport,{to:`#${s}`},[e.h(Ee,{options:r,show:p,container:I,isFullScreenContainer:!g,onClose:H=>{var E,b;n.emit("update:show",!1),n.emit("close"),(b=(E=r.value).onClose)==null||b.call(E,H)}},n.slots)])]}}}),Ne=e.defineComponent({name:"ContextMenuGroup",props:{disabled:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1},clickHandler:{type:Function,default:null},label:{type:String,default:""},icon:{type:String,default:""},iconFontClass:{type:String,default:"iconfont"},checked:{type:Boolean,default:!1},shortcut:{type:String,default:""},svgIcon:{type:String,default:""},svgProps:{type:Object,default:null},preserveIconWidth:{type:Boolean,default:!0},showRightArrow:{type:Boolean,default:!1},clickClose:{type:Boolean,default:!0},adjustSubMenuPosition:{type:Boolean,default:void 0},maxWidth:{type:[String,Number],default:0},minWidth:{type:[String,Number],default:0}},setup(t,n){const r=e.inject("globalOptions"),{adjustSubMenuPosition:p,maxWidth:g,minWidth:I}=e.toRefs(t),s=typeof p.value<"u"?p.value:r.value.adjustPosition;return()=>e.h(pe,{...t,showRightArrow:!0,maxWidth:void 0,minWidth:void 0,adjustSubMenuPosition:void 0,hasChildren:typeof n.slots.default!==void 0},n.slots.default?{submenu:()=>e.h(he,{maxWidth:g.value,minWidth:I.value,adjustPosition:s},{default:n.slots.default})}:void 0)}});function Bt(t,n,r,p){const g=e.ref(!0),I=e.h(Ee,{options:t,show:g,container:n,isFullScreenContainer:!r,onCloseAnimFinished:()=>{e.render(null,n)},onClose:s=>{var H;(H=t.onClose)==null||H.call(t,s),g.value=!1}},p);return e.render(I,n),I.component}function Te(t,n){const r=u(t);return Bt(t,r.container,r.isNew,n).exposed}const ke={install(t){t.config.globalProperties.$contextmenu=Te,t.component("ContextMenu",Oe),t.component("ContextMenuItem",pe),t.component("ContextMenuGroup",Ne),t.component("ContextMenuSperator",ve),t.component("ContextMenuSeparator",ve),t.component("ContextSubMenu",he)},showContextMenu(t,n){return Te(t,n)},isAnyContextMenuOpen(){return L()},closeContextMenu:D,transformMenuPosition:V},wt={},Pt={class:"mx-menu-bar-icon-menu",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200"},Rt=[e.createElementVNode("path",{d:"M133.310936 296.552327l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949 0-19.781623-15.997312-35.950949-35.950949-35.950949L133.310936 224.650428c-19.781623 0-35.950949 16.169326-35.950949 35.950949C97.359987 280.383 113.529313 296.552327 133.310936 296.552327z"},null,-1),e.createElementVNode("path",{d:"M890.51705 476.135058 133.310936 476.135058c-19.781623 0-35.950949 16.169326-35.950949 35.950949 0 19.781623 16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-16.169326 35.950949-35.950949C926.467999 492.304384 910.298673 476.135058 890.51705 476.135058z"},null,-1),e.createElementVNode("path",{d:"M890.51705 727.447673 133.310936 727.447673c-19.781623 0-35.950949 15.997312-35.950949 35.950949s16.169326 35.950949 35.950949 35.950949l757.206115 0c19.781623 0 35.950949-15.997312 35.950949-35.950949S910.298673 727.447673 890.51705 727.447673z"},null,-1)];function Wt(t,n){return e.openBlock(),e.createElementBlock("svg",Pt,Rt)}const Et=S(wt,[["render",Wt]]),Ot=["onClick","onMouseenter"],Nt=e.defineComponent({__name:"MenuBar",props:{options:{type:Object,default:null}},setup(t){const n=t,r=e.ref(),p=e.ref(!1),g=e.ref([]),I=e.ref(null);function s(){p.value=!0}function H(){p.value=!1}e.onMounted(()=>{g.value=n.options.items||[]}),e.watch(()=>n.options,()=>{g.value=n.options.items||[]});let E=null,b=-1;function o(){b<g.value.length-1?b++:b=0,G(b,g.value[b])}function z(){b>0?b--:b=g.value.length-1,G(b,g.value[b])}function F(C){const d=n.options.barPopDirection??"bl";let y=0,O=0;return d.startsWith("b")?O=R(C)+C.offsetHeight:d.startsWith("t")?O=R(C):O=R(C)+C.offsetHeight/2,d.endsWith("l")?y=f(C):d.startsWith("r")?y=f(C)+C.offsetWidth:y=f(C)+C.offsetWidth/2,{x:y,y:O}}function G(C,d){var y;if(b=C,!d.children)return;E&&(E.closeMenu(),E=null,p.value=!0),I.value=d;const O=(y=r.value)==null?void 0:y.children[C];if(O){const{x:c,y:A}=F(O);E=ke.showContextMenu({...n.options,items:d.children,x:c,y:A,onKeyFocusMoveLeft(){z()},onKeyFocusMoveRight(){o()},onClose(){I.value==d&&(p.value=!1,I.value=null)}})}}function j(){b=0;const C=r.value;if(C){const{x:d,y}=F(C);E=ke.showContextMenu({...n.options,x:d,y})}}function B(C,d){d?(p.value=!0,G(C,d),d.onClick&&(d.clickableWhenHasChildren===!0&&d.children&&d.children.length>0||!d.children||d.children.length===0)&&d.onClick()):j()}function w(C,d){p.value&&G(C,d)}return(C,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["mx-menu-bar",t.options.theme??"",t.options.mini?"mini":""]),onFocus:s,onBlur:H},[e.renderSlot(C.$slots,"prefix"),t.options.mini?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuBarContent",ref:r,class:"mx-menu-bar-content"},[e.createElementVNode("div",{class:"mx-menu-bar-item",onClick:d[0]||(d[0]=y=>B(0,null))},[e.createVNode(Et)])],512)):(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"menuBarContent",ref:r,class:"mx-menu-bar-content"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(y,O)=>(e.openBlock(),e.createElementBlock("div",{key:O,class:e.normalizeClass(["mx-menu-bar-item",y==I.value?"active":""]),onClick:c=>B(O,y),onMouseenter:c=>w(O,y)},e.toDisplayString(y.label),43,Ot))),128))],512)),e.renderSlot(C.$slots,"suffix")],34))}});l.ContextMenu=Oe,l.ContextMenuGroup=Ne,l.ContextMenuItem=pe,l.ContextMenuSeparator=ve,l.MenuBar=Nt,l.default=ke,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})})})(Re,Re.exports);var Sa=Re.exports;const Ma=fa(Sa),Ia=ma("tabbar",()=>{const q=pa(),M=me([]),l=me(-1);async function e(k){var x,a,m;const R=[];k.matched.forEach((u,h)=>{var v;h>0&&(v=u.components)!=null&&v.default.name&&R.push(u.components.default.name)});const f=(x=k.matched.at(-1))==null?void 0:x.meta,V=k.fullPath;if(k.name!=="reload"&&!M.value.find(h=>h.routeName?h.routeName===k.name:h.tabId===V)){const h={tabId:V,fullPath:k.fullPath,routeName:k.name,title:typeof(f==null?void 0:f.title)=="function"?f.title():f==null?void 0:f.title,icon:(f==null?void 0:f.icon)??((m=(a=f==null?void 0:f.breadcrumbNeste)==null?void 0:a.findLast(v=>v.icon))==null?void 0:m.icon),name:R};l.value>=0?(M.value.splice(l.value+1,0,h),l.value=-1):M.value.push(h)}}function P(k){const R=[],f=[];M.value.forEach(x=>{x.tabId===k?f.push(...x.name):R.push(...x.name)});const V=[];f.forEach(x=>{R.includes(x)||V.push(x)}),q.remove(V),M.value=M.value.filter(x=>x.tabId!==k)}function L(k){const R=[],f=[];M.value.forEach(x=>{x.tabId!==k?f.push(...x.name):R.push(...x.name)});const V=[];f.forEach(x=>{R.includes(x)||V.push(x)}),q.remove(V),M.value=M.value.filter(x=>x.tabId===k)}function ne(k){const R=M.value.findIndex(a=>a.tabId===k),f=[],V=[];M.value.forEach((a,m)=>{m<R?V.push(...a.name):f.push(...a.name)});const x=[];V.forEach(a=>{f.includes(a)||x.push(a)}),q.remove(x),M.value=M.value.filter((a,m)=>m>=R)}function ae(k){const R=M.value.findIndex(a=>a.tabId===k),f=[],V=[];M.value.forEach((a,m)=>{m>R?V.push(...a.name):f.push(...a.name)});const x=[];V.forEach(a=>{f.includes(a)||x.push(a)}),q.remove(x),M.value=M.value.filter((a,m)=>m<=R)}function D(){M.value=[]}return{list:M,leaveIndex:l,add:e,remove:P,removeOtherSide:L,removeLeftSide:ne,removeRightSide:ae,clean:D}}),ot=Ia;function Ba(){const q=tt(),M=nt(),l=ot();function e(){return q.fullPath}function P(a){const m=l.list.findIndex(u=>u.tabId===e());l.$patch({leaveIndex:m}),M.push(a)}function L(a){const m=e();M.go(a),l.remove(m)}function ne(a){const m=e();M.push(a).then(()=>{l.remove(m)})}function ae(a=e()){const m=e();if(l.list.some(u=>u.tabId===a))if(l.list.length>1)if(a===m){const u=l.list.findIndex(h=>h.tabId===a);u<l.list.length-1?ne(l.list[u+1].fullPath):ne(l.list[u-1].fullPath)}else l.remove(a);else Pe.error("当前只有一个标签页,已阻止关闭",{zIndex:2e3});else Pe.error("关闭的页面不存在",{zIndex:2e3})}function D(a=e()){const m=e();if(a!==m){const u=l.list.findIndex(h=>h.tabId===a);M.push(l.list[u].fullPath)}l.removeOtherSide(a)}function k(a=e()){const m=e();if(a!==m){const u=l.list.findIndex(v=>v.tabId===a);l.list.findIndex(v=>v.tabId===m)<u&&M.push(l.list[u].fullPath)}l.removeLeftSide(a)}function R(a=e()){const m=e();if(a!==m){const u=l.list.findIndex(v=>v.tabId===a);l.list.findIndex(v=>v.tabId===m)>u&&M.push(l.list[u].fullPath)}l.removeRightSide(a)}function f(a=e()){return l.list.some(m=>m.tabId!==a)}function V(a=e()){var u;let m=!0;if(a===((u=l.list[0])==null?void 0:u.tabId))m=!1;else{const h=l.list.findIndex(v=>v.tabId===a);m=l.list.some((v,S)=>S<h&&v.tabId!==a)}return m}function x(a=e()){var u;let m=!0;if(a===((u=l.list.at(-1))==null?void 0:u.tabId))m=!1;else{const h=l.list.findIndex(v=>v.tabId===a);m=l.list.some((v,S)=>S>=h&&v.tabId!==a)}return m}return{getId:e,open:P,go:L,close:ne,closeById:ae,closeOtherSide:D,closeLeftSide:k,closeRightSide:R,checkCloseOtherSide:f,checkCloseLeftSide:V,checkCloseRightSide:x}}const at=q=>(Ge("data-v-39d55a7e"),q=q(),Ye(),q),wa={class:"tabbar-container"},Pa=["data-index","title","onClick","onContextmenu"],Ra=at(()=>ue("div",{class:"tab-dividers"},null,-1)),Wa=at(()=>ue("div",{class:"tab-background"},null,-1)),Ea={class:"tab-content"},Oa=["onClick"],Na=ze({name:"Tabbar",__name:"index",setup(q){const M=tt(),l=nt(),e=va(),P=ot(),L=Ba(),ne=ka(),ae=Ca({reactive:!0}),D=Ae(()=>L.getId()),k=me(),R=me(),f=Ze([]);$e(()=>{f.value=[]}),Qe(()=>M,u=>{e.settings.tabbar.enable&&P.add(u).then(()=>{const h=P.list.findIndex(v=>v.tabId===D.value);h!==-1&&(a(f.value[h].offsetLeft),V())})},{immediate:!0,deep:!0});function V(){R.value.$el.clientWidth>k.value.clientWidth&&localStorage.getItem("tabbarScrollTip")===void 0&&(localStorage.setItem("tabbarScrollTip",""),Pe.info("标签栏数量超过展示区域范围,可以将鼠标移到标签栏上,通过鼠标滚轮滑动浏览",{title:"温馨提示",duration:5e3,closable:!0,zIndex:2e3}))}function x(u){k.value.scrollBy({left:u.deltaY||u.detail})}function a(u){k.value.scrollTo({left:u-50,behavior:"smooth"})}function m(u,h){u.preventDefault(),Ma.showContextMenu({x:u.x,y:u.y,zIndex:1050,iconFontClass:"",customClass:"tabbar-contextmenu",items:[{label:"重新加载",icon:"i-ri:refresh-line",disabled:h.tabId!==D.value,onClick:()=>ne.reload()},{label:"关闭标签页",icon:"i-ri:close-line",disabled:P.list.length<=1,divided:!0,onClick:()=>{L.closeById(h.tabId)}},{label:"关闭其他标签页",disabled:!L.checkCloseOtherSide(h.tabId),onClick:()=>{L.closeOtherSide(h.tabId)}},{label:"关闭左侧标签页",disabled:!L.checkCloseLeftSide(h.tabId),onClick:()=>{L.closeLeftSide(h.tabId)}},{label:"关闭右侧标签页",disabled:!L.checkCloseRightSide(h.tabId),onClick:()=>{L.closeRightSide(h.tabId)}}]})}return Ke(()=>{Ve("alt+left,alt+right,alt+w,alt+1,alt+2,alt+3,alt+4,alt+5,alt+6,alt+7,alt+8,alt+9,alt+0",(u,h)=>{var v,S;if(e.settings.tabbar.enable&&e.settings.tabbar.enableHotkeys)switch(u.preventDefault(),h.key){case"alt+left":if(P.list[0].tabId!==D.value){const Q=P.list.findIndex(oe=>oe.tabId===D.value);l.push(P.list[Q-1].fullPath)}break;case"alt+right":if(((v=P.list.at(-1))==null?void 0:v.tabId)!==D.value){const Q=P.list.findIndex(oe=>oe.tabId===D.value);l.push(P.list[Q+1].fullPath)}break;case"alt+w":L.closeById(D.value);break;case"alt+1":case"alt+2":case"alt+3":case"alt+4":case"alt+5":case"alt+6":case"alt+7":case"alt+8":case"alt+9":{const Q=Number(h.key.split("+")[1]);(S=P.list[Q-1])!=null&&S.fullPath&&l.push(P.list[Q-1].fullPath);break}case"alt+0":l.push(P.list[P.list.length-1].fullPath);break}})}),Ue(()=>{Ve.unbind("alt+left,alt+right,alt+w,alt+1,alt+2,alt+3,alt+4,alt+5,alt+6,alt+7,alt+8,alt+9,alt+0")}),(u,h)=>{const v=ha;return se(),re("div",wa,[ue("div",{ref_key:"tabsRef",ref:k,class:"tabs",onWheel:we(x,["prevent"])},[Ie(He,{ref_key:"tabContainerRef",ref:R,name:"tabbar",tag:"div",class:"tab-container"},{default:Je(()=>[(se(!0),re(je,null,Xe(le(P).list,(S,Q)=>(se(),re("div",{key:S.tabId,ref_for:!0,ref_key:"tabRef",ref:f,"data-index":Q,class:De(["tab",{actived:S.tabId===le(D)}]),title:typeof(S==null?void 0:S.title)=="function"?S.title():S.title,onClick:oe=>le(l).push(S.fullPath),onContextmenu:oe=>m(oe,S)},[Ra,Wa,ue("div",Ea,[(se(),re("div",{key:S.tabId,class:"title"},[le(e).settings.tabbar.enableIcon&&S.icon?(se(),Fe(v,{key:0,name:S.icon,class:"icon"},null,8,["name"])):Me("",!0),Le(" "+Be(typeof(S==null?void 0:S.title)=="function"?S.title():S.title),1)])),le(P).list.length>1?(se(),re("div",{key:0,class:"action-icon",onClick:we(oe=>le(L).closeById(S.tabId),["stop"])},[Ie(v,{name:"i-ri:close-fill"})],8,Oa)):Me("",!0),et(ue("div",{class:"hotkey-number"},Be(Q+1),513),[[qe,le(ae).alt&&Q<9]])])],42,Pa))),128))]),_:1},512)],544)])}}}),ja=ba(Na,[["__scopeId","data-v-39d55a7e"]]);export{ja as default};
|