import{__require as e}from"./function-call.mjs";import{__require as r}from"./function-uncurry-this.mjs";import{__require as t}from"./to-string.mjs";import{__require as n}from"./regexp-flags.mjs";import{__require as s}from"./regexp-sticky-helpers.mjs";import{__require as i}from"./shared.mjs";import{__require as a}from"./object-create.mjs";import{__require as o}from"./internal-state.mjs";import{__require as l}from"./regexp-unsupported-dot-all.mjs";import{__require as p}from"./regexp-unsupported-ncg.mjs";var u,m;function x(){if(m)return u;m=1;var x,d,g=e(),_=r(),f=t(),c=n(),I=s(),j=i(),q=a(),h=o().get,v=l(),y=p(),E=j("native-string-replace",String.prototype.replace),R=RegExp.prototype.exec,b=R,w=_("".charAt),k=_("".indexOf),A=_("".replace),O=_("".slice),B=(d=/b*/g,g(R,x=/a/,"a"),g(R,d,"a"),0!==x.lastIndex||0!==d.lastIndex),C=I.BROKEN_CARET,K=void 0!==/()??/.exec("")[1];return(B||K||C||v||y)&&(b=function(e){var r,t,n,s,i,a,o,l=this,p=h(l),u=f(e),m=p.raw;if(m)return m.lastIndex=l.lastIndex,r=g(b,m,u),l.lastIndex=m.lastIndex,r;var x=p.groups,d=C&&l.sticky,_=g(c,l),I=l.source,j=0,v=u;if(d&&(_=A(_,"y",""),-1===k(_,"g")&&(_+="g"),v=O(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==w(u,l.lastIndex-1))&&(I="(?: "+I+")",v=" "+v,j++),t=new RegExp("^(?:"+I+")",_)),K&&(t=new RegExp("^"+I+"$(?!\\s)",_)),B&&(n=l.lastIndex),s=g(R,d?t:l,v),d?s?(s.input=O(s.input,j),s[0]=O(s[0],j),s.index=l.lastIndex,l.lastIndex+=s[0].length):l.lastIndex=0:B&&s&&(l.lastIndex=l.global?s.index+s[0].length:n),K&&s&&s.length>1&&g(E,s[0],t,function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(s[i]=void 0)}),s&&x)for(s.groups=a=q(null),i=0;i<x.length;i++)a[(o=x[i])[0]]=s[o[1]];return s}),u=b}export{x as __require};