var XRegExp;(function(){function p(r,o){if(!XRegExp.isRegExp(r)){throw TypeError("type RegExp expected")}var q=r._xregexp;r=XRegExp(r.source,n(r)+(o||""));if(q){r._xregexp={source:q.source,captureNames:q.captureNames?q.captureNames.slice(0):null}}return r}function n(o){return(o.global?"g":"")+(o.ignoreCase?"i":"")+(o.multiline?"m":"")+(o.extended?"x":"")+(o.sticky?"y":"")}function g(s,o,r,x){var w=k.length,v,u,t;f=true;try{for(;w--;){t=k[w];if(r&t.scope&&(!t.trigger||t.trigger.call(x))){t.pattern.lastIndex=o;if((u=t.pattern.exec(s))&&u.index===o){v={output:t.handler.call(x,u,r),match:u};break}}}}catch(q){throw q}finally{f=false}return v}function d(r,o,q){if(Array.prototype.indexOf){return r.indexOf(o,q)}for(q=q||0;q-1},setFlag:function(w){r+=w}};o1&&d(q,"")>-1){r=RegExp(this.source,e.replace.call(n(this),"g",""));e.replace.call(s.toString().slice(q.index),r,function(){for(var t=1;tq.index&&this.lastIndex--}return q};if(!i){RegExp.prototype.test=function(o){(o=e.exec.call(this,o))&&this.global&&!o[0].length&&this.lastIndex>o.index&&this.lastIndex--;return !!o}}String.prototype.match=function(q){XRegExp.isRegExp(q)||(q=RegExp(q));if(q.global){var o=e.match.apply(this,arguments);q.lastIndex=0;return o}return q.exec(this)};String.prototype.replace=function(t,r){var s=XRegExp.isRegExp(t),q,o;if(s&&typeof r.valueOf()==="string"&&r.indexOf("${")===-1&&l){return e.replace.apply(this,arguments)}if(s){if(t._xregexp){q=t._xregexp.captureNames}}else{t+=""}if(typeof r==="function"){o=e.replace.call(this,t,function(){if(q){arguments[0]=new String(arguments[0]);for(var u=0;uu.length-3;){v=String.prototype.slice.call(w,-1)+v;w=Math.floor(w/10)}return(w?u[w]||"":"$")+v}}else{w=+v;if(w<=u.length-3){return u[w]}w=q?d(q,v):-1;return w>-1?u[w+1]:x}})})}if(s&&t.global){t.lastIndex=0}return o};String.prototype.split=function(t,r){if(!XRegExp.isRegExp(t)){return e.split.apply(this,arguments)}var s=this+"",q=[],o=0,v,u;if(r===undefined||+r<0){r=Infinity}else{r=Math.floor(+r);if(!r){return[]}}for(t=XRegExp.copyAsGlobal(t);v=t.exec(s);){if(t.lastIndex>o){q.push(s.slice(o,v.index));v.length>1&&v.index=r){break}}t.lastIndex===v.index&&t.lastIndex++}if(o===s.length){if(!e.test.call(t,"")||u){q.push("")}}else{q.push(s.slice(o))}return q.length>r?q.slice(0,r):q};XRegExp.addToken(/\(\?#[^)]*\)/,function(o){return e.test.call(j,o.input.slice(o.index+o[0].length))?"":"(?:)"});XRegExp.addToken(/\((?!\?)/,function(){this.captureNames.push(null);return"("});XRegExp.addToken(/\(\?<([$\w]+)>/,function(o){this.captureNames.push(o[1]);this.hasNamedCapture=true;return"("});XRegExp.addToken(/\\k<([\w$]+)>/,function(q){var o=d(this.captureNames,q[1]);return o>-1?"\\"+(o+1)+(isNaN(q.input.charAt(q.index+q[0].length))?"":"(?:)"):q[0]});XRegExp.addToken(/\[\^?]/,function(o){return o[0]==="[]"?"\\b\\B":"[\\s\\S]"});XRegExp.addToken(/^\(\?([imsx]+)\)/,function(o){this.setFlag(o[1]);return""});XRegExp.addToken(/(?:\s+|#.*)+/,function(o){return e.test.call(j,o.input.slice(o.index+o[0].length))?"":"(?:)"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("x")});XRegExp.addToken(/\./,function(){return"[\\s\\S]"},XRegExp.OUTSIDE_CLASS,function(){return this.hasFlag("s")})})();var SyntaxHighlighter=function(){if(typeof(require)!="undefined"&&typeof(XRegExp)=="undefined"){XRegExp=require("XRegExp").XRegExp}var l={defaults:{"class-name":"","first-line":1,"pad-line-numbers":false,highlight:null,title:null,"smart-tabs":true,"tab-size":4,gutter:true,toolbar:true,"quick-code":true,collapse:false,"auto-links":true,light:false,"html-script":false},config:{space:" ",useScriptTags:true,bloggerMode:false,stripBrs:false,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:'About SyntaxHighlighter
SyntaxHighlighter
version 3.0.83 (July 02 2010)
JavaScript code syntax highlighter.
Copyright 2004-2010 Alex Gorbatchev.
If you like this script, please donate to
keep development active!
'}},vars:{discoveredBrushes:null,highlighters:{}},brushes:{},regexLib:{multiLineCComments:/\/\*[\s\S]*?\*\//gm,singleLineCComments:/\/\/.*$/gm,singleLinePerlComments:/#.*$/gm,doubleQuotedString:/"([^\\"\n]|\\.)*"/g,singleQuotedString:/'([^\\'\n]|\\.)*'/g,multiLineDoubleQuotedString:new XRegExp('"([^\\\\"]|\\\\.)*"',"gs"),multiLineSingleQuotedString:new XRegExp("'([^\\\\']|\\\\.)*'","gs"),xmlComments:/(<|<)!--[\s\S]*?--(>|>)/gm,url:/\w+:\/\/[\w-.\/?%&=:@;]*/g,phpScriptTags:{left:/(<|<)\?=?/g,right:/\?(>|>)/g},aspScriptTags:{left:/(<|<)%=?/g,right:/%(>|>)/g},scriptScriptTags:{left:/(<|<)\s*script.*?(>|>)/gi,right:/(<|<)\/\s*script\s*(>|>)/gi}},toolbar:{getHtml:function(L){var N='
',K=l.toolbar.items,P=K.list;function O(R,Q){return l.toolbar.getButtonHtml(R,Q,l.config.strings[Q])}for(var M=0;M";return N},getButtonHtml:function(L,M,K){return''+K+""},handler:function(P){var O=P.target,N=O.className||"";function K(R){var S=new RegExp(R+"_(\\w+)"),Q=S.exec(N);return Q?Q[1]:null}var L=s(B(O,".syntaxhighlighter").id),M=K("command");if(L&&M){l.toolbar.items[M].execute(L)}P.preventDefault()},items:{list:["expandSource","help"],expandSource:{getHtml:function(K){if(K.getParam("collapse")!=true){return""}var L=K.getParam("title");return l.toolbar.getButtonHtml(K,"expandSource",L?L:l.config.strings.expandSource)},execute:function(K){var L=I(K.id);j(L,"collapsed")}},help:{execute:function(K){var L=w("","_blank",500,250,"scrollbars=0"),M=L.document;M.write(l.config.strings.aboutDialog);M.close();L.focus()}}}},findElements:function(O,N){var Q=N?[N]:r(document.getElementsByTagName(l.config.tagName)),L=l.config,K=[];if(L.useScriptTags){Q=Q.concat(J())}if(Q.length===0){return K}for(var M=0;M(.*?))\\]$"),O=new XRegExp("(?[\\w-]+)\\s*:\\s*(?[\\w-%#]+|\\[.*?\\]|\".*?\"|'.*?')\\s*;?","g");while((M=O.exec(Q))!=null){var P=M.value.replace(/^['"]|['"]$/g,"");if(P!=null&&N.test(P)){var K=N.exec(P);P=K.values.length>0?K.values.split(/\s*,\s*/):[]}L[M.name]=P}return L}function x(L,K){if(L==null||L.length==0||L=="\n"){return L}L=L.replace(/'+M+""})}return L}function c(M,L){var K=M.toString();while(K.length|<br\s*\/?>/gi;if(l.config.bloggerMode==true){L=L.replace(K,"\n")}if(l.config.stripBrs==true){L=L.replace(K,"")}return L}function a(K){return K.replace(/^\s+|\s+$/g,"")}function z(R){var L=v(i(R)),Q=new Array(),O=/^\s*/,N=1000;for(var M=0;M0;M++){var K=L[M];if(a(K).length==0){continue}var P=O.exec(K);if(P==null){return R}N=Math.min(P[0].length,N)}if(N>0){for(var M=0;MK.index){return 1}else{if(L.lengthK.length){return 1}}}}return 0}function q(O,Q){function R(S,T){return S[0]}var M=0,L=null,P=[],N=Q.func?Q.func:R;while((L=Q.regex.exec(O))!=null){var K=N(L,Q);if(typeof(K)=="string"){K=[new l.Match(K,L.index,Q.css)]}P=P.concat(K)}return P}function b(L){var K=/(.*)((>|<).*)/;return L.replace(l.regexLib.url,function(M){var O="",N=null;if(N=K.exec(M)){M=N[1];O=N[2]}return''+M+""+O})}function J(){var L=document.getElementsByTagName("script"),K=[];for(var M=0;MM){break}else{if(P.index==K.index&&P.length>K.length){O[N]=null}else{if(P.index>=K.index&&P.index'+M+"
"},getLineNumbersHtml:function(Q,L){var O="",P=v(Q).length,M=parseInt(this.getParam("first-line")),R=this.getParam("pad-line-numbers");if(R==true){R=(M+P-1).toString().length}else{if(isNaN(R)==true){R=0}}for(var N=0;N'+P+"":"")+U)}return N},getTitleHtml:function(K){return K?""+K+"":""},getMatchesHtml:function(K,O){var Q=0,S="",R=this.getParam("brush","");function M(U){var T=U?(U.brushName||R):R;return T?T+" ":""}for(var N=0;N'+(this.getParam("toolbar")?l.toolbar.getHtml(this):"")+''+this.getTitleHtml(this.getParam("title"))+""+(gutter?'":"")+'
'+this.getLineNumbersHtml(N)+"
'+M+"
";return M},getDiv:function(K){if(K===null){K=""}this.code=K;var L=this.create("div");L.innerHTML=this.getHtml(K);if(this.getParam("toolbar")){f(h(L,".toolbar"),"click",l.toolbar.handler)}if(this.getParam("quick-code")){f(h(L,".code"),"dblclick",e)}return L},init:function(K){this.id=p();n(this);this.params=A(l.defaults,K||{});if(this.getParam("light")==true){this.params.toolbar=this.params.gutter=false}},getKeywords:function(K){K=K.replace(/^\s+|\s+$/g,"").replace(/\s+/g,"|");return"\\b(?:"+K+")\\b"},forHtmlScript:function(K){this.htmlScript={left:{regex:K.left,css:"script"},right:{regex:K.right,css:"script"},code:new XRegExp("(?"+K.left.source+")(?.*?)(?"+K.right.source+")","sgi")}}};return l}();typeof(exports)!="undefined"?exports.SyntaxHighlighter=SyntaxHighlighter:null;