{"version":3,"file":"callbacks.cjs","sources":["../../../src/utils/callbacks.ts"],"sourcesContent":["/** Attempt every callback, then rethrow the first exact failure value. */\nexport function runAllCallbacks(callbacks: Iterable<() => void>): void {\n  let firstFailure: { error: unknown } | undefined\n  for (const callback of callbacks) {\n    try {\n      callback()\n    } catch (error) {\n      firstFailure ??= { error }\n    }\n  }\n  if (firstFailure) throw firstFailure.error\n}\n\n/**\n * Report an adapter contract breach, such as an `unloadSubset` that throws,\n * without changing the caller's result. The error surfaces as uncaught.\n */\nexport function reportUncaught(error: unknown): void {\n  queueMicrotask(() => {\n    throw error\n  })\n}\n"],"names":[],"mappings":";;AACO,SAAS,gBAAgB,WAAuC;AACrE,MAAI;AACJ,aAAW,YAAY,WAAW;AAChC,QAAI;AACF,eAAA;AAAA,IACF,SAAS,OAAO;AACd,uBAAiB,EAAE,MAAA;AAAA,IACrB;AAAA,EACF;AACA,MAAI,oBAAoB,aAAa;AACvC;AAMO,SAAS,eAAe,OAAsB;AACnD,iBAAe,MAAM;AACnB,UAAM;AAAA,EACR,CAAC;AACH;;;"}