mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-24 00:55:35 +08:00
1 line
9.1 KiB
JavaScript
1 line
9.1 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[8,13,16,19],{664:function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"f",(function(){return s})),n.d(e,"b",(function(){return c})),n.d(e,"e",(function(){return p})),n.d(e,"h",(function(){return h})),n.d(e,"i",(function(){return u})),n.d(e,"c",(function(){return f})),n.d(e,"g",(function(){return d}));n(391);const r=/#.*$/,a=/\.(md|html)$/,i=/\/$/,s=/^[a-z]+:/i;function o(t){return decodeURI(t).replace(r,"").replace(a,"")}function l(t){return s.test(t)}function c(t){if(l(t))return t;const e=t.match(r),n=e?e[0]:"",a=o(t);return i.test(a)?t:a+".html"+n}function p(t,e){const n=t.hash,a=function(t){const e=t.match(r);if(e)return e[0]}(e);if(a&&n!==a)return!1;return o(t.path)===o(e)}function h(t,e,n){if(l(e))return{type:"external",path:e};n&&(e=function(t,e,n){const r=t.charAt(0);if("/"===r)return t;if("?"===r||"#"===r)return e+t;const a=e.split("/");n&&a[a.length-1]||a.pop();const i=t.replace(/^\//,"").split("/");for(let t=0;t<i.length;t++){const e=i[t];".."===e?a.pop():"."!==e&&a.push(e)}""!==a[0]&&a.unshift("");return a.join("/")}(e,n));const r=o(e);for(let e=0;e<t.length;e++)if(o(t[e].regularPath)===r)return Object.assign({},t[e],{type:"page",path:c(t[e].path)});return console.error(`[vuepress] No matching page found for sidebar item "${e}"`),{}}function u(t,e,n,r){const{pages:a,themeConfig:i}=n,s=r&&i.locales&&i.locales[r]||i;if("auto"===(t.frontmatter.sidebar||s.sidebar||i.sidebar))return function(t){const e=f(t.headers||[]);return[{type:"group",collapsable:!1,title:t.title,path:null,children:e.map(e=>({type:"auto",title:e.title,basePath:t.path,path:t.path+"#"+e.slug,children:e.children||[]}))}]}(t);const o=s.sidebar||i.sidebar;if(o){const{base:t,config:n}=function(t,e){if(Array.isArray(e))return{base:"/",config:e};for(const r in e)if(0===(n=t,/(\.html|\/)$/.test(n)?n:n+"/").indexOf(encodeURI(r)))return{base:r,config:e[r]};var n;return{}}(e,o);return n?n.map(e=>function t(e,n,r,a=1){if("string"==typeof e)return h(n,e,r);if(Array.isArray(e))return Object.assign(h(n,e[0],r),{title:e[1]});{a>3&&console.error("[vuepress] detected a too deep nested sidebar group.");const i=e.children||[];return 0===i.length&&e.path?Object.assign(h(n,e.path,r),{title:e.title}):{type:"group",path:e.path,title:e.title,sidebarDepth:e.sidebarDepth,children:i.map(e=>t(e,n,r,a+1)),collapsable:!1!==e.collapsable}}}(e,a,t)):[]}return[]}function f(t){let e;return(t=t.map(t=>Object.assign({},t))).forEach(t=>{2===t.level?e=t:e&&(e.children||(e.children=[])).push(t)}),t.filter(t=>2===t.level)}function d(t){return Object.assign(t,{type:t.items&&t.items.length?"links":"link"})}},670:function(t,e,n){},671:function(t,e,n){},672:function(t,e,n){},684:function(t,e,n){"use strict";n(670)},685:function(t,e,n){var r=n(53),a=n(35),i=n(42);t.exports=function(t){return"string"==typeof t||!a(t)&&i(t)&&"[object String]"==r(t)}},686:function(t,e,n){"use strict";n(671)},687:function(t,e,n){"use strict";n(672)},688:function(t,e,n){},692:function(t,e,n){"use strict";n.r(e);var r=n(47),a=n.n(r),i=n(664),s={name:"PageEdit",computed:{lastUpdated(){return this.$page.lastUpdated},lastUpdatedText(){return"string"==typeof this.$themeLocaleConfig.lastUpdated?this.$themeLocaleConfig.lastUpdated:"string"==typeof this.$site.themeConfig.lastUpdated?this.$site.themeConfig.lastUpdated:"Last Updated"},editLink(){const t=a()(this.$page.frontmatter.editLink)?this.$site.themeConfig.editLinks:this.$page.frontmatter.editLink,{repo:e,docsDir:n="",docsBranch:r="master",docsRepo:i=e}=this.$site.themeConfig;return t&&i&&this.$page.relativePath?this.createEditLink(e,i,n,r,this.$page.relativePath):null},editLinkText(){return this.$themeLocaleConfig.editLinkText||this.$site.themeConfig.editLinkText||"Edit this page"}},methods:{createEditLink(t,e,n,r,a){if(/bitbucket.org/.test(t)){return(i.f.test(e)?e:t).replace(i.a,"")+"/src"+`/${r}/`+(n?n.replace(i.a,"")+"/":"")+a+`?mode=edit&spa=0&at=${r}&fileviewer=file-view-default`}return(i.f.test(e)?e:"https://github.com/"+e).replace(i.a,"")+"/edit"+`/${r}/`+(n?n.replace(i.a,"")+"/":"")+a}}},o=(n(684),n(84)),l=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("footer",{staticClass:"page-edit"},[t.editLink?e("div",{staticClass:"edit-link"},[e("a",{attrs:{href:t.editLink,target:"_blank",rel:"noopener noreferrer"}},[t._v(t._s(t.editLinkText))]),t._v(" "),e("OutboundLink")],1):t._e(),t._v(" "),t.lastUpdated?e("div",{staticClass:"last-updated"},[e("span",{staticClass:"prefix"},[t._v(t._s(t.lastUpdatedText)+":")]),t._v(" "),e("span",{staticClass:"time"},[t._v(t._s(t.lastUpdated))])]):t._e()])}),[],!1,null,null,null);e.default=l.exports},693:function(t,e,n){"use strict";n.r(e);n(391);var r=n(664),a=n(685),i=n.n(a),s=n(47),o=n.n(s),l={name:"PageNav",props:["sidebarItems"],computed:{prev(){return p(c.PREV,this)},next(){return p(c.NEXT,this)}}};const c={NEXT:{resolveLink:function(t,e){return h(t,e,1)},getThemeLinkConfig:({nextLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.next},PREV:{resolveLink:function(t,e){return h(t,e,-1)},getThemeLinkConfig:({prevLinks:t})=>t,getPageLinkConfig:({frontmatter:t})=>t.prev}};function p(t,{$themeConfig:e,$page:n,$route:a,$site:s,sidebarItems:l}){const{resolveLink:c,getThemeLinkConfig:p,getPageLinkConfig:h}=t,u=p(e),f=h(n),d=o()(f)?u:f;return!1===d?void 0:i()(d)?Object(r.h)(s.pages,d,a.path):c(n,l)}function h(t,e,n){const r=[];!function t(e,n){for(let r=0,a=e.length;r<a;r++)"group"===e[r].type?t(e[r].children||[],n):n.push(e[r])}(e,r);for(let e=0;e<r.length;e++){const a=r[e];if("page"===a.type&&a.path===decodeURIComponent(t.path))return r[e+n]}}var u=l,f=(n(686),n(84)),d=Object(f.a)(u,(function(){var t=this,e=t._self._c;return t.prev||t.next?e("div",{staticClass:"page-nav"},[e("p",{staticClass:"inner"},[t.prev?e("span",{staticClass:"prev"},["external"===t.prev.type?e("a",{staticClass:"prev",attrs:{href:t.prev.path,target:"_blank",rel:"noopener noreferrer"}},[t._v("\n "+t._s(t.prev.title||t.prev.path)+"\n\n "),e("OutboundLink")],1):e("RouterLink",{staticClass:"prev",attrs:{to:t.prev.path}},[e("a-icon",{attrs:{type:"left"}}),t._v("\n "+t._s(t.prev.title||t.prev.path)+"\n ")],1)],1):t._e(),t._v(" "),t.next?e("span",{staticClass:"next"},["external"===t.next.type?e("a",{attrs:{href:t.next.path,target:"_blank",rel:"noopener noreferrer"}},[t._v("\n "+t._s(t.next.title||t.next.path)+"\n\n "),e("OutboundLink")],1):e("RouterLink",{attrs:{to:t.next.path}},[t._v("\n "+t._s(t.next.title||t.next.path)+"\n "),e("a-icon",{attrs:{type:"right"}})],1)],1):t._e()])]):t._e()}),[],!1,null,null,null);e.default=d.exports},694:function(t,e,n){"use strict";n.r(e);n(392);var r={data:()=>({headersList:[]}),methods:{arrayToTree(t,e){return t.reduce((n,r)=>r.parent===e?(r.items=this.arrayToTree(t,r.id),n.concat(r)):n,[])}},computed:{hasHeaders(){return!!this.headersData},headersData(){return this.$page.headers},pageAnchorConfig(){return this.$page.frontmatter.pageAnchor||this.$themeConfig.pageAnchor||{anchorDepth:2,isDisabled:!1}},isCollapsePageAnchor(){return this.$store.state.global.isCollapsePageAnchor},filterHeadersByLevel2(){const{headers:t}=this.$page;let e;return e=t.filter(t=>2===t.level),e.forEach(t=>{t.items=[]}),e},filterHeadersByLevel(){if(1===this.pageAnchorConfig.anchorDepth)return this.filterHeadersByLevel2;const{headers:t}=this.$page;let e=t;return e.forEach((t,n)=>{t.id=n+1,2===t.level?t.parent=0:0!==n&&(2===e[n-1].level?t.parent=e[n-1].id:3===e[n-1].level&&(t.parent=e[n-1].parent))}),this.arrayToTree(e,0)}}},a=(n(687),n(84)),i=Object(a.a)(r,(function(){var t=this,e=t._self._c;return t.hasHeaders?e("div",{class:["page-anchor",{"collapse-page-anchor":t.isCollapsePageAnchor}]},[e("a-space",{staticStyle:{width:"100%"},attrs:{direction:"vertical",size:"large"}},[e("a-anchor",{staticClass:"page-anchor-offset"},[t._l(t.filterHeadersByLevel,(function(n,r){return[0!==n.items.length?e("a-anchor-link",{key:r,attrs:{href:"#"+n.slug,title:n.title}},[t._l(n.items,(function(n,r){return[3===n.level?e("a-anchor-link",{key:r,attrs:{href:"#"+n.slug,title:n.title}}):t._e()]}))],2):e("a-anchor-link",{key:r,attrs:{href:"#"+n.slug,title:n.title}})]}))],2)],1)],1):t._e()}),[],!1,null,null,null);e.default=i.exports},698:function(t,e,n){"use strict";n(688)},711:function(t,e,n){"use strict";n.r(e);var r=n(692),a=n(693),i=n(694),s={components:{PageEdit:r.default,PageNav:a.default,PageAnchor:i.default},props:["sidebarItems"],computed:{hasPageAnchor(){return this.pageAnchorConfig.isDisabled?(this.$store.state.global.isCollapsePageAnchor=!0,!1):this.$page.headers?(this.$store.state.global.isCollapsePageAnchor=!1,!0):(this.$store.state.global.isCollapsePageAnchor=!0,!1)},pageAnchorConfig(){return this.$page.frontmatter.pageAnchor||this.$themeConfig.pageAnchor||{anchorDepth:2,isDisabled:!1}}}},o=(n(698),n(84)),l=Object(o.a)(s,(function(){var t=this,e=t._self._c;return e("main",{class:["page",{"has-page-anchor":t.hasPageAnchor}]},[t._t("top"),t._v(" "),e("Content",{staticClass:"theme-antdocs-content"}),t._v(" "),e("PageEdit"),t._v(" "),e("PageNav",t._b({},"PageNav",{sidebarItems:t.sidebarItems},!1)),t._v(" "),t.pageAnchorConfig.isDisabled?t._e():e("PageAnchor"),t._v(" "),t._t("bottom")],2)}),[],!1,null,null,null);e.default=l.exports}}]); |