consul/website/build/javascripts/prettify-b9b477f7.js

1 line
14 KiB
JavaScript
Raw Normal View History

2014-02-08 00:41:03 +00:00
!function(){var t=null;window.PR_SHOULD_USE_CONTINUATION=!0,function(){function e(t){function e(t){var e=t.charCodeAt(0);if(92!==e)return e;var n=t.charAt(1);return(e=h[n])?e:n>="0"&&"7">=n?parseInt(t.substring(1),8):"u"===n||"x"===n?parseInt(t.substring(2),16):t.charCodeAt(1)}function n(t){return 32>t?(16>t?"\\x0":"\\x")+t.toString(16):(t=String.fromCharCode(t),"\\"===t||"-"===t||"]"===t||"^"===t?"\\"+t:t)}function r(t){var r=t.substring(1,t.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),t=[],i="^"===r[0],o=["["];i&&o.push("^");for(var i=i?1:0,s=r.length;s>i;++i){var a=r[i];if(/\\[bdsw]/i.test(a))o.push(a);else{var l,a=e(a);s>i+2&&"-"===r[i+1]?(l=e(r[i+2]),i+=2):l=a,t.push([a,l]),65>l||a>122||(65>l||a>90||t.push([32|Math.max(65,a),32|Math.min(l,90)]),97>l||a>122||t.push([-33&Math.max(97,a),-33&Math.min(l,122)]))}}for(t.sort(function(t,e){return t[0]-e[0]||e[1]-t[1]}),r=[],s=[],i=0;i<t.length;++i)a=t[i],a[0]<=s[1]+1?s[1]=Math.max(s[1],a[1]):r.push(s=a);for(i=0;i<r.length;++i)a=r[i],o.push(n(a[0])),a[1]>a[0]&&(a[1]+1>a[0]&&o.push("-"),o.push(n(a[1])));return o.push("]"),o.join("")}function i(t){for(var e=t.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),i=e.length,a=[],l=0,u=0;i>l;++l){var c=e[l];"("===c?++u:"\\"===c.charAt(0)&&(c=+c.substring(1))&&(u>=c?a[c]=-1:e[l]=n(c))}for(l=1;l<a.length;++l)-1===a[l]&&(a[l]=++o);for(u=l=0;i>l;++l)c=e[l],"("===c?(++u,a[u]||(e[l]="(?:")):"\\"===c.charAt(0)&&(c=+c.substring(1))&&u>=c&&(e[l]="\\"+a[c]);for(l=0;i>l;++l)"^"===e[l]&&"^"!==e[l+1]&&(e[l]="");if(t.ignoreCase&&s)for(l=0;i>l;++l)c=e[l],t=c.charAt(0),c.length>=2&&"["===t?e[l]=r(c):"\\"!==t&&(e[l]=c.replace(/[A-Za-z]/g,function(t){return t=t.charCodeAt(0),"["+String.fromCharCode(-33&t,32|t)+"]"}));return e.join("")}for(var o=0,s=!1,a=!1,l=0,u=t.length;u>l;++l){var c=t[l];if(c.ignoreCase)a=!0;else if(/[a-z]/i.test(c.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0,a=!1;break}}for(var h={b:8,t:9,n:10,v:11,f:12,r:13},f=[],l=0,u=t.length;u>l;++l){if(c=t[l],c.global||c.multiline)throw Error(""+c);f.push("(?:"+i(c)+")")}return RegExp(f.join("|"),a?"gi":"g")}function n(t,e){function n(t){var l=t.nodeType;if(1==l){if(!r.test(t.className)){for(l=t.firstChild;l;l=l.nextSibling)n(l);l=t.nodeName.toLowerCase(),("br"===l||"li"===l)&&(i[a]="\n",s[a<<1]=o++,s[1|a++<<1]=t)}}else(3==l||4==l)&&(l=t.nodeValue,l.length&&(l=e?l.replace(/\r\n?/g,"\n"):l.replace(/[\t\n\r ]+/g," "),i[a]=l,s[a<<1]=o,o+=l.length,s[1|a++<<1]=t))}var r=/(?:^|\s)nocode(?:\s|$)/,i=[],o=0,s=[],a=0;return n(t),{a:i.join("").replace(/\n$/,""),d:s}}function r(t,e,n,r){e&&(t={a:e,e:t},n(t),r.push.apply(r,t.g))}function i(t){for(var e=void 0,n=t.firstChild;n;n=n.nextSibling)var r=n.nodeType,e=1===r?e?t:n:3===r?w.test(n.nodeValue)?t:e:e;return e===t?void 0:e}function o(n,i){function o(t){for(var e=t.e,n=[e,"pln"],c=0,h=t.a.match(s)||[],f={},p=0,d=h.length;d>p;++p){var g,m=h[p],v=f[m],y=void 0;if("string"==typeof v)g=!1;else{var x=a[m.charAt(0)];if(x)y=m.match(x[1]),v=x[0];else{for(g=0;l>g;++g)if(x=i[g],y=m.match(x[1])){v=x[0];break}y||(v="pln")}!(g=v.length>=5&&"lang-"===v.substring(0,5))||y&&"string"==typeof y[1]||(g=!1,v="src"),g||(f[m]=v)}if(x=c,c+=m.length,g){g=y[1];var b=m.indexOf(g),w=b+g.length;y[2]&&(w=m.length-y[2].length,b=w-g.length),v=v.substring(5),r(e+x,m.substring(0,b),o,n),r(e+x+b,g,u(v,g),n),r(e+x+w,m.substring(w),o,n)}else n.push(e+x,v)}t.g=n}var s,a={};!function(){for(var r=n.concat(i),o=[],l={},u=0,c=r.length;c>u;++u){var h=r[u],f=h[3];if(f)for(var p=f.length;--p>=0;)a[f.charAt(p)]=h;h=h[1],f=""+h,l.hasOwnProperty(f)||(o.push(h),l[f]=t)}o.push(/[\S\s]/),s=e(o)}();var l=i.length;return o}function s(e){var n=[],r=[];e.tripleQuotedStrings?n.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,t,"'\""]):e.multiLineStrings?n.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\