ray-template/js/hooks-DMyQYazF.js

13 lines
103 KiB
JavaScript

const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/en-US-BLZd-cwP.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.5.8-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.5.8-C_86Yqwm.js","js/@vueuse_shared@10.9.0_vue@3.5.8-BTLxKjPf.js","js/utils-CPRm4XW8.js","js/interactjs@1.10.26-DZL_TZzP.js","js/pinia-plugin-persistedstate@4.0.1_pinia@2.1.7-MNUqeAcu.js","js/destr@2.0.3-CVtkxrq9.js","js/deep-pick-omit@1.2.0-DyxInw53.js","js/html-to-image@1.11.11-BOFdlgi9.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.5.8-rrkW69pg.js","js/@vue_reactivity@3.5.8-Bdjt7y-I.js","js/@vue_shared@3.5.8-BZqwzCoV.js","js/zh-CN-CLjKG2OA.js","js/index-qFN7PIK6.js","js/index-43Sr2ZDd.js","css/index-D_4DGt8i.css","js/index-Df55SecY.js","js/instance-DwV9zo1e.js","css/index-QAd2IBUs.css","js/BarcodeDemo-OgEE4GOD.js","js/index-BUWc6-jF.js","js/index-DVPE0l1s.js","js/index-DcxnS7rg.js","css/index-DHYYVpM7.css","js/index-M0CE-Y7m.js","js/index-DgdcKc1-.js","js/index-K7CNfH-G.js","js/index-DO7tpLdv.js","js/index-BWn0fJgT.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-Dhd4FjCe.js","css/index-B6yUFiKH.css","js/index-DQ5wDAPv.js","js/index-E385tkq8.js","css/index-Dig957GB.css","js/index-Cpf3x9Hw.js","js/index-CvM7o9gX.js","css/index-Eq1L-L2-.css","js/TablePro-DFxhssIJ.js","js/mockjs@1.1.0-CxlURkif.js","js/index-DkMTszkF.js","js/index-C-7JwSBQ.js","js/index-Cup_x5h6.js","css/index-74sXJ5VP.css","js/index-yq-aMZnM.js","css/index-b1h4j9PV.css"])))=>i.map(i=>d[i]);
var Ht=Object.defineProperty;var Yt=(e,t,n)=>t in e?Ht(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Xe=(e,t,n)=>Yt(e,typeof t!="symbol"?t+"":t,n);import{s as Te,c as ye,t as Ke,i as pt,p as ae,o as Ue}from"./lodash-es@4.17.21-BALnwRTu.js";import{o as Xt,u as re,a as Jt,b as Zt,c as Ne,d as Qt,e as mt}from"./@vueuse_core@10.9.0_vue@3.5.8-C_86Yqwm.js";import"./currency.js@2.0.4-9OAR_aOO.js";import{p as en}from"./print-js@1.6.0-BdoEj60G.js";import{u as ht}from"./vue-hooks-plus@2.2.1_vue@3.5.8-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 le,i as G,s as We,a as De,c as tn,l as ft,b as gt,d as nn,e as L,r as ee,f as A,h as on,u as Ve,q as be,j as Oe,k as vt,p as yt,m as qe,n as Je,o as Re,t as an,v as rn,w as ln,x as sn,y as un,z as W}from"./utils-CPRm4XW8.js";import{i as Ze}from"./interactjs@1.10.26-DZL_TZzP.js";import{s as cn}from"./pinia-plugin-persistedstate@4.0.1_pinia@2.1.7-MNUqeAcu.js";import{t as dn,a as pn,b as mn,c as hn,d as fn,e as gn}from"./html-to-image@1.11.11-BOFdlgi9.js";import{r as vn,u as oe,i as yn,a as Vn,b as bn,c as _n,d as Sn,e as wn,f as Cn,g as Tn,h as Nn,j as On,k as Rn,l as kn,m as Pn,n as An,o as xn,p as Mn,q as Ln,s as In}from"./echarts@5.5.0-CezqL3m-.js";import{f as En,g as zn}from"./@vueuse_shared@10.9.0_vue@3.5.8-BTLxKjPf.js";import{c as Vt,o as bt,a as _t}from"./@vue_runtime-core@3.5.8-rrkW69pg.js";const Ur=(e,t)=>{if(typeof t!="string"||!t.trim())throw new TypeError("Expected prefix to be a non-empty string");const n={};return Object.keys(e).forEach(o=>{const r=e[o].default;let a=o.replace(`./${t}/`,"").replace(/^\.\//,"");const s=a.lastIndexOf(".");a=a.substring(0,s);const l=a.split("/"),i=l.shift(),u=l.join(".");i&&(u?(Te(n,i,n[i]||{}),Te(n[i],u,r)):Te(n,i,r||{}))}),n},jn="modulepreload",Dn=function(e){return"/ray-template/"+e},Qe={},R=function(t,n,o){let r=Promise.resolve();if(n&&n.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(n.map(l=>{if(l=Dn(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 d=document.createElement("link");if(d.rel=i?"stylesheet":jn,i||(d.as="script"),d.crossOrigin="",d.href=l,s&&d.setAttribute("nonce",s),document.head.appendChild(d),i)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(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})},Fn=(e,t,n)=>{const o=e[t];return o?typeof o=="function"?o():Promise.resolve(o):new Promise((r,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},Bn=async e=>{var n;const t={};for(const o of e){const r=await Fn(Object.assign({"../lang/en-US.ts":()=>R(()=>import("./en-US-BLZd-cwP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),"../lang/zh-CN.ts":()=>R(()=>import("./zh-CN-CLjKG2OA.js"),__vite__mapDeps([23,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]))}),`../lang/${o.key}.ts`,3),a=o.key;a&&(t[a]=((n=r==null?void 0:r.default)==null?void 0:n.message)??{})}return t},Wr=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}}},qr={max:5,closable:!1},Gr="loading",St={setupKeepAlive:!0,keepAliveExclude:[],maxKeepAliveLength:5},$n={icon:"ray",title:"Ray Template",url:"/dashboard",jumpType:"station"},X={menuCollapsedWidth:64,menuCollapsedMode:"width",menuCollapsedIconSize:22,menuCollapsedIndent:24,menuAccordion:!1},Hr="",I={signing:"signing",localeLanguage:"localeLanguage",token:"token",appMenuKey:"menuKey",appPiniaSettingStore:"piniaSettingStore",appPiniaKeepAliveStore:"piniaKeepAliveStore",appPiniaMenuStore:"piniaMenuStore",appPiniaSigningStore:"piniaSigningStore",appVersionProvider:"appVersionProvider",isAppLockScreen:"isAppLockScreen",appGlobalSearchOptions:"appGlobalSearchOptions"},Kn=[{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"},wt=[{key:"zh-CN",label:"中文(简体)"},{key:"en-US",label:"English(US)"}],Un="zh-CN",Wn="zh-CN",qn={"zh-CN":"zh-cn","en-US":"en"},Gn="zh-cn",Yr={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)$/},Xr={baseURL:"",withCredentials:!1,timeout:5*1e3,headers:{"Content-Type":"application/json"}},Q=Vue.ref(null),Ct=Vue.ref(null),Hn={setupRouterLoadingBar:!0,setupRouterGuard:!0},Yn=["RLogin","ErrorPage","RayTemplateDoc"],me=["admin"],Jr=(e,t)=>{const n=Vue.ref(0),o=Vue.ref(0),r=Vue.ref(!1),{clickOutside:a}={},s=h=>{r.value=h},l=h=>{h.preventDefault(),s(!1),Vue.nextTick().then(()=>{const{clientX:f,clientY:m}=h;n.value=f,o.value=m,s(!0)})};a&&Xt(e,h=>{a(h)});const i=re(e,"contextmenu",l,t),u=re(e,"click",()=>{s(!1)});return{stop:()=>{i(),u()},x:Vue.readonly(n),y:Vue.readonly(o),show:Vue.readonly(r),updateShow:s}},_e=Vue.reactive({globalSpinning:!1,globalDrawerValue:!1,globalMainLayoutLoad:!0,layoutContentMaximize:!1,layoutContentSpinning:!1});function q(e,t,n){Object.hasOwn(_e,e)&&(_e[e]=t)}function we(e){return Vue.readonly(Vue.toRef(_e,e))}function Xn(){return{...Vue.toRefs(Vue.readonly(_e))}}let U;const Jn=async()=>{const e=Kt(),t=await Bn(wt);return VueI18n.createI18n({legacy:!1,locale:e,messages:t,sync:!0,missingWarn:!1,silentFallbackWarn:!0,fallbackLocale:Wn})},Zr=async e=>{const t=await Jn();e.use(t),U=t},et=(e,t)=>t,se=e=>{if(!U)return{t:a=>et(e,a),locale:a=>{}};const{t,...n}=U.global;return{...n,t:(a,...s)=>a?!a.includes(".")&&!e?a:t(et(e,a),...s):"",locale:a=>{U.mode==="legacy"?U.global.locale=a:Vue.isRef(U.global.locale)?U.global.locale.value=a:U.global.locale=a}}},M=e=>e,Zn={path:"/dashboard",component:()=>R(()=>import("./index-qFN7PIK6.js"),__vite__mapDeps([24,7,1,2,3,4,5,6,25,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,26])),meta:{i18nKey:M("menu.Dashboard"),icon:"dashboard",order:0}},Qn=Object.freeze(Object.defineProperty({__proto__:null,default:Zn},Symbol.toStringTag,{value:"Module"})),eo={path:"/axios",name:"RAxios",component:()=>R(()=>import("./index-Df55SecY.js"),__vite__mapDeps([27,3,4,2,5,6,28,1,11,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,29])),meta:{i18nKey:M("menu.Axios"),icon:"axios",order:3,keepAlive:!0}},to=Object.freeze(Object.defineProperty({__proto__:null,default:eo},Symbol.toStringTag,{value:"Module"})),no={path:"barcode",component:()=>R(()=>import("./BarcodeDemo-OgEE4GOD.js"),__vite__mapDeps([30,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.Barcode"),icon:"other",order:2,extra:{label:"new"}}},oo=Object.freeze(Object.defineProperty({__proto__:null,default:no},Symbol.toStringTag,{value:"Module"})),ao={path:"/cache-demo",component:()=>R(()=>import("./index-BUWc6-jF.js"),__vite__mapDeps([31,1,2,3,4,5,6,11,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.CacheDemo"),icon:"other",order:3}},ro=Object.freeze(Object.defineProperty({__proto__:null,default:ao},Symbol.toStringTag,{value:"Module"})),lo={path:"/context-menu",component:()=>R(()=>import("./index-DVPE0l1s.js"),__vite__mapDeps([32,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.ContextMenu"),icon:"other",order:2}},so=Object.freeze(Object.defineProperty({__proto__:null,default:lo},Symbol.toStringTag,{value:"Module"})),io={path:"/directive",component:()=>R(()=>import("./index-5cxxl6_s.js"),[]),meta:{i18nKey:M("menu.Directive"),icon:"other",order:2,extra:{label:"ellipsis"}}},uo=Object.freeze(Object.defineProperty({__proto__:null,default:io},Symbol.toStringTag,{value:"Module"})),co={path:"/echart",component:()=>R(()=>import("./index-DcxnS7rg.js"),__vite__mapDeps([33,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,34])),meta:{i18nKey:M("menu.Echart"),icon:"echart",order:1,extra:{label:"useChart"}}},po=Object.freeze(Object.defineProperty({__proto__:null,default:co},Symbol.toStringTag,{value:"Module"})),mo={path:"/form",component:()=>R(()=>import("./index-M0CE-Y7m.js"),__vite__mapDeps([35,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.Form"),icon:"other",order:2,extra:{label:"useForm"}}},ho=Object.freeze(Object.defineProperty({__proto__:null,default:mo},Symbol.toStringTag,{value:"Module"})),fo={path:"/iframe",component:()=>R(()=>import("./index-DgdcKc1-.js"),__vite__mapDeps([36,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{icon:"other",order:2,noLocalTitle:"iframe"}},go=Object.freeze(Object.defineProperty({__proto__:null,default:fo},Symbol.toStringTag,{value:"Module"})),vo={path:"/mock-demo",component:()=>R(()=>import("./index-K7CNfH-G.js"),__vite__mapDeps([37,7,1,2,3,4,5,6,28,11,8,9,10,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.Mock"),icon:"other",order:3,keepAlive:!1,extra:{label:"usePagination"}}},yo=Object.freeze(Object.defineProperty({__proto__:null,default:vo},Symbol.toStringTag,{value:"Module"})),Vo={path:"/modal-demo",component:()=>R(()=>import("./index-DO7tpLdv.js"),__vite__mapDeps([38,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.Modal"),icon:"other",order:3}},bo=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"})),ve=()=>R(()=>Promise.resolve().then(()=>Ba),void 0),_o={path:"/multi",component:ve,meta:{i18nKey:M("menu.MultiMenu"),icon:"other",order:4,extra:{label:"cache"}},children:[{path:"multi-menu-one",name:"MultiMenuOne",component:()=>R(()=>import("./index-BtZPyenx.js"),[]),meta:{noLocalTitle:"多级菜单-1",keepAlive:!0}},{path:"multi-menu-two",name:"MultiMenuTwo",component:ve,meta:{noLocalTitle:"多级菜单-2"},children:[{path:"sub-menu-other",name:"SubMenuOther",component:()=>R(()=>import("./index-B6a_PCdD.js"),[]),meta:{noLocalTitle:"多级菜单-2-1",keepAlive:!0}},{path:"sub-menu",name:"SubMenu",component:ve,meta:{noLocalTitle:"多级菜单-2-2",keepAlive:!0},children:[{path:"sub-menu-one",name:"MultiMenuTwoOne",component:()=>R(()=>import("./index-Cg1Whvge.js"),[]),meta:{noLocalTitle:"多级菜单-2-2-1",keepAlive:!0}}]}]}]},So=Object.freeze(Object.defineProperty({__proto__:null,default:_o},Symbol.toStringTag,{value:"Module"})),wo={path:"/precision",component:()=>R(()=>import("./index-BWn0fJgT.js"),__vite__mapDeps([39,1,2,3,4,5,6,11,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.CalculatePrecision"),icon:"other",order:2}},Co=Object.freeze(Object.defineProperty({__proto__:null,default:wo},Symbol.toStringTag,{value:"Module"})),To={path:"/qrcode",component:()=>R(()=>import("./index-DU0AD4bw.js"),__vite__mapDeps([40,41,42,43])),meta:{i18nKey:M("menu.QRCode"),icon:"other",order:2}},No=Object.freeze(Object.defineProperty({__proto__:null,default:To},Symbol.toStringTag,{value:"Module"})),Oo={path:"rely-about",component:()=>R(()=>import("./index-Dhd4FjCe.js"),__vite__mapDeps([44,45])),meta:{i18nKey:M("menu.RelyAbout"),icon:"rely",order:999}},Ro=Object.freeze(Object.defineProperty({__proto__:null,default:Oo},Symbol.toStringTag,{value:"Module"})),ko={path:"/router-demo",component:ve,meta:{i18nKey:M("menu.RouterDemo"),icon:"other",order:3},children:[{path:"router-demo-home",component:()=>R(()=>import("./index-DQ5wDAPv.js"),__vite__mapDeps([46,7,1,2,8,9,10,3,4,5,6,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{noLocalTitle:"人员信息(平级模式)"}},{path:"router-demo-detail",component:()=>R(()=>import("./index-BRGdSJVO.js"),[]),meta:{noLocalTitle:"信息详情",sameLevel:!0}}]},Po=Object.freeze(Object.defineProperty({__proto__:null,default:ko},Symbol.toStringTag,{value:"Module"})),Ao={path:"/scroll-reveal",component:()=>R(()=>import("./index-E385tkq8.js"),__vite__mapDeps([47,48])),meta:{i18nKey:M("menu.scrollReveal"),icon:"scroll_reveal",hidden:!0}},xo=Object.freeze(Object.defineProperty({__proto__:null,default:Ao},Symbol.toStringTag,{value:"Module"})),Mo={path:"/segment",component:()=>R(()=>import("./index-Cpf3x9Hw.js"),__vite__mapDeps([49,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.Segment"),icon:"other",order:3,extra:{label:"segment"}}},Lo=Object.freeze(Object.defineProperty({__proto__:null,default:Mo},Symbol.toStringTag,{value:"Module"})),Io={path:"/svg-icons",component:()=>R(()=>import("./index-CvM7o9gX.js"),__vite__mapDeps([50,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,51])),meta:{i18nKey:M("menu.SvgIcon"),icon:"other",order:3}},Eo=Object.freeze(Object.defineProperty({__proto__:null,default:Io},Symbol.toStringTag,{value:"Module"})),zo={path:"/table-pro",component:()=>R(()=>import("./TablePro-DFxhssIJ.js"),__vite__mapDeps([52,7,1,2,3,4,5,6,11,8,28,53,9,10,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.TablePro"),icon:"other",order:2,extra:{label:"TablePro"}}},jo=Object.freeze(Object.defineProperty({__proto__:null,default:zo},Symbol.toStringTag,{value:"Module"})),Do={path:"/table",component:()=>R(()=>import("./index-DkMTszkF.js"),__vite__mapDeps([54,11,7,1,2,3,4,5,6,8,9,10,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.Table"),icon:"other",order:2,extra:{label:"useTable"}}},Fo=Object.freeze(Object.defineProperty({__proto__:null,default:Do},Symbol.toStringTag,{value:"Module"})),Bo={path:"/template-hooks",component:()=>R(()=>import("./index-C-7JwSBQ.js"),__vite__mapDeps([55,7,1,2,3,4,5,6,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22])),meta:{i18nKey:M("menu.TemplateHooks"),icon:"other",order:1}},$o=Object.freeze(Object.defineProperty({__proto__:null,default:Bo},Symbol.toStringTag,{value:"Module"})),Ko=()=>{const e=Object.assign({"/src/router/modules/dashboard.ts":Qn,"/src/router/modules/demo/axios.ts":to,"/src/router/modules/demo/barcode.ts":oo,"/src/router/modules/demo/cache-demo.ts":ro,"/src/router/modules/demo/context-menu.ts":so,"/src/router/modules/demo/directive.ts":uo,"/src/router/modules/demo/echart.ts":po,"/src/router/modules/demo/form.ts":ho,"/src/router/modules/demo/iframe.ts":go,"/src/router/modules/demo/mock.ts":yo,"/src/router/modules/demo/modal.ts":bo,"/src/router/modules/demo/multi-menu.ts":So,"/src/router/modules/demo/precision.ts":Co,"/src/router/modules/demo/qrcode.ts":No,"/src/router/modules/demo/rely.ts":Ro,"/src/router/modules/demo/router-demo.ts":Po,"/src/router/modules/demo/scroll-reveal.ts":xo,"/src/router/modules/demo/segment.ts":Lo,"/src/router/modules/demo/svg-icons.ts":Eo,"/src/router/modules/demo/table-pro.ts":jo,"/src/router/modules/demo/table.ts":Fo,"/src/router/modules/demo/template-hooks.ts":$o});return Object.keys(e).reduce((n,o)=>{const r=e[o].default;if(r)n.push(r);else throw new Error(`[combineRawRouteModules]: ${o} module must export default.`);return n},[])},Uo=e=>e[0]==="/",Tt=(e,t=[],n="")=>{var o;if(!Array.isArray(e))return[];for(const r of e){const a=n+(Uo(r.path)?r.path:"/"+r.path);if((o=r.children)!=null&&o.length){Tt(r.children,t,a);continue}else t.push({...r,path:a})}return t},Wo=e=>Array.isArray(e)?Tt(ye(e)):[],qo=e=>e.sort((t,n)=>{var a,s;const o=((a=t.meta)==null?void 0:a.order)??1,r=((s=n.meta)==null?void 0:s.order)??0;if(typeof o!="number"||typeof r!="number")throw new TypeError("orderRoutes error: order must be a number!");return o===r?t.name?n.name?t.name.localeCompare(n.name):-1:1:o-r}),Go=e=>{const{beforeEach:t}=e,{getRootPath:n}=ne(),o=(r,a)=>r.path==="/"||a.path==="/login";t((r,a,s)=>{const l=le(I.token,"localStorage"),i=le(I.appMenuKey,"sessionStorage",{defaultValue:n.value}),{meta:u,name:d}=r;l!==null?o(r,a)?ke(!0):!G(d,"Symbol")&&d&&Yn.includes(d)?s():Dt(u)?o(r,a)?i?s(i):ke(!0):s():ke(!0):o(r,a)?s():s("/")})},ke=(e=!0)=>{const{router:t}=Ge(),{push:n,replace:o}=t,{getRootPath:r}=ne();We(I.appMenuKey,r.value,"localStorage"),e?o(r.value):n(r.value)},Ho=e=>{var n;const{meta:t}=e;t!=null&&t.ignoreAutoResetScroll||(n=Q.value)==null||n.scrollTo({top:0,left:0,behavior:"smooth"})},Yo=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()})},Nt=e=>{const{meta:t={}}=e,{hidden:n,sameLevel:o,env:r}=t,{MODE:a}=De();return!(o||n||r&&typeof r=="string"&&r!==a||r&&Array.isArray(r)&&!r.includes(a))};var Xo={pkg:{dependencies:{"@vueuse/core":"^10.9.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10",echarts:"^5.5.0","html-to-image":"1.11.11",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":"^4.0.1","print-js":"^1.6.0",vue:"^3.5.8","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.8.1","@commitlint/config-conventional":"^17.8.1","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.2.2","@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.21.0","@typescript-eslint/parser":"^6.21.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.16",depcheck:"^1.4.7",eslint:"^8.57.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.2.0",postcss:"^8.4.38","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.18.2","unplugin-vue-components":"^0.27.4",vite:"^5.4.3","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.13"},name:"ray-template",version:"4.9.6"},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 Ot=Pinia.defineStore("setting",()=>{const{appPrimaryColor:{primaryColor:e}}=Xo,{locale:t}=se(),{locale:n}=Sr(),o=Vue.reactive({drawerPlacement:"right",primaryColorOverride:{common:{primaryColor:e,primaryColorHover:e,primaryColorPressed:e}},appTheme:!1,menuTagSwitch:!0,breadcrumbSwitch:!0,localeLanguage:Kt(),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({},$n)}),r=l=>{t(l),n(l),o.localeLanguage=l,We(I.localeLanguage,l,"localStorage")},a=(l,i=.3)=>{const u=tn(l,i),d={primaryColor:l,primaryColorHover:l,primaryColorPressed:l};o.primaryColorOverride.common=d;const h=document.body;h.style.setProperty("--ray-theme-primary-color",l),h.style.setProperty("--ray-theme-primary-fade-color",u)},s=(l,i,u)=>{Object.hasOwn(o,l)&&(o[l]=i),u==null||u()};return En(()=>o.appTheme,l=>{l?o.primaryColorOverride=Object.assign({},o.primaryColorOverride,$.appNaiveUIThemeOverrides.dark,$.appNaiveUIThemeOverridesCommon.dark):o.primaryColorOverride=Object.assign({},o.primaryColorOverride,$.appNaiveUIThemeOverrides.light,$.appNaiveUIThemeOverridesCommon.light)},{immediate:!0}),{...Vue.toRefs(o),updateLocale:r,changePrimaryColor:a,updateSettingState:s}},{persist:{key:I.appPiniaSettingStore}}),Jo={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:()=>ft()},autoResizeObserverTarget:{type:Object,default:null},watchOptionsThrottleWait:{type:Number,default:500},nextTick:{type:Boolean,default:!0},setChartOptions:{type:Object,default:()=>gt()},onRegister:{type:[Function,Array],default:null}},Zo=nn(),tt="__R_CHART_DOWN_LOAD_CHART__";Zo.forEach(e=>{vn(e.name,e.theme)});const Qr=Vue.defineComponent({name:"RChart",props:Jo,setup(e,{expose:t}){const{getAppTheme:n}=D(),o=Vue.useTemplateRef("rayChartRef"),r=Vue.useTemplateRef("rayChartWrapperRef"),a=Vue.shallowRef();let s,l;const{echartTheme:i}=$;let u;const d=Vue.computed(()=>[{label:"下载图片",key:tt,disabled:!(a.value&&a.value.getDom())}]),h=Vue.computed(()=>({"--ray-chart-width":L(e.width),"--ray-chart-height":L(e.height)})),f=Vue.ref(!1);let m;const p={aria:e.showAria},g=async()=>{var S;oe([Vn,bn,_n,Sn,wn,Cn,Tn,Nn]),oe([On,Rn,kn,Pn,An,xn]),oe([Mn,Ln]),oe([In]);try{oe((S=e.use)==null?void 0:S.filter(Boolean))}catch(P){console.error("[RChart register error]: ",P)}},v=()=>{if(a.value&&_(),e.theme==="default"){e.autoChangeTheme?c("dark"):c("");return}if(e.theme)c(e.theme);else{const S=e.autoChangeTheme&&n.value?`${i}-dark`:i;c(S)}},y=S=>{let P=Vue.unref(S);return P=(E=>Object.assign({},P,E))({aria:{enabled:e.showAria,decal:{show:e.showAria}}}),P},c=(S=i)=>{var de;const P=o.value,x=y(e.options),{height:E,width:F}=P.getBoundingClientRect(),{onSuccess:H,onError:ce}=e;try{a.value=yn(P,S,{width:F===0?200:void 0,height:E===0?200:void 0}),H&&A(H,a.value),e.nextTick?(a.value.setOption({}),Vue.nextTick(()=>{var B;x&&((B=a.value)==null||B.setOption(x))})):x&&((de=a.value)==null||de.setOption(x))}catch(B){throw ce&&A(ce),new Error(`[RChart render error]: ${B}`)}finally{const{onFinally:B}=e;B&&A(B)}},b=()=>{var S;return!!((S=a.value)!=null&&S.isDisposed())},_=()=>{var S;b()||(S=a.value)==null||S.dispose()},O=()=>{a.value&&a.value.resize()},V=(S,P)=>{if(S===tt&&!b()){const{filename:E,...F}=e.downloadOptions;on(a.value.getDataURL(F),E??`${new Date().getTime()}`)}const{onDropdownSelect:x}=e;x&&A(x,S,P)},C=()=>{var P;if(e.autoResize&&(s||(s=Ke(O,500)),l||(l=Zt(e.autoResizeObserverTarget||r,s))),(P=a.value)!=null&&P.getDom()||!f.value&&e.intersectionObserver)return;v(),m==null||m.stop();const{onRegister:S}=e;S&&a.value&&A(S,a.value,C,k)},k=()=>{_(),s==null||s.cancel(),l==null||l.stop(),m==null||m.stop(),m=null,s=null,l=null};return Vue.watch(()=>n.value,()=>{e.autoChangeTheme&&(_(),v())}),Vue.watchEffect(()=>{var S,P;e.intersectionObserver&&(m=Jt(e.intersectionObserverTarget||r,([x])=>{f.value=x.isIntersecting},e.intersectionOptions)),e.watchOptions?u=zn(()=>e.options,x=>{var H;const E=y(x),F=Object.assign({},gt(),e.setChartOptions);(H=a.value)==null||H.setOption(E,F)},{deep:!0,throttle:e.watchOptionsThrottleWait}):u==null||u(),e.loading?(S=a.value)==null||S.showLoading(ft(e.loadingOptions)):(P=a.value)==null||P.hideLoading(),e.showAria!==p.aria&&a.value&&(a.value.setOption(y(e.options)),p.aria=e.showAria),f.value&&!b()&&C()}),t(),Vue.onBeforeMount(async()=>{await g()}),Vue.onMounted(()=>{C()}),Vue.onBeforeUnmount(()=>{k(),u==null||u()}),{rayChartRef:o,cssVarsRef:h,rayChartWrapperRef:r,moreDropDownOptions:d,dropdownSelect:V}},render(){const{title:e,contentStyle:t,preset:n,moreDropDownOptions:o,dropdownSelect:r,bordered:a,dropdownOptions:s}=this,{cardExtra:l}=this.$slots;return n==="card"?Vue.createVNode(naive.NCard,{class:"ray-chart",ref:"rayChartWrapperRef",style:[this.cssVarsRef],contentStyle:t,bordered:a,embedded:!0},{default:ee(Vue.createVNode("div",{class:"ray-chart__container",ref:"rayChartRef"},null)),header:ee(e,{defaultElement:Vue.createVNode("div",{style:"display: none;"},null)}),"header-extra":ee(l,{defaultElement:Vue.createVNode(Pt,{iconSize:18,cursor:"pointer",options:s||o,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)])}}),el=()=>{let e,t,n;const o=(i,u,d)=>{i&&(e=i,t=d,n=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:n,echartInst:e}};return[o,{getChartInstance:r,isDisposed:()=>{var i;return!!((i=r().echartInst)!=null&&i.isDisposed())},dispose:()=>r().dispose.call(null),render:()=>r().render.call(null)}]},Qo={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},tl=Vue.defineComponent({name:"RCollapseGrid",props:Qo,setup(e){const t=Vue.ref(!e.open),n=Vue.computed(()=>({"--r-collapse-grid-action-align":e.actionAlign})),o=()=>{const{onUpdateValue:a,"onUpdate:value":s}=e;t.value=!t.value,a&&A(a,t.value),s&&A(s,t.value)};return{modelCollapsed:t,collapseClick:o,CollapseIcon:()=>Vue.createVNode("div",{class:"collapse-icon",onClick:o.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:n}},render(){const{$slots:{collapse:e,action:t,default:n},CollapseIcon:o,$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:()=>[n==null?void 0:n(),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):o()]})]})]})})}}),ea={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:ea,setup(e){const t=Vue.computed(()=>`#${e.prefix}-${e.name}`),n=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:n,iconClick:r=>{const{onClick:a}=e;a&&A(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)])])}}),ta={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,String],default:!0},iframeClass:{type:String,default:null}},nl=Vue.defineComponent({name:"RIframe",props:ta,setup(e,{expose:t}){const n=Vue.computed(()=>({"--ray-iframe-frameborder":L(e.frameborder),"--ray-iframe-width":L(e.width),"--ray-iframe-height":L(e.height)})),o=Vue.useTemplateRef("iframeRef"),r=Vue.ref(!0),a=l=>{r.value=!1;const{onSuccess:i}=e;i&&A(i,o.value,l)},s=l=>{r.value=!1;const{onError:i}=e;i&&A(i,l)};return re(o,"load",a),re(o,"error",s),t({iframeInst:o}),{cssVars:n,iframeRef:o,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",{class:["ray-iframe__container",this.iframeClass],ref:"iframeRef",src:this.src,allow:this.allow,name:this.name,title:this.title,loading:typeof this.lazy=="boolean"?"lazy":this.lazy},null)})])}}),na={...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}},oa=(e,t,n)=>{const{scheduler:o}=n??{};return new Promise(r=>{setTimeout(()=>{const a=t==="card"?".n-card-header__main":".n-dialog__title";if(e){const s=Ze(e).draggable({inertia:!0,autoScroll:!0,allowFrom:a,modifiers:[Ze.modifiers.restrictRect({restriction:"parent",endOnly:!0})],listeners:{move:l=>{o==null||o(l)}}}).resizable(!1);r(s)}},30)})},Rt=(e,t)=>{const n=typeof e=="string"?document.querySelector(e):e;return new Promise((o,r)=>{if(n){n.setAttribute("can-drag","true");const{preset:a,dargCallback:s}=t;let{x:l,y:i}=t;oa(n,a,{scheduler:u=>{const d=u.target;l+=u.dx,i+=u.dy,d.style.transform=`translate(${l}px, ${i}px)`,s==null||s(l,i,u)}}).then(u=>{o(u)})}else r()})},aa="r-modal__preset-card--fullscreen",kt="r-modal",te={width:"--r-modal-width",cardWidth:"--r-modal-card-width",dialogWidth:"--r-modal-dialog-width"},ol=Vue.defineComponent({name:"RModal",props:na,setup(e){const t=Vue.computed(()=>({[te.width]:L(e.width??600),[te.cardWidth]:L(e.cardWidth??600),[te.dialogWidth]:L(e.dialogWidth??446)})),n=Ve();let o;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(n);l&&Rt(l,{preset:e.preset,x:r.x,y:r.y,dargCallback:(i,u)=>{r.x=i,r.y=u}}).then(i=>{o=i}),e.memo&&l&&(l.style.transform=`translate(${r.x}px, ${r.y}px)`)}):(o==null||o.unset(),o=null)},{immediate:!0}),{cssVars:t,isFullscreenCardType:a,uuidEl:n}},render(){const{$props:e,$slots:t,$attrs:n}=this,{preset:o,...r}=e,{cssVars:a,uuidEl:s,isFullscreenCardType:l}=this;return Vue.createVNode(naive.NModal,Vue.mergeProps({class:[kt,l?aa:""],style:[a,l?"height: 100vh":""],preset:o},{id:s},r,n),{...t})}}),al=()=>{const{create:e,destroyAll:t}=naive.useModal();return{create:o=>{const{content:r,...a}=o;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:d,cardWidth:h,dialogWidth:f}=o,m=e({...a,content:s}),{key:p}=m,g={[te.width]:L(d??600),[te.cardWidth]:L(h??600),[te.dialogWidth]:L(f??446)};return Vue.nextTick(()=>{const[v]=be(`[internalkey="${p}"]`)||[];if(v){if(i&&Rt(v,{preset:l,x:0,y:0}),u&&l==="card"){const y=v.querySelector(".n-card__content");y&&Oe(y,{maxHeight:"calc(100vh - 9px - var(--n-padding-bottom) - var(--n-padding-bottom) - var(--n-padding-top))",overflowY:"hidden",padding:"0"}),Oe(v,{width:"100%",height:"100vh"})}Oe(v,g),vt(v,kt)}}),m},destroyAll:t}},ra={...naive.dropdownProps,icon:{type:String,default:"more"},iconSize:{type:Number,default:14},cursor:{type:String,default:"default"}};function la(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Pt=Vue.defineComponent({name:"RMoreDropdown",props:ra,render(){let e;const{iconSize:t,cursor:n,icon:o}=this,{default:r}=this.$slots;return Vue.createVNode(naive.NDropdown,Vue.mergeProps(this.$props,this.$attrs,{placement:"bottom-start"}),la(e=ee(r,{defaultElement:Vue.createVNode(N,{name:o,size:t,cursor:n},null)}))?e:{default:()=>[e]})}}),ie={...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}},K={tableIconSize:"18",tableKey:Symbol("r-table")},sa=[{label:"斑马条纹",value:"striped"},{label:"表格边框",value:"bordered"}],ia=Vue.defineComponent({name:"TableSizeSelect",props:{onChangeSize:{type:[Function,Array],default:null},...ie},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&&A(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:K.tableIconSize,cursor:"pointer"},null)]})}}),ua=Vue.defineComponent({name:"TableFullscreen",setup(){const{wrapperRef:e}=Vue.inject(K.tableKey,{}),[t,{toggleFullscreen:n,isEnabled:o}]=ht(e);return{toggleFullscreen:n,isEnabled:o}},render(){const{toggleFullscreen:e,isEnabled:t,$t:n}=this;return Vue.createVNode(N,{name:"fullscreen",size:K.tableIconSize,cursor:"pointer",onClick:()=>{t||window.$message.warning(n("globalMessage.isEnabledFullscreen")),e()}},null)}}),ca=()=>Vue.createVNode(N,{name:"draggable",size:14,cursor:"grab"},null),nt=({icon:e,title:t,onClick:n,customClassName:o})=>Vue.createVNode(naive.NPopover,{showArrow:!1},{trigger:()=>Vue.createVNode(N,{name:e,size:K.tableIconSize,cursor:"pointer",customClassName:o,onClick:n==null?void 0:n.bind(null)},null),default:()=>t}),Fe=(e,t)=>{if(!t)return[null,null];for(let n=0;n<t.length;++n){const o=t[n];if(o.key===e.key)return[t,n];const[r,a]=Fe(e,o.children);if(r&&a!==null)return[r,a]}return[null,null]},Pe="r-table__c-tool-icon--active",da=Vue.defineComponent({name:"TableC",props:{...ie,onUpdateColumn:{type:[Function,Array],default:null}},setup(e){let t;const n=Vue.computed({get:()=>ye(e.columns).filter(i=>i.type?(t=i,!1):!0).map((i,u)=>{const{key:d,title:h,children:f,fixed:m,isResizable:p,...g}=i,v=m==="left",y=m==="right",c={...g,title:h,key:d,fixed:m,isLeftFixedActivated:v,isRightFixedActivated:y,isResizable:p};return{...c,suffix:()=>Vue.createVNode(naive.NFlex,{style:"padding-left: 32px;"},{default:()=>[Vue.createVNode(nt,{icon:"row_head",title:"固定在列首",customClassName:v?Pe:"",onClick:a.bind(this,"left",c,u)},null),Vue.createVNode(naive.NPopover,{showArrow:!1},{trigger:()=>Vue.createVNode(N,{name:"resize_h",size:K.tableIconSize,cursor:"pointer",customClassName:p?Pe:"",onClick:r.bind(this,c,u)},null),default:()=>"修改列宽"}),Vue.createVNode(nt,{icon:"row_end",title:"固定在列尾",customClassName:y?Pe:"",onClick:a.bind(this,"right",c,u)},null)]})}}),set:()=>{}}),o=l=>{const{onUpdateColumn:i}=e;i&&A(i,l)},r=(l,i)=>{l.isResizable=!l.isResizable,l.resizable=l.isResizable,n.value[i]=l,o(n.value)},a=(l,i,u)=>{const d=`${l}FixedActivated`,h=`${l==="left"?"right":"left"}FixedActivated`;i[h]=!1,i[d]=!i[d],i[d]?i.fixed=l:i.fixed=void 0,n.value[u]=i,o(n.value)};return{treeDataSource:n,treeDrop:({node:l,dragNode:i,dropPosition:u})=>{const[d,h]=Fe(i,n.value);if(d===null||h===null)return;d.splice(h,1);const[f,m]=Fe(l,n.value);f===null||m===null||(u==="before"?f.splice(m,0,i):f.splice(m+1,0,i),pt(t)||f.unshift(t),o(f))}}},render(){return Vue.createVNode(naive.NPopover,{displayDirective:"show",trigger:"click",showArrow:!1},{trigger:()=>Vue.createVNode(N,{name:"setting",size:K.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:ca.bind(this),onDrop:this.treeDrop.bind(this)},null)})}}),pa=Vue.defineComponent({name:"TablePrint",props:ie,setup(e){const{wrapperRef:t}=Vue.inject(K.tableKey,{});return{printTableClick:()=>{const{printTableOptions:{printOptions:o={},domToImageOptions:r}={},title:a}=e;(o.documentTitle===""||o.documentTitle===void 0||o.documentTitle===null)&&(o.documentTitle=typeof a=="string"?a:""),yt(t,{printOptions:o,domToImageOptions:r})}}},render(){return Vue.createVNode(N,{name:"print",size:K.tableIconSize,cursor:"pointer",onClick:this.printTableClick.bind(this)},null)}}),ma=Vue.defineComponent({name:"TablePropsSelect",props:{...ie,onPopselectChange:{type:[Function,Array],default:null},onInitialed:{type:[Function,Array],default:null}},setup(e){const t=Vue.ref(!1),n=Vue.ref([]),o=a=>{const{onPopselectChange:s}=e;s&&A(s,a)};return(()=>{const{striped:a,bordered:s,onInitialed:l}=e;a&&n.value.push("striped"),s&&n.value.push("bordered"),l&&A(l,n.value)})(),{propsPopselectValue:n,popoverShow:t,updatePopselectValue:o}},render(){return Vue.createVNode(naive.NPopselect,{value:this.propsPopselectValue,"onUpdate:value":e=>this.propsPopselectValue=e,options:sa,trigger:"click",multiple:!0,onUpdateValue:this.updatePopselectValue.bind(this)},{default:()=>[Vue.createVNode(N,{name:"expanded",size:K.tableIconSize,cursor:"pointer",style:"transform: rotate(270deg);"},null)]})}});function ha(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const rl=Vue.defineComponent({name:"RTable",inheritAttrs:!1,props:ie,setup(e,t){const{expose:n,emit:o}=t,r=Vue.useTemplateRef("rTableInst"),a=Vue.useTemplateRef("wrapperRef"),s=Ve(16),l=Ve(16),i=Vue.reactive({x:0,y:0,showContextMenu:!1}),u=Vue.reactive({size:e.size}),d=Vue.ref(Object.assign({striped:!1,bordered:!1},ae(e,"striped","bordered"))),h=(c,b)=>{const{onContextMenuClick:_}=e;_&&A(_,c,b),i.showContextMenu=!1},f=(c,b)=>{var O;return{...(O=e.rowProps)==null?void 0:O.call(e,c,b),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=c=>{u.size=c},p=c=>{const{onUpdateColumns:b,"onUpdate:columns":_}=e;b&&A(b,c),_&&A(_,c)},g=()=>{const{toolOptions:c}=e;return c==null?void 0:c.filter(Boolean).map(b=>typeof b=="function"?b():b)},v=c=>{Object.keys(d.value).forEach(_=>{d.value[_]=c.includes(_)})},y=c=>{const{tool:b}=c;if(!b)return;const _=()=>Vue.createVNode(naive.NFlex,{align:"center"},{default:()=>[Vue.createVNode(pa,c,null),Vue.createVNode(ia,Vue.mergeProps(c,{onChangeSize:m.bind(this)}),null),Vue.createVNode(ua,null,null),Vue.createVNode(da,Vue.mergeProps(c,{onUpdateColumn:p.bind(this)}),null),Vue.createVNode(ma,Vue.mergeProps(c,{onPopselectChange:v.bind(this),onInitialed:v.bind(this)}),null)]});return e.toolOptions?e.coverTool?()=>{let O;return Vue.createVNode(naive.NFlex,{align:"center"},ha(O=g())?O:{default:()=>[O]})}:()=>Vue.createVNode(naive.NFlex,{align:"center"},{default:()=>[_(),g()]}):_};return Vue.onMounted(()=>{const{onRegister:c}=e;c&&r.value&&A(c,r.value,{uuidTable:l,uuidWrapper:s,wrapperRef:a})}),Vue.provide(K.tableKey,{uuidTable:l,uuidWrapper:s,wrapperRef:a}),n(),{uuidWrapper:s,uuidTable:l,contextMenuReactive:i,rTableInst:r,combineRowProps:f,contextMenuSelect:h,privateReactive:u,tool:y,wrapperRef:a,propsPopselectValue:d}},render(){const{$props:e,$attrs:t,wrapperBordered:n,uuidWrapper:o,privateReactive:r,disabledContextMenu:a,contextMenuReactive:s,contextMenuOptions:l,uuidTable:i,title:u,$slots:d,propsPopselectValue:h,renderWrapperHeader:f}=this,{class:m}=t,{tool:p,combineRowProps:g,contextMenuSelect:v}=this;return Vue.createVNode(naive.NCard,Vue.mergeProps(e.cardProps,{id:o},{ref:"wrapperRef",bordered:n,class:m}),{default:()=>Vue.createVNode(Vue.Fragment,null,[Vue.createVNode(naive.NDataTable,Vue.mergeProps({id:i},t,e,h,{rowProps:g.bind(this),size:r.size,ref:"rTableInst"}),{...d}),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:v.bind(this)},null)]),header:f?ee(u,{defaultElement:Vue.createVNode("div",{style:"display: none;"},null)}):null,"header-extra":p(e),footer:()=>{var y;return(y=d.tableFooter)==null?void 0:y.call(d)},action:()=>{var y;return(y=d.tableAction)==null?void 0:y.call(d)}})}}),ll=()=>{const e=Vue.ref();let t={};const n=(m,p)=>{m&&(e.value=m,t=p)},o=()=>{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[n,{getTableInstance:o,clearFilters:()=>o().clearFilters.call(null),clearSorter:()=>o().clearSorter.call(null),downloadCsv:m=>o().downloadCsv.call(null,m),filters:m=>o().filters.call(null,m),page:m=>o().page.call(null,m),scrollTo:m=>o().scrollTo(m),sort:(m,p)=>o().sort.call(null,m,p),print:m=>{const{uuidWrapper:p}=t;if(p){const g=document.getElementById(p);yt(g,m)}},filter:m=>o().filter.call(null,m)}]},At=(e,t,n)=>{var o;if(e.length)for(const r of e){if(r[t]===n)return r;if((o=r==null?void 0:r.children)!=null&&o.length){const a=At(r.children,t,n);if(a)return a}}},ot=e=>{const t=Vue.unref(e);return t?t.findIndex(o=>{const{type:r,multiple:a}=o;if(r==="selection"&&(a==null||a===!0))return!0})!==-1:!0},fa=(e,t,n,o)=>{const r=Vue.unref(e);return r?t.reduce((a,s)=>{const l=Vue.unref(n).findIndex(u=>u[o]===s);if(l!==-1)return a.push(Vue.unref(n)[l]),a;const i=r.findIndex(u=>u[o]===s);return i!==-1&&a.push(r[i]),a},[]):n},sl=(e,t,n)=>{const o=Vue.ref([]),r=Vue.ref([]),{rowKey:a="key",onChange:s}=n||{},l=Vue.computed(()=>ot(t)),i=(p,g,v)=>{o.value=p,r.value=Vue.unref(fa(e,p,r,a)),s==null||s(p,r.value,v),ot(t)},u=()=>o.value,d=()=>r.value,h=()=>{o.value=[],r.value=[],s==null||s(o.value,r.value,{row:void 0,action:"uncheckAll"})},f=p=>{if(p==null)return;let g;o.value=o.value.filter(v=>v!==p),r.value=r.value.filter(v=>v[a]===p?(g=v,!1):!0),s==null||s(o.value,r.value,{row:g,action:"uncheck"})},m=p=>{if(o.value.includes(p))return;const g=!l.value&&o.value.length>=1,v=At(Vue.unref(e)||[],a,p);g?o.value=[p]:o.value.push(p),v&&(g?r.value=[v]:r.value.push(v),s==null||s(o.value,r.value,{row:v,action:"check"}))};return qe(()=>{h()}),[o,{checkedRows:r,checkedRowKeysBind:i,getKeys:u,getRows:d,clearAll:h,clearKey:f,selectKey:m}]},ga={transitionPropName:"fade",transitionMode:"out-in",transitionAppear:!0},va=Vue.defineComponent({name:"RTransitionComponent",__name:"index",props:Vue.mergeDefaults({transitionPropName:{},transitionMode:{},transitionAppear:{type:Boolean}},ga),setup(e){const{getKeepAliveInclude:t}=xa(),{setupKeepAlive:n,maxKeepAliveLength:o,keepAliveExclude:r}=St;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(n)?(Vue.openBlock(),Vue.createBlock(Vue.KeepAlive,{key:0,max:Vue.unref(o),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})])}}}),ya={...naive.formProps,onRegister:{type:[Function,Array],default:null}},il=Vue.defineComponent({name:"RForm",props:ya,setup(e,{expose:t}){const n=Vue.useTemplateRef("formRef");return Vue.onMounted(()=>{const{onRegister:o}=e;o&&n.value&&A(o,n.value)}),t(),{formRef:n}},render(){const{$attrs:e,$props:t,$slots:n}=this;return Vue.createVNode(naive.NForm,Vue.mergeProps(e,t,{ref:"formRef"}),{...n})}}),ul=(e,t)=>{const n=Vue.ref(),o=u=>{u&&(n.value=u)},r=()=>{if(!n.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 n.value};return[o,{getFormInstance:r,validate:(u,d)=>r().validate.call(null,u,d),restoreValidation:()=>r().restoreValidation.call(null),formModel:()=>ye(e)||{},formRules:()=>ye(t)||{}}]},Va=["addTabClass","addTabStyle","paneClass","paneStyle","paneWrapperStyle","tabClass","tabStyle","type","label","addable","closable","onAdd","onClose","placement","animated","justifyContent","builtinThemeOverrides","displayDirective"],ba={tabPaddingSmallSegment:"4px 7px",tabPaddingMediumSegment:"6px 11px",tabPaddingLargeSegment:"8px 11px"},_a=Ue({...naive.tabsProps,options:{type:Array,default:()=>[]},width:{type:[Number,String],default:"fitContent"}},...Va);function Sa(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Be=e=>{const{icon:t,label:n}=e;return t?Vue.createVNode(naive.NFlex,{align:"center",wrap:!1,size:"small"},{default:()=>[Vue.createVNode(t,null,null),Vue.createVNode("div",null,[n])]}):n},wa=e=>{if(typeof e.popover=="string")return Vue.createVNode(naive.NPopover,null,{trigger:()=>Be(e),default:()=>e.popover});if(G(e.popover,"Object")){const{popover:t}=e,{label:n,...o}=t;return Vue.createVNode(naive.NPopover,o,{trigger:()=>Be(e),default:()=>n})}},cl=Vue.defineComponent({name:"RSegment",props:_a,setup(e,{expose:t}){const n=Vue.computed(()=>{const{width:o}=e;let r="";switch(o){case"block":r="100%";break;case"fitContent":r="fit-content";break;default:r=typeof o=="number"?L(o):"fit-content"}return{"--r-segment-width":r}});return t(),{cssVars:n}},render(){let e;const{$props:t,options:n,cssVars:o,themeOverrides:r}=this;return Vue.createVNode(naive.NTabs,Vue.mergeProps(t,{ref:"segmentRef",style:[o],class:"r-segment",type:"segment",animated:!0,themeOverrides:Object.assign({},ba,r)}),Sa(e=n.map(a=>Vue.createVNode(naive.NTab,{key:a.key,name:a.key,tab:a.popover?wa(a):Be(a),disabled:a.disabled},{...a.slots})))?e:{default:()=>[e]})}}),Ca={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]}},dl=Vue.defineComponent({name:"RBarcode",props:Ca,setup(e){const t=Vue.useTemplateRef("barcodeRef"),n=Vue.computed(()=>({"--r-barcode-width":L(e.width),"--r-barcode-height":L(e.height)}));let o;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&&A(i,s,a,l)}catch(a){const{onError:s}=e;s&&A(s,a)}finally{const{onFinally:a}=e;a&&A(a)}};return Vue.watchEffect(()=>{e.watchText?o=Vue.watch(()=>e.text,r):o==null||o()}),Vue.onMounted(()=>{r()}),Vue.onBeforeUnmount(()=>{o==null||o()}),{barcodeRef:t,cssVars:n}},render(){const{barcodeRender:e,loading:t,cssVars:n}=this,o=["r-barcode",{"r-barcode--loading":t}];return Vue.createVNode(naive.NSpin,{class:"r-barcode-spin",show:t},{default:()=>[e==="canvas"?Vue.createVNode("canvas",{class:o,style:n,ref:"barcodeRef"},null):Vue.createVNode("svg",{class:o,style:n,ref:"barcodeRef"},null)]})}});var Ta={pkg:{dependencies:{"@vueuse/core":"^10.9.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10",echarts:"^5.5.0","html-to-image":"1.11.11",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":"^4.0.1","print-js":"^1.6.0",vue:"^3.5.8","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.8.1","@commitlint/config-conventional":"^17.8.1","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.2.2","@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.21.0","@typescript-eslint/parser":"^6.21.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.16",depcheck:"^1.4.7",eslint:"^8.57.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.2.0",postcss:"^8.4.38","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.18.2","unplugin-vue-components":"^0.27.4",vite:"^5.4.3","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.13"},name:"ray-template",version:"4.9.6"},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 Na=(e,t,n)=>!e||typeof e!="object"?!1:e[t]===n,xt=(e,t,n)=>{const o=[];if(Na(e,t,n))return o.push(e),o;if(e.children&&e.children.length>0)for(const r of e.children){const a=xt(r,t,n);a.length>0&&o.push(e,...a)}return o},Oa=(e,t,n)=>{const o=[];for(const r of e){const a=xt(r,t,n);a.length>0&&o.push(...a)}return o},at=e=>{const{breadcrumbLabel:t}=e;if(!t)return;const{layout:{sideBarLogo:n}}=Ta,o=n?n.title:"";document.title=t+" - "+o},Ra=e=>{const{meta:{icon:t}}=e;if(!t)return;if(G(t,"Object"))return()=>t;const n=Vue.h(N,{name:t,size:X.menuCollapsedIconSize,cursor:"pointer"},{});return()=>n},Mt=e=>{const{meta:{extra:t}}=e;if(!t)return;const{show:n}=t;if(n===!1)return;const{t:o}=se(),{label:r,icon:a,type:s,i18nLabel:l}=t,i={type:"primary",size:"small",round:!0,bordered:!1,strong:!0},u=()=>l?o(l):r||null,d=()=>a&&(l||r)||!a&&(l||r)?null:{"padding-right":"0"};if(G(t,"Object"))return()=>Vue.h(naive.NTag,{...i,type:s||"primary",style:d()},{default:()=>u(),icon:()=>a})},rt=()=>{const{getRootPath:e}=ne();return le(I.appMenuKey,"sessionStorage",{defaultValue:e.value})},Lt=()=>qo(Ko()),ka=()=>Wo(Lt()),$e=["redirect","breadcrumbLabel","children","key","meta","name","path","show","fullPath"];let he;const It=(e,t)=>{var n;if(he&&Je(he.fullPath,t))return he;for(const o of e){if(Je(o.fullPath,t))return he=o,o;if((n=o.children)!=null&&n.length){It(o.children,t);continue}}},Et=Pinia.defineStore("menu",()=>{const{push:e,getRoutes:t}=VueRouter.useRouter(),n=VueRouter.useRoute(),{t:o}=se(),{setKeepAliveInclude:r}=Ma(),a=Vue.reactive({menuKey:rt(),options:[],collapsed:!1,menuTagOptions:[],breadcrumbOptions:[],currentMenuOption:null}),s=Vue.ref(!0),l=(c,b)=>{Object.hasOwn(a,c)&&(a[c]=b)},i=c=>{const{meta:b}=c,{i18nKey:_,noLocalTitle:O}=b,V=Vue.computed(()=>_?o(`${_}`):O),C={...c,key:c.fullPath,label:()=>Vue.h(naive.NEllipsis,null,{default:()=>V.value}),breadcrumbLabel:V.value},k=Object.assign({},C,{icon:Ra(c),extra:Mt(c)});return c.fullPath===rt()&&(a.currentMenuOption=k),k.show=Nt(k),k},u=c=>{a.breadcrumbOptions=Oa(a.options,"fullPath",c)},d=(c,b=!0)=>{const O=Array.isArray(c)?[...c]:[c];b?a.menuTagOptions.push(...O):a.menuTagOptions=O},h=(c,b)=>{a.menuTagOptions.find(O=>O.fullPath===c)||a.menuTagOptions.push(b)},f=(c,b,_)=>{const{meta:O}=b;if(O.windowOpen)window.open(O.windowOpen);else{e({path:String(c),query:_});const{sameLevel:V}=O;if(r(b),at(b),!V)h(c,b),u(c),a.menuKey=c,a.currentMenuOption=b,We(I.appMenuKey,c);else{const C=ae(i(b),$e);a.breadcrumbOptions.find(S=>S.key===C.key)||a.breadcrumbOptions.push({...C,fullPath:String(C.key)})}}},m=async(c,b)=>{const[_]=c.split("?"),O=t().find(V=>V.path===_);if(O){const V=ae(O,$e);f(_,i({...V,fullPath:V.path}),b)}},p=()=>new Promise(c=>{const b=(_,O)=>{var C;const V=[];for(const k of _){let S=`${O.endsWith("/")?O:O+"/"}${k.path}`;if(S=S.replace(/\/+/g,"/"),(C=k.children)!=null&&C.length)k.children=b(k.children,S);else if(!Dt(k.meta))continue;V.push(i({...k,fullPath:S}))}return V};if(a.options=b(Lt(),""),a.currentMenuOption){const{currentMenuOption:_}=a;a.breadcrumbOptions.length||u(_.key),h(_.fullPath,_),at(_)}c()}),g=c=>a.collapsed=c,v=(c,b=1)=>a.menuTagOptions.splice(c,b),y=async()=>{s.value&&(await p(),s.value=!1)};return Vue.watch(()=>n.fullPath,async(c,b)=>{await y(),c!==b&&await m(c,n.query)},{immediate:!0}),{...Vue.toRefs(a),changeMenuModelValue:f,collapsedMenu:g,spliceMenTagOptions:v,setMenuTagOptions:d,resolveOption:i,updateMenuState:l}},{persist:{key:I.appPiniaMenuStore,storage:window.localStorage,pick:["breadcrumbOptions","menuKey","menuTagOptions","collapsed"]}}),zt=Pinia.defineStore("signing",()=>{const e=Vue.reactive({signingCallback:{}}),t=o=>new Promise((r,a)=>{pt(o)?a({code:1,message:"登陆失败",data:null}):(e.signingCallback={role:"admin",name:o.name,avatar:"https://avatars.githubusercontent.com/u/51957438?v=4"},r({code:0,message:"登陆成功",data:e.signingCallback}))}),n=()=>{const{closeAll:o}=$t(),{appPiniaMenuStore:r,appPiniaSigningStore:a}=I;window.$message.info("账号退出中..."),Re("__all_sessionStorage__","sessionStorage"),Re(r,"localStorage"),Re(a,"localStorage"),o(),setTimeout(()=>window.location.reload())};return{...Vue.toRefs(e),signing:t,logout:n}},{persist:{key:I.appPiniaSigningStore,pick:["signingCallback"],storage:window.localStorage}}),jt=Pinia.defineStore("keepAlive",()=>{const{maxKeepAliveLength:e}=St,t=Vue.reactive({keepAliveInclude:[]}),n=()=>t.keepAliveInclude.length,o=a=>{const s=n(),{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:o,getKeepAliveInclude:r}},{persist:{key:I.appPiniaKeepAliveStore,storage:window.sessionStorage,pick:["keepAliveInclude"]}}),J=()=>{const e=Et(),t=Vue.computed(()=>e.options),n=Vue.computed(()=>e.breadcrumbOptions),o=Vue.computed(()=>e.menuKey),r=Vue.computed(()=>{const{getRootPath:l}=ne();return e.menuTagOptions.map((i,u,d)=>(i.key===o.value&&i.key!==l.value?i.closeable=!0:i.closeable=!1,i.key===l.value&&(i.closeable=!1),d.length<=1&&(i.closeable=!1),i))}),a=Vue.computed(()=>e.currentMenuOption),s=Vue.computed(()=>e.collapsed);return{getMenuOptions:t,getBreadcrumbOptions:n,getMenuKey:o,getMenuTagOptions:r,getCurrentMenuOption:a,getCollapsed:s}},ue=()=>{const{changeMenuModelValue:e,collapsedMenu:t,spliceMenTagOptions:n,setMenuTagOptions:o,resolveOption:r,updateMenuState:a}=Et();return{changeMenuModelValue:e,collapsedMenu:t,spliceMenTagOptions:n,setMenuTagOptions:o,resolveOption:r,updateMenuState:a}},D=()=>{const e=Ot(),t=Vue.computed(()=>e.drawerPlacement),n=Vue.computed(()=>e.primaryColorOverride),o=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),d=Vue.computed(()=>e.watermarkSwitch),h=Vue.computed(()=>e.watermarkConfig),f=Vue.computed(()=>e.appRootRoute),m=Vue.computed(()=>e.sideBarLogo);return{getDrawerPlacement:t,getPrimaryColorOverride:n,getAppTheme:o,getMenuTagSwitch:r,getBreadcrumbSwitch:a,getLocaleLanguage:s,getLockScreenSwitch:l,getCopyrightSwitch:i,getContentTransition:u,getWatermarkSwitch:d,getWatermarkConfig:h,getAppRootRoute:f,getSideBarLogo:m}},j=()=>{const{updateLocale:e,changePrimaryColor:t,updateSettingState:n}=Ot();return{updateLocale:e,changePrimaryColor:t,updateSettingState:n}},Pa=()=>{const e=zt();return{getSigningCallback:Vue.computed(()=>e.signingCallback)}},Aa=()=>{const{signing:e,logout:t}=zt();return{signing:e,logout:t}},xa=()=>{const e=jt();return{getKeepAliveInclude:Vue.computed(()=>e.keepAliveInclude)}},Ma=()=>{const{setKeepAliveInclude:e,getKeepAliveInclude:t}=jt();return{setKeepAliveInclude:e,getKeepAliveInclude:t}},pl=e=>{const t=Pinia.createPinia();e.use(t),t.use(cn)},Dt=e=>{const{getSigningCallback:t}=Pa(),{role:n}=e;return me!=null&&me.length&&me.includes(t.value.role)||!n||!(n!=null&&n.length)?!0:n?n.includes(t.value.role):!0},La=e=>{const{setupRouterLoadingBar:t,setupRouterGuard:n}=Hn;t&&Yo(e),n&&Go(e)},Ia=Vue.ref(),Ea=Vue.defineComponent({name:"SiderBarLogo",props:{collapsed:{type:Boolean,required:!0}},setup(){const e=VueRouter.useRouter(),{getSideBarLogo:t}=D();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(G(t.value.icon,"Object"))return ee(t.value.icon)}}},render(){const{sideBarLogo:e,collapsed:t,TemplateLogo:n,sideBarLogoClick:o}=this;return e!=null&&e.title?Vue.createVNode("div",{class:["ray-menu__logo",e!=null&&e.url?"ray-menu__logo-url":null],onClick:o.bind(this),ref:Ia},[e!=null&&e.icon?t?Vue.createVNode(naive.NTooltip,{placement:"right"},{trigger:()=>n({cursor:"pointer"}),default:()=>e.title}):n({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}}),za=Vue.defineComponent({name:"AppMenu",setup(){const e=Vue.ref(null),{changeMenuModelValue:t,collapsedMenu:n,updateMenuState:o}=ue(),{getMenuOptions:r,getCollapsed:a,getMenuKey:s}=J(),l=Vue.computed({get:()=>(Vue.nextTick().then(()=>{d()}),s.value),set:()=>{i.value&&q("globalDrawerValue",!1)}}),{isTabletOrSmaller:i}=Ce({observer:f=>{f&&o("collapsed",!1)}}),u=Vue.computed({get:()=>we("globalDrawerValue").value,set:f=>{q("globalDrawerValue",f)}}),d=()=>{const f=l.value;f!=null&&Vue.nextTick(()=>{var m,p;return(p=(m=e.value)==null?void 0:m.showOption)==null?void 0:p.call(m,f)})};return{isTabletOrSmaller:i,BasicMenu:()=>Vue.createVNode(naive.NLayoutSider,{class:"app-menu__sider",showTrigger:!i.value,collapseMode:X.menuCollapsedMode,collapsedWidth:X.menuCollapsedWidth,onUpdateCollapsed:n.bind(this),nativeScrollbar:!1,ref:Ct,collapsed:a.value,onExpand:()=>{o("collapsed",!1)},onCollapse:()=>{o("collapsed",!0)}},{default:()=>[Vue.createVNode(Ea,{collapsed:a.value},null),Vue.createVNode(naive.NMenu,{ref:e,class:"r-menu--app",keyField:"fullPath",value:l.value,"onUpdate:value":f=>l.value=f,options:r.value,indent:X.menuCollapsedIndent,collapsed:a.value,collapsedIconSize:X.menuCollapsedIconSize,collapsedWidth:X.menuCollapsedWidth,onUpdateValue:(f,m)=>{t(f,m)},accordion:X.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":n=>this.modelGlobalDrawerValue=n,placement:"left",displayDirective:"show",autoFocus:!1},{default:()=>[Vue.createVNode(t,null,null)]}):Vue.createVNode(t,null,null)}});class ja{constructor(){Xe(this,"pendingRequest");this.pendingRequest=new Map}isAppending(t){var n;return((n=t.cancelConfig)==null?void 0:n.cancel)??!0}generateRequestKey(t){const{method:n,url:o}=t;return[o||"",n||"",JSON.stringify(t.params),JSON.stringify(t.data)].join("&")}addPendingRequest(t){var n;if(this.isAppending(t)){t.__CANCELER_TAG_RAY_TEMPLATE__="__CANCELER_TAG_RAY_TEMPLATE__";const o=this.generateRequestKey(t);if(this.pendingRequest.has(o))t.signal=(n=this.pendingRequest.get(o))==null?void 0:n.signal;else{const r=new AbortController;t.signal=r.signal,this.pendingRequest.set(o,r)}}}removePendingRequest(t){const n=this.generateRequestKey(t);this.pendingRequest.has(n)&&(this.pendingRequest.get(n).abort(),this.pendingRequest.delete(n))}cancelAllRequest(){this.pendingRequest.forEach(t=>{t.abort()})}}const Ae={requestInstance:null,responseInstance:null},xe={implementRequestInterceptorArray:[],implementResponseInterceptorArray:[]},fe={implementRequestInterceptorErrorArray:[],implementResponseInterceptorErrorArray:[]},Da=new ja,ml=()=>{const e=(l,i)=>{i==="requestInstance"?Ae.requestInstance=l:Ae.responseInstance=l},t=l=>Ae[l],n=(l,i,u)=>{u==="ok"?xe[l]=i:fe[l]=i},o=(l,i)=>i==="ok"?xe[l]:fe[l],r=(l,...i)=>{Array.isArray(l)&&l.forEach(u=>{typeof u=="function"&&u(...i)})};return{createAxiosInstance:e,setImplement:n,getImplement:o,getAxiosInstance:t,beforeFetch:(l,i,u)=>{const d=u==="ok"?xe[i]:fe[i],h=t(l),{MODE:f}=De();h&&r(d,h,f)},fetchError:(l,i,u)=>{const d=fe[u],{MODE:h}=De();r(d,i,h)}}},Fa=Vue.defineComponent({name:"AppRequestCancelerProvider",setup(e,{expose:t}){VueRouter.onBeforeRouteUpdate(()=>{Da.cancelAllRequest()}),t()},render(){return Vue.createVNode("div",{class:"app-style-provider"},null)}}),Ft=Vue.defineComponent({name:"LayoutContentWrapper",setup(){VueRouter.useRouter();const{maximize:e}=Bt(),{getContentTransition:t}=D(),n=Vue.ref(!1),o={opacitySpinning:"0"},{globalMainLayoutLoad:r,layoutContentMaximize:a,layoutContentSpinning:s}=Xn();return{globalMainLayoutLoad:r,spinning:n,themeOverridesSpin:o,getContentTransition:t,layoutContentMaximize:a,maximize:e,layoutContentSpinning:s}},render(){const{globalMainLayoutLoad:e,layoutContentMaximize:t,layoutContentSpinning:n,maximize:o,spinning:r,themeOverridesSpin:a,getContentTransition:s}=this;return Vue.createVNode(naive.NSpin,{show:r||!e||n,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:()=>{o(!1)}},[Vue.createVNode(N,{name:"out",size:"16",cursor:"pointer"},null)]):null,Vue.createVNode(Fa,null,null),e?Vue.createVNode(va,{class:"content-wrapper",transitionPropName:s+"-transform"},null):null]})}}),Ba=Object.freeze(Object.defineProperty({__proto__:null,default:Ft},Symbol.toStringTag,{value:"Module"}));var $a={pkg:{dependencies:{"@vueuse/core":"^10.9.0",axios:"^1.7.5",clipboard:"^2.0.11","currency.js":"^2.0.4",dayjs:"^1.11.10",echarts:"^5.5.0","html-to-image":"1.11.11",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":"^4.0.1","print-js":"^1.6.0",vue:"^3.5.8","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.8.1","@commitlint/config-conventional":"^17.8.1","@interactjs/types":"1.10.21","@intlify/unplugin-vue-i18n":"^4.0.0","@types/crypto-js":"^4.2.2","@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.21.0","@typescript-eslint/parser":"^6.21.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.16",depcheck:"^1.4.7",eslint:"^8.57.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.2.0",postcss:"^8.4.38","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.18.2","unplugin-vue-components":"^0.27.4",vite:"^5.4.3","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.13"},name:"ray-template",version:"4.9.6"},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 Ka=Vue.defineComponent({name:"LayoutFooterWrapper",setup(){const{layout:{copyright:e}}=$a;return{copyright:e}},render(){return this.copyright?Vue.createVNode("div",{class:"layout-footer-wrapper"},[this.copyright]):""}}),Ua=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 n=r=>{t("click",r)};return{iconClick:n,Icon:()=>Vue.createVNode(N,{name:e.iconName,size:"18",customClassName:`tooltip-text__icon ${e.customClassName}`,cursor:"pointer",onClick:n.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)}}),Wa=Vue.defineComponent({name:"ThemeSwitch",setup(){const{darkTheme:e,lightTheme:t}=Nr(),{getAppTheme:n}=D(),o=Vue.ref(n.value);return{darkTheme:e,lightTheme:t,getAppTheme:n,railStyle:({checked:a})=>a?{backgroundColor:"#000000"}:{color:"#000000"},modelAppThemeRef:o}},render(){const{$t:e,darkTheme:t,lightTheme:n,railStyle:o}=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:o.bind(this),onUpdateValue:r=>r?t():n()},{"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 ge(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const qa=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:n,updateSettingState:o}=j(),{getAppTheme:r,getPrimaryColorOverride:a,getMenuTagSwitch:s,getBreadcrumbSwitch:l,getCopyrightSwitch:i,getContentTransition:u,getWatermarkSwitch:d}=D(),h=Vue.computed({get:()=>e.show,set:m=>{t("update:show",m)}}),f=Vue.computed({get:()=>({getMenuTagSwitch:s.value,getBreadcrumbSwitch:l.value,getCopyrightSwitch:i.value,getContentTransition:u.value,getWatermarkSwitch:d.value}),set:m=>{}});return{modelShow:h,changePrimaryColor:n,getAppTheme:r,getPrimaryColorOverride:a,updateSettingState:o,modelSwitchReactive:f}},render(){let e,t,n,o;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"},ge(e=r("headerSettingOptions.ThemeOptions.Title"))?e:{default:()=>[e]}),Vue.createVNode(Wa,null,null),Vue.createVNode(naive.NDivider,{titlePlacement:"center"},ge(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"},ge(n=r("headerSettingOptions.ContentTransition"))?n:{default:()=>[n]}),Vue.createVNode(naive.NSelect,{value:this.modelSwitchReactive.getContentTransition,"onUpdate:value":l=>this.modelSwitchReactive.getContentTransition=l,options:Kn,onUpdateValue:l=>{s("contentTransition",l)}},null),Vue.createVNode(naive.NDivider,{titlePlacement:"center"},ge(o=r("headerSettingOptions.InterfaceDisplay"))?o:{default:()=>[o]}),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 Ga(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Ha=Vue.defineComponent({name:"SiderBarBreadcrumb",setup(){const{changeMenuModelValue:e}=ue(),{getBreadcrumbOptions:t}=J(),{isTabletOrSmaller:n}=Ce();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:n}},render(){let e;const{isTabletOrSmaller:t,getBreadcrumbOptions:n}=this,{dropdownSelect:o,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},Ga(e=n.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:o.bind(this)},{default:()=>Vue.createVNode("span",null,[a.label&&typeof a.label=="function"?a.label():a.breadcrumbLabel])})]}})))?e:{default:()=>[e]})]})}});function Me(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const Ya=Vue.defineComponent({name:"GlobalSearch",props:{show:{type:Boolean,default:!1}},emits:["update:show"],setup(e,{emit:t}){const{changeMenuModelValue:n,resolveOption:o}=ue(),{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:d}=Ce(),h=Vue.ref(!1),f="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)},g=V=>{if(V)h.value=!0;else{h.value=!1,s.searchOptions=[];return}const C=r().reduce((k,S)=>{var F;const P=ae(S,["children","meta","path","name"]),x=o({...P,fullPath:S.path}),{breadcrumbLabel:E}=x;return(F=E==null?void 0:E.toLocaleLowerCase())!=null&&F.includes(V.toLocaleLowerCase())&&Nt(x)&&k.push(x),k},[]);setTimeout(()=>{s.searchOptions=C,Vue.nextTick().then(()=>{y()}),h.value=!1},500)},v=V=>{if(V){const{meta:C}=V;C.windowOpen?window.open(C.windowOpen):(a.value=!1,n(V.fullPath,V),setTimeout(an,300))}},y=()=>{const V=s.searchOptions[i],C=s.searchOptions[u];V&&Vue.nextTick().then(()=>{const k=be(`attr:data_path="${V.path}"`),S=C?be(`attr:data_path="${C==null?void 0:C.path}"`):null;if(S!=null&&S.length){const[P]=S;rn(P,f)}if(k!=null&&k.length){const[P]=k;vt(P,f)}})},c=V=>{const{icon:C}=V;return typeof C=="string"?Vue.createVNode(N,{name:C,size:"24"},null):typeof C=="function"?()=>C:Vue.createVNode(N,{name:"search",size:"24"},null)},b=V=>{V==="up"&&(i-=1,i<0&&(i=s.searchOptions.length-1)),V==="down"&&(i+=1,i>=s.searchOptions.length&&(i=0))},_=V=>{const C=V.key;switch((C==="ArrowUp"||C==="ArrowDown"||C==="Enter")&&(V.preventDefault(),V.stopPropagation()),u=i<=0?0:i,C){case"ArrowUp":b("up");break;case"ArrowDown":b("down");break;case"Enter":const k=s.searchOptions[i];k&&v(k);break}y()},O=({menuOption:V})=>Vue.createVNode(naive.NFlex,Vue.mergeProps({align:"center",class:"content-item"},{onClick:v.bind(this,V),data_path:V.path}),{default:()=>[Vue.createVNode("div",{class:"content-item-icon"},[c(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(()=>{d.value&&(a.value=!1)}),re(window,"keydown",V=>{p(V),_(V)},!0),{...Vue.toRefs(s),modelShow:a,helperTipOptions:l,fuzzySearchMenuOptions:Ke(g,300),searchItemClick:v,RenderPreIcon:c,isTabletOrSmaller:d,SearchItem:O,loading:h}},render(){const{isTabletOrSmaller:e,searchOptions:t,loading:n}=this,{SearchItem:o,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:n},{default:()=>[t.length?Vue.createVNode(naive.NFlex,{vertical:!0,size:[0,6],class:"global-search__card-content"},Me(a=t.map((s,l)=>Vue.createVNode(o,{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]},Me(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"},Me(l)?l:{default:()=>[l]})),Vue.createVNode(naive.NFlex,{class:"item-label",align:"center"},{default:()=>[s.label]})]})))?a:{default:()=>[a]})}})])])]})}}),Xa=Vue.defineComponent({name:"GlobalSearchButton",props:{onClick:{type:[Function,Array],default:null}},setup(e){return{getShortcutKeyAboutSystem:()=>{const o=ln();return o==="MacOS"?"⌘ + K":"CTRL + K"},click:o=>{const{onClick:r}=e;r&&A(r,o)}}},render(){const{getShortcutKeyAboutSystem:e,click:t,$t:n}=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:()=>[n("headerTooltip.Search"),Vue.createVNode("div",{class:"global-search-btn__label"},[e()])]})})}}),Ja=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:le(I.signing,"localStorage")}},render(){const{signing:e,avatarSize:t,spaceSize:n,$props:o,vertical:r}=this;return Vue.createVNode(naive.NButton,{quaternary:!0,strong:!0},{default:()=>[Vue.createVNode(naive.NFlex,{align:"center",size:n,vertical:r},{default:()=>[Vue.createVNode(naive.NAvatar,Vue.mergeProps(o,{src:e==null?void 0:e.avatar,objectFit:"cover",round:!0,size:t}),null),e==null?void 0:e.name]})]})}}),Za=()=>[{key:"person",label:"个人信息"},{key:"lockScreen",label:"锁定屏幕"},{type:"divider",key:"d1"},{key:"logout",label:"退出登陆"}],Qa={logout:()=>{const{logout:e}=Aa();window.$dialog.warning({title:"提示",content:"您确定要退出登录吗",positiveText:"确定",negativeText:"不确定",onPositiveClick:()=>{e()}})},lockScreen:()=>{const{updateSettingState:e}=j();e("lockScreenSwitch",!0)}},er=e=>{const t=Qa[e];t?t():window.$message.info("这个人很懒, 没做这个功能~")},tr=e=>{const{isTabletOrSmaller:t}=e,n=[],o=[{name:"menu",size:18,eventKey:"menu"}];return t.value?o:n},nr=e=>{const{isTabletOrSmaller:t}=e,n=[{name:"fullscreen",size:18,eventKey:"screen"},{name:"github",size:18,eventKey:"github"},{name:"setting",size:18,eventKey:"setting"}],o=[...n],r=[...n];return t.value?r:o},or=Vue.defineComponent({name:"AppSiderBar",setup(){const{updateLocale:e,updateSettingState:t}=j(),{t:n}=se(),[o,{toggleFullscreen:r,isEnabled:a}]=ht(document.getElementsByTagName("html")[0]),{getDrawerPlacement:s,getBreadcrumbSwitch:l}=D(),i=Vue.ref(!1),u=Vue.ref(!1),{isTabletOrSmaller:d}=Ce(),h=we("globalDrawerValue"),f=Vue.computed(()=>tr({isFullscreen:o,isTabletOrSmaller:d})),m=Vue.computed(()=>nr({isFullscreen:o,isTabletOrSmaller:d})),p={search:()=>{u.value=!0},setting:()=>{i.value=!0},github:()=>{window.open("https://github.com/XiaoDaiGua-Ray/ray-template")},fullscreen:()=>{a||window.$message.warning(n("globalMessage.isEnabledFullscreen")),r()},lock:()=>{t("lockScreenSwitch",!0)},menu:()=>{q("globalDrawerValue",!h.value)}};return{leftIconOptions:f,rightTooltipIconOptions:m,toolIconClick:y=>{var c;(c=p[y])==null||c.call(p)},showSettings:i,updateLocale:e,getDrawerPlacement:s,getBreadcrumbSwitch:l,globalSearchShown:u,isRenderVNode:y=>d.value?null:y}},render(){const{rightTooltipIconOptions:e,leftIconOptions:t,getDrawerPlacement:n,getBreadcrumbSwitch:o}=this,{toolIconClick:r,updateLocale:a,isRenderVNode:s}=this;return Vue.createVNode(naive.NLayoutHeader,{class:"layout-header"},{default:()=>[Vue.createVNode(Ya,{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(Ua,{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)),o?Vue.createVNode(Ha,null,null):null]}),Vue.createVNode(naive.NFlex,{justify:"end",align:"center",size:[4,0],wrap:!1},{default:()=>[s(Vue.createVNode(Xa,{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:wt,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:Za(),onSelect:er.bind(this),trigger:"click"},{default:()=>[Vue.createVNode(Ja,{avatarSize:24,spaceSize:[8,0],class:"override-button__layout"},null)]})]})]}),Vue.createVNode(qa,{show:this.showSettings,"onUpdate:show":l=>this.showSettings=l,placement:n},null)]})}}),ar=Vue.defineComponent({name:"LayoutHeaderWrapper",setup(){return{}},render(){return Vue.createVNode(naive.NFlex,{size:[0,0]},{default:()=>[Vue.createVNode(or,null,null)]})}}),rr={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-hidden":"true",viewBox:"0 0 24 24"},lr=_t('<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),sr=[lr];function ir(e,t){return bt(),Vt("svg",rr,[...sr])}const ur={render:ir},cr={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em","aria-hidden":"true",viewBox:"0 0 24 24"},dr=_t('<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),pr=[dr];function mr(e,t){return bt(),Vt("svg",cr,[...pr])}const hr={render:mr};function fr(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!Vue.isVNode(e)}const gr=Vue.defineComponent({name:"AppMenuTag",setup(e,{expose:t}){const n=Vue.ref(null),{getMenuKey:o,getMenuTagOptions:r}=J(),{changeMenuModelValue:a}=ue(),{getRootPath:s}=ne(),{maximize:l}=Bt(),{reload:i}=Tr(),{close:u,closeAll:d,closeRight:h,closeLeft:f,closeOther:m,checkCloseLeft:p,checkCloseRight:g}=$t(),v=["closeAll","closeRight","closeLeft","closeOther","closeCurrentPage"];let y=1/0;const c={size:16},b=Vue.ref([{label:"刷新页面",key:"reloadCurrentPage",icon:()=>Vue.createVNode(N,{name:"reload",size:c.size},null)},{label:"关闭当前页面",key:"closeCurrentPage",icon:()=>Vue.createVNode(N,{name:"close",size:c.size},null)},{type:"divider",key:"d1"},{label:"关闭左侧标签页",key:"closeLeft",icon:()=>Vue.createVNode(hr,{class:"menu-tag__icon"},null)},{label:"关闭右侧标签页",key:"closeRight",icon:()=>Vue.createVNode(ur,{class:"menu-tag__icon"},null)},{type:"divider",key:"d1"},{label:"关闭其他标签页",key:"closeOther",icon:()=>Vue.createVNode(N,{name:"other",size:c.size},null)},{label:"关闭所有标签页",key:"closeAll",icon:()=>Vue.createVNode(N,{name:"resize_h",size:c.size},null),disabled:!1}]),_=Ve(16),O={closeCurrentPage:()=>{o.value!==s.value&&u(y)},reloadCurrentPage:()=>{i()},closeAll:()=>{d()},closeRight:()=>{h(y)},closeLeft:()=>{f(y)},closeOther:()=>{m(y)}},V=Vue.reactive({x:0,y:0,actionDropdownShow:!1}),C="menu_tag_data",k=we("globalMainLayoutLoad"),S="n-scrollbar-container",P=w=>{u(w)},x=(w,T)=>{b.value.forEach(z=>{if(z.key===w){z.disabled=T;return}})},E=w=>{V.actionDropdownShow=!1,a(w.fullPath,w)},F=()=>{const w=document.getElementById(_);if(w)return Array.from(w.childNodes).find(pe=>sn(pe,S).value)},H=w=>{var z;const T=F();if(T){const pe=T.scrollLeft||0,Ye=w==="left"?Math.max(0,pe-200):pe+200;(z=n.value)==null||z.scrollTo({left:Ye,behavior:"smooth"})}},ce=w=>{V.actionDropdownShow=!1;const T=O[w];T&&T()},de=(w,T)=>{T.preventDefault(),V.actionDropdownShow=!1,y=w,Vue.nextTick(()=>{V.actionDropdownShow=!0,V.x=T.clientX,V.y=T.clientY})},B=()=>{const{closeable:w}=r.value[y]??{};x("closeCurrentPage",!w),g(y)?x("closeRight",!1):x("closeRight",!0),p(y)?x("closeLeft",!1):x("closeLeft",!0)},Ut=()=>{y=r.value.findIndex(T=>T.fullPath===o.value),B()},Wt=w=>{r.value.length>1&&w.fullPath!==s.value&&(w.closeable=!0)},qt=w=>{w.fullPath!==o.value&&(w.closeable=!1)},Gt=()=>{F()&&Vue.nextTick().then(()=>{var T;(T=n.value)==null||T.scrollTo({left:99999,behavior:"smooth"})})},He=()=>{Vue.nextTick().then(()=>{const w=be(`attr:${C}="${o.value}"`);if(w!=null&&w.length){const[T]=w;Vue.nextTick().then(()=>{var z;(z=n.value)==null||z.scrollTo({left:T.offsetLeft,behavior:"smooth"})})}})};return Vue.watch(()=>r.value,(w,T)=>{b.value.forEach(z=>{v.includes(z.key)&&(w.length>1?z.disabled=!1:z.disabled=!0)}),T!=null&&T.length&&(w.length>(T==null?void 0:T.length)?Gt():w.length===(T==null?void 0:T.length)&&He()),T===void 0&&He()},{immediate:!0}),Vue.watch(()=>V.actionDropdownShow,w=>{var T;w&&((T=Ke(B,100))==null||T())}),t({}),{getMenuTagOptions:r,closeCurrentMenuTag:P,getMenuKey:o,menuTagClick:E,moreOptions:b,scrollX:H,scrollRef:n,uuidScrollBar:_,actionDropdownSelect:ce,actionState:V,menuTagContextMenu:de,setCurrentContextmenuIndex:Ut,menuTagMouseenter:Wt,menuTagMouseleave:qt,MENU_TAG_DATA:C,iconConfig:{width:22,height:22},maximize:l,getRootPath:s,reload:i,globalMainLayoutLoad:k}},render(){let e;const{iconConfig:t,getRootPath:n,uuidScrollBar:o,getMenuTagOptions:r,MENU_TAG_DATA:a,globalMainLayoutLoad:s}=this,{maximize:l,closeCurrentMenuTag:i,scrollX:u,$t:d,menuTagClick:h,menuTagContextMenu:f,menuTagMouseenter:m,menuTagMouseleave:p,actionDropdownSelect:g,reload:v}=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:g.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:o},{themeOverrides:{width:"0px",height:"0px"}}),{default:()=>[Vue.createVNode(naive.NFlex,{ref:"menuTagSpaceRef",class:"menu-tag-wrapper",wrap:!1,align:"center",justify:"start"},fr(e=r.map((y,c)=>Vue.createVNode(naive.NButton,Vue.mergeProps({key:y.fullPath,class:["menu-tag__btn"],strong:!0,secondary:!0,type:y.fullPath===this.getMenuKey?"primary":"default"},{onClick:h.bind(this,y),onContextmenu:f.bind(this,c),onMouseenter:m.bind(this,y),onMouseleave:p.bind(this,y),[a]:y.path},{size:"small"}),{default:()=>Vue.createVNode(Vue.Fragment,null,[Vue.createVNode("span",null,{default:()=>{const{breadcrumbLabel:b,meta:{i18nKey:_}}=y;return _?d(_):b}}),(y.closeable||r.length===1)&&y.fullPath!==n?Vue.createVNode(naive.NIcon,Vue.mergeProps({class:"menu-tag__btn-icon"},{onMousedown:i.bind(this,c)}),{default:()=>[Vue.createVNode(N,{name:"close",size:"14"},null)]}):Vue.createVNode(naive.NIcon,{class:[y.fullPath!==n?"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:()=>{v()}},null),Vue.createVNode(Pt,{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)]})]})]})])]})}}),vr=Vue.defineComponent({name:"LayoutFeatureWrapper",setup(){return{}},render(){return Vue.createVNode(gr,null,null)}}),yr=e=>{const t=Ne(e[0]),n=Ne(e[1]),o=Ne(e[2]);return Vue.computed(()=>({"--layout-content-height":`calc(100% - ${t.height.value}px - ${n.height.value}px - ${o.height.value}px)`,"--layout-siderbar-height":`${t.height.value}px`,"--layout-menutag-height":`${n.height.value}px`,"--layout-footer-height":`${o.height.value}px`}))},lt=Qt(I.isAppLockScreen,!1,sessionStorage,{mergeDefaults:!0}),Vr=()=>({setLockAppScreen:n=>{lt.value=n},getLockAppScreen:()=>lt.value}),br=Vue.defineComponent({name:"RLayout",setup(){const e=Vue.ref(),t=Vue.ref(),n=Vue.ref(),{getMenuTagSwitch:o,getCopyrightSwitch:r}=D(),{getLockAppScreen:a}=Vr(),s=yr([e,t,n]);return{getMenuTagSwitch:o,cssVarsRef:s,getLockAppScreen:a,layoutSiderBarRef:e,layoutMenuTagRef:t,layoutFooterRef:n,getCopyrightSwitch:r}},render(){const{getMenuTagSwitch:e,cssVarsRef:t,getCopyrightSwitch:n}=this,{getLockAppScreen:o}=this;return o()?null:Vue.createVNode(naive.NLayout,{class:"r-layout-full",style:[t],hasSider:!0,embedded:!0},{default:()=>[Vue.createVNode(za,null,null),Vue.createVNode(naive.NLayoutContent,{class:"r-layout-full__viewer"},{default:()=>[Vue.createVNode(ar,{ref:"layoutSiderBarRef"},null),e?Vue.createVNode(vr,{ref:"layoutMenuTagRef"},null):null,Vue.createVNode(naive.NLayoutContent,{ref:Q,class:["r-layout-full__viewer-content"],nativeScrollbar:!1},{default:()=>[Vue.createVNode(Ft,null,null)]}),n?Vue.createVNode(Ka,{ref:"layoutFooterRef"},null):null]})]})}}),_r=[{path:"/",name:"RLogin",component:()=>R(()=>import("./index-Cup_x5h6.js"),__vite__mapDeps([56,1,2,3,4,5,6,11,7,8,41,42,43,9,10,25,12,13,14,15,16,17,18,19,20,21,22,57]))},{path:"/",name:"RLayout",component:br,children:[...ka(),{path:"/:catchAll(.*)",component:()=>R(()=>import("./index-yq-aMZnM.js"),__vite__mapDeps([58,1,2,3,4,5,6,11,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,59])),meta:{i18nKey:M("menu.Error"),icon:"error",hidden:!0,sameLevel:!0}}]}],Se=VueRouter.createRouter({history:VueRouter.createWebHashHistory(),routes:_r,scrollBehavior:e=>{Ho(e)}}),hl=e=>{e.use(Se),La(Se)},Ge=()=>Se?{router:Se}:{router:{}},st="YYYY-MM-DD HH:mm:ss",Sr=()=>({locale:s=>{const l=qn[s];l?dayjs.locale(l):dayjs.locale(Gn)},getStartAndEndOfDay:s=>{const{format:l=st}=s??{},i=dayjs(),u=i.startOf("day"),d=i.endOf("day"),h=i.format(l),f=u.format(l),m=d.format(l);return{today:i,startOfDay:u,endOfDay:d,formatToday:h,formatStartOfDay:f,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,d=dayjs(s);return d.isAfter(i)&&d.isBefore(u)}});function Ce(e){const{width:t,height:n}=mt(e),o=Vue.ref(!1),{observer:r}=e??{};return un(()=>{const{media:s=768}=e??{};o.value=t.value<=s,r==null||r(o.value,{width:t.value,height:n.value})}),{width:t,height:n,isTabletOrSmaller:Vue.readonly(o)}}let Le=999,Ie=!1;const Y="ELEMENT-FULLSCREEN-RAY",{width:it,height:ut}=mt(),ct=document.createElement("style"),wr=(e,t)=>{const{beforeEnter:n,beforeExit:o,enter:r,exit:a,backgroundColor:s,zIndex:l,transition:i="all 0.3s var(--r-bezier)"}=t??{};let u=!1;const d=()=>{const g=W(e);if(!g)return;const{left:v,top:y}=g.getBoundingClientRect(),c=`
[${Y}] {
position: fixed;
width: ${it.value}px !important;
height: ${ut.value}px !important;
transform: translate(-${v}px, -${y}px) !important;
transition: ${i};
z-index: ${G(l,"Null")||G(l,"Undefined")?Le:l} !important;
background-color: ${s??null};
}
`;ct.innerHTML=c,Ie||document.head.appendChild(ct)},h=()=>{const g=W(e);n==null||n(),g&&(g.getAttribute(Y)||g.setAttribute(Y,Y),u||(u=!0,Le+=1),Ie||(d(),Ie=!0),g.style.transition=i,r==null||r())},f=()=>{o==null||o();const g=W(e);g&&g.removeAttribute(Y),a==null||a()},m=()=>{const g=W(e);g&&(g.getAttribute(Y)?f():h())},p=Vue.watch(()=>[it.value,ut.value],d);return qe(()=>{const g=W(e);g&&g.removeAttribute(Y),Le--,p()}),{enter:h,exit:f,toggleFullscreen:m}},Ee={svg:dn,png:pn,jpeg:mn,blob:hn,pixelData:fn,canvas:gn},fl=(e,t)=>{const{beforeCreate:n,created:o,createdError:r,finally:a,imageType:s}=t??{};return{create:i=>new Promise((u,d)=>{var f;const h=W(e);if(n==null||n(h),!h)return r==null||r(),d("useDomToImage: element is undefined.");(f=Ee[i??s??"jpeg"])==null||f.call(Ee,h,t).then(m=>(o==null||o(m,h),u(m))).catch(m=>(r==null||r(m),d(m))).finally(()=>{a==null||a(h)})})}},gl=(e,t)=>({print:()=>{const o=W(e)||e;en({...Ue(t,["printable"]),printable:o})}}),Cr={page:1,pageSize:10,showSizePicker:!0,pageSizes:[10,20,50,100]},vl=(e,t)=>{const n=Vue.ref(e),o=Ue(t,["on-update:page","on-update:page-size","onUpdatePage","onUpdatePageSize","onUpdate:page","onUpdate:page-size"]),r={onUpdatePage:c=>{var b;a.value.page=c,(b=n.value)==null||b.call(n)},onUpdatePageSize:c=>{var b;a.value.pageSize=c,a.value.page=1,(b=n.value)==null||b.call(n)}},a=Vue.ref(Object.assign({},Cr,o,r)),s=a.value.onUpdatePage,l=a.value.onUpdatePageSize,i=()=>a.value.itemCount,u=c=>{a.value.itemCount=c},d=()=>a.value.page,h=c=>{s(c)},f=()=>a.value.pageSize,m=c=>{l(c)},p=()=>a.value,g=e,v=c=>{n.value=c},y=()=>{const{pageSizes:c}=a.value;a.value.page=1,a.value.pageSize=(c==null?void 0:c[0])||10};return qe(()=>{n.value=void 0}),[a,{getItemCount:i,setItemCount:u,getPage:d,setPage:h,getPageSize:f,setPageSize:m,getPagination:p,getCallback:g,setCallback:v,resetPagination:y}]},Bt=()=>({isLayoutContentMaximized:Vue.computed(()=>we("layoutContentMaximize").value),maximize:(n,o)=>{var l;const{scrollToOptions:r}=o??{},a=W(Q),{toggleFullscreen:s}=wr(a,o);q("layoutContentMaximize",n),s(),r&&n&&((l=Q==null?void 0:Q.value)==null||l.scrollTo(r))}}),Tr=()=>({reload:(o=800)=>{q("globalMainLayoutLoad",!1),setTimeout(()=>q("globalMainLayoutLoad",!0),o)},openSpin:()=>{q("layoutContentSpinning",!0)},closeSpin:()=>{q("layoutContentSpinning",!1)}}),yl=()=>({setWatermarkContent:r=>{const{getWatermarkConfig:a}=D(),s=Object.assign(a.value,{content:r}),{updateSettingState:l}=j();l("watermarkConfig",s)},showWatermark:()=>{const{updateSettingState:r}=j();r("watermarkSwitch",!0)},hiddenWatermark:()=>{const{updateSettingState:r}=j();r("watermarkSwitch",!1)},toggleWatermark:()=>{const{getWatermarkSwitch:r}=D(),{updateSettingState:a}=j();a("watermarkSwitch",!r.value)}}),ze=e=>{const{getPrimaryColorOverride:t}=D(),{updateSettingState:n}=j();n("primaryColorOverride",e?Object.assign({},t.value,$.appNaiveUIThemeOverrides.dark,$.appNaiveUIThemeOverridesCommon.dark):Object.assign({},t.value,$.appNaiveUIThemeOverrides.light,$.appNaiveUIThemeOverridesCommon.light))},Nr=()=>{const e=()=>{const{getAppTheme:r}=D(),{t:a}=se();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}=j();r("appTheme",!0),ze(!0)},lightTheme:()=>{const{updateSettingState:r}=j();r("appTheme",!1),ze(!1)},toggleTheme:()=>{const{theme:r}=e(),{updateSettingState:a}=j();a("appTheme",!r),ze(!r)},getAppTheme:e}},Z=(e,t)=>{const{getMenuTagOptions:n}=J();if(typeof e=="number"){if(isNaN(e)){console.warn(`${t}: The ${e} is NaN, expect number.`);return}if(e>n.value.length||e<-1){console.warn(`${t}: The incoming index ${e} did not match the corresponding item.`);return}return{option:n.value[e],index:e}}else if(typeof e=="string"){const o=n.value.findIndex(r=>r.fullPath===e);return o>-1?{option:n.value[o],index:o}:console.warn(`${t}: The incoming key ${e} did not match the corresponding item.`)}else{const{fullPath:o}=e,r=n.value.findIndex(a=>a.fullPath===o);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 $t(){const{getMenuTagOptions:e,getMenuKey:t}=J(),{changeMenuModelValue:n,spliceMenTagOptions:o,setMenuTagOptions:r,resolveOption:a}=ue(),s=()=>e.value.findIndex(p=>p.fullPath===t.value);return{close:p=>{const g=Z(p,"close");if(e.value.length!==1&&g){const{index:v,option:y}=g;if(o(v),y.fullPath===t.value){const c=e.value[v-1];c&&n(c.fullPath,c)}}},closeAll:()=>{o(0,e.value.length);const{getRootPath:p}=ne(),{router:{getRoutes:g}}=Ge(),v=g().find(y=>y.path===p.value);if(v){const y=ae(v,$e),c=a(y);n(c.path,a({...c,fullPath:c.path}))}},closeRight:p=>{const g=Z(p,"closeRight");if(g){const{option:v,index:y}=g,c=e.value.length-y,b=s();o(y+1,c),y<=b&&t.value!==v.fullPath&&n(v.fullPath,v)}},closeLeft:p=>{const g=Z(p,"closeLeft");if(g){const{option:v,index:y}=g,c=s();o(0,y),c<=y&&t.value!==v.fullPath&&n(v.fullPath,v)}},closeOther:p=>{const g=Z(p,"closeOther");if(g){const{option:v}=g;t.value!==v.fullPath?(o(0,e.value.length),n(v.fullPath,v)):r(v,!1)}},getCurrentTagIndex:s,checkCloseRight:p=>{const g=Z(p,"checkCloseRight");if(g){const{index:v}=g,y=e.value.length-1;return!(v>=y)}return!1},checkCloseLeft:p=>{const g=Z(p,"checkCloseRight");if(g){const{index:v}=g,y=e.value.length-1;return v===0?!1:v>0&&y>0}return!1}}}function Vl(){return{navigationTo:(t,n)=>{const{router:{getRoutes:o,push:r,replace:a}}=Ge(),{isPush:s=!0,query:l}=n||{},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}=J();if(t>u.value.length){console.warn(`[navigationTo]: The current ${t} exceeds the maximum number of menus.`);return}const d=u.value[t],h=f=>{if(f.children&&f.children.length>0){const{children:[m]}=f;h(m);return}i(f.fullPath)};h(d)}else if(typeof t=="string"){const u=o().find(d=>d.path===t);u?i(u.path):console.warn(`[navigationTo]: The path "${t}" is not found.`)}else i(t.fullPath)}}}function ne(){const{getAppRootRoute:e}=D(),{updateSettingState:t}=j(),n=e,o=Vue.computed(()=>e.value.path),r=Vue.computed(()=>e.value.name);return{getRootRoute:n,getRootPath:o,getRootName:r,setRootRoute:s=>{t("appRootRoute",Object.assign({},e.value,s))}}}const Or=(e,t)=>{const{show:n,...o}=t;e.meta.extra=Object.assign({},e.meta.extra,{...o,show:n}),e.extra=Mt(e)},dt=(e,t,n)=>{const o=It(e,t);o&&Or(o,n)},je=(e,t,n)=>{const{getMenuOptions:o}=J();if(typeof e=="string")dt(o.value,e,n);else if(G(e,"Object")){const{fullPath:r}=e;dt(o.value,r,n)}else console.warn(`[useBadge ${t}]: target expect string or object.`)};function bl(){return{hidden:o=>{je(o,"hidden",{show:!1})},show:o=>{je(o,"show",{show:!0})},update:(o,r)=>{je(o,"update",r)}}}const _l=()=>{const e=Ct.value,{scrollTo:t}=e||{};if(!t)throw new Error("[useSiderScroll]: LAYOUT_SIDER_REF is not ready yet. please wait component mounted!");return t},Kt=()=>le(I.localeLanguage,"localStorage",{defaultValue:Un}),Sl=()=>{const e=Vue.ref(),t=p=>{p&&(e.value=p)},n=()=>{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:()=>n().clearFilters.call(null),getTableProInstance:n,clearSorter:()=>n().clearSorter.call(null),downloadCsv:p=>n().downloadCsv.call(null,p),filters:p=>n().filters.call(null,p),page:p=>n().page.call(null,p),scrollTo:p=>n().scrollTo(p),sort:(p,g)=>n().sort.call(null,p,g),getTablePagination:()=>n().getTablePagination.call(null),runTableRequest:p=>n().runTableRequest.call(null,p),print:p=>n().print.call(null,p),getCurrentTableRequestParams:p=>n().getCurrentTableRequestParams.call(null,p)}]};export{ml as $,Hr as A,Jr as B,Qr as C,Gn as D,el as E,ul as F,il as G,nl as H,vl as I,tl as J,rl as K,Ct as L,qr as M,al as N,cl as O,Qo as P,ya as Q,ol as R,Ia as S,Wa as T,ie as U,ll as V,Sl as W,sl as X,Sr as Y,Da as Z,R as _,fl as a,Xr as a0,Pt as a1,Bt as a2,Vl as a3,Tr as a4,yl as a5,bl as a6,gl as b,_l as c,Yr as d,D as e,I as f,Wr as g,j as h,Vr as i,Aa as j,Ce as k,Ja as l,we as m,Gr as n,Zr as o,hl as p,ne as q,se as r,pl as s,N as t,Nr as u,wt as v,ke as w,Ge as x,Ur as y,dl as z};