• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*! highlight.js v9.12.0 | BSD3 License | git.io/hljslicense */
2!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(e){function t(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function n(e){return e.nodeName.toLowerCase()}function r(e,t){var n=e&&e.exec(t);return n&&0===n.index}function a(e){return y.test(e)}function i(e){var t,n,r,i,c=e.className+" ";if(c+=e.parentNode?e.parentNode.className:"",n=x.exec(c))return _(n[1])?n[1]:"no-highlight";for(c=c.split(/\s+/),t=0,r=c.length;r>t;t++)if(i=c[t],a(i)||_(i))return i}function c(e){var t,n={},r=Array.prototype.slice.call(arguments,1);for(t in e)n[t]=e[t];return r.forEach(function(e){for(t in e)n[t]=e[t]}),n}function s(e){var t=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(t.push({event:"start",offset:a,node:i}),a=r(i,a),n(i).match(/br|hr|img|input/)||t.push({event:"stop",offset:a,node:i}));return a}(e,0),t}function o(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset<r[0].offset?e:r:"start"===r[0].event?e:r:e.length?e:r}function c(e){function r(e){return" "+e.nodeName+'="'+t(e.value).replace('"',"&quot;")+'"'}u+="<"+n(e)+R.map.call(e.attributes,r).join("")+">"}function s(e){u+="</"+n(e)+">"}function o(e){("start"===e.event?c:s)(e.node)}for(var l=0,u="",p=[];e.length||r.length;){var f=i();if(u+=t(a.substring(l,f[0].offset)),l=f[0].offset,f===e){p.reverse().forEach(s);do o(f.splice(0,1)[0]),f=i();while(f===e&&f.length&&f[0].offset===l);p.reverse().forEach(c)}else"start"===f[0].event?p.push(f[0].node):p.pop(),o(f.splice(0,1)[0])}return u+t(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(t){return c(e,{v:null},t)})),e.cached_variants||e.eW&&[c(e)]||[e]}function u(e){function t(e){return e&&e.source||e}function n(n,r){return new RegExp(t(n),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var c={},s=function(t,n){e.cI&&(n=n.toLowerCase()),n.split(" ").forEach(function(e){var n=e.split("|");c[n[0]]=[t,n[1]?Number(n[1]):1]})};"string"==typeof a.k?s("keyword",a.k):w(a.k).forEach(function(e){s(e,a.k[e])}),a.k=c}a.lR=n(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=n(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=n(a.e)),a.tE=t(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=n(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var o=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(t).filter(Boolean);a.t=o.length?n(o.join("|"),!0):{exec:function(){return null}}}}r(e)}function p(e,n,a,i){function c(e,t){var n,a;for(n=0,a=t.c.length;a>n;n++)if(r(t.c[n].bR,e))return t.c[n]}function s(e,t){if(r(e.eR,t)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?s(e.parent,t):void 0}function o(e,t){return!a&&r(t.iR,e)}function l(e,t){var n=N.cI?t[0].toLowerCase():t[0];return e.k.hasOwnProperty(n)&&e.k[n]}function d(e,t,n,r){var a=r?"":B.classPrefix,i='<span class="'+a,c=n?"":k;return i+=e+'">',i+t+c}function b(){var e,n,r,a;if(!R.k)return t(y);for(a="",n=0,R.lR.lastIndex=0,r=R.lR.exec(y);r;)a+=t(y.substring(n,r.index)),e=l(R,r),e?(x+=e[1],a+=d(e[0],t(r[0]))):a+=t(r[0]),n=R.lR.lastIndex,r=R.lR.exec(y);return a+t(y.substr(n))}function g(){var e="string"==typeof R.sL;if(e&&!L[R.sL])return t(y);var n=e?p(R.sL,y,!0,w[R.sL]):f(y,R.sL.length?R.sL:void 0);return R.r>0&&(x+=n.r),e&&(w[R.sL]=n.top),d(n.language,n.value,!1,!0)}function m(){C+=null!=R.sL?g():b(),y=""}function h(e){C+=e.cN?d(e.cN,"",!0):"",R=Object.create(e,{parent:{value:R}})}function E(e,t){if(y+=e,null==t)return m(),0;var n=c(t,R);if(n)return n.skip?y+=t:(n.eB&&(y+=t),m(),n.rB||n.eB||(y=t)),h(n,t),n.rB?0:t.length;var r=s(R,t);if(r){var a=R;a.skip?y+=t:(a.rE||a.eE||(y+=t),m(),a.eE&&(y=t));do R.cN&&(C+=k),R.skip||R.sL||(x+=R.r),R=R.parent;while(R!==r.parent);return r.starts&&h(r.starts,""),a.rE?0:t.length}if(o(t,R))throw new Error('Illegal lexeme "'+t+'" for mode "'+(R.cN||"<unnamed>")+'"');return y+=t,t.length||1}var N=_(e);if(!N)throw new Error('Unknown language: "'+e+'"');u(N);var v,R=i||N,w={},C="";for(v=R;v!==N;v=v.parent)v.cN&&(C=d(v.cN,"",!0)+C);var y="",x=0;try{for(var M,A,I=0;;){if(R.t.lastIndex=I,M=R.t.exec(n),!M)break;A=E(n.substring(I,M.index),M[0]),I=M.index+A}for(E(n.substr(I)),v=R;v.parent;v=v.parent)v.cN&&(C+=k);return{r:x,value:C,language:e,top:R}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:t(n)};throw T}}function f(e,n){n=n||B.languages||w(L);var r={r:0,value:t(e)},a=r;return n.filter(_).forEach(function(t){var n=p(t,e,!1);n.language=t,n.r>a.r&&(a=n),n.r>r.r&&(a=r,r=n)}),a.language&&(r.second_best=a),r}function d(e){return B.tabReplace||B.useBR?e.replace(M,function(e,t){return B.useBR&&"\n"===e?"<br>":B.tabReplace?t.replace(/\t/g,B.tabReplace):""}):e}function b(e,t,n){var r=t?C[t]:n,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function g(e){var t,n,r,c,l,u=i(e);a(u)||(B.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e,l=t.textContent,r=u?p(u,l,!0):f(l),n=s(t),n.length&&(c=document.createElementNS("http://www.w3.org/1999/xhtml","div"),c.innerHTML=r.value,r.value=o(n,s(c),l)),r.value=d(r.value),e.innerHTML=r.value,e.className=b(e.className,u,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function m(e){B=c(B,e)}function h(){if(!h.called){h.called=!0;var e=document.querySelectorAll("pre code");R.forEach.call(e,g)}}function E(){addEventListener("DOMContentLoaded",h,!1),addEventListener("load",h,!1)}function N(t,n){var r=L[t]=n(e);r.aliases&&r.aliases.forEach(function(e){C[e]=t})}function v(){return w(L)}function _(e){return e=(e||"").toLowerCase(),L[e]||L[C[e]]}var R=[],w=Object.keys,L={},C={},y=/^(no-?highlight|plain|text)$/i,x=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,k="</span>",B={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=p,e.highlightAuto=f,e.fixMarkup=d,e.highlightBlock=g,e.configure=m,e.initHighlighting=h,e.initHighlightingOnLoad=E,e.registerLanguage=N,e.listLanguages=v,e.getLanguage=_,e.inherit=c,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(t,n,r){var a=e.inherit({cN:"comment",b:t,e:n,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},n={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},r={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,n,r,t]}}),e.registerLanguage("cpp",function(e){var t={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},n={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[e.BE]},{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},r={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},a={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},e.inherit(n,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},e.CLCM,e.CBCM]},i=e.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},s=[t,e.CLCM,e.CBCM,r,n];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"</",c:s.concat([a,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",t]},{b:e.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:s.concat([{b:/\(/,e:/\)/,k:c,c:s.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+e.IR+"[\\*&\\s]+)+"+i,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:i,rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[e.CLCM,e.CBCM,n,r,t]},e.CLCM,e.CBCM,a]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b:/</,e:/>/,c:["self"]},e.TM]}]),exports:{preprocessor:a,strings:n,k:c}}}),e.registerLanguage("jam",function(e){var t={cN:"keyword",bK:"local include return break continue for in switch if else module class while rule on actions case bind updated together ignore quietly piecemeal existing"},n={cN:"built_in",bK:"Always ALWAYS Depends DEPENDS echo Echo ECHO exit Exit EXIT Glob GLOB GLOB-RECURSIVELY Includes INCLUDES REBUILDS SPLIT_BY_CHARACTERS NoCare NOCARE NOTIME NotFile NOTFILE NoUpdate NOUPDATE Temporary TEMPORARY ISFILE HdrMacro HDRMACRO FAIL_EXPECTED RMOLD UPDATE subst SUBST RULENAMES VARNAMES DELETE_MODULE IMPORT EXPORT CALLER_MODULE BACKTRACE PWD IMPORT_MODULE IMPORTED_MODULES INSTANCE SORT NORMALIZE_PATH CALC NATIVE_RULE HAS_NATIVE_RULE USER_MODULE NEAREST_USER_LOCATION PYTHON_IMPORT_RULE W32_GETREG W32_GETREGNAMES SHELL COMMAND MD5 FILE_OPEN PAD PRECIOUS SELF_PATH MAKEDIR READLINK GLOB_ARCHIVE import using peek poke record-binding project use-project build-project exe lib alias obj explicit install make notfile unit-test compile compile-fail link link-fail run run-fail check-target-builds glob glob-tree always constant path-constant",l:"[a-zA-Z0-9_\\-]+"},r={b:"\\S+",e:"\\s",eE:!0,r:0},a={cN:"string",b:'"',e:'"',c:[e.BE],r:0},i={cN:"variable",v:[{b:"\\S*[$][(]",e:"[)]\\S*",c:[e.QSM]}]},c={cN:"title",b:"\\S+",e:"\\s+",eE:!0,r:0},s={cN:"function",bK:"rule",e:"\\s+[{]",i:"[{]",eE:!0,c:[{cN:"params",b:"[(]",e:"[)]",endsParent:!0},{b:"[{]",endsParent:!0,r:0},c]},o={cN:"meta-keyword",bK:"updated together ignore quietly piecemeal existing"},l={cN:"string",b:"[{]",e:"[}]",endsParent:!0,eB:!0,eE:!0,c:[i],r:0},u={cN:"function",bK:"actions",e:"[}]",c:[l,o,c]},p={cN:"class",bK:"class",e:"[:{]",i:"[:{]",eE:!0,c:[{b:"[:{]",endsParent:!0,rB:!0,r:0},c]},f={cN:"class",bK:"module",e:"[:{]",i:"[:{]",eE:!0,c:[{b:"[{]",endsParent:!0,rB:!0,r:0},c]};return{c:[e.C("[#][|]","[|][#]"),e.C("#","$"),s,u,f,p,i,n,t,a,r]}}),e});