mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
2 lines
28 KiB
JavaScript
2 lines
28 KiB
JavaScript
!function(e,t){for(var c in t)e[c]=t[c]}(window,function(e){function t(t){for(var a,o,i=t[0],s=t[1],b=t[2],p=0,f=[];p<i.length;p++)o=i[p],Object.prototype.hasOwnProperty.call(n,o)&&n[o]&&f.push(n[o][0]),n[o]=0;for(a in s)Object.prototype.hasOwnProperty.call(s,a)&&(e[a]=s[a]);for(u&&u(t);f.length;)f.shift()();return r.push.apply(r,b||[]),c()}function c(){for(var e,t=0;t<r.length;t++){for(var c=r[t],a=!0,i=1;i<c.length;i++){var s=c[i];0!==n[s]&&(a=!1)}a&&(r.splice(t--,1),e=o(o.s=c[0]))}return e}var a={},n={0:0},r=[];function o(t){if(a[t])return a[t].exports;var c=a[t]={i:t,l:!1,exports:{}};return e[t].call(c.exports,c,c.exports,o),c.l=!0,c.exports}o.m=e,o.c=a,o.d=function(e,t,c){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:c})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(c,a,function(t){return e[t]}.bind(null,a));return c},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="";var i=window.webpackJsonp=window.webpackJsonp||[],s=i.push.bind(i);i.push=t,i=i.slice();for(var b=0;b<i.length;b++)t(i[b]);var u=s;return r.push([49,1]),c()}({49:function(e,t,c){"use strict";c.r(t),c.d(t,"setScrollLock",(function(){return at})),c.d(t,"resetScrollLock",(function(){return nt})),c.d(t,"initialize",(function(){return rt}));c(44);var a=c(39),n=c(6),r=c(54),o=c(55),i=c(74),s=c(72),b=c(50),u=c(52),p=c(57),f=c(34),l=c(67),d=c(58),O=c(73),j=c(64),h=c(63),m=c(40),g=c(27),v=c(41),$=c(36),y=c(51);function w(e,t=document){return t.querySelector(e)||void 0}function x(e,t=document){const c=w(e,t);if(void 0===c)throw new ReferenceError(`Missing element: expected "${e}" to be present`);return c}function E(){return document.activeElement instanceof HTMLElement?document.activeElement:void 0}function k(e,t=document){return Array.from(t.querySelectorAll(e))}function S(e){return document.createElement(e)}function _(e,t){e.replaceWith(t)}var A=c(53);function T(e,t=!0){t?e.focus():e.blur()}function C(e){return{x:e.scrollLeft,y:e.scrollTop}}var R=c(38),M=c(22),L=c(56);const z=new M.a,P=Object(a.a)(()=>Object(r.a)(new R.a(e=>{for(const t of e)z.next(t)}))).pipe(Object(f.a)(e=>Object(u.a)(Object(r.a)(e),o.a).pipe(Object(L.a)(()=>e.disconnect()))),Object(p.a)({bufferSize:1,refCount:!0}));function U(e){return P.pipe(Object(d.a)(t=>t.observe(e)),Object(f.a)(t=>z.pipe(Object(m.a)(({target:t})=>t===e),Object(L.a)(()=>t.unobserve(e)),Object(g.a)(({contentRect:e})=>({width:e.width,height:e.height})))),Object(A.a)(function(e){return{width:e.offsetWidth,height:e.offsetHeight}}(e)))}var H=c(71);var q=c(59);function I(e,t=location){return e.host===t.host&&/^(?:\/[\w-]+)*(?:\/?|\.html)$/i.test(e.pathname)}function N(e,t=location){return e.pathname===t.pathname&&e.hash.length>0}function D(){return new q.a(new URL(location.href))}function Y(){return location.hash.substring(1)}function F(e){const t=S("a");t.href=e,t.addEventListener("click",e=>e.stopPropagation()),t.click()}var J=c(5);function K(e){const t=matchMedia(e);return new J.a(e=>{t.addListener(t=>e.next(t.matches))}).pipe(Object(A.a)(t.matches),Object(p.a)({bufferSize:1,refCount:!0}))}const W={drawer:x("[data-md-toggle=drawer]"),search:x("[data-md-toggle=search]")};function B(e,t){W[e].checked!==t&&W[e].click()}function Q(e){const t=W[e];return Object(b.a)(t,"change").pipe(Object(g.a)(()=>t.checked),Object(A.a)(t.checked))}var X=c(60);function V(){return{x:Math.max(0,pageXOffset),y:Math.max(0,pageYOffset)}}function G({x:e,y:t}){window.scrollTo(e||0,t||0)}function Z(){return{width:innerWidth,height:innerHeight}}function ee(e,{header$:t,viewport$:c}){const a=c.pipe(Object(X.a)("size")),n=Object(i.a)([a,t]).pipe(Object(g.a)(()=>({x:e.offsetLeft,y:e.offsetTop})));return Object(i.a)([t,c,n]).pipe(Object(g.a)(([{height:e},{offset:t,size:c},{x:a,y:n}])=>({offset:{x:t.x-a,y:t.y-n+e},size:c})))}var te=c(61),ce=c(62);var ae=c(12),ne=c(75),re=c(42);let oe;function ie(e){return oe.pipe(Object(f.a)(t=>void 0!==t[e]?Object(r.a)(t[e]):ae.a),Object(re.a)())}var se=c(37),be=c(76);function ue({document$:e,viewport$:t}){return Object(se.a)(Object(f.a)(c=>{const a=function(e,{document$:t}){return t.pipe(Object(g.a)(()=>{const t=getComputedStyle(e);return["sticky","-webkit-sticky"].includes(t.position)}),Object(re.a)(),Object(f.a)(t=>t?U(e).pipe(Object(g.a)(({height:e})=>({sticky:!0,height:e}))):Object(r.a)({sticky:!1,height:0})),Object(p.a)({bufferSize:1,refCount:!0}))}(c,{document$:e}),n=ie("main").pipe(Object(g.a)(e=>w("h1, h2, h3, h4, h5, h6",e)),Object(m.a)(e=>void 0!==e),Object(be.a)(ie("header-title")),Object(f.a)(([e,c])=>ee(e,{header$:a,viewport$:t}).pipe(Object(g.a)(({offset:{y:t}})=>t>=e.offsetHeight?"page":"site"),Object(re.a)(),function(e){return Object(se.a)(Object(h.a)(s.a),Object(d.a)(t=>{!function(e,t){e.setAttribute("data-md-state",t?"active":"")}(e,"page"===t)}),Object(L.a)(()=>{!function(e){e.removeAttribute("data-md-state")}(e)}))}(c))),Object(A.a)("site"));return Object(i.a)([a,n]).pipe(Object(g.a)(([e,t])=>Object.assign({type:t},e)))}))}var pe=c(10);function fe({header$:e,viewport$:t}){const c=new M.a;return ie("header").pipe(Object(f.a)(e=>{return c.pipe(Object(X.a)("active"),(t=e,Object(se.a)(Object(h.a)(s.a),Object(d.a)(({active:e})=>{!function(e,t){e.setAttribute("data-md-state",t?"shadow":"")}(t,e)}),Object(L.a)(()=>{!function(e){e.removeAttribute("data-md-state")}(t)}))));var t})).subscribe(pe.a),Object(se.a)(Object(f.a)(c=>function(e,{header$:t,viewport$:c}){const a=t.pipe(Object(g.a)(({height:e})=>e),Object(re.a)()),n=a.pipe(Object(f.a)(()=>U(e).pipe(Object(g.a)(({height:t})=>({top:e.offsetTop,bottom:e.offsetTop+t})),Object(X.a)("bottom"))));return Object(i.a)([a,n,c]).pipe(Object(g.a)(([e,{top:t,bottom:c},{offset:{y:a},size:{height:n}}])=>({offset:t-e,height:n=Math.max(0,n-Math.max(0,t-a,e)-Math.max(0,n+a-c)),active:t-e<=a})),Object(re.a)((e,t)=>e.offset===t.offset&&e.height===t.height&&e.active===t.active))}(c,{header$:e,viewport$:t})),Object(d.a)(e=>c.next(e)),Object(L.a)(()=>c.complete()))}function le(e){e.style.top=""}function de(e,{main$:t,viewport$:c}){const a=e.parentElement.offsetTop-e.parentElement.parentElement.offsetTop;return Object(i.a)([t,c]).pipe(Object(g.a)(([{offset:e,height:t},{offset:{y:c}}])=>({height:t=t+Math.min(a,Math.max(0,c-e))-a,lock:c>=e+a})),Object(re.a)((e,t)=>e.height===t.height&&e.lock===t.lock))}function Oe(e,{header$:t}){return Object(se.a)(Object(h.a)(s.a),Object(j.a)(t),Object(d.a)(([{height:t,lock:c},{height:a}])=>{!function(e,t){const c=e.firstElementChild;c.style.height=t-2*c.offsetTop+"px"}(e,t),c?function(e,t){e.style.top=t+"px"}(e,a):le(e)}),Object(g.a)(([e])=>e),Object(L.a)(()=>{le(e),function(e){e.firstElementChild.style.height=""}(e)}))}var je=c(65);c(43);function he(e){return e.split(/"([^"]+)"/g).map((e,t)=>1&t?e.replace(/^\b|^(?![^\x00-\x7F]|$)|\s+/g," +"):e).join("").replace(/"|(?:^|\s+)[*+\-:^~]+(?=\s+|$)/g,"").trim()}var me=c(21);function ge(e,t){if("string"==typeof t||"number"==typeof t)e.innerHTML+=t.toString();else if(t instanceof Node)e.appendChild(t);else if(Array.isArray(t))for(const c of t)ge(e,c)}function ve(e,t,...c){const a=document.createElement(e);if(t)for(const e of Object.keys(t))"boolean"!=typeof t[e]?a.setAttribute(e,t[e]):t[e]&&a.setAttribute(e,"");for(const e of c)ge(a,e);return a}let $e;function ye(e,t){if(void 0===$e){const e=x("#__lang");$e=JSON.parse(e.textContent)}if(void 0===$e[e])throw new ReferenceError("Invalid translation: "+e);return void 0!==t?$e[e].replace("#",t.toString()):$e[e]}function we(e){if(e>999){return((e+1e-6)/1e3).toFixed(+((e-950)%1e3>99))+"k"}return e.toString()}var xe;function Ee(e){return e.type===xe.READY}function ke(e){return e.type===xe.QUERY}function Se(e){return e.type===xe.RESULT}function _e({config:e,docs:t,index:c}){1===e.lang.length&&"en"===e.lang[0]&&(e.lang=[ye("search.config.lang")]),"[\\s\\-]+"===e.separator&&(e.separator=ye("search.config.separator"));return{config:e,docs:t,index:c,pipeline:ye("search.config.pipeline").split(/\s*,\s*/).filter(Boolean)}}function Ae(e,{index$:t,base$:c}){const a=new Worker(e),n=new M.a,r=function(e,{tx$:t}){const c=Object(b.a)(e,"message").pipe(Object(g.a)(({data:e})=>e));return t.pipe(Object(te.a)(()=>c,{leading:!0,trailing:!0}),Object(d.a)(t=>e.postMessage(t)),Object(ce.a)(c),Object(H.a)())}(a,{tx$:n}).pipe(Object(j.a)(c),Object(g.a)(([e,t])=>{if(Se(e))for(const c of e.data)for(const e of c)e.location=`${t}/${e.location}`;return e}),Object(H.a)());return t.pipe(Object(g.a)(e=>({type:xe.SETUP,data:_e(e)})),Object(h.a)(me.b)).subscribe(n.next.bind(n)),{tx$:n,rx$:r}}!function(e){e[e.SETUP=0]="SETUP",e[e.READY=1]="READY",e[e.QUERY=2]="QUERY",e[e.RESULT=3]="RESULT"}(xe||(xe={}));var Te,Ce=c(35);function Re(e,t){const c=t&Te.PARENT,a=t&Te.TEASER,n=Object.keys(e.terms).filter(t=>!e.terms[t]).map(e=>[ve("del",null,e)," "]).flat().slice(0,-1);return ve("a",{href:e.location,class:"md-search-result__link",tabIndex:-1},ve("article",{class:["md-search-result__article",...c?["md-search-result__article--document"]:[]].join(" "),"data-md-score":e.score.toFixed(2)},c>0&&ve("div",{class:"md-search-result__icon md-icon"}),ve("h1",{class:"md-search-result__title"},e.title),a>0&&e.text.length>0&&ve("p",{class:"md-search-result__teaser"},function(e,t){let c=t;if(e.length>c){for(;" "!==e[c]&&--c>0;);return e.substring(0,c)+"..."}return e}(e.text,320)),a>0&&n.length>0&&ve("p",{class:"md-search-result__terms"},ye("search.result.term.missing"),": ",n)))}function Me(e,t=1/0){const c=[...e],a=c.findIndex(e=>!e.location.includes("#")),[n]=c.splice(a,1);let r=c.findIndex(e=>e.score<t);-1===r&&(r=c.length);const o=c.slice(0,r),i=c.slice(r),s=[Re(n,Te.PARENT|+(!a&&0===r)),...o.map(e=>Re(e,Te.TEASER)),...i.length?[ve("details",{class:"md-search-result__more"},ve("summary",{tabIndex:-1},i.length>0&&1===i.length?ye("search.result.more.one"):ye("search.result.more.other",i.length)),i.map(e=>Re(e,Te.TEASER)))]:[]];return ve("li",{class:"md-search-result__item"},s)}function Le(e){return ve("ul",{class:"md-source__facts"},e.map(e=>ve("li",{class:"md-source__fact"},e)))}function ze({document$:e,dialog$:t}){if(!Ce.isSupported())return o.a;e.subscribe(()=>{k("pre > code").forEach((e,t)=>{const c=e.parentElement;var a;c.id="__code_"+t,c.insertBefore((a=c.id,ve("button",{class:"md-clipboard md-icon",title:ye("clipboard.copy"),"data-clipboard-target":`#${a} > code`})),e)})});const c=new J.a(e=>{new Ce(".md-clipboard").on("success",t=>e.next(t))}).pipe(Object(H.a)());return c.pipe(Object(d.a)(e=>e.clearSelection()),Object(y.a)(ye("clipboard.copied"))).subscribe(t),c}!function(e){e[e.TEASER=1]="TEASER",e[e.PARENT=2]="PARENT"}(Te||(Te={}));var Pe=c(66),Ue=c(77),He=c(68);function qe(e,{document$:t,viewport$:c,location$:a}){"scrollRestoration"in history&&(history.scrollRestoration="manual"),Object(b.a)(window,"beforeunload").subscribe(()=>{history.scrollRestoration="auto"});const i=w('link[rel="shortcut icon"]');void 0!==i&&(i.href=i.href);const s=Object(b.a)(document.body,"click").pipe(Object(m.a)(e=>!(e.metaKey||e.ctrlKey)),Object(f.a)(t=>{if(t.target instanceof HTMLElement){const c=t.target.closest("a");if(c&&!c.target&&I(c)&&e.includes(c.href))return N(c)||t.preventDefault(),Object(r.a)(c)}return o.a}),Object(g.a)(e=>({url:new URL(e.href)})),Object(H.a)());s.subscribe(()=>{B("search",!1)});const p=s.pipe(Object(m.a)(({url:e})=>!N(e)),Object(H.a)()),d=Object(b.a)(window,"popstate").pipe(Object(m.a)(e=>null!==e.state),Object(g.a)(e=>({url:new URL(location.href),offset:e.state})),Object(H.a)());Object(u.a)(p,d).pipe(Object(re.a)((e,t)=>e.url.href===t.url.href),Object(g.a)(({url:e})=>e)).subscribe(a);const O=a.pipe(Object(X.a)("pathname"),Object(Pe.a)(1),Object(f.a)(e=>Object(n.a)(fetch(e.href,{credentials:"same-origin"}).then(e=>e.text())).pipe(Object(l.a)(()=>(function(e){location.href=e.href}(e),o.a)))),Object(H.a)());p.pipe(Object(je.a)(O)).subscribe(({url:e})=>{history.pushState({},"",e.toString())});const j=new DOMParser;O.pipe(Object(g.a)(e=>j.parseFromString(e,"text/html"))).subscribe(t);Object(u.a)(p,d).pipe(Object(je.a)(t)).subscribe(({url:e,offset:t})=>{e.hash&&!t?F(e.hash):G(t||{y:0})}),t.pipe(Object(Pe.a)(1)).subscribe(({title:e,head:t})=>{document.title=e;for(const e of['link[rel="canonical"]','meta[name="author"]','meta[name="description"]']){const c=w(e,t),a=w(e,document.head);void 0!==c&&void 0!==a&&_(a,c)}document.dispatchEvent(new CustomEvent("DOMContentSwitch"))}),c.pipe(Object(Ue.a)(250),Object(X.a)("offset")).subscribe(({offset:e})=>{history.replaceState(e,"")}),Object(u.a)(s,d).pipe(Object(He.a)(2,1),Object(m.a)(([e,t])=>e.url.pathname===t.url.pathname&&!N(t.url)),Object(g.a)(([,e])=>e)).subscribe(({offset:e})=>{G(e||{y:0})})}function Ie(){const e=Object(b.a)(window,"keydown").pipe(Object(m.a)(e=>!(e.metaKey||e.ctrlKey)),Object(g.a)(e=>({type:e.key,claim(){e.preventDefault(),e.stopPropagation()}})),Object(H.a)()).pipe(Object(g.a)(e=>{return Object.assign({mode:(t="search",W[t].checked?"search":"global")},e);var t}),Object(m.a)(({mode:e})=>{if("global"===e){const e=E();if(void 0!==e)return!function(e){switch(e.tagName){case"INPUT":case"SELECT":case"TEXTAREA":return!0;default:return e.isContentEditable}}(e)}return!0}),Object(H.a)());return e.pipe(Object(m.a)(({mode:e})=>"search"===e),Object(j.a)(ie("search-query"),ie("search-result"))).subscribe(([e,t,c])=>{const a=E();switch(e.type){case"Enter":a===t&&e.claim();break;case"Escape":case"Tab":B("search",!1),T(t,!1);break;case"ArrowUp":case"ArrowDown":if(void 0===a)T(t);else{const n=[t,...k(":not(details) > [href], summary, details[open] [href]",c)],r=Math.max(0,(Math.max(0,n.indexOf(a))+n.length+("ArrowUp"===e.type?-1:1))%n.length);T(n[r])}e.claim();break;default:t!==E()&&T(t)}}),e.pipe(Object(m.a)(({mode:e})=>"global"===e),Object(j.a)(ie("search-query"))).subscribe(([e,t])=>{switch(e.type){case"f":case"s":case"/":T(t),function(e){if(!(e instanceof HTMLInputElement))throw new Error("Not implemented");e.select()}(t),e.claim();break;case"p":case",":const c=w("[href][rel=prev]");void 0!==c&&c.click();break;case"n":case".":const a=w("[href][rel=next]");void 0!==a&&a.click()}}),e}function Ne(e){e.placeholder=ye("search.placeholder")}function De(e,{transform:t}={}){const c=t||he,a=Object(u.a)(Object(b.a)(e,"keyup"),Object(b.a)(e,"focus").pipe(Object(O.a)(1))).pipe(Object(g.a)(()=>c(e.value)),Object(A.a)(c(e.value)),Object(re.a)()),n=function(e){return Object(u.a)(Object(b.a)(e,"focus"),Object(b.a)(e,"blur")).pipe(Object(g.a)(({type:e})=>"focus"===e),Object(A.a)(e===E()))}(e);return Object(i.a)([a,n]).pipe(Object(g.a)(([e,t])=>({value:e,focus:t})))}function Ye({tx$:e},t={}){return Object(se.a)(Object(f.a)(c=>{const a=De(c,t);return a.pipe(Object(X.a)("value"),Object(g.a)(({value:e})=>({type:xe.QUERY,data:e}))).subscribe(e.next.bind(e)),a.pipe(Object(X.a)("focus")).subscribe(({focus:e})=>{e&&B("search",e)}),a.pipe(function(e){return Object(se.a)(Object(d.a)(({focus:t})=>{t?function(e,t){e.placeholder=t}(e,""):Ne(e)}),Object(L.a)(()=>{Ne(e)}))}(c))}))}function Fe(){return Object(se.a)(Object(f.a)(e=>function(e){return Object(b.a)(e,"click").pipe(Object(y.a)(void 0))}(e).pipe(Object(ce.a)(ie("search-query")),Object(d.a)(T),Object(y.a)(void 0))),Object(A.a)(void 0))}function Je(e,t){e.appendChild(t)}function Ke(e,{query$:t,ready$:c,fetch$:a}){const n=x(".md-search-result__list",e),r=x(".md-search-result__meta",e);return Object(se.a)(Object(j.a)(t,c),Object(g.a)(([e,t])=>(t.value?function(e,t){switch(t){case 0:e.textContent=ye("search.result.none");break;case 1:e.textContent=ye("search.result.one");break;default:e.textContent=ye("search.result.other",t)}}(r,e.length):function(e){e.textContent=ye("search.result.placeholder")}(r),e)),Object(f.a)(t=>{const c=[...t.map(([e])=>e.score),0];return a.pipe(Object(h.a)(s.a),Object(ne.a)(a=>{const r=e.parentElement;for(;a<t.length&&(Je(n,Me(t[a++],c[a])),!(r.scrollHeight-r.offsetHeight>16)););return a},0),Object(y.a)(t),Object(L.a)(()=>{!function(e){e.innerHTML=""}(n)}))}))}function We({rx$:e},{query$:t}){return Object(se.a)(Object(f.a)(c=>{const a=c.parentElement,n=e.pipe(Object(m.a)(Ee),Object(y.a)(!0)),r=function(e){return Object(u.a)(Object(b.a)(e,"scroll"),Object(b.a)(window,"resize")).pipe(Object(g.a)(()=>C(e)),Object(A.a)(C(e)))}(a).pipe(Object(g.a)(({y:e})=>e>=a.scrollHeight-a.offsetHeight-16),Object(re.a)(),Object(m.a)(Boolean));return e.pipe(Object(m.a)(Se),Object(g.a)(({data:e})=>e),Ke(c,{query$:t,ready$:n,fetch$:r}),Object(A.a)([]))}))}function Be({header$:e,viewport$:t,screen$:c}){return Object(se.a)(Object(f.a)(a=>c.pipe(Object(f.a)(c=>c?ee(a,{header$:e,viewport$:t}).pipe(Object(g.a)(({offset:{y:e}})=>({hidden:e>=10})),Object(X.a)("hidden"),function(e){return Object(se.a)(Object(h.a)(s.a),Object(d.a)(({hidden:t})=>{!function(e,t){e.setAttribute("data-md-state",t?"hidden":"")}(e,t)}),Object(L.a)(()=>{!function(e){e.removeAttribute("data-md-state")}(e)}))}(a)):Object(r.a)({hidden:!0})))))}function Qe(e){e.removeAttribute("data-md-state")}function Xe(e){e.classList.remove("md-nav__link--active")}function Ve({header$:e,main$:t,viewport$:c,tablet$:a}){return Object(se.a)(Object(f.a)(n=>a.pipe(Object(f.a)(a=>{if(a){const a=k(".md-nav__link",n),r=de(n,{main$:t,viewport$:c}).pipe(Oe(n,{header$:e})),o=function(e,{header$:t,viewport$:c}){const a=new Map;for(const t of e){const e=w(`[id="${decodeURIComponent(t.hash.substring(1))}"]`);void 0!==e&&a.set(t,e)}const n=t.pipe(Object(g.a)(e=>18+e.height));return U(document.body).pipe(Object(X.a)("height"),Object(g.a)(()=>{let e=[];return[...a].reduce((t,[c,n])=>{for(;e.length;){if(!(a.get(e[e.length-1]).tagName>=n.tagName))break;e.pop()}let r=n.offsetTop;for(;!r&&n.parentElement;)r=(n=n.parentElement).offsetTop;return t.set([...e=[...e,c]].reverse(),r)},new Map)}),Object(f.a)(e=>Object(i.a)([n,c]).pipe(Object(ne.a)(([e,t],[c,{offset:{y:a}}])=>{for(;t.length;){const[,n]=t[0];if(!(n-c<a))break;e=[...e,t.shift()]}for(;e.length;){const[,n]=e[e.length-1];if(!(n-c>=a))break;t=[e.pop(),...t]}return[e,t]},[[],[...e]]),Object(re.a)((e,t)=>e[0]===t[0]&&e[1]===t[1])))).pipe(Object(g.a)(([e,t])=>({prev:e.map(([e])=>e),next:t.map(([e])=>e)})),Object(A.a)({prev:[],next:[]}),Object(He.a)(2,1),Object(g.a)(([e,t])=>e.prev.length<t.prev.length?{prev:t.prev.slice(Math.max(0,e.prev.length-1),t.prev.length),next:[]}:{prev:t.prev.slice(-1),next:t.next.slice(0,t.next.length-e.next.length)}))}(a,{header$:e,viewport$:c}).pipe(function(e){return Object(se.a)(Object(h.a)(s.a),Object(d.a)(({prev:e,next:t})=>{for(const[e]of t)Xe(e),Qe(e);e.forEach(([t],c)=>{!function(e,t){e.classList.toggle("md-nav__link--active",t)}(t,c===e.length-1),function(e,t){e.setAttribute("data-md-state",t?"blur":"")}(t,!0)})}),Object(L.a)(()=>{for(const t of e)Xe(t),Qe(t)}))}(a));return Object(i.a)([r,o]).pipe(Object(g.a)(([e,t])=>({sidebar:e,anchors:t})))}return Object(r.a)({})}))))}var Ge=c(69);var Ze=c(70);function et(){return/(iPad|iPhone|iPod)/.test(navigator.userAgent)}function tt(e){const[t]=e.match(/(git(?:hub|lab))/i)||[];switch(t.toLowerCase()){case"github":const[,t,c]=e.match(/^.+github\.com\/([^\/]+)\/?([^\/]+)?/i);return function(e,t){const c=void 0!==t?`https://api.github.com/repos/${e}/${t}`:"https://api.github.com/users/"+e;return Object(n.a)(fetch(c).then(e=>e.json())).pipe(Object(g.a)(e=>{if(void 0!==t){const{stargazers_count:t,forks_count:c}=e;return[we(t||0)+" Stars",we(c||0)+" Forks"]}{const{public_repos:t}=e;return[we(t||0)+" Repositories"]}}))}(t,c);case"gitlab":const[,a,r]=e.match(/^.+?([^\/]*gitlab[^\/]+)\/(.+?)\/?$/i);return function(e,t){const c=`https://${e}/api/v4/projects/${encodeURIComponent(t)}`;return Object(n.a)(fetch(c).then(e=>e.json())).pipe(Object(g.a)(({star_count:e,forks_count:t})=>[we(e)+" Stars",we(t)+" Forks"]))}(a,r);default:return o.a}}function ct({document$:e}){e.pipe(Object(g.a)(()=>x(".md-source[href]")),Object(f.a)(({href:e})=>{return t=""+function(e){let t=0;for(let c=0,a=e.length;c<a;c++)t=(t<<5)-t+e.charCodeAt(c),t|=0;return t}(e),c=()=>tt(e),Object(a.a)(()=>{const e=sessionStorage.getItem(t);if(e)return Object(r.a)(JSON.parse(e));{const e=c();return e.subscribe(e=>{try{sessionStorage.setItem(t,JSON.stringify(e))}catch(e){}}),e}});var t,c}),Object(l.a)(()=>o.a)).subscribe(e=>{for(const t of k(".md-source__repository"))t.hasAttribute("data-md-state")||(t.setAttribute("data-md-state","done"),t.appendChild(Le(e)))})}function at(e,t){e.setAttribute("data-md-state","lock"),e.style.top=`-${t}px`}function nt(e){const t=-1*parseInt(e.style.top,10);e.removeAttribute("data-md-state"),e.style.top="",t&&window.scrollTo(0,t)}function rt(e){if(!function(e){return"object"==typeof e&&"string"==typeof e.base&&"object"==typeof e.features&&"object"==typeof e.search}(e))throw new SyntaxError("Invalid configuration: "+JSON.stringify(e));const t=function(){const e=new $.a;return Object(b.a)(document,"DOMContentLoaded").pipe(Object(y.a)(document)).subscribe(e),e}(),c=D(),x=function(e,{location$:t}){return t.pipe(Object(v.a)(1),Object(g.a)(({href:t})=>new URL(e,t).toString().replace(/\/$/,"")),Object(p.a)({bufferSize:1,refCount:!0}))}(e.base,{location$:c}),E=Object(b.a)(window,"hashchange").pipe(Object(g.a)(Y),Object(A.a)(Y()),Object(m.a)(e=>e.length>0),Object(H.a)()),T=Object(i.a)([Object(u.a)(Object(b.a)(window,"scroll",{passive:!0}),Object(b.a)(window,"resize",{passive:!0})).pipe(Object(g.a)(V),Object(A.a)(V())),Object(b.a)(window,"resize",{passive:!0}).pipe(Object(g.a)(Z),Object(A.a)(Z()))]).pipe(Object(g.a)(([e,t])=>({offset:e,size:t})),Object(p.a)({bufferSize:1,refCount:!0})),C=K("(min-width: 960px)"),R=K("(min-width: 1220px)");!function(e,{document$:t}){oe=t.pipe(Object(g.a)(t=>e.reduce((e,c)=>{const a=w(`[data-md-component=${c}]`,t);return Object.assign(Object.assign({},e),void 0!==a?{[c]:a}:{})},{})),Object(ne.a)((t,c)=>{for(const a of e)switch(a){case"announce":case"header-title":case"container":case"skip":a in t&&void 0!==t[a]&&(_(t[a],c[a]),t[a]=c[a]);break;default:void 0!==c[a]?t[a]=w(`[data-md-component=${a}]`):delete t[a]}return t}),Object(p.a)({bufferSize:1,refCount:!0}))}(["announce","container","header","header-title","main","navigation","search","search-query","search-reset","search-result","skip","tabs","toc"],{document$:t});const L=Ie();matchMedia("(hover)").matches&&function({document$:e,viewport$:t}){const c=e.pipe(Object(g.a)(()=>k("pre > code"))),a=t.pipe(Object(X.a)("size"));Object(i.a)([c,a]).subscribe(([e])=>{for(const t of e)t.scrollWidth>t.clientWidth?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")})}({document$:t,viewport$:T}),function({document$:e,hash$:t}){const c=e.pipe(Object(g.a)(()=>k("details")));Object(u.a)(K("print").pipe(Object(m.a)(Boolean)),Object(b.a)(window,"beforeprint")).pipe(Object(ce.a)(c)).subscribe(e=>{for(const t of e)t.setAttribute("open","")}),t.pipe(Object(g.a)(e=>w(`[id="${e}"]`)),Object(m.a)(e=>void 0!==e),Object(d.a)(e=>{const t=e.closest("details");t&&!t.open&&t.setAttribute("open","")})).subscribe(e=>e.scrollIntoView())}({document$:t,hash$:E}),function({document$:e}){e.pipe(Object(Pe.a)(1),Object(j.a)(ie("container")),Object(g.a)(([,e])=>k("script",e))).pipe(Object(f.a)(e=>Object(r.a)(...e)),Object(Ge.a)(e=>{const t=S("script");return e.src?(t.src=e.src,_(e,t),new J.a(e=>{t.onload=()=>e.complete()})):(t.textContent=e.textContent,_(e,t),ae.a)})).subscribe(pe.a)}({document$:t}),ct({document$:t}),function({document$:e}){const t=S("table");e.pipe(Object(g.a)(()=>k("table:not([class])"))).subscribe(e=>{for(const c of e)_(c,t),_(t,ve("div",{class:"md-typeset__scrollwrap"},ve("div",{class:"md-typeset__table"},c)))})}({document$:t}),function({document$:e}){const t=e.pipe(Object(g.a)(()=>k("[data-md-scrollfix]")),Object(p.a)({bufferSize:1,refCount:!0}));t.subscribe(e=>{for(const t of e)t.removeAttribute("data-md-scrollfix")}),Object(Ze.a)(et,t,o.a).pipe(Object(f.a)(e=>Object(u.a)(...e.map(e=>Object(b.a)(e,"touchstart").pipe(Object(y.a)(e)))))).subscribe(e=>{const t=e.scrollTop;0===t?e.scrollTop=1:t+e.offsetHeight===e.scrollHeight&&(e.scrollTop=t-1)})}({document$:t});const z=function({duration:e}={}){const t=new M.a,c=S("div");return c.classList.add("md-dialog","md-typeset"),t.pipe(Object(f.a)(t=>Object(r.a)(document.body).pipe(Object(g.a)(e=>e.appendChild(c)),Object(h.a)(s.a),Object(O.a)(1),Object(d.a)(e=>{e.innerHTML=t,e.setAttribute("data-md-state","open")}),Object(O.a)(e||2e3),Object(d.a)(e=>e.removeAttribute("data-md-state")),Object(O.a)(400),Object(d.a)(e=>{e.innerHTML="",e.remove()})))).subscribe(pe.a),t}(),P=ze({document$:t,dialog$:z}),U=ie("header").pipe(ue({document$:t,viewport$:T}),Object(p.a)({bufferSize:1,refCount:!0})),q=ie("main").pipe(fe({header$:U,viewport$:T}),Object(p.a)({bufferSize:1,refCount:!0})),N=ie("navigation").pipe(function({header$:e,main$:t,viewport$:c,screen$:a}){return Object(se.a)(Object(f.a)(n=>a.pipe(Object(f.a)(a=>a?de(n,{main$:t,viewport$:c}).pipe(Oe(n,{header$:e}),Object(g.a)(e=>({sidebar:e}))):Object(r.a)({})))))}({header$:U,main$:q,viewport$:T,screen$:R}),Object(p.a)({bufferSize:1,refCount:!0})),W=ie("toc").pipe(Ve({header$:U,main$:q,viewport$:T,tablet$:C}),Object(p.a)({bufferSize:1,refCount:!0})),G=ie("tabs").pipe(Be({header$:U,viewport$:T,screen$:R}),Object(p.a)({bufferSize:1,refCount:!0})),ee=ie("search").pipe(Object(f.a)(()=>Object(a.a)(()=>{const t=e.search&&e.search.index?e.search.index:void 0,c=void 0!==t?Object(n.a)(t):x.pipe(Object(f.a)(e=>fetch(e+"/search/search_index.json",{credentials:"same-origin"}).then(e=>e.json())));return Object(r.a)(Ae(e.search.worker,{base$:x,index$:c}))}))).pipe(Object(f.a)(t=>{const c=ie("search-query").pipe(Ye(t,{transform:e.search.transform}),Object(p.a)({bufferSize:1,refCount:!0})),a=ie("search-reset").pipe(Fe(),Object(p.a)({bufferSize:1,refCount:!0})),n=ie("search-result").pipe(We(t,{query$:c}),Object(p.a)({bufferSize:1,refCount:!0}));return ie("search").pipe(function({rx$:e,tx$:t},{query$:c,reset$:a,result$:n}){return Object(se.a)(Object(f.a)(()=>{const r=e.pipe(Object(m.a)(Ee),Object(y.a)("ready"),Object(A.a)("waiting"));return t.pipe(Object(m.a)(ke),Object(je.a)(r),Object(v.a)(1)).subscribe(t.next.bind(t)),Object(i.a)([r,c,n,a]).pipe(Object(g.a)(([e,t,c])=>({status:e,query:t,result:c})))}))}(t,{query$:c,reset$:a,result$:n}))}),Object(l.a)(()=>(ie("search").subscribe(e=>e.hidden=!0),o.a)),Object(p.a)({bufferSize:1,refCount:!0}));if(E.pipe(Object(d.a)(()=>B("search",!1)),Object(O.a)(125)).subscribe(e=>F("#"+e)),Object(i.a)([Q("search"),C]).pipe(Object(j.a)(T),Object(f.a)(([[e,c],{offset:{y:a}}])=>{const n=e&&!c;return t.pipe(Object(O.a)(n?400:100),Object(h.a)(s.a),Object(d.a)(({body:e})=>n?at(e,a):nt(e)))})).subscribe(),Object(b.a)(document.body,"click").pipe(Object(m.a)(e=>!(e.metaKey||e.ctrlKey)),Object(m.a)(e=>{if(e.target instanceof HTMLElement){const t=e.target.closest("a");if(t&&I(t))return!0}return!1})).subscribe(()=>{B("drawer",!1)}),e.features.includes("navigation.instant")&&"file:"!==location.protocol){const e=new DOMParser;x.pipe(Object(f.a)(t=>Object(n.a)(fetch(t+"/sitemap.xml").then(e=>e.text()).then(t=>e.parseFromString(t,"text/xml")))),Object(j.a)(x),Object(g.a)(([e,t])=>{const c=k("loc",e).map(e=>e.textContent);if(c.length>1){const[e,a]=c.sort((e,t)=>e.length-t.length);let n=0;if(e===a)n=e.length;else for(;e.charAt(n)===a.charAt(n);)n++;for(let a=0;a<c.length;a++)c[a]=c[a].replace(e.slice(0,n),t+"/")}return c})).subscribe(e=>{qe(e,{document$:t,location$:c,viewport$:T})})}L.pipe(Object(m.a)(e=>"global"===e.mode&&"Tab"===e.type),Object(v.a)(1)).subscribe(()=>{for(const e of k(".headerlink"))e.style.visibility="visible"});const te={document$:t,location$:c,viewport$:T,header$:U,main$:q,navigation$:N,search$:ee,tabs$:G,toc$:W,clipboard$:P,keyboard$:L,dialog$:z};return Object(u.a)(...Object.values(te)).subscribe(),te}document.documentElement.classList.remove("no-js"),document.documentElement.classList.add("js"),navigator.userAgent.match(/(iPad|iPhone|iPod)/g)&&document.documentElement.classList.add("ios")}}));
|
|
//# sourceMappingURL=bundle.7836ba4d.min.js.map
|