| 92 | if(e.begin||e.end)throw Error("begin & end are not supported with match") |
| 93 | ;e.begin=e.match,delete e.match}}function F(e,t){ |
| 94 | void 0===e.relevance&&(e.relevance=1)}const B=(e,t)=>{if(!e.beforeMatch)return |
| 95 | ;if(e.starts)throw Error("beforeMatch cannot be used with starts") |
| 96 | ;const a=Object.assign({},e);Object.keys(e).forEach((t=>{delete e[t] |
| 97 | })),e.keywords=a.keywords,e.begin=E(a.beforeMatch,m(a.begin)),e.starts={ |
| 98 | relevance:0,contains:[Object.assign(a,{endsParent:!0})] |
| 99 | },e.relevance=0,delete a.beforeMatch |
| 100 | },G=["of","and","for","in","not","or","if","then","parent","list","value"] |
| 101 | ;function Y(e,t,a="keyword"){const n=Object.create(null) |
| 102 | ;return"string"==typeof e?r(a,e.split(" ")):Array.isArray(e)?r(a,e):Object.keys(e).forEach((a=>{ |
| 103 | Object.assign(n,Y(e[a],t,a))})),n;function r(e,a){ |