ray-template/js/hooks-DeCbIFFS.js

13 lines
111 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/en-US-CEfpzyAT.js","js/print-js@1.6.0-BdoEj60G.js","js/call-bind@1.0.7-Cpj98o6Y.js","js/vue-hooks-plus@2.2.1_vue@3.4.38-DdMBTcyt.js","js/lodash@4.17.21-Cw59kuJw.js","js/js-cookie@3.0.5-Z_8Sd105.js","js/screenfull@5.2.0-DmMZCkhi.js","js/currency.js@2.0.4-9OAR_aOO.js","js/lodash-es@4.17.21-BALnwRTu.js","js/@vueuse_core@10.9.0_vue@3.4.38-Cp_qoKMZ.js","js/@vueuse_shared@10.9.0_vue@3.4.38-BTLxKjPf.js","js/utils-DGuZdIHQ.js","js/interactjs@1.10.26-DZL_TZzP.js","js/pinia-plugin-persistedstate@3.2.1_pinia@2.1.7-RV7uh3T-.js","js/echarts@5.5.0-CezqL3m-.js","js/zrender@5.5.0-DW8ownf1.js","js/tslib@2.3.0-BDyQ-Jie.js","js/@vue_runtime-core@3.4.38-f9XU7P4m.js","js/@vue_reactivity@3.4.38-CmXFqMGn.js","js/@vue_shared@3.4.38-D8qfpBTH.js","js/zh-CN-BeERaeRn.js","js/index-C-LZM-Gd.js","js/index-43Sr2ZDd.js","css/index-D_4DGt8i.css","js/index-CzMkrH92.js","js/instance-B5j64X7o.js","css/index-QAd2IBUs.css","js/BarcodeDemo-C6DlA5tI.js","js/index-Bh3tfFvH.js","js/index-D_ua31vB.js","js/index-BZAIqgSr.js","css/index-DHYYVpM7.css","js/index-Dw0dXXH_.js","js/index-B4Svketz.js","js/index-B6y9-Yqs.js","js/index-4_KfG0hf.js","js/index-2JATXzfJ.js","js/index-DU0AD4bw.js","js/vue3-next-qrcode@2.0.10_typescript@5.2.2-B-d0H0H3.js","css/vue3-next-qrcode@2.0.10_typescript@5.2-CG4VaxS5.css","js/ray-dCjhX_JK.js","js/index-B0CACC_9.js","css/index-B6yUFiKH.css","js/index-DWyvlcWc.js","js/index-E385tkq8.js","css/index-Dig957GB.css","js/index-enc6OrTS.js","js/index-D2S_rdww.js","css/index-Eq1L-L2-.css","js/TablePro-DyGNxTE3.js","js/mockjs@1.1.0-CxlURkif.js","js/index-Kmm92eIK.js","js/index--cyhTTPE.js","js/index-U-KjHHUk.js","css/index-74sXJ5VP.css","js/index-zGfSlYZ-.js","css/index-b1h4j9PV.css"])))=>i.map(i=>d[i]);
var Jo=Object.defineProperty;var Qo=(e,t,o)=>t in e?Jo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o;var Xe=(e,t,o)=>Qo(e,typeof t!="symbol"?t+"":t,o);import{s as Ce,c as ye,t as Be,i as pt,p as ne,o as We}from"./lodash-es@4.17.21-BALnwRTu.js";import{o as en,u as ae,a as tn,b as on,c as Te,d as nn,e as mt}from"./@vueuse_core@10.9.0_vue@3.4.38-Cp_qoKMZ.js";import"./currency.js@2.0.4-9OAR_aOO.js";import{p as an}from"./print-js@1.6.0-BdoEj60G.js";import{u as ft}from"./vue-hooks-plus@2.2.1_vue@3.4.38-DdMBTcyt.js";import"./lodash@4.17.21-Cw59kuJw.js";import"./js-cookie@3.0.5-Z_8Sd105.js";import"./screenfull@5.2.0-DmMZCkhi.js";import{g as re,i as q,s as Ke,a as je,c as rn,b as L,r as Q,d as R,e as ln,u as be,q as ve,f as Ne,h as ht,p as gt,j as Ue,k as Ze,l as Oe,m as sn,n as cn,o as un,t as dn,w as pn,v as K}from"./utils-DGuZdIHQ.js";import{i as Je}from"./interactjs@1.10.26-DZL_TZzP.js";import{s as mn}from"./pinia-plugin-persistedstate@3.2.1_pinia@2.1.7-RV7uh3T-.js";import{r as fn,u as oe,i as hn,a as gn,b as yn,c as bn,d as vn,e as Vn,f as Sn,g as _n,h as wn,j as Cn,k as Tn,l as Nn,m as On,n as kn,o as xn,p as Rn,q as An,s as Pn}from"./echarts@5.5.0-CezqL3m-.js";import{f as Mn,g as Ln}from"./@vueuse_shared@10.9.0_vue@3.4.38-BTLxKjPf.js";import{c as yt,o as bt,a as vt}from"./@vue_runtime-core@3.4.38-f9XU7P4m.js";const Ul=(e,t)=>{if(typeof t!="string"||!t.trim())throw new TypeError("Expected prefix to be a non-empty string");const o={};return Object.keys(e).forEach(n=>{const r=e[n].default;let a=n.replace(`./${t}/`,"").replace(/^\.\//,"");const s=a.lastIndexOf(".");a=a.substring(0,s);const l=a.split("/"),i=l.shift(),u=l.join(".");i&&(u?(Ce(o,i,o[i]||{}),Ce(o[i],u,r)):Ce(o,i,r||{}))}),o},En="modulepreload",zn=function(e){return"/ray-template/"+e},Qe={},k=function(t,o,n){let r=Promise.resolve();if(o&&o.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),s=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.all(o.map(l=>{if(l=zn(l),l in Qe)return;Qe[l]=!0;const i=l.endsWith(".css"),u=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const c=document.createElement("link");if(c.rel=i?"stylesheet":En,i||(c.as="script",c.crossOrigin=""),c.href=l,s&&c.setAttribute("nonce",s),document.head.appendChild(c),i)return new Promise((f,y)=>{c.addEventListener("load",f),c.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${l}`)))})}))}return r.then(()=>t()).catch(a=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=a,window.dispatchEvent(s),!s.defaultPrevented)throw a})},In=(e,t,o)=>{const n=e[t];return n?typeof n=="function"?n():Promise.resolve(n):new Promise((r,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==o?". Note that variables only represent file names one level deep.":""))))})},jn=async e=>{var o;const t={};for(const n of e){const r=await In(Object.assign({"../lang/en-US.ts":()=>k(()=>import("./en-US-CEfpzyAT.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19])),"../lang/zh-CN.ts":()=>k(()=>import("./zh-CN-BeERaeRn.js"),__vite__mapDeps([20,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]))}),`../lang/${n.key}.ts`,3),a=n.key;a&&(t[a]=((o=r==null?void 0:r.default)==null?void 0:o.message)??{})}return t},ql=e=>{switch(e){case"zh-CN":return{locale:naive.zhCN,dateLocal:naive.dateZhCN};case"en-US":return{locale:null,dateLocal:null};default:return{locale:naive.zhCN,dateLocal:naive.dateZhCN}}},Gl={max:5,closable:!1},Hl="loading",Vt={setupKeepAlive:!0,keepAliveExclude:[],maxKeepAliveLength:5},Dn={icon:"ray",title:"Ray Template",url:"/dashboard",jumpType:"station"},H={menuCollapsedWidth:64,menuCollapsedMode:"width",menuCollapsedIconSize:22,menuCollapsedIndent:24,menuAccordion:!1},Yl="",E={signing:"signing",localeLanguage:"localeLanguage",token:"token",appMenuKey:"menuKey",appPiniaSettingStore:"piniaSettingStore",appPiniaKeepAliveStore:"piniaKeepAliveStore",appPiniaMenuStore:"piniaMenuStore",appPiniaSigningStore:"piniaSigningStore",appVersionProvider:"appVersionProvider",isAppLockScreen:"isAppLockScreen",appGlobalSearchOptions:"appGlobalSearchOptions"},$n=[{label:"无",value:"none"},{label:"缩放出现",value:"scale"},{label:"缩放消退",value:"fade-scale"},{label:"滑入出现",value:"fade-slide"},{label:"淡入消退",value:"opacity"},{label:"底部消退",value:"fade-bottom"}],$={appThemeColors:["#2d8cf0","#3f9eff","#ff42bc","#ee4f12","#a6e4f7","#dbcb02","#18A058"],appPrimaryColor:{primaryColor:"#2d8cf0",primaryFadeColor:"rgba(45, 140, 240, 0.3)"},appNaiveUIThemeOverrides:{dark:{},light:{}},appNaiveUIThemeOverridesCommon:{dark:{},light:{}},echartTheme:"macarons"},St=[{key:"zh-CN",label:"中文(简体)"},{key:"en-US",label:"English(US)"}],Fn="zh-CN",Bn="zh-CN",Wn={"zh-CN":"zh-cn","en-US":"en"},Kn="zh-cn",Xl={cssUnit:/^\d+(\.\d+)?(px|em|rem|%|vw|vh|vmin|vmax|cm|mm|in|pt|pc|ch|ex|q|s|ms|deg|rad|turn|grad|hz|khz|dpi|dpcm|dppx|fr|auto)$/},Zl={baseURL:"",withCredentials:!1,timeout:5*1e3,headers:{"Content-Type":"application/json"}},J=Vue.ref(null),_t=Vue.ref(null),Un={setupRouterLoadingBar:!0,setupRouterGuard:!0},qn=["RLogin","ErrorPage","RayTemplateDoc"],pe=["admin"],Jl=(e,t)=>{const o=Vue.ref(0),n=Vue.ref(0),r=Vue.ref(!1),{clickOutside:a}={},s=f=>{r.value=f},l=f=>{f.preventDefault(),s(!1),Vue.nextTick().then(()=>{const{clientX:y,clientY:m}=f;o.value=y,n.value=m,s(!0)})};a&&en(e,f=>{a(f)});const i=ae(e,"contextmenu",l,t),u=ae(e,"click",()=>{s(!1)});return{stop:()=>{i(),u()},x:Vue.readonly(o),y:Vue.readonly(n),show:Vue.readonly(r),updateShow:s}},Ve=Vue.reactive({globalSpinning:!1,globalDrawerValue:!1,globalMainLayoutLoad:!0,layoutContentMaximize:!1,layoutContentSpinning:!1});function U(e,t,o){Object.hasOwn(Ve,e)&&(Ve[e]=t)}function _e(e){return Vue.readonly(Vue.toRef(Ve,e))}function Gn(){return{...Vue.toRefs(Vue.readonly(Ve))}}let W;const Hn=async()=>{const e=Go(),t=await jn(St);return VueI18n.createI18n({legacy:!1,locale:e,messages:t,sync:!0,missingWarn:!1,silentFallbackWarn:!0,fallbackLocale:Bn})},Ql=async e=>{const t=await Hn();e.use(t),W=t},et=(e,t)=>t,le=e=>{if(!W)return{t:a=>et(e,a),locale:a=>{}};const{t,...o}=W.global;return{...o,t:(a,...s)=>a?!a.includes(".")&&!e?a:t(et(e,a),...s):"",locale:a=>{W.mode==="legacy"?W.global.locale=a:Vue.isRef(W.global.locale)?W.global.locale.value=a:W.global.locale=a}}},A=e=>e,Yn={path:"/dashboard",component:()=>k(()=>import("./index-C-LZM-Gd.js"),__vite__mapDeps([21,7,1,2,3,4,5,6,22,8,9,10,11,12,13,14,15,16,17,18,19,23])),meta:{i18nKey:A("menu.Dashboard"),icon:"dashboard",order:0}},Xn=Object.freeze(Object.defineProperty({__proto__:null,default:Yn},Symbol.toStringTag,{value:"Module"})),Zn={path:"/axios",name:"RAxios",component:()=>k(()=>import("./index-CzMkrH92.js"),__vite__mapDeps([24,3,4,2,5,6,25,1,11,7,8,9,10,12,13,14,15,16,17,18,19,26])),meta:{i18nKey:A("menu.Axios"),icon:"axios",order:3,keepAlive:!0}},Jn=Object.freeze(Object.defineProperty({__proto__:null,default:Zn},Symbol.toStringTag,{value:"Module"})),Qn={path:"barcode",component:()=>k(()=>import("./BarcodeDemo-C6DlA5tI.js"),__vite__mapDeps([27,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.Barcode"),icon:"other",order:2,extra:{label:"new"}}},ea=Object.freeze(Object.defineProperty({__proto__:null,default:Qn},Symbol.toStringTag,{value:"Module"})),ta={path:"/cache-demo",component:()=>k(()=>import("./index-Bh3tfFvH.js"),__vite__mapDeps([28,1,2,3,4,5,6,11,7,8,9,10,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.CacheDemo"),icon:"other",order:3}},oa=Object.freeze(Object.defineProperty({__proto__:null,default:ta},Symbol.toStringTag,{value:"Module"})),na={path:"/context-menu",component:()=>k(()=>import("./index-D_ua31vB.js"),__vite__mapDeps([29,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.ContextMenu"),icon:"other",order:2}},aa=Object.freeze(Object.defineProperty({__proto__:null,default:na},Symbol.toStringTag,{value:"Module"})),ra={path:"/directive",component:()=>k(()=>import("./index-5cxxl6_s.js"),[]),meta:{i18nKey:A("menu.Directive"),icon:"other",order:2,extra:{label:"ellipsis"}}},la=Object.freeze(Object.defineProperty({__proto__:null,default:ra},Symbol.toStringTag,{value:"Module"})),sa={path:"/echart",component:()=>k(()=>import("./index-BZAIqgSr.js"),__vite__mapDeps([30,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,31])),meta:{i18nKey:A("menu.Echart"),icon:"echart",order:1,extra:{label:"useChart"}}},ia=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"})),ca={path:"/form",component:()=>k(()=>import("./index-Dw0dXXH_.js"),__vite__mapDeps([32,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.Form"),icon:"other",order:2,extra:{label:"useForm"}}},ua=Object.freeze(Object.defineProperty({__proto__:null,default:ca},Symbol.toStringTag,{value:"Module"})),da={path:"/iframe",component:()=>k(()=>import("./index-B4Svketz.js"),__vite__mapDeps([33,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{icon:"other",order:2,noLocalTitle:"iframe"}},pa=Object.freeze(Object.defineProperty({__proto__:null,default:da},Symbol.toStringTag,{value:"Module"})),ma={path:"/mock-demo",component:()=>k(()=>import("./index-B6y9-Yqs.js"),__vite__mapDeps([34,7,1,2,3,4,5,6,25,11,8,9,10,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.Mock"),icon:"other",order:3,keepAlive:!1,extra:{label:"usePagination"}}},fa=Object.freeze(Object.defineProperty({__proto__:null,default:ma},Symbol.toStringTag,{value:"Module"})),ha={path:"/modal-demo",component:()=>k(()=>import("./index-4_KfG0hf.js"),__vite__mapDeps([35,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.Modal"),icon:"other",order:3}},ga=Object.freeze(Object.defineProperty({__proto__:null,default:ha},Symbol.toStringTag,{value:"Module"})),ge=()=>k(()=>Promise.resolve().then(()=>Kr),void 0),ya={path:"/multi",component:ge,meta:{i18nKey:A("menu.MultiMenu"),icon:"other",order:4,extra:{label:"cache"}},children:[{path:"multi-menu-one",name:"MultiMenuOne",component:()=>k(()=>import("./index-BtZPyenx.js"),[]),meta:{noLocalTitle:"多级菜单-1",keepAlive:!0}},{path:"multi-menu-two",name:"MultiMenuTwo",component:ge,meta:{noLocalTitle:"多级菜单-2"},children:[{path:"sub-menu-other",name:"SubMenuOther",component:()=>k(()=>import("./index-B6a_PCdD.js"),[]),meta:{noLocalTitle:"多级菜单-2-1",keepAlive:!0}},{path:"sub-menu",name:"SubMenu",component:ge,meta:{noLocalTitle:"多级菜单-2-2",keepAlive:!0},children:[{path:"sub-menu-one",name:"MultiMenuTwoOne",component:()=>k(()=>import("./index-Cg1Whvge.js"),[]),meta:{noLocalTitle:"多级菜单-2-2-1",keepAlive:!0}}]}]}]},ba=Object.freeze(Object.defineProperty({__proto__:null,default:ya},Symbol.toStringTag,{value:"Module"})),va={path:"/precision",component:()=>k(()=>import("./index-2JATXzfJ.js"),__vite__mapDeps([36,1,2,3,4,5,6,11,7,8,9,10,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.CalculatePrecision"),icon:"other",order:2}},Va=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"})),Sa={path:"/qrcode",component:()=>k(()=>import("./index-DU0AD4bw.js"),__vite__mapDeps([37,38,39,40])),meta:{i18nKey:A("menu.QRCode"),icon:"other",order:2}},_a=Object.freeze(Object.defineProperty({__proto__:null,default:Sa},Symbol.toStringTag,{value:"Module"})),wa={path:"rely-about",component:()=>k(()=>import("./index-B0CACC_9.js"),__vite__mapDeps([41,42])),meta:{i18nKey:A("menu.RelyAbout"),icon:"rely",order:999}},Ca=Object.freeze(Object.defineProperty({__proto__:null,default:wa},Symbol.toStringTag,{value:"Module"})),Ta={path:"/router-demo",component:ge,meta:{i18nKey:A("menu.RouterDemo"),icon:"other",order:3},children:[{path:"router-demo-home",component:()=>k(()=>import("./index-DWyvlcWc.js"),__vite__mapDeps([43,7,1,2,8,9,10,3,4,5,6,11,12,13,14,15,16,17,18,19])),meta:{noLocalTitle:"人员信息(平级模式)"}},{path:"router-demo-detail",component:()=>k(()=>import("./index-BRGdSJVO.js"),[]),meta:{noLocalTitle:"信息详情",sameLevel:!0}}]},Na=Object.freeze(Object.defineProperty({__proto__:null,default:Ta},Symbol.toStringTag,{value:"Module"})),Oa={path:"/scroll-reveal",component:()=>k(()=>import("./index-E385tkq8.js"),__vite__mapDeps([44,45])),meta:{i18nKey:A("menu.scrollReveal"),icon:"scroll_reveal",hidden:!0}},ka=Object.freeze(Object.defineProperty({__proto__:null,default:Oa},Symbol.toStringTag,{value:"Module"})),xa={path:"/segment",component:()=>k(()=>import("./index-enc6OrTS.js"),__vite__mapDeps([46,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.Segment"),icon:"other",order:3,extra:{label:"segment"}}},Ra=Object.freeze(Object.defineProperty({__proto__:null,default:xa},Symbol.toStringTag,{value:"Module"})),Aa={path:"/svg-icons",component:()=>k(()=>import("./index-D2S_rdww.js"),__vite__mapDeps([47,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,48])),meta:{i18nKey:A("menu.SvgIcon"),icon:"other",order:3}},Pa=Object.freeze(Object.defineProperty({__proto__:null,default:Aa},Symbol.toStringTag,{value:"Module"})),Ma={path:"/table-pro",component:()=>k(()=>import("./TablePro-DyGNxTE3.js"),__vite__mapDeps([49,7,1,2,3,4,5,6,11,8,25,50,9,10,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.TablePro"),icon:"other",order:2,extra:{label:"TablePro"}}},La=Object.freeze(Object.defineProperty({__proto__:null,default:Ma},Symbol.toStringTag,{value:"Module"})),Ea={path:"/table",component:()=>k(()=>import("./index-Kmm92eIK.js"),__vite__mapDeps([51,11,7,3,4,2,5,6,8,1,9,10,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.Table"),icon:"other",order:2,extra:{label:"useTable"}}},za=Object.freeze(Object.defineProperty({__proto__:null,default:Ea},Symbol.toStringTag,{value:"Module"})),Ia={path:"/template-hooks",component:()=>k(()=>import("./index--cyhTTPE.js"),__vite__mapDeps([52,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19])),meta:{i18nKey:A("menu.TemplateHooks"),icon:"other",order:1}},ja=Object.freeze(Object.defineProperty({__proto__:null,default:Ia},Symbol.toStringTag,{value:"Module"})),Da=()=>{const e=Object.assign({"/src/router/modules/dashboard.ts":Xn,"/src/router/modules/demo/axios.ts":Jn,"/src/router/modules/demo/barcode.ts":ea,"/src/router/modules/demo/cache-demo.ts":oa,"/src/router/modules/demo/context-menu.ts":aa,"/src/router/modules/demo/directive.ts":la,"/src/router/modules/demo/echart.ts":ia,"/src/router/modules/demo/form.ts":ua,"/src/router/modules/demo/iframe.ts":pa,"/src/router/modules/demo/mock.ts":fa,"/src/router/modules/demo/modal.ts":ga,"/src/router/modules/demo/multi-menu.ts":ba,"/src/router/modules/demo/precision.ts":Va,"/src/router/modules/demo/qrcode.ts":_a,"/src/router/modules/demo/rely.ts":Ca,"/src/router/modules/demo/router-demo.ts":Na,"/src/router/modules/demo/scroll-reveal.ts":ka,"/src/router/modules/demo/segment.ts":Ra,"/src/router/modules/demo/svg-icons.ts":Pa,"/src/router/modules/demo/table-pro.ts":La,"/src/router/modules/demo/table.ts":za,"/src/router/modules/demo/template-hooks.ts":ja});return Object.keys(e).reduce((o,n)=>{const r=e[n].default;if(r)o.push(r);else throw new Error(`[combineRawRouteModules]: ${n} module must export default.`);return o},[])},$a=e=>e[0]==="/",wt=(e,t=[],o="")=>{var n;if(!Array.isArray(e))return[];for(const r of e){const a=o+($a(r.path)?r.path:"/"+r.path);if((n=r.children)!=null&&n.length){wt(r.children,t,a);continue}else t.push({...r,path:a})}return t},Fa=e=>Array.isArray(e)?wt(ye(e)):[],Ba=e=>e.sort((t,o)=>{var a,s;const n=((a=t.meta)==null?void 0:a.order)??1,r=((s=o.meta)==null?void 0:s.order)??0;if(typeof n!="number"||typeof r!="number")throw new TypeError("orderRoutes error: order must be a number!");return n===r?t.name?o.name?t.name.localeCompare(o.name):-1:1:n-r}),Wa=e=>{const{beforeEach:t}=e,{getRootPath:o}=te(),n=(r,a)=>r.path==="/"||a.path==="/login";t((r,a,s)=>{const l=re(E.token,"localStorage"),i=re(E.appMenuKey,"sessionStorage",{defaultValue:o.value}),{meta:u,name:c}=r;l!==null?n(r,a)?ke(!0):!q(c,"Symbol")&&c&&qn.includes(c)?s():Bo(u)?n(r,a)?i?s(i):ke(!0):s():ke(!0):n(r,a)?s():s("/")})},ke=(e=!0)=>{const{router:t}=qe(),{push:o,replace:n}=t,{getRootPath:r}=te();Ke(E.appMenuKey,r.value,"localStorage"),e?n(r.value):o(r.value)},Ka=e=>{var o;const{meta:t}=e;t!=null&&t.ignoreAutoResetScroll||(o=J.value)==null||o.scrollTo({top:0,left:0,behavior:"smooth"})},Ua=e=>{e.beforeEach(()=>{var t;(t=window.$loadingBar)==null||t.start()}),e.afterEach(()=>{var t;(t=window.$loadingBar)==null||t.finish()}),e.onError(()=>{var t;(t=window.$loadingBar)==null||t.error()})},Ct=e=>{const{meta:t={}}=e,{hidden:o,sameLevel:n,env:r}=t,{MODE:a}=je();return!(n||o||r&&typeof r=="string"&&r!==a||r&&Array.isArray(r)&&!r.includes(a))};var qa={pkg:{dependencies:{"@vueuse/core":"^10.9.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10","dom-to-image":"2.6.0",echarts:"^5.5.0",interactjs:"1.10.26",jsbarcode:"3.11.6","lodash-es":"^4.17.21",mockjs:"1.1.0","naive-ui":"^2.39.0",pinia:"^2.1.7","pinia-plugin-persistedstate":"^3.2.0","print-js":"^1.6.0",vue:"^3.4.38","vue-demi":"0.14.6","vue-hooks-plus":"2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.3.2","vue3-next-qrcode":"2.0.10"},devDependencies:{"@commitlint/cli":"^17.7.1","@commitlint/config-conventional":"^17.7.0","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.1.1","@types/dom-to-image":"2.6.7","@types/jsbarcode":"3.11.4","@types/lodash-es":"^4.17.12","@types/mockjs":"1.0.7","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.5.0","@vitejs/plugin-vue":"^5.1.0","@vitejs/plugin-vue-jsx":"^4.0.0","@vitest/ui":"1.4.0","@vue/eslint-config-prettier":"^9.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/test-utils":"2.4.3",autoprefixer:"^10.4.15",depcheck:"^1.4.5",eslint:"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-config-standard-with-typescript":"^43.0.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-promise":"^6.1.1","eslint-plugin-vue":"^9.25.0","happy-dom":"14.3.1",husky:"8.0.3","lint-staged":"^15.1.0",postcss:"^8.4.31","postcss-px-to-viewport-8-with-include":"1.2.2",prettier:"^3.2.5",sass:"1.71.1","svg-sprite-loader":"^6.0.11",typescript:"^5.2.2","unplugin-auto-import":"^0.17.5","unplugin-vue-components":"^0.26.0",vite:"^5.4.1","vite-bundle-analyzer":"0.9.4","vite-plugin-cdn2":"1.1.0","vite-plugin-compression":"^0.5.1","vite-plugin-ejs":"^1.7.0","vite-plugin-eslint":"1.8.1","vite-plugin-inspect":"^0.8.3","vite-plugin-mock-dev-server":"1.4.7","vite-plugin-svg-icons":"^2.0.1","vite-svg-loader":"^4.0.0","vite-tsconfig-paths":"4.3.2",vitest:"1.5.2","vue-tsc":"^2.0.11"},name:"ray-template",version:"4.9.4"},layout:{copyright:"Copyright © 2022-present Ray",sideBarLogo:{icon:"ray",title:"Ray Template",url:"/dashboard",jumpType:"station"}},appPrimaryColor:{primaryColor:"#2d8cf0",primaryFadeColor:"rgba(45, 140, 240, 0.3)"}};const Tt=Pinia.defineStore("setting",()=>{const{appPrimaryColor:{primaryColor:e}}=qa,{locale:t}=le(),{locale:o}=Tl(),n=Vue.reactive({drawerPlacement:"right",primaryColorOverride:{common:{primaryColor:e,primaryColorHover:e,primaryColorPressed:e}},appTheme:!1,menuTagSwitch:!0,breadcrumbSwitch:!0,localeLanguage:Go(),lockScreenSwitch:!1,copyrightSwitch:!0,contentTransition:"scale",watermarkSwitch:!1,watermarkConfig:{content:"Trying be better~",fontSize:16,lineHeight:16,width:384,height:384,xOffset:12,yOffset:60,rotate:-15},appRootRoute:{name:"Dashboard",path:"/dashboard"},sideBarLogo:Object.assign({},Dn)}),r=l=>{t(l),o(l),n.localeLanguage=l,Ke(E.localeLanguage,l,"localStorage")},a=(l,i=.3)=>{const u=rn(l,i),c={primaryColor:l,primaryColorHover:l,primaryColorPressed:l};n.primaryColorOverride.common=c;const f=document.body;f.style.setProperty("--ray-theme-primary-color",l),f.style.setProperty("--ray-theme-primary-fade-color",u)},s=(l,i,u)=>{Object.hasOwn(n,l)&&(n[l]=i),u==null||u()};return Mn(()=>n.appTheme,l=>{l?n.primaryColorOverride=Object.assign({},n.primaryColorOverride,$.appNaiveUIThemeOverrides.dark,$.appNaiveUIThemeOverridesCommon.dark):n.primaryColorOverride=Object.assign({},n.primaryColorOverride,$.appNaiveUIThemeOverrides.light,$.appNaiveUIThemeOverridesCommon.light)},{immediate:!0}),{...Vue.toRefs(n),updateLocale:r,changePrimaryColor:a,updateSettingState:s}},{persist:{key:E.appPiniaSettingStore}}),Nt=["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb","#d2f5a6","#76f2f2","#9b8bba","#e098c7","#8fd3e8","#71669e","#cc70af","#7cb4cc","#7EC4FF","#5FCBB0","#49C4BF","#F0C9CA","#34DC90","#3295E0","#EAB62E","#76C3F3","#2DC2C0","#FCC43F","#84CFFF"],Ot="transparent",kt={},xt={textStyle:{color:"#ffffff"},subtextStyle:{color:"#dddddd"}},Rt={itemStyle:{borderWidth:"4"},lineStyle:{width:"3"},symbolSize:"0",symbol:"circle",smooth:!0},At={itemStyle:{borderWidth:"4"},lineStyle:{width:"3"},symbolSize:"0",symbol:"circle",smooth:!0},Pt={itemStyle:{barBorderWidth:0,barBorderColor:"#ccc"}},Mt={itemStyle:{borderWidth:0,borderColor:"#ccc"}},Lt={itemStyle:{borderWidth:0,borderColor:"#ccc"}},Et={itemStyle:{borderWidth:0,borderColor:"#ccc"}},zt={itemStyle:{borderWidth:0,borderColor:"#ccc"}},It={itemStyle:{borderWidth:0,borderColor:"#ccc"}},jt={itemStyle:{borderWidth:0,borderColor:"#ccc"}},Dt={itemStyle:{borderWidth:0,borderColor:"#ccc"}},$t={itemStyle:{color:"#fc97af",color0:"transparent",borderColor:"#fc97af",borderColor0:"#87f7cf",borderWidth:"2"}},Ft={itemStyle:{borderWidth:0,borderColor:"#ccc"},lineStyle:{width:"1",color:"#ffffff"},symbolSize:"0",symbol:"circle",smooth:!0,color:["#fc97af","#87f7cf","#f7f494","#72ccff","#f7c5a0","#d4a4eb","#d2f5a6","#76f2f2"],label:{color:"#293441"}},Bt={itemStyle:{areaColor:"#f3f3f3",borderColor:"#999999",borderWidth:.5},label:{color:"#893448"},emphasis:{itemStyle:{areaColor:"rgba(255,178,72,1)",borderColor:"#eb8146",borderWidth:1},label:{color:"rgb(137,52,72)"}}},Wt={itemStyle:{areaColor:"#f3f3f3",borderColor:"#999999",borderWidth:.5},label:{color:"#893448"},emphasis:{itemStyle:{areaColor:"rgba(255,178,72,1)",borderColor:"#eb8146",borderWidth:1},label:{color:"rgb(137,52,72)"}}},Kt={axisLine:{show:!0,lineStyle:{color:"#666666"}},axisTick:{show:!1,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#aaaaaa"},splitLine:{show:!1,lineStyle:{color:["#e6e6e6"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"]}}},Ut={axisLine:{show:!0,lineStyle:{color:"#666666"}},axisTick:{show:!1,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#aaaaaa"},splitLine:{show:!1,lineStyle:{color:["#e6e6e6"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"]}}},qt={axisLine:{show:!0,lineStyle:{color:"#666666"}},axisTick:{show:!1,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#aaaaaa"},splitLine:{show:!1,lineStyle:{color:["#e6e6e6"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"]}}},Gt={axisLine:{show:!0,lineStyle:{color:"#666666"}},axisTick:{show:!1,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#aaaaaa"},splitLine:{show:!1,lineStyle:{color:["#e6e6e6"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.05)","rgba(200,200,200,0.02)"]}}},Ht={iconStyle:{borderColor:"#999999"},emphasis:{iconStyle:{borderColor:"#666666"}}},Yt={textStyle:{color:"#999999"},pageTextStyle:{color:"#999999"}},Xt={axisPointer:{lineStyle:{color:"#cccccc",width:1},crossStyle:{color:"#cccccc",width:1}}},Zt={lineStyle:{color:"#87f7cf",width:1},itemStyle:{color:"#87f7cf",borderWidth:1},controlStyle:{color:"#87f7cf",borderColor:"#87f7cf",borderWidth:.5},checkpointStyle:{color:"#fc97af",borderColor:"#fc97af"},label:{color:"#87f7cf"},emphasis:{itemStyle:{color:"#f7f494"},controlStyle:{color:"#87f7cf",borderColor:"#87f7cf",borderWidth:.5},label:{color:"#87f7cf"}}},Jt={color:["#fc97af","#87f7cf"]},Qt={backgroundColor:"rgba(255,255,255,0)",dataBackgroundColor:"rgba(114,204,255,1)",fillerColor:"rgba(114,204,255,0.2)",handleColor:"#72ccff",handleSize:"100%",textStyle:{color:"#333333"}},eo={label:{color:"#293441"},emphasis:{label:{color:"#293441"}}},Ga={color:Nt,backgroundColor:Ot,textStyle:kt,title:xt,line:Rt,radar:At,bar:Pt,pie:Mt,scatter:Lt,boxplot:Et,parallel:zt,sankey:It,funnel:jt,gauge:Dt,candlestick:$t,graph:Ft,map:Bt,geo:Wt,categoryAxis:Kt,valueAxis:Ut,logAxis:qt,timeAxis:Gt,toolbox:Ht,legend:Yt,tooltip:Xt,timeline:Zt,visualMap:Jt,dataZoom:Qt,markPoint:eo},Ha=Object.freeze(Object.defineProperty({__proto__:null,backgroundColor:Ot,bar:Pt,boxplot:Et,candlestick:$t,categoryAxis:Kt,color:Nt,dataZoom:Qt,default:Ga,funnel:jt,gauge:Dt,geo:Wt,graph:Ft,legend:Yt,line:Rt,logAxis:qt,map:Bt,markPoint:eo,parallel:zt,pie:Mt,radar:At,sankey:It,scatter:Lt,textStyle:kt,timeAxis:Gt,timeline:Zt,title:xt,toolbox:Ht,tooltip:Xt,valueAxis:Ut,visualMap:Jt},Symbol.toStringTag,{value:"Module"})),to=["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089","#516b91","#59c4e6","#edafda","#93b7e3","#a5e7f0","#cbb0e3"],oo="transparent",no={},ao={textStyle:{color:"#008acd"},subtextStyle:{color:"#aaaaaa"}},ro={itemStyle:{borderWidth:1},lineStyle:{width:2},symbolSize:3,symbol:"emptyCircle",smooth:!0},lo={itemStyle:{borderWidth:1},lineStyle:{width:2},symbolSize:3,symbol:"emptyCircle",smooth:!0},so={itemStyle:{barBorderWidth:0,barBorderColor:"#ccc"}},io={itemStyle:{borderWidth:0,borderColor:"#ccc"}},co={itemStyle:{borderWidth:0,borderColor:"#ccc"}},uo={itemStyle:{borderWidth:0,borderColor:"#ccc"}},po={itemStyle:{borderWidth:0,borderColor:"#ccc"}},mo={itemStyle:{borderWidth:0,borderColor:"#ccc"}},fo={itemStyle:{borderWidth:0,borderColor:"#ccc"}},ho={itemStyle:{borderWidth:0,borderColor:"#ccc"}},go={itemStyle:{color:"#d87a80",color0:"#2ec7c9",borderColor:"#d87a80",borderColor0:"#2ec7c9",borderWidth:1}},yo={itemStyle:{borderWidth:0,borderColor:"#ccc"},lineStyle:{width:1,color:"#aaa"},symbolSize:3,symbol:"emptyCircle",smooth:!0,color:["#2ec7c9","#b6a2de","#5ab1ef","#ffb980","#d87a80","#8d98b3","#e5cf0d","#97b552","#95706d","#dc69aa","#07a2a4","#9a7fd1","#588dd5","#f5994e","#c05050","#59678c","#c9ab00","#7eb00a","#6f5553","#c14089"],label:{color:"#eee"}},bo={itemStyle:{areaColor:"#dddddd",borderColor:"#eeeeee",borderWidth:.5},label:{color:"#d87a80"},emphasis:{itemStyle:{areaColor:"rgba(254,153,78,1)",borderColor:"#444",borderWidth:1},label:{color:"rgb(100,0,0)"}}},vo={itemStyle:{areaColor:"#dddddd",borderColor:"#eeeeee",borderWidth:.5},label:{color:"#d87a80"},emphasis:{itemStyle:{areaColor:"rgba(254,153,78,1)",borderColor:"#444",borderWidth:1},label:{color:"rgb(100,0,0)"}}},Vo={axisLine:{show:!0,lineStyle:{color:"#008acd"}},axisTick:{show:!0,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#333"},splitLine:{show:!1,lineStyle:{color:["#eee"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},So={axisLine:{show:!0,lineStyle:{color:"#008acd"}},axisTick:{show:!0,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#333"},splitLine:{show:!0,lineStyle:{color:["#eee"]}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},_o={axisLine:{show:!0,lineStyle:{color:"#008acd"}},axisTick:{show:!0,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#333"},splitLine:{show:!0,lineStyle:{color:["#eee"]}},splitArea:{show:!0,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},wo={axisLine:{show:!0,lineStyle:{color:"#008acd"}},axisTick:{show:!0,lineStyle:{color:"#333"}},axisLabel:{show:!0,color:"#333"},splitLine:{show:!0,lineStyle:{color:["#eee"]}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Co={iconStyle:{borderColor:"#2ec7c9"},emphasis:{iconStyle:{borderColor:"#18a4a6"}}},To={textStyle:{color:"#333333"}},No={axisPointer:{lineStyle:{color:"#008acd",width:"1"},crossStyle:{color:"#008acd",width:"1"}}},Oo={lineStyle:{color:"#008acd",width:1},itemStyle:{color:"#008acd",borderWidth:1},controlStyle:{color:"#008acd",borderColor:"#008acd",borderWidth:.5},checkpointStyle:{color:"#2ec7c9",borderColor:"#2ec7c9"},label:{color:"#008acd"},emphasis:{itemStyle:{color:"#a9334c"},controlStyle:{color:"#008acd",borderColor:"#008acd",borderWidth:.5},label:{color:"#008acd"}}},ko={color:["#5ab1ef","#e0ffff"]},xo={backgroundColor:"rgba(47,69,84,0)",dataBackgroundColor:"#efefff",fillerColor:"rgba(182,162,222,0.2)",handleColor:"#008acd",handleSize:"100%",textStyle:{color:"#333333"}},Ro={label:{color:"#eee"},emphasis:{label:{color:"#eee"}}},Ya={color:to,backgroundColor:oo,textStyle:no,title:ao,line:ro,radar:lo,bar:so,pie:io,scatter:co,boxplot:uo,parallel:po,sankey:mo,funnel:fo,gauge:ho,candlestick:go,graph:yo,map:bo,geo:vo,categoryAxis:Vo,valueAxis:So,logAxis:_o,timeAxis:wo,toolbox:Co,legend:To,tooltip:No,timeline:Oo,visualMap:ko,dataZoom:xo,markPoint:Ro},Xa=Object.freeze(Object.defineProperty({__proto__:null,backgroundColor:oo,bar:so,boxplot:uo,candlestick:go,categoryAxis:Vo,color:to,dataZoom:xo,default:Ya,funnel:fo,gauge:ho,geo:vo,graph:yo,legend:To,line:ro,logAxis:_o,map:bo,markPoint:Ro,parallel:po,pie:io,radar:lo,sankey:mo,scatter:co,textStyle:no,timeAxis:wo,timeline:Oo,title:ao,toolbox:Co,tooltip:No,valueAxis:So,visualMap:ko},Symbol.toStringTag,{value:"Module"})),Za=()=>{const e=Object.assign({"/src/app-config/echart-themes/macarons/macarons-dark.json":Ha,"/src/app-config/echart-themes/macarons/macarons.json":Xa}),t=/\/([^/]+)\.json$/;return Object.keys(e).reduce((n,r)=>{var s;const a=(s=r.match(t))==null?void 0:s[1];if(a)return n.push({name:a,theme:e[r].default}),n;throw new Error(`[RChart Theme Error]: name ${r} is invalid!`)},[])},Ja=e=>{const{getAppTheme:t}=Uo(),{theme:o}=t();return Object.assign({},{text:"loading",color:"#c23531",textColor:o?"#fff":"#000",maskColor:o?"rgba(0, 0, 0, 0.5)":"rgba(255, 255, 255, 0.5)",zlevel:0,fontSize:12,showSpinner:!0,spinnerRadius:10,lineWidth:5,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif"},e)},Qa={intersectionObserver:{type:Boolean,default:!0},intersectionObserverTarget:{type:Object,default:null},intersectionOptions:{type:Object,default:{threshold:.1}},bordered:{type:Boolean,default:!0},downloadOptions:{type:Object,default:()=>({})},onDropdownSelect:{type:[Function,Array]},dropdownOptions:{type:Array},preset:{type:String},contentStyle:{type:[String,Object]},title:{type:[String,Function]},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"100%"},autoResize:{type:Boolean,default:!0},showAria:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},onSuccess:{type:[Function,Array],default:null},onError:{type:[Function,Array],default:null},onFinally:{type:[Function,Array],default:null},theme:{type:String,default:null},autoChangeTheme:{type:Boolean,default:!0},use:{type:Array,default:()=>[]},watchOptions:{type:Boolean,default:!0},loading:{type:Boolean,default:!1},loadingOptions:{type:Object,default:()=>Ja()},autoResizeObserverTarget:{type:Object,default:null},watchOptionsThrottleWait:{type:Number,default:500},nextTick:{type:Boolean,default:!0},setChartOptions:{type:Object,default:()=>({notMerge:!0,lazyUpdate:!0,silent:!1,replaceMerge:[]})},onRegister:{type:[Function,Array],default:null}},er={notMerge:!0,lazyUpdate:!0,silent:!1,replaceMerge:[]},tr=Za(),tt="__R_CHART_DOWN_LOAD_CHART__";tr.forEach(e=>{fn(e.name,e.theme)});const es=Vue.defineComponent({name:"RChart",props:Qa,setup(e,{expose:t}){const{getAppTheme:o}=j(),n=Vue.ref(),r=Vue.ref(),a=Vue.ref();let s,l;const{echartTheme:i}=$;let u,c;const f=Vue.computed(()=>[{label:"下载图片",key:tt,disabled:!(a.value&&a.value.getDom())}]),y=Vue.computed(()=>({"--ray-chart-width":L(e.width),"--ray-chart-height":L(e.height)})),m=Vue.ref(!1);let p;const h=async()=>{var C;oe([gn,yn,bn,vn,Vn,Sn,_n,wn]),oe([Cn,Tn,Nn,On,kn,xn]),oe([Rn,An]),oe([Pn]);try{oe((C=e.use)==null?void 0:C.filter(Boolean))}catch(M){console.error("[RChart register error]: ",M)}},g=()=>{if(c!=null&&c.getDom()&&S(),e.theme==="default"){e.autoChangeTheme?d("dark"):d("");return}if(e.theme)d(e.theme);else{const C=e.autoChangeTheme&&o.value?`${i}-dark`:i;d(C)}},b=C=>{let M=Vue.unref(C);const P=D=>Object.assign({},M,D);return e.showAria&&(M=P({aria:{enabled:!0,decal:{show:!0}}})),M},d=(C=i)=>{const M=n.value,P=b(e.options),{height:D,width:B}=M.getBoundingClientRect(),{onSuccess:ce,onError:ue}=e;try{c=hn(M,C,{width:B===0?200:void 0,height:D===0?200:void 0}),a.value=c,ce&&R(ce,c),e.nextTick?(c.setOption({}),Vue.nextTick(()=>{P&&(c==null||c.setOption(P))})):P&&(c==null||c.setOption(P))}catch(X){throw ue&&R(ue),new Error(`[RChart render error]: ${X}`)}finally{const{onFinally:X}=e;X&&R(X)}},V=()=>!(c&&c.getDom()),S=()=>{V()||(c.clear(),c.dispose(),a.value=void 0,c=null)},O=()=>{c&&c.resize()},v=(C,M)=>{if(C===tt&&!V()){const{filename:D,...B}=e.downloadOptions;ln(c.getDataURL(B),D??`${new Date().getTime()}`)}const{onDropdownSelect:P}=e;P&&R(P,C,M)},w=()=>{if(e.autoResize&&(s||(s=Be(O,500)),l||(l=on(e.autoResizeObserverTarget||r,s))),c!=null&&c.getDom()||!m.value&&e.intersectionObserver)return;g(),p==null||p.stop();const{onRegister:C}=e;C&&c&&R(C,c,w,x)};e.intersectionObserver&&(p=tn(e.intersectionObserverTarget||r,([C])=>{m.value=C.isIntersecting},e.intersectionOptions));const x=()=>{S(),s==null||s.cancel(),l==null||l.stop(),p==null||p.stop(),p=null,s=null,l=null};return Vue.watch(()=>o.value,()=>{e.autoChangeTheme&&(S(),g())}),Vue.watch(()=>e.showAria,()=>{S(),g()}),Vue.watchEffect(()=>{e.watchOptions?u=Ln(()=>e.options,C=>{const M=b(C),P=Object.assign({},er,e.setChartOptions);c==null||c.setOption(M,P)},{deep:!0,throttle:e.watchOptionsThrottleWait}):u==null||u(),e.loading?c==null||c.showLoading(e.loadingOptions):c==null||c.hideLoading(),m.value&&w()}),t(),Vue.onBeforeMount(async()=>{await h()}),Vue.onMounted(()=>{w()}),Vue.onBeforeUnmount(()=>{x(),u==null||u()}),{rayChartRef:n,cssVarsRef:y,rayChartWrapperRef:r,moreDropDownOptions:f,dropdownSelect:v}},render(){const{title:e,contentStyle:t,preset:o,moreDropDownOptions:n,dropdownSelect:r,bordered:a,dropdownOptions:s}=this,{cardExtra:l}=this.$slots;return o==="card"?Vue.createVNode(naive.NCard,{class:"ray-chart",ref:"rayChartWrapperRef",style:[this.cssVarsRef],contentStyle:t,bordered:a},{default:Q(Vue.createVNode("div",{class:"ray-chart__container",ref:"rayChartRef"},null)),header:Q(e,{defaultElement:Vue.createVNode("div",{style:"display: none;"},null)}),"header-extra":Q(l,{defaultElement:Vue.createVNode(Mo,{iconSize:18,cursor:"pointer",options:s??n,trigger:"click",onSelect:r.bind(this),placement:"bottom-end"},null)})}):Vue.createVNode("div",{class:"ray-chart",style:[this.cssVarsRef],ref:"rayChartWrapperRef"},[Vue.createVNode("div",{class:"ray-chart__container",ref:"rayChartRef"},null)])}}),ts=()=>{let e,t,o;const n=(i,u,c)=>{i&&(e=i,t=c,o=u)},r=()=>{if(!e)throw new Error("[useChart]: echart instance is not ready yet. if you are using useChart, please make sure you have called register method in onRegister event.");return{dispose:t,render:o,echartInst:e}};return[n,{getChartInstance:r,isDispose:()=>!(e&&r().echartInst.getDom()),dispose:()=>r().dispose.call(null),render:()=>r().render.call(null)}]},or={actionAlign:{type:String,default:"end"},open:{type:Boolean,default:!1},collapseToggleText:{type:Array,default:()=>["展开","收起"]},bordered:{type:Boolean,default:!1},onUpdateValue:{type:[Function,Array],default:null},"onUpdate:value":{type:[Function,Array],default:null},...naive.gridProps},os=Vue.defineComponent({name:"RCollapseGrid",props:or,setup(e){const t=Vue.computed({get:()=>!e.open,set:a=>{const{onUpdateValue:s,"onUpdate:value":l}=e;s&&R(s,a),l&&R(l,a)}}),o=Vue.computed(()=>({"--r-collapse-grid-action-align":e.actionAlign})),n=()=>{t.value=!t.value};return{modelCollapsed:t,collapseClick:n,CollapseIcon:()=>Vue.createVNode("div",{class:"collapse-icon",onClick:n.bind(this)},[Vue.createVNode("span",null,[t.value?e.collapseToggleText[0]:e.collapseToggleText[1]]),Vue.createVNode(N,{customClassName:`collapse-icon--arrow ${t.value?"":"collapse-icon--arrow__expanded"}`,name:"expanded",size:"14"},null)]),cssVars:o}},render(){const{$slots:{collapse:e,action:t,default:o},CollapseIcon:n,$props:r,modelCollapsed:a,xGap:s,yGap:l,collapsedRows:i,cssVars:u}=this;return Vue.createVNode(naive.NCard,{bordered:this.bordered,style:[u]},{default:()=>Vue.createVNode(naive.NGrid,Vue.mergeProps({class:"ray-collapse-grid"},r,{collapsed:a,xGap:s||12,yGap:l||12,collapsedRows:i}),{default:()=>[o==null?void 0:o(),Vue.createVNode(naive.NGridItem,{suffix:!0,class:"ray-collapse-grid__suffix--btn"},{default:()=>[Vue.createVNode(naive.NFlex,{justify:"end",align:"center"},{default:()=>[t==null?void 0:t(),e?e(a):n()]})]})]})})}}),nr={color:{type:String,default:"currentColor"},prefix:{type:String,default:"icon"},name:{type:String,required:!0},size:{type:[Number,String],default:14},width:{type:[Number,String],default:0},height:{type:[Number,String],default:0},customClassName:{type:String,default:null},depth:{type:Number,default:1},cursor:{type:String,default:"default"},onClick:{type:[Function,Array],default:null}},N=Vue.defineComponent({name:"RIcon",props:nr,setup(e){const t=Vue.computed(()=>`#${e.prefix}-${e.name}`),o=Vue.computed(()=>({"--ray-icon-width":e.width?L(e.width):L(e.size),"--ray-icon-height":e.height?L(e.height):L(e.size),"--ray-icon-depth":e.depth,"--ray-icon-cursor":e.cursor,"--ray-icon-color":e.color}));return{symbolId:t,cssVars:o,iconClick:r=>{const{onClick:a}=e;a&&R(a,r)}}},render(){return Vue.createVNode("span",{class:["ray-icon",this.customClassName],style:[this.cssVars],onClick:this.iconClick.bind(this)},[Vue.createVNode("svg",{RayIconAttribute:"ray-icon",ariaHidden:!0},[Vue.createVNode("use",Vue.mergeProps({"xlink:href":this.symbolId},{fill:this.color}),null)])])}}),ar={src:{type:String,required:!0},iframeWrapperClass:{type:String,default:null},frameborder:{type:Number,default:0},width:{type:[String,Number],default:"100%"},height:{type:[String,Number],default:"100%"},allow:{type:String,default:null},name:{type:String,default:null},title:{type:String,default:null},onSuccess:{type:[Function,Array],default:null},onError:{type:[Function,Array],default:null},customSpinProps:{type:Object,default:()=>({})},lazy:{type:Boolean,default:!0},iframeClass:{type:String,default:null}},ns=Vue.defineComponent({name:"RIframe",props:ar,setup(e,{expose:t}){const o=Vue.computed(()=>({"--ray-iframe-frameborder":L(e.frameborder),"--ray-iframe-width":L(e.width),"--ray-iframe-height":L(e.height)})),n=Vue.ref(),r=Vue.ref(!0),a=l=>{r.value=!1;const{onSuccess:i}=e;i&&R(i,n.value,l)},s=l=>{r.value=!1;const{onError:i}=e;i&&R(i,l)};return ae(n,"load",a),ae(n,"error",s),t({iframeInst:n}),{cssVars:o,iframeRef:n,spinShow:r}},render(){return Vue.createVNode("div",{class:["ray-iframe",this.iframeWrapperClass],style:[this.cssVars]},[Vue.createVNode(naive.NSpin,Vue.mergeProps(this.customSpinProps,{show:this.spinShow}),{...this.$slots,default:()=>Vue.createVNode("iframe",Vue.mergeProps({class:["ray-iframe__container",this.iframeClass],ref:"iframeRef",src:this.src,allow:this.allow,name:this.name,title:this.title},{loading:this.lazy?"lazy":null}),null)})])}}),rr={...naive.modalProps,memo:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},width:{type:[String,Number],default:600},cardWidth:{type:[String,Number],default:600},dialogWidth:{type:[String,Number],default:446},dad:{type:Boolean,default:!1}},lr=(e,t,o)=>{const{scheduler:n}=o??{};return new Promise(r=>{setTimeout(()=>{const a=t==="card"?".n-card-header__main":".n-dialog__title";if(e){const s=Je(e).draggable({inertia:!0,autoScroll:!0,allowFrom:a,modifiers:[Je.modifiers.restrictRect({restriction:"parent",endOnly:!0})],listeners:{move:l=>{n==null||n(l)}}}).resizable(!1);r(s)}},30)})},Ao=(e,t)=>{const o=typeof e=="string"?document.querySelector(e):e;return new Promise((n,r)=>{if(o){o.setAttribute("can-drag","true");const{preset:a,dargCallback:s}=t;let{x:l,y:i}=t;lr(o,a,{scheduler:u=>{const c=u.target;l+=u.dx,i+=u.dy,c.style.transform=`translate(${l}px, ${i}px)`,s==null||s(l,i,u)}}).then(u=>{n(u)})}else r()})},sr="r-modal__preset-card--fullscreen",Po="r-modal",ee={width:"--r-modal-width",cardWidth:"--r-modal-card-width",dialogWidth:"--r-modal-dialog-width"},as=Vue.defineComponent({name:"RModal",props:rr,setup(e){const t=Vue.computed(()=>({[ee.width]:L(e.width??600),[ee.cardWidth]:L(e.cardWidth??600),[ee.dialogWidth]:L(e.dialogWidth??446)})),o=be();let n;const r={x:0,y:0},a=Vue.computed(()=>e.preset==="card"&&e.fullscreen);return Vue.watch(()=>e.show,s=>{s&&e.dad&&(e.preset==="card"||e.preset==="dialog")?Vue.nextTick(()=>{const l=document.getElementById(o);l&&Ao(l,{preset:e.preset,x:r.x,y:r.y,dargCallback:(i,u)=>{r.x=i,r.y=u}}).then(i=>{n=i}),e.memo&&l&&(l.style.transform=`translate(${r.x}px, ${r.y}px)`)}):(n==null||n.unset(),n=null)},{immediate:!0}),{cssVars:t,isFullscreenCardType:a,uuidEl:o}},render(){const{$props:e,$slots:t,$attrs:o}=this,{preset:n,...r}=e,{cssVars:a,uuidEl:s,isFullscreenCardType:l}=this;return Vue.createVNode(naive.NModal,Vue.mergeProps({class:[Po,l?sr:""],style:[a,l?"height: 100vh":""],preset:n},{id:s},r,o),{...t})}}),rs=()=>{const{create:e,destroyAll:t}=naive.useModal();return{create:n=>{const{content:r,...a}=n;let s=r;a.preset==="card"&&a.fullscreen&&(s=()=>Vue.h(naive.NScrollbar,{themeOverrides:{color:"rgba(0, 0, 0, 0)",colorHover:"rgba(0, 0, 0, 0)"},trigger:"none",style:{width:"auto",height:"calc(100vh - 29px - var(--n-padding-bottom) - var(--n-padding-bottom) - var(--n-padding-top))"}},{default:()=>typeof r=="function"?r():r}));const{preset:l,dad:i,fullscreen:u,width:c,cardWidth:f,dialogWidth:y}=n,m=e({...a,content:s}),{key:p}=m,h={[ee.width]:L(c??600),[ee.cardWidth]:L(f??600),[ee.dialogWidth]:L(y??446)};return Vue.nextTick(()=>{const[g]=ve(`[internalkey="${p}"]`)||[];if(g){if(i&&Ao(g,{preset:l,x:0,y:0}),u&&l==="card"){const b=g.querySelector(".n-card__content");b&&Ne(b,{maxHeight:"calc(100vh - 9px - var(--n-padding-bottom) - var(--n-padding-bottom) - var(--n-padding-top))",overflowY:"hidden",padding:"0"}),Ne(g,{width:"100%",height:"100vh"})}Ne(g,h),ht(g,Po)}}),m},destroyAll:t}},ir={...naive.dropdownProps,icon:{type:String,default:"more"},iconSize:{type:Number,default:14},cursor:{type:String,default:"default"}};function cr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Mo=Vue.defineComponent({name:"RMoreDropdown",props:ir,render(){let e;const{iconSize:t,cursor:o,icon:n}=this,{default:r}=this.$slots;return Vue.createVNode(naive.NDropdown,Vue.mergeProps(this.$props,this.$attrs,{placement:"bottom-start"}),cr(e=Q(r,{defaultElement:Vue.createVNode(N,{name:n,size:t,cursor:o},null)}))?e:{default:()=>[e]})}}),se={...naive.dataTableProps,renderWrapperHeader:{type:Boolean,default:!0},cardProps:{type:Object,default:()=>({})},tool:{type:Boolean,default:!0},downloadCsvTableOptions:{type:Object,default:()=>({})},title:{type:[String,Number,Object],default:null},toolOptions:{type:Array},coverTool:{type:Boolean,default:!1},contextMenuOptions:{type:Array},disabledContextMenu:{type:Boolean,default:!1},onContextMenuClick:{type:[Function,Array],default:null},wrapperBordered:{type:Boolean,default:!1},printTableOptions:{type:Object,default:()=>({})},onUpdateColumns:{type:[Function,Array],default:null},"onUpdate:columns":{type:[Function,Array],default:null},onContextmenu:{type:[Function,Array],default:null},onRegister:{type:[Function,Array],default:null}},F={tableIconSize:"18",tableKey:Symbol("r-table")},ur=[{label:"斑马条纹",value:"striped"},{label:"表格边框",value:"bordered"}],dr=Vue.defineComponent({name:"TableSizeSelect",props:{onChangeSize:{type:[Function,Array],default:null},...se},setup(e){return{size:Vue.ref(e.size),sizeOptions:[{label:"默认",value:"medium"},{label:"紧凑",value:"small"},{label:"宽松",value:"large"}],updatePopselectValue:r=>{const{onChangeSize:a}=e;a&&R(a,r)}}},render(){return Vue.createVNode(naive.NPopselect,{value:this.size,"onUpdate:value":e=>this.size=e,options:this.sizeOptions,trigger:"click",onUpdateValue:this.updatePopselectValue.bind(this)},{default:()=>[Vue.createVNode(N,{name:"adjustment",size:F.tableIconSize,cursor:"pointer"},null)]})}}),pr=Vue.defineComponent({name:"TableFullscreen",setup(){const{wrapperRef:e}=Vue.inject(F.tableKey,{}),[t,{toggleFullscreen:o,isEnabled:n}]=ft(e);return{toggleFullscreen:o,isEnabled:n}},render(){const{toggleFullscreen:e,isEnabled:t,$t:o}=this;return Vue.createVNode(N,{name:"fullscreen",size:F.tableIconSize,cursor:"pointer",onClick:()=>{t||window.$message.warning(o("globalMessage.isEnabledFullscreen")),e()}},null)}}),mr=()=>Vue.createVNode(N,{name:"draggable",size:14,cursor:"grab"},null),ot=({icon:e,title:t,onClick:o,customClassName:n})=>Vue.createVNode(naive.NPopover,{showArrow:!1},{trigger:()=>Vue.createVNode(N,{name:e,size:F.tableIconSize,cursor:"pointer",customClassName:n,onClick:o==null?void 0:o.bind(null)},null),default:()=>t}),De=(e,t)=>{if(!t)return[null,null];for(let o=0;o<t.length;++o){const n=t[o];if(n.key===e.key)return[t,o];const[r,a]=De(e,n.children);if(r&&a!==null)return[r,a]}return[null,null]},xe="r-table__c-tool-icon--active",fr=Vue.defineComponent({name:"TableC",props:{...se,onUpdateColumn:{type:[Function,Array],default:null}},setup(e){let t;const o=Vue.computed({get:()=>ye(e.columns).filter(i=>i.type?(t=i,!1):!0).map((i,u)=>{const{key:c,title:f,children:y,fixed:m,isResizable:p,...h}=i,g=m==="left",b=m==="right",d={...h,title:f,key:c,fixed:m,isLeftFixedActivated:g,isRightFixedActivated:b,isResizable:p};return{...d,suffix:()=>Vue.createVNode(naive.NFlex,{style:"padding-left: 32px;"},{default:()=>[Vue.createVNode(ot,{icon:"row_head",title:"固定在列首",customClassName:g?xe:"",onClick:a.bind(this,"left",d,u)},null),Vue.createVNode(naive.NPopover,{showArrow:!1},{trigger:()=>Vue.createVNode(N,{name:"resize_h",size:F.tableIconSize,cursor:"pointer",customClassName:p?xe:"",onClick:r.bind(this,d,u)},null),default:()=>"修改列宽"}),Vue.createVNode(ot,{icon:"row_end",title:"固定在列尾",customClassName:b?xe:"",onClick:a.bind(this,"right",d,u)},null)]})}}),set:()=>{}}),n=l=>{const{onUpdateColumn:i}=e;i&&R(i,l)},r=(l,i)=>{l.isResizable=!l.isResizable,l.resizable=l.isResizable,o.value[i]=l,n(o.value)},a=(l,i,u)=>{const c=`${l}FixedActivated`,f=`${l==="left"?"right":"left"}FixedActivated`;i[f]=!1,i[c]=!i[c],i[c]?i.fixed=l:i.fixed=void 0,o.value[u]=i,n(o.value)};return{treeDataSource:o,treeDrop:({node:l,dragNode:i,dropPosition:u})=>{const[c,f]=De(i,o.value);if(c===null||f===null)return;c.splice(f,1);const[y,m]=De(l,o.value);y===null||m===null||(u==="before"?y.splice(m,0,i):y.splice(m+1,0,i),pt(t)||y.unshift(t),n(y))}}},render(){return Vue.createVNode(naive.NPopover,{displayDirective:"show",trigger:"click",showArrow:!1},{trigger:()=>Vue.createVNode(N,{name:"setting",size:F.tableIconSize,cursor:"pointer",customClassName:"r-table__setting"},null),default:()=>Vue.createVNode(naive.NTree,{class:"r-table__c-tree",data:this.treeDataSource,blockLine:!0,draggable:!0,keyboard:!1,labelField:"title",selectable:!1,renderSwitcherIcon:mr.bind(this),onDrop:this.treeDrop.bind(this)},null)})}}),hr=Vue.defineComponent({name:"TablePrint",props:se,setup(e){const{wrapperRef:t}=Vue.inject(F.tableKey,{});return{printTableClick:()=>{const{printTableOptions:{printOptions:n={},domToImageOptions:r}={},title:a}=e;(n.documentTitle===""||n.documentTitle===void 0||n.documentTitle===null)&&(n.documentTitle=typeof a=="string"?a:""),gt(t,{printOptions:n,domToImageOptions:r})}}},render(){return Vue.createVNode(N,{name:"print",size:F.tableIconSize,cursor:"pointer",onClick:this.printTableClick.bind(this)},null)}}),gr=Vue.defineComponent({name:"TablePropsSelect",props:{...se,onPopselectChange:{type:[Function,Array],default:null},onInitialed:{type:[Function,Array],default:null}},setup(e){const t=Vue.ref(!1),o=Vue.ref([]),n=a=>{const{onPopselectChange:s}=e;s&&R(s,a)};return(()=>{const{striped:a,bordered:s,onInitialed:l}=e;a&&o.value.push("striped"),s&&o.value.push("bordered"),l&&R(l,o.value)})(),{propsPopselectValue:o,popoverShow:t,updatePopselectValue:n}},render(){return Vue.createVNode(naive.NPopselect,{value:this.propsPopselectValue,"onUpdate:value":e=>this.propsPopselectValue=e,options:ur,trigger:"click",multiple:!0,onUpdateValue:this.updatePopselectValue.bind(this)},{default:()=>[Vue.createVNode(N,{name:"expanded",size:F.tableIconSize,cursor:"pointer",style:"transform: rotate(270deg);"},null)]})}});function yr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const ls=Vue.defineComponent({name:"RTable",inheritAttrs:!1,props:se,setup(e,t){const{expose:o,emit:n}=t,r=Vue.ref(),a=Vue.ref(),s=be(16),l=be(16),i=Vue.reactive({x:0,y:0,showContextMenu:!1}),u=Vue.reactive({size:e.size}),c=Vue.ref(Object.assign({striped:!1,bordered:!1},ne(e,"striped","bordered"))),f=(d,V)=>{const{onContextMenuClick:S}=e;S&&R(S,d,V),i.showContextMenu=!1},y=(d,V)=>{var O;return{...(O=e.rowProps)==null?void 0:O.call(e,d,V),onContextmenu:e.disabledContextMenu?void 0:v=>{v.preventDefault(),i.showContextMenu=!1,Vue.nextTick().then(()=>{i.showContextMenu=!0,i.x=v.clientX,i.y=v.clientY})}}},m=d=>{u.size=d},p=d=>{const{onUpdateColumns:V,"onUpdate:columns":S}=e;V&&R(V,d),S&&R(S,d)},h=()=>{const{toolOptions:d}=e;return d==null?void 0:d.filter(Boolean).map(V=>typeof V=="function"?V():V)},g=d=>{Object.keys(c.value).forEach(S=>{c.value[S]=d.includes(S)})},b=d=>{const{tool:V}=d;if(!V)return;const S=()=>Vue.createVNode(naive.NFlex,{align:"center"},{default:()=>[Vue.createVNode(hr,d,null),Vue.createVNode(dr,Vue.mergeProps(d,{onChangeSize:m.bind(this)}),null),Vue.createVNode(pr,null,null),Vue.createVNode(fr,Vue.mergeProps(d,{onUpdateColumn:p.bind(this)}),null),Vue.createVNode(gr,Vue.mergeProps(d,{onPopselectChange:g.bind(this),onInitialed:g.bind(this)}),null)]});return e.toolOptions?e.coverTool?()=>{let O;return Vue.createVNode(naive.NFlex,{align:"center"},yr(O=h())?O:{default:()=>[O]})}:()=>Vue.createVNode(naive.NFlex,{align:"center"},{default:()=>[S(),h()]}):S};return Vue.onMounted(()=>{const{onRegister:d}=e;d&&r.value&&R(d,r.value,{uuidTable:l,uuidWrapper:s,wrapperRef:a})}),Vue.provide(F.tableKey,{uuidTable:l,uuidWrapper:s,wrapperRef:a}),o(),{uuidWrapper:s,uuidTable:l,contextMenuReactive:i,rTableInst:r,combineRowProps:y,contextMenuSelect:f,privateReactive:u,tool:b,wrapperRef:a,propsPopselectValue:c}},render(){const{$props:e,$attrs:t,wrapperBordered:o,uuidWrapper:n,privateReactive:r,disabledContextMenu:a,contextMenuReactive:s,contextMenuOptions:l,uuidTable:i,title:u,$slots:c,propsPopselectValue:f,renderWrapperHeader:y}=this,{class:m}=t,{tool:p,combineRowProps:h,contextMenuSelect:g}=this;return Vue.createVNode(naive.NCard,Vue.mergeProps(e.cardProps,{id:n},{ref:"wrapperRef",bordered:o,class:m}),{default:()=>Vue.createVNode(Vue.Fragment,null,[Vue.createVNode(naive.NDataTable,Vue.mergeProps({id:i},t,e,f,{rowProps:h.bind(this),size:r.size,ref:"rTableInst"}),{...c}),a?null:Vue.createVNode(naive.NDropdown,{show:s.showContextMenu,placement:"bottom-start",trigger:"manual",x:s.x,y:s.y,options:l,onClickoutside:()=>s.showContextMenu=!1,onSelect:g.bind(this)},null)]),header:y?Q(u,{defaultElement:Vue.createVNode("div",{style:"display: none;"},null)}):null,"header-extra":p(e),footer:()=>{var b;return(b=c.tableFooter)==null?void 0:b.call(c)},action:()=>{var b;return(b=c.tableAction)==null?void 0:b.call(c)}})}}),ss=()=>{const e=Vue.ref();let t={};const o=(m,p)=>{m&&(e.value=m,t=p)},n=()=>{if(!e.value)throw new Error("[useTable]: table instance is not ready yet. if you are using useTable, please make sure you have called register method in onRegister event.");return e.value};return[o,{getTableInstance:n,clearFilters:()=>n().clearFilters.call(null),clearSorter:()=>n().clearSorter.call(null),downloadCsv:m=>n().downloadCsv.call(null,m),filters:m=>n().filters.call(null,m),page:m=>n().page.call(null,m),scrollTo:m=>n().scrollTo(m),sort:(m,p)=>n().sort.call(null,m,p),print:m=>{const{uuidWrapper:p}=t;if(p){const h=document.getElementById(p);gt(h,m)}},filter:m=>n().filter.call(null,m)}]},Lo=(e,t,o)=>{var n;if(e.length)for(const r of e){if(r[t]===o)return r;if((n=r==null?void 0:r.children)!=null&&n.length){const a=Lo(r.children,t,o);if(a)return a}}},nt=e=>{const t=Vue.unref(e);return t?t.findIndex(n=>{const{type:r,multiple:a}=n;if(r==="selection"&&(a==null||a===!0))return!0})!==-1:!0},br=(e,t,o,n)=>{const r=Vue.unref(e);return r?t.reduce((a,s)=>{const l=Vue.unref(o).findIndex(u=>u[n]===s);if(l!==-1)return a.push(Vue.unref(o)[l]),a;const i=r.findIndex(u=>u[n]===s);return i!==-1&&a.push(r[i]),a},[]):o},is=(e,t,o)=>{const n=Vue.ref([]),r=Vue.ref([]),{rowKey:a="key",onChange:s}=o||{},l=Vue.computed(()=>nt(t)),i=(p,h,g)=>{n.value=p,r.value=Vue.unref(br(e,p,r,a)),s==null||s(p,r.value,g),nt(t)},u=()=>n.value,c=()=>r.value,f=()=>{n.value=[],r.value=[],s==null||s(n.value,r.value,{row:void 0,action:"uncheckAll"})},y=p=>{if(p==null)return;let h;n.value=n.value.filter(g=>g!==p),r.value=r.value.filter(g=>g[a]===p?(h=g,!1):!0),s==null||s(n.value,r.value,{row:h,action:"uncheck"})},m=p=>{if(n.value.includes(p))return;const h=!l.value&&n.value.length>=1,g=Lo(Vue.unref(e)||[],a,p);h?n.value=[p]:n.value.push(p),g&&(h?r.value=[g]:r.value.push(g),s==null||s(n.value,r.value,{row:g,action:"check"}))};return Ue(()=>{f()}),[n,{checkedRows:r,checkedRowKeysBind:i,getKeys:u,getRows:c,clearAll:f,clearKey:y,selectKey:m}]},vr={transitionPropName:"fade",transitionMode:"out-in",transitionAppear:!0},Vr=Vue.defineComponent({name:"RTransitionComponent",__name:"index",props:Vue.mergeDefaults({transitionPropName:{},transitionMode:{},transitionAppear:{type:Boolean}},vr),setup(e){const{getKeepAliveInclude:t}=Er(),{setupKeepAlive:o,maxKeepAliveLength:n,keepAliveExclude:r}=Vt;return(a,s)=>{const l=Vue.resolveComponent("RouterView");return Vue.openBlock(),Vue.createElementBlock("div",null,[Vue.createVNode(l,null,{default:Vue.withCtx(({Component:i,route:u})=>[i?(Vue.openBlock(),Vue.createBlock(Vue.Transition,{key:0,name:a.transitionPropName,mode:a.transitionMode,appear:a.transitionAppear},{default:Vue.withCtx(()=>[(Vue.openBlock(),Vue.createBlock(Vue.Suspense,null,{default:Vue.withCtx(()=>[Vue.unref(o)?(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{key:0,max:Vue.unref(n),include:Vue.unref(t),exclude:Vue.unref(r)},[(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(i),{key:u.fullPath}))],1032,["max","include","exclude"])):(Vue.openBlock(),Vue.createBlock(Vue.resolveDynamicComponent(i),{key:u.fullPath}))]),_:2},1024))]),_:2},1032,["name","mode","appear"])):Vue.createCommentVNode("",!0)]),_:1})])}}}),Sr={...naive.formProps,onRegister:{type:[Function,Array],default:null}},cs=Vue.defineComponent({name:"RForm",props:Sr,setup(e,{expose:t}){const o=Vue.ref();return Vue.onMounted(()=>{const{onRegister:n}=e;n&&o.value&&R(n,o.value)}),t(),{formRef:o}},render(){const{$attrs:e,$props:t,$slots:o}=this;return Vue.createVNode(naive.NForm,Vue.mergeProps(e,t,{ref:"formRef"}),{...o})}}),us=(e,t)=>{const o=Vue.ref(),n=u=>{u&&(o.value=u)},r=()=>{if(!o.value)throw new Error("[useForm]: form instance is not ready yet. if you are using useForm, please make sure you have called register method in onRegister event.");return o.value};return[n,{getFormInstance:r,validate:(u,c)=>r().validate.call(null,u,c),restoreValidation:()=>r().restoreValidation.call(null),formModel:()=>ye(e)||{},formRules:()=>ye(t)||{}}]},_r=["addTabClass","addTabStyle","paneClass","paneStyle","paneWrapperStyle","tabClass","tabStyle","type","label","addable","closable","onAdd","onClose","placement","animated","justifyContent","builtinThemeOverrides","displayDirective"],wr={tabPaddingSmallSegment:"4px 7px",tabPaddingMediumSegment:"6px 11px",tabPaddingLargeSegment:"8px 11px"},Cr=We({...naive.tabsProps,options:{type:Array,default:()=>[]},width:{type:[Number,String],default:"fitContent"}},..._r);function Tr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const $e=e=>{const{icon:t,label:o}=e;return t?Vue.createVNode(naive.NFlex,{align:"center",wrap:!1,size:"small"},{default:()=>[Vue.createVNode(t,null,null),Vue.createVNode("div",null,[o])]}):o},Nr=e=>{if(typeof e.popover=="string")return Vue.createVNode(naive.NPopover,null,{trigger:()=>$e(e),default:()=>e.popover});if(q(e.popover,"Object")){const{popover:t}=e,{label:o,...n}=t;return Vue.createVNode(naive.NPopover,n,{trigger:()=>$e(e),default:()=>o})}},ds=Vue.defineComponent({name:"RSegment",props:Cr,setup(e,{expose:t}){const o=Vue.computed(()=>{const{width:n}=e;let r="";switch(n){case"block":r="100%";break;case"fitContent":r="fit-content";break;default:r=typeof n=="number"?L(n):"fit-content"}return{"--r-segment-width":r}});return t(),{cssVars:o}},render(){let e;const{$props:t,options:o,cssVars:n,themeOverrides:r}=this;return Vue.createVNode(naive.NTabs,Vue.mergeProps(t,{ref:"segmentRef",style:[n],class:"r-segment",type:"segment",animated:!0,themeOverrides:Object.assign({},wr,r)}),Tr(e=o.map(a=>Vue.createVNode(naive.NTab,{key:a.key,name:a.key,tab:a.popover?Nr(a):$e(a),disabled:a.disabled},{...a.slots})))?e:{default:()=>[e]})}}),Or={width:{type:[String,Number],default:"auto"},height:{type:[String,Number],default:"auto"},loading:{type:Boolean,default:!1},barcodeRender:{type:String,default:"canvas",validator:e=>["canvas","svg"].includes(e)},text:{type:String},options:{type:Object,default:()=>({})},format:{type:String,default:()=>"CODE128"},watchText:{type:Boolean,default:!0},onSuccess:{type:[Function,Array]},onError:{type:[Function,Array]},onFinally:{type:[Function,Array]}},ps=Vue.defineComponent({name:"RBarcode",props:Or,setup(e){const t=Vue.ref(),o=Vue.computed(()=>({"--r-barcode-width":L(e.width),"--r-barcode-height":L(e.height)}));let n;const r=()=>{try{const{format:a,text:s,options:l,onSuccess:i}=e,u=Object.assign({},l,{format:a});JsBarcode(t.value,s!=null?s.toString():"",u),i&&R(i,s,a,l)}catch(a){const{onError:s}=e;s&&R(s,a)}finally{const{onFinally:a}=e;a&&R(a)}};return Vue.watchEffect(()=>{e.watchText?n=Vue.watch(()=>e.text,r):n==null||n()}),Vue.onMounted(()=>{r()}),Vue.onBeforeUnmount(()=>{n==null||n()}),{barcodeRef:t,cssVars:o}},render(){const{barcodeRender:e,loading:t,cssVars:o}=this,n=["r-barcode",{"r-barcode--loading":t}];return Vue.createVNode(naive.NSpin,{class:"r-barcode-spin",show:t},{default:()=>[e==="canvas"?Vue.createVNode("canvas",{class:n,style:o,ref:"barcodeRef"},null):Vue.createVNode("svg",{class:n,style:o,ref:"barcodeRef"},null)]})}});var kr={pkg:{dependencies:{"@vueuse/core":"^10.9.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10","dom-to-image":"2.6.0",echarts:"^5.5.0",interactjs:"1.10.26",jsbarcode:"3.11.6","lodash-es":"^4.17.21",mockjs:"1.1.0","naive-ui":"^2.39.0",pinia:"^2.1.7","pinia-plugin-persistedstate":"^3.2.0","print-js":"^1.6.0",vue:"^3.4.38","vue-demi":"0.14.6","vue-hooks-plus":"2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.3.2","vue3-next-qrcode":"2.0.10"},devDependencies:{"@commitlint/cli":"^17.7.1","@commitlint/config-conventional":"^17.7.0","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.1.1","@types/dom-to-image":"2.6.7","@types/jsbarcode":"3.11.4","@types/lodash-es":"^4.17.12","@types/mockjs":"1.0.7","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.5.0","@vitejs/plugin-vue":"^5.1.0","@vitejs/plugin-vue-jsx":"^4.0.0","@vitest/ui":"1.4.0","@vue/eslint-config-prettier":"^9.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/test-utils":"2.4.3",autoprefixer:"^10.4.15",depcheck:"^1.4.5",eslint:"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-config-standard-with-typescript":"^43.0.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-promise":"^6.1.1","eslint-plugin-vue":"^9.25.0","happy-dom":"14.3.1",husky:"8.0.3","lint-staged":"^15.1.0",postcss:"^8.4.31","postcss-px-to-viewport-8-with-include":"1.2.2",prettier:"^3.2.5",sass:"1.71.1","svg-sprite-loader":"^6.0.11",typescript:"^5.2.2","unplugin-auto-import":"^0.17.5","unplugin-vue-components":"^0.26.0",vite:"^5.4.1","vite-bundle-analyzer":"0.9.4","vite-plugin-cdn2":"1.1.0","vite-plugin-compression":"^0.5.1","vite-plugin-ejs":"^1.7.0","vite-plugin-eslint":"1.8.1","vite-plugin-inspect":"^0.8.3","vite-plugin-mock-dev-server":"1.4.7","vite-plugin-svg-icons":"^2.0.1","vite-svg-loader":"^4.0.0","vite-tsconfig-paths":"4.3.2",vitest:"1.5.2","vue-tsc":"^2.0.11"},name:"ray-template",version:"4.9.4"},layout:{copyright:"Copyright © 2022-present Ray",sideBarLogo:{icon:"ray",title:"Ray Template",url:"/dashboard",jumpType:"station"}},appPrimaryColor:{primaryColor:"#2d8cf0",primaryFadeColor:"rgba(45, 140, 240, 0.3)"}};const xr=(e,t,o)=>!e||typeof e!="object"?!1:e[t]===o,Eo=(e,t,o)=>{const n=[];if(xr(e,t,o))return n.push(e),n;if(e.children&&e.children.length>0)for(const r of e.children){const a=Eo(r,t,o);a.length>0&&n.push(e,...a)}return n},Rr=(e,t,o)=>{const n=[];for(const r of e){const a=Eo(r,t,o);a.length>0&&n.push(...a)}return n},at=e=>{const{breadcrumbLabel:t}=e;if(!t)return;const{layout:{sideBarLogo:o}}=kr,n=o?o.title:"";document.title=t+" - "+n},Ar=e=>{const{meta:{icon:t}}=e;if(!t)return;if(q(t,"Object"))return()=>t;const o=Vue.h(N,{name:t,size:H.menuCollapsedIconSize,cursor:"pointer"},{});return()=>o},zo=e=>{const{meta:{extra:t}}=e;if(!t)return;const{show:o}=t;if(o===!1)return;const{t:n}=le(),{label:r,icon:a,type:s,i18nLabel:l}=t,i={type:"primary",size:"small",round:!0,bordered:!1,strong:!0},u=()=>l?n(l):r||null,c=()=>a&&(l||r)||!a&&(l||r)?null:{"padding-right":"0"};if(q(t,"Object"))return()=>Vue.h(naive.NTag,{...i,type:s||"primary",style:c()},{default:()=>u(),icon:()=>a})},rt=()=>{const{getRootPath:e}=te();return re(E.appMenuKey,"sessionStorage",{defaultValue:e.value})},Io=()=>Ba(Da()),Pr=()=>Fa(Io()),Fe=["redirect","breadcrumbLabel","children","key","meta","name","path","show","fullPath"];let me;const jo=(e,t)=>{var o;if(me&&Ze(me.fullPath,t))return me;for(const n of e){if(Ze(n.fullPath,t))return me=n,n;if((o=n.children)!=null&&o.length){jo(n.children,t);continue}}},Do=Pinia.defineStore("menu",()=>{const{push:e,getRoutes:t}=VueRouter.useRouter(),o=VueRouter.useRoute(),{t:n}=le(),{setKeepAliveInclude:r}=zr(),a=Vue.reactive({menuKey:rt(),options:[],collapsed:!1,menuTagOptions:[],breadcrumbOptions:[],currentMenuOption:null}),s=Vue.ref(!0),l=(d,V)=>{Object.hasOwn(a,d)&&(a[d]=V)},i=d=>{const{meta:V}=d,{i18nKey:S,noLocalTitle:O}=V,v=Vue.computed(()=>S?n(`${S}`):O),w={...d,key:d.fullPath,label:()=>Vue.h(naive.NEllipsis,null,{default:()=>v.value}),breadcrumbLabel:v.value},x=Object.assign({},w,{icon:Ar(d),extra:zo(d)});return d.fullPath===rt()&&(a.currentMenuOption=x),x.show=Ct(x),x},u=d=>{a.breadcrumbOptions=Rr(a.options,"fullPath",d)},c=(d,V=!0)=>{const O=Array.isArray(d)?[...d]:[d];V?a.menuTagOptions.push(...O):a.menuTagOptions=O},f=(d,V)=>{a.menuTagOptions.find(O=>O.fullPath===d)||a.menuTagOptions.push(V)},y=(d,V,S)=>{const{meta:O}=V;if(O.windowOpen)window.open(O.windowOpen);else{e({path:String(d),query:S});const{sameLevel:v}=O;if(r(V),at(V),!v)f(d,V),u(d),a.menuKey=d,a.currentMenuOption=V,Ke(E.appMenuKey,d);else{const w=ne(i(V),Fe);a.breadcrumbOptions.find(C=>C.key===w.key)||a.breadcrumbOptions.push({...w,fullPath:String(w.key)})}}},m=async(d,V)=>{const[S]=d.split("?"),O=t().find(v=>v.path===S);if(O){const v=ne(O,Fe);y(S,i({...v,fullPath:v.path}),V)}},p=()=>new Promise(d=>{const V=(S,O)=>{var w;const v=[];for(const x of S){let C=`${O.endsWith("/")?O:O+"/"}${x.path}`;if(C=C.replace(/\/+/g,"/"),(w=x.children)!=null&&w.length)x.children=V(x.children,C);else if(!Bo(x.meta))continue;v.push(i({...x,fullPath:C}))}return v};if(a.options=V(Io(),""),a.currentMenuOption){const{currentMenuOption:S}=a;a.breadcrumbOptions.length||u(S.key),f(S.fullPath,S),at(S)}d()}),h=d=>a.collapsed=d,g=(d,V=1)=>a.menuTagOptions.splice(d,V),b=async()=>{s.value&&(await p(),s.value=!1)};return Vue.watch(()=>o.fullPath,async(d,V)=>{await b(),d!==V&&await m(d,o.query)},{immediate:!0}),{...Vue.toRefs(a),changeMenuModelValue:y,collapsedMenu:h,spliceMenTagOptions:g,setMenuTagOptions:c,resolveOption:i,updateMenuState:l}},{persist:{key:E.appPiniaMenuStore,storage:window.localStorage,paths:["breadcrumbOptions","menuKey","menuTagOptions","collapsed"]}}),$o=Pinia.defineStore("signing",()=>{const e=Vue.reactive({signingCallback:{}}),t=n=>new Promise((r,a)=>{pt(n)?a({code:1,message:"登陆失败",data:null}):(e.signingCallback={role:"admin",name:n.name,avatar:"https://avatars.githubusercontent.com/u/51957438?v=4"},r({code:0,message:"登陆成功",data:e.signingCallback}))}),o=()=>{const{closeAll:n}=qo(),{appPiniaMenuStore:r,appPiniaSigningStore:a}=E;window.$message.info("账号退出中..."),Oe("__all_sessionStorage__","sessionStorage"),Oe(r,"localStorage"),Oe(a,"localStorage"),n(),setTimeout(()=>window.location.reload())};return{...Vue.toRefs(e),signing:t,logout:o}},{persist:{key:E.appPiniaSigningStore,paths:["signingCallback"],storage:window.localStorage}}),Fo=Pinia.defineStore("keepAlive",()=>{const{maxKeepAliveLength:e}=Vt,t=Vue.reactive({keepAliveInclude:[]}),o=()=>t.keepAliveInclude.length,n=a=>{const s=o(),{name:l,meta:{keepAlive:i}}=a;if(i){if(s<e&&!t.keepAliveInclude.includes(l)){t.keepAliveInclude.push(l);return}s>=e&&(t.keepAliveInclude.splice(0,1),t.keepAliveInclude.push(l))}},r=()=>t.keepAliveInclude;return{...Vue.toRefs(t),setKeepAliveInclude:n,getKeepAliveInclude:r}},{persist:{key:E.appPiniaKeepAliveStore,storage:window.sessionStorage,paths:["keepAliveInclude"]}}),Y=()=>{const e=Do(),t=Vue.computed(()=>e.options),o=Vue.computed(()=>e.breadcrumbOptions),n=Vue.computed(()=>e.menuKey),r=Vue.computed(()=>{const{getRootPath:l}=te();return e.menuTagOptions.map((i,u,c)=>(i.key===n.value&&i.key!==l.value?i.closeable=!0:i.closeable=!1,i.key===l.value&&(i.closeable=!1),c.length<=1&&(i.closeable=!1),i))}),a=Vue.computed(()=>e.currentMenuOption),s=Vue.computed(()=>e.collapsed);return{getMenuOptions:t,getBreadcrumbOptions:o,getMenuKey:n,getMenuTagOptions:r,getCurrentMenuOption:a,getCollapsed:s}},ie=()=>{const{changeMenuModelValue:e,collapsedMenu:t,spliceMenTagOptions:o,setMenuTagOptions:n,resolveOption:r,updateMenuState:a}=Do();return{changeMenuModelValue:e,collapsedMenu:t,spliceMenTagOptions:o,setMenuTagOptions:n,resolveOption:r,updateMenuState:a}},j=()=>{const e=Tt(),t=Vue.computed(()=>e.drawerPlacement),o=Vue.computed(()=>e.primaryColorOverride),n=Vue.computed(()=>e.appTheme),r=Vue.computed(()=>e.menuTagSwitch),a=Vue.computed(()=>e.breadcrumbSwitch),s=Vue.computed(()=>e.localeLanguage),l=Vue.computed(()=>e.lockScreenSwitch),i=Vue.computed(()=>e.copyrightSwitch),u=Vue.computed(()=>e.contentTransition),c=Vue.computed(()=>e.watermarkSwitch),f=Vue.computed(()=>e.watermarkConfig),y=Vue.computed(()=>e.appRootRoute),m=Vue.computed(()=>e.sideBarLogo);return{getDrawerPlacement:t,getPrimaryColorOverride:o,getAppTheme:n,getMenuTagSwitch:r,getBreadcrumbSwitch:a,getLocaleLanguage:s,getLockScreenSwitch:l,getCopyrightSwitch:i,getContentTransition:u,getWatermarkSwitch:c,getWatermarkConfig:f,getAppRootRoute:y,getSideBarLogo:m}},I=()=>{const{updateLocale:e,changePrimaryColor:t,updateSettingState:o}=Tt();return{updateLocale:e,changePrimaryColor:t,updateSettingState:o}},Mr=()=>{const e=$o();return{getSigningCallback:Vue.computed(()=>e.signingCallback)}},Lr=()=>{const{signing:e,logout:t}=$o();return{signing:e,logout:t}},Er=()=>{const e=Fo();return{getKeepAliveInclude:Vue.computed(()=>e.keepAliveInclude)}},zr=()=>{const{setKeepAliveInclude:e,getKeepAliveInclude:t}=Fo();return{setKeepAliveInclude:e,getKeepAliveInclude:t}},ms=e=>{const t=Pinia.createPinia();e.use(t),t.use(mn)},Bo=e=>{const{getSigningCallback:t}=Mr(),{role:o}=e;return pe!=null&&pe.length&&pe.includes(t.value.role)||!o||!(o!=null&&o.length)?!0:o?o.includes(t.value.role):!0},Ir=e=>{const{setupRouterLoadingBar:t,setupRouterGuard:o}=Un;t&&Ua(e),o&&Wa(e)},jr=Vue.ref(),Dr=Vue.defineComponent({name:"SiderBarLogo",props:{collapsed:{type:Boolean,required:!0}},setup(){const e=VueRouter.useRouter(),{getSideBarLogo:t}=j();return{sideBarLogo:t,sideBarLogoClick:()=>{t.value&&t.value.url&&(t.value.jumpType==="station"?e.push(t.value.url):window.open(t.value.url))},TemplateLogo:({cursor:r})=>{if(!t.value)return null;if(typeof t.value.icon=="string")return Vue.createVNode(N,{name:t.value.icon,size:"30",cursor:r},null);if(q(t.value.icon,"Object"))return Q(t.value.icon)}}},render(){const{sideBarLogo:e,collapsed:t,TemplateLogo:o,sideBarLogoClick:n}=this;return e!=null&&e.title?Vue.createVNode("div",{class:["ray-menu__logo",e!=null&&e.url?"ray-menu__logo-url":null],onClick:n.bind(this),ref:jr},[e!=null&&e.icon?t?Vue.createVNode(naive.NTooltip,{placement:"right"},{trigger:()=>o({cursor:"pointer"}),default:()=>e.title}):o({cursor:"pointer"}):t?Vue.createVNode(naive.NTooltip,{placement:"right"},{trigger:()=>{var r;return Vue.createVNode("h1",{class:"n-menu-item-content"},[((r=e.title)==null?void 0:r[0])||null])},default:()=>e.title}):null,Vue.createVNode("h1",{class:[t?null:"ray-menu__logo-title--open","ray-menu__logo-title",'class="n-menu-item-content"']},[Vue.createVNode(naive.NEllipsis,null,{default:()=>[e.title]})])]):null}}),$r=Vue.defineComponent({name:"AppMenu",setup(){const e=Vue.ref(null),{changeMenuModelValue:t,collapsedMenu:o,updateMenuState:n}=ie(),{getMenuOptions:r,getCollapsed:a,getMenuKey:s}=Y(),l=Vue.computed({get:()=>(Vue.nextTick().then(()=>{c()}),s.value),set:()=>{i.value&&U("globalDrawerValue",!1)}}),{isTabletOrSmaller:i}=we({observer:y=>{y&&n("collapsed",!1)}}),u=Vue.computed({get:()=>_e("globalDrawerValue").value,set:y=>{U("globalDrawerValue",y)}}),c=()=>{const y=l.value;y!=null&&Vue.nextTick(()=>{var m,p;return(p=(m=e.value)==null?void 0:m.showOption)==null?void 0:p.call(m,y)})};return{isTabletOrSmaller:i,BasicMenu:()=>Vue.createVNode(naive.NLayoutSider,{class:"app-menu__sider",showTrigger:!i.value,collapseMode:H.menuCollapsedMode,collapsedWidth:H.menuCollapsedWidth,onUpdateCollapsed:o.bind(this),nativeScrollbar:!1,ref:_t,collapsed:a.value,onExpand:()=>{n("collapsed",!1)},onCollapse:()=>{n("collapsed",!0)}},{default:()=>[Vue.createVNode(Dr,{collapsed:a.value},null),Vue.createVNode(naive.NMenu,{ref:e,class:"r-menu--app",keyField:"fullPath",value:l.value,"onUpdate:value":y=>l.value=y,options:r.value,indent:H.menuCollapsedIndent,collapsed:a.value,collapsedIconSize:H.menuCollapsedIconSize,collapsedWidth:H.menuCollapsedWidth,onUpdateValue:(y,m)=>{t(y,m)},accordion:H.menuAccordion},null)]}),modelGlobalDrawerValue:u}},render(){const{isTabletOrSmaller:e,BasicMenu:t}=this;return e?Vue.createVNode(naive.NDrawer,{class:"app-menu__drawer",show:this.modelGlobalDrawerValue,"onUpdate:show":o=>this.modelGlobalDrawerValue=o,placement:"left",displayDirective:"show",autoFocus:!1},{default:()=>[Vue.createVNode(t,null,null)]}):Vue.createVNode(t,null,null)}});class Fr{constructor(){Xe(this,"pendingRequest");this.pendingRequest=new Map}isAppending(t){var o;return((o=t.cancelConfig)==null?void 0:o.cancel)??!0}generateRequestKey(t){const{method:o,url:n}=t;return[n||"",o||"",JSON.stringify(t.params),JSON.stringify(t.data)].join("&")}addPendingRequest(t){var o;if(this.isAppending(t)){t.__CANCELER_TAG_RAY_TEMPLATE__="__CANCELER_TAG_RAY_TEMPLATE__";const n=this.generateRequestKey(t);if(this.pendingRequest.has(n))t.signal=(o=this.pendingRequest.get(n))==null?void 0:o.signal;else{const r=new AbortController;t.signal=r.signal,this.pendingRequest.set(n,r)}}}removePendingRequest(t){const o=this.generateRequestKey(t);this.pendingRequest.has(o)&&(this.pendingRequest.get(o).abort(),this.pendingRequest.delete(o))}cancelAllRequest(){this.pendingRequest.forEach(t=>{t.abort()})}}const Re={requestInstance:null,responseInstance:null},Ae={implementRequestInterceptorArray:[],implementResponseInterceptorArray:[]},fe={implementRequestInterceptorErrorArray:[],implementResponseInterceptorErrorArray:[]},Br=new Fr,fs=()=>{const e=(l,i)=>{i==="requestInstance"?Re.requestInstance=l:Re.responseInstance=l},t=l=>Re[l],o=(l,i,u)=>{u==="ok"?Ae[l]=i:fe[l]=i},n=(l,i)=>i==="ok"?Ae[l]:fe[l],r=(l,...i)=>{Array.isArray(l)&&l.forEach(u=>{typeof u=="function"&&u(...i)})};return{createAxiosInstance:e,setImplement:o,getImplement:n,getAxiosInstance:t,beforeFetch:(l,i,u)=>{const c=u==="ok"?Ae[i]:fe[i],f=t(l),{MODE:y}=je();f&&r(c,f,y)},fetchError:(l,i,u)=>{const c=fe[u],{MODE:f}=je();r(c,i,f)}}},Wr=Vue.defineComponent({name:"AppRequestCancelerProvider",setup(e,{expose:t}){VueRouter.onBeforeRouteUpdate(()=>{Br.cancelAllRequest()}),t()},render(){return Vue.createVNode("div",{class:"app-style-provider"},null)}}),Wo=Vue.defineComponent({name:"LayoutContentWrapper",setup(){VueRouter.useRouter();const{maximize:e}=Ko(),{getContentTransition:t}=j(),o=Vue.ref(!1),n={opacitySpinning:"0"},{globalMainLayoutLoad:r,layoutContentMaximize:a,layoutContentSpinning:s}=Gn();return{globalMainLayoutLoad:r,spinning:o,themeOverridesSpin:n,getContentTransition:t,layoutContentMaximize:a,maximize:e,layoutContentSpinning:s}},render(){const{globalMainLayoutLoad:e,layoutContentMaximize:t,layoutContentSpinning:o,maximize:n,spinning:r,themeOverridesSpin:a,getContentTransition:s}=this;return Vue.createVNode(naive.NSpin,{show:r||!e||o,description:"loading...",size:"large",themeOverrides:a,class:[t?"r-layout-full__viewer-content--maximize":null,"r-layout-full__viewer-content--maximize--light","r-layout-full__viewer-content--maximize--dark"]},{default:()=>[t?Vue.createVNode("div",{class:"layout-content__maximize-out",onClick:()=>{n(!1)}},[Vue.createVNode(N,{name:"out",size:"16",cursor:"pointer"},null)]):null,Vue.createVNode(Wr,null,null),e?Vue.createVNode(Vr,{class:"content-wrapper",transitionPropName:s+"-transform"},null):null]})}}),Kr=Object.freeze(Object.defineProperty({__proto__:null,default:Wo},Symbol.toStringTag,{value:"Module"}));var Ur={pkg:{dependencies:{"@vueuse/core":"^10.9.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10","dom-to-image":"2.6.0",echarts:"^5.5.0",interactjs:"1.10.26",jsbarcode:"3.11.6","lodash-es":"^4.17.21",mockjs:"1.1.0","naive-ui":"^2.39.0",pinia:"^2.1.7","pinia-plugin-persistedstate":"^3.2.0","print-js":"^1.6.0",vue:"^3.4.38","vue-demi":"0.14.6","vue-hooks-plus":"2.2.1","vue-i18n":"^9.13.1","vue-router":"^4.3.2","vue3-next-qrcode":"2.0.10"},devDependencies:{"@commitlint/cli":"^17.7.1","@commitlint/config-conventional":"^17.7.0","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.1.1","@types/dom-to-image":"2.6.7","@types/jsbarcode":"3.11.4","@types/lodash-es":"^4.17.12","@types/mockjs":"1.0.7","@typescript-eslint/eslint-plugin":"^6.5.0","@typescript-eslint/parser":"^6.5.0","@vitejs/plugin-vue":"^5.1.0","@vitejs/plugin-vue-jsx":"^4.0.0","@vitest/ui":"1.4.0","@vue/eslint-config-prettier":"^9.0.0","@vue/eslint-config-typescript":"^12.0.0","@vue/test-utils":"2.4.3",autoprefixer:"^10.4.15",depcheck:"^1.4.5",eslint:"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-config-standard-with-typescript":"^43.0.0","eslint-plugin-prettier":"^5.1.3","eslint-plugin-promise":"^6.1.1","eslint-plugin-vue":"^9.25.0","happy-dom":"14.3.1",husky:"8.0.3","lint-staged":"^15.1.0",postcss:"^8.4.31","postcss-px-to-viewport-8-with-include":"1.2.2",prettier:"^3.2.5",sass:"1.71.1","svg-sprite-loader":"^6.0.11",typescript:"^5.2.2","unplugin-auto-import":"^0.17.5","unplugin-vue-components":"^0.26.0",vite:"^5.4.1","vite-bundle-analyzer":"0.9.4","vite-plugin-cdn2":"1.1.0","vite-plugin-compression":"^0.5.1","vite-plugin-ejs":"^1.7.0","vite-plugin-eslint":"1.8.1","vite-plugin-inspect":"^0.8.3","vite-plugin-mock-dev-server":"1.4.7","vite-plugin-svg-icons":"^2.0.1","vite-svg-loader":"^4.0.0","vite-tsconfig-paths":"4.3.2",vitest:"1.5.2","vue-tsc":"^2.0.11"},name:"ray-template",version:"4.9.4"},layout:{copyright:"Copyright © 2022-present Ray",sideBarLogo:{icon:"ray",title:"Ray Template",url:"/dashboard",jumpType:"station"}},appPrimaryColor:{primaryColor:"#2d8cf0",primaryFadeColor:"rgba(45, 140, 240, 0.3)"}};const qr=Vue.defineComponent({name:"LayoutFooterWrapper",setup(){const{layout:{copyright:e}}=Ur;return{copyright:e}},render(){return this.copyright?Vue.createVNode("div",{class:"layout-footer-wrapper"},[this.copyright]):""}}),Gr=Vue.defineComponent({name:"TooltipIcon",props:{...naive.tooltipProps,iconName:{type:String,required:!0},customClassName:{type:String,default:null},tooltipText:{type:String,default:null}},emits:["click"],setup(e,{emit:t}){const o=r=>{t("click",r)};return{iconClick:o,Icon:()=>Vue.createVNode(N,{name:e.iconName,size:"18",customClassName:`tooltip-text__icon ${e.customClassName}`,cursor:"pointer",onClick:o.bind(this)},null)}},render(){const{Icon:e}=this;return this.tooltipText?Vue.createVNode(naive.NTooltip,this.$props,{trigger:()=>Vue.createVNode(e,null,null),default:()=>this.tooltipText}):Vue.createVNode(e,null,null)}}),Hr=Vue.defineComponent({name:"ThemeSwitch",setup(){const{darkTheme:e,lightTheme:t}=Uo(),{getAppTheme:o}=j(),n=Vue.ref(o.value);return{darkTheme:e,lightTheme:t,getAppTheme:o,railStyle:({checked:a})=>a?{backgroundColor:"#000000"}:{color:"#000000"},modelAppThemeRef:n}},render(){const{$t:e,darkTheme:t,lightTheme:o,railStyle:n}=this;return Vue.createVNode(naive.NFlex,{justify:"center"},{default:()=>[Vue.createVNode(naive.NTooltip,null,{trigger:()=>Vue.createVNode(naive.NSwitch,{value:this.modelAppThemeRef,"onUpdate:value":r=>this.modelAppThemeRef=r,railStyle:n.bind(this),onUpdateValue:r=>r?t():o()},{"checked-icon":()=>Vue.createVNode(N,{name:"dark"},null),"unchecked-icon":()=>Vue.createVNode(N,{name:"light"},null),checked:()=>"亮",unchecked:()=>"暗"}),default:()=>this.getAppTheme?e("headerSettingOptions.ThemeOptions.Dark"):e("headerSettingOptions.ThemeOptions.Light")})]})}});function he(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Yr=Vue.defineComponent({name:"SettingDrawer",props:{show:{type:Boolean,default:!1},placement:{type:String,default:"right"},width:{type:Number,default:280}},emits:["update:show"],setup(e,{emit:t}){const{changePrimaryColor:o,updateSettingState:n}=I(),{getAppTheme:r,getPrimaryColorOverride:a,getMenuTagSwitch:s,getBreadcrumbSwitch:l,getCopyrightSwitch:i,getContentTransition:u,getWatermarkSwitch:c}=j(),f=Vue.computed({get:()=>e.show,set:m=>{t("update:show",m)}}),y=Vue.computed({get:()=>({getMenuTagSwitch:s.value,getBreadcrumbSwitch:l.value,getCopyrightSwitch:i.value,getContentTransition:u.value,getWatermarkSwitch:c.value}),set:m=>{}});return{modelShow:f,changePrimaryColor:o,getAppTheme:r,getPrimaryColorOverride:a,updateSettingState:n,modelSwitchReactive:y}},render(){let e,t,o,n;const{$t:r,changePrimaryColor:a,updateSettingState:s}=this;return Vue.createVNode(naive.NDrawer,{show:this.modelShow,"onUpdate:show":l=>this.modelShow=l,placement:this.placement,width:this.width},{default:()=>[Vue.createVNode(naive.NDrawerContent,{title:r("headerSettingOptions.Title")},{default:()=>[Vue.createVNode(naive.NFlex,{class:"setting-drawer__space",vertical:!0},{default:()=>[Vue.createVNode(naive.NDivider,{titlePlacement:"center"},he(e=r("headerSettingOptions.ThemeOptions.Title"))?e:{default:()=>[e]}),Vue.createVNode(Hr,null,null),Vue.createVNode(naive.NDivider,{titlePlacement:"center"},he(t=r("headerSettingOptions.ThemeOptions.PrimaryColorConfig"))?t:{default:()=>[t]}),Vue.createVNode(naive.NColorPicker,{swatches:$.appThemeColors,value:this.getPrimaryColorOverride.common.primaryColor,"onUpdate:value":l=>this.getPrimaryColorOverride.common.primaryColor=l,onUpdateValue:a.bind(this)},null),Vue.createVNode(naive.NDivider,{titlePlacement:"center"},he(o=r("headerSettingOptions.ContentTransition"))?o:{default:()=>[o]}),Vue.createVNode(naive.NSelect,{value:this.modelSwitchReactive.getContentTransition,"onUpdate:value":l=>this.modelSwitchReactive.getContentTransition=l,options:$n,onUpdateValue:l=>{s("contentTransition",l)}},null),Vue.createVNode(naive.NDivider,{titlePlacement:"center"},he(n=r("headerSettingOptions.InterfaceDisplay"))?n:{default:()=>[n]}),Vue.createVNode(naive.NDescriptions,{labelPlacement:"left",column:1},{default:()=>[Vue.createVNode(naive.NDescriptionsItem,{label:"多标签"},{default:()=>[Vue.createVNode(naive.NSwitch,{value:this.modelSwitchReactive.getMenuTagSwitch,"onUpdate:value":l=>this.modelSwitchReactive.getMenuTagSwitch=l,onUpdateValue:l=>s("menuTagSwitch",l)},null)]}),Vue.createVNode(naive.NDescriptionsItem,{label:"面包屑"},{default:()=>[Vue.createVNode(naive.NSwitch,{value:this.modelSwitchReactive.getBreadcrumbSwitch,"onUpdate:value":l=>this.modelSwitchReactive.getBreadcrumbSwitch=l,onUpdateValue:l=>s("breadcrumbSwitch",l)},null)]}),Vue.createVNode(naive.NDescriptionsItem,{label:"水印"},{default:()=>[Vue.createVNode(naive.NSwitch,{value:this.modelSwitchReactive.getWatermarkSwitch,"onUpdate:value":l=>this.modelSwitchReactive.getWatermarkSwitch=l,onUpdateValue:l=>s("watermarkSwitch",l)},null)]}),Vue.createVNode(naive.NDescriptionsItem,{label:"版权信息"},{default:()=>[Vue.createVNode(naive.NSwitch,{value:this.modelSwitchReactive.getCopyrightSwitch,"onUpdate:value":l=>this.modelSwitchReactive.getCopyrightSwitch=l,onUpdateValue:l=>s("copyrightSwitch",l)},null)]})]})]})]})]})}});function Xr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Zr=Vue.defineComponent({name:"SiderBarBreadcrumb",setup(){const{changeMenuModelValue:e}=ie(),{getBreadcrumbOptions:t}=Y(),{isTabletOrSmaller:o}=we();return{getBreadcrumbOptions:t,dropdownSelect:(a,s)=>{e(a,s)},breadcrumbItemClick:a=>{var s;if(!((s=a.children)!=null&&s.length)){const{meta:l={}}=a;l.sameLevel||e(a.fullPath,a)}},isTabletOrSmaller:o}},render(){let e;const{isTabletOrSmaller:t,getBreadcrumbOptions:o}=this,{dropdownSelect:n,breadcrumbItemClick:r}=this;return t?Vue.createVNode("div",{style:"display: none;"},null):Vue.createVNode(naive.NBreadcrumb,null,{default:()=>[Vue.createVNode(Vue.TransitionGroup,{tag:"li",name:"breadcrumb",appear:!0},Xr(e=o.map(a=>Vue.createVNode(naive.NBreadcrumbItem,{key:a.fullPath,onClick:r.bind(this,a)},{default:()=>{var s;return[Vue.createVNode(naive.NDropdown,{labelField:"breadcrumbLabel",keyField:"fullPath",options:a.children&&((s=a.children)==null?void 0:s.length)>1?a.children:[],onSelect:n.bind(this)},{default:()=>Vue.createVNode("span",null,[a.label&&typeof a.label=="function"?a.label():a.breadcrumbLabel])})]}})))?e:{default:()=>[e]})]})}});function Pe(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Jr=Vue.defineComponent({name:"GlobalSearch",props:{show:{type:Boolean,default:!1}},emits:["update:show"],setup(e,{emit:t}){const{changeMenuModelValue:o,resolveOption:n}=ie(),{getRoutes:r}=VueRouter.useRouter(),a=Vue.computed({get:()=>e.show,set:v=>{t("update:show",v),v||m()}}),s=Vue.reactive({searchValue:null,searchOptions:[]}),l=[{icon:["↑","↓"],label:"切换",plain:!0},{icon:["↵"],label:"选择",plain:!0},{icon:["esc"],label:"关闭",plain:!0}];let i=0,u=i;const{isTabletOrSmaller:c}=we(),f=Vue.ref(!1),y="content-item--active",m=()=>{s.searchOptions=[],s.searchValue=null,i=0,u=i},p=v=>{a.value||(v.ctrlKey||v.metaKey)&&v.key==="k"&&(v.preventDefault(),v.stopPropagation(),m(),a.value=!0)},h=v=>{if(v)f.value=!0;else{f.value=!1,s.searchOptions=[];return}const w=r().reduce((x,C)=>{var B;const M=ne(C,["children","meta","path","name"]),P=n({...M,fullPath:C.path}),{breadcrumbLabel:D}=P;return(B=D==null?void 0:D.toLocaleLowerCase())!=null&&B.includes(v.toLocaleLowerCase())&&Ct(P)&&x.push(P),x},[]);setTimeout(()=>{s.searchOptions=w,Vue.nextTick().then(()=>{b()}),f.value=!1},500)},g=v=>{if(v){const{meta:w}=v;w.windowOpen?window.open(w.windowOpen):(a.value=!1,o(v.fullPath,v),setTimeout(sn,300))}},b=()=>{const v=s.searchOptions[i],w=s.searchOptions[u];v&&Vue.nextTick().then(()=>{const x=ve(`attr:data_path="${v.path}"`),C=w?ve(`attr:data_path="${w==null?void 0:w.path}"`):null;if(C!=null&&C.length){const[M]=C;cn(M,y)}if(x!=null&&x.length){const[M]=x;ht(M,y)}})},d=v=>{const{icon:w}=v;return typeof w=="string"?Vue.createVNode(N,{name:w,size:"24"},null):typeof w=="function"?()=>w:Vue.createVNode(N,{name:"search",size:"24"},null)},V=v=>{v==="up"&&(i-=1,i<0&&(i=s.searchOptions.length-1)),v==="down"&&(i+=1,i>=s.searchOptions.length&&(i=0))},S=v=>{const w=v.key;switch((w==="ArrowUp"||w==="ArrowDown"||w==="Enter")&&(v.preventDefault(),v.stopPropagation()),u=i<=0?0:i,w){case"ArrowUp":V("up");break;case"ArrowDown":V("down");break;case"Enter":const x=s.searchOptions[i];x&&g(x);break}b()},O=({menuOption:v})=>Vue.createVNode(naive.NFlex,Vue.mergeProps({align:"center",class:"content-item"},{onClick:g.bind(this,v),data_path:v.path}),{default:()=>[Vue.createVNode("div",{class:"content-item-icon"},[d(v.meta)]),Vue.createVNode("div",{class:"content-item-label"},[v.breadcrumbLabel]),Vue.createVNode(N,{name:"enter",size:"18",customClassName:"content-item-icon__enter"},null)]});return Vue.watchEffect(()=>{c.value&&(a.value=!1)}),ae(window,"keydown",v=>{p(v),S(v)},!0),{...Vue.toRefs(s),modelShow:a,helperTipOptions:l,fuzzySearchMenuOptions:Be(h,300),searchItemClick:g,RenderPreIcon:d,isTabletOrSmaller:c,SearchItem:O,loading:f}},render(){const{isTabletOrSmaller:e,searchOptions:t,loading:o}=this,{SearchItem:n,fuzzySearchMenuOptions:r}=this;return e?Vue.createVNode("div",{style:"display: none;"},null):Vue.createVNode(naive.NModal,{show:this.modelShow,"onUpdate:show":a=>this.modelShow=a,transformOrigin:"center",displayDirective:"if"},{default:()=>[Vue.createVNode("div",{class:"global-search global-search--dark global-search--light"},[Vue.createVNode("div",{class:"global-search__wrapper"},[Vue.createVNode(naive.NCard,{class:"global-search__card",headerStyle:{padding:"12px 12px 0 12px"},contentStyle:{padding:"12px"},segmented:{action:"soft"}},{header:()=>Vue.createVNode(naive.NInput,{size:"large",value:this.searchValue,"onUpdate:value":a=>this.searchValue=a,clearable:!0,onInput:r.bind(this)},{prefix:()=>Vue.createVNode(N,{name:"search",size:"24"},null)}),default:()=>{let a;return Vue.createVNode(naive.NScrollbar,null,{default:()=>[Vue.createVNode(naive.NSpin,{show:o},{default:()=>[t.length?Vue.createVNode(naive.NFlex,{vertical:!0,size:[0,6],class:"global-search__card-content"},Pe(a=t.map((s,l)=>Vue.createVNode(n,{menuOption:s,key:s.fullPath},null)))?a:{default:()=>[a]}):Vue.createVNode(naive.NResult,{size:"large",class:"global-search__empty"},{icon:()=>null,default:()=>Vue.createVNode(naive.NFlex,{justify:"center",class:"global-search__empty-content"},{default:()=>[Vue.createVNode(naive.NText,null,{default:()=>[Vue.createTextVNode("没有搜索结果")]})]})})]})]})},action:()=>{let a;return Vue.createVNode(naive.NFlex,{justify:"flex-start",align:"center",size:[16,0]},Pe(a=this.helperTipOptions.map(s=>Vue.createVNode(naive.NFlex,{key:s.label,size:[4,0]},{default:()=>[s.icon.map(l=>Vue.createVNode(naive.NFlex,{class:"item-icon",align:"center",justify:"center"},Pe(l)?l:{default:()=>[l]})),Vue.createVNode(naive.NFlex,{class:"item-label",align:"center"},{default:()=>[s.label]})]})))?a:{default:()=>[a]})}})])])]})}}),Qr=Vue.defineComponent({name:"GlobalSearchButton",props:{onClick:{type:[Function,Array],default:null}},setup(e){return{getShortcutKeyAboutSystem:()=>{const n=un();return n==="MacOS"?"⌘ + K":"CTRL + K"},click:n=>{const{onClick:r}=e;r&&R(r,n)}}},render(){const{getShortcutKeyAboutSystem:e,click:t,$t:o}=this;return Vue.createVNode(naive.NButton,{class:"global-search__btn-wrapper",bordered:!1,onClick:t.bind(this)},{icon:()=>Vue.createVNode(N,{name:"search",size:"16"},null),default:()=>Vue.createVNode(naive.NFlex,{align:"center"},{default:()=>[o("headerTooltip.Search"),Vue.createVNode("div",{class:"global-search-btn__label"},[e()])]})})}}),el=Vue.defineComponent({name:"AppAvatar",props:{...naive.avatarProps,cursor:{type:String,default:"auto"},spaceSize:{type:[String,Number,Array],default:"medium"},avatarSize:{type:[String,Number],default:"medium"},vertical:{type:Boolean,default:!1}},setup(e){return{signing:re(E.signing,"localStorage")}},render(){const{signing:e,avatarSize:t,spaceSize:o,$props:n,vertical:r}=this;return Vue.createVNode(naive.NButton,{quaternary:!0,strong:!0},{default:()=>[Vue.createVNode(naive.NFlex,{align:"center",size:o,vertical:r},{default:()=>[Vue.createVNode(naive.NAvatar,Vue.mergeProps(n,{src:e==null?void 0:e.avatar,objectFit:"cover",round:!0,size:t}),null),e==null?void 0:e.name]})]})}}),tl=()=>[{key:"person",label:"个人信息"},{key:"lockScreen",label:"锁定屏幕"},{type:"divider",key:"d1"},{key:"logout",label:"退出登陆"}],ol={logout:()=>{const{logout:e}=Lr();window.$dialog.warning({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"不确定",onPositiveClick:()=>{e()}})},lockScreen:()=>{const{updateSettingState:e}=I();e("lockScreenSwitch",!0)}},nl=e=>{const t=ol[e];t?t():window.$message.info("这个人很懒, 没做这个功能~")},al=e=>{const{isTabletOrSmaller:t}=e,o=[],n=[{name:"menu",size:18,eventKey:"menu"}];return t.value?n:o},rl=e=>{const{isTabletOrSmaller:t}=e,o=[{name:"fullscreen",size:18,eventKey:"screen"},{name:"github",size:18,eventKey:"github"},{name:"setting",size:18,eventKey:"setting"}],n=[...o],r=[...o];return t.value?r:n},ll=Vue.defineComponent({name:"AppSiderBar",setup(){const{updateLocale:e,updateSettingState:t}=I(),{t:o}=le(),[n,{toggleFullscreen:r,isEnabled:a}]=ft(document.getElementsByTagName("html")[0]),{getDrawerPlacement:s,getBreadcrumbSwitch:l}=j(),i=Vue.ref(!1),u=Vue.ref(!1),{isTabletOrSmaller:c}=we(),f=_e("globalDrawerValue"),y=Vue.computed(()=>al({isFullscreen:n,isTabletOrSmaller:c})),m=Vue.computed(()=>rl({isFullscreen:n,isTabletOrSmaller:c})),p={search:()=>{u.value=!0},setting:()=>{i.value=!0},github:()=>{window.open("https://github.com/XiaoDaiGua-Ray/ray-template")},fullscreen:()=>{a||window.$message.warning(o("globalMessage.isEnabledFullscreen")),r()},lock:()=>{t("lockScreenSwitch",!0)},menu:()=>{U("globalDrawerValue",!f.value)}};return{leftIconOptions:y,rightTooltipIconOptions:m,toolIconClick:b=>{var d;(d=p[b])==null||d.call(p)},showSettings:i,updateLocale:e,getDrawerPlacement:s,getBreadcrumbSwitch:l,globalSearchShown:u,isRenderVNode:b=>c.value?null:b}},render(){const{rightTooltipIconOptions:e,leftIconOptions:t,getDrawerPlacement:o,getBreadcrumbSwitch:n}=this,{toolIconClick:r,updateLocale:a,isRenderVNode:s}=this;return Vue.createVNode(naive.NLayoutHeader,{class:"layout-header"},{default:()=>[Vue.createVNode(Jr,{show:this.globalSearchShown,"onUpdate:show":l=>this.globalSearchShown=l},null),Vue.createVNode(naive.NFlex,{class:"layout-header__method",align:"center",justify:"space-between",wrap:!1},{default:()=>[Vue.createVNode(naive.NFlex,{align:"center",wrap:!1},{default:()=>[t.map(l=>Vue.createVNode(Gr,{key:l.name,iconName:l.name,tooltipText:Vue.isRef(l.tooltip)?l.tooltip.value:l.tooltip,customClassName:l.iconClass,onClick:r.bind(this,l.name)},null)),n?Vue.createVNode(Zr,null,null):null]}),Vue.createVNode(naive.NFlex,{justify:"end",align:"center",size:[4,0],wrap:!1},{default:()=>[s(Vue.createVNode(Qr,{onClick:l=>{l.stopPropagation(),this.globalSearchShown=!0}},null)),e.map(l=>Vue.createVNode(naive.NButton,{class:"override-button__layout",quaternary:!0,size:"medium",key:l.name,onClick:r.bind(this,l.name)},{default:()=>[Vue.createVNode(N,{name:l.name,size:18,cursor:"pointer"},null)]})),Vue.createVNode(naive.NDropdown,{options:St,onSelect:l=>a(String(l)),trigger:"click"},{default:()=>[Vue.createVNode(naive.NButton,{quaternary:!0,class:"override-button__layout"},{default:()=>[Vue.createVNode(N,{customClassName:"layout-header__method--icon",name:"language",size:"18",cursor:"pointer"},null)]})]}),Vue.createVNode(naive.NDropdown,{options:tl(),onSelect:nl.bind(this),trigger:"click"},{default:()=>[Vue.createVNode(el,{avatarSize:24,spaceSize:[8,0],class:"override-button__layout"},null)]})]})]}),Vue.createVNode(Yr,{show:this.showSettings,"onUpdate:show":l=>this.showSettings=l,placement:o},null)]})}}),sl=Vue.defineComponent({name:"LayoutHeaderWrapper",setup(){return{}},render(){return Vue.createVNode(naive.NFlex,{size:[0,0]},{default:()=>[Vue.createVNode(ll,null,null)]})}}),il={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-hidden":"true",viewBox:"0 0 24 24"},cl=vt('<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="20" stroke-dashoffset="20" d="M21 3v18"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="20;0"></animate></path><path stroke-dasharray="15" stroke-dashoffset="15" d="M3 12h13.5"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.4s" dur="0.2s" values="15;0"></animate></path><path stroke-dasharray="12" stroke-dashoffset="12" d="m17 12-7 7m7-7-7-7"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.6s" dur="0.2s" values="12;0"></animate></path></g>',1),ul=[cl];function dl(e,t){return bt(),yt("svg",il,[...ul])}const pl={render:dl},ml={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-hidden":"true",viewBox:"0 0 24 24"},fl=vt('<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"><path stroke-dasharray="20" stroke-dashoffset="20" d="M3 3v18"><animate fill="freeze" attributeName="stroke-dashoffset" dur="0.3s" values="20;0"></animate></path><path stroke-dasharray="15" stroke-dashoffset="15" d="M21 12H7.5"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.4s" dur="0.2s" values="15;0"></animate></path><path stroke-dasharray="12" stroke-dashoffset="12" d="m7 12 7 7m-7-7 7-7"><animate fill="freeze" attributeName="stroke-dashoffset" begin="0.6s" dur="0.2s" values="12;0"></animate></path></g>',1),hl=[fl];function gl(e,t){return bt(),yt("svg",ml,[...hl])}const yl={render:gl};function bl(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const vl=Vue.defineComponent({name:"AppMenuTag",setup(e,{expose:t}){const o=Vue.ref(null),{getMenuKey:n,getMenuTagOptions:r}=Y(),{changeMenuModelValue:a}=ie(),{getRootPath:s}=te(),{maximize:l}=Ko(),{reload:i}=kl(),{close:u,closeAll:c,closeRight:f,closeLeft:y,closeOther:m,checkCloseLeft:p,checkCloseRight:h}=qo(),g=["closeAll","closeRight","closeLeft","closeOther","closeCurrentPage"];let b=1/0;const d={size:16},V=Vue.ref([{label:"刷新页面",key:"reloadCurrentPage",icon:()=>Vue.createVNode(N,{name:"reload",size:d.size},null)},{label:"关闭当前页面",key:"closeCurrentPage",icon:()=>Vue.createVNode(N,{name:"close",size:d.size},null)},{type:"divider",key:"d1"},{label:"关闭左侧标签页",key:"closeLeft",icon:()=>Vue.createVNode(yl,{class:"menu-tag__icon"},null)},{label:"关闭右侧标签页",key:"closeRight",icon:()=>Vue.createVNode(pl,{class:"menu-tag__icon"},null)},{type:"divider",key:"d1"},{label:"关闭其他标签页",key:"closeOther",icon:()=>Vue.createVNode(N,{name:"other",size:d.size},null)},{label:"关闭所有标签页",key:"closeAll",icon:()=>Vue.createVNode(N,{name:"resize_h",size:d.size},null),disabled:!1}]),S=be(16),O={closeCurrentPage:()=>{n.value!==s.value&&u(b)},reloadCurrentPage:()=>{i()},closeAll:()=>{c()},closeRight:()=>{f(b)},closeLeft:()=>{y(b)},closeOther:()=>{m(b)}},v=Vue.reactive({x:0,y:0,actionDropdownShow:!1}),w="menu_tag_data",x=_e("globalMainLayoutLoad"),C="n-scrollbar-container",M=_=>{u(_)},P=(_,T)=>{V.value.forEach(z=>{if(z.key===_){z.disabled=T;return}})},D=_=>{v.actionDropdownShow=!1,a(_.fullPath,_)},B=()=>{const _=document.getElementById(S);if(_)return Array.from(_.childNodes).find(de=>dn(de,C).value)},ce=_=>{var z;const T=B();if(T){const de=T.scrollLeft||0,Ye=_==="left"?Math.max(0,de-200):de+200;(z=o.value)==null||z.scrollTo({left:Ye,behavior:"smooth"})}},ue=_=>{v.actionDropdownShow=!1;const T=O[_];T&&T()},X=(_,T)=>{T.preventDefault(),v.actionDropdownShow=!1,b=_,Vue.nextTick(()=>{v.actionDropdownShow=!0,v.x=T.clientX,v.y=T.clientY})},Ge=()=>{const{closeable:_}=r.value[b]??{};P("closeCurrentPage",!_),h(b)?P("closeRight",!1):P("closeRight",!0),p(b)?P("closeLeft",!1):P("closeLeft",!0)},Ho=()=>{b=r.value.findIndex(T=>T.fullPath===n.value),Ge()},Yo=_=>{r.value.length>1&&_.fullPath!==s.value&&(_.closeable=!0)},Xo=_=>{_.fullPath!==n.value&&(_.closeable=!1)},Zo=()=>{B()&&Vue.nextTick().then(()=>{var T;(T=o.value)==null||T.scrollTo({left:99999,behavior:"smooth"})})},He=()=>{Vue.nextTick().then(()=>{const _=ve(`attr:${w}="${n.value}"`);if(_!=null&&_.length){const[T]=_;Vue.nextTick().then(()=>{var z;(z=o.value)==null||z.scrollTo({left:T.offsetLeft,behavior:"smooth"})})}})};return Vue.watch(()=>r.value,(_,T)=>{V.value.forEach(z=>{g.includes(z.key)&&(_.length>1?z.disabled=!1:z.disabled=!0)}),T!=null&&T.length&&(_.length>(T==null?void 0:T.length)?Zo():_.length===(T==null?void 0:T.length)&&He()),T===void 0&&He()},{immediate:!0}),Vue.watch(()=>v.actionDropdownShow,_=>{var T;_&&((T=Be(Ge,100))==null||T())}),t({}),{getMenuTagOptions:r,closeCurrentMenuTag:M,getMenuKey:n,menuTagClick:D,moreOptions:V,scrollX:ce,scrollRef:o,uuidScrollBar:S,actionDropdownSelect:ue,actionState:v,menuTagContextMenu:X,setCurrentContextmenuIndex:Ho,menuTagMouseenter:Yo,menuTagMouseleave:Xo,MENU_TAG_DATA:w,iconConfig:{width:22,height:22},maximize:l,getRootPath:s,reload:i,globalMainLayoutLoad:x}},render(){let e;const{iconConfig:t,getRootPath:o,uuidScrollBar:n,getMenuTagOptions:r,MENU_TAG_DATA:a,globalMainLayoutLoad:s}=this,{maximize:l,closeCurrentMenuTag:i,scrollX:u,$t:c,menuTagClick:f,menuTagContextMenu:y,menuTagMouseenter:m,menuTagMouseleave:p,actionDropdownSelect:h,reload:g}=this;return Vue.createVNode(naive.NLayoutHeader,null,{default:()=>[Vue.createVNode("div",{class:"menu-tag"},[Vue.createVNode(naive.NDropdown,{class:"menu-tag__dropdown",options:this.moreOptions,x:this.actionState.x,y:this.actionState.y,keyboard:!1,show:this.actionState.actionDropdownShow,trigger:"manual",placement:"bottom-start",onSelect:h.bind(this),onClickoutside:()=>{this.actionState.actionDropdownShow=!1}},null),Vue.createVNode(naive.NFlex,{class:"menu-tag-space",wrap:!1,align:"center",justify:"space-between",inline:!0,size:[16,0]},{default:()=>[Vue.createVNode(N,{name:"expanded",width:t.width,height:t.height,customClassName:"menu-tag__left-arrow",onClick:this.scrollX.bind(this,"left")},null),Vue.createVNode(naive.NScrollbar,Vue.mergeProps({xScrollable:!0,ref:"scrollRef"},{id:n},{themeOverrides:{width:"0px",height:"0px"}}),{default:()=>[Vue.createVNode(naive.NFlex,{ref:"menuTagSpaceRef",class:"menu-tag-wrapper",wrap:!1,align:"center",justify:"start"},bl(e=r.map((b,d)=>Vue.createVNode(naive.NButton,Vue.mergeProps({key:b.fullPath,class:["menu-tag__btn"],strong:!0,secondary:!0,type:b.fullPath===this.getMenuKey?"primary":"default"},{onClick:f.bind(this,b),onContextmenu:y.bind(this,d),onMouseenter:m.bind(this,b),onMouseleave:p.bind(this,b),[a]:b.path},{size:"small"}),{default:()=>Vue.createVNode(Vue.Fragment,null,[Vue.createVNode("span",null,{default:()=>{const{breadcrumbLabel:V,meta:{i18nKey:S}}=b;return S?c(S):V}}),(b.closeable||r.length===1)&&b.fullPath!==o?Vue.createVNode(naive.NIcon,Vue.mergeProps({class:"menu-tag__btn-icon"},{onMousedown:i.bind(this,d)}),{default:()=>[Vue.createVNode(N,{name:"close",size:"14"},null)]}):Vue.createVNode(naive.NIcon,{class:[b.fullPath!==o?"menu-tag__btn-icon":"menu-tag__btn-icon--hidden"]},null)])})))?e:{default:()=>[e]})]}),Vue.createVNode(naive.NFlex,{class:"menu-tag__right-wrapper",align:"center",inline:!0,wrap:!1,size:[8,0]},{default:()=>[Vue.createVNode(N,{name:"expanded",width:t.width,height:t.height,customClassName:"menu-tag__right-arrow",onClick:u.bind(this,"right")},null),Vue.createVNode(N,{name:"fullscreen_fold",width:t.width,height:t.height,customClassName:"menu-tag__right-setting",onClick:()=>{l(!0)}},null),Vue.createVNode(N,{name:"reload",width:t.width,height:t.height,customClassName:`menu-tag__right-setting ${s?"":"menu-tag__right-setting--spinning"}`,onClick:()=>{g()}},null),Vue.createVNode(Mo,{class:"menu-tag__dropdown",options:this.moreOptions,trigger:"click",onSelect:this.actionDropdownSelect.bind(this),iconSize:20,keyboard:!1},{default:()=>[Vue.createVNode(N,{name:"more",width:t.width,height:t.height,customClassName:"menu-tag__right-setting",onClick:this.setCurrentContextmenuIndex.bind(this)},null)]})]})]})])]})}}),Vl=Vue.defineComponent({name:"LayoutFeatureWrapper",setup(){return{}},render(){return Vue.createVNode(vl,null,null)}}),Sl=e=>{const t=Te(e[0]),o=Te(e[1]),n=Te(e[2]);return Vue.computed(()=>({"--layout-content-height":`calc(100% - ${t.height.value}px - ${o.height.value}px - ${n.height.value}px)`,"--layout-siderbar-height":`${t.height.value}px`,"--layout-menutag-height":`${o.height.value}px`,"--layout-footer-height":`${n.height.value}px`}))},lt=nn(E.isAppLockScreen,!1,sessionStorage,{mergeDefaults:!0}),_l=()=>({setLockAppScreen:o=>{lt.value=o},getLockAppScreen:()=>lt.value}),wl=Vue.defineComponent({name:"RLayout",setup(){const e=Vue.ref(),t=Vue.ref(),o=Vue.ref(),{getMenuTagSwitch:n,getCopyrightSwitch:r}=j(),{getLockAppScreen:a}=_l(),s=Sl([e,t,o]);return{getMenuTagSwitch:n,cssVarsRef:s,getLockAppScreen:a,layoutSiderBarRef:e,layoutMenuTagRef:t,layoutFooterRef:o,getCopyrightSwitch:r}},render(){const{getMenuTagSwitch:e,cssVarsRef:t,getCopyrightSwitch:o}=this,{getLockAppScreen:n}=this;return n()?null:Vue.createVNode(naive.NLayout,{class:"r-layout-full",style:[t],hasSider:!0,embedded:!0},{default:()=>[Vue.createVNode($r,null,null),Vue.createVNode(naive.NLayoutContent,{class:"r-layout-full__viewer"},{default:()=>[Vue.createVNode(sl,{ref:"layoutSiderBarRef"},null),e?Vue.createVNode(Vl,{ref:"layoutMenuTagRef"},null):null,Vue.createVNode(naive.NLayoutContent,{ref:J,class:["r-layout-full__viewer-content"],nativeScrollbar:!1},{default:()=>[Vue.createVNode(Wo,null,null)]}),o?Vue.createVNode(qr,{ref:"layoutFooterRef"},null):null]})]})}}),Cl=[{path:"/",name:"RLogin",component:()=>k(()=>import("./index-U-KjHHUk.js"),__vite__mapDeps([53,1,2,3,4,5,6,11,7,8,38,39,40,9,10,22,12,13,14,15,16,17,18,19,54]))},{path:"/",name:"RLayout",component:wl,children:[...Pr(),{path:"/:catchAll(.*)",component:()=>k(()=>import("./index-zGfSlYZ-.js"),__vite__mapDeps([55,1,2,3,4,5,6,11,7,8,9,10,12,13,14,15,16,17,18,19,56])),meta:{i18nKey:A("menu.Error"),icon:"error",hidden:!0,sameLevel:!0}}]}],Se=VueRouter.createRouter({history:VueRouter.createWebHashHistory(),routes:Cl,scrollBehavior:e=>{Ka(e)}}),hs=e=>{e.use(Se),Ir(Se)},qe=()=>Se?{router:Se}:{router:{}},st="YYYY-MM-DD HH:mm:ss",Tl=()=>({locale:s=>{const l=Wn[s];l?dayjs.locale(l):dayjs.locale(Kn)},getStartAndEndOfDay:s=>{const{format:l=st}=s??{},i=dayjs(),u=i.startOf("day"),c=i.endOf("day"),f=i.format(l),y=u.format(l),m=c.format(l);return{today:i,startOfDay:u,endOfDay:c,formatToday:f,formatStartOfDay:y,formatEndOfDay:m}},format:(s,l)=>{const{format:i=st}=l??{};return dayjs(s).format(i)},isDayjs:s=>dayjs.isDayjs(s),daysDiff:(s,l)=>{const i=dayjs(s);return dayjs(l).diff(i,"days")},isDateInRange:(s,l)=>{const{start:i,end:u}=l,c=dayjs(s);return c.isAfter(i)&&c.isBefore(u)}});function we(e){const{width:t,height:o}=mt(e),n=Vue.ref(!1),{observer:r}=e??{};return pn(()=>{const{media:s=768}=e??{};n.value=t.value<=s,r==null||r(n.value,{width:t.value,height:o.value})}),{width:t,height:o,isTabletOrSmaller:Vue.readonly(n)}}let Me=999,Le=!1;const G="ELEMENT-FULLSCREEN-RAY",{width:it,height:ct}=mt(),ut=document.createElement("style"),Nl=(e,t)=>{const{beforeEnter:o,beforeExit:n,enter:r,exit:a,backgroundColor:s,zIndex:l,transition:i="all 0.3s var(--r-bezier)"}=t??{};let u=!1;const c=()=>{const h=K(e);if(!h)return;const{left:g,top:b}=h.getBoundingClientRect(),d=`
[${G}] {
position: fixed;
width: ${it.value}px !important;
height: ${ct.value}px !important;
transform: translate(-${g}px, -${b}px) !important;
transition: ${i};
z-index: ${q(l,"Null")||q(l,"Undefined")?Me:l} !important;
background-color: ${s??null};
}
`;ut.innerHTML=d,Le||document.head.appendChild(ut)},f=()=>{const h=K(e);o==null||o(),h&&(h.getAttribute(G)||h.setAttribute(G,G),u||(u=!0,Me+=1),Le||(c(),Le=!0),h.style.transition=i,r==null||r())},y=()=>{n==null||n();const h=K(e);h&&h.removeAttribute(G),a==null||a()},m=()=>{const h=K(e);h&&(h.getAttribute(G)?y():f())},p=Vue.watch(()=>[it.value,ct.value],c);return Ue(()=>{const h=K(e);h&&h.removeAttribute(G),Me--,p()}),{enter:f,exit:y,toggleFullscreen:m}},Ee={svg:domtoimage.toSvg,png:domtoimage.toPng,jpeg:domtoimage.toJpeg,blob:domtoimage.toBlob,pixelData:domtoimage.toPixelData},gs=(e,t)=>{const{beforeCreate:o,created:n,createdError:r,finally:a,imageType:s}=t??{};return{create:i=>new Promise((u,c)=>{var y;const f=K(e);if(o==null||o(f),!f)return r==null||r(),c("useDomToImage: element is undefined.");(y=Ee[i??s??"jpeg"])==null||y.call(Ee,f,t).then(m=>(n==null||n(m,f),u(m))).catch(m=>(r==null||r(m),c(m))).finally(()=>{a==null||a()})})}},ys=(e,t)=>({print:()=>{const n=K(e)||e;an({...We(t,["printable"]),printable:n})}}),Ol={page:1,pageSize:10,showSizePicker:!0,pageSizes:[10,20,50,100]},bs=(e,t)=>{const o=Vue.ref(e),n=We(t,["on-update:page","on-update:page-size","onUpdatePage","onUpdatePageSize","onUpdate:page","onUpdate:page-size"]),r={onUpdatePage:d=>{var V;a.value.page=d,(V=o.value)==null||V.call(o)},onUpdatePageSize:d=>{var V;a.value.pageSize=d,a.value.page=1,(V=o.value)==null||V.call(o)}},a=Vue.ref(Object.assign({},Ol,n,r)),s=a.value.onUpdatePage,l=a.value.onUpdatePageSize,i=()=>a.value.itemCount,u=d=>{a.value.itemCount=d},c=()=>a.value.page,f=d=>{s(d)},y=()=>a.value.pageSize,m=d=>{l(d)},p=()=>a.value,h=e,g=d=>{o.value=d},b=()=>{const{pageSizes:d}=a.value;a.value.page=1,a.value.pageSize=(d==null?void 0:d[0])||10};return Ue(()=>{o.value=void 0}),[a,{getItemCount:i,setItemCount:u,getPage:c,setPage:f,getPageSize:y,setPageSize:m,getPagination:p,getCallback:h,setCallback:g,resetPagination:b}]},Ko=()=>({isLayoutContentMaximized:Vue.computed(()=>_e("layoutContentMaximize").value),maximize:(o,n)=>{var l;const{scrollToOptions:r}=n??{},a=K(J),{toggleFullscreen:s}=Nl(a,n);U("layoutContentMaximize",o),s(),r&&o&&((l=J==null?void 0:J.value)==null||l.scrollTo(r))}}),kl=()=>({reload:(n=800)=>{U("globalMainLayoutLoad",!1),setTimeout(()=>U("globalMainLayoutLoad",!0),n)},openSpin:()=>{U("layoutContentSpinning",!0)},closeSpin:()=>{U("layoutContentSpinning",!1)}}),vs=()=>({setWatermarkContent:r=>{const{getWatermarkConfig:a}=j(),s=Object.assign(a.value,{content:r}),{updateSettingState:l}=I();l("watermarkConfig",s)},showWatermark:()=>{const{updateSettingState:r}=I();r("watermarkSwitch",!0)},hiddenWatermark:()=>{const{updateSettingState:r}=I();r("watermarkSwitch",!1)},toggleWatermark:()=>{const{getWatermarkSwitch:r}=j(),{updateSettingState:a}=I();a("watermarkSwitch",!r.value)}}),ze=e=>{const{getPrimaryColorOverride:t}=j(),{updateSettingState:o}=I();o("primaryColorOverride",e?Object.assign({},t.value,$.appNaiveUIThemeOverrides.dark,$.appNaiveUIThemeOverridesCommon.dark):Object.assign({},t.value,$.appNaiveUIThemeOverrides.light,$.appNaiveUIThemeOverridesCommon.light))},Uo=()=>{const e=()=>{const{getAppTheme:r}=j(),{t:a}=le();return{theme:r.value,themeI18nLabel:r.value?a("headerSettingOptions.ThemeOptions.Dark"):a("headerSettingOptions.ThemeOptions.Light"),themeLabel:r.value?"Dark":"Light"}};return{darkTheme:()=>{const{updateSettingState:r}=I();r("appTheme",!0),ze(!0)},lightTheme:()=>{const{updateSettingState:r}=I();r("appTheme",!1),ze(!1)},toggleTheme:()=>{const{theme:r}=e(),{updateSettingState:a}=I();a("appTheme",!r),ze(!r)},getAppTheme:e}},Z=(e,t)=>{const{getMenuTagOptions:o}=Y();if(typeof e=="number"){if(isNaN(e)){console.warn(`${t}: The ${e} is NaN, expect number.`);return}if(e>o.value.length||e<-1){console.warn(`${t}: The incoming index ${e} did not match the corresponding item.`);return}return{option:o.value[e],index:e}}else if(typeof e=="string"){const n=o.value.findIndex(r=>r.fullPath===e);return n>-1?{option:o.value[n],index:n}:console.warn(`${t}: The incoming key ${e} did not match the corresponding item.`)}else{const{fullPath:n}=e,r=o.value.findIndex(a=>a.fullPath===n);if(r===-1){console.warn(`${t}: The incoming menuTag option ${e.fullPath} did not match the corresponding item.`);return}return{option:e,index:r}}};function qo(){const{getMenuTagOptions:e,getMenuKey:t}=Y(),{changeMenuModelValue:o,spliceMenTagOptions:n,setMenuTagOptions:r,resolveOption:a}=ie(),s=()=>e.value.findIndex(p=>p.fullPath===t.value);return{close:p=>{const h=Z(p,"close");if(e.value.length!==1&&h){const{index:g,option:b}=h;if(n(g),b.fullPath===t.value){const d=e.value[g-1];d&&o(d.fullPath,d)}}},closeAll:()=>{n(0,e.value.length);const{getRootPath:p}=te(),{router:{getRoutes:h}}=qe(),g=h().find(b=>b.path===p.value);if(g){const b=ne(g,Fe),d=a(b);o(d.path,a({...d,fullPath:d.path}))}},closeRight:p=>{const h=Z(p,"closeRight");if(h){const{option:g,index:b}=h,d=e.value.length-b,V=s();n(b+1,d),b<=V&&t.value!==g.fullPath&&o(g.fullPath,g)}},closeLeft:p=>{const h=Z(p,"closeLeft");if(h){const{option:g,index:b}=h,d=s();n(0,b),d<=b&&t.value!==g.fullPath&&o(g.fullPath,g)}},closeOther:p=>{const h=Z(p,"closeOther");if(h){const{option:g}=h;t.value!==g.fullPath?(n(0,e.value.length),o(g.fullPath,g)):r(g,!1)}},getCurrentTagIndex:s,checkCloseRight:p=>{const h=Z(p,"checkCloseRight");if(h){const{index:g}=h,b=e.value.length-1;return!(g>=b)}return!1},checkCloseLeft:p=>{const h=Z(p,"checkCloseRight");if(h){const{index:g}=h,b=e.value.length-1;return g===0?!1:g>0&&b>0}return!1}}}function Vs(){return{navigationTo:(t,o)=>{const{router:{getRoutes:n,push:r,replace:a}}=qe(),{isPush:s=!0,query:l}=o||{},i=u=>s?r({path:u,query:l}):a({path:u,query:l});if(typeof t=="number"){if(isNaN(t)){console.warn(`[navigationTo]: The ${t} is NaN, expect number.`);return}const{getMenuOptions:u}=Y();if(t>u.value.length){console.warn(`[navigationTo]: The current ${t} exceeds the maximum number of menus.`);return}const c=u.value[t],f=y=>{if(y.children&&y.children.length>0){const{children:[m]}=y;f(m);return}i(y.fullPath)};f(c)}else if(typeof t=="string"){const u=n().find(c=>c.path===t);u?i(u.path):console.warn(`[navigationTo]: The path "${t}" is not found.`)}else i(t.fullPath)}}}function te(){const{getAppRootRoute:e}=j(),{updateSettingState:t}=I(),o=e,n=Vue.computed(()=>e.value.path),r=Vue.computed(()=>e.value.name);return{getRootRoute:o,getRootPath:n,getRootName:r,setRootRoute:s=>{t("appRootRoute",Object.assign({},e.value,s))}}}const xl=(e,t)=>{const{show:o,...n}=t;e.meta.extra=Object.assign({},e.meta.extra,{...n,show:o}),e.extra=zo(e)},dt=(e,t,o)=>{const n=jo(e,t);n&&xl(n,o)},Ie=(e,t,o)=>{const{getMenuOptions:n}=Y();if(typeof e=="string")dt(n.value,e,o);else if(q(e,"Object")){const{fullPath:r}=e;dt(n.value,r,o)}else console.warn(`[useBadge ${t}]: target expect string or object.`)};function Ss(){return{hidden:n=>{Ie(n,"hidden",{show:!1})},show:n=>{Ie(n,"show",{show:!0})},update:(n,r)=>{Ie(n,"update",r)}}}const _s=()=>{const e=_t.value,{scrollTo:t}=e||{};if(!t)throw new Error("[useSiderScroll]: LAYOUT_SIDER_REF is not ready yet. please wait component mounted!");return t},Go=()=>re(E.localeLanguage,"localStorage",{defaultValue:Fn}),ws=()=>{const e=Vue.ref(),t=p=>{p&&(e.value=p)},o=()=>{if(!e.value)throw new Error("[useTablePro]: table instance is not ready yet. if you are using useTablePro, please make sure you have called register method in onRegister event.");return e.value};return[t,{clearFilters:()=>o().clearFilters.call(null),getTableProInstance:o,clearSorter:()=>o().clearSorter.call(null),downloadCsv:p=>o().downloadCsv.call(null,p),filters:p=>o().filters.call(null,p),page:p=>o().page.call(null,p),scrollTo:p=>o().scrollTo(p),sort:(p,h)=>o().sort.call(null,p,h),getTablePagination:()=>o().getTablePagination.call(null),runTableRequest:p=>o().runTableRequest.call(null,p),print:p=>o().print.call(null,p),getCurrentTableRequestParams:p=>o().getCurrentTableRequestParams.call(null,p)}]};export{Zl as $,Yl as A,es as B,ts as C,Kn as D,us as E,cs as F,ns as G,bs as H,os as I,ls as J,rs as K,_t as L,Gl as M,ds as N,or as O,Sr as P,se as Q,as as R,jr as S,Hr as T,ss as U,ws as V,is as W,Tl as X,Br as Y,fs as Z,k as _,ys as a,Mo as a0,Ko as a1,Vs as a2,kl as a3,vs as a4,Uo as a5,Ss as a6,_s as b,Xl as c,j as d,E as e,I as f,ql as g,_l as h,Lr as i,we as j,el as k,_e as l,Hl as m,Ql as n,hs as o,te as p,le as q,N as r,ms as s,St as t,gs as u,ke as v,qe as w,Ul as x,ps as y,Jl as z};