import{z as w,r as h,o as l,c as u,w as m,a as f,b as v,F as D,d as E,e as R,f as b,K as y,g as T,h as O,i as k,j as M,A as $,l as I}from"./vendor.d3f949c4.js";const x=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const r of o.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&n(r)}).observe(document,{childList:!0,subtree:!0});function i(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerpolicy&&(o.referrerPolicy=a.referrerpolicy),a.crossorigin==="use-credentials"?o.credentials="include":a.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function n(a){if(a.ep)return;a.ep=!0;const o=i(a);fetch(a.href,o)}};x();var P=(e,t)=>{for(const[i,n]of t)e[i]=n;return e};const N={name:"app",components:{},data(){return{locale:w}},methods:{}};function S(e,t,i,n,a,o){const r=h("router-view"),p=h("a-config-provider");return l(),u(p,{locale:a.locale},{default:m(()=>[f(r)]),_:1},8,["locale"])}var V=P(N,[["render",S]]);const j="modulepreload",L={},C="",c=function(t,i){return!i||i.length===0?t():Promise.all(i.map(n=>{if(n=`${C}${n}`,n in L)return;L[n]=!0;const a=n.endsWith(".css"),o=a?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${o}`))return;const r=document.createElement("link");if(r.rel=a?"stylesheet":j,a||(r.as="script",r.crossOrigin=""),r.href=n,document.head.appendChild(r),a)return new Promise((p,g)=>{r.addEventListener("load",p),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:i}=this.$route;this.pageList.push({name:e,path:t,fullPath:i});let n=this.getRouteRealPath(this.$route);this.linkList.push(n),this.activePage=n,this.$router.push(this.$route.fullPath)},watch:{$route:function(e,t){let i=this.getRouteRealPath(e);if(this.activePage=i,this.linkList.indexOf(i)<0){this.linkList.push(i);let{name:a,path:o,fullPath:r}=e;this.pageList.push({name:a,path:o,fullPath:r})}let n=this.pageList.find(a=>this.getRouteRealPath(a)===i);n.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(i=>i.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(i=>this.getRouteRealPath(i)!==e),this.linkList=this.linkList.filter(i=>i!==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))}}},U={class:"page-layout"},K={class:"page-body"};function B(e,t,i,n,a,o){const r=h("a-tab-pane"),p=h("a-tabs"),g=h("router-view");return l(),v("div",U,[f(p,{type:"editable-card",activeKey:a.activePage,"onUpdate:activeKey":t[0]||(t[0]=s=>a.activePage=s),onTabClick:o.changePage,onEdit:o.editPageTab,style:{padding:"5px 10px 0"}},{default:m(()=>[(l(!0),v(D,null,E(a.pageList,s=>(l(),u(r,{closable:"",tab:o.pageTabNameMap[s.fullPath]||s.name,name:o.getRouteRealPath(s),fullPath:s.fullPath,key:s.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),R("div",K,[f(g,null,{default:m(({Component:s,route:A})=>[(l(),u(y,null,[(l(),u(b(s),{key:A.fullPath}))],1024))]),_:1})])])}var F=P(q,[["render",B]]);const G={name:"EmptyLayout",components:{},props:[],data(){return{}},methods:{}};function z(e,t,i,n,a,o){const r=h("router-view");return l(),u(r,null,{default:m(({Component:p,route:g})=>[(l(),u(y,null,[(l(),u(b(p),{key:g.fullPath}))],1024))]),_:1})}var _=P(G,[["render",z]]);let H=[{path:"/",name:"\u4E3B\u9875",component:()=>c(()=>import("./GlobalLayout.83e9fcb5.js"),["assets/GlobalLayout.83e9fcb5.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:()=>c(()=>import("./DocManage.3324f0e2.js"),["assets/DocManage.3324f0e2.js","assets/custom.914a01ae.js","assets/vendor.d3f949c4.js"])},{path:"/setting",name:"\u7CFB\u7EDF\u8BBE\u7F6E",meta:{icon:"SettingOutlined"},component:_,children:[{path:"/setting/globalParam",name:"\u5168\u5C40\u53C2\u6570",component:()=>c(()=>import("./GlobalParam.e27e6941.js"),["assets/GlobalParam.e27e6941.js","assets/custom.914a01ae.js","assets/vendor.d3f949c4.js"])},{path:"/setting/view",name:"\u5C55\u793A\u914D\u7F6E",meta:{hidden:!0},component:()=>c(()=>import("./SettingView.59a713ea.js"),["assets/SettingView.59a713ea.js","assets/vendor.d3f949c4.js"])}]},{path:"/swagger",name:"swagger\u6587\u6863",meta:{hidden:!0,icon:"SettingOutlined"},component:_,children:[{path:"/swagger/info",name:"swagger\u6587\u6863\u4FE1\u606F",component:()=>c(()=>import("./DocInfo.145588cb.js"),["assets/DocInfo.145588cb.js","assets/vendor.d3f949c4.js","assets/index.ea6b273d.js"])},{path:"/swagger/view",name:"swagger\u6587\u6863\u5C55\u793A",component:()=>c(()=>import("./DocView.3bc94699.js"),["assets/DocView.3bc94699.js","assets/vendor.d3f949c4.js","assets/logUtil.5b305c4e.js","assets/index.ea6b273d.js","assets/unitConvert.a86860f9.js","assets/custom.914a01ae.js"])}]},{path:"/openapi",name:"openApi\u6587\u6863",meta:{hidden:!0,icon:"SettingOutlined"},component:_,children:[{path:"/openapi/info",name:"openApi\u6587\u6863\u4FE1\u606F",component:()=>c(()=>import("./DocInfo.ca06c12c.js"),["assets/DocInfo.ca06c12c.js","assets/vendor.d3f949c4.js","assets/index.ea6b273d.js"])},{path:"/openapi/view",name:"openApi\u6587\u6863\u5C55\u793A",component:()=>c(()=>import("./DocView.00adc918.js"),["assets/DocView.00adc918.js","assets/vendor.d3f949c4.js","assets/logUtil.5b305c4e.js","assets/index.ea6b273d.js","assets/unitConvert.a86860f9.js","assets/custom.914a01ae.js"])}]},{path:"/api",name:"API\u8BF7\u6C42",meta:{hidden:!0},component:_,children:[{path:"/api/request",name:"\u63A5\u53E3\u8BF7\u6C42",component:()=>c(()=>import("./ApiRequest.dfbf5307.js"),["assets/ApiRequest.dfbf5307.js","assets/vendor.d3f949c4.js","assets/index.ea6b273d.js","assets/unitConvert.a86860f9.js","assets/custom.914a01ae.js"])}]}]}]}];var W=T({state(){return{docChangedNum:1,userInfo:{},pageTabNameMap:{},apiDoc:{},globalParam:[],swaggerDoc:{},swaggerDefinitions:{},swaggerUrlMethodMap:{},swaggerMethodStatistic:{},openApiDoc:{},openApiDefinitions:{},openApiUrlMethodMap:{},openApiMethodStatistic:{}}},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},setSwaggerMethodStatistic(e,t){e.swaggerMethodStatistic=t},setOpenApiDoc(e,t){e.openApiDoc=t,e.openApiDefinitions=t.definitions||{}},setOpenApiUrlMethodMap(e,t){e.openApiUrlMethodMap=t},setOpenApiMethodStatistic(e,t){e.openApiMethodStatistic=t},addTableName(e,t){let i=Object.assign({},e.pageTabNameMap);i[t.key]=t.val,e.pageTabNameMap=i}}});const J=O({history:k(),routes:H}),d=M(V);d.config.productionTip=!1;d.use($);d.use(J);d.use(W);d.mount("#app");d.directive("highlight",{updated(e){e.querySelectorAll("pre code").forEach(i=>{I.highlightBlock(i)})}});export{P as _};