{"version":3,"file":"errors-BS570HVS.cjs","names":[],"sources":["../src/lib/core/errors.ts"],"sourcesContent":["/**\n * Errors the control throws that a host may want to tell apart from a real\n * failure.\n */\n\n/**\n * Thrown by `addData` when the user dismissed the multi-layer picker without\n * choosing any layer. Nothing was loaded and nothing went wrong, so a host\n * should swallow it rather than surface it as a load failure; the control\n * itself emits no `'error'` event for it.\n */\nexport class VectorLayerSelectionCancelledError extends Error {\n  constructor(message = 'Layer selection cancelled.') {\n    super(message);\n    this.name = 'VectorLayerSelectionCancelledError';\n  }\n}\n\n/**\n * Whether a rejection is a dismissed multi-layer picker rather than a load\n * failure. Matches on the error name as well as the class, so a copy that\n * crossed a bundle boundary (two copies of the package, a structured clone)\n * is still recognized.\n *\n * @param error - The value a rejected `addData` produced.\n * @returns True when the load was cancelled by the user.\n */\nexport function isVectorLayerSelectionCancelled(error: unknown): boolean {\n  return (\n    error instanceof VectorLayerSelectionCancelledError ||\n    (error instanceof Error && error.name === 'VectorLayerSelectionCancelledError')\n  );\n}\n"],"mappings":";;;;;;;;;;;AAWA,IAAa,qCAAb,cAAwD,MAAM;CAC5D,YAAY,UAAU,8BAA8B;EAClD,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;;;;;;;;;;AAWA,SAAgB,gCAAgC,OAAyB;CACvE,OACE,iBAAiB,sCAChB,iBAAiB,SAAS,MAAM,SAAS;AAE9C"}