@silurus/ooxml 0.85.3 → 0.86.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +39 -7
  2. package/dist/assets/render-worker-D21h5TGR.js +10 -0
  3. package/dist/assets/render-worker-Dsfekaht.js +11 -0
  4. package/dist/assets/render-worker-DxU7IrKo.js +31 -0
  5. package/dist/bounded-raw-part-cache-BfbSxRIL.js +119 -0
  6. package/dist/{canvas-viewer-mechanics-CDNMJ-Yz.js → canvas-viewer-mechanics-DN5SqWGS.js} +329 -192
  7. package/dist/{comment-ui-runtime-DAKBCpsM.js → comment-ui-runtime-DEtgcmj7.js} +5 -5
  8. package/dist/comment-ui-runtime-TLHustXJ.js +2 -0
  9. package/dist/{comment-ui-runtime-CAbpuWi_.js → comment-ui-runtime-lXwVOgjW.js} +4 -4
  10. package/dist/{comments-Brfxa3hQ.js → comments-CAn2A_Xh.js} +1 -1
  11. package/dist/delimited-text-worker-host-DcHj_JZt.js +27 -0
  12. package/dist/{document-pull-client-F3ox_VXK.js → document-pull-client-uopDjRde.js} +4477 -4431
  13. package/dist/{docx-BYvm3TWw.js → docx-wPzeF76A.js} +519 -334
  14. package/dist/docx.mjs +7 -7
  15. package/dist/docx_parser_bg.wasm +0 -0
  16. package/dist/{dom-interaction-boundary-CDGegIB5.js → dom-interaction-boundary-CswB9Tzi.js} +60 -57
  17. package/dist/{line-metrics-BGtFM-ec.js → hyperlink-BR1NCO7S.js} +954 -935
  18. package/dist/index.mjs +4 -4
  19. package/dist/{line-distribute-BsV4MVZ2.js → line-distribute-IsUGfHXm.js} +10 -10
  20. package/dist/line-metrics-CBbw80Ko.js +60 -0
  21. package/dist/node.mjs +266 -266
  22. package/dist/{pptx-BqpVTP8p.js → pptx-BxJ_RBSY.js} +173 -165
  23. package/dist/pptx.mjs +5 -5
  24. package/dist/pptx_parser_bg.wasm +0 -0
  25. package/dist/{render-DeZpRCfx.js → render-DEiun_AH.js} +1 -1
  26. package/dist/{render-worker-host-BKtXmlEF.js → render-worker-host-BEfLZvSL.js} +1 -1
  27. package/dist/{render-worker-host-CNKQ76tu.js → render-worker-host-Ba6Fchqr.js} +1 -1
  28. package/dist/{render-worker-host-CBcQXsR5.js → render-worker-host-C3xwtHnv.js} +1 -1
  29. package/dist/{resource-measurement-D41R-0Bl.js → resource-measurement-CclArDRs.js} +10 -10
  30. package/dist/{session-n2p5_jxV.js → session-BuJL_xcp.js} +87 -87
  31. package/dist/{slide-pull-client-Dwek7xW8.js → slide-pull-client-Ck8wfRT_.js} +1239 -1165
  32. package/dist/types/chart-ex.d.ts +2 -2
  33. package/dist/types/docx.d.ts +10 -11
  34. package/dist/types/index.d.ts +38 -19
  35. package/dist/types/math.d.ts +1 -1
  36. package/dist/types/node.d.ts +6 -5
  37. package/dist/types/pptx.d.ts +10 -10
  38. package/dist/types/region-map.d.ts +2 -2
  39. package/dist/types/three-d.d.ts +2 -2
  40. package/dist/types/tiff.d.ts +1 -1
  41. package/dist/types/xlsx.d.ts +34 -14
  42. package/dist/{worksheet-pull-client-C9sC36Vu.js → worksheet-pull-client-CAvuf22q.js} +72 -69
  43. package/dist/{xlsx-DSU6pV1O.js → xlsx-Bblm5r1h.js} +1752 -1592
  44. package/dist/xlsx.mjs +5 -5
  45. package/dist/xlsx_parser_bg.wasm +0 -0
  46. package/package.json +1 -1
  47. package/dist/assets/render-worker-D1O73gYW.js +0 -10
  48. package/dist/assets/render-worker-DHP0rgcW.js +0 -24
  49. package/dist/assets/render-worker-V2wWYA4O.js +0 -11
  50. package/dist/bounded-raw-part-cache-C6ro6Ezf.js +0 -254
  51. package/dist/comment-ui-runtime-DTaaZdXC.js +0 -2
  52. /package/dist/{comment-occurrence-tj54AXXB.js → comment-occurrence-CqejEuts.js} +0 -0
  53. /package/dist/{highlight-rect-DBcYVJDv.js → highlight-rect-FuUSmL3a.js} +0 -0
  54. /package/dist/{read-only-comment-decoration-Mv_SAiHy.js → read-only-comment-decoration-BTnWEeo5.js} +0 -0
  55. /package/dist/{read-only-comment-margin-Cqu-Ir0C.js → read-only-comment-margin-plStyGfE.js} +0 -0
  56. /package/dist/{source-key-BkBB3X82.js → source-key-Ktb1GRE5.js} +0 -0
@@ -1,4 +1,4 @@
1
- //#region dist/.types-work/chart-CX4ml5hj.d.ts
1
+ //#region dist/.types-work/chart-DyZ-c18j.d.ts
2
2
  type DecodedImageBudgetStrategy = 'adaptive' | 'strict';
3
3
  interface ImageResourceOptions {
4
4
  decodedByteBudget?: number;
@@ -1060,12 +1060,12 @@ interface ChartRect {
1060
1060
  h: number;
1061
1061
  }
1062
1062
  //#endregion
1063
- //#region dist/.types-work/chart-ex-contract-D-MROxI4.d.ts
1063
+ //#region dist/.types-work/chart-ex-contract-CdrCTgpH.d.ts
1064
1064
  interface ChartExRenderer {
1065
1065
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
1066
1066
  }
1067
1067
  //#endregion
1068
- //#region dist/.types-work/mathjax-emiLk9eb.d.ts
1068
+ //#region dist/.types-work/mathjax-Bh8Yow_s.d.ts
1069
1069
  interface MathSvg {
1070
1070
  svg: string;
1071
1071
  widthEm: number;
@@ -1077,17 +1077,17 @@ interface MathRenderer {
1077
1077
  mathMLToSvg(mathml: string): Promise<MathSvg>;
1078
1078
  }
1079
1079
  //#endregion
1080
- //#region dist/.types-work/three-d-contract-2IUr35q1.d.ts
1080
+ //#region dist/.types-work/three-d-contract-DVjawIXV.d.ts
1081
1081
  interface ChartThreeDRenderer {
1082
1082
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
1083
1083
  }
1084
1084
  //#endregion
1085
- //#region dist/.types-work/region-map-contract-CtuTzdmN.d.ts
1085
+ //#region dist/.types-work/region-map-contract-v0ic4OTv.d.ts
1086
1086
  interface ChartRegionMapRenderer {
1087
1087
  render(ctx: CanvasRenderingContext2D, chart: ChartModel, rect: ChartRect, ptToPx: number, shapeRotationDeg?: number): boolean;
1088
1088
  }
1089
1089
  //#endregion
1090
- //#region dist/.types-work/tiff-contract-DJ3gpIhe.d.ts
1090
+ //#region dist/.types-work/tiff-contract-CwDLah_7.d.ts
1091
1091
  interface TiffRenderOptions {
1092
1092
  targetWidthPx?: number;
1093
1093
  targetHeightPx?: number;
@@ -1102,7 +1102,7 @@ interface TiffRenderer {
1102
1102
  render(bytes: Uint8Array, options?: Readonly<TiffRenderOptions>): Promise<ImageBitmap | null>;
1103
1103
  }
1104
1104
  //#endregion
1105
- //#region dist/.types-work/hyperlink-92bQUogu.d.ts
1105
+ //#region dist/.types-work/hyperlink-0jvpW8AM.d.ts
1106
1106
  type OoxmlErrorCode = 'encrypted' | 'invalid-password' | 'unsupported-encryption' | 'legacy-binary-format' | 'not-ooxml';
1107
1107
  type OoxmlErrorStage = 'container' | 'decompression' | 'parsing' | 'serialization' | 'layout' | 'rendering' | 'worker';
1108
1108
  declare class OoxmlError extends Error {
@@ -1209,7 +1209,7 @@ type HyperlinkTarget = {
1209
1209
  };
1210
1210
  declare function openExternalHyperlink(url: string, allowed?: readonly string[], win?: Pick<Window, 'open'> | undefined): boolean;
1211
1211
  //#endregion
1212
- //#region dist/.types-work/find-highlight-CEEVmKfp.d.ts
1212
+ //#region dist/.types-work/find-highlight-DrynDP6K.d.ts
1213
1213
  interface ViewerContextMenuEvent<TContext> {
1214
1214
  readonly originalEvent: MouseEvent;
1215
1215
  getContext(): Promise<TContext | null>;
@@ -1253,7 +1253,7 @@ interface FindHighlightColors {
1253
1253
  active?: string;
1254
1254
  }
1255
1255
  //#endregion
1256
- //#region dist/.types-work/types-BzjMGMnI.d.ts
1256
+ //#region dist/.types-work/types-B0AE_k3g.d.ts
1257
1257
  type ShapeFill = Exclude<Fill, {
1258
1258
  fillType: 'image';
1259
1259
  } | {
@@ -1281,6 +1281,7 @@ interface MergeCell {
1281
1281
  interface Worksheet {
1282
1282
  name: string;
1283
1283
  isChartSheet?: boolean;
1284
+ isDialogSheet?: boolean;
1284
1285
  rows: Row[];
1285
1286
  colWidths: Record<number, number>;
1286
1287
  colWidthRanges?: Array<{
@@ -2007,7 +2008,7 @@ interface XlsxRenderViewportOptions {
2007
2008
  } | null;
2008
2009
  }
2009
2010
  //#endregion
2010
- //#region dist/.types-work/xlsx-Bryt4758.d.ts
2011
+ //#region dist/.types-work/xlsx-BGOMFAqN.d.ts
2011
2012
  type ResolvedList = {
2012
2013
  kind: 'values';
2013
2014
  values: string[];
@@ -2015,6 +2016,19 @@ type ResolvedList = {
2015
2016
  kind: 'formula';
2016
2017
  formula: string;
2017
2018
  };
2019
+ type XlsxSheetLoadOptions = Readonly<{
2020
+ format?: 'xlsx';
2021
+ }> | Readonly<{
2022
+ format: 'csv' | 'tsv';
2023
+ delimiter?: string;
2024
+ encoding?: string;
2025
+ sheetName?: string;
2026
+ }> | Readonly<{
2027
+ format: 'delimited-text';
2028
+ delimiter: string;
2029
+ encoding?: string;
2030
+ sheetName?: string;
2031
+ }>;
2018
2032
  type RenderViewportToBitmapOptions = Omit<XlsxRenderViewportOptions, 'onTextRun'> & {
2019
2033
  width: number;
2020
2034
  height: number;
@@ -2024,8 +2038,8 @@ interface LoadOptions extends LoadOptions$1 {
2024
2038
  }
2025
2039
  declare class XlsxWorkbook {
2026
2040
  private metrics;
2027
- private worker;
2028
2041
  private bridge;
2042
+ private delimitedTextBacked;
2029
2043
  private parsedWorkbook;
2030
2044
  private sheetCache;
2031
2045
  private sheetLoads;
@@ -2050,8 +2064,10 @@ declare class XlsxWorkbook {
2050
2064
  private resourceFailure;
2051
2065
  private constructor();
2052
2066
  get mode(): 'main' | 'worker';
2067
+ private static loadDelimitedText;
2053
2068
  static load(source: string | ArrayBuffer, opts?: LoadOptions): Promise<XlsxWorkbook>;
2054
2069
  private _load;
2070
+ private _loadDelimitedText;
2055
2071
  private retainFontsInSet;
2056
2072
  get sheetNames(): string[];
2057
2073
  get sheetCount(): number;
@@ -2076,6 +2092,8 @@ declare class XlsxWorkbook {
2076
2092
  private withWorksheetArchiveOperation;
2077
2093
  destroy(): void;
2078
2094
  private assertResourceHealthy;
2095
+ private requireBridge;
2096
+ private requireArchiveBridge;
2079
2097
  }
2080
2098
  type CanvasViewerRenderMode = 'main' | 'worker';
2081
2099
  interface CellAddress {
@@ -2171,6 +2189,7 @@ interface XlsxMatchLocation {
2171
2189
  col: number;
2172
2190
  }
2173
2191
  interface XlsxCommentsOptions extends ViewerCommentsOptions {}
2192
+ declare const loadXlsxViewerSource: unique symbol;
2174
2193
  type HiddenSheetMode = 'show' | 'skip' | 'dim';
2175
2194
  interface XlsxSheetViewerOptions extends LoadOptions {
2176
2195
  imageResources?: ImageResourceOptions;
@@ -2341,7 +2360,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
2341
2360
  private refreshChromeTheme;
2342
2361
  private installChromeThemeRefresh;
2343
2362
  private _collectSheetCells;
2344
- load(source: string | ArrayBuffer): Promise<void>;
2363
+ [loadXlsxViewerSource](source: string | ArrayBuffer, sourceOptions?: XlsxSheetLoadOptions): Promise<void>;
2345
2364
  private activateWorkbook;
2346
2365
  private ensureHostFonts;
2347
2366
  private releaseHostFonts;
@@ -2493,6 +2512,7 @@ declare class XlsxViewerEngine implements ZoomableViewer {
2493
2512
  declare class XlsxViewer extends XlsxViewerEngine {
2494
2513
  static fromWorkbook(container: HTMLElement, workbook: XlsxWorkbook, opts?: Omit<XlsxViewerOptions, keyof LoadOptions>): Omit<XlsxViewer, 'load'>;
2495
2514
  constructor(container: HTMLElement, opts?: XlsxViewerOptions);
2515
+ load(source: string | ArrayBuffer): Promise<void>;
2496
2516
  }
2497
2517
  declare class XlsxSheetViewer implements ZoomableViewer {
2498
2518
  readonly canvasElement: HTMLCanvasElement;
@@ -2503,7 +2523,7 @@ declare class XlsxSheetViewer implements ZoomableViewer {
2503
2523
  private lastMetrics;
2504
2524
  static fromWorkbook(canvasElement: HTMLCanvasElement, workbook: XlsxWorkbook, options?: Omit<XlsxSheetViewerOptions, keyof LoadOptions>): Omit<XlsxSheetViewer, 'load'>;
2505
2525
  constructor(canvasElement: HTMLCanvasElement, options?: XlsxSheetViewerOptions);
2506
- load(source: string | ArrayBuffer): Promise<void>;
2526
+ load(source: string | ArrayBuffer, options?: XlsxSheetLoadOptions): Promise<void>;
2507
2527
  get sheetIndex(): number;
2508
2528
  get sheetCount(): number;
2509
2529
  get sheetNames(): string[];
@@ -2544,4 +2564,4 @@ declare class XlsxSheetViewer implements ZoomableViewer {
2544
2564
  }
2545
2565
  declare function resolveSharedStrings(ws: Worksheet, sharedStrings: SharedString[]): Worksheet;
2546
2566
  //#endregion
2547
- export { type ArrowEnd, type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type ConditionalFormat, type DataValidation, type DecodedImageBudgetStrategy, type DefinedName, type DrawingMLCustomDashSegment, type Duotone, type Dxf, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFill, type GradientFillSpec, type GradientStop, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type ImageFill, type ImageResourceOptions, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NoFill, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PatternFill, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeFill, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SolidFill, type SpaceLine, type Sparkline, type SparklineGroup, type SrcRect, type Styles, type TableColumnInfo, type TableInfo, TiffDecodeError, type TiffRenderOptions, type TiffRenderer, type TileInfo, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxCellViewportRect, type XlsxComment, type XlsxCommentReply, type XlsxCommentsOptions, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, resolveSharedStrings };
2567
+ export { type ArrowEnd, type AutoResizeOptions, type Border, type BorderEdge, type Cell, type CellAddress, type CellFill, type CellFont, type CellValue, type CellXf, type CfIcon, type CfRule, type CfStop, type CfValue, type ChartAnchor, type ChartAreaGroupDecorations, type ChartBarGroupDecorations, type ChartDataLabelOverride, type ChartDataPointOverride, type ChartDataTable, type ChartDecorationLineStyle, type ChartDisplayUnits, type ChartDisplayUnitsLabel, type ChartErrBars, type ChartExElementStyle, type ChartExRenderer, type ChartLabelBox, type ChartLegendEntryOverride, type ChartLineDashSegment, type ChartLineGroupDecorations, type ChartManualLayout, type ChartModel, type ChartOfPie, type ChartPlotGroup, type ChartPlotGroupAxisSlot, type ChartPlotGroupKind, type ChartRect, type ChartRegionMapRenderer, type ChartSeries, type ChartSeriesDataLabels, type ChartStockBarPaint, type ChartStockUpDownBarStyle, type ChartSurfaceBandFormat, type ChartTextBox, type ChartTextParagraph, type ChartTextRun, type ChartThreeD, type ChartThreeDPictureOptions, type ChartThreeDRenderer, type ChartThreeDSeriesAxis, type ChartThreeDSurface, type ChartTrendline, type ChartType, type ChartexBoxSeries, type ChartexBoxWhisker, type ChartexGeography, type ChartexHistogramBinning, type ChartexRegionMap, type ChartexRegionMapColors, type ChartexRegionMapRow, type ChartexSunburst, type ChartexSunburstRow, type ChartexTreemap, type ChartexValueColorStop, type ConditionalFormat, type DataValidation, type DecodedImageBudgetStrategy, type DefinedName, type DrawingMLCustomDashSegment, type Duotone, type Dxf, type FillRect, type FindHighlightColors, type FindMatch, type FindMatchesOptions, type GradientFill, type GradientFillSpec, type GradientStop, type HiddenSheetMode, type Hyperlink, type HyperlinkTarget, type ImageAnchor, type ImageFill, type ImageResourceOptions, type LegendManualLayout, type LoadOptions, MAX_SELECTION_AREAS, MAX_SELECTION_CONTEXT_CELLS, MAX_SELECTION_CONTEXT_TEXT_CHARACTERS, type MathAccent, type MathArray, type MathBar, type MathBorderBox, type MathBox, type MathDelimiter, type MathFraction, type MathFunc, type MathGroup, type MathGroupChr, type MathLimit, type MathNary, type MathNode, type MathPhant, type MathRadical, type MathRenderer, type MathRun, type MathSPre, type MathScript, type MathStyle, type MathSvg, type MergeCell, type NoFill, type NumFmt, OoxmlDecodedImageLimitError, type OoxmlDecodedImageLimitMetric, OoxmlError, type OoxmlErrorCode, type OoxmlErrorStage, type OoxmlFormat, type OoxmlResourceLimit, OoxmlResourceLimitError, type OoxmlResourceLimitErrorDetails, type OoxmlResourceLimits, type OoxmlResourceMetric, type OoxmlResourceMetrics, type OoxmlResourceMetricsCheckpoint, type OoxmlResourceName, type OoxmlResourcePolicySnapshot, type OoxmlResourceUsageSnapshot, type OoxmlResourceViolation, type OutlinePr, type ParsedWorkbook, type PathCmd, type PathInfo, type PatternFill, type PhoneticAlignment, type PhoneticProperties, type PhoneticRun, type PhoneticType, type PivotCacheSource, type PivotDataField, type PivotDiagnostic, type PivotLocation, type PivotMetadataStatus, type PivotPageField, type PivotPartialReason, type PivotTableMetadata, type RenderViewportToBitmapOptions, type ResolvedList, type Row, type Run, type RunFont, type SecondaryValueAxis, type ShapeAnchor, type ShapeFill, type ShapeGeom, type ShapeInfo, type ShapeParagraph, type ShapeText, type ShapeTextRun, type SharedString, type SheetMeta, type SheetVisibility, type SlicerAnchor, type SlicerElementStyle, type SlicerItem, type SlicerStyle, type SolidFill, type SpaceLine, type Sparkline, type SparklineGroup, type SrcRect, type Styles, type TableColumnInfo, type TableInfo, TiffDecodeError, type TiffRenderOptions, type TiffRenderer, type TileInfo, type ViewerCommentMessageContext, type ViewerCommentThreadContext, type ViewerContextMenuEvent, type ViewportRange, type Workbook, type Worksheet, type WorksheetCellRange, type XlsxCellViewportRect, type XlsxComment, type XlsxCommentReply, type XlsxCommentsOptions, type XlsxCopyResult, type XlsxElementAnchorMarker, type XlsxElementContext, type XlsxMatchLocation, type XlsxRangeSelectionContext, type XlsxRenderViewportOptions, type XlsxScrollToCellOptions, type XlsxSelectionArea, type XlsxSelectionContext, type XlsxSelectionContextCell, type XlsxSelectionContextOptions, type XlsxSelectionInput, type XlsxSelectionState, type XlsxSheetLoadOptions, XlsxSheetViewer, type XlsxSheetViewerOptions, type XlsxTextRunInfo, XlsxViewer, type XlsxViewerOptions, type XlsxViewportOffset, XlsxWorkbook, type ZoomableViewer, autoResize, isOoxmlDecodedImageLimitError, isTiffDecodeError, openExternalHyperlink, resolveSharedStrings };
@@ -1,5 +1,5 @@
1
- import { $t as e, F as t, I as n, K as r, N as i, P as a, U as o, an as s, cn as c, en as l, in as u, nn as d, on as f, rn as p, tn as m } from "./line-metrics-BGtFM-ec.js";
2
- import { n as h, r as g, t as _ } from "./resource-measurement-D41R-0Bl.js";
1
+ import { $t as e, F as t, G as n, H as r, M as i, N as a, P as o, an as s, cn as c, en as l, in as u, nn as d, on as f, rn as p, tn as m } from "./hyperlink-BR1NCO7S.js";
2
+ import { n as h, r as g, t as _ } from "./resource-measurement-CclArDRs.js";
3
3
  import { t as v } from "./transfer-mIj7E7NB.js";
4
4
  //#region packages/xlsx/src/worksheet-resource-limits.ts
5
5
  var y = f, b = p, x = u, S = s, C = d, w = e, T = l, E = m, D = Object.freeze({
@@ -19,21 +19,24 @@ function O(e) {
19
19
  }, e), 0)
20
20
  };
21
21
  }
22
- function k(e, t) {
22
+ function k(e) {
23
+ return A(e, O(e.rows));
24
+ }
25
+ function A(e, t) {
23
26
  let n = h(e, Math.max(x, S));
24
27
  return {
25
28
  ...t,
26
29
  jsonBytes: n.jsonBytes
27
30
  };
28
31
  }
29
- function A(e, t) {
32
+ function j(e, t) {
30
33
  return {
31
34
  rows: _(e.rows, t.rows, y),
32
35
  cells: _(e.cells, t.cells, b),
33
36
  ownedUtf8Bytes: _(e.ownedUtf8Bytes, t.ownedUtf8Bytes, x)
34
37
  };
35
38
  }
36
- function j(e, t, n = {}) {
39
+ function M(e, t, n = {}) {
37
40
  let r = e.rows - (n.rows ?? 0), i = e.cells - (n.cells ?? 0), a = e.ownedUtf8Bytes - (n.ownedUtf8Bytes ?? 0), o = e.jsonBytes - (n.jsonBytes ?? 0);
38
41
  if (r < 0 || i < 0 || a < 0 || o < 0) throw Error("worksheet cache accounting underflow");
39
42
  return {
@@ -43,7 +46,7 @@ function j(e, t, n = {}) {
43
46
  jsonBytes: _(o, t.jsonBytes, E)
44
47
  };
45
48
  }
46
- function M(e, t, n, r, i, a, o) {
49
+ function N(e, t, n, r, i, a, o) {
47
50
  let s = n === "worksheet-json" ? "serialization" : "parsing";
48
51
  return new c(`OOXML resource limit exceeded${t ? ` for ${t}` : ""}: ${r} ${a} > ${i}`, {
49
52
  stage: s,
@@ -60,7 +63,7 @@ function M(e, t, n, r, i, a, o) {
60
63
  }
61
64
  });
62
65
  }
63
- function N(e, t, n, r) {
66
+ function P(e, t, n, r) {
64
67
  let i = [
65
68
  [
66
69
  "rows",
@@ -78,23 +81,23 @@ function N(e, t, n, r) {
78
81
  x
79
82
  ]
80
83
  ];
81
- for (let [e, a, o] of i) if (a > o) throw M(t, n, e === "owned-utf8-bytes" ? "worksheet-cell-content" : "worksheet-model", e, o, a, r);
82
- }
83
- function P(e, t, n, r) {
84
- if (e > S) throw M(t, n, "worksheet-json", "bytes", S, e, r);
84
+ for (let [e, a, o] of i) if (a > o) throw N(t, n, e === "owned-utf8-bytes" ? "worksheet-cell-content" : "worksheet-model", e, o, a, r);
85
85
  }
86
86
  function F(e, t, n, r) {
87
- if (e.rows > C) throw M(t, n, "worksheet-cache", "rows", C, e.rows, r);
88
- if (e.cells > w) throw M(t, n, "worksheet-cache", "cells", w, e.cells, r);
89
- if (e.ownedUtf8Bytes > T) throw M(t, n, "worksheet-cache", "owned-utf8-bytes", T, e.ownedUtf8Bytes, r);
90
- if (e.jsonBytes > E) throw M(t, n, "worksheet-cache", "bytes", E, e.jsonBytes, r);
87
+ if (e > S) throw N(t, n, "worksheet-json", "bytes", S, e, r);
88
+ }
89
+ function I(e, t, n, r) {
90
+ if (e.rows > C) throw N(t, n, "worksheet-cache", "rows", C, e.rows, r);
91
+ if (e.cells > w) throw N(t, n, "worksheet-cache", "cells", w, e.cells, r);
92
+ if (e.ownedUtf8Bytes > T) throw N(t, n, "worksheet-cache", "owned-utf8-bytes", T, e.ownedUtf8Bytes, r);
93
+ if (e.jsonBytes > E) throw N(t, n, "worksheet-cache", "bytes", E, e.jsonBytes, r);
91
94
  }
92
95
  //#endregion
93
96
  //#region packages/xlsx/src/shared-strings.ts
94
- function I(e, t) {
95
- return L(e.rows, t), e;
96
- }
97
97
  function L(e, t) {
98
+ return R(e.rows, t), e;
99
+ }
100
+ function R(e, t) {
98
101
  for (let n of e) for (let e of n.cells) {
99
102
  let n = e.value;
100
103
  if (n.type === "shared") {
@@ -115,14 +118,14 @@ function L(e, t) {
115
118
  }
116
119
  //#endregion
117
120
  //#region packages/xlsx/src/worksheet-pull-codec.ts
118
- function R(e, t, n, r) {
121
+ function z(e, t, n, r) {
119
122
  let i = e instanceof ArrayBuffer ? new Uint8Array(e) : new Uint8Array(e.buffer, e.byteOffset, e.byteLength), a = JSON.parse(new TextDecoder().decode(i));
120
123
  if (!a || typeof a != "object" || !("kind" in a)) throw Error("worksheet cursor returned an invalid unit");
121
124
  let o = a;
122
125
  if (t !== (o.kind === "finished")) throw Error("worksheet cursor terminal marker mismatch");
123
126
  if (o.kind === "rows") {
124
127
  if (!Array.isArray(o.rows)) throw Error("worksheet row unit is missing rows");
125
- return n && L(o.rows, n), r?.(o.rows), {
128
+ return n && R(o.rows, n), r?.(o.rows), {
126
129
  kind: "rows",
127
130
  rows: o.rows
128
131
  };
@@ -138,8 +141,8 @@ function R(e, t, n, r) {
138
141
  }
139
142
  //#endregion
140
143
  //#region packages/xlsx/src/worksheet-pull-worker.ts
141
- var z = 64 * 1024 * 1024, B = class {
142
- coordinator = new n();
144
+ var B = 64 * 1024 * 1024, V = class {
145
+ coordinator = new t();
143
146
  sessions = /* @__PURE__ */ new Map();
144
147
  operationTail = Promise.resolve();
145
148
  pendingOpens = /* @__PURE__ */ new Map();
@@ -159,32 +162,32 @@ var z = 64 * 1024 * 1024, B = class {
159
162
  get pendingOpenCount() {
160
163
  return this.pendingOpens.size;
161
164
  }
162
- async open(e, n, r) {
165
+ async open(e, t, n) {
163
166
  if (this.resourceFailure) throw this.resourceFailure;
164
- let i = this.pendingOpens.get(r.sessionId);
165
- if (!i || i.identity.operationId !== r.operationId || i.identity.generation !== r.generation) throw Error("worksheet pull session open reservation is stale or missing");
166
- let a, o = new Promise((e) => {
167
- a = e;
167
+ let r = this.pendingOpens.get(n.sessionId);
168
+ if (!r || r.identity.operationId !== n.operationId || r.identity.generation !== n.generation) throw Error("worksheet pull session open reservation is stale or missing");
169
+ let i, a = new Promise((e) => {
170
+ i = e;
168
171
  }), s = this.operationTail.then(() => this.coordinator.enqueue(async () => {
169
- if (i.canceled) throw Error("worksheet pull session open was canceled");
170
- this.executeArchive((t) => t.open_sheet_cursor(e, n));
171
- let o = [], s = {
172
+ if (r.canceled) throw Error("worksheet pull session open was canceled");
173
+ this.executeArchive((n) => n.open_sheet_cursor(e, t));
174
+ let a = [], s = {
172
175
  rows: 0,
173
176
  cells: 0,
174
177
  ownedUtf8Bytes: 0
175
- }, l, u = !1, d = new t({
176
- ...r,
177
- maxByteCredit: z,
178
+ }, l, u = !1, d = new o({
179
+ ...n,
180
+ maxByteCredit: B,
178
181
  coordinator: this.coordinator,
179
182
  driver: {
180
183
  pull: () => {
181
184
  let e = this.executeArchive((e) => e.pull_sheet_cursor(128)), t = this.executeArchive((e) => e.sheet_cursor_pull_finished());
182
185
  if (this.acceptWorksheet) {
183
- let n = R(e, t, void 0, this.prepareRows);
186
+ let n = z(e, t, void 0, this.prepareRows);
184
187
  try {
185
188
  if (n.kind === "rows") {
186
- let e = A(s, O(n.rows));
187
- N(e, "get-worksheet-worker", void 0, this.readResourceUsage()), o.push(...n.rows), s = e;
189
+ let e = j(s, O(n.rows));
190
+ P(e, "get-worksheet-worker", void 0, this.readResourceUsage()), a.push(...n.rows), s = e;
188
191
  } else l = n.worksheet;
189
192
  } catch (e) {
190
193
  throw e instanceof c && (this.resourceFailure ??= e), e;
@@ -202,53 +205,53 @@ var z = 64 * 1024 * 1024, B = class {
202
205
  measureChunk: ({ payload: e }) => e.byteLength,
203
206
  acknowledge: () => {
204
207
  if (!u) return;
205
- let t, n;
208
+ let t, r;
206
209
  try {
207
210
  if (this.acceptWorksheet) {
208
211
  if (!l) throw Error("worksheet terminal payload is missing");
209
- l.rows = l.parseError ? [] : o;
210
- let r = l.parseError ? {
212
+ l.rows = l.parseError ? [] : a;
213
+ let n = l.parseError ? {
211
214
  rows: 0,
212
215
  cells: 0,
213
216
  ownedUtf8Bytes: 0
214
- } : s, i = k(l, r), a = this.readResourceUsage();
215
- N(i, "get-worksheet-worker", void 0, a), P(i.jsonBytes, "get-worksheet-worker", void 0, a);
216
- let c = this.acceptWorksheet(e, l, i, a);
217
- typeof c == "function" ? t = c : c && ({rollback: t, commit: n} = c);
217
+ } : s, i = A(l, n), o = this.readResourceUsage();
218
+ P(i, "get-worksheet-worker", void 0, o), F(i.jsonBytes, "get-worksheet-worker", void 0, o);
219
+ let c = this.acceptWorksheet(e, l, i, o);
220
+ typeof c == "function" ? t = c : c && ({rollback: t, commit: r} = c);
218
221
  }
219
- this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), n?.();
222
+ this.executeArchive((e) => e.acknowledge_sheet_cursor_terminal()), r?.();
220
223
  } catch (e) {
221
224
  throw t?.(), e instanceof c && (this.resourceFailure ??= e), e;
222
225
  }
223
- u = !1, this.sessions.delete(r.sessionId), a();
226
+ u = !1, this.sessions.delete(n.sessionId), i();
224
227
  },
225
228
  cancel: () => {
226
229
  try {
227
230
  this.archive() && this.executeArchive((e) => e.cancel_sheet_cursor());
228
231
  } finally {
229
- this.sessions.delete(r.sessionId), a();
232
+ this.sessions.delete(n.sessionId), i();
230
233
  }
231
234
  },
232
235
  close: () => {
233
236
  try {
234
237
  this.archive() && this.executeArchive((e) => e.close_sheet_cursor());
235
238
  } finally {
236
- this.sessions.delete(r.sessionId), a();
239
+ this.sessions.delete(n.sessionId), i();
237
240
  }
238
241
  },
239
242
  resourceUsage: () => this.readResourceUsage()
240
243
  }
241
244
  });
242
- this.sessions.set(r.sessionId, {
245
+ this.sessions.set(n.sessionId, {
243
246
  host: d,
244
- identity: r
245
- }), this.pendingOpens.delete(r.sessionId);
247
+ identity: n
248
+ }), this.pendingOpens.delete(n.sessionId);
246
249
  }));
247
- this.operationTail = s.then(() => o, () => void 0);
250
+ this.operationTail = s.then(() => a, () => void 0);
248
251
  try {
249
252
  await s;
250
253
  } catch (e) {
251
- throw this.pendingOpens.delete(r.sessionId), a(), e;
254
+ throw this.pendingOpens.delete(n.sessionId), i(), e;
252
255
  }
253
256
  }
254
257
  async postOpenedSafely(e, t, n) {
@@ -262,8 +265,8 @@ var z = 64 * 1024 * 1024, B = class {
262
265
  }
263
266
  }
264
267
  dispatch(e, t) {
265
- let n = this.sessions.get(e.sessionId);
266
- if (n) return n.host.dispatch(e, t);
268
+ let r = this.sessions.get(e.sessionId);
269
+ if (r) return r.host.dispatch(e, t);
267
270
  let i = this.pendingOpens.get(e.sessionId);
268
271
  if (i && (e.kind === "cancel" || e.kind === "close")) {
269
272
  let n = i.identity.operationId === e.operationId && i.identity.generation === e.generation;
@@ -304,13 +307,13 @@ var z = 64 * 1024 * 1024, B = class {
304
307
  operationId: e.operationId,
305
308
  generation: e.generation,
306
309
  requestId: e.requestId,
307
- error: r(/* @__PURE__ */ Error("worksheet pull session is not open"))
310
+ error: n(/* @__PURE__ */ Error("worksheet pull session is not open"))
308
311
  }), Promise.resolve());
309
312
  }
310
313
  async dispatchSafely(e, t) {
311
314
  try {
312
315
  await this.dispatch(e, t);
313
- } catch (n) {
316
+ } catch (r) {
314
317
  try {
315
318
  t({
316
319
  protocol: a,
@@ -319,7 +322,7 @@ var z = 64 * 1024 * 1024, B = class {
319
322
  operationId: e.operationId,
320
323
  generation: e.generation,
321
324
  requestId: e.requestId,
322
- error: r(n)
325
+ error: n(r)
323
326
  });
324
327
  } catch {}
325
328
  }
@@ -365,13 +368,13 @@ var z = 64 * 1024 * 1024, B = class {
365
368
  }
366
369
  readResourceUsage() {
367
370
  try {
368
- return o(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
371
+ return r(this.executeArchive((e) => e.sheet_cursor_resource_usage()));
369
372
  } catch (e) {
370
373
  if (String(e).includes("worksheet cursor usage is unavailable")) return;
371
374
  throw e;
372
375
  }
373
376
  }
374
- }, V = class {
377
+ }, H = class {
375
378
  active = /* @__PURE__ */ new Set();
376
379
  nextSessionId = 1;
377
380
  constructor(e) {
@@ -380,14 +383,14 @@ var z = 64 * 1024 * 1024, B = class {
380
383
  async *stream(e, t, n) {
381
384
  if (!Number.isSafeInteger(e) || e < 0) throw RangeError("sheetIndex must be a non-negative safe integer");
382
385
  if (!t) throw TypeError("sheetName must be non-empty");
383
- W(n);
386
+ G(n);
384
387
  let r = this.nextSessionId++, a = {
385
388
  sessionId: r,
386
389
  operationId: r,
387
390
  generation: this.options.generation ?? 1
388
391
  }, o = new i(this.options.transport, {
389
392
  ...a,
390
- maxByteCredit: z,
393
+ maxByteCredit: B,
391
394
  timeoutMs: this.options.timeoutMs,
392
395
  disposeTransferred: this.options.disposeTransferred
393
396
  });
@@ -395,12 +398,12 @@ var z = 64 * 1024 * 1024, B = class {
395
398
  let s = !1, c;
396
399
  try {
397
400
  for (await this.options.open(e, t, a, this.options.timeoutMs);;) {
398
- W(n);
399
- let e = await o.pull(z, { signal: n });
401
+ G(n);
402
+ let e = await o.pull(B, { signal: n });
400
403
  try {
401
404
  let t = e.usage ?? o.usageCheckpoint;
402
405
  t && this.options.onUsage?.(t);
403
- let r = R(e.payload, e.done, this.options.sharedStrings);
406
+ let r = z(e.payload, e.done, this.options.sharedStrings);
404
407
  if (yield r.kind === "rows" ? {
405
408
  kind: "rows",
406
409
  rows: r.rows,
@@ -426,7 +429,7 @@ var z = 64 * 1024 * 1024, B = class {
426
429
  } finally {
427
430
  let e;
428
431
  try {
429
- s || await o.cancel(U(c));
432
+ s || await o.cancel(W(c));
430
433
  } catch (t) {
431
434
  e = t;
432
435
  } finally {
@@ -440,16 +443,16 @@ var z = 64 * 1024 * 1024, B = class {
440
443
  if (t) throw t.reason;
441
444
  }
442
445
  };
443
- function H(e) {
446
+ function U(e) {
444
447
  return !!e && typeof e == "object" && e.protocol === "ooxml-pull-v1";
445
448
  }
446
- function U(e) {
449
+ function W(e) {
447
450
  return e && typeof e == "object" && "name" in e && e.name === "AbortError" ? "abort" : e === void 0 ? "closed" : "request-error";
448
451
  }
449
- function W(e) {
452
+ function G(e) {
450
453
  if (!e?.aborted) return;
451
454
  let t = /* @__PURE__ */ Error("XLSX workbook session was aborted");
452
455
  throw t.name = "AbortError", t;
453
456
  }
454
457
  //#endregion
455
- export { j as a, P as c, O as d, I as i, N as l, H as n, A as o, B as r, F as s, V as t, k as u };
458
+ export { S as a, I as c, A as d, O as f, L as i, F as l, N as m, U as n, M as o, k as p, V as r, j as s, H as t, P as u };