const require_rolldown_runtime = require('../../../../../../../../../_virtual/rolldown_runtime.js');
const require_isFunction$1 = require('../util/isFunction.js');
const require_identity$1 = require('../util/identity.js');
const require_lift$1 = require('../util/lift.js');
const require_OperatorSubscriber$1 = require('./OperatorSubscriber.js');

//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/tap.js
var require_tap = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/cjs/internal/operators/tap.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	var isFunction_1 = require_isFunction$1.require_isFunction();
	var lift_1 = require_lift$1.require_lift();
	var OperatorSubscriber_1 = require_OperatorSubscriber$1.require_OperatorSubscriber();
	var identity_1 = require_identity$1.require_identity();
	function tap(observerOrNext, error, complete) {
		var tapObserver = isFunction_1.isFunction(observerOrNext) || error || complete ? {
			next: observerOrNext,
			error,
			complete
		} : observerOrNext;
		return tapObserver ? lift_1.operate(function(source, subscriber) {
			var _a;
			(_a = tapObserver.subscribe) === null || _a === void 0 || _a.call(tapObserver);
			var isUnsub = true;
			source.subscribe(OperatorSubscriber_1.createOperatorSubscriber(subscriber, function(value) {
				var _a$1;
				(_a$1 = tapObserver.next) === null || _a$1 === void 0 || _a$1.call(tapObserver, value);
				subscriber.next(value);
			}, function() {
				var _a$1;
				isUnsub = false;
				(_a$1 = tapObserver.complete) === null || _a$1 === void 0 || _a$1.call(tapObserver);
				subscriber.complete();
			}, function(err) {
				var _a$1;
				isUnsub = false;
				(_a$1 = tapObserver.error) === null || _a$1 === void 0 || _a$1.call(tapObserver, err);
				subscriber.error(err);
			}, function() {
				var _a$1, _b;
				if (isUnsub) (_a$1 = tapObserver.unsubscribe) === null || _a$1 === void 0 || _a$1.call(tapObserver);
				(_b = tapObserver.finalize) === null || _b === void 0 || _b.call(tapObserver);
			}));
		}) : identity_1.identity;
	}
	exports.tap = tap;
}) });

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