import{A as S}from"./index.f4d41e67.entry.js";function $(h,v){return v.forEach(function(a){a&&typeof a!="string"&&!Array.isArray(a)&&Object.keys(a).forEach(function(l){if(l!=="default"&&!(l in h)){var c=Object.getOwnPropertyDescriptor(a,l);Object.defineProperty(h,l,c.get?c:{enumerable:!0,get:function(){return a[l]}})}})}),Object.freeze(Object.defineProperty(h,Symbol.toStringTag,{value:"Module"}))}var j={exports:{}},A={exports:{}};(function(h,v){(function(a){a(S.exports,j.exports)})(function(a){var l={style:"matchhighlight",minChars:2,delay:100,wordsOnly:!1,annotateScrollbar:!1,showToken:!1,trim:!0};function c(t){this.options={};for(var e in l)this.options[e]=(t&&t.hasOwnProperty(e)?t:l)[e];this.overlay=this.timeout=null,this.matchesonscroll=null,this.active=!1}a.defineOption("highlightSelectionMatches",!1,function(t,e,i){if(i&&i!=a.Init&&(b(t),clearTimeout(t.state.matchHighlighter.timeout),t.state.matchHighlighter=null,t.off("cursorActivity",p),t.off("focus",y)),e){var r=t.state.matchHighlighter=new c(e);t.hasFocus()?(r.active=!0,d(t)):t.on("focus",y),t.on("cursorActivity",p)}});function p(t){var e=t.state.matchHighlighter;(e.active||t.hasFocus())&&w(t,e)}function y(t){var e=t.state.matchHighlighter;e.active||(e.active=!0,w(t,e))}function w(t,e){clearTimeout(e.timeout),e.timeout=setTimeout(function(){d(t)},e.options.delay)}function O(t,e,i,r){var o=t.state.matchHighlighter;if(t.addOverlay(o.overlay=T(e,i,r)),o.options.annotateScrollbar&&t.showMatchesOnScrollbar){var n=i?new RegExp((/\w/.test(e.charAt(0))?"\\b":"")+e.replace(/[\\\[.+*?(){|^$]/g,"\\$&")+(/\w/.test(e.charAt(e.length-1))?"\\b":"")):e;o.matchesonscroll=t.showMatchesOnScrollbar(n,!1,{className:"CodeMirror-selection-highlight-scrollbar"})}}function b(t){var e=t.state.matchHighlighter;e.overlay&&(t.removeOverlay(e.overlay),e.overlay=null,e.matchesonscroll&&(e.matchesonscroll.clear(),e.matchesonscroll=null))}function d(t){t.operation(function(){var e=t.state.matchHighlighter;if(b(t),!t.somethingSelected()&&e.options.showToken){for(var i=e.options.showToken===!0?/[\w$]/:e.options.showToken,r=t.getCursor(),o=t.getLine(r.line),n=r.ch,s=n;n&&i.test(o.charAt(n-1));)--n;for(;s<o.length&&i.test(o.charAt(s));)++s;n<s&&O(t,o.slice(n,s),i,e.options.style);return}var u=t.getCursor("from"),g=t.getCursor("to");if(u.line==g.line&&!(e.options.wordsOnly&&!H(t,u,g))){var f=t.getRange(u,g);e.options.trim&&(f=f.replace(/^\s+|\s+$/g,"")),f.length>=e.options.minChars&&O(t,f,!1,e.options.style)}})}function H(t,e,i){var r=t.getRange(e,i);if(r.match(/^\w+$/)!==null){if(e.ch>0){var o={line:e.line,ch:e.ch-1},n=t.getRange(o,e);if(n.match(/\W/)===null)return!1}if(i.ch<t.getLine(e.line).length){var o={line:i.line,ch:i.ch+1},n=t.getRange(i,o);if(n.match(/\W/)===null)return!1}return!0}else return!1}function x(t,e){return(!t.start||!e.test(t.string.charAt(t.start-1)))&&(t.pos==t.string.length||!e.test(t.string.charAt(t.pos)))}function T(t,e,i){return{token:function(r){if(r.match(t)&&(!e||x(r,e)))return i;r.next(),r.skipTo(t.charAt(0))||r.skipToEnd()}}}})})();var k=A.exports,M=$({__proto__:null,default:k},[A.exports]);export{M as m};
