mirror of
https://github.com/fazo96/tesina.git
synced 2025-01-10 11:34:20 +01:00
1 line
20 KiB
JavaScript
1 line
20 KiB
JavaScript
|
!function e(t,n,i){function a(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=n[o]={exports:{}};t[o][0].call(c.exports,function(e){var n=t[o][1][e];return a(n?n:e)},c,c.exports,e,t,n,i)}return n[o].exports}for(var r="function"==typeof require&&require,o=0;o<i.length;o++)a(i[o]);return a}({1:[function(e,t){self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{};var n=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=self.Prism={util:{encode:function(e){return e instanceof n?new n(e.type,t.util.encode(e.content),e.alias):"Array"===t.util.type(e)?e.map(t.util.encode):e.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},clone:function(e){var n=t.util.type(e);switch(n){case"Object":var i={};for(var a in e)e.hasOwnProperty(a)&&(i[a]=t.util.clone(e[a]));return i;case"Array":return e.map(function(e){return t.util.clone(e)})}return e}},languages:{extend:function(e,n){var i=t.util.clone(t.languages[e]);for(var a in n)i[a]=n[a];return i},insertBefore:function(e,n,i,a){a=a||t.languages;var r=a[e];if(2==arguments.length){i=arguments[1];for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o]);return r}var s={};for(var l in r)if(r.hasOwnProperty(l)){if(l==n)for(var o in i)i.hasOwnProperty(o)&&(s[o]=i[o]);s[l]=r[l]}return t.languages.DFS(t.languages,function(t,n){n===a[e]&&t!=e&&(this[t]=s)}),a[e]=s},DFS:function(e,n,i){for(var a in e)e.hasOwnProperty(a)&&(n.call(e,a,e[a],i||a),"Object"===t.util.type(e[a])?t.languages.DFS(e[a],n):"Array"===t.util.type(e[a])&&t.languages.DFS(e[a],n,a))}},highlightAll:function(e,n){for(var i,a=document.querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'),r=0;i=a[r++];)t.highlightElement(i,e===!0,n)},highlightElement:function(i,a,r){for(var o,s,l=i;l&&!e.test(l.className);)l=l.parentNode;if(l&&(o=(l.className.match(e)||[,""])[1],s=t.languages[o]),s){i.className=i.className.replace(e,"").replace(/\s+/g," ")+" language-"+o,l=i.parentNode,/pre/i.test(l.nodeName)&&(l.className=l.className.replace(e,"").replace(/\s+/g," ")+" language-"+o);var c=i.textContent;if(c){c=c.replace(/^(?:\r?\n|\r)/,"");var p={element:i,language:o,grammar:s,code:c};if(t.hooks.run("before-highlight",p),a&&self.Worker){var u=new Worker(t.filename);u.onmessage=function(e){p.highlightedCode=n.stringify(JSON.parse(e.data),o),t.hooks.run("before-insert",p),p.element.innerHTML=p.highlightedCode,r&&r.call(p.element),t.hooks.run("after-highlight",p)},u.postMessage(JSON.stringify({language:p.language,code:p.code}))}else p.highlightedCode=t.highlight(p.code,p.grammar,p.language),t.hooks.run("before-insert",p),p.element.innerHTML=p.highlightedCode,r&&r.call(i),t.hooks.run("after-highlight",p)}}},highlight:function(e,i,a){var r=t.tokenize(e,i);return n.stringify(t.util.encode(r),a)},tokenize:function(e,n){var i=t.Token,a=[e],r=n.rest;if(r){for(var o in r)n[o]=r[o];delete n.rest}e:for(var o in n)if(n.hasOwnProperty(o)&&n[o]){var s=n[o];s="Array"===t.util.type(s)?s:[s];for(var l=0;l<s.length;++l){var c=s[l],p=c.inside,u=!!c.lookbehind,f=0,d=c.alias;c=c.pattern||c;for(var g=0;g<a.length;g++){var b=a[g];if(a.length>e.length)break e;if(!(b instanceof i)){c.lastIndex=0;var h=c.exec(b);if(h){u&&(f=h[1].length);var m=h.index-1+f,h=h[0].slice(f),k=h.length,v=m+k,y=b.slice(0,m+1),x=b.slice(v+1),w=[g,1];y&&w.push(y);var E=new i(o,p?t.tokenize(h,p):h,d);w.push(E),x&&w.push(x),Array.prototype.splice.apply(a,w)}}}}}return a},hooks:{all:{},add:function(e,n){var i=t.hooks.all;i[e]=i[e]||[],i[e].push(n)},run:function(e,n){var i=t.hooks.all[e];if(i&&i.length)for(var a,r=0;a=i[r++];)a(n)}}},n=t.Token=function(e,t,n){this.type=e,this.content=t,this.alias=n};if(n.stringify=function(e,i,a){if("string"==typeof e)return e;if("Array"===t.util.type(e))return e.map(function(t){return n.stringify(t,i,e)}).join("");var r={type:e.type,content:
|