import { __exports as t } from "../../../../../../../../_virtual/pattern.js";
import { __require as m } from "../code.js";
import { __require as f } from "../../compile/codegen/index.js";
var a;
function l() {
  if (a) return t;
  a = 1, Object.defineProperty(t, "__esModule", { value: !0 });
  const o = m(), r = f(), s = {
    keyword: "pattern",
    type: "string",
    schemaType: "string",
    $data: !0,
    error: {
      message: ({ schemaCode: e }) => (0, r.str)`must match pattern "${e}"`,
      params: ({ schemaCode: e }) => (0, r._)`{pattern: ${e}}`
    },
    code(e) {
      const { data: n, $data: u, schema: i, schemaCode: d, it: p } = e, c = p.opts.unicodeRegExp ? "u" : "", _ = u ? (0, r._)`(new RegExp(${d}, ${c}))` : (0, o.usePattern)(e, i);
      e.fail$data((0, r._)`!${_}.test(${n})`);
    }
  };
  return t.default = s, t;
}
export {
  l as __require
};
//# sourceMappingURL=pattern.js.map
