Liferay.Loader.define("liferay!object-js-components-web$codemirror@5.65.12/mode/velocity/velocity",["module","exports","require","../../lib/codemirror"],(function(e,t,n){var r,o=void 0;window;r=function(e){"use strict";e.defineMode("velocity",(function(){function parseWords(e){for(var t={},n=e.split(" "),r=0;r<n.length;++r)t[n[r]]=!0;return t}var e=parseWords("#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}"),t=parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"),n=parseWords("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"),r=/[+\-*&%=<>!?:\/|]/;function chain(e,t,n){return t.tokenize=n,n(e,t)}function tokenBase(o,i){var a=i.beforeParams;i.beforeParams=!1;var s=o.next();if("'"==s&&!i.inString&&i.inParams)return i.lastTokenWasBuiltin=!1,chain(o,i,tokenString(s));if('"'!=s){if(/[\[\]{}\(\),;\.]/.test(s))return"("==s&&a?i.inParams=!0:")"==s&&(i.inParams=!1,i.lastTokenWasBuiltin=!0),null;if(/\d/.test(s))return i.lastTokenWasBuiltin=!1,o.eatWhile(/[\w\.]/),"number";if("#"==s&&o.eat("*"))return i.lastTokenWasBuiltin=!1,chain(o,i,tokenComment);if("#"==s&&o.match(/ *\[ *\[/))return i.lastTokenWasBuiltin=!1,chain(o,i,tokenUnparsed);if("#"==s&&o.eat("#"))return i.lastTokenWasBuiltin=!1,o.skipToEnd(),"comment";if("$"==s)return o.eat("!"),o.eatWhile(/[\w\d\$_\.{}-]/),n&&n.propertyIsEnumerable(o.current())?"keyword":(i.lastTokenWasBuiltin=!0,i.beforeParams=!0,"builtin");if(r.test(s))return i.lastTokenWasBuiltin=!1,o.eatWhile(r),"operator";o.eatWhile(/[\w\$_{}@]/);var l=o.current();return e&&e.propertyIsEnumerable(l)?"keyword":t&&t.propertyIsEnumerable(l)||o.current().match(/^#@?[a-z0-9_]+ *$/i)&&"("==o.peek()&&(!t||!t.propertyIsEnumerable(l.toLowerCase()))?(i.beforeParams=!0,i.lastTokenWasBuiltin=!1,"keyword"):i.inString?(i.lastTokenWasBuiltin=!1,"string"):o.pos>l.length&&"."==o.string.charAt(o.pos-l.length-1)&&i.lastTokenWasBuiltin?"builtin":(i.lastTokenWasBuiltin=!1,null)}return i.lastTokenWasBuiltin=!1,i.inString?(i.inString=!1,"string"):i.inParams?chain(o,i,tokenString(s)):void 0}function tokenString(e){return function(t,n){for(var r,o=!1,i=!1;null!=(r=t.next());){if(r==e&&!o){i=!0;break}if('"'==e&&"$"==t.peek()&&!o){n.inString=!0,i=!0;break}o=!o&&"\\"==r}return i&&(n.tokenize=tokenBase),"string"}}function tokenComment(e,t){for(var n,r=!1;n=e.next();){if("#"==n&&r){t.tokenize=tokenBase;break}r="*"==n}return"comment"}function tokenUnparsed(e,t){for(var n,r=0;n=e.next();){if("#"==n&&2==r){t.tokenize=tokenBase;break}"]"==n?r++:" "!=n&&(r=0)}return"meta"}return{startState:function(){return{tokenize:tokenBase,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},blockCommentStart:"#*",blockCommentEnd:"*#",lineComment:"##",fold:"velocity"}})),e.defineMIME("text/velocity","velocity")},"object"==typeof t&&"object"==typeof e?r(n("../../lib/codemirror")):"function"==typeof o&&o.amd?o(["../../lib/codemirror"],r):r(CodeMirror)}));
//# sourceMappingURL=velocity.js.map