mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
!function(e,t,n){function r(e,t){return typeof e===t}function o(e){var t=v.className,n=c._config.classPrefix||"";if(g&&(t=t.baseVal),c._config.enableJSClass){var r=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(r,"$1"+n+"js$2")}c._config.enableClasses&&(t+=" "+n+e.join(" "+n),g?v.className.baseVal=t:v.className=t)}function i(e,t){if("object"==typeof e)for(var n in e)h(e,n)&&i(n,e[n]);else{var r=(e=e.toLowerCase()).split("."),s=c[r[0]];if(2==r.length&&(s=s[r[1]]),void 0!==s)return c;t="function"==typeof t?t():t,1==r.length?c[r[0]]=t:(!c[r[0]]||c[r[0]]instanceof Boolean||(c[r[0]]=new Boolean(c[r[0]])),c[r[0]][r[1]]=t),o([(t&&0!=t?"":"no-")+r.join("-")]),c._trigger(e,t)}return c}function s(){return"function"!=typeof t.createElement?t.createElement(arguments[0]):g?t.createElementNS.call(t,"http://www.w3.org/2000/svg",arguments[0]):t.createElement.apply(t,arguments)}function l(e,n,r,o){var i,l,a,f,u="modernizr",p=s("div"),d=function(){var e=t.body;return e||((e=s(g?"svg":"body")).fake=!0),e}();if(parseInt(r,10))for(;r--;)(a=s("div")).id=o?o[r]:u+(r+1),p.appendChild(a);return i=s("style"),i.type="text/css",i.id="s"+u,(d.fake?d:p).appendChild(i),d.appendChild(p),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(t.createTextNode(e)),p.id=u,d.fake&&(d.style.background="",d.style.overflow="hidden",f=v.style.overflow,v.style.overflow="hidden",v.appendChild(d)),l=n(p,e),d.fake?(d.parentNode.removeChild(d),v.style.overflow=f,v.offsetHeight):p.parentNode.removeChild(p),!!l}function a(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function f(t,o,i,f,u){var p=t.charAt(0).toUpperCase()+t.slice(1),d=(t+" "+y.join(p+" ")+p).split(" ");return r(o,"string")||r(o,"undefined")?function(t,o,i,f){function u(){d&&(delete w.style,delete w.modElem)}if(f=!r(f,"undefined")&&f,!r(i,"undefined")){var p=function(t,r){var o=t.length;if("CSS"in e&&"supports"in e.CSS){for(;o--;)if(e.CSS.supports(a(t[o]),r))return!0;return!1}if("CSSSupportsRule"in e){for(var i=[];o--;)i.push("("+a(t[o])+":"+r+")");return i=i.join(" or "),l("@supports ("+i+") { #modernizr { position: absolute; } }",function(t){return"absolute"==function(t,n,r){var o;if("getComputedStyle"in e){o=getComputedStyle.call(e,t,n);var i=e.console;null!==o?r&&(o=o.getPropertyValue(r)):i&&i[i.error?"error":"log"].call(i,"getComputedStyle returning null, its possible modernizr test results are inaccurate")}else o=!n&&t.currentStyle&&t.currentStyle[r];return o}(t,null,"position")})}return n}(t,i);if(!r(p,"undefined"))return p}for(var d,c,h,m,v,g=["modernizr","tspan","samp"];!w.style&&g.length;)d=!0,w.modElem=s(g.shift()),w.style=w.modElem.style;for(h=t.length,c=0;c<h;c++)if(m=t[c],v=w.style[m],!!~(""+m).indexOf("-")&&(m=m.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")),w.style[m]!==n){if(f||r(i,"undefined"))return u(),"pfx"!=o||m;try{w.style[m]=i}catch(e){}if(w.style[m]!=v)return u(),"pfx"!=o||m}return u(),!1}(d,o,f,u):(d=(t+" "+S.join(p+" ")+p).split(" "),function(e,t,n){var o;for(var i in e)if(e[i]in t)return!1===n?e[i]:(o=t[e[i]],r(o,"function")?function(e,t){return function(){return e.apply(t,arguments)}}(o,n||t):o);return!1}(d,o,i))}function u(e,t,r){return f(e,n,n,t,r)}var p=[],d={_version:"3.5.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){p.push({name:e,fn:t,options:n})},addAsyncTest:function(e){p.push({name:null,fn:e})}},c=function(){};c.prototype=d,c=new c;var h,m=[],v=t.documentElement,g="svg"===v.nodeName.toLowerCase();!function(){var e={}.hasOwnProperty;h=r(e,"undefined")||r(e.call,"undefined")?function(e,t){return t in e&&r(e.constructor.prototype[t],"undefined")}:function(t,n){return e.call(t,n)}}(),d._l={},d.on=function(e,t){this._l[e]||(this._l[e]=[]),this._l[e].push(t),c.hasOwnProperty(e)&&setTimeout(function(){c._trigger(e,c[e])},0)},d._trigger=function(e,t){if(this._l[e]){var n=this._l[e];setTimeout(function(){var e;for(e=0;e<n.length;e++)(0,n[e])(t)},0),delete this._l[e]}},c._q.push(function(){d.addTest=i});var y=d._config.usePrefixes?"Moz O ms Webkit".split(" "):[];d._cssomPrefixes=y;var C={elem:s("modernizr")};c._q.push(function(){delete C.elem});var w={style:C.elem.style};c._q.unshift(function(){delete w.style});var S=d._config.usePrefixes?"Moz O ms Webkit".toLowerCase().split(" "):[];d._domPrefixes=S,d.testAllProps=f,d.testAllProps=u;var _=d.testStyles=l,b="CSS"in e&&"supports"in e.CSS,x="supportsCSS"in e;c.addTest("supports",b||x),c.addTest("csstransforms3d",function(){var e=!!u("perspective","1px",!0),t=c._config.usePrefixes;if(e&&(!t||"webkitPerspective"in v.style)){var n;c.supports?n="@supports (perspective: 1px)":(n="@media (transform-3d)",t&&(n+=",(-webkit-transform-3d)")),_("#modernizr{width:0;height:0}"+(n+="{#modernizr{width:7px;height:18px;margin:0;padding:0;border:0}}"),function(t){e=7===t.offsetWidth&&18===t.offsetHeight})}return e}),c.addTest("details",function(){var e,t=s("details");return"open"in t&&(_("#modernizr details{display:block}",function(n){n.appendChild(t),t.innerHTML="<summary>a</summary>b",e=t.offsetHeight,t.open=!0,e=e!=t.offsetHeight}),e)}),function(){var e,t,n,o,i,s;for(var l in p)if(p.hasOwnProperty(l)){if(e=[],(t=p[l]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(o=r(t.fn,"function")?t.fn():t.fn,i=0;i<e.length;i++)1===(s=e[i].split(".")).length?c[s[0]]=o:(!c[s[0]]||c[s[0]]instanceof Boolean||(c[s[0]]=new Boolean(c[s[0]])),c[s[0]][s[1]]=o),m.push((o?"":"no-")+s.join("-"))}}(),o(m),delete d.addTest,delete d.addAsyncTest;for(var P=0;P<c._q.length;P++)c._q[P]();e.Modernizr=c}(window,document); |