import{z as O,r as u,o as l,c as h,w as g,a as _,P as D,b as P,F as R,d as A,e as T,f as L,K as y,g as k,h as E,i as $,j as x,A as M,l as I}from"./vendor.59e47867.js";const S=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const s of n.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function a(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerpolicy&&(n.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?n.credentials="include":i.crossorigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function o(i){if(i.ep)return;i.ep=!0;const n=a(i);fetch(i.href,n)}};S();var v=(e,t)=>{const a=e.__vccOpts||e;for(const[o,i]of t)a[o]=i;return a};const V={name:"app",components:{},data(){return{locale:O}},methods:{}};function N(e,t,a,o,i,n){const s=u("router-view"),p=u("a-config-provider");return l(),h(p,{locale:i.locale},{default:g(()=>[_(s)]),_:1},8,["locale"])}var C=v(V,[["render",N]]);const j="modulepreload",w={},q="",c=function(t,a){return!a||a.length===0?t():Promise.all(a.map(o=>{if(o=`${q}${o}`,o in w)return;w[o]=!0;const i=o.endsWith(".css"),n=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${n}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":j,i||(s.as="script",s.crossOrigin=""),s.href=o,document.head.appendChild(s),i)return new Promise((p,d)=>{s.addEventListener("load",p),s.addEventListener("error",d)})})).then(()=>t())};const K={name:"PageTableView",components:{PlusOutlined:D},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:a}=this.$route;this.pageList.push({name:e,path:t,fullPath:a});let o=this.getRouteRealPath(this.$route);this.linkList.push(o),this.activePage=o,this.$router.push(this.$route.fullPath)},watch:{$route:function(e,t){let a=this.getRouteRealPath(e);if(this.activePage=a,this.linkList.indexOf(a)<0){this.linkList.push(a);let{name:i,path:n,fullPath:s}=e;this.pageList.push({name:i,path:n,fullPath:s})}let o=this.pageList.find(i=>this.getRouteRealPath(i)===a);o.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(a=>a.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:"/custom/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(a=>this.getRouteRealPath(a)!==e),this.linkList=this.linkList.filter(a=>a!==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))}}},G={class:"page-layout"},U={class:"page-body"};function W(e,t,a,o,i,n){const s=u("a-tab-pane"),p=u("a-tabs"),d=u("router-view");return l(),P("div",G,[_(p,{type:"editable-card","hide-add":"",activeKey:i.activePage,"onUpdate:activeKey":t[0]||(t[0]=r=>i.activePage=r),onTabClick:n.changePage,onEdit:n.editPageTab,style:{padding:"5px 10px 0"}},{default:g(()=>[(l(!0),P(R,null,A(i.pageList,r=>(l(),h(s,{closable:"",tab:n.pageTabNameMap[r.fullPath]||r.name,name:n.getRouteRealPath(r),fullPath:r.fullPath,key:r.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),T("div",U,[_(d,null,{default:g(({Component:r,route:b})=>[(l(),h(y,null,[(l(),h(L(r),{key:b.fullPath}))],1024))]),_:1})])])}var B=v(K,[["render",W]]);const F={name:"PageTableView",components:{},data(){return{pageList:[],linkList:[],activePage:"",multiPage:!0,ignoreParamPath:[],apiRequestIndex:1}},computed:{pageTabNameMap(){return this.$store.state.pageTabNameMap}},created(){let{name:e,path:t,fullPath:a}=this.$route;this.pageList.push({name:e,path:t,fullPath:a});let o=this.getRouteRealPath(this.$route);this.linkList.push(o),this.activePage=o,this.$router.push(this.$route.fullPath)},watch:{$route:function(e,t){let a=this.getRouteRealPath(e);if(this.activePage=a,this.linkList.indexOf(a)<0){this.linkList.push(a);let{name:i,path:n,fullPath:s}=e;this.pageList.push({name:i,path:n,fullPath:s})}let o=this.pageList.find(i=>this.getRouteRealPath(i)===a);o.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(a=>a.fullPath===e);this.activePage=this.getRouteRealPath(t),this.$router.push(t.fullPath)},editPage(e,t){this[t](e)},editPageTab(e,t){this.removePageTab(e)},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(a=>this.getRouteRealPath(a)!==e),this.linkList=this.linkList.filter(a=>a!==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))}}},H={class:"page-layout"},z={class:"page-body"};function J(e,t,a,o,i,n){const s=u("a-tab-pane"),p=u("a-tabs"),d=u("router-view");return l(),P("div",H,[_(p,{type:"editable-card","hide-add":"",activeKey:i.activePage,"onUpdate:activeKey":t[0]||(t[0]=r=>i.activePage=r),onTabClick:n.changePage,onEdit:n.editPageTab,style:{padding:"5px 10px 0"}},{default:g(()=>[(l(!0),P(R,null,A(i.pageList,r=>(l(),h(s,{closable:"",tab:n.pageTabNameMap[r.fullPath]||r.name,name:n.getRouteRealPath(r),fullPath:r.fullPath,key:r.fullPath},null,8,["tab","name","fullPath"]))),128))]),_:1},8,["activeKey","onTabClick","onEdit"]),T("div",z,[_(d,null,{default:g(({Component:r,route:b})=>[(l(),h(y,null,[(l(),h(L(r),{key:b.fullPath}))],1024))]),_:1})])])}var Q=v(F,[["render",J]]);const X={name:"EmptyLayout",components:{},props:[],data(){return{}},methods:{}};function Y(e,t,a,o,i,n){const s=u("router-view");return l(),h(s,null,{default:g(({Component:p,route:d})=>[(l(),h(y,null,[(l(),h(L(p),{key:d.fullPath}))],1024))]),_:1})}var f=v(X,[["render",Y]]);let Z=[{path:"/",name:"\u4E3B\u9875",component:()=>c(()=>import("./GlobalLayout.20bc82e5.js"),["assets/GlobalLayout.20bc82e5.js","assets/custom.46f9da77.js","assets/vendor.59e47867.js","assets/api-logo.82a124fb.js"]),redirect:"/manage",children:[{path:"/doc",name:"\u6587\u6863\u7BA1\u7406",component:B,children:[{path:"/manage",name:"\u6587\u6863\u5730\u5740\u7BA1\u7406",meta:{icon:"FileTextOutlined"},component:()=>c(()=>import("./DocManage.005906c9.js"),["assets/DocManage.005906c9.js","assets/custom.46f9da77.js","assets/vendor.59e47867.js","assets/index.11b9cb38.js","assets/index.e0fd63e3.js","assets/EditGlobalParam.98e2cd91.js"])},{path:"/setting",name:"\u7CFB\u7EDF\u8BBE\u7F6E",meta:{icon:"SettingOutlined"},component:f,children:[{path:"/setting/globalParam",name:"\u5168\u5C40\u53C2\u6570",component:()=>c(()=>import("./GlobalParam.607f1b55.js"),["assets/GlobalParam.607f1b55.js","assets/custom.46f9da77.js","assets/vendor.59e47867.js","assets/EditGlobalParam.98e2cd91.js"])},{path:"/setting/view",name:"\u5C55\u793A\u914D\u7F6E",meta:{hidden:!0},component:()=>c(()=>import("./SettingView.fca8f1f9.js"),["assets/SettingView.fca8f1f9.js","assets/vendor.59e47867.js"])}]},{path:"/swagger",name:"swagger\u6587\u6863",meta:{hidden:!0,icon:"SettingOutlined"},component:f,children:[{path:"/swagger/info",name:"Swagger\u6587\u6863\u4FE1\u606F",component:()=>c(()=>import("./DocInfo.430972b2.js"),["assets/DocInfo.430972b2.js","assets/vendor.59e47867.js","assets/index.e0fd63e3.js"])},{path:"/swagger/view",name:"Swagger\u6587\u6863\u5C55\u793A",component:()=>c(()=>import("./DocView.c036f18e.js"),["assets/DocView.c036f18e.js","assets/vendor.59e47867.js","assets/DocContent.7b72e8d0.js","assets/logUtil.2dfeec32.js","assets/index.e0fd63e3.js","assets/unitConvert.36114cbf.js","assets/index.11b9cb38.js","assets/custom.46f9da77.js"])}]},{path:"/openapi",name:"openApi\u6587\u6863",meta:{hidden:!0,icon:"SettingOutlined"},component:f,children:[{path:"/openapi/info",name:"OpenApi\u6587\u6863\u4FE1\u606F",component:()=>c(()=>import("./DocInfo.f1dd12f0.js"),["assets/DocInfo.f1dd12f0.js","assets/vendor.59e47867.js","assets/index.e0fd63e3.js"])},{path:"/openapi/view",name:"OpenApi\u6587\u6863\u5C55\u793A",component:()=>c(()=>import("./DocView.88273662.js"),["assets/DocView.88273662.js","assets/vendor.59e47867.js","assets/DocContent.b723d095.js","assets/logUtil.2dfeec32.js","assets/index.e0fd63e3.js","assets/unitConvert.36114cbf.js","assets/index.11b9cb38.js","assets/custom.46f9da77.js"])}]},{path:"/custom",name:"API\u8BF7\u6C42",meta:{hidden:!0},component:f,children:[{path:"/custom/request",name:"\u63A5\u53E3\u8BF7\u6C42",component:()=>c(()=>import("./ApiRequest.660b32dd.js"),["assets/ApiRequest.660b32dd.js","assets/vendor.59e47867.js","assets/index.e0fd63e3.js","assets/unitConvert.36114cbf.js","assets/index.11b9cb38.js","assets/custom.46f9da77.js"])}]}]}]},{path:"/share",name:"\u5F00\u653E\u6587\u6863",component:()=>c(()=>import("./GlobalLayout.12c77352.js"),["assets/GlobalLayout.12c77352.js","assets/vendor.59e47867.js","assets/custom.46f9da77.js","assets/api-logo.82a124fb.js"]),children:[{path:"/doc",name:"\u5F00\u653E\u6587\u6863\u7BA1\u7406",component:Q,children:[{path:"/share/home",name:"\u5F00\u653E\u6587\u6863\u4F7F\u7528\u8BF4\u660E",meta:{icon:"FileTextOutlined"},component:()=>c(()=>import("./ShareHome.3c2e5869.js"),["assets/ShareHome.3c2e5869.js","assets/vendor.59e47867.js","assets/index.e0fd63e3.js"])},{path:"/doc",name:"\u5F00\u653E\u6587\u6863\u67E5\u770B",meta:{hidden:!0},component:f,children:[{path:"/share/swagger/view",name:"Swagger\u5F00\u653E\u6587\u6863\u5C55\u793A",component:()=>c(()=>import("./DocView.037bc19e.js"),["assets/DocView.037bc19e.js","assets/vendor.59e47867.js","assets/DocContent.7b72e8d0.js","assets/logUtil.2dfeec32.js","assets/index.e0fd63e3.js"])},{path:"/share/openapi/view",name:"OpenApi\u5F00\u653E\u6587\u6863\u5C55\u793A",component:()=>c(()=>import("./DocView.603067ba.js"),["assets/DocView.603067ba.js","assets/vendor.59e47867.js","assets/DocContent.b723d095.js","assets/logUtil.2dfeec32.js","assets/index.e0fd63e3.js"])}]}]}]}];var ee=k({state(){return{docChangedNum:1,userInfo:{},pageTabNameMap:{},apiDoc:{},globalParam:[],docGlobalParam:[],leftAsideWidth:0,swaggerDoc:{},swaggerDefinitions:{},swaggerUrlMethodMap:{},swaggerMethodStatistic:{},openApiDoc:{},openApiComponents:{},openApiUrlMethodMap:{},openApiMethodStatistic:{},customRequestDoc:{}}},getters:{getDocChangedNum:e=>()=>e.docChangedNum,getLeftAsideWidth:e=>()=>e.leftAsideWidth,getApiDoc:e=>()=>e.apiDoc},mutations:{setUserInfo(e,t){e.userInfo=t},setGlobalParam(e,t){e.globalParam=t},setDocGlobalParam(e,t){e.docGlobalParam=t},setGlobalParamOnChange(e,t,a){a&&a>0?e.apiDoc.id===a&&(e.docGlobalParam=t):e.globalParam=t},setApiDoc(e,t){e.apiDoc=t},addDocChangedNum(e){e.docChangedNum++},setLeftAsideWidth(e,t){e.leftAsideWidth=t},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.openApiComponents=t.components||{}},setOpenApiUrlMethodMap(e,t){e.openApiUrlMethodMap=t},setOpenApiMethodStatistic(e,t){e.openApiMethodStatistic=t},setCustomRequestDoc(e,t){e.customRequestDoc=t},addTableName(e,t){let a=Object.assign({},e.pageTabNameMap);a[t.key]=t.val,e.pageTabNameMap=a}}});const te=E({history:$(),routes:Z}),m=x(C);m.config.productionTip=!1;m.use(M);m.use(te);m.use(ee);m.mount("#app");m.directive("highlight",{updated(e){e.querySelectorAll("pre code").forEach(a=>{I.highlightBlock(a)})}});export{v as _};