superdoc 1.0.0-beta.32 → 1.0.0-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/chunks/{PdfViewer-CTKbqDWv.cjs → PdfViewer-1hoKlV0M.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-edjIRb_p.es.js → PdfViewer-CVrn4X-3.es.js} +1 -1
  3. package/dist/chunks/{index-Pwv0a9G5.es.js → index-BTDOWM_2.es.js} +57 -32
  4. package/dist/chunks/{index-Cajp7-Xa.cjs → index-VKd9fPLu.cjs} +57 -32
  5. package/dist/chunks/{index-SGV4U12y-BPGxOtvI.es.js → index-hX4H5xPH-ChjioDix.es.js} +1 -1
  6. package/dist/chunks/{index-SGV4U12y-Dh5jaROA.cjs → index-hX4H5xPH-DfkQd7UH.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-CdGsYGU1.es.js → super-editor.es-CpmC4G9F.es.js} +158 -81
  8. package/dist/chunks/{super-editor.es-BbbbKgEs.cjs → super-editor.es-Dzrm58hW.cjs} +158 -81
  9. package/dist/style.css +33 -33
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-CpuOoAUa.js → converter-DZNL-ld-.js} +1 -1
  12. package/dist/super-editor/chunks/{docx-zipper-Dk99r397.js → docx-zipper-DukE72iM.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-CFv-RJI-.js → editor-CJCGDp-l.js} +159 -71
  14. package/dist/super-editor/chunks/{index-SGV4U12y.js → index-hX4H5xPH.js} +1 -1
  15. package/dist/super-editor/chunks/{toolbar-CQr3Xnx9.js → toolbar-D6tqFv6-.js} +2 -2
  16. package/dist/super-editor/converter.es.js +1 -1
  17. package/dist/super-editor/docx-zipper.es.js +2 -2
  18. package/dist/super-editor/editor.es.js +3 -3
  19. package/dist/super-editor/file-zipper.es.js +1 -1
  20. package/dist/super-editor/super-editor.es.js +6 -6
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.cjs +1 -1
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.cjs +2 -2
  25. package/dist/superdoc.es.js +2 -2
  26. package/dist/superdoc.umd.js +214 -112
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-jWLMl8Ts.cjs");
4
- const superdoc = require("./index-Cajp7-Xa.cjs");
4
+ const superdoc = require("./index-VKd9fPLu.cjs");
5
5
  function self(vars) {
6
6
  const {
7
7
  opacityDisabled,
@@ -1,5 +1,5 @@
1
1
  import { y as defineComponent, z as h, O as Transition, a0 as process$1, J as watchEffect, a as computed, r as ref, j as onMounted, W as onUnmounted, b as createElementBlock, o as openBlock, f as createBaseVNode, e as createCommentVNode, u as createVNode, v as unref } from "./vue-Dysv_7z5.es.js";
2
- import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-Pwv0a9G5.es.js";
2
+ import { d as derived, c, a as cB, f as fadeInTransition, b as cM, N as NBaseLoading, w as warnOnce, u as useConfig, e as useTheme, p as pxfy, g as createKey, h as useThemeClass, i as useCompitable, _ as _export_sfc, j as useSuperdocStore, s as storeToRefs, k as useSelection } from "./index-BTDOWM_2.es.js";
3
3
  function self(vars) {
4
4
  const {
5
5
  opacityDisabled,
@@ -1,4 +1,4 @@
1
- import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CdGsYGU1.es.js";
1
+ import { q as index, C as CommentsPluginKey, h as TrackChangesBasePluginKey, E as Editor, n as getRichTextExtensions, f as SuperInput, P as PresentationEditor, e as SuperEditor, A as AIWriter, g as SuperToolbar, i as createZip } from "./super-editor.es-CpmC4G9F.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import { E as EventEmitter } from "./eventemitter3-CcXAdeql.es.js";
4
4
  import { HocuspocusProvider, HocuspocusProviderWebsocket } from "@hocuspocus/provider";
@@ -16449,26 +16449,14 @@ const _sfc_main$9 = {
16449
16449
  const firstGroupRendered = ref(false);
16450
16450
  const verticalOffset = ref(0);
16451
16451
  const commentsRenderKey = ref(0);
16452
+ const measurementTimeoutId = ref(null);
16452
16453
  const getCommentPosition = computed(() => (comment) => {
16453
16454
  if (!floatingCommentsContainer.value) return { top: "0px" };
16454
- floatingCommentsContainer.value.getBoundingClientRect();
16455
16455
  if (typeof comment.top !== "number" || isNaN(comment.top)) {
16456
16456
  return { display: "none" };
16457
16457
  }
16458
16458
  return { top: `${comment.top}px` };
16459
16459
  });
16460
- const findScrollParent = (element) => {
16461
- if (!element) return window;
16462
- let parent = element.parentNode;
16463
- while (parent && parent !== document) {
16464
- const style2 = getComputedStyle(parent);
16465
- if (/(auto|scroll|overlay)/.test(style2.overflow + style2.overflowY + style2.overflowX)) {
16466
- return parent;
16467
- }
16468
- parent = parent.parentNode;
16469
- }
16470
- return window;
16471
- };
16472
16460
  const handleDialog = (dialog) => {
16473
16461
  if (!dialog) return;
16474
16462
  const { elementRef, commentId } = dialog;
@@ -16476,44 +16464,68 @@ const _sfc_main$9 = {
16476
16464
  nextTick(() => {
16477
16465
  const id = commentId;
16478
16466
  if (renderedSizes.value.some((item) => item.id == id)) return;
16479
- const editorBounds = props.parent.getBoundingClientRect();
16480
16467
  const comment = getFloatingComments.value.find((c2) => c2.commentId === id || c2.importedId == id);
16481
16468
  const positionKey = id || comment?.importedId;
16482
- let position = editorCommentPositions.value[positionKey]?.bounds || {};
16469
+ const positionEntry = editorCommentPositions.value[positionKey];
16470
+ const position = positionEntry?.bounds || {};
16483
16471
  if (props.currentDocument.type === "application/pdf") {
16484
16472
  Object.entries(comment.selection?.selectionBounds).forEach(([key, value]) => {
16485
16473
  position[key] = Number(value);
16486
16474
  });
16487
- position.top += editorBounds.top;
16488
16475
  }
16489
16476
  if (!position) return;
16490
- const scrollParent = findScrollParent(props.parent);
16491
- scrollParent === window ? window.scrollY : scrollParent.scrollTop;
16492
16477
  const bounds = elementRef.value?.getBoundingClientRect();
16478
+ const top = Number(position.top);
16479
+ if (!Number.isFinite(top)) return;
16493
16480
  const placement = {
16494
16481
  id,
16495
- top: position.top - editorBounds.top,
16482
+ top,
16496
16483
  height: bounds.height,
16497
16484
  commentRef: comment,
16498
- elementRef
16485
+ elementRef,
16486
+ pageIndex: positionEntry?.pageIndex ?? 0
16499
16487
  };
16500
16488
  renderedSizes.value.push(placement);
16501
16489
  });
16502
16490
  };
16503
16491
  const processLocations = async () => {
16504
- let currentBottom = 0;
16505
- renderedSizes.value.sort((a, b) => a.top - b.top).forEach((comment) => {
16506
- if (comment.top <= currentBottom + 15) {
16507
- comment.top = currentBottom + 15;
16508
- }
16509
- currentBottom = comment.top + comment.height;
16492
+ const groupedByPage = renderedSizes.value.reduce((acc, comment) => {
16493
+ const key = comment.pageIndex ?? 0;
16494
+ if (!acc[key]) acc[key] = [];
16495
+ acc[key].push(comment);
16496
+ return acc;
16497
+ }, {});
16498
+ Object.values(groupedByPage).forEach((comments) => {
16499
+ comments.sort((a, b) => a.top - b.top).forEach((comment, idx, arr) => {
16500
+ if (idx === 0) return;
16501
+ const prev = arr[idx - 1];
16502
+ const minTop = prev.top + prev.height + 15;
16503
+ if (comment.top < minTop) {
16504
+ comment.top = minTop;
16505
+ }
16506
+ });
16510
16507
  });
16511
16508
  await nextTick();
16512
16509
  firstGroupRendered.value = true;
16513
16510
  };
16514
16511
  watchEffect(() => {
16515
- if (renderedSizes.value.length === getFloatingComments.value.length) {
16512
+ if (measurementTimeoutId.value) {
16513
+ clearTimeout(measurementTimeoutId.value);
16514
+ measurementTimeoutId.value = null;
16515
+ }
16516
+ const totalComments = getFloatingComments.value.length;
16517
+ const measuredComments = renderedSizes.value.length;
16518
+ if (totalComments === 0) {
16519
+ return;
16520
+ }
16521
+ if (measuredComments === totalComments) {
16516
16522
  nextTick(processLocations);
16523
+ } else if (measuredComments > 0 && !firstGroupRendered.value) {
16524
+ measurementTimeoutId.value = setTimeout(() => {
16525
+ if (!firstGroupRendered.value && renderedSizes.value.length > 0) {
16526
+ processLocations();
16527
+ }
16528
+ }, 100);
16517
16529
  }
16518
16530
  });
16519
16531
  watch(activeComment, (newVal, oldVal) => {
@@ -16536,6 +16548,12 @@ const _sfc_main$9 = {
16536
16548
  }, 200);
16537
16549
  });
16538
16550
  });
16551
+ onBeforeUnmount(() => {
16552
+ if (measurementTimeoutId.value) {
16553
+ clearTimeout(measurementTimeoutId.value);
16554
+ measurementTimeoutId.value = null;
16555
+ }
16556
+ });
16539
16557
  return (_ctx, _cache) => {
16540
16558
  return openBlock(), createElementBlock("div", {
16541
16559
  class: "section-wrapper",
@@ -16586,7 +16604,7 @@ const _sfc_main$9 = {
16586
16604
  };
16587
16605
  }
16588
16606
  };
16589
- const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-91de2350"]]);
16607
+ const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-eab6fbfa"]]);
16590
16608
  const _sfc_main$8 = {
16591
16609
  __name: "TextField",
16592
16610
  props: {
@@ -17214,7 +17232,7 @@ const _sfc_main = {
17214
17232
  __name: "SuperDoc",
17215
17233
  emits: ["selection-update"],
17216
17234
  setup(__props, { emit: __emit }) {
17217
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-edjIRb_p.es.js"));
17235
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-CVrn4X-3.es.js"));
17218
17236
  const superdocStore = useSuperdocStore();
17219
17237
  const commentsStore = useCommentsStore();
17220
17238
  const {
@@ -17341,6 +17359,13 @@ const _sfc_main = {
17341
17359
  presentationEditor.onTelemetry((telemetryPayload) => {
17342
17360
  proxy.$superdoc.captureLayoutPipelineEvent(telemetryPayload);
17343
17361
  });
17362
+ presentationEditor.on("commentPositions", ({ positions }) => {
17363
+ const commentsConfig = proxy.$superdoc.config.modules?.comments;
17364
+ if (!commentsConfig || commentsConfig === false) return;
17365
+ if (!positions || Object.keys(positions).length === 0) return;
17366
+ const mappedPositions = presentationEditor.getCommentBounds(positions, layers.value);
17367
+ handleEditorLocationsUpdate(mappedPositions);
17368
+ });
17344
17369
  };
17345
17370
  const onEditorDestroy = () => {
17346
17371
  proxy.$superdoc.broadcastEditorDestroy();
@@ -17887,7 +17912,7 @@ const _sfc_main = {
17887
17912
  };
17888
17913
  }
17889
17914
  };
17890
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3fafc837"]]);
17915
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c3356b6"]]);
17891
17916
  const createSuperdocVueApp = () => {
17892
17917
  const app = createApp(App);
17893
17918
  const pinia = createPinia();
@@ -18067,7 +18092,7 @@ class SuperDoc extends EventEmitter {
18067
18092
  this.config.colors = shuffleArray(this.config.colors);
18068
18093
  this.userColorMap = /* @__PURE__ */ new Map();
18069
18094
  this.colorIndex = 0;
18070
- this.version = "1.0.0-beta.32";
18095
+ this.version = "1.0.0-beta.33";
18071
18096
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18072
18097
  this.superdocId = config.superdocId || v4();
18073
18098
  this.colors = this.config.colors;
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_es = require("./super-editor.es-BbbbKgEs.cjs");
2
+ const superEditor_es = require("./super-editor.es-Dzrm58hW.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  const eventemitter3 = require("./eventemitter3-DQmQUge-.cjs");
5
5
  const provider = require("@hocuspocus/provider");
@@ -16466,26 +16466,14 @@ const _sfc_main$9 = {
16466
16466
  const firstGroupRendered = vue.ref(false);
16467
16467
  const verticalOffset = vue.ref(0);
16468
16468
  const commentsRenderKey = vue.ref(0);
16469
+ const measurementTimeoutId = vue.ref(null);
16469
16470
  const getCommentPosition = vue.computed(() => (comment) => {
16470
16471
  if (!floatingCommentsContainer.value) return { top: "0px" };
16471
- floatingCommentsContainer.value.getBoundingClientRect();
16472
16472
  if (typeof comment.top !== "number" || isNaN(comment.top)) {
16473
16473
  return { display: "none" };
16474
16474
  }
16475
16475
  return { top: `${comment.top}px` };
16476
16476
  });
16477
- const findScrollParent = (element) => {
16478
- if (!element) return window;
16479
- let parent = element.parentNode;
16480
- while (parent && parent !== document) {
16481
- const style2 = getComputedStyle(parent);
16482
- if (/(auto|scroll|overlay)/.test(style2.overflow + style2.overflowY + style2.overflowX)) {
16483
- return parent;
16484
- }
16485
- parent = parent.parentNode;
16486
- }
16487
- return window;
16488
- };
16489
16477
  const handleDialog = (dialog) => {
16490
16478
  if (!dialog) return;
16491
16479
  const { elementRef, commentId } = dialog;
@@ -16493,44 +16481,68 @@ const _sfc_main$9 = {
16493
16481
  vue.nextTick(() => {
16494
16482
  const id = commentId;
16495
16483
  if (renderedSizes.value.some((item) => item.id == id)) return;
16496
- const editorBounds = props.parent.getBoundingClientRect();
16497
16484
  const comment = getFloatingComments.value.find((c2) => c2.commentId === id || c2.importedId == id);
16498
16485
  const positionKey = id || comment?.importedId;
16499
- let position = editorCommentPositions.value[positionKey]?.bounds || {};
16486
+ const positionEntry = editorCommentPositions.value[positionKey];
16487
+ const position = positionEntry?.bounds || {};
16500
16488
  if (props.currentDocument.type === "application/pdf") {
16501
16489
  Object.entries(comment.selection?.selectionBounds).forEach(([key, value]) => {
16502
16490
  position[key] = Number(value);
16503
16491
  });
16504
- position.top += editorBounds.top;
16505
16492
  }
16506
16493
  if (!position) return;
16507
- const scrollParent = findScrollParent(props.parent);
16508
- scrollParent === window ? window.scrollY : scrollParent.scrollTop;
16509
16494
  const bounds = elementRef.value?.getBoundingClientRect();
16495
+ const top = Number(position.top);
16496
+ if (!Number.isFinite(top)) return;
16510
16497
  const placement = {
16511
16498
  id,
16512
- top: position.top - editorBounds.top,
16499
+ top,
16513
16500
  height: bounds.height,
16514
16501
  commentRef: comment,
16515
- elementRef
16502
+ elementRef,
16503
+ pageIndex: positionEntry?.pageIndex ?? 0
16516
16504
  };
16517
16505
  renderedSizes.value.push(placement);
16518
16506
  });
16519
16507
  };
16520
16508
  const processLocations = async () => {
16521
- let currentBottom = 0;
16522
- renderedSizes.value.sort((a, b) => a.top - b.top).forEach((comment) => {
16523
- if (comment.top <= currentBottom + 15) {
16524
- comment.top = currentBottom + 15;
16525
- }
16526
- currentBottom = comment.top + comment.height;
16509
+ const groupedByPage = renderedSizes.value.reduce((acc, comment) => {
16510
+ const key = comment.pageIndex ?? 0;
16511
+ if (!acc[key]) acc[key] = [];
16512
+ acc[key].push(comment);
16513
+ return acc;
16514
+ }, {});
16515
+ Object.values(groupedByPage).forEach((comments) => {
16516
+ comments.sort((a, b) => a.top - b.top).forEach((comment, idx, arr) => {
16517
+ if (idx === 0) return;
16518
+ const prev = arr[idx - 1];
16519
+ const minTop = prev.top + prev.height + 15;
16520
+ if (comment.top < minTop) {
16521
+ comment.top = minTop;
16522
+ }
16523
+ });
16527
16524
  });
16528
16525
  await vue.nextTick();
16529
16526
  firstGroupRendered.value = true;
16530
16527
  };
16531
16528
  vue.watchEffect(() => {
16532
- if (renderedSizes.value.length === getFloatingComments.value.length) {
16529
+ if (measurementTimeoutId.value) {
16530
+ clearTimeout(measurementTimeoutId.value);
16531
+ measurementTimeoutId.value = null;
16532
+ }
16533
+ const totalComments = getFloatingComments.value.length;
16534
+ const measuredComments = renderedSizes.value.length;
16535
+ if (totalComments === 0) {
16536
+ return;
16537
+ }
16538
+ if (measuredComments === totalComments) {
16533
16539
  vue.nextTick(processLocations);
16540
+ } else if (measuredComments > 0 && !firstGroupRendered.value) {
16541
+ measurementTimeoutId.value = setTimeout(() => {
16542
+ if (!firstGroupRendered.value && renderedSizes.value.length > 0) {
16543
+ processLocations();
16544
+ }
16545
+ }, 100);
16534
16546
  }
16535
16547
  });
16536
16548
  vue.watch(activeComment, (newVal, oldVal) => {
@@ -16553,6 +16565,12 @@ const _sfc_main$9 = {
16553
16565
  }, 200);
16554
16566
  });
16555
16567
  });
16568
+ vue.onBeforeUnmount(() => {
16569
+ if (measurementTimeoutId.value) {
16570
+ clearTimeout(measurementTimeoutId.value);
16571
+ measurementTimeoutId.value = null;
16572
+ }
16573
+ });
16556
16574
  return (_ctx, _cache) => {
16557
16575
  return vue.openBlock(), vue.createElementBlock("div", {
16558
16576
  class: "section-wrapper",
@@ -16603,7 +16621,7 @@ const _sfc_main$9 = {
16603
16621
  };
16604
16622
  }
16605
16623
  };
16606
- const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-91de2350"]]);
16624
+ const FloatingComments = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-eab6fbfa"]]);
16607
16625
  const _sfc_main$8 = {
16608
16626
  __name: "TextField",
16609
16627
  props: {
@@ -17231,7 +17249,7 @@ const _sfc_main = {
17231
17249
  __name: "SuperDoc",
17232
17250
  emits: ["selection-update"],
17233
17251
  setup(__props, { emit: __emit }) {
17234
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-CTKbqDWv.cjs")));
17252
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-1hoKlV0M.cjs")));
17235
17253
  const superdocStore = useSuperdocStore();
17236
17254
  const commentsStore = useCommentsStore();
17237
17255
  const {
@@ -17358,6 +17376,13 @@ const _sfc_main = {
17358
17376
  presentationEditor.onTelemetry((telemetryPayload) => {
17359
17377
  proxy.$superdoc.captureLayoutPipelineEvent(telemetryPayload);
17360
17378
  });
17379
+ presentationEditor.on("commentPositions", ({ positions }) => {
17380
+ const commentsConfig = proxy.$superdoc.config.modules?.comments;
17381
+ if (!commentsConfig || commentsConfig === false) return;
17382
+ if (!positions || Object.keys(positions).length === 0) return;
17383
+ const mappedPositions = presentationEditor.getCommentBounds(positions, layers.value);
17384
+ handleEditorLocationsUpdate(mappedPositions);
17385
+ });
17361
17386
  };
17362
17387
  const onEditorDestroy = () => {
17363
17388
  proxy.$superdoc.broadcastEditorDestroy();
@@ -17904,7 +17929,7 @@ const _sfc_main = {
17904
17929
  };
17905
17930
  }
17906
17931
  };
17907
- const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3fafc837"]]);
17932
+ const App = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-3c3356b6"]]);
17908
17933
  const createSuperdocVueApp = () => {
17909
17934
  const app = vue.createApp(App);
17910
17935
  const pinia = createPinia();
@@ -18084,7 +18109,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
18084
18109
  this.config.colors = shuffleArray(this.config.colors);
18085
18110
  this.userColorMap = /* @__PURE__ */ new Map();
18086
18111
  this.colorIndex = 0;
18087
- this.version = "1.0.0-beta.32";
18112
+ this.version = "1.0.0-beta.33";
18088
18113
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
18089
18114
  this.superdocId = config.superdocId || uuid.v4();
18090
18115
  this.colors = this.config.colors;
@@ -1,4 +1,4 @@
1
- import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-CdGsYGU1.es.js";
1
+ import { s as getDefaultExportFromCjs$2 } from "./super-editor.es-CpmC4G9F.es.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG-CvBqQJbG.es.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./super-editor.es-BbbbKgEs.cjs");
3
+ const superEditor_es = require("./super-editor.es-Dzrm58hW.cjs");
4
4
  const indexCvBqQJbG = require("./index-CvBqQJbG-Dwm0THD7.cjs");
5
5
  function bail(error) {
6
6
  if (error) {