ooxml-ui 1.36.0 → 1.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/chart/format-pane-analysis.d.ts +1 -0
  2. package/dist/chart/format-pane-effects.d.ts +1 -0
  3. package/dist/chart/format-pane-fill-kinds.d.ts +1 -0
  4. package/dist/chart/format-pane-fill-line.d.ts +1 -0
  5. package/dist/chart/format-pane-targets.d.ts +1 -0
  6. package/dist/chart/format-pane-text.d.ts +1 -0
  7. package/dist/{chunk-Z4DML5NW.js → chunk-FQYCSYWH.js} +1 -1
  8. package/dist/index.js +2 -2
  9. package/dist/smartart/smartart-text-pane-tools.d.ts +1 -0
  10. package/dist/teams.js +1 -1
  11. package/dist/theme-bridge.d.ts +1 -0
  12. package/dist/theme.d.ts +1 -0
  13. package/dist/touch-targets.d.ts +1 -0
  14. package/dist/visio/canvas-editing.d.ts +2 -0
  15. package/dist/visio/locales/de-backstage.d.ts +2 -0
  16. package/dist/visio/locales/en-backstage.d.ts +2 -0
  17. package/dist/visio/locales/es-backstage.d.ts +2 -0
  18. package/dist/visio/locales/fr-backstage.d.ts +2 -0
  19. package/dist/visio/locales/zh-CN-backstage.d.ts +2 -0
  20. package/dist/visio/paragraph-layout.d.ts +6 -1
  21. package/dist/visio/render-bevel.d.ts +15 -0
  22. package/dist/visio/ribbon-action.d.ts +2 -2
  23. package/dist/visio/ribbon-localize.d.ts +6 -0
  24. package/dist/visio/ribbon-org-chart.d.ts +3 -2
  25. package/dist/visio/ribbon-shape-styles.d.ts +2 -0
  26. package/dist/visio/tab-layout.d.ts +15 -0
  27. package/dist/visio/viewer-backstage.d.ts +4 -0
  28. package/dist/visio/viewer-control-handles.d.ts +19 -0
  29. package/dist/visio/viewer-data-advanced.d.ts +25 -0
  30. package/dist/visio/viewer-data-fields.d.ts +16 -0
  31. package/dist/visio/viewer-data-labels.d.ts +8 -0
  32. package/dist/visio/viewer-data-visualizer.d.ts +25 -0
  33. package/dist/visio/viewer-data.d.ts +6 -0
  34. package/dist/visio/viewer-org-chart.d.ts +11 -0
  35. package/dist/visio/viewer-shape-actions.d.ts +12 -0
  36. package/dist/visio/viewer-shape-styles.d.ts +1 -1
  37. package/dist/visio.js +2155 -539
  38. package/dist/xlsx.js +3 -3
  39. package/package.json +2 -2
  40. /package/dist/{chunk-7ST5QRD5.js → chunk-O3P6UH4P.js} +0 -0
package/dist/visio.js CHANGED
@@ -11,9 +11,9 @@ import { definePresence } from './chunk-YZH2QS7J.js';
11
11
  import { parseSvgPreview } from './chunk-FN7IF6M6.js';
12
12
  import './chunk-QLHCGV4C.js';
13
13
  import './chunk-XL77FR4B.js';
14
- import { VISIO_CAPABILITY_COMMANDS, VISIO_TEXT_LANGUAGES, VISIO_BULLET_STYLES, FOREIGN_VECTOR_SCENE_LIMITS, EMPTY_TEXT_SEARCH, EMPTY_SELECTION, EMPTY_EDIT_STATE, assertViewableDocument, snapshotSelection, selectionKey, indexDocumentText, searchDocumentText, sameSelection, validateSearchQuery, MAX_INPUT_BYTES, createTemplateVsdx, DocumentHistory, snapshotEdits, visioWithContainerMembers, snapshotVisioGeometryExpectation, visioSelectionIsOnPage, visioContainerUpkeep, assertVisioGeometryExpectation, visioDuplicateCommand, visioGroupCommand, visioUngroupCommand, visioContainerCommand, visioCalloutCommand, visioPasteCommand, visioTextOccurrenceSelection, ForeignVectorBudget, VISIO_IDENTITY_TRANSFORM, hasVisibleShapeContent, composeVisioTransform, compatibilityNotes, compatibilityText, visioGradientInstances, visioRenderedGradientStopCount, inspectForeignVectorResource, VISIO_CAPABILITY_BACKSTAGE_PAGES, copySnapshotScene, editErrorMessage, eventKeys, isEditCancellation, propertyKeys, VISIO_TEXT_REPLACE_LIMITS, visioTextReplaceOccurrences, visioTextReplacePlan, visioTextReplaceCommands, visioClipboardShape, TEXT_SEARCH_LIMITS, VISIO_TEMPLATES, visioSizePositionCommand, visioSizePositionState, visioPageInsertCommand, visioQuarterTurnCommand, visioRotationShape, VISIO_INITIAL_PRESENCE, sanitizeVisioPresence, isVisioTemplateId, textSearchStatus, visioSvgStrokeStyle, visioLineDashLengths, visioStencilDropCommand, visioMovementShape, visioMoveCommands, visioMoveTargets, visioMarqueeBox, visioPageDragDelta, visioSnapResizeDrag, visioResizeSelectionFrame, visioResizeSelectionDrag, visioTextShape, visioTextDraftEdit, isVisioPathTool, visioPathDrawPlan, visioDrawPlan, visioDrawBounds, visioDrawIsLargeEnough, visioConnectorCreationCommand, visioConnectorRouteOf, visioPageEditToDrawing, visioNudgeCommands, VISIO_DIAGRAM_RULE_SETS, visioArrangeCommands, visioChangeMasterTargets, visioChangeMasterCommand, visioChangeShapeRefusal, visioChangeShapeCommand, visioChangeCaseShape, visioChangeCaseCommand, visioTextBlockShape, visioTextBlockFrame, visioTextBlockEdit, visioOrderingShape, visioFormatTargetShape, visioFormattingShape, visioTextFormattingState, visioTextIndentCommand, visioTextFontStepCommand, visioFontFamilies, visioChartObjectInsertCommand, visioPictureInsertCommand, normalizeVisioHyperlinkAddress, visioFitToDrawingEdits, VISIO_PAPER_SIZES, visioPageSizePresetEdits, visioOrientationEdits, visioPageDecorationState, visioNewPageId, visioMatchingPaperSize, visioPageBreaks, visioSwimlaneOptions, visioInsertSeparator, visioDeleteSwimlane, visioInsertSwimlane, visioOrgHierarchy, visioOrgDeletePosition, visioOrgReLayout, visioOrgAddPosition, VISIO_DATA_GRAPHIC_POSITIONS, visioRemoveDataGraphicEdits, visioDataGraphicFields, visioDataGraphicConfigs, visioAutoSpaceDataGraphicEdits, visioPositionDataGraphicEdits, visioDataGraphicEdits, visioShapeDataRow, VISIO_DATA_GRAPHIC_FILL_ROW, visioColorRules, visioLegendEdits, visioDataGraphicParts, visioTextDialogValues, visioTextDialogPatch, visioFormatPainterSnapshot, visioFormatPainterEdits, VISIO_FORMAT_PAINTER_LIMITS, visioConnectableShape, visioAddConnectionPointCommand, visioSwimlaneInfo, visioWithCalloutLeaders, visioWithDataGraphics, visioOrgPosition, visioFillPatternTransform, visioRenderedGradientStops, visioStrokeGradient, visioMasterDropRefusal, visioMasterDropSize, visioFileMasterDropCommand, visioMasterDropCommand, visioDrawingPoint, visioMovePreviewTransform, visioMarqueeSelection, VISIO_RESIZE_HANDLES, visioResizeSwimlane, visioPathPreview, visioNearestConnectionPoint, visioRotationPreviewTransform, visioStraightLineHandles, visioConnectorEndHandles, VISIO_LAYOUT_STYLES, visioShapeFormattingState, visioGlowKey, visioShapeEffectValues, visioReflectionKey, visioFollowTarget, visioPaperSize, visioKeepAutoSize, VISIO_RULER_DENSITY_CHOICES, VISIO_GRID_DENSITY_CHOICES, visioGridSteps, visioRulerGridValues, visioRulerDensityFactor, visioRulerGridEdits, checkVisioDiagram, visioShapeReport, visioShapeReportTable, visioShapeReportCsv, visioShapeReportText, visioSubprocessCommand, visioShapeDataText, VISIO_LAYOUT_LABELS, visioAutoAlignCommands, visioReLayoutCommands, visioLayerAssignState, visioNewLayerNames, visioLayerAssignCommands, VISIO_SELECT_TYPES, VISIO_SELECT_TYPE_LABELS, visioPageMasters, visioSelectByType, visioPasteTextCommand, visioSnapMoveDelta, visioPageGuides, visioAutoConnectShape, visioAutoConnectArrows, visioAutoConnectNeighbor, visioAutoConnectPlan, visioShapePageBox, VISIO_FIELD_CATEGORIES, visioTextAppendEdit, visioTextSource, visioTextBlockMatrix, VISIO_TEXT_BLOCK_HANDLES, visioShapeLocalPoint, visioTextBlockDrag, visioShapeFrame, visioMasterPreviewBox, visioConnectorMovePreviews, visioConnectorPreviewPath, visioGlueableShape, visioDataGraphicMarker, visioParseRange, visioDataTable, visioWorkbookGrid, visioGuideCreateCommand, visioGuideMoveCommand } from 'ooxml-core/visio/ui';
14
+ import { VISIO_CAPABILITY_COMMANDS, VISIO_TEXT_LANGUAGES, VISIO_BULLET_STYLES, FOREIGN_VECTOR_SCENE_LIMITS, EMPTY_TEXT_SEARCH, EMPTY_SELECTION, EMPTY_EDIT_STATE, assertViewableDocument, snapshotSelection, selectionKey, indexDocumentText, searchDocumentText, sameSelection, validateSearchQuery, MAX_INPUT_BYTES, createTemplateVsdx, DocumentHistory, snapshotEdits, visioWithContainerMembers, snapshotVisioGeometryExpectation, visioSelectionIsOnPage, visioContainerUpkeep, assertVisioGeometryExpectation, visioDuplicateCommand, visioGroupCommand, visioUngroupCommand, visioContainerCommand, visioCalloutCommand, visioPasteCommand, visioTextOccurrenceSelection, ForeignVectorBudget, VISIO_IDENTITY_TRANSFORM, hasVisibleShapeContent, composeVisioTransform, compatibilityNotes, compatibilityText, visioGradientInstances, visioRenderedGradientStopCount, inspectForeignVectorResource, VISIO_CAPABILITY_BACKSTAGE_PAGES, copySnapshotScene, editErrorMessage, eventKeys, isEditCancellation, propertyKeys, VISIO_TEXT_REPLACE_LIMITS, visioTextReplaceOccurrences, visioTextReplacePlan, visioTextReplaceCommands, visioClipboardShape, TEXT_SEARCH_LIMITS, VISIO_TEMPLATES, visioSizePositionCommand, visioSizePositionState, visioPageInsertCommand, visioQuarterTurnCommand, visioRotationShape, VISIO_INITIAL_PRESENCE, sanitizeVisioPresence, isVisioTemplateId, textSearchStatus, visioSvgStrokeStyle, visioLineDashLengths, visioStencilDropCommand, visioMovementShape, visioMoveCommands, visioMoveTargets, visioMarqueeBox, visioPageDragDelta, visioSnapResizeDrag, visioResizeSelectionFrame, visioResizeSelectionDrag, visioTextShape, visioTextDraftEdit, isVisioPathTool, visioPathDrawPlan, visioDrawPlan, visioDrawBounds, visioDrawIsLargeEnough, visioConnectorCreationCommand, visioConnectorRouteOf, visioPageEditToDrawing, visioNudgeCommands, VISIO_DIAGRAM_RULE_SETS, visioArrangeCommands, visioChangeMasterTargets, visioChangeMasterCommand, visioChangeShapeRefusal, visioChangeShapeCommand, visioChangeCaseShape, visioChangeCaseCommand, visioTextBlockShape, visioTextBlockFrame, visioTextBlockEdit, visioOrderingShape, visioFormatTargetShape, visioFormattingShape, visioTextFormattingState, visioTextIndentCommand, visioTextFontStepCommand, visioFontFamilies, visioChartObjectInsertCommand, visioPictureInsertCommand, normalizeVisioHyperlinkAddress, visioFitToDrawingEdits, VISIO_PAPER_SIZES, visioPageSizePresetEdits, visioOrientationEdits, visioPageDecorationState, visioNewPageId, visioMatchingPaperSize, visioPageBreaks, visioSwimlaneOptions, visioInsertSeparator, visioDeleteSwimlane, visioInsertSwimlane, visioOrgHierarchy, visioOrgPeople, visioOrgImportEdits, visioOrgReLayout, visioOrgAddPosition, VISIO_DATA_GRAPHIC_POSITIONS, visioDataGraphicFields, visioRemoveDataGraphicEdits, visioDataGraphicConfigs, visioAutoSpaceDataGraphicEdits, visioPositionDataGraphicEdits, visioDataGraphicEdits, visioSetDataGraphicItemEdits, visioShapeDataRow, VISIO_DATA_GRAPHIC_FILL_ROW, visioColorRules, visioLegendEdits, visioDataGraphicParts, visioTextDialogValues, visioTextDialogPatch, visioFormatPainterSnapshot, visioFormatPainterEdits, VISIO_FORMAT_PAINTER_LIMITS, visioConnectableShape, visioAddConnectionPointCommand, visioSwimlaneInfo, visioWithCalloutLeaders, visioWithDataGraphics, visioOrgPosition, visioFillPatternTransform, visioRenderedGradientStops, visioStrokeGradient, visioMasterDropRefusal, visioMasterDropSize, visioFileMasterDropCommand, visioMasterDropCommand, visioDrawingPoint, visioMovePreviewTransform, visioMarqueeSelection, VISIO_RESIZE_HANDLES, visioResizeSwimlane, visioPathPreview, visioNearestConnectionPoint, visioRotationPreviewTransform, visioStraightLineHandles, visioConnectorEndHandles, VISIO_LAYOUT_STYLES, visioShapeFormattingState, visioGlowKey, visioShapeEffectValues, visioReflectionKey, visioFollowTarget, visioPaperSize, visioKeepAutoSize, VISIO_RULER_DENSITY_CHOICES, VISIO_GRID_DENSITY_CHOICES, visioGridSteps, visioRulerGridValues, visioRulerDensityFactor, visioRulerGridEdits, checkVisioDiagram, visioShapeReport, visioShapeReportTable, visioShapeReportCsv, visioShapeReportText, visioSubprocessCommand, visioParseRange, visioDataTable, visioWorkbookGrid, visioOrgDeletePosition, visioShapeDataText, visioOrgFollowData, visioDeleteDataGraphicItemEdits, visioDataGraphicItems, visioVisualizerShapes, visioParseVisualizerTable, visioDataVisualizerEdits, VISIO_VISUALIZER_COLUMNS, VISIO_LAYOUT_LABELS, visioAutoAlignCommands, visioReLayoutCommands, visioLayerAssignState, visioNewLayerNames, visioLayerAssignCommands, VISIO_SELECT_TYPES, VISIO_SELECT_TYPE_LABELS, visioPageMasters, visioSelectByType, visioPasteTextCommand, visioSnapMoveDelta, visioPageGuides, visioAutoConnectShape, visioAutoConnectArrows, visioAutoConnectNeighbor, visioAutoConnectPlan, visioShapePageBox, VISIO_FIELD_CATEGORIES, visioTextAppendEdit, visioTextSource, visioTextBlockMatrix, VISIO_TEXT_BLOCK_HANDLES, visioShapeLocalPoint, visioTextBlockDrag, visioShapeFrame, visioMasterPreviewBox, visioConnectorMovePreviews, visioConnectorPreviewPath, visioGlueableShape, visioDataGraphicMarker, visioGuideCreateCommand, visioGuideMoveCommand } from 'ooxml-core/visio/ui';
15
15
  export { TEXT_SEARCH_LIMITS, VISIO_CAPABILITY_IDS, compatibilityNotes, compatibilityText, demoDocument, eventKeys, propertyKeys } from 'ooxml-core/visio/ui';
16
- import { VISIO_VISIBILITY_LIMITS, VISIO_BASIC_STENCIL, VISIO_STENCILS, visioOutlineShape, VISIO_SNAP, VISIO_GLUE, VISIO_SHADOW_PRESETS, loadVisio, createVsdx, deserializeVisioClipboard, mergeVisioPages, getVisioPageLayers, resolveVisioPageVisibility, visioLineJumpPaths, VISIO_CLIPBOARD_MAX_CHARS, visioSnapGlue, VISIO_SWIMLANE_STYLES, VISIO_GLOW_TRANSPARENCY, VISIO_METADATA_TEXT_LIMIT, VISIO_PICTURE_MAX_BYTES, inspectVisioRasterImage, visioPageLayout, VISIO_BUILT_IN_THEMES, VISIO_CONNECTOR_ROUTES, visioFilledArrow, layoutVisioFilledArrowLine, visioOpenArrowPath, visioBuiltInStencil, visioBuiltInMaster, isVisioChangeShapeTarget, VISIO_CONTAINER_STYLES, VISIO_CALLOUT_STYLES, visioFallbackQuickStyle, VISIO_GLOW_SIZES, VISIO_SOFT_EDGE_SIZES, VISIO_REFLECTION_PRESETS, encodeBitmapEmf, VISIO_BACKGROUND_STYLES, visioBackgroundShapes, VISIO_BORDER_STYLES, visioBorderShapes, checkVisioAlternativeText, visioRefreshReport, VISIO_SHAPE_DATA_TYPES, visioShapeDataRowName, VISIO_CLIPBOARD_MAGIC, visioThemeVariantColors, visioPageThemeColors, parseVsdx, readVisioStencil, isVisioBuiltInThemeId, VISIO_QUICK_STYLE_COLORS, VISIO_SCALE_UNITS } from 'ooxml-core/visio';
16
+ import { VISIO_VISIBILITY_LIMITS, VISIO_BASIC_STENCIL, VISIO_STENCILS, visioOutlineShape, VISIO_SNAP, VISIO_GLUE, VISIO_SHADOW_PRESETS, loadVisio, createVsdx, deserializeVisioClipboard, mergeVisioPages, getVisioPageLayers, resolveVisioPageVisibility, visioLineJumpPaths, VISIO_CLIPBOARD_MAX_CHARS, visioSnapGlue, VISIO_SWIMLANE_STYLES, VISIO_GLOW_TRANSPARENCY, VISIO_METADATA_TEXT_LIMIT, VISIO_PICTURE_MAX_BYTES, inspectVisioRasterImage, visioPageLayout, VISIO_BUILT_IN_THEMES, VISIO_CONNECTOR_ROUTES, visioRotation3dMatrix, visioFilledArrow, layoutVisioFilledArrowLine, visioOpenArrowPath, VISIO_BEVEL_TYPES_SHARP, VISIO_BEVEL_TYPES_INSET, visioBuiltInStencil, visioBuiltInMaster, isVisioChangeShapeTarget, VISIO_CONTAINER_STYLES, VISIO_CALLOUT_STYLES, visioFallbackQuickStyle, VISIO_GLOW_SIZES, VISIO_BEVEL_PRESETS, VISIO_ROTATION_PRESETS, VISIO_SOFT_EDGE_SIZES, VISIO_REFLECTION_PRESETS, encodeBitmapEmf, VISIO_BACKGROUND_STYLES, visioBackgroundShapes, VISIO_BORDER_STYLES, visioBorderShapes, checkVisioAlternativeText, visioRefreshReport, VISIO_SHAPE_DATA_TYPES, visioShapeDataRowName, VISIO_CLIPBOARD_MAGIC, visioThemeVariantColors, visioPageThemeColors, parseVsdx, visioTabStarts, readVisioStencil, isVisioBuiltInThemeId, VISIO_QUICK_STYLE_COLORS, VISIO_SCALE_UNITS } from 'ooxml-core/visio';
17
17
  import { renderChartSvg, readEmbeddedChartSpace, readEmbeddedChartExSpace, writeEmbeddedChartSpace, writeEmbeddedChartExSpace } from 'ooxml-core/xlsx';
18
18
  import { resolveRotateHandlePlacement, createRotationDrag, snapAngle } from 'ooxml-core/geometry';
19
19
  import { normalizeLocale, interpolate } from 'ooxml-core/i18n';
@@ -23,6 +23,7 @@ import { INSERT_CHART_TYPES, GROUPED_CHART_TYPES, gridChartSvg, gridChart, parse
23
23
  import { applyChartSpaceDataSheetEdits, applyChartExSpaceDataSheetEdits, applyChartEditIntent, applyChartExEditIntent, chartSpaceDataSheet, renderChartSpaceSvg, chartExSpaceDataSheet, chartExSummaryFromModel, renderChartSummarySvg } from 'ooxml-core/chart';
24
24
  import { pushRecentColor, normalizePaletteHex } from 'ooxml-core/color';
25
25
  import { parseTrueType, subsetTrueType } from 'ooxml-core/text';
26
+ import { zlibCompress } from 'ooxml-core/opc';
26
27
 
27
28
  function createWorkerEditor(factory, timeoutMs = 2e4) {
28
29
  const create = (() => {
@@ -2451,6 +2452,7 @@ function layoutParagraphs(text2, measure = measureBrowserText, budget = createTe
2451
2452
  align: paragraph.horizontalAlign,
2452
2453
  direction: paragraph.direction,
2453
2454
  last: index === wrapped.length - 1,
2455
+ tabs: { stops: paragraph.tabs ?? [], origin: text2.margins.left },
2454
2456
  ...index === 0 && paragraph.bullet ? { bullet: { ...paragraph.bullet, x: left - paragraph.bullet.offset } } : {}
2455
2457
  });
2456
2458
  y += height;
@@ -2475,8 +2477,61 @@ function sliceRuns(runs, offsets, start, end) {
2475
2477
  }
2476
2478
  return result;
2477
2479
  }
2480
+ var lineHasTab = (line) => line.runs.some((run) => run.text.includes(" "));
2481
+ var widthOf = (runs, measure, stop) => {
2482
+ let width = 0;
2483
+ for (const run of runs) {
2484
+ const at = stop === void 0 ? -1 : run.text.indexOf(stop);
2485
+ const text2 = at < 0 ? run.text : run.text.slice(0, at);
2486
+ if (text2) width += measure(text2, run);
2487
+ if (at >= 0) break;
2488
+ }
2489
+ return width;
2490
+ };
2491
+ function layoutTabbedLine(line, measure = measureBrowserText) {
2492
+ if (line.align !== "left" || line.direction !== "ltr" || !lineHasTab(line)) return void 0;
2493
+ const parts = [[]];
2494
+ for (const run of line.runs) {
2495
+ const pieces = run.text.split(" ");
2496
+ pieces.forEach((piece, index) => {
2497
+ if (index > 0) parts.push([]);
2498
+ if (piece) parts[parts.length - 1].push({ ...run, text: piece });
2499
+ });
2500
+ }
2501
+ const segments = parts.map((runs) => {
2502
+ const width = widthOf(runs, measure);
2503
+ const decimal = runs.some((run) => run.text.includes(".")) ? widthOf(runs, measure, ".") : width;
2504
+ return { width, decimal };
2505
+ });
2506
+ const starts = visioTabStarts(segments, line.tabs?.stops ?? [], line.tabs?.origin ?? 0, line.x);
2507
+ return parts.map((runs, index) => ({ runs, x: starts[index] }));
2508
+ }
2478
2509
 
2479
2510
  // src/visio/render-text.ts
2511
+ function appendRuns(row, runs, text2) {
2512
+ let shift = 0;
2513
+ for (const run of runs) {
2514
+ const span = svgElement("tspan");
2515
+ span.textContent = runDisplayText(run.text, run);
2516
+ span.setAttribute("font-family", run.fontFamily);
2517
+ span.setAttribute("font-size", String(runDisplaySize(run)));
2518
+ if (run.textCase === "small-caps") span.setAttribute("font-variant", "small-caps");
2519
+ if (run.letterSpacing) span.setAttribute("letter-spacing", String(run.letterSpacing));
2520
+ const target = runBaselineShift(run);
2521
+ if (target !== shift) span.setAttribute("dy", String(target - shift));
2522
+ shift = target;
2523
+ span.setAttribute("fill", safeColor(run.color));
2524
+ span.setAttribute("fill-opacity", String(run.opacity ?? text2.opacity ?? 1));
2525
+ if (run.bold) span.setAttribute("font-weight", "bold");
2526
+ if (run.italic) span.setAttribute("font-style", "italic");
2527
+ const decorations = [
2528
+ run.underline ? "underline" : "",
2529
+ run.strikethrough ? "line-through" : ""
2530
+ ].filter(Boolean);
2531
+ if (decorations.length) span.setAttribute("text-decoration", decorations.join(" "));
2532
+ row.append(span);
2533
+ }
2534
+ }
2480
2535
  function renderText(text2, warnings, budget) {
2481
2536
  const group2 = svgElement("g");
2482
2537
  group2.setAttribute(
@@ -2537,29 +2592,19 @@ function renderText(text2, warnings, budget) {
2537
2592
  row.setAttribute("textLength", String(line.availableWidth));
2538
2593
  row.setAttribute("lengthAdjust", "spacing");
2539
2594
  }
2540
- let shift = 0;
2541
- for (const run of line.runs) {
2542
- const span = svgElement("tspan");
2543
- span.textContent = runDisplayText(run.text, run);
2544
- span.setAttribute("font-family", run.fontFamily);
2545
- span.setAttribute("font-size", String(runDisplaySize(run)));
2546
- if (run.textCase === "small-caps") span.setAttribute("font-variant", "small-caps");
2547
- if (run.letterSpacing) span.setAttribute("letter-spacing", String(run.letterSpacing));
2548
- const target = runBaselineShift(run);
2549
- if (target !== shift) span.setAttribute("dy", String(target - shift));
2550
- shift = target;
2551
- span.setAttribute("fill", safeColor(run.color));
2552
- span.setAttribute("fill-opacity", String(run.opacity ?? text2.opacity ?? 1));
2553
- if (run.bold) span.setAttribute("font-weight", "bold");
2554
- if (run.italic) span.setAttribute("font-style", "italic");
2555
- const decorations = [
2556
- run.underline ? "underline" : "",
2557
- run.strikethrough ? "line-through" : ""
2558
- ].filter(Boolean);
2559
- if (decorations.length) span.setAttribute("text-decoration", decorations.join(" "));
2560
- row.append(span);
2561
- }
2562
- node.append(row);
2595
+ const tabbed = layoutTabbedLine(line);
2596
+ if (tabbed) row.remove();
2597
+ else appendRuns(row, line.runs, text2);
2598
+ for (const part of tabbed ?? []) {
2599
+ const segment = svgElement("tspan");
2600
+ segment.setAttribute("x", String(part.x));
2601
+ segment.setAttribute("y", String(y + line.y));
2602
+ segment.setAttribute("direction", "ltr");
2603
+ segment.setAttribute("text-anchor", "start");
2604
+ appendRuns(segment, part.runs, text2);
2605
+ node.append(segment);
2606
+ }
2607
+ if (!tabbed) node.append(row);
2563
2608
  if (line.bullet) {
2564
2609
  const bullet = svgElement("text");
2565
2610
  bullet.textContent = line.bullet.text;
@@ -2772,6 +2817,95 @@ function renderShapeEffects(shape, paths, defs, world) {
2772
2817
  defs.append(filter);
2773
2818
  return { below, geometryFilter: `url(#${filter.id})` };
2774
2819
  }
2820
+ var bevelId = 0;
2821
+ var ELEVATION = 45;
2822
+ var FLAT = Math.sin(ELEVATION * Math.PI / 180);
2823
+ var scale2 = (world) => Math.sqrt(Math.abs(world[0] * world[3] - world[1] * world[2])) || 1;
2824
+ function renderBevel(shape, paths, defs, world) {
2825
+ const bevel = shape.style.bevel;
2826
+ const filled = paths.filter((path) => path.getAttribute("fill") !== "none");
2827
+ if (!bevel || !filled.length) return void 0;
2828
+ const unit2 = scale2(world);
2829
+ const width = Math.max(bevel.width, bevel.height) / unit2;
2830
+ const sharp = VISIO_BEVEL_TYPES_SHARP.includes(bevel.type);
2831
+ const inset = VISIO_BEVEL_TYPES_INSET.includes(bevel.type);
2832
+ const radius = (sharp ? width / 4 : width / 2) || 1e-6;
2833
+ const filter = svgElement("filter");
2834
+ filter.id = `visio-bevel-${++bevelId}`;
2835
+ filter.setAttribute("filterUnits", "userSpaceOnUse");
2836
+ filter.setAttribute("x", String(Math.min(0, shape.width) - width));
2837
+ filter.setAttribute("y", String(Math.min(0, shape.height) - width));
2838
+ filter.setAttribute("width", String(Math.abs(shape.width) + width * 2));
2839
+ filter.setAttribute("height", String(Math.abs(shape.height) + width * 2));
2840
+ const add = (name, attributes) => {
2841
+ const node = svgElement(name);
2842
+ for (const [key, value] of Object.entries(attributes)) node.setAttribute(key, String(value));
2843
+ filter.append(node);
2844
+ return node;
2845
+ };
2846
+ add("feGaussianBlur", { in: "SourceAlpha", stdDeviation: radius, result: "height" });
2847
+ const light = add("feDiffuseLighting", {
2848
+ in: "height",
2849
+ surfaceScale: Math.min(10, 2 + bevel.height * 72 / 2) * (sharp ? 1.5 : 1),
2850
+ diffuseConstant: 1,
2851
+ "lighting-color": "#ffffff",
2852
+ result: "lit"
2853
+ });
2854
+ const distant = svgElement("feDistantLight");
2855
+ light.append(distant);
2856
+ distant.setAttribute("azimuth", String(inset ? 45 : 225));
2857
+ distant.setAttribute("elevation", String(ELEVATION));
2858
+ const gain = sharp ? 5 : 3;
2859
+ add("feColorMatrix", {
2860
+ in: "lit",
2861
+ type: "matrix",
2862
+ values: `0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 ${gain} 0 0 0 ${-gain * FLAT}`,
2863
+ result: "high"
2864
+ });
2865
+ add("feColorMatrix", {
2866
+ in: "lit",
2867
+ type: "matrix",
2868
+ values: `0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${-gain} 0 0 0 ${gain * FLAT}`,
2869
+ result: "low"
2870
+ });
2871
+ add("feMerge", { result: "both" }).append(
2872
+ ...["low", "high"].map((name) => {
2873
+ const node = svgElement("feMergeNode");
2874
+ node.setAttribute("in", name);
2875
+ return node;
2876
+ })
2877
+ );
2878
+ add("feComposite", { in: "both", in2: "SourceAlpha", operator: "in" });
2879
+ defs.append(filter);
2880
+ const group2 = svgElement("g");
2881
+ group2.dataset.bevel = "";
2882
+ group2.setAttribute("pointer-events", "none");
2883
+ group2.setAttribute("aria-hidden", "true");
2884
+ group2.setAttribute("filter", `url(#${filter.id})`);
2885
+ group2.setAttribute("opacity", "0.6");
2886
+ for (const source of filled) {
2887
+ const copy = svgElement("path");
2888
+ copy.setAttribute("d", source.getAttribute("d") ?? "");
2889
+ copy.setAttribute("fill", "#000000");
2890
+ copy.setAttribute("stroke", "none");
2891
+ group2.append(copy);
2892
+ }
2893
+ return group2;
2894
+ }
2895
+ function rotation3dWrapper(shape) {
2896
+ const rotation = shape.style.rotation3d;
2897
+ if (!rotation) return void 0;
2898
+ const [a, b, c, d] = visioRotation3dMatrix(rotation);
2899
+ const cx = shape.width / 2, cy = shape.height / 2;
2900
+ const wrapper = svgElement("g");
2901
+ wrapper.dataset.rotation3d = "";
2902
+ if (rotation.perspective > 0) wrapper.dataset.perspective = "";
2903
+ wrapper.setAttribute(
2904
+ "transform",
2905
+ `matrix(${a} ${b} ${c} ${d} ${cx - a * cx - c * cy} ${cy - b * cx - d * cy})`
2906
+ );
2907
+ return wrapper;
2908
+ }
2775
2909
 
2776
2910
  // src/visio/render-svg.ts
2777
2911
  var NS2 = "http://www.w3.org/2000/svg";
@@ -2905,8 +3039,11 @@ function drawShape(shape, parent, context, pageId, parentTransform = VISIO_IDENT
2905
3039
  own();
2906
3040
  children();
2907
3041
  }
2908
- function drawOwn(shape, group2, context, world) {
3042
+ function drawOwn(shape, outer, context, world) {
2909
3043
  const { warnings, defs, resources } = context;
3044
+ const turned = rotation3dWrapper(shape);
3045
+ if (turned) outer.append(turned);
3046
+ const group2 = turned ?? outer;
2910
3047
  const lineStyle = context.static ? visioSvgStrokeStyle(shape.style) : shape.style;
2911
3048
  if (context.interactive && shape.text.plainText && !shape.geometry.some(
2912
3049
  (geometry) => geometry.fill && shape.style.fill !== "none" || geometry.stroke && shape.style.linePattern !== 0
@@ -2966,13 +3103,18 @@ function drawOwn(shape, group2, context, world) {
2966
3103
  for (const path of paths) path.setAttribute("filter", effects.geometryFilter);
2967
3104
  const shadow = renderShadow(shape, paths, defs, world);
2968
3105
  if (shadow) group2.insertBefore(shadow, effects.below[0] ?? paths[0]);
3106
+ const bevel = renderBevel(shape, paths, defs, world);
3107
+ if (bevel) group2.append(bevel);
2969
3108
  const raster = renderImage(shape, resources);
2970
3109
  if (raster) group2.append(raster);
2971
3110
  const chart = renderEmbeddedChart(shape);
2972
3111
  if (chart) group2.append(chart);
2973
3112
  const vector = renderForeignVectorShape(shape, context.vectorBudget);
2974
3113
  if (vector) group2.append(vector);
2975
- if (shape.text.plainText) group2.append(renderText(shape.text, warnings, context.textBudget));
3114
+ if (shape.text.plainText)
3115
+ (shape.style.rotation3d?.keepTextFlat ? outer : group2).append(
3116
+ renderText(shape.text, warnings, context.textBudget)
3117
+ );
2976
3118
  if (shape.kind === "foreign" && !shape.image && !shape.foreignVector && !shape.embeddedObject)
2977
3119
  warnings.add("Embedded or foreign objects are not rendered in this build.");
2978
3120
  }
@@ -3657,7 +3799,7 @@ summary::marker { color:var(--_vv-muted); font-size:10px; }
3657
3799
  var backstage_default = "/* Visio's File tab and backstage. */\n:host {\n position: relative;\n}\n/* The shared office-ui-backstage draws the File column; these style Visio's page content. */\n.backstage-page h1 {\n margin: 0 0 24px;\n font-size: 34px;\n font-weight: 300;\n}\n.backstage-page h2 {\n margin: 20px 0 8px;\n font-size: 16px;\n font-weight: 600;\n}\n.backstage-file {\n margin-top: 0 !important;\n font-size: 20px !important;\n font-weight: 400 !important;\n overflow-wrap: anywhere;\n}\n.backstage-facts {\n display: grid;\n grid-template-columns: max-content 1fr;\n gap: 8px 24px;\n max-width: 520px;\n margin: 0;\n font-size: 13px;\n}\n.backstage-facts dt {\n color: var(--_vv-muted);\n}\n.backstage-facts dd {\n margin: 0;\n overflow-wrap: anywhere;\n}\n.backstage-action {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 2px;\n width: min(420px, 100%);\n min-height: 64px;\n margin: 0 0 10px;\n padding: 10px 16px;\n text-align: left;\n background: var(--_vv-surface);\n}\n.backstage-action strong {\n font-size: 14px;\n font-weight: 600;\n}\n.backstage-action span,\n.backstage-muted,\n.backstage-note-count {\n color: var(--_vv-muted);\n font-size: 12px;\n}\n.backstage-templates {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n}\n.backstage-templates .backstage-action,\n.backstage-templates ::slotted(*) {\n width: 200px;\n min-height: 120px;\n}\n.backstage-thumb {\n align-self: stretch;\n width: 100%;\n height: 72px;\n margin-bottom: 6px;\n object-fit: contain;\n background: #fff;\n border: 1px solid var(--_vv-border, currentColor);\n}\n/* Account: the shared profile editor, then Visio's product information. */\n.backstage-page office-ui-account {\n max-width: 560px;\n}\n.backstage-product {\n margin-top: 24px;\n}\n/* Share with people: a live session between windows of this browser. */\n.share-panel {\n max-width: 560px;\n margin-bottom: 16px;\n}\n.share-panel h2 {\n margin-top: 0 !important;\n}\n.share-field {\n display: grid;\n gap: 4px;\n max-width: 320px;\n margin: 12px 0;\n font-size: 13px;\n}\n.share-room {\n min-height: 30px;\n padding: 2px 8px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n color: inherit;\n font: inherit;\n}\n.share-buttons button {\n min-height: 32px;\n padding: 0 16px;\n}\n.share-buttons button[hidden] {\n display: none;\n}\n.share-status {\n min-height: 20px;\n font-size: 13px;\n}\n/* File > Export > PDF options: the page range and the report of the last export. */\n.pdf-options {\n max-width: 560px;\n margin: 8px 0 16px;\n}\n.pdf-field {\n display: grid;\n gap: 4px;\n max-width: 240px;\n margin: 8px 0;\n font-size: 13px;\n}\n.pdf-field select,\n.pdf-field input {\n min-height: 30px;\n padding: 2px 8px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n color: inherit;\n font: inherit;\n}\n.pdf-range {\n display: flex;\n gap: 12px;\n}\n.pdf-range[hidden],\n.pdf-report[hidden] {\n display: none;\n}\n.pdf-report {\n margin-top: 8px;\n font-size: 13px;\n}\n.pdf-report ul {\n margin: 4px 0 0;\n padding-left: 20px;\n}\n";
3658
3800
 
3659
3801
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/canvas.css?raw
3660
- var canvas_default = "/*\n * Drawing canvas focus. SVG outlines are drawn in drawing units (inches here), so a browser\n * focus ring on a shape becomes a page-sized blob. Shapes show focus with a dashed accent\n * stroke instead, only for keyboard focus; selection keeps its solid accent stroke.\n */\n.paper [data-shape-id]:focus,\n.paper [data-shape-id]:focus-visible {\n outline: none;\n}\n.paper [data-shape-id]:focus-visible > [data-geometry] {\n stroke: var(--_vv-focus) !important;\n stroke-width: 0.04 !important;\n stroke-dasharray: 0.08 0.05;\n}\n\n/* Visio's selection: white handles with a grey outline on a thin grey frame. */\n.paper [data-line-endpoint],\n.paper [data-resize-handle],\n.rotation-overlay [data-rotation-handle] {\n fill: #fff;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.25px;\n cursor: crosshair;\n touch-action: none;\n pointer-events: all;\n}\n.paper [data-resize-handle]:hover,\n.paper [data-line-endpoint]:hover,\n.rotation-overlay [data-rotation-handle]:hover {\n fill: var(--_vv-accent-soft, #dfe5f6);\n}\n.paper [data-resize-handle='n'],\n.paper [data-resize-handle='s'] {\n cursor: ns-resize;\n}\n.paper [data-resize-handle='e'],\n.paper [data-resize-handle='w'] {\n cursor: ew-resize;\n}\n.paper [data-resize-handle='ne'],\n.paper [data-resize-handle='sw'] {\n cursor: nesw-resize;\n}\n.paper [data-resize-handle='nw'],\n.paper [data-resize-handle='se'] {\n cursor: nwse-resize;\n}\n.rotation-overlay [data-rotation-handle] {\n stroke: transparent;\n cursor: grab;\n}\n.rotation-overlay .rotation-glyph {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.5px;\n stroke-linecap: round;\n stroke-linejoin: round;\n pointer-events: none;\n}\n.rotation-overlay [data-rotation-handle]:hover + .rotation-glyph {\n stroke: var(--_vv-accent);\n}\n.paper [data-resize-frame] {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1px;\n pointer-events: none;\n}\n/*\n * A selection with no frame or endpoint handles (several shapes, a group, a glued connector) is\n * marked on the shapes themselves; a framed shape keeps its own outline, as in Visio.\n */\n.viewport:not([data-selection-frame]) .paper [data-selected='true'] > [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-width: 0.025 !important;\n}\n.viewport:not([data-selection-frame]) .paper [role='group'][data-selected='true'] [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-dasharray: 0.06 0.04;\n}\n/* Handles step aside while a shape's text is edited in place. */\n.viewport[data-text-editing] [data-resize-overlay],\n.viewport[data-text-editing] .rotation-overlay,\n.viewport[data-text-editing] [data-line-endpoint] {\n display: none;\n}\n.paper [data-resize-frame-preview] {\n stroke-dasharray: 5 3;\n}\n.paper .endpoint-preview,\n.paper .rotation-preview {\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 5 3;\n pointer-events: none;\n}\n/* Visio shows no line from the pin to the rotation handle. */\n.rotation-overlay .rotation-stem {\n display: none;\n}\n\n.rotation-overlay {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n}\n/* View > Visual Aids > Connection Points: blue x markers (presentation only, never exported). */\n.paper [data-connection-points] path {\n fill: none;\n stroke: #1f6fd1;\n stroke-width: 1.25px;\n pointer-events: none;\n}\n.paper [data-connection-points] path[data-inherited='true'] {\n stroke-opacity: 0.55;\n}\n.paper [data-connection-points] path[data-selected='true'] {\n stroke: var(--_vv-accent);\n stroke-width: 2.5px;\n}\n/* A connector end over a connection point glues to that point. */\n.paper .connect-point-target {\n fill: none;\n stroke: #2e9d43;\n stroke-width: 2px;\n pointer-events: none;\n}\n/* Connectors glued to dragged shapes, re-routed live until the move is committed. */\n.paper .connector-preview {\n fill: none;\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n\n/* View > Visual Aids > AutoConnect: arrows outside a hovered shape and their Quick Shapes bar. */\n.auto-connect {\n position: absolute;\n z-index: 2;\n width: 0;\n height: 0;\n pointer-events: none;\n}\n.viewport[data-text-editing] .auto-connect {\n display: none;\n}\n.auto-connect-arrow {\n position: absolute;\n width: 20px;\n height: 20px;\n margin: -10px 0 0 -10px;\n padding: 2px;\n border: 0;\n background: none;\n cursor: pointer;\n pointer-events: auto;\n}\n.auto-connect-arrow svg {\n display: block;\n width: 16px;\n height: 16px;\n fill: var(--_vv-accent-soft);\n stroke: var(--_vv-accent);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n.auto-connect-arrow:hover svg {\n fill: var(--_vv-accent);\n}\n.auto-connect-bar {\n position: absolute;\n display: flex;\n gap: 2px;\n padding: 3px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n box-shadow: 0 2px 8px rgb(0 0 0 / 18%);\n pointer-events: auto;\n}\n.auto-connect-bar[data-side='right'] {\n transform: translate(9px, -50%);\n}\n.auto-connect-bar[data-side='left'] {\n transform: translate(calc(-100% - 9px), -50%);\n}\n.auto-connect-bar[data-side='up'] {\n transform: translate(-50%, calc(-100% - 9px));\n}\n.auto-connect-bar[data-side='down'] {\n transform: translate(-50%, 9px);\n}\n.auto-connect-bar button {\n width: 30px;\n height: 30px;\n padding: 3px;\n border: 1px solid transparent;\n border-radius: 2px;\n background: none;\n cursor: pointer;\n}\n.auto-connect-bar button:hover {\n border-color: var(--_vv-accent);\n background: var(--_vv-accent-soft);\n}\n.auto-connect-bar svg {\n display: block;\n width: 22px;\n height: 22px;\n fill: var(--_vv-surface);\n stroke: var(--_vv-ink);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n\n/*\n * Touch: the drawing window owns its gestures (pinch zoom, one-finger pan, drag), so the browser\n * must not scroll or zoom it. Only this surface is affected; the page around it still scrolls.\n */\n.viewport,\n.viewport .paper {\n touch-action: none;\n}\n/* Fingers need larger handles: the scale grows both the drawing and the hit area. */\n@media (pointer: coarse) {\n .paper [data-resize-handle],\n .paper [data-line-endpoint] {\n transform-box: fill-box;\n transform-origin: center;\n transform: scale(2);\n }\n}\n";
3802
+ var canvas_default = "/*\n * Drawing canvas focus. SVG outlines are drawn in drawing units (inches here), so a browser\n * focus ring on a shape becomes a page-sized blob. Shapes show focus with a dashed accent\n * stroke instead, only for keyboard focus; selection keeps its solid accent stroke.\n */\n.paper [data-shape-id]:focus,\n.paper [data-shape-id]:focus-visible {\n outline: none;\n}\n.paper [data-shape-id]:focus-visible > [data-geometry] {\n stroke: var(--_vv-focus) !important;\n stroke-width: 0.04 !important;\n stroke-dasharray: 0.08 0.05;\n}\n\n/* Visio's selection: white handles with a grey outline on a thin grey frame. */\n.paper [data-line-endpoint],\n.paper [data-resize-handle],\n.rotation-overlay [data-rotation-handle] {\n fill: #fff;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.25px;\n cursor: crosshair;\n touch-action: none;\n pointer-events: all;\n}\n.paper [data-resize-handle]:hover,\n.paper [data-line-endpoint]:hover,\n.rotation-overlay [data-rotation-handle]:hover {\n fill: var(--_vv-accent-soft, #dfe5f6);\n}\n.paper [data-resize-handle='n'],\n.paper [data-resize-handle='s'] {\n cursor: ns-resize;\n}\n.paper [data-resize-handle='e'],\n.paper [data-resize-handle='w'] {\n cursor: ew-resize;\n}\n.paper [data-resize-handle='ne'],\n.paper [data-resize-handle='sw'] {\n cursor: nesw-resize;\n}\n.paper [data-resize-handle='nw'],\n.paper [data-resize-handle='se'] {\n cursor: nwse-resize;\n}\n.rotation-overlay [data-rotation-handle] {\n stroke: transparent;\n cursor: grab;\n}\n.rotation-overlay .rotation-glyph {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1.5px;\n stroke-linecap: round;\n stroke-linejoin: round;\n pointer-events: none;\n}\n.rotation-overlay [data-rotation-handle]:hover + .rotation-glyph {\n stroke: var(--_vv-accent);\n}\n.paper [data-resize-frame] {\n fill: none;\n stroke: var(--_vv-handle, #7a7a7a);\n stroke-width: 1px;\n pointer-events: none;\n}\n/*\n * A selection with no frame or endpoint handles (several shapes, a group, a glued connector) is\n * marked on the shapes themselves; a framed shape keeps its own outline, as in Visio.\n */\n.viewport:not([data-selection-frame]) .paper [data-selected='true'] > [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-width: 0.025 !important;\n}\n.viewport:not([data-selection-frame]) .paper [role='group'][data-selected='true'] [data-geometry] {\n stroke: var(--_vv-accent) !important;\n stroke-dasharray: 0.06 0.04;\n}\n/* Handles step aside while a shape's text is edited in place. */\n.viewport[data-text-editing] [data-resize-overlay],\n.viewport[data-text-editing] .rotation-overlay,\n.viewport[data-text-editing] [data-line-endpoint] {\n display: none;\n}\n.paper [data-resize-frame-preview] {\n stroke-dasharray: 5 3;\n}\n.paper .endpoint-preview,\n.paper .rotation-preview {\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 5 3;\n pointer-events: none;\n}\n/* Visio shows no line from the pin to the rotation handle. */\n.rotation-overlay .rotation-stem {\n display: none;\n}\n\n.rotation-overlay {\n position: absolute;\n z-index: 1;\n pointer-events: none;\n}\n/* View > Visual Aids > Connection Points: blue x markers (presentation only, never exported). */\n.paper [data-connection-points] path {\n fill: none;\n stroke: #1f6fd1;\n stroke-width: 1.25px;\n pointer-events: none;\n}\n.paper [data-connection-points] path[data-inherited='true'] {\n stroke-opacity: 0.55;\n}\n.paper [data-connection-points] path[data-selected='true'] {\n stroke: var(--_vv-accent);\n stroke-width: 2.5px;\n}\n/* A connector end over a connection point glues to that point. */\n.paper .connect-point-target {\n fill: none;\n stroke: #2e9d43;\n stroke-width: 2px;\n pointer-events: none;\n}\n/* Connectors glued to dragged shapes, re-routed live until the move is committed. */\n.paper .connector-preview {\n fill: none;\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n\n/* View > Visual Aids > AutoConnect: arrows outside a hovered shape and their Quick Shapes bar. */\n.auto-connect {\n position: absolute;\n z-index: 2;\n width: 0;\n height: 0;\n pointer-events: none;\n}\n.viewport[data-text-editing] .auto-connect {\n display: none;\n}\n.auto-connect-arrow {\n position: absolute;\n width: 20px;\n height: 20px;\n margin: -10px 0 0 -10px;\n padding: 2px;\n border: 0;\n background: none;\n cursor: pointer;\n pointer-events: auto;\n}\n.auto-connect-arrow svg {\n display: block;\n width: 16px;\n height: 16px;\n fill: var(--_vv-accent-soft);\n stroke: var(--_vv-accent);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n.auto-connect-arrow:hover svg {\n fill: var(--_vv-accent);\n}\n.auto-connect-bar {\n position: absolute;\n display: flex;\n gap: 2px;\n padding: 3px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n background: var(--_vv-surface);\n box-shadow: 0 2px 8px rgb(0 0 0 / 18%);\n pointer-events: auto;\n}\n.auto-connect-bar[data-side='right'] {\n transform: translate(9px, -50%);\n}\n.auto-connect-bar[data-side='left'] {\n transform: translate(calc(-100% - 9px), -50%);\n}\n.auto-connect-bar[data-side='up'] {\n transform: translate(-50%, calc(-100% - 9px));\n}\n.auto-connect-bar[data-side='down'] {\n transform: translate(-50%, 9px);\n}\n.auto-connect-bar button {\n width: 30px;\n height: 30px;\n padding: 3px;\n border: 1px solid transparent;\n border-radius: 2px;\n background: none;\n cursor: pointer;\n}\n.auto-connect-bar button:hover {\n border-color: var(--_vv-accent);\n background: var(--_vv-accent-soft);\n}\n.auto-connect-bar svg {\n display: block;\n width: 22px;\n height: 22px;\n fill: var(--_vv-surface);\n stroke: var(--_vv-ink);\n stroke-width: 1;\n stroke-linejoin: round;\n}\n\n/*\n * Touch: the drawing window owns its gestures (pinch zoom, one-finger pan, drag), so the browser\n * must not scroll or zoom it. Only this surface is affected; the page around it still scrolls.\n */\n.viewport,\n.viewport .paper {\n touch-action: none;\n}\n/* Visio's yellow control handles; a handle that cannot be moved is grey. */\n.paper [data-control-handle] {\n fill: #ffe14d;\n stroke: #7a6a00;\n stroke-width: 1px;\n cursor: move;\n touch-action: none;\n pointer-events: all;\n}\n.paper [data-control-handle]:hover {\n fill: #fff08a;\n}\n.paper [data-control-handle][data-control-locked] {\n fill: #d4d4d4;\n stroke: #8a8a8a;\n cursor: not-allowed;\n}\n.viewport[data-text-editing] [data-control-handle] {\n display: none;\n}\n/* Fingers need larger handles: the scale grows both the drawing and the hit area. */\n@media (pointer: coarse) {\n .paper [data-resize-handle],\n .paper [data-control-handle],\n .paper [data-line-endpoint] {\n transform-box: fill-box;\n transform-origin: center;\n transform: scale(2);\n }\n}\n";
3661
3803
 
3662
3804
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/ribbon.css?raw
3663
3805
  var ribbon_default = "/*\n * Microsoft Visio ribbon layout on the shared ooxml-ui controls. The shared --office-* tokens come\n * from the bridge in styles/theme.ts. Loaded after the legacy styles.ts.\n */\n\n/* Tab row: Quick Access Toolbar, then Visio's tabs. */\n.ribbon-head {\n display: flex;\n align-items: stretch;\n min-width: 0;\n border-bottom: 1px solid var(--_vv-border);\n}\n.ribbon-head .ribbon-tabs {\n flex: 0 1 auto;\n min-width: 0;\n height: 36px;\n border-bottom: 0;\n overflow-x: auto;\n scrollbar-width: none;\n}\n.ribbon-head .ribbon-tabs button {\n flex: none;\n min-height: 35px;\n padding: 6px 12px;\n font-size: 13px;\n}\n\n/* Panels: groups of large commands and three-row stacks, as dense as Visio's. */\n.ribbon-content {\n min-height: 96px;\n padding: 2px 2px 0;\n /* Groups collapse into buttons when the window narrows (ribbon-overflow.ts), so the panel\n only scrolls when even those do not fit, and never shows a scrollbar. */\n scrollbar-width: none;\n}\n.ribbon-content::-webkit-scrollbar {\n display: none;\n}\n.ribbon-row {\n display: flex;\n flex-wrap: nowrap;\n align-items: stretch;\n gap: 0;\n padding: 0;\n border: 0;\n background: transparent;\n}\n.ribbon-row office-ui-ribbon-group {\n min-width: 0;\n}\noffice-ui-ribbon-group office-ui-button,\noffice-ui-ribbon-group office-ui-menu-button {\n --office-target-size: 24px;\n}\noffice-ui-ribbon-group [data-size='large'] {\n --office-target-size: 30px;\n}\noffice-ui-button[variant='stacked']::part(button) {\n min-width: 48px;\n min-height: 66px;\n padding: 2px 6px;\n font-size: 12px;\n}\noffice-ui-menu-button[variant='stacked']::part(button) {\n min-width: 48px;\n min-height: 50px;\n font-size: 12px;\n}\noffice-ui-ribbon-group [data-size='small']::part(button) {\n justify-content: flex-start;\n font-size: 12px;\n}\noffice-ui-ribbon-stack:not([orientation]) {\n justify-content: flex-start;\n padding-top: 2px;\n}\noffice-ui-ribbon-stack:not([orientation]) > * {\n min-height: 24px;\n}\noffice-ui-ribbon-group > office-ui-ribbon-stack > office-ui-ribbon-stack[orientation] {\n min-height: 32px;\n}\noffice-ui-select[data-combo] {\n --office-target-size: 24px;\n}\noffice-ui-menu-button[data-active]::part(button) {\n background: var(--_vv-accent-soft);\n box-shadow: inset 0 0 0 1px var(--_vv-accent);\n}\n[data-unsupported] {\n cursor: not-allowed;\n}\n.ribbon-check {\n display: flex;\n align-items: center;\n gap: 6px;\n min-height: 24px;\n padding: 0 6px;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n.ribbon-check[data-unsupported] {\n color: var(--_vv-muted);\n opacity: 0.6;\n}\n.ribbon-hint {\n display: none;\n}\n\n/* Drawing window with optional rulers. */\n.canvas-area {\n display: grid;\n flex: 1;\n min-width: 0;\n min-height: 0;\n grid-template-columns: 0 1fr;\n grid-template-rows: 0 1fr;\n}\n.canvas-area[data-ruler='true'] {\n grid-template-columns: 18px 1fr;\n grid-template-rows: 18px 1fr;\n}\n.canvas-area > .viewport {\n grid-column: 2;\n grid-row: 2;\n}\n.ruler,\n.ruler-corner {\n display: none;\n background: var(--_vv-surface);\n}\n.canvas-area[data-ruler='true'] > .ruler,\n.canvas-area[data-ruler='true'] > .ruler-corner {\n display: block;\n}\n.ruler-corner {\n grid-column: 1;\n grid-row: 1;\n border-right: 1px solid var(--_vv-border);\n border-bottom: 1px solid var(--_vv-border);\n}\n/* The shared office-ui-ruler draws ticks, labels and its own edge. */\n.ruler-h {\n grid-column: 2;\n grid-row: 1;\n}\n.ruler-v {\n grid-column: 1;\n grid-row: 2;\n}\n\n.page-bar {\n display: flex;\n flex: none;\n align-items: stretch;\n min-width: 0;\n border-top: 1px solid var(--_vv-border);\n background: var(--_vv-secondary);\n}\n.page-bar office-ui-menu-button {\n --office-target-size: 28px;\n flex: none;\n padding: 0 2px;\n}\n.page-tabs {\n flex: 1;\n min-width: 0;\n border-top: 0;\n}\noffice-ui-status-bar.status {\n gap: 16px;\n min-height: 29px;\n padding: 0 8px 0 12px;\n font-size: 11px;\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n}\noffice-ui-status-item[value=''] {\n display: none;\n}\n.viewport[data-tool='ellipse'],\n.viewport[data-tool='ellipse'] .paper [data-shape-id],\n.viewport[data-tool='rectangle'],\n.viewport[data-tool='rectangle'] .paper [data-shape-id],\n.viewport[data-tool='line'],\n.viewport[data-tool='line'] .paper [data-shape-id],\n.viewport[data-tool='freeform'],\n.viewport[data-tool='freeform'] .paper [data-shape-id],\n.viewport[data-tool='arc'],\n.viewport[data-tool='arc'] .paper [data-shape-id],\n.viewport[data-tool='pencil'],\n.viewport[data-tool='pencil'] .paper [data-shape-id],\n.viewport[data-tool='connector'],\n.viewport[data-tool='connector'] .paper [data-shape-id],\n.viewport[data-tool='connection-point'],\n.viewport[data-tool='connection-point'] .paper [data-shape-id] {\n cursor: crosshair;\n}\n.viewport[data-tool='ellipse'],\n.viewport[data-tool='rectangle'],\n.viewport[data-tool='line'],\n.viewport[data-tool='freeform'],\n.viewport[data-tool='arc'],\n.viewport[data-tool='pencil'],\n.viewport[data-tool='connector'] {\n touch-action: none;\n}\n\n/* Selection owns canvas drags. Surrounding chrome retains native scrolling. */\n.viewport[data-tool='pointer'] {\n touch-action: none;\n}\n/* Connector tool: the shape under the pointer is the glue target (Visio's green glue box). */\n.viewport .paper [data-connect-target='true'] > path[data-geometry] {\n /* Drawing units (inches), like the canvas focus stroke; wins over a focused shape's dashes. */\n stroke: var(--_vv-accent) !important;\n stroke-width: 0.05 !important;\n stroke-opacity: 1 !important;\n stroke-dasharray: none !important;\n}\npath.draw-preview {\n fill: none;\n}\n.draw-preview {\n fill: var(--_vv-accent-soft);\n stroke: var(--_vv-accent);\n stroke-width: 1.5px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n.viewport[data-grid='true'] .paper {\n --_vv-grid-minor: rgb(0 0 0 / 7%);\n --_vv-grid-major: rgb(0 0 0 / 16%);\n background-image:\n linear-gradient(to right, var(--_vv-grid-major) 1px, transparent 1px),\n linear-gradient(to top, var(--_vv-grid-major) 1px, transparent 1px),\n linear-gradient(to right, var(--_vv-grid-minor) 1px, transparent 1px),\n linear-gradient(to top, var(--_vv-grid-minor) 1px, transparent 1px);\n /* The page's grid (Ruler & Grid): a line every step, a stronger one every fourth step. */\n --_vv-grid-step-x: var(--_vv-grid-x, calc(var(--vv-inch, 96px) / 4));\n --_vv-grid-step-y: var(--_vv-grid-y, calc(var(--vv-inch, 96px) / 4));\n background-size:\n calc(var(--_vv-grid-step-x) * 4) calc(var(--_vv-grid-step-y) * 4),\n calc(var(--_vv-grid-step-x) * 4) calc(var(--_vv-grid-step-y) * 4),\n var(--_vv-grid-step-x) var(--_vv-grid-step-y),\n var(--_vv-grid-step-x) var(--_vv-grid-step-y);\n background-position: left var(--_vv-grid-origin-x, 0px) bottom var(--_vv-grid-origin-y, 0px);\n}\n:host(:fullscreen) {\n width: 100vw;\n height: 100vh;\n}\n\n@media (max-width: 760px) {\n .ribbon-row {\n flex: 1;\n min-width: 0;\n }\n office-ui-status-bar.status {\n gap: 4px;\n min-height: 48px;\n }\n office-ui-status-item:not([data-page-status]) {\n display: none;\n }\n .zoom-controls {\n flex: 1;\n min-width: 0;\n --office-zoom-slider-width: 0;\n }\n}\n\n/* Visio's Tell me box sits right after the tabs. */\n.tell-me {\n flex: 0 1 280px;\n min-width: 140px;\n margin: 0 8px;\n --office-target-size: 28px;\n}\n.presentation-mode {\n --office-target-size: 24px;\n}\n@media (max-width: 760px) {\n .tell-me {\n display: none;\n }\n}\n\n/*\n * Quick Styles, Themes and Variants: Visio's row of tiles with a More button. The viewer's width\n * sets data-inline-tiles (ribbon-inline-galleries.ts); the tiles beyond it stay in the gallery.\n */\n[data-inline-gallery][mode='inline'] {\n align-self: center;\n}\n[data-inline-tiles='1'] .strip .tile:nth-child(n + 2),\n[data-inline-tiles='2'] .strip .tile:nth-child(n + 3),\n[data-inline-tiles='3'] .strip .tile:nth-child(n + 4),\n[data-inline-tiles='4'] .strip .tile:nth-child(n + 5),\n[data-inline-tiles='5'] .strip .tile:nth-child(n + 6),\n[data-inline-tiles='6'] .strip .tile:nth-child(n + 7) {\n display: none;\n}\n";
@@ -3693,7 +3835,7 @@ var page_setup_default = ".page-setup-dialog .page-setup-tabs {\n display: flex;
3693
3835
  var review_default = "/* Review and Process: the Comments pane, the Issues window, Shape Reports and canvas markers. */\n.review-pane {\n display: flex;\n flex: 0 0 300px;\n flex-direction: column;\n width: 300px;\n min-width: 0;\n overflow: auto;\n border-left: 1px solid var(--_vv-border);\n background: var(--_vv-secondary);\n}\n.review-pane[hidden] {\n display: none;\n}\n.comments-pane-host office-ui-comments-pane {\n flex: 1;\n min-height: 0;\n}\n.issues-pane .pane-close {\n min-height: 24px;\n padding: 0 6px;\n background: transparent;\n border: 0;\n}\n.issues-summary,\n.issues-note {\n margin: 8px 10px;\n}\n.issues-note {\n color: var(--_vv-muted);\n font-size: 11px;\n}\n.issues-list {\n display: grid;\n gap: 4px;\n margin: 0;\n padding: 0 10px;\n list-style: none;\n}\n.issues-list button {\n display: grid;\n width: 100%;\n gap: 2px;\n text-align: start;\n}\n.issue-where {\n color: var(--_vv-muted);\n font-size: 11px;\n}\n.issues-ignored {\n display: flex;\n align-items: center;\n gap: 6px;\n margin: 8px 10px 0;\n}\n.issues-ignored input {\n min-height: 0;\n}\n.paper [data-comment-marker] {\n cursor: pointer;\n}\n.paper [data-comment-marker] path {\n fill: var(--_vv-accent);\n stroke: white;\n stroke-width: 1;\n}\n.paper [data-comment-marker][data-resolved] path {\n fill: var(--_vv-muted);\n}\n.paper [data-comment-marker] text {\n fill: white;\n font:\n 600 10px 'Segoe UI',\n Arial,\n sans-serif;\n text-anchor: middle;\n dominant-baseline: middle;\n}\n.shape-report-dialog label,\n.link-existing-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 12px;\n}\n.shape-report-dialog select,\n.link-existing-dialog select {\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.shape-report-table {\n max-width: min(860px, 86vw);\n max-height: min(420px, 60vh);\n overflow: auto;\n border: 1px solid var(--_vv-border);\n}\n.shape-report-table table {\n border-collapse: collapse;\n font-size: 11px;\n}\n.shape-report-table th,\n.shape-report-table td {\n max-width: 240px;\n padding: 3px 6px;\n overflow: hidden;\n text-align: start;\n text-overflow: ellipsis;\n white-space: nowrap;\n border-bottom: 1px solid var(--_vv-border);\n}\n.shape-report-table th {\n position: sticky;\n top: 0;\n background: var(--_vv-surface);\n}\n.link-existing-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n@media (max-width: 760px) {\n .review-pane {\n position: absolute;\n inset: 0 0 0 auto;\n z-index: 4;\n width: min(320px, 100%);\n box-shadow: -8px 0 24px #0002;\n }\n}\n";
3694
3836
 
3695
3837
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/data.css?raw
3696
- var data_default = "/* Visio's External Data window (docked under the drawing) and the Data tab dialogs. */\n.external-data {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n display: flex;\n flex-direction: column;\n max-height: min(40%, 320px);\n min-height: 140px;\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n border-top: 1px solid var(--_vv-border);\n box-shadow: 0 -2px 8px #0002;\n --office-background: var(--_vv-surface);\n --office-surface: var(--_vv-secondary);\n --office-foreground: var(--_vv-ink);\n}\n.external-data[hidden] {\n display: none;\n}\n/* A wide, short window: a compact title row, and only the grid scrolls. */\n.external-data::part(header) {\n padding: 4px 8px 4px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data::part(body) {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n.external-data-bar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data-bar select,\n.external-data-tools button {\n font: inherit;\n font-weight: 400;\n font-size: 12px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n padding: 3px 8px;\n}\n.external-data-tools {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n.external-data-tools button:disabled {\n opacity: 0.5;\n}\n.external-data-hint {\n margin: 4px 12px;\n font-size: 12px;\n color: var(--_vv-muted);\n}\n.external-data-grid {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n.external-data table {\n border-collapse: collapse;\n font-size: 12px;\n}\n.external-data th,\n.external-data td {\n padding: 3px 8px;\n border: 1px solid var(--_vv-border);\n text-align: left;\n white-space: nowrap;\n max-width: 240px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.external-data th {\n position: sticky;\n top: 0;\n background: var(--_vv-secondary);\n}\n.external-data tbody tr {\n cursor: grab;\n}\n.external-data tbody tr[aria-selected='true'] {\n background: var(--_vv-selection, #cfe3fa);\n}\n.external-data tbody tr[data-current] td:first-child {\n box-shadow: inset 3px 0 0 var(--_vv-accent);\n}\n.shape-data-dialog label,\n.data-import-dialog label,\n.data-graphics-dialog label,\n.data-link-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 10px;\n}\n.shape-data-dialog label:has(input[type='checkbox']),\n.data-import-dialog label:has(input[type='checkbox']) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.shape-data-dialog input:not([type='checkbox']),\n.shape-data-dialog select,\n.data-import-dialog input:not([type='checkbox']),\n.data-import-dialog select,\n.data-graphics-dialog input,\n.data-graphics-dialog select,\n.data-link-dialog select {\n box-sizing: border-box;\n width: 100%;\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.shape-data-dialog [role='alert'],\n.data-import-dialog [role='alert'],\n.data-graphics-dialog [role='alert'],\n.data-link-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n.shape-inspector [data-define-shape-data] {\n margin-top: 8px;\n}\n";
3838
+ var data_default = "/* Visio's External Data window (docked under the drawing) and the Data tab dialogs. */\n.external-data {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n display: flex;\n flex-direction: column;\n max-height: min(40%, 320px);\n min-height: 140px;\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n border-top: 1px solid var(--_vv-border);\n box-shadow: 0 -2px 8px #0002;\n --office-background: var(--_vv-surface);\n --office-surface: var(--_vv-secondary);\n --office-foreground: var(--_vv-ink);\n}\n.external-data[hidden] {\n display: none;\n}\n/* A wide, short window: a compact title row, and only the grid scrolls. */\n.external-data::part(header) {\n padding: 4px 8px 4px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data::part(body) {\n display: flex;\n flex-direction: column;\n padding: 0;\n overflow: hidden;\n}\n.external-data-bar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border-bottom: 1px solid var(--_vv-border);\n}\n.external-data-bar select,\n.external-data-tools button {\n font: inherit;\n font-weight: 400;\n font-size: 12px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n padding: 3px 8px;\n}\n.external-data-tools {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n margin-left: auto;\n}\n.external-data-tools button:disabled {\n opacity: 0.5;\n}\n.external-data-hint {\n margin: 4px 12px;\n font-size: 12px;\n color: var(--_vv-muted);\n}\n.external-data-grid {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n.external-data table {\n border-collapse: collapse;\n font-size: 12px;\n}\n.external-data th,\n.external-data td {\n padding: 3px 8px;\n border: 1px solid var(--_vv-border);\n text-align: left;\n white-space: nowrap;\n max-width: 240px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.external-data th {\n position: sticky;\n top: 0;\n background: var(--_vv-secondary);\n}\n.external-data tbody tr {\n cursor: grab;\n}\n.external-data tbody tr[aria-selected='true'] {\n background: var(--_vv-selection, #cfe3fa);\n}\n.external-data tbody tr[data-current] td:first-child {\n box-shadow: inset 3px 0 0 var(--_vv-accent);\n}\n.shape-data-dialog label,\n.data-import-dialog label,\n.data-graphics-dialog label,\n.data-graphic-items-dialog label,\n.data-link-dialog label {\n display: grid;\n gap: 4px;\n min-width: min(360px, 80vw);\n margin: 0 0 10px;\n}\n.shape-data-dialog label:has(input[type='checkbox']),\n.data-import-dialog label:has(input[type='checkbox']) {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n.shape-data-dialog input:not([type='checkbox']),\n.shape-data-dialog select,\n.data-import-dialog input:not([type='checkbox']),\n.data-import-dialog select,\n.data-graphics-dialog input,\n.data-graphics-dialog select,\n.data-graphic-items-dialog select,\n.data-link-dialog select {\n box-sizing: border-box;\n width: 100%;\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.shape-data-dialog [role='alert'],\n.data-import-dialog [role='alert'],\n.data-graphics-dialog [role='alert'],\n.data-graphic-items-dialog [role='alert'],\n.data-link-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n.shape-inspector [data-define-shape-data] {\n margin-top: 8px;\n}\n/* Data Graphic Fields pane: docked at the right edge of the drawing area. */\n.graphic-fields {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n z-index: 7;\n display: flex;\n flex-direction: column;\n width: min(280px, 80%);\n background: var(--_vv-surface);\n color: var(--_vv-ink);\n border-left: 1px solid var(--_vv-border);\n box-shadow: -2px 0 8px #0002;\n --office-background: var(--_vv-surface);\n --office-surface: var(--_vv-secondary);\n --office-foreground: var(--_vv-ink);\n}\n.graphic-fields[hidden] {\n display: none;\n}\n.graphic-fields-hint {\n margin: 8px 12px;\n font-size: 12px;\n color: var(--_vv-muted);\n}\n.graphic-fields-list {\n display: grid;\n gap: 2px;\n padding: 0 12px 12px;\n overflow: auto;\n}\n.graphic-fields-list label {\n display: grid;\n grid-template-columns: auto 1fr;\n align-items: center;\n column-gap: 8px;\n padding: 4px 0;\n}\n.graphic-fields-list small {\n grid-column: 2;\n color: var(--_vv-muted);\n}\n";
3697
3839
 
3698
3840
  // raw-css:/home/runner/work/ooxml/ooxml/src/ui/src/visio/styles/layout.css?raw
3699
3841
  var layout_default = "/* Layout, Assign to Layer, Select by Type, Paste Special and Drawing Explorer dialogs. */\n.viewer-dialog-body {\n display: grid;\n gap: 12px;\n min-width: min(360px, 80vw);\n max-height: min(60vh, 520px);\n overflow: auto;\n}\n.viewer-dialog-body > label {\n display: grid;\n gap: 4px;\n}\n.viewer-dialog-body input[type='text'],\n.viewer-dialog-body input[type='number'],\n.viewer-dialog-body select {\n box-sizing: border-box;\n width: 100%;\n padding: 6px;\n color: inherit;\n background: var(--_vv-surface);\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.viewer-dialog-body fieldset {\n display: grid;\n gap: 4px;\n margin: 0;\n padding: 8px 10px;\n border: 1px solid var(--_vv-border);\n border-radius: 3px;\n}\n.viewer-dialog-body fieldset[hidden] {\n display: none;\n}\n.viewer-dialog-choice {\n display: flex;\n gap: 6px;\n align-items: center;\n}\n/* Ruler & Grid and Snap & Glue: a label column, then one column per axis or option list. */\n.ruler-grid-rows {\n display: grid;\n grid-template-columns: minmax(120px, auto) 1fr 1fr;\n gap: 6px 10px;\n align-items: center;\n}\n.ruler-grid-axis {\n font-weight: 600;\n}\n.snap-glue-columns {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));\n gap: 12px;\n align-items: start;\n}\n.viewer-dialog [role='alert'] {\n margin: 0;\n color: var(--office-error, #b00020);\n}\n.viewer-dialog [role='alert']:empty {\n display: none;\n}\n.explorer-tree ul {\n margin: 2px 0 6px;\n padding-left: 18px;\n list-style: none;\n}\n.explorer-tree summary {\n cursor: pointer;\n font-weight: 600;\n}\n.explorer-tree button {\n padding: 2px 4px;\n color: inherit;\n text-align: left;\n background: none;\n border: 1px solid transparent;\n border-radius: 2px;\n cursor: pointer;\n}\n.explorer-tree button:hover,\n.explorer-tree button:focus-visible {\n border-color: var(--_vv-accent);\n}\n.explorer-tree button[aria-current='true'] {\n font-weight: 600;\n}\n\n/* View > Guides: dashed page guides with a wide transparent hit line for dragging. */\n.guide .guide-line {\n stroke: var(--_vv-accent);\n stroke-width: 1px;\n stroke-dasharray: 4 3;\n pointer-events: none;\n}\n.guide .guide-hit {\n stroke: transparent;\n stroke-width: 9px;\n pointer-events: stroke;\n}\n.guide[data-orientation='vertical'] .guide-hit {\n cursor: ew-resize;\n}\n.guide[data-orientation='horizontal'] .guide-hit {\n cursor: ns-resize;\n}\n.guide[aria-pressed='true'] .guide-line,\n.guide.dragging .guide-line {\n stroke-width: 2px;\n stroke-dasharray: none;\n}\n.canvas-area[data-ruler='true'] > .ruler {\n touch-action: none;\n}\n.backstage-subheading {\n margin: 20px 0 8px;\n font-size: 1rem;\n font-weight: 600;\n}\n";
@@ -4218,12 +4360,6 @@ var ViewerInlineText = class {
4218
4360
  style2.top = `${(rect ? rect.top - box2.top : 16) + this.viewport.scrollTop - shift}px`;
4219
4361
  }
4220
4362
  };
4221
- function pagePoint(svg2, page3, event, options2 = {}) {
4222
- const matrix2 = svg2.getScreenCTM?.();
4223
- if (!matrix2) return void 0;
4224
- const point = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix2.inverse());
4225
- return visioDrawingPoint(page3, point, options2);
4226
- }
4227
4363
  function handleGestureIsCurrent(drag, state, active) {
4228
4364
  return state.document === drag.document && state.document?.pages[state.pageIndex] === drag.page && state.selectedShape?.id === drag.shapeId && visioSelectionIsOnPage(state.selectedShape, drag.page.id) && state.selectedShapes.length === 1 && drag.svg.isConnected && !state.loading && !state.edit.busy && active;
4229
4365
  }
@@ -4289,6 +4425,204 @@ function wireHandleEvents(viewport, callbacks) {
4289
4425
  };
4290
4426
  }
4291
4427
 
4428
+ // src/visio/viewer-control-handles.ts
4429
+ var SVG = "http://www.w3.org/2000/svg";
4430
+ function localPoint(overlay, clientX, clientY) {
4431
+ const matrix2 = overlay.getScreenCTM?.();
4432
+ if (!matrix2 || !Number.isFinite(matrix2.a + matrix2.d)) return void 0;
4433
+ const point = new DOMPoint(clientX, clientY).matrixTransform(matrix2.inverse());
4434
+ return { x: point.x, y: point.y };
4435
+ }
4436
+ var ViewerControlHandles = class {
4437
+ constructor(viewport, controller, options2) {
4438
+ this.viewport = viewport;
4439
+ this.controller = controller;
4440
+ this.options = options2;
4441
+ }
4442
+ viewport;
4443
+ controller;
4444
+ options;
4445
+ #drag;
4446
+ #request = 0;
4447
+ #overlay;
4448
+ render(state) {
4449
+ const page3 = state.document?.pages[state.pageIndex];
4450
+ if (this.#drag) {
4451
+ if (handleGestureIsCurrent(this.#drag, state, this.options.active())) return;
4452
+ this.#cancel();
4453
+ }
4454
+ this.#overlay?.remove();
4455
+ this.#overlay = void 0;
4456
+ if (!page3 || !state.selectedShape || !visioSelectionIsOnPage(state.selectedShape, page3.id) || state.selectedShapes.length !== 1 || !canEditDiagram(state) || state.edit.busy || state.loading || !this.options.active())
4457
+ return;
4458
+ const shape = page3.shapes.find(
4459
+ (item) => item.id === state.selectedShape.id
4460
+ );
4461
+ if (!shape?.controls?.length) return;
4462
+ const group2 = Array.from(this.viewport.querySelectorAll("[data-shape-id]")).find(
4463
+ (item) => item.dataset.shapeId === shape.id && (item.dataset.pageId ?? page3.id) === page3.id && item.dataset.selected === "true"
4464
+ );
4465
+ const svg2 = group2?.ownerSVGElement;
4466
+ if (!group2 || !svg2) return;
4467
+ const overlay = this.viewport.ownerDocument.createElementNS(SVG, "g");
4468
+ overlay.dataset.controlOverlay = "";
4469
+ const rootMatrix = svg2.getCTM?.(), groupMatrix = group2.getCTM?.();
4470
+ if (rootMatrix && groupMatrix) {
4471
+ const matrix2 = rootMatrix.inverse().multiply(groupMatrix);
4472
+ overlay.setAttribute(
4473
+ "transform",
4474
+ `matrix(${matrix2.a} ${matrix2.b} ${matrix2.c} ${matrix2.d} ${matrix2.e} ${matrix2.f})`
4475
+ );
4476
+ }
4477
+ const screen = group2.getScreenCTM?.();
4478
+ const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
4479
+ const half = 4 / scale3;
4480
+ for (const control of shape.controls) {
4481
+ const handle = this.viewport.ownerDocument.createElementNS(SVG, "rect");
4482
+ handle.dataset.controlHandle = control.row;
4483
+ handle.dataset.controlShapeId = shape.id;
4484
+ if (control.locked) handle.dataset.controlLocked = "";
4485
+ handle.setAttribute("x", String(control.x - half));
4486
+ handle.setAttribute("y", String(control.y - half));
4487
+ handle.setAttribute("width", String(2 * half));
4488
+ handle.setAttribute("height", String(2 * half));
4489
+ handle.setAttribute("vector-effect", "non-scaling-stroke");
4490
+ handle.setAttribute(
4491
+ "aria-label",
4492
+ control.locked ? `Control handle (cannot be moved): ${control.locked}` : `Control handle${control.prompt ? `: ${control.prompt}` : ""}`
4493
+ );
4494
+ const title2 = this.viewport.ownerDocument.createElementNS(SVG, "title");
4495
+ title2.textContent = control.locked ?? control.prompt ?? "Drag to change the shape";
4496
+ handle.append(title2);
4497
+ overlay.append(handle);
4498
+ }
4499
+ svg2.append(overlay);
4500
+ this.#overlay = overlay;
4501
+ }
4502
+ wire() {
4503
+ const dispose = wireHandleEvents(this.viewport, {
4504
+ pointer: () => this.#drag?.pointer,
4505
+ start: (event) => this.#start(event),
4506
+ move: (event) => this.#move(event),
4507
+ finish: (event) => this.#finish(event),
4508
+ cancel: () => this.#cancel()
4509
+ });
4510
+ return () => {
4511
+ ++this.#request;
4512
+ dispose();
4513
+ this.#overlay?.remove();
4514
+ this.#overlay = void 0;
4515
+ };
4516
+ }
4517
+ #start(event) {
4518
+ const handle = event.target?.closest?.("[data-control-handle]");
4519
+ const state = this.controller.state, page3 = state.document?.pages[state.pageIndex];
4520
+ const svg2 = this.viewport.querySelector("svg.paper");
4521
+ const overlay = handle?.parentElement;
4522
+ const shape = page3?.shapes.find((item) => item.id === handle?.dataset.controlShapeId);
4523
+ const control = shape?.controls?.find((item) => item.row === handle?.dataset.controlHandle);
4524
+ if (!handle || !svg2 || !overlay || !page3 || !state.document || !control || !state.selectedShape || !visioSelectionIsOnPage(state.selectedShape, page3.id) || handle.dataset.controlShapeId !== state.selectedShape.id || state.selectedShapes.length !== 1 || this.#drag || event.button !== 0 || state.edit.busy || state.loading || !canEditDiagram(state) || !this.options.active())
4525
+ return;
4526
+ event.preventDefault();
4527
+ event.stopImmediatePropagation();
4528
+ if (control.locked) {
4529
+ this.options.announce(`This control handle cannot be moved. ${control.locked}`);
4530
+ return;
4531
+ }
4532
+ this.#drag = {
4533
+ pointer: event.pointerId,
4534
+ svg: svg2,
4535
+ page: page3,
4536
+ document: state.document,
4537
+ shapeId: state.selectedShape.id,
4538
+ control,
4539
+ handle,
4540
+ overlay,
4541
+ startX: event.clientX,
4542
+ startY: event.clientY,
4543
+ x: control.x,
4544
+ y: control.y
4545
+ };
4546
+ this.viewport.setPointerCapture?.(event.pointerId);
4547
+ if (control.prompt) this.options.announce(control.prompt);
4548
+ }
4549
+ #move(event) {
4550
+ const drag = this.#drag;
4551
+ if (!drag || event.pointerId !== drag.pointer) return;
4552
+ if (!handleGestureIsCurrent(drag, this.controller.state, this.options.active())) {
4553
+ this.#cancel();
4554
+ return;
4555
+ }
4556
+ const point = localPoint(drag.overlay, event.clientX, event.clientY);
4557
+ if (point) {
4558
+ if (drag.control.drag.x) drag.x = point.x;
4559
+ if (drag.control.drag.y) drag.y = point.y;
4560
+ const half = drag.handle.width.baseVal.value / 2;
4561
+ drag.handle.setAttribute("x", String(drag.x - half));
4562
+ drag.handle.setAttribute("y", String(drag.y - half));
4563
+ }
4564
+ event.preventDefault();
4565
+ event.stopImmediatePropagation();
4566
+ }
4567
+ #cancel() {
4568
+ this.#release()();
4569
+ }
4570
+ /** Ends the gesture and returns the reset of the handle, which a finished drag keeps until its edit settles. */
4571
+ #release() {
4572
+ const drag = this.#drag;
4573
+ this.#drag = void 0;
4574
+ if (drag && this.viewport.hasPointerCapture?.(drag.pointer))
4575
+ this.viewport.releasePointerCapture(drag.pointer);
4576
+ return () => {
4577
+ if (!drag) return;
4578
+ const half = drag.handle.width.baseVal.value / 2;
4579
+ drag.handle.setAttribute("x", String(drag.control.x - half));
4580
+ drag.handle.setAttribute("y", String(drag.control.y - half));
4581
+ };
4582
+ }
4583
+ async #finish(event) {
4584
+ const drag = this.#drag;
4585
+ if (!drag || event.pointerId !== drag.pointer) return;
4586
+ if (!handleGestureIsCurrent(drag, this.controller.state, this.options.active())) {
4587
+ this.#cancel();
4588
+ return;
4589
+ }
4590
+ event.preventDefault();
4591
+ event.stopImmediatePropagation();
4592
+ const point = localPoint(drag.overlay, event.clientX, event.clientY);
4593
+ const settle2 = this.#release();
4594
+ if (!point || Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) < 0.5 || this.controller.state.document !== drag.document) {
4595
+ settle2();
4596
+ return;
4597
+ }
4598
+ const request = ++this.#request;
4599
+ try {
4600
+ await this.controller.applyEdits([
4601
+ {
4602
+ type: "set-control",
4603
+ pageId: drag.page.id,
4604
+ shapeId: drag.shapeId,
4605
+ row: drag.control.row,
4606
+ ...drag.control.drag.x ? { x: point.x } : {},
4607
+ ...drag.control.drag.y ? { y: point.y } : {}
4608
+ }
4609
+ ]);
4610
+ if (request === this.#request) this.options.announce("Control handle moved.");
4611
+ } catch (error) {
4612
+ if (request === this.#request && !isEditCancellation(error))
4613
+ this.options.announce(editErrorMessage(error));
4614
+ } finally {
4615
+ settle2();
4616
+ }
4617
+ }
4618
+ };
4619
+ function pagePoint(svg2, page3, event, options2 = {}) {
4620
+ const matrix2 = svg2.getScreenCTM?.();
4621
+ if (!matrix2) return void 0;
4622
+ const point = new DOMPoint(event.clientX, event.clientY).matrixTransform(matrix2.inverse());
4623
+ return visioDrawingPoint(page3, point, options2);
4624
+ }
4625
+
4292
4626
  // src/visio/viewer-drawing-gesture.ts
4293
4627
  var MAX_SAMPLES = 1e4;
4294
4628
  var ViewerDrawingGesture = class {
@@ -4487,7 +4821,7 @@ var ShapeDrawTool = class {
4487
4821
  }
4488
4822
  };
4489
4823
  var TARGET = "connectTarget";
4490
- var SVG = "http://www.w3.org/2000/svg";
4824
+ var SVG2 = "http://www.w3.org/2000/svg";
4491
4825
  var POINT_SNAP_PX = 8;
4492
4826
  function connectorGlueTarget(page3, element) {
4493
4827
  let group2 = element?.closest?.("[data-shape-id]");
@@ -4503,11 +4837,11 @@ function connectorGlueAt(viewport, page3, event, zoom, glue = VISIO_GLUE.connect
4503
4837
  const svg2 = viewport.querySelector("svg.paper");
4504
4838
  const point = svg2 ? pagePoint(svg2, page3, event, { snap: false, bounded: false }) : void 0;
4505
4839
  if (point && svg2 && glue & VISIO_GLUE.connectionPoints) {
4506
- const scale2 = svg2.getScreenCTM?.()?.a || 96 * zoom;
4840
+ const scale3 = svg2.getScreenCTM?.()?.a || 96 * zoom;
4507
4841
  const hit = visioNearestConnectionPoint(
4508
4842
  page3,
4509
4843
  { x: point.x, y: page3.height - point.y },
4510
- POINT_SNAP_PX / scale2
4844
+ POINT_SNAP_PX / scale3
4511
4845
  );
4512
4846
  if (hit) return { shapeId: hit.shapeId, point: hit.index, x: hit.x, y: page3.height - hit.y };
4513
4847
  }
@@ -4649,7 +4983,7 @@ var ViewerConnectorTool = class {
4649
4983
  this.#marker = void 0;
4650
4984
  const svg2 = this.viewport.querySelector("svg.paper");
4651
4985
  if (hit?.point === void 0 || hit.x === void 0 || hit.y === void 0 || !svg2) return;
4652
- const marker = this.viewport.ownerDocument.createElementNS(SVG, "circle");
4986
+ const marker = this.viewport.ownerDocument.createElementNS(SVG2, "circle");
4653
4987
  marker.classList.add("connect-point-target");
4654
4988
  marker.setAttribute("cx", String(hit.x));
4655
4989
  marker.setAttribute("cy", String(hit.y));
@@ -4664,7 +4998,7 @@ var ViewerConnectorTool = class {
4664
4998
  };
4665
4999
 
4666
5000
  // src/visio/viewer-line-endpoints.ts
4667
- var SVG2 = "http://www.w3.org/2000/svg";
5001
+ var SVG3 = "http://www.w3.org/2000/svg";
4668
5002
  var pointOptions = { snap: false, bounded: false };
4669
5003
  function lineHandles(shape) {
4670
5004
  if (visioStraightLineHandles(shape))
@@ -4704,7 +5038,7 @@ var ViewerLineEndpoints = class {
4704
5038
  if (!group2) return;
4705
5039
  const svg2 = group2.ownerSVGElement;
4706
5040
  if (!svg2) return;
4707
- const overlay = this.viewport.ownerDocument.createElementNS(SVG2, "g");
5041
+ const overlay = this.viewport.ownerDocument.createElementNS(SVG3, "g");
4708
5042
  overlay.dataset.lineEndpointOverlay = "";
4709
5043
  const rootMatrix = svg2.getCTM?.(), groupMatrix = group2.getCTM?.();
4710
5044
  if (rootMatrix && groupMatrix) {
@@ -4717,7 +5051,7 @@ var ViewerLineEndpoints = class {
4717
5051
  const screen = group2.getScreenCTM?.();
4718
5052
  const screenScale = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
4719
5053
  for (const endpoint of ["begin", "end"]) {
4720
- const handle = this.viewport.ownerDocument.createElementNS(SVG2, "circle");
5054
+ const handle = this.viewport.ownerDocument.createElementNS(SVG3, "circle");
4721
5055
  handle.dataset.lineEndpoint = endpoint;
4722
5056
  handle.dataset.lineShapeId = shape.id;
4723
5057
  handle.setAttribute("cx", String(ends[endpoint].x));
@@ -4765,7 +5099,7 @@ var ViewerLineEndpoints = class {
4765
5099
  if (!fixed || !start) return;
4766
5100
  event.preventDefault();
4767
5101
  event.stopImmediatePropagation();
4768
- const preview5 = this.viewport.ownerDocument.createElementNS(SVG2, "line");
5102
+ const preview5 = this.viewport.ownerDocument.createElementNS(SVG3, "line");
4769
5103
  preview5.classList.add("endpoint-preview");
4770
5104
  preview5.setAttribute("vector-effect", "non-scaling-stroke");
4771
5105
  for (const [name, value] of Object.entries({
@@ -5221,7 +5555,7 @@ function nearbyShape(viewport, svg2, event, selected) {
5221
5555
  for (const probe of hitProbes(hitTolerance(event.pointerType))) {
5222
5556
  const hits = root.elementsFromPoint(event.clientX + probe.x, event.clientY + probe.y);
5223
5557
  for (const element of hits) {
5224
- if (!svg2.contains(element) || element.closest("[data-resize-overlay], .rotation-overlay"))
5558
+ if (!svg2.contains(element) || element.closest("[data-resize-overlay], [data-control-overlay], .rotation-overlay"))
5225
5559
  continue;
5226
5560
  const shape = pointerShapeTarget(element, selected, true);
5227
5561
  if (shape) return shape;
@@ -5295,7 +5629,7 @@ var ViewerPointerGestures = class {
5295
5629
  if (this.#drag || event.button !== 0 || !this.options.active()) return;
5296
5630
  const node = event.target;
5297
5631
  if (node.closest?.(
5298
- "[data-line-endpoint], [data-rotation-handle], [data-resize-handle], .rotation-overlay, [data-guide-id]"
5632
+ "[data-line-endpoint], [data-control-handle], [data-rotation-handle], [data-resize-handle], .rotation-overlay, [data-guide-id]"
5299
5633
  ))
5300
5634
  return;
5301
5635
  const state = this.controller.state, page3 = state.document?.pages[state.pageIndex];
@@ -5366,7 +5700,7 @@ var ViewerPointerGestures = class {
5366
5700
  );
5367
5701
  drag.showOverlays = hideGestureOverlays(
5368
5702
  this.viewport,
5369
- "[data-resize-overlay], .rotation-overlay"
5703
+ "[data-resize-overlay], [data-control-overlay], .rotation-overlay"
5370
5704
  );
5371
5705
  } else {
5372
5706
  drag.marquee = createMarqueeRect(drag.svg);
@@ -5648,7 +5982,7 @@ var ViewerSwimlanes = class {
5648
5982
  );
5649
5983
  }
5650
5984
  };
5651
- function createResizeFrame(svg2, page3, frame, scale2, shapeId) {
5985
+ function createResizeFrame(svg2, page3, frame, scale3, shapeId) {
5652
5986
  const create = (name) => svg2.ownerDocument.createElementNS("http://www.w3.org/2000/svg", name);
5653
5987
  const element = create("g");
5654
5988
  element.dataset.resizeOverlay = "";
@@ -5660,7 +5994,7 @@ function createResizeFrame(svg2, page3, frame, scale2, shapeId) {
5660
5994
  const handle = create("circle");
5661
5995
  handle.dataset.resizeHandle = location.id;
5662
5996
  handle.dataset.resizeShape = shapeId;
5663
- handle.setAttribute("r", String(5 / scale2));
5997
+ handle.setAttribute("r", String(5 / scale3));
5664
5998
  handle.setAttribute("vector-effect", "non-scaling-stroke");
5665
5999
  handle.setAttribute("aria-label", `Drag ${location.id} resize handle`);
5666
6000
  element.append(handle);
@@ -5736,9 +6070,9 @@ var ViewerResizeHandles = class {
5736
6070
  const group2 = selected[0];
5737
6071
  const svg2 = group2?.ownerSVGElement, screen = svg2?.getScreenCTM?.();
5738
6072
  if (!svg2 || selected.some((group3) => group3?.ownerSVGElement !== svg2)) return;
5739
- const scale2 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
5740
- if (!(scale2 > 0 && Number.isFinite(scale2))) return;
5741
- this.#frame = createResizeFrame(svg2, page3, frame, scale2, selection2.id);
6073
+ const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
6074
+ if (!(scale3 > 0 && Number.isFinite(scale3))) return;
6075
+ this.#frame = createResizeFrame(svg2, page3, frame, scale3, selection2.id);
5742
6076
  }
5743
6077
  wire() {
5744
6078
  const dispose = wireHandleEvents(this.viewport, {
@@ -5909,7 +6243,7 @@ function createRotationPreview(model, page3, shape, source) {
5909
6243
  }
5910
6244
 
5911
6245
  // src/visio/viewer-rotation-handle.ts
5912
- var SVG3 = "http://www.w3.org/2000/svg";
6246
+ var SVG4 = "http://www.w3.org/2000/svg";
5913
6247
  var pointOptions4 = { snap: false, bounded: false };
5914
6248
  var radians = (degrees, snap) => -(snap ? snapAngle(degrees) : degrees) * Math.PI / 180;
5915
6249
  var ViewerRotationHandle = class {
@@ -5954,7 +6288,7 @@ var ViewerRotationHandle = class {
5954
6288
  if (!location) return;
5955
6289
  const point = { x: location.x - bounds2.left, y: location.y - bounds2.top };
5956
6290
  const pivot = new DOMPoint(center.x, center.y).matrixTransform(matrix2);
5957
- const overlay = this.viewport.ownerDocument.createElementNS(SVG3, "svg");
6291
+ const overlay = this.viewport.ownerDocument.createElementNS(SVG4, "svg");
5958
6292
  overlay.classList.add("rotation-overlay");
5959
6293
  overlay.style.left = `${this.viewport.scrollLeft}px`;
5960
6294
  overlay.style.top = `${this.viewport.scrollTop}px`;
@@ -5962,7 +6296,7 @@ var ViewerRotationHandle = class {
5962
6296
  overlay.setAttribute("height", String(bounds2.height));
5963
6297
  overlay.setAttribute("viewBox", `0 0 ${bounds2.width} ${bounds2.height}`);
5964
6298
  overlay.dataset.rotationOverlay = "";
5965
- const stem = this.viewport.ownerDocument.createElementNS(SVG3, "line");
6299
+ const stem = this.viewport.ownerDocument.createElementNS(SVG4, "line");
5966
6300
  for (const [name, value] of Object.entries({
5967
6301
  x1: pivot.x - bounds2.left,
5968
6302
  y1: pivot.y - bounds2.top,
@@ -5972,14 +6306,14 @@ var ViewerRotationHandle = class {
5972
6306
  stem.setAttribute(name, String(value));
5973
6307
  stem.classList.add("rotation-stem");
5974
6308
  stem.setAttribute("vector-effect", "non-scaling-stroke");
5975
- const handle = this.viewport.ownerDocument.createElementNS(SVG3, "circle");
6309
+ const handle = this.viewport.ownerDocument.createElementNS(SVG4, "circle");
5976
6310
  handle.dataset.rotationHandle = shape.id;
5977
6311
  handle.setAttribute("cx", String(point.x));
5978
6312
  handle.setAttribute("cy", String(point.y));
5979
6313
  handle.setAttribute("r", "8");
5980
6314
  handle.setAttribute("vector-effect", "non-scaling-stroke");
5981
6315
  handle.setAttribute("aria-label", "Drag rotation handle");
5982
- const glyph = this.viewport.ownerDocument.createElementNS(SVG3, "path");
6316
+ const glyph = this.viewport.ownerDocument.createElementNS(SVG4, "path");
5983
6317
  glyph.classList.add("rotation-glyph");
5984
6318
  glyph.setAttribute("transform", `translate(${point.x} ${point.y})`);
5985
6319
  glyph.setAttribute("d", "M4.6 -2.9A5.4 5.4 0 1 0 5.4 .6M5.6 -5.9V-2.4H2.1");
@@ -6024,7 +6358,7 @@ var ViewerRotationHandle = class {
6024
6358
  if (!start) return;
6025
6359
  this.viewport.focus({ preventScroll: true });
6026
6360
  const center = { x: shape.rotation.pinX, y: page3.height - shape.rotation.pinY };
6027
- const preview5 = this.viewport.ownerDocument.createElementNS(SVG3, "line");
6361
+ const preview5 = this.viewport.ownerDocument.createElementNS(SVG4, "line");
6028
6362
  preview5.classList.add("rotation-preview");
6029
6363
  preview5.setAttribute("vector-effect", "non-scaling-stroke");
6030
6364
  for (const [name, value] of Object.entries({
@@ -6339,6 +6673,7 @@ function createCanvasEditing(viewport, controller, options2) {
6339
6673
  ...options2.clearSnap ? { clearSnap: options2.clearSnap } : {}
6340
6674
  });
6341
6675
  const lineEndpoints = new ViewerLineEndpoints(viewport, controller, gesture);
6676
+ const controls = new ViewerControlHandles(viewport, controller, gesture);
6342
6677
  const rotation = new ViewerRotationHandle(viewport, controller, gesture);
6343
6678
  const resize = new ViewerResizeHandles(viewport, controller, {
6344
6679
  ...gesture,
@@ -6366,6 +6701,7 @@ function createCanvasEditing(viewport, controller, options2) {
6366
6701
  return {
6367
6702
  pointer,
6368
6703
  lineEndpoints,
6704
+ controls,
6369
6705
  rotation,
6370
6706
  resize,
6371
6707
  edit,
@@ -6381,6 +6717,7 @@ function createCanvasEditing(viewport, controller, options2) {
6381
6717
  /** Redraw the selection handles after a state or tool change. */
6382
6718
  renderHandles(state) {
6383
6719
  lineEndpoints.render(state);
6720
+ controls.render(state);
6384
6721
  rotation.render(state);
6385
6722
  resize.render(state);
6386
6723
  },
@@ -6396,6 +6733,7 @@ function createCanvasEditing(viewport, controller, options2) {
6396
6733
  const stops = [
6397
6734
  pointer.wire(),
6398
6735
  lineEndpoints.wire(),
6736
+ controls.wire(),
6399
6737
  rotation.wire(),
6400
6738
  resize.wire(),
6401
6739
  edit.wire(),
@@ -6407,35 +6745,331 @@ function createCanvasEditing(viewport, controller, options2) {
6407
6745
  for (const stop of stops) stop();
6408
6746
  };
6409
6747
  }
6410
- };
6411
- }
6412
-
6413
- // src/visio/canvas-services.ts
6414
- var mounted = /* @__PURE__ */ new WeakMap();
6415
- var watchers = /* @__PURE__ */ new WeakMap();
6416
- var tell = (controller) => {
6417
- for (const watcher of [...watchers.get(controller) ?? []]) watcher(mounted.get(controller));
6748
+ };
6749
+ }
6750
+
6751
+ // src/visio/canvas-services.ts
6752
+ var mounted = /* @__PURE__ */ new WeakMap();
6753
+ var watchers = /* @__PURE__ */ new WeakMap();
6754
+ var tell = (controller) => {
6755
+ for (const watcher of [...watchers.get(controller) ?? []]) watcher(mounted.get(controller));
6756
+ };
6757
+ function registerCanvasServices(controller, services) {
6758
+ mounted.set(controller, services);
6759
+ tell(controller);
6760
+ return () => {
6761
+ if (mounted.get(controller) !== services) return;
6762
+ mounted.delete(controller);
6763
+ tell(controller);
6764
+ };
6765
+ }
6766
+ function watchCanvasServices(controller, watcher) {
6767
+ const set = watchers.get(controller) ?? /* @__PURE__ */ new Set();
6768
+ watchers.set(controller, set);
6769
+ set.add(watcher);
6770
+ watcher(mounted.get(controller));
6771
+ return () => set.delete(watcher);
6772
+ }
6773
+ function canvasServices(controller) {
6774
+ return mounted.get(controller);
6775
+ }
6776
+
6777
+ // src/visio/viewer-insert-dialog.ts
6778
+ var InsertDialog = class {
6779
+ dialog;
6780
+ error;
6781
+ fields = /* @__PURE__ */ new Map();
6782
+ buttons = /* @__PURE__ */ new Map();
6783
+ constructor(root, className, heading, specs, buttons, press) {
6784
+ const doc = root.ownerDocument;
6785
+ this.dialog = doc.createElement("office-ui-dialog");
6786
+ this.dialog.className = className;
6787
+ this.dialog.setAttribute("heading", heading);
6788
+ for (const spec of specs) {
6789
+ const label = doc.createElement("label");
6790
+ label.textContent = spec.label;
6791
+ const field = doc.createElement(
6792
+ spec.choices ? "select" : spec.multiline ? "textarea" : "input"
6793
+ );
6794
+ field.name = spec.name;
6795
+ field.setAttribute("aria-label", spec.label);
6796
+ if (field instanceof HTMLTextAreaElement) {
6797
+ field.maxLength = spec.maxLength ?? 4096;
6798
+ field.rows = 5;
6799
+ }
6800
+ if (field instanceof HTMLInputElement) {
6801
+ field.type = spec.input ?? "text";
6802
+ if (spec.input === "number") field.step = "any";
6803
+ if (!spec.input) field.maxLength = spec.maxLength ?? 4096;
6804
+ if (spec.placeholder) field.placeholder = spec.placeholder;
6805
+ field.addEventListener("keydown", (event) => {
6806
+ if (event.key !== "Enter") return;
6807
+ event.preventDefault();
6808
+ press(buttons[0]);
6809
+ });
6810
+ }
6811
+ if (spec.input === "checkbox") label.prepend(field);
6812
+ else label.append(field);
6813
+ this.fields.set(spec.name, field);
6814
+ this.dialog.append(label);
6815
+ }
6816
+ this.error = doc.createElement("p");
6817
+ this.error.setAttribute("role", "alert");
6818
+ this.dialog.append(this.error);
6819
+ for (const name of buttons) {
6820
+ const button = doc.createElement("office-ui-button");
6821
+ button.slot = "footer";
6822
+ button.setAttribute("label", name);
6823
+ button.setAttribute("command", `${className}-${name.toLowerCase().replace(/\s+/g, "-")}`);
6824
+ button.addEventListener("office-command", () => {
6825
+ if (!button.disabled) press(name);
6826
+ });
6827
+ this.buttons.set(name, button);
6828
+ this.dialog.append(button);
6829
+ }
6830
+ root.append(this.dialog);
6831
+ }
6832
+ value(name) {
6833
+ return this.fields.get(name)?.value ?? "";
6834
+ }
6835
+ checked(name) {
6836
+ const field = this.fields.get(name);
6837
+ return field instanceof HTMLInputElement && field.checked;
6838
+ }
6839
+ /**
6840
+ * Replace a select's choices; the current value is kept as an extra choice when unknown.
6841
+ * `labels` names each value; `none: false` drops the leading empty choice.
6842
+ */
6843
+ choices(name, values, current, options2 = {}) {
6844
+ const select = this.fields.get(name);
6845
+ if (!(select instanceof HTMLSelectElement)) return;
6846
+ const doc = select.ownerDocument;
6847
+ const list = options2.none === false ? [...values] : ["", ...values];
6848
+ if (!list.includes(current)) list.push(current);
6849
+ select.replaceChildren(
6850
+ ...list.map((value) => {
6851
+ const option = doc.createElement("option");
6852
+ option.value = value;
6853
+ const index = values.indexOf(value);
6854
+ option.textContent = (index >= 0 ? options2.labels?.[index] : void 0) ?? (value || options2.noneLabel || "(none)");
6855
+ return option;
6856
+ })
6857
+ );
6858
+ select.value = current;
6859
+ }
6860
+ busy(value) {
6861
+ for (const field of this.fields.values()) field.disabled = value;
6862
+ for (const button of this.buttons.values()) button.disabled = value;
6863
+ }
6864
+ };
6865
+
6866
+ // src/visio/viewer-data-import.ts
6867
+ var DATA_IMPORT_MAX_BYTES = 16 * 1024 * 1024;
6868
+ var ACCEPT = ".csv,.txt,.xlsx,.xlsm,.xls";
6869
+ async function readWorkbook(file) {
6870
+ if (file.size > DATA_IMPORT_MAX_BYTES)
6871
+ throw new Error(`${file.name} is larger than the 16 MB import limit.`);
6872
+ const { loadWorkbook } = await import('ooxml-core/xlsx/load');
6873
+ return loadWorkbook(new Uint8Array(await file.arrayBuffer()), { fileName: file.name });
6874
+ }
6875
+ function readTable(workbook, options2) {
6876
+ const range = options2.range.trim() ? visioParseRange(options2.range) : void 0;
6877
+ if (options2.range.trim() && !range) throw new Error("Type a range such as A1:D20.");
6878
+ const table = visioDataTable(visioWorkbookGrid(workbook, options2.sheet, range), {
6879
+ header: options2.header
6880
+ });
6881
+ if (!table.rows.length) throw new Error("The selected data has no rows.");
6882
+ return table;
6883
+ }
6884
+ var DataFilePicker = class {
6885
+ input;
6886
+ #pending;
6887
+ constructor(root) {
6888
+ this.input = root.ownerDocument.createElement("input");
6889
+ this.input.type = "file";
6890
+ this.input.accept = ACCEPT;
6891
+ this.input.hidden = true;
6892
+ this.input.dataset.importData = "";
6893
+ this.input.addEventListener("change", () => {
6894
+ const file = this.input.files?.[0];
6895
+ this.input.value = "";
6896
+ this.#settle(file ? { file } : void 0);
6897
+ });
6898
+ this.input.addEventListener("cancel", () => this.#settle(void 0));
6899
+ root.append(this.input);
6900
+ }
6901
+ #settle(file) {
6902
+ const pending = this.#pending;
6903
+ this.#pending = void 0;
6904
+ pending?.(file);
6905
+ }
6906
+ async pick() {
6907
+ const picker = this.input.ownerDocument.defaultView?.showOpenFilePicker;
6908
+ if (typeof picker === "function") {
6909
+ try {
6910
+ const [handle] = await picker.call(this.input.ownerDocument.defaultView, {
6911
+ multiple: false,
6912
+ types: [
6913
+ {
6914
+ description: "Excel workbooks and CSV files",
6915
+ accept: {
6916
+ "text/csv": [".csv", ".txt"],
6917
+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [
6918
+ ".xlsx",
6919
+ ".xlsm"
6920
+ ],
6921
+ "application/vnd.ms-excel": [".xls"]
6922
+ }
6923
+ }
6924
+ ]
6925
+ });
6926
+ return handle ? { file: await handle.getFile(), handle } : void 0;
6927
+ } catch (error) {
6928
+ if (error instanceof Error && error.name === "AbortError") return void 0;
6929
+ }
6930
+ }
6931
+ this.#settle(void 0);
6932
+ return new Promise((resolve) => {
6933
+ this.#pending = resolve;
6934
+ this.input.click();
6935
+ });
6936
+ }
6418
6937
  };
6419
- function registerCanvasServices(controller, services) {
6420
- mounted.set(controller, services);
6421
- tell(controller);
6422
- return () => {
6423
- if (mounted.get(controller) !== services) return;
6424
- mounted.delete(controller);
6425
- tell(controller);
6426
- };
6938
+ function createImportDialog(root, press) {
6939
+ const dialog = new InsertDialog(
6940
+ root,
6941
+ "data-import-dialog",
6942
+ "Custom Import",
6943
+ [
6944
+ { name: "name", label: "Recordset name", maxLength: 255 },
6945
+ { name: "sheet", label: "Worksheet", choices: true },
6946
+ { name: "range", label: "Range (optional)", placeholder: "A1:D20" },
6947
+ { name: "key", label: "Unique identifier column (optional)", maxLength: 255 },
6948
+ { name: "header", label: "First row of data contains column headings", input: "checkbox" }
6949
+ ],
6950
+ ["Import", "Cancel"],
6951
+ press
6952
+ );
6953
+ return dialog;
6427
6954
  }
6428
- function watchCanvasServices(controller, watcher) {
6429
- const set = watchers.get(controller) ?? /* @__PURE__ */ new Set();
6430
- watchers.set(controller, set);
6431
- set.add(watcher);
6432
- watcher(mounted.get(controller));
6433
- return () => set.delete(watcher);
6955
+
6956
+ // src/visio/viewer-org-chart.ts
6957
+ function orgChartSelection(state) {
6958
+ const page3 = state.document?.pages[state.pageIndex];
6959
+ const first = state.selectedShapes[0];
6960
+ if (!page3 || !first || !visioSelectionIsOnPage(first, page3.id)) return void 0;
6961
+ return visioOrgPosition(page3, first.id) ? { pageId: page3.id, id: first.id } : void 0;
6434
6962
  }
6435
- function canvasServices(controller) {
6436
- return mounted.get(controller);
6963
+ function orgChartDeleteSelection(state) {
6964
+ if (state.selectedShapes.length !== 1) return void 0;
6965
+ const selection2 = orgChartSelection(state);
6966
+ const page3 = state.document?.pages[state.pageIndex];
6967
+ if (!selection2 || !page3) return void 0;
6968
+ const edits = visioOrgDeletePosition(page3, selection2.id);
6969
+ return edits ? { edits, message: "Deleted the position and its connectors." } : void 0;
6437
6970
  }
6971
+ var ViewerOrgChart = class {
6972
+ constructor(root, controller, edit) {
6973
+ this.root = root;
6974
+ this.controller = controller;
6975
+ this.edit = edit;
6976
+ }
6977
+ root;
6978
+ controller;
6979
+ edit;
6980
+ #picker;
6981
+ reason(state, command2) {
6982
+ if (!canEditDiagram(state)) return "Open a .vsdx file to edit the org chart.";
6983
+ if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
6984
+ if (command2 === "import") return void 0;
6985
+ const selection2 = orgChartSelection(state);
6986
+ if (!selection2) return "Select a position in an org chart.";
6987
+ const page3 = state.document.pages[state.pageIndex];
6988
+ if (command2 === "coworker" && !visioOrgHierarchy(page3).parentOf(selection2.id))
6989
+ return "The top position has no manager to add a coworker under.";
6990
+ return void 0;
6991
+ }
6992
+ /** Org Chart > Import: a CSV or Excel sheet with Name, Title and Reports To columns. */
6993
+ #import() {
6994
+ this.#picker ??= (() => {
6995
+ const picker2 = new DataFilePicker(this.root);
6996
+ delete picker2.input.dataset.importData;
6997
+ picker2.input.dataset.importOrg = "";
6998
+ return picker2;
6999
+ })();
7000
+ const picker = this.#picker;
7001
+ this.edit(async () => {
7002
+ const picked = await picker.pick();
7003
+ if (!picked) return;
7004
+ const table = readTable(await readWorkbook(picked.file), {
7005
+ sheet: 0,
7006
+ range: "",
7007
+ header: true
7008
+ });
7009
+ const people = visioOrgPeople(table);
7010
+ if (typeof people === "string") throw new Error(people);
7011
+ const state = this.controller.state;
7012
+ const page3 = state.document?.pages[state.pageIndex];
7013
+ if (!page3 || this.reason(state, "import") !== void 0) return;
7014
+ const plan = visioOrgImportEdits(page3, people);
7015
+ if (typeof plan === "string") throw new Error(plan);
7016
+ await this.controller.applyEdits(plan.edits);
7017
+ this.controller.selectShapes([{ id: plan.firstId, name: "", pageId: page3.id }]);
7018
+ }, "Imported the org chart.");
7019
+ }
7020
+ run(action2) {
7021
+ const state = this.controller.state;
7022
+ if (this.reason(state, action2.command) !== void 0) return;
7023
+ if (action2.command === "import") return this.#import();
7024
+ const page3 = state.document?.pages[state.pageIndex];
7025
+ const selection2 = orgChartSelection(state);
7026
+ if (!page3 || !selection2) return;
7027
+ const { id } = selection2;
7028
+ if (action2.command === "delete") {
7029
+ const plan = orgChartDeleteSelection(state);
7030
+ if (!plan?.edits) return;
7031
+ const edits = plan.edits;
7032
+ this.edit(async () => {
7033
+ await this.controller.applyEdits(edits);
7034
+ this.controller.selectShapes([]);
7035
+ }, plan.message);
7036
+ } else if (action2.command === "layout") {
7037
+ const edits = visioOrgReLayout(page3);
7038
+ if (!edits) return;
7039
+ this.edit(() => this.controller.applyEdits(edits), "Laid out the org chart.");
7040
+ } else {
7041
+ const kind = { subordinate: "subordinate", coworker: "peer", assistant: "assistant" }[action2.command];
7042
+ const plan = visioOrgAddPosition(page3, id, kind);
7043
+ if (!plan) return;
7044
+ this.edit(async () => {
7045
+ await this.controller.applyEdits(plan.edits);
7046
+ this.controller.selectShapes([{ id: plan.newId, name: "", pageId: page3.id }]);
7047
+ }, `Added a ${action2.command}.`);
7048
+ }
7049
+ }
7050
+ render(state) {
7051
+ for (const [id, command2] of [
7052
+ ["org-subordinate", "subordinate"],
7053
+ ["org-coworker", "coworker"],
7054
+ ["org-assistant", "assistant"],
7055
+ ["org-delete", "delete"],
7056
+ ["org-layout", "layout"],
7057
+ ["org-import", "import"],
7058
+ ["org-import-data", "import"]
7059
+ ]) {
7060
+ for (const item of this.root.querySelectorAll(`[command="${id}"]`)) {
7061
+ const reason = this.reason(state, command2);
7062
+ item.disabled = reason !== void 0;
7063
+ if (reason) item.title = reason;
7064
+ }
7065
+ }
7066
+ }
7067
+ };
7068
+
7069
+ // src/visio/viewer-delete.ts
6438
7070
  function planDeleteSelection(state) {
7071
+ const position = orgChartDeleteSelection(state);
7072
+ if (position?.edits) return { edits: position.edits, message: position.message };
6439
7073
  const shapes = state.selectedShapes;
6440
7074
  const page3 = state.document?.pages[state.pageIndex];
6441
7075
  if (!shapes.length || !page3 || shapes.some((shape) => shape.pageId && shape.pageId !== page3.id))
@@ -6587,6 +7221,28 @@ var deCommands = {
6587
7221
  "Soft Edges Options...": "Optionen f\xFCr weiche Kanten...",
6588
7222
  Bevel: "Abgeschr\xE4gte Kante",
6589
7223
  "3-D Rotation": "3D-Drehung",
7224
+ Circle: "Kreis",
7225
+ "Relaxed Inset": "Entspannter Einzug",
7226
+ Cross: "Kreuz",
7227
+ "Cool Slant": "K\xFChle Neigung",
7228
+ Angle: "Winkel",
7229
+ "Soft Round": "Weich abgerundet",
7230
+ Convex: "Konvex",
7231
+ Slope: "Schr\xE4ge",
7232
+ Divot: "Mulde",
7233
+ Riblet: "Rippchen",
7234
+ "Hard Edge": "Harte Kante",
7235
+ "Art Deco": "Art d\xE9co",
7236
+ "No Bevel": "Keine Abschr\xE4gung",
7237
+ "No Rotation": "Keine Drehung",
7238
+ "Isometric Left Down": "Isometrisch links unten",
7239
+ "Isometric Right Up": "Isometrisch rechts oben",
7240
+ "Isometric Top Up": "Isometrisch oben",
7241
+ "Off Axis Left": "Au\xDFeraxial links",
7242
+ "Off Axis Right": "Au\xDFeraxial rechts",
7243
+ "Perspective Left": "Perspektive links",
7244
+ "Perspective Right": "Perspektive rechts",
7245
+ "Perspective Relaxed": "Perspektive entspannt",
6590
7246
  Arrange: "Anordnen",
6591
7247
  Align: "Ausrichten",
6592
7248
  "Align Center": "Zentrieren",
@@ -6698,6 +7354,11 @@ var deCommands = {
6698
7354
  "Advanced Data Linking": "Erweiterte Datenverkn\xFCpfung",
6699
7355
  "Link Data": "Daten verkn\xFCpfen",
6700
7356
  "Advanced Data Graphics": "Erweiterte Datengrafiken",
7357
+ "Data Visualizer": "Datenvisualisierung",
7358
+ "Basic Flowchart...": "Einfaches Flussdiagramm...",
7359
+ "Cross-Functional Flowchart...": "Funktions\xFCbergreifendes Flussdiagramm...",
7360
+ "Refresh Diagram": "Diagramm aktualisieren",
7361
+ "Download Table Template": "Tabellenvorlage herunterladen",
6701
7362
  Subprocess: "Teilprozess",
6702
7363
  "Create New": "Neu erstellen",
6703
7364
  "Link to Existing": "Mit vorhandenem verkn\xFCpfen",
@@ -6802,6 +7463,7 @@ var deCommands = {
6802
7463
  Coworker: "Kollege",
6803
7464
  Assistant: "Assistent",
6804
7465
  "Delete Position": "Position l\xF6schen",
7466
+ "Import Org Chart": "Organigramm importieren",
6805
7467
  None: "Keine",
6806
7468
  Narrow: "Schmal",
6807
7469
  Normal: "Normal",
@@ -6835,6 +7497,100 @@ var deCommands = {
6835
7497
  "Changed the container margin.": "Containerrand ge\xE4ndert."
6836
7498
  };
6837
7499
 
7500
+ // src/visio/locales/de-backstage.ts
7501
+ var deBackstage = {
7502
+ Info: "Informationen",
7503
+ New: "Neu",
7504
+ Save: "Speichern",
7505
+ "Save As": "Speichern unter",
7506
+ Print: "Drucken",
7507
+ Close: "Schlie\xDFen",
7508
+ Account: "Konto",
7509
+ "Documents stay in this browser; nothing is uploaded.": "Dokumente bleiben in diesem Browser; nichts wird hochgeladen.",
7510
+ "Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Zuletzt verwendete Zeichnungen werden nicht erfasst. Dokumente bleiben in diesem Browser; nichts wird hochgeladen.",
7511
+ "Session name": "Sitzungsname",
7512
+ "Start sharing": "Freigabe starten",
7513
+ "Stop sharing": "Freigabe beenden",
7514
+ "Share with people": "Mit Personen teilen",
7515
+ "Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Bearbeiten Sie diese Zeichnung gemeinsam mit anderen Fenstern dieses Browsers. \xD6ffnen Sie in einem anderen Fenster denselben Sitzungsnamen, um beizutreten.",
7516
+ "The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "Die gesamte Zeichnung wird geteilt; \xE4ndern zwei Personen sie gleichzeitig, gewinnt die letzte \xC4nderung. Nichts verl\xE4sst dieses Ger\xE4t.",
7517
+ "People in this session": "Personen in dieser Sitzung",
7518
+ "Product Information": "Produktinformationen",
7519
+ "Visio viewer (beta). No sign-in or subscription is used.": "Visio-Viewer (Beta). Es wird keine Anmeldung und kein Abonnement verwendet.",
7520
+ "Back to the drawing": "Zur\xFCck zur Zeichnung",
7521
+ "Current page": "Aktuelle Seite",
7522
+ "Page size": "Seitengr\xF6\xDFe",
7523
+ Compatibility: "Kompatibilit\xE4t",
7524
+ "Add Comment": "Kommentar hinzuf\xFCgen",
7525
+ "Comment on the current page or selected shape.": "Kommentieren Sie die aktuelle Seite oder die ausgew\xE4hlte Form.",
7526
+ Browse: "Durchsuchen",
7527
+ "Open a .vsdx drawing or a legacy .vsd preview from this device.": "\xD6ffnen Sie eine .vsdx-Zeichnung oder eine \xE4ltere .vsd-Vorschau von diesem Ger\xE4t.",
7528
+ "Download a copy": "Kopie herunterladen",
7529
+ "Save the drawing, with your edits, as a .vsdx file.": "Speichern Sie die Zeichnung mit Ihren \xC4nderungen als .vsdx-Datei.",
7530
+ "Export the current page as SVG": "Aktuelle Seite als SVG exportieren",
7531
+ "An approximate picture with compatibility notes.": "Ein ungef\xE4hres Bild mit Kompatibilit\xE4tshinweisen.",
7532
+ "Print the current page.": "Die aktuelle Seite drucken.",
7533
+ "Print preview of the current page": "Druckvorschau der aktuellen Seite",
7534
+ "Open a drawing to print it.": "\xD6ffnen Sie eine Zeichnung, um sie zu drucken.",
7535
+ "Printer paper, page size, drawing scale and page properties.": "Druckerpapier, Seitengr\xF6\xDFe, Zeichnungsma\xDFstab und Seiteneigenschaften.",
7536
+ Email: "E-Mail",
7537
+ "Send the drawing as an attachment.": "Senden Sie die Zeichnung als Anhang.",
7538
+ "Create PDF/XPS Document": "PDF/XPS-Dokument erstellen",
7539
+ "A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "Ein Vektor-PDF mit einer Seite je gew\xE4hlter Vordergrundseite in der Seitengr\xF6\xDFe und mit ausw\xE4hlbarem Text. Verl\xE4ufe werden als Schattierungen und Schatten als scharfkantige Vers\xE4tze gezeichnet; Leuchten wird angen\xE4hert; Unsch\xE4rfe, weiche Kanten und Spiegelungen werden nicht gezeichnet. Text verwendet Standardschriften, sofern der Host keine einzubettenden Schriften bereitstellt. Eine Seite, die sich nicht als Vektoren zeichnen l\xE4sst, wird zu einem Bild, und der Bericht unten nennt sie. XPS wird nicht angeboten.",
7540
+ "Change File Type": "Dateityp \xE4ndern",
7541
+ "Visio Drawing (*.vsdx)": "Visio-Zeichnung (*.vsdx)",
7542
+ "A copy of the drawing with your edits.": "Eine Kopie der Zeichnung mit Ihren \xC4nderungen.",
7543
+ "SVG (*.svg)": "SVG (*.svg)",
7544
+ "The current page as an approximate vector picture.": "Die aktuelle Seite als ungef\xE4hre Vektorgrafik.",
7545
+ "PDF (*.pdf)": "PDF (*.pdf)",
7546
+ "Every foreground page as vector shapes and selectable text.": "Jede Vordergrundseite als Vektorformen und ausw\xE4hlbarer Text.",
7547
+ "PNG picture (*.png)": "PNG-Bild (*.png)",
7548
+ "The current page at 150 dpi.": "Die aktuelle Seite mit 150 dpi.",
7549
+ "VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "Die Formate VSD, VSDM, VDX, Schablone, Vorlage und XPS werden nicht angeboten: Sie erfordern Konvertierungen, die dieser Viewer nicht hat.",
7550
+ "Choose a Visio drawing": "Eine Visio-Zeichnung ausw\xE4hlen",
7551
+ "Blank Drawing": "Leere Zeichnung",
7552
+ "Start an empty drawing.": "Eine leere Zeichnung beginnen.",
7553
+ "Basic Flowchart": "Einfaches Flussdiagramm",
7554
+ "A short process with a decision, using Basic Flowchart Shapes.": "Ein kurzer Prozess mit einer Entscheidung, mit Formen des einfachen Flussdiagramms.",
7555
+ "A process across three horizontal swimlanes that stack and resize together.": "Ein Prozess \xFCber drei horizontale Schwimmbahnen, die sich gemeinsam stapeln und skalieren.",
7556
+ "Basic Organization Chart": "Einfaches Organigramm",
7557
+ "A small reporting hierarchy joined by connectors.": "Eine kleine Berichtshierarchie, verbunden durch Verbinder.",
7558
+ "No drawing open": "Keine Zeichnung ge\xF6ffnet",
7559
+ "Untitled drawing": "Unbenannte Zeichnung",
7560
+ "Legacy VSD preview (read only)": "Vorschau einer \xE4lteren VSD-Datei (nur lesbar)",
7561
+ "Preview (read-only)": "Vorschau (nur lesbar)",
7562
+ "Edited copy (not saved)": "Bearbeitete Kopie (nicht gespeichert)",
7563
+ Original: "Original",
7564
+ "{width} \xD7 {height} in": "{width} \xD7 {height} Zoll",
7565
+ "{count} top-level": "{count} oberste Ebene",
7566
+ "One part of this drawing is shown approximately or not at all:": "Ein Teil dieser Zeichnung wird nur ungef\xE4hr oder gar nicht angezeigt:",
7567
+ "{count} parts of this drawing are shown approximately or not at all:": "{count} Teile dieser Zeichnung werden nur ungef\xE4hr oder gar nicht angezeigt:",
7568
+ "No compatibility notes.": "Keine Kompatibilit\xE4tshinweise.",
7569
+ "Wait for the current document operation.": "Warten Sie auf den laufenden Dokumentvorgang.",
7570
+ "Legacy VSD drawings are read only here.": "\xC4ltere VSD-Zeichnungen sind hier nur lesbar.",
7571
+ "Open a .vsdx file to save a copy.": "\xD6ffnen Sie eine .vsdx-Datei, um eine Kopie zu speichern.",
7572
+ "Open a .vsdx file to change the page setup.": "\xD6ffnen Sie eine .vsdx-Datei, um die Seiteneinrichtung zu \xE4ndern.",
7573
+ "Downloaded a copy of the drawing.": "Eine Kopie der Zeichnung wurde heruntergeladen.",
7574
+ "Saved the drawing.": "Die Zeichnung wurde gespeichert.",
7575
+ "SVG export requested. This is an approximate snapshot.": "SVG-Export angefordert. Dies ist eine ungef\xE4hre Momentaufnahme.",
7576
+ "Preparing the PDF...": "PDF wird vorbereitet...",
7577
+ "Preparing the PNG...": "PNG wird vorbereitet...",
7578
+ "PNG export requested. Pages are pictures of the approximate rendering.": "PNG-Export angefordert. Seiten sind Bilder der ungef\xE4hren Darstellung.",
7579
+ "PDF export requested.": "PDF-Export angefordert.",
7580
+ "PDF export requested. {count} page(s) lost something; see the report on the Export page.": "PDF-Export angefordert. {count} Seite(n) haben etwas verloren; siehe den Bericht auf der Seite \u201EExportieren\u201C.",
7581
+ "PDF options": "PDF-Optionen",
7582
+ "All pages": "Alle Seiten",
7583
+ "Page range": "Seitenbereich",
7584
+ From: "Von",
7585
+ To: "Bis",
7586
+ "{page}: drawn as vectors with selectable text.": "{page}: als Vektoren mit ausw\xE4hlbarem Text gezeichnet.",
7587
+ "{page}: saved as a picture ({reason}).": "{page}: als Bild gespeichert ({reason}).",
7588
+ "it cannot be drawn as vectors": "sie l\xE4sst sich nicht als Vektoren zeichnen",
7589
+ "Fonts embedded: {fonts}.": "Eingebettete Schriftarten: {fonts}.",
7590
+ "Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Nicht eingebettete Schriftarten (kein TrueType, oder die Schriftlizenz verbietet das Einbetten): {fonts}.",
7591
+ "PDF created: {count} page(s)": "PDF erstellt: {count} Seite(n)"
7592
+ };
7593
+
6838
7594
  // src/visio/locales/de-text.ts
6839
7595
  var deText = {
6840
7596
  "This chart contains unsupported content and is read-only. Its original workbook is preserved.": "Dieses Diagramm enth\xE4lt nicht unterst\xFCtzte Inhalte und ist schreibgesch\xFCtzt. Die urspr\xFCngliche Arbeitsmappe bleibt erhalten.",
@@ -6878,11 +7634,8 @@ var deText = {
6878
7634
  "Open a .vsdx file to add backgrounds.": "\xD6ffnen Sie eine VSDX-Datei, um Hintergr\xFCnde hinzuzuf\xFCgen.",
6879
7635
  "Open a .vsdx file to lay out its shapes.": "\xD6ffnen Sie eine VSDX-Datei, um deren Formen anzuordnen.",
6880
7636
  "open a .vsdx file to lay out its shapes.": "\xD6ffnen Sie eine VSDX-Datei, um deren Formen anzuordnen.",
6881
- "3-D rotation needs a 3-D renderer.": "Die 3D-Drehung ben\xF6tigt einen 3D-Renderer.",
6882
- "Bevel needs 3-D lighting the SVG renderer does not draw.": "Abgeschr\xE4gte Kanten ben\xF6tigen 3D-Beleuchtung, die der SVG-Renderer nicht zeichnet.",
6883
7637
  "Custom theme colour sets are not written yet; pick a theme or variant.": "Benutzerdefinierte Designfarbs\xE4tze werden noch nicht geschrieben; w\xE4hlen Sie ein Design oder eine Variante.",
6884
7638
  "DWG and DXF import is not supported.": "Der Import von DWG und DXF wird nicht unterst\xFCtzt.",
6885
- "Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Datengrafiken werden im Men\xFC \u201EDatengrafiken\u201C ausgew\xE4hlt; es gibt keinen Feldbereich.",
6886
7639
  "Data graphics are placed at their default position; this option is not built yet.": "Datengrafiken werden an ihrer Standardposition platziert; diese Option ist noch nicht verf\xFCgbar.",
6887
7640
  "Embedded Excel charts are not supported.": "Eingebettete Excel-Diagramme werden nicht unterst\xFCtzt.",
6888
7641
  "Embedded OLE objects are not supported; only pictures can be inserted.": "Eingebettete OLE-Objekte werden nicht unterst\xFCtzt; es k\xF6nnen nur Bilder eingef\xFCgt werden.",
@@ -7014,6 +7767,28 @@ var enCommands = {
7014
7767
  "Soft Edges Options...": "Soft Edges Options...",
7015
7768
  Bevel: "Bevel",
7016
7769
  "3-D Rotation": "3-D Rotation",
7770
+ Circle: "Circle",
7771
+ "Relaxed Inset": "Relaxed Inset",
7772
+ Cross: "Cross",
7773
+ "Cool Slant": "Cool Slant",
7774
+ Angle: "Angle",
7775
+ "Soft Round": "Soft Round",
7776
+ Convex: "Convex",
7777
+ Slope: "Slope",
7778
+ Divot: "Divot",
7779
+ Riblet: "Riblet",
7780
+ "Hard Edge": "Hard Edge",
7781
+ "Art Deco": "Art Deco",
7782
+ "No Bevel": "No Bevel",
7783
+ "No Rotation": "No Rotation",
7784
+ "Isometric Left Down": "Isometric Left Down",
7785
+ "Isometric Right Up": "Isometric Right Up",
7786
+ "Isometric Top Up": "Isometric Top Up",
7787
+ "Off Axis Left": "Off Axis Left",
7788
+ "Off Axis Right": "Off Axis Right",
7789
+ "Perspective Left": "Perspective Left",
7790
+ "Perspective Right": "Perspective Right",
7791
+ "Perspective Relaxed": "Perspective Relaxed",
7017
7792
  Arrange: "Arrange",
7018
7793
  Align: "Align",
7019
7794
  "Align Center": "Align Center",
@@ -7125,6 +7900,11 @@ var enCommands = {
7125
7900
  "Advanced Data Linking": "Advanced Data Linking",
7126
7901
  "Link Data": "Link Data",
7127
7902
  "Advanced Data Graphics": "Advanced Data Graphics",
7903
+ "Data Visualizer": "Data Visualizer",
7904
+ "Basic Flowchart...": "Basic Flowchart...",
7905
+ "Cross-Functional Flowchart...": "Cross-Functional Flowchart...",
7906
+ "Refresh Diagram": "Refresh Diagram",
7907
+ "Download Table Template": "Download Table Template",
7128
7908
  Subprocess: "Subprocess",
7129
7909
  "Create New": "Create New",
7130
7910
  "Link to Existing": "Link to Existing",
@@ -7229,6 +8009,7 @@ var enCommands = {
7229
8009
  Coworker: "Coworker",
7230
8010
  Assistant: "Assistant",
7231
8011
  "Delete Position": "Delete Position",
8012
+ "Import Org Chart": "Import Org Chart",
7232
8013
  None: "None",
7233
8014
  Narrow: "Narrow",
7234
8015
  Normal: "Normal",
@@ -7305,11 +8086,8 @@ var enText = {
7305
8086
  "Open a .vsdx file to add backgrounds.": "Open a .vsdx file to add backgrounds.",
7306
8087
  "Open a .vsdx file to lay out its shapes.": "Open a .vsdx file to lay out its shapes.",
7307
8088
  "open a .vsdx file to lay out its shapes.": "open a .vsdx file to lay out its shapes.",
7308
- "3-D rotation needs a 3-D renderer.": "3-D rotation needs a 3-D renderer.",
7309
- "Bevel needs 3-D lighting the SVG renderer does not draw.": "Bevel needs 3-D lighting the SVG renderer does not draw.",
7310
8089
  "Custom theme colour sets are not written yet; pick a theme or variant.": "Custom theme colour sets are not written yet; pick a theme or variant.",
7311
8090
  "DWG and DXF import is not supported.": "DWG and DXF import is not supported.",
7312
- "Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Data graphics are chosen in the Data Graphics menu; there is no fields pane.",
7313
8091
  "Data graphics are placed at their default position; this option is not built yet.": "Data graphics are placed at their default position; this option is not built yet.",
7314
8092
  "Embedded Excel charts are not supported.": "Embedded Excel charts are not supported.",
7315
8093
  "Embedded OLE objects are not supported; only pictures can be inserted.": "Embedded OLE objects are not supported; only pictures can be inserted.",
@@ -7360,6 +8138,100 @@ var enText = {
7360
8138
  "Style {n}": "Style {n}"
7361
8139
  };
7362
8140
 
8141
+ // src/visio/locales/en-backstage.ts
8142
+ var enBackstage = {
8143
+ Info: "Info",
8144
+ New: "New",
8145
+ Save: "Save",
8146
+ "Save As": "Save As",
8147
+ Print: "Print",
8148
+ Close: "Close",
8149
+ Account: "Account",
8150
+ "Documents stay in this browser; nothing is uploaded.": "Documents stay in this browser; nothing is uploaded.",
8151
+ "Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.",
8152
+ "Session name": "Session name",
8153
+ "Start sharing": "Start sharing",
8154
+ "Stop sharing": "Stop sharing",
8155
+ "Share with people": "Share with people",
8156
+ "Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Edit this drawing together with other windows of this browser. Open the same session name in another window to join.",
8157
+ "The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.",
8158
+ "People in this session": "People in this session",
8159
+ "Product Information": "Product Information",
8160
+ "Visio viewer (beta). No sign-in or subscription is used.": "Visio viewer (beta). No sign-in or subscription is used.",
8161
+ "Back to the drawing": "Back to the drawing",
8162
+ "Current page": "Current page",
8163
+ "Page size": "Page size",
8164
+ Compatibility: "Compatibility",
8165
+ "Add Comment": "Add Comment",
8166
+ "Comment on the current page or selected shape.": "Comment on the current page or selected shape.",
8167
+ Browse: "Browse",
8168
+ "Open a .vsdx drawing or a legacy .vsd preview from this device.": "Open a .vsdx drawing or a legacy .vsd preview from this device.",
8169
+ "Download a copy": "Download a copy",
8170
+ "Save the drawing, with your edits, as a .vsdx file.": "Save the drawing, with your edits, as a .vsdx file.",
8171
+ "Export the current page as SVG": "Export the current page as SVG",
8172
+ "An approximate picture with compatibility notes.": "An approximate picture with compatibility notes.",
8173
+ "Print the current page.": "Print the current page.",
8174
+ "Print preview of the current page": "Print preview of the current page",
8175
+ "Open a drawing to print it.": "Open a drawing to print it.",
8176
+ "Printer paper, page size, drawing scale and page properties.": "Printer paper, page size, drawing scale and page properties.",
8177
+ Email: "Email",
8178
+ "Send the drawing as an attachment.": "Send the drawing as an attachment.",
8179
+ "Create PDF/XPS Document": "Create PDF/XPS Document",
8180
+ "A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.",
8181
+ "Change File Type": "Change File Type",
8182
+ "Visio Drawing (*.vsdx)": "Visio Drawing (*.vsdx)",
8183
+ "A copy of the drawing with your edits.": "A copy of the drawing with your edits.",
8184
+ "SVG (*.svg)": "SVG (*.svg)",
8185
+ "The current page as an approximate vector picture.": "The current page as an approximate vector picture.",
8186
+ "PDF (*.pdf)": "PDF (*.pdf)",
8187
+ "Every foreground page as vector shapes and selectable text.": "Every foreground page as vector shapes and selectable text.",
8188
+ "PNG picture (*.png)": "PNG picture (*.png)",
8189
+ "The current page at 150 dpi.": "The current page at 150 dpi.",
8190
+ "VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.",
8191
+ "Choose a Visio drawing": "Choose a Visio drawing",
8192
+ "Blank Drawing": "Blank Drawing",
8193
+ "Start an empty drawing.": "Start an empty drawing.",
8194
+ "Basic Flowchart": "Basic Flowchart",
8195
+ "A short process with a decision, using Basic Flowchart Shapes.": "A short process with a decision, using Basic Flowchart Shapes.",
8196
+ "A process across three horizontal swimlanes that stack and resize together.": "A process across three horizontal swimlanes that stack and resize together.",
8197
+ "Basic Organization Chart": "Basic Organization Chart",
8198
+ "A small reporting hierarchy joined by connectors.": "A small reporting hierarchy joined by connectors.",
8199
+ "No drawing open": "No drawing open",
8200
+ "Untitled drawing": "Untitled drawing",
8201
+ "Legacy VSD preview (read only)": "Legacy VSD preview (read only)",
8202
+ "Preview (read-only)": "Preview (read-only)",
8203
+ "Edited copy (not saved)": "Edited copy (not saved)",
8204
+ Original: "Original",
8205
+ "{width} \xD7 {height} in": "{width} \xD7 {height} in",
8206
+ "{count} top-level": "{count} top-level",
8207
+ "One part of this drawing is shown approximately or not at all:": "One part of this drawing is shown approximately or not at all:",
8208
+ "{count} parts of this drawing are shown approximately or not at all:": "{count} parts of this drawing are shown approximately or not at all:",
8209
+ "No compatibility notes.": "No compatibility notes.",
8210
+ "Wait for the current document operation.": "Wait for the current document operation.",
8211
+ "Legacy VSD drawings are read only here.": "Legacy VSD drawings are read only here.",
8212
+ "Open a .vsdx file to save a copy.": "Open a .vsdx file to save a copy.",
8213
+ "Open a .vsdx file to change the page setup.": "Open a .vsdx file to change the page setup.",
8214
+ "Downloaded a copy of the drawing.": "Downloaded a copy of the drawing.",
8215
+ "Saved the drawing.": "Saved the drawing.",
8216
+ "SVG export requested. This is an approximate snapshot.": "SVG export requested. This is an approximate snapshot.",
8217
+ "Preparing the PDF...": "Preparing the PDF...",
8218
+ "Preparing the PNG...": "Preparing the PNG...",
8219
+ "PNG export requested. Pages are pictures of the approximate rendering.": "PNG export requested. Pages are pictures of the approximate rendering.",
8220
+ "PDF export requested.": "PDF export requested.",
8221
+ "PDF export requested. {count} page(s) lost something; see the report on the Export page.": "PDF export requested. {count} page(s) lost something; see the report on the Export page.",
8222
+ "PDF options": "PDF options",
8223
+ "All pages": "All pages",
8224
+ "Page range": "Page range",
8225
+ From: "From",
8226
+ To: "To",
8227
+ "{page}: drawn as vectors with selectable text.": "{page}: drawn as vectors with selectable text.",
8228
+ "{page}: saved as a picture ({reason}).": "{page}: saved as a picture ({reason}).",
8229
+ "it cannot be drawn as vectors": "it cannot be drawn as vectors",
8230
+ "Fonts embedded: {fonts}.": "Fonts embedded: {fonts}.",
8231
+ "Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.",
8232
+ "PDF created: {count} page(s)": "PDF created: {count} page(s)"
8233
+ };
8234
+
7363
8235
  // src/visio/locales/es-commands.ts
7364
8236
  var esCommands = {
7365
8237
  Home: "Inicio",
@@ -7441,6 +8313,28 @@ var esCommands = {
7441
8313
  "Soft Edges Options...": "Opciones de bordes suaves...",
7442
8314
  Bevel: "Bisel",
7443
8315
  "3-D Rotation": "Rotaci\xF3n 3D",
8316
+ Circle: "C\xEDrculo",
8317
+ "Relaxed Inset": "Inserci\xF3n relajada",
8318
+ Cross: "Cruz",
8319
+ "Cool Slant": "Pendiente fr\xEDa",
8320
+ Angle: "\xC1ngulo",
8321
+ "Soft Round": "Redondeado suave",
8322
+ Convex: "Convexo",
8323
+ Slope: "Pendiente",
8324
+ Divot: "Hoyuelo",
8325
+ Riblet: "Acanalado",
8326
+ "Hard Edge": "Borde duro",
8327
+ "Art Deco": "Art d\xE9co",
8328
+ "No Bevel": "Sin bisel",
8329
+ "No Rotation": "Sin rotaci\xF3n",
8330
+ "Isometric Left Down": "Isom\xE9trica izquierda abajo",
8331
+ "Isometric Right Up": "Isom\xE9trica derecha arriba",
8332
+ "Isometric Top Up": "Isom\xE9trica superior arriba",
8333
+ "Off Axis Left": "Fuera de eje izquierda",
8334
+ "Off Axis Right": "Fuera de eje derecha",
8335
+ "Perspective Left": "Perspectiva izquierda",
8336
+ "Perspective Right": "Perspectiva derecha",
8337
+ "Perspective Relaxed": "Perspectiva relajada",
7444
8338
  Arrange: "Organizar",
7445
8339
  Align: "Alinear",
7446
8340
  "Align Center": "Alinear al centro",
@@ -7552,6 +8446,11 @@ var esCommands = {
7552
8446
  "Advanced Data Linking": "Vinculaci\xF3n de datos avanzada",
7553
8447
  "Link Data": "Vincular datos",
7554
8448
  "Advanced Data Graphics": "Gr\xE1ficos de datos avanzados",
8449
+ "Data Visualizer": "Visualizador de datos",
8450
+ "Basic Flowchart...": "Diagrama de flujo b\xE1sico...",
8451
+ "Cross-Functional Flowchart...": "Diagrama de flujo multifuncional...",
8452
+ "Refresh Diagram": "Actualizar diagrama",
8453
+ "Download Table Template": "Descargar plantilla de tabla",
7555
8454
  Subprocess: "Subproceso",
7556
8455
  "Create New": "Crear nuevo",
7557
8456
  "Link to Existing": "Vincular a existente",
@@ -7656,6 +8555,7 @@ var esCommands = {
7656
8555
  Coworker: "Compa\xF1ero",
7657
8556
  Assistant: "Asistente",
7658
8557
  "Delete Position": "Eliminar puesto",
8558
+ "Import Org Chart": "Importar organigrama",
7659
8559
  None: "Ninguno",
7660
8560
  Narrow: "Estrecho",
7661
8561
  Normal: "Normal",
@@ -7732,11 +8632,8 @@ var esText = {
7732
8632
  "Open a .vsdx file to add backgrounds.": "Abra un archivo .vsdx para agregar fondos.",
7733
8633
  "Open a .vsdx file to lay out its shapes.": "Abra un archivo .vsdx para dise\xF1ar sus formas.",
7734
8634
  "open a .vsdx file to lay out its shapes.": "Abra un archivo .vsdx para dise\xF1ar sus formas.",
7735
- "3-D rotation needs a 3-D renderer.": "La rotaci\xF3n 3D requiere un motor de representaci\xF3n 3D.",
7736
- "Bevel needs 3-D lighting the SVG renderer does not draw.": "El bisel requiere iluminaci\xF3n 3D que el motor SVG no dibuja.",
7737
8635
  "Custom theme colour sets are not written yet; pick a theme or variant.": "Los conjuntos de colores de tema personalizados a\xFAn no se escriben; elija un tema o una variante.",
7738
8636
  "DWG and DXF import is not supported.": "No se admite la importaci\xF3n de DWG y DXF.",
7739
- "Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Los gr\xE1ficos de datos se eligen en el men\xFA Gr\xE1ficos de datos; no hay panel de campos.",
7740
8637
  "Data graphics are placed at their default position; this option is not built yet.": "Los gr\xE1ficos de datos se colocan en su posici\xF3n predeterminada; esta opci\xF3n a\xFAn no est\xE1 disponible.",
7741
8638
  "Embedded Excel charts are not supported.": "No se admiten los gr\xE1ficos de Excel incrustados.",
7742
8639
  "Embedded OLE objects are not supported; only pictures can be inserted.": "No se admiten los objetos OLE incrustados; solo se pueden insertar im\xE1genes.",
@@ -7787,6 +8684,100 @@ var esText = {
7787
8684
  "Style {n}": "Estilo {n}"
7788
8685
  };
7789
8686
 
8687
+ // src/visio/locales/es-backstage.ts
8688
+ var esBackstage = {
8689
+ Info: "Informaci\xF3n",
8690
+ New: "Nuevo",
8691
+ Save: "Guardar",
8692
+ "Save As": "Guardar como",
8693
+ Print: "Imprimir",
8694
+ Close: "Cerrar",
8695
+ Account: "Cuenta",
8696
+ "Documents stay in this browser; nothing is uploaded.": "Los documentos permanecen en este navegador; no se sube nada.",
8697
+ "Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Los dibujos recientes no se registran. Los documentos permanecen en este navegador; no se sube nada.",
8698
+ "Session name": "Nombre de la sesi\xF3n",
8699
+ "Start sharing": "Iniciar uso compartido",
8700
+ "Stop sharing": "Detener uso compartido",
8701
+ "Share with people": "Compartir con personas",
8702
+ "Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Edite este dibujo junto con otras ventanas de este navegador. Abra el mismo nombre de sesi\xF3n en otra ventana para unirse.",
8703
+ "The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "Se comparte todo el dibujo; si dos personas lo cambian a la vez, gana el \xFAltimo cambio. Nada sale de este dispositivo.",
8704
+ "People in this session": "Personas en esta sesi\xF3n",
8705
+ "Product Information": "Informaci\xF3n del producto",
8706
+ "Visio viewer (beta). No sign-in or subscription is used.": "Visor de Visio (beta). No se usa inicio de sesi\xF3n ni suscripci\xF3n.",
8707
+ "Back to the drawing": "Volver al dibujo",
8708
+ "Current page": "P\xE1gina actual",
8709
+ "Page size": "Tama\xF1o de p\xE1gina",
8710
+ Compatibility: "Compatibilidad",
8711
+ "Add Comment": "Agregar comentario",
8712
+ "Comment on the current page or selected shape.": "Comente la p\xE1gina actual o la forma seleccionada.",
8713
+ Browse: "Examinar",
8714
+ "Open a .vsdx drawing or a legacy .vsd preview from this device.": "Abra un dibujo .vsdx o una vista previa .vsd heredada desde este dispositivo.",
8715
+ "Download a copy": "Descargar una copia",
8716
+ "Save the drawing, with your edits, as a .vsdx file.": "Guarde el dibujo, con sus cambios, como archivo .vsdx.",
8717
+ "Export the current page as SVG": "Exportar la p\xE1gina actual como SVG",
8718
+ "An approximate picture with compatibility notes.": "Una imagen aproximada con notas de compatibilidad.",
8719
+ "Print the current page.": "Imprimir la p\xE1gina actual.",
8720
+ "Print preview of the current page": "Vista previa de impresi\xF3n de la p\xE1gina actual",
8721
+ "Open a drawing to print it.": "Abra un dibujo para imprimirlo.",
8722
+ "Printer paper, page size, drawing scale and page properties.": "Papel de la impresora, tama\xF1o de p\xE1gina, escala del dibujo y propiedades de la p\xE1gina.",
8723
+ Email: "Correo electr\xF3nico",
8724
+ "Send the drawing as an attachment.": "Env\xEDe el dibujo como archivo adjunto.",
8725
+ "Create PDF/XPS Document": "Crear documento PDF/XPS",
8726
+ "A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "Un PDF vectorial con una p\xE1gina por cada p\xE1gina de primer plano elegida, con el tama\xF1o de p\xE1gina y texto seleccionable. Los degradados son sombreados y las sombras son desplazamientos de borde duro; el resplandor se aproxima; el desenfoque, los bordes suaves y los reflejos no se dibujan. El texto usa fuentes est\xE1ndar, salvo que el host proporcione fuentes para incrustar. Una p\xE1gina que no puede dibujarse como vectores se convierte en imagen, y el informe de abajo indica cu\xE1les son. XPS no se ofrece.",
8727
+ "Change File Type": "Cambiar tipo de archivo",
8728
+ "Visio Drawing (*.vsdx)": "Dibujo de Visio (*.vsdx)",
8729
+ "A copy of the drawing with your edits.": "Una copia del dibujo con sus cambios.",
8730
+ "SVG (*.svg)": "SVG (*.svg)",
8731
+ "The current page as an approximate vector picture.": "La p\xE1gina actual como imagen vectorial aproximada.",
8732
+ "PDF (*.pdf)": "PDF (*.pdf)",
8733
+ "Every foreground page as vector shapes and selectable text.": "Cada p\xE1gina de primer plano como formas vectoriales y texto seleccionable.",
8734
+ "PNG picture (*.png)": "Imagen PNG (*.png)",
8735
+ "The current page at 150 dpi.": "La p\xE1gina actual a 150 ppp.",
8736
+ "VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "Los formatos VSD, VSDM, VDX, de plantilla de formas, de plantilla y XPS no se ofrecen: requieren conversiones que este visor no tiene.",
8737
+ "Choose a Visio drawing": "Elegir un dibujo de Visio",
8738
+ "Blank Drawing": "Dibujo en blanco",
8739
+ "Start an empty drawing.": "Iniciar un dibujo vac\xEDo.",
8740
+ "Basic Flowchart": "Diagrama de flujo b\xE1sico",
8741
+ "A short process with a decision, using Basic Flowchart Shapes.": "Un proceso breve con una decisi\xF3n, con formas de diagrama de flujo b\xE1sico.",
8742
+ "A process across three horizontal swimlanes that stack and resize together.": "Un proceso en tres calles horizontales que se apilan y cambian de tama\xF1o juntas.",
8743
+ "Basic Organization Chart": "Organigrama b\xE1sico",
8744
+ "A small reporting hierarchy joined by connectors.": "Una peque\xF1a jerarqu\xEDa de informes unida por conectores.",
8745
+ "No drawing open": "No hay ning\xFAn dibujo abierto",
8746
+ "Untitled drawing": "Dibujo sin t\xEDtulo",
8747
+ "Legacy VSD preview (read only)": "Vista previa de VSD heredado (solo lectura)",
8748
+ "Preview (read-only)": "Vista previa (solo lectura)",
8749
+ "Edited copy (not saved)": "Copia editada (no guardada)",
8750
+ Original: "Original",
8751
+ "{width} \xD7 {height} in": "{width} \xD7 {height} pulgadas",
8752
+ "{count} top-level": "{count} de nivel superior",
8753
+ "One part of this drawing is shown approximately or not at all:": "Una parte de este dibujo se muestra de forma aproximada o no se muestra:",
8754
+ "{count} parts of this drawing are shown approximately or not at all:": "{count} partes de este dibujo se muestran de forma aproximada o no se muestran:",
8755
+ "No compatibility notes.": "No hay notas de compatibilidad.",
8756
+ "Wait for the current document operation.": "Espere a que termine la operaci\xF3n actual del documento.",
8757
+ "Legacy VSD drawings are read only here.": "Los dibujos VSD heredados son de solo lectura aqu\xED.",
8758
+ "Open a .vsdx file to save a copy.": "Abra un archivo .vsdx para guardar una copia.",
8759
+ "Open a .vsdx file to change the page setup.": "Abra un archivo .vsdx para cambiar la configuraci\xF3n de p\xE1gina.",
8760
+ "Downloaded a copy of the drawing.": "Se descarg\xF3 una copia del dibujo.",
8761
+ "Saved the drawing.": "Se guard\xF3 el dibujo.",
8762
+ "SVG export requested. This is an approximate snapshot.": "Exportaci\xF3n a SVG solicitada. Es una instant\xE1nea aproximada.",
8763
+ "Preparing the PDF...": "Preparando el PDF...",
8764
+ "Preparing the PNG...": "Preparando el PNG...",
8765
+ "PNG export requested. Pages are pictures of the approximate rendering.": "Exportaci\xF3n a PNG solicitada. Las p\xE1ginas son im\xE1genes de la representaci\xF3n aproximada.",
8766
+ "PDF export requested.": "Exportaci\xF3n a PDF solicitada.",
8767
+ "PDF export requested. {count} page(s) lost something; see the report on the Export page.": "Exportaci\xF3n a PDF solicitada. {count} p\xE1gina(s) perdieron algo; vea el informe en la p\xE1gina Exportar.",
8768
+ "PDF options": "Opciones de PDF",
8769
+ "All pages": "Todas las p\xE1ginas",
8770
+ "Page range": "Intervalo de p\xE1ginas",
8771
+ From: "Desde",
8772
+ To: "Hasta",
8773
+ "{page}: drawn as vectors with selectable text.": "{page}: dibujada como vectores con texto seleccionable.",
8774
+ "{page}: saved as a picture ({reason}).": "{page}: guardada como imagen ({reason}).",
8775
+ "it cannot be drawn as vectors": "no puede dibujarse como vectores",
8776
+ "Fonts embedded: {fonts}.": "Fuentes incrustadas: {fonts}.",
8777
+ "Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Fuentes no incrustadas (no son TrueType, o la licencia de la fuente proh\xEDbe incrustarlas): {fonts}.",
8778
+ "PDF created: {count} page(s)": "PDF creado: {count} p\xE1gina(s)"
8779
+ };
8780
+
7790
8781
  // src/visio/locales/fr-commands.ts
7791
8782
  var frCommands = {
7792
8783
  Home: "Accueil",
@@ -7868,6 +8859,28 @@ var frCommands = {
7868
8859
  "Soft Edges Options...": "Options des bords adoucis...",
7869
8860
  Bevel: "Biseau",
7870
8861
  "3-D Rotation": "Rotation 3D",
8862
+ Circle: "Cercle",
8863
+ "Relaxed Inset": "Retrait d\xE9tendu",
8864
+ Cross: "Croix",
8865
+ "Cool Slant": "Inclinaison fra\xEEche",
8866
+ Angle: "Angle",
8867
+ "Soft Round": "Arrondi doux",
8868
+ Convex: "Convexe",
8869
+ Slope: "Pente",
8870
+ Divot: "Cuvette",
8871
+ Riblet: "Nervure",
8872
+ "Hard Edge": "Bord dur",
8873
+ "Art Deco": "Art d\xE9co",
8874
+ "No Bevel": "Aucun biseau",
8875
+ "No Rotation": "Aucune rotation",
8876
+ "Isometric Left Down": "Isom\xE9trique gauche bas",
8877
+ "Isometric Right Up": "Isom\xE9trique droite haut",
8878
+ "Isometric Top Up": "Isom\xE9trique dessus haut",
8879
+ "Off Axis Left": "Hors axe gauche",
8880
+ "Off Axis Right": "Hors axe droit",
8881
+ "Perspective Left": "Perspective gauche",
8882
+ "Perspective Right": "Perspective droite",
8883
+ "Perspective Relaxed": "Perspective d\xE9tendue",
7871
8884
  Arrange: "Organiser",
7872
8885
  Align: "Aligner",
7873
8886
  "Align Center": "Aligner au centre",
@@ -7979,6 +8992,11 @@ var frCommands = {
7979
8992
  "Advanced Data Linking": "Liaison de donn\xE9es avanc\xE9e",
7980
8993
  "Link Data": "Lier des donn\xE9es",
7981
8994
  "Advanced Data Graphics": "Graphiques de donn\xE9es avanc\xE9s",
8995
+ "Data Visualizer": "Visualiseur de donn\xE9es",
8996
+ "Basic Flowchart...": "Organigramme de base...",
8997
+ "Cross-Functional Flowchart...": "Organigramme interfonctionnel...",
8998
+ "Refresh Diagram": "Actualiser le diagramme",
8999
+ "Download Table Template": "T\xE9l\xE9charger le mod\xE8le de tableau",
7982
9000
  Subprocess: "Sous-processus",
7983
9001
  "Create New": "Cr\xE9er",
7984
9002
  "Link to Existing": "Lier \xE0 un existant",
@@ -8083,6 +9101,7 @@ var frCommands = {
8083
9101
  Coworker: "Coll\xE8gue",
8084
9102
  Assistant: "Assistant",
8085
9103
  "Delete Position": "Supprimer la position",
9104
+ "Import Org Chart": "Importer un organigramme",
8086
9105
  None: "Aucun",
8087
9106
  Narrow: "\xC9troit",
8088
9107
  Normal: "Normal",
@@ -8159,11 +9178,8 @@ var frText = {
8159
9178
  "Open a .vsdx file to add backgrounds.": "Ouvrez un fichier .vsdx pour ajouter des arri\xE8re-plans.",
8160
9179
  "Open a .vsdx file to lay out its shapes.": "Ouvrez un fichier .vsdx pour disposer ses formes.",
8161
9180
  "open a .vsdx file to lay out its shapes.": "Ouvrez un fichier .vsdx pour disposer ses formes.",
8162
- "3-D rotation needs a 3-D renderer.": "La rotation 3D n\xE9cessite un moteur de rendu 3D.",
8163
- "Bevel needs 3-D lighting the SVG renderer does not draw.": "Le biseau n\xE9cessite un \xE9clairage 3D que le moteur SVG ne dessine pas.",
8164
9181
  "Custom theme colour sets are not written yet; pick a theme or variant.": "Les jeux de couleurs de th\xE8me personnalis\xE9s ne sont pas encore \xE9crits ; choisissez un th\xE8me ou une variante.",
8165
9182
  "DWG and DXF import is not supported.": "L'importation de DWG et DXF n'est pas prise en charge.",
8166
- "Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "Les graphiques de donn\xE9es se choisissent dans le menu Graphiques de donn\xE9es ; il n'y a pas de volet des champs.",
8167
9183
  "Data graphics are placed at their default position; this option is not built yet.": "Les graphiques de donn\xE9es sont plac\xE9s \xE0 leur position par d\xE9faut ; cette option n'est pas encore disponible.",
8168
9184
  "Embedded Excel charts are not supported.": "Les graphiques Excel incorpor\xE9s ne sont pas pris en charge.",
8169
9185
  "Embedded OLE objects are not supported; only pictures can be inserted.": "Les objets OLE incorpor\xE9s ne sont pas pris en charge ; seules les images peuvent \xEAtre ins\xE9r\xE9es.",
@@ -8214,6 +9230,100 @@ var frText = {
8214
9230
  "Style {n}": "Style {n}"
8215
9231
  };
8216
9232
 
9233
+ // src/visio/locales/fr-backstage.ts
9234
+ var frBackstage = {
9235
+ Info: "Informations",
9236
+ New: "Nouveau",
9237
+ Save: "Enregistrer",
9238
+ "Save As": "Enregistrer sous",
9239
+ Print: "Imprimer",
9240
+ Close: "Fermer",
9241
+ Account: "Compte",
9242
+ "Documents stay in this browser; nothing is uploaded.": "Les documents restent dans ce navigateur ; rien n\u2019est t\xE9l\xE9vers\xE9.",
9243
+ "Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "Les dessins r\xE9cents ne sont pas suivis. Les documents restent dans ce navigateur ; rien n\u2019est t\xE9l\xE9vers\xE9.",
9244
+ "Session name": "Nom de la session",
9245
+ "Start sharing": "D\xE9marrer le partage",
9246
+ "Stop sharing": "Arr\xEAter le partage",
9247
+ "Share with people": "Partager avec des personnes",
9248
+ "Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "Modifiez ce dessin avec d\u2019autres fen\xEAtres de ce navigateur. Ouvrez le m\xEAme nom de session dans une autre fen\xEAtre pour vous joindre.",
9249
+ "The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "Tout le dessin est partag\xE9 ; si deux personnes le modifient en m\xEAme temps, la derni\xE8re modification l\u2019emporte. Rien ne quitte cet appareil.",
9250
+ "People in this session": "Personnes dans cette session",
9251
+ "Product Information": "Informations sur le produit",
9252
+ "Visio viewer (beta). No sign-in or subscription is used.": "Visionneuse Visio (b\xEAta). Aucune connexion ni aucun abonnement n\u2019est utilis\xE9.",
9253
+ "Back to the drawing": "Retour au dessin",
9254
+ "Current page": "Page actuelle",
9255
+ "Page size": "Taille de la page",
9256
+ Compatibility: "Compatibilit\xE9",
9257
+ "Add Comment": "Ajouter un commentaire",
9258
+ "Comment on the current page or selected shape.": "Commentez la page actuelle ou la forme s\xE9lectionn\xE9e.",
9259
+ Browse: "Parcourir",
9260
+ "Open a .vsdx drawing or a legacy .vsd preview from this device.": "Ouvrez un dessin .vsdx ou un aper\xE7u .vsd ancien depuis cet appareil.",
9261
+ "Download a copy": "T\xE9l\xE9charger une copie",
9262
+ "Save the drawing, with your edits, as a .vsdx file.": "Enregistrez le dessin, avec vos modifications, dans un fichier .vsdx.",
9263
+ "Export the current page as SVG": "Exporter la page actuelle en SVG",
9264
+ "An approximate picture with compatibility notes.": "Une image approximative avec des notes de compatibilit\xE9.",
9265
+ "Print the current page.": "Imprimer la page actuelle.",
9266
+ "Print preview of the current page": "Aper\xE7u avant impression de la page actuelle",
9267
+ "Open a drawing to print it.": "Ouvrez un dessin pour l\u2019imprimer.",
9268
+ "Printer paper, page size, drawing scale and page properties.": "Papier de l\u2019imprimante, taille de page, \xE9chelle du dessin et propri\xE9t\xE9s de la page.",
9269
+ Email: "E-mail",
9270
+ "Send the drawing as an attachment.": "Envoyez le dessin en pi\xE8ce jointe.",
9271
+ "Create PDF/XPS Document": "Cr\xE9er un document PDF/XPS",
9272
+ "A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "Un PDF vectoriel avec une page par page de premier plan choisie, \xE0 la taille de la page et avec du texte s\xE9lectionnable. Les d\xE9grad\xE9s sont des aplats et les ombres des d\xE9calages \xE0 bords nets ; la lueur est approxim\xE9e ; le flou, les bords adoucis et les reflets ne sont pas dessin\xE9s. Le texte utilise des polices standard, sauf si l\u2019h\xF4te fournit des polices \xE0 int\xE9grer. Une page qui ne peut pas \xEAtre dessin\xE9e en vecteurs devient une image, et le rapport ci-dessous l\u2019indique. Le XPS n\u2019est pas propos\xE9.",
9273
+ "Change File Type": "Changer de type de fichier",
9274
+ "Visio Drawing (*.vsdx)": "Dessin Visio (*.vsdx)",
9275
+ "A copy of the drawing with your edits.": "Une copie du dessin avec vos modifications.",
9276
+ "SVG (*.svg)": "SVG (*.svg)",
9277
+ "The current page as an approximate vector picture.": "La page actuelle sous forme d\u2019image vectorielle approximative.",
9278
+ "PDF (*.pdf)": "PDF (*.pdf)",
9279
+ "Every foreground page as vector shapes and selectable text.": "Chaque page de premier plan en formes vectorielles et texte s\xE9lectionnable.",
9280
+ "PNG picture (*.png)": "Image PNG (*.png)",
9281
+ "The current page at 150 dpi.": "La page actuelle \xE0 150 ppp.",
9282
+ "VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "Les formats VSD, VSDM, VDX, gabarit, mod\xE8le et XPS ne sont pas propos\xE9s : ils n\xE9cessitent des conversions que cette visionneuse ne poss\xE8de pas.",
9283
+ "Choose a Visio drawing": "Choisir un dessin Visio",
9284
+ "Blank Drawing": "Dessin vierge",
9285
+ "Start an empty drawing.": "Commencer un dessin vide.",
9286
+ "Basic Flowchart": "Organigramme de base",
9287
+ "A short process with a decision, using Basic Flowchart Shapes.": "Un court processus avec une d\xE9cision, utilisant les formes de base des organigrammes.",
9288
+ "A process across three horizontal swimlanes that stack and resize together.": "Un processus sur trois couloirs horizontaux qui s\u2019empilent et se redimensionnent ensemble.",
9289
+ "Basic Organization Chart": "Organigramme hi\xE9rarchique de base",
9290
+ "A small reporting hierarchy joined by connectors.": "Une petite hi\xE9rarchie de rapports reli\xE9e par des connecteurs.",
9291
+ "No drawing open": "Aucun dessin ouvert",
9292
+ "Untitled drawing": "Dessin sans titre",
9293
+ "Legacy VSD preview (read only)": "Aper\xE7u VSD ancien (lecture seule)",
9294
+ "Preview (read-only)": "Aper\xE7u (lecture seule)",
9295
+ "Edited copy (not saved)": "Copie modifi\xE9e (non enregistr\xE9e)",
9296
+ Original: "Original",
9297
+ "{width} \xD7 {height} in": "{width} \xD7 {height} po",
9298
+ "{count} top-level": "{count} de premier niveau",
9299
+ "One part of this drawing is shown approximately or not at all:": "Une partie de ce dessin est affich\xE9e de fa\xE7on approximative ou pas du tout :",
9300
+ "{count} parts of this drawing are shown approximately or not at all:": "{count} parties de ce dessin sont affich\xE9es de fa\xE7on approximative ou pas du tout :",
9301
+ "No compatibility notes.": "Aucune note de compatibilit\xE9.",
9302
+ "Wait for the current document operation.": "Attendez la fin de l\u2019op\xE9ration en cours sur le document.",
9303
+ "Legacy VSD drawings are read only here.": "Les dessins VSD anciens sont en lecture seule ici.",
9304
+ "Open a .vsdx file to save a copy.": "Ouvrez un fichier .vsdx pour enregistrer une copie.",
9305
+ "Open a .vsdx file to change the page setup.": "Ouvrez un fichier .vsdx pour modifier la mise en page.",
9306
+ "Downloaded a copy of the drawing.": "Une copie du dessin a \xE9t\xE9 t\xE9l\xE9charg\xE9e.",
9307
+ "Saved the drawing.": "Le dessin a \xE9t\xE9 enregistr\xE9.",
9308
+ "SVG export requested. This is an approximate snapshot.": "Export SVG demand\xE9. Il s\u2019agit d\u2019un instantan\xE9 approximatif.",
9309
+ "Preparing the PDF...": "Pr\xE9paration du PDF...",
9310
+ "Preparing the PNG...": "Pr\xE9paration du PNG...",
9311
+ "PNG export requested. Pages are pictures of the approximate rendering.": "Export PNG demand\xE9. Les pages sont des images du rendu approximatif.",
9312
+ "PDF export requested.": "Export PDF demand\xE9.",
9313
+ "PDF export requested. {count} page(s) lost something; see the report on the Export page.": "Export PDF demand\xE9. {count} page(s) ont perdu des \xE9l\xE9ments ; voir le rapport sur la page Exporter.",
9314
+ "PDF options": "Options PDF",
9315
+ "All pages": "Toutes les pages",
9316
+ "Page range": "Plage de pages",
9317
+ From: "De",
9318
+ To: "\xC0",
9319
+ "{page}: drawn as vectors with selectable text.": "{page} : dessin\xE9e en vecteurs avec texte s\xE9lectionnable.",
9320
+ "{page}: saved as a picture ({reason}).": "{page} : enregistr\xE9e sous forme d\u2019image ({reason}).",
9321
+ "it cannot be drawn as vectors": "elle ne peut pas \xEAtre dessin\xE9e en vecteurs",
9322
+ "Fonts embedded: {fonts}.": "Polices int\xE9gr\xE9es : {fonts}.",
9323
+ "Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "Polices non int\xE9gr\xE9es (pas TrueType, ou la licence de la police interdit l\u2019int\xE9gration) : {fonts}.",
9324
+ "PDF created: {count} page(s)": "PDF cr\xE9\xE9 : {count} page(s)"
9325
+ };
9326
+
8217
9327
  // src/visio/locales/zh-CN-commands.ts
8218
9328
  var zhCNCommands = {
8219
9329
  Home: "\u5F00\u59CB",
@@ -8295,6 +9405,28 @@ var zhCNCommands = {
8295
9405
  "Soft Edges Options...": "\u67D4\u5316\u8FB9\u7F18\u9009\u9879...",
8296
9406
  Bevel: "\u68F1\u53F0",
8297
9407
  "3-D Rotation": "\u4E09\u7EF4\u65CB\u8F6C",
9408
+ Circle: "\u5706",
9409
+ "Relaxed Inset": "\u677E\u6563\u5D4C\u5165",
9410
+ Cross: "\u5341\u5B57\u5F62",
9411
+ "Cool Slant": "\u51B7\u8272\u8C03\u659C\u9762",
9412
+ Angle: "\u89D2\u5EA6",
9413
+ "Soft Round": "\u67D4\u5706",
9414
+ Convex: "\u51F8\u5706\u5F62",
9415
+ Slope: "\u659C\u9762",
9416
+ Divot: "\u504F\u79FB\u91CF",
9417
+ Riblet: "\u68F1\u7EB9",
9418
+ "Hard Edge": "\u786C\u8FB9\u7F18",
9419
+ "Art Deco": "\u88C5\u9970\u827A\u672F\u6548\u679C",
9420
+ "No Bevel": "\u65E0\u68F1\u53F0",
9421
+ "No Rotation": "\u65E0\u65CB\u8F6C",
9422
+ "Isometric Left Down": "\u7B49\u8F74\u5DE6\u4E0B",
9423
+ "Isometric Right Up": "\u7B49\u8F74\u53F3\u4E0A",
9424
+ "Isometric Top Up": "\u7B49\u8F74\u9876\u90E8\u5411\u4E0A",
9425
+ "Off Axis Left": "\u79BB\u8F74\u5DE6",
9426
+ "Off Axis Right": "\u79BB\u8F74\u53F3",
9427
+ "Perspective Left": "\u900F\u89C6\u5DE6",
9428
+ "Perspective Right": "\u900F\u89C6\u53F3",
9429
+ "Perspective Relaxed": "\u900F\u89C6\u653E\u677E",
8298
9430
  Arrange: "\u6392\u5217",
8299
9431
  Align: "\u5BF9\u9F50",
8300
9432
  "Align Center": "\u5C45\u4E2D\u5BF9\u9F50",
@@ -8406,6 +9538,11 @@ var zhCNCommands = {
8406
9538
  "Advanced Data Linking": "\u9AD8\u7EA7\u6570\u636E\u94FE\u63A5",
8407
9539
  "Link Data": "\u94FE\u63A5\u6570\u636E",
8408
9540
  "Advanced Data Graphics": "\u9AD8\u7EA7\u6570\u636E\u56FE\u5F62",
9541
+ "Data Visualizer": "\u6570\u636E\u53EF\u89C6\u5316\u5DE5\u5177",
9542
+ "Basic Flowchart...": "\u57FA\u672C\u6D41\u7A0B\u56FE...",
9543
+ "Cross-Functional Flowchart...": "\u8DE8\u804C\u80FD\u6D41\u7A0B\u56FE...",
9544
+ "Refresh Diagram": "\u5237\u65B0\u56FE\u8868",
9545
+ "Download Table Template": "\u4E0B\u8F7D\u8868\u683C\u6A21\u677F",
8409
9546
  Subprocess: "\u5B50\u6D41\u7A0B",
8410
9547
  "Create New": "\u65B0\u5EFA",
8411
9548
  "Link to Existing": "\u94FE\u63A5\u5230\u73B0\u6709",
@@ -8510,6 +9647,7 @@ var zhCNCommands = {
8510
9647
  Coworker: "\u540C\u4E8B",
8511
9648
  Assistant: "\u52A9\u7406",
8512
9649
  "Delete Position": "\u5220\u9664\u804C\u4F4D",
9650
+ "Import Org Chart": "\u5BFC\u5165\u7EC4\u7EC7\u7ED3\u6784\u56FE",
8513
9651
  None: "\u65E0",
8514
9652
  Narrow: "\u7A84",
8515
9653
  Normal: "\u666E\u901A",
@@ -8586,11 +9724,8 @@ var zhCNText = {
8586
9724
  "Open a .vsdx file to add backgrounds.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u6DFB\u52A0\u80CC\u666F\u3002",
8587
9725
  "Open a .vsdx file to lay out its shapes.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u5E03\u5C40\u5176\u5F62\u72B6\u3002",
8588
9726
  "open a .vsdx file to lay out its shapes.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u5E03\u5C40\u5176\u5F62\u72B6\u3002",
8589
- "3-D rotation needs a 3-D renderer.": "\u4E09\u7EF4\u65CB\u8F6C\u9700\u8981\u4E09\u7EF4\u6E32\u67D3\u5668\u3002",
8590
- "Bevel needs 3-D lighting the SVG renderer does not draw.": "\u68F1\u53F0\u9700\u8981 SVG \u6E32\u67D3\u5668\u65E0\u6CD5\u7ED8\u5236\u7684\u4E09\u7EF4\u5149\u7167\u3002",
8591
9727
  "Custom theme colour sets are not written yet; pick a theme or variant.": "\u5C1A\u4E0D\u80FD\u5199\u5165\u81EA\u5B9A\u4E49\u4E3B\u9898\u989C\u8272\u96C6\uFF1B\u8BF7\u9009\u62E9\u4E3B\u9898\u6216\u53D8\u4F53\u3002",
8592
9728
  "DWG and DXF import is not supported.": "\u4E0D\u652F\u6301\u5BFC\u5165 DWG \u548C DXF\u3002",
8593
- "Data graphics are chosen in the Data Graphics menu; there is no fields pane.": "\u6570\u636E\u56FE\u5F62\u5728\u201C\u6570\u636E\u56FE\u5F62\u201D\u83DC\u5355\u4E2D\u9009\u62E9\uFF1B\u6CA1\u6709\u5B57\u6BB5\u7A97\u683C\u3002",
8594
9729
  "Data graphics are placed at their default position; this option is not built yet.": "\u6570\u636E\u56FE\u5F62\u653E\u7F6E\u5728\u9ED8\u8BA4\u4F4D\u7F6E\uFF1B\u5C1A\u672A\u63D0\u4F9B\u6B64\u9009\u9879\u3002",
8595
9730
  "Embedded Excel charts are not supported.": "\u4E0D\u652F\u6301\u5D4C\u5165\u7684 Excel \u56FE\u8868\u3002",
8596
9731
  "Embedded OLE objects are not supported; only pictures can be inserted.": "\u4E0D\u652F\u6301\u5D4C\u5165\u7684 OLE \u5BF9\u8C61\uFF1B\u53EA\u80FD\u63D2\u5165\u56FE\u7247\u3002",
@@ -8641,14 +9776,108 @@ var zhCNText = {
8641
9776
  "Style {n}": "\u6837\u5F0F {n}"
8642
9777
  };
8643
9778
 
9779
+ // src/visio/locales/zh-CN-backstage.ts
9780
+ var zhCNBackstage = {
9781
+ Info: "\u4FE1\u606F",
9782
+ New: "\u65B0\u5EFA",
9783
+ Save: "\u4FDD\u5B58",
9784
+ "Save As": "\u53E6\u5B58\u4E3A",
9785
+ Print: "\u6253\u5370",
9786
+ Close: "\u5173\u95ED",
9787
+ Account: "\u5E10\u6237",
9788
+ "Documents stay in this browser; nothing is uploaded.": "\u6587\u6863\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\u4E2D\uFF1B\u4E0D\u4F1A\u4E0A\u4F20\u4EFB\u4F55\u5185\u5BB9\u3002",
9789
+ "Recent drawings are not tracked. Documents stay in this browser; nothing is uploaded.": "\u4E0D\u8BB0\u5F55\u6700\u8FD1\u4F7F\u7528\u7684\u56FE\u8868\u3002\u6587\u6863\u4FDD\u5B58\u5728\u6B64\u6D4F\u89C8\u5668\u4E2D\uFF1B\u4E0D\u4F1A\u4E0A\u4F20\u4EFB\u4F55\u5185\u5BB9\u3002",
9790
+ "Session name": "\u4F1A\u8BDD\u540D\u79F0",
9791
+ "Start sharing": "\u5F00\u59CB\u5171\u4EAB",
9792
+ "Stop sharing": "\u505C\u6B62\u5171\u4EAB",
9793
+ "Share with people": "\u4E0E\u4ED6\u4EBA\u5171\u4EAB",
9794
+ "Edit this drawing together with other windows of this browser. Open the same session name in another window to join.": "\u4E0E\u6B64\u6D4F\u89C8\u5668\u7684\u5176\u4ED6\u7A97\u53E3\u5171\u540C\u7F16\u8F91\u6B64\u56FE\u8868\u3002\u5728\u53E6\u4E00\u4E2A\u7A97\u53E3\u4E2D\u6253\u5F00\u76F8\u540C\u7684\u4F1A\u8BDD\u540D\u79F0\u5373\u53EF\u52A0\u5165\u3002",
9795
+ "The whole drawing is shared; when two people change it at once, the last change wins. Nothing leaves this device.": "\u6574\u4E2A\u56FE\u8868\u90FD\u4F1A\u5171\u4EAB\uFF1B\u5982\u679C\u4E24\u4EBA\u540C\u65F6\u4FEE\u6539\uFF0C\u4EE5\u6700\u540E\u4E00\u6B21\u4FEE\u6539\u4E3A\u51C6\u3002\u5185\u5BB9\u4E0D\u4F1A\u79BB\u5F00\u6B64\u8BBE\u5907\u3002",
9796
+ "People in this session": "\u6B64\u4F1A\u8BDD\u4E2D\u7684\u4EBA\u5458",
9797
+ "Product Information": "\u4EA7\u54C1\u4FE1\u606F",
9798
+ "Visio viewer (beta). No sign-in or subscription is used.": "Visio \u67E5\u770B\u5668\uFF08\u6D4B\u8BD5\u7248\uFF09\u3002\u4E0D\u4F7F\u7528\u767B\u5F55\u6216\u8BA2\u9605\u3002",
9799
+ "Back to the drawing": "\u8FD4\u56DE\u56FE\u8868",
9800
+ "Current page": "\u5F53\u524D\u9875\u9762",
9801
+ "Page size": "\u9875\u9762\u5927\u5C0F",
9802
+ Compatibility: "\u517C\u5BB9\u6027",
9803
+ "Add Comment": "\u6DFB\u52A0\u6CE8\u91CA",
9804
+ "Comment on the current page or selected shape.": "\u5BF9\u5F53\u524D\u9875\u9762\u6216\u6240\u9009\u5F62\u72B6\u6DFB\u52A0\u6CE8\u91CA\u3002",
9805
+ Browse: "\u6D4F\u89C8",
9806
+ "Open a .vsdx drawing or a legacy .vsd preview from this device.": "\u4ECE\u6B64\u8BBE\u5907\u6253\u5F00 .vsdx \u56FE\u8868\u6216\u65E7\u7248 .vsd \u9884\u89C8\u3002",
9807
+ "Download a copy": "\u4E0B\u8F7D\u526F\u672C",
9808
+ "Save the drawing, with your edits, as a .vsdx file.": "\u5C06\u56FE\u8868\uFF08\u5305\u62EC\u60A8\u7684\u4FEE\u6539\uFF09\u4FDD\u5B58\u4E3A .vsdx \u6587\u4EF6\u3002",
9809
+ "Export the current page as SVG": "\u5C06\u5F53\u524D\u9875\u9762\u5BFC\u51FA\u4E3A SVG",
9810
+ "An approximate picture with compatibility notes.": "\u5E26\u6709\u517C\u5BB9\u6027\u8BF4\u660E\u7684\u8FD1\u4F3C\u56FE\u7247\u3002",
9811
+ "Print the current page.": "\u6253\u5370\u5F53\u524D\u9875\u9762\u3002",
9812
+ "Print preview of the current page": "\u5F53\u524D\u9875\u9762\u7684\u6253\u5370\u9884\u89C8",
9813
+ "Open a drawing to print it.": "\u6253\u5F00\u56FE\u8868\u540E\u5373\u53EF\u6253\u5370\u3002",
9814
+ "Printer paper, page size, drawing scale and page properties.": "\u6253\u5370\u673A\u7EB8\u5F20\u3001\u9875\u9762\u5927\u5C0F\u3001\u56FE\u8868\u6BD4\u4F8B\u548C\u9875\u9762\u5C5E\u6027\u3002",
9815
+ Email: "\u7535\u5B50\u90AE\u4EF6",
9816
+ "Send the drawing as an attachment.": "\u4EE5\u9644\u4EF6\u5F62\u5F0F\u53D1\u9001\u56FE\u8868\u3002",
9817
+ "Create PDF/XPS Document": "\u521B\u5EFA PDF/XPS \u6587\u6863",
9818
+ "A vector PDF with one page per chosen foreground page at the page size and selectable text. Gradients are shadings and shadows are hard-edged offsets; glow is approximated; blur, soft edges and reflections are not drawn. Text uses standard fonts unless the host supplies fonts to embed. A page that cannot be drawn as vectors becomes a picture, and the report below says which. XPS is not offered.": "\u77E2\u91CF PDF\uFF0C\u6BCF\u4E2A\u6240\u9009\u524D\u666F\u9875\u5BF9\u5E94\u4E00\u9875\uFF0C\u9875\u9762\u5927\u5C0F\u4E0D\u53D8\uFF0C\u6587\u672C\u53EF\u9009\u62E9\u3002\u6E10\u53D8\u4EE5\u7740\u8272\u65B9\u5F0F\u7ED8\u5236\uFF0C\u9634\u5F71\u4E3A\u786C\u8FB9\u504F\u79FB\uFF1B\u53D1\u5149\u4E3A\u8FD1\u4F3C\u6548\u679C\uFF1B\u6A21\u7CCA\u3001\u67D4\u5316\u8FB9\u7F18\u548C\u5012\u5F71\u4E0D\u7ED8\u5236\u3002\u9664\u975E\u5BBF\u4E3B\u63D0\u4F9B\u8981\u5D4C\u5165\u7684\u5B57\u4F53\uFF0C\u5426\u5219\u6587\u672C\u4F7F\u7528\u6807\u51C6\u5B57\u4F53\u3002\u65E0\u6CD5\u4EE5\u77E2\u91CF\u7ED8\u5236\u7684\u9875\u9762\u4F1A\u53D8\u4E3A\u56FE\u7247\uFF0C\u4E0B\u65B9\u62A5\u544A\u4F1A\u8BF4\u660E\u54EA\u4E9B\u9875\u9762\u3002\u4E0D\u63D0\u4F9B XPS\u3002",
9819
+ "Change File Type": "\u66F4\u6539\u6587\u4EF6\u7C7B\u578B",
9820
+ "Visio Drawing (*.vsdx)": "Visio \u56FE\u8868 (*.vsdx)",
9821
+ "A copy of the drawing with your edits.": "\u5305\u542B\u60A8\u4FEE\u6539\u5185\u5BB9\u7684\u56FE\u8868\u526F\u672C\u3002",
9822
+ "SVG (*.svg)": "SVG (*.svg)",
9823
+ "The current page as an approximate vector picture.": "\u5F53\u524D\u9875\u9762\u7684\u8FD1\u4F3C\u77E2\u91CF\u56FE\u7247\u3002",
9824
+ "PDF (*.pdf)": "PDF (*.pdf)",
9825
+ "Every foreground page as vector shapes and selectable text.": "\u6BCF\u4E2A\u524D\u666F\u9875\u9762\u4EE5\u77E2\u91CF\u56FE\u5F62\u548C\u53EF\u9009\u6587\u672C\u5F62\u5F0F\u8F93\u51FA\u3002",
9826
+ "PNG picture (*.png)": "PNG \u56FE\u7247 (*.png)",
9827
+ "The current page at 150 dpi.": "\u5F53\u524D\u9875\u9762\uFF0C150 dpi\u3002",
9828
+ "VSD, VSDM, VDX, stencil, template and XPS formats are not offered: they need conversions this viewer does not have.": "\u4E0D\u63D0\u4F9B VSD\u3001VSDM\u3001VDX\u3001\u6A21\u5177\u3001\u6A21\u677F\u548C XPS \u683C\u5F0F\uFF1A\u8FD9\u4E9B\u683C\u5F0F\u9700\u8981\u672C\u67E5\u770B\u5668\u4E0D\u5177\u5907\u7684\u8F6C\u6362\u529F\u80FD\u3002",
9829
+ "Choose a Visio drawing": "\u9009\u62E9 Visio \u56FE\u8868",
9830
+ "Blank Drawing": "\u7A7A\u767D\u56FE\u8868",
9831
+ "Start an empty drawing.": "\u65B0\u5EFA\u7A7A\u767D\u56FE\u8868\u3002",
9832
+ "Basic Flowchart": "\u57FA\u672C\u6D41\u7A0B\u56FE",
9833
+ "A short process with a decision, using Basic Flowchart Shapes.": "\u4E00\u4E2A\u5305\u542B\u51B3\u7B56\u7684\u7B80\u77ED\u6D41\u7A0B\uFF0C\u4F7F\u7528\u57FA\u672C\u6D41\u7A0B\u56FE\u5F62\u72B6\u3002",
9834
+ "A process across three horizontal swimlanes that stack and resize together.": "\u8DE8\u4E09\u6761\u6C34\u5E73\u6CF3\u9053\u7684\u6D41\u7A0B\uFF0C\u6CF3\u9053\u4F1A\u4E00\u8D77\u5806\u53E0\u548C\u8C03\u6574\u5927\u5C0F\u3002",
9835
+ "Basic Organization Chart": "\u57FA\u672C\u7EC4\u7EC7\u7ED3\u6784\u56FE",
9836
+ "A small reporting hierarchy joined by connectors.": "\u7531\u8FDE\u63A5\u7EBF\u76F8\u8FDE\u7684\u5C0F\u578B\u6C47\u62A5\u5C42\u7EA7\u3002",
9837
+ "No drawing open": "\u672A\u6253\u5F00\u56FE\u8868",
9838
+ "Untitled drawing": "\u672A\u547D\u540D\u56FE\u8868",
9839
+ "Legacy VSD preview (read only)": "\u65E7\u7248 VSD \u9884\u89C8\uFF08\u53EA\u8BFB\uFF09",
9840
+ "Preview (read-only)": "\u9884\u89C8\uFF08\u53EA\u8BFB\uFF09",
9841
+ "Edited copy (not saved)": "\u5DF2\u7F16\u8F91\u7684\u526F\u672C\uFF08\u672A\u4FDD\u5B58\uFF09",
9842
+ Original: "\u539F\u59CB",
9843
+ "{width} \xD7 {height} in": "{width} \xD7 {height} \u82F1\u5BF8",
9844
+ "{count} top-level": "{count} \u4E2A\u9876\u5C42\u5F62\u72B6",
9845
+ "One part of this drawing is shown approximately or not at all:": "\u6B64\u56FE\u8868\u6709 1 \u4E2A\u90E8\u5206\u4EC5\u8FD1\u4F3C\u663E\u793A\u6216\u4E0D\u663E\u793A\uFF1A",
9846
+ "{count} parts of this drawing are shown approximately or not at all:": "\u6B64\u56FE\u8868\u6709 {count} \u4E2A\u90E8\u5206\u4EC5\u8FD1\u4F3C\u663E\u793A\u6216\u4E0D\u663E\u793A\uFF1A",
9847
+ "No compatibility notes.": "\u6CA1\u6709\u517C\u5BB9\u6027\u8BF4\u660E\u3002",
9848
+ "Wait for the current document operation.": "\u8BF7\u7B49\u5F85\u5F53\u524D\u6587\u6863\u64CD\u4F5C\u5B8C\u6210\u3002",
9849
+ "Legacy VSD drawings are read only here.": "\u6B64\u5904\u7684\u65E7\u7248 VSD \u56FE\u8868\u4E3A\u53EA\u8BFB\u3002",
9850
+ "Open a .vsdx file to save a copy.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u4FDD\u5B58\u526F\u672C\u3002",
9851
+ "Open a .vsdx file to change the page setup.": "\u6253\u5F00 .vsdx \u6587\u4EF6\u4EE5\u66F4\u6539\u9875\u9762\u8BBE\u7F6E\u3002",
9852
+ "Downloaded a copy of the drawing.": "\u5DF2\u4E0B\u8F7D\u56FE\u8868\u526F\u672C\u3002",
9853
+ "Saved the drawing.": "\u5DF2\u4FDD\u5B58\u56FE\u8868\u3002",
9854
+ "SVG export requested. This is an approximate snapshot.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA SVG\u3002\u8FD9\u662F\u8FD1\u4F3C\u5FEB\u7167\u3002",
9855
+ "Preparing the PDF...": "\u6B63\u5728\u51C6\u5907 PDF...",
9856
+ "Preparing the PNG...": "\u6B63\u5728\u51C6\u5907 PNG...",
9857
+ "PNG export requested. Pages are pictures of the approximate rendering.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA PNG\u3002\u9875\u9762\u4E3A\u8FD1\u4F3C\u6E32\u67D3\u7684\u56FE\u7247\u3002",
9858
+ "PDF export requested.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA PDF\u3002",
9859
+ "PDF export requested. {count} page(s) lost something; see the report on the Export page.": "\u5DF2\u8BF7\u6C42\u5BFC\u51FA PDF\u3002{count} \u4E2A\u9875\u9762\u4E22\u5931\u4E86\u90E8\u5206\u5185\u5BB9\uFF1B\u8BF7\u67E5\u770B\u201C\u5BFC\u51FA\u201D\u9875\u9762\u4E0A\u7684\u62A5\u544A\u3002",
9860
+ "PDF options": "PDF \u9009\u9879",
9861
+ "All pages": "\u6240\u6709\u9875\u9762",
9862
+ "Page range": "\u9875\u9762\u8303\u56F4",
9863
+ From: "\u4ECE",
9864
+ To: "\u5230",
9865
+ "{page}: drawn as vectors with selectable text.": "{page}\uFF1A\u4EE5\u77E2\u91CF\u7ED8\u5236\uFF0C\u6587\u672C\u53EF\u9009\u62E9\u3002",
9866
+ "{page}: saved as a picture ({reason}).": "{page}\uFF1A\u53E6\u5B58\u4E3A\u56FE\u7247\uFF08{reason}\uFF09\u3002",
9867
+ "it cannot be drawn as vectors": "\u65E0\u6CD5\u4EE5\u77E2\u91CF\u7ED8\u5236",
9868
+ "Fonts embedded: {fonts}.": "\u5DF2\u5D4C\u5165\u5B57\u4F53\uFF1A{fonts}\u3002",
9869
+ "Fonts not embedded (not TrueType, or the font licence forbids embedding): {fonts}.": "\u672A\u5D4C\u5165\u7684\u5B57\u4F53\uFF08\u4E0D\u662F TrueType\uFF0C\u6216\u5B57\u4F53\u8BB8\u53EF\u7981\u6B62\u5D4C\u5165\uFF09\uFF1A{fonts}\u3002",
9870
+ "PDF created: {count} page(s)": "\u5DF2\u521B\u5EFA PDF\uFF1A{count} \u9875"
9871
+ };
9872
+
8644
9873
  // src/visio/ribbon-locale.ts
8645
9874
  var VISIO_LOCALES = ["en", "de", "es", "fr", "zh-CN"];
8646
9875
  var VISIO_RIBBON_STRINGS = {
8647
- en: { ...enCommands, ...enText },
8648
- de: { ...deCommands, ...deText },
8649
- es: { ...esCommands, ...esText },
8650
- fr: { ...frCommands, ...frText },
8651
- "zh-CN": { ...zhCNCommands, ...zhCNText }
9876
+ en: { ...enCommands, ...enText, ...enBackstage },
9877
+ de: { ...deCommands, ...deText, ...deBackstage },
9878
+ es: { ...esCommands, ...esText, ...esBackstage },
9879
+ fr: { ...frCommands, ...frText, ...frBackstage },
9880
+ "zh-CN": { ...zhCNCommands, ...zhCNText, ...zhCNBackstage }
8652
9881
  };
8653
9882
  function normalizeVisioLocale(value) {
8654
9883
  return normalizeLocale(value, VISIO_LOCALES, "en");
@@ -8860,6 +10089,7 @@ var ATTRIBUTES = [
8860
10089
  "launcher-label",
8861
10090
  "more-label",
8862
10091
  "none-label",
10092
+ "empty-label",
8863
10093
  "placeholder",
8864
10094
  "data-label"
8865
10095
  ];
@@ -8876,12 +10106,9 @@ function translateSlot(element, name, current, locale, write) {
8876
10106
  function ribbonLocale(ribbon) {
8877
10107
  return normalizeVisioLocale(ribbon.dataset.visioLocale);
8878
10108
  }
8879
- function localizeRibbon(ribbon, value) {
8880
- const locale = normalizeVisioLocale(value);
8881
- ribbon.dataset.visioLocale = locale;
8882
- const elements = [ribbon, ...ribbon.querySelectorAll("*")];
10109
+ function localizeWording(elements, locale) {
8883
10110
  for (const element of elements) {
8884
- if (element.closest("[data-add-in]")) continue;
10111
+ if (element.closest("[data-add-in], [data-user-text]")) continue;
8885
10112
  for (const name of ATTRIBUTES) {
8886
10113
  const text2 = element.getAttribute(name);
8887
10114
  if (text2)
@@ -8892,6 +10119,11 @@ function localizeRibbon(ribbon, value) {
8892
10119
  translateSlot(element, "#text", text2, locale, (next) => element.textContent = next);
8893
10120
  }
8894
10121
  }
10122
+ }
10123
+ function localizeRibbon(ribbon, value) {
10124
+ const locale = normalizeVisioLocale(value);
10125
+ ribbon.dataset.visioLocale = locale;
10126
+ localizeWording([ribbon, ...ribbon.querySelectorAll("*")], locale);
8895
10127
  ribbon.setAttribute("file-label", translateRibbonText(locale, "File"));
8896
10128
  ribbon.setAttribute("collapse-label", translateRibbonText(locale, "Collapse the ribbon"));
8897
10129
  return locale;
@@ -8925,8 +10157,8 @@ var BASIC_SHAPES = VISIO_BASIC_STENCIL.masters.map((master) => ({
8925
10157
  var BASIC_STENCIL_ID = "basic";
8926
10158
  var n = (value) => String(Math.round(value * 100) / 100);
8927
10159
  function outlinePreviewPath(outline, size) {
8928
- const scale2 = 20 / Math.max(size.width, size.height);
8929
- const w = size.width * scale2, h = size.height * scale2;
10160
+ const scale3 = 20 / Math.max(size.width, size.height);
10161
+ const w = size.width * scale3, h = size.height * scale3;
8930
10162
  const left = 12 - w / 2, top = 12 - h / 2;
8931
10163
  if (outline === "ellipse")
8932
10164
  return `M${n(left)} 12a${n(w / 2)} ${n(h / 2)} 0 1 0 ${n(w)} 0a${n(w / 2)} ${n(h / 2)} 0 1 0 ${n(-w)} 0`;
@@ -10706,10 +11938,40 @@ function quickStyleGallery(doc) {
10706
11938
  });
10707
11939
  return gallery3;
10708
11940
  }
10709
- var EFFECT_REASONS = [
10710
- ["bevel", "Bevel", "Bevel needs 3-D lighting the SVG renderer does not draw."],
10711
- ["rotation-3d", "3-D Rotation", "3-D rotation needs a 3-D renderer."]
10712
- ];
11941
+ var bevelItemId = (id) => `bevel-${id}`;
11942
+ var rotationItemId = (id) => `rotation-3d-${id}`;
11943
+ function bevelOptions() {
11944
+ return {
11945
+ id: "bevel",
11946
+ label: "Bevel",
11947
+ items: [
11948
+ {
11949
+ id: bevelItemId("none"),
11950
+ label: "No Bevel",
11951
+ action: { type: "shape-format", patch: { bevel: "none" } },
11952
+ checked: false
11953
+ },
11954
+ ...VISIO_BEVEL_PRESETS.map(({ id, label }) => ({
11955
+ id: bevelItemId(id),
11956
+ label,
11957
+ action: { type: "shape-format", patch: { bevel: id } },
11958
+ checked: false
11959
+ }))
11960
+ ]
11961
+ };
11962
+ }
11963
+ function rotationOptions() {
11964
+ return {
11965
+ id: "rotation-3d",
11966
+ label: "3-D Rotation",
11967
+ items: VISIO_ROTATION_PRESETS.map(({ id, label }) => ({
11968
+ id: rotationItemId(id),
11969
+ label,
11970
+ action: { type: "shape-format", patch: { rotation3d: id } },
11971
+ checked: false
11972
+ }))
11973
+ };
11974
+ }
10713
11975
  var glowItemId = (size, accent) => `glow-${size}-${accent}`;
10714
11976
  var softEdgesItemId = (size) => `soft-edges-${String(size).replace(".", "-")}`;
10715
11977
  var reflectionItemId = (id) => `reflection-${id}`;
@@ -10809,7 +12071,8 @@ function effectsOptions() {
10809
12071
  reflectionOptions(),
10810
12072
  glowOptions(),
10811
12073
  softEdgeOptions(),
10812
- ...EFFECT_REASONS.map(([id, label, unsupported2]) => ({ id, label, unsupported: unsupported2 }))
12074
+ bevelOptions(),
12075
+ rotationOptions()
10813
12076
  ];
10814
12077
  }
10815
12078
 
@@ -11433,9 +12696,9 @@ function pageSetupGroup(doc) {
11433
12696
  return el3;
11434
12697
  }
11435
12698
  function preview3(shapes, empty = false) {
11436
- const scale2 = 24 / 11;
12699
+ const scale3 = 24 / 11;
11437
12700
  const rects = shapes.map(
11438
- (shape) => `<rect x="${shape.x * scale2 + 3}" y="${(11 - shape.y - shape.height) * scale2}" width="${shape.width * scale2}" height="${shape.height * scale2}" fill="${shape.fill ?? "none"}" stroke="${shape.line ?? "none"}" stroke-width="0.6"/>` + (shape.text ? `<rect x="${shape.x * scale2 + 4}" y="${(11 - shape.y - shape.height * 0.6) * scale2}" width="${shape.width * scale2 * 0.5}" height="1.2" fill="${shape.textColor ?? "#000000"}"/>` : "")
12701
+ (shape) => `<rect x="${shape.x * scale3 + 3}" y="${(11 - shape.y - shape.height) * scale3}" width="${shape.width * scale3}" height="${shape.height * scale3}" fill="${shape.fill ?? "none"}" stroke="${shape.line ?? "none"}" stroke-width="0.6"/>` + (shape.text ? `<rect x="${shape.x * scale3 + 4}" y="${(11 - shape.y - shape.height * 0.6) * scale3}" width="${shape.width * scale3 * 0.5}" height="1.2" fill="${shape.textColor ?? "#000000"}"/>` : "")
11439
12702
  ).join("");
11440
12703
  const slash = empty ? '<path d="M3 24L21.5 0" stroke="#C00000" stroke-width="1"/>' : "";
11441
12704
  return `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="3" y="0" width="18.5" height="24" fill="#FFFFFF" stroke="#8A8A8A" stroke-width="0.6"/>${rects}${slash}</svg>`;
@@ -11832,7 +13095,6 @@ function syncReLayout(gallery3, reason) {
11832
13095
 
11833
13096
  // src/visio/ribbon-other-tabs.ts
11834
13097
  var OBJECTS = "Embedded OLE objects are not supported; only pictures can be inserted.";
11835
- var GRAPHICS = "Advanced data graphics (editing individual items, rules and callout styles) are not built yet.";
11836
13098
  var POSITIONS = [
11837
13099
  ["top-left", "Top Left"],
11838
13100
  ["top", "Top Center"],
@@ -11982,6 +13244,12 @@ function buildDataPanel(doc, panel) {
11982
13244
  icon: "visioData",
11983
13245
  action: data("custom-import")
11984
13246
  }),
13247
+ command(doc, {
13248
+ id: "org-import-data",
13249
+ label: "Import Org Chart",
13250
+ icon: "visioData",
13251
+ action: { type: "org-chart", command: "import" }
13252
+ }),
11985
13253
  command(doc, {
11986
13254
  id: "refresh-all",
11987
13255
  label: "Refresh All",
@@ -11989,6 +13257,35 @@ function buildDataPanel(doc, panel) {
11989
13257
  action: data("refresh")
11990
13258
  })
11991
13259
  ]),
13260
+ group(doc, "Data Visualizer", [
13261
+ menu(doc, {
13262
+ id: "data-visualizer",
13263
+ label: "Data Visualizer",
13264
+ icon: "visioData",
13265
+ items: [
13266
+ {
13267
+ id: "visualizer-basic",
13268
+ label: "Basic Flowchart...",
13269
+ action: data("visualizer-basic")
13270
+ },
13271
+ {
13272
+ id: "visualizer-cross-functional",
13273
+ label: "Cross-Functional Flowchart...",
13274
+ action: data("visualizer-cross-functional")
13275
+ },
13276
+ {
13277
+ id: "visualizer-refresh",
13278
+ label: "Refresh Diagram",
13279
+ action: data("visualizer-refresh")
13280
+ },
13281
+ {
13282
+ id: "visualizer-template",
13283
+ label: "Download Table Template",
13284
+ action: data("visualizer-template")
13285
+ }
13286
+ ]
13287
+ })
13288
+ ]),
11992
13289
  group(doc, "Data Graphics", [
11993
13290
  menu(doc, {
11994
13291
  id: "data-graphics",
@@ -12064,7 +13361,7 @@ function buildDataPanel(doc, panel) {
12064
13361
  check(doc, {
12065
13362
  id: "data-graphic-fields",
12066
13363
  label: "Data Graphic Fields",
12067
- unsupported: "Data graphics are chosen in the Data Graphics menu; there is no fields pane."
13364
+ action: data("graphic-fields")
12068
13365
  })
12069
13366
  ])
12070
13367
  ]),
@@ -12075,10 +13372,12 @@ function buildDataPanel(doc, panel) {
12075
13372
  icon: "visioLink",
12076
13373
  action: data("link-data")
12077
13374
  }),
12078
- command(
12079
- doc,
12080
- unsupported("advanced-data-graphics", "Advanced Data Graphics", "visioChart", GRAPHICS)
12081
- )
13375
+ command(doc, {
13376
+ id: "advanced-data-graphics",
13377
+ label: "Advanced Data Graphics",
13378
+ icon: "visioChart",
13379
+ action: data("graphic-advanced")
13380
+ })
12082
13381
  ])
12083
13382
  ])
12084
13383
  );
@@ -12373,6 +13672,14 @@ function buildOrgChartPanel(doc, panel) {
12373
13672
  action: { type: "org-chart", command: "delete" }
12374
13673
  })
12375
13674
  ]),
13675
+ group(doc, "Import", [
13676
+ command(doc, {
13677
+ id: "org-import",
13678
+ label: "Import Org Chart",
13679
+ icon: "visioData",
13680
+ action: { type: "org-chart", command: "import" }
13681
+ })
13682
+ ]),
12376
13683
  group(doc, "Arrange", [
12377
13684
  command(doc, {
12378
13685
  id: "org-layout",
@@ -13213,91 +14520,20 @@ var GROUP_ICONS = {
13213
14520
  Language: "message",
13214
14521
  Comments: "message",
13215
14522
  Reports: "visioData",
13216
- Views: "visioPresentation",
13217
- Show: "ruler",
13218
- Zoom: "zoomIn",
13219
- "Visual Aids": "grid",
13220
- Window: "copy",
13221
- Macros: "visioMacros",
13222
- Help: "help"
13223
- };
13224
- function wireRibbonOverflow(ribbon) {
13225
- return attachRibbonGroupOverflow(ribbon, {
13226
- moreLabel: () => translateRibbonText(ribbonLocale(ribbon), "More"),
13227
- icon: (group2) => GROUP_ICONS[group2.getAttribute("label") ?? ""]
13228
- });
13229
- }
13230
- function orgChartSelection(state) {
13231
- const page3 = state.document?.pages[state.pageIndex];
13232
- const first = state.selectedShapes[0];
13233
- if (!page3 || !first || !visioSelectionIsOnPage(first, page3.id)) return void 0;
13234
- return visioOrgPosition(page3, first.id) ? { pageId: page3.id, id: first.id } : void 0;
13235
- }
13236
- var ViewerOrgChart = class {
13237
- constructor(root, controller, edit) {
13238
- this.root = root;
13239
- this.controller = controller;
13240
- this.edit = edit;
13241
- }
13242
- root;
13243
- controller;
13244
- edit;
13245
- reason(state, command2) {
13246
- if (!canEditDiagram(state)) return "Open a .vsdx file to edit the org chart.";
13247
- if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
13248
- const selection2 = orgChartSelection(state);
13249
- if (!selection2) return "Select a position in an org chart.";
13250
- const page3 = state.document.pages[state.pageIndex];
13251
- if (command2 === "coworker" && !visioOrgHierarchy(page3).parentOf(selection2.id))
13252
- return "The top position has no manager to add a coworker under.";
13253
- return void 0;
13254
- }
13255
- run(action2) {
13256
- const state = this.controller.state;
13257
- if (this.reason(state, action2.command) !== void 0) return;
13258
- const page3 = state.document?.pages[state.pageIndex];
13259
- const selection2 = orgChartSelection(state);
13260
- if (!page3 || !selection2) return;
13261
- const { id } = selection2;
13262
- if (action2.command === "delete") {
13263
- const batches = visioOrgDeletePosition(page3, id);
13264
- if (!batches) return;
13265
- this.edit(async () => {
13266
- for (const batch of batches) await this.controller.applyEdits(batch);
13267
- this.controller.selectShapes([]);
13268
- }, "Deleted the position and its connectors.");
13269
- } else if (action2.command === "layout") {
13270
- const edits = visioOrgReLayout(page3);
13271
- if (!edits) return;
13272
- this.edit(() => this.controller.applyEdits(edits), "Laid out the org chart.");
13273
- } else {
13274
- const kind = { subordinate: "subordinate", coworker: "peer", assistant: "assistant" }[action2.command];
13275
- const plan = visioOrgAddPosition(page3, id, kind);
13276
- if (!plan) return;
13277
- this.edit(async () => {
13278
- await this.controller.applyEdits(plan.edits);
13279
- this.controller.selectShapes([{ id: plan.newId, name: "", pageId: page3.id }]);
13280
- }, `Added a ${action2.command}.`);
13281
- }
13282
- }
13283
- render(state) {
13284
- const panel = this.root.querySelector('[data-ribbon-tab="org-chart"]');
13285
- if (!panel) return;
13286
- for (const [id, command2] of [
13287
- ["org-subordinate", "subordinate"],
13288
- ["org-coworker", "coworker"],
13289
- ["org-assistant", "assistant"],
13290
- ["org-delete", "delete"],
13291
- ["org-layout", "layout"]
13292
- ]) {
13293
- const item = panel.querySelector(`[command="${id}"]`);
13294
- if (!item) continue;
13295
- const reason = this.reason(state, command2);
13296
- item.disabled = reason !== void 0;
13297
- if (reason) item.title = reason;
13298
- }
13299
- }
14523
+ Views: "visioPresentation",
14524
+ Show: "ruler",
14525
+ Zoom: "zoomIn",
14526
+ "Visual Aids": "grid",
14527
+ Window: "copy",
14528
+ Macros: "visioMacros",
14529
+ Help: "help"
13300
14530
  };
14531
+ function wireRibbonOverflow(ribbon) {
14532
+ return attachRibbonGroupOverflow(ribbon, {
14533
+ moreLabel: () => translateRibbonText(ribbonLocale(ribbon), "More"),
14534
+ icon: (group2) => GROUP_ICONS[group2.getAttribute("label") ?? ""]
14535
+ });
14536
+ }
13301
14537
 
13302
14538
  // src/visio/viewer-contextual-tabs.ts
13303
14539
  var CONTEXTUAL_TABS = [
@@ -13944,6 +15180,7 @@ function createBackstage(doc) {
13944
15180
  ]) {
13945
15181
  const value = el2(doc, "dd");
13946
15182
  value.dataset.info = key;
15183
+ if (key === "page") value.dataset.userText = "";
13947
15184
  facts.append(el2(doc, "dt", "", label), value);
13948
15185
  }
13949
15186
  const notes = el2(doc, "div", "backstage-notes");
@@ -13955,6 +15192,7 @@ function createBackstage(doc) {
13955
15192
  );
13956
15193
  const file = el2(doc, "h2", "backstage-file");
13957
15194
  file.dataset.info = "name";
15195
+ file.dataset.userText = "";
13958
15196
  const templates = el2(doc, "div", "backstage-templates");
13959
15197
  const slot = doc.createElement("slot");
13960
15198
  slot.name = "templates";
@@ -14436,6 +15674,7 @@ function quickAccessShown(behaviour, resolved) {
14436
15674
  }
14437
15675
 
14438
15676
  // src/visio/viewer-backstage.ts
15677
+ var BACK_LABEL = "Back to the drawing";
14439
15678
  var ViewerBackstage = class {
14440
15679
  constructor(host) {
14441
15680
  this.host = host;
@@ -14464,6 +15703,33 @@ var ViewerBackstage = class {
14464
15703
  #custom() {
14465
15704
  return this.host.customization?.() ?? EMPTY_VISIO_CUSTOMIZATION;
14466
15705
  }
15706
+ #locale() {
15707
+ return normalizeVisioLocale(this.host.locale());
15708
+ }
15709
+ /** `text` (English) in the display language. */
15710
+ #t(text2) {
15711
+ return translateRibbonText(this.#locale(), text2);
15712
+ }
15713
+ /** Announces `text` (English) in the display language. */
15714
+ #say(text2) {
15715
+ this.host.announce(this.#t(text2));
15716
+ }
15717
+ /** Translates the built-in pages in place, the way the ribbon is translated. */
15718
+ #translate() {
15719
+ const sections = [...this.#root.children].filter(
15720
+ (child) => child instanceof HTMLElement && child.matches("section")
15721
+ );
15722
+ localizeWording(
15723
+ sections.flatMap((section2) => [section2, ...section2.querySelectorAll("*")]),
15724
+ this.#locale()
15725
+ );
15726
+ this.#root.setAttribute("back-label", this.#t(BACK_LABEL));
15727
+ }
15728
+ /** Shows the pages in the current display language again (after the locale changes). */
15729
+ localize() {
15730
+ if (this.#state) this.render(this.#state);
15731
+ else this.#translate();
15732
+ }
14467
15733
  /** Re-applies the host customisation: hidden pages, host pages and their contexts. */
14468
15734
  refreshCustomization() {
14469
15735
  this.#hostPages.setPages(this.#custom().extraPages);
@@ -14621,7 +15887,7 @@ var ViewerBackstage = class {
14621
15887
  );
14622
15888
  this.host.downloaded?.();
14623
15889
  this.hide();
14624
- this.host.announce("Downloaded a copy of the drawing.");
15890
+ this.#say("Downloaded a copy of the drawing.");
14625
15891
  } catch (error) {
14626
15892
  this.host.announce(error instanceof Error ? error.message : String(error));
14627
15893
  }
@@ -14638,7 +15904,7 @@ var ViewerBackstage = class {
14638
15904
  this.hide();
14639
15905
  const name = await saveDrawingToStorage(storage2, bytes, this.host.fileName());
14640
15906
  this.host.savedToStorage?.(name, revision);
14641
- this.host.announce("Saved the drawing.");
15907
+ this.#say("Saved the drawing.");
14642
15908
  } catch (cause) {
14643
15909
  const error = cause instanceof Error ? cause : new Error(String(cause));
14644
15910
  this.host.saveFailed?.(error);
@@ -14655,7 +15921,7 @@ var ViewerBackstage = class {
14655
15921
  `${this.#base()}-page-${result.pageIndex + 1}.svg`
14656
15922
  );
14657
15923
  this.hide();
14658
- this.host.announce("SVG export requested. This is an approximate snapshot.");
15924
+ this.#say("SVG export requested. This is an approximate snapshot.");
14659
15925
  } catch (error) {
14660
15926
  this.host.announce(error instanceof Error ? error.message : String(error));
14661
15927
  }
@@ -14663,18 +15929,21 @@ var ViewerBackstage = class {
14663
15929
  async #exportPicture(format) {
14664
15930
  if (format === "png") this.hide();
14665
15931
  else showPdfReport(this.#root, void 0);
14666
- this.host.announce(`Preparing the ${format.toUpperCase()}...`);
15932
+ this.#say(format === "pdf" ? "Preparing the PDF..." : "Preparing the PNG...");
14667
15933
  try {
14668
15934
  const count = this.#state?.document?.pages.filter((page3) => !page3.isBackground).length ?? 0;
14669
15935
  const choice2 = format === "pdf" ? readPdfChoice(this.#root, count) : void 0;
14670
15936
  const { blob: blob2, pageIndex, report } = await this.host.exportPicture(format, choice2);
14671
15937
  const name = format === "pdf" ? this.#base() : `${this.#base()}-page-${pageIndex + 1}`;
14672
15938
  this.#save(blob2, `${name}.${format}`);
14673
- if (report) showPdfReport(this.#root, report);
15939
+ if (report) {
15940
+ showPdfReport(this.#root, report);
15941
+ this.#translate();
15942
+ }
14674
15943
  const degraded = report?.pages.filter(
14675
15944
  (page3) => page3.mode === "picture" || page3.degraded.length
14676
15945
  );
14677
- this.host.announce(
15946
+ this.#say(
14678
15947
  format === "png" ? "PNG export requested. Pages are pictures of the approximate rendering." : degraded?.length ? `PDF export requested. ${degraded.length} page(s) lost something; see the report on the Export page.` : "PDF export requested."
14679
15948
  );
14680
15949
  } catch (error) {
@@ -14721,10 +15990,13 @@ var ViewerBackstage = class {
14721
15990
  const node = this.#root.querySelector(`[data-info="${key2}"]`);
14722
15991
  if (node) node.textContent = value;
14723
15992
  };
14724
- set("name", state.document ? this.host.fileName() || "Untitled drawing" : "No drawing open");
15993
+ set(
15994
+ "name",
15995
+ state.document ? this.host.fileName() || this.#t("Untitled drawing") : this.#t("No drawing open")
15996
+ );
14725
15997
  set("pages", String(state.document?.pages.length ?? 0));
14726
15998
  syncPdfPanel(this.#root, state.document);
14727
- set("page", page3?.name ?? "None");
15999
+ set("page", page3?.name ?? this.#t("None"));
14728
16000
  set("size", page3 ? `${page3.width} \xD7 ${page3.height} in` : "None");
14729
16001
  set("shapes", page3 ? `${page3.shapes.length} top-level` : "None");
14730
16002
  set(
@@ -14760,9 +16032,13 @@ var ViewerBackstage = class {
14760
16032
  backstageItems({
14761
16033
  save: { disabled: saveDisabled, ...saveDisabled ? { title: saveReason } : {} },
14762
16034
  close: { disabled: !state.document }
14763
- }).filter((item) => !hidden.has(item.id))
16035
+ }).filter((item) => !hidden.has(item.id)).map((item) => ({
16036
+ ...item,
16037
+ label: this.#t(item.label),
16038
+ ...item.title ? { title: this.#t(item.title) } : {}
16039
+ }))
14764
16040
  );
14765
- const key = JSON.stringify(items);
16041
+ const key = JSON.stringify([this.#locale(), items]);
14766
16042
  if (key !== this.#items) {
14767
16043
  this.#items = key;
14768
16044
  this.#root.items = items;
@@ -14771,6 +16047,7 @@ var ViewerBackstage = class {
14771
16047
  '[data-backstage-action^="export-"], [data-backstage-action="print"]'
14772
16048
  ))
14773
16049
  node.disabled = !page3 || busy;
16050
+ this.#translate();
14774
16051
  }
14775
16052
  };
14776
16053
  var fields = ["x", "y", "width", "height", "angle"];
@@ -15251,6 +16528,72 @@ function wireContextMenus(root, viewport, controller, onShapeMenu = () => {
15251
16528
  );
15252
16529
  return () => events.abort();
15253
16530
  }
16531
+ var ITEM = "data-shape-action";
16532
+ var COMMAND = "ctx-action:";
16533
+ var listening = /* @__PURE__ */ new WeakSet();
16534
+ function orderedActions(actions) {
16535
+ const keyed = actions.some((action2) => action2.sortKey);
16536
+ return actions.map((action2, index) => ({ action: action2, index })).sort(
16537
+ (a, b) => keyed ? (a.action.sortKey ?? "").localeCompare(b.action.sortKey ?? "") || a.index - b.index : a.index - b.index
16538
+ ).map((item) => item.action);
16539
+ }
16540
+ function actionBlock(action2, editable3) {
16541
+ if (action2.disabled) return "The shape has disabled this action.";
16542
+ if (action2.run.kind === "unsupported") return action2.run.reason;
16543
+ return editable3 ? void 0 : "The drawing cannot be edited.";
16544
+ }
16545
+ function selectedShape2(controller) {
16546
+ const { state } = controller;
16547
+ const page3 = state.document?.pages[state.pageIndex];
16548
+ if (!page3 || state.selectedShapes.length !== 1) return void 0;
16549
+ const id = state.selectedShape?.id;
16550
+ return page3.shapes.find((shape) => shape.id === id);
16551
+ }
16552
+ function syncShapeActions(menu2, target, controller, announce) {
16553
+ for (const node of [...menu2.querySelectorAll(`:scope > [${ITEM}]`)]) node.remove();
16554
+ if (target !== "shape") return;
16555
+ const shape = selectedShape2(controller);
16556
+ const actions = orderedActions((shape?.actions ?? []).filter((action2) => !action2.invisible));
16557
+ if (!shape || !actions.length) return;
16558
+ const doc = menu2.ownerDocument;
16559
+ const editable3 = canEditDiagram(controller.state);
16560
+ const separator = () => {
16561
+ const rule = doc.createElement("office-ui-menu-separator");
16562
+ rule.setAttribute(ITEM, "");
16563
+ return rule;
16564
+ };
16565
+ menu2.append(separator());
16566
+ for (const action2 of actions) {
16567
+ if (action2.beginGroup && menu2.lastElementChild?.localName !== "office-ui-menu-separator")
16568
+ menu2.append(separator());
16569
+ const item = doc.createElement("office-ui-menu-item");
16570
+ item.setAttribute(ITEM, action2.row);
16571
+ item.setAttribute("command", `${COMMAND}${action2.row}`);
16572
+ item.setAttribute("label", action2.menu || action2.name || action2.row);
16573
+ if (action2.checked) item.setAttribute("checked", "true");
16574
+ const block = actionBlock(action2, editable3);
16575
+ if (block) {
16576
+ item.setAttribute("disabled", "");
16577
+ item.setAttribute("title", block);
16578
+ }
16579
+ menu2.append(item);
16580
+ }
16581
+ if (listening.has(menu2)) return;
16582
+ listening.add(menu2);
16583
+ menu2.addEventListener("office-command", (event) => {
16584
+ const command2 = event.detail?.command ?? "";
16585
+ if (!command2.startsWith(COMMAND)) return;
16586
+ const owner = selectedShape2(controller);
16587
+ const page3 = controller.state.document?.pages[controller.state.pageIndex];
16588
+ if (!owner || !page3) return;
16589
+ const row = command2.slice(COMMAND.length);
16590
+ const action2 = owner.actions?.find((item) => item.row === row);
16591
+ if (!action2 || actionBlock(action2, canEditDiagram(controller.state))) return;
16592
+ controller.applyEdits([{ type: "run-action", pageId: page3.id, shapeId: owner.id, row }]).then(() => announce(`${action2.menu || "Action"} done.`)).catch((error) => {
16593
+ if (!isEditCancellation(error)) announce(editErrorMessage(error));
16594
+ });
16595
+ });
16596
+ }
15254
16597
 
15255
16598
  // src/visio/viewer-mini-toolbar.ts
15256
16599
  var GAP = 8;
@@ -15823,10 +17166,10 @@ var ViewerPanZoom = class {
15823
17166
  if (!paper || !page3) return;
15824
17167
  const box2 = paper.getBoundingClientRect();
15825
17168
  const port = this.viewport.getBoundingClientRect();
15826
- const scale2 = box2.width / page3.width;
17169
+ const scale3 = box2.width / page3.width;
15827
17170
  this.viewport.scrollBy({
15828
- left: box2.left + x * scale2 - (port.left + port.width / 2),
15829
- top: box2.top + y * scale2 - (port.top + port.height / 2)
17171
+ left: box2.left + x * scale3 - (port.left + port.width / 2),
17172
+ top: box2.top + y * scale3 - (port.top + port.height / 2)
15830
17173
  });
15831
17174
  }
15832
17175
  #schedule() {
@@ -15864,11 +17207,11 @@ var ViewerPanZoom = class {
15864
17207
  const box2 = paper.getBoundingClientRect();
15865
17208
  const port = this.viewport.getBoundingClientRect();
15866
17209
  if (!box2.width || !this.#frame) return;
15867
- const scale2 = page3.width / box2.width;
15868
- const left = Math.max(0, (port.left - box2.left) * scale2);
15869
- const top = Math.max(0, (port.top - box2.top) * scale2);
15870
- const right = Math.min(page3.width, (port.right - box2.left) * scale2);
15871
- const bottom = Math.min(page3.height, (port.bottom - box2.top) * scale2);
17210
+ const scale3 = page3.width / box2.width;
17211
+ const left = Math.max(0, (port.left - box2.left) * scale3);
17212
+ const top = Math.max(0, (port.top - box2.top) * scale3);
17213
+ const right = Math.min(page3.width, (port.right - box2.left) * scale3);
17214
+ const bottom = Math.min(page3.height, (port.bottom - box2.top) * scale3);
15872
17215
  this.#frame.setAttribute("x", String(left));
15873
17216
  this.#frame.setAttribute("y", String(top));
15874
17217
  this.#frame.setAttribute("width", String(Math.max(0, right - left)));
@@ -16299,10 +17642,10 @@ var COLOR = /^#[\da-f]{3,8}$/i;
16299
17642
  var ARROW = "M0 0 L0 14 L3.8 10.6 L6.4 16.6 L8.6 15.6 L6 9.8 L11 9.8 Z";
16300
17643
  function presenceScale(svg2, zoom) {
16301
17644
  const screen = svg2.getScreenCTM?.();
16302
- const scale2 = screen ? Math.hypot(screen.a, screen.b) : 96 * zoom;
16303
- return scale2 > 0 && Number.isFinite(scale2) ? scale2 : 96;
17645
+ const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * zoom;
17646
+ return scale3 > 0 && Number.isFinite(scale3) ? scale3 : 96;
16304
17647
  }
16305
- function renderPresenceOverlay(svg2, page3, peers, scale2) {
17648
+ function renderPresenceOverlay(svg2, page3, peers, scale3) {
16306
17649
  svg2.querySelector(":scope > [data-presence-overlay]")?.remove();
16307
17650
  const here = peers.filter((peer) => peer.page === page3.id);
16308
17651
  if (!here.length) return;
@@ -16340,7 +17683,7 @@ function renderPresenceOverlay(svg2, page3, peers, scale2) {
16340
17683
  const color3 = COLOR.test(peer.userColor) ? peer.userColor : "#2563eb";
16341
17684
  const cursor = create("g");
16342
17685
  cursor.dataset.presenceCursor = String(peer.clientId);
16343
- cursor.setAttribute("transform", `translate(${peer.x} ${peer.y}) scale(${1 / scale2})`);
17686
+ cursor.setAttribute("transform", `translate(${peer.x} ${peer.y}) scale(${1 / scale3})`);
16344
17687
  const arrow = create("path");
16345
17688
  arrow.setAttribute("d", ARROW);
16346
17689
  arrow.setAttribute("fill", color3);
@@ -16779,9 +18122,9 @@ function createRulers(viewport) {
16779
18122
  if (!paper) return;
16780
18123
  const base = viewport.getBoundingClientRect();
16781
18124
  const page3 = paper.getBoundingClientRect();
16782
- const scale2 = String(96 * zoom);
16783
- top.setAttribute("scale", scale2);
16784
- left.setAttribute("scale", scale2);
18125
+ const scale3 = String(96 * zoom);
18126
+ top.setAttribute("scale", scale3);
18127
+ left.setAttribute("scale", scale3);
16785
18128
  top.setAttribute("origin", String(page3.left - base.left + look.originX * 96 * zoom));
16786
18129
  left.setAttribute("origin", String(page3.bottom - base.top - look.originY * 96 * zoom));
16787
18130
  top.setAttribute("density", String(look.densityX));
@@ -17139,7 +18482,7 @@ function routeRibbonAction(targets, action2) {
17139
18482
  return targets.fit(action2.mode === "fit" ? "page" : "width");
17140
18483
  }
17141
18484
  }
17142
- var SVG4 = "http://www.w3.org/2000/svg";
18485
+ var SVG5 = "http://www.w3.org/2000/svg";
17143
18486
  var MARKER_PX = 4;
17144
18487
  var REFUSED = "Connection points can be added to local 2D shapes; groups, lines, connectors and master instances (whose points come from their master) are not edited here.";
17145
18488
  function placedShapes(page3) {
@@ -17194,17 +18537,17 @@ var ViewerConnectionPoints = class {
17194
18537
  this.#overlay = void 0;
17195
18538
  if (!shown || !page3 || !svg2) return;
17196
18539
  const doc = this.viewport.ownerDocument;
17197
- const overlay = doc.createElementNS(SVG4, "g");
18540
+ const overlay = doc.createElementNS(SVG5, "g");
17198
18541
  overlay.dataset.connectionPoints = "";
17199
18542
  overlay.setAttribute("aria-hidden", "true");
17200
- const scale2 = svg2.getScreenCTM?.()?.a || 96 * state.zoom;
17201
- const size = MARKER_PX / scale2;
18543
+ const scale3 = svg2.getScreenCTM?.()?.a || 96 * state.zoom;
18544
+ const size = MARKER_PX / scale3;
17202
18545
  for (const { shape, world } of placedShapes(page3).values()) {
17203
18546
  if (shape.hidden) continue;
17204
18547
  for (const point of shape.connectionPoints ?? []) {
17205
18548
  const x = world[0] * point.x + world[2] * point.y + world[4];
17206
18549
  const y = page3.height - (world[1] * point.x + world[3] * point.y + world[5]);
17207
- const marker = doc.createElementNS(SVG4, "path");
18550
+ const marker = doc.createElementNS(SVG5, "path");
17208
18551
  marker.setAttribute(
17209
18552
  "d",
17210
18553
  `M ${x - size} ${y - size} L ${x + size} ${y + size} M ${x - size} ${y + size} L ${x + size} ${y - size}`
@@ -17281,13 +18624,13 @@ var ViewerConnectionPoints = class {
17281
18624
  void this.#apply(command2, `Connection point added to ${shape.name}.`);
17282
18625
  }
17283
18626
  /** The connection point within a few pixels of `point` (SVG page inches, y down). */
17284
- #pointNear(page3, point, scale2) {
18627
+ #pointNear(page3, point, scale3) {
17285
18628
  let best;
17286
18629
  for (const { shape, world } of placedShapes(page3).values())
17287
18630
  for (const candidate of shape.connectionPoints ?? []) {
17288
18631
  const x = world[0] * candidate.x + world[2] * candidate.y + world[4];
17289
18632
  const y = page3.height - (world[1] * candidate.x + world[3] * candidate.y + world[5]);
17290
- const distance = Math.hypot(x - point.x, y - point.y) * scale2;
18633
+ const distance = Math.hypot(x - point.x, y - point.y) * scale3;
17291
18634
  if (distance <= MARKER_PX + 3 && (!best || distance < best.distance))
17292
18635
  best = { shape, index: candidate.index, inherited: candidate.inherited, distance };
17293
18636
  }
@@ -17687,12 +19030,26 @@ function renderShapeStyleControls(root, shapes, reason, set, page3) {
17687
19030
  set(element, reason);
17688
19031
  element?.setAttribute("checked", String(checked));
17689
19032
  };
17690
- for (const id of ["shadow", "glow", "soft-edges", "reflection"])
19033
+ for (const id of ["shadow", "glow", "soft-edges", "reflection", "bevel", "rotation-3d"])
17691
19034
  set(root.querySelector(`[data-menu="${id}"]`), reason);
17692
19035
  for (const size of VISIO_GLOW_SIZES)
17693
19036
  set(root.querySelector(`[data-menu="glow-size-${size}"]`), reason);
17694
19037
  for (const id of ["shadow-options", "glow-options", "soft-edges-options", "reflection-options"])
17695
19038
  set(root.querySelector(`[command="${id}"]`), reason);
19039
+ const bevel = common(shapes.map((shape) => String(shape.style.bevel?.type ?? 0)));
19040
+ check2(bevelItemId("none"), bevel === "0");
19041
+ for (const preset of VISIO_BEVEL_PRESETS)
19042
+ check2(bevelItemId(preset.id), bevel === String(preset.type));
19043
+ const turn = (shape) => {
19044
+ const r = shape.style.rotation3d;
19045
+ return r ? [r.x, r.y, r.z, r.perspective].map((v) => Math.round(v * 180 / Math.PI)).join() : "0,0,0,0";
19046
+ };
19047
+ const rotation = common(shapes.map(turn));
19048
+ for (const preset of VISIO_ROTATION_PRESETS)
19049
+ check2(
19050
+ rotationItemId(preset.id),
19051
+ rotation === [preset.x, preset.y, preset.z, preset.perspective].join()
19052
+ );
17696
19053
  check2("glow-none", glow2 === "none");
17697
19054
  for (const size of VISIO_GLOW_SIZES)
17698
19055
  for (let accent = 1; accent <= 6; accent++)
@@ -18237,95 +19594,6 @@ var ViewerGrouping = class {
18237
19594
  if (menu2) menu2.disabled = !any;
18238
19595
  }
18239
19596
  };
18240
-
18241
- // src/visio/viewer-insert-dialog.ts
18242
- var InsertDialog = class {
18243
- dialog;
18244
- error;
18245
- fields = /* @__PURE__ */ new Map();
18246
- buttons = /* @__PURE__ */ new Map();
18247
- constructor(root, className, heading, specs, buttons, press) {
18248
- const doc = root.ownerDocument;
18249
- this.dialog = doc.createElement("office-ui-dialog");
18250
- this.dialog.className = className;
18251
- this.dialog.setAttribute("heading", heading);
18252
- for (const spec of specs) {
18253
- const label = doc.createElement("label");
18254
- label.textContent = spec.label;
18255
- const field = doc.createElement(
18256
- spec.choices ? "select" : spec.multiline ? "textarea" : "input"
18257
- );
18258
- field.name = spec.name;
18259
- field.setAttribute("aria-label", spec.label);
18260
- if (field instanceof HTMLTextAreaElement) {
18261
- field.maxLength = spec.maxLength ?? 4096;
18262
- field.rows = 5;
18263
- }
18264
- if (field instanceof HTMLInputElement) {
18265
- field.type = spec.input ?? "text";
18266
- if (spec.input === "number") field.step = "any";
18267
- if (!spec.input) field.maxLength = spec.maxLength ?? 4096;
18268
- if (spec.placeholder) field.placeholder = spec.placeholder;
18269
- field.addEventListener("keydown", (event) => {
18270
- if (event.key !== "Enter") return;
18271
- event.preventDefault();
18272
- press(buttons[0]);
18273
- });
18274
- }
18275
- if (spec.input === "checkbox") label.prepend(field);
18276
- else label.append(field);
18277
- this.fields.set(spec.name, field);
18278
- this.dialog.append(label);
18279
- }
18280
- this.error = doc.createElement("p");
18281
- this.error.setAttribute("role", "alert");
18282
- this.dialog.append(this.error);
18283
- for (const name of buttons) {
18284
- const button = doc.createElement("office-ui-button");
18285
- button.slot = "footer";
18286
- button.setAttribute("label", name);
18287
- button.setAttribute("command", `${className}-${name.toLowerCase().replace(/\s+/g, "-")}`);
18288
- button.addEventListener("office-command", () => {
18289
- if (!button.disabled) press(name);
18290
- });
18291
- this.buttons.set(name, button);
18292
- this.dialog.append(button);
18293
- }
18294
- root.append(this.dialog);
18295
- }
18296
- value(name) {
18297
- return this.fields.get(name)?.value ?? "";
18298
- }
18299
- checked(name) {
18300
- const field = this.fields.get(name);
18301
- return field instanceof HTMLInputElement && field.checked;
18302
- }
18303
- /**
18304
- * Replace a select's choices; the current value is kept as an extra choice when unknown.
18305
- * `labels` names each value; `none: false` drops the leading empty choice.
18306
- */
18307
- choices(name, values, current, options2 = {}) {
18308
- const select = this.fields.get(name);
18309
- if (!(select instanceof HTMLSelectElement)) return;
18310
- const doc = select.ownerDocument;
18311
- const list = options2.none === false ? [...values] : ["", ...values];
18312
- if (!list.includes(current)) list.push(current);
18313
- select.replaceChildren(
18314
- ...list.map((value) => {
18315
- const option = doc.createElement("option");
18316
- option.value = value;
18317
- const index = values.indexOf(value);
18318
- option.textContent = (index >= 0 ? options2.labels?.[index] : void 0) ?? (value || options2.noneLabel || "(none)");
18319
- return option;
18320
- })
18321
- );
18322
- select.value = current;
18323
- }
18324
- busy(value) {
18325
- for (const field of this.fields.values()) field.disabled = value;
18326
- for (const button of this.buttons.values()) button.disabled = value;
18327
- }
18328
- };
18329
19597
  var PREVIEW_WIDTH = 640;
18330
19598
  var NEW_HEIGHT = 400;
18331
19599
  var SCALE = 1.5;
@@ -20954,7 +22222,7 @@ function drawCommentMarkers(svg2, document2, page3, zoom) {
20954
22222
  const create = (name) => svg2.ownerDocument.createElementNS("http://www.w3.org/2000/svg", name);
20955
22223
  const layer = create("g");
20956
22224
  layer.dataset.commentMarkers = "";
20957
- const scale2 = 1 / (96 * zoom);
22225
+ const scale3 = 1 / (96 * zoom);
20958
22226
  for (const thread of threads) {
20959
22227
  let x = 0, y = 0;
20960
22228
  const id = threadShapeId(thread.id);
@@ -20973,7 +22241,7 @@ function drawCommentMarkers(svg2, document2, page3, zoom) {
20973
22241
  const count = thread.comments.length;
20974
22242
  const label = `${count} comment${count === 1 ? "" : "s"}: ${thread.anchorLabel ?? ""}`;
20975
22243
  marker.setAttribute("aria-label", label);
20976
- marker.setAttribute("transform", `translate(${x} ${y}) scale(${scale2})`);
22244
+ marker.setAttribute("transform", `translate(${x} ${y}) scale(${scale3})`);
20977
22245
  const bubble = create("path");
20978
22246
  bubble.setAttribute("d", BUBBLE);
20979
22247
  const text2 = create("text");
@@ -22058,162 +23326,72 @@ var ViewerDiagramParts = class {
22058
23326
  menu2.toggleAttribute("disabled", !enabled);
22059
23327
  menu2.title = enabled ? label : `${label}: ${reason ?? "Open a .vsdx file to change the container."}`;
22060
23328
  }
22061
- const lock = tab?.querySelector('[command="container-lock"]');
22062
- if (lock) {
22063
- lock.disabled = !enabled;
22064
- lock.toggleAttribute("disabled", !enabled);
22065
- lock.setAttribute("checked", String(!!target?.options.locked));
22066
- }
22067
- for (const item of tab?.querySelectorAll('[command^="container-resize-"]') ?? []) {
22068
- const mode = Number(item.getAttribute("command").slice("container-resize-".length));
22069
- item.setAttribute("checked", String(mode === (target?.options.resize ?? 1)));
22070
- }
22071
- CONTAINER_MARGINS.forEach(([, margin], index) => {
22072
- const item = tab?.querySelector(`[command="container-margin-${index}"]`);
22073
- item?.setAttribute(
22074
- "checked",
22075
- String(Math.abs((target?.options.margin ?? 0.25) - margin) < 1e-6)
22076
- );
22077
- });
22078
- }
22079
- };
22080
-
22081
- // src/visio/viewer-picture-format.ts
22082
- function selectedPicture(state) {
22083
- const page3 = state.document?.pages[state.pageIndex];
22084
- const shape = selectedShape(state.document, state.selectedShape, state.pageIndex);
22085
- if (!page3 || state.selectedShapes.length !== 1 || !shape?.image) return void 0;
22086
- return { pageId: page3.id, shapeId: shape.id };
22087
- }
22088
- var ViewerPictureFormat = class {
22089
- constructor(root, controller, edit) {
22090
- this.root = root;
22091
- this.controller = controller;
22092
- this.edit = edit;
22093
- }
22094
- root;
22095
- controller;
22096
- edit;
22097
- reason(state) {
22098
- if (!canEditDiagram(state)) return "Open a .vsdx file to edit a picture.";
22099
- if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
22100
- if (!selectedPicture(state)) return "Select one picture to adjust or crop it.";
22101
- return void 0;
22102
- }
22103
- run(action2) {
22104
- const state = this.controller.state;
22105
- const target = selectedPicture(state);
22106
- if (!target || this.reason(state) !== void 0) return;
22107
- const edit = action2.type === "picture-crop" ? { type: "crop-picture", ...target, crop: action2.crop } : {
22108
- type: "set-picture-adjust",
22109
- ...target,
22110
- ...action2.brightness === void 0 ? {} : { brightness: action2.brightness },
22111
- ...action2.contrast === void 0 ? {} : { contrast: action2.contrast }
22112
- };
22113
- const message = action2.type === "picture-crop" ? action2.crop === "square" ? "Cropped the picture to a square." : "Reset the picture crop." : "Adjusted the picture.";
22114
- this.edit(() => this.controller.applyEdits([edit]), message);
22115
- }
22116
- render(state) {
22117
- const reason = this.reason(state);
22118
- for (const id of ["picture-brightness", "picture-contrast", "picture-crop"]) {
22119
- const menu2 = this.root.querySelector(`[data-menu="${id}"]`);
22120
- if (!menu2) continue;
22121
- menu2.disabled = reason !== void 0;
22122
- menu2.toggleAttribute("disabled", reason !== void 0);
22123
- menu2.title = reason ? `${menu2.getAttribute("label") ?? ""}: ${reason}` : menu2.getAttribute("label") ?? "";
22124
- }
22125
- }
22126
- };
22127
- var DATA_IMPORT_MAX_BYTES = 16 * 1024 * 1024;
22128
- var ACCEPT = ".csv,.txt,.xlsx,.xlsm,.xls";
22129
- async function readWorkbook(file) {
22130
- if (file.size > DATA_IMPORT_MAX_BYTES)
22131
- throw new Error(`${file.name} is larger than the 16 MB import limit.`);
22132
- const { loadWorkbook } = await import('ooxml-core/xlsx/load');
22133
- return loadWorkbook(new Uint8Array(await file.arrayBuffer()), { fileName: file.name });
22134
- }
22135
- function readTable(workbook, options2) {
22136
- const range = options2.range.trim() ? visioParseRange(options2.range) : void 0;
22137
- if (options2.range.trim() && !range) throw new Error("Type a range such as A1:D20.");
22138
- const table = visioDataTable(visioWorkbookGrid(workbook, options2.sheet, range), {
22139
- header: options2.header
22140
- });
22141
- if (!table.rows.length) throw new Error("The selected data has no rows.");
22142
- return table;
22143
- }
22144
- var DataFilePicker = class {
22145
- input;
22146
- #pending;
22147
- constructor(root) {
22148
- this.input = root.ownerDocument.createElement("input");
22149
- this.input.type = "file";
22150
- this.input.accept = ACCEPT;
22151
- this.input.hidden = true;
22152
- this.input.dataset.importData = "";
22153
- this.input.addEventListener("change", () => {
22154
- const file = this.input.files?.[0];
22155
- this.input.value = "";
22156
- this.#settle(file ? { file } : void 0);
22157
- });
22158
- this.input.addEventListener("cancel", () => this.#settle(void 0));
22159
- root.append(this.input);
22160
- }
22161
- #settle(file) {
22162
- const pending = this.#pending;
22163
- this.#pending = void 0;
22164
- pending?.(file);
22165
- }
22166
- async pick() {
22167
- const picker = this.input.ownerDocument.defaultView?.showOpenFilePicker;
22168
- if (typeof picker === "function") {
22169
- try {
22170
- const [handle] = await picker.call(this.input.ownerDocument.defaultView, {
22171
- multiple: false,
22172
- types: [
22173
- {
22174
- description: "Excel workbooks and CSV files",
22175
- accept: {
22176
- "text/csv": [".csv", ".txt"],
22177
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [
22178
- ".xlsx",
22179
- ".xlsm"
22180
- ],
22181
- "application/vnd.ms-excel": [".xls"]
22182
- }
22183
- }
22184
- ]
22185
- });
22186
- return handle ? { file: await handle.getFile(), handle } : void 0;
22187
- } catch (error) {
22188
- if (error instanceof Error && error.name === "AbortError") return void 0;
22189
- }
22190
- }
22191
- this.#settle(void 0);
22192
- return new Promise((resolve) => {
22193
- this.#pending = resolve;
22194
- this.input.click();
23329
+ const lock = tab?.querySelector('[command="container-lock"]');
23330
+ if (lock) {
23331
+ lock.disabled = !enabled;
23332
+ lock.toggleAttribute("disabled", !enabled);
23333
+ lock.setAttribute("checked", String(!!target?.options.locked));
23334
+ }
23335
+ for (const item of tab?.querySelectorAll('[command^="container-resize-"]') ?? []) {
23336
+ const mode = Number(item.getAttribute("command").slice("container-resize-".length));
23337
+ item.setAttribute("checked", String(mode === (target?.options.resize ?? 1)));
23338
+ }
23339
+ CONTAINER_MARGINS.forEach(([, margin], index) => {
23340
+ const item = tab?.querySelector(`[command="container-margin-${index}"]`);
23341
+ item?.setAttribute(
23342
+ "checked",
23343
+ String(Math.abs((target?.options.margin ?? 0.25) - margin) < 1e-6)
23344
+ );
22195
23345
  });
22196
23346
  }
22197
23347
  };
22198
- function createImportDialog(root, press) {
22199
- const dialog = new InsertDialog(
22200
- root,
22201
- "data-import-dialog",
22202
- "Custom Import",
22203
- [
22204
- { name: "name", label: "Recordset name", maxLength: 255 },
22205
- { name: "sheet", label: "Worksheet", choices: true },
22206
- { name: "range", label: "Range (optional)", placeholder: "A1:D20" },
22207
- { name: "key", label: "Unique identifier column (optional)", maxLength: 255 },
22208
- { name: "header", label: "First row of data contains column headings", input: "checkbox" }
22209
- ],
22210
- ["Import", "Cancel"],
22211
- press
22212
- );
22213
- return dialog;
22214
- }
22215
23348
 
22216
- // src/visio/viewer-data-sources.ts
23349
+ // src/visio/viewer-picture-format.ts
23350
+ function selectedPicture(state) {
23351
+ const page3 = state.document?.pages[state.pageIndex];
23352
+ const shape = selectedShape(state.document, state.selectedShape, state.pageIndex);
23353
+ if (!page3 || state.selectedShapes.length !== 1 || !shape?.image) return void 0;
23354
+ return { pageId: page3.id, shapeId: shape.id };
23355
+ }
23356
+ var ViewerPictureFormat = class {
23357
+ constructor(root, controller, edit) {
23358
+ this.root = root;
23359
+ this.controller = controller;
23360
+ this.edit = edit;
23361
+ }
23362
+ root;
23363
+ controller;
23364
+ edit;
23365
+ reason(state) {
23366
+ if (!canEditDiagram(state)) return "Open a .vsdx file to edit a picture.";
23367
+ if (state.loading || state.edit.busy) return "Wait for the current operation to finish.";
23368
+ if (!selectedPicture(state)) return "Select one picture to adjust or crop it.";
23369
+ return void 0;
23370
+ }
23371
+ run(action2) {
23372
+ const state = this.controller.state;
23373
+ const target = selectedPicture(state);
23374
+ if (!target || this.reason(state) !== void 0) return;
23375
+ const edit = action2.type === "picture-crop" ? { type: "crop-picture", ...target, crop: action2.crop } : {
23376
+ type: "set-picture-adjust",
23377
+ ...target,
23378
+ ...action2.brightness === void 0 ? {} : { brightness: action2.brightness },
23379
+ ...action2.contrast === void 0 ? {} : { contrast: action2.contrast }
23380
+ };
23381
+ const message = action2.type === "picture-crop" ? action2.crop === "square" ? "Cropped the picture to a square." : "Reset the picture crop." : "Adjusted the picture.";
23382
+ this.edit(() => this.controller.applyEdits([edit]), message);
23383
+ }
23384
+ render(state) {
23385
+ const reason = this.reason(state);
23386
+ for (const id of ["picture-brightness", "picture-contrast", "picture-crop"]) {
23387
+ const menu2 = this.root.querySelector(`[data-menu="${id}"]`);
23388
+ if (!menu2) continue;
23389
+ menu2.disabled = reason !== void 0;
23390
+ menu2.toggleAttribute("disabled", reason !== void 0);
23391
+ menu2.title = reason ? `${menu2.getAttribute("label") ?? ""}: ${reason}` : menu2.getAttribute("label") ?? "";
23392
+ }
23393
+ }
23394
+ };
22217
23395
  var ViewerDataSources = class {
22218
23396
  constructor(root, controller, announce, run, links) {
22219
23397
  this.controller = controller;
@@ -22298,7 +23476,7 @@ var ViewerDataSources = class {
22298
23476
  );
22299
23477
  }
22300
23478
  const column = key ? table.columns.find((item) => item.name === key || item.label === key) : void 0;
22301
- const csv = /\.(csv|txt)$/i.test(picked.file.name);
23479
+ const csv2 = /\.(csv|txt)$/i.test(picked.file.name);
22302
23480
  const range = options2.range.trim().toUpperCase();
22303
23481
  const before = new Set(
22304
23482
  (this.controller.state.document?.dataRecordsets ?? []).map((set) => set.id)
@@ -22312,9 +23490,9 @@ var ViewerDataSources = class {
22312
23490
  ...table,
22313
23491
  // Saved as the recordset's data connection, command and primary key.
22314
23492
  source: {
22315
- kind: csv ? "csv" : "workbook",
23493
+ kind: csv2 ? "csv" : "workbook",
22316
23494
  fileName: picked.file.name,
22317
- ...csv ? {} : { sheet: workbook.sheets[options2.sheet]?.name ?? "Sheet1" },
23495
+ ...csv2 ? {} : { sheet: workbook.sheets[options2.sheet]?.name ?? "Sheet1" },
22318
23496
  ...range ? { range } : {}
22319
23497
  },
22320
23498
  ...column ? { primaryKey: column.name } : {}
@@ -22942,7 +24120,10 @@ var ViewerShapeData = class {
22942
24120
  ...this.form.checked("hidden") ? { invisible: true } : {}
22943
24121
  };
22944
24122
  try {
22945
- await this.controller.applyEdits([{ type: "set-shape-data", ...target, row, data }]);
24123
+ const state = this.controller.state;
24124
+ const page3 = state.document?.pages[state.pageIndex];
24125
+ const edit = { type: "set-shape-data", ...target, row, data };
24126
+ await this.controller.applyEdits(page3 ? visioOrgFollowData(page3, [edit]) : [edit]);
22946
24127
  this.form.dialog.close();
22947
24128
  this.announce(data ? `Saved Shape Data ${label}.` : `Deleted Shape Data ${existing}.`);
22948
24129
  } catch (error) {
@@ -22966,9 +24147,113 @@ var ViewerShapeData = class {
22966
24147
  this.form.busy(state.edit.busy);
22967
24148
  }
22968
24149
  };
24150
+ var fieldsOf = (shape) => (shape.shapeData ?? []).filter((row) => !row.invisible && !row.name.startsWith("_"));
24151
+ var ViewerGraphicFields = class {
24152
+ constructor(root, controller, run) {
24153
+ this.controller = controller;
24154
+ this.run = run;
24155
+ const doc = root.ownerDocument;
24156
+ this.pane = doc.createElement("office-ui-task-pane");
24157
+ this.pane.className = "graphic-fields";
24158
+ this.pane.hidden = true;
24159
+ this.pane.setAttribute("label", "Data Graphic Fields");
24160
+ this.pane.setAttribute("close-label", "Close Data Graphic Fields");
24161
+ this.#hint = doc.createElement("p");
24162
+ this.#hint.className = "graphic-fields-hint";
24163
+ this.#list = doc.createElement("div");
24164
+ this.#list.className = "graphic-fields-list";
24165
+ this.#list.setAttribute("role", "group");
24166
+ this.#list.setAttribute("aria-label", "Fields to show as text");
24167
+ this.pane.append(this.#hint, this.#list);
24168
+ this.pane.addEventListener("office-pane-close", () => this.toggle(false));
24169
+ (root.querySelector(".workspace") ?? root).append(this.pane);
24170
+ this.#list.addEventListener("change", (event) => {
24171
+ const box2 = event.target;
24172
+ if (box2.dataset.field !== void 0) this.#toggle(box2.dataset.field, box2.checked);
24173
+ });
24174
+ }
24175
+ controller;
24176
+ run;
24177
+ pane;
24178
+ #list;
24179
+ #hint;
24180
+ #signature = "";
24181
+ toggle(open = this.pane.hidden) {
24182
+ this.pane.hidden = !open;
24183
+ this.#signature = "";
24184
+ this.render(this.controller.state);
24185
+ }
24186
+ #page(state) {
24187
+ return state.document?.pages[state.pageIndex];
24188
+ }
24189
+ #targets(state, page3) {
24190
+ const ids = new Set(state.selectedShapes.map((shape) => shape.id));
24191
+ return page3.shapes.filter((shape) => ids.has(shape.id));
24192
+ }
24193
+ #toggle(field, on) {
24194
+ const state = this.controller.state;
24195
+ const page3 = this.#page(state);
24196
+ if (!page3 || !canEditDiagram(state)) return;
24197
+ const owners = this.#targets(state, page3).filter(
24198
+ (shape) => fieldsOf(shape).some((row) => row.name === field)
24199
+ );
24200
+ const ids = owners.map((shape) => shape.id);
24201
+ const item = { kind: "text", field };
24202
+ const edits = on ? visioSetDataGraphicItemEdits(page3, ids, item) : visioDeleteDataGraphicItemEdits(page3, ids, item);
24203
+ if (edits.length)
24204
+ this.run(
24205
+ () => this.controller.applyEdits(edits),
24206
+ on ? `Showing ${field} on the selection.` : `Hid ${field} on the selection.`
24207
+ );
24208
+ }
24209
+ render(state) {
24210
+ const box2 = this.pane.getRootNode();
24211
+ const check2 = box2.querySelector(
24212
+ '[data-check="data-graphic-fields"]'
24213
+ );
24214
+ if (check2) {
24215
+ check2.checked = !this.pane.hidden;
24216
+ check2.disabled = !state.document;
24217
+ }
24218
+ if (this.pane.hidden) return;
24219
+ const page3 = this.#page(state);
24220
+ const editable3 = canEditDiagram(state) && !state.loading && !state.edit.busy;
24221
+ const owners = page3 ? this.#targets(state, page3) : [];
24222
+ const first = owners[0];
24223
+ const rows = first ? fieldsOf(first) : [];
24224
+ const on = new Set(
24225
+ first && page3 ? visioDataGraphicItems(page3, first.id).filter((item) => item.kind === "text").map((item) => item.field) : []
24226
+ );
24227
+ const signature = JSON.stringify([
24228
+ first?.id,
24229
+ editable3,
24230
+ rows.map((row) => [row.name, row.label, row.value, on.has(row.name)])
24231
+ ]);
24232
+ if (signature === this.#signature) return;
24233
+ this.#signature = signature;
24234
+ this.#hint.textContent = !first ? "Select a shape to choose which of its data fields show as text." : rows.length ? `Fields of ${first.text.plainText || `shape ${first.id}`}. Checked fields show as text on the shape.` : "The selected shape has no Shape Data fields. Link data or define Shape Data first.";
24235
+ const doc = this.pane.ownerDocument;
24236
+ this.#list.replaceChildren(
24237
+ ...rows.map((row) => {
24238
+ const label = doc.createElement("label");
24239
+ const input = doc.createElement("input");
24240
+ input.type = "checkbox";
24241
+ input.dataset.field = row.name;
24242
+ input.checked = on.has(row.name);
24243
+ input.disabled = !editable3;
24244
+ const name = doc.createElement("span");
24245
+ name.textContent = row.label || row.name;
24246
+ const value = doc.createElement("small");
24247
+ value.textContent = String(row.value ?? row.rawValue ?? "");
24248
+ label.append(input, name, value);
24249
+ return label;
24250
+ })
24251
+ );
24252
+ }
24253
+ };
22969
24254
 
22970
- // src/visio/viewer-data.ts
22971
- var KINDS = {
24255
+ // src/visio/viewer-data-labels.ts
24256
+ var GRAPHIC_KINDS = {
22972
24257
  "graphic-text": "text",
22973
24258
  "graphic-bar": "bar",
22974
24259
  "graphic-icon": "icon",
@@ -22985,6 +24270,213 @@ var POSITION_LABELS = [
22985
24270
  "Bottom center",
22986
24271
  "Bottom right"
22987
24272
  ];
24273
+ var kindLabel = (kind) => KIND_LABELS[Object.values(GRAPHIC_KINDS).indexOf(kind)] ?? kind;
24274
+ var itemLabel = (item, fieldLabel) => `${kindLabel(item.kind)}: ${fieldLabel}${item.position ? ` (${item.position.replace("-", " ")})` : ""}`;
24275
+
24276
+ // src/visio/viewer-data-advanced.ts
24277
+ var ViewerAdvancedGraphics = class {
24278
+ constructor(root, controller, announce, run, targets) {
24279
+ this.controller = controller;
24280
+ this.announce = announce;
24281
+ this.run = run;
24282
+ this.targets = targets;
24283
+ this.dialog = new InsertDialog(
24284
+ root,
24285
+ "data-graphic-items-dialog",
24286
+ "Edit Data Graphic",
24287
+ [{ name: "items", label: "Items in this data graphic", choices: true }],
24288
+ ["New Item", "Edit Item", "Delete Item", "Close"],
24289
+ (button) => this.#press(button)
24290
+ );
24291
+ const list = this.dialog.fields.get("items");
24292
+ list.size = 6;
24293
+ list.addEventListener("change", () => this.#sync());
24294
+ list.addEventListener("dblclick", () => this.#press("Edit Item"));
24295
+ }
24296
+ controller;
24297
+ announce;
24298
+ run;
24299
+ targets;
24300
+ dialog;
24301
+ #items = [];
24302
+ /** Opens the item form, empty for a new item. */
24303
+ onEdit = () => {
24304
+ };
24305
+ #page() {
24306
+ const state = this.controller.state;
24307
+ return state.document?.pages[state.pageIndex];
24308
+ }
24309
+ /** The shape whose items are listed: the first selected top-level shape. */
24310
+ #owner(page3) {
24311
+ return this.targets(page3).find((id) => page3.shapes.some((shape) => shape.id === id));
24312
+ }
24313
+ open() {
24314
+ const page3 = this.#page();
24315
+ if (!page3 || !canEditDiagram(this.controller.state)) return;
24316
+ const selected = this.controller.state.selectedShapes.some(
24317
+ (shape) => page3.shapes.some((item) => item.id === shape.id)
24318
+ );
24319
+ if (!selected) return this.announce("Select a shape to edit its data graphic.");
24320
+ if (!visioDataGraphicFields(page3).length)
24321
+ return this.announce(
24322
+ "Link or define Shape Data first; data graphics display Shape Data fields."
24323
+ );
24324
+ this.refresh();
24325
+ this.dialog.error.textContent = "";
24326
+ this.dialog.dialog.show();
24327
+ this.dialog.fields.get("items").focus();
24328
+ }
24329
+ /** Rebuild the list from the drawing, keeping the selected item when it is still there. */
24330
+ refresh() {
24331
+ const page3 = this.#page();
24332
+ const owner = page3 && this.#owner(page3);
24333
+ this.#items = page3 && owner ? visioDataGraphicItems(page3, owner) : [];
24334
+ const fields2 = page3 ? visioDataGraphicFields(page3) : [];
24335
+ const labelOf = (name) => fields2.find((field) => field.name === name)?.label ?? name;
24336
+ const select = this.dialog.fields.get("items");
24337
+ const previous = select.value;
24338
+ this.dialog.choices(
24339
+ "items",
24340
+ this.#items.map((_, index) => String(index)),
24341
+ Number(previous) < this.#items.length ? previous || "0" : "0",
24342
+ {
24343
+ labels: this.#items.map((item) => itemLabel(item, labelOf(item.field))),
24344
+ none: false,
24345
+ noneLabel: "No items yet. Choose New Item."
24346
+ }
24347
+ );
24348
+ if (!this.#items.length) select.replaceChildren();
24349
+ this.#sync();
24350
+ }
24351
+ #selected() {
24352
+ return this.#items[Number(this.dialog.fields.get("items").value)];
24353
+ }
24354
+ #sync() {
24355
+ const has = !!this.#selected();
24356
+ for (const name of ["Edit Item", "Delete Item"]) this.dialog.buttons.get(name).disabled = !has;
24357
+ }
24358
+ #press(button) {
24359
+ if (button === "Close") return this.dialog.dialog.close();
24360
+ const page3 = this.#page();
24361
+ if (!page3) return;
24362
+ if (button === "New Item") return this.onEdit(void 0);
24363
+ const item = this.#selected();
24364
+ if (!item) return;
24365
+ if (button === "Edit Item") return this.onEdit(item);
24366
+ const edits = visioDeleteDataGraphicItemEdits(page3, this.targets(page3), item);
24367
+ this.run(async () => {
24368
+ await this.controller.applyEdits(edits);
24369
+ this.refresh();
24370
+ }, "Deleted the item from the data graphic.");
24371
+ }
24372
+ };
24373
+ var SAMPLE2 = [
24374
+ ["1", "Receive order", "2", "", "Start", "Sales"],
24375
+ ["2", "Check stock", "3,4", "Yes,No", "Decision", "Warehouse"],
24376
+ ["3", "Ship order", "5", "", "Process", "Warehouse"],
24377
+ ["4", "Back order", "5", "", "Process", "Sales"],
24378
+ ["5", "Order complete", "", "", "End", "Sales"]
24379
+ ];
24380
+ var csv = (row) => row.map((cell) => `"${cell.replace(/"/g, '""')}"`).join(",");
24381
+ var ViewerDataVisualizer = class {
24382
+ constructor(controller, announce, run, picker) {
24383
+ this.controller = controller;
24384
+ this.announce = announce;
24385
+ this.run = run;
24386
+ this.picker = picker;
24387
+ }
24388
+ controller;
24389
+ announce;
24390
+ run;
24391
+ picker;
24392
+ #handle;
24393
+ #page() {
24394
+ const state = this.controller.state;
24395
+ return state.document?.pages[state.pageIndex];
24396
+ }
24397
+ /** Whether this page already holds a flowchart this command drew. */
24398
+ drawn(page3) {
24399
+ return !!page3 && visioVisualizerShapes(page3).steps.size > 0;
24400
+ }
24401
+ /** The kind of diagram a refresh redraws: the page's swimlanes decide. */
24402
+ #variantOf(page3) {
24403
+ return page3.shapes.some(
24404
+ (shape) => shape.structure?.type === "container" && shape.structure.swimlane?.role === "frame"
24405
+ ) ? "cross-functional" : "basic";
24406
+ }
24407
+ async create(variant) {
24408
+ const picked = await this.picker.pick();
24409
+ if (!picked) return;
24410
+ this.#handle = picked.handle;
24411
+ await this.#draw(picked.file, variant);
24412
+ }
24413
+ async refresh() {
24414
+ const page3 = this.#page();
24415
+ if (!page3 || !this.drawn(page3))
24416
+ return this.announce("Create a flowchart from a table first; Refresh Diagram redraws it.");
24417
+ let file;
24418
+ try {
24419
+ file = await this.#handle?.getFile();
24420
+ } catch {
24421
+ file = void 0;
24422
+ }
24423
+ if (!file) {
24424
+ this.announce(
24425
+ "Choose the edited table again; this browser cannot re-read the original file."
24426
+ );
24427
+ const picked = await this.picker.pick();
24428
+ if (!picked) return;
24429
+ this.#handle = picked.handle;
24430
+ file = picked.file;
24431
+ }
24432
+ await this.#draw(file, this.#variantOf(page3), true);
24433
+ }
24434
+ async #draw(file, variant, refreshing = false) {
24435
+ const page3 = this.#page();
24436
+ if (!page3 || !canEditDiagram(this.controller.state)) return;
24437
+ let plan;
24438
+ let warnings;
24439
+ try {
24440
+ const table = readTable(await readWorkbook(file), { sheet: 0, range: "", header: true });
24441
+ const parsed = visioParseVisualizerTable(table);
24442
+ warnings = parsed.warnings;
24443
+ plan = visioDataVisualizerEdits(page3, parsed.steps, variant);
24444
+ this.#count = parsed.steps.length;
24445
+ } catch (error) {
24446
+ return this.announce(
24447
+ `${file.name} cannot be drawn: ${error instanceof Error ? error.message : String(error)}`
24448
+ );
24449
+ }
24450
+ const { batches, notes } = plan;
24451
+ const extra = [...warnings, ...notes];
24452
+ this.run(
24453
+ async () => {
24454
+ for (const batch of batches)
24455
+ try {
24456
+ await this.controller.applyEdits(batch);
24457
+ } catch (error) {
24458
+ if (!batch.every((edit) => edit.type === "set-page-size")) throw error;
24459
+ }
24460
+ },
24461
+ `${refreshing ? "Redrew" : "Drew"} ${this.#count} process steps from ${file.name}.${extra.length ? ` ${extra.join(" ")}` : ""}`
24462
+ );
24463
+ }
24464
+ #count = 0;
24465
+ /** A CSV with the expected columns and a small example, for the person to edit. */
24466
+ downloadTemplate() {
24467
+ const doc = document;
24468
+ const text2 = [VISIO_VISUALIZER_COLUMNS, ...SAMPLE2].map((row) => csv(row)).join("\r\n");
24469
+ const url = URL.createObjectURL(new Blob([text2], { type: "text/csv" }));
24470
+ const link2 = doc.createElement("a");
24471
+ link2.href = url;
24472
+ link2.download = "data-visualizer-flowchart.csv";
24473
+ link2.click();
24474
+ setTimeout(() => URL.revokeObjectURL(url), 1e3);
24475
+ this.announce("Saved a table template with the Data Visualizer columns.");
24476
+ }
24477
+ };
24478
+
24479
+ // src/visio/viewer-data.ts
22988
24480
  var POSITION_PREFIX = "graphic-position-";
22989
24481
  var ViewerData = class {
22990
24482
  constructor(root, controller, announce, run) {
@@ -23006,7 +24498,7 @@ var ViewerData = class {
23006
24498
  ["Apply", "Cancel"],
23007
24499
  (button) => this.#applyGraphic(button)
23008
24500
  );
23009
- this.graphics.choices("kind", Object.values(KINDS), "text", {
24501
+ this.graphics.choices("kind", Object.values(GRAPHIC_KINDS), "text", {
23010
24502
  labels: KIND_LABELS,
23011
24503
  none: false
23012
24504
  });
@@ -23019,6 +24511,16 @@ var ViewerData = class {
23019
24511
  this.sources = new ViewerDataSources(root, controller, announce, run, this.links);
23020
24512
  this.links.onRefresh = () => void this.sources.refresh();
23021
24513
  this.shapeData = new ViewerShapeData(root, controller, announce);
24514
+ this.fields = new ViewerGraphicFields(root, controller, run);
24515
+ this.visualizer = new ViewerDataVisualizer(controller, announce, run, this.sources.picker);
24516
+ this.advanced = new ViewerAdvancedGraphics(
24517
+ root,
24518
+ controller,
24519
+ announce,
24520
+ run,
24521
+ (page3) => this.#targets(page3)
24522
+ );
24523
+ this.advanced.onEdit = (item) => this.#editItem(item);
23022
24524
  }
23023
24525
  root;
23024
24526
  controller;
@@ -23028,6 +24530,32 @@ var ViewerData = class {
23028
24530
  graphics;
23029
24531
  links;
23030
24532
  shapeData;
24533
+ fields;
24534
+ advanced;
24535
+ visualizer;
24536
+ /** Set while the item form edits one item of Advanced Data Graphics (undefined replacing: new). */
24537
+ #item;
24538
+ /** Open the graphics form for one Advanced Data Graphics item, or a new one. */
24539
+ #editItem(item) {
24540
+ const page3 = this.#page();
24541
+ if (!page3) return;
24542
+ const fields2 = visioDataGraphicFields(page3);
24543
+ this.graphics.choices(
24544
+ "field",
24545
+ fields2.map((field) => field.name),
24546
+ item?.field ?? fields2[0].name,
24547
+ { labels: fields2.map((field) => field.label), none: false }
24548
+ );
24549
+ this.graphics.fields.get("kind").value = item?.kind ?? "text";
24550
+ this.graphics.fields.get("position").value = item?.position ?? "";
24551
+ this.graphics.fields.get("min").value = String(item?.min ?? "");
24552
+ this.graphics.fields.get("max").value = String(item?.max ?? "");
24553
+ this.graphics.error.textContent = "";
24554
+ this.#item = { replacing: item };
24555
+ this.advanced.dialog.dialog.close();
24556
+ this.graphics.dialog.show();
24557
+ this.graphics.fields.get("field").focus();
24558
+ }
23031
24559
  #editable(state) {
23032
24560
  return canEditDiagram(state) && !state.loading && !state.edit.busy;
23033
24561
  }
@@ -23043,8 +24571,17 @@ var ViewerData = class {
23043
24571
  handle(command2) {
23044
24572
  const state = this.controller.state;
23045
24573
  if (command2 === "external-data-window") return this.links.toggle();
24574
+ if (command2 === "graphic-fields") return this.fields.toggle();
24575
+ this.#item = void 0;
23046
24576
  if (!this.#editable(state)) return;
23047
24577
  if (command2 === "define-shape-data") return this.shapeData.open();
24578
+ if (command2 === "graphic-advanced") return this.advanced.open();
24579
+ if (command2 === "visualizer-template") return this.visualizer.downloadTemplate();
24580
+ if (command2 === "visualizer-refresh") return void this.visualizer.refresh();
24581
+ if (command2.startsWith("visualizer-"))
24582
+ return void this.visualizer.create(
24583
+ command2 === "visualizer-basic" ? "basic" : "cross-functional"
24584
+ );
23048
24585
  if (command2 === "link-data") {
23049
24586
  this.links.show();
23050
24587
  if (!state.document?.dataRecordsets?.length) void this.sources.import(false);
@@ -23077,7 +24614,7 @@ var ViewerData = class {
23077
24614
  fields2[0].name,
23078
24615
  { labels: fields2.map((field) => field.label), none: false }
23079
24616
  );
23080
- this.graphics.fields.get("kind").value = KINDS[command2] ?? "text";
24617
+ this.graphics.fields.get("kind").value = GRAPHIC_KINDS[command2] ?? "text";
23081
24618
  for (const name of ["min", "max"])
23082
24619
  this.graphics.fields.get(name).value = "";
23083
24620
  this.graphics.fields.get("position").value = "";
@@ -23119,7 +24656,11 @@ var ViewerData = class {
23119
24656
  );
23120
24657
  }
23121
24658
  #applyGraphic(button) {
23122
- if (button === "Cancel") return this.graphics.dialog.close();
24659
+ if (button === "Cancel") {
24660
+ this.graphics.dialog.close();
24661
+ if (this.#item) this.advanced.dialog.dialog.show();
24662
+ return;
24663
+ }
23123
24664
  const page3 = this.#page();
23124
24665
  if (!page3) return;
23125
24666
  const number3 = (name) => {
@@ -23131,6 +24672,7 @@ var ViewerData = class {
23131
24672
  return void (this.graphics.error.textContent = "Type numbers for the minimum and maximum.");
23132
24673
  const kind = this.graphics.value("kind");
23133
24674
  const position = this.graphics.value("position");
24675
+ if (this.#item) return this.#applyItem(page3, kind, position, min, max);
23134
24676
  const edits = visioDataGraphicEdits(page3, this.#targets(page3), {
23135
24677
  kind,
23136
24678
  ...position && kind !== "color" ? { position } : {},
@@ -23141,9 +24683,33 @@ var ViewerData = class {
23141
24683
  if (!edits.length)
23142
24684
  return void (this.graphics.error.textContent = "No shapes have a usable value for this field.");
23143
24685
  this.graphics.dialog.close();
24686
+ this.run(() => this.controller.applyEdits(edits), `Applied ${kindLabel(kind)} data graphics.`);
24687
+ }
24688
+ /** The item form of Advanced Data Graphics: add the item, or change the one being edited. */
24689
+ #applyItem(page3, kind, position, min, max) {
24690
+ const replacing = this.#item?.replacing;
24691
+ const edits = visioSetDataGraphicItemEdits(
24692
+ page3,
24693
+ this.#targets(page3),
24694
+ {
24695
+ kind,
24696
+ field: this.graphics.value("field"),
24697
+ ...position && kind !== "color" ? { position } : {},
24698
+ ...min === void 0 ? {} : { min },
24699
+ ...max === void 0 ? {} : { max }
24700
+ },
24701
+ replacing
24702
+ );
24703
+ if (!edits.length)
24704
+ return void (this.graphics.error.textContent = "No shapes have a usable value for this field.");
24705
+ this.graphics.dialog.close();
23144
24706
  this.run(
23145
- () => this.controller.applyEdits(edits),
23146
- `Applied ${KIND_LABELS[Object.values(KINDS).indexOf(kind)]} data graphics.`
24707
+ async () => {
24708
+ await this.controller.applyEdits(edits);
24709
+ this.advanced.refresh();
24710
+ this.advanced.dialog.dialog.show();
24711
+ },
24712
+ replacing ? "Changed the data graphic item." : "Added the item to the data graphic."
23147
24713
  );
23148
24714
  }
23149
24715
  #legend(page3, orientation) {
@@ -23179,10 +24745,34 @@ var ViewerData = class {
23179
24745
  return () => {
23180
24746
  events.abort();
23181
24747
  disposeLinks();
23182
- for (const dialog of [this.sources.importer, this.graphics, this.shapeData.form])
24748
+ for (const dialog of [
24749
+ this.sources.importer,
24750
+ this.graphics,
24751
+ this.advanced.dialog,
24752
+ this.shapeData.form
24753
+ ])
23183
24754
  dialog.dialog.close();
23184
24755
  };
23185
24756
  }
24757
+ #renderVisualizer(state, editing) {
24758
+ const page3 = state.document?.pages[state.pageIndex];
24759
+ const set = (name, enabled, title2) => {
24760
+ const control = this.root.querySelector(`[command="${name}"]`);
24761
+ if (!control) return;
24762
+ control.disabled = !enabled;
24763
+ if (title2) control.title = title2;
24764
+ };
24765
+ for (const id of ["visualizer-basic", "visualizer-cross-functional"])
24766
+ set(id, editing && !!page3);
24767
+ set(
24768
+ "visualizer-refresh",
24769
+ editing && this.visualizer.drawn(page3),
24770
+ "Redraw the diagram from the edited table."
24771
+ );
24772
+ const menu2 = this.root.querySelector('[data-menu="data-visualizer"]');
24773
+ if (menu2) menu2.disabled = !editing || !page3;
24774
+ set("advanced-data-graphics", editing && !!page3 && visioDataGraphicFields(page3).length > 0);
24775
+ }
23186
24776
  render(state) {
23187
24777
  const editing = this.#editable(state);
23188
24778
  const page3 = state.document?.pages[state.pageIndex];
@@ -23241,13 +24831,15 @@ var ViewerData = class {
23241
24831
  }
23242
24832
  this.links.render(state);
23243
24833
  this.shapeData.render(state);
23244
- for (const dialog of [this.sources.importer, this.graphics])
24834
+ this.fields.render(state);
24835
+ this.#renderVisualizer(state, editing);
24836
+ for (const dialog of [this.sources.importer, this.graphics, this.advanced.dialog])
23245
24837
  if (dialog.dialog.open && (!canEditDiagram(state) || state.loading)) dialog.dialog.close();
23246
24838
  }
23247
24839
  };
23248
24840
 
23249
24841
  // src/visio/viewer-auto-connect-parts.ts
23250
- var SVG5 = "http://www.w3.org/2000/svg";
24842
+ var SVG6 = "http://www.w3.org/2000/svg";
23251
24843
  var ARROWS = {
23252
24844
  up: "M8 2.5 14 12H2Z",
23253
24845
  right: "M13.5 8 4 14V2Z",
@@ -23255,10 +24847,10 @@ var ARROWS = {
23255
24847
  left: "M2.5 8 12 2v12Z"
23256
24848
  };
23257
24849
  function icon3(doc, viewBox, d) {
23258
- const svg2 = doc.createElementNS(SVG5, "svg");
24850
+ const svg2 = doc.createElementNS(SVG6, "svg");
23259
24851
  svg2.setAttribute("viewBox", viewBox);
23260
24852
  svg2.setAttribute("aria-hidden", "true");
23261
- const path = doc.createElementNS(SVG5, "path");
24853
+ const path = doc.createElementNS(SVG6, "path");
23262
24854
  path.setAttribute("d", d);
23263
24855
  svg2.append(path);
23264
24856
  return svg2;
@@ -23361,15 +24953,15 @@ var ViewerAutoConnect = class {
23361
24953
  }
23362
24954
  const bounds2 = this.host.viewport.getBoundingClientRect();
23363
24955
  const matrix2 = svg2.getScreenCTM?.();
23364
- const scale2 = matrix2?.a || 96 * (state.zoom || 1);
24956
+ const scale3 = matrix2?.a || 96 * (state.zoom || 1);
23365
24957
  const paper = svg2.getBoundingClientRect();
23366
24958
  const place = (point) => {
23367
- const screen = matrix2 ? new DOMPoint(point.x, point.y).matrixTransform(matrix2) : { x: paper.left + point.x * scale2, y: paper.top + point.y * scale2 };
24959
+ const screen = matrix2 ? new DOMPoint(point.x, point.y).matrixTransform(matrix2) : { x: paper.left + point.x * scale3, y: paper.top + point.y * scale3 };
23368
24960
  return { x: screen.x - bounds2.left, y: screen.y - bounds2.top };
23369
24961
  };
23370
24962
  const selected = state.selectedShapes.length === 1 && state.selectedShape?.id === shape.id && visioSelectionIsOnPage(state.selectedShape, page3.id);
23371
- const arrows = visioAutoConnectArrows(page3, shape, OFFSET / scale2).map((arrow) => {
23372
- const lift = arrow.direction === "up" && selected ? (SELECTED_TOP_OFFSET - OFFSET) / scale2 : 0;
24963
+ const arrows = visioAutoConnectArrows(page3, shape, OFFSET / scale3).map((arrow) => {
24964
+ const lift = arrow.direction === "up" && selected ? (SELECTED_TOP_OFFSET - OFFSET) / scale3 : 0;
23373
24965
  return { direction: arrow.direction, ...place({ x: arrow.x, y: arrow.y - lift }) };
23374
24966
  });
23375
24967
  const masters = this.#arrow ? this.#quickShapes(state) : [];
@@ -23464,8 +25056,8 @@ var ViewerAutoConnect = class {
23464
25056
  const box2 = shape && visioShapePageBox(page3, shape);
23465
25057
  const point = svg2 && pagePoint(svg2, page3, event, { snap: false, bounded: false });
23466
25058
  if (!box2 || !point || !svg2) return false;
23467
- const scale2 = svg2.getScreenCTM?.()?.a || 96 * (state.zoom || 1);
23468
- const margin = (SELECTED_TOP_OFFSET + KEEP) / scale2;
25059
+ const scale3 = svg2.getScreenCTM?.()?.a || 96 * (state.zoom || 1);
25060
+ const margin = (SELECTED_TOP_OFFSET + KEEP) / scale3;
23469
25061
  return point.x >= box2.x - margin && point.x <= box2.x + box2.width + margin && point.y >= box2.y - margin && point.y <= box2.y + box2.height + margin;
23470
25062
  }
23471
25063
  wire() {
@@ -23686,7 +25278,7 @@ var ViewerExplorer = class {
23686
25278
  this.#tree.replaceChildren(...children);
23687
25279
  }
23688
25280
  };
23689
- var SVG6 = "http://www.w3.org/2000/svg";
25281
+ var SVG7 = "http://www.w3.org/2000/svg";
23690
25282
  var SNAP_PIXELS = 8;
23691
25283
  var ViewerGuides = class {
23692
25284
  constructor(root, viewport, rulers, controller, announce) {
@@ -23772,12 +25364,12 @@ var ViewerGuides = class {
23772
25364
  const svg2 = this.#svg();
23773
25365
  this.clearHints();
23774
25366
  if (!svg2 || !(lines.length || matches.length)) return;
23775
- const hints = svg2.ownerDocument.createElementNS(SVG6, "g");
25367
+ const hints = svg2.ownerDocument.createElementNS(SVG7, "g");
23776
25368
  hints.dataset.snapHints = "";
23777
25369
  hints.setAttribute("aria-hidden", "true");
23778
25370
  hints.style.pointerEvents = "none";
23779
25371
  for (const line of lines) {
23780
- const element = svg2.ownerDocument.createElementNS(SVG6, "line");
25372
+ const element = svg2.ownerDocument.createElementNS(SVG7, "line");
23781
25373
  const clamp = (value, size) => Math.max(-size, Math.min(2 * size, value));
23782
25374
  const { height, width } = page3;
23783
25375
  const vertical2 = line.axis === "x";
@@ -23790,7 +25382,7 @@ var ViewerGuides = class {
23790
25382
  hints.append(element);
23791
25383
  }
23792
25384
  for (const match of matches) {
23793
- const element = svg2.ownerDocument.createElementNS(SVG6, "rect");
25385
+ const element = svg2.ownerDocument.createElementNS(SVG7, "rect");
23794
25386
  element.dataset.sizeMatch = match.axis;
23795
25387
  const { x, y, width, height } = match.box;
23796
25388
  for (const [name, value] of Object.entries({
@@ -23820,11 +25412,11 @@ var ViewerGuides = class {
23820
25412
  /** A guide: a wide transparent hit line under the visible dashed line. */
23821
25413
  #line(vertical2, position, page3, id) {
23822
25414
  const doc = this.root.ownerDocument;
23823
- const group2 = doc.createElementNS(SVG6, "g");
25415
+ const group2 = doc.createElementNS(SVG7, "g");
23824
25416
  group2.classList.add("guide");
23825
25417
  group2.dataset.orientation = vertical2 ? "vertical" : "horizontal";
23826
25418
  for (const kind of ["guide-hit", "guide-line"]) {
23827
- const line = doc.createElementNS(SVG6, "line");
25419
+ const line = doc.createElementNS(SVG7, "line");
23828
25420
  line.classList.add(kind);
23829
25421
  line.setAttribute("vector-effect", "non-scaling-stroke");
23830
25422
  group2.append(line);
@@ -24011,7 +25603,7 @@ var ViewerGuides = class {
24011
25603
  drawn2?.remove();
24012
25604
  this.#drawn = void 0;
24013
25605
  if (!svg2 || !page3 || !this.#shown) return;
24014
- const group2 = svg2.ownerDocument.createElementNS(SVG6, "g");
25606
+ const group2 = svg2.ownerDocument.createElementNS(SVG7, "g");
24015
25607
  group2.dataset.guides = "";
24016
25608
  for (const guide of guides)
24017
25609
  group2.append(this.#line(guide.orientation === "vertical", guide.position, page3, guide.id));
@@ -25145,7 +26737,7 @@ function createTextDialog(root, press) {
25145
26737
  }
25146
26738
  };
25147
26739
  }
25148
- var SVG7 = "http://www.w3.org/2000/svg";
26740
+ var SVG8 = "http://www.w3.org/2000/svg";
25149
26741
  var ViewerTextBlockTool = class {
25150
26742
  constructor(viewport, controller, options2) {
25151
26743
  this.viewport = viewport;
@@ -25192,17 +26784,17 @@ var ViewerTextBlockTool = class {
25192
26784
  const svg2 = this.viewport.querySelector("svg.paper");
25193
26785
  if (!target || !svg2) return;
25194
26786
  const screen = svg2.getScreenCTM?.();
25195
- const scale2 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
26787
+ const scale3 = screen ? Math.hypot(screen.a, screen.b) : 96 * state.zoom;
25196
26788
  this.#overlay = this.#draw(
25197
26789
  svg2,
25198
26790
  target.page,
25199
26791
  target.shape,
25200
26792
  visioTextBlockFrame(target.shape),
25201
- scale2
26793
+ scale3
25202
26794
  );
25203
26795
  }
25204
- #draw(svg2, page3, shape, frame, scale2) {
25205
- const create = (name) => svg2.ownerDocument.createElementNS(SVG7, name);
26796
+ #draw(svg2, page3, shape, frame, scale3) {
26797
+ const create = (name) => svg2.ownerDocument.createElementNS(SVG8, name);
25206
26798
  const group2 = create("g");
25207
26799
  group2.dataset.textBlockOverlay = shape.id;
25208
26800
  group2.setAttribute(
@@ -25217,7 +26809,7 @@ var ViewerTextBlockTool = class {
25217
26809
  rect.setAttribute("vector-effect", "non-scaling-stroke");
25218
26810
  rect.setAttribute("aria-label", "Drag to move the text block");
25219
26811
  group2.append(rect);
25220
- const radius = String(5 / (scale2 || 96));
26812
+ const radius = String(5 / (scale3 || 96));
25221
26813
  const handle = (id, x, y, label) => {
25222
26814
  const circle = create("circle");
25223
26815
  circle.dataset.textBlockHandle = id;
@@ -25238,7 +26830,7 @@ var ViewerTextBlockTool = class {
25238
26830
  handle(
25239
26831
  "rotate",
25240
26832
  frame.width / 2,
25241
- frame.height + 24 / (scale2 || 96),
26833
+ frame.height + 24 / (scale3 || 96),
25242
26834
  "Drag to rotate the text block"
25243
26835
  );
25244
26836
  svg2.append(group2);
@@ -25309,9 +26901,9 @@ var ViewerTextBlockTool = class {
25309
26901
  if (!point || !this.#overlay) return;
25310
26902
  drag.next = visioTextBlockDrag(drag.frame, drag.handle, drag.start, point);
25311
26903
  const svg2 = this.#overlay.ownerSVGElement;
25312
- const scale2 = Math.hypot(svg2.getScreenCTM?.()?.a ?? 96, svg2.getScreenCTM?.()?.b ?? 0);
26904
+ const scale3 = Math.hypot(svg2.getScreenCTM?.()?.a ?? 96, svg2.getScreenCTM?.()?.b ?? 0);
25313
26905
  this.#overlay.remove();
25314
- this.#overlay = this.#draw(svg2, drag.page, drag.shape, drag.next, scale2);
26906
+ this.#overlay = this.#draw(svg2, drag.page, drag.shape, drag.next, scale3);
25315
26907
  this.#overlay.dataset.textBlockPreview = "";
25316
26908
  }
25317
26909
  async #finish(event) {
@@ -26825,10 +28417,10 @@ var ViewerPresentation = class {
26825
28417
  var EXPORT_DPI = 150;
26826
28418
  var MAX_CANVAS_SIDE = 4096;
26827
28419
  function rasterSize(widthIn, heightIn, dpi = EXPORT_DPI) {
26828
- const scale2 = Math.min(dpi, MAX_CANVAS_SIDE / widthIn, MAX_CANVAS_SIDE / heightIn);
28420
+ const scale3 = Math.min(dpi, MAX_CANVAS_SIDE / widthIn, MAX_CANVAS_SIDE / heightIn);
26829
28421
  return {
26830
- width: Math.max(1, Math.round(widthIn * scale2)),
26831
- height: Math.max(1, Math.round(heightIn * scale2))
28422
+ width: Math.max(1, Math.round(widthIn * scale3)),
28423
+ height: Math.max(1, Math.round(heightIn * scale3))
26832
28424
  };
26833
28425
  }
26834
28426
  async function rasterizePage(doc, model, pageIndex, dpi = EXPORT_DPI) {
@@ -26934,9 +28526,9 @@ var PdfEmbeddedFont = class _PdfEmbeddedFont {
26934
28526
  /** Everything the PDF needs to write the font objects. */
26935
28527
  build() {
26936
28528
  const subset = subsetTrueType(this.font, this.#used);
26937
- const scale2 = 1e3 / this.font.unitsPerEm;
26938
- const widths = subset.glyphs.map((glyph) => Math.round(this.font.advance(glyph) * scale2));
26939
- const units = (value) => Math.round(value * scale2);
28529
+ const scale3 = 1e3 / this.font.unitsPerEm;
28530
+ const widths = subset.glyphs.map((glyph) => Math.round(this.font.advance(glyph) * scale3));
28531
+ const units = (value) => Math.round(value * scale3);
26940
28532
  const [x0, y0, x1, y1] = this.font.bbox;
26941
28533
  const ascent = units(this.font.ascent);
26942
28534
  return {
@@ -27119,14 +28711,14 @@ var HELVETICA = [
27119
28711
  ];
27120
28712
  function pdfTextWidth(text2, baseFont) {
27121
28713
  if (baseFont.startsWith("Courier")) return text2.length * 0.6;
27122
- const scale2 = baseFont.startsWith("Times") ? 0.9 : 1;
28714
+ const scale3 = baseFont.startsWith("Times") ? 0.9 : 1;
27123
28715
  const bold = /Bold/.test(baseFont) ? 1.05 : 1;
27124
28716
  let total = 0;
27125
28717
  for (let index = 0; index < text2.length; index++) {
27126
28718
  const code = text2.charCodeAt(index);
27127
28719
  total += code >= 32 && code <= 126 ? HELVETICA[code - 32] : 556;
27128
28720
  }
27129
- return total / 1e3 * scale2 * bold;
28721
+ return total / 1e3 * scale3 * bold;
27130
28722
  }
27131
28723
  var CP1252_HIGH = [
27132
28724
  8364,
@@ -27349,13 +28941,15 @@ ${body}
27349
28941
  endobj
27350
28942
  `);
27351
28943
  };
27352
- const stream = (id, dictionary, data) => {
28944
+ const stream = (id, dictionary, data, filtered = false) => {
28945
+ const packed = filtered ? data : zlibCompress(data);
28946
+ const entries = [dictionary, filtered ? "" : "/Filter /FlateDecode"].filter(Boolean);
27353
28947
  offsets[id] = position;
27354
28948
  emit(`${id} 0 obj
27355
- << ${dictionary} /Length ${data.length} >>
28949
+ << ${entries.join(" ")} /Length ${packed.length} >>
27356
28950
  stream
27357
28951
  `);
27358
- emit(data);
28952
+ emit(packed);
27359
28953
  emit("\nendstream\nendobj\n");
27360
28954
  };
27361
28955
  emit("%PDF-1.4\n%\xE2\xE3\xCF\xD3\n");
@@ -27374,7 +28968,8 @@ stream
27374
28968
  stream(
27375
28969
  maskId,
27376
28970
  `/Type /XObject /Subtype /Image /Width ${image.width} /Height ${image.height} /ColorSpace /DeviceGray /BitsPerComponent 8${image.alpha.filter ? ` /Filter /${image.alpha.filter}` : ""}`,
27377
- image.alpha.data
28971
+ image.alpha.data,
28972
+ !!image.alpha.filter
27378
28973
  );
27379
28974
  mask = ` /SMask ${maskId} 0 R`;
27380
28975
  }
@@ -27382,7 +28977,8 @@ stream
27382
28977
  stream(
27383
28978
  id,
27384
28979
  `/Type /XObject /Subtype /Image /Width ${image.width} /Height ${image.height} /ColorSpace /DeviceRGB /BitsPerComponent 8${image.filter ? ` /Filter /${image.filter}` : ""}${mask}`,
27385
- image.data
28980
+ image.data,
28981
+ !!image.filter
27386
28982
  );
27387
28983
  xobjects.push(`/${name} ${id} 0 R`);
27388
28984
  }
@@ -28074,6 +29670,12 @@ var Converter = class {
28074
29670
  this.degraded.add("Reflections and masked shapes are not drawn.");
28075
29671
  return;
28076
29672
  }
29673
+ if (element.hasAttribute("data-bevel")) {
29674
+ this.degraded.add("Bevel lighting is not drawn.");
29675
+ return;
29676
+ }
29677
+ if (element.hasAttribute("data-perspective"))
29678
+ this.degraded.add("3-D rotation is drawn as a parallel projection without perspective.");
28077
29679
  if (element.hasAttribute("data-embedded-chart")) throw new PdfFallback("embedded chart");
28078
29680
  if (element.hasAttribute("filter") && !shadow && !glow2)
28079
29681
  this.degraded.add("Blur and soft-edge filters are not applied.");
@@ -28203,13 +29805,13 @@ var Converter = class {
28203
29805
  if (!marker || marker.localName !== "marker" || !at) continue;
28204
29806
  const [minX, minY, vw, vh] = (marker.getAttribute("viewBox") ?? "0 0 3 3").split(/[\s,]+/).map(Number);
28205
29807
  const mw = number2(marker.getAttribute("markerWidth"), 3), mh = number2(marker.getAttribute("markerHeight"), 3);
28206
- const scale2 = Math.min(mw / vw, mh / vh);
28207
- if (!Number.isFinite(scale2) || scale2 <= 0) continue;
29808
+ const scale3 = Math.min(mw / vw, mh / vh);
29809
+ if (!Number.isFinite(scale3) || scale3 <= 0) continue;
28208
29810
  const angle = side === "start" ? at.angle + Math.PI : at.angle;
28209
29811
  const cos = Math.cos(angle), sin = Math.sin(angle);
28210
29812
  this.page.save();
28211
29813
  this.page.concat([cos, sin, -sin, cos, at.x, at.y]);
28212
- this.page.concat([scale2, 0, 0, scale2, 0, 0]);
29814
+ this.page.concat([scale3, 0, 0, scale3, 0, 0]);
28213
29815
  this.page.concat([
28214
29816
  1,
28215
29817
  0,
@@ -28269,12 +29871,12 @@ async function decodeImage(doc, href) {
28269
29871
  image.onerror = () => reject(new Error("picture"));
28270
29872
  image.src = href;
28271
29873
  });
28272
- const scale2 = Math.min(
29874
+ const scale3 = Math.min(
28273
29875
  1,
28274
29876
  MAX_IMAGE_SIDE / Math.max(image.naturalWidth, image.naturalHeight, 1)
28275
29877
  );
28276
- const width = Math.max(1, Math.round(image.naturalWidth * scale2));
28277
- const height = Math.max(1, Math.round(image.naturalHeight * scale2));
29878
+ const width = Math.max(1, Math.round(image.naturalWidth * scale3));
29879
+ const height = Math.max(1, Math.round(image.naturalHeight * scale3));
28278
29880
  const canvas2 = doc.createElement("canvas");
28279
29881
  canvas2.width = width;
28280
29882
  canvas2.height = height;
@@ -28734,6 +30336,7 @@ var VisioViewerElement = class extends BaseElement {
28734
30336
  #commands;
28735
30337
  #presentation;
28736
30338
  #lineEndpoints;
30339
+ #controlHandles;
28737
30340
  #rotationHandle;
28738
30341
  #resizeHandles;
28739
30342
  #handleState;
@@ -28843,6 +30446,7 @@ var VisioViewerElement = class extends BaseElement {
28843
30446
  this.#edit = editing.edit;
28844
30447
  this.#pointer = editing.pointer;
28845
30448
  this.#lineEndpoints = editing.lineEndpoints;
30449
+ this.#controlHandles = editing.controls;
28846
30450
  this.#rotationHandle = editing.rotation;
28847
30451
  this.#resizeHandles = editing.resize;
28848
30452
  this.#edit.onSelection = (at) => at ? this.#mini.showAt(at.x, at.y) : this.#mini.hide();
@@ -28879,6 +30483,7 @@ var VisioViewerElement = class extends BaseElement {
28879
30483
  toolChanged: () => {
28880
30484
  this.#pointer.render(this.controller.state);
28881
30485
  this.#lineEndpoints.render(this.controller.state);
30486
+ this.#controlHandles.render(this.controller.state);
28882
30487
  this.#rotationHandle.render(this.controller.state);
28883
30488
  this.#resizeHandles.render(this.controller.state);
28884
30489
  },
@@ -28937,6 +30542,7 @@ var VisioViewerElement = class extends BaseElement {
28937
30542
  root: this.#root,
28938
30543
  viewport: this.#viewport,
28939
30544
  fileName: () => this.#fileName,
30545
+ locale: () => this.#locale(),
28940
30546
  load: (source) => this.load(source),
28941
30547
  createBlankDrawing: () => this.createBlankDrawing(),
28942
30548
  createFromTemplate: (template) => this.createFromTemplate(template),
@@ -29306,6 +30912,7 @@ var VisioViewerElement = class extends BaseElement {
29306
30912
  if (this.#disposed || !this.#overflow) return;
29307
30913
  restoreScreenTips(this.#toolbar);
29308
30914
  localizeRibbon(this.#toolbar, this.#locale());
30915
+ this.#backstage?.localize();
29309
30916
  applyScreenTips(this.#toolbar, this.#behaviour.screenTips);
29310
30917
  this.#overflow.refit();
29311
30918
  }
@@ -29338,6 +30945,7 @@ var VisioViewerElement = class extends BaseElement {
29338
30945
  const disposePresentation = this.#presentation.wire();
29339
30946
  const disposePointer = this.#pointer.wire();
29340
30947
  const disposeLineEndpoints = this.#lineEndpoints.wire();
30948
+ const disposeControls = this.#controlHandles.wire();
29341
30949
  const disposeRotation = this.#rotationHandle.wire();
29342
30950
  const disposeResize = this.#resizeHandles.wire();
29343
30951
  const disposeBackstage = this.#backstage.wire();
@@ -29349,7 +30957,13 @@ var VisioViewerElement = class extends BaseElement {
29349
30957
  this.#viewport,
29350
30958
  this.controller,
29351
30959
  (x, y) => this.#mini.showAt(x, y),
29352
- (menu2, target) => syncVisioHostMenu(menu2, target, this.#custom.resolved, this.controller)
30960
+ (menu2, target) => {
30961
+ syncVisioHostMenu(menu2, target, this.#custom.resolved, this.controller);
30962
+ syncShapeActions(menu2, target, this.controller, (message) => {
30963
+ this.#announcement = message;
30964
+ this.#status.textContent = message;
30965
+ });
30966
+ }
29353
30967
  );
29354
30968
  const disposeTellMe = wireTellMe(this.#root);
29355
30969
  const disposeGalleries = wireInlineGalleries(this, this.#root);
@@ -29406,6 +31020,7 @@ var VisioViewerElement = class extends BaseElement {
29406
31020
  disposePresentation();
29407
31021
  disposePointer();
29408
31022
  disposeLineEndpoints();
31023
+ disposeControls();
29409
31024
  disposeRotation();
29410
31025
  disposeResize();
29411
31026
  disposeBackstage();
@@ -29448,6 +31063,7 @@ var VisioViewerElement = class extends BaseElement {
29448
31063
  this.#handleState = state;
29449
31064
  if (changed || !previous || previous.canEdit !== state.canEdit || previous.zoom !== state.zoom || previous.selectedShape !== state.selectedShape || previous.selectedShapes !== state.selectedShapes || previous.loading !== state.loading || previous.edit.busy !== state.edit.busy || previous.edit.sourceAvailable !== state.edit.sourceAvailable) {
29450
31065
  this.#lineEndpoints.render(state);
31066
+ this.#controlHandles.render(state);
29451
31067
  this.#rotationHandle.render(state);
29452
31068
  this.#resizeHandles.render(state);
29453
31069
  this.#viewport.toggleAttribute(