mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
2 lines
9.6 KiB
JavaScript
2 lines
9.6 KiB
JavaScript
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){function t(t){for(var r,i,u=t[0],a=t[1],f=t[2],b=0,p=[];b<u.length;b++)i=u[b],Object.prototype.hasOwnProperty.call(c,i)&&c[i]&&p.push(c[i][0]),c[i]=0;for(r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r]);for(s&&s(t);p.length;)p.shift()();return o.push.apply(o,f||[]),n()}function n(){for(var e,t=0;t<o.length;t++){for(var n=o[t],r=!0,u=1;u<n.length;u++){var a=n[u];0!==c[a]&&(r=!1)}r&&(o.splice(t--,1),e=i(i.s=n[0]))}return e}var r={},c={4:0},o=[];function i(t){if(r[t])return r[t].exports;var n=r[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="";var u=window.webpackJsonp=window.webpackJsonp||[],a=u.push.bind(u);u.push=t,u=u.slice();for(var f=0;f<u.length;f++)t(u[f]);var s=a;return o.push([61,0]),n()}({0:function(e,t,n){"use strict";n.d(t,"q",(function(){return i})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return a})),n.d(t,"b",(function(){return f})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return b})),n.d(t,"j",(function(){return p})),n.d(t,"k",(function(){return j})),n.d(t,"r",(function(){return h})),n.d(t,"s",(function(){return m})),n.d(t,"l",(function(){return v})),n.d(t,"t",(function(){return z})),n.d(t,"i",(function(){return P})),n.d(t,"u",(function(){return $})),n.d(t,"m",(function(){return N})),n.d(t,"h",(function(){return R})),n.d(t,"g",(function(){return J})),n.d(t,"v",(function(){return I})),n.d(t,"w",(function(){return U})),n.d(t,"n",(function(){return D})),n.d(t,"x",(function(){return K})),n.d(t,"y",(function(){return B})),n.d(t,"f",(function(){return Y})),n.d(t,"o",(function(){return G})),n.d(t,"z",(function(){return Q})),n.d(t,"A",(function(){return re})),n.d(t,"B",(function(){return ce})),n.d(t,"p",(function(){return te})),n.d(t,"C",(function(){return ue}));var r=n(45),c=n(62),o=n(46);function i(){const e=new r.a;return Object(c.a)(document,"DOMContentLoaded").pipe(Object(o.a)(document)).subscribe(e),e}function u(e,t=document){return t.querySelector(e)||void 0}function a(e,t=document){const n=u(e,t);if(void 0===n)throw new ReferenceError(`Missing element: expected "${e}" to be present`);return n}function f(){return document.activeElement instanceof HTMLElement?document.activeElement:void 0}function s(e,t=document){return Array.from(t.querySelectorAll(e))}function b(e){return document.createElement(e)}function p(e,t){e.replaceWith(t)}var d=n(63),l=n(33),O=n(64);function j(e,t=!0){t?e.focus():e.blur()}function h(e){return Object(d.a)(Object(c.a)(e,"focus"),Object(c.a)(e,"blur")).pipe(Object(l.a)(({type:e})=>"focus"===e),Object(O.a)(e===f()))}function g(e){return{x:e.scrollLeft,y:e.scrollTop}}function m(e){return Object(d.a)(Object(c.a)(e,"scroll"),Object(c.a)(window,"resize")).pipe(Object(l.a)(()=>g(e)),Object(O.a)(g(e)))}function v(e){if(!(e instanceof HTMLInputElement))throw new Error("Not implemented");e.select()}var w=n(25),y=n(47),x=n(65),S=n(66),k=n(41),E=n(67),M=n(68),L=n(69),T=n(49);const C=new w.a,_=Object(y.a)(()=>Object(x.a)(new ResizeObserver(e=>{for(const t of e)C.next(t)}))).pipe(Object(k.a)(e=>S.a.pipe(Object(O.a)(e)).pipe(Object(E.a)(()=>e.disconnect()))),Object(M.a)({bufferSize:1,refCount:!0}));function z(e){return _.pipe(Object(L.a)(t=>t.observe(e)),Object(k.a)(t=>C.pipe(Object(T.a)(({target:t})=>t===e),Object(E.a)(()=>t.unobserve(e)),Object(l.a)(({contentRect:e})=>({width:e.width,height:e.height})))),Object(O.a)(function(e){return{width:e.offsetWidth,height:e.offsetHeight}}(e)))}var A=n(48);function P(e){switch(e.tagName){case"INPUT":case"SELECT":case"TEXTAREA":return!0;default:return e.isContentEditable}}function $(){return Object(c.a)(window,"keydown").pipe(Object(T.a)(e=>!(e.metaKey||e.ctrlKey)),Object(l.a)(e=>({type:e.key,claim(){e.preventDefault(),e.stopPropagation()}})),Object(A.a)())}var H=n(70);function N(e){location.href=e.href}function R(e,t=location){return e.host===t.host&&/^(?:\/[\w-]+)*(?:\/?|\.html)$/i.test(e.pathname)}function J(e,t=location){return e.pathname===t.pathname&&e.hash.length>0}function I(){return new H.a(new URL(location.href))}var q=n(42);function U(e,{location$:t}){return t.pipe(Object(q.a)(1),Object(l.a)(({href:t})=>new URL(e,t).toString().replace(/\/$/,"")),Object(M.a)({bufferSize:1,refCount:!0}))}function W(){return location.hash.substring(1)}function D(e){const t=b("a");t.href=e,t.addEventListener("click",e=>e.stopPropagation()),t.click()}function K(){return Object(c.a)(window,"hashchange").pipe(Object(l.a)(W),Object(O.a)(W()),Object(T.a)(e=>e.length>0),Object(A.a)())}var X=n(7);function B(e){const t=matchMedia(e);return new X.a(e=>{t.addListener(t=>e.next(t.matches))}).pipe(Object(O.a)(t.matches),Object(M.a)({bufferSize:1,refCount:!0}))}const F={drawer:a("[data-md-toggle=drawer]"),search:a("[data-md-toggle=search]")};function Y(e){return F[e].checked}function G(e,t){F[e].checked!==t&&F[e].click()}function Q(e){const t=F[e];return Object(c.a)(t,"change").pipe(Object(l.a)(()=>t.checked),Object(O.a)(t.checked))}var V=n(52),Z=n(71);function ee(){return{x:Math.max(0,pageXOffset),y:Math.max(0,pageYOffset)}}function te({x:e,y:t}){window.scrollTo(e||0,t||0)}function ne(){return{width:innerWidth,height:innerHeight}}function re(){return Object(V.a)([Object(d.a)(Object(c.a)(window,"scroll",{passive:!0}),Object(c.a)(window,"resize",{passive:!0})).pipe(Object(l.a)(ee),Object(O.a)(ee())),Object(c.a)(window,"resize",{passive:!0}).pipe(Object(l.a)(ne),Object(O.a)(ne()))]).pipe(Object(l.a)(([e,t])=>({offset:e,size:t})),Object(M.a)({bufferSize:1,refCount:!0}))}function ce(e,{header$:t,viewport$:n}){const r=n.pipe(Object(Z.a)("size")),c=Object(V.a)([r,t]).pipe(Object(l.a)(()=>({x:e.offsetLeft,y:e.offsetTop})));return Object(V.a)([t,n,c]).pipe(Object(l.a)(([{height:e},{offset:t,size:n},{x:r,y:c}])=>({offset:{x:t.x-r,y:t.y-c+e},size:n})))}var oe=n(72),ie=n(73);function ue(e,{tx$:t}){const n=Object(c.a)(e,"message").pipe(Object(l.a)(({data:e})=>e));return t.pipe(Object(oe.a)(()=>n,{leading:!0,trailing:!0}),Object(L.a)(t=>e.postMessage(t)),Object(ie.a)(n),Object(A.a)())}},1:function(e,t,n){"use strict";function r(e){return"object"==typeof e&&"string"==typeof e.base&&"object"==typeof e.features&&"object"==typeof e.search}function c(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 n of t)c(e,n)}function o(e,t,...n){const r=document.createElement(e);if(t)for(const e of Object.keys(t))"boolean"!=typeof t[e]?r.setAttribute(e,t[e]):t[e]&&r.setAttribute(e,"");for(const e of n)c(r,e);return r}n.d(t,"d",(function(){return r})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"f",(function(){return b})),n.d(t,"g",(function(){return p})),n.d(t,"e",(function(){return d})),n.d(t,"c",(function(){return l}));var i=n(47),u=n(65);function a(e,t){return Object(i.a)(()=>{const n=sessionStorage.getItem(e);if(n)return Object(u.a)(JSON.parse(n));{const n=t();return n.subscribe(t=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}}),n}})}var f=n(0);let s;function b(e,t){if(void 0===s){const e=Object(f.d)("#__lang");s=JSON.parse(e.textContent)}if(void 0===s[e])throw new ReferenceError("Invalid translation: "+e);return void 0!==t?s[e].replace("#",t.toString()):s[e]}function p(e,t){let n=t;if(e.length>n){for(;" "!==e[n]&&--n>0;);return e.substring(0,n)+"..."}return e}function d(e){if(e>999){return((e+1e-6)/1e3).toFixed(+((e-950)%1e3>99))+"k"}return e.toString()}function l(e){let t=0;for(let n=0,r=e.length;n<r;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}},61:function(e,t,n){"use strict";n.r(t);var r=n(8),c=n(62),o=n(36),i=n(0),u=n(41),a=n(33),f=n(1);function s(e,t){return t.length?Object(f.b)("div",{class:""},Object(f.b)("span",null,Object(f.e)(e.length)," results"),Object(f.b)("ul",{class:"tx-icon-search__list"},e.slice(0,10).map(e=>Object(f.b)("li",{class:"tx-icon-search__item"},Object(f.b)("span",{class:"twemoji"},Object(f.b)("img",{src:"https://raw.githubusercontent.com/squidfunk/mkdocs-material/master/material/.icons/"+e,style:"width: 18px; height: 18px"}))," – ",Object(f.b)("button",{class:"md-clipboard--inline","data-clipboard-text":":"+e.replace(/\.svg$/,"").replace(/\//g,"-")+":"},Object(f.b)("code",null,function(e,t){return`:${Object(o.wrap)(e.replace(/\.svg$/,"").replace(/\//g,"-"),t,{wrap:{tagOpen:"<b>",tagClose:"</b>"}})}:`}(e,t))))))):Object(f.b)("div",{class:""})}const b=Object(i.d)("#__config"),p=JSON.parse(b.textContent),d=Object(r.a)(fetch(p.base+"/overrides/assets/javascripts/icons.json").then(e=>e.json())),l=Object(i.c)("#icon-search");l&&d.pipe(Object(u.a)(e=>Object(c.a)(l,"keyup").pipe(Object(a.a)(()=>Object(o.filter)(e,l.value))))).subscribe(e=>{const t=Object(i.d)(".tx-icon-result");t.innerHTML="",t.appendChild(s(e,l.value))}),Object(c.a)(document.body,"click").subscribe(e=>{if(e.target instanceof HTMLElement){var t=e.target.closest("a[href^=http]");t instanceof HTMLLinkElement&&ga("send","event","outbound","click",t.href)}})}}));
|
||
//# sourceMappingURL=bundle.576c0d5a.min.js.map
|