!function(e, o) { "object" == typeof exports && "undefined" != typeof module ? o(exports) : "function" == typeof define && define.amd ? define([ "exports" ], o) : o((e = "undefined" != typeof globalThis ? globalThis : e || self).RegexpHelperCore = {}); }(this, (function(e) { "use strict"; const o = /*#__PURE__*/ Object.prototype.toString.call(/a/); function toHex(e, o) { const n = e.toString(16).padStart(4, "0"); return o ? n.toUpperCase() : n; } function toUnicode(e, o, n) { let t; if ("string" == typeof e && (t = e, e = t.codePointAt(0)), e > 0xffff && o) { let o; return o = "string" != typeof t ? surrogatePair(e) : [ t.charCodeAt(0), t.charCodeAt(1) ], o.map((function(e) { return _toUnicode(e, n); })).join(""); } return _toUnicode(e, n); } function toUnicode2(e, o = {}) { return toUnicode(e, o.noMerge, o.wrap); } function _toUnicode(e, o) { const n = toHex(e); return o || n.length > 4 ? `\\u{${n}}` : `\\u${n}`; } function isDoubleUnicode(e) { return e.charCodeAt(0) === e.codePointAt(0); } function isRegExp(e) { return e instanceof RegExp || Object.prototype.toString.call(e) === o ? e : null; } function surrogatePair(e) { const o = Math.floor((e - 0x10000) / 0x400) + 0xd800, n = (e - 0x10000) % 0x400 + 0xdc00; return Object.assign([ o, n ], { h: o, l: n }); } function unicodeUnEscape(e, o) { return e.replace(o ? /u\{([0-9a-fA-F]{1,8})\}/g : /\\u\{([0-9a-fA-F]{1,8})\}/g, ((e, o) => String.fromCodePoint(parseInt(o, 16)))); } function unicodeUnEscape2(e, o = {}) { return unicodeUnEscape(e, o.noLeadingSolidus); } function unicodeEscape(e, o, n, t, c = /./gu) { return e.replace(c, (e => { const c = toUnicode(e, n, !t); return o ? c.replace(/\\/, "") : c; })); } function unicodeEscape2(e, o = {}) { return unicodeEscape(e, o.noLeadingSolidus, o.noMerge, o.noWrap, o.filter); } function escapeRegExp(e) { return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); } var n = { REGEXP_TO_STRING_TAG: o, _toUnicode, escapeRegExp, isDoubleUnicode, isRegExp, surrogatePair, toHex, toUnicode, toUnicode2, unicodeEscape, unicodeEscape2, unicodeUnEscape, unicodeUnEscape2 }; e.REGEXP_TO_STRING_TAG = o, e._toUnicode = _toUnicode, e.default = n, e.escapeRegExp = escapeRegExp, e.isDoubleUnicode = isDoubleUnicode, e.isRegExp = isRegExp, e.surrogatePair = surrogatePair, e.toHex = toHex, e.toUnicode = toUnicode, e.toUnicode2 = toUnicode2, e.unicodeEscape = unicodeEscape, e.unicodeEscape2 = unicodeEscape2, e.unicodeUnEscape = unicodeUnEscape, e.unicodeUnEscape2 = unicodeUnEscape2, Object.defineProperty(e, "__esModule", { value: !0 }); })); //# sourceMappingURL=index.umd.production.min.cjs.map