@rowsncolumns/utils 9.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +100 -0
- package/dist/cjs/array.d.ts +3 -0
- package/dist/cjs/array.d.ts.map +1 -0
- package/dist/cjs/array.js +19 -0
- package/dist/cjs/cell-data-helpers.d.ts +19 -0
- package/dist/cjs/cell-data-helpers.d.ts.map +1 -0
- package/dist/cjs/cell-data-helpers.js +64 -0
- package/dist/cjs/color.d.ts +20 -0
- package/dist/cjs/color.d.ts.map +1 -0
- package/dist/cjs/color.js +168 -0
- package/dist/cjs/colors.d.ts +2 -0
- package/dist/cjs/colors.d.ts.map +1 -0
- package/dist/cjs/colors.js +78 -0
- package/dist/cjs/conditional-format.d.ts +49 -0
- package/dist/cjs/conditional-format.d.ts.map +1 -0
- package/dist/cjs/conditional-format.js +227 -0
- package/dist/cjs/content-hash.d.ts +16 -0
- package/dist/cjs/content-hash.d.ts.map +1 -0
- package/dist/cjs/content-hash.js +72 -0
- package/dist/cjs/data-validation.d.ts +54 -0
- package/dist/cjs/data-validation.d.ts.map +1 -0
- package/dist/cjs/data-validation.js +249 -0
- package/dist/cjs/date.d.ts +15 -0
- package/dist/cjs/date.d.ts.map +1 -0
- package/dist/cjs/date.js +56 -0
- package/dist/cjs/dom.d.ts +10 -0
- package/dist/cjs/dom.d.ts.map +1 -0
- package/dist/cjs/dom.js +97 -0
- package/dist/cjs/formatter.d.ts +22 -0
- package/dist/cjs/formatter.d.ts.map +1 -0
- package/dist/cjs/formatter.js +264 -0
- package/dist/cjs/formula-refs.d.ts +7 -0
- package/dist/cjs/formula-refs.d.ts.map +1 -0
- package/dist/cjs/formula-refs.js +54 -0
- package/dist/cjs/formula.d.ts +80 -0
- package/dist/cjs/formula.d.ts.map +1 -0
- package/dist/cjs/formula.js +401 -0
- package/dist/cjs/index.d.ts +24 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +26 -0
- package/dist/cjs/locale.d.ts +34 -0
- package/dist/cjs/locale.d.ts.map +1 -0
- package/dist/cjs/locale.js +260 -0
- package/dist/cjs/log.d.ts +4 -0
- package/dist/cjs/log.d.ts.map +1 -0
- package/dist/cjs/log.js +28 -0
- package/dist/cjs/memoize.d.ts +18 -0
- package/dist/cjs/memoize.d.ts.map +1 -0
- package/dist/cjs/memoize.js +128 -0
- package/dist/cjs/numbers.d.ts +19 -0
- package/dist/cjs/numbers.d.ts.map +1 -0
- package/dist/cjs/numbers.js +47 -0
- package/dist/cjs/selection.d.ts +88 -0
- package/dist/cjs/selection.d.ts.map +1 -0
- package/dist/cjs/selection.js +368 -0
- package/dist/cjs/shared-string-canonical.d.ts +18 -0
- package/dist/cjs/shared-string-canonical.d.ts.map +1 -0
- package/dist/cjs/shared-string-canonical.js +74 -0
- package/dist/cjs/sort.d.ts +15 -0
- package/dist/cjs/sort.d.ts.map +1 -0
- package/dist/cjs/sort.js +44 -0
- package/dist/cjs/string.d.ts +74 -0
- package/dist/cjs/string.d.ts.map +1 -0
- package/dist/cjs/string.js +237 -0
- package/dist/cjs/table-styles.d.ts +56 -0
- package/dist/cjs/table-styles.d.ts.map +1 -0
- package/dist/cjs/table-styles.js +362 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/cjs/typeguards.d.ts +4 -0
- package/dist/cjs/typeguards.d.ts.map +1 -0
- package/dist/cjs/typeguards.js +15 -0
- package/dist/cjs/uuid.d.ts +8 -0
- package/dist/cjs/uuid.d.ts.map +1 -0
- package/dist/cjs/uuid.js +30 -0
- package/dist/cjs/vitest.config.d.ts +3 -0
- package/dist/cjs/vitest.config.d.ts.map +1 -0
- package/dist/cjs/vitest.config.js +9 -0
- package/dist/esm/array.d.ts +3 -0
- package/dist/esm/array.d.ts.map +1 -0
- package/dist/esm/array.js +14 -0
- package/dist/esm/cell-data-helpers.d.ts +19 -0
- package/dist/esm/cell-data-helpers.d.ts.map +1 -0
- package/dist/esm/cell-data-helpers.js +39 -0
- package/dist/esm/color.d.ts +20 -0
- package/dist/esm/color.d.ts.map +1 -0
- package/dist/esm/color.js +152 -0
- package/dist/esm/colors.d.ts +2 -0
- package/dist/esm/colors.d.ts.map +1 -0
- package/dist/esm/colors.js +75 -0
- package/dist/esm/conditional-format.d.ts +49 -0
- package/dist/esm/conditional-format.d.ts.map +1 -0
- package/dist/esm/conditional-format.js +219 -0
- package/dist/esm/content-hash.d.ts +16 -0
- package/dist/esm/content-hash.d.ts.map +1 -0
- package/dist/esm/content-hash.js +68 -0
- package/dist/esm/data-validation.d.ts +54 -0
- package/dist/esm/data-validation.d.ts.map +1 -0
- package/dist/esm/data-validation.js +237 -0
- package/dist/esm/date.d.ts +15 -0
- package/dist/esm/date.d.ts.map +1 -0
- package/dist/esm/date.js +46 -0
- package/dist/esm/dom.d.ts +10 -0
- package/dist/esm/dom.d.ts.map +1 -0
- package/dist/esm/dom.js +90 -0
- package/dist/esm/formatter.d.ts +22 -0
- package/dist/esm/formatter.d.ts.map +1 -0
- package/dist/esm/formatter.js +253 -0
- package/dist/esm/formula-refs.d.ts +7 -0
- package/dist/esm/formula-refs.d.ts.map +1 -0
- package/dist/esm/formula-refs.js +49 -0
- package/dist/esm/formula.d.ts +80 -0
- package/dist/esm/formula.d.ts.map +1 -0
- package/dist/esm/formula.js +298 -0
- package/dist/esm/index.d.ts +24 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +23 -0
- package/dist/esm/locale.d.ts +34 -0
- package/dist/esm/locale.d.ts.map +1 -0
- package/dist/esm/locale.js +223 -0
- package/dist/esm/log.d.ts +4 -0
- package/dist/esm/log.d.ts.map +1 -0
- package/dist/esm/log.js +3 -0
- package/dist/esm/memoize.d.ts +18 -0
- package/dist/esm/memoize.d.ts.map +1 -0
- package/dist/esm/memoize.js +95 -0
- package/dist/esm/numbers.d.ts +19 -0
- package/dist/esm/numbers.d.ts.map +1 -0
- package/dist/esm/numbers.js +40 -0
- package/dist/esm/selection.d.ts +88 -0
- package/dist/esm/selection.d.ts.map +1 -0
- package/dist/esm/selection.js +311 -0
- package/dist/esm/shared-string-canonical.d.ts +18 -0
- package/dist/esm/shared-string-canonical.d.ts.map +1 -0
- package/dist/esm/shared-string-canonical.js +68 -0
- package/dist/esm/sort.d.ts +15 -0
- package/dist/esm/sort.d.ts.map +1 -0
- package/dist/esm/sort.js +39 -0
- package/dist/esm/string.d.ts +74 -0
- package/dist/esm/string.d.ts.map +1 -0
- package/dist/esm/string.js +213 -0
- package/dist/esm/table-styles.d.ts +56 -0
- package/dist/esm/table-styles.d.ts.map +1 -0
- package/dist/esm/table-styles.js +367 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/esm/typeguards.d.ts +4 -0
- package/dist/esm/typeguards.d.ts.map +1 -0
- package/dist/esm/typeguards.js +7 -0
- package/dist/esm/uuid.d.ts +8 -0
- package/dist/esm/uuid.d.ts.map +1 -0
- package/dist/esm/uuid.js +25 -0
- package/dist/esm/vitest.config.d.ts +3 -0
- package/dist/esm/vitest.config.d.ts.map +1 -0
- package/dist/esm/vitest.config.js +7 -0
- package/package.json +49 -0
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getColumnIndexFromColumnName = exports.pixelToPoint = exports.pointToPixel = exports.cellToArea = exports.rescopeSheetRangesOnMove = exports.areaIntersection = exports.areaInsideArea = exports.areaIntersects = exports.selectionFromActiveCell = exports.isCellWithinBounds = exports.isAreasEqual = exports.generateSelectionsFromFormula = exports.checkIfStringIsReference = exports.selectionToAddress = exports.addressToSheetRange = exports.addressToSelection = exports.DEFAULT_ACTIVE_CELL = exports.DEFAULT_COLUMN_WIDTH = exports.DEFAULT_ROW_HEIGHT = exports.DEFAULT_COLUMN_COUNT = exports.DEFAULT_ROW_COUNT = exports.MAX_COLUMN_COUNT = exports.MAX_ROW_COUNT = exports.isSelection = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var string_1 = require("./string");
|
|
6
|
+
var typeguards_1 = require("./typeguards");
|
|
7
|
+
var string_2 = require("./string");
|
|
8
|
+
var isSelection = function (sel) {
|
|
9
|
+
return !!(sel === null || sel === void 0 ? void 0 : sel.range);
|
|
10
|
+
};
|
|
11
|
+
exports.isSelection = isSelection;
|
|
12
|
+
exports.MAX_ROW_COUNT = 1048576;
|
|
13
|
+
exports.MAX_COLUMN_COUNT = 16384;
|
|
14
|
+
exports.DEFAULT_ROW_COUNT = 1000;
|
|
15
|
+
exports.DEFAULT_COLUMN_COUNT = 100;
|
|
16
|
+
exports.DEFAULT_ROW_HEIGHT = 21;
|
|
17
|
+
exports.DEFAULT_COLUMN_WIDTH = 100;
|
|
18
|
+
exports.DEFAULT_ACTIVE_CELL = Object.freeze({
|
|
19
|
+
rowIndex: 1,
|
|
20
|
+
columnIndex: 1,
|
|
21
|
+
});
|
|
22
|
+
var addressToSelection = function (address, rowCount, columnCount) {
|
|
23
|
+
if (rowCount === void 0) { rowCount = exports.MAX_ROW_COUNT; }
|
|
24
|
+
if (columnCount === void 0) { columnCount = exports.MAX_COLUMN_COUNT; }
|
|
25
|
+
var _a = tslib_1.__read(address.split(":"), 2), from = _a[0], to = _a[1];
|
|
26
|
+
if (!from)
|
|
27
|
+
return undefined;
|
|
28
|
+
if (!to)
|
|
29
|
+
to = from;
|
|
30
|
+
var fromCell = (0, string_2.addressToCell)(from, {
|
|
31
|
+
position: "start",
|
|
32
|
+
rowCount: rowCount,
|
|
33
|
+
columnCount: columnCount,
|
|
34
|
+
});
|
|
35
|
+
var toCell = (0, string_2.addressToCell)(to, {
|
|
36
|
+
position: "end",
|
|
37
|
+
rowCount: rowCount,
|
|
38
|
+
columnCount: columnCount,
|
|
39
|
+
});
|
|
40
|
+
if (!fromCell || !toCell)
|
|
41
|
+
return undefined;
|
|
42
|
+
return { range: (0, string_2.selectionBoundsFromCells)(fromCell, toCell) };
|
|
43
|
+
};
|
|
44
|
+
exports.addressToSelection = addressToSelection;
|
|
45
|
+
var addressToSheetRange = function (address, sheetId, rowCount, columnCount) {
|
|
46
|
+
if (rowCount === void 0) { rowCount = exports.MAX_ROW_COUNT; }
|
|
47
|
+
if (columnCount === void 0) { columnCount = exports.MAX_COLUMN_COUNT; }
|
|
48
|
+
var selection = (0, exports.addressToSelection)(address, rowCount, columnCount);
|
|
49
|
+
if (!selection) {
|
|
50
|
+
return undefined;
|
|
51
|
+
}
|
|
52
|
+
return tslib_1.__assign({ sheetId: sheetId }, selection.range);
|
|
53
|
+
};
|
|
54
|
+
exports.addressToSheetRange = addressToSheetRange;
|
|
55
|
+
/**
|
|
56
|
+
* Convert a selection object to A1 address form (optionally sheet-qualified).
|
|
57
|
+
*/
|
|
58
|
+
var selectionToAddress = function (selection, sheetName, merges, rowCount, columnCount) {
|
|
59
|
+
if (merges === void 0) { merges = []; }
|
|
60
|
+
if (rowCount === void 0) { rowCount = exports.MAX_ROW_COUNT; }
|
|
61
|
+
if (columnCount === void 0) { columnCount = exports.MAX_COLUMN_COUNT; }
|
|
62
|
+
if (!selection) {
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
65
|
+
var mergedCell = merges === null || merges === void 0 ? void 0 : merges.find(function (merge) {
|
|
66
|
+
return (0, exports.isAreasEqual)(selection.range, merge);
|
|
67
|
+
});
|
|
68
|
+
var _a = mergedCell
|
|
69
|
+
? (0, exports.cellToArea)({
|
|
70
|
+
rowIndex: mergedCell.startRowIndex,
|
|
71
|
+
columnIndex: mergedCell.startColumnIndex,
|
|
72
|
+
})
|
|
73
|
+
: selection.range, startRowIndex = _a.startRowIndex, startColumnIndex = _a.startColumnIndex, endRowIndex = _a.endRowIndex, endColumnIndex = _a.endColumnIndex;
|
|
74
|
+
var isFullColumn = startRowIndex === 1 && endRowIndex === rowCount;
|
|
75
|
+
var isFullRow = startColumnIndex === 1 && endColumnIndex === columnCount;
|
|
76
|
+
var from = (0, string_2.cellToAddress)({
|
|
77
|
+
rowIndex: startRowIndex,
|
|
78
|
+
columnIndex: startColumnIndex,
|
|
79
|
+
}, undefined, undefined, isFullColumn, isFullRow);
|
|
80
|
+
var to = (0, string_2.cellToAddress)({
|
|
81
|
+
rowIndex: endRowIndex,
|
|
82
|
+
columnIndex: endColumnIndex,
|
|
83
|
+
}, undefined, undefined, isFullColumn, isFullRow);
|
|
84
|
+
var cellAddress = from === to && !isFullColumn && !isFullRow ? from : "".concat(from, ":").concat(to || "");
|
|
85
|
+
return "".concat(sheetName ? (0, string_2.sanitizeSheetName)(sheetName) + "!" : "").concat(cellAddress);
|
|
86
|
+
};
|
|
87
|
+
exports.selectionToAddress = selectionToAddress;
|
|
88
|
+
var checkIfStringIsReference = function (value) {
|
|
89
|
+
if (!value)
|
|
90
|
+
return false;
|
|
91
|
+
var v = String(value).trim();
|
|
92
|
+
var expr = v.startsWith("=") ? v.slice(1) : v;
|
|
93
|
+
var refRegex = /^(?:[^!]+!)?\$?[A-Z]+\$?\d+(?::\$?[A-Z]+\$?\d+)?$/i;
|
|
94
|
+
return refRegex.test(expr);
|
|
95
|
+
};
|
|
96
|
+
exports.checkIfStringIsReference = checkIfStringIsReference;
|
|
97
|
+
var generateSelectionsFromFormula = function (value, _sheetId, currentSheetName, activeCell, rowCount, columnCount, tokenizer, getSelectionFromTable, getSelectionFromNamedRange) {
|
|
98
|
+
var e_1, _a;
|
|
99
|
+
var _b, _c;
|
|
100
|
+
if (rowCount === void 0) { rowCount = exports.MAX_ROW_COUNT; }
|
|
101
|
+
if (columnCount === void 0) { columnCount = exports.MAX_COLUMN_COUNT; }
|
|
102
|
+
var selections = [];
|
|
103
|
+
if (!value)
|
|
104
|
+
return selections;
|
|
105
|
+
if (tokenizer && !(0, typeguards_1.isNil)(_sheetId)) {
|
|
106
|
+
var sheetId = _sheetId;
|
|
107
|
+
var tokens = (_b = tokenizer(value, currentSheetName)) !== null && _b !== void 0 ? _b : [];
|
|
108
|
+
try {
|
|
109
|
+
for (var tokens_1 = tslib_1.__values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) {
|
|
110
|
+
var token = tokens_1_1.value;
|
|
111
|
+
if (token.structured && getSelectionFromTable) {
|
|
112
|
+
var structuredSelection = getSelectionFromTable(sheetId, activeCell, token.tableName, token.columnNames, token.thisRow, token.specialItem);
|
|
113
|
+
if (structuredSelection && (0, exports.isSelection)(structuredSelection)) {
|
|
114
|
+
selections.push(structuredSelection);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
if (token.isNamedRange && getSelectionFromNamedRange) {
|
|
118
|
+
var namedRangeSelection = getSelectionFromNamedRange(token.image);
|
|
119
|
+
if (namedRangeSelection && (0, exports.isSelection)(namedRangeSelection)) {
|
|
120
|
+
selections.push(namedRangeSelection);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (token.selection) {
|
|
124
|
+
var address = token.image.slice(token.image.indexOf("!") + 1);
|
|
125
|
+
var selectionRange = (0, exports.addressToSelection)(address, rowCount, columnCount);
|
|
126
|
+
if (selectionRange) {
|
|
127
|
+
selections.push(tslib_1.__assign(tslib_1.__assign({}, selectionRange), { sheetName: (0, string_1.desanitizeSheetName)((_c = token.sheetName) !== null && _c !== void 0 ? _c : currentSheetName) }));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
133
|
+
finally {
|
|
134
|
+
try {
|
|
135
|
+
if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1);
|
|
136
|
+
}
|
|
137
|
+
finally { if (e_1) throw e_1.error; }
|
|
138
|
+
}
|
|
139
|
+
return selections;
|
|
140
|
+
}
|
|
141
|
+
var input = value.startsWith("=") ? value.slice(1) : value;
|
|
142
|
+
var refPattern = /((?:'[^']+'|[^'!,]+)!)?\$?[A-Z]+\$?\d+(?::\$?[A-Z]+\$?\d+)?/g;
|
|
143
|
+
var m;
|
|
144
|
+
while ((m = refPattern.exec(input))) {
|
|
145
|
+
var token = m[0];
|
|
146
|
+
var _d = tslib_1.__read(token.includes("!")
|
|
147
|
+
? [
|
|
148
|
+
token.slice(0, token.indexOf("!")),
|
|
149
|
+
token.slice(token.indexOf("!") + 1),
|
|
150
|
+
]
|
|
151
|
+
: [undefined, token], 2), maybeSheet = _d[0], addr = _d[1];
|
|
152
|
+
var sel = (0, exports.addressToSelection)(addr, rowCount, columnCount);
|
|
153
|
+
if (sel) {
|
|
154
|
+
selections.push(tslib_1.__assign(tslib_1.__assign({}, sel), { sheetName: maybeSheet
|
|
155
|
+
? maybeSheet.replace(/!$/, "").replace(/^'|'$/g, "") || undefined
|
|
156
|
+
: currentSheetName }));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return selections;
|
|
160
|
+
};
|
|
161
|
+
exports.generateSelectionsFromFormula = generateSelectionsFromFormula;
|
|
162
|
+
/**
|
|
163
|
+
* Check if two ranges are equal.
|
|
164
|
+
*/
|
|
165
|
+
var isAreasEqual = function (area1, area2) {
|
|
166
|
+
if (area1 === undefined || area2 === undefined) {
|
|
167
|
+
return false;
|
|
168
|
+
}
|
|
169
|
+
return (area1.endRowIndex === area2.endRowIndex &&
|
|
170
|
+
area1.startRowIndex === area2.startRowIndex &&
|
|
171
|
+
area1.startColumnIndex === area2.startColumnIndex &&
|
|
172
|
+
area1.endColumnIndex === area2.endColumnIndex);
|
|
173
|
+
};
|
|
174
|
+
exports.isAreasEqual = isAreasEqual;
|
|
175
|
+
/**
|
|
176
|
+
* Check if a cell is inside the provided range bounds.
|
|
177
|
+
*/
|
|
178
|
+
var isCellWithinBounds = function (cell, bounds) {
|
|
179
|
+
if (!bounds) {
|
|
180
|
+
return false;
|
|
181
|
+
}
|
|
182
|
+
if (cell.rowIndex < bounds.startRowIndex ||
|
|
183
|
+
cell.rowIndex > bounds.endRowIndex) {
|
|
184
|
+
return false;
|
|
185
|
+
}
|
|
186
|
+
if (cell.columnIndex < bounds.startColumnIndex ||
|
|
187
|
+
cell.columnIndex > bounds.endColumnIndex) {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
return true;
|
|
191
|
+
};
|
|
192
|
+
exports.isCellWithinBounds = isCellWithinBounds;
|
|
193
|
+
/**
|
|
194
|
+
* Return a single-cell selection for the active cell.
|
|
195
|
+
*/
|
|
196
|
+
var selectionFromActiveCell = function (activeCell) {
|
|
197
|
+
if (!activeCell)
|
|
198
|
+
return [];
|
|
199
|
+
return [
|
|
200
|
+
{
|
|
201
|
+
range: {
|
|
202
|
+
startRowIndex: activeCell.rowIndex,
|
|
203
|
+
startColumnIndex: activeCell.columnIndex,
|
|
204
|
+
endRowIndex: activeCell.rowIndex,
|
|
205
|
+
endColumnIndex: activeCell.columnIndex,
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
];
|
|
209
|
+
};
|
|
210
|
+
exports.selectionFromActiveCell = selectionFromActiveCell;
|
|
211
|
+
/**
|
|
212
|
+
* Check if two ranges overlap.
|
|
213
|
+
*/
|
|
214
|
+
var areaIntersects = function (area1, area2) {
|
|
215
|
+
if (!area2) {
|
|
216
|
+
return false;
|
|
217
|
+
}
|
|
218
|
+
if (area1.startColumnIndex > area2.endColumnIndex ||
|
|
219
|
+
area2.startColumnIndex > area1.endColumnIndex) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
if (area1.startRowIndex > area2.endRowIndex ||
|
|
223
|
+
area2.startRowIndex > area1.endRowIndex) {
|
|
224
|
+
return false;
|
|
225
|
+
}
|
|
226
|
+
return true;
|
|
227
|
+
};
|
|
228
|
+
exports.areaIntersects = areaIntersects;
|
|
229
|
+
/**
|
|
230
|
+
* Check if `needle` range is fully inside `haystack`.
|
|
231
|
+
*/
|
|
232
|
+
var areaInsideArea = function (needle, haystack) {
|
|
233
|
+
return (needle.startRowIndex >= haystack.startRowIndex &&
|
|
234
|
+
needle.endRowIndex <= haystack.endRowIndex &&
|
|
235
|
+
needle.startColumnIndex >= haystack.startColumnIndex &&
|
|
236
|
+
needle.endColumnIndex <= haystack.endColumnIndex);
|
|
237
|
+
};
|
|
238
|
+
exports.areaInsideArea = areaInsideArea;
|
|
239
|
+
/**
|
|
240
|
+
* Intersection of two ranges, or `null` when they don't overlap.
|
|
241
|
+
*/
|
|
242
|
+
var areaIntersection = function (area1, area2) {
|
|
243
|
+
var startRowIndex = Math.max(area1.startRowIndex, area2.startRowIndex);
|
|
244
|
+
var endRowIndex = Math.min(area1.endRowIndex, area2.endRowIndex);
|
|
245
|
+
var startColumnIndex = Math.max(area1.startColumnIndex, area2.startColumnIndex);
|
|
246
|
+
var endColumnIndex = Math.min(area1.endColumnIndex, area2.endColumnIndex);
|
|
247
|
+
if (startRowIndex > endRowIndex || startColumnIndex > endColumnIndex) {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
return { startRowIndex: startRowIndex, endRowIndex: endRowIndex, startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex };
|
|
251
|
+
};
|
|
252
|
+
exports.areaIntersection = areaIntersection;
|
|
253
|
+
/**
|
|
254
|
+
* Re-scope a rule's ranges after a drag-move of `from` → `to` on `sheetId`, so
|
|
255
|
+
* range-scoped rules (conditional formats, data validations) travel with the
|
|
256
|
+
* moved cells the way Excel and Google Sheets carry them:
|
|
257
|
+
*
|
|
258
|
+
* - a range on another sheet, or untouched by the move, is kept as-is
|
|
259
|
+
* - a range that travelled entirely inside the moved area is shifted with it
|
|
260
|
+
* - a range that only partially overlaps the moved area keeps its original
|
|
261
|
+
* scope (the source cells left behind keep the rule) and gains the shifted
|
|
262
|
+
* overlap at the destination — unless one of the rule's ranges already
|
|
263
|
+
* covers that destination
|
|
264
|
+
*
|
|
265
|
+
* Returns the new ranges, or `null` when the move leaves every range
|
|
266
|
+
* untouched, so callers can skip the rule update entirely (no history entry,
|
|
267
|
+
* no re-evaluation).
|
|
268
|
+
*/
|
|
269
|
+
var rescopeSheetRangesOnMove = function (ranges, sheetId, from, to) {
|
|
270
|
+
var e_2, _a, e_3, _b;
|
|
271
|
+
var rowDelta = to.startRowIndex - from.startRowIndex;
|
|
272
|
+
var columnDelta = to.startColumnIndex - from.startColumnIndex;
|
|
273
|
+
if (rowDelta === 0 && columnDelta === 0) {
|
|
274
|
+
return null;
|
|
275
|
+
}
|
|
276
|
+
var shift = function (range) { return (tslib_1.__assign(tslib_1.__assign({}, range), { startRowIndex: range.startRowIndex + rowDelta, endRowIndex: range.endRowIndex + rowDelta, startColumnIndex: range.startColumnIndex + columnDelta, endColumnIndex: range.endColumnIndex + columnDelta })); };
|
|
277
|
+
var changed = false;
|
|
278
|
+
var next = [];
|
|
279
|
+
var shiftedOverlaps = [];
|
|
280
|
+
try {
|
|
281
|
+
for (var ranges_1 = tslib_1.__values(ranges), ranges_1_1 = ranges_1.next(); !ranges_1_1.done; ranges_1_1 = ranges_1.next()) {
|
|
282
|
+
var range = ranges_1_1.value;
|
|
283
|
+
if (range.sheetId !== sheetId) {
|
|
284
|
+
next.push(range);
|
|
285
|
+
continue;
|
|
286
|
+
}
|
|
287
|
+
var overlap = (0, exports.areaIntersection)(range, from);
|
|
288
|
+
if (!overlap) {
|
|
289
|
+
next.push(range);
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
if ((0, exports.areaInsideArea)(range, from)) {
|
|
293
|
+
next.push(shift(range));
|
|
294
|
+
changed = true;
|
|
295
|
+
continue;
|
|
296
|
+
}
|
|
297
|
+
next.push(range);
|
|
298
|
+
shiftedOverlaps.push(shift(tslib_1.__assign(tslib_1.__assign({}, overlap), { sheetId: range.sheetId })));
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
302
|
+
finally {
|
|
303
|
+
try {
|
|
304
|
+
if (ranges_1_1 && !ranges_1_1.done && (_a = ranges_1.return)) _a.call(ranges_1);
|
|
305
|
+
}
|
|
306
|
+
finally { if (e_2) throw e_2.error; }
|
|
307
|
+
}
|
|
308
|
+
var _loop_1 = function (shifted) {
|
|
309
|
+
var covered = next.some(function (range) {
|
|
310
|
+
return range.sheetId === sheetId && (0, exports.areaInsideArea)(shifted, range);
|
|
311
|
+
});
|
|
312
|
+
if (covered) {
|
|
313
|
+
return "continue";
|
|
314
|
+
}
|
|
315
|
+
next.push(shifted);
|
|
316
|
+
changed = true;
|
|
317
|
+
};
|
|
318
|
+
try {
|
|
319
|
+
for (var shiftedOverlaps_1 = tslib_1.__values(shiftedOverlaps), shiftedOverlaps_1_1 = shiftedOverlaps_1.next(); !shiftedOverlaps_1_1.done; shiftedOverlaps_1_1 = shiftedOverlaps_1.next()) {
|
|
320
|
+
var shifted = shiftedOverlaps_1_1.value;
|
|
321
|
+
_loop_1(shifted);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
325
|
+
finally {
|
|
326
|
+
try {
|
|
327
|
+
if (shiftedOverlaps_1_1 && !shiftedOverlaps_1_1.done && (_b = shiftedOverlaps_1.return)) _b.call(shiftedOverlaps_1);
|
|
328
|
+
}
|
|
329
|
+
finally { if (e_3) throw e_3.error; }
|
|
330
|
+
}
|
|
331
|
+
return changed ? next : null;
|
|
332
|
+
};
|
|
333
|
+
exports.rescopeSheetRangesOnMove = rescopeSheetRangesOnMove;
|
|
334
|
+
/**
|
|
335
|
+
* Convert a cell coordinate into a single-cell range.
|
|
336
|
+
*/
|
|
337
|
+
var cellToArea = function (_a) {
|
|
338
|
+
var rowIndex = _a.rowIndex, columnIndex = _a.columnIndex;
|
|
339
|
+
return {
|
|
340
|
+
startRowIndex: rowIndex,
|
|
341
|
+
startColumnIndex: columnIndex,
|
|
342
|
+
endColumnIndex: columnIndex,
|
|
343
|
+
endRowIndex: rowIndex,
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
exports.cellToArea = cellToArea;
|
|
347
|
+
/**
|
|
348
|
+
* Convert font size from points to pixels.
|
|
349
|
+
*/
|
|
350
|
+
var pointToPixel = function (pt) { return Math.round((13 / 10) * pt); };
|
|
351
|
+
exports.pointToPixel = pointToPixel;
|
|
352
|
+
/**
|
|
353
|
+
* Convert font size from pixels to points.
|
|
354
|
+
*/
|
|
355
|
+
var pixelToPoint = function (px) { return Math.round((px / 13) * 10); };
|
|
356
|
+
exports.pixelToPoint = pixelToPoint;
|
|
357
|
+
/**
|
|
358
|
+
* Resolve a table column name to absolute column index.
|
|
359
|
+
*/
|
|
360
|
+
var getColumnIndexFromColumnName = function (table, columnName) {
|
|
361
|
+
var _a;
|
|
362
|
+
var fromIndex = (_a = table.columns) === null || _a === void 0 ? void 0 : _a.findIndex(function (col) { return col.name === columnName; });
|
|
363
|
+
if (fromIndex == null || fromIndex === -1) {
|
|
364
|
+
return undefined;
|
|
365
|
+
}
|
|
366
|
+
return table.range.startColumnIndex + fromIndex;
|
|
367
|
+
};
|
|
368
|
+
exports.getColumnIndexFromColumnName = getColumnIndexFromColumnName;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TextFormatRun } from "@rowsncolumns/common-types";
|
|
2
|
+
/**
|
|
3
|
+
* Deterministic string form of a (text, runs) pair, suitable as input to
|
|
4
|
+
* `contentHash` for rich shared-string entries.
|
|
5
|
+
*
|
|
6
|
+
* Two rich entries that render identically produce the same canonical string
|
|
7
|
+
* regardless of property ordering or absent-vs-false boolean variations. The
|
|
8
|
+
* leading `RICH_MARKER` (control characters) guarantees a rich canonical can
|
|
9
|
+
* never equal any plain shared-string text, so plain↔rich never collide on
|
|
10
|
+
* the downstream content hash.
|
|
11
|
+
*
|
|
12
|
+
* IMPORTANT: This is the dedup key for shared-string IDs across sessions.
|
|
13
|
+
* Changing the format, key order, or stripping rules invalidates every
|
|
14
|
+
* existing rich-string ID. Mirror updates here in any other-language port
|
|
15
|
+
* (e.g. Python) used in the same collaboration session.
|
|
16
|
+
*/
|
|
17
|
+
export declare const canonicalizeRichSharedString: (text: string, runs: readonly TextFormatRun[]) => string;
|
|
18
|
+
//# sourceMappingURL=shared-string-canonical.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared-string-canonical.d.ts","sourceRoot":"","sources":["../../shared-string-canonical.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,aAAa,EACd,MAAM,4BAA4B,CAAC;AAkDpC;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,4BAA4B,GACvC,MAAM,MAAM,EACZ,MAAM,SAAS,aAAa,EAAE,KAC7B,MAGF,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.canonicalizeRichSharedString = void 0;
|
|
4
|
+
// U+0001 (START OF HEADING). Cell text shouldn't contain control chars, so
|
|
5
|
+
// using it as a separator and as the `RICH_MARKER` prefix guarantees the rich
|
|
6
|
+
// canonical string can never collide with any plain shared-string value.
|
|
7
|
+
// Built via fromCharCode rather than a string literal so the control byte is
|
|
8
|
+
// visible in source.
|
|
9
|
+
var SEP = String.fromCharCode(1);
|
|
10
|
+
var RICH_MARKER = "".concat(SEP, "RICH").concat(SEP);
|
|
11
|
+
var canonicalizeColor = function (color) {
|
|
12
|
+
if (color == null)
|
|
13
|
+
return "";
|
|
14
|
+
if (typeof color === "string")
|
|
15
|
+
return "s:".concat(color);
|
|
16
|
+
var tint = color.tint == null ? "" : color.tint;
|
|
17
|
+
return "t:".concat(color.theme, ":").concat(tint);
|
|
18
|
+
};
|
|
19
|
+
// Fixed key order. Skips null/undefined and false-equivalent booleans so a
|
|
20
|
+
// producer that writes `{ bold: true }` hashes identically to one that writes
|
|
21
|
+
// `{ bold: true, italic: false }`. Any new field added to `TextFormat` MUST be
|
|
22
|
+
// appended here, otherwise rich entries differing only in the new field will
|
|
23
|
+
// collapse and dedup incorrectly.
|
|
24
|
+
var canonicalizeFormat = function (format) {
|
|
25
|
+
if (!format)
|
|
26
|
+
return "";
|
|
27
|
+
var parts = [];
|
|
28
|
+
if (format.bold)
|
|
29
|
+
parts.push("b");
|
|
30
|
+
if (format.italic)
|
|
31
|
+
parts.push("i");
|
|
32
|
+
if (format.strikethrough)
|
|
33
|
+
parts.push("s");
|
|
34
|
+
if (format.underline)
|
|
35
|
+
parts.push("u");
|
|
36
|
+
if (format.color != null)
|
|
37
|
+
parts.push("c=".concat(canonicalizeColor(format.color)));
|
|
38
|
+
if (format.fontFamily)
|
|
39
|
+
parts.push("ff=".concat(format.fontFamily));
|
|
40
|
+
if (format.fontSize != null)
|
|
41
|
+
parts.push("fs=".concat(format.fontSize));
|
|
42
|
+
if (format.baselineOffset)
|
|
43
|
+
parts.push("bo=".concat(format.baselineOffset));
|
|
44
|
+
return parts.join(",");
|
|
45
|
+
};
|
|
46
|
+
var canonicalizeMention = function (mention) {
|
|
47
|
+
return "v=".concat(mention.value, ",l=").concat(mention.label);
|
|
48
|
+
};
|
|
49
|
+
var canonicalizeRun = function (run) {
|
|
50
|
+
if (run.nodeType === "mention") {
|
|
51
|
+
return "M:".concat(run.startIndex, ":").concat(run.endIndex, ":").concat(canonicalizeMention(run.mention));
|
|
52
|
+
}
|
|
53
|
+
return "T:".concat(run.startIndex, ":").concat(run.endIndex, ":").concat(canonicalizeFormat(run.format));
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Deterministic string form of a (text, runs) pair, suitable as input to
|
|
57
|
+
* `contentHash` for rich shared-string entries.
|
|
58
|
+
*
|
|
59
|
+
* Two rich entries that render identically produce the same canonical string
|
|
60
|
+
* regardless of property ordering or absent-vs-false boolean variations. The
|
|
61
|
+
* leading `RICH_MARKER` (control characters) guarantees a rich canonical can
|
|
62
|
+
* never equal any plain shared-string text, so plain↔rich never collide on
|
|
63
|
+
* the downstream content hash.
|
|
64
|
+
*
|
|
65
|
+
* IMPORTANT: This is the dedup key for shared-string IDs across sessions.
|
|
66
|
+
* Changing the format, key order, or stripping rules invalidates every
|
|
67
|
+
* existing rich-string ID. Mirror updates here in any other-language port
|
|
68
|
+
* (e.g. Python) used in the same collaboration session.
|
|
69
|
+
*/
|
|
70
|
+
var canonicalizeRichSharedString = function (text, runs) {
|
|
71
|
+
var runsKey = runs.map(canonicalizeRun).join(";");
|
|
72
|
+
return "".concat(RICH_MARKER).concat(text).concat(SEP).concat(runsKey);
|
|
73
|
+
};
|
|
74
|
+
exports.canonicalizeRichSharedString = canonicalizeRichSharedString;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type BaseSheet = {
|
|
2
|
+
index?: number | null;
|
|
3
|
+
title: string;
|
|
4
|
+
hidden?: boolean | null;
|
|
5
|
+
sheetId: number;
|
|
6
|
+
} & Record<string, any>;
|
|
7
|
+
/**
|
|
8
|
+
* Sort sheets by index
|
|
9
|
+
* @param sheets
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
export declare const sortSheetsByIndex: <S extends BaseSheet>(sheets: S[], includeHidden?: boolean) => (S & {
|
|
13
|
+
index: number;
|
|
14
|
+
})[];
|
|
15
|
+
//# sourceMappingURL=sort.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../sort.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AACxB;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,SAAS,EACnD,QAAQ,CAAC,EAAE,EACX,gBAAgB,OAAO;;IA0CxB,CAAC"}
|
package/dist/cjs/sort.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sortSheetsByIndex = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
/**
|
|
6
|
+
* Sort sheets by index
|
|
7
|
+
* @param sheets
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
var sortSheetsByIndex = function (sheets, includeHidden) {
|
|
11
|
+
var filtered = sheets
|
|
12
|
+
.filter(Boolean)
|
|
13
|
+
.filter(function (sheet) {
|
|
14
|
+
return includeHidden ? sheet.title : !sheet.hidden && sheet.title;
|
|
15
|
+
});
|
|
16
|
+
// Remove duplicate sheets with the same sheetId, keeping only the first occurrence
|
|
17
|
+
var seen = new Set();
|
|
18
|
+
var deduplicated = filtered.filter(function (sheet) {
|
|
19
|
+
if (seen.has(sheet.sheetId)) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
seen.add(sheet.sheetId);
|
|
23
|
+
return true;
|
|
24
|
+
});
|
|
25
|
+
// Collect indices that are already defined
|
|
26
|
+
var usedIndices = new Set(deduplicated
|
|
27
|
+
.map(function (sheet) { return sheet.index; })
|
|
28
|
+
.filter(function (index) { return index !== undefined && index !== null; }));
|
|
29
|
+
// Assign indices to sheets without one, starting from 0 and skipping used indices
|
|
30
|
+
var nextIndex = 0;
|
|
31
|
+
var getNextAvailableIndex = function () {
|
|
32
|
+
while (usedIndices.has(nextIndex)) {
|
|
33
|
+
nextIndex++;
|
|
34
|
+
}
|
|
35
|
+
return nextIndex++;
|
|
36
|
+
};
|
|
37
|
+
return deduplicated
|
|
38
|
+
.map(function (sheet) {
|
|
39
|
+
var _a;
|
|
40
|
+
return tslib_1.__assign(tslib_1.__assign({}, sheet), { index: (_a = sheet.index) !== null && _a !== void 0 ? _a : getNextAvailableIndex() });
|
|
41
|
+
})
|
|
42
|
+
.sort(function (a, b) { var _a, _b; return ((_a = a.index) !== null && _a !== void 0 ? _a : 0) - ((_b = b.index) !== null && _b !== void 0 ? _b : 0); });
|
|
43
|
+
};
|
|
44
|
+
exports.sortSheetsByIndex = sortSheetsByIndex;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { CellInterface, GridRange } from "@rowsncolumns/common-types";
|
|
2
|
+
/**
|
|
3
|
+
* Convert cell to bounds.
|
|
4
|
+
* Its better to use gridref.current.getCellBounds() instead as it caters
|
|
5
|
+
* to merged cells
|
|
6
|
+
* @param cell
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare const convertCellToRange: (cell: CellInterface) => GridRange;
|
|
10
|
+
/**
|
|
11
|
+
* Converts address string to CellInterface
|
|
12
|
+
* @param address
|
|
13
|
+
*/
|
|
14
|
+
export declare const addressToCell: (address: string, options?: {
|
|
15
|
+
position?: "start" | "end";
|
|
16
|
+
rowCount?: number;
|
|
17
|
+
columnCount?: number;
|
|
18
|
+
}) => CellInterface | null;
|
|
19
|
+
/**
|
|
20
|
+
* Gets column from address $G => G
|
|
21
|
+
* @param address
|
|
22
|
+
*/
|
|
23
|
+
export declare const getColumnNameFromAddress: (address: string) => string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Gets rowIndex from address $1 => 1
|
|
26
|
+
* @param address
|
|
27
|
+
*/
|
|
28
|
+
export declare const getRowIndexFromAddress: (address: string) => string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Convert cellInterface to address string
|
|
31
|
+
* @param cell
|
|
32
|
+
*/
|
|
33
|
+
export declare const cellToAddress: (cell: CellInterface | null, isAbsoluteColumn?: boolean, isAbsoluteRow?: boolean, isFullColumn?: boolean, isFullRow?: boolean) => string | null;
|
|
34
|
+
/**
|
|
35
|
+
* Convert a cell range to address
|
|
36
|
+
* @param sheetName
|
|
37
|
+
* @param range
|
|
38
|
+
* @returns
|
|
39
|
+
*/
|
|
40
|
+
export declare const cellRangeToAddress: (sheetName: string | undefined, range: GridRange) => string;
|
|
41
|
+
export declare const sanitizeSheetName: (name: string | undefined) => string | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Remove single quotes from sheetname
|
|
44
|
+
* 'Sheet Space!A4' => Sheet Space
|
|
45
|
+
* @param name
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
export declare const desanitizeSheetName: (name: string | undefined) => string | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Escape special characters
|
|
51
|
+
* @param str
|
|
52
|
+
* @returns
|
|
53
|
+
*/
|
|
54
|
+
export declare const escapeCharacters: (str: string) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Get selection from start and end cell
|
|
57
|
+
* @param start
|
|
58
|
+
* @param end
|
|
59
|
+
* @param sheetName
|
|
60
|
+
* @returns
|
|
61
|
+
*/
|
|
62
|
+
export declare const selectionBoundsFromCells: (start: CellInterface, end?: CellInterface | null) => GridRange;
|
|
63
|
+
export declare const supplant: (s: string, o: Record<string, any>) => string;
|
|
64
|
+
/**
|
|
65
|
+
* Normalize an external hyperlink target for the browser. A stored URL
|
|
66
|
+
* without a scheme ("paradigm.xyz") would otherwise be resolved relative to
|
|
67
|
+
* the current page. Prefixes https:// unless the URL already has a scheme
|
|
68
|
+
* (https:, mailto:, tel:, …), is protocol-relative ("//host"), or is a
|
|
69
|
+
* fragment/path reference.
|
|
70
|
+
* @param url
|
|
71
|
+
* @returns
|
|
72
|
+
*/
|
|
73
|
+
export declare const normalizeExternalUrl: (url: string) => string;
|
|
74
|
+
//# sourceMappingURL=string.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAK3E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM,aAAa,KAAG,SAKvD,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,aAAa,GACxB,SAAS,MAAM,EACf,UAAS;IACP,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACjB,KACL,aAAa,GAAG,IAuDlB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,SAAS,MAAM,uBAEvD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,uBAErD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,GACxB,MAAM,aAAa,GAAG,IAAI,EAC1B,0BAAwB,EACxB,uBAAqB,EACrB,sBAAoB,EACpB,mBAAiB,KAChB,MAAM,GAAG,IAiBX,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAC7B,WAAW,MAAM,GAAG,SAAS,EAC7B,OAAO,SAAS,WAUjB,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,GAAG,SAAS,uBASzD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,GAAG,SAAS,uBAgB3D,CAAC;AAKF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,WAI3C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,OAAO,aAAa,EACpB,MAAK,aAAa,GAAG,IAAY,KAChC,SAQF,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,WAKzD,CAAC;AAKF;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,WAY/C,CAAC"}
|