System.register(["__unresolved_0", "__unresolved_1", "__unresolved_2", "__unresolved_3", "__unresolved_4", "__unresolved_5", "__unresolved_6", "__unresolved_7"], function (_export, _context) {
  "use strict";

  var _req, _req2, _req3, _req4, _req5, _req6, _req7, _loader, _cjsExports, __cjsMetaURL;

  _export("default", void 0);

  return {
    setters: [function (_unresolved_) {
      _req = _unresolved_.__cjsMetaURL;
    }, function (_unresolved_2) {
      _req2 = _unresolved_2.__cjsMetaURL;
    }, function (_unresolved_3) {
      _req3 = _unresolved_3.__cjsMetaURL;
    }, function (_unresolved_4) {
      _req4 = _unresolved_4.__cjsMetaURL;
    }, function (_unresolved_5) {
      _req5 = _unresolved_5.__cjsMetaURL;
    }, function (_unresolved_6) {
      _req6 = _unresolved_6.__cjsMetaURL;
    }, function (_unresolved_7) {
      _req7 = _unresolved_7.__cjsMetaURL;
    }, function (_unresolved_8) {
      _loader = _unresolved_8.default;
    }],
    execute: function () {
      _loader.define(_context.meta.url, function (exports, _require, module, __filename, __dirname) {
        let require = _loader.createRequireWithReqMap({
          "../modules/es.regexp.exec": _req,
          "../internals/function-uncurry-this": _req2,
          "../internals/redefine": _req3,
          "../internals/regexp-exec": _req4,
          "../internals/fails": _req5,
          "../internals/well-known-symbol": _req6,
          "../internals/create-non-enumerable-property": _req7
        }, _require);

        (function () {
          // TODO: Remove from `core-js@4` since it's moved to entry points
          require('../modules/es.regexp.exec');

          var uncurryThis = require('../internals/function-uncurry-this');

          var redefine = require('../internals/redefine');

          var regexpExec = require('../internals/regexp-exec');

          var fails = require('../internals/fails');

          var wellKnownSymbol = require('../internals/well-known-symbol');

          var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');

          var SPECIES = wellKnownSymbol('species');
          var RegExpPrototype = RegExp.prototype;

          module.exports = function (KEY, exec, FORCED, SHAM) {
            var SYMBOL = wellKnownSymbol(KEY);
            var DELEGATES_TO_SYMBOL = !fails(function () {
              // String methods call symbol-named RegEp methods
              var O = {};

              O[SYMBOL] = function () {
                return 7;
              };

              return ''[KEY](O) != 7;
            });
            var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
              // Symbol-named RegExp methods call .exec
              var execCalled = false;
              var re = /a/;

              if (KEY === 'split') {
                // We can't use real regex here since it causes deoptimization
                // and serious performance degradation in V8
                // https://github.com/zloirock/core-js/issues/306
                re = {}; // RegExp[@@split] doesn't call the regex's exec method, but first creates
                // a new one. We need to return the patched regex when creating the new one.

                re.constructor = {};

                re.constructor[SPECIES] = function () {
                  return re;
                };

                re.flags = '';
                re[SYMBOL] = /./[SYMBOL];
              }

              re.exec = function () {
                execCalled = true;
                return null;
              };

              re[SYMBOL]('');
              return !execCalled;
            });

            if (!DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED) {
              var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
              var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
                var uncurriedNativeMethod = uncurryThis(nativeMethod);
                var $exec = regexp.exec;

                if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
                  if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
                    // The native String method already delegates to @@method (this
                    // polyfilled function), leasing to infinite recursion.
                    // We avoid it by directly calling the native @@method method.
                    return {
                      done: true,
                      value: uncurriedNativeRegExpMethod(regexp, str, arg2)
                    };
                  }

                  return {
                    done: true,
                    value: uncurriedNativeMethod(str, regexp, arg2)
                  };
                }

                return {
                  done: false
                };
              });
              redefine(String.prototype, KEY, methods[0]);
              redefine(RegExpPrototype, SYMBOL, methods[1]);
            }

            if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
          };
        })();

        _export("default", _cjsExports = module.exports);
      });

      _export("__cjsMetaURL", __cjsMetaURL = _context.meta.url);
    }
  };
});
//# sourceMappingURL=fix-regexp-well-known-symbol-logic.js.map