import { A as ALL_PROTOCOL_URL_REGEXP, E as EDITOR_OPTIONS } from './chunk-DtYaAyZo.js';
import { t } from 'i18next';
import * as yup from 'yup';

var DEFAULT_EDITOR_OPTIONS = [EDITOR_OPTIONS.BOLD, EDITOR_OPTIONS.ITALIC, EDITOR_OPTIONS.UNDERLINE, EDITOR_OPTIONS.STRIKETHROUGH, EDITOR_OPTIONS.LINK, EDITOR_OPTIONS.PARAGRAPH, EDITOR_OPTIONS.H1, EDITOR_OPTIONS.H2, EDITOR_OPTIONS.H3, EDITOR_OPTIONS.H4, EDITOR_OPTIONS.H5, EDITOR_OPTIONS.H6, EDITOR_OPTIONS.LIST_BULLETS, EDITOR_OPTIONS.LIST_ORDERED, EDITOR_OPTIONS.CODE];
var EDITOR_PADDING_SIZE = 12;
var EDITOR_BORDER_SIZE = 1;
var EDITOR_LINE_HEIGHT = 21;
var IMAGE_REGEX = new RegExp(/(<img[^>]*?>)(?![\s\S]*<\/figure>)/g);
var IMAGE_REPLACEMENT_PATTERN = "<figure>$1</figure>";
var EMPTY_DIV_REGEX = new RegExp(/<div[^>]*?>\s*(?:<br[^>]*?>)\s*<\/div>/g);
var TRAILING_BR_REGEX = new RegExp(/\s*(?:<br[^>]*?>)+\s*$/);
var LINK_VALIDATION_SCHEMA = yup.object().shape({
  textContent: yup.string().required(t("neetoEditor.error.textRequired")),
  urlString: yup.string().matches(ALL_PROTOCOL_URL_REGEXP, t("neetoEditor.error.invalidUrl")).required(t("neetoEditor.error.urlRequired"))
});

export { DEFAULT_EDITOR_OPTIONS as D, EMPTY_DIV_REGEX as E, IMAGE_REGEX as I, LINK_VALIDATION_SCHEMA as L, TRAILING_BR_REGEX as T, IMAGE_REPLACEMENT_PATTERN as a, EDITOR_LINE_HEIGHT as b, EDITOR_PADDING_SIZE as c, EDITOR_BORDER_SIZE as d };
//# sourceMappingURL=chunk-CY_7yUut.js.map
