pdfjs-reader-core 0.2.4 → 0.2.6

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.
package/dist/index.js CHANGED
@@ -324,6 +324,7 @@ function createViewerStore(initialOverrides = {}) {
324
324
  document: document2,
325
325
  numPages: document2.numPages,
326
326
  isLoading: false,
327
+ loadingProgress: null,
327
328
  error: null,
328
329
  currentPage: 1
329
330
  });
@@ -331,15 +332,22 @@ function createViewerStore(initialOverrides = {}) {
331
332
  set({
332
333
  document: null,
333
334
  numPages: 0,
334
- isLoading: false
335
+ isLoading: false,
336
+ loadingProgress: null
335
337
  });
336
338
  }
337
339
  },
338
- setLoading: (isLoading) => {
339
- set({ isLoading });
340
+ setLoading: (isLoading, progress) => {
341
+ set({
342
+ isLoading,
343
+ loadingProgress: isLoading ? progress ?? { phase: "initializing" } : null
344
+ });
345
+ },
346
+ setLoadingProgress: (progress) => {
347
+ set({ loadingProgress: progress });
340
348
  },
341
349
  setError: (error) => {
342
- set({ error, isLoading: false });
350
+ set({ error, isLoading: false, loadingProgress: null });
343
351
  },
344
352
  // Navigation actions
345
353
  setCurrentPage: (page) => {
@@ -486,6 +494,7 @@ var init_viewer_store = __esm({
486
494
  document: null,
487
495
  numPages: 0,
488
496
  isLoading: false,
497
+ loadingProgress: null,
489
498
  error: null,
490
499
  // Navigation state
491
500
  currentPage: 1,
@@ -9258,6 +9267,138 @@ var init_FloatingZoomControls2 = __esm({
9258
9267
  }
9259
9268
  });
9260
9269
 
9270
+ // src/components/PDFLoadingScreen/PDFLoadingScreen.tsx
9271
+ import { memo as memo25 } from "react";
9272
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
9273
+ function formatBytes(bytes) {
9274
+ if (bytes < 1024) return `${bytes} B`;
9275
+ if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;
9276
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
9277
+ }
9278
+ var phaseMessages, PDFLoadingScreen;
9279
+ var init_PDFLoadingScreen = __esm({
9280
+ "src/components/PDFLoadingScreen/PDFLoadingScreen.tsx"() {
9281
+ "use strict";
9282
+ init_utils();
9283
+ phaseMessages = {
9284
+ initializing: "Initializing...",
9285
+ fetching: "Loading document...",
9286
+ parsing: "Processing pages...",
9287
+ rendering: "Preparing view..."
9288
+ };
9289
+ PDFLoadingScreen = memo25(function PDFLoadingScreen2({
9290
+ progress,
9291
+ bytesLoaded,
9292
+ totalBytes,
9293
+ phase = "fetching",
9294
+ documentName,
9295
+ className
9296
+ }) {
9297
+ const hasProgress = progress !== void 0 && progress >= 0;
9298
+ const hasBytes = bytesLoaded !== void 0 && totalBytes !== void 0 && totalBytes > 0;
9299
+ return /* @__PURE__ */ jsxs22(
9300
+ "div",
9301
+ {
9302
+ className: cn(
9303
+ "pdf-loading-screen",
9304
+ "flex flex-col items-center justify-center",
9305
+ "w-full h-full min-h-[400px]",
9306
+ "bg-slate-50 dark:bg-slate-800",
9307
+ className
9308
+ ),
9309
+ role: "status",
9310
+ "aria-live": "polite",
9311
+ "aria-label": phaseMessages[phase],
9312
+ children: [
9313
+ /* @__PURE__ */ jsxs22("div", { className: "pdf-loading-skeleton", children: [
9314
+ /* @__PURE__ */ jsx26("div", { className: "pdf-loading-icon", children: /* @__PURE__ */ jsxs22(
9315
+ "svg",
9316
+ {
9317
+ width: "48",
9318
+ height: "56",
9319
+ viewBox: "0 0 48 56",
9320
+ fill: "none",
9321
+ xmlns: "http://www.w3.org/2000/svg",
9322
+ className: "pdf-document-icon",
9323
+ children: [
9324
+ /* @__PURE__ */ jsx26(
9325
+ "path",
9326
+ {
9327
+ d: "M4 4C4 1.79086 5.79086 0 8 0H30L44 14V52C44 54.2091 42.2091 56 40 56H8C5.79086 56 4 54.2091 4 52V4Z",
9328
+ className: "fill-white dark:fill-slate-700"
9329
+ }
9330
+ ),
9331
+ /* @__PURE__ */ jsx26(
9332
+ "path",
9333
+ {
9334
+ d: "M30 0L44 14H34C31.7909 14 30 12.2091 30 10V0Z",
9335
+ className: "fill-slate-200 dark:fill-slate-600"
9336
+ }
9337
+ ),
9338
+ /* @__PURE__ */ jsx26("rect", { x: "10", y: "22", width: "24", height: "3", rx: "1.5", className: "fill-slate-200 dark:fill-slate-600" }),
9339
+ /* @__PURE__ */ jsx26("rect", { x: "10", y: "28", width: "20", height: "3", rx: "1.5", className: "fill-slate-200 dark:fill-slate-600" }),
9340
+ /* @__PURE__ */ jsx26("rect", { x: "10", y: "34", width: "22", height: "3", rx: "1.5", className: "fill-slate-200 dark:fill-slate-600" }),
9341
+ /* @__PURE__ */ jsx26("rect", { x: "10", y: "40", width: "16", height: "3", rx: "1.5", className: "fill-slate-200 dark:fill-slate-600" }),
9342
+ /* @__PURE__ */ jsx26(
9343
+ "path",
9344
+ {
9345
+ d: "M4 4C4 1.79086 5.79086 0 8 0H30L44 14V52C44 54.2091 42.2091 56 40 56H8C5.79086 56 4 54.2091 4 52V4Z",
9346
+ className: "stroke-slate-300 dark:stroke-slate-500",
9347
+ strokeWidth: "1",
9348
+ fill: "none"
9349
+ }
9350
+ )
9351
+ ]
9352
+ }
9353
+ ) }),
9354
+ /* @__PURE__ */ jsxs22("div", { className: "pdf-skeleton-lines", children: [
9355
+ /* @__PURE__ */ jsx26("div", { className: "pdf-skeleton-line pdf-skeleton-line-1" }),
9356
+ /* @__PURE__ */ jsx26("div", { className: "pdf-skeleton-line pdf-skeleton-line-2" }),
9357
+ /* @__PURE__ */ jsx26("div", { className: "pdf-skeleton-line pdf-skeleton-line-3" })
9358
+ ] })
9359
+ ] }),
9360
+ /* @__PURE__ */ jsxs22("div", { className: "pdf-loading-info", children: [
9361
+ documentName && /* @__PURE__ */ jsx26("p", { className: "pdf-loading-document-name", children: documentName }),
9362
+ /* @__PURE__ */ jsx26("p", { className: "pdf-loading-message", children: phaseMessages[phase] }),
9363
+ /* @__PURE__ */ jsxs22("div", { className: "pdf-loading-progress-container", children: [
9364
+ /* @__PURE__ */ jsx26("div", { className: "pdf-loading-progress-track", children: /* @__PURE__ */ jsx26(
9365
+ "div",
9366
+ {
9367
+ className: cn(
9368
+ "pdf-loading-progress-fill",
9369
+ !hasProgress && "pdf-loading-progress-indeterminate"
9370
+ ),
9371
+ style: hasProgress ? { width: `${Math.min(100, progress)}%` } : void 0
9372
+ }
9373
+ ) }),
9374
+ /* @__PURE__ */ jsxs22("div", { className: "pdf-loading-progress-details", children: [
9375
+ hasProgress && /* @__PURE__ */ jsxs22("span", { className: "pdf-loading-progress-percent", children: [
9376
+ Math.round(progress),
9377
+ "%"
9378
+ ] }),
9379
+ hasBytes && /* @__PURE__ */ jsxs22("span", { className: "pdf-loading-progress-bytes", children: [
9380
+ formatBytes(bytesLoaded),
9381
+ " / ",
9382
+ formatBytes(totalBytes)
9383
+ ] })
9384
+ ] })
9385
+ ] })
9386
+ ] })
9387
+ ]
9388
+ }
9389
+ );
9390
+ });
9391
+ }
9392
+ });
9393
+
9394
+ // src/components/PDFLoadingScreen/index.ts
9395
+ var init_PDFLoadingScreen2 = __esm({
9396
+ "src/components/PDFLoadingScreen/index.ts"() {
9397
+ "use strict";
9398
+ init_PDFLoadingScreen();
9399
+ }
9400
+ });
9401
+
9261
9402
  // src/components/PDFViewer/PDFViewerClient.tsx
9262
9403
  var PDFViewerClient_exports = {};
9263
9404
  __export(PDFViewerClient_exports, {
@@ -9266,12 +9407,12 @@ __export(PDFViewerClient_exports, {
9266
9407
  import {
9267
9408
  useEffect as useEffect22,
9268
9409
  useCallback as useCallback33,
9269
- memo as memo25,
9410
+ memo as memo26,
9270
9411
  useRef as useRef19,
9271
9412
  useState as useState21,
9272
9413
  forwardRef
9273
9414
  } from "react";
9274
- import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
9415
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
9275
9416
  function getSrcIdentifier(src) {
9276
9417
  if (typeof src === "string") {
9277
9418
  return src;
@@ -9324,8 +9465,9 @@ var init_PDFViewerClient = __esm({
9324
9465
  init_ContinuousScrollContainer();
9325
9466
  init_DualPageContainer();
9326
9467
  init_FloatingZoomControls2();
9468
+ init_PDFLoadingScreen2();
9327
9469
  init_utils();
9328
- PDFViewerInner = memo25(function PDFViewerInner2({
9470
+ PDFViewerInner = memo26(function PDFViewerInner2({
9329
9471
  src,
9330
9472
  initialPage = 1,
9331
9473
  page: controlledPage,
@@ -9383,6 +9525,7 @@ var init_PDFViewerClient = __esm({
9383
9525
  const scale = useViewerStore((s) => s.scale);
9384
9526
  const theme = useViewerStore((s) => s.theme);
9385
9527
  const isLoading = useViewerStore((s) => s.isLoading);
9528
+ const loadingProgress = useViewerStore((s) => s.loadingProgress);
9386
9529
  const error = useViewerStore((s) => s.error);
9387
9530
  const sidebarOpen = useViewerStore((s) => s.sidebarOpen);
9388
9531
  const srcId = getSrcIdentifier(src);
@@ -9830,13 +9973,27 @@ var init_PDFViewerClient = __esm({
9830
9973
  const loadDoc = async () => {
9831
9974
  if (!mountedRef.current) return;
9832
9975
  try {
9833
- viewerStore.getState().setLoading(true);
9976
+ viewerStore.getState().setLoading(true, { phase: "fetching" });
9834
9977
  viewerStore.getState().setError(null);
9835
9978
  setLoadState("loading");
9836
9979
  const { document: document2, numPages } = await loadDocument({
9837
9980
  src,
9838
- workerSrc
9981
+ workerSrc,
9982
+ onProgress: ({ loaded, total }) => {
9983
+ if (mountedRef.current && srcIdRef.current === loadId) {
9984
+ const percent = total > 0 ? Math.round(loaded / total * 100) : void 0;
9985
+ viewerStore.getState().setLoadingProgress({
9986
+ phase: "fetching",
9987
+ percent,
9988
+ bytesLoaded: loaded,
9989
+ totalBytes: total
9990
+ });
9991
+ }
9992
+ }
9839
9993
  });
9994
+ if (mountedRef.current && srcIdRef.current === loadId) {
9995
+ viewerStore.getState().setLoadingProgress({ phase: "parsing", percent: 100 });
9996
+ }
9840
9997
  if (mountedRef.current && srcIdRef.current === loadId) {
9841
9998
  viewerStore.getState().setDocument(document2);
9842
9999
  setLoadState("loaded");
@@ -9896,7 +10053,7 @@ var init_PDFViewerClient = __esm({
9896
10053
  if (error) {
9897
10054
  if (errorComponent) {
9898
10055
  const errorContent = typeof errorComponent === "function" ? errorComponent(error, handleRetry) : errorComponent;
9899
- return /* @__PURE__ */ jsx26(
10056
+ return /* @__PURE__ */ jsx27(
9900
10057
  "div",
9901
10058
  {
9902
10059
  className: cn(
@@ -9910,7 +10067,7 @@ var init_PDFViewerClient = __esm({
9910
10067
  }
9911
10068
  );
9912
10069
  }
9913
- return /* @__PURE__ */ jsx26(
10070
+ return /* @__PURE__ */ jsx27(
9914
10071
  "div",
9915
10072
  {
9916
10073
  className: cn(
@@ -9920,10 +10077,10 @@ var init_PDFViewerClient = __esm({
9920
10077
  themeClass,
9921
10078
  className
9922
10079
  ),
9923
- children: /* @__PURE__ */ jsx26("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxs22("div", { className: "text-center p-8", children: [
9924
- /* @__PURE__ */ jsx26("div", { className: "text-red-500 text-lg font-semibold mb-2", children: "Failed to load PDF" }),
9925
- /* @__PURE__ */ jsx26("div", { className: "text-gray-500 text-sm", children: error.message }),
9926
- /* @__PURE__ */ jsx26(
10080
+ children: /* @__PURE__ */ jsx27("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxs23("div", { className: "text-center p-8", children: [
10081
+ /* @__PURE__ */ jsx27("div", { className: "text-red-500 text-lg font-semibold mb-2", children: "Failed to load PDF" }),
10082
+ /* @__PURE__ */ jsx27("div", { className: "text-gray-500 text-sm", children: error.message }),
10083
+ /* @__PURE__ */ jsx27(
9927
10084
  "button",
9928
10085
  {
9929
10086
  onClick: handleRetry,
@@ -9938,15 +10095,15 @@ var init_PDFViewerClient = __esm({
9938
10095
  const renderContainer = () => {
9939
10096
  switch (viewMode) {
9940
10097
  case "continuous":
9941
- return /* @__PURE__ */ jsx26(ContinuousScrollContainer, {});
10098
+ return /* @__PURE__ */ jsx27(ContinuousScrollContainer, {});
9942
10099
  case "dual":
9943
- return /* @__PURE__ */ jsx26(DualPageContainer, {});
10100
+ return /* @__PURE__ */ jsx27(DualPageContainer, {});
9944
10101
  case "single":
9945
10102
  default:
9946
- return /* @__PURE__ */ jsx26(DocumentContainer, {});
10103
+ return /* @__PURE__ */ jsx27(DocumentContainer, {});
9947
10104
  }
9948
10105
  };
9949
- return /* @__PURE__ */ jsxs22(
10106
+ return /* @__PURE__ */ jsxs23(
9950
10107
  "div",
9951
10108
  {
9952
10109
  className: cn(
@@ -9958,17 +10115,22 @@ var init_PDFViewerClient = __esm({
9958
10115
  className
9959
10116
  ),
9960
10117
  children: [
9961
- showToolbar && /* @__PURE__ */ jsx26(Toolbar, {}),
9962
- showAnnotationToolbar && /* @__PURE__ */ jsx26(AnnotationToolbar, {}),
9963
- /* @__PURE__ */ jsxs22("div", { className: "flex flex-1 overflow-hidden", children: [
9964
- showSidebar && sidebarOpen && /* @__PURE__ */ jsx26(Sidebar, {}),
10118
+ showToolbar && /* @__PURE__ */ jsx27(Toolbar, {}),
10119
+ showAnnotationToolbar && /* @__PURE__ */ jsx27(AnnotationToolbar, {}),
10120
+ /* @__PURE__ */ jsxs23("div", { className: "flex flex-1 overflow-hidden", children: [
10121
+ showSidebar && sidebarOpen && /* @__PURE__ */ jsx27(Sidebar, {}),
9965
10122
  renderContainer()
9966
10123
  ] }),
9967
- showFloatingZoom && /* @__PURE__ */ jsx26(FloatingZoomControls, { position: "bottom-right" }),
9968
- isLoading && /* @__PURE__ */ jsx26("div", { className: "absolute inset-0 flex items-center justify-center bg-white/80 dark:bg-gray-900/80", children: loadingComponent ?? /* @__PURE__ */ jsxs22("div", { className: "flex flex-col items-center", children: [
9969
- /* @__PURE__ */ jsx26("div", { className: "w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin" }),
9970
- /* @__PURE__ */ jsx26("div", { className: "mt-2 text-sm text-gray-500", children: "Loading PDF..." })
9971
- ] }) })
10124
+ showFloatingZoom && /* @__PURE__ */ jsx27(FloatingZoomControls, { position: "bottom-right" }),
10125
+ isLoading && /* @__PURE__ */ jsx27("div", { className: "absolute inset-0 z-50", children: loadingComponent ?? /* @__PURE__ */ jsx27(
10126
+ PDFLoadingScreen,
10127
+ {
10128
+ phase: loadingProgress?.phase ?? "fetching",
10129
+ progress: loadingProgress?.percent,
10130
+ bytesLoaded: loadingProgress?.bytesLoaded,
10131
+ totalBytes: loadingProgress?.totalBytes
10132
+ }
10133
+ ) })
9972
10134
  ]
9973
10135
  }
9974
10136
  );
@@ -9984,17 +10146,17 @@ var init_PDFViewerClient = __esm({
9984
10146
  ref.current = handle;
9985
10147
  }
9986
10148
  }, [ref]);
9987
- return /* @__PURE__ */ jsx26(PDFViewerInner, { ...props, onReady: handleReady });
10149
+ return /* @__PURE__ */ jsx27(PDFViewerInner, { ...props, onReady: handleReady });
9988
10150
  }
9989
10151
  );
9990
- PDFViewerClient = memo25(
10152
+ PDFViewerClient = memo26(
9991
10153
  forwardRef(function PDFViewerClient2(props, ref) {
9992
- return /* @__PURE__ */ jsx26(
10154
+ return /* @__PURE__ */ jsx27(
9993
10155
  PDFViewerProvider,
9994
10156
  {
9995
10157
  theme: props.theme,
9996
10158
  defaultSidebarPanel: props.defaultSidebarPanel,
9997
- children: /* @__PURE__ */ jsx26(PDFViewerInnerWithRef, { ref, ...props })
10159
+ children: /* @__PURE__ */ jsx27(PDFViewerInnerWithRef, { ref, ...props })
9998
10160
  }
9999
10161
  );
10000
10162
  })
@@ -10003,8 +10165,8 @@ var init_PDFViewerClient = __esm({
10003
10165
  });
10004
10166
 
10005
10167
  // src/components/PDFViewer/PDFViewer.tsx
10006
- import { lazy, Suspense, memo as memo26 } from "react";
10007
- import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
10168
+ import { lazy, Suspense, memo as memo27 } from "react";
10169
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
10008
10170
  var PDFViewerClient3, PDFViewerLoading, PDFViewer;
10009
10171
  var init_PDFViewer = __esm({
10010
10172
  "src/components/PDFViewer/PDFViewer.tsx"() {
@@ -10013,10 +10175,10 @@ var init_PDFViewer = __esm({
10013
10175
  PDFViewerClient3 = lazy(
10014
10176
  () => Promise.resolve().then(() => (init_PDFViewerClient(), PDFViewerClient_exports)).then((mod) => ({ default: mod.PDFViewerClient }))
10015
10177
  );
10016
- PDFViewerLoading = memo26(function PDFViewerLoading2({
10178
+ PDFViewerLoading = memo27(function PDFViewerLoading2({
10017
10179
  className
10018
10180
  }) {
10019
- return /* @__PURE__ */ jsx27(
10181
+ return /* @__PURE__ */ jsx28(
10020
10182
  "div",
10021
10183
  {
10022
10184
  className: cn(
@@ -10025,18 +10187,18 @@ var init_PDFViewer = __esm({
10025
10187
  "bg-white dark:bg-gray-900",
10026
10188
  className
10027
10189
  ),
10028
- children: /* @__PURE__ */ jsx27("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxs23("div", { className: "flex flex-col items-center", children: [
10029
- /* @__PURE__ */ jsx27("div", { className: "w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin" }),
10030
- /* @__PURE__ */ jsx27("div", { className: "mt-2 text-sm text-gray-500", children: "Loading PDF viewer..." })
10190
+ children: /* @__PURE__ */ jsx28("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ jsxs24("div", { className: "flex flex-col items-center", children: [
10191
+ /* @__PURE__ */ jsx28("div", { className: "w-8 h-8 border-4 border-blue-500 border-t-transparent rounded-full animate-spin" }),
10192
+ /* @__PURE__ */ jsx28("div", { className: "mt-2 text-sm text-gray-500", children: "Loading PDF viewer..." })
10031
10193
  ] }) })
10032
10194
  }
10033
10195
  );
10034
10196
  });
10035
- PDFViewer = memo26(function PDFViewer2(props) {
10197
+ PDFViewer = memo27(function PDFViewer2(props) {
10036
10198
  if (typeof window === "undefined") {
10037
- return /* @__PURE__ */ jsx27(PDFViewerLoading, { className: props.className });
10199
+ return /* @__PURE__ */ jsx28(PDFViewerLoading, { className: props.className });
10038
10200
  }
10039
- return /* @__PURE__ */ jsx27(Suspense, { fallback: /* @__PURE__ */ jsx27(PDFViewerLoading, { className: props.className }), children: /* @__PURE__ */ jsx27(PDFViewerClient3, { ...props }) });
10201
+ return /* @__PURE__ */ jsx28(Suspense, { fallback: /* @__PURE__ */ jsx28(PDFViewerLoading, { className: props.className }), children: /* @__PURE__ */ jsx28(PDFViewerClient3, { ...props }) });
10040
10202
  });
10041
10203
  }
10042
10204
  });
@@ -10065,8 +10227,8 @@ init_AnnotationToolbar2();
10065
10227
 
10066
10228
  // src/components/Annotations/StickyNote.tsx
10067
10229
  init_utils();
10068
- import { memo as memo27, useState as useState22, useRef as useRef20, useEffect as useEffect23, useCallback as useCallback34 } from "react";
10069
- import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
10230
+ import { memo as memo28, useState as useState22, useRef as useRef20, useEffect as useEffect23, useCallback as useCallback34 } from "react";
10231
+ import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
10070
10232
  var NOTE_COLORS = [
10071
10233
  "#fef08a",
10072
10234
  // yellow
@@ -10079,7 +10241,7 @@ var NOTE_COLORS = [
10079
10241
  "#fed7aa"
10080
10242
  // orange
10081
10243
  ];
10082
- var StickyNote = memo27(function StickyNote2({
10244
+ var StickyNote = memo28(function StickyNote2({
10083
10245
  note,
10084
10246
  scale,
10085
10247
  isSelected,
@@ -10139,7 +10301,7 @@ var StickyNote = memo27(function StickyNote2({
10139
10301
  onEndEdit?.();
10140
10302
  }, [onEndEdit]);
10141
10303
  if (!isExpanded) {
10142
- return /* @__PURE__ */ jsx28(
10304
+ return /* @__PURE__ */ jsx29(
10143
10305
  "div",
10144
10306
  {
10145
10307
  ref: noteRef,
@@ -10160,14 +10322,14 @@ var StickyNote = memo27(function StickyNote2({
10160
10322
  onMouseDown: onDragStart,
10161
10323
  onTouchStart: onDragStart,
10162
10324
  title: note.content || "Empty note",
10163
- children: /* @__PURE__ */ jsx28(
10325
+ children: /* @__PURE__ */ jsx29(
10164
10326
  "svg",
10165
10327
  {
10166
10328
  className: "w-4 h-4 opacity-70",
10167
10329
  fill: "currentColor",
10168
10330
  viewBox: "0 0 20 20",
10169
10331
  style: { color: "#333" },
10170
- children: /* @__PURE__ */ jsx28(
10332
+ children: /* @__PURE__ */ jsx29(
10171
10333
  "path",
10172
10334
  {
10173
10335
  fillRule: "evenodd",
@@ -10180,7 +10342,7 @@ var StickyNote = memo27(function StickyNote2({
10180
10342
  }
10181
10343
  );
10182
10344
  }
10183
- return /* @__PURE__ */ jsxs24(
10345
+ return /* @__PURE__ */ jsxs25(
10184
10346
  "div",
10185
10347
  {
10186
10348
  ref: noteRef,
@@ -10198,14 +10360,14 @@ var StickyNote = memo27(function StickyNote2({
10198
10360
  },
10199
10361
  onClick: handleClick,
10200
10362
  children: [
10201
- /* @__PURE__ */ jsxs24(
10363
+ /* @__PURE__ */ jsxs25(
10202
10364
  "div",
10203
10365
  {
10204
10366
  className: "flex items-center justify-between px-2 py-1 border-b border-black/10 cursor-move",
10205
10367
  onMouseDown: onDragStart,
10206
10368
  onTouchStart: onDragStart,
10207
10369
  children: [
10208
- /* @__PURE__ */ jsx28("div", { className: "flex gap-1", children: NOTE_COLORS.map((color) => /* @__PURE__ */ jsx28(
10370
+ /* @__PURE__ */ jsx29("div", { className: "flex gap-1", children: NOTE_COLORS.map((color) => /* @__PURE__ */ jsx29(
10209
10371
  "button",
10210
10372
  {
10211
10373
  className: cn(
@@ -10222,8 +10384,8 @@ var StickyNote = memo27(function StickyNote2({
10222
10384
  },
10223
10385
  color
10224
10386
  )) }),
10225
- /* @__PURE__ */ jsxs24("div", { className: "flex gap-1", children: [
10226
- /* @__PURE__ */ jsx28(
10387
+ /* @__PURE__ */ jsxs25("div", { className: "flex gap-1", children: [
10388
+ /* @__PURE__ */ jsx29(
10227
10389
  "button",
10228
10390
  {
10229
10391
  className: "p-0.5 hover:bg-black/10 rounded",
@@ -10232,23 +10394,23 @@ var StickyNote = memo27(function StickyNote2({
10232
10394
  onDelete?.();
10233
10395
  },
10234
10396
  title: "Delete note",
10235
- children: /* @__PURE__ */ jsx28("svg", { className: "w-3.5 h-3.5 text-gray-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx28("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) })
10397
+ children: /* @__PURE__ */ jsx29("svg", { className: "w-3.5 h-3.5 text-gray-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx29("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) })
10236
10398
  }
10237
10399
  ),
10238
- /* @__PURE__ */ jsx28(
10400
+ /* @__PURE__ */ jsx29(
10239
10401
  "button",
10240
10402
  {
10241
10403
  className: "p-0.5 hover:bg-black/10 rounded",
10242
10404
  onClick: handleCollapse,
10243
10405
  title: "Collapse note",
10244
- children: /* @__PURE__ */ jsx28("svg", { className: "w-3.5 h-3.5 text-gray-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx28("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
10406
+ children: /* @__PURE__ */ jsx29("svg", { className: "w-3.5 h-3.5 text-gray-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx29("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) })
10245
10407
  }
10246
10408
  )
10247
10409
  ] })
10248
10410
  ]
10249
10411
  }
10250
10412
  ),
10251
- /* @__PURE__ */ jsx28("div", { className: "p-2", children: isEditing ? /* @__PURE__ */ jsx28(
10413
+ /* @__PURE__ */ jsx29("div", { className: "p-2", children: isEditing ? /* @__PURE__ */ jsx29(
10252
10414
  "textarea",
10253
10415
  {
10254
10416
  ref: textareaRef,
@@ -10263,7 +10425,7 @@ var StickyNote = memo27(function StickyNote2({
10263
10425
  onKeyDown: handleKeyDown,
10264
10426
  placeholder: "Enter note..."
10265
10427
  }
10266
- ) : /* @__PURE__ */ jsx28(
10428
+ ) : /* @__PURE__ */ jsx29(
10267
10429
  "div",
10268
10430
  {
10269
10431
  className: cn(
@@ -10274,7 +10436,7 @@ var StickyNote = memo27(function StickyNote2({
10274
10436
  children: note.content || "Double-click to edit..."
10275
10437
  }
10276
10438
  ) }),
10277
- /* @__PURE__ */ jsx28("div", { className: "px-2 pb-1 text-[10px] text-gray-500", children: new Date(note.updatedAt).toLocaleDateString() })
10439
+ /* @__PURE__ */ jsx29("div", { className: "px-2 pb-1 text-[10px] text-gray-500", children: new Date(note.updatedAt).toLocaleDateString() })
10278
10440
  ]
10279
10441
  }
10280
10442
  );
@@ -10282,8 +10444,8 @@ var StickyNote = memo27(function StickyNote2({
10282
10444
 
10283
10445
  // src/components/Annotations/DrawingCanvas.tsx
10284
10446
  init_utils();
10285
- import { memo as memo28, useRef as useRef21, useCallback as useCallback35, useState as useState23 } from "react";
10286
- import { jsx as jsx29 } from "react/jsx-runtime";
10447
+ import { memo as memo29, useRef as useRef21, useCallback as useCallback35, useState as useState23 } from "react";
10448
+ import { jsx as jsx30 } from "react/jsx-runtime";
10287
10449
  function pointsToSvgPath(points) {
10288
10450
  if (points.length === 0) return "";
10289
10451
  if (points.length === 1) {
@@ -10321,7 +10483,7 @@ function simplifyPath(points, tolerance = 1) {
10321
10483
  result.push(points[points.length - 1]);
10322
10484
  return result;
10323
10485
  }
10324
- var DrawingCanvas = memo28(function DrawingCanvas2({
10486
+ var DrawingCanvas = memo29(function DrawingCanvas2({
10325
10487
  width,
10326
10488
  height,
10327
10489
  scale,
@@ -10378,7 +10540,7 @@ var DrawingCanvas = memo28(function DrawingCanvas2({
10378
10540
  }
10379
10541
  setCurrentPath([]);
10380
10542
  }, [isDrawing, currentPath, onDrawingComplete]);
10381
- return /* @__PURE__ */ jsx29(
10543
+ return /* @__PURE__ */ jsx30(
10382
10544
  "svg",
10383
10545
  {
10384
10546
  ref: svgRef,
@@ -10398,7 +10560,7 @@ var DrawingCanvas = memo28(function DrawingCanvas2({
10398
10560
  onTouchStart: handleStart,
10399
10561
  onTouchMove: handleMove,
10400
10562
  onTouchEnd: handleEnd,
10401
- children: isDrawing && currentPath.length > 0 && /* @__PURE__ */ jsx29(
10563
+ children: isDrawing && currentPath.length > 0 && /* @__PURE__ */ jsx30(
10402
10564
  "path",
10403
10565
  {
10404
10566
  d: pointsToSvgPath(currentPath),
@@ -10416,9 +10578,9 @@ var DrawingCanvas = memo28(function DrawingCanvas2({
10416
10578
 
10417
10579
  // src/components/Annotations/ShapeRenderer.tsx
10418
10580
  init_utils();
10419
- import { memo as memo29, useCallback as useCallback36, useState as useState24, useRef as useRef22 } from "react";
10420
- import { jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
10421
- var ShapeRenderer = memo29(function ShapeRenderer2({
10581
+ import { memo as memo30, useCallback as useCallback36, useState as useState24, useRef as useRef22 } from "react";
10582
+ import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
10583
+ var ShapeRenderer = memo30(function ShapeRenderer2({
10422
10584
  shape,
10423
10585
  scale,
10424
10586
  isSelected,
@@ -10541,7 +10703,7 @@ var ShapeRenderer = memo29(function ShapeRenderer2({
10541
10703
  };
10542
10704
  switch (shapeType) {
10543
10705
  case "rect":
10544
- return /* @__PURE__ */ jsx30(
10706
+ return /* @__PURE__ */ jsx31(
10545
10707
  "rect",
10546
10708
  {
10547
10709
  x: scaledX,
@@ -10552,7 +10714,7 @@ var ShapeRenderer = memo29(function ShapeRenderer2({
10552
10714
  }
10553
10715
  );
10554
10716
  case "circle":
10555
- return /* @__PURE__ */ jsx30(
10717
+ return /* @__PURE__ */ jsx31(
10556
10718
  "ellipse",
10557
10719
  {
10558
10720
  cx: scaledX + scaledWidth / 2,
@@ -10563,7 +10725,7 @@ var ShapeRenderer = memo29(function ShapeRenderer2({
10563
10725
  }
10564
10726
  );
10565
10727
  case "line":
10566
- return /* @__PURE__ */ jsx30(
10728
+ return /* @__PURE__ */ jsx31(
10567
10729
  "line",
10568
10730
  {
10569
10731
  x1: scaledX,
@@ -10583,22 +10745,22 @@ var ShapeRenderer = memo29(function ShapeRenderer2({
10583
10745
  const arrow1Y = endY - arrowLength * Math.sin(angle - arrowAngle);
10584
10746
  const arrow2X = endX - arrowLength * Math.cos(angle + arrowAngle);
10585
10747
  const arrow2Y = endY - arrowLength * Math.sin(angle + arrowAngle);
10586
- return /* @__PURE__ */ jsxs25("g", { children: [
10587
- /* @__PURE__ */ jsx30("line", { x1: scaledX, y1: scaledY, x2: endX, y2: endY, ...commonProps }),
10588
- /* @__PURE__ */ jsx30("line", { x1: endX, y1: endY, x2: arrow1X, y2: arrow1Y, ...commonProps }),
10589
- /* @__PURE__ */ jsx30("line", { x1: endX, y1: endY, x2: arrow2X, y2: arrow2Y, ...commonProps })
10748
+ return /* @__PURE__ */ jsxs26("g", { children: [
10749
+ /* @__PURE__ */ jsx31("line", { x1: scaledX, y1: scaledY, x2: endX, y2: endY, ...commonProps }),
10750
+ /* @__PURE__ */ jsx31("line", { x1: endX, y1: endY, x2: arrow1X, y2: arrow1Y, ...commonProps }),
10751
+ /* @__PURE__ */ jsx31("line", { x1: endX, y1: endY, x2: arrow2X, y2: arrow2Y, ...commonProps })
10590
10752
  ] });
10591
10753
  default:
10592
10754
  return null;
10593
10755
  }
10594
10756
  }, [shapeType, scaledX, scaledY, scaledWidth, scaledHeight, color, scaledStroke, isSelected]);
10595
- return /* @__PURE__ */ jsxs25(
10757
+ return /* @__PURE__ */ jsxs26(
10596
10758
  "g",
10597
10759
  {
10598
10760
  className: cn("shape-renderer", className),
10599
10761
  onMouseDown: (e) => handleMouseDown(e),
10600
10762
  children: [
10601
- /* @__PURE__ */ jsx30(
10763
+ /* @__PURE__ */ jsx31(
10602
10764
  "rect",
10603
10765
  {
10604
10766
  x: scaledX - 5,
@@ -10611,7 +10773,7 @@ var ShapeRenderer = memo29(function ShapeRenderer2({
10611
10773
  }
10612
10774
  ),
10613
10775
  renderShape2(),
10614
- isSelected && /* @__PURE__ */ jsx30(
10776
+ isSelected && /* @__PURE__ */ jsx31(
10615
10777
  "rect",
10616
10778
  {
10617
10779
  x: scaledX - 2,
@@ -10624,7 +10786,7 @@ var ShapeRenderer = memo29(function ShapeRenderer2({
10624
10786
  strokeDasharray: "4 2"
10625
10787
  }
10626
10788
  ),
10627
- isSelected && isEditing && getResizeHandles().map((handle) => /* @__PURE__ */ jsx30(
10789
+ isSelected && isEditing && getResizeHandles().map((handle) => /* @__PURE__ */ jsx31(
10628
10790
  "rect",
10629
10791
  {
10630
10792
  x: handle.x,
@@ -10644,7 +10806,7 @@ var ShapeRenderer = memo29(function ShapeRenderer2({
10644
10806
  }
10645
10807
  );
10646
10808
  });
10647
- var ShapePreview = memo29(function ShapePreview2({
10809
+ var ShapePreview = memo30(function ShapePreview2({
10648
10810
  shapeType,
10649
10811
  startPoint,
10650
10812
  endPoint,
@@ -10665,9 +10827,9 @@ var ShapePreview = memo29(function ShapePreview2({
10665
10827
  };
10666
10828
  switch (shapeType) {
10667
10829
  case "rect":
10668
- return /* @__PURE__ */ jsx30("rect", { x, y, width, height, ...commonProps });
10830
+ return /* @__PURE__ */ jsx31("rect", { x, y, width, height, ...commonProps });
10669
10831
  case "circle":
10670
- return /* @__PURE__ */ jsx30(
10832
+ return /* @__PURE__ */ jsx31(
10671
10833
  "ellipse",
10672
10834
  {
10673
10835
  cx: x + width / 2,
@@ -10678,7 +10840,7 @@ var ShapePreview = memo29(function ShapePreview2({
10678
10840
  }
10679
10841
  );
10680
10842
  case "line":
10681
- return /* @__PURE__ */ jsx30(
10843
+ return /* @__PURE__ */ jsx31(
10682
10844
  "line",
10683
10845
  {
10684
10846
  x1: startPoint.x * scale,
@@ -10700,8 +10862,8 @@ var ShapePreview = memo29(function ShapePreview2({
10700
10862
  const arrow1Y = endY - arrowLength * Math.sin(angle - arrowAngle);
10701
10863
  const arrow2X = endX - arrowLength * Math.cos(angle + arrowAngle);
10702
10864
  const arrow2Y = endY - arrowLength * Math.sin(angle + arrowAngle);
10703
- return /* @__PURE__ */ jsxs25("g", { children: [
10704
- /* @__PURE__ */ jsx30(
10865
+ return /* @__PURE__ */ jsxs26("g", { children: [
10866
+ /* @__PURE__ */ jsx31(
10705
10867
  "line",
10706
10868
  {
10707
10869
  x1: startPoint.x * scale,
@@ -10711,8 +10873,8 @@ var ShapePreview = memo29(function ShapePreview2({
10711
10873
  ...commonProps
10712
10874
  }
10713
10875
  ),
10714
- /* @__PURE__ */ jsx30("line", { x1: endX, y1: endY, x2: arrow1X, y2: arrow1Y, ...commonProps }),
10715
- /* @__PURE__ */ jsx30("line", { x1: endX, y1: endY, x2: arrow2X, y2: arrow2Y, ...commonProps })
10876
+ /* @__PURE__ */ jsx31("line", { x1: endX, y1: endY, x2: arrow1X, y2: arrow1Y, ...commonProps }),
10877
+ /* @__PURE__ */ jsx31("line", { x1: endX, y1: endY, x2: arrow2X, y2: arrow2Y, ...commonProps })
10716
10878
  ] });
10717
10879
  default:
10718
10880
  return null;
@@ -10721,9 +10883,9 @@ var ShapePreview = memo29(function ShapePreview2({
10721
10883
 
10722
10884
  // src/components/Annotations/QuickNoteButton.tsx
10723
10885
  init_utils();
10724
- import { memo as memo30, useCallback as useCallback37, useState as useState25 } from "react";
10725
- import { jsx as jsx31 } from "react/jsx-runtime";
10726
- var QuickNoteButton = memo30(function QuickNoteButton2({
10886
+ import { memo as memo31, useCallback as useCallback37, useState as useState25 } from "react";
10887
+ import { jsx as jsx32 } from "react/jsx-runtime";
10888
+ var QuickNoteButton = memo31(function QuickNoteButton2({
10727
10889
  pageNumber,
10728
10890
  scale,
10729
10891
  position = "top-right",
@@ -10744,7 +10906,7 @@ var QuickNoteButton = memo30(function QuickNoteButton2({
10744
10906
  if (!visible) {
10745
10907
  return null;
10746
10908
  }
10747
- return /* @__PURE__ */ jsx31(
10909
+ return /* @__PURE__ */ jsx32(
10748
10910
  "button",
10749
10911
  {
10750
10912
  onClick: handleClick,
@@ -10766,7 +10928,7 @@ var QuickNoteButton = memo30(function QuickNoteButton2({
10766
10928
  ),
10767
10929
  title: "Add quick note",
10768
10930
  "aria-label": "Add quick note",
10769
- children: /* @__PURE__ */ jsx31(
10931
+ children: /* @__PURE__ */ jsx32(
10770
10932
  "svg",
10771
10933
  {
10772
10934
  className: "w-4 h-4 text-yellow-900",
@@ -10774,7 +10936,7 @@ var QuickNoteButton = memo30(function QuickNoteButton2({
10774
10936
  viewBox: "0 0 24 24",
10775
10937
  stroke: "currentColor",
10776
10938
  strokeWidth: 2,
10777
- children: /* @__PURE__ */ jsx31("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4v16m8-8H4" })
10939
+ children: /* @__PURE__ */ jsx32("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4v16m8-8H4" })
10778
10940
  }
10779
10941
  )
10780
10942
  }
@@ -10783,9 +10945,9 @@ var QuickNoteButton = memo30(function QuickNoteButton2({
10783
10945
 
10784
10946
  // src/components/Annotations/QuickNotePopover.tsx
10785
10947
  init_utils();
10786
- import { memo as memo31, useCallback as useCallback38, useState as useState26, useRef as useRef23, useEffect as useEffect24 } from "react";
10787
- import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
10788
- var QuickNotePopover = memo31(function QuickNotePopover2({
10948
+ import { memo as memo32, useCallback as useCallback38, useState as useState26, useRef as useRef23, useEffect as useEffect24 } from "react";
10949
+ import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
10950
+ var QuickNotePopover = memo32(function QuickNotePopover2({
10789
10951
  visible,
10790
10952
  position,
10791
10953
  initialContent = "",
@@ -10849,7 +11011,7 @@ var QuickNotePopover = memo31(function QuickNotePopover2({
10849
11011
  if (!visible) {
10850
11012
  return null;
10851
11013
  }
10852
- return /* @__PURE__ */ jsxs26(
11014
+ return /* @__PURE__ */ jsxs27(
10853
11015
  "div",
10854
11016
  {
10855
11017
  ref: popoverRef,
@@ -10868,15 +11030,15 @@ var QuickNotePopover = memo31(function QuickNotePopover2({
10868
11030
  top: adjustedPosition.y
10869
11031
  },
10870
11032
  children: [
10871
- agentLastStatement && /* @__PURE__ */ jsx32("div", { className: "mb-2 p-2 bg-blue-50 dark:bg-blue-900/50 rounded text-xs text-blue-600 dark:text-blue-300 border border-blue-100 dark:border-blue-800", children: /* @__PURE__ */ jsxs26("div", { className: "flex items-start gap-1", children: [
10872
- /* @__PURE__ */ jsx32("svg", { className: "w-3 h-3 mt-0.5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx32("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) }),
10873
- /* @__PURE__ */ jsxs26("span", { className: "line-clamp-2", children: [
11033
+ agentLastStatement && /* @__PURE__ */ jsx33("div", { className: "mb-2 p-2 bg-blue-50 dark:bg-blue-900/50 rounded text-xs text-blue-600 dark:text-blue-300 border border-blue-100 dark:border-blue-800", children: /* @__PURE__ */ jsxs27("div", { className: "flex items-start gap-1", children: [
11034
+ /* @__PURE__ */ jsx33("svg", { className: "w-3 h-3 mt-0.5 flex-shrink-0", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx33("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" }) }),
11035
+ /* @__PURE__ */ jsxs27("span", { className: "line-clamp-2", children: [
10874
11036
  "AI discussed: \u201C",
10875
11037
  agentLastStatement,
10876
11038
  "\u201D"
10877
11039
  ] })
10878
11040
  ] }) }),
10879
- /* @__PURE__ */ jsx32(
11041
+ /* @__PURE__ */ jsx33(
10880
11042
  "textarea",
10881
11043
  {
10882
11044
  ref: textareaRef,
@@ -10895,13 +11057,13 @@ var QuickNotePopover = memo31(function QuickNotePopover2({
10895
11057
  )
10896
11058
  }
10897
11059
  ),
10898
- /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between mt-2", children: [
10899
- /* @__PURE__ */ jsxs26("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
11060
+ /* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between mt-2", children: [
11061
+ /* @__PURE__ */ jsxs27("span", { className: "text-xs text-gray-500 dark:text-gray-400", children: [
10900
11062
  navigator.platform.includes("Mac") ? "\u2318" : "Ctrl",
10901
11063
  "+Enter to save"
10902
11064
  ] }),
10903
- /* @__PURE__ */ jsxs26("div", { className: "flex gap-2", children: [
10904
- /* @__PURE__ */ jsx32(
11065
+ /* @__PURE__ */ jsxs27("div", { className: "flex gap-2", children: [
11066
+ /* @__PURE__ */ jsx33(
10905
11067
  "button",
10906
11068
  {
10907
11069
  onClick: onCancel,
@@ -10914,7 +11076,7 @@ var QuickNotePopover = memo31(function QuickNotePopover2({
10914
11076
  children: "Cancel"
10915
11077
  }
10916
11078
  ),
10917
- /* @__PURE__ */ jsx32(
11079
+ /* @__PURE__ */ jsx33(
10918
11080
  "button",
10919
11081
  {
10920
11082
  onClick: handleSave,
@@ -10938,9 +11100,9 @@ var QuickNotePopover = memo31(function QuickNotePopover2({
10938
11100
 
10939
11101
  // src/components/AskAbout/AskAboutOverlay.tsx
10940
11102
  init_utils();
10941
- import { memo as memo32 } from "react";
10942
- import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
10943
- var AskAboutOverlay = memo32(function AskAboutOverlay2({
11103
+ import { memo as memo33 } from "react";
11104
+ import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
11105
+ var AskAboutOverlay = memo33(function AskAboutOverlay2({
10944
11106
  visible,
10945
11107
  progress,
10946
11108
  position,
@@ -10954,7 +11116,7 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
10954
11116
  const radius = (size - strokeWidth) / 2;
10955
11117
  const circumference = 2 * Math.PI * radius;
10956
11118
  const strokeDashoffset = circumference * (1 - progress);
10957
- return /* @__PURE__ */ jsxs27(
11119
+ return /* @__PURE__ */ jsxs28(
10958
11120
  "div",
10959
11121
  {
10960
11122
  className: cn(
@@ -10967,7 +11129,7 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
10967
11129
  top: position.y - size / 2
10968
11130
  },
10969
11131
  children: [
10970
- /* @__PURE__ */ jsxs27(
11132
+ /* @__PURE__ */ jsxs28(
10971
11133
  "svg",
10972
11134
  {
10973
11135
  width: size,
@@ -10975,7 +11137,7 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
10975
11137
  viewBox: `0 0 ${size} ${size}`,
10976
11138
  className: "transform -rotate-90",
10977
11139
  children: [
10978
- /* @__PURE__ */ jsx33(
11140
+ /* @__PURE__ */ jsx34(
10979
11141
  "circle",
10980
11142
  {
10981
11143
  cx: size / 2,
@@ -10986,7 +11148,7 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
10986
11148
  strokeWidth
10987
11149
  }
10988
11150
  ),
10989
- /* @__PURE__ */ jsx33(
11151
+ /* @__PURE__ */ jsx34(
10990
11152
  "circle",
10991
11153
  {
10992
11154
  cx: size / 2,
@@ -11004,12 +11166,12 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
11004
11166
  ]
11005
11167
  }
11006
11168
  ),
11007
- /* @__PURE__ */ jsx33(
11169
+ /* @__PURE__ */ jsx34(
11008
11170
  "div",
11009
11171
  {
11010
11172
  className: "absolute inset-0 flex items-center justify-center",
11011
11173
  style: { color: progress >= 1 ? "#22c55e" : "white" },
11012
- children: progress >= 1 ? /* @__PURE__ */ jsx33(
11174
+ children: progress >= 1 ? /* @__PURE__ */ jsx34(
11013
11175
  "svg",
11014
11176
  {
11015
11177
  width: "24",
@@ -11020,9 +11182,9 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
11020
11182
  strokeWidth: "2",
11021
11183
  strokeLinecap: "round",
11022
11184
  strokeLinejoin: "round",
11023
- children: /* @__PURE__ */ jsx33("polyline", { points: "20 6 9 17 4 12" })
11185
+ children: /* @__PURE__ */ jsx34("polyline", { points: "20 6 9 17 4 12" })
11024
11186
  }
11025
- ) : /* @__PURE__ */ jsxs27(
11187
+ ) : /* @__PURE__ */ jsxs28(
11026
11188
  "svg",
11027
11189
  {
11028
11190
  width: "20",
@@ -11034,9 +11196,9 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
11034
11196
  strokeLinecap: "round",
11035
11197
  strokeLinejoin: "round",
11036
11198
  children: [
11037
- /* @__PURE__ */ jsx33("circle", { cx: "12", cy: "12", r: "10" }),
11038
- /* @__PURE__ */ jsx33("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
11039
- /* @__PURE__ */ jsx33("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
11199
+ /* @__PURE__ */ jsx34("circle", { cx: "12", cy: "12", r: "10" }),
11200
+ /* @__PURE__ */ jsx34("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
11201
+ /* @__PURE__ */ jsx34("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
11040
11202
  ]
11041
11203
  }
11042
11204
  )
@@ -11049,9 +11211,9 @@ var AskAboutOverlay = memo32(function AskAboutOverlay2({
11049
11211
 
11050
11212
  // src/components/AskAbout/AskAboutTrigger.tsx
11051
11213
  init_utils();
11052
- import { memo as memo33, useCallback as useCallback39, useState as useState27, useRef as useRef24, useEffect as useEffect25 } from "react";
11053
- import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
11054
- var AskAboutTrigger = memo33(function AskAboutTrigger2({
11214
+ import { memo as memo34, useCallback as useCallback39, useState as useState27, useRef as useRef24, useEffect as useEffect25 } from "react";
11215
+ import { jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
11216
+ var AskAboutTrigger = memo34(function AskAboutTrigger2({
11055
11217
  position,
11056
11218
  onConfirm,
11057
11219
  onCancel,
@@ -11099,7 +11261,7 @@ var AskAboutTrigger = memo33(function AskAboutTrigger2({
11099
11261
  if (!visible) {
11100
11262
  return null;
11101
11263
  }
11102
- return /* @__PURE__ */ jsxs28(
11264
+ return /* @__PURE__ */ jsxs29(
11103
11265
  "div",
11104
11266
  {
11105
11267
  ref: triggerRef,
@@ -11118,8 +11280,8 @@ var AskAboutTrigger = memo33(function AskAboutTrigger2({
11118
11280
  transform: "translate(-50%, 0)"
11119
11281
  },
11120
11282
  children: [
11121
- /* @__PURE__ */ jsx34("span", { className: "text-sm text-gray-600 dark:text-gray-300 px-2", children: "Ask about this?" }),
11122
- /* @__PURE__ */ jsx34(
11283
+ /* @__PURE__ */ jsx35("span", { className: "text-sm text-gray-600 dark:text-gray-300 px-2", children: "Ask about this?" }),
11284
+ /* @__PURE__ */ jsx35(
11123
11285
  "button",
11124
11286
  {
11125
11287
  onClick: handleConfirm,
@@ -11132,7 +11294,7 @@ var AskAboutTrigger = memo33(function AskAboutTrigger2({
11132
11294
  children: "Ask"
11133
11295
  }
11134
11296
  ),
11135
- /* @__PURE__ */ jsx34(
11297
+ /* @__PURE__ */ jsx35(
11136
11298
  "button",
11137
11299
  {
11138
11300
  onClick: handleCancel,
@@ -11154,9 +11316,9 @@ var AskAboutTrigger = memo33(function AskAboutTrigger2({
11154
11316
  // src/components/Minimap/Minimap.tsx
11155
11317
  init_hooks();
11156
11318
  init_utils();
11157
- import { memo as memo34, useMemo as useMemo14, useCallback as useCallback40 } from "react";
11158
- import { Fragment as Fragment3, jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
11159
- var PageIndicator = memo34(function PageIndicator2({
11319
+ import { memo as memo35, useMemo as useMemo14, useCallback as useCallback40 } from "react";
11320
+ import { Fragment as Fragment3, jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
11321
+ var PageIndicator = memo35(function PageIndicator2({
11160
11322
  pageNumber,
11161
11323
  status,
11162
11324
  isBookmarked,
@@ -11170,7 +11332,7 @@ var PageIndicator = memo34(function PageIndicator2({
11170
11332
  if (status === "visited") return "bg-green-400";
11171
11333
  return "bg-gray-200 dark:bg-gray-700";
11172
11334
  };
11173
- return /* @__PURE__ */ jsxs29(
11335
+ return /* @__PURE__ */ jsxs30(
11174
11336
  "button",
11175
11337
  {
11176
11338
  onClick,
@@ -11186,13 +11348,13 @@ var PageIndicator = memo34(function PageIndicator2({
11186
11348
  title: `Page ${pageNumber}${isBookmarked ? " (bookmarked)" : ""}`,
11187
11349
  "aria-label": `Go to page ${pageNumber}`,
11188
11350
  children: [
11189
- isBookmarked && !compact && /* @__PURE__ */ jsx35("div", { className: "absolute -top-1 -right-1 w-2 h-2 bg-yellow-500 rounded-full border border-white" }),
11190
- showNumber && !compact && /* @__PURE__ */ jsx35("span", { className: "absolute inset-0 flex items-center justify-center text-[8px] font-medium text-white", children: pageNumber })
11351
+ isBookmarked && !compact && /* @__PURE__ */ jsx36("div", { className: "absolute -top-1 -right-1 w-2 h-2 bg-yellow-500 rounded-full border border-white" }),
11352
+ showNumber && !compact && /* @__PURE__ */ jsx36("span", { className: "absolute inset-0 flex items-center justify-center text-[8px] font-medium text-white", children: pageNumber })
11191
11353
  ]
11192
11354
  }
11193
11355
  );
11194
11356
  });
11195
- var Minimap = memo34(function Minimap2({
11357
+ var Minimap = memo35(function Minimap2({
11196
11358
  variant = "sidebar",
11197
11359
  floatingPosition = "right",
11198
11360
  maxHeight = 300,
@@ -11229,7 +11391,7 @@ var Minimap = memo34(function Minimap2({
11229
11391
  const pages = [];
11230
11392
  for (let i = 1; i <= numPages; i++) {
11231
11393
  pages.push(
11232
- /* @__PURE__ */ jsx35(
11394
+ /* @__PURE__ */ jsx36(
11233
11395
  PageIndicator,
11234
11396
  {
11235
11397
  pageNumber: i,
@@ -11250,16 +11412,16 @@ var Minimap = memo34(function Minimap2({
11250
11412
  if (numPages === 0) {
11251
11413
  return null;
11252
11414
  }
11253
- const content = /* @__PURE__ */ jsxs29(Fragment3, { children: [
11254
- /* @__PURE__ */ jsxs29("div", { className: "mb-3", children: [
11255
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center justify-between text-xs text-gray-500 dark:text-gray-400 mb-1", children: [
11256
- /* @__PURE__ */ jsx35("span", { children: "Progress" }),
11257
- /* @__PURE__ */ jsxs29("span", { children: [
11415
+ const content = /* @__PURE__ */ jsxs30(Fragment3, { children: [
11416
+ /* @__PURE__ */ jsxs30("div", { className: "mb-3", children: [
11417
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between text-xs text-gray-500 dark:text-gray-400 mb-1", children: [
11418
+ /* @__PURE__ */ jsx36("span", { children: "Progress" }),
11419
+ /* @__PURE__ */ jsxs30("span", { children: [
11258
11420
  progressPercentage,
11259
11421
  "%"
11260
11422
  ] })
11261
11423
  ] }),
11262
- /* @__PURE__ */ jsx35("div", { className: "h-1.5 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden", children: /* @__PURE__ */ jsx35(
11424
+ /* @__PURE__ */ jsx36("div", { className: "h-1.5 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden", children: /* @__PURE__ */ jsx36(
11263
11425
  "div",
11264
11426
  {
11265
11427
  className: "h-full bg-green-500 rounded-full transition-all duration-300",
@@ -11267,7 +11429,7 @@ var Minimap = memo34(function Minimap2({
11267
11429
  }
11268
11430
  ) })
11269
11431
  ] }),
11270
- /* @__PURE__ */ jsx35(
11432
+ /* @__PURE__ */ jsx36(
11271
11433
  "div",
11272
11434
  {
11273
11435
  className: cn(
@@ -11278,21 +11440,21 @@ var Minimap = memo34(function Minimap2({
11278
11440
  children: pageIndicators
11279
11441
  }
11280
11442
  ),
11281
- /* @__PURE__ */ jsx35("div", { className: "mt-3 pt-2 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-wrap gap-3 text-xs text-gray-500 dark:text-gray-400", children: [
11282
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1", children: [
11283
- /* @__PURE__ */ jsx35("div", { className: "w-2 h-2 rounded-sm bg-blue-500" }),
11284
- /* @__PURE__ */ jsx35("span", { children: "Current" })
11443
+ /* @__PURE__ */ jsx36("div", { className: "mt-3 pt-2 border-t border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsxs30("div", { className: "flex flex-wrap gap-3 text-xs text-gray-500 dark:text-gray-400", children: [
11444
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1", children: [
11445
+ /* @__PURE__ */ jsx36("div", { className: "w-2 h-2 rounded-sm bg-blue-500" }),
11446
+ /* @__PURE__ */ jsx36("span", { children: "Current" })
11285
11447
  ] }),
11286
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1", children: [
11287
- /* @__PURE__ */ jsx35("div", { className: "w-2 h-2 rounded-sm bg-green-400" }),
11288
- /* @__PURE__ */ jsx35("span", { children: "Visited" })
11448
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1", children: [
11449
+ /* @__PURE__ */ jsx36("div", { className: "w-2 h-2 rounded-sm bg-green-400" }),
11450
+ /* @__PURE__ */ jsx36("span", { children: "Visited" })
11289
11451
  ] }),
11290
- /* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1", children: [
11291
- /* @__PURE__ */ jsx35("div", { className: "w-2 h-2 rounded-sm bg-yellow-400" }),
11292
- /* @__PURE__ */ jsx35("span", { children: "Bookmarked" })
11452
+ /* @__PURE__ */ jsxs30("div", { className: "flex items-center gap-1", children: [
11453
+ /* @__PURE__ */ jsx36("div", { className: "w-2 h-2 rounded-sm bg-yellow-400" }),
11454
+ /* @__PURE__ */ jsx36("span", { children: "Bookmarked" })
11293
11455
  ] })
11294
11456
  ] }) }),
11295
- /* @__PURE__ */ jsxs29("div", { className: "mt-2 text-xs text-gray-500 dark:text-gray-400", children: [
11457
+ /* @__PURE__ */ jsxs30("div", { className: "mt-2 text-xs text-gray-500 dark:text-gray-400", children: [
11296
11458
  visitedCount,
11297
11459
  " of ",
11298
11460
  numPages,
@@ -11300,7 +11462,7 @@ var Minimap = memo34(function Minimap2({
11300
11462
  ] })
11301
11463
  ] });
11302
11464
  if (variant === "floating") {
11303
- return /* @__PURE__ */ jsxs29(
11465
+ return /* @__PURE__ */ jsxs30(
11304
11466
  "div",
11305
11467
  {
11306
11468
  className: cn(
@@ -11316,13 +11478,13 @@ var Minimap = memo34(function Minimap2({
11316
11478
  ),
11317
11479
  style: { maxHeight },
11318
11480
  children: [
11319
- /* @__PURE__ */ jsx35("h3", { className: "text-sm font-semibold text-gray-700 dark:text-gray-200 mb-2", children: "Reading Progress" }),
11481
+ /* @__PURE__ */ jsx36("h3", { className: "text-sm font-semibold text-gray-700 dark:text-gray-200 mb-2", children: "Reading Progress" }),
11320
11482
  content
11321
11483
  ]
11322
11484
  }
11323
11485
  );
11324
11486
  }
11325
- return /* @__PURE__ */ jsx35(
11487
+ return /* @__PURE__ */ jsx36(
11326
11488
  "div",
11327
11489
  {
11328
11490
  className: cn(
@@ -11342,11 +11504,11 @@ init_FloatingZoomControls2();
11342
11504
  // src/components/PDFThumbnailNav/PDFThumbnailNav.tsx
11343
11505
  init_hooks();
11344
11506
  init_utils();
11345
- import { memo as memo35, useEffect as useEffect26, useState as useState28, useRef as useRef25, useCallback as useCallback41 } from "react";
11346
- import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
11507
+ import { memo as memo36, useEffect as useEffect26, useState as useState28, useRef as useRef25, useCallback as useCallback41 } from "react";
11508
+ import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
11347
11509
  var DEFAULT_WIDTH = 612;
11348
11510
  var DEFAULT_HEIGHT = 792;
11349
- var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11511
+ var PDFThumbnailNav = memo36(function PDFThumbnailNav2({
11350
11512
  thumbnailScale = 0.15,
11351
11513
  orientation = "vertical",
11352
11514
  maxVisible = 10,
@@ -11458,7 +11620,7 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11458
11620
  viewerStore.getState().requestScrollToPage(pageNum, "smooth");
11459
11621
  }, [onThumbnailClick, viewerStore]);
11460
11622
  if (!document2 || numPages === 0) {
11461
- return /* @__PURE__ */ jsx36(
11623
+ return /* @__PURE__ */ jsx37(
11462
11624
  "div",
11463
11625
  {
11464
11626
  className: cn(
@@ -11479,7 +11641,7 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11479
11641
  }
11480
11642
  const isHorizontal = orientation === "horizontal";
11481
11643
  const totalSize = numPages * ((isHorizontal ? thumbnailWidth : thumbnailHeight) + gap) - gap;
11482
- return /* @__PURE__ */ jsx36(
11644
+ return /* @__PURE__ */ jsx37(
11483
11645
  "div",
11484
11646
  {
11485
11647
  ref: containerRef,
@@ -11493,7 +11655,7 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11493
11655
  style: {
11494
11656
  ...isHorizontal ? { overflowX: "auto", overflowY: "hidden" } : { overflowX: "hidden", overflowY: "auto" }
11495
11657
  },
11496
- children: /* @__PURE__ */ jsx36(
11658
+ children: /* @__PURE__ */ jsx37(
11497
11659
  "div",
11498
11660
  {
11499
11661
  className: cn(
@@ -11510,7 +11672,7 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11510
11672
  const thumbnail = thumbnails.get(pageNum);
11511
11673
  const isActive = pageNum === currentPage;
11512
11674
  const isVisible = pageNum >= visibleRange.start && pageNum <= visibleRange.end;
11513
- return /* @__PURE__ */ jsxs30(
11675
+ return /* @__PURE__ */ jsxs31(
11514
11676
  "div",
11515
11677
  {
11516
11678
  className: cn(
@@ -11535,7 +11697,7 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11535
11697
  }
11536
11698
  },
11537
11699
  children: [
11538
- /* @__PURE__ */ jsx36(
11700
+ /* @__PURE__ */ jsx37(
11539
11701
  "div",
11540
11702
  {
11541
11703
  className: "relative bg-white dark:bg-gray-700",
@@ -11543,7 +11705,7 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11543
11705
  width: thumbnailWidth,
11544
11706
  height: thumbnailHeight
11545
11707
  },
11546
- children: isVisible && thumbnail?.canvas ? /* @__PURE__ */ jsx36(
11708
+ children: isVisible && thumbnail?.canvas ? /* @__PURE__ */ jsx37(
11547
11709
  "img",
11548
11710
  {
11549
11711
  src: thumbnail.canvas.toDataURL(),
@@ -11551,10 +11713,10 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11551
11713
  className: "w-full h-full object-contain",
11552
11714
  loading: "lazy"
11553
11715
  }
11554
- ) : /* @__PURE__ */ jsx36("div", { className: "absolute inset-0 flex items-center justify-center text-gray-400 dark:text-gray-500 text-xs", children: pageNum })
11716
+ ) : /* @__PURE__ */ jsx37("div", { className: "absolute inset-0 flex items-center justify-center text-gray-400 dark:text-gray-500 text-xs", children: pageNum })
11555
11717
  }
11556
11718
  ),
11557
- showPageNumbers && /* @__PURE__ */ jsx36(
11719
+ showPageNumbers && /* @__PURE__ */ jsx37(
11558
11720
  "div",
11559
11721
  {
11560
11722
  className: cn(
@@ -11579,7 +11741,7 @@ var PDFThumbnailNav = memo35(function PDFThumbnailNav2({
11579
11741
  // src/components/ErrorBoundary/PDFErrorBoundary.tsx
11580
11742
  init_utils();
11581
11743
  import { Component } from "react";
11582
- import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
11744
+ import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
11583
11745
  var PDFErrorBoundary = class extends Component {
11584
11746
  constructor(props) {
11585
11747
  super(props);
@@ -11607,7 +11769,7 @@ var PDFErrorBoundary = class extends Component {
11607
11769
  return fallback;
11608
11770
  }
11609
11771
  if (showDefaultUI) {
11610
- return /* @__PURE__ */ jsx37(
11772
+ return /* @__PURE__ */ jsx38(
11611
11773
  DefaultErrorUI,
11612
11774
  {
11613
11775
  error,
@@ -11626,7 +11788,7 @@ function DefaultErrorUI({ error, onReset, className }) {
11626
11788
  const isNetworkError = error.message.includes("fetch") || error.message.includes("network") || error.message.includes("Failed to load");
11627
11789
  let title = "Something went wrong";
11628
11790
  let description = error.message;
11629
- let icon = /* @__PURE__ */ jsx37("svg", { className: "w-12 h-12 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx37(
11791
+ let icon = /* @__PURE__ */ jsx38("svg", { className: "w-12 h-12 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx38(
11630
11792
  "path",
11631
11793
  {
11632
11794
  strokeLinecap: "round",
@@ -11638,7 +11800,7 @@ function DefaultErrorUI({ error, onReset, className }) {
11638
11800
  if (isPDFError) {
11639
11801
  title = "Unable to load PDF";
11640
11802
  description = "The PDF file could not be loaded. It may be corrupted or in an unsupported format.";
11641
- icon = /* @__PURE__ */ jsx37("svg", { className: "w-12 h-12 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx37(
11803
+ icon = /* @__PURE__ */ jsx38("svg", { className: "w-12 h-12 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx38(
11642
11804
  "path",
11643
11805
  {
11644
11806
  strokeLinecap: "round",
@@ -11650,7 +11812,7 @@ function DefaultErrorUI({ error, onReset, className }) {
11650
11812
  } else if (isNetworkError) {
11651
11813
  title = "Network error";
11652
11814
  description = "Unable to fetch the PDF file. Please check your internet connection and try again.";
11653
- icon = /* @__PURE__ */ jsx37("svg", { className: "w-12 h-12 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx37(
11815
+ icon = /* @__PURE__ */ jsx38("svg", { className: "w-12 h-12 text-red-500", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx38(
11654
11816
  "path",
11655
11817
  {
11656
11818
  strokeLinecap: "round",
@@ -11660,7 +11822,7 @@ function DefaultErrorUI({ error, onReset, className }) {
11660
11822
  }
11661
11823
  ) });
11662
11824
  }
11663
- return /* @__PURE__ */ jsxs31(
11825
+ return /* @__PURE__ */ jsxs32(
11664
11826
  "div",
11665
11827
  {
11666
11828
  className: cn(
@@ -11673,14 +11835,14 @@ function DefaultErrorUI({ error, onReset, className }) {
11673
11835
  ),
11674
11836
  children: [
11675
11837
  icon,
11676
- /* @__PURE__ */ jsx37("h2", { className: "mt-4 text-xl font-semibold text-gray-900 dark:text-gray-100", children: title }),
11677
- /* @__PURE__ */ jsx37("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400 max-w-md", children: description }),
11678
- /* @__PURE__ */ jsxs31("details", { className: "mt-4 text-left max-w-md w-full", children: [
11679
- /* @__PURE__ */ jsx37("summary", { className: "cursor-pointer text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200", children: "Technical details" }),
11680
- /* @__PURE__ */ jsx37("pre", { className: "mt-2 p-2 bg-gray-100 dark:bg-gray-800 rounded text-xs overflow-auto", children: error.stack || error.message })
11838
+ /* @__PURE__ */ jsx38("h2", { className: "mt-4 text-xl font-semibold text-gray-900 dark:text-gray-100", children: title }),
11839
+ /* @__PURE__ */ jsx38("p", { className: "mt-2 text-sm text-gray-600 dark:text-gray-400 max-w-md", children: description }),
11840
+ /* @__PURE__ */ jsxs32("details", { className: "mt-4 text-left max-w-md w-full", children: [
11841
+ /* @__PURE__ */ jsx38("summary", { className: "cursor-pointer text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200", children: "Technical details" }),
11842
+ /* @__PURE__ */ jsx38("pre", { className: "mt-2 p-2 bg-gray-100 dark:bg-gray-800 rounded text-xs overflow-auto", children: error.stack || error.message })
11681
11843
  ] }),
11682
- /* @__PURE__ */ jsxs31("div", { className: "mt-6 flex gap-3", children: [
11683
- /* @__PURE__ */ jsx37(
11844
+ /* @__PURE__ */ jsxs32("div", { className: "mt-6 flex gap-3", children: [
11845
+ /* @__PURE__ */ jsx38(
11684
11846
  "button",
11685
11847
  {
11686
11848
  onClick: onReset,
@@ -11694,7 +11856,7 @@ function DefaultErrorUI({ error, onReset, className }) {
11694
11856
  children: "Try again"
11695
11857
  }
11696
11858
  ),
11697
- /* @__PURE__ */ jsx37(
11859
+ /* @__PURE__ */ jsx38(
11698
11860
  "button",
11699
11861
  {
11700
11862
  onClick: () => window.location.reload(),
@@ -11714,9 +11876,12 @@ function DefaultErrorUI({ error, onReset, className }) {
11714
11876
  );
11715
11877
  }
11716
11878
  function withErrorBoundary({ component, ...props }) {
11717
- return /* @__PURE__ */ jsx37(PDFErrorBoundary, { ...props, children: component });
11879
+ return /* @__PURE__ */ jsx38(PDFErrorBoundary, { ...props, children: component });
11718
11880
  }
11719
11881
 
11882
+ // src/components/index.ts
11883
+ init_PDFLoadingScreen2();
11884
+
11720
11885
  // src/index.ts
11721
11886
  init_hooks();
11722
11887
  init_store();
@@ -11747,6 +11912,7 @@ export {
11747
11912
  MobileToolbar,
11748
11913
  OutlinePanel,
11749
11914
  PDFErrorBoundary,
11915
+ PDFLoadingScreen,
11750
11916
  PDFPage,
11751
11917
  PDFThumbnailNav,
11752
11918
  PDFViewer,