Liferay.Loader.define("journal-web$codemirror@5.65.2/mode/htmlmixed/htmlmixed",["module","exports","require","../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],(function(t,e,a){var n,l=void 0;window;n=function(t){"use strict";var e={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},a={};function getAttrValue(t,e){var n=t.match(function getAttrRegexp(t){return a[t]||(a[t]=new RegExp("\\s+"+t+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(e));return n?/^\s*(.*?)\s*$/.exec(n[2])[1]:""}function getTagRegexp(t,e){return new RegExp((e?"^":"")+"</\\s*"+t+"\\s*>","i")}function addTags(t,e){for(var a in t)for(var n=e[a]||(e[a]=[]),l=t[a],o=l.length-1;o>=0;o--)n.unshift(l[o])}t.defineMode("htmlmixed",(function(a,n){var l=t.getMode(a,{name:"xml",htmlMode:!0,multilineTagIndentFactor:n.multilineTagIndentFactor,multilineTagIndentPastTag:n.multilineTagIndentPastTag,allowMissingTagName:n.allowMissingTagName}),o={},r=n&&n.tags,i=n&&n.scriptTypes;if(addTags(e,o),r&&addTags(r,o),i)for(var c=i.length-1;c>=0;c--)o.script.unshift(["type",i[c].matches,i[c].mode]);function html(e,n){var r,i=l.token(e,n.htmlState),c=/\btag\b/.test(i);if(c&&!/[<>\s\/]/.test(e.current())&&(r=n.htmlState.tagName&&n.htmlState.tagName.toLowerCase())&&o.hasOwnProperty(r))n.inTag=r+" ";else if(n.inTag&&c&&/>$/.test(e.current())){var s=/^([\S]+) (.*)/.exec(n.inTag);n.inTag=null;var u=">"==e.current()&&function findMatchingMode(t,e){for(var a=0;a<t.length;a++){var n=t[a];if(!n[0]||n[1].test(getAttrValue(e,n[0])))return n[2]}}(o[s[1]],s[2]),m=t.getMode(a,u),d=getTagRegexp(s[1],!0),g=getTagRegexp(s[1],!1);n.token=function(t,e){return t.match(d,!1)?(e.token=html,e.localState=e.localMode=null,null):function maybeBackup(t,e,a){var n=t.current(),l=n.search(e);return l>-1?t.backUp(n.length-l):n.match(/<\/?$/)&&(t.backUp(n.length),t.match(e,!1)||t.match(n)),a}(t,g,e.localMode.token(t,e.localState))},n.localMode=m,n.localState=t.startState(m,l.indent(n.htmlState,"",""))}else n.inTag&&(n.inTag+=e.current(),e.eol()&&(n.inTag+=" "));return i}return{startState:function(){return{token:html,inTag:null,localMode:null,localState:null,htmlState:t.startState(l)}},copyState:function(e){var a;return e.localState&&(a=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:a,htmlState:t.copyState(l,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,a,n){return!e.localMode||/^\s*<\//.test(a)?l.indent(e.htmlState,a,n):e.localMode.indent?e.localMode.indent(e.localState,a,n):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||l}}}}),"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")},"object"==typeof e&&"object"==typeof t?n(a("../../lib/codemirror"),a("../xml/xml"),a("../javascript/javascript"),a("../css/css")):"function"==typeof l&&l.amd?l(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],n):n(CodeMirror)}));
//# sourceMappingURL=htmlmixed.js.map