@mmlogic/components 0.5.13 → 0.5.14
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/dist/cjs/{cell-renderer-BBebjBVz.js → cell-renderer-mjS630f1.js} +8 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mosterdcomponents.cjs.js +1 -1
- package/dist/cjs/mrd-boolean-field_25.cjs.entry.js +148 -28
- package/dist/cjs/mrd-merge-view.cjs.entry.js +1 -1
- package/dist/collection/components/table/mrd-table/mrd-table.css +36 -0
- package/dist/collection/components/table/mrd-table/mrd-table.js +137 -25
- package/dist/collection/components/table/mrd-table/table-parts.js +6 -2
- package/dist/collection/components/table/mrd-table/table-query.js +6 -0
- package/dist/collection/utils/i18n.js +8 -0
- package/dist/components/i18n.js +1 -1
- package/dist/components/mrd-table2.js +1 -1
- package/dist/esm/{cell-renderer-CC8-MtvQ.js → cell-renderer-BDY8UXkH.js} +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mosterdcomponents.js +1 -1
- package/dist/esm/mrd-boolean-field_25.entry.js +148 -28
- package/dist/esm/mrd-merge-view.entry.js +1 -1
- package/dist/mosterdcomponents/cell-renderer-B8u5BCK-.js.map +1 -0
- package/dist/mosterdcomponents/client-layout-Bc42CfJB.js.map +1 -0
- package/dist/mosterdcomponents/document-attachments-BufPmMRv.js.map +1 -0
- package/dist/mosterdcomponents/field-helpers-CNQcI3Hf.js.map +1 -0
- package/dist/mosterdcomponents/file-upload-common-C9wp47CB.js.map +1 -0
- package/dist/mosterdcomponents/format-gcecItcD.js.map +1 -0
- package/dist/mosterdcomponents/i18n-ydNM87-Q.js.map +1 -0
- package/dist/mosterdcomponents/index-1ayBojyN.js.map +1 -0
- package/dist/mosterdcomponents/index-DhffneUF.js.map +1 -0
- package/dist/mosterdcomponents/index.esm.js.map +1 -0
- package/dist/mosterdcomponents/mosterdcomponents.esm.js +1 -1
- package/dist/mosterdcomponents/mosterdcomponents.esm.js.map +1 -0
- package/dist/mosterdcomponents/p-Dkm4WxMy.js +1 -0
- package/dist/mosterdcomponents/{p-07b148b2.entry.js → p-c834951a.entry.js} +2 -2
- package/dist/mosterdcomponents/{p-a7e8f6a3.entry.js → p-e8b0880f.entry.js} +1 -1
- package/dist/mosterdcomponents/purify.es-_duHfPgC.js.map +1 -0
- package/dist/mosterdcomponents/query-params-BZbQoeYF.js.map +1 -0
- package/dist/mosterdcomponents/quill-C9pgw_k-.js.map +1 -0
- package/dist/mosterdcomponents/validation-CjjTt66G.js.map +1 -0
- package/dist/types/components/table/mrd-table/mrd-table.d.ts +48 -1
- package/dist/types/components/table/mrd-table/table-parts.d.ts +15 -0
- package/dist/types/components/table/mrd-table/table-query.d.ts +6 -0
- package/package.json +1 -1
- package/dist/mosterdcomponents/p-D5ZPfX3-.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-CjjTt66G.js","sources":["src/utils/validation.ts"],"sourcesContent":["import { ClientLayoutItemFieldDataType } from '../types';\n\nexport function validateRequired(value: unknown): boolean {\n if (value === null || value === undefined) return false;\n if (typeof value === 'string') return value.trim().length > 0;\n if (Array.isArray(value)) return value.length > 0;\n if (typeof value === 'object') {\n // HyperlinkValue check\n const hv = value as { href?: unknown };\n if ('href' in hv) return typeof hv.href === 'string' && hv.href.trim().length > 0;\n // CurrencyValue check\n const cv = value as { amount?: unknown };\n if ('amount' in cv) return cv.amount !== null && cv.amount !== undefined && cv.amount !== '';\n }\n return true;\n}\n\nexport function validateEmail(value: string): boolean {\n if (!value) return true;\n return /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(value);\n}\n\nexport function validateUrl(value: string): boolean {\n if (!value) return true;\n try {\n const url = new URL(value);\n return url.protocol === 'http:' || url.protocol === 'https:';\n } catch {\n return false;\n }\n}\n\nexport function validateNumber(value: unknown, dataType: ClientLayoutItemFieldDataType): boolean {\n if (value === null || value === undefined || value === '') return true;\n const num = Number(value);\n if (isNaN(num)) return false;\n if (dataType === ClientLayoutItemFieldDataType.INTEGER) {\n return Number.isInteger(num);\n }\n if (dataType === ClientLayoutItemFieldDataType.PERCENTAGE) {\n return num >= 0 && num <= 100;\n }\n return true;\n}\n"],"names":[],"mappings":";;;AAEM,SAAU,gBAAgB,CAAC,KAAc,EAAA;AAC7C,IAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;AAAE,QAAA,OAAO,KAAK;IACvD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;AAC7D,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC;AACjD,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;;QAE7B,MAAM,EAAE,GAAG,KAA2B;QACtC,IAAI,MAAM,IAAI,EAAE;AAAE,YAAA,OAAO,OAAO,EAAE,CAAC,IAAI,KAAK,QAAQ,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;;QAEjF,MAAM,EAAE,GAAG,KAA6B;QACxC,IAAI,QAAQ,IAAI,EAAE;AAAE,YAAA,OAAO,EAAE,CAAC,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC,MAAM,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE;;AAE9F,IAAA,OAAO,IAAI;AACb;AAEM,SAAU,aAAa,CAAC,KAAa,EAAA;AACzC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AACvB,IAAA,OAAO,4BAA4B,CAAC,IAAI,CAAC,KAAK,CAAC;AACjD;AAEM,SAAU,WAAW,CAAC,KAAa,EAAA;AACvC,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,OAAO,IAAI;AACvB,IAAA,IAAI;AACF,QAAA,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC;QAC1B,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ;;IAC5D,OAAA,EAAA,EAAM;AACN,QAAA,OAAO,KAAK;;AAEhB;AAEM,SAAU,cAAc,CAAC,KAAc,EAAE,QAAuC,EAAA;IACpF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE;AAAE,QAAA,OAAO,IAAI;AACtE,IAAA,MAAM,GAAG,GAAG,MAAM,CAAC,KAAK,CAAC;IACzB,IAAI,KAAK,CAAC,GAAG,CAAC;AAAE,QAAA,OAAO,KAAK;AAC5B,IAAA,IAAI,QAAQ,KAAK,6BAA6B,CAAC,OAAO,EAAE;AACtD,QAAA,OAAO,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC;;AAE9B,IAAA,IAAI,QAAQ,KAAK,6BAA6B,CAAC,UAAU,EAAE;AACzD,QAAA,OAAO,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG;;AAE/B,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -15,6 +15,17 @@ export declare class MrdTable {
|
|
|
15
15
|
private keydownHandler;
|
|
16
16
|
private createPickerClickHandler;
|
|
17
17
|
private viewPopoverClickHandler;
|
|
18
|
+
/** Debounce timer for the free-text search box — separate from debounceTimer
|
|
19
|
+
* (pending-page requests), since typing and scrolling debounce independently. */
|
|
20
|
+
private searchDebounceTimer;
|
|
21
|
+
/** The rendered search <input>, captured so it can be focused the instant it mounts. */
|
|
22
|
+
private searchInputEl;
|
|
23
|
+
/** Set by toggleSearch() when the box just expanded; consumed and cleared in componentDidRender(). */
|
|
24
|
+
private searchNeedsFocus;
|
|
25
|
+
/** Column filters stashed by stashFiltersForSearch() while the search box is open — the
|
|
26
|
+
* backend can't combine `q` with column filters. Restored by restoreFiltersAfterSearch()
|
|
27
|
+
* on close, unless the user applied a fresh filter of their own in the meantime. */
|
|
28
|
+
private stashedFilters;
|
|
18
29
|
/** Watches the host for gaining a box (e.g. its tab pane being shown) — see componentDidLoad. */
|
|
19
30
|
private resizeObserver;
|
|
20
31
|
/** Guards against scheduling more than one column-width measurement per freeze. */
|
|
@@ -74,6 +85,10 @@ export declare class MrdTable {
|
|
|
74
85
|
sortDir: 'asc' | 'desc';
|
|
75
86
|
/** Active filters keyed by field name. */
|
|
76
87
|
activeFilters: Map<string, ColumnFilter>;
|
|
88
|
+
/** True while the toolbar's magnifying glass is expanded into the search input. */
|
|
89
|
+
private searchOpen;
|
|
90
|
+
/** Current free-text search query — sent as `q` on every mrdLoadPage/aggregations request. */
|
|
91
|
+
private searchQuery;
|
|
77
92
|
/** Field name of the currently open filter popup (null = closed). */
|
|
78
93
|
openFilterCol: string | null;
|
|
79
94
|
/** Filter state being edited in the open popup. */
|
|
@@ -258,7 +273,13 @@ export declare class MrdTable {
|
|
|
258
273
|
* VIEW: /{dataClass}
|
|
259
274
|
* RELATED_VIEW: /{fromClass}/{parentId}/{dataClass} */
|
|
260
275
|
private buildDataPath;
|
|
261
|
-
/** Build query params for a page request from current sort, view filters, filterClass and active column filters.
|
|
276
|
+
/** Build query params for a page request from current sort, view filters, filterClass and active column filters.
|
|
277
|
+
*
|
|
278
|
+
* `q` and column filters are mutually exclusive on the backend — combining them breaks
|
|
279
|
+
* the search. stashFiltersForSearch() already empties activeFilters for the duration of
|
|
280
|
+
* a search, but this guard is the actual guarantee: even if a filter is applied through
|
|
281
|
+
* a column header while the search box is still open (before the query is cleared),
|
|
282
|
+
* activeFilters is dropped from the request rather than sent alongside `q`. */
|
|
262
283
|
private buildQueryParams;
|
|
263
284
|
/** True when the table is in paginated / virtual-scroll mode rather than driven by the
|
|
264
285
|
* rows prop. Mirrors the branch taken in render().
|
|
@@ -306,9 +327,35 @@ export declare class MrdTable {
|
|
|
306
327
|
private closeJsonModal;
|
|
307
328
|
private setPending;
|
|
308
329
|
private togglePendingValue;
|
|
330
|
+
/** Common reload after activeFilters or searchQuery changed: drop stale aggregations
|
|
331
|
+
* (the next setPage(0) re-requests them, guarded against `q` in setPage() itself) and
|
|
332
|
+
* re-fetch page 0. Shared by the filter popup, clear-all, and free-text search. */
|
|
333
|
+
private reloadAfterQueryChange;
|
|
309
334
|
private applyFilter;
|
|
310
335
|
private clearFilter;
|
|
311
336
|
private clearAllFilters;
|
|
337
|
+
/** Search is a VIEW-only affordance — a RELATED_VIEW table is already scoped to
|
|
338
|
+
* its parent record, so a free-text box there would invite confusion about what
|
|
339
|
+
* it searches across. */
|
|
340
|
+
private get searchEnabled();
|
|
341
|
+
private toggleSearch;
|
|
342
|
+
/** Collapses the box back to the icon. Clearing a non-empty query and restoring any
|
|
343
|
+
* stashed filters can each independently require a reload — reloadAfterQueryChange()
|
|
344
|
+
* is called at most once here regardless of how many of the two actually changed. */
|
|
345
|
+
private closeSearch;
|
|
346
|
+
private handleSearchInput;
|
|
347
|
+
/** Reloads from page 0 with the current searchQuery, same reset as applyFilter(). */
|
|
348
|
+
private applySearch;
|
|
349
|
+
/** Column filters and the free-text `q` param are mutually exclusive on the backend —
|
|
350
|
+
* sending both breaks the search. Opening the search box stashes any active filters
|
|
351
|
+
* and clears them (the header filter icons and the clear-all button disappear along
|
|
352
|
+
* with activeFilters, so there is nothing extra to hide) and reloads unfiltered. */
|
|
353
|
+
private stashFiltersForSearch;
|
|
354
|
+
/** Restores filters stashed by stashFiltersForSearch(), unless the user applied a fresh
|
|
355
|
+
* filter of their own while the search box was open — that explicit choice wins over
|
|
356
|
+
* reinstating the old one. Returns whether activeFilters actually changed, so the
|
|
357
|
+
* caller can decide whether a reload is needed. */
|
|
358
|
+
private restoreFiltersAfterSearch;
|
|
312
359
|
private handleViewSwitch;
|
|
313
360
|
private toggleViewPopover;
|
|
314
361
|
private closeViewPopover;
|
|
@@ -6,6 +6,9 @@ import { AggregationResult, ClientCreateType } from '../../../types/client-layou
|
|
|
6
6
|
* component; these components receive plain values and callbacks.
|
|
7
7
|
*/
|
|
8
8
|
export declare const FilterIcon: FunctionalComponent;
|
|
9
|
+
export declare const SearchIcon: FunctionalComponent<{
|
|
10
|
+
class?: string;
|
|
11
|
+
}>;
|
|
9
12
|
export declare const TableCell: FunctionalComponent<{
|
|
10
13
|
col: TableColumn;
|
|
11
14
|
row: Record<string, any>;
|
|
@@ -43,6 +46,14 @@ export interface ToolbarCallbacks {
|
|
|
43
46
|
/** Emit the create action; basicType set when chosen from the create-type picker. */
|
|
44
47
|
onCreate: (basicType?: string) => void;
|
|
45
48
|
onAction: (action: string) => void;
|
|
49
|
+
/** Expand the collapsed magnifying-glass icon into the search input, or collapse it back. */
|
|
50
|
+
onToggleSearch: () => void;
|
|
51
|
+
/** Free-text search input changed; caller debounces before reloading. */
|
|
52
|
+
onSearchInput: (value: string) => void;
|
|
53
|
+
/** Clear the query and collapse the search box back to the icon. */
|
|
54
|
+
onCloseSearch: () => void;
|
|
55
|
+
/** Captures the rendered <input> so the caller can focus it the instant it mounts. */
|
|
56
|
+
onSearchInputRef: (el?: HTMLInputElement) => void;
|
|
46
57
|
}
|
|
47
58
|
export declare const Toolbar: FunctionalComponent<{
|
|
48
59
|
locale: string;
|
|
@@ -58,5 +69,9 @@ export declare const Toolbar: FunctionalComponent<{
|
|
|
58
69
|
/** True when a viewer-role user has read-only access: mutating actions are
|
|
59
70
|
* disabled and their tooltip explains why instead of just repeating the label. */
|
|
60
71
|
readOnly?: boolean;
|
|
72
|
+
/** True only for a top-level VIEW item — RELATED_VIEW tables never show free-text search. */
|
|
73
|
+
searchEnabled?: boolean;
|
|
74
|
+
searchOpen?: boolean;
|
|
75
|
+
searchQuery?: string;
|
|
61
76
|
cb: ToolbarCallbacks;
|
|
62
77
|
}>;
|
|
@@ -10,6 +10,10 @@ export declare const DATE_TYPES: Set<string>;
|
|
|
10
10
|
export declare const NO_FILTER_TYPES: Set<string>;
|
|
11
11
|
/** Column types that cannot be sorted or filtered (not stored in PostgreSQL). */
|
|
12
12
|
export declare const NON_INTERACTIVE_TYPES: Set<string>;
|
|
13
|
+
/** Wait this long (ms) after the user stops typing in the free-text search box
|
|
14
|
+
* before firing the search request — mirrors REQUEST_DEBOUNCE_MS's purpose
|
|
15
|
+
* (skip intermediate keystrokes) but is tuned for typing, not scrolling. */
|
|
16
|
+
export declare const SEARCH_DEBOUNCE_MS = 400;
|
|
13
17
|
export declare function parseDefaultSort(defaultSort: string): {
|
|
14
18
|
field: string;
|
|
15
19
|
dir: 'asc' | 'desc';
|
|
@@ -23,6 +27,8 @@ export declare function buildTableQueryParams(opts: {
|
|
|
23
27
|
filterClass?: string | null;
|
|
24
28
|
viewFilters?: ViewFilter[] | null;
|
|
25
29
|
activeFilters: Iterable<ColumnFilter>;
|
|
30
|
+
/** Free-text search query from the toolbar's search box (VIEW only). */
|
|
31
|
+
query?: string;
|
|
26
32
|
}): string;
|
|
27
33
|
/** Groups aggregate columns by function; null when the view has no aggregates. */
|
|
28
34
|
export declare function buildAggregationParams(columns: TableColumn[]): {
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./p-Bc42CfJB.js";function i(e,i,r){return null==e||isNaN(e)?"":new Intl.NumberFormat(i,r).format(e)}function r(e,i,r){return null==e||isNaN(e)?"":new Intl.NumberFormat(r,{style:"currency",currency:i,minimumFractionDigits:2,maximumFractionDigits:2}).format(e)}function t(e,i,r=2){return null==e||isNaN(e)?"":new Intl.NumberFormat(i,{style:"percent",minimumFractionDigits:r,maximumFractionDigits:r}).format(e)}function l(e,i){if(!e)return"";const r="string"==typeof e?new Date(e):e;return isNaN(r.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit"}).format(r)}function a(e,i){if(!e)return"";const r="string"==typeof e?new Date(e):e;return isNaN(r.getTime())?"":new Intl.DateTimeFormat(i,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(r)}function n(e,i){var r,t,l,a;if(!e||!e.trim())return null;const n=new Intl.NumberFormat(i).formatToParts(1234567.89),o=null!==(t=null===(r=n.find((e=>"group"===e.type)))||void 0===r?void 0:r.value)&&void 0!==t?t:",",_=null!==(a=null===(l=n.find((e=>"decimal"===e.type)))||void 0===l?void 0:l.value)&&void 0!==a?a:".",c=e.replace(new RegExp(`\\${o}`,"g"),"").replace(new RegExp(`\\${_}`),".").replace("%","").trim(),s=parseFloat(c);return isNaN(s)?null:s}const o={nl:{required:"Dit veld is verplicht",select_placeholder:"Selecteer een optie",search_placeholder:"Zoeken...",upload_file:"Bestand uploaden",choose_file:"Bestand kiezen",clear:"Wissen",today:"Vandaag",invalid_email:"Voer een geldig e-mailadres in",invalid_url:"Voer een geldige URL in",invalid_number:"Voer een geldig getal in",drop_file_here:"Sleep bestand hierheen of",browse:"bladeren",file_too_large:"Bestand is te groot",invalid_image:"Selecteer een afbeeldingsbestand",search_results:"Zoekresultaten",no_results:"Geen resultaten gevonden",load_failed_retry:"Laden mislukt — opnieuw proberen",column_resize:"Kolombreedte aanpassen (dubbelklik om passend te maken)",loading:"Laden...",submit:"Opslaan",cancel:"Annuleren",remove:"Verwijderen",add:"Toevoegen",yes:"Ja",no:"Nee",table_of:"van",download:"Downloaden",value_empty:"—",table_filter_clear_all:"Alle filters wissen",table_new_record:"Nieuw record",table_export_excel:"Exporteer naar Excel",readonly_access:"Je hebt alleen-leestoegang",doc_view_switch:"Weergave wisselen",doc_view_tree:"Boomweergave",doc_upload:"Uploaden",doc_upload_to:"Uploaden naar",doc_view_list:"Lijstweergave",filter_sorting:"Sortering",filter_ascending:"Oplopend",filter_descending:"Aflopend",filter_section:"Filter",filter_apply:"Toepassen",filter_clear:"Wissen",filter_contains:"Bevat",filter_starts_with:"Begint met",filter_equals:"Gelijk aan",filter_has_value:"Heeft waarde",filter_is_empty:"Is leeg",filter_is_not_empty:"Is niet leeg",filter_exact:"Exact",filter_range:"Bereik",filter_from:"Van",filter_to:"Tot",filter_all:"Alle",filter_select_all:"Alles",filter_select_none:"Geen",filter_search_value:"Zoekwaarde...",filter_no_support:"Geen filtering beschikbaar voor dit veldtype.",textblock_show_more:"Meer tonen",close:"Sluiten",history_until:"tot",history_badge_tooltip:"Vorige waarden",hyperlink_name:"Linktekst (optioneel)",new_folder:"Nieuwe folder",folder_name_placeholder:"Foldernaam",folder_no_slash:"Een foldernaam mag geen '/' bevatten",folder_duplicate:"Er bestaat al een folder met deze naam",doc_empty_drop:"Nog geen documenten — sleep bestanden hierheen",merge_search_hint:"Zoek het duplicaat waarmee je wilt samenvoegen",merge_select:"Selecteer",merge_compare_heading:"Los conflicten op",merge_column_a:"Huidig (blijft behouden)",merge_column_b:"Kandidaat (wordt verwijderd)",merge_auto_heading:"Deze velden worden automatisch overgenomen van de kandidaat:",merge_no_conflicts:"Geen conflicterende velden gevonden",merge_continue:"Doorgaan",merge_back:"Terug",merge_confirm_heading:"Bevestig samenvoegen",merge_confirm_warning:"Dit kan niet ongedaan worden gemaakt: de kandidaat wordt definitief verwijderd.",merge_confirm_button:"Samenvoegen bevestigen",invoice_title:"Factuur",invoice_date:"Factuurdatum",invoice_due_date:"Vervaldatum",invoice_subtotal:"Subtotaal",invoice_tax:"BTW",invoice_total:"Totaal",invoice_customer:"Klant",invoice_supplier:"Leverancier",email_from:"Van",email_to:"Aan",email_cc:"Cc",email_date:"Datum",email_show_headers:"Toon technische headers"},en:{required:"This field is required",select_placeholder:"Select an option",search_placeholder:"Search...",upload_file:"Upload file",choose_file:"Choose file",clear:"Clear",today:"Today",invalid_email:"Please enter a valid email address",invalid_url:"Please enter a valid URL",invalid_number:"Please enter a valid number",drop_file_here:"Drop file here or",browse:"browse",file_too_large:"File is too large",invalid_image:"Please select an image file",search_results:"Search results",no_results:"No results found",load_failed_retry:"Failed to load — retry",column_resize:"Resize column (double-click to fit)",loading:"Loading...",submit:"Save",cancel:"Cancel",remove:"Remove",add:"Add",yes:"Yes",no:"No",table_of:"of",download:"Download",value_empty:"—",table_filter_clear_all:"Clear all filters",table_new_record:"New record",table_export_excel:"Export to Excel",readonly_access:"You have read-only access",doc_view_switch:"Switch view",doc_view_tree:"Tree view",doc_upload:"Upload",doc_upload_to:"Upload to",doc_view_list:"List view",filter_sorting:"Sorting",filter_ascending:"Ascending",filter_descending:"Descending",filter_section:"Filter",filter_apply:"Apply",filter_clear:"Clear",filter_contains:"Contains",filter_starts_with:"Starts with",filter_equals:"Equals",filter_has_value:"Has value",filter_is_empty:"Is empty",filter_is_not_empty:"Is not empty",filter_exact:"Exact",filter_range:"Range",filter_from:"From",filter_to:"To",filter_all:"All",filter_select_all:"All",filter_select_none:"None",filter_search_value:"Search value...",filter_no_support:"Filtering is not available for this field type.",textblock_show_more:"Show more",close:"Close",history_until:"until",history_badge_tooltip:"Previous values",hyperlink_name:"Link text (optional)",new_folder:"New folder",folder_name_placeholder:"Folder name",folder_no_slash:"A folder name cannot contain '/'",folder_duplicate:"A folder with this name already exists",doc_empty_drop:"No documents yet — drop files here",merge_search_hint:"Search for the duplicate to merge with",merge_select:"Select",merge_compare_heading:"Resolve conflicts",merge_column_a:"Current (kept)",merge_column_b:"Candidate (will be deleted)",merge_auto_heading:"These fields will be taken from the candidate automatically:",merge_no_conflicts:"No conflicting fields found",merge_continue:"Continue",merge_back:"Back",merge_confirm_heading:"Confirm merge",merge_confirm_warning:"This cannot be undone: the candidate will be permanently deleted.",merge_confirm_button:"Confirm merge",invoice_title:"Invoice",invoice_date:"Invoice date",invoice_due_date:"Due date",invoice_subtotal:"Subtotal",invoice_tax:"Tax",invoice_total:"Total",invoice_customer:"Customer",invoice_supplier:"Supplier",email_from:"From",email_to:"To",email_cc:"Cc",email_date:"Date",email_show_headers:"Show technical headers"},ar:{required:"هذا الحقل مطلوب",select_placeholder:"اختر خياراً",search_placeholder:"بحث...",upload_file:"رفع ملف",choose_file:"اختر ملفاً",clear:"مسح",today:"اليوم",invalid_email:"يرجى إدخال عنوان بريد إلكتروني صحيح",invalid_url:"يرجى إدخال رابط صحيح",invalid_number:"يرجى إدخال رقم صحيح",drop_file_here:"اسحب الملف هنا أو",browse:"تصفح",file_too_large:"الملف كبير جداً",invalid_image:"يرجى اختيار ملف صورة",search_results:"نتائج البحث",no_results:"لم يتم العثور على نتائج",load_failed_retry:"فشل التحميل — إعادة المحاولة",column_resize:"تغيير عرض العمود (انقر نقرًا مزدوجًا للملاءمة)",loading:"جار التحميل...",submit:"حفظ",cancel:"إلغاء",remove:"إزالة",add:"إضافة",yes:"نعم",no:"لا",table_of:"من أصل",download:"تنزيل",value_empty:"—",table_filter_clear_all:"مسح جميع الفلاتر",table_new_record:"سجل جديد",table_export_excel:"تصدير إلى Excel",readonly_access:"لديك حق الوصول للقراءة فقط",doc_view_switch:"تبديل العرض",doc_view_tree:"عرض شجري",doc_upload:"رفع",doc_upload_to:"رفع إلى",doc_view_list:"عرض القائمة",filter_sorting:"الترتيب",filter_ascending:"تصاعدي",filter_descending:"تنازلي",filter_section:"تصفية",filter_apply:"تطبيق",filter_clear:"مسح",filter_contains:"يحتوي على",filter_starts_with:"يبدأ بـ",filter_equals:"يساوي",filter_has_value:"له قيمة",filter_is_empty:"فارغ",filter_is_not_empty:"ليس فارغاً",filter_exact:"دقيق",filter_range:"نطاق",filter_from:"من",filter_to:"إلى",filter_all:"الكل",filter_select_all:"الكل",filter_select_none:"لا شيء",filter_search_value:"قيمة البحث...",filter_no_support:"التصفية غير متاحة لهذا النوع من الحقول.",textblock_show_more:"عرض المزيد",close:"إغلاق",history_until:"حتى",history_badge_tooltip:"القيم السابقة",hyperlink_name:"نص الرابط (اختياري)",merge_search_hint:"ابحث عن السجل المكرر للدمج معه",merge_select:"اختر",merge_compare_heading:"حل التعارضات",merge_column_a:"الحالي (سيتم الاحتفاظ به)",merge_column_b:"المرشح (سيتم حذفه)",merge_auto_heading:"سيتم أخذ هذه الحقول من المرشح تلقائياً:",merge_no_conflicts:"لم يتم العثور على حقول متعارضة",merge_continue:"متابعة",merge_back:"رجوع",merge_confirm_heading:"تأكيد الدمج",merge_confirm_warning:"لا يمكن التراجع عن هذا الإجراء: سيتم حذف المرشح نهائياً.",merge_confirm_button:"تأكيد الدمج",invoice_title:"فاتورة",invoice_date:"تاريخ الفاتورة",invoice_due_date:"تاريخ الاستحقاق",invoice_subtotal:"المجموع الفرعي",invoice_tax:"الضريبة",invoice_total:"الإجمالي",invoice_customer:"العميل",invoice_supplier:"المورد",email_from:"من",email_to:"إلى",email_cc:"نسخة",email_date:"التاريخ",email_show_headers:"إظهار الترويسات التقنية"},fr:{required:"Ce champ est obligatoire",select_placeholder:"Sélectionner une option",search_placeholder:"Rechercher...",upload_file:"Télécharger un fichier",choose_file:"Choisir un fichier",clear:"Effacer",today:"Aujourd'hui",invalid_email:"Veuillez saisir une adresse e-mail valide",invalid_url:"Veuillez saisir une URL valide",invalid_number:"Veuillez saisir un nombre valide",drop_file_here:"Déposez le fichier ici ou",browse:"parcourir",file_too_large:"Le fichier est trop volumineux",invalid_image:"Veuillez sélectionner un fichier image",search_results:"Résultats de recherche",no_results:"Aucun résultat trouvé",load_failed_retry:"Échec du chargement — réessayer",column_resize:"Redimensionner la colonne (double-cliquer pour ajuster)",loading:"Chargement...",submit:"Enregistrer",cancel:"Annuler",remove:"Supprimer",add:"Ajouter",yes:"Oui",no:"Non",table_of:"sur",download:"Télécharger",value_empty:"—",table_filter_clear_all:"Effacer tous les filtres",table_new_record:"Nouvel enregistrement",table_export_excel:"Exporter vers Excel",readonly_access:"Vous disposez d'un accès en lecture seule",doc_view_switch:"Changer de vue",doc_view_tree:"Vue arborescente",doc_upload:"Téléverser",doc_upload_to:"Téléverser vers",doc_view_list:"Vue liste",filter_sorting:"Tri",filter_ascending:"Croissant",filter_descending:"Décroissant",filter_section:"Filtre",filter_apply:"Appliquer",filter_clear:"Effacer",filter_contains:"Contient",filter_starts_with:"Commence par",filter_equals:"Égal à",filter_has_value:"A une valeur",filter_is_empty:"Est vide",filter_is_not_empty:"N'est pas vide",filter_exact:"Exact",filter_range:"Plage",filter_from:"De",filter_to:"À",filter_all:"Tous",filter_select_all:"Tous",filter_select_none:"Aucun",filter_search_value:"Valeur de recherche...",filter_no_support:"Le filtrage n'est pas disponible pour ce type de champ.",textblock_show_more:"Voir plus",close:"Fermer",history_until:"jusqu'au",history_badge_tooltip:"Valeurs précédentes",hyperlink_name:"Texte du lien (optionnel)",merge_search_hint:"Rechercher le doublon à fusionner",merge_select:"Sélectionner",merge_compare_heading:"Résoudre les conflits",merge_column_a:"Actuel (conservé)",merge_column_b:"Candidat (sera supprimé)",merge_auto_heading:"Ces champs seront repris automatiquement du candidat :",merge_no_conflicts:"Aucun champ en conflit trouvé",merge_continue:"Continuer",merge_back:"Retour",merge_confirm_heading:"Confirmer la fusion",merge_confirm_warning:"Cette action est irréversible : le candidat sera définitivement supprimé.",merge_confirm_button:"Confirmer la fusion",invoice_title:"Facture",invoice_date:"Date de facture",invoice_due_date:"Date d'échéance",invoice_subtotal:"Sous-total",invoice_tax:"TVA",invoice_total:"Total",invoice_customer:"Client",invoice_supplier:"Fournisseur",email_from:"De",email_to:"À",email_cc:"Cc",email_date:"Date",email_show_headers:"Afficher les en-têtes techniques"},de:{required:"Dieses Feld ist erforderlich",select_placeholder:"Option auswählen",search_placeholder:"Suchen...",upload_file:"Datei hochladen",choose_file:"Datei auswählen",clear:"Löschen",today:"Heute",invalid_email:"Bitte geben Sie eine gültige E-Mail-Adresse ein",invalid_url:"Bitte geben Sie eine gültige URL ein",invalid_number:"Bitte geben Sie eine gültige Zahl ein",drop_file_here:"Datei hier ablegen oder",browse:"durchsuchen",file_too_large:"Datei ist zu groß",invalid_image:"Bitte eine Bilddatei auswählen",search_results:"Suchergebnisse",no_results:"Keine Ergebnisse gefunden",load_failed_retry:"Laden fehlgeschlagen — erneut versuchen",column_resize:"Spaltenbreite anpassen (Doppelklick zum Anpassen)",loading:"Laden...",submit:"Speichern",cancel:"Abbrechen",remove:"Entfernen",add:"Hinzufügen",yes:"Ja",no:"Nein",table_of:"von",download:"Herunterladen",value_empty:"—",table_filter_clear_all:"Alle Filter löschen",table_new_record:"Neuer Eintrag",table_export_excel:"Als Excel exportieren",readonly_access:"Sie haben nur Lesezugriff",doc_view_switch:"Ansicht wechseln",doc_view_tree:"Baumansicht",doc_upload:"Hochladen",doc_upload_to:"Hochladen nach",doc_view_list:"Listenansicht",filter_sorting:"Sortierung",filter_ascending:"Aufsteigend",filter_descending:"Absteigend",filter_section:"Filter",filter_apply:"Anwenden",filter_clear:"Löschen",filter_contains:"Enthält",filter_starts_with:"Beginnt mit",filter_equals:"Gleich",filter_has_value:"Hat Wert",filter_is_empty:"Ist leer",filter_is_not_empty:"Ist nicht leer",filter_exact:"Genau",filter_range:"Bereich",filter_from:"Von",filter_to:"Bis",filter_all:"Alle",filter_select_all:"Alle",filter_select_none:"Keine",filter_search_value:"Suchwert...",filter_no_support:"Filterung ist für diesen Feldtyp nicht verfügbar.",textblock_show_more:"Mehr anzeigen",close:"Schließen",history_until:"bis",history_badge_tooltip:"Vorherige Werte",hyperlink_name:"Linktext (optional)",merge_search_hint:"Suchen Sie das Duplikat, mit dem zusammengeführt werden soll",merge_select:"Auswählen",merge_compare_heading:"Konflikte lösen",merge_column_a:"Aktuell (bleibt erhalten)",merge_column_b:"Kandidat (wird gelöscht)",merge_auto_heading:"Diese Felder werden automatisch vom Kandidaten übernommen:",merge_no_conflicts:"Keine widersprüchlichen Felder gefunden",merge_continue:"Weiter",merge_back:"Zurück",merge_confirm_heading:"Zusammenführung bestätigen",merge_confirm_warning:"Dies kann nicht rückgängig gemacht werden: der Kandidat wird endgültig gelöscht.",merge_confirm_button:"Zusammenführung bestätigen",invoice_title:"Rechnung",invoice_date:"Rechnungsdatum",invoice_due_date:"Fälligkeitsdatum",invoice_subtotal:"Zwischensumme",invoice_tax:"MwSt.",invoice_total:"Gesamt",invoice_customer:"Kunde",invoice_supplier:"Lieferant",email_from:"Von",email_to:"An",email_cc:"Cc",email_date:"Datum",email_show_headers:"Technische Header anzeigen"},es:{required:"Este campo es obligatorio",select_placeholder:"Seleccionar una opción",search_placeholder:"Buscar...",upload_file:"Subir archivo",choose_file:"Elegir archivo",clear:"Borrar",today:"Hoy",invalid_email:"Por favor, introduzca una dirección de correo electrónico válida",invalid_url:"Por favor, introduzca una URL válida",invalid_number:"Por favor, introduzca un número válido",drop_file_here:"Suelte el archivo aquí o",browse:"explorar",file_too_large:"El archivo es demasiado grande",invalid_image:"Seleccione un archivo de imagen",search_results:"Resultados de búsqueda",no_results:"No se encontraron resultados",load_failed_retry:"Error al cargar — reintentar",column_resize:"Ajustar ancho de columna (doble clic para ajustar)",loading:"Cargando...",submit:"Guardar",cancel:"Cancelar",remove:"Eliminar",add:"Añadir",yes:"Sí",no:"No",table_of:"de",download:"Descargar",value_empty:"—",table_filter_clear_all:"Borrar todos los filtros",table_new_record:"Nuevo registro",table_export_excel:"Exportar a Excel",readonly_access:"Tienes acceso de solo lectura",doc_view_switch:"Cambiar vista",doc_view_tree:"Vista de árbol",doc_upload:"Subir",doc_upload_to:"Subir a",doc_view_list:"Vista de lista",filter_sorting:"Ordenación",filter_ascending:"Ascendente",filter_descending:"Descendente",filter_section:"Filtro",filter_apply:"Aplicar",filter_clear:"Borrar",filter_contains:"Contiene",filter_starts_with:"Empieza por",filter_equals:"Igual a",filter_has_value:"Tiene valor",filter_is_empty:"Está vacío",filter_is_not_empty:"No está vacío",filter_exact:"Exacto",filter_range:"Rango",filter_from:"Desde",filter_to:"Hasta",filter_all:"Todos",filter_select_all:"Todos",filter_select_none:"Ninguno",filter_search_value:"Valor de búsqueda...",filter_no_support:"El filtrado no está disponible para este tipo de campo.",textblock_show_more:"Mostrar más",close:"Cerrar",history_until:"hasta",history_badge_tooltip:"Valores anteriores",hyperlink_name:"Texto del enlace (opcional)",merge_search_hint:"Busque el duplicado con el que fusionar",merge_select:"Seleccionar",merge_compare_heading:"Resolver conflictos",merge_column_a:"Actual (se conserva)",merge_column_b:"Candidato (se eliminará)",merge_auto_heading:"Estos campos se tomarán automáticamente del candidato:",merge_no_conflicts:"No se encontraron campos en conflicto",merge_continue:"Continuar",merge_back:"Atrás",merge_confirm_heading:"Confirmar fusión",merge_confirm_warning:"Esto no se puede deshacer: el candidato se eliminará permanentemente.",merge_confirm_button:"Confirmar fusión",invoice_title:"Factura",invoice_date:"Fecha de factura",invoice_due_date:"Fecha de vencimiento",invoice_subtotal:"Subtotal",invoice_tax:"Impuesto",invoice_total:"Total",invoice_customer:"Cliente",invoice_supplier:"Proveedor",email_from:"De",email_to:"Para",email_cc:"Cc",email_date:"Fecha",email_show_headers:"Mostrar encabezados técnicos"},it:{required:"Questo campo è obbligatorio",select_placeholder:"Seleziona un'opzione",search_placeholder:"Cerca...",upload_file:"Carica file",choose_file:"Scegli file",clear:"Cancella",today:"Oggi",invalid_email:"Inserisci un indirizzo email valido",invalid_url:"Inserisci un URL valido",invalid_number:"Inserisci un numero valido",drop_file_here:"Trascina il file qui o",browse:"sfoglia",file_too_large:"Il file è troppo grande",invalid_image:"Seleziona un file immagine",search_results:"Risultati della ricerca",no_results:"Nessun risultato trovato",load_failed_retry:"Caricamento non riuscito — riprova",column_resize:"Ridimensiona colonna (doppio clic per adattare)",loading:"Caricamento...",submit:"Salva",cancel:"Annulla",remove:"Rimuovi",add:"Aggiungi",yes:"Sì",no:"No",table_of:"di",download:"Scarica",value_empty:"—",table_filter_clear_all:"Cancella tutti i filtri",table_new_record:"Nuovo record",table_export_excel:"Esporta in Excel",readonly_access:"Hai accesso in sola lettura",doc_view_switch:"Cambia vista",doc_view_tree:"Vista ad albero",doc_upload:"Carica",doc_upload_to:"Carica in",doc_view_list:"Vista elenco",filter_sorting:"Ordinamento",filter_ascending:"Crescente",filter_descending:"Decrescente",filter_section:"Filtro",filter_apply:"Applica",filter_clear:"Cancella",filter_contains:"Contiene",filter_starts_with:"Inizia con",filter_equals:"Uguale a",filter_has_value:"Ha valore",filter_is_empty:"È vuoto",filter_is_not_empty:"Non è vuoto",filter_exact:"Esatto",filter_range:"Intervallo",filter_from:"Da",filter_to:"A",filter_all:"Tutti",filter_select_all:"Tutti",filter_select_none:"Nessuno",filter_search_value:"Valore di ricerca...",filter_no_support:"Il filtro non è disponibile per questo tipo di campo.",textblock_show_more:"Mostra altro",close:"Chiudi",history_until:"fino a",history_badge_tooltip:"Valori precedenti",hyperlink_name:"Testo del collegamento (opzionale)",merge_search_hint:"Cerca il duplicato con cui unire",merge_select:"Seleziona",merge_compare_heading:"Risolvi i conflitti",merge_column_a:"Attuale (viene mantenuto)",merge_column_b:"Candidato (verrà eliminato)",merge_auto_heading:"Questi campi verranno ripresi automaticamente dal candidato:",merge_no_conflicts:"Nessun campo in conflitto trovato",merge_continue:"Continua",merge_back:"Indietro",merge_confirm_heading:"Conferma unione",merge_confirm_warning:"Questa azione non può essere annullata: il candidato verrà eliminato definitivamente.",merge_confirm_button:"Conferma unione",invoice_title:"Fattura",invoice_date:"Data fattura",invoice_due_date:"Data di scadenza",invoice_subtotal:"Subtotale",invoice_tax:"IVA",invoice_total:"Totale",invoice_customer:"Cliente",invoice_supplier:"Fornitore",email_from:"Da",email_to:"A",email_cc:"Cc",email_date:"Data",email_show_headers:"Mostra intestazioni tecniche"},uk:{required:"Це поле обов'язкове",select_placeholder:"Виберіть варіант",search_placeholder:"Пошук...",upload_file:"Завантажити файл",choose_file:"Вибрати файл",clear:"Очистити",today:"Сьогодні",invalid_email:"Будь ласка, введіть дійсну адресу електронної пошти",invalid_url:"Будь ласка, введіть дійсну URL-адресу",invalid_number:"Будь ласка, введіть дійсне число",drop_file_here:"Перетягніть файл сюди або",browse:"огляд",file_too_large:"Файл занадто великий",invalid_image:"Будь ласка, виберіть файл зображення",search_results:"Результати пошуку",no_results:"Результатів не знайдено",load_failed_retry:"Не вдалося завантажити — повторити",column_resize:"Змінити ширину стовпця (подвійний клік — за вмістом)",loading:"Завантаження...",submit:"Зберегти",cancel:"Скасувати",remove:"Видалити",add:"Додати",yes:"Так",no:"Ні",table_of:"з",download:"Завантажити",value_empty:"—",table_filter_clear_all:"Очистити всі фільтри",table_new_record:"Новий запис",table_export_excel:"Експортувати до Excel",readonly_access:"У вас доступ лише для перегляду",doc_view_switch:"Змінити вигляд",doc_view_tree:"Деревоподібний вигляд",doc_upload:"Завантажити",doc_upload_to:"Завантажити до",doc_view_list:"Список",filter_sorting:"Сортування",filter_ascending:"За зростанням",filter_descending:"За спаданням",filter_section:"Фільтр",filter_apply:"Застосувати",filter_clear:"Очистити",filter_contains:"Містить",filter_starts_with:"Починається з",filter_equals:"Дорівнює",filter_has_value:"Має значення",filter_is_empty:"Порожнє",filter_is_not_empty:"Не порожнє",filter_exact:"Точно",filter_range:"Діапазон",filter_from:"Від",filter_to:"До",filter_all:"Всі",filter_select_all:"Всі",filter_select_none:"Жодного",filter_search_value:"Значення для пошуку...",filter_no_support:"Фільтрування недоступне для цього типу поля.",textblock_show_more:"Показати більше",close:"Закрити",history_until:"до",history_badge_tooltip:"Попередні значення",hyperlink_name:"Текст посилання (необов'язково)",merge_search_hint:"Знайдіть дублікат для об'єднання",merge_select:"Вибрати",merge_compare_heading:"Вирішити конфлікти",merge_column_a:"Поточний (залишається)",merge_column_b:"Кандидат (буде видалено)",merge_auto_heading:"Ці поля будуть автоматично взяті з кандидата:",merge_no_conflicts:"Конфліктних полів не знайдено",merge_continue:"Продовжити",merge_back:"Назад",merge_confirm_heading:"Підтвердити об'єднання",merge_confirm_warning:"Цю дію не можна скасувати: кандидат буде остаточно видалено.",merge_confirm_button:"Підтвердити об'єднання",invoice_title:"Рахунок-фактура",invoice_date:"Дата рахунку",invoice_due_date:"Термін оплати",invoice_subtotal:"Проміжний підсумок",invoice_tax:"ПДВ",invoice_total:"Разом",invoice_customer:"Клієнт",invoice_supplier:"Постачальник",email_from:"Від",email_to:"Кому",email_cc:"Копія",email_date:"Дата",email_show_headers:"Показати технічні заголовки"}};function _(e,i){var r,t,l;const a=(null!=i?i:"en").split("-")[0].toLowerCase();return null!==(l=null!==(t=(null!==(r=o[a])&&void 0!==r?r:o.en)[e])&&void 0!==t?t:o.en[e])&&void 0!==l?l:e}class c{static render(i,r,t){var l,a,n,o;if(i.type===e.RELATION){const e=null!==(l=i.name)&&void 0!==l?l:"",t=null===(a=null==r?void 0:r._links)||void 0===a?void 0:a[e];return t?Array.isArray(t)?t.map((e=>{var i;return null!==(i=e.name)&&void 0!==i?i:""})).filter(Boolean).join(", "):null!==(n=t.name)&&void 0!==n?n:"":""}if(i.type!==e.FIELD)return"";const _=null!==(o=i.name)&&void 0!==o?o:"",s=i.dataType,d=i.listItems;let u=null==r?void 0:r[_];return i.historyEnabled&&null!=u&&"object"==typeof u&&!Array.isArray(u)&&"current"in u&&(u=u.current),null==u||""===u?"":(Array.isArray(u)?u:[u]).map((e=>c.renderValue(null!=s?s:"TEXT",e,null!=d?d:[],t))).filter((e=>""!==e)).join(", ")}static renderValue(e,n,o,_){var c,s;switch(e){case"INTEGER":return i(Number(n),_,{maximumFractionDigits:0});case"DECIMAL":return i(Number(n),_);case"PERCENTAGE":return t(Number(n),_);case"CURRENCY":{const{amount:e,currency:t}="object"==typeof n&&null!==n?n:{amount:n,currency:""};return t?r(Number(e),t,_):i(Number(e),_)}case"DATE":return l(n,_);case"DATETIME":return a(n,_);case"TIME":return function(e,i){if(!e)return"";const[r,t]=e.split(":").map(Number),l=new Date;return l.setHours(r,t,0,0),new Intl.DateTimeFormat(i,{hour:"2-digit",minute:"2-digit"}).format(l)}(n,_);case"BOOLEAN":return n?"✓":"";case"FILE":case"IMAGE":return"object"==typeof n&&null!==n&&null!==(c=n.fileName)&&void 0!==c?c:"";case"LIST":{const e=o.find((e=>e.key===String(n)));return null!==(s=null==e?void 0:e.label)&&void 0!==s?s:String(n)}case"TEXTBLOCK":{const e=String(n).replace(/<[^>]*>/g,""),i=document.createElement("textarea");return i.innerHTML=e,i.value.trim()}case"LONGTEXT":return String(n).replace(/[\r\n]+/g," ").trim();case"JSON":return("object"==typeof n?JSON.stringify(n):String(n)).replace(/[\r\n]+/g," ").trim();case"SECRET":return n?"••••••••":"";default:return String(n)}}static formatJson(e,i=!1){try{const r="string"==typeof e?JSON.parse(e):e;return(i?JSON.stringify(r):JSON.stringify(r,null,2)).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,(e=>{let i="color:#2aa198";return/^"/.test(e)?i=/:$/.test(e)?"color:#881391":"color:#268bd2":/true|false/.test(e)?i="color:#b58900":/null/.test(e)&&(i="color:#dc322f"),`<span style="${i}">${e}</span>`}))}catch(i){return String(e)}}}export{c as C,l as a,a as b,r as c,t as d,i as f,n as p,_ as t}
|