import{aQ as Y,r as Z}from"../index.js";var A={exports:{}};(function(F){F.exports=function(f){var o={};function l(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return f[n].call(r.exports,r,r.exports,l),r.loaded=!0,r.exports}return l.m=f,l.c=o,l.p="",l(0)}([function(f,o,l){f.exports=l(1)},function(f,o,l){Object.defineProperty(o,"__esModule",{value:!0});function n(s){return s&&s.__esModule?s:{default:s}}var r=l(2),u=n(r);o.default=u.default,f.exports=o.default},function(f,o,l){Object.defineProperty(o,"__esModule",{value:!0});var n=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var i=arguments[a];for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t])}return e};o.default=h;function r(e){return e&&e.__esModule?e:{default:e}}function u(e,a){var i={};for(var t in e)a.indexOf(t)>=0||Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i}var s=l(3),m=l(4),y=l(5),d=r(y);function h(e){var a=e.activeClassName,i=a===void 0?"":a,t=e.activeIndex,g=t===void 0?-1:t,v=e.activeStyle,p=e.autoEscape,c=e.caseSensitive,x=c===void 0?!1:c,S=e.className,b=e.findChunks,N=e.highlightClassName,E=N===void 0?"":N,z=e.highlightStyle,$=z===void 0?{}:z,k=e.highlightTag,_=k===void 0?"mark":k,D=e.sanitize,Q=e.searchWords,M=e.textToHighlight,L=e.unhighlightTag,B=L===void 0?"span":L,q=e.unhighlightClassName,G=q===void 0?"":q,J=e.unhighlightStyle,K=u(e,["activeClassName","activeIndex","activeStyle","autoEscape","caseSensitive","className","findChunks","highlightClassName","highlightStyle","highlightTag","sanitize","searchWords","textToHighlight","unhighlightTag","unhighlightClassName","unhighlightStyle"]),U=(0,s.findAll)({autoEscape:p,caseSensitive:x,findChunks:b,sanitize:D,searchWords:Q,textToHighlight:M}),w=_,P=-1,W="",j=void 0,V=function(O){var C={};for(var T in O)C[T.toLowerCase()]=O[T];return C},X=(0,d.default)(V);return(0,m.createElement)("span",n({className:S},K,{children:U.map(function(H,O){var C=M.substr(H.start,H.end-H.start);if(H.highlight){P++;var T=void 0;typeof E=="object"?x?T=E[C]:(E=X(E),T=E[C.toLowerCase()]):T=E;var I=P===+g;W=T+" "+(I?i:""),j=I===!0&&v!=null?Object.assign({},$,v):$;var R={children:C,className:W,key:O,style:j};return typeof w!="string"&&(R.highlightIndex=P),(0,m.createElement)(w,R)}else return(0,m.createElement)(B,{children:C,className:G,key:O,style:J})})}))}f.exports=o.default},function(f,o){f.exports=function(l){var n={};function r(u){if(n[u])return n[u].exports;var s=n[u]={exports:{},id:u,loaded:!1};return l[u].call(s.exports,s,s.exports,r),s.loaded=!0,s.exports}return r.m=l,r.c=n,r.p="",r(0)}([function(l,n,r){l.exports=r(1)},function(l,n,r){Object.defineProperty(n,"__esModule",{value:!0});var u=r(2);Object.defineProperty(n,"combineChunks",{enumerable:!0,get:function(){return u.combineChunks}}),Object.defineProperty(n,"fillInChunks",{enumerable:!0,get:function(){return u.fillInChunks}}),Object.defineProperty(n,"findAll",{enumerable:!0,get:function(){return u.findAll}}),Object.defineProperty(n,"findChunks",{enumerable:!0,get:function(){return u.findChunks}})},function(l,n){Object.defineProperty(n,"__esModule",{value:!0}),n.findAll=function(h){var e=h.autoEscape,a=h.caseSensitive,i=a===void 0?!1:a,t=h.findChunks,g=t===void 0?u:t,v=h.sanitize,p=h.searchWords,c=h.textToHighlight;return s({chunksToHighlight:r({chunks:g({autoEscape:e,caseSensitive:i,sanitize:v,searchWords:p,textToHighlight:c})}),totalLength:c?c.length:0})};var r=n.combineChunks=function(h){var e=h.chunks;return e=e.sort(function(a,i){return a.start-i.start}).reduce(function(a,i){if(a.length===0)return[i];var t=a.pop();if(i.start<=t.end){var g=Math.max(t.end,i.end);a.push({start:t.start,end:g})}else a.push(t,i);return a},[]),e},u=function(h){var e=h.autoEscape,a=h.caseSensitive,i=h.sanitize,t=i===void 0?m:i,g=h.searchWords,v=h.textToHighlight;return v=t(v),g.filter(function(p){return p}).reduce(function(p,c){c=t(c),e&&(c=y(c));for(var x=new RegExp(c,a?"g":"gi"),S=void 0;S=x.exec(v);){var b=S.index,N=x.lastIndex;N>b&&p.push({start:b,end:N}),S.index==x.lastIndex&&x.lastIndex++}return p},[])};n.findChunks=u;var s=n.fillInChunks=function(h){var e=h.chunksToHighlight,a=h.totalLength,i=[],t=function(p,c,x){c-p>0&&i.push({start:p,end:c,highlight:x})};if(e.length===0)t(0,a,!1);else{var g=0;e.forEach(function(v){t(g,v.start,!1),t(v.start,v.end,!0),g=v.end}),t(g,a,!1)}return i};function m(d){return d}function y(d){return d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}}])},function(f,o){f.exports=Z},function(f,o){var l=function(u,s){return u===s};function n(r){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:l,s=void 0,m=[],y=void 0,d=!1,h=function(i,t){return u(i,m[t])},e=function(){for(var i=arguments.length,t=Array(i),g=0;g<i;g++)t[g]=arguments[g];return d&&s===this&&t.length===m.length&&t.every(h)||(d=!0,s=this,m=t,y=r.apply(this,t)),y};return e}f.exports=n}])})(A);var ee=A.exports;const ne=Y(ee);export{ne as H};
