
// Underscore.js 1.3.1
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
// Portions of Underscore are inspired or borrowed from Prototype,
// Oliver Steele's Functional, and John Resig's Micro-Templating.
// For all details and documentation:
// http://documentcloud.github.com/underscore
(function(){function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(a.isEqual&&b.isFunction(a.isEqual))return a.isEqual(c);if(c.isEqual&&b.isFunction(c.isEqual))return c.isEqual(a);var e=l.call(a);if(e!=l.call(c))return false;switch(e){case "[object String]":return a==String(c);case "[object Number]":return a!=+a?c!=+c:a==0?1/a==1/c:a==+c;case "[object Date]":case "[object Boolean]":return+a==+c;case "[object RegExp]":return a.source==
c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase}if(typeof a!="object"||typeof c!="object")return false;for(var f=d.length;f--;)if(d[f]==a)return true;d.push(a);var f=0,g=true;if(e=="[object Array]"){if(f=a.length,g=f==c.length)for(;f--;)if(!(g=f in a==f in c&&q(a[f],c[f],d)))break}else{if("constructor"in a!="constructor"in c||a.constructor!=c.constructor)return false;for(var h in a)if(b.has(a,h)&&(f++,!(g=b.has(c,h)&&q(a[h],c[h],d))))break;if(g){for(h in c)if(b.has(c,
h)&&!f--)break;g=!f}}d.pop();return g}var r=this,G=r._,n={},k=Array.prototype,o=Object.prototype,i=k.slice,H=k.unshift,l=o.toString,I=o.hasOwnProperty,w=k.forEach,x=k.map,y=k.reduce,z=k.reduceRight,A=k.filter,B=k.every,C=k.some,p=k.indexOf,D=k.lastIndexOf,o=Array.isArray,J=Object.keys,s=Function.prototype.bind,b=function(a){return new m(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else r._=b;b.VERSION="1.3.1";var j=b.each=
b.forEach=function(a,c,d){if(a!=null)if(w&&a.forEach===w)a.forEach(c,d);else if(a.length===+a.length)for(var e=0,f=a.length;e<f;e++){if(e in a&&c.call(d,a[e],e,a)===n)break}else for(e in a)if(b.has(a,e)&&c.call(d,a[e],e,a)===n)break};b.map=b.collect=function(a,c,b){var e=[];if(a==null)return e;if(x&&a.map===x)return a.map(c,b);j(a,function(a,g,h){e[e.length]=c.call(b,a,g,h)});if(a.length===+a.length)e.length=a.length;return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var f=arguments.length>2;a==
null&&(a=[]);if(y&&a.reduce===y)return e&&(c=b.bind(c,e)),f?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){f?d=c.call(e,d,a,b,i):(d=a,f=true)});if(!f)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){var f=arguments.length>2;a==null&&(a=[]);if(z&&a.reduceRight===z)return e&&(c=b.bind(c,e)),f?a.reduceRight(c,d):a.reduceRight(c);var g=b.toArray(a).reverse();e&&!f&&(c=b.bind(c,e));return f?b.reduce(g,c,d,e):b.reduce(g,c)};b.find=b.detect=
function(a,c,b){var e;E(a,function(a,g,h){if(c.call(b,a,g,h))return e=a,true});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(A&&a.filter===A)return a.filter(c,b);j(a,function(a,g,h){c.call(b,a,g,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,g,h){c.call(b,a,g,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=true;if(a==null)return e;if(B&&a.every===B)return a.every(c,b);j(a,function(a,g,h){if(!(e=
e&&c.call(b,a,g,h)))return n});return e};var E=b.some=b.any=function(a,c,d){c||(c=b.identity);var e=false;if(a==null)return e;if(C&&a.some===C)return a.some(c,d);j(a,function(a,b,h){if(e||(e=c.call(d,a,b,h)))return n});return!!e};b.include=b.contains=function(a,c){var b=false;if(a==null)return b;return p&&a.indexOf===p?a.indexOf(c)!=-1:b=E(a,function(a){return a===c})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(b.isFunction(c)?c||a:a[c]).apply(a,d)})};b.pluck=
function(a,c){return b.map(a,function(a){return a[c]})};b.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});
return e.value};b.shuffle=function(a){var b=[],d;j(a,function(a,f){f==0?b[0]=a:(d=Math.floor(Math.random()*(f+1)),b[f]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,g){return{value:a,criteria:c.call(d,a,b,g)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,
c,d){d||(d=b.identity);for(var e=0,f=a.length;e<f;){var g=e+f>>1;d(a[g])<d(c)?e=g+1:f=g}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,Math.max(a.length-b,0)):a[a.length-1]};b.rest=
b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=function(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,g,h){if(0==h||(c===true?b.last(d)!=g:!b.include(d,g)))d[d.length]=g,e[e.length]=a[h];return d},[]);
return e};b.union=function(){return b.uniq(b.flatten(arguments,true))};b.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a){var c=b.flatten(i.call(arguments,1));return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,
d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(p&&a.indexOf===p)return a.indexOf(c);for(d=0,e=a.length;d<e;d++)if(d in a&&a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(D&&a.lastIndexOf===D)return a.lastIndexOf(b);for(var d=a.length;d--;)if(d in a&&a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),f=0,g=Array(e);f<e;)g[f++]=a,a+=d;return g};
var F=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;e=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));F.prototype=a.prototype;var b=new F,g=a.apply(b,e.concat(i.call(arguments)));return Object(g)===g?g:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,
c){var d={};c||(c=b.identity);return function(){var e=c.apply(this,arguments);return b.has(d,e)?d[e]:d[e]=a.apply(this,arguments)}};b.delay=function(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,f,g,h,i=b.debounce(function(){h=g=false},c);return function(){d=this;e=arguments;var b;f||(f=setTimeout(function(){f=null;h&&a.apply(d,e);i()},c));g?h=true:
a.apply(d,e);i();g=true}};b.debounce=function(a,b){var d;return function(){var e=this,f=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,f)},b)}};b.once=function(a){var b=false,d;return function(){if(b)return d;b=true;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments,0));return b.apply(this,d)}};b.compose=function(){var a=arguments;return function(){for(var b=arguments,d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};
b.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};b.keys=J||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var c=[],d;for(d in a)b.has(a,d)&&(c[c.length]=d);return c};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]=b[d]});return a};b.defaults=function(a){j(i.call(arguments,
1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},a)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return q(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(b.has(a,c))return false;return true};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=o||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};
b.isArguments=function(a){return l.call(a)=="[object Arguments]"};if(!b.isArguments(arguments))b.isArguments=function(a){return!(!a||!b.has(a,"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===true||a===false||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};
b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};b.has=function(a,b){return I.call(a,b)};b.noConflict=function(){r._=G;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};b.mixin=function(a){j(b.functions(a),
function(c){K(c,b[c]=a[c])})};var L=0;b.uniqueId=function(a){var b=L++;return a?a+b:b};b.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t=/.^/,u=function(a){return a.replace(/\\\\/g,"\\").replace(/\\'/g,"'")};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push('"+a.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(d.escape||t,function(a,b){return"',_.escape("+
u(b)+"),'"}).replace(d.interpolate||t,function(a,b){return"',"+u(b)+",'"}).replace(d.evaluate||t,function(a,b){return"');"+u(b).replace(/[\r\n\t]/g," ")+";__p.push('"}).replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/\t/g,"\\t")+"');}return __p.join('');",e=new Function("obj","_",d);return c?e(c,b):function(a){return e.call(this,a,b)}};b.chain=function(a){return b(a).chain()};var m=function(a){this._wrapped=a};b.prototype=m.prototype;var v=function(a,c){return c?b(a).chain():a},K=function(a,c){m.prototype[a]=
function(){var a=i.call(arguments);H.call(a,this._wrapped);return v(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];m.prototype[a]=function(){var d=this._wrapped;b.apply(d,arguments);var e=d.length;(a=="shift"||a=="splice")&&e===0&&delete d[0];return v(d,this._chain)}});j(["concat","join","slice"],function(a){var b=k[a];m.prototype[a]=function(){return v(b.apply(this._wrapped,arguments),this._chain)}});m.prototype.chain=function(){this._chain=
true;return this};m.prototype.value=function(){return this._wrapped}}).call(this);

var JSON;if(!JSON){JSON={};}
(function(){"use strict";function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){if(typeof rep[i]==='string'){k=rep[i];v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.prototype.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());
// Backbone.js 0.9.2

// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function(){var l=this,y=l.Backbone,z=Array.prototype.slice,A=Array.prototype.splice,g;g="undefined"!==typeof exports?exports:l.Backbone={};g.VERSION="0.9.2";var f=l._;!f&&"undefined"!==typeof require&&(f=require("underscore"));var i=l.jQuery||l.Zepto||l.ender;g.setDomLibrary=function(a){i=a};g.noConflict=function(){l.Backbone=y;return this};g.emulateHTTP=!1;g.emulateJSON=!1;var p=/\s+/,k=g.Events={on:function(a,b,c){var d,e,f,g,j;if(!b)return this;a=a.split(p);for(d=this._callbacks||(this._callbacks=
{});e=a.shift();)f=(j=d[e])?j.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:j?j.next:f};return this},off:function(a,b,c){var d,e,h,g,j,q;if(e=this._callbacks){if(!a&&!b&&!c)return delete this._callbacks,this;for(a=a?a.split(p):f.keys(e);d=a.shift();)if(h=e[d],delete e[d],h&&(b||c))for(g=h.tail;(h=h.next)!==g;)if(j=h.callback,q=h.context,b&&j!==b||c&&q!==c)this.on(d,j,q);return this}},trigger:function(a){var b,c,d,e,f,g;if(!(d=this._callbacks))return this;f=d.all;a=a.split(p);for(g=
z.call(arguments,1);b=a.shift();){if(c=d[b])for(e=c.tail;(c=c.next)!==e;)c.callback.apply(c.context||this,g);if(c=f){e=c.tail;for(b=[b].concat(g);(c=c.next)!==e;)c.callback.apply(c.context||this,b)}}return this}};k.bind=k.on;k.unbind=k.off;var o=g.Model=function(a,b){var c;a||(a={});b&&b.parse&&(a=this.parse(a));if(c=n(this,"defaults"))a=f.extend({},c,a);b&&b.collection&&(this.collection=b.collection);this.attributes={};this._escapedAttributes={};this.cid=f.uniqueId("c");this.changed={};this._silent=
{};this._pending={};this.set(a,{silent:!0});this.changed={};this._silent={};this._pending={};this._previousAttributes=f.clone(this.attributes);this.initialize.apply(this,arguments)};f.extend(o.prototype,k,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;b=this.get(a);return this._escapedAttributes[a]=f.escape(null==
b?"":""+b)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c||(c={});if(!d)return this;d instanceof o&&(d=d.attributes);if(c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var b=c.changes={},h=this.attributes,g=this._escapedAttributes,j=this._previousAttributes||{};for(e in d){a=d[e];if(!f.isEqual(h[e],a)||c.unset&&f.has(h,e))delete g[e],(c.silent?this._silent:
b)[e]=!0;c.unset?delete h[e]:h[e]=a;!f.isEqual(j[e],a)||f.has(h,e)!=f.has(j,e)?(this.changed[e]=a,c.silent||(this._pending[e]=!0)):(delete this.changed[e],delete this._pending[e])}c.silent||this.change(c);return this},unset:function(a,b){(b||(b={})).unset=!0;return this.set(a,null,b)},clear:function(a){(a||(a={})).unset=!0;return this.set(f.clone(this.attributes),a)},fetch:function(a){var a=a?f.clone(a):{},b=this,c=a.success;a.success=function(d,e,f){if(!b.set(b.parse(d,f),a))return!1;c&&c(b,d)};
a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},save:function(a,b,c){var d,e;f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b);c=c?f.clone(c):{};if(c.wait){if(!this._validate(d,c))return!1;e=f.clone(this.attributes)}a=f.extend({},c,{silent:!0});if(d&&!this.set(d,c.wait?a:c))return!1;var h=this,i=c.success;c.success=function(a,b,e){b=h.parse(a,e);if(c.wait){delete c.wait;b=f.extend(d||{},b)}if(!h.set(b,c))return false;i?i(h,a):h.trigger("sync",h,a,c)};c.error=g.wrapError(c.error,
h,c);b=this.isNew()?"create":"update";b=(this.sync||g.sync).call(this,b,this,c);c.wait&&this.set(e,a);return b},destroy:function(a){var a=a?f.clone(a):{},b=this,c=a.success,d=function(){b.trigger("destroy",b,b.collection,a)};if(this.isNew())return d(),!1;a.success=function(e){a.wait&&d();c?c(b,e):b.trigger("sync",b,e,a)};a.error=g.wrapError(a.error,b,a);var e=(this.sync||g.sync).call(this,"delete",this,a);a.wait||d();return e},url:function(){var a=n(this,"urlRoot")||n(this.collection,"url")||t();
return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending=
{};this.trigger("change",this,a);for(c in this.changed)!this._pending[c]&&!this._silent[c]&&delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}this._changing=!1;return this},hasChanged:function(a){return!arguments.length?!f.isEmpty(this.changed):f.has(this.changed,a)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes,e;for(e in a)if(!f.isEqual(d[e],b=a[e]))(c||(c={}))[e]=b;return c},previous:function(a){return!arguments.length||
!this._previousAttributes?null:this._previousAttributes[a]},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;var a=f.extend({},this.attributes,a),c=this.validate(a,b);if(!c)return!0;b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b);return!1}});var r=g.Collection=function(a,b){b||(b={});b.model&&(this.model=b.model);b.comparator&&(this.comparator=b.comparator);
this._reset();this.initialize.apply(this,arguments);a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(r.prototype,k,{model:o,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,e,g,i,j={},k={},l=[];b||(b={});a=f.isArray(a)?a.slice():[a];c=0;for(d=a.length;c<d;c++){if(!(e=a[c]=this._prepareModel(a[c],b)))throw Error("Can't add an invalid model to a collection");g=e.cid;i=e.id;j[g]||this._byCid[g]||null!=i&&(k[i]||this._byId[i])?
l.push(c):j[g]=k[i]=e}for(c=l.length;c--;)a.splice(l[c],1);c=0;for(d=a.length;c<d;c++)(e=a[c]).on("all",this._onModelEvent,this),this._byCid[e.cid]=e,null!=e.id&&(this._byId[e.id]=e);this.length+=d;A.apply(this.models,[null!=b.at?b.at:this.models.length,0].concat(a));this.comparator&&this.sort({silent:!0});if(b.silent)return this;c=0;for(d=this.models.length;c<d;c++)if(j[(e=this.models[c]).cid])b.index=c,e.trigger("add",e,this,b);return this},remove:function(a,b){var c,d,e,g;b||(b={});a=f.isArray(a)?
a.slice():[a];c=0;for(d=a.length;c<d;c++)if(g=this.getByCid(a[c])||this.get(a[c]))delete this._byId[g.id],delete this._byCid[g.cid],e=this.indexOf(g),this.models.splice(e,1),this.length--,b.silent||(b.index=e,g.trigger("remove",g,this,b)),this._removeReference(g);return this},push:function(a,b){a=this._prepareModel(a,b);this.add(a,b);return a},pop:function(a){var b=this.at(this.length-1);this.remove(b,a);return b},unshift:function(a,b){a=this._prepareModel(a,b);this.add(a,f.extend({at:0},b));return a},
shift:function(a){var b=this.at(0);this.remove(b,a);return b},get:function(a){return null==a?void 0:this._byId[null!=a.id?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},where:function(a){return f.isEmpty(a)?[]:this.filter(function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},sort:function(a){a||(a={});if(!this.comparator)throw Error("Cannot sort a set without a comparator");var b=f.bind(this.comparator,this);1==this.comparator.length?
this.models=this.sortBy(b):this.models.sort(b);a.silent||this.trigger("reset",this,a);return this},pluck:function(a){return f.map(this.models,function(b){return b.get(a)})},reset:function(a,b){a||(a=[]);b||(b={});for(var c=0,d=this.models.length;c<d;c++)this._removeReference(this.models[c]);this._reset();this.add(a,f.extend({silent:!0},b));b.silent||this.trigger("reset",this,b);return this},fetch:function(a){a=a?f.clone(a):{};void 0===a.parse&&(a.parse=!0);var b=this,c=a.success;a.success=function(d,
e,f){b[a.add?"add":"reset"](b.parse(d,f),a);c&&c(b,d)};a.error=g.wrapError(a.error,b,a);return(this.sync||g.sync).call(this,"read",this,a)},create:function(a,b){var c=this,b=b?f.clone(b):{},a=this._prepareModel(a,b);if(!a)return!1;b.wait||c.add(a,b);var d=b.success;b.success=function(e,f){b.wait&&c.add(e,b);d?d(e,f):e.trigger("sync",a,f,b)};a.save(null,b);return a},parse:function(a){return a},chain:function(){return f(this.models).chain()},_reset:function(){this.length=0;this.models=[];this._byId=
{};this._byCid={}},_prepareModel:function(a,b){b||(b={});a instanceof o?a.collection||(a.collection=this):(b.collection=this,a=new this.model(a,b),a._validate(a.attributes,b)||(a=!1));return a},_removeReference:function(a){this==a.collection&&delete a.collection;a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"==a||"remove"==a)&&c!=this||("destroy"==a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],this._byId[b.id]=b),this.trigger.apply(this,
arguments))}});f.each("forEach,each,map,reduce,reduceRight,find,detect,filter,select,reject,every,all,some,any,include,contains,invoke,max,min,sortBy,sortedIndex,toArray,size,first,initial,rest,last,without,indexOf,shuffle,lastIndexOf,isEmpty,groupBy".split(","),function(a){r.prototype[a]=function(){return f[a].apply(f,[this.models].concat(f.toArray(arguments)))}});var u=g.Router=function(a){a||(a={});a.routes&&(this.routes=a.routes);this._bindRoutes();this.initialize.apply(this,arguments)},B=/:\w+/g,
C=/\*\w+/g,D=/[-[\]{}()+?.,\\^$|#\s]/g;f.extend(u.prototype,k,{initialize:function(){},route:function(a,b,c){g.history||(g.history=new m);f.isRegExp(a)||(a=this._routeToRegExp(a));c||(c=this[b]);g.history.route(a,f.bind(function(d){d=this._extractParameters(a,d);c&&c.apply(this,d);this.trigger.apply(this,["route:"+b].concat(d));g.history.trigger("route",this,b,d)},this));return this},navigate:function(a,b){g.history.navigate(a,b)},_bindRoutes:function(){if(this.routes){var a=[],b;for(b in this.routes)a.unshift([b,
this.routes[b]]);b=0;for(var c=a.length;b<c;b++)this.route(a[b][0],a[b][1],this[a[b][1]])}},_routeToRegExp:function(a){a=a.replace(D,"\\$&").replace(B,"([^/]+)").replace(C,"(.*?)");return RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});var m=g.History=function(){this.handlers=[];f.bindAll(this,"checkUrl")},s=/^[#\/]/,E=/msie [\w.]+/;m.started=!1;f.extend(m.prototype,k,{interval:50,getHash:function(a){return(a=(a?a.location:window.location).href.match(/#(.*)$/))?a[1]:
""},getFragment:function(a,b){if(null==a)if(this._hasPushState||b){var a=window.location.pathname,c=window.location.search;c&&(a+=c)}else a=this.getHash();a.indexOf(this.options.root)||(a=a.substr(this.options.root.length));return a.replace(s,"")},start:function(a){if(m.started)throw Error("Backbone.history has already been started");m.started=!0;this.options=f.extend({},{root:"/"},this.options,a);this._wantsHashChange=!1!==this.options.hashChange;this._wantsPushState=!!this.options.pushState;this._hasPushState=
!(!this.options.pushState||!window.history||!window.history.pushState);var a=this.getFragment(),b=document.documentMode;if(b=E.exec(navigator.userAgent.toLowerCase())&&(!b||7>=b))this.iframe=i('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(a);this._hasPushState?i(window).bind("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!b?i(window).bind("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,
this.interval));this.fragment=a;a=window.location;b=a.pathname==this.options.root;if(this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!b)return this.fragment=this.getFragment(null,!0),window.location.replace(this.options.root+"#"+this.fragment),!0;this._wantsPushState&&this._hasPushState&&b&&a.hash&&(this.fragment=this.getHash().replace(s,""),window.history.replaceState({},document.title,a.protocol+"//"+a.host+this.options.root+this.fragment));if(!this.options.silent)return this.loadUrl()},
stop:function(){i(window).unbind("popstate",this.checkUrl).unbind("hashchange",this.checkUrl);clearInterval(this._checkUrlInterval);m.started=!1},route:function(a,b){this.handlers.unshift({route:a,callback:b})},checkUrl:function(){var a=this.getFragment();a==this.fragment&&this.iframe&&(a=this.getFragment(this.getHash(this.iframe)));if(a==this.fragment)return!1;this.iframe&&this.navigate(a);this.loadUrl()||this.loadUrl(this.getHash())},loadUrl:function(a){var b=this.fragment=this.getFragment(a);return f.any(this.handlers,
function(a){if(a.route.test(b))return a.callback(b),!0})},navigate:function(a,b){if(!m.started)return!1;if(!b||!0===b)b={trigger:b};var c=(a||"").replace(s,"");this.fragment!=c&&(this._hasPushState?(0!=c.indexOf(this.options.root)&&(c=this.options.root+c),this.fragment=c,window.history[b.replace?"replaceState":"pushState"]({},document.title,c)):this._wantsHashChange?(this.fragment=c,this._updateHash(window.location,c,b.replace),this.iframe&&c!=this.getFragment(this.getHash(this.iframe))&&(b.replace||
this.iframe.document.open().close(),this._updateHash(this.iframe.location,c,b.replace))):window.location.assign(this.options.root+a),b.trigger&&this.loadUrl(a))},_updateHash:function(a,b,c){c?a.replace(a.toString().replace(/(javascript:|#).*$/,"")+"#"+b):a.hash=b}});var v=g.View=function(a){this.cid=f.uniqueId("view");this._configure(a||{});this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()},F=/^(\S+)\s*(.*)$/,w="model,collection,el,id,attributes,className,tagName".split(",");
f.extend(v.prototype,k,{tagName:"div",$:function(a){return this.$el.find(a)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();return this},make:function(a,b,c){a=document.createElement(a);b&&i(a).attr(b);c&&i(a).html(c);return a},setElement:function(a,b){this.$el&&this.undelegateEvents();this.$el=a instanceof i?a:i(a);this.el=this.$el[0];!1!==b&&this.delegateEvents();return this},delegateEvents:function(a){if(a||(a=n(this,"events"))){this.undelegateEvents();
for(var b in a){var c=a[b];f.isFunction(c)||(c=this[a[b]]);if(!c)throw Error('Method "'+a[b]+'" does not exist');var d=b.match(F),e=d[1],d=d[2],c=f.bind(c,this),e=e+(".delegateEvents"+this.cid);""===d?this.$el.bind(e,c):this.$el.delegate(d,e,c)}}},undelegateEvents:function(){this.$el.unbind(".delegateEvents"+this.cid)},_configure:function(a){this.options&&(a=f.extend({},this.options,a));for(var b=0,c=w.length;b<c;b++){var d=w[b];a[d]&&(this[d]=a[d])}this.options=a},_ensureElement:function(){if(this.el)this.setElement(this.el,
!1);else{var a=n(this,"attributes")||{};this.id&&(a.id=this.id);this.className&&(a["class"]=this.className);this.setElement(this.make(this.tagName,a),!1)}}});o.extend=r.extend=u.extend=v.extend=function(a,b){var c=G(this,a,b);c.extend=this.extend;return c};var H={create:"POST",update:"PUT","delete":"DELETE",read:"GET"};g.sync=function(a,b,c){var d=H[a];c||(c={});var e={type:d,dataType:"json"};c.url||(e.url=n(b,"url")||t());if(!c.data&&b&&("create"==a||"update"==a))e.contentType="application/json",
e.data=JSON.stringify(b.toJSON());g.emulateJSON&&(e.contentType="application/x-www-form-urlencoded",e.data=e.data?{model:e.data}:{});if(g.emulateHTTP&&("PUT"===d||"DELETE"===d))g.emulateJSON&&(e.data._method=d),e.type="POST",e.beforeSend=function(a){a.setRequestHeader("X-HTTP-Method-Override",d)};"GET"!==e.type&&!g.emulateJSON&&(e.processData=!1);return i.ajax(f.extend(e,c))};g.wrapError=function(a,b,c){return function(d,e){e=d===b?e:d;a?a(b,e,c):b.trigger("error",b,e,c)}};var x=function(){},G=function(a,
b,c){var d;d=b&&b.hasOwnProperty("constructor")?b.constructor:function(){a.apply(this,arguments)};f.extend(d,a);x.prototype=a.prototype;d.prototype=new x;b&&f.extend(d.prototype,b);c&&f.extend(d,c);d.prototype.constructor=d;d.__super__=a.prototype;return d},n=function(a,b){return!a||!a[b]?null:f.isFunction(a[b])?a[b]():a[b]},t=function(){throw Error('A "url" property or function must be specified');}}).call(this);
/*!
* Bootstrap.js by @fat & @mdo
* Copyright 2012 Twitter, Inc.
* http://www.apache.org/licenses/LICENSE-2.0.txt
*/
!function(e){e(function(){"use strict";e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()},e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e(function(){e("body").on("click.alert.data-api",t,n.prototype.close)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")},e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e(function(){e("body").on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=n,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},to:function(t){var n=this.$element.find(".item.active"),r=n.parent().children(),i=r.index(n),s=this;if(t>r.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){s.to(t)}):i==t?this.pause().cycle():this.slide(t>i?"next":"prev",e(r[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f=e.Event("slide",{relatedTarget:i[0]});this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u]();if(i.hasClass("active"))return;if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}},e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e(function(){e("body").on("click.carousel.data-api","[data-slide]",function(t){var n=e(this),r,i=e(n.attr("data-target")||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,"")),s=!i.data("modal")&&e.extend({},i.data(),n.data());i.carousel(s),t.preventDefault()})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.collapse.defaults,n),this.options.parent&&(this.$parent=e(this.options.parent)),this.options.toggle&&this.toggle()};t.prototype={constructor:t,dimension:function(){var e=this.$element.hasClass("width");return e?"width":"height"},show:function(){var t,n,r,i;if(this.transitioning)return;t=this.dimension(),n=e.camelCase(["scroll",t].join("-")),r=this.$parent&&this.$parent.find("> .accordion-group > .in");if(r&&r.length){i=r.data("collapse");if(i&&i.transitioning)return;r.collapse("hide"),i||r.data("collapse",null)}this.$element[t](0),this.transition("addClass",e.Event("show"),"shown"),e.support.transition&&this.$element[t](this.$element[0][n])},hide:function(){var t;if(this.transitioning)return;t=this.dimension(),this.reset(this.$element[t]()),this.transition("removeClass",e.Event("hide"),"hidden"),this.$element[t](0)},reset:function(e){var t=this.dimension();return this.$element.removeClass("collapse")[t](e||"auto")[0].offsetWidth,this.$element[e!==null?"addClass":"removeClass"]("collapse"),this},transition:function(t,n,r){var i=this,s=function(){n.type=="show"&&i.reset(),i.transitioning=0,i.$element.trigger(r)};this.$element.trigger(n);if(n.isDefaultPrevented())return;this.transitioning=1,this.$element[t]("in"),e.support.transition&&this.$element.hasClass("collapse")?this.$element.one(e.support.transition.end,s):s()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},e.fn.collapse=function(n){return this.each(function(){var r=e(this),i=r.data("collapse"),s=typeof n=="object"&&n;i||r.data("collapse",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.collapse.defaults={toggle:!0},e.fn.collapse.Constructor=t,e(function(){e("body").on("click.collapse.data-api","[data-toggle=collapse]",function(t){var n=e(this),r,i=n.attr("data-target")||t.preventDefault()||(r=n.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""),s=e(i).data("collapse")?"toggle":n.data();n[e(i).hasClass("in")?"addClass":"removeClass"]("collapsed"),e(i).collapse(s)})})}(window.jQuery),!function(e){"use strict";function r(){i(e(t)).removeClass("open")}function i(t){var n=t.attr("data-target"),r;return n||(n=t.attr("href"),n=n&&/#/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,"")),r=e(n),r.length||(r=t.parent()),r}var t="[data-toggle=dropdown]",n=function(t){var n=e(t).on("click.dropdown.data-api",this.toggle);e("html").on("click.dropdown.data-api",function(){n.parent().removeClass("open")})};n.prototype={constructor:n,toggle:function(t){var n=e(this),s,o;if(n.is(".disabled, :disabled"))return;return s=i(n),o=s.hasClass("open"),r(),o||(s.toggleClass("open"),n.focus()),!1},keydown:function(t){var n,r,s,o,u,a;if(!/(38|40|27)/.test(t.keyCode))return;n=e(this),t.preventDefault(),t.stopPropagation();if(n.is(".disabled, :disabled"))return;o=i(n),u=o.hasClass("open");if(!u||u&&t.keyCode==27)return n.click();r=e("[role=menu] li:not(.divider) a",o);if(!r.length)return;a=r.index(r.filter(":focus")),t.keyCode==38&&a>0&&a--,t.keyCode==40&&a<r.length-1&&a++,~a||(a=0),r.eq(a).focus()}},e.fn.dropdown=function(t){return this.each(function(){var r=e(this),i=r.data("dropdown");i||r.data("dropdown",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.dropdown.Constructor=n,e(function(){e("html").on("click.dropdown.data-api touchstart.dropdown.data-api",r),e("body").on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",t,n.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",t+", [role=menu]",n.prototype.keydown)})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=n,this.$element=e(t).delegate('[data-dismiss="modal"]',"click.dismiss.modal",e.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};t.prototype={constructor:t,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var t=this,n=e.Event("show");this.$element.trigger(n);if(this.isShown||n.isDefaultPrevented())return;e("body").addClass("modal-open"),this.isShown=!0,this.escape(),this.backdrop(function(){var n=e.support.transition&&t.$element.hasClass("fade");t.$element.parent().length||t.$element.appendTo(document.body),t.$element.show(),n&&t.$element[0].offsetWidth,t.$element.addClass("in").attr("aria-hidden",!1).focus(),t.enforceFocus(),n?t.$element.one(e.support.transition.end,function(){t.$element.trigger("shown")}):t.$element.trigger("shown")})},hide:function(t){t&&t.preventDefault();var n=this;t=e.Event("hide"),this.$element.trigger(t);if(!this.isShown||t.isDefaultPrevented())return;this.isShown=!1,e("body").removeClass("modal-open"),this.escape(),e(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),e.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var t=this;e(document).on("focusin.modal",function(e){t.$element[0]!==e.target&&!t.$element.has(e.target).length&&t.$element.focus()})},escape:function(){var e=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(t){t.which==27&&e.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var t=this,n=setTimeout(function(){t.$element.off(e.support.transition.end),t.hideModal()},500);this.$element.one(e.support.transition.end,function(){clearTimeout(n),t.hideModal()})},hideModal:function(e){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(t){var n=this,r=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var i=e.support.transition&&r;this.$backdrop=e('<div class="modal-backdrop '+r+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(e.proxy(this.hide,this)),i&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),i?this.$backdrop.one(e.support.transition.end,t):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),e.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(e.support.transition.end,e.proxy(this.removeBackdrop,this)):this.removeBackdrop()):t&&t()}},e.fn.modal=function(n){return this.each(function(){var r=e(this),i=r.data("modal"),s=e.extend({},e.fn.modal.defaults,r.data(),typeof n=="object"&&n);i||r.data("modal",i=new t(this,s)),typeof n=="string"?i[n]():s.show&&i.show()})},e.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},e.fn.modal.Constructor=t,e(function(){e("body").on("click.modal.data-api",'[data-toggle="modal"]',function(t){var n=e(this),r=n.attr("href"),i=e(n.attr("data-target")||r&&r.replace(/.*(?=#[^\s]+$)/,"")),s=i.data("modal")?"toggle":e.extend({remote:!/#/.test(r)&&r},i.data(),n.data());t.preventDefault(),i.modal(s).one("hide",function(){n.focus()})})})}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("tooltip",e,t)};t.prototype={constructor:t,init:function(t,n,r){var i,s;this.type=t,this.$element=e(n),this.options=this.getOptions(r),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,e.proxy(this.toggle,this)):this.options.trigger!="manual"&&(i=this.options.trigger=="hover"?"mouseenter":"focus",s=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(i+"."+this.type,this.options.selector,e.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,e.proxy(this.leave,this))),this.options.selector?this._options=e.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(t){return t=e.extend({},e.fn[this.type].defaults,t,this.$element.data()),t.delay&&typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),t},enter:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);if(!n.options.delay||!n.options.delay.show)return n.show();clearTimeout(this.timeout),n.hoverState="in",this.timeout=setTimeout(function(){n.hoverState=="in"&&n.show()},n.options.delay.show)},leave:function(t){var n=e(t.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!n.options.delay||!n.options.delay.hide)return n.hide();n.hoverState="out",this.timeout=setTimeout(function(){n.hoverState=="out"&&n.hide()},n.options.delay.hide)},show:function(){var e,t,n,r,i,s,o;if(this.hasContent()&&this.enabled){e=this.tip(),this.setContent(),this.options.animation&&e.addClass("fade"),s=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement,t=/in/.test(s),e.remove().css({top:0,left:0,display:"block"}).appendTo(t?this.$element:document.body),n=this.getPosition(t),r=e[0].offsetWidth,i=e[0].offsetHeight;switch(t?s.split(" ")[1]:s){case"bottom":o={top:n.top+n.height,left:n.left+n.width/2-r/2};break;case"top":o={top:n.top-i,left:n.left+n.width/2-r/2};break;case"left":o={top:n.top+n.height/2-i/2,left:n.left-r};break;case"right":o={top:n.top+n.height/2-i/2,left:n.left+n.width}}e.css(o).addClass(s).addClass("in")}},setContent:function(){var e=this.tip(),t=this.getTitle();e.find(".tooltip-inner")[this.options.html?"html":"text"](t),e.removeClass("fade in top bottom left right")},hide:function(){function r(){var t=setTimeout(function(){n.off(e.support.transition.end).remove()},500);n.one(e.support.transition.end,function(){clearTimeout(t),n.remove()})}var t=this,n=this.tip();return n.removeClass("in"),e.support.transition&&this.$tip.hasClass("fade")?r():n.remove(),this},fixTitle:function(){var e=this.$element;(e.attr("title")||typeof e.attr("data-original-title")!="string")&&e.attr("data-original-title",e.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(t){return e.extend({},t?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-original-title")||(typeof n.title=="function"?n.title.call(t[0]):n.title),e},tip:function(){return this.$tip=this.$tip||e(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},e.fn.tooltip=function(n){return this.each(function(){var r=e(this),i=r.data("tooltip"),s=typeof n=="object"&&n;i||r.data("tooltip",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.tooltip.Constructor=t,e.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!0}}(window.jQuery),!function(e){"use strict";var t=function(e,t){this.init("popover",e,t)};t.prototype=e.extend({},e.fn.tooltip.Constructor.prototype,{constructor:t,setContent:function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();e.find(".popover-title")[this.options.html?"html":"text"](t),e.find(".popover-content > *")[this.options.html?"html":"text"](n),e.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var e,t=this.$element,n=this.options;return e=t.attr("data-content")||(typeof n.content=="function"?n.content.call(t[0]):n.content),e},tip:function(){return this.$tip||(this.$tip=e(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),e.fn.popover=function(n){return this.each(function(){var r=e(this),i=r.data("popover"),s=typeof n=="object"&&n;i||r.data("popover",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.popover.Constructor=t,e.fn.popover.defaults=e.extend({},e.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(e){"use strict";function t(t,n){var r=e.proxy(this.process,this),i=e(t).is("body")?e(window):e(t),s;this.options=e.extend({},e.fn.scrollspy.defaults,n),this.$scrollElement=i.on("scroll.scroll-spy.data-api",r),this.selector=(this.options.target||(s=e(t).attr("href"))&&s.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=e("body"),this.refresh(),this.process()}t.prototype={constructor:t,refresh:function(){var t=this,n;this.offsets=e([]),this.targets=e([]),n=this.$body.find(this.selector).map(function(){var t=e(this),n=t.data("target")||t.attr("href"),r=/^#\w/.test(n)&&e(n);return r&&r.length&&[[r.position().top,n]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){t.offsets.push(this[0]),t.targets.push(this[1])})},process:function(){var e=this.$scrollElement.scrollTop()+this.options.offset,t=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,n=t-this.$scrollElement.height(),r=this.offsets,i=this.targets,s=this.activeTarget,o;if(e>=n)return s!=(o=i.last()[0])&&this.activate(o);for(o=r.length;o--;)s!=i[o]&&e>=r[o]&&(!r[o+1]||e<=r[o+1])&&this.activate(i[o])},activate:function(t){var n,r;this.activeTarget=t,e(this.selector).parent(".active").removeClass("active"),r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',n=e(r).parent("li").addClass("active"),n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate")}},e.fn.scrollspy=function(n){return this.each(function(){var r=e(this),i=r.data("scrollspy"),s=typeof n=="object"&&n;i||r.data("scrollspy",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.scrollspy.Constructor=t,e.fn.scrollspy.defaults={offset:10},e(window).on("load",function(){e('[data-spy="scroll"]').each(function(){var t=e(this);t.scrollspy(t.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t){this.element=e(t)};t.prototype={constructor:t,show:function(){var t=this.element,n=t.closest("ul:not(.dropdown-menu)"),r=t.attr("data-target"),i,s,o;r||(r=t.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));if(t.parent("li").hasClass("active"))return;i=n.find(".active a").last()[0],o=e.Event("show",{relatedTarget:i}),t.trigger(o);if(o.isDefaultPrevented())return;s=e(r),this.activate(t.parent("li"),n),this.activate(s,s.parent(),function(){t.trigger({type:"shown",relatedTarget:i})})},activate:function(t,n,r){function o(){i.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),t.addClass("active"),s?(t[0].offsetWidth,t.addClass("in")):t.removeClass("fade"),t.parent(".dropdown-menu")&&t.closest("li.dropdown").addClass("active"),r&&r()}var i=n.find("> .active"),s=r&&e.support.transition&&i.hasClass("fade");s?i.one(e.support.transition.end,o):o(),i.removeClass("in")}},e.fn.tab=function(n){return this.each(function(){var r=e(this),i=r.data("tab");i||r.data("tab",i=new t(this)),typeof n=="string"&&i[n]()})},e.fn.tab.Constructor=t,e(function(){e("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(t){t.preventDefault(),e(this).tab("show")})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=e(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};t.prototype={constructor:t,select:function(){var e=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(e)).change(),this.hide()},updater:function(e){return e},show:function(){var t=e.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:t.top+t.height,left:t.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(t){var n;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),(e.browser.chrome||e.browser.webkit||e.browser.msie)&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this))},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=!~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},blur:function(e){var t=this;setTimeout(function(){t.hide()},150)},click:function(e){e.stopPropagation(),e.preventDefault(),this.select()},mouseenter:function(t){this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")}},e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e(function(){e("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;t.preventDefault(),n.typeahead(n.data())})})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))},e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
(function(jQuery){jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data!=="string"){return;}
var origHandler=handleObj.handler,keys=handleObj.data.toLowerCase().split(" ");handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||event.target.type==="text"||event.target.type === "password")){return;}
var special=event.type!=="keypress"&&jQuery.hotkeys.specialKeys[event.which],character=String.fromCharCode(event.which).toLowerCase(),key,modif="",possible={};if(event.altKey&&special!=="alt"){modif+="alt+";}
if(event.ctrlKey&&special!=="ctrl"){modif+="ctrl+";}
if(event.metaKey&&!event.ctrlKey&&special!=="meta"){modif+="meta+";}
if(event.shiftKey&&special!=="shift"){modif+="shift+";}
if(special){possible[modif+special]=true;}else{possible[modif+character]=true;possible[modif+jQuery.hotkeys.shiftNums[character]]=true;if(modif==="shift+"){possible[jQuery.hotkeys.shiftNums[character]]=true;}}
for(var i=0,l=keys.length;i<l;i++){if(possible[keys[i]]){return origHandler.apply(this,arguments);}}};}
jQuery.each(["keydown","keyup","keypress"],function(){jQuery.event.special[this]={add:keyHandler};});})(jQuery);

(function($){$.InFieldLabels=function(label,field,options){var base=this;base.$label=$(label);base.label=label;base.$field=$(field);base.field=field;base.$label.data("InFieldLabels",base);base.showing=true;base.init=function(){base.options=$.extend({},$.InFieldLabels.defaultOptions,options);if(base.$field.val()!==""){base.$label.hide();base.showing=false;}
base.$field.focus(function(){base.fadeOnFocus();}).blur(function(){base.checkForEmpty(true);}).bind('keydown.infieldlabel',function(e){base.hideOnChange(e);}).bind('paste',function(e){base.setOpacity(0.0);}).change(function(e){base.checkForEmpty();}).bind('onPropertyChange',function(){base.checkForEmpty();});};base.fadeOnFocus=function(){if(base.showing){base.setOpacity(base.options.fadeOpacity);}};base.setOpacity=function(opacity){base.$label.stop().animate({opacity:opacity},base.options.fadeDuration);base.showing=(opacity>0.0);};base.checkForEmpty=function(blur){if(base.$field.val()===""){base.prepForShow();base.setOpacity(blur?1.0:base.options.fadeOpacity);}else{base.setOpacity(0.0);}};base.prepForShow=function(e){if(!base.showing){base.$label.css({opacity:0.0}).show();base.$field.bind('keydown.infieldlabel',function(e){base.hideOnChange(e);});}};base.hideOnChange=function(e){if((e.keyCode===16)||(e.keyCode===9)||(e.keyCode===27)){return;}
if(base.showing){base.$label.hide();base.showing=false;}
base.$field.unbind('keydown.infieldlabel');};base.init();};$.InFieldLabels.defaultOptions={fadeOpacity:0.5,fadeDuration:300};$.fn.inFieldLabels=function(options){return this.each(function(){var for_attr=$(this).attr('for'),$field;if(!for_attr){return;}
$field=$("input#"+for_attr+"[type='text'],"+"input#"+for_attr+"[type='search'],"+"input#"+for_attr+"[type='tel'],"+"input#"+for_attr+"[type='url'],"+"input#"+for_attr+"[type='email'],"+"input#"+for_attr+"[type='password'],"+"textarea#"+for_attr);if($field.length===0){return;}
(new $.InFieldLabels(this,$field[0],options));});};}(jQuery));
// Chosen, a Select Box Enhancer for jQuery and Protoype
// by Patrick Filler for Harvest, http://getharvest.com
// 
// Version 0.9.8
// Full source at https://github.com/harvesthq/chosen
// Copyright (c) 2011 Harvest http://getharvest.com

// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
// This file is generated by `cake build`, do not edit it by hand.
((function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d<e;d++)c=f[d],g.push(this.add_option(c,b,a.disabled));return g},a.prototype.add_option=function(a,b,c){if(a.nodeName==="OPTION")return a.text!==""?(b!=null&&(this.parsed[b].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:a.value,text:a.text,html:a.innerHTML,selected:a.selected,disabled:c===!0?c:a.disabled,group_array_index:b,classes:a.className,style:a.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},a}(),a.select_to_array=function(b){var c,d,e,f,g;d=new a,g=b.childNodes;for(e=0,f=g.length;e<f;e++)c=g[e],d.add_node(c);return d.parsed},this.SelectParser=a})).call(this),function(){var a,b;b=this,a=function(){function a(a,b){this.form_field=a,this.options=b!=null?b:{},this.set_default_values(),this.is_multiple=this.form_field.multiple,this.default_text_default=this.is_multiple?"Select Some Options":"Select an Option",this.setup(),this.set_up_html(),this.register_observers(),this.finish_setup()}return a.prototype.set_default_values=function(){var a=this;return this.click_test_action=function(b){return a.test_active_click(b)},this.activate_action=function(b){return a.activate_field(b)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=this.options.allow_single_deselect!=null&&this.form_field.options[0]!=null&&this.form_field.options[0].text===""?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.search_contains=this.options.search_contains||!1,this.choices=0,this.results_none_found=this.options.no_results_text||"No results match"},a.prototype.mouse_enter=function(){return this.mouse_on_container=!0},a.prototype.mouse_leave=function(){return this.mouse_on_container=!1},a.prototype.input_focus=function(a){var b=this;if(!this.active_field)return setTimeout(function(){return b.container_mousedown()},50)},a.prototype.input_blur=function(a){var b=this;if(!this.mouse_on_container)return this.active_field=!1,setTimeout(function(){return b.blur_test()},100)},a.prototype.result_add_option=function(a){var b,c;return a.disabled?"":(a.dom_id=this.container_id+"_o_"+a.array_index,b=a.selected&&this.is_multiple?[]:["active-result"],a.selected&&b.push("result-selected"),a.group_array_index!=null&&b.push("group-option"),a.classes!==""&&b.push(a.classes),c=a.style.cssText!==""?' style="'+a.style+'"':"",'<li id="'+a.dom_id+'" class="'+b.join(" ")+'"'+c+">"+a.html+"</li>")},a.prototype.results_update_field=function(){return this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.generate_field_id=function(){var a;return a=this.generate_random_id(),this.form_field.id=a,a},a.prototype.generate_random_char=function(){var a,b,c;return a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length),b=a.substring(c,c+1)},a}(),b.AbstractChosen=a}.call(this),function(){var a,b,c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=this,a=jQuery,a.fn.extend({chosen:function(c){return!a.browser.msie||a.browser.version!=="6.0"&&a.browser.version!=="7.0"?a(this).each(function(d){if(!a(this).hasClass("chzn-done"))return new b(this,c)}):this}}),b=function(b){function e(){e.__super__.constructor.apply(this,arguments)}return f(e,b),e.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},e.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},e.prototype.set_up_html=function(){var b,d,e,f;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,b=a("<div />",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('<ul class="chzn-choices"><li class="search-field"><input type="text" value="'+this.default_text+'" class="default" autocomplete="off" style="width:25px;" /></li></ul><div class="chzn-drop" style="left:-9000px;"><ul class="chzn-results"></ul></div>'):b.html('<a href="javascript:void(0)" class="chzn-single chzn-default"><span>'+this.default_text+'</span><div><b></b></div></a><div class="chzn-drop" style="left:-9000px;"><div class="chzn-search"><input type="text" autocomplete="off" /></div><ul class="chzn-results"></ul></div>'),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},e.prototype.register_observers=function(){var a=this;return this.container.mousedown(function(b){return a.container_mousedown(b)}),this.container.mouseup(function(b){return a.container_mouseup(b)}),this.container.mouseenter(function(b){return a.mouse_enter(b)}),this.container.mouseleave(function(b){return a.mouse_leave(b)}),this.search_results.mouseup(function(b){return a.search_results_mouseup(b)}),this.search_results.mouseover(function(b){return a.search_results_mouseover(b)}),this.search_results.mouseout(function(b){return a.search_results_mouseout(b)}),this.form_field_jq.bind("liszt:updated",function(b){return a.results_update_field(b)}),this.search_field.blur(function(b){return a.input_blur(b)}),this.search_field.keyup(function(b){return a.keyup_checker(b)}),this.search_field.keydown(function(b){return a.keydown_checker(b)}),this.is_multiple?(this.search_choices.click(function(b){return a.choices_click(b)}),this.search_field.focus(function(b){return a.input_focus(b)})):this.container.click(function(a){return a.preventDefault()})},e.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},e.prototype.container_mousedown=function(b){var c;if(!this.is_disabled)return c=b!=null?a(b.target).hasClass("search-choice-close"):!1,b&&b.type==="mousedown"&&!this.results_showing&&b.stopPropagation(),!this.pending_destroy_click&&!c?(this.active_field?!this.is_multiple&&b&&(a(b.target)[0]===this.selected_item[0]||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},e.prototype.container_mouseup=function(a){if(a.target.nodeName==="ABBR")return this.results_reset(a)},e.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},e.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},e.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},e.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){var a,b,c,e,f;this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.find("span").text(this.default_text),this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),a="",f=this.results_data;for(c=0,e=f.length;c<e;c++)b=f[c],b.group?a+=this.result_add_group(b):b.empty||(a+=this.result_add_option(b),b.selected&&this.is_multiple?this.choice_build(b):b.selected&&!this.is_multiple&&(this.selected_item.removeClass("chzn-default").find("span").text(b.text),this.allow_single_deselect&&this.single_deselect_control_build()));return this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.search_results.html(a),this.parsing=!1},e.prototype.result_add_group=function(b){return b.disabled?"":(b.dom_id=this.container_id+"_g_"+b.array_index,'<li id="'+b.dom_id+'" class="group-result">'+a("<div />").text(b.label).html()+"</li>")},e.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c<f)return this.search_results.scrollTop(c)}},e.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},e.prototype.results_show=function(){var a;return this.is_multiple||(this.selected_item.addClass("chzn-single-with-drop"),this.result_single_selected&&this.result_do_highlight(this.result_single_selected)),a=this.is_multiple?this.container.height():this.container.height()-1,this.dropdown.css({top:a+"px",left:0}),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results()},e.prototype.results_hide=function(){return this.is_multiple||this.selected_item.removeClass("chzn-single-with-drop"),this.result_clear_highlight(),this.dropdown.css({left:"-9000px"}),this.results_showing=!1},e.prototype.set_tab_index=function(a){var b;if(this.form_field_jq.attr("tabindex"))return b=this.form_field_jq.attr("tabindex"),this.form_field_jq.attr("tabindex",-1),this.is_multiple?this.search_field.attr("tabindex",b):(this.selected_item.attr("tabindex",b),this.search_field.attr("tabindex",-1))},e.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},e.prototype.search_results_mouseup=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c.length)return this.result_highlight=c,this.result_select(b)},e.prototype.search_results_mouseover=function(b){var c;c=a(b.target).hasClass("active-result")?a(b.target):a(b.target).parents(".active-result").first();if(c)return this.result_do_highlight(c)},e.prototype.search_results_mouseout=function(b){if(a(b.target).hasClass("active-result"))return this.result_clear_highlight()},e.prototype.choices_click=function(b){b.preventDefault();if(this.active_field&&!a(b.target).hasClass("search-choice")&&!this.results_showing)return this.results_show()},e.prototype.choice_build=function(b){var c,d,e=this;return c=this.container_id+"_c_"+b.array_index,this.choices+=1,this.search_container.before('<li class="search-choice" id="'+c+'"><span>'+b.html+'</span><a href="javascript:void(0)" class="search-choice-close" rel="'+b.array_index+'"></a></li>'),d=a("#"+c).find("a").first(),d.click(function(a){return e.choice_destroy_link_click(a)})},e.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.is_disabled?b.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(a(b.target)))},e.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},e.prototype.results_reset=function(b){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.is_multiple||this.selected_item.addClass("chzn-default"),this.show_search_field_default(),a(b.target).remove(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},e.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight)return b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(b):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=b,this.selected_item.removeClass("chzn-default")),b.addClass("result-selected"),e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):(this.selected_item.find("span").first().text(d.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.result_activate=function(a){return a.addClass("active-result")},e.prototype.result_deactivate=function(a){return a.removeClass("active-result")},e.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>')},e.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;this.no_results_clear(),j=0,k=this.search_field.val()===this.default_text?"":a("<div/>").text(a.trim(this.search_field.val())).html(),g=this.search_contains?"":"^",f=new RegExp(g+k.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),n=new RegExp(k.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),s=this.results_data;for(o=0,q=s.length;o<q;o++){c=s[o];if(!c.disabled&&!c.empty)if(c.group)a("#"+c.dom_id).css("display","none");else if(!this.is_multiple||!c.selected){b=!1,i=c.dom_id,h=a("#"+i);if(f.test(c.html))b=!0,j+=1;else if(c.html.indexOf(" ")>=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(p=0,r=e.length;p<r;p++)d=e[p],f.test(d)&&(b=!0,j+=1)}b?(k.length?(l=c.html.search(n),m=c.html.substr(0,l+k.length)+"</em>"+c.html.substr(l+k.length),m=m.substr(0,l)+"<em>"+m.substr(l)):m=c.html,h.html(m),this.result_activate(h),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&i===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(h))}}return j<1&&k.length?this.no_results(k):this.winnow_results_set_highlight()},e.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d<e;d++)b=c[d],b=a(b),b.hasClass("group-result")?f.push(b.css("display","auto")):!this.is_multiple||!b.hasClass("result-selected")?f.push(this.result_activate(b)):f.push(void 0);return f},e.prototype.winnow_results_set_highlight=function(){var a,b;if(!this.result_highlight){b=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),a=b.length?b.first():this.search_results.find(".active-result").first();if(a!=null)return this.result_do_highlight(a)}},e.prototype.no_results=function(b){var c;return c=a('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),c.find("span").first().html(b),this.search_results.append(c)},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},e.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},e.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},e.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i<j;i++)e=g[i],f+=e+":"+this.search_field.css(e)+";";return c=a("<div />",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},e.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},e}(AbstractChosen),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}.call(this);

var snipt={module:function(){var modules={};return function(name){if(modules[name]){return modules[name];}
return modules[name]={};};}()};jQuery(function($){var SiteView=snipt.module('site').SiteView;window.site=new SiteView();});
(function(Site){var Snipt=snipt.module('snipt');Backbone.oldSync=Backbone.sync;Backbone.Model.prototype.idAttribute='resource_uri';var addSlash=function(str){return str+((str.length>0&&str.charAt(str.length-1)==='/')?'':'/');};Backbone.sync=function(method,model,options){options.headers=_.extend({'Authorization':'ApiKey '+window.user+':'+window.api_key},options.headers);return Backbone.oldSync(method,model,options);};Backbone.Model.prototype.url=function(){var url=this.id;if(!url){url=this.urlRoot;url=url||this.collection&&(_.isFunction(this.collection.url)?this.collection.url():this.collection.url);if(url&&this.has('id')){url=addSlash(url)+this.get('id');}}
url=url&&addSlash(url);if(typeof url==='undefined'){url='/api/private/snipt/';this.unset('id',{'silent':true});this.unset('user',{'silent':true});}
return url||null;};Site.SiteView=Backbone.View.extend({el:'body',initialize:function(opts){this.$body=$(this.el);this.$html=$('html');this.$html_body=this.$body.add(this.$html);this.$aside_main=$('aside.main',this.$body);this.$aside_nav=$('aside.nav',this.$body);this.$aside_nav_ul=$('ul',this.$aside_nav);this.$search_form=$('form.search',this.$body);this.$search_query=$('input#search-query',this.$body);this.$search_page_query=$('input.search-query',this.$body);this.$search_queries=this.$search_query.add(this.$search_page_query);this.$snipts=$('section#snipts article.snipt',this.$body);this.$modals=$('div.modal',this.$snipts);this.$main_edit=$('section#main-edit');this.$main=$('section#main');this.$keyboard_shortcuts=$('#keyboard-shortcuts',this.$body);this.keyboardShortcuts();this.inFieldLabels();var SniptListView=Snipt.SniptListView;this.snipt_list=new SniptListView({'snipts':this.$snipts});var that=this;this.$body.click(function(){if(!window.ui_halted&&!window.from_modal&&window.$selected){window.$selected.trigger('deselect');}
if(window.from_modal){window.from_modal=false;}
that.$aside_nav.removeClass('open');});this.$aside_nav_ul.click(function(e){e.stopPropagation();});$search_queries=this.$search_queries;$search_queries.focus(function(){if(window.$selected){$selected.trigger('deselect');}});this.$body.on('click','a.close',function(){$(this).parent().parent().modal('hide');window.ui_halted=false;return false;});this.$keyboard_shortcuts.on('hidden',function(){window.ui_halted=false;});if(this.$body.hasClass('pro-signup')){var $form=$('form#pro-signup');var $submit=$('button[type="submit"]',$form);var $name=$('input#name');var $cardNumber=$('input#number');var $expMonth=$('select#exp-month');var $expYear=$('select#exp-year');var $cvc=$('input#cvc');$form.submit(function(){$submit.attr('disabled','disabled');var errors=false;if(!Stripe.validateCardNumber($cardNumber.val())){$cardNumber.parents('div.control-group').addClass('error');errors=true;}else{$cardNumber.parents('div.control-group').removeClass('error');}
if(!Stripe.validateExpiry($expMonth.val(),$expYear.val())){$expMonth.parents('div.control-group').addClass('error');errors=true;}else{$expMonth.parents('div.control-group').removeClass('error');}
if(!Stripe.validateCVC($cvc.val())){$cvc.parents('div.control-group').addClass('error');errors=true;}else{$cvc.parents('div.control-group').removeClass('error');}
if(!errors){$('.payment-errors').hide();$('.payment-loading').show();Stripe.createToken({name:$name.val(),number:$cardNumber.val(),cvc:$cvc.val(),exp_month:$expMonth.val(),exp_year:$expYear.val()},that.stripeResponseHandler);}else{$submit.removeAttr('disabled');}
return false;});}
if(this.$body.hasClass('login')){$('input#id_username').focus();}
if(window.gittip_username){this.$aside_main.html(this.$aside_main.html().replace(/\[\[.*gittip.*\]\]/,'<iframe style="border: 0; margin: 0; padding: 0;" src="https://www.gittip.com/'+window.gittip_username+'/widget.html" width="48pt" height="22pt"></iframe>'));$('iframe',this.$aside_main).parent('p').prev('p').css('margin-bottom','10px');}
$('div.markdown pre code').each(function(i,e){hljs.highlightBlock(e);});window.ui_halted=false;},events:{'showKeyboardShortcuts':'showKeyboardShortcuts','click a.mini-profile':'toggleMiniProfile'},keyboardShortcuts:function(){var $body=this.$body;var that=this;$search_queries=this.$search_queries;$search_page_query=this.$search_page_query;$search_query=this.$search_query;$document=$(document);$document.bind('keydown','/',function(e){if(!window.ui_halted){e.preventDefault();if($body.hasClass('search')){$search_page_query.focus();}else{$search_query.focus();}}});$document.bind('keydown','h',function(e){if(!window.ui_halted){window.ui_halted=true;$body.trigger('showKeyboardShortcuts');}else{if(that.$keyboard_shortcuts.is(':visible')){that.$keyboard_shortcuts.modal('hide');}}});$document.bind('keydown','t',function(e){if(!window.ui_halted){window.open('','_blank');}});$document.bind('keydown','r',function(e){if(!window.ui_halted){location.reload(true);}});$document.bind('keydown','Ctrl+h',function(e){if(!window.ui_halted){history.go(-1);}});$document.bind('keydown','Ctrl+l',function(e){if(!window.ui_halted){history.go(1);}});this.$search_queries.bind('keydown','esc',function(e){if(!window.ui_halted){e.preventDefault();this.blur();}});},showKeyboardShortcuts:function(){this.$keyboard_shortcuts.modal('toggle');},toggleMiniProfile:function(e){this.$aside_nav.toggleClass('open');return false;},inFieldLabels:function(){$('div.infield label',this.$body).inFieldLabels({fadeDuration:200});},stripeResponseHandler:function(status,response){var $form=$('form#pro-signup');if(response.error){$('button[type="submit"]',$form).removeAttr('disabled');$('.payment-loading').hide();$('.payment-errors').text(response.error.message).show();}else{var token=response.id;$('input#name').val('');$('input#number').val('');$('select#exp-month').val('');$('select#exp-year').val('');$('input#cvc').val('');$form.append("<input type='hidden' name='token' value='"+token+"'/>");$form.get(0).submit();}}});})(snipt.module('site'));
(function(Snipt){Snipt.SniptModel=Backbone.Model.extend({toSafe:function(){var snipt=this.toJSON();snipt.code=this.escape('code');snipt.title=this.escape('title');snipt.tags_list=this.escape('tags_list');if(typeof snipt.tags==='object'){for(var i;i<snipt.tags.length;i++){snipt.tags[i].name=_.escape(snipt.tags[i].name);}}
return snipt;}});Snipt.SniptView=Backbone.View.extend({tagName:'article',initialize:function(){this.model.view=this;this.model.bind('change',this.render,this);this.template=_.template($('#snipt').html());this.editTemplate=_.template($('#edit').html());this.initLocalVars();this.initLineNumbers();},events:{'click a.copy':'copyFromClick','click a.edit':'edit','click a.favorite':'favoriteToggle','click a.embed':'embedFromClick','click a.expand':'expand','click .container':'selectFromClick','copyClose':'copyClose','copyRaw':'copy','detail':'detail','deselect':'deselect','destroy':'destroy','edit':'edit','embed':'embed','embedClose':'embedClose','expand':'expand','fadeAndRemove':'fadeAndRemove','goToAuthor':'goToAuthor','next':'next','prev':'prev','selectSnipt':'select'},copy:function(){$('textarea',this.$copyModal).remove();window.ui_halted=true;this.$copyModalBody.append('<textarea class="raw"></textarea>');$textarea=$('textarea.raw',this.$copyModalBody).val(this.model.get('code'));this.$copyModal.modal('show');$textarea.select();},copyClose:function(){$('textarea',this.$copyModal).remove();},copyFromClick:function(){this.copy();return false;},deselect:function(){this.$el.removeClass('selected');window.$selected=false;},detail:function(){window.location=this.model.get('absolute_url');},destroy:function(){this.model.destroy();},edit:function(){window.editing=true;window.ui_halted=true;this.select();that=this;var editPane=this.editTemplate({snipt:this.model.toSafe()});window.site.$main.hide();window.site.$body.addClass('detail editing');window.site.$main_edit.html(editPane);$('option[value="'+this.model.get('lexer')+'"]',window.site.$main_edit).attr('selected','selected');var $selectLexer=$('select#id_lexer',window.site.$main_edit);$selectLexer.chosen();$('label.blog-post input',window.site.$main_edit).on('change',function(){var $checkbox=$(this);var $label=$checkbox.parent();var $publish_date=$label.siblings('label.publish-date');if($checkbox.attr('checked')){$label.removeClass('is-not-blog-post').addClass('is-blog-post');$publish_date.show();}else{$label.addClass('is-not-blog-post').removeClass('is-blog-post');$publish_date.hide();}
return false;}).trigger('change');$('label.public input',window.site.$main_edit).on('change',function(){var $checkbox=$(this);var $label=$checkbox.parent();if($checkbox.attr('checked')){$label.removeClass('is-private').addClass('is-public');}else{$label.addClass('is-private').removeClass('is-public');}
return false;}).trigger('change');window.site.$main_edit.show();this.$editorCodeMirror=$('div.editor',window.site.$main_edit);this.$editorTextarea=$('textarea.editor',window.site.$main_edit);window.editor=CodeMirror(this.$editorCodeMirror.get(0),{autofocus:true,fixedGutter:true,gutter:true,indentUnit:4,lineNumbers:true,javascriptHint:true,matchBrackets:true,mode:that.guessCodeMirrorLexer($selectLexer.val()),value:that.model.get('code')});$selectLexer.change(function(){var $selectedLexer=$('option:selected',$selectLexer);var lexer=$selectLexer.val();window.editor.setOption('mode',that.guessCodeMirrorLexer($selectedLexer.val()));if(lexer==='markdown'||lexer==='text'){window.editor.setOption('lineWrapping',true);}else{window.editor.setOption('lineWrapping',false);}});$selectLexer.trigger('change');window.editorHeight=$(window).height()-147;window.editor.setSize('100%',window.editorHeight);this.$editorTextarea.height(window.editorHeight-8);$('textarea, input',window.site.$main_edit).bind('keydown','esc',function(e){$(this).blur();return false;});if(window.user_is_pro){var $selectEditor=$('select#id_editor',window.site.$main_edit);var $selectTheme=$('select#id_theme',window.site.$main_edit);$selectEditor.chosen();$selectEditor.change(function(){var newEditor=$selectEditor.val();if(newEditor==='textarea'){that.$editorCodeMirror.hide();that.$editorTextarea.show();that.$editorTextarea.val(window.editor.getValue());}
if(newEditor==='codemirror'){that.$editorTextarea.hide();that.$editorCodeMirror.show();window.editor.setValue(that.$editorTextarea.val());}});$selectTheme.chosen();$selectTheme.change(function(){window.editor.setOption('theme',$selectTheme.val());});if(window.editor_theme!='default'){$selectTheme.val(window.editor_theme);$selectTheme.trigger('liszt:updated');$selectTheme.trigger('change');}
if(window.default_editor!='codemirror'){$selectEditor.val(window.default_editor);$selectEditor.trigger('liszt:updated');$selectEditor.trigger('change');}
this.setupCodeMirrorFullScreen();}
$('button.delete',window.site.$main_edit).on('click',function(){if(confirm('Are you sure you want to delete this snipt?')){that.model.destroy();window.site.snipt_list.escapeUI(true);}
return false;});$('button.cancel',window.site.$main_edit).on('click',function(){window.site.snipt_list.escapeUI();return false;});$('button.save',window.site.$main_edit).on('click',function(){$('button.cancel').text('Close');that.save();return false;});$('button.save-and-close',window.site.$main_edit).on('click',function(){that.save();window.site.snipt_list.escapeUI();return false;});window.scrollTo(0,0);return false;},embed:function(){$('textarea',this.$embedModal).remove();window.ui_halted=true;this.$embedModalBody.append('<textarea class="raw"></textarea>');$textarea=$('textarea.raw',this.$embedModalBody).val('<script type="text/javascript" src="'+this.model.get('embed_url')+'"></script>');this.$embedModal.modal('show');$textarea.select();},embedFromClick:function(){this.embed();return false;},embedClose:function(){$('textarea',this.$embedModal).remove();},expand:function(){this.$container.toggleClass('expanded',100);this.$tags.toggleClass('expanded');this.select();return false;},fadeAndRemove:function(){var $toRemove=$(this.el);var $nextSnipt=$toRemove.next('article.snipt');window.$selected=false;$toRemove.fadeOut('fast',function(){$(this).remove();$nextSnipt.trigger('selectSnipt');});return false;},goToAuthor:function(){window.location=this.model.get('user').absolute_url;},guessCodeMirrorLexer:function(val){if(val==='html'){return'htmlmixed';}
if(val==='js')return'javascript';if(val==='rb')return'ruby';return val;},favoriteToggle:function(){var that=this;if(this.$el.hasClass('favorited')){$.ajax('/api/private/favorite/'+this.model.get('favorite_id')+'/',{type:'delete',success:function(){that.$el.removeClass('favorited');that.$favorite.text('Favorite');},headers:{'Authorization':'ApiKey '+window.user+':'+window.api_key}});}else{$.ajax('/api/private/favorite/',{data:'{"snipt": '+this.model.get('id')+'}',contentType:'application/json',type:'post',success:function(resp){that.$el.addClass('favorited');that.model.set({'favorite_id':resp.id},{'silent':true});that.$favorite.text('Favorited');},headers:{'Authorization':'ApiKey '+window.user+':'+window.api_key}});}
return false;},initLineNumbers:function(){var lines=$('span.special',this.$el);var that=this;$.each(lines,function(){var l=$(this);var num=l.text().trim();var url=that.model.get('absolute_url');l.replaceWith('<a href="'+url+'#line-'+num+'">'+num+'</a>');});},initLocalVars:function(){this.$aside=$('aside',this.$el);this.$container=$('div.container',this.$el);this.$copyModal=$('div.copy-modal',this.$el);this.$copyModalBody=$('div.modal-body',this.$copyModal);this.$embedModal=$('div.embed-modal',this.$el);this.$embedModalBody=$('div.modal-body',this.$embedModal);this.$favorite=$('a.favorite',this.$el);this.$h1=$('header h1 a',this.$el);this.$tags=$('section.tags ul',this.$aside);this.$copyModal.on('hidden',function(e){$(this).parent().trigger('copyClose');window.ui_halted=false;window.from_modal=true;});this.$embedModal.on('hidden',function(e){$(this).parent().trigger('embedClose');window.ui_halted=false;window.from_modal=true;});},next:function(){if(!window.ui_halted){nextSnipt=this.$el.next('article.snipt');if(nextSnipt.length){return nextSnipt.trigger('selectSnipt');}}},prev:function(){if(!window.ui_halted){prevSnipt=this.$el.prev('article.snipt');if(prevSnipt.length){return prevSnipt.trigger('selectSnipt');}}},remove:function(){return false;},render:function(){this.$el.html(this.template({snipt:this.model.toSafe()}));this.initLocalVars();this.initLineNumbers();if(this.model.get('blog_post')===true){this.$el.addClass('blog-post');}else{this.$el.removeClass('blog-post');}
if(this.model.get('public')===true){this.$el.removeClass('private-snipt');}else{this.$el.addClass('private-snipt');}
if(this.model.get('user').username===window.user){this.$el.addClass('editable');}else{this.$el.removeClass('editable');}
if(this.model.get('line_count')>8&&!window.detail){this.$el.addClass('expandable');}else{this.$el.removeClass('expandable');}
$('script#disqus').remove();window.site.$body.append('<script id="disqus" type="text/javascript">'+$('script#disqus-template').text()+'</script>');if(this.$el.attr('id')==='new-snipt'){this.$el.fadeIn('fast');this.$el.attr('id','snipt-'+this.model.get('id'));}
return this;},save:function(){$('button.save, button.save-and-close, button.delete, button.cancel',window.site.$main_edit).attr('disabled','disabled');var code;if(this.$editorTextarea.is(':visible')){code=this.$editorTextarea.val();}else{code=window.editor.getValue();}
that.model.save({'title':$('input#snipt_title').val(),'tags':$('label.tags textarea').val(),'tags_list':$('label.tags textarea').val(),'lexer':$('select[name="lexer"]').val(),'lexer_name':$('select[name="lexer"] option:selected').text(),'code':code,'description':$('textarea[name="description"]').val(),'blog_post':$('label.blog-post input').is(':checked'),'publish_date':$('label.publish-date input').val(),'public':$('label.public input').is(':checked')},{success:function(model,response){$('button.save, button.save-and-close, button.delete, button.cancel',window.site.$main_edit).removeAttr('disabled');},error:function(model,response){alert('There was a problem saving your snipt. We\'ve been notified. Sorry about that!');}});},select:function(fromClick){$('article.selected',window.site.snipt_list.$el).removeClass('selected');this.$el.addClass('selected');if(fromClick!==true){if(window.site.$snipts.index(this.$el)===0){window.scrollTo(0,0);}else{window.site.$html_body.animate({scrollTop:this.$el.offset().top-50},0);}}
window.$selected=this.$el;},selectFromClick:function(e){this.select(true);e.stopPropagation();window.site.$aside_nav.removeClass('open');},setupCodeMirrorFullScreen:function(){function isFullScreen(cm){return(/\bCodeMirror-fullscreen\b/).test(cm.getWrapperElement().className);}
function winHeight(){return window.innerHeight||(document.documentElement||document.body).clientHeight;}
function setFullScreen(cm,full){var wrap=cm.getWrapperElement();if(full){wrap.className+=' CodeMirror-fullscreen';wrap.style.height=winHeight()+'px';document.documentElement.style.overflow='hidden';$('header.fixed-save').hide();$('div.container').addClass('full-screened');}else{wrap.className=wrap.className.replace(' CodeMirror-fullscreen','');window.editor.setSize('100%',window.editorHeight);document.documentElement.style.overflow='';$('header.fixed-save').show();$('div.container').removeClass('full-screened');}
cm.refresh();}
window.editor.on(window,'resize',function(){var showing=document.body.getElementsByClassName('CodeMirror-fullscreen')[0];if(!showing)return;showing.CodeMirror.getWrapperElement().style.height=winHeight()+'px';});window.editor.setOption('extraKeys',{'Cmd-Enter':function(cm){setFullScreen(cm,!isFullScreen(cm));},'F11':function(cm){setFullScreen(cm,!isFullScreen(cm));},'Esc':function(cm){if(isFullScreen(cm))setFullScreen(cm,false);}});}});Snipt.SniptListView=Backbone.View.extend({el:'section#snipts',initialize:function(opts){var that=this;opts.snipts.each(this.addExistingSnipt);this.keyboardShortcuts();var cmd;if(navigator.platform=='MacPPC'||navigator.platform=='MacIntel'){cmd='Cmd';}
else{cmd='Ctrl';}
$('span.cmd-ctrl').text(cmd);$('button#add-snipt').click(function(){that.addNewSnipt();});},addExistingSnipt:function(){var $el=$(this);var $created=$('li.created',$el);var $h1=$('header h1 a',$el);var $public=$('div.public',$el);var $blog_post=$('div.blog-post',$el);var $publish_date=$('div.publish-date',$el);var $user=$('li.author a',$el);var is_public=$public.text()==='True'?true:false;var is_blog_post=$blog_post.text()==='True'?true:false;var tag_lis=$('section.tags li',$el);var tags=[];for(var i=0;i<tag_lis.length;i++){var $tag=$('a',tag_lis.eq(i));tags[i]={name:$tag.text(),absolute_url:$tag.attr('href')};}
var is_pro=$user.siblings('span.pro').length?true:false;var data={code:$('textarea.raw',$el).text(),description:$('textarea.description',$el).text(),created:$created.attr('title'),created_formatted:$created.text(),embed_url:$('div.embed-url',$el).text(),absolute_url:$h1.attr('href'),favorite_id:$el.data('favorite-id'),id:parseInt($el.attr('id').replace('snipt-',''),0),key:$('div.key',$el).text(),lexer:$('div.lexer',$el).text(),lexer_name:$('div.lexer-name',$el).text(),line_count:parseInt($('div.line-count',$el).text(),0),modified:$('div.modified',$el).text(),resource_uri:$('div.resource-uri',$el).text(),slug:$('div.slug',$el).text(),stylized:$('div.stylized',$el).text(),tags:tags,publish_date:$publish_date.text(),tags_list:$('div.tags-list',$el).text(),title:$h1.text(),user:{absolute_url:$user.attr('href'),username:$user.text(),profile:{is_pro:is_pro}}};data['public']=is_public;data.blog_post=is_blog_post;var view=new Snipt.SniptView({el:this,model:new Snipt.SniptModel(data)});},addNewSnipt:function(){var $articleNewSnipt=$('article#new-snipt');if($articleNewSnipt.length===0){window.site.snipt_list.$el.prepend('<article id="new-snipt" class="hidden snipt"></article>');var data={id:'',code:'',description:'',tags:[],tags_list:'',title:'',lexer:'text',lexer_name:'Text only',new_from_js:true,user:{username:'',profile:{is_pro:window.user_is_pro}}};data['public']=false;data.blog_post=false;var newSniptView=new Snipt.SniptView({el:$('article#new-snipt'),model:new Snipt.SniptModel(data)});newSniptView.edit();}else{$articleNewSnipt.trigger('edit');}
return false;},escapeUI:function(destroyed){if(window.editing||destroyed){if(!window.site.$html.hasClass('detail')){window.site.$body.removeClass('detail');}
window.site.$main_edit.hide();window.site.$body.removeClass('editing');window.site.$main.show();window.editing=true;window.ui_halted=false;if(window.site.$snipts.index(window.$selected)===0){window.scrollTo(0,0);}else{window.site.$html_body.animate({scrollTop:window.$selected.offset().top-50},0);}
if(destroyed){window.$selected.trigger('fadeAndRemove');}}else{if(!window.ui_halted){if($selected){$selected.trigger('deselect');}
window.site.$aside_nav.removeClass('open');}}},keyboardShortcuts:function(){var that=this;$selected=window.selected;$document=$(document);$document.bind('keydown','j',function(){if(!window.ui_halted){if(!$selected){window.site.$snipts.eq(0).trigger('selectSnipt');}else{$selected.trigger('next');}}});$document.bind('keydown','k',function(){if(!window.ui_halted){if(!$selected){window.site.$snipts.eq(0).trigger('selectSnipt');}else{$selected.trigger('prev');}}});$document.bind('keydown','c',function(e){if(!window.ui_halted&&!window.blog_post){if($selected){e.preventDefault();$selected.trigger('copyRaw');}}});$document.bind('keydown','Ctrl+e',function(){if(!window.ui_halted){if($selected){if($selected.hasClass('editable')){$selected.trigger('edit');}}}});$document.bind('keydown','Ctrl+backspace',function(){if(!window.ui_halted||window.editing){if($selected){if($selected.hasClass('editable')){if(confirm('Are you sure you want to delete this snipt?')){$selected.trigger('destroy');window.site.snipt_list.escapeUI(true);}}}}});$document.bind('keydown','Ctrl+del',function(){if(!window.ui_halted||window.editing){if($selected){if($selected.hasClass('editable')){if(confirm('Are you sure you want to delete this snipt?')){$selected.trigger('destroy');window.site.snipt_list.escapeUI(true);}}}}});$document.bind('keydown','Alt+n',function(){if(!window.ui_halted){that.addNewSnipt();}});$document.bind('keydown','Ctrl+n',function(){if(!window.ui_halted){that.addNewSnipt();}});$document.bind('keydown','Ctrl+s',function(){if(window.editing){if($selected){if($selected.hasClass('editable')){$('button.save').click();}}}});$document.bind('keydown','Ctrl+c',function(){if(window.editing){if($selected){if($selected.hasClass('editable')){$('button.save-and-close').click();}}}});$document.bind('keydown','esc',function(){that.escapeUI();});$document.bind('keydown','g',function(){if(!window.ui_halted){if(window.$selected){window.$selected.trigger('deselect');}
window.scrollTo(0,0);}});$document.bind('keydown','Shift+g',function(){if(!window.ui_halted){if(window.$selected){window.$selected.trigger('deselect');}
window.scrollTo(0,document.body.scrollHeight);}});$document.bind('keydown','n',function(){if(!window.ui_halted){var $anc=$('li.next a');if($anc.length){if($anc.attr('href')!=='#'){window.location=$anc.attr('href');}}}});$document.bind('keydown','e',function(){if(!window.ui_halted){if($selected){if($selected.hasClass('expandable')){$selected.trigger('expand');}}}});$document.bind('keydown','u',function(){if(!window.ui_halted){if($selected){$selected.trigger('goToAuthor');}}});$document.bind('keydown','p',function(){if(!window.ui_halted){var $anc=$('li.prev a');if($anc.length){if($anc.attr('href')!=='#'){window.location=$anc.attr('href');}}}});$document.bind('keydown','v',function(e){if(!window.ui_halted&&!window.blog_post){if($selected){e.preventDefault();$selected.trigger('embed');}}});$document.bind('keydown','o',function(){if(!window.ui_halted){if($selected){$selected.trigger('detail');}}});$document.bind('keydown','return',function(){if(!window.ui_halted){if($selected){$selected.trigger('detail');}}});}});})(snipt.module('snipt'));
(function(){if(typeof angular!=='undefined'){var root=this;var $=root.jQuery;var controllers={};var app=angular.module('Account',[],function($routeProvider,$locationProvider){$locationProvider.html5Mode(true);$routeProvider.when('/account/',{templateUrl:'/static/js/src/modules/partials/profile.html',controller:controllers.ProfileController});$routeProvider.when('/account/billing/',{templateUrl:'/static/js/src/modules/partials/billing.html',controller:controllers.BillingController});$routeProvider.when('/account/blogging/',{templateUrl:'/static/js/src/modules/partials/blogging.html',controller:controllers.BloggingController});$routeProvider.when('/account/editor/',{templateUrl:'/static/js/src/modules/partials/editor.html',controller:controllers.EditorController});$routeProvider.otherwise({'redirectTo':function(routeParams,locationPath){window.location=locationPath;}});});app.config(function($interpolateProvider){$interpolateProvider.startSymbol('[[');$interpolateProvider.endSymbol(']]');});app.factory('AccountStorage',function($http){return{getAccount:function(){var promise=$http({method:'GET',url:'/api/private/profile/'+window.user_profile_id+'/',headers:{'Authorization':'ApiKey '+window.user+':'+window.api_key}});return promise;},saveAccount:function(user,fields){var promise=$http({method:'PUT',url:'/api/private/profile/'+window.user_profile_id+'/',headers:{'Authorization':'ApiKey '+window.user+':'+window.api_key},data:function(){var userData={};for(var i=0;i<fields.length;i++){userData[fields[i]]=user[fields[i]];}
return userData;}()});return promise;}};});controllers.BillingController=function($scope){$scope.section='Billing';};controllers.BloggingController=function($scope){$scope.fields=['blog_title','blog_theme','blog_domain','gittip_username','disqus_shortname','google_analytics_tracking_id','gauges_site_id','google_ad_client','google_ad_slot','google_ad_width','google_ad_height'];$scope.section='Blogging';$scope.blogThemeOptions=[{id:'D',label:'Default'},{id:'A',label:'Pro Adams'}];};controllers.EditorController=function($scope){$scope.fields=['default_editor','editor_theme'];$scope.section='Editor';$scope.editorOptions=[{id:'C',label:'CodeMirror'},{id:'T',label:'Textarea'}];$scope.editorThemeOptions=[{id:'default',label:'Default'},{id:'ambiance',label:'Ambiance'},{id:'blackboard',label:'Blackboard'},{id:'cobalt',label:'Cobalt'},{id:'eclipse',label:'Eclipse'},{id:'elegant',label:'Elegant'},{id:'erlang-dark',label:'Erlang Dark'},{id:'lesser-dark',label:'Lesser Dark'},{id:'monokai',label:'Monokai'},{id:'neat',label:'Neat'},{id:'night',label:'Night'},{id:'rubyblue',label:'Ruby Blue'},{id:'solarized dark',label:'Solarized Dark'},{id:'solarized light',label:'Solarized Light'},{id:'twilight',label:'Twilight'},{id:'vibrant-ink',label:'Vibrant Ink'},{id:'xq-dark',label:'XQ Dark'}];};controllers.MainController=function($scope,$route,AccountStorage){$scope.errors=[];$scope.saveButtonText='Save';$scope.route=$route;AccountStorage.getAccount().then(function(response){$scope.user=response.data;});$scope.saveFields=function(fields){$scope.saveButtonText='Saving…';AccountStorage.saveAccount($scope.user,fields).then(function onSuccess(response){$scope.user=response.data;$scope.success=true;$scope.message=$scope.route.current.scope.section+' settings saved.';$scope.saveButtonText='Save';$scope.errors=[];setTimeout(function(){$scope.success=null;$scope.message='';$scope.$apply();},3000);},function onError(response){$scope.success=false;$scope.saveButtonText='Save';if(response){$scope.errors=response.data.profile;$scope.message='Only spaces, letters, numbers, underscores, dashes, periods, forward slashes, and "at sign" are valid.';}else{$scope.message='There was an error saving your settings.';}});};};controllers.ProfileController=function($scope){$scope.section='Profile';};app.controller(controllers);}}).call(this);window.CodeMirror=function(){"use strict";function s(a,c){if(!(this instanceof s))return new s(a,c);this.options=c=c||{};for(var d in vc)!c.hasOwnProperty(d)&&vc.hasOwnProperty(d)&&(c[d]=vc[d]);D(c);var e=this.display=t(a);e.wrapper.CodeMirror=this,A(this),c.autofocus&&!o&&sb(this),this.view=u(new qd([new pd([cd("",null,ib(e))])])),this.nextOpId=0,v(this),y(this),c.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),this.setValue(c.value||""),b&&setTimeout(Wd(rb,this,!0),20),this.view.history=xd(),ub(this);var f;try{f=document.activeElement==e.input}catch(g){}f||c.autofocus&&!o?setTimeout(Wd(Ub,this),20):Vb(this),mb(this,function(){for(var a in uc)uc.propertyIsEnumerable(a)&&uc[a](this,c[a],xc);for(var b=0;Bc.length>b;++b)Bc[b](this)})()}function t(a){var b={},d=b.input=_d("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none;");d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),b.inputDiv=_d("div",[d],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),b.scrollbarH=_d("div",[_d("div",null,null,"height: 1px")],"CodeMirror-hscrollbar"),b.scrollbarV=_d("div",[_d("div",null,null,"width: 1px")],"CodeMirror-vscrollbar"),b.scrollbarFiller=_d("div",null,"CodeMirror-scrollbar-filler"),b.lineDiv=_d("div"),b.selectionDiv=_d("div",null,null,"position: relative; z-index: 1"),b.cursor=_d("pre","\u00a0","CodeMirror-cursor"),b.otherCursor=_d("pre","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"),b.measure=_d("div",null,"CodeMirror-measure"),b.lineSpace=_d("div",[b.measure,b.selectionDiv,b.lineDiv,b.cursor,b.otherCursor],null,"position: relative; outline: none"),b.mover=_d("div",[_d("div",[b.lineSpace],"CodeMirror-lines")],null,"position: relative"),b.sizer=_d("div",[b.mover],"CodeMirror-sizer"),b.heightForcer=_d("div","\u00a0",null,"position: absolute; height: "+Md+"px"),b.gutters=_d("div",null,"CodeMirror-gutters"),b.lineGutter=null;var f=_d("div",[b.sizer,b.heightForcer,b.gutters],null,"position: relative; min-height: 100%");return b.scroller=_d("div",[f],"CodeMirror-scroll"),b.scroller.setAttribute("tabIndex","-1"),b.wrapper=_d("div",[b.inputDiv,b.scrollbarH,b.scrollbarV,b.scrollbarFiller,b.scroller],"CodeMirror"),c&&(b.gutters.style.zIndex=-1,b.scroller.style.paddingRight=0),a.appendChild?a.appendChild(b.wrapper):a(b.wrapper),n&&(d.style.width="0px"),e||(b.scroller.draggable=!0),j?(b.inputDiv.style.height="1px",b.inputDiv.style.position="absolute"):c&&(b.scrollbarH.style.minWidth=b.scrollbarV.style.minWidth="18px"),b.viewOffset=b.showingFrom=b.showingTo=b.lastSizeC=0,b.lineNumWidth=b.lineNumInnerWidth=b.lineNumChars=null,b.prevInput="",b.alignWidgets=!1,b.pollingFast=!1,b.poll=new Od,b.draggingText=!1,b.cachedCharWidth=b.cachedTextHeight=null,b.measureLineCache=[],b.measureLineCachePos=0,b.inaccurateSelection=!1,b.pasteIncoming=!1,b}function u(a){var b={line:0,ch:0};return{doc:a,frontier:0,highlight:new Od,sel:{from:b,to:b,head:b,anchor:b,shift:!1,extend:!1},scrollTop:0,scrollLeft:0,overwrite:!1,focused:!1,maxLine:rd(a,0),maxLineLength:0,maxLineChanged:!1,suppressEdits:!1,goalColumn:null,cantEdit:!1,keyMaps:[]}}function v(a){var b=a.view.doc;a.view.mode=s.getMode(a.options,a.options.mode),b.iter(0,b.size,function(a){a.stateAfter=null}),a.view.frontier=0,U(a,100)}function w(a){var b=a.view.doc,c=ib(a.display);if(a.options.lineWrapping){a.display.wrapper.className+=" CodeMirror-wrap";var d=a.display.scroller.clientWidth/jb(a.display)-3;b.iter(0,b.size,function(a){if(0!=a.height){var b=Math.ceil(a.text.length/d)||1;1!=b&&sd(a,b*c)}}),a.display.sizer.style.minWidth=""}else a.display.wrapper.className=a.display.wrapper.className.replace(" CodeMirror-wrap",""),C(a.view),b.iter(0,b.size,function(a){0!=a.height&&sd(a,c)});nb(a,0,b.size),bb(a),setTimeout(function(){E(a.display,a.view.doc.height)},100)}function x(a){var b=Fc[a.options.keyMap].style;a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(b?" cm-keymap-"+b:"")}function y(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),bb(a)}function z(a){A(a),K(a,!0)}function A(a){var b=a.display.gutters,c=a.options.gutters;ae(b);for(var d=0;c.length>d;++d){var e=c[d],f=b.appendChild(_d("div",null,"CodeMirror-gutter "+e));"CodeMirror-linenumbers"==e&&(a.display.lineGutter=f,f.style.width=(a.display.lineNumWidth||1)+"px")}b.style.display=d?"":"none"}function B(a,b){if(0==b.height)return 0;for(var d,c=b.text.length,e=b;d=Uc(e);){var f=d.find();e=rd(a,f.from.line),c+=f.from.ch-f.to.ch}for(e=b;d=Vc(e);){var f=d.find();c-=e.text.length-f.from.ch,e=rd(a,f.to.line),c+=e.text.length-f.to.ch}return c}function C(a){a.maxLine=rd(a.doc,0),a.maxLineLength=B(a.doc,a.maxLine),a.maxLineChanged=!0,a.doc.iter(1,a.doc.size,function(b){var c=B(a.doc,b);c>a.maxLineLength&&(a.maxLineLength=c,a.maxLine=b)})}function D(a){for(var b=!1,c=0;a.gutters.length>c;++c)"CodeMirror-linenumbers"==a.gutters[c]&&(a.lineNumbers?b=!0:a.gutters.splice(c--,1));!b&&a.lineNumbers&&a.gutters.push("CodeMirror-linenumbers")}function E(a,b){var c=b+2*Y(a);a.sizer.style.minHeight=a.heightForcer.style.top=c+"px";var d=Math.max(c,a.scroller.scrollHeight),e=a.scroller.scrollWidth>a.scroller.clientWidth,f=d>a.scroller.clientHeight;f?(a.scrollbarV.style.display="block",a.scrollbarV.style.bottom=e?ge(a.measure)+"px":"0",a.scrollbarV.firstChild.style.height=d-a.scroller.clientHeight+a.scrollbarV.clientHeight+"px"):a.scrollbarV.style.display="",e?(a.scrollbarH.style.display="block",a.scrollbarH.style.right=f?ge(a.measure)+"px":"0",a.scrollbarH.firstChild.style.width=a.scroller.scrollWidth-a.scroller.clientWidth+a.scrollbarH.clientWidth+"px"):a.scrollbarH.style.display="",e&&f?(a.scrollbarFiller.style.display="block",a.scrollbarFiller.style.height=a.scrollbarFiller.style.width=ge(a.measure)+"px"):a.scrollbarFiller.style.display="",k&&0===ge(a.measure)&&(a.scrollbarV.style.minWidth=a.scrollbarH.style.minHeight=l?"18px":"12px")}function F(a,b,c){var d=a.scroller.scrollTop,e=a.wrapper.clientHeight;"number"==typeof c?d=c:c&&(d=c.top,e=c.bottom-c.top),d=Math.floor(d-Y(a));var f=Math.ceil(d+e);return{from:ud(b,d),to:ud(b,f)}}function G(a){var b=a.display;if(b.alignWidgets||b.gutters.firstChild){for(var c=J(b)-b.scroller.scrollLeft+a.view.scrollLeft,d=b.gutters.offsetWidth,e=c+"px",f=b.lineDiv.firstChild;f;f=f.nextSibling)if(f.alignable)for(var g=0,h=f.alignable;h.length>g;++g)h[g].style.left=e;b.gutters.style.left=c+d+"px"}}function H(a){if(!a.options.lineNumbers)return!1;var b=a.view.doc,c=I(a.options,b.size-1),d=a.display;if(c.length!=d.lineNumChars){var e=d.measure.appendChild(_d("div",[_d("div",c)],"CodeMirror-linenumber CodeMirror-gutter-elt")),f=e.firstChild.offsetWidth,g=e.offsetWidth-f;return d.lineGutter.style.width="",d.lineNumInnerWidth=Math.max(f,d.lineGutter.offsetWidth-g),d.lineNumWidth=d.lineNumInnerWidth+g,d.lineNumChars=d.lineNumInnerWidth?c.length:-1,d.lineGutter.style.width=d.lineNumWidth+"px",!0}return!1}function I(a,b){return a.lineNumberFormatter(b+a.firstLineNumber)+""}function J(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function K(a,b,c){var d=a.display.showingFrom,e=a.display.showingTo,f=L(a,b,c);return f&&(Kd(a,a,"update",a),(a.display.showingFrom!=d||a.display.showingTo!=e)&&Kd(a,a,"viewportChange",a,a.display.showingFrom,a.display.showingTo)),Q(a),E(a.display,a.view.doc.height),f}function L(a,b,d){var e=a.display,f=a.view.doc;if(!e.wrapper.clientWidth)return e.showingFrom=e.showingTo=e.viewOffset=0,void 0;var g=F(e,f,d);if(!(b!==!0&&0==b.length&&g.from>e.showingFrom&&g.to<e.showingTo)){if(b&&H(a)&&(b=!0),e.sizer.style.marginLeft=e.scrollbarH.style.left=e.gutters.offsetWidth+"px",b!==!0&&r)for(var h=0;b.length>h;++h)for(var j,i=b[h];j=Uc(rd(f,i.from));){var k=j.find().from.line;i.diff&&(i.diff-=i.from-k),i.from=k}var l=b===!0?0:1/0;if(a.options.lineNumbers&&b&&b!==!0)for(var h=0;b.length>h;++h)if(b[h].diff){l=b[h].from;break}var k=Math.max(g.from-a.options.viewportMargin,0),m=Math.min(f.size,g.to+a.options.viewportMargin);if(k>e.showingFrom&&20>k-e.showingFrom&&(k=e.showingFrom),e.showingTo>m&&20>e.showingTo-m&&(m=Math.min(f.size,e.showingTo)),r)for(k=td(Wc(f,rd(f,k)));f.size>m&&Xc(rd(f,m));)++m;for(var n=b===!0?[]:M([{from:e.showingFrom,to:e.showingTo}],b),o=0,h=0;n.length>h;++h){var p=n[h];k>p.from&&(p.from=k),p.to>m&&(p.to=m),p.from>=p.to?n.splice(h--,1):o+=p.to-p.from}if(o!=m-k||k!=e.showingFrom||m!=e.showingTo){n.sort(function(a,b){return a.from-b.from}),.7*(m-k)>o&&(e.lineDiv.style.display="none"),O(a,k,m,n,l),e.lineDiv.style.display="";var q=k!=e.showingFrom||m!=e.showingTo||e.lastSizeC!=e.wrapper.clientHeight;q&&(e.lastSizeC=e.wrapper.clientHeight),e.showingFrom=k,e.showingTo=m,U(a,100);for(var u,s=e.lineDiv.offsetTop,t=e.lineDiv.firstChild;t;t=t.nextSibling)if(t.lineObj){if(c){var v=t.offsetTop+t.offsetHeight;u=v-s,s=v}else{var w=t.getBoundingClientRect();u=w.bottom-w.top}var x=t.lineObj.height-u;2>u&&(u=ib(e)),(x>.001||-.001>x)&&sd(t.lineObj,u)}return e.viewOffset=vd(a,rd(f,k)),e.mover.style.top=e.viewOffset+"px",!0}}}function M(a,b){for(var c=0,d=b.length||0;d>c;++c){for(var e=b[c],f=[],g=e.diff||0,h=0,i=a.length;i>h;++h){var j=a[h];e.to<=j.from&&e.diff?f.push({from:j.from+g,to:j.to+g}):e.to<=j.from||e.from>=j.to?f.push(j):(e.from>j.from&&f.push({from:j.from,to:e.from}),e.to<j.to&&f.push({from:e.to+g,to:j.to+g}))}a=f}return a}function N(a){for(var b=a.display,c={},d={},e=b.gutters.firstChild,f=0;e;e=e.nextSibling,++f)c[a.options.gutters[f]]=e.offsetLeft,d[a.options.gutters[f]]=e.offsetWidth;return{fixedPos:J(b),gutterTotalWidth:b.gutters.offsetWidth,gutterLeft:c,gutterWidth:d,wrapperWidth:b.wrapper.clientWidth}}function O(a,c,d,f,g){function m(b){var c=b.nextSibling;return e&&p&&a.display.currentWheelTarget==b?(b.style.display="none",b.lineObj=null):k.removeChild(b),c}var h=N(a),i=a.display,j=a.options.lineNumbers;f.length||b||e&&a.display.currentWheelTarget||ae(i.lineDiv);var k=i.lineDiv,l=k.firstChild,n=f.shift(),o=c;for(a.view.doc.iter(c,d,function(b){if(n&&n.to==o&&(n=f.shift()),Xc(b))0!=b.height&&sd(b,0);else if(n&&o>=n.from&&n.to>o){for(;l.lineObj!=b;)l=m(l);j&&o>=g&&l.lineNumber&&ce(l.lineNumber,I(a.options,o)),l=l.nextSibling}else{var c=P(a,b,o,h);k.insertBefore(c,l),c.lineObj=b}++o});l;)l=m(l)}function P(a,b,d,e){var f=jd(a,b),g=b.gutterMarkers,h=a.display;if(!(a.options.lineNumbers||g||b.bgClass||b.wrapClass||b.widgets&&b.widgets.length))return f;var i=_d("div",null,b.wrapClass,"position: relative");if(a.options.lineNumbers||g){var j=i.appendChild(_d("div",null,null,"position: absolute; left: "+e.fixedPos+"px"));if(i.alignable=[j],!a.options.lineNumbers||g&&g["CodeMirror-linenumbers"]||(i.lineNumber=j.appendChild(_d("div",I(a.options,d),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+e.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+h.lineNumInnerWidth+"px"))),g)for(var k=0;a.options.gutters.length>k;++k){var l=a.options.gutters[k],m=g.hasOwnProperty(l)&&g[l];m&&j.appendChild(_d("div",[m],"CodeMirror-gutter-elt","left: "+e.gutterLeft[l]+"px; width: "+e.gutterWidth[l]+"px"))}}if(b.bgClass&&i.appendChild(_d("div","\u00a0",b.bgClass+" CodeMirror-linebackground")),i.appendChild(f),b.widgets)for(var n=0,o=b.widgets;o.length>n;++n){var p=o[n],q=_d("div",[p.node],"CodeMirror-linewidget");if(q.widget=p,p.noHScroll){(i.alignable||(i.alignable=[])).push(q);var r=e.wrapperWidth;q.style.left=e.fixedPos+"px",p.coverGutter||(r-=e.gutterTotalWidth,q.style.paddingLeft=e.gutterTotalWidth+"px"),q.style.width=r+"px"}p.coverGutter&&(q.style.zIndex=5,q.style.position="relative",p.noHScroll||(q.style.marginLeft=-e.gutterTotalWidth+"px")),p.above?i.insertBefore(q,a.options.lineNumbers&&0!=b.height?j:f):i.appendChild(q)}return c&&(i.style.zIndex=2),i}function Q(a){var b=a.display,c=bc(a.view.sel.from,a.view.sel.to);c||a.options.showCursorWhenSelecting?R(a):b.cursor.style.display=b.otherCursor.style.display="none",c?b.selectionDiv.style.display="none":S(a);var d=eb(a,a.view.sel.head,"div"),e=b.wrapper.getBoundingClientRect(),f=b.lineDiv.getBoundingClientRect();b.inputDiv.style.top=Math.max(0,Math.min(b.wrapper.clientHeight-10,d.top+f.top-e.top))+"px",b.inputDiv.style.left=Math.max(0,Math.min(b.wrapper.clientWidth-10,d.left+f.left-e.left))+"px"}function R(a){var b=a.display,c=eb(a,a.view.sel.head,"div");b.cursor.style.left=c.left+"px",b.cursor.style.top=c.top+"px",b.cursor.style.height=Math.max(0,c.bottom-c.top)*a.options.cursorHeight+"px",b.cursor.style.display="",c.other?(b.otherCursor.style.display="",b.otherCursor.style.left=c.other.left+"px",b.otherCursor.style.top=c.other.top+"px",b.otherCursor.style.height=.85*(c.other.bottom-c.other.top)+"px"):b.otherCursor.style.display="none"}function S(a){function h(a,b,c,d){0>b&&(b=0),e.appendChild(_d("div",null,"CodeMirror-selected","position: absolute; left: "+a+"px; top: "+b+"px; width: "+(null==c?f-a:c)+"px; height: "+(d-b)+"px"))}function i(b,d,e,i){function m(c){return db(a,{line:b,ch:c},"div",j)}var j=rd(c,b),k=j.text.length,l=i?1/0:-1/0;return ne(wd(j),d||0,null==e?k:e,function(a,b,c){var j=m("rtl"==c?b-1:a),n=m("rtl"==c?a:b-1),o=j.left,p=n.right;n.top-j.top>3&&(h(o,j.top,null,j.bottom),o=g,j.bottom<n.top&&h(o,j.bottom,null,n.top)),null==e&&b==k&&(p=f),null==d&&0==a&&(o=g),l=i?Math.min(n.top,l):Math.max(n.bottom,l),g+1>o&&(o=g),h(o,n.top,p-o,n.bottom)}),l}var b=a.display,c=a.view.doc,d=a.view.sel,e=document.createDocumentFragment(),f=b.lineSpace.offsetWidth,g=Z(a.display);if(d.from.line==d.to.line)i(d.from.line,d.from.ch,d.to.ch);else{for(var l,n,j=rd(c,d.from.line),k=j,m=[d.from.line,d.from.ch];l=Vc(k);){var o=l.find();if(m.push(o.from.ch,o.to.line,o.to.ch),o.to.line==d.to.line){m.push(d.to.ch),n=!0;break}k=rd(c,o.to.line)}if(n)for(var p=0;m.length>p;p+=3)i(m[p],m[p+1],m[p+2]);else{var q,r,s=rd(c,d.to.line);q=d.from.ch?i(d.from.line,d.from.ch,null,!1):vd(a,j)-b.viewOffset,r=d.to.ch?i(d.to.line,Uc(s)?null:0,d.to.ch,!0):vd(a,s)-b.viewOffset,r>q&&h(g,q,null,r)}}be(b.selectionDiv,e),b.selectionDiv.style.display=""}function T(a){var b=a.display;clearInterval(b.blinker);var c=!0;b.cursor.style.visibility=b.otherCursor.style.visibility="",b.blinker=setInterval(function(){b.cursor.offsetHeight&&(b.cursor.style.visibility=b.otherCursor.style.visibility=(c=!c)?"":"hidden")},a.options.cursorBlinkRate)}function U(a,b){a.view.frontier<a.display.showingTo&&a.view.highlight.set(b,Wd(V,a))}function V(a){var b=a.view,c=b.doc;if(!(b.frontier>=a.display.showingTo)){var g,d=+new Date+a.options.workTime,e=Cc(b.mode,X(a,b.frontier)),f=[];c.iter(b.frontier,Math.min(c.size,a.display.showingTo+500),function(c){return b.frontier>=a.display.showingFrom?(fd(a,c,e)&&b.frontier>=a.display.showingFrom&&(g&&g.end==b.frontier?g.end++:f.push(g={start:b.frontier,end:b.frontier+1})),c.stateAfter=Cc(b.mode,e)):(gd(a,c,e),c.stateAfter=0==b.frontier%5?Cc(b.mode,e):null),++b.frontier,+new Date>d?(U(a,a.options.workDelay),!0):void 0}),f.length&&mb(a,function(){for(var a=0;f.length>a;++a)nb(this,f[a].start,f[a].end)})()}}function W(a,b){for(var c,d,e=a.view.doc,f=b,g=b-100;f>g;--f){if(0==f)return 0;var h=rd(e,f-1);if(h.stateAfter)return f;var i=Pd(h.text,null,a.options.tabSize);(null==d||c>i)&&(d=f-1,c=i)}return d}function X(a,b){var c=a.view,d=W(a,b),e=d&&rd(c.doc,d-1).stateAfter;return e=e?Cc(c.mode,e):Dc(c.mode),c.doc.iter(d,b,function(f){gd(a,f,e);var g=d==b-1||0==d%5||d>=c.showingFrom&&c.showingTo>d;f.stateAfter=g?Cc(c.mode,e):null,++d}),e}function Y(a){return a.lineSpace.offsetTop}function Z(a){var b=be(a.measure,_d("pre")).appendChild(_d("span","x"));return b.offsetLeft}function $(a,b,c,d){for(var d=d||_(a,b),e=-1,f=c;;f+=e){var g=d[f];if(g)break;0>e&&0==f&&(e=1)}return{left:c>f?g.right:g.left,right:f>c?g.left:g.right,top:g.top,bottom:g.bottom}}function _(a,b){for(var c=a.display,d=a.display.measureLineCache,e=0;d.length>e;++e){var f=d[e];if(f.text==b.text&&f.markedSpans==b.markedSpans&&c.scroller.clientWidth==f.width)return f.measure}var g=ab(a,b),f={text:b.text,width:c.scroller.clientWidth,markedSpans:b.markedSpans,measure:g};return 16==d.length?d[++c.measureLineCachePos%16]=f:d.push(f),g}function ab(a,d){var e=a.display,f=Vd(d.text.length),g=jd(a,d,f);if(b&&!c&&!a.options.lineWrapping&&g.childNodes.length>100){for(var h=document.createDocumentFragment(),i=10,j=g.childNodes.length,k=0,l=Math.ceil(j/i);l>k;++k){for(var m=_d("div",null,null,"display: inline-block"),n=0;i>n&&j;++n)m.appendChild(g.firstChild),--j;h.appendChild(m)}g.appendChild(h)}be(e.measure,g);for(var s,o=e.lineDiv.getBoundingClientRect(),p=[],q=Vd(d.text.length),r=g.offsetHeight,k=0;f.length>k;++k)if(s=f[k]){for(var t=s.getBoundingClientRect(),u=Math.max(0,t.top-o.top),v=Math.min(t.bottom-o.top,r),n=0;p.length>n;n+=2){var w=p[n],x=p[n+1];if(!(w>v||u>x)&&(u>=w&&x>=v||w>=u&&v>=x||Math.min(v,x)-Math.max(u,w)>=v-u>>1)){p[n]=Math.min(u,w),p[n+1]=Math.max(v,x);break}}n==p.length&&p.push(u,v),q[k]={left:t.left-o.left,right:t.right-o.left,top:n}}for(var s,k=0;q.length>k;++k)if(s=q[k]){var y=s.top;s.top=p[y],s.bottom=p[y+1]}return q}function bb(a){a.display.measureLineCache.length=a.display.measureLineCachePos=0,a.display.cachedCharWidth=a.display.cachedTextHeight=null,a.view.maxLineChanged=!0}function cb(a,b,c,d){if(b.widgets)for(var e=0;b.widgets.length>e;++e)if(b.widgets[e].above){var f=b.widgets[e].node.offsetHeight;c.top+=f,c.bottom+=f}if("line"==d)return c;d||(d="local");var g=vd(a,b);if("local"!=d&&(g-=a.display.viewOffset),"page"==d){var h=a.display.lineSpace.getBoundingClientRect();g+=h.top+(window.pageYOffset||(document.documentElement||document.body).scrollTop);var i=h.left+(window.pageXOffset||(document.documentElement||document.body).scrollLeft);c.left+=i,c.right+=i}return c.top+=g,c.bottom+=g,c}function db(a,b,c,d){return d||(d=rd(a.view.doc,b.line)),cb(a,d,$(a,d,b.ch),c)}function eb(a,b,c,d,e){function f(b,f){var g=$(a,d,b,e);return f?g.left=g.right:g.right=g.left,cb(a,d,g,c)}d=d||rd(a.view.doc,b.line),e||(e=_(a,d));var g=wd(d),h=b.ch;if(!g)return f(h);for(var i,j,k=g[0].level,l=0;g.length>l;++l){var o,p,m=g[l],n=m.level%2;if(h>m.from&&m.to>h)return f(h,n);var q=n?m.to:m.from,r=n?m.from:m.to;if(q==h)p=l&&m.level<(o=g[l-1]).level?f(o.level%2?o.from:o.to-1,!0):f(n&&m.from!=m.to?h-1:h),n==k?i=p:j=p;else if(r==h){var o=g.length-1>l&&g[l+1];if(!n&&o&&o.from==o.to)continue;p=o&&m.level<o.level?f(o.level%2?o.to-1:o.from):f(n?h:h-1,!0),n==k?i=p:j=p}}return k&&!h&&(j=f(g[0].to-1)),i?(j&&(i.other=j),i):j}function fb(a,b,c){var d=a.view.doc;if(c+=a.display.viewOffset,0>c)return{line:0,ch:0,outside:!0};var e=ud(d,c);if(e>=d.size)return{line:d.size-1,ch:rd(d,d.size-1).text.length};for(0>b&&(b=0);;){var f=rd(d,e),g=gb(a,f,e,b,c),h=Vc(f);if(!h||g.ch!=re(f))return g;e=h.find().to.line}}function gb(a,b,c,d,e){function j(d){var e=eb(a,{line:c,ch:d},"line",b,i);return g=!0,f>e.bottom?Math.max(0,e.left-h):e.top>f?e.left+h:(g=!1,e.left)}var f=e-vd(a,b),g=!1,h=a.display.wrapper.clientWidth,i=_(a,b),k=wd(b),l=b.text.length,m=qe(b),n=re(b),o=Z(a.display),p=j(n);if(d>p)return{line:c,ch:n,outside:g};for(;;){if(k?n==m||n==ue(b,m,1):1>=n-m){for(var q=p-d>d-o,r=q?m:n;$d.test(b.text.charAt(r));)++r;return{line:c,ch:r,after:q,outside:g}}var s=Math.ceil(l/2),t=m+s;if(k){t=m;for(var u=0;s>u;++u)t=ue(b,t,1)}var v=j(t);v>d?(n=t,p=v,g&&(p+=1e3),l-=s):(m=t,o=v,l=s)}}function ib(a){if(null!=a.cachedTextHeight)return a.cachedTextHeight;if(null==hb){hb=_d("pre");for(var b=0;49>b;++b)hb.appendChild(document.createTextNode("x")),hb.appendChild(_d("br"));hb.appendChild(document.createTextNode("x"))}be(a.measure,hb);var c=hb.offsetHeight/50;return c>3&&(a.cachedTextHeight=c),ae(a.measure),c||1}function jb(a){if(null!=a.cachedCharWidth)return a.cachedCharWidth;var b=_d("span","x"),c=_d("pre",[b]);be(a.measure,c);var d=b.offsetWidth;return d>2&&(a.cachedCharWidth=d),d||10}function kb(a){a.curOp?++a.curOp.depth:a.curOp={depth:1,changes:[],delayedCallbacks:[],updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,updateMaxLine:!1,id:++a.nextOpId}}function lb(a){var b=a.curOp;if(!--b.depth){a.curOp=null;var c=a.view,d=a.display;if(b.updateMaxLine&&C(c),c.maxLineChanged&&!a.options.lineWrapping){var e=$(a,c.maxLine,c.maxLine.text.length).right;d.sizer.style.minWidth=e+3+Md+"px",c.maxLineChanged=!1}var f,g;if(b.selectionChanged){var h=eb(a,c.sel.head);f=oc(a,h.left,h.top,h.left,h.bottom)}(b.changes.length||f&&null!=f.scrollTop)&&(g=K(a,b.changes,f&&f.scrollTop)),!g&&b.selectionChanged&&Q(a),f&&lc(a),b.selectionChanged&&T(a),c.focused&&b.updateInput&&rb(a,b.userSelChange),b.textChanged&&Jd(a,"change",a,b.textChanged),b.selectionChanged&&Jd(a,"cursorActivity",a);for(var i=0;b.delayedCallbacks.length>i;++i)b.delayedCallbacks[i](a)}}function mb(a,b){return function(){var c=a||this;kb(c);try{var d=b.apply(c,arguments)}finally{lb(c)}return d}}function nb(a,b,c,d){a.curOp.changes.push({from:b,to:c,diff:d})}function ob(a){a.view.pollingFast||a.display.poll.set(a.options.pollInterval,function(){qb(a),a.view.focused&&ob(a)})}function pb(a){function c(){var d=qb(a);d||b?(a.display.pollingFast=!1,ob(a)):(b=!0,a.display.poll.set(60,c))}var b=!1;a.display.pollingFast=!0,a.display.poll.set(20,c)}function qb(a){var b=a.display.input,c=a.display.prevInput,d=a.view,e=d.sel;if(!d.focused||ke(b)||tb(a))return!1;var f=b.value;if(f==c&&bc(e.from,e.to))return!1;kb(a),d.sel.shift=!1;for(var g=0,h=Math.min(c.length,f.length);h>g&&c[g]==f[g];)++g;var i=e.from,j=e.to;c.length>g?i={line:i.line,ch:i.ch-(c.length-g)}:d.overwrite&&bc(i,j)&&!a.display.pasteIncoming&&(j={line:j.line,ch:Math.min(rd(a.view.doc,j.line).text.length,j.ch+(f.length-g))});var k=a.curOp.updateInput;return Yb(a,i,j,je(f.slice(g)),"end",a.display.pasteIncoming?"paste":"input",{from:i,to:j}),a.curOp.updateInput=k,f.length>1e3?b.value=a.display.prevInput="":a.display.prevInput=f,lb(a),a.display.pasteIncoming=!1,!0}function rb(a,b){var d,e,c=a.view;bc(c.sel.from,c.sel.to)?b&&(a.display.prevInput=a.display.input.value=""):(a.display.prevInput="",d=le&&(c.sel.to.line-c.sel.from.line>100||(e=a.getSelection()).length>1e3),a.display.input.value=d?"-":e||a.getSelection(),c.focused&&Td(a.display.input)),a.display.inaccurateSelection=d}function sb(a){"nocursor"==a.options.readOnly||!b&&document.activeElement==a.display.input||a.display.input.focus()}function tb(a){return a.options.readOnly||a.view.cantEdit}function ub(b){function d(){b.view.focused&&setTimeout(Wd(sb,b),0)}function f(a){b.options.onDragEvent&&b.options.onDragEvent(b,Ad(a))||Dd(a)}function g(){c.inaccurateSelection&&(c.prevInput="",c.inaccurateSelection=!1,c.input.value=b.getSelection(),Td(c.input))}var c=b.display;Hd(c.scroller,"mousedown",mb(b,zb)),Hd(c.scroller,"dblclick",mb(b,Bd)),Hd(c.lineSpace,"selectstart",function(a){vb(c,a)||Bd(a)}),a||Hd(c.scroller,"contextmenu",function(a){Xb(b,a)}),Hd(c.scroller,"scroll",function(){Db(b,c.scroller.scrollTop),Eb(b,c.scroller.scrollLeft,!0),Jd(b,"scroll",b)}),Hd(c.scrollbarV,"scroll",function(){Db(b,c.scrollbarV.scrollTop)}),Hd(c.scrollbarH,"scroll",function(){Eb(b,c.scrollbarH.scrollLeft)}),Hd(c.scroller,"mousewheel",function(a){Lb(b,a)}),Hd(c.scroller,"DOMMouseScroll",function(a){Lb(b,a)}),Hd(c.scrollbarH,"mousedown",d),Hd(c.scrollbarV,"mousedown",d),Hd(c.wrapper,"scroll",function(){c.wrapper.scrollTop=c.wrapper.scrollLeft=0}),Hd(window,"resize",function e(){c.cachedCharWidth=c.cachedTextHeight=null,bb(b),c.wrapper.parentNode?K(b,!0):Id(window,"resize",e)}),Hd(c.input,"keyup",mb(b,function(a){b.options.onKeyEvent&&b.options.onKeyEvent(b,Ad(a))||16==Gd(a,"keyCode")&&(b.view.sel.shift=!1)})),Hd(c.input,"input",Wd(pb,b)),Hd(c.input,"keydown",mb(b,Sb)),Hd(c.input,"keypress",mb(b,Tb)),Hd(c.input,"focus",Wd(Ub,b)),Hd(c.input,"blur",Wd(Vb,b)),b.options.dragDrop&&(Hd(c.scroller,"dragstart",function(a){Cb(b,a)}),Hd(c.scroller,"dragenter",f),Hd(c.scroller,"dragover",f),Hd(c.scroller,"drop",mb(b,Ab))),Hd(c.scroller,"paste",function(){sb(b),pb(b)}),Hd(c.input,"paste",function(){c.pasteIncoming=!0,pb(b)}),Hd(c.input,"cut",g),Hd(c.input,"copy",g),j&&Hd(c.sizer,"mouseup",function(){document.activeElement==c.input&&c.input.blur(),sb(b)})}function vb(a,b){for(var c=Ed(b);c!=a.wrapper;c=c.parentNode)if(/\bCodeMirror-(?:line)?widget\b/.test(c.className)||c.parentNode==a.sizer&&c!=a.mover)return!0}function wb(a,b,c){var d=a.display;if(!c){var e=Ed(b);if(e==d.scrollbarH||e==d.scrollbarH.firstChild||e==d.scrollbarV||e==d.scrollbarV.firstChild||e==d.scrollbarFiller)return null}var f,g,h=d.lineSpace.getBoundingClientRect();try{f=b.clientX,g=b.clientY}catch(b){return null}return fb(a,f-h.left,g-h.top)}function zb(c){function r(a){if("single"==l)return hc(d,fc(i,j),a),void 0;if(p=fc(i,p),q=fc(i,q),"double"==l){var b=sc(rd(i,a.line).text,a);cc(a,p)?hc(d,b.from,q):hc(d,p,b.to)}else"triple"==l&&(cc(a,p)?hc(d,q,fc(i,{line:a.line,ch:0})):hc(d,p,fc(i,{line:a.line+1,ch:0})))}function u(a){var b=++t,c=wb(d,a,!0);if(c)if(bc(c,n)){var h=a.clientY<s.top?-20:a.clientY>s.bottom?20:0;h&&setTimeout(mb(d,function(){t==b&&(f.scroller.scrollTop+=h,u(a))}),50)}else{g.focused||Ub(d),n=c,r(c);var e=F(f,i);(c.line>=e.to||c.line<e.from)&&setTimeout(mb(d,function(){t==b&&u(a)}),150)}}function v(a){t=1/0;var b=wb(d,a);b&&r(b),Bd(a),sb(d),Id(document,"mousemove",w),Id(document,"mouseup",x)}var d=this,f=d.display,g=d.view,h=g.sel,i=g.doc;if(h.shift=Gd(c,"shiftKey"),vb(f,c))return e||(f.scroller.draggable=!1,setTimeout(function(){f.scroller.draggable=!0},100)),void 0;if(!Bb(d,c)){var j=wb(d,c);switch(Fd(c)){case 3:return a&&Xb.call(d,d,c),void 0;case 2:return j&&hc(d,j),setTimeout(Wd(sb,d),20),Bd(c),void 0}if(!j)return Ed(c)==f.scroller&&Bd(c),void 0;g.focused||Ub(d);var k=+new Date,l="single";if(yb&&yb.time>k-400&&bc(yb.pos,j))l="triple",Bd(c),setTimeout(Wd(sb,d),20),tc(d,j.line);else if(xb&&xb.time>k-400&&bc(xb.pos,j)){l="double",yb={time:k,pos:j},Bd(c);var m=sc(rd(i,j.line).text,j);hc(d,m.from,m.to)}else xb={time:k,pos:j};var n=j;if(d.options.dragDrop&&de&&!tb(d)&&!bc(h.from,h.to)&&!cc(j,h.from)&&!cc(h.to,j)&&"single"==l){var o=mb(d,function(a){e&&(f.scroller.draggable=!1),g.draggingText=!1,Id(document,"mouseup",o),Id(f.scroller,"drop",o),10>Math.abs(c.clientX-a.clientX)+Math.abs(c.clientY-a.clientY)&&(Bd(a),hc(d,j),sb(d))});return e&&(f.scroller.draggable=!0),g.draggingText=o,f.scroller.dragDrop&&f.scroller.dragDrop(),Hd(document,"mouseup",o),Hd(f.scroller,"drop",o),void 0}Bd(c),"single"==l&&hc(d,fc(i,j));var p=h.from,q=h.to,s=f.wrapper.getBoundingClientRect(),t=0,w=mb(d,function(a){b||Fd(a)?u(a):v(a)}),x=mb(d,v);Hd(document,"mousemove",w),Hd(document,"mouseup",x)}}function Ab(a){var c=this;if(!c.options.onDragEvent||!c.options.onDragEvent(c,Ad(a))){Bd(a);var d=wb(c,a,!0),e=a.dataTransfer.files;if(d&&!tb(c))if(e&&e.length&&window.FileReader&&window.File)for(var f=e.length,g=Array(f),h=0,i=function(a,b){var e=new FileReader;e.onload=function(){g[b]=e.result,++h==f&&(d=fc(c.view.doc,d),mb(c,function(){var a=ac(c,g.join(""),d,d,"paste");ic(c,d,a)})())},e.readAsText(a)},j=0;f>j;++j)i(e[j],j);else{if(c.view.draggingText&&!cc(d,c.view.sel.from)&&!cc(c.view.sel.to,d))return c.view.draggingText(a),b&&setTimeout(Wd(sb,c),50),void 0;try{var g=a.dataTransfer.getData("Text");if(g){var k=c.view.sel.from,l=c.view.sel.to;ic(c,d,d),c.view.draggingText&&ac(c,"",k,l,"paste"),c.replaceSelection(g,null,"paste"),sb(c),Ub(c)}}catch(a){}}}}function Bb(a,b){var c=a.display;try{var d=b.clientX,e=b.clientY}catch(b){return!1}if(d>=Math.floor(c.gutters.getBoundingClientRect().right))return!1;if(Bd(b),!Ld(a,"gutterClick"))return!0;var f=c.lineDiv.getBoundingClientRect();if(e>f.bottom)return!0;e-=f.top-c.viewOffset;for(var g=0;a.options.gutters.length>g;++g){var h=c.gutters.childNodes[g];if(h&&h.getBoundingClientRect().right>=d){var i=ud(a.view.doc,e),j=a.options.gutters[g];Kd(a,a,"gutterClick",a,i,j,b);break}}return!0}function Cb(a,b){var c=a.getSelection();b.dataTransfer.setData("Text",c),b.dataTransfer.setDragImage&&!i&&b.dataTransfer.setDragImage(_d("img"),0,0)}function Db(b,c){2>Math.abs(b.view.scrollTop-c)||(b.view.scrollTop=c,a||K(b,[],c),b.display.scroller.scrollTop!=c&&(b.display.scroller.scrollTop=c),b.display.scrollbarV.scrollTop!=c&&(b.display.scrollbarV.scrollTop=c),a&&K(b,[]))}function Eb(a,b,c){(c?b==a.view.scrollLeft:2>Math.abs(a.view.scrollLeft-b))||(a.view.scrollLeft=b,G(a),a.display.scroller.scrollLeft!=b&&(a.display.scroller.scrollLeft=b),a.display.scrollbarH.scrollLeft!=b&&(a.display.scrollbarH.scrollLeft=b))}function Lb(b,c){var d=c.wheelDeltaX,f=c.wheelDeltaY;if(null==d&&c.detail&&c.axis==c.HORIZONTAL_AXIS&&(d=c.detail),null==f&&c.detail&&c.axis==c.VERTICAL_AXIS?f=c.detail:null==f&&(f=c.wheelDelta),f&&p&&e)for(var g=c.target;g!=i;g=g.parentNode)if(g.lineObj){b.display.currentWheelTarget=g;break}var i=b.display.scroller;if(d&&!a&&!h&&null!=Kb)return f&&Db(b,Math.max(0,Math.min(i.scrollTop+f*Kb,i.scrollHeight-i.clientHeight))),Eb(b,Math.max(0,Math.min(i.scrollLeft+d*Kb,i.scrollWidth-i.clientWidth))),Bd(c),Ib=null,void 0;if(f&&null!=Kb){var j=f*Kb,k=b.view.scrollTop,l=k+b.display.wrapper.clientHeight;0>j?k=Math.max(0,k+j-50):l=Math.min(b.view.doc.height,l+j+50),K(b,[],{top:k,bottom:l})}20>Fb&&(null==Ib?(Ib=i.scrollLeft,Jb=i.scrollTop,Gb=d,Hb=f,setTimeout(function(){if(null!=Ib){var a=i.scrollLeft-Ib,b=i.scrollTop-Jb,c=b&&Hb&&b/Hb||a&&Gb&&a/Gb;Ib=Jb=null,c&&(Kb=(Kb*Fb+c)/(Fb+1),++Fb)}},200)):(Gb+=d,Hb+=f))}function Mb(a,b,c){if("string"==typeof b&&(b=Ec[b],!b))return!1;a.display.pollingFast&&qb(a)&&(a.display.pollingFast=!1);var d=a.view,e=d.sel.shift;try{tb(a)&&(d.suppressEdits=!0),c&&(d.sel.shift=!1),b(a)}catch(f){if(f!=Nd)throw f;return!1}finally{d.sel.shift=e,d.suppressEdits=!1}return!0}function Nb(a){var b=a.view.keyMaps.slice(0);return b.push(a.options.keyMap),a.options.extraKeys&&b.unshift(a.options.extraKeys),b}function Pb(a,b){function l(){k=!0}var c=Gc(a.options.keyMap),e=c.auto;clearTimeout(Ob),e&&!Ic(b)&&(Ob=setTimeout(function(){Gc(a.options.keyMap)==c&&(a.options.keyMap=e.call?e.call(null,a):e)},50));var g=me[Gd(b,"keyCode")],i=!1,j=p&&(h||f);if(null==g||b.altGraphKey)return!1;Gd(b,"altKey")&&(g="Alt-"+g),Gd(b,j?"metaKey":"ctrlKey")&&(g="Ctrl-"+g),Gd(b,j?"ctrlKey":"metaKey")&&(g="Cmd-"+g);var k=!1,m=Nb(a);return i=Gd(b,"shiftKey")?Hc("Shift-"+g,m,function(b){return Mb(a,b,!0)},l)||Hc(g,m,function(b){return"string"==typeof b&&/^go[A-Z]/.test(b)?Mb(a,b):void 0},l):Hc(g,m,function(b){return Mb(a,b)},l),k&&(i=!1),i&&(Bd(b),T(a),d&&(b.oldKeyCode=b.keyCode,b.keyCode=0)),i}function Qb(a,b,c){var d=Hc("'"+c+"'",Nb(a),function(b){return Mb(a,b,!0)});return d&&(Bd(b),T(a)),d}function Sb(a){var c=this;if(c.view.focused||Ub(c),b&&27==a.keyCode&&(a.returnValue=!1),!c.options.onKeyEvent||!c.options.onKeyEvent(c,Ad(a))){var d=Gd(a,"keyCode");c.view.sel.shift=16==d||Gd(a,"shiftKey");var e=Pb(c,a);h&&(Rb=e?d:null,e||88!=d||le||!Gd(a,p?"metaKey":"ctrlKey")||c.replaceSelection(""))}}function Tb(a){var b=this;if(!b.options.onKeyEvent||!b.options.onKeyEvent(b,Ad(a))){var c=Gd(a,"keyCode"),d=Gd(a,"charCode");if(h&&c==Rb)return Rb=null,Bd(a),void 0;if(!(h&&(!a.which||10>a.which)||j)||!Pb(b,a)){var e=String.fromCharCode(null==d?c:d);this.options.electricChars&&this.view.mode.electricChars&&this.options.smartIndent&&!tb(this)&&this.view.mode.electricChars.indexOf(e)>-1&&setTimeout(mb(b,function(){pc(b,b.view.sel.to.line,"smart")}),75),Qb(b,a,e)||pb(b)}}}function Ub(a){"nocursor"!=a.options.readOnly&&(a.view.focused||(Jd(a,"focus",a),a.view.focused=!0,-1==a.display.scroller.className.search(/\bCodeMirror-focused\b/)&&(a.display.scroller.className+=" CodeMirror-focused"),rb(a,!0)),ob(a),T(a))}function Vb(a){a.view.focused&&(Jd(a,"blur",a),a.view.focused=!1,a.display.scroller.className=a.display.scroller.className.replace(" CodeMirror-focused","")),clearInterval(a.display.blinker),setTimeout(function(){a.view.focused||(a.view.sel.shift=!1)},150)}function Xb(b,c){function k(){if(e.inputDiv.style.position="relative",e.input.style.cssText=j,d&&(e.scrollbarV.scrollTop=e.scroller.scrollTop=i),ob(b),null!=e.input.selectionStart){clearTimeout(Wb);
var a=e.input.value=" "+(bc(f.from,f.to)?"":e.input.value),c=0;e.prevInput=" ",e.input.selectionStart=1,e.input.selectionEnd=a.length,Wb=setTimeout(function g(){" "==e.prevInput&&0==e.input.selectionStart?mb(b,Ec.selectAll)(b):10>c++?Wb=setTimeout(g,500):rb(b)},200)}}var e=b.display,f=b.view.sel,g=wb(b,c),i=e.scroller.scrollTop;if(g&&!h){(bc(f.from,f.to)||cc(g,f.from)||!cc(g,f.to))&&mb(b,ic)(b,g,g);var j=e.input.style.cssText;e.inputDiv.style.position="absolute",e.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(c.clientY-5)+"px; left: "+(c.clientX-5)+"px; z-index: 1000; background: white; outline: none;"+"border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",sb(b),rb(b,!0),bc(f.from,f.to)&&(e.input.value=e.prevInput=" "),a?(Dd(c),Hd(window,"mouseup",function l(){Id(window,"mouseup",l),setTimeout(k,20)})):setTimeout(k,50)}}function Yb(a,b,c,d,e,f){var g=q&&Sc(a.view.doc,b,c);if(!g)return Zb(a,b,c,d,e,f);for(var h=g.length-1;h>=1;--h)Zb(a,g[h].from,g[h].to,[""],f);return g.length?Zb(a,g[0].from,g[0].to,d,e,f):void 0}function Zb(a,b,c,d,e,f){if(!a.view.suppressEdits){var g=a.view,h=g.doc,i=[];h.iter(b.line,c.line+1,function(a){i.push(_c(a.text,a.markedSpans))});var j=g.sel.from,k=g.sel.to,l=Rc($c(i[0]),$c(Sd(i)),b.ch,c.ch,d),m=_b(a,b,c,l,e,f);return g.history&&yd(a,b.line,d.length,i,f,j,k,g.sel.from,g.sel.to),m}}function $b(a,b){var c=a.view.doc,d=a.view.history,e=("undo"==b?d.done:d.undone).pop();if(e){for(var f={events:[],fromBefore:e.fromAfter,toBefore:e.toAfter,fromAfter:e.fromBefore,toAfter:e.toBefore},g=e.events.length-1;g>=0;g-=1){d.dirtyCounter+="undo"==b?-1:1;var h=e.events[g],i=[],j=h.start+h.added;c.iter(h.start,j,function(a){i.push(_c(a.text,a.markedSpans))}),f.events.push({start:h.start,added:h.old.length,old:i});var k=g?null:{from:e.fromBefore,to:e.toBefore};_b(a,{line:h.start,ch:0},{line:j-1,ch:rd(c,j-1).text.length},h.old,k,b)}("undo"==b?d.undone:d.done).push(f)}}function _b(a,b,c,d,e,f){var g=a.view,h=g.doc,i=a.display;if(!g.suppressEdits){var j=c.line-b.line,k=rd(h,b.line),l=rd(h,c.line),m=!1,n=b.line;a.options.lineWrapping||(n=td(Wc(h,k)),h.iter(n,c.line+1,function(a){return B(h,a)==g.maxLineLength?(m=!0,!0):void 0}));var o=Sd(d),p=ib(i);if(0==b.ch&&0==c.ch&&""==Zc(o)){for(var q=[],r=0,s=d.length-1;s>r;++r)q.push(cd(Zc(d[r]),$c(d[r]),p));dd(a,l,l.text,$c(o)),j&&h.remove(b.line,j,a),q.length&&h.insert(b.line,q)}else if(k==l)if(1==d.length)dd(a,k,k.text.slice(0,b.ch)+Zc(d[0])+k.text.slice(c.ch),$c(d[0]));else{for(var q=[],r=1,s=d.length-1;s>r;++r)q.push(cd(Zc(d[r]),$c(d[r]),p));q.push(cd(Zc(o)+k.text.slice(c.ch),$c(o),p)),dd(a,k,k.text.slice(0,b.ch)+Zc(d[0]),$c(d[0])),h.insert(b.line+1,q)}else if(1==d.length)dd(a,k,k.text.slice(0,b.ch)+Zc(d[0])+l.text.slice(c.ch),$c(d[0])),h.remove(b.line+1,j,a);else{var q=[];dd(a,k,k.text.slice(0,b.ch)+Zc(d[0]),$c(d[0])),dd(a,l,Zc(o)+l.text.slice(c.ch),$c(o));for(var r=1,s=d.length-1;s>r;++r)q.push(cd(Zc(d[r]),$c(d[r]),p));j>1&&h.remove(b.line+1,j-1,a),h.insert(b.line+1,q)}if(a.options.lineWrapping){var t=Math.max(5,i.scroller.clientWidth/jb(i)-3);h.iter(b.line,b.line+d.length,function(a){if(0!=a.height){var b=(Math.ceil(a.text.length/t)||1)*p;b!=a.height&&sd(a,b)}})}else h.iter(n,b.line+d.length,function(a){var b=B(h,a);b>g.maxLineLength&&(g.maxLine=a,g.maxLineLength=b,g.maxLineChanged=!0,m=!1)}),m&&(a.curOp.updateMaxLine=!0);g.frontier=Math.min(g.frontier,b.line),U(a,400);var u=d.length-j-1;if(nb(a,b.line,c.line+1,u),Ld(a,"change")){for(var r=0;d.length>r;++r)"string"!=typeof d[r]&&(d[r]=d[r].text);var v={from:b,to:c,text:d,origin:f};if(a.curOp.textChanged){for(var w=a.curOp.textChanged;w.next;w=w.next);w.next=v}else a.curOp.textChanged=v}var x,y,z={line:b.line+d.length-1,ch:Zc(o).length+(1==d.length?b.ch:0)};if(e&&"string"!=typeof e)e.from?(x=e.from,y=e.to):x=y=e;else if("end"==e)x=y=z;else if("start"==e)x=y=b;else if("around"==e)x=b,y=z;else{var A=function(a){if(cc(a,b))return a;if(!cc(c,a))return z;var d=a.line+u,e=a.ch;return a.line==c.line&&(e+=Zc(o).length-(c.ch-(c.line==b.line?b.ch:0))),{line:d,ch:e}};x=A(g.sel.from),y=A(g.sel.to)}return ic(a,x,y,null,!0),z}}function ac(a,b,c,d,e){if(d||(d=c),cc(d,c)){var f=d;d=c,c=f}return Yb(a,c,d,je(b),null,e)}function bc(a,b){return a.line==b.line&&a.ch==b.ch}function cc(a,b){return a.line<b.line||a.line==b.line&&a.ch<b.ch}function dc(a){return{line:a.line,ch:a.ch}}function ec(a,b){return Math.max(0,Math.min(b,a.size-1))}function fc(a,b){if(0>b.line)return{line:0,ch:0};if(b.line>=a.size)return{line:a.size-1,ch:rd(a,a.size-1).text.length};var c=b.ch,d=rd(a,b.line).text.length;return null==c||c>d?{line:b.line,ch:d}:0>c?{line:b.line,ch:0}:b}function gc(a,b){return b>=0&&a.size>b}function hc(a,b,c,d){var e=a.view.sel;if(e.shift||e.extend){var f=e.anchor;if(c){var g=cc(b,f);g!=cc(c,f)?(f=b,b=c):g!=cc(b,c)&&(b=c)}ic(a,f,b,d)}else ic(a,b,c||b,d);a.curOp.userSelChange=!0}function ic(a,b,c,d,e){a.view.goalColumn=null;var f=a.view.sel;if((e||!bc(b,f.anchor))&&(b=kc(a,b,d,"push"!=e)),(e||!bc(c,f.head))&&(c=kc(a,c,d,"push"!=e)),!bc(f.anchor,b)||!bc(f.head,c)){f.anchor=b,f.head=c;var g=cc(c,b);f.from=g?c:b,f.to=g?b:c,a.curOp.updateInput=!0,a.curOp.selectionChanged=!0}}function jc(a){ic(a,a.view.sel.from,a.view.sel.to,null,"push")}function kc(a,b,c,d){var e=a.view.doc,f=!1,g=b,h=c||1;a.view.cantEdit=!1;a:for(;;){var j,i=rd(e,g.line);if(i.markedSpans){for(var k=0;i.markedSpans.length>k;++k){var l=i.markedSpans[k],m=l.marker;if((null==l.from||(m.inclusiveLeft?l.from<=g.ch:l.from<g.ch))&&(null==l.to||(m.inclusiveRight?l.to>=g.ch:l.to>g.ch))){if(d&&m.clearOnEnter){(j||(j=[])).push(m);continue}if(!m.atomic)continue;var n=m.find()[0>h?"from":"to"];if(bc(n,g)&&(n.ch+=h,0>n.ch?n=n.line?fc(e,{line:n.line-1}):null:n.ch>i.text.length&&(n=n.line<e.size-1?{line:n.line+1,ch:0}:null),!n)){if(f)return d?(a.view.cantEdit=!0,{line:0,ch:0}):kc(a,b,c,!0);f=!0,n=b,h=-h}g=n;continue a}}if(j)for(var k=0;j.length>k;++k)j[k].clear()}return g}}function lc(a){var b=a.view,c=mc(a,b.sel.head);if(b.focused){var d=a.display,e=d.sizer.getBoundingClientRect(),f=null;if(0>c.top+e.top?f=!0:c.bottom+e.top>(window.innerHeight||document.documentElement.clientHeight)&&(f=!1),null!=f&&!m){var g="none"==d.cursor.style.display;g&&(d.cursor.style.display="",d.cursor.style.left=c.left+"px",d.cursor.style.top=c.top-d.viewOffset+"px"),d.cursor.scrollIntoView(f),g&&(d.cursor.style.display="none")}}}function mc(a,b){for(;;){var c=!1,d=eb(a,b),e=oc(a,d.left,d.top,d.left,d.bottom),f=a.view.scrollTop,g=a.view.scrollLeft;if(null!=e.scrollTop&&(Db(a,e.scrollTop),Math.abs(a.view.scrollTop-f)>1&&(c=!0)),null!=e.scrollLeft&&(Eb(a,e.scrollLeft),Math.abs(a.view.scrollLeft-g)>1&&(c=!0)),!c)return d}}function nc(a,b,c,d,e){var f=oc(a,b,c,d,e);null!=f.scrollTop&&Db(a,f.scrollTop),null!=f.scrollLeft&&Eb(a,f.scrollLeft)}function oc(a,b,c,d,e){var f=a.display,g=Y(f);c+=g,e+=g;var h=f.scroller.clientHeight-Md,i=f.scroller.scrollTop,j={},k=a.view.doc.height+2*g,l=g+10>c,m=e+g>k-10;i>c?j.scrollTop=l?0:Math.max(0,c):e>i+h&&(j.scrollTop=(m?k:e)-h);var n=f.scroller.clientWidth-Md,o=f.scroller.scrollLeft;b+=f.gutters.offsetWidth,d+=f.gutters.offsetWidth;var p=f.gutters.offsetWidth,q=p+10>b;return o+p>b||q?(q&&(b=0),j.scrollLeft=Math.max(0,b-10-p)):d>n+o-3&&(j.scrollLeft=d+10-n),j}function pc(a,b,c,d){var e=a.view.doc;if(c||(c="add"),"smart"==c)if(a.view.mode.indent)var f=X(a,b);else c="prev";var k,g=a.options.tabSize,h=rd(e,b),i=Pd(h.text,null,g),j=h.text.match(/^\s*/)[0];if("smart"==c&&(k=a.view.mode.indent(f,h.text.slice(j.length),h.text),k==Nd)){if(!d)return;c="prev"}"prev"==c?k=b?Pd(rd(e,b-1).text,null,g):0:"add"==c?k=i+a.options.indentUnit:"subtract"==c&&(k=i-a.options.indentUnit),k=Math.max(0,k);var l="",m=0;if(a.options.indentWithTabs)for(var n=Math.floor(k/g);n;--n)m+=g,l+="	";k>m&&(l+=Rd(k-m)),l!=j&&ac(a,l,{line:b,ch:0},{line:b,ch:j.length},"input"),h.stateAfter=null}function qc(a,b,c){var d=b,e=b,f=a.view.doc;return"number"==typeof b?e=rd(f,ec(f,b)):d=td(b),null==d?null:c(e,d)?(nb(a,d,d+1),e):null}function rc(a,b,c,d){function j(){var a=g+b;return 0>a||a==e.size?!1:(g=a,i=rd(e,a))}function k(a){var c=(d?ue:ve)(i,h,b,!0);if(null==c){if(a||!j())return!1;h=d?(0>b?re:qe)(i):0>b?i.text.length:0}else h=c;return!0}var e=a.view.doc,f=a.view.sel.head,g=f.line,h=f.ch,i=rd(e,g);if("char"==c)k();else if("column"==c)k(!0);else if("word"==c)for(var l=!1;!(0>b)||k();){if(Yd(i.text.charAt(h)))l=!0;else if(l){0>b&&(b=1,k());break}if(b>0&&!k())break}return kc(a,{line:g,ch:h},b,!0)}function sc(a,b){var c=b.ch,d=b.ch;if(a){b.after===!1||d==a.length?--c:++d;for(var e=a.charAt(c),f=Yd(e)?Yd:/\s/.test(e)?function(a){return/\s/.test(a)}:function(a){return!/\s/.test(a)&&!Yd(a)};c>0&&f(a.charAt(c-1));)--c;for(;a.length>d&&f(a.charAt(d));)++d}return{from:{line:b.line,ch:c},to:{line:b.line,ch:d}}}function tc(a,b){hc(a,{line:b,ch:0},fc(a.view.doc,{line:b+1,ch:0}))}function wc(a,b,c,d){s.defaults[a]=b,c&&(uc[a]=d?function(a,b,d){d!=xc&&c(a,b,d)}:c)}function Cc(a,b){if(b===!0)return b;if(a.copyState)return a.copyState(b);var c={};for(var d in b){var e=b[d];e instanceof Array&&(e=e.concat([])),c[d]=e}return c}function Dc(a,b,c){return a.startState?a.startState(b,c):!0}function Gc(a){return"string"==typeof a?Fc[a]:a}function Hc(a,b,c,d){function e(b){b=Gc(b);var f=b[a];if(f===!1)return d&&d(),!0;if(null!=f&&c(f))return!0;if(b.nofallthrough)return d&&d(),!0;var g=b.fallthrough;if(null==g)return!1;if("[object Array]"!=Object.prototype.toString.call(g))return e(g);for(var h=0,i=g.length;i>h;++h)if(e(g[h]))return!0;return!1}for(var f=0;b.length>f;++f)if(e(b[f]))return!0}function Ic(a){var b=me[Gd(a,"keyCode")];return"Ctrl"==b||"Alt"==b||"Shift"==b||"Mod"==b}function Jc(a,b){this.pos=this.start=0,this.string=a,this.tabSize=b||8}function Kc(a,b){this.lines=[],this.type=b,this.cm=a}function Lc(a,b,c,d,e){var f=a.view.doc,g=new Kc(a,e);if("range"==e&&!cc(b,c))return g;if(d)for(var h in d)d.hasOwnProperty(h)&&(g[h]=d[h]);g.replacedWith&&(g.collapsed=!0,g.replacedWith=_d("span",[g.replacedWith],"CodeMirror-widget")),g.collapsed&&(r=!0);var k,l,i=b.line,j=0;if(f.iter(i,c.line+1,function(a){var d={from:null,to:null,marker:g};j+=a.text.length,i==b.line&&(d.from=b.ch,j-=b.ch),i==c.line&&(d.to=c.ch,j-=a.text.length-c.ch),g.collapsed&&(i==c.line&&(l=Tc(a,c.ch)),i==b.line?k=Tc(a,b.ch):sd(a,0)),Oc(a,d),g.collapsed&&i==b.line&&Xc(a)&&sd(a,0),++i}),g.readOnly&&(q=!0,(a.view.history.done.length||a.view.history.undone.length)&&a.clearHistory()),g.collapsed){if(k!=l)throw Error("Inserting collapsed marker overlapping an existing one");g.size=j,g.atomic=!0}return(g.className||g.startStyle||g.endStyle||g.collapsed)&&nb(a,b.line,c.line+1),g.atomic&&jc(a),g}function Mc(a,b){if(a)for(var c=0;a.length>c;++c){var d=a[c];if(d.marker==b)return d}}function Nc(a,b){for(var c,d=0;a.length>d;++d)a[d]!=b&&(c||(c=[])).push(a[d]);return c}function Oc(a,b){a.markedSpans=a.markedSpans?a.markedSpans.concat([b]):[b],b.marker.lines.push(a)}function Pc(a,b){if(a)for(var d,c=0;a.length>c;++c){var e=a[c],f=e.marker,g=null==e.from||(f.inclusiveLeft?b>=e.from:b>e.from);if(g||"bookmark"==f.type&&e.from==b){var h=null==e.to||(f.inclusiveRight?e.to>=b:e.to>b);(d||(d=[])).push({from:e.from,to:h?null:e.to,marker:f})}}return d}function Qc(a,b,c){if(a)for(var e,d=0;a.length>d;++d){var f=a[d],g=f.marker,h=null==f.to||(g.inclusiveRight?f.to>=c:f.to>c);if(h||"bookmark"==g.type&&f.from==c&&f.from!=b){var i=null==f.from||(g.inclusiveLeft?c>=f.from:c>f.from);(e||(e=[])).push({from:i?null:f.from-c,to:null==f.to?null:f.to-c,marker:g})}}return e}function Rc(a,b,c,d,e){if(!a&&!b)return e;var f=Pc(a,c),g=Qc(b,c,d),h=1==e.length,i=Sd(e).length+(h?c:0);if(f)for(var j=0;f.length>j;++j){var k=f[j];if(null==k.to){var l=Mc(g,k.marker);l?h&&(k.to=null==l.to?null:l.to+i):k.to=c}}if(g)for(var j=0;g.length>j;++j){var k=g[j];if(null!=k.to&&(k.to+=i),null==k.from){var l=Mc(f,k.marker);l||(k.from=i,h&&(f||(f=[])).push(k))}else k.from+=i,h&&(f||(f=[])).push(k)}var m=[_c(e[0],f)];if(!h){var o,n=e.length-2;if(n>0&&f)for(var j=0;f.length>j;++j)null==f[j].to&&(o||(o=[])).push({from:null,to:null,marker:f[j].marker});for(var j=0;n>j;++j)m.push(_c(e[j+1],o));m.push(_c(Sd(e),g))}return m}function Sc(a,b,c){var d=null;if(a.iter(b.line,c.line+1,function(a){if(a.markedSpans)for(var b=0;a.markedSpans.length>b;++b){var c=a.markedSpans[b].marker;!c.readOnly||d&&-1!=Ud(d,c)||(d||(d=[])).push(c)}}),!d)return null;for(var e=[{from:b,to:c}],f=0;d.length>f;++f)for(var g=d[f].find(),h=0;e.length>h;++h){var i=e[h];if(cc(g.from,i.to)&&!cc(g.to,i.from)){var j=[h,1];cc(i.from,g.from)&&j.push({from:i.from,to:g.from}),cc(g.to,i.to)&&j.push({from:g.to,to:i.to}),e.splice.apply(e,j),h+=j.length-1}}return e}function Tc(a,b){var d,c=r&&a.markedSpans;if(c)for(var e,f=0;c.length>f;++f)e=c[f],e.marker.collapsed&&(null==e.from||b>e.from)&&(null==e.to||e.to>b)&&(!d||d.width<e.marker.width)&&(d=e.marker);return d}function Uc(a){return Tc(a,-1)}function Vc(a){return Tc(a,a.text.length+1)}function Wc(a,b){for(var c;c=Uc(b);)b=rd(a,c.find().from.line);return b}function Xc(a){var b=r&&a.markedSpans;if(b)for(var c,d=0;b.length>d;++d)if(c=b[d],c.marker.collapsed){if(null==c.from)return!0;if(0==c.from&&c.marker.inclusiveLeft&&Yc(a,c))return!0}}function Yc(a,b){if(null==b.to||b.marker.inclusiveRight&&b.to==a.text.length)return!0;for(var c,d=0;a.markedSpans.length>d;++d)if(c=a.markedSpans[d],c.marker.collapsed&&c.from==b.to&&(c.marker.inclusiveLeft||b.marker.inclusiveRight)&&Yc(a,c))return!0}function Zc(a){return"string"==typeof a?a:a.text}function $c(a){if("string"==typeof a)return null;for(var b=a.markedSpans,c=null,d=0;b.length>d;++d)b[d].marker.explicitlyCleared?c||(c=b.slice(0,d)):c&&c.push(b[d]);return c?c.length?c:null:b}function _c(a,b){return b?{text:a,markedSpans:b}:a}function ad(a){var b=a.markedSpans;if(b){for(var c=0;b.length>c;++c){var d=b[c].marker.lines,e=Ud(d,a);d.splice(e,1)}a.markedSpans=null}}function bd(a,b){if(b){for(var c=0;b.length>c;++c)b[c].marker.lines.push(a);a.markedSpans=b}}function cd(a,b,c){var d={text:a,height:c};return bd(d,b),Xc(d)&&(d.height=0),d}function dd(a,b,c,d){b.text=c,b.stateAfter=b.styles=null,null!=b.order&&(b.order=null),ad(b),bd(b,d),Xc(b)?b.height=0:b.height||(b.height=ib(a.display)),Kd(a,b,"change")}function ed(a){a.parent=null,ad(a)}function fd(a,b,c){var d=a.view.mode,e=a.options.flattenSpans,f=!b.styles,g=0,h="",i=null,j=new Jc(b.text,a.options.tabSize),k=b.styles||(b.styles=[]);for(""==b.text&&d.blankLine&&d.blankLine(c);!j.eol();){var l=d.token(j,c),m=j.current();if(j.start=j.pos,e&&i==l?h+=m:(h&&(f=f||g>=k.length||h!=k[g]||i!=k[g+1],k[g++]=h,k[g++]=i),h=m,i=l),j.pos>5e3)break}return h&&(f=f||g>=k.length||h!=k[g]||i!=k[g+1],k[g++]=h,k[g++]=i),j.pos>5e3&&(k[g++]=b.text.slice(j.pos),k[g++]=null),g!=k.length&&(k.length=g,f=!0),f}function gd(a,b,c){var d=a.view.mode,e=new Jc(b.text,a.options.tabSize);for(""==b.text&&d.blankLine&&d.blankLine(c);!e.eol()&&5e3>=e.pos;)d.token(e,c),e.start=e.pos}function id(a){return a?hd[a]||(hd[a]="cm-"+a.replace(/ +/g," cm-")):null}function jd(a,b,c){for(var d,f,g,e=b,h=!0;d=Uc(e);)h=!1,e=rd(a.view.doc,d.find().from.line),f||(f=e);var i={pre:_d("pre"),col:0,pos:0,display:!c,measure:null,addedOne:!1,cm:a};e.textClass&&(i.pre.className=e.textClass);do{e.styles||fd(a,e,e.stateAfter=X(a,td(e))),i.measure=e==b&&c,i.pos=0,i.addToken=i.measure?md:ld,c&&g&&e!=b&&!i.addedOne&&(c[0]=i.pre.appendChild(ie(a.display.measure)),i.addedOne=!0);var j=od(e,i);g=e==f,j&&(e=rd(a.view.doc,j.to.line),h=!1)}while(j);return c&&!i.addedOne&&(c[0]=i.pre.appendChild(h?_d("span","\u00a0"):ie(a.display.measure))),i.pre.firstChild||Xc(b)||i.pre.appendChild(document.createTextNode("\u00a0")),i.pre}function ld(a,b,c,d,e){if(b){if(kd.test(b))for(var f=document.createDocumentFragment(),g=0;;){kd.lastIndex=g;var h=kd.exec(b),i=h?h.index-g:b.length-g;if(i&&(f.appendChild(document.createTextNode(b.slice(g,g+i))),a.col+=i),!h)break;if(g+=i+1,"	"==h[0]){var j=a.cm.options.tabSize,k=j-a.col%j;f.appendChild(_d("span",Rd(k),"cm-tab")),a.col+=k}else{var l=_d("span","\u2022","cm-invalidchar");l.title="\\u"+h[0].charCodeAt(0).toString(16),f.appendChild(l),a.col+=1}}else{a.col+=b.length;var f=document.createTextNode(b)}if(c||d||e||a.measure){var m=c||"";return d&&(m+=d),e&&(m+=e),a.pre.appendChild(_d("span",[f],m))}a.pre.appendChild(f)}}function md(a,b,c,d,e){for(var f=0;b.length>f;++f)f&&b.length-1>f&&a.cm.options.lineWrapping&&ee.test(b.slice(f-1,f+1))&&a.pre.appendChild(_d("wbr")),a.measure[a.pos++]=ld(a,b.charAt(f),c,0==f&&d,f==b.length-1&&e);b.length&&(a.addedOne=!0)}function nd(a,b,c){c&&(a.display||(c=c.cloneNode(!0)),a.pre.appendChild(c),a.measure&&b&&(a.measure[a.pos]=c,a.addedOne=!0)),a.pos+=b}function od(a,b){var c=a.styles,d=a.markedSpans;if(d)for(var j,l,m,n,o,f=a.text,g=f.length,h=0,e=0,i="",k=0;;){if(k==h){l=m=n="",o=null,k=1/0;for(var p=null,q=0;d.length>q;++q){var r=d[q],s=r.marker;h>=r.from&&(null==r.to||r.to>h)?(null!=r.to&&k>r.to&&(k=r.to,m=""),s.className&&(l+=" "+s.className),s.startStyle&&r.from==h&&(n+=" "+s.startStyle),s.endStyle&&r.to==k&&(m+=" "+s.endStyle),s.collapsed&&(!o||o.marker.width<s.width)&&(o=r)):r.from>h&&k>r.from&&(k=r.from),"bookmark"==s.type&&r.from==h&&s.replacedWith&&(p=s.replacedWith)}if(o&&(o.from||0)==h&&(nd(b,(null==o.to?g:o.to)-h,null!=o.from&&o.marker.replacedWith),null==o.to))return o.marker.find();p&&!o&&nd(b,0,p)}if(h>=g)break;for(var t=Math.min(g,k);;){if(i){var u=h+i.length;if(!o){var v=u>t?i.slice(0,t-h):i;b.addToken(b,v,j+l,n,h+v.length==k?m:"")}if(u>=t){i=i.slice(t-h),h=t;break}h=u,n=""}i=c[e++],j=id(c[e++])}}else for(var e=0;c.length>e;e+=2)b.addToken(b,c[e],id(c[e+1]))}function pd(a){this.lines=a,this.parent=null;for(var b=0,c=a.length,d=0;c>b;++b)a[b].parent=this,d+=a[b].height;this.height=d}function qd(a){this.children=a;for(var b=0,c=0,d=0,e=a.length;e>d;++d){var f=a[d];b+=f.chunkSize(),c+=f.height,f.parent=this}this.size=b,this.height=c,this.parent=null}function rd(a,b){for(;!a.lines;)for(var c=0;;++c){var d=a.children[c],e=d.chunkSize();if(e>b){a=d;break}b-=e}return a.lines[b]}function sd(a,b){for(var c=b-a.height,d=a;d;d=d.parent)d.height+=c}function td(a){if(null==a.parent)return null;for(var b=a.parent,c=Ud(b.lines,a),d=b.parent;d;b=d,d=d.parent)for(var e=0;d.children[e]!=b;++e)c+=d.children[e].chunkSize();return c}function ud(a,b){var c=0;a:do{for(var d=0,e=a.children.length;e>d;++d){var f=a.children[d],g=f.height;if(g>b){a=f;continue a}b-=g,c+=f.chunkSize()}return c}while(!a.lines);for(var d=0,e=a.lines.length;e>d;++d){var h=a.lines[d],i=h.height;if(i>b)break;b-=i}return c+d}function vd(a,b){b=Wc(a.view.doc,b);for(var c=0,d=b.parent,e=0;d.lines.length>e;++e){var f=d.lines[e];if(f==b)break;c+=f.height}for(var g=d.parent;g;d=g,g=d.parent)for(var e=0;g.children.length>e;++e){var h=g.children[e];if(h==d)break;c+=h.height}return c}function wd(a){var b=a.order;return null==b&&(b=a.order=we(a.text)),b}function xd(){return{done:[],undone:[],lastTime:0,lastOp:null,lastOrigin:null,dirtyCounter:0}}function yd(a,b,c,d,e,f,g,h,i){var j=a.view.history;j.undone.length=0;var k=+new Date,l=Sd(j.done);if(l&&(j.lastOp==a.curOp.id||j.lastOrigin==e&&("input"==e||"delete"==e)&&j.lastTime>k-600)){var m=Sd(l.events);if(m.start>b+d.length||b>m.start+m.added)l.events.push({start:b,added:c,old:d});else{for(var n=Math.max(0,m.start-b),o=Math.max(0,b+d.length-(m.start+m.added)),p=n;p>0;--p)m.old.unshift(d[p-1]);for(var p=o;p>0;--p)m.old.push(d[d.length-p]);n&&(m.start=b),m.added+=c-(d.length-n-o)}l.fromAfter=h,l.toAfter=i}else{for(l={events:[{start:b,added:c,old:d}],fromBefore:f,toBefore:g,fromAfter:h,toAfter:i},j.done.push(l);j.done.length>a.options.undoDepth;)j.done.shift();0>j.dirtyCounter?j.dirtyCounter=0/0:j.dirtyCounter++}j.lastTime=k,j.lastOp=a.curOp.id,j.lastOrigin=e}function zd(){Dd(this)}function Ad(a){return a.stop||(a.stop=zd),a}function Bd(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Cd(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Dd(a){Bd(a),Cd(a)}function Ed(a){return a.target||a.srcElement}function Fd(a){var b=a.which;return null==b&&(1&a.button?b=1:2&a.button?b=3:4&a.button&&(b=2)),p&&a.ctrlKey&&1==b&&(b=3),b}function Gd(a,b){var c=a.override&&a.override.hasOwnProperty(b);return c?a.override[b]:a[b]}function Hd(a,b,c){if(a.addEventListener)a.addEventListener(b,c,!1);else if(a.attachEvent)a.attachEvent("on"+b,c);else{var d=a._handlers||(a._handlers={}),e=d[b]||(d[b]=[]);e.push(c)}}function Id(a,b,c){if(a.removeEventListener)a.removeEventListener(b,c,!1);else if(a.detachEvent)a.detachEvent("on"+b,c);else{var d=a._handlers&&a._handlers[b];if(!d)return;for(var e=0;d.length>e;++e)if(d[e]==c){d.splice(e,1);break}}}function Jd(a,b){var c=a._handlers&&a._handlers[b];if(c)for(var d=Array.prototype.slice.call(arguments,2),e=0;c.length>e;++e)c[e].apply(null,d)}function Kd(a,b,c){function g(a){return function(){a.apply(null,e)}}var d=b._handlers&&b._handlers[c];if(d)for(var e=Array.prototype.slice.call(arguments,3),f=a.curOp&&a.curOp.delayedCallbacks,h=0;d.length>h;++h)f?f.push(g(d[h])):d[h].apply(null,e)}function Ld(a,b){var c=a._handlers&&a._handlers[b];return c&&c.length>0}function Od(){this.id=null}function Pd(a,b,c){null==b&&(b=a.search(/[^\s\u00a0]/),-1==b&&(b=a.length));for(var d=0,e=0;b>d;++d)"	"==a.charAt(d)?e+=c-e%c:++e;return e}function Rd(a){for(;a>=Qd.length;)Qd.push(Sd(Qd)+" ");return Qd[a]}function Sd(a){return a[a.length-1]}function Td(a){n?(a.selectionStart=0,a.selectionEnd=a.value.length):a.select()}function Ud(a,b){if(a.indexOf)return a.indexOf(b);for(var c=0,d=a.length;d>c;++c)if(a[c]==b)return c;return-1}function Vd(a){for(var b=[],c=0;a>c;++c)b.push(void 0);return b}function Wd(a){var b=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,b)}}function Yd(a){return/\w/.test(a)||a>"\u0080"&&(a.toUpperCase()!=a.toLowerCase()||Xd.test(a))}function Zd(a){var b=0;for(var c in a)a.hasOwnProperty(c)&&a[c]&&++b;return!b}function _d(a,b,c,d){var e=document.createElement(a);if(c&&(e.className=c),d&&(e.style.cssText=d),"string"==typeof b)ce(e,b);else if(b)for(var f=0;b.length>f;++f)e.appendChild(b[f]);return e}function ae(a){return a.innerHTML="",a}function be(a,b){return ae(a).appendChild(b)}function ce(a,b){d?(a.innerHTML="",a.appendChild(document.createTextNode(b))):a.textContent=b}function ge(a){if(null!=fe)return fe;var b=_d("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return be(a,b),b.offsetWidth&&(fe=b.offsetHeight-b.clientHeight),fe||0}function ie(a){if(null==he){var b=_d("span","\u200b");be(a,_d("span",[b,document.createTextNode("x")])),0!=a.firstChild.offsetHeight&&(he=1>=b.offsetWidth&&b.offsetHeight>2&&!c)}return he?_d("span","\u200b"):_d("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}function ne(a,b,c,d){if(!a)return d(b,c,"ltr");for(var e=0;a.length>e;++e){var f=a[e];c>f.from&&f.to>b&&d(Math.max(f.from,b),Math.min(f.to,c),1==f.level?"rtl":"ltr")}}function oe(a){return a.level%2?a.to:a.from}function pe(a){return a.level%2?a.from:a.to}function qe(a){var b=wd(a);return b?oe(b[0]):0}function re(a){var b=wd(a);return b?pe(Sd(b)):a.text.length}function se(a,b){var c=rd(a.view.doc,b),d=Wc(a.view.doc,c);d!=c&&(b=td(d));var e=wd(d),f=e?e[0].level%2?re(d):qe(d):0;return{line:b,ch:f}}function te(a,b){for(var c,d;c=Vc(d=rd(a.view.doc,b));)b=c.find().to.line;var e=wd(d),f=e?e[0].level%2?qe(d):re(d):d.text.length;return{line:b,ch:f}}function ue(a,b,c,d){var e=wd(a);if(!e)return ve(a,b,c,d);for(var f=d?function(b,c){do b+=c;while(b>0&&$d.test(a.text.charAt(b)));return b}:function(a,b){return a+b},g=e[0].level,h=0;e.length>h;++h){var i=e[h],j=i.level%2==g;if(b>i.from&&i.to>b||j&&(i.from==b||i.to==b))break}for(var k=f(b,i.level%2?-c:c);null!=k;)if(i.level%2==g){if(!(i.from>k||k>i.to))break;i=e[h+=c],k=i&&(c>0==i.level%2?f(i.to,-1):f(i.from,1))}else if(k==oe(i))i=e[--h],k=i&&pe(i);else{if(k!=pe(i))break;i=e[++h],k=i&&oe(i)}return 0>k||k>a.text.length?null:k}function ve(a,b,c,d){var e=b+c;if(d)for(;e>0&&$d.test(a.text.charAt(e));)e+=c;return 0>e||e>a.text.length?null:e}var hb,xb,yb,Gb,Hb,Ib,Jb,a=/gecko\/\d/i.test(navigator.userAgent),b=/MSIE \d/.test(navigator.userAgent),c=/MSIE [1-7]\b/.test(navigator.userAgent),d=/MSIE [1-8]\b/.test(navigator.userAgent),e=/WebKit\//.test(navigator.userAgent),f=e&&/Qt\/\d+\.\d+/.test(navigator.userAgent),g=/Chrome\//.test(navigator.userAgent),h=/Opera\//.test(navigator.userAgent),i=/Apple Computer/.test(navigator.vendor),j=/KHTML\//.test(navigator.userAgent),k=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),l=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),m=/PhantomJS/.test(navigator.userAgent),n=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),o=n||/Android|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent),p=n||/Mac/.test(navigator.platform),q=!1,r=!1,Fb=0,Kb=null;b?Kb=-.53:a?Kb=15:g?Kb=-.7:i&&(Kb=-1/3);var Ob,Wb,Rb=null;s.prototype={getValue:function(a){var b=[],c=this.view.doc;return c.iter(0,c.size,function(a){b.push(a.text)}),b.join(a||"\n")},setValue:mb(null,function(a){var b=this.view.doc,c={line:0,ch:0},d=rd(b,b.size-1).text.length;Zb(this,c,{line:b.size-1,ch:d},je(a),c,c,"setValue")}),getSelection:function(a){return this.getRange(this.view.sel.from,this.view.sel.to,a)},replaceSelection:mb(null,function(a,b,c){var d=this.view.sel;Yb(this,d.from,d.to,je(a),b||"around",c)}),focus:function(){window.focus(),sb(this),Ub(this),pb(this)},setOption:function(a,b){var c=this.options,d=c[a];(c[a]!=b||"mode"==a)&&(c[a]=b,uc.hasOwnProperty(a)&&mb(this,uc[a])(this,b,d))},getOption:function(a){return this.options[a]},getMode:function(){return this.view.mode},addKeyMap:function(a){this.view.keyMaps.push(a)},removeKeyMap:function(a){for(var b=this.view.keyMaps,c=0;b.length>c;++c)if(("string"==typeof a?b[c].name:b[c])==a)return b.splice(c,1),!0},undo:mb(null,function(){$b(this,"undo")}),redo:mb(null,function(){$b(this,"redo")}),indentLine:mb(null,function(a,b,c){"string"!=typeof b&&(b=null==b?this.options.smartIndent?"smart":"prev":b?"add":"subtract"),gc(this.view.doc,a)&&pc(this,a,b,c)}),indentSelection:mb(null,function(a){var b=this.view.sel;if(bc(b.from,b.to))return pc(this,b.from.line,a);for(var c=b.to.line-(b.to.ch?0:1),d=b.from.line;c>=d;++d)pc(this,d,a)}),historySize:function(){var a=this.view.history;return{undo:a.done.length,redo:a.undone.length}},clearHistory:function(){this.view.history=xd()},markClean:function(){this.view.history.dirtyCounter=0,this.view.history.lastOp=this.view.history.lastOrigin=null},isClean:function(){return 0==this.view.history.dirtyCounter},getHistory:function(){function b(a){for(var d,b=0,c=[];a.length>b;++b){var e=a[b];c.push({events:d=[],fromBefore:e.fromBefore,toBefore:e.toBefore,fromAfter:e.fromAfter,toAfter:e.toAfter});for(var f=0,g=e.events;g.length>f;++f){var h=[],i=g[f];d.push({start:i.start,added:i.added,old:h});for(var j=0;i.old.length>j;++j)h.push(Zc(i.old[j]))}}return c}var a=this.view.history;return{done:b(a.done),undone:b(a.undone)}},setHistory:function(a){var b=this.view.history=xd();b.done=a.done,b.undone=a.undone},getTokenAt:function(a){var b=this.view.doc;a=fc(b,a);for(var c=X(this,a.line),d=this.view.mode,e=rd(b,a.line),f=new Jc(e.text,this.options.tabSize);f.pos<a.ch&&!f.eol();){f.start=f.pos;var g=d.token(f,c)}return{start:f.start,end:f.pos,string:f.current(),className:g||null,type:g||null,state:c}},getStateAfter:function(a){var b=this.view.doc;return a=ec(b,null==a?b.size-1:a),X(this,a+1)},cursorCoords:function(a,b){var c,d=this.view.sel;return c=null==a?d.head:"object"==typeof a?fc(this.view.doc,a):a?d.from:d.to,eb(this,c,b||"page")},charCoords:function(a,b){return db(this,fc(this.view.doc,a),b||"page")},coordsChar:function(a){var b=this.display.lineSpace.getBoundingClientRect();return fb(this,a.left-b.left,a.top-b.top)},defaultTextHeight:function(){return ib(this.display)},markText:mb(null,function(a,b,c){return Lc(this,fc(this.view.doc,a),fc(this.view.doc,b),c,"range")}),setBookmark:mb(null,function(a,b){return a=fc(this.view.doc,a),Lc(this,a,a,b?{replacedWith:b}:{},"bookmark")}),findMarksAt:function(a){var b=this.view.doc;a=fc(b,a);var c=[],d=rd(b,a.line).markedSpans;if(d)for(var e=0;d.length>e;++e){var f=d[e];(null==f.from||f.from<=a.ch)&&(null==f.to||f.to>=a.ch)&&c.push(f.marker)}return c},setGutterMarker:mb(null,function(a,b,c){return qc(this,a,function(a){var d=a.gutterMarkers||(a.gutterMarkers={});return d[b]=c,!c&&Zd(d)&&(a.gutterMarkers=null),!0})}),clearGutter:mb(null,function(a){var b=0,c=this,d=c.view.doc;d.iter(0,d.size,function(d){d.gutterMarkers&&d.gutterMarkers[a]&&(d.gutterMarkers[a]=null,nb(c,b,b+1),Zd(d.gutterMarkers)&&(d.gutterMarkers=null)),++b})}),addLineClass:mb(null,function(a,b,c){return qc(this,a,function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass";if(a[d]){if(RegExp("\\b"+c+"\\b").test(a[d]))return!1;a[d]+=" "+c}else a[d]=c;return!0})}),removeLineClass:mb(null,function(a,b,c){return qc(this,a,function(a){var d="text"==b?"textClass":"background"==b?"bgClass":"wrapClass",e=a[d];if(!e)return!1;if(null==c)a[d]=null;else{var f=e.replace(RegExp("^"+c+"\\b\\s*|\\s*\\b"+c+"\\b"),"");if(f==e)return!1;a[d]=f||null}return!0})}),addLineWidget:mb(null,function(a,b,c){var d=c||{};return d.node=b,d.noHScroll&&(this.display.alignWidgets=!0),qc(this,a,function(a){return(a.widgets||(a.widgets=[])).push(d),d.line=a,!0}),d}),removeLineWidget:mb(null,function(a){var b=a.line.widgets,c=td(a.line);if(null!=c){for(var d=0;b.length>d;++d)b[d]==a&&b.splice(d--,1);nb(this,c,c+1)}}),lineInfo:function(a){if("number"==typeof a){if(!gc(this.view.doc,a))return null;var b=a;if(a=rd(this.view.doc,a),!a)return null}else{var b=td(a);if(null==b)return null}return{line:b,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(a,b,c,d,e){var f=this.display;a=eb(this,fc(this.view.doc,a));var g=a.top,h=a.left;if(b.style.position="absolute",f.sizer.appendChild(b),"over"==d)g=a.top;else if("near"==d){var i=Math.max(f.wrapper.clientHeight,this.view.doc.height),j=Math.max(f.sizer.clientWidth,f.lineSpace.clientWidth);a.bottom+b.offsetHeight>i&&a.top>b.offsetHeight&&(g=a.top-b.offsetHeight),h+b.offsetWidth>j&&(h=j-b.offsetWidth)}b.style.top=g+Y(f)+"px",b.style.left=b.style.right="","right"==e?(h=f.sizer.clientWidth-b.offsetWidth,b.style.right="0px"):("left"==e?h=0:"middle"==e&&(h=(f.sizer.clientWidth-b.offsetWidth)/2),b.style.left=h+"px"),c&&nc(this,h,g,h+b.offsetWidth,g+b.offsetHeight)},lineCount:function(){return this.view.doc.size},clipPos:function(a){return fc(this.view.doc,a)},getCursor:function(a){var c,b=this.view.sel;return c=null==a||"head"==a?b.head:"anchor"==a?b.anchor:"end"==a||a===!1?b.to:b.from,dc(c)},somethingSelected:function(){return!bc(this.view.sel.from,this.view.sel.to)},setCursor:mb(null,function(a,b,c){var d=fc(this.view.doc,"number"==typeof a?{line:a,ch:b||0}:a);c?hc(this,d):ic(this,d,d)}),setSelection:mb(null,function(a,b){var c=this.view.doc;ic(this,fc(c,a),fc(c,b||a))}),extendSelection:mb(null,function(a,b){var c=this.view.doc;hc(this,fc(c,a),b&&fc(c,b))}),setExtending:function(a){this.view.sel.extend=a},getLine:function(a){var b=this.getLineHandle(a);return b&&b.text},getLineHandle:function(a){var b=this.view.doc;return gc(b,a)?rd(b,a):void 0},getLineNumber:function(a){return td(a)},setLine:mb(null,function(a,b){gc(this.view.doc,a)&&ac(this,b,{line:a,ch:0},{line:a,ch:rd(this.view.doc,a).text.length})}),removeLine:mb(null,function(a){gc(this.view.doc,a)&&ac(this,"",{line:a,ch:0},fc(this.view.doc,{line:a+1,ch:0}))}),replaceRange:mb(null,function(a,b,c){var d=this.view.doc;return b=fc(d,b),c=c?fc(d,c):b,ac(this,a,b,c)}),getRange:function(a,b,c){var d=this.view.doc;a=fc(d,a),b=fc(d,b);var e=a.line,f=b.line;if(e==f)return rd(d,e).text.slice(a.ch,b.ch);var g=[rd(d,e).text.slice(a.ch)];return d.iter(e+1,f,function(a){g.push(a.text)
}),g.push(rd(d,f).text.slice(0,b.ch)),g.join(c||"\n")},triggerOnKeyDown:mb(null,Sb),execCommand:function(a){return Ec[a](this)},moveH:mb(null,function(a,b){var c=this.view.sel,d=0>a?c.from:c.to;(c.shift||c.extend||bc(c.from,c.to))&&(d=rc(this,a,b,!0)),hc(this,d,d,a)}),deleteH:mb(null,function(a,b){var c=this.view.sel;bc(c.from,c.to)?ac(this,"",c.from,rc(this,a,b,!1),"delete"):ac(this,"",c.from,c.to,"delete"),this.curOp.userSelChange=!0}),moveV:mb(null,function(a,b){var i,c=this.view,d=c.doc,e=this.display,f=c.sel.head,g=eb(this,f,"div"),h=g.left;if(null!=c.goalColumn&&(h=c.goalColumn),"page"==b){var j=Math.min(e.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);i=g.top+a*j}else"line"==b&&(i=a>0?g.bottom+3:g.top-3);do{var k=fb(this,h,i);i+=5*a}while(k.outside&&(0>a?i>0:d.height>i));"page"==b&&(e.scrollbarV.scrollTop+=db(this,k,"div").top-g.top),hc(this,k,k,a),c.goalColumn=h}),toggleOverwrite:function(){(this.view.overwrite=!this.view.overwrite)?this.display.cursor.className+=" CodeMirror-overwrite":this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite","")},posFromIndex:function(a){var c,b=0,d=this.view.doc;return d.iter(0,d.size,function(d){var e=d.text.length+1;return e>a?(c=a,!0):(a-=e,++b,void 0)}),fc(d,{line:b,ch:c})},indexFromPos:function(a){if(0>a.line||0>a.ch)return 0;var b=a.ch;return this.view.doc.iter(0,a.line,function(a){b+=a.text.length+1}),b},scrollTo:function(a,b){null!=a&&(this.display.scrollbarH.scrollLeft=this.display.scroller.scrollLeft=a),null!=b&&(this.display.scrollbarV.scrollTop=this.display.scroller.scrollTop=b),K(this,[])},getScrollInfo:function(){var a=this.display.scroller,b=Md;return{left:a.scrollLeft,top:a.scrollTop,height:a.scrollHeight-b,width:a.scrollWidth-b,clientHeight:a.clientHeight-b,clientWidth:a.clientWidth-b}},scrollIntoView:function(a){"number"==typeof a&&(a={line:a,ch:0}),a=a?fc(this.view.doc,a):this.view.sel.head,mc(this,a)},setSize:function(a,b){function c(a){return"number"==typeof a||/^\d+$/.test(a+"")?a+"px":a}null!=a&&(this.display.wrapper.style.width=c(a)),null!=b&&(this.display.wrapper.style.height=c(b)),this.refresh()},on:function(a,b){Hd(this,a,b)},off:function(a,b){Id(this,a,b)},operation:function(a){return mb(this,a)()},refresh:function(){bb(this),this.display.scroller.scrollHeight>this.view.scrollTop&&(this.display.scrollbarV.scrollTop=this.display.scroller.scrollTop=this.view.scrollTop),K(this,!0)},getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};var uc=s.optionHandlers={},vc=s.defaults={},xc=s.Init={toString:function(){return"CodeMirror.Init"}};wc("value","",function(a,b){a.setValue(b)},!0),wc("mode",null,v,!0),wc("indentUnit",2,v,!0),wc("indentWithTabs",!1),wc("smartIndent",!0),wc("tabSize",4,function(a){v(a),bb(a),K(a,!0)},!0),wc("electricChars",!0),wc("theme","default",function(a){y(a),z(a)},!0),wc("keyMap","default",x),wc("extraKeys",null),wc("onKeyEvent",null),wc("onDragEvent",null),wc("lineWrapping",!1,w,!0),wc("gutters",[],function(a){D(a.options),z(a)},!0),wc("lineNumbers",!1,function(a){D(a.options),z(a)},!0),wc("firstLineNumber",1,z,!0),wc("lineNumberFormatter",function(a){return a},z,!0),wc("showCursorWhenSelecting",!1,Q,!0),wc("readOnly",!1,function(a,b){"nocursor"==b?(Vb(a),a.display.input.blur()):b||rb(a,!0)}),wc("dragDrop",!0),wc("cursorBlinkRate",530),wc("cursorHeight",1),wc("workTime",100),wc("workDelay",100),wc("flattenSpans",!0),wc("pollInterval",100),wc("undoDepth",40),wc("viewportMargin",10,function(a){a.refresh()},!0),wc("tabindex",null,function(a,b){a.display.input.tabIndex=b||""}),wc("autofocus",null);var yc=s.modes={},zc=s.mimeModes={};s.defineMode=function(a,b){if(s.defaults.mode||"null"==a||(s.defaults.mode=a),arguments.length>2){b.dependencies=[];for(var c=2;arguments.length>c;++c)b.dependencies.push(arguments[c])}yc[a]=b},s.defineMIME=function(a,b){zc[a]=b},s.resolveMode=function(a){if("string"==typeof a&&zc.hasOwnProperty(a))a=zc[a];else if("string"==typeof a&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return s.resolveMode("application/xml");return"string"==typeof a?{name:a}:a||{name:"null"}},s.getMode=function(a,b){var b=s.resolveMode(b),c=yc[b.name];if(!c)return s.getMode(a,"text/plain");var d=c(a,b);if(Ac.hasOwnProperty(b.name)){var e=Ac[b.name];for(var f in e)e.hasOwnProperty(f)&&(d.hasOwnProperty(f)&&(d["_"+f]=d[f]),d[f]=e[f])}return d.name=b.name,d},s.defineMode("null",function(){return{token:function(a){a.skipToEnd()}}}),s.defineMIME("text/plain","null");var Ac=s.modeExtensions={};s.extendMode=function(a,b){var c=Ac.hasOwnProperty(a)?Ac[a]:Ac[a]={};for(var d in b)b.hasOwnProperty(d)&&(c[d]=b[d])},s.defineExtension=function(a,b){s.prototype[a]=b},s.defineOption=wc;var Bc=[];s.defineInitHook=function(a){Bc.push(a)},s.copyState=Cc,s.startState=Dc,s.innerMode=function(a,b){for(;a.innerMode;){var c=a.innerMode(b);b=c.state,a=c.mode}return c||{mode:a,state:b}};var Ec=s.commands={selectAll:function(a){a.setSelection({line:0,ch:0},{line:a.lineCount()-1})},killLine:function(a){var b=a.getCursor(!0),c=a.getCursor(!1),d=!bc(b,c);d||a.getLine(b.line).length!=b.ch?a.replaceRange("",b,d?c:{line:b.line},"delete"):a.replaceRange("",b,{line:b.line+1,ch:0},"delete")},deleteLine:function(a){var b=a.getCursor().line;a.replaceRange("",{line:b,ch:0},{line:b},"delete")},undo:function(a){a.undo()},redo:function(a){a.redo()},goDocStart:function(a){a.extendSelection({line:0,ch:0})},goDocEnd:function(a){a.extendSelection({line:a.lineCount()-1})},goLineStart:function(a){a.extendSelection(se(a,a.getCursor().line))},goLineStartSmart:function(a){var b=a.getCursor(),c=se(a,b.line),d=a.getLineHandle(c.line),e=wd(d);if(e&&0!=e[0].level)a.extendSelection(c);else{var f=Math.max(0,d.text.search(/\S/)),g=b.line==c.line&&f>=b.ch&&b.ch;a.extendSelection({line:c.line,ch:g?0:f})}},goLineEnd:function(a){a.extendSelection(te(a,a.getCursor().line))},goLineUp:function(a){a.moveV(-1,"line")},goLineDown:function(a){a.moveV(1,"line")},goPageUp:function(a){a.moveV(-1,"page")},goPageDown:function(a){a.moveV(1,"page")},goCharLeft:function(a){a.moveH(-1,"char")},goCharRight:function(a){a.moveH(1,"char")},goColumnLeft:function(a){a.moveH(-1,"column")},goColumnRight:function(a){a.moveH(1,"column")},goWordLeft:function(a){a.moveH(-1,"word")},goWordRight:function(a){a.moveH(1,"word")},delCharBefore:function(a){a.deleteH(-1,"char")},delCharAfter:function(a){a.deleteH(1,"char")},delWordBefore:function(a){a.deleteH(-1,"word")},delWordAfter:function(a){a.deleteH(1,"word")},indentAuto:function(a){a.indentSelection("smart")},indentMore:function(a){a.indentSelection("add")},indentLess:function(a){a.indentSelection("subtract")},insertTab:function(a){a.replaceSelection("	","end","input")},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.replaceSelection("	","end","input")},transposeChars:function(a){var b=a.getCursor(),c=a.getLine(b.line);b.ch>0&&b.ch<c.length-1&&a.replaceRange(c.charAt(b.ch)+c.charAt(b.ch-1),{line:b.line,ch:b.ch-1},{line:b.line,ch:b.ch+1})},newlineAndIndent:function(a){mb(a,function(){a.replaceSelection("\n","end","input"),a.indentLine(a.getCursor().line,null,!0)})()},toggleOverwrite:function(a){a.toggleOverwrite()}},Fc=s.keyMap={};Fc.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"},Fc.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goWordLeft","Ctrl-Right":"goWordRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delWordBefore","Ctrl-Delete":"delWordAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"},Fc.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goWordLeft","Alt-Right":"goWordRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delWordBefore","Ctrl-Alt-Backspace":"delWordAfter","Alt-Delete":"delWordAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore",fallthrough:["basic","emacsy"]},Fc["default"]=p?Fc.macDefault:Fc.pcDefault,Fc.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},s.isModifierKey=Ic,s.fromTextArea=function(a,b){function e(){a.value=i.getValue()}if(b||(b={}),b.value=a.value,!b.tabindex&&a.tabindex&&(b.tabindex=a.tabindex),null==b.autofocus){var c=document.body;try{c=document.activeElement}catch(d){}b.autofocus=c==a||null!=a.getAttribute("autofocus")&&c==document.body}if(a.form){Hd(a.form,"submit",e);var f=a.form,g=f.submit;try{f.submit=function h(){e(),f.submit=g,f.submit(),f.submit=h}}catch(d){}}a.style.display="none";var i=s(function(b){a.parentNode.insertBefore(b,a.nextSibling)},b);return i.save=e,i.getTextArea=function(){return a},i.toTextArea=function(){e(),a.parentNode.removeChild(i.getWrapperElement()),a.style.display="",a.form&&(Id(a.form,"submit",e),"function"==typeof a.form.submit&&(a.form.submit=g))},i},Jc.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return 0==this.pos},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(a){var b=this.string.charAt(this.pos);if("string"==typeof a)var c=b==a;else var c=b&&(a.test?a.test(b):a(b));return c?(++this.pos,b):void 0},eatWhile:function(a){for(var b=this.pos;this.eat(a););return this.pos>b},eatSpace:function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},skipToEnd:function(){this.pos=this.string.length},skipTo:function(a){var b=this.string.indexOf(a,this.pos);return b>-1?(this.pos=b,!0):void 0},backUp:function(a){this.pos-=a},column:function(){return Pd(this.string,this.start,this.tabSize)},indentation:function(){return Pd(this.string,null,this.tabSize)},match:function(a,b,c){if("string"!=typeof a){var e=this.string.slice(this.pos).match(a);return e&&e.index>0?null:(e&&b!==!1&&(this.pos+=e[0].length),e)}var d=function(a){return c?a.toLowerCase():a};return d(this.string).indexOf(d(a),this.pos)==this.pos?(b!==!1&&(this.pos+=a.length),!0):void 0},current:function(){return this.string.slice(this.start,this.pos)}},s.StringStream=Jc,Kc.prototype.clear=function(){if(!this.explicitlyCleared){kb(this.cm);for(var a=null,b=null,c=0;this.lines.length>c;++c){var d=this.lines[c],e=Mc(d.markedSpans,this);null!=e.to&&(b=td(d)),d.markedSpans=Nc(d.markedSpans,e),null!=e.from?a=td(d):this.collapsed&&!Xc(d)&&sd(d,ib(this.cm.display))}null!=a&&nb(this.cm,a,b+1),this.lines.length=0,this.explicitlyCleared=!0,this.collapsed&&this.cm.view.cantEdit&&(this.cm.view.cantEdit=!1,jc(this.cm)),lb(this.cm),Kd(this.cm,this,"clear")}},Kc.prototype.find=function(){for(var a,b,c=0;this.lines.length>c;++c){var d=this.lines[c],e=Mc(d.markedSpans,this);if(null!=e.from||null!=e.to){var f=td(d);null!=e.from&&(a={line:f,ch:e.from}),null!=e.to&&(b={line:f,ch:e.to})}}return"bookmark"==this.type?a:a&&{from:a,to:b}},window.lineIsHidden=Xc;var hd={},kd=/[\t\u0000-\u0019\u200b\u2028\u2029\uFEFF]/g;pd.prototype={chunkSize:function(){return this.lines.length},remove:function(a,b,c){for(var d=a,e=a+b;e>d;++d){var f=this.lines[d];this.height-=f.height,ed(f),Kd(c,f,"delete")}this.lines.splice(a,b)},collapse:function(a){a.splice.apply(a,[a.length,0].concat(this.lines))},insertHeight:function(a,b,c){this.height+=c,this.lines=this.lines.slice(0,a).concat(b).concat(this.lines.slice(a));for(var d=0,e=b.length;e>d;++d)b[d].parent=this},iterN:function(a,b,c){for(var d=a+b;d>a;++a)if(c(this.lines[a]))return!0}},qd.prototype={chunkSize:function(){return this.size},remove:function(a,b,c){this.size-=b;for(var d=0;this.children.length>d;++d){var e=this.children[d],f=e.chunkSize();if(f>a){var g=Math.min(b,f-a),h=e.height;if(e.remove(a,g,c),this.height-=h-e.height,f==g&&(this.children.splice(d--,1),e.parent=null),0==(b-=g))break;a=0}else a-=f}if(25>this.size-b){var i=[];this.collapse(i),this.children=[new pd(i)],this.children[0].parent=this}},collapse:function(a){for(var b=0,c=this.children.length;c>b;++b)this.children[b].collapse(a)},insert:function(a,b){for(var c=0,d=0,e=b.length;e>d;++d)c+=b[d].height;this.insertHeight(a,b,c)},insertHeight:function(a,b,c){this.size+=b.length,this.height+=c;for(var d=0,e=this.children.length;e>d;++d){var f=this.children[d],g=f.chunkSize();if(g>=a){if(f.insertHeight(a,b,c),f.lines&&f.lines.length>50){for(;f.lines.length>50;){var h=f.lines.splice(f.lines.length-25,25),i=new pd(h);f.height-=i.height,this.children.splice(d+1,0,i),i.parent=this}this.maybeSpill()}break}a-=g}},maybeSpill:function(){if(!(10>=this.children.length)){var a=this;do{var b=a.children.splice(a.children.length-5,5),c=new qd(b);if(a.parent){a.size-=c.size,a.height-=c.height;var e=Ud(a.parent.children,a);a.parent.children.splice(e+1,0,c)}else{var d=new qd(a.children);d.parent=a,a.children=[d,c],a=d}c.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iter:function(a,b,c){this.iterN(a,b-a,c)},iterN:function(a,b,c){for(var d=0,e=this.children.length;e>d;++d){var f=this.children[d],g=f.chunkSize();if(g>a){var h=Math.min(b,g-a);if(f.iterN(a,h,c))return!0;if(0==(b-=h))break;a=0}else a-=g}}},s.e_stop=Dd,s.e_preventDefault=Bd,s.e_stopPropagation=Cd,s.on=Hd,s.off=Id,s.signal=Jd;var Md=30,Nd=s.Pass={toString:function(){return"CodeMirror.Pass"}};Od.prototype={set:function(a,b){clearTimeout(this.id),this.id=setTimeout(b,a)}},s.countColumn=Pd;var Qd=[""],Xd=/[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc]/,$d=/[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\uA670-\uA672\uA674-\uA67D\uA69F]/,de=function(){if(d)return!1;var a=_d("div");return"draggable"in a||"dragDrop"in a}(),ee=/^$/;a?ee=/$'/:i?ee=/\-[^ \-?]|\?[^ !'\"\),.\-\/:;\?\]\}]/:g&&(ee=/\-[^ \-\.?]|\?[^ \-\.?\]\}:;!'\"\),\/]|[\.!\"#&%\)*+,:;=>\]|\}~][\(\{\[<]|\$'/);var fe,he,je=3!="\n\nb".split(/\n/).length?function(a){for(var b=0,c=[],d=a.length;d>=b;){var e=a.indexOf("\n",b);-1==e&&(e=a.length);var f=a.slice(b,"\r"==a.charAt(e-1)?e-1:e),g=f.indexOf("\r");-1!=g?(c.push(f.slice(0,g)),b+=g+1):(c.push(f),b=e+1)}return c}:function(a){return a.split(/\r\n?|\n/)};s.splitLines=je;var ke=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(b){return!1}}:function(a){try{var b=a.ownerDocument.selection.createRange()}catch(c){}return b&&b.parentElement()==a?0!=b.compareEndPoints("StartToEnd",b):!1},le=function(){var a=_d("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),"function"==typeof a.oncopy)}(),me={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",91:"Mod",92:"Mod",93:"Mod",109:"-",107:"=",127:"Delete",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63276:"PageUp",63277:"PageDown",63275:"End",63273:"Home",63234:"Left",63232:"Up",63235:"Right",63233:"Down",63302:"Insert",63272:"Delete"};s.keyNames=me,function(){for(var a=0;10>a;a++)me[a+48]=a+"";for(var a=65;90>=a;a++)me[a]=String.fromCharCode(a);for(var a=1;12>=a;a++)me[a+111]=me[a+63235]="F"+a}();var we=function(){function c(c){return 255>=c?a.charAt(c):c>=1424&&1524>=c?"R":c>=1536&&1791>=c?b.charAt(c-1536):c>=1792&&2220>=c?"r":"L"}var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",b="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",d=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,f=/[LRr]/,g=/[Lb1n]/,h=/[1n]/;return function(a){if(!d.test(a))return!1;for(var l,b=a.length,i=[],j=null,k=0;b>k;++k)i.push(l=c(a.charCodeAt(k))),null==j&&("L"==l?j="L":("R"==l||"r"==l)&&(j="R"));null==j&&(j="L");for(var k=0,m=j;b>k;++k){var l=i[k];"m"==l?i[k]=m:m=l}for(var k=0,n=j;b>k;++k){var l=i[k];"1"==l&&"r"==n?i[k]="n":f.test(l)&&(n=l,"r"==l&&(i[k]="R"))}for(var k=1,m=i[0];b-1>k;++k){var l=i[k];"+"==l&&"1"==m&&"1"==i[k+1]?i[k]="1":","!=l||m!=i[k+1]||"1"!=m&&"n"!=m||(i[k]=m),m=l}for(var k=0;b>k;++k){var l=i[k];if(","==l)i[k]="N";else if("%"==l){for(var o=k+1;b>o&&"%"==i[o];++o);for(var p=k&&"!"==i[k-1]||b-1>o&&"1"==i[o]?"1":"N",q=k;o>q;++q)i[q]=p;k=o-1}}for(var k=0,n=j;b>k;++k){var l=i[k];"L"==n&&"1"==l?i[k]="L":f.test(l)&&(n=l)}for(var k=0;b>k;++k)if(e.test(i[k])){for(var o=k+1;b>o&&e.test(i[o]);++o);for(var r="L"==(k?i[k-1]:j),s="L"==(b-1>o?i[o]:j),p=r||s?"L":"R",q=k;o>q;++q)i[q]=p;k=o-1}for(var u,t=[],k=0;b>k;)if(g.test(i[k])){var v=k;for(++k;b>k&&g.test(i[k]);++k);t.push({from:v,to:k,level:0})}else{var w=k,x=t.length;for(++k;b>k&&"L"!=i[k];++k);for(var q=w;k>q;)if(h.test(i[q])){q>w&&t.splice(x,0,{from:w,to:q,level:1});var y=q;for(++q;k>q&&h.test(i[q]);++q);t.splice(x,0,{from:y,to:q,level:2}),w=q}else++q;k>w&&t.splice(x,0,{from:w,to:k,level:1})}return 1==t[0].level&&(u=a.match(/^\s+/))&&(t[0].from=u[0].length,t.unshift({from:0,to:u[0].length,level:0})),1==Sd(t).level&&(u=a.match(/\s+$/))&&(Sd(t).to-=u[0].length,t.push({from:b-u[0].length,to:b,level:0})),t[0].level!=Sd(t).level&&t.push({from:b,to:b,level:t[0].level}),t}}();return s.version="3.0",s}(),CodeMirror.defineMode("clike",function(a,b){function m(a,b){var c=a.next();if(i[c]){var d=i[c](a,b);if(d!==!1)return d}if('"'==c||"'"==c)return b.tokenize=n(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return l=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),"number";if("/"==c){if(a.eat("*"))return b.tokenize=o,o(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(k.test(c))return a.eatWhile(k),"operator";a.eatWhile(/[\w\$_]/);var j=a.current();return e.propertyIsEnumerable(j)?(g.propertyIsEnumerable(j)&&(l="newstatement"),"keyword"):f.propertyIsEnumerable(j)?(g.propertyIsEnumerable(j)&&(l="newstatement"),"builtin"):h.propertyIsEnumerable(j)?"atom":"variable"}function n(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&!j)&&(c.tokenize=null),"string"}}function o(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=null;break}c="*"==d}return"comment"}function p(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function q(a,b,c){var d=a.indented;return a.context&&"statement"==a.context.type&&(d=a.context.indented),a.context=new p(d,b,c,null,a.context)}function r(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var l,c=a.indentUnit,d=b.statementIndentUnit||c,e=b.keywords||{},f=b.builtin||{},g=b.blockKeywords||{},h=b.atoms||{},i=b.hooks||{},j=b.multiLineStrings,k=/[+\-*&%=<>!?|\/]/;return{startState:function(a){return{tokenize:null,context:new p((a||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;l=null;var d=(b.tokenize||m)(a,b);if("comment"==d||"meta"==d)return d;if(null==c.align&&(c.align=!0),";"!=l&&":"!=l&&","!=l||"statement"!=c.type)if("{"==l)q(b,a.column(),"}");else if("["==l)q(b,a.column(),"]");else if("("==l)q(b,a.column(),")");else if("}"==l){for(;"statement"==c.type;)c=r(b);for("}"==c.type&&(c=r(b));"statement"==c.type;)c=r(b)}else l==c.type?r(b):(("}"==c.type||"top"==c.type)&&";"!=l||"statement"==c.type&&"newstatement"==l)&&q(b,a.column(),"statement");else r(b);return b.startOfLine=!1,d},indent:function(a,b){if(a.tokenize!=m&&null!=a.tokenize)return CodeMirror.Pass;var e=a.context,f=b&&b.charAt(0);"statement"==e.type&&"}"==f&&(e=e.prev);var g=f==e.type;return"statement"==e.type?e.indented+("{"==f?0:d):e.align?e.column+(g?0:1):e.indented+(g?0:c)},electricChars:"{}"}}),function(){function a(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function c(a,b){if(!b.startOfLine)return!1;for(;;){if(!a.skipTo("\\")){a.skipToEnd(),b.tokenize=null;break}if(a.next(),a.eol()){b.tokenize=c;break}}return"meta"}function d(a,b){for(var c;null!=(c=a.next());)if('"'==c&&!a.eat('"')){b.tokenize=null;break}return"string"}function e(a,b){for(var c=0;a.length>c;++c)CodeMirror.defineMIME(a[c],b)}var b="auto if break int case long char register continue return default short do sizeof double static else struct entry switch extern typedef float union for unsigned goto while enum void const signed volatile";e(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:a(b),blockKeywords:a("case do else for if switch while struct"),atoms:a("null"),hooks:{"#":c}}),e(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:a(b+" asm dynamic_cast namespace reinterpret_cast try bool explicit new "+"static_cast typeid catch operator template typename class friend private "+"this using const_cast inline public throw virtual delete mutable protected "+"wchar_t"),blockKeywords:a("catch class do else finally for if struct switch try while"),atoms:a("true false null"),hooks:{"#":c}}),CodeMirror.defineMIME("text/x-java",{name:"clike",keywords:a("abstract assert boolean break byte case catch char class const continue default do double else enum extends final finally float for goto if implements import instanceof int interface long native new package private protected public return short static strictfp super switch synchronized this throw throws transient try void volatile while"),blockKeywords:a("catch class do else finally for if switch try while"),atoms:a("true false null"),hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"}}}),CodeMirror.defineMIME("text/x-csharp",{name:"clike",keywords:a("abstract as base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield"),blockKeywords:a("catch class do else finally for foreach if struct switch try while"),builtin:a("Boolean Byte Char DateTime DateTimeOffset Decimal Double Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong"),atoms:a("true false null"),hooks:{"@":function(a,b){return a.eat('"')?(b.tokenize=d,d(a,b)):(a.eatWhile(/[\w\$_]/),"meta")}}}),CodeMirror.defineMIME("text/x-scala",{name:"clike",keywords:a("abstract case catch class def do else extends false final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try trye type val var while with yield _ : = => <- <: <% >: # @ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"),blockKeywords:a("catch class do else finally for forSome if match switch try while"),atoms:a("true false null"),hooks:{"@":function(a){return a.eatWhile(/[\w\$_]/),"meta"}}})}(),CodeMirror.defineMode("clojure",function(){function i(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function o(a,b,c){this.indent=a,this.type=b,this.prev=c}function p(a,b,c){a.indentStack=new o(b,c,a.indentStack)}function q(a){a.indentStack=a.indentStack.prev}function r(a,b){return"0"===a&&b.eat(/x/i)?(b.eatWhile(n.hex),!0):("+"!=a&&"-"!=a||!n.digit.test(b.peek())||(b.eat(n.sign),a=b.next()),n.digit.test(a)?(b.eat(a),b.eatWhile(n.digit),"."==b.peek()&&(b.eat("."),b.eatWhile(n.digit)),b.eat(n.exponent)&&(b.eat(n.sign),b.eatWhile(n.digit)),!0):!1)}var a="builtin",b="comment",c="string",d="atom",e="number",f="bracket",g="keyword",h=2,j=i("true false nil"),k=i("defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"),l=i("* *1 *2 *3 *agent* *allow-unresolved-vars* *assert *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - / < <= = == > >= accessor aclone agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? extend extend-protocol extend-type extends? extenders false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reify reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq"),m=i("ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch let letfn binding loop for doseq dotimes when-let if-let defstruct struct-map assoc testing deftest handler-case handle dotrace deftrace"),n={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,basic:/[\w\$_\-]/,lang_keyword:/[\w*+!\-_?:\/]/};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(i,o){if(null==o.indentStack&&i.sol()&&(o.indentation=i.indentation()),i.eatSpace())return null;var s=null;switch(o.mode){case"string":for(var t,u=!1;null!=(t=i.next());){if('"'==t&&!u){o.mode=!1;break}u=!u&&"\\"==t
}s=c;break;default:var v=i.next();if('"'==v)o.mode="string",s=c;else if("'"!=v||n.digit_or_colon.test(i.peek()))if(";"==v)i.skipToEnd(),s=b;else if(r(v,i))s=e;else if("("==v||"["==v){var y,w="",x=i.column();if("("==v)for(;null!=(y=i.eat(n.keyword_char));)w+=y;w.length>0&&(m.propertyIsEnumerable(w)||/^(?:def|with)/.test(w))?p(o,x+h,v):(i.eatSpace(),i.eol()||";"==i.peek()?p(o,x+1,v):p(o,x+i.current().length,v)),i.backUp(i.current().length-1),s=f}else if(")"==v||"]"==v)s=f,null!=o.indentStack&&o.indentStack.type==(")"==v?"(":"[")&&q(o);else{if(":"==v)return i.eatWhile(n.lang_keyword),d;i.eatWhile(n.basic),s=k&&k.propertyIsEnumerable(i.current())?g:l&&l.propertyIsEnumerable(i.current())?a:j&&j.propertyIsEnumerable(i.current())?d:null}else s=d}return s},indent:function(a){return null==a.indentStack?a.indentation:a.indentStack.indent}}}),CodeMirror.defineMIME("text/x-clojure","clojure"),CodeMirror.defineMode("coffeescript",function(a){function c(a){return RegExp("^(("+a.join(")|(")+"))\\b")}function s(a,c){if(a.sol()){var l=c.scopes[0].offset;if(a.eatSpace()){var m=a.indentation();return m>l?"indent":l>m?"dedent":null}l>0&&w(a,c)}if(a.eatSpace())return null;var q=a.peek();if(a.match("####"))return a.skipToEnd(),"comment";if(a.match("###"))return c.tokenize=u,c.tokenize(a,c);if("#"===q)return a.skipToEnd(),"comment";if(a.match(/^-?[0-9\.]/,!1)){var s=!1;if(a.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(s=!0),a.match(/^-?\d+\.\d*/)&&(s=!0),a.match(/^-?\.\d+/)&&(s=!0),s)return"."==a.peek()&&a.backUp(1),"number";var v=!1;if(a.match(/^-?0x[0-9a-f]+/i)&&(v=!0),a.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(v=!0),a.match(/^-?0(?![\dx])/i)&&(v=!0),v)return"number"}if(a.match(o))return c.tokenize=t(a.current(),"string"),c.tokenize(a,c);if(a.match(p)){if("/"!=a.current()||a.match(/^.*\//,!1))return c.tokenize=t(a.current(),"string-2"),c.tokenize(a,c);a.backUp(1)}return a.match(h)||a.match(g)?"punctuation":a.match(f)||a.match(d)||a.match(k)?"operator":a.match(e)?"punctuation":a.match(r)?"atom":a.match(n)?"keyword":a.match(i)?"variable":a.match(j)?"property":(a.next(),b)}function t(c,d){var e=1==c.length;return function(f,g){for(;!f.eol();)if(f.eatWhile(/[^'"\/\\]/),f.eat("\\")){if(f.next(),e&&f.eol())return d}else{if(f.match(c))return g.tokenize=s,d;f.eat(/['"\/]/)}return e&&(a.mode.singleLineStringErrors?d=b:g.tokenize=s),d}}function u(a,b){for(;!a.eol();){if(a.eatWhile(/[^#]/),a.match("###")){b.tokenize=s;break}a.eatWhile("#")}return"comment"}function v(b,c,d){d=d||"coffee";var e=0;if("coffee"===d){for(var f=0;c.scopes.length>f;f++)if("coffee"===c.scopes[f].type){e=c.scopes[f].offset+a.indentUnit;break}}else e=b.column()+b.current().length;c.scopes.unshift({offset:e,type:d})}function w(a,b){if(1!=b.scopes.length){if("coffee"===b.scopes[0].type){for(var c=a.indentation(),d=-1,e=0;b.scopes.length>e;++e)if(c===b.scopes[e].offset){d=e;break}if(-1===d)return!0;for(;b.scopes[0].offset!==c;)b.scopes.shift();return!1}return b.scopes.shift(),!1}}function x(a,c){var d=c.tokenize(a,c),e=a.current();if("."===e)return d=c.tokenize(a,c),e=a.current(),"variable"===d?"variable":b;"return"===e&&(c.dedent+=1),("->"!==e&&"=>"!==e||c.lambda||"coffee"!=c.scopes[0].type||""!==a.peek())&&"indent"!==d||v(a,c);var f="[({".indexOf(e);return-1!==f&&v(a,c,"])}".slice(f,f+1)),l.exec(e)&&v(a,c),"then"==e&&w(a,c),"dedent"===d&&w(a,c)?b:(f="])}".indexOf(e),-1!==f&&w(a,c)?b:(c.dedent>0&&a.eol()&&"coffee"==c.scopes[0].type&&(c.scopes.length>1&&c.scopes.shift(),c.dedent-=1),d))}var b="error",d=RegExp("^[\\+\\-\\*/%&|\\^~<>!?]"),e=RegExp("^[\\(\\)\\[\\]\\{\\},:`=;\\.]"),f=RegExp("^((->)|(=>)|(\\+\\+)|(\\+\\=)|(\\-\\-)|(\\-\\=)|(\\*\\*)|(\\*\\=)|(\\/\\/)|(\\/\\=)|(==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//))"),g=RegExp("^((\\.\\.)|(\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),h=RegExp("^((\\.\\.\\.)|(//=)|(>>=)|(<<=)|(\\*\\*=))"),i=RegExp("^[_A-Za-z$][_A-Za-z$0-9]*"),j=RegExp("^(@|this.)[_A-Za-z$][_A-Za-z$0-9]*"),k=c(["and","or","not","is","isnt","in","instanceof","typeof"]),l=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],m=["break","by","continue","debugger","delete","do","in","of","new","return","then","this","throw","when","until"],n=c(l.concat(m));l=c(l);var o=RegExp("^('{3}|\"{3}|['\"])"),p=RegExp("^(/{3}|/)"),q=["Infinity","NaN","undefined","null","true","false","on","off","yes","no"],r=c(q),y={startState:function(a){return{tokenize:s,scopes:[{offset:a||0,type:"coffee"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=x(a,b);return b.lastToken={style:c,content:a.current()},a.eol()&&a.lambda&&(b.lambda=!1),c},indent:function(a){return a.tokenize!=s?0:a.scopes[0].offset}};return y}),CodeMirror.defineMIME("text/x-coffeescript","coffeescript"),CodeMirror.defineMode("commonlisp",function(a){function f(a){for(var b;b=a.next();)if("\\"==b)a.next();else if(!d.test(b)){a.backUp(1);break}return a.current()}function g(a,b){if(a.eatSpace())return e="ws",null;if(a.match(c))return"number";var d=a.next();if("\\"==d&&(d=a.next()),'"'==d)return(b.tokenize=h)(a,b);if("("==d)return e="open","bracket";if(")"==d||"]"==d)return e="close","bracket";if(";"==d)return a.skipToEnd(),e="ws","comment";if(/['`,@]/.test(d))return null;if("|"==d)return a.skipTo("|")?(a.next(),"symbol"):(a.skipToEnd(),"error");if("#"==d){var d=a.next();return"["==d?(e="open","bracket"):/[+\-=\.']/.test(d)?null:/\d/.test(d)&&a.match(/^\d*#/)?null:"|"==d?(b.tokenize=i)(a,b):":"==d?(f(a),"meta"):"error"}var g=f(a);return"."==g?null:(e="symbol","nil"==g||"t"==g?"atom":":"==g.charAt(0)?"keyword":"&"==g.charAt(0)?"variable-2":"variable")}function h(a,b){for(var d,c=!1;d=a.next();){if('"'==d&&!c){b.tokenize=g;break}c=!c&&"\\"==d}return"string"}function i(a,b){for(var c,d;c=a.next();){if("#"==c&&"|"==d){b.tokenize=g;break}d=c}return e="ws","comment"}var e,b=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,c=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,d=/[^\s'`,@()\[\]";]/;return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},tokenize:g}},token:function(c,d){c.sol()&&"number"!=typeof d.ctx.indentTo&&(d.ctx.indentTo=d.ctx.start+1),e=null;var f=d.tokenize(c,d);return"ws"!=e&&(null==d.ctx.indentTo?d.ctx.indentTo="symbol"==e&&b.test(c.current())?d.ctx.start+a.indentUnit:"next":"next"==d.ctx.indentTo&&(d.ctx.indentTo=c.column())),"open"==e?d.ctx={prev:d.ctx,start:c.column(),indentTo:null}:"close"==e&&(d.ctx=d.ctx.prev||d.ctx),f},indent:function(a){var c=a.ctx.indentTo;return"number"==typeof c?c:a.ctx.start+1}}}),CodeMirror.defineMIME("text/x-common-lisp","commonlisp"),CodeMirror.defineMode("css",function(a){function i(a){for(var b={},c=0;a.length>c;++c)b[a[c]]=!0;return b}function j(a,b){return c=b,a}function k(a,b){var d=a.next();if("@"==d)return a.eatWhile(/[\w\\\-]/),j("def",a.current());if("/"==d&&a.eat("*"))return b.tokenize=l,l(a,b);if("<"==d&&a.eat("!"))return b.tokenize=m,m(a,b);if("="==d)j(null,"compare");else{if(("~"==d||"|"==d)&&a.eat("="))return j(null,"compare");if('"'==d||"'"==d)return b.tokenize=n(d),b.tokenize(a,b);if("#"==d)return a.eatWhile(/[\w\\\-]/),j("atom","hash");if("!"==d)return a.match(/^\s*\w*/),j("keyword","important");if(/\d/.test(d))return a.eatWhile(/[\w.%]/),j("number","unit");if("-"!==d)return/[,+>*\/]/.test(d)?j(null,"select-op"):"."==d&&a.match(/^-?[_a-z][_a-z0-9-]*/i)?j("qualifier",c):":"==d?j("operator",d):/[;{}\[\]\(\)]/.test(d)?j(null,d):"u"==d&&a.match("rl(")?(a.backUp(1),b.tokenize=o,j("property","variable")):(a.eatWhile(/[\w\\\-]/),j("property","variable"));if(/\d/.test(a.peek()))return a.eatWhile(/[\w.%]/),j("number","unit");if(a.match(/^[^-]+-/))return j("meta",c)}}function l(a,b){for(var d,c=!1;null!=(d=a.next());){if(c&&"/"==d){b.tokenize=k;break}c="*"==d}return j("comment","comment")}function m(a,b){for(var d,c=0;null!=(d=a.next());){if(c>=2&&">"==d){b.tokenize=k;break}c="-"==d?c+1:0}return j("comment","comment")}function n(a,b){return function(c,d){for(var f,e=!1;null!=(f=c.next())&&(f!=a||e);)e=!e&&"\\"==f;return e||(b&&c.backUp(1),d.tokenize=k),j("string","string")}}function o(a,b){return a.next(),b.tokenize=a.match(/\s*[\"\']/,!1)?k:n(")",!0),j(null,"(")}var c,b=a.indentUnit,d=i(["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"]),e=i(["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"]),f=i(["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid-cell","grid-column","grid-column-align","grid-column-sizing","grid-column-span","grid-columns","grid-flow","grid-row","grid-row-align","grid-row-sizing","grid-row-span","grid-rows","grid-template","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-shadow","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"]),g=i(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua"]),h=i(["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","navy","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","overlay","overline","padding","padding-box","painted","paused","persian","plus-darker","plus-lighter","pointer","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","white","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small","yellow"]);return{startState:function(a){return{tokenize:k,baseIndent:a||0,stack:[]}},token:function(a,b){if(b.tokenize==k&&a.eatSpace())return null;var i=b.tokenize(a,b),j=b.stack[b.stack.length-1];return"property"==i?"propertyValue"==j?i=h[a.current()]?"string-2":g[a.current()]?"keyword":"variable-2":"rule"==j?f[a.current()]||(i+=" error"):j&&"@media{"!=j?"@media"==j?i=d[a.current()]?"attribute":/^(only|not)$/i.test(a.current())?"keyword":"and"==a.current().toLowerCase()?"error":e[a.current()]?"error":"attribute error":"@mediaType"==j?i=d[a.current()]?"attribute":"and"==a.current().toLowerCase()?"operator":/^(only|not)$/i.test(a.current())?"error":e[a.current()]?"error":"error":"@mediaType("==j?f[a.current()]||(d[a.current()]?i="error":"and"==a.current().toLowerCase()?i="operator":/^(only|not)$/i.test(a.current())?i="error":i+=" error"):i="error":i="tag":"atom"==i?j&&"@media{"!=j?"propertyValue"==j?/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(a.current())||(i+=" error"):i="error":i="builtin":"@media"==j&&"{"==c&&(i="error"),"{"==c?"@media"==j||"@mediaType"==j?(b.stack.pop(),b.stack[b.stack.length-1]="@media{"):b.stack.push("rule"):"}"==c?(b.stack.pop(),"propertyValue"==j&&b.stack.pop()):"@media"==c?b.stack.push("@media"):"@media"==j&&/\b(keyword|attribute)\b/.test(i)?b.stack.push("@mediaType"):"@mediaType"==j&&","==a.current()?b.stack.pop():"@mediaType"==j&&"("==c?b.stack.push("@mediaType("):"@mediaType("==j&&")"==c?b.stack.pop():"rule"==j&&":"==c?b.stack.push("propertyValue"):"propertyValue"==j&&";"==c&&b.stack.pop(),i},indent:function(a,c){var d=a.stack.length;return/^\}/.test(c)&&(d-="propertyValue"==a.stack[a.stack.length-1]?2:1),a.baseIndent+d*b},electricChars:"}"}}),CodeMirror.defineMIME("text/css","css"),CodeMirror.defineMode("diff",function(){var a={"+":"positive","-":"negative","@":"meta"};return{token:function(b){var c=b.string.search(/[\t ]+?$/);if(!b.sol()||0===c)return b.skipToEnd(),("error "+(a[b.string.charAt(0)]||"")).replace(/ $/,"");var d=a[b.peek()]||b.skipToEnd();return-1===c?b.skipToEnd():b.pos=c,d}}}),CodeMirror.defineMIME("text/x-diff","diff"),CodeMirror.defineMode("ecl",function(a){function b(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function c(a,b){return b.startOfLine?(a.skipToEnd(),"meta"):!1}function p(a,b){var c=a.next();if(l[c]){var d=l[c](a,b);if(d!==!1)return d}if('"'==c||"'"==c)return b.tokenize=q(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return o=c,null;if(/\d/.test(c))return a.eatWhile(/[\w\.]/),"number";if("/"==c){if(a.eat("*"))return b.tokenize=r,r(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(n.test(c))return a.eatWhile(n),"operator";a.eatWhile(/[\w\$_]/);var m=a.current().toLowerCase();if(e.propertyIsEnumerable(m))return j.propertyIsEnumerable(m)&&(o="newstatement"),"keyword";if(f.propertyIsEnumerable(m))return j.propertyIsEnumerable(m)&&(o="newstatement"),"variable";if(g.propertyIsEnumerable(m))return j.propertyIsEnumerable(m)&&(o="newstatement"),"variable-2";if(h.propertyIsEnumerable(m))return j.propertyIsEnumerable(m)&&(o="newstatement"),"variable-3";if(i.propertyIsEnumerable(m))return j.propertyIsEnumerable(m)&&(o="newstatement"),"builtin";for(var p=m.length-1;p>=0&&(!isNaN(m[p])||"_"==m[p]);)--p;if(p>0){var s=m.substr(0,p+1);if(h.propertyIsEnumerable(s))return j.propertyIsEnumerable(s)&&(o="newstatement"),"variable-3"}return k.propertyIsEnumerable(m)?"atom":null}function q(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&!m)&&(c.tokenize=p),"string"}}function r(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=p;break}c="*"==d}return"comment"}function s(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function t(a,b,c){return a.context=new s(a.indented,b,c,null,a.context)}function u(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var m,o,d=a.indentUnit,e=b("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"),f=b("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"),g=b("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"),h=b("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"),i=b("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"),j=b("catch class do else finally for if switch try while"),k=b("true false null"),l={"#":c},n=/[+\-*&%=<>!?|\/]/;return{startState:function(a){return{tokenize:null,context:new s((a||0)-d,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;o=null;var d=(b.tokenize||p)(a,b);if("comment"==d||"meta"==d)return d;if(null==c.align&&(c.align=!0),";"!=o&&":"!=o||"statement"!=c.type)if("{"==o)t(b,a.column(),"}");else if("["==o)t(b,a.column(),"]");else if("("==o)t(b,a.column(),")");else if("}"==o){for(;"statement"==c.type;)c=u(b);for("}"==c.type&&(c=u(b));"statement"==c.type;)c=u(b)}else o==c.type?u(b):("}"==c.type||"top"==c.type||"statement"==c.type&&"newstatement"==o)&&t(b,a.column(),"statement");else u(b);return b.startOfLine=!1,d},indent:function(a,b){if(a.tokenize!=p&&null!=a.tokenize)return 0;var c=a.context,e=b&&b.charAt(0);"statement"==c.type&&"}"==e&&(c=c.prev);var f=e==c.type;return"statement"==c.type?c.indented+("{"==e?0:d):c.align?c.column+(f?0:1):c.indented+(f?0:d)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-ecl","ecl"),CodeMirror.defineMIME("text/x-erlang","erlang"),CodeMirror.defineMode("erlang",function(a){function b(a,b,c){switch(a.context="record"==c?"record":!1,"whitespace"!=c&&"comment"!=c&&(a.lastToken=b.current()),c){case"atom":return"atom";case"attribute":return"attribute";case"builtin":return"builtin";case"comment":return"comment";case"fun":return"meta";case"function":return"tag";case"guard":return"property";case"keyword":return"keyword";case"macro":return"variable-2";case"number":return"number";case"operator":return"operator";case"record":return"bracket";case"string":return"string";case"type":return"def";case"variable":return"variable";case"error":return"error";case"separator":return null;case"open_paren":return null;case"close_paren":return null;default:return null}}function v(a,b){return b.indexOf(a)>-1}function w(a,b){var c=a.start,d=b.length;if(c>=d){var e=a.string.slice(c-d,c);return e==b}return!1}function x(a,l){if(a.eatSpace())return b(l,a,"whitespace");if((""==H(l).token||"."==H(l).token)&&"-"==a.peek()){if(a.next(),a.eat(m)&&a.eatWhile(q))return v(a.current(),c)?b(l,a,"type"):b(l,a,"attribute");a.backUp(1)}var x=a.next();if("%"==x)return a.skipToEnd(),b(l,a,"comment");if("?"==x)return a.eatWhile(q),b(l,a,"macro");if("#"==x)return a.eatWhile(q),b(l,a,"record");if("$"==x)return"\\"==a.next()&&(a.eatWhile(p)||a.next()),b(l,a,"string");if("'"==x)return B(a)?b(l,a,"atom"):b(l,a,"error");if('"'==x)return A(a)?b(l,a,"string"):b(l,a,"error");if(n.test(x))return a.eatWhile(q),b(l,a,"variable");if(m.test(x)){if(a.eatWhile(q),"/"==a.peek())return a.next(),a.eatWhile(o)?b(l,a,"fun"):(a.backUp(1),b(l,a,"atom"));var C=a.current();return v(C,d)?(I(l,a),b(l,a,"keyword")):"("==a.peek()?!v(C,k)||w(a,":")&&!w(a,"erlang:")?b(l,a,"function"):b(l,a,"builtin"):v(C,j)?b(l,a,"guard"):v(C,f)?b(l,a,"operator"):":"==a.peek()?"erlang"==C?b(l,a,"builtin"):b(l,a,"function"):b(l,a,"atom")}return o.test(x)?(a.eatWhile(o),a.eat("#")?a.eatWhile(o):(a.eat(".")&&a.eatWhile(o),a.eat(/[eE]/)&&(a.eat(/[-+]/),a.eatWhile(o))),b(l,a,"number")):y(a,s,h)?(I(l,a),b(l,a,"open_paren")):y(a,t,i)?(I(l,a),b(l,a,"close_paren")):z(a,u,e)?(0==l.context&&I(l,a),b(l,a,"separator")):z(a,r,g)?b(l,a,"operator"):b(l,a,null)}function y(a,b,c){if(1==a.current().length&&b.test(a.current())){for(a.backUp(1);b.test(a.peek());)if(a.next(),v(a.current(),c))return!0;a.backUp(a.current().length-1)}return!1}function z(a,b,c){if(1==a.current().length&&b.test(a.current())){for(;b.test(a.peek());)a.next();for(;a.current().length>0;){if(v(a.current(),c))return!0;a.backUp(1)}a.next()}return!1}function A(a){return C(a,'"',"\\")}function B(a){return C(a,"'","\\")}function C(a,b,c){for(;!a.eol();){var d=a.next();if(d==b)return!0;d==c&&a.next()}return!1}function D(a){this.token=a?a.current():"",this.column=a?a.column():0,this.indent=a?a.indentation():0}function E(b,c){var d=a.indentUnit,e=["after","catch"],f=H(b).token,g=F(c,/[^a-z]/);return v(f,h)?H(b).column+f.length:"."==f||""==f?0:"->"==f?"end"==g?H(b,2).column:"fun"==H(b,2).token?H(b,2).column+d:H(b).indent+d:v(g,e)?H(b).indent:H(b).column+d}function F(a,b){var c=a.match(b);return c?a.slice(0,c.index):a}function G(a){return a.tokenStack.pop()}function H(a,b){var c=a.tokenStack.length,d=b?b:1;return d>c?new D:a.tokenStack[c-d]}function I(a,b){var c=b.current(),d=H(a).token;return v(c,l)?!1:K(d,c)?(G(a),!1):J(d,c)?(G(a),I(a,b)):(a.tokenStack.push(new D(b)),!0)}function J(a,b){switch(a+" "+b){case"when ->":return!0;case"-> end":return!0;case"-> .":return!0;case". .":return!0;default:return!1}}function K(a,b){switch(a+" "+b){case"( )":return!0;case"[ ]":return!0;case"{ }":return!0;case"<< >>":return!0;case"begin end":return!0;case"case end":return!0;case"fun end":return!0;case"if end":return!0;case"receive end":return!0;case"try end":return!0;case"-> ;":return!0;default:return!1}}var c=["-type","-spec","-export_type","-opaque"],d=["after","begin","catch","case","cond","end","fun","if","let","of","query","receive","try","when"],e=["->",";",":",".",","],f=["and","andalso","band","bnot","bor","bsl","bsr","bxor","div","not","or","orelse","rem","xor"],g=["+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-"],h=["<<","(","[","{"],i=["}","]",")",">>"],j=["is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_record","is_reference","is_tuple","atom","binary","bitstring","boolean","function","integer","list","number","pid","port","record","reference","tuple"],k=["abs","adler32","adler32_combine","alive","apply","atom_to_binary","atom_to_list","binary_to_atom","binary_to_existing_atom","binary_to_list","binary_to_term","bit_size","bitstring_to_list","byte_size","check_process_code","contact_binary","crc32","crc32_combine","date","decode_packet","delete_module","disconnect_node","element","erase","exit","float","float_to_list","garbage_collect","get","get_keys","group_leader","halt","hd","integer_to_list","internal_bif","iolist_size","iolist_to_binary","is_alive","is_atom","is_binary","is_bitstring","is_boolean","is_float","is_function","is_integer","is_list","is_number","is_pid","is_port","is_process_alive","is_record","is_reference","is_tuple","length","link","list_to_atom","list_to_binary","list_to_bitstring","list_to_existing_atom","list_to_float","list_to_integer","list_to_pid","list_to_tuple","load_module","make_ref","module_loaded","monitor_node","node","node_link","node_unlink","nodes","notalive","now","open_port","pid_to_list","port_close","port_command","port_connect","port_control","pre_loaded","process_flag","process_info","processes","purge_module","put","register","registered","round","self","setelement","size","spawn","spawn_link","spawn_monitor","spawn_opt","split_binary","statistics","term_to_binary","time","throw","tl","trunc","tuple_size","tuple_to_list","unlink","unregister","whereis"],l=[",",":","catch","after","of","cond","let","query"],m=/[a-z_]/,n=/[A-Z_]/,o=/[0-9]/,p=/[0-7]/,q=/[a-z_A-Z0-9]/,r=/[\+\-\*\/<>=\|:]/,s=/[<\(\[\{]/,t=/[>\)\]\}]/,u=/[\->\.,:;]/;
return{startState:function(){return{tokenStack:[],context:!1,lastToken:null}},token:function(a,b){return x(a,b)},indent:function(a,b){return E(a,b)}}}),CodeMirror.defineMode("gfm",function(a){function c(a){return a.code=!1,null}var b=0,d={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(a){return{code:a.code,codeBlock:a.codeBlock,ateSpace:a.ateSpace}},token:function(a,c){if(c.codeBlock)return a.match(/^```/)?(c.codeBlock=!1,null):(a.skipToEnd(),null);if(a.sol()&&(c.code=!1),a.sol()&&a.match(/^```/))return a.skipToEnd(),c.codeBlock=!0,null;if("`"===a.peek()){a.next();var d=a.pos;a.eatWhile("`");var e=1+a.pos-d;return c.code?e===b&&(c.code=!1):(b=e,c.code=!0),null}if(c.code)return a.next(),null;if(a.eatSpace())return c.ateSpace=!0,null;if(a.sol()||c.ateSpace){if(c.ateSpace=!1,a.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/))return"link";if(a.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return"link"}return a.match(/^((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/i)?"link":(a.next(),null)},blankLine:c};return CodeMirror.defineMIME("gfmBase",{name:"markdown",underscoresBreakWords:!1,fencedCodeBlocks:!0}),CodeMirror.overlayMode(CodeMirror.getMode(a,"gfmBase"),d)},"markdown"),CodeMirror.defineMode("go",function(a){function g(a,b){var g=a.next();if('"'==g||"'"==g||"`"==g)return b.tokenize=h(g),b.tokenize(a,b);if(/[\d\.]/.test(g))return"."==g?a.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):"0"==g?a.match(/^[xX][0-9a-fA-F]+/)||a.match(/^0[0-7]+/):a.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),"number";if(/[\[\]{}\(\),;\:\.]/.test(g))return f=g,null;if("/"==g){if(a.eat("*"))return b.tokenize=i,i(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(e.test(g))return a.eatWhile(e),"operator";a.eatWhile(/[\w\$_]/);var j=a.current();return c.propertyIsEnumerable(j)?(("case"==j||"default"==j)&&(f="case"),"keyword"):d.propertyIsEnumerable(j)?"atom":"variable"}function h(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&"`"!=a)&&(c.tokenize=g),"string"}}function i(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=g;break}c="*"==d}return"comment"}function j(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function k(a,b,c){return a.context=new j(a.indented,b,c,null,a.context)}function l(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var f,b=a.indentUnit,c={"break":!0,"case":!0,chan:!0,"const":!0,"continue":!0,"default":!0,defer:!0,"else":!0,fallthrough:!0,"for":!0,func:!0,go:!0,"goto":!0,"if":!0,"import":!0,"interface":!0,map:!0,"package":!0,range:!0,"return":!0,select:!0,struct:!0,"switch":!0,type:!0,"var":!0,bool:!0,"byte":!0,complex64:!0,complex128:!0,float32:!0,float64:!0,int8:!0,int16:!0,int32:!0,int64:!0,string:!0,uint8:!0,uint16:!0,uint32:!0,uint64:!0,"int":!0,uint:!0,uintptr:!0},d={"true":!0,"false":!0,iota:!0,nil:!0,append:!0,cap:!0,close:!0,complex:!0,copy:!0,imag:!0,len:!0,make:!0,"new":!0,panic:!0,print:!0,println:!0,real:!0,recover:!0},e=/[+\-*&^%:=<>!|\/]/;return{startState:function(a){return{tokenize:null,context:new j((a||0)-b,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0,"case"==c.type&&(c.type="}")),a.eatSpace())return null;f=null;var d=(b.tokenize||g)(a,b);return"comment"==d?d:(null==c.align&&(c.align=!0),"{"==f?k(b,a.column(),"}"):"["==f?k(b,a.column(),"]"):"("==f?k(b,a.column(),")"):"case"==f?c.type="case":"}"==f&&"}"==c.type?c=l(b):f==c.type&&l(b),b.startOfLine=!1,d)},indent:function(a,c){if(a.tokenize!=g&&null!=a.tokenize)return 0;var d=a.context,e=c&&c.charAt(0);if("case"==d.type&&/^(?:case|default)\b/.test(c))return a.context.type="}",d.indented;var f=e==d.type;return d.align?d.column+(f?0:1):d.indented+(f?0:b)},electricChars:"{}:"}}),CodeMirror.defineMIME("text/x-go","go"),CodeMirror.defineMode("groovy",function(a){function b(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function g(a,b){var g=a.next();if('"'==g||"'"==g)return h(g,a,b);if(/[\[\]{}\(\),;\:\.]/.test(g))return f=g,null;if(/\d/.test(g))return a.eatWhile(/[\w\.]/),a.eat(/eE/)&&(a.eat(/\+\-/),a.eatWhile(/\d/)),"number";if("/"==g){if(a.eat("*"))return b.tokenize.push(j),j(a,b);if(a.eat("/"))return a.skipToEnd(),"comment";if(k(b.lastToken))return h(g,a,b)}if("-"==g&&a.eat(">"))return f="->",null;if(/[+\-*&%=<>!?|\/~]/.test(g))return a.eatWhile(/[+\-*&%=<>|~]/),"operator";if(a.eatWhile(/[\w\$_]/),"@"==g)return a.eatWhile(/[\w\$_\.]/),"meta";if("."==b.lastToken)return"property";if(a.eat(":"))return f="proplabel","property";var i=a.current();return e.propertyIsEnumerable(i)?"atom":c.propertyIsEnumerable(i)?(d.propertyIsEnumerable(i)&&(f="newstatement"),"keyword"):"variable"}function h(a,b,c){function e(b,c){for(var f,e=!1,g=!d;null!=(f=b.next());){if(f==a&&!e){if(!d)break;if(b.match(a+a)){g=!0;break}}if('"'==a&&"$"==f&&!e&&b.eat("{"))return c.tokenize.push(i()),"string";e=!e&&"\\"==f}return g&&c.tokenize.pop(),"string"}var d=!1;if("/"!=a&&b.eat(a)){if(!b.eat(a))return"string";d=!0}return c.tokenize.push(e),e(b,c)}function i(){function b(b,c){if("}"==b.peek()){if(a--,0==a)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)}else"{"==b.peek()&&a++;return g(b,c)}var a=1;return b.isBase=!0,b}function j(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize.pop();break}c="*"==d}return"comment"}function k(a){return!a||"operator"==a||"->"==a||/[\.\[\{\(,;:]/.test(a)||"newstatement"==a||"keyword"==a||"proplabel"==a}function l(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function m(a,b,c){return a.context=new l(a.indented,b,c,null,a.context)}function n(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var f,c=b("abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws transient try void volatile while"),d=b("catch class do else finally for if switch try while enum interface def"),e=b("null true false this");return g.isBase=!0,{startState:function(b){return{tokenize:[g],context:new l((b||0)-a.indentUnit,0,"top",!1),indented:0,startOfLine:!0,lastToken:null}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0,"statement"!=c.type||k(b.lastToken)||(n(b),c=b.context)),a.eatSpace())return null;f=null;var d=b.tokenize[b.tokenize.length-1](a,b);if("comment"==d)return d;if(null==c.align&&(c.align=!0),";"!=f&&":"!=f||"statement"!=c.type)if("->"==f&&"statement"==c.type&&"}"==c.prev.type)n(b),b.context.align=!1;else if("{"==f)m(b,a.column(),"}");else if("["==f)m(b,a.column(),"]");else if("("==f)m(b,a.column(),")");else if("}"==f){for(;"statement"==c.type;)c=n(b);for("}"==c.type&&(c=n(b));"statement"==c.type;)c=n(b)}else f==c.type?n(b):("}"==c.type||"top"==c.type||"statement"==c.type&&"newstatement"==f)&&m(b,a.column(),"statement");else n(b);return b.startOfLine=!1,b.lastToken=f||d,d},indent:function(b,c){if(!b.tokenize[b.tokenize.length-1].isBase)return 0;var d=c&&c.charAt(0),e=b.context;"statement"!=e.type||k(b.lastToken)||(e=e.prev);var f=d==e.type;return"statement"==e.type?e.indented+("{"==d?0:a.indentUnit):e.align?e.column+(f?0:1):e.indented+(f?0:a.indentUnit)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-groovy","groovy"),CodeMirror.defineMode("haskell",function(){function a(a,b,c){return b(c),c(a,b)}function k(k,n){if(k.eatWhile(j))return null;var o=k.next();if(i.test(o)){if("{"==o&&k.eat("-")){var p="comment";return k.eat("#")&&(p="meta"),a(k,n,l(p,1))}return null}if("'"==o)return k.eat("\\")?k.next():k.next(),k.eat("'")?"string":"error";if('"'==o)return a(k,n,m);if(c.test(o))return k.eatWhile(g),k.eat(".")?"qualifier":"variable-2";if(b.test(o))return k.eatWhile(g),"variable";if(d.test(o)){if("0"==o){if(k.eat(/[xX]/))return k.eatWhile(e),"integer";if(k.eat(/[oO]/))return k.eatWhile(f),"number"}k.eatWhile(d);var p="number";return k.eat(".")&&(p="number",k.eatWhile(d)),k.eat(/[eE]/)&&(p="number",k.eat(/[-+]/),k.eatWhile(d)),p}if(h.test(o)){if("-"==o&&k.eat(/-/)&&(k.eatWhile(/-/),!k.eat(h)))return k.skipToEnd(),"comment";var p="variable";return":"==o&&(p="variable-2"),k.eatWhile(h),p}return"error"}function l(a,b){return 0==b?k:function(c,d){for(var e=b;!c.eol();){var f=c.next();if("{"==f&&c.eat("-"))++e;else if("-"==f&&c.eat("}")&&(--e,0==e))return d(k),a}return d(l(a,e)),a}}function m(a,b){for(;!a.eol();){var c=a.next();if('"'==c)return b(k),"string";if("\\"==c){if(a.eol()||a.eat(j))return b(n),"string";a.eat("&")||a.next()}}return b(k),"error"}function n(b,c){return b.eat("\\")?a(b,c,m):(b.next(),c(k),"error")}var b=/[a-z_]/,c=/[A-Z]/,d=/[0-9]/,e=/[0-9A-Fa-f]/,f=/[0-7]/,g=/[a-z_A-Z0-9']/,h=/[-!#$%&*+.\/<=>?@\\^|~:]/,i=/[(),;[\]`{}]/,j=/[ \t\v\f]/,o=function(){function b(b){return function(){for(var c=0;arguments.length>c;c++)a[arguments[c]]=b}}var a={};return b("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_"),b("keyword")("..",":","::","=","\\",'"',"<-","->","@","~","=>"),b("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<=","=<<","==",">",">=",">>",">>=","^","^^","||","*","**"),b("builtin")("Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True"),b("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3"),a}();return{startState:function(){return{f:k}},copyState:function(a){return{f:a.f}},token:function(a,b){var c=b.f(a,function(a){b.f=a}),d=a.current();return d in o?o[d]:c}}}),CodeMirror.defineMIME("text/x-haskell","haskell"),CodeMirror.defineMode("haxe",function(a,b){function f(a,b,c){return b.tokenize=c,c(a,b)}function g(a,b){for(var d,c=!1;null!=(d=a.next());){if(d==b&&!c)return!1;c=!c&&"\\"==d}return c}function j(a,b,c){return h=a,i=c,b}function k(a,b){var c=a.next();if('"'==c||"'"==c)return f(a,b,l(c));if(/[\[\]{}\(\),;\:\.]/.test(c))return j(c);if("0"==c&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),j("number","number");if(/\d/.test(c)||"-"==c&&a.eat(/\d/))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),j("number","number");if(b.reAllowed&&"~"==c&&a.eat(/\//))return g(a,"/"),a.eatWhile(/[gimsu]/),j("regexp","string-2");if("/"==c)return a.eat("*")?f(a,b,m):a.eat("/")?(a.skipToEnd(),j("comment","comment")):(a.eatWhile(e),j("operator",null,a.current()));if("#"==c)return a.skipToEnd(),j("conditional","meta");if("@"==c)return a.eat(/:/),a.eatWhile(/[\w_]/),j("metadata","meta");if(e.test(c))return a.eatWhile(e),j("operator",null,a.current());var h;if(/[A-Z]/.test(c))return a.eatWhile(/[\w_<>]/),h=a.current(),j("type","variable-3",h);a.eatWhile(/[\w_]/);var h=a.current(),i=d.propertyIsEnumerable(h)&&d[h];return i&&b.kwAllowed?j(i.type,i.style,h):j("variable","variable",h)}function l(a){return function(b,c){return g(b,a)||(c.tokenize=k),j("string","string")}}function m(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=k;break}c="*"==d}return j("comment","comment")}function o(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function p(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0}function q(a,b,c,d,e){var f=a.cc;for(t.state=a,t.stream=e,t.marked=null,t.cc=f,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var g=f.length?f.pop():D;if(g(c,d)){for(;f.length&&f[f.length-1].lex;)f.pop()();return t.marked?t.marked:"variable"==c&&p(a,d)?"variable-2":"variable"==c&&r(a,d)?"variable-3":b}}}function r(a,b){if(/[a-z]/.test(b.charAt(0)))return!1;for(var c=a.importedtypes.length,d=0;c>d;d++)if(a.importedtypes[d]==b)return!0}function s(a){for(var b=t.state,c=b.importedtypes;c;c=c.next)if(c.name==a)return;b.importedtypes={name:a,next:b.importedtypes}}function u(){for(var a=arguments.length-1;a>=0;a--)t.cc.push(arguments[a])}function v(){return u.apply(null,arguments),!0}function w(a){var b=t.state;if(b.context){t.marked="def";for(var c=b.localVars;c;c=c.next)if(c.name==a)return;b.localVars={name:a,next:b.localVars}}}function y(){t.state.context||(t.state.localVars=x),t.state.context={prev:t.state.context,vars:t.state.localVars}}function z(){t.state.localVars=t.state.context.vars,t.state.context=t.state.context.prev}function A(a,b){var c=function(){var c=t.state;c.lexical=new o(c.indented,t.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function B(){var a=t.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function C(a){return function(b){return b==a?v():";"==a?u():v(arguments.callee)}}function D(a){return"@"==a?v(I):"var"==a?v(A("vardef"),R,C(";"),B):"keyword a"==a?v(A("form"),E,D,B):"keyword b"==a?v(A("form"),D,B):"{"==a?v(A("}"),y,Q,B,z):";"==a?v():"attribute"==a?v(H):"function"==a?v(V):"for"==a?v(A("form"),C("("),A(")"),T,C(")"),B,D,B):"variable"==a?v(A("stat"),M):"switch"==a?v(A("form"),E,A("}","switch"),C("{"),Q,B,B):"case"==a?v(E,C(":")):"default"==a?v(C(":")):"catch"==a?v(A("form"),y,C("("),Z,C(")"),D,B,z):"import"==a?v(K,C(";")):"typedef"==a?v(L):u(A("stat"),E,C(";"),B)}function E(a){return n.hasOwnProperty(a)?v(G):"function"==a?v(V):"keyword c"==a?v(F):"("==a?v(A(")"),F,C(")"),B,G):"operator"==a?v(E):"["==a?v(A("]"),P(E,"]"),B,G):"{"==a?v(A("}"),P(O,"}"),B,G):v()}function F(a){return a.match(/[;\}\)\],]/)?u():u(E)}function G(a,b){if("operator"==a&&/\+\+|--/.test(b))return v(G);if("operator"==a||":"==a)return v(E);if(";"!=a)return"("==a?v(A(")"),P(E,")"),B,G):"."==a?v(N,G):"["==a?v(A("]"),E,C("]"),B,G):void 0}function H(a){return"attribute"==a?v(H):"function"==a?v(V):"var"==a?v(R):void 0}function I(a){return":"==a?v(I):"variable"==a?v(I):"("==a?v(A(")"),comasep(J,")"),B,D):void 0}function J(a){return"variable"==a?v():void 0}function K(a,b){return"variable"==a&&/[A-Z]/.test(b.charAt(0))?(s(b),v()):"variable"==a||"property"==a||"."==a?v(K):void 0}function L(a,b){return"variable"==a&&/[A-Z]/.test(b.charAt(0))?(s(b),v()):void 0}function M(a){return":"==a?v(B,D):u(G,C(";"),B)}function N(a){return"variable"==a?(t.marked="property",v()):void 0}function O(a){return"variable"==a&&(t.marked="property"),n.hasOwnProperty(a)?v(C(":"),E):void 0}function P(a,b){function c(d){return","==d?v(a,c):d==b?v():v(C(b))}return function(d){return d==b?v():u(a,c)}}function Q(a){return"}"==a?v():u(D,Q)}function R(a,b){return"variable"==a?(w(b),v(W,S)):v()}function S(a,b){return"="==b?v(E,S):","==a?v(R):void 0}function T(a,b){return"variable"==a&&w(b),v(A(")"),y,U,E,B,D,z)}function U(a,b){return"in"==b?v():void 0}function V(a,b){return"variable"==a?(w(b),v(V)):"new"==b?v(V):"("==a?v(A(")"),y,P(Z,")"),B,W,D,z):void 0}function W(a){return":"==a?v(X):void 0}function X(a){return"type"==a?v():"variable"==a?v():"{"==a?v(A("}"),P(Y,"}"),B):void 0}function Y(a){return"variable"==a?v(W):void 0}function Z(a,b){return"variable"==a?(w(b),v(W)):void 0}var h,i,c=a.indentUnit,d=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={type:"attribute",style:"attribute"},h=a("typedef");return{"if":b,"while":b,"else":c,"do":c,"try":c,"return":d,"break":d,"continue":d,"new":d,"throw":d,"var":a("var"),inline:g,"static":g,using:a("import"),"public":g,"private":g,cast:a("cast"),"import":a("import"),macro:a("macro"),"function":a("function"),"catch":a("catch"),untyped:a("untyped"),callback:a("cb"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":e,never:a("property_access"),trace:a("trace"),"class":h,"enum":h,"interface":h,typedef:h,"extends":h,"implements":h,dynamic:h,"true":f,"false":f,"null":f}}(),e=/[+\-*&%=<>!?|]/,n={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},t={state:null,column:null,marked:null,cc:null},x={name:"this",next:null};return B.lex=!0,{startState:function(a){var d=["Int","Float","String","Void","Std","Bool","Dynamic","Array"];return{tokenize:k,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new o((a||0)-c,0,"block",!1),localVars:b.localVars,importedtypes:d,context:b.localVars&&{vars:b.localVars},indented:0}},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==h?c:(b.reAllowed=!("operator"!=h&&"keyword c"!=h&&!h.match(/^[\[{}\(,;:]$/)),b.kwAllowed="."!=h,q(b,c,h,i,a))},indent:function(a,b){if(a.tokenize!=k)return 0;var d=b&&b.charAt(0),e=a.lexical;"stat"==e.type&&"}"==d&&(e=e.prev);var f=e.type,g=d==f;return"vardef"==f?e.indented+4:"form"==f&&"{"==d?e.indented:"stat"==f||"form"==f?e.indented+c:"switch"!=e.info||g?e.align?e.column+(g?0:1):e.indented+(g?0:c):e.indented+(/^(?:case|default)\b/.test(b)?c:2*c)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-haxe","haxe"),CodeMirror.defineMode("htmlembedded",function(a,b){function g(a,b){return a.match(c,!1)?(b.token=h,e.token(a,b.scriptState)):f.token(a,b.htmlState)}function h(a,b){return a.match(d,!1)?(b.token=g,f.token(a,b.htmlState)):e.token(a,b.scriptState)}var e,f,c=b.scriptStartRegex||/^<%/i,d=b.scriptEndRegex||/^%>/i;return{startState:function(){return e=e||CodeMirror.getMode(a,b.scriptingModeSpec),f=f||CodeMirror.getMode(a,"htmlmixed"),{token:b.startOpen?h:g,htmlState:CodeMirror.startState(f),scriptState:CodeMirror.startState(e)}},token:function(a,b){return b.token(a,b)},indent:function(a,b){return a.token==g?f.indent(a.htmlState,b):e.indent?e.indent(a.scriptState,b):void 0},copyState:function(a){return{token:a.token,htmlState:CodeMirror.copyState(f,a.htmlState),scriptState:CodeMirror.copyState(e,a.scriptState)}},electricChars:"/{}:",innerMode:function(a){return a.token==h?{state:a.scriptState,mode:e}:{state:a.htmlState,mode:f}}}},"htmlmixed"),CodeMirror.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"}),CodeMirror.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"}),CodeMirror.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"}),CodeMirror.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"}),CodeMirror.defineMode("htmlmixed",function(a){function e(a,e){var f=b.token(a,e.htmlState);return/(?:^|\s)tag(?:\s|$)/.test(f)&&">"==a.current()&&e.htmlState.context&&(/^script$/i.test(e.htmlState.context.tagName)?(e.token=g,e.localState=c.startState(b.indent(e.htmlState,""))):/^style$/i.test(e.htmlState.context.tagName)&&(e.token=h,e.localState=d.startState(b.indent(e.htmlState,"")))),f}function f(a,b,c){var f,d=a.current(),e=d.search(b);return e>-1?a.backUp(d.length-e):(f=d.match(/<\/?$/))&&(a.backUp(d.length),a.match(b,!1)||a.match(d[0])),c}function g(a,b){return a.match(/^<\/\s*script\s*>/i,!1)?(b.token=e,b.localState=null,e(a,b)):f(a,/<\/\s*script\s*>/,c.token(a,b.localState))}function h(a,b){return a.match(/^<\/\s*style\s*>/i,!1)?(b.token=e,b.localState=null,e(a,b)):f(a,/<\/\s*style\s*>/,d.token(a,b.localState))}var b=CodeMirror.getMode(a,{name:"xml",htmlMode:!0}),c=CodeMirror.getMode(a,"javascript"),d=CodeMirror.getMode(a,"css");return{startState:function(){var a=b.startState();return{token:e,localState:null,mode:"html",htmlState:a}},copyState:function(a){if(a.localState)var e=CodeMirror.copyState(a.token==h?d:c,a.localState);return{token:a.token,localState:e,mode:a.mode,htmlState:CodeMirror.copyState(b,a.htmlState)}},token:function(a,b){return b.token(a,b)},indent:function(a,f){return a.token==e||/^\s*<\//.test(f)?b.indent(a.htmlState,f):a.token==g?c.indent(a.localState,f):d.indent(a.localState,f)},electricChars:"/{}:",innerMode:function(a){var f=a.token==e?b:a.token==g?c:d;return{state:a.localState||a.htmlState,mode:f}}}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed"),CodeMirror.defineMode("http",function(){function a(a,b){return a.skipToEnd(),b.cur=g,"error"}function b(b,d){return b.match(/^HTTP\/\d\.\d/)?(d.cur=c,"keyword"):b.match(/^[A-Z]+/)&&/[ \t]/.test(b.peek())?(d.cur=e,"keyword"):a(b,d)}function c(b,c){var e=b.match(/^\d+/);if(!e)return a(b,c);c.cur=d;var f=Number(e[0]);return f>=100&&200>f?"positive informational":f>=200&&300>f?"positive success":f>=300&&400>f?"positive redirect":f>=400&&500>f?"negative client-error":f>=500&&600>f?"negative server-error":"error"}function d(a,b){return a.skipToEnd(),b.cur=g,null}function e(a,b){return a.eatWhile(/\S/),b.cur=f,"string-2"}function f(b,c){return b.match(/^HTTP\/\d\.\d$/)?(c.cur=g,"keyword"):a(b,c)}function g(a){return a.sol()&&!a.eat(/[ \t]/)?a.match(/^.*?:/)?"atom":(a.skipToEnd(),"error"):(a.skipToEnd(),"string")}function h(a){return a.skipToEnd(),null}return{token:function(a,b){var c=b.cur;return c!=g&&c!=h&&a.eatSpace()?null:c(a,b)},blankLine:function(a){a.cur=h},startState:function(){return{cur:b}}}}),CodeMirror.defineMIME("message/http","http"),CodeMirror.defineMode("javascript",function(a,b){function h(a,b,c){return b.tokenize=c,c(a,b)}function i(a,b){for(var d,c=!1;null!=(d=a.next());){if(d==b&&!c)return!1;c=!c&&"\\"==d}return c}function l(a,b,c){return j=a,k=c,b}function m(a,b){var c=a.next();if('"'==c||"'"==c)return h(a,b,n(c));if(/[\[\]{}\(\),;\:\.]/.test(c))return l(c);if("0"==c&&a.eat(/x/i))return a.eatWhile(/[\da-f]/i),l("number","number");if(/\d/.test(c)||"-"==c&&a.eat(/\d/))return a.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),l("number","number");if("/"==c)return a.eat("*")?h(a,b,o):a.eat("/")?(a.skipToEnd(),l("comment","comment")):"operator"==b.lastType||"keyword c"==b.lastType||/^[\[{}\(,;:]$/.test(b.lastType)?(i(a,"/"),a.eatWhile(/[gimy]/),l("regexp","string-2")):(a.eatWhile(g),l("operator",null,a.current()));if("#"==c)return a.skipToEnd(),l("error","error");if(g.test(c))return a.eatWhile(g),l("operator",null,a.current());a.eatWhile(/[\w\$_]/);var d=a.current(),e=f.propertyIsEnumerable(d)&&f[d];return e&&"."!=b.lastType?l(e.type,e.style,d):l("variable","variable",d)}function n(a){return function(b,c){return i(b,a)||(c.tokenize=m),l("string","string")}}function o(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=m;break}c="*"==d}return l("comment","comment")}function q(a,b,c,d,e,f){this.indented=a,this.column=b,this.type=c,this.prev=e,this.info=f,null!=d&&(this.align=d)}function r(a,b){for(var c=a.localVars;c;c=c.next)if(c.name==b)return!0}function s(a,b,c,e,f){var g=a.cc;for(t.state=a,t.stream=f,t.marked=null,t.cc=g,a.lexical.hasOwnProperty("align")||(a.lexical.align=!0);;){var h=g.length?g.pop():d?E:D;if(h(c,e)){for(;g.length&&g[g.length-1].lex;)g.pop()();return t.marked?t.marked:"variable"==c&&r(a,e)?"variable-2":b}}}function u(){for(var a=arguments.length-1;a>=0;a--)t.cc.push(arguments[a])}function v(){return u.apply(null,arguments),!0}function w(a){var b=t.state;if(b.context){t.marked="def";for(var c=b.localVars;c;c=c.next)if(c.name==a)return;b.localVars={name:a,next:b.localVars}}}function y(){t.state.context={prev:t.state.context,vars:t.state.localVars},t.state.localVars=x}function z(){t.state.localVars=t.state.context.vars,t.state.context=t.state.context.prev}function A(a,b){var c=function(){var c=t.state;c.lexical=new q(c.indented,t.stream.column(),a,null,c.lexical,b)};return c.lex=!0,c}function B(){var a=t.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function C(a){return function(b){return b==a?v():";"==a?u():v(arguments.callee)}}function D(a){return"var"==a?v(A("vardef"),O,C(";"),B):"keyword a"==a?v(A("form"),E,D,B):"keyword b"==a?v(A("form"),D,B):"{"==a?v(A("}"),L,B):";"==a?v():"function"==a?v(U):"for"==a?v(A("form"),C("("),A(")"),Q,C(")"),B,D,B):"variable"==a?v(A("stat"),H):"switch"==a?v(A("form"),E,A("}","switch"),C("{"),L,B,B):"case"==a?v(E,C(":")):"default"==a?v(C(":")):"catch"==a?v(A("form"),y,C("("),V,C(")"),D,B,z):u(A("stat"),E,C(";"),B)}function E(a){return p.hasOwnProperty(a)?v(G):"function"==a?v(U):"keyword c"==a?v(F):"("==a?v(A(")"),F,C(")"),B,G):"operator"==a?v(E):"["==a?v(A("]"),K(E,"]"),B,G):"{"==a?v(A("}"),K(J,"}"),B,G):v()}function F(a){return a.match(/[;\}\)\],]/)?u():u(E)}function G(a,b){if("operator"==a&&/\+\+|--/.test(b))return v(G);if("operator"==a&&"?"==b)return v(E,C(":"),E);if(";"!=a)return"("==a?v(A(")"),K(E,")"),B,G):"."==a?v(I,G):"["==a?v(A("]"),E,C("]"),B,G):void 0}function H(a){return":"==a?v(B,D):u(G,C(";"),B)}function I(a){return"variable"==a?(t.marked="property",v()):void 0}function J(a){return"variable"==a&&(t.marked="property"),p.hasOwnProperty(a)?v(C(":"),E):void 0}function K(a,b){function c(d){return","==d?v(a,c):d==b?v():v(C(b))}return function(d){return d==b?v():u(a,c)}}function L(a){return"}"==a?v():u(D,L)}function M(a){return":"==a?v(N):u()}function N(a){return"variable"==a?(t.marked="variable-3",v()):u()}function O(a,b){return"variable"==a?(w(b),e?v(M,P):v(P)):u()}function P(a,b){return"="==b?v(E,P):","==a?v(O):void 0}function Q(a){return"var"==a?v(O,C(";"),S):";"==a?v(S):"variable"==a?v(R):v(S)}function R(a,b){return"in"==b?v(E):v(G,S)}function S(a,b){return";"==a?v(T):"in"==b?v(E):v(E,C(";"),T)}function T(a){")"!=a&&v(E)}function U(a,b){return"variable"==a?(w(b),v(U)):"("==a?v(A(")"),y,K(V,")"),B,D,z):void 0}function V(a,b){return"variable"==a?(w(b),e?v(M):v()):void 0}var j,k,c=a.indentUnit,d=b.json,e=b.typescript,f=function(){function a(a){return{type:a,style:"keyword"}}var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),f=a("operator"),g={type:"atom",style:"atom"},h={"if":b,"while":b,"with":b,"else":c,"do":c,"try":c,"finally":c,"return":d,"break":d,"continue":d,"new":d,"delete":d,"throw":d,"var":a("var"),"const":a("var"),let:a("var"),"function":a("function"),"catch":a("catch"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":f,"typeof":f,"instanceof":f,"true":g,"false":g,"null":g,undefined:g,NaN:g,Infinity:g};if(e){var i={type:"variable",style:"variable-3"},j={"interface":a("interface"),"class":a("class"),"extends":a("extends"),constructor:a("constructor"),"public":a("public"),"private":a("private"),"protected":a("protected"),"static":a("static"),"super":a("super"),string:i,number:i,bool:i,any:i};for(var k in j)h[k]=j[k]}return h}(),g=/[+\-*&%=<>!?|]/,p={atom:!0,number:!0,variable:!0,string:!0,regexp:!0},t={state:null,column:null,marked:null,cc:null},x={name:"this",next:{name:"arguments"}};return B.lex=!0,{startState:function(a){return{tokenize:m,lastType:null,cc:[],lexical:new q((a||0)-c,0,"block",!1),localVars:b.localVars,context:b.localVars&&{vars:b.localVars},indented:0}},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);return"comment"==j?c:(b.lastType=j,s(b,c,j,k,a))},indent:function(a,b){if(a.tokenize==o)return CodeMirror.Pass;if(a.tokenize!=m)return 0;var d=b&&b.charAt(0),e=a.lexical;"stat"==e.type&&"}"==d&&(e=e.prev);var f=e.type,g=d==f;return"vardef"==f?e.indented+("operator"==a.lastType||","==a.lastType?4:0):"form"==f&&"{"==d?e.indented:"form"==f?e.indented+c:"stat"==f?e.indented+("operator"==a.lastType||","==a.lastType?c:0):"switch"!=e.info||g?e.align?e.column+(g?0:1):e.indented+(g?0:c):e.indented+(/^(?:case|default)\b/.test(b)?c:2*c)},electricChars:":{}",jsonMode:d}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMode("jinja2",function(){function b(a,b){var d=a.next();return"{"==d&&(d=a.eat(/\{|%|#/))?(a.eat("-"),b.tokenize=c(d),"tag"):void 0}function c(c){return"{"==c&&(c="}"),function(d,e){var f=d.next();return(f==c||"-"==f&&d.eat(c))&&d.eat("}")?(e.tokenize=b,"tag"):d.match(a)?"keyword":"#"==c?"comment":"string"}}var a=["block","endblock","for","endfor","in","true","false","loop","none","self","super","if","as","not","and","else","import","with","without","context"];return a=RegExp("^(("+a.join(")|(")+"))\\b"),{startState:function(){return{tokenize:b}},token:function(a,b){return b.tokenize(a,b)}}}),CodeMirror.defineMode("less",function(a){function d(a,b){return c=b,a}function f(a){for(var b=0;e.length>b;b++)if(a===e[b])return!0}function h(a,b){var e=a.next();if("@"==e)return a.eatWhile(/[\w\-]/),d("meta",a.current());if("/"==e&&a.eat("*"))return b.tokenize=j,j(a,b);if("<"==e&&a.eat("!"))return b.tokenize=k,k(a,b);if("="==e)d(null,"compare");else{if("|"==e&&a.eat("="))return d(null,"compare");if('"'==e||"'"==e)return b.tokenize=l(e),b.tokenize(a,b);if("/"==e){if(a.eat("/"))return b.tokenize=i,i(a,b);if("string"==c||"("==c)return d("string","string");if(void 0!=b.stack[b.stack.length-1])return d(null,e);if(a.eatWhile(/[\a-zA-Z0-9\-_.\s]/),/\/|\)|#/.test(a.peek()||a.eatSpace()&&")"==a.peek())||a.eol())return d("string","string")}else{if("!"==e)return a.match(/^\s*\w*/),d("keyword","important");if(/\d/.test(e))return a.eatWhile(/[\w.%]/),d("number","unit");if(/[,+<>*\/]/.test(e))return"="==a.peek()||"a"==c?d("string","string"):d(null,"select-op");if(!/[;{}:\[\]()~\|]/.test(e)){if("."==e)return"("==c||"string"==c?d("string","string"):(a.eatWhile(/[\a-zA-Z0-9\-_]/)," "==a.peek()&&a.eatSpace(),")"==a.peek()?d("number","unit"):d("tag","tag"));if("#"==e)return a.eatWhile(/[A-Za-z0-9]/),4==a.current().length||7==a.current().length?null!=a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,!1)?a.current().substring(1)!=a.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,!1)?d("atom","tag"):(a.eatSpace(),/[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(a.peek())?d("atom","tag"):"}"==a.peek()?d("number","unit"):/[a-zA-Z\\]/.test(a.peek())?d("atom","tag"):a.eol()?d("atom","tag"):d("number","unit")):(a.eatWhile(/[\w\\\-]/),d("atom","tag")):(a.eatWhile(/[\w\\\-]/),d("atom","tag"));
if("&"==e)return a.eatWhile(/[\w\-]/),d(null,e);if(a.eatWhile(/[\w\\\-_%.{]/),"string"==c)return d("string","string");if(null!=a.current().match(/(^http$|^https$)/))return a.eatWhile(/[\w\\\-_%.{:\/]/),d("string","string");if("<"==a.peek()||">"==a.peek())return d("tag","tag");if(/\(/.test(a.peek()))return d(null,e);if("/"==a.peek()&&void 0!=b.stack[b.stack.length-1])return d("string","string");if(a.current().match(/\-\d|\-.\d/))return d("number","unit");if(f(a.current().toLowerCase()))return d("tag","tag");if(/\/|[\s\)]/.test(a.peek()||a.eol()||a.eatSpace()&&"/"==a.peek())&&-1!==a.current().indexOf("."))return"{"==a.current().substring(a.current().length-1,a.current().length)?(a.backUp(1),d("tag","tag")):(a.eatSpace(),/[{<>.a-zA-Z\/]/.test(a.peek())||a.eol()?d("tag","tag"):d("string","string"));if(a.eol()||"["==a.peek()||"#"==a.peek()||"tag"==c)return"{"==a.current().substring(a.current().length-1,a.current().length)&&a.backUp(1),d("tag","tag");if("compare"==c||"a"==c||"("==c)return d("string","string");if("|"==c||"-"==a.current()||"["==c)return d(null,e);if(":"==a.peek()){a.next();var h=":"==a.peek()?!0:!1;if(h)a.backUp(1);else{var m=a.pos,n=a.current().length;a.eatWhile(/[a-z\\\-]/);var o=a.pos;if(null!=a.current().substring(n-1).match(g))return a.backUp(o-(m-1)),d("tag","tag");a.backUp(o-(m-1))}return h?d("tag","tag"):d("variable","variable")}return d("variable","variable")}if(":"==e)return a.eatWhile(/[a-z\\\-]/),g.test(a.current())?d("tag","tag"):":"==a.peek()?(a.next(),a.eatWhile(/[a-z\\\-]/),a.current().match(/\:\:\-(o|ms|moz|webkit)\-/)?d("string","string"):g.test(a.current().substring(1))?d("tag","tag"):d(null,e)):d(null,e);if("~"!=e)return d(null,e);if("r"==c)return d("string","string")}}}function i(a,b){return a.skipToEnd(),b.tokenize=h,d("comment","comment")}function j(a,b){for(var e,c=!1;null!=(e=a.next());){if(c&&"/"==e){b.tokenize=h;break}c="*"==e}return d("comment","comment")}function k(a,b){for(var e,c=0;null!=(e=a.next());){if(c>=2&&">"==e){b.tokenize=h;break}c="-"==e?c+1:0}return d("comment","comment")}function l(a){return function(b,c){for(var f,e=!1;null!=(f=b.next())&&(f!=a||e);)e=!e&&"\\"==f;return e||(c.tokenize=h),d("string","string")}}var c,b=a.indentUnit,e="a abbr acronym address applet area article aside audio b base basefont bdi bdo big blockquote body br button canvas caption cite code col colgroup command datalist dd del details dfn dir div dl dt em embed fieldset figcaption figure font footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins keygen kbd label legend li link map mark menu meta meter nav noframes noscript object ol optgroup option output p param pre progress q rp rt ruby s samp script section select small source span strike strong style sub summary sup table tbody td textarea tfoot th thead time title tr track tt u ul var video wbr".split(" "),g=/(^\:root$|^\:nth\-child$|^\:nth\-last\-child$|^\:nth\-of\-type$|^\:nth\-last\-of\-type$|^\:first\-child$|^\:last\-child$|^\:first\-of\-type$|^\:last\-of\-type$|^\:only\-child$|^\:only\-of\-type$|^\:empty$|^\:link|^\:visited$|^\:active$|^\:hover$|^\:focus$|^\:target$|^\:lang$|^\:enabled^\:disabled$|^\:checked$|^\:first\-line$|^\:first\-letter$|^\:before$|^\:after$|^\:not$|^\:required$|^\:invalid$)/;return{startState:function(a){return{tokenize:h,baseIndent:a||0,stack:[]}},token:function(a,b){if(a.eatSpace())return null;var d=b.tokenize(a,b),e=b.stack[b.stack.length-1];return"hash"==c&&"rule"==e?d="atom":"variable"==d&&("rule"==e?d=null:e&&"@media{"!=e||(d="when"==a.current()?"variable":/[\s,|\s\)|\s]/.test(a.peek())?"tag":c)),"rule"==e&&/^[\{\};]$/.test(c)&&b.stack.pop(),"{"==c?"@media"==e?b.stack[b.stack.length-1]="@media{":b.stack.push("{"):"}"==c?b.stack.pop():"@media"==c?b.stack.push("@media"):"{"==e&&"comment"!=c&&b.stack.push("rule"),d},indent:function(a,c){var d=a.stack.length;return/^\}/.test(c)&&(d-="rule"==a.stack[a.stack.length-1]?2:1),a.baseIndent+d*b},electricChars:"}"}}),CodeMirror.defineMIME("text/x-less","less"),CodeMirror.mimeModes.hasOwnProperty("text/css")||CodeMirror.defineMIME("text/css","less"),CodeMirror.defineMode("lua",function(a,b){function d(a){return RegExp("^(?:"+a.join("|")+")","i")}function e(a){return RegExp("^(?:"+a.join("|")+")$","i")}function l(a){for(var b=0;a.eat("=");)++b;return a.eat("["),b}function m(a,b){var c=a.next();return"-"==c&&a.eat("-")?a.eat("[")&&a.eat("[")?(b.cur=n(l(a),"comment"))(a,b):(a.skipToEnd(),"comment"):'"'==c||"'"==c?(b.cur=o(c))(a,b):"["==c&&/[\[=]/.test(a.peek())?(b.cur=n(l(a),"string"))(a,b):/\d/.test(c)?(a.eatWhile(/[\w.%]/),"number"):/[\w_]/.test(c)?(a.eatWhile(/[\w\\\-_.]/),"variable"):null}function n(a,b){return function(c,d){for(var f,e=null;null!=(f=c.next());)if(null==e)"]"==f&&(e=0);else if("="==f)++e;else{if("]"==f&&e==a){d.cur=m;break}e=null}return b}}function o(a){return function(b,c){for(var e,d=!1;null!=(e=b.next())&&(e!=a||d);)d=!d&&"\\"==e;return d||(c.cur=m),"string"}}var c=a.indentUnit,f=e(b.specials||[]),g=e(["_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load","loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require","select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall","coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield","debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable","debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable","debug.setupvalue","debug.traceback","close","flush","lines","read","seek","setvbuf","write","io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin","io.stdout","io.tmpfile","io.type","io.write","math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg","math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max","math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh","math.sqrt","math.tan","math.tanh","os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale","os.time","os.tmpname","package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload","package.seeall","string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub","string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper","table.concat","table.insert","table.maxn","table.remove","table.sort"]),h=e(["and","break","elseif","false","nil","not","or","return","true","function","end","if","then","else","do","while","repeat","until","for","in","local"]),i=e(["function","if","repeat","do","\\(","{"]),j=e(["end","until","\\)","}"]),k=d(["end","until","\\)","}","else","elseif"]);return{startState:function(a){return{basecol:a||0,indentDepth:0,cur:m}},token:function(a,b){if(a.eatSpace())return null;var c=b.cur(a,b),d=a.current();return"variable"==c&&(h.test(d)?c="keyword":g.test(d)?c="builtin":f.test(d)&&(c="variable-2")),"comment"!=c&&"string"!=c&&(i.test(d)?++b.indentDepth:j.test(d)&&--b.indentDepth),c},indent:function(a,b){var d=k.test(b);return a.basecol+c*(a.indentDepth-(d?1:0))}}}),CodeMirror.defineMIME("text/x-lua","lua"),CodeMirror.defineMode("markdown",function(a,b){function B(a,b,c){return b.f=b.inline=c,c(a,b)}function C(a,b,c){return b.f=b.block=c,c(a,b)}function D(a){return a.linkTitle=!1,a.em=!1,a.strong=!1,a.quote=!1,c||a.f!=F||(a.f=J,a.block=E),null}function E(a,c){if(c.list!==!1&&c.indentationDiff>=0?(4>c.indentationDiff&&(c.indentation-=c.indentationDiff),c.list=null):c.list=!1,c.indentationDiff>=4)return c.indentation-=4,a.skipToEnd(),k;if(a.eatSpace())return null;if("#"===a.peek()||h&&a.match(z))c.header=!0;else if(a.eat(">"))c.indentation++,c.quote=!0;else{if("["===a.peek())return B(a,c,L);if(a.match(w,!0))return n;if(a.match(x,!0)||a.match(y,!0))c.indentation+=4,c.list=!0;else if(b.fencedCodeBlocks&&a.match(/^```([\w+#]*)/,!0))return c.localMode=f(RegExp.$1),c.localMode&&(c.localState=c.localMode.startState()),C(a,c,G),k}return B(a,c,c.inline)}function F(a,b){var e=d.token(a,b.htmlState);return c&&"tag"===e&&"openTag"!==b.htmlState.type&&!b.htmlState.context&&(b.f=J,b.block=E),b.md_inside&&-1!=a.current().indexOf(">")&&(b.f=J,b.block=E,b.htmlState.context=void 0),e}function G(a,b){return a.sol()&&a.match(/^```/,!0)?(b.localMode=b.localState=null,b.f=J,b.block=E,k):b.localMode?b.localMode.token(a,b.localState):(a.skipToEnd(),k)}function H(a){var b=[];return a.strong?b.push(a.em?v:u):a.em&&b.push(t),a.linkText&&b.push(r),a.code&&b.push(k),a.header&&b.push(j),a.quote&&b.push(l),a.list!==!1&&b.push(m),b.length?b.join(" "):null}function I(a,b){return a.match(A,!0)?H(b):void 0}function J(a,c){var d=c.text(a,c);if(d!==void 0)return d;if(c.list)return c.list=null,m;var e=a.next();if("\\"===e)return a.next(),H(c);if(c.linkTitle){c.linkTitle=!1;var f=e;"("===e&&(f=")"),f=(f+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var h="^\\s*(?:[^"+f+"\\\\]+|\\\\\\\\|\\\\.)"+f;if(a.match(RegExp(h),!0))return s}if("`"===e){var i=H(c),j=a.pos;a.eatWhile("`");var k=1+a.pos-j;return c.code?k===g?(c.code=!1,i):H(c):(g=k,c.code=!0,H(c))}if(c.code)return H(c);if("!"===e&&a.match(/\[.*\] ?(?:\(|\[)/,!1))return a.match(/\[.*\]/),c.inline=c.f=K,o;if("["===e&&a.match(/.*\](\(| ?\[)/,!1))return c.linkText=!0,H(c);if("]"===e&&c.linkText){var l=H(c);return c.linkText=!1,c.inline=c.f=K,l}if("<"===e&&a.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!0))return B(a,c,P(p,">"));if("<"===e&&a.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!0))return B(a,c,P(q,">"));if("<"===e&&a.match(/^\w/,!1)){if(-1!=a.string.indexOf(">")){var n=a.string.substring(1,a.string.indexOf(">"));/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(n)&&(c.md_inside=!0)}return a.backUp(1),C(a,c,F)}if("<"===e&&a.match(/^\/\w*?>/))return c.md_inside=!1,"tag";var r=!1;if(!b.underscoresBreakWords&&"_"===e&&"_"!==a.peek()&&a.match(/(\w)/,!1)){var t=a.pos-2;if(t>=0){var u=a.string.charAt(t);"_"!==u&&u.match(/(\w)/,!1)&&(r=!0)}}var i=H(c);if("*"===e||"_"===e&&!r){if(c.strong===e&&a.eat(e))return c.strong=!1,i;if(!c.strong&&a.eat(e))return c.strong=e,H(c);if(c.em===e)return c.em=!1,i;if(!c.em)return c.em=e,H(c)}else if(" "===e&&(a.eat("*")||a.eat("_"))){if(" "===a.peek())return H(c);a.backUp(1)}return H(c)}function K(a,b){if(a.eatSpace())return null;var c=a.next();return"("===c||"["===c?B(a,b,P(s,"("===c?")":"]")):"error"}function L(a,b){return a.match(/^[^\]]*\]:/,!0)?(b.f=M,r):B(a,b,J)}function M(a,b){return a.eatSpace()?null:(a.match(/^[^\s]+/,!0),void 0===a.peek()?b.linkTitle=!0:a.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),b.f=b.inline=J,s)}function O(a){return N[a]||(a=(a+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),N[a]=RegExp("^(?:[^\\\\]|\\\\.)*?("+a+")")),N[a]}function P(a,b,c){return c=c||J,function(d,e){return d.match(O(b)),e.inline=e.f=c,a}}var c=CodeMirror.mimeModes.hasOwnProperty("text/html"),d=CodeMirror.getMode(a,c?"text/html":"text/plain"),e={html:"htmlmixed",js:"javascript",json:"application/json",c:"text/x-csrc","c++":"text/x-c++src",java:"text/x-java",csharp:"text/x-csharp","c#":"text/x-csharp"},f=function(){var b,f,c={},d={},g=[];for(var h in CodeMirror.modes)CodeMirror.modes.propertyIsEnumerable(h)&&g.push(h);for(b=0;g.length>b;b++)c[g[b]]=g[b];var i=[];for(var h in CodeMirror.mimeModes)CodeMirror.mimeModes.propertyIsEnumerable(h)&&i.push({mime:h,mode:CodeMirror.mimeModes[h]});for(b=0;i.length>b;b++)f=i[b].mime,d[f]=i[b].mime;for(var j in e)(e[j]in c||e[j]in d)&&(c[j]=e[j]);return function(b){return c[b]?CodeMirror.getMode(a,c[b]):null}}();void 0===b.underscoresBreakWords&&(b.underscoresBreakWords=!0),void 0===b.fencedCodeBlocks&&(b.fencedCodeBlocks=!1);var g=0,h=!1,i=!1,j="header",k="comment",l="quote",m="string",n="hr",o="tag",p="link",q="link",r="link",s="string",t="em",u="strong",v="emstrong",w=/^([*\-=_])(?:\s*\1){2,}\s*$/,x=/^[*\-+]\s+/,y=/^[0-9]+\.\s+/,z=/^(?:\={1,}|-{1,})$/,A=/^[^!\[\]*_\\<>` "'(]+/,N=[];return{startState:function(){return h=!1,i=!1,{f:E,block:E,htmlState:CodeMirror.startState(d),indentation:0,inline:J,text:I,linkText:!1,linkTitle:!1,em:!1,strong:!1,header:!1,list:!1,quote:!1}},copyState:function(a){return{f:a.f,block:a.block,htmlState:CodeMirror.copyState(d,a.htmlState),indentation:a.indentation,localMode:a.localMode,localState:a.localMode?CodeMirror.copyState(a.localMode,a.localState):null,inline:a.inline,text:a.text,linkTitle:a.linkTitle,em:a.em,strong:a.strong,header:a.header,list:a.list,quote:a.quote,md_inside:a.md_inside}},token:function(a,b){if(a.sol()){if(a.match(/^\s*$/,!0))return h=!1,D(b);i&&(h=!0,i=!1),i=!0,b.header=!1,b.code=!1,b.f=b.block;var c=a.match(/^\s*/,!0)[0].replace(/\t/g,"    ").length,d=4*Math.floor((c-b.indentation)/4);if(d>4&&(d=4),c=b.indentation+d,b.indentationDiff=c-b.indentation,b.indentation=c,c>0)return null}return b.f(a,b)},blankLine:D,getType:H}},"xml"),CodeMirror.defineMIME("text/x-markdown","markdown"),CodeMirror.defineMode("mysql",function(a){function d(a){return RegExp("^(?:"+a.join("|")+")$","i")}function h(a,b){var d=a.next();if(c=null,"$"==d||"?"==d)return a.match(/^[\w\d]*/),"variable-2";if("<"!=d||a.match(/^[\s\u00a0=]/,!1)){if('"'==d||"'"==d)return b.tokenize=i(d),b.tokenize(a,b);if("`"==d)return b.tokenize=j(d),b.tokenize(a,b);if(/[{}\(\),\.;\[\]]/.test(d))return c=d,null;if("-"==d&&a.eat("-"))return a.skipToEnd(),"comment";if("/"==d&&a.eat("*"))return b.tokenize=k,b.tokenize(a,b);if(g.test(d))return a.eatWhile(g),null;if(":"==d)return a.eatWhile(/[\w\d\._\-]/),"atom";if(a.eatWhile(/[_\w\d]/),a.eat(":"))return a.eatWhile(/[\w\d_\-]/),"atom";var h=a.current();return e.test(h)?null:f.test(h)?"keyword":"variable"}return a.match(/^[^\s\u00a0>]*>?/),"atom"}function i(a){return function(b,c){for(var e,d=!1;null!=(e=b.next());){if(e==a&&!d){c.tokenize=h;break}d=!d&&"\\"==e}return"string"}}function j(a){return function(b,c){for(var e,d=!1;null!=(e=b.next());){if(e==a&&!d){c.tokenize=h;break}d=!d&&"\\"==e}return"variable-2"}}function k(a,b){for(;;){if(!a.skipTo("*")){a.skipToEnd();break}if(a.next(),a.eat("/")){b.tokenize=h;break}}return"comment"}function l(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function m(a){a.indent=a.context.indent,a.context=a.context.prev}var c,b=a.indentUnit,e=d(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),f=d(["ACCESSIBLE","ALTER","AS","BEFORE","BINARY","BY","CASE","CHARACTER","COLUMN","CONTINUE","CROSS","CURRENT_TIMESTAMP","DATABASE","DAY_MICROSECOND","DEC","DEFAULT","DESC","DISTINCT","DOUBLE","EACH","ENCLOSED","EXIT","FETCH","FLOAT8","FOREIGN","GRANT","HIGH_PRIORITY","HOUR_SECOND","IN","INNER","INSERT","INT2","INT8","INTO","JOIN","KILL","LEFT","LINEAR","LOCALTIME","LONG","LOOP","MATCH","MEDIUMTEXT","MINUTE_SECOND","NATURAL","NULL","OPTIMIZE","OR","OUTER","PRIMARY","RANGE","READ_WRITE","REGEXP","REPEAT","RESTRICT","RIGHT","SCHEMAS","SENSITIVE","SHOW","SPECIFIC","SQLSTATE","SQL_CALC_FOUND_ROWS","STARTING","TERMINATED","TINYINT","TRAILING","UNDO","UNLOCK","USAGE","UTC_DATE","VALUES","VARCHARACTER","WHERE","WRITE","ZEROFILL","ALL","AND","ASENSITIVE","BIGINT","BOTH","CASCADE","CHAR","COLLATE","CONSTRAINT","CREATE","CURRENT_TIME","CURSOR","DAY_HOUR","DAY_SECOND","DECLARE","DELETE","DETERMINISTIC","DIV","DUAL","ELSEIF","EXISTS","FALSE","FLOAT4","FORCE","FULLTEXT","HAVING","HOUR_MINUTE","IGNORE","INFILE","INSENSITIVE","INT1","INT4","INTERVAL","ITERATE","KEYS","LEAVE","LIMIT","LOAD","LOCK","LONGTEXT","MASTER_SSL_VERIFY_SERVER_CERT","MEDIUMINT","MINUTE_MICROSECOND","MODIFIES","NO_WRITE_TO_BINLOG","ON","OPTIONALLY","OUT","PRECISION","PURGE","READS","REFERENCES","RENAME","REQUIRE","REVOKE","SCHEMA","SELECT","SET","SPATIAL","SQLEXCEPTION","SQL_BIG_RESULT","SSL","TABLE","TINYBLOB","TO","TRUE","UNIQUE","UPDATE","USING","UTC_TIMESTAMP","VARCHAR","WHEN","WITH","YEAR_MONTH","ADD","ANALYZE","ASC","BETWEEN","BLOB","CALL","CHANGE","CHECK","CONDITION","CONVERT","CURRENT_DATE","CURRENT_USER","DATABASES","DAY_MINUTE","DECIMAL","DELAYED","DESCRIBE","DISTINCTROW","DROP","ELSE","ESCAPED","EXPLAIN","FLOAT","FOR","FROM","GROUP","HOUR_MICROSECOND","IF","INDEX","INOUT","INT","INT3","INTEGER","IS","KEY","LEADING","LIKE","LINES","LOCALTIMESTAMP","LONGBLOB","LOW_PRIORITY","MEDIUMBLOB","MIDDLEINT","MOD","NOT","NUMERIC","OPTION","ORDER","OUTFILE","PROCEDURE","READ","REAL","RELEASE","REPLACE","RETURN","RLIKE","SECOND_MICROSECOND","SEPARATOR","SMALLINT","SQL","SQLWARNING","SQL_SMALL_RESULT","STRAIGHT_JOIN","THEN","TINYTEXT","TRIGGER","UNION","UNSIGNED","USE","UTC_TIME","VARBINARY","VARYING","WHILE","XOR","FULL","COLUMNS","MIN","MAX","STDEV","COUNT"]),g=/[*+\-<>=&|]/;return{startState:function(){return{tokenize:h,context:null,indent:0,col:0}},token:function(a,b){if(a.sol()&&(b.context&&null==b.context.align&&(b.context.align=!1),b.indent=a.indentation()),a.eatSpace())return null;var d=b.tokenize(a,b);if("comment"!=d&&b.context&&null==b.context.align&&"pattern"!=b.context.type&&(b.context.align=!0),"("==c)l(b,")",a.column());else if("["==c)l(b,"]",a.column());else if("{"==c)l(b,"}",a.column());else if(/[\]\}\)]/.test(c)){for(;b.context&&"pattern"==b.context.type;)m(b);b.context&&c==b.context.type&&m(b)}else"."==c&&b.context&&"pattern"==b.context.type?m(b):/atom|string|variable/.test(d)&&b.context&&(/[\}\]]/.test(b.context.type)?l(b,"pattern",a.column()):"pattern"!=b.context.type||b.context.align||(b.context.align=!0,b.context.col=a.column()));return d},indent:function(a,c){var d=c&&c.charAt(0),e=a.context;if(/[\]\}]/.test(d))for(;e&&"pattern"==e.type;)e=e.prev;var f=e&&d==e.type;return e?"pattern"==e.type?e.col:e.align?e.col+(f?0:1):e.indent+(f?0:b):0}}}),CodeMirror.defineMIME("text/x-mysql","mysql"),CodeMirror.defineMode("ntriples",function(){function b(b,c){var e,d=b.location;e=d==a.PRE_SUBJECT&&"<"==c?a.WRITING_SUB_URI:d==a.PRE_SUBJECT&&"_"==c?a.WRITING_BNODE_URI:d==a.PRE_PRED&&"<"==c?a.WRITING_PRED_URI:d==a.PRE_OBJ&&"<"==c?a.WRITING_OBJ_URI:d==a.PRE_OBJ&&"_"==c?a.WRITING_OBJ_BNODE:d==a.PRE_OBJ&&'"'==c?a.WRITING_OBJ_LITERAL:d==a.WRITING_SUB_URI&&">"==c?a.PRE_PRED:d==a.WRITING_BNODE_URI&&" "==c?a.PRE_PRED:d==a.WRITING_PRED_URI&&">"==c?a.PRE_OBJ:d==a.WRITING_OBJ_URI&&">"==c?a.POST_OBJ:d==a.WRITING_OBJ_BNODE&&" "==c?a.POST_OBJ:d==a.WRITING_OBJ_LITERAL&&'"'==c?a.POST_OBJ:d==a.WRITING_LIT_LANG&&" "==c?a.POST_OBJ:d==a.WRITING_LIT_TYPE&&">"==c?a.POST_OBJ:d==a.WRITING_OBJ_LITERAL&&"@"==c?a.WRITING_LIT_LANG:d==a.WRITING_OBJ_LITERAL&&"^"==c?a.WRITING_LIT_TYPE:" "!=c||d!=a.PRE_SUBJECT&&d!=a.PRE_PRED&&d!=a.PRE_OBJ&&d!=a.POST_OBJ?d==a.POST_OBJ&&"."==c?a.PRE_SUBJECT:a.ERROR:d,b.location=e}var a={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12};return{startState:function(){return{location:a.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(a,c){var d=a.next();if("<"==d){b(c,d);var e="";return a.eatWhile(function(a){return"#"!=a&&">"!=a?(e+=a,!0):!1}),c.uris.push(e),a.match("#",!1)?"variable":(a.next(),b(c,">"),"variable")}if("#"==d){var f="";return a.eatWhile(function(a){return">"!=a&&" "!=a?(f+=a,!0):!1}),c.anchors.push(f),"variable-2"}if(">"==d)return b(c,">"),"variable";if("_"==d){b(c,d);var g="";return a.eatWhile(function(a){return" "!=a?(g+=a,!0):!1}),c.bnodes.push(g),a.next(),b(c," "),"builtin"}if('"'==d)return b(c,d),a.eatWhile(function(a){return'"'!=a}),a.next(),"@"!=a.peek()&&"^"!=a.peek()&&b(c,'"'),"string";if("@"==d){b(c,"@");var h="";return a.eatWhile(function(a){return" "!=a?(h+=a,!0):!1}),c.langs.push(h),a.next(),b(c," "),"string-2"}if("^"==d){a.next(),b(c,"^");var i="";return a.eatWhile(function(a){return">"!=a?(i+=a,!0):!1}),c.types.push(i),a.next(),b(c,">"),"variable"}" "==d&&b(c,d),"."==d&&b(c,d)}}}),CodeMirror.defineMIME("text/n-triples","ntriples"),CodeMirror.defineMode("ocaml",function(){function b(b,e){var f=b.next();if('"'===f)return e.tokenize=c,e.tokenize(b,e);if("("===f&&b.eat("*"))return e.commentLevel++,e.tokenize=d,e.tokenize(b,e);if("~"===f)return b.eatWhile(/\w/),"variable-2";if("`"===f)return b.eatWhile(/\w/),"quote";if(/\d/.test(f))return b.eatWhile(/[\d]/),b.eat(".")&&b.eatWhile(/[\d]/),"number";if(/[+\-*&%=<>!?|]/.test(f))return"operator";b.eatWhile(/\w/);var g=b.current();return a[g]||"variable"}function c(a,c){for(var d,e=!1,f=!1;null!=(d=a.next());){if('"'===d&&!f){e=!0;break}f=!f&&"\\"===d}return e&&!f&&(c.tokenize=b),"string"}function d(a,c){for(var d,e;c.commentLevel>0&&null!=(e=a.next());)"("===d&&"*"===e&&c.commentLevel++,"*"===d&&")"===e&&c.commentLevel--,d=e;return 0>=c.commentLevel&&(c.tokenize=b),"comment"}var a={"true":"atom","false":"atom",let:"keyword",rec:"keyword","in":"keyword",of:"keyword",and:"keyword",succ:"keyword","if":"keyword",then:"keyword","else":"keyword","for":"keyword",to:"keyword","while":"keyword","do":"keyword",done:"keyword",fun:"keyword","function":"keyword",val:"keyword",type:"keyword",mutable:"keyword",match:"keyword","with":"keyword","try":"keyword",raise:"keyword",begin:"keyword",end:"keyword",open:"builtin",trace:"builtin",ignore:"builtin",exit:"builtin",print_string:"builtin",print_endline:"builtin"};return{startState:function(){return{tokenize:b,commentLevel:0}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}}),CodeMirror.defineMIME("text/x-ocaml","ocaml"),CodeMirror.defineMode("pascal",function(){function a(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function e(a,e){var h=a.next();if("#"==h&&e.startOfLine)return a.skipToEnd(),"meta";if('"'==h||"'"==h)return e.tokenize=f(h),e.tokenize(a,e);if("("==h&&a.eat("*"))return e.tokenize=g,g(a,e);if(/[\[\]{}\(\),;\:\.]/.test(h))return null;if(/\d/.test(h))return a.eatWhile(/[\w\.]/),"number";if("/"==h&&a.eat("/"))return a.skipToEnd(),"comment";if(d.test(h))return a.eatWhile(d),"operator";a.eatWhile(/[\w\$_]/);var i=a.current();return b.propertyIsEnumerable(i)?"keyword":c.propertyIsEnumerable(i)?"atom":"variable"}function f(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d)&&(c.tokenize=null),"string"}}function g(a,b){for(var d,c=!1;d=a.next();){if(")"==d&&c){b.tokenize=null;break}c="*"==d}return"comment"}var b=a("and array begin case const div do downto else end file for forward integer boolean char function goto if in label mod nil not of or packed procedure program record repeat set string then to type until var while with"),c={"null":!0},d=/[+\-*&%=<>!?|\/]/;return{startState:function(){return{tokenize:null}},token:function(a,b){if(a.eatSpace())return null;var c=(b.tokenize||e)(a,b);return"comment"==c||"meta"==c?c:c},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-pascal","pascal"),CodeMirror.defineMode("perl",function(){function d(a,b,c,d,e){return b.chain=null,b.style=null,b.tail=null,b.tokenize=function(a,b){for(var h,g=!1,i=0;h=a.next();){if(h===c[i]&&!g)return void 0!==c[++i]?(b.chain=c[i],b.style=d,b.tail=e):e&&a.eatWhile(e),b.tokenize=f,d;g=!g&&"\\"==h}return d},b.tokenize(a,b)}function e(a,b,c){return b.tokenize=function(a,b){return a.string==c&&(b.tokenize=f),a.skipToEnd(),"string"},b.tokenize(a,b)}function f(f,g){if(f.eatSpace())return null;if(g.chain)return d(f,g,g.chain,g.style,g.tail);if(f.match(/^\-?[\d\.]/,!1)&&f.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return"number";if(f.match(/^<<(?=\w)/))return f.eatWhile(/\w/),e(f,g,f.current().substr(2));if(f.sol()&&f.match(/^\=item(?!\w)/))return e(f,g,"=cut");var h=f.next();if('"'==h||"'"==h){if(f.prefix(3)=="<<"+h){var i=f.pos;f.eatWhile(/\w/);var j=f.current().substr(1);if(j&&f.eat(h))return e(f,g,j);f.pos=i}return d(f,g,[h],"string")}if("q"==h){var k=f.look(-2);if(!k||!/\w/.test(k))if(k=f.look(0),"x"==k){if(k=f.look(1),"("==k)return f.eatSuffix(2),d(f,g,[")"],b,c);if("["==k)return f.eatSuffix(2),d(f,g,["]"],b,c);if("{"==k)return f.eatSuffix(2),d(f,g,["}"],b,c);if("<"==k)return f.eatSuffix(2),d(f,g,[">"],b,c);if(/[\^'"!~\/]/.test(k))return f.eatSuffix(1),d(f,g,[f.eat(k)],b,c)}else if("q"==k){if(k=f.look(1),"("==k)return f.eatSuffix(2),d(f,g,[")"],"string");if("["==k)return f.eatSuffix(2),d(f,g,["]"],"string");if("{"==k)return f.eatSuffix(2),d(f,g,["}"],"string");if("<"==k)return f.eatSuffix(2),d(f,g,[">"],"string");if(/[\^'"!~\/]/.test(k))return f.eatSuffix(1),d(f,g,[f.eat(k)],"string")}else if("w"==k){if(k=f.look(1),"("==k)return f.eatSuffix(2),d(f,g,[")"],"bracket");if("["==k)return f.eatSuffix(2),d(f,g,["]"],"bracket");if("{"==k)return f.eatSuffix(2),d(f,g,["}"],"bracket");if("<"==k)return f.eatSuffix(2),d(f,g,[">"],"bracket");if(/[\^'"!~\/]/.test(k))return f.eatSuffix(1),d(f,g,[f.eat(k)],"bracket")}else if("r"==k){if(k=f.look(1),"("==k)return f.eatSuffix(2),d(f,g,[")"],b,c);if("["==k)return f.eatSuffix(2),d(f,g,["]"],b,c);if("{"==k)return f.eatSuffix(2),d(f,g,["}"],b,c);if("<"==k)return f.eatSuffix(2),d(f,g,[">"],b,c);if(/[\^'"!~\/]/.test(k))return f.eatSuffix(1),d(f,g,[f.eat(k)],b,c)}else if(/[\^'"!~\/(\[{<]/.test(k)){if("("==k)return f.eatSuffix(1),d(f,g,[")"],"string");if("["==k)return f.eatSuffix(1),d(f,g,["]"],"string");if("{"==k)return f.eatSuffix(1),d(f,g,["}"],"string");if("<"==k)return f.eatSuffix(1),d(f,g,[">"],"string");if(/[\^'"!~\/]/.test(k))return d(f,g,[f.eat(k)],"string")}}if("m"==h){var k=f.look(-2);if((!k||!/\w/.test(k))&&(k=f.eat(/[(\[{<\^'"!~\/]/))){if(/[\^'"!~\/]/.test(k))return d(f,g,[k],b,c);if("("==k)return d(f,g,[")"],b,c);if("["==k)return d(f,g,["]"],b,c);if("{"==k)return d(f,g,["}"],b,c);if("<"==k)return d(f,g,[">"],b,c)}}if("s"==h){var k=/[\/>\]})\w]/.test(f.look(-2));if(!k&&(k=f.eat(/[(\[{<\^'"!~\/]/)))return"["==k?d(f,g,["]","]"],b,c):"{"==k?d(f,g,["}","}"],b,c):"<"==k?d(f,g,[">",">"],b,c):"("==k?d(f,g,[")",")"],b,c):d(f,g,[k,k],b,c)}if("y"==h){var k=/[\/>\]})\w]/.test(f.look(-2));if(!k&&(k=f.eat(/[(\[{<\^'"!~\/]/)))return"["==k?d(f,g,["]","]"],b,c):"{"==k?d(f,g,["}","}"],b,c):"<"==k?d(f,g,[">",">"],b,c):"("==k?d(f,g,[")",")"],b,c):d(f,g,[k,k],b,c)}if("t"==h){var k=/[\/>\]})\w]/.test(f.look(-2));if(!k&&(k=f.eat("r"),k&&(k=f.eat(/[(\[{<\^'"!~\/]/))))return"["==k?d(f,g,["]","]"],b,c):"{"==k?d(f,g,["}","}"],b,c):"<"==k?d(f,g,[">",">"],b,c):"("==k?d(f,g,[")",")"],b,c):d(f,g,[k,k],b,c)}if("`"==h)return d(f,g,[h],"variable-2");if("/"==h)return/~\s*$/.test(f.prefix())?d(f,g,[h],b,c):"operator";if("$"==h){var i=f.pos;if(f.eatWhile(/\d/)||f.eat("{")&&f.eatWhile(/\d/)&&f.eat("}"))return"variable-2";f.pos=i}if(/[$@%]/.test(h)){var i=f.pos;if(f.eat("^")&&f.eat(/[A-Z]/)||!/[@$%&]/.test(f.look(-2))&&f.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){var k=f.current();if(a[k])return"variable-2"}f.pos=i}if(/[$@%&]/.test(h)&&(f.eatWhile(/[\w$\[\]]/)||f.eat("{")&&f.eatWhile(/[\w$\[\]]/)&&f.eat("}"))){var k=f.current();return a[k]?"variable-2":"variable"}if("#"==h&&"$"!=f.look(-2))return f.skipToEnd(),"comment";if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(h)){var i=f.pos;if(f.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/),a[f.current()])return"operator";f.pos=i}if("_"==h&&1==f.pos){if("_END__"==f.suffix(6))return d(f,g,["\0"],"comment");if("_DATA__"==f.suffix(7))return d(f,g,["\0"],"variable-2");if("_C__"==f.suffix(7))return d(f,g,["\0"],"string")}if(/\w/.test(h)){var i=f.pos;if("{"==f.look(-2)&&("}"==f.look(0)||f.eatWhile(/\w/)&&"}"==f.look(0)))return"string";f.pos=i}if(/[A-Z]/.test(h)){var l=f.look(-2),i=f.pos;if(f.eatWhile(/[A-Z_]/),!/[\da-z]/.test(f.look(0))){var k=a[f.current()];return k?(k[1]&&(k=k[0]),":"!=l?1==k?"keyword":2==k?"def":3==k?"atom":4==k?"operator":5==k?"variable-2":"meta":"meta"):"meta"}f.pos=i}if(/[a-zA-Z_]/.test(h)){var l=f.look(-2);f.eatWhile(/\w/);var k=a[f.current()];return k?(k[1]&&(k=k[0]),":"!=l?1==k?"keyword":2==k?"def":3==k?"atom":4==k?"operator":5==k?"variable-2":"meta":"meta"):"meta"}return null}var a={"->":4,"++":4,"--":4,"**":4,"=~":4,"!~":4,"*":4,"/":4,"%":4,x:4,"+":4,"-":4,".":4,"<<":4,">>":4,"<":4,">":4,"<=":4,">=":4,lt:4,gt:4,le:4,ge:4,"==":4,"!=":4,"<=>":4,eq:4,ne:4,cmp:4,"~~":4,"&":4,"|":4,"^":4,"&&":4,"||":4,"//":4,"..":4,"...":4,"?":4,":":4,"=":4,"+=":4,"-=":4,"*=":4,",":4,"=>":4,"::":4,not:4,and:4,or:4,xor:4,BEGIN:[5,1],END:[5,1],PRINT:[5,1],PRINTF:[5,1],GETC:[5,1],READ:[5,1],READLINE:[5,1],DESTROY:[5,1],TIE:[5,1],TIEHANDLE:[5,1],UNTIE:[5,1],STDIN:5,STDIN_TOP:5,STDOUT:5,STDOUT_TOP:5,STDERR:5,STDERR_TOP:5,$ARG:5,$_:5,"@ARG":5,"@_":5,$LIST_SEPARATOR:5,'$"':5,$PROCESS_ID:5,$PID:5,$$:5,$REAL_GROUP_ID:5,$GID:5,"$(":5,$EFFECTIVE_GROUP_ID:5,$EGID:5,"$)":5,$PROGRAM_NAME:5,$0:5,$SUBSCRIPT_SEPARATOR:5,$SUBSEP:5,"$;":5,$REAL_USER_ID:5,$UID:5,"$<":5,$EFFECTIVE_USER_ID:5,$EUID:5,"$>":5,$a:5,$b:5,$COMPILING:5,"$^C":5,$DEBUGGING:5,"$^D":5,"${^ENCODING}":5,$ENV:5,"%ENV":5,$SYSTEM_FD_MAX:5,"$^F":5,"@F":5,"${^GLOBAL_PHASE}":5,"$^H":5,"%^H":5,"@INC":5,"%INC":5,$INPLACE_EDIT:5,"$^I":5,"$^M":5,$OSNAME:5,"$^O":5,"${^OPEN}":5,$PERLDB:5,"$^P":5,$SIG:5,"%SIG":5,$BASETIME:5,"$^T":5,"${^TAINT}":5,"${^UNICODE}":5,"${^UTF8CACHE}":5,"${^UTF8LOCALE}":5,$PERL_VERSION:5,"$^V":5,"${^WIN32_SLOPPY_STAT}":5,$EXECUTABLE_NAME:5,"$^X":5,$1:5,$MATCH:5,"$&":5,"${^MATCH}":5,$PREMATCH:5,"$`":5,"${^PREMATCH}":5,$POSTMATCH:5,"$'":5,"${^POSTMATCH}":5,$LAST_PAREN_MATCH:5,"$+":5,$LAST_SUBMATCH_RESULT:5,"$^N":5,"@LAST_MATCH_END":5,"@+":5,"%LAST_PAREN_MATCH":5,"%+":5,"@LAST_MATCH_START":5,"@-":5,"%LAST_MATCH_START":5,"%-":5,$LAST_REGEXP_CODE_RESULT:5,"$^R":5,"${^RE_DEBUG_FLAGS}":5,"${^RE_TRIE_MAXBUF}":5,$ARGV:5,"@ARGV":5,ARGV:5,ARGVOUT:5,$OUTPUT_FIELD_SEPARATOR:5,$OFS:5,"$,":5,$INPUT_LINE_NUMBER:5,$NR:5,"$.":5,$INPUT_RECORD_SEPARATOR:5,$RS:5,"$/":5,$OUTPUT_RECORD_SEPARATOR:5,$ORS:5,"$\\":5,$OUTPUT_AUTOFLUSH:5,"$|":5,$ACCUMULATOR:5,"$^A":5,$FORMAT_FORMFEED:5,"$^L":5,$FORMAT_PAGE_NUMBER:5,"$%":5,$FORMAT_LINES_LEFT:5,"$-":5,$FORMAT_LINE_BREAK_CHARACTERS:5,"$:":5,$FORMAT_LINES_PER_PAGE:5,"$=":5,$FORMAT_TOP_NAME:5,"$^":5,$FORMAT_NAME:5,"$~":5,"${^CHILD_ERROR_NATIVE}":5,$EXTENDED_OS_ERROR:5,"$^E":5,$EXCEPTIONS_BEING_CAUGHT:5,"$^S":5,$WARNING:5,"$^W":5,"${^WARNING_BITS}":5,$OS_ERROR:5,$ERRNO:5,"$!":5,"%OS_ERROR":5,"%ERRNO":5,"%!":5,$CHILD_ERROR:5,"$?":5,$EVAL_ERROR:5,"$@":5,$OFMT:5,"$#":5,"$*":5,$ARRAY_BASE:5,"$[":5,$OLD_PERL_VERSION:5,"$]":5,"if":[1,1],elsif:[1,1],"else":[1,1],"while":[1,1],unless:[1,1],"for":[1,1],foreach:[1,1],abs:1,accept:1,alarm:1,atan2:1,bind:1,binmode:1,bless:1,bootstrap:1,"break":1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,"continue":[1,1],cos:1,crypt:1,dbmclose:1,dbmopen:1,"default":1,defined:1,"delete":1,die:1,"do":1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,eval:1,exec:1,exists:1,exit:1,exp:1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,"goto":1,grep:1,hex:1,"import":1,index:1,"int":1,ioctl:1,join:1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,link:1,listen:1,local:2,localtime:1,lock:1,log:1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,"new":1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,"package":1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,"return":1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,sin:1,sleep:1,socket:1,socketpair:1,sort:1,splice:1,split:1,sprintf:1,sqrt:1,srand:1,stat:1,state:1,study:1,sub:1,substr:1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null},b="string-2",c=/[goseximacplud]/;
return{startState:function(){return{tokenize:f,chain:null,style:null,tail:null}},token:function(a,b){return(b.tokenize||f)(a,b)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-perl","perl"),CodeMirror.StringStream.prototype.look=function(a){return this.string.charAt(this.pos+(a||0))},CodeMirror.StringStream.prototype.prefix=function(a){if(a){var b=this.pos-a;return this.string.substr(b>=0?b:0,a)}return this.string.substr(0,this.pos-1)},CodeMirror.StringStream.prototype.suffix=function(a){var b=this.string.length,c=b-this.pos+1;return this.string.substr(this.pos,a&&b>a?a:c)},CodeMirror.StringStream.prototype.nsuffix=function(a){var b=this.pos,c=a||this.string.length-this.pos+1;return this.pos+=c,this.string.substr(b,c)},CodeMirror.StringStream.prototype.eatSuffix=function(a){var c,b=this.pos+a;this.pos=0>=b?0:b>=(c=this.string.length-1)?c:b},function(){function a(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function b(a){return function(b,c){return b.match(a)?c.tokenize=null:b.skipToEnd(),"string"}}var c={name:"clike",keywords:a("abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent"),blockKeywords:a("catch do else elseif for foreach if switch try while"),atoms:a("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__"),builtin:a("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport echo print global static exit array empty eval isset unset die include require include_once require_once"),multiLineStrings:!0,hooks:{$:function(a){return a.eatWhile(/[\w\$_]/),"variable-2"},"<":function(a,c){return a.match(/<</)?(a.eatWhile(/[\w\.]/),c.tokenize=b(a.current().slice(3)),c.tokenize(a,c)):!1},"#":function(a){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"},"/":function(a){if(a.eat("/")){for(;!a.eol()&&!a.match("?>",!1);)a.next();return"comment"}return!1}}};CodeMirror.defineMode("php",function(a,b){function f(a,b){var c=b.curMode==e;if(a.sol()&&'"'!=b.pending&&(b.pending=null),c)return c&&null==b.php.tokenize&&a.match("?>")?(b.curMode=d,b.curState=b.html,"meta"):e.token(a,b.curState);if(a.match(/^<\?\w*/))return b.curMode=e,b.curState=b.php,"meta";if('"'==b.pending){for(;!a.eol()&&'"'!=a.next(););var f="string"}else if(b.pending&&a.pos<b.pending.end){a.pos=b.pending.end;var f=b.pending.style}else var f=d.token(a,b.curState);b.pending=null;var g=a.current(),h=g.search(/<\?/);return-1!=h&&(b.pending="string"==f&&/\"$/.test(g)&&!/\?>/.test(g)?'"':{end:a.pos,style:f},a.backUp(g.length-h)),f}var d=CodeMirror.getMode(a,"text/html"),e=CodeMirror.getMode(a,c);return{startState:function(){var a=CodeMirror.startState(d),c=CodeMirror.startState(e);return{html:a,php:c,curMode:b.startOpen?e:d,curState:b.startOpen?c:a,pending:null}},copyState:function(a){var h,b=a.html,c=CodeMirror.copyState(d,b),f=a.php,g=CodeMirror.copyState(e,f);return h=a.curMode==d?c:g,{html:c,php:g,curMode:a.curMode,curState:h,pending:a.pending}},token:f,indent:function(a,b){return a.curMode!=e&&/^\s*<\//.test(b)||a.curMode==e&&/^\?>/.test(b)?d.indent(a.html,b):a.curMode.indent(a.curState,b)},electricChars:"/{}:",innerMode:function(a){return{state:a.curState,mode:a.curMode}}}},"htmlmixed"),CodeMirror.defineMIME("application/x-httpd-php","php"),CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),CodeMirror.defineMIME("text/x-php",c)}(),CodeMirror.defineMode("pig",function(a,b){function h(a,b,c){return b.tokenize=c,c(a,b)}function j(a,b){return i=a,b}function k(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=m;break}c="*"==d}return j("comment","comment")}function l(a){return function(b,c){for(var e,d=!1,g=!1;null!=(e=b.next());){if(e==a&&!d){g=!0;break}d=!d&&"\\"==e}return(g||!d&&!f)&&(c.tokenize=m),j("string","error")}}function m(a,b){var f=a.next();return'"'==f||"'"==f?h(a,b,l(f)):/[\[\]{}\(\),;\.]/.test(f)?j(f):/\d/.test(f)?(a.eatWhile(/[\w\.]/),j("number","number")):"/"==f?a.eat("*")?h(a,b,k):(a.eatWhile(g),j("operator","operator")):"-"==f?a.eat("-")?(a.skipToEnd(),j("comment","comment")):(a.eatWhile(g),j("operator","operator")):g.test(f)?(a.eatWhile(g),j("operator","operator")):(a.eatWhile(/[\w\$_]/),c&&c.propertyIsEnumerable(a.current().toUpperCase())&&!a.eat(")")&&!a.eat(".")?"keyword":d&&d.propertyIsEnumerable(a.current().toUpperCase())?"variable-2":e&&e.propertyIsEnumerable(a.current().toUpperCase())?"variable-3":j("variable","pig-word"))}var i,c=b.keywords,d=b.builtins,e=b.types,f=b.multiLineStrings,g=/[*+\-%<>=&?:\/!|]/;return{startState:function(){return{tokenize:m,startOfLine:!0}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c}}}),function(){function a(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}var b="ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA  PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER ",c="VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE NEQ MATCHES TRUE FALSE ",d="BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ";CodeMirror.defineMIME("text/x-pig",{name:"pig",builtins:a(b),keywords:a(c),types:a(d)})}(),CodeMirror.defineMode("plsql",function(a,b){function i(a,b,c){return b.tokenize=c,c(a,b)}function k(a,b){return j=a,b}function l(a,b){var g=a.next();return'"'==g||"'"==g?i(a,b,m(g)):/[\[\]{}\(\),;\.]/.test(g)?k(g):/\d/.test(g)?(a.eatWhile(/[\w\.]/),k("number","number")):"/"==g?a.eat("*")?i(a,b,n):(a.eatWhile(h),k("operator","operator")):"-"==g?a.eat("-")?(a.skipToEnd(),k("comment","comment")):(a.eatWhile(h),k("operator","operator")):"@"==g||"$"==g?(a.eatWhile(/[\w\d\$_]/),k("word","variable")):h.test(g)?(a.eatWhile(h),k("operator","operator")):(a.eatWhile(/[\w\$_]/),c&&c.propertyIsEnumerable(a.current().toLowerCase())?k("keyword","keyword"):d&&d.propertyIsEnumerable(a.current().toLowerCase())?k("keyword","builtin"):e&&e.propertyIsEnumerable(a.current().toLowerCase())?k("keyword","variable-2"):f&&f.propertyIsEnumerable(a.current().toLowerCase())?k("keyword","variable-3"):k("word","variable"))}function m(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&!g)&&(c.tokenize=l),k("string","plsql-string")}}function n(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=l;break}c="*"==d}return k("comment","plsql-comment")}var j,c=b.keywords,d=b.functions,e=b.types,f=b.sqlplus,g=b.multiLineStrings,h=/[+\-*&%=<>!?:\/|]/;return{startState:function(){return{tokenize:l,startOfLine:!0}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c}}}),function(){function a(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}var b="abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work",c="abs acos add_months ascii asin atan atan2 average bfilename ceil chartorowid chr concat convert cos cosh count decode deref dual dump dup_val_on_index empty error exp false floor found glb greatest hextoraw initcap instr instrb isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mod months_between new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null nvl others power rawtohex reftohex round rowcount rowidtochar rpad rtrim sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid upper user userenv variance vsize",d="bfile blob character clob dec float int integer mlslabel natural naturaln nchar nclob number numeric nvarchar2 real rowtype signtype smallint string varchar varchar2",e="appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap";CodeMirror.defineMIME("text/x-plsql",{name:"plsql",keywords:a(b),functions:a(c),types:a(d),sqlplus:a(e)})}(),CodeMirror.defineMode("properties",function(){return{token:function(a,b){var c=a.sol()||b.afterSection,d=a.eol();if(b.afterSection=!1,c&&(b.nextMultiline?(b.inMultiline=!0,b.nextMultiline=!1):b.position="def"),d&&!b.nextMultiline&&(b.inMultiline=!1,b.position="def"),c)for(;a.eatSpace(););var e=a.next();return!c||"#"!==e&&"!"!==e&&";"!==e?c&&"["===e?(b.afterSection=!0,a.skipTo("]"),a.eat("]"),"header"):"="===e||":"===e?(b.position="quote",null):("\\"===e&&"quote"===b.position&&"u"!==a.next()&&(b.nextMultiline=!0),b.position):(b.position="comment",a.skipToEnd(),"comment")},startState:function(){return{position:"def",nextMultiline:!1,inMultiline:!1,afterSection:!1}}}}),CodeMirror.defineMIME("text/x-properties","properties"),CodeMirror.defineMIME("text/x-ini","properties"),CodeMirror.defineMode("python",function(a,b){function d(a){return RegExp("^(("+a.join(")|(")+"))\\b")}function t(a,b){if(a.sol()){var d=b.scopes[0].offset;if(a.eatSpace()){var l=a.indentation();return l>d?s="indent":d>l&&(s="dedent"),null}d>0&&w(a,b)}if(a.eatSpace())return null;var m=a.peek();if("#"===m)return a.skipToEnd(),"comment";if(a.match(/^[0-9\.]/,!1)){var n=!1;if(a.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)&&(n=!0),a.match(/^\d+\.\d*/)&&(n=!0),a.match(/^\.\d+/)&&(n=!0),n)return a.eat(/J/i),"number";var o=!1;if(a.match(/^0x[0-9a-f]+/i)&&(o=!0),a.match(/^0b[01]+/i)&&(o=!0),a.match(/^0o[0-7]+/i)&&(o=!0),a.match(/^[1-9]\d*(e[\+\-]?\d+)?/)&&(a.eat(/J/i),o=!0),a.match(/^0(?![\dx])/i)&&(o=!0),o)return a.eat(/L/i),"number"}return a.match(p)?(b.tokenize=u(a.current()),b.tokenize(a,b)):a.match(i)||a.match(h)?null:a.match(g)||a.match(e)||a.match(k)?"operator":a.match(f)?null:a.match(q)?"keyword":a.match(r)?"builtin":a.match(j)?"variable":(a.next(),c)}function u(a){function f(f,g){for(;!f.eol();)if(f.eatWhile(/[^'"\\]/),f.eat("\\")){if(f.next(),d&&f.eol())return e}else{if(f.match(a))return g.tokenize=t,e;f.eat(/['"]/)}if(d){if(b.singleLineStringErrors)return c;g.tokenize=t}return e}for(;"rub".indexOf(a.charAt(0).toLowerCase())>=0;)a=a.substr(1);var d=1==a.length,e="string";return f.isString=!0,f}function v(b,c,d){d=d||"py";var e=0;if("py"===d){if("py"!==c.scopes[0].type)return c.scopes[0].offset=b.indentation(),void 0;for(var f=0;c.scopes.length>f;++f)if("py"===c.scopes[f].type){e=c.scopes[f].offset+a.indentUnit;break}}else e=b.column()+b.current().length;c.scopes.unshift({offset:e,type:d})}function w(a,b,c){if(c=c||"py",1!=b.scopes.length){if("py"===b.scopes[0].type){for(var d=a.indentation(),e=-1,f=0;b.scopes.length>f;++f)if(d===b.scopes[f].offset){e=f;break}if(-1===e)return!0;for(;b.scopes[0].offset!==d;)b.scopes.shift();return!1}return"py"===c?(b.scopes[0].offset=a.indentation(),!1):b.scopes[0].type!=c?!0:(b.scopes.shift(),!1)}}function x(a,b){s=null;var d=b.tokenize(a,b),e=a.current();if("."===e)return d=a.match(j,!1)?null:c,null===d&&"meta"===b.lastToken&&(d="meta"),d;if("@"===e)return a.match(j,!1)?"meta":c;"variable"!==d&&"builtin"!==d||"meta"!==b.lastToken||(d="meta"),("pass"===e||"return"===e)&&(b.dedent+=1),"lambda"===e&&(b.lambda=!0),(":"===e&&!b.lambda&&"py"==b.scopes[0].type||"indent"===s)&&v(a,b);var f="[({".indexOf(e);return-1!==f&&v(a,b,"])}".slice(f,f+1)),"dedent"===s&&w(a,b)?c:(f="])}".indexOf(e),-1!==f&&w(a,b,e)?c:(b.dedent>0&&a.eol()&&"py"==b.scopes[0].type&&(b.scopes.length>1&&b.scopes.shift(),b.dedent-=1),d))}var c="error",e=RegExp("^[\\+\\-\\*/%&|\\^~<>!]"),f=RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),g=RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),h=RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),i=RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),j=RegExp("^[_A-Za-z][_A-Za-z0-9]*"),k=d(["and","or","not","is","in"]),l=["as","assert","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","lambda","pass","raise","return","try","while","with","yield"],m=["abs","all","any","bin","bool","bytearray","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip","__import__","NotImplemented","Ellipsis","__debug__"],n={builtins:["apply","basestring","buffer","cmp","coerce","execfile","file","intern","long","raw_input","reduce","reload","unichr","unicode","xrange","False","True","None"],keywords:["exec","print"]},o={builtins:["ascii","bytes","exec","print"],keywords:["nonlocal","False","True","None"]};if(b.version&&3===parseInt(b.version,10)){l=l.concat(o.keywords),m=m.concat(o.builtins);var p=RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))","i")}else{l=l.concat(n.keywords),m=m.concat(n.builtins);var p=RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))","i")}var q=d(l),r=d(m),s=null,y={startState:function(a){return{tokenize:t,scopes:[{offset:a||0,type:"py"}],lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=x(a,b);return b.lastToken=c,a.eol()&&a.lambda&&(b.lambda=!1),c},indent:function(a){return a.tokenize!=t?a.tokenize.isString?CodeMirror.Pass:0:a.scopes[0].offset}};return y}),CodeMirror.defineMIME("text/x-python","python"),CodeMirror.defineMode("r",function(a){function b(a){for(var b=a.split(" "),c={},d=0;b.length>d;++d)c[b[d]]=!0;return c}function i(a,b){h=null;var i=a.next();if("#"==i)return a.skipToEnd(),"comment";if("0"==i&&a.eat("x"))return a.eatWhile(/[\da-f]/i),"number";if("."==i&&a.eat(/\d/))return a.match(/\d*(?:e[+\-]?\d+)?/),"number";if(/\d/.test(i))return a.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/),"number";if("'"==i||'"'==i)return b.tokenize=j(i),"string";if("."==i&&a.match(/.[.\d]+/))return"keyword";if(/[\w\.]/.test(i)&&"_"!=i){a.eatWhile(/[\w\.]/);var k=a.current();return c.propertyIsEnumerable(k)?"atom":e.propertyIsEnumerable(k)?(f.propertyIsEnumerable(k)&&(h="block"),"keyword"):d.propertyIsEnumerable(k)?"builtin":"variable"}return"%"==i?(a.skipTo("%")&&a.next(),"variable-2"):"<"==i&&a.eat("-")?"arrow":"="==i&&b.ctx.argList?"arg-is":g.test(i)?"$"==i?"dollar":(a.eatWhile(g),"operator"):/[\(\){}\[\];]/.test(i)?(h=i,";"==i?"semi":null):null}function j(a){return function(b,c){if(b.eat("\\")){var d=b.next();return"x"==d?b.match(/^[a-f0-9]{2}/i):("u"==d||"U"==d)&&b.eat("{")&&b.skipTo("}")?b.next():"u"==d?b.match(/^[a-f0-9]{4}/i):"U"==d?b.match(/^[a-f0-9]{8}/i):/[0-7]/.test(d)&&b.match(/^[0-7]{1,2}/),"string-2"}for(var e;null!=(e=b.next());){if(e==a){c.tokenize=i;break}if("\\"==e){b.backUp(1);break}}return"string"}}function k(a,b,c){a.ctx={type:b,indent:a.indent,align:null,column:c.column(),prev:a.ctx}}function l(a){a.indent=a.ctx.indent,a.ctx=a.ctx.prev}var h,c=b("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"),d=b("list quote bquote eval return call parse deparse"),e=b("if else repeat while function for in next break"),f=b("if else repeat while function for"),g=/[+\-*\/^<>=!&|~$:]/;return{startState:function(){return{tokenize:i,ctx:{type:"top",indent:-a.indentUnit,align:!1},indent:0,afterIdent:!1}},token:function(a,b){if(a.sol()&&(null==b.ctx.align&&(b.ctx.align=!1),b.indent=a.indentation()),a.eatSpace())return null;var c=b.tokenize(a,b);"comment"!=c&&null==b.ctx.align&&(b.ctx.align=!0);var d=b.ctx.type;return";"!=h&&"{"!=h&&"}"!=h||"block"!=d||l(b),"{"==h?k(b,"}",a):"("==h?(k(b,")",a),b.afterIdent&&(b.ctx.argList=!0)):"["==h?k(b,"]",a):"block"==h?k(b,"block",a):h==d&&l(b),b.afterIdent="variable"==c||"keyword"==c,c},indent:function(b,c){if(b.tokenize!=i)return 0;var d=c&&c.charAt(0),e=b.ctx,f=d==e.type;return"block"==e.type?e.indent+("{"==d?0:a.indentUnit):e.align?e.column+(f?0:1):e.indent+(f?0:a.indentUnit)}}}),CodeMirror.defineMIME("text/x-rsrc","r"),CodeMirror.defineMode("changes",function(){var a=/^-+$/,b=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)  ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,c=/^[\w+.-]+@[\w.-]+/;return{token:function(d){if(d.sol()){if(d.match(a))return"tag";if(d.match(b))return"tag"}return d.match(c)?"string":(d.next(),null)}}}),CodeMirror.defineMIME("text/x-rpm-changes","changes"),CodeMirror.defineMode("spec",function(){var a=/^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,b=/^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\(\w+\))?|Obsoletes|Conflicts|Recommends|Source\d*|Patch\d*|ExclusiveArch|NoSource|Supplements):/,c=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/,d=/^%(ifnarch|ifarch|if)/,e=/^%(else|endif)/,f=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(g,h){var i=g.peek();if("#"==i)return g.skipToEnd(),"comment";if(g.sol()){if(g.match(b))return"preamble";if(g.match(c))return"section"}if(g.match(/^\$\w+/))return"def";if(g.match(/^\$\{\w+\}/))return"def";if(g.match(e))return"keyword";if(g.match(d))return h.controlFlow=!0,"keyword";if(h.controlFlow){if(g.match(f))return"operator";if(g.match(/^(\d+)/))return"number";g.eol()&&(h.controlFlow=!1)}if(g.match(a))return"number";if(g.match(/^%[\w]+/))return g.match(/^\(/)&&(h.macroParameters=!0),"macro";if(h.macroParameters){if(g.match(/^\d+/))return"number";if(g.match(/^\)/))return h.macroParameters=!1,"macro"}return g.match(/^%\{\??[\w \-]+\}/)?"macro":(g.next(),null)}}}),CodeMirror.defineMIME("text/x-rpm-spec","spec"),CodeMirror.defineMode("rst",function(a,b){function c(a,b,c){a.fn=b,d(a,c)}function d(a,b){a.ctx=b||{}}function e(a,b){if(b&&"string"!=typeof b){var d=b.current();b=d[d.length-1]}c(a,v,{back:b})}function f(a){return a&&CodeMirror.modes.hasOwnProperty(a)}function g(b){return f(b)?CodeMirror.getMode(a,b):null}function v(a,b){function l(a){return f||!b.ctx.back||a.test(b.ctx.back)}function m(b){return a.eol()||a.match(b,!1)}function n(b){return a.match(b)&&l(/\W/)&&m(/\W/)}var d,f,g;if(a.eat(/\\/))return d=a.next(),e(b,d),null;if(f=a.sol(),f&&(d=a.eat(j))){for(g=0;a.eat(d);g++);if(g>=3&&a.match(/^\s*$/))return e(b,null),"header";a.backUp(g+1)}if(f&&a.match(q))return a.eol()||c(b,x),"meta";if(a.match(r)){if(h){var k=h;c(b,A,{mode:k,local:k.startState()})}else c(b,A);return"meta"}if(f&&a.match(u,!1)){if(i){var k=i;return c(b,A,{mode:k,local:k.startState()}),null}return c(b,A),"meta"}if(n(o))return e(b,a),"footnote";if(n(p))return e(b,a),"citation";if(d=a.next(),l(s)){if((":"===d||"|"===d)&&a.eat(/\S/)){var t;return t=":"===d?"builtin":"atom",c(b,w,{ch:d,wide:!1,prev:null,token:t}),t}if("*"===d||"`"===d){var v=d,y=!1;if(d=a.next(),d==v&&(y=!0,d=a.next()),d&&!/\s/.test(d)){var t;return t="*"===v?y?"strong":"em":y?"string":"string-2",c(b,w,{ch:v,wide:y,prev:null,token:t}),t}}}return e(b,d),null}function w(a,b){function g(a){return b.ctx.prev=a,f}var d=a.next(),f=b.ctx.token;return d!=b.ctx.ch?g(d):/\s/.test(b.ctx.prev)?g(d):b.ctx.wide&&(d=a.next(),d!=b.ctx.ch)?g(d):a.eol()||t.test(a.peek())?(c(b,v),e(b,d),f):(b.ctx.wide&&a.backUp(1),g(d))}function x(a,b){var d=null;if(a.match(k))d="attribute";else if(a.match(l))d="link";else if(a.match(m))d="quote";else{if(!a.match(n))return a.eatSpace(),a.eol()?(e(b,a),null):(a.skipToEnd(),c(b,z),"comment");d="quote"}return c(b,y,{start:!0}),d}function y(a,b){var c="body";return!b.ctx.start||a.sol()?B(a,b,c):(a.skipToEnd(),d(b),c)}function z(a,b){return B(a,b,"comment")}function A(a,b){return h?a.sol()?(a.eatSpace()||e(b,a),null):h.token(a,b.ctx.local):B(a,b,"meta")}function B(a,b,c){return a.eol()||a.eatSpace()?(a.skipToEnd(),c):(e(b,a),null)}var h=g(b.verbatim),i=g("python"),j=/^[!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~]/,k=/^\s*\w([-:.\w]*\w)?::(\s|$)/,l=/^\s*_[\w-]+:(\s|$)/,m=/^\s*\[(\d+|#)\](\s|$)/,n=/^\s*\[[A-Za-z][\w-]*\](\s|$)/,o=/^\[(\d+|#)\]_/,p=/^\[[A-Za-z][\w-]*\]_/,q=/^\.\.(\s|$)/,r=/^::\s*$/,s=/^[-\s"([{</:]/,t=/^[-\s`'")\]}>/:.,;!?\\_]/,u=/^\s+(>>>|In \[\d+\]:)\s/;return{startState:function(){return{fn:v,ctx:{}}},copyState:function(a){return{fn:a.fn,ctx:a.ctx}},token:function(a,b){var c=b.fn(a,b);return c}}},"python"),CodeMirror.defineMIME("text/x-rst","rst"),CodeMirror.defineMode("ruby",function(a){function b(a){for(var b={},c=0,d=a.length;d>c;++c)b[a[c]]=!0;return b}function h(a,b,c){return c.tokenize.push(a),a(b,c)}function i(a,b){if(g=null,a.sol()&&a.match("=begin")&&a.eol())return b.tokenize.push(m),"comment";if(a.eatSpace())return null;var d,c=a.next();if("`"==c||"'"==c||'"'==c||"/"==c&&!a.eol()&&" "!=a.peek())return h(k(c,"string",'"'==c||"`"==c),a,b);if("%"==c){var e,i=!1;a.eat("s")?e="atom":a.eat(/[WQ]/)?(e="string",i=!0):a.eat(/[wxqr]/)&&(e="string");var j=a.eat(/[^\w\s]/);return j?(f.propertyIsEnumerable(j)&&(j=f[j]),h(k(j,e,i,!0),a,b)):"operator"}if("#"==c)return a.skipToEnd(),"comment";if("<"==c&&(d=a.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return h(l(d[1]),a,b);if("0"==c)return a.eat("x")?a.eatWhile(/[\da-fA-F]/):a.eat("b")?a.eatWhile(/[01]/):a.eatWhile(/[0-7]/),"number";if(/\d/.test(c))return a.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),"number";if("?"==c){for(;a.match(/^\\[CM]-/););return a.eat("\\")?a.eatWhile(/\w/):a.next(),"string"
}return":"==c?a.eat("'")?h(k("'","atom",!1),a,b):a.eat('"')?h(k('"',"atom",!0),a,b):(a.eatWhile(/[\w\?]/),"atom"):"@"==c?(a.eat("@"),a.eatWhile(/[\w\?]/),"variable-2"):"$"==c?(a.next(),a.eatWhile(/[\w\?]/),"variable-3"):/\w/.test(c)?(a.eatWhile(/[\w\?]/),a.eat(":")?"atom":"ident"):"|"!=c||!b.varList&&"{"!=b.lastTok&&"do"!=b.lastTok?/[\(\)\[\]{}\\;]/.test(c)?(g=c,null):"-"==c&&a.eat(">")?"arrow":/[=+\-\/*:\.^%<>~|]/.test(c)?(a.eatWhile(/[=+\-\/*:\.^%<>~|]/),"operator"):null:(g="|",null)}function j(){var a=1;return function(b,c){if("}"==b.peek()){if(a--,0==a)return c.tokenize.pop(),c.tokenize[c.tokenize.length-1](b,c)}else"{"==b.peek()&&a++;return i(b,c)}}function k(a,b,c,d){return function(e,f){for(var h,g=!1;null!=(h=e.next());){if(h==a&&(d||!g)){f.tokenize.pop();break}if(c&&"#"==h&&!g&&e.eat("{")){f.tokenize.push(j(arguments.callee));break}g=!g&&"\\"==h}return b}}function l(a){return function(b,c){return b.match(a)?c.tokenize.pop():b.skipToEnd(),"string"}}function m(a,b){return a.sol()&&a.match("=end")&&a.eol()&&b.tokenize.pop(),a.skipToEnd(),"comment"}var g,c=b(["alias","and","BEGIN","begin","break","case","class","def","defined?","do","else","elsif","END","end","ensure","false","for","if","in","module","next","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield","nil","raise","throw","catch","fail","loop","callcc","caller","lambda","proc","public","protected","private","require","load","require_relative","extend","autoload"]),d=b(["def","class","case","for","while","do","module","then","catch","loop","proc","begin"]),e=b(["end","until"]),f={"[":"]","{":"}","(":")"};return{startState:function(){return{tokenize:[i],indented:0,context:{type:"top",indented:-a.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(a,b){a.sol()&&(b.indented=a.indentation());var h,f=b.tokenize[b.tokenize.length-1](a,b);if("ident"==f){var i=a.current();f=c.propertyIsEnumerable(a.current())?"keyword":/^[A-Z]/.test(i)?"tag":"def"==b.lastTok||"class"==b.lastTok||b.varList?"def":"variable",d.propertyIsEnumerable(i)?h="indent":e.propertyIsEnumerable(i)?h="dedent":"if"!=i&&"unless"!=i||a.column()!=a.indentation()||(h="indent")}return(g||f&&"comment"!=f)&&(b.lastTok=i||g||f),"|"==g&&(b.varList=!b.varList),"indent"==h||/[\(\[\{]/.test(g)?b.context={prev:b.context,type:g||f,indented:b.indented}:("dedent"==h||/[\)\]\}]/.test(g))&&b.context.prev&&(b.context=b.context.prev),a.eol()&&(b.continuedLine="\\"==g||"operator"==f),f},indent:function(b,c){if(b.tokenize[b.tokenize.length-1]!=i)return 0;var d=c&&c.charAt(0),e=b.context,g=e.type==f[d]||"keyword"==e.type&&/^(?:end|until|else|elsif|when|rescue)\b/.test(c);return e.indented+(g?0:a.indentUnit)+(b.continuedLine?a.indentUnit:0)},electricChars:"}de"}}),CodeMirror.defineMIME("text/x-ruby","ruby"),CodeMirror.defineMode("rust",function(){function h(a,b){return f=a,b}function i(a,b){var c=a.next();if('"'==c)return b.tokenize=j,b.tokenize(a,b);if("'"==c)return f="atom",a.eat("\\")?a.skipTo("'")?(a.next(),"string"):"error":(a.next(),a.eat("'")?"string":"error");if("/"==c){if(a.eat("/"))return a.skipToEnd(),"comment";if(a.eat("*"))return b.tokenize=k(1),b.tokenize(a,b)}if("#"==c)return a.eat("[")?(f="open-attr",null):(a.eatWhile(/\w/),h("macro","meta"));if(":"==c&&a.match(":<"))return h("op",null);if(c.match(/\d/)||"."==c&&a.eat(/\d/)){var d=!1;return a.match(/^x[\da-f]+/i)||a.match(/^b[01]+/)||(a.eatWhile(/\d/),a.eat(".")&&(d=!0,a.eatWhile(/\d/)),a.match(/^e[+\-]?\d+/i)&&(d=!0)),d?a.match(/^f(?:32|64)/):a.match(/^[ui](?:8|16|32|64)/),h("atom","number")}return c.match(/[()\[\]{}:;,]/)?h(c,null):"-"==c&&a.eat(">")?h("->",null):c.match(e)?(a.eatWhile(e),h("op",null)):(a.eatWhile(/\w/),g=a.current(),a.match(/^::\w/)?(a.backUp(1),h("prefix","variable-2")):b.keywords.propertyIsEnumerable(g)?h(b.keywords[g],g.match(/true|false/)?"atom":"keyword"):h("name","variable"))}function j(a,b){for(var c,d=!1;c=a.next();){if('"'==c&&!d)return b.tokenize=i,h("atom","string");d=!d&&"\\"==c}return h("op","string")}function k(a){return function(b,c){for(var e,d=null;e=b.next();){if("/"==e&&"*"==d){if(1==a){c.tokenize=i;break}return c.tokenize=k(a-1),c.tokenize(b,c)}if("*"==e&&"/"==d)return c.tokenize=k(a+1),c.tokenize(b,c);d=e}return"comment"}}function m(){for(var a=arguments.length-1;a>=0;a--)l.cc.push(arguments[a])}function n(){return m.apply(null,arguments),!0}function o(a,b){var c=function(){var c=l.state;c.lexical={indented:c.indented,column:l.stream.column(),type:a,prev:c.lexical,info:b}};return c.lex=!0,c}function p(){var a=l.state;a.lexical.prev&&(")"==a.lexical.type&&(a.indented=a.lexical.indented),a.lexical=a.lexical.prev)}function q(){l.state.keywords=d}function r(){l.state.keywords=c}function s(a,b){function c(d){return","==d?n(a,c):d==b?n():n(c)}return function(d){return d==b?n():m(a,c)}}function t(a,b){return n(o("stat",b),a,p,u)}function u(a){return"}"==a?n():"let"==a?t(C,"let"):"fn"==a?t(G):"type"==a?n(o("stat"),H,v,p,u):"enum"==a?t(I):"mod"==a?t(K):"iface"==a?t(L):"impl"==a?t(M):"open-attr"==a?n(o("]"),s(w,"]"),p):"ignore"==a||a.match(/[\]\);,]/)?n(u):m(o("stat"),w,p,v,u)}function v(a){return";"==a?n():m()}function w(a){return"atom"==a||"name"==a?n(x):"{"==a?n(o("}"),z,p):a.match(/[\[\(]/)?Y(a,w):a.match(/[\]\)\};,]/)?m():"if-style"==a?n(w,w):"else-style"==a||"op"==a?n(w):"for"==a?n(S,E,F,w,w):"alt"==a?n(w,U):"fn"==a?n(G):"macro"==a?n(X):n()}function x(a){return"."==g?n(y):"::<"==g?n(N,x):"op"==a||":"==g?n(w):"("==a||"["==a?Y(a,w):m()}function y(){return g.match(/^\w+$/)?(l.marked="variable",n(x)):m(w)}function z(a){if("op"==a){if("|"==g)return n(B,p,o("}","block"),u);if("||"==g)return n(p,o("}","block"),u)}return"mutable"==g||g.match(/^\w+$/)&&":"==l.stream.peek()&&!l.stream.match("::",!1)?m(A(w)):m(u)}function A(a){function b(c){return"mutable"==g||"with"==g?(l.marked="keyword",n(b)):g.match(/^\w*$/)?(l.marked="variable",n(b)):":"==c?n(a,b):"}"==c?n():n(b)}return b}function B(a){return"name"==a?(l.marked="def",n(B)):"op"==a&&"|"==g?n():n(B)}function C(a){return a.match(/[\]\)\};]/)?n():"="==g?n(w,D):","==a?n(C):m(S,E,C)}function D(a){return a.match(/[\]\)\};,]/)?m(C):m(w,D)}function E(a){return":"==a?n(q,P,r):m()}function F(a){return"name"==a&&"in"==g?(l.marked="keyword",n()):m()}function G(a){return"@"==g||"~"==g?(l.marked="keyword",n(G)):"name"==a?(l.marked="def",n(G)):"<"==g?n(N,G):"{"==a?m(w):"("==a?n(o(")"),s(O,")"),p,G):"->"==a?n(q,P,r,G):";"==a?n():n(G)}function H(a){return"name"==a?(l.marked="def",n(H)):"<"==g?n(N,H):"="==g?n(q,P,r):n(H)}function I(a){return"name"==a?(l.marked="def",n(I)):"<"==g?n(N,I):"="==g?n(q,P,r,v):"{"==a?n(o("}"),q,J,r,p):n(I)}function J(a){return"}"==a?n():"("==a?n(o(")"),s(P,")"),p,J):(g.match(/^\w+$/)&&(l.marked="def"),n(J))}function K(a){return"name"==a?(l.marked="def",n(K)):"{"==a?n(o("}"),u,p):m()}function L(a){return"name"==a?(l.marked="def",n(L)):"<"==g?n(N,L):"{"==a?n(o("}"),u,p):m()}function M(a){return"<"==g?n(N,M):"of"==g||"for"==g?(l.marked="keyword",n(P,M)):"name"==a?(l.marked="def",n(M)):"{"==a?n(o("}"),u,p):m()}function N(){return">"==g?n():","==g?n(N):":"==g?n(P,N):m(P,N)}function O(a){return"name"==a?(l.marked="def",n(O)):":"==a?n(q,P,r):m()}function P(a){return"name"==a?(l.marked="variable-3",n(Q)):"mutable"==g?(l.marked="keyword",n(P)):"atom"==a?n(Q):"op"==a||"obj"==a?n(P):"fn"==a?n(R):"{"==a?n(o("{"),A(P),p):Y(a,P)}function Q(){return"<"==g?n(N):m()}function R(a){return"("==a?n(o("("),s(P,")"),p,R):"->"==a?n(P):m()}function S(a){return"name"==a?(l.marked="def",n(T)):"atom"==a?n(T):"op"==a?n(S):a.match(/[\]\)\};,]/)?m():Y(a,S)}function T(a){return"op"==a&&"."==g?n():"to"==g?(l.marked="keyword",n(S)):m()}function U(a){return"{"==a?n(o("}","alt"),V,p):m()}function V(a){return"}"==a?n():"|"==a?n(V):"when"==g?(l.marked="keyword",n(w,W)):a.match(/[\]\);,]/)?n(V):m(S,W)}function W(a){return"{"==a?n(o("}","alt"),u,p,V):m(V)}function X(a){return a.match(/[\[\(\{]/)?Y(a,w):m()}function Y(a,b){return"["==a?n(o("]"),s(b,"]"),p):"("==a?n(o(")"),s(b,")"),p):"{"==a?n(o("}"),s(b,"}"),p):n()}function Z(a,b,c){var d=a.cc;for(l.state=a,l.stream=b,l.marked=null,l.cc=d;;){var e=d.length?d.pop():u;if(e(f)){for(;d.length&&d[d.length-1].lex;)d.pop()();return l.marked||c}}}var f,g,a=4,b=2,c={"if":"if-style","while":"if-style","else":"else-style","do":"else-style",ret:"else-style",fail:"else-style","break":"atom",cont:"atom","const":"let",resource:"fn",let:"let",fn:"fn","for":"for",alt:"alt",iface:"iface",impl:"impl",type:"type","enum":"enum",mod:"mod",as:"op","true":"atom","false":"atom",assert:"op",check:"op",claim:"op","native":"ignore",unsafe:"ignore","import":"else-style","export":"else-style",copy:"op",log:"op",log_err:"op",use:"op",bind:"op",self:"atom"},d=function(){for(var a={fn:"fn",block:"fn",obj:"obj"},b="bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char".split(" "),c=0,d=b.length;d>c;++c)a[b[c]]="atom";return a}(),e=/[+\-*&%=<>!?|\.@]/,l={state:null,stream:null,marked:null,cc:null};return p.lex=q.lex=r.lex=!0,{startState:function(){return{tokenize:i,cc:[],lexical:{indented:-a,column:0,type:"top",align:!1},keywords:c,indented:0}},token:function(a,b){if(a.sol()&&(b.lexical.hasOwnProperty("align")||(b.lexical.align=!1),b.indented=a.indentation()),a.eatSpace())return null;f=g=null;var c=b.tokenize(a,b);return"comment"==c?c:(b.lexical.hasOwnProperty("align")||(b.lexical.align=!0),"prefix"==f?c:(g||(g=a.current()),Z(b,a,c)))},indent:function(c,d){if(c.tokenize!=i)return 0;var e=d&&d.charAt(0),f=c.lexical,g=f.type,h=e==g;return"stat"==g?f.indented+a:f.align?f.column+(h?0:1):f.indented+(h?0:"alt"==f.info?b:a)},electricChars:"{}"}}),CodeMirror.defineMIME("text/x-rustsrc","rust"),CodeMirror.defineMode("scheme",function(){function h(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function k(a,b,c){this.indent=a,this.type=b,this.prev=c}function l(a,b,c){a.indentStack=new k(b,c,a.indentStack)}function m(a){a.indentStack=a.indentStack.prev}function r(a){return a.match(n)}function s(a){return a.match(o)}function t(a,b){return b===!0&&a.backUp(1),a.match(q)}function u(a){return a.match(p)}var a="builtin",b="comment",c="string",d="atom",e="number",f="bracket",g=2,i=h("\u03bb case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"),j=h("define let letrec let* lambda"),n=RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),o=RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),p=RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),q=RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);return{startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1}},token:function(h,k){if(null==k.indentStack&&h.sol()&&(k.indentation=h.indentation()),h.eatSpace())return null;var n=null;switch(k.mode){case"string":for(var o,p=!1;null!=(o=h.next());){if('"'==o&&!p){k.mode=!1;break}p=!p&&"\\"==o}n=c;break;case"comment":for(var o,q=!1;null!=(o=h.next());){if("#"==o&&q){k.mode=!1;break}q="|"==o}n=b;break;case"s-expr-comment":if(k.mode=!1,"("!=h.peek()&&"["!=h.peek()){h.eatWhile(/[^/s]/),n=b;break}k.sExprComment=0;default:var v=h.next();if('"'==v)k.mode="string",n=c;else if("'"==v)n=d;else if("#"==v)if(h.eat("|"))k.mode="comment",n=b;else if(h.eat(/[tf]/i))n=d;else if(h.eat(";"))k.mode="s-expr-comment",n=b;else{var w=null,x=!1,y=!0;h.eat(/[ei]/i)?x=!0:h.backUp(1),h.match(/^#b/i)?w=r:h.match(/^#o/i)?w=s:h.match(/^#x/i)?w=u:h.match(/^#d/i)?w=t:h.match(/^[-+0-9.]/,!1)?(y=!1,w=t):x||h.eat("#"),null!=w&&(y&&!x&&h.match(/^#[ei]/i),w(h)&&(n=e))}else if(/^[-+0-9.]/.test(v)&&t(h,!0))n=e;else if(";"==v)h.skipToEnd(),n=b;else if("("==v||"["==v){for(var B,z="",A=h.column();null!=(B=h.eat(/[^\s\(\[\;\)\]]/));)z+=B;z.length>0&&j.propertyIsEnumerable(z)?l(k,A+g,v):(h.eatSpace(),h.eol()||";"==h.peek()?l(k,A+1,v):l(k,A+h.current().length,v)),h.backUp(h.current().length-1),"number"==typeof k.sExprComment&&k.sExprComment++,n=f}else")"==v||"]"==v?(n=f,null!=k.indentStack&&k.indentStack.type==(")"==v?"(":"[")&&(m(k),"number"==typeof k.sExprComment&&0==--k.sExprComment&&(n=b,k.sExprComment=!1))):(h.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/),n=i&&i.propertyIsEnumerable(h.current())?a:"variable")}return"number"==typeof k.sExprComment?b:n},indent:function(a){return null==a.indentStack?a.indentation:a.indentStack.indent}}}),CodeMirror.defineMIME("text/x-scheme","scheme"),CodeMirror.defineMode("shell",function(){function b(b,c){for(var d=c.split(" "),e=0;d.length>e;e++)a[d[e]]=b}function c(b,c){var g=b.sol(),h=b.next();if("'"===h||'"'===h||"`"===h)return c.tokens.unshift(d(h)),f(b,c);if("#"===h)return g&&b.eat("!")?(b.skipToEnd(),"meta"):(b.skipToEnd(),"comment");if("$"===h)return c.tokens.unshift(e),f(b,c);if("+"===h||"="===h)return"operator";if("-"===h)return b.eat("-"),b.eatWhile(/\w/),"attribute";if(/\d/.test(h)&&(b.eatWhile(/\d/),!/\w/.test(b.peek())))return"number";b.eatWhile(/\w/);var i=b.current();return"="===b.peek()&&/\w+/.test(i)?"def":a.hasOwnProperty(i)?a[i]:null}function d(a){return function(b,c){for(var d,f=!1,g=!1;null!=(d=b.next());){if(d===a&&!g){f=!0;break}if("$"===d&&!g&&"'"!==a){g=!0,b.backUp(1),c.tokens.unshift(e);break}g=!g&&"\\"===d}return(f||!g)&&c.tokens.shift(),"`"===a||")"===a?"quote":"string"}}function f(a,b){return(b.tokens[0]||c)(a,b)}var a={};b("atom","true false"),b("keyword","if then do else elif while until for in esac fi fin fil done exit set unset export function"),b("builtin","ab awk bash beep cat cc cd chown chmod chroot clear cp curl cut diff echo find gawk gcc get git grep kill killall ln ls make mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh shopt shred source sort sleep ssh start stop su sudo tee telnet top touch vi vim wall wc wget who write yes zsh");var e=function(a,b){b.tokens.length>1&&a.eat("$");var c=a.next(),e=/\w/;return"{"===c&&(e=/[^}]/),"("===c?(b.tokens[0]=d(")"),f(a,b)):(/\d/.test(c)||(a.eatWhile(e),a.eat("}")),b.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(a,b){return a.eatSpace()?null:f(a,b)}}}),CodeMirror.defineMIME("text/x-sh","shell"),CodeMirror.defineMode("sieve",function(a){function b(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function f(a,b){var e=a.next();if("/"==e&&a.eat("*"))return b.tokenize=h,h(a,b);if("#"===e)return a.skipToEnd(),"comment";if('"'==e)return b.tokenize=i(e),b.tokenize(a,b);if("{"===e)return b._indent++,null;if("}"===e)return b._indent--,null;if(/[{}\(\),;]/.test(e))return null;if(/\d/.test(e))return a.eatWhile(/[\d]/),a.eat(/[KkMmGg]/),"number";if(":"==e)return a.eatWhile(/[a-zA-Z_]/),a.eatWhile(/[a-zA-Z0-9_]/),"operator";a.eatWhile(/[\w\$_]/);var f=a.current();return"text"==f&&a.eat(":")?(b.tokenize=g,"string"):c.propertyIsEnumerable(f)?"keyword":d.propertyIsEnumerable(f)?"atom":void 0}function g(a,b){return b._multiLineString=!0,a.sol()?("."==a.next()&&a.eol()&&(b._multiLineString=!1,b.tokenize=f),"string"):(a.eatSpace(),"#"==a.peek()?(a.skipToEnd(),"comment"):(a.skipToEnd(),"string"))}function h(a,b){for(var d,c=!1;null!=(d=a.next());){if(c&&"/"==d){b.tokenize=f;break}c="*"==d}return"comment"}function i(a){return function(b,c){for(var e,d=!1;null!=(e=b.next())&&(e!=a||d);)d=!d&&"\\"==e;return d||(c.tokenize=f),"string"}}var c=b("if elsif else stop require"),d=b("true false not"),e=a.indentUnit;return{startState:function(a){return{tokenize:f,baseIndent:a||0,_indent:0}},token:function(a,b){return a.eatSpace()?null:(b.tokenize||f)(a,b)},indent:function(a){return a.baseIndent+a._indent*e},electricChars:"}"}}),CodeMirror.defineMIME("application/sieve","sieve"),CodeMirror.defineMode("smalltalk",function(a){var b=/[+\-/\\*~<>=@%|&?!.:;^]/,c=/true|false|nil|self|super|thisContext/,d=function(a,b){this.next=a,this.parent=b},e=function(a,b,c){this.name=a,this.context=b,this.eos=c},f=function(){this.context=new d(g,null),this.expectVariable=!0,this.indentation=0,this.userIndentationDelta=0};f.prototype.userIndent=function(b){this.userIndentationDelta=b>0?b/a.indentUnit-this.indentation:0};var g=function(a,f,g){var k=new e(null,f,!1),l=a.next();return'"'===l?k=h(a,new d(h,f)):"'"===l?k=i(a,new d(i,f)):"#"===l?(a.eatWhile(/[^ .]/),k.name="string-2"):"$"===l?(a.eatWhile(/[^ ]/),k.name="string-2"):"|"===l&&g.expectVariable?k.context=new d(j,f):/[\[\]{}()]/.test(l)?(k.name="bracket",k.eos=/[\[{(]/.test(l),"["===l?g.indentation++:"]"===l&&(g.indentation=Math.max(0,g.indentation-1))):b.test(l)?(a.eatWhile(b),k.name="operator",k.eos=";"!==l):/\d/.test(l)?(a.eatWhile(/[\w\d]/),k.name="number"):/[\w_]/.test(l)?(a.eatWhile(/[\w\d_]/),k.name=g.expectVariable?c.test(a.current())?"keyword":"variable":null):k.eos=g.expectVariable,k},h=function(a,b){return a.eatWhile(/[^"]/),new e("comment",a.eat('"')?b.parent:b,!0)},i=function(a,b){return a.eatWhile(/[^']/),new e("string",a.eat("'")?b.parent:b,!1)},j=function(a,b){var c=new e(null,b,!1),d=a.next();return"|"===d?(c.context=b.parent,c.eos=!0):(a.eatWhile(/[^|]/),c.name="variable"),c};return{startState:function(){return new f},token:function(a,b){if(b.userIndent(a.indentation()),a.eatSpace())return null;var c=b.context.next(a,b.context,b);return b.context=c.context,b.expectVariable=c.eos,b.lastToken=c,c.name},blankLine:function(a){a.userIndent(0)},indent:function(b,c){var d=b.context.next===g&&c&&"]"===c.charAt(0)?-1:b.userIndentationDelta;return(b.indentation+d)*a.indentUnit},electricChars:"]"}}),CodeMirror.defineMIME("text/x-stsrc",{name:"smalltalk"}),CodeMirror.defineMode("smarty",function(a){function g(a,b){return c=b,a}function h(a,b){function c(c){return b.tokenize=c,c(a,b)}return a.match(e,!0)?a.eat("*")?c(k("comment","*"+f)):(b.tokenize=i,"tag"):(a.next(),null)}function i(a,e){if(a.match(f,!0))return e.tokenize=h,g("tag",null);var i=a.next();if("$"==i)return a.eatWhile(d.validIdentifier),g("variable-2","variable");if("."==i)return g("operator","property");if(d.stringChar.test(i))return e.tokenize=j(i),g("string","string");if(d.operatorChars.test(i))return a.eatWhile(d.operatorChars),g("operator","operator");if("["==i||"]"==i)return g("bracket","bracket");if(/\d/.test(i))return a.eatWhile(/\d/),g("number","number");if("variable"==e.last){if("@"==i)return a.eatWhile(d.validIdentifier),g("property","property");if("|"==i)return a.eatWhile(d.validIdentifier),g("qualifier","modifier")}else{if("whitespace"==e.last)return a.eatWhile(d.validIdentifier),g("attribute","modifier");if("property"==e.last)return a.eatWhile(d.validIdentifier),g("property",null);if(/\s/.test(i))return c="whitespace",null}var k="";"/"!=i&&(k+=i);for(var l="";l=a.eat(d.validIdentifier);)k+=l;var m,n;for(m=0,n=b.length;n>m;m++)if(b[m]==k)return g("keyword","keyword");return/\s/.test(i)?null:g("tag","tag")}function j(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=i;break}return"string"}}function k(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=h;break}c.next()}return a}}var c,b=["debug","extends","function","include","literal"],d={operatorChars:/[+\-*&%=<>!?]/,validIdentifier:/[a-zA-Z0-9\_]/,stringChar:/[\'\"]/},e=a.mode.leftDelimiter!==void 0?a.mode.leftDelimiter:"{",f=a.mode.rightDelimiter!==void 0?a.mode.rightDelimiter:"}";return{startState:function(){return{tokenize:h,mode:"smarty",last:null}},token:function(a,b){var d=b.tokenize(a,b);return b.last=c,d},electricChars:""}}),CodeMirror.defineMIME("text/x-smarty","smarty"),CodeMirror.defineMode("sparql",function(a){function d(a){return RegExp("^(?:"+a.join("|")+")$","i")}function h(a,b){var d=a.next();if(c=null,"$"==d||"?"==d)return a.match(/^[\w\d]*/),"variable-2";if("<"!=d||a.match(/^[\s\u00a0=]/,!1)){if('"'==d||"'"==d)return b.tokenize=i(d),b.tokenize(a,b);if(/[{}\(\),\.;\[\]]/.test(d))return c=d,null;if("#"==d)return a.skipToEnd(),"comment";if(g.test(d))return a.eatWhile(g),null;if(":"==d)return a.eatWhile(/[\w\d\._\-]/),"atom";if(a.eatWhile(/[_\w\d]/),a.eat(":"))return a.eatWhile(/[\w\d_\-]/),"atom";var h=a.current();return e.test(h)?null:f.test(h)?"keyword":"variable"}return a.match(/^[^\s\u00a0>]*>?/),"atom"}function i(a){return function(b,c){for(var e,d=!1;null!=(e=b.next());){if(e==a&&!d){c.tokenize=h;break}d=!d&&"\\"==e}return"string"}}function j(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function k(a){a.indent=a.context.indent,a.context=a.context.prev}var c,b=a.indentUnit,e=d(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","isblank","isliteral","union","a"]),f=d(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc"]),g=/[*+\-<>=&|]/;return{startState:function(){return{tokenize:h,context:null,indent:0,col:0}},token:function(a,b){if(a.sol()&&(b.context&&null==b.context.align&&(b.context.align=!1),b.indent=a.indentation()),a.eatSpace())return null;var d=b.tokenize(a,b);if("comment"!=d&&b.context&&null==b.context.align&&"pattern"!=b.context.type&&(b.context.align=!0),"("==c)j(b,")",a.column());else if("["==c)j(b,"]",a.column());else if("{"==c)j(b,"}",a.column());else if(/[\]\}\)]/.test(c)){for(;b.context&&"pattern"==b.context.type;)k(b);b.context&&c==b.context.type&&k(b)}else"."==c&&b.context&&"pattern"==b.context.type?k(b):/atom|string|variable/.test(d)&&b.context&&(/[\}\]]/.test(b.context.type)?j(b,"pattern",a.column()):"pattern"!=b.context.type||b.context.align||(b.context.align=!0,b.context.col=a.column()));return d},indent:function(a,c){var d=c&&c.charAt(0),e=a.context;if(/[\]\}]/.test(d))for(;e&&"pattern"==e.type;)e=e.prev;var f=e&&d==e.type;return e?"pattern"==e.type?e.col:e.align?e.col+(f?0:1):e.indent+(f?0:b):0}}}),CodeMirror.defineMIME("application/x-sparql-query","sparql"),CodeMirror.defineMode("stex",function(){function a(a,b){a.cmdState.push(b)}function b(a){return a.cmdState.length>0?a.cmdState[a.cmdState.length-1]:null}function c(a){if(a.cmdState.length>0){var b=a.cmdState.pop();b.closeBracket()}}function d(a){for(var b=a.cmdState,c=b.length-1;c>=0;c--){var d=b[c];if("DEFAULT"!=d.name)return d.styleIdentifier()}return null}function e(a,b,c,d){return function(){this.name=a,this.bracketNo=0,this.style=b,this.styles=d,this.brackets=c,this.styleIdentifier=function(){return this.bracketNo<=this.styles.length?this.styles[this.bracketNo-1]:null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}function g(a,b){a.f=b}function h(c,e){if(c.match(/^\\[a-zA-Z@]+/)){var h=c.current();h=h.substr(1,h.length-1);var k;return k=f.hasOwnProperty(h)?f[h]:f.DEFAULT,k=new k,a(e,k),g(e,j),k.style}if(c.match(/^\\[$&%#{}_]/))return"tag";if(c.match(/^\\[,;!\/]/))return"tag";var l=c.next();return"%"==l?(c.eol()||g(e,i),"comment"):"}"==l||"]"==l?(k=b(e))?(k.closeBracket(l),g(e,j),"bracket"):"error":"{"==l||"["==l?(k=f.DEFAULT,k=new k,a(e,k),"bracket"):/\d/.test(l)?(c.eatWhile(/[\w.%]/),"atom"):(c.eatWhile(/[\w-_]/),d(e))}function i(a,b){return a.skipToEnd(),g(b,h),"comment"}function j(a,d){var e=a.peek();if("{"==e||"["==e){var f=b(d);return f.openBracket(e),a.eat(e),g(d,h),"bracket"}return/[ \t\r]/.test(e)?(a.eat(e),null):(g(d,h),f=b(d),f&&c(d),h(a,d))}var f=Array();return f.importmodule=e("importmodule","tag","{[",["string","builtin"]),f.documentclass=e("documentclass","tag","{[",["","atom"]),f.usepackage=e("documentclass","tag","[",["atom"]),f.begin=e("documentclass","tag","[",["atom"]),f.end=e("documentclass","tag","[",["atom"]),f.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{f:h,cmdState:[]}},copyState:function(a){return{f:a.f,cmdState:a.cmdState.slice(0,a.cmdState.length)}},token:function(a,b){var c=b.f(a,b);return c}}}),CodeMirror.defineMIME("text/x-stex","stex"),CodeMirror.defineMIME("text/x-latex","stex"),CodeMirror.defineMode("tiddlywiki",function(){function o(a,b,c){return b.tokenize=c,c(a,b)}function r(a,b,c){return p=a,q=c,b}function s(b,m){var p,n=b.sol();if(m.block=!1,p=b.peek(),n&&/[<\/\*{}\-]/.test(p)){if(b.match(l))return m.block=!0,o(b,m,v);if(b.match(g))return r("quote","quote");if(b.match(e)||b.match(f))return r("code","comment");if(b.match(h)||b.match(i)||b.match(j)||b.match(k))return r("code","comment");if(b.match(d))return r("hr","hr")}if(p=b.next(),n&&/[\/\*!#;:>|]/.test(p)){if("!"==p)return b.skipToEnd(),r("header","header");if("*"==p)return b.eatWhile("*"),r("list","comment");if("#"==p)return b.eatWhile("#"),r("list","comment");if(";"==p)return b.eatWhile(";"),r("list","comment");if(":"==p)return b.eatWhile(":"),r("list","comment");if(">"==p)return b.eatWhile(">"),r("quote","quote");if("|"==p)return r("table","header")}if("{"==p&&b.match(/\{\{/))return o(b,m,v);if(/[hf]/i.test(p)&&/[ti]/i.test(b.peek())&&b.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return r("link","link");if('"'==p)return r("string","string");if("~"==p)return r("text","brace");if(/[\[\]]/.test(p)&&b.peek()==p)return b.next(),r("brace","brace");if("@"==p)return b.eatWhile(c),r("link","link");if(/\d/.test(p))return b.eatWhile(/\d/),r("number","number");if("/"==p){if(b.eat("%"))return o(b,m,t);if(b.eat("/"))return o(b,m,w)}if("_"==p&&b.eat("_"))return o(b,m,x);if("-"==p&&b.eat("-")){if(" "!=b.peek())return o(b,m,y);if(" "==b.peek())return r("text","brace")}if("'"==p&&b.eat("'"))return o(b,m,u);if("<"!=p)return r(p);if(b.eat("<"))return o(b,m,z);b.eatWhile(/[\w\$_]/);var q=b.current(),s=a.propertyIsEnumerable(q)&&a[q];return s?r(s.type,s.style,q):r("text",null,q)}function t(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=s;break}c="%"==d}return r("comment","comment")}function u(a,b){for(var d,c=!1;d=a.next();){if("'"==d&&c){b.tokenize=s;break}c="'"==d}return r("text","strong")}function v(a,b){var c,d=b.block;return d&&a.current()?r("code","comment"):!d&&a.match(n)?(b.tokenize=s,r("code","comment")):d&&a.sol()&&a.match(m)?(b.tokenize=s,r("code","comment")):(c=a.next(),d?r("code","comment"):r("code","comment"))}function w(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=s;break}c="/"==d}return r("text","em")}function x(a,b){for(var d,c=!1;d=a.next();){if("_"==d&&c){b.tokenize=s;break}c="_"==d}return r("text","underlined")}function y(a,b){for(var d,c=!1;d=a.next();){if("-"==d&&c){b.tokenize=s;break}c="-"==d}return r("text","strikethrough")}function z(a,c){var d,e,f;return"<<"==a.current()?r("brace","macro"):(d=a.next())?">"==d&&">"==a.peek()?(a.next(),c.tokenize=s,r("brace","macro")):(a.eatWhile(/[\w\$_]/),e=a.current(),f=b.propertyIsEnumerable(e)&&b[e],f?r(f.type,f.style,e):r("macro",null,e)):(c.tokenize=s,r(d))}var p,q,a={},b=function(){function a(a){return{type:a,style:"macro"}}return{allTags:a("allTags"),closeAll:a("closeAll"),list:a("list"),newJournal:a("newJournal"),newTiddler:a("newTiddler"),permaview:a("permaview"),saveChanges:a("saveChanges"),search:a("search"),slider:a("slider"),tabs:a("tabs"),tag:a("tag"),tagging:a("tagging"),tags:a("tags"),tiddler:a("tiddler"),timeline:a("timeline"),today:a("today"),version:a("version"),option:a("option"),"with":a("with"),filter:a("filter")}}(),c=/[\w_\-]/i,d=/^\-\-\-\-+$/,e=/^\/\*\*\*$/,f=/^\*\*\*\/$/,g=/^<<<$/,h=/^\/\/\{\{\{$/,i=/^\/\/\}\}\}$/,j=/^<!--\{\{\{-->$/,k=/^<!--\}\}\}-->$/,l=/^\{\{\{$/,m=/^\}\}\}$/,n=/.*?\}\}\}/;return{startState:function(){return{tokenize:s,indented:0,level:0}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c},electricChars:""}}),CodeMirror.defineMIME("text/x-tiddlywiki","tiddlywiki"),CodeMirror.defineMode("tiki",function(a){function b(a,b,c){return function(e,f){for(;!e.eol();){if(e.match(b)){f.tokenize=d;break}e.next()}return c&&(f.tokenize=c),a}}function c(a){return function(b,c){for(;!b.eol();)b.next();return c.tokenize=d,a}}function d(a,e){function f(b){return e.tokenize=b,b(a,e)}var g=a.sol(),i=a.next();switch(i){case"{":a.eat("/"),a.eatSpace();for(var k,j="";k=a.eat(/[^\s\u00a0=\"\'\/?(}]/);)j+=k;return e.tokenize=h,"tag";case"_":if(a.eat("_"))return f(b("strong","__",d));break;case"'":if(a.eat("'"))return f(b("em","''",d));break;case"(":if(a.eat("("))return f(b("variable-2","))",d));break;case"[":return f(b("variable-3","]",d));case"|":if(a.eat("|"))return f(b("comment","||"));break;case"-":if(a.eat("="))return f(b("header string","=-",d));if(a.eat("-"))return f(b("error tw-deleted","--",d));break;case"=":if(a.match("=="))return f(b("tw-underline","===",d));break;case":":if(a.eat(":"))return f(b("comment","::"));break;case"^":return f(b("tw-box","^"));case"~":if(a.match("np~"))return f(b("meta","~/np~"))}if(g)switch(i){case"!":return a.match("!!!!!")?f(c("header string")):a.match("!!!!")?f(c("header string")):a.match("!!!")?f(c("header string")):a.match("!!")?f(c("header string")):f(c("header string"));case"*":case"#":case"+":return f(c("tw-listitem bracket"))}return null}function h(a,b){var c=a.next(),e=a.peek();return"}"==c?(b.tokenize=d,"tag"):"("==c||")"==c?"bracket":"="==c?(g="equals",">"==e&&(c=a.next(),e=a.peek()),/[\'\"]/.test(e)||(b.tokenize=j()),"operator"):/[\'\"]/.test(c)?(b.tokenize=i(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")
}function i(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=h;break}return"string"}}function j(){return function(a,b){for(;!a.eol();){var c=a.next(),d=a.peek();if(" "==c||","==c||/[ )}]/.test(d)){b.tokenize=h;break}}return"string"}}function m(){for(var a=arguments.length-1;a>=0;a--)k.cc.push(arguments[a])}function n(){return m.apply(null,arguments),!0}function o(a,b){var c=k.context&&k.context.noIndent;k.context={prev:k.context,pluginName:a,indent:k.indented,startOfLine:b,noIndent:c}}function p(){k.context&&(k.context=k.context.prev)}function q(a){if("openPlugin"==a)return k.pluginName=f,n(t,r(k.startOfLine));if("closePlugin"==a){var b=!1;return k.context?(b=k.context.pluginName!=f,p()):b=!0,b&&(l="error"),n(s(b))}return"string"==a?(k.context&&"!cdata"==k.context.name||o("!cdata"),k.tokenize==d&&p(),n()):n()}function r(a){return function(b){return"selfclosePlugin"==b||"endPlugin"==b?n():"endPlugin"==b?(o(k.pluginName,a),n()):n()}}function s(a){return function(b){return a&&(l="error"),"endPlugin"==b?n():m()}}function t(a){return"keyword"==a?(l="attribute",n(t)):"equals"==a?n(u,t):m()}function u(a){return"keyword"==a?(l="string",n()):"string"==a?n(v):m()}function v(a){return"string"==a?n(v):m()}var f,g,k,l,e=a.indentUnit;return{startState:function(){return{tokenize:d,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(a,b){if(a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;l=g=f=null;var c=b.tokenize(a,b);if((c||g)&&"comment"!=c)for(k=b;;){var d=b.cc.pop()||q;if(d(g||c))break}return b.startOfLine=!1,l||c},indent:function(a,b){var c=a.context;if(c&&c.noIndent)return 0;for(c&&/^{\//.test(b)&&(c=c.prev);c&&!c.startOfLine;)c=c.prev;return c?c.indent+e:0},electricChars:"/"}}),CodeMirror.defineMIME("text/tiki","tiki"),CodeMirror.defineMode("vb",function(a,b){function d(a){return RegExp("^(("+a.join(")|(")+"))\\b","i")}function z(a,b){b.currentIndent++}function A(a,b){b.currentIndent--}function B(a,b){if(a.eatSpace())return null;var d=a.peek();if("'"===d)return a.skipToEnd(),"comment";if(a.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var k=!1;if(a.match(/^\d*\.\d+F?/i)?k=!0:a.match(/^\d+\.\d*F?/)?k=!0:a.match(/^\.\d+F?/)&&(k=!0),k)return a.eat(/J/i),"number";var l=!1;if(a.match(/^&H[0-9a-f]+/i)?l=!0:a.match(/^&O[0-7]+/i)?l=!0:a.match(/^[1-9]\d*F?/)?(a.eat(/J/i),l=!0):a.match(/^0(?![\dx])/i)&&(l=!0),l)return a.eat(/L/i),"number"}return a.match(s)?(b.tokenize=C(a.current()),b.tokenize(a,b)):a.match(i)||a.match(h)?null:a.match(g)||a.match(e)||a.match(n)?"operator":a.match(f)?null:a.match(x)?(z(a,b),b.doInCurrentLine=!0,"keyword"):a.match(t)?(b.doInCurrentLine?b.doInCurrentLine=!1:z(a,b),"keyword"):a.match(u)?"keyword":a.match(w)?(A(a,b),A(a,b),"keyword"):a.match(v)?(A(a,b),"keyword"):a.match(r)?"keyword":a.match(q)?"keyword":a.match(j)?"variable":(a.next(),c)}function C(a){var d=1==a.length,e="string";return function(f,g){for(;!f.eol();){if(f.eatWhile(/[^'"]/),f.match(a))return g.tokenize=B,e;f.eat(/['"]/)}if(d){if(b.singleLineStringErrors)return c;g.tokenize=B}return e}}function D(a,b){var d=b.tokenize(a,b),e=a.current();if("."===e)return d=b.tokenize(a,b),e=a.current(),"variable"===d?"variable":c;var f="[({".indexOf(e);return-1!==f&&z(a,b),"dedent"===y&&A(a,b)?c:(f="])}".indexOf(e),-1!==f&&A(a,b)?c:d)}var c="error",e=RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),f=RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),g=RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),h=RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),i=RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),j=RegExp("^[_A-Za-z][_A-Za-z0-9]*"),k=["class","module","sub","enum","select","while","if","function","get","set","property","try"],l=["else","elseif","case","catch"],m=["next","loop"],n=d(["and","or","not","xor","in"]),o=["as","dim","break","continue","optional","then","until","goto","byval","byref","new","handles","property","return","const","private","protected","friend","public","shared","static","true","false"],p=["integer","string","double","decimal","boolean","short","char","float","single"],q=d(o),r=d(p),s='"',t=d(k),u=d(l),v=d(m),w=d(["end"]),x=d(["do"]),y=null,E={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:B,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(a,b){a.sol()&&(b.currentIndent+=b.nextLineIndent,b.nextLineIndent=0,b.doInCurrentLine=0);var c=D(a,b);return b.lastToken={style:c,content:a.current()},c},indent:function(b,c){var d=c.replace(/^\s+|\s+$/g,"");return d.match(v)||d.match(w)||d.match(u)?a.indentUnit*(b.currentIndent-1):0>b.currentIndent?0:b.currentIndent*a.indentUnit}};return E}),CodeMirror.defineMIME("text/x-vb","vb"),CodeMirror.defineMode("vbscript",function(){var a=/^(?:Call|Case|CDate|Clear|CInt|CLng|Const|CStr|Description|Dim|Do|Each|Else|ElseIf|End|Err|Error|Exit|False|For|Function|If|LCase|Loop|LTrim|Next|Nothing|Now|Number|On|Preserve|Quit|ReDim|Resume|RTrim|Select|Set|Sub|Then|To|Trim|True|UBound|UCase|Until|VbCr|VbCrLf|VbLf|VbTab)$/im;return{token:function(b){if(b.eatSpace())return null;var c=b.next();return"'"==c?(b.skipToEnd(),"comment"):'"'==c?(b.skipTo('"'),"string"):/\w/.test(c)&&(b.eatWhile(/\w/),a.test(b.current()))?"keyword":null}}}),CodeMirror.defineMIME("text/vbscript","vbscript"),CodeMirror.defineMode("velocity",function(){function a(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function f(a,b,c){return b.tokenize=c,c(a,b)}function g(a,g){var k=g.beforeParams;g.beforeParams=!1;var l=a.next();if('"'!=l&&"'"!=l||!g.inParams){if(/[\[\]{}\(\),;\.]/.test(l))return"("==l&&k?g.inParams=!0:")"==l&&(g.inParams=!1),null;if(/\d/.test(l))return a.eatWhile(/[\w\.]/),"number";if("#"==l&&a.eat("*"))return f(a,g,i);if("#"==l&&a.match(/ *\[ *\[/))return f(a,g,j);if("#"==l&&a.eat("#"))return a.skipToEnd(),"comment";if("$"==l)return a.eatWhile(/[\w\d\$_\.{}]/),d&&d.propertyIsEnumerable(a.current().toLowerCase())?"keyword":(g.beforeParams=!0,"builtin");if(e.test(l))return a.eatWhile(e),"operator";a.eatWhile(/[\w\$_{}]/);var m=a.current().toLowerCase();return b&&b.propertyIsEnumerable(m)?"keyword":c&&c.propertyIsEnumerable(m)||a.current().match(/^#[a-z0-9_]+ *$/i)&&"("==a.peek()?(g.beforeParams=!0,"keyword"):null}return f(a,g,h(l))}function h(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return f&&(c.tokenize=g),"string"}}function i(a,b){for(var d,c=!1;d=a.next();){if("#"==d&&c){b.tokenize=g;break}c="*"==d}return"comment"}function j(a,b){for(var d,c=0;d=a.next();){if("#"==d&&2==c){b.tokenize=g;break}"]"==d?c++:" "!=d&&(c=0)}return"meta"}var b=a("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),c=a("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),d=a("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent $velocityCount"),e=/[+\-*&%=<>!?:\/|]/;return{startState:function(){return{tokenize:g,beforeParams:!1,inParams:!1}},token:function(a,b){return a.eatSpace()?null:b.tokenize(a,b)}}}),CodeMirror.defineMIME("text/velocity","velocity"),CodeMirror.defineMode("verilog",function(a,b){function k(a,b){var c=a.next();if(g[c]){var h=g[c](a,b);if(h!==!1)return h}if('"'==c)return b.tokenize=l(c),b.tokenize(a,b);if(/[\[\]{}\(\),;\:\.]/.test(c))return j=c,null;if(/[\d']/.test(c))return a.eatWhile(/[\w\.']/),"number";if("/"==c){if(a.eat("*"))return b.tokenize=m,m(a,b);if(a.eat("/"))return a.skipToEnd(),"comment"}if(i.test(c))return a.eatWhile(i),"operator";a.eatWhile(/[\w\$_]/);var k=a.current();return d.propertyIsEnumerable(k)?(e.propertyIsEnumerable(k)&&(j="newstatement"),"keyword"):f.propertyIsEnumerable(k)?"atom":"variable"}function l(a){return function(b,c){for(var e,d=!1,f=!1;null!=(e=b.next());){if(e==a&&!d){f=!0;break}d=!d&&"\\"==e}return(f||!d&&!h)&&(c.tokenize=k),"string"}}function m(a,b){for(var d,c=!1;d=a.next();){if("/"==d&&c){b.tokenize=k;break}c="*"==d}return"comment"}function n(a,b,c,d,e){this.indented=a,this.column=b,this.type=c,this.align=d,this.prev=e}function o(a,b,c){return a.context=new n(a.indented,b,c,null,a.context)}function p(a){var b=a.context.type;return(")"==b||"]"==b||"}"==b)&&(a.indented=a.context.indented),a.context=a.context.prev}var j,c=a.indentUnit,d=b.keywords||{},e=b.blockKeywords||{},f=b.atoms||{},g=b.hooks||{},h=b.multiLineStrings,i=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/;return{startState:function(a){return{tokenize:null,context:new n((a||0)-c,0,"top",!1),indented:0,startOfLine:!0}},token:function(a,b){var c=b.context;if(a.sol()&&(null==c.align&&(c.align=!1),b.indented=a.indentation(),b.startOfLine=!0),a.eatSpace())return null;j=null;var d=(b.tokenize||k)(a,b);if("comment"==d||"meta"==d)return d;if(null==c.align&&(c.align=!0),";"!=j&&":"!=j||"statement"!=c.type)if("{"==j)o(b,a.column(),"}");else if("["==j)o(b,a.column(),"]");else if("("==j)o(b,a.column(),")");else if("}"==j){for(;"statement"==c.type;)c=p(b);for("}"==c.type&&(c=p(b));"statement"==c.type;)c=p(b)}else j==c.type?p(b):("}"==c.type||"top"==c.type||"statement"==c.type&&"newstatement"==j)&&o(b,a.column(),"statement");else p(b);return b.startOfLine=!1,d},indent:function(a,b){if(a.tokenize!=k&&null!=a.tokenize)return 0;var d=b&&b.charAt(0),e=a.context,f=d==e.type;return"statement"==e.type?e.indented+("{"==d?0:c):e.align?e.column+(f?0:1):e.indented+(f?0:c)},electricChars:"{}"}}),function(){function a(a){for(var b={},c=a.split(" "),d=0;c.length>d;++d)b[c[d]]=!0;return b}function d(a){return a.eatWhile(/[\w\$_]/),"meta"}var b="always and assign automatic begin buf bufif0 bufif1 case casex casez cell cmos config deassign default defparam design disable edge else end endcase endconfig endfunction endgenerate endmodule endprimitive endspecify endtable endtask event for force forever fork function generate genvar highz0 highz1 if ifnone incdir include initial inout input instance integer join large liblist library localparam macromodule medium module nand negedge nmos nor noshowcancelled not notif0 notif1 or output parameter pmos posedge primitive pull0 pull1 pulldown pullup pulsestyle_onevent pulsestyle_ondetect rcmos real realtime reg release repeat rnmos rpmos rtran rtranif0 rtranif1 scalared showcancelled signed small specify specparam strong0 strong1 supply0 supply1 table task time tran tranif0 tranif1 tri tri0 tri1 triand trior trireg unsigned use vectored wait wand weak0 weak1 while wire wor xnor xor",c="begin bufif0 bufif1 case casex casez config else end endcase endconfig endfunction endgenerate endmodule endprimitive endspecify endtable endtask for forever function generate if ifnone macromodule module primitive repeat specify table task while";CodeMirror.defineMIME("text/x-verilog",{name:"verilog",keywords:a(b),blockKeywords:a(c),atoms:a("null"),hooks:{"`":d,$:d}})}(),CodeMirror.defineMode("xml",function(a,b){function h(a,b){function c(c){return b.tokenize=c,c(a,b)}var d=a.next();if("<"==d){if(a.eat("!"))return a.eat("[")?a.match("CDATA[")?c(k("atom","]]>")):null:a.match("--")?c(k("comment","-->")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),c(l(1))):null;if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),b.tokenize=k("meta","?>"),"meta";var e=a.eat("/");f="";for(var h;h=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)f+=h;return f?(g=e?"closeTag":"openTag",b.tokenize=i,"tag"):"error"}if("&"==d){var j;return j=a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"),j?"atom":"error"}return a.eatWhile(/[^&<]/),null}function i(a,b){var c=a.next();return">"==c||"/"==c&&a.eat(">")?(b.tokenize=h,g=">"==c?"endTag":"selfcloseTag","tag"):"="==c?(g="equals",null):/[\'\"]/.test(c)?(b.tokenize=j(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function j(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=i;break}return"string"}}function k(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=h;break}c.next()}return a}}function l(a){return function(b,c){for(var d;null!=(d=b.next());){if("<"==d)return c.tokenize=l(a+1),c.tokenize(b,c);if(">"==d){if(1==a){c.tokenize=h;break}return c.tokenize=l(a-1),c.tokenize(b,c)}}return"meta"}}function o(){for(var a=arguments.length-1;a>=0;a--)m.cc.push(arguments[a])}function p(){return o.apply(null,arguments),!0}function q(a,b){var c=d.doNotIndent.hasOwnProperty(a)||m.context&&m.context.noIndent;m.context={prev:m.context,tagName:a,indent:m.indented,startOfLine:b,noIndent:c}}function r(){m.context&&(m.context=m.context.prev)}function s(a){if("openTag"==a)return m.tagName=f,p(w,t(m.startOfLine));if("closeTag"==a){var b=!1;return m.context?m.context.tagName!=f&&(d.implicitlyClosed.hasOwnProperty(m.context.tagName.toLowerCase())&&r(),b=!m.context||m.context.tagName!=f):b=!0,b&&(n="error"),p(u(b))}return p()}function t(a){return function(b){var c=m.tagName;return m.tagName=null,"selfcloseTag"==b||"endTag"==b&&d.autoSelfClosers.hasOwnProperty(c.toLowerCase())?(v(c.toLowerCase()),p()):"endTag"==b?(v(c.toLowerCase()),q(c,a),p()):p()}}function u(a){return function(b){return a&&(n="error"),"endTag"==b?(r(),p()):(n="error",p(arguments.callee))}}function v(a){for(var b;;){if(!m.context)return;if(b=m.context.tagName.toLowerCase(),!d.contextGrabbers.hasOwnProperty(b)||!d.contextGrabbers[b].hasOwnProperty(a))return;r()}}function w(a){return"word"==a?(n="attribute",p(x,w)):"endTag"==a||"selfcloseTag"==a?o():(n="error",p(w))}function x(a){return"equals"==a?p(y,w):(d.allowMissing?"word"==a&&(n="attribute"):n="error","endTag"==a||"selfcloseTag"==a?o():p())}function y(a){return"string"==a?p(z):"word"==a&&d.allowUnquoted?(n="string",p()):(n="error","endTag"==a||"selfCloseTag"==a?o():p())}function z(a){return"string"==a?p(z):o()}var f,g,m,n,c=a.indentUnit,d=b.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},e=b.alignCDATA;return{startState:function(){return{tokenize:h,cc:[],indented:0,startOfLine:!0,tagName:null,context:null}},token:function(a,b){if(a.sol()&&(b.startOfLine=!0,b.indented=a.indentation()),a.eatSpace())return null;n=g=f=null;var c=b.tokenize(a,b);if(b.type=g,(c||g)&&"comment"!=c)for(m=b;;){var d=b.cc.pop()||s;if(d(g||c))break}return b.startOfLine=!1,n||c},indent:function(a,b,d){var f=a.context;if(a.tokenize!=i&&a.tokenize!=h||f&&f.noIndent)return d?d.match(/^(\s*)/)[0].length:0;if(e&&/<!\[CDATA\[/.test(b))return 0;for(f&&/^<\//.test(b)&&(f=f.prev);f&&!f.startOfLine;)f=f.prev;return f?f.indent+c:0},electricChars:"/",configuration:b.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),CodeMirror.defineMode("xquery",function(){function d(a,d,e){return b=a,c=e,d}function e(a,b,c){return b.tokenize=c,c(a,b)}function f(b,c){var f=b.next(),k=!1,p=s(b);if("<"==f){if(b.match("!--",!0))return e(b,c,l);if(b.match("![CDATA",!1))return c.tokenize=m,d("tag","tag");if(b.match("?",!1))return e(b,c,n);var r=b.eat("/");b.eatSpace();for(var w,t="";w=b.eat(/[^\s\u00a0=<>\"\'\/?]/);)t+=w;return e(b,c,j(t,r))}if("{"==f)return u(c,{type:"codeblock"}),d("","");if("}"==f)return v(c),d("","");if(o(c))return">"==f?d("tag","tag"):"/"==f&&b.eat(">")?(v(c),d("tag","tag")):d("word","variable");if(/\d/.test(f))return b.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),d("number","atom");if("("===f&&b.eat(":"))return u(c,{type:"comment"}),e(b,c,g);if(p||'"'!==f&&"'"!==f){if("$"===f)return e(b,c,i);if(":"===f&&b.eat("="))return d("operator","keyword");if("("===f)return u(c,{type:"paren"}),d("","");if(")"===f)return v(c),d("","");if("["===f)return u(c,{type:"bracket"}),d("","");if("]"===f)return v(c),d("","");var x=a.propertyIsEnumerable(f)&&a[f];if(p&&'"'===f)for(;'"'!==b.next(););if(p&&"'"===f)for(;"'"!==b.next(););x||b.eatWhile(/[\w\$_-]/);var y=b.eat(":");!b.eat(":")&&y&&b.eatWhile(/[\w\$_-]/),b.match(/^[ \t]*\(/,!1)&&(k=!0);var z=b.current();return x=a.propertyIsEnumerable(z)&&a[z],k&&!x&&(x={type:"function_call",style:"variable def"}),q(c)?(v(c),d("word","variable",z)):(("element"==z||"attribute"==z||"axis_specifier"==x.type)&&u(c,{type:"xmlconstructor"}),x?d(x.type,x.style,z):d("word","variable",z))}return e(b,c,h(f))}function g(a,b){for(var g,c=!1,e=!1,f=0;g=a.next();){if(")"==g&&c){if(!(f>0)){v(b);break}f--}else":"==g&&e&&f++;c=":"==g,e="("==g}return d("comment","comment")}function h(a,b){return function(c,e){var g;if(r(e)&&c.current()==a)return v(e),b&&(e.tokenize=b),d("string","string");if(u(e,{type:"string",name:a,tokenize:h(a,b)}),c.match("{",!1)&&p(e))return e.tokenize=f,d("string","string");for(;g=c.next();){if(g==a){v(e),b&&(e.tokenize=b);break}if(c.match("{",!1)&&p(e))return e.tokenize=f,d("string","string")}return d("string","string")}}function i(a,b){var c=/[\w\$_-]/;if(a.eat('"')){for(;'"'!==a.next(););a.eat(":")}else a.eatWhile(c),a.match(":=",!1)||a.eat(":");return a.eatWhile(c),b.tokenize=f,d("variable","variable")}function j(a,b){return function(c,e){return c.eatSpace(),b&&c.eat(">")?(v(e),e.tokenize=f,d("tag","tag")):(c.eat("/")||u(e,{type:"tag",name:a,tokenize:f}),c.eat(">")?(e.tokenize=f,d("tag","tag")):(e.tokenize=k,d("tag","tag")))}}function k(a,b){var c=a.next();return"/"==c&&a.eat(">")?(p(b)&&v(b),o(b)&&v(b),d("tag","tag")):">"==c?(p(b)&&v(b),d("tag","tag")):"="==c?d("",""):'"'==c||"'"==c?e(a,b,h(c,k)):(p(b)||u(b,{type:"attribute",name:name,tokenize:k}),a.eat(/[a-zA-Z_:]/),a.eatWhile(/[-a-zA-Z0-9_:.]/),a.eatSpace(),(a.match(">",!1)||a.match("/",!1))&&(v(b),b.tokenize=f),d("attribute","attribute"))}function l(a,b){for(var c;c=a.next();)if("-"==c&&a.match("->",!0))return b.tokenize=f,d("comment","comment")}function m(a,b){for(var c;c=a.next();)if("]"==c&&a.match("]",!0))return b.tokenize=f,d("comment","comment")}function n(a,b){for(var c;c=a.next();)if("?"==c&&a.match(">",!0))return b.tokenize=f,d("comment","comment meta")}function o(a){return t(a,"tag")}function p(a){return t(a,"attribute")}function q(a){return t(a,"xmlconstructor")}function r(a){return t(a,"string")}function s(a){return'"'===a.current()?a.match(/^[^\"]+\"\:/,!1):"'"===a.current()?a.match(/^[^\"]+\'\:/,!1):!1}function t(a,b){return a.stack.length&&a.stack[a.stack.length-1].type==b}function u(a,b){a.stack.push(b)}function v(a){a.stack.pop();var b=a.stack.length&&a.stack[a.stack.length-1].tokenize;a.tokenize=b||f}var b,c,a=function(){function a(a){return{type:a,style:"keyword"}}for(var b=a("keyword a"),c=a("keyword b"),d=a("keyword c"),e=a("operator"),f={type:"atom",style:"atom"},g={type:"punctuation",style:""},h={type:"axis_specifier",style:"qualifier"},i={"if":b,"switch":b,"while":b,"for":b,"else":c,then:c,"try":c,"finally":c,"catch":c,element:d,attribute:d,let:d,"implements":d,"import":d,module:d,namespace:d,"return":d,"super":d,"this":d,"throws":d,where:d,"private":d,",":g,"null":f,"fn:false()":f,"fn:true()":f},j=["after","ancestor","ancestor-or-self","and","as","ascending","assert","attribute","before","by","case","cast","child","comment","declare","default","define","descendant","descendant-or-self","descending","document","document-node","element","else","eq","every","except","external","following","following-sibling","follows","for","function","if","import","in","instance","intersect","item","let","module","namespace","node","node","of","only","or","order","parent","precedes","preceding","preceding-sibling","processing-instruction","ref","return","returns","satisfies","schema","schema-element","self","some","sortby","stable","text","then","to","treat","typeswitch","union","variable","version","where","xquery","empty-sequence"],k=0,l=j.length;l>k;k++)i[j[k]]=a(j[k]);for(var m=["xs:string","xs:float","xs:decimal","xs:double","xs:integer","xs:boolean","xs:date","xs:dateTime","xs:time","xs:duration","xs:dayTimeDuration","xs:time","xs:yearMonthDuration","numeric","xs:hexBinary","xs:base64Binary","xs:anyURI","xs:QName","xs:byte","xs:boolean","xs:anyURI","xf:yearMonthDuration"],k=0,l=m.length;l>k;k++)i[m[k]]=f;for(var n=["eq","ne","lt","le","gt","ge",":=","=",">",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],k=0,l=n.length;l>k;k++)i[n[k]]=e;for(var o=["self::","attribute::","child::","descendant::","descendant-or-self::","parent::","ancestor::","ancestor-or-self::","following::","preceding::","following-sibling::","preceding-sibling::"],k=0,l=o.length;l>k;k++)i[o[k]]=h;return i}();return{startState:function(){return{tokenize:f,cc:[],stack:[]}},token:function(a,b){if(a.eatSpace())return null;var c=b.tokenize(a,b);return c}}}),CodeMirror.defineMIME("application/xquery","xquery"),CodeMirror.defineMode("yaml",function(){var a=["true","false","on","off","yes","no"],b=RegExp("\\b(("+a.join(")|(")+"))$","i");return{token:function(a,c){var d=a.peek(),e=c.escaped;if(c.escaped=!1,"#"==d)return a.skipToEnd(),"comment";if(c.literal&&a.indentation()>c.keyCol)return a.skipToEnd(),"string";if(c.literal&&(c.literal=!1),a.sol()){if(c.keyCol=0,c.pair=!1,c.pairStart=!1,a.match(/---/))return"def";if(a.match(/\.\.\./))return"def";if(a.match(/\s*-\s+/))return"meta"}if(!c.pair&&a.match(/^\s*([a-z0-9\._-])+(?=\s*:)/i))return c.pair=!0,c.keyCol=a.indentation(),"atom";if(c.pair&&a.match(/^:\s*/))return c.pairStart=!0,"meta";if(a.match(/^(\{|\}|\[|\])/))return"{"==d?c.inlinePairs++:"}"==d?c.inlinePairs--:"["==d?c.inlineList++:c.inlineList--,"meta";if(c.inlineList>0&&!e&&","==d)return a.next(),"meta";if(c.inlinePairs>0&&!e&&","==d)return c.keyCol=0,c.pair=!1,c.pairStart=!1,a.next(),"meta";if(c.pairStart){if(a.match(/^\s*(\||\>)\s*/))return c.literal=!0,"meta";if(a.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i))return"variable-2";if(0==c.inlinePairs&&a.match(/^\s*-?[0-9\.\,]+\s?$/))return"number";if(c.inlinePairs>0&&a.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/))return"number";if(a.match(b))return"keyword"}return c.pairStart=!1,c.escaped="\\"==d,a.next(),null},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}}),CodeMirror.defineMIME("text/x-yaml","yaml"),CodeMirror.defineMode("z80",function(){var a=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,b=/^(call|j[pr]|ret[in]?)\b/i,c=/^b_?(call|jump)\b/i,d=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,e=/^(n?[zc]|p[oe]?|m)\b/i,f=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,g=/^([\da-f]+h|[0-7]+o|[01]+b|\d+)\b/i;return{startState:function(){return{context:0}},token:function(h,i){if(h.column()||(i.context=0),h.eatSpace())return null;var j;if(h.eatWhile(/\w/)){if(j=h.current(),!h.indentation())return g.test(j)?"number":null;if(1==i.context&&d.test(j))return"variable-2";if(2==i.context&&e.test(j))return"variable-3";if(a.test(j))return i.context=1,"keyword";if(b.test(j))return i.context=2,"keyword";if(c.test(j))return i.context=3,"keyword";if(f.test(j))return"error"}else{if(h.eat(";"))return h.skipToEnd(),"comment";if(h.eat('"')){for(;(j=h.next())&&'"'!=j;)"\\"==j&&h.next();return"string"}if(h.eat("'")){if(h.match(/\\?.'/))return"number"}else if(h.eat(".")||h.sol()&&h.eat("#")){if(i.context=4,h.eatWhile(/\w/))return"def"}else if(h.eat("$")){if(h.eatWhile(/[\da-f]/i))return"number"}else if(h.eat("%")){if(h.eatWhile(/[01]/))return"number"}else h.next()}return null}}}),CodeMirror.defineMIME("text/x-z80","z80"),function(){function b(b){a.push(b),a.length>50&&a.shift()}function c(){return a[a.length-1]||""}function d(){return a.length>1&&a.pop(),c()}var a=[];CodeMirror.keyMap.emacs={"Ctrl-X":function(a){a.setOption("keyMap","emacs-Ctrl-X")},"Ctrl-W":function(a){b(a.getSelection()),a.replaceSelection("")},"Ctrl-Alt-W":function(a){b(a.getSelection()),a.replaceSelection("")},"Alt-W":function(a){b(a.getSelection())},"Ctrl-Y":function(a){a.replaceSelection(c())},"Alt-Y":function(a){a.replaceSelection(d())},"Ctrl-/":"undo","Shift-Ctrl--":"undo","Shift-Alt-,":"goDocStart","Shift-Alt-.":"goDocEnd","Ctrl-S":"findNext","Ctrl-R":"findPrev","Ctrl-G":"clearSearch","Shift-Alt-5":"replace","Ctrl-Z":"undo","Cmd-Z":"undo","Alt-/":"autocomplete","Alt-V":"goPageUp","Ctrl-J":"newlineAndIndent",Enter:!1,Tab:"indentAuto",fallthrough:["basic","emacsy"]},CodeMirror.keyMap["emacs-Ctrl-X"]={"Ctrl-S":"save","Ctrl-W":"save",S:"saveAll",F:"open",U:"undo",K:"close",auto:"emacs",nofallthrough:!0}}(),function(){"use strict";var a=[{keys:["Left"],type:"keyToKey",toKeys:["h"]},{keys:["Right"],type:"keyToKey",toKeys:["l"]},{keys:["Up"],type:"keyToKey",toKeys:["k"]},{keys:["Down"],type:"keyToKey",toKeys:["j"]},{keys:["Space"],type:"keyToKey",toKeys:["l"]},{keys:["Backspace"],type:"keyToKey",toKeys:["h"]},{keys:["Ctrl-Space"],type:"keyToKey",toKeys:["W"]},{keys:["Ctrl-Backspace"],type:"keyToKey",toKeys:["B"]},{keys:["Shift-Space"],type:"keyToKey",toKeys:["w"]},{keys:["Shift-Backspace"],type:"keyToKey",toKeys:["b"]},{keys:["Ctrl-n"],type:"keyToKey",toKeys:["j"]},{keys:["Ctrl-p"],type:"keyToKey",toKeys:["k"]},{keys:["Ctrl-["],type:"keyToKey",toKeys:["Esc"]},{keys:["Ctrl-c"],type:"keyToKey",toKeys:["Esc"]},{keys:["s"],type:"keyToKey",toKeys:["c","l"]},{keys:["S"],type:"keyToKey",toKeys:["c","c"]},{keys:["Home"],type:"keyToKey",toKeys:["0"]},{keys:["End"],type:"keyToKey",toKeys:["$"]},{keys:["PageUp"],type:"keyToKey",toKeys:["Ctrl-b"]},{keys:["PageDown"],type:"keyToKey",toKeys:["Ctrl-f"]},{keys:["h"],type:"motion",motion:"moveByCharacters",motionArgs:{forward:!1}},{keys:["l"],type:"motion",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:["j"],type:"motion",motion:"moveByLines",motionArgs:{forward:!0,linewise:!0}},{keys:["k"],type:"motion",motion:"moveByLines",motionArgs:{forward:!1,linewise:!0}},{keys:["w"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1}},{keys:["W"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!1,bigWord:!0}},{keys:["e"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,inclusive:!0}},{keys:["E"],type:"motion",motion:"moveByWords",motionArgs:{forward:!0,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:["b"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1}},{keys:["B"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!1,bigWord:!0}},{keys:["g","e"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,inclusive:!0}},{keys:["g","E"],type:"motion",motion:"moveByWords",motionArgs:{forward:!1,wordEnd:!0,bigWord:!0,inclusive:!0}},{keys:["Ctrl-f"],type:"motion",motion:"moveByPage",motionArgs:{forward:!0}},{keys:["Ctrl-b"],type:"motion",motion:"moveByPage",motionArgs:{forward:!1}},{keys:["g","g"],type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0}},{keys:["G"],type:"motion",motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!0,explicitRepeat:!0,linewise:!0}},{keys:["0"],type:"motion",motion:"moveToStartOfLine"},{keys:["^"],type:"motion",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:["$"],type:"motion",motion:"moveToEol",motionArgs:{inclusive:!0}},{keys:["%"],type:"motion",motion:"moveToMatchedSymbol",motionArgs:{inclusive:!0}},{keys:["f","character"],type:"motion",motion:"moveToCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:["F","character"],type:"motion",motion:"moveToCharacter",motionArgs:{forward:!1}},{keys:["t","character"],type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!0,inclusive:!0}},{keys:["T","character"],type:"motion",motion:"moveTillCharacter",motionArgs:{forward:!1}},{keys:["'","character"],type:"motion",motion:"goToMark"},{keys:["`","character"],type:"motion",motion:"goToMark"},{keys:["|"],type:"motion",motion:"moveToColumn",motionArgs:{}},{keys:["d"],type:"operator",operator:"delete"},{keys:["y"],type:"operator",operator:"yank"},{keys:["c"],type:"operator",operator:"change",operatorArgs:{enterInsertMode:!0}},{keys:[">"],type:"operator",operator:"indent",operatorArgs:{indentRight:!0}},{keys:["<"],type:"operator",operator:"indent",operatorArgs:{indentRight:!1}},{keys:["g","~"],type:"operator",operator:"swapcase"},{keys:["n"],type:"motion",motion:"findNext"},{keys:["N"],type:"motion",motion:"findPrev"},{keys:["x"],type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!0},operatorMotionArgs:{visualLine:!1}},{keys:["X"],type:"operatorMotion",operator:"delete",motion:"moveByCharacters",motionArgs:{forward:!1},operatorMotionArgs:{visualLine:!0}},{keys:["D"],type:"operatorMotion",operator:"delete",motion:"moveToEol",motionArgs:{inclusive:!0},operatorMotionArgs:{visualLine:!0}},{keys:["Y"],type:"operatorMotion",operator:"yank",motion:"moveToEol",motionArgs:{inclusive:!0},operatorMotionArgs:{visualLine:!0}},{keys:["C"],type:"operatorMotion",operator:"change",operatorArgs:{enterInsertMode:!0},motion:"moveToEol",motionArgs:{inclusive:!0},operatorMotionArgs:{visualLine:!0}},{keys:["~"],type:"operatorMotion",operator:"swapcase",motion:"moveByCharacters",motionArgs:{forward:!0}},{keys:["a"],type:"action",action:"enterInsertMode",actionArgs:{insertAt:"charAfter"}},{keys:["A"],type:"action",action:"enterInsertMode",actionArgs:{insertAt:"eol"}},{keys:["i"],type:"action",action:"enterInsertMode"},{keys:["I"],type:"action",action:"enterInsertMode",motion:"moveToFirstNonWhiteSpaceCharacter"},{keys:["o"],type:"action",action:"newLineAndEnterInsertMode",actionArgs:{after:!0}},{keys:["O"],type:"action",action:"newLineAndEnterInsertMode",actionArgs:{after:!1}},{keys:["v"],type:"action",action:"toggleVisualMode"},{keys:["V"],type:"action",action:"toggleVisualMode",actionArgs:{linewise:!0}},{keys:["J"],type:"action",action:"joinLines"},{keys:["p"],type:"action",action:"paste",actionArgs:{after:!0}},{keys:["P"],type:"action",action:"paste",actionArgs:{after:!1}},{keys:["r","character"],type:"action",action:"replace"},{keys:["u"],type:"action",action:"undo"},{keys:["Ctrl-r"],type:"action",action:"redo"},{keys:["m","character"],type:"action",action:"setMark"},{keys:['"',"character"],type:"action",action:"setRegister"},{keys:[",","/"],type:"action",action:"clearSearchHighlight"},{keys:["a","character"],type:"motion",motion:"textObjectManipulation"},{keys:["i","character"],type:"motion",motion:"textObjectManipulation",motionArgs:{textObjectInner:!0}},{keys:["/"],type:"search",searchArgs:{forward:!0,querySrc:"prompt"}},{keys:["?"],type:"search",searchArgs:{forward:!1,querySrc:"prompt"}},{keys:["*"],type:"search",searchArgs:{forward:!0,querySrc:"wordUnderCursor"}},{keys:["#"],type:"search",searchArgs:{forward:!1,querySrc:"wordUnderCursor"}},{keys:[":"],type:"ex"}],b=function(){function h(a,b){for(var c=[],d=a;a+b>d;d++)c.push(String.fromCharCode(d));return c}function r(a,b){return b>=0&&a.lineCount()>b}function t(a){return-1!="()[]{}".indexOf(a)}function u(a){return d.test(a)}function v(a){return/^[A-Z]$/.test(a)}function y(a){return/^\s*$/.test(a)}function z(a,b,c){return a>=b&&c>=a}function A(a,b){for(var c=0;b.length>c;c++)if(b[c]==a)return!0;return!1}function C(){return B||(B={searchQuery:null,searchIsReversed:!1,registerController:new H({})}),B}function D(a){return a.vimState||(a.vimState={inputState:new F,lastHPos:-1,lastMotion:null,marks:{},visualMode:!1,visualLine:!1}),a.vimState
}function F(){this.reset()}function G(a,b){this.clear(),a&&this.set(a,b)}function H(a){this.registers=a,this.unamedRegister=a['"']=new G}function N(a,b,c){var d=Math.min(Math.max(0,b.line),a.lineCount()-1),e=Y(a,d)-1;e=c?e+1:e;var f=Math.min(Math.max(0,b.ch),e);return{line:d,ch:f}}function P(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function Q(a,b,c){return{line:a.line+b,ch:a.ch+c}}function S(a,b){for(var c=0;a.length>c;c++)if(a[c]!=b[c]&&"character"!=b[c])return!1;return!0}function U(a,b,c){return function(){for(var d=0;c>d;d++)b(a)}}function V(a){return{line:a.line,ch:a.ch}}function W(a,b){return a.ch==b.ch&&a.line==b.line}function X(a,b){return a.line<b.line?!0:a.line==b.line&&a.ch<b.ch?!0:!1}function Y(a,b){return a.getLine(b).length}function Z(a){return a.split("").reverse().join("")}function $(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function _(a){return a.replace(/([.?*+$\[\]\/\\(){}|\-])/g,"\\$1")}function ab(a,b){b.visualMode=!1,b.visualLine=!1;var c=a.getCursor("anchor"),d=a.getCursor("head");W(c,d)||a.setCursor(N(a,d))}function bb(a,b,c){var d=a.getRange(b,c),e=d.split("\n");e.length>1&&y(e.pop())&&(c.line--,c.ch=Y(a,c.line))}function cb(a,b,c){b.ch=0,c.ch=0,c.line++}function db(a){if(!a)return 0;var b=a.search(/\S/);return-1==b?a.length:b}function eb(a,b,c,d,e){var j,f=a.getCursor(),g=a.getLine(f.line),h=f.ch,i=g.substring(h);if(j=e?i.search(/\w/):i.search(/\S/),-1==j)return null;h+=j,i=g.substring(h);var l,k=g.substring(0,h);l=d?/^\S+/:/\w/.test(g.charAt(h))?/^\w+/:/^[^\w\s]+/;var m=l.exec(i),n=h,o=h+m[0].length-1,p=l.exec(Z(k));return p&&(n-=p[0].length),b&&o++,{start:{line:f.line,ch:n},end:{line:f.line,ch:o}}}function fb(a,b,c,d){for(var e=b.line,h=b.ch,i=a.getLine(e),j=c?1:-1,k=d?g:f;;){for(var l=j>0?i.length:-1,m=l,n=l;h!=l;){for(var o=!1,p=0;k.length>p&&!o;++p)if(k[p].test(i.charAt(h))){for(m=h;h!=l&&k[p].test(i.charAt(h));)h+=j;if(n=h,o=m!=n,m==b.ch&&e==b.line&&n==m+j)continue;return{from:Math.min(m,n+1),to:Math.max(m,n),line:e}}o||(h+=j)}if(e+=j,!r(a,e))return null;i=a.getLine(e),h=j>0?0:i.length}throw"The impossible happened."}function gb(a,b,c,d,e){for(var f=a.getCursor(),g=0;b>g;g++)for(var j,i=(f.ch,f.line),k=!1;!k;){if(j=fb(a,f,c,e),k=!0,!j)return c?{line:f.line,ch:Y(a,f.line)}:{line:f.line,ch:0};f.line=j.line,c&&d?f.ch=j.to-1:c&&!d?z(f.ch,j.from,j.to)&&j.line==i?(k=!1,f.ch=j.to-1):f.ch=j.from:!c&&d?z(f.ch,j.from,j.to)&&j.line==i?(k=!1,f.ch=j.from):f.ch=j.to:c||d||(f.ch=j.from)}return f}function hb(a,b,c,d){for(var g,e=a.getCursor(),f=e.ch,h=0;b>h;h++){var i=a.getLine(e.line);if(g=jb(f,i,d,c,!0),-1==g)return e;f=g}return{line:a.getCursor().line,ch:g}}function ib(a,b){var c=a.getCursor().line;return N(a,{line:c,ch:b-1})}function jb(a,b,c,d,e){var f;return d?(f=b.indexOf(c,a+1),-1==f||e||(f-=1)):(f=b.lastIndexOf(c,a-1),-1==f||e||(f+=1)),f}function kb(a,b,c){var d=b.line;c=c?c:a.getLine(d).charAt(b.ch),A(c,["(","[","{"]);var f={"(":")",")":"(","[":"]","]":"[","{":"}","}":"{"}[c];if(!f)return b;for(var g={"(":1,"{":1,"[":1}[c]||-1,h=1,i=c,j=b.ch,k=a.getLine(d);i&&h>0;)j+=g,i=k.charAt(j),i||(d+=g,j=0,k=a.getLine(d)||"",i=k.charAt(j)),i===c?h++:i===f&&h--;return i?{line:d,ch:j}:b}function lb(a,b,c){var d=a.getCursor(),e=kb(a,d,b),f=kb(a,e);return f.ch+=c?1:0,e.ch+=c?0:1,{start:f,end:e}}function nb(a,b,c){var g,h,i,j,d=a.getCursor(),e=a.getLine(d.line),f=e.split(""),k=f.indexOf(b);if(k>d.ch?d.ch=k:d.ch>k&&f[d.ch]==b&&(h=d.ch,--d.ch),f[d.ch]!=b||h)for(i=d.ch;i>-1&&!g;i--)f[i]==b&&(g=i+1);else g=d.ch+1;if(g&&!h)for(i=g,j=f.length;j>i&&!h;i++)f[i]==b&&(h=i);return g&&h?(c&&(--g,++h),{start:{line:d.line,ch:g},end:{line:d.line,ch:h}}):{start:d,end:d}}function ob(){this.marked=null}function pb(a){var b=D(a);return b.searchState_||(b.searchState_=new ob)}function qb(a,b,c,d){a.openDialog?a.openDialog(b,d,{bottom:!0}):d(prompt(c,""))}function rb(a){for(var b=!1,c=[],d=0;a.length>d;d++){var e=a.charAt(d);b||"/"!=e||c.push(d),b="\\"==e}return c}function sb(a,b,c,d){var f,g,e=rb(b);if(e.length){f=b.substring(0,e[0]);var h=b.substring(e[0]);g=-1!=h.indexOf("i")}else f=b;if(!f)return null;d&&(c=/^[^A-Z]*$/.test(f));try{var i=RegExp(f,c||g?"i":void 0);return i}catch(j){tb(a,"Invalid regex: "+f)}}function tb(a,b){a.openConfirm?a.openConfirm('<span style="color: red">'+b+'</span> <button type="button">OK</button>',function(){},{bottom:!0}):alert(b)}function ub(a,b){var c="";return a&&(c+='<span style="font-family: monospace">'+a+"</span>"),c+='<input type="text"/> <span style="color: #888">',b&&(c+='<span style="color: #888">',c+=b,c+="</span>"),c}function wb(a,b,c,d){var e=(c||"")+" "+(d||"");qb(a,ub(c,d),e,b)}function xb(a,b){if(a instanceof RegExp&&b instanceof RegExp){for(var c=["global","multiline","ignoreCase","source"],d=0;c.length>d;d++){var e=c[d];if(a[e]!==b[e])return!1}return!0}return!1}function yb(a,b,c,d){a.operation(function(){var e=pb(a);if(b){var f=sb(a,b,!!c,!!d);f&&(xb(f,e.getQuery())||(Bb(a),zb(a,f),e.setQuery(f)))}})}function zb(a,b){if(2e3>a.lineCount()){for(var c=[],d=a.getSearchCursor(b);d.findNext();)c.push(a.markText(d.from(),d.to(),{className:"CodeMirror-searching"}));pb(a).setMarked(c)}}function Ab(a,b,c){return a.operation(function(){var d=pb(a),e=d.getQuery();if(e){d.getMarked()||zb(a,e);var f=a.getCursor();b=d.isReversed()?!b:b,b||(f.ch+=1);for(var g=a.getSearchCursor(e,f),h=0;c>h;h++)if(!g.find(b)&&(g=a.getSearchCursor(e,b?{line:a.lineCount()-1}:{line:0,ch:0}),!g.find(b)))return;return g.from()}})}function Bb(a){a.operation(function(){var b=pb(a);if(b.getQuery()){var c=b.getMarked();if(c){for(var d=0;c.length>d;++d)c[d].clear();b.setMarked(null)}}})}function Eb(a){for(var b=0,c=[];a.length>b;)if("<"==a.charAt(b)){for(var d=++b;">"!=a.charAt(b++););var e=a.substring(d,b-1),f=/^C-(.+)$/.exec(e);if(f){var g;switch(f[1]){case"BS":g="Backspace";break;case"CR":g="Enter";break;case"Del":g="Delete";break;default:g=f[1]}c.push("Ctrl-"+g)}}else c.push(a.charAt(b)),b++;return c}function Hb(){function a(a,b,d){v(b)&&("Shift"==d?d=null:b=b.toLowerCase()),d&&(b=d+"-"+b),c.handleKey(a,b)}function b(b,c){return function(d){a(d,b,c)}}function f(a,c){for(var d=0;a.length>d;d++){var f=a[d];!c&&A(f,m)&&(f="'"+f+"'"),c?e[c+"-"+f]=b(a[d],c):e[f]=b(a[d])}}var e={nofallthrough:!0,style:"fat-cursor"};return f(i),f(i,"Shift"),f(i,"Ctrl"),f(m),f(m,"Ctrl"),f(k),f(k,"Ctrl"),f(n),f(n,"Ctrl"),e}function Ib(a){a.setCursor(a.getCursor().line,a.getCursor().ch-1,!0),a.setOption("keyMap","vim")}var B,d=/[\d]/,f=[/\w/,/[^\w\s]/],g=[/\S/],i=h(65,26),j=h(97,26),k=h(48,10),l="~`!@#$%^&*()_-+=[{}]\\|/?.,<>:;\"'",m=l.split(""),n=["Left","Right","Up","Down","Space","Backspace","Esc","Home","End","PageUp","PageDown"],o=i.concat(j).concat(k),p=i.concat(j).concat(k).concat('-"'.split("")),E={buildKeyMap:function(){},getRegisterController:function(){return C().registerController},clearVimGlobalState_:function(){B=null},map:function(a,b){Gb.map(a,b)},maybeInitState:function(a){D(a)},handleKey:function(b,c){var d,e=D(b);if("Esc"==c)return e.inputState.reset(),e.visualMode&&ab(b,e),void 0;if(e.visualMode&&W(b.getCursor("head"),b.getCursor("anchor"))&&ab(b,e),e.visualMode||W(b.getCursor("head"),b.getCursor("anchor"))||(e.visualMode=!0,e.visualLine=!1),("0"!=c||"0"==c&&0===e.inputState.getRepeat())&&(d=I.matchCommand(c,a,e)),!d)return u(c)&&e.inputState.pushRepeatDigit(c),void 0;if("keyToKey"==d.type)for(var f=0;d.toKeys.length>f;f++)this.handleKey(b,d.toKeys[f]);else I.processCommand(b,e,d)}};F.prototype.reset=function(){this.prefixRepeat=[],this.motionRepeat=[],this.operator=null,this.operatorArgs=null,this.motion=null,this.motionArgs=null,this.keyBuffer=[],this.registerName=null},F.prototype.pushRepeatDigit=function(a){this.operator?this.motionRepeat=this.motionRepeat.concat(a):this.prefixRepeat=this.prefixRepeat.concat(a)},F.prototype.getRepeat=function(){var a=0;return(this.prefixRepeat.length>0||this.motionRepeat.length>0)&&(a=1,this.prefixRepeat.length>0&&(a*=parseInt(this.prefixRepeat.join(""),10)),this.motionRepeat.length>0&&(a*=parseInt(this.motionRepeat.join(""),10))),a},G.prototype={set:function(a,b){this.text=a,this.linewise=!!b},append:function(a,b){b||this.linewise?(this.text+="\n"+a,this.linewise=!0):this.text+=a},clear:function(){this.text="",this.linewise=!1},toString:function(){return this.text}},H.prototype={pushText:function(a,b,c,d){var e=this.isValidRegister(a)?this.getRegister(a):null;if(!e){switch(b){case"yank":this.registers["0"]=new G(c,d);break;case"delete":case"change":-1==c.indexOf("\n")?this.registers["-"]=new G(c,d):(this.shiftNumericRegisters_(),this.registers["1"]=new G(c,d))}return this.unamedRegister.set(c,d),void 0}var f=v(a);f?(e.append(c,d),this.unamedRegister.append(c,d)):(e.set(c,d),this.unamedRegister.set(c,d))},getRegister:function(a){return this.isValidRegister(a)?(a=a.toLowerCase(),this.registers[a]||(this.registers[a]=new G),this.registers[a]):this.unamedRegister},isValidRegister:function(a){return a&&A(a,p)},shiftNumericRegisters_:function(){for(var a=9;a>=2;a--)this.registers[a]=this.getRegister(""+(a-1))}};var I={matchCommand:function(a,b,c){for(var d=c.inputState,e=d.keyBuffer.concat(a),f=0;b.length>f;f++){var g=b[f];if(S(e,g.keys)){if(e.length<g.keys.length)return d.keyBuffer.push(a),null;if(d.operator&&"action"==g.type)continue;return"character"==g.keys[e.length-1]&&(d.selectedCharacter=e[e.length-1]),d.keyBuffer=[],g}}return d.keyBuffer=[],null},processCommand:function(a,b,c){switch(c.type){case"motion":this.processMotion(a,b,c);break;case"operator":this.processOperator(a,b,c);break;case"operatorMotion":this.processOperatorMotion(a,b,c);break;case"action":this.processAction(a,b,c);break;case"search":this.processSearch(a,b,c);break;case"ex":case"keyToEx":this.processEx(a,b,c);break;default:}},processMotion:function(a,b,c){b.inputState.motion=c.motion,b.inputState.motionArgs=P(c.motionArgs),this.evalInput(a,b)},processOperator:function(a,b,c){var d=b.inputState;if(d.operator){if(d.operator==c.operator)return d.motion="expandToLine",d.motionArgs={linewise:!0},this.evalInput(a,b),void 0;d.reset()}d.operator=c.operator,d.operatorArgs=P(c.operatorArgs),b.visualMode&&this.evalInput(a,b)},processOperatorMotion:function(a,b,c){var d=b.visualMode,e=P(c.operatorMotionArgs);e&&d&&e.visualLine&&(b.visualLine=!0),this.processOperator(a,b,c),d||this.processMotion(a,b,c)},processAction:function(a,b,c){var d=b.inputState,e=d.getRepeat(),f=!!e,g=P(c.actionArgs)||{};d.selectedCharacter&&(g.selectedCharacter=d.selectedCharacter),c.operator&&this.processOperator(a,b,c),c.motion&&this.processMotion(a,b,c),(c.motion||c.operator)&&this.evalInput(a,b),g.repeat=e||1,g.repeatIsExplicit=f,g.registerName=d.registerName,d.reset(),b.lastMotion=null,L[c.action](a,g,b)},processSearch:function(a,b,c){function f(c,d,e){yb(a,c,d,e),I.processMotion(a,b,{type:"motion",motion:"findNext"})}function g(a){f(a,!0,!0)}if(a.getSearchCursor){var d=c.searchArgs.forward;pb(a).setReversed(!d);var e=d?"/":"?";switch(c.searchArgs.querySrc){case"prompt":wb(a,g,e,vb);break;case"wordUnderCursor":var h=eb(a,!1,!0,!1,!0),i=!0;if(h||(h=eb(a,!1,!0,!1,!1),i=!1),!h)return;var j=a.getLine(h.start.line).substring(h.start.ch,h.end.ch+1);j=i?"\\b"+j+"\\b":_(j),a.setCursor(h.start),f(j,!0,!1)}}},processEx:function(a,b,c){function d(b){Gb.processCommand(a,b)}"keyToEx"==c.type?Gb.processCommand(a,c.exArgs.input):wb(a,d,":")},evalInput:function(a,b){var m,n,c=b.inputState,d=c.motion,e=c.motionArgs||{},f=c.operator,g=c.operatorArgs||{},h=c.registerName,i=a.getCursor("head"),j=a.getCursor("anchor"),k=V(i),l=V(k);if(n=void 0!==e.repeat?c.motionArgs.repeat:c.getRepeat(),n>0&&e.explicitRepeat?e.repeatIsExplicit=!0:(e.noRepeat||!e.explicitRepeat&&0===n)&&(n=1,e.repeatIsExplicit=!1),c.selectedCharacter&&(e.selectedCharacter=g.selectedCharacter=c.selectedCharacter),e.repeat=n,c.reset(),d){var o=J[d](a,e,b);if(b.lastMotion=J[d],!o)return;o instanceof Array?(k=o[0],m=o[1]):m=o,m||(m={ch:k.ch,line:k.line}),b.visualMode?(X(j,i)&&(W(j,m)||X(m,j))?j.ch+=1:X(i,j)&&(W(j,m)||X(j,m))&&(j.ch-=1),i=m,b.visualLine&&(X(j,i)?(j.ch=0,i.ch=Y(a,i.line)):(i.ch=0,j.ch=Y(a,j.line))),a.setCursor(j),a.setSelection(j,i)):f||(m=N(a,m),a.setCursor(m.line,m.ch))}if(f){var p=!1;if(b.lastMotion=null,g.repeat=n,b.visualMode&&(k=j,m=i,e.inclusive=!0),X(m,k)){var q=k;k=m,m=q,p=!0}!e.inclusive||b.visualMode&&p||m.ch++;var r=e.linewise||b.visualMode&&b.visualLine;r?cb(a,k,m):e.forward&&bb(a,k,m),g.registerName=h,g.linewise=r,K[f](a,g,b,k,m,l),b.visualMode&&ab(a,b),g.enterInsertMode&&L.enterInsertMode(a)}}},J={expandToLine:function(a,b){var c=a.getCursor();return{line:c.line+b.repeat-1,ch:1/0}},findNext:function(a,b){return Ab(a,!1,b.repeat)},findPrev:function(a,b){return Ab(a,!0,b.repeat)},goToMark:function(a,b,c){var d=c.marks[b.selectedCharacter];return d?d.find():null},moveByCharacters:function(a,b){var c=a.getCursor(),d=b.repeat,e=b.forward?c.ch+d:c.ch-d;return{line:c.line,ch:e}},moveByLines:function(a,b,c){var d=a.getCursor().ch;switch(c.lastMotion){case this.moveByLines:case this.moveToColumn:case this.moveToEol:d=c.lastHPos;break;default:c.lastHPos=d}var e=a.getCursor(),f=b.repeat,g=b.forward?e.line+f:e.line-f;return 0>g||g>a.lineCount()-1?null:{line:g,ch:d}},moveByPage:function(a,b){var c=a.getCursor(),d=b.repeat;a.moveV(b.forward?d:-d,"page");var e=a.getCursor();return a.setCursor(c),e},moveByWords:function(a,b){return gb(a,b.repeat,!!b.forward,!!b.wordEnd,!!b.bigWord)},moveTillCharacter:function(a,b){var c=b.repeat,d=hb(a,c,b.forward,b.selectedCharacter),e=b.forward?-1:1;return d.ch+=e,d},moveToCharacter:function(a,b){var c=b.repeat;return hb(a,c,b.forward,b.selectedCharacter)},moveToColumn:function(a,b,c){var d=b.repeat;return c.lastHPos=d-1,ib(a,d)},moveToEol:function(a,b,c){var d=a.getCursor();return c.lastHPos=1/0,{line:d.line+b.repeat-1,ch:1/0}},moveToFirstNonWhiteSpaceCharacter:function(a){var b=a.getCursor();return a.getLine(b.line),{line:b.line,ch:db(a.getLine(b.line))}},moveToMatchedSymbol:function(a,b){var c=a.getCursor(),d=a.getLine(c.line).charAt(c.ch);return t(d)?kb(a,a.getCursor(),b.symbol):c},moveToStartOfLine:function(a){var b=a.getCursor();return{line:b.line,ch:0}},moveToLineOrEdgeOfDocument:function(a,b){var c=b.forward?a.lineCount()-1:0;return b.repeatIsExplicit&&(c=b.repeat-1),{line:c,ch:db(a.getLine(c))}},textObjectManipulation:function(a,b){var c=b.selectedCharacter,d=!b.textObjectInner;if(!M[c])return null;var e=M[c](a,d),f=e.start,g=e.end;return[f,g]}},K={change:function(a,b,c,d,e){C().registerController.pushText(b.registerName,"change",a.getRange(d,e),b.linewise),b.linewise?(d.ch=db(a.getLine(d.line)),a.replaceRange("\n",d,e)):a.replaceRange("",d,e),a.setCursor(d)},"delete":function(a,b,c,d,e){C().registerController.pushText(b.registerName,"delete",a.getRange(d,e),b.linewise),a.replaceRange("",d,e),b.linewise?a.setCursor(J.moveToFirstNonWhiteSpaceCharacter(a)):a.setCursor(d)},indent:function(a,b,c,d,e){var f=d.line,g=e.line,h=c.visualMode?b.repeat:1;b.linewise&&g--;for(var i=f;g>=i;i++)for(var j=0;h>j;j++)a.indentLine(i,b.indentRight);a.setCursor(d),a.setCursor(J.moveToFirstNonWhiteSpaceCharacter(a))},swapcase:function(a,b,c,d,e,f){for(var g=a.getRange(d,e),h="",i=0;g.length>i;i++){var j=g.charAt(i);h+=v(j)?j.toLowerCase():j.toUpperCase()}a.replaceRange(h,d,e),a.setCursor(f)},yank:function(a,b,c,d,e,f){C().registerController.pushText(b.registerName,"yank",a.getRange(d,e),b.linewise),a.setCursor(f)}},L={clearSearchHighlight:Bb,enterInsertMode:function(a,b){var c=b?b.insertAt:null;if("eol"==c){var d=a.getCursor();d={line:d.line,ch:Y(a,d.line)},a.setCursor(d)}else"charAfter"==c&&a.setCursor(Q(a.getCursor(),0,1));a.setOption("keyMap","vim-insert")},toggleVisualMode:function(a,b,c){var f,d=b.repeat,e=a.getCursor();c.visualMode?!c.visualLine&&b.linewise?(c.visualLine=!0,e=a.getCursor("anchor"),f=a.getCursor("head"),e.ch=X(e,f)?0:Y(a,e.line),f.ch=X(e,f)?Y(a,f.line):0,a.setSelection(e,f)):ab(a,c):(c.visualMode=!0,c.visualLine=!!b.linewise,c.visualLine?(e.ch=0,f=N(a,{line:e.line+d-1,ch:Y(a,e.line)},!0)):f=N(a,{line:e.line,ch:e.ch+d},!0),b.repeatIsExplicit||c.visualLine?a.setSelection(e,f):(a.setCursor(f),a.setSelection(f,e)))},joinLines:function(a,b,c){var d,e;if(c.visualMode)d=a.getCursor("anchor"),e=a.getCursor("head"),e.ch=Y(a,e.line)-1;else{var f=Math.max(b.repeat,2);d=a.getCursor(),e=N(a,{line:d.line+f-1,ch:1/0})}var g=0;a.operation(function(){for(var b=d.line;e.line>b;b++){g=Y(a,d.line);var c={line:d.line+1,ch:Y(a,d.line+1)},f=a.getRange(d,c);f=f.replace(/\n\s*/g," "),a.replaceRange(f,d,c)}var h={line:d.line,ch:g};a.setCursor(h)})},newLineAndEnterInsertMode:function(a,b){var c=a.getCursor();if(0!==c.line||b.after){c.line=b.after?c.line:c.line-1,c.ch=Y(a,c.line),a.setCursor(c);var d=CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent;d(a)}else a.replaceRange("\n",{line:0,ch:0}),a.setCursor(0,0);this.enterInsertMode(a)},paste:function(a,b){var d=a.getCursor(),e=C().registerController.getRegister(b.registerName);if(e.text){for(var f="",g=0;b.repeat>g;g++)f+=e.text;var h=e.linewise;h?b.after?(f="\n"+f.slice(0,f.length-1),d.ch=Y(a,d.line)):d.ch=0:d.ch+=b.after?1:0,a.replaceRange(f,d);var i,j;h&&b.after?i={line:d.line+1,ch:db(a.getLine(d.line+1))}:h&&!b.after?i={line:d.line,ch:db(a.getLine(d.line))}:!h&&b.after?(j=a.indexFromPos(d),i=a.posFromIndex(j+f.length-1)):(j=a.indexFromPos(d),i=a.posFromIndex(j+f.length)),a.setCursor(i)}},undo:function(a,b){U(a,CodeMirror.commands.undo,b.repeat)()},redo:function(a,b){U(a,CodeMirror.commands.redo,b.repeat)()},setRegister:function(a,b,c){c.inputState.registerName=b.selectedCharacter},setMark:function(a,b,c){var d=b.selectedCharacter;A(d,o)&&(c.marks[d]&&c.marks[d].clear(),c.marks[d]=a.setBookmark(a.getCursor()))},replace:function(a,b){var c=b.selectedCharacter,d=a.getCursor(),e=a.getLine(d.line),f=d.ch+b.repeat;if(!(f>e.length)){for(var g={line:d.line,ch:f},h="",i=0;g.ch-d.ch>i;i++)h+=c;a.replaceRange(h,d,g),a.setCursor(Q(g,0,-1))}}},M={w:function(a,b){return eb(a,b,!0,!1)},W:function(a,b){return eb(a,b,!0,!0)},"{":function(a,b){return lb(a,"}",b)},"(":function(a,b){return lb(a,")",b)},"[":function(a,b){return lb(a,"]",b)},"'":function(a,b){return nb(a,"'",b)},'"':function(a,b){return nb(a,'"',b)}};ob.prototype={getQuery:function(){return C().query},setQuery:function(a){C().query=a},getMarked:function(){return this.marked},setMarked:function(a){this.marked=a},isReversed:function(){return C().isReversed},setReversed:function(a){C().isReversed=a}};var vb="(Javascript regexp)",Cb=[{name:"map",type:"builtIn"},{name:"write",shortName:"w",type:"builtIn"},{name:"undo",shortName:"u",type:"builtIn"},{name:"redo",shortName:"red",type:"builtIn"}],Db=function(){this.buildCommandMap_()};Db.prototype={processCommand:function(a,b){var e,d=this.parseInput_(b);if(d.commandName){var f=this.matchCommand_(d.commandName);if(f){if(e=f.name,"exToKey"==f.type){for(var g=0;f.toKeys.length>g;g++)c.handleKey(a,f.toKeys[g]);return}if("exToEx"==f.type)return this.processCommand(a,f.toInput),void 0}}else void 0!==d.line&&(e="move");return e?(Fb[e](a,d),void 0):(tb(a,'Not an editor command ":'+b+'"'),void 0)},parseInput_:function(a){var b={};b.input=a;var c=0,d=/^:+/.exec(a);d&&(c+=d[0].length);var e=/^(\d+)/.exec(a.substring(c));e&&(b.line=parseInt(e[1],10),c+=e[0].length);var f=/^(\w+)/.exec(a.substring(c));f&&(b.commandName=f[1],c+=f[1].length);var g=$(a.substring(c)).split(/\s+/);return g.length&&g[0]&&(b.commandArgs=g),b},matchCommand_:function(a){for(var b=a.length;b>0;b--){var c=a.substring(0,b);if(this.commandMap_[c]){var d=this.commandMap_[c];if(0===d.name.indexOf(a))return d}}return null},buildCommandMap_:function(){this.commandMap_={};for(var a=0;Cb.length>a;a++){var b=Cb[a],c=b.shortName||b.name;this.commandMap_[c]=b}},map:function(b,c){if(":"==b.charAt(0)){var d=b.substring(1);this.commandMap_[d]=":"==c.charAt(0)?{name:d,type:"exToEx",toInput:c.substring(1)}:{name:d,type:"exToKey",toKeys:Eb(c)}}else":"==c.charAt(0)?a.unshift({keys:Eb(b),type:"keyToEx",exArgs:{input:c.substring(1)}}):a.unshift({keys:Eb(b),type:"keyToKey",toKeys:Eb(c)})}};var Fb={map:function(a,b){var c=b.commandArgs;return!c||2>c.length?(a&&tb(a,"Invalid mapping: "+b.input),void 0):(Gb.map(c[0],c[1],a),void 0)},move:function(a,b){I.processMotion(a,D(a),{motion:"moveToLineOrEdgeOfDocument",motionArgs:{forward:!1,explicitRepeat:!0,linewise:!0,repeat:b.line}})},redo:CodeMirror.commands.redo,undo:CodeMirror.commands.undo,write:function(a){CodeMirror.commands.save?CodeMirror.commands.save(a):a.save()}},Gb=new Db;return CodeMirror.keyMap.vim=Hb(),CodeMirror.keyMap["vim-insert"]={Esc:Ib,"Ctrl-[":Ib,"Ctrl-C":Ib,"Ctrl-N":"autocomplete","Ctrl-P":"autocomplete",Enter:function(a){var b=CodeMirror.commands.newlineAndIndentContinueComment||CodeMirror.commands.newlineAndIndent;b(a)},fallthrough:["default"]},E},c=b();CodeMirror.Vim=c}();var hljs=new function(){function l(o){return o.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+q.parentNode.className).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o<p.length;o++){if(e[p[o]]||p[o]=="no-highlight"){return p[o]}}}function c(q){var o=[];(function p(r,s){for(var t=r.firstChild;t;t=t.nextSibling){if(t.nodeType==3){s+=t.nodeValue.length}else{if(t.nodeName=="BR"){s+=1}else{if(t.nodeType==1){o.push({event:"start",offset:s,node:t});s=p(t,s);o.push({event:"stop",offset:s,node:t})}}}}return s})(q,0);return o}function j(x,v,w){var p=0;var y="";var r=[];function t(){if(x.length&&v.length){if(x[0].offset!=v[0].offset){return(x[0].offset<v[0].offset)?x:v}else{return v[0].event=="start"?x:v}}else{return x.length?x:v}}function s(A){function z(B){return" "+B.nodeName+'="'+l(B.value)+'"'}return"<"+A.nodeName+Array.prototype.map.call(A.attributes,z).join("")+">"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);r.splice(q,1);while(q<r.length){y+=s(r[q]);q++}}}}return y+l(w.substr(p))}function f(q){function o(s,r){return RegExp(s,"m"+(q.cI?"i":"")+(r?"g":""))}function p(y,w){if(y.compiled){return}y.compiled=true;var s=[];if(y.k){var r={};function z(A,t){t.split(" ").forEach(function(B){var C=B.split("|");r[C[0]]=[A,C[1]?Number(C[1]):1];s.push(C[0])})}y.lR=o(y.l||hljs.IR,true);if(typeof y.k=="string"){z("keyword",y.k)}else{for(var x in y.k){if(!y.k.hasOwnProperty(x)){continue}z(x,y.k[x])}}y.k=r}if(w){if(y.bWK){y.b="\\b("+s.join("|")+")\\s"}y.bR=o(y.b?y.b:"\\B|\\b");if(!y.e&&!y.eW){y.e="\\B|\\b"}if(y.e){y.eR=o(y.e)}y.tE=y.e||"";if(y.eW&&w.tE){y.tE+=(y.e?"|":"")+w.tE}}if(y.i){y.iR=o(y.i)}if(y.r===undefined){y.r=1}if(!y.c){y.c=[]}for(var v=0;v<y.c.length;v++){if(y.c[v]=="self"){y.c[v]=y}p(y.c[v],y)}if(y.starts){p(y.starts,w)}var u=[];for(var v=0;v<y.c.length;v++){u.push(y.c[v].b)}if(y.tE){u.push(y.tE)}if(y.i){u.push(y.i)}y.t=u.length?o(u.join("|"),true):{exec:function(t){return null}}}p(q)}function d(D,E){function o(r,M){for(var L=0;L<M.c.length;L++){var K=M.c[L].bR.exec(r);if(K&&K.index==0){return M.c[L]}}}function s(K,r){if(K.e&&K.eR.test(r)){return K}if(K.eW){return s(K.parent,r)}}function t(r,K){return K.i&&K.iR.test(r)}function y(L,r){var K=F.cI?r[0].toLowerCase():r[0];return L.k.hasOwnProperty(K)&&L.k[K]}function G(){var K=l(w);if(!A.k){return K}var r="";var N=0;A.lR.lastIndex=0;var L=A.lR.exec(K);while(L){r+=K.substr(N,L.index-N);var M=y(A,L);if(M){v+=M[1];r+='<span class="'+M[0]+'">'+L[0]+"</span>"}else{r+=L[0]}N=A.lR.lastIndex;L=A.lR.exec(K)}return r+K.substr(N)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return'<span class="'+r.language+'">'+r.value+"</span>"}function J(){return A.sL!==undefined?z():G()}function I(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){x+=K;w=""}else{if(L.eB){x+=l(r)+K;w=""}else{x+=K;w=r}}A=Object.create(L,{parent:{value:A}});B+=L.r}function C(K,r){w+=K;if(r===undefined){x+=J();return 0}var L=o(r,A);if(L){x+=J();I(L,r);return L.rB?0:r.length}var M=s(A,r);if(M){if(!(M.rE||M.eE)){w+=r}x+=J();do{if(A.cN){x+="</span>"}A=A.parent}while(A!=M.parent);if(M.eE){x+=l(r)}w="";if(M.starts){I(M.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw"Illegal"}w+=r;return r.length||1}var F=e[D];f(F);var A=F;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(E);if(!u){break}q=C(E.substr(p,u.index-p),u[0]);p=u.index+q}C(E.substr(p));return{r:B,keyword_count:v,value:x,language:D}}catch(H){if(H=="Illegal"){return{r:0,keyword_count:0,value:l(E)}}else{throw H}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"<br>")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.bash=function(a){var g="true false";var e="if then else elif fi for break continue while in do done echo exit return set declare";var c={cN:"variable",b:"\\$[a-zA-Z0-9_#]+"};var b={cN:"variable",b:"\\${([^}]|\\\\})+}"};var h={cN:"string",b:'"',e:'"',i:"\\n",c:[a.BE,c,b],r:0};var d={cN:"string",b:"'",e:"'",c:[{b:"''"}],r:0};var f={cN:"test_condition",b:"",e:"",c:[h,d,c,b],k:{literal:g},r:0};return{k:{keyword:e,literal:g},c:[{cN:"shebang",b:"(#!\\/bin\\/bash)|(#!\\/bin\\/sh)",r:10},c,b,a.HCM,h,d,a.inherit(f,{b:"\\[ ",e:" \\]",r:0}),a.inherit(f,{b:"\\[\\[ ",e:" \\]\\]"})]}}(hljs);hljs.LANGUAGES.cs=function(a){return{k:"abstract as base bool break byte case catch char checked class const continue decimal default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long namespace new null object operator out override params private protected public readonly ref return sbyte sealed short sizeof stackalloc static string struct switch this throw true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while ascending descending from get group into join let orderby partial select set value var where yield",c:[{cN:"comment",b:"///",e:"$",rB:true,c:[{cN:"xmlDocTag",b:"///|<!--|-->"},{cN:"xmlDocTag",b:"</?",e:">"}]},a.CLCM,a.CBLCLM,{cN:"preprocessor",b:"#",e:"$",k:"if else elif endif define undef warning error line region endregion pragma checksum"},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},a.ASM,a.QSM,a.CNM]}}(hljs);hljs.LANGUAGES.ruby=function(e){var a="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var j="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var g={keyword:"and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include"};var c={cN:"yardoctag",b:"@[A-Za-z]+"};var k=[{cN:"comment",b:"#",e:"$",c:[c]},{cN:"comment",b:"^\\=begin",e:"^\\=end",c:[c],r:10},{cN:"comment",b:"^__END__",e:"\\n$"}];var d={cN:"subst",b:"#\\{",e:"}",l:a,k:g};var i=[e.BE,d];var b=[{cN:"string",b:"'",e:"'",c:i,r:0},{cN:"string",b:'"',e:'"',c:i,r:0},{cN:"string",b:"%[qw]?\\(",e:"\\)",c:i},{cN:"string",b:"%[qw]?\\[",e:"\\]",c:i},{cN:"string",b:"%[qw]?{",e:"}",c:i},{cN:"string",b:"%[qw]?<",e:">",c:i,r:10},{cN:"string",b:"%[qw]?/",e:"/",c:i,r:10},{cN:"string",b:"%[qw]?%",e:"%",c:i,r:10},{cN:"string",b:"%[qw]?-",e:"-",c:i,r:10},{cN:"string",b:"%[qw]?\\|",e:"\\|",c:i,r:10}];var h={cN:"function",bWK:true,e:" |$|;",k:"def",c:[{cN:"title",b:j,l:a,k:g},{cN:"params",b:"\\(",e:"\\)",l:a,k:g}].concat(k)};var f=k.concat(b.concat([{cN:"class",bWK:true,e:"$|;",k:"class module",c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+e.IR+"::)?"+e.IR}]}].concat(k)},h,{cN:"constant",b:"(::)?(\\b[A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:b.concat([{b:j}]),r:0},{cN:"symbol",b:a+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"("+e.RSR+")\\s*",c:k.concat([{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[e.BE,d]}]),r:0}]));d.c=f;h.c[1].c=f;return{l:a,k:g,c:f}}(hljs);hljs.LANGUAGES.diff=function(a){return{c:[{cN:"chunk",b:"^\\@\\@ +\\-\\d+,\\d+ +\\+\\d+,\\d+ +\\@\\@$",r:10},{cN:"chunk",b:"^\\*\\*\\* +\\d+,\\d+ +\\*\\*\\*\\*$",r:10},{cN:"chunk",b:"^\\-\\-\\- +\\d+,\\d+ +\\-\\-\\-\\-$",r:10},{cN:"header",b:"Index: ",e:"$"},{cN:"header",b:"=====",e:"=====$"},{cN:"header",b:"^\\-\\-\\-",e:"$"},{cN:"header",b:"^\\*{3} ",e:"$"},{cN:"header",b:"^\\+\\+\\+",e:"$"},{cN:"header",b:"\\*{5}",e:"\\*{5}$"},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"change",b:"^\\!",e:"$"}]}}(hljs);hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,{cN:"regexp",b:"/",e:"/[gim]*",i:"\\n",c:[{b:"\\\\/"}]},{b:"<",e:">;",sL:"xml"}],r:0},{cN:"function",bWK:true,e:"{",k:"function",c:[{cN:"title",b:"[A-Za-z$_][0-9A-Za-z$_]*"},{cN:"params",b:"\\(",e:"\\)",c:[a.CLCM,a.CBLCLM],i:"[\"'\\(]"}],i:"\\[|%"}]}}(hljs);hljs.LANGUAGES.css=function(a){var b={cN:"function",b:a.IR+"\\(",e:"\\)",c:[a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",eE:true,k:"import page media charset",c:[b,a.ASM,a.QSM,a.NM]},{cN:"tag",b:a.IR,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[b,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"\\#[0-9A-F]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"<!--",e:"-->",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{title:"style"},c:[b],starts:{e:"</style>",rE:true,sL:"css"}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%>",sL:"vbscript"},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"title",b:"[^ />]+"},b]}]}}(hljs);hljs.LANGUAGES.http=function(a){return{i:"\\S",c:[{cN:"status",b:"^HTTP/[0-9\\.]+",e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{cN:"request",b:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",rB:true,e:"$",c:[{cN:"string",b:" ",e:" ",eB:true,eE:true}]},{cN:"attribute",b:"^\\w",e:": ",eE:true,i:"\\n|\\s|=",starts:{cN:"string",e:"$"}},{b:"\\n\\n",starts:{sL:"",eW:true}}]}}(hljs);hljs.LANGUAGES.java=function(a){return{k:"false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws",c:[{cN:"javadoc",b:"/\\*\\*",e:"\\*/",c:[{cN:"javadoctag",b:"@[A-Za-z]+"}],r:10},a.CLCM,a.CBLCLM,a.ASM,a.QSM,{cN:"class",bWK:true,e:"{",k:"class interface",i:":",c:[{bWK:true,k:"extends implements",r:10},{cN:"title",b:a.UIR}]},a.CNM,{cN:"annotation",b:"@[A-Za-z]+"}]}}(hljs);hljs.LANGUAGES.php=function(a){var e={cN:"variable",b:"\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*"};var b=[a.inherit(a.ASM,{i:null}),a.inherit(a.QSM,{i:null}),{cN:"string",b:'b"',e:'"',c:[a.BE]},{cN:"string",b:"b'",e:"'",c:[a.BE]}];var c=[a.BNM,a.CNM];var d={cN:"title",b:a.UIR};return{cI:true,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return implements parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception php_user_filter default die require __FUNCTION__ enddeclare final try this switch continue endfor endif declare unset true false namespace trait goto instanceof insteadof __DIR__ __NAMESPACE__ __halt_compiler",c:[a.CLCM,a.HCM,{cN:"comment",b:"/\\*",e:"\\*/",c:[{cN:"phpdoc",b:"\\s@[A-Za-z]+"}]},{cN:"comment",eB:true,b:"__halt_compiler.+?;",eW:true},{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[a.BE]},{cN:"preprocessor",b:"<\\?php",r:10},{cN:"preprocessor",b:"\\?>"},e,{cN:"function",bWK:true,e:"{",k:"function",i:"\\$|\\[|%",c:[d,{cN:"params",b:"\\(",e:"\\)",c:["self",e,a.CBLCLM].concat(b).concat(c)}]},{cN:"class",bWK:true,e:"{",k:"class",i:"[:\\(\\$]",c:[{bWK:true,eW:true,k:"extends",c:[d]},d]},{b:"=>"}].concat(b).concat(c)}}(hljs);hljs.LANGUAGES.python=function(a){var f={cN:"prompt",b:"^(>>>|\\.\\.\\.) "};var c=[{cN:"string",b:"(u|b)?r?'''",e:"'''",c:[f],r:10},{cN:"string",b:'(u|b)?r?"""',e:'"""',c:[f],r:10},{cN:"string",b:"(u|r|ur)'",e:"'",c:[a.BE],r:10},{cN:"string",b:'(u|r|ur)"',e:'"',c:[a.BE],r:10},{cN:"string",b:"(b|br)'",e:"'",c:[a.BE]},{cN:"string",b:'(b|br)"',e:'"',c:[a.BE]}].concat([a.ASM,a.QSM]);var e={cN:"title",b:a.UIR};var d={cN:"params",b:"\\(",e:"\\)",c:["self",a.CNM,f].concat(c)};var b={bWK:true,e:":",i:"[${=;\\n]",c:[e,d],r:10};return{k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda nonlocal|10",built_in:"None True False Ellipsis NotImplemented"},i:"(</|->|\\?)",c:c.concat([f,a.HCM,a.inherit(b,{cN:"function",k:"def"}),a.inherit(b,{cN:"class",k:"class"}),a.CNM,{cN:"decorator",b:"@",e:"$"},{b:"\\b(print|exec)\\("}])}}(hljs);hljs.LANGUAGES.sql=function(a){return{cI:true,c:[{cN:"operator",b:"(begin|start|commit|rollback|savepoint|lock|alter|create|drop|rename|call|delete|do|handler|insert|load|replace|select|truncate|update|set|show|pragma|grant)\\b(?!:)",e:";",eW:true,k:{keyword:"all partial global month current_timestamp using go revoke smallint indicator end-exec disconnect zone with character assertion to add current_user usage input local alter match collate real then rollback get read timestamp session_user not integer bit unique day minute desc insert execute like ilike|2 level decimal drop continue isolation found where constraints domain right national some module transaction relative second connect escape close system_user for deferred section cast current sqlstate allocate intersect deallocate numeric public preserve full goto initially asc no key output collation group by union session both last language constraint column of space foreign deferrable prior connection unknown action commit view or first into float year primary cascaded except restrict set references names table outer open select size are rows from prepare distinct leading create only next inner authorization schema corresponding option declare precision immediate else timezone_minute external varying translation true case exception join hour default double scroll value cursor descriptor values dec fetch procedure delete and false int is describe char as at in varchar null trailing any absolute current_time end grant privileges when cross check write current_date pad begin temporary exec time update catalog user sql date on identity timezone_hour natural whenever interval work order cascade diagnostics nchar having left call do handler load replace truncate start lock show pragma exists number",aggregate:"count sum min max avg"},c:[{cN:"string",b:"'",e:"'",c:[a.BE,{b:"''"}],r:0},{cN:"string",b:'"',e:'"',c:[a.BE,{b:'""'}],r:0},{cN:"string",b:"`",e:"`",c:[a.BE]},a.CNM]},a.CBLCLM,{cN:"comment",b:"--",e:"$"}]}}(hljs);hljs.LANGUAGES.ini=function(a){return{cI:true,i:"[^\\s]",c:[{cN:"comment",b:";",e:"$"},{cN:"title",b:"^\\[",e:"\\]"},{cN:"setting",b:"^[a-z0-9\\[\\]_-]+[ \\t]*=[ \\t]*",e:"$",c:[{cN:"value",eW:true,k:"on off true false yes no",c:[a.QSM,a.NM]}]}]}}(hljs);hljs.LANGUAGES.perl=function(e){var a="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when";var d={cN:"subst",b:"[$@]\\{",e:"\\}",k:a,r:10};var b={cN:"variable",b:"\\$\\d"};var i={cN:"variable",b:"[\\$\\%\\@\\*](\\^\\w\\b|#\\w+(\\:\\:\\w+)*|[^\\s\\w{]|{\\w+}|\\w+(\\:\\:\\w*)*)"};var f=[e.BE,d,b,i];var h={b:"->",c:[{b:e.IR},{b:"{",e:"}"}]};var g={cN:"comment",b:"^(__END__|__DATA__)",e:"\\n$",r:5};var c=[b,i,e.HCM,g,{cN:"comment",b:"^\\=\\w",e:"\\=cut",eW:true},h,{cN:"string",b:"q[qwxr]?\\s*\\(",e:"\\)",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\[",e:"\\]",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\{",e:"\\}",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\|",e:"\\|",c:f,r:5},{cN:"string",b:"q[qwxr]?\\s*\\<",e:"\\>",c:f,r:5},{cN:"string",b:"qw\\s+q",e:"q",c:f,r:5},{cN:"string",b:"'",e:"'",c:[e.BE],r:0},{cN:"string",b:'"',e:'"',c:f,r:0},{cN:"string",b:"`",e:"`",c:[e.BE]},{cN:"string",b:"{\\w+}",r:0},{cN:"string",b:"-?\\w+\\s*\\=\\>",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"("+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,g,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"sub",bWK:true,e:"(\\s*\\(.*?\\))?[;{]",k:"sub",r:5},{cN:"operator",b:"-\\w\\b",r:0}];d.c=c;h.c[1].c=c;return{k:a,c:c}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs);hljs.LANGUAGES.cpp=function(a){var b={keyword:"false int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long throw volatile static protected bool template mutable if public friend do return goto auto void enum else break new extern using true class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue wchar_t inline delete alignof char16_t char32_t constexpr decltype noexcept nullptr static_assert thread_local restrict _Bool complex",built_in:"std string cin cout cerr clog 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"};return{k:b,i:"</",c:[a.CLCM,a.CBLCLM,a.QSM,{cN:"string",b:"'\\\\?.",e:"'",i:"."},{cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},a.CNM,{cN:"preprocessor",b:"#",e:"$"},{cN:"stl_container",b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:b,r:10,c:["self"]}]}}(hljs);