import { r as registerInterceptor, I as InterceptorConfig, a as InterceptorHandler } from './InterceptorHandler-6474bcf4.js';
import { T as TableConfig } from './table-config-9f3dee34.js';
import { D as DvnAppViewConfig } from './view-config-2a7feb02.js';

class ModifierTrimmer extends InterceptorConfig {
  constructor() {
    super('modifierTrimmer');
  }
}
ModifierTrimmer.id = 'modifierTrimmer';
class ModifierTrimmerHandler extends InterceptorHandler {
  run(_context, _values, _field, value) {
    if (typeof value === 'string' || value instanceof String) {
      return { value: value.trim() };
    }
    return { value };
  }
}
registerInterceptor(ModifierTrimmer.id, (_config) => new ModifierTrimmerHandler());

class FormViewConfig extends DvnAppViewConfig {
  static decode(json) {
    const model = Object.assign(Object.create(FormViewConfig.prototype), json);
    model.table = TableConfig.decode(model.table);
    return model;
  }
}

export { FormViewConfig as F, ModifierTrimmer as M };
