import{z as R,r as p,o as l,c as u,w as m,a as _,b as v,F as T,d as k,e as E,f as b,K as y,g as $,h as D,i as O,j as A,A as x,l as N}from"./vendor.d3f949c4.js";const I=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))i(a);new MutationObserver(a=>{for(const n of a)if(n.type==="childList")for(const r of n.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function o(a){const n={};return a.integrity&&(n.integrity=a.integrity),a.referrerpolicy&&(n.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?n.credentials="include":a.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function i(a){if(a.ep)return;a.ep=!0;const n=o(a);fetch(a.href,n)}};I();var f=(e,t)=>{for(const[o,i]of t)e[o]=i;return e};const M={name:"app",components:{},data(){return{locale:R}},methods:{}};function C(e,t,o,i,a,n){const r=p("router-view"),c=p("a-config-provider");return l(),u(c,{locale:a.locale},{default:m(()=>[_(r)]),_:1},8,["locale"])}var S=f(M,[["render",C]]);const V="modulepreload",L={},j="",h=function(t,o){return!o||o.length===0?t():Promise.all(o.map(i=>{if(i=`${j}${i}`,i in L)return;L[i]=!0;const a=i.endsWith(".css"),n=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${i}"]${n}`))return;const r=document.createElement("link");if(r.rel=a?"stylesheet":V,a||(r.as="script",r.crossOrigin=""),r.href=i,document.head.appendChild(r),a)return new Promise((c,g)=>{r.addEventListener("load",c),r.addEventListener("error",g)})})).then(()=>t())};const q={name:"PageTableView",components:{},data(){return{pageList:[],linkList:[],activePage:"",multiPage:!0,ignoreParamPath:["/data/export"],apiRequestIndex:1}},computed:{pageTabNameMap(){return this.$store.state.pageTabNameMap}},created(){let{name:e,path:t,fullPath:o}=this.$route;this.pageList.push({name:e,path:t,fullPath:o});let i=this.getRouteRealPath(this.$route);this.linkList.push(i),this.activePage=i,this.$router.push(this.$route.fullPath)},watch:{$route:function(e,t){let o=this.getRouteRealPath(e);if(this.activePage=o,this.linkList.indexOf(o)<0){this.linkList.push(o);let{name:a,path:n,fullPath:r}=e;this.pageList.push({name:a,path:n,fullPath:r})}let i=this.pageList.find(a=>this.getRouteRealPath(a)===o);i.fullPath=e.fullPath}},methods:{isIgnoreParamPath(e){return this.ignoreParamPath.indexOf(e)>=0},getRouteRealPath(e){return this.isIgnoreParamPath(e.path)?e.path:e.fullPath},changePage(e){let t=this.pageList.find(o=>o.fullPath===e);this.activePage=this.getRouteRealPath(t),this.$router.push(t.fullPath)},editPage(e,t){this[t](e)},editPageTab(e,t){t==="add"?this.addPageTab():this.removePageTab(e)},addPageTab(){this.$router.push({path:"/api/request",query:{id:this.apiRequestIndex++}})},removePageTab(e){if(this.pageList.length===1){this.$message.warning("\u8FD9\u662F\u6700\u540E\u4E00\u9875\uFF0C\u4E0D\u80FD\u518D\u5173\u95ED\u4E86\u5566");return}this.pageList=this.pageList.filter(o=>this.getRouteRealPath(o)!==e),this.linkList=this.linkList.filter(o=>o!==e);let t=this.linkList.indexOf(this.activePage);t<0&&(t=this.linkList.length-1,this.activePage=this.linkList[t],this.$router.push(this.activePage))}}},K={class:"page-layout"},B={class:"page-body"};function U(e,t,o,i,a,n){const r=p("a-tab-pane"),c=p("a-tabs"),g=p("router-view");return l(),v("div",K,[_(c,{type:"editable-card",activeKey:a.activePage,"onUpdate:activeKey":t[0]||(t[0]=s=>a.activePage=s),onTabClick:n.changePage,onEdit:n.editPageTab,style:{padding:"5px 10px 0"}},{default:m(()=>[(l(!0),v(T,null,k(a.pageList,s=>(l(),u(r,{closable:"",tab:n.pageTabNameMap[s.fullPath]||s.name,name:n.getRouteRealPath(s),fullPath:s.fullPath,key:s.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),E("div",B,[_(g,null,{default:m(({Component:s,route:w})=>[(l(),u(y,null,[(l(),u(b(s),{key:w.fullPath}))],1024))]),_:1})])])}var F=f(q,[["render",U]]);const G={name:"EmptyLayout",components:{},props:[],data(){return{}},methods:{}};function z(e,t,o,i,a,n){const r=p("router-view");return l(),u(r,null,{default:m(({Component:c,route:g})=>[(l(),u(y,null,[(l(),u(b(c),{key:g.fullPath}))],1024))]),_:1})}var P=f(G,[["render",z]]);let H=[{path:"/",name:"\u4E3B\u9875",component:()=>h(()=>import("./GlobalLayout.69c04d63.js"),["assets/GlobalLayout.69c04d63.js","assets/custom.914a01ae.js","assets/vendor.d3f949c4.js"]),redirect:"/manage",children:[{path:"/doc",name:"\u6587\u6863\u7BA1\u7406",component:F,children:[{path:"/manage",name:"\u6587\u6863\u5730\u5740\u7BA1\u7406",meta:{icon:"FileTextOutlined"},component:()=>h(()=>import("./DocManage.d3eb1d20.js"),["assets/DocManage.d3eb1d20.js","assets/custom.914a01ae.js","assets/vendor.d3f949c4.js"])},{path:"/setting",name:"\u7CFB\u7EDF\u8BBE\u7F6E",meta:{icon:"SettingOutlined"},component:P,children:[{path:"/setting/globalParam",name:"\u5168\u5C40\u53C2\u6570",component:()=>h(()=>import("./GlobalParam.0731ddaf.js"),["assets/GlobalParam.0731ddaf.js","assets/custom.914a01ae.js","assets/vendor.d3f949c4.js"])},{path:"/setting/view",name:"\u5C55\u793A\u914D\u7F6E",meta:{hidden:!0},component:()=>h(()=>import("./SettingView.f2678bac.js"),["assets/SettingView.f2678bac.js","assets/vendor.d3f949c4.js"])}]},{path:"/swagger",name:"swagger\u6587\u6863",meta:{hidden:!0,icon:"SettingOutlined"},component:P,children:[{path:"/swagger/info",name:"\u6587\u6863\u4FE1\u606F",component:()=>h(()=>import("./DocInfo.06a44180.js"),["assets/DocInfo.06a44180.js","assets/vendor.d3f949c4.js","assets/index.ea6b273d.js"])},{path:"/swagger/view",name:"\u6587\u6863\u5C55\u793A",component:()=>h(()=>import("./DocView.f7b9ff03.js"),["assets/DocView.f7b9ff03.js","assets/vendor.d3f949c4.js","assets/index.ea6b273d.js","assets/unitConvert.5da9e201.js","assets/custom.914a01ae.js"])}]},{path:"/api",name:"API\u8BF7\u6C42",meta:{hidden:!0},component:P,children:[{path:"/api/request",name:"\u63A5\u53E3\u8BF7\u6C42",component:()=>h(()=>import("./ApiRequest.1ab67d31.js"),["assets/ApiRequest.1ab67d31.js","assets/vendor.d3f949c4.js","assets/index.ea6b273d.js","assets/unitConvert.5da9e201.js","assets/custom.914a01ae.js"])}]}]}]}];var W=$({state(){return{docChangedNum:1,userInfo:{},pageTabNameMap:{},methodStatistic:{},apiDoc:{},globalParam:[],swaggerDoc:{},swaggerDefinitions:{},swaggerUrlMethodMap:{}}},getters:{getDocChangedNum:e=>()=>e.docChangedNum},mutations:{setUserInfo(e,t){e.userInfo=t},setGlobalParam(e,t){e.globalParam=t},setApiDoc(e,t){e.apiDoc=t},addDocChangedNum(e){e.docChangedNum++},setSwaggerDoc(e,t){e.swaggerDoc=t,e.swaggerDefinitions=t.definitions||{}},setSwaggerUrlMethodMap(e,t){e.swaggerUrlMethodMap=t},setMethodStatistic(e,t){e.methodStatistic=t},addTableName(e,t){let o=Object.assign({},e.pageTabNameMap);o[t.key]=t.val,e.pageTabNameMap=o}}});const J=D({history:O(),routes:H}),d=A(S);d.config.productionTip=!1;d.use(x);d.use(J);d.use(W);d.mount("#app");d.directive("highlight",{updated(e){e.querySelectorAll("pre code").forEach(o=>{N.highlightBlock(o)})}});export{f as _};