LocalCDN-Firefox-Chrome-Brave/resources/highlight.js/9.18.5/highlight.min.jsm

2 lines
72 KiB
JavaScript
Raw Normal View History

/*! highlight.js v9.18.5 | BSD3 License | git.io/hljslicense */
!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"==typeof exports||exports.nodeType?t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs})):e(exports)}(function(a){var w=!1,u=[],i=Object.keys,x=Object.create(null),c=Object.create(null),k=!0,t=/^(no-?highlight|plain|text)$/i,o=/\blang(?:uage)?-([\w-]+)\b/i,r=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,n={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},E="</span>",M="Could not find the language '{}', did you forget to load/include a language module?",C={hideUpgradeWarningAcceptNoSupportOrSecurityUpdates:!1,classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},s="of and for in not or if then".split(" ");function R(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function b(e){return e.nodeName.toLowerCase()}function l(e){return t.test(e)}function d(e){var t,r={},n=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return n.forEach(function(e){for(t in e)r[t]=e[t]}),r}function p(e){var a=[];return function e(t,r){for(var n=t.firstChild;n;n=n.nextSibling)3===n.nodeType?r+=n.nodeValue.length:1===n.nodeType&&(a.push({event:"start",offset:r,node:n}),r=e(n,r),b(n).match(/br|hr|img|input/)||a.push({event:"stop",offset:r,node:n}));return r}(e,0),a}function f(e,t,r){var n=0,a="",i=[];function s(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function c(e){a+="<"+b(e)+u.map.call(e.attributes,function(e){return" "+e.nodeName+'="'+R(e.value).replace(/"/g,"&quot;")+'"'}).join("")+">"}function o(e){a+="</"+b(e)+">"}function l(e){("start"===e.event?c:o)(e.node)}for(;e.length||t.length;){var d=s();if(a+=R(r.substring(n,d[0].offset)),n=d[0].offset,d===e){for(i.reverse().forEach(o);l(d.splice(0,1)[0]),(d=s())===e&&d.length&&d[0].offset===n;);i.reverse().forEach(c)}else"start"===d[0].event?i.push(d[0].node):i.pop(),l(d.splice(0,1)[0])}return a+R(r.substr(n))}function m(t){return t.v&&!t.cached_variants&&(t.cached_variants=t.v.map(function(e){return d(t,{v:null},e)})),t.cached_variants?t.cached_variants:function e(t){return!!t&&(t.eW||e(t.starts))}(t)?[d(t,{starts:t.starts?d(t.starts):null})]:Object.isFrozen(t)?[d(t)]:[t]}function g(e){if(n&&!e.langApiRestored){for(var t in e.langApiRestored=!0,n)e[t]&&(e[n[t]]=e[t]);(e.c||[]).concat(e.v||[]).forEach(g)}}function _(t,n){var a={};return"string"==typeof t?r("keyword",t):i(t).forEach(function(e){r(e,t[e])}),a;function r(r,e){n&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");a[t[0]]=[r,function(e,t){return t?Number(t):function(e){return-1!=s.indexOf(e.toLowerCase())}(e)?0:1}(t[0],t[1])]})}}function B(n){function d(e){return e&&e.source||e}function u(e,t){return new RegExp(d(e),"m"+(n.cI?"i":"")+(t?"g":""))}function a(a){var i,e,s={},c=[],o={},r=1;function t(e,t){s[r]=e,c.push([e,t]),r+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(t)+1}for(var n=0;n<a.c.length;n++){t(e=a.c[n],e.bK?"\\.?(?:"+e.b+")\\.?":e.b)}a.tE&&t("end",a.tE),a.i&&t("illegal",a.i);var l=c.map(function(e){return e[1]});return i=u(function(e,t){for(var r=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,n=0,a="",i=0;i<e.length;i++){var s=n+=1,c=d(e[i]);for(0<i&&(a+=t),a+="(";0<c.length;){var o=r.exec(c);if(null==o){a+=c;break}a+=c.substr