pptx-react-viewer 2.13.1 → 2.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/{AiChatPanel-FXPGFU6H.js → AiChatPanel-F4E3A2DE.js} +22 -22
- package/dist/AiChatPanel-F4E3A2DE.js.br +0 -0
- package/dist/AiChatPanel-F4E3A2DE.js.gz +0 -0
- package/dist/{AiChatPanel-WMGS5TNX.mjs → AiChatPanel-VEULATXX.mjs} +3 -3
- package/dist/AiChatPanel-VEULATXX.mjs.br +0 -0
- package/dist/AiChatPanel-VEULATXX.mjs.gz +0 -0
- package/dist/{Model3DScene-E2XRQAMR.mjs → Model3DScene-KIPEODEJ.mjs} +1 -1
- package/dist/{Model3DScene-E2XRQAMR.mjs.br → Model3DScene-KIPEODEJ.mjs.br} +0 -0
- package/dist/Model3DScene-KIPEODEJ.mjs.gz +0 -0
- package/dist/{Model3DScene-K5FPZTRG.js → Model3DScene-TD2LIHYP.js} +2 -2
- package/dist/Model3DScene-TD2LIHYP.js.br +0 -0
- package/dist/Model3DScene-TD2LIHYP.js.gz +0 -0
- package/dist/{SurfaceChart3DScene-2W2IFPLE.mjs → SurfaceChart3DScene-GRBWZ52S.mjs} +1 -1
- package/dist/{SurfaceChart3DScene-2W2IFPLE.mjs.br → SurfaceChart3DScene-GRBWZ52S.mjs.br} +0 -0
- package/dist/SurfaceChart3DScene-GRBWZ52S.mjs.gz +0 -0
- package/dist/{SurfaceChart3DScene-JDCFTXYT.js → SurfaceChart3DScene-OTKXQH5O.js} +2 -2
- package/dist/SurfaceChart3DScene-OTKXQH5O.js.br +0 -0
- package/dist/SurfaceChart3DScene-OTKXQH5O.js.gz +0 -0
- package/dist/{chunk-3OV4FR6S.mjs → chunk-3HWE6QZG.mjs} +7 -7
- package/dist/chunk-3HWE6QZG.mjs.br +0 -0
- package/dist/chunk-3HWE6QZG.mjs.gz +0 -0
- package/dist/{chunk-QFNJCEMS.js → chunk-BNSCH4WT.js} +327 -327
- package/dist/chunk-BNSCH4WT.js.br +0 -0
- package/dist/chunk-BNSCH4WT.js.gz +0 -0
- package/dist/{chunk-66ZHD7Y4.js → chunk-DOS7NY7C.js} +244 -244
- package/dist/chunk-DOS7NY7C.js.br +0 -0
- package/dist/chunk-DOS7NY7C.js.gz +0 -0
- package/dist/{chunk-ZMIFFURL.js → chunk-EUQ2IER3.js} +1037 -1037
- package/dist/chunk-EUQ2IER3.js.br +0 -0
- package/dist/chunk-EUQ2IER3.js.gz +0 -0
- package/dist/{chunk-DD2YRS6Z.js → chunk-FDR5W67L.js} +160 -50
- package/dist/chunk-FDR5W67L.js.br +0 -0
- package/dist/chunk-FDR5W67L.js.gz +0 -0
- package/dist/{chunk-OWGPRVRK.mjs → chunk-GKOKCOXR.mjs} +160 -50
- package/dist/chunk-GKOKCOXR.mjs.br +0 -0
- package/dist/chunk-GKOKCOXR.mjs.gz +0 -0
- package/dist/{chunk-GJEH27GD.mjs → chunk-GZ6TXBEO.mjs} +2 -2
- package/dist/chunk-GZ6TXBEO.mjs.br +0 -0
- package/dist/{chunk-GJEH27GD.mjs.gz → chunk-GZ6TXBEO.mjs.gz} +0 -0
- package/dist/{chunk-CQ2CKMG4.mjs → chunk-L5YGPCQW.mjs} +1 -1
- package/dist/chunk-L5YGPCQW.mjs.br +0 -0
- package/dist/chunk-L5YGPCQW.mjs.gz +0 -0
- package/dist/{chunk-PTFCMG3A.js → chunk-VY3KLDJF.js} +3 -3
- package/dist/chunk-VY3KLDJF.js.br +0 -0
- package/dist/chunk-VY3KLDJF.js.gz +0 -0
- package/dist/{chunk-H5H57XMH.mjs → chunk-ZFRPPY2N.mjs} +2 -2
- package/dist/chunk-ZFRPPY2N.mjs.br +0 -0
- package/dist/chunk-ZFRPPY2N.mjs.gz +0 -0
- package/dist/index.js +34 -34
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.br +0 -0
- package/dist/index.mjs.gz +0 -0
- package/dist/internals.js +78 -78
- package/dist/internals.js.br +0 -0
- package/dist/internals.js.gz +0 -0
- package/dist/internals.mjs +3 -3
- package/dist/internals.mjs.br +0 -0
- package/dist/internals.mjs.gz +0 -0
- package/dist/viewer/index.js +21 -21
- package/dist/viewer/index.js.br +0 -0
- package/dist/viewer/index.js.gz +0 -0
- package/dist/viewer/index.mjs +5 -5
- package/dist/viewer/index.mjs.br +0 -0
- package/dist/viewer/index.mjs.gz +0 -0
- package/package.json +1 -1
- package/dist/AiChatPanel-FXPGFU6H.js.br +0 -0
- package/dist/AiChatPanel-FXPGFU6H.js.gz +0 -0
- package/dist/AiChatPanel-WMGS5TNX.mjs.br +0 -0
- package/dist/AiChatPanel-WMGS5TNX.mjs.gz +0 -0
- package/dist/Model3DScene-E2XRQAMR.mjs.gz +0 -0
- package/dist/Model3DScene-K5FPZTRG.js.br +0 -0
- package/dist/Model3DScene-K5FPZTRG.js.gz +0 -0
- package/dist/SurfaceChart3DScene-2W2IFPLE.mjs.gz +0 -0
- package/dist/SurfaceChart3DScene-JDCFTXYT.js.br +0 -0
- package/dist/SurfaceChart3DScene-JDCFTXYT.js.gz +0 -0
- package/dist/chunk-3OV4FR6S.mjs.br +0 -0
- package/dist/chunk-3OV4FR6S.mjs.gz +0 -0
- package/dist/chunk-66ZHD7Y4.js.br +0 -0
- package/dist/chunk-66ZHD7Y4.js.gz +0 -0
- package/dist/chunk-CQ2CKMG4.mjs.br +0 -0
- package/dist/chunk-CQ2CKMG4.mjs.gz +0 -0
- package/dist/chunk-DD2YRS6Z.js.br +0 -0
- package/dist/chunk-DD2YRS6Z.js.gz +0 -0
- package/dist/chunk-GJEH27GD.mjs.br +0 -0
- package/dist/chunk-H5H57XMH.mjs.br +0 -0
- package/dist/chunk-H5H57XMH.mjs.gz +0 -0
- package/dist/chunk-OWGPRVRK.mjs.br +0 -0
- package/dist/chunk-OWGPRVRK.mjs.gz +0 -0
- package/dist/chunk-PTFCMG3A.js.br +0 -0
- package/dist/chunk-PTFCMG3A.js.gz +0 -0
- package/dist/chunk-QFNJCEMS.js.br +0 -0
- package/dist/chunk-QFNJCEMS.js.gz +0 -0
- package/dist/chunk-ZMIFFURL.js.br +0 -0
- package/dist/chunk-ZMIFFURL.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkBXAK3JFM_js = require('./chunk-BXAK3JFM.js');
|
|
4
|
-
var
|
|
4
|
+
var chunkFDR5W67L_js = require('./chunk-FDR5W67L.js');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var React6 = require('react');
|
|
@@ -15,7 +15,7 @@ var React6__default = /*#__PURE__*/_interopDefault(React6);
|
|
|
15
15
|
|
|
16
16
|
// src/viewer/utils/animation-effects.ts
|
|
17
17
|
function getAnimationInitialStyle2(preset, nativeAnimation) {
|
|
18
|
-
return
|
|
18
|
+
return chunkFDR5W67L_js.getAnimationInitialStyle(preset, nativeAnimation);
|
|
19
19
|
}
|
|
20
20
|
function cn(...inputs) {
|
|
21
21
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
@@ -23,7 +23,7 @@ function cn(...inputs) {
|
|
|
23
23
|
|
|
24
24
|
// src/viewer/utils/clone.ts
|
|
25
25
|
function cloneHistorySnapshot2(snapshot) {
|
|
26
|
-
return
|
|
26
|
+
return chunkFDR5W67L_js.cloneHistorySnapshot(snapshot);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
// src/viewer/constants/scalar.ts
|
|
@@ -63,7 +63,7 @@ var TOOLBAR_SECTIONS = [
|
|
|
63
63
|
{ id: "view", labelKey: "pptx.ribbon.tab.view" },
|
|
64
64
|
{ id: "help", labelKey: "pptx.ribbon.tab.help" }
|
|
65
65
|
];
|
|
66
|
-
var SHORTCUT_REFERENCE_ITEMS =
|
|
66
|
+
var SHORTCUT_REFERENCE_ITEMS = chunkFDR5W67L_js.VIEWER_SHORTCUT_REFERENCE;
|
|
67
67
|
|
|
68
68
|
// src/viewer/constants/theme.ts
|
|
69
69
|
var THEME_COLOR_SWATCHES = [
|
|
@@ -107,7 +107,7 @@ var GLYPH_COMPONENTS = {
|
|
|
107
107
|
plus: lu.LuPlus,
|
|
108
108
|
triangle: lu.LuTriangle
|
|
109
109
|
};
|
|
110
|
-
var SHAPE_PRESETS =
|
|
110
|
+
var SHAPE_PRESETS = chunkFDR5W67L_js.SHAPE_PRESET_DEFS.map(
|
|
111
111
|
(def) => ({
|
|
112
112
|
type: def.type,
|
|
113
113
|
label: def.label,
|
|
@@ -266,7 +266,7 @@ function isConnectorOrLineElement(element) {
|
|
|
266
266
|
if (element.type === "connector") {
|
|
267
267
|
return true;
|
|
268
268
|
}
|
|
269
|
-
if (!
|
|
269
|
+
if (!chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
270
270
|
return false;
|
|
271
271
|
}
|
|
272
272
|
const st = getShapeType(element.shapeType);
|
|
@@ -277,12 +277,12 @@ function isConnectorOrLineElement(element) {
|
|
|
277
277
|
function partitionTemplateElements(slides) {
|
|
278
278
|
const templateElementsBySlideId = {};
|
|
279
279
|
const nextSlides = slides.map((slide) => {
|
|
280
|
-
const template = slide.elements.filter((el) =>
|
|
280
|
+
const template = slide.elements.filter((el) => chunkFDR5W67L_js.isTemplateElement(el));
|
|
281
281
|
if (template.length === 0) {
|
|
282
282
|
return slide;
|
|
283
283
|
}
|
|
284
284
|
templateElementsBySlideId[slide.id] = template;
|
|
285
|
-
return { ...slide, elements: slide.elements.filter((el) => !
|
|
285
|
+
return { ...slide, elements: slide.elements.filter((el) => !chunkFDR5W67L_js.isTemplateElement(el)) };
|
|
286
286
|
});
|
|
287
287
|
return { slides: nextSlides, templateElementsBySlideId };
|
|
288
288
|
}
|
|
@@ -298,7 +298,7 @@ function buildSaveSlides(slides, templateElementsBySlideId) {
|
|
|
298
298
|
|
|
299
299
|
// src/viewer/utils/image-style.ts
|
|
300
300
|
function getImageMaskStyle(element) {
|
|
301
|
-
if (!
|
|
301
|
+
if (!chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
302
302
|
return void 0;
|
|
303
303
|
}
|
|
304
304
|
const shapeType = element.shapeType;
|
|
@@ -307,7 +307,7 @@ function getImageMaskStyle(element) {
|
|
|
307
307
|
}
|
|
308
308
|
const normalized = shapeType.toLowerCase();
|
|
309
309
|
if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
|
|
310
|
-
const radiusPx =
|
|
310
|
+
const radiusPx = chunkFDR5W67L_js.getRoundRectRadiusPx(element);
|
|
311
311
|
if (radiusPx <= 0.01) {
|
|
312
312
|
return void 0;
|
|
313
313
|
}
|
|
@@ -319,7 +319,7 @@ function getImageMaskStyle(element) {
|
|
|
319
319
|
if (normalized === "can" || normalized === "cylinder") {
|
|
320
320
|
return { borderRadius: "48% / 12%" };
|
|
321
321
|
}
|
|
322
|
-
const clipPath =
|
|
322
|
+
const clipPath = chunkFDR5W67L_js.getResolvedShapeClipPath(element);
|
|
323
323
|
if (!clipPath) {
|
|
324
324
|
return void 0;
|
|
325
325
|
}
|
|
@@ -328,7 +328,7 @@ function getImageMaskStyle(element) {
|
|
|
328
328
|
function getImageRenderStyle(element) {
|
|
329
329
|
return {
|
|
330
330
|
...getImageMaskStyle(element) || {},
|
|
331
|
-
...
|
|
331
|
+
...chunkFDR5W67L_js.getImageFitStyle(element)
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
334
|
var CROP_SHAPE_CLIP_PATHS = {
|
|
@@ -341,7 +341,7 @@ var CROP_SHAPE_CLIP_PATHS = {
|
|
|
341
341
|
star: "polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)"
|
|
342
342
|
};
|
|
343
343
|
function getCropShapeClipPath(element) {
|
|
344
|
-
if (!
|
|
344
|
+
if (!chunkFDR5W67L_js.isImageLikeElement(element)) {
|
|
345
345
|
return void 0;
|
|
346
346
|
}
|
|
347
347
|
const shape = element.cropShape;
|
|
@@ -351,7 +351,7 @@ function getCropShapeClipPath(element) {
|
|
|
351
351
|
return CROP_SHAPE_CLIP_PATHS[shape];
|
|
352
352
|
}
|
|
353
353
|
function isImageTiled(element) {
|
|
354
|
-
if (!
|
|
354
|
+
if (!chunkFDR5W67L_js.isImageLikeElement(element)) {
|
|
355
355
|
return false;
|
|
356
356
|
}
|
|
357
357
|
return typeof element.tileScaleX === "number" || typeof element.tileScaleY === "number";
|
|
@@ -409,7 +409,7 @@ function buildMirrorTiledBackground(src, flip, scaleX, scaleY) {
|
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
function getImageTilingStyle(element) {
|
|
412
|
-
if (!
|
|
412
|
+
if (!chunkFDR5W67L_js.isImageLikeElement(element) || !isImageTiled(element)) {
|
|
413
413
|
return void 0;
|
|
414
414
|
}
|
|
415
415
|
const scaleX = typeof element.tileScaleX === "number" ? element.tileScaleX * 100 : 100;
|
|
@@ -659,9 +659,9 @@ function registerMediaElement(elementId, el) {
|
|
|
659
659
|
};
|
|
660
660
|
}
|
|
661
661
|
function executeMediaCommand(command, frameRoot) {
|
|
662
|
-
return
|
|
662
|
+
return chunkFDR5W67L_js.runMediaCommand(
|
|
663
663
|
command,
|
|
664
|
-
(targetId) => registry.get(targetId) ??
|
|
664
|
+
(targetId) => registry.get(targetId) ?? chunkFDR5W67L_js.findMediaElementByElementId(targetId, frameRoot?.())
|
|
665
665
|
);
|
|
666
666
|
}
|
|
667
667
|
function PresentationMediaController({
|
|
@@ -705,7 +705,7 @@ function PresentationMediaController({
|
|
|
705
705
|
loop: shouldLoop,
|
|
706
706
|
volume: playbackVolume,
|
|
707
707
|
playbackRate
|
|
708
|
-
} =
|
|
708
|
+
} = chunkFDR5W67L_js.mediaPlaybackAttributes({
|
|
709
709
|
loop: element.loop,
|
|
710
710
|
volume: element.volume,
|
|
711
711
|
playbackSpeed: element.playbackSpeed
|
|
@@ -841,7 +841,7 @@ function PresentationMediaController({
|
|
|
841
841
|
if (element.playAcrossSlides && element.mediaType === "audio") {
|
|
842
842
|
const dataUrl = element.mediaData ?? resolvedDataUrl;
|
|
843
843
|
if (dataUrl) {
|
|
844
|
-
|
|
844
|
+
chunkFDR5W67L_js.registerPersistentAudio(
|
|
845
845
|
element.id,
|
|
846
846
|
dataUrl,
|
|
847
847
|
element.mediaMimeType,
|
|
@@ -912,7 +912,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
912
912
|
const dataUrl = element.mediaData ?? (mediaPath ? mediaDataUrls.get(mediaPath) : void 0);
|
|
913
913
|
const trimFragment = buildTrimFragment(element);
|
|
914
914
|
const posterUrl = element.posterFrameData ?? void 0;
|
|
915
|
-
const shouldLoop =
|
|
915
|
+
const shouldLoop = chunkFDR5W67L_js.mediaPlaybackAttributes(element).loop;
|
|
916
916
|
const shouldAutoPlay = options?.autoPlay === true || element.autoPlay === true;
|
|
917
917
|
const isFullScreen = options?.fullScreen === true;
|
|
918
918
|
const isPresentationMode = options?.isPresentationMode === true;
|
|
@@ -1078,7 +1078,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
|
|
|
1078
1078
|
|
|
1079
1079
|
// src/viewer/utils/text-utils.tsx
|
|
1080
1080
|
function getTextStyleForElement(element, fallbackColor) {
|
|
1081
|
-
return
|
|
1081
|
+
return chunkFDR5W67L_js.buildTextBlockStyle(element, { fallbackColor });
|
|
1082
1082
|
}
|
|
1083
1083
|
|
|
1084
1084
|
// src/viewer/utils/text-layout.tsx
|
|
@@ -1103,13 +1103,13 @@ function computeTabSize(tabStops, defaultTabSize) {
|
|
|
1103
1103
|
return avgGap > 0 ? `${Math.round(avgGap)}px` : fromDefault;
|
|
1104
1104
|
}
|
|
1105
1105
|
function getTextLayoutStyle(element) {
|
|
1106
|
-
if (!
|
|
1106
|
+
if (!chunkFDR5W67L_js.hasTextProperties(element)) {
|
|
1107
1107
|
return {};
|
|
1108
1108
|
}
|
|
1109
1109
|
const verticalAlign = element.textStyle?.vAlign || "top";
|
|
1110
|
-
const writingMode =
|
|
1111
|
-
const textOrientation =
|
|
1112
|
-
const verticalDirection =
|
|
1110
|
+
const writingMode = chunkFDR5W67L_js.toCssWritingMode(element.textStyle?.textDirection);
|
|
1111
|
+
const textOrientation = chunkFDR5W67L_js.toCssTextOrientation(element.textStyle?.textDirection);
|
|
1112
|
+
const verticalDirection = chunkFDR5W67L_js.toCssVerticalDirection(element.textStyle?.textDirection);
|
|
1113
1113
|
const parsedColumnCount = Number(element.textStyle?.columnCount);
|
|
1114
1114
|
const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
|
|
1115
1115
|
const hasColumns = columnCount > 1;
|
|
@@ -1117,7 +1117,7 @@ function getTextLayoutStyle(element) {
|
|
|
1117
1117
|
const tabStops = element.textStyle?.tabStops;
|
|
1118
1118
|
const tabSize = computeTabSize(tabStops, element.textStyle?.defaultTabSize);
|
|
1119
1119
|
const textWrapNone = element.textStyle?.textWrap === "none";
|
|
1120
|
-
const hasParagraphIndents =
|
|
1120
|
+
const hasParagraphIndents = chunkFDR5W67L_js.hasTextProperties(element) && element.paragraphIndents && element.paragraphIndents.length > 0;
|
|
1121
1121
|
const paragraphMarginLeft = element.textStyle?.paragraphMarginLeft;
|
|
1122
1122
|
const paragraphIndent = element.textStyle?.paragraphIndent;
|
|
1123
1123
|
const marginLeft = !hasParagraphIndents && typeof paragraphMarginLeft === "number" && paragraphMarginLeft !== 0 ? paragraphMarginLeft : void 0;
|
|
@@ -1126,7 +1126,7 @@ function getTextLayoutStyle(element) {
|
|
|
1126
1126
|
const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
|
|
1127
1127
|
const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
|
|
1128
1128
|
const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
|
|
1129
|
-
const kinsokuStyles =
|
|
1129
|
+
const kinsokuStyles = chunkFDR5W67L_js.getKinsokuLineBreakStyles(element.textStyle);
|
|
1130
1130
|
if (hasColumns) {
|
|
1131
1131
|
return {
|
|
1132
1132
|
display: "block",
|
|
@@ -1173,10 +1173,10 @@ function getTextLayoutStyle(element) {
|
|
|
1173
1173
|
|
|
1174
1174
|
// src/viewer/utils/text-effects.tsx
|
|
1175
1175
|
function buildTextFillCss2(style) {
|
|
1176
|
-
return
|
|
1176
|
+
return chunkFDR5W67L_js.buildTextFillCss(style);
|
|
1177
1177
|
}
|
|
1178
1178
|
function buildTextBody3DSceneStyle2(textStyle) {
|
|
1179
|
-
return
|
|
1179
|
+
return chunkFDR5W67L_js.buildTextBody3DSceneStyle(textStyle);
|
|
1180
1180
|
}
|
|
1181
1181
|
|
|
1182
1182
|
// src/viewer/utils/text-warp-css.tsx
|
|
@@ -1361,13 +1361,13 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1361
1361
|
if (!subElementAnimStates || subElementAnimStates.size === 0) {
|
|
1362
1362
|
return renderedSegments;
|
|
1363
1363
|
}
|
|
1364
|
-
const paraKey = `${elementId}${
|
|
1364
|
+
const paraKey = `${elementId}${chunkFDR5W67L_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
|
|
1365
1365
|
const paraState = subElementAnimStates.get(paraKey);
|
|
1366
1366
|
if (paraState) {
|
|
1367
1367
|
const style = buildAnimStyle(paraState);
|
|
1368
1368
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
|
|
1369
1369
|
}
|
|
1370
|
-
const spec =
|
|
1370
|
+
const spec = chunkFDR5W67L_js.buildTextBuildSpec(
|
|
1371
1371
|
elementId,
|
|
1372
1372
|
paraIndex,
|
|
1373
1373
|
paraSegments.map((entry) => ({ text: entry.segment.text, style: entry })),
|
|
@@ -1385,7 +1385,7 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
|
|
|
1385
1385
|
"span",
|
|
1386
1386
|
{
|
|
1387
1387
|
"data-anim-id": span.animId,
|
|
1388
|
-
style:
|
|
1388
|
+
style: chunkFDR5W67L_js.textBuildSpanStyle(span),
|
|
1389
1389
|
children: content
|
|
1390
1390
|
},
|
|
1391
1391
|
span.animId
|
|
@@ -1529,10 +1529,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1529
1529
|
if (!needsScriptFonts || !text) {
|
|
1530
1530
|
return text;
|
|
1531
1531
|
}
|
|
1532
|
-
const runs =
|
|
1532
|
+
const runs = chunkFDR5W67L_js.segmentByScript(text);
|
|
1533
1533
|
if (runs.length <= 1) {
|
|
1534
1534
|
if (runs.length === 1) {
|
|
1535
|
-
const font =
|
|
1535
|
+
const font = chunkFDR5W67L_js.resolveFontForScript(runs[0].script, scriptFonts);
|
|
1536
1536
|
if (font && font !== baseFontFamily) {
|
|
1537
1537
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
|
|
1538
1538
|
}
|
|
@@ -1540,7 +1540,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
|
|
|
1540
1540
|
return text;
|
|
1541
1541
|
}
|
|
1542
1542
|
return runs.map((run, i) => {
|
|
1543
|
-
const font =
|
|
1543
|
+
const font = chunkFDR5W67L_js.resolveFontForScript(run.script, scriptFonts);
|
|
1544
1544
|
if (!font || font === baseFontFamily) {
|
|
1545
1545
|
return /* @__PURE__ */ jsxRuntime.jsx(React6__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
|
|
1546
1546
|
}
|
|
@@ -1612,8 +1612,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
|
|
|
1612
1612
|
);
|
|
1613
1613
|
}
|
|
1614
1614
|
function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
|
|
1615
|
-
const mathml =
|
|
1616
|
-
const safeMathml = mathml ?
|
|
1615
|
+
const mathml = chunkFDR5W67L_js.convertOmmlToMathMl(equationXml);
|
|
1616
|
+
const safeMathml = mathml ? chunkFDR5W67L_js.sanitizeMathMl(mathml) : "";
|
|
1617
1617
|
const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1618
1618
|
"span",
|
|
1619
1619
|
{
|
|
@@ -1663,7 +1663,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
|
|
|
1663
1663
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
|
|
1664
1664
|
}
|
|
1665
1665
|
function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
|
|
1666
|
-
const picture =
|
|
1666
|
+
const picture = chunkFDR5W67L_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
|
|
1667
1667
|
sizePx: baseFontSize,
|
|
1668
1668
|
fallbackMarker: "\u2022",
|
|
1669
1669
|
accessibleLabel: "Bullet"
|
|
@@ -1714,7 +1714,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1714
1714
|
}
|
|
1715
1715
|
const segmentStyle = segment.style || {};
|
|
1716
1716
|
const rawText = bulletInfo && typeof bulletHangPx === "number" ? (segment.text || "").trimEnd() : segment.text || "";
|
|
1717
|
-
const textValue =
|
|
1717
|
+
const textValue = chunkFDR5W67L_js.substituteFieldText(rawText, segment.fieldType, fieldContext);
|
|
1718
1718
|
const lines = textValue.split("\n");
|
|
1719
1719
|
const textDecorationTokens = [];
|
|
1720
1720
|
if (segmentStyle.underline || segmentStyle.hyperlink) {
|
|
@@ -1724,28 +1724,28 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1724
1724
|
textDecorationTokens.push("line-through");
|
|
1725
1725
|
}
|
|
1726
1726
|
const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
|
|
1727
|
-
const resolvedSegmentColor = segmentStyle.hyperlink ?
|
|
1728
|
-
const underlineDecoration =
|
|
1727
|
+
const resolvedSegmentColor = segmentStyle.hyperlink ? chunkFDR5W67L_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkFDR5W67L_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
|
|
1728
|
+
const underlineDecoration = chunkFDR5W67L_js.resolveUnderlineDecorationStyle(
|
|
1729
1729
|
Boolean(isDoubleStrike),
|
|
1730
1730
|
segmentStyle.underlineStyle
|
|
1731
1731
|
);
|
|
1732
1732
|
const rawBaseline = typeof segmentStyle.baseline === "number" ? segmentStyle.baseline : 0;
|
|
1733
1733
|
const baselineFraction = rawBaseline === 0 ? 0 : Math.abs(rawBaseline) >= 1e3 ? rawBaseline / 1e5 : rawBaseline / 100;
|
|
1734
1734
|
const baselineFontScale = baselineFraction !== 0 ? 0.65 : 1;
|
|
1735
|
-
const letterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? `calc(${segmentStyle.characterSpacing / 100 * (96 / 72)}px + ${
|
|
1735
|
+
const letterSpacing = typeof segmentStyle.characterSpacing === "number" && segmentStyle.characterSpacing !== 0 ? `calc(${segmentStyle.characterSpacing / 100 * (96 / 72)}px + ${chunkFDR5W67L_js.POWERPOINT_METRIC_TRACKING})` : chunkFDR5W67L_js.POWERPOINT_METRIC_TRACKING;
|
|
1736
1736
|
const textFillStyles = buildTextFillCss2(segmentStyle);
|
|
1737
1737
|
const rawFontSize = segmentStyle.fontSize || element.textStyle?.fontSize || DEFAULT_TEXT_FONT_SIZE;
|
|
1738
|
-
const autoFitScale =
|
|
1738
|
+
const autoFitScale = chunkFDR5W67L_js.resolveAutoFitFontScale(element.textStyle);
|
|
1739
1739
|
const baseFontSize = rawFontSize * autoFitScale;
|
|
1740
1740
|
const baselineShift = baselineFraction !== 0 ? `${baselineFraction * baseFontSize}px` : void 0;
|
|
1741
1741
|
const baseFontSizePt = baseFontSize * (72 / 96);
|
|
1742
1742
|
const fontKerning = typeof segmentStyle.kerning === "number" ? segmentStyle.kerning === 0 ? "none" : baseFontSizePt >= segmentStyle.kerning / 100 ? "normal" : "none" : void 0;
|
|
1743
1743
|
const rawFontFamily = segmentStyle.fontFamily || element.textStyle?.fontFamily;
|
|
1744
|
-
const baseFontFamily = rawFontFamily ?
|
|
1744
|
+
const baseFontFamily = rawFontFamily ? chunkFDR5W67L_js.getSubstituteFontFamily(
|
|
1745
1745
|
rawFontFamily,
|
|
1746
|
-
|
|
1746
|
+
chunkFDR5W67L_js.parsePanoseString(segmentStyle.latinFontPanose ?? element.textStyle?.latinFontPanose)
|
|
1747
1747
|
) : DEFAULT_FONT_FAMILY;
|
|
1748
|
-
const scriptFont = (name, panose) => name ?
|
|
1748
|
+
const scriptFont = (name, panose) => name ? chunkFDR5W67L_js.getSubstituteFontFamily(name, chunkFDR5W67L_js.parsePanoseString(panose)) : baseFontFamily;
|
|
1749
1749
|
const scriptFonts = {
|
|
1750
1750
|
latin: baseFontFamily,
|
|
1751
1751
|
eastAsia: scriptFont(
|
|
@@ -1761,7 +1761,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1761
1761
|
segmentStyle.symbolFontPanose ?? element.textStyle?.symbolFontPanose
|
|
1762
1762
|
)
|
|
1763
1763
|
};
|
|
1764
|
-
const needsScriptFonts =
|
|
1764
|
+
const needsScriptFonts = chunkFDR5W67L_js.hasDistinctScriptFonts(scriptFonts);
|
|
1765
1765
|
const spanStyle = {
|
|
1766
1766
|
color: resolvedSegmentColor,
|
|
1767
1767
|
fontSize: baseFontSize * baselineFontScale,
|
|
@@ -1779,15 +1779,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1779
1779
|
fontVariantCaps: segmentStyle.textCaps === "small" ? "small-caps" : void 0,
|
|
1780
1780
|
letterSpacing,
|
|
1781
1781
|
fontKerning,
|
|
1782
|
-
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ?
|
|
1782
|
+
backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkFDR5W67L_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
|
|
1783
1783
|
...textFillStyles,
|
|
1784
|
-
textDecorationColor: segmentStyle.underlineColor ?
|
|
1785
|
-
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${
|
|
1784
|
+
textDecorationColor: segmentStyle.underlineColor ? chunkFDR5W67L_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
|
|
1785
|
+
WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkFDR5W67L_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
|
|
1786
1786
|
paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
|
|
1787
|
-
textShadow:
|
|
1788
|
-
filter:
|
|
1789
|
-
opacity:
|
|
1790
|
-
WebkitBoxReflect:
|
|
1787
|
+
textShadow: chunkFDR5W67L_js.buildTextShadowCss(segmentStyle),
|
|
1788
|
+
filter: chunkFDR5W67L_js.buildTextRunFilterChain(segmentStyle),
|
|
1789
|
+
opacity: chunkFDR5W67L_js.getTextAlphaOpacity(segmentStyle),
|
|
1790
|
+
WebkitBoxReflect: chunkFDR5W67L_js.buildTextReflectionCss(segmentStyle)
|
|
1791
1791
|
};
|
|
1792
1792
|
const runRtl = segmentStyle.rtl;
|
|
1793
1793
|
if (runRtl !== void 0 && runRtl !== paragraphRtl) {
|
|
@@ -1807,7 +1807,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1807
1807
|
spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
|
|
1808
1808
|
}
|
|
1809
1809
|
if (bulletInfo.color) {
|
|
1810
|
-
spanStyle.color =
|
|
1810
|
+
spanStyle.color = chunkFDR5W67L_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
|
|
1811
1811
|
}
|
|
1812
1812
|
if (typeof bulletHangPx === "number" && bulletHangPx > 0) {
|
|
1813
1813
|
spanStyle.display = "inline-block";
|
|
@@ -1852,7 +1852,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
|
|
|
1852
1852
|
textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
|
|
1853
1853
|
};
|
|
1854
1854
|
if (segment.rubyStyle?.color) {
|
|
1855
|
-
rubyStyle.color =
|
|
1855
|
+
rubyStyle.color = chunkFDR5W67L_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
|
|
1856
1856
|
}
|
|
1857
1857
|
innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
|
|
1858
1858
|
baseContent,
|
|
@@ -1925,7 +1925,7 @@ function resolveParagraphSpacing(input) {
|
|
|
1925
1925
|
if (typeof exactPt === "number" && exactPt > 0) {
|
|
1926
1926
|
result.lineHeight = `${exactPt * PT_TO_PX}px`;
|
|
1927
1927
|
} else if (typeof multiplier === "number" && multiplier > 0) {
|
|
1928
|
-
result.lineHeight =
|
|
1928
|
+
result.lineHeight = chunkFDR5W67L_js.proportionalLineHeight(multiplier);
|
|
1929
1929
|
}
|
|
1930
1930
|
return result;
|
|
1931
1931
|
}
|
|
@@ -1947,7 +1947,7 @@ function groupSegmentsIntoParagraphs(segments) {
|
|
|
1947
1947
|
return paragraphs;
|
|
1948
1948
|
}
|
|
1949
1949
|
function renderTextSegments(element, fallbackColor, emptyFallback, findHighlights, onHyperlinkClick, fieldContext, subElementAnimStates, segmentOverrides, requireCtrlClick) {
|
|
1950
|
-
if (!
|
|
1950
|
+
if (!chunkFDR5W67L_js.hasTextProperties(element)) {
|
|
1951
1951
|
return emptyFallback || null;
|
|
1952
1952
|
}
|
|
1953
1953
|
const effectiveSegments = segmentOverrides ?? element.textSegments;
|
|
@@ -1968,10 +1968,10 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1968
1968
|
return element.text || emptyFallback || "";
|
|
1969
1969
|
}
|
|
1970
1970
|
const paragraphs = groupSegmentsIntoParagraphs(effectiveSegments);
|
|
1971
|
-
const paragraphIndents =
|
|
1972
|
-
const elementRtl =
|
|
1973
|
-
const elementAlign =
|
|
1974
|
-
const bodyStyle =
|
|
1971
|
+
const paragraphIndents = chunkFDR5W67L_js.hasTextProperties(element) ? element.paragraphIndents : void 0;
|
|
1972
|
+
const elementRtl = chunkFDR5W67L_js.hasTextProperties(element) ? element.textStyle?.rtl : void 0;
|
|
1973
|
+
const elementAlign = chunkFDR5W67L_js.hasTextProperties(element) ? element.textStyle?.align : void 0;
|
|
1974
|
+
const bodyStyle = chunkFDR5W67L_js.hasTextProperties(element) ? element.textStyle : void 0;
|
|
1975
1975
|
const spaceFirstLast = bodyStyle?.spaceFirstLastParagraph !== false;
|
|
1976
1976
|
return paragraphs.map(({ entries: paraSegments, terminator }, paraIndex) => {
|
|
1977
1977
|
const paraIndent = paragraphIndents?.[paraIndex];
|
|
@@ -1986,14 +1986,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
1986
1986
|
return Boolean(segment.text) && segment.text.trim().length > 0;
|
|
1987
1987
|
});
|
|
1988
1988
|
const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
|
|
1989
|
-
const paraRtl =
|
|
1989
|
+
const paraRtl = chunkFDR5W67L_js.resolveParagraphRtl(paraSegments, elementRtl);
|
|
1990
1990
|
const isRtlParagraph = paraRtl === true;
|
|
1991
|
-
const paraAlign =
|
|
1992
|
-
const cssTextAlign =
|
|
1991
|
+
const paraAlign = chunkFDR5W67L_js.resolveParagraphAlign(paraSegments, elementAlign);
|
|
1992
|
+
const cssTextAlign = chunkFDR5W67L_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
|
|
1993
1993
|
const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
|
|
1994
1994
|
const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
|
|
1995
1995
|
const paraTextIndent = rawTextIndent;
|
|
1996
|
-
const paraKinsokuStyle =
|
|
1996
|
+
const paraKinsokuStyle = chunkFDR5W67L_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
|
|
1997
1997
|
const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
|
|
1998
1998
|
const paraProps = effectiveSegments[firstSeg?.globalIndex ?? -1]?.paragraphProperties ?? (paraSegments.length === 0 ? terminator?.paragraphProperties : void 0);
|
|
1999
1999
|
const spacing = resolveParagraphSpacing({
|
|
@@ -2003,7 +2003,7 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
|
|
|
2003
2003
|
isLast: paraIndex === paragraphs.length - 1,
|
|
2004
2004
|
spaceFirstLast
|
|
2005
2005
|
});
|
|
2006
|
-
const strutFontSize =
|
|
2006
|
+
const strutFontSize = chunkFDR5W67L_js.resolveParagraphStrutFontSize(
|
|
2007
2007
|
paraSegments.length > 0 ? paraSegments.map(({ segment }) => segment) : terminator ? [terminator] : [],
|
|
2008
2008
|
bodyStyle?.fontSize
|
|
2009
2009
|
);
|
|
@@ -2107,13 +2107,13 @@ function hexToRgbUnit(hex) {
|
|
|
2107
2107
|
};
|
|
2108
2108
|
}
|
|
2109
2109
|
function getDuotoneColors(element) {
|
|
2110
|
-
if (!
|
|
2110
|
+
if (!chunkFDR5W67L_js.isImageLikeElement(element)) {
|
|
2111
2111
|
return void 0;
|
|
2112
2112
|
}
|
|
2113
2113
|
return element.imageEffects?.duotone;
|
|
2114
2114
|
}
|
|
2115
2115
|
function buildLineShadowCss(element) {
|
|
2116
|
-
if (!
|
|
2116
|
+
if (!chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
2117
2117
|
return void 0;
|
|
2118
2118
|
}
|
|
2119
2119
|
const ss = element.shapeStyle;
|
|
@@ -2124,13 +2124,13 @@ function buildLineShadowCss(element) {
|
|
|
2124
2124
|
const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
|
|
2125
2125
|
const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
|
|
2126
2126
|
const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
|
|
2127
|
-
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${
|
|
2128
|
-
|
|
2127
|
+
return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkFDR5W67L_js.colorWithOpacity(
|
|
2128
|
+
chunkFDR5W67L_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
|
|
2129
2129
|
opacity
|
|
2130
2130
|
)}`;
|
|
2131
2131
|
}
|
|
2132
2132
|
function buildLineGlowFilter(element) {
|
|
2133
|
-
if (!
|
|
2133
|
+
if (!chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
2134
2134
|
return void 0;
|
|
2135
2135
|
}
|
|
2136
2136
|
const ss = element.shapeStyle;
|
|
@@ -2139,7 +2139,7 @@ function buildLineGlowFilter(element) {
|
|
|
2139
2139
|
}
|
|
2140
2140
|
const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
|
|
2141
2141
|
const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
|
|
2142
|
-
const glowCol =
|
|
2142
|
+
const glowCol = chunkFDR5W67L_js.colorWithOpacity(chunkFDR5W67L_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
|
|
2143
2143
|
return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
|
|
2144
2144
|
}
|
|
2145
2145
|
function mapDagBlendModeToCss(blend) {
|
|
@@ -2163,7 +2163,7 @@ function getDagDuotoneFilterId(elementId) {
|
|
|
2163
2163
|
return `dag-duotone-${elementId}`;
|
|
2164
2164
|
}
|
|
2165
2165
|
function hasDagDuotoneEffect(element) {
|
|
2166
|
-
if (!
|
|
2166
|
+
if (!chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
2167
2167
|
return false;
|
|
2168
2168
|
}
|
|
2169
2169
|
return Boolean(element.shapeStyle?.dagDuotone);
|
|
@@ -2226,7 +2226,7 @@ function getRoundRectRadiusPx2(element) {
|
|
|
2226
2226
|
|
|
2227
2227
|
// src/viewer/utils/shape-visual-3d.ts
|
|
2228
2228
|
function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
|
|
2229
|
-
return
|
|
2229
|
+
return chunkFDR5W67L_js.build3DExtrusionData(
|
|
2230
2230
|
shape3d,
|
|
2231
2231
|
scene3d,
|
|
2232
2232
|
fillColor,
|
|
@@ -2235,7 +2235,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
|
|
|
2235
2235
|
);
|
|
2236
2236
|
}
|
|
2237
2237
|
function apply3dEffects2(base, scene3d, shape3d, fillColorFallback) {
|
|
2238
|
-
|
|
2238
|
+
chunkFDR5W67L_js.apply3dEffects(base, scene3d, shape3d, fillColorFallback);
|
|
2239
2239
|
}
|
|
2240
2240
|
|
|
2241
2241
|
// src/viewer/utils/vector-subpath-paint.ts
|
|
@@ -2244,7 +2244,7 @@ function toHexByte(value) {
|
|
|
2244
2244
|
return clamped.toString(16).padStart(2, "0");
|
|
2245
2245
|
}
|
|
2246
2246
|
function shiftHex(hex, factor, towardsWhite) {
|
|
2247
|
-
const channels =
|
|
2247
|
+
const channels = chunkFDR5W67L_js.hexToRgbChannels(hex);
|
|
2248
2248
|
if (!channels) {
|
|
2249
2249
|
return hex;
|
|
2250
2250
|
}
|
|
@@ -2270,13 +2270,13 @@ function buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity) {
|
|
|
2270
2270
|
const fillOff = subpath.fillMode === "none" || !hasFill;
|
|
2271
2271
|
return {
|
|
2272
2272
|
d: subpath.d,
|
|
2273
|
-
fill: fillOff ? "none" :
|
|
2273
|
+
fill: fillOff ? "none" : chunkFDR5W67L_js.colorWithOpacity(adjustFillForMode(fillColor, subpath.fillMode), fillOpacity),
|
|
2274
2274
|
stroked: subpath.stroke !== false
|
|
2275
2275
|
};
|
|
2276
2276
|
});
|
|
2277
2277
|
}
|
|
2278
2278
|
function getStrokeOnlyPresetPaths(element) {
|
|
2279
|
-
if (element.type !== "shape" || !
|
|
2279
|
+
if (element.type !== "shape" || !chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
2280
2280
|
return void 0;
|
|
2281
2281
|
}
|
|
2282
2282
|
const shapeType = element.shapeType;
|
|
@@ -2286,7 +2286,7 @@ function getStrokeOnlyPresetPaths(element) {
|
|
|
2286
2286
|
if (element.pathData) {
|
|
2287
2287
|
return void 0;
|
|
2288
2288
|
}
|
|
2289
|
-
const result =
|
|
2289
|
+
const result = chunkFDR5W67L_js.evaluatePresetShape(
|
|
2290
2290
|
shapeType,
|
|
2291
2291
|
Math.max(element.width, 1),
|
|
2292
2292
|
Math.max(element.height, 1),
|
|
@@ -2304,43 +2304,43 @@ function getGradientTilingCss(style) {
|
|
|
2304
2304
|
if (!style || style.fillMode !== "gradient") {
|
|
2305
2305
|
return void 0;
|
|
2306
2306
|
}
|
|
2307
|
-
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" &&
|
|
2307
|
+
const isStructuredLinear = (style.fillGradientType || "linear") === "linear" && chunkFDR5W67L_js.sanitizeGradientStops(style.fillGradientStops).length > 0;
|
|
2308
2308
|
if (isStructuredLinear) {
|
|
2309
|
-
const flip =
|
|
2309
|
+
const flip = chunkFDR5W67L_js.getGradientTileFlipCss(style.fillGradientFlip);
|
|
2310
2310
|
if (flip) {
|
|
2311
2311
|
return flip;
|
|
2312
2312
|
}
|
|
2313
2313
|
}
|
|
2314
|
-
return
|
|
2314
|
+
return chunkFDR5W67L_js.getGradientTileRectCss(style.fillGradientTileRect);
|
|
2315
2315
|
}
|
|
2316
2316
|
function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2317
|
-
if (!
|
|
2317
|
+
if (!chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
2318
2318
|
return {};
|
|
2319
2319
|
}
|
|
2320
2320
|
const normalizedShapeType = getShapeType(element.shapeType);
|
|
2321
|
-
const clipPath =
|
|
2321
|
+
const clipPath = chunkFDR5W67L_js.getResolvedShapeClipPath(element);
|
|
2322
2322
|
const rendersCustomVectorPath = (element.type === "shape" || element.type === "image" || element.type === "picture") && Boolean(element.pathData) && typeof element.pathWidth === "number" && element.pathWidth > 0 && typeof element.pathHeight === "number" && element.pathHeight > 0;
|
|
2323
2323
|
const rendersStrokeOnlyPreset = Boolean(getStrokeOnlyPresetPaths(element));
|
|
2324
2324
|
const fillOpacity = element.shapeStyle?.fillOpacity;
|
|
2325
2325
|
const strokeOpacity = element.shapeStyle?.strokeOpacity;
|
|
2326
|
-
const strokeDash =
|
|
2327
|
-
const fillGradient =
|
|
2326
|
+
const strokeDash = chunkFDR5W67L_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2327
|
+
const fillGradient = chunkFDR5W67L_js.buildCssGradientFromShapeStyle(element.shapeStyle, {
|
|
2328
2328
|
rotation: element.rotation,
|
|
2329
2329
|
width: element.width,
|
|
2330
2330
|
height: element.height
|
|
2331
2331
|
}) || element.shapeStyle?.fillGradient;
|
|
2332
|
-
const shadowCss =
|
|
2333
|
-
const innerShadowCss =
|
|
2334
|
-
const resolvedFillColor =
|
|
2335
|
-
const resolvedStrokeColor =
|
|
2332
|
+
const shadowCss = chunkFDR5W67L_js.buildShadowCssFromShapeStyle(element.shapeStyle);
|
|
2333
|
+
const innerShadowCss = chunkFDR5W67L_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
|
|
2334
|
+
const resolvedFillColor = chunkFDR5W67L_js.colorWithOpacity(fillColor, fillOpacity);
|
|
2335
|
+
const resolvedStrokeColor = chunkFDR5W67L_js.colorWithOpacity(strokeColor, strokeOpacity);
|
|
2336
2336
|
const ss = element.shapeStyle;
|
|
2337
2337
|
const gradientTiling = getGradientTilingCss(ss);
|
|
2338
|
-
const paintsGradientOutline =
|
|
2338
|
+
const paintsGradientOutline = chunkFDR5W67L_js.suppressesCssBorder(element);
|
|
2339
2339
|
const hasFillOverlayColor = Boolean(
|
|
2340
2340
|
ss?.dagFillOverlayColor && ss.dagFillOverlayColor !== "transparent"
|
|
2341
2341
|
);
|
|
2342
2342
|
const combinedShadowParts = [];
|
|
2343
|
-
const multiLayerShadow =
|
|
2343
|
+
const multiLayerShadow = chunkFDR5W67L_js.buildMultiLayerShadowCss(element.shapeStyle);
|
|
2344
2344
|
if (multiLayerShadow) {
|
|
2345
2345
|
combinedShadowParts.push(multiLayerShadow);
|
|
2346
2346
|
} else if (shadowCss) {
|
|
@@ -2349,7 +2349,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2349
2349
|
if (innerShadowCss) {
|
|
2350
2350
|
combinedShadowParts.push(innerShadowCss);
|
|
2351
2351
|
}
|
|
2352
|
-
const glowBoxShadow =
|
|
2352
|
+
const glowBoxShadow = chunkFDR5W67L_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
|
|
2353
2353
|
if (glowBoxShadow) {
|
|
2354
2354
|
combinedShadowParts.push(glowBoxShadow);
|
|
2355
2355
|
}
|
|
@@ -2357,7 +2357,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2357
2357
|
if (lineShadow) {
|
|
2358
2358
|
combinedShadowParts.push(lineShadow);
|
|
2359
2359
|
}
|
|
2360
|
-
const compoundLineShadow =
|
|
2360
|
+
const compoundLineShadow = chunkFDR5W67L_js.getCompoundLineBoxShadow(
|
|
2361
2361
|
element.shapeStyle?.compoundLine,
|
|
2362
2362
|
strokeWidth,
|
|
2363
2363
|
resolvedStrokeColor
|
|
@@ -2370,11 +2370,11 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2370
2370
|
if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
|
|
2371
2371
|
const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
|
|
2372
2372
|
const glowRad = Math.round(Math.max(0, ss.glowRadius));
|
|
2373
|
-
const glowCol =
|
|
2373
|
+
const glowCol = chunkFDR5W67L_js.colorWithOpacity(chunkFDR5W67L_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
|
|
2374
2374
|
filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
|
|
2375
2375
|
}
|
|
2376
2376
|
if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
|
|
2377
|
-
filterParts.push(`url(#${
|
|
2377
|
+
filterParts.push(`url(#${chunkFDR5W67L_js.getSoftEdgeFilterId(element.id)})`);
|
|
2378
2378
|
}
|
|
2379
2379
|
if (typeof ss?.blurRadius === "number" && ss.blurRadius > 0) {
|
|
2380
2380
|
filterParts.push(`blur(${Math.round(ss.blurRadius)}px)`);
|
|
@@ -2383,13 +2383,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2383
2383
|
if (lineGlowCss) {
|
|
2384
2384
|
filterParts.push(lineGlowCss);
|
|
2385
2385
|
}
|
|
2386
|
-
const dagFilter =
|
|
2386
|
+
const dagFilter = chunkFDR5W67L_js.getEffectDagFilter(ss, element.id);
|
|
2387
2387
|
if (dagFilter) {
|
|
2388
2388
|
filterParts.push(dagFilter);
|
|
2389
2389
|
}
|
|
2390
2390
|
const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : ss?.lineJoin === "miter" ? "miter" : void 0;
|
|
2391
2391
|
const miterLimitCss = ss?.lineJoin === "miter" && typeof ss?.miterLimit === "number" ? Math.max(ss.miterLimit / 1e5, 1) : void 0;
|
|
2392
|
-
const patternFill =
|
|
2392
|
+
const patternFill = chunkFDR5W67L_js.buildPatternFillCss(element.shapeStyle);
|
|
2393
2393
|
const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
|
|
2394
2394
|
const imageFillMode = ss?.fillImageMode || "stretch";
|
|
2395
2395
|
let reflectCss;
|
|
@@ -2401,7 +2401,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2401
2401
|
const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
|
|
2402
2402
|
const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
|
|
2403
2403
|
const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
|
|
2404
|
-
reflectCss =
|
|
2404
|
+
reflectCss = chunkFDR5W67L_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
|
|
2405
2405
|
}
|
|
2406
2406
|
}
|
|
2407
2407
|
const base = {
|
|
@@ -2447,9 +2447,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2447
2447
|
// path following the shape's geometry, because a CSS border can only take
|
|
2448
2448
|
// one colour. Keeping the border too would draw the parser's averaged
|
|
2449
2449
|
// solid underneath the gradient.
|
|
2450
|
-
borderWidth: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2450
|
+
borderWidth: strokeWidth > 0 && !paintsGradientOutline ? chunkFDR5W67L_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : 0,
|
|
2451
2451
|
borderColor: strokeWidth > 0 && !paintsGradientOutline ? resolvedStrokeColor : void 0,
|
|
2452
|
-
borderStyle: strokeWidth > 0 && !paintsGradientOutline ?
|
|
2452
|
+
borderStyle: strokeWidth > 0 && !paintsGradientOutline ? chunkFDR5W67L_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
|
|
2453
2453
|
strokeLinejoin: lineJoinCss,
|
|
2454
2454
|
strokeMiterlimit: miterLimitCss,
|
|
2455
2455
|
strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : ss?.lineCap === "flat" ? "butt" : void 0
|
|
@@ -2505,7 +2505,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2505
2505
|
borderWidth: 0,
|
|
2506
2506
|
borderTopWidth: Math.max(strokeWidth, 2),
|
|
2507
2507
|
borderTopColor: resolvedStrokeColor,
|
|
2508
|
-
borderTopStyle:
|
|
2508
|
+
borderTopStyle: chunkFDR5W67L_js.getCssBorderDashStyle(strokeDash)
|
|
2509
2509
|
};
|
|
2510
2510
|
}
|
|
2511
2511
|
if (normalizedShapeType === "cylinder") {
|
|
@@ -2519,13 +2519,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
|
|
|
2519
2519
|
function getConnectorAdjustment(element, key, fallback) {
|
|
2520
2520
|
const direct = element.shapeAdjustments?.[key];
|
|
2521
2521
|
if (typeof direct === "number" && Number.isFinite(direct)) {
|
|
2522
|
-
return
|
|
2522
|
+
return chunkFDR5W67L_js.clampUnitInterval(direct / 1e5);
|
|
2523
2523
|
}
|
|
2524
2524
|
const fallbackKey = element.shapeAdjustments?.adj;
|
|
2525
2525
|
if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
|
|
2526
|
-
return
|
|
2526
|
+
return chunkFDR5W67L_js.clampUnitInterval(fallbackKey / 1e5);
|
|
2527
2527
|
}
|
|
2528
|
-
return
|
|
2528
|
+
return chunkFDR5W67L_js.clampUnitInterval(fallback);
|
|
2529
2529
|
}
|
|
2530
2530
|
function getConnectorPathGeometry(element) {
|
|
2531
2531
|
const width = Math.max(element.width, 0);
|
|
@@ -2662,11 +2662,11 @@ function strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray) {
|
|
|
2662
2662
|
strokePaint,
|
|
2663
2663
|
strokeWidth,
|
|
2664
2664
|
dashArray,
|
|
2665
|
-
lineCap:
|
|
2665
|
+
lineCap: chunkFDR5W67L_js.svgLineCap(shapeStyle?.lineCap),
|
|
2666
2666
|
lineJoin,
|
|
2667
2667
|
miterLimit,
|
|
2668
|
-
offsets:
|
|
2669
|
-
widths:
|
|
2668
|
+
offsets: chunkFDR5W67L_js.getCompoundLineOffsets(shapeStyle?.compoundLine, strokeWidth),
|
|
2669
|
+
widths: chunkFDR5W67L_js.getCompoundLineWidths(shapeStyle?.compoundLine, strokeWidth)
|
|
2670
2670
|
};
|
|
2671
2671
|
}
|
|
2672
2672
|
function strokeStrands(d, keyBase, ctx) {
|
|
@@ -2714,9 +2714,9 @@ function gradientDefs(gradient) {
|
|
|
2714
2714
|
}
|
|
2715
2715
|
function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredPaths, shapeStyle, hasFill, fillColor, fillOpacity, strokePaint, strokeWidth, dashArray, animatesFill = false, gradient) {
|
|
2716
2716
|
const ctx = strokeContext(shapeStyle, strokePaint, strokeWidth, dashArray);
|
|
2717
|
-
const subpaths = structuredPaths && structuredPaths.length > 0 ?
|
|
2717
|
+
const subpaths = structuredPaths && structuredPaths.length > 0 ? chunkFDR5W67L_js.customGeometryPathsToSvgSubpaths(structuredPaths, pathWidth, pathHeight) : void 0;
|
|
2718
2718
|
const needsPerSubpath = subpaths !== void 0 && subpaths.some((sp) => sp.fillMode && sp.fillMode !== "norm" || sp.stroke === false);
|
|
2719
|
-
const gradientPaint = gradient ?
|
|
2719
|
+
const gradientPaint = gradient ? chunkFDR5W67L_js.svgGradientFillRef(gradient) : void 0;
|
|
2720
2720
|
const nodes = [];
|
|
2721
2721
|
if (subpaths && needsPerSubpath) {
|
|
2722
2722
|
const paints = buildCustomSubpathPaints(subpaths, hasFill, fillColor, fillOpacity);
|
|
@@ -2748,7 +2748,7 @@ function renderCustomGeometryVector(pathData, pathWidth, pathHeight, structuredP
|
|
|
2748
2748
|
"path",
|
|
2749
2749
|
{
|
|
2750
2750
|
d: pathData,
|
|
2751
|
-
fill: animatesFill ? "inherit" : gradientPaint ??
|
|
2751
|
+
fill: animatesFill ? "inherit" : gradientPaint ?? chunkFDR5W67L_js.colorWithOpacity(fillColor, fillOpacity),
|
|
2752
2752
|
stroke: "none",
|
|
2753
2753
|
vectorEffect: "non-scaling-stroke"
|
|
2754
2754
|
},
|
|
@@ -2793,14 +2793,14 @@ function renderStrokeOnlyPreset(presetPaths, width, height, shapeStyle, strokePa
|
|
|
2793
2793
|
);
|
|
2794
2794
|
}
|
|
2795
2795
|
function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor, animatesFill, animatesStroke) {
|
|
2796
|
-
if (!
|
|
2796
|
+
if (!chunkFDR5W67L_js.hasShapeProperties(element)) {
|
|
2797
2797
|
return null;
|
|
2798
2798
|
}
|
|
2799
2799
|
const normalizedType = (element.shapeType || "").toLowerCase();
|
|
2800
|
-
const fillPaint = animatesFill ? "inherit" :
|
|
2801
|
-
const strokePaint = animatesStroke ? "inherit" :
|
|
2802
|
-
const dashType =
|
|
2803
|
-
const dashArray =
|
|
2800
|
+
const fillPaint = animatesFill ? "inherit" : chunkFDR5W67L_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
|
|
2801
|
+
const strokePaint = animatesStroke ? "inherit" : chunkFDR5W67L_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
|
|
2802
|
+
const dashType = chunkFDR5W67L_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
|
|
2803
|
+
const dashArray = chunkFDR5W67L_js.getSvgStrokeDasharray(
|
|
2804
2804
|
dashType,
|
|
2805
2805
|
Math.max(strokeWidth, 1),
|
|
2806
2806
|
element.shapeStyle?.customDashSegments
|
|
@@ -2881,21 +2881,21 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2881
2881
|
// container's `background-image` is suppressed for custom geometry, so
|
|
2882
2882
|
// without this the shape fell back to the parser's representative solid
|
|
2883
2883
|
// and lost every fade (issue #132).
|
|
2884
|
-
|
|
2884
|
+
chunkFDR5W67L_js.buildSvgGradientDef(element.shapeStyle, element.id)
|
|
2885
2885
|
);
|
|
2886
2886
|
}
|
|
2887
|
-
if (
|
|
2887
|
+
if (chunkFDR5W67L_js.isCalloutShape(normalizedType)) {
|
|
2888
2888
|
const width = Math.max(element.width, 1);
|
|
2889
2889
|
const height = Math.max(element.height, 1);
|
|
2890
|
-
const geometry =
|
|
2890
|
+
const geometry = chunkFDR5W67L_js.getCalloutLeaderLineGeometry(
|
|
2891
2891
|
normalizedType,
|
|
2892
2892
|
width,
|
|
2893
2893
|
height,
|
|
2894
2894
|
element.shapeAdjustments
|
|
2895
2895
|
);
|
|
2896
2896
|
if (geometry && geometry.points.length >= 2) {
|
|
2897
|
-
const leaderPath =
|
|
2898
|
-
const bounds =
|
|
2897
|
+
const leaderPath = chunkFDR5W67L_js.buildCalloutLeaderLineSvgPath(geometry);
|
|
2898
|
+
const bounds = chunkFDR5W67L_js.getCalloutViewBoxBounds(width, height, geometry);
|
|
2899
2899
|
const lineStroke = Math.max(strokeWidth, 1);
|
|
2900
2900
|
const offsetLeft = bounds.minX;
|
|
2901
2901
|
const offsetTop = bounds.minY;
|
|
@@ -2958,10 +2958,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
|
|
|
2958
2958
|
const endArrowW = element.shapeStyle?.connectorEndArrowWidth;
|
|
2959
2959
|
const endArrowL = element.shapeStyle?.connectorEndArrowLength;
|
|
2960
2960
|
const compoundLine = element.shapeStyle?.compoundLine;
|
|
2961
|
-
const connectorLineCap =
|
|
2961
|
+
const connectorLineCap = chunkFDR5W67L_js.svgLineCap(element.shapeStyle?.lineCap);
|
|
2962
2962
|
const hitTargetWidth = Math.max(strokeWidth * 3, 12);
|
|
2963
|
-
const offsets =
|
|
2964
|
-
const widths =
|
|
2963
|
+
const offsets = chunkFDR5W67L_js.getCompoundLineOffsets(compoundLine, strokeWidth);
|
|
2964
|
+
const widths = chunkFDR5W67L_js.getCompoundLineWidths(compoundLine, strokeWidth);
|
|
2965
2965
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2966
2966
|
"svg",
|
|
2967
2967
|
{
|
|
@@ -3040,15 +3040,15 @@ function parseGradientFillCss(gradFill) {
|
|
|
3040
3040
|
}
|
|
3041
3041
|
const parsed = stops.map((gs) => {
|
|
3042
3042
|
const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
|
|
3043
|
-
const color =
|
|
3044
|
-
const opacity =
|
|
3045
|
-
return { pos, color:
|
|
3043
|
+
const color = chunkFDR5W67L_js.parseDrawingColor(gs) ?? "#888888";
|
|
3044
|
+
const opacity = chunkFDR5W67L_js.parseDrawingColorOpacity(gs);
|
|
3045
|
+
return { pos, color: chunkFDR5W67L_js.colorWithOpacity(color, opacity) };
|
|
3046
3046
|
}).sort((a, b) => a.pos - b.pos);
|
|
3047
3047
|
const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
|
|
3048
3048
|
const lin = gradFill["a:lin"];
|
|
3049
3049
|
if (lin) {
|
|
3050
3050
|
const angRaw = Number.parseInt(String(lin["@_ang"] || "0"), 10);
|
|
3051
|
-
const angleDeg = Math.round(
|
|
3051
|
+
const angleDeg = Math.round(chunkFDR5W67L_js.ooxmlGradientAngleToCssDegrees(angRaw / 6e4));
|
|
3052
3052
|
return `linear-gradient(${angleDeg}deg, ${stopStrings})`;
|
|
3053
3053
|
}
|
|
3054
3054
|
const path = gradFill["a:path"];
|
|
@@ -3083,8 +3083,8 @@ function parsePatternFillCss(pattFill) {
|
|
|
3083
3083
|
if (!pattFill) {
|
|
3084
3084
|
return void 0;
|
|
3085
3085
|
}
|
|
3086
|
-
const fgColor =
|
|
3087
|
-
const bgColor =
|
|
3086
|
+
const fgColor = chunkFDR5W67L_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
|
|
3087
|
+
const bgColor = chunkFDR5W67L_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
|
|
3088
3088
|
const preset = String(pattFill["@_prst"] || "ltDnDiag");
|
|
3089
3089
|
switch (preset) {
|
|
3090
3090
|
case "ltHorz":
|
|
@@ -3195,11 +3195,11 @@ function parseCellBorders(cellProperties) {
|
|
|
3195
3195
|
const prstDash = ln["a:prstDash"];
|
|
3196
3196
|
const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
|
|
3197
3197
|
const cssBorderStyle = ooxmlDashToCss(dashVal);
|
|
3198
|
-
const color =
|
|
3198
|
+
const color = chunkFDR5W67L_js.parseDrawingColor(ln["a:solidFill"]);
|
|
3199
3199
|
if (color) {
|
|
3200
|
-
const opacity =
|
|
3200
|
+
const opacity = chunkFDR5W67L_js.parseDrawingColorOpacity(ln["a:solidFill"]);
|
|
3201
3201
|
const key = `${edge.prefix}`;
|
|
3202
|
-
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${
|
|
3202
|
+
borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkFDR5W67L_js.colorWithOpacity(color, opacity)}`;
|
|
3203
3203
|
}
|
|
3204
3204
|
}
|
|
3205
3205
|
return borderStyle;
|
|
@@ -3212,7 +3212,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3212
3212
|
const textShadowParts = [];
|
|
3213
3213
|
const outerShdw = effectLst["a:outerShdw"];
|
|
3214
3214
|
if (outerShdw) {
|
|
3215
|
-
const shdwColor =
|
|
3215
|
+
const shdwColor = chunkFDR5W67L_js.parseDrawingColor(outerShdw);
|
|
3216
3216
|
if (shdwColor) {
|
|
3217
3217
|
const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
|
|
3218
3218
|
const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
|
|
@@ -3230,7 +3230,7 @@ function parseCellTextEffects(runProps) {
|
|
|
3230
3230
|
}
|
|
3231
3231
|
const glow = effectLst["a:glow"];
|
|
3232
3232
|
if (glow) {
|
|
3233
|
-
const glowColor =
|
|
3233
|
+
const glowColor = chunkFDR5W67L_js.parseDrawingColor(glow);
|
|
3234
3234
|
if (glowColor) {
|
|
3235
3235
|
const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
|
|
3236
3236
|
const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
|
|
@@ -3309,10 +3309,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3309
3309
|
if (runProps?.["@_u"] !== void 0) {
|
|
3310
3310
|
cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
|
|
3311
3311
|
}
|
|
3312
|
-
const runColor =
|
|
3312
|
+
const runColor = chunkFDR5W67L_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkFDR5W67L_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
|
|
3313
3313
|
if (runColor) {
|
|
3314
|
-
const opacity =
|
|
3315
|
-
cellStyle.color =
|
|
3314
|
+
const opacity = chunkFDR5W67L_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
|
|
3315
|
+
cellStyle.color = chunkFDR5W67L_js.colorWithOpacity(runColor, opacity);
|
|
3316
3316
|
}
|
|
3317
3317
|
const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
|
|
3318
3318
|
if (fontFamily) {
|
|
@@ -3322,15 +3322,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3322
3322
|
cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
|
|
3323
3323
|
}
|
|
3324
3324
|
const cellProperties = cellXml["a:tcPr"];
|
|
3325
|
-
const cellFill =
|
|
3325
|
+
const cellFill = chunkFDR5W67L_js.parseDrawingColor(
|
|
3326
3326
|
cellProperties?.["a:solidFill"],
|
|
3327
3327
|
schemeColorOverrides
|
|
3328
3328
|
);
|
|
3329
3329
|
if (cellFill) {
|
|
3330
|
-
const opacity =
|
|
3330
|
+
const opacity = chunkFDR5W67L_js.parseDrawingColorOpacity(
|
|
3331
3331
|
cellProperties?.["a:solidFill"]
|
|
3332
3332
|
);
|
|
3333
|
-
cellStyle.backgroundColor =
|
|
3333
|
+
cellStyle.backgroundColor = chunkFDR5W67L_js.colorWithOpacity(cellFill, opacity);
|
|
3334
3334
|
} else {
|
|
3335
3335
|
const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
|
|
3336
3336
|
if (gradCss) {
|
|
@@ -3345,16 +3345,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
|
|
|
3345
3345
|
const edgeBorders = parseCellBorders(cellProperties);
|
|
3346
3346
|
Object.assign(cellStyle, edgeBorders);
|
|
3347
3347
|
if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
|
|
3348
|
-
const borderColor =
|
|
3348
|
+
const borderColor = chunkFDR5W67L_js.parseDrawingColor(
|
|
3349
3349
|
cellProperties?.["a:lnL"]?.["a:solidFill"],
|
|
3350
3350
|
schemeColorOverrides
|
|
3351
|
-
) ||
|
|
3351
|
+
) || chunkFDR5W67L_js.parseDrawingColor(
|
|
3352
3352
|
cellProperties?.["a:lnR"]?.["a:solidFill"],
|
|
3353
3353
|
schemeColorOverrides
|
|
3354
|
-
) ||
|
|
3354
|
+
) || chunkFDR5W67L_js.parseDrawingColor(
|
|
3355
3355
|
cellProperties?.["a:lnT"]?.["a:solidFill"],
|
|
3356
3356
|
schemeColorOverrides
|
|
3357
|
-
) ||
|
|
3357
|
+
) || chunkFDR5W67L_js.parseDrawingColor(
|
|
3358
3358
|
cellProperties?.["a:lnB"]?.["a:solidFill"],
|
|
3359
3359
|
schemeColorOverrides
|
|
3360
3360
|
);
|
|
@@ -3433,10 +3433,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
|
|
|
3433
3433
|
}
|
|
3434
3434
|
let color = base;
|
|
3435
3435
|
if (fill.tint !== void 0 && fill.tint > 0) {
|
|
3436
|
-
color =
|
|
3436
|
+
color = chunkFDR5W67L_js.tintColor2(color, fill.tint / 1e5);
|
|
3437
3437
|
}
|
|
3438
3438
|
if (fill.shade !== void 0 && fill.shade > 0) {
|
|
3439
|
-
color =
|
|
3439
|
+
color = chunkFDR5W67L_js.shadeColor2(color, 1 - fill.shade / 1e5);
|
|
3440
3440
|
}
|
|
3441
3441
|
return color;
|
|
3442
3442
|
}
|
|
@@ -3461,7 +3461,7 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
|
|
|
3461
3461
|
style.fontFamily = text.fontFace;
|
|
3462
3462
|
applied = true;
|
|
3463
3463
|
} else {
|
|
3464
|
-
const refFont =
|
|
3464
|
+
const refFont = chunkFDR5W67L_js.resolveFontRefIdx(text.fontRefIdx, fontScheme);
|
|
3465
3465
|
if (refFont) {
|
|
3466
3466
|
style.fontFamily = refFont;
|
|
3467
3467
|
applied = true;
|
|
@@ -3472,10 +3472,10 @@ function applyTableStyleText(text, colorScheme, style, fontScheme) {
|
|
|
3472
3472
|
if (base) {
|
|
3473
3473
|
let color = base;
|
|
3474
3474
|
if (text.fontTint !== void 0 && text.fontTint > 0) {
|
|
3475
|
-
color =
|
|
3475
|
+
color = chunkFDR5W67L_js.tintColor2(color, text.fontTint / 1e5);
|
|
3476
3476
|
}
|
|
3477
3477
|
if (text.fontShade !== void 0 && text.fontShade > 0) {
|
|
3478
|
-
color =
|
|
3478
|
+
color = chunkFDR5W67L_js.shadeColor2(color, 1 - text.fontShade / 1e5);
|
|
3479
3479
|
}
|
|
3480
3480
|
style.color = color;
|
|
3481
3481
|
applied = true;
|
|
@@ -3664,7 +3664,7 @@ function parseTableElementData(element, fallbackTextStyle) {
|
|
|
3664
3664
|
};
|
|
3665
3665
|
}
|
|
3666
3666
|
function getCellDiagonalBorders2(style, tableData, pos, styleCtx) {
|
|
3667
|
-
return
|
|
3667
|
+
return chunkFDR5W67L_js.getCellDiagonalBorders(style, tableData, pos, {
|
|
3668
3668
|
tableStyleMap: styleCtx?.tableStyleMap,
|
|
3669
3669
|
colorScheme: styleCtx?.theme?.colorScheme,
|
|
3670
3670
|
fontScheme: styleCtx?.theme?.fontScheme
|
|
@@ -3812,9 +3812,9 @@ function cellStyleToCss(style) {
|
|
|
3812
3812
|
if (style.gradientFillCss) {
|
|
3813
3813
|
css.background = style.gradientFillCss;
|
|
3814
3814
|
} else if (style.fillMode === "pattern" && style.patternFillPreset) {
|
|
3815
|
-
const fg =
|
|
3816
|
-
const bg =
|
|
3817
|
-
const svgPattern =
|
|
3815
|
+
const fg = chunkFDR5W67L_js.normalizeHexColor(style.patternFillForeground, "#000000");
|
|
3816
|
+
const bg = chunkFDR5W67L_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
|
|
3817
|
+
const svgPattern = chunkFDR5W67L_js.getPatternSvg(style.patternFillPreset, fg, bg);
|
|
3818
3818
|
if (svgPattern) {
|
|
3819
3819
|
const encoded = encodeURIComponent(svgPattern);
|
|
3820
3820
|
css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
|
|
@@ -3890,7 +3890,7 @@ function cellStyleToCss(style) {
|
|
|
3890
3890
|
if (edge.width || edge.color) {
|
|
3891
3891
|
const w = edge.width ?? 1;
|
|
3892
3892
|
const c = edge.color ?? style.borderColor ?? "#000000";
|
|
3893
|
-
const s =
|
|
3893
|
+
const s = chunkFDR5W67L_js.ooxmlDashToCssBorderStyle(edge.dash);
|
|
3894
3894
|
css[edge.prefix] = `${w}px ${s} ${c}`;
|
|
3895
3895
|
}
|
|
3896
3896
|
}
|
|
@@ -3921,7 +3921,7 @@ function cellStyleToCss(style) {
|
|
|
3921
3921
|
css.textShadow = textShadowParts.join(", ");
|
|
3922
3922
|
}
|
|
3923
3923
|
if (style.cell3D) {
|
|
3924
|
-
Object.assign(css,
|
|
3924
|
+
Object.assign(css, chunkFDR5W67L_js.cell3DBevelCss(style.cell3D));
|
|
3925
3925
|
}
|
|
3926
3926
|
return css;
|
|
3927
3927
|
}
|
|
@@ -3935,7 +3935,7 @@ function TableResizeOverlay({
|
|
|
3935
3935
|
const containerRef = React6.useRef(null);
|
|
3936
3936
|
const [rowBounds, setRowBounds] = React6.useState([]);
|
|
3937
3937
|
const dragRef = React6.useRef(null);
|
|
3938
|
-
const colBoundaries = React6.useMemo(() =>
|
|
3938
|
+
const colBoundaries = React6.useMemo(() => chunkFDR5W67L_js.computeColumnBoundaries(columnWidths), [columnWidths]);
|
|
3939
3939
|
const measureRows = React6.useCallback(() => {
|
|
3940
3940
|
const container = containerRef.current;
|
|
3941
3941
|
if (!container) {
|
|
@@ -3982,11 +3982,11 @@ function TableResizeOverlay({
|
|
|
3982
3982
|
const rect = containerRef.current.getBoundingClientRect();
|
|
3983
3983
|
if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
|
|
3984
3984
|
const deltaProp = (e.clientX - drag.startPos) / rect.width;
|
|
3985
|
-
onResizeColumns(
|
|
3985
|
+
onResizeColumns(chunkFDR5W67L_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
|
|
3986
3986
|
} else if (drag.type === "row" && onResizeRow) {
|
|
3987
3987
|
const deltaY = e.clientY - drag.startPos;
|
|
3988
|
-
const newHeight =
|
|
3989
|
-
drag.initialRowHeight ??
|
|
3988
|
+
const newHeight = chunkFDR5W67L_js.computeResizedRowHeight(
|
|
3989
|
+
drag.initialRowHeight ?? chunkFDR5W67L_js.DEFAULT_ROW_HEIGHT,
|
|
3990
3990
|
deltaY
|
|
3991
3991
|
);
|
|
3992
3992
|
onResizeRow(drag.index, newHeight);
|
|
@@ -4024,7 +4024,7 @@ function TableResizeOverlay({
|
|
|
4024
4024
|
e.stopPropagation();
|
|
4025
4025
|
const table = containerRef.current?.querySelector("table");
|
|
4026
4026
|
const tr = table?.querySelectorAll("tbody > tr")[index];
|
|
4027
|
-
const actualHeight = tr?.offsetHeight ??
|
|
4027
|
+
const actualHeight = tr?.offsetHeight ?? chunkFDR5W67L_js.DEFAULT_ROW_HEIGHT;
|
|
4028
4028
|
document.body.style.cursor = "row-resize";
|
|
4029
4029
|
document.body.style.userSelect = "none";
|
|
4030
4030
|
dragRef.current = {
|
|
@@ -4072,7 +4072,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4072
4072
|
}
|
|
4073
4073
|
const first = selectedCell.selectedCells[0];
|
|
4074
4074
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4075
|
-
return
|
|
4075
|
+
return chunkFDR5W67L_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
|
|
4076
4076
|
})();
|
|
4077
4077
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4078
4078
|
TableResizeOverlay,
|
|
@@ -4105,7 +4105,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4105
4105
|
return null;
|
|
4106
4106
|
}
|
|
4107
4107
|
const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
|
|
4108
|
-
const isInMultiSelection =
|
|
4108
|
+
const isInMultiSelection = chunkFDR5W67L_js.isCellInRect(rowIndex, cellIndex, selectionRect);
|
|
4109
4109
|
const isCellEditing = isCellSelected && selectedCell?.isEditing;
|
|
4110
4110
|
const diag = getCellDiagonalBorders2(
|
|
4111
4111
|
cell.style,
|
|
@@ -4135,7 +4135,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4135
4135
|
}
|
|
4136
4136
|
event.stopPropagation();
|
|
4137
4137
|
if (event.shiftKey && selectedCell) {
|
|
4138
|
-
const rect =
|
|
4138
|
+
const rect = chunkFDR5W67L_js.computeSelectionRect(
|
|
4139
4139
|
selectedCell.rowIndex,
|
|
4140
4140
|
selectedCell.columnIndex,
|
|
4141
4141
|
rowIndex,
|
|
@@ -4145,7 +4145,7 @@ function renderTableFromTableData(element, textStyle, options) {
|
|
|
4145
4145
|
options?.onSelectCell?.({
|
|
4146
4146
|
rowIndex: selectedCell.rowIndex,
|
|
4147
4147
|
columnIndex: selectedCell.columnIndex,
|
|
4148
|
-
selectedCells:
|
|
4148
|
+
selectedCells: chunkFDR5W67L_js.rectToCells(rect)
|
|
4149
4149
|
});
|
|
4150
4150
|
} else {
|
|
4151
4151
|
options?.onSelectCell?.({
|
|
@@ -4222,7 +4222,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4222
4222
|
}
|
|
4223
4223
|
const first = selectedCell.selectedCells[0];
|
|
4224
4224
|
const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
|
|
4225
|
-
return
|
|
4225
|
+
return chunkFDR5W67L_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
|
|
4226
4226
|
})();
|
|
4227
4227
|
const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
|
|
4228
4228
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4299,7 +4299,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4299
4299
|
"border px-1 py-0.5 align-top",
|
|
4300
4300
|
isEditable && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
|
|
4301
4301
|
selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
|
|
4302
|
-
|
|
4302
|
+
chunkFDR5W67L_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
|
|
4303
4303
|
),
|
|
4304
4304
|
colSpan,
|
|
4305
4305
|
rowSpan: rSpan,
|
|
@@ -4310,7 +4310,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4310
4310
|
}
|
|
4311
4311
|
event.stopPropagation();
|
|
4312
4312
|
if (event.shiftKey && selectedCell && tableEl.tableData) {
|
|
4313
|
-
const rect =
|
|
4313
|
+
const rect = chunkFDR5W67L_js.computeSelectionRect(
|
|
4314
4314
|
selectedCell.rowIndex,
|
|
4315
4315
|
selectedCell.columnIndex,
|
|
4316
4316
|
rowIndex,
|
|
@@ -4320,7 +4320,7 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4320
4320
|
options?.onSelectCell?.({
|
|
4321
4321
|
rowIndex: selectedCell.rowIndex,
|
|
4322
4322
|
columnIndex: selectedCell.columnIndex,
|
|
4323
|
-
selectedCells:
|
|
4323
|
+
selectedCells: chunkFDR5W67L_js.rectToCells(rect)
|
|
4324
4324
|
});
|
|
4325
4325
|
} else {
|
|
4326
4326
|
options?.onSelectCell?.({
|
|
@@ -4375,24 +4375,24 @@ function renderTableElement(element, textStyle, options) {
|
|
|
4375
4375
|
}
|
|
4376
4376
|
var LEGEND_ITEM_WIDTH = 80;
|
|
4377
4377
|
function partAttrs(part) {
|
|
4378
|
-
return part ?
|
|
4378
|
+
return part ? chunkFDR5W67L_js.chartPartToAttrs(part) : void 0;
|
|
4379
4379
|
}
|
|
4380
4380
|
function resolveReactPalette(chartData) {
|
|
4381
4381
|
if (chartData.colorPalette && chartData.colorPalette.length > 0) {
|
|
4382
4382
|
return chartData.colorPalette;
|
|
4383
4383
|
}
|
|
4384
|
-
return [...
|
|
4384
|
+
return [...chunkFDR5W67L_js.getChartStylePalette(chartData.style?.styleId)];
|
|
4385
4385
|
}
|
|
4386
4386
|
function buildReactChartViewModel(element) {
|
|
4387
4387
|
if (element.type !== "chart" || !element.chartData) {
|
|
4388
|
-
return
|
|
4388
|
+
return chunkFDR5W67L_js.buildChartViewModel(element);
|
|
4389
4389
|
}
|
|
4390
4390
|
const palette = resolveReactPalette(element.chartData);
|
|
4391
4391
|
const themedElement = {
|
|
4392
4392
|
...element,
|
|
4393
4393
|
chartData: { ...element.chartData, colorPalette: palette }
|
|
4394
4394
|
};
|
|
4395
|
-
return
|
|
4395
|
+
return chunkFDR5W67L_js.buildChartViewModel(themedElement);
|
|
4396
4396
|
}
|
|
4397
4397
|
function renderPrimitive(prim, key) {
|
|
4398
4398
|
switch (prim.kind) {
|
|
@@ -4781,7 +4781,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4781
4781
|
const unmatchedRows = [];
|
|
4782
4782
|
categories.forEach((cat, i) => {
|
|
4783
4783
|
const value = values[i] ?? 0;
|
|
4784
|
-
const code =
|
|
4784
|
+
const code = chunkFDR5W67L_js.resolveRegionCode(cat);
|
|
4785
4785
|
if (code) {
|
|
4786
4786
|
regionValueMap.set(code, { value, label: cat });
|
|
4787
4787
|
} else {
|
|
@@ -4819,8 +4819,8 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4819
4819
|
let fill = "#e2e8f0";
|
|
4820
4820
|
let dataLabel = null;
|
|
4821
4821
|
if (entry) {
|
|
4822
|
-
const t =
|
|
4823
|
-
fill =
|
|
4822
|
+
const t = chunkFDR5W67L_js.normalizeValue(entry.value, minVal, maxVal);
|
|
4823
|
+
fill = chunkFDR5W67L_js.sequentialColorScale(t);
|
|
4824
4824
|
dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
|
|
4825
4825
|
"text",
|
|
4826
4826
|
{
|
|
@@ -4831,7 +4831,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4831
4831
|
fontWeight: 600,
|
|
4832
4832
|
fill: "#1e293b",
|
|
4833
4833
|
style: { pointerEvents: "none" },
|
|
4834
|
-
children:
|
|
4834
|
+
children: chunkFDR5W67L_js.formatAxisValue(entry.value)
|
|
4835
4835
|
},
|
|
4836
4836
|
`${element.id}-map-dl-${region.code}`
|
|
4837
4837
|
);
|
|
@@ -4849,7 +4849,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4849
4849
|
opacity: 0.9,
|
|
4850
4850
|
children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
|
|
4851
4851
|
region.name,
|
|
4852
|
-
entry ? `: ${
|
|
4852
|
+
entry ? `: ${chunkFDR5W67L_js.formatAxisValue(entry.value)}` : ""
|
|
4853
4853
|
] })
|
|
4854
4854
|
}
|
|
4855
4855
|
),
|
|
@@ -4887,7 +4887,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4887
4887
|
fontSize: 7,
|
|
4888
4888
|
fill: "#64748b",
|
|
4889
4889
|
textAnchor: "middle",
|
|
4890
|
-
children:
|
|
4890
|
+
children: chunkFDR5W67L_js.formatAxisValue(minVal)
|
|
4891
4891
|
},
|
|
4892
4892
|
`${element.id}-map-legend-min`
|
|
4893
4893
|
),
|
|
@@ -4899,7 +4899,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4899
4899
|
fontSize: 7,
|
|
4900
4900
|
fill: "#64748b",
|
|
4901
4901
|
textAnchor: "middle",
|
|
4902
|
-
children:
|
|
4902
|
+
children: chunkFDR5W67L_js.formatAxisValue(maxVal)
|
|
4903
4903
|
},
|
|
4904
4904
|
`${element.id}-map-legend-max`
|
|
4905
4905
|
)
|
|
@@ -4965,7 +4965,7 @@ function renderMapChart(element, chartData, categoryLabels) {
|
|
|
4965
4965
|
y,
|
|
4966
4966
|
fontSize,
|
|
4967
4967
|
fill: "#475569",
|
|
4968
|
-
children:
|
|
4968
|
+
children: chunkFDR5W67L_js.formatAxisValue(row.value)
|
|
4969
4969
|
},
|
|
4970
4970
|
`${element.id}-map-ft-val-${i}`
|
|
4971
4971
|
)
|
|
@@ -5036,7 +5036,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
|
|
|
5036
5036
|
|
|
5037
5037
|
// src/viewer/utils/chart-overlay-utils.ts
|
|
5038
5038
|
function sColor(series, idx) {
|
|
5039
|
-
return
|
|
5039
|
+
return chunkFDR5W67L_js.seriesColor(series, idx);
|
|
5040
5040
|
}
|
|
5041
5041
|
function valToY(val, range, topY, bottomY) {
|
|
5042
5042
|
const usable = bottomY - topY;
|
|
@@ -5575,7 +5575,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5575
5575
|
width: 10,
|
|
5576
5576
|
height: 10,
|
|
5577
5577
|
rx: 2,
|
|
5578
|
-
fill:
|
|
5578
|
+
fill: chunkFDR5W67L_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5579
5579
|
},
|
|
5580
5580
|
`${id}-leg-r-${i}`
|
|
5581
5581
|
)
|
|
@@ -5599,7 +5599,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
|
|
|
5599
5599
|
width: 10,
|
|
5600
5600
|
height: 10,
|
|
5601
5601
|
rx: 2,
|
|
5602
|
-
fill:
|
|
5602
|
+
fill: chunkFDR5W67L_js.seriesColor(s, i, style?.styleId, colorPalette)
|
|
5603
5603
|
}
|
|
5604
5604
|
),
|
|
5605
5605
|
/* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
|
|
@@ -5612,9 +5612,9 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5612
5612
|
}
|
|
5613
5613
|
const lines = [];
|
|
5614
5614
|
if (range.logScale && range.logBase) {
|
|
5615
|
-
const ticks =
|
|
5615
|
+
const ticks = chunkFDR5W67L_js.generateLogTicks(range);
|
|
5616
5616
|
ticks.forEach((tickVal, i) => {
|
|
5617
|
-
const y =
|
|
5617
|
+
const y = chunkFDR5W67L_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5618
5618
|
lines.push(
|
|
5619
5619
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5620
5620
|
"line",
|
|
@@ -5635,7 +5635,7 @@ function renderGridlines(id, style, range, layout) {
|
|
|
5635
5635
|
const steps = 4;
|
|
5636
5636
|
for (let i = 0; i <= steps; i++) {
|
|
5637
5637
|
const val = range.min + range.span * i / steps;
|
|
5638
|
-
const y =
|
|
5638
|
+
const y = chunkFDR5W67L_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5639
5639
|
lines.push(
|
|
5640
5640
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5641
5641
|
"line",
|
|
@@ -5659,9 +5659,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5659
5659
|
const labels = [];
|
|
5660
5660
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5661
5661
|
if (range.logScale && range.logBase) {
|
|
5662
|
-
const ticks =
|
|
5662
|
+
const ticks = chunkFDR5W67L_js.generateLogTicks(range);
|
|
5663
5663
|
ticks.forEach((tickVal, i) => {
|
|
5664
|
-
const y =
|
|
5664
|
+
const y = chunkFDR5W67L_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
|
|
5665
5665
|
labels.push(
|
|
5666
5666
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5667
5667
|
"text",
|
|
@@ -5671,7 +5671,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5671
5671
|
textAnchor: "end",
|
|
5672
5672
|
fontSize: 8,
|
|
5673
5673
|
fill: "#64748b",
|
|
5674
|
-
children: hasDisplayUnits ?
|
|
5674
|
+
children: hasDisplayUnits ? chunkFDR5W67L_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkFDR5W67L_js.formatAxisValue(tickVal)
|
|
5675
5675
|
},
|
|
5676
5676
|
`${id}-vaxis-log-${i}`
|
|
5677
5677
|
)
|
|
@@ -5681,7 +5681,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5681
5681
|
const steps = 4;
|
|
5682
5682
|
for (let i = 0; i <= steps; i++) {
|
|
5683
5683
|
const val = range.min + range.span * i / steps;
|
|
5684
|
-
const y =
|
|
5684
|
+
const y = chunkFDR5W67L_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5685
5685
|
labels.push(
|
|
5686
5686
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5687
5687
|
"text",
|
|
@@ -5691,7 +5691,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5691
5691
|
textAnchor: "end",
|
|
5692
5692
|
fontSize: 8,
|
|
5693
5693
|
fill: "#64748b",
|
|
5694
|
-
children: hasDisplayUnits ?
|
|
5694
|
+
children: hasDisplayUnits ? chunkFDR5W67L_js.formatAxisValueWithUnits(val, axisFormatting) : chunkFDR5W67L_js.formatAxisValue(val)
|
|
5695
5695
|
},
|
|
5696
5696
|
`${id}-vaxis-${i}`
|
|
5697
5697
|
)
|
|
@@ -5699,7 +5699,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
|
|
|
5699
5699
|
}
|
|
5700
5700
|
}
|
|
5701
5701
|
if (hasDisplayUnits) {
|
|
5702
|
-
const unitLabel =
|
|
5702
|
+
const unitLabel = chunkFDR5W67L_js.getDisplayUnitLabel(
|
|
5703
5703
|
axisFormatting.displayUnits,
|
|
5704
5704
|
axisFormatting.displayUnitsLabel
|
|
5705
5705
|
);
|
|
@@ -5774,7 +5774,7 @@ function renderZeroLine(id, range, layout) {
|
|
|
5774
5774
|
if (range.min >= 0) {
|
|
5775
5775
|
return null;
|
|
5776
5776
|
}
|
|
5777
|
-
const y =
|
|
5777
|
+
const y = chunkFDR5W67L_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
|
|
5778
5778
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5779
5779
|
"line",
|
|
5780
5780
|
{
|
|
@@ -5798,7 +5798,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5798
5798
|
const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
|
|
5799
5799
|
for (let i = 0; i <= steps; i++) {
|
|
5800
5800
|
const val = range.min + range.span * i / steps;
|
|
5801
|
-
const y =
|
|
5801
|
+
const y = chunkFDR5W67L_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5802
5802
|
labels.push(
|
|
5803
5803
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5804
5804
|
"text",
|
|
@@ -5810,7 +5810,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5810
5810
|
fontFamily,
|
|
5811
5811
|
fontWeight,
|
|
5812
5812
|
fill: fontColor,
|
|
5813
|
-
children: hasDisplayUnits ?
|
|
5813
|
+
children: hasDisplayUnits ? chunkFDR5W67L_js.formatAxisValueWithUnits(val, axisFormatting) : chunkFDR5W67L_js.formatAxisValue(val)
|
|
5814
5814
|
},
|
|
5815
5815
|
`${id}-sec-vaxis-${i}`
|
|
5816
5816
|
)
|
|
@@ -5834,7 +5834,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
|
|
|
5834
5834
|
);
|
|
5835
5835
|
}
|
|
5836
5836
|
if (hasDisplayUnits) {
|
|
5837
|
-
const unitLabel =
|
|
5837
|
+
const unitLabel = chunkFDR5W67L_js.getDisplayUnitLabel(
|
|
5838
5838
|
axisFormatting.displayUnits,
|
|
5839
5839
|
axisFormatting.displayUnitsLabel
|
|
5840
5840
|
);
|
|
@@ -5865,7 +5865,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
|
|
|
5865
5865
|
const ticks = [];
|
|
5866
5866
|
for (let i = 0; i <= steps; i++) {
|
|
5867
5867
|
const val = range.min + range.span * i / steps;
|
|
5868
|
-
const y =
|
|
5868
|
+
const y = chunkFDR5W67L_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5869
5869
|
ticks.push(
|
|
5870
5870
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5871
5871
|
"line",
|
|
@@ -5892,7 +5892,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
|
|
|
5892
5892
|
const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
|
|
5893
5893
|
for (let i = 0; i <= steps; i++) {
|
|
5894
5894
|
const val = range.min + range.span * i / steps;
|
|
5895
|
-
const y =
|
|
5895
|
+
const y = chunkFDR5W67L_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
|
|
5896
5896
|
lines.push(
|
|
5897
5897
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5898
5898
|
"line",
|
|
@@ -6054,7 +6054,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6054
6054
|
width: 8,
|
|
6055
6055
|
height: 8,
|
|
6056
6056
|
borderRadius: 2,
|
|
6057
|
-
backgroundColor:
|
|
6057
|
+
backgroundColor: chunkFDR5W67L_js.seriesColor(
|
|
6058
6058
|
s,
|
|
6059
6059
|
si,
|
|
6060
6060
|
chartData.style?.styleId,
|
|
@@ -6092,10 +6092,10 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
|
|
|
6092
6092
|
}
|
|
6093
6093
|
function renderStockChart(element, chartData, categoryLabels) {
|
|
6094
6094
|
const style = chartData.style;
|
|
6095
|
-
const areaFill =
|
|
6095
|
+
const areaFill = chunkFDR5W67L_js.chartAreaFill(chartData);
|
|
6096
6096
|
const legendPos = style?.legendPosition || "b";
|
|
6097
|
-
const range =
|
|
6098
|
-
const layout =
|
|
6097
|
+
const range = chunkFDR5W67L_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6098
|
+
const layout = chunkFDR5W67L_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6099
6099
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6100
6100
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
6101
6101
|
const candleWidth = barGroupWidth * 0.5;
|
|
@@ -6116,10 +6116,10 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6116
6116
|
const close = closeSeries.values[ci] ?? high;
|
|
6117
6117
|
const isUp = close >= open;
|
|
6118
6118
|
const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
|
|
6119
|
-
const highY =
|
|
6120
|
-
const lowY =
|
|
6121
|
-
const openY =
|
|
6122
|
-
const closeY =
|
|
6119
|
+
const highY = chunkFDR5W67L_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
|
|
6120
|
+
const lowY = chunkFDR5W67L_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
|
|
6121
|
+
const openY = chunkFDR5W67L_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
|
|
6122
|
+
const closeY = chunkFDR5W67L_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
|
|
6123
6123
|
elements.push(
|
|
6124
6124
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6125
6125
|
"line",
|
|
@@ -6162,7 +6162,7 @@ function renderStockChart(element, chartData, categoryLabels) {
|
|
|
6162
6162
|
textAnchor: "middle",
|
|
6163
6163
|
fontSize: 7,
|
|
6164
6164
|
fill: "#334155",
|
|
6165
|
-
children:
|
|
6165
|
+
children: chunkFDR5W67L_js.formatAxisValue(close)
|
|
6166
6166
|
},
|
|
6167
6167
|
`${element.id}-stock-dl-${ci}`
|
|
6168
6168
|
)
|
|
@@ -6204,7 +6204,7 @@ function FailedToLoad() {
|
|
|
6204
6204
|
var LazySurfaceChart3DScene = React6__default.default.lazy(
|
|
6205
6205
|
async () => {
|
|
6206
6206
|
try {
|
|
6207
|
-
return await import('./SurfaceChart3DScene-
|
|
6207
|
+
return await import('./SurfaceChart3DScene-OTKXQH5O.js');
|
|
6208
6208
|
} catch {
|
|
6209
6209
|
return { default: FailedToLoad };
|
|
6210
6210
|
}
|
|
@@ -6228,7 +6228,7 @@ var SurfaceChart3DErrorBoundary = class extends React6__default.default.Componen
|
|
|
6228
6228
|
function buildSurfaceData(chartData, categoryLabels) {
|
|
6229
6229
|
const rows = chartData.series.length;
|
|
6230
6230
|
const cols = Math.max(categoryLabels.length, 1);
|
|
6231
|
-
const range =
|
|
6231
|
+
const range = chunkFDR5W67L_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6232
6232
|
const heightMap = new Float32Array(rows * cols);
|
|
6233
6233
|
const colorMap = new Float32Array(rows * cols * 3);
|
|
6234
6234
|
for (let r = 0; r < rows; r++) {
|
|
@@ -6347,10 +6347,10 @@ function darkenRgb(r, g, b, factor) {
|
|
|
6347
6347
|
}
|
|
6348
6348
|
function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
6349
6349
|
const style = chartData.style;
|
|
6350
|
-
const areaFill =
|
|
6350
|
+
const areaFill = chunkFDR5W67L_js.chartAreaFill(chartData);
|
|
6351
6351
|
const legendPos = style?.legendPosition || "b";
|
|
6352
|
-
const layout =
|
|
6353
|
-
const range =
|
|
6352
|
+
const layout = chunkFDR5W67L_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
6353
|
+
const range = chunkFDR5W67L_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6354
6354
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6355
6355
|
const seriesCount = chartData.series.length;
|
|
6356
6356
|
const cols = catCount - 1;
|
|
@@ -6439,10 +6439,10 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6439
6439
|
}
|
|
6440
6440
|
function renderFlatSurfaceChart(element, chartData, categoryLabels) {
|
|
6441
6441
|
const style = chartData.style;
|
|
6442
|
-
const areaFill =
|
|
6442
|
+
const areaFill = chunkFDR5W67L_js.chartAreaFill(chartData);
|
|
6443
6443
|
const legendPos = style?.legendPosition || "b";
|
|
6444
|
-
const layout =
|
|
6445
|
-
const range =
|
|
6444
|
+
const layout = chunkFDR5W67L_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6445
|
+
const range = chunkFDR5W67L_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6446
6446
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6447
6447
|
const seriesCount = chartData.series.length;
|
|
6448
6448
|
const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
|
|
@@ -6504,9 +6504,9 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
|
|
|
6504
6504
|
}
|
|
6505
6505
|
function renderTreemapChart(element, chartData, categoryLabels) {
|
|
6506
6506
|
const style = chartData.style;
|
|
6507
|
-
const areaFill =
|
|
6507
|
+
const areaFill = chunkFDR5W67L_js.chartAreaFill(chartData);
|
|
6508
6508
|
const legendPos = style?.legendPosition || "b";
|
|
6509
|
-
const layout =
|
|
6509
|
+
const layout = chunkFDR5W67L_js.computeLayout(element.width, element.height, style, false, legendPos);
|
|
6510
6510
|
const allValues = chartData.series.flatMap((s) => s.values);
|
|
6511
6511
|
const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
|
|
6512
6512
|
const rects = [];
|
|
@@ -6529,7 +6529,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6529
6529
|
y: curY,
|
|
6530
6530
|
width: Math.max(w - 1, 1),
|
|
6531
6531
|
height: Math.max(h - 1, 1),
|
|
6532
|
-
fill:
|
|
6532
|
+
fill: chunkFDR5W67L_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
|
|
6533
6533
|
rx: 2,
|
|
6534
6534
|
opacity: 0.85
|
|
6535
6535
|
},
|
|
@@ -6580,11 +6580,11 @@ function renderTreemapChart(element, chartData, categoryLabels) {
|
|
|
6580
6580
|
}
|
|
6581
6581
|
function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
6582
6582
|
const style = chartData.style;
|
|
6583
|
-
const areaFill =
|
|
6583
|
+
const areaFill = chunkFDR5W67L_js.chartAreaFill(chartData);
|
|
6584
6584
|
const legendPos = style?.legendPosition || "b";
|
|
6585
6585
|
const values = chartData.series[0]?.values ?? [];
|
|
6586
|
-
const range =
|
|
6587
|
-
const layout =
|
|
6586
|
+
const range = chunkFDR5W67L_js.computeValueRangeForChart(chartData.series, chartData.axes);
|
|
6587
|
+
const layout = chunkFDR5W67L_js.computeLayout(element.width, element.height, style, true, legendPos);
|
|
6588
6588
|
const catCount = Math.max(categoryLabels.length, values.length, 1);
|
|
6589
6589
|
const barWidth = layout.plotWidth / catCount * 0.6;
|
|
6590
6590
|
const gap = layout.plotWidth / catCount * 0.2;
|
|
@@ -6595,8 +6595,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6595
6595
|
const isLast = i === values.length - 1;
|
|
6596
6596
|
const startVal = isLast ? 0 : runningTotal;
|
|
6597
6597
|
const endVal = isLast ? runningTotal + val : runningTotal + val;
|
|
6598
|
-
const barStartY =
|
|
6599
|
-
const barEndY =
|
|
6598
|
+
const barStartY = chunkFDR5W67L_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
|
|
6599
|
+
const barEndY = chunkFDR5W67L_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
|
|
6600
6600
|
const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
|
|
6601
6601
|
const y = Math.min(barStartY, barEndY);
|
|
6602
6602
|
const h = Math.max(Math.abs(barEndY - barStartY), 1);
|
|
@@ -6625,7 +6625,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6625
6625
|
textAnchor: "middle",
|
|
6626
6626
|
fontSize: 7,
|
|
6627
6627
|
fill: "#334155",
|
|
6628
|
-
children:
|
|
6628
|
+
children: chunkFDR5W67L_js.formatAxisValue(isLast ? endVal : val)
|
|
6629
6629
|
},
|
|
6630
6630
|
`${element.id}-wf-dl-${i}`
|
|
6631
6631
|
)
|
|
@@ -6672,20 +6672,20 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
|
|
|
6672
6672
|
}
|
|
6673
6673
|
function renderComboChart(element, chartData, categoryLabels) {
|
|
6674
6674
|
const style = chartData.style;
|
|
6675
|
-
const areaFill =
|
|
6675
|
+
const areaFill = chunkFDR5W67L_js.chartAreaFill(chartData);
|
|
6676
6676
|
const legendPos = style?.legendPosition || "b";
|
|
6677
|
-
const layoutOpts =
|
|
6677
|
+
const layoutOpts = chunkFDR5W67L_js.computeLayoutOptions(
|
|
6678
6678
|
chartData.axes,
|
|
6679
6679
|
chartData.dataTable,
|
|
6680
6680
|
chartData.series.length
|
|
6681
6681
|
);
|
|
6682
|
-
const layout =
|
|
6683
|
-
const { primary, secondary } =
|
|
6682
|
+
const layout = chunkFDR5W67L_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
|
|
6683
|
+
const { primary, secondary } = chunkFDR5W67L_js.splitSeriesByAxis(chartData.series, chartData.axes);
|
|
6684
6684
|
const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
|
|
6685
6685
|
const secondarySeries = secondary.map((e) => e.series);
|
|
6686
|
-
const range =
|
|
6687
|
-
const secondaryRange = secondarySeries.length > 0 ?
|
|
6688
|
-
const secondaryAxisFmt =
|
|
6686
|
+
const range = chunkFDR5W67L_js.computeValueRangeForChart(primarySeries, chartData.axes);
|
|
6687
|
+
const secondaryRange = secondarySeries.length > 0 ? chunkFDR5W67L_js.computeValueRange(secondarySeries) : void 0;
|
|
6688
|
+
const secondaryAxisFmt = chunkFDR5W67L_js.getSecondaryValueAxis(chartData.axes);
|
|
6689
6689
|
const catCount = Math.max(categoryLabels.length, 1);
|
|
6690
6690
|
const barSeriesCount = 1;
|
|
6691
6691
|
const barGroupWidth = layout.plotWidth / catCount;
|
|
@@ -6701,8 +6701,8 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6701
6701
|
const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
|
|
6702
6702
|
barSeries.values.forEach((val, vi) => {
|
|
6703
6703
|
const x = layout.plotLeft + barGroupWidth * vi + barOffset;
|
|
6704
|
-
const zeroY =
|
|
6705
|
-
const valY =
|
|
6704
|
+
const zeroY = chunkFDR5W67L_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
|
|
6705
|
+
const valY = chunkFDR5W67L_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
|
|
6706
6706
|
const y = Math.min(zeroY, valY);
|
|
6707
6707
|
const h = Math.max(Math.abs(zeroY - valY), 1);
|
|
6708
6708
|
barElements.push(
|
|
@@ -6713,7 +6713,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6713
6713
|
y,
|
|
6714
6714
|
width: barWidth,
|
|
6715
6715
|
height: h,
|
|
6716
|
-
fill:
|
|
6716
|
+
fill: chunkFDR5W67L_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
|
|
6717
6717
|
rx: 1
|
|
6718
6718
|
},
|
|
6719
6719
|
`${element.id}-combo-bar-${vi}`
|
|
@@ -6729,7 +6729,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6729
6729
|
textAnchor: "middle",
|
|
6730
6730
|
fontSize: 7,
|
|
6731
6731
|
fill: "#334155",
|
|
6732
|
-
children:
|
|
6732
|
+
children: chunkFDR5W67L_js.formatAxisValue(val)
|
|
6733
6733
|
},
|
|
6734
6734
|
`${element.id}-combo-bar-dl-${vi}`
|
|
6735
6735
|
)
|
|
@@ -6746,10 +6746,10 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6746
6746
|
const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
|
|
6747
6747
|
const points = series.values.map((val, vi) => {
|
|
6748
6748
|
const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
|
|
6749
|
-
const y =
|
|
6749
|
+
const y = chunkFDR5W67L_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
|
|
6750
6750
|
return { x, y, val };
|
|
6751
6751
|
});
|
|
6752
|
-
const c =
|
|
6752
|
+
const c = chunkFDR5W67L_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
|
|
6753
6753
|
lineElements.push(
|
|
6754
6754
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6755
6755
|
"polyline",
|
|
@@ -6776,7 +6776,7 @@ function renderComboChart(element, chartData, categoryLabels) {
|
|
|
6776
6776
|
textAnchor: "middle",
|
|
6777
6777
|
fontSize: 7,
|
|
6778
6778
|
fill: "#334155",
|
|
6779
|
-
children:
|
|
6779
|
+
children: chunkFDR5W67L_js.formatAxisValue(p.val)
|
|
6780
6780
|
},
|
|
6781
6781
|
`${element.id}-combo-line-dl-${si}-${vi}`
|
|
6782
6782
|
)
|
|
@@ -7922,14 +7922,14 @@ function buildNotesPdf(pages) {
|
|
|
7922
7922
|
notes: page.notes,
|
|
7923
7923
|
slideNumber: page.slideNumber
|
|
7924
7924
|
}));
|
|
7925
|
-
const bytes =
|
|
7925
|
+
const bytes = chunkFDR5W67L_js.buildNotesPdfBytes(images, meta);
|
|
7926
7926
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7927
7927
|
return URL.createObjectURL(blob);
|
|
7928
7928
|
}
|
|
7929
7929
|
|
|
7930
7930
|
// src/viewer/utils/pdf-builder-slides.ts
|
|
7931
7931
|
function buildPdfFromImageData(images) {
|
|
7932
|
-
const bytes =
|
|
7932
|
+
const bytes = chunkFDR5W67L_js.buildSlidesPdfBytes(images);
|
|
7933
7933
|
const blob = new Blob([bytes], { type: "application/pdf" });
|
|
7934
7934
|
return URL.createObjectURL(blob);
|
|
7935
7935
|
}
|
|
@@ -7938,7 +7938,7 @@ function buildPdfFromImageData(images) {
|
|
|
7938
7938
|
var activePreview = null;
|
|
7939
7939
|
function startPreviewAnimation(elementId, preset, options) {
|
|
7940
7940
|
stopPreviewAnimation();
|
|
7941
|
-
const descriptor =
|
|
7941
|
+
const descriptor = chunkFDR5W67L_js.buildPreviewAnimation(preset, options);
|
|
7942
7942
|
if (!descriptor) {
|
|
7943
7943
|
return;
|
|
7944
7944
|
}
|
|
@@ -7951,7 +7951,7 @@ function startMotionPathPreview(elementId, path, options) {
|
|
|
7951
7951
|
return;
|
|
7952
7952
|
}
|
|
7953
7953
|
const stage = domEl.offsetParent;
|
|
7954
|
-
const descriptor =
|
|
7954
|
+
const descriptor = chunkFDR5W67L_js.buildMotionPathPreview({
|
|
7955
7955
|
path,
|
|
7956
7956
|
slideWidth: stage?.offsetWidth || DEFAULT_PREVIEW_SLIDE_WIDTH,
|
|
7957
7957
|
slideHeight: stage?.offsetHeight || DEFAULT_PREVIEW_SLIDE_HEIGHT,
|