Liferay.Loader.define("liferay!template-web$codemirror@5.65.2/mode/tiddlywiki/tiddlywiki",["module","exports","require","../../lib/codemirror"],(function(e,t,n){var r,i=void 0;window;r=function(e){"use strict";e.defineMode("tiddlywiki",(function(){var e={},t={allTags:!0,closeAll:!0,list:!0,newJournal:!0,newTiddler:!0,permaview:!0,saveChanges:!0,search:!0,slider:!0,tabs:!0,tag:!0,tagging:!0,tags:!0,tiddler:!0,timeline:!0,today:!0,version:!0,option:!0,with:!0,filter:!0},n=/[\w_\-]/i,r=/^\-\-\-\-+$/,i=/^\/\*\*\*$/,o=/^\*\*\*\/$/,a=/^<<<$/,c=/^\/\/\{\{\{$/,u=/^\/\/\}\}\}$/,f=/^<!--\{\{\{-->$/,k=/^<!--\}\}\}-->$/,m=/^\{\{\{$/,l=/^\}\}\}$/,d=/.*?\}\}\}/;function chain(e,t,n){return t.tokenize=n,n(e,t)}function tokenBase(t,l){var d=t.sol(),h=t.peek();if(l.block=!1,d&&/[<\/\*{}\-]/.test(h)){if(t.match(m))return l.block=!0,chain(t,l,twTokenCode);if(t.match(a))return"quote";if(t.match(i)||t.match(o))return"comment";if(t.match(c)||t.match(u)||t.match(f)||t.match(k))return"comment";if(t.match(r))return"hr"}if(t.next(),d&&/[\/\*!#;:>|]/.test(h)){if("!"==h)return t.skipToEnd(),"header";if("*"==h)return t.eatWhile("*"),"comment";if("#"==h)return t.eatWhile("#"),"comment";if(";"==h)return t.eatWhile(";"),"comment";if(":"==h)return t.eatWhile(":"),"comment";if(">"==h)return t.eatWhile(">"),"quote";if("|"==h)return"header"}if("{"==h&&t.match("{{"))return chain(t,l,twTokenCode);if(/[hf]/i.test(h)&&/[ti]/i.test(t.peek())&&t.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if('"'==h)return"string";if("~"==h)return"brace";if(/[\[\]]/.test(h)&&t.match(h))return"brace";if("@"==h)return t.eatWhile(n),"link";if(/\d/.test(h))return t.eatWhile(/\d/),"number";if("/"==h){if(t.eat("%"))return chain(t,l,twTokenComment);if(t.eat("/"))return chain(t,l,twTokenEm)}if("_"==h&&t.eat("_"))return chain(t,l,twTokenUnderline);if("-"==h&&t.eat("-")){if(" "!=t.peek())return chain(t,l,twTokenStrike);if(" "==t.peek())return"brace"}return"'"==h&&t.eat("'")?chain(t,l,twTokenStrong):"<"==h&&t.eat("<")?chain(t,l,twTokenMacro):(t.eatWhile(/[\w\$_]/),e.propertyIsEnumerable(t.current())?"keyword":null)}function twTokenComment(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=tokenBase;break}r="%"==n}return"comment"}function twTokenStrong(e,t){for(var n,r=!1;n=e.next();){if("'"==n&&r){t.tokenize=tokenBase;break}r="'"==n}return"strong"}function twTokenCode(e,t){var n=t.block;return n&&e.current()?"comment":!n&&e.match(d)||n&&e.sol()&&e.match(l)?(t.tokenize=tokenBase,"comment"):(e.next(),"comment")}function twTokenEm(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=tokenBase;break}r="/"==n}return"em"}function twTokenUnderline(e,t){for(var n,r=!1;n=e.next();){if("_"==n&&r){t.tokenize=tokenBase;break}r="_"==n}return"underlined"}function twTokenStrike(e,t){for(var n,r=!1;n=e.next();){if("-"==n&&r){t.tokenize=tokenBase;break}r="-"==n}return"strikethrough"}function twTokenMacro(e,n){if("<<"==e.current())return"macro";var r=e.next();return r?">"==r&&">"==e.peek()?(e.next(),n.tokenize=tokenBase,"macro"):(e.eatWhile(/[\w\$_]/),t.propertyIsEnumerable(e.current())?"keyword":null):(n.tokenize=tokenBase,null)}return{startState:function(){return{tokenize:tokenBase}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)}}})),e.defineMIME("text/x-tiddlywiki","tiddlywiki")},"object"==typeof t&&"object"==typeof e?r(n("../../lib/codemirror")):"function"==typeof i&&i.amd?i(["../../lib/codemirror"],r):r(CodeMirror)}));
//# sourceMappingURL=tiddlywiki.js.map