(function(f){"object"==typeof exports&&"object"==typeof module?f(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],f):f(CodeMirror)})(function(f){f.defineMode("python",function(t,e){function m(a){return new RegExp("^(("+a.join(")|(")+"))\\b")}function l(a,b){if(a.sol()){var c=b.scopes[0].offset;if(a.eatSpace()){var d=a.indentation();d>c?k="indent":d!]/,A=e.singleDelimiters|| /^[\(\)\[\]\{\}@,:`=;\.]/,x=e.doubleOperators||/^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(\/\/)|(\*\*))/,w=e.doubleDelimiters||/^((\+=)|(\-=)|(\*=)|(%=)|(\/=)|(&=)|(\|=)|(\^=))/,v=e.tripleDelimiters||/^((\/\/=)|(>>=)|(<<=)|(\*\*=))/,p=e.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/,D=e.hangingIndent||e.indentUnit,z=m(["and","or","not","is","in"]),g="as assert break class continue def del elif else except finally for from global if import lambda pass raise return try while with yield".split(" "),h="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__".split(" "), F="apply basestring buffer cmp coerce execfile file intern long raw_input reduce reload unichr unicode xrange False True None".split(" "),G=["exec","print"],H=["ascii","bytes","exec","print"],I=["nonlocal","False","True","None"];void 0!=e.extra_keywords&&(g=g.concat(e.extra_keywords));void 0!=e.extra_builtins&&(h=h.concat(e.extra_builtins));if(e.version&&3===parseInt(e.version,10)){g=g.concat(I);h=h.concat(H);var q=/^(([rb]|(br))?('{3}|"{3}|['"]))/i}else g=g.concat(G),h=h.concat(F),q=/^(([rub]|(ur)|(br))?('{3}|"{3}|['"]))/i; var B=m(g),C=m(h),k=null;return{startState:function(a){return{tokenize:l,scopes:[{offset:a||0,type:"py"}],lastStyle:null,lastToken:null,lambda:!1,dedent:0}},token:function(a,b){var c=E(a,b);b.lastStyle=c;var d=a.current();d&&c&&(b.lastToken=d);a.eol()&&b.lambda&&(b.lambda=!1);return c},indent:function(a){return a.tokenize!=l?a.tokenize.isString?f.Pass:0:a.scopes[0].offset},lineComment:"#",fold:"indent"}});f.defineMIME("text/x-python","python");f.defineMIME("text/x-cython",{name:"python",extra_keywords:"by cdef cimport cpdef ctypedef enum exceptextern gil include nogil property publicreadonly struct union DEF IF ELIF ELSE".split(" ")})});