@univerjs-pro/sheets-mcp 0.15.0-insiders.20251227-c108ce3 → 0.15.0-insiders.20260107-3441c7a

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.
@@ -1,4 +1,4 @@
1
- import { IFormulaUsage, IFormulaUsageAsA1 } from '@univerjs-pro/sheets-mcp';
1
+ import { IFormulaUsage, IFormulaUsageAsA1, IGetSizeUsagesOptions, IGetStyleUsagesOptions, ISizeUsageGrouped, ISizeUsageGroupedAsA1, IStyleUsage, IStyleUsageAsA1 } from '@univerjs-pro/sheets-mcp';
2
2
  import { FRange } from '@univerjs/sheets/facade';
3
3
  /**
4
4
  * @ignore
@@ -30,10 +30,82 @@ export interface IFRangeSheetsMCP {
30
30
  * ```
31
31
  */
32
32
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
33
+ /**
34
+ * Get all style usages in the range
35
+ * @param options options for filtering style properties and max count
36
+ * @returns An array of style usages
37
+ *
38
+ * @example
39
+ * ```ts
40
+ * const workbook = univerAPI.getActiveWorkbook()
41
+ * const sheet = workbook.getActiveSheet()
42
+ * const range = sheet.getRangeByA1('A1:C10')
43
+ * const usages = range.getStyleUsages();
44
+ * // or filter by specific properties
45
+ * const usagesFiltered = range.getStyleUsages({ properties: ['fontSize', 'fontFamily', 'width'] });
46
+ * // or limit results
47
+ * const usagesLimited = range.getStyleUsages({ maxCount: 100 });
48
+ * ```
49
+ */
50
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
51
+ /**
52
+ * Get all style usages in the range in A1 notation
53
+ * @param options options for filtering style properties and max count
54
+ * @returns An array of style usages in A1 notation
55
+ *
56
+ * @example
57
+ * ```ts
58
+ * const workbook = univerAPI.getActiveWorkbook()
59
+ * const sheet = workbook.getActiveSheet()
60
+ * const range = sheet.getRangeByA1('A1:C10')
61
+ * const usagesA1 = range.getStyleUsagesAsA1();
62
+ * // or filter by specific properties
63
+ * const usagesA1Filtered = range.getStyleUsagesAsA1({ properties: ['fontSize', 'fontFamily', 'height'] });
64
+ * // or limit results
65
+ * const usagesA1Limited = range.getStyleUsagesAsA1({ maxCount: 100 });
66
+ * ```
67
+ */
68
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
69
+ /**
70
+ * Get all row height and column width usages in the range
71
+ * @param options options for max count
72
+ * @returns Grouped size usages with widths and heights
73
+ *
74
+ * @example
75
+ * ```ts
76
+ * const workbook = univerAPI.getActiveWorkbook()
77
+ * const sheet = workbook.getActiveSheet()
78
+ * const range = sheet.getRangeByA1('A1:C10')
79
+ * const usages = range.getSizeUsages();
80
+ * // or limit results
81
+ * const usagesLimited = range.getSizeUsages({ maxCount: 100 });
82
+ * ```
83
+ */
84
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
85
+ /**
86
+ * Get all row height and column width usages in the range in A1 notation
87
+ * @param options options for max count
88
+ * @returns Grouped size usages in A1 notation with widths and heights
89
+ *
90
+ * @example
91
+ * ```ts
92
+ * const workbook = univerAPI.getActiveWorkbook()
93
+ * const sheet = workbook.getActiveSheet()
94
+ * const range = sheet.getRangeByA1('A1:C10')
95
+ * const usagesA1 = range.getSizeUsagesAsA1();
96
+ * // or limit results
97
+ * const usagesA1Limited = range.getSizeUsagesAsA1({ maxCount: 100 });
98
+ * ```
99
+ */
100
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
33
101
  }
34
102
  export declare class FRangeSheetsMCP extends FRange implements IFRangeSheetsMCP {
35
103
  getFormulaUsages(): Promise<IFormulaUsage[]>;
36
104
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
105
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
106
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
107
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
108
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
37
109
  }
38
110
  declare module '@univerjs/sheets/facade' {
39
111
  interface FRange extends IFRangeSheetsMCP {
@@ -1,4 +1,4 @@
1
- import { IFormulaUsage, IFormulaUsageAsA1 } from '@univerjs-pro/sheets-mcp';
1
+ import { IFormulaUsage, IFormulaUsageAsA1, IGetSizeUsagesOptions, IGetStyleUsagesOptions, ISizeUsageGrouped, ISizeUsageGroupedAsA1, IStyleUsage, IStyleUsageAsA1 } from '@univerjs-pro/sheets-mcp';
2
2
  import { FWorksheet } from '@univerjs/sheets/facade';
3
3
  /**
4
4
  * @ignore
@@ -28,10 +28,78 @@ export interface IFWorksheetSheetsMCP {
28
28
  * ```
29
29
  */
30
30
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
31
+ /**
32
+ * Get all style usages in the worksheet
33
+ * @param options options for filtering style properties and max count
34
+ * @returns An array of style usages
35
+ *
36
+ * @example
37
+ * ```ts
38
+ * const workbook = univerAPI.getActiveWorkbook()
39
+ * const sheet = workbook.getActiveSheet()
40
+ * const usages = sheet.getStyleUsages();
41
+ * // or filter by specific properties
42
+ * const usagesFiltered = sheet.getStyleUsages({ properties: ['fontSize', 'fontFamily', 'width'] });
43
+ * // or limit results
44
+ * const usagesLimited = sheet.getStyleUsages({ maxCount: 100 });
45
+ * ```
46
+ */
47
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
48
+ /**
49
+ * Get all style usages in the worksheet in A1 notation
50
+ * @param options options for filtering style properties and max count
51
+ * @returns An array of style usages in A1 notation
52
+ *
53
+ * @example
54
+ * ```ts
55
+ * const workbook = univerAPI.getActiveWorkbook()
56
+ * const sheet = workbook.getActiveSheet()
57
+ * const usagesA1 = sheet.getStyleUsagesAsA1();
58
+ * // or filter by specific properties
59
+ * const usagesA1Filtered = sheet.getStyleUsagesAsA1({ properties: ['fontSize', 'fontFamily', 'height'] });
60
+ * // or limit results
61
+ * const usagesA1Limited = sheet.getStyleUsagesAsA1({ maxCount: 100 });
62
+ * ```
63
+ */
64
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
65
+ /**
66
+ * Get all row height and column width usages in the worksheet
67
+ * @param options options for max count
68
+ * @returns Grouped size usages with widths and heights
69
+ *
70
+ * @example
71
+ * ```ts
72
+ * const workbook = univerAPI.getActiveWorkbook()
73
+ * const sheet = workbook.getActiveSheet()
74
+ * const usages = sheet.getSizeUsages();
75
+ * // or limit results
76
+ * const usagesLimited = sheet.getSizeUsages({ maxCount: 100 });
77
+ * ```
78
+ */
79
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
80
+ /**
81
+ * Get all row height and column width usages in the worksheet in A1 notation
82
+ * @param options options for max count
83
+ * @returns Grouped size usages in A1 notation with widths and heights
84
+ *
85
+ * @example
86
+ * ```ts
87
+ * const workbook = univerAPI.getActiveWorkbook()
88
+ * const sheet = workbook.getActiveSheet()
89
+ * const usagesA1 = sheet.getSizeUsagesAsA1();
90
+ * // or limit results
91
+ * const usagesA1Limited = sheet.getSizeUsagesAsA1({ maxCount: 100 });
92
+ * ```
93
+ */
94
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
31
95
  }
32
96
  export declare class FWorksheetSheetsMCP extends FWorksheet implements IFWorksheetSheetsMCP {
33
97
  getFormulaUsages(): Promise<IFormulaUsage[]>;
34
98
  getFormulaUsagesAsA1(): Promise<IFormulaUsageAsA1[]>;
99
+ getStyleUsages(options?: IGetStyleUsagesOptions): IStyleUsage[];
100
+ getStyleUsagesAsA1(options?: IGetStyleUsagesOptions): IStyleUsageAsA1[];
101
+ getSizeUsages(options?: IGetSizeUsagesOptions): ISizeUsageGrouped;
102
+ getSizeUsagesAsA1(options?: IGetSizeUsagesOptions): ISizeUsageGroupedAsA1;
35
103
  }
36
104
  declare module '@univerjs/sheets/facade' {
37
105
  interface FWorksheet extends IFWorksheetSheetsMCP {
@@ -1,3 +1,6 @@
1
1
  export { UniverSheetMCPPlugin } from './plugin';
2
- export { type IFormulaUsage, IFormulaUsageAnalyzer, type IFormulaUsageAsA1, toA1 } from './services/formula-analysis.service';
2
+ export { CellUsageAnalyzer, getA1Notation, type ICellUsage, ICellUsageAnalyzer, type ICellUsageAsA1, type IDataExtractorCondition, } from './services/cell-usage-analyzer.service';
3
+ export { toA1 as formulaToA1, type IFormulaUsage, IFormulaUsageAnalyzer, type IFormulaUsageAsA1 } from './services/formula-analysis.service';
4
+ export { type IGetSizeUsagesOptions, ISizeUsageAnalyzer, type ISizeUsageColumn, type ISizeUsageColumnAsA1, type ISizeUsageGrouped, type ISizeUsageGroupedAsA1, type ISizeUsageRow, type ISizeUsageRowAsA1, SizeUsageAnalyzer, } from './services/size-analysis.service';
5
+ export { type IGetStyleUsagesOptions, type IStyleConfig, type IStyleUsage, IStyleUsageAnalyzer, type IStyleUsageAsA1, toA1 as styleToA1, StyleUsageAnalyzer, } from './services/style-analysis.service';
3
6
  export * from './tools';
@@ -0,0 +1,68 @@
1
+ import { ICellData, IRange, Nullable } from '@univerjs/core';
2
+ /**
3
+ * Generic cell usage data interface
4
+ */
5
+ export interface ICellUsage {
6
+ /**
7
+ * Hash of the data for identifying identical data
8
+ */
9
+ dataHash: string;
10
+ /**
11
+ * First occurrence location of the data
12
+ */
13
+ firstOccurrence: IRange;
14
+ /**
15
+ * All cell ranges containing this data
16
+ */
17
+ filledRanges: IRange[];
18
+ }
19
+ /**
20
+ * A1 format cell usage data
21
+ */
22
+ export interface ICellUsageAsA1 {
23
+ /**
24
+ * Hash of the data for identifying identical data
25
+ */
26
+ dataHash: string;
27
+ /**
28
+ * First occurrence location in A1 notation
29
+ */
30
+ firstOccurrence: string;
31
+ /**
32
+ * All cell ranges in A1 notation (comma separated)
33
+ */
34
+ filledRanges: string;
35
+ }
36
+ /**
37
+ * Data extractor condition - defines how to extract and identify data from cells
38
+ */
39
+ export interface IDataExtractorCondition {
40
+ /**
41
+ * Extract data from a cell
42
+ * @param cell cell data
43
+ * @returns extracted data, null if no relevant data
44
+ */
45
+ getData(cell: Nullable<ICellData>): ICellData | null;
46
+ /**
47
+ * Generate hash for extracted data (used for data grouping)
48
+ * @param data extracted data
49
+ * @param rowIndex optional row index for position-dependent hashing
50
+ * @param columnIndex optional column index for position-dependent hashing
51
+ * @returns hash string, empty string means ignore this cell
52
+ */
53
+ getHash(data: Nullable<ICellData>, rowIndex?: number, columnIndex?: number): string;
54
+ }
55
+ /**
56
+ * Convert rectangle coordinates to A1 notation
57
+ */
58
+ export declare function getA1Notation([r1, r2, c1, c2]: [number, number, number, number]): string;
59
+ export declare const ICellUsageAnalyzer: import('@wendellhu/redi').IdentifierDecorator<CellUsageAnalyzer>;
60
+ export declare class CellUsageAnalyzer {
61
+ /**
62
+ * Analyze cell data matrix to find all data usage patterns
63
+ * @param data cell data matrix
64
+ * @param condition data extraction condition
65
+ * @returns array of cell usage data
66
+ */
67
+ getAllCellUsages(data: Nullable<ICellData>[][], condition: IDataExtractorCondition): ICellUsage[];
68
+ }
@@ -0,0 +1,118 @@
1
+ import { IColumnRange, IRowRange, Worksheet } from '@univerjs/core';
2
+ /**
3
+ * Options for getSizeUsages methods
4
+ */
5
+ export interface IGetSizeUsagesOptions {
6
+ /**
7
+ * Maximum number of results to return for both widths and heights. Default is 200.
8
+ * @example
9
+ * ```ts
10
+ * { maxCount: 100 }
11
+ * ```
12
+ */
13
+ maxCount?: number;
14
+ }
15
+ /**
16
+ * Single column width usage item
17
+ */
18
+ export interface ISizeUsageColumn {
19
+ /**
20
+ * The width value in pixels
21
+ */
22
+ value: number;
23
+ /**
24
+ * The column ranges with this width
25
+ */
26
+ ranges: IColumnRange[];
27
+ }
28
+ /**
29
+ * Single row height usage item
30
+ */
31
+ export interface ISizeUsageRow {
32
+ /**
33
+ * The height value in pixels
34
+ */
35
+ value: number;
36
+ /**
37
+ * The row ranges with this height
38
+ */
39
+ ranges: IRowRange[];
40
+ }
41
+ /**
42
+ * A1 format column width usage item
43
+ */
44
+ export interface ISizeUsageColumnAsA1 {
45
+ /**
46
+ * The width value in pixels
47
+ */
48
+ value: number;
49
+ /**
50
+ * The column ranges in A1 notation (comma separated)
51
+ * @example "A:C, E:T"
52
+ */
53
+ ranges: string;
54
+ }
55
+ /**
56
+ * A1 format row height usage item
57
+ */
58
+ export interface ISizeUsageRowAsA1 {
59
+ /**
60
+ * The height value in pixels
61
+ */
62
+ value: number;
63
+ /**
64
+ * The row ranges in A1 notation (comma separated)
65
+ * @example "1:1, 3:5000"
66
+ */
67
+ ranges: string;
68
+ }
69
+ /**
70
+ * Grouped size usage results
71
+ */
72
+ export interface ISizeUsageGrouped {
73
+ /**
74
+ * Column width usages grouped by width value
75
+ */
76
+ widths: ISizeUsageColumn[];
77
+ /**
78
+ * Row height usages grouped by height value
79
+ */
80
+ heights: ISizeUsageRow[];
81
+ }
82
+ /**
83
+ * A1 format grouped size usage results
84
+ */
85
+ export interface ISizeUsageGroupedAsA1 {
86
+ /**
87
+ * Column width usages in A1 notation
88
+ */
89
+ widths: ISizeUsageColumnAsA1[];
90
+ /**
91
+ * Row height usages in A1 notation
92
+ */
93
+ heights: ISizeUsageRowAsA1[];
94
+ }
95
+ export declare const ISizeUsageAnalyzer: import('@wendellhu/redi').IdentifierDecorator<SizeUsageAnalyzer>;
96
+ /**
97
+ * Size usage analyzer - aggregates row heights and column widths
98
+ */
99
+ export declare class SizeUsageAnalyzer {
100
+ private _maxCount?;
101
+ /**
102
+ * Update config based on options
103
+ */
104
+ updateConfig(options?: IGetSizeUsagesOptions): void;
105
+ /**
106
+ * Get all size usages from a worksheet
107
+ * @param worksheet The worksheet to analyze
108
+ * @param startRow Start row index (inclusive)
109
+ * @param endRow End row index (inclusive)
110
+ * @param startColumn Start column index (inclusive)
111
+ * @param endColumn End column index (inclusive)
112
+ */
113
+ getAllSizeUsages(worksheet: Worksheet, startRow?: number, endRow?: number, startColumn?: number, endColumn?: number): ISizeUsageGrouped;
114
+ /**
115
+ * Convert ISizeUsageGrouped to A1 format
116
+ */
117
+ toA1(grouped: ISizeUsageGrouped): ISizeUsageGroupedAsA1;
118
+ }
@@ -0,0 +1,93 @@
1
+ import { ICellData, IRange, Nullable, Workbook, Worksheet } from '@univerjs/core';
2
+ import { CellUsageAnalyzer } from './cell-usage-analyzer.service';
3
+ /**
4
+ * Interface for style usage information
5
+ */
6
+ export interface IStyleUsage {
7
+ /**
8
+ * The style hash - a compact string representation of the style
9
+ */
10
+ styleHash: string;
11
+ /**
12
+ * The filled ranges of cells with this style, including the first occurrence
13
+ */
14
+ filledRanges: IRange[];
15
+ }
16
+ /**
17
+ * Interface for style usage information in A1 notation
18
+ */
19
+ export interface IStyleUsageAsA1 {
20
+ /**
21
+ * The style hash - a compact string representation of the style
22
+ */
23
+ styleHash: string;
24
+ /**
25
+ * The filled ranges of cells with this style in A1 notation, including the first occurrence
26
+ */
27
+ filledRanges: string;
28
+ }
29
+ /**
30
+ * Style extractor configuration
31
+ */
32
+ export interface IStyleConfig {
33
+ fontFamily?: boolean;
34
+ fontSize?: boolean;
35
+ bold?: boolean;
36
+ italic?: boolean;
37
+ fontColor?: boolean;
38
+ backgroundColor?: boolean;
39
+ width?: boolean;
40
+ height?: boolean;
41
+ horizontalAlign?: boolean;
42
+ verticalAlign?: boolean;
43
+ underline?: boolean;
44
+ strikethrough?: boolean;
45
+ numberFormat?: boolean;
46
+ }
47
+ /**
48
+ * Options for getStyleUsages methods
49
+ */
50
+ export interface IGetStyleUsagesOptions {
51
+ /**
52
+ * Filter which style properties to include.
53
+ * When specified, only these properties will be analyzed (whitelist mode).
54
+ * Unsupported properties are ignored.
55
+ * @example
56
+ * ```ts
57
+ * { properties: ['fontSize', 'fontFamily', 'width'] }
58
+ * ```
59
+ */
60
+ properties?: Array<keyof IStyleConfig>;
61
+ /**
62
+ * Maximum number of results to return. Default is 200.
63
+ * When specified, the return value will include a `hasMore` property indicating if more results exist.
64
+ * @example
65
+ * ```ts
66
+ * { maxCount: 100 }
67
+ * ```
68
+ */
69
+ maxCount?: number;
70
+ }
71
+ /**
72
+ * Convert IStyleUsage to A1 format
73
+ */
74
+ export declare function toA1(usage: IStyleUsage): IStyleUsageAsA1;
75
+ export declare const IStyleUsageAnalyzer: import('@wendellhu/redi').IdentifierDecorator<StyleUsageAnalyzer>;
76
+ /**
77
+ * Style usage analyzer - based on generic CellUsageAnalyzer
78
+ */
79
+ export declare class StyleUsageAnalyzer extends CellUsageAnalyzer {
80
+ private _config;
81
+ private _maxCount?;
82
+ constructor(config?: IStyleConfig);
83
+ /**
84
+ * Update config based on options
85
+ * @param options options for getStyleUsages
86
+ */
87
+ updateConfig(options?: IGetStyleUsagesOptions): void;
88
+ /**
89
+ * Get all style usages from cell data matrix
90
+ * @returns array of style usages with omitted count on last item if truncated
91
+ */
92
+ getAllStyleUsages(data: Nullable<ICellData>[][], workbook: Workbook, worksheet?: Worksheet): IStyleUsage[];
93
+ }
@@ -1,6 +1,6 @@
1
1
  import { Injector, ICommandService } from '@univerjs/core';
2
+ import { z } from '@univerjs-pro/mcp';
2
3
  import { SheetInterceptorService } from '@univerjs/sheets';
3
- import { z } from 'zod';
4
4
  /**
5
5
  * Get UniverAPI instance from globalThis (temporary implementation)
6
6
  */
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const ZodConditionalFormatRuleSchema: z.ZodObject<{
4
3
  rule_id: z.ZodOptional<z.ZodString>;
5
4
  range: z.ZodOptional<z.ZodString>;
@@ -1,6 +1,5 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
2
2
  import { DataValidationOperator } from '@univerjs/core';
3
- import { z } from 'zod';
4
3
  export declare const dataValidationRuleSchema: z.ZodObject<{
5
4
  rule_id: z.ZodOptional<z.ZodString>;
6
5
  range_a1: z.ZodString;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const batchRangeDataItemSchema: z.ZodObject<{
4
3
  range: z.ZodString;
5
4
  value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const insertRowOperationSchema: z.ZodObject<{
4
3
  position: z.ZodNumber;
5
4
  how_many: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const renameSheetOperationSchema: z.ZodObject<{
4
3
  old_name: z.ZodString;
5
4
  new_name: z.ZodString;
@@ -1,5 +1,4 @@
1
- import { IMCPTool } from '@univerjs-pro/mcp';
2
- import { z } from 'zod';
1
+ import { IMCPTool, z } from '@univerjs-pro/mcp';
3
2
  export declare const cellDimensionRequestSchema: z.ZodObject<{
4
3
  range: z.ZodString;
5
4
  width: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodArray<z.ZodNumber>]>>;
package/lib/umd/facade.js CHANGED
@@ -1 +1 @@
1
- function _0x1d0b(_0x1af822,_0x35e450){_0x1af822=_0x1af822-0x145;const _0x12be16=_0x12be();let _0x1d0bd5=_0x12be16[_0x1af822];return _0x1d0bd5;}(function(_0x74d4b5,_0x731137){const _0x52e668=_0x1d0b,_0x18ee72=_0x74d4b5();while(!![]){try{const _0xe8affa=parseInt(_0x52e668(0x14d))/0x1+-parseInt(_0x52e668(0x163))/0x2*(-parseInt(_0x52e668(0x146))/0x3)+parseInt(_0x52e668(0x161))/0x4+-parseInt(_0x52e668(0x164))/0x5*(parseInt(_0x52e668(0x153))/0x6)+parseInt(_0x52e668(0x14a))/0x7+parseInt(_0x52e668(0x155))/0x8*(parseInt(_0x52e668(0x154))/0x9)+parseInt(_0x52e668(0x173))/0xa*(-parseInt(_0x52e668(0x149))/0xb);if(_0xe8affa===_0x731137)break;else _0x18ee72['push'](_0x18ee72['shift']());}catch(_0x1dac02){_0x18ee72['push'](_0x18ee72['shift']());}}}(_0x12be,0x3320b),function(_0x2d8417,_0x4f0d01){const _0x3265ad=_0x1d0b;typeof exports==_0x3265ad(0x14e)&&typeof module<'u'?_0x4f0d01(require('@univerjs/core/facade'),require('@univerjs/sheets-formula/facade'),require('@univerjs/sheets-data-validation/facade'),require('@univerjs/sheets/facade'),require('@univerjs-pro/sheets-mcp'),require('@univerjs/core')):typeof define==_0x3265ad(0x15e)&&define['amd']?define(['@univerjs/core/facade',_0x3265ad(0x175),_0x3265ad(0x16a),_0x3265ad(0x147),_0x3265ad(0x148),_0x3265ad(0x177)],_0x4f0d01):(_0x2d8417=typeof globalThis<'u'?globalThis:_0x2d8417||self,_0x4f0d01(_0x2d8417[_0x3265ad(0x166)],_0x2d8417['UniverSheetsFormulaFacade'],_0x2d8417[_0x3265ad(0x159)],_0x2d8417[_0x3265ad(0x14f)],_0x2d8417[_0x3265ad(0x16e)],_0x2d8417[_0x3265ad(0x156)]));}(this,function(_0x1a7fc7,_0x56fe80,_0x142071,_0x275eb9,_0x25196f,_0x44ecfa){'use strict';const _0x2fcaf4=_0x1d0b;class _0x1f4d24 extends _0x1a7fc7[_0x2fcaf4(0x16f)]{async[_0x2fcaf4(0x15d)](){const _0x51e7d4=_0x2fcaf4;return this['getActiveWorkbook']()[_0x51e7d4(0x15d)]();}}_0x1a7fc7[_0x2fcaf4(0x16f)][_0x2fcaf4(0x145)](_0x1f4d24);class _0x5879ee extends _0x275eb9[_0x2fcaf4(0x14c)]{async['getLintErrors'](){const _0x24c50b=_0x2fcaf4,_0x4e01b8=this[_0x24c50b(0x176)](),_0x4a250c=await this[_0x24c50b(0x174)]();return{'formulaErrors':_0x4e01b8,'dataValidationErrors':_0x4a250c};}}_0x275eb9[_0x2fcaf4(0x14c)]['extend'](_0x5879ee);class _0x49ac67 extends _0x275eb9[_0x2fcaf4(0x172)]{async['getFormulaUsages'](){const _0x2de7d4=_0x2fcaf4,_0x327e79=this['_injector'][_0x2de7d4(0x171)](_0x25196f[_0x2de7d4(0x15f)]),_0x4c56a8=this[_0x2de7d4(0x165)](0x0,0x0,this['getMaxRows'](),this[_0x2de7d4(0x15b)]())[_0x2de7d4(0x152)]();return await _0x327e79[_0x2de7d4(0x15c)](_0x4c56a8);}async[_0x2fcaf4(0x158)](){const _0x3bb582=_0x2fcaf4;return(await this['getFormulaUsages']())[_0x3bb582(0x170)](_0x25196f[_0x3bb582(0x178)]);}}_0x275eb9[_0x2fcaf4(0x172)]['extend'](_0x49ac67);class _0x4c5e79 extends _0x275eb9[_0x2fcaf4(0x168)]{async['getFormulaUsages'](){const _0x59a593=_0x2fcaf4,_0x466b88=this[_0x59a593(0x15a)][_0x59a593(0x171)](_0x25196f[_0x59a593(0x15f)]),_0x2df5e2=(({startRow:_0x11f293,endRow:_0x1a69d1,startColumn:_0x2fe16e,endColumn:_0x329e37})=>{const _0x3ce3e9=_0x59a593,_0x18e5bf=[];for(let _0x21705d=_0x11f293;_0x21705d<=_0x1a69d1;_0x21705d++){const _0x3dd65c=[];for(let _0x222ebf=_0x2fe16e;_0x222ebf<=_0x329e37;_0x222ebf++)_0x3dd65c[_0x3ce3e9(0x157)](this[_0x3ce3e9(0x16d)][_0x3ce3e9(0x160)](_0x21705d,_0x222ebf));_0x18e5bf['push'](_0x3dd65c);}return _0x18e5bf;})({'startRow':0x0,'endRow':this[_0x59a593(0x16d)][_0x59a593(0x169)](),'startColumn':0x0,'endColumn':this[_0x59a593(0x16d)][_0x59a593(0x15b)]()}),_0x3b2bae=await _0x466b88[_0x59a593(0x15c)](_0x2df5e2),_0x4a711e=this[_0x59a593(0x165)](),_0x1c2add=[];for(let _0x4513d0=0x0;_0x4513d0<_0x3b2bae[_0x59a593(0x14b)];_0x4513d0++){const _0x4fb678=_0x3b2bae[_0x4513d0],_0x222407=_0x4fb678[_0x59a593(0x167)],_0x1cde55=[];for(let _0x30c6fc=0x0;_0x30c6fc<_0x222407[_0x59a593(0x14b)];_0x30c6fc++){const _0x48888c=_0x222407[_0x30c6fc],_0x36bbfe=_0x44ecfa['getIntersectRange'](_0x48888c,_0x4a711e);_0x36bbfe&&_0x1cde55[_0x59a593(0x157)](_0x36bbfe);}if(_0x1cde55['length']>0x0){if(_0x4fb678[_0x59a593(0x167)]=_0x1cde55,!(_0x4fb678[_0x59a593(0x162)][_0x59a593(0x16c)]>=_0x4a711e[_0x59a593(0x16c)]&&_0x4fb678[_0x59a593(0x162)]['startRow']<=_0x4a711e['endRow']&&_0x4fb678[_0x59a593(0x162)][_0x59a593(0x150)]>=_0x4a711e[_0x59a593(0x150)]&&_0x4fb678[_0x59a593(0x162)][_0x59a593(0x150)]<=_0x4a711e[_0x59a593(0x16b)])){const _0x56fd9e=_0x1cde55[0x0],_0x42a5e2=_0x56fd9e['startRow']-_0x4fb678[_0x59a593(0x162)]['startRow'],_0x598d38=_0x56fd9e[_0x59a593(0x150)]-_0x4fb678[_0x59a593(0x162)][_0x59a593(0x150)];_0x4fb678['formula']=await _0x466b88['moveFormulaRefOffset'](_0x4fb678[_0x59a593(0x151)],_0x598d38,_0x42a5e2),_0x4fb678[_0x59a593(0x162)]={'startRow':_0x56fd9e[_0x59a593(0x16c)],'endRow':_0x56fd9e[_0x59a593(0x16c)],'startColumn':_0x56fd9e[_0x59a593(0x150)],'endColumn':_0x56fd9e['startColumn']};}_0x1c2add[_0x59a593(0x157)](_0x4fb678);}}return _0x1c2add;}async[_0x2fcaf4(0x158)](){const _0x468883=_0x2fcaf4;return(await this['getFormulaUsages']())[_0x468883(0x170)](_0x25196f[_0x468883(0x178)]);}}_0x275eb9['FRange'][_0x2fcaf4(0x145)](_0x4c5e79);}));function _0x12be(){const _0x5b8fca=['@univerjs-pro/sheets-mcp','3179IqUKEt','2901857upQrYu','length','FWorkbook','108233LhRhZm','object','UniverSheetsFacade','startColumn','formula','getCellDataGrid','6unzoSf','9SqqztJ','1892200czGUel','UniverCore','push','getFormulaUsagesAsA1','UniverSheetsDataValidationFacade','_injector','getMaxColumns','getAllFormulaUsages','getLintErrors','function','IFormulaUsageAnalyzer','getCellRaw','381652wtkLqH','firstOccurrence','50esssYx','917005lbSxdj','getRange','UniverCoreFacade','filledRanges','FRange','getMaxRows','@univerjs/sheets-data-validation/facade','endColumn','startRow','_worksheet','UniverProSheetsMcp','FUniver','map','get','FWorksheet','23930RgDJmO','getAllDataValidationErrorAsync','@univerjs/sheets-formula/facade','getAllFormulaError','@univerjs/core','toA1','extend','27561erCZMI','@univerjs/sheets/facade'];_0x12be=function(){return _0x5b8fca;};return _0x12be();}
1
+ function _0x4625(_0x3ff285,_0x15bcc3){_0x3ff285=_0x3ff285-0x192;const _0x1ab06d=_0x1ab0();let _0x4625c8=_0x1ab06d[_0x3ff285];return _0x4625c8;}function _0x1ab0(){const _0xbddfc1=['toA1','getAllFormulaError','IStyleUsageAnalyzer','filledRanges','getSizeUsages','getFormulaUsages','8130246hQriBU','styleToA1','get','formulaToA1','getAllFormulaUsages','startColumn','getAllSizeUsages','map','getRange','UniverProSheetsMcp','getMaxColumns','getCellDataGrid','extend','endColumn','IFormulaUsageAnalyzer','679eaPmbJ','endRow','startRow','UniverSheetsFacade','formula','31251hASTsb','firstOccurrence','getActiveWorkbook','@univerjs/sheets/facade','36871353xvMKWY','push','_worksheet','getAllDataValidationErrorAsync','FWorkbook','@univerjs/core','amd','function','getStyleUsagesAsA1','getCellRaw','ISizeUsageAnalyzer','_injector','UniverCoreFacade','42078iRIeUC','object','_workbook','updateConfig','getLintErrors','UniverCore','22rkgqyS','FUniver','3704lcfDYB','getIntersectRange','getAllStyleUsages','2219700oXDFTJ','length','getFormulaUsagesAsA1','getMaxRows','@univerjs/sheets-data-validation/facade','4203408yVrVJf','FRange','getStyleUsages','getSizeUsagesAsA1'];_0x1ab0=function(){return _0xbddfc1;};return _0x1ab0();}(function(_0x166368,_0x24838a){const _0x4dc8f6=_0x4625,_0x293ae6=_0x166368();while(!![]){try{const _0x2cb276=parseInt(_0x4dc8f6(0x1a3))/0x1*(-parseInt(_0x4dc8f6(0x1ba))/0x2)+-parseInt(_0x4dc8f6(0x1b4))/0x3+-parseInt(_0x4dc8f6(0x1c4))/0x4+-parseInt(_0x4dc8f6(0x1bf))/0x5+-parseInt(_0x4dc8f6(0x1ce))/0x6+-parseInt(_0x4dc8f6(0x19e))/0x7*(parseInt(_0x4dc8f6(0x1bc))/0x8)+parseInt(_0x4dc8f6(0x1a7))/0x9;if(_0x2cb276===_0x24838a)break;else _0x293ae6['push'](_0x293ae6['shift']());}catch(_0x5548c8){_0x293ae6['push'](_0x293ae6['shift']());}}}(_0x1ab0,0xce1fe),function(_0x5e3f51,_0x535906){const _0x2d34d9=_0x4625;typeof exports==_0x2d34d9(0x1b5)&&typeof module<'u'?_0x535906(require('@univerjs/core/facade'),require('@univerjs/sheets-formula/facade'),require('@univerjs/sheets-data-validation/facade'),require('@univerjs/sheets/facade'),require('@univerjs-pro/sheets-mcp'),require('@univerjs/core')):typeof define==_0x2d34d9(0x1ae)&&define[_0x2d34d9(0x1ad)]?define(['@univerjs/core/facade','@univerjs/sheets-formula/facade',_0x2d34d9(0x1c3),_0x2d34d9(0x1a6),'@univerjs-pro/sheets-mcp',_0x2d34d9(0x1ac)],_0x535906):(_0x5e3f51=typeof globalThis<'u'?globalThis:_0x5e3f51||self,_0x535906(_0x5e3f51[_0x2d34d9(0x1b3)],_0x5e3f51['UniverSheetsFormulaFacade'],_0x5e3f51['UniverSheetsDataValidationFacade'],_0x5e3f51[_0x2d34d9(0x1a1)],_0x5e3f51[_0x2d34d9(0x198)],_0x5e3f51[_0x2d34d9(0x1b9)]));}(this,function(_0x313e11,_0x184610,_0x49f374,_0x2fba3f,_0x104647,_0x67a8a){'use strict';const _0x2e6d5f=_0x4625;class _0x10f173 extends _0x313e11[_0x2e6d5f(0x1bb)]{async[_0x2e6d5f(0x1b8)](){const _0x3f31ab=_0x2e6d5f;return this[_0x3f31ab(0x1a5)]()[_0x3f31ab(0x1b8)]();}}_0x313e11[_0x2e6d5f(0x1bb)][_0x2e6d5f(0x19b)](_0x10f173);class _0x4414ab extends _0x2fba3f[_0x2e6d5f(0x1ab)]{async[_0x2e6d5f(0x1b8)](){const _0x5b2b7b=_0x2e6d5f,_0x254ca9=this[_0x5b2b7b(0x1c9)](),_0x4a230b=await this[_0x5b2b7b(0x1aa)]();return{'formulaErrors':_0x254ca9,'dataValidationErrors':_0x4a230b};}}_0x2fba3f[_0x2e6d5f(0x1ab)][_0x2e6d5f(0x19b)](_0x4414ab);class _0x974fc9 extends _0x2fba3f['FWorksheet']{async[_0x2e6d5f(0x1cd)](){const _0x1e6171=_0x2e6d5f,_0x3d7ec4=this[_0x1e6171(0x1b2)]['get'](_0x104647[_0x1e6171(0x19d)]),_0x420981=this[_0x1e6171(0x197)](0x0,0x0,this[_0x1e6171(0x1c2)](),this[_0x1e6171(0x199)]())['getCellDataGrid']();return await _0x3d7ec4[_0x1e6171(0x193)](_0x420981);}async[_0x2e6d5f(0x1c1)](){const _0x15d899=_0x2e6d5f;return(await this[_0x15d899(0x1cd)]())['map'](_0x104647[_0x15d899(0x192)]);}[_0x2e6d5f(0x1c6)](_0x5d9920){const _0x29a398=_0x2e6d5f,_0x248b2f=this[_0x29a398(0x1b2)][_0x29a398(0x1d0)](_0x104647[_0x29a398(0x1ca)]),_0x48e79c=this[_0x29a398(0x197)](0x0,0x0,this[_0x29a398(0x1c2)](),this[_0x29a398(0x199)]())[_0x29a398(0x19a)]();return _0x248b2f[_0x29a398(0x1b7)](_0x5d9920),_0x248b2f['getAllStyleUsages'](_0x48e79c,this[_0x29a398(0x1b6)],this[_0x29a398(0x1a9)]);}[_0x2e6d5f(0x1af)](_0x4019cf){const _0x480906=_0x2e6d5f;return this[_0x480906(0x1c6)](_0x4019cf)[_0x480906(0x196)](_0x104647[_0x480906(0x1cf)]);}[_0x2e6d5f(0x1cc)](_0x313f52){const _0x597547=_0x2e6d5f,_0x5c0419=this['_injector'][_0x597547(0x1d0)](_0x104647[_0x597547(0x1b1)]);return _0x5c0419[_0x597547(0x1b7)](_0x313f52),_0x5c0419[_0x597547(0x195)](this['_worksheet']);}[_0x2e6d5f(0x1c7)](_0x162528){const _0x1d3170=_0x2e6d5f,_0x408abe=this[_0x1d3170(0x1b2)][_0x1d3170(0x1d0)](_0x104647['ISizeUsageAnalyzer']);_0x408abe[_0x1d3170(0x1b7)](_0x162528);const _0x4ff298=_0x408abe[_0x1d3170(0x195)](this[_0x1d3170(0x1a9)]);return _0x408abe['toA1'](_0x4ff298);}}_0x2fba3f['FWorksheet']['extend'](_0x974fc9);class _0x4c360c extends _0x2fba3f[_0x2e6d5f(0x1c5)]{async[_0x2e6d5f(0x1cd)](){const _0x499cab=_0x2e6d5f,_0x468381=this[_0x499cab(0x1b2)][_0x499cab(0x1d0)](_0x104647[_0x499cab(0x19d)]),_0x5cd255=(({startRow:_0x56a809,endRow:_0x52d994,startColumn:_0x1963dd,endColumn:_0x5f0660})=>{const _0x146fd7=_0x499cab,_0x3e9b3c=[];for(let _0x1835b6=_0x56a809;_0x1835b6<=_0x52d994;_0x1835b6++){const _0x1ea28d=[];for(let _0x38858a=_0x1963dd;_0x38858a<=_0x5f0660;_0x38858a++)_0x1ea28d[_0x146fd7(0x1a8)](this['_worksheet'][_0x146fd7(0x1b0)](_0x1835b6,_0x38858a));_0x3e9b3c[_0x146fd7(0x1a8)](_0x1ea28d);}return _0x3e9b3c;})({'startRow':0x0,'endRow':this[_0x499cab(0x1a9)]['getMaxRows'](),'startColumn':0x0,'endColumn':this['_worksheet'][_0x499cab(0x199)]()}),_0x130086=await _0x468381[_0x499cab(0x193)](_0x5cd255),_0x59f779=this[_0x499cab(0x197)](),_0x112f88=[];for(let _0x19984e=0x0;_0x19984e<_0x130086[_0x499cab(0x1c0)];_0x19984e++){const _0x548a57=_0x130086[_0x19984e],_0x32cd66=_0x548a57[_0x499cab(0x1cb)],_0x33556f=[];for(let _0x488320=0x0;_0x488320<_0x32cd66[_0x499cab(0x1c0)];_0x488320++){const _0x314758=_0x32cd66[_0x488320],_0x1df1b8=_0x67a8a[_0x499cab(0x1bd)](_0x314758,_0x59f779);_0x1df1b8&&_0x33556f[_0x499cab(0x1a8)](_0x1df1b8);}if(_0x33556f[_0x499cab(0x1c0)]>0x0){if(_0x548a57['filledRanges']=_0x33556f,!(_0x548a57[_0x499cab(0x1a4)][_0x499cab(0x1a0)]>=_0x59f779[_0x499cab(0x1a0)]&&_0x548a57[_0x499cab(0x1a4)][_0x499cab(0x1a0)]<=_0x59f779[_0x499cab(0x19f)]&&_0x548a57[_0x499cab(0x1a4)]['startColumn']>=_0x59f779['startColumn']&&_0x548a57[_0x499cab(0x1a4)]['startColumn']<=_0x59f779[_0x499cab(0x19c)])){const _0x3f3da1=_0x33556f[0x0],_0x32aae6=_0x3f3da1[_0x499cab(0x1a0)]-_0x548a57[_0x499cab(0x1a4)][_0x499cab(0x1a0)],_0x5a586f=_0x3f3da1[_0x499cab(0x194)]-_0x548a57[_0x499cab(0x1a4)][_0x499cab(0x194)];_0x548a57[_0x499cab(0x1a2)]=await _0x468381['moveFormulaRefOffset'](_0x548a57[_0x499cab(0x1a2)],_0x5a586f,_0x32aae6),_0x548a57['firstOccurrence']={'startRow':_0x3f3da1[_0x499cab(0x1a0)],'endRow':_0x3f3da1[_0x499cab(0x1a0)],'startColumn':_0x3f3da1[_0x499cab(0x194)],'endColumn':_0x3f3da1[_0x499cab(0x194)]};}_0x112f88[_0x499cab(0x1a8)](_0x548a57);}}return _0x112f88;}async[_0x2e6d5f(0x1c1)](){const _0xc32145=_0x2e6d5f;return(await this[_0xc32145(0x1cd)]())['map'](_0x104647['formulaToA1']);}[_0x2e6d5f(0x1c6)](_0x55539f){const _0x38d1c6=_0x2e6d5f,_0x25569d=this[_0x38d1c6(0x1b2)][_0x38d1c6(0x1d0)](_0x104647[_0x38d1c6(0x1ca)]),_0x413380=(({startRow:_0x3518f7,endRow:_0x1dc34e,startColumn:_0x40d3bb,endColumn:_0x457b1a})=>{const _0x5c2249=_0x38d1c6,_0x52760d=[];for(let _0x5160ae=_0x3518f7;_0x5160ae<=_0x1dc34e;_0x5160ae++){const _0x733030=[];for(let _0x297fbf=_0x40d3bb;_0x297fbf<=_0x457b1a;_0x297fbf++)_0x733030[_0x5c2249(0x1a8)](this['_worksheet'][_0x5c2249(0x1b0)](_0x5160ae,_0x297fbf));_0x52760d[_0x5c2249(0x1a8)](_0x733030);}return _0x52760d;})({'startRow':0x0,'endRow':this[_0x38d1c6(0x1a9)]['getMaxRows'](),'startColumn':0x0,'endColumn':this['_worksheet'][_0x38d1c6(0x199)]()});_0x25569d['updateConfig'](_0x55539f);const _0x101c24=_0x25569d[_0x38d1c6(0x1be)](_0x413380,this[_0x38d1c6(0x1b6)],this[_0x38d1c6(0x1a9)]),_0x2f283b=this[_0x38d1c6(0x197)](),_0x1dcc88=[];for(let _0x7ef7e9=0x0;_0x7ef7e9<_0x101c24['length'];_0x7ef7e9++){const _0x5f521d=_0x101c24[_0x7ef7e9],_0x42a366=_0x5f521d[_0x38d1c6(0x1cb)],_0x2fd5eb=[];for(let _0x251703=0x0;_0x251703<_0x42a366[_0x38d1c6(0x1c0)];_0x251703++){const _0x45a30d=_0x42a366[_0x251703],_0x14667f=_0x67a8a[_0x38d1c6(0x1bd)](_0x45a30d,_0x2f283b);_0x14667f&&_0x2fd5eb[_0x38d1c6(0x1a8)](_0x14667f);}_0x2fd5eb[_0x38d1c6(0x1c0)]>0x0&&(_0x5f521d[_0x38d1c6(0x1cb)]=_0x2fd5eb,_0x1dcc88[_0x38d1c6(0x1a8)](_0x5f521d));}return _0x1dcc88;}[_0x2e6d5f(0x1af)](_0x42b005){const _0x3a94d7=_0x2e6d5f;return this[_0x3a94d7(0x1c6)](_0x42b005)[_0x3a94d7(0x196)](_0x104647[_0x3a94d7(0x1cf)]);}[_0x2e6d5f(0x1cc)](_0x379034){const _0x220ba7=_0x2e6d5f,_0xbe9719=this[_0x220ba7(0x1b2)]['get'](_0x104647[_0x220ba7(0x1b1)]),_0x1fe859=this[_0x220ba7(0x197)]();return _0xbe9719[_0x220ba7(0x1b7)](_0x379034),_0xbe9719[_0x220ba7(0x195)](this[_0x220ba7(0x1a9)],_0x1fe859[_0x220ba7(0x1a0)],_0x1fe859[_0x220ba7(0x19f)],_0x1fe859['startColumn'],_0x1fe859[_0x220ba7(0x19c)]);}[_0x2e6d5f(0x1c7)](_0x52893d){const _0x3bdaf2=_0x2e6d5f,_0xe87e16=this[_0x3bdaf2(0x1cc)](_0x52893d);return this['_injector'][_0x3bdaf2(0x1d0)](_0x104647[_0x3bdaf2(0x1b1)])[_0x3bdaf2(0x1c8)](_0xe87e16);}}_0x2fba3f[_0x2e6d5f(0x1c5)][_0x2e6d5f(0x19b)](_0x4c360c);}));