{"version":3,"file":"as-array.mjs","sources":["../../../../../../../src/core/interaction/batch/processing/v3/as-array.ts"],"sourcesContent":["import type { GetCommandsOptions, IProcessingStrategy } from '../interface-strategy'\nimport type {\n  BatchCommandsArrayUniversal,\n  BatchCommandsObjectUniversal,\n  BatchCommandV3, ICallBatchResult\n} from '../../../../../types/http'\nimport type { Result } from '../../../../result'\nimport type { AjaxError } from '../../../../http/ajax-error'\nimport { AbstractProcessingV3 } from './abstract-processing'\nimport { ParseRow } from '../../parse-row'\n\nexport class ProcessingAsArrayV3 extends AbstractProcessingV3 implements IProcessingStrategy {\n  public prepareCommands(\n    calls: BatchCommandsArrayUniversal | BatchCommandsObjectUniversal,\n    options: GetCommandsOptions\n  ): BatchCommandV3[] {\n    const result: BatchCommandV3[] = []\n    calls.forEach((row) => {\n      const command = ParseRow.getBatchCommand(row, options)\n      result.push(command)\n    })\n\n    return result\n  }\n\n  protected _processResponseError<T>(\n    result: Result<ICallBatchResult<T>>,\n    ajaxError: AjaxError,\n    _index: string\n  ): void {\n    result.addError(ajaxError)\n  }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AAWO,MAAM,4BAA4B,oBAAA,CAAoD;AAAA,EAX7F;AAW6F,IAAA,MAAA,CAAA,IAAA,EAAA,qBAAA,CAAA;AAAA;AAAA,EACpF,eAAA,CACL,OACA,OAAA,EACkB;AAClB,IAAA,MAAM,SAA2B,EAAC;AAClC,IAAA,KAAA,CAAM,OAAA,CAAQ,CAAC,GAAA,KAAQ;AACrB,MAAA,MAAM,OAAA,GAAU,QAAA,CAAS,eAAA,CAAgB,GAAA,EAAK,OAAO,CAAA;AACrD,MAAA,MAAA,CAAO,KAAK,OAAO,CAAA;AAAA,IACrB,CAAC,CAAA;AAED,IAAA,OAAO,MAAA;AAAA,EACT;AAAA,EAEU,qBAAA,CACR,MAAA,EACA,SAAA,EACA,MAAA,EACM;AACN,IAAA,MAAA,CAAO,SAAS,SAAS,CAAA;AAAA,EAC3B;AACF;;;;"}