{
  "version": 3,
  "sources": ["../../../../../src/functions/math/max/max.ts"],
  "sourcesContent": [
    "import {\n  type FunctionDefinition,\n  type FunctionEvaluationResult,\n} from \"../../../core/types.mjs\";\nimport { performMaximum } from \"./max-utils.mjs\";\nimport { createArgumentIterator } from \"../../function-utils.mjs\";\n\n/**\n * MAX function - Returns the largest number in the arguments\n *\n * Usage: MAX(value1, [value2], ...)\n *\n * Examples:\n *   MAX(1, 2, 3) - returns 3\n *   MAX(A1:A10) - finds maximum in the range A1:A10\n *   MAX(A1:A5, B1:B5) - finds maximum across both ranges\n *\n * Note:\n * - Only numeric values are considered\n * - Text, logical values, and empty cells are ignored in ranges\n * - Direct text/logical arguments cause errors\n * - Returns error if no numeric values are found\n */\nexport const MAX: FunctionDefinition = {\n  name: \"MAX\",\n  evaluate: function (node, context): FunctionEvaluationResult {\n    // Create iterator over all argument values\n    const argumentValues = createArgumentIterator(this, node, context, \"col-major\");\n    if (argumentValues.type !== \"values\") {\n      return argumentValues;\n    }\n    // Use shared maximum utility (now with unified error propagation)\n    return performMaximum(argumentValues.values, context);\n  },\n};\n"
  ],
  "mappings": ";AAIA;AACA;AAkBO,IAAM,MAA0B;AAAA,EACrC,MAAM;AAAA,EACN,UAAU,QAAS,CAAC,MAAM,SAAmC;AAAA,IAE3D,MAAM,iBAAiB,uBAAuB,MAAM,MAAM,SAAS,WAAW;AAAA,IAC9E,IAAI,eAAe,SAAS,UAAU;AAAA,MACpC,OAAO;AAAA,IACT;AAAA,IAEA,OAAO,eAAe,eAAe,QAAQ,OAAO;AAAA;AAExD;",
  "debugId": "191DD9B4DE339A2164756E2164756E21",
  "names": []
}