Liferay.Loader.define("liferay!object-js-components-web$codemirror@5.65.12/mode/coffeescript/coffeescript",["module","exports","require","../../lib/codemirror"],(function(e,t,n){var o,r=void 0;window;o=function(e){"use strict";e.defineMode("coffeescript",(function(e,t){var n="error";function wordRegexp(e){return new RegExp("^(("+e.join(")|(")+"))\\b")}var o=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,r=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,i=/^[_A-Za-z$][_A-Za-z$0-9]*/,c=/^@[_A-Za-z$][_A-Za-z$0-9]*/,f=wordRegexp(["and","or","not","is","isnt","in","instanceof","typeof"]),a=["for","while","loop","if","unless","else","switch","try","catch","finally","class"],p=wordRegexp(a.concat(["break","by","continue","debugger","delete","do","in","of","new","return","then","this","@","throw","when","until","extends"]));a=wordRegexp(a);var s=/^('{3}|\"{3}|['\"])/,d=/^(\/{3}|\/)/,u=wordRegexp(["Infinity","NaN","undefined","null","true","false","on","off","yes","no"]);function tokenBase(e,t){if(e.sol()){null===t.scope.align&&(t.scope.align=!1);var a=t.scope.offset;if(e.eatSpace()){var l=e.indentation();return l>a&&"coffee"==t.scope.type?"indent":l<a?"dedent":null}a>0&&dedent(e,t)}if(e.eatSpace())return null;var m=e.peek();if(e.match("####"))return e.skipToEnd(),"comment";if(e.match("###"))return t.tokenize=longComment,t.tokenize(e,t);if("#"===m)return e.skipToEnd(),"comment";if(e.match(/^-?[0-9\.]/,!1)){var h=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)&&(h=!0),e.match(/^-?\d+\.\d*/)&&(h=!0),e.match(/^-?\.\d+/)&&(h=!0),h)return"."==e.peek()&&e.backUp(1),"number";var v=!1;if(e.match(/^-?0x[0-9a-f]+/i)&&(v=!0),e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)&&(v=!0),e.match(/^-?0(?![\dx])/i)&&(v=!0),v)return"number"}if(e.match(s))return t.tokenize=tokenFactory(e.current(),!1,"string"),t.tokenize(e,t);if(e.match(d)){if("/"!=e.current()||e.match(/^.*\//,!1))return t.tokenize=tokenFactory(e.current(),!0,"string-2"),t.tokenize(e,t);e.backUp(1)}return e.match(o)||e.match(f)?"operator":e.match(r)?"punctuation":e.match(u)?"atom":e.match(c)||t.prop&&e.match(i)?"property":e.match(p)?"keyword":e.match(i)?"variable":(e.next(),n)}function tokenFactory(e,o,r){return function(i,c){for(;!i.eol();)if(i.eatWhile(/[^'"\/\\]/),i.eat("\\")){if(i.next(),o&&i.eol())return r}else{if(i.match(e))return c.tokenize=tokenBase,r;i.eat(/['"\/]/)}return o&&(t.singleLineStringErrors?r=n:c.tokenize=tokenBase),r}}function longComment(e,t){for(;!e.eol();){if(e.eatWhile(/[^#]/),e.match("###")){t.tokenize=tokenBase;break}e.eatWhile("#")}return"comment"}function indent(t,n,o){o=o||"coffee";for(var r=0,i=!1,c=null,f=n.scope;f;f=f.prev)if("coffee"===f.type||"}"==f.type){r=f.offset+e.indentUnit;break}"coffee"!==o?(i=null,c=t.column()+t.current().length):n.scope.align&&(n.scope.align=!1),n.scope={offset:r,type:o,prev:n.scope,align:i,alignOffset:c}}function dedent(e,t){if(t.scope.prev){if("coffee"===t.scope.type){for(var n=e.indentation(),o=!1,r=t.scope;r;r=r.prev)if(n===r.offset){o=!0;break}if(!o)return!0;for(;t.scope.prev&&t.scope.offset!==n;)t.scope=t.scope.prev;return!1}return t.scope=t.scope.prev,!1}}return{startState:function(e){return{tokenize:tokenBase,scope:{offset:e||0,type:"coffee",prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var o=null===t.scope.align&&t.scope;o&&e.sol()&&(o.align=!1);var r=function tokenLexer(e,t){var o=t.tokenize(e,t),r=e.current();"return"===r&&(t.dedent=!0),(("->"===r||"=>"===r)&&e.eol()||"indent"===o)&&indent(e,t);var i="[({".indexOf(r);if(-1!==i&&indent(e,t,"])}".slice(i,i+1)),a.exec(r)&&indent(e,t),"then"==r&&dedent(e,t),"dedent"===o&&dedent(e,t))return n;if(-1!==(i="])}".indexOf(r))){for(;"coffee"==t.scope.type&&t.scope.prev;)t.scope=t.scope.prev;t.scope.type==r&&(t.scope=t.scope.prev)}return t.dedent&&e.eol()&&("coffee"==t.scope.type&&t.scope.prev&&(t.scope=t.scope.prev),t.dedent=!1),o}(e,t);return r&&"comment"!=r&&(o&&(o.align=!0),t.prop="punctuation"==r&&"."==e.current()),r},indent:function(e,t){if(e.tokenize!=tokenBase)return 0;var n=e.scope,o=t&&"])}".indexOf(t.charAt(0))>-1;if(o)for(;"coffee"==n.type&&n.prev;)n=n.prev;var r=o&&n.type===t.charAt(0);return n.align?n.alignOffset-(r?1:0):(r?n.prev:n).offset},lineComment:"#",fold:"indent"}})),e.defineMIME("application/vnd.coffeescript","coffeescript"),e.defineMIME("text/x-coffeescript","coffeescript"),e.defineMIME("text/coffeescript","coffeescript")},"object"==typeof t&&"object"==typeof e?o(n("../../lib/codemirror")):"function"==typeof r&&r.amd?r(["../../lib/codemirror"],o):o(CodeMirror)}));
//# sourceMappingURL=coffeescript.js.map