{"version":3,"file":"utils.cjs","names":[],"sources":["../../../src/chains/router/utils.ts"],"sourcesContent":["// oxlint-disable-next-line @typescript-eslint/no-explicit-any\nexport function zipEntries<T extends any[]>(\n  ...arrays: {\n    [P in keyof T]: T[P][];\n  }\n): T[] {\n  // Check for empty input\n  if (arrays.length === 0) {\n    return [];\n  }\n\n  // Find the length of the first input array\n  const firstArrayLength = arrays[0].length;\n\n  // Ensure all input arrays have the same length\n  for (const array of arrays) {\n    if (array.length !== firstArrayLength) {\n      throw new Error(\"All input arrays must have the same length.\");\n    }\n  }\n\n  // Create an empty array to store the zipped arrays\n  const zipped: T[] = [];\n\n  // Iterate through each element of the first input array\n  for (let i = 0; i < firstArrayLength; i += 1) {\n    // Create an array to store the zipped elements at the current index\n    const zippedElement: T[keyof T][] = [];\n\n    // Iterate through each input array\n    for (const array of arrays) {\n      // Add the element at the current index to the zipped element array\n      zippedElement.push(array[i]);\n    }\n\n    // Add the zipped element array to the zipped array\n    zipped.push(zippedElement as T);\n  }\n\n  return zipped;\n}\n"],"mappings":";AACA,SAAgB,WACd,GAAG,QAGE;AAEL,KAAI,OAAO,WAAW,EACpB,QAAO,EAAE;CAIX,MAAM,mBAAmB,OAAO,GAAG;AAGnC,MAAK,MAAM,SAAS,OAClB,KAAI,MAAM,WAAW,iBACnB,OAAM,IAAI,MAAM,8CAA8C;CAKlE,MAAM,SAAc,EAAE;AAGtB,MAAK,IAAI,IAAI,GAAG,IAAI,kBAAkB,KAAK,GAAG;EAE5C,MAAM,gBAA8B,EAAE;AAGtC,OAAK,MAAM,SAAS,OAElB,eAAc,KAAK,MAAM,GAAG;AAI9B,SAAO,KAAK,cAAmB;;AAGjC,QAAO"}