{"version":3,"file":"reply.mjs","names":[],"sources":["../../src/validation/reply.ts"],"sourcesContent":["import { ValidationError } from \"./validation-error\";\nimport { reasonForValue } from \"~/utils/reason-for-value\";\n\nconst messageIdRegex = /^[\\w-]+$/;\n\nexport function validateMessageId(input?: string | null): void {\n  if (input == null || !messageIdRegex.test(input)) {\n    throw new ValidationError(\n      `Message ID ${reasonForValue(input)} is invalid/malformed`,\n    );\n  }\n}\n"],"mappings":";;;AAGA,MAAM,iBAAiB;AAEvB,SAAgB,kBAAkB,OAA6B;AAC7D,KAAI,SAAS,QAAQ,CAAC,eAAe,KAAK,MAAM,CAC9C,OAAM,IAAI,gBACR,cAAc,eAAe,MAAM,CAAC,uBACrC"}