| 108 | },G=Error();function Z(e,t,{key:n}){let i=0;const r=e[n],s={},o={} |
| 109 | ;for(let e=1;e<=t.length;e++)o[e+i]=r[e],s[e+i]=!0,i+=b(t[e-1]) |
| 110 | ;e[n]=o,e[n]._emit=s,e[n]._multi=!0}function F(e){(e=>{ |
| 111 | e.scope&&"object"==typeof e.scope&&null!==e.scope&&(e.beginScope=e.scope, |
| 112 | delete e.scope)})(e),"string"==typeof e.beginScope&&(e.beginScope={ |
| 113 | _wrap:e.beginScope}),"string"==typeof e.endScope&&(e.endScope={_wrap:e.endScope |
| 114 | }),(e=>{if(Array.isArray(e.begin)){ |
| 115 | if(e.skip||e.excludeBegin||e.returnBegin)throw K("skip, excludeBegin, returnBegin not compatible with beginScope: {}"), |
| 116 | G |
| 117 | ;if("object"!=typeof e.beginScope||null===e.beginScope)throw K("beginScope must be object"), |
| 118 | G;Z(e,e.begin,{key:"beginScope"}),e.begin=E(e.begin,{joinWith:""})}})(e),(e=>{ |
| 119 | if(Array.isArray(e.end)){ |
| 120 | if(e.skip||e.excludeEnd||e.returnEnd)throw K("skip, excludeEnd, returnEnd not compatible with endScope: {}"), |
| 121 | G |
| 122 | ;if("object"!=typeof e.endScope||null===e.endScope)throw K("endScope must be object"), |
| 123 | G;Z(e,e.end,{key:"endScope"}),e.end=E(e.end,{joinWith:""})}})(e)}function V(e){ |
| 124 | function t(t,n){ |
| 125 | return RegExp(g(t),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(n?"g":"")) |
| 126 | }class n{constructor(){ |