const require_rolldown_runtime = require('../../../../../../../../../_virtual/rolldown_runtime.js');
const require_ArgumentOutOfRangeError$1 = require('../util/ArgumentOutOfRangeError.js');
const require_filter$1 = require('./filter.js');
const require_defaultIfEmpty$1 = require('./defaultIfEmpty.js');
const require_take$1 = require('./take.js');
const require_throwIfEmpty$1 = require('./throwIfEmpty.js');

//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js
var require_elementAt = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/elementAt.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	var ArgumentOutOfRangeError_1 = require_ArgumentOutOfRangeError$1.require_ArgumentOutOfRangeError();
	var filter_1 = require_filter$1.require_filter();
	var throwIfEmpty_1 = require_throwIfEmpty$1.require_throwIfEmpty();
	var defaultIfEmpty_1 = require_defaultIfEmpty$1.require_defaultIfEmpty();
	var take_1 = require_take$1.require_take();
	function elementAt(index, defaultValue) {
		if (index < 0) throw new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError();
		var hasDefaultValue = arguments.length >= 2;
		return function(source) {
			return source.pipe(filter_1.filter(function(v, i) {
				return i === index;
			}), take_1.take(1), hasDefaultValue ? defaultIfEmpty_1.defaultIfEmpty(defaultValue) : throwIfEmpty_1.throwIfEmpty(function() {
				return new ArgumentOutOfRangeError_1.ArgumentOutOfRangeError();
			}));
		};
	}
	exports.elementAt = elementAt;
}) });

//#endregion
Object.defineProperty(exports, 'default', {
  enumerable: true,
  get: function () {
    return require_elementAt();
  }
});