(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[96815],{96815:function(O,m,b){"use strict";b.r(m),b.d(m,{xQuery:function(){return B}});var x=function(){function e(M){return{type:M,style:"keyword"}}for(var n=e("operator"),t={type:"atom",style:"atom"},i={type:"punctuation",style:null},u={type:"axis_specifier",style:"qualifier"},l={",":i},g=["after","all","allowing","ancestor","ancestor-or-self","any","array","as","ascending","at","attribute","base-uri","before","boundary-space","by","case","cast","castable","catch","child","collation","comment","construction","contains","content","context","copy","copy-namespaces","count","decimal-format","declare","default","delete","descendant","descendant-or-self","descending","diacritics","different","distance","document","document-node","element","else","empty","empty-sequence","encoding","end","entire","every","exactly","except","external","first","following","following-sibling","for","from","ftand","ftnot","ft-option","ftor","function","fuzzy","greatest","group","if","import","in","inherit","insensitive","insert","instance","intersect","into","invoke","is","item","language","last","lax","least","let","levels","lowercase","map","modify","module","most","namespace","next","no","node","nodes","no-inherit","no-preserve","not","occurs","of","only","option","order","ordered","ordering","paragraph","paragraphs","parent","phrase","preceding","preceding-sibling","preserve","previous","processing-instruction","relationship","rename","replace","return","revalidation","same","satisfies","schema","schema-attribute","schema-element","score","self","sensitive","sentence","sentences","sequence","skip","sliding","some","stable","start","stemming","stop","strict","strip","switch","text","then","thesaurus","times","to","transform","treat","try","tumbling","type","typeswitch","union","unordered","update","updating","uppercase","using","validate","value","variable","version","weight","when","where","wildcards","window","with","without","word","words","xquery"],r=0,o=g.length;r",">=","<","<=",".","|","?","and","or","div","idiv","mod","*","/","+","-"],r=0,o=p.length;r\"\'\/?]/);)g+=r;return f(e,n,S(g,l))}else{if(t=="{")return s(n,{type:"codeblock"}),null;if(t=="}")return a(n),null;if(w(n))return t==">"?"tag":t=="/"&&e.eat(">")?(a(n),"tag"):"variable";if(/\d/.test(t))return e.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/),"atom";if(t==="("&&e.eat(":"))return s(n,{type:"comment"}),f(e,n,I);if(!u&&(t==='"'||t==="'"))return f(e,n,k(t));if(t==="$")return f(e,n,T);if(t===":"&&e.eat("="))return"keyword";if(t==="(")return s(n,{type:"paren"}),null;if(t===")")return a(n),null;if(t==="[")return s(n,{type:"bracket"}),null;if(t==="]")return a(n),null;var o=x.propertyIsEnumerable(t)&&x[t];if(u&&t==='"')for(;e.next()!=='"';);if(u&&t==="'")for(;e.next()!=="'";);o||e.eatWhile(/[\w\$_-]/);var y=e.eat(":");!e.eat(":")&&y&&e.eatWhile(/[\w\$_-]/),e.match(/^[ \t]*\(/,!1)&&(i=!0);var p=e.current();return o=x.propertyIsEnumerable(p)&&x[p],i&&!o&&(o={type:"function_call",style:"def"}),_(n)?(a(n),"variable"):((p=="element"||p=="attribute"||o.type=="axis_specifier")&&s(n,{type:"xmlconstructor"}),o?o.style:"variable")}}function I(e,n){for(var t=!1,i=!1,u=0,l;l=e.next();){if(l==")"&&t)if(u>0)u--;else{a(n);break}else l==":"&&i&&u++;t=l==":",i=l=="("}return"comment"}function k(e,n){return function(t,i){var u;if(D(i)&&t.current()==e)return a(i),n&&(i.tokenize=n),"string";if(s(i,{type:"string",name:e,tokenize:k(e,n)}),t.match("{",!1)&&d(i))return i.tokenize=c,"string";for(;u=t.next();)if(u==e){a(i),n&&(i.tokenize=n);break}else if(t.match("{",!1)&&d(i))return i.tokenize=c,"string";return"string"}}function T(e,n){var t=/[\w\$_-]/;if(e.eat('"')){for(;e.next()!=='"';);e.eat(":")}else e.eatWhile(t),e.match(":=",!1)||e.eat(":");return e.eatWhile(t),n.tokenize=c,"variable"}function S(e,n){return function(t,i){if(t.eatSpace(),n&&t.eat(">"))return a(i),i.tokenize=c,"tag";if(t.eat("/")||s(i,{type:"tag",name:e,tokenize:c}),t.eat(">"))i.tokenize=c;else return i.tokenize=v,"tag";return"tag"}}function v(e,n){var t=e.next();return t=="/"&&e.eat(">")?(d(n)&&a(n),w(n)&&a(n),"tag"):t==">"?(d(n)&&a(n),"tag"):t=="="?null:t=='"'||t=="'"?f(e,n,k(t,v)):(d(n)||s(n,{type:"attribute",tokenize:v}),e.eat(/[a-zA-Z_:]/),e.eatWhile(/[-a-zA-Z0-9_:.]/),e.eatSpace(),(e.match(">",!1)||e.match("/",!1))&&(a(n),n.tokenize=c),"attribute")}function N(e,n){for(var t;t=e.next();)if(t=="-"&&e.match("->",!0))return n.tokenize=c,"comment"}function E(e,n){for(var t;t=e.next();)if(t=="]"&&e.match("]",!0))return n.tokenize=c,"comment"}function A(e,n){for(var t;t=e.next();)if(t=="?"&&e.match(">",!0))return n.tokenize=c,"processingInstruction"}function w(e){return h(e,"tag")}function d(e){return h(e,"attribute")}function _(e){return h(e,"xmlconstructor")}function D(e){return h(e,"string")}function C(e){return e.current()==='"'?e.match(/^[^\"]+\"\:/,!1):e.current()==="'"?e.match(/^[^\"]+\'\:/,!1):!1}function h(e,n){return e.stack.length&&e.stack[e.stack.length-1].type==n}function s(e,n){e.stack.push(n)}function a(e){e.stack.pop();var n=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=n||c}const B={name:"xquery",startState:function(){return{tokenize:c,cc:[],stack:[]}},token:function(e,n){if(e.eatSpace())return null;var t=n.tokenize(e,n);return t},languageData:{commentTokens:{block:{open:"(:",close:":)"}}}}}}]);