(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8c4e78d4-7c9e-4cbc-b38d-26e627e30703",e._sentryDebugIdIdentifier="sentry-dbid-8c4e78d4-7c9e-4cbc-b38d-26e627e30703")}catch{}})();function c(e,n,t){return function(r,a){for(;!r.eol();){if(r.match(n)){a.tokenize=o;break}r.next()}return t&&(a.tokenize=t),e}}function f(e){return function(n,t){for(;!n.eol();)n.next();return t.tokenize=o,e}}function o(e,n){function t(h){return n.tokenize=h,h(e,n)}var r=e.sol(),a=e.next();switch(a){case"{":return e.eat("/"),e.eatSpace(),e.eatWhile(/[^\s\u00a0=\"\'\/?(}]/),n.tokenize=b,"tag";case"_":if(e.eat("_"))return t(c("strong","__",o));break;case"'":if(e.eat("'"))return t(c("em","''",o));break;case"(":if(e.eat("("))return t(c("link","))",o));break;case"[":return t(c("url","]",o));case"|":if(e.eat("|"))return t(c("comment","||"));break;case"-":if(e.eat("="))return t(c("header string","=-",o));if(e.eat("-"))return t(c("error tw-deleted","--",o));break;case"=":if(e.match("=="))return t(c("tw-underline","===",o));break;case":":if(e.eat(":"))return t(c("comment","::"));break;case"^":return t(c("tw-box","^"));case"~":if(e.match("np~"))return t(c("meta","~/np~"));break}if(r)switch(a){case"!":return e.match("!!!!!")||e.match("!!!!")||e.match("!!!")||e.match("!!"),t(f("header string"));case"*":case"#":case"+":return t(f("tw-listitem bracket"))}return null}var g,s;function b(e,n){var t=e.next(),r=e.peek();return t=="}"?(n.tokenize=o,"tag"):t=="("||t==")"?"bracket":t=="="?(s="equals",r==">"&&(e.next(),r=e.peek()),/[\'\"]/.test(r)||(n.tokenize=z()),"operator"):/[\'\"]/.test(t)?(n.tokenize=w(t),n.tokenize(e,n)):(e.eatWhile(/[^\s\u00a0=\"\'\/?]/),"keyword")}function w(e){return function(n,t){for(;!n.eol();)if(n.next()==e){t.tokenize=b;break}return"string"}}function z(){return function(e,n){for(;!e.eol();){var t=e.next(),r=e.peek();if(t==" "||t==","||/[ )}]/.test(r)){n.tokenize=b;break}}return"string"}}var i,l;function d(){for(var e=arguments.length-1;e>=0;e--)i.cc.push(arguments[e])}function u(){return d.apply(null,arguments),!0}function x(e,n){var t=i.context&&i.context.noIndent;i.context={prev:i.context,pluginName:e,indent:i.indented,startOfLine:n,noIndent:t}}function p(){i.context&&(i.context=i.context.prev)}function y(e){if(e=="openPlugin")return i.pluginName=g,u(k,I(i.startOfLine));if(e=="closePlugin"){var n=!1;return i.context?(n=i.context.pluginName!=g,p()):n=!0,n&&(l="error"),u(_(n))}else return e=="string"&&((!i.context||i.context.name!="!cdata")&&x("!cdata"),i.tokenize==o&&p()),u()}function I(e){return function(n){return n=="selfclosePlugin"||n=="endPlugin"||n=="endPlugin"&&x(i.pluginName,e),u()}}function _(e){return function(n){return e&&(l="error"),n=="endPlugin"?u():d()}}function k(e){return e=="keyword"?(l="attribute",u(k)):e=="equals"?u(L,k):d()}function L(e){return e=="keyword"?(l="string",u()):e=="string"?u(v):d()}function v(e){return e=="string"?u(v):d()}const N={name:"tiki",startState:function(){return{tokenize:o,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,n){if(e.sol()&&(n.startOfLine=!0,n.indented=e.indentation()),e.eatSpace())return null;l=s=g=null;var t=n.tokenize(e,n);if((t||s)&&t!="comment")for(i=n;;){var r=n.cc.pop()||y;if(r(s||t))break}return n.startOfLine=!1,l||t},indent:function(e,n,t){var r=e.context;if(r&&r.noIndent)return 0;for(r&&/^{\//.test(n)&&(r=r.prev);r&&!r.startOfLine;)r=r.prev;return r?r.indent+t.unit:0}};export{N as tiki};
//# sourceMappingURL=tiki-DuU1KWg8.js.map
