Liferay.Loader.define("portal-search-web$codemirror@5.62.0/mode/smarty/smarty",["module","exports","require","../../lib/codemirror"],(function(e,t,r){window,function(e){"use strict";e.defineMode("smarty",(function(t,r){var i,n=r.rightDelimiter||"}",a=r.leftDelimiter||"{",o=r.version||2,l=e.getMode(t,r.baseMode||"null"),u=["debug","extends","function","include","literal"],f={operatorChars:/[+\-*&%=<>!?]/,validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/};function s(e,t){return i=t,e}function d(e,t){return null==t&&(t=e.pos),3===o&&"{"==a&&(t==e.string.length||/\s/.test(e.string.charAt(t)))}function c(e,t){for(var r,o=e.string,u=e.pos;;){var f=o.indexOf(a,u);if(u=f+a.length,-1==f||!d(e,f+a.length))break}if(f==e.pos)return e.match(a),e.eat("*")?function(e,t,r){return t.tokenize=r,r(e,t)}(e,t,("comment",r="*"+n,function(e,t){for(;!e.eol();){if(e.match(r)){t.tokenize=c;break}e.next()}return"comment"})):(t.depth++,t.tokenize=p,i="startTag","tag");f>-1&&(e.string=o.slice(0,f));var s=l.token(e,t.base);return f>-1&&(e.string=o),s}function p(e,t){if(e.match(n,!0))return 3===o?(t.depth--,t.depth<=0&&(t.tokenize=c)):t.tokenize=c,s("tag",null);if(e.match(a,!0))return t.depth++,s("tag","startTag");var r=e.next();if("$"==r)return e.eatWhile(f.validIdentifier),s("variable-2","variable");if("|"==r)return s("operator","pipe");if("."==r)return s("operator","property");if(f.stringChar.test(r))return t.tokenize=(l=r,function(e,t){for(var r=null,i=null;!e.eol();){if(i=e.peek(),e.next()==l&&"\\"!==r){t.tokenize=p;break}r=i}return"string"}),s("string","string");if(f.operatorChars.test(r))return e.eatWhile(f.operatorChars),s("operator","operator");if("["==r||"]"==r)return s("bracket","bracket");if("("==r||")"==r)return s("bracket","operator");if(/\d/.test(r))return e.eatWhile(/\d/),s("number","number");if("variable"==t.last){if("@"==r)return e.eatWhile(f.validIdentifier),s("property","property");if("|"==r)return e.eatWhile(f.validIdentifier),s("qualifier","modifier")}else{if("pipe"==t.last)return e.eatWhile(f.validIdentifier),s("qualifier","modifier");if("whitespace"==t.last)return e.eatWhile(f.validIdentifier),s("attribute","modifier")}if("property"==t.last)return e.eatWhile(f.validIdentifier),s("property",null);if(/\s/.test(r))return i="whitespace",null;var l,d="";"/"!=r&&(d+=r);for(var h=null;h=e.eat(f.validIdentifier);)d+=h;for(var m=0,b=u.length;m<b;m++)if(u[m]==d)return s("keyword","keyword");return/\s/.test(r)?null:s("tag","tag")}return{startState:function(){return{base:e.startState(l),tokenize:c,last:null,depth:0}},copyState:function(t){return{base:e.copyState(l,t.base),tokenize:t.tokenize,last:t.last,depth:t.depth}},innerMode:function(e){if(e.tokenize==c)return{mode:l,state:e.base}},token:function(e,t){var r=t.tokenize(e,t);return t.last=i,r},indent:function(t,r,i){return t.tokenize==c&&l.indent?l.indent(t.base,r,i):e.Pass},blockCommentStart:a+"*",blockCommentEnd:"*"+n}})),e.defineMIME("text/x-smarty","smarty")}("object"==typeof t&&"object"==typeof e?r("../../lib/codemirror"):CodeMirror)}));
//# sourceMappingURL=smarty.js.map