function resolveSpecialValue(template, context) {
  const path = template.slice(2, -2).trim();
  if (path === "today") {
    const today = context.today || /* @__PURE__ */ new Date();
    return today.toISOString().split("T")[0];
  }
  if (path === "now") {
    const now = context.now || /* @__PURE__ */ new Date();
    return now.toISOString();
  }
  return getNestedValue(context, path);
}
function getNestedValue(obj, path) {
  if (!obj || !path) {
    return void 0;
  }
  const normalizedPath = path.replace(/\[(\d+)\]/g, ".$1");
  const keys = normalizedPath.split(".");
  let result = obj;
  for (const key of keys) {
    if (result === null || result === void 0) {
      return void 0;
    }
    result = result[key];
  }
  return result;
}
export {
  getNestedValue,
  resolveSpecialValue
};
//# sourceMappingURL=value-resolver.js.map
