"use strict";(self.webpackChunksc_note_comment=self.webpackChunksc_note_comment||[]).push([[5691],{5691(b,d,F){var r;function l(n){return new RegExp("^(?:"+n.join("|")+")$","i")}F.d(d,{sparql:()=>k});var x=l(["str","lang","langmatches","datatype","bound","sameterm","isiri","isuri","iri","uri","bnode","count","sum","min","max","avg","sample","group_concat","rand","abs","ceil","floor","round","concat","substr","strlen","replace","ucase","lcase","encode_for_uri","contains","strstarts","strends","strbefore","strafter","year","month","day","hours","minutes","seconds","timezone","tz","now","uuid","struuid","md5","sha1","sha256","sha384","sha512","coalesce","if","strlang","strdt","isnumeric","regex","exists","isblank","isliteral","a","bind"]),h=l(["base","prefix","select","distinct","reduced","construct","describe","ask","from","named","where","order","limit","offset","filter","optional","graph","by","asc","desc","as","having","undef","values","group","minus","in","not","service","silent","using","insert","delete","union","true","false","with","data","copy","to","move","add","create","drop","clear","load","into"]),g=/[*+\-<>=&|\^\/!\?]/,a="[A-Za-z_\\-0-9]",m=new RegExp("[A-Za-z]"),_=new RegExp("(("+a+"|\\.)*("+a+"))?:");function f(n,e){var t=n.next();if(r=null,"$"==t||"?"==t)return"?"==t&&n.match(/\s/,!1)?"operator":(n.match(/^[A-Za-z0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][A-Za-z0-9_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]*/),"variableName.local");if("<"==t&&!n.match(/^[\s\u00a0=]/,!1))return n.match(/^[^\s\u00a0>]*>?/),"atom";if('"'==t||"'"==t)return e.tokenize=function v(n){return function(e,t){for(var u,i=!1;null!=(u=e.next());){if(u==n&&!i){t.tokenize=f;break}i=!i&&"\\"==u}return"string"}}(t),e.tokenize(n,e);if(/[{}\(\),\.;\[\]]/.test(t))return r=t,"bracket";if("#"==t)return n.skipToEnd(),"comment";if(g.test(t))return"operator";if(":"==t)return s(n),"atom";if("@"==t)return n.eatWhile(/[a-z\d\-]/i),"meta";if(m.test(t)&&n.match(_))return s(n),"atom";n.eatWhile(/[_\w\d]/);var i=n.current();return x.test(i)?"builtin":h.test(i)?"keyword":"variable"}function s(n){n.match(/(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/i)}function o(n,e,t){n.context={prev:n.context,indent:n.indent,col:t,type:e}}function c(n){n.indent=n.context.indent,n.context=n.context.prev}const k={name:"sparql",startState:function(){return{tokenize:f,context:null,indent:0,col:0}},token:function(n,e){if(n.sol()&&(e.context&&null==e.context.align&&(e.context.align=!1),e.indent=n.indentation()),n.eatSpace())return null;var t=e.tokenize(n,e);if("comment"!=t&&e.context&&null==e.context.align&&"pattern"!=e.context.type&&(e.context.align=!0),"("==r)o(e,")",n.column());else if("["==r)o(e,"]",n.column());else if("{"==r)o(e,"}",n.column());else if(/[\]\}\)]/.test(r)){for(;e.context&&"pattern"==e.context.type;)c(e);e.context&&r==e.context.type&&(c(e),"}"==r&&e.context&&"pattern"==e.context.type&&c(e))}else"."==r&&e.context&&"pattern"==e.context.type?c(e):/atom|string|variable/.test(t)&&e.context&&(/[\}\]]/.test(e.context.type)?o(e,"pattern",n.column()):"pattern"==e.context.type&&!e.context.align&&(e.context.align=!0,e.context.col=n.column()));return t},indent:function(n,e,t){var i=e&&e.charAt(0),u=n.context;if(/[\]\}]/.test(i))for(;u&&"pattern"==u.type;)u=u.prev;var p=u&&i==u.type;return u?"pattern"==u.type?u.col:u.align?u.col+(p?0:1):u.indent+(p?0:t.unit):0},languageData:{commentTokens:{line:"#"}}}}}]);