import { __require as requireArraySpeciesCreate } from "../es-abstract/2024/ArraySpeciesCreate.js";
import { __require as requireFlattenIntoArray } from "../es-abstract/2024/FlattenIntoArray.js";
import { __require as requireGet } from "../es-abstract/2024/Get.js";
import { __require as requireToIntegerOrInfinity } from "../es-abstract/2024/ToIntegerOrInfinity.js";
import { __require as requireToLength } from "../es-abstract/2024/ToLength.js";
import { __require as requireToObject } from "../es-abstract/2024/ToObject.js";
var implementation;
var hasRequiredImplementation;
function requireImplementation() {
  if (hasRequiredImplementation) return implementation;
  hasRequiredImplementation = 1;
  var ArraySpeciesCreate = requireArraySpeciesCreate();
  var FlattenIntoArray = requireFlattenIntoArray();
  var Get = requireGet();
  var ToIntegerOrInfinity = requireToIntegerOrInfinity();
  var ToLength = requireToLength();
  var ToObject = requireToObject();
  implementation = function flat() {
    var O = ToObject(this);
    var sourceLen = ToLength(Get(O, "length"));
    var depthNum = 1;
    if (arguments.length > 0 && typeof arguments[0] !== "undefined") {
      depthNum = ToIntegerOrInfinity(arguments[0]);
    }
    var A = ArraySpeciesCreate(O, 0);
    FlattenIntoArray(A, O, sourceLen, 0, depthNum);
    return A;
  };
  return implementation;
}
export {
  requireImplementation as __require
};
