!function(){function t(t){function e(e,n,i){if(e.text){var o=h?0:e.text.length-1,c=h?e.text.length:-1;for(null!=i&&(o=i+l);o!=c;o+=l){var a=e.text.charAt(o);if(m.test(a)&&t.getTokenAt({line:n,ch:o+1}).type==f){var s=r[a];if(">"==s.charAt(1)==h)u.push(a);else{if(u.pop()!=s.charAt(0))return{pos:o,match:!1};if(!u.length)return{pos:o,match:!0}}}}}}var n=t.getCursor(),i=t.getLineHandle(n.line),o=n.ch-1,c=o>=0&&r[i.text.charAt(o)]||r[i.text.charAt(++o)];if(!c)return null;for(var a,h=">"==c.charAt(1),l=h?1:-1,f=t.getTokenAt({line:n.line,ch:o+1}).type,u=[i.text.charAt(o)],m=/[(){}[\]]/,s=n.line,d=h?Math.min(s+100,t.lineCount()):Math.max(-1,s-100);s!=d&&!(a=s==n.line?e(i,s,o):e(t.getLineHandle(s),s));s+=l);return{from:{line:n.line,ch:o},to:a&&{line:s,ch:a.pos},match:a&&a.match}}function e(e,n){var r=t(e);if(r){var i=r.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket",o=e.markText(r.from,{line:r.from.line,ch:r.from.ch+1},{className:i}),c=r.to&&e.markText(r.to,{line:r.to.line,ch:r.to.ch+1},{className:i}),a=function(){e.operation(function(){o.clear(),c&&c.clear()})};if(!n)return a;setTimeout(a,800)}}function n(t){t.operation(function(){i&&(i(),i=null),t.somethingSelected()||(i=e(t,!1))})}var r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<"},i=null;CodeMirror.defineOption("matchBrackets",!1,function(t,e){e?t.on("cursorActivity",n):t.off("cursorActivity",n)}),CodeMirror.defineExtension("matchBrackets",function(){e(this,!0)}),CodeMirror.defineExtension("findMatchingBracket",function(){return t(this)})}();