const require_rolldown_runtime = require('../../../../../../../../../_virtual/rolldown_runtime.js');
const require_isFunction$1 = require('../util/isFunction.js');
const require_Observable$1 = require('../Observable.js');
const require_iterator$1 = require('../symbol/iterator.js');
const require_executeSchedule$1 = require('../util/executeSchedule.js');

//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js
var require_scheduleIterable = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/scheduled/scheduleIterable.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	var Observable_1 = require_Observable$1.require_Observable();
	var iterator_1 = require_iterator$1.require_iterator();
	var isFunction_1 = require_isFunction$1.require_isFunction();
	var executeSchedule_1 = require_executeSchedule$1.require_executeSchedule();
	function scheduleIterable(input, scheduler) {
		return new Observable_1.Observable(function(subscriber) {
			var iterator;
			executeSchedule_1.executeSchedule(subscriber, scheduler, function() {
				iterator = input[iterator_1.iterator]();
				executeSchedule_1.executeSchedule(subscriber, scheduler, function() {
					var _a;
					var value;
					var done;
					try {
						_a = iterator.next(), value = _a.value, done = _a.done;
					} catch (err) {
						subscriber.error(err);
						return;
					}
					if (done) subscriber.complete();
					else subscriber.next(value);
				}, 0, true);
			});
			return function() {
				return isFunction_1.isFunction(iterator === null || iterator === void 0 ? void 0 : iterator.return) && iterator.return();
			};
		});
	}
	exports.scheduleIterable = scheduleIterable;
}) });

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