/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/text-vide@1.8.5/dist/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=t=>t==null||t==="",y=(t,n)=>Object.keys(t).reduce((e,s)=>(n(e[s])&&delete e[s],e),t),H=(t,n)=>({...n,...y(t,I)}),x=["<b>","</b>"],R=1,_=!0,A=!0,M=t=>H(t,{sep:x,fixationPoint:R,ignoreHtmlTag:_,ignoreHtmlEntity:A}),T=[[0,4,12,17,24,29,35,42,48],[1,2,7,10,13,14,19,22,25,28,31,34,37,40,43,46,49],[1,2,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49],[0,2,4,5,6,8,9,11,14,15,17,18,20,0,21,23,24,26,27,29,30,32,33,35,36,38,39,41,42,44,45,47,48],[0,2,3,5,6,7,8,10,11,12,14,15,17,19,20,21,23,24,25,26,28,29,30,32,33,34,35,37,38,39,41,42,43,44,46,47,48]],N=(t,n)=>{const{length:i}=t,e=T[n-1]??T[0],s=e.findIndex(o=>i<=o);let c=i-s;return s===-1&&(c=i-e.length),Math.max(c,0)},O=(t,n)=>typeof n=="string"?`${n}${t}${n}`:`${n[0]}${t}${n[1]}`,u=t=>Array.from(t).map(n=>{const i=n.index,[e]=n,{length:s}=e;return[i,i+s-1]}),p=/<!--[^]*?-->|<[^>]+>/g,F=t=>{const n=t.matchAll(p),e=u(n).reverse();return s=>{const c=s.index,o=e.find(([a])=>c>a);if(!o)return!1;const[,r]=o;return c<r}},G=/&[\w#]+;/g,k=t=>{const n=t.matchAll(G),e=u(n).reverse();return s=>{const c=s.index,o=e.find(([a])=>c>a);if(!o)return!1;const[,r]=o;return c<r}},$=new RegExp("(\\p{L}|\\p{Nd})*\\p{L}(\\p{L}|\\p{Nd})*","gu"),v=(t,n={})=>{if(!t?.length)return"";const{fixationPoint:i,sep:e,ignoreHtmlTag:s,ignoreHtmlEntity:c}=M(n),o=Array.from(t.matchAll($));let r="",l=0,a;s&&(a=F(t));let h;c&&(h=k(t));for(const g of o){if(a?.(g)||h?.(g))continue;const[E]=g,d=g.index,m=d+N(E,i),f=t.slice(l,d);r+=f,d!==m&&(r+=O(t.slice(d,m),e)),l=m}const L=t.slice(l);return r+L};exports.textVide=v;
