2024-01-13 22:13:16 +08:00
/ * P r i s m J S 1 . 2 9 . 0
2024-01-13 22:26:59 +08:00
https : //prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+c+cpp+dart+go+java+lua+markup-templating+php+python+ruby+rust+sql+zig&plugins=normalize-whitespace */
2024-01-13 22:13:16 +08:00
var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : { } , Prism = function ( e ) { var n = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i , t = 0 , r = { } , a = { manual : e . Prism && e . Prism . manual , disableWorkerMessageHandler : e . Prism && e . Prism . disableWorkerMessageHandler , util : { encode : function e ( n ) { return n instanceof i ? new i ( n . type , e ( n . content ) , n . alias ) : Array . isArray ( n ) ? n . map ( e ) : n . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . 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 e ( n , t ) { var r , i ; switch ( t = t || { } , a . util . type ( n ) ) { case "Object" : if ( i = a . util . objId ( n ) , t [ i ] ) return t [ i ] ; for ( var l in r = { } , t [ i ] = r , n ) n . hasOwnProperty ( l ) && ( r [ l ] = e ( n [ l ] , t ) ) ; return r ; case "Array" : return i = a . util . objId ( n ) , t [ i ] ? t [ i ] : ( r = [ ] , t [ i ] = r , n . forEach ( ( function ( n , a ) { r [ a ] = e ( n , t ) } ) ) , r ) ; default : return n } } , getLanguage : function ( e ) { for ( ; e ; ) { var t = n . exec ( e . className ) ; if ( t ) return t [ 1 ] . toLowerCase ( ) ; e = e . parentElement } return "none" } , setLanguage : function ( e , t ) { e . className = e . className . replace ( RegExp ( n , "gi" ) , "" ) , e . classList . add ( "language-" + t ) } , currentScript : function ( ) { if ( "undefined" == typeof document ) return null ; if ( "currentScript" in document ) return document . currentScript ; try { throw new Error } catch ( r ) { var e = ( /at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i . exec ( r . stack ) || [ ] ) [ 1 ] ; if ( e ) { var n = document . getElementsByTagName ( "script" ) ; for ( var t in n ) if ( n [ t ] . src == e ) return n [ t ] } return null } } , isActive : function ( e , n , t ) { for ( var r = "no-" + n ; e ; ) { var a = e . classList ; if ( a . contains ( n ) ) return ! 0 ; if ( a . contains ( r ) ) return ! 1 ; e = e . parentElement } return ! ! t } } , languages : { plain : r , plaintext : r , text : r , txt : r , extend : function ( e , n ) { var t = a . util . clone ( a . languages [ e ] ) ; for ( var r in n ) t [ r ] = n [ r ] ; return t } , insertBefore : function ( e , n , t , r ) { var i = ( r = r || a . languages ) [ e ] , l = { } ; for ( var o in i ) if ( i . hasOwnProperty ( o ) ) { if ( o == n ) for ( var s in t ) t . hasOwnProperty ( s ) && ( l [ s ] = t [ s ] ) ; t . hasOwnProperty ( o ) || ( l [ o ] = i [ o ] ) } var u = r [ e ] ; return r [ e ] = l , a . languages . DFS ( a . languages , ( function ( n , t ) { t === u && n != e && ( this [ n ] = l ) } ) ) , l } , DFS : function e ( n , t , r , i ) { i = i || { } ; var l = a . util . objId ; for ( var o in n ) if ( n . hasOwnProperty ( o ) ) { t . call ( n , o , n [ o ] , r || o ) ; var s = n [ o ] , u = a . util . type ( s ) ; "Object" !== u || i [ l ( s ) ] ? "Array" !== u || i [ l ( s ) ] || ( i [ l ( s ) ] = ! 0 , e ( s , t , o , i ) ) : ( i [ l ( s ) ] = ! 0 , e ( s , t , null , i ) ) } } } , plugins : { } , highlightAll : function ( e , n ) { a . highlightAllUnder ( document , e , n ) } , highlightAllUnder : function ( e , n , t ) { var r = { callback : t , container : e , selector : 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' } ; a . hooks . run ( "before-highlightall" , r ) , r . elements = Array . prototype . slice . apply ( r . container . querySelectorAll ( r . selector ) ) , a . hooks . run ( "before-all-elements-highlight" , r ) ; for ( var i , l = 0 ; i = r . elements [ l ++ ] ; ) a . highlightElement ( i , ! 0 === n , r . callback ) } , highlightElement : function ( n , t , r ) { var i = a . util . getLanguage ( n ) , l = a . languages [ i ] ; a . util . setLanguage ( n , i ) ; var o = n . parentElement ; o && "pre" === o . nodeName . toLowerCase ( ) && a . util . setLanguage ( o , i ) ; var s = { element : n , language : i , grammar : l , code : n . textContent } ; function u ( e ) { s . highlightedCode = e , a . hooks . run ( "before-insert" , s ) , s . element . innerHTML = s . highlightedCode , a . hooks . run ( "after-highlight" , s ) , a . hooks . run ( "complete" , s ) , r && r . call ( s . element ) } if ( a . hooks . run ( "before-sanity-check" , s ) , ( o = s . element . parentElement ) && "pre" === o . nodeName . toLowerCase ( ) && ! o . hasAttribute ( "tabindex" ) && o . setAttribute ( "tabindex" , "0" ) , ! s . code ) return a . hooks . run ( "complete" , s ) , void ( r && r . call ( s . element ) ) ; if ( a . hooks . run ( "before-highlight" , s ) , s . grammar ) if ( t && e . Worker ) { var c = new Worker ( a . filename ) ; c . onmessage = function ( e ) { u ( e . data ) } , c . postMessage ( JSON . stringify ( { language : s . language , code : s . code , immediateClose : ! 0 } ) ) } else u ( a . highlight ( s . code , s . grammar , s . language ) ) ; else u ( a . util . encode ( s . code ) ) } , highlight : function ( e , n , t ) { var r = { code : e , grammar : n , language : t } ; if ( a . hooks . run ( "before-tokenize" , r ) , ! r . grammar ) throw new Error ( 'The language "' + r . language + '" has no grammar.' ) ; return r . tokens = a . tokenize ( r . code , r . grammar ) , a . hooks . run ( "after-tokenize" , r ) , i . stringify ( a . util . encode ( r . tokens ) , r . language ) } , tokenize : function ( e , n ) { var t = n . rest ; if (
Prism . languages . markup = { comment : { pattern : /<!--(?:(?!<!--)[\s\S])*?-->/ , greedy : ! 0 } , prolog : { pattern : /<\?[\s\S]+?\?>/ , greedy : ! 0 } , doctype : { pattern : /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i , greedy : ! 0 , inside : { "internal-subset" : { pattern : /(^[^\[]*\[)[\s\S]+(?=\]>$)/ , lookbehind : ! 0 , greedy : ! 0 , inside : null } , string : { pattern : /"[^"]*"|'[^']*'/ , greedy : ! 0 } , punctuation : /^<!|>$|[[\]]/ , "doctype-tag" : /^DOCTYPE/i , name : /[^\s<>'"]+/ } } , cdata : { pattern : /<!\[CDATA\[[\s\S]*?\]\]>/i , greedy : ! 0 } , tag : { pattern : /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/ , greedy : ! 0 , inside : { tag : { pattern : /^<\/?[^\s>\/]+/ , inside : { punctuation : /^<\/?/ , namespace : /^[^\s>\/:]+:/ } } , "special-attr" : [ ] , "attr-value" : { pattern : /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/ , inside : { punctuation : [ { pattern : /^=/ , alias : "attr-equals" } , { pattern : /^(\s*)["']|["']$/ , lookbehind : ! 0 } ] } } , punctuation : /\/?>/ , "attr-name" : { pattern : /[^\s>\/]+/ , inside : { namespace : /^[^\s>\/:]+:/ } } } } , entity : [ { pattern : /&[\da-z]{1,8};/i , alias : "named-entity" } , /&#x?[\da-f]{1,8};/i ] } , Prism . languages . markup . tag . inside [ "attr-value" ] . inside . entity = Prism . languages . markup . entity , Prism . languages . markup . doctype . inside [ "internal-subset" ] . inside = Prism . languages . markup , Prism . hooks . add ( "wrap" , ( function ( a ) { "entity" === a . type && ( a . attributes . title = a . content . replace ( /&/ , "&" ) ) } ) ) , Object . defineProperty ( Prism . languages . markup . tag , "addInlined" , { value : function ( a , e ) { var s = { } ; s [ "language-" + e ] = { pattern : /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i , lookbehind : ! 0 , inside : Prism . languages [ e ] } , s . cdata = /^<!\[CDATA\[|\]\]>$/i ; var t = { "included-cdata" : { pattern : /<!\[CDATA\[[\s\S]*?\]\]>/i , inside : s } } ; t [ "language-" + e ] = { pattern : /[\s\S]+/ , inside : Prism . languages [ e ] } ; var n = { } ; n [ a ] = { pattern : RegExp ( "(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)" . replace ( /__/g , ( function ( ) { return a } ) ) , "i" ) , lookbehind : ! 0 , greedy : ! 0 , inside : t } , Prism . languages . insertBefore ( "markup" , "cdata" , n ) } } ) , Object . defineProperty ( Prism . languages . markup . tag , "addAttribute" , { value : function ( a , e ) { Prism . languages . markup . tag . inside [ "special-attr" ] . push ( { pattern : RegExp ( "(^|[\"'\\s])(?:" + a + ")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))" , "i" ) , lookbehind : ! 0 , inside : { "attr-name" : /^[^\s=]+/ , "attr-value" : { pattern : /=[\s\S]+/ , inside : { value : { pattern : /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/ , lookbehind : ! 0 , alias : [ e , "language-" + e ] , inside : Prism . languages [ e ] } , punctuation : [ { pattern : /^=/ , alias : "attr-equals" } , /"|'/ ] } } } } ) } } ) , Prism . languages . html = Prism . languages . markup , Prism . languages . mathml = Prism . languages . markup , Prism . languages . svg = Prism . languages . markup , Prism . languages . xml = Prism . languages . extend ( "markup" , { } ) , Prism . languages . ssml = Prism . languages . xml , Prism . languages . atom = Prism . languages . xml , Prism . languages . rss = Prism . languages . xml ;
! function ( s ) { var e = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/ ; s . languages . css = { comment : /\/\*[\s\S]*?\*\// , atrule : { pattern : RegExp ( "@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|" + e . source + ")*?(?:;|(?=\\s*\\{))" ) , inside : { rule : /^@[\w-]+/ , "selector-function-argument" : { pattern : /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/ , lookbehind : ! 0 , alias : "selector" } , keyword : { pattern : /(^|[^\w-])(?:and|not|only|or)(?![\w-])/ , lookbehind : ! 0 } } } , url : { pattern : RegExp ( "\\burl\\((?:" + e . source + "|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)" , "i" ) , greedy : ! 0 , inside : { function : /^url/i , punctuation : /^\(|\)$/ , string : { pattern : RegExp ( "^" + e . source + "$" ) , alias : "url" } } } , selector : { pattern : RegExp ( "(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + e . source + ")*(?=\\s*\\{)" ) , lookbehind : ! 0 } , string : { pattern : e , greedy : ! 0 } , property : { pattern : /(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i , lookbehind : ! 0 } , important : /!important\b/i , function : { pattern : /(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i , lookbehind : ! 0 } , punctuation : /[(){};:,]/ } , s . languages . css . atrule . inside . rest = s . languages . css ; var t = s . languages . markup ; t && ( t . tag . addInlined ( "style" , "css" ) , t . tag . addAttribute ( "style" , "css" ) ) } ( Prism ) ;
Prism . languages . clike = { comment : [ { pattern : /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 , greedy : ! 0 } ] , string : { pattern : /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , "class-name" : { pattern : /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i , lookbehind : ! 0 , inside : { punctuation : /[.\\]/ } } , keyword : /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/ , boolean : /\b(?:false|true)\b/ , function : /\b\w+(?=\()/ , number : /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i , operator : /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/ , punctuation : /[{}[\];(),.:]/ } ;
Prism . languages . javascript = Prism . languages . extend ( "clike" , { "class-name" : [ Prism . languages . clike [ "class-name" ] , { pattern : /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/ , lookbehind : ! 0 } ] , keyword : [ { pattern : /((?:^|\})\s*)catch\b/ , lookbehind : ! 0 } , { pattern : /(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ , lookbehind : ! 0 } ] , function : /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/ , number : { pattern : RegExp ( "(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])" ) , lookbehind : ! 0 } , operator : /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ } ) , Prism . languages . javascript [ "class-name" ] [ 0 ] . pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/ , Prism . languages . insertBefore ( "javascript" , "keyword" , { regex : { pattern : RegExp ( "((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))" ) , lookbehind : ! 0 , greedy : ! 0 , inside : { "regex-source" : { pattern : /^(\/)[\s\S]+(?=\/[a-z]*$)/ , lookbehind : ! 0 , alias : "language-regex" , inside : Prism . languages . regex } , "regex-delimiter" : /^\/|\/$/ , "regex-flags" : /^[a-z]+$/ } } , "function-variable" : { pattern : /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/ , alias : "function" } , parameter : [ { pattern : /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/ , lookbehind : ! 0 , inside : Prism . languages . javascript } , { pattern : /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i , lookbehind : ! 0 , inside : Prism . languages . javascript } , { pattern : /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/ , lookbehind : ! 0 , inside : Prism . languages . javascript } , { pattern : /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/ , lookbehind : ! 0 , inside : Prism . languages . javascript } ] , constant : /\b[A-Z](?:[A-Z_]|\dx?)*\b/ } ) , Prism . languages . insertBefore ( "javascript" , "string" , { hashbang : { pattern : /^#!.*/ , greedy : ! 0 , alias : "comment" } , "template-string" : { pattern : /`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/ , greedy : ! 0 , inside : { "template-punctuation" : { pattern : /^`|`$/ , alias : "string" } , interpolation : { pattern : /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/ , lookbehind : ! 0 , inside : { "interpolation-punctuation" : { pattern : /^\$\{|\}$/ , alias : "punctuation" } , rest : Prism . languages . javascript } } , string : /[\s\S]+/ } } , "string-property" : { pattern : /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m , lookbehind : ! 0 , greedy : ! 0 , alias : "property" } } ) , Prism . languages . insertBefore ( "javascript" , "operator" , { "literal-property" : { pattern : / ( ( ? : ^
Prism . languages . c = Prism . languages . extend ( "clike" , { comment : { pattern : /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/ , greedy : ! 0 } , string : { pattern : /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/ , greedy : ! 0 } , "class-name" : { pattern : /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/ , lookbehind : ! 0 } , keyword : /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/ , function : /\b[a-z_]\w*(?=\s*\()/i , number : /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i , operator : />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ } ) , Prism . languages . insertBefore ( "c" , "string" , { char : { pattern : /'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/ , greedy : ! 0 } } ) , Prism . languages . insertBefore ( "c" , "string" , { macro : { pattern : /(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im , lookbehind : ! 0 , greedy : ! 0 , alias : "property" , inside : { string : [ { pattern : /^(#\s*include\s*)<[^>]+>/ , lookbehind : ! 0 } , Prism . languages . c . string ] , char : Prism . languages . c . char , comment : Prism . languages . c . comment , "macro-name" : [ { pattern : /(^#\s*define\s+)\w+\b(?!\()/i , lookbehind : ! 0 } , { pattern : /(^#\s*define\s+)\w+\b(?=\()/i , lookbehind : ! 0 , alias : "function" } ] , directive : { pattern : /^(#\s*)[a-z]+/ , lookbehind : ! 0 , alias : "keyword" } , "directive-hash" : /^#/ , punctuation : /##|\\(?=[\r\n])/ , expression : { pattern : /\S[\s\S]*/ , inside : Prism . languages . c } } } } ) , Prism . languages . insertBefore ( "c" , "function" , { constant : /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ } ) , delete Prism . languages . c . boolean ;
! function ( e ) { var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/ , n = "\\b(?!<keyword>)\\w+(?:\\s*\\.\\s*\\w+)*\\b" . replace ( /<keyword>/g , ( function ( ) { return t . source } ) ) ; e . languages . cpp = e . languages . extend ( "c" , { "class-name" : [ { pattern : RegExp ( "(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+" . replace ( /<keyword>/g , ( function ( ) { return t . source } ) ) ) , lookbehind : ! 0 } , /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/ , /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i , /\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/ ] , keyword : t , number : { pattern : /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i , greedy : ! 0 } , operator : />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ , boolean : /\b(?:false|true)\b/ } ) , e . languages . insertBefore ( "cpp" , "string" , { module : { pattern : RegExp ( '(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|' + "<mod-name>(?:\\s*:\\s*<mod-name>)?|:\\s*<mod-name>" . replace ( /<mod-name>/g , ( function ( ) { return n } ) ) + ")" ) , lookbehind : ! 0 , greedy : ! 0 , inside : { string : /^[<"][\s\S]+/ , operator : /:/ , punctuation : /\./ } } , "raw-string" : { pattern : /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/ , alias : "string" , greedy : ! 0 } } ) , e . languages . insertBefore ( "cpp" , "keyword" , { "generic-function" : { pattern : /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i , inside : { function : /^\w+/ , generic : { pattern : /<[\s\S]+/ , alias : "class-name" , inside : e . languages . cpp } } } } ) , e . languages . insertBefore ( "cpp" , "operator" , { "double-colon" : { pattern : /::/ , alias : "punctuation" } } ) , e . languages . insertBefore ( "cpp" , "class-name" , { "base-clause" : { pattern : /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/ , lookbehind : ! 0 , greedy : ! 0 , inside : e . languages . extend ( "cpp" , { } ) } } ) , e . languages . insertBefore ( "inside" , "double-colon" , { "class-name" : /\b[a-z_]\w*\b(?!\s*::)/i } , e . languages . cpp [ "base-clause" ] ) } ( Prism ) ;
2024-01-13 22:26:59 +08:00
! function ( e ) { var a = [ /\b(?:async|sync|yield)\*/ , /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/ ] , n = "(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*" , s = { pattern : RegExp ( n + "[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b" ) , lookbehind : ! 0 , inside : { namespace : { pattern : /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/ , inside : { punctuation : /\./ } } } } ; e . languages . dart = e . languages . extend ( "clike" , { "class-name" : [ s , { pattern : RegExp ( n + "[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])" ) , lookbehind : ! 0 , inside : s . inside } ] , keyword : a , operator : /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/ } ) , e . languages . insertBefore ( "dart" , "string" , { "string-literal" : { pattern : /r?(?:("""|''')[\s\S]*?\1|(["'])(?:\\.|(?!\2)[^\\\r\n])*\2(?!\2))/ , greedy : ! 0 , inside : { interpolation : { pattern : /((?:^|[^\\])(?:\\{2})*)\$(?:\w+|\{(?:[^{}]|\{[^{}]*\})*\})/ , lookbehind : ! 0 , inside : { punctuation : /^\$\{?|\}$/ , expression : { pattern : /[\s\S]+/ , inside : e . languages . dart } } } , string : /[\s\S]+/ } } , string : void 0 } ) , e . languages . insertBefore ( "dart" , "class-name" , { metadata : { pattern : /@\w+/ , alias : "function" } } ) , e . languages . insertBefore ( "dart" , "class-name" , { generics : { pattern : /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/ , inside : { "class-name" : s , keyword : a , punctuation : /[<>(),.:]/ , operator : /[?&|]/ } } } ) } ( Prism ) ;
2024-01-13 22:13:16 +08:00
Prism . languages . go = Prism . languages . extend ( "clike" , { string : { pattern : /(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/ , lookbehind : ! 0 , greedy : ! 0 } , keyword : /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/ , boolean : /\b(?:_|false|iota|nil|true)\b/ , number : [ /\b0(?:b[01_]+|o[0-7_]+)i?\b/i , /\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i , /(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i ] , operator : /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./ , builtin : /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ } ) , Prism . languages . insertBefore ( "go" , "string" , { char : { pattern : /'(?:\\.|[^'\\\r\n]){0,10}'/ , greedy : ! 0 } } ) , delete Prism . languages . go [ "class-name" ] ;
! function ( e ) { var n = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/ , t = "(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*" , s = { pattern : RegExp ( "(^|[^\\w.])" + t + "[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b" ) , lookbehind : ! 0 , inside : { namespace : { pattern : /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/ , inside : { punctuation : /\./ } } , punctuation : /\./ } } ; e . languages . java = e . languages . extend ( "clike" , { string : { pattern : /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/ , lookbehind : ! 0 , greedy : ! 0 } , "class-name" : [ s , { pattern : RegExp ( "(^|[^\\w.])" + t + "[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()]|\\s*(?:\\[[\\s,]*\\]\\s*)?::\\s*new\\b)" ) , lookbehind : ! 0 , inside : s . inside } , { pattern : RegExp ( "(\\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\\s+)" + t + "[A-Z]\\w*\\b" ) , lookbehind : ! 0 , inside : s . inside } ] , keyword : n , function : [ e . languages . clike . function , { pattern : /(::\s*)[a-z_]\w*/ , lookbehind : ! 0 } ] , number : /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i , operator : { pattern : /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m , lookbehind : ! 0 } , constant : /\b[A-Z][A-Z_\d]+\b/ } ) , e . languages . insertBefore ( "java" , "string" , { "triple-quoted-string" : { pattern : /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/ , greedy : ! 0 , alias : "string" } , char : { pattern : /'(?:\\.|[^'\\\r\n]){1,6}'/ , greedy : ! 0 } } ) , e . languages . insertBefore ( "java" , "class-name" , { annotation : { pattern : /(^|[^.])@\w+(?:\s*\.\s*\w+)*/ , lookbehind : ! 0 , alias : "punctuation" } , generics : { pattern : /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/ , inside : { "class-name" : s , keyword : n , punctuation : /[<>(),.:]/ , operator : /[?&|]/ } } , import : [ { pattern : RegExp ( "(\\bimport\\s+)" + t + "(?:[A-Z]\\w*|\\*)(?=\\s*;)" ) , lookbehind : ! 0 , inside : { namespace : s . inside . namespace , punctuation : /\./ , operator : /\*/ , "class-name" : /\w+/ } } , { pattern : RegExp ( "(\\bimport\\s+static\\s+)" + t + "(?:\\w+|\\*)(?=\\s*;)" ) , lookbehind : ! 0 , alias : "static" , inside : { namespace : s . inside . namespace , static : /\b\w+$/ , punctuation : /\./ , operator : /\*/ , "class-name" : /\w+/ } } ] , namespace : { pattern : RegExp ( "(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?" . replace ( /<keyword>/g , ( function ( ) { return n . source } ) ) ) , lookbehind : ! 0 , inside : { punctuation : /\./ } } } ) } ( Prism ) ;
Prism . languages . lua = { comment : /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m , string : { pattern : /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/ , greedy : ! 0 } , number : /\b0x[a-f\d]+(?:\.[a-f\d]*)?(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|(?:\.\d*)?(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i , keyword : /\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/ , function : /(?!\d)\w+(?=\s*(?:[({]))/ , operator : [ /[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/ , { pattern : /(^|[^.])\.\.(?!\.)/ , lookbehind : ! 0 } ] , punctuation : /[\[\](){},;]|\.+|:+/ } ;
! function ( e ) { function n ( e , n ) { return "___" + e . toUpperCase ( ) + n + "___" } Object . defineProperties ( e . languages [ "markup-templating" ] = { } , { buildPlaceholders : { value : function ( t , a , r , o ) { if ( t . language === a ) { var c = t . tokenStack = [ ] ; t . code = t . code . replace ( r , ( function ( e ) { if ( "function" == typeof o && ! o ( e ) ) return e ; for ( var r , i = c . length ; - 1 !== t . code . indexOf ( r = n ( a , i ) ) ; ) ++ i ; return c [ i ] = e , r } ) ) , t . grammar = e . languages . markup } } } , tokenizePlaceholders : { value : function ( t , a ) { if ( t . language === a && t . tokenStack ) { t . grammar = e . languages [ a ] ; var r = 0 , o = Object . keys ( t . tokenStack ) ; ! function c ( i ) { for ( var u = 0 ; u < i . length && ! ( r >= o . length ) ; u ++ ) { var g = i [ u ] ; if ( "string" == typeof g || g . content && "string" == typeof g . content ) { var l = o [ r ] , s = t . tokenStack [ l ] , f = "string" == typeof g ? g : g . content , p = n ( a , l ) , k = f . indexOf ( p ) ; if ( k > - 1 ) { ++ r ; var m = f . substring ( 0 , k ) , d = new e . Token ( a , e . tokenize ( s , t . grammar ) , "language-" + a , s ) , h = f . substring ( k + p . length ) , v = [ ] ; m && v . push . apply ( v , c ( [ m ] ) ) , v . push ( d ) , h && v . push . apply ( v , c ( [ h ] ) ) , "string" == typeof g ? i . splice . apply ( i , [ u , 1 ] . concat ( v ) ) : g . content = v } } else g . content && c ( g . content ) } return i } ( t . tokens ) } } } } ) } ( Prism ) ;
! function ( e ) { var a = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/ , t = [ { pattern : /\b(?:false|true)\b/i , alias : "boolean" } , { pattern : /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i , greedy : ! 0 , lookbehind : ! 0 } , /\b(?:null)\b/i , /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/ ] , i = /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i , n = /<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/ , s = /[{}\[\](),:;]/ ; e . languages . php = { delimiter : { pattern : /\?>$|^<\?(?:php(?=\s)|=)?/i , alias : "important" } , comment : a , variable : /\$+(?:\w+\b|(?=\{))/ , package : { pattern : /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i , lookbehind : ! 0 , inside : { punctuation : /\\/ } } , "class-name-definition" : { pattern : /(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i , lookbehind : ! 0 , alias : "class-name" } , "function-definition" : { pattern : /(\bfunction\s+)[a-z_]\w*(?=\s*\()/i , lookbehind : ! 0 , alias : "function" } , keyword : [ { pattern : /(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i , alias : "type-casting" , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i , alias : "type-hint" , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i , alias : "return-type" , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i , alias : "type-declaration" , greedy : ! 0 } , { pattern : /(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i , alias : "type-declaration" , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /\b(?:parent|self|static)(?=\s*::)/i , alias : "static-context" , greedy : ! 0 } , { pattern : /(\byield\s+)from\b/i , lookbehind : ! 0 } , /\bclass\b/i , { pattern : /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i , lookbehind : ! 0 } ] , "argument-name" : { pattern : /([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i , lookbehind : ! 0 } , "class-name" : [ { pattern : /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /(\|\s*)\b[a-z_]\w*(?!\\)\b/i , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i , greedy : ! 0 } , { pattern : /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i , alias : "class-name-fully-qualified" , greedy : ! 0 , lookbehind : ! 0 , inside : { punctuation : /\\/ } } , { pattern : /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i , alias : "class-name-fully-qualified" , greedy : ! 0 , inside : { punctuation : /\\/ } } , { pattern : /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i , alias : "class-name-fully-qualified" , greedy : ! 0 , lookbehind : ! 0 , inside : { punctuation : /\\/ } } , { pattern : /\b[a-z_]\w*(?=\s*\$)/i , alias : "type-declaration" , greedy : ! 0 } , { pattern : /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i , alias : [ "class-name-fully-qualified" , "type-declaration" ] , greedy : ! 0 , inside : { punctuation : /\\/ } } , { pattern : /\b[a-z_]\w*(?=\s*::)/i , alias : "static-context" , greedy : ! 0 } , { pattern : /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i , alias : [ "class-name-fully-qualified" , "static-context" ] , greedy : ! 0 , inside : { punctuation : /\\/ } } , { pattern : /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i , alias : "type-hint" , greedy : ! 0 , lookbehind : ! 0 } , { pattern : /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i , alias : [ "class-name-fully-qualified" , "type-hint" ] , greedy : ! 0 , lookbehind : ! 0 , inside : { punctuation : /\\/ } } , { pattern : /(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i , alias : "return-type" , greedy : ! 0 , lookbehind : ! 0 } , { pattern : / ( \ ) \ s * : \ s * ( ? : \ ? \ s * ) ? ) ( ? : \ \ ? \ b [ a - z _ ] \ w * ) + \ b ( ?
Prism . languages . python = { comment : { pattern : /(^|[^\\])#.*/ , lookbehind : ! 0 , greedy : ! 0 } , "string-interpolation" : { pattern : /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i , greedy : ! 0 , inside : { interpolation : { pattern : /((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/ , lookbehind : ! 0 , inside : { "format-spec" : { pattern : /(:)[^:(){}]+(?=\}$)/ , lookbehind : ! 0 } , "conversion-option" : { pattern : // , alias : "punctuation" } , rest : null } } , string : /[\s\S]+/ } } , "triple-quoted-string" : { pattern : /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i , greedy : ! 0 , alias : "string" } , string : { pattern : /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i , greedy : ! 0 } , function : { pattern : /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g , lookbehind : ! 0 } , "class-name" : { pattern : /(\bclass\s+)\w+/i , lookbehind : ! 0 } , decorator : { pattern : /(^[\t ]*)@\w+(?:\.\w+)*/m , lookbehind : ! 0 , alias : [ "annotation" , "punctuation" ] , inside : { punctuation : /\./ } } , keyword : /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/ , builtin : /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/ , boolean : /\b(?:False|None|True)\b/ , number : /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i , operator : /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/ , punctuation : /[{}[\];(),.:]/ } , Prism . languages . python [ "string-interpolation" ] . inside . interpolation . inside . rest = Prism . languages . python , Prism . languages . py = Prism . languages . python ;
! function ( e ) { e . languages . ruby = e . languages . extend ( "clike" , { comment : { pattern : /#.*|^=begin\s[\s\S]*?^=end/m , greedy : ! 0 } , "class-name" : { pattern : /(\b(?:class|module)\s+|\bcatch\s+\()[\w.\\]+|\b[A-Z_]\w*(?=\s*\.\s*new\b)/ , lookbehind : ! 0 , inside : { punctuation : /[.\\]/ } } , keyword : /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/ , operator : /\.{2,3}|&\.|===|<?=>|[!=]?~|(?:&&|\|\||<<|>>|\*\*|[+\-*/%<>!^&|=])=?|[?:]/ , punctuation : /[(){}[\].,;]/ } ) , e . languages . insertBefore ( "ruby" , "operator" , { "double-colon" : { pattern : /::/ , alias : "punctuation" } } ) ; var n = { pattern : /((?:^|[^\\])(?:\\{2})*)#\{(?:[^{}]|\{[^{}]*\})*\}/ , lookbehind : ! 0 , inside : { content : { pattern : /^(#\{)[\s\S]+(?=\}$)/ , lookbehind : ! 0 , inside : e . languages . ruby } , delimiter : { pattern : /^#\{|\}$/ , alias : "punctuation" } } } ; delete e . languages . ruby . function ; var t = "(?:" + [ "([^a-zA-Z0-9\\s{(\\[<=])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1" , "\\((?:[^()\\\\]|\\\\[^]|\\((?:[^()\\\\]|\\\\[^])*\\))*\\)" , "\\{(?:[^{}\\\\]|\\\\[^]|\\{(?:[^{}\\\\]|\\\\[^])*\\})*\\}" , "\\[(?:[^\\[\\]\\\\]|\\\\[^]|\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\])*\\]" , "<(?:[^<>\\\\]|\\\\[^]|<(?:[^<>\\\\]|\\\\[^])*>)*>" ] . join ( "|" ) + ")" , i = '(?:"(?:\\\\.|[^"\\\\\r\n])*"|(?:\\b[a-zA-Z_]\\w*|[^\\s\0-\\x7F]+)[?!]?|\\$.)' ; e . languages . insertBefore ( "ruby" , "keyword" , { "regex-literal" : [ { pattern : RegExp ( "%r" + t + "[egimnosux]{0,6}" ) , greedy : ! 0 , inside : { interpolation : n , regex : /[\s\S]+/ } } , { pattern : /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/ , lookbehind : ! 0 , greedy : ! 0 , inside : { interpolation : n , regex : /[\s\S]+/ } } ] , variable : /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/ , symbol : [ { pattern : RegExp ( "(^|[^:]):" + i ) , lookbehind : ! 0 , greedy : ! 0 } , { pattern : RegExp ( "([\r\n{(,][ \t]*)" + i + "(?=:(?!:))" ) , lookbehind : ! 0 , greedy : ! 0 } ] , "method-definition" : { pattern : /(\bdef\s+)\w+(?:\s*\.\s*\w+)?/ , lookbehind : ! 0 , inside : { function : /\b\w+$/ , keyword : /^self\b/ , "class-name" : /^\w+/ , punctuation : /\./ } } } ) , e . languages . insertBefore ( "ruby" , "string" , { "string-literal" : [ { pattern : RegExp ( "%[qQiIwWs]?" + t ) , greedy : ! 0 , inside : { interpolation : n , string : /[\s\S]+/ } } , { pattern : /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/ , greedy : ! 0 , inside : { interpolation : n , string : /[\s\S]+/ } } , { pattern : /<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i , alias : "heredoc-string" , greedy : ! 0 , inside : { delimiter : { pattern : /^<<[-~]?[a-z_]\w*|\b[a-z_]\w*$/i , inside : { symbol : /\b\w+/ , punctuation : /^<<[-~]?/ } } , interpolation : n , string : /[\s\S]+/ } } , { pattern : /<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i , alias : "heredoc-string" , greedy : ! 0 , inside : { delimiter : { pattern : /^<<[-~]?'[a-z_]\w*'|\b[a-z_]\w*$/i , inside : { symbol : /\b\w+/ , punctuation : /^<<[-~]?'|'$/ } } , string : /[\s\S]+/ } } ] , "command-literal" : [ { pattern : RegExp ( "%x" + t ) , greedy : ! 0 , inside : { interpolation : n , command : { pattern : /[\s\S]+/ , alias : "string" } } } , { pattern : /`(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|[^\\`#\r\n])*`/ , greedy : ! 0 , inside : { interpolation : n , command : { pattern : /[\s\S]+/ , alias : "string" } } } ] } ) , delete e . languages . ruby . string , e . languages . insertBefore ( "ruby" , "number" , { builtin : /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/ , constant : /\b[A-Z][A-Z0-9_]*(?:[?!]|\b)/ } ) , e . languages . rb = e . languages . ruby } ( Prism ) ;
! function ( e ) { for ( var a = "/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|<self>)*\\*/" , t = 0 ; t < 2 ; t ++ ) a = a . replace ( /<self>/g , ( function ( ) { return a } ) ) ; a = a . replace ( /<self>/g , ( function ( ) { return "[^\\s\\S]" } ) ) , e . languages . rust = { comment : [ { pattern : RegExp ( "(^|[^\\\\])" + a ) , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 , greedy : ! 0 } ] , string : { pattern : /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/ , greedy : ! 0 } , char : { pattern : /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/ , greedy : ! 0 } , attribute : { pattern : /#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/ , greedy : ! 0 , alias : "attr-name" , inside : { string : null } } , "closure-params" : { pattern : /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/ , lookbehind : ! 0 , greedy : ! 0 , inside : { "closure-punctuation" : { pattern : /^\||\|$/ , alias : "punctuation" } , rest : null } } , "lifetime-annotation" : { pattern : /'\w+/ , alias : "symbol" } , "fragment-specifier" : { pattern : /(\$\w+:)[a-z]+/ , lookbehind : ! 0 , alias : "punctuation" } , variable : /\$\w+/ , "function-definition" : { pattern : /(\bfn\s+)\w+/ , lookbehind : ! 0 , alias : "function" } , "type-definition" : { pattern : /(\b(?:enum|struct|trait|type|union)\s+)\w+/ , lookbehind : ! 0 , alias : "class-name" } , "module-declaration" : [ { pattern : /(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/ , lookbehind : ! 0 , alias : "namespace" } , { pattern : /(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/ , lookbehind : ! 0 , alias : "namespace" , inside : { punctuation : /::/ } } ] , keyword : [ /\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/ , /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/ ] , function : /\b[a-z_]\w*(?=\s*(?:::\s*<|\())/ , macro : { pattern : /\b\w+!/ , alias : "property" } , constant : /\b[A-Z_][A-Z_\d]+\b/ , "class-name" : /\b[A-Z]\w*\b/ , namespace : { pattern : /(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/ , inside : { punctuation : /::/ } } , number : /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/ , boolean : /\b(?:false|true)\b/ , punctuation : /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/ , operator : /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ } , e . languages . rust [ "closure-params" ] . inside . rest = e . languages . rust , e . languages . rust . attribute . inside . string = e . languages . rust . string } ( Prism ) ;
Prism . languages . sql = { comment : { pattern : /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/ , lookbehind : ! 0 } , variable : [ { pattern : /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/ , greedy : ! 0 } , /@[\w.$]+/ ] , string : { pattern : /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/ , greedy : ! 0 , lookbehind : ! 0 } , identifier : { pattern : /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/ , greedy : ! 0 , lookbehind : ! 0 , inside : { punctuation : /^`|`$/ } } , function : /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i , keyword : /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i , boolean : /\b(?:FALSE|NULL|TRUE)\b/i , number : /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i , operator : /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i , punctuation : /[;[\]()`,.]/ } ;
! function ( e ) { function n ( e ) { return function ( ) { return e } } var r = /\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/ , a = "\\b(?!" + r . source + ")(?!\\d)\\w+\\b" , o = "align\\s*\\((?:[^()]|\\([^()]*\\))*\\)" , s = "(?!\\s)(?:!?\\s*(?:" + "(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*<ALIGN>|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)" . replace ( /<ALIGN>/g , n ( o ) ) + "\\s*)*" + "(?:\\bpromise\\b|(?:\\berror\\.)?<ID>(?:\\.<ID>)*(?!\\s+<ID>))" . replace ( /<ID>/g , n ( a ) ) + ")+" ; e . languages . zig = { comment : [ { pattern : /\/\/[/!].*/ , alias : "doc-comment" } , /\/{2}.*/ ] , string : [ { pattern : /(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/ , lookbehind : ! 0 , greedy : ! 0 } ] , char : { pattern : /(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/ , lookbehind : ! 0 , greedy : ! 0 } , builtin : /\B@(?!\d)\w+(?=\s*\()/ , label : { pattern : /(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/ , lookbehind : ! 0 } , "class-name" : [ /\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/ , { pattern : RegExp ( "(:\\s*)<TYPE>(?=\\s*(?:<ALIGN>\\s*)?[=;,)])|<TYPE>(?=\\s*(?:<ALIGN>\\s*)?\\{)" . replace ( /<TYPE>/g , n ( s ) ) . replace ( /<ALIGN>/g , n ( o ) ) ) , lookbehind : ! 0 , inside : null } , { pattern : RegExp ( "(\\)\\s*)<TYPE>(?=\\s*(?:<ALIGN>\\s*)?;)" . replace ( /<TYPE>/g , n ( s ) ) . replace ( /<ALIGN>/g , n ( o ) ) ) , lookbehind : ! 0 , inside : null } ] , "builtin-type" : { pattern : /\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/ , alias : "keyword" } , keyword : r , function : /\b(?!\d)\w+(?=\s*\()/ , number : /\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/ , boolean : /\b(?:false|true)\b/ , operator : /\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/ , punctuation : /[.:,;(){}[\]]/ } , e . languages . zig [ "class-name" ] . forEach ( ( function ( n ) { null === n . inside && ( n . inside = e . languages . zig ) } ) ) } ( Prism ) ;
! function ( ) { if ( "undefined" != typeof Prism ) { var e = Object . assign || function ( e , t ) { for ( var n in t ) t . hasOwnProperty ( n ) && ( e [ n ] = t [ n ] ) ; return e } , t = { "remove-trailing" : "boolean" , "remove-indent" : "boolean" , "left-trim" : "boolean" , "right-trim" : "boolean" , "break-lines" : "number" , indent : "number" , "remove-initial-line-feed" : "boolean" , "tabs-to-spaces" : "number" , "spaces-to-tabs" : "number" } ; n . prototype = { setDefaults : function ( t ) { this . defaults = e ( this . defaults , t ) } , normalize : function ( t , n ) { for ( var r in n = e ( this . defaults , n ) ) { var i = r . replace ( /-(\w)/g , ( function ( e , t ) { return t . toUpperCase ( ) } ) ) ; "normalize" !== r && "setDefaults" !== i && n [ r ] && this [ i ] && ( t = this [ i ] . call ( this , t , n [ r ] ) ) } return t } , leftTrim : function ( e ) { return e . replace ( /^\s+/ , "" ) } , rightTrim : function ( e ) { return e . replace ( /\s+$/ , "" ) } , tabsToSpaces : function ( e , t ) { return t = 0 | t || 4 , e . replace ( /\t/g , new Array ( ++ t ) . join ( " " ) ) } , spacesToTabs : function ( e , t ) { return t = 0 | t || 4 , e . replace ( RegExp ( " {" + t + "}" , "g" ) , "\t" ) } , removeTrailing : function ( e ) { return e . replace ( /\s*?$/gm , "" ) } , removeInitialLineFeed : function ( e ) { return e . replace ( /^(?:\r?\n|\r)/ , "" ) } , removeIndent : function ( e ) { var t = e . match ( /^[^\S\n\r]*(?=\S)/gm ) ; return t && t [ 0 ] . length ? ( t . sort ( ( function ( e , t ) { return e . length - t . length } ) ) , t [ 0 ] . length ? e . replace ( RegExp ( "^" + t [ 0 ] , "gm" ) , "" ) : e ) : e } , indent : function ( e , t ) { return e . replace ( /^[^\S\n\r]*(?=\S)/gm , new Array ( ++ t ) . join ( "\t" ) + "$&" ) } , breakLines : function ( e , t ) { t = ! 0 === t ? 80 : 0 | t || 80 ; for ( var n = e . split ( "\n" ) , i = 0 ; i < n . length ; ++ i ) if ( ! ( r ( n [ i ] ) <= t ) ) { for ( var o = n [ i ] . split ( /(\s+)/g ) , a = 0 , l = 0 ; l < o . length ; ++ l ) { var s = r ( o [ l ] ) ; ( a += s ) > t && ( o [ l ] = "\n" + o [ l ] , a = s ) } n [ i ] = o . join ( "" ) } return n . join ( "\n" ) } } , "undefined" != typeof module && module . exports && ( module . exports = n ) , Prism . plugins . NormalizeWhitespace = new n ( { "remove-trailing" : ! 0 , "remove-indent" : ! 0 , "left-trim" : ! 0 , "right-trim" : ! 0 } ) , Prism . hooks . add ( "before-sanity-check" , ( function ( e ) { var n = Prism . plugins . NormalizeWhitespace ; if ( ( ! e . settings || ! 1 !== e . settings [ "whitespace-normalization" ] ) && Prism . util . isActive ( e . element , "whitespace-normalization" , ! 0 ) ) if ( e . element && e . element . parentNode || ! e . code ) { var r = e . element . parentNode ; if ( e . code && r && "pre" === r . nodeName . toLowerCase ( ) ) { for ( var i in null == e . settings && ( e . settings = { } ) , t ) if ( Object . hasOwnProperty . call ( t , i ) ) { var o = t [ i ] ; if ( r . hasAttribute ( "data-" + i ) ) try { var a = JSON . parse ( r . getAttribute ( "data-" + i ) || "true" ) ; typeof a === o && ( e . settings [ i ] = a ) } catch ( e ) { } } for ( var l = r . childNodes , s = "" , c = "" , u = ! 1 , m = 0 ; m < l . length ; ++ m ) { var f = l [ m ] ; f == e . element ? u = ! 0 : "#text" === f . nodeName && ( u ? c += f . nodeValue : s += f . nodeValue , r . removeChild ( f ) , -- m ) } if ( e . element . children . length && Prism . plugins . KeepMarkup ) { var d = s + e . element . innerHTML + c ; e . element . innerHTML = n . normalize ( d , e . settings ) , e . code = e . element . textContent } else e . code = s + e . code + c , e . code = n . normalize ( e . code , e . settings ) } } else e . code = n . normalize ( e . code , e . settings ) } ) ) } function n ( t ) { this . defaults = e ( { } , t ) } function r ( e ) { for ( var t = 0 , n = 0 ; n < e . length ; ++ n ) e . charCodeAt ( n ) == "\t" . charCodeAt ( 0 ) && ( t += 3 ) ; return e . length + t } } ( ) ;