pptx-react-viewer 1.13.1 → 1.14.1

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 (108) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{Model3DScene-C5O6LDSN.js → Model3DScene-E2FDY2TX.js} +3 -3
  3. package/dist/Model3DScene-E2FDY2TX.js.br +0 -0
  4. package/dist/Model3DScene-E2FDY2TX.js.gz +0 -0
  5. package/dist/{Model3DScene-SGFNVFB2.mjs → Model3DScene-JUJB4MJX.mjs} +2 -2
  6. package/dist/{Model3DScene-SGFNVFB2.mjs.br → Model3DScene-JUJB4MJX.mjs.br} +0 -0
  7. package/dist/Model3DScene-JUJB4MJX.mjs.gz +0 -0
  8. package/dist/{PowerPointViewer-C2a7iXAK.d.ts → PowerPointViewer-BsaUH3ZT.d.ts} +3 -3
  9. package/dist/{PowerPointViewer-BzsjqMzg.d.mts → PowerPointViewer-Nxku67uL.d.mts} +3 -3
  10. package/dist/{SurfaceChart3DScene-CDWIMU7C.mjs → SurfaceChart3DScene-2DEB7NMW.mjs} +2 -2
  11. package/dist/SurfaceChart3DScene-2DEB7NMW.mjs.br +0 -0
  12. package/dist/SurfaceChart3DScene-2DEB7NMW.mjs.gz +0 -0
  13. package/dist/{SurfaceChart3DScene-NWZ2GCPS.js → SurfaceChart3DScene-Z64TSGR5.js} +3 -3
  14. package/dist/SurfaceChart3DScene-Z64TSGR5.js.br +0 -0
  15. package/dist/SurfaceChart3DScene-Z64TSGR5.js.gz +0 -0
  16. package/dist/{chunk-LARZRLKB.js → chunk-6CNJINIT.js} +322 -27
  17. package/dist/chunk-6CNJINIT.js.br +0 -0
  18. package/dist/chunk-6CNJINIT.js.gz +0 -0
  19. package/dist/{chunk-AMFNG44P.js → chunk-CHG7GPGB.js} +471 -626
  20. package/dist/chunk-CHG7GPGB.js.br +0 -0
  21. package/dist/chunk-CHG7GPGB.js.gz +0 -0
  22. package/dist/{chunk-ASB757HI.mjs → chunk-CZOMQPLZ.mjs} +65 -220
  23. package/dist/chunk-CZOMQPLZ.mjs.br +0 -0
  24. package/dist/chunk-CZOMQPLZ.mjs.gz +0 -0
  25. package/dist/{chunk-4ZYUPWYP.mjs → chunk-MAXS6AU7.mjs} +38 -18
  26. package/dist/chunk-MAXS6AU7.mjs.br +0 -0
  27. package/dist/chunk-MAXS6AU7.mjs.gz +0 -0
  28. package/dist/{chunk-S52XBUDM.js → chunk-OBLHB72P.js} +10 -0
  29. package/dist/chunk-OBLHB72P.js.br +0 -0
  30. package/dist/{chunk-S52XBUDM.js.gz → chunk-OBLHB72P.js.gz} +0 -0
  31. package/dist/{chunk-XBOHG5BO.mjs → chunk-QFRXMAFR.mjs} +10 -0
  32. package/dist/chunk-QFRXMAFR.mjs.br +0 -0
  33. package/dist/{chunk-XBOHG5BO.mjs.gz → chunk-QFRXMAFR.mjs.gz} +0 -0
  34. package/dist/{chunk-3VVUDMB7.js → chunk-RXIGJGJN.js} +856 -836
  35. package/dist/chunk-RXIGJGJN.js.br +0 -0
  36. package/dist/chunk-RXIGJGJN.js.gz +0 -0
  37. package/dist/{chunk-KULOGKNE.mjs → chunk-ZK4SPHDQ.mjs} +291 -3
  38. package/dist/chunk-ZK4SPHDQ.mjs.br +0 -0
  39. package/dist/chunk-ZK4SPHDQ.mjs.gz +0 -0
  40. package/dist/{dist-JVXXDMU7.mjs → dist-D5LQ7PW7.mjs} +1 -1
  41. package/dist/dist-D5LQ7PW7.mjs.br +0 -0
  42. package/dist/dist-D5LQ7PW7.mjs.gz +0 -0
  43. package/dist/{dist-TRWOWXDT.js → dist-MVSQ6PWP.js} +505 -505
  44. package/dist/dist-MVSQ6PWP.js.br +0 -0
  45. package/dist/dist-MVSQ6PWP.js.gz +0 -0
  46. package/dist/hooks-unstable.d.mts +127 -121
  47. package/dist/hooks-unstable.d.ts +127 -121
  48. package/dist/hooks-unstable.js +74 -74
  49. package/dist/hooks-unstable.js.br +0 -0
  50. package/dist/hooks-unstable.js.gz +0 -0
  51. package/dist/hooks-unstable.mjs +3 -3
  52. package/dist/hooks-unstable.mjs.br +0 -0
  53. package/dist/hooks-unstable.mjs.gz +0 -0
  54. package/dist/index.d.mts +3 -3
  55. package/dist/index.d.ts +3 -3
  56. package/dist/index.js +18 -18
  57. package/dist/index.js.br +0 -0
  58. package/dist/index.js.gz +0 -0
  59. package/dist/index.mjs +4 -4
  60. package/dist/index.mjs.br +0 -0
  61. package/dist/index.mjs.gz +0 -0
  62. package/dist/pptx-viewer.css +2 -2
  63. package/dist/pptx-viewer.css.br +0 -0
  64. package/dist/pptx-viewer.css.gz +0 -0
  65. package/dist/{types-ui-DlsqFx7_.d.mts → types-ui-NG29h55h.d.mts} +31 -20
  66. package/dist/{types-ui-DlsqFx7_.d.ts → types-ui-NG29h55h.d.ts} +31 -20
  67. package/dist/{usePresenterWindow-BKx5DLJy.d.ts → usePresenterWindow-DToCijGy.d.ts} +44 -44
  68. package/dist/{usePresenterWindow-BQwzr87T.d.mts → usePresenterWindow-DeTm-unp.d.mts} +44 -44
  69. package/dist/viewer/index.d.mts +6 -6
  70. package/dist/viewer/index.d.ts +6 -6
  71. package/dist/viewer/index.js +19 -19
  72. package/dist/viewer/index.js.br +0 -0
  73. package/dist/viewer/index.js.gz +0 -0
  74. package/dist/viewer/index.mjs +4 -4
  75. package/dist/viewer/index.mjs.br +0 -0
  76. package/dist/viewer/index.mjs.gz +0 -0
  77. package/dist/y-webrtc-6CRYHAXH.mjs +2 -2
  78. package/dist/y-webrtc-6CRYHAXH.mjs.br +0 -0
  79. package/dist/y-webrtc-6CRYHAXH.mjs.gz +0 -0
  80. package/dist/y-webrtc-QCZF75JW.js +2 -2
  81. package/dist/y-webrtc-QCZF75JW.js.br +0 -0
  82. package/dist/y-webrtc-QCZF75JW.js.gz +0 -0
  83. package/package.json +1 -1
  84. package/dist/Model3DScene-C5O6LDSN.js.br +0 -0
  85. package/dist/Model3DScene-C5O6LDSN.js.gz +0 -0
  86. package/dist/Model3DScene-SGFNVFB2.mjs.gz +0 -0
  87. package/dist/SurfaceChart3DScene-CDWIMU7C.mjs.br +0 -0
  88. package/dist/SurfaceChart3DScene-CDWIMU7C.mjs.gz +0 -0
  89. package/dist/SurfaceChart3DScene-NWZ2GCPS.js.br +0 -0
  90. package/dist/SurfaceChart3DScene-NWZ2GCPS.js.gz +0 -0
  91. package/dist/chunk-3VVUDMB7.js.br +0 -0
  92. package/dist/chunk-3VVUDMB7.js.gz +0 -0
  93. package/dist/chunk-4ZYUPWYP.mjs.br +0 -0
  94. package/dist/chunk-4ZYUPWYP.mjs.gz +0 -0
  95. package/dist/chunk-AMFNG44P.js.br +0 -0
  96. package/dist/chunk-AMFNG44P.js.gz +0 -0
  97. package/dist/chunk-ASB757HI.mjs.br +0 -0
  98. package/dist/chunk-ASB757HI.mjs.gz +0 -0
  99. package/dist/chunk-KULOGKNE.mjs.br +0 -0
  100. package/dist/chunk-KULOGKNE.mjs.gz +0 -0
  101. package/dist/chunk-LARZRLKB.js.br +0 -0
  102. package/dist/chunk-LARZRLKB.js.gz +0 -0
  103. package/dist/chunk-S52XBUDM.js.br +0 -0
  104. package/dist/chunk-XBOHG5BO.mjs.br +0 -0
  105. package/dist/dist-JVXXDMU7.mjs.br +0 -0
  106. package/dist/dist-JVXXDMU7.mjs.gz +0 -0
  107. package/dist/dist-TRWOWXDT.js.br +0 -0
  108. package/dist/dist-TRWOWXDT.js.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkLARZRLKB_js = require('./chunk-LARZRLKB.js');
3
+ var chunk6CNJINIT_js = require('./chunk-6CNJINIT.js');
4
4
  var chunkK74UOJ6P_js = require('./chunk-K74UOJ6P.js');
5
- var chunkS52XBUDM_js = require('./chunk-S52XBUDM.js');
5
+ var chunkOBLHB72P_js = require('./chunk-OBLHB72P.js');
6
6
  var React3 = require('react');
7
7
  var lu = require('react-icons/lu');
8
8
  var clsx = require('clsx');
@@ -20,7 +20,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
20
20
 
21
21
  // src/viewer/utils/clone.ts
22
22
  function cloneHistorySnapshot2(snapshot) {
23
- return chunkLARZRLKB_js.cloneHistorySnapshot(snapshot);
23
+ return chunk6CNJINIT_js.cloneHistorySnapshot(snapshot);
24
24
  }
25
25
 
26
26
  // src/viewer/hooks/useEditorHistory.ts
@@ -68,8 +68,8 @@ function useEditorHistory(input) {
68
68
  width: canvasSize.width,
69
69
  height: canvasSize.height,
70
70
  activeSlideIndex,
71
- slides: slides.map(chunkLARZRLKB_js.cloneSlide),
72
- templateElementsBySlideId: chunkLARZRLKB_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
71
+ slides: slides.map(chunk6CNJINIT_js.cloneSlide),
72
+ templateElementsBySlideId: chunk6CNJINIT_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
73
73
  ...actionLabel ? { actionLabel } : {}
74
74
  };
75
75
  },
@@ -82,9 +82,9 @@ function useEditorHistory(input) {
82
82
  width: snapshot.width,
83
83
  height: snapshot.height
84
84
  });
85
- setSlides(snapshot.slides.map(chunkLARZRLKB_js.cloneSlide));
85
+ setSlides(snapshot.slides.map(chunk6CNJINIT_js.cloneSlide));
86
86
  setTemplateElementsBySlideId(
87
- chunkLARZRLKB_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
87
+ chunk6CNJINIT_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
88
88
  );
89
89
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
90
90
  setSelectedElementIds([]);
@@ -337,189 +337,26 @@ var ANIMATION_PRESET_OPTIONS = [
337
337
  { value: "growShrink", label: "Grow/Shrink", i18nKey: "pptx.animation.preset.growShrink" },
338
338
  { value: "teeter", label: "Teeter", i18nKey: "pptx.animation.preset.teeter" }
339
339
  ];
340
- var icon = (component, className) => React3__default.default.createElement(component, { className });
341
- var SHAPE_PRESETS = [
342
- {
343
- type: "rect",
344
- label: "Rectangle",
345
- i18nKey: "pptx.editorToolbar.shapeRectangle",
346
- icon: icon(lu.LuSquare, "w-3.5 h-3.5")
347
- },
348
- {
349
- type: "roundRect",
350
- label: "Rounded",
351
- i18nKey: "pptx.shapePresets.rounded",
352
- icon: icon(lu.LuSquare, "w-3.5 h-3.5")
353
- },
354
- {
355
- type: "ellipse",
356
- label: "Circle",
357
- i18nKey: "pptx.shapePresets.circle",
358
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
359
- },
360
- {
361
- type: "cylinder",
362
- label: "Cylinder",
363
- i18nKey: "pptx.shapePresets.cylinder",
364
- icon: icon(lu.LuDatabase, "w-3.5 h-3.5")
365
- },
366
- {
367
- type: "rtArrow",
368
- label: "Right Arrow",
369
- i18nKey: "pptx.shapePresets.rightArrow",
370
- icon: icon(lu.LuMoveRight, "w-3.5 h-3.5")
371
- },
372
- {
373
- type: "leftArrow",
374
- label: "Left Arrow",
375
- i18nKey: "pptx.shapePresets.leftArrow",
376
- icon: icon(lu.LuMoveRight, "w-3.5 h-3.5 rotate-180")
377
- },
378
- {
379
- type: "upArrow",
380
- label: "Up Arrow",
381
- i18nKey: "pptx.shapePresets.upArrow",
382
- icon: icon(lu.LuMoveRight, "w-3.5 h-3.5 -rotate-90")
383
- },
384
- {
385
- type: "downArrow",
386
- label: "Down Arrow",
387
- i18nKey: "pptx.shapePresets.downArrow",
388
- icon: icon(lu.LuMoveRight, "w-3.5 h-3.5 rotate-90")
389
- },
390
- {
391
- type: "triangle",
392
- label: "Triangle",
393
- i18nKey: "pptx.editorToolbar.shapeTriangle",
394
- icon: icon(lu.LuTriangle, "w-3.5 h-3.5")
395
- },
396
- {
397
- type: "rtTriangle",
398
- label: "Right Triangle",
399
- i18nKey: "pptx.shapePresets.rightTriangle",
400
- icon: icon(lu.LuTriangle, "w-3.5 h-3.5 rotate-90")
401
- },
402
- {
403
- type: "diamond",
404
- label: "Diamond",
405
- i18nKey: "pptx.shapePresets.diamond",
406
- icon: icon(lu.LuDiamond, "w-3.5 h-3.5")
407
- },
408
- {
409
- type: "parallelogram",
410
- label: "Parallelogram",
411
- i18nKey: "pptx.shapePresets.parallelogram",
412
- icon: icon(lu.LuSquare, "w-3.5 h-3.5 -skew-x-12")
413
- },
414
- {
415
- type: "trapezoid",
416
- label: "Trapezoid",
417
- i18nKey: "pptx.shapePresets.trapezoid",
418
- icon: icon(lu.LuSquare, "w-3.5 h-3.5")
419
- },
420
- {
421
- type: "pentagon",
422
- label: "Pentagon",
423
- i18nKey: "pptx.shapePresets.pentagon",
424
- icon: icon(lu.LuDiamond, "w-3.5 h-3.5")
425
- },
426
- {
427
- type: "hexagon",
428
- label: "Hexagon",
429
- i18nKey: "pptx.shapePresets.hexagon",
430
- icon: icon(lu.LuDiamond, "w-3.5 h-3.5")
431
- },
432
- {
433
- type: "octagon",
434
- label: "Octagon",
435
- i18nKey: "pptx.shapePresets.octagon",
436
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
437
- },
438
- {
439
- type: "chevron",
440
- label: "Chevron",
441
- i18nKey: "pptx.shapePresets.chevron",
442
- icon: icon(lu.LuMoveRight, "w-3.5 h-3.5")
443
- },
444
- {
445
- type: "star5",
446
- label: "Star",
447
- i18nKey: "pptx.shapePresets.star",
448
- icon: icon(lu.LuDiamond, "w-3.5 h-3.5 rotate-45")
449
- },
450
- {
451
- type: "star6",
452
- label: "Star 6",
453
- i18nKey: "pptx.shapePresets.star6",
454
- icon: icon(lu.LuDiamond, "w-3.5 h-3.5")
455
- },
456
- {
457
- type: "star8",
458
- label: "Star 8",
459
- i18nKey: "pptx.shapePresets.star8",
460
- icon: icon(lu.LuDiamond, "w-3.5 h-3.5 rotate-45")
461
- },
462
- {
463
- type: "plus",
464
- label: "Plus",
465
- i18nKey: "pptx.shapePresets.plus",
466
- icon: icon(lu.LuPlus, "w-3.5 h-3.5")
467
- },
468
- {
469
- type: "heart",
470
- label: "Heart",
471
- i18nKey: "pptx.shapePresets.heart",
472
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
473
- },
474
- {
475
- type: "cloud",
476
- label: "Cloud",
477
- i18nKey: "pptx.shapePresets.cloud",
478
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
479
- },
480
- {
481
- type: "sun",
482
- label: "Sun",
483
- i18nKey: "pptx.shapePresets.sun",
484
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
485
- },
486
- {
487
- type: "moon",
488
- label: "Moon",
489
- i18nKey: "pptx.shapePresets.moon",
490
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
491
- },
492
- {
493
- type: "pie",
494
- label: "Pie",
495
- i18nKey: "pptx.shapePresets.pie",
496
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
497
- },
498
- {
499
- type: "plaque",
500
- label: "Plaque",
501
- i18nKey: "pptx.shapePresets.plaque",
502
- icon: icon(lu.LuSquare, "w-3.5 h-3.5")
503
- },
504
- {
505
- type: "teardrop",
506
- label: "Teardrop",
507
- i18nKey: "pptx.shapePresets.teardrop",
508
- icon: icon(lu.LuCircle, "w-3.5 h-3.5")
509
- },
510
- {
511
- type: "line",
512
- label: "Line",
513
- i18nKey: "pptx.shapePresets.line",
514
- icon: icon(lu.LuMinus, "w-3.5 h-3.5")
515
- },
516
- {
517
- type: "connector",
518
- label: "Connector",
519
- i18nKey: "pptx.elementType.connector",
520
- icon: icon(lu.LuMoveRight, "w-3.5 h-3.5")
521
- }
522
- ];
340
+ var GLYPH_COMPONENTS = {
341
+ square: lu.LuSquare,
342
+ circle: lu.LuCircle,
343
+ database: lu.LuDatabase,
344
+ diamond: lu.LuDiamond,
345
+ minus: lu.LuMinus,
346
+ moveRight: lu.LuMoveRight,
347
+ plus: lu.LuPlus,
348
+ triangle: lu.LuTriangle
349
+ };
350
+ var SHAPE_PRESETS = chunk6CNJINIT_js.SHAPE_PRESET_DEFS.map(
351
+ (def) => ({
352
+ type: def.type,
353
+ label: def.label,
354
+ i18nKey: def.i18nKey,
355
+ icon: React3__default.default.createElement(GLYPH_COMPONENTS[def.glyph], {
356
+ className: def.glyphClass ? `w-3.5 h-3.5 ${def.glyphClass}` : "w-3.5 h-3.5"
357
+ })
358
+ })
359
+ );
523
360
 
524
361
  // src/viewer/hooks/useZoomViewport.ts
525
362
  function useZoomViewport({
@@ -850,20 +687,20 @@ function useAnimationPlayback(input) {
850
687
  for (const anim of nativeAnims) {
851
688
  if (anim.buildType && anim.buildType !== "allAtOnce" && anim.targetId) {
852
689
  const el = slide.elements.find((e) => e.id === anim.targetId);
853
- if (el && chunkS52XBUDM_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
854
- segmentCounts.set(anim.targetId, chunkLARZRLKB_js.countTextSegments(el.textSegments));
690
+ if (el && chunkOBLHB72P_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
691
+ segmentCounts.set(anim.targetId, chunk6CNJINIT_js.countTextSegments(el.textSegments));
855
692
  }
856
693
  }
857
694
  }
858
- const expandedAnims = segmentCounts.size > 0 ? chunkLARZRLKB_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
859
- const engine = chunkLARZRLKB_js.TimelineEngine.fromAnimations(expandedAnims);
695
+ const expandedAnims = segmentCounts.size > 0 ? chunk6CNJINIT_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
696
+ const engine = chunk6CNJINIT_js.TimelineEngine.fromAnimations(expandedAnims);
860
697
  timelineEngineRef.current = engine;
861
698
  setPresentationKeyframesCss(engine.getTimeline().keyframesCss);
862
699
  setInteractiveTriggerShapeIds(engine.getInteractiveTriggerShapeIds());
863
700
  setHoverTriggerShapeIds(engine.getHoverTriggerShapeIds());
864
701
  const allIds = slide.elements.map((element) => element.id);
865
702
  for (const anim of expandedAnims) {
866
- if (anim.targetId && anim.targetId.includes(chunkLARZRLKB_js.TEXT_BUILD_ID_SEP)) {
703
+ if (anim.targetId && anim.targetId.includes(chunk6CNJINIT_js.TEXT_BUILD_ID_SEP)) {
867
704
  allIds.push(anim.targetId);
868
705
  }
869
706
  }
@@ -1130,7 +967,7 @@ var AUDIENCE_HASH = "#pptx-audience";
1130
967
  var PRESENTER_MSG_ORIGIN = "pptx-viewer-presenter";
1131
968
  var AUDIENCE_NONCE_KEY = "nonce";
1132
969
  function generateSessionId() {
1133
- return chunkLARZRLKB_js.secureRandomUuid();
970
+ return chunk6CNJINIT_js.secureRandomUuid();
1134
971
  }
1135
972
  function parseAudienceNonce() {
1136
973
  const hash = window.location.hash;
@@ -1598,7 +1435,7 @@ function handlePresentationActionImpl(action, deps) {
1598
1435
  return;
1599
1436
  }
1600
1437
  if (action.url && !actionStr.includes("hlinksldjump")) {
1601
- if (chunkLARZRLKB_js.isUrlSafe(action.url)) {
1438
+ if (chunk6CNJINIT_js.isUrlSafe(action.url)) {
1602
1439
  window.open(action.url, "_blank", "noopener,noreferrer");
1603
1440
  }
1604
1441
  }
@@ -1608,7 +1445,7 @@ function handlePresentationActionImpl(action, deps) {
1608
1445
  function executeSlideTransition(nextSlideIndex, deps) {
1609
1446
  const incomingSlide = deps.slides[nextSlideIndex];
1610
1447
  const transition = incomingSlide?.transition;
1611
- const durationMs = deps.playTransition ? chunkLARZRLKB_js.resolveTransitionDurationMs(transition) : 0;
1448
+ const durationMs = deps.playTransition ? chunk6CNJINIT_js.resolveTransitionDurationMs(transition) : 0;
1612
1449
  deps.clearPresentationTimers();
1613
1450
  deps.setPresentationSlideIndex(nextSlideIndex);
1614
1451
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -2338,7 +2175,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2338
2175
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2339
2176
  slides.forEach((slide, slideIndex) => {
2340
2177
  for (const element of slide.elements || []) {
2341
- if (!chunkS52XBUDM_js.hasTextProperties(element)) {
2178
+ if (!chunkOBLHB72P_js.hasTextProperties(element)) {
2342
2179
  continue;
2343
2180
  }
2344
2181
  const segments = element.textSegments ?? [];
@@ -2389,7 +2226,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2389
2226
  continue;
2390
2227
  }
2391
2228
  const element = slide.elements[elIdx];
2392
- if (!chunkS52XBUDM_js.hasTextProperties(element)) {
2229
+ if (!chunkOBLHB72P_js.hasTextProperties(element)) {
2393
2230
  continue;
2394
2231
  }
2395
2232
  const segments = [...element.textSegments ?? []];
@@ -3310,21 +3147,16 @@ function useViewerState(input) {
3310
3147
  return { ...core, ...ui };
3311
3148
  }
3312
3149
 
3313
- // src/viewer/utils/generate-id.ts
3314
- function generateElementId() {
3315
- return `el-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
3316
- }
3317
-
3318
3150
  // src/viewer/utils/template-editing.ts
3319
3151
  function partitionTemplateElements(slides) {
3320
3152
  const templateElementsBySlideId = {};
3321
3153
  const nextSlides = slides.map((slide) => {
3322
- const template = slide.elements.filter((el) => chunkLARZRLKB_js.isTemplateElement(el));
3154
+ const template = slide.elements.filter((el) => chunk6CNJINIT_js.isTemplateElement(el));
3323
3155
  if (template.length === 0) {
3324
3156
  return slide;
3325
3157
  }
3326
3158
  templateElementsBySlideId[slide.id] = template;
3327
- return { ...slide, elements: slide.elements.filter((el) => !chunkLARZRLKB_js.isTemplateElement(el)) };
3159
+ return { ...slide, elements: slide.elements.filter((el) => !chunk6CNJINIT_js.isTemplateElement(el)) };
3328
3160
  });
3329
3161
  return { slides: nextSlides, templateElementsBySlideId };
3330
3162
  }
@@ -3337,15 +3169,6 @@ function buildSaveSlides(slides, templateElementsBySlideId) {
3337
3169
  return { ...slide, elements: [...template, ...slide.elements] };
3338
3170
  });
3339
3171
  }
3340
- function makeCloneId(intoTemplate, sourceId) {
3341
- if (!intoTemplate) {
3342
- return generateElementId();
3343
- }
3344
- if (sourceId.startsWith("master-")) {
3345
- return `master-${generateElementId()}`;
3346
- }
3347
- return `layout-${generateElementId()}`;
3348
- }
3349
3172
 
3350
3173
  // src/viewer/hooks/useLoadContent.ts
3351
3174
  function useLoadContent({
@@ -3406,7 +3229,7 @@ function useLoadContent({
3406
3229
  );
3407
3230
  }
3408
3231
  const previousHandler = handlerRef.current;
3409
- const handler = new chunkS52XBUDM_js.PptxHandler();
3232
+ const handler = new chunkOBLHB72P_js.PptxHandler();
3410
3233
  const parsed = await handler.load(buffer);
3411
3234
  if (cancelled || token !== renderTokenRef.current) {
3412
3235
  handler.dispose();
@@ -3418,7 +3241,7 @@ function useLoadContent({
3418
3241
  handlerRef.current = null;
3419
3242
  const mediaElements = [];
3420
3243
  for (const slide of parsed.slides) {
3421
- chunkLARZRLKB_js.collectMediaElements(slide.elements, mediaElements);
3244
+ chunk6CNJINIT_js.collectMediaElements(slide.elements, mediaElements);
3422
3245
  }
3423
3246
  for (const url of mediaDataUrls.values()) {
3424
3247
  if (url.startsWith("blob:")) {
@@ -3459,7 +3282,7 @@ function useLoadContent({
3459
3282
  }
3460
3283
  })
3461
3284
  );
3462
- const { paths: imagePaths, refs: imageRefs } = chunkLARZRLKB_js.collectImagePaths(parsed.slides);
3285
+ const { paths: imagePaths, refs: imageRefs } = chunk6CNJINIT_js.collectImagePaths(parsed.slides);
3463
3286
  let nextSlides = parsed.slides;
3464
3287
  if (imagePaths.size > 0) {
3465
3288
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3548,14 +3371,14 @@ function useLoadContent({
3548
3371
  setHasMacros(parsed.hasMacros === true);
3549
3372
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3550
3373
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3551
- setGuides(chunkLARZRLKB_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3374
+ setGuides(chunk6CNJINIT_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3552
3375
  setActiveSlideIndex(0);
3553
3376
  clearSelection();
3554
3377
  setIsDirty(false);
3555
3378
  history.resetHistory();
3556
3379
  } catch (err) {
3557
3380
  if (!cancelled && token === renderTokenRef.current) {
3558
- if (err instanceof chunkS52XBUDM_js.EncryptedFileError) {
3381
+ if (err instanceof chunkOBLHB72P_js.EncryptedFileError) {
3559
3382
  setIsEncrypted(true);
3560
3383
  } else {
3561
3384
  setError(err instanceof Error ? err.message : String(err));
@@ -3632,7 +3455,7 @@ function useAutosave(input) {
3632
3455
  isSavingRef.current = false;
3633
3456
  return;
3634
3457
  }
3635
- await chunkLARZRLKB_js.saveAutosaveSnapshot(filePathRef.current, data);
3458
+ await chunk6CNJINIT_js.saveAutosaveSnapshot(filePathRef.current, data);
3636
3459
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3637
3460
  } catch (err) {
3638
3461
  setAutosaveStatus({
@@ -3670,7 +3493,7 @@ function useAutosave(input) {
3670
3493
 
3671
3494
  // src/viewer/utils/animation-effects.ts
3672
3495
  function getAnimationInitialStyle2(preset, nativeAnimation) {
3673
- return chunkLARZRLKB_js.getAnimationInitialStyle(preset, nativeAnimation);
3496
+ return chunk6CNJINIT_js.getAnimationInitialStyle(preset, nativeAnimation);
3674
3497
  }
3675
3498
  function cn(...inputs) {
3676
3499
  return tailwindMerge.twMerge(clsx.clsx(inputs));
@@ -3678,7 +3501,7 @@ function cn(...inputs) {
3678
3501
 
3679
3502
  // src/viewer/utils/text-utils.tsx
3680
3503
  function getTextStyleForElement(element, fallbackColor) {
3681
- if (!chunkS52XBUDM_js.hasTextProperties(element)) {
3504
+ if (!chunkOBLHB72P_js.hasTextProperties(element)) {
3682
3505
  return { color: fallbackColor };
3683
3506
  }
3684
3507
  const textDecorationTokens = [];
@@ -3692,20 +3515,20 @@ function getTextStyleForElement(element, fallbackColor) {
3692
3515
  const textDecorationStyle = isDoubleStrike ? "double" : void 0;
3693
3516
  const hasItalicRuns = element.textStyle?.italic || Boolean(element.textSegments?.some((segment) => segment.style?.italic));
3694
3517
  const isRtl = element.textStyle?.rtl === true;
3695
- const resolvedTextColor = element.textStyle?.hyperlink ? chunkLARZRLKB_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkLARZRLKB_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3518
+ const resolvedTextColor = element.textStyle?.hyperlink ? chunk6CNJINIT_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunk6CNJINIT_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3696
3519
  const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
3697
3520
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3698
3521
  const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
3699
3522
  const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
3700
- const writingMode = chunkLARZRLKB_js.toCssWritingMode(element.textStyle?.textDirection);
3701
- const textOrientation = chunkLARZRLKB_js.toCssTextOrientation(element.textStyle?.textDirection);
3702
- const verticalDirection = chunkLARZRLKB_js.toCssVerticalDirection(element.textStyle?.textDirection);
3523
+ const writingMode = chunk6CNJINIT_js.toCssWritingMode(element.textStyle?.textDirection);
3524
+ const textOrientation = chunk6CNJINIT_js.toCssTextOrientation(element.textStyle?.textDirection);
3525
+ const verticalDirection = chunk6CNJINIT_js.toCssVerticalDirection(element.textStyle?.textDirection);
3703
3526
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
3704
3527
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
3705
3528
  const hasSegments = (element.textSegments?.length ?? 0) > 0;
3706
3529
  return {
3707
3530
  color: resolvedTextColor,
3708
- backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkLARZRLKB_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3531
+ backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunk6CNJINIT_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3709
3532
  textAlign: (() => {
3710
3533
  const a = element.textStyle?.align;
3711
3534
  if (a === "justLow" || a === "dist" || a === "thaiDist") {
@@ -3721,7 +3544,7 @@ function getTextStyleForElement(element, fallbackColor) {
3721
3544
  textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
3722
3545
  textDecorationStyle,
3723
3546
  fontFamily: element.textStyle?.fontFamily || DEFAULT_FONT_FAMILY,
3724
- lineHeight: chunkLARZRLKB_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3547
+ lineHeight: chunk6CNJINIT_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3725
3548
  paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
3726
3549
  paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
3727
3550
  paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
@@ -3734,7 +3557,7 @@ function getTextStyleForElement(element, fallbackColor) {
3734
3557
  // Auto-fit: use OOXML-provided fontScale/lnSpcReduction when available,
3735
3558
  // otherwise fall back to heuristic estimation. The pure font-scale maths
3736
3559
  // now lives in pptx-viewer-shared (computeAutoFitTextStyle).
3737
- ...chunkLARZRLKB_js.computeAutoFitTextStyle({
3560
+ ...chunk6CNJINIT_js.computeAutoFitTextStyle({
3738
3561
  textStyle: element.textStyle,
3739
3562
  text: element.text ?? "",
3740
3563
  width: element.width,
@@ -3767,13 +3590,13 @@ function computeTabSize(tabStops) {
3767
3590
  return avgGap > 0 ? `${Math.round(avgGap)}px` : void 0;
3768
3591
  }
3769
3592
  function getTextLayoutStyle(element) {
3770
- if (!chunkS52XBUDM_js.hasTextProperties(element)) {
3593
+ if (!chunkOBLHB72P_js.hasTextProperties(element)) {
3771
3594
  return {};
3772
3595
  }
3773
3596
  const verticalAlign = element.textStyle?.vAlign || "top";
3774
- const writingMode = chunkLARZRLKB_js.toCssWritingMode(element.textStyle?.textDirection);
3775
- const textOrientation = chunkLARZRLKB_js.toCssTextOrientation(element.textStyle?.textDirection);
3776
- const verticalDirection = chunkLARZRLKB_js.toCssVerticalDirection(element.textStyle?.textDirection);
3597
+ const writingMode = chunk6CNJINIT_js.toCssWritingMode(element.textStyle?.textDirection);
3598
+ const textOrientation = chunk6CNJINIT_js.toCssTextOrientation(element.textStyle?.textDirection);
3599
+ const verticalDirection = chunk6CNJINIT_js.toCssVerticalDirection(element.textStyle?.textDirection);
3777
3600
  const parsedColumnCount = Number(element.textStyle?.columnCount);
3778
3601
  const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
3779
3602
  const hasColumns = columnCount > 1;
@@ -3781,7 +3604,7 @@ function getTextLayoutStyle(element) {
3781
3604
  const tabStops = element.textStyle?.tabStops;
3782
3605
  const tabSize = computeTabSize(tabStops);
3783
3606
  const textWrapNone = element.textStyle?.textWrap === "none";
3784
- const hasParagraphIndents = chunkS52XBUDM_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
3607
+ const hasParagraphIndents = chunkOBLHB72P_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
3785
3608
  const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
3786
3609
  const paragraphIndent = element.textStyle?.paragraphIndent;
3787
3610
  const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
@@ -3790,7 +3613,7 @@ function getTextLayoutStyle(element) {
3790
3613
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3791
3614
  const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
3792
3615
  const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
3793
- const kinsokuStyles = chunkLARZRLKB_js.getKinsokuLineBreakStyles(element.textStyle);
3616
+ const kinsokuStyles = chunk6CNJINIT_js.getKinsokuLineBreakStyles(element.textStyle);
3794
3617
  if (hasColumns) {
3795
3618
  return {
3796
3619
  display: "block",
@@ -3833,10 +3656,10 @@ function getTextLayoutStyle(element) {
3833
3656
 
3834
3657
  // src/viewer/utils/text-effects.tsx
3835
3658
  function buildTextFillCss2(style) {
3836
- return chunkLARZRLKB_js.buildTextFillCss(style);
3659
+ return chunk6CNJINIT_js.buildTextFillCss(style);
3837
3660
  }
3838
3661
  function buildTextBody3DSceneStyle2(textStyle) {
3839
- return chunkLARZRLKB_js.buildTextBody3DSceneStyle(textStyle);
3662
+ return chunk6CNJINIT_js.buildTextBody3DSceneStyle(textStyle);
3840
3663
  }
3841
3664
 
3842
3665
  // src/viewer/utils/text-warp-css.tsx
@@ -4021,17 +3844,17 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
4021
3844
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
4022
3845
  return renderedSegments;
4023
3846
  }
4024
- const paraKey = `${elementId}${chunkLARZRLKB_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
3847
+ const paraKey = `${elementId}${chunk6CNJINIT_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
4025
3848
  const paraState = subElementAnimStates.get(paraKey);
4026
3849
  if (paraState) {
4027
3850
  const style = buildAnimStyle(paraState);
4028
3851
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
4029
3852
  }
4030
- const firstWordKey = `${elementId}${chunkLARZRLKB_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
3853
+ const firstWordKey = `${elementId}${chunk6CNJINIT_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
4031
3854
  if (subElementAnimStates.has(firstWordKey)) {
4032
3855
  return wrapByWord(elementId, paraIndex, paraSegments, subElementAnimStates);
4033
3856
  }
4034
- const firstCharKey = `${elementId}${chunkLARZRLKB_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
3857
+ const firstCharKey = `${elementId}${chunk6CNJINIT_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
4035
3858
  if (subElementAnimStates.has(firstCharKey)) {
4036
3859
  return wrapByChar(elementId, paraIndex, paraSegments, subElementAnimStates);
4037
3860
  }
@@ -4052,7 +3875,7 @@ function wrapByWord(elementId, paraIndex, paraSegments, states) {
4052
3875
  nodes.push(/* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: w }, `ws-${i}`));
4053
3876
  continue;
4054
3877
  }
4055
- const key = `${elementId}${chunkLARZRLKB_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
3878
+ const key = `${elementId}${chunk6CNJINIT_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4056
3879
  const state = states.get(key);
4057
3880
  const style = buildAnimStyle(state);
4058
3881
  nodes.push(
@@ -4066,7 +3889,7 @@ function wrapByChar(elementId, paraIndex, paraSegments, states) {
4066
3889
  const fullText = paraSegments.map((e) => e.segment.text).join("");
4067
3890
  const nodes = [];
4068
3891
  for (let i = 0; i < fullText.length; i++) {
4069
- const key = `${elementId}${chunkLARZRLKB_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
3892
+ const key = `${elementId}${chunk6CNJINIT_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4070
3893
  const state = states.get(key);
4071
3894
  const style = buildAnimStyle(state);
4072
3895
  nodes.push(
@@ -4079,10 +3902,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4079
3902
  if (!needsScriptFonts || !text) {
4080
3903
  return text;
4081
3904
  }
4082
- const runs = chunkLARZRLKB_js.segmentByScript(text);
3905
+ const runs = chunk6CNJINIT_js.segmentByScript(text);
4083
3906
  if (runs.length <= 1) {
4084
3907
  if (runs.length === 1) {
4085
- const font = chunkLARZRLKB_js.resolveFontForScript(runs[0].script, scriptFonts);
3908
+ const font = chunk6CNJINIT_js.resolveFontForScript(runs[0].script, scriptFonts);
4086
3909
  if (font && font !== baseFontFamily) {
4087
3910
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
4088
3911
  }
@@ -4090,7 +3913,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4090
3913
  return text;
4091
3914
  }
4092
3915
  return runs.map((run, i) => {
4093
- const font = chunkLARZRLKB_js.resolveFontForScript(run.script, scriptFonts);
3916
+ const font = chunk6CNJINIT_js.resolveFontForScript(run.script, scriptFonts);
4094
3917
  if (!font || font === baseFontFamily) {
4095
3918
  return /* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
4096
3919
  }
@@ -4164,8 +3987,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
4164
3987
  );
4165
3988
  }
4166
3989
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
4167
- const mathml = chunkLARZRLKB_js.convertOmmlToMathMl(equationXml);
4168
- const safeMathml = mathml ? chunkLARZRLKB_js.sanitizeMathMl(mathml) : "";
3990
+ const mathml = chunk6CNJINIT_js.convertOmmlToMathMl(equationXml);
3991
+ const safeMathml = mathml ? chunk6CNJINIT_js.sanitizeMathMl(mathml) : "";
4169
3992
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
4170
3993
  "span",
4171
3994
  {
@@ -4261,7 +4084,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4261
4084
  );
4262
4085
  }
4263
4086
  const segmentStyle = segment.style || {};
4264
- const textValue = chunkLARZRLKB_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4087
+ const textValue = chunk6CNJINIT_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4265
4088
  const lines = textValue.split("\n");
4266
4089
  const textDecorationTokens = [];
4267
4090
  if (segmentStyle.underline || segmentStyle.hyperlink) {
@@ -4271,8 +4094,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4271
4094
  textDecorationTokens.push("line-through");
4272
4095
  }
4273
4096
  const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
4274
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunkLARZRLKB_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkLARZRLKB_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4275
- const underlineDecoration = chunkLARZRLKB_js.resolveUnderlineDecorationStyle(
4097
+ const resolvedSegmentColor = segmentStyle.hyperlink ? chunk6CNJINIT_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunk6CNJINIT_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4098
+ const underlineDecoration = chunk6CNJINIT_js.resolveUnderlineDecorationStyle(
4276
4099
  Boolean(isDoubleStrike),
4277
4100
  segmentStyle.underlineStyle
4278
4101
  );
@@ -4285,14 +4108,14 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4285
4108
  const autoFitScale = element.textStyle?.autoFitFontScale !== void 0 && element.textStyle.autoFitFontScale > 0 && element.textStyle.autoFitFontScale < 1 ? element.textStyle.autoFitFontScale : 1;
4286
4109
  const baseFontSize = rawFontSize * autoFitScale;
4287
4110
  const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
4288
- const baseFontFamily = rawFontFamily ? chunkS52XBUDM_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4111
+ const baseFontFamily = rawFontFamily ? chunkOBLHB72P_js.getSubstituteFontFamily(rawFontFamily) : DEFAULT_FONT_FAMILY;
4289
4112
  const scriptFonts = {
4290
4113
  latin: baseFontFamily,
4291
4114
  eastAsia: segmentStyle.eastAsiaFont || element.textStyle?.eastAsiaFont || baseFontFamily,
4292
4115
  complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
4293
4116
  symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
4294
4117
  };
4295
- const needsScriptFonts = chunkLARZRLKB_js.hasDistinctScriptFonts(scriptFonts);
4118
+ const needsScriptFonts = chunk6CNJINIT_js.hasDistinctScriptFonts(scriptFonts);
4296
4119
  const spanStyle = {
4297
4120
  color: resolvedSegmentColor,
4298
4121
  fontSize: baseFontSize * baselineFontScale,
@@ -4306,15 +4129,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4306
4129
  verticalAlign: baselineShift,
4307
4130
  letterSpacing,
4308
4131
  fontKerning,
4309
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkLARZRLKB_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4132
+ backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunk6CNJINIT_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4310
4133
  ...textFillStyles,
4311
- textDecorationColor: segmentStyle.underlineColor ? chunkLARZRLKB_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4312
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkLARZRLKB_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4134
+ textDecorationColor: segmentStyle.underlineColor ? chunk6CNJINIT_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4135
+ WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunk6CNJINIT_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4313
4136
  paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
4314
- textShadow: chunkLARZRLKB_js.buildTextShadowCss(segmentStyle),
4315
- filter: chunkLARZRLKB_js.buildTextRunFilterChain(segmentStyle),
4316
- opacity: chunkLARZRLKB_js.getTextAlphaOpacity(segmentStyle),
4317
- WebkitBoxReflect: chunkLARZRLKB_js.buildTextReflectionCss(segmentStyle)
4137
+ textShadow: chunk6CNJINIT_js.buildTextShadowCss(segmentStyle),
4138
+ filter: chunk6CNJINIT_js.buildTextRunFilterChain(segmentStyle),
4139
+ opacity: chunk6CNJINIT_js.getTextAlphaOpacity(segmentStyle),
4140
+ WebkitBoxReflect: chunk6CNJINIT_js.buildTextReflectionCss(segmentStyle)
4318
4141
  };
4319
4142
  const runRtl = segmentStyle.rtl;
4320
4143
  if (runRtl !== void 0 && runRtl !== paragraphRtl) {
@@ -4334,7 +4157,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4334
4157
  spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
4335
4158
  }
4336
4159
  if (bulletInfo.color) {
4337
- spanStyle.color = chunkLARZRLKB_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4160
+ spanStyle.color = chunk6CNJINIT_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4338
4161
  }
4339
4162
  }
4340
4163
  if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
@@ -4366,7 +4189,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4366
4189
  textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
4367
4190
  };
4368
4191
  if (segment.rubyStyle?.color) {
4369
- rubyStyle.color = chunkLARZRLKB_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4192
+ rubyStyle.color = chunk6CNJINIT_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4370
4193
  }
4371
4194
  innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
4372
4195
  baseContent,
@@ -4436,7 +4259,7 @@ function groupSegmentsIntoParagraphs(segments) {
4436
4259
  return paragraphs;
4437
4260
  }
4438
4261
  function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
4439
- if (!chunkS52XBUDM_js.hasTextProperties(element)) {
4262
+ if (!chunkOBLHB72P_js.hasTextProperties(element)) {
4440
4263
  return emptyFallback || null;
4441
4264
  }
4442
4265
  const effectiveSegments = segmentOverrides ?? element.textSegments;
@@ -4457,9 +4280,9 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
4457
4280
  return element.text || emptyFallback || "";
4458
4281
  }
4459
4282
  const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
4460
- const paragraphIndents = chunkS52XBUDM_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
4461
- const elementRtl = chunkS52XBUDM_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
4462
- const elementAlign = chunkS52XBUDM_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
4283
+ const paragraphIndents = chunkOBLHB72P_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
4284
+ const elementRtl = chunkOBLHB72P_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
4285
+ const elementAlign = chunkOBLHB72P_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
4463
4286
  return paragraphs.map((paraSegments, paraIndex) => {
4464
4287
  const paraIndent = paragraphIndents?.[paraIndex];
4465
4288
  const rawMarginLeft = typeof paraIndent?.marginLeft === "number" && paraIndent.marginLeft !== 0 ? paraIndent.marginLeft : void 0;
@@ -4473,14 +4296,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
4473
4296
  return Boolean(segment.text) && segment.text.trim().length > 0;
4474
4297
  });
4475
4298
  const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
4476
- const paraRtl = chunkLARZRLKB_js.resolveParagraphRtl(paraSegments, elementRtl);
4299
+ const paraRtl = chunk6CNJINIT_js.resolveParagraphRtl(paraSegments, elementRtl);
4477
4300
  const isRtlParagraph = paraRtl === true;
4478
- const paraAlign = chunkLARZRLKB_js.resolveParagraphAlign(paraSegments, elementAlign);
4479
- const cssTextAlign = chunkLARZRLKB_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4301
+ const paraAlign = chunk6CNJINIT_js.resolveParagraphAlign(paraSegments, elementAlign);
4302
+ const cssTextAlign = chunk6CNJINIT_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4480
4303
  const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
4481
4304
  const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
4482
4305
  const paraTextIndent = rawTextIndent;
4483
- const paraKinsokuStyle = chunkLARZRLKB_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4306
+ const paraKinsokuStyle = chunk6CNJINIT_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4484
4307
  const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
4485
4308
  const paraStyle = {
4486
4309
  ...paraKinsokuStyle
@@ -4645,7 +4468,7 @@ function isConnectorOrLineElement(element) {
4645
4468
  if (element.type === "connector") {
4646
4469
  return true;
4647
4470
  }
4648
- if (!chunkS52XBUDM_js.hasShapeProperties(element)) {
4471
+ if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
4649
4472
  return false;
4650
4473
  }
4651
4474
  const st = getShapeType(element.shapeType);
@@ -4710,13 +4533,13 @@ function renderDuotoneSvgFilter(elementId, color1, color2) {
4710
4533
  );
4711
4534
  }
4712
4535
  function getDuotoneColors(element) {
4713
- if (!chunkS52XBUDM_js.isImageLikeElement(element)) {
4536
+ if (!chunkOBLHB72P_js.isImageLikeElement(element)) {
4714
4537
  return void 0;
4715
4538
  }
4716
4539
  return element.imageEffects?.duotone;
4717
4540
  }
4718
4541
  function buildLineShadowCss(element) {
4719
- if (!chunkS52XBUDM_js.hasShapeProperties(element)) {
4542
+ if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
4720
4543
  return void 0;
4721
4544
  }
4722
4545
  const ss = element.shapeStyle;
@@ -4727,13 +4550,13 @@ function buildLineShadowCss(element) {
4727
4550
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
4728
4551
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
4729
4552
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
4730
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkLARZRLKB_js.colorWithOpacity(
4731
- chunkLARZRLKB_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4553
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunk6CNJINIT_js.colorWithOpacity(
4554
+ chunk6CNJINIT_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4732
4555
  opacity
4733
4556
  )}`;
4734
4557
  }
4735
4558
  function buildLineGlowFilter(element) {
4736
- if (!chunkS52XBUDM_js.hasShapeProperties(element)) {
4559
+ if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
4737
4560
  return void 0;
4738
4561
  }
4739
4562
  const ss = element.shapeStyle;
@@ -4742,7 +4565,7 @@ function buildLineGlowFilter(element) {
4742
4565
  }
4743
4566
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
4744
4567
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
4745
- const glowCol = chunkLARZRLKB_js.colorWithOpacity(chunkLARZRLKB_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4568
+ const glowCol = chunk6CNJINIT_js.colorWithOpacity(chunk6CNJINIT_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4746
4569
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
4747
4570
  }
4748
4571
  function mapDagBlendModeToCss(blend) {
@@ -4766,7 +4589,7 @@ function getImageAlphaFilterId(elementId) {
4766
4589
  return `imgalpha-${elementId}`;
4767
4590
  }
4768
4591
  function hasAdvancedImageAlphaEffects(element) {
4769
- if (!chunkS52XBUDM_js.isImageLikeElement(element)) {
4592
+ if (!chunkOBLHB72P_js.isImageLikeElement(element)) {
4770
4593
  return false;
4771
4594
  }
4772
4595
  const e = element.imageEffects;
@@ -4778,7 +4601,7 @@ function hasAdvancedImageAlphaEffects(element) {
4778
4601
  );
4779
4602
  }
4780
4603
  function renderImageAlphaSvgFilter(element) {
4781
- if (!chunkS52XBUDM_js.isImageLikeElement(element)) {
4604
+ if (!chunkOBLHB72P_js.isImageLikeElement(element)) {
4782
4605
  return null;
4783
4606
  }
4784
4607
  const e = element.imageEffects;
@@ -4888,7 +4711,7 @@ function getDagDuotoneFilterId(elementId) {
4888
4711
  return `dag-duotone-${elementId}`;
4889
4712
  }
4890
4713
  function hasDagDuotoneEffect(element) {
4891
- if (!chunkS52XBUDM_js.hasShapeProperties(element)) {
4714
+ if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
4892
4715
  return false;
4893
4716
  }
4894
4717
  return Boolean(element.shapeStyle?.dagDuotone);
@@ -4951,7 +4774,7 @@ function getRoundRectRadiusPx2(element) {
4951
4774
 
4952
4775
  // src/viewer/utils/shape-visual-3d.ts
4953
4776
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
4954
- return chunkLARZRLKB_js.build3DExtrusionData(
4777
+ return chunk6CNJINIT_js.build3DExtrusionData(
4955
4778
  shape3d,
4956
4779
  scene3d,
4957
4780
  fillColor,
@@ -4960,27 +4783,27 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
4960
4783
  );
4961
4784
  }
4962
4785
  function apply3dEffects2(base, scene3d, shape3d) {
4963
- chunkLARZRLKB_js.apply3dEffects(base, scene3d, shape3d);
4786
+ chunk6CNJINIT_js.apply3dEffects(base, scene3d, shape3d);
4964
4787
  }
4965
4788
 
4966
4789
  // src/viewer/utils/shape-visual-style.ts
4967
4790
  function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor) {
4968
- if (!chunkS52XBUDM_js.hasShapeProperties(element)) {
4791
+ if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
4969
4792
  return {};
4970
4793
  }
4971
4794
  const normalizedShapeType = getShapeType(element.shapeType);
4972
- const clipPath = chunkLARZRLKB_js.getResolvedShapeClipPath(element);
4795
+ const clipPath = chunk6CNJINIT_js.getResolvedShapeClipPath(element);
4973
4796
  const fillOpacity = element.shapeStyle?.fillOpacity;
4974
4797
  const strokeOpacity = element.shapeStyle?.strokeOpacity;
4975
- const strokeDash = chunkLARZRLKB_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4976
- const fillGradient = chunkLARZRLKB_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4977
- const shadowCss = chunkLARZRLKB_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4978
- const innerShadowCss = chunkLARZRLKB_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4979
- const resolvedFillColor = chunkLARZRLKB_js.colorWithOpacity(fillColor, fillOpacity);
4980
- const resolvedStrokeColor = chunkLARZRLKB_js.colorWithOpacity(strokeColor, strokeOpacity);
4798
+ const strokeDash = chunk6CNJINIT_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4799
+ const fillGradient = chunk6CNJINIT_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4800
+ const shadowCss = chunk6CNJINIT_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4801
+ const innerShadowCss = chunk6CNJINIT_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4802
+ const resolvedFillColor = chunk6CNJINIT_js.colorWithOpacity(fillColor, fillOpacity);
4803
+ const resolvedStrokeColor = chunk6CNJINIT_js.colorWithOpacity(strokeColor, strokeOpacity);
4981
4804
  const ss = element.shapeStyle;
4982
4805
  const combinedShadowParts = [];
4983
- const multiLayerShadow = chunkLARZRLKB_js.buildMultiLayerShadowCss(element.shapeStyle);
4806
+ const multiLayerShadow = chunk6CNJINIT_js.buildMultiLayerShadowCss(element.shapeStyle);
4984
4807
  if (multiLayerShadow) {
4985
4808
  combinedShadowParts.push(multiLayerShadow);
4986
4809
  } else if (shadowCss) {
@@ -4989,7 +4812,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4989
4812
  if (innerShadowCss) {
4990
4813
  combinedShadowParts.push(innerShadowCss);
4991
4814
  }
4992
- const glowBoxShadow = chunkLARZRLKB_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4815
+ const glowBoxShadow = chunk6CNJINIT_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4993
4816
  if (glowBoxShadow) {
4994
4817
  combinedShadowParts.push(glowBoxShadow);
4995
4818
  }
@@ -4997,7 +4820,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4997
4820
  if (lineShadow) {
4998
4821
  combinedShadowParts.push(lineShadow);
4999
4822
  }
5000
- const compoundLineShadow = chunkLARZRLKB_js.getCompoundLineBoxShadow(
4823
+ const compoundLineShadow = chunk6CNJINIT_js.getCompoundLineBoxShadow(
5001
4824
  element.shapeStyle?.compoundLine,
5002
4825
  strokeWidth,
5003
4826
  resolvedStrokeColor
@@ -5010,7 +4833,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5010
4833
  if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
5011
4834
  const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
5012
4835
  const glowRad = Math.round(Math.max(0, ss.glowRadius));
5013
- const glowCol = chunkLARZRLKB_js.colorWithOpacity(chunkLARZRLKB_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
4836
+ const glowCol = chunk6CNJINIT_js.colorWithOpacity(chunk6CNJINIT_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
5014
4837
  filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
5015
4838
  }
5016
4839
  if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
@@ -5023,12 +4846,12 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5023
4846
  if (lineGlowCss) {
5024
4847
  filterParts.push(lineGlowCss);
5025
4848
  }
5026
- const dagFilter = chunkLARZRLKB_js.getEffectDagFilter(ss, element.id);
4849
+ const dagFilter = chunk6CNJINIT_js.getEffectDagFilter(ss, element.id);
5027
4850
  if (dagFilter) {
5028
4851
  filterParts.push(dagFilter);
5029
4852
  }
5030
4853
  const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : void 0;
5031
- const patternFill = chunkLARZRLKB_js.buildPatternFillCss(element.shapeStyle);
4854
+ const patternFill = chunk6CNJINIT_js.buildPatternFillCss(element.shapeStyle);
5032
4855
  const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
5033
4856
  const imageFillMode = ss?.fillImageMode || "stretch";
5034
4857
  let reflectCss;
@@ -5040,7 +4863,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5040
4863
  const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
5041
4864
  const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
5042
4865
  const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
5043
- reflectCss = chunkLARZRLKB_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
4866
+ reflectCss = chunk6CNJINIT_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
5044
4867
  }
5045
4868
  }
5046
4869
  const base = {
@@ -5054,9 +4877,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5054
4877
  filter: filterParts.length > 0 ? filterParts.join(" ") : void 0,
5055
4878
  opacity: typeof ss?.dagAlphaModFix === "number" ? Math.max(0, Math.min(1, ss.dagAlphaModFix / 100)) : void 0,
5056
4879
  mixBlendMode: mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
5057
- borderWidth: strokeWidth > 0 ? chunkLARZRLKB_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
4880
+ borderWidth: strokeWidth > 0 ? chunk6CNJINIT_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
5058
4881
  borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
5059
- borderStyle: strokeWidth > 0 ? chunkLARZRLKB_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
4882
+ borderStyle: strokeWidth > 0 ? chunk6CNJINIT_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
5060
4883
  strokeLinejoin: lineJoinCss,
5061
4884
  strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : void 0
5062
4885
  };
@@ -5097,7 +4920,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5097
4920
  borderWidth: 0,
5098
4921
  borderTopWidth: Math.max(strokeWidth, 2),
5099
4922
  borderTopColor: resolvedStrokeColor,
5100
- borderTopStyle: chunkLARZRLKB_js.getCssBorderDashStyle(strokeDash)
4923
+ borderTopStyle: chunk6CNJINIT_js.getCssBorderDashStyle(strokeDash)
5101
4924
  };
5102
4925
  }
5103
4926
  if (normalizedShapeType === "cylinder") {
@@ -5111,13 +4934,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
5111
4934
  function getConnectorAdjustment(element, key, fallback) {
5112
4935
  const direct = element.shapeAdjustments?.[key];
5113
4936
  if (typeof direct === "number" && Number.isFinite(direct)) {
5114
- return chunkLARZRLKB_js.clampUnitInterval(direct / 1e5);
4937
+ return chunk6CNJINIT_js.clampUnitInterval(direct / 1e5);
5115
4938
  }
5116
4939
  const fallbackKey = element.shapeAdjustments?.adj;
5117
4940
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
5118
- return chunkLARZRLKB_js.clampUnitInterval(fallbackKey / 1e5);
4941
+ return chunk6CNJINIT_js.clampUnitInterval(fallbackKey / 1e5);
5119
4942
  }
5120
- return chunkLARZRLKB_js.clampUnitInterval(fallback);
4943
+ return chunk6CNJINIT_js.clampUnitInterval(fallback);
5121
4944
  }
5122
4945
  function getConnectorPathGeometry(element) {
5123
4946
  const width = Math.max(element.width, 1);
@@ -5244,14 +5067,14 @@ function renderConnectorMarker(markerId, arrowType, color, arrowWidth, arrowLeng
5244
5067
  );
5245
5068
  }
5246
5069
  function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor) {
5247
- if (!chunkS52XBUDM_js.hasShapeProperties(element)) {
5070
+ if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
5248
5071
  return null;
5249
5072
  }
5250
5073
  const normalizedType = (element.shapeType || "").toLowerCase();
5251
- const fillPaint = chunkLARZRLKB_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5252
- const strokePaint = chunkLARZRLKB_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5253
- const dashType = chunkLARZRLKB_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5254
- const dashArray = chunkLARZRLKB_js.getSvgStrokeDasharray(
5074
+ const fillPaint = chunk6CNJINIT_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5075
+ const strokePaint = chunk6CNJINIT_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5076
+ const dashType = chunk6CNJINIT_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5077
+ const dashArray = chunk6CNJINIT_js.getSvgStrokeDasharray(
5255
5078
  dashType,
5256
5079
  Math.max(strokeWidth, 1),
5257
5080
  element.shapeStyle?.customDashSegments
@@ -5335,18 +5158,18 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5335
5158
  }
5336
5159
  );
5337
5160
  }
5338
- if (chunkS52XBUDM_js.isCalloutShape(normalizedType)) {
5161
+ if (chunkOBLHB72P_js.isCalloutShape(normalizedType)) {
5339
5162
  const width = Math.max(element.width, 1);
5340
5163
  const height = Math.max(element.height, 1);
5341
- const geometry = chunkS52XBUDM_js.getCalloutLeaderLineGeometry(
5164
+ const geometry = chunkOBLHB72P_js.getCalloutLeaderLineGeometry(
5342
5165
  normalizedType,
5343
5166
  width,
5344
5167
  height,
5345
5168
  element.shapeAdjustments
5346
5169
  );
5347
5170
  if (geometry && geometry.points.length >= 2) {
5348
- const leaderPath = chunkS52XBUDM_js.buildCalloutLeaderLineSvgPath(geometry);
5349
- const bounds = chunkS52XBUDM_js.getCalloutViewBoxBounds(width, height, geometry);
5171
+ const leaderPath = chunkOBLHB72P_js.buildCalloutLeaderLineSvgPath(geometry);
5172
+ const bounds = chunkOBLHB72P_js.getCalloutViewBoxBounds(width, height, geometry);
5350
5173
  const lineStroke = Math.max(strokeWidth, 1);
5351
5174
  const offsetLeft = bounds.minX;
5352
5175
  const offsetTop = bounds.minY;
@@ -5410,8 +5233,8 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5410
5233
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
5411
5234
  const compoundLine = element.shapeStyle?.compoundLine;
5412
5235
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
5413
- const offsets = chunkLARZRLKB_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5414
- const widths = chunkLARZRLKB_js.getCompoundLineWidths(compoundLine, strokeWidth);
5236
+ const offsets = chunk6CNJINIT_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5237
+ const widths = chunk6CNJINIT_js.getCompoundLineWidths(compoundLine, strokeWidth);
5415
5238
  return /* @__PURE__ */ jsxRuntime.jsxs(
5416
5239
  "svg",
5417
5240
  {
@@ -5465,7 +5288,7 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5465
5288
 
5466
5289
  // src/viewer/utils/image-style.ts
5467
5290
  function getImageMaskStyle(element) {
5468
- if (!chunkS52XBUDM_js.hasShapeProperties(element)) {
5291
+ if (!chunkOBLHB72P_js.hasShapeProperties(element)) {
5469
5292
  return void 0;
5470
5293
  }
5471
5294
  const shapeType = element.shapeType;
@@ -5474,7 +5297,7 @@ function getImageMaskStyle(element) {
5474
5297
  }
5475
5298
  const normalized = shapeType.toLowerCase();
5476
5299
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
5477
- const radiusPx = chunkLARZRLKB_js.getRoundRectRadiusPx(element);
5300
+ const radiusPx = chunk6CNJINIT_js.getRoundRectRadiusPx(element);
5478
5301
  if (radiusPx <= 0.01) {
5479
5302
  return void 0;
5480
5303
  }
@@ -5486,7 +5309,7 @@ function getImageMaskStyle(element) {
5486
5309
  if (normalized === "can" || normalized === "cylinder") {
5487
5310
  return { borderRadius: "48% / 12%" };
5488
5311
  }
5489
- const clipPath = chunkLARZRLKB_js.getResolvedShapeClipPath(element);
5312
+ const clipPath = chunk6CNJINIT_js.getResolvedShapeClipPath(element);
5490
5313
  if (!clipPath) {
5491
5314
  return void 0;
5492
5315
  }
@@ -5494,7 +5317,7 @@ function getImageMaskStyle(element) {
5494
5317
  }
5495
5318
  function getImageRenderStyle(element) {
5496
5319
  const maskStyle = getImageMaskStyle(element) || {};
5497
- if (!chunkS52XBUDM_js.isImageLikeElement(element)) {
5320
+ if (!chunkOBLHB72P_js.isImageLikeElement(element)) {
5498
5321
  return {
5499
5322
  ...maskStyle,
5500
5323
  width: "100%",
@@ -5502,10 +5325,10 @@ function getImageRenderStyle(element) {
5502
5325
  objectFit: "cover"
5503
5326
  };
5504
5327
  }
5505
- const cropLeft = chunkLARZRLKB_js.clampCropValue(element.cropLeft);
5506
- const cropTop = chunkLARZRLKB_js.clampCropValue(element.cropTop);
5507
- const cropRight = chunkLARZRLKB_js.clampCropValue(element.cropRight);
5508
- const cropBottom = chunkLARZRLKB_js.clampCropValue(element.cropBottom);
5328
+ const cropLeft = chunk6CNJINIT_js.clampCropValue(element.cropLeft);
5329
+ const cropTop = chunk6CNJINIT_js.clampCropValue(element.cropTop);
5330
+ const cropRight = chunk6CNJINIT_js.clampCropValue(element.cropRight);
5331
+ const cropBottom = chunk6CNJINIT_js.clampCropValue(element.cropBottom);
5509
5332
  const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
5510
5333
  if (!hasCrop) {
5511
5334
  return {
@@ -5517,10 +5340,10 @@ function getImageRenderStyle(element) {
5517
5340
  }
5518
5341
  const safeHorizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
5519
5342
  const safeVerticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
5520
- const normalizedLeft = chunkLARZRLKB_js.clampCropValue(cropLeft * safeHorizontalScale);
5521
- const normalizedRight = chunkLARZRLKB_js.clampCropValue(cropRight * safeHorizontalScale);
5522
- const normalizedTop = chunkLARZRLKB_js.clampCropValue(cropTop * safeVerticalScale);
5523
- const normalizedBottom = chunkLARZRLKB_js.clampCropValue(cropBottom * safeVerticalScale);
5343
+ const normalizedLeft = chunk6CNJINIT_js.clampCropValue(cropLeft * safeHorizontalScale);
5344
+ const normalizedRight = chunk6CNJINIT_js.clampCropValue(cropRight * safeHorizontalScale);
5345
+ const normalizedTop = chunk6CNJINIT_js.clampCropValue(cropTop * safeVerticalScale);
5346
+ const normalizedBottom = chunk6CNJINIT_js.clampCropValue(cropBottom * safeVerticalScale);
5524
5347
  const remainingWidth = Math.max(0.01, 1 - normalizedLeft - normalizedRight);
5525
5348
  const remainingHeight = Math.max(0.01, 1 - normalizedTop - normalizedBottom);
5526
5349
  const tx = Math.round(-normalizedLeft / remainingWidth * 1e4) / 100;
@@ -5549,7 +5372,7 @@ var CROP_SHAPE_CLIP_PATHS = {
5549
5372
  star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
5550
5373
  };
5551
5374
  function getCropShapeClipPath(element) {
5552
- if (!chunkS52XBUDM_js.isImageLikeElement(element)) {
5375
+ if (!chunkOBLHB72P_js.isImageLikeElement(element)) {
5553
5376
  return void 0;
5554
5377
  }
5555
5378
  const shape = element.cropShape;
@@ -5559,7 +5382,7 @@ function getCropShapeClipPath(element) {
5559
5382
  return CROP_SHAPE_CLIP_PATHS[shape];
5560
5383
  }
5561
5384
  function isImageTiled(element) {
5562
- if (!chunkS52XBUDM_js.isImageLikeElement(element)) {
5385
+ if (!chunkOBLHB72P_js.isImageLikeElement(element)) {
5563
5386
  return false;
5564
5387
  }
5565
5388
  return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
@@ -5589,7 +5412,7 @@ function tileAlignmentToCssPosition(alignment) {
5589
5412
  }
5590
5413
  }
5591
5414
  function getImageTilingStyle(element) {
5592
- if (!chunkS52XBUDM_js.isImageLikeElement(element) || !isImageTiled(element)) {
5415
+ if (!chunkOBLHB72P_js.isImageLikeElement(element) || !isImageTiled(element)) {
5593
5416
  return void 0;
5594
5417
  }
5595
5418
  const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
@@ -5660,9 +5483,9 @@ function parseGradientFillCss(gradFill) {
5660
5483
  }
5661
5484
  const parsed = stops.map((gs) => {
5662
5485
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
5663
- const color = chunkLARZRLKB_js.parseDrawingColor(gs) ?? "#888888";
5664
- const opacity = chunkLARZRLKB_js.parseDrawingColorOpacity(gs);
5665
- return { pos, color: chunkLARZRLKB_js.colorWithOpacity(color, opacity) };
5486
+ const color = chunk6CNJINIT_js.parseDrawingColor(gs) ?? "#888888";
5487
+ const opacity = chunk6CNJINIT_js.parseDrawingColorOpacity(gs);
5488
+ return { pos, color: chunk6CNJINIT_js.colorWithOpacity(color, opacity) };
5666
5489
  }).sort((a, b) => a.pos - b.pos);
5667
5490
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
5668
5491
  const lin = gradFill["a:lin"];
@@ -5703,8 +5526,8 @@ function parsePatternFillCss(pattFill) {
5703
5526
  if (!pattFill) {
5704
5527
  return void 0;
5705
5528
  }
5706
- const fgColor = chunkLARZRLKB_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5707
- const bgColor = chunkLARZRLKB_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5529
+ const fgColor = chunk6CNJINIT_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5530
+ const bgColor = chunk6CNJINIT_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5708
5531
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
5709
5532
  switch (preset) {
5710
5533
  case "ltHorz":
@@ -5815,11 +5638,11 @@ function parseCellBorders(cellProperties) {
5815
5638
  const prstDash = ln["a:prstDash"];
5816
5639
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
5817
5640
  const cssBorderStyle = ooxmlDashToCss(dashVal);
5818
- const color = chunkLARZRLKB_js.parseDrawingColor(ln["a:solidFill"]);
5641
+ const color = chunk6CNJINIT_js.parseDrawingColor(ln["a:solidFill"]);
5819
5642
  if (color) {
5820
- const opacity = chunkLARZRLKB_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5643
+ const opacity = chunk6CNJINIT_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5821
5644
  const key = `${edge.prefix}`;
5822
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkLARZRLKB_js.colorWithOpacity(color, opacity)}`;
5645
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunk6CNJINIT_js.colorWithOpacity(color, opacity)}`;
5823
5646
  }
5824
5647
  }
5825
5648
  return borderStyle;
@@ -5832,7 +5655,7 @@ function parseCellTextEffects(runProps) {
5832
5655
  const textShadowParts = [];
5833
5656
  const outerShdw = effectLst["a:outerShdw"];
5834
5657
  if (outerShdw) {
5835
- const shdwColor = chunkLARZRLKB_js.parseDrawingColor(outerShdw);
5658
+ const shdwColor = chunk6CNJINIT_js.parseDrawingColor(outerShdw);
5836
5659
  if (shdwColor) {
5837
5660
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
5838
5661
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -5850,7 +5673,7 @@ function parseCellTextEffects(runProps) {
5850
5673
  }
5851
5674
  const glow = effectLst["a:glow"];
5852
5675
  if (glow) {
5853
- const glowColor = chunkLARZRLKB_js.parseDrawingColor(glow);
5676
+ const glowColor = chunk6CNJINIT_js.parseDrawingColor(glow);
5854
5677
  if (glowColor) {
5855
5678
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
5856
5679
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -5929,10 +5752,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5929
5752
  if (runProps?.["@_u"] !== void 0) {
5930
5753
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
5931
5754
  }
5932
- const runColor = chunkLARZRLKB_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkLARZRLKB_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5755
+ const runColor = chunk6CNJINIT_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunk6CNJINIT_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5933
5756
  if (runColor) {
5934
- const opacity = chunkLARZRLKB_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5935
- cellStyle.color = chunkLARZRLKB_js.colorWithOpacity(runColor, opacity);
5757
+ const opacity = chunk6CNJINIT_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5758
+ cellStyle.color = chunk6CNJINIT_js.colorWithOpacity(runColor, opacity);
5936
5759
  }
5937
5760
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
5938
5761
  if (fontFamily) {
@@ -5942,15 +5765,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5942
5765
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
5943
5766
  }
5944
5767
  const cellProperties = cellXml["a:tcPr"];
5945
- const cellFill = chunkLARZRLKB_js.parseDrawingColor(
5768
+ const cellFill = chunk6CNJINIT_js.parseDrawingColor(
5946
5769
  cellProperties?.["a:solidFill"],
5947
5770
  schemeColorOverrides
5948
5771
  );
5949
5772
  if (cellFill) {
5950
- const opacity = chunkLARZRLKB_js.parseDrawingColorOpacity(
5773
+ const opacity = chunk6CNJINIT_js.parseDrawingColorOpacity(
5951
5774
  cellProperties?.["a:solidFill"]
5952
5775
  );
5953
- cellStyle.backgroundColor = chunkLARZRLKB_js.colorWithOpacity(cellFill, opacity);
5776
+ cellStyle.backgroundColor = chunk6CNJINIT_js.colorWithOpacity(cellFill, opacity);
5954
5777
  } else {
5955
5778
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
5956
5779
  if (gradCss) {
@@ -5965,16 +5788,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5965
5788
  const edgeBorders = parseCellBorders(cellProperties);
5966
5789
  Object.assign(cellStyle, edgeBorders);
5967
5790
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
5968
- const borderColor = chunkLARZRLKB_js.parseDrawingColor(
5791
+ const borderColor = chunk6CNJINIT_js.parseDrawingColor(
5969
5792
  cellProperties?.["a:lnL"]?.["a:solidFill"],
5970
5793
  schemeColorOverrides
5971
- ) || chunkLARZRLKB_js.parseDrawingColor(
5794
+ ) || chunk6CNJINIT_js.parseDrawingColor(
5972
5795
  cellProperties?.["a:lnR"]?.["a:solidFill"],
5973
5796
  schemeColorOverrides
5974
- ) || chunkLARZRLKB_js.parseDrawingColor(
5797
+ ) || chunk6CNJINIT_js.parseDrawingColor(
5975
5798
  cellProperties?.["a:lnT"]?.["a:solidFill"],
5976
5799
  schemeColorOverrides
5977
- ) || chunkLARZRLKB_js.parseDrawingColor(
5800
+ ) || chunk6CNJINIT_js.parseDrawingColor(
5978
5801
  cellProperties?.["a:lnB"]?.["a:solidFill"],
5979
5802
  schemeColorOverrides
5980
5803
  );
@@ -6053,10 +5876,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
6053
5876
  }
6054
5877
  let color = base;
6055
5878
  if (fill.tint !== void 0 && fill.tint > 0) {
6056
- color = chunkLARZRLKB_js.tintColor2(color, fill.tint / 1e5);
5879
+ color = chunk6CNJINIT_js.tintColor2(color, fill.tint / 1e5);
6057
5880
  }
6058
5881
  if (fill.shade !== void 0 && fill.shade > 0) {
6059
- color = chunkLARZRLKB_js.shadeColor2(color, 1 - fill.shade / 1e5);
5882
+ color = chunk6CNJINIT_js.shadeColor2(color, 1 - fill.shade / 1e5);
6060
5883
  }
6061
5884
  return color;
6062
5885
  }
@@ -6078,10 +5901,10 @@ function applyTableStyleText(text, colorScheme, style) {
6078
5901
  if (base) {
6079
5902
  let color = base;
6080
5903
  if (text.fontTint !== void 0 && text.fontTint > 0) {
6081
- color = chunkLARZRLKB_js.tintColor2(color, text.fontTint / 1e5);
5904
+ color = chunk6CNJINIT_js.tintColor2(color, text.fontTint / 1e5);
6082
5905
  }
6083
5906
  if (text.fontShade !== void 0 && text.fontShade > 0) {
6084
- color = chunkLARZRLKB_js.shadeColor2(color, 1 - text.fontShade / 1e5);
5907
+ color = chunk6CNJINIT_js.shadeColor2(color, 1 - text.fontShade / 1e5);
6085
5908
  }
6086
5909
  style.color = color;
6087
5910
  applied = true;
@@ -6363,9 +6186,9 @@ function cellStyleToCss(style) {
6363
6186
  if (style.gradientFillCss) {
6364
6187
  css.background = style.gradientFillCss;
6365
6188
  } else if (style.fillMode === "pattern" && style.patternFillPreset) {
6366
- const fg = chunkLARZRLKB_js.normalizeHexColor(style.patternFillForeground, "#000000");
6367
- const bg = chunkLARZRLKB_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6368
- const svgPattern = chunkLARZRLKB_js.getPatternSvg(style.patternFillPreset, fg, bg);
6189
+ const fg = chunk6CNJINIT_js.normalizeHexColor(style.patternFillForeground, "#000000");
6190
+ const bg = chunk6CNJINIT_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6191
+ const svgPattern = chunk6CNJINIT_js.getPatternSvg(style.patternFillPreset, fg, bg);
6369
6192
  if (svgPattern) {
6370
6193
  const encoded = encodeURIComponent(svgPattern);
6371
6194
  css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
@@ -6434,7 +6257,7 @@ function cellStyleToCss(style) {
6434
6257
  if (edge.width || edge.color) {
6435
6258
  const w = edge.width ?? 1;
6436
6259
  const c = edge.color ?? style.borderColor ?? "#000000";
6437
- const s = chunkLARZRLKB_js.ooxmlDashToCssBorderStyle(edge.dash);
6260
+ const s = chunk6CNJINIT_js.ooxmlDashToCssBorderStyle(edge.dash);
6438
6261
  css[edge.prefix] = `${w}px ${s} ${c}`;
6439
6262
  }
6440
6263
  }
@@ -6476,7 +6299,7 @@ function TableResizeOverlay({
6476
6299
  const containerRef = React3.useRef(null);
6477
6300
  const [rowBounds, setRowBounds] = React3.useState([]);
6478
6301
  const dragRef = React3.useRef(null);
6479
- const colBoundaries = React3.useMemo(() => chunkLARZRLKB_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6302
+ const colBoundaries = React3.useMemo(() => chunk6CNJINIT_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6480
6303
  const measureRows = React3.useCallback(() => {
6481
6304
  const container = containerRef.current;
6482
6305
  if (!container) {
@@ -6523,11 +6346,11 @@ function TableResizeOverlay({
6523
6346
  const rect = containerRef.current.getBoundingClientRect();
6524
6347
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
6525
6348
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
6526
- onResizeColumns(chunkLARZRLKB_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6349
+ onResizeColumns(chunk6CNJINIT_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6527
6350
  } else if (drag.type === "row" && onResizeRow) {
6528
6351
  const deltaY = e.clientY - drag.startPos;
6529
- const newHeight = chunkLARZRLKB_js.computeResizedRowHeight(
6530
- drag.initialRowHeight ?? chunkLARZRLKB_js.DEFAULT_ROW_HEIGHT,
6352
+ const newHeight = chunk6CNJINIT_js.computeResizedRowHeight(
6353
+ drag.initialRowHeight ?? chunk6CNJINIT_js.DEFAULT_ROW_HEIGHT,
6531
6354
  deltaY
6532
6355
  );
6533
6356
  onResizeRow(drag.index, newHeight);
@@ -6565,7 +6388,7 @@ function TableResizeOverlay({
6565
6388
  e.stopPropagation();
6566
6389
  const table = containerRef.current?.querySelector("table");
6567
6390
  const tr = table?.querySelectorAll("tbody > tr")[index];
6568
- const actualHeight = tr?.offsetHeight ?? chunkLARZRLKB_js.DEFAULT_ROW_HEIGHT;
6391
+ const actualHeight = tr?.offsetHeight ?? chunk6CNJINIT_js.DEFAULT_ROW_HEIGHT;
6569
6392
  document.body.style.cursor = "row-resize";
6570
6393
  document.body.style.userSelect = "none";
6571
6394
  dragRef.current = {
@@ -6611,7 +6434,7 @@ function renderTableFromTableData(element, textStyle, options) {
6611
6434
  }
6612
6435
  const first = selectedCell.selectedCells[0];
6613
6436
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6614
- return chunkLARZRLKB_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6437
+ return chunk6CNJINIT_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6615
6438
  })();
6616
6439
  return /* @__PURE__ */ jsxRuntime.jsx(
6617
6440
  TableResizeOverlay,
@@ -6644,7 +6467,7 @@ function renderTableFromTableData(element, textStyle, options) {
6644
6467
  return null;
6645
6468
  }
6646
6469
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
6647
- const isInMultiSelection = chunkLARZRLKB_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6470
+ const isInMultiSelection = chunk6CNJINIT_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6648
6471
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
6649
6472
  return /* @__PURE__ */ jsxRuntime.jsx(
6650
6473
  "td",
@@ -6667,7 +6490,7 @@ function renderTableFromTableData(element, textStyle, options) {
6667
6490
  }
6668
6491
  event.stopPropagation();
6669
6492
  if (event.shiftKey && selectedCell) {
6670
- const rect = chunkLARZRLKB_js.computeSelectionRect(
6493
+ const rect = chunk6CNJINIT_js.computeSelectionRect(
6671
6494
  selectedCell.rowIndex,
6672
6495
  selectedCell.columnIndex,
6673
6496
  rowIndex,
@@ -6677,7 +6500,7 @@ function renderTableFromTableData(element, textStyle, options) {
6677
6500
  options?.onSelectCell?.({
6678
6501
  rowIndex: selectedCell.rowIndex,
6679
6502
  columnIndex: selectedCell.columnIndex,
6680
- selectedCells: chunkLARZRLKB_js.rectToCells(rect)
6503
+ selectedCells: chunk6CNJINIT_js.rectToCells(rect)
6681
6504
  });
6682
6505
  } else {
6683
6506
  options?.onSelectCell?.({
@@ -6751,7 +6574,7 @@ function renderTableElement(element, textStyle, options) {
6751
6574
  }
6752
6575
  const first = selectedCell.selectedCells[0];
6753
6576
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6754
- return chunkLARZRLKB_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6577
+ return chunk6CNJINIT_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6755
6578
  })();
6756
6579
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
6757
6580
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6816,7 +6639,7 @@ function renderTableElement(element, textStyle, options) {
6816
6639
  "border px-1 py-0.5 align-top",
6817
6640
  isEditable2 && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
6818
6641
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
6819
- chunkLARZRLKB_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6642
+ chunk6CNJINIT_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6820
6643
  ),
6821
6644
  colSpan,
6822
6645
  rowSpan: rSpan,
@@ -6827,7 +6650,7 @@ function renderTableElement(element, textStyle, options) {
6827
6650
  }
6828
6651
  event.stopPropagation();
6829
6652
  if (event.shiftKey && selectedCell && tableEl.tableData) {
6830
- const rect = chunkLARZRLKB_js.computeSelectionRect(
6653
+ const rect = chunk6CNJINIT_js.computeSelectionRect(
6831
6654
  selectedCell.rowIndex,
6832
6655
  selectedCell.columnIndex,
6833
6656
  rowIndex,
@@ -6837,7 +6660,7 @@ function renderTableElement(element, textStyle, options) {
6837
6660
  options?.onSelectCell?.({
6838
6661
  rowIndex: selectedCell.rowIndex,
6839
6662
  columnIndex: selectedCell.columnIndex,
6840
- selectedCells: chunkLARZRLKB_js.rectToCells(rect)
6663
+ selectedCells: chunk6CNJINIT_js.rectToCells(rect)
6841
6664
  });
6842
6665
  } else {
6843
6666
  options?.onSelectCell?.({
@@ -6889,24 +6712,24 @@ function renderTableElement(element, textStyle, options) {
6889
6712
  }
6890
6713
  var LEGEND_ITEM_WIDTH = 80;
6891
6714
  function partAttrs(part) {
6892
- return part ? chunkLARZRLKB_js.chartPartToAttrs(part) : void 0;
6715
+ return part ? chunk6CNJINIT_js.chartPartToAttrs(part) : void 0;
6893
6716
  }
6894
6717
  function resolveReactPalette(chartData) {
6895
6718
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
6896
6719
  return chartData.colorPalette;
6897
6720
  }
6898
- return [...chunkLARZRLKB_js.getChartStylePalette(chartData.style?.styleId)];
6721
+ return [...chunk6CNJINIT_js.getChartStylePalette(chartData.style?.styleId)];
6899
6722
  }
6900
6723
  function buildReactChartViewModel(element) {
6901
6724
  if (element.type !== "chart" || !element.chartData) {
6902
- return chunkLARZRLKB_js.buildChartViewModel(element);
6725
+ return chunk6CNJINIT_js.buildChartViewModel(element);
6903
6726
  }
6904
6727
  const palette = resolveReactPalette(element.chartData);
6905
6728
  const themedElement = {
6906
6729
  ...element,
6907
6730
  chartData: { ...element.chartData, colorPalette: palette }
6908
6731
  };
6909
- return chunkLARZRLKB_js.buildChartViewModel(themedElement);
6732
+ return chunk6CNJINIT_js.buildChartViewModel(themedElement);
6910
6733
  }
6911
6734
  function renderPrimitive(prim, key) {
6912
6735
  switch (prim.kind) {
@@ -7295,7 +7118,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7295
7118
  const unmatchedRows = [];
7296
7119
  categories.forEach((cat, i) => {
7297
7120
  const value = values[i] ?? 0;
7298
- const code = chunkLARZRLKB_js.resolveRegionCode(cat);
7121
+ const code = chunk6CNJINIT_js.resolveRegionCode(cat);
7299
7122
  if (code) {
7300
7123
  regionValueMap.set(code, { value, label: cat });
7301
7124
  } else {
@@ -7333,8 +7156,8 @@ function renderMapChart(element, chartData, categoryLabels) {
7333
7156
  let fill = "#e2e8f0";
7334
7157
  let dataLabel = null;
7335
7158
  if (entry) {
7336
- const t = chunkLARZRLKB_js.normalizeValue(entry.value, minVal, maxVal);
7337
- fill = chunkLARZRLKB_js.sequentialColorScale(t);
7159
+ const t = chunk6CNJINIT_js.normalizeValue(entry.value, minVal, maxVal);
7160
+ fill = chunk6CNJINIT_js.sequentialColorScale(t);
7338
7161
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
7339
7162
  "text",
7340
7163
  {
@@ -7345,7 +7168,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7345
7168
  fontWeight: 600,
7346
7169
  fill: "#1e293b",
7347
7170
  style: { pointerEvents: "none" },
7348
- children: chunkLARZRLKB_js.formatAxisValue(entry.value)
7171
+ children: chunk6CNJINIT_js.formatAxisValue(entry.value)
7349
7172
  },
7350
7173
  `${element.id}-map-dl-${region.code}`
7351
7174
  );
@@ -7363,7 +7186,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7363
7186
  opacity: 0.9,
7364
7187
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
7365
7188
  region.name,
7366
- entry ? `: ${chunkLARZRLKB_js.formatAxisValue(entry.value)}` : ""
7189
+ entry ? `: ${chunk6CNJINIT_js.formatAxisValue(entry.value)}` : ""
7367
7190
  ] })
7368
7191
  }
7369
7192
  ),
@@ -7401,7 +7224,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7401
7224
  fontSize: 7,
7402
7225
  fill: "#64748b",
7403
7226
  textAnchor: "middle",
7404
- children: chunkLARZRLKB_js.formatAxisValue(minVal)
7227
+ children: chunk6CNJINIT_js.formatAxisValue(minVal)
7405
7228
  },
7406
7229
  `${element.id}-map-legend-min`
7407
7230
  ),
@@ -7413,7 +7236,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7413
7236
  fontSize: 7,
7414
7237
  fill: "#64748b",
7415
7238
  textAnchor: "middle",
7416
- children: chunkLARZRLKB_js.formatAxisValue(maxVal)
7239
+ children: chunk6CNJINIT_js.formatAxisValue(maxVal)
7417
7240
  },
7418
7241
  `${element.id}-map-legend-max`
7419
7242
  )
@@ -7479,7 +7302,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7479
7302
  y,
7480
7303
  fontSize,
7481
7304
  fill: "#475569",
7482
- children: chunkLARZRLKB_js.formatAxisValue(row.value)
7305
+ children: chunk6CNJINIT_js.formatAxisValue(row.value)
7483
7306
  },
7484
7307
  `${element.id}-map-ft-val-${i}`
7485
7308
  )
@@ -7550,7 +7373,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
7550
7373
 
7551
7374
  // src/viewer/utils/chart-overlay-utils.ts
7552
7375
  function sColor(series, idx) {
7553
- return chunkLARZRLKB_js.seriesColor(series, idx);
7376
+ return chunk6CNJINIT_js.seriesColor(series, idx);
7554
7377
  }
7555
7378
  function valToY(val, range, topY, bottomY) {
7556
7379
  const usable = bottomY - topY;
@@ -8045,7 +7868,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
8045
7868
  width: 10,
8046
7869
  height: 10,
8047
7870
  rx: 2,
8048
- fill: chunkLARZRLKB_js.seriesColor(s, i, style?.styleId, colorPalette)
7871
+ fill: chunk6CNJINIT_js.seriesColor(s, i, style?.styleId, colorPalette)
8049
7872
  },
8050
7873
  `${id}-leg-r-${i}`
8051
7874
  )
@@ -8069,7 +7892,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
8069
7892
  width: 10,
8070
7893
  height: 10,
8071
7894
  rx: 2,
8072
- fill: chunkLARZRLKB_js.seriesColor(s, i, style?.styleId, colorPalette)
7895
+ fill: chunk6CNJINIT_js.seriesColor(s, i, style?.styleId, colorPalette)
8073
7896
  }
8074
7897
  ),
8075
7898
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -8082,9 +7905,9 @@ function renderGridlines(id, style, range, layout) {
8082
7905
  }
8083
7906
  const lines = [];
8084
7907
  if (range.logScale && range.logBase) {
8085
- const ticks = chunkLARZRLKB_js.generateLogTicks(range);
7908
+ const ticks = chunk6CNJINIT_js.generateLogTicks(range);
8086
7909
  ticks.forEach((tickVal, i) => {
8087
- const y = chunkLARZRLKB_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7910
+ const y = chunk6CNJINIT_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
8088
7911
  lines.push(
8089
7912
  /* @__PURE__ */ jsxRuntime.jsx(
8090
7913
  "line",
@@ -8105,7 +7928,7 @@ function renderGridlines(id, style, range, layout) {
8105
7928
  const steps = 4;
8106
7929
  for (let i = 0; i <= steps; i++) {
8107
7930
  const val = range.min + range.span * i / steps;
8108
- const y = chunkLARZRLKB_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7931
+ const y = chunk6CNJINIT_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8109
7932
  lines.push(
8110
7933
  /* @__PURE__ */ jsxRuntime.jsx(
8111
7934
  "line",
@@ -8129,9 +7952,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
8129
7952
  const labels = [];
8130
7953
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
8131
7954
  if (range.logScale && range.logBase) {
8132
- const ticks = chunkLARZRLKB_js.generateLogTicks(range);
7955
+ const ticks = chunk6CNJINIT_js.generateLogTicks(range);
8133
7956
  ticks.forEach((tickVal, i) => {
8134
- const y = chunkLARZRLKB_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7957
+ const y = chunk6CNJINIT_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
8135
7958
  labels.push(
8136
7959
  /* @__PURE__ */ jsxRuntime.jsx(
8137
7960
  "text",
@@ -8141,7 +7964,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
8141
7964
  textAnchor: "end",
8142
7965
  fontSize: 8,
8143
7966
  fill: "#64748b",
8144
- children: hasDisplayUnits ? chunkLARZRLKB_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkLARZRLKB_js.formatAxisValue(tickVal)
7967
+ children: hasDisplayUnits ? chunk6CNJINIT_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunk6CNJINIT_js.formatAxisValue(tickVal)
8145
7968
  },
8146
7969
  `${id}-vaxis-log-${i}`
8147
7970
  )
@@ -8151,7 +7974,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
8151
7974
  const steps = 4;
8152
7975
  for (let i = 0; i <= steps; i++) {
8153
7976
  const val = range.min + range.span * i / steps;
8154
- const y = chunkLARZRLKB_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7977
+ const y = chunk6CNJINIT_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8155
7978
  labels.push(
8156
7979
  /* @__PURE__ */ jsxRuntime.jsx(
8157
7980
  "text",
@@ -8161,7 +7984,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
8161
7984
  textAnchor: "end",
8162
7985
  fontSize: 8,
8163
7986
  fill: "#64748b",
8164
- children: hasDisplayUnits ? chunkLARZRLKB_js.formatAxisValueWithUnits(val, axisFormatting) : chunkLARZRLKB_js.formatAxisValue(val)
7987
+ children: hasDisplayUnits ? chunk6CNJINIT_js.formatAxisValueWithUnits(val, axisFormatting) : chunk6CNJINIT_js.formatAxisValue(val)
8165
7988
  },
8166
7989
  `${id}-vaxis-${i}`
8167
7990
  )
@@ -8169,7 +7992,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
8169
7992
  }
8170
7993
  }
8171
7994
  if (hasDisplayUnits) {
8172
- const unitLabel = chunkLARZRLKB_js.getDisplayUnitLabel(
7995
+ const unitLabel = chunk6CNJINIT_js.getDisplayUnitLabel(
8173
7996
  axisFormatting.displayUnits,
8174
7997
  axisFormatting.displayUnitsLabel
8175
7998
  );
@@ -8244,7 +8067,7 @@ function renderZeroLine(id, range, layout) {
8244
8067
  if (range.min >= 0) {
8245
8068
  return null;
8246
8069
  }
8247
- const y = chunkLARZRLKB_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8070
+ const y = chunk6CNJINIT_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8248
8071
  return /* @__PURE__ */ jsxRuntime.jsx(
8249
8072
  "line",
8250
8073
  {
@@ -8268,7 +8091,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8268
8091
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
8269
8092
  for (let i = 0; i <= steps; i++) {
8270
8093
  const val = range.min + range.span * i / steps;
8271
- const y = chunkLARZRLKB_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8094
+ const y = chunk6CNJINIT_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8272
8095
  labels.push(
8273
8096
  /* @__PURE__ */ jsxRuntime.jsx(
8274
8097
  "text",
@@ -8280,7 +8103,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8280
8103
  fontFamily,
8281
8104
  fontWeight,
8282
8105
  fill: fontColor,
8283
- children: hasDisplayUnits ? chunkLARZRLKB_js.formatAxisValueWithUnits(val, axisFormatting) : chunkLARZRLKB_js.formatAxisValue(val)
8106
+ children: hasDisplayUnits ? chunk6CNJINIT_js.formatAxisValueWithUnits(val, axisFormatting) : chunk6CNJINIT_js.formatAxisValue(val)
8284
8107
  },
8285
8108
  `${id}-sec-vaxis-${i}`
8286
8109
  )
@@ -8304,7 +8127,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8304
8127
  );
8305
8128
  }
8306
8129
  if (hasDisplayUnits) {
8307
- const unitLabel = chunkLARZRLKB_js.getDisplayUnitLabel(
8130
+ const unitLabel = chunk6CNJINIT_js.getDisplayUnitLabel(
8308
8131
  axisFormatting.displayUnits,
8309
8132
  axisFormatting.displayUnitsLabel
8310
8133
  );
@@ -8335,7 +8158,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
8335
8158
  const ticks = [];
8336
8159
  for (let i = 0; i <= steps; i++) {
8337
8160
  const val = range.min + range.span * i / steps;
8338
- const y = chunkLARZRLKB_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8161
+ const y = chunk6CNJINIT_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8339
8162
  ticks.push(
8340
8163
  /* @__PURE__ */ jsxRuntime.jsx(
8341
8164
  "line",
@@ -8362,7 +8185,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
8362
8185
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
8363
8186
  for (let i = 0; i <= steps; i++) {
8364
8187
  const val = range.min + range.span * i / steps;
8365
- const y = chunkLARZRLKB_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8188
+ const y = chunk6CNJINIT_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8366
8189
  lines.push(
8367
8190
  /* @__PURE__ */ jsxRuntime.jsx(
8368
8191
  "line",
@@ -8523,7 +8346,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8523
8346
  width: 8,
8524
8347
  height: 8,
8525
8348
  borderRadius: 2,
8526
- backgroundColor: chunkLARZRLKB_js.seriesColor(
8349
+ backgroundColor: chunk6CNJINIT_js.seriesColor(
8527
8350
  s,
8528
8351
  si,
8529
8352
  chartData.style?.styleId,
@@ -8562,8 +8385,8 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8562
8385
  function renderStockChart(element, chartData, categoryLabels) {
8563
8386
  const style = chartData.style;
8564
8387
  const legendPos = style?.legendPosition || "b";
8565
- const range = chunkLARZRLKB_js.computeValueRangeForChart(chartData.series, chartData.axes);
8566
- const layout = chunkLARZRLKB_js.computeLayout(element.width, element.height, style, true, legendPos);
8388
+ const range = chunk6CNJINIT_js.computeValueRangeForChart(chartData.series, chartData.axes);
8389
+ const layout = chunk6CNJINIT_js.computeLayout(element.width, element.height, style, true, legendPos);
8567
8390
  const catCount = Math.max(categoryLabels.length, 1);
8568
8391
  const barGroupWidth = layout.plotWidth / catCount;
8569
8392
  const candleWidth = barGroupWidth * 0.5;
@@ -8584,10 +8407,10 @@ function renderStockChart(element, chartData, categoryLabels) {
8584
8407
  const close = closeSeries.values[ci] ?? high;
8585
8408
  const isUp = close >= open;
8586
8409
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
8587
- const highY = chunkLARZRLKB_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8588
- const lowY = chunkLARZRLKB_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8589
- const openY = chunkLARZRLKB_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8590
- const closeY = chunkLARZRLKB_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8410
+ const highY = chunk6CNJINIT_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8411
+ const lowY = chunk6CNJINIT_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8412
+ const openY = chunk6CNJINIT_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8413
+ const closeY = chunk6CNJINIT_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8591
8414
  elements.push(
8592
8415
  /* @__PURE__ */ jsxRuntime.jsx(
8593
8416
  "line",
@@ -8630,7 +8453,7 @@ function renderStockChart(element, chartData, categoryLabels) {
8630
8453
  textAnchor: "middle",
8631
8454
  fontSize: 7,
8632
8455
  fill: "#334155",
8633
- children: chunkLARZRLKB_js.formatAxisValue(close)
8456
+ children: chunk6CNJINIT_js.formatAxisValue(close)
8634
8457
  },
8635
8458
  `${element.id}-stock-dl-${ci}`
8636
8459
  )
@@ -8672,7 +8495,7 @@ function FailedToLoad() {
8672
8495
  var LazySurfaceChart3DScene = React3__default.default.lazy(
8673
8496
  async () => {
8674
8497
  try {
8675
- return await import('./SurfaceChart3DScene-NWZ2GCPS.js');
8498
+ return await import('./SurfaceChart3DScene-Z64TSGR5.js');
8676
8499
  } catch {
8677
8500
  return { default: FailedToLoad };
8678
8501
  }
@@ -8696,7 +8519,7 @@ var SurfaceChart3DErrorBoundary = class extends React3__default.default.Componen
8696
8519
  function buildSurfaceData(chartData, categoryLabels) {
8697
8520
  const rows = chartData.series.length;
8698
8521
  const cols = Math.max(categoryLabels.length, 1);
8699
- const range = chunkLARZRLKB_js.computeValueRangeForChart(chartData.series, chartData.axes);
8522
+ const range = chunk6CNJINIT_js.computeValueRangeForChart(chartData.series, chartData.axes);
8700
8523
  const heightMap = new Float32Array(rows * cols);
8701
8524
  const colorMap = new Float32Array(rows * cols * 3);
8702
8525
  for (let r = 0; r < rows; r++) {
@@ -8816,8 +8639,8 @@ function darkenRgb(r, g, b, factor) {
8816
8639
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8817
8640
  const style = chartData.style;
8818
8641
  const legendPos = style?.legendPosition || "b";
8819
- const layout = chunkLARZRLKB_js.computeLayout(element.width, element.height, style, false, legendPos);
8820
- const range = chunkLARZRLKB_js.computeValueRangeForChart(chartData.series, chartData.axes);
8642
+ const layout = chunk6CNJINIT_js.computeLayout(element.width, element.height, style, false, legendPos);
8643
+ const range = chunk6CNJINIT_js.computeValueRangeForChart(chartData.series, chartData.axes);
8821
8644
  const catCount = Math.max(categoryLabels.length, 1);
8822
8645
  const seriesCount = chartData.series.length;
8823
8646
  const cols = catCount - 1;
@@ -8907,8 +8730,8 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8907
8730
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
8908
8731
  const style = chartData.style;
8909
8732
  const legendPos = style?.legendPosition || "b";
8910
- const layout = chunkLARZRLKB_js.computeLayout(element.width, element.height, style, true, legendPos);
8911
- const range = chunkLARZRLKB_js.computeValueRangeForChart(chartData.series, chartData.axes);
8733
+ const layout = chunk6CNJINIT_js.computeLayout(element.width, element.height, style, true, legendPos);
8734
+ const range = chunk6CNJINIT_js.computeValueRangeForChart(chartData.series, chartData.axes);
8912
8735
  const catCount = Math.max(categoryLabels.length, 1);
8913
8736
  const seriesCount = chartData.series.length;
8914
8737
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -8971,7 +8794,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
8971
8794
  function renderTreemapChart(element, chartData, categoryLabels) {
8972
8795
  const style = chartData.style;
8973
8796
  const legendPos = style?.legendPosition || "b";
8974
- const layout = chunkLARZRLKB_js.computeLayout(element.width, element.height, style, false, legendPos);
8797
+ const layout = chunk6CNJINIT_js.computeLayout(element.width, element.height, style, false, legendPos);
8975
8798
  const allValues = chartData.series.flatMap((s) => s.values);
8976
8799
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
8977
8800
  const rects = [];
@@ -8994,7 +8817,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
8994
8817
  y: curY,
8995
8818
  width: Math.max(w - 1, 1),
8996
8819
  height: Math.max(h - 1, 1),
8997
- fill: chunkLARZRLKB_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8820
+ fill: chunk6CNJINIT_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8998
8821
  rx: 2,
8999
8822
  opacity: 0.85
9000
8823
  },
@@ -9047,8 +8870,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9047
8870
  const style = chartData.style;
9048
8871
  const legendPos = style?.legendPosition || "b";
9049
8872
  const values = chartData.series[0]?.values ?? [];
9050
- const range = chunkLARZRLKB_js.computeValueRangeForChart(chartData.series, chartData.axes);
9051
- const layout = chunkLARZRLKB_js.computeLayout(element.width, element.height, style, true, legendPos);
8873
+ const range = chunk6CNJINIT_js.computeValueRangeForChart(chartData.series, chartData.axes);
8874
+ const layout = chunk6CNJINIT_js.computeLayout(element.width, element.height, style, true, legendPos);
9052
8875
  const catCount = Math.max(categoryLabels.length, values.length, 1);
9053
8876
  const barWidth = layout.plotWidth / catCount * 0.6;
9054
8877
  const gap = layout.plotWidth / catCount * 0.2;
@@ -9059,8 +8882,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9059
8882
  const isLast = i === values.length - 1;
9060
8883
  const startVal = isLast ? 0 : runningTotal;
9061
8884
  const endVal = isLast ? runningTotal + val : runningTotal + val;
9062
- const barStartY = chunkLARZRLKB_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
9063
- const barEndY = chunkLARZRLKB_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
8885
+ const barStartY = chunk6CNJINIT_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
8886
+ const barEndY = chunk6CNJINIT_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
9064
8887
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
9065
8888
  const y = Math.min(barStartY, barEndY);
9066
8889
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -9089,7 +8912,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9089
8912
  textAnchor: "middle",
9090
8913
  fontSize: 7,
9091
8914
  fill: "#334155",
9092
- children: chunkLARZRLKB_js.formatAxisValue(isLast ? endVal : val)
8915
+ children: chunk6CNJINIT_js.formatAxisValue(isLast ? endVal : val)
9093
8916
  },
9094
8917
  `${element.id}-wf-dl-${i}`
9095
8918
  )
@@ -9137,18 +8960,18 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
9137
8960
  function renderComboChart(element, chartData, categoryLabels) {
9138
8961
  const style = chartData.style;
9139
8962
  const legendPos = style?.legendPosition || "b";
9140
- const layoutOpts = chunkLARZRLKB_js.computeLayoutOptions(
8963
+ const layoutOpts = chunk6CNJINIT_js.computeLayoutOptions(
9141
8964
  chartData.axes,
9142
8965
  chartData.dataTable,
9143
8966
  chartData.series.length
9144
8967
  );
9145
- const layout = chunkLARZRLKB_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
9146
- const { primary, secondary } = chunkLARZRLKB_js.splitSeriesByAxis(chartData.series, chartData.axes);
8968
+ const layout = chunk6CNJINIT_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
8969
+ const { primary, secondary } = chunk6CNJINIT_js.splitSeriesByAxis(chartData.series, chartData.axes);
9147
8970
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
9148
8971
  const secondarySeries = secondary.map((e) => e.series);
9149
- const range = chunkLARZRLKB_js.computeValueRangeForChart(primarySeries, chartData.axes);
9150
- const secondaryRange = secondarySeries.length > 0 ? chunkLARZRLKB_js.computeValueRange(secondarySeries) : void 0;
9151
- const secondaryAxisFmt = chunkLARZRLKB_js.getSecondaryValueAxis(chartData.axes);
8972
+ const range = chunk6CNJINIT_js.computeValueRangeForChart(primarySeries, chartData.axes);
8973
+ const secondaryRange = secondarySeries.length > 0 ? chunk6CNJINIT_js.computeValueRange(secondarySeries) : void 0;
8974
+ const secondaryAxisFmt = chunk6CNJINIT_js.getSecondaryValueAxis(chartData.axes);
9152
8975
  const catCount = Math.max(categoryLabels.length, 1);
9153
8976
  const barSeriesCount = 1;
9154
8977
  const barGroupWidth = layout.plotWidth / catCount;
@@ -9164,8 +8987,8 @@ function renderComboChart(element, chartData, categoryLabels) {
9164
8987
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
9165
8988
  barSeries.values.forEach((val, vi) => {
9166
8989
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
9167
- const zeroY = chunkLARZRLKB_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
9168
- const valY = chunkLARZRLKB_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
8990
+ const zeroY = chunk6CNJINIT_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
8991
+ const valY = chunk6CNJINIT_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
9169
8992
  const y = Math.min(zeroY, valY);
9170
8993
  const h = Math.max(Math.abs(zeroY - valY), 1);
9171
8994
  barElements.push(
@@ -9176,7 +8999,7 @@ function renderComboChart(element, chartData, categoryLabels) {
9176
8999
  y,
9177
9000
  width: barWidth,
9178
9001
  height: h,
9179
- fill: chunkLARZRLKB_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
9002
+ fill: chunk6CNJINIT_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
9180
9003
  rx: 1
9181
9004
  },
9182
9005
  `${element.id}-combo-bar-${vi}`
@@ -9192,7 +9015,7 @@ function renderComboChart(element, chartData, categoryLabels) {
9192
9015
  textAnchor: "middle",
9193
9016
  fontSize: 7,
9194
9017
  fill: "#334155",
9195
- children: chunkLARZRLKB_js.formatAxisValue(val)
9018
+ children: chunk6CNJINIT_js.formatAxisValue(val)
9196
9019
  },
9197
9020
  `${element.id}-combo-bar-dl-${vi}`
9198
9021
  )
@@ -9209,10 +9032,10 @@ function renderComboChart(element, chartData, categoryLabels) {
9209
9032
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
9210
9033
  const points = series.values.map((val, vi) => {
9211
9034
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
9212
- const y = chunkLARZRLKB_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9035
+ const y = chunk6CNJINIT_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9213
9036
  return { x, y, val };
9214
9037
  });
9215
- const c = chunkLARZRLKB_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9038
+ const c = chunk6CNJINIT_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9216
9039
  lineElements.push(
9217
9040
  /* @__PURE__ */ jsxRuntime.jsx(
9218
9041
  "polyline",
@@ -9239,7 +9062,7 @@ function renderComboChart(element, chartData, categoryLabels) {
9239
9062
  textAnchor: "middle",
9240
9063
  fontSize: 7,
9241
9064
  fill: "#334155",
9242
- children: chunkLARZRLKB_js.formatAxisValue(p.val)
9065
+ children: chunk6CNJINIT_js.formatAxisValue(p.val)
9243
9066
  },
9244
9067
  `${element.id}-combo-line-dl-${si}-${vi}`
9245
9068
  )
@@ -10993,14 +10816,14 @@ function buildNotesPdf(pages) {
10993
10816
  notes: page.notes,
10994
10817
  slideNumber: page.slideNumber
10995
10818
  }));
10996
- const bytes = chunkLARZRLKB_js.buildNotesPdfBytes(images, meta);
10819
+ const bytes = chunk6CNJINIT_js.buildNotesPdfBytes(images, meta);
10997
10820
  const blob = new Blob([bytes], { type: "application/pdf" });
10998
10821
  return URL.createObjectURL(blob);
10999
10822
  }
11000
10823
 
11001
10824
  // src/viewer/utils/pdf-builder-slides.ts
11002
10825
  function buildPdfFromImageData(images) {
11003
- const bytes = chunkLARZRLKB_js.buildSlidesPdfBytes(images);
10826
+ const bytes = chunk6CNJINIT_js.buildSlidesPdfBytes(images);
11004
10827
  const blob = new Blob([bytes], { type: "application/pdf" });
11005
10828
  return URL.createObjectURL(blob);
11006
10829
  }
@@ -11009,7 +10832,7 @@ function buildPdfFromImageData(images) {
11009
10832
  var activePreview = null;
11010
10833
  function startPreviewAnimation(elementId, preset, options) {
11011
10834
  stopPreviewAnimation();
11012
- const descriptor = chunkLARZRLKB_js.buildPreviewAnimation(preset, options);
10835
+ const descriptor = chunk6CNJINIT_js.buildPreviewAnimation(preset, options);
11013
10836
  if (!descriptor) {
11014
10837
  return;
11015
10838
  }
@@ -11447,7 +11270,7 @@ function useElementOperations(input) {
11447
11270
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
11448
11271
  const updateElementById = React3.useCallback(
11449
11272
  (elementId, updates) => {
11450
- if (chunkLARZRLKB_js.isTemplateElementId(elementId)) {
11273
+ if (chunk6CNJINIT_js.isTemplateElementId(elementId)) {
11451
11274
  const slideId = activeSlide?.id;
11452
11275
  if (slideId) {
11453
11276
  setTemplateElementsBySlideId((prev) => ({
@@ -11487,7 +11310,7 @@ function useElementOperations(input) {
11487
11310
  );
11488
11311
  const updateSelectedShapeStyle = React3.useCallback(
11489
11312
  (updates) => {
11490
- if (!selectedElement || !chunkS52XBUDM_js.hasShapeProperties(selectedElement)) {
11313
+ if (!selectedElement || !chunkOBLHB72P_js.hasShapeProperties(selectedElement)) {
11491
11314
  return;
11492
11315
  }
11493
11316
  updateSelectedElement({
@@ -11498,17 +11321,17 @@ function useElementOperations(input) {
11498
11321
  );
11499
11322
  const updateSelectedTextStyle = React3.useCallback(
11500
11323
  (updates) => {
11501
- if (!selectedElement || !chunkS52XBUDM_js.hasTextProperties(selectedElement)) {
11324
+ if (!selectedElement || !chunkOBLHB72P_js.hasTextProperties(selectedElement)) {
11502
11325
  return;
11503
11326
  }
11504
- const inlineSel = chunkLARZRLKB_js.getInlineEditorSelection(selectedElement.textSegments);
11327
+ const inlineSel = chunk6CNJINIT_js.getInlineEditorSelection(selectedElement.textSegments);
11505
11328
  if (inlineSel && selectedElement.textSegments) {
11506
- const { newSegments: newSegments2, newSelection } = chunkLARZRLKB_js.applyStyleToSelectedSegments(
11329
+ const { newSegments: newSegments2, newSelection } = chunk6CNJINIT_js.applyStyleToSelectedSegments(
11507
11330
  selectedElement.textSegments,
11508
11331
  inlineSel,
11509
11332
  updates
11510
11333
  );
11511
- chunkLARZRLKB_js.setPendingSelectionRestore(newSelection);
11334
+ chunk6CNJINIT_js.setPendingSelectionRestore(newSelection);
11512
11335
  updateSelectedElement({
11513
11336
  textSegments: newSegments2
11514
11337
  });
@@ -11526,6 +11349,36 @@ function useElementOperations(input) {
11526
11349
  },
11527
11350
  [selectedElement, updateSelectedElement]
11528
11351
  );
11352
+ const updateSelectedTextCase = React3.useCallback(
11353
+ (mode) => {
11354
+ if (!selectedElement || !chunkOBLHB72P_js.hasTextProperties(selectedElement)) {
11355
+ return;
11356
+ }
11357
+ const inlineSel = chunk6CNJINIT_js.getInlineEditorSelection(selectedElement.textSegments);
11358
+ if (inlineSel && selectedElement.textSegments) {
11359
+ const newSegments = chunk6CNJINIT_js.applyCaseTransformToSegments(
11360
+ selectedElement.textSegments,
11361
+ inlineSel,
11362
+ mode
11363
+ );
11364
+ updateSelectedElement({ textSegments: newSegments });
11365
+ return;
11366
+ }
11367
+ const updates = {};
11368
+ if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
11369
+ updates.textSegments = chunk6CNJINIT_js.applyCaseTransformToSegments(
11370
+ selectedElement.textSegments,
11371
+ null,
11372
+ mode
11373
+ );
11374
+ }
11375
+ if (typeof selectedElement.text === "string") {
11376
+ updates.text = chunk6CNJINIT_js.transformTextCase(selectedElement.text, mode);
11377
+ }
11378
+ updateSelectedElement(updates);
11379
+ },
11380
+ [selectedElement, updateSelectedElement]
11381
+ );
11529
11382
  const updateSlides = React3.useCallback(
11530
11383
  (updater) => {
11531
11384
  setSlides((prev) => updater(prev));
@@ -11564,6 +11417,7 @@ function useElementOperations(input) {
11564
11417
  updateSelectedElement,
11565
11418
  updateSelectedShapeStyle,
11566
11419
  updateSelectedTextStyle,
11420
+ updateSelectedTextCase,
11567
11421
  updateSlides,
11568
11422
  activeElements,
11569
11423
  updateActiveElements,
@@ -11574,7 +11428,7 @@ function useSectionOperations(input) {
11574
11428
  const { sections, setSections, slides, setSlides, markDirty } = input;
11575
11429
  const addSection2 = React3.useCallback(
11576
11430
  (name, afterSlideIndex) => {
11577
- const result = chunkLARZRLKB_js.addSection(sections, slides, name, afterSlideIndex);
11431
+ const result = chunk6CNJINIT_js.addSection(sections, slides, name, afterSlideIndex);
11578
11432
  setSlides(result.slides);
11579
11433
  setSections(result.sections);
11580
11434
  markDirty();
@@ -11583,7 +11437,7 @@ function useSectionOperations(input) {
11583
11437
  );
11584
11438
  const renameSection2 = React3.useCallback(
11585
11439
  (sectionId, newName) => {
11586
- const result = chunkLARZRLKB_js.renameSection(sections, slides, sectionId, newName);
11440
+ const result = chunk6CNJINIT_js.renameSection(sections, slides, sectionId, newName);
11587
11441
  setSections(result.sections);
11588
11442
  setSlides(result.slides);
11589
11443
  markDirty();
@@ -11592,7 +11446,7 @@ function useSectionOperations(input) {
11592
11446
  );
11593
11447
  const deleteSection2 = React3.useCallback(
11594
11448
  (sectionId) => {
11595
- const result = chunkLARZRLKB_js.deleteSection(sections, slides, sectionId);
11449
+ const result = chunk6CNJINIT_js.deleteSection(sections, slides, sectionId);
11596
11450
  setSections(result.sections);
11597
11451
  setSlides(result.slides);
11598
11452
  markDirty();
@@ -11601,21 +11455,21 @@ function useSectionOperations(input) {
11601
11455
  );
11602
11456
  const moveSectionUp2 = React3.useCallback(
11603
11457
  (sectionId) => {
11604
- setSections(chunkLARZRLKB_js.moveSectionUp(sections, sectionId));
11458
+ setSections(chunk6CNJINIT_js.moveSectionUp(sections, sectionId));
11605
11459
  markDirty();
11606
11460
  },
11607
11461
  [sections, setSections, markDirty]
11608
11462
  );
11609
11463
  const moveSectionDown2 = React3.useCallback(
11610
11464
  (sectionId) => {
11611
- setSections(chunkLARZRLKB_js.moveSectionDown(sections, sectionId));
11465
+ setSections(chunk6CNJINIT_js.moveSectionDown(sections, sectionId));
11612
11466
  markDirty();
11613
11467
  },
11614
11468
  [sections, setSections, markDirty]
11615
11469
  );
11616
11470
  const moveSlidesToSection2 = React3.useCallback(
11617
11471
  (slideIndexes, targetSectionId) => {
11618
- const result = chunkLARZRLKB_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11472
+ const result = chunk6CNJINIT_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11619
11473
  setSlides(result.slides);
11620
11474
  setSections(result.sections);
11621
11475
  markDirty();
@@ -11634,7 +11488,7 @@ function useSectionOperations(input) {
11634
11488
 
11635
11489
  // src/viewer/hooks/pointer-move-handlers.ts
11636
11490
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
11637
- const resized = chunkLARZRLKB_js.applyResize(
11491
+ const resized = chunk6CNJINIT_js.applyResize(
11638
11492
  { x: startX, y: startY, width: startWidth, height: startHeight },
11639
11493
  handle,
11640
11494
  dx,
@@ -11646,7 +11500,7 @@ function computeResizeGeometry(handle, startX, startY, startWidth, startHeight,
11646
11500
  if (!snapToGrid) {
11647
11501
  return box;
11648
11502
  }
11649
- return chunkLARZRLKB_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11503
+ return chunk6CNJINIT_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11650
11504
  }
11651
11505
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
11652
11506
  const range = startWidth || 200;
@@ -11756,7 +11610,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
11756
11610
  width: el.width,
11757
11611
  height: el.height
11758
11612
  }));
11759
- const snapResult = chunkLARZRLKB_js.computeSnapToShape(
11613
+ const snapResult = chunk6CNJINIT_js.computeSnapToShape(
11760
11614
  targetX,
11761
11615
  targetY,
11762
11616
  primaryEl.width,
@@ -11899,13 +11753,13 @@ function processPointerUp(input) {
11899
11753
  if (i !== activeSlideIndex) {
11900
11754
  return s;
11901
11755
  }
11902
- const rerouted = chunkLARZRLKB_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11756
+ const rerouted = chunk6CNJINIT_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11903
11757
  if (rerouted.length === 0) {
11904
11758
  return s;
11905
11759
  }
11906
11760
  return {
11907
11761
  ...s,
11908
- elements: chunkLARZRLKB_js.applyReroutedConnectors(s.elements, rerouted)
11762
+ elements: chunk6CNJINIT_js.applyReroutedConnectors(s.elements, rerouted)
11909
11763
  };
11910
11764
  })
11911
11765
  );
@@ -11924,9 +11778,9 @@ function processPointerUp(input) {
11924
11778
  }
11925
11779
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
11926
11780
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
11927
- const hitIds = chunkLARZRLKB_js.computeMarqueeHitIds(marquee, sourceElements);
11781
+ const hitIds = chunk6CNJINIT_js.computeMarqueeHitIds(marquee, sourceElements);
11928
11782
  if (marquee.additive) {
11929
- const merged = chunkLARZRLKB_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11783
+ const merged = chunk6CNJINIT_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11930
11784
  if (merged.length > 0) {
11931
11785
  applySelection(merged[0], merged);
11932
11786
  } else {
@@ -11949,8 +11803,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
11949
11803
  }
11950
11804
  return { ...el, x: start.x + dx, y: start.y + dy };
11951
11805
  });
11952
- const rerouted = chunkLARZRLKB_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11953
- return chunkLARZRLKB_js.applyReroutedConnectors(movedElements, rerouted);
11806
+ const rerouted = chunk6CNJINIT_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11807
+ return chunk6CNJINIT_js.applyReroutedConnectors(movedElements, rerouted);
11954
11808
  };
11955
11809
  if (editTemplateMode) {
11956
11810
  const slideId = activeSlide?.id;
@@ -12100,8 +11954,8 @@ function useCanvasInteractions(input) {
12100
11954
  return;
12101
11955
  }
12102
11956
  const el = elementLookup.get(editId);
12103
- if (el && chunkS52XBUDM_js.hasTextProperties(el)) {
12104
- const newSegments = chunkLARZRLKB_js.remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
11957
+ if (el && chunkOBLHB72P_js.hasTextProperties(el)) {
11958
+ const newSegments = chunk6CNJINIT_js.remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
12105
11959
  ops.updateElementById(editId, {
12106
11960
  text: inlineEditingText,
12107
11961
  textSegments: newSegments
@@ -12112,7 +11966,7 @@ function useCanvasInteractions(input) {
12112
11966
  setInlineEditingText("");
12113
11967
  };
12114
11968
  const openEquationEditorForElement = (el) => {
12115
- if (!chunkS52XBUDM_js.hasTextProperties(el)) {
11969
+ if (!chunkOBLHB72P_js.hasTextProperties(el)) {
12116
11970
  return false;
12117
11971
  }
12118
11972
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -12141,7 +11995,7 @@ function useCanvasInteractions(input) {
12141
11995
  justSelectedRef.current = false;
12142
11996
  } else {
12143
11997
  const el = elementLookup.get(elementId);
12144
- if (el && chunkS52XBUDM_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
11998
+ if (el && chunkOBLHB72P_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
12145
11999
  if (!openEquationEditorForElement(el)) {
12146
12000
  setInlineEditingElementId(elementId);
12147
12001
  setInlineEditingText(el.text ?? "");
@@ -12160,7 +12014,7 @@ function useCanvasInteractions(input) {
12160
12014
  if (openEquationEditorForElement(el)) {
12161
12015
  return;
12162
12016
  }
12163
- if (chunkS52XBUDM_js.hasTextProperties(el)) {
12017
+ if (chunkOBLHB72P_js.hasTextProperties(el)) {
12164
12018
  setInlineEditingElementId(elementId);
12165
12019
  setInlineEditingText(el.text ?? "");
12166
12020
  }
@@ -12347,7 +12201,7 @@ function createFileHandlers(deps) {
12347
12201
  h = Math.round(h * scale);
12348
12202
  }
12349
12203
  addElement({
12350
- id: generateElementId(),
12204
+ id: chunk6CNJINIT_js.generateElementId(),
12351
12205
  type: "image",
12352
12206
  x: Math.round((canvasSize.width - w) / 2),
12353
12207
  y: Math.round((canvasSize.height - h) / 2),
@@ -12358,7 +12212,7 @@ function createFileHandlers(deps) {
12358
12212
  };
12359
12213
  img.onerror = () => {
12360
12214
  addElement({
12361
- id: generateElementId(),
12215
+ id: chunk6CNJINIT_js.generateElementId(),
12362
12216
  type: "image",
12363
12217
  x: 100,
12364
12218
  y: 100,
@@ -12384,7 +12238,7 @@ function createFileHandlers(deps) {
12384
12238
  const elFilePath = file.path;
12385
12239
  const insertMediaElement = (mediaSourceUrl, width, height) => {
12386
12240
  addElement({
12387
- id: generateElementId(),
12241
+ id: chunk6CNJINIT_js.generateElementId(),
12388
12242
  type: "media",
12389
12243
  mediaType,
12390
12244
  mediaMimeType: file.type || void 0,
@@ -12559,13 +12413,13 @@ function createStructuredElementHandlers(deps) {
12559
12413
  return;
12560
12414
  }
12561
12415
  addElement({
12562
- id: generateElementId(),
12416
+ id: chunk6CNJINIT_js.generateElementId(),
12563
12417
  type: "smartArt",
12564
12418
  x: 100,
12565
12419
  y: 120,
12566
12420
  width: 600,
12567
12421
  height: 340,
12568
- smartArtData: chunkLARZRLKB_js.buildSmartArtPresetData(
12422
+ smartArtData: chunk6CNJINIT_js.buildSmartArtPresetData(
12569
12423
  layout,
12570
12424
  defaultItems,
12571
12425
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -12577,7 +12431,7 @@ function createStructuredElementHandlers(deps) {
12577
12431
  return;
12578
12432
  }
12579
12433
  addElement({
12580
- id: generateElementId(),
12434
+ id: chunk6CNJINIT_js.generateElementId(),
12581
12435
  type: "shape",
12582
12436
  x: 120,
12583
12437
  y: 200,
@@ -12636,7 +12490,7 @@ function createStructuredElementHandlers(deps) {
12636
12490
  const displayText = value || fieldTexts[fieldType] || fieldType;
12637
12491
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
12638
12492
  addElement({
12639
- id: generateElementId(),
12493
+ id: chunk6CNJINIT_js.generateElementId(),
12640
12494
  type: "shape",
12641
12495
  x: 120,
12642
12496
  y: 200,
@@ -12658,11 +12512,11 @@ function createStructuredElementHandlers(deps) {
12658
12512
  if (!activeSlide) {
12659
12513
  return;
12660
12514
  }
12661
- const preset = chunkLARZRLKB_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12515
+ const preset = chunk6CNJINIT_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12662
12516
  if (!preset) {
12663
12517
  return;
12664
12518
  }
12665
- const defaultPptxAction = chunkS52XBUDM_js.elementActionToPptxAction({
12519
+ const defaultPptxAction = chunkOBLHB72P_js.elementActionToPptxAction({
12666
12520
  trigger: "click",
12667
12521
  type: preset.defaultAction
12668
12522
  });
@@ -12671,7 +12525,7 @@ function createStructuredElementHandlers(deps) {
12671
12525
  defaultPptxAction.highlightClick = true;
12672
12526
  }
12673
12527
  addElement({
12674
- id: generateElementId(),
12528
+ id: chunk6CNJINIT_js.generateElementId(),
12675
12529
  type: "shape",
12676
12530
  x: 150,
12677
12531
  y: 150,
@@ -12738,7 +12592,7 @@ function useInsertElements(input) {
12738
12592
  return;
12739
12593
  }
12740
12594
  addElement({
12741
- id: generateElementId(),
12595
+ id: chunk6CNJINIT_js.generateElementId(),
12742
12596
  type: "text",
12743
12597
  x: 100,
12744
12598
  y: 100,
@@ -12753,7 +12607,7 @@ function useInsertElements(input) {
12753
12607
  return;
12754
12608
  }
12755
12609
  addElement({
12756
- id: generateElementId(),
12610
+ id: chunk6CNJINIT_js.generateElementId(),
12757
12611
  type: "shape",
12758
12612
  x: 150,
12759
12613
  y: 150,
@@ -12772,15 +12626,15 @@ function useInsertElements(input) {
12772
12626
  return;
12773
12627
  }
12774
12628
  addElement({
12775
- ...chunkLARZRLKB_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12776
- id: generateElementId()
12629
+ ...chunk6CNJINIT_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12630
+ id: chunk6CNJINIT_js.generateElementId()
12777
12631
  });
12778
12632
  };
12779
12633
  const handleAddChart = (chartType) => {
12780
12634
  if (!activeSlide) {
12781
12635
  return;
12782
12636
  }
12783
- addElement(chunkLARZRLKB_js.createDefaultChartElement(chartType));
12637
+ addElement(chunk6CNJINIT_js.createDefaultChartElement(chartType));
12784
12638
  };
12785
12639
  const structured = createStructuredElementHandlers({
12786
12640
  activeSlide,
@@ -12850,10 +12704,7 @@ function useClipboardHandlers(input) {
12850
12704
  if (!selectedElement) {
12851
12705
  return;
12852
12706
  }
12853
- setClipboardPayload({
12854
- element: structuredClone(selectedElement),
12855
- isTemplate: editTemplateMode
12856
- });
12707
+ setClipboardPayload(chunk6CNJINIT_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
12857
12708
  };
12858
12709
  const handleDelete = () => {
12859
12710
  const idsToDelete = effectiveSelectedIds;
@@ -12869,29 +12720,23 @@ function useClipboardHandlers(input) {
12869
12720
  handleCopy();
12870
12721
  handleDelete();
12871
12722
  };
12723
+ const insertClone = (source) => {
12724
+ const clone = chunk6CNJINIT_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
12725
+ ops.updateActiveElements((els) => [...els, clone]);
12726
+ ops.applySelection(clone.id);
12727
+ history.markDirty();
12728
+ };
12872
12729
  const handlePaste = () => {
12873
12730
  if (!clipboardPayload || !activeSlide) {
12874
12731
  return;
12875
12732
  }
12876
- const clone = structuredClone(clipboardPayload.element);
12877
- clone.id = makeCloneId(editTemplateMode, clipboardPayload.element.id);
12878
- clone.x += 20;
12879
- clone.y += 20;
12880
- ops.updateActiveElements((els) => [...els, clone]);
12881
- ops.applySelection(clone.id);
12882
- history.markDirty();
12733
+ insertClone(clipboardPayload.element);
12883
12734
  };
12884
12735
  const handleDuplicate = () => {
12885
12736
  if (!selectedElement || !activeSlide) {
12886
12737
  return;
12887
12738
  }
12888
- const clone = structuredClone(selectedElement);
12889
- clone.id = makeCloneId(editTemplateMode, selectedElement.id);
12890
- clone.x += 20;
12891
- clone.y += 20;
12892
- ops.updateActiveElements((els) => [...els, clone]);
12893
- ops.applySelection(clone.id);
12894
- history.markDirty();
12739
+ insertClone(selectedElement);
12895
12740
  };
12896
12741
  return {
12897
12742
  handleCopy,
@@ -12911,7 +12756,7 @@ function resolveShapePath(el) {
12911
12756
  return el.pathData;
12912
12757
  }
12913
12758
  if ("shapeType" in el && typeof el.shapeType === "string") {
12914
- const clipPath = chunkS52XBUDM_js.getPresetShapeClipPath(el.shapeType);
12759
+ const clipPath = chunkOBLHB72P_js.getPresetShapeClipPath(el.shapeType);
12915
12760
  if (clipPath) {
12916
12761
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
12917
12762
  if (svgPath) {
@@ -12962,7 +12807,7 @@ function clipPathToSvgPath(clipPath, width, height) {
12962
12807
  return parts.join(" ");
12963
12808
  }
12964
12809
  function transformPathToGlobal(pathData, el) {
12965
- const polys = chunkS52XBUDM_js.svgPathToPolygons(pathData);
12810
+ const polys = chunkOBLHB72P_js.svgPathToPolygons(pathData);
12966
12811
  if (polys.length === 0) {
12967
12812
  return pathData;
12968
12813
  }
@@ -12982,10 +12827,10 @@ function transformPathToGlobal(pathData, el) {
12982
12827
  y: pt.y * scaleY + el.y
12983
12828
  }))
12984
12829
  );
12985
- return chunkS52XBUDM_js.polygonsToSvgPath(transformed);
12830
+ return chunkOBLHB72P_js.polygonsToSvgPath(transformed);
12986
12831
  }
12987
12832
  function transformPathToLocal(pathData, x, y, _width, _height) {
12988
- const polys = chunkS52XBUDM_js.svgPathToPolygons(pathData);
12833
+ const polys = chunkOBLHB72P_js.svgPathToPolygons(pathData);
12989
12834
  if (polys.length === 0) {
12990
12835
  return pathData;
12991
12836
  }
@@ -12995,10 +12840,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
12995
12840
  y: pt.y - y
12996
12841
  }))
12997
12842
  );
12998
- return chunkS52XBUDM_js.polygonsToSvgPath(transformed);
12843
+ return chunkOBLHB72P_js.polygonsToSvgPath(transformed);
12999
12844
  }
13000
12845
  function pathBounds(pathData) {
13001
- const polys = chunkS52XBUDM_js.svgPathToPolygons(pathData);
12846
+ const polys = chunkOBLHB72P_js.svgPathToPolygons(pathData);
13002
12847
  let minX = Infinity;
13003
12848
  let minY = Infinity;
13004
12849
  let maxX = -Infinity;
@@ -13057,7 +12902,7 @@ function useMergeShapesHandler(input) {
13057
12902
  let allFragments = [];
13058
12903
  let remaining = globalPaths[0];
13059
12904
  for (let i = 1; i < globalPaths.length; i++) {
13060
- const frags = chunkS52XBUDM_js.mergeShapes("fragment", remaining, globalPaths[i]);
12905
+ const frags = chunkOBLHB72P_js.mergeShapes("fragment", remaining, globalPaths[i]);
13061
12906
  if (Array.isArray(frags)) {
13062
12907
  allFragments = frags;
13063
12908
  }
@@ -13086,7 +12931,7 @@ function useMergeShapesHandler(input) {
13086
12931
  bounds.height
13087
12932
  );
13088
12933
  const newEl = {
13089
- id: generateElementId(),
12934
+ id: chunk6CNJINIT_js.generateElementId(),
13090
12935
  type: "shape",
13091
12936
  x: bounds.x,
13092
12937
  y: bounds.y,
@@ -13124,7 +12969,7 @@ function useMergeShapesHandler(input) {
13124
12969
  } else {
13125
12970
  let resultPath = globalPaths[0];
13126
12971
  for (let i = 1; i < globalPaths.length; i++) {
13127
- const result = chunkS52XBUDM_js.mergeShapes(operation, resultPath, globalPaths[i]);
12972
+ const result = chunkOBLHB72P_js.mergeShapes(operation, resultPath, globalPaths[i]);
13128
12973
  if (typeof result === "string") {
13129
12974
  resultPath = result;
13130
12975
  }
@@ -13145,7 +12990,7 @@ function useMergeShapesHandler(input) {
13145
12990
  );
13146
12991
  const primary = targets[0];
13147
12992
  const newEl = {
13148
- id: generateElementId(),
12993
+ id: chunk6CNJINIT_js.generateElementId(),
13149
12994
  type: "shape",
13150
12995
  x: bounds.x,
13151
12996
  y: bounds.y,
@@ -13208,7 +13053,7 @@ function useGroupAlignLayerHandlers(input) {
13208
13053
  if (ids.length < 2 || !activeSlide) {
13209
13054
  return;
13210
13055
  }
13211
- const { elements, groupId } = chunkLARZRLKB_js.groupElements(ops.activeElements, ids, generateElementId());
13056
+ const { elements, groupId } = chunk6CNJINIT_js.groupElements(ops.activeElements, ids, chunk6CNJINIT_js.generateElementId());
13212
13057
  if (groupId === null) {
13213
13058
  return;
13214
13059
  }
@@ -13221,12 +13066,12 @@ function useGroupAlignLayerHandlers(input) {
13221
13066
  return;
13222
13067
  }
13223
13068
  const group = selectedElement;
13224
- const intoTemplate = chunkLARZRLKB_js.isTemplateElementId(group.id);
13069
+ const intoTemplate = chunk6CNJINIT_js.isTemplateElementId(group.id);
13225
13070
  const ungrouped = group.children.map((child) => ({
13226
13071
  ...structuredClone(child),
13227
13072
  // Keep child ids in the same store as the group so later edits route
13228
13073
  // correctly: template groups yield template-prefixed child ids.
13229
- id: intoTemplate ? makeCloneId(true, child.id || group.id) : child.id || generateElementId(),
13074
+ id: intoTemplate ? chunk6CNJINIT_js.makeCloneId(true, child.id || group.id) : child.id || chunk6CNJINIT_js.generateElementId(),
13230
13075
  x: child.x + group.x,
13231
13076
  y: child.y + group.y
13232
13077
  }));
@@ -13250,7 +13095,7 @@ function useGroupAlignLayerHandlers(input) {
13250
13095
  if (!edge) {
13251
13096
  return;
13252
13097
  }
13253
- const positions = chunkLARZRLKB_js.alignElements(selectedElements, edge);
13098
+ const positions = chunk6CNJINIT_js.alignElements(selectedElements, edge);
13254
13099
  for (const [id, pos] of positions) {
13255
13100
  const el = elementLookup.get(id);
13256
13101
  if (!el) {
@@ -13268,7 +13113,7 @@ function useGroupAlignLayerHandlers(input) {
13268
13113
  if (!distAxis) {
13269
13114
  return;
13270
13115
  }
13271
- const positions = chunkLARZRLKB_js.distributeElements(selectedElements, distAxis);
13116
+ const positions = chunk6CNJINIT_js.distributeElements(selectedElements, distAxis);
13272
13117
  for (const [id, pos] of positions) {
13273
13118
  const el = elementLookup.get(id);
13274
13119
  if (!el) {
@@ -13285,7 +13130,7 @@ function useGroupAlignLayerHandlers(input) {
13285
13130
  }
13286
13131
  const id = selectedElement.id;
13287
13132
  ops.updateActiveElements(
13288
- (els) => direction === "forward" ? chunkLARZRLKB_js.bringForward(els, id) : direction === "backward" ? chunkLARZRLKB_js.sendBackward(els, id) : els
13133
+ (els) => direction === "forward" ? chunk6CNJINIT_js.bringForward(els, id) : direction === "backward" ? chunk6CNJINIT_js.sendBackward(els, id) : els
13289
13134
  );
13290
13135
  history.markDirty();
13291
13136
  };
@@ -13295,7 +13140,7 @@ function useGroupAlignLayerHandlers(input) {
13295
13140
  }
13296
13141
  const id = selectedElement.id;
13297
13142
  ops.updateActiveElements(
13298
- (els) => direction === "front" ? chunkLARZRLKB_js.bringToFront(els, id) : chunkLARZRLKB_js.sendToBack(els, id)
13143
+ (els) => direction === "front" ? chunk6CNJINIT_js.bringToFront(els, id) : chunk6CNJINIT_js.sendToBack(els, id)
13299
13144
  );
13300
13145
  history.markDirty();
13301
13146
  };
@@ -13417,7 +13262,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
13417
13262
  function useSlideManagement(input) {
13418
13263
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
13419
13264
  const handleAddSlide = () => {
13420
- const newSlide = chunkLARZRLKB_js.createBlankSlide(slides.length + 1);
13265
+ const newSlide = chunk6CNJINIT_js.createBlankSlide(slides.length + 1);
13421
13266
  ops.updateSlides((prev) => {
13422
13267
  const next = [...prev];
13423
13268
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -13480,7 +13325,7 @@ function useSlideManagement(input) {
13480
13325
  }
13481
13326
  const clone = {
13482
13327
  ...src,
13483
- id: chunkLARZRLKB_js.makeSlideId(),
13328
+ id: chunk6CNJINIT_js.makeSlideId(),
13484
13329
  elements: src.elements.map((el) => ({
13485
13330
  ...el,
13486
13331
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -13512,7 +13357,7 @@ function useSlideManagement(input) {
13512
13357
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
13513
13358
  const insertAt = activeSlideIndex + 1;
13514
13359
  const draft = {
13515
- ...chunkLARZRLKB_js.createBlankSlide(slides.length + 1),
13360
+ ...chunk6CNJINIT_js.createBlankSlide(slides.length + 1),
13516
13361
  layoutPath,
13517
13362
  ...layoutName ? { layoutName } : {}
13518
13363
  };
@@ -13573,7 +13418,7 @@ function createTableMergeHandlers(input) {
13573
13418
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
13574
13419
  return;
13575
13420
  }
13576
- const newTableData = chunkLARZRLKB_js.mergeCells(
13421
+ const newTableData = chunk6CNJINIT_js.mergeCells(
13577
13422
  [
13578
13423
  { row: rowIndex, col: columnIndex },
13579
13424
  { row: rowIndex, col: nextColIdx }
@@ -13581,7 +13426,7 @@ function createTableMergeHandlers(input) {
13581
13426
  td
13582
13427
  );
13583
13428
  const updates = { tableData: newTableData };
13584
- const newRawXml = chunkS52XBUDM_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13429
+ const newRawXml = chunkOBLHB72P_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13585
13430
  if (newRawXml) {
13586
13431
  updates.rawXml = newRawXml;
13587
13432
  }
@@ -13607,7 +13452,7 @@ function createTableMergeHandlers(input) {
13607
13452
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
13608
13453
  return;
13609
13454
  }
13610
- const newTableData = chunkLARZRLKB_js.mergeCells(
13455
+ const newTableData = chunk6CNJINIT_js.mergeCells(
13611
13456
  [
13612
13457
  { row: rowIndex, col: columnIndex },
13613
13458
  { row: targetNextRowIdx, col: columnIndex }
@@ -13615,7 +13460,7 @@ function createTableMergeHandlers(input) {
13615
13460
  td
13616
13461
  );
13617
13462
  const updates = { tableData: newTableData };
13618
- const newRawXml = chunkS52XBUDM_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13463
+ const newRawXml = chunkOBLHB72P_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13619
13464
  if (newRawXml) {
13620
13465
  updates.rawXml = newRawXml;
13621
13466
  }
@@ -13630,9 +13475,9 @@ function createTableMergeHandlers(input) {
13630
13475
  return;
13631
13476
  }
13632
13477
  const td = selectedElement.tableData;
13633
- const newTableData = chunkLARZRLKB_js.mergeCells(ts.selectedCells, td);
13478
+ const newTableData = chunk6CNJINIT_js.mergeCells(ts.selectedCells, td);
13634
13479
  const updates = { tableData: newTableData };
13635
- const newRawXml = chunkS52XBUDM_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13480
+ const newRawXml = chunkOBLHB72P_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13636
13481
  if (newRawXml) {
13637
13482
  updates.rawXml = newRawXml;
13638
13483
  }
@@ -13649,9 +13494,9 @@ function createTableMergeHandlers(input) {
13649
13494
  }
13650
13495
  const { rowIndex, columnIndex } = ts;
13651
13496
  const td = selectedElement.tableData;
13652
- const newTableData = chunkLARZRLKB_js.splitCell(rowIndex, columnIndex, td);
13497
+ const newTableData = chunk6CNJINIT_js.splitCell(rowIndex, columnIndex, td);
13653
13498
  const updates = { tableData: newTableData };
13654
- const newRawXml = chunkS52XBUDM_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13499
+ const newRawXml = chunkOBLHB72P_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13655
13500
  if (newRawXml) {
13656
13501
  updates.rawXml = newRawXml;
13657
13502
  }
@@ -13695,7 +13540,7 @@ function createTableStructHandlers(input) {
13695
13540
  updates.tableData = { ...el.tableData, rows: newRows };
13696
13541
  }
13697
13542
  if (el.rawXml) {
13698
- const newRawXml = chunkS52XBUDM_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
13543
+ const newRawXml = chunkOBLHB72P_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
13699
13544
  if (newRawXml) {
13700
13545
  updates.rawXml = newRawXml;
13701
13546
  }
@@ -13719,7 +13564,7 @@ function createTableStructHandlers(input) {
13719
13564
  const { rowIndex, columnIndex: colIndex } = ts;
13720
13565
  const updates = {};
13721
13566
  if (selectedElement.rawXml) {
13722
- const newRawXml = chunkS52XBUDM_js.updateCellTextStyleInRawXml(
13567
+ const newRawXml = chunkOBLHB72P_js.updateCellTextStyleInRawXml(
13723
13568
  selectedElement,
13724
13569
  rowIndex,
13725
13570
  colIndex,
@@ -13783,9 +13628,9 @@ function createTableStructHandlers(input) {
13783
13628
  return;
13784
13629
  }
13785
13630
  const rowIdx = ts?.rowIndex ?? 0;
13786
- const newTableData = chunkLARZRLKB_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13631
+ const newTableData = chunk6CNJINIT_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13787
13632
  const updates = { tableData: newTableData };
13788
- const newRawXml = chunkS52XBUDM_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13633
+ const newRawXml = chunkOBLHB72P_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13789
13634
  if (newRawXml) {
13790
13635
  updates.rawXml = newRawXml;
13791
13636
  }
@@ -13798,12 +13643,12 @@ function createTableStructHandlers(input) {
13798
13643
  }
13799
13644
  const td = selectedElement.tableData;
13800
13645
  const rowIdx = ts?.rowIndex ?? 0;
13801
- const newTableData = chunkLARZRLKB_js.deleteTableRow(td, rowIdx);
13646
+ const newTableData = chunk6CNJINIT_js.deleteTableRow(td, rowIdx);
13802
13647
  if (newTableData === td) {
13803
13648
  return;
13804
13649
  }
13805
13650
  const updates = { tableData: newTableData };
13806
- const newRawXml = chunkS52XBUDM_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13651
+ const newRawXml = chunkOBLHB72P_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13807
13652
  if (newRawXml) {
13808
13653
  updates.rawXml = newRawXml;
13809
13654
  }
@@ -13815,9 +13660,9 @@ function createTableStructHandlers(input) {
13815
13660
  return;
13816
13661
  }
13817
13662
  const colIdx = ts?.columnIndex ?? 0;
13818
- const newTableData = chunkLARZRLKB_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13663
+ const newTableData = chunk6CNJINIT_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13819
13664
  const updates = { tableData: newTableData };
13820
- const newRawXml = chunkS52XBUDM_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13665
+ const newRawXml = chunkOBLHB72P_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13821
13666
  if (newRawXml) {
13822
13667
  updates.rawXml = newRawXml;
13823
13668
  }
@@ -13830,12 +13675,12 @@ function createTableStructHandlers(input) {
13830
13675
  }
13831
13676
  const td = selectedElement.tableData;
13832
13677
  const colIdx = ts?.columnIndex ?? 0;
13833
- const newTableData = chunkLARZRLKB_js.deleteTableColumn(td, colIdx);
13678
+ const newTableData = chunk6CNJINIT_js.deleteTableColumn(td, colIdx);
13834
13679
  if (newTableData === td) {
13835
13680
  return;
13836
13681
  }
13837
13682
  const updates = { tableData: newTableData };
13838
- const newRawXml = chunkS52XBUDM_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13683
+ const newRawXml = chunkOBLHB72P_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13839
13684
  if (newRawXml) {
13840
13685
  updates.rawXml = newRawXml;
13841
13686
  }
@@ -13868,8 +13713,8 @@ async function renderToCanvas(element, options = {}) {
13868
13713
  return html2canvasPro__default.default(element, {
13869
13714
  ...options,
13870
13715
  onclone: async (doc, clonedEl) => {
13871
- await chunkLARZRLKB_js.normalizeColorsForCapture(doc, clonedEl);
13872
- chunkLARZRLKB_js.preprocessCssForCapture(clonedEl);
13716
+ await chunk6CNJINIT_js.normalizeColorsForCapture(doc, clonedEl);
13717
+ chunk6CNJINIT_js.preprocessCssForCapture(clonedEl);
13873
13718
  if (typeof userOnClone === "function") {
13874
13719
  userOnClone(doc, clonedEl);
13875
13720
  }
@@ -13925,7 +13770,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
13925
13770
  }
13926
13771
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
13927
13772
  const blob = await exportSlideToPngBlob(slideElement, options);
13928
- chunkLARZRLKB_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13773
+ chunk6CNJINIT_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13929
13774
  }
13930
13775
  async function copySlideToClipboard(slideElement, options = {}) {
13931
13776
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -13947,7 +13792,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
13947
13792
  continue;
13948
13793
  }
13949
13794
  const canvas = await renderElementToCanvas(stageEl, scale);
13950
- images.push(chunkLARZRLKB_js.canvasToJpegData(canvas));
13795
+ images.push(chunk6CNJINIT_js.canvasToJpegData(canvas));
13951
13796
  }
13952
13797
  onProgress?.(totalSlides, totalSlides);
13953
13798
  setActiveSlide(currentSlideIndex);
@@ -13955,7 +13800,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
13955
13800
  throw new Error(chunkK74UOJ6P_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
13956
13801
  }
13957
13802
  const pdfBlobUrl = buildPdfFromImageData(images);
13958
- chunkLARZRLKB_js.downloadDataUrl(pdfBlobUrl, filename);
13803
+ chunk6CNJINIT_js.downloadDataUrl(pdfBlobUrl, filename);
13959
13804
  }
13960
13805
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
13961
13806
  const { scale = 2, onProgress } = options;
@@ -14004,7 +13849,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
14004
13849
  throw new Error(chunkK74UOJ6P_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
14005
13850
  }
14006
13851
  const pdfDataUrl = buildNotesPdf(pages);
14007
- chunkLARZRLKB_js.downloadDataUrl(pdfDataUrl, filename);
13852
+ chunk6CNJINIT_js.downloadDataUrl(pdfDataUrl, filename);
14008
13853
  }
14009
13854
 
14010
13855
  // src/viewer/utils/export-video.ts
@@ -14048,7 +13893,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
14048
13893
  const fps = 30;
14049
13894
  const stream = recordingCanvas.captureStream(fps);
14050
13895
  const recorder = new MediaRecorder(stream, {
14051
- mimeType: chunkLARZRLKB_js.pickSupportedMimeType([...chunkLARZRLKB_js.WEBM_MIME_CANDIDATES]),
13896
+ mimeType: chunk6CNJINIT_js.pickSupportedMimeType([...chunk6CNJINIT_js.WEBM_MIME_CANDIDATES]),
14052
13897
  videoBitsPerSecond: 5e6
14053
13898
  });
14054
13899
  const chunks = [];
@@ -14071,8 +13916,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
14071
13916
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
14072
13917
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
14073
13918
  ctx.drawImage(slideCanvases[i], 0, 0);
14074
- const frameInterval = chunkLARZRLKB_js.fpsToFrameIntervalMs(fps);
14075
- const framesNeeded = chunkLARZRLKB_js.segmentFrameCount(duration, fps);
13919
+ const frameInterval = chunk6CNJINIT_js.fpsToFrameIntervalMs(fps);
13920
+ const framesNeeded = chunk6CNJINIT_js.segmentFrameCount(duration, fps);
14076
13921
  for (let f = 0; f < framesNeeded; f++) {
14077
13922
  if (signal?.aborted) {
14078
13923
  recorder.stop();
@@ -14121,7 +13966,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
14121
13966
  if (frames.length === 0) {
14122
13967
  throw new Error(chunkK74UOJ6P_js.translationsEn["pptx.export.errorNoSlidesGif"]);
14123
13968
  }
14124
- const gifBytes = chunkLARZRLKB_js.encodeGif(frames, Math.round(slideDurationMs / 10));
13969
+ const gifBytes = chunk6CNJINIT_js.encodeGif(frames, Math.round(slideDurationMs / 10));
14125
13970
  onProgress?.(totalSlides, totalSlides);
14126
13971
  const buf = new ArrayBuffer(gifBytes.length);
14127
13972
  new Uint8Array(buf).set(gifBytes);
@@ -14193,7 +14038,7 @@ function exportAllSlidesToSvg(data, options = {}) {
14193
14038
  continue;
14194
14039
  }
14195
14040
  onProgress?.(processedCount, data.slides.length);
14196
- let svg = chunkS52XBUDM_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
14041
+ let svg = chunkOBLHB72P_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
14197
14042
  if (embedFonts && fontFaces?.length) {
14198
14043
  svg = injectFontFaces(svg, fontFaces);
14199
14044
  }
@@ -14263,7 +14108,7 @@ function useExportSaveAs(input) {
14263
14108
  setExportProgress(95);
14264
14109
  setExportStatusMessage("Downloading...");
14265
14110
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
14266
- chunkLARZRLKB_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
14111
+ chunk6CNJINIT_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
14267
14112
  setExportProgress(100);
14268
14113
  } catch (err) {
14269
14114
  if (err.name !== "AbortError") {
@@ -14286,7 +14131,7 @@ function useExportSaveAs(input) {
14286
14131
  const blob = new Blob([data], {
14287
14132
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
14288
14133
  });
14289
- chunkLARZRLKB_js.downloadBlob(blob, `${baseName}.${ext}`);
14134
+ chunk6CNJINIT_js.downloadBlob(blob, `${baseName}.${ext}`);
14290
14135
  } catch (err) {
14291
14136
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
14292
14137
  }
@@ -14299,7 +14144,7 @@ function useExportSaveAs(input) {
14299
14144
  const pptxGuides = guides.map((g) => ({
14300
14145
  id: g.id,
14301
14146
  orientation: g.axis === "h" ? "horz" : "vert",
14302
- positionEmu: chunkS52XBUDM_js.guidePxToEmu(g.position)
14147
+ positionEmu: chunkOBLHB72P_js.guidePxToEmu(g.position)
14303
14148
  }));
14304
14149
  return {
14305
14150
  ...slide,
@@ -14362,7 +14207,7 @@ function safeConfirm(message) {
14362
14207
  }
14363
14208
  }
14364
14209
  function downloadBlob2(blob, filename) {
14365
- chunkLARZRLKB_js.downloadBlob(blob, chunkLARZRLKB_js.sanitizeDownloadFilename(filename));
14210
+ chunk6CNJINIT_js.downloadBlob(blob, chunk6CNJINIT_js.sanitizeDownloadFilename(filename));
14366
14211
  }
14367
14212
 
14368
14213
  // src/viewer/hooks/useExportHandlers.ts
@@ -14461,21 +14306,21 @@ function useExportHandlers(input) {
14461
14306
  {
14462
14307
  scale: 2,
14463
14308
  onProgress: (current, total) => {
14464
- setExportProgress(chunkLARZRLKB_js.slideProgressPercent(current, total));
14465
- setExportStatusMessage(chunkLARZRLKB_js.slideStatusLabel("Rendering", current, total));
14309
+ setExportProgress(chunk6CNJINIT_js.slideProgressPercent(current, total));
14310
+ setExportStatusMessage(chunk6CNJINIT_js.slideStatusLabel("Rendering", current, total));
14466
14311
  },
14467
14312
  signal: abortCtrl.signal
14468
14313
  }
14469
14314
  );
14470
- setExportProgress(chunkLARZRLKB_js.EXPORT_ASSEMBLING_PERCENT);
14315
+ setExportProgress(chunk6CNJINIT_js.EXPORT_ASSEMBLING_PERCENT);
14471
14316
  setExportStatusMessage("Building PDF...");
14472
14317
  await new Promise((r) => {
14473
14318
  setTimeout(r, 100);
14474
14319
  });
14475
- setExportProgress(chunkLARZRLKB_js.EXPORT_DONE_PERCENT);
14320
+ setExportProgress(chunk6CNJINIT_js.EXPORT_DONE_PERCENT);
14476
14321
  setExportStatusMessage("Done!");
14477
14322
  } catch (err) {
14478
- if (!chunkLARZRLKB_js.isExportAbortError(err)) {
14323
+ if (!chunk6CNJINIT_js.isExportAbortError(err)) {
14479
14324
  console.error("[PowerPointViewer] PDF export failed:", err);
14480
14325
  }
14481
14326
  } finally {
@@ -14505,21 +14350,21 @@ function useExportHandlers(input) {
14505
14350
  {
14506
14351
  scale: 2,
14507
14352
  onProgress: (current, total) => {
14508
- setExportProgress(chunkLARZRLKB_js.slideProgressPercent(current, total));
14509
- setExportStatusMessage(chunkLARZRLKB_js.slideStatusLabel("Rendering", current, total));
14353
+ setExportProgress(chunk6CNJINIT_js.slideProgressPercent(current, total));
14354
+ setExportStatusMessage(chunk6CNJINIT_js.slideStatusLabel("Rendering", current, total));
14510
14355
  },
14511
14356
  signal: abortCtrl.signal
14512
14357
  }
14513
14358
  );
14514
- setExportProgress(chunkLARZRLKB_js.EXPORT_ASSEMBLING_PERCENT);
14359
+ setExportProgress(chunk6CNJINIT_js.EXPORT_ASSEMBLING_PERCENT);
14515
14360
  setExportStatusMessage("Building PDF...");
14516
14361
  await new Promise((r) => {
14517
14362
  setTimeout(r, 100);
14518
14363
  });
14519
- setExportProgress(chunkLARZRLKB_js.EXPORT_DONE_PERCENT);
14364
+ setExportProgress(chunk6CNJINIT_js.EXPORT_DONE_PERCENT);
14520
14365
  setExportStatusMessage("Done!");
14521
14366
  } catch (err) {
14522
- if (!chunkLARZRLKB_js.isExportAbortError(err)) {
14367
+ if (!chunk6CNJINIT_js.isExportAbortError(err)) {
14523
14368
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
14524
14369
  }
14525
14370
  } finally {
@@ -14560,22 +14405,22 @@ function useExportHandlers(input) {
14560
14405
  scale: 1,
14561
14406
  slideDurationMs: 3e3,
14562
14407
  onProgress: (current, total) => {
14563
- setExportProgress(chunkLARZRLKB_js.slideProgressPercent(current, total, 45));
14564
- setExportStatusMessage(chunkLARZRLKB_js.slideStatusLabel("Capturing", current, total));
14408
+ setExportProgress(chunk6CNJINIT_js.slideProgressPercent(current, total, 45));
14409
+ setExportStatusMessage(chunk6CNJINIT_js.slideStatusLabel("Capturing", current, total));
14565
14410
  },
14566
14411
  onRecordProgress: (current, total) => {
14567
- setExportProgress(chunkLARZRLKB_js.recordProgressPercent(current, total));
14568
- setExportStatusMessage(chunkLARZRLKB_js.slideStatusLabel("Recording", current, total));
14412
+ setExportProgress(chunk6CNJINIT_js.recordProgressPercent(current, total));
14413
+ setExportStatusMessage(chunk6CNJINIT_js.slideStatusLabel("Recording", current, total));
14569
14414
  },
14570
14415
  signal: abortCtrl.signal
14571
14416
  }
14572
14417
  );
14573
- setExportProgress(chunkLARZRLKB_js.EXPORT_ASSEMBLING_PERCENT);
14418
+ setExportProgress(chunk6CNJINIT_js.EXPORT_ASSEMBLING_PERCENT);
14574
14419
  setExportStatusMessage("Saving file...");
14575
14420
  downloadBlob2(blob, "presentation.webm");
14576
- setExportProgress(chunkLARZRLKB_js.EXPORT_DONE_PERCENT);
14421
+ setExportProgress(chunk6CNJINIT_js.EXPORT_DONE_PERCENT);
14577
14422
  } catch (err) {
14578
- if (!chunkLARZRLKB_js.isExportAbortError(err)) {
14423
+ if (!chunk6CNJINIT_js.isExportAbortError(err)) {
14579
14424
  console.error("[PowerPointViewer] Video export failed:", err);
14580
14425
  }
14581
14426
  } finally {
@@ -14603,18 +14448,18 @@ function useExportHandlers(input) {
14603
14448
  scale: 0.5,
14604
14449
  slideDurationMs: 2e3,
14605
14450
  onProgress: (current, total) => {
14606
- setExportProgress(chunkLARZRLKB_js.slideProgressPercent(current, total));
14607
- setExportStatusMessage(chunkLARZRLKB_js.slideStatusLabel("Encoding", current, total));
14451
+ setExportProgress(chunk6CNJINIT_js.slideProgressPercent(current, total));
14452
+ setExportStatusMessage(chunk6CNJINIT_js.slideStatusLabel("Encoding", current, total));
14608
14453
  },
14609
14454
  signal: abortCtrl.signal
14610
14455
  }
14611
14456
  );
14612
- setExportProgress(chunkLARZRLKB_js.EXPORT_ASSEMBLING_PERCENT);
14457
+ setExportProgress(chunk6CNJINIT_js.EXPORT_ASSEMBLING_PERCENT);
14613
14458
  setExportStatusMessage("Saving file...");
14614
14459
  downloadBlob2(blob, "presentation.gif");
14615
- setExportProgress(chunkLARZRLKB_js.EXPORT_DONE_PERCENT);
14460
+ setExportProgress(chunk6CNJINIT_js.EXPORT_DONE_PERCENT);
14616
14461
  } catch (err) {
14617
- if (!chunkLARZRLKB_js.isExportAbortError(err)) {
14462
+ if (!chunk6CNJINIT_js.isExportAbortError(err)) {
14618
14463
  console.error("[PowerPointViewer] GIF export failed:", err);
14619
14464
  }
14620
14465
  } finally {
@@ -14654,7 +14499,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
14654
14499
  }
14655
14500
  printWindow.document.open();
14656
14501
  printWindow.document.write(
14657
- chunkLARZRLKB_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14502
+ chunk6CNJINIT_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14658
14503
  );
14659
14504
  printWindow.document.close();
14660
14505
  printWindow.focus();
@@ -14715,7 +14560,7 @@ function usePrintHandlers(input) {
14715
14560
  if (svgs.length === 0) {
14716
14561
  return;
14717
14562
  }
14718
- const printDoc = chunkLARZRLKB_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14563
+ const printDoc = chunk6CNJINIT_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14719
14564
  title: "Slides (Vector)",
14720
14565
  orientation: settings.orientation,
14721
14566
  colorFilter
@@ -14751,7 +14596,7 @@ function usePrintHandlers(input) {
14751
14596
  if (settings.printWhat === "outline") {
14752
14597
  openPrintWindow(
14753
14598
  "Outline",
14754
- `<div class="outline-page">${chunkLARZRLKB_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14599
+ `<div class="outline-page">${chunk6CNJINIT_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14755
14600
  settings.orientation,
14756
14601
  colorFilter,
14757
14602
  settings.frameSlides
@@ -14776,7 +14621,7 @@ function usePrintHandlers(input) {
14776
14621
  if (settings.printWhat === "slides") {
14777
14622
  openPrintWindow(
14778
14623
  "Slides",
14779
- chunkLARZRLKB_js.buildSlidesHtml(slideImages, slideIndices),
14624
+ chunk6CNJINIT_js.buildSlidesHtml(slideImages, slideIndices),
14780
14625
  settings.orientation,
14781
14626
  colorFilter,
14782
14627
  settings.frameSlides
@@ -14786,7 +14631,7 @@ function usePrintHandlers(input) {
14786
14631
  if (settings.printWhat === "notes") {
14787
14632
  openPrintWindow(
14788
14633
  "Notes Pages",
14789
- chunkLARZRLKB_js.buildNotesHtml(slideImages, slideIndices, slides),
14634
+ chunk6CNJINIT_js.buildNotesHtml(slideImages, slideIndices, slides),
14790
14635
  "portrait",
14791
14636
  colorFilter,
14792
14637
  settings.frameSlides
@@ -14797,7 +14642,7 @@ function usePrintHandlers(input) {
14797
14642
  const spp = settings.slidesPerPage;
14798
14643
  openPrintWindow(
14799
14644
  `Handout ${spp} per page`,
14800
- chunkLARZRLKB_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14645
+ chunk6CNJINIT_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14801
14646
  "portrait",
14802
14647
  colorFilter,
14803
14648
  settings.frameSlides
@@ -14968,7 +14813,7 @@ function useThemeSwitching(input) {
14968
14813
  }
14969
14814
  try {
14970
14815
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
14971
- const newData = chunkS52XBUDM_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
14816
+ const newData = chunkOBLHB72P_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
14972
14817
  onDataChange(newData);
14973
14818
  onThemeChanged?.(preset);
14974
14819
  } catch (error) {
@@ -14985,7 +14830,7 @@ function useThemeSwitching(input) {
14985
14830
  }
14986
14831
  try {
14987
14832
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
14988
- const newData = chunkS52XBUDM_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
14833
+ const newData = chunkOBLHB72P_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
14989
14834
  onDataChange(newData);
14990
14835
  } catch (error) {
14991
14836
  console.error("Failed to switch to custom theme:", error);
@@ -14997,10 +14842,10 @@ function useThemeSwitching(input) {
14997
14842
  if (!data?.theme?.colorScheme) {
14998
14843
  return void 0;
14999
14844
  }
15000
- return chunkS52XBUDM_js.THEME_PRESETS.find((p) => colorSchemesMatch(data.theme?.colorScheme, p.colorScheme));
14845
+ return chunkOBLHB72P_js.THEME_PRESETS.find((p) => colorSchemesMatch(data.theme?.colorScheme, p.colorScheme));
15001
14846
  }, [data?.theme?.colorScheme]);
15002
14847
  return {
15003
- presets: chunkS52XBUDM_js.THEME_PRESETS,
14848
+ presets: chunkOBLHB72P_js.THEME_PRESETS,
15004
14849
  switchToPreset,
15005
14850
  switchToCustom,
15006
14851
  currentPreset
@@ -15018,7 +14863,7 @@ function collectUsedFonts(slides) {
15018
14863
  return Array.from(fonts).sort();
15019
14864
  }
15020
14865
  function collectFontsFromElement(el, fonts) {
15021
- if (chunkS52XBUDM_js.hasTextProperties(el)) {
14866
+ if (chunkOBLHB72P_js.hasTextProperties(el)) {
15022
14867
  if (el.textStyle?.fontFamily) {
15023
14868
  fonts.add(el.textStyle.fontFamily);
15024
14869
  }
@@ -15143,7 +14988,7 @@ function usePropertyHandlers(input) {
15143
14988
  }
15144
14989
  try {
15145
14990
  const ab = await file.arrayBuffer();
15146
- const h = new chunkS52XBUDM_js.PptxHandler();
14991
+ const h = new chunkOBLHB72P_js.PptxHandler();
15147
14992
  const other = await h.load(ab);
15148
14993
  if (!other) {
15149
14994
  return;
@@ -15153,7 +14998,7 @@ function usePropertyHandlers(input) {
15153
14998
  width: canvasSize.width,
15154
14999
  height: canvasSize.height
15155
15000
  };
15156
- setCompareResult(chunkLARZRLKB_js.comparePresentation(cur, other));
15001
+ setCompareResult(chunk6CNJINIT_js.comparePresentation(cur, other));
15157
15002
  setIsComparePanelOpen(true);
15158
15003
  } catch (err) {
15159
15004
  console.warn("Compare failed:", err);
@@ -15303,7 +15148,7 @@ function useIsMobile(input) {
15303
15148
  const containerRef = input?.containerRef;
15304
15149
  const isTouchDevice = React3.useSyncExternalStore(
15305
15150
  subscribeTouchCapability,
15306
- chunkLARZRLKB_js.detectTouchDevice,
15151
+ chunk6CNJINIT_js.detectTouchDevice,
15307
15152
  () => false
15308
15153
  // server snapshot
15309
15154
  );
@@ -15319,7 +15164,7 @@ function useIsMobile(input) {
15319
15164
  }
15320
15165
  return containerRef?.current?.clientHeight ?? window.innerHeight;
15321
15166
  });
15322
- const [orientation, setOrientation] = React3.useState(chunkLARZRLKB_js.detectOrientation);
15167
+ const [orientation, setOrientation] = React3.useState(chunk6CNJINIT_js.detectOrientation);
15323
15168
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = React3.useState(false);
15324
15169
  const [initialViewportHeight] = React3.useState(
15325
15170
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -15363,7 +15208,7 @@ function useIsMobile(input) {
15363
15208
  return;
15364
15209
  }
15365
15210
  const handleOrientationChange = () => {
15366
- setOrientation(chunkLARZRLKB_js.detectOrientation());
15211
+ setOrientation(chunk6CNJINIT_js.detectOrientation());
15367
15212
  };
15368
15213
  if (screen.orientation) {
15369
15214
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -15393,9 +15238,9 @@ function useIsMobile(input) {
15393
15238
  window.addEventListener("resize", handleResize);
15394
15239
  return () => window.removeEventListener("resize", handleResize);
15395
15240
  }, [isTouchDevice, initialViewportHeight]);
15396
- const isMobile = chunkLARZRLKB_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
15397
- const isTablet = !isMobile && containerWidth >= chunkLARZRLKB_js.MOBILE_BREAKPOINT && containerWidth < chunkLARZRLKB_js.TABLET_BREAKPOINT;
15398
- const isDesktop = !isMobile && containerWidth >= chunkLARZRLKB_js.TABLET_BREAKPOINT;
15241
+ const isMobile = chunk6CNJINIT_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
15242
+ const isTablet = !isMobile && containerWidth >= chunk6CNJINIT_js.MOBILE_BREAKPOINT && containerWidth < chunk6CNJINIT_js.TABLET_BREAKPOINT;
15243
+ const isDesktop = !isMobile && containerWidth >= chunk6CNJINIT_js.TABLET_BREAKPOINT;
15399
15244
  return {
15400
15245
  isMobile,
15401
15246
  isTablet,
@@ -15456,11 +15301,11 @@ function useViewerDialogs(input) {
15456
15301
  );
15457
15302
  const [embedFontsEnabled, setEmbedFontsEnabled] = React3.useState(false);
15458
15303
  const [isNarrowViewport, setIsNarrowViewport] = React3.useState(
15459
- () => typeof window !== "undefined" ? chunkLARZRLKB_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
15304
+ () => typeof window !== "undefined" ? chunk6CNJINIT_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
15460
15305
  );
15461
15306
  React3.useEffect(() => {
15462
15307
  const handleWindow = () => setIsNarrowViewport(
15463
- chunkLARZRLKB_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
15308
+ chunk6CNJINIT_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
15464
15309
  );
15465
15310
  let observer = null;
15466
15311
  let raf = 0;
@@ -15474,12 +15319,12 @@ function useViewerDialogs(input) {
15474
15319
  const entry = entries[0];
15475
15320
  if (entry) {
15476
15321
  setIsNarrowViewport(
15477
- chunkLARZRLKB_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
15322
+ chunk6CNJINIT_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
15478
15323
  );
15479
15324
  }
15480
15325
  });
15481
15326
  observer.observe(el);
15482
- setIsNarrowViewport(chunkLARZRLKB_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
15327
+ setIsNarrowViewport(chunk6CNJINIT_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
15483
15328
  };
15484
15329
  attach();
15485
15330
  window.addEventListener("resize", handleWindow);
@@ -15914,13 +15759,13 @@ function useSerialize(input) {
15914
15759
  let processedSlide = slide;
15915
15760
  if (pendingEditId) {
15916
15761
  const updatedElements = slide.elements.map((el) => {
15917
- if (el.id !== pendingEditId || !chunkS52XBUDM_js.hasTextProperties(el)) {
15762
+ if (el.id !== pendingEditId || !chunkOBLHB72P_js.hasTextProperties(el)) {
15918
15763
  return el;
15919
15764
  }
15920
15765
  return {
15921
15766
  ...el,
15922
15767
  text: pendingEditText,
15923
- textSegments: chunkLARZRLKB_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15768
+ textSegments: chunk6CNJINIT_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15924
15769
  };
15925
15770
  });
15926
15771
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -15933,7 +15778,7 @@ function useSerialize(input) {
15933
15778
  const pptxGuides = guides.map((g) => ({
15934
15779
  id: g.id,
15935
15780
  orientation: g.axis === "h" ? "horz" : "vert",
15936
- positionEmu: chunkS52XBUDM_js.guidePxToEmu(g.position)
15781
+ positionEmu: chunkOBLHB72P_js.guidePxToEmu(g.position)
15937
15782
  }));
15938
15783
  return {
15939
15784
  ...processedSlide,
@@ -16313,7 +16158,7 @@ function useEditorOperations(input) {
16313
16158
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
16314
16159
  React3.useEffect(() => {
16315
16160
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
16316
- copiedFormatRef.current = chunkLARZRLKB_js.copyFormatFromElement(selectedElement);
16161
+ copiedFormatRef.current = chunk6CNJINIT_js.copyFormatFromElement(selectedElement);
16317
16162
  } else if (!formatPainterActive) {
16318
16163
  copiedFormatRef.current = null;
16319
16164
  }
@@ -16339,12 +16184,12 @@ function useEditorOperations(input) {
16339
16184
  e.stopPropagation();
16340
16185
  const element = elementLookup.get(elementId);
16341
16186
  if (element) {
16342
- const updated = chunkLARZRLKB_js.applyFormatToElement(element, copiedFormatRef.current);
16187
+ const updated = chunk6CNJINIT_js.applyFormatToElement(element, copiedFormatRef.current);
16343
16188
  const updates = {};
16344
- if (chunkS52XBUDM_js.hasShapeProperties(updated)) {
16189
+ if (chunkOBLHB72P_js.hasShapeProperties(updated)) {
16345
16190
  updates.shapeStyle = updated.shapeStyle;
16346
16191
  }
16347
- if (chunkS52XBUDM_js.hasTextProperties(updated)) {
16192
+ if (chunkOBLHB72P_js.hasTextProperties(updated)) {
16348
16193
  updates.textStyle = updated.textStyle;
16349
16194
  }
16350
16195
  ops.updateElementById(elementId, updates);
@@ -16487,7 +16332,7 @@ function collectReferencedFontFamilies(slides) {
16487
16332
  const families = /* @__PURE__ */ new Set();
16488
16333
  for (const slide of slides) {
16489
16334
  for (const el of slide.elements) {
16490
- if (chunkS52XBUDM_js.hasTextProperties(el) && el.textSegments) {
16335
+ if (chunkOBLHB72P_js.hasTextProperties(el) && el.textSegments) {
16491
16336
  for (const seg of el.textSegments) {
16492
16337
  if (seg.style.fontFamily) {
16493
16338
  families.add(seg.style.fontFamily);
@@ -17285,7 +17130,7 @@ function useYjsProvider({ config }) {
17285
17130
  syncGraceRef.current = setTimeout(() => {
17286
17131
  syncGraceRef.current = null;
17287
17132
  setSynced(true);
17288
- }, chunkLARZRLKB_js.INITIAL_SYNC_GRACE_MS);
17133
+ }, chunk6CNJINIT_js.INITIAL_SYNC_GRACE_MS);
17289
17134
  }, [clearSyncGrace]);
17290
17135
  const teardown = React3.useCallback(() => {
17291
17136
  if (timeoutRef.current) {
@@ -17323,7 +17168,7 @@ function useYjsProvider({ config }) {
17323
17168
  if (config.authToken) {
17324
17169
  opts.password = config.authToken;
17325
17170
  }
17326
- const provider = new WebrtcProvider(chunkLARZRLKB_js.validateRoomId(config.roomId), yDoc, opts);
17171
+ const provider = new WebrtcProvider(chunk6CNJINIT_js.validateRoomId(config.roomId), yDoc, opts);
17327
17172
  setDoc(yDoc);
17328
17173
  setAwareness(provider.awareness);
17329
17174
  setClientId(provider.awareness.clientID);
@@ -17360,12 +17205,12 @@ function useYjsProvider({ config }) {
17360
17205
  if (!config) {
17361
17206
  return;
17362
17207
  }
17363
- const roomId = chunkLARZRLKB_js.validateRoomId(config.roomId);
17208
+ const roomId = chunk6CNJINIT_js.validateRoomId(config.roomId);
17364
17209
  if (config.transport === "webrtc") {
17365
17210
  await initWebrtc();
17366
17211
  return;
17367
17212
  }
17368
- if (chunkLARZRLKB_js.isMixedContentBlocked(config.serverUrl)) {
17213
+ if (chunk6CNJINIT_js.isMixedContentBlocked(config.serverUrl)) {
17369
17214
  console.warn(
17370
17215
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
17371
17216
  );
@@ -17422,7 +17267,7 @@ function useYjsProvider({ config }) {
17422
17267
  cleanupRef.current = null;
17423
17268
  setStatus("error");
17424
17269
  }
17425
- }, chunkLARZRLKB_js.CONNECTION_TIMEOUT_MS);
17270
+ }, chunk6CNJINIT_js.CONNECTION_TIMEOUT_MS);
17426
17271
  }
17427
17272
  setDoc(yDoc);
17428
17273
  setAwareness(provider.awareness);
@@ -17497,7 +17342,7 @@ function usePresenceTracking({
17497
17342
  awareness.setLocalStateField("presence", state);
17498
17343
  lastBroadcastRef.current = Date.now();
17499
17344
  };
17500
- if (elapsed >= chunkLARZRLKB_js.BROADCAST_THROTTLE_MS) {
17345
+ if (elapsed >= chunk6CNJINIT_js.BROADCAST_THROTTLE_MS) {
17501
17346
  if (pendingBroadcastRef.current) {
17502
17347
  clearTimeout(pendingBroadcastRef.current);
17503
17348
  pendingBroadcastRef.current = null;
@@ -17507,7 +17352,7 @@ function usePresenceTracking({
17507
17352
  pendingBroadcastRef.current = setTimeout(() => {
17508
17353
  pendingBroadcastRef.current = null;
17509
17354
  flush();
17510
- }, chunkLARZRLKB_js.BROADCAST_THROTTLE_MS - elapsed);
17355
+ }, chunk6CNJINIT_js.BROADCAST_THROTTLE_MS - elapsed);
17511
17356
  }
17512
17357
  },
17513
17358
  [awareness, userName, userColor, userAvatar, role]
@@ -17532,7 +17377,7 @@ function usePresenceTracking({
17532
17377
  return;
17533
17378
  }
17534
17379
  const handleChange = () => {
17535
- const users = chunkLARZRLKB_js.derivePresenceList(
17380
+ const users = chunk6CNJINIT_js.derivePresenceList(
17536
17381
  awareness.getStates(),
17537
17382
  localClientId,
17538
17383
  canvasWidth,
@@ -17580,7 +17425,7 @@ function useCollaborativeState({
17580
17425
  canvasWidth,
17581
17426
  canvasHeight
17582
17427
  }) {
17583
- const userColor = chunkLARZRLKB_js.sanitizeColor(config?.userColor, "#6366f1");
17428
+ const userColor = chunk6CNJINIT_js.sanitizeColor(config?.userColor, "#6366f1");
17584
17429
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
17585
17430
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
17586
17431
  awareness,
@@ -17683,10 +17528,10 @@ function useYjsDocumentSync({
17683
17528
  return;
17684
17529
  }
17685
17530
  try {
17686
- const { PptxHandler: PptxHandler2 } = await import('./dist-TRWOWXDT.js');
17531
+ const { PptxHandler: PptxHandler2 } = await import('./dist-MVSQ6PWP.js');
17687
17532
  const handler = new PptxHandler2();
17688
17533
  await handler.load(sourceBytes.buffer);
17689
- const currentSlides = chunkLARZRLKB_js.readSlidesFromYDoc(
17534
+ const currentSlides = chunk6CNJINIT_js.readSlidesFromYDoc(
17690
17535
  doc
17691
17536
  );
17692
17537
  const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
@@ -17707,11 +17552,11 @@ function useYjsDocumentSync({
17707
17552
  lastSyncedRef.current = serialized;
17708
17553
  void (async () => {
17709
17554
  const factories = await getFactories();
17710
- chunkLARZRLKB_js.reconcileSlidesInYDoc(
17555
+ chunk6CNJINIT_js.reconcileSlidesInYDoc(
17711
17556
  slides,
17712
17557
  doc,
17713
17558
  factories,
17714
- chunkLARZRLKB_js.LOCAL_SYNC_ORIGIN
17559
+ chunk6CNJINIT_js.LOCAL_SYNC_ORIGIN
17715
17560
  );
17716
17561
  scheduleWriteBack();
17717
17562
  })();
@@ -17721,10 +17566,10 @@ function useYjsDocumentSync({
17721
17566
  return;
17722
17567
  }
17723
17568
  const handleChange = (_events, transaction) => {
17724
- if (transaction?.origin === chunkLARZRLKB_js.LOCAL_SYNC_ORIGIN) {
17569
+ if (transaction?.origin === chunk6CNJINIT_js.LOCAL_SYNC_ORIGIN) {
17725
17570
  return;
17726
17571
  }
17727
- const remoteSlides = chunkLARZRLKB_js.readSlidesFromYDoc(
17572
+ const remoteSlides = chunk6CNJINIT_js.readSlidesFromYDoc(
17728
17573
  doc
17729
17574
  );
17730
17575
  if (remoteSlides.length === 0) {
@@ -17742,7 +17587,7 @@ function useYjsDocumentSync({
17742
17587
  });
17743
17588
  scheduleWriteBack();
17744
17589
  };
17745
- const unobserve = chunkLARZRLKB_js.observeYDocSlides(
17590
+ const unobserve = chunk6CNJINIT_js.observeYDocSlides(
17746
17591
  doc,
17747
17592
  handleChange
17748
17593
  );
@@ -17998,7 +17843,7 @@ function useTouchGestures(input) {
17998
17843
  if (!el || !enabled) {
17999
17844
  return;
18000
17845
  }
18001
- const recognizer = chunkLARZRLKB_js.createTouchGestureRecognizer({
17846
+ const recognizer = chunk6CNJINIT_js.createTouchGestureRecognizer({
18002
17847
  getScale: () => scaleRef.current,
18003
17848
  minScale: MIN_ZOOM_SCALE,
18004
17849
  maxScale: MAX_ZOOM_SCALE,
@@ -18041,7 +17886,7 @@ function scrollFocusedIntoView(keyboardInset) {
18041
17886
  return;
18042
17887
  }
18043
17888
  const rect = active.getBoundingClientRect();
18044
- const delta = chunkLARZRLKB_js.computeScrollDelta(
17889
+ const delta = chunk6CNJINIT_js.computeScrollDelta(
18045
17890
  { top: rect.top, bottom: rect.bottom },
18046
17891
  window.innerHeight,
18047
17892
  keyboardInset
@@ -18061,8 +17906,8 @@ function useKeyboardInsets(enabled = true) {
18061
17906
  return;
18062
17907
  }
18063
17908
  const update = () => {
18064
- const metrics = chunkLARZRLKB_js.readViewportMetrics(window);
18065
- const inset = metrics ? chunkLARZRLKB_js.computeKeyboardInset(metrics) : 0;
17909
+ const metrics = chunk6CNJINIT_js.readViewportMetrics(window);
17910
+ const inset = metrics ? chunk6CNJINIT_js.computeKeyboardInset(metrics) : 0;
18066
17911
  setKeyboardInset(inset);
18067
17912
  if (inset > 0) {
18068
17913
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -18073,8 +17918,8 @@ function useKeyboardInsets(enabled = true) {
18073
17918
  vv.addEventListener("scroll", update);
18074
17919
  const onFocusIn = () => {
18075
17920
  window.requestAnimationFrame(() => {
18076
- const metrics = chunkLARZRLKB_js.readViewportMetrics(window);
18077
- const inset = metrics ? chunkLARZRLKB_js.computeKeyboardInset(metrics) : 0;
17921
+ const metrics = chunk6CNJINIT_js.readViewportMetrics(window);
17922
+ const inset = metrics ? chunk6CNJINIT_js.computeKeyboardInset(metrics) : 0;
18078
17923
  if (inset > 0) {
18079
17924
  scrollFocusedIntoView(inset);
18080
17925
  }
@@ -18087,7 +17932,7 @@ function useKeyboardInsets(enabled = true) {
18087
17932
  document.removeEventListener("focusin", onFocusIn);
18088
17933
  };
18089
17934
  }, [enabled]);
18090
- return { keyboardInset, isKeyboardOpen: chunkLARZRLKB_js.isKeyboardOpen(keyboardInset) };
17935
+ return { keyboardInset, isKeyboardOpen: chunk6CNJINIT_js.isKeyboardOpen(keyboardInset) };
18091
17936
  }
18092
17937
  var LEFT_MIN = 120;
18093
17938
  var LEFT_MAX = 400;