hugo-theme-terminal/static/assets/prism.js

8 lines
161 KiB
JavaScript
Raw Normal View History

2020-11-16 02:00:41 +03:00
!function(n){var a={};function r(e){if(a[e])return a[e].exports;var t=a[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,r),t.l=!0,t.exports}r.m=n,r.c=a,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([,,function(we,e,ke){(function(e){var t,n,a,r,i,h,o,s,l,d,u,c,p,g,f,m,b,y,v,w,k=function(d){var u=/\blang(?:uage)?-([\w-]+)\b/i,t=0,N={manual:d.Prism&&d.Prism.manual,disableWorkerMessageHandler:d.Prism&&d.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof O?new O(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function n(e,a){var r,t;switch(a=a||{},N.util.type(e)){case"Object":if(t=N.util.objId(e),a[t])return a[t];for(var i in r={},a[t]=r,e)e.hasOwnProperty(i)&&(r[i]=n(e[i],a));return r;case"Array":return t=N.util.objId(e),a[t]?a[t]:(r=[],a[t]=r,e.forEach(function(e,t){r[t]=n(e,a)}),r);default:return e}},getLanguage:function(e){for(;e&&!u.test(e.className);)e=e.parentElement;return e?(e.className.match(u)||[,"none"])[1].toLowerCase():"none"},currentScript:function(){if("undefined"==typeof document)return null;if("currentScript"in document)return document.currentScript;try{throw new Error}catch(e){var t=(/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(e.stack)||[])[1];if(t){var n=document.getElementsByTagName("script");for(var a in n)if(n[a].src==t)return n[a]}return null}},isActive:function(e,t,n){for(var a="no-"+t;e;){var r=e.classList;if(r.contains(t))return!0;if(r.contains(a))return!1;e=e.parentElement}return!!n}},languages:{extend:function(e,t){var n=N.util.clone(N.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(n,e,t,a){var r=(a=a||N.languages)[n],i={};for(var o in r)if(r.hasOwnProperty(o)){if(o==e)for(var s in t)t.hasOwnProperty(s)&&(i[s]=t[s]);t.hasOwnProperty(o)||(i[o]=r[o])}var l=a[n];return a[n]=i,N.languages.DFS(N.languages,function(e,t){t===l&&e!=n&&(this[e]=i)}),i},DFS:function e(t,n,a,r){r=r||{};var i,o,s=N.util.objId;for(var l in t){t.hasOwnProperty(l)&&(n.call(t,l,t[l],a||l),i=t[l],"Object"!==(o=N.util.type(i))||r[s(i)]?"Array"!==o||r[s(i)]||(r[s(i)]=!0,e(i,n,l,r)):(r[s(i)]=!0,e(i,n,null,r)))}}},plugins:{},highlightAll:function(e,t){N.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};N.hooks.run("before-highlightall",a),a.elements=Array.prototype.slice.apply(a.container.querySelectorAll(a.selector)),N.hooks.run("before-all-elements-highlight",a);for(var r,i=0;r=a.elements[i++];)N.highlightElement(r,!0===t,a.callback)},highlightElement:function(e,t,n){var a=N.util.getLanguage(e),r=N.languages[a];e.className=e.className.replace(u,"").replace(/\s+/g," ")+" language-"+a;var i=e.parentElement;i&&"pre"===i.nodeName.toLowerCase()&&(i.className=i.className.replace(u,"").replace(/\s+/g," ")+" language-"+a);var o,s={element:e,language:a,grammar:r,code:e.textContent};function l(e){s.highlightedCode=e,N.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,N.hooks.run("after-highlight",s),N.hooks.run("complete",s),n&&n.call(s.element)}if(N.hooks.run("before-sanity-check",s),!s.code)r
2020-09-06 01:31:08 +03:00
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
2020-10-20 03:37:35 +03:00
var a;a=function(){return a={},r.m=n=[function(e,t){e.exports=function(e){var t,n,a,r="SELECT"===e.nodeName?(e.focus(),e.value):"INPUT"===e.nodeName||"TEXTAREA"===e.nodeName?((t=e.hasAttribute("readonly"))||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),t||e.removeAttribute("readonly"),e.value):(e.hasAttribute("contenteditable")&&e.focus(),n=window.getSelection(),(a=document.createRange()).selectNodeContents(e),n.removeAllRanges(),n.addRange(a),n.toString());return r}},function(e,t){function n(){}n.prototype={on:function(e,t,n){var a=this.e||(this.e={});return(a[e]||(a[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var a=this;function r(){a.off(e,r),t.apply(n,arguments)}return r._=t,this.on(e,r,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),a=0,r=n.length;a<r;a++)n[a].fn.apply(n[a].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),a=n[e],r=[];if(a&&t)for(var i=0,o=a.length;i<o;i++)a[i].fn!==t&&a[i].fn._!==t&&r.push(a[i]);return r.length?n[e]=r:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},function(e,t,n){var p=n(3),g=n(4);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!p.string(t))throw new TypeError("Second argument must be a String");if(!p.fn(n))throw new TypeError("Third argument must be a Function");if(p.node(e))return u=t,c=n,(d=e).addEventListener(u,c),{destroy:function(){d.removeEventListener(u,c)}};if(p.nodeList(e))return o=e,s=t,l=n,Array.prototype.forEach.call(o,function(e){e.addEventListener(s,l)}),{destroy:function(){Array.prototype.forEach.call(o,function(e){e.removeEventListener(s,l)})}};if(p.string(e))return a=e,r=t,i=n,g(document.body,a,r,i);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var a,r,i,o,s,l,d,u,c}},function(e,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){var o=n(5);function i(e,t,n,a,r){var i=function(t,n,e,a){return function(e){e.delegateTarget=o(e.target,n),e.delegateTarget&&a.call(t,e)}}.apply(this,arguments);return e.addEventListener(n,i,r),{destroy:function(){e.removeEventListener(n,i,r)}}}e.exports=function(e,t,n,a,r){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return i(e,t,n,a,r)}))}},function(e,t){var n;"undefined"==typeof Element||Element.prototype.matches||((n=Element.prototype).matches=n.matchesSelector||n.mozMatchesSelector||n.msMatchesSelector||n.oMatchesSelector||n.webkitMatchesSelector),e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function s(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),this.resolveOptions(e),this.initSelection()}var l=(function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}(s,[{key:"resolveOptions",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){t