pivotkit-react 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +300 -0
  2. package/LICENSE +21 -0
  3. package/README.md +327 -2
  4. package/dist/chunks/chunk-C32TYSHG.js +441 -0
  5. package/dist/chunks/chunk-ILHFIV2P.js +784 -0
  6. package/dist/chunks/chunk-KKJO36W5.js +1833 -0
  7. package/dist/chunks/chunk-XYP47DJ3.js +123 -0
  8. package/dist/echarts.js +262 -0
  9. package/dist/index.js +3390 -0
  10. package/dist/labels.js +12 -0
  11. package/dist/menus.js +1085 -0
  12. package/dist/styles.css +2447 -0
  13. package/package.json +70 -4
  14. package/types/PivotReport.d.ts +20 -0
  15. package/types/all-labels.d.ts +5 -0
  16. package/types/chart-decorate.d.ts +16 -0
  17. package/types/chart-options.d.ts +23 -0
  18. package/types/chart-summary.d.ts +12 -0
  19. package/types/chart-tooltip.d.ts +38 -0
  20. package/types/chart-types.d.ts +152 -0
  21. package/types/chart.d.ts +39 -0
  22. package/types/chip-menus.d.ts +32 -0
  23. package/types/clear-input.d.ts +20 -0
  24. package/types/dnd-moves.d.ts +45 -0
  25. package/types/dnd.d.ts +101 -0
  26. package/types/dom.d.ts +52 -0
  27. package/types/drill-export.d.ts +42 -0
  28. package/types/drill-panel.d.ts +39 -0
  29. package/types/drill.d.ts +62 -0
  30. package/types/echarts.d.ts +4 -0
  31. package/types/export-run.d.ts +59 -0
  32. package/types/field-info.d.ts +34 -0
  33. package/types/fields.d.ts +32 -0
  34. package/types/files.d.ts +27 -0
  35. package/types/filter.d.ts +21 -0
  36. package/types/icons.d.ts +76 -0
  37. package/types/index.d.ts +536 -0
  38. package/types/info.d.ts +34 -0
  39. package/types/iso.d.ts +2 -0
  40. package/types/labels.d.ts +721 -0
  41. package/types/lazy-menus.d.ts +16 -0
  42. package/types/menu-labels.d.ts +255 -0
  43. package/types/menus.d.ts +7 -0
  44. package/types/names.d.ts +80 -0
  45. package/types/numbers.d.ts +13 -0
  46. package/types/overflow.d.ts +59 -0
  47. package/types/place.d.ts +43 -0
  48. package/types/popover.d.ts +89 -0
  49. package/types/rove.d.ts +20 -0
  50. package/types/section.d.ts +42 -0
  51. package/types/share.d.ts +123 -0
  52. package/types/skeleton.d.ts +9 -0
  53. package/types/storage.d.ts +24 -0
  54. package/types/table.d.ts +23 -0
  55. package/types/templates.d.ts +40 -0
  56. package/types/theme.d.ts +24 -0
  57. package/types/tip-list.d.ts +20 -0
  58. package/types/tips.d.ts +298 -0
  59. package/types/toasts.d.ts +26 -0
  60. package/types/toolbar-panels.d.ts +90 -0
  61. package/types/toolbar.d.ts +5 -0
  62. package/types/use-big-result.d.ts +29 -0
  63. package/types/use-export.d.ts +7 -0
  64. package/types/use-theme.d.ts +11 -0
  65. package/types/use-view-history.d.ts +34 -0
  66. package/types/version.d.ts +2 -0
  67. package/types/view-history.d.ts +89 -0
  68. package/types/view-ops.d.ts +344 -0
  69. package/types/view-store.d.ts +52 -0
  70. package/types/virtual.d.ts +44 -0
  71. package/types/zones.d.ts +42 -0
@@ -0,0 +1,784 @@
1
+ // src/labels.js
2
+ import { DEFAULT_LABELS, PivotkitError } from "pivotkit-core";
3
+ var en = {
4
+ /** the language of the texts, for the report's lang attribute */
5
+ lang: "en",
6
+ /** the name of the report's region landmark */
7
+ report: "Pivot report",
8
+ core: (
9
+ /** @type {import("pivotkit-core").Labels} */
10
+ {
11
+ ...DEFAULT_LABELS,
12
+ // a yes/no field in the table, the filter list and the drill-down: words, not true/false
13
+ true: "Yes",
14
+ false: "No",
15
+ aggregators: {
16
+ count: "Count",
17
+ countUnique: "Distinct count",
18
+ listUnique: "List of distinct values",
19
+ sum: "Sum",
20
+ average: "Average",
21
+ median: "Median",
22
+ min: "Minimum",
23
+ max: "Maximum",
24
+ stdev: "Standard deviation (sample)",
25
+ stdevp: "Standard deviation (population)",
26
+ var: "Variance (sample)",
27
+ varp: "Variance (population)",
28
+ first: "First value",
29
+ last: "Last value"
30
+ }
31
+ }
32
+ ),
33
+ zones: { rows: "Rows", cols: "Columns", values: "Values", filters: "Filters" },
34
+ zoneHints: {
35
+ rows: "Drop fields here to group rows",
36
+ cols: "Drop fields here to group columns",
37
+ values: "Drop numbers here to sum or count them",
38
+ filters: "Drop fields here to filter the whole report"
39
+ },
40
+ fields: "Fields",
41
+ fieldsHint: "Drag a field into Rows, Columns, Values or Filters, or open its menu.",
42
+ searchFields: "Search fields",
43
+ // the field list's keys, for screen readers (the list is one stop of the Tab order)
44
+ fieldListKeys: "Arrow keys up and down move between the fields, left and right to a field's grip, its i and its menu. Enter adds the field, Shift+F10 opens its menu.",
45
+ noFieldMatch: "No field matches \u201C{query}\u201D.",
46
+ fieldMenu: "Options for {field}",
47
+ addTo: "Add to {zone}",
48
+ // a click on a field that is in its zone already: said in the status line
49
+ alreadyIn: "{field} is already in {zone}",
50
+ move: "Move",
51
+ moveTo: "Move to {zone}",
52
+ dragHandle: "Drag {field}",
53
+ dragIntoZone: "Drag into a zone",
54
+ removeField: "Remove {field}",
55
+ types: { string: "Text", number: "Number", date: "Date", boolean: "Yes/No", null: "Empty" },
56
+ inZone: "in {zone}",
57
+ // screen reader text after a chip's name
58
+ stateFiltered: "filtered",
59
+ stateSorted: "sorted {order}",
60
+ toolbar: "Report toolbar",
61
+ table: "Table",
62
+ chart: "Chart",
63
+ view: "View",
64
+ chartType: "Chart type",
65
+ chartTypeIs: "Chart type: {type}",
66
+ chartTypes: { auto: "Automatic", bar: "Bars", stacked: "Stacked bars", horizontal: "Horizontal bars", line: "Lines", area: "Area", pie: "Pie", donut: "Donut", heatmap: "Heatmap" },
67
+ undo: "Undo",
68
+ redo: "Redo",
69
+ reset: "Reset",
70
+ resetHint: "Back to the start view",
71
+ swap: "Swap rows and columns",
72
+ // the zones folded into one line (compact layout), and the toolbar button that does it (pressed: open)
73
+ layout: "Layout",
74
+ showLayout: "Show field layout",
75
+ layoutEmpty: "No fields placed yet",
76
+ more: "More",
77
+ // the Views menu: the saved views (the host's templates) and sharing
78
+ views: "Views",
79
+ exportLabel: "Export",
80
+ options: "Options",
81
+ totals: "Totals",
82
+ grandTotalRow: "Grand total row",
83
+ grandTotalColumn: "Grand total column",
84
+ rowSubtotals: "Row subtotals",
85
+ colSubtotals: "Column subtotals",
86
+ expand: "Expand {label}",
87
+ collapse: "Collapse {label}",
88
+ showAs: "Show as",
89
+ sort: "Sort",
90
+ sortLabelAsc: "A to Z",
91
+ sortLabelDesc: "Z to A",
92
+ sortCustom: "Custom order",
93
+ sortCustomDesc: "Custom order, reversed",
94
+ sortValueDesc: "Largest {value} first",
95
+ sortValueAsc: "Smallest {value} first",
96
+ units: {
97
+ year: "Year",
98
+ yearQuarter: "Quarter",
99
+ yearMonth: "Month",
100
+ yearWeek: "Week",
101
+ day: "Day",
102
+ quarter: "Quarter of year",
103
+ month: "Month of year",
104
+ week: "Week of year",
105
+ weekday: "Weekday",
106
+ hour: "Hour of day",
107
+ bin: "Ranges"
108
+ },
109
+ // a date grouping's name: "Date by month"; the unit as it reads inside it (unitInName)
110
+ derivedName: "{field} by {unit}",
111
+ unitInName: {
112
+ year: "year",
113
+ yearQuarter: "quarter",
114
+ yearMonth: "month",
115
+ yearWeek: "week",
116
+ day: "day",
117
+ quarter: "quarter of year",
118
+ month: "month of year",
119
+ week: "week of year",
120
+ weekday: "weekday",
121
+ hour: "hour of day",
122
+ bin: "ranges"
123
+ },
124
+ binsName: "{field} (by {size})",
125
+ top: "Top",
126
+ topBadge: "Top {count}",
127
+ bottomBadge: "Bottom {count}",
128
+ by: "by {value}",
129
+ filter: "Filter\u2026",
130
+ filtered: "Filtered",
131
+ filterSummary: "{shown} of {total}",
132
+ filterTitle: "Filter {field}",
133
+ // the condition on the labels of a field: text, or a number's label
134
+ condition: "Text condition",
135
+ labelOps: { equals: "is", notEquals: "is not", contains: "contains", notContains: "does not contain", beginsWith: "begins with", endsWith: "ends with" },
136
+ // result
137
+ emptyTitle: "Build your report in three steps",
138
+ emptySteps: [
139
+ "Drag a field such as a team or region into Rows.",
140
+ "Drag a number into Values: it is summed, or counted for text.",
141
+ "Add a field to Columns, switch to Chart or export to Excel."
142
+ ],
143
+ emptyFields: "The data has no columns.",
144
+ tryView: "Start with \u201C{name}\u201D",
145
+ error: "The report cannot be shown: {message}",
146
+ tooLarge: "This layout makes {value} cells, more than the limit of {max}. Move a field with many values to Filters, or filter it.",
147
+ tooManyGroups: "This layout makes more than {max} groups of rows and columns. Remove a field with many values from Rows or Columns, or filter it.",
148
+ tooManyCells: "This layout makes more than {max} cells with its subtotals. Remove a field from Rows or Columns, or filter it.",
149
+ tooManyRows: "The data has {value} rows, more than the limit of {max}.",
150
+ tooMuchWork: "This layout needs {value} cell updates, more than the limit of {max}. Remove a field from Rows or Columns, or a value such as a median or a unique count.",
151
+ zoneFull: "{zone} holds at most {max} fields. Remove one first.",
152
+ viewTrimmed: "\u201C{name}\u201D has more than {max} fields in {zone}; the report shows the first {max}.",
153
+ issues: "Some parts of the view were not used:",
154
+ dismissIssues: "Dismiss",
155
+ loadingChart: "Loading chart\u2026",
156
+ noChartData: "Add a value to see a chart.",
157
+ // a count in words: one form per Intl.PluralRules category of the language ("one", "other", ...)
158
+ rowsCount: { one: "{count} row", other: "{count} rows" },
159
+ tableName: "Pivot table",
160
+ emptyCell: "No rows",
161
+ emptyValue: "No value",
162
+ rowLabel: "Row: {label}",
163
+ // chart
164
+ chartSummary: "{type}: {values} by {categories}.",
165
+ chartCounts: "{categories}, {series}.",
166
+ chartCategories: { one: "{count} category", other: "{count} categories" },
167
+ chartSeries: { one: "{count} series", other: "{count} series" },
168
+ chartExtremes: "Highest {max} at {maxAt}; lowest {min} at {minAt}.",
169
+ // the last sentence of the chart's text alternative
170
+ chartTableHint: "Switch to Table to read every value.",
171
+ categories: "categories",
172
+ close: "Close",
173
+ // toasts and live region
174
+ toastRemoved: "{field} removed",
175
+ toastUndone: "Undone: {step}",
176
+ toastRedone: "Redone: {step}",
177
+ toastReset: "Back to the start view",
178
+ toastExported: "Exported {file}",
179
+ toastLoaded: "View \u201C{name}\u201D loaded",
180
+ toastExportFailed: "Export failed: {message}",
181
+ // what an undo step was, for "Undone: ..."
182
+ steps: {
183
+ added: "{field} added to {zone}",
184
+ removed: "{field} removed",
185
+ moved: "{field} moved to {zone}",
186
+ reordered: "order in {zone}",
187
+ sort: "sort of {field}",
188
+ group: "grouping of {field}",
189
+ filter: "filter on {field}",
190
+ filtersRemoved: "filters removed",
191
+ top: "top items of {field}",
192
+ value: "settings of {field}",
193
+ display: "switch to {display}",
194
+ chart: "chart type {type}",
195
+ totals: "totals",
196
+ collapse: "expand and collapse",
197
+ swap: "rows and columns swapped",
198
+ template: "view \u201C{name}\u201D",
199
+ reset: "back to the start view",
200
+ outside: "change from outside the report",
201
+ viewLoaded: "view loaded",
202
+ chartDisplay: "chart display",
203
+ change: "last change"
204
+ },
205
+ // tips above the result (tips.js): when each shows is in the TIPS table
206
+ tips: {
207
+ filterEmpty: "Nothing matches the filter. Remove it, or choose other items.",
208
+ top: "{field} shows the top {count} only: totals and percentages cover these items, not all of them.",
209
+ bottom: "{field} shows the bottom {count} only: totals and percentages cover these items, not all of them.",
210
+ chartCapped: "Showing the first {shown} of {total} categories. Add a filter or Top N to choose them.",
211
+ // per "show values as" percentage: what 100% is
212
+ showAs: {
213
+ percentOfGrandTotal: "100% is the grand total: each value is its share of everything.",
214
+ percentOfRowTotal: "100% is the total of each row: the values of a row add up to 100%.",
215
+ percentOfColumnTotal: "100% is the total of each column: the values of a column add up to 100%.",
216
+ percentOfParentRow: "100% is the group a row belongs to: each row is its share of the row above it.",
217
+ percentOfParentColumn: "100% is the group a column belongs to: each column is its share of the column above it.",
218
+ percentRunningTotal: "100% is the total along the axis: the running total ends at 100%.",
219
+ percentDifferenceFromPrevious: "The previous item is 100%: each value says how much it grew or shrank from it."
220
+ },
221
+ chartOverTime: "{field} is a date: lines show how the values change over time.",
222
+ pieSlices: "A pie works for up to about {max} parts; this one has {count}. Bars compare them more easily.",
223
+ pieColumns: "A pie draws one slice per row and adds up the columns ({fields}). Bars show the columns side by side.",
224
+ chartDates: "The dates are on Columns, so each date is a line of its own. Swap rows and columns to draw the dates along the axis.",
225
+ chartTrend: "Lines connect points into a trend. For categories such as countries, bars fit better.",
226
+ chartSeries: "{count} series are hard to tell apart. Swap rows and columns, or filter Columns to fewer items.",
227
+ textValue: "{field} is text, so Values counts its entries. Use a number field for sums.",
228
+ dateUngrouped: "{field} makes a row or column for every date. Group it by {unit} to read it more easily.",
229
+ manyColumns: "{count} columns are hard to read side by side. Swap rows and columns to list them down the page.",
230
+ values: "Add a number to Values to see sums or counts next to the labels.",
231
+ afterDrag: "Undo takes the last step back. Every field and chip also has a menu with the same moves.",
232
+ saveTemplate: "Save this view to open it again later?",
233
+ menus: "Every field also has a menu, and the toolbar has Undo.",
234
+ cells: "Click a value, or press Enter on it, to see the rows behind it. The arrow keys move between values."
235
+ },
236
+ tipActions: {
237
+ removeFilters: "Remove filter",
238
+ swap: "Swap rows and columns",
239
+ groupDate: "Group by {unit}",
240
+ saveTemplate: "Save view",
241
+ bars: "Switch to Bars",
242
+ auto: "Show as lines over time"
243
+ },
244
+ dismissTip: "Dismiss tip",
245
+ tipsTitle: "Tips",
246
+ shortcuts: {
247
+ undo: "Undo",
248
+ redo: "Redo",
249
+ move: "Move between values in the table",
250
+ open: "Open the rows behind a value; open a menu",
251
+ drag: "Pick up a field or chip, and drop it",
252
+ close: "Close a menu, a panel or a tip",
253
+ fields: "In the field list: up and down between fields, left and right to a field's grip, its \u201Ci\u201D and its menu",
254
+ fieldMenu: "Open the menu of the field in focus"
255
+ },
256
+ // the first stop of the report for the keyboard: past the field list to the toolbar
257
+ skipToToolbar: "Skip to the toolbar",
258
+ // field descriptions (fieldDefaults)
259
+ aboutField: "About {field}",
260
+ learnMore: "Learn more",
261
+ dragInstructions: "To pick up a field, press space or enter. The left and right arrow keys move it within a zone, up and down to the zone above or below. Press space or enter to drop it, escape to cancel. Every field and chip also has a menu with the same moves.",
262
+ dragStart: "Picked up {field}.",
263
+ dragOverAt: "{field} is over {zone}, position {position} of {count}.",
264
+ dragOverEnd: "{field} is over {zone}, at the end.",
265
+ dragOverNone: "{field} is not over a zone.",
266
+ dragEndAt: "{field} dropped in {zone}, position {position} of {count}.",
267
+ dragEndEnd: "{field} dropped at the end of {zone}.",
268
+ dragRemove: "{field} is over the field list: drop to remove it.",
269
+ dragCancel: "Dragging {field} was cancelled.",
270
+ panel: "Field list",
271
+ showFields: "Fields",
272
+ hideFields: "Close field list",
273
+ // the field list folded to a rail on a wide report, and opened again
274
+ collapseFields: "Collapse the field list",
275
+ expandFields: "Show the field list",
276
+ dropToRemove: "Drop here to remove",
277
+ // while the report waits for its data or a shared view
278
+ loadingReport: "Loading the report\u2026",
279
+ // a menu whose panel is still loading (on a slow connection, right after the page opened)
280
+ loadingMenu: "Loading\u2026",
281
+ // a menu whose panel could not be loaded (offline, or the host did not deploy dist/chunks/)
282
+ menuFailed: "This menu could not be loaded.",
283
+ tryAgain: "Try again",
284
+ // chart display (the chart type menu)
285
+ chartDisplay: "Display",
286
+ axisEvery: "One label in every {n} is shown; point at a bar or point for its name.",
287
+ // the × in a text field
288
+ clearText: "Clear",
289
+ toastLinkCopied: "Link copied",
290
+ toastJsonCopied: "View copied as JSON",
291
+ toastCopyFailed: "This page does not allow copying. Use \u201CDownload view\u201D instead.",
292
+ toastLinkTooLong: "This view is too large for a link. Use \u201CDownload view\u201D instead.",
293
+ toastViewLoaded: "View loaded",
294
+ toastViewLoadedPartly: "View loaded; some parts did not fit this data",
295
+ toastLinkOpened: "Opened the view from the link",
296
+ toastLinkOpenedPartly: "Opened the view from the link; some parts did not fit this data",
297
+ viewLeftOut: "Some parts did not fit this data and were left out: {parts}",
298
+ loadCheckSource: "It was made for \u201C{source}\u201D.",
299
+ loadCheckOtherSource: "It was made for other data.",
300
+ loadCheckMissing: "Fields this data does not have: {fields}.",
301
+ loadCheckChanged: "Fields of another type here: {fields}.",
302
+ // a link in the page's address for other data: asked before it is opened
303
+ linkCheckTitle: "The link's view may not fit this data",
304
+ viewMissingFields: "fields this data does not have ({fields})",
305
+ viewOtherIssue: "{count} other setting",
306
+ viewOtherIssues: "{count} other settings",
307
+ viewFailed: {
308
+ empty: "Paste a view or choose a file first.",
309
+ tooLarge: "This is too large for a view.",
310
+ notJson: "This is neither a view in JSON nor a pivotkit link.",
311
+ notView: "This is not a pivotkit view.",
312
+ newer: "This view comes from a newer version of pivotkit and cannot be read here. Update pivotkit to open it.",
313
+ badLink: "This link is damaged or not a pivotkit link.",
314
+ file: "The file could not be read."
315
+ },
316
+ // filters
317
+ filterIs: "Filter: {filter}",
318
+ valueConditions: { compare: "{value} {op} {number}", between: "{value} between {from} and {to}", notBetween: "{value} not between {from} and {to}" },
319
+ // the i next to each zone's title (shown while explanations are on)
320
+ zoneInfo: {
321
+ rows: "Rows group the report by a field: each of its items gets a row. Example: Region in Rows lists North, South and West one below the other.",
322
+ cols: "Columns split every row by a field: each of its items gets a column. Example: Year in Columns puts 2024 and 2025 side by side.",
323
+ values: "Values are the numbers in the cells, summed, counted or averaged for each row and column. Example: Revenue in Values shows the revenue of each region.",
324
+ filters: "Filters keep only some items of a field in the whole report, without a row or column for it. Example: Country in Filters with only Germany selected."
325
+ },
326
+ // Options: expand and collapse all, and the totals that would change nothing (their reason)
327
+ expandNothing: "Nothing is collapsed.",
328
+ collapseNeedsRows: "Needs two or more fields in Rows.",
329
+ needsRowField: "Needs a field in Rows.",
330
+ needsColField: "Needs a field in Columns.",
331
+ needsRowFields: "Needs two or more fields in Rows.",
332
+ needsColFields: "Needs two or more fields in Columns.",
333
+ // the result area: bigger, and the full screen
334
+ enlarge: "Enlarge",
335
+ // the same button while the result is enlarged
336
+ reduce: "Reduce",
337
+ fullScreen: "Full screen",
338
+ collapseAllDone: "Every group is collapsed already.",
339
+ groupsCollapsed: { one: "{count} group collapsed", other: "{count} groups collapsed" },
340
+ groupsExpanded: { one: "{count} group expanded", other: "{count} groups expanded" }
341
+ };
342
+ var de = {
343
+ lang: "de",
344
+ report: "Pivot-Bericht",
345
+ core: (
346
+ /** @type {import("pivotkit-core").Labels} */
347
+ {
348
+ ...DEFAULT_LABELS,
349
+ blank: "(Leer)",
350
+ total: "{label} gesamt",
351
+ grandTotal: "Gesamtergebnis",
352
+ values: "Werte",
353
+ valueName: "{agg} von {field}",
354
+ countRows: "Anzahl",
355
+ true: "Ja",
356
+ false: "Nein",
357
+ aggregators: {
358
+ count: "Anzahl",
359
+ countUnique: "Anzahl verschiedener Werte",
360
+ listUnique: "Liste verschiedener Werte",
361
+ sum: "Summe",
362
+ average: "Durchschnitt",
363
+ median: "Median",
364
+ min: "Minimum",
365
+ max: "Maximum",
366
+ stdev: "Standardabweichung (Stichprobe)",
367
+ stdevp: "Standardabweichung (Grundgesamtheit)",
368
+ var: "Varianz (Stichprobe)",
369
+ varp: "Varianz (Grundgesamtheit)",
370
+ first: "Erster Wert",
371
+ last: "Letzter Wert"
372
+ },
373
+ showAsName: "{showAs} von {value}",
374
+ showAs: {
375
+ percentOfGrandTotal: "% des Gesamtergebnisses",
376
+ percentOfRowTotal: "% der Zeilensumme",
377
+ percentOfColumnTotal: "% der Spaltensumme",
378
+ percentOfParentRow: "% der \xFCbergeordneten Zeile",
379
+ percentOfParentColumn: "% der \xFCbergeordneten Spalte",
380
+ differenceFromPrevious: "Differenz zum vorherigen",
381
+ percentDifferenceFromPrevious: "% Differenz zum vorherigen",
382
+ runningTotal: "Laufende Summe",
383
+ percentRunningTotal: "% laufende Summe",
384
+ rankAscending: "Rang (kleinster zuerst)",
385
+ rankDescending: "Rang (gr\xF6\xDFter zuerst)"
386
+ }
387
+ }
388
+ ),
389
+ zones: { rows: "Zeilen", cols: "Spalten", values: "Werte", filters: "Filter" },
390
+ zoneHints: {
391
+ rows: "Felder hierher ziehen, um Zeilen zu gruppieren",
392
+ cols: "Felder hierher ziehen, um Spalten zu gruppieren",
393
+ values: "Zahlen hierher ziehen, um sie zu summieren oder zu z\xE4hlen",
394
+ filters: "Felder hierher ziehen, um den ganzen Bericht zu filtern"
395
+ },
396
+ fields: "Felder",
397
+ fieldsHint: "Ein Feld in Zeilen, Spalten, Werte oder Filter ziehen oder sein Men\xFC \xF6ffnen.",
398
+ searchFields: "Felder suchen",
399
+ fieldListKeys: "Pfeiltasten auf und ab wechseln zwischen den Feldern, links und rechts zum Griff eines Felds, seinem i und seinem Men\xFC. Eingabe f\xFCgt das Feld hinzu, Umschalt+F10 \xF6ffnet sein Men\xFC.",
400
+ noFieldMatch: "Kein Feld passt zu \u201E{query}\u201C.",
401
+ fieldMenu: "Optionen f\xFCr {field}",
402
+ addTo: "Zu {zone} hinzuf\xFCgen",
403
+ alreadyIn: "{field} ist bereits in {zone}",
404
+ move: "Verschieben",
405
+ moveTo: "Nach {zone} verschieben",
406
+ dragHandle: "{field} ziehen",
407
+ dragIntoZone: "In einen Bereich ziehen",
408
+ removeField: "{field} entfernen",
409
+ types: { string: "Text", number: "Zahl", date: "Datum", boolean: "Ja/Nein", null: "Leer" },
410
+ inZone: "in {zone}",
411
+ stateFiltered: "gefiltert",
412
+ stateSorted: "sortiert {order}",
413
+ toolbar: "Werkzeugleiste des Berichts",
414
+ table: "Tabelle",
415
+ chart: "Diagramm",
416
+ view: "Ansicht",
417
+ chartType: "Diagrammtyp",
418
+ chartTypeIs: "Diagrammtyp: {type}",
419
+ chartTypes: { auto: "Automatisch", bar: "Balken", stacked: "Gestapelte Balken", horizontal: "Liegende Balken", line: "Linien", area: "Fl\xE4che", pie: "Kreis", donut: "Ring", heatmap: "Heatmap" },
420
+ undo: "R\xFCckg\xE4ngig",
421
+ redo: "Wiederholen",
422
+ reset: "Zur\xFCcksetzen",
423
+ resetHint: "Zur\xFCck zur Startansicht",
424
+ swap: "Zeilen und Spalten tauschen",
425
+ layout: "Anordnung",
426
+ showLayout: "Feldanordnung zeigen",
427
+ layoutEmpty: "Noch keine Felder angeordnet",
428
+ more: "Mehr",
429
+ views: "Ansichten",
430
+ exportLabel: "Export",
431
+ options: "Optionen",
432
+ totals: "Summen",
433
+ grandTotalRow: "Gesamtzeile",
434
+ grandTotalColumn: "Gesamtspalte",
435
+ rowSubtotals: "Teilergebnisse der Zeilen",
436
+ colSubtotals: "Teilergebnisse der Spalten",
437
+ expand: "{label} aufklappen",
438
+ collapse: "{label} zuklappen",
439
+ showAs: "Anzeigen als",
440
+ sort: "Sortieren",
441
+ sortLabelAsc: "A bis Z",
442
+ sortLabelDesc: "Z bis A",
443
+ sortCustom: "Eigene Reihenfolge",
444
+ sortCustomDesc: "Eigene Reihenfolge, umgekehrt",
445
+ sortValueDesc: "Gr\xF6\xDFte {value} zuerst",
446
+ sortValueAsc: "Kleinste {value} zuerst",
447
+ units: {
448
+ year: "Jahr",
449
+ yearQuarter: "Quartal",
450
+ yearMonth: "Monat",
451
+ yearWeek: "Woche",
452
+ day: "Tag",
453
+ quarter: "Quartal im Jahr",
454
+ month: "Monat im Jahr",
455
+ week: "Woche im Jahr",
456
+ weekday: "Wochentag",
457
+ hour: "Stunde am Tag",
458
+ bin: "Bereiche"
459
+ },
460
+ derivedName: "{field} nach {unit}",
461
+ unitInName: {
462
+ year: "Jahr",
463
+ yearQuarter: "Quartal",
464
+ yearMonth: "Monat",
465
+ yearWeek: "Woche",
466
+ day: "Tag",
467
+ quarter: "Quartal im Jahr",
468
+ month: "Monat im Jahr",
469
+ week: "Woche im Jahr",
470
+ weekday: "Wochentag",
471
+ hour: "Stunde am Tag",
472
+ bin: "Bereichen"
473
+ },
474
+ binsName: "{field} (je {size})",
475
+ top: "Oberste",
476
+ topBadge: "Top {count}",
477
+ bottomBadge: "Letzte {count}",
478
+ by: "nach {value}",
479
+ filter: "Filtern\u2026",
480
+ filtered: "Gefiltert",
481
+ filterSummary: "{shown} von {total}",
482
+ filterTitle: "{field} filtern",
483
+ condition: "Textbedingung",
484
+ labelOps: { equals: "ist", notEquals: "ist nicht", contains: "enth\xE4lt", notContains: "enth\xE4lt nicht", beginsWith: "beginnt mit", endsWith: "endet mit" },
485
+ emptyTitle: "Den Bericht in drei Schritten bauen",
486
+ emptySteps: [
487
+ "Ein Feld wie Team oder Region in Zeilen ziehen.",
488
+ "Eine Zahl in Werte ziehen: Sie wird summiert, Text wird gez\xE4hlt.",
489
+ "Ein Feld in Spalten ziehen, zum Diagramm wechseln oder nach Excel exportieren."
490
+ ],
491
+ emptyFields: "Die Daten haben keine Spalten.",
492
+ tryView: "Mit \u201E{name}\u201C beginnen",
493
+ error: "Der Bericht kann nicht angezeigt werden: {message}",
494
+ tooLarge: "Diese Anordnung ergibt {value} Zellen, mehr als die Grenze von {max}. Ein Feld mit vielen Werten nach Filter verschieben oder filtern.",
495
+ tooManyGroups: "Diese Anordnung ergibt mehr als {max} Gruppen in Zeilen und Spalten. Ein Feld mit vielen Werten aus Zeilen oder Spalten entfernen oder filtern.",
496
+ tooManyCells: "Diese Anordnung ergibt mit ihren Teilergebnissen mehr als {max} Zellen. Ein Feld aus Zeilen oder Spalten entfernen oder filtern.",
497
+ tooManyRows: "Die Daten haben {value} Zeilen, mehr als die Grenze von {max}.",
498
+ tooMuchWork: "Diese Anordnung braucht {value} Zellberechnungen, mehr als die Grenze von {max}. Ein Feld aus Zeilen oder Spalten entfernen oder einen Wert wie Median oder Anzahl eindeutiger Werte.",
499
+ zoneFull: "{zone} nimmt h\xF6chstens {max} Felder auf. Zuerst eines entfernen.",
500
+ viewTrimmed: "\u201E{name}\u201C hat mehr als {max} Felder in {zone}; der Bericht zeigt die ersten {max}.",
501
+ issues: "Einige Teile der Ansicht wurden nicht verwendet:",
502
+ dismissIssues: "Ausblenden",
503
+ loadingChart: "Diagramm wird geladen\u2026",
504
+ noChartData: "Einen Wert hinzuf\xFCgen, um ein Diagramm zu sehen.",
505
+ rowsCount: { one: "{count} Zeile", other: "{count} Zeilen" },
506
+ tableName: "Pivot-Tabelle",
507
+ emptyCell: "Keine Zeilen",
508
+ emptyValue: "Kein Wert",
509
+ rowLabel: "Zeile: {label}",
510
+ chartSummary: "{type}: {values} nach {categories}.",
511
+ chartCounts: "{categories}, {series}.",
512
+ chartCategories: { one: "{count} Kategorie", other: "{count} Kategorien" },
513
+ chartSeries: { one: "{count} Reihe", other: "{count} Reihen" },
514
+ chartExtremes: "H\xF6chster Wert {max} bei {maxAt}; niedrigster {min} bei {minAt}.",
515
+ chartTableHint: "Zur Tabelle wechseln, um jeden Wert zu lesen.",
516
+ categories: "Kategorien",
517
+ close: "Schlie\xDFen",
518
+ toastRemoved: "{field} entfernt",
519
+ toastUndone: "R\xFCckg\xE4ngig: {step}",
520
+ toastRedone: "Wiederholt: {step}",
521
+ toastReset: "Zur\xFCck zur Startansicht",
522
+ toastExported: "{file} exportiert",
523
+ toastLoaded: "Ansicht \u201E{name}\u201C geladen",
524
+ toastExportFailed: "Export fehlgeschlagen: {message}",
525
+ steps: {
526
+ added: "{field} zu {zone} hinzugef\xFCgt",
527
+ removed: "{field} entfernt",
528
+ moved: "{field} nach {zone} verschoben",
529
+ reordered: "Reihenfolge in {zone}",
530
+ sort: "Sortierung von {field}",
531
+ group: "Gruppierung von {field}",
532
+ filter: "Filter auf {field}",
533
+ filtersRemoved: "Filter entfernt",
534
+ top: "oberste Eintr\xE4ge von {field}",
535
+ value: "Einstellungen von {field}",
536
+ display: "Wechsel zu {display}",
537
+ chart: "Diagrammtyp {type}",
538
+ totals: "Summen",
539
+ collapse: "Auf- und Zuklappen",
540
+ swap: "Zeilen und Spalten getauscht",
541
+ template: "Ansicht \u201E{name}\u201C",
542
+ reset: "zur\xFCck zur Startansicht",
543
+ outside: "\xC4nderung von au\xDFerhalb des Berichts",
544
+ viewLoaded: "Ansicht geladen",
545
+ chartDisplay: "Diagrammdarstellung",
546
+ change: "letzte \xC4nderung"
547
+ },
548
+ tips: {
549
+ filterEmpty: "Nichts passt zum Filter. Den Filter entfernen oder andere Eintr\xE4ge w\xE4hlen.",
550
+ top: "{field} zeigt nur die obersten {count}: Summen und Prozente beziehen sich auf diese Eintr\xE4ge, nicht auf alle.",
551
+ bottom: "{field} zeigt nur die untersten {count}: Summen und Prozente beziehen sich auf diese Eintr\xE4ge, nicht auf alle.",
552
+ chartCapped: "Die ersten {shown} von {total} Kategorien. Mit einem Filter oder \u201ENur die obersten Eintr\xE4ge\u201C ausw\xE4hlen.",
553
+ showAs: {
554
+ percentOfGrandTotal: "100 % ist das Gesamtergebnis: Jeder Wert ist sein Anteil am Ganzen.",
555
+ percentOfRowTotal: "100 % ist die Summe jeder Zeile: Die Werte einer Zeile ergeben zusammen 100 %.",
556
+ percentOfColumnTotal: "100 % ist die Summe jeder Spalte: Die Werte einer Spalte ergeben zusammen 100 %.",
557
+ percentOfParentRow: "100 % ist die Gruppe einer Zeile: Jede Zeile ist ihr Anteil an der Zeile dar\xFCber.",
558
+ percentOfParentColumn: "100 % ist die Gruppe einer Spalte: Jede Spalte ist ihr Anteil an der Spalte dar\xFCber.",
559
+ percentRunningTotal: "100 % ist die Summe entlang der Achse: Die laufende Summe endet bei 100 %.",
560
+ percentDifferenceFromPrevious: "Der vorherige Eintrag ist 100 %: Jeder Wert sagt, wie viel er gegen\xFCber ihm gewachsen oder geschrumpft ist."
561
+ },
562
+ chartOverTime: "{field} ist ein Datum: Linien zeigen, wie sich die Werte \xFCber die Zeit \xE4ndern.",
563
+ pieSlices: "Ein Kreis eignet sich f\xFCr bis zu etwa {max} Teile; dieser hat {count}. Balken lassen sich leichter vergleichen.",
564
+ pieColumns: "Ein Kreis zeigt ein St\xFCck je Zeile und addiert daf\xFCr die Spalten ({fields}). Balken zeigen die Spalten nebeneinander.",
565
+ chartDates: "Die Daten liegen in Spalten, so wird jedes Datum eine eigene Linie. Zeilen und Spalten tauschen, um die Daten entlang der Achse zu zeichnen.",
566
+ chartTrend: "Linien verbinden Punkte zu einem Verlauf. F\xFCr Kategorien wie L\xE4nder passen Balken besser.",
567
+ chartSeries: "{count} Reihen sind schwer zu unterscheiden. Zeilen und Spalten tauschen oder Spalten auf weniger Eintr\xE4ge filtern.",
568
+ textValue: "{field} ist Text, darum werden seine Eintr\xE4ge gez\xE4hlt. F\xFCr Summen ein Zahlenfeld verwenden.",
569
+ dateUngrouped: "{field} macht f\xFCr jedes Datum eine Zeile oder Spalte. Nach {unit} gruppiert ist es leichter zu lesen.",
570
+ manyColumns: "{count} Spalten nebeneinander sind schwer zu lesen. Zeilen und Spalten tauschen, um sie untereinander aufzulisten.",
571
+ values: "Eine Zahl in Werte ziehen, um neben den Beschriftungen Summen oder Anzahlen zu sehen.",
572
+ afterDrag: "R\xFCckg\xE4ngig nimmt den letzten Schritt zur\xFCck. Jedes Feld und jeder Chip hat auch ein Men\xFC mit denselben Schritten.",
573
+ saveTemplate: "Diese Ansicht speichern, um sie sp\xE4ter wieder zu \xF6ffnen?",
574
+ menus: "Jedes Feld hat auch ein Men\xFC, und die Werkzeugleiste hat R\xFCckg\xE4ngig.",
575
+ cells: "Auf einen Wert klicken oder darauf Eingabe dr\xFCcken, um die Zeilen dahinter zu sehen. Die Pfeiltasten wechseln zwischen den Werten."
576
+ },
577
+ tipActions: {
578
+ removeFilters: "Filter entfernen",
579
+ swap: "Zeilen und Spalten tauschen",
580
+ groupDate: "Nach {unit} gruppieren",
581
+ saveTemplate: "Ansicht speichern",
582
+ bars: "Zu Balken wechseln",
583
+ auto: "Als Linien \xFCber die Zeit zeigen"
584
+ },
585
+ dismissTip: "Tipp ausblenden",
586
+ tipsTitle: "Tipps",
587
+ shortcuts: {
588
+ undo: "R\xFCckg\xE4ngig",
589
+ redo: "Wiederholen",
590
+ move: "Zwischen den Werten der Tabelle wechseln",
591
+ open: "Die Zeilen hinter einem Wert \xF6ffnen; ein Men\xFC \xF6ffnen",
592
+ drag: "Ein Feld oder einen Chip aufnehmen und ablegen",
593
+ close: "Ein Men\xFC, ein Fenster oder einen Tipp schlie\xDFen",
594
+ fields: "In der Feldliste: auf und ab zwischen den Feldern, links und rechts zum Griff eines Felds, seinem \u201Ei\u201C und seinem Men\xFC",
595
+ fieldMenu: "Das Men\xFC des Felds im Fokus \xF6ffnen"
596
+ },
597
+ skipToToolbar: "Zur Werkzeugleiste springen",
598
+ aboutField: "\xDCber {field}",
599
+ learnMore: "Mehr erfahren",
600
+ dragInstructions: "Leertaste oder Eingabe hebt ein Feld auf. Die Pfeiltasten links und rechts bewegen es innerhalb eines Bereichs, hoch und runter in den Bereich dar\xFCber oder darunter. Mit Leertaste oder Eingabe ablegen, mit Escape abbrechen. Jedes Feld und jeder Chip hat auch ein Men\xFC mit denselben Schritten.",
601
+ dragStart: "{field} aufgenommen.",
602
+ dragOverAt: "{field} ist \xFCber {zone}, Position {position} von {count}.",
603
+ dragOverEnd: "{field} ist \xFCber {zone}, am Ende.",
604
+ dragOverNone: "{field} ist \xFCber keinem Bereich.",
605
+ dragEndAt: "{field} in {zone} abgelegt, Position {position} von {count}.",
606
+ dragEndEnd: "{field} am Ende von {zone} abgelegt.",
607
+ dragRemove: "{field} ist \xFCber der Feldliste: Ablegen entfernt es.",
608
+ dragCancel: "Ziehen von {field} abgebrochen.",
609
+ panel: "Feldliste",
610
+ showFields: "Felder",
611
+ hideFields: "Feldliste schlie\xDFen",
612
+ collapseFields: "Feldliste einklappen",
613
+ expandFields: "Feldliste anzeigen",
614
+ dropToRemove: "Zum Entfernen hier ablegen",
615
+ loadingReport: "Bericht wird geladen\u2026",
616
+ loadingMenu: "Wird geladen\u2026",
617
+ menuFailed: "Dieses Men\xFC konnte nicht geladen werden.",
618
+ tryAgain: "Erneut versuchen",
619
+ chartDisplay: "Darstellung",
620
+ axisEvery: "Jede {n}. Beschriftung wird gezeigt; auf einen Balken oder Punkt zeigen, um seinen Namen zu sehen.",
621
+ clearText: "Leeren",
622
+ toastLinkCopied: "Link kopiert",
623
+ toastJsonCopied: "Ansicht als JSON kopiert",
624
+ toastCopyFailed: "Diese Seite erlaubt kein Kopieren. Stattdessen \u201EAnsicht herunterladen\u201C verwenden.",
625
+ toastLinkTooLong: "Diese Ansicht ist zu gro\xDF f\xFCr einen Link. Stattdessen \u201EAnsicht herunterladen\u201C verwenden.",
626
+ toastViewLoaded: "Ansicht geladen",
627
+ toastViewLoadedPartly: "Ansicht geladen; einige Teile passen nicht zu diesen Daten",
628
+ toastLinkOpened: "Ansicht aus dem Link ge\xF6ffnet",
629
+ toastLinkOpenedPartly: "Ansicht aus dem Link ge\xF6ffnet; einige Teile passen nicht zu diesen Daten",
630
+ viewLeftOut: "Einige Teile passen nicht zu diesen Daten und wurden weggelassen: {parts}",
631
+ loadCheckSource: "Sie wurde f\xFCr \u201E{source}\u201C gemacht.",
632
+ loadCheckOtherSource: "Sie wurde f\xFCr andere Daten gemacht.",
633
+ loadCheckMissing: "Felder, die diese Daten nicht haben: {fields}.",
634
+ loadCheckChanged: "Felder mit anderem Typ hier: {fields}.",
635
+ linkCheckTitle: "Die Ansicht des Links passt vielleicht nicht zu diesen Daten",
636
+ viewMissingFields: "Felder, die diese Daten nicht haben ({fields})",
637
+ viewOtherIssue: "{count} weitere Einstellung",
638
+ viewOtherIssues: "{count} weitere Einstellungen",
639
+ viewFailed: {
640
+ empty: "Zuerst eine Ansicht einf\xFCgen oder eine Datei w\xE4hlen.",
641
+ tooLarge: "Das ist zu gro\xDF f\xFCr eine Ansicht.",
642
+ notJson: "Das ist weder eine Ansicht als JSON noch ein pivotkit-Link.",
643
+ notView: "Das ist keine pivotkit-Ansicht.",
644
+ newer: "Diese Ansicht stammt aus einer neueren pivotkit-Version und kann hier nicht gelesen werden. Zum \xD6ffnen pivotkit aktualisieren.",
645
+ badLink: "Dieser Link ist besch\xE4digt oder kein pivotkit-Link.",
646
+ file: "Die Datei konnte nicht gelesen werden."
647
+ },
648
+ filterIs: "Filter: {filter}",
649
+ valueConditions: { compare: "{value} {op} {number}", between: "{value} zwischen {from} und {to}", notBetween: "{value} nicht zwischen {from} und {to}" },
650
+ zoneInfo: {
651
+ rows: "Zeilen gruppieren den Bericht nach einem Feld: Jeder Eintrag bekommt eine Zeile. Beispiel: Region in Zeilen listet Nord, S\xFCd und West untereinander.",
652
+ cols: "Spalten teilen jede Zeile nach einem Feld: Jeder Eintrag bekommt eine Spalte. Beispiel: Jahr in Spalten stellt 2024 und 2025 nebeneinander.",
653
+ values: "Werte sind die Zahlen in den Zellen, summiert, gez\xE4hlt oder gemittelt f\xFCr jede Zeile und Spalte. Beispiel: Umsatz in Werte zeigt den Umsatz jeder Region.",
654
+ filters: "Filter behalten nur einige Eintr\xE4ge eines Felds im ganzen Bericht, ohne Zeile oder Spalte daf\xFCr. Beispiel: Land in Filter mit nur Deutschland ausgew\xE4hlt."
655
+ },
656
+ expandNothing: "Nichts ist zugeklappt.",
657
+ collapseNeedsRows: "Braucht zwei oder mehr Felder in Zeilen.",
658
+ needsRowField: "Braucht ein Feld in Zeilen.",
659
+ needsColField: "Braucht ein Feld in Spalten.",
660
+ needsRowFields: "Braucht zwei oder mehr Felder in Zeilen.",
661
+ needsColFields: "Braucht zwei oder mehr Felder in Spalten.",
662
+ enlarge: "Vergr\xF6\xDFern",
663
+ reduce: "Verkleinern",
664
+ fullScreen: "Vollbild",
665
+ collapseAllDone: "Alle Gruppen sind schon zugeklappt.",
666
+ groupsCollapsed: { one: "{count} Gruppe zugeklappt", other: "{count} Gruppen zugeklappt" },
667
+ groupsExpanded: { one: "{count} Gruppe aufgeklappt", other: "{count} Gruppen aufgeklappt" }
668
+ };
669
+ var LABELS = Object.freeze({ en, de });
670
+ function messageOf(error) {
671
+ return error instanceof Error ? error.message : String(error);
672
+ }
673
+ var LIMIT_TEXTS = Object.freeze({ cells: "tooLarge", groups: "tooManyGroups", pivotCells: "tooManyCells", work: "tooMuchWork", rows: "tooManyRows" });
674
+ function errorText(error, labels, locale) {
675
+ const limit = error instanceof PivotkitError && error.code === "LIMIT_EXCEEDED" ? String(error.details.limit) : "";
676
+ if (limit && Object.hasOwn(LIMIT_TEXTS, limit)) {
677
+ const details = (
678
+ /** @type {PivotkitError} */
679
+ error.details
680
+ );
681
+ const number = (n) => Number(n).toLocaleString(locale);
682
+ return fill(labels[LIMIT_TEXTS[limit]], { value: number(details.value), max: number(details.max) });
683
+ }
684
+ return fill(labels.error, { message: messageOf(error) });
685
+ }
686
+ function hostFailure(withMessage, withoutMessage, error) {
687
+ const raw = typeof error === "string" ? error : error !== null && typeof error === "object" && typeof /** @type {any} */
688
+ error.message === "string" ? (
689
+ /** @type {any} */
690
+ error.message
691
+ ) : "";
692
+ const message = raw.trim();
693
+ return message ? fill(withMessage, { message }) : withoutMessage;
694
+ }
695
+ function fill(template, values) {
696
+ return String(template).replace(/\{(\w+)\}/g, (all, name) => Object.hasOwn(values, name) ? String(values[name]) : all);
697
+ }
698
+ var PLURAL_CATEGORIES = Object.freeze(["zero", "one", "two", "few", "many", "other"]);
699
+ var isPluralForms = (v) => v !== null && typeof v === "object" && !Array.isArray(v) && Object.hasOwn(v, "other") && Object.keys(v).every((k) => PLURAL_CATEGORIES.includes(k));
700
+ function plural(forms, count, { lang, locale }) {
701
+ let category = "other";
702
+ try {
703
+ category = new Intl.PluralRules(lang).select(count);
704
+ } catch {
705
+ }
706
+ const form = typeof forms[category] === "string" ? forms[category] : forms.other;
707
+ return fill(form ?? "", { count: count.toLocaleString(locale) });
708
+ }
709
+ var isObject = (v) => v !== null && typeof v === "object" && !Array.isArray(v);
710
+ var isTextList = (v) => Array.isArray(v) && v.every((x) => typeof x === "string");
711
+ var MENU_TEXTS = /* @__PURE__ */ Symbol("pivotkit menu texts");
712
+ function mergeLabels(base, over) {
713
+ return merge(base, over);
714
+ }
715
+ function merge(base, over) {
716
+ if (!isObject(over)) {
717
+ return base;
718
+ }
719
+ const out = { ...base };
720
+ const keys = isPluralForms(base) ? PLURAL_CATEGORIES : Object.keys(base);
721
+ for (const key of keys) {
722
+ if (!Object.hasOwn(over, key)) {
723
+ continue;
724
+ }
725
+ const was = base[key] ?? "";
726
+ const now = over[key];
727
+ if (isPluralForms(was) && typeof now === "string") {
728
+ out[key] = { other: now };
729
+ } else if (isObject(was)) {
730
+ out[key] = merge(was, now);
731
+ } else if (Array.isArray(was)) {
732
+ out[key] = isTextList(now) && now.length > 0 ? now : was;
733
+ } else if (typeof now === typeof was) {
734
+ out[key] = now;
735
+ }
736
+ }
737
+ return out;
738
+ }
739
+ var LEGACY_TIPS = Object.freeze({
740
+ topNote: "top",
741
+ bottomNote: "bottom",
742
+ noValuesHint: "values",
743
+ cellHint: "cells",
744
+ emptyHint: "menus",
745
+ chartManySeries: "chartSeries",
746
+ chartDatesOnColumns: "chartDates",
747
+ chartCapped: "chartCapped"
748
+ });
749
+ function withLegacyTips(custom) {
750
+ if (!isObject(custom)) {
751
+ return custom;
752
+ }
753
+ const moved = {};
754
+ for (const [old, id] of Object.entries(LEGACY_TIPS)) {
755
+ if (Object.hasOwn(custom, old) && typeof custom[old] === "string") {
756
+ moved[id] = custom[old];
757
+ }
758
+ }
759
+ if (Object.keys(moved).length === 0) {
760
+ return custom;
761
+ }
762
+ return { ...custom, tips: { ...moved, ...isObject(custom.tips) ? custom.tips : {} } };
763
+ }
764
+ function resolveLabels(locale, custom) {
765
+ const lang = typeof locale === "string" ? locale.toLowerCase().split(/[-_]/)[0] : "en";
766
+ const base = Object.hasOwn(LABELS, lang) ? LABELS[lang] : en;
767
+ const own = withLegacyTips(custom);
768
+ return (
769
+ /** @type {UiLabels} */
770
+ { ...merge(base, own), [MENU_TEXTS]: isObject(own) ? own : {} }
771
+ );
772
+ }
773
+
774
+ export {
775
+ LABELS,
776
+ messageOf,
777
+ errorText,
778
+ hostFailure,
779
+ fill,
780
+ plural,
781
+ MENU_TEXTS,
782
+ mergeLabels,
783
+ resolveLabels
784
+ };