1/**
2 * SyntaxHighlighter
3 * http://alexgorbatchev.com/SyntaxHighlighter
4 *
5 * SyntaxHighlighter is donationware. If you are using it, please donate.
6 * http://alexgorbatchev.com/SyntaxHighlighter/donate.html
7 *
8 * @version
9 * 3.0.90 (Sat, 18 Jun 2016 21:01:41 GMT)
10 *
11 * @copyright
12 * Copyright (C) 2004-2013 Alex Gorbatchev.
13 *
14 * @license
15 * Dual licensed under the MIT and GPL licenses.
16 */
17var XRegExp;if(XRegExp=XRegExp||function(e){"use strict";function t(e,t,n){var r;for(r in c.prototype)c.prototype.hasOwnProperty(r)&&(e[r]=c.prototype[r]);return e.xregexp={captureNames:t,isNative:!!n},e}function n(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}function r(e,r,i){if(!c.isRegExp(e))throw new TypeError("type RegExp expected");var a=p.replace.call(n(e)+(r||""),E,"");return i&&(a=p.replace.call(a,RegExp("["+i+"]+","g"),"")),e=e.xregexp&&!e.xregexp.isNative?t(c(e.source,a),e.xregexp.captureNames?e.xregexp.captureNames.slice(0):null):t(RegExp(e.source,a),null,!0)}function i(e,t){var n=e.length;if(Array.prototype.lastIndexOf)return e.lastIndexOf(t);for(;n--;)if(e[n]===t)return n;return-1}function a(e,t){return Object.prototype.toString.call(e).toLowerCase()==="[object "+t+"]"}function l(e){return e=e||{},"all"===e||e.all?e={natives:!0,extensibility:!0}:a(e,"string")&&(e=c.forEach(e,/[^\s,]+/,function(e){this[e]=!0},{})),e}function s(e,t,n,r){var i,a,l=m.length,s=null;R=!0;try{for(;l--;)if(a=m[l],!("all"!==a.scope&&a.scope!==n||a.trigger&&!a.trigger.call(r))&&(a.pattern.lastIndex=t,i=d.exec.call(a.pattern,e),i&&i.index===t)){s={output:a.handler.call(r,i,n),match:i};break}}catch(o){throw o}finally{R=!1}return s}function o(e){c.addToken=g[e?"on":"off"],f.extensibility=e}function u(e){RegExp.prototype.exec=(e?d:p).exec,RegExp.prototype.test=(e?d:p).test,String.prototype.match=(e?d:p).match,String.prototype.replace=(e?d:p).replace,String.prototype.split=(e?d:p).split,f.natives=e}var c,g,h,f={natives:!1,extensibility:!1},p={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},d={},x={},m=[],v="default",b="class",y={"default":/^(?:\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S])|\(\?[:=!]|[?*+]\?|{\d+(?:,\d*)?}\??)/,"class":/^(?:\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u[\dA-Fa-f]{4}|c[A-Za-z]|[\s\S]))/},w=/\$(?:{([\w$]+)}|(\d\d?|[\s\S]))/g,E=/([\s\S])(?=[\s\S]*\1)/g,S=/^(?:[?*+]|{\d+(?:,\d*)?})\??/,N=p.exec.call(/()??/,"")[1]===e,H=RegExp.prototype.sticky!==e,R=!1,T="gim"+(H?"y":"");return c=function(n,i){if(c.isRegExp(n)){if(i!==e)throw new TypeError("can't supply flags when constructing one RegExp from another");return r(n)}if(R)throw Error("can't call the XRegExp constructor within token definition functions");var a,l,o,u=[],g=v,h={hasNamedCapture:!1,captureNames:[],hasFlag:function(e){return i.indexOf(e)>-1}},f=0;if(n=n===e?"":n+"",i=i===e?"":i+"",p.match.call(i,E))throw new SyntaxError("invalid duplicate regular expression flag");for(n=p.replace.call(n,/^\(\?([\w$]+)\)/,function(e,t){if(p.test.call(/[gy]/,t))throw new SyntaxError("can't use flag g or y in mode modifier");return i=p.replace.call(i+t,E,""),""}),c.forEach(i,/[\s\S]/,function(e){if(0>T.indexOf(e[0]))throw new SyntaxError("invalid regular expression flag "+e[0])});n.length>f;)a=s(n,f,g,h),a?(u.push(a.output),f+=a.match[0].length||1):(l=p.exec.call(y[g],n.slice(f)),l?(u.push(l[0]),f+=l[0].length):(o=n.charAt(f),"["===o?g=b:"]"===o&&(g=v),u.push(o),++f));return t(RegExp(u.join(""),p.replace.call(i,/[^gimy]+/g,"")),h.hasNamedCapture?h.captureNames:null)},g={on:function(e,t,n){n=n||{},e&&m.push({pattern:r(e,"g"+(H?"y":"")),handler:t,scope:n.scope||v,trigger:n.trigger||null}),n.customFlags&&(T=p.replace.call(T+n.customFlags,E,""))},off:function(){throw Error("extensibility must be installed before using addToken")}},c.addToken=g.off,c.cache=function(e,t){var n=e+"/"+(t||"");return x[n]||(x[n]=c(e,t))},c.escape=function(e){return p.replace.call(e,/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},c.exec=function(e,t,n,i){var a,l=r(t,"g"+(i&&H?"y":""),i===!1?"y":"");return l.lastIndex=n=n||0,a=d.exec.call(l,e),i&&a&&a.index!==n&&(a=null),t.global&&(t.lastIndex=a?l.lastIndex:0),a},c.forEach=function(e,t,n,r){for(var i,a=0,l=-1;i=c.exec(e,t,a);)n.call(r,i,++l,e,t),a=i.index+(i[0].length||1);return r},c.globalize=function(e){return r(e,"g")},c.install=function(e){e=l(e),!f.natives&&e.natives&&u(!0),!f.extensibility&&e.extensibility&&o(!0)},c.isInstalled=function(e){return!!f[e]},c.isRegExp=function(e){return a(e,"regexp")},c.matchChain=function(e,t){return function n(e,r){var i,a=t[r].regex?t[r]:{regex:t[r]},l=[],s=function(e){l.push(a.backref?e[a.backref]||"":e[0])};for(i=0;e.length>i;++i)c.forEach(e[i],a.regex,s);return r!==t.length-1&&l.length?n(l,r+1):l}([e],0)},c.replace=function(t,n,i,a){var l,s=c.isRegExp(n),o=n;return s?(a===e&&n.global&&(a="all"),o=r(n,"all"===a?"g":"","all"===a?"":"g")):"all"===a&&(o=RegExp(c.escape(n+""),"g")),l=d.replace.call(t+"",o,i),s&&n.global&&(n.lastIndex=0),l},c.split=function(e,t,n){return d.split.call(e,t,n)},c.test=function(e,t,n,r){return!!c.exec(e,t,n,r)},c.uninstall=function(e){e=l(e),f.natives&&e.natives&&u(!1),f.extensibility&&e.extensibility&&o(!1)},c.union=function(e,t){var n,r,i,l,s=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*]/g,o=0,u=function(e,t,i){var a=r[o-n];if(t){if(++o,a)return"(?<"+a+">"}else if(i)return"\\"+(+i+n);return e},g=[];if(!a(e,"array")||!e.length)throw new TypeError("patterns must be a nonempty array");for(l=0;e.length>l;++l)i=e[l],c.isRegExp(i)?(n=o,r=i.xregexp&&i.xregexp.captureNames||[],g.push(c(i.source).source.replace(s,u))):g.push(c.escape(i));return c(g.join("|"),t)},c.version="2.0.0",d.exec=function(t){var r,a,l,s,o;if(this.global||(s=this.lastIndex),r=p.exec.apply(this,arguments)){if(!N&&r.length>1&&i(r,"")>-1&&(l=RegExp(this.source,p.replace.call(n(this),"g","")),p.replace.call((t+"").slice(r.index),l,function(){var t;for(t=1;arguments.length-2>t;++t)arguments[t]===e&&(r[t]=e)})),this.xregexp&&this.xregexp.captureNames)for(o=1;r.length>o;++o)a=this.xregexp.captureNames[o-1],a&&(r[a]=r[o]);this.global&&!r[0].length&&this.lastIndex>r.index&&(this.lastIndex=r.index)}return this.global||(this.lastIndex=s),r},d.test=function(e){return!!d.exec.call(this,e)},d.match=function(e){if(c.isRegExp(e)){if(e.global){var t=p.match.apply(this,arguments);return e.lastIndex=0,t}}else e=RegExp(e);return d.exec.call(e,this)},d.replace=function(e,t){var n,r,l,s,o=c.isRegExp(e);return o?(e.xregexp&&(n=e.xregexp.captureNames),e.global||(s=e.lastIndex)):e+="",a(t,"function")?r=p.replace.call(this+"",e,function(){var r,i=arguments;if(n)for(i[0]=new String(i[0]),r=0;n.length>r;++r)n[r]&&(i[0][n[r]]=i[r+1]);return o&&e.global&&(e.lastIndex=i[i.length-2]+i[0].length),t.apply(null,i)}):(l=this+"",r=p.replace.call(l,e,function(){var e=arguments;return p.replace.call(t+"",w,function(t,r,a){var l;if(r){if(l=+r,e.length-3>=l)return e[l]||"";if(l=n?i(n,r):-1,0>l)throw new SyntaxError("backreference to undefined group "+t);return e[l+1]||""}if("$"===a)return"$";if("&"===a||0===+a)return e[0];if("`"===a)return e[e.length-1].slice(0,e[e.length-2]);if("'"===a)return e[e.length-1].slice(e[e.length-2]+e[0].length);if(a=+a,!isNaN(a)){if(a>e.length-3)throw new SyntaxError("backreference to undefined group "+t);return e[a]||""}throw new SyntaxError("invalid token "+t)})})),o&&(e.lastIndex=e.global?0:s),r},d.split=function(t,n){if(!c.isRegExp(t))return p.split.apply(this,arguments);var r,i=this+"",a=t.lastIndex,l=[],s=0;return n=(n===e?-1:n)>>>0,c.forEach(i,t,function(e){e.index+e[0].length>s&&(l.push(i.slice(s,e.index)),e.length>1&&e.index<i.length&&Array.prototype.push.apply(l,e.slice(1)),r=e[0].length,s=e.index+r)}),s===i.length?(!p.test.call(t,"")||r)&&l.push(""):l.push(i.slice(s)),t.lastIndex=a,l.length>n?l.slice(0,n):l},h=g.on,h(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4})|x(?![\dA-Fa-f]{2}))/,function(e,t){if("B"===e[1]&&t===v)return e[0];throw new SyntaxError("invalid escape "+e[0])},{scope:"all"}),h(/\[(\^?)]/,function(e){return e[1]?"[\\s\\S]":"\\b\\B"}),h(/(?:\(\?#[^)]*\))+/,function(e){return p.test.call(S,e.input.slice(e.index+e[0].length))?"":"(?:)"}),h(/\\k<([\w$]+)>/,function(e){var t=isNaN(e[1])?i(this.captureNames,e[1])+1:+e[1],n=e.index+e[0].length;if(!t||t>this.captureNames.length)throw new SyntaxError("backreference to undefined group "+e[0]);return"\\"+t+(n===e.input.length||isNaN(e.input.charAt(n))?"":"(?:)")}),h(/(?:\s+|#.*)+/,function(e){return p.test.call(S,e.input.slice(e.index+e[0].length))?"":"(?:)"},{trigger:function(){return this.hasFlag("x")},customFlags:"x"}),h(/\./,function(){return"[\\s\\S]"},{trigger:function(){return this.hasFlag("s")},customFlags:"s"}),h(/\(\?P?<([\w$]+)>/,function(e){if(!isNaN(e[1]))throw new SyntaxError("can't use integer as capture name "+e[0]);return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("}),h(/\\(\d+)/,function(e,t){if(!(t===v&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&"0"!==e[1])throw new SyntaxError("can't use octal escape or backreference to undefined group "+e[0]);return e[0]},{scope:"all"}),h(/\((?!\?)/,function(){return this.hasFlag("n")?"(?:":(this.captureNames.push(null),"(")},{customFlags:"n"}),"undefined"!=typeof exports&&(exports.XRegExp=c),c}(),SyntaxHighlighter===void 0)var SyntaxHighlighter=function(){function e(e){return document.createElement("div").appendChild(document.createTextNode(e)).parentNode.innerHTML.replace(/"/g,"&quot;")}function t(e,t){return-1!=e.className.indexOf(t)}function n(e,n){t(e,n)||(e.className+=" "+n)}function r(e,t){e.className=e.className.replace(t,"")}function i(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(e[n]);return t}function a(e){return e.split(/\r?\n/)}function l(e){var t="highlighter_";return 0==e.indexOf(t)?e:t+e}function s(e){return B.vars.highlighters[l(e)]}function o(e){return document.getElementById(l(e))}function u(e){B.vars.highlighters[l(e.id)]=e}function c(e,t,n){if(null==e)return null;var r,i,a=1!=n?e.childNodes:[e.parentNode],l={"#":"id",".":"className"}[t.substr(0,1)]||"nodeName";if(r="nodeName"!=l?t.substr(1):t.toUpperCase(),-1!=(e[l]||"").indexOf(r))return e;for(var s=0,o=a.length;a&&o>s&&null==i;s++)i=c(a[s],t,n);return i}function g(e,t){return c(e,t,!0)}function h(e,t,n){n=Math.max(n||0,0);for(var r=n,i=e.length;i>r;r++)if(e[r]==t)return r;return-1}function f(e){return(e||"")+(""+Math.round(1e6*Math.random()))}function p(e,t){var n,r={};for(n in e)r[n]=e[n];for(n in t)r[n]=t[n];return r}function d(e){var t={"true":!0,"false":!1}[e];return null==t?e:t}function x(e,t,n,r,i){var a=(screen.width-n)/2,l=(screen.height-r)/2;i+=", left="+a+", top="+l+", width="+n+", height="+r,i=i.replace(/^,/,"");var s=window.open(e,t,i);return s.focus(),s}function m(e,t,n,r){function i(e){e=e||window.event,e.target||(e.target=e.srcElement,e.preventDefault=function(){this.returnValue=!1}),n.call(r||window,e)}e.attachEvent?e.attachEvent("on"+t,i):e.addEventListener(t,i,!1)}function v(e){window.alert(B.config.strings.alert+e)}function b(e,t){var n=B.vars.discoveredBrushes,r=null;if(null==n){n={};for(var i in B.brushes){var a=B.brushes[i],l=a.aliases;if(null!=l){a.brushName=i.toLowerCase();for(var s=0,o=l.length;o>s;s++)n[l[s]]=i}}B.vars.discoveredBrushes=n}return r=B.brushes[n[e]],null==r&&t&&v(B.config.strings.noBrush+e),r}function y(e,t){for(var n=a(e),r=0,i=n.length;i>r;r++)n[r]=t(n[r],r);return n.join("\r\n")}function w(e){return e.replace(/^[ ]*[\n]+|[\n]*[ ]*$/g,"")}function E(e){for(var t,n={},r=XRegExp("^\\[(?<values>(.*?))\\]$"),i=0,a=XRegExp("(?<name>[\\w-]+)\\s*:\\s*(?<value>[\\w%#-]+|\\[.*?\\]|\".*?\"|'.*?')\\s*;?","g");null!=(t=XRegExp.exec(e,a,i));){var l=t.value.replace(/^['"]|['"]$/g,"");if(null!=l&&r.test(l)){var s=XRegExp.exec(l,r);l=s.values.length>0?s.values.split(/\s*,\s*/):[]}n[t.name]=l,i=t.index+t[0].length}return n}function S(e,t){return null==e||0==e.length||"\n"==e?e:(e=e.replace(/</g,"&lt;"),e=e.replace(/ {2,}/g,function(e){for(var t="",n=0,r=e.length;r-1>n;n++)t+=B.config.space;return t+" "}),null!=t&&(e=y(e,function(e){if(0==e.length)return"";var n="";return e=e.replace(/^(&nbsp;| )+/,function(e){return n=e,""}),0==e.length?n:n+'<code class="'+t+'">'+e+"</code>"})),e)}function N(e,t){for(var n=""+e;t>n.length;)n="0"+n;return n}function H(e,t){for(var n="",r=0;t>r;r++)n+=" ";return e.replace(/\t/g,n)}function R(e,t){function n(e,t,n){return e.substr(0,t)+i.substr(0,n)+e.substr(t+1,e.length)}for(var r=(a(e),"	"),i="",l=0;50>l;l++)i+="                    ";return e=y(e,function(e){if(-1==e.indexOf(r))return e;for(var i=0;-1!=(i=e.indexOf(r));){var a=t-i%t;e=n(e,i,a)}return e})}function T(e){var t=/<br\s*\/?>|&lt;br\s*\/?&gt;/gi;return 1==B.config.bloggerMode&&(e=e.replace(t,"\n")),1==B.config.stripBrs&&(e=e.replace(t,"")),e}function C(e){return e.replace(/^\s+|\s+$/g,"")}function P(e){for(var t=a(T(e)),n=/^\s*/,r=1e3,i=0,l=t.length;l>i&&r>0;i++){var s=t[i];if(0!=C(s).length){var o=n.exec(s);if(null==o)return e;r=Math.min(o[0].length,r)}}if(r>0)for(var i=0,l=t.length;l>i;i++)t[i]=t[i].substr(r);return t.join("\n")}function k(e,t){return e.index<t.index?-1:e.index>t.index?1:e.length<t.length?-1:e.length>t.length?1:0}function L(e,t){function n(e){return e[0]}var r=null,i=[],a=t.func?t.func:n;for(pos=0;null!=(r=XRegExp.exec(e,t.regex,pos));){var l=a(r,t);"string"==typeof l&&(l=[new B.Match(l,r.index,t.css)]),i=i.concat(l),pos=r.index+r[0].length}return i}function I(e){var t=/(.*)((&gt;|&lt;).*)/;return e.replace(B.regexLib.url,function(e){var n="",r=null;return(r=t.exec(e))&&(e=r[1],n=r[2]),'<a href="'+e+'">'+e+"</a>"+n})}function A(){for(var e=document.getElementsByTagName("script"),t=[],n=0,r=e.length;r>n;n++)"syntaxhighlighter"==e[n].type&&t.push(e[n]);return t}function M(e){var t="<![CDATA[",n="]]>",r=C(e),i=!1,a=t.length,l=n.length;0==r.indexOf(t)&&(r=r.substring(a),i=!0);var s=r.length;return r.indexOf(n)==s-l&&(r=r.substring(0,s-l),i=!0),i?r:e}function X(e){var t,i=e.target,a=g(i,".syntaxhighlighter"),l=g(i,".container"),o=document.createElement("textarea");if(l&&a&&!c(l,"textarea")){t=s(a.id),n(a,"source");for(var u=l.childNodes,h=[],f=0,p=u.length;p>f;f++)h.push(u[f].innerText||u[f].textContent);h=h.join("\r"),h=h.replace(/\u00a0/g," "),o.appendChild(document.createTextNode(h)),l.appendChild(o),o.focus(),o.select(),m(o,"blur",function(){o.parentNode.removeChild(o),r(a,"source")})}}"undefined"!=typeof require&&XRegExp===void 0&&(XRegExp=require("xregexp").XRegExp);var B={defaults:{"class-name":"","first-line":1,"pad-line-numbers":!1,highlight:null,title:null,"smart-tabs":!0,"tab-size":4,gutter:!0,toolbar:!0,"quick-code":!0,collapse:!1,"auto-links":!0,light:!1,unindent:!0,"html-script":!1},config:{space:"&nbsp;",useScriptTags:!0,bloggerMode:!1,stripBrs:!1,tagName:"pre",strings:{expandSource:"expand source",help:"?",alert:"SyntaxHighlighter\n\n",noBrush:"Can't find brush for: ",brushNotHtmlScript:"Brush wasn't configured for html-script option: ",aboutDialog:'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>About SyntaxHighlighter</title></head><body style="font-family:Geneva,Arial,Helvetica,sans-serif;background-color:#fff;color:#000;font-size:1em;text-align:center;"><div style="text-align:center;margin-top:1.5em;"><div style="font-size:xx-large;">SyntaxHighlighter</div><div style="font-size:.75em;margin-bottom:3em;"><div>version 3.0.90 (Sat, 18 Jun 2016 21:01:41 GMT)</div><div><a href="http://alexgorbatchev.com/SyntaxHighlighter" target="_blank" style="color:#005896">http://alexgorbatchev.com/SyntaxHighlighter</a></div><div>JavaScript code syntax highlighter.</div><div>Copyright 2004-2013 Alex Gorbatchev.</div></div><div>If you like this script, please <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2930402" style="color:#005896">donate</a> to <br/>keep development active!</div></div></body></html>'}},vars:{discoveredBrushes:null,highlighters:{}},brushes:{},regexLib:{multiLineCComments:XRegExp("/\\*.*?\\*/","gs"),singleLineCComments:/\/\/.*$/gm,singleLinePerlComments:/#.*$/gm,doubleQuotedString:/"([^\\"\n]|\\.)*"/g,singleQuotedString:/'([^\\'\n]|\\.)*'/g,multiLineDoubleQuotedString:XRegExp('"([^\\\\"]|\\\\.)*"',"gs"),multiLineSingleQuotedString:XRegExp("'([^\\\\']|\\\\.)*'","gs"),xmlComments:XRegExp("(&lt;|<)!--.*?--(&gt;|>)","gs"),url:/\w+:\/\/[\w-.\/?%&=:@;#]*/g,phpScriptTags:{left:/(&lt;|<)\?(?:=|php)?/g,right:/\?(&gt;|>)/g,eof:!0},aspScriptTags:{left:/(&lt;|<)%=?/g,right:/%(&gt;|>)/g},scriptScriptTags:{left:/(&lt;|<)\s*script.*?(&gt;|>)/gi,right:/(&lt;|<)\/\s*script\s*(&gt;|>)/gi}},toolbar:{getHtml:function(e){function t(e,t){return B.toolbar.getButtonHtml(e,t,B.config.strings[t])}for(var n='<div class="toolbar">',r=B.toolbar.items,i=r.list,a=0,l=i.length;l>a;a++)n+=(r[i[a]].getHtml||t)(e,i[a]);return n+="</div>"},getButtonHtml:function(t,n,r){return n=e(n),'<span><a href="#" class="toolbar_item command_'+n+" "+n+'">'+e(r)+"</a></span>"},handler:function(e){function t(e){var t=RegExp(e+"_(\\w+)"),n=t.exec(r);return n?n[1]:null}var n=e.target,r=n.className||"",i=s(g(n,".syntaxhighlighter").id),a=t("command");i&&a&&B.toolbar.items[a].execute(i),e.preventDefault()},items:{list:["expandSource","help"],expandSource:{getHtml:function(e){if(1!=e.getParam("collapse"))return"";var t=e.getParam("title");return B.toolbar.getButtonHtml(e,"expandSource",t?t:B.config.strings.expandSource)},execute:function(e){var t=o(e.id);r(t,"collapsed")}},help:{execute:function(){var e=x("","_blank",500,250,"scrollbars=0"),t=e.document;t.write(B.config.strings.aboutDialog),t.close(),e.focus()}}}},findElements:function(e,t){var n=t?[t]:i(document.getElementsByTagName(B.config.tagName)),r=B.config,a=[];if(r.useScriptTags&&(n=n.concat(A())),0===n.length)return a;for(var l=0,s=n.length;s>l;l++){var o={target:n[l],params:p(e,E(n[l].className))};null!=o.params.brush&&a.push(o)}return a},highlight:function(e,t){var n=this.findElements(e,t),r="innerHTML",i=null,a=B.config;if(0!==n.length)for(var l=0,s=n.length;s>l;l++){var o,t=n[l],u=t.target,c=t.params,g=c.brush;if(null!=g){if("true"==c["html-script"]||1==B.defaults["html-script"])i=new B.HtmlScript(g),g="htmlscript";else{var h=b(g);if(!h)continue;i=new h}o=u[r],a.useScriptTags&&(o=M(o)),""!=(u.title||"")&&(c.title=u.title),c.brush=g,i.init(c),t=i.getDiv(o),""!=(u.id||"")&&(t.id=u.id),u.parentNode.replaceChild(t,u)}}},all:function(e){m(window,"load",function(){B.highlight(e)})}};return B.Match=function(e,t,n){this.value=e,this.index=t,this.length=e.length,this.css=n,this.brushName=null},B.Match.prototype.toString=function(){return this.value},B.HtmlScript=function(e){function t(e,t){for(var n=0,r=e.length;r>n;n++)e[n].index+=t}function n(e){for(var n,a=e.code,l=[],s=r.regexList,o=e.index+e.left.length,u=r.htmlScript,c=0,g=s.length;g>c;c++)n=L(a,s[c]),t(n,o),l=l.concat(n);null!=u.left&&null!=e.left&&(n=L(e.left,u.left),t(n,e.index),l=l.concat(n)),null!=u.right&&null!=e.right&&(n=L(e.right,u.right),t(n,e.index+e[0].lastIndexOf(e.right)),l=l.concat(n));for(var h=0,g=l.length;g>h;h++)l[h].brushName=i.brushName;return l}var r,i=b(e),a=new B.brushes.Xml,l=this,s="getDiv getHtml init".split(" ");if(null!=i){r=new i;for(var o=0,u=s.length;u>o;o++)(function(){var e=s[o];l[e]=function(){return a[e].apply(a,arguments)}})();return null==r.htmlScript?(v(B.config.strings.brushNotHtmlScript+e),void 0):(a.regexList.push({regex:r.htmlScript.code,func:n}),void 0)}},B.Highlighter=function(){},B.Highlighter.prototype={getParam:function(e,t){var n=this.params[e];return d(null==n?t:n)},create:function(e){return document.createElement(e)},findMatches:function(e,t){var n=[];if(null!=e)for(var r=0,i=e.length;i>r;r++)"object"==typeof e[r]&&(n=n.concat(L(t,e[r])));return this.removeNestedMatches(n.sort(k))},removeNestedMatches:function(e){for(var t=0,n=e.length;n>t;t++)if(null!==e[t])for(var r=e[t],i=r.index+r.length,a=t+1,n=e.length;n>a&&null!==e[t];a++){var l=e[a];if(null!==l){if(l.index>i)break;l.index==r.index&&l.length>r.length?e[t]=null:l.index>=r.index&&i>l.index&&(e[a]=null)}}return e},figureOutLineNumbers:function(e){var t=[],n=parseInt(this.getParam("first-line"));return y(e,function(e,r){t.push(r+n)}),t},isLineHighlighted:function(e){var t=this.getParam("highlight",[]);return"object"!=typeof t&&null==t.push&&(t=[t]),-1!=h(t,""+e)},getLineHtml:function(e,t,n){var r=["line","number"+t,"index"+e,"alt"+(""+(0==t%2?1:2))];return this.isLineHighlighted(t)&&r.push("highlighted"),0==t&&r.push("break"),'<div class="'+r.join(" ")+'">'+n+"</div>"},getLineNumbersHtml:function(e,t){var n="",r=a(e).length,i=parseInt(this.getParam("first-line")),l=this.getParam("pad-line-numbers");1==l?l=(""+(i+r-1)).length:1==isNaN(l)&&(l=0);for(var s=0;r>s;s++){var o=t?t[s]:i+s,e=0==o?B.config.space:N(o,l);n+=this.getLineHtml(s,o,e)}return n},getCodeLinesHtml:function(e,t){e=C(e);for(var n=a(e),r=(this.getParam("pad-line-numbers"),parseInt(this.getParam("first-line"))),e="",i=this.getParam("brush"),l=0,s=n.length;s>l;l++){var o=n[l],u=/^(&nbsp;|\s)+/.exec(o),c=null,g=t?t[l]:r+l;null!=u&&(c=""+u[0],o=o.substr(c.length),c=c.replace(" ",B.config.space)),o=C(o),0==o.length&&(o=B.config.space),e+=this.getLineHtml(l,g,(null!=c?'<code class="'+i+' spaces">'+c+"</code>":"")+o)}return e},getTitleHtml:function(t){return t?"<caption>"+e(t)+"</caption>":""},getMatchesHtml:function(e,t){function n(e){var t=e?e.brushName||a:a;return t?t+" ":""}for(var r=0,i="",a=this.getParam("brush",""),l=0,s=t.length;s>l;l++){var o,u=t[l];null!==u&&0!==u.length&&(o=n(u),i+=S(e.substr(r,u.index-r),o+"plain")+S(u.value,o+u.css),r=u.index+u.length+(u.offset||0))}return i+=S(e.substr(r),n()+"plain")},getHtml:function(t){var n,r,i,a="",s=["syntaxhighlighter"];return 1==this.getParam("light")&&(this.params.toolbar=this.params.gutter=!1),className="syntaxhighlighter",1==this.getParam("collapse")&&s.push("collapsed"),0==(gutter=this.getParam("gutter"))&&s.push("nogutter"),s.push(this.getParam("class-name")),s.push(this.getParam("brush")),t=w(t).replace(/\r/g," "),n=this.getParam("tab-size"),t=1==this.getParam("smart-tabs")?R(t,n):H(t,n),this.getParam("unindent")&&(t=P(t)),gutter&&(i=this.figureOutLineNumbers(t)),r=this.findMatches(this.regexList,t),a=this.getMatchesHtml(t,r),a=this.getCodeLinesHtml(a,i),this.getParam("auto-links")&&(a=I(a)),"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.match(/MSIE/)&&s.push("ie"),a='<div id="'+l(this.id)+'" class="'+e(s.join(" "))+'">'+(this.getParam("toolbar")?B.toolbar.getHtml(this):"")+'<table border="0" cellpadding="0" cellspacing="0">'+this.getTitleHtml(this.getParam("title"))+"<tbody>"+"<tr>"+(gutter?'<td class="gutter">'+this.getLineNumbersHtml(t)+"</td>":"")+'<td class="code">'+'<div class="container">'+a+"</div>"+"</td>"+"</tr>"+"</tbody>"+"</table>"+"</div>"},getDiv:function(e){null===e&&(e=""),this.code=e;var t=this.create("div");return t.innerHTML=this.getHtml(e),this.getParam("toolbar")&&m(c(t,".toolbar"),"click",B.toolbar.handler),this.getParam("quick-code")&&m(c(t,".code"),"dblclick",X),t},init:function(e){this.id=f(),u(this),this.params=p(B.defaults,e||{}),1==this.getParam("light")&&(this.params.toolbar=this.params.gutter=!1)},getKeywords:function(e){return e=e.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"|"),"\\b(?:"+e+")\\b"},forHtmlScript:function(e){var t={end:e.right.source};e.eof&&(t.end="(?:(?:"+t.end+")|$)"),this.htmlScript={left:{regex:e.left,css:"script"},right:{regex:e.right,css:"script"},code:XRegExp("(?<left>"+e.left.source+")"+"(?<code>.*?)"+"(?<right>"+t.end+")","sgi")}}},B}();"undefined"!=typeof exports?exports.SyntaxHighlighter=SyntaxHighlighter:null;