!function(e){"object"==typeof exports&&"object"==typeof module?e(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],e):e(CodeMirror)}(function(e){"use strict";e.defineMode("ntriples",function(){var e={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};function _(_,I){var n,R=_.location;n=R==e.PRE_SUBJECT&&"<"==I?e.WRITING_SUB_URI:R==e.PRE_SUBJECT&&"_"==I?e.WRITING_BNODE_URI:R==e.PRE_PRED&&"<"==I?e.WRITING_PRED_URI:R==e.PRE_OBJ&&"<"==I?e.WRITING_OBJ_URI:R==e.PRE_OBJ&&"_"==I?e.WRITING_OBJ_BNODE:R==e.PRE_OBJ&&'"'==I?e.WRITING_OBJ_LITERAL:R==e.WRITING_SUB_URI&&">"==I?e.PRE_PRED:R==e.WRITING_BNODE_URI&&" "==I?e.PRE_PRED:R==e.WRITING_PRED_URI&&">"==I?e.PRE_OBJ:R==e.WRITING_OBJ_URI&&">"==I?e.POST_OBJ:R==e.WRITING_OBJ_BNODE&&" "==I?e.POST_OBJ:R==e.WRITING_OBJ_LITERAL&&'"'==I?e.POST_OBJ:R==e.WRITING_LIT_LANG&&" "==I?e.POST_OBJ:R==e.WRITING_LIT_TYPE&&">"==I?e.POST_OBJ:R==e.WRITING_OBJ_LITERAL&&"@"==I?e.WRITING_LIT_LANG:R==e.WRITING_OBJ_LITERAL&&"^"==I?e.WRITING_LIT_TYPE:" "!=I||R!=e.PRE_SUBJECT&&R!=e.PRE_PRED&&R!=e.PRE_OBJ&&R!=e.POST_OBJ?R==e.POST_OBJ&&"."==I?e.PRE_SUBJECT:e.ERROR:R,_.location=n}return{startState:function(){return{location:e.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(e,I){var n=e.next();if("<"==n){_(I,n);var R="";return e.eatWhile(function(e){return"#"!=e&&">"!=e&&(R+=e,!0)}),I.uris.push(R),e.match("#",!1)?"variable":(e.next(),_(I,">"),"variable")}if("#"==n){var t="";return e.eatWhile(function(e){return">"!=e&&" "!=e&&(t+=e,!0)}),I.anchors.push(t),"variable-2"}if(">"==n)return _(I,">"),"variable";if("_"==n){_(I,n);var r="";return e.eatWhile(function(e){return" "!=e&&(r+=e,!0)}),I.bnodes.push(r),e.next(),_(I," "),"builtin"}if('"'==n)return _(I,n),e.eatWhile(function(e){return'"'!=e}),e.next(),"@"!=e.peek()&&"^"!=e.peek()&&_(I,'"'),"string";if("@"==n){_(I,"@");var i="";return e.eatWhile(function(e){return" "!=e&&(i+=e,!0)}),I.langs.push(i),e.next(),_(I," "),"string-2"}if("^"==n){e.next(),_(I,"^");var T="";return e.eatWhile(function(e){return">"!=e&&(T+=e,!0)}),I.types.push(T),e.next(),_(I,">"),"variable"}" "==n&&_(I,n),"."==n&&_(I,n)}}}),e.defineMIME("application/n-triples","ntriples"),e.defineMIME("application/n-quads","ntriples"),e.defineMIME("text/n-triples","ntriples")});