personal-site/public/assets/prism.js

8 lines
131 KiB
JavaScript
Raw Normal View History

!function(n){var a={};function i(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,i),t.l=!0,t.exports}i.m=n,i.c=a,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(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));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="",i(i.s=3)}([,,,function(Z,e,G){(function(e){var t,n,a,h,i,r,o,s,l,d,c,u,p,g,f=function(d){var c=/\blang(?:uage)?-([\w-]+)\b/i,t=0,L={manual:d.Prism&&d.Prism.manual,disableWorkerMessageHandler:d.Prism&&d.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof R?new R(e.type,L.util.encode(e.content),e.alias):Array.isArray(e)?e.map(L.util.encode):e.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 i,t,r=L.util.type(e);switch(a=a||{},r){case"Object":if(t=L.util.objId(e),a[t])return a[t];for(var o in i={},a[t]=i,e)e.hasOwnProperty(o)&&(i[o]=n(e[o],a));return i;case"Array":return t=L.util.objId(e),a[t]?a[t]:(i=[],a[t]=i,e.forEach(function(e,t){i[t]=n(e,a)}),i);default:return e}}},languages:{extend:function(e,t){var n=L.util.clone(L.languages[e]);for(var a in t)n[a]=t[a];return n},insertBefore:function(n,e,t,a){var i=(a=a||L.languages)[n],r={};for(var o in i)if(i.hasOwnProperty(o)){if(o==e)for(var s in t)t.hasOwnProperty(s)&&(r[s]=t[s]);t.hasOwnProperty(o)||(r[o]=i[o])}var l=a[n];return a[n]=r,L.languages.DFS(L.languages,function(e,t){t===l&&e!=n&&(this[e]=r)}),r},DFS:function e(t,n,a,i){i=i||{};var r,o,s=L.util.objId;for(var l in t){t.hasOwnProperty(l)&&(n.call(t,l,t[l],a||l),r=t[l],"Object"!==(o=L.util.type(r))||i[s(r)]?"Array"!==o||i[s(r)]||(i[s(r)]=!0,e(r,n,l,i)):(i[s(r)]=!0,e(r,n,null,i)))}}},plugins:{},highlightAll:function(e,t){L.highlightAllUnder(document,e,t)},highlightAllUnder:function(e,t,n){var a={callback:n,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};L.hooks.run("before-highlightall",a);for(var i,r=a.elements||e.querySelectorAll(a.selector),o=0;i=r[o++];)L.highlightElement(i,!0===t,a.callback)},highlightElement:function(e,t,n){for(var a,i,r=e;r&&!c.test(r.className);)r=r.parentNode;r&&(a=(r.className.match(c)||[,""])[1].toLowerCase(),i=L.languages[a]),e.className=e.className.replace(c,"").replace(/\s+/g," ")+" language-"+a,e.parentNode&&(r=e.parentNode,/pre/i.test(r.nodeName)&&(r.className=r.className.replace(c,"").replace(/\s+/g," ")+" language-"+a));function o(e){l.highlightedCode=e,L.hooks.run("before-insert",l),l.element.innerHTML=l.highlightedCode,L.hooks.run("after-highlight",l),L.hooks.run("complete",l),n&&n.call(l.element)}var s,l={element:e,language:a,grammar:i,code:e.textContent};L.hooks.run("before-sanity-check",l),l.code?(L.hooks.run("before-highlight",l),l.grammar?t&&d.Worker?((s=new Worker(L.filename)).onmessage=function(e){o(e.data)},s.postMessage(JSON.stringify({language:l.language,code:l.code,immediateClose:!0}))):o(L.highlight(l.code,l.grammar,l.language)):o(L.util.encode(l.code))):L.hooks.run("complete",l)},highlight:function(e,t,n){var a={code:e,grammar:t,language:n};return L.hooks.run("before-tokenize",a),a.tokens=L.tokenize(a.code,a.grammar),L.hooks.run("after-tokenize",a),R.stringify(L.util.encode(a.tokens),a.language)},matchGrammar:function(e,t,n,a,i,r,o){for(var s in n)if(n.hasOwnProperty(s)&&n[s]){if(s==o)return;for(var l=n[
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
var a;a=function(){return a={},i.m=n=[function(e,t){e.exports=function(e){var t,n,a,i="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 i}},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 i(){a.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),a=0,i=n.length;a<i;a++)n[a].fn.apply(n[a].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),a=n[e],i=[];if(a&&t)for(var r=0,o=a.length;r<o;r++)a[r].fn!==t&&a[r].fn._!==t&&i.push(a[r]);return i.length?n[e]=i: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 c=t,u=n,(d=e).addEventListener(c,u),{destroy:function(){d.removeEventListener(c,u)}};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,i=t,r=n,g(document.body,a,i,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var a,i,r,o,s,l,d,c,u}},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 r(e,t,n,a,i){var r=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,r,i),{destroy:function(){e.removeEventListener(n,r,i)}}}e.exports=function(e,t,n,a,i){return"function"==typeof e.addEventListener?r.apply(null,arguments):"function"==typeof n?r.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return r(e,t,n,a,i)}))}},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),i=n.n(a),r="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