'use strict';(function(d){"object"==typeof exports&&"object"==typeof module?d(require("../../lib/codemirror")):"function"==typeof define&&define.amd?define(["../../lib/codemirror"],d):d(CodeMirror)})(function(d){d.defineMode("turtle",function(d){function h(a,b){var c=a.next();e=null;if("<"!=c||a.match(/^[\s\u00a0=]/,!1)){if('"'==c||"'"==c)return b.tokenize=l(c),b.tokenize(a,b);if(/[{}\(\),\.;\[\]]/.test(c))return e=c,null;if("#"==c)return a.skipToEnd(),"comment";if(k.test(c))return a.eatWhile(k),
null;if(":"==c)return"operator";a.eatWhile(/[_\w\d]/);if(":"==a.peek())return"variable-3";a=a.current();return m.test(a)?"meta":"A"<=c&&"Z">=c?"comment":"keyword"}a.match(/^[^\s\u00a0>]*>?/);return"atom"}function l(a){return function(b,c){for(var d=!1,e;null!=(e=b.next());){if(e==a&&!d){c.tokenize=h;break}d=!d&&"\\"==e}return"string"}}function f(a,b,c){a.context={prev:a.context,indent:a.indent,col:c,type:b}}function g(a){a.indent=a.context.indent;a.context=a.context.prev}var n=d.indentUnit,e,m=/^(?:@prefix|@base|a)$/i,
k=/[*+\-<>=&|]/;return{startState:function(){return{tokenize:h,context:null,indent:0,col:0}},token:function(a,b){a.sol()&&(b.context&&null==b.context.align&&(b.context.align=!1),b.indent=a.indentation());if(a.eatSpace())return null;var c=b.tokenize(a,b);"comment"!=c&&b.context&&null==b.context.align&&"pattern"!=b.context.type&&(b.context.align=!0);if("("==e)f(b,")",a.column());else if("["==e)f(b,"]",a.column());else if("{"==e)f(b,"}",a.column());else if(/[\]\}\)]/.test(e)){for(;b.context&&"pattern"==
b.context.type;)g(b);b.context&&e==b.context.type&&g(b)}else"."==e&&b.context&&"pattern"==b.context.type?g(b):/atom|string|variable/.test(c)&&b.context&&(/[\}\]]/.test(b.context.type)?f(b,"pattern",a.column()):"pattern"!=b.context.type||b.context.align||(b.context.align=!0,b.context.col=a.column()));return c},indent:function(a,b){b=b&&b.charAt(0);a=a.context;if(/[\]\}]/.test(b))for(;a&&"pattern"==a.type;)a=a.prev;b=a&&b==a.type;return a?"pattern"==a.type?a.col:a.align?a.col+(b?0:1):a.indent+(b?0:
n):0},lineComment:"#"}});d.defineMIME("text/turtle","turtle")});
