const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.js');
const require_index = require('./enums/index.js');
const require_TransformOperationExecutor$1 = require('./TransformOperationExecutor.js');
const require_default_options_constant$1 = require('./constants/default-options.constant.js');

//#region ../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/ClassTransformer.js
var require_ClassTransformer = /* @__PURE__ */ require_rolldown_runtime.__commonJS({ "../../node_modules/.pnpm/class-transformer@0.5.1/node_modules/class-transformer/cjs/ClassTransformer.js": ((exports) => {
	Object.defineProperty(exports, "__esModule", { value: true });
	const TransformOperationExecutor_1 = require_TransformOperationExecutor$1.require_TransformOperationExecutor();
	const enums_1 = require_index.require_enums();
	const default_options_constant_1 = require_default_options_constant$1.require_default_options_constant();
	var ClassTransformer = class {
		instanceToPlain(object, options) {
			return new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_PLAIN, {
				...default_options_constant_1.defaultOptions,
				...options
			}).transform(void 0, object, void 0, void 0, void 0, void 0);
		}
		classToPlainFromExist(object, plainObject, options) {
			return new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_PLAIN, {
				...default_options_constant_1.defaultOptions,
				...options
			}).transform(plainObject, object, void 0, void 0, void 0, void 0);
		}
		plainToInstance(cls, plain, options) {
			return new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.PLAIN_TO_CLASS, {
				...default_options_constant_1.defaultOptions,
				...options
			}).transform(void 0, plain, cls, void 0, void 0, void 0);
		}
		plainToClassFromExist(clsObject, plain, options) {
			return new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.PLAIN_TO_CLASS, {
				...default_options_constant_1.defaultOptions,
				...options
			}).transform(clsObject, plain, void 0, void 0, void 0, void 0);
		}
		instanceToInstance(object, options) {
			return new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_CLASS, {
				...default_options_constant_1.defaultOptions,
				...options
			}).transform(void 0, object, void 0, void 0, void 0, void 0);
		}
		classToClassFromExist(object, fromObject, options) {
			return new TransformOperationExecutor_1.TransformOperationExecutor(enums_1.TransformationType.CLASS_TO_CLASS, {
				...default_options_constant_1.defaultOptions,
				...options
			}).transform(fromObject, object, void 0, void 0, void 0, void 0);
		}
		serialize(object, options) {
			return JSON.stringify(this.instanceToPlain(object, options));
		}
		/**
		* Deserializes given JSON string to a object of the given class.
		*/
		deserialize(cls, json, options) {
			const jsonObject = JSON.parse(json);
			return this.plainToInstance(cls, jsonObject, options);
		}
		/**
		* Deserializes given JSON string to an array of objects of the given class.
		*/
		deserializeArray(cls, json, options) {
			const jsonObject = JSON.parse(json);
			return this.plainToInstance(cls, jsonObject, options);
		}
	};
	exports.ClassTransformer = ClassTransformer;
}) });

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