Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/mode/shell/shell",["module","exports","require","../../lib/codemirror"],(function(e,t,n){var r,i=void 0;window;r=function(e){"use strict";e.defineMode("shell",(function(){var t={};function define(e,n){for(var r=0;r<n.length;r++)t[n[r]]=e}var n=["true","false"],r=["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],i=["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","nl","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"];function tokenBase(e,n){if(e.eatSpace())return null;var r=e.sol(),i=e.next();if("\\"===i)return e.next(),null;if("'"===i||'"'===i||"`"===i)return n.tokens.unshift(tokenString(i,"`"===i?"quote":"string")),tokenize(e,n);if("#"===i)return r&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if("$"===i)return n.tokens.unshift(tokenDollar),tokenize(e,n);if("+"===i||"="===i)return"operator";if("-"===i)return e.eat("-"),e.eatWhile(/\w/),"attribute";if("<"==i){if(e.match("<<"))return"operator";var o=e.match(/^<-?\s*['"]?([^'"]*)['"]?/);if(o)return n.tokens.unshift(function tokenHeredoc(e){return function(t,n){return t.sol()&&t.string==e&&n.tokens.shift(),t.skipToEnd(),"string-2"}}(o[1])),"string-2"}if(/\d/.test(i)&&(e.eatWhile(/\d/),e.eol()||!/\w/.test(e.peek())))return"number";e.eatWhile(/[\w-]/);var s=e.current();return"="===e.peek()&&/\w+/.test(s)?"def":t.hasOwnProperty(s)?t[s]:null}function tokenString(e,t){var n="("==e?")":"{"==e?"}":e;return function(r,i){for(var o,s=!1;null!=(o=r.next());){if(o===n&&!s){i.tokens.shift();break}if("$"===o&&!s&&"'"!==e&&r.peek()!=n){s=!0,r.backUp(1),i.tokens.unshift(tokenDollar);break}if(!s&&e!==n&&o===e)return i.tokens.unshift(tokenString(e,t)),tokenize(r,i);if(!s&&/['"]/.test(o)&&!/['"]/.test(e)){i.tokens.unshift(tokenStringStart(o,"string")),r.backUp(1);break}s=!s&&"\\"===o}return t}}function tokenStringStart(e,t){return function(n,r){return r.tokens[0]=tokenString(e,t),n.next(),tokenize(n,r)}}e.registerHelper("hintWords","shell",n.concat(r,i)),define("atom",n),define("keyword",r),define("builtin",i);var tokenDollar=function(e,t){t.tokens.length>1&&e.eat("$");var n=e.next();return/['"({]/.test(n)?(t.tokens[0]=tokenString(n,"("==n?"quote":"{"==n?"def":"string"),tokenize(e,t)):(/\d/.test(n)||e.eatWhile(/\w/),t.tokens.shift(),"def")};function tokenize(e,t){return(t.tokens[0]||tokenBase)(e,t)}return{startState:function(){return{tokens:[]}},token:function(e,t){return tokenize(e,t)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}})),e.defineMIME("text/x-sh","shell"),e.defineMIME("application/x-sh","shell")},"object"==typeof t&&"object"==typeof e?r(n("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)}));
//# sourceMappingURL=shell.js.map